From 77b357042df7a9cc601fc5cd047d84399422cce8 Mon Sep 17 00:00:00 2001 From: Alex Klimenkov Date: Thu, 17 Oct 2024 22:15:19 +0300 Subject: [PATCH] [update] version 9.0.0 --- README.md | 4 +- bower.json | 2 +- codebase/dhtmlxgantt.css | 2 +- codebase/dhtmlxgantt.d.ts | 2193 +- codebase/dhtmlxgantt.es.d.ts | 7086 ++ codebase/dhtmlxgantt.es.js | 11846 +++ codebase/dhtmlxgantt.es.js.map | 1 + codebase/dhtmlxgantt.js | 74 +- codebase/dhtmlxgantt.js.map | 2 +- codebase/skins/dhtmlxgantt_broadway.css | 1 - codebase/skins/dhtmlxgantt_contrast_black.css | 1 - codebase/skins/dhtmlxgantt_contrast_white.css | 1 - codebase/skins/dhtmlxgantt_material.css | 1 - codebase/skins/dhtmlxgantt_meadow.css | 1 - codebase/skins/dhtmlxgantt_skyblue.css | 1 - codebase/skins/dhtmlxgantt_terrace.css | 1 - codebase/sources/dhtmlxgantt.css | 2864 +- codebase/sources/dhtmlxgantt.es.js | 25555 +++++ codebase/sources/dhtmlxgantt.es.js.map | 1 + codebase/sources/dhtmlxgantt.js | 78255 +++++----------- codebase/sources/dhtmlxgantt.js.map | 1 + codebase/sources/less/defaults.less | 16 + codebase/sources/less/dhtmlxgantt.less | 255 + codebase/sources/less/ext.less | 144 + codebase/sources/less/layout.less | 447 + codebase/sources/less/layout/cell.less | 63 + codebase/sources/less/layout/layout.less | 163 + codebase/sources/less/lightbox.less | 778 + codebase/sources/less/message.less | 138 + codebase/sources/less/package.json | 30 + codebase/sources/less/quickinfo.less | 150 + codebase/sources/less/resource_panel.less | 50 + codebase/sources/less/rtl.less | 10 + codebase/sources/less/scripts.js | 54 + codebase/sources/less/src/buttons.less | 205 + .../less/src/iconfont/dhx-gantt-icons.woff | Bin 0 -> 1848 bytes .../less/src/iconfont/dhx-gantt-icons.woff2 | Bin 0 -> 1376 bytes codebase/sources/less/src/icons.less | 124 + codebase/sources/less/src/imgs/arrow/down.svg | 3 + codebase/sources/less/src/imgs/arrow/up.svg | 3 + codebase/sources/less/src/imgs/close.svg | 3 + .../less/src/imgs/constraint/left_dotted.svg | 6 + .../less/src/imgs/constraint/left_solid.svg | 6 + .../less/src/imgs/constraint/right_dotted.svg | 6 + .../less/src/imgs/constraint/right_solid.svg | 6 + codebase/sources/less/src/imgs/delete.svg | 3 + .../sources/less/src/imgs/dots_vertical.svg | 3 + codebase/sources/less/src/imgs/edit.svg | 3 + codebase/sources/less/src/imgs/menu/down.svg | 3 + codebase/sources/less/src/imgs/menu/right.svg | 3 + codebase/sources/less/src/imgs/minus.svg | 3 + codebase/sources/less/src/imgs/plus.svg | 3 + .../less/src/imgs/rounded_arrow/right.svg | 3 + codebase/sources/less/src/imgs/timer.svg | 3 + .../sources/less/src/themes/broadway.less | 56 + .../less/src/themes/contrast_black.less | 57 + .../less/src/themes/contrast_white.less | 49 + codebase/sources/less/src/themes/dark.less | 40 + codebase/sources/less/src/themes/index.less | 8 + .../sources/less/src/themes/material.less | 157 + codebase/sources/less/src/themes/meadow.less | 51 + codebase/sources/less/src/themes/skyblue.less | 51 + .../sources/less/src/themes/variables.less | 258 + codebase/sources/less/task.less | 446 + codebase/sources/less/tooltip.less | 20 + .../sources/skins/dhtmlxgantt_broadway.css | 2139 - .../skins/dhtmlxgantt_contrast_black.css | 2097 - .../skins/dhtmlxgantt_contrast_white.css | 2107 - .../sources/skins/dhtmlxgantt_material.css | 2457 - codebase/sources/skins/dhtmlxgantt_meadow.css | 2039 - .../sources/skins/dhtmlxgantt_skyblue.css | 2019 - .../sources/skins/dhtmlxgantt_terrace.css | 2030 - package.json | 4 +- whatsnew.md | 26 + 74 files changed, 75861 insertions(+), 70830 deletions(-) create mode 100644 codebase/dhtmlxgantt.es.d.ts create mode 100644 codebase/dhtmlxgantt.es.js create mode 100644 codebase/dhtmlxgantt.es.js.map delete mode 100644 codebase/skins/dhtmlxgantt_broadway.css delete mode 100644 codebase/skins/dhtmlxgantt_contrast_black.css delete mode 100644 codebase/skins/dhtmlxgantt_contrast_white.css delete mode 100644 codebase/skins/dhtmlxgantt_material.css delete mode 100644 codebase/skins/dhtmlxgantt_meadow.css delete mode 100644 codebase/skins/dhtmlxgantt_skyblue.css delete mode 100644 codebase/skins/dhtmlxgantt_terrace.css create mode 100644 codebase/sources/dhtmlxgantt.es.js create mode 100644 codebase/sources/dhtmlxgantt.es.js.map create mode 100644 codebase/sources/dhtmlxgantt.js.map create mode 100644 codebase/sources/less/defaults.less create mode 100644 codebase/sources/less/dhtmlxgantt.less create mode 100644 codebase/sources/less/ext.less create mode 100644 codebase/sources/less/layout.less create mode 100644 codebase/sources/less/layout/cell.less create mode 100644 codebase/sources/less/layout/layout.less create mode 100644 codebase/sources/less/lightbox.less create mode 100644 codebase/sources/less/message.less create mode 100644 codebase/sources/less/package.json create mode 100644 codebase/sources/less/quickinfo.less create mode 100644 codebase/sources/less/resource_panel.less create mode 100644 codebase/sources/less/rtl.less create mode 100644 codebase/sources/less/scripts.js create mode 100644 codebase/sources/less/src/buttons.less create mode 100644 codebase/sources/less/src/iconfont/dhx-gantt-icons.woff create mode 100644 codebase/sources/less/src/iconfont/dhx-gantt-icons.woff2 create mode 100644 codebase/sources/less/src/icons.less create mode 100644 codebase/sources/less/src/imgs/arrow/down.svg create mode 100644 codebase/sources/less/src/imgs/arrow/up.svg create mode 100644 codebase/sources/less/src/imgs/close.svg create mode 100644 codebase/sources/less/src/imgs/constraint/left_dotted.svg create mode 100644 codebase/sources/less/src/imgs/constraint/left_solid.svg create mode 100644 codebase/sources/less/src/imgs/constraint/right_dotted.svg create mode 100644 codebase/sources/less/src/imgs/constraint/right_solid.svg create mode 100644 codebase/sources/less/src/imgs/delete.svg create mode 100644 codebase/sources/less/src/imgs/dots_vertical.svg create mode 100644 codebase/sources/less/src/imgs/edit.svg create mode 100644 codebase/sources/less/src/imgs/menu/down.svg create mode 100644 codebase/sources/less/src/imgs/menu/right.svg create mode 100644 codebase/sources/less/src/imgs/minus.svg create mode 100644 codebase/sources/less/src/imgs/plus.svg create mode 100644 codebase/sources/less/src/imgs/rounded_arrow/right.svg create mode 100644 codebase/sources/less/src/imgs/timer.svg create mode 100644 codebase/sources/less/src/themes/broadway.less create mode 100644 codebase/sources/less/src/themes/contrast_black.less create mode 100644 codebase/sources/less/src/themes/contrast_white.less create mode 100644 codebase/sources/less/src/themes/dark.less create mode 100644 codebase/sources/less/src/themes/index.less create mode 100644 codebase/sources/less/src/themes/material.less create mode 100644 codebase/sources/less/src/themes/meadow.less create mode 100644 codebase/sources/less/src/themes/skyblue.less create mode 100644 codebase/sources/less/src/themes/variables.less create mode 100644 codebase/sources/less/task.less create mode 100644 codebase/sources/less/tooltip.less delete mode 100644 codebase/sources/skins/dhtmlxgantt_broadway.css delete mode 100644 codebase/sources/skins/dhtmlxgantt_contrast_black.css delete mode 100644 codebase/sources/skins/dhtmlxgantt_contrast_white.css delete mode 100644 codebase/sources/skins/dhtmlxgantt_material.css delete mode 100644 codebase/sources/skins/dhtmlxgantt_meadow.css delete mode 100644 codebase/sources/skins/dhtmlxgantt_skyblue.css delete mode 100644 codebase/sources/skins/dhtmlxgantt_terrace.css diff --git a/README.md b/README.md index 190b3f4..559da24 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # dhtmlxGantt # [![dhtmlx.com](https://img.shields.io/badge/made%20by-DHTMLX-blue)](https://dhtmlx.com/) -[![npm: v.8.0.11](https://img.shields.io/badge/npm-v.8.0.11-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt) +[![npm: v.9.0.0](https://img.shields.io/badge/npm-v.9.0.0-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt) [![License: GPL v2](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) [Getting started](#getting-started) | [Features](#features) | [License](#license) | [Useful links](#links) | [Follow us](#followus) @@ -117,7 +117,7 @@ Resource management, critical path calculation, auto scheduling, and other enhan ## License ## -dhtmlxGantt v.8.0.11 Standard +dhtmlxGantt v.9.0.0 Standard This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects. diff --git a/bower.json b/bower.json index d683126..9617f24 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "gantt", - "version": "8.0.11", + "version": "9.0.0", "homepage": "https://dhtmlx.com/docs/products/dhtmlxGantt/", "description": "An open source JavaScript Gantt chart that helps you illustrate a project schedule in a nice-looking chart.", "main": [ diff --git a/codebase/dhtmlxgantt.css b/codebase/dhtmlxgantt.css index f08e249..624ecf4 100644 --- a/codebase/dhtmlxgantt.css +++ b/codebase/dhtmlxgantt.css @@ -1 +1 @@ -.gridHoverStyle,.gridSelection,.timelineSelection{background-color:#fff3a1}.gantt_grid_scale .gantt_grid_head_cell{color:#a6a6a6;border-top:none!important;border-right:none!important}.gantt_grid_data .gantt_cell{border-right:none;color:#454545}.gantt_task_link .gantt_link_arrow_right{border-width:6px;margin-top:-3px}.gantt_task_link .gantt_link_arrow_left{border-width:6px;margin-left:-6px;margin-top:-3px}.gantt_task_link .gantt_link_arrow_down,.gantt_task_link .gantt_link_arrow_up{border-width:6px}.gantt_task_line .gantt_task_progress_drag{bottom:-4px;height:10px;margin-left:-8px;width:16px}.chartHeaderBg{background-color:#fff}.gantt_task .gantt_task_scale .gantt_scale_cell{color:#a6a6a6;border-right:1px solid #ebebeb}.gantt_row.gantt_project,.gantt_row.odd.gantt_project{background-color:#edffef}.gantt_task_row.gantt_project,.gantt_task_row.odd.gantt_project{background-color:#f5fff6}.gantt_task_line.gantt_project{background-color:#65c16f;border:1px solid #3c9445}.gantt_task_line.gantt_project .gantt_task_progress{background-color:#46ad51}.buttonBg{background:#fff}.gantt_cal_light .gantt_btn_set{margin:5px 10px}.gantt_btn_set.gantt_cancel_btn_set{background:#fff;color:#454545;border:1px solid #cecece}.gantt_btn_set.gantt_save_btn_set{background:#3db9d3;text-shadow:0 -1px 0 #248a9f;color:#fff}.gantt_btn_set.gantt_delete_btn_set{text-shadow:0 -1px 0 #6f6f6f;background:#ec8e00;text-shadow:0 -1px 0 #a60;color:#fff}.gantt_cal_light_wide{padding-left:0!important;padding-right:0!important}.gantt_cal_light_wide .gantt_cal_larea{border-left:none!important;border-right:none!important}.gantt_popup_button.gantt_ok_button{background:#3db9d3;text-shadow:0 -1px 0 #248a9f;color:#fff;font-weight:700;border-width:0}.gantt_popup_button.gantt_cancel_button{font-weight:700;color:#454544}.gantt_popup_title{background-color:#fff}.gantt_popup_shadow{box-shadow:3px 3px 3px rgba(0,0,0,.07)}.gantt_qi_big_icon.icon_edit{color:#454545;background:#fff}.gantt_qi_big_icon.icon_delete{text-shadow:0 -1px 0 #a60;background:#ec8e00;color:#fff;border-width:0}.gantt_tooltip{box-shadow:3px 3px 3px rgba(0,0,0,.07);border-left:1px solid rgba(0,0,0,.07);border-top:1px solid rgba(0,0,0,.07);font-size:8pt;color:#454545}.gantt_container,.gantt_tooltip{background-color:#fff;font-family:Arial}.gantt_container{font-size:13px;border:1px solid #cecece;position:relative;white-space:nowrap;overflow-x:hidden;overflow-y:hidden}.gantt_touch_active{overscroll-behavior:none}.gantt_task_scroll{overflow-x:scroll}.gantt_grid,.gantt_task{position:relative;overflow-x:hidden;overflow-y:hidden;display:inline-block;vertical-align:top}.gantt_grid_scale,.gantt_task_scale{color:#6b6b6b;font-size:12px;border-bottom:1px solid #cecece;box-sizing:border-box}.gantt_grid_scale,.gantt_task_scale,.gantt_task_vscroll{background-color:#fff}.gantt_scale_line{box-sizing:border-box;-moz-box-sizing:border-box;border-top:1px solid #cecece}.gantt_scale_line:first-child{border-top:none}.gantt_grid_head_cell{display:inline-block;vertical-align:top;border-right:1px solid #cecece;text-align:center;position:relative;cursor:default;height:100%;box-sizing:border-box;-moz-box-sizing:border-box;line-height:33px;-moz-user-select:-moz-none;-webkit-user-select:none;user-select:none;overflow:hidden}.gantt_scale_line{clear:both}.gantt_grid_data{width:100%;overflow:hidden;position:relative}.gantt_row{position:relative;-webkit-user-select:none;-moz-user-select:none;-moz-user-select:-moz-none}.gantt_add,.gantt_grid_head_add{width:100%;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTQ3MjMyMENDNkI0MTFFMjk4MTI5QTg3MDhFNDVDQTkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTQ3MjMyMERDNkI0MTFFMjk4MTI5QTg3MDhFNDVDQTkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo1NDcyMzIwQUM2QjQxMUUyOTgxMjlBODcwOEU0NUNBOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo1NDcyMzIwQkM2QjQxMUUyOTgxMjlBODcwOEU0NUNBOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PshZT8UAAABbSURBVHjaYrTdeZmBEsCER+4wEP+H4sPkGGCDg020ARR7gb4GIAcYDKMDdPnDyAbYkGG5DVW9cIQMvUdBBAuUY4vDz8iAcZinA2zgCHqAYQMseAywJcYFAAEGAM+UFGuohFczAAAAAElFTkSuQmCC);background-position:50%;background-repeat:no-repeat;cursor:pointer;position:relative;-moz-opacity:.3;opacity:.3}.gantt_grid_head_cell.gantt_grid_head_add{-moz-opacity:.6;opacity:.6;top:0}.gantt_grid_head_cell.gantt_grid_head_add:hover{-moz-opacity:1;opacity:1}.gantt_grid_data .gantt_row.odd:hover,.gantt_grid_data .gantt_row:hover{background-color:#fff3a1}.gantt_grid_data .gantt_row.odd:hover .gantt_add,.gantt_grid_data .gantt_row:hover .gantt_add{-moz-opacity:1;opacity:1}.gantt_row,.gantt_task_row{border-bottom:1px solid #ebebeb;background-color:#fff}.gantt_row.odd,.gantt_task_row.odd{background-color:#fff}.gantt_cell,.gantt_grid_head_cell,.gantt_row,.gantt_scale_cell,.gantt_task_cell,.gantt_task_row{box-sizing:border-box;-moz-box-sizing:border-box}.gantt_grid_head_cell,.gantt_scale_cell{line-height:inherit}.gantt_grid_scale .gantt_grid_column_resize_wrap{cursor:col-resize;position:absolute;width:13px;margin-left:-7px}.gantt_grid_column_resize_wrap .gantt_grid_column_resize{background-color:#cecece;height:100%;width:1px;margin:0 auto}.gantt_task_grid_row_resize_wrap{cursor:row-resize;position:absolute;height:13px;margin-top:-7px;left:0;width:100%}.gantt_task_grid_row_resize_wrap .gantt_task_grid_row_resize{background-color:#ebebeb;top:6px;height:1px;width:100%;margin:0 auto;position:relative}.gantt_drag_marker{pointer-events:none}.gantt_drag_marker.gantt_grid_resize_area,.gantt_drag_marker.gantt_row_grid_resize_area{background-color:hsla(0,0%,91%,.5);height:100%;width:100%;box-sizing:border-box}.gantt_drag_marker.gantt_grid_resize_area{border-left:1px solid #cecece;border-right:1px solid #cecece}.gantt_drag_marker.gantt_row_grid_resize_area{border-top:1px solid #cecece;border-bottom:1px solid #cecece;pointer-events:none}.gantt_row{display:flex}.gantt_row>div{flex-shrink:0;flex-grow:0}.gantt_cell{vertical-align:top;border-right:1px solid #ebebeb;padding-left:6px;padding-right:6px;height:100%;overflow:hidden;white-space:nowrap;font-size:13px}.gantt_cell_tree{display:flex;flex-wrap:nowrap}.gantt_grid_data .gantt_last_cell,.gantt_grid_scale .gantt_last_cell,.gantt_task .gantt_task_scale .gantt_scale_cell.gantt_last_cell,.gantt_task_bg .gantt_last_cell{border-right-width:0}.gantt_task .gantt_task_scale .gantt_scale_cell.gantt_last_cell{border-right-width:1px}.gantt_task_bg{overflow:hidden}.gantt_scale_cell{display:inline-block;white-space:nowrap;overflow:hidden;border-right:1px solid #cecece;text-align:center;height:100%}.gantt_task_cell{display:inline-block;height:100%;border-right:1px solid #ebebeb}.gantt_layout_cell.gantt_ver_scroll{width:0;background-color:transparent;height:1px;overflow-x:hidden;overflow-y:scroll;position:absolute;right:0;z-index:1}.gantt_ver_scroll>div{width:1px;height:1px}.gantt_hor_scroll{height:0;background-color:transparent;width:100%;clear:both;overflow-x:scroll;overflow-y:hidden}.gantt_layout_cell .gantt_hor_scroll{position:absolute}.gantt_hor_scroll>div{width:5000px;height:1px}.gantt_tree_icon,.gantt_tree_indent{flex-grow:0;flex-shrink:0}.gantt_tree_indent{width:15px;height:100%}.gantt_tree_content,.gantt_tree_icon{vertical-align:top}.gantt_tree_icon{width:28px;height:100%;background-repeat:no-repeat;background-position:50%}.gantt_tree_content{height:100%;white-space:nowrap;min-width:0}.gantt_tree_icon.gantt_open{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAArklEQVQ4T2NkoBJgpJI5DEPAoFOnTv0/c+YMQR+bmJgwmJmZwX2E4bVp06b9j4yMZODg4MBp2I8fPxiWL1/OkJWVNUAGcXJyMnz//h3uQrJdRLFBIAPQAchlJLsIFuCMjIwM////B5sJMoRkg2CuIdtrQcHBDOxsbHBfCQgIMHz48AHO//nrF8O6tWsJR7+7uzsDIxMTznT0/98/hp07d+I3iGopm2DewKFg8OV+AJWkfRMrTobLAAAAAElFTkSuQmCC);width:18px;cursor:pointer}.gantt_tree_icon.gantt_close{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAkUlEQVQ4T2NkoBJgpJI5DEPAoFOnTv0/c+YMQR+bmJgwmJmZwX2E4bVp06b9j4yMZODg4MBp2I8fPxiWL1/OkJWVNeIN4uTkxAin79+/M5AcRtgCHGQIyQbhijaiDQoKDmZgZ2PDGf0/f/1iWLd2LeHod3d3Z2BkYsJp0P9//xh27tyJ3yCqpWyCeQOHgsGX+wEZpW4T5LCxKwAAAABJRU5ErkJggg==);width:18px;cursor:pointer}.gantt_tree_icon.gantt_blank{width:18px}.gantt_tree_icon.gantt_folder_open{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAs0lEQVQ4T62T0Q2EIBBEpQlzuaaMsQoqooqLsSljbMLLmMxmUXBR4U+Qt7Mzi2sqLVeJ00SgEMKWAnvvzYLyAyHfT5sU2fXDJSwCAXK8MI0/UTkva7IIFJsg3NSwnKdFoKtAWOQ1CN7CEqeTotE5L7QyJhmBcklZM4ZgTiAr3iOU3kD93ppO5SkMjB1EeXdBWoSkRql3YeIRe+cGvktS056JR9wsmeBUkujCfNXWCPC8GugPqn5ii/hV+FoAAAAASUVORK5CYII=)}.gantt_tree_icon.gantt_folder_closed{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAfElEQVQ4T2NkoBJgpJI5DCgGTZ8+/T82gzMzMwlaCFcAM0RKQgyrI/0Dg/EahmIQyBB0DRvXr4W78tmLV1gtAbmYoEEgnciG4QpTogzCFyEwSyg2CBS2oCAZNQh3cA+hMAJ5AlcKxuVBlOgnNgVjMwyUrQjmamKLGaoZBAAOTFyLnFFW4wAAAABJRU5ErkJggg==)}.gantt_tree_icon.gantt_file{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAeElEQVQ4T2NkoBJgRDZn+vTp/wmZm5mZiaIHph7DICkJMUJmMfgHBmMYhtUgbAo3rl+L4lp0NUQbBPI2umuRDaPIIFAYwAyjv0HoMQALM5JdhG4QLMxGDcKdyIdoGIE89OzFK4KZF5Rl8EY/QROQFGA1iBQD0NUCAJVjcxO0naAQAAAAAElFTkSuQmCC)}.gantt_grid_head_cell .gantt_sort{position:absolute;right:5px;top:8px;width:7px;height:13px;background-repeat:no-repeat;background-position:50%}.gantt_grid_head_cell .gantt_sort.gantt_asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAANCAYAAABlyXS1AAAARUlEQVR4nGNgQAKGxib/GbABkIS7b8B/DAUwCRiGK0CXwFBAb1DfP/U/LszwHwi2X7qFgUEArBtdAVwCBmAKMCSQFSDzAWXXaOHsXeqkAAAAAElFTkSuQmCC)}.gantt_grid_head_cell .gantt_sort.gantt_desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAANCAYAAABlyXS1AAAARUlEQVR42mNgQAL1/VP/M2ADIIntF2/9x1AAlrh0C47hCmA60DFYwX88gIFGwNDY5D8uDFbg7hvwHx2jmIBTAlkB0e4BAEjlaNtBWJPnAAAAAElFTkSuQmCC)}.gantt_inserted,.gantt_updated{font-weight:700}.gantt_deleted{text-decoration:line-through}.gantt_invalid{background-color:#ffe0e0}.gantt_error{color:red}.gantt_status{right:1px;padding:5px 10px;background:hsla(0,0%,61%,.1);position:absolute;top:1px;transition:opacity .2s;opacity:0}.gantt_status.gantt_status_visible{opacity:1}#gantt_ajax_dots span{transition:opacity .2s;background-repeat:no-repeat;opacity:0}#gantt_ajax_dots span.gantt_dot_visible{opacity:1}.gantt_column_drag_marker{border:1px solid #cecece;opacity:.8;pointer-events:none}.gantt_grid_head_cell_dragged{border:1px solid #cecece;opacity:.3}.gantt_grid_target_marker{position:absolute;top:0;width:2px;height:100%;background-color:#ffa011;transform:translateX(-1px)}.gantt_grid_target_marker:after,.gantt_grid_target_marker:before{display:block;content:"";position:absolute;left:-5px;width:0;height:0;border:6px solid transparent}.gantt_grid_target_marker:before{border-top-color:#ffa011}.gantt_grid_target_marker:after{bottom:0;border-bottom-color:#ffa011}.gantt_message_area{position:fixed;right:5px;width:250px;z-index:1000}.gantt-info{min-width:120px;padding:4px 4px 4px 20px;font-family:Arial;z-index:10000;margin:5px;margin-bottom:10px;transition:all .5s ease}.gantt-info.hidden{height:0;padding:0;border-width:0;margin:0;overflow:hidden}.gantt_modal_box{overflow:hidden;display:inline-block;min-width:250px;width:250px;text-align:center;position:fixed;z-index:20000;box-shadow:3px 3px 3px rgba(0,0,0,.07);font-family:Arial;border-radius:6px;border:1px solid #cecece;background:#fff}.gantt_popup_title{border-top-left-radius:6px;border-top-right-radius:6px;border-width:0}.gantt_button,.gantt_popup_button{border:1px solid #cecece;height:30px;line-height:30px;display:inline-block;margin:0 5px;border-radius:4px;background:#fff}.gantt-info,.gantt_button,.gantt_popup_button{user-select:none;-webkit-user-select:none;-moz-user-select:-moz-none;cursor:pointer}.gantt_popup_text{overflow:hidden}.gantt_popup_controls{border-radius:6px;padding:10px}.gantt_popup_button{min-width:100px}div.dhx_modal_cover{background-color:#000;cursor:default;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20);opacity:.2;position:fixed;z-index:19999;left:0;top:0;width:100%;height:100%;border:none;zoom:1}.gantt-info img,.gantt_modal_box img{float:left;margin-right:20px}.gantt-alert-error,.gantt-confirm-error{border:1px solid red}.gantt_button input,.gantt_popup_button div{border-radius:4px;font-size:14px;box-sizing:content-box;padding:0;margin:0;vertical-align:top}.gantt_popup_title{border-bottom:1px solid #cecece;height:40px;line-height:40px;font-size:20px}.gantt_popup_text{margin:15px 15px 5px;font-size:14px;color:#000;min-height:30px;border-radius:6px}.gantt-error,.gantt-info{font-size:14px;color:#000;box-shadow:3px 3px 3px rgba(0,0,0,.07);padding:0;background-color:#fff;border-radius:3px;border:1px solid #fff}.gantt-info div{padding:5px 10px;background-color:#fff;border-radius:3px;border:1px solid #cecece}.gantt-error{background-color:#d81b1b;border:1px solid #ff3c3c}.gantt-error div{background-color:#d81b1b;border:1px solid #940000;color:#fff}.gantt-warning{background-color:#ff9000;border:1px solid #ffa633}.gantt-warning div{background-color:#ff9000;border:1px solid #b36500;color:#fff}.gantt_data_area div,.gantt_grid div{-ms-touch-action:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.gantt_data_area{position:relative;overflow-x:hidden;overflow-y:hidden;-moz-user-select:-moz-none;-webkit-user-select:none;user-select:none}.gantt_links_area{position:absolute;left:0;top:0}.gantt_side_content,.gantt_task_content,.gantt_task_progress{line-height:inherit;overflow:hidden;height:100%}.gantt_task_content{font-size:12px;color:#fff;width:100%;top:0;cursor:pointer;position:absolute;white-space:nowrap;text-align:center}.gantt_task_progress{text-align:center;z-index:0;background:#299cb4}.gantt_task_progress_wrapper{border-radius:inherit;position:relative;width:100%;height:100%;overflow:hidden}.gantt_task_line{border-radius:2px;position:absolute;box-sizing:border-box;background-color:#3db9d3;border:1px solid #2898b0;-webkit-user-select:none;-moz-user-select:none;-moz-user-select:-moz-none}.gantt_task_line.gantt_drag_move div{cursor:move}.gantt_touch_move,.gantt_touch_progress .gantt_touch_resize{transform:scale(1.02,1.1);transform-origin:50%}.gantt_touch_progress .gantt_task_progress_drag,.gantt_touch_resize .gantt_task_drag{transform:scaleY(1.3);transform-origin:50%}.gantt_side_content{position:absolute;white-space:nowrap;color:#6e6e6e;top:0;font-size:11px}.gantt_side_content.gantt_left{right:100%;padding-right:20px}.gantt_side_content.gantt_right{left:100%;padding-left:20px}.gantt_side_content.gantt_link_crossing{bottom:8.75px;top:auto}.gantt_link_arrow,.gantt_task_link .gantt_line_wrapper{position:absolute;cursor:pointer}.gantt_line_wrapper div{background-color:#ffa011}.gantt_task_link:hover .gantt_line_wrapper div{box-shadow:0 0 5px 0 #ffa011}.gantt_task_link div.gantt_link_arrow{background-color:transparent;border-style:solid;width:0;height:0}.gantt_link_control{position:absolute;width:20px;top:0}.gantt_link_control div{display:none;cursor:pointer;box-sizing:border-box;position:relative;top:50%;margin-top:-7.5px;vertical-align:middle;border:1px solid #929292;border-radius:6.5px;height:13px;width:13px;background-color:#f0f0f0}.gantt_link_control.task_right div.gantt_link_point{margin-left:7px}.gantt_link_control div:hover{background-color:#fff}.gantt_link_control.task_left{left:-20px}.gantt_link_control.task_right{right:-20px}.gantt_link_target .gantt_link_control div,.gantt_task_line.gantt_drag_move .gantt_link_control div,.gantt_task_line.gantt_drag_move .gantt_task_drag,.gantt_task_line.gantt_drag_move .gantt_task_progress_drag,.gantt_task_line.gantt_drag_progress .gantt_link_control div,.gantt_task_line.gantt_drag_progress .gantt_task_drag,.gantt_task_line.gantt_drag_progress .gantt_task_progress_drag,.gantt_task_line.gantt_drag_resize .gantt_link_control div,.gantt_task_line.gantt_drag_resize .gantt_task_drag,.gantt_task_line.gantt_drag_resize .gantt_task_progress_drag,.gantt_task_line.gantt_selected .gantt_link_control div,.gantt_task_line.gantt_selected .gantt_task_drag,.gantt_task_line.gantt_selected .gantt_task_progress_drag,.gantt_task_line:hover .gantt_link_control div,.gantt_task_line:hover .gantt_task_drag,.gantt_task_line:hover .gantt_task_progress_drag{display:block}.gantt_link_source,.gantt_link_target{box-shadow:0 0 3px #3db9d3}.gantt_link_target.link_finish_allow,.gantt_link_target.link_start_allow{box-shadow:0 0 3px #ffbf5e}.gantt_link_target.link_finish_deny,.gantt_link_target.link_start_deny{box-shadow:0 0 3px #e87e7b}.link_finish_allow .gantt_link_control.task_end_date div,.link_start_allow .gantt_link_control.task_start_date div{background-color:#ffbf5e;border-color:#ffa011}.link_finish_deny .gantt_link_control.task_end_date div,.link_start_deny .gantt_link_control.task_start_date div{background-color:#e87e7b;border-color:#dd3e3a}.gantt_link_arrow_right{border-width:4px 0 4px 6px;border-top-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important;border-left-color:#ffa011}.gantt_link_arrow_left{border-width:4px 6px 4px 0;margin-top:-1px;border-top-color:transparent!important;border-right-color:#ffa011;border-bottom-color:transparent!important;border-left-color:transparent!important}.gantt_link_arrow_up{border-width:0 4px 6px;border-color:transparent transparent #ffa011;border-top-color:transparent!important;border-right-color:transparent!important;border-bottom-color:#ffa011;border-left-color:transparent!important}.gantt_link_arrow_down{border-width:4px 6px 0 4px;border-top-color:#ffa011;border-right-color:transparent!important;border-bottom-color:transparent!important;border-left-color:transparent!important}.gantt_task_drag,.gantt_task_progress_drag{cursor:ew-resize;display:none;position:absolute}.gantt_task_drag.task_right{cursor:e-resize}.gantt_task_drag.task_left{cursor:w-resize}.gantt_task_drag{height:100%;width:8px;z-index:1;top:-1px}.gantt_task_drag.task_left{left:-7px}.gantt_task_drag.task_right{right:-7px}.gantt_task_progress_drag{height:8px;width:8px;bottom:-4px;margin-left:-4px;background-position:bottom;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAYAAAB24g05AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgM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xQDciL+6B6wAbkA/EqJwdrTkUFOQZCAKQGpBbIXA3SCzJggo+XK7OEuBgDsQCkFqgHrBfsBT5eHgZSAUwP2IBfv36TbABMDygdtK1Zv6UESLORaAbIhG6AAAMAKN8wE24DXWcAAAAASUVORK5CYII=);background-repeat:no-repeat;z-index:1}.gantt_task_progress_drag:hover{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAYAAAB24g05AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAs0lEQVQoz6WMPW7CQBgFJxZaiZ60qcgdwjVMmzu8gpwhDULabXyBdHAGuzRHivQiQZovigS2+Jtu95t5T03TMITtCtjEc5VSOgx5k5F4CnxJWgKUUl5sv6eUvk/daiCeAe1fDCCpBtq4jQ/YngO9pMWpGH99OOcDtt8ifmWEuO3D/R+wXQOdpGcuIGkGdNFQ2RawlTTlSsLd2RY55+O95JyPFQ/y8MAE+CylfADpxvYHWP8CXj+JR4wdKHYAAAAASUVORK5CYII=)}.gantt_link_tooltip{box-shadow:3px 3px 3px #888;background-color:#fff;border-left:1px dotted #cecece;border-top:1px dotted #cecece;font-family:Tahoma;font-size:8pt;color:#444;padding:6px;line-height:20px}.gantt_link_direction{height:0;border:0 none #ffa011;border-bottom-style:dashed;border-bottom-width:2px;transform-origin:0 0;-ms-transform-origin:0 0;-webkit-transform-origin:0 0;z-index:2;margin-left:1px;position:absolute}.gantt_grid_data .gantt_row.gantt_selected,.gantt_grid_data .gantt_row.odd.gantt_selected,.gantt_task_row.gantt_selected{background-color:#fff3a1}.gantt_task_row.gantt_selected .gantt_task_cell{border-right-color:#ffec6e}.gantt_task_line.gantt_selected{box-shadow:0 0 5px #299cb4}.gantt_task_line.gantt_project.gantt_selected{box-shadow:0 0 5px #46ad51}.gantt_task_line.gantt_milestone{visibility:hidden;background-color:#d33daf;border:0 solid #61164f;box-sizing:content-box;-moz-box-sizing:content-box}.gantt_task_line.gantt_milestone div{visibility:visible}.gantt_task_line.gantt_milestone .gantt_task_content{background:inherit;border:inherit;border-width:1px;border-radius:inherit;box-sizing:border-box;-moz-box-sizing:border-box;transform:rotate(45deg)}.gantt_task_line.gantt_task_inline_color{border-color:#999}.gantt_task_line.gantt_task_inline_color .gantt_task_progress{background-color:#363636;opacity:.2}.gantt_task_line.gantt_task_inline_color.gantt_project.gantt_selected,.gantt_task_line.gantt_task_inline_color.gantt_selected{box-shadow:0 0 5px #999}.gantt_task_link.gantt_link_inline_color:hover .gantt_line_wrapper div{box-shadow:0 0 5px 0 #999}.gantt_critical_task{background-color:#e63030;border-color:#9d3a3a}.gantt_critical_task .gantt_task_progress{background-color:rgba(0,0,0,.4)}.gantt_critical_link .gantt_line_wrapper>div{background-color:#e63030}.gantt_critical_link .gantt_link_arrow{border-color:#e63030}.gantt_btn_set:focus,.gantt_cell:focus,.gantt_grid_head_cell:focus,.gantt_popup_button:focus,.gantt_qi_big_icon:focus,.gantt_row:focus{box-shadow:inset 0 0 1px 1px #4d90fe}.gantt_split_parent,.gantt_split_subproject{opacity:.1;pointer-events:none}.gantt_rollup_child .gantt_link_control,.gantt_rollup_child:hover .gantt_link_control{display:none}.gantt_unselectable,.gantt_unselectable div{-webkit-user-select:none;-moz-user-select:none;-moz-user-select:-moz-none}.gantt_cal_light{-webkit-tap-highlight-color:transparent;background:#fff;border-radius:6px;font-family:Arial;font-size:13px;border:1px solid #cecece;color:#6b6b6b;font-size:12px;position:absolute;z-index:10001;width:550px;height:250px;box-shadow:3px 3px 3px rgba(0,0,0,.07)}.gantt_cal_light_wide{width:650px}.gantt_cal_light select{font-family:Arial;border:1px solid #cecece;font-size:13px;padding:2px;margin:0}.gantt_cal_ltitle{padding:7px 10px;overflow:hidden;-webkit-border-top-left-radius:6px;-webkit-border-bottom-left-radius:0;-webkit-border-top-right-radius:6px;-webkit-border-bottom-right-radius:0;-moz-border-radius-topleft:6px;-moz-border-radius-bottomleft:0;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:0;border-top-left-radius:6px;border-bottom-left-radius:0;border-top-right-radius:6px;border-bottom-right-radius:0}.gantt_cal_ltitle,.gantt_cal_ltitle span{white-space:nowrap}.gantt_cal_lsection{color:#727272;font-weight:700;padding:12px 0 5px 10px}.gantt_cal_lsection .gantt_fullday{float:right;margin-right:5px;font-size:12px;font-weight:400;line-height:20px;vertical-align:top;cursor:pointer}.gantt_cal_lsection{font-size:13px}.gantt_cal_ltext{padding:2px 10px;overflow:hidden}.gantt_cal_ltext textarea{overflow-y:auto;overflow-x:hidden;font-family:Arial;font-size:13px;box-sizing:border-box;border:1px solid #cecece;height:100%;width:100%;outline:none!important;resize:none}.gantt_section_constraint [data-constraint-time-select]{margin-left:20px}.gantt_time{font-weight:700}.gantt_cal_light .gantt_title{padding-left:10px}.gantt_cal_larea{border:1px solid #cecece;border-left:none;border-right:none;background-color:#fff;overflow:hidden;height:1px}.gantt_btn_set{margin:10px 7px 5px 10px;padding:5px 15px 5px 10px;float:left;border-radius:4px;border:0 solid #cecece;height:32px;font-weight:700;background:#fff;box-sizing:border-box;cursor:pointer}.gantt_hidden{display:none}.gantt_btn_set div{float:left;font-size:13px;height:22px;line-height:22px;background-repeat:no-repeat;vertical-align:middle}.gantt_save_btn{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi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ixed;z-index:10000;top:0;left:0;background-color:#000;opacity:.1;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=10)}.gantt_custom_button{padding:0 3px;font-family:Arial;font-size:13px;font-weight:400;margin-right:10px;margin-top:-5px;cursor:pointer;float:right;height:21px;width:90px;border:1px solid #cecece;text-align:center;border-radius:4px}.gantt_custom_button div{cursor:pointer;float:none;height:21px;line-height:21px;vertical-align:middle}.gantt_custom_button div:first-child{display:none}.gantt_cal_light_wide{width:580px;padding:2px 4px}.gantt_cal_light_wide .gantt_cal_larea{box-sizing:border-box;border:1px solid #cecece}.gantt_cal_light_wide .gantt_cal_lsection{border:0;float:left;text-align:right;width:80px;height:20px;padding:5px 10px 0 0}.gantt_cal_light_wide .gantt_wrap_section{position:relative;padding:10px 0;overflow:hidden;border-bottom:1px solid #ebebeb}.gantt_cal_light_wide .gantt_section_time{overflow:hidden;padding-top:2px!important;padding-right:0;height:20px!important}.gantt_cal_light_wide .gantt_cal_ltext{padding-right:0}.gantt_cal_light_wide .gantt_cal_larea{padding:0 10px;width:100%}.gantt_cal_light_wide .gantt_section_time{background:transparent}.gantt_cal_light_wide .gantt_cal_checkbox label{padding-left:0}.gantt_cal_light_wide .gantt_cal_lsection .gantt_fullday{float:none;margin-right:0;font-weight:700;cursor:pointer}.gantt_cal_light_wide .gantt_custom_button{position:absolute;top:0;right:0;margin-top:2px}.gantt_cal_light_wide .gantt_repeat_right{margin-right:55px}.gantt_cal_light_wide{width:738px}.gantt_cal_light_full{width:auto}.gantt_cal_wide_checkbox input{margin-top:8px;margin-left:14px}.gantt_cal_light input{font-size:13px}.gantt_section_time{background-color:#fff;white-space:nowrap;padding:2px 10px 5px;padding-top:2px!important}.gantt_section_time .gantt_time_selects{float:left;height:25px}.gantt_section_time .gantt_time_selects select{height:23px;padding:2px;border:1px solid #cecece}.gantt_duration{width:100px;height:23px;float:left;white-space:nowrap;margin-left:20px;line-height:23px}.gantt_duration .gantt_duration_dec,.gantt_duration .gantt_duration_inc,.gantt_duration .gantt_duration_value{box-sizing:border-box;text-align:center;vertical-align:top;height:100%;border:1px solid #cecece}.gantt_duration .gantt_duration_value{width:40px;padding:3px 4px;border-left-width:0;border-right-width:0}.gantt_duration .gantt_duration_value.gantt_duration_value_formatted{width:70px}.gantt_duration .gantt_duration_dec,.gantt_duration .gantt_duration_inc{width:20px;padding:1px;padding-bottom:1px;background:#fff}.gantt_duration .gantt_duration_dec{-moz-border-top-left-radius:4px;-moz-border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;border-top-left-radius:4px;border-bottom-left-radius:4px}.gantt_duration .gantt_duration_inc{margin-right:4px;-moz-border-top-right-radius:4px;-moz-border-bottom-right-radius:4px;-webkit-border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px}.gantt_resources{max-height:150px;height:auto;overflow-y:auto}.gantt_resource_row{display:block;padding:10px 0;border-bottom:1px solid #ebebeb;cursor:pointer}.gantt_resource_row input[type=checkbox]:not(:checked),.gantt_resource_row input[type=checkbox]:not(:checked)~div{opacity:.5}.gantt_resource_toggle{vertical-align:middle}.gantt_resources_filter .gantt_resources_filter_input{padding:1px 2px;box-sizing:border-box}.gantt_resources_filter .switch_unsetted{vertical-align:middle}.gantt_resource_cell{display:inline-block}.gantt_resource_cell.gantt_resource_cell_checkbox{width:24px;max-width:24px;min-width:24px;vertical-align:middle}.gantt_resource_cell.gantt_resource_cell_label{width:40%;max-width:40%;vertical-align:middle}.gantt_resource_cell.gantt_resource_cell_value{width:30%;max-width:30%;vertical-align:middle}.gantt_resource_cell.gantt_resource_cell_value input,.gantt_resource_cell.gantt_resource_cell_value select{width:80%;vertical-align:middle;padding:1px 2px;box-sizing:border-box}.gantt_resource_cell.gantt_resource_cell_unit{width:10%;max-width:10%;vertical-align:middle}.gantt_resource_early_value{opacity:.8;font-size:.9em}.gantt_cal_quick_info{border:1px solid #cecece;border-radius:6px;position:absolute;z-index:300;box-shadow:3px 3px 3px rgba(0,0,0,.07);background-color:#fff;width:300px;transition:left .5s ease,right .5s;-moz-transition:left .5s ease,right .5s;-webkit-transition:left .5s ease,right .5s;-o-transition:left .5s ease,right .5s}.gantt_no_animate{transition:none;-moz-transition:none;-webkit-transition:none;-o-transition:none}.gantt_cal_quick_info.gantt_qi_left .gantt_qi_big_icon{float:right}.gantt_cal_qi_title{-webkit-border-top-left-radius:6px;-webkit-border-bottom-left-radius:0;-webkit-border-top-right-radius:6px;-webkit-border-bottom-right-radius:0;-moz-border-radius-topleft:6px;-moz-border-radius-bottomleft:0;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:0;border-top-left-radius:6px;border-bottom-left-radius:0;border-top-right-radius:6px;border-bottom-right-radius:0;padding:5px 0 8px 12px;color:#454545;background-color:#fff;border-bottom:1px solid #cecece}.gantt_cal_qi_tdate{font-size:14px;font-weight:700}.gantt_cal_qi_tcontent{font-size:13px}.gantt_cal_qi_content{padding:16px 8px;font-size:13px;color:#454545;overflow:hidden}.gantt_cal_qi_controls{-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:6px;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:6px;-moz-border-radius-topleft:0;-moz-border-radius-bottomleft:6px;-moz-border-radius-topright:0;-moz-border-radius-bottomright:6px;border-top-left-radius:0;border-bottom-left-radius:6px;border-top-right-radius:0;border-bottom-right-radius:6px;padding-left:7px}.gantt_cal_qi_controls .gantt_menu_icon{margin-top:6px;background-repeat:no-repeat}.gantt_cal_qi_controls .gantt_menu_icon.icon_edit{width:20px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH3QYFCjI5ZQj5bAAAAFNJREFUOMvt0zEOACAIA0DkwTymH8bJTRTKZGJXyaWEKPKTCQAH4Ls37cItcDUzsxHNDLZNhCq7Gt1wh9ErV7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mlpZDoyMUQ3Mjc1QUMzMDQxMUUyOEE2MkZBNzcxQjJDNjM0RiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyMUQ3Mjc1QkMzMDQxMUUyOEE2MkZBNzcxQjJDNjM0RiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PmUD0gAAAABvSURBVHjaYvz//z8DIyMjAxYQicReji4J0ofKQNP8HwmgGQbXB8IsWGwDSSwDuioKjY9uBthVjFAXYHUGAQA2kYmBUoAUBpGk0LAwgBvwH+YX4mkwptgLowYMRgOITUyYKRFIN/wnDjQgJySAAAMApryKzL8wjfUAAAAASUVORK5CYII=)}.gantt_qi_big_icon{font-size:13px;border-radius:4px;font-weight:700;background:#fff;margin:5px 9px 8px 0;min-width:60px;line-height:32px;vertical-align:middle;padding:0 10px 0 5px;cursor:pointer;border:1px solid #cecece}.gantt_cal_qi_controls div{float:left;height:32px;text-align:center;line-height:32px}.gantt_cal_quick_info.gantt_qi_hidden{display:none}.gantt_tooltip{padding:10px;position:absolute;z-index:50;white-space:nowrap}.gantt_resource_marker{position:absolute;text-align:center;font-size:14px;color:#fff}.gantt_resource_marker_ok{background:rgba(78,208,134,.75)}.gantt_resource_marker_overtime{background:hsla(0,100%,76%,.69)}.gantt_histogram_label{width:100%;height:100%;position:absolute;z-index:1;font-weight:700;font-size:13px}.gantt_histogram_fill{background-color:rgba(41,157,180,.2);width:100%;position:absolute;bottom:0}.gantt_histogram_hor_bar{height:1px;margin-top:-1px}.gantt_histogram_hor_bar,.gantt_histogram_vert_bar{position:absolute;background:#299db4;margin-left:-1px}.gantt_histogram_vert_bar{width:1px}.gantt_histogram_cell{position:absolute;text-align:center;font-size:13px;color:#000}.gantt_marker{height:100%;width:2px;top:0;position:absolute;text-align:center;background-color:rgba(255,0,0,.4);box-sizing:border-box}.gantt_marker .gantt_marker_content{padding:5px;background:inherit;color:#fff;position:absolute;font-size:12px;line-height:12px;opacity:.8}.gantt_marker_area{position:absolute;top:0;left:0}.gantt_grid_editor_placeholder{position:absolute}.gantt_grid_editor_placeholder>div,.gantt_grid_editor_placeholder input,.gantt_grid_editor_placeholder select{width:100%;height:100%;box-sizing:border-box}.gantt_row_placeholder div{opacity:.5}.gantt_row_placeholder .gantt_add,.gantt_row_placeholder .gantt_file{display:none}.gantt_drag_marker.gantt_grid_dnd_marker{background-color:transparent;transition:all .1s ease}.gantt_grid_dnd_marker_line{height:4px;width:100%;background-color:#3498db}.gantt_grid_dnd_marker_line:before{background:#fff;width:12px;height:12px;box-sizing:border-box;border:3px solid #3498db;border-radius:6px;content:"";line-height:1px;display:block;position:absolute;margin-left:-11px;margin-top:-4px;pointer-events:none}.gantt_grid_dnd_marker_folder{height:100%;width:100%;position:absolute;pointer-events:none;box-sizing:border-box;box-shadow:inset 0 0 0 2px #3f98db;background:transparent}.gantt_overlay_area{display:none}.gantt_overlay,.gantt_overlay_area{position:absolute;height:inherit;width:inherit;top:0;left:0}.gantt_click_drag_rect{position:absolute;left:0;top:0;outline:1px solid #3f98db;background-color:rgba(52,152,219,.3)}.gantt_timeline_move_available,.gantt_timeline_move_available *{cursor:move}.gantt_rtl .gantt_grid{text-align:right}.gantt_rtl .gantt_cell,.gantt_rtl .gantt_row{flex-direction:row-reverse}.gantt_layout_content{width:100%;overflow:auto;box-sizing:border-box}.gantt_layout_cell{position:relative;box-sizing:border-box}.gantt_layout_cell>.gantt_layout_header{background:#33aae8;color:#fff;font-size:17px;padding:5px 10px;box-sizing:border-box}.gantt_layout_header.collapsed_x{background:#a9a9a9}.gantt_layout_header.collapsed_x .gantt_header_arrow:before{content:"\21E7"}.gantt_layout_header.collapsed_y{background:#a9a9a9}.gantt_layout_header.collapsed_y .gantt_header_arrow:before{content:"\21E9"}.gantt_layout_header{cursor:pointer}.gantt_layout_header .gantt_header_arrow{float:right;text-align:right}.gantt_layout_header .gantt_header_arrow:before{content:"\21E6"}.gantt_layout_header.vertical .gantt_header_arrow:before{content:"\21E7"}.gantt_layout_outer_scroll_vertical .gantt_layout_content{overflow-y:hidden}.gantt_layout_outer_scroll_horizontal .gantt_layout_content{overflow-x:hidden}.gantt_layout_x>.gantt_layout_cell{display:inline-block;vertical-align:top}.gantt_layout_x{white-space:nowrap}.gantt_resizing{opacity:.7;background:#f2f2f2}.gantt_layout_cell_border_right.gantt_resizer{overflow:visible;border-right:0}.gantt_resizer{cursor:e-resize;position:relative}.gantt_resizer_y{cursor:n-resize}.gantt_resizer_stick{background:#33aae8;z-index:9999;position:absolute;top:0;width:100%}.gantt_resizer_x .gantt_resizer_x{position:absolute;width:20px;height:100%;margin-left:-10px;top:0;left:0;z-index:1}.gantt_resizer_y .gantt_resizer_y{position:absolute;height:20px;width:100%;top:-10px;left:0;z-index:1}.gantt_resizer_error{background:#cd5c5c!important}.gantt_layout_cell_border_left{border-left:1px solid #cecece}.gantt_layout_cell_border_right{border-right:1px solid #cecece}.gantt_layout_cell_border_top{border-top:1px solid #cecece}.gantt_layout_cell_border_bottom{border-bottom:1px solid #cecece}.gantt_layout_cell_border_transparent{border-color:transparent}.gantt_window{position:absolute;top:50%;left:50%;z-index:999999999;background:#fff}.gantt_window_content{position:relative}.gantt_window_content_header{background:#39c;color:#fff;height:33px;padding:10px 10px 0;border-bottom:2px solid #fff;position:relative}.gantt_window_content_header_text{padding-left:10%}.gantt_window_content_header_buttons{position:absolute;top:10px;right:10px}.gantt_window_content_header_buttons:hover{color:#000;cursor:pointer}.gantt_window_content_resizer{position:absolute;width:15px;height:15px;bottom:0;line-height:15px;right:-1px;text-align:center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABZJREFUeAFjIAUwUshlpJDLSIhLGAAACQ4AFk79JaMAAAAASUVORK5CYII=);cursor:nw-resize;z-index:999}.gantt_window_content_frame{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.1);z-index:9999}.gantt_window_drag{cursor:pointer!important}.gantt_window_resizing{overflow:visible}.gantt_window_resizing_body{overflow:hidden!important}.gantt_window_modal{background:rgba(0,0,0,.1);z-index:9999;top:0;left:0;width:100%;height:100%;position:fixed}.gantt_cal_light,.gantt_cal_quick_info,.gantt_container,.gantt_message_area,.gantt_modal_box,.gantt_tooltip{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.gantt_noselect{-moz-user-select:-moz-none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.gantt_noselect .gantt_grid_data .gantt_row.odd:hover,.gantt_noselect .gantt_grid_data .gantt_row:hover{background-color:unset}.gantt_drag_marker{position:absolute;top:-1000px;left:-1000px;font-family:Arial;font-size:13px;z-index:1;white-space:nowrap}.gantt_drag_marker .gantt_tree_icon.gantt_blank,.gantt_drag_marker .gantt_tree_icon.gantt_close,.gantt_drag_marker .gantt_tree_icon.gantt_open,.gantt_drag_marker .gantt_tree_indent{display:none}.gantt_empty_state_wrapper{position:relative}.gantt_empty_state{height:100%;max-width:500px;box-sizing:border-box;white-space:pre-line;overflow-wrap:break-word;display:flex;flex-direction:column;justify-content:flex-start;margin:0 auto}.gantt_empty_state_image{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWYAAADjCAYAAAC2LL7JAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7L15vGVFfS2+vrX3OXfqvj1BQzMLIoNEQdQXhSg4ECeCE63SAooEYhxinjGTL0mb/HjPl2cSE2MUVMQBIQ1PQEQRiTjE5BlxRhNnZGqg6bnvcM7Zu9bvj6rau/Z0hnvPvef27bP6c/vsoXbt2kOtvepb3/oWMMQQQwwxxBBDDDHEEEMMMcQQQwwxxBBDDDHEEEMMMcQQQwwx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EyJioOksjDnLoDMF0Rmsrp7t9eXM+Tb0eadi1/8IO3QIEKHv/zvMnV5enGddzKvC7BFWvVJohsXMMPOMGOoZNjMk5+hAGYNSiFcUzLLALIPzBcLKUpnNLdJSsbS4sLh477dcvLSTp13aDeiIuUOHdeD2hyVfOHtiZqbsz5hsX08U96Rc7DH34GK3VQAAAIhJREFU2PSLTGnSZEiVRJlSpS4NFIEyAWkypSKts8ZJdUdAIH0SiCheI4EAao0UxBTS18qsmb70Res1DdMvYfqc5avLZbmaLa2snOkfXt6swUMdOnTo0KFDhw4dOnTo0KFDhw4dOnTo0KFDhw4dOnTo0KFDhw4dOnTo0KFDhw4dOnTo0OHcxv8HnRxVygJP8F8AAAAASUVORK5CYII=");background-repeat:no-repeat;width:100%;max-width:500px;max-height:500px;margin-left:auto;margin-right:auto;display:block;min-height:0;height:200px;background-size:contain;background-position-x:center;background-position-y:bottom;margin-top:40px}.gantt_empty_state_text{text-align:center}.gantt_empty_state_text_link{color:#03a9f4;background-position:100% 0;background:none;opacity:1;height:unset;cursor:pointer}.gantt_drag_marker,.gantt_drag_marker .gantt_row.odd{background-color:#fff}.gantt_drag_marker .gantt_row{border-left:1px solid #d2d2d2;border-top:1px solid #d2d2d2}.gantt_drag_marker .gantt_cell{border-color:#d2d2d2}.gantt_row.gantt_over,.gantt_task_row.gantt_over{background-color:#0070fe}.gantt_row.gantt_transparent .gantt_cell{opacity:.7}.gantt_task_row.gantt_transparent{background-color:#f8fdfd}.gantt_popup_button.gantt_delete_button{background:#3db9d3;text-shadow:0 -1px 0 #248a9f;color:#fff;font-weight:700;border-width:0}.gantt_container_resize_watcher{background:transparent;width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;pointer-events:none;border:0;box-sizing:border-box;opacity:0} \ No newline at end of file +@font-face{font-family:Inter;font-style:normal;font-weight:300;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuOKfMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:500;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuI6fMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:600;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuGKYMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:700;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuFuYMZg.ttf) format("truetype")}@font-face{font-family:Inter;font-style:normal;font-weight:800;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuDyYMZg.ttf) format("truetype")}:root{--dhx-gantt-theme: terrace;--dhx-gantt-font-family: Inter, Helvetica, Arial, sans-serif;--dhx-gantt-font-size: 14px;--dhx-gantt-heading-font-size: calc(var(--dhx-gantt-font-size) + 2px);--dhx-gantt-heading-font-weight: 600;--dhx-gantt-important-font-size: var(--dhx-gantt-font-size);--dhx-gantt-important-line-height: 142%;--dhx-gantt-important-font-weight: 500;--dhx-gantt-regular-font-size: var(--dhx-gantt-font-size);--dhx-gantt-regular-font-weight: 400;--dhx-gantt-regular-line-height: 142%;--dhx-gantt-caption-font-size: calc(var(--dhx-gantt-font-size) - 2px);--dhx-gantt-caption-font-weight: 400;--dhx-gantt-caption-line-height: 132%;--dhx-gantt-base-colors-white: #FFFFFF;--dhx-gantt-base-colors-select: #EFF3FF;--dhx-gantt-base-colors-hover-color: #e0e0e0;--dhx-gantt-base-colors-border-light: #F0F0F0;--dhx-gantt-base-colors-border: #DFE0E1;--dhx-gantt-base-colors-icons: #A1A4A6;--dhx-gantt-base-colors-icons-active: #8b8e90;--dhx-gantt-base-colors-icons-active: color-mix(in hsl increasing hue, var(--dhx-gantt-base-colors-icons) 100%, #000000 12.6%);--dhx-gantt-base-colors-icons-hover: #76787a;--dhx-gantt-base-colors-icons-hover: color-mix(in hsl increasing hue, var(--dhx-gantt-base-colors-icons) 100%, #000000 28.5%);--dhx-gantt-base-colors-disabled: #E9E9E9;--dhx-gantt-base-colors-select: #E0E5F3;--dhx-gantt-base-colors-readonly: var(--dhx-gantt-base-colors-icons);--dhx-gantt-base-colors-text-light: #555D63;--dhx-gantt-base-colors-text-base: #23272A;--dhx-gantt-base-colors-text-on-fill: rgba(255, 255, 255, .9);--dhx-gantt-base-colors-background: #FFFFFF;--dhx-gantt-base-colors-background-alt: #F2F2F2;--dhx-gantt-base-colors-primary: #537CFA;--dhx-gantt-base-colors-primary-hover: #4269E0;--dhx-gantt-base-colors-primary-hover: color-mix(in hsl increasing hue, var(--dhx-gantt-base-colors-primary) 100%, #000000 6%);--dhx-gantt-base-colors-primary-active: #3365fb;--dhx-gantt-base-colors-primary-active: color-mix(in hsl increasing hue, var(--dhx-gantt-base-colors-primary) 100%, #000000 16.6%);--dhx-gantt-base-colors-primary-lighter: #537cfa33;--dhx-gantt-base-colors-primary-lighter: color-mix(in hsl increasing hue, var(--dhx-gantt-base-colors-primary) 20%, rgba(0, 0, 0, 0) 100%);--dhx-gantt-base-colors-warning: #FAB936;--dhx-gantt-base-colors-error: #E3334E;--dhx-gantt-base-colors-error-hover: #D3233E;--dhx-gantt-base-colors-error-hover: color-mix(in hsl increasing hue, var(--dhx-gantt-base-colors-error) 100%, #000000 6%);--dhx-gantt-base-colors-error-active: #C3132E;--dhx-gantt-base-colors-error-active: color-mix(in hsl increasing hue, var(--dhx-gantt-base-colors-error) 100%, #000000 16.6%);--dhx-gantt-base-colors-error-lighter: #E3334E33;--dhx-gantt-base-colors-error-lighter: color-mix(in hsl increasing hue, var(--dhx-gantt-base-colors-error) 20%, rgba(0, 0, 0, 0) 100%);--dhx-gantt-base-colors-error-text: var(--dhx-gantt-base-colors-text-on-fill);--dhx-gantt-base-colors-success: #1BC297;--dhx-gantt-container-background: var(--dhx-gantt-base-colors-background);--dhx-gantt-container-color: var(--dhx-gantt-base-colors-text-base);--dhx-gantt-offtime-background: var(--dhx-gantt-base-colors-background-alt);--dhx-gantt-scale-background: var(--dhx-gantt-container-background);--dhx-gantt-scale-border-vertical: 1px solid var(--dhx-gantt-base-colors-border-light);--dhx-gantt-scale-border-horizontal: 1px solid var(--dhx-gantt-base-colors-border);--dhx-gantt-scale-color: var(--dhx-gantt-base-colors-text-light);--dhx-gantt-grid-body-background: transparent;--dhx-gantt-grid-scale-background: var(--dhx-gantt-scale-background);--dhx-gantt-grid-scale-color: var(--dhx-gantt-scale-color);--dhx-gantt-grid-scale-border-vertical: var(--dhx-gantt-scale-border-vertical);--dhx-gantt-timeline-scale-background: var(--dhx-gantt-scale-background);--dhx-gantt-timeline-scale-color: var(--dhx-gantt-scale-color);--dhx-gantt-timeline-scale-border-vertical: var(--dhx-gantt-scale-border-vertical);--dhx-gantt-grid-cell-border: 1px solid transparent;--dhx-gantt-grid-row-border: var(--dhx-gantt-scale-border-horizontal);--dhx-gantt-base-transition: .2s ease;--dhx-gantt-box-shadow-s: 0px 4px 24px 0px rgba(44, 47, 60, .08);--dhx-gantt-box-shadow-m: 0px 4px 24px 0px rgba(44, 47, 60, .36);--dhx-gantt-box-shadow-l: 0px 4px 24px 0px rgba(44, 47, 60, .56);--dhx-gantt-icon-size: 1.5em;--dhx-gantt-base-module: 4px;--dhx-gantt-base-padding: 4px;--dhx-gantt-border-radius: var(--dhx-gantt-base-module);--dhx-gantt-transition: all .3s;--dhx-gantt-default-border: 1px solid var(--dhx-gantt-base-colors-border);--dhx-gantt-header-border: var(--dhx-gantt-default-border);--dhx-gantt-task-blue: var(--dhx-gantt-base-colors-primary);--dhx-gantt-task-green: #20B56D;--dhx-gantt-task-violet: #D071EF;--dhx-gantt-task-yellow: linear-gradient(180deg, #FFB725 0%, #FFBB25 31.25%, #FAEA27 100%);--dhx-gantt-baseline-background-0: #00B4FF;--dhx-gantt-baseline-background-1: #DF6DE3;--dhx-gantt-baseline-background-2: #FF957D;--dhx-gantt-baseline-background-3: #25C79D;--dhx-gantt-baseline-background-4: #FF6FB0;--dhx-gantt-baseline-background-5: #FFC470;--dhx-gantt-baseline-background-6: #FDE720;--dhx-gantt-baseline-background-7: #47AFD0;--dhx-gantt-baseline-background-8: #DA9DFF;--dhx-gantt-baseline-background-9: #BEE964;--dhx-gantt-task-font-size: var(--dhx-gantt-regular-font-size);--dhx-gantt-task-line-height: var(--dhx-gantt-regular-line-height);--dhx-gantt-task-font-weight: var(--dhx-gantt-regular-font-weight);--dhx-gantt-task-background-primary: var(--dhx-gantt-base-colors-primary);--dhx-gantt-task-border-radius: var(--dhx-gantt-border-radius);--dhx-gantt-task-background: var(--dhx-gantt-task-blue);--dhx-gantt-task-border: none;--dhx-gantt-task-color: var(--dhx-gantt-base-colors-text-on-fill);--dhx-gantt-project-color: var(--dhx-gantt-task-color);--dhx-gantt-task-line-text: var(--dhx-gantt-container-color);--dhx-gantt-task-row-border: 1px solid var(--dhx-gantt-base-colors-border);--dhx-gantt-task-row-background: var(--dhx-gantt-container-background);--dhx-gantt-task-row-background--odd: var(--dhx-gantt-container-background);--dhx-gantt-task-progress-color: rgba(0, 0, 0, .15);--dhx-gantt-project-progress-color: var(--dhx-gantt-task-progress-color);--dhx-gantt-project-background: var(--dhx-gantt-task-green);--dhx-gantt-milestone-background: var(--dhx-gantt-task-violet);--dhx-gantt-task-marker-color: var(--dhx-gantt-task-background);--dhx-gantt-popup-background: var(--dhx-gantt-container-background);--dhx-gantt-popup-color: var(--dhx-gantt-container-color);--dhx-gantt-popup-border: none;--dhx-gantt-popup-border-radius: var(--dhx-gantt-border-radius);--dhx-gantt-tooltip-background: var(--dhx-gantt-base-colors-text-base);--dhx-gantt-tooltip-color: var(--dhx-gantt-container-background);--dhx-gantt-tooltip-border: none;--dhx-gantt-tooltip-border-radius: var(--dhx-gantt-popup-border-radius);--dhx-gantt-link-background: var(--dhx-gantt-base-colors-icons);--dhx-gantt-link-background-hover: var(--dhx-gantt-base-colors-text-light);--dhx-gantt-link-critical-background: var(--dhx-gantt-base-colors-error);--dhx-gantt-link-handle-offset: 8px;--dhx-gantt-link-handle-size: 10px;--dhx-gantt-link-handle-border: var(--dhx-gantt-base-colors-icons);--dhx-gantt-link-handle-border-hover: var(--dhx-gantt-base-colors-border);--dhx-gantt-link-handle-background: var(--dhx-gantt-base-colors-border);--dhx-gantt-link-handle-background-hover: var(--dhx-gantt-base-colors-text-light);--dhx-gantt-progress-handle-border: var(--dhx-gantt-base-colors-border);--dhx-gantt-progress-handle-background: var(--dhx-gantt-base-colors-icons);--dhx-gantt-progress-handle-background-hover: var(--dhx-gantt-base-colors-icons-hover);--dhx-gantt-control-height: 32px;--dhx-gantt-checkbox-height: 20px;--dhx-gantt-lightbox_font-family: var(--dhx-gantt-font-family);--dhx-gantt-lightbox-font-size: var(--dhx-gantt-important-font-size);--dhx-gantt-lightbox-font-weight: var(--dhx-gantt-important-font-weight);--dhx-gantt-lightbox-background: var(--dhx-gantt-popup-background);--dhx-gantt-lightbox-border: var(--dhx-gantt-popup-border);--dhx-gantt-lightbox-control-border: var(--dhx-gantt-default-border);--dhx-gantt-lightbox-color: var(--dhx-gantt-popup-color);--dhx-gantt-lightbox-padding: 12px;--dhx-gantt-lightbox-title-background: var(--dhx-gantt-base-colors-select);--dhx-gantt-lightbox-title-color: var(--dhx-gantt-lightbox-color);--dhx-gantt-lightbox-title-font-size: var(--dhx-gantt-heading-font-size);--dhx-gantt-lightbox-max-width: 622px;--dhx-gantt-lightbox-wide-max-width: 738px;--dhx-gantt-lightbox-width: max-content;--dhx-gantt-btn-order: row-reverse;--dhx-gantt-btn-background: var(--dhx-gantt-base-colors-primary);--dhx-gantt-btn-color: var(--dhx-gantt-base-colors-text-on-fill);--dhx-gantt-btn-border-color: var(--dhx-gantt-base-colors-primary);--dhx-gantt-btn-color-hover: var(--dhx-gantt-base-colors-text-on-fill);--dhx-gantt-btn-background-hover: var(--dhx-gantt-base-colors-primary-hover);--dhx-gantt-btn-border-hover: var(--dhx-gantt-base-colors-primary-hover);--dhx-gantt-btn-color-active: var(--dhx-gantt-base-colors-text-on-fill);--dhx-gantt-btn-background-active: var(--dhx-gantt-base-colors-primary-active);--dhx-gantt-btn-border-active: var(--dhx-gantt-base-colors-primary-active);--dhx-gantt-btn-background-disabled: var(--dhx-gantt-base-colors-disabled);--dhx-gantt-btn-color-disabled: var(--dhx-gantt-base-colors-icons);--dhx-gantt-btn-border-color-disabled: var(--dhx-gantt-base-colors-disabled);--dhx-gantt-btn-outline-background: transparent;--dhx-gantt-btn-outline-color: var(--dhx-gantt-base-colors-primary);--dhx-gantt-btn-outline-border-color: var(--dhx-gantt-base-colors-primary);--dhx-gantt-btn-outline-background-hover: var(--dhx-gantt-base-colors-primary-lighter);--dhx-gantt-btn-outline-color-hover: var(--dhx-gantt-base-colors-primary-hover);--dhx-gantt-btn-outline-border-hover: var(--dhx-gantt-base-colors-primary-hover);--dhx-gantt-btn-outline-background-active: var(--dhx-gantt-base-colors-primary-active);--dhx-gantt-btn-outline-color-active: var(--dhx-gantt-base-colors-text-on-fill);--dhx-gantt-btn-outline-border-active: var(--dhx-gantt-base-colors-primary-active);--dhx-gantt-btn-outline-background-disabled: transparent;--dhx-gantt-btn-outline-color-disabled: var(--dhx-gantt-base-colors-icons);--dhx-gantt-btn-outline-border-color-disabled: var(--dhx-gantt-base-colors-icons);--dhx-gantt-btn-text-transform: none;--dhx-gantt-info-background: var(--dhx-gantt-popup-background);--dhx-gantt-info-color: var(--dhx-gantt-popup-color);--dhx-gantt-info-border: var(--dhx-gantt-popup-border);--dhx-gantt-info-shadow: var(--dhx-gantt-box-shadow-m);--dhx-gantt-modal-background: var(--dhx-gantt-popup-background);--dhx-gantt-modal-color: var(--dhx-gantt-popup-color);--dhx-gantt-modal-border: var(--dhx-gantt-popup-border);--dhx-gantt-modal-padding: 16px;--dhx-gantt-modal-width: 320px;--dhx-gantt-modal-border-radius: var(--dhx-gantt-popup-border-radius);--dhx-gantt-undo-delete-background: var(--dhx-gantt-base-colors-text-base);--dhx-gantt-undo-delete-color: var(--dhx-gantt-task-color)}:root[data-gantt-theme=dark]{--dhx-gantt-theme: dark;--dhx-gantt-base-colors-disabled: #3d3d3d;--dhx-gantt-base-colors-text-light: #AAA;--dhx-gantt-base-colors-text-base: rgba(255, 255, 255, .9);--dhx-gantt-base-colors-background: #141414;--dhx-gantt-base-colors-background-alt: #383838;--dhx-gantt-base-colors-border: #4B4B4B;--dhx-gantt-base-colors-border-light: #4B4B4B;--dhx-gantt-navline-font-color: var(--dhx-gantt-base-colors-text-base);--dhx-gantt-base-colors-primary: #3B72F8;--dhx-gantt-base-colors-error: #EB284F;--dhx-gantt-base-colors-select: #2A2A2A;--dhx-gantt-base-colors-hover-color: #2A2A2A;--dhx-gantt-base-colors-icons: #AAAAAA;--dhx-gantt-scale-color: var(--dhx-gantt-base-colors-text-light);--dhx-gantt-popup-background: #1B1B1C;--dhx-gantt-popup-border: 1px solid #4B4B4B;--dhx-gantt-btn-font-weight: 600;--dhx-gantt-undo-delete-background: var(--dhx-gantt-popup-background);--dhx-gantt-link-handle-border: var(--dhx-gantt-base-colors-border);--dhx-gantt-link-handle-background: var(--dhx-gantt-base-colors-background)}:root[data-gantt-theme=meadow]{--dhx-gantt-theme: meadow;--dhx-gantt-font-family: Segoe UI, Arial, san-serif;--dhx-gantt-base-colors-primary: #0288D1;--dhx-gantt-base-colors-select: #ffebbc;--dhx-gantt-task-background: var(--dhx-gantt-base-colors-primary);--dhx-gantt-base-colors-border: #cecece;--dhx-gantt-task-text-font-size: 14px;--dhx-gantt-task-text-font-weight: 500;--dhx-gantt-heading-font-size: 22px;--dhx-gantt-heading-font-weight: 300;--dhx-gantt-caption-font-size: 14px;--dhx-gantt-caption-font-weight: 400;--dhx-gantt-scale-color: #767676;--dhx-gantt-container-color: #3f3f3f;--dhx-gantt-border-radius: 0;--dhx-gantt-box-shadow-s: 0 3px 5px 0 rgba(0, 0, 0, .1);--dhx-gantt-box-shadow-m: 0px 4px 24px 0px rgba(44, 47, 60, .36);--dhx-gantt-box-shadow-l: 0px 4px 24px 0px rgba(44, 47, 60, .56);--dhx-gantt-scale-background: #f4f2ea;--dhx-gantt-scale-color: #42464b;--dhx-gantt-task-color: #1e2022;--dhx-gantt-project-background: #c7d8f7;--dhx-gantt-milestone-background: #DB7DC5;--dhx-gantt-task-background: #e1ffd4;--dhx-gantt-task-border: 1px solid #3588c5;--dhx-gantt-task-progress-color: #a7d991;--dhx-gantt-project-progress-color: #9ab9f1;--dhx-gantt-link-background: #ffb96d;--dhx-gantt-lightbox-title-background: #f4f2ea;--dhx-gantt-popup-background: #fcfaf3;--dhx-gantt-popup-color: var(--dhx-gantt-container-color);--dhx-gantt-popup-border: 1px solid #cac8bd}:root[data-gantt-theme=skyblue]{--dhx-gantt-theme: skyblue;--dhx-gantt-font-family: Segoe UI, Arial, san-serif;--dhx-gantt-base-colors-primary: #0288D1;--dhx-gantt-task-background: var(--dhx-gantt-base-colors-primary);--dhx-gantt-base-colors-border: #cecece;--dhx-gantt-task-text-font-size: 14px;--dhx-gantt-task-text-font-weight: 500;--dhx-gantt-heading-font-size: 22px;--dhx-gantt-heading-font-weight: 300;--dhx-gantt-caption-font-size: 14px;--dhx-gantt-caption-font-weight: 400;--dhx-gantt-scale-color: #767676;--dhx-gantt-border-radius: 0;--dhx-gantt-box-shadow-s: 0 3px 5px 0 rgba(0, 0, 0, .1);--dhx-gantt-box-shadow-m: 0px 4px 24px 0px rgba(44, 47, 60, .36);--dhx-gantt-box-shadow-l: 0px 4px 24px 0px rgba(44, 47, 60, .56);--dhx-gantt-scale-background: #dfedff;--dhx-gantt-scale-color: #42464b;--dhx-gantt-task-color: #1e2022;--dhx-gantt-project-background: #eff6fb;--dhx-gantt-task-background: #eff6fb;--dhx-gantt-milestone-background: #DB7DC5;--dhx-gantt-task-border: 1px solid #3588c5;--dhx-gantt-task-progress-color: linear-gradient(0deg, #abcee8 0, #5aa0d3 36%, #bfdaee);--dhx-gantt-link-background: #4a8f43;--dhx-gantt-lightbox-title-background: #eff6fb}:root[data-gantt-theme=skyblue] .gantt_grid_scale,:root[data-gantt-theme=skyblue] .gantt_task_scale,:root[data-gantt-theme=skyblue] .gantt_task_vscroll{box-shadow:inset 0 1px 1px #fff;background-image:linear-gradient(to bottom,#e4f0ff,#dfedff,#d5e8ff)}:root[data-gantt-theme=broadway]{--dhx-gantt-theme: broadway;--dhx-gantt-font-family: Segoe UI, Arial, san-serif;--dhx-gantt-base-colors-primary: #0288D1;--dhx-gantt-base-colors-select: #fff3a1;--dhx-gantt-task-background: var(--dhx-gantt-base-colors-primary);--dhx-gantt-base-colors-border: #cecece;--dhx-gantt-halfhour-border: 1px solid #e8e8e8;--dhx-gantt-task-title-font-size: 12px;--dhx-gantt-task-text-font-size: 14px;--dhx-gantt-task-text-font-weight: 500;--dhx-gantt-heading-font-size: 22px;--dhx-gantt-heading-font-weight: 300;--dhx-gantt-caption-font-size: 14px;--dhx-gantt-caption-font-weight: 400;--dhx-gantt-scale-color: #767676;--dhx-gantt-border-radius: 0;--dhx-gantt-box-shadow-s: 0 3px 5px 0 rgba(0, 0, 0, .1);--dhx-gantt-box-shadow-m: 0px 4px 24px 0px rgba(44, 47, 60, .36);--dhx-gantt-box-shadow-l: 0px 4px 24px 0px rgba(44, 47, 60, .56);--dhx-gantt-grid-scale-background: #4f4f4f;--dhx-gantt-grid-scale-border-vertical: 1px solid #5b5b5b;--dhx-gantt-grid-scale-color: #e1e1e1;--dhx-gantt-timeline-scale-background: #dbdbdb;--dhx-gantt-timeline-scale-border-vertical: 1px solid #bababa;--dhx-gantt-timeline-scale-color: #494949;--dhx-gantt-grid-body-background: #dbdbdb;--dhx-gantt-task-color: #FFF;--dhx-gantt-link-background: #ffb96d;--dhx-gantt-project-background: #65c16f;--dhx-gantt-project-progress-color: #46ad51;--dhx-gantt-task-progress-color: #04a4f0;--dhx-gantt-task-background: #17b2fb;--dhx-gantt-milestone-background: #DB7DC5}:root[data-gantt-theme=broadway] .gantt_grid_data{--dhx-gantt-task-row-background: var(--dhx-gantt-grid-body-background);--dhx-gantt-task-row-background--odd: var(--dhx-gantt-grid-body-background)}:root[data-gantt-theme=material]{--dhx-gantt-theme: material;--dhx-gantt-font-family: Roboto, Inter, Helvetica, Arial, sans-serif;--dhx-gantt-base-colors-primary: #448aff;--dhx-gantt-task-background: var(--dhx-gantt-base-colors-primary);--dhx-gantt-project-background: #1de9b6;--dhx-gantt-milestone-background: #ffc107;--dhx-gantt-task-progress-color: rgba(0, 0, 0, .2);--dhx-gantt-project-color: rgba(0, 0, 0, .6);--dhx-gantt-base-colors-border: #e0e0e0;--dhx-gantt-task-title-font-size: calc(var(--dhx-gantt-font-size) - 2px);--dhx-gantt-task-text-font-size: var(--dhx-gantt-font-size);--dhx-gantt-task-text-font-weight: 500;--dhx-gantt-heading-font-size: 20px;--dhx-gantt-caption-font-size: var(--dhx-gantt-font-size);--dhx-gantt-caption-font-weight: 500;--dhx-gantt-btn-font-weight: 500;--dhx-gantt-heading-font-weight: 500;--dhx-gantt-hours-font-size: calc(var(--dhx-gantt-font-size) - 2px);--dhx-gantt-base-colors-text-base: rgba(0, 0, 0, .75);--dhx-gantt-base-transition: .15s ease;--dhx-gantt-header-border: 1px solid transparent;--dhx-gantt-scale-color: rgba(0, 0, 0, .54);--dhx-gantt-base-colors-select: rgba(0, 199, 181, .2);--dhx-gantt-base-colors-hover-color: var(--dhx-gantt-base-colors-select);--dhx-gantt-border-radius: 0;--dhx-gantt-task-border-radius: 18px;--dhx-gantt-btn-text-transform: uppercase;--dhx-gantt-btn-padding: 1px 20px 0;--dhx-gantt-link-handle-size: 16px;--dhx-gantt-progress-handle-background: #FFF;--dhx-gantt-progress-handle-border: var(--dhx-gantt-base-colors-border);--dhx-gantt-box-shadow-s: 0 3px 5px 0 rgba(0, 0, 0, .1);--dhx-gantt-box-shadow-m: 0px 4px 24px 0px rgba(44, 47, 60, .36);--dhx-gantt-box-shadow-l: 0px 4px 24px 0px rgba(44, 47, 60, .56);--dhx-gantt-lightbox-title-background: var(--dhx-gantt-container-background);--dhx-gantt-lightbox-title-color: var(--dhx-gantt-base-colors-text-base);--dhx-gantt-lightbox-title-font-size: calc(var(--dhx-gantt-font-size) + 2px);--dhx-gantt-lightbox-padding: 30px;--dhx-gantt-lightbox-width: 610px;--dhx-gantt-lightbox-wide-max-width: 640px;--dhx-gantt-btn-order: row;--dhx-gantt-btn-outline-border-color: transparent;--dhx-gantt-btn-outline-border-hover: transparent;--dhx-gantt-btn-outline-border-active: transparent;--dhx-gantt-btn-outline-border-color-disabled: transparent}:root[data-gantt-theme=material] .dhx_cal_ltitle{font-weight:400;text-transform:uppercase;padding:18px var(--dhx-gantt-lightbox-padding) 8px;border-bottom-color:transparent}:root[data-gantt-theme=material] .gantt_grid .gantt_grid_scale .gantt_grid_head_cell,:root[data-gantt-theme=material] .gantt_task .gantt_task_scale .gantt_scale_cell{font-weight:500;text-transform:uppercase}:root[data-gantt-theme=material] .dhx_cal_ltitle_controls{--dhx-gantt-base-colors-icons: var(--dhx-gantt-lightbox-title-color)}:root[data-gantt-theme=material] .gantt_cal_lsection{margin-top:12px;margin-bottom:4px}:root[data-gantt-theme=material] .gantt_cal_ltitle{padding:18px var(--dhx-gantt-lightbox-padding);border-bottom-color:transparent}:root[data-gantt-theme=material] .gantt_cal_lcontrols{padding-bottom:40px;padding-top:30px}:root[data-gantt-theme=material] .gantt_add,:root[data-gantt-theme=material] .gantt_grid_head_add{--dhx-gantt-base-colors-icons: #70d0c2;--dhx-gantt-base-colors-icons-active: color-mix(in hsl increasing hue, var(--dhx-gantt-base-colors-icons) 100%, #000000 12.6%);--dhx-gantt-base-colors-icons-hover: color-mix(in hsl increasing hue, var(--dhx-gantt-base-colors-icons) 100%, #000000 28.5%)}:root[data-gantt-theme=material] .gantt_grid_data .gantt_row,:root[data-gantt-theme=material] .gantt_grid_data .gantt_row.odd{transition:background var(--dhx-gantt-base-transition)}:root[data-gantt-theme=material] .gantt_grid_head_cell{transition:border-color ground var(--dhx-gantt-base-transition);border-right:1px solid transparent}:root[data-gantt-theme=material] .gantt_grid_scale:hover .gantt_grid_head_cell{border-right:var(--dhx-gantt-grid-scale-border-vertical)}:root[data-gantt-theme=material] .gantt_grid_column_resize_wrap .gantt_grid_column_resize{transition:background var(--dhx-gantt-base-transition);background-color:transparent}:root[data-gantt-theme=material] .gantt_grid_column_resize_wrap:hover .gantt_grid_column_resize{background-color:var(--dhx-gantt-base-colors-border)}:root[data-gantt-theme=material] div.gantt_grid_scale:after,:root[data-gantt-theme=material] div.gantt_scale_line:last-child:after{content:"";width:100%;display:block;height:1px;background-color:transparent;position:absolute;box-shadow:0 1px 2px #0003,0 2px 3px #0000001a;z-index:1}:root[data-gantt-theme=material] div.gantt_scale_line:last-child:after{bottom:-1px}:root[data-gantt-theme=material] .gantt_link_control{--dhx-gantt-link-handle-border: var(--dhx-gantt-task-background);--dhx-gantt-link-handle-background: #FFF;--dhx-gantt-link-handle-border-hover: var(--dhx-gantt-task-background);--dhx-gantt-link-handle-background-hover: #FFF}:root[data-gantt-theme=material] .gantt_task_line.gantt_milestone{margin-top:-1px;--dhx-gantt-task-border-radius: 2px}:root[data-gantt-theme=contrast-white]{--dhx-gantt-theme: contrast-white;--dhx-gantt-base-colors-disabled: #C2C2C2;--dhx-gantt-base-colors-text-light: #303030;--dhx-gantt-base-colors-text-base: #303030;--dhx-gantt-base-colors-background: #FFFFFF;--dhx-gantt-base-colors-background-alt: #929292;--dhx-gantt-base-colors-border: #4D595B;--dhx-gantt-base-colors-border-light: #4D595B;--dhx-gantt-base-colors-text-on-fill: #FFF;--dhx-gantt-base-colors-primary: #0A47CD;--dhx-gantt-base-colors-text-on-fill: rgba(255, 255, 255, .9);--dhx-gantt-task-background: #0A47CD;--dhx-gantt-task-border: 1px solid rgba(0, 0, 0, .1);--dhx-gantt-base-colors-warning: #FCBA2E;--dhx-gantt-base-colors-success: #77D257;--dhx-gantt-base-colors-error: #ee3d31;--dhx-gantt-base-colors-error-text: #141414;--dhx-gantt-btn-color: #FFFFFF;--dhx-gantt-btn-color-hover: #FFFFFF;--dhx-gantt-btn-color-active: #FFFFFF;--dhx-gantt-base-colors-select: #E7E5E5;--dhx-gantt-base-colors-hover-color: #E7E5E5;--dhx-gantt-base-colors-icons: #303030;--dhx-gantt-scale-color: var(--dhx-gantt-base-colors-text-light);--dhx-gantt-popup-background: #FFF;--dhx-gantt-popup-border: 1px solid #4D595B;--dhx-gantt-font-size: 16px;--dhx-gantt-heading-font-size: 24px;--dhx-gantt-important-font-size: 16px;--dhx-gantt-regular-font-size: 16px;--dhx-gantt-caption-font-size: 16px;--dhx-gantt-btn-outline-color-hover: #212121;--dhx-gantt-btn-outline-color-active: #FFFFFF}:root[data-gantt-theme=contrast-black]{--dhx-gantt-theme: contrast-black;--dhx-gantt-base-colors-disabled: #3d3d3d;--dhx-gantt-base-colors-text-light: #cfcfcf;--dhx-gantt-base-colors-text-base: #FFFFFF;--dhx-gantt-base-colors-background: #141414;--dhx-gantt-base-colors-background-alt: #4f4f4f;--dhx-gantt-base-colors-border: rgba(255, 255, 255, .8);--dhx-gantt-base-colors-border-light: rgba(255, 255, 255, .8);--dhx-gantt-base-colors-text-on-fill: #141414;--dhx-gantt-base-colors-primary: #A395FF;--dhx-gantt-task-background: var(--dhx-gantt-base-colors-primary);--dhx-gantt-project-background: #77D257;--dhx-gantt-milestone-background: #FCBA2E;--dhx-gantt-task-background: #A395FF;--dhx-gantt-task-border: 1px solid rgba(0, 0, 0, .1);--dhx-gantt-base-colors-warning: #694E02;--dhx-gantt-base-colors-success: #115700;--dhx-gantt-base-colors-error: #FFA7A0;--dhx-gantt-base-colors-error-text: #141414;--dhx-gantt-base-colors-select: #2A2A2A;--dhx-gantt-base-colors-hover-color: #2A2A2A;--dhx-gantt-base-colors-icons: #AAAAAA;--dhx-gantt-scale-color: var(--dhx-gantt-base-colors-text-light);--dhx-gantt-popup-background: #1B1B1C;--dhx-gantt-undo-delete-background: var(--dhx-gantt-popup-background);--dhx-gantt-undo-delete-color: var(--dhx-gantt-base-colors-text-base);--dhx-gantt-popup-border: 1px solid #4B4B4B;--dhx-gantt-font-size: 16px;--dhx-gantt-heading-font-size: 24px;--dhx-gantt-important-font-size: 16px;--dhx-gantt-regular-font-size: 16px;--dhx-gantt-caption-font-size: 16px;--dhx-gantt-btn-outline-color-hover: var(--dhx-gantt-base-colors-text-light);--dhx-gantt-btn-outline-color-active: var(--dhx-gantt-base-colors-text-light)}.dhx_gantt_button--mixin{background:var(--dhx-gantt-btn-background);color:var(--dhx-gantt-btn-color);border:1px solid var(--dhx-gantt-btn-border-color);border-radius:var(--dhx-gantt-border-radius);height:var(--dhx-gantt-control-height);padding:var(--dhx-gantt-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-gantt-font-size);font-family:var(--dhx-gantt-font-family);font-weight:var(--dhx-gantt-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-gantt-btn-text-transform);cursor:pointer;--dhx-gantt-icon-size: 18px}.dhx_gantt_button--mixin:hover{background:var(--dhx-gantt-btn-background-hover);color:var(--dhx-gantt-btn-color-hover);border-color:var(--dhx-gantt-btn-border-hover)}.dhx_gantt_button--mixin:active{background:var(--dhx-gantt-btn-background-active);color:var(--dhx-gantt-btn-color-active);border-color:var(--dhx-gantt-btn-border-active)}.dhx_gantt_button--mixin:disabled{background:var(--dhx-gantt-btn-background-disabled);color:var(--dhx-gantt-btn-color-disabled);border-color:var(--dhx-gantt-btn-border-disabled)}.dhx_gantt_button_outline--mixin{--dhx-gantt-icon-size: 18px;--dhx-gantt-base-colors-icons: var(--dhx-gantt-btn-color);--dhx-gantt-btn-background: var(--dhx-gantt-btn-outline-background);--dhx-gantt-btn-color: var(--dhx-gantt-btn-outline-color);--dhx-gantt-btn-border-color: var(--dhx-gantt-btn-outline-border-color);--dhx-gantt-btn-background-hover: var(--dhx-gantt-btn-outline-background-hover);--dhx-gantt-btn-color-hover: var(--dhx-gantt-btn-outline-color-hover);--dhx-gantt-btn-border-hover: var(--dhx-gantt-btn-outline-border-hover);--dhx-gantt-btn-background-active: var(--dhx-gantt-btn-outline-background-active);--dhx-gantt-btn-color-active: var(--dhx-gantt-btn-outline-color-active);--dhx-gantt-btn-border-active: var(--dhx-gantt-btn-outline-border-active);--dhx-gantt-btn-background-disabled: var(--dhx-gantt-btn-outline-background-disabled);--dhx-gantt-btn-color-disabled: var(--dhx-gantt-btn-outline-color-disabled);--dhx-gantt-btn-border-color-disabled: var(--dhx-gantt-btn-outline-border-color-disabled)}.dhx_gantt_button_danger--mixin{--dhx-gantt-icon-size: 18px;--dhx-gantt-btn-background: var(--dhx-gantt-base-colors-error);--dhx-gantt-btn-color: var(--dhx-gantt-base-colors-error-text);--dhx-gantt-btn-border-color: var(--dhx-gantt-base-colors-error);--dhx-gantt-btn-background-hover: var(--dhx-gantt-base-colors-error-hover);--dhx-gantt-btn-border-hover: var(--dhx-gantt-base-colors-error-hover);--dhx-gantt-btn-background-active: var(--dhx-gantt-base-colors-error-active);--dhx-gantt-btn-border-active: var(--dhx-gantt-base-colors-error-active)}.dhx_gantt_button_danger_outline--mixin{--dhx-gantt-icon-size: 18px;--dhx-gantt-base-colors-icons: var(--dhx-gantt-btn-color);--dhx-gantt-btn-background: transparent;--dhx-gantt-btn-color: var(--dhx-gantt-base-colors-error);--dhx-gantt-btn-border-color: var(--dhx-gantt-base-colors-error);--dhx-gantt-btn-background-hover: var(--dhx-gantt-base-colors-error-lighter);--dhx-gantt-btn-color-hover: var(--dhx-gantt-base-colors-error-hover);--dhx-gantt-btn-border-hover: var(--dhx-gantt-base-colors-error-hover);--dhx-gantt-btn-background-active: var(--dhx-gantt-base-colors-error-active);--dhx-gantt-btn-color-active: var(--dhx-gantt-base-colors-error-active);--dhx-gantt-btn-border-active: var(--dhx-gantt-base-colors-error-active);--dhx-gantt-btn-background-disabled: transparent;--dhx-gantt-btn-color-disabled: var(--dhx-gantt-base-colors-icons);--dhx-gantt-btn-border-color-disabled: var(--dhx-gantt-base-colors-icons)}.dhx_gantt_button_danger_link--mixin{--dhx-gantt-icon-size: 18px;padding:6px 0;--dhx-gantt-base-colors-icons: var(--dhx-gantt-base-colors-error);--dhx-gantt-btn-background: transparent;--dhx-gantt-btn-color: var(--dhx-gantt-base-colors-error);--dhx-gantt-btn-border-color: transparent;--dhx-gantt-btn-background-hover: transparent;--dhx-gantt-btn-color-hover: var(--dhx-gantt-base-colors-error-hover);--dhx-gantt-btn-border-hover: transparent;--dhx-gantt-btn-background-active: transparent;--dhx-gantt-btn-color-active: var(--dhx-gantt-base-colors-error-active);--dhx-gantt-btn-border-active: transparent;--dhx-gantt-btn-background-disabled: transparent;--dhx-gantt-btn-color-disabled: var(--dhx-gantt-base-colors-icons);--dhx-gantt-btn-border-color-disabled: transparent}.dhx_gantt_button_link--mixin{padding:6px 0;--dhx-gantt-icon-size: 18px;--dhx-gantt-btn-background: transparent;--dhx-gantt-btn-color: var(--dhx-gantt-base-colors-primary);--dhx-gantt-btn-border-color: transparent;--dhx-gantt-btn-background-hover: transparent;--dhx-gantt-btn-color-hover: var(--dhx-gantt-base-colors-primary-hover);--dhx-gantt-btn-border-hover: transparent;--dhx-gantt-btn-background-active: transparent;--dhx-gantt-btn-color-active: var(--dhx-gantt-base-colors-primary-active);--dhx-gantt-btn-border-active: transparent;--dhx-gantt-btn-background-disabled: transparent;--dhx-gantt-btn-color-disabled: var(--dhx-gantt-base-colors-icons);--dhx-gantt-btn-border-color-disabled: transparent}.dhx_gantt_button_icon--mixin{min-width:32px;height:32px;border-radius:50%;padding:6px 0;--dhx-gantt-icon-size: 18px;--dhx-gantt-btn-background: transparent;--dhx-gantt-btn-color: var(--dhx-gantt-base-colors-primary);--dhx-gantt-btn-border-color: transparent;--dhx-gantt-btn-background-hover: transparent;--dhx-gantt-btn-color-hover: var(--dhx-gantt-base-colors-primary-hover);--dhx-gantt-btn-border-hover: transparent;--dhx-gantt-btn-background-active: transparent;--dhx-gantt-btn-color-active: var(--dhx-gantt-base-colors-primary-active);--dhx-gantt-btn-border-active: transparent;--dhx-gantt-btn-background-disabled: transparent;--dhx-gantt-btn-color-disabled: var(--dhx-gantt-base-colors-icons);--dhx-gantt-btn-border-color-disabled: transparent}.dhx_gantt_button_icon--mixin:hover{--dhx-gantt-base-colors-icons: var(--dhx-gantt-base-colors-icons-hover)}.dhx_gantt_button_icon--mixin:active{--dhx-gantt-base-colors-icons: var(--dhx-gantt-base-colors-icons-active)}.dhx_gantt_button_icon--mixin:disabled{--dhx-gantt-base-colors-icons: var(--dhx-gantt-btn-color-disabled)}.dhx_gantt_btn,.dhx_gantt_btn_danger,.dhx_gantt_btn_outline,.dhx_gantt_btn_danger_outline,.dhx_gantt_btn_danger_link,.gantt_qi_big_icon,.gantt_btn_set{background:var(--dhx-gantt-btn-background);color:var(--dhx-gantt-btn-color);border:1px solid var(--dhx-gantt-btn-border-color);border-radius:var(--dhx-gantt-border-radius);height:var(--dhx-gantt-control-height);padding:var(--dhx-gantt-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-gantt-font-size);font-family:var(--dhx-gantt-font-family);font-weight:var(--dhx-gantt-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-gantt-btn-text-transform);cursor:pointer;--dhx-gantt-icon-size: 18px}.dhx_gantt_btn:hover,.dhx_gantt_btn_danger:hover,.dhx_gantt_btn_outline:hover,.dhx_gantt_btn_danger_outline:hover,.dhx_gantt_btn_danger_link:hover,.gantt_qi_big_icon:hover,.gantt_btn_set:hover{background:var(--dhx-gantt-btn-background-hover);color:var(--dhx-gantt-btn-color-hover);border-color:var(--dhx-gantt-btn-border-hover)}.dhx_gantt_btn:active,.dhx_gantt_btn_danger:active,.dhx_gantt_btn_outline:active,.dhx_gantt_btn_danger_outline:active,.dhx_gantt_btn_danger_link:active,.gantt_qi_big_icon:active,.gantt_btn_set:active{background:var(--dhx-gantt-btn-background-active);color:var(--dhx-gantt-btn-color-active);border-color:var(--dhx-gantt-btn-border-active)}.dhx_gantt_btn:disabled,.dhx_gantt_btn_danger:disabled,.dhx_gantt_btn_outline:disabled,.dhx_gantt_btn_danger_outline:disabled,.dhx_gantt_btn_danger_link:disabled,.gantt_qi_big_icon:disabled,.gantt_btn_set:disabled{background:var(--dhx-gantt-btn-background-disabled);color:var(--dhx-gantt-btn-color-disabled);border-color:var(--dhx-gantt-btn-border-disabled)}.gantt_popup_button{background:var(--dhx-gantt-btn-background);color:var(--dhx-gantt-btn-color);border:1px solid var(--dhx-gantt-btn-border-color);border-radius:var(--dhx-gantt-border-radius);height:var(--dhx-gantt-control-height);padding:var(--dhx-gantt-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-gantt-font-size);font-family:var(--dhx-gantt-font-family);font-weight:var(--dhx-gantt-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-gantt-btn-text-transform);cursor:pointer;--dhx-gantt-icon-size: 18px}.gantt_popup_button:hover{background:var(--dhx-gantt-btn-background-hover);color:var(--dhx-gantt-btn-color-hover);border-color:var(--dhx-gantt-btn-border-hover)}.gantt_popup_button:active{background:var(--dhx-gantt-btn-background-active);color:var(--dhx-gantt-btn-color-active);border-color:var(--dhx-gantt-btn-border-active)}.gantt_popup_button:disabled{background:var(--dhx-gantt-btn-background-disabled);color:var(--dhx-gantt-btn-color-disabled);border-color:var(--dhx-gantt-btn-border-disabled)}.gantt_popup_button:not(.gantt_ok_button){--dhx-gantt-icon-size: 18px;--dhx-gantt-base-colors-icons: var(--dhx-gantt-btn-color);--dhx-gantt-btn-background: var(--dhx-gantt-btn-outline-background);--dhx-gantt-btn-color: var(--dhx-gantt-btn-outline-color);--dhx-gantt-btn-border-color: var(--dhx-gantt-btn-outline-border-color);--dhx-gantt-btn-background-hover: var(--dhx-gantt-btn-outline-background-hover);--dhx-gantt-btn-color-hover: var(--dhx-gantt-btn-outline-color-hover);--dhx-gantt-btn-border-hover: var(--dhx-gantt-btn-outline-border-hover);--dhx-gantt-btn-background-active: var(--dhx-gantt-btn-outline-background-active);--dhx-gantt-btn-color-active: var(--dhx-gantt-btn-outline-color-active);--dhx-gantt-btn-border-active: var(--dhx-gantt-btn-outline-border-active);--dhx-gantt-btn-background-disabled: var(--dhx-gantt-btn-outline-background-disabled);--dhx-gantt-btn-color-disabled: var(--dhx-gantt-btn-outline-color-disabled);--dhx-gantt-btn-border-color-disabled: var(--dhx-gantt-btn-outline-border-color-disabled)}.gantt_ok_button{--dhx-gantt-icon-size: 18px;--dhx-gantt-btn-background: var(--dhx-gantt-base-colors-error);--dhx-gantt-btn-color: var(--dhx-gantt-base-colors-error-text);--dhx-gantt-btn-border-color: var(--dhx-gantt-base-colors-error);--dhx-gantt-btn-background-hover: var(--dhx-gantt-base-colors-error-hover);--dhx-gantt-btn-border-hover: var(--dhx-gantt-base-colors-error-hover);--dhx-gantt-btn-background-active: var(--dhx-gantt-base-colors-error-active);--dhx-gantt-btn-border-active: var(--dhx-gantt-base-colors-error-active)}.dhx_gantt_btn_outline,.dhx_gantt_btn_danger_outline{--dhx-gantt-icon-size: 18px;--dhx-gantt-base-colors-icons: var(--dhx-gantt-btn-color);--dhx-gantt-btn-background: var(--dhx-gantt-btn-outline-background);--dhx-gantt-btn-color: var(--dhx-gantt-btn-outline-color);--dhx-gantt-btn-border-color: var(--dhx-gantt-btn-outline-border-color);--dhx-gantt-btn-background-hover: var(--dhx-gantt-btn-outline-background-hover);--dhx-gantt-btn-color-hover: var(--dhx-gantt-btn-outline-color-hover);--dhx-gantt-btn-border-hover: var(--dhx-gantt-btn-outline-border-hover);--dhx-gantt-btn-background-active: var(--dhx-gantt-btn-outline-background-active);--dhx-gantt-btn-color-active: var(--dhx-gantt-btn-outline-color-active);--dhx-gantt-btn-border-active: var(--dhx-gantt-btn-outline-border-active);--dhx-gantt-btn-background-disabled: var(--dhx-gantt-btn-outline-background-disabled);--dhx-gantt-btn-color-disabled: var(--dhx-gantt-btn-outline-color-disabled);--dhx-gantt-btn-border-color-disabled: var(--dhx-gantt-btn-outline-border-color-disabled)}.dhx_gantt_button_danger,.dhx_gantt_button_danger_outline{--dhx-gantt-icon-size: 18px;--dhx-gantt-btn-background: var(--dhx-gantt-base-colors-error);--dhx-gantt-btn-color: var(--dhx-gantt-base-colors-error-text);--dhx-gantt-btn-border-color: var(--dhx-gantt-base-colors-error);--dhx-gantt-btn-background-hover: var(--dhx-gantt-base-colors-error-hover);--dhx-gantt-btn-border-hover: var(--dhx-gantt-base-colors-error-hover);--dhx-gantt-btn-background-active: var(--dhx-gantt-base-colors-error-active);--dhx-gantt-btn-border-active: var(--dhx-gantt-base-colors-error-active)}.dhx_gantt_button_link,.gantt_qi_big_icon{padding:6px 0;--dhx-gantt-icon-size: 18px;--dhx-gantt-btn-background: transparent;--dhx-gantt-btn-color: var(--dhx-gantt-base-colors-primary);--dhx-gantt-btn-border-color: transparent;--dhx-gantt-btn-background-hover: transparent;--dhx-gantt-btn-color-hover: var(--dhx-gantt-base-colors-primary-hover);--dhx-gantt-btn-border-hover: transparent;--dhx-gantt-btn-background-active: transparent;--dhx-gantt-btn-color-active: var(--dhx-gantt-base-colors-primary-active);--dhx-gantt-btn-border-active: transparent;--dhx-gantt-btn-background-disabled: transparent;--dhx-gantt-btn-color-disabled: var(--dhx-gantt-base-colors-icons);--dhx-gantt-btn-border-color-disabled: transparent}@font-face{font-family:dhx-gantt-icons;src:url(data:font/woff;base64,d09GRgABAAAAAAc4AAsAAAAADHgAAQ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{font-family:dhx-gantt-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-gantt-base-colors-icons);font-size:var(--dhx-gantt-icon-size, 1.5em)}.dhx_gantt_icon.dhx_gantt_icon_arrow_down:before,.dhx_menu_icon.dhx_gantt_icon_arrow_down:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_arrow_up:before,.dhx_menu_icon.dhx_gantt_icon_arrow_up:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_close:before,.dhx_menu_icon.dhx_gantt_icon_close:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_constraint_left_dotted:before,.dhx_menu_icon.dhx_gantt_icon_constraint_left_dotted:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_constraint_left_solid:before,.dhx_menu_icon.dhx_gantt_icon_constraint_left_solid:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_constraint_right_dotted:before,.dhx_menu_icon.dhx_gantt_icon_constraint_right_dotted:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_constraint_right_solid:before,.dhx_menu_icon.dhx_gantt_icon_constraint_right_solid:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_delete:before,.dhx_menu_icon.dhx_gantt_icon_delete:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_dots_vertical:before,.dhx_menu_icon.dhx_gantt_icon_dots_vertical:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_edit:before,.dhx_menu_icon.dhx_gantt_icon_edit:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_menu_down:before,.dhx_menu_icon.dhx_gantt_icon_menu_down:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_menu_right:before,.dhx_menu_icon.dhx_gantt_icon_menu_right:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_minus:before,.dhx_menu_icon.dhx_gantt_icon_minus:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_plus:before,.dhx_menu_icon.dhx_gantt_icon_plus:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_rounded_arrow_right:before,.dhx_menu_icon.dhx_gantt_icon_rounded_arrow_right:before{content:""}.dhx_gantt_icon.dhx_gantt_icon_timer:before,.dhx_menu_icon.dhx_gantt_icon_timer:before{content:""}.gantt_container{background:var(--dhx-gantt-container-background);color:var(--dhx-gantt-container-color);font-family:var(--dhx-gantt-font-family);font-size:var(--dhx-gantt-font-size);border:1px solid var(--dhx-gantt-base-colors-border);position:relative;white-space:nowrap;overflow-x:hidden;overflow-y:hidden}.gantt_touch_active{overscroll-behavior:none}.gantt_task_scroll{overflow-x:scroll}.gantt_task,.gantt_grid{position:relative;overflow-x:hidden;overflow-y:hidden;display:inline-block;vertical-align:top}.gantt_grid_scale,.gantt_task_scale{font-family:var(--dhx-gantt-font-family);font-size:var(--dhx-gantt-font-size);border-bottom:var(--dhx-gantt-scale-border-horizontal);box-sizing:border-box}.gantt_grid_scale{background:var(--dhx-gantt-grid-scale-background);color:var(--dhx-gantt-grid-scale-color)}.gantt_task_scale{background:var(--dhx-gantt-timeline-scale-background);color:var(--dhx-gantt-timeline-scale-color)}.gantt_task_vscroll{background:var(--dhx-gantt-container-background)}.gantt_scale_line{box-sizing:border-box;border-top:var(--dhx-gantt-scale-border-horizontal)}.gantt_scale_line:first-child{border-top:none}.gantt_grid_head_cell{display:inline-block;vertical-align:top;border-right:var(--dhx-gantt-grid-scale-border-vertical);text-align:center;position:relative;cursor:default;height:100%;box-sizing:border-box;overflow:hidden}.gantt_scale_line{clear:both}.gantt_grid_data{width:100%;overflow:hidden;position:relative;background:var(--dhx-gantt-grid-body-background)}.gantt_row{position:relative;-webkit-user-select:none;user-select:none}.gantt_add,.gantt_grid_head_add{width:100%;height:100%;cursor:pointer;position:relative;opacity:.6}.gantt_add:before,.gantt_grid_head_add:before{font-family:dhx-gantt-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-gantt-base-colors-icons);font-size:var(--dhx-gantt-icon-size, 1.5em)}.gantt_add:before,.gantt_grid_head_add:before{content:""}.gantt_grid_head_cell.gantt_grid_head_add{opacity:.6;top:0}.gantt_grid_head_cell.gantt_grid_head_add:hover{opacity:1}.gantt_grid_data .gantt_row:hover,.gantt_grid_data .gantt_row.odd:hover{background-color:var(--dhx-gantt-base-colors-hover-color)}.gantt_grid_data .gantt_row:hover .gantt_add{opacity:1}.gantt_task_row,.gantt_row{border-bottom:var(--dhx-gantt-task-row-border);background:var(--dhx-gantt-task-row-background)}.gantt_row.odd,.gantt_task_row.odd{background:var(--dhx-gantt-task-row-background--odd)}.gantt_row,.gantt_cell,.gantt_task_row,.gantt_task_cell,.gantt_grid_head_cell,.gantt_scale_cell{box-sizing:border-box}.gantt_grid_head_cell,.gantt_scale_cell{line-height:inherit}.gantt_grid_scale .gantt_grid_column_resize_wrap{cursor:col-resize;position:absolute;width:13px;margin-left:-7px}.gantt_grid_column_resize_wrap .gantt_grid_column_resize{background-color:var(--dhx-gantt-base-colors-border);height:100%;width:1px;margin:0 auto}.gantt_task_grid_row_resize_wrap{cursor:row-resize;position:absolute;height:13px;margin-top:-7px;left:0;width:100%}.gantt_task_grid_row_resize_wrap .gantt_task_grid_row_resize{background-color:var(--dhx-gantt-base-colors-border-light);top:6px;height:1px;width:100%;margin:0 auto;position:relative}.gantt_drag_marker{pointer-events:none}.gantt_drag_marker.gantt_grid_resize_area,.gantt_drag_marker.gantt_row_grid_resize_area{background-color:#e7e7e780;height:100%;width:100%}.gantt_drag_marker.gantt_grid_resize_area{border-left:var(--dhx-gantt-scale-border-vertical);border-right:var(--dhx-gantt-scale-border-vertical)}.gantt_drag_marker.gantt_row_grid_resize_area{border-top:var(--dhx-gantt-scale-border-horizontal);border-bottom:var(--dhx-gantt-scale-border-horizontal)}.gantt_row{display:flex}.gantt_row>div{flex-shrink:0;flex-grow:0}.gantt_cell{vertical-align:top;border-right:var(--dhx-gantt-grid-cell-border);padding-left:6px;padding-right:6px;height:100%;overflow:hidden;white-space:nowrap}.gantt_cell_tree{display:flex;gap:4px;flex-wrap:nowrap}.gantt_grid_scale .gantt_last_cell,.gantt_grid_data .gantt_last_cell,.gantt_task .gantt_task_scale .gantt_scale_cell.gantt_last_cell,.gantt_task_bg .gantt_last_cell{border-right-width:0px}.gantt_task .gantt_task_scale .gantt_scale_cell.gantt_last_cell{border-right-width:1px}.gantt_task_bg{overflow:hidden}.gantt_scale_cell{display:inline-block;white-space:nowrap;overflow:hidden;border-right:var(--dhx-gantt-grid-scale-border-vertical);text-align:center;height:100%}.gantt_task_cell{display:inline-block;height:100%;border-right:var(--dhx-gantt-timeline-scale-border-vertical)}.gantt_layout_cell.gantt_ver_scroll{width:0px;background-color:transparent;height:1px;overflow-x:hidden;overflow-y:scroll;position:absolute;right:0;z-index:1}.gantt_ver_scroll>div{width:1px;height:1px}.gantt_hor_scroll{height:0px;background-color:transparent;width:100%;clear:both;overflow-x:scroll;overflow-y:hidden}.gantt_layout_cell .gantt_hor_scroll{position:absolute}.gantt_hor_scroll>div{width:5000px;height:1px}.gantt_tree_indent,.gantt_tree_icon{flex-grow:0;flex-shrink:0}.gantt_tree_indent{width:15px;height:100%}.gantt_tree_content,.gantt_tree_icon{vertical-align:top}.gantt_tree_icon{width:28px;height:100%;background-repeat:no-repeat;background-position:center center}.gantt_tree_content{height:100%;white-space:nowrap;min-width:0;overflow:hidden;width:auto;text-overflow:ellipsis}.gantt_tree_icon.gantt_open,.gantt_tree_icon.gantt_close{width:20px;cursor:pointer}.gantt_tree_icon.gantt_open:before,.gantt_tree_icon.gantt_close:before{font-family:dhx-gantt-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-gantt-base-colors-icons);font-size:var(--dhx-gantt-icon-size, 1.5em)}.gantt_tree_icon.gantt_open:before{content:""}.gantt_tree_icon.gantt_close:before{content:""}.gantt_tree_icon.gantt_blank{width:18px}.gantt_tree_icon.gantt_folder_open,.gantt_tree_icon.gantt_folder_closed,.gantt_tree_icon.gantt_file{display:none}.gantt_grid_head_cell .gantt_sort{position:absolute;right:5px;top:0;width:7px;height:13px}.gantt_grid_head_cell .gantt_sort.gantt_asc:before{font-family:dhx-gantt-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-gantt-base-colors-icons);font-size:var(--dhx-gantt-icon-size, 1.5em)}.gantt_grid_head_cell .gantt_sort.gantt_asc:before{content:""}.gantt_grid_head_cell .gantt_sort.gantt_desc:before{font-family:dhx-gantt-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-gantt-base-colors-icons);font-size:var(--dhx-gantt-icon-size, 1.5em)}.gantt_grid_head_cell .gantt_sort.gantt_desc:before{content:""}.gantt_inserted,.gantt_updated{font-weight:700}.gantt_deleted{text-decoration:line-through}.gantt_invalid{background-color:#ffe0e0}.gantt_error{color:var(--dhx-gantt-base-colors-error)}.gantt_status{right:1px;padding:5px 10px;background:#9b9b9b1a;position:absolute;top:1px;transition:opacity .2s;opacity:0}.gantt_status.gantt_status_visible{opacity:1}#gantt_ajax_dots span{transition:opacity .2s;background-repeat:no-repeat;opacity:0}#gantt_ajax_dots span.gantt_dot_visible{opacity:1}.gantt_column_drag_marker{border:var(--dhx-gantt-grid-scale-border-vertical);opacity:.8;pointer-events:none}.gantt_grid_head_cell_dragged{border:var(--dhx-gantt-grid-scale-border-vertical);opacity:.3}.gantt_grid_target_marker{position:absolute;top:0;width:2px;height:100%;background-color:var(--dhx-gantt-base-colors-primary);transform:translate(-1px)}.gantt_grid_target_marker:before,.gantt_grid_target_marker:after{display:block;content:"";position:absolute;left:-5px;width:0px;height:0px;border:6px solid transparent}.gantt_grid_target_marker:before{border-top-color:var(--dhx-gantt-base-colors-primary)}.gantt_grid_target_marker:after{bottom:0;border-bottom-color:var(--dhx-gantt-base-colors-primary)}.gantt_message_area{position:fixed;right:5px;width:320px;z-index:1000}.gantt-info{min-width:120px;padding:12px;font-family:var(--dhx-gantt-font-family);font-size:var(--dhx-gantt-regular-font-size);font-weight:var(--dhx-gantt-regular-font-weight);line-height:var(--dhx-gantt-regular-line-height);z-index:14;overflow:hidden;margin:5px 5px 10px;transition:all .5s ease;background:var(--dhx-gantt-info-background);color:var(--dhx-gantt-info-color);border:var(--dhx-gantt-info-border);box-shadow:var(--dhx-gantt-info-shadow)}.gantt-info.hidden{height:0px;padding:0;border-width:0px;margin:0;overflow:hidden}.gantt_modal_box{overflow:hidden;position:fixed;min-width:300px;width:var(--dhx-gantt-modal-width);background:var(--dhx-gantt-modal-background);box-shadow:var(--dhx-gantt-box-shadow-l);border:var(--dhx-gantt-modal-border);z-index:18;border-radius:var(--dhx-gantt-modal-border-radius);font-family:var(--dhx-gantt-font-family);font-size:var(--dhx-gantt-font-size);color:var(--dhx-gantt-popup-color);line-height:150%}.gantt_popup_title{border-top-left-radius:var(--dhx-gantt-modal-border-radius);border-top-right-radius:var(--dhx-gantt-modal-border-radius);text-transform:uppercase;font-weight:var(--dhx-gantt-heading-font-weight);padding:calc(var(--dhx-gantt-modal-padding)/2) var(--dhx-gantt-modal-padding);display:flex;justify-content:center;align-items:center}.gantt_popup_text{padding:var(--dhx-gantt-modal-padding);display:flex;justify-content:center;align-items:center}.gantt_popup_controls{display:flex;flex-direction:var(--dhx-gantt-btn-order);padding:calc(var(--dhx-gantt-modal-padding)/2) var(--dhx-gantt-modal-padding);align-items:center;gap:12px}.gantt-info,.gantt_popup_button,.gantt_button{-webkit-user-select:none;user-select:none;cursor:pointer}.gantt_popup_text{overflow:hidden}div.dhx_modal_cover{background:#44494e;opacity:.2;position:fixed;z-index:17;left:0;top:0;width:100%;height:100%;border:none}.gantt_popup_controls{border-radius:var(--dhx-gantt-border-radius)}.gantt_message_area .gantt-error{--dhx-gantt-info-background: var(--dhx-gantt-base-colors-error);--dhx-gantt-info-color: var(--dhx-gantt-base-colors-text-on-fill)}.gantt_message_area .gantt-warning{--dhx-gantt-info-background: var(--dhx-gantt-base-colors-warning);--dhx-gantt-info-color: var(--dhx-gantt-base-colors-text-on-fill)}.gantt_grid div,.gantt_data_area div{-ms-touch-action:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.gantt_data_area{position:relative;overflow-x:hidden;overflow-y:hidden;-webkit-user-select:none;user-select:none}.gantt_links_area{position:absolute;left:0;top:0}.gantt_task_content,.gantt_task_progress,.gantt_side_content{line-height:inherit;overflow:hidden;height:100%}.gantt_task_content{font-size:var(--dhx-gantt-task-font-size);color:var(--dhx-gantt-task-color);width:100%;padding-top:1px;top:0;cursor:pointer;position:absolute;white-space:nowrap;text-align:center}.gantt_task_progress{text-align:center;z-index:0;background:var(--dhx-gantt-task-progress-color)}.gantt_task_progress_wrapper{border-radius:inherit;position:relative;width:100%;height:100%;overflow:hidden}.gantt_task_line{border-radius:var(--dhx-gantt-task-border-radius);position:absolute;box-sizing:border-box;background:var(--dhx-gantt-task-background);border:var(--dhx-gantt-task-border);-webkit-user-select:none;user-select:none}.gantt_task_line.gantt_drag_move div{cursor:move}.gantt_touch_move,.gantt_touch_progress,.gantt_touch_resize{transform:scale(1.02,1.1);transform-origin:50%}.gantt_touch_progress .gantt_task_progress_drag,.gantt_touch_resize .gantt_task_drag{transform:scaleY(1.3);transform-origin:50%}.gantt_side_content{position:absolute;white-space:nowrap;color:var(--dhx-gantt-base-colors-text-light);top:0;font-size:calc(var(--dhx-gantt-task-font-size) - 1px)}.gantt_side_content.gantt_left{right:100%;padding-right:var(--dhx-gantt-base-padding)}.gantt_side_content.gantt_right{left:100%;padding-left:var(--dhx-gantt-base-padding)}.gantt_side_content.gantt_link_crossing{margin-top:-6px}.gantt_task_link .gantt_line_wrapper,.gantt_link_arrow,.gantt_link_corner{position:absolute;cursor:pointer}.gantt_line_wrapper div{background-color:var(--dhx-gantt-link-background)}.gantt_link_corner{box-sizing:content-box!important;border-color:var(--dhx-gantt-link-background);background-color:transparent}.gantt_task_link:hover{--dhx-gantt-link-background: var(--dhx-gantt-link-background-hover)}.gantt_task_link div.gantt_link_arrow{color:var(--dhx-gantt-link-background)}.gantt_task_link div.gantt_link_arrow:before{font-family:dhx-gantt-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-gantt-base-colors-icons);font-size:var(--dhx-gantt-icon-size, 1.5em)}.gantt_task_link div.gantt_link_arrow:before{content:""}.gantt_link_control{position:absolute;width:calc(var(--dhx-gantt-link-handle-offset) + var(--dhx-gantt-link-handle-size));top:50%;display:flex;align-items:center;transition:all var(--dhx-gantt-base-transition)}.gantt_link_control div{display:none;cursor:pointer;box-sizing:border-box;position:relative;border:2px solid var(--dhx-gantt-link-handle-border);border-radius:50%;height:var(--dhx-gantt-link-handle-size);width:var(--dhx-gantt-link-handle-size);background:var(--dhx-gantt-link-handle-background)}.gantt_link_control div:hover{--dhx-gantt-link-handle-background: var(--dhx-gantt-link-handle-background-hover);--dhx-gantt-link-handle-border: var(--dhx-gantt-link-handle-border-hover)}.gantt_link_control.task_left{transform:translate(-100%,-50%);left:0;justify-content:flex-start}.gantt_link_control.task_right{transform:translate(100%,-50%);right:0;justify-content:flex-end}.gantt_task_line.gantt_link_source .gantt_link_control div,.gantt_task_line.gantt_selected .gantt_link_control div,.gantt_task_line:hover .gantt_link_control div,.gantt_task_line.gantt_drag_move .gantt_link_control div,.gantt_task_line.gantt_drag_resize .gantt_link_control div,.gantt_task_line.gantt_link_source .gantt_task_drag,.gantt_task_line.gantt_selected .gantt_task_drag,.gantt_task_line:hover .gantt_task_drag,.gantt_task_line.gantt_drag_move .gantt_task_drag,.gantt_task_line.gantt_drag_resize .gantt_task_drag{display:block}.gantt_task_line.gantt_selected .gantt_task_progress_drag,.gantt_task_line:hover .gantt_task_progress_drag,.gantt_task_line.gantt_drag_progress .gantt_task_progress_drag{display:flex}.gantt_link_target .gantt_link_control div{display:block}.gantt_link_source,.gantt_link_target{box-shadow:0 0 3px var(--dhx-gantt-base-colors-primary)}.gantt_link_target.link_start_allow,.gantt_link_target.link_finish_allow{box-shadow:0 0 3px var(--dhx-gantt-base-colors-success)}.gantt_link_target.link_start_deny,.gantt_link_target.link_finish_deny{box-shadow:0 0 3px var(--dhx-gantt-base-colors-error)}.gantt_link_from_start .gantt_link_control.task_start_date div,.gantt_link_from_end .gantt_link_control.task_end_date div,.link_start_allow .gantt_link_control.task_start_date div,.link_finish_allow .gantt_link_control.task_end_date div{--dhx-gantt-link-handle-border: var(--dhx-gantt-link-handle-border-hover);--dhx-gantt-link-handle-background: var(--dhx-gantt-base-colors-primary)}.link_start_deny .gantt_link_control.task_start_date div,.link_finish_deny .gantt_link_control.task_end_date div{--dhx-gantt-link-handle-border: var(--dhx-gantt-link-handle-border-hover);--dhx-gantt-link-handle-background: var(--dhx-gantt-base-colors-error)}.gantt_link_arrow_left{transform:rotate(180deg)}.gantt_task_drag,.gantt_task_progress_drag{cursor:ew-resize;display:none;position:absolute}.gantt_task_drag.task_right{cursor:e-resize}.gantt_task_drag.task_left{cursor:w-resize}.gantt_task_drag{height:16px;width:8px;z-index:1;top:-1px}.gantt_task_drag.task_left{left:-7px}.gantt_task_drag.task_right{right:-7px}.gantt_task_progress_drag{height:70%;min-height:12px;bottom:-3px;transform:translate(-50%);z-index:1;align-items:flex-end}.gantt_task_progress_drag:hover{--dhx-gantt-base-colors-icons: var(--dhx-gantt-base-colors-icons-hover)}.gantt_link_tooltip{box-shadow:3px 3px 3px #0003;background-color:var(--dhx-gantt-popup-background);border-left:1px solid var(--dhx-gantt-base-colors-border);border-top:1px solid var(--dhx-gantt-base-colors-border);font-family:var(--dhx-gantt-font-family);font-size:var(--dhx-gantt-regular-font-size);color:var(--dhx-gantt-popup-color);padding:var(--dhx-gantt-base-padding);line-height:var(--dhx-gantt-regular-line-height)}.gantt_link_direction{height:0px;border:none;border-bottom:2px dashed var(--dhx-gantt-base-colors-primary);transform-origin:0% 0%;z-index:2;margin-left:1px;position:absolute}.gantt_grid_data .gantt_row.gantt_selected,.gantt_grid_data .gantt_row.odd.gantt_selected{background-color:var(--dhx-gantt-base-colors-select)}.gantt_row_project{font-weight:500}.gantt_task_row.odd.gantt_selected,.gantt_task_row.gantt_selected{background-color:var(--dhx-gantt-base-colors-select)}.gantt_task_line.gantt_selected{box-shadow:var(--dhx-gantt-box-shadow-s)}.gantt_cal_quick_info.gantt_project,.gantt_task_line.gantt_project{--dhx-gantt-task-color: var(--dhx-gantt-project-color);--dhx-gantt-task-background: var(--dhx-gantt-project-background);--dhx-gantt-task-progress-color: var(--dhx-gantt-project-progress-color)}.gantt_task_line.gantt_project.gantt_task_line_planned{--dhx-gantt-task-background: var(--dhx-gantt-base-colors-text-light)}.gantt_task_line_planned{--dhx-gantt-scheduled-summary-bracket-size: 8px}.gantt_task_line_planned:before,.gantt_task_line_planned:after{content:"";position:absolute;top:0;width:0;height:0;border-style:solid;border-color:transparent}.gantt_task_line_planned:before{border-width:var(--dhx-gantt-scheduled-summary-bracket-size) var(--dhx-gantt-scheduled-summary-bracket-size) 0 0;border-right-color:var(--dhx-gantt-task-background);transform:rotate(180deg)}.gantt_task_line_planned:after{border-width:0 var(--dhx-gantt-scheduled-summary-bracket-size) var(--dhx-gantt-scheduled-summary-bracket-size) 0;border-right-color:var(--dhx-gantt-task-background);right:0}.gantt_task_line_actual{opacity:.3;--dhx-gantt-task-border-radius: 2px}.gantt_task_line.gantt_project.gantt_project_scheduling_conflict .gantt_task_line_actual{--dhx-gantt-task-background: var(--dhx-gantt-base-colors-error)}.gantt_task_line.gantt_project.gantt_selected{box-shadow:var(--dhx-gantt-box-shadow-s)}.gantt_task_line.gantt_milestone{--dhx-gantt-task-background: var(--dhx-gantt-milestone-background);visibility:hidden;border:none;box-sizing:content-box}.gantt_task_line.gantt_milestone div{visibility:visible}.gantt_task_line.gantt_milestone .gantt_task_content{background:inherit;border:inherit;border-width:1px;border-radius:inherit;box-sizing:border-box;transform:rotate(45deg)}.gantt_task_line.gantt_task_inline_color{border-color:var(--dhx-gantt-task-background)}.gantt_task_line.gantt_task_inline_color .gantt_task_progress{background-color:var(--dhx-gantt-task-background);opacity:.2}.gantt_task_line.gantt_task_inline_color.gantt_selected,.gantt_task_line.gantt_task_inline_color.gantt_project.gantt_selected{box-shadow:0 0 5px var(--dhx-gantt-task-background)}.gantt_task_link.gantt_link_inline_color:hover .gantt_line_wrapper div{box-shadow:0 0 5px 0 var(--dhx-gantt-task-background)}.gantt_critical_task{--dhx-gantt-task-background: var(--dhx-gantt-link-critical-background)}.gantt_critical_task .gantt_task_progress{--dhx-gantt-task-progress: rgba(0, 0, 0, .4)}.gantt_critical_link{--dhx-gantt-link-background: var(--dhx-gantt-link-critical-background)}.gantt_link_arrow{--dhx-gantt-base-colors-icons: var(--dhx-gantt-link-background)}.gantt_row:focus,.gantt_cell:focus,.gantt_btn_set:focus,.gantt_qi_big_icon:focus,.gantt_popup_button:focus,.gantt_grid_head_cell:focus{box-shadow:inset 0 0 1px 1px var(--dhx-gantt-base-colors-primary)}.gantt_split_parent,.gantt_split_subproject{opacity:.1;pointer-events:none}.gantt_rollup_child .gantt_link_control,.gantt_rollup_child:hover .gantt_link_control{display:none}.gantt_unselectable,.gantt_unselectable div{-webkit-user-select:none;user-select:none}.gantt_common_input{border-radius:2px;background-color:var(--dhx-gantt-lightbox-background);color:var(--dhx-gantt-lightbox-color);border:var(--dhx-gantt-lightbox-control-border);font-size:var(--dhx-gantt-lightbox-font-sizeeduler);padding:6px 8px;box-sizing:border-box;margin-top:0;margin-bottom:0}.gantt_common_input:focus,.gantt_common_input:focus-visible{border-color:var(--dhx-gantt-base-colors-primary);outline:none}.gantt_common_input:disabled{background-color:var(--dhx-gantt-base-colors-disabled);color:var(--dhx-gantt-base-colors-icons)}.gantt_one_line_input{height:var(--dhx-gantt-control-height)}.gantt_cal_cover,.gantt_cal_cover *{box-sizing:border-box}.gantt_cal_light{margin-top:auto;margin-bottom:auto;width:var(--dhx-gantt-lightbox-width);max-width:var(--dhx-gantt-lightbox-max-width);height:auto;-webkit-tap-highlight-color:transparent;background-color:var(--dhx-gantt-lightbox-background);color:var(--dhx-gantt-lightbox-color);position:absolute;z-index:15;font-family:var(--dhx-gantt-lightbox_font-family);font-size:var(--dhx-gantt-lightbox-font-size);font-weight:var(--dhx-gantt-lightbox-font-weight);line-height:142%;border:var(--dhx-gantt-lightbox-border);border-radius:var(--dhx-gantt-popup-border-radius)}.gantt_cal_light.gantt_cal_light_wide{--dhx-gantt-lightbox-width: var(--dhx-gantt-lightbox-wide-max-width);--dhx-gantt-lightbox-max-width: var(--dhx-gantt-lightbox-wide-max-width)}.gantt_cal_light textarea,.gantt_cal_light input,.gantt_cal_light select{border-radius:2px;background-color:var(--dhx-gantt-lightbox-background);color:var(--dhx-gantt-lightbox-color);border:var(--dhx-gantt-lightbox-control-border);font-size:var(--dhx-gantt-lightbox-font-sizeeduler);padding:6px 8px;box-sizing:border-box;margin-top:0;margin-bottom:0}.gantt_cal_light textarea:focus,.gantt_cal_light input:focus,.gantt_cal_light select:focus,.gantt_cal_light textarea:focus-visible,.gantt_cal_light input:focus-visible,.gantt_cal_light select:focus-visible{border-color:var(--dhx-gantt-base-colors-primary);outline:none}.gantt_cal_light textarea:disabled,.gantt_cal_light input:disabled,.gantt_cal_light select:disabled{background-color:var(--dhx-gantt-base-colors-disabled);color:var(--dhx-gantt-base-colors-icons)}.gantt_cal_light input,.gantt_cal_light select{height:var(--dhx-gantt-control-height)}.gantt_cal_light input[type=select],.gantt_cal_light input[type=checkbox]{height:var(--dhx-gantt-checkbox-height)}.gantt_cal_light .gantt_time{display:none}.gantt_cal_ltitle{font-size:var(--dhx-gantt-lightbox-title-font-size);font-weight:var(--dhx-gantt-heading-font-weight);line-height:142%;background:var(--dhx-gantt-lightbox-title-background);color:var(--dhx-gantt-lightbox-title-color);border-bottom:var(--dhx-gantt-default-border);padding:calc(var(--dhx-gantt-base-padding) * 3) var(--dhx-gantt-lightbox-padding);overflow:hidden;white-space:nowrap;display:flex;flex-direction:row;justify-content:space-between;gap:calc(var(--dhx-gantt-base-padding) * 2);border-top-right-radius:var(--dhx-gantt-popup-border-radius);border-top-left-radius:var(--dhx-gantt-popup-border-radius)}.gantt_cal_ltitle .gantt_mark{display:none}.gantt_cal_ltitle .gantt_cal_ltitle_descr{overflow:hidden;text-overflow:ellipsis}.gantt_cal_ltitle .gantt_cal_ltitle_controls{cursor:pointer;--dhx-gantt-icon-size: 18px}.gantt_cal_light_rtl{direction:rtl}.gantt_cal_light_wide.gantt_cal_light_rtl .gantt_custom_button{right:auto;left:calc(var(--dhx-gantt-base-padding) * 2)}.gantt_section_constraint [data-constraint-time-select]{margin-left:20px}.gantt_cal_larea{border:none;padding:0 var(--dhx-gantt-lightbox-padding) 4px;height:auto;gap:calc(var(--dhx-gantt-base-padding) * 2)}.gantt_cal_cover{width:100%;height:100%;position:fixed;z-index:16;top:0;left:0;background-color:#0000004d;display:flex;justify-content:center;align-items:center;overflow:auto}.gantt_lightbox_time_select{min-width:80px}.gantt_lightbox_day_select{min-width:60px}.gantt_lightbox_month_select{min-width:110px}.gantt_lightbox_year_select{min-width:77px}.gantt_cal_light_full{width:auto}.gantt_cal_light_wide .gantt_cal_larea{display:flex;flex-direction:column;padding-top:12px;gap:12px}.gantt_cal_light_wide .gantt_wrap_section{display:flex;flex:0;position:relative}.gantt_cal_light_wide .gantt_cal_lsection{width:120px;justify-content:start;align-items:start;flex-shrink:0;margin-top:0;margin-bottom:0;padding:4px 8px}.gantt_cal_light_wide .gantt_custom_button{position:absolute;left:auto;right:calc(var(--dhx-gantt-base-padding) * 2)}.gantt_cal_light_wide .gantt_cal_ltext{flex:1}.gantt_cal_light_wide .gantt_section_time{justify-content:start}.gantt_cal_light_wide .gantt_fullday{margin-left:unset}.gantt_duration{display:flex;justify-content:flex-start;align-items:center;gap:4px}.gantt_duration .gantt_duration_end_date{color:var(--dhx-gantt-base-colors-text-light);min-width:130px}.gantt_duration .gantt_duration_value,.gantt_duration .gantt_duration_dec,.gantt_duration .gantt_duration_inc{border-radius:2px;background-color:var(--dhx-gantt-lightbox-background);color:var(--dhx-gantt-lightbox-color);border:var(--dhx-gantt-lightbox-control-border);font-size:var(--dhx-gantt-lightbox-font-sizeeduler);padding:6px 8px;box-sizing:border-box;margin-top:0;margin-bottom:0;text-align:center}.gantt_duration .gantt_duration_value:focus,.gantt_duration .gantt_duration_dec:focus,.gantt_duration .gantt_duration_inc:focus,.gantt_duration .gantt_duration_value:focus-visible,.gantt_duration .gantt_duration_dec:focus-visible,.gantt_duration .gantt_duration_inc:focus-visible{border-color:var(--dhx-gantt-base-colors-primary);outline:none}.gantt_duration .gantt_duration_value:disabled,.gantt_duration .gantt_duration_dec:disabled,.gantt_duration .gantt_duration_inc:disabled{background-color:var(--dhx-gantt-base-colors-disabled);color:var(--dhx-gantt-base-colors-icons)}.gantt_duration_inputs{display:flex}.gantt_duration .gantt_duration_value{width:40px;padding:3px 4px;border-left-width:0;border-right-width:0;border-radius:0}.gantt_duration .gantt_duration_value.gantt_duration_value_formatted{width:70px}.gantt_duration .gantt_duration_dec,.gantt_duration .gantt_duration_inc{width:26px;padding:1px 4px;color:var(--dhx-gantt-base-colors-primary);font-size:18px;border-radius:var(--dhx-gantt-border-radius);cursor:pointer}.gantt_duration .gantt_duration_dec{border-top-right-radius:0;border-bottom-right-radius:0}.gantt_duration .gantt_duration_inc{border-top-left-radius:0;border-bottom-left-radius:0}.gantt_duration .gantt_duration_inc{margin-right:4px}.gantt_resources{max-height:150px;height:auto;overflow-y:auto}.gantt_resource_row{display:block;padding:10px 0;border-bottom:1px solid var(--dhx-gantt-base-colors-border-light);cursor:pointer}.gantt_resource_row input[type=checkbox]:not(:checked),.gantt_resource_row input[type=checkbox]:not(:checked)~div{opacity:.5}.gantt_resource_toggle{vertical-align:middle}.gantt_resources_filter{display:flex;align-items:center}.gantt_resources_filter label{display:inline-flex;gap:2px;align-items:center}.gantt_resources_filter .gantt_resources_filter_input{padding:1px 6px;box-sizing:border-box}.gantt_resources_filter .switch_unsetted{vertical-align:middle}.gantt_resource_cell{display:inline-block}.gantt_resource_cell.gantt_resource_cell_checkbox{width:24px;max-width:24px;min-width:24px;vertical-align:middle}.gantt_resource_cell.gantt_resource_cell_label{width:40%;max-width:40%;vertical-align:middle}.gantt_resource_cell.gantt_resource_cell_value{width:30%;max-width:30%;vertical-align:middle}.gantt_resource_cell.gantt_resource_cell_value input,.gantt_resource_cell.gantt_resource_cell_value select{width:80%;vertical-align:middle;padding:1px 2px;box-sizing:border-box}.gantt_resource_cell.gantt_resource_cell_unit{width:10%;max-width:10%;vertical-align:middle}.gantt_resource_early_value{opacity:.8;font-size:.9em}.gantt_cal_lcontrols{display:flex;flex-direction:var(--dhx-gantt-btn-order);gap:calc(var(--dhx-gantt-base-padding)*2);padding:12px var(--dhx-gantt-lightbox-padding)}.gantt_cal_lcontrols .gantt_btn_set{display:flex;flex-direction:row;gap:var(--dhx-gantt-base-padding)}.gantt_cal_lcontrols .gantt_btn_set.gantt_delete_btn_set{--dhx-gantt-icon-size: 18px;padding:6px 0;--dhx-gantt-base-colors-icons: var(--dhx-gantt-base-colors-error);--dhx-gantt-btn-background: transparent;--dhx-gantt-btn-color: var(--dhx-gantt-base-colors-error);--dhx-gantt-btn-border-color: transparent;--dhx-gantt-btn-background-hover: transparent;--dhx-gantt-btn-color-hover: var(--dhx-gantt-base-colors-error-hover);--dhx-gantt-btn-border-hover: transparent;--dhx-gantt-btn-background-active: transparent;--dhx-gantt-btn-color-active: var(--dhx-gantt-base-colors-error-active);--dhx-gantt-btn-border-active: transparent;--dhx-gantt-btn-background-disabled: transparent;--dhx-gantt-btn-color-disabled: var(--dhx-gantt-base-colors-icons);--dhx-gantt-btn-border-color-disabled: transparent}.gantt_cal_lcontrols .gantt_btn_set:not(.gantt_save_btn_set,.gantt_delete_btn_set){--dhx-gantt-icon-size: 18px;--dhx-gantt-base-colors-icons: var(--dhx-gantt-btn-color);--dhx-gantt-btn-background: var(--dhx-gantt-btn-outline-background);--dhx-gantt-btn-color: var(--dhx-gantt-btn-outline-color);--dhx-gantt-btn-border-color: var(--dhx-gantt-btn-outline-border-color);--dhx-gantt-btn-background-hover: var(--dhx-gantt-btn-outline-background-hover);--dhx-gantt-btn-color-hover: var(--dhx-gantt-btn-outline-color-hover);--dhx-gantt-btn-border-hover: var(--dhx-gantt-btn-outline-border-hover);--dhx-gantt-btn-background-active: var(--dhx-gantt-btn-outline-background-active);--dhx-gantt-btn-color-active: var(--dhx-gantt-btn-outline-color-active);--dhx-gantt-btn-border-active: var(--dhx-gantt-btn-outline-border-active);--dhx-gantt-btn-background-disabled: var(--dhx-gantt-btn-outline-background-disabled);--dhx-gantt-btn-color-disabled: var(--dhx-gantt-btn-outline-color-disabled);--dhx-gantt-btn-border-color-disabled: var(--dhx-gantt-btn-outline-border-color-disabled)}.gantt_cal_lcontrols .gantt_btn_set .gantt_btn_inner{display:none}.gantt_cal_lcontrols .gantt_btn_set .gantt_delete_btn:before{font-family:dhx-gantt-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-gantt-base-colors-icons);font-size:var(--dhx-gantt-icon-size, 1.5em)}.gantt_cal_lcontrols .gantt_btn_set .gantt_delete_btn:before{content:""}.gantt_cal_lcontrols .gantt_cal_lcontrols_push_right{margin-left:auto}.gantt_cal_ltext textarea{width:100%;height:100%;resize:none;font-family:var(--dhx-gantt-lightbox_font-family);font-size:var(--dhx-gantt-lightbox-font-size);font-weight:var(--dhx-gantt-lightbox-font-weight);line-height:142%}.gantt_section_time_spacer,.gantt_lightbox_minical_spacer{visibility:hidden;height:0;flex-basis:100%}.gantt_section_time{--dhx-gantt-lightbox-time-font-size: var(--dhx-gantt-important-font-size);--dhx-gantt-lightbox-time-font-weight: var(--dhx-gantt-important-font-weight);font-size:var(--dhx-gantt-lightbox-time-font-size);font-weight:var(--dhx-gantt-lightbox-time-font-weight);line-height:142%;display:flex;flex-wrap:wrap;align-items:center;gap:calc(var(--dhx-gantt-base-padding) * 2);row-gap:var(--dhx-gantt-base-padding)}.gantt_section_time .gantt_section_time_icon{width:calc(var(--dhx-gantt-base-module) * 2);height:calc(var(--dhx-gantt-base-module) * 2);border-radius:2px;background:var(--dhx-gantt-base-colors-primary)}.gantt_section_duration{gap:16px}.gantt_fullday{margin-left:auto}.gantt_cal_light_rtl .gantt_fullday{margin-left:unset;margin-right:auto}.gantt_cal_lsection label{font-weight:var(--dhx-gantt-heading-font-weight);display:flex;align-items:center;gap:4px;width:100%}.gantt_cal_lsection{display:flex;margin-top:12px;margin-bottom:4px}.gantt_cal_lsection .gantt_custom_button{background:var(--dhx-gantt-btn-background);color:var(--dhx-gantt-btn-color);border:1px solid var(--dhx-gantt-btn-border-color);border-radius:var(--dhx-gantt-border-radius);height:var(--dhx-gantt-control-height);padding:var(--dhx-gantt-btn-padding, 0 20px);display:flex;justify-content:center;align-items:center;box-sizing:border-box;gap:4px;flex-shrink:0;font-weight:500;font-size:var(--dhx-gantt-font-size);font-family:var(--dhx-gantt-font-family);font-weight:var(--dhx-gantt-btn-font-weight, normal);line-height:142%;text-transform:var(--dhx-gantt-btn-text-transform);cursor:pointer;--dhx-gantt-icon-size: 18px;--dhx-gantt-base-colors-icons: var(--dhx-gantt-btn-color);--dhx-gantt-btn-background: var(--dhx-gantt-btn-outline-background);--dhx-gantt-btn-color: var(--dhx-gantt-btn-outline-color);--dhx-gantt-btn-border-color: var(--dhx-gantt-btn-outline-border-color);--dhx-gantt-btn-background-hover: var(--dhx-gantt-btn-outline-background-hover);--dhx-gantt-btn-color-hover: var(--dhx-gantt-btn-outline-color-hover);--dhx-gantt-btn-border-hover: var(--dhx-gantt-btn-outline-border-hover);--dhx-gantt-btn-background-active: var(--dhx-gantt-btn-outline-background-active);--dhx-gantt-btn-color-active: var(--dhx-gantt-btn-outline-color-active);--dhx-gantt-btn-border-active: var(--dhx-gantt-btn-outline-border-active);--dhx-gantt-btn-background-disabled: var(--dhx-gantt-btn-outline-background-disabled);--dhx-gantt-btn-color-disabled: var(--dhx-gantt-btn-outline-color-disabled);--dhx-gantt-btn-border-color-disabled: var(--dhx-gantt-btn-outline-border-color-disabled);order:1;margin-left:auto;margin-right:unset}.gantt_cal_lsection .gantt_custom_button:hover{background:var(--dhx-gantt-btn-background-hover);color:var(--dhx-gantt-btn-color-hover);border-color:var(--dhx-gantt-btn-border-hover)}.gantt_cal_lsection .gantt_custom_button:active{background:var(--dhx-gantt-btn-background-active);color:var(--dhx-gantt-btn-color-active);border-color:var(--dhx-gantt-btn-border-active)}.gantt_cal_lsection .gantt_custom_button:disabled{background:var(--dhx-gantt-btn-background-disabled);color:var(--dhx-gantt-btn-color-disabled);border-color:var(--dhx-gantt-btn-border-disabled)}.gantt_cal_light_rtl .gantt_custom_button{margin-left:unset;margin-right:auto}.gantt_cal_checkbox{display:flex;gap:var(--dhx-gantt-base-padding)}.gantt_cal_wide_checkbox{padding:4px 0}.gantt_cal_radio input{margin:var(--dhx-gantt-base-padding)}.gantt_cal_radio_item{display:flex;gap:var(--dhx-gantt-base-padding);align-items:center}.gantt_cal_radio{display:flex;gap:4px}.gantt_cal_radio_vertical{flex-direction:column;overflow:auto;--dhx-gantt-control-height: 20px}.gantt_cal_lcheckbox,.gantt_cal_lradio{display:flex;flex-wrap:wrap;gap:8px}.gantt_cal_lcheckbox label,.gantt_cal_lradio label{display:flex;align-items:center;gap:4px}.gantt_cal_template{position:relative;padding-top:4px;padding-bottom:4px}.gantt_cal_light .gantt_readonly{color:var(--dhx-gantt-base-colors-readonly)}.gantt_cal_quick_info{--dhx-gantt-quick-info-font-size: var(--dhx-gantt-font-size);position:absolute;z-index:8;font-size:var(--dhx-gantt-quick-info-font-size);background:var(--dhx-gantt-popup-background);color:var(--dhx-gantt-popup-color);border:var(--dhx-gantt-popup-border);padding:calc(var(--dhx-gantt-base-padding)*2) calc(var(--dhx-gantt-base-padding)*3);border-radius:var(--dhx-gantt-border-radius);width:300px;display:flex;flex-direction:column;box-shadow:var(--dhx-gantt-box-shadow-s);transition:left .5s ease,right .5s ease}.gantt_cal_qi_tcontrols{display:flex;justify-content:end;height:8px}.gantt_cal_qi_tcontrols .gantt_cal_qi_close_btn{min-width:32px;height:32px;border-radius:50%;--dhx-gantt-icon-size: 18px;--dhx-gantt-btn-background: transparent;--dhx-gantt-btn-color: var(--dhx-gantt-base-colors-primary);--dhx-gantt-btn-border-color: transparent;--dhx-gantt-btn-background-hover: transparent;--dhx-gantt-btn-color-hover: var(--dhx-gantt-base-colors-primary-hover);--dhx-gantt-btn-border-hover: transparent;--dhx-gantt-btn-background-active: transparent;--dhx-gantt-btn-color-active: var(--dhx-gantt-base-colors-primary-active);--dhx-gantt-btn-border-active: transparent;--dhx-gantt-btn-background-disabled: transparent;--dhx-gantt-btn-color-disabled: var(--dhx-gantt-base-colors-icons);--dhx-gantt-btn-border-color-disabled: transparent;width:unset;min-width:unset;padding:2px;font-size:18px;cursor:pointer;height:20px;position:relative;z-index:1}.gantt_cal_qi_tcontrols .gantt_cal_qi_close_btn:hover{--dhx-gantt-base-colors-icons: var(--dhx-gantt-base-colors-icons-hover)}.gantt_cal_qi_tcontrols .gantt_cal_qi_close_btn:active{--dhx-gantt-base-colors-icons: var(--dhx-gantt-base-colors-icons-active)}.gantt_cal_qi_tcontrols .gantt_cal_qi_close_btn:disabled{--dhx-gantt-base-colors-icons: var(--dhx-gantt-btn-color-disabled)}.gantt_cal_qi_title,.gantt_cal_qi_controls,.gantt_cal_qi_content{padding:0 calc(var(--dhx-gantt-base-padding) * 3)}.gantt_cal_qi_title{display:flex;flex-direction:column;gap:12px;padding-right:14px}.gantt_cal_qi_tcontent{font-size:var(--dhx-gantt-heading-font-size);font-weight:var(--dhx-gantt-heading-font-weight);line-height:150%;position:relative;display:flex;flex-direction:row;justify-content:start;align-items:center;gap:8px;overflow:hidden;flex-grow:0;text-overflow:ellipsis;white-space:nowrap}.gantt_cal_qi_tcontent>span{text-overflow:ellipsis;overflow:hidden}.gantt_cal_qi_tcontent:before{display:var(--dhx-gantt-quick-info-dot-display, block);content:"";flex-shrink:0;width:8px;height:8px;border-radius:2px;background:var(--dhx-gantt-task-background)}.gantt_cal_qi_tdate{font-size:var(--dhx-gantt-important-font-size);font-weight:var(--dhx-gantt-important-font-weight);line-height:var(--dhx-gantt-important-line-height)}.gantt_cal_qi_content{padding-top:16px;padding-bottom:8px}.gantt_cal_qi_controls{display:flex;flex-direction:row;justify-content:start;align-items:center;padding-top:8px;gap:12px;color:var(--dhx-gantt-base-colors-primary)}.gantt_cal_qi_controls>div:first-child{margin-left:-3px}.gantt_menu_icon{width:20px;height:20px;display:flex;align-items:center;justify-content:center;--dhx-gantt-base-colors-icons: var(--dhx-gantt-btn-color)}.dhx_gantt_icon.dhx_gantt_icon_edit,.dhx_menu_icon.dhx_gantt_icon_edit{--dhx-gantt-icon-size: var(--dhx-gantt-font-size)}.gantt_tooltip{padding:8px 30px 8px 8px;position:absolute;z-index:50;white-space:nowrap;box-shadow:var(--dhx-gantt-box-shadow-m);background:var(--dhx-gantt-tooltip-background);color:var(--dhx-gantt-tooltip-color);border:var(--dhx-gantt-tooltip-border);font-family:var(--dhx-gantt-font-family);font-size:var(--dhx-gantt-regular-font-size);line-height:var(--dhx-gantt-regular-line-height);font-weight:var(--dhx-gantt-regular-font-weight);border-radius:var(--dhx-gantt-tooltip-border-radius);display:flex;flex-direction:column;align-items:flex-start;gap:4px}.gantt_resource_marker{position:absolute;text-align:center;font-size:var(--dhx-gantt-font-size);color:#fff}.gantt_resource_marker_ok{background:var(--dhx-gantt-base-colors-success)}.gantt_resource_marker_overtime{background:var(--dhx-gantt-base-colors-error)}.gantt_histogram_label{width:100%;height:100%;position:absolute;z-index:1;font-weight:700;font-size:var(--dhx-gantt-font-size)}.gantt_histogram_fill{background-color:#537cfa4d;background-color:color-mix(in srgb,var(--dhx-gantt-base-colors-primary),transparent 60%);width:100%;position:absolute;bottom:0}.gantt_histogram_hor_bar{height:1px;position:absolute;background:var(--dhx-gantt-base-colors-primary);margin-top:-1px;margin-left:-1px}.gantt_histogram_vert_bar{width:1px;position:absolute;background:var(--dhx-gantt-base-colors-primary);margin-left:-1px}.gantt_histogram_cell{position:absolute;text-align:center;font-size:var(--dhx-gantt-font-size)}.gantt_marker{height:100%;width:1px;top:0;position:absolute;text-align:center;background-color:var(--dhx-gantt-base-colors-error)}.gantt_marker .gantt_marker_content{padding:2px;background:inherit;color:var(--dhx-gantt-base-colors-white);position:absolute;font-size:var(--dhx-gantt-caption-font-size);line-height:var(--dhx-gantt-caption-line-height);font-weight:var(--dhx-gantt-caption-line-weight)}.gantt_marker_area{position:absolute;top:0;left:0}.gantt_grid_editor_placeholder{position:absolute}.gantt_grid_editor_placeholder>div,.gantt_grid_editor_placeholder input,.gantt_grid_editor_placeholder select{width:100%;height:100%;box-sizing:border-box}.gantt_row_placeholder div{opacity:.5}.gantt_row_placeholder .gantt_file,.gantt_row_placeholder .gantt_add{display:none}.gantt_drag_marker.gantt_grid_dnd_marker{background-color:transparent;transition:all .1s ease}.gantt_grid_dnd_marker_line{height:4px;width:100%;background-color:var(--dhx-gantt-base-colors-primary)}.gantt_grid_dnd_marker_line:before{background:var(--dhx-gantt-base-colors-white);width:12px;height:12px;box-sizing:border-box;border:3px solid var(--dhx-gantt-base-colors-primary);border-radius:6px;content:"";line-height:1px;display:block;position:absolute;margin-left:-11px;margin-top:-4px;pointer-events:none}.gantt_grid_dnd_marker_folder{height:100%;width:100%;position:absolute;pointer-events:none;box-sizing:border-box;box-shadow:0 0 0 2px var(--dhx-gantt-base-colors-primary) inset;background:transparent}.gantt_overlay_area{position:absolute;height:inherit;width:inherit;top:0;left:0;display:none}.gantt_overlay{position:absolute;left:0;top:0;height:inherit;width:inherit}.gantt_click_drag_rect{position:absolute;left:0;top:0;outline:1px solid var(--dhx-gantt-base-colors-primary);background-color:var(--dhx-gantt-base-colors-primary-lighter)}.gantt_timeline_move_available,.gantt_timeline_move_available *{cursor:move}.gantt_constraint_marker{position:absolute;pointer-events:none;--dhx-gantt-base-colors-icons: var(--dhx-gantt-base-colors-text-light)}.gantt_constraint_marker.gantt_constraint_marker_snlt,.gantt_constraint_marker.gantt_constraint_marker_fnlt,.gantt_constraint_marker.gantt_constraint_marker_mfo{transform:rotate(180deg)}.gantt_rtl .gantt_constraint_marker.gantt_constraint_marker_snlt,.gantt_rtl .gantt_constraint_marker.gantt_constraint_marker_fnlt,.gantt_rtl .gantt_constraint_marker.gantt_constraint_marker_mfo{transform:rotate(0)}.gantt_rtl .gantt_constraint_marker.gantt_constraint_marker_snet,.gantt_rtl .gantt_constraint_marker.gantt_constraint_marker_fnet,.gantt_rtl .gantt_constraint_marker.gantt_constraint_marker_mso{transform:rotate(180deg)}.gantt_rtl .gantt_grid{text-align:right}.gantt_rtl .gantt_row,.gantt_rtl .gantt_cell{flex-direction:row-reverse}.gantt_layout_content{width:100%;overflow:auto;box-sizing:border-box}.gantt_layout_cell{position:relative;box-sizing:border-box}.gantt_layout_cell>.gantt_layout_header{background:#33aae8;color:#fff;font-size:17px;padding:5px 10px;box-sizing:border-box}.gantt_layout_header.collapsed_x{background:#a9a9a9}.gantt_layout_header.collapsed_x .gantt_header_arrow:before{content:"⇧"}.gantt_layout_header.collapsed_y{background:#a9a9a9}.gantt_layout_header.collapsed_y .gantt_header_arrow:before{content:"⇩"}.gantt_layout_header{cursor:pointer}.gantt_layout_header .gantt_header_arrow{float:right;text-align:right}.gantt_layout_header .gantt_header_arrow:before{content:"⇦"}.gantt_layout_header.vertical .gantt_header_arrow:before{content:"⇧"}.gantt_layout_outer_scroll_vertical .gantt_layout_content{overflow-y:hidden}.gantt_layout_outer_scroll_horizontal .gantt_layout_content{overflow-x:hidden}.gantt_layout_x>.gantt_layout_cell{display:inline-block;vertical-align:top}.gantt_layout_x{white-space:nowrap}.gantt_resizing{opacity:.7;background:#f2f2f2}.gantt_layout_cell_border_right.gantt_resizer{overflow:visible;border-right:0}.gantt_resizer{cursor:e-resize;position:relative}.gantt_resizer_y{cursor:n-resize}.gantt_resizer_stick{background:#33aae8;z-index:9999;position:absolute;top:0;width:100%}.gantt_resizer_x .gantt_resizer_x{position:absolute;width:20px;height:100%;margin-left:-10px;top:0;left:0;z-index:1}.gantt_resizer_y .gantt_resizer_y{position:absolute;height:20px;width:100%;top:-10px;left:0;z-index:1}.gantt_resizer_error{background:#cd5c5c!important}.gantt_layout_cell_border_left{border-left:var(--dhx-gantt-default-border)}.gantt_layout_cell_border_right{border-right:var(--dhx-gantt-default-border)}.gantt_layout_cell_border_top{border-top:var(--dhx-gantt-default-border)}.gantt_layout_cell_border_bottom{border-bottom:var(--dhx-gantt-default-border)}.gantt_layout_cell_border_transparent{border-color:transparent}.gantt_window{position:absolute;top:50%;left:50%;z-index:999999999;background:#fff}.gantt_window_content{position:relative}.gantt_window_content_header{background:#39c;color:#fff;height:33px;padding:10px 10px 0;border-bottom:solid 2px #ffffff;position:relative}.gantt_window_content_header_text{padding-left:10%}.gantt_window_content_header_buttons{position:absolute;top:10px;right:10px}.gantt_window_content_header_buttons:hover{color:#000;cursor:pointer}.gantt_window_content_resizer{position:absolute;width:15px;height:15px;bottom:0;line-height:15px;right:-1px;text-align:center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABZJREFUeAFjIAUwUshlpJDLSIhLGAAACQ4AFk79JaMAAAAASUVORK5CYII=);cursor:nw-resize;z-index:999}.gantt_window_content_frame{position:absolute;top:0;left:0;width:100%;height:100%;background:#0000001a;z-index:9999}.gantt_window_drag{cursor:pointer!important}.gantt_window_resizing{overflow:visible}.gantt_window_resizing_body{overflow:hidden!important}.gantt_window_modal{background:#0000001a;z-index:9999;top:0;left:0;width:100%;height:100%;position:fixed}.gantt_container,.gantt_cal_light,.gantt_message_area,.gantt_modal_box,.gantt_cal_quick_info,.gantt_tooltip{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--dhx-gantt-font-family)}.gantt_container,.gantt_container *{box-sizing:border-box}.gantt_noselect{-webkit-user-select:none;user-select:none}.gantt_noselect .gantt_grid_data .gantt_row:hover,.gantt_noselect .gantt_grid_data .gantt_row.odd:hover{background-color:unset}.gantt_drag_marker{position:absolute;top:-1000px;left:-1000px;font-family:var(--dhx-gantt-font-family);font-size:var(--dhx-gantt-font-size);z-index:1;white-space:nowrap;background:var(--dhx-gantt-base-colors-select)}.gantt_drag_marker .gantt_tree_indent,.gantt_drag_marker .gantt_tree_icon.gantt_blank,.gantt_drag_marker .gantt_tree_icon.gantt_open,.gantt_drag_marker .gantt_tree_icon.gantt_close{display:none}.gantt_empty_state_wrapper{position:relative}.gantt_empty_state{height:100%;max-width:500px;box-sizing:border-box;white-space:pre-line;overflow-wrap:break-word;display:flex;flex-direction:column;justify-content:flex-start;margin:0 auto}.gantt_empty_state_image{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWYAAADjCAYAAAC2LL7JAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAACAASURBVHic7L15vGVFfS2+vrX3OXfqvj1BQzMLIoNEQdQXhSg4ECeCE63SAooEYhxinjGTL0mb/HjPl2cSE2MUVMQBIQ1PQEQRiTjE5BlxRhNnZGqg6bnvcM7Zu9bvj6rau/Z0hnvPvef27bP6c/vsoX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ysn77zlyuXtbtv5hI6YO+wq3P7pF+dXD8/t4VU9T2UxT2zmSyPzxDxPxuwBaNc/EyJioOksjDnLoDMF0Rmsrp7t9eXM+Tb0eadi1/8IO3QIEKHv/zvMnV5enGddzKvC7BFWvVJohsXMMPOMGOoZNjMk5+hAGYNSiFcUzLLALIPzBcLKUpnNLdJSsbS4sLh477dcvLSTp13aDeiIuUOHdeD2hyVfOHtiZqbsz5hsX08U96Rc7DH34GK3VQAAAIhJREFU2PSLTGnSZEiVRJlSpS4NFIEyAWkypSKts8ZJdUdAIH0SiCheI4EAao0UxBTS18qsmb70Res1DdMvYfqc5avLZbmaLa2snOkfXt6swUMdOnTo0KFDhw4dOnTo0KFDhw4dOnTo0KFDhw4dOnTo0KFDhw4dOnTo0KFDhw4dOnTo0OHcxv8HnRxVygJP8F8AAAAASUVORK5CYII=);background-repeat:no-repeat;width:100%;max-width:500px;max-height:500px;margin-left:auto;margin-right:auto;display:block;min-height:0;height:200px;background-size:contain;background-position-x:center;background-position-y:bottom;margin-top:40px}.gantt_empty_state_text{text-align:center}.gantt_empty_state_text_link{color:var(--dhx-gantt-base-colors-primary);background:none;opacity:1;height:unset;cursor:pointer}.gantt_drag_marker .gantt_row.odd{background-color:var(--dhx-gantt-base-colors-select)}.gantt_drag_marker .gantt_row{border-left:var(--dhx-gantt-scale-border-vertical);border-top:var(--dhx-gantt-scale-border-horizontal)}.gantt_drag_marker .gantt_cell{border-color:var(--dhx-gantt-base-colors-border)}.gantt_row.gantt_over,.gantt_task_row.gantt_over{background-color:var(--dhx-gantt-base-colors-primary-active)}.gantt_row.gantt_transparent .gantt_cell{opacity:.7}.gantt_task_row.gantt_transparent{background-color:#537cfa73}.gantt_container_resize_watcher{background:transparent;width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;pointer-events:none;border:0;box-sizing:border-box;opacity:0}.gantt_task_deadline{position:absolute;z-index:5;--dhx-gantt-base-colors-icons: var(--dhx-gantt-base-colors-error)}.gantt_task_deadline:before{font-family:dhx-gantt-icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;justify-content:center;align-items:center;color:var(--dhx-gantt-base-colors-icons);font-size:var(--dhx-gantt-icon-size, 1.5em)}.gantt_task_deadline:before{content:""}.gantt_task_baseline{position:absolute;border-radius:2px;opacity:.9;background:#ffd180;z-index:0;overflow:hidden}.gantt_task_baseline.gantt_milestone_baseline{transform:rotate(45deg)}.gantt_task_baseline.gantt_task_baseline_0{background:var(--dhx-gantt-baseline-background-0)}.gantt_task_baseline.gantt_task_baseline_1{background:var(--dhx-gantt-baseline-background-1)}.gantt_task_baseline.gantt_task_baseline_2{background:var(--dhx-gantt-baseline-background-2)}.gantt_task_baseline.gantt_task_baseline_3{background:var(--dhx-gantt-baseline-background-3)}.gantt_task_baseline.gantt_task_baseline_4{background:var(--dhx-gantt-baseline-background-4)}.gantt_task_baseline.gantt_task_baseline_5{background:var(--dhx-gantt-baseline-background-5)}.gantt_task_baseline.gantt_task_baseline_6{background:var(--dhx-gantt-baseline-background-6)}.gantt_task_baseline.gantt_task_baseline_7{background:var(--dhx-gantt-baseline-background-7)}.gantt_task_baseline.gantt_task_baseline_8{background:var(--dhx-gantt-baseline-background-8)}.gantt_task_baseline.gantt_task_baseline_9{background:var(--dhx-gantt-baseline-background-9)}.gantt_section_baselines{overflow-y:auto;display:flex;flex-direction:column;gap:4px}.gantt_custom_button.gantt_add_baselines{margin-left:0} diff --git a/codebase/dhtmlxgantt.d.ts b/codebase/dhtmlxgantt.d.ts index 4f4684d..8433dd4 100644 --- a/codebase/dhtmlxgantt.d.ts +++ b/codebase/dhtmlxgantt.d.ts @@ -1,66 +1,66 @@ -// Type definitions for dhtmlxGantt 8.0.11 +// Type definitions for dhtmlxGantt 9.0.0 // Project: https://dhtmlx.com/docs/products/dhtmlxGantt type GanttCallback = (...args: any[]) => any; -export interface GanttEventCallback { +export interface GanttEventCallback { /** * fires when autoscheduling is done * @param taskId the root task id * @param updatedTasks an array with the ids of rescheduled tasks */ - "onAfterAutoSchedule"(taskId: string | number, updatedTasks: any[]): void; + "onAfterAutoSchedule" (taskId: string|number, updatedTasks: any[]): void; /** * fires after the api/gantt_batchupdate.md method was called */ - "onAfterBatchUpdate"(): void; + "onAfterBatchUpdate" (): void; /** * if dynamic loading is enabled, fires after the task branch was loaded to the page * @param settings an object which contains the task id and request URL */ - "onAfterBranchLoading"(settings: any): void; + "onAfterBranchLoading" (settings: any): void; /** * fires after the user has closed the lightbox (edit form) */ - "onAfterLightbox"(): void; + "onAfterLightbox" (): void; /** * fires after a new link is added to the Gantt chart * @param id the link id * @param link the link object */ - "onAfterLinkAdd"(id: string | number, link: Link): void; + "onAfterLinkAdd" (id: string|number, link: Link): void; /** * fires after the user deletes a link * @param id the link id * @param link the link object */ - "onAfterLinkDelete"(id: string | number, link: Link): void; + "onAfterLinkDelete" (id: string|number, link: Link): void; /** * fires after the user updates a link * @param id the link id * @param link the link object */ - "onAfterLinkUpdate"(id: string | number, link: Link): void; + "onAfterLinkUpdate" (id: string|number, link: Link): void; /** * fires after the pop-up edit form is closed * @param taskId the task id */ - "onAfterQuickInfo"(taskId: string | number): void; + "onAfterQuickInfo" (taskId: string|number): void; /** * fires after the redo() method was called * @param action a user action as an array of command objects */ - "onAfterRedo"(action: any[]): void; + "onAfterRedo" (action: any[]): void; /** * fires after resizing of the row height is finished @@ -69,7 +69,7 @@ export interface GanttEventCallback { * @param oldHeight the old height of the row * @param newHeight the new height of the row */ - "onAfterRowResize"(id: string | number, task: Task, oldHeight: number, newHeight: number): void; + "onAfterRowResize" (id: string|number, task: Task, oldHeight: number, newHeight: number): void; /** * fires after tasks are sorted in the grid @@ -77,14 +77,14 @@ export interface GanttEventCallback { * @param desc optional, the sorting direction: true - descending, false - ascending
* @param parent optional, the id of the parent task, if the tasks were sorted only in the branch of the specified parent */ - "onAfterSort"(field: string | GanttCallback, desc?: boolean, parent?: string | number): void; + "onAfterSort" (field: string|GanttCallback, desc?: boolean, parent?: string|number): void; /** * fires after the user adds a task to the Gantt chart * @param id the task id * @param task the task object */ - "onAfterTaskAdd"(id: string | number, task: Task): void; + "onAfterTaskAdd" (id: string|number, task: Task): void; /** * fires for each task which has been autoscheduled @@ -93,14 +93,14 @@ export interface GanttEventCallback { * @param link the link object that creates the constraint * @param predecessor the predecessor task object */ - "onAfterTaskAutoSchedule"(task: Task, start: Date, link: Link, predecessor: Task): void; + "onAfterTaskAutoSchedule" (task: Task, start: Date, link: Link, predecessor: Task): void; /** * fires after the user deletes a task * @param id the task id * @param task the task object */ - "onAfterTaskDelete"(id: string | number, task: Task): void; + "onAfterTaskDelete" (id: string|number, task: Task): void; /** * fires after the user has finished to drag and released the mouse button @@ -108,7 +108,7 @@ export interface GanttEventCallback { * @param mode the drag-and-drop mode ("resize", "progress", "move", "ignore") * @param e a native event object */ - "onAfterTaskDrag"(id: string | number, mode: string, e: Event): void; + "onAfterTaskDrag" (id: string|number, mode: string, e: Event): void; /** * fires after a task was moved to a new vertical position @@ -116,131 +116,131 @@ export interface GanttEventCallback { * @param parent the parent id * @param tindex the index of the position in the parent branch that the task will be moved to */ - "onAfterTaskMove"(id: string | number, parent: string | number, tindex: number): void; + "onAfterTaskMove" (id: string|number, parent: string|number, tindex: number): void; /** * fires after the user updates a task * @param id the task id * @param task the task object */ - "onAfterTaskUpdate"(id: string | number, task: Task): void; + "onAfterTaskUpdate" (id: string|number, task: Task): void; /** * fires after the undo() method was called * @param action an array of command objects */ - "onAfterUndo"(action: any[]): void; + "onAfterUndo" (action: any[]): void; /** * fires if the server returns an error * @param request XML HTTP request object */ - "onAjaxError"(request: any): boolean; + "onAjaxError" (request: any): boolean; /** * fires if some dependency loops were found during auto scheduling * @param groups an array of dependency loops found in gantt */ - "onAutoScheduleCircularLink"(groups: any[]): void; + "onAutoScheduleCircularLink" (groups: any[]): void; /** * fires before auto scheduling * @param taskId the root task id */ - "onBeforeAutoSchedule"(taskId: string | number): boolean; + "onBeforeAutoSchedule" (taskId: string|number): boolean; /** * fires before the api/gantt_batchupdate.md method is called */ - "onBeforeBatchUpdate"(): void; + "onBeforeBatchUpdate" (): void; /** * if dynamic loading is enabled, fires after a user expands the task branch but before loading starts * @param settings an object which contains the task id and request URL */ - "onBeforeBranchLoading"(settings: any): boolean; + "onBeforeBranchLoading" (settings: any): boolean; /** * before gantt exits the fullscreen mode and goes back to normal mode */ - "onBeforeCollapse"(): boolean; + "onBeforeCollapse" (): boolean; /** * fires before data is rendered on the page */ - "onBeforeDataRender"(): void; + "onBeforeDataRender" (): void; /** * fires before gantt is expanded to full screen */ - "onBeforeExpand"(): boolean; + "onBeforeExpand" (): boolean; /** * fires before the dhtmlxGantt initialization is started */ - "onBeforeGanttReady"(): void; + "onBeforeGanttReady" (): void; /** * fires before the Gantt chart is rendered on the page */ - "onBeforeGanttRender"(): void; + "onBeforeGanttRender" (): void; /** * fires immediately before the user opens the lightbox (edit form) * @param id the task id */ - "onBeforeLightbox"(id: string | number): boolean; + "onBeforeLightbox" (id: string|number): boolean; /** * fires before a new link is added to the Gantt chart * @param id the link id * @param link the link object */ - "onBeforeLinkAdd"(id: string | number, link: Link): boolean; + "onBeforeLinkAdd" (id: string|number, link: Link): boolean; /** * fires before the user deletes a link * @param id the link id * @param link the link object */ - "onBeforeLinkDelete"(id: string | number, link: Link): boolean; + "onBeforeLinkDelete" (id: string|number, link: Link): boolean; /** * fires after the links have been loaded to the Gantt chart but before they are displayed * @param id the link id * @param link the link object */ - "onBeforeLinkDisplay"(id: string | number, link: Link): boolean; + "onBeforeLinkDisplay" (id: string|number, link: Link): boolean; /** * fires before a link is updated * @param id the link id * @param new_link the new (updated) object of the link */ - "onBeforeLinkUpdate"(id: string | number, new_link: Link): boolean; + "onBeforeLinkUpdate" (id: string|number, new_link: Link): boolean; /** * fires before selecting a task or a range of tasks * @param e a native event object */ - "onBeforeMultiSelect"(e: Event): void; + "onBeforeMultiSelect" (e: Event): void; /** * fires before data started to be parsed */ - "onBeforeParse"(): void; + "onBeforeParse" (): void; /** * fires before the redo() method is called * @param action a user action as an array of command objects */ - "onBeforeRedo"(action: any[]): boolean; + "onBeforeRedo" (action: any[]): boolean; /** * fires before an action is added into the redo stack * @param action a user action as an array of command objects */ - "onBeforeRedoStack"(action: UndoRedoAction): boolean; + "onBeforeRedoStack" (action: UndoRedoAction): boolean; /** * fires before the rollup task is displayed on its parent project @@ -248,7 +248,7 @@ export interface GanttEventCallback { * @param task the rollup task object * @param parentId the id of the parent (project) task */ - "onBeforeRollupTaskDisplay"(taskId: number | string, task: Task, parentId: number | string): boolean; + "onBeforeRollupTaskDisplay" (taskId: number|string, task: Task, parentId: number|string): boolean; /** * fires when a user drops a row in the grid @@ -256,7 +256,7 @@ export interface GanttEventCallback { * @param parent the parent id. If specified, the tindex will refer to the index in the
'parent' branch * @param tindex the index of the position that the task will be moved from
(the index in the whole tree) */ - "onBeforeRowDragEnd"(sid: string | number, parent: string | number, tindex: number): boolean; + "onBeforeRowDragEnd" (sid: string|number, parent: string|number, tindex: number): boolean; /** * fires before a row of the grid is dragged vertically to a different position @@ -264,13 +264,13 @@ export interface GanttEventCallback { * @param parent the parent id * @param tindex the index of the position in the parent branch that the task will be moved to */ - "onBeforeRowDragMove"(id: string | number, parent: string | number, tindex: number): boolean; + "onBeforeRowDragMove" (id: string|number, parent: string|number, tindex: number): boolean; /** * fires before the user starts to resize the row height by drag-and-drop * @param task the task object */ - "onBeforeRowResize"(task: Task): boolean; + "onBeforeRowResize" (task: Task): boolean; /** * fires before resizing of the row height is completed @@ -278,7 +278,7 @@ export interface GanttEventCallback { * @param task the task object * @param newHeight the new height of the row */ - "onBeforeRowResizeEnd"(id: number | string, task: Task, newHeight: number): boolean; + "onBeforeRowResizeEnd" (id: number|string, task: Task, newHeight: number): boolean; /** * fires before a part of the split task is displayed on the Gantt chart @@ -286,14 +286,14 @@ export interface GanttEventCallback { * @param task the object of the subtask * @param parent the object of the parent task */ - "onBeforeSplitTaskDisplay"(id: number | string, task: Task, parent: any): boolean; + "onBeforeSplitTaskDisplay" (id: number|string, task: Task, parent: any): boolean; /** * fires before a new task is added to the Gantt chart * @param id the task id * @param task the task object */ - "onBeforeTaskAdd"(id: string | number, task: Task): boolean; + "onBeforeTaskAdd" (id: string|number, task: Task): boolean; /** * fires for each task which is rescheduled @@ -302,7 +302,7 @@ export interface GanttEventCallback { * @param link the link object that creates the constraint * @param predecessor the predecessor task object */ - "onBeforeTaskAutoSchedule"(task: Task, start: Date, link: Link, predecessor: Task): boolean; + "onBeforeTaskAutoSchedule" (task: Task, start: Date, link: Link, predecessor: Task): boolean; /** * fires after the user has finished dragging and released the mouse button but before the changes are applied @@ -310,21 +310,21 @@ export interface GanttEventCallback { * @param mode the drag-and-drop mode ("resize", "progress", "move", "ignore") * @param task the copy of the task object in its original state (before drag and drop) */ - "onBeforeTaskChanged"(id: string | number, mode: string, task: Task): boolean; + "onBeforeTaskChanged" (id: string|number, mode: string, task: Task): boolean; /** * fires before the user deletes a task * @param id the task id * @param task the task object */ - "onBeforeTaskDelete"(id: string | number, task: Task): boolean; + "onBeforeTaskDelete" (id: string|number, task: Task): boolean; /** * fires after the tasks have been loaded to the Gantt chart, but before they are displayed * @param id the task id * @param task the task object */ - "onBeforeTaskDisplay"(id: string | number, task: Task): boolean; + "onBeforeTaskDisplay" (id: string|number, task: Task): boolean; /** * fires after the user has pressed the mouse button and started dragging, but before dhtmlxGantt starts the drag-and-drop operation @@ -332,7 +332,7 @@ export interface GanttEventCallback { * @param mode the drag-and-drop mode ("resize", "progress", "move", "ignore") * @param e a native event object */ - "onBeforeTaskDrag"(id: string | number, mode: string, e: Event): boolean; + "onBeforeTaskDrag" (id: string|number, mode: string, e: Event): boolean; /** * fires before a task is moved to a new vertical position @@ -340,7 +340,7 @@ export interface GanttEventCallback { * @param parent the parent id * @param tindex the index of the position in the parent branch that the task will be moved to */ - "onBeforeTaskMove"(id: string | number, parent: string | number, tindex: number): boolean; + "onBeforeTaskMove" (id: string|number, parent: string|number, tindex: number): boolean; /** * fires before the task selection state is being changed (the task is being selected or unselected) @@ -348,49 +348,49 @@ export interface GanttEventCallback { * @param state true if the task is going to be selected, false - if unselected * @param e a native event object */ - "onBeforeTaskMultiSelect"(id: string | number, state: boolean, e: Event | null): void; + "onBeforeTaskMultiSelect" (id: string|number, state: boolean, e: Event|null): void; /** * fires before the user selects a task * @param id the task id */ - "onBeforeTaskSelected"(id: string | number): boolean; + "onBeforeTaskSelected" (id: string|number): boolean; /** * fires before the user updates a task * @param id the task id * @param new_task the new (updated) object of the task */ - "onBeforeTaskUpdate"(id: string | number, new_task: Task): void; + "onBeforeTaskUpdate" (id: string|number, new_task: Task): void; /** * fires before the undo() method is called * @param action an array of command objects */ - "onBeforeUndo"(action: any[]): boolean; + "onBeforeUndo" (action: any[]): boolean; /** * fires before an action is added into the undo stack * @param action a user action as an array of command objects */ - "onBeforeUndoStack"(action: UndoRedoAction): boolean; + "onBeforeUndoStack" (action: UndoRedoAction): boolean; /** * fires when the circular reference has been detected and auto scheduling is not possible * @param link the link object * @param group a group of tasks and links connected in a loop */ - "onCircularLinkError"(link: Link, group: any): void; + "onCircularLinkError" (link: Link, group: any): void; /** * fires after all tasks were removed from the Gantt chart by the api/gantt_clearall.md method */ - "onClear"(): void; + "onClear" (): void; /** * fires when gantt went back to normal mode from the full screen mode */ - "onCollapse"(): void; + "onCollapse" (): void; /** * fires when the user is dragging the column's border to resize the column @@ -398,7 +398,7 @@ export interface GanttEventCallback { * @param column the column object * @param new_width the new column's width */ - "onColumnResize"(index: number, column: GridColumn, new_width: number): void; + "onColumnResize" (index: number, column: GridColumn, new_width: number): void; /** * fires after the user finished dragging the column's border to resize the column @@ -406,14 +406,14 @@ export interface GanttEventCallback { * @param column the column object * @param new_width the new column's width */ - "onColumnResizeEnd"(index: number, column: GridColumn, new_width: number): boolean; + "onColumnResizeEnd" (index: number, column: GridColumn, new_width: number): boolean; /** * fires before the user starts to drag the column's border to resize the column * @param index the column index * @param column the column object */ - "onColumnResizeStart"(index: number, column: GridColumn): boolean; + "onColumnResizeStart" (index: number, column: GridColumn): boolean; /** * fires when a user clicks the right mouse button inside the Gantt chart (see the details) @@ -421,95 +421,95 @@ export interface GanttEventCallback { * @param linkId the link id * @param e a native event object */ - "onContextMenu"(taskId: string | number, linkId: string | number, e: Event): void; + "onContextMenu" (taskId: string|number, linkId: string|number, e: Event): void; /** * fires on the `dp.init(gantt)` call * @param DataProcessor the DataProcessor object */ - "onDataProcessorReady"(DataProcessor: any): void; + "onDataProcessorReady" (DataProcessor: any): void; /** * fires after data has been rendered on the page */ - "onDataRender"(): void; + "onDataRender" (): void; /** * called after gantt has been cleared by the api/gantt_destructor.md method */ - "onDestroy"(): void; + "onDestroy" (): void; /** * fires when the user clicks on an empty space in the Gantt chart (not on tasks) * @param e a native event object */ - "onEmptyClick"(e: Event): void; + "onEmptyClick" (e: Event): void; /** * fires when api/gantt_assert.md receives 'false' value, i.e. when assertion fails * @param errorMessage a string with an error from the api/gantt_assert.md method */ - "onError"(errorMessage: string): boolean; + "onError" (errorMessage: string): boolean; /** * fires when gantt is expanded to full screen */ - "onExpand"(): void; + "onExpand" (): void; /** * fires after the Gantt layout is ready, but before it is rendered */ - "onGanttLayoutReady"(): void; + "onGanttLayoutReady" (): void; /** * fires after the dhtmlxGantt initialization is complete but the Gantt chart is not rendered on the page yet */ - "onGanttReady"(): void; + "onGanttReady" (): void; /** * fires after the Gantt chart was rendered on the page */ - "onGanttRender"(): void; + "onGanttRender" (): void; /** * fires when the Gantt chart is scrolled to a particular point * @param left the position of horizontal scroll * @param top the position of vertical scroll */ - "onGanttScroll"(left: number, top: number): void; + "onGanttScroll" (left: number, top: number): void; /** * fires when the user clicks on the grid's header * @param name the name attribute of the column which header the user clicks on * @param e a native event object */ - "onGridHeaderClick"(name: string, e: Event): boolean; + "onGridHeaderClick" (name: string, e: Event): boolean; /** * fires when the user is dragging the grid's border to resize the grid * @param old_width the initial grid's width * @param new_width the new grid's width */ - "onGridResize"(old_width: number, new_width: number): void; + "onGridResize" (old_width: number, new_width: number): void; /** * fires after the user finished dragging the grid's border to resize the grid * @param old_width the initial grid's width * @param new_width the new grid's width */ - "onGridResizeEnd"(old_width: number, new_width: number): boolean; + "onGridResizeEnd" (old_width: number, new_width: number): boolean; /** * fires before the user starts to drag the grid's border to resize the grid * @param old_width the initial grid's width */ - "onGridResizeStart"(old_width: number): boolean; + "onGridResizeStart" (old_width: number): boolean; /** * fires after the user has opened the lightbox (edit form) * @param task_id the id of the task opened in the lightbox */ - "onLightbox"(task_id: string | number): void; + "onLightbox" (task_id: string|number): void; /** * fires when the user clicks on a custom button in the lightbox @@ -517,26 +517,26 @@ export interface GanttEventCallback { * @param node an HTML element of the clicked button * @param e a native 'click' event object */ - "onLightboxButton"(css: string, node: HTMLElement, e: Event): void; + "onLightboxButton" (css: string, node: HTMLElement, e: Event): void; /** * fires when the user clicks on the 'Cancel' button in the lightbox * @param id the task id ( the task opened in the lightbox) */ - "onLightboxCancel"(id: string | number): void; + "onLightboxCancel" (id: string|number): void; /** * fires when the structure of the lightbox is changed * @param old_type the name of the initial lighbox's structure * @param new_type the name of the new lighbox's structure */ - "onLightboxChange"(old_type: string, new_type: string): void; + "onLightboxChange" (old_type: string, new_type: string): void; /** * fires when the user clicks on the 'Delete' button in the lightbox * @param id the task id (the task opened in the lightbox) */ - "onLightboxDelete"(id: string | number): boolean; + "onLightboxDelete" (id: string|number): boolean; /** * fires when the user clicks on the 'Save' button in the lightbox @@ -544,90 +544,90 @@ export interface GanttEventCallback { * @param task the modified task object * @param is_new specifies whether the user opens the lightbox to create a new task (true)
or update an existing one (false) */ - "onLightboxSave"(id: string | number, task: Task, is_new: boolean): boolean; + "onLightboxSave" (id: string|number, task: Task, is_new: boolean): boolean; /** * fires when the user clicks on a link * @param id the id of the clicked link * @param e optional, a native event object */ - "onLinkClick"(id: string | number, e?: Event): void; + "onLinkClick" (id: string|number, e?: Event): void; /** * fires when a user creates a new link between tasks * @param link the object of a new link */ - "onLinkCreated"(link: Link): boolean; + "onLinkCreated" (link: Link): boolean; /** * fires when the user double clicks on a link * @param id the id of the clicked link * @param e optional, a native event object */ - "onLinkDblClick"(id: string | number, e?: Event): boolean; + "onLinkDblClick" (id: string|number, e?: Event): boolean; /** * fires when the id of a link is changed * @param id the current link id * @param new_id the new link id */ - "onLinkIdChange"(id: string | number, new_id: string | number): void; + "onLinkIdChange" (id: string|number, new_id: string|number): void; /** * fires when the user adds a new link and dhtmlxGantt checks whether the link is valid * @param link the link object */ - "onLinkValidation"(link: Link): boolean; + "onLinkValidation" (link: Link): boolean; /** * fires after loading data from the data source has been completed * @param url the server-side url (may be a static file or a server side script that outputs data) * @param type ('json', 'xml', 'oldxml') the data type */ - "onLoadEnd"(url: string, type: string): void; + "onLoadEnd" (url: string, type: string): void; /** * fires immediately before loading data from the data source has been started * @param url the server-side url (may be a static file or a server side script that outputs data) * @param type ('json', 'xml', 'oldxml') the data type */ - "onLoadStart"(url: string, type: string): void; + "onLoadStart" (url: string, type: string): void; /** * fires when the mouse is moved over the gantt container * @param id the id of the task that the mouse is moved over * @param e a native event object */ - "onMouseMove"(id: string | number, e: Event): void; + "onMouseMove" (id: string|number, e: Event): void; /** * fires after selection of a task or a range of tasks has been completed * @param e a native event object */ - "onMultiSelect"(e: Event): void; + "onMultiSelect" (e: Event): void; /** * fires after a collection of options has been loaded from the server, but isn't parsed yet */ - "onOptionsLoad"(): void; + "onOptionsLoad" (): void; /** * fires after data was parsed (became available for API) but before it was rendered in the Gantt chart */ - "onParse"(): void; + "onParse" (): void; /** * fires when the pop-up edit form appears * @param taskId the task id */ - "onQuickInfo"(taskId: string | number): void; + "onQuickInfo" (taskId: string|number): void; /** * fires after the user drops a vertically reordered row in the grid * @param id the id of the task that the user has dragged vertically in the grid * @param target the id of the task which place the dragged row has occupied */ - "onRowDragEnd"(id: string | number, target: string | number): void; + "onRowDragEnd" (id: string|number, target: string|number): void; /** * fires before the user drags a row of the grid to vertically reorder it @@ -635,7 +635,7 @@ export interface GanttEventCallback { * @param target an HTML element of the task that the user drags * @param e a native event object */ - "onRowDragStart"(id: string | number, target: HTMLElement, e: Event): boolean; + "onRowDragStart" (id: string|number, target: HTMLElement, e: Event): boolean; /** * fires when the user is dragging the border of the row to resize the row height @@ -643,45 +643,45 @@ export interface GanttEventCallback { * @param task the task object * @param currentHeight the current height of the row */ - "onRowResize"(id: string | number, task: Task, currentHeight: number): void; + "onRowResize" (id: string|number, task: Task, currentHeight: number): void; /** * fires when the scale is re-rendered in order to display all tasks completely */ - "onScaleAdjusted"(): void; + "onScaleAdjusted" (): void; /** * fires when the user clicks on the cell in the time scale * @param e a native event object * @param date the date of the clicked cell */ - "onScaleClick"(e: Event, date: Date): void; + "onScaleClick" (e: Event, date: Date): void; /** * fires when the user clicks on a task row in the grid area (including the 'expand/collapse' and 'add task' buttons) or on a task bar in the timeline area * @param id the id of the clicked task * @param e optional, a native event object */ - "onTaskClick"(id: string | number, e?: Event): boolean; + "onTaskClick" (id: string|number, e?: Event): boolean; /** * fires when a branch has been closed * @param id the branch id */ - "onTaskClosed"(id: string | number): void; + "onTaskClosed" (id: string|number): void; /** * fires when a user creates a new task by pressing the'+' button in a grid, or when the api/gantt_createtask.md method is called * @param task the object of a new task */ - "onTaskCreated"(task: Task): boolean; + "onTaskCreated" (task: Task): boolean; /** * fires when the user double clicks on a task * @param id the id of the double clicked task * @param e a native event object */ - "onTaskDblClick"(id: string, e?: Event): boolean; + "onTaskDblClick" (id: string, e?: Event): boolean; /** * fires when the user drags a task @@ -691,20 +691,20 @@ export interface GanttEventCallback { * @param original the original(initial) task object * @param e a native event object */ - "onTaskDrag"(id: string | number, mode: string, task: Task, original: Task, e: Event): void; + "onTaskDrag" (id: string|number, mode: string, task: Task, original: Task, e: Event): void; /** * fires when the id of a task is changed * @param id the current task's id * @param new_id the new task's id */ - "onTaskIdChange"(id: string | number, new_id: string | number): void; + "onTaskIdChange" (id: string|number, new_id: string|number): void; /** * fires when a task is being loaded from the data source * @param task the object of a task */ - "onTaskLoading"(task: Task): boolean; + "onTaskLoading" (task: Task): boolean; /** * fires after the task selection state has changed (the task has been selected/unselected) @@ -712,41 +712,46 @@ export interface GanttEventCallback { * @param state true if the task has been selected, false - if unselected * @param e a native event object */ - "onTaskMultiSelect"(id: string | number, state: boolean, e: Event): void; + "onTaskMultiSelect" (id: string|number, state: boolean, e: Event): void; /** * fires when a branch has been opened * @param id the branch id */ - "onTaskOpened"(id: string | number): void; + "onTaskOpened" (id: string|number): void; /** * fires when the user clicks on a row in the table * @param id the task id * @param row an HTML element of the clicked row */ - "onTaskRowClick"(id: string | number, row: HTMLElement): void; + "onTaskRowClick" (id: string|number, row: HTMLElement): void; /** * fires when the user selects a task * @param id the task id */ - "onTaskSelected"(id: string | number): void; + "onTaskSelected" (id: string|number): void; /** * fires when the user unselects a task by selecting some other task * @param id the task id (of the unselected task) */ - "onTaskUnselected"(id: string | number): void; + "onTaskUnselected" (id: string|number): void; /** * fires when the dhtmlxGantt templates are initialized */ - "onTemplatesReady"(): void; + "onTemplatesReady" (): void; } -export interface GanttTemplates { +export interface GanttTemplates { + + /** + * specifies the text displayed inside the baseline element + */ + baseline_text(): void; /** * specifies the content of columns that show dates (return `Date` values) in grid @@ -763,7 +768,7 @@ export interface GanttTemplates { * @param to the id of the target task( 'null' or 'undefined', if the target task isn't specified yet) * @param to_start true, if the link is being dragged to the start of the target task, false - if
to the end of the task */ - drag_link(from: string | number, from_start: boolean, to: string | number, to_start: boolean): string; + drag_link(from: string|number, from_start: boolean, to: string|number, to_start: boolean): string; /** * specifies the CSS class that will be applied to the pop-up that appears when a user drags a link @@ -772,7 +777,7 @@ export interface GanttTemplates { * @param to the id of the target task( 'null' or 'undefined', if the target task isn't specified yet) * @param to_start true, if the link is being dragged to the start of the target task, false - if
to the end of the task */ - drag_link_class(from: string | number, from_start: boolean, to: string | number, to_start: boolean): string; + drag_link_class(from: string|number, from_start: boolean, to: string|number, to_start: boolean): string; /** * converts a date object to a date string. Used to send data back to the server @@ -840,7 +845,7 @@ export interface GanttTemplates { * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell * @param assignments resource assignments that are assigned to the specified start/end dates of the task */ - histogram_cell_allocated(start_date: Date, end_date: Date, resource: any, tasks: Array, assignments: any[]): void; + histogram_cell_allocated(start_date: Date, end_date: Date, resource: any, tasks: Array , assignments: any[]): void; /** * specifies the height of the line that defines the available capacity of the resource @@ -850,7 +855,7 @@ export interface GanttTemplates { * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell * @param assignments resource assignments that are assigned to the specified start/end dates of the task */ - histogram_cell_capacity(start_date: Date, end_date: Date, resource: any, tasks: Array, assignments: any[]): void; + histogram_cell_capacity(start_date: Date, end_date: Date, resource: any, tasks: Array , assignments: any[]): void; /** * defines the CSS class which is applied to a cell of the resource panel @@ -860,7 +865,7 @@ export interface GanttTemplates { * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell * @param assignments resource assignments that are assigned to the specified start/end dates of the task */ - histogram_cell_class(start_date: Date, end_date: Date, resource: any, tasks: Array, assignments: any[]): void; + histogram_cell_class(start_date: Date, end_date: Date, resource: any, tasks: Array , assignments: any[]): void; /** * defines the label inside a cell @@ -870,7 +875,7 @@ export interface GanttTemplates { * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell * @param assignments resource assignments that are assigned to the specified start/end dates of the task */ - histogram_cell_label(start_date: Date, end_date: Date, resource: any, tasks: Array, assignments: any[]): void; + histogram_cell_label(start_date: Date, end_date: Date, resource: any, tasks: Array , assignments: any[]): void; /** * specifies the CSS class that will be applied to a link @@ -938,7 +943,7 @@ export interface GanttTemplates { * @param tasks tasks that are assigned to specified resource and overlap start/end dates of the cell * @param assignments resource assignments that are assigned to the specified start/end dates of the task */ - resource_cell_class(start_date: Date, end_date: Date, resource: any, tasks: Array, assignments: any[]): string; + resource_cell_class(start_date: Date, end_date: Date, resource: any, tasks: Array , assignments: any[]): string; /** * defines the HTML content of resource timeline cells @@ -948,7 +953,7 @@ export interface GanttTemplates { * @param tasks tasks that are assigned to specified resource and overlap start/end dates of the cell * @param assignments resource assignments that are assigned to the specified start/end dates of the task */ - resource_cell_value(start_date: Date, end_date: Date, resource: any, tasks: Array, assignments: any[]): string; + resource_cell_value(start_date: Date, end_date: Date, resource: any, tasks: Array , assignments: any[]): string; /** * specifies the CSS class that will be applied to cells of the time scale of the timeline area @@ -1070,21 +1075,15 @@ export interface GanttTemplates { */ lightbox_header(start_date: Date, end_date: Date, task: Task): string; - /** - * specifies the CSS class that will be applied to markers - * @param marker the marker's configuration object - */ - marker_class(marker: any): void; - [customTemplate: string]: any; } -export interface GanttConfigOptions { +export interface GanttConfigOptions { /** * enables auto scheduling */ - auto_scheduling: boolean; + auto_scheduling: any; /** * disables usage of time contraints for tasks @@ -1144,7 +1143,7 @@ export interface GanttConfigOptions { /** * forces the Gantt chart to automatically change its size to show all tasks without scrolling */ - autosize: boolean | string; + autosize: boolean|string; /** * sets the minimum width (in pixels) that the Gantt chart can take in the horizontal 'autosize' mode @@ -1154,7 +1153,17 @@ export interface GanttConfigOptions { /** * sets the height of task bars in the timeline area */ - bar_height: number | string; + bar_height: number|string; + + /** + * adjusts the padding around task bars in the timeline when `bar_height` is set to "full" + */ + bar_height_padding: number; + + /** + * configures the functionality of baselines in the Gantt chart + */ + baselines: any; /** * enables dynamic loading in the Gantt chart @@ -1189,7 +1198,7 @@ export interface GanttConfigOptions { /** * enables advanced drag-n-drop */ - click_drag: undefined | ClickDrag; + click_drag: undefined|ClickDrag; /** * configures the columns of the table @@ -1221,7 +1230,7 @@ export interface GanttConfigOptions { /** * defines whether the gantt should track resizing of the container at time intervals */ - container_resize_method: string | undefined; + container_resize_method: string|undefined; /** * specifies the delay (in milliseconds) before redrawing the gantt when resizing the container @@ -1236,7 +1245,7 @@ export interface GanttConfigOptions { /** * defines internal implementation of the code of date formatting methods */ - csp: boolean | string; + csp: boolean|string; /** * sets the date format that is used to parse data from a data set and to send dates back to the server @@ -1248,6 +1257,11 @@ export interface GanttConfigOptions { */ date_grid: string; + /** + * enables or disables the display of deadline elements for tasks + */ + deadlines: boolean; + /** * defines whether gantt will perform a deep copy of data objects passed into the gantt.parse() method */ @@ -1314,12 +1328,14 @@ export interface GanttConfigOptions { /** * configures the behavior of the drag_timeline extension - * @param CSS selector. Scrolling the timeline won't be activated for the elements that match the selector. - * @param if the property is specified, scrolling the timeline will be activated only when the specified modifier key is pressed. The supported values are: "ctrlKey", "shiftKey", "metaKey", "altKey". + * @param CSS selector. Scrolling the timeline won't be activated for the elements that match the selector + * @param if the property is specified, scrolling the timeline will be activated only when the specified modifier key is pressed. The supported values are: "ctrlKey", "shiftKey", "metaKey", "altKey" + * @param if the property is enabled, scrolling the timeline will be rerendered when the scroll is started and when it is ended */ - drag_timeline: null | { + drag_timeline: null | { ignore?: string, - useKey?: string | boolean + useKey?: string | boolean, + render?: boolean } /** @@ -1365,7 +1381,7 @@ export interface GanttConfigOptions { /** * sets the end value of the time scale */ - end_date: Date | undefined; + end_date: Date|undefined; /** * renders an external component into the DOM @@ -1374,8 +1390,8 @@ export interface GanttConfigOptions { * @param a DOM element the native component will be attached to. */ external_render: { - isElement(element: any): boolean, - renderElement(element: any, container: HTMLElement): void + isElement ( element: any ): boolean, + renderElement ( element: any, container: HTMLElement ): void } /** @@ -1383,10 +1399,44 @@ export interface GanttConfigOptions { */ fit_tasks: boolean; + /** + * an object of the lightbox controls + * @param the [Checkbox](desktop/checkbox.md) control + * @param the [Constraint](desktop/constraint.md) control + * @param the [Duration](desktop/duration.md) control + * @param the [Duration](desktop/duration.md) control that allows changing the [section visibility](desktop/duration.md#switchingsectionvisibility) + * @param the [Parent](desktop/parent.md) control + * @param the [Radio button](desktop/radio.md) control + * @param the [Resources](desktop/resources.md) control + * @param the [Select](desktop/select.md) control + * @param the [Template](desktop/template.md) control + * @param the [Textarea](desktop/textarea.md) control + * @param the [Time](desktop/time.md) control + * @param the [Time](desktop/time.md) control that allows changing the [section visibility](desktop/time.md#switchingsectionvisibility) + * @param the [Typeselect](desktop/typeselect.md) control + * @param a custom control + */ + form_blocks: { + checkbox?: LightboxControl, + constraint?: LightboxControl, + duration?: LightboxControl, + duration_optional?: LightboxControl, + parent?: LightboxControl, + radio?: LightboxControl, + resources?: LightboxControl, + select?: LightboxControl, + template?: LightboxControl, + textarea?: LightboxControl, + time?: LightboxControl, + time_optional?: LightboxControl, + typeselect?: LightboxControl, + [ControlName: string]: LightboxControl | undefined + } + /** * adjusts the width of columns inside a scrollable grid */ - grid_elastic_columns: boolean | string; + grid_elastic_columns: boolean|string; /** * sets the name of the attribute of the column resizer's DOM element. The attribute presents the column's index @@ -1406,7 +1456,7 @@ export interface GanttConfigOptions { /** * enables/disables horizontal scroll by the Shift|Alt|Meta key + mouse wheel movement */ - horizontal_scroll_key: string | boolean; + horizontal_scroll_key: string|boolean; /** * defines whether tasks should inherit work calendars from their summary parents @@ -1426,12 +1476,12 @@ export interface GanttConfigOptions { /** * keeps the duration of a task unchanged during editing of the start/end of a task */ - inline_editors_date_processing: string | undefined; + inline_editors_date_processing: string|undefined; /** * defines whether inline editor should be opened after one click on a task when multi-task selection is enabled */ - inline_editors_multiselect_open: boolean | undefined; + inline_editors_multiselect_open: boolean|undefined; /** * 'says' to preserve the initial grid's width while resizing columns within @@ -1483,6 +1533,11 @@ export interface GanttConfigOptions { */ link_line_width: number; + /** + * sets the radius for rounding corners of link lines in the timeline + */ + link_radius: number; + /** * sets the width of the area (over the link) sensitive to clicks */ @@ -1545,7 +1600,7 @@ export interface GanttConfigOptions { /** * activates the 'branch' mode that allows vertically reordering tasks within the same tree level */ - order_branch: string | boolean; + order_branch: string|boolean; /** * activates the 'branch' mode that allows reordering tasks within the whole gantt @@ -1570,12 +1625,12 @@ export interface GanttConfigOptions { /** * specifies the end date of a project */ - project_end: Date | undefined; + project_end: Date|undefined; /** * specifies the start date of a project */ - project_start: Date | undefined; + project_start: Date|undefined; /** * defines whether the task form will appear from the left/right side of the screen or near the selected task @@ -1627,7 +1682,7 @@ export interface GanttConfigOptions { * @param mapping of the resource calendar */ resource_calendars: { - [resourceId: string | number]: string | number | { [resourceId: string | number]: string | number | undefined } | undefined + [resourceId: string | number]: string | number | {[resourceId: string | number]: string | number | undefined } | undefined } /** @@ -1657,24 +1712,24 @@ export interface GanttConfigOptions { * @param optional, enables showing all tasks assigned to a certain resource in the resource view panel. This functionality works both for the resource diagram and resource histogram types of layout. * @param an array with resources */ - resources: boolean | { + resources: boolean | { dataprocessor_assignments?: boolean, dataprocessor_resources?: boolean, editable_resource_diagram?: boolean, - resource_store?: { + resource_store?: { type?: string, initItem?: (( item: any, - ) => any), + )=> any ), fetchTasks?: boolean }, - lightbox_resources?(resourceArray: any): any + lightbox_resources? ( resourceArray: any ): any } /** * sets the id of the virtual root element */ - root_id: string | number; + root_id: string|number; /** * enables rounding the task's start and end dates to the nearest scale marks @@ -1809,7 +1864,7 @@ export interface GanttConfigOptions { /** * sets the start value of the time scale */ - start_date: Date | undefined; + start_date: Date|undefined; /** * sets the starting day of the week @@ -1884,12 +1939,12 @@ export interface GanttConfigOptions { /** * enables/disables the touch support for the Gantt chart */ - touch: boolean | string; + touch: boolean|string; /** * defines the time period in milliseconds that is used to differ the long touch gesture from the scroll gesture */ - touch_drag: number | boolean; + touch_drag: number|boolean; /** * returns vibration feedback before/after drag and drop on touch devices @@ -1966,7 +2021,7 @@ export interface GanttConfigOptions { * @param the horizontal speed * @param the vertical speed */ - wheel_scroll_sensitivity: undefined | number | { + wheel_scroll_sensitivity: undefined | number | { x?: number, y?: number } @@ -1984,7 +2039,7 @@ export interface GanttConfigOptions { [customConfig: string]: any; } -export interface GanttHotkeys { +export interface GanttHotkeys { edit_save: number; edit_cancel: number; } @@ -2082,7 +2137,7 @@ export interface GanttPlugins { } export interface GanttInitializationConfig { - container?: string | HTMLElement; + container?: string|HTMLElement; config?: any; templates?: any; events?: any; @@ -2100,11 +2155,11 @@ export type GanttPlugin = (gantt: GanttStatic) => void; export interface GanttEnterprise { plugin(plugin: GanttPlugin): void; - getGanttInstance(settings?: GanttInitializationConfig): GanttStatic; + getGanttInstance(settings?: GanttInitializationConfig) : GanttStatic; } -export interface GanttStatic { +export interface GanttStatic { /** * redefines the default click behavior for buttons of the Gantt chart @@ -2243,7 +2298,7 @@ export interface GanttStatic { /** * various helper modules */ - utils: { dom: DomHelpers }; + utils: {dom: DomHelpers}; /** * returns the version of dhtmlxGantt @@ -2301,19 +2356,19 @@ export interface GanttStatic { * adds a new dependency link * @param link the link object */ - addLink(link: any): string | number; + addLink(link: any): string|number; /** * displays an additional layer with custom elements for a link in the timeline area * @param func a render function or a config object */ - addLinkLayer(func: AdditionalLinkLayer["LinkLayerRender"] | AdditionalLinkLayer["LinkLayerConfig"]): string; + addLinkLayer(func: AdditionalLinkLayer["LinkLayerRender"]|AdditionalLinkLayer["LinkLayerConfig"]): string; /** * adds a marker to the timeline area * @param marker the marker's configuration object */ - addMarker(marker: MarkerConfig): number | string; + addMarker(marker: MarkerConfig): number|string; /** * adds a new keyboard shortcut @@ -2329,19 +2384,24 @@ export interface GanttStatic { * @param parent optional, the parent's id * @param index optional, the position the task will be added into (0 or greater) */ - addTask(task: NewTask, parent?: string | number, index?: number): string | number; + addTask(task: NewTask, parent?: string|number, index?: number): string|number; /** * displays an additional layer with custom elements for a task in the timeline area * @param func a render function or a config object */ - addTaskLayer(func: AdditionalTaskLayer["TaskLayerRender"] | AdditionalTaskLayer["TaskLayerConfig"]): string; + addTaskLayer(func: AdditionalTaskLayer["TaskLayerRender"]|AdditionalTaskLayer["TaskLayerConfig"]): string; + + /** + * adjusts the task's row height for proper display of baseline elements + */ + adjustTaskHeightForBaselines(): void; /** * calls an alert message box * @param config either an object with the alert box's configuration or the text to show */ - alert(config: AlertBoxConfig | string | number): HTMLElement; + alert(config: AlertBoxConfig|string|number): HTMLElement; /** * if the specified expression is false, an errorMessage is shown in the red popup at the top right corner of the screen @@ -2356,12 +2416,12 @@ export interface GanttStatic { * @param handler the handler function * @param settings optional, an object with settings for the event handler */ - attachEvent(event: T, handler: GanttEventCallback[T], settings?: HandlerSettings): string + attachEvent (event: T, handler: GanttEventCallback[T], settings?: HandlerSettings): string /** * recalculates the schedule of the project * @param taskId optional, the task id */ - autoSchedule(taskId?: string | number): void; + autoSchedule(taskId?: string|number): void; /** * updates multiple tasks/links at once @@ -2415,14 +2475,14 @@ export interface GanttStatic { * @param id the current link's id * @param new_id the new link's id */ - changeLinkId(id: string | number, new_id: string | number): void; + changeLinkId(id: string|number, new_id: string|number): void; /** * changes the task's id * @param id the current task's id * @param new_id the new task's id */ - changeTaskId(id: string | number, new_id: string | number): void; + changeTaskId(id: string|number, new_id: string|number): void; /** * checks whether an event has some handler(s) specified @@ -2449,7 +2509,7 @@ export interface GanttStatic { * closes the branch with the specified id * @param id the branch id */ - close(id: string | number): void; + close(id: string|number): void; /** * collapses gantt from the full screen mode to the normal mode @@ -2466,7 +2526,7 @@ export interface GanttStatic { * calls a confirm message box * @param config either an object with the confirm box's configuration or the text to show */ - confirm(config: ConfirmBoxConfig | string | number): HTMLElement; + confirm(config: ConfirmBoxConfig|string|number): HTMLElement; /** * creates a deep copy of provided object @@ -2490,7 +2550,7 @@ export interface GanttStatic { * creates a new dataProcessor instance and attaches it to gantt * @param config dataProcessor configuration object */ - createDataProcessor(config: DataProcessorConfig | RouterFunction | RouterConfig): any; + createDataProcessor(config: DataProcessorConfig|RouterFunction|RouterConfig): any; /** * creates a datastore according to the provided configuration @@ -2504,7 +2564,7 @@ export interface GanttStatic { * @param parent optional, the parent's id * @param index optional, the position the task will be added into (0 or greater) */ - createTask(task?: NewTask, parent?: string | number, index?: number): string | number; + createTask(task?: NewTask, parent?: string|number, index?: number): string|number; /** * dataProcessor constructor @@ -2528,25 +2588,25 @@ export interface GanttStatic { * deletes a task calendar by its id * @param id the id of the calendar */ - deleteCalendar(id: string | number): void; + deleteCalendar(id: string|number): void; /** * deletes the specified dependency link * @param id the dependency link's id */ - deleteLink(id: string | number): void; + deleteLink(id: string|number): void; /** * deletes the specified marker * @param markerId the marker's id */ - deleteMarker(markerId: string | number): void; + deleteMarker(markerId: string|number): void; /** * deletes the specified task * @param id the task's id */ - deleteTask(id: string | number): void; + deleteTask(id: string|number): void; /** * destroys the gantt instance @@ -2565,7 +2625,7 @@ export interface GanttStatic { * @param startTask the id of the item the parent tasks of which should be iterated over * @param master the object, that 'this' will refer to */ - eachParent(code: GanttCallback, startTask: string | number, master?: any): void; + eachParent(code: GanttCallback, startTask: string|number, master?: any): void; /** * iterates over all selected tasks in the Gantt chart @@ -2579,7 +2639,7 @@ export interface GanttStatic { * @param parent the parent id. If specified, the function will iterate over children of the
specified parent * @param master the object, that 'this' will refer to */ - eachTask(code: GanttCallback, parent?: string | number, master?: any): void; + eachTask(code: GanttCallback, parent?: string|number, master?: any): void; /** * attaches an event handler to an HTML element @@ -2588,7 +2648,7 @@ export interface GanttStatic { * @param handler the event handler * @param options optional, the value of either the useCapture or options parameter. Read details */ - event(node: HTMLElement | string, event: string, handler: GanttCallback, options?: boolean | HandlerSettings): void; + event(node: HTMLElement|string, event: string, handler: GanttCallback, options?: boolean|HandlerSettings): void; /** * removes an event handler from an HTML element @@ -2597,7 +2657,7 @@ export interface GanttStatic { * @param handler the event handler * @param options optional, the value of either the useCapture or options parameter. Read details */ - eventRemove(node: HTMLElement | string, event: string, handler: GanttCallback, options?: boolean | HandlerSettings): void; + eventRemove(node: HTMLElement|string, event: string, handler: GanttCallback, options?: boolean|HandlerSettings): void; /** * expands gantt to the full screen mode @@ -2660,7 +2720,7 @@ export interface GanttStatic { * gets worktime calendar by id * @param calendarId optional, the id of the global calendar or "global" */ - getCalendar(calendarId?: string | number): Calendar; + getCalendar(calendarId?: string|number): Calendar; /** * gets all the calendars added into Gantt @@ -2671,7 +2731,7 @@ export interface GanttStatic { * returns the 1st-level child tasks of the specified parent branch * @param id the parent branch's id */ - getChildren(id: string | number): any[]; + getChildren(id: string|number): any[]; /** * returns the closest working time @@ -2684,13 +2744,13 @@ export interface GanttStatic { * @param name the name of the column * @param excludeHidden skips indexes of the hidden columns */ - getColumnIndex(name: string | number, excludeHidden?: boolean): number; + getColumnIndex(name: string|number, excludeHidden?: boolean): number; /** * returns all tasks and links that a task is connected with * @param id optional, the id of a task */ - getConnectedGroup(id?: string | number): any; + getConnectedGroup(id?: string|number): any; /** * returns the earliest and latest dates allowed by the constraint applied to a task @@ -2720,13 +2780,13 @@ export interface GanttStatic { * gets the index of a task in the tree * @param id the task id */ - getGlobalTaskIndex(id: string | number): number; + getGlobalTaskIndex(id: string|number): number; /** * gets the configuration object of a column * @param name the column's name */ - getGridColumn(name: string | number): GridColumn; + getGridColumn(name: string|number): GridColumn; /** * gets columns of the Gantt chart @@ -2738,12 +2798,12 @@ export interface GanttStatic { * @param property the name of a data property that the control is mapped to * @param key the option's id. This parameter is compared with the task's data property to
assign the select's option to the task */ - getLabel(property: string, key: string | number): string; + getLabel(property: string, key: string|number): string; /** * returns the id of the last selected task */ - getLastSelectedTask(): string | number; + getLastSelectedTask(): string|number; /** * returns the object of the layout view by its name @@ -2760,7 +2820,7 @@ export interface GanttStatic { * returns the object of the lightbox's section * @param name the name of the section */ - getLightboxSection(name: string | number): LightboxSectionState; + getLightboxSection(name: string|number): LightboxSectionState; /** * returns the name of the active lighbox's structure @@ -2776,7 +2836,7 @@ export interface GanttStatic { * returns the dependency link object by the specified id * @param id the link id */ - getLink(id: string | number): Link; + getLink(id: string|number): Link; /** * returns the number of all dependency links presented in the Gantt chart @@ -2787,48 +2847,48 @@ export interface GanttStatic { * returns the HTML element of the specified dependency link * @param id the link id */ - getLinkNode(id: string | number): HTMLElement; + getLinkNode(id: string|number): HTMLElement; /** * returns all links presented in the Gantt chart */ - getLinks(): Array; + getLinks(): Array ; /** * gets the marker's object * @param markerId the marker's id */ - getMarker(markerId: string | number): any; + getMarker(markerId: string|number): any; /** * returns the id of the next item (no matter what the level of nesting is: the same or different) * @param id the task id */ - getNext(id: string | number): string | number; + getNext(id: string|number): string|number; /** * returns the id of the next task of the same level * @param id the task id */ - getNextSibling(id: string | number): string | number; + getNextSibling(id: string|number): string|number; /** * returns the id of the parent task * @param id the task id */ - getParent(id: string | number): string | number; + getParent(id: string|number): string|number; /** * returns the id of the previous item (no matter what the level of nesting is: the same or different) * @param id the task id */ - getPrev(id: string | number): string | number; + getPrev(id: string|number): string|number; /** * returns the id of the previous task of the same level * @param id the task id */ - getPrevSibling(id: string | number): string | number; + getPrevSibling(id: string|number): string|number; /** * returns the stack of stored redo user actions @@ -2840,7 +2900,7 @@ export interface GanttStatic { * @param resourceId the id of the resource * @param taskId the id of the task */ - getResourceAssignments(resourceId: string | number, taskId?: string | number): ResourceAssignment[]; + getResourceAssignments(resourceId: string|number, taskId?: string|number): ResourceAssignment[]; /** * returns a calendar which the resource is assigned to @@ -2856,7 +2916,7 @@ export interface GanttStatic { /** * returns the scroll position */ - getScrollState(): { x: number, y: number }; + getScrollState(): {x: number, y: number}; /** * returns the id of the selected task @@ -2879,7 +2939,7 @@ export interface GanttStatic { * returns siblings of the specified task (including itself) * @param id the task id */ - getSiblings(id: string | number): any[]; + getSiblings(id: string|number): any[]; /** * gets the current state of the Gantt chart @@ -2890,31 +2950,37 @@ export interface GanttStatic { * calculates the combined start/end dates of tasks nested in a project or another task * @param task_id the task's id, api/gantt_root_id_config.md will be used if not specified */ - getSubtaskDates(task_id?: string | number): any; + getSubtaskDates(task_id?: string|number): any; /** * calculates the combined duration of tasks nested in a project or another task. * @param task_id the task's id, api/gantt_root_id_config.md will be used if not specified */ - getSubtaskDuration(task_id?: string | number): number; + getSubtaskDuration(task_id?: string|number): number; /** * returns the task object * @param id the task id */ - getTask(id: string | number): Task; + getTask(id: string|number): Task; /** * returns the parsed resource assignments of a specific task from the datastore * @param taskId the task id */ - getTaskAssignments(taskId: string | number): ResourceAssignment[]; + getTaskAssignments(taskId: string|number): ResourceAssignment[]; /** * returns the height (in pixels) of the DOM element of the task * @param taskId the task's id */ - getTaskBarHeight(taskId: number | string): number; + getTaskBarHeight(taskId: number|string): number; + + /** + * returns an array of baselines of a specific task from the datastore + * @param taskId the task id + */ + getTaskBaselines(taskId: string|number): any; /** * finds a task by the specified criteria @@ -2922,20 +2988,20 @@ export interface GanttStatic { * @param propertyValue the property value * @param types an object with types of the tasks which should be returned */ - getTaskBy(propertyName: string | GanttCallback, propertyValue?: string | number | boolean | any[], types?: any): Array; + getTaskBy(propertyName: string|GanttCallback, propertyValue?: string|number|boolean|any[], types?: any): Array ; /** * returns a task by its global task index * @param index the task index in the tree (zero-based numbering) */ - getTaskByIndex(index: number | string): Task; + getTaskByIndex(index: number|string): Task; /** * returns a collection of tasks which occur during the specified period * @param from the start date of the period * @param to the end date of the period */ - getTaskByTime(from?: Date, to?: Date): Array; + getTaskByTime(from?: Date, to?: Date): Array ; /** * returns a task by its WBS code @@ -2958,19 +3024,19 @@ export interface GanttStatic { * returns the visible height of a task * @param id the task's id */ - getTaskHeight(id?: string | number): number; + getTaskHeight(id?: string|number): number; /** * gets the index of a task in the branch * @param id the task id */ - getTaskIndex(id: string | number): number; + getTaskIndex(id: string|number): number; /** * returns the HTML element of the task bar * @param id the task id */ - getTaskNode(id: string | number): HTMLElement; + getTaskNode(id: string|number): HTMLElement; /** * calculates the position and size of the task's DOM element in the timeline area @@ -2980,17 +3046,23 @@ export interface GanttStatic { */ getTaskPosition(task: Task, from?: Date, to?: Date): any; + /** + * returns the array of unique resources assigned to a specific task from the datastore + * @param taskId the task id + */ + getTaskResources(taskId: string|number): any; + /** * returns the HTML element of the task row in the table * @param id the task id */ - getTaskRowNode(id: string | number): HTMLElement; + getTaskRowNode(id: string|number): HTMLElement; /** * gets the top position of the task's DOM element in the timeline area * @param id the task's id */ - getTaskTop(id: number | string): number; + getTaskTop(id: number|string): number; /** * returns the type of a task @@ -3002,7 +3074,7 @@ export interface GanttStatic { * returns the total slack of a task * @param task optional, the object of a task or its ID */ - getTotalSlack(task?: Task | string | number): any; + getTotalSlack(task?: Task|string|number): any; /** * returns the stack of stored undo user actions @@ -3030,13 +3102,13 @@ export interface GanttStatic { * groups tasks by the specified task's attribute * @param config the grouping configuration object, or false to ungroup tasks */ - groupBy(config: GroupConfig | boolean): void; + groupBy(config: GroupConfig|boolean): void; /** * returns the number of child task(s) * @param id the task id */ - hasChild(id: string | number): number | undefined; + hasChild(id: string|number): number|undefined; /** * hides the lightbox modal overlay that blocks interactions with the remaining screen @@ -3078,14 +3150,14 @@ export interface GanttStatic { * @param from the start value of the time scale (X–Axis) * @param to the end value of the time scale (X–Axis) */ - init(container: string | HTMLElement, from?: Date, to?: Date): void; + init(container: string|HTMLElement, from?: Date, to?: Date): void; /** * checks whether a task is a child of a different task * @param childId the id of a task that you want to check as a child * @param parentId the id of a task that you want to check as a parent */ - isChildOf(childId: string | number, parentId: string | number): boolean; + isChildOf(childId: string|number, parentId: string|number): boolean; /** * checks whether the link is circular @@ -3112,25 +3184,25 @@ export interface GanttStatic { * @param to optional, the ID of the target (successor) task. Can have the *null* or *undefined* value if the target task isn't specified yet. Not needed at all when the first parameter is specified as an object * @param to_start optional, specifies if the link is being dragged to the start of the target (successor) task (*true*) or from its end (*false*). Not needed at all when the first parameter is specified as an object */ - isLinkAllowed(linkOrFrom: string | number | LinkForValidation, from_start?: boolean, to?: string | number | null | undefined, to_start?: boolean): boolean; + isLinkAllowed(linkOrFrom: string|number|LinkForValidation, from_start?: boolean, to?: string|number|null|undefined, to_start?: boolean): boolean; /** * checks whether the specified link exists * @param id the link id */ - isLinkExists(id: string | number): boolean; + isLinkExists(id: string|number): boolean; /** * checks whether the specified task/link, or the whole Gantt is read-only * @param item optional, the id or an object of the task/link. If not specified, the method checks whether the Gantt is read-only */ - isReadonly(item?: number | string | Task | Link): boolean; + isReadonly(item?: number|string|Task|Link): boolean; /** * checks whether the specified task is currently selected * @param task the task's id */ - isSelectedTask(task: string | number): boolean; + isSelectedTask(task: string|number): boolean; /** * checks whether the specified task is split @@ -3148,13 +3220,13 @@ export interface GanttStatic { * checks whether the specified task exists * @param id the task id */ - isTaskExists(id: string | number): boolean; + isTaskExists(id: string|number): boolean; /** * checks whether the specifies task is currently rendered in the Gantt chart * @param id the task's id */ - isTaskVisible(id: string | number): boolean; + isTaskVisible(id: string|number): boolean; /** * checks if the task is unscheduled @@ -3180,14 +3252,14 @@ export interface GanttStatic { * gets the id of a task from the specified HTML event * @param e a native event */ - locate(e: Event): string | number; + locate(e: Event): string|number; /** * merges several working calendars into one * @param calendars an array of calendars' objects or the first calendar object * @param calendar2 optional, the second calendar object */ - mergeCalendars(calendars: Calendar[] | Calendar, calendar2?: Calendar): void; + mergeCalendars(calendars: Calendar[]|Calendar, calendar2?: Calendar): void; /** * calls a message box of the specified type @@ -3215,20 +3287,20 @@ export interface GanttStatic { * @param tindex the index of the position that the task will be moved to
(the index within a branch) * @param parent the parent id. If specified, the tindex will refer to the index in the
'parent' branch */ - moveTask(sid: string | number, tindex: number, parent?: string | number): boolean | void; + moveTask(sid: string|number, tindex: number, parent?: string|number): boolean|void; /** * opens the branch with the specified id * @param id the branch id */ - open(id: string | number): void; + open(id: string|number): void; /** * loads data from a client-side resource * @param data a string or object which represents data * @param type optional, ('json', 'xml') the data type. The default value - 'json' */ - parse(data: string | DataToLoad1 | DataToLoad2, type?: string): void; + parse(data: string|DataToLoad1 | DataToLoad2, type?: string): void; /** * activates the specified extensions @@ -3256,20 +3328,20 @@ export interface GanttStatic { * refreshes the specifies link * @param id the link id */ - refreshLink(id: string | number): void; + refreshLink(id: string|number): void; /** * refreshes the task and its related links * @param id the task id * @param refresh_links optional, defines whether links related to the task should be refreshed, true by default */ - refreshTask(id: string | number, refresh_links?: boolean): void; + refreshTask(id: string|number, refresh_links?: boolean): void; /** * removes the specified layer related to a link * @param layerId a DOM element that will be displayed in the layer */ - removeLinkLayer(layerId: string | number): void; + removeLinkLayer(layerId: string|number): void; /** * removes a keyboard shortcut @@ -3282,7 +3354,7 @@ export interface GanttStatic { * removes the specified layer related to a task * @param layerId a DOM element that will be displayed in the layer */ - removeTaskLayer(layerId: string | number): void; + removeTaskLayer(layerId: string|number): void; /** * renders the whole Gantt chart @@ -3324,7 +3396,7 @@ export interface GanttStatic { * rounds the specified date to the nearest date in the time scale * @param date the Date object to round or an object with settings */ - roundDate(date: Date | RoundDateConfig): Date; + roundDate(date: Date|RoundDateConfig): Date; /** * rounds the start and end task's dates to the nearest dates in the time scale @@ -3338,20 +3410,20 @@ export interface GanttStatic { * @param x optional, the value of the horizontal scroll or 'null' (if the scroll position shouldn't be changed) * @param y optional, the value of the vertical scroll or 'null' (if the scroll position shouldn't be changed) */ - scrollLayoutCell(name: string, x: number | null, y: number | null): void; + scrollLayoutCell(name: string, x: number|null, y: number|null): void; /** * scrolls the Gantt container to the specified position * @param x optional, the value of the horizontal scroll or 'null' (if the scroll position shouldn't be changed) * @param y optional, the value of the vertical scroll or 'null' (if the scroll position shouldn't be changed) */ - scrollTo(x?: number | null, y?: number | null): void; + scrollTo(x?: number|null, y?: number|null): void; /** * selects the specified task * @param id the task id */ - selectTask(id: string | number): string | number; + selectTask(id: string|number): string|number; /** * serializes the data into JSON or XML format @@ -3364,20 +3436,26 @@ export interface GanttStatic { * @param list_name the name of a list * @param options an array of options */ - serverList(list_name: string | number, options?: any[]): any[]; + serverList(list_name: string|number, options?: any[]): any[]; /** * set the parent for a task * @param task the task object * @param pid the parent task id */ - setParent(task: Task, pid: number | string): void; + setParent(task: Task, pid: number|string): void; /** * resizes the Gantt chart */ setSizes(): void; + /** + * sets the active skin + * @param skin the name of the skin. The allowed values are: "terrace", "dark", "material", "contrast-white", "contrast-black", "meadow", "skyblue", "broadway" + */ + setSkin(skin: string): void; + /** * sets the working time for the Gantt chart * @param config the configuration object of a time span @@ -3400,19 +3478,19 @@ export interface GanttStatic { * opens the lightbox for the specified task * @param id the task id */ - showLightbox(id: string | number): void; + showLightbox(id: string|number): void; /** * displays the pop-up task form for the specified task * @param id the task id */ - showQuickInfo(id: string | number): void; + showQuickInfo(id: string|number): void; /** * makes the specified task visible on the screen * @param id the task id */ - showTask(id: string | number): void; + showTask(id: string|number): void; /** * makes all code inside it not to trigger internal events or server-side calls @@ -3427,13 +3505,13 @@ export interface GanttStatic { * @param parent the id of the parent task. Specify the parameter if you want to sort tasks only in the branch of the specified parent. * @param silent specifies whether rendering should be invoked after reordering items */ - sort(field: string | ((task1: Task, task2: Task) => 1 | 0 | -1), desc?: boolean, parent?: string | number, silent?: boolean): void; + sort(field: string|((task1: Task, task2: Task) => 1 | 0 | -1), desc?: boolean, parent?: string|number, silent?: boolean): void; /** * selects the specified task if it was unselected and vice versa * @param taskId the task's id */ - toggleTaskSelection(taskId: string | number): void; + toggleTaskSelection(taskId: string|number): void; /** * returns a unique id @@ -3449,7 +3527,7 @@ export interface GanttStatic { * removes selection from the selected task * @param id optional, the id of the task to remove selection from, see details */ - unselectTask(id?: string | number): void; + unselectTask(id?: string|number): void; /** * unsets a working time in the Gantt Chart @@ -3462,60 +3540,61 @@ export interface GanttStatic { * @param collection the name of the collection to update * @param options the new values of the collection */ - updateCollection(collection: string | number, options: any[]): boolean; + updateCollection(collection: string|number, options: any[]): boolean; /** * updates the specified dependency link * @param id the task id */ - updateLink(id: string | number): void; + updateLink(id: string|number): void; /** * updates the specified marker * @param markerId the marker's id */ - updateMarker(markerId: string | number): void; + updateMarker(markerId: string|number): void; /** * updates the specified task * @param id the task id * @param newState optional, the new values of the task */ - updateTask(id: string | number, newState?: Task): void; + updateTask(id: string|number, newState?: Task): void; /** * updates the resource property of the task object with the values of the resource assignments from the datastore * @param taskId the task id */ - updateTaskAssignments(taskId: number | string): void; + updateTaskAssignments(taskId: number|string): void; } -export interface CustomTypeRenderers { - +export interface CustomTypeRenderers { + /** * a custom render function for the *task* type + * @param optional, a custom render function for the *task* type * @param optional, a custom render function for the *project* type * @param optional, a custom render function for the *milestone* type * @param optional, a custom render function for the custom task type */ - type_renderers: { + type_renderers: { task?: CustomTypeRenderers["typeRenderer"], project?: CustomTypeRenderers["typeRenderer"], milestone?: CustomTypeRenderers["typeRenderer"], [typeName: string]: CustomTypeRenderers["typeRenderer"] | undefined } - + /** * a function takes a task's object as a parameter and must return a DOM element that will be displayed instead of the task bar. * @param the task object * @param optional, the default render function used in the dhtmlxGantt */ - typeRenderer(task: Task, defaultRender?: AdditionalTaskLayer["TaskLayerRender"]): HTMLElement | boolean | void | undefined + typeRenderer ( task: Task, defaultRender?: AdditionalTaskLayer["TaskLayerRender"] ): HTMLElement | boolean | void | undefined } -export interface AdditionalTaskLayer { - +export interface AdditionalTaskLayer { + /** * a function takes a task's object as a parameter and must return a DOM element that will be displayed in the layer. * @param the task object @@ -3523,15 +3602,16 @@ export interface AdditionalTaskLayer { * @param the Gantt configuration object * @param the viewport object */ - TaskLayerRender( + TaskLayerRender ( task: Task, timeline?: any, config?: GanttConfigOptions, viewport?: AdditionalTaskLayer["LayerViewport"] - ): HTMLElement | boolean | void - + ): HTMLElement|boolean|void + /** * the configuration object for the additional task layer. Has the following properties: + * @param optional, the layer ID * @param mandatory, a function that answers for rendering the layer's elements * @param the function that returns HTML element that should be rendered @@ -3561,7 +3641,7 @@ export interface AdditionalTaskLayer { * @param optional, a function that takes a task object as a parameter. If returns 'false', the 'renderer' function won't be called for a task * @param the task object */ - TaskLayerConfig: { + TaskLayerConfig: { id?: string | number, renderer: { render: AdditionalTaskLayer["TaskLayerRender"], @@ -3571,35 +3651,36 @@ export interface AdditionalTaskLayer { timeline?: any, config?: GanttConfigOptions, viewport?: AdditionalTaskLayer["LayerViewport"], - ) => void), + )=> void ), onrender?: (( task: Task, node: HTMLElement, view?: any, - ) => void), + )=> void ), getRectangle?: (( task: Task, view?: any, config?: GanttConfigOptions, gantt?: GanttStatic, - ) => { left: number, top: number, height: number, width: number } | void), + )=> { left: number, top: number, height: number, width: number } | void ), getVisibleRange: (( gantt?: GanttStatic, view?: any, config?: GanttConfigOptions, datastore?: any, viewport?: AdditionalTaskLayer["LayerViewport"], - ) => { start: number, end: number } | undefined | void), + )=> {start: number, end: number} | undefined | void ), }, container?: HTMLElement, topmost?: boolean, filter?: (( task: Task, - ) => boolean) + )=> boolean ) } - + /** * the layer viewport object + * @param the left rectangle position * @param the right rectangle position * @param the top rectangle position @@ -3607,7 +3688,7 @@ export interface AdditionalTaskLayer { * @param the rectangle width * @param the rectangle height */ - LayerViewport: { + LayerViewport: { x: number, x_end: number, y: number, @@ -3617,8 +3698,8 @@ export interface AdditionalTaskLayer { } } -export interface AdditionalLinkLayer { - +export interface AdditionalLinkLayer { + /** * a function takes a link's object as a parameter and must return a DOM element that will be displayed in the layer. * @param the link object @@ -3626,15 +3707,16 @@ export interface AdditionalLinkLayer { * @param optional, the Gantt configuration object * @param optional, the viewport object */ - LinkLayerRender( + LinkLayerRender ( link: Link, timeline?: any, config?: GanttConfigOptions, viewport?: AdditionalTaskLayer["LayerViewport"] - ): HTMLElement | boolean | void - + ): HTMLElement|boolean|void + /** * the configuration object for the additional link layer. Has the following properties: + * @param optional, the layer ID * @param mandatory, a function that answers for rendering the layer's elements * @param the function that returns HTML element that should be rendered @@ -3664,7 +3746,7 @@ export interface AdditionalLinkLayer { * @param optional, a function that takes a link object as a parameter. If returns 'false', the 'renderer' function won't be called for a link * @param the link object */ - LinkLayerConfig: { + LinkLayerConfig: { id?: string | number, renderer: { render: AdditionalLinkLayer["LinkLayerRender"], @@ -3674,35 +3756,36 @@ export interface AdditionalLinkLayer { timeline?: any, config?: GanttConfigOptions, viewport?: AdditionalTaskLayer["LayerViewport"], - ) => void), + )=> void ), onrender?: (( link: Link, node: HTMLElement, view?: any, - ) => void), + )=> void ), getRectangle?: (( link: Link, view?: any, config?: GanttConfigOptions, gantt?: GanttStatic, - ) => { left: number, top: number, height: number, width: number } | void), + )=> { left: number, top: number, height: number, width: number } | void ), getVisibleRange: (( gantt?: GanttStatic, view?: any, config?: GanttConfigOptions, datastore?: any, viewport?: AdditionalTaskLayer["LayerViewport"], - ) => { start: number, end: number } | undefined | void), + )=> {start: number, end: number} | undefined | void ), }, container?: HTMLElement, topmost?: boolean, filter?: (( link: Link, - ) => boolean) + )=> boolean ) } - + /** * the layer viewport object + * @param the left rectangle position * @param the right rectangle position * @param the top rectangle position @@ -3710,7 +3793,7 @@ export interface AdditionalLinkLayer { * @param the rectangle width * @param the rectangle height */ - LayerViewport: { + LayerViewport: { x: number, x_end: number, y: number, @@ -3720,387 +3803,393 @@ export interface AdditionalLinkLayer { } } -export interface Task { - +export interface Task { + /** * The task id, auto-generated if not set */ id: string | number, - + /** * The date when a task is scheduled to begin. If not specified, Gantt will calculate it based on the end_date and duration properties.The property becomes optional when setting unscheduled: true. */ start_date?: Date, - + /** * The date when a task is scheduled to be completed. If not specified, Gantt will calculate it based on the start_date and duration properties.The property becomes optional when setting unscheduled: true. */ end_date?: Date, - + /** * The task duration. If not specified, Gantt will calculate it based on the start_date and end_date properties. */ duration?: number, - + /** * Defines whether gantt should do auto-scheduling of the task (true or not specified) or not (false) */ auto_scheduling?: boolean, - + /** * Sets the height of the DOM element of the task in the timeline area */ bar_height?: number, - + /** * Sets the id of the custom calendar to be assigned to the task. The name of the property depends on the value of the calendar_property option */ calendar_id?: number | string, - + /** * Sets the color of the task in the timeline area (i.e. sets background-color for the gantt_task_line element of the task) */ color?: string, - + /** * The date of the task constraint. It is added to the task object when auto-scheduling with time constraints is enabled. The property isn't used if auto_scheduling_compatibility is enabled. */ constraint_date?: Date, - + /** * The type of the task constraint ("asap", "alap", "snet", "snlt", "fnet", "fnlt", "mso", "mfo"). It is added to the task object when auto-scheduling with time constraints is enabled. The property isn't used if auto_scheduling_compatibility is enabled. */ constraint_type?: string, - + + /** + * Specifies the deadline date for the task. A [visual indicator](desktop/inbuilt_baselines.md#deadlinesandconstraints) is displayed in the timeline when this property is set. + */ + deadline?: Date | string, + /** * Defines whether the task can be editable in the read-only Gantt chart. The name of the property depends on the value of the editable_property option */ editable?: boolean, - + /** * The group's id. It is added to the tasks grouped by some criterion if the property used for grouping tasks (relation_property in the groupBy() method) is specified as an object. */ group_id?: string | number, - + /** * Defines whether a task (type:"task") or milestone (type:"milestone") should be hidden in the timeline area */ hide_bar?: boolean, - + /** * The key of the group. It is added to the tasks grouped by some criterion if the property used for grouping tasks (relation_property in the groupBy() method) is specified as an array.It is also added to the tasks with the name of the group (for example, to the "High", "Normal", "Low" tasks if you've grouped tasks by priority. Check the example). */ key?: string | number, - + /** * The label of the group. It is added to the tasks with the name of the group (for example, if you've grouped tasks by priority, the property will be added to the tasks with "High", "Normal", "Low" names. Check the example). */ label?: string, - + /** * Specifies whether the task branch will be opened initially (to show child tasks). To close/open the branch after Gantt initialization, use the related methods: close() and open() */ open?: boolean, - + /** * The id of the parent task. If the specified parent doesn't exist, the task won't be rendered in the Gantt. The id of the root task is specified by the api/gantt_root_id_config.md config. */ parent?: number | string, - + /** * The task's progress (from 0 to 1) */ progress?: number, - + /** * The color of the task progress in the timeline area (i.e. sets background-color for the gantt_task_progress element of the task progress) */ progressColor?: string, - + /** * Defines whether the task must be readonly. The name of the property depends on the value of the readonly_property option */ readonly?: boolean, - + /** * Defines how subtasks of the task must be displayed. Values: "split" | "". If set to "split", the subtasks will be displayed in one row. In addition, if you enable the open_split_tasks property, the subtasks will be rendered in one row only if the task is collapsed. */ render?: string, - + /** * An array with resources assigned to the task. It is added to the task object when importing data from MS Project/Primavera */ - resource?: Array, - + resource?: Array , + /** * Specifies whether a task (type:"task") or milestone (type:"milestone") should appear on the parent projects. */ rollup?: boolean, - + /** * Sets the height for the task's row */ row_height?: number, - + /** * The id of the target task. The property displays the same value as the $drop_target property. The property is added to the task object only if Data Processor is enabled, after the task is updated and data is sent to the server. */ target?: string, - + /** * The name of the task. If necessary you may use any other name for this property.The property is used in default configurations of different parts of Gantt. */ text?: any, - + /** * The color of the task's text in the timeline area (i.e. sets color for the gantt_task_line element of the task) */ textColor?: string, - + /** * the task type. The available values are stored in the api/gantt_types_config.md object: - "task" - a regular task (default value). + "task" - a regular task (default value). "project" - a task that starts, when its earliest child task starts, and ends, when its latest child ends. - The start_date, end_date, duration properties are ignored for such tasks. - + The start_date, end_date, duration properties are ignored for such tasks. + "milestone" - a zero-duration task that is used to mark out important dates of the project. - The duration, progress, end_date properties are ignored for such tasks. + The duration, progress, end_date properties are ignored for such tasks. */ type?: string, - + /** * Defines whether the task must be unscheduled. By default, the unscheduled task isn't displayed in the timeline area, empty values are displayed in the grid instead of the start and end dates. */ unscheduled?: boolean, - + /** * A system property that is used in internal calculations. */ $calculate_duration?: boolean, - + /** * An object which contains custom properties of a task which were defined in the importFromMSProject() and importFromPrimaveraP6() methods */ $custom_data?: object, - + /** * A system property which defines whether the task has been updated. It is added to the task object when Data Processor is enabled. If the value of the property is "updated", the task's text will be bold in the grid but it is possible to define your own styles via CSS. */ $dataprocessor_class?: string, - + /** * The id of the target task. A temporary property which is added to the task object when dragging the task vertically. */ $drop_target?: string, - + /** * The id of the calendar (or resource calendar) assigned to the task. A system property that is used in internal calculations. */ $effective_calendar?: string, - + /** * A system property which shows whether the task is visible depending on whether the task's parents are expanded or not. If at least one parent is collapsed, the task won't be visible. The exception is only split tasks (subtasks). */ $expanded_branch?: boolean, - + /** * Defines whether the Gantt should send a request to the server to load the first-level subtasks of the task. The property is used when the branch_loading property is enabled. The name of the property depends on the value of the branch_loading_property option. */ $has_child?: boolean, - + /** * The global vertical position of the task. It is bound to the task and changes if the tasks below or above are open or closed. If the parent of the task is collapsed, the property doesn't show the actual position of the task. */ $index?: number, - + /** * The task's level in the tasks hierarchy (zero-based numbering) */ $level?: number, - + /** * The vertical position of the task in the branch (under the parent). It isn't bound to the task and doesn't change if the tasks below or above are open or closed as inside the branch as globally. If the parent of the task is collapsed, the property doesn't show the actual position of the task. */ $local_index?: number, - + /** * It is added for a new task when it is created via the createTask() method or via the "+" button. The property is added to the task object when you open the lightbox, and is removed after you save the task. */ $new?: boolean, - + /** * Required, a system property which is added to the task object. True if the end_date property couldn't be calculated (when the start_date property is loaded but there is no duration or end_date one). In this case, you cannot move or resize the task. The end_date property will depend on the end_date of the subtasks (if any). The start_date property will be fixed and won't change. Auto-scheduling won't work for such a task. If the $no_start property is enabled, the task will fully depend on the dates of its subtasks or on the date of the first task. */ $no_end?: boolean, - + /** * Required, a system property which is added to the task object. True if the start_date property couldn't be calculated (when the end_date property is loaded but there is no duration or start_date one). The start_date property will depend on the start_date of the subtasks (if any) or on the start date of the first task. The end_date property will be fixed and will change only if the start date of the subtasks/first task is bigger than the end date of the task. Auto-scheduling won't work for such a task. If the $no_end property is enabled, the task will fully depend on the dates of its subtasks or on the date of the first task. */ $no_start?: boolean, - + /** * A system property which specifies whether the task is currently opened (true). If you change the value of the property and re-draw the Gantt, it will open or close the task. To change the state of the task, you may also apply the open() or close() methods. */ $open?: boolean, - + /** * An object with original names of task properties which were imported from MS Project / Primavera into the export module (export server). The properties appear in the $raw object while the file is converted into JSON-format but before they are converted into names and format expected by Gantt. */ $raw?: object, - + /** * The id of a row the rollup item / split task is rendered at. This is the temporary property which appears in the object of the rollup/split task only when it's been rendering on the page. */ $rendered_at?: string | number, - + /** * The id of the parent under which the task is rendered (not id of the real parent of the task). The property is used in internal calculations and on tasks' grouping. */ $rendered_parent?: number | string, - + /** * The type of the rendered task (a temporary property). */ $rendered_type?: string, - + /** * An array with ids of resources assigned to the task (a temporary property). But the most actual data is stored in the store of resource assignments not in this property. */ - $resourceAssignments?: Array, - + $resourceAssignments?: Array , + /** * An array with ids of tasks and milestones which have appeared on the current task */ - $rollup?: Array, - + $rollup?: Array , + /** * Required, an array with ids of all links that come out of the task */ - $source?: Array, - + $source?: Array , + /** * Appears if the task is a subtask of a split task (i.e. arranges in one row with other subtasks) */ $split_subtask?: boolean, - + /** * Required, an array with ids of links that come into task */ - $target?: Array, - + $target?: Array , + /** * A temporary property which is added to the task object when dragging the task vertically. The task looks a little bit transparent in grid on vertical dragging due to this property. */ $transparent?: boolean, - + /** * It is added to the tasks grouped by some criterion. After the grouping is reset, tasks with $virtual: true are removed */ $virtual?: boolean, - + /** * The WBS code of the task (a temporary property). It is added to the task object after applying the getWBSCode() method. If the value of the code has changed (the task's parent or position has been changed), you need to call the getWBSCode() method again to get the updated value of the code. */ $wbs?: string, - + [customProperty: string]: any; } -export interface Link { - +export interface Link { + /** * the link id */ id: string | number, - + /** * the id of a task that the dependency will start from */ source: string | number, - + /** * the id of a task that the dependency will end with. */ target: string | number, - + /** * the dependency type. The available values are stored in the api/gantt_links_config.md object. By default, they are: - "0" - 'finish_to_start'. + "0" - 'finish_to_start'. "1" - 'start_to_start'. "2" - 'finish_to_finish'. "3" - 'start_to_finish'. */ type: string, - + /** * the task's lag */ lag?: number, - + /** * can mark link as readonly */ readonly?: boolean, - + /** * can mark link as editable */ editable?: boolean, - + [customProperty: string]: any; } -export interface GridColumn { - +export interface GridColumn { + /** * sets the horizontal title alignment. Possible values: *'left'*, *'center'*, or *'right'* */ align?: string, - + /** * hides/shows a column (PRO) */ hide?: boolean, - + /** * specifies the title of the column */ label?: string | number, - + /** * sets the maximum column width in case of resize operations */ max_width?: number, - + /** * sets the minimum column width in case of resize operations */ min_width?: number, - + /** * defines the column's id. The name 'add' allows you to add a column with the '+' sign */ name?: string | number, - + /** * enables the possibility to resize a column by dragging the column's border (PRO) */ resize?: boolean, - + /** * indicates that the related column should display a tree */ tree?: boolean, - + /** * defines the width of the column */ width?: number | string, - + /** * attached inline editor + * @param the type of the inline editor * @param specifies which property of the task should be updated by the inline editor * @param minimal value for the date and duration types @@ -4108,184 +4197,185 @@ export interface GridColumn { * @param an array with the options for the select types * @param formatter for the date and predecessor types */ - editor?: { + editor?: { type: string, map_to: string, min?: Date | number, max?: Date | number, - options?: Array, + options?: Array , formatter?: DurationFormatter | LinkFormatter }, - + /** * sets a data template * @param the Task object */ - template?(task: Task): any, - + template? ( task: Task ): any, + /** * optional, a callback function for rendering a cell into the DOM. The function takes a task object and the DOM element of the grid cell as parameters and may return a component of the framework. See details here * @param the Task object * @param the HTML element of the Grid cell */ - onrender?(task: Task, node: HTMLElement): any, - + onrender? ( task: Task, node: HTMLElement ): any, + /** * the configuration of sorting after clicking on the column header. When the property is set to *false*, sorting is disabled. You can also set a different task property in the *string* to sort the column or use a custom sorting function: * @param an object of the first task that will be sorted * @param an object of the second task that will be sorted */ - sort?: boolean | string | ((task1: Task, task2: Task,) => any) + sort?: boolean | string | ( (task1: Task, task2: Task, ) => any ) } -export interface LightboxSections { - +export interface LightboxSections { + /** * optional, the lightbox sections array for regular tasks */ sections?: LightboxSection[], - + /** * optional, the lightbox sections array for project tasks */ project_sections?: LightboxSection[], - + /** * optional, the lightbox sections array for milestones */ milestone_sections?: LightboxSection[], - + /** * the lightbox sections array for the custom type */ [lightboxType: string]: LightboxSection[] | undefined } -export interface LightboxSection { - +export interface LightboxSection { + /** * the section's name (according to this name, dhtmlxGantt will take the section's label from the *locale.labels* collection). */ name: string, - + /** * the name of a data property that will be mapped to the section. */ map_to: string, - + /** * the [type of the section control](desktop/default_edit_form.md#lightboxcontrols) (editor). */ type: string, - + /** * optional, the section's height. Not used with the [checkbox](desktop/checkbox.md) and [radio](desktop/radio.md) sections. */ height?: number, - + /** * optional, if set to *true*, the section will take focus on opening the lightbox */ focus?: boolean, - + /** * optional, a formatter for the section */ formatter?: DurationFormatter | LinkFormatter, - + /** * optional, if you set the "true" value, the section will be read-only */ readonly?: boolean, - + /** * optional, sets a range for the year selector. Can be set in 2 ways: */ year_range?: number | number[], - + /** * optional, if you set the "true" value, just the 'start Date' selector will be presented in the section. */ single_date?: boolean, - + /** * optional, sets the order of date-time selectors */ time_format?: string[], - + /** * optional, defines whether the end date will be corrected automatically if the selected start date is greater than the end date, *true* by default. The disabled mode allows validating the dates, but if you enable the mode and don't validate the dates, you can get tasks with 0 duration when the *start_date* is greater than the *end_date*. */ autofix_end?: boolean, - + /** * optional, defines select options of the control.Each object in the array specifies a single option and takes the following properties: + * @param the option's id. This attribute is compared with the task's data property to assign select options to tasks * @param the option's label * @param optional, the unit of measurement of the resource (for the Resources control) */ - options?: { + options?: { key: number | string, label: string, unit?: string | number }[], - + /** * optional, the default value of the section's control. Applied only if the input value is underfined. For the resources control is applied if the value of the resource is underfined. */ default_value?: any, - + /** * optional, if set to "true", the options list will contain an additional option that will allow users to set the root level as the parent for tasks. Used in pair with the **root_label** property */ allow_root?: boolean, - + /** * optional, sets a label for the root-level parent. Used in pair with the **allow_root** property */ root_label?: string, - + /** * optional, specifies the 'onChange' event handler function for the section's control * @param a native event object. */ - onchange?(e: Event): any, - + onchange? ( e: Event ): any, + /** * optional, sets a sorting function for the select options * @param an object of the first task that will be sorted * @param an object of the second task that will be sorted */ - sort?(task1: Task, task2: Task): number, - + sort? ( task1: Task, task2: Task ): number, + /** * optional, sets a filtering function for the select options. Takes the task id and task object as parameters * @param the ID of the task object * @param the Task object */ - filter?(id: string | number, task: Task): boolean, - + filter? ( id: string | number, task: Task ): boolean, + /** * optional, sets a template for select options * @param the start date of the task object * @param the end date of the task object * @param the Task object */ - template?( + template? ( start_date: Date | number, end_date: Date | number, task: Task - ): string | number + ): string|number } -export interface LightboxControl { - +export interface LightboxControl { + /** * a function that returns a string with the HTML elements of the section * @param the section's configuration object */ - render(sns: LightboxSection): string, - + render ( sns: LightboxSection ): string, + /** * a function that obtains the value from the **Task** object and sets it to the section * @param an html object related to the html defined above @@ -4293,36 +4383,37 @@ export interface LightboxControl { * @param the task object * @param the section's configuration object */ - set_value( + set_value ( node: HTMLElement, value: any, task: Task, section: LightboxSection ): any, - + /** * a function that obtains the value from the section and saves it to the **Task** object * @param an html object related to the html defined above * @param the task object * @param the section's configuration object */ - get_value( + get_value ( node: HTMLElement, task: Task, section: LightboxSection ): any, - + /** * a function to set focus to the section * @param an html object related to the html defined above */ - focus(node: HTMLElement): void + focus ( node: HTMLElement ): void } -export interface LightboxSectionState { - +export interface LightboxSectionState { + /** * the configuration object of the section + * @param the section id * @param the section name. According to the name, the gantt takes the label for the section from the **locale.labels** collection. For example, for the 'description' section, the label will be taken as **gantt.locale.labels.section_description** * @param the section height @@ -4330,7 +4421,7 @@ export interface LightboxSectionState { * @param the editor type * @param if set to *true*, the related field will take the focus on opening the lightbox */ - section: { + section: { id: string, name: string, height: number, @@ -4338,93 +4429,94 @@ export interface LightboxSectionState { type: string, focus: boolean }, - + /** * a div with the section body */ node: HTMLElement, - + /** * a div with the section header */ header: HTMLElement, - + /** * a collection of controls used in the section */ control: HTMLCollection, - + /** * returns an object with the section's data */ - getValue(): any, - + getValue ( ): any, + /** * sets the value(s) for the section. As a parameter the method takes a value (or an object with values if the section has several controls) that should be set * @param a value for the section * @param optional, an object with any properties */ - setValue(value: any, valueObject?: CustomObject): any + setValue ( value: any, valueObject?: CustomObject ): any } -export interface DataToLoad1 { - +export interface DataToLoad1 { + /** * the array with the task data */ data: [] | NewTask[] - tasks?: undefined + tasks?: undefined /** * the array with the link data */ links?: Link[] - + /** * the array with the resource data */ resources?: NewResourceItem[] - + /** * the array with the assignment data */ assignments?: NewAssignmentItem[] - + /** * the object that has the arrays with the custom data */ collections?: Сollections } -export interface DataToLoad2 { - +export interface DataToLoad2 { + /** * the array with the task data */ tasks: [] | NewTask[] - data?: undefined + data?: undefined /** * the array with the link data */ links?: Link[] - + /** * the array with the resource data */ resources?: NewResourceItem[] - + /** * the array with the assignment data */ assignments?: NewAssignmentItem[] - + /** * the object that has the arrays with the custom data */ collections?: Сollections } - + /** * the task object that will be added to Gantt. It can have the following properties: + * @param optional, the task ID, auto-generated if not set. * @param optional, the date when a task is scheduled to begin. * @param optional, the task duration. @@ -4435,7 +4527,7 @@ export interface DataToLoad2 { * @param optional, the date of the task constraint. * @param any other property you want to add, including the ones from the [**Task** object](desktop/task_properties.md) */ -export type NewTask = string | {} | { +export type NewTask = string | {} | { id?: string | number, start_date?: string | Date, duration?: number, @@ -4447,9 +4539,10 @@ export type NewTask = string | {} | { [customProperty: string]: any } - + /** * the resource item object that will be added to Gantt. It can have the following properties: + * @param optional, the resource ID, auto-generated if not set * @param optional, the ID of the parent resource * @param optional, the resource name @@ -4458,7 +4551,7 @@ export type NewTask = string | {} | { * @param optional, the value that is assigned by default when adding the assignment in the lightbox section * @param any other property you want to add */ -export type NewResourceItem = { +export type NewResourceItem = { id?: string | number, parent?: string | number, text?: string, @@ -4468,9 +4561,10 @@ export type NewResourceItem = { [customProperty: string]: any } - + /** * the assignment item object that will be added to Gantt. It can have the following properties: + * @param optional, the assignment ID, auto-generated if not set * @param the ID of the task the resource is assigned to * @param the ID of the resource that is assigned to the task @@ -4482,7 +4576,7 @@ export type NewResourceItem = { * @param optional, the date the assignment should end * @param any other property you want to add */ -export type NewAssignmentItem = { +export type NewAssignmentItem = { id?: string | number, task_id: string | number, resource_id: string | number, @@ -4496,16 +4590,16 @@ export type NewAssignmentItem = { } -export interface Сollections { - +export interface Сollections { + /** * an array that contains the collection items. */ [collectionName: string]: [] | СollectionItem[] } -export interface СollectionItem { - +export interface СollectionItem { + /** * any custom property of the collection item. */ @@ -4518,233 +4612,233 @@ export interface ScaleArray extends Array { export type Scales = ScaleArray; -export interface Scale { - +export interface Scale { + /** * the name of the scale unit. The available values are: "minute", "hour", "day" (default), "week", "quarter", "month", "year". */ unit: string, - + /** * the step of the time scale (X-Axis), 1 by default. */ step?: number, - + /** * a function that returns the name of a CSS class that will be applied to the scale units. Takes a date object as a parameter. * @param a date that will be checked */ - css?(date: Date): any, - + css? ( date: Date ): any, + /** * the format of the scale's labels. If set as a function, expects a date object as a parameter. * @param a date that will be converted */ - format?: string | ((date: Date,) => any), - + format?: string | ( (date: Date, ) => any ), + /** * the format of the scale's labels. If set as a function, expects a date object as a parameter. * @param a date that will be converted */ - date?: string | ((date: Date,) => any) + date?: string | ( (date: Date, ) => any ) } -export interface MessagePopupConfig { - +export interface MessagePopupConfig { + /** * optional, the ID of the popup message */ id?: number | string - + /** * the content of the popup message */ text: number | string - + /** * optional, the class name of the popup message */ type?: string - + /** * optional, the time period until the popup message disappears. -1 means, it won't hide by itself */ expire?: number } -export interface MessagePopupObject { +export interface MessagePopupObject { /** * calls a message box of the specified type */ (config: string | number | MessagePopupConfig): string | number | HTMLElement - + /** * the position of the popup message. Possible values are: "top", "bottom", "left", "right" */ position: string - + /** * specifies if Gantt should block keyboard events. *true* by default. */ keyboard: boolean - + /** * a function that hides the popup message. Uses **id** as a parameter: * @param the ID of the popup message */ - hide(id: number | string): any + hide ( id: number | string ): any } -export interface AlertBoxConfig { - +export interface AlertBoxConfig { + /** * optional, the ID of the alert box */ id?: number | string - + /** * the text of the alert box's body */ text: number | string - + /** * optional, the text of the header */ title?: number | string - + /** * optional, the text of the "OK" button */ ok?: number | string - + /** * optional, the position of the alert box for now supports only one value - "top", any other value will result in "center-align" */ position?: string - + /** * optional, the width of the alert box (set as CSS [](https://developer.mozilla.org/en-US/docs/Web/CSS/length) or */ width?: string - + /** * optional, the height of the alert box (set as CSS [](https://developer.mozilla.org/en-US/docs/Web/CSS/length) or */ height?: string - + /** * optional, the function called on button click. Takes *true* as a parameter (subject to the clicked button) * @param result of the clicked button, always returns **true** (because there is only the "OK" button) */ - callback?(result: boolean): void + callback? ( result: boolean ): void } -export interface ConfirmBoxConfig { - +export interface ConfirmBoxConfig { + /** * optional, the ID of the confirm box */ id?: number | string - + /** * the text of the confirm box's body */ text: number | string - + /** * optional, the text of the header */ title?: number | string - + /** * optional, the text of the "OK" button */ ok?: number | string - + /** * optional, the text of the "Cancel" button */ cancel?: number | string - + /** * optional, the position of the confirm box for now supports only one value - "top", any other value will result in "center-align" */ position?: string - + /** * optional, the width of the confirm box (set as CSS [](https://developer.mozilla.org/en-US/docs/Web/CSS/length) or */ width?: string - + /** * optional, the height of the confirm box (set as CSS [](https://developer.mozilla.org/en-US/docs/Web/CSS/length) or */ height?: string - + /** * optional, the function called on button click. Takes *true* or *false* as a parameter (subject to the clicked button) * @param result of the clicked button: **true** for "OK", **false** for "Cancel". */ - callback?(result: boolean): void + callback? ( result: boolean ): void } -export interface ModalBoxConfig { - +export interface ModalBoxConfig { + /** * optional, the ID of the modal box */ id?: number | string - + /** * the text of the modal box's body */ text: number | string - + /** * optional, the text of the header */ title?: number | string - + /** * the array of buttons */ buttons: string[] | number[] | ModalboxButton[] - + /** * optional, the position of the modal box for now supports only one value - "top", any other value will result in "center-align" */ position?: string - + /** * optional, the width of the modal box (set as CSS [](https://developer.mozilla.org/en-US/docs/Web/CSS/length) or */ width?: string - + /** * optional, the height of the modal box (set as CSS [](https://developer.mozilla.org/en-US/docs/Web/CSS/length) or */ height?: string - + /** * optional, the function called on button click. Takes *true* or *false* as a parameter (subject to the clicked button) * @param The result of the callback function will be equal to the stringified index of a pressed button from the array ("0", "1", "2",...) */ - callback?(result: string | number | boolean): void + callback? ( result: string | number | boolean ): void } -export interface ModalboxButton { - +export interface ModalboxButton { + /** * the text of the button */ label: string | number - + /** * optional, the value that is returned in the *result* argument of the *callback* function. */ value?: string | number | boolean - + /** * optional, a custom class name for the button, prefixed with the "gantt_" string. */ @@ -4753,17 +4847,18 @@ export interface ModalboxButton { export type WorkDayConfig = string | number | boolean | Array -export type WorkDaysTuple = [WorkDayConfig, WorkDayConfig, WorkDayConfig, WorkDayConfig, WorkDayConfig, WorkDayConfig, WorkDayConfig,] - -export interface CalendarConfig { +export type WorkDaysTuple = [WorkDayConfig, WorkDayConfig, WorkDayConfig, WorkDayConfig, WorkDayConfig, WorkDayConfig, WorkDayConfig, ] +export interface CalendarConfig { + /** * optional, the calendar id */ id?: string | number, - + /** * an object that sets the worktime in days and hours. It can include: + * @param optional, an array with global working hours, sets the start and end hours of the task * @param optional, an array of 7 days of the week (from 0 - Sunday, to 6 - Saturday), where 1/true stands for a working day and 0/false - a non-working day * @param optional, an object with different working-time rules for different periods of time. The object can contain a set of key:value pairs where key is the name of a time span and value is an object with a list of attributes. @@ -4773,7 +4868,7 @@ export interface CalendarConfig { * @param optional, an array of working hours as 'from'-'to' pairs.'false' value sets a day-off, 'true' (default value) applies the default hours (["8:00-17:00"]) * @param optional, an array of 7 days of the week (from 0 - Sunday, to 6 - Saturday), where 1/true stands for a working day and 0/false - a non-working day. */ - worktime?: { + worktime?: { hours?: string[] | number[] | boolean, days?: WorkDaysTuple, customWeeks?: { @@ -4787,234 +4882,236 @@ export interface CalendarConfig { } } -export interface MarkerConfig { - +export interface MarkerConfig { + /** * the marker id */ id?: string | number, - + /** * a Date object that sets the marker's start date */ start_date: Date, - + /** * a Date object that sets the marker's end date */ end_date?: Date, - + /** * a CSS class applied to the marker */ css?: string, - + /** * the marker title */ text?: string | number, - + /** * the marker's tooltip */ title?: string | number } -export interface HandlerSettings { - +export interface HandlerSettings { + /** * the id of the event handler. */ id?: string | number, - + /** * defines whether the event will be executed only once. */ once?: boolean, - + /** * specifies the `this` object for the listener. */ thisObject?: any } -export interface GanttUIState { - +export interface GanttUIState { + /** * reveals if Gantt is auto-scrolled (*true*). Added only when the */ autoscroll: boolean, - + /** * the update mode. *true* if the method is called inside the [*batchUpdate*](api/gantt_batchupdate.md) method. */ batch_update: boolean, - + /** * the resizing mode of a task. *true* means the task is resized from the start, *false* means that the task is resized from the end. When the task is not resized, it is *null*. */ drag_from_start: boolean | null, - + /** * the id of a task that the user is currently dragging in the Gantt chart. *undefined* or *null*, if no tasks are being dragged in the Gantt chart. */ drag_id: string | null | undefined, - + /** * the drag mode. Has these values: 'move','resize','progress', 'ignore' when a task is dragged. Otherwise, has *null* or *undefined* value. */ drag_mode: string | null | undefined, - + /** * the flag for the fullscreen mode. *true*, if the Gantt chart is in the fullscreen mode, *false* otherwise. */ fullscreen: boolean, - + /** * the id of a task that is currently opened in the lightbox. *undefined* or *null*, if no tasks are opened in the lightbox. */ lightbox: string | null | undefined, - + /** * the new link creation state, returns *true* when the link is created from the start of the predecessor task. */ link_from_start: boolean | null, - + /** * the new link creation state, returns *true* if the mouse points to the link drag element (bubble). */ link_landing_area: boolean, - + /** * the new link creation state. the id of the source (predecessor) task. */ link_source_id: string | number | null, - + /** * the new link creation state. the id of the target (successor) task. */ link_target_id: string | number | null, - + /** * the new link creation state, returns *true* when the link is created to the start of the successor task. */ link_to_start: boolean, - + /** * the date that tasks are displayed in the chart from */ min_date: Date, - + /** * the date that tasks are displayed in the chart till */ max_date: Date, - + /** * the unit of the background grid of the timeline */ scale_unit: string, - + /** * the step of the background grid of the timeline */ scale_step: number, - + /** * the id of the currently selected task. *undefined* or *null*, if no tasks are selected in the Gantt chart. */ selected_task: string | null | undefined } -export interface RoundDateConfig { - +export interface RoundDateConfig { + /** * the Date object to round; */ date: Date, - + /** * the time unit ("minute", "hour", "day", "week", "month", "year"); */ unit?: string, - + /** * the step of the time scale (X-Axis), 1 by default. */ step?: number } -export interface LinkForValidation { - +export interface LinkForValidation { + /** * the ID of the source (predecessor) task. */ source: string | number, - + /** * the ID of the target (successor) task. */ target: string | number, - + /** * the link type. */ type: string } -export interface GroupConfig { - +export interface GroupConfig { + /** * a property of a task object that will be used to group items. */ relation_property: string, - + /** * an array of the groups (summary) items. Each item should have the properties set in the **group_id** and **group_text** parameters (by default, *key* and *label*). */ groups: СollectionItem[], - + /** * optional, the group's id. The default value is 'key'. */ group_id?: string, - + /** * optional, the group's label. The default value is 'label'. */ group_text?: string, - + /** * optional, the delimiter is used for automatic creation of groups for tasks with multiple resources. The default value is ",". */ delimiter?: string, - + /** * optional, the name of the default group. Optional. The default value is 'None'. */ default_group_label?: string, - + /** * optional, defines whether the gantt should save its tree structure inside groups. If not specified or set to *false*, gantt tasks will be displayed in a flat list view. */ save_tree_structure?: boolean } - + /** * an object that stores the commands of the Undo or Redo action + * @param an array that stores the changes (commands) of the Undo or Redo action. */ -export type UndoRedoAction = { commands: UndoRedoCommand[] } - +export type UndoRedoAction = { commands: UndoRedoCommand[] } + /** * an object that stores the initial and updated state of the **Task** or **Link** objects: + * @param the type of a command: "add/remove/update" * @param the type of the object which was changed: "task" or "link" * @param the changed task/link object * @param the task/link object before changes */ -export type UndoRedoCommand = { +export type UndoRedoCommand = { type: string, entity: string, value: Task | Link, @@ -5022,87 +5119,89 @@ export type UndoRedoCommand = { } -export interface ResourceAssignment { - +export interface ResourceAssignment { + /** * the id of the assignment */ id: string | number, - + /** * the ID of the task the resource is assigned to. */ task_id: string | number, - + /** * the ID of the resource that is assigned to the task. */ resource_id: string | number, - + /** * the quantity of the resources assigned to a task */ value: number | string, - + /** * the difference between the assignment start date and the task start date */ delay: number, - + /** * the date the assignment should start */ start_date: Date, - + /** * the date the assignment should end */ end_date: Date, - + /** * the duration of the assignment */ duration: number, - + /** * the calculation mode of the time of the resource assignment: "default"|"fixedDates"|"fixedDuration" */ mode: string, - + /** * any custom property */ [customProperty: string]: any } - + /** * object specifying one of the predefined modes of sending the data + * @param the URL to the server side * @param optional, the mode of sending data to the server: "JSON" | "REST-JSON" | "JSON" | "POST" | "GET" * @param optional, defines whether the task must be deleted from the gantt only after a successful response from the server. Dependency links and subtasks will be deleted after the deletion of the parent task is confirmed. */ -export type DataProcessorConfig = { +export type DataProcessorConfig = { url: string, mode?: string, deleteAfterConfirmation?: boolean } - + /** * the router configuration for different entities + * @param the router object for tasks * @param the router object for links * @param the router object for resources * @param the router object for assignments */ -export type RouterConfig = { +export type RouterConfig = { task?: RouterForEntity, link?: RouterForEntity, resource?: RouterForEntity, assignment?: RouterForEntity } - + /** * the router function to process changes in Gantt * @param the name of the relevant entity. Possible values are: "task"|"link"|"resource"|"assignment" @@ -5118,173 +5217,173 @@ export type RouterFunction = ( ) => Promise -export interface RouterForEntity { - +export interface RouterForEntity { + /** * a function to process adding of items * @param the processed item */ - create(data: Task | Link | ResourceAssignment | CustomObject): Promise - + create ( data: Task | Link | ResourceAssignment | CustomObject ): Promise + /** * a function to process updating of items * @param the processed item * @param the id of a processed item */ - update(data: Task | Link | ResourceAssignment | CustomObject, id: string | number): Promise - + update ( data: Task | Link | ResourceAssignment | CustomObject, id: string | number ): Promise + /** * a function to process deleting of items * @param the id of a processed item */ - delete(id: string | number): Promise + delete ( id: string | number ): Promise } -export interface CustomObject { +export interface CustomObject { /* * @param Any custom property with any type */ [propertyName: string]: any } -export interface DateHelpers { - +export interface DateHelpers { + /** * adds/subtracts the specified time interval to/from the date * @param the date object that you need to add a time to/subtract a time from * @param the number of units to add. If this number is positive - the time will be added to the date, if negative - the time will be subtracted * @param the time unit. Values: 'minute', 'hour', 'day', 'week', 'month', 'year'. */ - add(date: Date, number: number, unit: string): Date, - + add (date: Date, number: number, unit: string): Date, + /** * adds/subtracts the specified number of quarters to/from the date * @param the date object that you need to add quarters to/subtract quarters from * @param the number of quarters */ - add_quarter(date: Date, number: number): Date, - + add_quarter (date: Date, number: number): Date, + /** * converts local time to UTC * @param the date object to convert */ - convert_to_utc(date: Date): Date, - + convert_to_utc (date: Date): Date, + /** * makes a copy of a Date object * @param the date object to copy */ - copy(date: Date): Date, - + copy (date: Date): Date, + /** * resets the time part of the provided date to 00:00:00 * @param the date object to format */ - date_part(date: Date): Date, - + date_part (date: Date): Date, + /** * returns a function that converts a Date object to a string of the specified format * @param the date format * @param specifies whether local time should be converted to UTC */ - date_to_str(format: string, utc?: boolean): Function, - + date_to_str (format: string, utc?: boolean): Function, + /** * resets the time part of the provided date to 00:00:00. Alias of the date_part method. Used by the Day view to set the display date and can be redefined to provide the default behaviour * @param the date object to format */ - day_start(date: Date): Date, - + day_start (date: Date): Date, + /** * returns the ISO-8601 week number of the date, weeks starts on Monday * @param the date object to format */ - getISOWeek(date: Date): number, - + getISOWeek (date: Date): number, + /** * returns the week number of the date, but previously converts local time to UTC * @param the date object to format */ - getUTCISOWeek(date: Date): number, - + getUTCISOWeek (date: Date): number, + /** * returns the week number of the date. Weeks start either on Monday or Sunday, depending on the value of the api/gantt_start_on_monday_config.md property. * @param the date object to format */ - getWeek(date: Date): number, - + getWeek (date: Date): number, + /** * returns a Date object of the first day of the month for the specified date and clears the time part to zero * @param the date object to format */ - month_start(date: Date): Date, - + month_start (date: Date): Date, + /** * converts a string of the specified format to a Date object * @param a date as a string * @param the date format */ - parseDate(date: string, format: string): Date, - + parseDate (date: string, format: string): Date, + /** * returns a function that converts a string of the specified format to a Date object * @param the date format * @param specifies whether local time should be converted to UTC */ - str_to_date(format: string, utc?: boolean): Function, - + str_to_date (format: string, utc?: boolean): Function, + /** * returns the time of a Date object as a number of seconds counted from the midnight (00:00:00) * @param the date object to format */ - time_part(date: Date): number, - + time_part (date: Date): number, + /** * adds the leading zero to numbers less than 10 and returns the result as a string. Doesn't affect numbers from 10 * @param the number to format */ - to_fixed(num: number): string, - + to_fixed (num: number): string, + /** * returns a Date object of the specified date and clears the part with seconds to zero * @param the date object to format */ - minute_start(date: Date): Date, - + minute_start (date: Date): Date, + /** * returns a Date object of the specified date and clears the part with minutes and seconds to zero * @param the date object to format */ - hour_start(date: Date): Date, - + hour_start (date: Date): Date, + /** * returns a Date object of the first day of the week for the specified date and clears the time part to zero * @param the date object to format */ - week_start(date: Date): Date, - + week_start (date: Date): Date, + /** * returns a Date object of the first month of the quarter for the specified date and clears the time part to zero * @param the date object to format */ - quarter_start(date: Date): Date, - + quarter_start (date: Date): Date, + /** * returns a Date object of the first day of the year for the specified date and clears the time part to zero * @param the date object to format */ - year_start(date: Date): Date + year_start (date: Date): Date [customTemplate: string]: any; } -export interface Calendar { - +export interface Calendar { + /** * the id of a task's calendar */ id: string | number, - + /** * sets the working time for the Gantt chart * @param the [configuration object](api/gantt_setworktime.md#configurationobjectproperties) of a time span: @@ -5298,7 +5397,7 @@ export interface Calendar { * @param optional, an array of working hours as 'from'-'to' pairs.'false' value sets a day-off, 'true' (default value) applies the default hours (["8:00-17:00"]) * @param optional, an array of 7 days of the week (from 0 - Sunday, to 6 - Saturday), where 1/true stands for a working day and 0/false - a non-working day. */ - setWorkTime( + setWorkTime ( config: { day?: string | number, date?: Date, @@ -5313,7 +5412,7 @@ export interface Calendar { }, } ): boolean, - + /** * unsets a working time in the Gantt Chart * @param the [configuration object](api/gantt_unsetworktime.md#configurationobjectproperties) of a time span: @@ -5321,14 +5420,14 @@ export interface Calendar { * @param optional, a specific date to set as a working day or day off * @param optional, an array of working hours as 'from'-'to' pairs. */ - unsetWorkTime( + unsetWorkTime ( config: { day?: string | number, date?: Date, hours?: string[] | number[] | boolean, } ): void, - + /** * checks whether the specified date is working * @param either a date to check or the [configuration object](api/gantt_isworktime.md#configurationobjectproperties) of a time span: @@ -5337,7 +5436,7 @@ export interface Calendar { * @param optional, the object of the task the duration of which should be calculated * @param optional, a time unit: "minute", "hour", "day", "week", "month", "year". Not needed at all when the first parameter is specified as an object */ - isWorkTime( + isWorkTime ( config: Date | { date: Date, unit?: string, @@ -5345,7 +5444,7 @@ export interface Calendar { }, time_unit?: string ): boolean, - + /** * returns the closest working time * @param the [configuration object](api/gantt_getclosestworktime.md#configurationobjectproperties): @@ -5354,7 +5453,7 @@ export interface Calendar { * @param optional, a time unit to search for the closest working time * @param optional, the object of the task to use its calendar */ - getClosestWorkTime( + getClosestWorkTime ( config: Date | { date: Date, dir?: string, @@ -5362,7 +5461,7 @@ export interface Calendar { task?: Task, } ): Date, - + /** * calculates the end date of a task * @param either the date when a task is scheduled to begin or the [configuration object](api/gantt_calculateenddate.md#configurationobjectproperties) of a time span: @@ -5373,7 +5472,7 @@ export interface Calendar { * @param optional, the duration of a task. Not needed at all when the first parameter is specified as an object * @param optional, the time unit of the duration. Not needed at all when the first parameter is specified as an object */ - calculateEndDate( + calculateEndDate ( config: Date | { start_date: Date, duration: number, @@ -5383,7 +5482,7 @@ export interface Calendar { duration?: number, unit?: string ): Date, - + /** * calculates the duration of a task * @param either the date when a task is scheduled to begin or the [configuration object](api/gantt_calculateduration.md#configurationobjectproperties) of a time span: @@ -5392,7 +5491,7 @@ export interface Calendar { * @param optional, the object of the task the duration of which should be calculated * @param the date when a task is scheduled to be completed. Not needed at all when the first parameter is specified as an object */ - calculateDuration( + calculateDuration ( config: Date | { start_date: Date, end_date: Date, @@ -5404,172 +5503,172 @@ export interface Calendar { [customMethod: string]: any; } -export interface DomHelpers { - +export interface DomHelpers { + /** * returns position of the element on the screen in the format of `{x:number, y:number,width:number, height:number}` object * @param DOM element that will be checked */ - getNodePosition(node: HTMLElement): object, - + getNodePosition ( node: HTMLElement ): object, + /** * returns mouse coordinates relatively to the DOM element in the format of `{x:number, y:number}` object * @param event that occured * @param DOM element that will be checked */ - getRelativeEventPosition(e: Event, node: HTMLElement): object, - + getRelativeEventPosition ( e: Event, node: HTMLElement ): object, + /** * returns `true` if the node provided as the first argument is DOM child of the node provided as the second argument * @param child node that will be checked * @param parent node that will be checked */ - isChildOf(child: HTMLElement, parent: HTMLElement): boolean, - + isChildOf ( child: HTMLElement, parent: HTMLElement ): boolean, + /** * returns `true` if the class list of the provided `node` contains a specified css class * @param DOM element that will be checked * @param class name that will be checked */ - hasClass(node: HTMLElement, className: string): boolean, - + hasClass ( node: HTMLElement, className: string ): boolean, + /** * returns the first node that matches the provided css selector, starting from the `node` attribute, up to its DOM parents' branch. * @param DOM element will be checked * @param a class name for the target node */ - closest(node: HTMLElement, cssSelector: string): HTMLElement + closest ( node: HTMLElement, cssSelector: string ): HTMLElement [customMethod: string]: any; } -export interface DatastoreConfig { - +export interface DatastoreConfig { + /** * an arbitrary string name of the datastore. The datastore can be accessed by its name using api/gantt_getdatastore.md. */ name: string, - + /** * optional, accepts only one fixed value **"treeDatastore"**. If the type:"treeDatastore" is specified, the datastore will support hierarchical data, with the **id** property as a primary key, and **parent** as a link to the parent id. Any other value will produce a flat list datastore. */ type?: string, - + /** * optional, enables showing all tasks assigned to a certain resource in the resource view panel. This functionality works both for the resource diagram and resource histogram types of layout. */ fetchTasks?: boolean, - + /** * optional, preprocesses items loaded into the datastore. It is a good place to set the default values of the datastore items. The function takes the following parameter: * @param the resource item. */ - initItem?(item: any): any + initItem? ( item: any ): any } -export interface DatastoreMethods { - +export interface DatastoreMethods { + /** * loads data from an array * @param the data to load */ - parse(data: Array): void, - + parse ( data: Array ): void, + /** * returns the item by its id * @param the id of the item */ - getItem(id: string | number): object | void, - + getItem ( id: string | number ): object | void, + /** * updates the specified item * @param the id of the item * @param an object the item */ - updateItem(id: string | number, item?: object): void, - + updateItem ( id: string | number, item?: object ): void, + /** * deletes the specified item * @param the id of the item */ - removeItem(id: string | number): void, - + removeItem ( id: string | number ): void, + /** * checks whether the specified item is visible or hidden via filters * @param the id of the item */ - isVisible(id: string | number): boolean, - + isVisible ( id: string | number ): boolean, + /** * returns the array of visible items */ - getVisibleItems(): Array, - + getVisibleItems (): Array, + /** * adds a new item to the datastore * @param the item object * @param the position the task will be added into (0 or greater) */ - addItem(item: object, index?: number): number | string, - + addItem ( item: object, index?: number ): number | string, + /** * changes the id of the item * @param the current item's id * @param the new item's id */ - changeId(oldId: string | number, newId: string | number): void, - + changeId ( oldId: string | number, newId: string | number ): void, + /** * checks whether the specified item exists in the datastore * @param the item's id */ - exists(id: string | number): boolean, - + exists ( id: string | number ): boolean, + /** * moves an item to a new position * @param the index of the current position of the task * @param the index of the position that the item will be moved to */ - move(sindex: number, tindex: number): void, - + move ( sindex: number, tindex: number ): void, + /** * clears the datastore */ - clearAll(): void, - + clearAll (): void, + /** * execute the code without firing API events of the datastore * @param the callback function */ - silent(callback: Function): void, - + silent ( callback: Function ): void, + /** * fires repainting of events of the specified record, runs filters * @param optional, the id of the record */ - refresh(id?: string | number): void, - + refresh ( id?: string | number ): void, + /** * returns the number of items that are currently loaded into the datastore */ - count(): number, - + count (): number, + /** * returns the number of items that are currently visible */ - countVisible(): number, - + countVisible (): number, + /** * iterates over all tasks of the datastore * @param the callback function */ - eachItem(callback: Function): void, - + eachItem ( callback: Function ): void, + /** * runs the filters and updates visible array of items */ - filter(): void, - + filter (): void, + /** * sorts items in the resource grid * @param the name of the column that the resource grid will be sorted by or a custom sorting function @@ -5577,188 +5676,188 @@ export interface DatastoreMethods { * @param the id of the parent item. Specify the parameter if you want to sort items only in the branch of the specified parent. * @param specifies whether rendering should be invoked after reordering items */ - sort(field: string | Function, desc?: boolean, parent?: string | number, silent?: boolean): void, - + sort ( field: string | Function, desc?: boolean, parent?: string | number, silent?: boolean ): void, + /** * returns records between the specified indexes * @param the position of the start record * @param the position of the end record */ - getIndexRange(from: number, to: number): Array, - + getIndexRange ( from: number, to: number ): Array, + /** * returns all records of the datastore */ - getItems(): Array, - + getItems (): Array, + /** * returns the id of the item by its index. Returns `undefined` if there is no item at the specified index. * @param the position of the item */ - getIdByIndex(index: number): string | number | void, - + getIdByIndex ( index: number ): string | number | void, + /** * returns the index of the item by its id. Returns `-1` if no such item exists in the datastore. * @param the id of the item */ - getIndexById(id: string | number): number, - + getIndexById ( id: string | number ): number, + /** * returns the id of the first item of the datastore */ - getFirst(): string | number | null, - + getFirst (): string | number | null, + /** * returns the id of the last item of the datastore */ - getLast(): string | number | null, - + getLast (): string | number | null, + /** * returns the id of the next item of the datastore * @param the item's id */ - getNext(id: string | number): string | number | null, - + getNext ( id: string | number ): string | number | null, + /** * returns the id of the previous item of the datastore * @param the item's id */ - getPrev(id: string | number): string | number | null, - + getPrev ( id: string | number ): string | number | null, + /** * clears the datastore and removes all attached event handlers. The datastore is not usable after this method is called. */ - destructor(): void, - + destructor (): void, + /** * attaches the handler to an inner event of DataStore * @param the event's name, case-insensitive * @param the handler function * @param optional, an object with settings for the event handler */ - attachEvent(event: T, handler: TreeDatastoreEvents[T], settings?: object): boolean, - + attachEvent (event: T, handler: TreeDatastoreEvents[T], settings?: object): boolean, + /** * calls an inner event * @param the event's name, case-insensitive * @param an array of the event-related data */ - callEvent(name: string, params: Array): boolean, - + callEvent ( name: string, params: Array ): boolean, + /** * detaches a handler from an event (which was attached before by the attachEvent() method) * @param the event's id */ - detachEvent(id: string): void + detachEvent ( id: string ): void } -export interface DatastoreEvents { - +export interface DatastoreEvents { + /** * fires when an item is being loaded from the data source * @param the object of an item */ - "onItemLoading": (item: any) => any, - + "onItemLoading": ( item: any ) => any, + /** * fires before data started to be parsed * @param the array with the data that was loaded */ - "onBeforeParse": (data: Array) => any, - + "onBeforeParse": ( data: Array ) => any, + /** * fires after data were parsed (became available for API) but before they were rendered in the Gantt chart * @param the array with the data that was loaded */ - "onParse": (data: Array) => any, - + "onParse": ( data: Array ) => any, + /** * fires before an item is updated * @param the id of an item * @param the new (updated) object of the item */ - "onBeforeUpdate": (id: string | number, item: any) => any, - + "onBeforeUpdate": ( id: string | number, item: any ) => any, + /** * fires after an item is updated * @param the id of an item * @param the object of the item */ - "onAfterUpdate": (id: string | number, item: any) => any, - + "onAfterUpdate": ( id: string | number, item: any ) => any, + /** * fires before an item is deleted * @param the id of an item * @param the object of the item */ - "onBeforeDelete": (id: string | number, item: any) => any, - + "onBeforeDelete": ( id: string | number, item: any ) => any, + /** * fires after an item is deleted * @param the id of an item * @param the object of the item */ - "onAfterDelete": (id: string | number, item: any) => any, - + "onAfterDelete": ( id: string | number, item: any ) => any, + /** * fires before a new item is added to the datastore * @param the id of an item * @param the object of the item */ - "onBeforeAdd": (id: string | number, item: any) => any, - + "onBeforeAdd": ( id: string | number, item: any ) => any, + /** * fires after an item is added to the datastore * @param the id of an item * @param the object of the item */ - "onAfterAdd": (id: string | number, item: any) => any, - + "onAfterAdd": ( id: string | number, item: any ) => any, + /** * fires when the id of an item is changed * @param the id of an item * @param the new id of the item */ - "onIdChange": (id: string | number, newId: string | number) => any, - + "onIdChange": ( id: string | number, newId: string | number ) => any, + /** * fires after all items were removed from the datastore */ "onClearAll": () => any, - + /** * fires before the datastore is refreshed * @param the id of an item or null * @param the item object or null * @param the action type ("paint", "move", "add", "delete", null) */ - "onBeforeStoreUpdate": (id: string | number | null, item: any | null, action: string | null) => any, - + "onBeforeStoreUpdate": ( id: string | number | null, item: any | null, action: string | null ) => any, + /** * fires after the datastore has been refreshed * @param the id of an item or null * @param the item object or null * @param the action type ("paint", "move", "add", "delete", null) */ - "onStoreUpdated": (id: string | number | null, item: any | null, action: string | null) => any, - + "onStoreUpdated": ( id: string | number | null, item: any | null, action: string | null ) => any, + /** * fires before filtering is applied */ "onBeforeFilter": () => any, - + /** * fires after the datastore has update the filtering state */ "onFilter": () => any, - + /** * fires for each item during the filtering stage, returning `false` will mark item as not visible * @param the id of an item * @param the item object */ - "onFilterItem": (id: string | number, item: any) => any, - + "onFilterItem": ( id: string | number, item: any ) => any, + /** * fires after the destructor() method of the datastore is called */ @@ -5768,7 +5867,7 @@ export interface DatastoreEvents { } export interface TreeDatastoreMethods extends DatastoreMethods { - + /** * moves an item to the new position or to a new parent * @param the id of the item to move @@ -5776,96 +5875,96 @@ export interface TreeDatastoreMethods extends DatastoreMethods { * @param the parent id. If specified, the tindex will refer to the index in the 'parent' branch */ - move(sid: string | number, tindex: number, parent?: string | number): boolean | void, - + move ( sid: string | number, tindex: number, parent?: string | number ): boolean | void, + /** * returns the index of an item in the branch * @param the id of the item */ - getBranchIndex(id: string | number): number, - + getBranchIndex ( id: string | number ): number, + /** * checks whether the specified item has child items * @param the id of the item */ - hasChild(id: string | number): number | void, - + hasChild ( id: string | number ): number | void, + /** * returns the 1st-level child items of the specified parent branch * @param the id of the parent branch */ - getChildren(id: string | number): Array, - + getChildren ( id: string | number ): Array, + /** * checks whether an item is a child of a different item * @param the id of an item that you want to check as a child * @param the id of an item that you want to check as a parent */ - isChildOf(childId: string | number, parentId: string | number): boolean, - + isChildOf ( childId: string | number, parentId: string | number ): boolean, + /** * returns siblings of the specified item (including itself) * @param the id of the item */ - getSiblings(id: string | number): Array, - + getSiblings ( id: string | number ): Array, + /** * returns the id of the next item of the same level * @param the id of the item */ - getNextSibling(id: string | number): number | string | null, - + getNextSibling ( id: string | number ): number | string | null, + /** * returns the id of the previous item of the same level * @param the id of the item */ - getPrevSibling(id: string | number): number | string | null, - + getPrevSibling ( id: string | number ): number | string | null, + /** * returns the id of the parent item or 0. * @param the id of the item */ - getParent(id: string | number): number | string, - + getParent ( id: string | number ): number| string, + /** * calculates the level of nesting of an item * @param the item's object */ - calculateItemLevel(item: object): number, - + calculateItemLevel ( item: object ): number, + /** * sets the parent for an item. The parent id will be writen to the property specified by `parentProperty` config, "item.parent" by default. * @param the item's object * @param the id of the parent */ - setParent(item: object, newParentId: string | number | null): void, - + setParent ( item: object, newParentId: string | number | null ): void, + /** * iterates over all children of a specific item * @param the callback function * @param the id of the parent */ - eachItem(callback: Function, parentId?: string | number): void, - + eachItem ( callback: Function, parentId?: string | number ): void, + /** * iterates over all parent items of the specified item * @param the callback function * @param the id of the item the parent item of which should be iterated over */ - eachParent(callback: Function, startItem: string | number): void, - + eachParent ( callback: Function, startItem: string | number ): void, + /** * opens the branch with the specified id * @param the branch id */ - open(id: string | number): void, - + open ( id: string | number ): void, + /** * closes the branch with the specified id * @param the branch id */ - close(id: string | number): void, - + close ( id: string | number ): void, + /** * sorts items in the resource grid * @param the name of the column that the resource grid will be sorted by or a custom sorting function @@ -5873,42 +5972,42 @@ export interface TreeDatastoreMethods extends DatastoreMethods { * @param the id of the parent item. Specify the parameter if you want to sort items only in the branch of the specified parent. * @param specifies whether rendering should be invoked after reordering items */ - sort(field: string | Function, desc?: boolean, parent?: string | number, silent?: boolean): void + sort ( field: string | Function, desc?: boolean, parent?: string | number, silent?: boolean ): void } export interface TreeDatastoreEvents extends DatastoreEvents { - + /** * fires before an item is moved to a new position * @param the id of the item to move * @param the parent id * @param the index of the position in the parent branch that the item will be moved to */ - "onBeforeItemMove": (id: string | number, parent: string | number, tindex: number) => any, - + "onBeforeItemMove": ( id: string | number, parent: string | number, tindex: number ) => any, + /** * fires after an item was moved to a new position * @param the id of the item to move * @param the parent id * @param the index of the position in the parent branch that the item will be moved to */ - "onAfterItemMove": (id: string | number, parent: string | number, tindex: number) => any, - + "onAfterItemMove": ( id: string | number, parent: string | number, tindex: number ) => any, + /** * fires on opening a branch * @param the id of the branch */ - "onItemOpen": (id: string | number) => any, - + "onItemOpen": ( id: string | number ) => any, + /** * fires on closing a branch * @param the id of the branch */ - "onItemClose": (id: string | number) => any + "onItemClose": ( id: string | number ) => any } -export interface InlineEditor { - +export interface InlineEditor { + /** * the function is called when you open the inline editor. Here, you can add a container for the DOM elements and initialize the third * @param task ID @@ -5916,18 +6015,18 @@ export interface InlineEditor { * @param the configuration object of the custom inline editor * @param the DOM element of the inline editor */ - show( + show ( id: string | number, column: GridColumn, config: any, placeholder: HTMLElement ): void, - + /** * optional, the function is called when hiding the inline editor */ - hide?(): void, - + hide? ( ): void, + /** * the function is called after the **show** function. There, you need to set the values to the inline editor elements from the **task** object. The parameters are: * @param the value of the task property @@ -5935,25 +6034,25 @@ export interface InlineEditor { * @param the column configuration object * @param the DOM element of the inline editor */ - set_value( + set_value ( value: any, id: string | number, column: GridColumn, node: HTMLElement ): void, - + /** * the function is called before hiding the inline editor. You need to obtain the values from the inline editor and add it to the **task** object. The parameters are: * @param task ID * @param the column configuration object * @param the DOM element of the inline editor */ - get_value( + get_value ( id: string | number, column: GridColumn, node: HTMLElement ): any, - + /** * optional, the function is called before hiding the inline editor. If you return **true** the changes will be saved, otherwise, they will be cancelled. The parameters are: * @param the value of the task property @@ -5961,13 +6060,13 @@ export interface InlineEditor { * @param the column configuration object * @param the DOM element of the inline editor */ - is_changed?( + is_changed? ( value: any, id: string | number, column: GridColumn, node: HTMLElement ): boolean, - + /** * optional, the function where you can add validation. If you return **false**, the changes will be cancelled. The parameters are: * @param the value of the task property @@ -5975,149 +6074,149 @@ export interface InlineEditor { * @param the column configuration object * @param the DOM element of the inline editor */ - is_valid?( + is_valid? ( value: any, id: string | number, column: GridColumn, node: HTMLElement ): boolean, - + /** * optional, the function for a complex save behavior, when the editor has the `map_to:auto` property. The parameters are: * @param task ID * @param the column configuration object * @param the Task object */ - save?( + save? ( id: string | number, column: GridColumn, node: HTMLElement ): void, - + /** * optional, this function is called when the inline editor receives focus. * @param the DOM element of the inline editor */ - focus?(node: HTMLElement): void + focus? ( node: HTMLElement ): void [customMethod: string]: any; } -export interface InlineEditorMethods { - +export interface InlineEditorMethods { + /** * opens an editor in the specified task/cell, sets the mapped value and puts browser focus on the editor * @param the task ID * @param the column name */ - startEdit(taskId: number | string, columnName: string): void, - + startEdit ( taskId: number | string, columnName: string ): void, + /** * opens an empty editor in specified task/cell * @param the task ID * @param the column name */ - show(taskId: number | string, columnName: string): void, - + show ( taskId: number | string, columnName: string ): void, + /** * populates an opened editor with values from the task */ - setValue(): void, - + setValue ( ): void, + /** * saves changes and hides an editor */ - save(): void, - + save ( ): void, + /** * hides an editor without saving changes */ - hide(): void, - + hide ( ): void, + /** * puts browser focus on the editor */ - focus(): void, - + focus ( ): void, + /** * gets the state object {id: taskId, columnName: columnName, placeholder: HTMLElement} */ - getState(): object, - + getState ( ): object, + /** * gets the current value of the editor */ - getValue(): string, - + getValue ( ): string, + /** * checks whether the current value of the editor differs from the initial value */ - isChanged(): boolean, - + isChanged ( ): boolean, + /** * checks whether the editor is opened */ - isVisible(): boolean, - + isVisible ( ): boolean, + /** * attaches an event handler to inlineEditors object * @param the name of the event handler * @param the function that will be called when the event fires */ - attachEvent(event: T, handler: InlineEditorEvents[T]): string, - + attachEvent (event: T, handler: InlineEditorEvents[T]): string, + /** * detaches a handler from an event (which was attached before by the attachEvent() method) * @param the id of the attached event handler */ - detachEvent(id: string): void, - + detachEvent ( id: string ): void, + /** * saves the current editor and moves editor to the next cell * @param the parameter specifies whether it can move the editor to the first cell of the next row after the last cell of the current one */ - editNextCell(canChangeRow?: boolean): void, - + editNextCell ( canChangeRow?: boolean ): void, + /** * saves the current editor and opens an editor in the same cell of the task below * @param the parameter specifies whether it can skip the read-only task and open an editor in the cell of the first editable task. The default *false* state of the parameter closes the editor if the next task is read-only. */ - editNextRow(skipReadonly?: boolean): void, - + editNextRow ( skipReadonly?: boolean ): void, + /** * saves the current editor and moves editor to the previous cell * @param the parameter specifies whether it can move editor to the last cell of the row above after reaching the first cell of the current row */ - editPrevCell(canChangeRow?: boolean): void, - + editPrevCell ( canChangeRow?: boolean ): void, + /** * saves the current editor and opens an editor in the same cell of the task above * @param the parameter specifies whether it can skip the read-only task and open an editor in the cell of the first editable task. The default *false* state of the parameter closes the editor if the previous task is read-only. */ - editPrevRow(skipReadonly?: boolean): void, - + editPrevRow ( skipReadonly?: boolean ): void, + /** * gets the name of the first editable column in the grid */ - getFirstCell(): string, - + getFirstCell ( ): string, + /** * gets the name of the last editable column in the grid */ - getLastCell(): string, - + getLastCell ( ): string, + /** * returns the name of the next editable column * @param the parameter specifies in which direction it should iterate the following cell. `1` - right, `-1` - left. */ - getNextCell(direction: number): string | null, - + getNextCell ( direction: number ): string | null, + /** * checks whether a provided DOM element is a task cell object and returns an editor state object, if it is so: {id: taskId, columnName: columnName} * @param the HTML element */ - locateCell(node: HTMLElement): object | null, - + locateCell ( node: HTMLElement ): object | null, + /** * sets a mapping object * @param an object with the mapping configuration: @@ -6134,61 +6233,61 @@ export interface InlineEditorMethods { * @param the Grid layout view * @param the method to destroy mapping */ - setMapping( + setMapping ( mapping: { init: (( inlineEditors: InlineEditorMethods, grid: any, - ) => void), + )=> void ), onShow: (( inlineEditors: InlineEditorMethods, node: HTMLElement, grid: any, - ) => void), + )=> void ), onHide: (( inlineEditors: InlineEditorMethods, node: HTMLElement, grid: any, - ) => void), - destroy: (() => void), + )=> void ), + destroy: (()=> void ), } ): void, - + /** * returns a currently applied mapping object */ - getMapping(): object + getMapping ( ): object [customMethod: string]: any; } -export interface InlineEditorEvents { - - "onBeforeEditStart": (state: { +export interface InlineEditorEvents { + + "onBeforeEditStart": ( state: { id: number | string, columnName: string, }) => any, - - "onEditStart": (state: { + + "onEditStart": ( state: { id: number | string, columnName: string, }) => any, - - "onBeforeSave": (state: { + + "onBeforeSave": ( state: { id: number | string, columnName: string, oldValue: any, newValue: any, }) => any, - - "onSave": (state: { + + "onSave": ( state: { id: number | string, columnName: string, oldValue: any, newValue: any, }) => any, - - "onEditEnd": (state: { + + "onEditEnd": ( state: { id: number | string, columnName: string, }) => any @@ -6196,33 +6295,33 @@ export interface InlineEditorEvents { [customEvent: string]: any; } -export interface Fullscreen { - +export interface Fullscreen { + /** * expands gantt to the full screen mode */ - expand(): void, - + expand ( ): void, + /** * collapses gantt from the fullscreen mode to the normal mode */ - collapse(): void, - + collapse ( ): void, + /** * calls the **collapse()** method if gantt is expanded to full screen, and the **expand()** method otherwise */ - toggle(): void, - + toggle ( ): void, + /** * returns a DOM element that will be expanded to full screen by the **expand()** method. */ - getFullscreenElement(): HTMLElement + getFullscreenElement ( ): HTMLElement [customMethod: string]: any; } -export interface KeyNav { - +export interface KeyNav { + /** * allows selecting any cell in the grid. Works only if the Grid already has the focus * @param the config object @@ -6230,54 +6329,54 @@ export interface KeyNav { * @param the column name * @param type of the scope. Possible values: "gantt", "taskRow", "taskCell", "headerCell" */ - focus( + focus ( config: { id: number | string, column: string, type: string, } ): void, - + /** * allows obtaining information about the active cell */ - getActiveNode(): boolean | void + getActiveNode ( ): boolean | void [customMethod: string]: any; } -export interface QuickInfo { - +export interface QuickInfo { + /** * displays the quick info popup for a specified element * @param the task ID */ - show(id: number | string): void, - + show ( id: number | string ): void, + /** * displays the quick info popup at specific coordinates * @param horizontal coordinate * @param vertical coordinate */ - show(x: number | string, y: number | string): void, - + show ( x: number | string, y: number | string ): void, + /** * hides the quick info popup. When **gantt.config.quick_info_detached** is set to *false*, the quick info will not disappear immediately, but after a short animation. Providing *true* value as an argument will cancel the animation and will remove the popup immediately. * @param defines whether the quick info popup will be hidden immediately without animation */ - hide(force?: boolean): HTMLElement, - + hide ( force?: boolean ): HTMLElement, + /** * sets a container where the quick info will be displayed. If no custom container specified, QuickInfo will be placed into the first of the found nodes: **gantt.$task, gantt.$grid, gantt.$root** * @param container element or its ID */ - setContainer(container: HTMLElement | string): void, - + setContainer ( container: HTMLElement | string ): void, + /** * returns the HTMLElement of the quick info popup. Returns *null* if the quick info is not initialized */ - getNode(): HTMLElement | null, - + getNode ( ): HTMLElement | null, + /** * puts the content into the quick info * @param optional, the configuration object of a quick info which can include the following attributes: @@ -6288,7 +6387,7 @@ export interface QuickInfo { * @param optional, the content of the pop-up edit form * @param optional, buttons to be placed in the pop-up edit form */ - setContent( + setContent ( config?: { taskId?: string | number, header?: { @@ -6303,80 +6402,90 @@ export interface QuickInfo { [customMethod: string]: any; } -export interface Undo { - +export interface Undo { + /** * reverts the changes made in the gantt */ - undo(): void, - + undo ( ): void, + /** * applies the reverted changes to the gantt once again */ - redo(): void, - + redo ( ): void, + /** * returns the stack of stored undo user actions */ - getUndoStack(): UndoRedoAction[], - + getUndoStack ( ): UndoRedoAction[], + /** * returns the stack of stored redo user actions */ - getRedoStack(): UndoRedoAction[], - + getRedoStack ( ): UndoRedoAction[], + + /** + * sets the stack of stored undo user actions + */ + setUndoStack ( ): UndoRedoAction[] , + + /** + * sets the stack of stored redo user actions + */ + setRedoStack ( ): UndoRedoAction[] , + /** * clears the stack of stored undo commands */ - clearUndoStack(): void, - + clearUndoStack ( ): void, + /** * clears the stack of stored redo commands */ - clearRedoStack(): void, - + clearRedoStack ( ): void, + /** * saves the current state of a task/link before the changes are made * @param the id of a task/link, * @param the type of an entry for which the id is provided as the first argument. */ - saveState(id: string | number, type: string): boolean + saveState ( id: string | number, type: string ): boolean [customMethod: string]: any; } -export interface ClickDrag { - +export interface ClickDrag { + /** * sets a custom CSS class for a selected element */ className?: string, - + /** * the element to attach an event to and select */ viewPort?: HTMLElement, - + /** * defines whether requestAnimationFrame is used during rendering */ useRequestAnimationFrame?: boolean, - + /** * true to add selection only in one row equal to the height of a task */ singleRow?: boolean, - + /** * CSS selector. Drag-n-drop won't be activated for the elements that match the selector */ ignore?: string, - + /** * if the property is specified, drag-n-drop will be activated only when the specified modifier key is pressed. Supported values: "ctrlKey", "shiftKey", "metaKey", "altKey" */ useKey?: string | boolean, - + /** * a function that will be called when the mouse button is released. Takes 6 parameters: * @param an object with the following attributes: @@ -6398,7 +6507,7 @@ export interface ClickDrag { * @param an array of tasks between the start and end date points * @param an array of tasks selected between the start and end coordinates vertically */ - callback?( + callback? ( startPoint?: { absolute: { left: number, @@ -6424,7 +6533,7 @@ export interface ClickDrag { tasksBetweenDates?: Array, tasksInRows?: Array ): any, - + /** * a function that creates an element rendered during dragging. Takes two parameters: * @param an object with the attributes: @@ -6442,7 +6551,7 @@ export interface ClickDrag { * @param the left coordinate * @param the top coordinate */ - render?( + render? ( startPoint?: { absolute: { left: number, @@ -6468,89 +6577,89 @@ export interface ClickDrag { [customMethod: string]: any; } -export interface Overlay { - +export interface Overlay { + /** * adds a new overlay into the Gantt Chart and returns its id * @param the render function. Takes a container with custom content as a parameter * @param the overlay container * @param optional, the ID of the overlay */ - addOverlay( + addOverlay ( render: (( container: HTMLElement, - ) => HTMLElement), + )=> HTMLElement ), id?: number | string ): string | number, - + /** * removes an overlay by its id * @param the ID of the overlay */ - deleteOverlay(id: number | string): boolean, - + deleteOverlay ( id: number | string ): boolean, + /** * returns an array with ids of overlays added into the chart */ - getOverlaysIds(): Array, - + getOverlaysIds ( ): Array, + /** * repaints the specified overlay. * @param the ID of the overlay */ - refreshOverlay(id: number | string): void, - + refreshOverlay ( id: number | string ): void, + /** * shows an overlay by its id. * @param the ID of the overlay */ - showOverlay(id: number | string): void, - + showOverlay ( id: number | string ): void, + /** * hides an overlay by its id * @param the ID of the overlay */ - hideOverlay(id: number | string): void, - + hideOverlay ( id: number | string ): void, + /** * checks visibility of the specified overlay. Returns *true* if the overlay is visible. * @param the ID of the overlay */ - isOverlayVisible(id: number | string): boolean + isOverlayVisible ( id: number | string ): boolean [customMethod: string]: any; } -export interface ZoomLevel { - +export interface ZoomLevel { + /** * the name of the level */ name: string - + /** * the height of the scale */ scale_height?: number - + /** * the height of the scale */ height?: number - + /** * the minimal width of a column. It has a higher priority than minColumnWidth and maxColumnWidth */ min_column_width?: number - + /** * an array of scales to switch between while zooming in/out on this level */ scales: Scales } -export interface ZoomMethods { - +export interface ZoomMethods { + /** * initializes the extension with the provided configuration. * @param an object with configuration settings that contains the *levels* array of zooming levels and a number of additional properties: @@ -6567,12 +6676,12 @@ export interface ZoomMethods { * @param the trigger of zooming: "wheel" | null | undefined * @param a DOM element over which zooming is triggered or a function that returns a DOM element */ - init( + init ( zoomConfig: { levels: ZoomLevel[], handler?: (( e: Event, - ) => void), + )=> void ), startDate?: Date, endDate?: Date, activeLevelIndex?: number, @@ -6581,112 +6690,112 @@ export interface ZoomMethods { maxColumnWidth?: number, useKey?: string, trigger?: string | null | undefined, - element?: HTMLElement | (() => HTMLElement), + element?: HTMLElement | (()=> HTMLElement ), } ): void, - + /** * returns the number (index) of the current zooming level */ - getCurrentLevel(): number, - + getCurrentLevel ( ): number, + /** * switches to the specified zooming level. * @param The level is defined either by a string (the name of the level from the config, e.g. "year"), or by its number in the array of levels */ - setLevel(level: number | string): void, - + setLevel ( level: number | string ): void, + /** * allows getting all zooming levels */ - getLevels(): void, - + getLevels ( ): any[], + /** * increases the current zooming level */ - zoomIn(): void, - + zoomIn ( ): void, + /** * decreases the current zooming level */ - zoomOut(): void, - + zoomOut ( ): void, + /** * attaches an event handler * @param the name of the event handler * @param the function that will be called when the event fires */ - attachEvent(event: T, handler: ZoomEvents[T]): string, - + attachEvent (event: T, handler: ZoomEvents[T]): string, + /** * detaches a handler from an event * @param the id of the attached event handler */ - detachEvent(id: string): void, - + detachEvent ( id: string ): void, + /** * calls an inner event * @param the event's name, case-insensitive * @param optional, an array of the event-related data */ - callEvent(name: string, params: Array): boolean, - + callEvent ( name: string, params: Array ): boolean, + /** * checks whether an event has some handler(s) specified * @param the event's name */ - checkEvent(name: string): boolean, + checkEvent ( name: string ): boolean, } -export interface ZoomEvents { - +export interface ZoomEvents { + /** * fires during switching of the zooming level. * @param the number of the level * @param the config of the level */ - "onAfterZoom": (level: number | string, config: ZoomLevel) => any + "onAfterZoom": ( level: number | string, config: ZoomLevel ) => any } -export interface Tooltip { - +export interface Tooltip { + /** * returns the HTML element of the tooltip */ - getNode(): HTMLElement, - + getNode ( ): HTMLElement, + /** * locks the position of tooltip to the boundaries of the specified HTML element * @param the HTML element under the question */ - setViewport(node: HTMLElement): object, - + setViewport ( node: HTMLElement ): object, + /** * displays the tooltip at specific coordinates (relative to document.body). The method can take different parameters, depending on the position you want to show the tooltip at. To display tooltip at specific coordinates (relative to document.body), pass x,y coordinates. To display tooltip at the mouse event coordinates pass the Event object. The *tooltip_offset_x/y* and viewport will be taken into account. * @param the X coordinate or the mouse event object * @param the Y coordinate */ - show(config?: number | Event, top?: number): object, - + show ( config?: number | Event, top?: number ): object, + /** * hides the tooltip element */ - hide(): object, - + hide ( ): object, + /** * puts HTML content into the tooltip. Takes as a parameter: * @param a string with HTML content for the tooltip */ - setContent(html: string): object, + setContent ( html: string ): object, } -export interface Tooltips { +export interface Tooltips { /** * Tooltip object */ - tooltip: Tooltip, - + tooltip: Tooltip, + /** * adds tooltip with extended configuration. The method takes one parameter: * @param an object with the tooltip settings. The settings are: @@ -6702,25 +6811,25 @@ export interface Tooltips { * @param the HTML node * @param optional, defines whether the module listens to mouse events on the whole page (*true*) or only inside a gantt element (*false*). By default the option is set to *false*. */ - attach( + attach ( config: { selector: string, onmouseenter: (( event: MouseEvent, node: HTMLElement, - ) => void), + )=> void ), onmousemove?: (( event: MouseEvent, node: HTMLElement, - ) => void), + )=> void ), onmouseleave: (( event: MouseEvent, node: HTMLElement, - ) => void), + )=> void ), global?: boolean, } ): void, - + /** * adds a tooltip for the specified Gantt element. It is a more simplified version of the **attach()** method. The method takes one parameter: * @param an object with the tooltip settings. The settings are: @@ -6730,70 +6839,70 @@ export interface Tooltips { * @param the HTML node and returns a string with a template. * @param optional, defines whether the module listens to mouse events on the whole page (*true*) or only inside a gantt element (*false*). By default the option is set to *false*. */ - tooltipFor( + tooltipFor ( config: { selector: string, html: (( event: Event, node: HTMLElement, - ) => HTMLElement | string | number | void), + )=> HTMLElement | string | number | void ), global?: boolean, } ): void, - + /** * removes tooltip. As a parameter the method takes: * @param the CSS selector of a Gantt element */ - detach(selector: string): void, + detach ( selector: string ): void, } -export interface DurationFormatter { +export interface DurationFormatter { /** * returns *true* if the provided string can be parsed into the duration value, otherwise * @param the string that will be checked */ - canParse(value: string): boolean, - + canParse ( value: string ): boolean, + /** * converts the provided duration value into the duration string * @param the duration value that will be converted */ - format(value: number): string, - + format ( value: number ): string, + /** * parses the provided string into the duration value. If the value can’t be parsed, ‘null’ will be returned * @param the string that will be converted */ - parse(value: string): number, - + parse ( value: string ): number, + } -export interface LinkFormatter { +export interface LinkFormatter { /** * returns *true* if the provided string can be parsed into the link object, otherwise * @param the string that will be checked */ - canParse(value: string): boolean, + canParse ( value: string ): boolean, /** * converts the provided link value into the string * @param the link object that will be converted */ - format(value: Link): string, + format ( value: Link ): string, /** * parses the provided string into the link object. If the value can’t be parsed, ‘null’ will be returned. **Note** that the *link.target* of the given link will have "null" value * @param the string that will be converted */ - parse(value: string): object, + parse ( value: string ): object, } -export interface Formatters { - +export interface Formatters { + /** * creates a Duration Formatter * @param optional, a configuration object which can include the following attributes: @@ -6832,11 +6941,11 @@ export interface Formatters { * @param plural text label for years * @param short text label for years */ - durationFormatter( + durationFormatter ( config?: { enter?: string, store?: string, - format?: string | Array, + format?: string | Array , short?: boolean, minutesPerHour?: number, hoursPerDay?: number, @@ -6877,7 +6986,7 @@ export interface Formatters { }, } ): DurationFormatter, - + /** * create a Link Formatter * @param optional, a configuration object which can include the following attributes: @@ -6888,7 +6997,7 @@ export interface Formatters { * @param labels for the Finish to Finish links * @param labels for the Start to Finish links */ - linkFormatter( + linkFormatter ( config?: { durationFormatter?: DurationFormatter, labels?: { @@ -6901,71 +7010,71 @@ export interface Formatters { ): LinkFormatter, } -export interface EmptyState { - +export interface EmptyState { + /** * an array with the IDs of the attached handlers. It is modified by the *attachAddTaskEvent* and *detachAddTaskEvents* methods. */ clickEvents?: Array, - + /** * returns *true* if there is no data loaded into the Gantt chart, otherwise */ - isGanttEmpty(): boolean, - + isGanttEmpty ( ): boolean, + /** * returns *true* if the api/gantt_show_empty_state_config.md property is enabled, otherwise */ - isEnabled(): boolean, - + isEnabled ( ): boolean, + /** * puts an HTML content into the empty state element. The method can be redefined. * @param the container element */ - renderContent(container: HTMLElement): void, - + renderContent ( container: HTMLElement ): void, + /** * returns the DOM element where the empty state will be attached to. By default, returns the grid element (the "empty state" will be displayed in the grid). If there is no grid, returns the timeline element (the "empty state" will be displayed in the timeline). The method can be redefined. */ - getContainer(): HTMLElement | null, - + getContainer ( ): HTMLElement | null, + /** * returns the DOM node of the empty state element */ - getNode(): HTMLElement | null, - + getNode ( ): HTMLElement | null, + /** * displays the "empty state". Returns *null* if there is no container for the Empty State Element. The extension calls the method by itself */ - show(): null | void, - + show ( ): null | void, + /** * hides the "empty state". Returns *false* if there is no Empty State Element node, so there is nothing to hide. The extension calls the method by itself */ - hide(): boolean | void, - + hide ( ): boolean | void, + /** * adds the handler that will fire after clicking on the Empty State Element. By default, it is used to add a new task. */ - attachAddTaskEvent(): void, - + attachAddTaskEvent ( ): void, + /** * removes the handlers that were used to add a task after clicking on the Empty State Element */ - detachAddTaskEvents(): void + detachAddTaskEvents ( ): void } -export interface Ext { - inlineEditors: InlineEditorMethods, - emptyStateElement: EmptyState, - fullscreen: Fullscreen, - formatters: Formatters, - keyboardNavigation: KeyNav, - quickInfo: QuickInfo, - undo: Undo, - overlay: Overlay, - tooltips: Tooltips, - zoom: ZoomMethods, +export interface Ext { + inlineEditors: InlineEditorMethods, + emptyStateElement: EmptyState, + fullscreen: Fullscreen, + formatters: Formatters, + keyboardNavigation: KeyNav, + quickInfo: QuickInfo, + undo: Undo, + overlay: Overlay, + tooltips: Tooltips, + zoom: ZoomMethods, [customMethod: string]: any; } @@ -6974,4 +7083,4 @@ declare var gantt: GanttStatic; declare var Gantt: GanttEnterprise; -export { gantt, Gantt }; \ No newline at end of file +export {gantt, Gantt}; \ No newline at end of file diff --git a/codebase/dhtmlxgantt.es.d.ts b/codebase/dhtmlxgantt.es.d.ts new file mode 100644 index 0000000..8433dd4 --- /dev/null +++ b/codebase/dhtmlxgantt.es.d.ts @@ -0,0 +1,7086 @@ +// Type definitions for dhtmlxGantt 9.0.0 +// Project: https://dhtmlx.com/docs/products/dhtmlxGantt + +type GanttCallback = (...args: any[]) => any; + + +export interface GanttEventCallback { + + /** + * fires when autoscheduling is done + * @param taskId the root task id + * @param updatedTasks an array with the ids of rescheduled tasks + */ + "onAfterAutoSchedule" (taskId: string|number, updatedTasks: any[]): void; + + /** + * fires after the api/gantt_batchupdate.md method was called + */ + "onAfterBatchUpdate" (): void; + + /** + * if dynamic loading is enabled, fires after the task branch was loaded to the page + * @param settings an object which contains the task id and request URL + */ + "onAfterBranchLoading" (settings: any): void; + + /** + * fires after the user has closed the lightbox (edit form) + */ + "onAfterLightbox" (): void; + + /** + * fires after a new link is added to the Gantt chart + * @param id the link id + * @param link the link object + */ + "onAfterLinkAdd" (id: string|number, link: Link): void; + + /** + * fires after the user deletes a link + * @param id the link id + * @param link the link object + */ + "onAfterLinkDelete" (id: string|number, link: Link): void; + + /** + * fires after the user updates a link + * @param id the link id + * @param link the link object + */ + "onAfterLinkUpdate" (id: string|number, link: Link): void; + + /** + * fires after the pop-up edit form is closed + * @param taskId the task id + */ + "onAfterQuickInfo" (taskId: string|number): void; + + /** + * fires after the redo() method was called + * @param action a user action as an array of command objects + */ + "onAfterRedo" (action: any[]): void; + + /** + * fires after resizing of the row height is finished + * @param id the task id + * @param task the item object + * @param oldHeight the old height of the row + * @param newHeight the new height of the row + */ + "onAfterRowResize" (id: string|number, task: Task, oldHeight: number, newHeight: number): void; + + /** + * fires after tasks are sorted in the grid + * @param field the name of the column that the grid was sorted by or a custom sorting function + * @param desc optional, the sorting direction: true - descending, false - ascending
+ * @param parent optional, the id of the parent task, if the tasks were sorted only in the branch of the specified parent + */ + "onAfterSort" (field: string|GanttCallback, desc?: boolean, parent?: string|number): void; + + /** + * fires after the user adds a task to the Gantt chart + * @param id the task id + * @param task the task object + */ + "onAfterTaskAdd" (id: string|number, task: Task): void; + + /** + * fires for each task which has been autoscheduled + * @param task the task object + * @param start a new start date + * @param link the link object that creates the constraint + * @param predecessor the predecessor task object + */ + "onAfterTaskAutoSchedule" (task: Task, start: Date, link: Link, predecessor: Task): void; + + /** + * fires after the user deletes a task + * @param id the task id + * @param task the task object + */ + "onAfterTaskDelete" (id: string|number, task: Task): void; + + /** + * fires after the user has finished to drag and released the mouse button + * @param id the task id + * @param mode the drag-and-drop mode ("resize", "progress", "move", "ignore") + * @param e a native event object + */ + "onAfterTaskDrag" (id: string|number, mode: string, e: Event): void; + + /** + * fires after a task was moved to a new vertical position + * @param id the id of the task to move + * @param parent the parent id + * @param tindex the index of the position in the parent branch that the task will be moved to + */ + "onAfterTaskMove" (id: string|number, parent: string|number, tindex: number): void; + + /** + * fires after the user updates a task + * @param id the task id + * @param task the task object + */ + "onAfterTaskUpdate" (id: string|number, task: Task): void; + + /** + * fires after the undo() method was called + * @param action an array of command objects + */ + "onAfterUndo" (action: any[]): void; + + /** + * fires if the server returns an error + * @param request XML HTTP request object + */ + "onAjaxError" (request: any): boolean; + + /** + * fires if some dependency loops were found during auto scheduling + * @param groups an array of dependency loops found in gantt + */ + "onAutoScheduleCircularLink" (groups: any[]): void; + + /** + * fires before auto scheduling + * @param taskId the root task id + */ + "onBeforeAutoSchedule" (taskId: string|number): boolean; + + /** + * fires before the api/gantt_batchupdate.md method is called + */ + "onBeforeBatchUpdate" (): void; + + /** + * if dynamic loading is enabled, fires after a user expands the task branch but before loading starts + * @param settings an object which contains the task id and request URL + */ + "onBeforeBranchLoading" (settings: any): boolean; + + /** + * before gantt exits the fullscreen mode and goes back to normal mode + */ + "onBeforeCollapse" (): boolean; + + /** + * fires before data is rendered on the page + */ + "onBeforeDataRender" (): void; + + /** + * fires before gantt is expanded to full screen + */ + "onBeforeExpand" (): boolean; + + /** + * fires before the dhtmlxGantt initialization is started + */ + "onBeforeGanttReady" (): void; + + /** + * fires before the Gantt chart is rendered on the page + */ + "onBeforeGanttRender" (): void; + + /** + * fires immediately before the user opens the lightbox (edit form) + * @param id the task id + */ + "onBeforeLightbox" (id: string|number): boolean; + + /** + * fires before a new link is added to the Gantt chart + * @param id the link id + * @param link the link object + */ + "onBeforeLinkAdd" (id: string|number, link: Link): boolean; + + /** + * fires before the user deletes a link + * @param id the link id + * @param link the link object + */ + "onBeforeLinkDelete" (id: string|number, link: Link): boolean; + + /** + * fires after the links have been loaded to the Gantt chart but before they are displayed + * @param id the link id + * @param link the link object + */ + "onBeforeLinkDisplay" (id: string|number, link: Link): boolean; + + /** + * fires before a link is updated + * @param id the link id + * @param new_link the new (updated) object of the link + */ + "onBeforeLinkUpdate" (id: string|number, new_link: Link): boolean; + + /** + * fires before selecting a task or a range of tasks + * @param e a native event object + */ + "onBeforeMultiSelect" (e: Event): void; + + /** + * fires before data started to be parsed + */ + "onBeforeParse" (): void; + + /** + * fires before the redo() method is called + * @param action a user action as an array of command objects + */ + "onBeforeRedo" (action: any[]): boolean; + + /** + * fires before an action is added into the redo stack + * @param action a user action as an array of command objects + */ + "onBeforeRedoStack" (action: UndoRedoAction): boolean; + + /** + * fires before the rollup task is displayed on its parent project + * @param taskId the rollup task id + * @param task the rollup task object + * @param parentId the id of the parent (project) task + */ + "onBeforeRollupTaskDisplay" (taskId: number|string, task: Task, parentId: number|string): boolean; + + /** + * fires when a user drops a row in the grid + * @param sid the id of the task to move + * @param parent the parent id. If specified, the tindex will refer to the index in the
'parent' branch + * @param tindex the index of the position that the task will be moved from
(the index in the whole tree) + */ + "onBeforeRowDragEnd" (sid: string|number, parent: string|number, tindex: number): boolean; + + /** + * fires before a row of the grid is dragged vertically to a different position + * @param id the id of the task to move in the grid + * @param parent the parent id + * @param tindex the index of the position in the parent branch that the task will be moved to + */ + "onBeforeRowDragMove" (id: string|number, parent: string|number, tindex: number): boolean; + + /** + * fires before the user starts to resize the row height by drag-and-drop + * @param task the task object + */ + "onBeforeRowResize" (task: Task): boolean; + + /** + * fires before resizing of the row height is completed + * @param id the task id + * @param task the task object + * @param newHeight the new height of the row + */ + "onBeforeRowResizeEnd" (id: number|string, task: Task, newHeight: number): boolean; + + /** + * fires before a part of the split task is displayed on the Gantt chart + * @param id the id of the subtask + * @param task the object of the subtask + * @param parent the object of the parent task + */ + "onBeforeSplitTaskDisplay" (id: number|string, task: Task, parent: any): boolean; + + /** + * fires before a new task is added to the Gantt chart + * @param id the task id + * @param task the task object + */ + "onBeforeTaskAdd" (id: string|number, task: Task): boolean; + + /** + * fires for each task which is rescheduled + * @param task the task object + * @param start a new start date + * @param link the link object that creates the constraint + * @param predecessor the predecessor task object + */ + "onBeforeTaskAutoSchedule" (task: Task, start: Date, link: Link, predecessor: Task): boolean; + + /** + * fires after the user has finished dragging and released the mouse button but before the changes are applied + * @param id the task id + * @param mode the drag-and-drop mode ("resize", "progress", "move", "ignore") + * @param task the copy of the task object in its original state (before drag and drop) + */ + "onBeforeTaskChanged" (id: string|number, mode: string, task: Task): boolean; + + /** + * fires before the user deletes a task + * @param id the task id + * @param task the task object + */ + "onBeforeTaskDelete" (id: string|number, task: Task): boolean; + + /** + * fires after the tasks have been loaded to the Gantt chart, but before they are displayed + * @param id the task id + * @param task the task object + */ + "onBeforeTaskDisplay" (id: string|number, task: Task): boolean; + + /** + * fires after the user has pressed the mouse button and started dragging, but before dhtmlxGantt starts the drag-and-drop operation + * @param id the task id + * @param mode the drag-and-drop mode ("resize", "progress", "move", "ignore") + * @param e a native event object + */ + "onBeforeTaskDrag" (id: string|number, mode: string, e: Event): boolean; + + /** + * fires before a task is moved to a new vertical position + * @param id the id of the task to move + * @param parent the parent id + * @param tindex the index of the position in the parent branch that the task will be moved to + */ + "onBeforeTaskMove" (id: string|number, parent: string|number, tindex: number): boolean; + + /** + * fires before the task selection state is being changed (the task is being selected or unselected) + * @param id the id of a task + * @param state true if the task is going to be selected, false - if unselected + * @param e a native event object + */ + "onBeforeTaskMultiSelect" (id: string|number, state: boolean, e: Event|null): void; + + /** + * fires before the user selects a task + * @param id the task id + */ + "onBeforeTaskSelected" (id: string|number): boolean; + + /** + * fires before the user updates a task + * @param id the task id + * @param new_task the new (updated) object of the task + */ + "onBeforeTaskUpdate" (id: string|number, new_task: Task): void; + + /** + * fires before the undo() method is called + * @param action an array of command objects + */ + "onBeforeUndo" (action: any[]): boolean; + + /** + * fires before an action is added into the undo stack + * @param action a user action as an array of command objects + */ + "onBeforeUndoStack" (action: UndoRedoAction): boolean; + + /** + * fires when the circular reference has been detected and auto scheduling is not possible + * @param link the link object + * @param group a group of tasks and links connected in a loop + */ + "onCircularLinkError" (link: Link, group: any): void; + + /** + * fires after all tasks were removed from the Gantt chart by the api/gantt_clearall.md method + */ + "onClear" (): void; + + /** + * fires when gantt went back to normal mode from the full screen mode + */ + "onCollapse" (): void; + + /** + * fires when the user is dragging the column's border to resize the column + * @param index the column index + * @param column the column object + * @param new_width the new column's width + */ + "onColumnResize" (index: number, column: GridColumn, new_width: number): void; + + /** + * fires after the user finished dragging the column's border to resize the column + * @param index the column index + * @param column the column object + * @param new_width the new column's width + */ + "onColumnResizeEnd" (index: number, column: GridColumn, new_width: number): boolean; + + /** + * fires before the user starts to drag the column's border to resize the column + * @param index the column index + * @param column the column object + */ + "onColumnResizeStart" (index: number, column: GridColumn): boolean; + + /** + * fires when a user clicks the right mouse button inside the Gantt chart (see the details) + * @param taskId the task id + * @param linkId the link id + * @param e a native event object + */ + "onContextMenu" (taskId: string|number, linkId: string|number, e: Event): void; + + /** + * fires on the `dp.init(gantt)` call + * @param DataProcessor the DataProcessor object + */ + "onDataProcessorReady" (DataProcessor: any): void; + + /** + * fires after data has been rendered on the page + */ + "onDataRender" (): void; + + /** + * called after gantt has been cleared by the api/gantt_destructor.md method + */ + "onDestroy" (): void; + + /** + * fires when the user clicks on an empty space in the Gantt chart (not on tasks) + * @param e a native event object + */ + "onEmptyClick" (e: Event): void; + + /** + * fires when api/gantt_assert.md receives 'false' value, i.e. when assertion fails + * @param errorMessage a string with an error from the api/gantt_assert.md method + */ + "onError" (errorMessage: string): boolean; + + /** + * fires when gantt is expanded to full screen + */ + "onExpand" (): void; + + /** + * fires after the Gantt layout is ready, but before it is rendered + */ + "onGanttLayoutReady" (): void; + + /** + * fires after the dhtmlxGantt initialization is complete but the Gantt chart is not rendered on the page yet + */ + "onGanttReady" (): void; + + /** + * fires after the Gantt chart was rendered on the page + */ + "onGanttRender" (): void; + + /** + * fires when the Gantt chart is scrolled to a particular point + * @param left the position of horizontal scroll + * @param top the position of vertical scroll + */ + "onGanttScroll" (left: number, top: number): void; + + /** + * fires when the user clicks on the grid's header + * @param name the name attribute of the column which header the user clicks on + * @param e a native event object + */ + "onGridHeaderClick" (name: string, e: Event): boolean; + + /** + * fires when the user is dragging the grid's border to resize the grid + * @param old_width the initial grid's width + * @param new_width the new grid's width + */ + "onGridResize" (old_width: number, new_width: number): void; + + /** + * fires after the user finished dragging the grid's border to resize the grid + * @param old_width the initial grid's width + * @param new_width the new grid's width + */ + "onGridResizeEnd" (old_width: number, new_width: number): boolean; + + /** + * fires before the user starts to drag the grid's border to resize the grid + * @param old_width the initial grid's width + */ + "onGridResizeStart" (old_width: number): boolean; + + /** + * fires after the user has opened the lightbox (edit form) + * @param task_id the id of the task opened in the lightbox + */ + "onLightbox" (task_id: string|number): void; + + /** + * fires when the user clicks on a custom button in the lightbox + * @param css the name of the CSS class applied to the button + * @param node an HTML element of the clicked button + * @param e a native 'click' event object + */ + "onLightboxButton" (css: string, node: HTMLElement, e: Event): void; + + /** + * fires when the user clicks on the 'Cancel' button in the lightbox + * @param id the task id ( the task opened in the lightbox) + */ + "onLightboxCancel" (id: string|number): void; + + /** + * fires when the structure of the lightbox is changed + * @param old_type the name of the initial lighbox's structure + * @param new_type the name of the new lighbox's structure + */ + "onLightboxChange" (old_type: string, new_type: string): void; + + /** + * fires when the user clicks on the 'Delete' button in the lightbox + * @param id the task id (the task opened in the lightbox) + */ + "onLightboxDelete" (id: string|number): boolean; + + /** + * fires when the user clicks on the 'Save' button in the lightbox + * @param id the id of unmodified task. Note, at this stage the lightbox values aren't applied to the task object yet and you can access the initial task using gantt.getTask(id) + * @param task the modified task object + * @param is_new specifies whether the user opens the lightbox to create a new task (true)
or update an existing one (false) + */ + "onLightboxSave" (id: string|number, task: Task, is_new: boolean): boolean; + + /** + * fires when the user clicks on a link + * @param id the id of the clicked link + * @param e optional, a native event object + */ + "onLinkClick" (id: string|number, e?: Event): void; + + /** + * fires when a user creates a new link between tasks + * @param link the object of a new link + */ + "onLinkCreated" (link: Link): boolean; + + /** + * fires when the user double clicks on a link + * @param id the id of the clicked link + * @param e optional, a native event object + */ + "onLinkDblClick" (id: string|number, e?: Event): boolean; + + /** + * fires when the id of a link is changed + * @param id the current link id + * @param new_id the new link id + */ + "onLinkIdChange" (id: string|number, new_id: string|number): void; + + /** + * fires when the user adds a new link and dhtmlxGantt checks whether the link is valid + * @param link the link object + */ + "onLinkValidation" (link: Link): boolean; + + /** + * fires after loading data from the data source has been completed + * @param url the server-side url (may be a static file or a server side script that outputs data) + * @param type ('json', 'xml', 'oldxml') the data type + */ + "onLoadEnd" (url: string, type: string): void; + + /** + * fires immediately before loading data from the data source has been started + * @param url the server-side url (may be a static file or a server side script that outputs data) + * @param type ('json', 'xml', 'oldxml') the data type + */ + "onLoadStart" (url: string, type: string): void; + + /** + * fires when the mouse is moved over the gantt container + * @param id the id of the task that the mouse is moved over + * @param e a native event object + */ + "onMouseMove" (id: string|number, e: Event): void; + + /** + * fires after selection of a task or a range of tasks has been completed + * @param e a native event object + */ + "onMultiSelect" (e: Event): void; + + /** + * fires after a collection of options has been loaded from the server, but isn't parsed yet + */ + "onOptionsLoad" (): void; + + /** + * fires after data was parsed (became available for API) but before it was rendered in the Gantt chart + */ + "onParse" (): void; + + /** + * fires when the pop-up edit form appears + * @param taskId the task id + */ + "onQuickInfo" (taskId: string|number): void; + + /** + * fires after the user drops a vertically reordered row in the grid + * @param id the id of the task that the user has dragged vertically in the grid + * @param target the id of the task which place the dragged row has occupied + */ + "onRowDragEnd" (id: string|number, target: string|number): void; + + /** + * fires before the user drags a row of the grid to vertically reorder it + * @param id the id of the task that the user drags in the grid + * @param target an HTML element of the task that the user drags + * @param e a native event object + */ + "onRowDragStart" (id: string|number, target: HTMLElement, e: Event): boolean; + + /** + * fires when the user is dragging the border of the row to resize the row height + * @param id the task id + * @param task the task object + * @param currentHeight the current height of the row + */ + "onRowResize" (id: string|number, task: Task, currentHeight: number): void; + + /** + * fires when the scale is re-rendered in order to display all tasks completely + */ + "onScaleAdjusted" (): void; + + /** + * fires when the user clicks on the cell in the time scale + * @param e a native event object + * @param date the date of the clicked cell + */ + "onScaleClick" (e: Event, date: Date): void; + + /** + * fires when the user clicks on a task row in the grid area (including the 'expand/collapse' and 'add task' buttons) or on a task bar in the timeline area + * @param id the id of the clicked task + * @param e optional, a native event object + */ + "onTaskClick" (id: string|number, e?: Event): boolean; + + /** + * fires when a branch has been closed + * @param id the branch id + */ + "onTaskClosed" (id: string|number): void; + + /** + * fires when a user creates a new task by pressing the'+' button in a grid, or when the api/gantt_createtask.md method is called + * @param task the object of a new task + */ + "onTaskCreated" (task: Task): boolean; + + /** + * fires when the user double clicks on a task + * @param id the id of the double clicked task + * @param e a native event object + */ + "onTaskDblClick" (id: string, e?: Event): boolean; + + /** + * fires when the user drags a task + * @param id the task id + * @param mode the drag mode ("resize", "progress", "move", "ignore") + * @param task the current (dragged) task object + * @param original the original(initial) task object + * @param e a native event object + */ + "onTaskDrag" (id: string|number, mode: string, task: Task, original: Task, e: Event): void; + + /** + * fires when the id of a task is changed + * @param id the current task's id + * @param new_id the new task's id + */ + "onTaskIdChange" (id: string|number, new_id: string|number): void; + + /** + * fires when a task is being loaded from the data source + * @param task the object of a task + */ + "onTaskLoading" (task: Task): boolean; + + /** + * fires after the task selection state has changed (the task has been selected/unselected) + * @param id the id of a task + * @param state true if the task has been selected, false - if unselected + * @param e a native event object + */ + "onTaskMultiSelect" (id: string|number, state: boolean, e: Event): void; + + /** + * fires when a branch has been opened + * @param id the branch id + */ + "onTaskOpened" (id: string|number): void; + + /** + * fires when the user clicks on a row in the table + * @param id the task id + * @param row an HTML element of the clicked row + */ + "onTaskRowClick" (id: string|number, row: HTMLElement): void; + + /** + * fires when the user selects a task + * @param id the task id + */ + "onTaskSelected" (id: string|number): void; + + /** + * fires when the user unselects a task by selecting some other task + * @param id the task id (of the unselected task) + */ + "onTaskUnselected" (id: string|number): void; + + /** + * fires when the dhtmlxGantt templates are initialized + */ + "onTemplatesReady" (): void; +} + + +export interface GanttTemplates { + + /** + * specifies the text displayed inside the baseline element + */ + baseline_text(): void; + + /** + * specifies the content of columns that show dates (return `Date` values) in grid + * @param date the date which needs formatting + * @param task the task object + * @param column the name of the column that called the template + */ + date_grid(date: Date, task: Task, column: string): string; + + /** + * specifies the text of tooltips that are displayed when the user creates a new dependency link + * @param from the id of the source task + * @param from_start true, if the link is being dragged from the start of the source task, false - if
from the end of the task + * @param to the id of the target task( 'null' or 'undefined', if the target task isn't specified yet) + * @param to_start true, if the link is being dragged to the start of the target task, false - if
to the end of the task + */ + drag_link(from: string|number, from_start: boolean, to: string|number, to_start: boolean): string; + + /** + * specifies the CSS class that will be applied to the pop-up that appears when a user drags a link + * @param from the id of the source task + * @param from_start true, if the link is being dragged from the start of the source task, false - if
from the end of the task + * @param to the id of the target task( 'null' or 'undefined', if the target task isn't specified yet) + * @param to_start true, if the link is being dragged to the start of the target task, false - if
to the end of the task + */ + drag_link_class(from: string|number, from_start: boolean, to: string|number, to_start: boolean): string; + + /** + * converts a date object to a date string. Used to send data back to the server + * @param date the date which needs formatting + */ + format_date(date: Date): string; + + /** + * specifies the custom content inserted before the labels of child items in the tree column + * @param task the task object + */ + grid_blank(task: Task): string; + + /** + * specifies the format of dates for the columns that show dates (return the `Date` values) + * @param date the date which needs formatting + * @param column the name of the column that called the template + */ + grid_date_format(date: Date, column?: string): string; + + /** + * specifies the icon of child items in the tree column + * @param task the task object + */ + grid_file(task: Task): string; + + /** + * specifies the icon of parent items in the tree column + * @param task the task object + */ + grid_folder(task: Task): string; + + /** + * specifies the CSS class that will be applied to the headers of the table's columns + * @param columnName the column's name (as specified in the "name" property of the column object) + * @param column column object (as specified in the gantt.config.columns config) + */ + grid_header_class(columnName: string, column: any): string; + + /** + * specifies the indent of the child items in a branch (in the tree column) + * @param task the task object + */ + grid_indent(task: Task): string; + + /** + * specifies the icon of the open/close sign in the tree column + * @param task the task object + */ + grid_open(task: Task): string; + + /** + * specifies the CSS class that will be applied to a grid row + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + grid_row_class(start: Date, end: Date, task: Task): string; + + /** + * defines the height of the filled area in the resourceHistogram + * @param start_date start date of the scale cell + * @param end_date end date of the scale cell + * @param resource the resource object + * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell + * @param assignments resource assignments that are assigned to the specified start/end dates of the task + */ + histogram_cell_allocated(start_date: Date, end_date: Date, resource: any, tasks: Array , assignments: any[]): void; + + /** + * specifies the height of the line that defines the available capacity of the resource + * @param start_date start date of the scale cell + * @param end_date end date of the scale cell + * @param resource the resource object + * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell + * @param assignments resource assignments that are assigned to the specified start/end dates of the task + */ + histogram_cell_capacity(start_date: Date, end_date: Date, resource: any, tasks: Array , assignments: any[]): void; + + /** + * defines the CSS class which is applied to a cell of the resource panel + * @param start_date start date of the scale cell + * @param end_date end date of the scale cell + * @param resource the resource object + * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell + * @param assignments resource assignments that are assigned to the specified start/end dates of the task + */ + histogram_cell_class(start_date: Date, end_date: Date, resource: any, tasks: Array , assignments: any[]): void; + + /** + * defines the label inside a cell + * @param start_date start date of the scale cell + * @param end_date end date of the scale cell + * @param resource the resource object + * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell + * @param assignments resource assignments that are assigned to the specified start/end dates of the task + */ + histogram_cell_label(start_date: Date, end_date: Date, resource: any, tasks: Array , assignments: any[]): void; + + /** + * specifies the CSS class that will be applied to a link + * @param link the link object + */ + link_class(link: Link): string; + + /** + * specifies the text in the header of the link's "delete" confirm window + * @param link the link object + */ + link_description(link: any): string; + + /** + * converts date string into a Date object + * @param date the string which need to be parsed + */ + parse_date(date: string): Date; + + /** + * specifies the text in the completed part of the task bar + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + progress_text(start: Date, end: Date, task: Task): string; + + /** + * specifies the CSS class that will be applied to the pop-up edit form + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + quick_info_class(start: Date, end: Date, task: Task): void; + + /** + * specifies the content of the pop-up edit form + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + quick_info_content(start: Date, end: Date, task: Task): string; + + /** + * specifies the date of the pop-up edit form + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + quick_info_date(start: Date, end: Date, task: Task): string; + + /** + * specifies the title of the pop-up edit form + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + quick_info_title(start: Date, end: Date, task: Task): string; + + /** + * defines the CSS class names of cells in the resource timeline cells + * @param start_date start date of the scale cell + * @param end_date end date of the scale cell + * @param resource the resource object + * @param tasks tasks that are assigned to specified resource and overlap start/end dates of the cell + * @param assignments resource assignments that are assigned to the specified start/end dates of the task + */ + resource_cell_class(start_date: Date, end_date: Date, resource: any, tasks: Array , assignments: any[]): string; + + /** + * defines the HTML content of resource timeline cells + * @param start_date start date of the scale cell + * @param end_date end date of the scale cell + * @param resource the resource object + * @param tasks tasks that are assigned to specified resource and overlap start/end dates of the cell + * @param assignments resource assignments that are assigned to the specified start/end dates of the task + */ + resource_cell_value(start_date: Date, end_date: Date, resource: any, tasks: Array , assignments: any[]): string; + + /** + * specifies the CSS class that will be applied to cells of the time scale of the timeline area + * @param date the date of a cell + */ + scale_cell_class(date: Date): string; + + /** + * specifies the CSS class that will be applied to the time scale + * @param scale the scale's configuration object + */ + scale_row_class(scale: Scale): string; + + /** + * specifies the CSS class that will be applied to task bars + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + task_class(start: Date, end: Date, task: Task): string; + + /** + * specifies the date format of the label in the 'Time period' section of the lightbox + * @param date the date which needs formatting + */ + task_date(date: Date): string; + + /** + * specifies the format for the end dates of tasks in the lightbox + * @param date the date which needs formatting + */ + task_end_date(date: Date): string; + + /** + * specifies the CSS class that will be applied to the row of the timeline area + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + task_row_class(start: Date, end: Date, task: Task): string; + + /** + * specifies the text in the task bars and the header of the lightbox + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + task_text(start: Date, end: Date, task: Task): string; + + /** + * specifies the date period in the header of the lightbox + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + task_time(start: Date, end: Date, task: Task): string; + + /** + * specifies the dates of unscheduled tasks + * @param task the task object + */ + task_unscheduled_time(task: Task): void; + + /** + * specifies the format of the drop-down time selector in the lightbox + * @param date the date which needs formatting + */ + time_picker(date: Date): string; + + /** + * specifies the CSS class that will be applied to the cells of the timeline area + * @param item either the task's or resource's object assigned to the row + * @param date the date of a cell + */ + timeline_cell_class(item: any, date: Date): string; + + /** + * specifies custom HTML content in the timeline cells + * @param task the task's object + * @param date the date of a cell + */ + timeline_cell_content(task: Task, date: Date): string; + + /** + * specifies the format of start and end dates displayed in the tooltip + * @param date the date which needs formatting + */ + tooltip_date_format(date: Date): string; + + /** + * specifies the text of tooltips + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + tooltip_text(start: Date, end: Date, task: Task): string; + + /** + * specifies the text assigned to tasks bars on the right side + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + rightside_text(start: Date, end: Date, task: Task): string; + + /** + * specifies the text assigned to tasks bars on the left side + * @param start the date when a task is scheduled to begin + * @param end the date when a task is scheduled to be completed + * @param task the task object + */ + leftside_text(start: Date, end: Date, task: Task): string; + + /** + * specifies the lightbox's header + * @param start_date the date when a task is scheduled to begin + * @param end_date the date when a task is scheduled to be completed + * @param task the task's object + */ + lightbox_header(start_date: Date, end_date: Date, task: Task): string; + + [customTemplate: string]: any; +} + +export interface GanttConfigOptions { + + /** + * enables auto scheduling + */ + auto_scheduling: any; + + /** + * disables usage of time contraints for tasks + */ + auto_scheduling_compatibility: boolean; + + /** + * allows or forbids creating links from parent tasks (projects) to their children + */ + auto_scheduling_descendant_links: boolean; + + /** + * defines whether gantt will do autoscheduling on data loading/parsing + */ + auto_scheduling_initial: boolean; + + /** + * defines whether the whole project will be moved (see the details below) + */ + auto_scheduling_move_projects: boolean; + + /** + * defines whether tasks should inherit the constraint type from their parent project + */ + auto_scheduling_project_constraint: boolean; + + /** + * enables the auto scheduling mode, in which tasks will always be rescheduled to the earliest possible date + */ + auto_scheduling_strict: boolean; + + /** + * sets the way the scheduling algorithms process completed tasks + */ + auto_scheduling_use_progress: boolean; + + /** + * automatically converts tasks with subtasks to projects and projects without subtasks back to tasks + */ + auto_types: boolean; + + /** + * enables automatic adjusting of the grid's columns to the grid's width + */ + autofit: boolean; + + /** + * enables autoscrolling while dragging a task or link out of the current browser screen + */ + autoscroll: boolean; + + /** + * defines the speed of autoscrolling (in ms) while dragging a task or link out of the current browser screen + */ + autoscroll_speed: number; + + /** + * forces the Gantt chart to automatically change its size to show all tasks without scrolling + */ + autosize: boolean|string; + + /** + * sets the minimum width (in pixels) that the Gantt chart can take in the horizontal 'autosize' mode + */ + autosize_min_width: number; + + /** + * sets the height of task bars in the timeline area + */ + bar_height: number|string; + + /** + * adjusts the padding around task bars in the timeline when `bar_height` is set to "full" + */ + bar_height_padding: number; + + /** + * configures the functionality of baselines in the Gantt chart + */ + baselines: any; + + /** + * enables dynamic loading in the Gantt chart + */ + branch_loading: boolean; + + /** + * specifies that the task has children that are not yet loaded from the backend + */ + branch_loading_property: string; + + /** + * stores a collection of buttons resided in the left bottom corner of the lightbox + */ + buttons_left: string[]; + + /** + * stores a collection of buttons resided in the right bottom corner of the lightbox + */ + buttons_right: string[]; + + /** + * changes the name of the property that affects binding of a calendar to a task/group of tasks + */ + calendar_property: string; + + /** + * enables cascade deleting of nested tasks and links + */ + cascade_delete: boolean; + + /** + * enables advanced drag-n-drop + */ + click_drag: undefined|ClickDrag; + + /** + * configures the columns of the table + */ + columns: GridColumn[]; + + /** + * contains all available constraint types + * @param As Soon As Possible + * @param As Late As Possible + * @param Start No Earlier Than + * @param Start No Later Than + * @param Finish No Earlier Than + * @param Finish No Later Than + * @param Must Start On + * @param Must Finish On + */ + constraint_types: { + ASAP?: string, + ALAP?: string, + SNET?: string, + SNLT?: string, + FNET?: string, + FNLT?: string, + MSO?: string, + MFO?: string + } + + /** + * defines whether the gantt should track resizing of the container at time intervals + */ + container_resize_method: string|undefined; + + /** + * specifies the delay (in milliseconds) before redrawing the gantt when resizing the container + */ + container_resize_timeout: number; + + /** + * enables adjusting the task's start and end dates to the work time (while dragging) + */ + correct_work_time: boolean; + + /** + * defines internal implementation of the code of date formatting methods + */ + csp: boolean|string; + + /** + * sets the date format that is used to parse data from a data set and to send dates back to the server + */ + date_format: string; + + /** + * sets the format of dates in the "Start time" column of the table + */ + date_grid: string; + + /** + * enables or disables the display of deadline elements for tasks + */ + deadlines: boolean; + + /** + * defines whether gantt will perform a deep copy of data objects passed into the gantt.parse() method + */ + deepcopy_on_parse: boolean; + + /** + * 'says' to open the lightbox while creating new events by clicking the '+' button + */ + details_on_create: boolean; + + /** + * 'says' to open the lightbox after double clicking on a task + */ + details_on_dblclick: boolean; + + /** + * enables the possibility to drag the lightbox by the header + */ + drag_lightbox: boolean; + + /** + * enables creating dependency links by drag-and-drop + */ + drag_links: boolean; + + /** + * stores the types of available drag-and-drop modes + * @param the mode when the user drags a task bar to change its duration. + * @param the mode when the user drags the progress knob of a task bar. + * @param the mode when the user drags a task bar to replace it. + * @param the service mode which restricts the drag-and-drop action. + */ + drag_mode: { + resize?: string, + progress?: string, + move?: string, + ignore?: string + } + + /** + * enables the possibility to move tasks by drag-and-drop + */ + drag_move: boolean; + + /** + * enables the possibility to drag several selected tasks at once + */ + drag_multiple: boolean; + + /** + * enables the possibility to change the task progress by dragging the progress knob + */ + drag_progress: boolean; + + /** + * enables drag and drop of items of the project type + */ + drag_project: boolean; + + /** + * enables the possibility to resize tasks by drag-and-drop + */ + drag_resize: boolean; + + /** + * configures the behavior of the drag_timeline extension + * @param CSS selector. Scrolling the timeline won't be activated for the elements that match the selector + * @param if the property is specified, scrolling the timeline will be activated only when the specified modifier key is pressed. The supported values are: "ctrlKey", "shiftKey", "metaKey", "altKey" + * @param if the property is enabled, scrolling the timeline will be rerendered when the scroll is started and when it is ended + */ + drag_timeline: null | { + ignore?: string, + useKey?: string | boolean, + render?: boolean + } + + /** + * sets the number of 'gantt.config.duration_unit' units that will correspond to one unit of the 'duration' data property. + */ + duration_step: number; + + /** + * sets the duration unit + */ + duration_unit: string; + + /** + * enables automatic merging of multiple resource calendars into one + */ + dynamic_resource_calendars: boolean; + + /** + * changes the name of a property that affects the editing ability of tasks/links in the read-only Gantt chart + */ + editable_property: string; + + /** + * an object that contains definitions of inline editors + * @param for editing text columns, e.g. task name + * @param for editing number columns, e.g. task duration, order, etc. + * @param for editing duration columns, i.e. task duration. + * @param for editing date columns, e.g. start and end dates of the task + * @param for choosing an option from a list + * @param for setting task-predecessor for the currently edited task. This editor gets the [WBS codes of tasks](desktop/specifying_columns.md#wbscode) to set connection with the predecessor task + * @param custom inline editors + */ + editor_types: { + text?: InlineEditor, + number?: InlineEditor, + duration?: InlineEditor, + date?: InlineEditor, + select?: InlineEditor, + predecessor?: InlineEditor, + [customEditorName: string]: InlineEditor | undefined + } + + /** + * sets the end value of the time scale + */ + end_date: Date|undefined; + + /** + * renders an external component into the DOM + * @param an object that is returned by the **onrender* function. + * @param an object that is returned by the **onrender* function. + * @param a DOM element the native component will be attached to. + */ + external_render: { + isElement ( element: any ): boolean, + renderElement ( element: any, container: HTMLElement ): void + } + + /** + * 'says' the Gantt chart to automatically extend the time scale in order to fit all displayed tasks + */ + fit_tasks: boolean; + + /** + * an object of the lightbox controls + * @param the [Checkbox](desktop/checkbox.md) control + * @param the [Constraint](desktop/constraint.md) control + * @param the [Duration](desktop/duration.md) control + * @param the [Duration](desktop/duration.md) control that allows changing the [section visibility](desktop/duration.md#switchingsectionvisibility) + * @param the [Parent](desktop/parent.md) control + * @param the [Radio button](desktop/radio.md) control + * @param the [Resources](desktop/resources.md) control + * @param the [Select](desktop/select.md) control + * @param the [Template](desktop/template.md) control + * @param the [Textarea](desktop/textarea.md) control + * @param the [Time](desktop/time.md) control + * @param the [Time](desktop/time.md) control that allows changing the [section visibility](desktop/time.md#switchingsectionvisibility) + * @param the [Typeselect](desktop/typeselect.md) control + * @param a custom control + */ + form_blocks: { + checkbox?: LightboxControl, + constraint?: LightboxControl, + duration?: LightboxControl, + duration_optional?: LightboxControl, + parent?: LightboxControl, + radio?: LightboxControl, + resources?: LightboxControl, + select?: LightboxControl, + template?: LightboxControl, + textarea?: LightboxControl, + time?: LightboxControl, + time_optional?: LightboxControl, + typeselect?: LightboxControl, + [ControlName: string]: LightboxControl | undefined + } + + /** + * adjusts the width of columns inside a scrollable grid + */ + grid_elastic_columns: boolean|string; + + /** + * sets the name of the attribute of the column resizer's DOM element. The attribute presents the column's index + */ + grid_resizer_column_attribute: string; + + /** + * sets the width of the grid + */ + grid_width: number; + + /** + * shows the critical path in the chart + */ + highlight_critical_path: boolean; + + /** + * enables/disables horizontal scroll by the Shift|Alt|Meta key + mouse wheel movement + */ + horizontal_scroll_key: string|boolean; + + /** + * defines whether tasks should inherit work calendars from their summary parents + */ + inherit_calendar: boolean; + + /** + * specifies whether sub-scales shall use the scale_cell_class template by default + */ + inherit_scale_class: boolean; + + /** + * sets whether the timeline area will be initially scrolled to display the earliest task + */ + initial_scroll: boolean; + + /** + * keeps the duration of a task unchanged during editing of the start/end of a task + */ + inline_editors_date_processing: string|undefined; + + /** + * defines whether inline editor should be opened after one click on a task when multi-task selection is enabled + */ + inline_editors_multiselect_open: boolean|undefined; + + /** + * 'says' to preserve the initial grid's width while resizing columns within + */ + keep_grid_width: boolean; + + /** + * enables keyboard navigation in gantt + */ + keyboard_navigation: boolean; + + /** + * enables keyboard navigation by cells + */ + keyboard_navigation_cells: boolean; + + /** + * sets the name of the attribute of the task layer's DOM element + */ + layer_attribute: string; + + /** + * specifies the layout object + */ + layout: any; + + /** + * specifies the lightbox object + */ + lightbox: LightboxSections; + + /** + * increases the height of the lightbox + */ + lightbox_additional_height: number; + + /** + * sets the size of the link arrow + */ + link_arrow_size: number; + + /** + * sets the name of the attribute that will specify the id of the link's HTML element + */ + link_attribute: string; + + /** + * sets the width of dependency links in the timeline area + */ + link_line_width: number; + + /** + * sets the radius for rounding corners of link lines in the timeline + */ + link_radius: number; + + /** + * sets the width of the area (over the link) sensitive to clicks + */ + link_wrapper_width: number; + + /** + * stores the types of links dependencies + * @param the target task can't start before the source task ends (but it may start later). + * @param the target task can't start until the source task starts (but it may start later). + * @param the target task can't end before the source task ends (but it may end later). + * @param the target task can't end before the source task starts (but it may end later). + */ + links: { + finish_to_start?: string | number, + start_to_start?: string | number, + finish_to_finish?: string | number, + start_to_finish?: string | number + } + + /** + * sets the minimum width for a column in the timeline area + */ + min_column_width: number; + + /** + * sets the minimum duration (in milliseconds) that can be set for a task during resizing. + */ + min_duration: number; + + /** + * sets the minimal width for each grid column (in pixels) while resizing grid + */ + min_grid_column_width: number; + + /** + * sets the minimal row height that can be set for a task during resizing + */ + min_task_grid_row_height: number; + + /** + * enables/disables multi-task selection in the Gantt chart + */ + multiselect: boolean; + + /** + * specifies whether multi-task selection will be available within one or any level + */ + multiselect_one_level: boolean; + + /** + * enables the possibility to expand/collapse split tasks by clicking the +/- button + */ + open_split_tasks: boolean; + + /** + * openes all branches initially + */ + open_tree_initially: boolean; + + /** + * activates the 'branch' mode that allows vertically reordering tasks within the same tree level + */ + order_branch: string|boolean; + + /** + * activates the 'branch' mode that allows reordering tasks within the whole gantt + */ + order_branch_free: boolean; + + /** + * adds an empty row into the end of the list of tasks to simplify tasks editing via keyboard + */ + placeholder_task: any; + + /** + * preserves the current position of the vertical and horizontal scrolls while re-drawing the gantt chart + */ + preserve_scroll: boolean; + + /** + * enables/disables parsing of the resource assignments + */ + process_resource_assignments: boolean; + + /** + * specifies the end date of a project + */ + project_end: Date|undefined; + + /** + * specifies the start date of a project + */ + project_start: Date|undefined; + + /** + * defines whether the task form will appear from the left/right side of the screen or near the selected task + */ + quick_info_detached: boolean; + + /** + * stores a collection of buttons resided in the pop-up task's details form + */ + quickinfo_buttons: any[]; + + /** + * activates the read-only mode for the Gantt chart + */ + readonly: boolean; + + /** + * changes the name of a property that affects the read-only behaviour of tasks/links + */ + readonly_property: string; + + /** + * enables the Redo functionality for the gantt + */ + redo: boolean; + + /** + * enables the possibility to reorder grid columns by drag and drop + */ + reorder_grid_columns: boolean; + + /** + * enables the ability to adjust the row height by drag-and-drop + */ + resize_rows: boolean; + + /** + * specifies the name of the dataStore which stores resource assignments + */ + resource_assignment_store: string; + + /** + * changes the name of the attribute that Gantt uses to find which resource the task row in the resource grid/timeline is referring to + */ + resource_attribute: string; + + /** + * defines a set of working calendars that can be assigned to a specific resource, e.g. a user + * @param mapping of the resource calendar + */ + resource_calendars: { + [resourceId: string | number]: string | number | {[resourceId: string | number]: string | number | undefined } | undefined + } + + /** + * defines the property of a task object that stores a resource id associated with resourceGrid/Timeline/Histogram/Calendar + */ + resource_property: string; + + /** + * tells the resource timeline to render elements and call templates for non-allocated cells + */ + resource_render_empty_cells: boolean; + + /** + * specifies the name of the dataStore connected to the resourceGrid/resourceTimeline/resourceHistogram views + */ + resource_store: string; + + /** + * defines an extra configuration for the resource store + * @param defines whether modified resource assignments can be sent to the DataProcessor as separate entries with persistent IDs + * @param defines whether modified resource objects can be sent to the DataProcessor as separate entries with persistent IDs + * @param defines whether resource assignments will be editable in the resource diagram + * @param creates the default resource datastore. The object includes the following properties: + * @param optional, accepts only one fixed value **"treeDatastore"**. If the type:"treeDatastore" is specified, the datastore will support hierarchical data, with the **id** property as a primary key, and **parent** as a link to the parent id. Any other value will produce a flat list datastore. + * @param optional, preprocesses items loaded into the datastore. It is a good place to set the default values of the datastore items. The function takes the following parameter: + * @param the resource item + * @param optional, enables showing all tasks assigned to a certain resource in the resource view panel. This functionality works both for the resource diagram and resource histogram types of layout. + * @param an array with resources + */ + resources: boolean | { + dataprocessor_assignments?: boolean, + dataprocessor_resources?: boolean, + editable_resource_diagram?: boolean, + resource_store?: { + type?: string, + initItem?: (( + item: any, + )=> any ), + fetchTasks?: boolean + }, + lightbox_resources? ( resourceArray: any ): any + } + + /** + * sets the id of the virtual root element + */ + root_id: string|number; + + /** + * enables rounding the task's start and end dates to the nearest scale marks + */ + round_dnd_dates: boolean; + + /** + * sets the default height for rows of the table + */ + row_height: number; + + /** + * switches gantt to the right-to-left mode + */ + rtl: boolean; + + /** + * sets the height of the time scale and the header of the grid + */ + scale_height: number; + + /** + * sets the minimal scale unit (in case multiple scales are used) as the interval of the leading/closing empty space + */ + scale_offset_minimal: boolean; + + /** + * defines configuration settings of the time scale + */ + scales: Scales; + + /** + * enables backward scheduling + */ + schedule_from_end: boolean; + + /** + * specifies whether the timeline area shall be scrolled while selecting to display the selected task + */ + scroll_on_click: boolean; + + /** + * set the sizes of the vertical (width) and horizontal (height) scrolls + */ + scroll_size: number; + + /** + * enables selection of tasks in the Gantt chart + */ + select_task: boolean; + + /** + * enables converting server-side dates from UTC to a local time zone (and backward) while sending data to the server + */ + server_utc: boolean; + + /** + * shows the chart (timeline) area of the Gantt chart + */ + show_chart: boolean; + + /** + * defines whether to display the placeholder element inside the grid when it is empty + */ + show_empty_state: boolean; + + /** + * enables showing error alerts in case of unexpected behavior + */ + show_errors: boolean; + + /** + * shows the grid area of the Gantt chart + */ + show_grid: boolean; + + /** + * enables/disables displaying links in the Gantt chart + */ + show_links: boolean; + + /** + * shows/hides markers on the page + */ + show_markers: boolean; + + /** + * enables displaying of the progress inside the task bars + */ + show_progress: boolean; + + /** + * activates/disables the 'quick_info' extension (pop-up task's details form) + */ + show_quick_info: boolean; + + /** + * enables/disables displaying column borders in the chart area + */ + show_task_cells: boolean; + + /** + * enables showing tasks that are outside the specified date range in the Gantt chart + */ + show_tasks_outside_timescale: boolean; + + /** + * enables showing unscheduled tasks + */ + show_unscheduled: boolean; + + /** + * hides non-working time from the time scale + */ + skip_off_time: boolean; + + /** + * enables the smart rendering mode for gantt's tasks and links rendering + */ + smart_rendering: boolean; + + /** + * specifies that only visible part of the time scale is rendered on the screen + */ + smart_scales: boolean; + + /** + * enables sorting in the table + */ + sort: boolean; + + /** + * sets the start value of the time scale + */ + start_date: Date|undefined; + + /** + * sets the starting day of the week + */ + start_on_monday: boolean; + + /** + * generates a background image for the timeline area instead of rendering actual columns' and rows' lines + */ + static_background: boolean; + + /** + * enables rendering of highlighted cells in the static_background mode + */ + static_background_cells: boolean; + + /** + * sets the name of the attribute that will specify the id of the task's HTML element + */ + task_attribute: string; + + /** + * sets the format of the date label in the 'Time period' section of the lightbox + */ + task_date: string; + + /** + * sets the name of the attribute of the resizer's DOM element of the grid row. The attribute presents the row's index + */ + task_grid_row_resizer_attribute: string; + + /** + * sets the offset (in pixels) of the nearest task from the left border in the timeline + */ + task_scroll_offset: number; + + /** + * sets the format of the time drop-down selector in the lightbox + */ + time_picker: string; + + /** + * sets the minimum step (in minutes) for the task's time values + */ + time_step: number; + + /** + * shows the background grid in the empty timeline + */ + timeline_placeholder: boolean; + + /** + * sets the length of time, in milliseconds, before the tooltip hides + */ + tooltip_hide_timeout: number; + + /** + * sets the right (if positive) offset of the tooltip's position + */ + tooltip_offset_x: number; + + /** + * sets the top (if positive) offset of the tooltip's position + */ + tooltip_offset_y: number; + + /** + * sets the timeout in milliseconds before the tooltip is displayed for a task + */ + tooltip_timeout: number; + + /** + * enables/disables the touch support for the Gantt chart + */ + touch: boolean|string; + + /** + * defines the time period in milliseconds that is used to differ the long touch gesture from the scroll gesture + */ + touch_drag: number|boolean; + + /** + * returns vibration feedback before/after drag and drop on touch devices + */ + touch_feedback: boolean; + + /** + * defines the duration of vibration feedback before/after drag and drop on touch devices (in milliseconds) + */ + touch_feedback_duration: number; + + /** + * redefines functions responsible for displaying different types of tasks + */ + type_renderers: CustomTypeRenderers["type_renderers"]; + + /** + * stores the names of lightbox's structures (used for different types of tasks) + * @param the name of the task type. + * @param the name of the project type. + * @param the name of the milestone type. + * @param the name of the placeholder type. + * @param name of the custom type. + */ + types: { + task?: string | number, + project?: string | number, + milestone?: string | number, + placeholder?: string | number, + [typeName: string]: string | number | undefined + } + + /** + * enables the Undo functionality for the gantt + */ + undo: boolean; + + /** + * sets the actions that the Undo operation will revert + * @param the name of the "update" action + * @param the name of the "remove" action + * @param the name of the "add" action + * @param the name of the "move" action + */ + undo_actions: { + update?: string, + remove?: string, + add?: string, + move?: string + } + + /** + * sets the number of steps that should be reverted by the undo method + */ + undo_steps: number; + + /** + * sets the types of entities for which the Undo operation will be applied + * @param the name of the "link" entity + * @param the name of the "task" entity + */ + undo_types: { + link?: string, + task?: string + } + + /** + * enables WAI-ARIA support to make the component recognizable for screen readers + */ + wai_aria_attributes: boolean; + + /** + * specifies the speed of scrolling the gantt by the mouse wheel + * @param the horizontal speed + * @param the vertical speed + */ + wheel_scroll_sensitivity: undefined | number | { + x?: number, + y?: number + } + + /** + * sets both the section and its label on the same line + */ + wide_form: boolean; + + /** + * enables calculating the duration of tasks in working time instead of calendar time + */ + work_time: boolean; + + [customConfig: string]: any; +} + +export interface GanttHotkeys { + edit_save: number; + edit_cancel: number; +} + +export type MonthLabelList = [string, string, string, string, string, string, string, string, string, string, string, string]; +export type WeekDayLabelList = [string, string, string, string, string, string, string]; + +export interface GanttLocaleDate { + month_full: MonthLabelList; + month_short: MonthLabelList; + day_full: WeekDayLabelList; + day_short: WeekDayLabelList; +} + +export interface GanttLocaleLabels { + new_task: string; + icon_save: string; + icon_cancel: string; + icon_details: string; + icon_edit: string; + icon_delete: string; + confirm_closing: string; + confirm_deleting: string; + section_description: string; + section_time: string; + section_type: string; + + /* grid columns */ + column_wbs: string; + column_text: string; + column_start_date: string; + column_duration: string; + column_add: string; + + /* link confirmation */ + link: string; + confirm_link_deleting: string; + link_start: string; + link_end: string; + + type_task: string; + type_project: string; + type_milestone: string; + + minutes: string; + hours: string; + days: string; + weeks: string; + months: string; + years: string; + + /* message popup */ + message_ok: string; + message_cancel: string; + + /* constraints */ + section_constraint: string; + constraint_type: string; + constraint_date: string; + asap: string; + alap: string; + snet: string; + snlt: string; + fnet: string; + fnlt: string; + mso: string; + mfo: string; + + /* resource control */ + resources_filter_placeholder: string; + resources_filter_label: string; + + [customLabel: string]: any; +} + +export interface GanttLocale { + date: GanttLocaleDate; + labels: GanttLocaleLabels; +} + +export interface GanttPlugins { + auto_scheduling?: boolean; + click_drag?: boolean; + critical_path?: boolean; + drag_timeline?: boolean; + fullscreen?: boolean; + keyboard_navigation?: boolean; + quick_info?: boolean; + tooltip?: boolean; + undo?: boolean; + grouping?: boolean; + marker?: boolean; + multiselect?: boolean; + overlay?: boolean; +} + +export interface GanttInitializationConfig { + container?: string|HTMLElement; + config?: any; + templates?: any; + events?: any; + data?: any; + plugins?: GanttPlugins; + locale?: any; +} + +export interface GanttInternationalization { + setLocale(locale: any): void; + getLocale(language: string): GanttLocale; + addLocale(language: string, locale: GanttLocale): void; +} +export type GanttPlugin = (gantt: GanttStatic) => void; + +export interface GanttEnterprise { + plugin(plugin: GanttPlugin): void; + getGanttInstance(settings?: GanttInitializationConfig) : GanttStatic; +} + + +export interface GanttStatic { + + /** + * redefines the default click behavior for buttons of the Gantt chart + */ + $click: any; + + /** + * gantt ajax module + */ + ajax: any; + + /** + * the interface of the working calendar object + */ + calendar: Calendar; + + /** + * defines configuration options for dates, scale, controls + */ + config: GanttConfigOptions; + + /** + * stores various constants to reduce the use of magic numbers in the code + */ + constants: any; + + /** + * a set of datastore methods + */ + datastore: DatastoreMethods; + + /** + * a set of date formatting methods + */ + date: DateHelpers; + + /** + * a set of flags which describe current environment + */ + env: any; + + /** + * an object that stores various extensions + */ + ext: Ext; + + /** + * an object of the lightbox controls + * @param the [Checkbox](desktop/checkbox.md) control + * @param the [Constraint](desktop/constraint.md) control + * @param the [Duration](desktop/duration.md) control + * @param the [Duration](desktop/duration.md) control that allows changing the [section visibility](desktop/duration.md#switchingsectionvisibility) + * @param the [Parent](desktop/parent.md) control + * @param the [Radio button](desktop/radio.md) control + * @param the [Resources](desktop/resources.md) control + * @param the [Select](desktop/select.md) control + * @param the [Template](desktop/template.md) control + * @param the [Textarea](desktop/textarea.md) control + * @param the [Time](desktop/time.md) control + * @param the [Time](desktop/time.md) control that allows changing the [section visibility](desktop/time.md#switchingsectionvisibility) + * @param the [Typeselect](desktop/typeselect.md) control + * @param a custom control + */ + form_blocks: { + checkbox?: LightboxControl, + constraint?: LightboxControl, + duration?: LightboxControl, + duration_optional?: LightboxControl, + parent?: LightboxControl, + radio?: LightboxControl, + resources?: LightboxControl, + select?: LightboxControl, + template?: LightboxControl, + textarea?: LightboxControl, + time?: LightboxControl, + time_optional?: LightboxControl, + typeselect?: LightboxControl, + [ControlName: string]: LightboxControl | undefined + } + + /** + * a set of methods for Gantt chart localization + */ + i18n: GanttInternationalization; + + /** + * hides a time unit in the time scale + */ + ignore_time: GanttCallback; + + /** + * specifies JSON serialization and parsing + */ + json: any; + + /** + * defines the hot keys for the Gantt chart + */ + keys: GanttHotkeys; + + /** + * returns the license name of dhtmlxGantt + */ + license: string; + + /** + * the current locale object (region-specific labels) of the Gantt chart + */ + locale: GanttLocale; + + /** + * specifies serialization and parsing in the XML format of dhtmlxGantt 1.0 + */ + oldxml: any; + + /** + * returns the current skin of the Gantt chart + */ + skin: string; + + /** + * returns objects of the available skins + */ + skins: any; + + /** + * defines formatting templates for dates, titles, tooltips in the Gantt chart + */ + templates: GanttTemplates; + + /** + * a set of treeDatastore methods + */ + treeDatastore: TreeDatastoreMethods; + + /** + * various helper modules + */ + utils: {dom: DomHelpers}; + + /** + * returns the version of dhtmlxGantt + */ + version: string; + + /** + * specifies XML serialization and parsing + */ + xml: any; + + $container: HTMLElement; + + $grid: HTMLElement; + + $grid_data: HTMLElement; + + $grid_scale: HTMLElement; + + $root: HTMLElement; + + $scroll_hor: HTMLElement; + + $scroll_ver: HTMLElement; + + $task: HTMLElement; + + $task_bars: HTMLElement; + + $task_bg: HTMLElement; + + $task_data: HTMLElement; + + $task_links: HTMLElement; + + $task_scale: HTMLElement; + + $destroyed?: boolean; + + [customProperty: string]: any; + + /** + * Promise object constructor + * @param executor a callback used to initialize the promise + */ + Promise: new (executor: (resolve: (value?: any) => void, reject: (reason?: any) => void) => void) => Promise; + + /** + * adds a calendar into Gantt + * @param calendar an object with configuration of the calendar + */ + addCalendar(calendar: CalendarConfig): string; + + /** + * adds a new dependency link + * @param link the link object + */ + addLink(link: any): string|number; + + /** + * displays an additional layer with custom elements for a link in the timeline area + * @param func a render function or a config object + */ + addLinkLayer(func: AdditionalLinkLayer["LinkLayerRender"]|AdditionalLinkLayer["LinkLayerConfig"]): string; + + /** + * adds a marker to the timeline area + * @param marker the marker's configuration object + */ + addMarker(marker: MarkerConfig): number|string; + + /** + * adds a new keyboard shortcut + * @param shortcut the key name or the name of keys combination for a shortcut (shortcut syntax) + * @param handler the handler of the shortcut call + * @param scope optional, the name of the context element to attach the handler function to (list of scopes); "gantt" by default + */ + addShortcut(shortcut: string, handler: GanttCallback, scope?: string): void; + + /** + * adds a new task + * @param task the task object + * @param parent optional, the parent's id + * @param index optional, the position the task will be added into (0 or greater) + */ + addTask(task: NewTask, parent?: string|number, index?: number): string|number; + + /** + * displays an additional layer with custom elements for a task in the timeline area + * @param func a render function or a config object + */ + addTaskLayer(func: AdditionalTaskLayer["TaskLayerRender"]|AdditionalTaskLayer["TaskLayerConfig"]): string; + + /** + * adjusts the task's row height for proper display of baseline elements + */ + adjustTaskHeightForBaselines(): void; + + /** + * calls an alert message box + * @param config either an object with the alert box's configuration or the text to show + */ + alert(config: AlertBoxConfig|string|number): HTMLElement; + + /** + * if the specified expression is false, an errorMessage is shown in the red popup at the top right corner of the screen + * @param expression truthy value to assert the expression, falsy - if assertion fails + * @param errorMessage an error message that will be shown in the red popup + */ + assert(expression: any, errorMessage: string): void; + + /** + * attaches the handler to an inner event of dhtmlxGantt + * @param name the event's name, case-insensitive + * @param handler the handler function + * @param settings optional, an object with settings for the event handler + */ + attachEvent (event: T, handler: GanttEventCallback[T], settings?: HandlerSettings): string + /** + * recalculates the schedule of the project + * @param taskId optional, the task id + */ + autoSchedule(taskId?: string|number): void; + + /** + * updates multiple tasks/links at once + * @param callback the callback function + * @param noRedraw optional, specifies if Gantt should repaint the chart after the callback function; true - not to repaint and false (by default) - to repaint + */ + batchUpdate(callback: GanttCallback, noRedraw?: boolean): void; + + /** + * creates a new function that, when called, has its this keyword set to the provided value + * @param method the target function + * @param thisArg the value to be passed as the this parameter to the target function when the bound function is called + */ + bind(method: GanttCallback, thisArg: any): GanttCallback; + + /** + * calculates the duration of a task + * @param config either the configuration object of a time span or the start date of the task + * @param end_date optional, the end date of the task. The parameter is required when the first parameter is specified as start_date. + */ + calculateDuration: Calendar["calculateDuration"]; + + /** + * calculates the end date of a task + * @param config either the configuration object of a time span or the start date of the task + * @param duration optional, the duration of the task. The parameter is required when the first parameter is specified as start_date + */ + calculateEndDate: Calendar["calculateEndDate"]; + + /** + * calculates the level of nesting of a task + * @param task the task's object + */ + calculateTaskLevel(task: Task): number; + + /** + * calls an inner event + * @param name the event's name, case-insensitive + * @param params optional, an array of the event-related data + */ + callEvent(name: string, params?: any[]): boolean; + + /** + * repaints the lighbox for the task according to its type + * @param type the task type + */ + changeLightboxType(type: string): void; + + /** + * changes the link's id + * @param id the current link's id + * @param new_id the new link's id + */ + changeLinkId(id: string|number, new_id: string|number): void; + + /** + * changes the task's id + * @param id the current task's id + * @param new_id the new task's id + */ + changeTaskId(id: string|number, new_id: string|number): void; + + /** + * checks whether an event has some handler(s) specified + * @param name the event's name + */ + checkEvent(name: string): boolean; + + /** + * removes all tasks and additional elements (including markers) from the Gantt chart + */ + clearAll(): void; + + /** + * clears the stack of stored redo commands + */ + clearRedoStack(): void; + + /** + * clears the stack of stored undo commands + */ + clearUndoStack(): void; + + /** + * closes the branch with the specified id + * @param id the branch id + */ + close(id: string|number): void; + + /** + * collapses gantt from the full screen mode to the normal mode + */ + collapse(): void; + + /** + * returns the index of the column by the date + * @param date a date object + */ + columnIndexByDate(date: Date): number; + + /** + * calls a confirm message box + * @param config either an object with the confirm box's configuration or the text to show + */ + confirm(config: ConfirmBoxConfig|string|number): HTMLElement; + + /** + * creates a deep copy of provided object + * @param initialObject the object that needs to be copied + */ + copy(initialObject: any): any; + + /** + * recalculates the task duration in the work time + * @param task the task's object + */ + correctTaskWorkTime(task: Task): void; + + /** + * creates a working calendar + * @param parentCalendar (optional) an existing calendar that is used for creating a new one on the base of it + */ + createCalendar(parentCalendar?: Calendar): Calendar; + + /** + * creates a new dataProcessor instance and attaches it to gantt + * @param config dataProcessor configuration object + */ + createDataProcessor(config: DataProcessorConfig|RouterFunction|RouterConfig): any; + + /** + * creates a datastore according to the provided configuration + * @param config a configuration object of a datastore + */ + createDatastore(config: DatastoreConfig): DatastoreMethods & TreeDatastoreMethods; + + /** + * adds a new task and opens the lightbox to confirm + * @param task optional, the task object + * @param parent optional, the parent's id + * @param index optional, the position the task will be added into (0 or greater) + */ + createTask(task?: NewTask, parent?: string|number, index?: number): string|number; + + /** + * dataProcessor constructor + * @param url url to the data feed + */ + dataProcessor(url: string): void; + + /** + * gets the date of the specified horizontal position in the chart area + * @param pos the relative horizontal position you want to know the date of + */ + dateFromPos(pos: number): Date; + + /** + * returns false if the provided argument is undefined, otherwise true + * @param param a property of an object that should be checked + */ + defined(param: any): boolean; + + /** + * deletes a task calendar by its id + * @param id the id of the calendar + */ + deleteCalendar(id: string|number): void; + + /** + * deletes the specified dependency link + * @param id the dependency link's id + */ + deleteLink(id: string|number): void; + + /** + * deletes the specified marker + * @param markerId the marker's id + */ + deleteMarker(markerId: string|number): void; + + /** + * deletes the specified task + * @param id the task's id + */ + deleteTask(id: string|number): void; + + /** + * destroys the gantt instance + */ + destructor(): void; + + /** + * detaches a handler from an event (which was attached before by the attachEvent() method) + * @param id the event's id + */ + detachEvent(id: string): void; + + /** + * iterates over all parent tasks of the specified task in the Gantt chart + * @param code a function that will iterate over tasks. Takes a task object as a parameter + * @param startTask the id of the item the parent tasks of which should be iterated over + * @param master the object, that 'this' will refer to + */ + eachParent(code: GanttCallback, startTask: string|number, master?: any): void; + + /** + * iterates over all selected tasks in the Gantt chart + * @param code a function that will iterate over tasks. Takes a task id as a parameter + */ + eachSelectedTask(code: GanttCallback): void; + + /** + * iterates over all child tasks of a specific task or the of whole Gantt chart + * @param code a function that will iterate over tasks. Takes a task object as a parameter + * @param parent the parent id. If specified, the function will iterate over children of the
specified parent + * @param master the object, that 'this' will refer to + */ + eachTask(code: GanttCallback, parent?: string|number, master?: any): void; + + /** + * attaches an event handler to an HTML element + * @param node the HTML node or its id + * @param event the name of an HTML event (without the 'on' prefix) + * @param handler the event handler + * @param options optional, the value of either the useCapture or options parameter. Read details + */ + event(node: HTMLElement|string, event: string, handler: GanttCallback, options?: boolean|HandlerSettings): void; + + /** + * removes an event handler from an HTML element + * @param node the HTML node or its id + * @param event the name of an HTML event (without the 'on' prefix) + * @param handler the event handler + * @param options optional, the value of either the useCapture or options parameter. Read details + */ + eventRemove(node: HTMLElement|string, event: string, handler: GanttCallback, options?: boolean|HandlerSettings): void; + + /** + * expands gantt to the full screen mode + */ + expand(): void; + + /** + * exports data from the Gantt chart to an Excel document + * @param _export_ optional, an object with export settings (see the details) + */ + exportToExcel(_export_?: any): void; + + /** + * exports data from the Gantt chart to an iCal string + * @param _export_ optional, an object with export settings (see the details) + */ + exportToICal(_export_?: any): void; + + /** + * exports the structure and data of a Gantt chart into a JSON object + * @param config optional, an object with Gantt configuration + */ + exportToJSON(config?: any): void; + + /** + * exports data from the Gantt chart to MS Project + * @param _export_ optional, an object with export settings (see the details) + */ + exportToMSProject(_export_?: any): void; + + /** + * exports a Gantt chart into the PDF format + * @param _export_ optional, an object with export settings (see the details) + */ + exportToPDF(_export_?: any): void; + + /** + * exports a Gantt chart into the PNG format + * @param _export_ optional, an object with export settings (see the details) + */ + exportToPNG(_export_?: any): void; + + /** + * exports data from the Gantt chart to Primavera P6 + * @param _export_ optional, an object with export settings (see the details) + */ + exportToPrimaveraP6(_export_?: any): void; + + /** + * returns all dependency loops in the chart + */ + findCycles(): any[]; + + /** + * sets focus on the gantt + */ + focus(): void; + + /** + * gets worktime calendar by id + * @param calendarId optional, the id of the global calendar or "global" + */ + getCalendar(calendarId?: string|number): Calendar; + + /** + * gets all the calendars added into Gantt + */ + getCalendars(): any[]; + + /** + * returns the 1st-level child tasks of the specified parent branch + * @param id the parent branch's id + */ + getChildren(id: string|number): any[]; + + /** + * returns the closest working time + * @param config the configuration object or the date + */ + getClosestWorkTime: Calendar["getClosestWorkTime"]; + + /** + * returns the index of the column by its name + * @param name the name of the column + * @param excludeHidden skips indexes of the hidden columns + */ + getColumnIndex(name: string|number, excludeHidden?: boolean): number; + + /** + * returns all tasks and links that a task is connected with + * @param id optional, the id of a task + */ + getConnectedGroup(id?: string|number): any; + + /** + * returns the earliest and latest dates allowed by the constraint applied to a task + * @param task a task object + */ + getConstraintLimitations(task: Task): any; + + /** + * returns the constraint type applied to the task + * @param task a task object + */ + getConstraintType(task: Task): string; + + /** + * returns the configuration object of a datastore + * @param name the name of the datastore + */ + getDatastore(name: string): DatastoreMethods & TreeDatastoreMethods; + + /** + * returns the free slack of a task + * @param task the object of a task + */ + getFreeSlack(task: Task): number; + + /** + * gets the index of a task in the tree + * @param id the task id + */ + getGlobalTaskIndex(id: string|number): number; + + /** + * gets the configuration object of a column + * @param name the column's name + */ + getGridColumn(name: string|number): GridColumn; + + /** + * gets columns of the Gantt chart + */ + getGridColumns(): GridColumn[]; + + /** + * gets the label of a select control in the lightbox + * @param property the name of a data property that the control is mapped to + * @param key the option's id. This parameter is compared with the task's data property to
assign the select's option to the task + */ + getLabel(property: string, key: string|number): string; + + /** + * returns the id of the last selected task + */ + getLastSelectedTask(): string|number; + + /** + * returns the object of the layout view by its name + * @param name the name of the layout view + */ + getLayoutView(name: string): any; + + /** + * gets the lightbox's HTML object element + */ + getLightbox(): HTMLElement; + + /** + * returns the object of the lightbox's section + * @param name the name of the section + */ + getLightboxSection(name: string|number): LightboxSectionState; + + /** + * returns the name of the active lighbox's structure + */ + getLightboxType(): string; + + /** + * returns values of the lightbox's sections + */ + getLightboxValues(): any; + + /** + * returns the dependency link object by the specified id + * @param id the link id + */ + getLink(id: string|number): Link; + + /** + * returns the number of all dependency links presented in the Gantt chart + */ + getLinkCount(): number; + + /** + * returns the HTML element of the specified dependency link + * @param id the link id + */ + getLinkNode(id: string|number): HTMLElement; + + /** + * returns all links presented in the Gantt chart + */ + getLinks(): Array ; + + /** + * gets the marker's object + * @param markerId the marker's id + */ + getMarker(markerId: string|number): any; + + /** + * returns the id of the next item (no matter what the level of nesting is: the same or different) + * @param id the task id + */ + getNext(id: string|number): string|number; + + /** + * returns the id of the next task of the same level + * @param id the task id + */ + getNextSibling(id: string|number): string|number; + + /** + * returns the id of the parent task + * @param id the task id + */ + getParent(id: string|number): string|number; + + /** + * returns the id of the previous item (no matter what the level of nesting is: the same or different) + * @param id the task id + */ + getPrev(id: string|number): string|number; + + /** + * returns the id of the previous task of the same level + * @param id the task id + */ + getPrevSibling(id: string|number): string|number; + + /** + * returns the stack of stored redo user actions + */ + getRedoStack(): UndoRedoAction[]; + + /** + * returns all tasks assigned to the resource + * @param resourceId the id of the resource + * @param taskId the id of the task + */ + getResourceAssignments(resourceId: string|number, taskId?: string|number): ResourceAssignment[]; + + /** + * returns a calendar which the resource is assigned to + * @param resource the id or object of the resource + */ + getResourceCalendar(resource: any): any; + + /** + * returns the configuration of the time scale + */ + getScale(): any; + + /** + * returns the scroll position + */ + getScrollState(): {x: number, y: number}; + + /** + * returns the id of the selected task + */ + getSelectedId(): string; + + /** + * returns an array of the currently selected tasks + */ + getSelectedTasks(): any[]; + + /** + * gets a key navigation shortcut handler + * @param shortcut the key name or the name of keys combination for a shortcut (shortcut syntax) + * @param scope the name of the context element to attach the handler function to (list of scopes) + */ + getShortcutHandler(shortcut: string, scope: string): GanttCallback; + + /** + * returns siblings of the specified task (including itself) + * @param id the task id + */ + getSiblings(id: string|number): any[]; + + /** + * gets the current state of the Gantt chart + */ + getState(): GanttUIState; + + /** + * calculates the combined start/end dates of tasks nested in a project or another task + * @param task_id the task's id, api/gantt_root_id_config.md will be used if not specified + */ + getSubtaskDates(task_id?: string|number): any; + + /** + * calculates the combined duration of tasks nested in a project or another task. + * @param task_id the task's id, api/gantt_root_id_config.md will be used if not specified + */ + getSubtaskDuration(task_id?: string|number): number; + + /** + * returns the task object + * @param id the task id + */ + getTask(id: string|number): Task; + + /** + * returns the parsed resource assignments of a specific task from the datastore + * @param taskId the task id + */ + getTaskAssignments(taskId: string|number): ResourceAssignment[]; + + /** + * returns the height (in pixels) of the DOM element of the task + * @param taskId the task's id + */ + getTaskBarHeight(taskId: number|string): number; + + /** + * returns an array of baselines of a specific task from the datastore + * @param taskId the task id + */ + getTaskBaselines(taskId: string|number): any; + + /** + * finds a task by the specified criteria + * @param propertyName the name of the property to match, or a filter function + * @param propertyValue the property value + * @param types an object with types of the tasks which should be returned + */ + getTaskBy(propertyName: string|GanttCallback, propertyValue?: string|number|boolean|any[], types?: any): Array ; + + /** + * returns a task by its global task index + * @param index the task index in the tree (zero-based numbering) + */ + getTaskByIndex(index: number|string): Task; + + /** + * returns a collection of tasks which occur during the specified period + * @param from the start date of the period + * @param to the end date of the period + */ + getTaskByTime(from?: Date, to?: Date): Array ; + + /** + * returns a task by its WBS code + * @param code the WBS code of the task + */ + getTaskByWBSCode(code: string): Task; + + /** + * gets a calendar assigned to the specified task (a task level calendar) + * @param task the id or object of a task + */ + getTaskCalendar(task: any): any; + + /** + * gets the number of tasks that are currently loaded in the gantt + */ + getTaskCount(): number; + + /** + * returns the visible height of a task + * @param id the task's id + */ + getTaskHeight(id?: string|number): number; + + /** + * gets the index of a task in the branch + * @param id the task id + */ + getTaskIndex(id: string|number): number; + + /** + * returns the HTML element of the task bar + * @param id the task id + */ + getTaskNode(id: string|number): HTMLElement; + + /** + * calculates the position and size of the task's DOM element in the timeline area + * @param task the task object + * @param from optional, the start date of the item + * @param to optional, the end date of the item + */ + getTaskPosition(task: Task, from?: Date, to?: Date): any; + + /** + * returns the array of unique resources assigned to a specific task from the datastore + * @param taskId the task id + */ + getTaskResources(taskId: string|number): any; + + /** + * returns the HTML element of the task row in the table + * @param id the task id + */ + getTaskRowNode(id: string|number): HTMLElement; + + /** + * gets the top position of the task's DOM element in the timeline area + * @param id the task's id + */ + getTaskTop(id: number|string): number; + + /** + * returns the type of a task + * @param task the task object + */ + getTaskType(task: Task): string; + + /** + * returns the total slack of a task + * @param task optional, the object of a task or its ID + */ + getTotalSlack(task?: Task|string|number): any; + + /** + * returns the stack of stored undo user actions + */ + getUndoStack(): UndoRedoAction[]; + + /** + * gets the number of tasks visible on the screen (those that are not collapsed) + */ + getVisibleTaskCount(): number; + + /** + * returns the WBS code (the outline number) of a task + * @param task the object of a task + */ + getWBSCode(task: Task): string; + + /** + * returns the working hours of the specified date + * @param date a date to check + */ + getWorkHours(date: Date): any[]; + + /** + * groups tasks by the specified task's attribute + * @param config the grouping configuration object, or false to ungroup tasks + */ + groupBy(config: GroupConfig|boolean): void; + + /** + * returns the number of child task(s) + * @param id the task id + */ + hasChild(id: string|number): number|undefined; + + /** + * hides the lightbox modal overlay that blocks interactions with the remaining screen + * @param box an element to hide + */ + hideCover(box?: HTMLElement): void; + + /** + * closes the lightbox if it's currently active + */ + hideLightbox(): void; + + /** + * hides the pop-up task form (if it's currently active) + */ + hideQuickInfo(): void; + + /** + * converts an Excel file to JSON + * @param config an object with configuration properties of an imported file + */ + importFromExcel(config: any): void; + + /** + * converts an XML or MPP MS Project file to JSON + * @param config an object with configuration properties of an imported file + */ + importFromMSProject(config: any): void; + + /** + * converts an XML or XER Primavera P6 file to JSON + * @param config an object with configuration properties of an imported file + */ + importFromPrimaveraP6(config: any): void; + + /** + * initializes a dhtmlxGantt inside a container + * @param container an HTML container (or its id) where a dhtmlxGantt object will be initialized + * @param from the start value of the time scale (X–Axis) + * @param to the end value of the time scale (X–Axis) + */ + init(container: string|HTMLElement, from?: Date, to?: Date): void; + + /** + * checks whether a task is a child of a different task + * @param childId the id of a task that you want to check as a child + * @param parentId the id of a task that you want to check as a parent + */ + isChildOf(childId: string|number, parentId: string|number): boolean; + + /** + * checks whether the link is circular + * @param link the link object + */ + isCircularLink(link: Link): boolean; + + /** + * checks whether the specified link is critical + * @param link the link's object + */ + isCriticalLink(link: Link): boolean; + + /** + * checks whether the specified task is critical + * @param task the task's object + */ + isCriticalTask(task: Task): boolean; + + /** + * checks whether the specified link is correct + * @param linkOrFrom either ID of the source (predecessor) task or a link object with the following properties: + * @param from_start optional, specifies if the link is being dragged from the start of the source (predecessor) task (*true*) or from its end (*false*). Not needed at all when the first parameter is specified as an object + * @param to optional, the ID of the target (successor) task. Can have the *null* or *undefined* value if the target task isn't specified yet. Not needed at all when the first parameter is specified as an object + * @param to_start optional, specifies if the link is being dragged to the start of the target (successor) task (*true*) or from its end (*false*). Not needed at all when the first parameter is specified as an object + */ + isLinkAllowed(linkOrFrom: string|number|LinkForValidation, from_start?: boolean, to?: string|number|null|undefined, to_start?: boolean): boolean; + + /** + * checks whether the specified link exists + * @param id the link id + */ + isLinkExists(id: string|number): boolean; + + /** + * checks whether the specified task/link, or the whole Gantt is read-only + * @param item optional, the id or an object of the task/link. If not specified, the method checks whether the Gantt is read-only + */ + isReadonly(item?: number|string|Task|Link): boolean; + + /** + * checks whether the specified task is currently selected + * @param task the task's id + */ + isSelectedTask(task: string|number): boolean; + + /** + * checks whether the specified task is split + * @param task the object of a task + */ + isSplitTask(task: Task): boolean; + + /** + * checks whether the specified task is summary + * @param task the object of a task + */ + isSummaryTask(task: Task): boolean; + + /** + * checks whether the specified task exists + * @param id the task id + */ + isTaskExists(id: string|number): boolean; + + /** + * checks whether the specifies task is currently rendered in the Gantt chart + * @param id the task's id + */ + isTaskVisible(id: string|number): boolean; + + /** + * checks if the task is unscheduled + * @param task the task's object + */ + isUnscheduledTask(task: Task): boolean; + + /** + * checks whether the specified date is working or not + * @param config either the configuration object of a time span or a specific date + */ + isWorkTime: Calendar["isWorkTime"]; + + /** + * loads data to the gantt from an external data source + * @param url the server-side url (may be a static file or a server side script that outputs data) + * @param type ('json', 'xml', 'oldxml') the data type. The default value - 'json' + * @param callback the callback function + */ + load(url: string, type?: string, callback?: GanttCallback): any; + + /** + * gets the id of a task from the specified HTML event + * @param e a native event + */ + locate(e: Event): string|number; + + /** + * merges several working calendars into one + * @param calendars an array of calendars' objects or the first calendar object + * @param calendar2 optional, the second calendar object + */ + mergeCalendars(calendars: Calendar[]|Calendar, calendar2?: Calendar): void; + + /** + * calls a message box of the specified type + * @param config either an object with the message box's configuration or the text to show + */ + message: MessagePopupObject; + + /** + * adds properties of the 'source' object into the 'target' object + * @param target the target object + * @param source the source object + * @param force optional, if true, properties of the 'source' will overwrite matching properties of the 'target', if there are any. If false (by default), properties that already exist in the 'target' will be omitted + */ + mixin(target: CustomObject, source: CustomObject, force?: boolean): void; + + /** + * calls a modalbox + * @param config the modal box's configuration + */ + modalbox(config: ModalBoxConfig): HTMLElement; + + /** + * moves a task to a new position + * @param sid the id of the task to move + * @param tindex the index of the position that the task will be moved to
(the index within a branch) + * @param parent the parent id. If specified, the tindex will refer to the index in the
'parent' branch + */ + moveTask(sid: string|number, tindex: number, parent?: string|number): boolean|void; + + /** + * opens the branch with the specified id + * @param id the branch id + */ + open(id: string|number): void; + + /** + * loads data from a client-side resource + * @param data a string or object which represents data + * @param type optional, ('json', 'xml') the data type. The default value - 'json' + */ + parse(data: string|DataToLoad1 | DataToLoad2, type?: string): void; + + /** + * activates the specified extensions + * @param ext an object with the extensions' names that need to be activated + */ + plugins(ext?: GanttPlugins): GanttPlugins; + + /** + * gets the relative horizontal position of the specified date in the chart area + * @param date a date you want to know the position of + */ + posFromDate(date: Date): number; + + /** + * applies the reverted changes to the gantt once again + */ + redo(): void; + + /** + * refreshes data in the Gantt chart + */ + refreshData(): void; + + /** + * refreshes the specifies link + * @param id the link id + */ + refreshLink(id: string|number): void; + + /** + * refreshes the task and its related links + * @param id the task id + * @param refresh_links optional, defines whether links related to the task should be refreshed, true by default + */ + refreshTask(id: string|number, refresh_links?: boolean): void; + + /** + * removes the specified layer related to a link + * @param layerId a DOM element that will be displayed in the layer + */ + removeLinkLayer(layerId: string|number): void; + + /** + * removes a keyboard shortcut + * @param shortcut the key name or the name of keys combination for a shortcut (shortcut syntax) + * @param scope the element to which the shortcut is attached (list of scopes) + */ + removeShortcut(shortcut: string, scope: string): void; + + /** + * removes the specified layer related to a task + * @param layerId a DOM element that will be displayed in the layer + */ + removeTaskLayer(layerId: string|number): void; + + /** + * renders the whole Gantt chart + */ + render(): void; + + /** + * updates all markers on the page + */ + renderMarkers(): void; + + /** + * rebuilds the Gantt layout using the current value of the layout config + */ + resetLayout(): void; + + /** + * removes the current lightbox's HTML object element + */ + resetLightbox(): void; + + /** + * re-calculates the duration of a project task depending on the dates of its children + * @param task the task's object + */ + resetProjectDates(task: Task): void; + + /** + * re-calculates the skin's settings from the related attached skin CSS file + */ + resetSkin(): void; + + /** + * forces the lightbox to resize + */ + resizeLightbox(): void; + + /** + * rounds the specified date to the nearest date in the time scale + * @param date the Date object to round or an object with settings + */ + roundDate(date: Date|RoundDateConfig): Date; + + /** + * rounds the start and end task's dates to the nearest dates in the time scale + * @param task the task object + */ + roundTaskDates(task: Task): void; + + /** + * scrolls the layout view to the specified position + * @param name the name of the layout view + * @param x optional, the value of the horizontal scroll or 'null' (if the scroll position shouldn't be changed) + * @param y optional, the value of the vertical scroll or 'null' (if the scroll position shouldn't be changed) + */ + scrollLayoutCell(name: string, x: number|null, y: number|null): void; + + /** + * scrolls the Gantt container to the specified position + * @param x optional, the value of the horizontal scroll or 'null' (if the scroll position shouldn't be changed) + * @param y optional, the value of the vertical scroll or 'null' (if the scroll position shouldn't be changed) + */ + scrollTo(x?: number|null, y?: number|null): void; + + /** + * selects the specified task + * @param id the task id + */ + selectTask(id: string|number): string|number; + + /** + * serializes the data into JSON or XML format + * @param type the format that the data will be serialized into.
Possible values: 'json' (default ), 'xml'. + */ + serialize(type?: string): any; + + /** + * returns a list of options + * @param list_name the name of a list + * @param options an array of options + */ + serverList(list_name: string|number, options?: any[]): any[]; + + /** + * set the parent for a task + * @param task the task object + * @param pid the parent task id + */ + setParent(task: Task, pid: number|string): void; + + /** + * resizes the Gantt chart + */ + setSizes(): void; + + /** + * sets the active skin + * @param skin the name of the skin. The allowed values are: "terrace", "dark", "material", "contrast-white", "contrast-black", "meadow", "skyblue", "broadway" + */ + setSkin(skin: string): void; + + /** + * sets the working time for the Gantt chart + * @param config the configuration object of a time span + */ + setWorkTime: Calendar["setWorkTime"]; + + /** + * shows the lightbox modal overlay that blocks interactions with the remaining screen + * @param box an element to hide + */ + showCover(box?: HTMLElement): void; + + /** + * scrolls the chart area to makes the specified date visible + * @param date the date to show in the chart + */ + showDate(date: Date): void; + + /** + * opens the lightbox for the specified task + * @param id the task id + */ + showLightbox(id: string|number): void; + + /** + * displays the pop-up task form for the specified task + * @param id the task id + */ + showQuickInfo(id: string|number): void; + + /** + * makes the specified task visible on the screen + * @param id the task id + */ + showTask(id: string|number): void; + + /** + * makes all code inside it not to trigger internal events or server-side calls + * @param callback the callback function + */ + silent(callback: GanttCallback): void; + + /** + * sorts tasks in the grid + * @param field the name of the column that the grid will be sorted by or a custom sorting function + * @param desc specifies the sorting direction: true - descending sort and false - ascending
sort. By default, false + * @param parent the id of the parent task. Specify the parameter if you want to sort tasks only in the branch of the specified parent. + * @param silent specifies whether rendering should be invoked after reordering items + */ + sort(field: string|((task1: Task, task2: Task) => 1 | 0 | -1), desc?: boolean, parent?: string|number, silent?: boolean): void; + + /** + * selects the specified task if it was unselected and vice versa + * @param taskId the task's id + */ + toggleTaskSelection(taskId: string|number): void; + + /** + * returns a unique id + */ + uid(): number; + + /** + * reverts the changes made in the gantt + */ + undo(): void; + + /** + * removes selection from the selected task + * @param id optional, the id of the task to remove selection from, see details + */ + unselectTask(id?: string|number): void; + + /** + * unsets a working time in the Gantt Chart + * @param config the configuration object of a time span + */ + unsetWorkTime: Calendar["unsetWorkTime"]; + + /** + * updates the specified collection with new options + * @param collection the name of the collection to update + * @param options the new values of the collection + */ + updateCollection(collection: string|number, options: any[]): boolean; + + /** + * updates the specified dependency link + * @param id the task id + */ + updateLink(id: string|number): void; + + /** + * updates the specified marker + * @param markerId the marker's id + */ + updateMarker(markerId: string|number): void; + + /** + * updates the specified task + * @param id the task id + * @param newState optional, the new values of the task + */ + updateTask(id: string|number, newState?: Task): void; + + /** + * updates the resource property of the task object with the values of the resource assignments from the datastore + * @param taskId the task id + */ + updateTaskAssignments(taskId: number|string): void; +} + +export interface CustomTypeRenderers { + + /** + * a custom render function for the *task* type + + * @param optional, a custom render function for the *task* type + * @param optional, a custom render function for the *project* type + * @param optional, a custom render function for the *milestone* type + * @param optional, a custom render function for the custom task type + */ + type_renderers: { + task?: CustomTypeRenderers["typeRenderer"], + project?: CustomTypeRenderers["typeRenderer"], + milestone?: CustomTypeRenderers["typeRenderer"], + [typeName: string]: CustomTypeRenderers["typeRenderer"] | undefined + } + + /** + * a function takes a task's object as a parameter and must return a DOM element that will be displayed instead of the task bar. + * @param the task object + * @param optional, the default render function used in the dhtmlxGantt + */ + typeRenderer ( task: Task, defaultRender?: AdditionalTaskLayer["TaskLayerRender"] ): HTMLElement | boolean | void | undefined +} + +export interface AdditionalTaskLayer { + + /** + * a function takes a task's object as a parameter and must return a DOM element that will be displayed in the layer. + * @param the task object + * @param the timeline view + * @param the Gantt configuration object + * @param the viewport object + */ + TaskLayerRender ( + task: Task, + timeline?: any, + config?: GanttConfigOptions, + viewport?: AdditionalTaskLayer["LayerViewport"] + ): HTMLElement|boolean|void + + /** + * the configuration object for the additional task layer. Has the following properties: + + * @param optional, the layer ID + * @param mandatory, a function that answers for rendering the layer's elements + * @param the function that returns HTML element that should be rendered + * @param optional, a function where you can update the rendered HTML elements + * @param the task object + * @param the container of the rendered node + * @param the timeline view + * @param the Gantt configuration object + * @param the viewport object + * @param optional, this function is called after rendering is complete. You can use it to render native components (for example, using the `ReactDOM.render` method) + * @param the task object + * @param the container of the rendered node + * @param the layout cell where the layer is added (timeline, by default) + * @param optional, a function that returns the coordinates of the viewport rectangle + * @param the task object + * @param the layout cell where the layer is added (timeline, by default) + * @param the Gantt configuration object + * @param the Gantt object + * @param a function that returns the object with of the visible range + * @param the Gantt object + * @param the layout cell where the layer is added (timeline, by default) + * @param the Gantt configuration object + * @param the task datastore object + * @param the viewport object + * @param optional, a layer's container + * @param optional, if true, the element will be displayed over the task + * @param optional, a function that takes a task object as a parameter. If returns 'false', the 'renderer' function won't be called for a task + * @param the task object + */ + TaskLayerConfig: { + id?: string | number, + renderer: { + render: AdditionalTaskLayer["TaskLayerRender"], + update?: (( + task: Task, + node: HTMLElement, + timeline?: any, + config?: GanttConfigOptions, + viewport?: AdditionalTaskLayer["LayerViewport"], + )=> void ), + onrender?: (( + task: Task, + node: HTMLElement, + view?: any, + )=> void ), + getRectangle?: (( + task: Task, + view?: any, + config?: GanttConfigOptions, + gantt?: GanttStatic, + )=> { left: number, top: number, height: number, width: number } | void ), + getVisibleRange: (( + gantt?: GanttStatic, + view?: any, + config?: GanttConfigOptions, + datastore?: any, + viewport?: AdditionalTaskLayer["LayerViewport"], + )=> {start: number, end: number} | undefined | void ), + }, + container?: HTMLElement, + topmost?: boolean, + filter?: (( + task: Task, + )=> boolean ) + } + + /** + * the layer viewport object + + * @param the left rectangle position + * @param the right rectangle position + * @param the top rectangle position + * @param the bottom rectangle position + * @param the rectangle width + * @param the rectangle height + */ + LayerViewport: { + x: number, + x_end: number, + y: number, + y_end: number, + width: number, + height: number + } +} + +export interface AdditionalLinkLayer { + + /** + * a function takes a link's object as a parameter and must return a DOM element that will be displayed in the layer. + * @param the link object + * @param optional, the timeline view + * @param optional, the Gantt configuration object + * @param optional, the viewport object + */ + LinkLayerRender ( + link: Link, + timeline?: any, + config?: GanttConfigOptions, + viewport?: AdditionalTaskLayer["LayerViewport"] + ): HTMLElement|boolean|void + + /** + * the configuration object for the additional link layer. Has the following properties: + + * @param optional, the layer ID + * @param mandatory, a function that answers for rendering the layer's elements + * @param the function that returns HTML element that should be rendered + * @param optional, a function where you can update the rendered HTML elements + * @param the link object + * @param the container of the rendered node + * @param optional, the timeline view + * @param optional, the Gantt configuration object + * @param optional, the viewport object + * @param optional, this function is called after rendering is complete. You can use it to render native components (for example, using the `ReactDOM.render` method) + * @param the link object + * @param the container of the rendered node + * @param optional, the layout cell where the layer is added (timeline, by default) + * @param optional, a function that returns the coordinates of the viewport rectangle + * @param the link object + * @param optional, the layout cell where the layer is added (timeline, by default) + * @param optional, the Gantt configuration object + * @param optional, the Gantt object + * @param a function that returns the object with of the visible range + * @param optional, the Gantt object + * @param optional, the layout cell where the layer is added (timeline, by default) + * @param optional, the Gantt configuration object + * @param optional, the link datastore object + * @param optional, the viewport object + * @param optional, the layer's container + * @param optional, if true, the element will be displayed over the link + * @param optional, a function that takes a link object as a parameter. If returns 'false', the 'renderer' function won't be called for a link + * @param the link object + */ + LinkLayerConfig: { + id?: string | number, + renderer: { + render: AdditionalLinkLayer["LinkLayerRender"], + update?: (( + link: Link, + node: HTMLElement, + timeline?: any, + config?: GanttConfigOptions, + viewport?: AdditionalTaskLayer["LayerViewport"], + )=> void ), + onrender?: (( + link: Link, + node: HTMLElement, + view?: any, + )=> void ), + getRectangle?: (( + link: Link, + view?: any, + config?: GanttConfigOptions, + gantt?: GanttStatic, + )=> { left: number, top: number, height: number, width: number } | void ), + getVisibleRange: (( + gantt?: GanttStatic, + view?: any, + config?: GanttConfigOptions, + datastore?: any, + viewport?: AdditionalTaskLayer["LayerViewport"], + )=> {start: number, end: number} | undefined | void ), + }, + container?: HTMLElement, + topmost?: boolean, + filter?: (( + link: Link, + )=> boolean ) + } + + /** + * the layer viewport object + + * @param the left rectangle position + * @param the right rectangle position + * @param the top rectangle position + * @param the bottom rectangle position + * @param the rectangle width + * @param the rectangle height + */ + LayerViewport: { + x: number, + x_end: number, + y: number, + y_end: number, + width: number, + height: number + } +} + +export interface Task { + + /** + * The task id, auto-generated if not set + */ + id: string | number, + + /** + * The date when a task is scheduled to begin. If not specified, Gantt will calculate it based on the end_date and duration properties.The property becomes optional when setting unscheduled: true. + */ + start_date?: Date, + + /** + * The date when a task is scheduled to be completed. If not specified, Gantt will calculate it based on the start_date and duration properties.The property becomes optional when setting unscheduled: true. + */ + end_date?: Date, + + /** + * The task duration. If not specified, Gantt will calculate it based on the start_date and end_date properties. + */ + duration?: number, + + /** + * Defines whether gantt should do auto-scheduling of the task (true or not specified) or not (false) + */ + auto_scheduling?: boolean, + + /** + * Sets the height of the DOM element of the task in the timeline area + */ + bar_height?: number, + + /** + * Sets the id of the custom calendar to be assigned to the task. The name of the property depends on the value of the calendar_property option + */ + calendar_id?: number | string, + + /** + * Sets the color of the task in the timeline area (i.e. sets background-color for the gantt_task_line element of the task) + */ + color?: string, + + /** + * The date of the task constraint. It is added to the task object when auto-scheduling with time constraints is enabled. The property isn't used if auto_scheduling_compatibility is enabled. + */ + constraint_date?: Date, + + /** + * The type of the task constraint ("asap", "alap", "snet", "snlt", "fnet", "fnlt", "mso", "mfo"). It is added to the task object when auto-scheduling with time constraints is enabled. The property isn't used if auto_scheduling_compatibility is enabled. + */ + constraint_type?: string, + + /** + * Specifies the deadline date for the task. A [visual indicator](desktop/inbuilt_baselines.md#deadlinesandconstraints) is displayed in the timeline when this property is set. + */ + deadline?: Date | string, + + /** + * Defines whether the task can be editable in the read-only Gantt chart. The name of the property depends on the value of the editable_property option + */ + editable?: boolean, + + /** + * The group's id. It is added to the tasks grouped by some criterion if the property used for grouping tasks (relation_property in the groupBy() method) is specified as an object. + */ + group_id?: string | number, + + /** + * Defines whether a task (type:"task") or milestone (type:"milestone") should be hidden in the timeline area + */ + hide_bar?: boolean, + + /** + * The key of the group. It is added to the tasks grouped by some criterion if the property used for grouping tasks (relation_property in the groupBy() method) is specified as an array.It is also added to the tasks with the name of the group (for example, to the "High", "Normal", "Low" tasks if you've grouped tasks by priority. Check the example). + */ + key?: string | number, + + /** + * The label of the group. It is added to the tasks with the name of the group (for example, if you've grouped tasks by priority, the property will be added to the tasks with "High", "Normal", "Low" names. Check the example). + */ + label?: string, + + /** + * Specifies whether the task branch will be opened initially (to show child tasks). To close/open the branch after Gantt initialization, use the related methods: close() and open() + */ + open?: boolean, + + /** + * The id of the parent task. If the specified parent doesn't exist, the task won't be rendered in the Gantt. The id of the root task is specified by the api/gantt_root_id_config.md config. + */ + parent?: number | string, + + /** + * The task's progress (from 0 to 1) + */ + progress?: number, + + /** + * The color of the task progress in the timeline area (i.e. sets background-color for the gantt_task_progress element of the task progress) + */ + progressColor?: string, + + /** + * Defines whether the task must be readonly. The name of the property depends on the value of the readonly_property option + */ + readonly?: boolean, + + /** + * Defines how subtasks of the task must be displayed. Values: "split" | "". If set to "split", the subtasks will be displayed in one row. In addition, if you enable the open_split_tasks property, the subtasks will be rendered in one row only if the task is collapsed. + */ + render?: string, + + /** + * An array with resources assigned to the task. It is added to the task object when importing data from MS Project/Primavera + */ + resource?: Array , + + /** + * Specifies whether a task (type:"task") or milestone (type:"milestone") should appear on the parent projects. + */ + rollup?: boolean, + + /** + * Sets the height for the task's row + */ + row_height?: number, + + /** + * The id of the target task. The property displays the same value as the $drop_target property. The property is added to the task object only if Data Processor is enabled, after the task is updated and data is sent to the server. + */ + target?: string, + + /** + * The name of the task. If necessary you may use any other name for this property.The property is used in default configurations of different parts of Gantt. + */ + text?: any, + + /** + * The color of the task's text in the timeline area (i.e. sets color for the gantt_task_line element of the task) + */ + textColor?: string, + + /** + * the task type. The available values are stored in the api/gantt_types_config.md object: + "task" - a regular task (default value). + "project" - a task that starts, when its earliest child task starts, and ends, when its latest child ends. + The start_date, end_date, duration properties are ignored for such tasks. + + "milestone" - a zero-duration task that is used to mark out important dates of the project. + The duration, progress, end_date properties are ignored for such tasks. + */ + type?: string, + + /** + * Defines whether the task must be unscheduled. By default, the unscheduled task isn't displayed in the timeline area, empty values are displayed in the grid instead of the start and end dates. + */ + unscheduled?: boolean, + + /** + * A system property that is used in internal calculations. + */ + $calculate_duration?: boolean, + + /** + * An object which contains custom properties of a task which were defined in the importFromMSProject() and importFromPrimaveraP6() methods + */ + $custom_data?: object, + + /** + * A system property which defines whether the task has been updated. It is added to the task object when Data Processor is enabled. If the value of the property is "updated", the task's text will be bold in the grid but it is possible to define your own styles via CSS. + */ + $dataprocessor_class?: string, + + /** + * The id of the target task. A temporary property which is added to the task object when dragging the task vertically. + */ + $drop_target?: string, + + /** + * The id of the calendar (or resource calendar) assigned to the task. A system property that is used in internal calculations. + */ + $effective_calendar?: string, + + /** + * A system property which shows whether the task is visible depending on whether the task's parents are expanded or not. If at least one parent is collapsed, the task won't be visible. The exception is only split tasks (subtasks). + */ + $expanded_branch?: boolean, + + /** + * Defines whether the Gantt should send a request to the server to load the first-level subtasks of the task. The property is used when the branch_loading property is enabled. The name of the property depends on the value of the branch_loading_property option. + */ + $has_child?: boolean, + + /** + * The global vertical position of the task. It is bound to the task and changes if the tasks below or above are open or closed. If the parent of the task is collapsed, the property doesn't show the actual position of the task. + */ + $index?: number, + + /** + * The task's level in the tasks hierarchy (zero-based numbering) + */ + $level?: number, + + /** + * The vertical position of the task in the branch (under the parent). It isn't bound to the task and doesn't change if the tasks below or above are open or closed as inside the branch as globally. If the parent of the task is collapsed, the property doesn't show the actual position of the task. + */ + $local_index?: number, + + /** + * It is added for a new task when it is created via the createTask() method or via the "+" button. The property is added to the task object when you open the lightbox, and is removed after you save the task. + */ + $new?: boolean, + + /** + * Required, a system property which is added to the task object. True if the end_date property couldn't be calculated (when the start_date property is loaded but there is no duration or end_date one). In this case, you cannot move or resize the task. The end_date property will depend on the end_date of the subtasks (if any). The start_date property will be fixed and won't change. Auto-scheduling won't work for such a task. If the $no_start property is enabled, the task will fully depend on the dates of its subtasks or on the date of the first task. + */ + $no_end?: boolean, + + /** + * Required, a system property which is added to the task object. True if the start_date property couldn't be calculated (when the end_date property is loaded but there is no duration or start_date one). The start_date property will depend on the start_date of the subtasks (if any) or on the start date of the first task. The end_date property will be fixed and will change only if the start date of the subtasks/first task is bigger than the end date of the task. Auto-scheduling won't work for such a task. If the $no_end property is enabled, the task will fully depend on the dates of its subtasks or on the date of the first task. + */ + $no_start?: boolean, + + /** + * A system property which specifies whether the task is currently opened (true). If you change the value of the property and re-draw the Gantt, it will open or close the task. To change the state of the task, you may also apply the open() or close() methods. + */ + $open?: boolean, + + /** + * An object with original names of task properties which were imported from MS Project / Primavera into the export module (export server). The properties appear in the $raw object while the file is converted into JSON-format but before they are converted into names and format expected by Gantt. + */ + $raw?: object, + + /** + * The id of a row the rollup item / split task is rendered at. This is the temporary property which appears in the object of the rollup/split task only when it's been rendering on the page. + */ + $rendered_at?: string | number, + + /** + * The id of the parent under which the task is rendered (not id of the real parent of the task). The property is used in internal calculations and on tasks' grouping. + */ + $rendered_parent?: number | string, + + /** + * The type of the rendered task (a temporary property). + */ + $rendered_type?: string, + + /** + * An array with ids of resources assigned to the task (a temporary property). But the most actual data is stored in the store of resource assignments not in this property. + */ + $resourceAssignments?: Array , + + /** + * An array with ids of tasks and milestones which have appeared on the current task + */ + $rollup?: Array , + + /** + * Required, an array with ids of all links that come out of the task + */ + $source?: Array , + + /** + * Appears if the task is a subtask of a split task (i.e. arranges in one row with other subtasks) + */ + $split_subtask?: boolean, + + /** + * Required, an array with ids of links that come into task + */ + $target?: Array , + + /** + * A temporary property which is added to the task object when dragging the task vertically. The task looks a little bit transparent in grid on vertical dragging due to this property. + */ + $transparent?: boolean, + + /** + * It is added to the tasks grouped by some criterion. After the grouping is reset, tasks with $virtual: true are removed + */ + $virtual?: boolean, + + /** + * The WBS code of the task (a temporary property). It is added to the task object after applying the getWBSCode() method. If the value of the code has changed (the task's parent or position has been changed), you need to call the getWBSCode() method again to get the updated value of the code. + */ + $wbs?: string, + + [customProperty: string]: any; + +} + +export interface Link { + + /** + * the link id + */ + id: string | number, + + /** + * the id of a task that the dependency will start from + */ + source: string | number, + + /** + * the id of a task that the dependency will end with. + */ + target: string | number, + + /** + * the dependency type. The available values are stored in the api/gantt_links_config.md object. By default, they are: + "0" - 'finish_to_start'. + "1" - 'start_to_start'. + "2" - 'finish_to_finish'. + "3" - 'start_to_finish'. + */ + type: string, + + /** + * the task's lag + */ + lag?: number, + + /** + * can mark link as readonly + */ + readonly?: boolean, + + /** + * can mark link as editable + */ + editable?: boolean, + + [customProperty: string]: any; + +} + +export interface GridColumn { + + /** + * sets the horizontal title alignment. Possible values: *'left'*, *'center'*, or *'right'* + */ + align?: string, + + /** + * hides/shows a column (PRO) + */ + hide?: boolean, + + /** + * specifies the title of the column + */ + label?: string | number, + + /** + * sets the maximum column width in case of resize operations + */ + max_width?: number, + + /** + * sets the minimum column width in case of resize operations + */ + min_width?: number, + + /** + * defines the column's id. The name 'add' allows you to add a column with the '+' sign + */ + name?: string | number, + + /** + * enables the possibility to resize a column by dragging the column's border (PRO) + */ + resize?: boolean, + + /** + * indicates that the related column should display a tree + */ + tree?: boolean, + + /** + * defines the width of the column + */ + width?: number | string, + + /** + * attached inline editor + + * @param the type of the inline editor + * @param specifies which property of the task should be updated by the inline editor + * @param minimal value for the date and duration types + * @param maximal value for the date and duration types + * @param an array with the options for the select types + * @param formatter for the date and predecessor types + */ + editor?: { + type: string, + map_to: string, + min?: Date | number, + max?: Date | number, + options?: Array , + formatter?: DurationFormatter | LinkFormatter + }, + + /** + * sets a data template + * @param the Task object + */ + template? ( task: Task ): any, + + /** + * optional, a callback function for rendering a cell into the DOM. The function takes a task object and the DOM element of the grid cell as parameters and may return a component of the framework. See details here + * @param the Task object + * @param the HTML element of the Grid cell + */ + onrender? ( task: Task, node: HTMLElement ): any, + + /** + * the configuration of sorting after clicking on the column header. When the property is set to *false*, sorting is disabled. You can also set a different task property in the *string* to sort the column or use a custom sorting function: + * @param an object of the first task that will be sorted + * @param an object of the second task that will be sorted + */ + sort?: boolean | string | ( (task1: Task, task2: Task, ) => any ) +} + +export interface LightboxSections { + + /** + * optional, the lightbox sections array for regular tasks + */ + sections?: LightboxSection[], + + /** + * optional, the lightbox sections array for project tasks + */ + project_sections?: LightboxSection[], + + /** + * optional, the lightbox sections array for milestones + */ + milestone_sections?: LightboxSection[], + + /** + * the lightbox sections array for the custom type + */ + [lightboxType: string]: LightboxSection[] | undefined +} + +export interface LightboxSection { + + /** + * the section's name (according to this name, dhtmlxGantt will take the section's label from the *locale.labels* collection). + */ + name: string, + + /** + * the name of a data property that will be mapped to the section. + */ + map_to: string, + + /** + * the [type of the section control](desktop/default_edit_form.md#lightboxcontrols) (editor). + */ + type: string, + + /** + * optional, the section's height. Not used with the [checkbox](desktop/checkbox.md) and [radio](desktop/radio.md) sections. + */ + height?: number, + + /** + * optional, if set to *true*, the section will take focus on opening the lightbox + */ + focus?: boolean, + + /** + * optional, a formatter for the section + */ + formatter?: DurationFormatter | LinkFormatter, + + /** + * optional, if you set the "true" value, the section will be read-only + */ + readonly?: boolean, + + /** + * optional, sets a range for the year selector. Can be set in 2 ways: + */ + year_range?: number | number[], + + /** + * optional, if you set the "true" value, just the 'start Date' selector will be presented in the section. + */ + single_date?: boolean, + + /** + * optional, sets the order of date-time selectors + */ + time_format?: string[], + + /** + * optional, defines whether the end date will be corrected automatically if the selected start date is greater than the end date, *true* by default. The disabled mode allows validating the dates, but if you enable the mode and don't validate the dates, you can get tasks with 0 duration when the *start_date* is greater than the *end_date*. + */ + autofix_end?: boolean, + + /** + * optional, defines select options of the control.Each object in the array specifies a single option and takes the following properties: + + * @param the option's id. This attribute is compared with the task's data property to assign select options to tasks + * @param the option's label + * @param optional, the unit of measurement of the resource (for the Resources control) + */ + options?: { + key: number | string, + label: string, + unit?: string | number + }[], + + /** + * optional, the default value of the section's control. Applied only if the input value is underfined. For the resources control is applied if the value of the resource is underfined. + */ + default_value?: any, + + /** + * optional, if set to "true", the options list will contain an additional option that will allow users to set the root level as the parent for tasks. Used in pair with the **root_label** property + */ + allow_root?: boolean, + + /** + * optional, sets a label for the root-level parent. Used in pair with the **allow_root** property + */ + root_label?: string, + + /** + * optional, specifies the 'onChange' event handler function for the section's control + * @param a native event object. + */ + onchange? ( e: Event ): any, + + /** + * optional, sets a sorting function for the select options + * @param an object of the first task that will be sorted + * @param an object of the second task that will be sorted + */ + sort? ( task1: Task, task2: Task ): number, + + /** + * optional, sets a filtering function for the select options. Takes the task id and task object as parameters + * @param the ID of the task object + * @param the Task object + */ + filter? ( id: string | number, task: Task ): boolean, + + /** + * optional, sets a template for select options + * @param the start date of the task object + * @param the end date of the task object + * @param the Task object + */ + template? ( + start_date: Date | number, + end_date: Date | number, + task: Task + ): string|number +} + +export interface LightboxControl { + + /** + * a function that returns a string with the HTML elements of the section + * @param the section's configuration object + */ + render ( sns: LightboxSection ): string, + + /** + * a function that obtains the value from the **Task** object and sets it to the section + * @param an html object related to the html defined above + * @param a value defined by the **map_to** property + * @param the task object + * @param the section's configuration object + */ + set_value ( + node: HTMLElement, + value: any, + task: Task, + section: LightboxSection + ): any, + + /** + * a function that obtains the value from the section and saves it to the **Task** object + * @param an html object related to the html defined above + * @param the task object + * @param the section's configuration object + */ + get_value ( + node: HTMLElement, + task: Task, + section: LightboxSection + ): any, + + /** + * a function to set focus to the section + * @param an html object related to the html defined above + */ + focus ( node: HTMLElement ): void +} + +export interface LightboxSectionState { + + /** + * the configuration object of the section + + * @param the section id + * @param the section name. According to the name, the gantt takes the label for the section from the **locale.labels** collection. For example, for the 'description' section, the label will be taken as **gantt.locale.labels.section_description** + * @param the section height + * @param the name of a property mapped to the editor + * @param the editor type + * @param if set to *true*, the related field will take the focus on opening the lightbox + */ + section: { + id: string, + name: string, + height: number, + map_to: string, + type: string, + focus: boolean + }, + + /** + * a div with the section body + */ + node: HTMLElement, + + /** + * a div with the section header + */ + header: HTMLElement, + + /** + * a collection of controls used in the section + */ + control: HTMLCollection, + + /** + * returns an object with the section's data + */ + getValue ( ): any, + + /** + * sets the value(s) for the section. As a parameter the method takes a value (or an object with values if the section has several controls) that should be set + * @param a value for the section + * @param optional, an object with any properties + */ + setValue ( value: any, valueObject?: CustomObject ): any +} + +export interface DataToLoad1 { + + /** + * the array with the task data + */ + data: [] | NewTask[] + tasks?: undefined + /** + * the array with the link data + */ + links?: Link[] + + /** + * the array with the resource data + */ + resources?: NewResourceItem[] + + /** + * the array with the assignment data + */ + assignments?: NewAssignmentItem[] + + /** + * the object that has the arrays with the custom data + */ + collections?: Сollections +} + +export interface DataToLoad2 { + + /** + * the array with the task data + */ + tasks: [] | NewTask[] + data?: undefined + /** + * the array with the link data + */ + links?: Link[] + + /** + * the array with the resource data + */ + resources?: NewResourceItem[] + + /** + * the array with the assignment data + */ + assignments?: NewAssignmentItem[] + + /** + * the object that has the arrays with the custom data + */ + collections?: Сollections +} + +/** + * the task object that will be added to Gantt. It can have the following properties: + + * @param optional, the task ID, auto-generated if not set. + * @param optional, the date when a task is scheduled to begin. + * @param optional, the task duration. + * @param optional, the date when a task is scheduled to be completed. + * @param optional, the task name. + * @param optional, specifies if the task will be opened on load (to show child tasks). + * @param optional, the ID of the parent task. + * @param optional, the date of the task constraint. + * @param any other property you want to add, including the ones from the [**Task** object](desktop/task_properties.md) +*/ +export type NewTask = string | {} | { + id?: string | number, + start_date?: string | Date, + duration?: number, + end_date?: string | Date, + text?: string, + open?: boolean, + parent?: string | number, + constraint_date?: string | Date, + [customProperty: string]: any +} + + +/** + * the resource item object that will be added to Gantt. It can have the following properties: + + * @param optional, the resource ID, auto-generated if not set + * @param optional, the ID of the parent resource + * @param optional, the resource name + * @param optional, specifies if the resource will be opened on load (to show child items) + * @param optional, the unit of the resource assignment + * @param optional, the value that is assigned by default when adding the assignment in the lightbox section + * @param any other property you want to add +*/ +export type NewResourceItem = { + id?: string | number, + parent?: string | number, + text?: string, + open?: boolean, + unit?: string | number, + default_value?: string | number, + [customProperty: string]: any +} + + +/** + * the assignment item object that will be added to Gantt. It can have the following properties: + + * @param optional, the assignment ID, auto-generated if not set + * @param the ID of the task the resource is assigned to + * @param the ID of the resource that is assigned to the task + * @param optional, the assignment value + * @param optional, the calculation mode of the time of the resource assignment: "default"|"fixedDates"|"fixedDuration" + * @param optional, the difference between the assignment start date and the task start date + * @param optional, the date the assignment should start + * @param optional, the assignment duration + * @param optional, the date the assignment should end + * @param any other property you want to add +*/ +export type NewAssignmentItem = { + id?: string | number, + task_id: string | number, + resource_id: string | number, + value: number | string, + mode?: string, + delay?: number, + start_date?: string | Date, + duration?: number, + end_date?: string | Date, + [customProperty: string]: any +} + + +export interface Сollections { + + /** + * an array that contains the collection items. + */ + [collectionName: string]: [] | СollectionItem[] +} + +export interface СollectionItem { + + /** + * any custom property of the collection item. + */ + [itemProperty: string]: any +} + +export interface ScaleArray extends Array { + 0: ScaleObj +} + +export type Scales = ScaleArray; + +export interface Scale { + + /** + * the name of the scale unit. The available values are: "minute", "hour", "day" (default), "week", "quarter", "month", "year". + */ + unit: string, + + /** + * the step of the time scale (X-Axis), 1 by default. + */ + step?: number, + + /** + * a function that returns the name of a CSS class that will be applied to the scale units. Takes a date object as a parameter. + * @param a date that will be checked + */ + css? ( date: Date ): any, + + /** + * the format of the scale's labels. If set as a function, expects a date object as a parameter. + * @param a date that will be converted + */ + format?: string | ( (date: Date, ) => any ), + + /** + * the format of the scale's labels. If set as a function, expects a date object as a parameter. + * @param a date that will be converted + */ + date?: string | ( (date: Date, ) => any ) +} + +export interface MessagePopupConfig { + + /** + * optional, the ID of the popup message + */ + id?: number | string + + /** + * the content of the popup message + */ + text: number | string + + /** + * optional, the class name of the popup message + */ + type?: string + + /** + * optional, the time period until the popup message disappears. -1 means, it won't hide by itself + */ + expire?: number +} + +export interface MessagePopupObject { + + /** + * calls a message box of the specified type + */ + (config: string | number | MessagePopupConfig): string | number | HTMLElement + + /** + * the position of the popup message. Possible values are: "top", "bottom", "left", "right" + */ + position: string + + /** + * specifies if Gantt should block keyboard events. *true* by default. + */ + keyboard: boolean + + /** + * a function that hides the popup message. Uses **id** as a parameter: + * @param the ID of the popup message + */ + hide ( id: number | string ): any +} + +export interface AlertBoxConfig { + + /** + * optional, the ID of the alert box + */ + id?: number | string + + /** + * the text of the alert box's body + */ + text: number | string + + /** + * optional, the text of the header + */ + title?: number | string + + /** + * optional, the text of the "OK" button + */ + ok?: number | string + + /** + * optional, the position of the alert box for now supports only one value - "top", any other value will result in "center-align" + */ + position?: string + + /** + * optional, the width of the alert box (set as CSS [](https://developer.mozilla.org/en-US/docs/Web/CSS/length) or + */ + width?: string + + /** + * optional, the height of the alert box (set as CSS [](https://developer.mozilla.org/en-US/docs/Web/CSS/length) or + */ + height?: string + + /** + * optional, the function called on button click. Takes *true* as a parameter (subject to the clicked button) + * @param result of the clicked button, always returns **true** (because there is only the "OK" button) + */ + callback? ( result: boolean ): void +} + +export interface ConfirmBoxConfig { + + /** + * optional, the ID of the confirm box + */ + id?: number | string + + /** + * the text of the confirm box's body + */ + text: number | string + + /** + * optional, the text of the header + */ + title?: number | string + + /** + * optional, the text of the "OK" button + */ + ok?: number | string + + /** + * optional, the text of the "Cancel" button + */ + cancel?: number | string + + /** + * optional, the position of the confirm box for now supports only one value - "top", any other value will result in "center-align" + */ + position?: string + + /** + * optional, the width of the confirm box (set as CSS [](https://developer.mozilla.org/en-US/docs/Web/CSS/length) or + */ + width?: string + + /** + * optional, the height of the confirm box (set as CSS [](https://developer.mozilla.org/en-US/docs/Web/CSS/length) or + */ + height?: string + + /** + * optional, the function called on button click. Takes *true* or *false* as a parameter (subject to the clicked button) + * @param result of the clicked button: **true** for "OK", **false** for "Cancel". + */ + callback? ( result: boolean ): void +} + +export interface ModalBoxConfig { + + /** + * optional, the ID of the modal box + */ + id?: number | string + + /** + * the text of the modal box's body + */ + text: number | string + + /** + * optional, the text of the header + */ + title?: number | string + + /** + * the array of buttons + */ + buttons: string[] | number[] | ModalboxButton[] + + /** + * optional, the position of the modal box for now supports only one value - "top", any other value will result in "center-align" + */ + position?: string + + /** + * optional, the width of the modal box (set as CSS [](https://developer.mozilla.org/en-US/docs/Web/CSS/length) or + */ + width?: string + + /** + * optional, the height of the modal box (set as CSS [](https://developer.mozilla.org/en-US/docs/Web/CSS/length) or + */ + height?: string + + /** + * optional, the function called on button click. Takes *true* or *false* as a parameter (subject to the clicked button) + * @param The result of the callback function will be equal to the stringified index of a pressed button from the array ("0", "1", "2",...) + */ + callback? ( result: string | number | boolean ): void +} + +export interface ModalboxButton { + + /** + * the text of the button + */ + label: string | number + + /** + * optional, the value that is returned in the *result* argument of the *callback* function. + */ + value?: string | number | boolean + + /** + * optional, a custom class name for the button, prefixed with the "gantt_" string. + */ + css?: string | number +} + +export type WorkDayConfig = string | number | boolean | Array + +export type WorkDaysTuple = [WorkDayConfig, WorkDayConfig, WorkDayConfig, WorkDayConfig, WorkDayConfig, WorkDayConfig, WorkDayConfig, ] + +export interface CalendarConfig { + + /** + * optional, the calendar id + */ + id?: string | number, + + /** + * an object that sets the worktime in days and hours. It can include: + + * @param optional, an array with global working hours, sets the start and end hours of the task + * @param optional, an array of 7 days of the week (from 0 - Sunday, to 6 - Saturday), where 1/true stands for a working day and 0/false - a non-working day + * @param optional, an object with different working-time rules for different periods of time. The object can contain a set of key:value pairs where key is the name of a time span and value is an object with a list of attributes. + * @param the time span with the working time settings. The name of that object is used as the name of the time span + * @param the date when the time span is scheduled to begin + * @param the date when the time span is scheduled to be completed + * @param optional, an array of working hours as 'from'-'to' pairs.'false' value sets a day-off, 'true' (default value) applies the default hours (["8:00-17:00"]) + * @param optional, an array of 7 days of the week (from 0 - Sunday, to 6 - Saturday), where 1/true stands for a working day and 0/false - a non-working day. + */ + worktime?: { + hours?: string[] | number[] | boolean, + days?: WorkDaysTuple, + customWeeks?: { + [timespan: string]: { + from: Date, + to: Date, + hours?: Array, + days?: WorkDaysTuple | boolean, + }, + } + } +} + +export interface MarkerConfig { + + /** + * the marker id + */ + id?: string | number, + + /** + * a Date object that sets the marker's start date + */ + start_date: Date, + + /** + * a Date object that sets the marker's end date + */ + end_date?: Date, + + /** + * a CSS class applied to the marker + */ + css?: string, + + /** + * the marker title + */ + text?: string | number, + + /** + * the marker's tooltip + */ + title?: string | number +} + +export interface HandlerSettings { + + /** + * the id of the event handler. + */ + id?: string | number, + + /** + * defines whether the event will be executed only once. + */ + once?: boolean, + + /** + * specifies the `this` object for the listener. + */ + thisObject?: any +} + +export interface GanttUIState { + + /** + * reveals if Gantt is auto-scrolled (*true*). Added only when the + */ + autoscroll: boolean, + + /** + * the update mode. *true* if the method is called inside the [*batchUpdate*](api/gantt_batchupdate.md) method. + */ + batch_update: boolean, + + /** + * the resizing mode of a task. *true* means the task is resized from the start, *false* means that the task is resized from the end. When the task is not resized, it is *null*. + */ + drag_from_start: boolean | null, + + /** + * the id of a task that the user is currently dragging in the Gantt chart. *undefined* or *null*, if no tasks are being dragged in the Gantt chart. + */ + drag_id: string | null | undefined, + + /** + * the drag mode. Has these values: 'move','resize','progress', 'ignore' when a task is dragged. Otherwise, has *null* or *undefined* value. + */ + drag_mode: string | null | undefined, + + /** + * the flag for the fullscreen mode. *true*, if the Gantt chart is in the fullscreen mode, *false* otherwise. + */ + fullscreen: boolean, + + /** + * the id of a task that is currently opened in the lightbox. *undefined* or *null*, if no tasks are opened in the lightbox. + */ + lightbox: string | null | undefined, + + /** + * the new link creation state, returns *true* when the link is created from the start of the predecessor task. + */ + link_from_start: boolean | null, + + /** + * the new link creation state, returns *true* if the mouse points to the link drag element (bubble). + */ + link_landing_area: boolean, + + /** + * the new link creation state. the id of the source (predecessor) task. + */ + link_source_id: string | number | null, + + /** + * the new link creation state. the id of the target (successor) task. + */ + link_target_id: string | number | null, + + /** + * the new link creation state, returns *true* when the link is created to the start of the successor task. + */ + link_to_start: boolean, + + /** + * the date that tasks are displayed in the chart from + */ + min_date: Date, + + /** + * the date that tasks are displayed in the chart till + */ + max_date: Date, + + /** + * the unit of the background grid of the timeline + */ + scale_unit: string, + + /** + * the step of the background grid of the timeline + */ + scale_step: number, + + /** + * the id of the currently selected task. *undefined* or *null*, if no tasks are selected in the Gantt chart. + */ + selected_task: string | null | undefined +} + +export interface RoundDateConfig { + + /** + * the Date object to round; + */ + date: Date, + + /** + * the time unit ("minute", "hour", "day", "week", "month", "year"); + */ + unit?: string, + + /** + * the step of the time scale (X-Axis), 1 by default. + */ + step?: number +} + +export interface LinkForValidation { + + /** + * the ID of the source (predecessor) task. + */ + source: string | number, + + /** + * the ID of the target (successor) task. + */ + target: string | number, + + /** + * the link type. + */ + type: string +} + +export interface GroupConfig { + + /** + * a property of a task object that will be used to group items. + */ + relation_property: string, + + /** + * an array of the groups (summary) items. Each item should have the properties set in the **group_id** and **group_text** parameters (by default, *key* and *label*). + */ + groups: СollectionItem[], + + /** + * optional, the group's id. The default value is 'key'. + */ + group_id?: string, + + /** + * optional, the group's label. The default value is 'label'. + */ + group_text?: string, + + /** + * optional, the delimiter is used for automatic creation of groups for tasks with multiple resources. The default value is ",". + */ + delimiter?: string, + + /** + * optional, the name of the default group. Optional. The default value is 'None'. + */ + default_group_label?: string, + + /** + * optional, defines whether the gantt should save its tree structure inside groups. If not specified or set to *false*, gantt tasks will be displayed in a flat list view. + */ + save_tree_structure?: boolean +} + +/** + * an object that stores the commands of the Undo or Redo action + + * @param an array that stores the changes (commands) of the Undo or Redo action. +*/ +export type UndoRedoAction = { commands: UndoRedoCommand[] } + + +/** + * an object that stores the initial and updated state of the **Task** or **Link** objects: + + * @param the type of a command: "add/remove/update" + * @param the type of the object which was changed: "task" or "link" + * @param the changed task/link object + * @param the task/link object before changes +*/ +export type UndoRedoCommand = { + type: string, + entity: string, + value: Task | Link, + oldValue: Task | Link +} + + +export interface ResourceAssignment { + + /** + * the id of the assignment + */ + id: string | number, + + /** + * the ID of the task the resource is assigned to. + */ + task_id: string | number, + + /** + * the ID of the resource that is assigned to the task. + */ + resource_id: string | number, + + /** + * the quantity of the resources assigned to a task + */ + value: number | string, + + /** + * the difference between the assignment start date and the task start date + */ + delay: number, + + /** + * the date the assignment should start + */ + start_date: Date, + + /** + * the date the assignment should end + */ + end_date: Date, + + /** + * the duration of the assignment + */ + duration: number, + + /** + * the calculation mode of the time of the resource assignment: "default"|"fixedDates"|"fixedDuration" + */ + mode: string, + + /** + * any custom property + */ + [customProperty: string]: any +} + +/** + * object specifying one of the predefined modes of sending the data + + * @param the URL to the server side + * @param optional, the mode of sending data to the server: "JSON" | "REST-JSON" | "JSON" | "POST" | "GET" + * @param optional, defines whether the task must be deleted from the gantt only after a successful response from the server. Dependency links and subtasks will be deleted after the deletion of the parent task is confirmed. +*/ +export type DataProcessorConfig = { + url: string, + mode?: string, + deleteAfterConfirmation?: boolean +} + + +/** + * the router configuration for different entities + + * @param the router object for tasks + * @param the router object for links + * @param the router object for resources + * @param the router object for assignments +*/ +export type RouterConfig = { + task?: RouterForEntity, + link?: RouterForEntity, + resource?: RouterForEntity, + assignment?: RouterForEntity +} + + +/** + * the router function to process changes in Gantt + * @param the name of the relevant entity. Possible values are: "task"|"link"|"resource"|"assignment" + * @param the name of the relevant action. Possible values are: "create"|"update"|"delete" + * @param the processed object + * @param the id of a processed object +*/ +export type RouterFunction = ( + entity: string, + action: string, + data: Task | Link | ResourceAssignment | CustomObject, + id: string | number +) => Promise + + +export interface RouterForEntity { + + /** + * a function to process adding of items + * @param the processed item + */ + create ( data: Task | Link | ResourceAssignment | CustomObject ): Promise + + /** + * a function to process updating of items + * @param the processed item + * @param the id of a processed item + */ + update ( data: Task | Link | ResourceAssignment | CustomObject, id: string | number ): Promise + + /** + * a function to process deleting of items + * @param the id of a processed item + */ + delete ( id: string | number ): Promise +} + +export interface CustomObject { + /* + * @param Any custom property with any type + */ + [propertyName: string]: any +} + +export interface DateHelpers { + + /** + * adds/subtracts the specified time interval to/from the date + * @param the date object that you need to add a time to/subtract a time from + * @param the number of units to add. If this number is positive - the time will be added to the date, if negative - the time will be subtracted + * @param the time unit. Values: 'minute', 'hour', 'day', 'week', 'month', 'year'. + */ + add (date: Date, number: number, unit: string): Date, + + /** + * adds/subtracts the specified number of quarters to/from the date + * @param the date object that you need to add quarters to/subtract quarters from + * @param the number of quarters + */ + add_quarter (date: Date, number: number): Date, + + /** + * converts local time to UTC + * @param the date object to convert + */ + convert_to_utc (date: Date): Date, + + /** + * makes a copy of a Date object + * @param the date object to copy + */ + copy (date: Date): Date, + + /** + * resets the time part of the provided date to 00:00:00 + * @param the date object to format + */ + date_part (date: Date): Date, + + /** + * returns a function that converts a Date object to a string of the specified format + * @param the date format + * @param specifies whether local time should be converted to UTC + */ + date_to_str (format: string, utc?: boolean): Function, + + /** + * resets the time part of the provided date to 00:00:00. Alias of the date_part method. Used by the Day view to set the display date and can be redefined to provide the default behaviour + * @param the date object to format + */ + day_start (date: Date): Date, + + /** + * returns the ISO-8601 week number of the date, weeks starts on Monday + * @param the date object to format + */ + getISOWeek (date: Date): number, + + /** + * returns the week number of the date, but previously converts local time to UTC + * @param the date object to format + */ + getUTCISOWeek (date: Date): number, + + /** + * returns the week number of the date. Weeks start either on Monday or Sunday, depending on the value of the api/gantt_start_on_monday_config.md property. + * @param the date object to format + */ + getWeek (date: Date): number, + + /** + * returns a Date object of the first day of the month for the specified date and clears the time part to zero + * @param the date object to format + */ + month_start (date: Date): Date, + + /** + * converts a string of the specified format to a Date object + * @param a date as a string + * @param the date format + */ + parseDate (date: string, format: string): Date, + + /** + * returns a function that converts a string of the specified format to a Date object + * @param the date format + * @param specifies whether local time should be converted to UTC + */ + str_to_date (format: string, utc?: boolean): Function, + + /** + * returns the time of a Date object as a number of seconds counted from the midnight (00:00:00) + * @param the date object to format + */ + time_part (date: Date): number, + + /** + * adds the leading zero to numbers less than 10 and returns the result as a string. Doesn't affect numbers from 10 + * @param the number to format + */ + to_fixed (num: number): string, + + /** + * returns a Date object of the specified date and clears the part with seconds to zero + * @param the date object to format + */ + minute_start (date: Date): Date, + + /** + * returns a Date object of the specified date and clears the part with minutes and seconds to zero + * @param the date object to format + */ + hour_start (date: Date): Date, + + /** + * returns a Date object of the first day of the week for the specified date and clears the time part to zero + * @param the date object to format + */ + week_start (date: Date): Date, + + /** + * returns a Date object of the first month of the quarter for the specified date and clears the time part to zero + * @param the date object to format + */ + quarter_start (date: Date): Date, + + /** + * returns a Date object of the first day of the year for the specified date and clears the time part to zero + * @param the date object to format + */ + year_start (date: Date): Date + + [customTemplate: string]: any; +} + +export interface Calendar { + + /** + * the id of a task's calendar + */ + id: string | number, + + /** + * sets the working time for the Gantt chart + * @param the [configuration object](api/gantt_setworktime.md#configurationobjectproperties) of a time span: + * @param optional, a number of a week day [0 (Sunday) - 6 (Saturday)]. Note, you can set only 1 day at once + * @param optional, a specific date to set as a working day or day off + * @param optional, an array of working hours as 'from'-'to' pairs.'false' value sets a day-off, 'true' (default value) applies the default hours (["8:00-17:00"]) + * @param optional, an object with different working-time rules for different periods of time. The object can contain a set of key:value pairs where key is the name of a time span and value is an object with a list of attributes. + * @param the time span with the working time settings. The name of that object is used as the name of the time span + * @param the date when the time span is scheduled to begin + * @param the date when the time span is scheduled to be completed + * @param optional, an array of working hours as 'from'-'to' pairs.'false' value sets a day-off, 'true' (default value) applies the default hours (["8:00-17:00"]) + * @param optional, an array of 7 days of the week (from 0 - Sunday, to 6 - Saturday), where 1/true stands for a working day and 0/false - a non-working day. + */ + setWorkTime ( + config: { + day?: string | number, + date?: Date, + hours?: string[] | number[] | boolean, + customWeeks?: { + [timespan: string]: { + from: Date, + to: Date, + hours?: string[] | number[], + days?: WorkDaysTuple | boolean, + }, + }, + } + ): boolean, + + /** + * unsets a working time in the Gantt Chart + * @param the [configuration object](api/gantt_unsetworktime.md#configurationobjectproperties) of a time span: + * @param optional, a number of a week day [0 (Sunday) - 6 (Saturday)]. Note, you can set only 1 day at once + * @param optional, a specific date to set as a working day or day off + * @param optional, an array of working hours as 'from'-'to' pairs. + */ + unsetWorkTime ( + config: { + day?: string | number, + date?: Date, + hours?: string[] | number[] | boolean, + } + ): void, + + /** + * checks whether the specified date is working + * @param either a date to check or the [configuration object](api/gantt_isworktime.md#configurationobjectproperties) of a time span: + * @param a date to check + * @param optional, a time unit: "minute", "hour", "day", "week", "month", "year" + * @param optional, the object of the task the duration of which should be calculated + * @param optional, a time unit: "minute", "hour", "day", "week", "month", "year". Not needed at all when the first parameter is specified as an object + */ + isWorkTime ( + config: Date | { + date: Date, + unit?: string, + task?: Task, + }, + time_unit?: string + ): boolean, + + /** + * returns the closest working time + * @param the [configuration object](api/gantt_getclosestworktime.md#configurationobjectproperties): + * @param a date to get the closest working time for + * @param optional, specifies the direction of the closest time: "future" or "past" + * @param optional, a time unit to search for the closest working time + * @param optional, the object of the task to use its calendar + */ + getClosestWorkTime ( + config: Date | { + date: Date, + dir?: string, + unit?: string, + task?: Task, + } + ): Date, + + /** + * calculates the end date of a task + * @param either the date when a task is scheduled to begin or the [configuration object](api/gantt_calculateenddate.md#configurationobjectproperties) of a time span: + * @param the date when a task is scheduled to begin + * @param the duration of a task + * @param optional, the time unit of the duration: "minute", "hour", "day", "week", "month", "year" + * @param optional, the object of the task the duration of which should be calculated + * @param optional, the duration of a task. Not needed at all when the first parameter is specified as an object + * @param optional, the time unit of the duration. Not needed at all when the first parameter is specified as an object + */ + calculateEndDate ( + config: Date | { + start_date: Date, + duration: number, + unit?: string, + task?: Task, + }, + duration?: number, + unit?: string + ): Date, + + /** + * calculates the duration of a task + * @param either the date when a task is scheduled to begin or the [configuration object](api/gantt_calculateduration.md#configurationobjectproperties) of a time span: + * @param the date when a task is scheduled to begin + * @param the date when a task is scheduled to be completed + * @param optional, the object of the task the duration of which should be calculated + * @param the date when a task is scheduled to be completed. Not needed at all when the first parameter is specified as an object + */ + calculateDuration ( + config: Date | { + start_date: Date, + end_date: Date, + task?: Task, + }, + end?: Date + ): number + + [customMethod: string]: any; +} + +export interface DomHelpers { + + /** + * returns position of the element on the screen in the format of `{x:number, y:number,width:number, height:number}` object + * @param DOM element that will be checked + */ + getNodePosition ( node: HTMLElement ): object, + + /** + * returns mouse coordinates relatively to the DOM element in the format of `{x:number, y:number}` object + * @param event that occured + * @param DOM element that will be checked + */ + getRelativeEventPosition ( e: Event, node: HTMLElement ): object, + + /** + * returns `true` if the node provided as the first argument is DOM child of the node provided as the second argument + * @param child node that will be checked + * @param parent node that will be checked + */ + isChildOf ( child: HTMLElement, parent: HTMLElement ): boolean, + + /** + * returns `true` if the class list of the provided `node` contains a specified css class + * @param DOM element that will be checked + * @param class name that will be checked + */ + hasClass ( node: HTMLElement, className: string ): boolean, + + /** + * returns the first node that matches the provided css selector, starting from the `node` attribute, up to its DOM parents' branch. + * @param DOM element will be checked + * @param a class name for the target node + */ + closest ( node: HTMLElement, cssSelector: string ): HTMLElement + + [customMethod: string]: any; +} + +export interface DatastoreConfig { + + /** + * an arbitrary string name of the datastore. The datastore can be accessed by its name using api/gantt_getdatastore.md. + */ + name: string, + + /** + * optional, accepts only one fixed value **"treeDatastore"**. If the type:"treeDatastore" is specified, the datastore will support hierarchical data, with the **id** property as a primary key, and **parent** as a link to the parent id. Any other value will produce a flat list datastore. + */ + type?: string, + + /** + * optional, enables showing all tasks assigned to a certain resource in the resource view panel. This functionality works both for the resource diagram and resource histogram types of layout. + */ + fetchTasks?: boolean, + + /** + * optional, preprocesses items loaded into the datastore. It is a good place to set the default values of the datastore items. The function takes the following parameter: + * @param the resource item. + */ + initItem? ( item: any ): any +} + +export interface DatastoreMethods { + + /** + * loads data from an array + * @param the data to load + */ + parse ( data: Array ): void, + + /** + * returns the item by its id + * @param the id of the item + */ + getItem ( id: string | number ): object | void, + + /** + * updates the specified item + * @param the id of the item + * @param an object the item + */ + updateItem ( id: string | number, item?: object ): void, + + /** + * deletes the specified item + * @param the id of the item + */ + removeItem ( id: string | number ): void, + + /** + * checks whether the specified item is visible or hidden via filters + * @param the id of the item + */ + isVisible ( id: string | number ): boolean, + + /** + * returns the array of visible items + */ + getVisibleItems (): Array, + + /** + * adds a new item to the datastore + * @param the item object + * @param the position the task will be added into (0 or greater) + */ + addItem ( item: object, index?: number ): number | string, + + /** + * changes the id of the item + * @param the current item's id + * @param the new item's id + */ + changeId ( oldId: string | number, newId: string | number ): void, + + /** + * checks whether the specified item exists in the datastore + * @param the item's id + */ + exists ( id: string | number ): boolean, + + /** + * moves an item to a new position + * @param the index of the current position of the task + * @param the index of the position that the item will be moved to + */ + move ( sindex: number, tindex: number ): void, + + /** + * clears the datastore + */ + clearAll (): void, + + /** + * execute the code without firing API events of the datastore + * @param the callback function + */ + silent ( callback: Function ): void, + + /** + * fires repainting of events of the specified record, runs filters + * @param optional, the id of the record + */ + refresh ( id?: string | number ): void, + + /** + * returns the number of items that are currently loaded into the datastore + */ + count (): number, + + /** + * returns the number of items that are currently visible + */ + countVisible (): number, + + /** + * iterates over all tasks of the datastore + * @param the callback function + */ + eachItem ( callback: Function ): void, + + /** + * runs the filters and updates visible array of items + */ + filter (): void, + + /** + * sorts items in the resource grid + * @param the name of the column that the resource grid will be sorted by or a custom sorting function + * @param specifies the sorting direction: true - descending sort and false - ascending sort. By default, false + * @param the id of the parent item. Specify the parameter if you want to sort items only in the branch of the specified parent. + * @param specifies whether rendering should be invoked after reordering items + */ + sort ( field: string | Function, desc?: boolean, parent?: string | number, silent?: boolean ): void, + + /** + * returns records between the specified indexes + * @param the position of the start record + * @param the position of the end record + */ + getIndexRange ( from: number, to: number ): Array, + + /** + * returns all records of the datastore + */ + getItems (): Array, + + /** + * returns the id of the item by its index. Returns `undefined` if there is no item at the specified index. + * @param the position of the item + */ + getIdByIndex ( index: number ): string | number | void, + + /** + * returns the index of the item by its id. Returns `-1` if no such item exists in the datastore. + * @param the id of the item + */ + getIndexById ( id: string | number ): number, + + /** + * returns the id of the first item of the datastore + */ + getFirst (): string | number | null, + + /** + * returns the id of the last item of the datastore + */ + getLast (): string | number | null, + + /** + * returns the id of the next item of the datastore + * @param the item's id + */ + getNext ( id: string | number ): string | number | null, + + /** + * returns the id of the previous item of the datastore + * @param the item's id + */ + getPrev ( id: string | number ): string | number | null, + + /** + * clears the datastore and removes all attached event handlers. The datastore is not usable after this method is called. + */ + destructor (): void, + + /** + * attaches the handler to an inner event of DataStore + * @param the event's name, case-insensitive + * @param the handler function + * @param optional, an object with settings for the event handler + */ + attachEvent (event: T, handler: TreeDatastoreEvents[T], settings?: object): boolean, + + /** + * calls an inner event + * @param the event's name, case-insensitive + * @param an array of the event-related data + */ + callEvent ( name: string, params: Array ): boolean, + + /** + * detaches a handler from an event (which was attached before by the attachEvent() method) + * @param the event's id + */ + detachEvent ( id: string ): void +} + +export interface DatastoreEvents { + + /** + * fires when an item is being loaded from the data source + * @param the object of an item + */ + "onItemLoading": ( item: any ) => any, + + /** + * fires before data started to be parsed + * @param the array with the data that was loaded + */ + "onBeforeParse": ( data: Array ) => any, + + /** + * fires after data were parsed (became available for API) but before they were rendered in the Gantt chart + * @param the array with the data that was loaded + */ + "onParse": ( data: Array ) => any, + + /** + * fires before an item is updated + * @param the id of an item + * @param the new (updated) object of the item + */ + "onBeforeUpdate": ( id: string | number, item: any ) => any, + + /** + * fires after an item is updated + * @param the id of an item + * @param the object of the item + */ + "onAfterUpdate": ( id: string | number, item: any ) => any, + + /** + * fires before an item is deleted + * @param the id of an item + * @param the object of the item + */ + "onBeforeDelete": ( id: string | number, item: any ) => any, + + /** + * fires after an item is deleted + * @param the id of an item + * @param the object of the item + */ + "onAfterDelete": ( id: string | number, item: any ) => any, + + /** + * fires before a new item is added to the datastore + * @param the id of an item + * @param the object of the item + */ + "onBeforeAdd": ( id: string | number, item: any ) => any, + + /** + * fires after an item is added to the datastore + * @param the id of an item + * @param the object of the item + */ + "onAfterAdd": ( id: string | number, item: any ) => any, + + /** + * fires when the id of an item is changed + * @param the id of an item + * @param the new id of the item + */ + "onIdChange": ( id: string | number, newId: string | number ) => any, + + /** + * fires after all items were removed from the datastore + */ + "onClearAll": () => any, + + /** + * fires before the datastore is refreshed + * @param the id of an item or null + * @param the item object or null + * @param the action type ("paint", "move", "add", "delete", null) + */ + "onBeforeStoreUpdate": ( id: string | number | null, item: any | null, action: string | null ) => any, + + /** + * fires after the datastore has been refreshed + * @param the id of an item or null + * @param the item object or null + * @param the action type ("paint", "move", "add", "delete", null) + */ + "onStoreUpdated": ( id: string | number | null, item: any | null, action: string | null ) => any, + + /** + * fires before filtering is applied + */ + "onBeforeFilter": () => any, + + /** + * fires after the datastore has update the filtering state + */ + "onFilter": () => any, + + /** + * fires for each item during the filtering stage, returning `false` will mark item as not visible + * @param the id of an item + * @param the item object + */ + "onFilterItem": ( id: string | number, item: any ) => any, + + /** + * fires after the destructor() method of the datastore is called + */ + "onDestroy": () => any + + [customEvent: string]: any; +} + +export interface TreeDatastoreMethods extends DatastoreMethods { + + /** + * moves an item to the new position or to a new parent + * @param the id of the item to move + * @param the index of the position that the item will be moved to (the index within a branch) + * @param the parent id. If specified, the tindex will refer to the index in the +'parent' branch + */ + move ( sid: string | number, tindex: number, parent?: string | number ): boolean | void, + + /** + * returns the index of an item in the branch + * @param the id of the item + */ + getBranchIndex ( id: string | number ): number, + + /** + * checks whether the specified item has child items + * @param the id of the item + */ + hasChild ( id: string | number ): number | void, + + /** + * returns the 1st-level child items of the specified parent branch + * @param the id of the parent branch + */ + getChildren ( id: string | number ): Array, + + /** + * checks whether an item is a child of a different item + * @param the id of an item that you want to check as a child + * @param the id of an item that you want to check as a parent + */ + isChildOf ( childId: string | number, parentId: string | number ): boolean, + + /** + * returns siblings of the specified item (including itself) + * @param the id of the item + */ + getSiblings ( id: string | number ): Array, + + /** + * returns the id of the next item of the same level + * @param the id of the item + */ + getNextSibling ( id: string | number ): number | string | null, + + /** + * returns the id of the previous item of the same level + * @param the id of the item + */ + getPrevSibling ( id: string | number ): number | string | null, + + /** + * returns the id of the parent item or 0. + * @param the id of the item + */ + getParent ( id: string | number ): number| string, + + /** + * calculates the level of nesting of an item + * @param the item's object + */ + calculateItemLevel ( item: object ): number, + + /** + * sets the parent for an item. The parent id will be writen to the property specified by `parentProperty` config, "item.parent" by default. + * @param the item's object + * @param the id of the parent + */ + setParent ( item: object, newParentId: string | number | null ): void, + + /** + * iterates over all children of a specific item + * @param the callback function + * @param the id of the parent + */ + eachItem ( callback: Function, parentId?: string | number ): void, + + /** + * iterates over all parent items of the specified item + * @param the callback function + * @param the id of the item the parent item of which should be iterated over + */ + eachParent ( callback: Function, startItem: string | number ): void, + + /** + * opens the branch with the specified id + * @param the branch id + */ + open ( id: string | number ): void, + + /** + * closes the branch with the specified id + * @param the branch id + */ + close ( id: string | number ): void, + + /** + * sorts items in the resource grid + * @param the name of the column that the resource grid will be sorted by or a custom sorting function + * @param specifies the sorting direction: true - descending sort and false - ascending sort. By default, false + * @param the id of the parent item. Specify the parameter if you want to sort items only in the branch of the specified parent. + * @param specifies whether rendering should be invoked after reordering items + */ + sort ( field: string | Function, desc?: boolean, parent?: string | number, silent?: boolean ): void +} + +export interface TreeDatastoreEvents extends DatastoreEvents { + + /** + * fires before an item is moved to a new position + * @param the id of the item to move + * @param the parent id + * @param the index of the position in the parent branch that the item will be moved to + */ + "onBeforeItemMove": ( id: string | number, parent: string | number, tindex: number ) => any, + + /** + * fires after an item was moved to a new position + * @param the id of the item to move + * @param the parent id + * @param the index of the position in the parent branch that the item will be moved to + */ + "onAfterItemMove": ( id: string | number, parent: string | number, tindex: number ) => any, + + /** + * fires on opening a branch + * @param the id of the branch + */ + "onItemOpen": ( id: string | number ) => any, + + /** + * fires on closing a branch + * @param the id of the branch + */ + "onItemClose": ( id: string | number ) => any +} + +export interface InlineEditor { + + /** + * the function is called when you open the inline editor. Here, you can add a container for the DOM elements and initialize the third + * @param task ID + * @param the column configuration object + * @param the configuration object of the custom inline editor + * @param the DOM element of the inline editor + */ + show ( + id: string | number, + column: GridColumn, + config: any, + placeholder: HTMLElement + ): void, + + /** + * optional, the function is called when hiding the inline editor + */ + hide? ( ): void, + + /** + * the function is called after the **show** function. There, you need to set the values to the inline editor elements from the **task** object. The parameters are: + * @param the value of the task property + * @param task ID + * @param the column configuration object + * @param the DOM element of the inline editor + */ + set_value ( + value: any, + id: string | number, + column: GridColumn, + node: HTMLElement + ): void, + + /** + * the function is called before hiding the inline editor. You need to obtain the values from the inline editor and add it to the **task** object. The parameters are: + * @param task ID + * @param the column configuration object + * @param the DOM element of the inline editor + */ + get_value ( + id: string | number, + column: GridColumn, + node: HTMLElement + ): any, + + /** + * optional, the function is called before hiding the inline editor. If you return **true** the changes will be saved, otherwise, they will be cancelled. The parameters are: + * @param the value of the task property + * @param task ID + * @param the column configuration object + * @param the DOM element of the inline editor + */ + is_changed? ( + value: any, + id: string | number, + column: GridColumn, + node: HTMLElement + ): boolean, + + /** + * optional, the function where you can add validation. If you return **false**, the changes will be cancelled. The parameters are: + * @param the value of the task property + * @param task ID + * @param the column configuration object + * @param the DOM element of the inline editor + */ + is_valid? ( + value: any, + id: string | number, + column: GridColumn, + node: HTMLElement + ): boolean, + + /** + * optional, the function for a complex save behavior, when the editor has the `map_to:auto` property. The parameters are: + * @param task ID + * @param the column configuration object + * @param the Task object + */ + save? ( + id: string | number, + column: GridColumn, + node: HTMLElement + ): void, + + /** + * optional, this function is called when the inline editor receives focus. + * @param the DOM element of the inline editor + */ + focus? ( node: HTMLElement ): void + + [customMethod: string]: any; +} + +export interface InlineEditorMethods { + + /** + * opens an editor in the specified task/cell, sets the mapped value and puts browser focus on the editor + * @param the task ID + * @param the column name + */ + startEdit ( taskId: number | string, columnName: string ): void, + + /** + * opens an empty editor in specified task/cell + * @param the task ID + * @param the column name + */ + show ( taskId: number | string, columnName: string ): void, + + /** + * populates an opened editor with values from the task + */ + setValue ( ): void, + + /** + * saves changes and hides an editor + */ + save ( ): void, + + /** + * hides an editor without saving changes + */ + hide ( ): void, + + /** + * puts browser focus on the editor + */ + focus ( ): void, + + /** + * gets the state object {id: taskId, columnName: columnName, placeholder: HTMLElement} + */ + getState ( ): object, + + /** + * gets the current value of the editor + */ + getValue ( ): string, + + /** + * checks whether the current value of the editor differs from the initial value + */ + isChanged ( ): boolean, + + /** + * checks whether the editor is opened + */ + isVisible ( ): boolean, + + /** + * attaches an event handler to inlineEditors object + * @param the name of the event handler + * @param the function that will be called when the event fires + */ + attachEvent (event: T, handler: InlineEditorEvents[T]): string, + + /** + * detaches a handler from an event (which was attached before by the attachEvent() method) + * @param the id of the attached event handler + */ + detachEvent ( id: string ): void, + + /** + * saves the current editor and moves editor to the next cell + * @param the parameter specifies whether it can move the editor to the first cell of the next row after the last cell of the current one + */ + editNextCell ( canChangeRow?: boolean ): void, + + /** + * saves the current editor and opens an editor in the same cell of the task below + * @param the parameter specifies whether it can skip the read-only task and open an editor in the cell of the first editable task. The default *false* state of the parameter closes the editor if the next task is read-only. + */ + editNextRow ( skipReadonly?: boolean ): void, + + /** + * saves the current editor and moves editor to the previous cell + * @param the parameter specifies whether it can move editor to the last cell of the row above after reaching the first cell of the current row + */ + editPrevCell ( canChangeRow?: boolean ): void, + + /** + * saves the current editor and opens an editor in the same cell of the task above + * @param the parameter specifies whether it can skip the read-only task and open an editor in the cell of the first editable task. The default *false* state of the parameter closes the editor if the previous task is read-only. + */ + editPrevRow ( skipReadonly?: boolean ): void, + + /** + * gets the name of the first editable column in the grid + */ + getFirstCell ( ): string, + + /** + * gets the name of the last editable column in the grid + */ + getLastCell ( ): string, + + /** + * returns the name of the next editable column + * @param the parameter specifies in which direction it should iterate the following cell. `1` - right, `-1` - left. + */ + getNextCell ( direction: number ): string | null, + + /** + * checks whether a provided DOM element is a task cell object and returns an editor state object, if it is so: {id: taskId, columnName: columnName} + * @param the HTML element + */ + locateCell ( node: HTMLElement ): object | null, + + /** + * sets a mapping object + * @param an object with the mapping configuration: + * @param the method to initialize mapping + * @param the inlineEditors object + * @param the Grid layout view + * @param the method that will be called when the inline editor is opened + * @param the inlineEditors object + * @param the HTML element + * @param the Grid layout view + * @param the method that will be called when the inline editor is closed + * @param the inlineEditors object + * @param the HTML element + * @param the Grid layout view + * @param the method to destroy mapping + */ + setMapping ( + mapping: { + init: (( + inlineEditors: InlineEditorMethods, + grid: any, + )=> void ), + onShow: (( + inlineEditors: InlineEditorMethods, + node: HTMLElement, + grid: any, + )=> void ), + onHide: (( + inlineEditors: InlineEditorMethods, + node: HTMLElement, + grid: any, + )=> void ), + destroy: (()=> void ), + } + ): void, + + /** + * returns a currently applied mapping object + */ + getMapping ( ): object + + [customMethod: string]: any; +} + +export interface InlineEditorEvents { + + "onBeforeEditStart": ( state: { + id: number | string, + columnName: string, + }) => any, + + "onEditStart": ( state: { + id: number | string, + columnName: string, + }) => any, + + "onBeforeSave": ( state: { + id: number | string, + columnName: string, + oldValue: any, + newValue: any, + }) => any, + + "onSave": ( state: { + id: number | string, + columnName: string, + oldValue: any, + newValue: any, + }) => any, + + "onEditEnd": ( state: { + id: number | string, + columnName: string, + }) => any + + [customEvent: string]: any; +} + +export interface Fullscreen { + + /** + * expands gantt to the full screen mode + */ + expand ( ): void, + + /** + * collapses gantt from the fullscreen mode to the normal mode + */ + collapse ( ): void, + + /** + * calls the **collapse()** method if gantt is expanded to full screen, and the **expand()** method otherwise + */ + toggle ( ): void, + + /** + * returns a DOM element that will be expanded to full screen by the **expand()** method. + */ + getFullscreenElement ( ): HTMLElement + + [customMethod: string]: any; +} + +export interface KeyNav { + + /** + * allows selecting any cell in the grid. Works only if the Grid already has the focus + * @param the config object + * @param the id of an edited task + * @param the column name + * @param type of the scope. Possible values: "gantt", "taskRow", "taskCell", "headerCell" + */ + focus ( + config: { + id: number | string, + column: string, + type: string, + } + ): void, + + /** + * allows obtaining information about the active cell + */ + getActiveNode ( ): boolean | void + + [customMethod: string]: any; +} + +export interface QuickInfo { + + /** + * displays the quick info popup for a specified element + * @param the task ID + */ + show ( id: number | string ): void, + + /** + * displays the quick info popup at specific coordinates + * @param horizontal coordinate + * @param vertical coordinate + */ + show ( x: number | string, y: number | string ): void, + + /** + * hides the quick info popup. When **gantt.config.quick_info_detached** is set to *false*, the quick info will not disappear immediately, but after a short animation. Providing *true* value as an argument will cancel the animation and will remove the popup immediately. + * @param defines whether the quick info popup will be hidden immediately without animation + */ + hide ( force?: boolean ): HTMLElement, + + /** + * sets a container where the quick info will be displayed. If no custom container specified, QuickInfo will be placed into the first of the found nodes: **gantt.$task, gantt.$grid, gantt.$root** + * @param container element or its ID + */ + setContainer ( container: HTMLElement | string ): void, + + /** + * returns the HTMLElement of the quick info popup. Returns *null* if the quick info is not initialized + */ + getNode ( ): HTMLElement | null, + + /** + * puts the content into the quick info + * @param optional, the configuration object of a quick info which can include the following attributes: + * @param optional, the id of the task to which the action buttons of the quick info will be connected + * @param optional, the header of the pop-up edit form which may include: + * @param optional, the title of the pop-up edit form + * @param optional, the date of the pop-up edit form + * @param optional, the content of the pop-up edit form + * @param optional, buttons to be placed in the pop-up edit form + */ + setContent ( + config?: { + taskId?: string | number, + header?: { + title?: string, + date?: string, + }, + content?: string, + buttons?: string[], + } + ): void + + [customMethod: string]: any; +} + +export interface Undo { + + /** + * reverts the changes made in the gantt + */ + undo ( ): void, + + /** + * applies the reverted changes to the gantt once again + */ + redo ( ): void, + + /** + * returns the stack of stored undo user actions + */ + getUndoStack ( ): UndoRedoAction[], + + /** + * returns the stack of stored redo user actions + */ + getRedoStack ( ): UndoRedoAction[], + + /** + * sets the stack of stored undo user actions + */ + setUndoStack ( ): UndoRedoAction[] , + + /** + * sets the stack of stored redo user actions + */ + setRedoStack ( ): UndoRedoAction[] , + + /** + * clears the stack of stored undo commands + */ + clearUndoStack ( ): void, + + /** + * clears the stack of stored redo commands + */ + clearRedoStack ( ): void, + + /** + * saves the current state of a task/link before the changes are made + * @param the id of a task/link, + * @param the type of an entry for which the id is provided as the first argument. + */ + saveState ( id: string | number, type: string ): boolean + + [customMethod: string]: any; +} + +export interface ClickDrag { + + /** + * sets a custom CSS class for a selected element + */ + className?: string, + + /** + * the element to attach an event to and select + */ + viewPort?: HTMLElement, + + /** + * defines whether requestAnimationFrame is used during rendering + */ + useRequestAnimationFrame?: boolean, + + /** + * true to add selection only in one row equal to the height of a task + */ + singleRow?: boolean, + + /** + * CSS selector. Drag-n-drop won't be activated for the elements that match the selector + */ + ignore?: string, + + /** + * if the property is specified, drag-n-drop will be activated only when the specified modifier key is pressed. Supported values: "ctrlKey", "shiftKey", "metaKey", "altKey" + */ + useKey?: string | boolean, + + /** + * a function that will be called when the mouse button is released. Takes 6 parameters: + * @param an object with the following attributes: + * @param the coordinates of the left top corner of the document + * @param the left coordinate + * @param the top coordinate + * @param the coordinates of the left top element used as a viewPort + * @param the left coordinate + * @param the top coordinate + * @param an object with the following attributes: + * @param the coordinates of the left top corner of the document + * @param the left coordinate + * @param the top coordinate + * @param the coordinates of the left top element used as a viewPort + * @param the left coordinate + * @param the top coordinate + * @param the date that corresponds to the starting point + * @param the date that corresponds to the ending point + * @param an array of tasks between the start and end date points + * @param an array of tasks selected between the start and end coordinates vertically + */ + callback? ( + startPoint?: { + absolute: { + left: number, + top: number, + }, + relative: { + left: number, + top: number, + }, + }, + endPoint?: { + absolute: { + left: number, + top: number, + }, + relative: { + left: number, + top: number, + }, + }, + startDate?: Date, + endDate?: Date, + tasksBetweenDates?: Array, + tasksInRows?: Array + ): any, + + /** + * a function that creates an element rendered during dragging. Takes two parameters: + * @param an object with the attributes: + * @param the coordinates of the left top corner of the document + * @param the left coordinate + * @param the top coordinate + * @param the coordinates of the left top element used as a viewPort + * @param the left coordinate + * @param the top coordinate + * @param an object with the attributes: + * @param the coordinates of the left top corner of the document + * @param the left coordinate + * @param the top coordinate + * @param the coordinates of the left top element used as a viewPort + * @param the left coordinate + * @param the top coordinate + */ + render? ( + startPoint?: { + absolute: { + left: number, + top: number, + }, + relative: { + left: number, + top: number, + }, + }, + endPoint?: { + absolute: { + left: number, + top: number, + }, + relative: { + left: number, + top: number, + }, + } + ): any + + [customMethod: string]: any; +} + +export interface Overlay { + + /** + * adds a new overlay into the Gantt Chart and returns its id + * @param the render function. Takes a container with custom content as a parameter + * @param the overlay container + * @param optional, the ID of the overlay + */ + addOverlay ( + render: (( + container: HTMLElement, + )=> HTMLElement ), + id?: number | string + ): string | number, + + /** + * removes an overlay by its id + * @param the ID of the overlay + */ + deleteOverlay ( id: number | string ): boolean, + + /** + * returns an array with ids of overlays added into the chart + */ + getOverlaysIds ( ): Array, + + /** + * repaints the specified overlay. + * @param the ID of the overlay + */ + refreshOverlay ( id: number | string ): void, + + /** + * shows an overlay by its id. + * @param the ID of the overlay + */ + showOverlay ( id: number | string ): void, + + /** + * hides an overlay by its id + * @param the ID of the overlay + */ + hideOverlay ( id: number | string ): void, + + /** + * checks visibility of the specified overlay. Returns *true* if the overlay is visible. + * @param the ID of the overlay + */ + isOverlayVisible ( id: number | string ): boolean + + [customMethod: string]: any; +} + +export interface ZoomLevel { + + /** + * the name of the level + */ + name: string + + /** + * the height of the scale + */ + scale_height?: number + + /** + * the height of the scale + */ + height?: number + + /** + * the minimal width of a column. It has a higher priority than minColumnWidth and maxColumnWidth + */ + min_column_width?: number + + /** + * an array of scales to switch between while zooming in/out on this level + */ + scales: Scales +} + +export interface ZoomMethods { + + /** + * initializes the extension with the provided configuration. + * @param an object with configuration settings that contains the *levels* array of zooming levels and a number of additional properties: + * @param required, an array of zooming levels + * @param allows specifying a custom handler of the mouse wheel to work with zooming manually + * @param a native event object. + * @param the start value of the time scale zooming + * @param the end value of the time scale zooming + * @param the number of the default active level + * @param the step of increasing/decreasing the width of scale while switching to the next/previous zooming level + * @param the minimal width of a column that allows switching to the previous zooming level + * @param the maximal width of a column that allows switching to the next zooming level + * @param the key that enables zooming by scrolling the mouse wheel:"ctrlKey" | "altKey" | "shiftKey" + * @param the trigger of zooming: "wheel" | null | undefined + * @param a DOM element over which zooming is triggered or a function that returns a DOM element + */ + init ( + zoomConfig: { + levels: ZoomLevel[], + handler?: (( + e: Event, + )=> void ), + startDate?: Date, + endDate?: Date, + activeLevelIndex?: number, + widthStep?: number, + minColumnWidth?: number, + maxColumnWidth?: number, + useKey?: string, + trigger?: string | null | undefined, + element?: HTMLElement | (()=> HTMLElement ), + } + ): void, + + /** + * returns the number (index) of the current zooming level + */ + getCurrentLevel ( ): number, + + /** + * switches to the specified zooming level. + * @param The level is defined either by a string (the name of the level from the config, e.g. "year"), or by its number in the array of levels + */ + setLevel ( level: number | string ): void, + + /** + * allows getting all zooming levels + */ + getLevels ( ): any[], + + /** + * increases the current zooming level + */ + zoomIn ( ): void, + + /** + * decreases the current zooming level + */ + zoomOut ( ): void, + + /** + * attaches an event handler + * @param the name of the event handler + * @param the function that will be called when the event fires + */ + attachEvent (event: T, handler: ZoomEvents[T]): string, + + /** + * detaches a handler from an event + * @param the id of the attached event handler + */ + detachEvent ( id: string ): void, + + /** + * calls an inner event + * @param the event's name, case-insensitive + * @param optional, an array of the event-related data + */ + callEvent ( name: string, params: Array ): boolean, + + /** + * checks whether an event has some handler(s) specified + * @param the event's name + */ + checkEvent ( name: string ): boolean, +} + +export interface ZoomEvents { + + /** + * fires during switching of the zooming level. + * @param the number of the level + * @param the config of the level + */ + "onAfterZoom": ( level: number | string, config: ZoomLevel ) => any +} + +export interface Tooltip { + + /** + * returns the HTML element of the tooltip + */ + getNode ( ): HTMLElement, + + /** + * locks the position of tooltip to the boundaries of the specified HTML element + * @param the HTML element under the question + */ + setViewport ( node: HTMLElement ): object, + + /** + * displays the tooltip at specific coordinates (relative to document.body). The method can take different parameters, depending on the position you want to show the tooltip at. To display tooltip at specific coordinates (relative to document.body), pass x,y coordinates. To display tooltip at the mouse event coordinates pass the Event object. The *tooltip_offset_x/y* and viewport will be taken into account. + * @param the X coordinate or the mouse event object + * @param the Y coordinate + */ + show ( config?: number | Event, top?: number ): object, + + /** + * hides the tooltip element + */ + hide ( ): object, + + /** + * puts HTML content into the tooltip. Takes as a parameter: + * @param a string with HTML content for the tooltip + */ + setContent ( html: string ): object, +} + +export interface Tooltips { + + /** + * Tooltip object + */ + tooltip: Tooltip, + + /** + * adds tooltip with extended configuration. The method takes one parameter: + * @param an object with the tooltip settings. The settings are: + * @param defines CSS-selector for the elements to listen to mouse events on + * @param a handler called when the mouse pointer enters the element. The parameters are: + * @param a native mouse event + * @param the HTML node + * @param optional, a handler called when the mouse pointer moves inside the element. The parameters are: + * @param a native mouse event + * @param the HTML node + * @param a handler called when the mouse pointer leaves the element. The parameters are: + * @param a native mouse event + * @param the HTML node + * @param optional, defines whether the module listens to mouse events on the whole page (*true*) or only inside a gantt element (*false*). By default the option is set to *false*. + */ + attach ( + config: { + selector: string, + onmouseenter: (( + event: MouseEvent, + node: HTMLElement, + )=> void ), + onmousemove?: (( + event: MouseEvent, + node: HTMLElement, + )=> void ), + onmouseleave: (( + event: MouseEvent, + node: HTMLElement, + )=> void ), + global?: boolean, + } + ): void, + + /** + * adds a tooltip for the specified Gantt element. It is a more simplified version of the **attach()** method. The method takes one parameter: + * @param an object with the tooltip settings. The settings are: + * @param a CSS-selector of the Gantt element to add a tooltip to + * @param a template for the tooltip. The template function takes two parameters in its turn: + * @param a native mouse event + * @param the HTML node and returns a string with a template. + * @param optional, defines whether the module listens to mouse events on the whole page (*true*) or only inside a gantt element (*false*). By default the option is set to *false*. + */ + tooltipFor ( + config: { + selector: string, + html: (( + event: Event, + node: HTMLElement, + )=> HTMLElement | string | number | void ), + global?: boolean, + } + ): void, + + /** + * removes tooltip. As a parameter the method takes: + * @param the CSS selector of a Gantt element + */ + detach ( selector: string ): void, +} + +export interface DurationFormatter { + + /** + * returns *true* if the provided string can be parsed into the duration value, otherwise + * @param the string that will be checked + */ + canParse ( value: string ): boolean, + + /** + * converts the provided duration value into the duration string + * @param the duration value that will be converted + */ + format ( value: number ): string, + + /** + * parses the provided string into the duration value. If the value can’t be parsed, ‘null’ will be returned + * @param the string that will be converted + */ + parse ( value: string ): number, + +} + +export interface LinkFormatter { + + /** + * returns *true* if the provided string can be parsed into the link object, otherwise + * @param the string that will be checked + */ + canParse ( value: string ): boolean, + + /** + * converts the provided link value into the string + * @param the link object that will be converted + */ + format ( value: Link ): string, + + /** + * parses the provided string into the link object. If the value can’t be parsed, ‘null’ will be returned. **Note** that the *link.target* of the given link will have "null" value + * @param the string that will be converted + */ + parse ( value: string ): object, + +} + +export interface Formatters { + + /** + * creates a Duration Formatter + * @param optional, a configuration object which can include the following attributes: + * @param specifies the default format for the **parse** method, which is used when an input value is entering without units. Default value: "day". + * @param specifies the format for the duration values storage in the gantt. This property affects the output value of the **parse** method. Default value: "hour". + * @param specifies the format for the output value. Supported values: "auto", "minute", "hour", "day", "week", "month", "year", "an array containing any of these values". The "auto" value means the formatter will try to select an appropriate unit depending on provided value (i.e. larger values will be formatted as days/months/years, smaller values will be formatted as minutes/hours). + * @param sets short labels (abbreviations) for time units. Default value: *false* + * @param defines how duration values will be converted from minutes to hours and vice-versa. *Default value: 60* + * @param defines how duration values will be converted from hours to days and vice-versa. *Default value: 8* + * @param defines how duration values will be converted from hours to weeks and vice-versa. *Default value: 40* + * @param defines how duration values will be converted from days to months and vice-versa. *Default value: 30* + * @param defines how duration values will be converted from days to years and vice-versa. *Default: 365* + * @param defines text labels for different time units. These labels are used both for parsed and formatted values. + * @param configuration for minutes + * @param full text label for minutes + * @param plural text label for minutes + * @param short text label for minutes + * @param configuration for hours + * @param full text label for hours + * @param plural text label for hours + * @param short text label for hours + * @param configuration for days + * @param full text label for days + * @param plural text label for days + * @param short text label for days + * @param configuration for weeks + * @param full text label for weeks + * @param plural text label for weeks + * @param short text label for weeks + * @param configuration for months + * @param full text label for months + * @param plural text label for months + * @param short text label for months + * @param configuration for years + * @param full text label for years + * @param plural text label for years + * @param short text label for years + */ + durationFormatter ( + config?: { + enter?: string, + store?: string, + format?: string | Array , + short?: boolean, + minutesPerHour?: number, + hoursPerDay?: number, + hoursPerWeek?: number, + daysPerMonth?: number, + daysPerYear?: number, + labels?: { + minute?: { + full?: string, + plural?: string, + short?: string, + }, + hour?: { + full?: string, + plural?: string, + short?: string, + }, + day?: { + full?: string, + plural?: string, + short?: string, + }, + week?: { + full?: string, + plural?: string, + short?: string, + }, + month?: { + full?: string, + plural?: string, + short?: string, + }, + year?: { + full?: string, + plural?: string, + short?: string, + }, + }, + } + ): DurationFormatter, + + /** + * create a Link Formatter + * @param optional, a configuration object which can include the following attributes: + * @param an instance of the *DurationFormatter* created by the *gantt.ext.formatters.durationFormatter()*. It affects how lag/lead values of links are parsed and formatted: + * @param locale labels for different types of links + * @param labels for the Finish to Start links + * @param labels for the Start to Start links + * @param labels for the Finish to Finish links + * @param labels for the Start to Finish links + */ + linkFormatter ( + config?: { + durationFormatter?: DurationFormatter, + labels?: { + finish_to_start?: string, + start_to_start?: string, + finish_to_finish?: string, + start_to_finish?: string, + }, + } + ): LinkFormatter, +} + +export interface EmptyState { + + /** + * an array with the IDs of the attached handlers. It is modified by the *attachAddTaskEvent* and *detachAddTaskEvents* methods. + */ + clickEvents?: Array, + + /** + * returns *true* if there is no data loaded into the Gantt chart, otherwise + */ + isGanttEmpty ( ): boolean, + + /** + * returns *true* if the api/gantt_show_empty_state_config.md property is enabled, otherwise + */ + isEnabled ( ): boolean, + + /** + * puts an HTML content into the empty state element. The method can be redefined. + * @param the container element + */ + renderContent ( container: HTMLElement ): void, + + /** + * returns the DOM element where the empty state will be attached to. By default, returns the grid element (the "empty state" will be displayed in the grid). If there is no grid, returns the timeline element (the "empty state" will be displayed in the timeline). The method can be redefined. + */ + getContainer ( ): HTMLElement | null, + + /** + * returns the DOM node of the empty state element + */ + getNode ( ): HTMLElement | null, + + /** + * displays the "empty state". Returns *null* if there is no container for the Empty State Element. The extension calls the method by itself + */ + show ( ): null | void, + + /** + * hides the "empty state". Returns *false* if there is no Empty State Element node, so there is nothing to hide. The extension calls the method by itself + */ + hide ( ): boolean | void, + + /** + * adds the handler that will fire after clicking on the Empty State Element. By default, it is used to add a new task. + */ + attachAddTaskEvent ( ): void, + + /** + * removes the handlers that were used to add a task after clicking on the Empty State Element + */ + detachAddTaskEvents ( ): void +} + +export interface Ext { + inlineEditors: InlineEditorMethods, + emptyStateElement: EmptyState, + fullscreen: Fullscreen, + formatters: Formatters, + keyboardNavigation: KeyNav, + quickInfo: QuickInfo, + undo: Undo, + overlay: Overlay, + tooltips: Tooltips, + zoom: ZoomMethods, + + [customMethod: string]: any; +} + +declare var gantt: GanttStatic; + +declare var Gantt: GanttEnterprise; + +export {gantt, Gantt}; \ No newline at end of file diff --git a/codebase/dhtmlxgantt.es.js b/codebase/dhtmlxgantt.es.js new file mode 100644 index 0000000..1a0056f --- /dev/null +++ b/codebase/dhtmlxgantt.es.js @@ -0,0 +1,11846 @@ +/** @license + +dhtmlxGantt v.9.0.0 Standard + +This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects. + +To use dhtmlxGantt in non-GPL projects (and get Pro version of the product), please obtain Individual, Commercial, Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxGantt/#licensing or contact us at info@dhtmlx.com + +(c) XB Software + +*/ +function F(t) { + var e = 0, n = 0, i = 0, a = 0; + if (t.getBoundingClientRect) { + var r = t.getBoundingClientRect(), s = document.body, o = document.documentElement || document.body.parentNode || document.body, l = window.pageYOffset || o.scrollTop || s.scrollTop, d = window.pageXOffset || o.scrollLeft || s.scrollLeft, c = o.clientTop || s.clientTop || 0, u = o.clientLeft || s.clientLeft || 0; + e = r.top + l - c, n = r.left + d - u, i = document.body.offsetWidth - r.right, a = document.body.offsetHeight - r.bottom; + } else { + for (; t; ) e += parseInt(t.offsetTop, 10), n += parseInt(t.offsetLeft, 10), t = t.offsetParent; + i = document.body.offsetWidth - t.offsetWidth - n, a = document.body.offsetHeight - t.offsetHeight - e; + } + return { y: Math.round(e), x: Math.round(n), width: t.offsetWidth, height: t.offsetHeight, right: Math.round(i), bottom: Math.round(a) }; +} +function En(t) { + var e = !1, n = !1; + if (window.getComputedStyle) { + var i = window.getComputedStyle(t, null); + e = i.display, n = i.visibility; + } else t.currentStyle && (e = t.currentStyle.display, n = t.currentStyle.visibility); + return e != "none" && n != "hidden"; +} +function Dn(t) { + return !isNaN(t.getAttribute("tabindex")) && 1 * t.getAttribute("tabindex") >= 0; +} +function An(t) { + return !{ a: !0, area: !0 }[t.nodeName.loLowerCase()] || !!t.getAttribute("href"); +} +function In(t) { + return !{ input: !0, select: !0, textarea: !0, button: !0, object: !0 }[t.nodeName.toLowerCase()] || !t.hasAttribute("disabled"); +} +function ye(t) { + for (var e = t.querySelectorAll(["a[href]", "area[href]", "input", "select", "textarea", "button", "iframe", "object", "embed", "[tabindex]", "[contenteditable]"].join(", ")), n = Array.prototype.slice.call(e, 0), i = 0; i < n.length; i++) n[i].$position = i; + for (n.sort(function(r, s) { + return r.tabIndex === 0 && s.tabIndex !== 0 ? 1 : r.tabIndex !== 0 && s.tabIndex === 0 ? -1 : r.tabIndex === s.tabIndex ? r.$position - s.$position : r.tabIndex < s.tabIndex ? -1 : 1; + }), i = 0; i < n.length; i++) { + var a = n[i]; + (Dn(a) || In(a) || An(a)) && En(a) || (n.splice(i, 1), i--); + } + return n; +} +function Ze() { + var t = document.createElement("div"); + t.style.cssText = "visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;", document.body.appendChild(t); + var e = t.offsetWidth - t.clientWidth; + return document.body.removeChild(t), Math.max(e, 15); +} +function Z(t) { + if (!t) return ""; + var e = t.className || ""; + return e.baseVal && (e = e.baseVal), e.indexOf || (e = ""), de(e); +} +function $t(t, e) { + e && t.className.indexOf(e) === -1 && (t.className += " " + e); +} +function Ut(t, e) { + e = e.split(" "); + for (var n = 0; n < e.length; n++) { + var i = new RegExp("\\s?\\b" + e[n] + "\\b(?![-_.])", ""); + t.className = t.className.replace(i, ""); + } +} +function be(t) { + return typeof t == "string" ? document.getElementById(t) || document.querySelector(t) || document.body : t || document.body; +} +var Ht; +function Qe(t, e) { + Ht || (Ht = document.createElement("div")), Ht.innerHTML = e; + var n = Ht.firstChild; + return t.appendChild(n), n; +} +function tn(t) { + t && t.parentNode && t.parentNode.removeChild(t); +} +function en(t, e) { + for (var n = t.childNodes, i = n.length, a = [], r = 0; r < i; r++) { + var s = n[r]; + s.className && s.className.indexOf(e) !== -1 && a.push(s); + } + return a; +} +function kt(t) { + var e; + return t.tagName ? e = t : (e = (t = t || window.event).target || t.srcElement).shadowRoot && t.composedPath && (e = t.composedPath()[0]), e; +} +function et(t, e) { + if (e) { + for (var n = kt(t); n; ) { + if (n.getAttribute && n.getAttribute(e)) return n; + n = n.parentNode; + } + return null; + } +} +function de(t) { + return (String.prototype.trim || function() { + return this.replace(/^\s+|\s+$/g, ""); + }).apply(t); +} +function ft(t, e, n) { + var i = kt(t), a = ""; + for (n === void 0 && (n = !0); i; ) { + if (a = Z(i)) { + var r = a.indexOf(e); + if (r >= 0) { + if (!n) return i; + var s = r === 0 || !de(a.charAt(r - 1)), o = r + e.length >= a.length || !de(a.charAt(r + e.length)); + if (s && o) return i; + } + } + i = i.parentNode; + } + return null; +} +function lt(t, e) { + var n = document.documentElement, i = F(e); + return { x: t.clientX + n.scrollLeft - n.clientLeft - i.x + e.scrollLeft, y: t.clientY + n.scrollTop - n.clientTop - i.y + e.scrollTop }; +} +function xe(t, e) { + const n = F(t), i = F(e); + return { x: n.x - i.x, y: n.y - i.y }; +} +function J(t, e) { + if (!t || !e) return !1; + for (; t && t != e; ) t = t.parentNode; + return t === e; +} +function dt(t, e) { + if (t.closest) return t.closest(e); + if (t.matches || t.msMatchesSelector || t.webkitMatchesSelector) { + var n = t; + if (!document.documentElement.contains(n)) return null; + do { + if ((n.matches || n.msMatchesSelector || n.webkitMatchesSelector).call(n, e)) return n; + n = n.parentElement || n.parentNode; + } while (n !== null && n.nodeType === 1); + return null; + } + return console.error("Your browser is not supported"), null; +} +function nn(t) { + for (; t; ) { + if (t.offsetWidth > 0 && t.offsetHeight > 0) return t; + t = t.parentElement; + } + return null; +} +function an() { + return document.head.createShadowRoot || document.head.attachShadow; +} +function ce() { + var t = document.activeElement; + return t.shadowRoot && (t = t.shadowRoot.activeElement), t === document.body && document.getSelection && (t = document.getSelection().focusNode || document.body), t; +} +function mt(t) { + if (!t || !an()) return document.body; + for (; t.parentNode && (t = t.parentNode); ) if (t instanceof ShadowRoot) return t.host; + return document.body; +} +const rn = Object.freeze(Object.defineProperty({ __proto__: null, addClassName: $t, closest: dt, getActiveElement: ce, getChildNodes: en, getClassName: Z, getClosestSizedElement: nn, getFocusableNodes: ye, getNodePosition: F, getRelativeEventPosition: lt, getRelativeNodePosition: xe, getRootNode: mt, getScrollSize: Ze, getTargetNode: kt, hasClass: function(t, e) { + return "classList" in t ? t.classList.contains(e) : new RegExp("\\b" + e + "\\b").test(t.className); +}, hasShadowParent: function(t) { + return !!mt(t); +}, insertNode: Qe, isChildOf: J, isShadowDomSupported: an, locateAttribute: et, locateClassName: ft, removeClassName: Ut, removeNode: tn, toNode: be }, Symbol.toStringTag, { value: "Module" })), ot = typeof window < "u" ? window : global; +let Mn = class { + constructor(t) { + this._mouseDown = !1, this._gantt = t, this._domEvents = t._createDomEventScope(); + } + attach(t, e, n) { + const i = this._gantt, a = t.getViewPort(); + this._originPosition = ot.getComputedStyle(a).display, this._restoreOriginPosition = () => { + a.style.position = this._originPosition; + }, this._originPosition === "static" && (a.style.position = "relative"); + const r = i.$services.getService("state"); + r.registerProvider("clickDrag", () => ({ autoscroll: !1 })); + let s = null; + const o = () => { + s && (this._mouseDown = !0, t.setStart(i.copy(s)), t.setPosition(i.copy(s)), t.setEnd(i.copy(s)), s = null); + }; + this._domEvents.attach(a, "mousedown", (d) => { + s = null; + let c = ".gantt_task_line, .gantt_task_link"; + n !== void 0 && (c = n instanceof Array ? n.join(", ") : n), c && i.utils.dom.closest(d.target, c) || (r.registerProvider("clickDrag", () => ({ autoscroll: this._mouseDown })), e && d[e] !== !0 || (s = this._getCoordinates(d, t))); + }); + const l = mt(i.$root) || document.body; + this._domEvents.attach(l, "mouseup", (d) => { + if (s = null, (!e || d[e] === !0) && this._mouseDown === !0) { + this._mouseDown = !1; + const c = this._getCoordinates(d, t); + t.dragEnd(c); + } + }), this._domEvents.attach(a, "mousemove", (d) => { + if (e && d[e] !== !0) return; + const c = this._gantt.ext.clickDrag, u = (this._gantt.config.drag_timeline || {}).useKey; + if (c && u && !e && d[u]) return; + let h = null; + if (!this._mouseDown && s) return h = this._getCoordinates(d, t), void (Math.abs(s.relative.left - h.relative.left) > 5 && o()); + this._mouseDown === !0 && (h = this._getCoordinates(d, t), t.setEnd(h), t.render()); + }); + } + detach() { + const t = this._gantt; + this._domEvents.detachAll(), this._restoreOriginPosition && this._restoreOriginPosition(), t.$services.getService("state").unregisterProvider("clickDrag"); + } + destructor() { + this.detach(); + } + _getCoordinates(t, e) { + const n = e.getViewPort(), i = n.getBoundingClientRect(), { clientX: a, clientY: r } = t; + return { absolute: { left: a, top: r }, relative: { left: a - i.left + n.scrollLeft, top: r - i.top + n.scrollTop } }; + } +}; +var sn = function() { + this._silent_mode = !1, this.listeners = {}; +}; +sn.prototype = { _silentStart: function() { + this._silent_mode = !0; +}, _silentEnd: function() { + this._silent_mode = !1; +} }; +var Nn = function(t) { + var e = {}, n = 0, i = function() { + var a = !0; + for (var r in e) { + var s = e[r].apply(t, arguments); + a = a && s; + } + return a; + }; + return i.addEvent = function(a, r) { + if (typeof a == "function") { + var s; + if (r && r.id ? s = r.id : (s = n, n++), r && r.once) { + var o = a; + a = function() { + o(), i.removeEvent(s); + }; + } + return e[s] = a, s; + } + return !1; + }, i.removeEvent = function(a) { + delete e[a]; + }, i.clear = function() { + e = {}; + }, i; +}; +function st(t) { + var e = new sn(); + t.attachEvent = function(n, i, a) { + n = "ev_" + n.toLowerCase(), e.listeners[n] || (e.listeners[n] = Nn(this)), a && a.thisObject && (i = i.bind(a.thisObject)); + var r = n + ":" + e.listeners[n].addEvent(i, a); + return a && a.id && (r = a.id), r; + }, t.attachAll = function(n) { + this.attachEvent("listen_all", n); + }, t.callEvent = function(n, i) { + if (e._silent_mode) return !0; + var a = "ev_" + n.toLowerCase(), r = e.listeners; + return r.ev_listen_all && r.ev_listen_all.apply(this, [n].concat(i)), !r[a] || r[a].apply(this, i); + }, t.checkEvent = function(n) { + return !!e.listeners["ev_" + n.toLowerCase()]; + }, t.detachEvent = function(n) { + if (n) { + var i = e.listeners; + for (var a in i) i[a].removeEvent(n); + var r = n.split(":"); + if (i = e.listeners, r.length === 2) { + var s = r[0], o = r[1]; + i[s] && i[s].removeEvent(o); + } + } + }, t.detachAllEvents = function() { + for (var n in e.listeners) e.listeners[n].clear(); + }; +} +var Ce = { second: 1, minute: 60, hour: 3600, day: 86400, week: 604800, month: 2592e3, quarter: 7776e3, year: 31536e3 }; +function jt(t) { + return Ce[t] || Ce.hour; +} +function vt(t, e) { + if (t.forEach) t.forEach(e); + else for (var n = t.slice(), i = 0; i < n.length; i++) e(n[i], i); +} +function Ln(t, e) { + if (t.find) return t.find(e); + for (var n = 0; n < t.length; n++) if (e(t[n], n)) return t[n]; +} +function Ot(t, e) { + if (t.includes) return t.includes(e); + for (var n = 0; n < t.length; n++) if (t[n] === e) return !0; + return !1; +} +function ue(t) { + return Array.isArray ? Array.isArray(t) : t && t.length !== void 0 && t.pop && t.push; +} +function Q(t) { + return !(!t || typeof t != "object") && !!(t.getFullYear && t.getMonth && t.getDate); +} +function yt(t) { + return Q(t) && !isNaN(t.getTime()); +} +function Ee(t, e) { + var n, i = function() { + i.$cancelTimeout(), i.$pending = !0; + var a = Array.prototype.slice.call(arguments); + n = setTimeout(function() { + t.apply(this, a), i.$pending = !1; + }, e); + }; + return i.$pending = !1, i.$cancelTimeout = function() { + clearTimeout(n), i.$pending = !1; + }, i.$execute = function() { + var a = Array.prototype.slice.call(arguments); + t.apply(this, a), i.$cancelTimeout(); + }, i; +} +function at(t, e) { + return De(t) && !De(e) && (t = "0"), t; +} +function De(t) { + return t === 0; +} +function Dt(t, e) { + for (var n, i, a, r = 0, s = t.length - 1; r <= s; ) if (i = +t[n = Math.floor((r + s) / 2)], a = +t[n - 1], i < e) r = n + 1; + else { + if (!(i > e)) { + for (; +t[n] == +t[n + 1]; ) n++; + return n; + } + if (!isNaN(a) && a < e) return n - 1; + s = n - 1; + } + return t.length - 1; +} +class Pn { + constructor(e, n, i) { + var a; + this._el = document.createElement("div"), this.defaultRender = (r, s) => { + this._el || (this._el = document.createElement("div")); + const o = this._el, l = Math.min(r.relative.top, s.relative.top), d = Math.max(r.relative.top, s.relative.top), c = Math.min(r.relative.left, s.relative.left), u = Math.max(r.relative.left, s.relative.left); + if (this._singleRow) { + const h = this._getTaskPositionByTop(this._startPoint.relative.top); + o.style.height = h.height + "px", o.style.top = h.top + "px"; + } else o.style.height = Math.abs(d - l) + "px", o.style.top = l + "px"; + return o.style.width = Math.abs(u - c) + "px", o.style.left = c + "px", o; + }, this._gantt = n, this._view = i, this._viewPort = e.viewPort, this._el.classList.add(e.className), typeof e.callback == "function" && (this._callback = e.callback), this.render = () => { + let r; + r = e.render ? e.render(this._startPoint, this._endPoint) : this.defaultRender(this._startPoint, this._endPoint), r !== this._el && (this._el && this._el.parentNode && this._el.parentNode.removeChild(this._el), this._el = r), e.className !== "" && this._el.classList.add(e.className), this.draw(); + }, (a = this._viewPort).attachEvent && a.detachEvent || st(this._viewPort), this._singleRow = e.singleRow, this._useRequestAnimationFrame = e.useRequestAnimationFrame; + } + draw() { + if (this._useRequestAnimationFrame) return requestAnimationFrame(() => { + this._viewPort.appendChild(this.getElement()); + }); + this._viewPort.appendChild(this.getElement()); + } + clear() { + if (this._useRequestAnimationFrame) return requestAnimationFrame(() => { + this._el.parentNode && this._viewPort.removeChild(this._el); + }); + this._el.parentNode && this._viewPort.removeChild(this._el); + } + getElement() { + return this._el; + } + getViewPort() { + return this._viewPort; + } + setStart(e) { + const n = this._gantt; + this._startPoint = e, this._startDate = n.dateFromPos(this._startPoint.relative.left), this._viewPort.callEvent("onBeforeDrag", [this._startPoint]); + } + setEnd(e) { + const n = this._gantt; + if (this._endPoint = e, this._singleRow) { + const i = this._getTaskPositionByTop(this._startPoint.relative.top); + this._endPoint.relative.top = i.top; + } + this._endDate = n.dateFromPos(this._endPoint.relative.left), this._startPoint.relative.left > this._endPoint.relative.left && (this._positionPoint = { relative: { left: this._endPoint.relative.left, top: this._positionPoint.relative.top }, absolute: { left: this._endPoint.absolute.left, top: this._positionPoint.absolute.top } }), this._startPoint.relative.top > this._endPoint.relative.top && (this._positionPoint = { relative: { left: this._positionPoint.relative.left, top: this._endPoint.relative.top }, absolute: { left: this._positionPoint.absolute.left, top: this._endPoint.absolute.top } }), this._viewPort.callEvent("onDrag", [this._startPoint, this._endPoint]); + } + setPosition(e) { + this._positionPoint = e; + } + dragEnd(e) { + const n = this._gantt; + e.relative.left < 0 && (e.relative.left = 0), this._viewPort.callEvent("onBeforeDragEnd", [this._startPoint, e]), this.setEnd(e), this._endDate = this._endDate || n.getState().max_date, this._startDate.valueOf() > this._endDate.valueOf() && ([this._startDate, this._endDate] = [this._endDate, this._startDate]), this.clear(); + const i = n.getTaskByTime(this._startDate, this._endDate), a = this._getTasksByTop(this._startPoint.relative.top, this._endPoint.relative.top); + this._viewPort.callEvent("onDragEnd", [this._startPoint, this._endPoint]), this._callback && this._callback(this._startPoint, this._endPoint, this._startDate, this._endDate, i, a); + } + getInBounds() { + return this._singleRow; + } + _getTasksByTop(e, n) { + const i = this._gantt; + let a = e, r = n; + e > n && (a = n, r = e); + const s = this._getTaskPositionByTop(a).index, o = this._getTaskPositionByTop(r).index, l = []; + for (let d = s; d <= o; d++) + i.getTaskByIndex(d) && l.push(i.getTaskByIndex(d)); + return l; + } + _getTaskPositionByTop(e) { + const n = this._gantt, i = this._view, a = i.getItemIndexByTopPosition(e), r = n.getTaskByIndex(a); + if (r) { + const s = i.getItemHeight(r.id); + return { top: i.getItemTop(r.id) || 0, height: s || 0, index: a }; + } + { + const s = i.getTotalHeight(); + return { top: e > s ? s : 0, height: n.config.row_height, index: e > s ? n.getTaskCount() : 0 }; + } + } +} +class $e { + constructor(e) { + this._mouseDown = !1, this._calculateDirectionVector = () => { + if (this._trace.length >= 10) { + const n = this._trace.slice(this._trace.length - 10), i = []; + for (let r = 1; r < n.length; r++) i.push({ x: n[r].x - n[r - 1].x, y: n[r].y - n[r - 1].y }); + const a = { x: 0, y: 0 }; + return i.forEach((r) => { + a.x += r.x, a.y += r.y; + }), { magnitude: Math.sqrt(a.x * a.x + a.y * a.y), angleDegrees: 180 * Math.atan2(Math.abs(a.y), Math.abs(a.x)) / Math.PI }; + } + return null; + }, this._applyDndReadyStyles = () => { + this._timeline.$task.classList.add("gantt_timeline_move_available"); + }, this._clearDndReadyStyles = () => { + this._timeline.$task.classList.remove("gantt_timeline_move_available"); + }, this._getScrollPosition = (n) => { + const i = this._gantt; + return { x: i.$ui.getView(n.$config.scrollX).getScrollState().position, y: i.$ui.getView(n.$config.scrollY).getScrollState().position }; + }, this._countNewScrollPosition = (n) => { + const i = this._calculateDirectionVector(); + let a = this._startPoint.x - n.x, r = this._startPoint.y - n.y; + return i && (i.angleDegrees < 15 ? r = 0 : i.angleDegrees > 75 && (a = 0)), { x: this._scrollState.x + a, y: this._scrollState.y + r }; + }, this._setScrollPosition = (n, i) => { + const a = this._gantt; + requestAnimationFrame(() => { + a.scrollLayoutCell(n.$id, i.x, i.y); + }); + }, this._stopDrag = (n) => { + const i = this._gantt; + if (this._trace = [], i.$root.classList.remove("gantt_noselect"), this._originalReadonly !== void 0 && (i.config.readonly = this._originalReadonly, this._mouseDown && i.config.drag_timeline && i.config.drag_timeline.render && i.render()), this._originAutoscroll !== void 0 && (i.config.autoscroll = this._originAutoscroll), i.config.drag_timeline) { + const { useKey: a } = i.config.drag_timeline; + if (a && n[a] !== !0) return; + } + this._mouseDown = !1; + }, this._startDrag = (n) => { + const i = this._gantt; + this._originAutoscroll = i.config.autoscroll, i.config.autoscroll = !1, i.$root.classList.add("gantt_noselect"), this._originalReadonly = i.config.readonly, i.config.readonly = !0, i.config.drag_timeline && i.config.drag_timeline.render && i.render(), this._trace = [], this._mouseDown = !0; + const { x: a, y: r } = this._getScrollPosition(this._timeline); + this._scrollState = { x: a, y: r }, this._startPoint = { x: n.clientX, y: n.clientY }, this._trace.push(this._startPoint); + }, this._gantt = e, this._domEvents = e._createDomEventScope(), this._trace = []; + } + static create(e) { + return new $e(e); + } + destructor() { + this._domEvents.detachAll(); + } + attach(e) { + this._timeline = e; + const n = this._gantt; + this._domEvents.attach(e.$task, "mousedown", (i) => { + if (!n.config.drag_timeline) return; + const { useKey: a, ignore: r, enabled: s } = n.config.drag_timeline; + if (s === !1) return; + let o = ".gantt_task_line, .gantt_task_link"; + r !== void 0 && (o = r instanceof Array ? r.join(", ") : r), o && n.utils.dom.closest(i.target, o) || a && i[a] !== !0 || this._startDrag(i); + }), this._domEvents.attach(document, "keydown", (i) => { + if (!n.config.drag_timeline) return; + const { useKey: a } = n.config.drag_timeline; + a && i[a] === !0 && this._applyDndReadyStyles(); + }), this._domEvents.attach(document, "keyup", (i) => { + if (!n.config.drag_timeline) return; + const { useKey: a } = n.config.drag_timeline; + a && i[a] === !1 && (this._clearDndReadyStyles(), this._stopDrag(i)); + }), this._domEvents.attach(document, "mouseup", (i) => { + this._stopDrag(i); + }), this._domEvents.attach(n.$root, "mouseup", (i) => { + this._stopDrag(i); + }), this._domEvents.attach(document, "mouseleave", (i) => { + this._stopDrag(i); + }), this._domEvents.attach(n.$root, "mouseleave", (i) => { + this._stopDrag(i); + }), this._domEvents.attach(n.$root, "mousemove", (i) => { + if (!n.config.drag_timeline) return; + const { useKey: a } = n.config.drag_timeline; + if (a && i[a] !== !0) return; + const r = this._gantt.ext.clickDrag, s = (this._gantt.config.click_drag || {}).useKey; + if ((!r || !s || a || !i[s]) && this._mouseDown === !0) { + this._trace.push({ x: i.clientX, y: i.clientY }); + const o = this._countNewScrollPosition({ x: i.clientX, y: i.clientY }); + this._setScrollPosition(e, o), this._scrollState = o, this._startPoint = { x: i.clientX, y: i.clientY }; + } + }); + } +} +function Rn(t) { + (function() { + var e = []; + function n() { + return !!e.length; + } + function i(d) { + setTimeout(function() { + n() || t.$destroyed || t.focus(); + }, 1); + } + function a(d) { + t.eventRemove(d, "keydown", s), t.event(d, "keydown", s), e.push(d); + } + function r() { + var d = e.pop(); + d && t.eventRemove(d, "keydown", s), i(); + } + function s(d) { + var c = d.currentTarget; + c == e[e.length - 1] && t.$keyboardNavigation.trapFocus(c, d); + } + function o() { + a(t.getLightbox()); + } + t.attachEvent("onLightbox", o), t.attachEvent("onAfterLightbox", r), t.attachEvent("onLightboxChange", function() { + r(), o(); + }), t.attachEvent("onAfterQuickInfo", function() { + i(); + }), t.attachEvent("onMessagePopup", function(d) { + l = t.utils.dom.getActiveElement(), a(d); + }), t.attachEvent("onAfterMessagePopup", function() { + r(), setTimeout(function() { + l && (l.focus(), l = null); + }, 1); + }); + var l = null; + t.$keyboardNavigation.isModal = n; + })(); +} +class Hn { + constructor(e) { + this.show = (n, i) => { + i === void 0 ? this._showForTask(n) : this._showAtCoordinates(n, i); + }, this.hide = (n) => { + const i = this._gantt, a = this._quickInfoBox; + this._quickInfoBoxId = 0; + const r = this._quickInfoTask; + if (this._quickInfoTask = null, a && a.parentNode) { + if (i.config.quick_info_detached) return i.callEvent("onAfterQuickInfo", [r]), a.parentNode.removeChild(a); + a.className += " gantt_qi_hidden", a.style.right === "auto" ? a.style.left = "-350px" : a.style.right = "-350px", n && (a.style.left = a.style.right = "", a.parentNode.removeChild(a)), i.callEvent("onAfterQuickInfo", [r]); + } + }, this.getNode = () => this._quickInfoBox ? this._quickInfoBox : null, this.setContainer = (n) => { + n && (this._container = typeof n == "string" ? document.getElementById(n) : n); + }, this.setContent = (n) => { + const i = this._gantt, a = { taskId: null, header: { title: "", date: "" }, content: "", buttons: i.config.quickinfo_buttons }; + n || (n = a), n.taskId || (n.taskId = a.taskId), n.header || (n.header = a.header), n.header.title || (n.header.title = a.header.title), n.header.date || (n.header.date = a.header.date), n.content || (n.content = a.content), n.buttons || (n.buttons = a.buttons); + let r = this.getNode(); + r || (r = this._createQuickInfoElement()), n.taskId && (this._quickInfoBoxId = n.taskId); + const s = r.querySelector(".gantt_cal_qi_title"), o = s.querySelector(".gantt_cal_qi_tcontent"), l = s.querySelector(".gantt_cal_qi_tdate"), d = r.querySelector(".gantt_cal_qi_content"), c = r.querySelector(".gantt_cal_qi_controls"); + i._waiAria.quickInfoHeader(r, [n.header.title, n.header.date].join(" ")), o.innerHTML = n.header.title, l.innerHTML = n.header.date, n.header.title || n.header.date ? s.style.display = "" : s.style.display = "none", d.innerHTML = n.content; + const u = n.buttons; + u.length ? c.style.display = "" : c.style.display = "none"; + let h = ""; + for (let g = 0; g < u.length; g++) { + const f = i._waiAria.quickInfoButtonAttrString(i.locale.labels[u[g]]); + h += `
+
+
${i.locale.labels[u[g]]}
+
`; + } + c.innerHTML = h, i.eventRemove(r, "click", this._qiButtonClickHandler), i.eventRemove(r, "keypress", this._qiKeyPressHandler), i.event(r, "click", this._qiButtonClickHandler), i.event(r, "keypress", this._qiKeyPressHandler); + }, this._qiButtonClickHandler = (n) => { + this._qi_button_click(n.target); + }, this._qiKeyPressHandler = (n) => { + const i = n.which; + i !== 13 && i !== 32 || setTimeout(() => { + this._qi_button_click(n.target); + }, 1); + }, this._gantt = e; + } + _showAtCoordinates(e, n) { + this.hide(!0), this._quickInfoBoxId = 0, this._quickInfoTask = null, this._quickInfoBox || (this._createQuickInfoElement(), this.setContent()), this._appendAtCoordinates(e, n), this._gantt.callEvent("onQuickInfo", [null]); + } + _showForTask(e) { + const n = this._gantt; + if (e === this._quickInfoBoxId && n.utils.dom.isChildOf(this._quickInfoBox, document.body) || !n.config.show_quick_info) return; + this.hide(!0); + const i = this._getContainer(), a = this._get_event_counter_part(e, 6, i.xViewport, i.yViewport); + a && (this._quickInfoBox = this._init_quick_info(e), this._quickInfoTask = e, this._quickInfoBox.className = this._prepare_quick_info_classname(e), this._fill_quick_data(e), this._show_quick_info(a, 6), n.callEvent("onQuickInfo", [e])); + } + _get_event_counter_part(e, n, i, a) { + const r = this._gantt; + let s = r.getTaskNode(e); + if (!s && (s = r.getTaskRowNode(e), !s)) return null; + let o = 0; + const l = n + s.offsetTop + s.offsetHeight; + let d = s; + if (r.utils.dom.isChildOf(d, i)) for (; d && d !== i; ) o += d.offsetLeft, d = d.offsetParent; + const c = r.getScrollState(); + return d ? { left: o, top: l, dx: o + s.offsetWidth / 2 - c.x > i.offsetWidth / 2 ? 1 : 0, dy: l + s.offsetHeight / 2 - c.y > a.offsetHeight / 2 ? 1 : 0, width: s.offsetWidth, height: s.offsetHeight } : null; + } + _createQuickInfoElement() { + const e = this._gantt, n = document.createElement("div"); + n.className += "gantt_cal_quick_info", e._waiAria.quickInfoAttr(n); + var i = ` +
+ +
+
+ +
+
+
+
`; + if (i += '
', i += "
", n.innerHTML = i, e.config.quick_info_detached) { + const a = this._getContainer(); + e.event(a.parent, "scroll", () => { + this.hide(); + }); + } + return this._quickInfoBox = n, n; + } + _init_quick_info(e) { + const n = this._gantt, i = n.getTask(e); + return typeof this._quickInfoReadonly == "boolean" && n.isReadonly(i) !== this._quickInfoReadonly && (this.hide(!0), this._quickInfoBox = null), this._quickInfoReadonly = n.isReadonly(i), this._quickInfoBox || (this._quickInfoBox = this._createQuickInfoElement()), this._quickInfoBox; + } + _prepare_quick_info_classname(e) { + const n = this._gantt, i = n.getTask(e); + let a = `gantt_cal_quick_info gantt_${n.getTaskType(i)}`; + const r = n.templates.quick_info_class(i.start_date, i.end_date, i); + return r && (a += " " + r), a; + } + _fill_quick_data(e) { + const n = this._gantt, i = n.getTask(e); + this._quickInfoBoxId = e; + let a = []; + if (this._quickInfoReadonly) { + const r = n.config.quickinfo_buttons, s = { icon_delete: !0, icon_edit: !0 }; + for (let o = 0; o < r.length; o++) this._quickInfoReadonly && s[r[o]] || a.push(r[o]); + } else a = n.config.quickinfo_buttons; + this.setContent({ header: { title: n.templates.quick_info_title(i.start_date, i.end_date, i), date: n.templates.quick_info_date(i.start_date, i.end_date, i) }, content: n.templates.quick_info_content(i.start_date, i.end_date, i), buttons: a }); + } + _appendAtCoordinates(e, n) { + const i = this._quickInfoBox, a = this._getContainer(); + i.parentNode && i.parentNode.nodeName.toLowerCase() !== "#document-fragment" || a.parent.appendChild(i), i.style.left = e + "px", i.style.top = n + "px"; + } + _show_quick_info(e, n) { + const i = this._gantt, a = this._quickInfoBox; + if (i.config.quick_info_detached) { + const r = this._getContainer(); + a.parentNode && a.parentNode.nodeName.toLowerCase() !== "#document-fragment" || r.parent.appendChild(a); + const s = a.offsetWidth, o = a.offsetHeight, l = i.getScrollState(), d = r.xViewport, c = r.yViewport, u = d.offsetWidth + l.x - s, h = e.top - l.y + o; + let g = e.top; + h > c.offsetHeight / 2 && (g = e.top - (o + e.height + 2 * n), g < l.y && h <= c.offsetHeight && (g = e.top)), g < l.y && (g = l.y); + const f = Math.min(Math.max(l.x, e.left - e.dx * (s - e.width)), u), y = g; + this._appendAtCoordinates(f, y); + } else a.style.top = "20px", e.dx === 1 ? (a.style.right = "auto", a.style.left = "-300px", setTimeout(() => { + a.style.left = "10px"; + }, 1)) : (a.style.left = "auto", a.style.right = "-300px", setTimeout(() => { + a.style.right = "10px"; + }, 1)), a.className += " gantt_qi_" + (e.dx === 1 ? "left" : "right"), i.$root.appendChild(a); + } + _qi_button_click(e) { + const n = this._gantt, i = this._quickInfoBox; + if (!e || e === i) return; + if (e.closest(".gantt_cal_qi_close_btn")) return void this.hide(); + const a = e.className; + if (a.indexOf("_icon") !== -1) { + const r = this._quickInfoBoxId; + n.$click.buttons[a.split(" ")[1].replace("icon_", "")](r); + } else this._qi_button_click(e.parentNode); + } + _getContainer() { + const e = this._gantt; + let n = this._container ? this._container : e.$task_data; + return n && n.offsetHeight && n.offsetWidth ? { parent: n, xViewport: e.$task, yViewport: e.$task_data } : (n = this._container ? this._container : e.$grid_data, n && n.offsetHeight && n.offsetWidth ? { parent: n, xViewport: e.$grid, yViewport: e.$grid_data } : { parent: this._container ? this._container : e.$layout, xViewport: e.$layout, yViewport: e.$layout }); + } +} +var Xt, On = {}.constructor.toString(); +function G(t) { + var e, n; + if (t && typeof t == "object") switch (!0) { + case Q(t): + n = new Date(t); + break; + case ue(t): + for (n = new Array(t.length), e = 0; e < t.length; e++) n[e] = G(t[e]); + break; + default: + for (e in n = function(i) { + return i.constructor.toString() !== On; + }(t) ? Object.create(t) : {}, t) Object.prototype.hasOwnProperty.apply(t, [e]) && (n[e] = G(t[e])); + } + return n || t; +} +function L(t, e, n) { + for (var i in e) (t[i] === void 0 || n) && (t[i] = e[i]); + return t; +} +function W(t) { + return t !== void 0; +} +function rt() { + return Xt || (Xt = (/* @__PURE__ */ new Date()).valueOf()), ++Xt; +} +function R(t, e) { + return t.bind ? t.bind(e) : function() { + return t.apply(e, arguments); + }; +} +function on(t, e, n, i) { + t.addEventListener ? t.addEventListener(e, n, i !== void 0 && i) : t.attachEvent && t.attachEvent("on" + e, n); +} +function ln(t, e, n, i) { + t.removeEventListener ? t.removeEventListener(e, n, i !== void 0 && i) : t.detachEvent && t.detachEvent("on" + e, n); +} +const Bn = Object.freeze(Object.defineProperty({ __proto__: null, bind: R, copy: G, defined: W, event: on, eventRemove: ln, mixin: L, uid: rt }, Symbol.toStringTag, { value: "Module" })); +function we(t, e) { + t = t || on, e = e || ln; + var n = [], i = { attach: function(a, r, s, o) { + n.push({ element: a, event: r, callback: s, capture: o }), t(a, r, s, o); + }, detach: function(a, r, s, o) { + e(a, r, s, o); + for (var l = 0; l < n.length; l++) { + var d = n[l]; + d.element === a && d.event === r && d.callback === s && d.capture === o && (n.splice(l, 1), l--); + } + }, detachAll: function() { + for (var a = n.slice(), r = 0; r < a.length; r++) { + var s = a[r]; + i.detach(s.element, s.event, s.callback, s.capture), i.detach(s.element, s.event, s.callback, void 0), i.detach(s.element, s.event, s.callback, !1), i.detach(s.element, s.event, s.callback, !0); + } + n.splice(0, n.length); + }, extend: function() { + return we(this.event, this.eventRemove); + } }; + return i; +} +class zn { + constructor(e) { + this._gantt = e; + } + getNode() { + const e = this._gantt; + return this._tooltipNode || (this._tooltipNode = document.createElement("div"), this._tooltipNode.className = "gantt_tooltip", e._waiAria.tooltipAttr(this._tooltipNode)), this._tooltipNode; + } + setViewport(e) { + return this._root = e, this; + } + show(e, n) { + const i = this._gantt, a = document.body, r = this.getNode(); + if (J(r, a) || (this.hide(), r.style.top = r.style.top || "0px", r.style.left = r.style.left || "0px", a.appendChild(r)), this._isLikeMouseEvent(e)) { + const s = this._calculateTooltipPosition(e); + n = s.top, e = s.left; + } + return r.style.top = n + "px", r.style.left = e + "px", i._waiAria.tooltipVisibleAttr(r), this; + } + hide() { + const e = this._gantt, n = this.getNode(); + return n && n.parentNode && n.parentNode.removeChild(n), e._waiAria.tooltipHiddenAttr(n), this; + } + setContent(e) { + return this.getNode().innerHTML = e, this; + } + _isLikeMouseEvent(e) { + return !(!e || typeof e != "object") && "clientX" in e && "clientY" in e; + } + _getViewPort() { + return this._root || document.body; + } + _calculateTooltipPosition(e) { + const n = this._gantt, i = this._getViewPortSize(), a = this.getNode(), r = { top: 0, left: 0, width: a.offsetWidth, height: a.offsetHeight, bottom: 0, right: 0 }, s = n.config.tooltip_offset_x, o = n.config.tooltip_offset_y, l = document.body, d = lt(e, l), c = F(l); + d.y += c.y, r.top = d.y, r.left = d.x, r.top += o, r.left += s, r.bottom = r.top + r.height, r.right = r.left + r.width; + const u = window.scrollY + l.scrollTop; + return r.top < i.top - u ? (r.top = i.top, r.bottom = r.top + r.height) : r.bottom > i.bottom && (r.bottom = i.bottom, r.top = r.bottom - r.height), r.left < i.left ? (r.left = i.left, r.right = i.left + r.width) : r.right > i.right && (r.right = i.right, r.left = r.right - r.width), d.x >= r.left && d.x <= r.right && (r.left = d.x - r.width - s, r.right = r.left + r.width), d.y >= r.top && d.y <= r.bottom && (r.top = d.y - r.height - o, r.bottom = r.top + r.height), r; + } + _getViewPortSize() { + const e = this._gantt, n = this._getViewPort(); + let i, a = n, r = window.scrollY + document.body.scrollTop, s = window.scrollX + document.body.scrollLeft; + return n === e.$task_data ? (a = e.$task, r = 0, s = 0, i = F(e.$task)) : i = F(a), { left: i.x + s, top: i.y + r, width: i.width, height: i.height, bottom: i.y + i.height + r, right: i.x + i.width + s }; + } +} +class Wn { + constructor(e) { + this._listeners = {}, this.tooltip = new zn(e), this._gantt = e, this._domEvents = we(), this._initDelayedFunctions(); + } + destructor() { + this.tooltip.hide(), this._domEvents.detachAll(); + } + hideTooltip() { + this.delayHide(); + } + attach(e) { + let n = document.body; + const i = this._gantt; + e.global || (n = i.$root); + let a = null; + const r = (s) => { + const o = kt(s), l = dt(o, e.selector); + if (J(o, this.tooltip.getNode())) return; + const d = () => { + a = l, e.onmouseenter(s, l); + }; + a ? l && l === a ? e.onmousemove(s, l) : (e.onmouseleave(s, a), a = null, l && l !== a && d()) : l && d(); + }; + this.detach(e.selector), this._domEvents.attach(n, "mousemove", r), this._listeners[e.selector] = { node: n, handler: r }; + } + detach(e) { + const n = this._listeners[e]; + n && this._domEvents.detach(n.node, "mousemove", n.handler); + } + tooltipFor(e) { + const n = (i) => { + let a = i; + return document.createEventObject && !document.createEvent && (a = document.createEventObject(i)), a; + }; + this._initDelayedFunctions(), this.attach({ selector: e.selector, global: e.global, onmouseenter: (i, a) => { + const r = e.html(i, a); + r && this.delayShow(n(i), r); + }, onmousemove: (i, a) => { + const r = e.html(i, a); + r ? this.delayShow(n(i), r) : (this.delayShow.$cancelTimeout(), this.delayHide()); + }, onmouseleave: () => { + this.delayShow.$cancelTimeout(), this.delayHide(); + } }); + } + _initDelayedFunctions() { + const e = this._gantt; + this.delayShow && this.delayShow.$cancelTimeout(), this.delayHide && this.delayHide.$cancelTimeout(), this.tooltip.hide(), this.delayShow = Ee((n, i) => { + e.callEvent("onBeforeTooltip", [n]) === !1 ? this.tooltip.hide() : (this.tooltip.setContent(i), this.tooltip.show(n)); + }, e.config.tooltip_timeout || 1), this.delayHide = Ee(() => { + this.delayShow.$cancelTimeout(), this.tooltip.hide(); + }, e.config.tooltip_hide_timeout || 1); + } +} +const Ae = { onBeforeUndo: "onAfterUndo", onBeforeRedo: "onAfterRedo" }, Ie = ["onTaskDragStart", "onAfterTaskUpdate", "onAfterTaskDelete", "onBeforeBatchUpdate"]; +class jn { + constructor(e, n) { + this._batchAction = null, this._batchMode = !1, this._ignore = !1, this._ignoreMoveEvents = !1, this._initialTasks = {}, this._initialLinks = {}, this._nestedTasks = {}, this._nestedLinks = {}, this._undo = e, this._gantt = n, this._attachEvents(); + } + store(e, n, i = !1) { + return n === this._gantt.config.undo_types.task ? this._storeTask(e, i) : n === this._gantt.config.undo_types.link && this._storeLink(e, i); + } + isMoveEventsIgnored() { + return this._ignoreMoveEvents; + } + toggleIgnoreMoveEvents(e) { + this._ignoreMoveEvents = e || !1; + } + startIgnore() { + this._ignore = !0; + } + stopIgnore() { + this._ignore = !1; + } + startBatchAction() { + this._timeout || (this._timeout = setTimeout(() => { + this.stopBatchAction(), this._timeout = null; + }, 10)), this._ignore || this._batchMode || (this._batchMode = !0, this._batchAction = this._undo.action.create()); + } + stopBatchAction() { + if (this._ignore) return; + const e = this._undo; + this._batchAction && e.logAction(this._batchAction), this._batchMode = !1, this._batchAction = null; + } + onTaskAdded(e) { + this._ignore || this._storeTaskCommand(e, this._undo.command.type.add); + } + onTaskUpdated(e) { + this._ignore || this._storeTaskCommand(e, this._undo.command.type.update); + } + onTaskMoved(e) { + if (!this._ignore) { + e.$local_index = this._gantt.getTaskIndex(e.id); + const n = this.getInitialTask(e.id); + if (e.$local_index === n.$local_index && this._gantt.getParent(e) === this._gantt.getParent(n)) return; + this._storeEntityCommand(e, this.getInitialTask(e.id), this._undo.command.type.move, this._undo.command.entity.task); + } + } + onTaskDeleted(e) { + if (!this._ignore) { + if (this._storeTaskCommand(e, this._undo.command.type.remove), this._nestedTasks[e.id]) { + const n = this._nestedTasks[e.id]; + for (let i = 0; i < n.length; i++) this._storeTaskCommand(n[i], this._undo.command.type.remove); + } + if (this._nestedLinks[e.id]) { + const n = this._nestedLinks[e.id]; + for (let i = 0; i < n.length; i++) this._storeLinkCommand(n[i], this._undo.command.type.remove); + } + } + } + onLinkAdded(e) { + this._ignore || this._storeLinkCommand(e, this._undo.command.type.add); + } + onLinkUpdated(e) { + this._ignore || this._storeLinkCommand(e, this._undo.command.type.update); + } + onLinkDeleted(e) { + this._ignore || this._storeLinkCommand(e, this._undo.command.type.remove); + } + setNestedTasks(e, n) { + const i = this._gantt; + let a = null; + const r = []; + let s = this._getLinks(i.getTask(e)); + for (let d = 0; d < n.length; d++) a = this.setInitialTask(n[d]), s = s.concat(this._getLinks(a)), r.push(a); + const o = {}; + for (let d = 0; d < s.length; d++) o[s[d]] = !0; + const l = []; + for (const d in o) l.push(this.setInitialLink(d)); + this._nestedTasks[e] = r, this._nestedLinks[e] = l; + } + setInitialTask(e, n) { + const i = this._gantt; + if (n || !this._initialTasks[e] || !this._batchMode) { + const a = i.copy(i.getTask(e)); + a.$index = i.getGlobalTaskIndex(e), a.$local_index = i.getTaskIndex(e), this.setInitialTaskObject(e, a); + } + return this._initialTasks[e]; + } + getInitialTask(e) { + return this._initialTasks[e]; + } + clearInitialTasks() { + this._initialTasks = {}; + } + setInitialTaskObject(e, n) { + this._initialTasks[e] = n; + } + setInitialLink(e, n) { + return this._initialLinks[e] && this._batchMode || (this._initialLinks[e] = this._gantt.copy(this._gantt.getLink(e))), this._initialLinks[e]; + } + getInitialLink(e) { + return this._initialLinks[e]; + } + clearInitialLinks() { + this._initialLinks = {}; + } + _attachEvents() { + let e = null; + const n = this._gantt, i = () => { + e || (e = setTimeout(() => { + e = null; + }), this.clearInitialTasks(), n.eachTask((l) => { + this.setInitialTask(l.id); + }), this.clearInitialLinks(), n.getLinks().forEach((l) => { + this.setInitialLink(l.id); + })); + }, a = (l) => n.copy(n.getTask(l)); + for (const l in Ae) n.attachEvent(l, () => (this.startIgnore(), !0)), n.attachEvent(Ae[l], () => (this.stopIgnore(), !0)); + for (let l = 0; l < Ie.length; l++) n.attachEvent(Ie[l], () => (this.startBatchAction(), !0)); + n.attachEvent("onParse", () => { + this._undo.clearUndoStack(), this._undo.clearRedoStack(), i(); + }), n.attachEvent("onAfterTaskAdd", (l, d) => { + this.setInitialTask(l, !0), this.onTaskAdded(d); + }), n.attachEvent("onAfterTaskUpdate", (l, d) => { + this.onTaskUpdated(d); + }), n.attachEvent("onAfterTaskDelete", (l, d) => { + this.onTaskDeleted(d); + }), n.attachEvent("onAfterLinkAdd", (l, d) => { + this.setInitialLink(l, !0), this.onLinkAdded(d); + }), n.attachEvent("onAfterLinkUpdate", (l, d) => { + this.onLinkUpdated(d); + }), n.attachEvent("onAfterLinkDelete", (l, d) => { + this.onLinkDeleted(d); + }), n.attachEvent("onRowDragEnd", (l, d) => (this.onTaskMoved(a(l)), this.toggleIgnoreMoveEvents(), !0)), n.attachEvent("onBeforeTaskDelete", (l) => { + this.store(l, n.config.undo_types.task); + const d = []; + return i(), n.eachTask((c) => { + d.push(c.id); + }, l), this.setNestedTasks(l, d), !0; + }); + const r = n.getDatastore("task"); + r.attachEvent("onBeforeItemMove", (l, d, c) => (this.isMoveEventsIgnored() || i(), !0)), r.attachEvent("onAfterItemMove", (l, d, c) => (this.isMoveEventsIgnored() || this.onTaskMoved(a(l)), !0)), n.attachEvent("onRowDragStart", (l, d, c) => (this.toggleIgnoreMoveEvents(!0), i(), !0)); + let s = null, o = !1; + if (n.attachEvent("onBeforeTaskDrag", (l) => { + if (s = n.getState().drag_id, s === l) { + const d = n.getTask(l); + n.isSummaryTask(d) && n.config.drag_project && (o = !0); + } + if (n.plugins().multiselect) { + const d = n.getSelectedTasks(); + d.length > 1 && d.forEach((c) => { + this.store(c, n.config.undo_types.task, !0); + }); + } + return this.store(l, n.config.undo_types.task); + }), n.attachEvent("onAfterTaskDrag", (l) => { + (o || n.plugins().multiselect && n.getSelectedTasks().length > 1) && s === l && (o = !1, s = null, this.stopBatchAction()), this.store(l, n.config.undo_types.task, !0); + }), n.attachEvent("onLightbox", (l) => this.store(l, n.config.undo_types.task)), n.attachEvent("onBeforeTaskAutoSchedule", (l) => (this.store(l.id, n.config.undo_types.task, !0), !0)), n.ext.inlineEditors) { + let l = null, d = null; + n.attachEvent("onGanttLayoutReady", () => { + l && n.ext.inlineEditors.detachEvent(l), d && n.ext.inlineEditors.detachEvent(d), d = n.ext.inlineEditors.attachEvent("onEditStart", (c) => { + this.store(c.id, n.config.undo_types.task); + }), l = n.ext.inlineEditors.attachEvent("onBeforeEditStart", (c) => (this.stopBatchAction(), !0)); + }); + } + } + _storeCommand(e) { + const n = this._undo; + if (n.updateConfigs(), n.undoEnabled) if (this._batchMode) this._batchAction.commands.push(e); + else { + const i = n.action.create([e]); + n.logAction(i); + } + } + _storeEntityCommand(e, n, i, a) { + const r = this._undo.command.create(e, n, i, a); + this._storeCommand(r); + } + _storeTaskCommand(e, n) { + this._gantt.isTaskExists(e.id) && (e.$local_index = this._gantt.getTaskIndex(e.id)), this._storeEntityCommand(e, this.getInitialTask(e.id), n, this._undo.command.entity.task); + } + _storeLinkCommand(e, n) { + this._storeEntityCommand(e, this.getInitialLink(e.id), n, this._undo.command.entity.link); + } + _getLinks(e) { + return e.$source.concat(e.$target); + } + _storeTask(e, n = !1) { + const i = this._gantt; + return this.setInitialTask(e, n), i.eachTask((a) => { + this.setInitialTask(a.id); + }, e), !0; + } + _storeLink(e, n = !1) { + return this.setInitialLink(e, n), !0; + } +} +class Fn { + constructor(e) { + this.maxSteps = 100, this.undoEnabled = !0, this.redoEnabled = !0, this.action = { create: (n) => ({ commands: n ? n.slice() : [] }), invert: (n) => { + const i = this._gantt.copy(n), a = this.command; + for (let r = 0; r < n.commands.length; r++) { + const s = i.commands[r] = a.invert(i.commands[r]); + s.type !== a.type.update && s.type !== a.type.move || ([s.value, s.oldValue] = [s.oldValue, s.value]); + } + return i; + } }, this.command = { entity: null, type: null, create: (n, i, a, r) => { + const s = this._gantt; + return { entity: r, type: a, value: s.copy(n), oldValue: s.copy(i || n) }; + }, invert: (n) => { + const i = this._gantt.copy(n); + return i.type = this.command.inverseCommands(n.type), i; + }, inverseCommands: (n) => { + const i = this._gantt, a = this.command.type; + switch (n) { + case a.update: + return a.update; + case a.remove: + return a.add; + case a.add: + return a.remove; + case a.move: + return a.move; + default: + return i.assert(!1, "Invalid command " + n), null; + } + } }, this._undoStack = [], this._redoStack = [], this._gantt = e; + } + getUndoStack() { + return this._undoStack; + } + setUndoStack(e) { + this._undoStack = e; + } + getRedoStack() { + return this._redoStack; + } + setRedoStack(e) { + this._redoStack = e; + } + clearUndoStack() { + this._undoStack = []; + } + clearRedoStack() { + this._redoStack = []; + } + updateConfigs() { + const e = this._gantt; + this.maxSteps = e.config.undo_steps || 100, this.command.entity = e.config.undo_types, this.command.type = e.config.undo_actions, this.undoEnabled = !!e.config.undo, this.redoEnabled = !!e.config.redo; + } + undo() { + const e = this._gantt; + if (this.updateConfigs(), !this.undoEnabled) return; + const n = this._pop(this._undoStack); + if (n && this._reorderCommands(n), e.callEvent("onBeforeUndo", [n]) !== !1 && n) return this._applyAction(this.action.invert(n)), this._push(this._redoStack, e.copy(n)), void e.callEvent("onAfterUndo", [n]); + e.callEvent("onAfterUndo", [null]); + } + redo() { + const e = this._gantt; + if (this.updateConfigs(), !this.redoEnabled) return; + const n = this._pop(this._redoStack); + if (n && this._reorderCommands(n), e.callEvent("onBeforeRedo", [n]) !== !1 && n) return this._applyAction(n), this._push(this._undoStack, e.copy(n)), void e.callEvent("onAfterRedo", [n]); + e.callEvent("onAfterRedo", [null]); + } + logAction(e) { + this._push(this._undoStack, e), this._redoStack = []; + } + _push(e, n) { + const i = this._gantt; + if (!n.commands.length) return; + const a = e === this._undoStack ? "onBeforeUndoStack" : "onBeforeRedoStack"; + if (i.callEvent(a, [n]) !== !1 && n.commands.length) { + for (e.push(n); e.length > this.maxSteps; ) e.shift(); + return n; + } + } + _pop(e) { + return e.pop(); + } + _reorderCommands(e) { + const n = { any: 0, link: 1, task: 2 }, i = { move: 1, any: 0 }; + e.commands.sort(function(a, r) { + if (a.entity === "task" && r.entity === "task") return a.type !== r.type ? (i[r.type] || 0) - (i[a.type] || 0) : a.type === "move" && a.oldValue && r.oldValue && r.oldValue.parent === a.oldValue.parent ? a.oldValue.$index - r.oldValue.$index : 0; + { + const s = n[a.entity] || n.any; + return (n[r.entity] || n.any) - s; + } + }); + } + _applyAction(e) { + let n = null; + const i = this.command.entity, a = this.command.type, r = this._gantt, s = {}; + s[i.task] = { add: "addTask", get: "getTask", update: "updateTask", remove: "deleteTask", move: "moveTask", isExists: "isTaskExists" }, s[i.link] = { add: "addLink", get: "getLink", update: "updateLink", remove: "deleteLink", isExists: "isLinkExists" }, r.batchUpdate(function() { + for (let o = 0; o < e.commands.length; o++) { + n = e.commands[o]; + const l = s[n.entity][n.type], d = s[n.entity].get, c = s[n.entity].isExists; + if (n.type === a.add) r[l](n.oldValue, n.oldValue.parent, n.oldValue.$local_index); + else if (n.type === a.remove) r[c](n.value.id) && r[l](n.value.id); + else if (n.type === a.update) { + const u = r[d](n.value.id); + for (const h in n.value) h.startsWith("$") || h.startsWith("_") || (u[h] = n.value[h]); + r[l](n.value.id); + } else n.type === a.move && (r[l](n.value.id, n.value.$local_index, n.value.parent), r.callEvent("onRowDragEnd", [n.value.id])); + } + }); + } +} +const Vn = { click_drag: function(t) { + t.ext || (t.ext = {}); + const e = { className: "gantt_click_drag_rect", useRequestAnimationFrame: !0, callback: void 0, singleRow: !1 }, n = new Mn(t); + t.ext.clickDrag = n, t.attachEvent("onGanttReady", () => { + const i = { viewPort: t.$task_data, ...e }; + if (t.config.click_drag) { + const a = t.config.click_drag; + i.render = a.render || e.render, i.className = a.className || e.className, i.callback = a.callback || e.callback, i.viewPort = a.viewPort || t.$task_data, i.useRequestAnimationFrame = a.useRequestAnimationFrame === void 0 ? e.useRequestAnimationFrame : a.useRequestAnimationFrame, i.singleRow = a.singleRow === void 0 ? e.singleRow : a.singleRow; + const r = t.$ui.getView("timeline"), s = new Pn(i, t, r); + t.ext.clickDrag.attach(s, a.useKey, a.ignore); + } + }), t.attachEvent("onDestroy", () => { + n.destructor(); + }); +}, drag_timeline: function(t) { + t.ext || (t.ext = {}), t.ext.dragTimeline = { create: () => $e.create(t) }, t.config.drag_timeline = { enabled: !0, render: !1 }; +}, fullscreen: function(t) { + function e() { + const c = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; + return !(!c || c !== document.body); + } + function n() { + try { + return document.fullscreenEnabled || document.webkitFullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled; + } catch (c) { + console.error("Fullscreen is not available:", c); + } + } + t.$services.getService("state").registerProvider("fullscreen", () => n() ? { fullscreen: e() } : void 0); + let i = { overflow: null, padding: null, paddingTop: null, paddingRight: null, paddingBottom: null, paddingLeft: null }; + const a = { width: null, height: null, top: null, left: null, position: null, zIndex: null, modified: !1 }; + let r = null; + function s(c, u) { + u.width = c.width, u.height = c.height, u.top = c.top, u.left = c.left, u.position = c.position, u.zIndex = c.zIndex; + } + let o = !1; + function l() { + if (!t.$container) return; + let c; + e() ? o && (c = "onExpand", function() { + const u = t.ext.fullscreen.getFullscreenElement(), h = document.body; + s(u.style, a), i = { overflow: h.style.overflow, padding: h.style.padding ? h.style.padding : null, paddingTop: h.style.paddingTop ? h.style.paddingTop : null, paddingRight: h.style.paddingRight ? h.style.paddingRight : null, paddingBottom: h.style.paddingBottom ? h.style.paddingBottom : null, paddingLeft: h.style.paddingLeft ? h.style.paddingLeft : null }, h.style.padding && (h.style.padding = "0"), h.style.paddingTop && (h.style.paddingTop = "0"), h.style.paddingRight && (h.style.paddingRight = "0"), h.style.paddingBottom && (h.style.paddingBottom = "0"), h.style.paddingLeft && (h.style.paddingLeft = "0"), h.style.overflow = "hidden", u.style.width = "100vw", u.style.height = "100vh", u.style.top = "0px", u.style.left = "0px", u.style.position = "absolute", u.style.zIndex = 1, a.modified = !0, r = function(g) { + let f = g.parentNode; + const y = []; + for (; f && f.style; ) y.push({ element: f, originalPositioning: f.style.position }), f.style.position = "static", f = f.parentNode; + return y; + }(u); + }()) : o && (o = !1, c = "onCollapse", function() { + const u = t.ext.fullscreen.getFullscreenElement(), h = document.body; + a.modified && (i.padding && (h.style.padding = i.padding), i.paddingTop && (h.style.paddingTop = i.paddingTop), i.paddingRight && (h.style.paddingRight = i.paddingRight), i.paddingBottom && (h.style.paddingBottom = i.paddingBottom), i.paddingLeft && (h.style.paddingLeft = i.paddingLeft), h.style.overflow = i.overflow, i = { overflow: null, padding: null, paddingTop: null, paddingRight: null, paddingBottom: null, paddingLeft: null }, s(a, u.style), a.modified = !1), r.forEach((g) => { + g.element.style.position = g.originalPositioning; + }), r = null; + }()), setTimeout(() => { + t.render(); + }), setTimeout(() => { + t.callEvent(c, [t.ext.fullscreen.getFullscreenElement()]); + }); + } + function d() { + return !t.$container || !t.ext.fullscreen.getFullscreenElement() ? !0 : n() ? !1 : ((console.warning || console.log)("The `fullscreen` feature not being allowed, or full-screen mode not being supported"), !0); + } + t.ext.fullscreen = { expand() { + if (d() || e() || !t.callEvent("onBeforeExpand", [this.getFullscreenElement()])) return; + o = !0; + const c = document.body, u = c.webkitRequestFullscreen ? [Element.ALLOW_KEYBOARD_INPUT] : [], h = c.msRequestFullscreen || c.mozRequestFullScreen || c.webkitRequestFullscreen || c.requestFullscreen; + h && h.apply(c, u); + }, collapse() { + if (d() || !e() || !t.callEvent("onBeforeCollapse", [this.getFullscreenElement()])) return; + const c = document.msExitFullscreen || document.mozCancelFullScreen || document.webkitExitFullscreen || document.exitFullscreen; + c && c.apply(document); + }, toggle() { + d() || (e() ? this.collapse() : this.expand()); + }, getFullscreenElement: () => t.$root }, t.expand = function() { + t.ext.fullscreen.expand(); + }, t.collapse = function() { + t.ext.fullscreen.collapse(); + }, t.attachEvent("onGanttReady", function() { + t.event(document, "webkitfullscreenchange", l), t.event(document, "mozfullscreenchange", l), t.event(document, "MSFullscreenChange", l), t.event(document, "fullscreenChange", l), t.event(document, "fullscreenchange", l); + }); +}, keyboard_navigation: function(t) { + (function(e) { + e.config.keyboard_navigation = !0, e.config.keyboard_navigation_cells = !1, e.$keyboardNavigation = {}, e._compose = function() { + for (var n = Array.prototype.slice.call(arguments, 0), i = {}, a = 0; a < n.length; a++) { + var r = n[a]; + for (var s in typeof r == "function" && (r = new r()), r) i[s] = r[s]; + } + return i; + }, function(n) { + n.$keyboardNavigation.shortcuts = { createCommand: function() { + return { modifiers: { shift: !1, alt: !1, ctrl: !1, meta: !1 }, keyCode: null }; + }, parse: function(i) { + for (var a = [], r = this.getExpressions(this.trim(i)), s = 0; s < r.length; s++) { + for (var o = this.getWords(r[s]), l = this.createCommand(), d = 0; d < o.length; d++) this.commandKeys[o[d]] ? l.modifiers[o[d]] = !0 : this.specialKeys[o[d]] ? l.keyCode = this.specialKeys[o[d]] : l.keyCode = o[d].charCodeAt(0); + a.push(l); + } + return a; + }, getCommandFromEvent: function(i) { + var a = this.createCommand(); + a.modifiers.shift = !!i.shiftKey, a.modifiers.alt = !!i.altKey, a.modifiers.ctrl = !!i.ctrlKey, a.modifiers.meta = !!i.metaKey, a.keyCode = i.which || i.keyCode, a.keyCode >= 96 && a.keyCode <= 105 && (a.keyCode -= 48); + var r = String.fromCharCode(a.keyCode); + return r && (a.keyCode = r.toLowerCase().charCodeAt(0)), a; + }, getHashFromEvent: function(i) { + return this.getHash(this.getCommandFromEvent(i)); + }, getHash: function(i) { + var a = []; + for (var r in i.modifiers) i.modifiers[r] && a.push(r); + return a.push(i.keyCode), a.join(this.junctionChar); + }, getExpressions: function(i) { + return i.split(this.junctionChar); + }, getWords: function(i) { + return i.split(this.combinationChar); + }, trim: function(i) { + return i.replace(/\s/g, ""); + }, junctionChar: ",", combinationChar: "+", commandKeys: { shift: 16, alt: 18, ctrl: 17, meta: !0 }, specialKeys: { backspace: 8, tab: 9, enter: 13, esc: 27, space: 32, up: 38, down: 40, left: 37, right: 39, home: 36, end: 35, pageup: 33, pagedown: 34, delete: 46, insert: 45, plus: 107, f1: 112, f2: 113, f3: 114, f4: 115, f5: 116, f6: 117, f7: 118, f8: 119, f9: 120, f10: 121, f11: 122, f12: 123 } }; + }(e), function(n) { + n.$keyboardNavigation.EventHandler = { _handlers: null, findHandler: function(i) { + this._handlers || (this._handlers = {}); + var a = n.$keyboardNavigation.shortcuts.getHash(i); + return this._handlers[a]; + }, doAction: function(i, a) { + var r = this.findHandler(i); + if (r) { + if (n.$keyboardNavigation.facade.callEvent("onBeforeAction", [i, a]) === !1) return; + r.call(this, a), a.preventDefault ? a.preventDefault() : a.returnValue = !1; + } + }, bind: function(i, a) { + this._handlers || (this._handlers = {}); + for (var r = n.$keyboardNavigation.shortcuts, s = r.parse(i), o = 0; o < s.length; o++) this._handlers[r.getHash(s[o])] = a; + }, unbind: function(i) { + for (var a = n.$keyboardNavigation.shortcuts, r = a.parse(i), s = 0; s < r.length; s++) this._handlers[a.getHash(r[s])] && delete this._handlers[a.getHash(r[s])]; + }, bindAll: function(i) { + for (var a in i) this.bind(a, i[a]); + }, initKeys: function() { + this._handlers || (this._handlers = {}), this.keys && this.bindAll(this.keys); + } }; + }(e), function(n) { + n.$keyboardNavigation.getFocusableNodes = ye, n.$keyboardNavigation.trapFocus = function(i, a) { + if (a.keyCode != 9) return !1; + for (var r = n.$keyboardNavigation.getFocusableNodes(i), s = ce(), o = -1, l = 0; l < r.length; l++) if (r[l] == s) { + o = l; + break; + } + if (a.shiftKey) { + if (o <= 0) { + var d = r[r.length - 1]; + if (d) return d.focus(), a.preventDefault(), !0; + } + } else if (o >= r.length - 1) { + var c = r[0]; + if (c) return c.focus(), a.preventDefault(), !0; + } + return !1; + }; + }(e), function(n) { + n.$keyboardNavigation.GanttNode = function() { + }, n.$keyboardNavigation.GanttNode.prototype = n._compose(n.$keyboardNavigation.EventHandler, { focus: function() { + n.focus(); + }, blur: function() { + }, isEnabled: function() { + return n.$container.hasAttribute("tabindex"); + }, scrollHorizontal: function(i) { + var a = n.dateFromPos(n.getScrollState().x), r = n.getScale(), s = i < 0 ? -r.step : r.step; + a = n.date.add(a, s, r.unit), n.scrollTo(n.posFromDate(a)); + }, scrollVertical: function(i) { + var a = n.getScrollState().y, r = n.config.row_height; + n.scrollTo(null, a + (i < 0 ? -1 : 1) * r); + }, keys: { "alt+left": function(i) { + this.scrollHorizontal(-1); + }, "alt+right": function(i) { + this.scrollHorizontal(1); + }, "alt+up": function(i) { + this.scrollVertical(-1); + }, "alt+down": function(i) { + this.scrollVertical(1); + }, "ctrl+z": function() { + n.undo && n.undo(); + }, "ctrl+r": function() { + n.redo && n.redo(); + } } }), n.$keyboardNavigation.GanttNode.prototype.bindAll(n.$keyboardNavigation.GanttNode.prototype.keys); + }(e), function(n) { + n.$keyboardNavigation.KeyNavNode = function() { + }, n.$keyboardNavigation.KeyNavNode.prototype = n._compose(n.$keyboardNavigation.EventHandler, { isValid: function() { + return !0; + }, fallback: function() { + return null; + }, moveTo: function(i) { + n.$keyboardNavigation.dispatcher.setActiveNode(i); + }, compareTo: function(i) { + if (!i) return !1; + for (var a in this) { + if (!!this[a] != !!i[a]) return !1; + var r = !(!this[a] || !this[a].toString), s = !(!i[a] || !i[a].toString); + if (s != r) return !1; + if (s && r) { + if (i[a].toString() != this[a].toString()) return !1; + } else if (i[a] != this[a]) return !1; + } + return !0; + }, getNode: function() { + }, focus: function() { + var i = this.getNode(); + if (i) { + var a = n.$keyboardNavigation.facade; + a.callEvent("onBeforeFocus", [i]) !== !1 && i && (i.setAttribute("tabindex", "-1"), i.$eventAttached || (i.$eventAttached = !0, n.event(i, "focus", function(r) { + return r.preventDefault(), !1; + }, !1)), n.utils.dom.isChildOf(document.activeElement, i) && (i = document.activeElement), i.focus && i.focus(), a.callEvent("onFocus", [this.getNode()])); + } + }, blur: function() { + var i = this.getNode(); + i && (n.$keyboardNavigation.facade.callEvent("onBlur", [i]), i.setAttribute("tabindex", "-1")); + } }); + }(e), function(n) { + n.$keyboardNavigation.HeaderCell = function(i) { + this.index = i || 0; + }, n.$keyboardNavigation.HeaderCell.prototype = n._compose(n.$keyboardNavigation.KeyNavNode, { _handlers: null, isValid: function() { + return !(!n.config.show_grid && n.getVisibleTaskCount() || !n.getGridColumns()[this.index] && n.getVisibleTaskCount()); + }, fallback: function() { + if (!n.config.show_grid) return n.getVisibleTaskCount() ? new n.$keyboardNavigation.TaskRow() : null; + for (var i = n.getGridColumns(), a = this.index; a >= 0 && !i[a]; ) a--; + return i[a] ? new n.$keyboardNavigation.HeaderCell(a) : null; + }, fromDomElement: function(i) { + var a = ft(i, "gantt_grid_head_cell"); + if (a) { + for (var r = 0; a && a.previousSibling; ) a = a.previousSibling, r += 1; + return new n.$keyboardNavigation.HeaderCell(r); + } + return null; + }, getNode: function() { + return n.$grid_scale.childNodes[this.index]; + }, keys: { left: function() { + this.index > 0 && this.moveTo(new n.$keyboardNavigation.HeaderCell(this.index - 1)); + }, right: function() { + var i = n.getGridColumns(); + this.index < i.length - 1 && this.moveTo(new n.$keyboardNavigation.HeaderCell(this.index + 1)); + }, down: function() { + var i, a = n.getChildren(n.config.root_id); + n.isTaskExists(a[0]) && (i = a[0]), i && (n.config.keyboard_navigation_cells ? this.moveTo(new n.$keyboardNavigation.TaskCell(i, this.index)) : this.moveTo(new n.$keyboardNavigation.TaskRow(i))); + }, end: function() { + var i = n.getGridColumns(); + this.moveTo(new n.$keyboardNavigation.HeaderCell(i.length - 1)); + }, home: function() { + this.moveTo(new n.$keyboardNavigation.HeaderCell(0)); + }, "enter, space": function() { + ce().click(); + }, "ctrl+enter": function() { + n.isReadonly(this) || n.createTask({}, this.taskId); + } } }), n.$keyboardNavigation.HeaderCell.prototype.bindAll(n.$keyboardNavigation.HeaderCell.prototype.keys); + }(e), function(n) { + n.$keyboardNavigation.TaskRow = function(i) { + if (!i) { + var a = n.getChildren(n.config.root_id); + a[0] && (i = a[0]); + } + this.taskId = i, n.isTaskExists(this.taskId) && (this.index = n.getTaskIndex(this.taskId), this.globalIndex = n.getGlobalTaskIndex(this.taskId), this.splitItem = !!n.getTask(this.taskId).$split_subtask, this.parentId = n.getParent(this.taskId)); + }, n.$keyboardNavigation.TaskRow.prototype = n._compose(n.$keyboardNavigation.KeyNavNode, { _handlers: null, isValid: function() { + return n.isTaskExists(this.taskId) && n.getTaskIndex(this.taskId) > -1; + }, fallback: function() { + if (!n.getVisibleTaskCount()) { + var i = new n.$keyboardNavigation.HeaderCell(); + return i.isValid() ? i : null; + } + if (this.splitItem) return new n.$keyboardNavigation.TaskRow(this.parentId); + var a = -1; + if (n.getTaskByIndex(this.globalIndex - 1)) a = this.globalIndex - 1; + else if (n.getTaskByIndex(this.globalIndex + 1)) a = this.globalIndex + 1; + else for (var r = this.globalIndex; r >= 0; ) { + if (n.getTaskByIndex(r)) { + a = r; + break; + } + r--; + } + return a > -1 ? new n.$keyboardNavigation.TaskRow(n.getTaskByIndex(a).id) : void 0; + }, fromDomElement: function(i) { + if (n.config.keyboard_navigation_cells) return null; + var a = n.locate(i); + return n.isTaskExists(a) ? new n.$keyboardNavigation.TaskRow(a) : null; + }, getNode: function() { + if (n.isTaskExists(this.taskId) && n.isTaskVisible(this.taskId)) return n.config.show_grid ? n.$grid.querySelector(".gantt_row[" + n.config.task_attribute + "='" + this.taskId + "']") : n.getTaskNode(this.taskId); + }, focus: function(i) { + if (!i) { + const a = n.getTaskPosition(n.getTask(this.taskId)), r = n.getTaskHeight(this.taskId), s = n.getScrollState(); + let o, l; + o = n.$task ? n.$task.offsetWidth : s.inner_width, l = n.$grid_data || n.$task_data ? (n.$grid_data || n.$task_data).offsetHeight : s.inner_height, a.top < s.y || a.top + r > s.y + l ? n.scrollTo(null, a.top - 20) : n.config.scroll_on_click && n.config.show_chart && (a.left > s.x + o ? n.scrollTo(a.left - n.config.task_scroll_offset) : a.left + a.width < s.x && n.scrollTo(a.left + a.width - n.config.task_scroll_offset)); + } + n.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this, [i]), function() { + var a = n.$ui.getView("grid"), r = parseInt(a.$grid.scrollLeft), s = parseInt(a.$grid_data.scrollTop), o = a.$config.scrollX; + if (o && a.$config.scrollable) { + var l = n.$ui.getView(o); + l && l.scrollTo(r, s); + } + var d = a.$config.scrollY; + if (d) { + var c = n.$ui.getView(d); + c && c.scrollTo(r, s); + } + }(); + }, keys: { pagedown: function() { + n.getVisibleTaskCount() && this.moveTo(new n.$keyboardNavigation.TaskRow(n.getTaskByIndex(n.getVisibleTaskCount() - 1).id)); + }, pageup: function() { + n.getVisibleTaskCount() && this.moveTo(new n.$keyboardNavigation.TaskRow(n.getTaskByIndex(0).id)); + }, up: function() { + var i = null, a = n.getPrev(this.taskId); + i = n.isTaskExists(a) ? new n.$keyboardNavigation.TaskRow(a) : new n.$keyboardNavigation.HeaderCell(), this.moveTo(i); + }, down: function() { + var i = n.getNext(this.taskId); + n.isTaskExists(i) && this.moveTo(new n.$keyboardNavigation.TaskRow(i)); + }, "shift+down": function() { + n.hasChild(this.taskId) && !n.getTask(this.taskId).$open && n.open(this.taskId); + }, "shift+up": function() { + n.hasChild(this.taskId) && n.getTask(this.taskId).$open && n.close(this.taskId); + }, "shift+right": function() { + if (!n.isReadonly(this)) { + var i = n.getPrevSibling(this.taskId); + n.isTaskExists(i) && !n.isChildOf(this.taskId, i) && (n.getTask(i).$open = !0, n.moveTask(this.taskId, -1, i) !== !1 && n.updateTask(this.taskId)); + } + }, "shift+left": function() { + if (!n.isReadonly(this)) { + var i = n.getParent(this.taskId); + n.isTaskExists(i) && n.moveTask(this.taskId, n.getTaskIndex(i) + 1, n.getParent(i)) !== !1 && n.updateTask(this.taskId); + } + }, space: function(i) { + n.isSelectedTask(this.taskId) ? n.unselectTask(this.taskId) : n.selectTask(this.taskId); + }, "ctrl+left": function(i) { + n.close(this.taskId); + }, "ctrl+right": function(i) { + n.open(this.taskId); + }, delete: function(i) { + n.isReadonly(this) || n.$click.buttons.delete(this.taskId); + }, enter: function() { + n.isReadonly(this) || n.showLightbox(this.taskId); + }, "ctrl+enter": function() { + n.isReadonly(this) || n.createTask({}, this.taskId); + } } }), n.$keyboardNavigation.TaskRow.prototype.bindAll(n.$keyboardNavigation.TaskRow.prototype.keys); + }(e), function(n) { + n.$keyboardNavigation.TaskCell = function(i, a) { + if (!(i = at(i, n.config.root_id))) { + var r = n.getChildren(n.config.root_id); + r[0] && (i = r[0]); + } + this.taskId = i, this.columnIndex = a || 0, n.isTaskExists(this.taskId) && (this.index = n.getTaskIndex(this.taskId), this.globalIndex = n.getGlobalTaskIndex(this.taskId)); + }, n.$keyboardNavigation.TaskCell.prototype = n._compose(n.$keyboardNavigation.TaskRow, { _handlers: null, isValid: function() { + return n.$keyboardNavigation.TaskRow.prototype.isValid.call(this) && !!n.getGridColumns()[this.columnIndex]; + }, fallback: function() { + var i = n.$keyboardNavigation.TaskRow.prototype.fallback.call(this), a = i; + if (i instanceof n.$keyboardNavigation.TaskRow) { + for (var r = n.getGridColumns(), s = this.columnIndex; s >= 0 && !r[s]; ) s--; + r[s] && (a = new n.$keyboardNavigation.TaskCell(i.taskId, s)); + } + return a; + }, fromDomElement: function(i) { + if (!n.config.keyboard_navigation_cells) return null; + var a = n.locate(i); + if (n.isTaskExists(a)) { + var r = 0, s = et(i, "data-column-index"); + return s && (r = 1 * s.getAttribute("data-column-index")), new n.$keyboardNavigation.TaskCell(a, r); + } + return null; + }, getNode: function() { + if (n.isTaskExists(this.taskId) && n.isTaskVisible(this.taskId)) { + if (n.config.show_grid) { + var i = n.$grid.querySelector(".gantt_row[" + n.config.task_attribute + "='" + this.taskId + "']"); + return i ? i.querySelector("[data-column-index='" + this.columnIndex + "']") : null; + } + return n.getTaskNode(this.taskId); + } + }, keys: { up: function() { + var i = null, a = n.getPrev(this.taskId); + i = n.isTaskExists(a) ? new n.$keyboardNavigation.TaskCell(a, this.columnIndex) : new n.$keyboardNavigation.HeaderCell(this.columnIndex), this.moveTo(i); + }, down: function() { + var i = n.getNext(this.taskId); + n.isTaskExists(i) && this.moveTo(new n.$keyboardNavigation.TaskCell(i, this.columnIndex)); + }, left: function() { + this.columnIndex > 0 && this.moveTo(new n.$keyboardNavigation.TaskCell(this.taskId, this.columnIndex - 1)); + }, right: function() { + var i = n.getGridColumns(); + this.columnIndex < i.length - 1 && this.moveTo(new n.$keyboardNavigation.TaskCell(this.taskId, this.columnIndex + 1)); + }, end: function() { + var i = n.getGridColumns(); + this.moveTo(new n.$keyboardNavigation.TaskCell(this.taskId, i.length - 1)); + }, home: function() { + this.moveTo(new n.$keyboardNavigation.TaskCell(this.taskId, 0)); + }, pagedown: function() { + n.getVisibleTaskCount() && this.moveTo(new n.$keyboardNavigation.TaskCell(n.getTaskByIndex(n.getVisibleTaskCount() - 1).id, this.columnIndex)); + }, pageup: function() { + n.getVisibleTaskCount() && this.moveTo(new n.$keyboardNavigation.TaskCell(n.getTaskByIndex(0).id, this.columnIndex)); + } } }), n.$keyboardNavigation.TaskCell.prototype.bindAll(n.$keyboardNavigation.TaskRow.prototype.keys), n.$keyboardNavigation.TaskCell.prototype.bindAll(n.$keyboardNavigation.TaskCell.prototype.keys); + }(e), Rn(e), function(n) { + n.$keyboardNavigation.dispatcher = { isActive: !1, activeNode: null, globalNode: new n.$keyboardNavigation.GanttNode(), enable: function() { + this.isActive = !0, this.setActiveNode(this.getActiveNode()); + }, disable: function() { + this.isActive = !1; + }, isEnabled: function() { + return !!this.isActive; + }, getDefaultNode: function() { + var i; + return (i = n.config.keyboard_navigation_cells ? new n.$keyboardNavigation.TaskCell() : new n.$keyboardNavigation.TaskRow()).isValid() || (i = i.fallback()), i; + }, setDefaultNode: function() { + this.setActiveNode(this.getDefaultNode()); + }, getActiveNode: function() { + var i = this.activeNode; + return i && !i.isValid() && (i = i.fallback()), i; + }, fromDomElement: function(i) { + for (var a = [n.$keyboardNavigation.TaskRow, n.$keyboardNavigation.TaskCell, n.$keyboardNavigation.HeaderCell], r = 0; r < a.length; r++) if (a[r].prototype.fromDomElement) { + var s = a[r].prototype.fromDomElement(i); + if (s) return s; + } + return null; + }, focusGlobalNode: function() { + this.blurNode(this.globalNode), this.focusNode(this.globalNode); + }, setActiveNode: function(i) { + var a = !0; + this.activeNode && this.activeNode.compareTo(i) && (a = !1), this.isEnabled() && (a && this.blurNode(this.activeNode), this.activeNode = i, this.focusNode(this.activeNode, !a)); + }, focusNode: function(i, a) { + i && i.focus && i.focus(a); + }, blurNode: function(i) { + i && i.blur && i.blur(); + }, keyDownHandler: function(i) { + if (!n.$keyboardNavigation.isModal() && this.isEnabled() && !i.defaultPrevented) { + var a = this.globalNode, r = n.$keyboardNavigation.shortcuts.getCommandFromEvent(i), s = this.getActiveNode(); + n.$keyboardNavigation.facade.callEvent("onKeyDown", [r, i]) !== !1 && (s ? s.findHandler(r) ? s.doAction(r, i) : a.findHandler(r) && a.doAction(r, i) : this.setDefaultNode()); + } + }, _timeout: null, awaitsFocus: function() { + return this._timeout !== null; + }, delay: function(i, a) { + clearTimeout(this._timeout), this._timeout = setTimeout(n.bind(function() { + this._timeout = null, i(); + }, this), a || 1); + }, clearDelay: function() { + clearTimeout(this._timeout); + } }; + }(e), function() { + var n = e.$keyboardNavigation.dispatcher; + n.isTaskFocused = function(v) { + var b = n.activeNode; + return (b instanceof e.$keyboardNavigation.TaskRow || b instanceof e.$keyboardNavigation.TaskCell) && b.taskId == v; + }; + var i = function(v) { + if (e.config.keyboard_navigation && (e.config.keyboard_navigation_cells || !s(v)) && !o(v) && !function(b) { + return !!dt(b.target, ".gantt_cal_light"); + }(v)) return n.keyDownHandler(v); + }, a = function(v) { + if (n.$preventDefault) return v.preventDefault(), e.$container.blur(), !1; + n.awaitsFocus() || n.focusGlobalNode(); + }, r = function() { + if (!n.isEnabled()) return; + const v = !J(document.activeElement, e.$container) && document.activeElement.localName != "body"; + var b = n.getActiveNode(); + if (b && !v) { + var _, m, p = b.getNode(); + p && p.parentNode && (_ = p.parentNode.scrollTop, m = p.parentNode.scrollLeft), b.focus(!0), p && p.parentNode && (p.parentNode.scrollTop = _, p.parentNode.scrollLeft = m); + } + }; + function s(v) { + return !!dt(v.target, ".gantt_grid_editor_placeholder"); + } + function o(v) { + return !!dt(v.target, ".no_keyboard_navigation"); + } + function l(v) { + if (!e.config.keyboard_navigation || !e.config.keyboard_navigation_cells && s(v)) return !0; + if (!o(v)) { + var b, _ = n.fromDomElement(v); + _ && (n.activeNode instanceof e.$keyboardNavigation.TaskCell && J(v.target, e.$task) && (_ = new e.$keyboardNavigation.TaskCell(_.taskId, n.activeNode.columnIndex)), b = _), b ? n.isEnabled() ? n.delay(function() { + n.setActiveNode(b); + }) : n.activeNode = b : (n.$preventDefault = !0, setTimeout(function() { + n.$preventDefault = !1; + }, 300)); + } + } + e.attachEvent("onDataRender", function() { + e.config.keyboard_navigation && r(); + }), e.attachEvent("onGanttRender", function() { + e.eventRemove(e.$root, "keydown", i), e.eventRemove(e.$container, "focus", a), e.eventRemove(e.$container, "mousedown", l), e.config.keyboard_navigation ? (e.event(e.$root, "keydown", i), e.event(e.$container, "focus", a), e.event(e.$container, "mousedown", l), e.$container.setAttribute("tabindex", "0")) : e.$container.removeAttribute("tabindex"); + }); + var d = e.attachEvent("onGanttReady", function() { + if (e.detachEvent(d), e.$data.tasksStore.attachEvent("onStoreUpdated", function(b) { + if (e.config.keyboard_navigation && n.isEnabled()) { + const _ = n.getActiveNode(), m = e.$ui.getView("grid"), p = m.getItemTop(b), k = m.$grid_data.scrollTop, $ = k + m.$grid_data.getBoundingClientRect().height; + _ && _.taskId == b && k <= p && $ >= p && r(); + } + }), e._smart_render) { + var v = e._smart_render._redrawTasks; + e._smart_render._redrawTasks = function(b, _) { + if (e.config.keyboard_navigation && n.isEnabled()) { + var m = n.getActiveNode(); + if (m && m.taskId !== void 0) { + for (var p = !1, k = 0; k < _.length; k++) if (_[k].id == m.taskId && _[k].start_date) { + p = !0; + break; + } + p || _.push(e.getTask(m.taskId)); + } + } + return v.apply(this, arguments); + }; + } + }); + let c = null, u = !1; + e.attachEvent("onTaskCreated", function(v) { + return c = v.id, !0; + }), e.attachEvent("onAfterTaskAdd", function(v, b) { + if (!e.config.keyboard_navigation) return !0; + if (n.isEnabled()) { + if (v == c && (u = !0, setTimeout(() => { + u = !1, c = null; + })), u && b.type == e.config.types.placeholder) return; + var _ = 0, m = n.activeNode; + m instanceof e.$keyboardNavigation.TaskCell && (_ = m.columnIndex); + var p = e.config.keyboard_navigation_cells ? e.$keyboardNavigation.TaskCell : e.$keyboardNavigation.TaskRow; + b.type == e.config.types.placeholder && e.config.placeholder_task.focusOnCreate === !1 || n.setActiveNode(new p(v, _)); + } + }), e.attachEvent("onTaskIdChange", function(v, b) { + if (!e.config.keyboard_navigation) return !0; + var _ = n.activeNode; + return n.isTaskFocused(v) && (_.taskId = b), !0; + }); + var h = setInterval(function() { + e.config.keyboard_navigation && (n.isEnabled() || n.enable()); + }, 500); + function g(v) { + var b = { gantt: e.$keyboardNavigation.GanttNode, headerCell: e.$keyboardNavigation.HeaderCell, taskRow: e.$keyboardNavigation.TaskRow, taskCell: e.$keyboardNavigation.TaskCell }; + return b[v] || b.gantt; + } + function f(v) { + for (var b = e.getGridColumns(), _ = 0; _ < b.length; _++) if (b[_].name == v) return _; + return 0; + } + e.attachEvent("onDestroy", function() { + clearInterval(h); + }); + var y = {}; + st(y), e.mixin(y, { addShortcut: function(v, b, _) { + var m = g(_); + m && m.prototype.bind(v, b); + }, getShortcutHandler: function(v, b) { + var _ = e.$keyboardNavigation.shortcuts.parse(v); + if (_.length) return y.getCommandHandler(_[0], b); + }, getCommandHandler: function(v, b) { + var _ = g(b); + if (_ && v) return _.prototype.findHandler(v); + }, removeShortcut: function(v, b) { + var _ = g(b); + _ && _.prototype.unbind(v); + }, focus: function(v) { + var b, _ = v ? v.type : null, m = g(_); + switch (_) { + case "taskCell": + b = new m(v.id, f(v.column)); + break; + case "taskRow": + b = new m(v.id); + break; + case "headerCell": + b = new m(f(v.column)); + } + n.delay(function() { + b ? n.setActiveNode(b) : (n.enable(), n.getActiveNode() ? n.awaitsFocus() || n.enable() : n.setDefaultNode()); + }); + }, getActiveNode: function() { + if (n.isEnabled()) { + var v = n.getActiveNode(), b = (m = v) instanceof e.$keyboardNavigation.GanttNode ? "gantt" : m instanceof e.$keyboardNavigation.HeaderCell ? "headerCell" : m instanceof e.$keyboardNavigation.TaskRow ? "taskRow" : m instanceof e.$keyboardNavigation.TaskCell ? "taskCell" : null, _ = e.getGridColumns(); + switch (b) { + case "taskCell": + return { type: "taskCell", id: v.taskId, column: _[v.columnIndex].name }; + case "taskRow": + return { type: "taskRow", id: v.taskId }; + case "headerCell": + return { type: "headerCell", column: _[v.index].name }; + } + } + var m; + return null; + } }), e.$keyboardNavigation.facade = y, e.ext.keyboardNavigation = y, e.focus = function() { + y.focus(); + }, e.addShortcut = y.addShortcut, e.getShortcutHandler = y.getShortcutHandler, e.removeShortcut = y.removeShortcut; + }(); + })(t); +}, quick_info: function(t) { + t.ext || (t.ext = {}), t.ext.quickInfo = new Hn(t), t.config.quickinfo_buttons = ["icon_edit", "icon_delete"], t.config.quick_info_detached = !0, t.config.show_quick_info = !0, t.templates.quick_info_title = function(a, r, s) { + return s.text.substr(0, 50); + }, t.templates.quick_info_content = function(a, r, s) { + return s.details || s.text; + }, t.templates.quick_info_date = function(a, r, s) { + return t.templates.task_time(a, r, s); + }, t.templates.quick_info_class = function(a, r, s) { + return ""; + }, t.attachEvent("onTaskClick", function(a, r) { + return t.utils.dom.closest(r.target, ".gantt_add") || setTimeout(function() { + t.ext.quickInfo.show(a); + }, 0), !0; + }); + const e = ["onViewChange", "onLightbox", "onBeforeTaskDelete", "onBeforeDrag"], n = function() { + return t.ext.quickInfo.hide(), !0; + }; + for (let a = 0; a < e.length; a++) t.attachEvent(e[a], n); + function i() { + return t.ext.quickInfo.hide(), t.ext.quickInfo._quickInfoBox = null, !0; + } + t.attachEvent("onEmptyClick", function(a) { + let r = !0; + const s = document.querySelector(".gantt_cal_quick_info"); + s && t.utils.dom.isChildOf(a.target, s) && (r = !1), r && n(); + }), t.attachEvent("onGanttReady", i), t.attachEvent("onDestroy", i), t.event(window, "keydown", function(a) { + a.keyCode === 27 && t.ext.quickInfo.hide(); + }), t.showQuickInfo = function() { + t.ext.quickInfo.show.apply(t.ext.quickInfo, arguments); + }, t.hideQuickInfo = function() { + t.ext.quickInfo.hide.apply(t.ext.quickInfo, arguments); + }; +}, tooltip: function(t) { + t.config.tooltip_timeout = 30, t.config.tooltip_offset_y = 20, t.config.tooltip_offset_x = 10, t.config.tooltip_hide_timeout = 30; + const e = new Wn(t); + t.ext.tooltips = e, t.attachEvent("onGanttReady", function() { + e.tooltipFor({ selector: "[" + t.config.task_attribute + "]:not(.gantt_task_row)", html: (n) => { + if (t.config.touch && !t.config.touch_tooltip) return; + const i = t.locate(n); + if (t.isTaskExists(i)) { + const a = t.getTask(i); + return t.templates.tooltip_text(a.start_date, a.end_date, a); + } + return null; + }, global: !1 }); + }), t.attachEvent("onDestroy", function() { + e.destructor(); + }), t.attachEvent("onLightbox", function() { + e.hideTooltip(); + }), t.attachEvent("onBeforeTooltip", function() { + if (t.getState().link_source_id) return !1; + }), t.attachEvent("onGanttScroll", function() { + e.hideTooltip(); + }); +}, undo: function(t) { + const e = new Fn(t), n = new jn(e, t); + function i(d, c, u) { + d && (d.id === c && (d.id = u), d.parent === c && (d.parent = u)); + } + function a(d, c, u) { + i(d.value, c, u), i(d.oldValue, c, u); + } + function r(d, c, u) { + d && (d.source === c && (d.source = u), d.target === c && (d.target = u)); + } + function s(d, c, u) { + r(d.value, c, u), r(d.oldValue, c, u); + } + function o(d, c, u) { + const h = e; + for (let g = 0; g < d.length; g++) { + const f = d[g]; + for (let y = 0; y < f.commands.length; y++) f.commands[y].entity === h.command.entity.task ? a(f.commands[y], c, u) : f.commands[y].entity === h.command.entity.link && s(f.commands[y], c, u); + } + } + function l(d, c, u) { + const h = e; + for (let g = 0; g < d.length; g++) { + const f = d[g]; + for (let y = 0; y < f.commands.length; y++) { + const v = f.commands[y]; + v.entity === h.command.entity.link && (v.value && v.value.id === c && (v.value.id = u), v.oldValue && v.oldValue.id === c && (v.oldValue.id = u)); + } + } + } + t.config.undo = !0, t.config.redo = !0, t.config.undo_types = { link: "link", task: "task" }, t.config.undo_actions = { update: "update", remove: "remove", add: "add", move: "move" }, t.ext || (t.ext = {}), t.ext.undo = { undo: () => e.undo(), redo: () => e.redo(), getUndoStack: () => e.getUndoStack(), setUndoStack: (d) => e.setUndoStack(d), getRedoStack: () => e.getRedoStack(), setRedoStack: (d) => e.setRedoStack(d), clearUndoStack: () => e.clearUndoStack(), clearRedoStack: () => e.clearRedoStack(), saveState: (d, c) => n.store(d, c, !0), getInitialState: (d, c) => c === t.config.undo_types.link ? n.getInitialLink(d) : n.getInitialTask(d) }, t.undo = t.ext.undo.undo, t.redo = t.ext.undo.redo, t.getUndoStack = t.ext.undo.getUndoStack, t.getRedoStack = t.ext.undo.getRedoStack, t.clearUndoStack = t.ext.undo.clearUndoStack, t.clearRedoStack = t.ext.undo.clearRedoStack, t.attachEvent("onTaskIdChange", (d, c) => { + const u = e; + o(u.getUndoStack(), d, c), o(u.getRedoStack(), d, c); + }), t.attachEvent("onLinkIdChange", (d, c) => { + const u = e; + l(u.getUndoStack(), d, c), l(u.getRedoStack(), d, c); + }), t.attachEvent("onGanttReady", () => { + e.updateConfigs(); + }); +}, marker: function(t) { + function e(i) { + if (!t.config.show_markers || !i.start_date) return !1; + var a = t.getState(); + if (+i.start_date > +a.max_date || (!i.end_date || +i.end_date < +a.min_date) && +i.start_date < +a.min_date) return; + var r = document.createElement("div"); + r.setAttribute("data-marker-id", i.id); + var s = "gantt_marker"; + i.css && (s += " " + i.css), i.title && (r.title = i.title), r.className = s; + var o = t.posFromDate(i.start_date); + r.style.left = o + "px"; + let l = Math.max(t.getRowTop(t.getVisibleTaskCount()), 0) + "px"; + if (t.config.timeline_placeholder && t.$task_data && (l = t.$task_data.scrollHeight + "px"), r.style.height = l, i.end_date) { + var d = t.posFromDate(i.end_date); + r.style.width = Math.max(d - o, 0) + "px"; + } + return i.text && (r.innerHTML = "
" + i.text + "
"), r; + } + function n() { + if (t.$task_data) { + var i = document.createElement("div"); + i.className = "gantt_marker_area", t.$task_data.appendChild(i), t.$marker_area = i; + } + } + t._markers || (t._markers = t.createDatastore({ name: "marker", initItem: function(i) { + return i.id = i.id || t.uid(), i; + } })), t.config.show_markers = !0, t.attachEvent("onBeforeGanttRender", function() { + t.$marker_area || n(); + }), t.attachEvent("onDataRender", function() { + t.$marker_area || (n(), t.renderMarkers()); + }), t.attachEvent("onGanttLayoutReady", function() { + t.attachEvent("onBeforeGanttRender", function() { + n(), t.$services.getService("layers").createDataRender({ name: "marker", defaultContainer: function() { + return t.$marker_area; + } }).addLayer(e); + }, { once: !0 }); + }), t.getMarker = function(i) { + return this._markers ? this._markers.getItem(i) : null; + }, t.addMarker = function(i) { + return this._markers.addItem(i); + }, t.deleteMarker = function(i) { + return !!this._markers.exists(i) && (this._markers.removeItem(i), !0); + }, t.updateMarker = function(i) { + this._markers.refresh(i); + }, t._getMarkers = function() { + return this._markers.getItems(); + }, t.renderMarkers = function() { + this._markers.refresh(); + }; +}, multiselect: function(t) { + t.config.multiselect = !0, t.config.multiselect_one_level = !1, t._multiselect = { _selected: {}, _one_level: !1, _active: !0, _first_selected_when_shift: null, getDefaultSelected: function() { + var e = this.getSelected(); + return e.length ? e[e.length - 1] : null; + }, setFirstSelected: function(e) { + this._first_selected_when_shift = e; + }, getFirstSelected: function() { + return this._first_selected_when_shift; + }, isActive: function() { + return this.updateState(), this._active; + }, updateState: function() { + this._one_level = t.config.multiselect_one_level; + var e = this._active; + this._active = t.config.select_task, this._active != e && this.reset(); + }, reset: function() { + this._selected = {}; + }, setLastSelected: function(e) { + t.$data.tasksStore.silent(function() { + var n = t.$data.tasksStore; + e ? n.select(e + "") : n.unselect(null); + }); + }, getLastSelected: function() { + var e = t.$data.tasksStore.getSelectedId(); + return e && t.isTaskExists(e) ? e : null; + }, select: function(e, n) { + return !!(e && t.callEvent("onBeforeTaskMultiSelect", [e, !0, n]) && t.callEvent("onBeforeTaskSelected", [e])) && (this._selected[e] = !0, this.setLastSelected(e), this.afterSelect(e), t.callEvent("onTaskMultiSelect", [e, !0, n]), t.callEvent("onTaskSelected", [e]), !0); + }, toggle: function(e, n) { + this._selected[e] ? this.unselect(e, n) : this.select(e, n); + }, unselect: function(e, n) { + e && t.callEvent("onBeforeTaskMultiSelect", [e, !1, n]) && (this._selected[e] = !1, this.getLastSelected() == e && this.setLastSelected(this.getDefaultSelected()), this.afterSelect(e), t.callEvent("onTaskMultiSelect", [e, !1, n]), t.callEvent("onTaskUnselected", [e])); + }, isSelected: function(e) { + return !(!t.isTaskExists(e) || !this._selected[e]); + }, getSelected: function() { + var e = []; + for (var n in this._selected) this._selected[n] && t.isTaskExists(n) ? e.push(n) : this._selected[n] = !1; + return e.sort(function(i, a) { + return t.getGlobalTaskIndex(i) > t.getGlobalTaskIndex(a) ? 1 : -1; + }), e; + }, forSelected: function(e) { + for (var n = this.getSelected(), i = 0; i < n.length; i++) e(n[i]); + }, isSameLevel: function(e) { + if (!this._one_level) return !0; + var n = this.getLastSelected(); + return !n || !t.isTaskExists(n) || !t.isTaskExists(e) || t.calculateTaskLevel(t.getTask(n)) == t.calculateTaskLevel(t.getTask(e)); + }, afterSelect: function(e) { + t.isTaskExists(e) && t._quickRefresh(function() { + t.refreshTask(e); + }); + }, doSelection: function(e) { + if (!this.isActive() || t._is_icon_open_click(e)) return !1; + var n = t.locate(e); + if (!n || !t.callEvent("onBeforeMultiSelect", [e])) return !1; + var i = this.getSelected(), a = this.getFirstSelected(), r = !1, s = this.getLastSelected(), o = t.config.multiselect, l = (function() { + var c = t.ext.inlineEditors, u = c.getState(), h = c.locateCell(e.target); + t.config.inline_editors_multiselect_open && h && c.getEditorConfig(h.columnName) && (c.isVisible() && u.id == h.id && u.columnName == h.columnName || c.startEdit(h.id, h.columnName)), this.setFirstSelected(n), this.isSelected(n) || this.select(n, e), i = this.getSelected(); + for (var g = 0; g < i.length; g++) i[g] !== n && this.unselect(i[g], e); + }).bind(this), d = (function() { + if (s) { + if (n) { + for (var c = t.getGlobalTaskIndex(this.getFirstSelected()), u = t.getGlobalTaskIndex(n), h = t.getGlobalTaskIndex(s), g = s; t.getGlobalTaskIndex(g) !== c; ) this.unselect(g, e), g = c > h ? t.getNext(g) : t.getPrev(g); + for (g = n; t.getGlobalTaskIndex(g) !== c; ) this.select(g, e) && !r && (r = !0, a = g), g = c > u ? t.getNext(g) : t.getPrev(g); + } + } else s = n; + }).bind(this); + return o && (e.ctrlKey || e.metaKey) ? (this.isSelected(n) || this.setFirstSelected(n), n && this.toggle(n, e)) : o && e.shiftKey ? (t.isTaskExists(this.getFirstSelected()) && this.getFirstSelected() !== null || this.setFirstSelected(n), i.length ? d() : l()) : l(), this.isSelected(n) ? this.setLastSelected(n) : a ? n == s && this.setLastSelected(e.shiftKey ? a : this.getDefaultSelected()) : this.setLastSelected(null), this.getSelected().length || this.setLastSelected(null), this.getLastSelected() && this.isSelected(this.getFirstSelected()) || this.setFirstSelected(this.getLastSelected()), !0; + } }, function() { + var e = t.selectTask; + t.selectTask = function(i) { + if (!(i = at(i, this.config.root_id))) return !1; + var a = t._multiselect, r = i; + return a.isActive() ? (a.select(i, null) && a.setLastSelected(i), a.setFirstSelected(a.getLastSelected())) : r = e.call(this, i), r; + }; + var n = t.unselectTask; + t.unselectTask = function(i) { + var a = t._multiselect, r = a.isActive(); + (i = i || a.getLastSelected()) && r && (a.unselect(i, null), i == a.getLastSelected() && a.setLastSelected(null), t.refreshTask(i), a.setFirstSelected(a.getLastSelected())); + var s = i; + return r || (s = n.call(this, i)), s; + }, t.toggleTaskSelection = function(i) { + var a = t._multiselect; + i && a.isActive() && (a.toggle(i), a.setFirstSelected(a.getLastSelected())); + }, t.getSelectedTasks = function() { + var i = t._multiselect; + return i.isActive(), i.getSelected(); + }, t.eachSelectedTask = function(i) { + return this._multiselect.forSelected(i); + }, t.isSelectedTask = function(i) { + return this._multiselect.isSelected(i); + }, t.getLastSelectedTask = function() { + return this._multiselect.getLastSelected(); + }, t.attachEvent("onGanttReady", function() { + var i = t.$data.tasksStore.isSelected; + t.$data.tasksStore.isSelected = function(a) { + return t._multiselect.isActive() ? t._multiselect.isSelected(a) : i.call(this, a); + }; + }); + }(), t.attachEvent("onTaskIdChange", function(e, n) { + var i = t._multiselect; + if (!i.isActive()) return !0; + t.isSelectedTask(e) && (i.unselect(e, null), i.select(n, null)); + }), t.attachEvent("onAfterTaskDelete", function(e, n) { + var i = t._multiselect; + if (!i.isActive()) return !0; + i._selected[e] && (i._selected[e] = !1, i.setLastSelected(i.getDefaultSelected())), i.forSelected(function(a) { + t.isTaskExists(a) || i.unselect(a, null); + }); + }), t.attachEvent("onBeforeTaskMultiSelect", function(e, n, i) { + var a = t._multiselect; + return !(n && a.isActive() && a._one_level) || a.isSameLevel(e); + }), t.attachEvent("onTaskClick", function(e, n) { + return t._multiselect.doSelection(n) && t.callEvent("onMultiSelect", [n]), !0; + }); +}, export_api: function(t) { + return t.ext = t.ext || {}, t.ext.export_api = t.ext.export_api || { _apiUrl: "https://export.dhtmlx.com/gantt", _preparePDFConfigRaw(e, n) { + let i = null; + e.start && e.end && (i = { start_date: t.config.start_date, end_date: t.config.end_date }, t.config.start_date = t.date.str_to_date(t.config.date_format)(e.start), t.config.end_date = t.date.str_to_date(t.config.date_format)(e.end)), e = t.mixin(e, { name: "gantt." + n, data: t.ext.export_api._serializeHtml() }), i && (t.config.start_date = i.start_date, t.config.end_date = i.end_date); + }, _prepareConfigPDF: (e, n) => (e = t.mixin(e || {}, { name: "gantt." + n, data: t.ext.export_api._serializeAll(), config: t.config }), t.ext.export_api._fixColumns(e.config.columns), e), _pdfExportRouter(e, n) { + e && e.raw ? t.ext.export_api._preparePDFConfigRaw(e, n) : e = t.ext.export_api._prepareConfigPDF(e, n), e.version = t.version, t.ext.export_api._sendToExport(e, n); + }, exportToPDF(e) { + t.ext.export_api._pdfExportRouter(e, "pdf"); + }, exportToPNG(e) { + t.ext.export_api._pdfExportRouter(e, "png"); + }, exportToICal(e) { + e = t.mixin(e || {}, { name: "gantt.ical", data: t.ext.export_api._serializePlain().data, version: t.version }), t.ext.export_api._sendToExport(e, "ical"); + }, exportToExcel(e) { + let n, i, a, r; + e = e || {}; + const s = t.config.smart_rendering; + if (e.visual === "base-colors" && (t.config.smart_rendering = !1), e.start || e.end) { + a = t.getState(), i = [t.config.start_date, t.config.end_date], r = t.getScrollState(); + const o = t.date.str_to_date(t.config.date_format); + n = t.eachTask, e.start && (t.config.start_date = o(e.start)), e.end && (t.config.end_date = o(e.end)), t.render(), t.config.smart_rendering = s, t.eachTask = t.ext.export_api._eachTaskTimed(t.config.start_date, t.config.end_date); + } else e.visual === "base-colors" && (t.render(), t.config.smart_rendering = s); + t._no_progress_colors = e.visual === "base-colors", (e = t.mixin(e, { name: "gantt.xlsx", title: "Tasks", data: t.ext.export_api._serializeTimeline(e).data, columns: t.ext.export_api._serializeGrid({ rawDates: !0 }), version: t.version })).visual && (e.scales = t.ext.export_api._serializeScales(e)), t.ext.export_api._sendToExport(e, "excel"), (e.start || e.end) && (t.config.start_date = a.min_date, t.config.end_date = a.max_date, t.eachTask = n, t.render(), t.scrollTo(r.x, r.y), t.config.start_date = i[0], t.config.end_date = i[1]); + }, exportToJSON(e) { + e = t.mixin(e || {}, { name: "gantt.json", data: t.ext.export_api._serializeAll(), config: t.config, columns: t.ext.export_api._serializeGrid(), worktime: t.ext.export_api._getWorktimeSettings(), version: t.version }), t.ext.export_api._sendToExport(e, "json"); + }, importFromExcel(e) { + try { + const n = e.data; + if (n instanceof File) { + const i = new FormData(); + i.append("file", n), e.data = i; + } + } catch { + } + t.ext.export_api._sendImportAjaxExcel(e); + }, importFromMSProject(e) { + const n = e.data; + try { + if (n instanceof File) { + const i = new FormData(); + i.append("file", n), e.data = i; + } + } catch { + } + t.ext.export_api._sendImportAjaxMSP(e); + }, importFromPrimaveraP6: (e) => (e.type = "primaveraP6-parse", t.importFromMSProject(e)), exportToMSProject(e) { + (e = e || {}).skip_circular_links = e.skip_circular_links === void 0 || !!e.skip_circular_links; + const n = t.templates.xml_format, i = t.templates.format_date, a = t.config.xml_date, r = t.config.date_format, s = "%d-%m-%Y %H:%i:%s"; + t.config.xml_date = s, t.config.date_format = s, t.templates.xml_format = t.date.date_to_str(s), t.templates.format_date = t.date.date_to_str(s); + const o = t.ext.export_api._serializeAll(); + t.ext.export_api._customProjectProperties(o, e), t.ext.export_api._customTaskProperties(o, e), e.skip_circular_links && t.ext.export_api._clearRecLinks(o), e = t.ext.export_api._exportConfig(o, e), t.ext.export_api._sendToExport(e, e.type || "msproject"), t.config.xml_date = a, t.config.date_format = r, t.templates.xml_format = n, t.templates.format_date = i, t.config.$custom_data = null, t.config.custom = null; + }, exportToPrimaveraP6: (e) => ((e = e || {}).type = "primaveraP6", t.exportToMSProject(e)), _fixColumns(e) { + for (let n = 0; n < e.length; n++) e[n].label = e[n].label || t.locale.labels["column_" + e[n].name], typeof e[n].width == "string" && (e[n].width = 1 * e[n].width); + }, _xdr(e, n, i) { + t.ajax.post(e, n, i); + }, _markColumns(e) { + const n = e.config.columns; + if (n) for (let i = 0; i < n.length; i++) n[i].template && (n[i].$template = !0); + }, _sendImportAjaxExcel(e) { + const n = e.server || t.ext.export_api._apiUrl, i = e.store || 0, a = e.data, r = e.callback; + a.append("type", "excel-parse"), a.append("data", JSON.stringify({ sheet: e.sheet || 0 })), i && a.append("store", i); + const s = new XMLHttpRequest(); + s.onreadystatechange = function(o) { + s.readyState === 4 && s.status === 0 && r && r(null); + }, s.onload = function() { + let o = null; + if (!(s.status > 400)) try { + o = JSON.parse(s.responseText); + } catch { + } + r && r(o); + }, s.open("POST", n, !0), s.setRequestHeader("X-Requested-With", "XMLHttpRequest"), s.send(a); + }, _ajaxToExport(e, n, i) { + delete e.callback; + const a = e.server || t.ext.export_api._apiUrl, r = "type=" + n + "&store=1&data=" + encodeURIComponent(JSON.stringify(e)); + t.ext.export_api._xdr(a, r, function(s) { + const o = s.xmlDoc || s; + let l = null; + if (!(o.status > 400)) try { + l = JSON.parse(o.responseText); + } catch { + } + i(l); + }); + }, _serializableGanttConfig(e) { + const n = t.mixin({}, e); + return n.columns && (n.columns = n.columns.map(function(i) { + const a = t.mixin({}, i); + return delete a.editor, a; + })), delete n.editor_types, n; + }, _sendToExport(e, n) { + const i = t.date.date_to_str(t.config.date_format || t.config.xml_date); + if (e.skin || (e.skin = t.skin), e.config && (e.config = t.copy(t.ext.export_api._serializableGanttConfig(e.config)), t.ext.export_api._markColumns(e, n), e.config.start_date && e.config.end_date && (e.config.start_date instanceof Date && (e.config.start_date = i(e.config.start_date)), e.config.end_date instanceof Date && (e.config.end_date = i(e.config.end_date)))), e.callback) return t.ext.export_api._ajaxToExport(e, n, e.callback); + const a = t.ext.export_api._createHiddenForm(); + a.firstChild.action = e.server || t.ext.export_api._apiUrl, a.firstChild.childNodes[0].value = JSON.stringify(e), a.firstChild.childNodes[1].value = n, a.firstChild.submit(); + }, _createHiddenForm() { + if (!t.ext.export_api._hidden_export_form) { + const e = t.ext.export_api._hidden_export_form = document.createElement("div"); + e.style.display = "none", e.innerHTML = "
", document.body.appendChild(e); + } + return t.ext.export_api._hidden_export_form; + }, _copyObjectBase(e) { + const n = { start_date: void 0, end_date: void 0, constraint_date: void 0, deadline: void 0 }; + for (const a in e) a.charAt(0) !== "$" && a !== "baselines" && (n[a] = e[a]); + const i = t.templates.xml_format || t.templates.format_date; + return n.start_date = i(n.start_date), n.end_date && (n.end_date = i(n.end_date)), n.constraint_date && (n.constraint_date = i(n.constraint_date)), n.deadline && (n.deadline = i(n.deadline)), n; + }, _color_box: null, _color_hash: {}, _getStyles(e) { + if (t.ext.export_api._color_box || (t.ext.export_api._color_box = document.createElement("DIV"), t.ext.export_api._color_box.style.cssText = "position:absolute; display:none;", document.body.appendChild(t.ext.export_api._color_box)), t.ext.export_api._color_hash[e]) return t.ext.export_api._color_hash[e]; + t.ext.export_api._color_box.className = e; + const n = t.ext.export_api._getColor(t.ext.export_api._color_box, "color"), i = t.ext.export_api._getColor(t.ext.export_api._color_box, "backgroundColor"); + return t.ext.export_api._color_hash[e] = n + ";" + i; + }, _getMinutesWorktimeSettings(e) { + const n = []; + return e.forEach(function(i) { + n.push(i.startMinute), n.push(i.endMinute); + }), n; + }, _getWorktimeSettings() { + const e = { hours: [0, 24], minutes: null, dates: { 0: !0, 1: !0, 2: !0, 3: !0, 4: !0, 5: !0, 6: !0 } }; + let n; + if (t.config.work_time) { + const i = t._working_time_helper; + if (i && i.get_calendar) n = i.get_calendar(); + else if (i) n = { hours: i.hours, minutes: null, dates: i.dates }; + else if (t.config.worktimes && t.config.worktimes.global) { + const a = t.config.worktimes.global; + if (a.parsed) { + n = { hours: null, minutes: t.ext.export_api._getMinutesWorktimeSettings(a.parsed.hours), dates: {} }; + for (const r in a.parsed.dates) Array.isArray(a.parsed.dates[r]) ? n.dates[r] = t.ext.export_api._getMinutesWorktimeSettings(a.parsed.dates[r]) : n.dates[r] = a.parsed.dates[r]; + } else n = { hours: a.hours, minutes: null, dates: a.dates }; + } else n = e; + } else n = e; + return n; + }, _eachTaskTimed: (e, n) => function(i, a, r) { + a = a || t.config.root_id, r = r || t; + const s = t.getChildren(a); + if (s) for (let o = 0; o < s.length; o++) { + const l = t._pull[s[o]]; + (!e || l.end_date > e) && (!n || l.start_date < n) && i.call(r, l), t.hasChild(l.id) && t.eachTask(i, l.id, r); + } + }, _originalCopyObject: t.json._copyObject, _copyObjectPlain(e) { + const n = t.templates.task_text(e.start_date, e.end_date, e), i = t.ext.export_api._copyObjectBase(e); + return i.text = n || i.text, i; + }, _getColor(e, n) { + const i = e.currentStyle ? e.currentStyle[n] : getComputedStyle(e, null)[n], a = i.replace(/\s/g, "").match(/^rgba?\((\d+),(\d+),(\d+)/i); + return (a && a.length === 4 ? ("0" + parseInt(a[1], 10).toString(16)).slice(-2) + ("0" + parseInt(a[2], 10).toString(16)).slice(-2) + ("0" + parseInt(a[3], 10).toString(16)).slice(-2) : i).replace("#", ""); + }, _copyObjectTable(e) { + const n = t.date.date_to_str("%Y-%m-%dT%H:%i:%s.000Z"), i = t.ext.export_api._copyObjectColumns(e, t.ext.export_api._copyObjectPlain(e)); + i.start_date && (i.start_date = n(e.start_date)), i.end_date && (i.end_date = n(e.end_date)); + const a = t._day_index_by_date ? t._day_index_by_date : t.columnIndexByDate; + i.$start = a.call(t, e.start_date), i.$end = a.call(t, e.end_date); + let r = 0; + const s = t.getScale().width; + if (s.indexOf(0) > -1) { + let l = 0; + for (; l < i.$start; l++) s[l] || r++; + for (i.$start -= r; l < i.$end; l++) s[l] || r++; + i.$end -= r; + } + i.$level = e.$level, i.$type = e.$rendered_type; + const o = t.templates; + return i.$text = o.task_text(e.start, e.end_date, e), i.$left = o.leftside_text ? o.leftside_text(e.start, e.end_date, e) : "", i.$right = o.rightside_text ? o.rightside_text(e.start, e.end_date, e) : "", i; + }, _copyObjectColors(e) { + const n = t.ext.export_api._copyObjectTable(e), i = t.getTaskNode(e.id); + if (i && i.firstChild) { + let a = t.ext.export_api._getColor(t._no_progress_colors ? i : i.firstChild, "backgroundColor"); + a === "363636" && (a = t.ext.export_api._getColor(i, "backgroundColor")), n.$color = a; + } else e.color && (n.$color = e.color); + return n; + }, _copyObjectColumns(e, n) { + for (let i = 0; i < t.config.columns.length; i++) { + const a = t.config.columns[i].template; + if (a) { + let r = a(e); + r instanceof Date && (r = t.templates.date_grid(r, e)), n["_" + i] = r; + } + } + return n; + }, _copyObjectAll(e) { + const n = t.ext.export_api._copyObjectBase(e), i = ["leftside_text", "rightside_text", "task_text", "progress_text", "task_class"]; + for (let a = 0; a < i.length; a++) { + const r = t.templates[i[a]]; + r && (n["$" + a] = r(e.start_date, e.end_date, e)); + } + return t.ext.export_api._copyObjectColumns(e, n), n.open = e.$open, n; + }, _serializeHtml() { + const e = t.config.smart_scales, n = t.config.smart_rendering; + (e || n) && (t.config.smart_rendering = !1, t.config.smart_scales = !1, t.render()); + const i = t.$container.parentNode.innerHTML; + return (e || n) && (t.config.smart_scales = e, t.config.smart_rendering = n, t.render()), i; + }, _serializeAll() { + t.json._copyObject = t.ext.export_api._copyObjectAll; + const e = t.ext.export_api._exportSerialize(); + return t.json._copyObject = t.ext.export_api._originalCopyObject, e; + }, _serializePlain() { + const e = t.templates.xml_format, n = t.templates.format_date; + t.templates.xml_format = t.date.date_to_str("%Y%m%dT%H%i%s", !0), t.templates.format_date = t.date.date_to_str("%Y%m%dT%H%i%s", !0), t.json._copyObject = t.ext.export_api._copyObjectPlain; + const i = t.ext.export_api._exportSerialize(); + return t.templates.xml_format = e, t.templates.format_date = n, t.json._copyObject = t.ext.export_api._originalCopyObject, delete i.links, i; + }, _getRaw() { + if (t._scale_helpers) { + const e = t._get_scales(), n = t.config.min_column_width, i = t._get_resize_options().x ? Math.max(t.config.autosize_min_width, 0) : t.config.$task.offsetWidth, a = t.config.config.scale_height - 1; + return t._scale_helpers.prepareConfigs(e, n, i, a); + } + { + const e = t.$ui.getView("timeline"); + if (e) { + let n = e.$config.width; + t.config.autosize !== "x" && t.config.autosize !== "xy" || (n = Math.max(t.config.autosize_min_width, 0)); + const i = t.getState(), a = e._getScales(), r = t.config.min_column_width, s = t.config.scale_height - 1, o = t.config.rtl; + return e.$scaleHelper.prepareConfigs(a, r, n, s, i.min_date, i.max_date, o); + } + } + }, _serializeTimeline(e) { + t.json._copyObject = e.visual ? t.ext.export_api._copyObjectColors : t.ext.export_api._copyObjectTable; + const n = t.ext.export_api._exportSerialize(); + if (t.json._copyObject = t.ext.export_api._originalCopyObject, delete n.links, e.cellColors) { + const i = t.templates.timeline_cell_class || t.templates.task_cell_class; + if (i) { + const a = t.ext.export_api._getRaw(); + let r = a[0].trace_x; + for (let s = 1; s < a.length; s++) a[s].trace_x.length > r.length && (r = a[s].trace_x); + for (let s = 0; s < n.data.length; s++) { + n.data[s].styles = []; + const o = t.getTask(n.data[s].id); + for (let l = 0; l < r.length; l++) { + const d = i(o, r[l]); + d && n.data[s].styles.push({ index: l, styles: t.ext.export_api._getStyles(d) }); + } + } + } + } + return n; + }, _serializeScales(e) { + const n = [], i = t.ext.export_api._getRaw(); + let a = 1 / 0, r = 0; + for (let s = 0; s < i.length; s++) a = Math.min(a, i[s].col_width); + for (let s = 0; s < i.length; s++) { + let o = 0, l = 0; + const d = []; + n.push(d); + const c = i[s]; + r = Math.max(r, c.trace_x.length); + const u = c.format || c.template || (c.date ? t.date.date_to_str(c.date) : t.config.date_scale); + for (let h = 0; h < c.trace_x.length; h++) { + const g = c.trace_x[h]; + l = o + Math.round(c.width[h] / a); + const f = { text: u(g), start: o, end: l, styles: "" }; + if (e.cellColors) { + const y = c.css || t.templates.scaleCell_class; + if (y) { + const v = y(g); + v && (f.styles = t.ext.export_api._getStyles(v)); + } + } + d.push(f), o = l; + } + } + return { width: r, height: n.length, data: n }; + }, _serializeGrid(e) { + t.exportMode = !0; + const n = [], i = t.config.columns; + let a = 0; + for (let r = 0; r < i.length; r++) i[r].name !== "add" && i[r].name !== "buttons" && (n[a] = { id: i[r].template ? "_" + r : i[r].name, header: i[r].label || t.locale.labels["column_" + i[r].name], width: i[r].width ? Math.floor(i[r].width / 4) : "" }, i[r].name === "duration" && (n[a].type = "number"), i[r].name !== "start_date" && i[r].name !== "end_date" || (n[a].type = "date", e && e.rawDates && (n[a].id = i[r].name)), a++); + return t.exportMode = !1, n; + }, _exportSerialize() { + t.exportMode = !0; + const e = t.templates.xml_format, n = t.templates.format_date; + t.templates.xml_format = t.templates.format_date = t.date.date_to_str(t.config.date_format || t.config.xml_date); + const i = t.serialize(); + return t.templates.xml_format = e, t.templates.format_date = n, t.exportMode = !1, i; + }, _setLevel(e) { + for (let n = 0; n < e.length; n++) { + e[n].parent == 0 && (e[n]._lvl = 1); + for (let i = n + 1; i < e.length; i++) e[n].id == e[i].parent && (e[i]._lvl = e[n]._lvl + 1); + } + }, _clearLevel(e) { + for (let n = 0; n < e.length; n++) delete e[n]._lvl; + }, _clearRecLinks(e) { + t.ext.export_api._setLevel(e.data); + const n = {}; + for (let r = 0; r < e.data.length; r++) n[e.data[r].id] = e.data[r]; + const i = {}; + for (let r = 0; r < e.links.length; r++) { + const s = e.links[r]; + t.isTaskExists(s.source) && t.isTaskExists(s.target) && n[s.source] && n[s.target] && (i[s.id] = s); + } + for (const r in i) t.ext.export_api._makeLinksSameLevel(i[r], n); + const a = {}; + for (const r in n) t.ext.export_api._clearCircDependencies(n[r], i, n, {}, a, null); + Object.keys(i) && t.ext.export_api._clearLinksSameLevel(i, n); + for (let r = 0; r < e.links.length; r++) i[e.links[r].id] || (e.links.splice(r, 1), r--); + t.ext.export_api._clearLevel(e.data); + }, _clearCircDependencies(e, n, i, a, r, s) { + const o = e.$_source; + if (!o) return; + a[e.id] && t.ext.export_api._onCircDependencyFind(s, n, a, r), a[e.id] = !0; + const l = {}; + for (let d = 0; d < o.length; d++) { + if (r[o[d]]) continue; + const c = n[o[d]], u = i[c._target]; + l[u.id] && t.ext.export_api._onCircDependencyFind(c, n, a, r), l[u.id] = !0, t.ext.export_api._clearCircDependencies(u, n, i, a, r, c); + } + a[e.id] = !1; + }, _onCircDependencyFind(e, n, i, a) { + e && (t.callEvent("onExportCircularDependency", [e.id, e]) && delete n[e.id], delete i[e._source], delete i[e._target], a[e.id] = !0); + }, _makeLinksSameLevel(e, n) { + let i, a; + const r = { target: n[e.target], source: n[e.source] }; + if (r.target._lvl != r.source._lvl) { + r.target._lvl < r.source._lvl ? (i = "source", a = r.target._lvl) : (i = "target", a = r.source._lvl); + do { + const l = n[r[i].parent]; + if (!l) break; + r[i] = l; + } while (r[i]._lvl < a); + let s = n[r.source.parent], o = n[r.target.parent]; + for (; s && o && s.id != o.id; ) r.source = s, r.target = o, s = n[r.source.parent], o = n[r.target.parent]; + } + e._target = r.target.id, e._source = r.source.id, r.target.$_target || (r.target.$_target = []), r.target.$_target.push(e.id), r.source.$_source || (r.source.$_source = []), r.source.$_source.push(e.id); + }, _clearLinksSameLevel(e, n) { + for (const i in e) delete e[i]._target, delete e[i]._source; + for (const i in n) delete n[i].$_source, delete n[i].$_target; + }, _customProjectProperties(e, n) { + if (n && n.project) { + for (const i in n.project) t.config.$custom_data || (t.config.$custom_data = {}), t.config.$custom_data[i] = typeof n.project[i] == "function" ? n.project[i](t.config) : n.project[i]; + delete n.project; + } + }, _customTaskProperties(e, n) { + n && n.tasks && (e.data.forEach(function(i) { + for (const a in n.tasks) i.$custom_data || (i.$custom_data = {}), i.$custom_data[a] = typeof n.tasks[a] == "function" ? n.tasks[a](i, t.config) : n.tasks[a]; + }), delete n.tasks); + }, _exportConfig(e, n) { + const i = n.name || "gantt.xml"; + delete n.name, t.config.custom = n; + const a = t.ext.export_api._getWorktimeSettings(), r = t.getSubtaskDates(); + if (r.start_date && r.end_date) { + const l = t.templates.format_date || t.templates.xml_format; + t.config.start_end = { start_date: l(r.start_date), end_date: l(r.end_date) }; + } + const s = n.auto_scheduling !== void 0 && !!n.auto_scheduling, o = { callback: n.callback || null, config: t.config, data: e, manual: s, name: i, worktime: a }; + for (const l in n) o[l] = n[l]; + return o; + }, _sendImportAjaxMSP(e) { + const n = e.server || t.ext.export_api._apiUrl, i = e.store || 0, a = e.data, r = e.callback, s = { durationUnit: e.durationUnit || void 0, projectProperties: e.projectProperties || void 0, taskProperties: e.taskProperties || void 0 }; + a.append("type", e.type || "msproject-parse"), a.append("data", JSON.stringify(s)), i && a.append("store", i); + const o = new XMLHttpRequest(); + o.onreadystatechange = function(l) { + o.readyState === 4 && o.status === 0 && r && r(null); + }, o.onload = function() { + let l = null; + if (!(o.status > 400)) try { + l = JSON.parse(o.responseText); + } catch { + } + r && r(l); + }, o.open("POST", n, !0), o.setRequestHeader("X-Requested-With", "XMLHttpRequest"), o.send(a); + } }, t.exportToPDF = t.ext.export_api.exportToPDF, t.exportToPNG = t.ext.export_api.exportToPNG, t.exportToICal = t.ext.export_api.exportToICal, t.exportToExcel = t.ext.export_api.exportToExcel, t.exportToJSON = t.ext.export_api.exportToJSON, t.importFromExcel = t.ext.export_api.importFromExcel, t.importFromMSProject = t.ext.export_api.importFromMSProject, t.exportToMSProject = t.ext.export_api.exportToMSProject, t.importFromPrimaveraP6 = t.ext.export_api.importFromPrimaveraP6, t.exportToPrimaveraP6 = t.ext.export_api.exportToPrimaveraP6, t.ext.export_api; +} }, Un = { KEY_CODES: { UP: 38, DOWN: 40, LEFT: 37, RIGHT: 39, SPACE: 32, ENTER: 13, DELETE: 46, ESC: 27, TAB: 9 } }; +class qn { + constructor(e) { + this.addExtension = (n, i) => { + this._extensions[n] = i; + }, this.getExtension = (n) => this._extensions[n], this._extensions = {}; + for (const n in e) this._extensions[n] = e[n]; + } +} +const Gn = () => ({ layout: { css: "gantt_container", rows: [{ cols: [{ view: "grid", scrollX: "scrollHor", scrollY: "scrollVer" }, { resizer: !0, width: 1 }, { view: "timeline", scrollX: "scrollHor", scrollY: "scrollVer" }, { view: "scrollbar", id: "scrollVer" }] }, { view: "scrollbar", id: "scrollHor", height: 20 }] }, links: { finish_to_start: "0", start_to_start: "1", finish_to_finish: "2", start_to_finish: "3" }, types: { task: "task", project: "project", milestone: "milestone" }, auto_types: !1, duration_unit: "day", work_time: !1, correct_work_time: !1, skip_off_time: !1, cascade_delete: !0, autosize: !1, autosize_min_width: 0, autoscroll: !0, autoscroll_speed: 30, deepcopy_on_parse: !1, show_links: !0, show_task_cells: !0, static_background: !1, static_background_cells: !0, branch_loading: !1, branch_loading_property: "$has_child", show_loading: !1, show_chart: !0, show_grid: !0, min_duration: 36e5, date_format: "%d-%m-%Y %H:%i", xml_date: void 0, start_on_monday: !0, server_utc: !1, show_progress: !0, fit_tasks: !1, select_task: !0, scroll_on_click: !0, smart_rendering: !0, preserve_scroll: !0, readonly: !1, container_resize_timeout: 20, deadlines: !0, date_grid: "%Y-%m-%d", drag_links: !0, drag_progress: !0, drag_resize: !0, drag_project: !1, drag_move: !0, drag_mode: { resize: "resize", progress: "progress", move: "move", ignore: "ignore" }, round_dnd_dates: !0, link_wrapper_width: 20, link_arrow_size: 12, root_id: 0, autofit: !1, columns: [{ name: "text", tree: !0, width: "*", resize: !0 }, { name: "start_date", align: "center", resize: !0 }, { name: "duration", align: "center" }, { name: "add", width: 44 }], scale_offset_minimal: !0, inherit_scale_class: !1, scales: [{ unit: "day", step: 1, date: "%d %M" }], time_step: 60, duration_step: 1, task_date: "%d %F %Y", time_picker: "%H:%i", task_attribute: "data-task-id", link_attribute: "data-link-id", layer_attribute: "data-layer", buttons_left: ["gantt_save_btn", "gantt_cancel_btn"], _migrate_buttons: { dhx_save_btn: "gantt_save_btn", dhx_cancel_btn: "gantt_cancel_btn", dhx_delete_btn: "gantt_delete_btn" }, buttons_right: ["gantt_delete_btn"], lightbox: { sections: [{ name: "description", height: 70, map_to: "text", type: "textarea", focus: !0 }, { name: "time", type: "duration", map_to: "auto" }], project_sections: [{ name: "description", height: 70, map_to: "text", type: "textarea", focus: !0 }, { name: "type", type: "typeselect", map_to: "type" }, { name: "time", type: "duration", readonly: !0, map_to: "auto" }], milestone_sections: [{ name: "description", height: 70, map_to: "text", type: "textarea", focus: !0 }, { name: "type", type: "typeselect", map_to: "type" }, { name: "time", type: "duration", single_date: !0, map_to: "auto" }] }, drag_lightbox: !0, sort: !1, details_on_create: !0, details_on_dblclick: !0, initial_scroll: !0, task_scroll_offset: 100, order_branch: !1, order_branch_free: !1, task_height: void 0, bar_height: "full", bar_height_padding: 9, min_column_width: 70, min_grid_column_width: 70, grid_resizer_column_attribute: "data-column-index", keep_grid_width: !1, grid_resize: !1, grid_elastic_columns: !1, show_tasks_outside_timescale: !1, show_unscheduled: !0, resize_rows: !1, task_grid_row_resizer_attribute: "data-row-index", min_task_grid_row_height: 30, row_height: 36, readonly_property: "readonly", editable_property: "editable", calendar_property: "calendar_id", resource_calendars: {}, dynamic_resource_calendars: !1, inherit_calendar: !1, type_renderers: {}, open_tree_initially: !1, optimize_render: !0, prevent_default_scroll: !1, show_errors: !0, wai_aria_attributes: !0, smart_scales: !0, rtl: !1, placeholder_task: !1, horizontal_scroll_key: "shiftKey", drag_timeline: { useKey: void 0, ignore: ".gantt_task_line, .gantt_task_link", render: !1 }, drag_multiple: !0, csp: "auto" }); +var nt = typeof window < "u"; +const pt = { isIE: nt && (navigator.userAgent.indexOf("MSIE") >= 0 || navigator.userAgent.indexOf("Trident") >= 0), isIE6: nt && !XMLHttpRequest && navigator.userAgent.indexOf("MSIE") >= 0, isIE7: nt && navigator.userAgent.indexOf("MSIE 7.0") >= 0 && navigator.userAgent.indexOf("Trident") < 0, isIE8: nt && navigator.userAgent.indexOf("MSIE 8.0") >= 0 && navigator.userAgent.indexOf("Trident") >= 0, isOpera: nt && navigator.userAgent.indexOf("Opera") >= 0, isChrome: nt && navigator.userAgent.indexOf("Chrome") >= 0, isKHTML: nt && (navigator.userAgent.indexOf("Safari") >= 0 || navigator.userAgent.indexOf("Konqueror") >= 0), isFF: nt && navigator.userAgent.indexOf("Firefox") >= 0, isIPad: nt && navigator.userAgent.search(/iPad/gi) >= 0, isEdge: nt && navigator.userAgent.indexOf("Edge") != -1, isNode: !nt || typeof navigator > "u" || !1 }; +function Me(t) { + if (typeof t == "string" || typeof t == "number") return t; + let e = ""; + for (const n in t) { + let i = ""; + t.hasOwnProperty(n) && (i = typeof t[n] == "string" ? encodeURIComponent(t[n]) : typeof t[n] == "number" ? String(t[n]) : encodeURIComponent(JSON.stringify(t[n])), i = n + "=" + i, e.length && (i = "&" + i), e += i); + } + return e; +} +function bt(t, e) { + var n = { method: t }; + if (e.length === 0) throw new Error("Arguments list of query is wrong."); + if (e.length === 1) return typeof e[0] == "string" ? (n.url = e[0], n.async = !0) : (n.url = e[0].url, n.async = e[0].async || !0, n.callback = e[0].callback, n.headers = e[0].headers), e[0].data ? typeof e[0].data != "string" ? n.data = Me(e[0].data) : n.data = e[0].data : n.data = "", n; + switch (n.url = e[0], t) { + case "GET": + case "DELETE": + n.callback = e[1], n.headers = e[2]; + break; + case "POST": + case "PUT": + e[1] ? typeof e[1] != "string" ? n.data = Me(e[1]) : n.data = e[1] : n.data = "", n.callback = e[2], n.headers = e[3]; + } + return n; +} +const Ne = { date_to_str: (t, e, n) => { + t = t.replace(/%[a-zA-Z]/g, (a) => { + switch (a) { + case "%d": + return `"+to_fixed(date.get${e ? "UTC" : ""}Date())+"`; + case "%m": + return `"+to_fixed((date.get${e ? "UTC" : ""}Month()+1))+"`; + case "%j": + return `"+date.get${e ? "UTC" : ""}Date()+"`; + case "%n": + return `"+(date.get${e ? "UTC" : ""}Month()+1)+"`; + case "%y": + return `"+to_fixed(date.get${e ? "UTC" : ""}FullYear()%100)+"`; + case "%Y": + return `"+date.get${e ? "UTC" : ""}FullYear()+"`; + case "%D": + return `"+locale.date.day_short[date.get${e ? "UTC" : ""}Day()]+"`; + case "%l": + return `"+locale.date.day_full[date.get${e ? "UTC" : ""}Day()]+"`; + case "%M": + return `"+locale.date.month_short[date.get${e ? "UTC" : ""}Month()]+"`; + case "%F": + return `"+locale.date.month_full[date.get${e ? "UTC" : ""}Month()]+"`; + case "%h": + return `"+to_fixed((date.get${e ? "UTC" : ""}Hours()+11)%12+1)+"`; + case "%g": + return `"+((date.get${e ? "UTC" : ""}Hours()+11)%12+1)+"`; + case "%G": + return `"+date.get${e ? "UTC" : ""}Hours()+"`; + case "%H": + return `"+to_fixed(date.get${e ? "UTC" : ""}Hours())+"`; + case "%i": + return `"+to_fixed(date.get${e ? "UTC" : ""}Minutes())+"`; + case "%a": + return `"+(date.get${e ? "UTC" : ""}Hours()>11?"pm":"am")+"`; + case "%A": + return `"+(date.get${e ? "UTC" : ""}Hours()>11?"PM":"AM")+"`; + case "%s": + return `"+to_fixed(date.get${e ? "UTC" : ""}Seconds())+"`; + case "%W": + return '"+to_fixed(getISOWeek(date))+"'; + case "%w": + return '"+to_fixed(getWeek(date))+"'; + default: + return a; + } + }); + const i = new Function("date", "to_fixed", "locale", "getISOWeek", "getWeek", `return "${t}";`); + return (a) => i(a, n.date.to_fixed, n.locale, n.date.getISOWeek, n.date.getWeek); +}, str_to_date: (t, e, n) => { + let i = "var temp=date.match(/[a-zA-Z]+|[0-9]+/g);"; + const a = t.match(/%[a-zA-Z]/g); + for (let o = 0; o < a.length; o++) switch (a[o]) { + case "%j": + case "%d": + i += `set[2]=temp[${o}]||1;`; + break; + case "%n": + case "%m": + i += `set[1]=(temp[${o}]||1)-1;`; + break; + case "%y": + i += `set[0]=temp[${o}]*1+(temp[${o}]>50?1900:2000);`; + break; + case "%g": + case "%G": + case "%h": + case "%H": + i += `set[3]=temp[${o}]||0;`; + break; + case "%i": + i += `set[4]=temp[${o}]||0;`; + break; + case "%Y": + i += `set[0]=temp[${o}]||0;`; + break; + case "%a": + case "%A": + i += `set[3]=set[3]%12+((temp[${o}]||'').toLowerCase()=='am'?0:12);`; + break; + case "%s": + i += `set[5]=temp[${o}]||0;`; + break; + case "%M": + i += `set[1]=locale.date.month_short_hash[temp[${o}]]||0;`; + break; + case "%F": + i += `set[1]=locale.date.month_full_hash[temp[${o}]]||0;`; + } + let r = "set[0],set[1],set[2],set[3],set[4],set[5]"; + e && (r = ` Date.UTC(${r})`); + const s = new Function("date", "locale", `var set=[0,0,1,0,0,0]; ${i} return new Date(${r});`); + return (o) => s(o, n.locale); +} }, Le = { date_to_str: (t, e, n) => (i) => t.replace(/%[a-zA-Z]/g, (a) => { + switch (a) { + case "%d": + return e ? n.date.to_fixed(i.getUTCDate()) : n.date.to_fixed(i.getDate()); + case "%m": + return e ? n.date.to_fixed(i.getUTCMonth() + 1) : n.date.to_fixed(i.getMonth() + 1); + case "%j": + return e ? i.getUTCDate() : i.getDate(); + case "%n": + return e ? i.getUTCMonth() + 1 : i.getMonth() + 1; + case "%y": + return e ? n.date.to_fixed(i.getUTCFullYear() % 100) : n.date.to_fixed(i.getFullYear() % 100); + case "%Y": + return e ? i.getUTCFullYear() : i.getFullYear(); + case "%D": + return e ? n.locale.date.day_short[i.getUTCDay()] : n.locale.date.day_short[i.getDay()]; + case "%l": + return e ? n.locale.date.day_full[i.getUTCDay()] : n.locale.date.day_full[i.getDay()]; + case "%M": + return e ? n.locale.date.month_short[i.getUTCMonth()] : n.locale.date.month_short[i.getMonth()]; + case "%F": + return e ? n.locale.date.month_full[i.getUTCMonth()] : n.locale.date.month_full[i.getMonth()]; + case "%h": + return e ? n.date.to_fixed((i.getUTCHours() + 11) % 12 + 1) : n.date.to_fixed((i.getHours() + 11) % 12 + 1); + case "%g": + return e ? (i.getUTCHours() + 11) % 12 + 1 : (i.getHours() + 11) % 12 + 1; + case "%G": + return e ? i.getUTCHours() : i.getHours(); + case "%H": + return e ? n.date.to_fixed(i.getUTCHours()) : n.date.to_fixed(i.getHours()); + case "%i": + return e ? n.date.to_fixed(i.getUTCMinutes()) : n.date.to_fixed(i.getMinutes()); + case "%a": + return e ? i.getUTCHours() > 11 ? "pm" : "am" : i.getHours() > 11 ? "pm" : "am"; + case "%A": + return e ? i.getUTCHours() > 11 ? "PM" : "AM" : i.getHours() > 11 ? "PM" : "AM"; + case "%s": + return e ? n.date.to_fixed(i.getUTCSeconds()) : n.date.to_fixed(i.getSeconds()); + case "%W": + return e ? n.date.to_fixed(n.date.getUTCISOWeek(i)) : n.date.to_fixed(n.date.getISOWeek(i)); + default: + return a; + } +}), str_to_date: (t, e, n) => (i) => { + const a = [0, 0, 1, 0, 0, 0], r = i.match(/[a-zA-Z]+|[0-9]+/g), s = t.match(/%[a-zA-Z]/g); + for (let o = 0; o < s.length; o++) switch (s[o]) { + case "%j": + case "%d": + a[2] = r[o] || 1; + break; + case "%n": + case "%m": + a[1] = (r[o] || 1) - 1; + break; + case "%y": + a[0] = 1 * r[o] + (r[o] > 50 ? 1900 : 2e3); + break; + case "%g": + case "%G": + case "%h": + case "%H": + a[3] = r[o] || 0; + break; + case "%i": + a[4] = r[o] || 0; + break; + case "%Y": + a[0] = r[o] || 0; + break; + case "%a": + case "%A": + a[3] = a[3] % 12 + ((r[o] || "").toLowerCase() === "am" ? 0 : 12); + break; + case "%s": + a[5] = r[o] || 0; + break; + case "%M": + a[1] = n.locale.date.month_short_hash[r[o]] || 0; + break; + case "%F": + a[1] = n.locale.date.month_full_hash[r[o]] || 0; + } + return e ? new Date(Date.UTC(a[0], a[1], a[2], a[3], a[4], a[5])) : new Date(a[0], a[1], a[2], a[3], a[4], a[5]); +} }; +function Yn(t) { + var e = null; + function n() { + var a = !1; + return t.config.csp === "auto" ? (e === null && function() { + try { + new Function("canUseCsp = false;"); + } catch { + e = !0; + } + }(), a = e) : a = t.config.csp, a; + } + var i = { init: function() { + for (var a = t.locale, r = a.date.month_short, s = a.date.month_short_hash = {}, o = 0; o < r.length; o++) s[r[o]] = o; + for (r = a.date.month_full, s = a.date.month_full_hash = {}, o = 0; o < r.length; o++) s[r[o]] = o; + }, date_part: function(a) { + var r = new Date(a); + return a.setHours(0), this.hour_start(a), a.getHours() && (a.getDate() < r.getDate() || a.getMonth() < r.getMonth() || a.getFullYear() < r.getFullYear()) && a.setTime(a.getTime() + 36e5 * (24 - a.getHours())), a; + }, time_part: function(a) { + return (a.valueOf() / 1e3 - 60 * a.getTimezoneOffset()) % 86400; + }, week_start: function(a) { + var r = a.getDay(); + return t.config.start_on_monday && (r === 0 ? r = 6 : r--), this.date_part(this.add(a, -1 * r, "day")); + }, month_start: function(a) { + return a.setDate(1), this.date_part(a); + }, quarter_start: function(a) { + this.month_start(a); + var r, s = a.getMonth(); + return r = s >= 9 ? 9 : s >= 6 ? 6 : s >= 3 ? 3 : 0, a.setMonth(r), a; + }, year_start: function(a) { + return a.setMonth(0), this.month_start(a); + }, day_start: function(a) { + return this.date_part(a); + }, hour_start: function(a) { + return a.getMinutes() && a.setMinutes(0), this.minute_start(a), a; + }, minute_start: function(a) { + return a.getSeconds() && a.setSeconds(0), a.getMilliseconds() && a.setMilliseconds(0), a; + }, _add_days: function(a, r, s) { + a.setDate(a.getDate() + r); + var o = r >= 0, l = !s.getHours() && a.getHours(), d = a.getDate() <= s.getDate() || a.getMonth() < s.getMonth() || a.getFullYear() < s.getFullYear(); + return o && l && d && a.setTime(a.getTime() + 36e5 * (24 - a.getHours())), r > 1 && l && a.setHours(0), a; + }, add: function(a, r, s) { + var o = new Date(a.valueOf()); + switch (s) { + case "day": + o = this._add_days(o, r, a); + break; + case "week": + o = this._add_days(o, 7 * r, a); + break; + case "month": + o.setMonth(o.getMonth() + r); + break; + case "year": + o.setYear(o.getFullYear() + r); + break; + case "hour": + o.setTime(o.getTime() + 60 * r * 60 * 1e3); + break; + case "minute": + o.setTime(o.getTime() + 60 * r * 1e3); + break; + default: + return this["add_" + s](a, r, s); + } + return o; + }, add_quarter: function(a, r) { + return this.add(a, 3 * r, "month"); + }, to_fixed: function(a) { + return a < 10 ? "0" + a : a; + }, copy: function(a) { + return new Date(a.valueOf()); + }, date_to_str: function(a, r) { + var s = Ne; + return n() && (s = Le), s.date_to_str(a, r, t); + }, str_to_date: function(a, r) { + var s = Ne; + return n() && (s = Le), s.str_to_date(a, r, t); + }, getISOWeek: function(a) { + return t.date._getWeekNumber(a, !0); + }, _getWeekNumber: function(a, r) { + if (!a) return !1; + var s = a.getDay(); + r && s === 0 && (s = 7); + var o = new Date(a.valueOf()); + o.setDate(a.getDate() + (4 - s)); + var l = o.getFullYear(), d = Math.round((o.getTime() - new Date(l, 0, 1).getTime()) / 864e5); + return 1 + Math.floor(d / 7); + }, getWeek: function(a) { + return t.date._getWeekNumber(a, t.config.start_on_monday); + }, getUTCISOWeek: function(a) { + return t.date.getISOWeek(a); + }, convert_to_utc: function(a) { + return new Date(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate(), a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds()); + }, parseDate: function(a, r) { + return a && !a.getFullYear && (typeof r != "function" && (r = typeof r == "string" ? r === "parse_date" || r === "xml_date" ? t.defined(t.templates.xml_date) ? t.templates.xml_date : t.templates.parse_date : t.defined(t.templates[r]) ? t.templates[r] : t.date.str_to_date(r) : t.defined(t.templates.xml_date) ? t.templates.xml_date : t.templates.parse_date), a = a ? r(a) : null), a; + } }; + return i; +} +class Jn { + constructor(e) { + const { url: n, token: i } = e; + this._url = n, this._token = i, this._mode = 1, this._seed = 1, this._queue = [], this.data = {}, this.api = {}, this._events = {}; + } + headers() { + return { Accept: "application/json", "Content-Type": "application/json", "Remote-Token": this._token }; + } + fetch(e, n) { + const i = { credentials: "include", headers: this.headers() }; + return n && (i.method = "POST", i.body = n), fetch(e, i).then((a) => a.json()); + } + load(e) { + return e && (this._url = e), this.fetch(this._url).then((n) => this.parse(n)); + } + parse(e) { + const { key: n, websocket: i } = e; + n && (this._token = e.key); + for (const a in e.data) this.data[a] = e.data[a]; + for (const a in e.api) { + const r = this.api[a] = {}, s = e.api[a]; + for (const o in s) r[o] = this._wrapper(a + "." + o); + } + return i && this.connect(), this; + } + connect() { + const e = this._socket; + e && (this._socket = null, e.onclose = function() { + }, e.close()), this._mode = 2, this._socket = function(n, i, a, r) { + let s = i; + s[0] === "/" && (s = document.location.protocol + "//" + document.location.host + i), s = s.replace(/^http(s|):/, "ws$1:"); + const o = s.indexOf("?") != -1 ? "&" : "?"; + s = `${s}${o}token=${a}&ws=1`; + const l = new WebSocket(s); + return l.onclose = () => setTimeout(() => n.connect(), 2e3), l.onmessage = (d) => { + const c = JSON.parse(d.data); + switch (c.action) { + case "result": + n.result(c.body, []); + break; + case "event": + n.fire(c.body.name, c.body.value); + break; + case "start": + r(); + break; + default: + n.onError(c.data); + } + }, l; + }(this, this._url, this._token, () => (this._mode = 3, this._send(), this._resubscribe(), this)); + } + _wrapper(e) { + return (function() { + const n = [].slice.call(arguments); + let i = null; + const a = new Promise((r, s) => { + i = { data: { id: this._uid(), name: e, args: n }, status: 1, resolve: r, reject: s }, this._queue.push(i); + }); + return this.onCall(i, a), this._mode === 3 ? this._send(i) : setTimeout(() => this._send(), 1), a; + }).bind(this); + } + _uid() { + return (this._seed++).toString(); + } + _send(e) { + if (this._mode == 2) return void setTimeout(() => this._send(), 100); + const n = e ? [e] : this._queue.filter((a) => a.status === 1); + if (!n.length) return; + const i = n.map((a) => (a.status = 2, a.data)); + this._mode !== 3 ? this.fetch(this._url, JSON.stringify(i)).catch((a) => this.onError(a)).then((a) => this.result(a, i)) : this._socket.send(JSON.stringify({ action: "call", body: i })); + } + result(e, n) { + const i = {}; + if (e) for (let a = 0; a < e.length; a++) i[e[a].id] = e[a]; + else for (let a = 0; a < n.length; a++) i[n[a].id] = { id: n[a].id, error: "Network Error", data: null }; + for (let a = this._queue.length - 1; a >= 0; a--) { + const r = this._queue[a], s = i[r.data.id]; + s && (this.onResponse(r, s), s.error ? r.reject(s.error) : r.resolve(s.data), this._queue.splice(a, 1)); + } + } + on(e, n) { + const i = this._uid(); + let a = this._events[e]; + const r = !!a; + return r || (a = this._events[e] = []), a.push({ id: i, handler: n }), r || this._mode != 3 || this._socket.send(JSON.stringify({ action: "subscribe", name: e })), { name: e, id: i }; + } + _resubscribe() { + if (this._mode == 3) for (const e in this._events) this._socket.send(JSON.stringify({ action: "subscribe", name: e })); + } + detach(e) { + if (!e) { + if (this._mode == 3) for (const r in this._events) this._socket.send(JSON.stringify({ action: "unsubscribe", key: r })); + return void (this._events = {}); + } + const { id: n, name: i } = e, a = this._events[i]; + if (a) { + const r = a.filter((s) => s.id != n); + r.length ? this._events[i] = r : (delete this._events[i], this._mode == 3 && this._socket.send(JSON.stringify({ action: "unsubscribe", name: i }))); + } + } + fire(e, n) { + const i = this._events[e]; + if (i) for (let a = 0; a < i.length; a++) i[a].handler(n); + } + onError(e) { + return null; + } + onCall(e, n) { + } + onResponse(e, n) { + } +} +const Kn = function(t, e) { + const n = new Jn({ url: t, token: e }); + n.fetch = function(i, a) { + const r = { headers: this.headers() }; + return a && (r.method = "POST", r.body = a), fetch(i, r).then((s) => s.json()); + }, this._ready = n.load().then((i) => this._remote = i), this.ready = function() { + return this._ready; + }, this.on = function(i, a) { + this.ready().then((r) => { + if (typeof i == "string") r.on(i, a); + else for (const s in i) r.on(s, i[s]); + }); + }; +}; +function dn(t, e) { + if (!e) return !0; + if (t._on_timeout) return !1; + var n = Math.ceil(1e3 / e); + return n < 2 || (setTimeout(function() { + delete t._on_timeout; + }, n), t._on_timeout = !0), !0; +} +var Xn = function() { + var t = {}; + return { getState: function(e) { + if (t[e]) return t[e].method(); + var n = {}; + for (var i in t) t[i].internal || L(n, t[i].method(), !0); + return n; + }, registerProvider: function(e, n, i) { + t[e] = { method: n, internal: i }; + }, unregisterProvider: function(e) { + delete t[e]; + } }; +}; +const Zn = Promise; +var tt = { $create: function(t) { + return L(t || [], this); +}, $removeAt: function(t, e) { + t >= 0 && this.splice(t, e || 1); +}, $remove: function(t) { + this.$removeAt(this.$find(t)); +}, $insertAt: function(t, e) { + if (e || e === 0) { + var n = this.splice(e, this.length - e); + this[e] = t, this.push.apply(this, n); + } else this.push(t); +}, $find: function(t) { + for (var e = 0; e < this.length; e++) if (t == this[e]) return e; + return -1; +}, $each: function(t, e) { + for (var n = 0; n < this.length; n++) t.call(e || this, this[n]); +}, $map: function(t, e) { + for (var n = 0; n < this.length; n++) this[n] = t.call(e || this, this[n]); + return this; +}, $filter: function(t, e) { + for (var n = 0; n < this.length; n++) t.call(e || this, this[n]) || (this.splice(n, 1), n--); + return this; +} }; +function Lt(t, e, n, i) { + return (i = e ? e.config : i) && i.placeholder_task && n.exists(t) ? n.getItem(t).type === i.types.placeholder : !1; +} +var it = function(t) { + return this.pull = {}, this.$initItem = t.initItem, this.visibleOrder = tt.$create(), this.fullOrder = tt.$create(), this._skip_refresh = !1, this._filterRule = null, this._searchVisibleOrder = {}, this._indexRangeCache = {}, this._getItemsCache = null, this.$config = t, st(this), this._attachDataChange(function() { + return this._indexRangeCache = {}, this._getItemsCache = null, !0; + }), this; +}; +it.prototype = { _attachDataChange: function(t) { + this.attachEvent("onClearAll", t), this.attachEvent("onBeforeParse", t), this.attachEvent("onBeforeUpdate", t), this.attachEvent("onBeforeDelete", t), this.attachEvent("onBeforeAdd", t), this.attachEvent("onParse", t), this.attachEvent("onBeforeFilter", t); +}, _parseInner: function(t) { + for (var e = null, n = [], i = 0, a = t.length; i < a; i++) e = t[i], this.$initItem && (this.$config.copyOnParse() && (e = G(e)), e = this.$initItem(e)), this.callEvent("onItemLoading", [e]) && (this.pull.hasOwnProperty(e.id) || this.fullOrder.push(e.id), n.push(e), this.pull[e.id] = e); + return n; +}, parse: function(t) { + this.isSilent() || this.callEvent("onBeforeParse", [t]); + var e = this._parseInner(t); + this.isSilent() || (this.refresh(), this.callEvent("onParse", [e])); +}, getItem: function(t) { + return this.pull[t]; +}, _updateOrder: function(t) { + t.call(this.visibleOrder), t.call(this.fullOrder); +}, updateItem: function(t, e) { + if (W(e) || (e = this.getItem(t)), !this.isSilent() && this.callEvent("onBeforeUpdate", [e.id, e]) === !1) return !1; + L(this.pull[t], e, !0), this.isSilent() || (this.callEvent("onAfterUpdate", [e.id, e]), this.callEvent("onStoreUpdated", [e.id, e, "update"])); +}, _removeItemInner: function(t) { + this._updateOrder(function() { + this.$remove(t); + }), delete this.pull[t]; +}, removeItem: function(t) { + var e = this.getItem(t); + if (!this.isSilent() && this.callEvent("onBeforeDelete", [e.id, e]) === !1) return !1; + this.callEvent("onAfterDeleteConfirmed", [e.id, e]), this._removeItemInner(t), this.isSilent() && this.callEvent("onAfterSilentDelete", [e.id, e]), this.isSilent() || (this.filter(), this.callEvent("onAfterDelete", [e.id, e]), this.callEvent("onStoreUpdated", [e.id, e, "delete"])); +}, _addItemInner: function(t, e) { + if (this.exists(t.id)) this.silent(function() { + this.updateItem(t.id, t); + }); + else { + var n = this.visibleOrder, i = n.length; + (!W(e) || e < 0) && (e = i), e > i && (e = Math.min(n.length, e)); + } + this.pull[t.id] = t, this.isSilent() || this._updateOrder(function() { + this.$find(t.id) === -1 && this.$insertAt(t.id, e); + }), this.filter(); +}, isVisible: function(t) { + return this.visibleOrder.$find(t) > -1; +}, getVisibleItems: function() { + return this.getIndexRange(); +}, addItem: function(t, e) { + return W(t.id) || (t.id = rt()), this.$initItem && (t = this.$initItem(t)), !(!this.isSilent() && this.callEvent("onBeforeAdd", [t.id, t]) === !1) && (this._addItemInner(t, e), this.isSilent() || (this.callEvent("onAfterAdd", [t.id, t]), this.callEvent("onStoreUpdated", [t.id, t, "add"])), t.id); +}, _changeIdInner: function(t, e) { + this.pull[t] && (this.pull[e] = this.pull[t]); + var n = this._searchVisibleOrder[t]; + this.pull[e].id = e, this._updateOrder(function() { + this[this.$find(t)] = e; + }), this._searchVisibleOrder[e] = n, delete this._searchVisibleOrder[t], delete this.pull[t]; +}, changeId: function(t, e) { + this._changeIdInner(t, e), this.callEvent("onIdChange", [t, e]); +}, exists: function(t) { + return !!this.pull[t]; +}, _moveInner: function(t, e) { + var n = this.getIdByIndex(t); + this._updateOrder(function() { + this.$removeAt(t), this.$insertAt(n, Math.min(this.length, e)); + }); +}, move: function(t, e) { + var n = this.getIdByIndex(t), i = this.getItem(n); + this._moveInner(t, e), this.isSilent() || this.callEvent("onStoreUpdated", [i.id, i, "move"]); +}, clearAll: function() { + this.$destroyed || (this.silent(function() { + this.unselect(); + }), this.pull = {}, this.visibleOrder = tt.$create(), this.fullOrder = tt.$create(), this.isSilent() || (this.callEvent("onClearAll", []), this.refresh())); +}, silent: function(t, e) { + var n = !1; + this.isSilent() && (n = !0), this._skip_refresh = !0, t.call(e || this), n || (this._skip_refresh = !1); +}, isSilent: function() { + return !!this._skip_refresh; +}, arraysEqual: function(t, e) { + if (t.length !== e.length) return !1; + for (var n = 0; n < t.length; n++) if (t[n] !== e[n]) return !1; + return !0; +}, refresh: function(t, e) { + var n, i; + if (!this.isSilent() && (t && (n = this.getItem(t)), i = t ? [t, n, "paint"] : [null, null, null], this.callEvent("onBeforeStoreUpdate", i) !== !1)) { + var a = this._quick_refresh && !this._mark_recompute; + if (this._mark_recompute = !1, t) { + if (!e && !a) { + var r = this.visibleOrder; + this.filter(), this.arraysEqual(r, this.visibleOrder) || (t = void 0); + } + } else a || this.filter(); + i = t ? [t, n, "paint"] : [null, null, null], this.callEvent("onStoreUpdated", i); + } +}, count: function() { + return this.fullOrder.length; +}, countVisible: function() { + return this.visibleOrder.length; +}, sort: function(t) { +}, serialize: function() { +}, eachItem: function(t) { + for (var e = 0; e < this.fullOrder.length; e++) { + var n = this.getItem(this.fullOrder[e]); + t.call(this, n); + } +}, find: function(t) { + var e = []; + return this.eachItem(function(n) { + t(n) && e.push(n); + }), e; +}, filter: function(t) { + this.isSilent() || this.callEvent("onBeforeFilter", []), this.callEvent("onPreFilter", []); + var e = tt.$create(), n = []; + this.eachItem(function(a) { + this.callEvent("onFilterItem", [a.id, a]) && (Lt(a.id, null, this, this._ganttConfig) ? n.push(a.id) : e.push(a.id)); + }); + for (var i = 0; i < n.length; i++) e.push(n[i]); + for (this.visibleOrder = e, this._searchVisibleOrder = {}, i = 0; i < this.visibleOrder.length; i++) this._searchVisibleOrder[this.visibleOrder[i]] = i; + this.isSilent() || this.callEvent("onFilter", []); +}, getIndexRange: function(t, e) { + var n = Math.min(e || 1 / 0, this.countVisible() - 1), i = t || 0, a = i + "-" + n; + if (this._indexRangeCache[a]) return this._indexRangeCache[a].slice(); + for (var r = [], s = i; s <= n; s++) r.push(this.getItem(this.visibleOrder[s])); + return this._indexRangeCache[a] = r.slice(), r; +}, getItems: function() { + if (this._getItemsCache) return this._getItemsCache.slice(); + var t = []; + for (var e in this.pull) t.push(this.pull[e]); + return this._getItemsCache = t.slice(), t; +}, getIdByIndex: function(t) { + return this.visibleOrder[t]; +}, getIndexById: function(t) { + var e = this._searchVisibleOrder[t]; + return e === void 0 && (e = -1), e; +}, _getNullIfUndefined: function(t) { + return t === void 0 ? null : t; +}, getFirst: function() { + return this._getNullIfUndefined(this.visibleOrder[0]); +}, getLast: function() { + return this._getNullIfUndefined(this.visibleOrder[this.visibleOrder.length - 1]); +}, getNext: function(t) { + return this._getNullIfUndefined(this.visibleOrder[this.getIndexById(t) + 1]); +}, getPrev: function(t) { + return this._getNullIfUndefined(this.visibleOrder[this.getIndexById(t) - 1]); +}, destructor: function() { + this.callEvent("onDestroy", []), this.detachAllEvents(), this.$destroyed = !0, this.pull = null, this.$initItem = null, this.visibleOrder = null, this.fullOrder = null, this._skip_refresh = null, this._filterRule = null, this._searchVisibleOrder = null, this._indexRangeCache = {}; +} }; +var cn = function(t) { + var e; + it.apply(this, [t]), this._branches = {}, this.pull = {}, this.$initItem = function(o) { + var l = o; + t.initItem && (l = t.initItem(l)); + var d = this.getItem(o.id); + return d && d.parent != l.parent && this.move(l.id, l.$index || -1, l.parent || this._ganttConfig.root_id), l; + }, this.$parentProperty = t.parentProperty || "parent", typeof t.rootId != "function" ? this.$getRootId = (e = t.rootId || 0, function() { + return e; + }) : this.$getRootId = t.rootId, this.$openInitially = t.openInitially, this.visibleOrder = tt.$create(), this.fullOrder = tt.$create(), this._searchVisibleOrder = {}, this._indexRangeCache = {}, this._eachItemMainRangeCache = null, this._getItemsCache = null, this._skip_refresh = !1, this._ganttConfig = null, t.getConfig && (this._ganttConfig = t.getConfig()); + var n = {}, i = {}, a = {}, r = {}, s = !1; + return this._attachDataChange(function() { + return this._indexRangeCache = {}, this._eachItemMainRangeCache = null, this._getItemsCache = null, !0; + }), this.attachEvent("onPreFilter", function() { + this._indexRangeCache = {}, this._eachItemMainRangeCache = null, n = {}, i = {}, a = {}, r = {}, s = !1, this.eachItem(function(o) { + var l = this.getParent(o.id); + o.$open && a[l] !== !1 ? a[o.id] = !0 : a[o.id] = !1, this._isSplitItem(o) && (s = !0, n[o.id] = !0, i[o.id] = !0), s && i[l] && (i[o.id] = !0), a[l] || a[l] === void 0 ? r[o.id] = !0 : r[o.id] = !1; + }); + }), this.attachEvent("onFilterItem", function(o, l) { + var d = !1; + this._ganttConfig && (d = this._ganttConfig.open_split_tasks); + var c = r[l.id]; + return s && (c && i[l.id] && !n[l.id] && (c = !!d), i[l.id] && !n[l.id] && (l.$split_subtask = !0)), l.$expanded_branch = !!r[l.id], !!c; + }), this.attachEvent("onFilter", function() { + n = {}, i = {}, a = {}, r = {}; + }), this; +}; +function j(t) { + return pt.isNode || !t.$root; +} +cn.prototype = L({ _buildTree: function(t) { + for (var e = null, n = this.$getRootId(), i = 0, a = t.length; i < a; i++) e = t[i], this.setParent(e, at(this.getParent(e), n) || n); + for (i = 0, a = t.length; i < a; i++) e = t[i], this._add_branch(e), e.$level = this.calculateItemLevel(e), e.$local_index = this.getBranchIndex(e.id), W(e.$open) || (e.$open = W(e.open) ? e.open : this.$openInitially()); + this._updateOrder(); +}, _isSplitItem: function(t) { + return t.render == "split" && this.hasChild(t.id); +}, parse: function(t) { + this._skip_refresh || this.callEvent("onBeforeParse", [t]); + var e = this._parseInner(t); + this._buildTree(e), this.filter(), this._skip_refresh || this.callEvent("onParse", [e]); +}, _addItemInner: function(t, e) { + var n = this.getParent(t); + W(n) || (n = this.$getRootId(), this.setParent(t, n)); + var i = this.getIndexById(n) + Math.min(Math.max(e, 0), this.visibleOrder.length); + 1 * i !== i && (i = void 0), it.prototype._addItemInner.call(this, t, i), this.setParent(t, n), t.hasOwnProperty("$rendered_parent") && this._move_branch(t, t.$rendered_parent), this._add_branch(t, e); +}, _changeIdInner: function(t, e) { + var n = this.getChildren(t), i = this._searchVisibleOrder[t]; + it.prototype._changeIdInner.call(this, t, e); + var a = this.getParent(e); + this._replace_branch_child(a, t, e), this._branches[t] && (this._branches[e] = this._branches[t]); + for (var r = 0; r < n.length; r++) { + var s = this.getItem(n[r]); + s[this.$parentProperty] = e, s.$rendered_parent = e; + } + this._searchVisibleOrder[e] = i, delete this._branches[t]; +}, _traverseBranches: function(t, e) { + W(e) || (e = this.$getRootId()); + var n = this._branches[e]; + if (n) for (var i = 0; i < n.length; i++) { + var a = n[i]; + t.call(this, a), this._branches[a] && this._traverseBranches(t, a); + } +}, _updateOrder: function(t) { + this.fullOrder = tt.$create(), this._traverseBranches(function(e) { + this.fullOrder.push(e); + }), t && it.prototype._updateOrder.call(this, t); +}, _removeItemInner: function(t) { + var e = []; + this.eachItem(function(i) { + e.push(i); + }, t), e.push(this.getItem(t)); + for (var n = 0; n < e.length; n++) this._move_branch(e[n], this.getParent(e[n]), null), it.prototype._removeItemInner.call(this, e[n].id), this._move_branch(e[n], this.getParent(e[n]), null); +}, move: function(t, e, n) { + var i = arguments[3], a = (this._ganttConfig || {}).root_id || 0; + if (i = at(i, a)) { + if (i === t) return; + n = this.getParent(i), e = this.getBranchIndex(i); + } + if (t != n) { + W(n) || (n = this.$getRootId()); + var r = this.getItem(t), s = this.getParent(r.id), o = this.getChildren(n); + if (e == -1 && (e = o.length + 1), s == n && this.getBranchIndex(t) == e) return; + if (this.callEvent("onBeforeItemMove", [t, n, e]) === !1) return !1; + for (var l = [], d = 0; d < o.length; d++) Lt(o[d], null, this, this._ganttConfig) && (l.push(o[d]), o.splice(d, 1), d--); + this._replace_branch_child(s, t); + var c = (o = this.getChildren(n))[e]; + (c = at(c, a)) ? o = o.slice(0, e).concat([t]).concat(o.slice(e)) : o.push(t), l.length && (o = o.concat(l)), r.$rendered_parent !== s && s !== n && (r.$rendered_parent = s), this.setParent(r, n), this._branches[n] = o; + var u = this.calculateItemLevel(r) - r.$level; + r.$level += u, this.eachItem(function(h) { + h.$level += u; + }, r.id, this), this._moveInner(this.getIndexById(t), this.getIndexById(n) + e), this.callEvent("onAfterItemMove", [t, n, e]), this.refresh(); + } +}, getBranchIndex: function(t) { + var e = this.getChildren(this.getParent(t)); + let n = e.indexOf(t + ""); + return n == -1 && (n = e.indexOf(+t)), n; +}, hasChild: function(t) { + var e = this._branches[t]; + return e && e.length; +}, getChildren: function(t) { + var e = this._branches[t]; + return e || tt.$create(); +}, isChildOf: function(t, e) { + if (!this.exists(t)) return !1; + if (e === this.$getRootId()) return !0; + if (!this.hasChild(e)) return !1; + var n = this.getItem(t), i = this.getParent(t); + if (this.getItem(e).$level >= n.$level) return !1; + for (; n && this.exists(i); ) { + if ((n = this.getItem(i)) && n.id == e) return !0; + i = this.getParent(n); + } + return !1; +}, getSiblings: function(t) { + if (!this.exists(t)) return tt.$create(); + var e = this.getParent(t); + return this.getChildren(e); +}, getNextSibling: function(t) { + for (var e = this.getSiblings(t), n = 0, i = e.length; n < i; n++) if (e[n] == t) { + var a = e[n + 1]; + return a === 0 && n > 0 && (a = "0"), a || null; + } + return null; +}, getPrevSibling: function(t) { + for (var e = this.getSiblings(t), n = 0, i = e.length; n < i; n++) if (e[n] == t) { + var a = e[n - 1]; + return a === 0 && n > 0 && (a = "0"), a || null; + } + return null; +}, getParent: function(t) { + var e = null; + return (e = t.id !== void 0 ? t : this.getItem(t)) ? e[this.$parentProperty] : this.$getRootId(); +}, clearAll: function() { + this._branches = {}, it.prototype.clearAll.call(this); +}, calculateItemLevel: function(t) { + var e = 0; + return this.eachParent(function() { + e++; + }, t), e; +}, _setParentInner: function(t, e, n) { + n || (t.hasOwnProperty("$rendered_parent") ? this._move_branch(t, t.$rendered_parent, e) : this._move_branch(t, t[this.$parentProperty], e)); +}, setParent: function(t, e, n) { + this._setParentInner(t, e, n), t[this.$parentProperty] = e; +}, _eachItemCached: function(t, e) { + for (var n = 0, i = e.length; n < i; n++) t.call(this, e[n]); +}, _eachItemIterate: function(t, e, n) { + var i = this.getChildren(e); + for (i.length && (i = i.slice().reverse()); i.length; ) { + var a = i.pop(), r = this.getItem(a); + if (t.call(this, r), n && n.push(r), this.hasChild(r.id)) for (var s = this.getChildren(r.id), o = s.length - 1; o >= 0; o--) i.push(s[o]); + } +}, eachItem: function(t, e) { + var n = this.$getRootId(); + W(e) || (e = n); + var i = at(e, n) || n, a = !1, r = !1, s = null; + i === n && (this._eachItemMainRangeCache ? (a = !0, s = this._eachItemMainRangeCache) : (r = !0, s = this._eachItemMainRangeCache = [])), a ? this._eachItemCached(t, s) : this._eachItemIterate(t, i, r ? s : null); +}, eachParent: function(t, e) { + for (var n = {}, i = e, a = this.getParent(i); this.exists(a); ) { + if (n[a]) throw new Error("Invalid tasks tree. Cyclic reference has been detected on task " + a); + n[a] = !0, i = this.getItem(a), t.call(this, i), a = this.getParent(i); + } +}, _add_branch: function(t, e, n) { + var i = n === void 0 ? this.getParent(t) : n; + this.hasChild(i) || (this._branches[i] = tt.$create()); + var a = this.getChildren(i); + a.indexOf(t.id + "") > -1 || a.indexOf(+t.id) > -1 || (1 * e == e ? a.splice(e, 0, t.id) : a.push(t.id), t.$rendered_parent = i); +}, _move_branch: function(t, e, n) { + this._eachItemMainRangeCache = null, this._replace_branch_child(e, t.id), this.exists(n) || n == this.$getRootId() ? this._add_branch(t, void 0, n) : delete this._branches[t.id], t.$level = this.calculateItemLevel(t), this.eachItem(function(i) { + i.$level = this.calculateItemLevel(i); + }, t.id); +}, _replace_branch_child: function(t, e, n) { + var i = this.getChildren(t); + if (i && t !== void 0) { + var a = tt.$create(); + let r = i.indexOf(e + ""); + r != -1 || isNaN(+e) || (r = i.indexOf(+e)), r > -1 && (n ? i.splice(r, 1, n) : i.splice(r, 1)), a = i, this._branches[t] = a; + } +}, sort: function(t, e, n) { + this.exists(n) || (n = this.$getRootId()), t || (t = "order"); + var i = typeof t == "string" ? function(l, d) { + return l[t] == d[t] || Q(l[t]) && Q(d[t]) && l[t].valueOf() == d[t].valueOf() ? 0 : l[t] > d[t] ? 1 : -1; + } : t; + if (e) { + var a = i; + i = function(l, d) { + return a(d, l); + }; + } + var r = this.getChildren(n); + if (r) { + for (var s = [], o = r.length - 1; o >= 0; o--) s[o] = this.getItem(r[o]); + for (s.sort(i), o = 0; o < s.length; o++) r[o] = s[o].id, this.sort(t, e, r[o]); + } +}, filter: function(t) { + for (let e in this.pull) { + const n = this.pull[e].$rendered_parent, i = this.getParent(this.pull[e]); + n !== i && this._move_branch(this.pull[e], n, i); + } + return it.prototype.filter.apply(this, arguments); +}, open: function(t) { + this.exists(t) && (this.getItem(t).$open = !0, this._skipTaskRecalculation = !0, this.callEvent("onItemOpen", [t])); +}, close: function(t) { + this.exists(t) && (this.getItem(t).$open = !1, this._skipTaskRecalculation = !0, this.callEvent("onItemClose", [t])); +}, destructor: function() { + it.prototype.destructor.call(this), this._branches = null, this._indexRangeCache = {}, this._eachItemMainRangeCache = null; +} }, it.prototype); +const Qn = function(t, e) { + const n = e.getDatastore(t), i = function(o, l) { + const d = l.getLayers(), c = n.getItem(o); + if (c && n.isVisible(o)) for (let u = 0; u < d.length; u++) d[u].render_item(c); + }, a = function(o) { + const l = o.getLayers(); + for (let g = 0; g < l.length; g++) l[g].clear(); + let d = null; + const c = {}; + for (let g = 0; g < l.length; g++) { + const f = l[g]; + let y; + if (f.get_visible_range) { + var u = f.get_visible_range(n); + if (u.start !== void 0 && u.end !== void 0) { + var h = u.start + " - " + u.end; + c[h] ? y = c[h] : (y = n.getIndexRange(u.start, u.end), c[h] = y); + } else { + if (u.ids === void 0) throw new Error("Invalid range returned from 'getVisibleRange' of the layer"); + y = u.ids.map(function(v) { + return n.getItem(v); + }); + } + } else d || (d = n.getVisibleItems()), y = d; + f.prepare_data && f.prepare_data(y), l[g].render_items(y); + } + }, r = function(o) { + if (o.update_items) { + let d = []; + if (o.get_visible_range) { + var l = o.get_visible_range(n); + if (l.start !== void 0 && l.end !== void 0 && (d = n.getIndexRange(l.start, l.end)), l.ids !== void 0) { + let c = l.ids.map(function(u) { + return n.getItem(u); + }); + c.length > 0 && (c = c.filter((u) => u !== void 0), d = d.concat(c)); + } + if ((l.start == null || l.end == null) && l.ids == null) throw new Error("Invalid range returned from 'getVisibleRange' of the layer"); + } else d = n.getVisibleItems(); + o.prepare_data && o.prepare_data(d, o), o.update_items(d); + } + }; + function s(o) { + return !!o.$services.getService("state").getState("batchUpdate").batch_update; + } + n.attachEvent("onStoreUpdated", function(o, l, d) { + if (j(e)) return !0; + const c = e.$services.getService("layers").getDataRender(t); + c && (c.onUpdateRequest = function(u) { + r(u); + }); + }), n.attachEvent("onStoreUpdated", function(o, l, d) { + s(e) || (o && d != "move" && d != "delete" ? (n.callEvent("onBeforeRefreshItem", [l.id]), n.callEvent("onAfterRefreshItem", [l.id])) : (n.callEvent("onBeforeRefreshAll", []), n.callEvent("onAfterRefreshAll", []))); + }), n.attachEvent("onAfterRefreshAll", function() { + if (j(e)) return !0; + const o = e.$services.getService("layers").getDataRender(t); + o && !s(e) && a(o); + }), n.attachEvent("onAfterRefreshItem", function(o) { + if (j(e)) return !0; + const l = e.$services.getService("layers").getDataRender(t); + l && i(o, l); + }), n.attachEvent("onItemOpen", function() { + if (j(e)) return !0; + e.render(); + }), n.attachEvent("onItemClose", function() { + if (j(e)) return !0; + e.render(); + }), n.attachEvent("onIdChange", function(o, l) { + if (j(e)) return !0; + if (n.callEvent("onBeforeIdChange", [o, l]), !s(e) && !n.isSilent()) { + const d = e.$services.getService("layers").getDataRender(t); + d ? (function(c, u, h) { + for (let g = 0; g < c.length; g++) c[g].change_id(u, h); + }(d.getLayers(), o, l, n.getItem(l)), i(l, d)) : e.render(); + } + }); +}; +function Zt() { + for (var t = this.$services.getService("datastores"), e = [], n = 0; n < t.length; n++) { + var i = this.getDatastore(t[n]); + i.$destroyed || e.push(i); + } + return e; +} +const ti = { create: function() { + var t = L({}, { createDatastore: function(e) { + var n = (e.type || "").toLowerCase() == "treedatastore" ? cn : it; + if (e) { + var i = this; + e.openInitially = function() { + return i.config.open_tree_initially; + }, e.copyOnParse = function() { + return i.config.deepcopy_on_parse; + }; + } + var a = new n(e); + if (this.mixin(a, function(o) { + var l = null, d = o._removeItemInner; + function c(u) { + l = null, this.callEvent("onAfterUnselect", [u]); + } + return o._removeItemInner = function(u) { + return l == u && c.call(this, u), l && this.eachItem && this.eachItem(function(h) { + h.id == l && c.call(this, h.id); + }, u), d.apply(this, arguments); + }, o.attachEvent("onIdChange", function(u, h) { + o.getSelectedId() == u && o.silent(function() { + o.unselect(u), o.select(h); + }); + }), { select: function(u) { + if (u) { + if (l == u) return l; + if (!this._skip_refresh && !this.callEvent("onBeforeSelect", [u])) return !1; + this.unselect(), l = u, this._skip_refresh || (this.refresh(u), this.callEvent("onAfterSelect", [u])); + } + return l; + }, getSelectedId: function() { + return l; + }, isSelected: function(u) { + return u == l; + }, unselect: function(u) { + (u = u || l) && (l = null, this._skip_refresh || (this.refresh(u), c.call(this, u))); + } }; + }(a)), e.name) { + var r = "datastore:" + e.name; + a.attachEvent("onDestroy", (function() { + this.$services.dropService(r); + for (var o = this.$services.getService("datastores"), l = 0; l < o.length; l++) if (o[l] === e.name) { + o.splice(l, 1); + break; + } + }).bind(this)), this.$services.dropService(r), this.$services.setService(r, function() { + return a; + }); + var s = this.$services.getService("datastores"); + s ? s.indexOf(e.name) < 0 && s.push(e.name) : (s = [], this.$services.setService("datastores", function() { + return s; + }), s.push(e.name)), Qn(e.name, this); + } + return a; + }, getDatastore: function(e) { + return this.$services.getService("datastore:" + e); + }, _getDatastores: Zt, refreshData: function() { + var e; + j(this) || (e = this.getScrollState()), this.callEvent("onBeforeDataRender", []); + for (var n = Zt.call(this), i = 0; i < n.length; i++) n[i].refresh(); + this.config.preserve_scroll && !j(this) && (e.x || e.y) && this.scrollTo(e.x, e.y), this.callEvent("onDataRender", []); + }, isChildOf: function(e, n) { + return this.$data.tasksStore.isChildOf(e, n); + }, refreshTask: function(e, n) { + var i = this.getTask(e), a = this; + function r() { + if (n === void 0 || n) { + for (var o = 0; o < i.$source.length; o++) a.refreshLink(i.$source[o]); + for (o = 0; o < i.$target.length; o++) a.refreshLink(i.$target[o]); + } + } + if (i && this.isTaskVisible(e)) this.$data.tasksStore.refresh(e, !!this.getState("tasksDnd").drag_id || n === !1), r(); + else if (this.isTaskExists(e) && this.isTaskExists(this.getParent(e)) && !this._bulk_dnd) { + this.refreshTask(this.getParent(e)); + var s = !1; + this.eachParent(function(o) { + (s || this.isSplitTask(o)) && (s = !0); + }, e), s && r(); + } + }, refreshLink: function(e) { + this.$data.linksStore.refresh(e, !!this.getState("tasksDnd").drag_id); + }, silent: function(e) { + var n = this; + n.$data.tasksStore.silent(function() { + n.$data.linksStore.silent(function() { + e(); + }); + }); + }, clearAll: function() { + for (var e = Zt.call(this), n = 0; n < e.length; n++) e[n].silent(function() { + e[n].clearAll(); + }); + for (n = 0; n < e.length; n++) e[n].clearAll(); + this._update_flags(), this.userdata = {}, this.callEvent("onClear", []), this.render(); + }, _clear_data: function() { + this.$data.tasksStore.clearAll(), this.$data.linksStore.clearAll(), this._update_flags(), this.userdata = {}; + }, selectTask: function(e) { + var n = this.$data.tasksStore; + if (!this.config.select_task) return !1; + if (e = at(e, this.config.root_id)) { + let i = this.getSelectedId(); + n._skipResourceRepaint = !0, n.select(e), n._skipResourceRepaint = !1, i && n.pull[i].$split_subtask && i != e && this.refreshTask(i), n.pull[e].$split_subtask && i != e && this.refreshTask(e); + } + return n.getSelectedId(); + }, unselectTask: function(e) { + var n = this.$data.tasksStore; + n.unselect(e), e && n.pull[e].$split_subtask && this.refreshTask(e); + }, isSelectedTask: function(e) { + return this.$data.tasksStore.isSelected(e); + }, getSelectedId: function() { + return this.$data.tasksStore.getSelectedId(); + } }); + return L(t, { getTask: function(e) { + e = at(e, this.config.root_id), this.assert(e, "Invalid argument for gantt.getTask"); + var n = this.$data.tasksStore.getItem(e); + return this.assert(n, "Task not found id=" + e), n; + }, getTaskByTime: function(e, n) { + var i = this.$data.tasksStore.getItems(), a = []; + if (e || n) { + e = +e || -1 / 0, n = +n || 1 / 0; + for (var r = 0; r < i.length; r++) { + var s = i[r]; + +s.start_date < n && +s.end_date > e && a.push(s); + } + } else a = i; + return a; + }, isTaskExists: function(e) { + return !(!this.$data || !this.$data.tasksStore) && this.$data.tasksStore.exists(e); + }, updateTask: function(e, n) { + W(n) || (n = this.getTask(e)), this.$data.tasksStore.updateItem(e, n), this.isTaskExists(e) && this.refreshTask(e); + }, addTask: function(e, n, i) { + return W(e.id) || (e.id = rt()), this.isTaskExists(e.id) && this.getTask(e.id).$index != e.$index ? (e.start_date && typeof e.start_date == "string" && (e.start_date = this.date.parseDate(e.start_date, "parse_date")), e.end_date && typeof e.end_date == "string" && (e.end_date = this.date.parseDate(e.end_date, "parse_date")), this.$data.tasksStore.updateItem(e.id, e)) : (W(n) || (n = this.getParent(e) || 0), this.isTaskExists(n) || (n = this.config.root_id), this.setParent(e, n), this.$data.tasksStore.addItem(e, i, n)); + }, deleteTask: function(e) { + return e = at(e, this.config.root_id), this.$data.tasksStore.removeItem(e); + }, getTaskCount: function() { + return this.$data.tasksStore.count(); + }, getVisibleTaskCount: function() { + return this.$data.tasksStore.countVisible(); + }, getTaskIndex: function(e) { + return this.$data.tasksStore.getBranchIndex(e); + }, getGlobalTaskIndex: function(e) { + return e = at(e, this.config.root_id), this.assert(e, "Invalid argument"), this.$data.tasksStore.getIndexById(e); + }, eachTask: function(e, n, i) { + return this.$data.tasksStore.eachItem(R(e, i || this), n); + }, eachParent: function(e, n, i) { + return this.$data.tasksStore.eachParent(R(e, i || this), n); + }, changeTaskId: function(e, n) { + this.$data.tasksStore.changeId(e, n); + var i = this.$data.tasksStore.getItem(n), a = []; + i.$source && (a = a.concat(i.$source)), i.$target && (a = a.concat(i.$target)); + for (var r = 0; r < a.length; r++) { + var s = this.getLink(a[r]); + s.source == e && (s.source = n), s.target == e && (s.target = n); + } + }, calculateTaskLevel: function(e) { + return this.$data.tasksStore.calculateItemLevel(e); + }, getNext: function(e) { + return this.$data.tasksStore.getNext(e); + }, getPrev: function(e) { + return this.$data.tasksStore.getPrev(e); + }, getParent: function(e) { + return this.$data.tasksStore.getParent(e); + }, setParent: function(e, n, i) { + return this.$data.tasksStore.setParent(e, n, i); + }, getSiblings: function(e) { + return this.$data.tasksStore.getSiblings(e).slice(); + }, getNextSibling: function(e) { + return this.$data.tasksStore.getNextSibling(e); + }, getPrevSibling: function(e) { + return this.$data.tasksStore.getPrevSibling(e); + }, getTaskByIndex: function(e) { + var n = this.$data.tasksStore.getIdByIndex(e); + return this.isTaskExists(n) ? this.getTask(n) : null; + }, getChildren: function(e) { + return this.hasChild(e) ? this.$data.tasksStore.getChildren(e).slice() : []; + }, hasChild: function(e) { + return this.$data.tasksStore.hasChild(e); + }, open: function(e) { + this.$data.tasksStore.open(e); + }, close: function(e) { + this.$data.tasksStore.close(e); + }, moveTask: function(e, n, i) { + return i = at(i, this.config.root_id), this.$data.tasksStore.move.apply(this.$data.tasksStore, arguments); + }, sort: function(e, n, i, a) { + var r = !a; + this.$data.tasksStore.sort(e, n, i), this.callEvent("onAfterSort", [e, n, i]), r && this.render(); + } }), L(t, { getLinkCount: function() { + return this.$data.linksStore.count(); + }, getLink: function(e) { + return this.$data.linksStore.getItem(e); + }, getLinks: function() { + return this.$data.linksStore.getItems(); + }, isLinkExists: function(e) { + return this.$data.linksStore.exists(e); + }, addLink: function(e) { + const n = this.$data.linksStore.addItem(e); + return this.$data.linksStore.isSilent() && this.$data.linksStore.fullOrder.push(n), n; + }, updateLink: function(e, n) { + W(n) || (n = this.getLink(e)), this.$data.linksStore.updateItem(e, n); + }, deleteLink: function(e) { + return this.$data.linksStore.removeItem(e); + }, changeLinkId: function(e, n) { + return this.$data.linksStore.changeId(e, n); + } }), t; +} }; +function he(t) { + var e = t.date, n = t.$services; + return { getSum: function(i, a, r) { + r === void 0 && (r = i.length - 1), a === void 0 && (a = 0); + for (var s = 0, o = a; o <= r; o++) s += i[o]; + return s; + }, setSumWidth: function(i, a, r, s) { + var o = a.width; + s === void 0 && (s = o.length - 1), r === void 0 && (r = 0); + var l = s - r + 1; + if (!(r > o.length - 1 || l <= 0 || s > o.length - 1)) { + var d = i - this.getSum(o, r, s); + this.adjustSize(d, o, r, s), this.adjustSize(-d, o, s + 1), a.full_width = this.getSum(o); + } + }, splitSize: function(i, a) { + for (var r = [], s = 0; s < a; s++) r[s] = 0; + return this.adjustSize(i, r), r; + }, adjustSize: function(i, a, r, s) { + r || (r = 0), s === void 0 && (s = a.length - 1); + for (var o = s - r + 1, l = this.getSum(a, r, s), d = r; d <= s; d++) { + var c = Math.floor(i * (l ? a[d] / l : 1 / o)); + l -= a[d], i -= c, o--, a[d] += c; + } + a[a.length - 1] += i; + }, sortScales: function(i) { + function a(s, o) { + var l = new Date(1970, 0, 1); + return e.add(l, o, s) - l; + } + i.sort(function(s, o) { + return a(s.unit, s.step) < a(o.unit, o.step) ? 1 : a(s.unit, s.step) > a(o.unit, o.step) ? -1 : 0; + }); + for (var r = 0; r < i.length; r++) i[r].index = r; + }, _isLegacyMode: function(i) { + var a = i || t.config; + return a.scale_unit || a.date_scale || a.subscales; + }, _prepareScaleObject: function(i) { + var a = i.format; + return a || (a = i.template || i.date || "%d %M"), typeof a == "string" && (a = t.date.date_to_str(a)), { unit: i.unit || "day", step: i.step || 1, format: a, css: i.css }; + }, primaryScale: function(i) { + var a, r = n.getService("templateLoader"), s = this._isLegacyMode(i), o = i || t.config; + if (s) r.initTemplate("date_scale", void 0, void 0, o, t.config.templates), a = { unit: t.config.scale_unit, step: t.config.step, template: t.templates.date_scale, date: t.config.date_scale, css: t.templates.scale_cell_class }; + else { + var l = o.scales[0]; + a = { unit: l.unit, step: l.step, template: l.template, format: l.format, date: l.date, css: l.css || t.templates.scale_cell_class }; + } + return this._prepareScaleObject(a); + }, getSubScales: function(i) { + var a, r = this._isLegacyMode(i), s = i || t.config; + if (r) { + let o = "https://docs.dhtmlx.com/gantt/migrating.html#:~:text=%3D%20false%3B-,Time%20scale%20settings,-Configuration%20of%20time"; + t.env.isFF && (o = "https://docs.dhtmlx.com/gantt/migrating.html#6162"), console.warn(`You are using the obsolete scale configuration. +It will stop working in the future versions. +Please migrate the configuration to the newer version: +${o}`), a = s.subscales || []; + } else a = s.scales.slice(1); + return a.map((function(o) { + return this._prepareScaleObject(o); + }).bind(this)); + }, prepareConfigs: function(i, a, r, s, o, l, d) { + for (var c = this.splitSize(s, i.length), u = r, h = [], g = i.length - 1; g >= 0; g--) { + var f = g == i.length - 1, y = this.initScaleConfig(i[g], o, l); + f && this.processIgnores(y), this.initColSizes(y, a, u, c[g]), this.limitVisibleRange(y), f && (u = y.full_width), h.unshift(y); + } + for (g = 0; g < h.length - 1; g++) this.alineScaleColumns(h[h.length - 1], h[g]); + for (g = 0; g < h.length; g++) d && this.reverseScale(h[g]), this.setPosSettings(h[g]); + return h; + }, reverseScale: function(i) { + i.width = i.width.reverse(), i.trace_x = i.trace_x.reverse(); + var a = i.trace_indexes; + i.trace_indexes = {}, i.trace_index_transition = {}, i.rtl = !0; + for (var r = 0; r < i.trace_x.length; r++) i.trace_indexes[i.trace_x[r].valueOf()] = r, i.trace_index_transition[a[i.trace_x[r].valueOf()]] = r; + return i; + }, setPosSettings: function(i) { + for (var a = 0, r = i.trace_x.length; a < r; a++) i.left.push((i.width[a - 1] || 0) + (i.left[a - 1] || 0)); + }, _ignore_time_config: function(i, a) { + if (t.config.skip_off_time) { + for (var r = !0, s = i, o = 0; o < a.step; o++) o && (s = e.add(i, o, a.unit)), r = r && !this.isWorkTime(s, a.unit); + return r; + } + return !1; + }, processIgnores: function(i) { + i.ignore_x = {}, i.display_count = i.count; + }, initColSizes: function(i, a, r, s) { + var o = r; + i.height = s; + var l = i.display_count === void 0 ? i.count : i.display_count; + l || (l = 1), i.col_width = Math.floor(o / l), a && i.col_width < a && (i.col_width = a, o = i.col_width * l), i.width = []; + for (var d = i.ignore_x || {}, c = 0; c < i.trace_x.length; c++) if (d[i.trace_x[c].valueOf()] || i.display_count == i.count) i.width[c] = 0; + else { + var u = 1; + i.unit == "month" && (u = Math.round((e.add(i.trace_x[c], i.step, i.unit) - i.trace_x[c]) / 864e5)), i.width[c] = u; + } + this.adjustSize(o - this.getSum(i.width), i.width), i.full_width = this.getSum(i.width); + }, initScaleConfig: function(i, a, r) { + var s = L({ count: 0, col_width: 0, full_width: 0, height: 0, width: [], left: [], trace_x: [], trace_indexes: {}, min_date: new Date(a), max_date: new Date(r) }, i); + return this.eachColumn(i.unit, i.step, a, r, function(o) { + s.count++, s.trace_x.push(new Date(o)), s.trace_indexes[o.valueOf()] = s.trace_x.length - 1; + }), s.trace_x_ascending = s.trace_x.slice(), s; + }, iterateScales: function(i, a, r, s, o) { + for (var l = a.trace_x, d = i.trace_x, c = r || 0, u = s || d.length - 1, h = 0, g = 1; g < l.length; g++) { + var f = i.trace_indexes[+l[g]]; + f !== void 0 && f <= u && (o && o.apply(this, [h, g, c, f]), c = f, h = g); + } + }, alineScaleColumns: function(i, a, r, s) { + this.iterateScales(i, a, r, s, function(o, l, d, c) { + var u = this.getSum(i.width, d, c - 1); + this.getSum(a.width, o, l - 1) != u && this.setSumWidth(u, a, o, l - 1); + }); + }, eachColumn: function(i, a, r, s, o) { + var l = new Date(r), d = new Date(s); + e[i + "_start"] && (l = e[i + "_start"](l)); + var c = new Date(l); + for (+c >= +d && (d = e.add(c, a, i)); +c < +d; ) { + o.call(this, new Date(c)); + var u = c.getTimezoneOffset(); + c = e.add(c, a, i), c = t._correct_dst_change(c, u, a, i), e[i + "_start"] && (c = e[i + "_start"](c)); + } + }, limitVisibleRange: function(i) { + var a = i.trace_x, r = i.width.length - 1, s = 0; + if (+a[0] < +i.min_date && r != 0) { + var o = Math.floor(i.width[0] * ((a[1] - i.min_date) / (a[1] - a[0]))); + s += i.width[0] - o, i.width[0] = o, a[0] = new Date(i.min_date); + } + var l = a.length - 1, d = a[l], c = e.add(d, i.step, i.unit); + if (+c > +i.max_date && l > 0 && (o = i.width[l] - Math.floor(i.width[l] * ((c - i.max_date) / (c - d))), s += i.width[l] - o, i.width[l] = o), s) { + for (var u = this.getSum(i.width), h = 0, g = 0; g < i.width.length; g++) { + var f = Math.floor(s * (i.width[g] / u)); + i.width[g] += f, h += f; + } + this.adjustSize(s - h, i.width); + } + } }; +} +function ei(t) { + var e = function(c) { + var u = new he(c).primaryScale(), h = u.unit, g = u.step; + if (c.config.scale_offset_minimal) { + var f = new he(c), y = [f.primaryScale()].concat(f.getSubScales()); + f.sortScales(y), h = y[y.length - 1].unit, g = y[y.length - 1].step || 1; + } + return { unit: h, step: g }; + }(t), n = e.unit, i = e.step, a = function(c, u) { + var h = { start_date: null, end_date: null }; + if (u.config.start_date && u.config.end_date) { + h.start_date = u.date[c + "_start"](new Date(u.config.start_date)); + var g = new Date(u.config.end_date), f = u.date[c + "_start"](new Date(g)); + g = +g != +f ? u.date.add(f, 1, c) : f, h.end_date = g; + } + return h; + }(n, t); + if (!a.start_date || !a.end_date) { + for (var r = !0, s = t.getTaskByTime(), o = 0; o < s.length; o++) + if (s[o].type !== t.config.types.project) { + r = !1; + break; + } + if (s.length && r) { + var l = s[0].start_date, d = t.date.add(l, 1, t.config.duration_unit); + a = { start_date: new Date(l), end_date: new Date(d) }; + } else a = t.getSubtaskDates(); + a.start_date && a.end_date || (a = { start_date: /* @__PURE__ */ new Date(), end_date: /* @__PURE__ */ new Date() }), t.eachTask(function(c) { + t.config.deadlines !== !1 && c.deadline && Qt(a, c.deadline, c.deadline), c.constraint_date && c.constraint_type && t.config.constraint_types && c.constraint_type !== t.config.constraint_types.ASAP && c.constraint_type !== t.config.constraint_types.ALAP && Qt(a, c.constraint_date, c.constraint_date), t.config.baselines !== !1 && c.baselines && c.baselines.forEach(function(u) { + Qt(a, u.start_date, u.end_date); + }); + }), a.start_date = t.date[n + "_start"](a.start_date), a.start_date = t.calculateEndDate({ start_date: t.date[n + "_start"](a.start_date), duration: -1, unit: n, step: i }), a.end_date = t.date[n + "_start"](a.end_date), a.end_date = t.calculateEndDate({ start_date: a.end_date, duration: 2, unit: n, step: i }); + } + t._min_date = a.start_date, t._max_date = a.end_date; +} +function Qt(t, e, n) { + e < t.start_date && (t.start_date = new Date(e)), n > t.end_date && (t.end_date = new Date(n)); +} +function _e(t) { + ei(t), function(e) { + if (e.config.fit_tasks) { + var n = +e._min_date, i = +e._max_date; + if (+e._min_date != n || +e._max_date != i) return e.render(), e.callEvent("onScaleAdjusted", []), !0; + } + }(t); +} +function Pe(t, e, n) { + for (var i = 0; i < e.length; i++) t.isLinkExists(e[i]) && (n[e[i]] = t.getLink(e[i])); +} +function Re(t, e, n) { + Pe(t, e.$source, n), Pe(t, e.$target, n); +} +const ge = { getSubtreeLinks: function(t, e) { + var n = {}; + return t.isTaskExists(e) && Re(t, t.getTask(e), n), t.eachTask(function(i) { + Re(t, i, n); + }, e), n; +}, getSubtreeTasks: function(t, e) { + var n = {}; + return t.eachTask(function(i) { + n[i.id] = i; + }, e), n; +} }; +class ni { + constructor(e, n) { + this.$gantt = e, this.$dp = n, this._dataProcessorHandlers = []; + } + attach() { + const e = this.$dp, n = this.$gantt, i = {}, a = (o) => this.clientSideDelete(o, e, n); + this._dataProcessorHandlers.push(n.attachEvent("onAfterTaskAdd", function(o, l) { + n.isTaskExists(o) && (e.setGanttMode("tasks"), e.setUpdated(o, !0, "inserted")); + })), this._dataProcessorHandlers.push(n.attachEvent("onAfterTaskUpdate", function(o, l) { + n.isTaskExists(o) && (e.setGanttMode("tasks"), e.setUpdated(o, !0), n._sendTaskOrder && n._sendTaskOrder(o, l)); + })), this._dataProcessorHandlers.push(n.attachEvent("onBeforeTaskDelete", function(o, l) { + return n.config.cascade_delete && (i[o] = { tasks: ge.getSubtreeTasks(n, o), links: ge.getSubtreeLinks(n, o) }), !e.deleteAfterConfirmation || (e.setGanttMode("tasks"), e.setUpdated(o, !0, "deleted"), !1); + })), this._dataProcessorHandlers.push(n.attachEvent("onAfterTaskDelete", function(o, l) { + e.setGanttMode("tasks"); + const d = !a(o), c = n.config.cascade_delete && i[o]; + if (d || c) { + if (c) { + const u = e.updateMode; + e.setUpdateMode("off"); + const h = i[o]; + for (const g in h.tasks) a(g) || (e.storeItem(h.tasks[g]), e.setUpdated(g, !0, "deleted")); + e.setGanttMode("links"); + for (const g in h.links) a(g) || (e.storeItem(h.links[g]), e.setUpdated(g, !0, "deleted")); + i[o] = null, u !== "off" && e.sendAllData(), e.setGanttMode("tasks"), e.setUpdateMode(u); + } + d && (e.storeItem(l), e.deleteAfterConfirmation || e.setUpdated(o, !0, "deleted")), e.updateMode === "off" || e._tSend || e.sendAllData(); + } + })), this._dataProcessorHandlers.push(n.attachEvent("onAfterLinkUpdate", function(o, l) { + n.isLinkExists(o) && (e.setGanttMode("links"), e.setUpdated(o, !0)); + })), this._dataProcessorHandlers.push(n.attachEvent("onAfterLinkAdd", function(o, l) { + n.isLinkExists(o) && (e.setGanttMode("links"), e.setUpdated(o, !0, "inserted")); + })), this._dataProcessorHandlers.push(n.attachEvent("onAfterLinkDelete", function(o, l) { + e.setGanttMode("links"), !a(o) && (e.storeItem(l), e.setUpdated(o, !0, "deleted")); + })), this._dataProcessorHandlers.push(n.attachEvent("onRowDragEnd", function(o, l) { + n._sendTaskOrder(o, n.getTask(o)); + })); + let r = null, s = null; + this._dataProcessorHandlers.push(n.attachEvent("onTaskIdChange", function(o, l) { + if (!e._waitMode) return; + const d = n.getChildren(l); + if (d.length) { + r = r || {}; + for (let u = 0; u < d.length; u++) { + const h = this.getTask(d[u]); + r[h.id] = h; + } + } + const c = function(u) { + let h = []; + return u.$source && (h = h.concat(u.$source)), u.$target && (h = h.concat(u.$target)), h; + }(this.getTask(l)); + if (c.length) { + s = s || {}; + for (let u = 0; u < c.length; u++) { + const h = this.getLink(c[u]); + s[h.id] = h; + } + } + })), e.attachEvent("onAfterUpdateFinish", function() { + (r || s) && (n.batchUpdate(function() { + for (const o in r) n.updateTask(r[o].id); + for (const o in s) n.updateLink(s[o].id); + r = null, s = null; + }), r ? n._dp.setGanttMode("tasks") : n._dp.setGanttMode("links")); + }), e.attachEvent("onBeforeDataSending", function() { + if (this._tMode === "CUSTOM") return !0; + let o = this._serverProcessor; + if (this._tMode === "REST-JSON" || this._tMode === "REST") { + const l = this._ganttMode; + o = o.substring(0, o.indexOf("?") > -1 ? o.indexOf("?") : o.length), this.serverProcessor = o + (o.slice(-1) === "/" ? "" : "/") + l; + } else { + const l = this._ganttMode + "s"; + this.serverProcessor = o + n.ajax.urlSeparator(o) + "gantt_mode=" + l; + } + return !0; + }), e.attachEvent("insertCallback", function(o, l, d, c) { + const u = o.data || n.xml._xmlNodeToJSON(o.firstChild), h = { add: n.addTask, isExist: n.isTaskExists }; + c === "links" && (h.add = n.addLink, h.isExist = n.isLinkExists), h.isExist.call(n, l) || (u.id = l, h.add.call(n, u)); + }), e.attachEvent("updateCallback", function(o, l) { + const d = o.data || n.xml._xmlNodeToJSON(o.firstChild); + if (!n.isTaskExists(l)) return; + const c = n.getTask(l); + for (const u in d) { + let h = d[u]; + switch (u) { + case "id": + continue; + case "start_date": + case "end_date": + h = n.defined(n.templates.xml_date) ? n.templates.xml_date(h) : n.templates.parse_date(h); + break; + case "duration": + c.end_date = n.calculateEndDate({ start_date: c.start_date, duration: h, task: c }); + } + c[u] = h; + } + n.updateTask(l), n.refreshData(); + }), e.attachEvent("deleteCallback", function(o, l, d, c) { + const u = { delete: n.deleteTask, isExist: n.isTaskExists }; + c === "links" ? (u.delete = n.deleteLink, u.isExist = n.isLinkExists) : c === "assignment" && (u.delete = function(h) { + n.$data.assignmentsStore.remove(h); + }, u.isExist = function(h) { + return n.$data.assignmentsStore.exists(h); + }), u.isExist.call(n, l) && u.delete.call(n, l); + }), this.handleResourceCRUD(e, n), this.handleResourceAssignmentCRUD(e, n), this.handleBaselineCRUD(e, n); + } + clientSideDelete(e, n, i) { + const a = n.updatedRows.slice(); + let r = !1; + i.getUserData(e, "!nativeeditor_status", n._ganttMode) === "true_deleted" && (r = !0, n.setUpdated(e, !1)); + for (let s = 0; s < a.length && !n._in_progress[e]; s++) a[s] === e && (i.getUserData(e, "!nativeeditor_status", n._ganttMode) === "inserted" && (r = !0), n.setUpdated(e, !1)); + return r; + } + handleResourceAssignmentCRUD(e, n) { + if (!n.config.resources || n.config.resources.dataprocessor_assignments !== !0) return; + const i = n.getDatastore(n.config.resource_assignment_store), a = {}, r = {}; + function s(o) { + const l = o.id; + i.exists(l) && (e.setGanttMode("assignment"), e.setUpdated(l, !0, "inserted")), delete r[l]; + } + n.attachEvent("onBeforeTaskAdd", function(o, l) { + return a[o] = !0, !0; + }), n.attachEvent("onTaskIdChange", function(o, l) { + delete a[o]; + }), i.attachEvent("onAfterAdd", (o, l) => { + a[l.task_id] ? function(d) { + r[d.id] = d, a[d.task_id] = !0; + }(l) : s(l); + }), i.attachEvent("onAfterUpdate", (o, l) => { + i.exists(o) && (r[o] ? s(l) : (e.setGanttMode("assignment"), e.setUpdated(o, !0))); + }), i.attachEvent("onAfterDelete", (o, l) => { + e.setGanttMode("assignment"), !this.clientSideDelete(o, e, n) && (e.storeItem(l), e.setUpdated(o, !0, "deleted")); + }); + } + handleResourceCRUD(e, n) { + if (!n.config.resources || n.config.resources.dataprocessor_resources !== !0) return; + const i = n.getDatastore(n.config.resource_store); + i.attachEvent("onAfterAdd", (a, r) => { + (function(s) { + const o = s.id; + i.exists(o) && (e.setGanttMode("resource"), e.setUpdated(o, !0, "inserted")); + })(r); + }), i.attachEvent("onAfterUpdate", (a, r) => { + i.exists(a) && (e.setGanttMode("resource"), e.setUpdated(a, !0)); + }), i.attachEvent("onAfterDelete", (a, r) => { + e.setGanttMode("resource"), !this.clientSideDelete(a, e, n) && (e.storeItem(r), e.setUpdated(a, !0, "deleted")); + }); + } + handleBaselineCRUD(e, n) { + if (!n.config.baselines || n.config.baselines.dataprocessor_baselines !== !0) return; + const i = n.getDatastore(n.config.baselines.datastore); + i.attachEvent("onAfterAdd", (a, r) => { + (function(s) { + const o = s.id; + i.exists(o) && (e.setGanttMode("baseline"), e.setUpdated(o, !0, "inserted")); + })(r); + }), i.attachEvent("onAfterUpdate", (a, r) => { + i.exists(a) && (e.setGanttMode("baseline"), e.setUpdated(a, !0)); + }), i.attachEvent("onAfterDelete", (a, r) => { + e.setGanttMode("baseline"), !this.clientSideDelete(a, e, n) && (e.storeItem(r), e.setUpdated(a, !0, "deleted")); + }); + } + detach() { + vt(this._dataProcessorHandlers, (e) => { + this.$gantt.detachEvent(e); + }), this._dataProcessorHandlers = []; + } +} +const Yt = class Yt { + constructor() { + this.clear = () => { + this._storage = {}; + }, this.storeItem = (e) => { + this._storage[e.id] = G(e); + }, this.getStoredItem = (e) => this._storage[e] || null, this._storage = {}; + } +}; +Yt.create = () => new Yt(); +let qt = Yt, He = class { + constructor(t) { + this.serverProcessor = t, this.action_param = "!nativeeditor_status", this.updatedRows = [], this.autoUpdate = !0, this.updateMode = "cell", this._headers = null, this._payload = null, this._postDelim = "_", this._routerParametersFormat = "parameters", this._waitMode = 0, this._in_progress = {}, this._storage = qt.create(), this._invalid = {}, this.messages = [], this.styles = { updated: "font-weight:bold;", inserted: "font-weight:bold;", deleted: "text-decoration : line-through;", invalid: "background-color:FFE0E0;", invalid_cell: "border-bottom:2px solid red;", error: "color:red;", clear: "font-weight:normal;text-decoration:none;" }, this.enableUTFencoding(!0), st(this); + } + setTransactionMode(t, e) { + typeof t == "object" ? (this._tMode = t.mode || this._tMode, W(t.headers) && (this._headers = t.headers), W(t.payload) && (this._payload = t.payload), this._tSend = !!e) : (this._tMode = t, this._tSend = e), this._tMode === "REST" && (this._tSend = !1), this._tMode === "JSON" || this._tMode === "REST-JSON" ? (this._tSend = !1, this._serializeAsJson = !0, this._headers = this._headers || {}, this._headers["Content-Type"] = "application/json") : this._headers && !this._headers["Content-Type"] && (this._headers["Content-Type"] = "application/x-www-form-urlencoded"), this._tMode === "CUSTOM" && (this._tSend = !1, this._router = t.router); + } + escape(t) { + return this._utf ? encodeURIComponent(t) : escape(t); + } + enableUTFencoding(t) { + this._utf = !!t; + } + getSyncState() { + return !this.updatedRows.length; + } + setUpdateMode(t, e) { + this.autoUpdate = t === "cell", this.updateMode = t, this.dnd = e; + } + ignore(t, e) { + this._silent_mode = !0, t.call(e || ot), this._silent_mode = !1; + } + setUpdated(t, e, n) { + if (this._silent_mode) return; + const i = this.findRow(t); + n = n || "updated"; + const a = this.$gantt.getUserData(t, this.action_param, this._ganttMode); + a && n === "updated" && (n = a), e ? (this.set_invalid(t, !1), this.updatedRows[i] = t, this.$gantt.setUserData(t, this.action_param, n, this._ganttMode), this._in_progress[t] && (this._in_progress[t] = "wait")) : this.is_invalid(t) || (this.updatedRows.splice(i, 1), this.$gantt.setUserData(t, this.action_param, "", this._ganttMode)), this.markRow(t, e, n), e && this.autoUpdate && this.sendData(t); + } + markRow(t, e, n) { + let i = ""; + const a = this.is_invalid(t); + if (a && (i = this.styles[a], e = !0), this.callEvent("onRowMark", [t, e, n, a]) && (i = this.styles[e ? n : "clear"] + " " + i, this.$gantt[this._methods[0]](t, i), a && a.details)) { + i += this.styles[a + "_cell"]; + for (let r = 0; r < a.details.length; r++) a.details[r] && this.$gantt[this._methods[1]](t, r, i); + } + } + getActionByState(t) { + return t === "inserted" ? "create" : t === "updated" ? "update" : t === "deleted" ? "delete" : "update"; + } + getState(t) { + return this.$gantt.getUserData(t, this.action_param, this._ganttMode); + } + is_invalid(t) { + return this._invalid[t]; + } + set_invalid(t, e, n) { + n && (e = { value: e, details: n, toString: function() { + return this.value.toString(); + } }), this._invalid[t] = e; + } + checkBeforeUpdate(t) { + return !0; + } + sendData(t) { + if (this.$gantt.editStop && this.$gantt.editStop(), t === void 0 || this._tSend) { + const e = []; + if (this.modes && ["task", "link", "assignment", "baseline"].forEach((n) => { + this.modes[n] && this.modes[n].updatedRows.length && e.push(n); + }), e.length) { + for (let n = 0; n < e.length; n++) this.setGanttMode(e[n]), this.sendAllData(); + return; + } + return this.sendAllData(); + } + return !this._in_progress[t] && (this.messages = [], !(!this.checkBeforeUpdate(t) && this.callEvent("onValidationError", [t, this.messages])) && void this._beforeSendData(this._getRowData(t), t)); + } + serialize(t, e) { + if (this._serializeAsJson) return this._serializeAsJSON(t); + if (typeof t == "string") return t; + if (e !== void 0) return this.serialize_one(t, ""); + { + const n = [], i = []; + for (const a in t) t.hasOwnProperty(a) && (n.push(this.serialize_one(t[a], a + this._postDelim)), i.push(a)); + return n.push("ids=" + this.escape(i.join(","))), this.$gantt.security_key && n.push("dhx_security=" + this.$gantt.security_key), n.join("&"); + } + } + serialize_one(t, e) { + if (typeof t == "string") return t; + const n = []; + let i = ""; + for (const a in t) if (t.hasOwnProperty(a)) { + if ((a === "id" || a == this.action_param) && this._tMode === "REST") continue; + i = typeof t[a] == "string" || typeof t[a] == "number" ? String(t[a]) : JSON.stringify(t[a]), n.push(this.escape((e || "") + a) + "=" + this.escape(i)); + } + return n.join("&"); + } + sendAllData() { + if (!this.updatedRows.length) return; + this.messages = []; + let t = !0; + if (this._forEachUpdatedRow(function(e) { + t = t && this.checkBeforeUpdate(e); + }), !t && !this.callEvent("onValidationError", ["", this.messages])) return !1; + this._tSend ? this._sendData(this._getAllData()) : this._forEachUpdatedRow(function(e) { + if (!this._in_progress[e]) { + if (this.is_invalid(e)) return; + this._beforeSendData(this._getRowData(e), e); + } + }); + } + findRow(t) { + let e = 0; + for (e = 0; e < this.updatedRows.length && t != this.updatedRows[e]; e++) ; + return e; + } + defineAction(t, e) { + this._uActions || (this._uActions = {}), this._uActions[t] = e; + } + afterUpdateCallback(t, e, n, i, a) { + if (!this.$gantt) return; + this.setGanttMode(a); + const r = t, s = n !== "error" && n !== "invalid"; + if (s || this.set_invalid(t, n), this._uActions && this._uActions[n] && !this._uActions[n](i)) return delete this._in_progress[r]; + this._in_progress[r] !== "wait" && this.setUpdated(t, !1); + const o = t; + switch (n) { + case "inserted": + case "insert": + e != t && (this.setUpdated(t, !1), this.$gantt[this._methods[2]](t, e), t = e); + break; + case "delete": + case "deleted": + if (this.deleteAfterConfirmation && this._ganttMode === "task") { + if (this._ganttMode === "task" && this.$gantt.isTaskExists(t)) { + this.$gantt.setUserData(t, this.action_param, "true_deleted", this._ganttMode); + const l = this.$gantt.getTask(t); + this.$gantt.silent(() => { + this.$gantt.deleteTask(t); + }), this.$gantt.callEvent("onAfterTaskDelete", [t, l]), this.$gantt.render(), delete this._in_progress[r]; + } + return this.callEvent("onAfterUpdate", [t, n, e, i]); + } + return this.$gantt.setUserData(t, this.action_param, "true_deleted", this._ganttMode), this.$gantt[this._methods[3]](t), delete this._in_progress[r], this.callEvent("onAfterUpdate", [t, n, e, i]); + } + this._in_progress[r] !== "wait" ? (s && this.$gantt.setUserData(t, this.action_param, "", this._ganttMode), delete this._in_progress[r]) : (delete this._in_progress[r], this.setUpdated(e, !0, this.$gantt.getUserData(t, this.action_param, this._ganttMode))), this.callEvent("onAfterUpdate", [o, n, e, i]); + } + afterUpdate(t, e, n) { + let i; + i = arguments.length === 3 ? arguments[1] : arguments[4]; + let a = this.getGanttMode(); + const r = i.filePath || i.url; + a = this._tMode !== "REST" && this._tMode !== "REST-JSON" ? r.indexOf("gantt_mode=links") !== -1 ? "link" : r.indexOf("gantt_mode=assignments") !== -1 ? "assignment" : r.indexOf("gantt_mode=baselines") !== -1 ? "baseline" : "task" : r.indexOf("/link") >= 0 ? "link" : r.indexOf("/assignment") >= 0 ? "assignment" : r.indexOf("/baseline") >= 0 ? "baseline" : "task", this.setGanttMode(a); + const s = this.$gantt.ajax; + let o; + try { + o = JSON.parse(e.xmlDoc.responseText); + } catch { + e.xmlDoc.responseText.length || (o = {}); + } + const l = (u) => { + const h = o.action || this.getState(u) || "updated", g = o.sid || u[0], f = o.tid || u[0]; + t.afterUpdateCallback(g, f, h, o, a); + }; + if (o) return Array.isArray(n) && n.length > 1 ? n.forEach((u) => l(u)) : l(n), t.finalizeUpdate(), void this.setGanttMode(a); + const d = s.xmltop("data", e.xmlDoc); + if (!d) return this.cleanUpdate(n); + const c = s.xpath("//data/action", d); + if (!c.length) return this.cleanUpdate(n); + for (let u = 0; u < c.length; u++) { + const h = c[u], g = h.getAttribute("type"), f = h.getAttribute("sid"), y = h.getAttribute("tid"); + t.afterUpdateCallback(f, y, g, h, a); + } + t.finalizeUpdate(); + } + cleanUpdate(t) { + if (t) for (let e = 0; e < t.length; e++) delete this._in_progress[t[e]]; + } + finalizeUpdate() { + this._waitMode && this._waitMode--, this.callEvent("onAfterUpdateFinish", []), this.updatedRows.length || this.callEvent("onFullSync", []); + } + init(t) { + if (this._initialized) return; + this.$gantt = t, this.$gantt._dp_init && this.$gantt._dp_init(this), this._setDefaultTransactionMode(), this.styles = { updated: "gantt_updated", order: "gantt_updated", inserted: "gantt_inserted", deleted: "gantt_deleted", delete_confirmation: "gantt_deleted", invalid: "gantt_invalid", error: "gantt_error", clear: "" }, this._methods = ["_row_style", "setCellTextStyle", "_change_id", "_delete_task"], function(n, i) { + n.getUserData = function(a, r, s) { + return this.userdata || (this.userdata = {}), this.userdata[s] = this.userdata[s] || {}, this.userdata[s][a] && this.userdata[s][a][r] ? this.userdata[s][a][r] : ""; + }, n.setUserData = function(a, r, s, o) { + this.userdata || (this.userdata = {}), this.userdata[o] = this.userdata[o] || {}, this.userdata[o][a] = this.userdata[o][a] || {}, this.userdata[o][a][r] = s; + }, n._change_id = function(a, r) { + switch (this._dp._ganttMode) { + case "task": + this.changeTaskId(a, r); + break; + case "link": + this.changeLinkId(a, r); + break; + case "assignment": + this.$data.assignmentsStore.changeId(a, r); + break; + case "resource": + this.$data.resourcesStore.changeId(a, r); + break; + case "baseline": + this.$data.baselineStore.changeId(a, r); + break; + default: + throw new Error(`Invalid mode of the dataProcessor after database id is received: ${this._dp._ganttMode}, new id: ${r}`); + } + }, n._row_style = function(a, r) { + this._dp._ganttMode === "task" && n.isTaskExists(a) && (n.getTask(a).$dataprocessor_class = r, n.refreshTask(a)); + }, n._delete_task = function(a, r) { + }, n._sendTaskOrder = function(a, r) { + r.$drop_target && (this._dp.setGanttMode("task"), this.getTask(a).target = r.$drop_target, this._dp.setUpdated(a, !0, "order"), delete this.getTask(a).$drop_target); + }, n.setDp = function() { + this._dp = i; + }, n.setDp(); + }(this.$gantt, this); + const e = new ni(this.$gantt, this); + e.attach(), this.attachEvent("onDestroy", function() { + delete this.setGanttMode, delete this._getRowData, delete this.$gantt._dp, delete this.$gantt._change_id, delete this.$gantt._row_style, delete this.$gantt._delete_task, delete this.$gantt._sendTaskOrder, delete this.$gantt, e.detach(); + }), this.$gantt.callEvent("onDataProcessorReady", [this]), this._initialized = !0; + } + setOnAfterUpdate(t) { + this.attachEvent("onAfterUpdate", t); + } + setOnBeforeUpdateHandler(t) { + this.attachEvent("onBeforeDataSending", t); + } + setAutoUpdate(t, e) { + t = t || 2e3, this._user = e || (/* @__PURE__ */ new Date()).valueOf(), this._needUpdate = !1, this._updateBusy = !1, this.attachEvent("onAfterUpdate", this.afterAutoUpdate), this.attachEvent("onFullSync", this.fullSync), setInterval(() => { + this.loadUpdate(); + }, t); + } + afterAutoUpdate(t, e, n, i) { + return e !== "collision" || (this._needUpdate = !0, !1); + } + fullSync() { + return this._needUpdate && (this._needUpdate = !1, this.loadUpdate()), !0; + } + getUpdates(t, e) { + const n = this.$gantt.ajax; + if (this._updateBusy) return !1; + this._updateBusy = !0, n.get(t, e); + } + loadUpdate() { + const t = this.$gantt.ajax, e = this.$gantt.getUserData(0, "version", this._ganttMode); + let n = this.serverProcessor + t.urlSeparator(this.serverProcessor) + ["dhx_user=" + this._user, "dhx_version=" + e].join("&"); + n = n.replace("editing=true&", ""), this.getUpdates(n, (i) => { + const a = t.xpath("//userdata", i); + this.$gantt.setUserData(0, "version", this._getXmlNodeValue(a[0]), this._ganttMode); + const r = t.xpath("//update", i); + if (r.length) { + this._silent_mode = !0; + for (let s = 0; s < r.length; s++) { + const o = r[s].getAttribute("status"), l = r[s].getAttribute("id"), d = r[s].getAttribute("parent"); + switch (o) { + case "inserted": + this.callEvent("insertCallback", [r[s], l, d]); + break; + case "updated": + this.callEvent("updateCallback", [r[s], l, d]); + break; + case "deleted": + this.callEvent("deleteCallback", [r[s], l, d]); + } + } + this._silent_mode = !1; + } + this._updateBusy = !1; + }); + } + destructor() { + this.callEvent("onDestroy", []), this.detachAllEvents(), this.updatedRows = [], this._in_progress = {}, this._invalid = {}, this._storage.clear(), this._storage = null, this._headers = null, this._payload = null, delete this._initialized; + } + setGanttMode(t) { + t === "tasks" ? t = "task" : t === "links" && (t = "link"); + const e = this.modes || {}, n = this.getGanttMode(); + n && (e[n] = { _in_progress: this._in_progress, _invalid: this._invalid, _storage: this._storage, updatedRows: this.updatedRows }); + let i = e[t]; + i || (i = e[t] = { _in_progress: {}, _invalid: {}, _storage: qt.create(), updatedRows: [] }), this._in_progress = i._in_progress, this._invalid = i._invalid, this._storage = i._storage, this.updatedRows = i.updatedRows, this.modes = e, this._ganttMode = t; + } + getGanttMode() { + return this._ganttMode; + } + storeItem(t) { + this._storage.storeItem(t); + } + url(t) { + this.serverProcessor = this._serverProcessor = t; + } + _beforeSendData(t, e) { + if (!this.callEvent("onBeforeUpdate", [e, this.getState(e), t])) return !1; + this._sendData(t, e); + } + _serializeAsJSON(t) { + if (typeof t == "string") return t; + const e = G(t); + return this._tMode === "REST-JSON" && (delete e.id, delete e[this.action_param]), JSON.stringify(e); + } + _applyPayload(t) { + const e = this.$gantt.ajax; + if (this._payload) for (const n in this._payload) t = t + e.urlSeparator(t) + this.escape(n) + "=" + this.escape(this._payload[n]); + return t; + } + _cleanupArgumentsBeforeSend(t) { + let e; + if (t[this.action_param] === void 0) { + e = {}; + for (const n in t) e[n] = this._cleanupArgumentsBeforeSend(t[n]); + } else e = this._cleanupItemBeforeSend(t); + return e; + } + _cleanupItemBeforeSend(t) { + let e = null; + return t && (t[this.action_param] === "deleted" ? (e = {}, e.id = t.id, e[this.action_param] = t[this.action_param]) : e = t), e; + } + _sendData(t, e) { + if (!t) return; + if (!this.callEvent("onBeforeDataSending", e ? [e, this.getState(e), t] : [null, null, t])) return !1; + e && (this._in_progress[e] = (/* @__PURE__ */ new Date()).valueOf()); + const n = this.$gantt.ajax; + if (this._tMode === "CUSTOM") { + const l = this.getState(e), d = this.getActionByState(l), c = this.getGanttMode(), u = (g) => { + let f = l || "updated", y = e, v = e; + g && (f = g.action || l, y = g.sid || y, v = g.id || g.tid || v), this.afterUpdateCallback(y, v, f, g, c); + }; + let h; + if (this._router instanceof Function) if (this._routerParametersFormat === "object") { + const g = { entity: c, action: d, data: t, id: e }; + h = this._router(g); + } else h = this._router(c, d, t, e); + else if (this._router[c] instanceof Function) h = this._router[c](d, t, e); + else { + const g = "Incorrect configuration of gantt.createDataProcessor", f = ` +You need to either add missing properties to the dataProcessor router object or to use a router function. +See https://docs.dhtmlx.com/gantt/desktop__server_side.html#customrouting and https://docs.dhtmlx.com/gantt/api__gantt_createdataprocessor.html for details.`; + if (!this._router[c]) throw new Error(`${g}: router for the **${c}** entity is not defined. ${f}`); + switch (l) { + case "inserted": + if (!this._router[c].create) throw new Error(`${g}: **create** action for the **${c}** entity is not defined. ${f}`); + h = this._router[c].create(t); + break; + case "deleted": + if (!this._router[c].delete) throw new Error(`${g}: **delete** action for the **${c}** entity is not defined. ${f}`); + h = this._router[c].delete(e); + break; + default: + if (!this._router[c].update) throw new Error(`${g}: **update**" action for the **${c}** entity is not defined. ${f}`); + h = this._router[c].update(t, e); + } + } + if (h) { + if (!h.then && h.id === void 0 && h.tid === void 0 && h.action === void 0) throw new Error("Incorrect router return value. A Promise or a response object is expected"); + h.then ? h.then(u).catch((g) => { + g && g.action ? u(g) : u({ action: "error", value: g }); + }) : u(h); + } else u(null); + return; + } + let i; + i = { callback: (l) => { + const d = []; + if (e) d.push(e); + else if (t) for (const c in t) d.push(c); + return this.afterUpdate(this, l, d); + }, headers: this._headers }; + const a = "dhx_version=" + this.$gantt.getUserData(0, "version", this._ganttMode), r = this.serverProcessor + (this._user ? n.urlSeparator(this.serverProcessor) + ["dhx_user=" + this._user, a].join("&") : ""); + let s, o = this._applyPayload(r); + switch (this._tMode) { + case "GET": + s = this._cleanupArgumentsBeforeSend(t), i.url = o + n.urlSeparator(o) + this.serialize(s, e), i.method = "GET"; + break; + case "POST": + s = this._cleanupArgumentsBeforeSend(t), i.url = o, i.method = "POST", i.data = this.serialize(s, e); + break; + case "JSON": + s = {}; + const l = this._cleanupItemBeforeSend(t); + for (const d in l) d !== this.action_param && d !== "id" && d !== "gr_id" && (s[d] = l[d]); + i.url = o, i.method = "POST", i.data = JSON.stringify({ id: e, action: t[this.action_param], data: s }); + break; + case "REST": + case "REST-JSON": + switch (o = r.replace(/(&|\?)editing=true/, ""), s = "", this.getState(e)) { + case "inserted": + i.method = "POST", i.data = this.serialize(t, e); + break; + case "deleted": + i.method = "DELETE", o = o + (o.slice(-1) === "/" ? "" : "/") + e; + break; + default: + i.method = "PUT", i.data = this.serialize(t, e), o = o + (o.slice(-1) === "/" ? "" : "/") + e; + } + i.url = this._applyPayload(o); + } + return this._waitMode++, n.query(i); + } + _forEachUpdatedRow(t) { + const e = this.updatedRows.slice(); + for (let n = 0; n < e.length; n++) { + const i = e[n]; + this.$gantt.getUserData(i, this.action_param, this._ganttMode) && t.call(this, i); + } + } + _setDefaultTransactionMode() { + this.serverProcessor && (this.setTransactionMode("POST", !0), this.serverProcessor += (this.serverProcessor.indexOf("?") !== -1 ? "&" : "?") + "editing=true", this._serverProcessor = this.serverProcessor); + } + _getXmlNodeValue(t) { + return t.firstChild ? t.firstChild.nodeValue : ""; + } + _getAllData() { + const t = {}; + let e = !1; + return this._forEachUpdatedRow(function(n) { + if (this._in_progress[n] || this.is_invalid(n)) return; + const i = this._getRowData(n); + this.callEvent("onBeforeUpdate", [n, this.getState(n), i]) && (t[n] = i, e = !0, this._in_progress[n] = (/* @__PURE__ */ new Date()).valueOf()); + }), e ? t : null; + } + _prepareDate(t) { + return this.$gantt.defined(this.$gantt.templates.xml_format) ? this.$gantt.templates.xml_format(t) : this.$gantt.templates.format_date(t); + } + _prepareArray(t, e) { + return e.push(t), t.map((n) => Q(n) ? this._prepareDate(n) : Array.isArray(n) && !Ot(e, n) ? this._prepareArray(n, e) : n && typeof n == "object" && !Ot(e, n) ? this._prepareObject(n, e) : n); + } + _prepareObject(t, e) { + const n = {}; + e.push(t); + for (const i in t) { + if (i.substr(0, 1) === "$") continue; + const a = t[i]; + Q(a) ? n[i] = this._prepareDate(a) : a === null ? n[i] = "" : Array.isArray(a) && !Ot(e, a) ? n[i] = this._prepareArray(a, e) : a && typeof a == "object" && !Ot(e, a) ? n[i] = this._prepareObject(a, e) : n[i] = a; + } + return n; + } + _prepareDataItem(t) { + const e = this._prepareObject(t, []); + return e[this.action_param] = this.$gantt.getUserData(t.id, this.action_param, this._ganttMode), e; + } + getStoredItem(t) { + return this._storage.getStoredItem(t); + } + _getRowData(t) { + let e; + const n = this.$gantt; + return this.getGanttMode() === "task" ? n.isTaskExists(t) && (e = this.$gantt.getTask(t)) : this.getGanttMode() === "assignment" ? this.$gantt.$data.assignmentsStore.exists(t) && (e = this.$gantt.$data.assignmentsStore.getItem(t)) : this.getGanttMode() === "baseline" ? this.$gantt.$data.baselineStore.exists(t) && (e = this.$gantt.$data.baselineStore.getItem(t)) : n.isLinkExists(t) && (e = this.$gantt.getLink(t)), e || (e = this.getStoredItem(t)), e || (e = { id: t }), this._prepareDataItem(e); + } +}; +const Oe = { DEPRECATED_api: function(t) { + return new He(t); +}, createDataProcessor: function(t) { + let e, n, i; + t instanceof Function ? e = t : t.hasOwnProperty("router") ? e = t.router : t.hasOwnProperty("assignment") || t.hasOwnProperty("baseline") || t.hasOwnProperty("link") || t.hasOwnProperty("task") ? e = t : t.hasOwnProperty("headers") && (i = t.headers), n = e ? "CUSTOM" : t.mode || "REST-JSON"; + const a = new He(t.url); + return a.init(this), a.setTransactionMode({ mode: n, router: e, headers: i }, t.batchUpdate), t.deleteAfterConfirmation && (a.deleteAfterConfirmation = t.deleteAfterConfirmation), a; +} }; +function ii(t) { + var e = {}, n = !1; + function i(l, d) { + d = typeof d == "function" ? d : function() { + }, e[l] || (e[l] = this[l], this[l] = d); + } + function a(l) { + e[l] && (this[l] = e[l], e[l] = null); + } + function r(l) { + for (var d in l) i.call(this, d, l[d]); + } + function s() { + for (var l in e) a.call(this, l); + } + function o(l) { + try { + l(); + } catch (d) { + ot.console.error(d); + } + } + return t.$services.getService("state").registerProvider("batchUpdate", function() { + return { batch_update: n }; + }, !1), function(l, d) { + if (n) o(l); + else { + var c, u = this._dp && this._dp.updateMode != "off"; + u && (c = this._dp.updateMode, this._dp.setUpdateMode("off")); + var h = {}, g = { render: !0, refreshData: !0, refreshTask: !0, refreshLink: !0, resetProjectDates: function(y) { + h[y.id] = y; + } }; + for (var f in r.call(this, g), n = !0, this.callEvent("onBeforeBatchUpdate", []), o(l), this.callEvent("onAfterBatchUpdate", []), s.call(this), h) this.resetProjectDates(h[f]); + n = !1, d || this.render(), u && (this._dp.setUpdateMode(c), this._dp.setGanttMode("task"), this._dp.sendData(), this._dp.setGanttMode("link"), this._dp.sendData()); + } + }; +} +function ai(t) { + t.batchUpdate = ii(t); +} +var ri = function(t) { + return { _needRecalc: !0, reset: function() { + this._needRecalc = !0; + }, _isRecalcNeeded: function() { + return !this._isGroupSort() && this._needRecalc; + }, _isGroupSort: function() { + return !!t.getState().group_mode; + }, _getWBSCode: function(e) { + return e ? (this._isRecalcNeeded() && this._calcWBS(), e.$virtual ? "" : this._isGroupSort() ? e.$wbs || "" : (e.$wbs || (this.reset(), this._calcWBS()), e.$wbs)) : ""; + }, _setWBSCode: function(e, n) { + e.$wbs = n; + }, getWBSCode: function(e) { + return this._getWBSCode(e); + }, getByWBSCode: function(e) { + for (var n = e.split("."), i = t.config.root_id, a = 0; a < n.length; a++) { + var r = t.getChildren(i), s = 1 * n[a] - 1; + if (!t.isTaskExists(r[s])) return null; + i = r[s]; + } + return t.isTaskExists(i) ? t.getTask(i) : null; + }, _calcWBS: function() { + if (this._isRecalcNeeded()) { + var e = !0; + t.eachTask(function(n) { + if (e) return e = !1, void this._setWBSCode(n, "1"); + var i = t.getPrevSibling(n.id); + if (i !== null) { + var a = t.getTask(i).$wbs; + a && ((a = a.split("."))[a.length - 1]++, this._setWBSCode(n, a.join("."))); + } else { + var r = t.getParent(n.id); + this._setWBSCode(n, t.getTask(r).$wbs + ".1"); + } + }, t.config.root_id, this), this._needRecalc = !1; + } + } }; +}; +function si(t) { + var e = ri(t); + function n() { + return e.reset(), !0; + } + t.getWBSCode = function(i) { + return e.getWBSCode(i); + }, t.getTaskByWBSCode = function(i) { + return e.getByWBSCode(i); + }, t.attachEvent("onAfterTaskMove", n), t.attachEvent("onBeforeParse", n), t.attachEvent("onAfterTaskDelete", n), t.attachEvent("onAfterTaskAdd", n), t.attachEvent("onAfterSort", n); +} +function oi(t) { + var e = {}, n = !1; + t.$data.tasksStore.attachEvent("onStoreUpdated", function() { + e = {}, n = !1; + }), t.attachEvent("onBeforeGanttRender", function() { + e = {}; + }); + var i = String(Math.random()); + function a(l) { + return l === null ? i + String(l) : String(l); + } + function r(l, d, c) { + return Array.isArray(l) ? l.map(function(u) { + return a(u); + }).join("_") + `_${d}_${c}` : a(l) + `_${d}_${c}`; + } + function s(l, d, c) { + var u, h = r(d, l, JSON.stringify(c)), g = {}; + return vt(d, function(f) { + g[a(f)] = !0; + }), e[h] ? u = e[h] : (u = e[h] = [], t.eachTask(function(f) { + if (c) { + if (!c[t.getTaskType(f)]) return; + } else if (f.type == t.config.types.project) return; + l in f && vt(ue(f[l]) ? f[l] : [f[l]], function(y) { + var v = y && y.resource_id ? y.resource_id : y; + if (g[a(v)]) u.push(f); + else if (!n) { + var b = r(y, l); + e[b] || (e[b] = []), e[b].push(f); + } + }); + }), n = !0), u; + } + function o(l, d, c) { + var u = t.config.resource_property, h = []; + if (t.getDatastore("task").exists(d)) { + var g = t.getTask(d); + h = g[u] || []; + } + Array.isArray(h) || (h = [h]); + for (var f = 0; f < h.length; f++) h[f].resource_id == l && c.push({ task_id: g.id, resource_id: h[f].resource_id, value: h[f].value }); + } + return { getTaskBy: function(l, d, c) { + return typeof l == "function" ? (u = l, h = [], t.eachTask(function(g) { + u(g) && h.push(g); + }), h) : ue(d) ? s(l, d, c) : s(l, [d], c); + var u, h; + }, getResourceAssignments: function(l, d) { + var c = [], u = t.config.resource_property; + return d !== void 0 ? o(l, d, c) : t.getTaskBy(u, l).forEach(function(h) { + o(l, h.id, c); + }), c; + } }; +} +function li(t) { + var e = oi(t); + t.ext.resources = /* @__PURE__ */ function(a) { + const r = { renderEditableLabel: function(s, o, l, d, c) { + const u = a.config.readonly ? "" : "contenteditable"; + if (s < l.end_date && o > l.start_date) { + for (let h = 0; h < c.length; h++) { + const g = c[h]; + return "
" + g.value + "
"; + } + return "
-
"; + } + return ""; + }, renderSummaryLabel: function(s, o, l, d, c) { + let u = c.reduce(function(h, g) { + return h + Number(g.value); + }, 0); + return u % 1 && (u = Math.round(10 * u) / 10), u ? "
" + u + "
" : ""; + }, editableResourceCellTemplate: function(s, o, l, d, c) { + return l.$role === "task" ? r.renderEditableLabel(s, o, l, d, c) : r.renderSummaryLabel(s, o, l, d, c); + }, editableResourceCellClass: function(s, o, l, d, c) { + const u = []; + u.push("resource_marker"), l.$role === "task" ? u.push("task_cell") : u.push("resource_cell"); + const h = c.reduce(function(f, y) { + return f + Number(y.value); + }, 0); + let g = Number(l.capacity); + return isNaN(g) && (g = 8), h <= g ? u.push("workday_ok") : u.push("workday_over"), u.join(" "); + }, getSummaryResourceAssignments: function(s) { + let o; + const l = a.getDatastore(a.config.resource_store), d = l.getItem(s); + return d.$role === "task" ? o = a.getResourceAssignments(d.$resource_id, d.$task_id) : (o = a.getResourceAssignments(s), l.eachItem && l.eachItem(function(c) { + c.$role !== "task" && (o = o.concat(a.getResourceAssignments(c.id))); + }, s)), o; + }, initEditableDiagram: function() { + a.config.resource_render_empty_cells = !0, function() { + let s = null; + function o() { + return s && cancelAnimationFrame(s), s = requestAnimationFrame(function() { + a.$container && Array.prototype.slice.call(a.$container.querySelectorAll(".resourceTimeline_cell [data-assignment-cell]")).forEach(function(l) { + l.contentEditable = !0; + }); + }), !0; + } + a.attachEvent("onGanttReady", function() { + a.getDatastore(a.config.resource_assignment_store).attachEvent("onStoreUpdated", o), a.getDatastore(a.config.resource_store).attachEvent("onStoreUpdated", o); + }, { once: !0 }), a.attachEvent("onGanttLayoutReady", function() { + a.$layout.getCellsByType("viewCell").forEach(function(l) { + l.$config && l.$config.view === "resourceTimeline" && l.$content && l.$content.attachEvent("onScroll", o); + }); + }); + }(), a.attachEvent("onGanttReady", function() { + let s = !1; + a.event(a.$container, "keypress", function(o) { + var l = o.target.closest(".resourceTimeline_cell [data-assignment-cell]"); + l && (o.keyCode !== 13 && o.keyCode !== 27 || l.blur()); + }), a.event(a.$container, "focusout", function(o) { + if (!s) { + s = !0, setTimeout(function() { + s = !1; + }, 300); + var l = o.target.closest(".resourceTimeline_cell [data-assignment-cell]"); + if (l) { + var d = (l.innerText || "").trim(); + d == "-" && (d = "0"); + var c = Number(d), u = l.getAttribute("data-row-id"), h = l.getAttribute("data-assignment-id"), g = l.getAttribute("data-task"), f = l.getAttribute("data-resource-id"), y = a.templates.parse_date(l.getAttribute("data-start-date")), v = a.templates.parse_date(l.getAttribute("data-end-date")), b = a.getDatastore(a.config.resource_assignment_store); + if (isNaN(c)) a.getDatastore(a.config.resource_store).refresh(u); + else { + var _ = a.getTask(g); + if (a.plugins().undo && a.ext.undo.saveState(g, "task"), h) { + if (c === (p = b.getItem(h)).value) return; + if (p.start_date.valueOf() === y.valueOf() && p.end_date.valueOf() === v.valueOf()) p.value = c, c ? b.updateItem(p.id) : b.removeItem(p.id); + else { + if (p.end_date.valueOf() > v.valueOf()) { + var m = a.copy(p); + m.id = a.uid(), m.start_date = v, m.duration = a.calculateDuration({ start_date: m.start_date, end_date: m.end_date, task: _ }), m.delay = a.calculateDuration({ start_date: _.start_date, end_date: m.start_date, task: _ }), m.mode = p.mode || "default", m.duration !== 0 && b.addItem(m); + } + p.start_date.valueOf() < y.valueOf() ? (p.end_date = y, p.duration = a.calculateDuration({ start_date: p.start_date, end_date: p.end_date, task: _ }), p.mode = "fixedDuration", p.duration === 0 ? b.removeItem(p.id) : b.updateItem(p.id)) : b.removeItem(p.id), c && b.addItem({ task_id: p.task_id, resource_id: p.resource_id, value: c, start_date: y, end_date: v, duration: a.calculateDuration({ start_date: y, end_date: v, task: _ }), delay: a.calculateDuration({ start_date: _.start_date, end_date: y, task: _ }), mode: "fixedDuration" }); + } + a.updateTaskAssignments(_.id), a.updateTask(_.id); + } else if (c) { + var p = { task_id: g, resource_id: f, value: c, start_date: y, end_date: v, duration: a.calculateDuration({ start_date: y, end_date: v, task: _ }), delay: a.calculateDuration({ start_date: _.start_date, end_date: y, task: _ }), mode: "fixedDuration" }; + b.addItem(p), a.updateTaskAssignments(_.id), a.updateTask(_.id); + } + } + } + } + }); + }, { once: !0 }); + } }; + return r; + }(t), t.config.resources = { dataprocessor_assignments: !1, dataprocessor_resources: !1, editable_resource_diagram: !1, resource_store: { type: "treeDataStore", fetchTasks: !1, initItem: function(a) { + return a.parent = a.parent || t.config.root_id, a[t.config.resource_property] = a.parent, a.open = !0, a; + } }, lightbox_resources: function(a) { + const r = [], s = t.getDatastore(t.config.resource_store); + return a.forEach(function(o) { + if (!s.hasChild(o.id)) { + const l = t.copy(o); + l.key = o.id, l.label = o.text, r.push(l); + } + }), r; + } }, t.attachEvent("onBeforeGanttReady", function() { + if (t.getDatastore(t.config.resource_store)) return; + const a = t.config.resources ? t.config.resources.resource_store : void 0; + let r = a ? a.fetchTasks : void 0; + t.config.resources && t.config.resources.editable_resource_diagram && (r = !0); + let s = function(l) { + return l.parent = l.parent || t.config.root_id, l[t.config.resource_property] = l.parent, l.open = !0, l; + }; + a && a.initItem && (s = a.initItem); + const o = a && a.type ? a.type : "treeDatastore"; + t.$resourcesStore = t.createDatastore({ name: t.config.resource_store, type: o, fetchTasks: r !== void 0 && r, initItem: s }), t.$data.resourcesStore = t.$resourcesStore, t.$resourcesStore.attachEvent("onParse", function() { + let l = function(c) { + const u = []; + return c.forEach(function(h) { + if (!t.$resourcesStore.hasChild(h.id)) { + var g = t.copy(h); + g.key = h.id, g.label = h.text, u.push(g); + } + }), u; + }; + t.config.resources && t.config.resources.lightbox_resources && (l = t.config.resources.lightbox_resources); + const d = l(t.$resourcesStore.getItems()); + t.updateCollection("resourceOptions", d); + }); + }), t.getTaskBy = e.getTaskBy, t.getResourceAssignments = e.getResourceAssignments, t.config.resource_property = "owner_id", t.config.resource_store = "resource", t.config.resource_render_empty_cells = !1, t.templates.histogram_cell_class = function(a, r, s, o, l) { + }, t.templates.histogram_cell_label = function(a, r, s, o, l) { + return o.length + "/3"; + }, t.templates.histogram_cell_allocated = function(a, r, s, o, l) { + return o.length / 3; + }, t.templates.histogram_cell_capacity = function(a, r, s, o, l) { + return 0; + }; + const n = function(a, r, s, o, l) { + return o.length <= 1 ? "gantt_resource_marker_ok" : "gantt_resource_marker_overtime"; + }, i = function(a, r, s, o, l) { + return 8 * o.length; + }; + t.templates.resource_cell_value = i, t.templates.resource_cell_class = n, t.attachEvent("onBeforeGanttReady", function() { + t.config.resources && t.config.resources.editable_resource_diagram && (t.config.resource_render_empty_cells = !0, t.templates.resource_cell_value === i && (t.templates.resource_cell_value = t.ext.resources.editableResourceCellTemplate), t.templates.resource_cell_class === n && (t.templates.resource_cell_class = t.ext.resources.editableResourceCellClass), t.ext.resources.initEditableDiagram(t)); + }); +} +function di(t) { + var e = "$resourceAssignments"; + t.config.resource_assignment_store = "resourceAssignments", t.config.process_resource_assignments = !0; + var n = { auto: "auto", singleValue: "singleValue", valueArray: "valueArray", resourceValueArray: "resourceValueArray", assignmentsArray: "assignmentsArray" }, i = n.auto, a = { fixedDates: "fixedDates", fixedDuration: "fixedDuration", default: "default" }; + function r(f, y) { + f.start_date ? f.start_date = t.date.parseDate(f.start_date, "parse_date") : f.start_date = null, f.end_date ? f.end_date = t.date.parseDate(f.end_date, "parse_date") : f.end_date = null; + var v = Number(f.delay), b = !1; + if (isNaN(v) ? (f.delay = 0, b = !0) : f.delay = v, t.defined(f.value) || (f.value = null), !f.task_id || !f.resource_id) return !1; + if (f.mode = f.mode || a.default, f.mode === a.fixedDuration && (isNaN(Number(f.duration)) && (y = y || t.getTask(f.task_id), f.duration = t.calculateDuration({ start_date: f.start_date, end_date: f.end_date, id: y })), b && (y = y || t.getTask(f.task_id), f.delay = t.calculateDuration({ start_date: y.start_date, end_date: f.start_date, id: y }))), f.mode !== a.fixedDates && (y || t.isTaskExists(f.task_id))) { + var _ = o(f, y = y || t.getTask(f.task_id)); + f.start_date = _.start_date, f.end_date = _.end_date, f.duration = _.duration; + } + } + var s = t.createDatastore({ name: t.config.resource_assignment_store, initItem: function(f) { + return f.id || (f.id = t.uid()), r(f), f; + } }); + function o(f, y) { + if (f.mode === a.fixedDates) return { start_date: f.start_date, end_date: f.end_date, duration: f.duration }; + var v, b, _ = f.delay ? t.calculateEndDate({ start_date: y.start_date, duration: f.delay, task: y }) : new Date(y.start_date); + return f.mode === a.fixedDuration ? (v = t.calculateEndDate({ start_date: _, duration: f.duration, task: y }), b = f.duration) : (v = new Date(y.end_date), b = y.duration - f.delay), { start_date: _, end_date: v, duration: b }; + } + function l(f) { + const y = t.config.resource_property; + let v = f[y]; + const b = []; + let _ = i === n.auto; + if (t.defined(v) && v) { + Array.isArray(v) || (v = [v], _ && (i = n.singleValue, _ = !1)); + const m = {}; + v.forEach(function(p) { + p.resource_id || (p = { resource_id: p }, _ && (i = n.valueArray, _ = !1)), _ && (p.id && p.resource_id ? (i = n.assignmentsArray, _ = !1) : (i = n.resourceValueArray, _ = !1)); + let k, $ = a.default; + p.mode || (p.start_date && p.end_date || p.start_date && p.duration) && ($ = a.fixedDuration), k = p.id || !p.$id || m[p.$id] ? p.id && !m[p.id] ? p.id : t.uid() : p.$id, m[k] = !0; + const w = { id: k, start_date: p.start_date, duration: p.duration, end_date: p.end_date, delay: p.delay, task_id: f.id, resource_id: p.resource_id, value: p.value, mode: p.mode || $ }; + Object.keys(p).forEach((x) => { + x != "$id" && (w[x] = p[x]); + }), w.start_date && w.start_date.getMonth && w.end_date && w.end_date.getMonth && typeof w.duration == "number" || r(w, f), b.push(w); + }); + } + return b; + } + function d(f) { + if (t.isTaskExists(f)) { + var y = t.getTask(f); + c(y, t.getTaskAssignments(y.id)); + } + } + function c(f, y) { + y.sort(function(v, b) { + return v.start_date && b.start_date && v.start_date.valueOf() != b.start_date.valueOf() ? v.start_date - b.start_date : 0; + }), i == n.assignmentsArray ? f[t.config.resource_property] = y : i == n.resourceValueArray && (f[t.config.resource_property] = y.map(function(v) { + return { $id: v.id, start_date: v.start_date, duration: v.duration, end_date: v.end_date, delay: v.delay, resource_id: v.resource_id, value: v.value, mode: v.mode }; + })), f[e] = y; + } + function u(f) { + var y = l(f); + return y.forEach(function(v) { + v.id = v.id || t.uid(); + }), y; + } + function h(f, y) { + var v = function(b, _) { + var m = { inBoth: [], inTaskNotInStore: [], inStoreNotInTask: [] }; + if (i == n.singleValue) { + var p = b[0], k = p ? p.resource_id : null, $ = !1; + _.forEach(function(T) { + T.resource_id != k ? m.inStoreNotInTask.push(T) : T.resource_id == k && (m.inBoth.push({ store: T, task: p }), $ = !0); + }), !$ && p && m.inTaskNotInStore.push(p); + } else if (i == n.valueArray) { + var w = {}, x = {}, S = {}; + b.forEach(function(T) { + w[T.resource_id] = T; + }), _.forEach(function(T) { + x[T.resource_id] = T; + }), b.concat(_).forEach(function(T) { + if (!S[T.resource_id]) { + S[T.resource_id] = !0; + var C = w[T.resource_id], E = x[T.resource_id]; + C && E ? m.inBoth.push({ store: E, task: C }) : C && !E ? m.inTaskNotInStore.push(C) : !C && E && m.inStoreNotInTask.push(E); + } + }); + } else i != n.assignmentsArray && i != n.resourceValueArray || (w = {}, x = {}, S = {}, b.forEach(function(T) { + w[T.id || T.$id] = T; + }), _.forEach(function(T) { + x[T.id] = T; + }), b.concat(_).forEach(function(T) { + var C = T.id || T.$id; + if (!S[C]) { + S[C] = !0; + var E = w[C], D = x[C]; + E && D ? m.inBoth.push({ store: D, task: E }) : E && !D ? m.inTaskNotInStore.push(E) : !E && D && m.inStoreNotInTask.push(D); + } + })); + return m; + }(l(f), y); + v.inStoreNotInTask.forEach(function(b) { + s.removeItem(b.id); + }), v.inTaskNotInStore.forEach(function(b) { + s.addItem(b); + }), v.inBoth.forEach(function(b) { + if (function(m, p) { + var k = { id: !0 }; + for (var $ in m) if (!k[$] && String(m[$]) !== String(p[$])) return !0; + return !1; + }(b.task, b.store)) (function(m, p) { + var k = { id: !0 }; + for (var $ in m) k[$] || (p[$] = m[$]); + })(b.task, b.store), s.updateItem(b.store.id); + else if (b.task.start_date && b.task.end_date && b.task.mode !== a.fixedDates) { + var _ = o(b.store, f); + b.store.start_date.valueOf() == _.start_date.valueOf() && b.store.end_date.valueOf() == _.end_date.valueOf() || (b.store.start_date = _.start_date, b.store.end_date = _.end_date, b.store.duration = _.duration, s.updateItem(b.store.id)); + } + }), d(f.id); + } + function g(f) { + var y = f[e] || s.find(function(v) { + return v.task_id == f.id; + }); + h(f, y); + } + t.$data.assignmentsStore = s, t.attachEvent("onGanttReady", function() { + if (t.config.process_resource_assignments) { + t.attachEvent("onParse", function() { + t.silent(function() { + s.clearAll(); + var k = []; + t.eachTask(function($) { + if ($.type !== t.config.types.project) { + var w = u($); + c($, w), w.forEach(function(x) { + k.push(x); + }); + } + }), s.parse(k); + }); + }); + var f = !1, y = !1, v = {}, b = !1; + t.attachEvent("onBeforeBatchUpdate", function() { + f = !0; + }), t.attachEvent("onAfterBatchUpdate", function() { + if (y) { + var k = {}; + for (var $ in v) k[$] = t.getTaskAssignments(v[$].id); + for (var $ in v) h(v[$], k[$]); + } + y = !1, f = !1, v = {}; + }), t.attachEvent("onTaskCreated", function(k) { + var $ = u(k); + return s.parse($), c(k, $), !0; + }), t.attachEvent("onAfterTaskUpdate", function(k, $) { + f ? (y = !0, v[k] = $) : $.unscheduled || g($); + }), t.attachEvent("onAfterTaskAdd", function(k, $) { + f ? (y = !0, v[k] = $) : g($); + }), t.attachEvent("onRowDragEnd", function(k) { + g(t.getTask(k)); + }), t.$data.tasksStore.attachEvent("onAfterDeleteConfirmed", function(k, $) { + var w, x = [k]; + t.eachTask(function(S) { + x.push(S.id); + }, k), w = {}, x.forEach(function(S) { + w[S] = !0; + }), s.find(function(S) { + return w[S.task_id]; + }).forEach(function(S) { + s.removeItem(S.id); + }); + }), t.$data.tasksStore.attachEvent("onClearAll", function() { + return _ = null, m = null, p = null, s.clearAll(), !0; + }), t.attachEvent("onTaskIdChange", function(k, $) { + s.find(function(w) { + return w.task_id == k; + }).forEach(function(w) { + w.task_id = $, s.updateItem(w.id); + }), d($); + }), t.attachEvent("onBeforeUndo", function(k) { + return b = !0, !0; + }), t.attachEvent("onAfterUndo", function(k) { + b = !0; + }); + var _ = null, m = null, p = null; + s.attachEvent("onStoreUpdated", function() { + return f && !b || (_ = null, m = null, p = null), !0; + }), t.getResourceAssignments = function(k, $) { + var w = t.defined($) && $ !== null; + return _ === null && (_ = {}, m = {}, s.eachItem(function(x) { + _[x.resource_id] || (_[x.resource_id] = []), _[x.resource_id].push(x); + var S = x.resource_id + "-" + x.task_id; + m[S] || (m[S] = []), m[S].push(x); + })), w ? (m[k + "-" + $] || []).slice() : (_[k] || []).slice(); + }, t.getTaskAssignments = function(k) { + if (p === null) { + var $ = []; + p = {}, s.eachItem(function(w) { + p[w.task_id] || (p[w.task_id] = []), p[w.task_id].push(w), w.task_id == k && $.push(w); + }); + } + return (p[k] || []).slice(); + }, t.getTaskResources = function(k) { + const $ = t.getDatastore("resource"), w = t.getTaskAssignments(k), x = {}; + w.forEach(function(T) { + x[T.resource_id] || (x[T.resource_id] = T.resource_id); + }); + const S = []; + for (const T in x) { + const C = $.getItem(x[T]); + C && S.push(C); + } + return S; + }, t.updateTaskAssignments = d; + } + }, { once: !0 }); +} +function ci(t) { + function e(o) { + return function() { + return !t.config.placeholder_task || o.apply(this, arguments); + }; + } + function n() { + var o = t.getTaskBy("type", t.config.types.placeholder); + if (!o.length || !t.isTaskExists(o[0].id)) { + var l = { unscheduled: !0, type: t.config.types.placeholder, duration: 0, text: t.locale.labels.new_task }; + if (t.callEvent("onTaskCreated", [l]) === !1) return; + t.addTask(l); + } + } + function i(o) { + var l = t.getTask(o); + l.type == t.config.types.placeholder && (l.start_date && l.end_date && l.unscheduled && (l.unscheduled = !1), t.batchUpdate(function() { + var d = t.copy(l); + t.silent(function() { + t.deleteTask(l.id); + }), delete d["!nativeeditor_status"], d.type = t.config.types.task, d.id = t.uid(), t.addTask(d); + })); + } + t.config.types.placeholder = "placeholder", t.attachEvent("onDataProcessorReady", e(function(o) { + o && !o._silencedPlaceholder && (o._silencedPlaceholder = !0, o.attachEvent("onBeforeUpdate", e(function(l, d, c) { + return c.type != t.config.types.placeholder || (o.setUpdated(l, !1), !1); + }))); + })); + var a = !1; + function r(o) { + return !!(t.config.types.placeholder && t.isTaskExists(o) && t.getTask(o).type == t.config.types.placeholder); + } + function s(o) { + return !(!r(o.source) && !r(o.target)); + } + t.attachEvent("onGanttReady", function() { + a || (a = !0, t.attachEvent("onAfterTaskUpdate", e(i)), t.attachEvent("onAfterTaskAdd", e(function(o, l) { + l.type != t.config.types.placeholder && (t.getTaskBy("type", t.config.types.placeholder).forEach(function(d) { + t.silent(function() { + t.isTaskExists(d.id) && t.deleteTask(d.id); + }); + }), n()); + })), t.attachEvent("onParse", e(n))); + }), t.attachEvent("onLinkValidation", function(o) { + return !s(o); + }), t.attachEvent("onBeforeLinkAdd", function(o, l) { + return !s(l); + }), t.attachEvent("onBeforeUndoStack", function(o) { + for (var l = 0; l < o.commands.length; l++) { + var d = o.commands[l]; + d.entity === "task" && d.value.type === t.config.types.placeholder && (o.commands.splice(l, 1), l--); + } + return !0; + }); +} +function ui(t) { + function e(c) { + return function() { + return !t.config.auto_types || t.getTaskType(t.config.types.project) != t.config.types.project || c.apply(this, arguments); + }; + } + function n(c, u) { + var h = t.getTask(c), g = r(h); + g !== !1 && t.getTaskType(h) !== g && (u.$needsUpdate = !0, u[h.id] = { task: h, type: g }); + } + function i(c) { + if (!t.getState().group_mode) { + var u = function(h, g) { + return n(h, g = g || {}), t.eachParent(function(f) { + n(f.id, g); + }, h), g; + }(c); + u.$needsUpdate && t.batchUpdate(function() { + (function(h) { + for (var g in h) if (h[g] && h[g].task) { + var f = h[g].task; + f.type = h[g].type, t.updateTask(f.id); + } + })(u); + }); + } + } + var a; + function r(c) { + var u = t.config.types, h = t.hasChild(c.id), g = t.getTaskType(c.type); + return h && g === u.task ? u.project : !h && g === u.project && u.task; + } + var s, o, l = !0; + function d(c) { + c != t.config.root_id && t.isTaskExists(c) && i(c); + } + t.attachEvent("onParse", e(function() { + l = !1, t.getState().group_mode || (t.batchUpdate(function() { + t.eachTask(function(c) { + var u = r(c); + u !== !1 && function(h, g) { + t.getState().group_mode || (h.type = g, t.updateTask(h.id)); + }(c, u); + }); + }), l = !0); + })), t.attachEvent("onAfterTaskAdd", e(function(c) { + l && i(c); + })), t.attachEvent("onAfterTaskUpdate", e(function(c) { + l && i(c); + })), t.attachEvent("onBeforeTaskDelete", e(function(c, u) { + return a = t.getParent(c), !0; + })), t.attachEvent("onAfterTaskDelete", e(function(c, u) { + d(a); + })), t.attachEvent("onRowDragStart", e(function(c, u, h) { + return s = t.getParent(c), !0; + })), t.attachEvent("onRowDragEnd", e(function(c, u) { + d(s), i(c); + })), t.attachEvent("onBeforeTaskMove", e(function(c, u, h) { + return o = t.getParent(c), !0; + })), t.attachEvent("onAfterTaskMove", e(function(c, u, h) { + document.querySelector(".gantt_drag_marker") || (d(o), i(c)); + })); +} +const Jt = class Jt { + constructor() { + this.canParse = (e) => !isNaN(this.parse(e)), this.format = (e) => String(e), this.parse = (e) => parseInt(e, 10); + } +}; +Jt.create = (e = null) => new Jt(); +let Nt = Jt; +const Kt = class Kt { + constructor(e) { + this.format = (n) => this._getWBSCode(n.source), this.canParse = (n) => this._linkReg.test(n), this.parse = (n) => { + if (!this.canParse(n)) return null; + const i = this._linkReg.exec(n)[0].trim(); + return { id: void 0, source: this._findSource(i) || null, target: null, type: this._gantt.config.links.finish_to_start, lag: 0 }; + }, this._getWBSCode = (n) => { + const i = this._gantt.getTask(n); + return this._gantt.getWBSCode(i); + }, this._findSource = (n) => { + const i = new RegExp("^[0-9.]+", "i"); + if (i.exec(n)) { + const a = i.exec(n)[0], r = this._gantt.getTaskByWBSCode(a); + if (r) return r.id; + } + return null; + }, this._linkReg = /^[0-9\.]+/, this._gantt = e; + } +}; +Kt.create = (e = null, n) => new Kt(n); +let fe = Kt; +function hi(t) { + t.ext.formatters = { durationFormatter: function(e) { + return e || (e = {}), e.store || (e.store = t.config.duration_unit), e.enter || (e.enter = t.config.duration_unit), Nt.create(e, t); + }, linkFormatter: function(e) { + return fe.create(e, t); + } }; +} +function _i(t) { + t.ext = t.ext || {}, t.config.show_empty_state = !1, t.ext.emptyStateElement = t.ext.emptyStateElement || { isEnabled: () => t.config.show_empty_state === !0, isGanttEmpty: () => !t.getTaskByTime().length, renderContent(e) { + const n = `
${`
+ +
${t.locale.labels.empty_state_text_description}
+
`}
`; + e.innerHTML = n; + }, clickEvents: [], attachAddTaskEvent() { + const e = t.attachEvent("onEmptyClick", function(n) { + t.utils.dom.closest(n.target, "[data-empty-state-create-task]") && t.createTask({ id: t.uid(), text: "New Task" }); + }); + this.clickEvents.push(e); + }, detachAddTaskEvents() { + this.clickEvents.forEach(function(e) { + t.detachEvent(e); + }), this.clickEvents = []; + }, getContainer() { + if (t.$container) { + const e = t.utils.dom; + if (t.$container.contains(t.$grid_data)) return e.closest(t.$grid_data, ".gantt_layout_content"); + if (t.$container.contains(t.$task_data)) return e.closest(t.$task_data, ".gantt_layout_content"); + } + return null; + }, getNode() { + const e = this.getContainer(); + return e ? e.querySelector(".gantt_empty_state_wrapper") : null; + }, show() { + const e = this.getContainer(); + if (!e && this.isGanttEmpty()) return null; + const n = document.createElement("div"); + n.className = "gantt_empty_state_wrapper", n.style.marginTop = t.config.scale_height - e.offsetHeight + "px"; + const i = t.$container.querySelectorAll(".gantt_empty_state_wrapper"); + Array.prototype.forEach.call(i, function(a) { + a.parentNode.removeChild(a); + }), this.detachAddTaskEvents(), this.attachAddTaskEvent(), e.appendChild(n), this.renderContent(n); + }, hide() { + const e = this.getNode(); + if (!e) return !1; + e.parentNode.removeChild(e); + }, init() { + } }, t.attachEvent("onDataRender", function() { + const e = t.ext.emptyStateElement; + e.isEnabled() && e.isGanttEmpty() ? e.show() : e.hide(); + }); +} +const un = function(t, e) { + const n = e.baselines && e.baselines.length, i = t.config.baselines.render_mode == "separateRow" || t.config.baselines.render_mode == "individualRow"; + if (n && i) return !0; +}, gi = function(t, e) { + let n = !1; + return t.eachTask(function(i) { + n || (n = un(t, i)); + }, e), n; +}, xt = function(t) { + return t.render && t.render == "split" && !t.$open; +}, fi = function(t, e, n, i) { + let a = i || e.$task_data.scrollHeight, r = !1, s = !1; + return t.eachParent(function(o) { + if (xt(o)) { + s = !0; + const l = e.getItemPosition(o).rowHeight; + l < a && (a = l, r = !0); + } + }, n.id), { maxHeight: a, shrinkHeight: r, splitChild: s }; +}; +function pi(t) { + t.config.baselines = { datastore: "baselines", render_mode: !1, dataprocessor_baselines: !1, row_height: 16, bar_height: 8 }; + const e = t.createDatastore({ name: t.config.baselines.datastore, initItem: function(a) { + return a.id || (a.id = t.uid()), function(r) { + r.start_date ? r.start_date = t.date.parseDate(r.start_date, "parse_date") : r.start_date = null, r.end_date ? r.end_date = t.date.parseDate(r.end_date, "parse_date") : r.end_date = null, r.task_id; + }(a), a; + } }); + function n(a) { + let r = 0; + t.adjustTaskHeightForBaselines(a), t.eachTask(function(s) { + let o = s.row_height || t.config.row_height; + r = r || o, o > r && (r = o); + }, a.id), a.row_height < r && (a.row_height = r); + } + function i(a) { + t.eachParent(function(r) { + if (xt(r)) { + const s = r.row_height || t.getLayoutView("timeline").getBarHeight(r.id); + let o = a.row_height; + t.getChildren(r.id).forEach(function(l) { + const d = t.getTask(l); + if (d.id == a.id) return; + const c = d.row_height || t.getLayoutView("timeline").getBarHeight(d.id); + o = o || c, c > o && (o = c); + }), r.row_height = o, r.bar_height = r.bar_height || s; + } + }, a.id); + } + t.$data.baselineStore = e, t.adjustTaskHeightForBaselines = function(a) { + let r, s, o = a.baselines && a.baselines.length || 0; + const l = t.config.baselines.row_height; + switch (t.config.baselines.render_mode) { + case "taskRow": + a.row_height = a.bar_height + 4; + break; + case "separateRow": + r = t.getLayoutView("timeline").getBarHeight(a.id), o ? (a.bar_height = a.bar_height || r, a.bar_height > r && (r = a.bar_height), a.row_height = r + l) : a.bar_height && (a.row_height = a.bar_height + 4), i(a); + break; + case "individualRow": + r = t.getLayoutView("timeline").getBarHeight(a.id), o ? (a.bar_height = a.bar_height || r, a.bar_height > r && (r = a.bar_height), s = l * o, a.row_height = r + s + 2) : a.bar_height && (a.row_height = a.bar_height + 4), i(a); + } + }, t.attachEvent("onGanttReady", function() { + t.config.baselines !== !1 && (t.attachEvent("onParse", function() { + e.eachItem(function(a) { + const r = a.task_id; + if (t.isTaskExists(r)) { + const s = t.getTask(r); + s.baselines = s.baselines || []; + let o = !0; + for (let l = 0; l < s.baselines.length; l++) { + let d = s.baselines[l]; + if (d.id == a.id) { + o = !1, t.mixin(d, a, !0); + break; + } + } + o && s.baselines.push(a), xt(s) ? n(s) : t.adjustTaskHeightForBaselines(s); + } + }); + }), t.attachEvent("onBeforeTaskUpdate", function(a, r) { + return function(s) { + let o = !1; + const l = {}, d = s.baselines || [], c = t.getTaskBaselines(s.id); + d.length != c.length && (o = !0), d.forEach(function(u) { + l[u.id] = !0; + const h = e.getItem(u.id); + if (h) { + const g = +h.start_date != +u.start_date, f = +h.end_date != +u.end_date; + (g || f) && e.updateItem(u.id, u); + } else e.addItem(u); + }), c.forEach(function(u) { + l[u.id] || e.removeItem(u.id); + }), o && (xt(s) ? n(s) : t.adjustTaskHeightForBaselines(s), t.render()); + }(r), !0; + }), t.attachEvent("onAfterUndo", function(a) { + if ((t.config.baselines.render_mode == "separateRow" || t.config.baselines.render_mode == "individualRow") && a) { + let r = !1; + a.commands.forEach(function(s) { + if (s.entity == "task") { + const o = s.value.id; + if (t.isTaskExists(o)) { + const l = t.getTask(o); + if (l.parent && t.isTaskExists(l.parent)) { + const d = t.getTask(l.parent); + xt(d) && (n(d), r = !0); + } + } + } + }), r && t.render(); + } + }), t.attachEvent("onAfterTaskDelete", function(a, r) { + if (un && r.parent && t.isTaskExists(r.parent)) { + const s = t.getTask(r.parent); + xt(s) && n(s); + } + e.eachItem(function(s) { + t.isTaskExists(s.task_id) || e.removeItem(s.id); + }); + }), t.getTaskBaselines = function(a) { + const r = []; + return e.eachItem(function(s) { + s.task_id == a && r.push(s); + }), r; + }, t.$data.baselineStore.attachEvent("onClearAll", function() { + return t.eachTask(function(a) { + a.baselines && delete a.baselines; + }), !0; + }), t.$data.tasksStore.attachEvent("onClearAll", function() { + return e.clearAll(), !0; + }), t.attachEvent("onTaskIdChange", function(a, r) { + e.find(function(s) { + return s.task_id == a; + }).forEach(function(s) { + s.task_id = r, e.updateItem(s.id); + }); + })); + }, { once: !0 }); +} +function mi(t) { + function e(n) { + throw t.assert(!1, "Can't parse data: incorrect value of gantt.parse or gantt.load method. Actual argument value: " + JSON.stringify(n)), new Error("Invalid argument for gantt.parse or gantt.load. An object or a JSON string of format https://docs.dhtmlx.com/gantt/desktop__supported_data_formats.html#json is expected. Actual argument value: " + JSON.stringify(n)); + } + t.load = function() { + throw new Error("gantt.load() method is not available in the node.js, use gantt.parse() instead"); + }, t.parse = function(n, i) { + this.on_load({ xmlDoc: { responseText: n } }, i); + }, t.serialize = function(n) { + return this[n = n || "json"].serialize(); + }, t.on_load = function(n, i) { + if (n.xmlDoc && n.xmlDoc.status === 404) this.assert(!1, "Failed to load the data from " + n.xmlDoc.responseURL + ", server returns 404"); + else if (!t.$destroyed) { + this.callEvent("onBeforeParse", []), i || (i = "json"), this.assert(this[i], "Invalid data type:'" + i + "'"); + var a = n.xmlDoc.responseText, r = this[i].parse(a, n); + this._process_loading(r); + } + }, t._process_loading = function(n) { + n.collections && this._load_collections(n.collections), n.resources && this.$data.resourcesStore && this.$data.resourcesStore.parse(n.resources), t.config.baselines !== !1 && n.baselines && this.$data.baselineStore && this.$data.baselineStore.parse(n.baselines); + const i = n.data || n.tasks; + n.assignments && function(r, s) { + const o = {}; + s.forEach((l) => { + o[l.task_id] || (o[l.task_id] = []), o[l.task_id].push(l); + }), r.forEach((l) => { + l[t.config.resource_property] = o[l.id] || []; + }); + }(i, n.assignments), this.$data.tasksStore.parse(i); + var a = n.links || (n.collections ? n.collections.links : []); + this.$data.linksStore.parse(a), this.callEvent("onParse", []), this.render(); + }, t._load_collections = function(n) { + var i = !1; + for (var a in n) if (n.hasOwnProperty(a)) { + i = !0; + var r = n[a]; + this.serverList[a] = this.serverList[a] || []; + var s = this.serverList[a]; + if (!s) continue; + s.splice(0, s.length); + for (var o = 0; o < r.length; o++) { + var l = r[o], d = this.copy(l); + for (var c in d.key = d.value, l) if (l.hasOwnProperty(c)) { + if (c == "value" || c == "label") continue; + d[c] = l[c]; + } + s.push(d); + } + } + i && this.callEvent("onOptionsLoad", []); + }, t.attachEvent("onBeforeTaskDisplay", function(n, i) { + return !i.$ignore; + }), t.json = { parse: function(n) { + if (n || e(n), typeof n == "string") if (typeof JSON != null) try { + n = JSON.parse(n); + } catch { + e(n); + } + else t.assert(!1, "JSON is not supported"); + return n.data || n.tasks || e(n), n.dhx_security && (t.security_key = n.dhx_security), n; + }, serializeTask: function(n) { + return this._copyObject(n); + }, serializeLink: function(n) { + return this._copyLink(n); + }, _copyLink: function(n) { + var i = {}; + for (var a in n) i[a] = n[a]; + return i; + }, _copyObject: function(n) { + var i = {}; + for (var a in n) a.charAt(0) != "$" && (i[a] = n[a], Q(i[a]) && (i[a] = t.defined(t.templates.xml_format) ? t.templates.xml_format(i[a]) : t.templates.format_date(i[a]))); + return i; + }, serialize: function() { + var n = [], i = []; + let a = []; + t.eachTask(function(o) { + t.resetProjectDates(o), n.push(this.serializeTask(o)); + }, t.config.root_id, this); + for (var r = t.getLinks(), s = 0; s < r.length; s++) i.push(this.serializeLink(r[s])); + return t.getDatastore("baselines").eachItem(function(o) { + const l = t.json.serializeTask(o); + a.push(l); + }), { data: n, links: i, baselines: a }; + } }, t.xml = { _xmlNodeToJSON: function(n, i) { + for (var a = {}, r = 0; r < n.attributes.length; r++) a[n.attributes[r].name] = n.attributes[r].value; + if (!i) { + for (r = 0; r < n.childNodes.length; r++) { + var s = n.childNodes[r]; + s.nodeType == 1 && (a[s.tagName] = s.firstChild ? s.firstChild.nodeValue : ""); + } + a.text || (a.text = n.firstChild ? n.firstChild.nodeValue : ""); + } + return a; + }, _getCollections: function(n) { + for (var i = {}, a = t.ajax.xpath("//coll_options", n), r = 0; r < a.length; r++) for (var s = i[a[r].getAttribute("for")] = [], o = t.ajax.xpath(".//item", a[r]), l = 0; l < o.length; l++) { + for (var d = o[l].attributes, c = { key: o[l].getAttribute("value"), label: o[l].getAttribute("label") }, u = 0; u < d.length; u++) { + var h = d[u]; + h.nodeName != "value" && h.nodeName != "label" && (c[h.nodeName] = h.nodeValue); + } + s.push(c); + } + return i; + }, _getXML: function(n, i, a) { + a = a || "data", i.getXMLTopNode || (i = t.ajax.parse(i)); + var r = t.ajax.xmltop(a, i.xmlDoc); + r && r.tagName == a || function(o) { + throw t.assert(!1, "Can't parse data: incorrect value of gantt.parse or gantt.load method. Actual argument value: " + JSON.stringify(o)), new Error("Invalid argument for gantt.parse or gantt.load. An XML of format https://docs.dhtmlx.com/gantt/desktop__supported_data_formats.html#xmldhtmlxgantt20 is expected. Actual argument value: " + JSON.stringify(o)); + }(n); + var s = r.getAttribute("dhx_security"); + return s && (t.security_key = s), r; + }, parse: function(n, i) { + i = this._getXML(n, i); + for (var a = {}, r = a.data = [], s = t.ajax.xpath("//task", i), o = 0; o < s.length; o++) r[o] = this._xmlNodeToJSON(s[o]); + return a.collections = this._getCollections(i), a; + }, _copyLink: function(n) { + return ""; + }, _copyObject: function(n) { + return ""; + }, serialize: function() { + for (var n = [], i = [], a = t.json.serialize(), r = 0, s = a.data.length; r < s; r++) n.push(this._copyObject(a.data[r])); + for (r = 0, s = a.links.length; r < s; r++) i.push(this._copyLink(a.links[r])); + return "" + n.join("") + "" + i.join("") + ""; + } }, t.oldxml = { parse: function(n, i) { + i = t.xml._getXML(n, i, "projects"); + for (var a = { collections: { links: [] } }, r = a.data = [], s = t.ajax.xpath("//task", i), o = 0; o < s.length; o++) { + r[o] = t.xml._xmlNodeToJSON(s[o]); + var l = s[o].parentNode; + l.tagName == "project" ? r[o].parent = "project-" + l.getAttribute("id") : r[o].parent = l.parentNode.getAttribute("id"); + } + for (s = t.ajax.xpath("//project", i), o = 0; o < s.length; o++) + (d = t.xml._xmlNodeToJSON(s[o], !0)).id = "project-" + d.id, r.push(d); + for (o = 0; o < r.length; o++) { + var d; + (d = r[o]).start_date = d.startdate || d.est, d.end_date = d.enddate, d.text = d.name, d.duration = d.duration / 8, d.open = 1, d.duration || d.end_date || (d.duration = 1), d.predecessortasks && a.collections.links.push({ target: d.id, source: d.predecessortasks, type: t.config.links.finish_to_start }); + } + return a; + }, serialize: function() { + t.message("Serialization to 'old XML' is not implemented"); + } }, t.serverList = function(n, i) { + return i ? this.serverList[n] = i.slice(0) : this.serverList[n] || (this.serverList[n] = []), this.serverList[n]; + }; +} +function te(t, e, n, i, a) { + return this.date = t, this.unit = e, this.task = n, this.id = i, this.calendar = a, this; +} +function ee(t, e, n, i, a, r) { + return this.date = t, this.dir = e, this.unit = n, this.task = i, this.id = a, this.calendar = r, this; +} +function ne(t, e, n, i, a, r, s) { + return this.start_date = t, this.duration = e, this.unit = n, this.step = i, this.task = a, this.id = r, this.calendar = s, this; +} +function vi(t, e, n, i) { + return this.start_date = t, this.end_date = e, this.task = n, this.calendar = i, this.unit = null, this.step = null, this; +} +var hn = function(t) { + return { getWorkHoursArguments: function() { + var e = arguments[0]; + if (!yt((e = Q(e) ? { date: e } : L({}, e)).date)) throw t.assert(!1, "Invalid date argument for getWorkHours method"), new Error("Invalid date argument for getWorkHours method"); + return e; + }, setWorkTimeArguments: function() { + return arguments[0]; + }, unsetWorkTimeArguments: function() { + return arguments[0]; + }, isWorkTimeArguments: function() { + var e, n = arguments[0]; + if (n instanceof te) return n; + if ((e = n.date ? new te(n.date, n.unit, n.task, null, n.calendar) : new te(arguments[0], arguments[1], arguments[2], null, arguments[3])).unit = e.unit || t.config.duration_unit, !yt(e.date)) throw t.assert(!1, "Invalid date argument for isWorkTime method"), new Error("Invalid date argument for isWorkTime method"); + return e; + }, getClosestWorkTimeArguments: function(e) { + var n, i = arguments[0]; + if (i instanceof ee) return i; + if (n = Q(i) ? new ee(i) : new ee(i.date, i.dir, i.unit, i.task, null, i.calendar), i.id && (n.task = i), n.dir = i.dir || "any", n.unit = i.unit || t.config.duration_unit, !yt(n.date)) throw t.assert(!1, "Invalid date argument for getClosestWorkTime method"), new Error("Invalid date argument for getClosestWorkTime method"); + return n; + }, _getStartEndConfig: function(e) { + var n, i = vi; + if (e instanceof i) return e; + if (Q(e) ? n = new i(arguments[0], arguments[1], arguments[2], arguments[3]) : (n = new i(e.start_date, e.end_date, e.task), e.id !== null && e.id !== void 0 && (n.task = e)), n.unit = n.unit || t.config.duration_unit, n.step = n.step || t.config.duration_step, n.start_date = n.start_date || n.start || n.date, !yt(n.start_date)) throw t.assert(!1, "Invalid start_date argument for getDuration method"), new Error("Invalid start_date argument for getDuration method"); + if (!yt(n.end_date)) throw t.assert(!1, "Invalid end_date argument for getDuration method"), new Error("Invalid end_date argument for getDuration method"); + return n; + }, getDurationArguments: function(e, n, i, a) { + return this._getStartEndConfig.apply(this, arguments); + }, hasDurationArguments: function(e, n, i, a) { + return this._getStartEndConfig.apply(this, arguments); + }, calculateEndDateArguments: function(e, n, i, a) { + var r, s = arguments[0]; + if (s instanceof ne) return s; + if (r = Q(s) ? new ne(arguments[0], arguments[1], arguments[2], void 0, arguments[3], void 0, arguments[4]) : new ne(s.start_date, s.duration, s.unit, s.step, s.task, null, s.calendar), s.id !== null && s.id !== void 0 && (r.task = s, r.unit = null, r.step = null), r.unit = r.unit || t.config.duration_unit, r.step = r.step || t.config.duration_step, !yt(r.start_date)) throw t.assert(!1, "Invalid start_date argument for calculateEndDate method"), new Error("Invalid start_date argument for calculateEndDate method"); + return r; + } }; +}; +function _n() { +} +_n.prototype = { _getIntervals: function(t) { + for (var e = [], n = 0; n < t.length; n += 2) e.push({ start: t[n], end: t[n + 1] }); + return e; +}, _toHoursArray: function(t) { + var e = []; + function n(a) { + var r, s = Math.floor(a / 3600), o = a - 60 * s * 60, l = Math.floor(o / 60); + return s + ":" + ((r = String(l)).length < 2 && (r = "0" + r), r); + } + for (var i = 0; i < t.length; i++) e.push(n(t[i].start) + "-" + n(t[i].end)); + return e; +}, _intersectHourRanges: function(t, e) { + var n = [], i = t.length > e.length ? t : e, a = t === i ? e : t; + i = i.slice(), a = a.slice(), n = []; + for (var r = 0; r < i.length; r++) for (var s = i[r], o = 0; o < a.length; o++) { + var l = a[o]; + l.start < s.end && l.end > s.start && (n.push({ start: Math.max(s.start, l.start), end: Math.min(s.end, l.end) }), s.end > l.end && (a.splice(o, 1), o--, r--)); + } + return n; +}, _mergeAdjacentIntervals: function(t) { + var e = t.slice(); + e.sort(function(r, s) { + return r.start - s.start; + }); + for (var n = e[0], i = 1; i < e.length; i++) { + var a = e[i]; + a.start <= n.end ? (a.end > n.end && (n.end = a.end), e.splice(i, 1), i--) : n = a; + } + return e; +}, _mergeHoursConfig: function(t, e) { + return this._mergeAdjacentIntervals(this._intersectHourRanges(t, e)); +}, merge: function(t, e) { + var n = G(t.getConfig().parsed), i = G(e.getConfig().parsed), a = { hours: this._toHoursArray(this._mergeHoursConfig(n.hours, i.hours)), dates: {}, customWeeks: {} }; + const r = (o, l) => { + for (let d in o.dates) { + const c = o.dates[d]; + +d > 1e3 && (a.dates[d] = !1); + for (const u in l.dates) { + const h = l.dates[u]; + if (u == d && (a.dates[d] = !(!c || !h)), Array.isArray(c)) { + const g = Array.isArray(h) ? h : l.hours; + a.dates[d] = this._toHoursArray(this._mergeHoursConfig(c, g)); + } + } + } + }; + if (r(n, i), r(i, n), n.customWeeks) for (var s in n.customWeeks) a.customWeeks[s] = n.customWeeks[s]; + if (i.customWeeks) for (var s in i.customWeeks) a.customWeeks[s] = i.customWeeks[s]; + return a; +} }; +class ki { + constructor() { + this.clear(); + } + getItem(e, n, i) { + if (this._cache.has(e)) { + const a = this._cache.get(e)[i.getFullYear()]; + if (a && a.has(n)) return a.get(n); + } + return -1; + } + setItem(e, n, i, a) { + if (!e || !n) return; + const r = this._cache, s = a.getFullYear(); + let o; + r.has(e) ? o = r.get(e) : (o = [], r.set(e, o)); + let l = o[s]; + l || (l = o[s] = /* @__PURE__ */ new Map()), l.set(n, i); + } + clear() { + this._cache = /* @__PURE__ */ new Map(); + } +} +class yi { + constructor() { + this.clear(); + } + getItem(e, n, i) { + const a = this._cache; + if (a && a[e]) { + const r = a[e]; + if (r === void 0) return -1; + const s = r[i.getFullYear()]; + if (s && s[n] !== void 0) return s[n]; + } + return -1; + } + setItem(e, n, i, a) { + if (!e || !n) return; + const r = this._cache; + if (!r) return; + r[e] || (r[e] = []); + const s = r[e], o = a.getFullYear(); + let l = s[o]; + l || (l = s[o] = {}), l[n] = i; + } + clear() { + this._cache = {}; + } +} +class bi { + constructor(e) { + this.getMinutesPerWeek = (n) => { + const i = n.valueOf(); + if (this._weekCache.has(i)) return this._weekCache.get(i); + const a = this._calendar, r = this._calendar.$gantt; + let s = 0, o = r.date.week_start(new Date(n)); + for (let l = 0; l < 7; l++) s += 60 * a.getHoursPerDay(o), o = r.date.add(o, 1, "day"); + return this._weekCache.set(i, s), s; + }, this.getMinutesPerMonth = (n) => { + const i = n.valueOf(); + if (this._monthCache.has(i)) return this._monthCache.get(i); + const a = this._calendar, r = this._calendar.$gantt; + let s = 0, o = r.date.week_start(new Date(n)); + const l = r.date.add(o, 1, "month").valueOf(); + for (; o.valueOf() < l; ) s += 60 * a.getHoursPerDay(o), o = r.date.add(o, 1, "day"); + return this._monthCache.set(i, s), s; + }, this.clear = () => { + this._weekCache = /* @__PURE__ */ new Map(), this._monthCache = /* @__PURE__ */ new Map(); + }, this.clear(), this._calendar = e; + } +} +class xi { + constructor() { + this.clear(); + } + _getCacheObject(e, n, i) { + const a = this._cache; + a[n] || (a[n] = []); + let r = a[n]; + r || (r = a[n] = {}); + let s = r[i]; + s || (s = r[i] = {}); + const o = e.getFullYear(); + let l = s[o]; + return l || (l = s[o] = { durations: {}, endDates: {} }), l; + } + _endDateCacheKey(e, n) { + return String(e) + "-" + String(n); + } + _durationCacheKey(e, n) { + return String(e) + "-" + String(n); + } + getEndDate(e, n, i, a, r) { + const s = this._getCacheObject(e, i, a), o = e.valueOf(), l = this._endDateCacheKey(o, n); + let d; + if (s.endDates[l] === void 0) { + const c = r(), u = c.valueOf(); + s.endDates[l] = u, s.durations[this._durationCacheKey(o, u)] = n, d = c; + } else d = new Date(s.endDates[l]); + return d; + } + getDuration(e, n, i, a, r) { + const s = this._getCacheObject(e, i, a), o = e.valueOf(), l = n.valueOf(), d = this._durationCacheKey(o, l); + let c; + if (s.durations[d] === void 0) { + const u = r(); + s.durations[d] = u.valueOf(), c = u; + } else c = s.durations[d]; + return c; + } + clear() { + this._cache = {}; + } +} +function pe(t, e) { + this.argumentsHelper = e, this.$gantt = t, this._workingUnitsCache = typeof Map < "u" ? new ki() : new yi(), this._largeUnitsCache = new bi(this), this._dateDurationCache = new xi(), this._worktime = null, this._cached_timestamps = {}, this._cached_timestamps_count = 0; +} +pe.prototype = { units: ["year", "month", "week", "day", "hour", "minute"], _clearCaches: function() { + this._workingUnitsCache.clear(), this._largeUnitsCache.clear(), this._dateDurationCache.clear(); +}, _getUnitOrder: function(t) { + for (var e = 0, n = this.units.length; e < n; e++) if (this.units[e] == t) return e; +}, _resetTimestampCache: function() { + this._cached_timestamps = {}, this._cached_timestamps_count = 0; +}, _timestamp: function(t) { + this._cached_timestamps_count > 1e6 && this._resetTimestampCache(); + var e = null; + if (t.day || t.day === 0) e = t.day; + else if (t.date) { + var n = String(t.date.valueOf()); + this._cached_timestamps[n] ? e = this._cached_timestamps[n] : (e = Date.UTC(t.date.getFullYear(), t.date.getMonth(), t.date.getDate()), this._cached_timestamps[n] = e, this._cached_timestamps_count++); + } + return e; +}, _checkIfWorkingUnit: function(t, e) { + if (!this["_is_work_" + e]) { + const n = this.$gantt.date[`${e}_start`](new Date(t)), i = this.$gantt.date.add(n, 1, e); + return this.hasDuration(n, i); + } + return this["_is_work_" + e](t); +}, _is_work_day: function(t) { + var e = this._getWorkHours(t); + return !!Array.isArray(e) && e.length > 0; +}, _is_work_hour: function(t) { + for (var e = this._getWorkHours(t), n = t.getHours(), i = 0; i < e.length; i++) if (n >= e[i].startHour && n < e[i].endHour) return !0; + return !1; +}, _getTimeOfDayStamp: function(t, e) { + var n = t.getHours(); + return t.getHours() || t.getMinutes() || !e || (n = 24), 60 * n * 60 + 60 * t.getMinutes(); +}, _is_work_minute: function(t) { + for (var e = this._getWorkHours(t), n = this._getTimeOfDayStamp(t), i = 0; i < e.length; i++) if (n >= e[i].start && n < e[i].end) return !0; + return !1; +}, _nextDate: function(t, e, n) { + return this.$gantt.date.add(t, n, e); +}, _getWorkUnitsBetweenGeneric: function(t, e, n, i) { + var a = this.$gantt.date, r = new Date(t), s = new Date(e); + i = i || 1; + var o, l, d = 0, c = null, u = !1; + (o = a[n + "_start"](new Date(r))).valueOf() != r.valueOf() && (u = !0); + var h = !1; + (l = a[n + "_start"](new Date(e))).valueOf() != e.valueOf() && (h = !0); + for (var g = !1; r.valueOf() < s.valueOf(); ) { + if (g = (c = this._nextDate(r, n, i)).valueOf() > s.valueOf(), this._isWorkTime(r, n)) (u || h && g) && (o = a[n + "_start"](new Date(r)), l = a.add(o, i, n)), u ? (u = !1, c = this._nextDate(o, n, i), d += (l.valueOf() - r.valueOf()) / (l.valueOf() - o.valueOf())) : h && g ? (h = !1, d += (s.valueOf() - r.valueOf()) / (l.valueOf() - o.valueOf())) : d++; + else { + var f = this._getUnitOrder(n), y = this.units[f - 1]; + y && !this._isWorkTime(r, y) && (c = this._getClosestWorkTimeFuture(r, y)); + } + r = c; + } + return d; +}, _getMinutesPerHour: function(t) { + var e = this._getTimeOfDayStamp(t), n = this._getTimeOfDayStamp(this._nextDate(t, "hour", 1)); + n === 0 && (n = 86400); + for (var i = this._getWorkHours(t), a = 0; a < i.length; a++) { + var r = i[a]; + if (e >= r.start && n <= r.end) return 60; + if (e < r.end && n > r.start) return (Math.min(n, r.end) - Math.max(e, r.start)) / 60; + } + return 0; +}, _getMinutesPerDay: function(t) { + var e = this._getWorkHours(t), n = 0; + return e.forEach(function(i) { + n += i.durationMinutes; + }), n; +}, getHoursPerDay: function(t) { + var e = this._getWorkHours(t), n = 0; + return e.forEach(function(i) { + n += i.durationHours; + }), n; +}, _getWorkUnitsForRange: function(t, e, n, i) { + var a, r = 0, s = new Date(t), o = new Date(e); + for (a = R(n == "minute" ? this._getMinutesPerDay : this.getHoursPerDay, this); s.valueOf() < o.valueOf(); ) if (o - s > 27648e5 && s.getDate() === 0) { + var l = this._largeUnitsCache.getMinutesPerMonth(s); + n == "hour" && (l /= 60), r += l, s = this.$gantt.date.add(s, 1, "month"); + } else { + if (o - s > 13824e5) { + var d = this.$gantt.date.week_start(new Date(s)); + if (s.valueOf() === d.valueOf()) { + l = this._largeUnitsCache.getMinutesPerWeek(s), n == "hour" && (l /= 60), r += l, s = this.$gantt.date.add(s, 7, "day"); + continue; + } + } + r += a(s), s = this._nextDate(s, "day", 1); + } + return r / i; +}, _getMinutesBetweenSingleDay: function(t, e) { + for (var n = this._getIntervalTimestamp(t, e), i = this._getWorkHours(t), a = 0, r = 0; r < i.length; r++) { + var s = i[r]; + if (n.end >= s.start && n.start <= s.end) { + var o = Math.max(s.start, n.start), l = Math.min(s.end, n.end); + a += (l - o) / 60, n.start = l; + } + } + return Math.floor(a); +}, _getMinutesBetween: function(t, e, n, i) { + var a = new Date(t), r = new Date(e); + i = i || 1; + var s = new Date(a), o = this.$gantt.date.add(this.$gantt.date.day_start(new Date(a)), 1, "day"); + if (r.valueOf() <= o.valueOf()) return this._getMinutesBetweenSingleDay(t, e); + var l = this.$gantt.date.day_start(new Date(r)), d = r, c = this._getMinutesBetweenSingleDay(s, o), u = this._getMinutesBetweenSingleDay(l, d); + return c + this._getWorkUnitsForRange(o, l, n, i) + u; +}, _getHoursBetween: function(t, e, n, i) { + var a = new Date(t), r = new Date(e); + i = i || 1; + var s = new Date(a), o = this.$gantt.date.add(this.$gantt.date.day_start(new Date(a)), 1, "day"); + if (r.valueOf() <= o.valueOf()) return Math.round(this._getMinutesBetweenSingleDay(t, e) / 60); + var l = this.$gantt.date.day_start(new Date(r)), d = r, c = this._getMinutesBetweenSingleDay(s, o, n, i) / 60, u = this._getMinutesBetweenSingleDay(l, d, n, i) / 60, h = c + this._getWorkUnitsForRange(o, l, n, i) + u; + return Math.round(h); +}, getConfig: function() { + return this._worktime; +}, _setConfig: function(t) { + this._worktime = t, this._parseSettings(), this._clearCaches(); +}, _parseSettings: function() { + var t = this.getConfig(); + for (var e in t.parsed = { dates: {}, hours: null, haveCustomWeeks: !1, customWeeks: {}, customWeeksRangeStart: null, customWeeksRangeEnd: null, customWeeksBoundaries: [] }, t.parsed.hours = this._parseHours(t.hours), t.dates) t.parsed.dates[e] = this._parseHours(t.dates[e]); + if (t.customWeeks) { + var n = null, i = null; + for (var e in t.customWeeks) { + var a = t.customWeeks[e]; + if (a.from && a.to) { + var r = a.from, s = a.to; + (!n || n > r.valueOf()) && (n = r.valueOf()), (!i || i < s.valueOf()) && (i = s.valueOf()), t.parsed.customWeeksBoundaries.push({ from: r.valueOf(), fromReadable: new Date(r), to: s.valueOf(), toReadable: new Date(s), name: e }), t.parsed.haveCustomWeeks = !0; + var o = t.parsed.customWeeks[e] = { from: a.from, to: a.to, hours: this._parseHours(a.hours), dates: {} }; + for (var l in a.dates) o.dates[l] = this._parseHours(a.dates[l]); + } + } + t.parsed.customWeeksRangeStart = n, t.parsed.customWeeksRangeEnd = i; + } +}, _tryChangeCalendarSettings: function(t) { + var e = JSON.stringify(this.getConfig()); + return t(), !!this.hasWorkTime() || (this._setConfig(JSON.parse(e)), this._clearCaches(), !1); +}, _arraysEqual: function(t, e) { + if (t === e) return !0; + if (!t || !e || t.length != e.length) return !1; + for (var n = 0; n < t.length; ++n) if (t[n] !== e[n]) return !1; + return !0; +}, _compareSettings: function(t, e) { + if (!this._arraysEqual(t.hours, e.hours)) return !1; + var n = Object.keys(t.dates), i = Object.keys(e.dates); + if (n.sort(), i.sort(), !this._arraysEqual(n, i)) return !1; + for (var a = 0; a < n.length; a++) { + var r = n[a], s = t.dates[r], o = t.dates[r]; + if (s !== o && !(Array.isArray(s) && Array.isArray(o) && this._arraysEqual(s, o))) return !1; + } + return !0; +}, equals: function(t) { + if (!(t instanceof pe)) return !1; + var e = this.getConfig(), n = t.getConfig(); + if (!this._compareSettings(e, n)) return !1; + if (e.parsed.haveCustomWeeks && n.parsed.haveCustomWeeks) { + if (e.parsed.customWeeksBoundaries.length != n.parsed.customWeeksBoundaries.length) return !1; + for (var i in e.parsed.customWeeks) { + var a = e.parsed.customWeeks[i], r = n.parsed.customWeeks[i]; + if (!r || !this._compareSettings(a, r)) return !1; + } + } else if (e.parse.haveCustomWeeks !== n.parsed.haveCustomWeeks) return !1; + return !0; +}, getWorkHours: function() { + var t = this.argumentsHelper.getWorkHoursArguments.apply(this.argumentsHelper, arguments); + return this._getWorkHours(t.date, !1); +}, _getWorkHours: function(t, e) { + var n = this.getConfig(); + if (e !== !1 && (n = n.parsed), !t) return n.hours; + var i = this._timestamp({ date: t }); + if (n.haveCustomWeeks && n.customWeeksRangeStart <= i && n.customWeeksRangeEnd > i) { + for (var a = 0; a < n.customWeeksBoundaries.length; a++) if (n.customWeeksBoundaries[a].from <= i && n.customWeeksBoundaries[a].to > i) { + n = n.customWeeks[n.customWeeksBoundaries[a].name]; + break; + } + } + var r = !0; + return n.dates[i] !== void 0 ? r = n.dates[i] : n.dates[t.getDay()] !== void 0 && (r = n.dates[t.getDay()]), r === !0 ? n.hours : r || []; +}, _getIntervalTimestamp: function(t, e) { + var n = { start: 0, end: 0 }; + n.start = 60 * t.getHours() * 60 + 60 * t.getMinutes() + t.getSeconds(); + var i = e.getHours(); + return !i && !e.getMinutes() && !e.getSeconds() && t.valueOf() < e.valueOf() && (i = 24), n.end = 60 * i * 60 + 60 * e.getMinutes() + e.getSeconds(), n; +}, _parseHours: function(t) { + if (Array.isArray(t)) { + var e = []; + t.forEach(function(o) { + typeof o == "number" ? e.push(60 * o * 60) : typeof o == "string" && o.split("-").map(function(l) { + return l.trim(); + }).forEach(function(l) { + var d = l.split(":").map(function(u) { + return u.trim(); + }), c = parseInt(60 * d[0] * 60); + d[1] && (c += parseInt(60 * d[1])), d[2] && (c += parseInt(d[2])), e.push(c); + }); + }); + for (var n = [], i = 0; i < e.length; i += 2) { + var a = e[i], r = e[i + 1], s = r - a; + n.push({ start: a, end: r, startHour: Math.floor(a / 3600), startMinute: Math.floor(a / 60), endHour: Math.ceil(r / 3600), endMinute: Math.ceil(r / 60), durationSeconds: s, durationMinutes: s / 60, durationHours: s / 3600 }); + } + return n; + } + return t; +}, setWorkTime: function(t) { + return this._tryChangeCalendarSettings(R(function() { + var e = t.hours === void 0 || t.hours, n = this._timestamp(t), i = this.getConfig(); + if (n !== null ? i.dates[n] = e : t.customWeeks || (i.hours = e), t.customWeeks) { + if (i.customWeeks || (i.customWeeks = {}), typeof t.customWeeks == "string") n !== null ? i.customWeeks[t.customWeeks].dates[n] = e : t.customWeeks || (i.customWeeks[t.customWeeks].hours = e); + else if (typeof t.customWeeks == "object" && Function.prototype.toString.call(t.customWeeks.constructor) === "function Object() { [native code] }") for (var a in t.customWeeks) i.customWeeks[a] = t.customWeeks[a]; + } + this._parseSettings(), this._clearCaches(); + }, this)); +}, unsetWorkTime: function(t) { + return this._tryChangeCalendarSettings(R(function() { + if (t) { + var e = this._timestamp(t); + e !== null && delete this.getConfig().dates[e]; + } else this.reset_calendar(); + this._parseSettings(), this._clearCaches(); + }, this)); +}, _isWorkTime: function(t, e) { + var n, i = -1; + return n = String(t.valueOf()), (i = this._workingUnitsCache.getItem(e, n, t)) == -1 && (i = this._checkIfWorkingUnit(t, e), this._workingUnitsCache.setItem(e, n, i, t)), i; +}, isWorkTime: function() { + var t = this.argumentsHelper.isWorkTimeArguments.apply(this.argumentsHelper, arguments); + return this._isWorkTime(t.date, t.unit); +}, calculateDuration: function() { + var t = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments); + if (!t.unit) return !1; + var e = this; + return this._dateDurationCache.getDuration(t.start_date, t.end_date, t.unit, t.step, function() { + return e._calculateDuration(t.start_date, t.end_date, t.unit, t.step); + }); +}, _calculateDuration: function(t, e, n, i) { + var a = 0, r = 1; + if (t.valueOf() > e.valueOf()) { + var s = e; + e = t, t = s, r = -1; + } + return a = n == "hour" && i == 1 ? this._getHoursBetween(t, e, n, i) : n == "minute" && i == 1 ? this._getMinutesBetween(t, e, n, i) : this._getWorkUnitsBetweenGeneric(t, e, n, i), r * Math.round(a); +}, hasDuration: function() { + var t = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments), e = t.start_date, n = t.end_date, i = t.unit, a = t.step; + if (!i) return !1; + var r = new Date(e), s = new Date(n); + for (a = a || 1; r.valueOf() < s.valueOf(); ) { + if (this._isWorkTime(r, i)) return !0; + r = this._nextDate(r, i, a); + } + return !1; +}, calculateEndDate: function() { + var t = this.argumentsHelper.calculateEndDateArguments.apply(this.argumentsHelper, arguments), e = t.start_date, n = t.duration, i = t.unit, a = t.step; + if (!i) return !1; + var r = t.duration >= 0 ? 1 : -1; + n = Math.abs(1 * n); + var s = this; + return this._dateDurationCache.getEndDate(e, n, i, a * r, function() { + return s._calculateEndDate(e, n, i, a * r); + }); +}, _calculateEndDate: function(t, e, n, i) { + return !!n && (i == 1 && n == "minute" ? this._calculateMinuteEndDate(t, e, i) : i == -1 && n == "minute" ? this._subtractMinuteDate(t, e, i) : i == 1 && n == "hour" ? this._calculateHourEndDate(t, e, i) : this._addInterval(t, e, n, i, null).end); +}, _addInterval: function(t, e, n, i, a) { + for (var r = 0, s = t, o = !1; r < e && (!a || !a(s)); ) { + var l = this._nextDate(s, n, i); + n == "day" && (o = o || !s.getHours() && l.getHours()) && (l.setHours(0), l.getHours() || (o = !1)); + var d = new Date(l.valueOf() + 1); + i > 0 && (d = new Date(l.valueOf() - 1)), this._isWorkTime(d, n) && !o && r++, s = l; + } + return { end: s, start: t, added: r }; +}, _addHoursUntilDayEnd: function(t, e) { + for (var n = this.$gantt.date.add(this.$gantt.date.day_start(new Date(t)), 1, "day"), i = 0, a = e, r = this._getIntervalTimestamp(t, n), s = this._getWorkHours(t), o = 0; o < s.length && i < e; o++) { + var l = s[o]; + if (r.end >= l.start && r.start <= l.end) { + var d = Math.max(l.start, r.start), c = Math.min(l.end, r.end), u = (c - d) / 3600; + u > a && (u = a, c = d + 60 * a * 60); + var h = Math.round((c - d) / 3600); + i += h, a -= h, r.start = c; + } + } + var g = n; + return i === e && (g = new Date(t.getFullYear(), t.getMonth(), t.getDate(), 0, 0, r.start)), { added: i, end: g }; +}, _calculateHourEndDate: function(t, e, n) { + var i = new Date(t), a = 0; + n = n || 1, e = Math.abs(1 * e); + var r = this._addHoursUntilDayEnd(i, e); + if (a = r.added, i = r.end, d = e - a) { + for (var s = i; a < e; ) { + var o = this._nextDate(s, "day", n); + o.setHours(0), o.setMinutes(0), o.setSeconds(0); + var l = 0; + if (a + (l = n > 0 ? this.getHoursPerDay(new Date(o.valueOf() - 1)) : this.getHoursPerDay(new Date(o.valueOf() + 1))) >= e) break; + a += l, s = o; + } + i = s; + } + if (a < e) { + var d = e - a; + i = (r = this._addHoursUntilDayEnd(i, d)).end; + } + return i; +}, _addMinutesUntilHourEnd: function(t, e) { + if (t.getMinutes() === 0) return { added: 0, end: new Date(t) }; + for (var n = this.$gantt.date.add(this.$gantt.date.hour_start(new Date(t)), 1, "hour"), i = 0, a = e, r = this._getIntervalTimestamp(t, n), s = this._getWorkHours(t), o = 0; o < s.length && i < e; o++) { + var l = s[o]; + if (r.end >= l.start && r.start <= l.end) { + var d = Math.max(l.start, r.start), c = Math.min(l.end, r.end), u = (c - d) / 60; + u > a && (u = a, c = d + 60 * a); + var h = Math.round((c - d) / 60); + a -= h, i += h, r.start = c; + } + } + var g = n; + return i === e && (g = new Date(t.getFullYear(), t.getMonth(), t.getDate(), 0, 0, r.start)), { added: i, end: g }; +}, _subtractMinutesUntilHourStart: function(t, e) { + for (var n = this.$gantt.date.hour_start(new Date(t)), i = 0, a = e, r = 60 * n.getHours() * 60 + 60 * n.getMinutes() + n.getSeconds(), s = 60 * t.getHours() * 60 + 60 * t.getMinutes() + t.getSeconds(), o = this._getWorkHours(t), l = o.length - 1; l >= 0 && i < e; l--) { + var d = o[l]; + if (s > d.start && r <= d.end) { + var c = Math.min(s, d.end), u = Math.max(r, d.start), h = (c - u) / 60; + h > a && (h = a, u = c - 60 * a); + var g = Math.abs(Math.round((c - u) / 60)); + a -= g, i += g, s = u; + } + } + var f = n; + return i === e && (f = new Date(t.getFullYear(), t.getMonth(), t.getDate(), 0, 0, s)), { added: i, end: f }; +}, _subtractMinuteDate: function(t, e, n) { + var i = new Date(t), a = 0; + n = n || -1, e = Math.abs(1 * e), e = Math.round(e); + const r = this._isMinutePrecision(i); + let s = this._subtractMinutesUntilHourStart(i, e); + a += s.added, i = s.end; + for (var o = 0, l = [], d = 0; a < e; ) { + var c = this.$gantt.date.day_start(new Date(i)), u = !1; + i.valueOf() === c.valueOf() && (c = this.$gantt.date.add(c, -1, "day"), u = !0); + var h = new Date(c.getFullYear(), c.getMonth(), c.getDate(), 23, 59, 59, 999).valueOf(); + h !== o && (l = this._getWorkHours(c), d = this._getMinutesPerDay(c), o = h); + var g = e - a, f = this._getTimeOfDayStamp(i, u); + if (l.length && d) if (l[l.length - 1].end <= f && g > d) a += d, i = this.$gantt.date.add(i, -1, "day"); + else { + for (var y = !1, v = null, b = null, _ = l.length - 1; _ >= 0; _--) if (l[_].start < f - 1 && l[_].end >= f - 1) { + y = !0, v = l[_], b = l[_ - 1]; + break; + } + if (y) if (f === v.end && g >= v.durationMinutes) a += v.durationMinutes, i = this.$gantt.date.add(i, -v.durationMinutes, "minute"); + else if (!r && g <= f / 60 - v.startMinute) a += g, i = this.$gantt.date.add(i, -g, "minute"); + else if (r) g <= f / 60 - v.startMinute ? (a += g, i = this.$gantt.date.add(i, -g, "minute")) : (a += f / 60 - v.startMinute, i = b ? new Date(i.getFullYear(), i.getMonth(), i.getDate(), 0, 0, b.end) : this.$gantt.date.day_start(i)); + else { + var m = this._getMinutesPerHour(i); + m <= g ? (a += m, i = this._nextDate(i, "hour", n)) : (s = this._subtractMinutesUntilHourStart(i, g), a += s.added, i = s.end); + } + else if (i.getHours() === 0 && i.getMinutes() === 0 && i.getSeconds() === 0) { + if ((p = this._getClosestWorkTimePast(i, "hour")).valueOf() === i.valueOf()) { + var p = this.$gantt.date.add(i, -1, "day"), k = this._getWorkHours(p); + if (k.length) { + var $ = k[k.length - 1]; + p.setSeconds($.durationSeconds); + } + } + i = p; + } else i = this._getClosestWorkTimePast(new Date(i - 1), "hour"); + } + else i = this.$gantt.date.add(i, -1, "day"); + } + if (a < e) { + var w = e - a; + s = this._subtractMinutesUntilHourStart(i, w), a += s.added, i = s.end; + } + return i; +}, _calculateMinuteEndDate: function(t, e, n) { + var i = new Date(t), a = 0; + n = n || 1, e = Math.abs(1 * e), e = Math.round(e); + var r = this._addMinutesUntilHourEnd(i, e); + a += r.added, i = r.end; + for (var s = 0, o = [], l = 0, d = this._isMinutePrecision(i); a < e; ) { + var c = this.$gantt.date.day_start(new Date(i)).valueOf(); + c !== s && (o = this._getWorkHours(i), l = this._getMinutesPerDay(i), s = c); + var u = e - a, h = this._getTimeOfDayStamp(i); + if (o.length && l) if (o[0].start >= h && u >= l) { + if (a += l, u == l) { + i = new Date(i.getFullYear(), i.getMonth(), i.getDate(), 0, 0, o[o.length - 1].end); + break; + } + i = this.$gantt.date.add(i, 1, "day"), i = this.$gantt.date.day_start(i); + } else { + for (var g = !1, f = null, y = 0; y < o.length; y++) if (o[y].start <= h && o[y].end > h) { + g = !0, f = o[y]; + break; + } + if (g) if (h === f.start && u >= f.durationMinutes) a += f.durationMinutes, i = this.$gantt.date.add(i, f.durationMinutes, "minute"); + else if (u <= f.endMinute - h / 60) a += u, i = this.$gantt.date.add(i, u, "minute"); + else { + var v = this._getMinutesPerHour(i); + v <= u ? (a += v, i = d ? this.$gantt.date.add(i, v, "minute") : this._nextDate(i, "hour", n)) : (a += (r = this._addMinutesUntilHourEnd(i, u)).added, i = r.end); + } + else i = this._getClosestWorkTimeFuture(i, "hour"); + } + else i = this.$gantt.date.add(this.$gantt.date.day_start(i), 1, "day"); + } + if (a < e) { + var b = e - a; + a += (r = this._addMinutesUntilHourEnd(i, b)).added, i = r.end; + } + return i; +}, getClosestWorkTime: function() { + var t = this.argumentsHelper.getClosestWorkTimeArguments.apply(this.argumentsHelper, arguments); + return this._getClosestWorkTime(t.date, t.unit, t.dir); +}, _getClosestWorkTime: function(t, e, n) { + var i = new Date(t); + if (this._isWorkTime(i, e)) return i; + if (i = this.$gantt.date[e + "_start"](i), n != "any" && n) i = n == "past" ? this._getClosestWorkTimePast(i, e) : this._getClosestWorkTimeFuture(i, e); + else { + var a = this._getClosestWorkTimeFuture(i, e), r = this._getClosestWorkTimePast(i, e); + i = Math.abs(a - t) <= Math.abs(t - r) ? a : r; + } + return i; +}, _getClosestWorkTimeFuture: function(t, e) { + return this._getClosestWorkTimeGeneric(t, e, 1); +}, _getClosestWorkTimePast: function(t, e) { + var n = this._getClosestWorkTimeGeneric(t, e, -1); + return this.$gantt.date.add(n, 1, e); +}, _findClosestTimeInDay: function(t, e, n) { + var i = new Date(t), a = null, r = !1; + this._getWorkHours(i).length || (i = this._getClosestWorkTime(i, "day", e < 0 ? "past" : "future"), e < 0 && (i = new Date(i.valueOf() - 1), r = !0), n = this._getWorkHours(i)); + var s = this._getTimeOfDayStamp(i); + if (r && (s = this._getTimeOfDayStamp(new Date(i.valueOf() + 1), r)), e > 0) { + for (var o = 0; o < n.length; o++) if (n[o].start >= s) { + a = new Date(i.getFullYear(), i.getMonth(), i.getDate(), 0, 0, n[o].start); + break; + } + } else for (o = n.length - 1; o >= 0; o--) { + if (n[o].end <= s) { + a = new Date(i.getFullYear(), i.getMonth(), i.getDate(), 0, 0, n[o].end); + break; + } + if (n[o].end > s && n[o].start <= s) { + a = new Date(i.getFullYear(), i.getMonth(), i.getDate(), 0, 0, s); + break; + } + } + return a; +}, _getClosestWorkMinute: function(t, e, n) { + var i = new Date(t), a = this._getWorkHours(i), r = this._findClosestTimeInDay(i, n, a); + return r || (i = this.calculateEndDate(i, n, "day"), n > 0 ? i = this.$gantt.date.day_start(i) : (i = this.$gantt.date.day_start(i), i = this.$gantt.date.add(i, 1, "day"), i = new Date(i.valueOf() - 1)), a = this._getWorkHours(i), r = this._findClosestTimeInDay(i, n, a)), n < 0 && (r = this.$gantt.date.add(r, -1, e)), r; +}, _getClosestWorkTimeGeneric: function(t, e, n) { + if (e === "hour" || e === "minute") return this._getClosestWorkMinute(t, e, n); + for (var i = this._getUnitOrder(e), a = this.units[i - 1], r = t, s = 0; !this._isWorkTime(r, e) && (!a || this._isWorkTime(r, a) || (r = n > 0 ? this._getClosestWorkTimeFuture(r, a) : this._getClosestWorkTimePast(r, a), !this._isWorkTime(r, e))); ) { + if (++s > 3e3) return this.$gantt.assert(!1, "Invalid working time check"), !1; + var o = r.getTimezoneOffset(); + r = this.$gantt.date.add(r, n, e), r = this.$gantt._correct_dst_change(r, o, n, e), this.$gantt.date[e + "_start"] && (r = this.$gantt.date[e + "_start"](r)); + } + return r; +}, hasWorkTime: function() { + var t = this.getConfig(), e = t.dates; + for (var n in t.dates) ; + var i = this._checkWorkHours(t.hours), a = !1; + return [0, 1, 2, 3, 4, 5, 6].forEach((function(r) { + if (!a) { + var s = e[r]; + s === !0 ? a = i : Array.isArray(s) && (a = this._checkWorkHours(s)); + } + }).bind(this)), a; +}, _checkWorkHours: function(t) { + if (t.length === 0) return !1; + for (var e = !1, n = 0; n < t.length; n += 2) t[n] !== t[n + 1] && (e = !0); + return e; +}, _isMinutePrecision: function(t) { + let e = !1; + return this._getWorkHours(t).forEach(function(n) { + (n.startMinute % 60 || n.endMinute % 60) && (e = !0); + }), e; +} }; +const At = { isLegacyResourceCalendarFormat: function(t) { + if (!t) return !1; + for (var e in t) if (t[e] && typeof t[e] == "object") return !0; + return !1; +}, getResourceProperty: function(t) { + var e = t.resource_calendars, n = t.resource_property; + if (this.isLegacyResourceCalendarFormat(e)) for (var i in t) { + n = i; + break; + } + return n; +}, getCalendarIdFromLegacyConfig: function(t, e) { + if (e) for (var n in e) { + var i = e[n]; + if (t[n]) { + var a = i[t[n]]; + if (a) return a; + } + } + return null; +} }, $i = (Bt = {}, { getCalendarIdFromMultipleResources: function(t, e) { + var n = function(a) { + return a.map(function(r) { + return r && r.resource_id ? r.resource_id : r; + }).sort().join("-"); + }(t); + if (t.length) { + if (t.length === 1) return e.getResourceCalendar(n).id; + if (Bt[n]) return Bt[n].id; + var i = function(a, r) { + return r.mergeCalendars(a.map(function(s) { + var o = s && s.resource_id ? s.resource_id : s; + return r.getResourceCalendar(o); + })); + }(t, e); + return Bt[n] = i, e.addCalendar(i); + } + return null; +} }); +var Bt; +function gn(t) { + this.$gantt = t, this._calendars = {}, this._legacyConfig = void 0, this.$gantt.attachEvent("onGanttReady", (function() { + this.$gantt.config.resource_calendars && (this._isLegacyConfig = At.isLegacyResourceCalendarFormat(this.$gantt.config.resource_calendars)); + }).bind(this)), this.$gantt.attachEvent("onBeforeGanttReady", (function() { + this.createDefaultCalendars(); + }).bind(this)), this.$gantt.attachEvent("onBeforeGanttRender", (function() { + this.createDefaultCalendars(); + }).bind(this)); +} +function me(t, e) { + this.argumentsHelper = e, this.$gantt = t; +} +function fn(t) { + this.$gantt = t.$gantt, this.argumentsHelper = hn(this.$gantt), this.calendarManager = t, this.$disabledCalendar = new me(this.$gantt, this.argumentsHelper); +} +gn.prototype = { _calendars: {}, _convertWorkTimeSettings: function(t) { + var e = t.days; + if (e && !t.dates) { + t.dates = t.dates || {}; + for (var n = 0; n < e.length; n++) t.dates[n] = e[n], e[n] instanceof Array || (t.dates[n] = !!e[n]); + } + return delete t.days, t; +}, mergeCalendars: function() { + var t = [], e = arguments; + if (Array.isArray(e[0])) t = e[0].slice(); + else for (var n = 0; n < arguments.length; n++) t.push(arguments[n]); + var i, a = new _n(); + return t.forEach((function(r) { + i = i ? this._createCalendarFromConfig(a.merge(i, r)) : r; + }).bind(this)), this.createCalendar(i); +}, _createCalendarFromConfig: function(t) { + var e = new pe(this.$gantt, hn(this.$gantt)); + e.id = String(rt()); + var n = this._convertWorkTimeSettings(t); + if (n.customWeeks) for (var i in n.customWeeks) n.customWeeks[i] = this._convertWorkTimeSettings(n.customWeeks[i]); + return e._setConfig(n), e; +}, createCalendar: function(t) { + var e; + return t || (t = {}), L(e = t.getConfig ? G(t.getConfig()) : t.worktime ? G(t.worktime) : G(t), G(this.defaults.fulltime.worktime)), this._createCalendarFromConfig(e); +}, getCalendar: function(t) { + t = t || "global"; + var e = this._calendars[t]; + return e || (this.createDefaultCalendars(), e = this._calendars[t]), e; +}, getCalendars: function() { + var t = []; + for (var e in this._calendars) t.push(this.getCalendar(e)); + return t; +}, _getOwnCalendar: function(t) { + var e = this.$gantt.config; + if (t[e.calendar_property]) return this.getCalendar(t[e.calendar_property]); + if (e.resource_calendars) { + var n; + if (n = this._legacyConfig === !1 ? e.resource_property : At.getResourceProperty(e), Array.isArray(t[n])) e.dynamic_resource_calendars && (i = $i.getCalendarIdFromMultipleResources(t[n], this)); + else if (this._legacyConfig === void 0 && (this._legacyConfig = At.isLegacyResourceCalendarFormat(e.resource_calendars)), this._legacyConfig) var i = At.getCalendarIdFromLegacyConfig(t, e.resource_calendars); + else if (n && t[n] && e.resource_calendars[t[n]]) var a = this.getResourceCalendar(t[n]); + if (i && (a = this.getCalendar(i)), a) return a; + } + return null; +}, getResourceCalendar: function(t) { + if (t == null) return this.getCalendar(); + var e = null; + e = typeof t == "number" || typeof t == "string" ? t : t.id || t.key; + var n = this.$gantt.config, i = n.resource_calendars, a = null; + if (i) { + if (this._legacyConfig === void 0 && (this._legacyConfig = At.isLegacyResourceCalendarFormat(n.resource_calendars)), this._legacyConfig) { + for (var r in i) if (i[r][e]) { + a = i[r][e]; + break; + } + } else a = i[e]; + if (a) return this.getCalendar(a); + } + return this.getCalendar(); +}, getTaskCalendar: function(t) { + var e, n = this.$gantt; + if (t == null) return this.getCalendar(); + if (!(e = typeof t != "number" && typeof t != "string" || !n.isTaskExists(t) ? t : n.getTask(t))) return this.getCalendar(); + var i = this._getOwnCalendar(e), a = !!n.getState().group_mode; + if (!i && n.config.inherit_calendar && n.isTaskExists(e.parent)) { + for (var r = e; n.isTaskExists(r.parent) && (r = n.getTask(r.parent), !n.isSummaryTask(r) || !(i = this._getOwnCalendar(r))); ) ; + a && !i && t.$effective_calendar && (i = this.getCalendar(t.$effective_calendar)); + } + return i || this.getCalendar(); +}, addCalendar: function(t) { + if (!this.isCalendar(t)) { + var e = t.id; + (t = this.createCalendar(t)).id = e; + } + if (t._tryChangeCalendarSettings(function() { + })) { + var n = this.$gantt.config; + return t.id = t.id || rt(), this._calendars[t.id] = t, n.worktimes || (n.worktimes = {}), n.worktimes[t.id] = t.getConfig(), t.id; + } + return this.$gantt.callEvent("onCalendarError", [{ message: "Invalid calendar settings, no worktime available" }, t]), null; +}, deleteCalendar: function(t) { + var e = this.$gantt.config; + return !!t && !!this._calendars[t] && (delete this._calendars[t], e.worktimes && e.worktimes[t] && delete e.worktimes[t], !0); +}, restoreConfigCalendars: function(t) { + for (var e in t) if (!this._calendars[e]) { + var n = t[e], i = this.createCalendar(n); + i.id = e, this.addCalendar(i); + } +}, defaults: { global: { id: "global", worktime: { hours: [8, 12, 13, 17], days: [0, 1, 1, 1, 1, 1, 0] } }, fulltime: { id: "fulltime", worktime: { hours: [0, 24], days: [1, 1, 1, 1, 1, 1, 1] } } }, createDefaultCalendars: function() { + var t = this.$gantt.config; + this.restoreConfigCalendars(this.defaults), this.restoreConfigCalendars(t.worktimes); +}, isCalendar: function(t) { + return [t.isWorkTime, t.setWorkTime, t.getWorkHours, t.unsetWorkTime, t.getClosestWorkTime, t.calculateDuration, t.hasDuration, t.calculateEndDate].every(function(e) { + return e instanceof Function; + }); +} }, me.prototype = { getWorkHours: function() { + return [0, 24]; +}, setWorkTime: function() { + return !0; +}, unsetWorkTime: function() { + return !0; +}, isWorkTime: function() { + return !0; +}, getClosestWorkTime: function(t) { + return this.argumentsHelper.getClosestWorkTimeArguments.apply(this.argumentsHelper, arguments).date; +}, calculateDuration: function() { + var t = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments), e = t.start_date, n = t.end_date, i = t.unit, a = t.step; + return this._calculateDuration(e, n, i, a); +}, _calculateDuration: function(t, e, n, i) { + var a = this.$gantt.date, r = { week: 6048e5, day: 864e5, hour: 36e5, minute: 6e4 }, s = 0; + if (r[n]) s = Math.round((e - t) / (i * r[n])); + else { + for (var o = new Date(t), l = new Date(e); o.valueOf() < l.valueOf(); ) s += 1, o = a.add(o, i, n); + o.valueOf() != e.valueOf() && (s += (l - o) / (a.add(o, i, n) - o)); + } + return Math.round(s); +}, hasDuration: function() { + var t = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments), e = t.start_date, n = t.end_date; + return !!t.unit && (e = new Date(e), n = new Date(n), e.valueOf() < n.valueOf()); +}, hasWorkTime: function() { + return !0; +}, equals: function(t) { + return t instanceof me; +}, calculateEndDate: function() { + var t = this.argumentsHelper.calculateEndDateArguments.apply(this.argumentsHelper, arguments), e = t.start_date, n = t.duration, i = t.unit, a = t.step; + return this.$gantt.date.add(e, a * n, i); +} }, fn.prototype = { _getCalendar: function(t) { + var e; + if (this.$gantt.config.work_time) { + var n = this.calendarManager; + t.task ? e = n.getTaskCalendar(t.task) : t.id ? e = n.getTaskCalendar(t) : t.calendar && (e = t.calendar), e || (e = n.getTaskCalendar()); + } else e = this.$disabledCalendar; + return e; +}, getWorkHours: function(t) { + return t = this.argumentsHelper.getWorkHoursArguments.apply(this.argumentsHelper, arguments), this._getCalendar(t).getWorkHours(t.date); +}, setWorkTime: function(t, e) { + return t = this.argumentsHelper.setWorkTimeArguments.apply(this.argumentsHelper, arguments), e || (e = this.calendarManager.getCalendar()), e.setWorkTime(t); +}, unsetWorkTime: function(t, e) { + return t = this.argumentsHelper.unsetWorkTimeArguments.apply(this.argumentsHelper, arguments), e || (e = this.calendarManager.getCalendar()), e.unsetWorkTime(t); +}, isWorkTime: function(t, e, n, i) { + var a = this.argumentsHelper.isWorkTimeArguments.apply(this.argumentsHelper, arguments); + return (i = this._getCalendar(a)).isWorkTime(a); +}, getClosestWorkTime: function(t) { + return t = this.argumentsHelper.getClosestWorkTimeArguments.apply(this.argumentsHelper, arguments), this._getCalendar(t).getClosestWorkTime(t); +}, calculateDuration: function() { + var t = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments); + return this._getCalendar(t).calculateDuration(t); +}, hasDuration: function() { + var t = this.argumentsHelper.hasDurationArguments.apply(this.argumentsHelper, arguments); + return this._getCalendar(t).hasDuration(t); +}, calculateEndDate: function(t) { + return t = this.argumentsHelper.calculateEndDateArguments.apply(this.argumentsHelper, arguments), this._getCalendar(t).calculateEndDate(t); +} }; +const wi = { create: function(t, e) { + return { getWorkHours: function(n) { + return e.getWorkHours(n); + }, setWorkTime: function(n) { + return e.setWorkTime(n); + }, unsetWorkTime: function(n) { + e.unsetWorkTime(n); + }, isWorkTime: function(n, i, a) { + return e.isWorkTime(n, i, a); + }, getClosestWorkTime: function(n) { + return e.getClosestWorkTime(n); + }, calculateDuration: function(n, i, a) { + return e.calculateDuration(n, i, a); + }, _hasDuration: function(n, i, a) { + return e.hasDuration(n, i, a); + }, calculateEndDate: function(n, i, a, r) { + return e.calculateEndDate(n, i, a, r); + }, mergeCalendars: R(t.mergeCalendars, t), createCalendar: R(t.createCalendar, t), addCalendar: R(t.addCalendar, t), getCalendar: R(t.getCalendar, t), getCalendars: R(t.getCalendars, t), getResourceCalendar: R(t.getResourceCalendar, t), getTaskCalendar: R(t.getTaskCalendar, t), deleteCalendar: R(t.deleteCalendar, t) }; +} }; +function Si(t) { + t.isUnscheduledTask = function(s) { + return t.assert(s && s instanceof Object, "Invalid argument task=" + s + " of gantt.isUnscheduledTask. Task object was expected"), !!s.unscheduled || !s.start_date; + }, t._isAllowedUnscheduledTask = function(s) { + return !(!s.unscheduled || !t.config.show_unscheduled); + }, t._isTaskInTimelineLimits = function(s) { + var o = s.start_date ? s.start_date.valueOf() : null, l = s.end_date ? s.end_date.valueOf() : null; + return !!(o && l && o <= this._max_date.valueOf() && l >= this._min_date.valueOf()); + }, t.isTaskVisible = function(s) { + if (!this.isTaskExists(s)) return !1; + var o = this.getTask(s); + return !(!this._isAllowedUnscheduledTask(o) && !this._isTaskInTimelineLimits(o)) && this.getGlobalTaskIndex(s) >= 0; + }, t._getProjectEnd = function() { + if (t.config.project_end) return t.config.project_end; + var s = t.getTaskByTime(); + return (s = s.sort(function(o, l) { + return +o.end_date > +l.end_date ? 1 : -1; + })).length ? s[s.length - 1].end_date : null; + }, t._getProjectStart = function() { + if (t.config.project_start) return t.config.project_start; + if (t.config.start_date) return t.config.start_date; + if (t.getState().min_date) return t.getState().min_date; + var s = t.getTaskByTime(); + return (s = s.sort(function(o, l) { + return +o.start_date > +l.start_date ? 1 : -1; + })).length ? s[0].start_date : null; + }; + var e = function(s, o) { + var l = !!(o && o != t.config.root_id && t.isTaskExists(o)) && t.getTask(o), d = null; + if (l) if (t.config.schedule_from_end) d = t.calculateEndDate({ start_date: l.end_date, duration: -t.config.duration_step, task: s }); + else { + if (!l.start_date) return e(l, t.getParent(l)); + d = l.start_date; + } + else if (t.config.schedule_from_end) d = t.calculateEndDate({ start_date: t._getProjectEnd(), duration: -t.config.duration_step, task: s }); + else { + const c = t.getTaskByIndex(0), u = t.config.start_date || t.getState().min_date; + d = c ? c.start_date ? c.start_date : c.end_date ? t.calculateEndDate({ start_date: c.end_date, duration: -t.config.duration_step, task: s }) : u : u; + } + return t.assert(d, "Invalid dates"), new Date(d); + }; + t._set_default_task_timing = function(s) { + s.start_date = s.start_date || e(s, t.getParent(s)), s.duration = s.duration || t.config.duration_step, s.end_date = s.end_date || t.calculateEndDate(s); + }, t.createTask = function(s, o, l) { + return s = s || {}, t.defined(s.id) || (s.id = t.uid()), s.start_date || (s.start_date = e(s, o)), s.text === void 0 && (s.text = t.locale.labels.new_task), s.duration === void 0 && (s.duration = 1), this.isTaskExists(o) && (this.setParent(s, o, !0), this.getTask(o).$open = !0), this.callEvent("onTaskCreated", [s]) ? (this.config.details_on_create ? (t.isTaskExists(s.id) ? t.getTask(s.id).$index != s.$index && (s.start_date && typeof s.start_date == "string" && (s.start_date = this.date.parseDate(s.start_date, "parse_date")), s.end_date && typeof s.end_date == "string" && (s.end_date = this.date.parseDate(s.end_date, "parse_date")), this.$data.tasksStore.updateItem(s.id, s)) : (s.$new = !0, this.silent(function() { + t.$data.tasksStore.addItem(s, l); + })), this.selectTask(s.id), this.refreshData(), this.showLightbox(s.id)) : this.addTask(s, o, l) && (this.showTask(s.id), this.selectTask(s.id)), s.id) : null; + }, t._update_flags = function(s, o) { + var l = t.$data.tasksStore; + s === void 0 ? (this._lightbox_id = null, l.silent(function() { + l.unselect(); + }), this.getSelectedTasks && this._multiselect.reset(), this._tasks_dnd && this._tasks_dnd.drag && (this._tasks_dnd.drag.id = null)) : (this._lightbox_id == s && (this._lightbox_id = o), l.getSelectedId() == s && l.silent(function() { + l.unselect(s), l.select(o); + }), this._tasks_dnd && this._tasks_dnd.drag && this._tasks_dnd.drag.id == s && (this._tasks_dnd.drag.id = o)); + }; + var n = function(s, o) { + var l = t.getTaskType(s.type), d = { type: l, $no_start: !1, $no_end: !1, scheduled_summary: !1 }; + return l === t.config.types.project && s.auto_scheduling === !1 && (d.scheduled_summary = !0), o || l != s.$rendered_type ? (l == t.config.types.project ? d.$no_end = d.$no_start = !0 : l != t.config.types.milestone && (d.$no_end = !(s.end_date || s.duration), d.$no_start = !s.start_date, t._isAllowedUnscheduledTask(s) && (d.$no_end = d.$no_start = !1)), d) : (d.$no_start = s.$no_start, d.$no_end = s.$no_end, d); + }; + function i(s) { + s.$effective_calendar = t.getTaskCalendar(s).id, s.start_date = t.getClosestWorkTime({ dir: "future", date: s.start_date, unit: t.config.duration_unit, task: s }), s.end_date = t.calculateEndDate(s); + } + function a(s, o, l, d) { + const c = { start: "start_date", end: "end_date" }, u = { start: "$auto_start_date", end: "$auto_end_date" }; + let h; + h = s.type === t.config.types.project && s.auto_scheduling === !1 ? u : c, o.$no_start && (s[h.start] = l ? new Date(l) : e(s, this.getParent(s))), o.$no_end && (s[h.end] = d ? new Date(d) : this.calculateEndDate({ start_date: s[h.start], duration: this.config.duration_step, task: s })), (o.$no_start || o.$no_end) && this._init_task_timing(s); + } + function r(s) { + var o = null, l = null, d = s !== void 0 ? s : t.config.root_id, c = []; + return t.eachTask(function(u) { + const h = t.getTaskType(u.type) == t.config.types.project && u.auto_scheduling === !1; + t.getTaskType(u.type) == t.config.types.project && !h || t.isUnscheduledTask(u) || (u.rollup && c.push(u.id), !u.start_date || u.$no_start && !h || o && !(o > u.start_date.valueOf()) || (o = u.start_date.valueOf()), !u.end_date || u.$no_end && !h || l && !(l < u.end_date.valueOf()) || (l = u.end_date.valueOf())); + }, d), { start_date: o ? new Date(o) : null, end_date: l ? new Date(l) : null, rollup: c }; + } + t._init_task_timing = function(s) { + var o = n(s, !0), l = s.$rendered_type != o.type, d = o.type; + l && (s.$no_start = o.$no_start, s.$no_end = o.$no_end, s.$rendered_type = o.type), l && d != this.config.types.milestone && d == this.config.types.project && (this._set_default_task_timing(s), s.$calculate_duration = !1), d == this.config.types.milestone && (s.end_date = s.start_date), s.start_date && s.end_date && s.$calculate_duration !== !1 && (s.duration = this.calculateDuration(s)), s.$calculate_duration || (s.$calculate_duration = !0), s.end_date || (s.end_date = s.start_date), s.duration = s.duration || 0, this.config.min_duration === 0 && s.duration === 0 && (s.$no_end = !1); + var c = this.getTaskCalendar(s); + s.$effective_calendar && s.$effective_calendar !== c.id && (i(s), this.config.inherit_calendar && this.isSummaryTask(s) && this.eachTask(function(u) { + i(u); + }, s.id)), s.$effective_calendar = c.id; + }, t.isSummaryTask = function(s) { + t.assert(s && s instanceof Object, "Invalid argument task=" + s + " of gantt.isSummaryTask. Task object was expected"); + var o = n(s); + return !(!o.$no_end && !o.$no_start); + }, t.resetProjectDates = function(s) { + var o = n(s); + if (o.$no_end || o.$no_start) { + var l = r(s.id); + a.call(this, s, o, l.start_date, l.end_date), s.$rollup = l.rollup; + } + }, t.getSubtaskDuration = function(s) { + var o = 0, l = s !== void 0 ? s : t.config.root_id; + return this.eachTask(function(d) { + this.getTaskType(d.type) == t.config.types.project || this.isUnscheduledTask(d) || (o += d.duration); + }, l), o; + }, t.getSubtaskDates = function(s) { + var o = r(s); + return { start_date: o.start_date, end_date: o.end_date }; + }, t._update_parents = function(s, o, l) { + if (s) { + var d = this.getTask(s); + d.rollup && (l = !0); + var c = this.getParent(d), u = n(d), h = !0; + if (l || d.start_date && d.end_date && (u.$no_start || u.$no_end)) { + const y = d.$auto_start_date ? "$auto_start_date" : "start_date", v = d.$auto_end_date ? "$auto_end_date" : "end_date"; + var g = d[y].valueOf(), f = d[v].valueOf(); + t.resetProjectDates(d), l || g != d[y].valueOf() || f != d[v].valueOf() || (h = !1), h && !o && this.refreshTask(d.id, !0), u.scheduled_summary && (h = !0); + } + h && c && this.isTaskExists(c) && this._update_parents(c, o, l); + } + }, t.roundDate = function(s) { + var o = t.getScale(); + Q(s) && (s = { date: s, unit: o ? o.unit : t.config.duration_unit, step: o ? o.step : t.config.duration_step }); + var l, d, c, u = s.date, h = s.step, g = s.unit; + if (!o) return u; + if (g == o.unit && h == o.step && +u >= +o.min_date && +u <= +o.max_date) c = Math.floor(t.columnIndexByDate(u)), o.trace_x[c] || (c -= 1, o.rtl && (c = 0)), d = new Date(o.trace_x[c]), l = t.date.add(d, h, g); + else { + for (c = Math.floor(t.columnIndexByDate(u)), l = t.date[g + "_start"](new Date(o.min_date)), o.trace_x[c] && (l = t.date[g + "_start"](o.trace_x[c])); +l < +u; ) { + var f = (l = t.date[g + "_start"](t.date.add(l, h, g))).getTimezoneOffset(); + l = t._correct_dst_change(l, f, l, g), t.date[g + "_start"] && (l = t.date[g + "_start"](l)); + } + d = t.date.add(l, -1 * h, g); + } + return s.dir && s.dir == "future" ? l : s.dir && s.dir == "past" || Math.abs(u - d) < Math.abs(l - u) ? d : l; + }, t.correctTaskWorkTime = function(s) { + t.config.work_time && t.config.correct_work_time && (this.isWorkTime(s.start_date, void 0, s) ? this.isWorkTime(new Date(+s.end_date - 1), void 0, s) || (s.end_date = this.calculateEndDate(s)) : (s.start_date = this.getClosestWorkTime({ date: s.start_date, dir: "future", task: s }), s.end_date = this.calculateEndDate(s))); + }, t.attachEvent("onBeforeTaskUpdate", function(s, o) { + return t._init_task_timing(o), !0; + }), t.attachEvent("onBeforeTaskAdd", function(s, o) { + return t._init_task_timing(o), !0; + }), t.attachEvent("onAfterTaskMove", function(s, o, l) { + return t._init_task_timing(t.getTask(s)), !0; + }); +} +function Be(t, e) { + var n, i = t.config.container_resize_timeout || 20; + let a = ze(t); + if (t.config.container_resize_method == "timeout") l(); + else try { + t.event(e, "resize", function() { + if (t.$scrollbarRepaint) t.$scrollbarRepaint = null; + else { + let d = ze(t); + if (a.x == d.x && a.y == d.y) return; + a = d, r(); + } + }); + } catch { + l(); + } + function r() { + clearTimeout(n), n = setTimeout(function() { + t.$destroyed || t.render(); + }, i); + } + var s = t.$root.offsetHeight, o = t.$root.offsetWidth; + function l() { + t.$root.offsetHeight == s && t.$root.offsetWidth == o || r(), s = t.$root.offsetHeight, o = t.$root.offsetWidth, setTimeout(l, i); + } +} +function ze(t) { + return { x: t.$root.offsetWidth, y: t.$root.offsetHeight }; +} +function Ti(t) { + t.assert = /* @__PURE__ */ function(r) { + return function(s, o) { + s || r.config.show_errors && r.callEvent("onError", [o]) !== !1 && (r.message ? r.message({ type: "error", text: o, expire: -1 }) : console.log(o)); + }; + }(t); + var e = "Invalid value of the first argument of `gantt.init`. Supported values: HTMLElement, String (element id).This error means that either invalid object is passed into `gantt.init` or that the element with the specified ID doesn't exist on the page when `gantt.init` is called."; + function n(r) { + if (!r || typeof r == "string" && document.getElementById(r) || function(s) { + try { + s.cloneNode(!1); + } catch { + return !1; + } + return !0; + }(r)) return !0; + throw t.assert(!1, e), new Error(e); + } + t.init = function(r, s, o) { + t.env.isNode ? r = null : n(r), s && o && (this.config.start_date = this._min_date = new Date(s), this.config.end_date = this._max_date = new Date(o)), this.date.init(), this.init = function(l) { + t.env.isNode ? l = null : n(l), this.$container && this.$container.parentNode && (this.$container.parentNode.removeChild(this.$container), this.$container = null), this.$layout && this.$layout.clear(), this._reinit(l); + }, this._reinit(r); + }, t._quickRefresh = function(r) { + for (var s = this._getDatastores.call(this), o = 0; o < s.length; o++) s[o]._quick_refresh = !0; + for (r(), o = 0; o < s.length; o++) s[o]._quick_refresh = !1; + }; + var i = (function() { + this._clearTaskLayers && this._clearTaskLayers(), this._clearLinkLayers && this._clearLinkLayers(), this.$layout && (this.$layout.destructor(), this.$layout = null, this.$ui.reset()); + }).bind(t), a = (function() { + j(t) || (this.$root.innerHTML = "", this.$root.gantt = this, _e(this), this.config.layout.id = "main", this.$layout = this.$ui.createView("layout", this.$root, this.config.layout), this.$layout.attachEvent("onBeforeResize", function() { + for (var r = t.$services.getService("datastores"), s = 0; s < r.length; s++) t.getDatastore(r[s]).filter(), t.$data.tasksStore._skipTaskRecalculation ? t.$data.tasksStore._skipTaskRecalculation != "lightbox" && (t.$data.tasksStore._skipTaskRecalculation = !1) : t.getDatastore(r[s]).callEvent("onBeforeRefreshAll", []); + }), this.$layout.attachEvent("onResize", function() { + t._quickRefresh(function() { + t.refreshData(); + }); + }), this.callEvent("onGanttLayoutReady", []), this.$layout.render(), this.$container = this.$layout.$container.firstChild, function(r) { + window.getComputedStyle(r.$root).getPropertyValue("position") == "static" && (r.$root.style.position = "relative"); + var s = document.createElement("iframe"); + s.className = "gantt_container_resize_watcher", s.tabIndex = -1, r.config.wai_aria_attributes && (s.setAttribute("role", "none"), s.setAttribute("aria-hidden", !0)), (window.Sfdc || window.$A || window.Aura) && (r.config.container_resize_method = "timeout"), r.$root.appendChild(s), s.contentWindow ? Be(r, s.contentWindow) : (r.$root.removeChild(s), Be(r, window)); + }(this)); + }).bind(t); + t.resetLayout = function() { + i(), a(), this.render(); + }, t._reinit = function(r) { + this.callEvent("onBeforeGanttReady", []), this._update_flags(), this.$services.getService("templateLoader").initTemplates(this), i(), this.$root = null, r && (this.$root = be(r), a(), this.$mouseEvents.reset(this.$root), function(s) { + s.$container && !s.config.autosize && s.$root.offsetHeight < 50 && console.warn(`The Gantt container has a small height, so you cannot see its content. If it is not intended, you need to set the 'height' style rule to the container: +https://docs.dhtmlx.com/gantt/faq.html#theganttchartisntrenderedcorrectly`); + }(t)), this.callEvent("onTemplatesReady", []), this.callEvent("onGanttReady", []), this.render(); + }, t.$click = { buttons: { edit: function(r) { + t.isReadonly(t.getTask(r)) || t.showLightbox(r); + }, delete: function(r) { + var s = t.getTask(r); + if (!t.isReadonly(s)) { + var o = t.locale.labels.confirm_deleting, l = t.locale.labels.confirm_deleting_title; + t._simple_confirm(o, l, function() { + t.isTaskExists(r) && (s.$new ? (t.$data.tasksStore._skipTaskRecalculation = "lightbox", t.silent(function() { + t.deleteTask(r, !0); + }), t.$data.tasksStore._skipTaskRecalculation = !1, t.refreshData()) : (t.$data.tasksStore._skipTaskRecalculation = !0, t.deleteTask(r))), t.hideLightbox(); + }); + } + } } }, t.render = function() { + var r; + if (this.callEvent("onBeforeGanttRender", []), !j(t)) { + !this.config.sort && this._sort && (this._sort = void 0), this.$root && (this.config.rtl ? (this.$root.classList.add("gantt_rtl"), this.$root.firstChild.classList.add("gantt_rtl")) : (this.$root.classList.remove("gantt_rtl"), this.$root.firstChild.classList.remove("gantt_rtl"))); + var s = this.getScrollState(), o = s ? s.x : 0; + this._getHorizontalScrollbar() && (o = this._getHorizontalScrollbar().$config.codeScrollLeft || o || 0), r = null, o && (r = t.dateFromPos(o + this.config.task_scroll_offset)); + } + if (_e(this), j(t)) t.refreshData(); + else { + this.$layout.$config.autosize = this.config.autosize; + var l = this.config.preserve_scroll; + if (this.config.preserve_scroll = !1, this.$layout.resize(), this.config.preserve_scroll = l, this.config.preserve_scroll && s) { + if (o || s.y) { + var d = t.getScrollState(); + if (+r != +t.dateFromPos(d.x) || d.y != s.y) { + o = null; + var c = null; + r && (o = Math.max(t.posFromDate(r) - t.config.task_scroll_offset, 0)), s.y && (c = s.y), t.scrollTo(o, c); + } + } + var u = t.$ui.getView("grid"); + if (u) { + var h = u.$config.scrollY, g = t.$ui.getView(h); + g && (t.utils.dom.isChildOf(g.$view, t.$container) || u.scrollTo(void 0, 0)); + } + } + } + this.callEvent("onGanttRender", []); + }, t.setSizes = t.render, t.getTaskRowNode = function(r) { + for (var s = this.$grid_data.childNodes, o = this.config.task_attribute, l = 0; l < s.length; l++) + if (s[l].getAttribute && s[l].getAttribute(o) == r) return s[l]; + return null; + }, t.changeLightboxType = function(r) { + if (this.getLightboxType() == r) return !0; + t._silent_redraw_lightbox(r); + }, t._get_link_type = function(r, s) { + var o = null; + return r && s ? o = t.config.links.start_to_start : !r && s ? o = t.config.links.finish_to_start : r || s ? r && !s && (o = t.config.links.start_to_finish) : o = t.config.links.finish_to_finish, o; + }, t.isLinkAllowed = function(r, s, o, l) { + var d = null; + if (!(d = typeof r == "object" ? r : { source: r, target: s, type: this._get_link_type(o, l) }) || !(d.source && d.target && d.type) || d.source == d.target) return !1; + var c = !0; + return this.checkEvent("onLinkValidation") && (c = this.callEvent("onLinkValidation", [d])), c; + }, t._correct_dst_change = function(r, s, o, l) { + var d = jt(l) * o; + if (d > 3600 && d < 86400) { + var c = r.getTimezoneOffset() - s; + c && (r = t.date.add(r, c, "minute")); + } + return r; + }, t.isSplitTask = function(r) { + return t.assert(r && r instanceof Object, "Invalid argument task=" + r + " of gantt.isSplitTask. Task object was expected"), this.$data.tasksStore._isSplitItem(r); + }, t._is_icon_open_click = function(r) { + if (!r) return !1; + var s = r.target || r.srcElement; + if (!s || !s.className) return !1; + var o = Z(s); + return o.indexOf("gantt_tree_icon") !== -1 && (o.indexOf("gantt_close") !== -1 || o.indexOf("gantt_open") !== -1); + }; +} +const Ci = { date: { month_full: ["كانون الثاني", "شباط", "آذار", "نيسان", "أيار", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"], month_short: ["يناير", "فبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"], day_full: ["الأحد", "الأثنين", "ألثلاثاء", "الأربعاء", "ألحميس", "ألجمعة", "السبت"], day_short: ["احد", "اثنين", "ثلاثاء", "اربعاء", "خميس", "جمعة", "سبت"] }, labels: { new_task: "مهمة جديد", icon_save: "اخزن", icon_cancel: "الغاء", icon_details: "تفاصيل", icon_edit: "تحرير", icon_delete: "حذف", confirm_closing: "التغييرات سوف تضيع, هل انت متأكد؟", confirm_deleting: "الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟", section_description: "الوصف", section_time: "الفترة الزمنية", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "الغاء", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Ei = { date: { month_full: ["Студзень", "Люты", "Сакавік", "Красавік", "Maй", "Чэрвень", "Ліпень", "Жнівень", "Верасень", "Кастрычнік", "Лістапад", "Снежань"], month_short: ["Студз", "Лют", "Сак", "Крас", "Maй", "Чэр", "Ліп", "Жнів", "Вер", "Каст", "Ліст", "Снеж"], day_full: ["Нядзеля", "Панядзелак", "Аўторак", "Серада", "Чацвер", "Пятніца", "Субота"], day_short: ["Нд", "Пн", "Аўт", "Ср", "Чцв", "Пт", "Сб"] }, labels: { new_task: "Новае заданне", icon_save: "Захаваць", icon_cancel: "Адмяніць", icon_details: "Дэталі", icon_edit: "Змяніць", icon_delete: "Выдаліць", confirm_closing: "", confirm_deleting: "Падзея будзе выдалена незваротна, працягнуць?", section_description: "Апісанне", section_time: "Перыяд часу", section_type: "Тып", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "ІСР", column_text: "Задача", column_start_date: "Пачатак", column_duration: "Працяг", column_add: "", link: "Сувязь", confirm_link_deleting: "будзе выдалена", link_start: "(пачатак)", link_end: "(канец)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Хвiлiна", hours: "Гадзiна", days: "Дзень", weeks: "Тыдзень", months: "Месяц", years: "Год", message_ok: "OK", message_cancel: "Адмяніць", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Di = { date: { month_full: ["Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"], month_short: ["Gen", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Oct", "Nov", "Des"], day_full: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"], day_short: ["Dg", "Dl", "Dm", "Dc", "Dj", "Dv", "Ds"] }, labels: { new_task: "Nova tasca", icon_save: "Guardar", icon_cancel: "Cancel·lar", icon_details: "Detalls", icon_edit: "Editar", icon_delete: "Esborrar", confirm_closing: "", confirm_deleting: "L'esdeveniment s'esborrarà definitivament, continuar ?", section_description: "Descripció", section_time: "Periode de temps", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Cancel·lar", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Ai = { date: { month_full: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"], month_short: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], day_full: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"], day_short: ["日", "一", "二", "三", "四", "五", "六"] }, labels: { new_task: "新任務", icon_save: "保存", icon_cancel: "关闭", icon_details: "详细", icon_edit: "编辑", icon_delete: "删除", confirm_closing: "请确认是否撤销修改!", confirm_deleting: "是否删除日程?", section_description: "描述", section_time: "时间范围", section_type: "类型", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "工作分解结构", column_text: "任务名", column_start_date: "开始时间", column_duration: "持续时间", column_add: "", link: "关联", confirm_link_deleting: "将被删除", link_start: " (开始)", link_end: " (结束)", type_task: "任务", type_project: "项目", type_milestone: "里程碑", minutes: "分钟", hours: "小时", days: "天", weeks: "周", months: "月", years: "年", message_ok: "OK", message_cancel: "关闭", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Ii = { date: { month_full: ["Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"], month_short: ["Led", "Ún", "Bře", "Dub", "Kvě", "Čer", "Čec", "Srp", "Září", "Říj", "List", "Pro"], day_full: ["Neděle", "Pondělí", "Úterý", "Středa", "Čtvrtek", "Pátek", "Sobota"], day_short: ["Ne", "Po", "Út", "St", "Čt", "Pá", "So"] }, labels: { new_task: "Nová práce", icon_save: "Uložit", icon_cancel: "Zpět", icon_details: "Detail", icon_edit: "Edituj", icon_delete: "Smazat", confirm_closing: "", confirm_deleting: "Událost bude trvale smazána, opravdu?", section_description: "Poznámky", section_time: "Doba platnosti", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Zpět", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Mi = { date: { month_full: ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"], day_short: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"] }, labels: { new_task: "Ny opgave", icon_save: "Gem", icon_cancel: "Fortryd", icon_details: "Detaljer", icon_edit: "Tilret", icon_delete: "Slet", confirm_closing: "Dine rettelser vil gå tabt.. Er dy sikker?", confirm_deleting: "Bigivenheden vil blive slettet permanent. Er du sikker?", section_description: "Beskrivelse", section_time: "Tidsperiode", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Fortryd", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Ni = { date: { month_full: [" Januar", " Februar", " März ", " April", " Mai", " Juni", " Juli", " August", " September ", " Oktober", " November ", " Dezember"], month_short: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"], day_full: ["Sonntag", "Montag", "Dienstag", " Mittwoch", " Donnerstag", "Freitag", "Samstag"], day_short: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"] }, labels: { new_task: "Neue Aufgabe", icon_save: "Speichern", icon_cancel: "Abbrechen", icon_details: "Details", icon_edit: "Ändern", icon_delete: "Löschen", confirm_closing: "", confirm_deleting: "Der Eintrag wird gelöscht", section_description: "Beschreibung", section_time: "Zeitspanne", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "PSP", column_text: "Task-Namen", column_start_date: "Startzeit", column_duration: "Dauer", column_add: "", link: "Link", confirm_link_deleting: "werden gelöscht", link_start: "(starten)", link_end: "(ende)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minuten", hours: "Stunden", days: "Tage", weeks: "Wochen", months: "Monate", years: "Jahre", message_ok: "OK", message_cancel: "Abbrechen", section_constraint: "Regel", constraint_type: "Regel", constraint_date: "Regel - Datum", asap: "So bald wie möglich", alap: "So spät wie möglich", snet: "Beginn nicht vor", snlt: "Beginn nicht später als", fnet: "Fertigstellung nicht vor", fnlt: "Fertigstellung nicht später als", mso: "Muss beginnen am", mfo: "Muss fertig sein am", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Li = { date: { month_full: ["Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάϊος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"], month_short: ["ΙΑΝ", "ΦΕΒ", "ΜΑΡ", "ΑΠΡ", "ΜΑΙ", "ΙΟΥΝ", "ΙΟΥΛ", "ΑΥΓ", "ΣΕΠ", "ΟΚΤ", "ΝΟΕ", "ΔΕΚ"], day_full: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Κυριακή"], day_short: ["ΚΥ", "ΔΕ", "ΤΡ", "ΤΕ", "ΠΕ", "ΠΑ", "ΣΑ"] }, labels: { new_task: "Νέα εργασία", icon_save: "Αποθήκευση", icon_cancel: "Άκυρο", icon_details: "Λεπτομέρειες", icon_edit: "Επεξεργασία", icon_delete: "Διαγραφή", confirm_closing: "", confirm_deleting: "Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;", section_description: "Περιγραφή", section_time: "Χρονική περίοδος", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Άκυρο", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Pi = { date: { month_full: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], day_full: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], day_short: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] }, labels: { new_task: "New task", icon_save: "Save", icon_cancel: "Cancel", icon_details: "Details", icon_edit: "Edit", icon_delete: "Delete", confirm_closing: "", confirm_deleting: "Task will be deleted permanently, are you sure?", section_description: "Description", section_time: "Time period", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Cancel", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Ri = { date: { month_full: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"], month_short: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"], day_full: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"], day_short: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"] }, labels: { new_task: "Nueva tarea", icon_save: "Guardar", icon_cancel: "Cancelar", icon_details: "Detalles", icon_edit: "Editar", icon_delete: "Eliminar", confirm_closing: "", confirm_deleting: "El evento se borrará definitivamente, ¿continuar?", section_description: "Descripción", section_time: "Período", section_type: "Tipo", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "EDT", column_text: "Tarea", column_start_date: "Inicio", column_duration: "Duración", column_add: "", link: "Enlace", confirm_link_deleting: "será borrada", link_start: " (inicio)", link_end: " (fin)", type_task: "Tarea", type_project: "Proyecto", type_milestone: "Hito", minutes: "Minutos", hours: "Horas", days: "Días", weeks: "Semanas", months: "Meses", years: "Años", message_ok: "OK", message_cancel: "Cancelar", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Hi = { date: { month_full: ["ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"], month_short: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"], day_full: ["يکشنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"], day_short: ["ی", "د", "س", "چ", "پ", "ج", "ش"] }, labels: { new_task: "وظیفه جدید", icon_save: "ذخیره", icon_cancel: "لغو", icon_details: "جزییات", icon_edit: "ویرایش", icon_delete: "حذف", confirm_closing: "تغییرات شما ازدست خواهد رفت، آیا مطمئن هستید؟", confirm_deleting: "این مورد برای همیشه حذف خواهد شد، آیا مطمئن هستید؟", section_description: "توضیحات", section_time: "مدت زمان", section_type: "نوع", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "عنوان", column_start_date: "زمان شروع", column_duration: "مدت", column_add: "", link: "ارتباط", confirm_link_deleting: "حذف خواهد شد", link_start: " (آغاز)", link_end: " (پایان)", type_task: "وظیفه", type_project: "پروژه", type_milestone: "نگارش", minutes: "دقایق", hours: "ساعات", days: "روزها", weeks: "هفته", months: "ماه‌ها", years: "سال‌ها", message_ok: "تایید", message_cancel: "لغو", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Oi = { date: { month_full: ["Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"], month_short: ["Tam", "Hel", "Maa", "Huh", "Tou", "Kes", "Hei", "Elo", "Syy", "Lok", "Mar", "Jou"], day_full: ["Sunnuntai", "Maanantai", "Tiistai", "Keskiviikko", "Torstai", "Perjantai", "Lauantai"], day_short: ["Su", "Ma", "Ti", "Ke", "To", "Pe", "La"] }, labels: { new_task: "Uusi tehtävä", icon_save: "Tallenna", icon_cancel: "Peru", icon_details: "Tiedot", icon_edit: "Muokkaa", icon_delete: "Poista", confirm_closing: "", confirm_deleting: "Haluatko varmasti poistaa tapahtuman?", section_description: "Kuvaus", section_time: "Aikajakso", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Peru", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Bi = { date: { month_full: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"], month_short: ["Jan", "Fév", "Mar", "Avr", "Mai", "Juin", "Juil", "Aoû", "Sep", "Oct", "Nov", "Déc"], day_full: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"], day_short: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"] }, labels: { new_task: "Nouvelle tâche", icon_save: "Enregistrer", icon_cancel: "Annuler", icon_details: "Détails", icon_edit: "Modifier", icon_delete: "Effacer", confirm_closing: "", confirm_deleting: "L'événement sera effacé sans appel, êtes-vous sûr ?", section_description: "Description", section_time: "Période", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "OTP", column_text: "Nom de la tâche", column_start_date: "Date initiale", column_duration: "Durée", column_add: "", link: "Le lien", confirm_link_deleting: "sera supprimé", link_start: "(début)", link_end: "(fin)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Heures", days: "Jours", weeks: "Semaines", months: "Mois", years: "Années", message_ok: "OK", message_cancel: "Annuler", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, zi = { date: { month_full: ["ינואר", "פברואר", "מרץ", "אפריל", "מאי", "יוני", "יולי", "אוגוסט", "ספטמבר", "אוקטובר", "נובמבר", "דצמבר"], month_short: ["ינו", "פבר", "מרץ", "אפר", "מאי", "יונ", "יול", "אוג", "ספט", "אוק", "נוב", "דצמ"], day_full: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת"], day_short: ["א", "ב", "ג", "ד", "ה", "ו", "ש"] }, labels: { new_task: "משימה חדש", icon_save: "שמור", icon_cancel: "בטל", icon_details: "פרטים", icon_edit: "ערוך", icon_delete: "מחק", confirm_closing: "", confirm_deleting: "ארוע ימחק סופית.להמשיך?", section_description: "הסבר", section_time: "תקופה", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "בטל", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Wi = { date: { month_full: ["Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"], month_short: ["Sij", "Velj", "Ožu", "Tra", "Svi", "Lip", "Srp", "Kol", "Ruj", "Lis", "Stu", "Pro"], day_full: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"], day_short: ["Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"] }, labels: { new_task: "Novi Zadatak", icon_save: "Spremi", icon_cancel: "Odustani", icon_details: "Detalji", icon_edit: "Izmjeni", icon_delete: "Obriši", confirm_closing: "", confirm_deleting: "Zadatak će biti trajno izbrisan, jeste li sigurni?", section_description: "Opis", section_time: "Vremenski Period", section_type: "Tip", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Naziv Zadatka", column_start_date: "Početno Vrijeme", column_duration: "Trajanje", column_add: "", link: "Poveznica", confirm_link_deleting: "će biti izbrisan", link_start: " (početak)", link_end: " (kraj)", type_task: "Zadatak", type_project: "Projekt", type_milestone: "Milestone", minutes: "Minute", hours: "Sati", days: "Dani", weeks: "Tjedni", months: "Mjeseci", years: "Godine", message_ok: "OK", message_cancel: "Odustani", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, ji = { date: { month_full: ["Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"], month_short: ["Jan", "Feb", "Már", "Ápr", "Máj", "Jún", "Júl", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Vasárnap", "Hétfõ", "Kedd", "Szerda", "Csütörtök", "Péntek", "szombat"], day_short: ["Va", "Hé", "Ke", "Sze", "Csü", "Pé", "Szo"] }, labels: { new_task: "Új feladat", icon_save: "Mentés", icon_cancel: "Mégse", icon_details: "Részletek", icon_edit: "Szerkesztés", icon_delete: "Törlés", confirm_closing: "", confirm_deleting: "Az esemény törölve lesz, biztosan folytatja?", section_description: "Leírás", section_time: "Idõszak", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Mégse", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Fi = { date: { month_full: ["Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"], month_short: ["Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Ags", "Sep", "Okt", "Nov", "Des"], day_full: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"], day_short: ["Ming", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"] }, labels: { new_task: "Tugas baru", icon_save: "Simpan", icon_cancel: "Batal", icon_details: "Detail", icon_edit: "Edit", icon_delete: "Hapus", confirm_closing: "", confirm_deleting: "Acara akan dihapus", section_description: "Keterangan", section_time: "Periode", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Batal", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Vi = { date: { month_full: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], month_short: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"], day_full: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], day_short: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"] }, labels: { new_task: "Nuovo compito", icon_save: "Salva", icon_cancel: "Chiudi", icon_details: "Dettagli", icon_edit: "Modifica", icon_delete: "Elimina", confirm_closing: "", confirm_deleting: "Sei sicuro di confermare l'eliminazione?", section_description: "Descrizione", section_time: "Periodo di tempo", section_type: "Tipo", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Nome Attività", column_start_date: "Inizio", column_duration: "Durata", column_add: "", link: "Link", confirm_link_deleting: "sarà eliminato", link_start: " (inizio)", link_end: " (fine)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minuti", hours: "Ore", days: "Giorni", weeks: "Settimane", months: "Mesi", years: "Anni", message_ok: "OK", message_cancel: "Chiudi", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Ui = { date: { month_full: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], month_short: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], day_full: ["日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"], day_short: ["日", "月", "火", "水", "木", "金", "土"] }, labels: { new_task: "新しい仕事", icon_save: "保存", icon_cancel: "キャンセル", icon_details: "詳細", icon_edit: "編集", icon_delete: "削除", confirm_closing: "", confirm_deleting: "イベント完全に削除されます、宜しいですか?", section_description: "デスクリプション", section_time: "期間", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "キャンセル", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, qi = { date: { month_full: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], month_short: ["1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"], day_full: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"], day_short: ["일", "월", "화", "수", "목", "금", "토"] }, labels: { new_task: "이름없는 작업", icon_save: "저장", icon_cancel: "취소", icon_details: "세부 사항", icon_edit: "수정", icon_delete: "삭제", confirm_closing: "", confirm_deleting: "작업을 삭제하시겠습니까?", section_description: "설명", section_time: "기간", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "작업명", column_start_date: "시작일", column_duration: "기간", column_add: "", link: "전제", confirm_link_deleting: "삭제 하시겠습니까?", link_start: " (start)", link_end: " (end)", type_task: "작업", type_project: "프로젝트", type_milestone: "마일스톤", minutes: "분", hours: "시간", days: "일", weeks: "주", months: "달", years: "년", message_ok: "OK", message_cancel: "취소", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }; +class Gi { + constructor(e) { + this.addLocale = (n, i) => { + this._locales[n] = i; + }, this.getLocale = (n) => this._locales[n], this._locales = {}; + for (const n in e) this._locales[n] = e[n]; + } +} +const Yi = { date: { month_full: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], month_short: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], day_full: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"], day_short: ["Søn", "Mon", "Tir", "Ons", "Tor", "Fre", "Lør"] }, labels: { new_task: "Ny oppgave", icon_save: "Lagre", icon_cancel: "Avbryt", icon_details: "Detaljer", icon_edit: "Rediger", icon_delete: "Slett", confirm_closing: "", confirm_deleting: "Hendelsen vil bli slettet permanent. Er du sikker?", section_description: "Beskrivelse", section_time: "Tidsperiode", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Avbryt", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Ji = { date: { month_full: ["Januari", "Februari", "Maart", "April", "Mei", "Juni", "Juli", "Augustus", "September", "Oktober", "November", "December"], month_short: ["Jan", "Feb", "mrt", "Apr", "Mei", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Zondag", "Maandag", "Dinsdag", "Woensdag", "Donderdag", "Vrijdag", "Zaterdag"], day_short: ["Zo", "Ma", "Di", "Wo", "Do", "Vr", "Za"] }, labels: { new_task: "Nieuwe taak", icon_save: "Opslaan", icon_cancel: "Annuleren", icon_details: "Details", icon_edit: "Bewerken", icon_delete: "Verwijderen", confirm_closing: "", confirm_deleting: "Item zal permanent worden verwijderd, doorgaan?", section_description: "Beschrijving", section_time: "Tijd periode", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Taak omschrijving", column_start_date: "Startdatum", column_duration: "Duur", column_add: "", link: "Koppeling", confirm_link_deleting: "zal worden verwijderd", link_start: " (start)", link_end: " (eind)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "minuten", hours: "uren", days: "dagen", weeks: "weken", months: "maanden", years: "jaren", message_ok: "OK", message_cancel: "Annuleren", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Ki = { date: { month_full: ["Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"], month_short: ["Jan", "Feb", "Mar", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Des"], day_full: ["Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag"], day_short: ["Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"] }, labels: { new_task: "Ny oppgave", icon_save: "Lagre", icon_cancel: "Avbryt", icon_details: "Detaljer", icon_edit: "Endre", icon_delete: "Slett", confirm_closing: "Endringer blir ikke lagret, er du sikker?", confirm_deleting: "Oppføringen vil bli slettet, er du sikker?", section_description: "Beskrivelse", section_time: "Tidsperiode", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Avbryt", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Xi = { date: { month_full: ["Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień"], month_short: ["Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru"], day_full: ["Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota"], day_short: ["Nie", "Pon", "Wto", "Śro", "Czw", "Pią", "Sob"] }, labels: { new_task: "Nowe zadanie", icon_save: "Zapisz", icon_cancel: "Anuluj", icon_details: "Szczegóły", icon_edit: "Edytuj", icon_delete: "Usuń", confirm_closing: "", confirm_deleting: "Zdarzenie zostanie usunięte na zawsze, kontynuować?", section_description: "Opis", section_time: "Okres czasu", section_type: "Typ", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Nazwa zadania", column_start_date: "Początek", column_duration: "Czas trwania", column_add: "", link: "Link", confirm_link_deleting: "zostanie usunięty", link_start: " (początek)", link_end: " (koniec)", type_task: "Zadanie", type_project: "Projekt", type_milestone: "Milestone", minutes: "Minuty", hours: "Godziny", days: "Dni", weeks: "Tydzień", months: "Miesiące", years: "Lata", message_ok: "OK", message_cancel: "Anuluj", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Zi = { date: { month_full: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], month_short: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"], day_full: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"], day_short: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"] }, labels: { new_task: "Nova tarefa", icon_save: "Salvar", icon_cancel: "Cancelar", icon_details: "Detalhes", icon_edit: "Editar", icon_delete: "Excluir", confirm_closing: "", confirm_deleting: "As tarefas serão excluidas permanentemente, confirme?", section_description: "Descrição", section_time: "Período", section_type: "Tipo", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "EAP", column_text: "Nome tarefa", column_start_date: "Data início", column_duration: "Duração", column_add: "", link: "Link", confirm_link_deleting: "Será excluído!", link_start: " (início)", link_end: " (fim)", type_task: "Task", type_project: "Projeto", type_milestone: "Marco", minutes: "Minutos", hours: "Horas", days: "Dias", weeks: "Semanas", months: "Meses", years: "Anos", message_ok: "OK", message_cancel: "Cancelar", section_constraint: "Restrição", constraint_type: "Tipo Restrição", constraint_date: "Data restrição", asap: "Mais breve possível", alap: "Mais tarde possível", snet: "Não começar antes de", snlt: "Não começar depois de", fnet: "Não terminar antes de", fnlt: "Não terminar depois de", mso: "Precisa começar em", mfo: "Precisa terminar em", resources_filter_placeholder: "Tipo de filtros", resources_filter_label: "Ocultar vazios", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, Qi = { date: { month_full: ["Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "November", "December"], month_short: ["Ian", "Feb", "Mar", "Apr", "Mai", "Iun", "Iul", "Aug", "Sep", "Oct", "Nov", "Dec"], day_full: ["Duminica", "Luni", "Marti", "Miercuri", "Joi", "Vineri", "Sambata"], day_short: ["Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sa"] }, labels: { new_task: "Sarcina noua", icon_save: "Salveaza", icon_cancel: "Anuleaza", icon_details: "Detalii", icon_edit: "Editeaza", icon_delete: "Sterge", confirm_closing: "Schimbarile nu vor fi salvate, esti sigur?", confirm_deleting: "Evenimentul va fi sters permanent, esti sigur?", section_description: "Descriere", section_time: "Interval", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Anuleaza", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, ta = { date: { month_full: ["Январь", "Февраль", "Март", "Апрель", "Maй", "Июнь", "Июль", "Август", "Сентябрь", "Oктябрь", "Ноябрь", "Декабрь"], month_short: ["Янв", "Фев", "Maр", "Aпр", "Maй", "Июн", "Июл", "Aвг", "Сен", "Окт", "Ноя", "Дек"], day_full: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"], day_short: ["Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"] }, labels: { new_task: "Новое задание", icon_save: "Сохранить", icon_cancel: "Отменить", icon_details: "Детали", icon_edit: "Изменить", icon_delete: "Удалить", confirm_closing: "", confirm_deleting: "Событие будет удалено безвозвратно, продолжить?", section_description: "Описание", section_time: "Период времени", section_type: "Тип", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "ИСР", column_text: "Задача", column_start_date: "Начало", column_duration: "Длительность", column_add: "", link: "Связь", confirm_link_deleting: "будет удалена", link_start: " (начало)", link_end: " (конец)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Минута", hours: "Час", days: "День", weeks: "Неделя", months: "Месяц", years: "Год", message_ok: "OK", message_cancel: "Отменить", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "начните вводить слово для фильтрации", resources_filter_label: "спрятать не установленные", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, ea = { date: { month_full: ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"], day_short: ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"] }, labels: { new_task: "Nova naloga", icon_save: "Shrani", icon_cancel: "Prekliči", icon_details: "Podrobnosti", icon_edit: "Uredi", icon_delete: "Izbriši", confirm_closing: "", confirm_deleting: "Dogodek bo izbrisan. Želite nadaljevati?", section_description: "Opis", section_time: "Časovni okvir", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Prekliči", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, na = { date: { month_full: ["Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "Máj", "Jún", "Júl", "Aug", "Sept", "Okt", "Nov", "Dec"], day_full: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"], day_short: ["Ne", "Po", "Ut", "St", "Št", "Pi", "So"] }, labels: { new_task: "Nová úloha", icon_save: "Uložiť", icon_cancel: "Späť", icon_details: "Detail", icon_edit: "Edituj", icon_delete: "Zmazať", confirm_closing: "Vaše zmeny nebudú uložené. Skutočne?", confirm_deleting: "Udalosť bude natrvalo vymazaná. Skutočne?", section_description: "Poznámky", section_time: "Doba platnosti", section_type: "Type", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Späť", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, ia = { date: { month_full: ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"], month_short: ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"], day_full: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"], day_short: ["Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"] }, labels: { new_task: "Ny uppgift", icon_save: "Spara", icon_cancel: "Avbryt", icon_details: "Detajer", icon_edit: "Ändra", icon_delete: "Ta bort", confirm_closing: "", confirm_deleting: "Är du säker på att du vill ta bort händelsen permanent?", section_description: "Beskrivning", section_time: "Tid", section_type: "Typ", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Uppgiftsnamn", column_start_date: "Starttid", column_duration: "Varaktighet", column_add: "", link: "Länk", confirm_link_deleting: "kommer tas bort", link_start: " (start)", link_end: " (slut)", type_task: "Uppgift", type_project: "Projekt", type_milestone: "Milstolpe", minutes: "Minuter", hours: "Timmar", days: "Dagar", weeks: "Veckor", months: "Månader", years: "År", message_ok: "OK", message_cancel: "Avbryt", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, aa = { date: { month_full: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"], month_short: ["Oca", "Şub", "Mar", "Nis", "May", "Haz", "Tem", "Ağu", "Eyl", "Eki", "Kas", "Ara"], day_full: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"], day_short: ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"] }, labels: { new_task: "Yeni görev", icon_save: "Kaydet", icon_cancel: "İptal", icon_details: "Detaylar", icon_edit: "Düzenle", icon_delete: "Sil", confirm_closing: "", confirm_deleting: "Görev silinecek, emin misiniz?", section_description: "Açıklama", section_time: "Zaman Aralığı", section_type: "Tip", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Görev Adı", column_start_date: "Başlangıç", column_duration: "Süre", column_add: "", link: "Bağlantı", confirm_link_deleting: "silinecek", link_start: " (başlangıç)", link_end: " (bitiş)", type_task: "Görev", type_project: "Proje", type_milestone: "Kilometretaşı", minutes: "Dakika", hours: "Saat", days: "Gün", weeks: "Hafta", months: "Ay", years: "Yıl", message_ok: "OK", message_cancel: "Ýptal", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }, ra = { date: { month_full: ["Січень", "Лютий", "Березень", "Квітень", "Травень", "Червень", "Липень", "Серпень", "Вересень", "Жовтень", "Листопад", "Грудень"], month_short: ["Січ", "Лют", "Бер", "Кві", "Тра", "Чер", "Лип", "Сер", "Вер", "Жов", "Лис", "Гру"], day_full: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"], day_short: ["Нед", "Пон", "Вів", "Сер", "Чет", "Птн", "Суб"] }, labels: { new_task: "Нове завдання", icon_save: "Зберегти", icon_cancel: "Відміна", icon_details: "Деталі", icon_edit: "Редагувати", icon_delete: "Вилучити", confirm_closing: "", confirm_deleting: "Подія вилучиться назавжди. Ви впевнені?", section_description: "Опис", section_time: "Часовий проміжок", section_type: "Тип", section_deadline: "Deadline", section_baselines: "Baselines", column_wbs: "WBS", column_text: "Task name", column_start_date: "Start time", column_duration: "Duration", column_add: "", link: "Link", confirm_link_deleting: "will be deleted", link_start: " (start)", link_end: " (end)", type_task: "Task", type_project: "Project", type_milestone: "Milestone", minutes: "Minutes", hours: "Hours", days: "Days", weeks: "Week", months: "Months", years: "Years", message_ok: "OK", message_cancel: "Відміна", section_constraint: "Constraint", constraint_type: "Constraint type", constraint_date: "Constraint date", asap: "As Soon As Possible", alap: "As Late As Possible", snet: "Start No Earlier Than", snlt: "Start No Later Than", fnet: "Finish No Earlier Than", fnlt: "Finish No Later Than", mso: "Must Start On", mfo: "Must Finish On", resources_filter_placeholder: "type to filter", resources_filter_label: "hide empty", empty_state_text_link: "Click here", empty_state_text_description: "to create your first task", baselines_section_placeholder: "Start adding a new baseline", baselines_add_button: "Add Baseline", baselines_remove_button: "Remove", baselines_remove_all_button: "Remove All", deadline_enable_button: "Set", deadline_disable_button: "Remove" } }; +function sa() { + this.constants = Un, this.version = "9.0.0", this.license = "gpl", this.templates = {}, this.ext = {}, this.keys = { edit_save: this.constants.KEY_CODES.ENTER, edit_cancel: this.constants.KEY_CODES.ESC }; +} +function oa(t) { + var e = new sa(), n = new qn(t), i = {}; + e.plugins = function(l) { + for (var d in l) if (l[d] && !i[d]) { + var c = n.getExtension(d); + c && (c(e), i[d] = !0); + } + return i; + }, e.$services = /* @__PURE__ */ function() { + var l = {}; + return { services: {}, setService: function(d, c) { + l[d] = c; + }, getService: function(d) { + return l[d] ? l[d]() : null; + }, dropService: function(d) { + l[d] && delete l[d]; + }, destructor: function() { + for (var d in l) if (l[d]) { + var c = l[d]; + c && c.destructor && c.destructor(); + } + l = null; + } }; + }(), e.config = Gn(), e.ajax = /* @__PURE__ */ function(l) { + return { cache: !0, method: "get", parse: function(d) { + return typeof d != "string" ? d : (d = d.replace(/^[\s]+/, ""), typeof DOMParser > "u" || pt.isIE ? ot.ActiveXObject !== void 0 && ((c = new ot.ActiveXObject("Microsoft.XMLDOM")).async = "false", c.loadXML(d)) : c = new DOMParser().parseFromString(d, "text/xml"), c); + var c; + }, xmltop: function(d, c, u) { + if (c.status === void 0 || c.status < 400) { + var h = c.responseXML ? c.responseXML || c : this.parse(c.responseText || c); + if (h && h.documentElement !== null && !h.getElementsByTagName("parsererror").length) return h.getElementsByTagName(d)[0]; + } + return u !== -1 && l.callEvent("onLoadXMLError", ["Incorrect XML", arguments[1], u]), document.createElement("DIV"); + }, xpath: function(d, c) { + if (c.nodeName || (c = c.responseXML || c), pt.isIE) return c.selectNodes(d) || []; + for (var u, h = [], g = (c.ownerDocument || c).evaluate(d, c, null, XPathResult.ANY_TYPE, null); u = g.iterateNext(); ) h.push(u); + return h; + }, query: function(d) { + return this._call(d.method || "GET", d.url, d.data || "", d.async || !0, d.callback, d.headers); + }, get: function(d, c, u) { + var h = bt("GET", arguments); + return this.query(h); + }, getSync: function(d, c) { + var u = bt("GET", arguments); + return u.async = !1, this.query(u); + }, put: function(d, c, u, h) { + var g = bt("PUT", arguments); + return this.query(g); + }, del: function(d, c, u) { + var h = bt("DELETE", arguments); + return this.query(h); + }, post: function(d, c, u, h) { + arguments.length == 1 ? c = "" : arguments.length == 2 && typeof c == "function" && (u = c, c = ""); + var g = bt("POST", arguments); + return this.query(g); + }, postSync: function(d, c, u) { + c = c === null ? "" : String(c); + var h = bt("POST", arguments); + return h.async = !1, this.query(h); + }, _call: function(d, c, u, h, g, f) { + return new l.Promise(function(y, v) { + var b = typeof XMLHttpRequest !== void 0 ? new XMLHttpRequest() : new ot.ActiveXObject("Microsoft.XMLHTTP"), _ = navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null; + h && (b.onreadystatechange = function() { + if (b.readyState == 4 || _ && b.readyState == 3) { + if ((b.status != 200 || b.responseText === "") && !l.callEvent("onAjaxError", [b])) return; + setTimeout(function() { + typeof g == "function" && g.apply(ot, [{ xmlDoc: b, filePath: c }]), y(b), typeof g == "function" && (g = null, b = null); + }, 0); + } + }); + var m = !this || !this.cache; + if (d == "GET" && m && (c += (c.indexOf("?") >= 0 ? "&" : "?") + "dhxr" + (/* @__PURE__ */ new Date()).getTime() + "=1"), b.open(d, c, h), f) for (var p in f) b.setRequestHeader(p, f[p]); + else d.toUpperCase() == "POST" || d == "PUT" || d == "DELETE" ? b.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") : d == "GET" && (u = null); + if (b.setRequestHeader("X-Requested-With", "XMLHttpRequest"), b.send(u), !h) return { xmlDoc: b, filePath: c }; + }); + }, urlSeparator: function(d) { + return d.indexOf("?") != -1 ? "&" : "?"; + } }; + }(e), e.date = Yn(e), e.RemoteEvents = Kn; + var a = function(l) { + function d(u) { + return { target: u.target || u.srcElement, pageX: u.pageX, pageY: u.pageY, clientX: u.clientX, clientY: u.clientY, metaKey: u.metaKey, shiftKey: u.shiftKey, ctrlKey: u.ctrlKey, altKey: u.altKey }; + } + function c(u, h) { + this._obj = u, this._settings = h || {}, st(this); + var g = this.getInputMethods(); + this._drag_start_timer = null, l.attachEvent("onGanttScroll", R(function(v, b) { + this.clearDragTimer(); + }, this)); + for (var f = { passive: !1 }, y = 0; y < g.length; y++) R(function(v) { + l.event(u, v.down, R(function(_) { + v.accessor(_) && (h.preventDefault && h.selector && dt(_.target, h.selector) && _.preventDefault(), l.config.touch && _.timeStamp && _.timeStamp - 0 < 300 || (this._settings.original_target = d(_), this._settings.original_element_sizes = { ...xe(_.target, nn(u)), width: _.target.offsetWidth, height: _.target.offsetHeight }, l.config.touch ? (this.clearDragTimer(), this._drag_start_timer = setTimeout(R(function() { + l.getState().lightbox || this.dragStart(u, _, v); + }, this), l.config.touch_drag)) : this.dragStart(u, _, v))); + }, this), f); + var b = document.body; + l.event(b, v.up, R(function(_) { + v.accessor(_) && this.clearDragTimer(); + }, this), f); + }, this)(g[y]); + } + return c.prototype = { traceDragEvents: function(u, h) { + var g = R(function(m) { + return this.dragMove(u, m, h.accessor); + }, this); + R(function(m) { + return this.dragScroll(u, m); + }, this); + var f = R(function(m) { + if (!this.config.started || !W(this.config.updates_per_second) || dn(this, this.config.updates_per_second)) { + var p = g(m); + if (p) try { + m && m.preventDefault && m.cancelable && m.preventDefault(); + } catch { + } + return p; + } + }, this), y = mt(l.$root), v = this.config.mousemoveContainer || mt(l.$root), b = { passive: !1 }, _ = R(function(m) { + return l.eventRemove(v, h.move, f), l.eventRemove(y, h.up, _, b), this.dragEnd(u); + }, this); + l.event(v, h.move, f, b), l.event(y, h.up, _, b); + }, checkPositionChange: function(u) { + var h = u.x - this.config.pos.x, g = u.y - this.config.pos.y; + return Math.sqrt(Math.pow(Math.abs(h), 2) + Math.pow(Math.abs(g), 2)) > this.config.sensitivity; + }, initDnDMarker: function() { + var u = this.config.marker = document.createElement("div"); + u.className = "gantt_drag_marker", u.innerHTML = "", document.body.appendChild(u); + }, backupEventTarget: function(u, h) { + if (l.config.touch) { + var g = h(u), f = g.target || g.srcElement, y = f.cloneNode(!0); + this.config.original_target = d(g), this.config.original_target.target = y, this.config.backup_element = f, f.parentNode.appendChild(y), f.style.display = "none", (this.config.mousemoveContainer || document.body).appendChild(f); + } + }, getInputMethods: function() { + var u = []; + if (u.push({ move: "mousemove", down: "mousedown", up: "mouseup", accessor: function(g) { + return g; + } }), l.config.touch) { + var h = !0; + try { + document.createEvent("TouchEvent"); + } catch { + h = !1; + } + h ? u.push({ move: "touchmove", down: "touchstart", up: "touchend", accessor: function(g) { + return g.touches && g.touches.length > 1 ? null : g.touches[0] ? { target: document.elementFromPoint(g.touches[0].clientX, g.touches[0].clientY), pageX: g.touches[0].pageX, pageY: g.touches[0].pageY, clientX: g.touches[0].clientX, clientY: g.touches[0].clientY } : g; + } }) : ot.navigator.pointerEnabled ? u.push({ move: "pointermove", down: "pointerdown", up: "pointerup", accessor: function(g) { + return g.pointerType == "mouse" ? null : g; + } }) : ot.navigator.msPointerEnabled && u.push({ move: "MSPointerMove", down: "MSPointerDown", up: "MSPointerUp", accessor: function(g) { + return g.pointerType == g.MSPOINTER_TYPE_MOUSE ? null : g; + } }); + } + return u; + }, clearDragTimer: function() { + this._drag_start_timer && (clearTimeout(this._drag_start_timer), this._drag_start_timer = null); + }, dragStart: function(u, h, g) { + this.config && this.config.started || (this.config = { obj: u, marker: null, started: !1, pos: this.getPosition(h), sensitivity: 4 }, this._settings && L(this.config, this._settings, !0), this.traceDragEvents(u, g), l._prevent_touch_scroll = !0, document.body.className += " gantt_noselect", l.config.touch && this.dragMove(u, h, g.accessor)); + }, dragMove: function(u, h, g) { + var f = g(h); + if (!f) return !1; + if (!this.config.marker && !this.config.started) { + var y = this.getPosition(f); + if (l.config.touch || this.checkPositionChange(y)) { + if (this.config.started = !0, this.config.ignore = !1, l._touch_drag = !0, this.callEvent("onBeforeDragStart", [u, this.config.original_target]) === !1) return this.config.ignore = !0, !1; + this.backupEventTarget(h, g), this.initDnDMarker(), l._touch_feedback(), this.callEvent("onAfterDragStart", [u, this.config.original_target]); + } else this.config.ignore = !0; + } + return this.config.ignore ? !1 : h.targetTouches && !f.target ? void 0 : (f.pos = this.getPosition(f), this.config.marker.style.left = f.pos.x + "px", this.config.marker.style.top = f.pos.y + "px", this.callEvent("onDragMove", [u, f]), !0); + }, dragEnd: function(u) { + var h = this.config.backup_element; + h && h.parentNode && h.parentNode.removeChild(h), l._prevent_touch_scroll = !1, this.config.marker && (this.config.marker.parentNode.removeChild(this.config.marker), this.config.marker = null, this.callEvent("onDragEnd", [])), this.config.started = !1, l._touch_drag = !1, document.body.className = document.body.className.replace(" gantt_noselect", ""); + }, getPosition: function(u) { + var h = 0, g = 0; + return u.pageX || u.pageY ? (h = u.pageX, g = u.pageY) : (u.clientX || u.clientY) && (h = u.clientX + document.body.scrollLeft + document.documentElement.scrollLeft, g = u.clientY + document.body.scrollTop + document.documentElement.scrollTop), { x: h, y: g }; + } }, c; + }(e); + e.$services.setService("dnd", function() { + return a; + }); + var r = /* @__PURE__ */ function(l) { + var d = {}; + function c(u, h, g) { + g = g || u; + var f = l.config, y = l.templates; + l.config[u] && d[g] != f[u] && (h && y[g] || (y[g] = l.date.date_to_str(f[u]), d[g] = f[u])); + } + return { initTemplates: function() { + var u = l.locale.labels; + u.gantt_save_btn = u.icon_save, u.gantt_cancel_btn = u.icon_cancel, u.gantt_delete_btn = u.icon_delete; + var h = l.date, g = h.date_to_str, f = l.config, y = g(f.xml_date || f.date_format, f.server_utc), v = h.str_to_date(f.xml_date || f.date_format, f.server_utc); + c("date_scale", !0, void 0, l.config, l.templates), c("date_grid", !0, "grid_date_format", l.config, l.templates), c("task_date", !0, void 0, l.config, l.templates), l.mixin(l.templates, { xml_format: void 0, format_date: y, xml_date: void 0, parse_date: v, progress_text: function(b, _, m) { + return ""; + }, grid_header_class: function(b, _) { + return ""; + }, task_text: function(b, _, m) { + return m.text; + }, task_class: function(b, _, m) { + return ""; + }, task_end_date: function(b) { + return l.templates.task_date(b); + }, grid_row_class: function(b, _, m) { + return ""; + }, task_row_class: function(b, _, m) { + return ""; + }, timeline_cell_class: function(b, _) { + return ""; + }, timeline_cell_content: function(b, _) { + return ""; + }, scale_cell_class: function(b) { + return ""; + }, scale_row_class: function(b) { + return ""; + }, grid_indent: function(b) { + return "
"; + }, grid_folder: function(b) { + return "
"; + }, grid_file: function(b) { + return "
"; + }, grid_open: function(b) { + return "
"; + }, grid_blank: function(b) { + return "
"; + }, date_grid: function(b, _, m) { + return _ && l.isUnscheduledTask(_) && l.config.show_unscheduled ? l.templates.task_unscheduled_time(_) : l.templates.grid_date_format(b, m); + }, task_time: function(b, _, m) { + return l.isUnscheduledTask(m) && l.config.show_unscheduled ? l.templates.task_unscheduled_time(m) : l.templates.task_date(b) + " - " + l.templates.task_end_date(_); + }, task_unscheduled_time: function(b) { + return ""; + }, time_picker: g(f.time_picker), link_class: function(b) { + return ""; + }, link_description: function(b) { + var _ = l.getTask(b.source), m = l.getTask(b.target); + return "" + _.text + "" + m.text + ""; + }, drag_link: function(b, _, m, p) { + b = l.getTask(b); + var k = l.locale.labels, $ = "" + b.text + " " + (_ ? k.link_start : k.link_end) + "
"; + return m && ($ += " " + (m = l.getTask(m)).text + " " + (p ? k.link_start : k.link_end) + "
"), $; + }, drag_link_class: function(b, _, m, p) { + var k = ""; + return b && m && (k = " " + (l.isLinkAllowed(b, m, _, p) ? "gantt_link_allow" : "gantt_link_deny")), "gantt_link_tooltip" + k; + }, tooltip_date_format: h.date_to_str("%Y-%m-%d"), tooltip_text: function(b, _, m) { + return `
Task: ${m.text}
+
Start date: ${l.templates.tooltip_date_format(b)}
+
End date: ${l.templates.tooltip_date_format(_)}
`; + }, baseline_text: function(b, _, m) { + return ""; + } }); + }, initTemplate: c }; + }(e); + e.$services.setService("templateLoader", function() { + return r; + }), st(e); + var s = new Xn(); + s.registerProvider("global", function() { + var l = { min_date: e._min_date, max_date: e._max_date, selected_task: null }; + return e.$data && e.$data.tasksStore && (l.selected_task = e.$data.tasksStore.getSelectedId()), l; + }), e.getState = s.getState, e.$services.setService("state", function() { + return s; + }), L(e, Bn), e.Promise = Zn, e.env = pt, function(l) { + var d = ti.create(); + L(l, d); + var c, u = l.createDatastore({ name: "task", type: "treeDatastore", rootId: function() { + return l.config.root_id; + }, initItem: R(function(_) { + this.defined(_.id) || (_.id = this.uid()), _.start_date && (_.start_date = l.date.parseDate(_.start_date, "parse_date")), _.end_date && (_.end_date = l.date.parseDate(_.end_date, "parse_date")); + var m = null; + (_.duration || _.duration === 0) && (_.duration = m = 1 * _.duration), m && (_.start_date && !_.end_date ? _.end_date = this.calculateEndDate(_) : !_.start_date && _.end_date && (_.start_date = this.calculateEndDate({ start_date: _.end_date, duration: -_.duration, task: _ }))), l.config.deadlines !== !1 && _.deadline && (_.deadline = l.date.parseDate(_.deadline, "parse_date")), _.progress = Number(_.progress) || 0, this._isAllowedUnscheduledTask(_) && this._set_default_task_timing(_), this._init_task_timing(_), _.start_date && _.end_date && this.correctTaskWorkTime(_), _.$source = [], _.$target = []; + var p = this.$data.tasksStore.getItem(_.id); + return p && !W(_.open) && (_.$open = p.$open), _.parent === void 0 && (_.parent = this.config.root_id), _; + }, l), getConfig: function() { + return l.config; + } }), h = l.createDatastore({ name: "link", initItem: R(function(_) { + return this.defined(_.id) || (_.id = this.uid()), _; + }, l) }); + function g(_) { + var m = l.isTaskVisible(_); + if (!m && l.isTaskExists(_)) { + var p = l.getParent(_); + l.isTaskExists(p) && l.isTaskVisible(p) && (p = l.getTask(p), l.isSplitTask(p) && (m = !0)); + } + return m; + } + function f(_) { + if (l.isTaskExists(_.source)) { + var m = l.getTask(_.source); + m.$source = m.$source || [], m.$source.push(_.id); + } + if (l.isTaskExists(_.target)) { + var p = l.getTask(_.target); + p.$target = p.$target || [], p.$target.push(_.id); + } + } + function y(_) { + if (l.isTaskExists(_.source)) { + for (var m = l.getTask(_.source), p = 0; p < m.$source.length; p++) if (m.$source[p] == _.id) { + m.$source.splice(p, 1); + break; + } + } + if (l.isTaskExists(_.target)) { + var k = l.getTask(_.target); + for (p = 0; p < k.$target.length; p++) if (k.$target[p] == _.id) { + k.$target.splice(p, 1); + break; + } + } + } + function v() { + for (var _ = null, m = l.$data.tasksStore.getItems(), p = 0, k = m.length; p < k; p++) (_ = m[p]).$source = [], _.$target = []; + var $ = l.$data.linksStore.getItems(); + for (p = 0, k = $.length; p < k; p++) f($[p]); + } + function b(_) { + var m = _.source, p = _.target; + for (var k in _.events) (function($, w) { + m.attachEvent($, function() { + return p.callEvent(w, Array.prototype.slice.call(arguments)); + }, w); + })(k, _.events[k]); + } + l.attachEvent("onDestroy", function() { + u.destructor(), h.destructor(); + }), l.attachEvent("onLinkValidation", function(_) { + if (l.isLinkExists(_.id) || _.id === "predecessor_generated") return !0; + for (var m = l.getTask(_.source).$source, p = 0; p < m.length; p++) { + var k = l.getLink(m[p]), $ = _.source == k.source, w = _.target == k.target, x = _.type == k.type; + if ($ && w && x) return !1; + } + return !0; + }), u.attachEvent("onBeforeRefreshAll", function() { + if (!u._skipTaskRecalculation) for (var _ = u.getVisibleItems(), m = 0; m < _.length; m++) { + var p = _[m]; + p.$index = m, p.$local_index = l.getTaskIndex(p.id), l.resetProjectDates(p); + } + }), u.attachEvent("onFilterItem", function(_, m) { + if (l.config.show_tasks_outside_timescale) return !0; + var p = null, k = null; + if (l.config.start_date && l.config.end_date) { + if (l._isAllowedUnscheduledTask(m)) return !0; + if (p = l.config.start_date.valueOf(), k = l.config.end_date.valueOf(), +m.start_date > k || +m.end_date < +p) return !1; + } + return !0; + }), u.attachEvent("onIdChange", function(_, m) { + l._update_flags(_, m); + var p = l.getTask(m); + u.isSilent() || (p.$split_subtask || p.rollup) && l.eachParent(function(k) { + l.refreshTask(k.id); + }, m); + }), u.attachEvent("onAfterUpdate", function(_) { + if (l._update_parents(_), l.getState("batchUpdate").batch_update) return !0; + var m = u.getItem(_); + m.$source || (m.$source = []); + for (var p = 0; p < m.$source.length; p++) h.refresh(m.$source[p]); + for (m.$target || (m.$target = []), p = 0; p < m.$target.length; p++) h.refresh(m.$target[p]); + }), u.attachEvent("onBeforeItemMove", function(_, m, p) { + return !Lt(_, l, u) || (console.log("The placeholder task cannot be moved to another position."), !1); + }), u.attachEvent("onAfterItemMove", function(_, m, p) { + var k = l.getTask(_); + this.getNextSibling(_) !== null ? k.$drop_target = this.getNextSibling(_) : this.getPrevSibling(_) !== null ? k.$drop_target = "next:" + this.getPrevSibling(_) : k.$drop_target = "next:null"; + }), u.attachEvent("onStoreUpdated", function(_, m, p) { + if (p == "delete" && l._update_flags(_, null), !l.$services.getService("state").getState("batchUpdate").batch_update) { + if (l.config.fit_tasks && p !== "paint") { + var k = l.getState(); + _e(l); + var $ = l.getState(); + if (+k.min_date != +$.min_date || +k.max_date != +$.max_date) return l.render(), l.callEvent("onScaleAdjusted", []), !0; + } + p == "add" || p == "move" || p == "delete" ? l.$layout && (this.$config.name != "task" || p != "add" && p != "delete" || this._skipTaskRecalculation != "lightbox" && (this._skipTaskRecalculation = !0), l.$layout.resize()) : _ || h.refresh(); + } + }), h.attachEvent("onAfterAdd", function(_, m) { + f(m); + }), h.attachEvent("onAfterUpdate", function(_, m) { + v(); + }), h.attachEvent("onAfterDelete", function(_, m) { + y(m); + }), h.attachEvent("onAfterSilentDelete", function(_, m) { + y(m); + }), h.attachEvent("onBeforeIdChange", function(_, m) { + y(l.mixin({ id: _ }, l.$data.linksStore.getItem(m))), f(l.$data.linksStore.getItem(m)); + }), h.attachEvent("onFilterItem", function(_, m) { + if (!l.config.show_links) return !1; + var p = g(m.source), k = g(m.target); + return !(!p || !k || l._isAllowedUnscheduledTask(l.getTask(m.source)) || l._isAllowedUnscheduledTask(l.getTask(m.target))) && l.callEvent("onBeforeLinkDisplay", [_, m]); + }), c = {}, l.attachEvent("onBeforeTaskDelete", function(_, m) { + return c[_] = ge.getSubtreeLinks(l, _), !0; + }), l.attachEvent("onAfterTaskDelete", function(_, m) { + c[_] && l.$data.linksStore.silent(function() { + for (var p in c[_]) l.isLinkExists(p) && l.$data.linksStore.removeItem(p), y(c[_][p]); + c[_] = null; + }); + }), l.attachEvent("onAfterLinkDelete", function(_, m) { + l.refreshTask(m.source), l.refreshTask(m.target); + }), l.attachEvent("onParse", v), b({ source: h, target: l, events: { onItemLoading: "onLinkLoading", onBeforeAdd: "onBeforeLinkAdd", onAfterAdd: "onAfterLinkAdd", onBeforeUpdate: "onBeforeLinkUpdate", onAfterUpdate: "onAfterLinkUpdate", onBeforeDelete: "onBeforeLinkDelete", onAfterDelete: "onAfterLinkDelete", onIdChange: "onLinkIdChange" } }), b({ source: u, target: l, events: { onItemLoading: "onTaskLoading", onBeforeAdd: "onBeforeTaskAdd", onAfterAdd: "onAfterTaskAdd", onBeforeUpdate: "onBeforeTaskUpdate", onAfterUpdate: "onAfterTaskUpdate", onBeforeDelete: "onBeforeTaskDelete", onAfterDelete: "onAfterTaskDelete", onIdChange: "onTaskIdChange", onBeforeItemMove: "onBeforeTaskMove", onAfterItemMove: "onAfterTaskMove", onFilterItem: "onBeforeTaskDisplay", onItemOpen: "onTaskOpened", onItemClose: "onTaskClosed", onBeforeSelect: "onBeforeTaskSelected", onAfterSelect: "onTaskSelected", onAfterUnselect: "onTaskUnselected" } }), l.$data = { tasksStore: u, linksStore: h }; + }(e), e.dataProcessor = Oe.DEPRECATED_api, e.createDataProcessor = Oe.createDataProcessor, function(l) { + l.ext || (l.ext = {}); + for (var d = [ai, si, li, di, ci, ui, hi, _i, pi], c = 0; c < d.length; c++) d[c] && d[c](l); + }(e), function(l) { + l.getGridColumn = function(d) { + for (var c = l.config.columns, u = 0; u < c.length; u++) if (c[u].name == d) return c[u]; + return null; + }, l.getGridColumns = function() { + return l.config.columns.slice(); + }; + }(e), function(l) { + l.isReadonly = function(d) { + return typeof d != "number" && typeof d != "string" || !l.isTaskExists(d) || (d = l.getTask(d)), (!d || !d[this.config.editable_property]) && (d && d[this.config.readonly_property] || this.config.readonly); + }; + }(e), mi(e), function(l) { + var d = new gn(l), c = new fn(d); + L(l, wi.create(d, c)); + }(e), Si(e), function(l) { + l.getTaskType = function(d) { + return "task"; + }; + }(e), function(l) { + function d() { + return l._cached_functions.update_if_changed(l), l._cached_functions.active || l._cached_functions.activate(), !0; + } + l._cached_functions = { cache: {}, mode: !1, critical_path_mode: !1, wrap_methods: function(u, h) { + if (h._prefetch_originals) for (var g in h._prefetch_originals) h[g] = h._prefetch_originals[g]; + for (h._prefetch_originals = {}, g = 0; g < u.length; g++) this.prefetch(u[g], h); + }, prefetch: function(u, h) { + var g = h[u]; + if (g) { + var f = this; + h._prefetch_originals[u] = g, h[u] = function() { + for (var y = new Array(arguments.length), v = 0, b = arguments.length; v < b; v++) y[v] = arguments[v]; + if (f.active) { + var _ = f.get_arguments_hash(Array.prototype.slice.call(y)); + f.cache[u] || (f.cache[u] = {}); + var m = f.cache[u]; + if (f.has_cached_value(m, _)) return f.get_cached_value(m, _); + var p = g.apply(this, y); + return f.cache_value(m, _, p), p; + } + return g.apply(this, y); + }; + } + return g; + }, cache_value: function(u, h, g) { + this.is_date(g) && (g = new Date(g)), u[h] = g; + }, has_cached_value: function(u, h) { + return u.hasOwnProperty(h); + }, get_cached_value: function(u, h) { + var g = u[h]; + return this.is_date(g) && (g = new Date(g)), g; + }, is_date: function(u) { + return u && u.getUTCDate; + }, get_arguments_hash: function(u) { + for (var h = [], g = 0; g < u.length; g++) h.push(this.stringify_argument(u[g])); + return "(" + h.join(";") + ")"; + }, stringify_argument: function(u) { + return (u.id ? u.id : this.is_date(u) ? u.valueOf() : u) + ""; + }, activate: function() { + this.clear(), this.active = !0; + }, deactivate: function() { + this.clear(), this.active = !1; + }, clear: function() { + this.cache = {}; + }, setup: function(u) { + var h = [], g = ["_isProjectEnd", "_getProjectEnd", "_getSlack"]; + this.mode == "auto" ? u.config.highlight_critical_path && (h = g) : this.mode === !0 && (h = g), this.wrap_methods(h, u); + }, update_if_changed: function(u) { + (this.critical_path_mode != u.config.highlight_critical_path || this.mode !== u.config.optimize_render) && (this.critical_path_mode = u.config.highlight_critical_path, this.mode = u.config.optimize_render, this.setup(u)); + } }, l.attachEvent("onBeforeGanttRender", d), l.attachEvent("onBeforeDataRender", d), l.attachEvent("onBeforeSmartRender", function() { + d(); + }), l.attachEvent("onBeforeParse", d), l.attachEvent("onDataRender", function() { + l._cached_functions.deactivate(); + }); + var c = null; + l.attachEvent("onSmartRender", function() { + c && clearTimeout(c), c = setTimeout(function() { + l._cached_functions.deactivate(); + }, 1e3); + }), l.attachEvent("onBeforeGanttReady", function() { + return l._cached_functions.update_if_changed(l), !0; + }); + }(e), Ti(e), function(l) { + l.destructor = function() { + for (var d in this.clearAll(), this.callEvent("onDestroy", []), this.$root && delete this.$root.gantt, this._eventRemoveAll && this._eventRemoveAll(), this.$layout && this.$layout.destructor(), this.resetLightbox && this.resetLightbox(), this._dp && this._dp.destructor && this._dp.destructor(), this.$services.destructor(), this.detachAllEvents(), this) d.indexOf("$") === 0 && delete this[d]; + this.$destroyed = !0; + }; + }(e); + var o = new Gi({ en: Pi, ar: Ci, be: Ei, ca: Di, cn: Ai, cs: Ii, da: Mi, de: Ni, el: Li, es: Ri, fa: Hi, fi: Oi, fr: Bi, he: zi, hr: Wi, hu: ji, id: Fi, it: Vi, jp: Ui, kr: qi, nb: Yi, nl: Ji, no: Ki, pl: Xi, pt: Zi, ro: Qi, ru: ta, si: ea, sk: na, sv: ia, tr: aa, ua: ra }); + return e.i18n = { addLocale: o.addLocale, setLocale: function(l) { + if (typeof l == "string") { + var d = o.getLocale(l); + d || (d = o.getLocale("en")), e.locale = d; + } else if (l) if (e.locale) for (var c in l) l[c] && typeof l[c] == "object" ? (e.locale[c] || (e.locale[c] = {}), e.mixin(e.locale[c], l[c], !0)) : e.locale[c] = l[c]; + else e.locale = l; + }, getLocale: o.getLocale }, e.i18n.setLocale("en"), e; +} +function la(t) { + var e = "data-dhxbox", n = null; + function i(_, m) { + var p = _.callback; + y.hide(_.box), n = _.box = null, p && p(m); + } + function a(_) { + if (n) { + var m = _.which || _.keyCode, p = !1; + if (v.keyboard) { + if (m == 13 || m == 32) { + var k = _.target || _.srcElement; + Z(k).indexOf("gantt_popup_button") > -1 && k.click ? k.click() : (i(n, !0), p = !0); + } + m == 27 && (i(n, !1), p = !0); + } + return p ? (_.preventDefault && _.preventDefault(), !(_.cancelBubble = !0)) : void 0; + } + } + var r = mt(t.$root) || document; + function s(_) { + s.cover || (s.cover = document.createElement("div"), s.cover.onkeydown = a, s.cover.className = "dhx_modal_cover", document.body.appendChild(s.cover)), s.cover.style.display = _ ? "inline-block" : "none"; + } + function o(_, m, p) { + return "
" + _ + "
"; + } + function l() { + for (var _ = [].slice.apply(arguments, [0]), m = 0; m < _.length; m++) if (_[m]) return _[m]; + } + function d(_, m, p) { + var k = _.tagName ? _ : function(x, S, T) { + var C = document.createElement("div"), E = rt(); + t._waiAria.messageModalAttr(C, E), C.className = " gantt_modal_box gantt-" + x.type, C.setAttribute(e, 1); + var D = ""; + if (x.width && (C.style.width = x.width), x.height && (C.style.height = x.height), x.title && (D += '
' + x.title + "
"), D += '
' + (x.content ? "" : x.text) + '
', S && (D += o(l(x.ok, t.locale.labels.message_ok, "OK"), "ok", !0)), T && (D += o(l(x.cancel, t.locale.labels.message_cancel, "Cancel"), "cancel", !1)), x.buttons) for (var A = 0; A < x.buttons.length; A++) { + var I = x.buttons[A]; + D += typeof I == "object" ? o(I.label, I.css || "gantt_" + I.label.toLowerCase() + "_button", I.value || A) : o(I, I, A); + } + if (D += "
", C.innerHTML = D, x.content) { + var M = x.content; + typeof M == "string" && (M = document.getElementById(M)), M.style.display == "none" && (M.style.display = ""), C.childNodes[x.title ? 1 : 0].appendChild(M); + } + return C.onclick = function(N) { + var P = N.target || N.srcElement; + if (P.className || (P = P.parentNode), dt(P, ".gantt_popup_button")) { + var H = P.getAttribute("data-result"); + i(x, H = H == "true" || H != "false" && H); + } + }, x.box = C, (S || T) && (n = x), C; + }(_, m, p); + _.hidden || s(!0), document.body.appendChild(k); + var $ = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - k.offsetWidth) / 2)), w = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - k.offsetHeight) / 2)); + return _.position == "top" ? k.style.top = "-3px" : k.style.top = w + "px", k.style.left = $ + "px", k.onkeydown = a, y.focus(k), _.hidden && y.hide(k), t.callEvent("onMessagePopup", [k]), k; + } + function c(_) { + return d(_, !0, !1); + } + function u(_) { + return d(_, !0, !0); + } + function h(_) { + return d(_); + } + function g(_, m, p) { + return typeof _ != "object" && (typeof m == "function" && (p = m, m = ""), _ = { text: _, type: m, callback: p }), _; + } + function f(_, m, p, k) { + return typeof _ != "object" && (_ = { text: _, type: m, expire: p, id: k }), _.id = _.id || rt(), _.expire = _.expire || v.expire, _; + } + t.event(r, "keydown", a, !0); + var y = function() { + var _ = g.apply(this, arguments); + return _.type = _.type || "alert", h(_); + }; + y.hide = function(_) { + for (; _ && _.getAttribute && !_.getAttribute(e); ) _ = _.parentNode; + _ && (_.parentNode.removeChild(_), s(!1), t.callEvent("onAfterMessagePopup", [_])); + }, y.focus = function(_) { + setTimeout(function() { + var m = ye(_); + m.length && m[0].focus && m[0].focus(); + }, 1); + }; + var v = function(_, m, p, k) { + switch ((_ = f.apply(this, arguments)).type = _.type || "info", _.type.split("-")[0]) { + case "alert": + return c(_); + case "confirm": + return u(_); + case "modalbox": + return h(_); + default: + return function($) { + v.area || (v.area = document.createElement("div"), v.area.className = "gantt_message_area", v.area.style[v.position] = "5px", document.body.appendChild(v.area)), v.hide($.id); + var w = document.createElement("div"); + return w.innerHTML = "
" + $.text + "
", w.className = "gantt-info gantt-" + $.type, w.onclick = function() { + v.hide($.id), $ = null; + }, t._waiAria.messageInfoAttr(w), v.position == "bottom" && v.area.firstChild ? v.area.insertBefore(w, v.area.firstChild) : v.area.appendChild(w), $.expire > 0 && (v.timers[$.id] = window.setTimeout(function() { + v && v.hide($.id); + }, $.expire)), v.pull[$.id] = w, w = null, $.id; + }(_); + } + }; + v.seed = (/* @__PURE__ */ new Date()).valueOf(), v.uid = rt, v.expire = 4e3, v.keyboard = !0, v.position = "top", v.pull = {}, v.timers = {}, v.hideAll = function() { + for (var _ in v.pull) v.hide(_); + }, v.hide = function(_) { + var m = v.pull[_]; + m && m.parentNode && (window.setTimeout(function() { + m.parentNode.removeChild(m), m = null; + }, 2e3), m.className += " hidden", v.timers[_] && window.clearTimeout(v.timers[_]), delete v.pull[_]); + }; + var b = []; + return t.attachEvent("onMessagePopup", function(_) { + b.push(_); + }), t.attachEvent("onAfterMessagePopup", function(_) { + for (var m = 0; m < b.length; m++) b[m] === _ && (b.splice(m, 1), m--); + }), t.attachEvent("onDestroy", function() { + s.cover && s.cover.parentNode && s.cover.parentNode.removeChild(s.cover); + for (var _ = 0; _ < b.length; _++) b[_].parentNode && b[_].parentNode.removeChild(b[_]); + b = null, v.area && v.area.parentNode && v.area.parentNode.removeChild(v.area), v = null; + }), { alert: function() { + var _ = g.apply(this, arguments); + return _.type = _.type || "confirm", c(_); + }, confirm: function() { + var _ = g.apply(this, arguments); + return _.type = _.type || "alert", u(_); + }, message: v, modalbox: y }; +} +function We(t, e) { + var n = this.$config[t]; + return n ? (n.$extendedConfig || (n.$extendedConfig = !0, Object.setPrototypeOf(n, e)), n) : e; +} +function da(t, e) { + var n, i, a; + L(t, (n = e, { $getConfig: function() { + return i || (i = n ? n.$getConfig() : this.$gantt.config), this.$config.config ? We.call(this, "config", i) : i; + }, $getTemplates: function() { + return a || (a = n ? n.$getTemplates() : this.$gantt.templates), this.$config.templates ? We.call(this, "templates", a) : a; + } })); +} +const ca = function(t) { + var e = {}, n = {}; + function i(a, r, s, o) { + var l = e[a]; + if (!l || !l.create) return !1; + a != "resizer" || s.mode || (o.$config.cols ? s.mode = "x" : s.mode = "y"), a != "viewcell" || s.view != "scrollbar" || s.scroll || (o.$config.cols ? s.scroll = "y" : s.scroll = "x"), (s = G(s)).id || n[s.view] || (s.id = s.view), s.id && !s.css && (s.css = s.id + "_cell"); + var d = new l.create(r, s, this, t); + return l.configure && l.configure(d), da(d, o), d.$id || (d.$id = s.id || t.uid()), d.$parent || typeof r != "object" || (d.$parent = r), d.$config || (d.$config = s), n[d.$id] && (d.$id = t.uid()), n[d.$id] = d, d; + } + return { initUI: function(a, r) { + var s = "cell"; + return a.view ? s = "viewcell" : a.resizer ? s = "resizer" : a.rows || a.cols ? s = "layout" : a.views && (s = "multiview"), i.call(this, s, null, a, r); + }, reset: function() { + n = {}; + }, registerView: function(a, r, s) { + e[a] = { create: r, configure: s }; + }, createView: i, getView: function(a) { + return n[a]; + } }; +}; +var ua = /* @__PURE__ */ function(t) { + return function(e) { + var n = { click: {}, doubleclick: {}, contextMenu: {} }; + function i(h, g, f, y) { + n[h][g] || (n[h][g] = []), n[h][g].push({ handler: f, root: y }); + } + function a(h) { + h = h || window.event; + var g = e.locate(h), f = s(h, n.click), y = !0; + if (g !== null ? y = !e.checkEvent("onTaskClick") || e.callEvent("onTaskClick", [g, h]) : e.callEvent("onEmptyClick", [h]), y) { + if (!o(f, h, g)) return; + switch (h.target.nodeName) { + case "SELECT": + case "INPUT": + return; + } + g && e.getTask(g) && !e._multiselect && e.config.select_task && e.selectTask(g); + } + } + function r(h) { + var g = (h = h || window.event).target || h.srcElement, f = e.locate(g), y = e.locate(g, e.config.link_attribute), v = !e.checkEvent("onContextMenu") || e.callEvent("onContextMenu", [f, y, h]); + return v || (h.preventDefault ? h.preventDefault() : h.returnValue = !1), v; + } + function s(h, g) { + for (var f = h.target || h.srcElement, y = []; f; ) { + var v = t.getClassName(f); + if (v) { + v = v.split(" "); + for (var b = 0; b < v.length; b++) if (v[b] && g[v[b]]) for (var _ = g[v[b]], m = 0; m < _.length; m++) _[m].root && !t.isChildOf(f, _[m].root) || y.push(_[m].handler); + } + f = f.parentNode; + } + return y; + } + function o(h, g, f) { + for (var y = !0, v = 0; v < h.length; v++) { + var b = h[v].call(e, g, f, g.target || g.srcElement); + y = y && !(b !== void 0 && b !== !0); + } + return y; + } + function l(h) { + h = h || window.event; + var g = e.locate(h), f = s(h, n.doubleclick), y = !e.checkEvent("onTaskDblClick") || g === null || e.callEvent("onTaskDblClick", [g, h]); + if (y) { + if (!o(f, h, g)) return; + g !== null && e.getTask(g) && y && e.config.details_on_dblclick && !e.isReadonly(g) && e.showLightbox(g); + } + } + function d(h) { + if (e.checkEvent("onMouseMove")) { + var g = e.locate(h); + e._last_move_event = h, e.callEvent("onMouseMove", [g, h]); + } + } + var c = e._createDomEventScope(); + function u(h) { + c.detachAll(), h && (c.attach(h, "click", a), c.attach(h, "dblclick", l), c.attach(h, "mousemove", d), c.attach(h, "contextmenu", r)); + } + return { reset: u, global: function(h, g, f) { + i(h, g, f, null); + }, delegate: i, detach: function(h, g, f, y) { + if (n[h] && n[h][g]) { + for (var v = n[h], b = v[g], _ = 0; _ < b.length; _++) b[_].root == y && (b.splice(_, 1), _--); + b.length || delete v[g]; + } + }, callHandler: function(h, g, f, y) { + var v = n[h][g]; + if (v) for (var b = 0; b < v.length; b++) (f || v[b].root) && v[b].root !== f || v[b].handler.apply(this, y); + }, onDoubleClick: l, onMouseMove: d, onContextMenu: r, onClick: a, destructor: function() { + u(), n = null, c = null; + } }; + }; +}(rn); +const ha = { init: ua }; +function je(t, e, n) { + return !!e && !(e.left > t.x_end || e.left + e.width < t.x) && !(e.top > t.y_end || e.top + e.height < t.y); +} +function Mt(t) { + return t.config.smart_rendering && t._smart_render; +} +function Gt(t, e, n) { + return { top: e.getItemTop(t.id), height: e.getItemHeight(t.id), left: 0, right: 1 / 0 }; +} +function gt(t, e, n, i, a) { + var r = e.getItemIndexByTopPosition(a.y) || 0, s = e.getItemIndexByTopPosition(a.y_end) || i.count(), o = Math.max(0, r - 1), l = Math.min(i.count(), s + 1); + const d = []; + if (t.config.keyboard_navigation && t.getSelectedId() && d.push(t.getSelectedId()), t.$ui.getView("grid") && t.ext.inlineEditors && t.ext.inlineEditors.getState().id) { + let c = t.ext.inlineEditors.getState().id; + i.exists(c) && d.push(c); + } + return { start: o, end: l, ids: d }; +} +var _a = function(t) { + var e = /* @__PURE__ */ function(n) { + var i = {}, a = {}; + function r(o) { + var l = null; + return typeof o.view == "string" ? l = n.$ui.getView(o.view) : o.view && (l = o.view), l; + } + function s(o, l, d) { + if (a[o]) return a[o]; + l.renderer || n.assert(!1, "Invalid renderer call"); + var c = null, u = null, h = null, g = null, f = null; + typeof l.renderer == "function" ? (c = l.renderer, h = Gt) : (c = l.renderer.render, u = l.renderer.update, g = l.renderer.onrender, l.renderer.isInViewPort ? f = l.renderer.isInViewPort : h = l.renderer.getRectangle, h || h === null || (h = Gt)); + var y = l.filter; + return d && d.setAttribute(n.config.layer_attribute, !0), a[o] = { render_item: function(v, b, _, m, p) { + if (b = b || d, !y || y(v)) { + var k = m || r(l), $ = p || (k ? k.$getConfig() : null), w = _; + !w && $ && $.smart_rendering && (w = k.getViewPort()); + var x = null; + !Mt(n) && (h || f) && w ? (f ? f(v, w, k, $, n) : je(w, h(v, k, $, n))) && (x = c.call(n, v, k, $, w)) : x = c.call(n, v, k, $, w), this.append(v, x, b); + var S = b.nodeType == 11; + g && !S && x && g.call(n, v, x, k); + } else this.remove_item(v.id); + }, clear: function(v) { + this.rendered = i[o] = {}, l.append || this.clear_container(v); + }, clear_container: function(v) { + (v = v || d) && (v.innerHTML = ""); + }, get_visible_range: function(v) { + var b, _, m = r(l), p = m ? m.$getConfig() : null; + return p && p.smart_rendering && (b = m.getViewPort()), m && b && (typeof l.renderer == "function" ? _ = gt(n, m, 0, v, b) : l.renderer && l.renderer.getVisibleRange && (_ = l.renderer.getVisibleRange(n, m, p, v, b))), _ || (_ = { start: 0, end: v.count() }), _; + }, prepare_data: function(v) { + if (l.renderer && l.renderer.prepareData) return l.renderer.prepareData(v, n, l); + }, render_items: function(v, b) { + b = b || d; + var _ = document.createDocumentFragment(); + this.clear(b); + var m = null, p = r(l), k = p ? p.$getConfig() : null; + k && k.smart_rendering && (m = p.getViewPort()); + for (var $ = 0, w = v.length; $ < w; $++) this.render_item(v[$], _, m, p, k); + b.appendChild(_, b); + var x = {}; + v.forEach(function(C) { + x[C.id] = C; + }); + var S = {}; + if (g) { + var T = {}; + for (var $ in this.rendered) S[$] || (T[$] = this.rendered[$], g.call(n, x[$], this.rendered[$], p)); + } + }, update_items: function(v, b) { + var _ = r(l), m = _ ? _.$getConfig() : null; + if (_ && _.$getConfig().smart_rendering && !Mt(n) && this.rendered && (h || f)) { + b = b || d; + var p = document.createDocumentFragment(), k = null; + _ && (k = _.getViewPort()); + var $ = {}; + v.forEach(function(I) { + $[I.id] = I; + }); + var w = {}, x = {}; + for (var S in this.rendered) x[S] = !0, w[S] = !0; + for (var T = {}, C = (S = 0, v.length); S < C; S++) { + var E = v[S], D = this.rendered[E.id]; + x[E.id] = !1, D && D.parentNode ? (f ? f(E, k, _, m, n) : je(k, h(E, _, m, n))) ? (u && u.call(n, E, D, _, m, k), this.restore(E, p)) : x[E.id] = !0 : (T[v[S].id] = !0, this.render_item(v[S], p, k, _, m)); + } + for (var S in x) x[S] && this.hide(S); + if (p.childNodes.length && b.appendChild(p, b), g) { + var A = {}; + for (var S in this.rendered) w[S] && !T[S] || (A[S] = this.rendered[S], g.call(n, $[S], this.rendered[S], _)); + } + } + }, append: function(v, b, _) { + this.rendered && (b ? (this.rendered[v.id] && this.rendered[v.id].parentNode ? this.replace_item(v.id, b) : _.appendChild(b), this.rendered[v.id] = b) : this.rendered[v.id] && this.remove_item(v.id)); + }, replace_item: function(v, b) { + var _ = this.rendered[v]; + _ && _.parentNode && _.parentNode.replaceChild(b, _), this.rendered[v] = b; + }, remove_item: function(v) { + this.hide(v), delete this.rendered[v]; + }, hide: function(v) { + var b = this.rendered[v]; + b && b.parentNode && b.parentNode.removeChild(b); + }, restore: function(v, b) { + var _ = this.rendered[v.id]; + _ ? _.parentNode || this.append(v, _, b || d) : this.render_item(v, b || d); + }, change_id: function(v, b) { + this.rendered[b] = this.rendered[v], delete this.rendered[v]; + }, rendered: i[o], node: d, destructor: function() { + this.clear(), delete a[o], delete i[o]; + } }, a[o]; + } + return { getRenderer: s, clearRenderers: function() { + for (var o in a) s(o).destructor(); + } }; + }(t); + return { createGroup: function(n, i, a, r) { + var s = { tempCollection: [], renderers: {}, container: n, filters: [], getLayers: function() { + this._add(); + var o = []; + for (var l in this.renderers) o.push(this.renderers[l]); + return o; + }, getLayer: function(o) { + return this.renderers[o]; + }, _add: function(o) { + o && (o.id = o.id || rt(), this.tempCollection.push(o)); + for (var l = this.container(), d = this.tempCollection, c = 0; c < d.length; c++) if (o = d[c], this.container() || o && o.container && J(o.container, document.body)) { + var u = o.container, h = o.id, g = o.topmost; + if (!u.parentNode) if (g) l.appendChild(u); + else { + var f = i ? i() : l.firstChild; + f && f.parentNode == l ? l.insertBefore(u, f) : l.appendChild(u); + } + this.renderers[h] = e.getRenderer(h, o, u), r && r(o, t), this.tempCollection.splice(c, 1), c--; + } + }, addLayer: function(o) { + if (o) { + typeof o == "function" && (o = { renderer: o }), o.filter === void 0 ? o.filter = Fe(a || []) : o.filter instanceof Array && (o.filter.push(a), o.filter = Fe(o.filter)), o.container || (o.container = document.createElement("div")); + var l = this; + o.requestUpdate = function() { + t.config.smart_rendering && !Mt(t) && l.renderers[o.id] && l.onUpdateRequest(l.renderers[o.id]); + }; + } + return this._add(o), o ? o.id : void 0; + }, onUpdateRequest: function(o) { + }, eachLayer: function(o) { + for (var l in this.renderers) o(this.renderers[l]); + }, removeLayer: function(o) { + this.renderers[o] && (this.renderers[o].destructor(), delete this.renderers[o]); + }, clear: function() { + for (var o in this.renderers) this.renderers[o].destructor(); + this.renderers = {}; + } }; + return t.attachEvent("onDestroy", function() { + s.clear(), s = null; + }), s; + } }; +}; +function Fe(t) { + return t instanceof Array || (t = Array.prototype.slice.call(arguments, 0)), function(e) { + for (var n = !0, i = 0, a = t.length; i < a; i++) { + var r = t[i]; + r && (n = n && r(e.id, e) !== !1); + } + return n; + }; +} +function Ve(t, e, n) { + if (!t.start_date || !t.end_date) return null; + var i = e.posFromDate(t.start_date), a = e.posFromDate(t.end_date), r = Math.min(i, a) - 200, s = Math.max(i, a) + 200; + return { top: e.getItemTop(t.id), height: e.getItemHeight(t.id), left: r, width: s - r }; +} +function pn() { + var t = [], e = !1; + function n() { + t = [], e = !1; + } + function i(r, s, o) { + s.$getConfig(), r.getVisibleItems().forEach(function(l) { + var d = function(c, u, h, g) { + if (!g.isTaskExists(c.source) || !g.isTaskExists(c.target)) return null; + var f = Ve(g.getTask(c.source), u), y = Ve(g.getTask(c.target), u); + if (!f || !y) return null; + var v = 100, b = Math.min(f.left, y.left) - v, _ = Math.max(f.left + f.width, y.left + y.width) + v, m = Math.min(f.top, y.top) - v, p = Math.max(f.top + f.height, y.top + y.height) + v; + return { top: m, height: p - m, bottom: p, left: b, width: _ - b, right: _ }; + }(l, s, 0, o); + d && t.push({ id: l.id, rec: d }); + }), t.sort(function(l, d) { + return l.rec.right < d.rec.right ? -1 : 1; + }), e = !0; + } + var a = !1; + return function(r, s, o, l, d) { + (function(f) { + a || (a = !0, f.attachEvent("onPreFilter", n), f.attachEvent("onStoreUpdated", n), f.attachEvent("onClearAll", n), f.attachEvent("onBeforeStoreUpdate", n)); + })(l), e || i(l, s, r); + for (var c = [], u = 0; u < t.length; u++) { + var h = t[u], g = h.rec; + g.right < d.x || g.left < d.x_end && g.right > d.x && g.top < d.y_end && g.bottom > d.y && c.push(h.id); + } + return { ids: c }; + }; +} +function mn(t, e, n, i, a) { + var r = n.$gantt.getTask(t.source), s = n.$gantt.getTask(t.target), o = n.getItemTop(r.id), l = n.getItemHeight(r.id), d = n.getItemTop(s.id), c = n.getItemHeight(s.id); + if (e.y > o + l && e.y > d + c || e.y_end < d && e.y_end < o) return !1; + var u = 100, h = n.posFromDate(r.start_date), g = n.posFromDate(r.end_date), f = n.posFromDate(s.start_date), y = n.posFromDate(s.end_date); + if (h > g) { + var v = g; + g = h, h = v; + } + return f > y && (v = y, y = f, f = v), h += -100, g += u, f += -100, y += u, !(e.x > g && e.x > y) && !(e.x_end < h && e.x_end < f); +} +function ga(t, e) { + if (t.view) { + var n = t.view; + typeof n == "string" && (n = e.$ui.getView(n)), n && n.attachEvent && n.attachEvent("onScroll", function() { + e.$services.getService("state").getState("batchUpdate").batch_update || n.$config.$skipSmartRenderOnScroll || t.requestUpdate && t.requestUpdate(); + }); + } +} +var Pt = function() { + function t(e, n, i, a) { + e && (this.$container = be(e), this.$parent = e), this.$config = L(n, { headerHeight: 33 }), this.$gantt = a, this.$domEvents = a._createDomEventScope(), this.$id = n.id || "c" + rt(), this.$name = "cell", this.$factory = i, st(this); + } + return t.prototype.destructor = function() { + this.$parent = this.$container = this.$view = null, this.$gantt.$services.getService("mouseEvents").detach("click", "gantt_header_arrow", this._headerClickHandler), this.$domEvents.detachAll(), this.callEvent("onDestroy", []), this.detachAllEvents(); + }, t.prototype.cell = function(e) { + return null; + }, t.prototype.scrollTo = function(e, n) { + var i = this.$view; + this.$config.html && (i = this.$view.firstChild), 1 * e == e && (i.scrollLeft = e), 1 * n == n && (i.scrollTop = n); + }, t.prototype.clear = function() { + this.getNode().innerHTML = "", this.getNode().className = "gantt_layout_content", this.getNode().style.padding = "0"; + }, t.prototype.resize = function(e) { + if (this.$parent) return this.$parent.resize(e); + e === !1 && (this.$preResize = !0); + var n = this.$container, i = n.offsetWidth, a = n.offsetHeight, r = this.getSize(); + n === document.body && (i = document.body.offsetWidth, a = document.body.offsetHeight), i < r.minWidth && (i = r.minWidth), i > r.maxWidth && (i = r.maxWidth), a < r.minHeight && (a = r.minHeight), a > r.maxHeight && (a = r.maxHeight), this.setSize(i, a), this.$preResize, this.$preResize = !1; + }, t.prototype.hide = function() { + this._hide(!0), this.resize(); + }, t.prototype.show = function(e) { + this._hide(!1), e && this.$parent && this.$parent.show(), this.resize(); + }, t.prototype._hide = function(e) { + if (e === !0 && this.$view.parentNode) this.$view.parentNode.removeChild(this.$view); + else if (e === !1 && !this.$view.parentNode) { + var n = this.$parent.cellIndex(this.$id); + this.$parent.moveView(this, n); + } + this.$config.hidden = e; + }, t.prototype.$toHTML = function(e, n) { + e === void 0 && (e = ""), n = [n || "", this.$config.css || ""].join(" "); + var i = this.$config, a = ""; + return i.raw ? e = typeof i.raw == "string" ? i.raw : "" : (e || (e = "
" + (i.html || "") + "
"), i.header && (a = "
" + (i.canCollapse ? "
" : "") + "
" + i.header + "
")), "
" + a + e + "
"; + }, t.prototype.$fill = function(e, n) { + this.$view = e, this.$parent = n, this.init(); + }, t.prototype.getNode = function() { + return this.$view.querySelector("gantt_layout_cell") || this.$view; + }, t.prototype.init = function() { + var e = this; + this._headerClickHandler = function(n) { + et(n, "data-cell-id") == e.$id && e.toggle(); + }, this.$gantt.$services.getService("mouseEvents").delegate("click", "gantt_header_arrow", this._headerClickHandler), this.callEvent("onReady", []); + }, t.prototype.toggle = function() { + this.$config.collapsed = !this.$config.collapsed, this.resize(); + }, t.prototype.getSize = function() { + var e = { height: this.$config.height || 0, width: this.$config.width || 0, gravity: this.$config.gravity || 1, minHeight: this.$config.minHeight || 0, minWidth: this.$config.minWidth || 0, maxHeight: this.$config.maxHeight || 1e11, maxWidth: this.$config.maxWidth || 1e11 }; + if (this.$config.collapsed) { + var n = this.$config.mode === "x"; + e[n ? "width" : "height"] = e[n ? "maxWidth" : "maxHeight"] = this.$config.headerHeight; + } + return e; + }, t.prototype.getContentSize = function() { + var e = this.$lastSize.contentX; + e !== 1 * e && (e = this.$lastSize.width); + var n = this.$lastSize.contentY; + return n !== 1 * n && (n = this.$lastSize.height), { width: e, height: n }; + }, t.prototype._getBorderSizes = function() { + var e = { top: 0, right: 0, bottom: 0, left: 0, horizontal: 0, vertical: 0 }; + return this._currentBorders && (this._currentBorders[this._borders.left] && (e.left = 1, e.horizontal++), this._currentBorders[this._borders.right] && (e.right = 1, e.horizontal++), this._currentBorders[this._borders.top] && (e.top = 1, e.vertical++), this._currentBorders[this._borders.bottom] && (e.bottom = 1, e.vertical++)), e; + }, t.prototype.setSize = function(e, n) { + this.$view.style.width = e + "px", this.$view.style.height = n + "px"; + var i = this._getBorderSizes(), a = n - i.vertical, r = e - i.horizontal; + this.$lastSize = { x: e, y: n, contentX: r, contentY: a }, this.$config.header ? this._sizeHeader() : this._sizeContent(); + }, t.prototype._borders = { left: "gantt_layout_cell_border_left", right: "gantt_layout_cell_border_right", top: "gantt_layout_cell_border_top", bottom: "gantt_layout_cell_border_bottom" }, t.prototype._setBorders = function(e, n) { + n || (n = this); + var i = n.$view; + for (var a in this._borders) Ut(i, this._borders[a]); + typeof e == "string" && (e = [e]); + var r = {}; + for (a = 0; a < e.length; a++) $t(i, e[a]), r[e[a]] = !0; + n._currentBorders = r; + }, t.prototype._sizeContent = function() { + var e = this.$view.childNodes[0]; + e && e.className == "gantt_layout_content" && (e.style.height = this.$lastSize.contentY + "px"); + }, t.prototype._sizeHeader = function() { + var e = this.$lastSize; + e.contentY -= this.$config.headerHeight; + var n = this.$view.childNodes[0], i = this.$view.childNodes[1], a = this.$config.mode === "x"; + if (this.$config.collapsed) if (i.style.display = "none", a) { + n.className = "gantt_layout_header collapsed_x", n.style.width = e.y + "px"; + var r = Math.floor(e.y / 2 - e.x / 2); + n.style.transform = "rotate(90deg) translate(" + r + "px, " + r + "px)", i.style.display = "none"; + } else n.className = "gantt_layout_header collapsed_y"; + else n.className = a ? "gantt_layout_header" : "gantt_layout_header vertical", n.style.width = "auto", n.style.transform = "", i.style.display = "", i.style.height = e.contentY + "px"; + n.style.height = this.$config.headerHeight + "px"; + }, t; +}(); +function B(t, e) { + for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]); + function i() { + this.constructor = t; + } + t.prototype = e === null ? Object.create(e) : (i.prototype = e.prototype, new i()); +} +var vn = function(t) { + function e(n, i, a) { + var r = t.apply(this, arguments) || this; + return n && (r.$root = !0), r._parseConfig(i), r.$name = "layout", r; + } + return B(e, t), e.prototype.destructor = function() { + this.$container && this.$view && tn(this.$view); + for (var n = 0; n < this.$cells.length; n++) + this.$cells[n].destructor(); + this.$cells = [], t.prototype.destructor.call(this); + }, e.prototype._resizeScrollbars = function(n, i) { + var a = !1, r = [], s = []; + const o = []; + function l(f) { + f.$parent.show(), a = !0, r.push(f); + } + function d(f) { + f.$parent.hide(), a = !0, s.push(f); + } + for (var c, u = 0; u < i.length; u++) n[(c = i[u]).$config.scroll] ? d(c) : c.shouldHide() ? o.push(c) : c.shouldShow() ? l(c) : c.isVisible() ? r.push(c) : s.push(c); + var h = {}; + for (u = 0; u < r.length; u++) r[u].$config.group && (h[r[u].$config.group] = !0); + for (o.forEach(function(f) { + f.$config.group && h[f.$config.group] || d(f); + }), u = 0; u < s.length; u++) if ((c = s[u]).$config.group && h[c.$config.group]) { + l(c); + for (var g = 0; g < r.length; g++) if (r[g] == c) { + this.$gantt.$scrollbarRepaint = !0; + break; + } + } + return a; + }, e.prototype._syncCellSizes = function(n, i) { + if (n) { + var a = {}; + return this._eachChild(function(r) { + r.$config.group && r.$name != "scrollbar" && r.$name != "resizer" && (a[r.$config.group] || (a[r.$config.group] = []), a[r.$config.group].push(r)); + }), a[n] && this._syncGroupSize(a[n], i), a[n]; + } + }, e.prototype._syncGroupSize = function(n, i) { + if (n.length) for (var a = n[0].$parent._xLayout ? "width" : "height", r = n[0].$parent.getNextSibling(n[0].$id) ? 1 : -1, s = i.value, o = i.isGravity, l = 0; l < n.length; l++) { + var d = n[l].getSize(), c = r > 0 ? n[l].$parent.getNextSibling(n[l].$id) : n[l].$parent.getPrevSibling(n[l].$id); + c.$name == "resizer" && (c = r > 0 ? c.$parent.getNextSibling(c.$id) : c.$parent.getPrevSibling(c.$id)); + var u = c.getSize(); + if (o) n[l].$config.gravity = s; + else if (c[a]) { + var h = d.gravity + u.gravity, g = d[a] + u[a], f = h / g; + n[l].$config.gravity = f * s, c.$config[a] = g - s, c.$config.gravity = h - f * s; + } else n[l].$config[a] = s; + var y = this.$gantt.$ui.getView("grid"); + !y || n[l].$content !== y || y.$config.scrollable || o || (this.$gantt.config.grid_width = s); + } + }, e.prototype.resize = function(n) { + var i = !1; + if (this.$root && !this._resizeInProgress && (this.callEvent("onBeforeResize", []), i = !0, this._resizeInProgress = !0), t.prototype.resize.call(this, !0), t.prototype.resize.call(this, !1), i) { + var a = []; + a = (a = (a = a.concat(this.getCellsByType("viewCell"))).concat(this.getCellsByType("viewLayout"))).concat(this.getCellsByType("hostCell")); + for (var r = this.getCellsByType("scroller"), s = 0; s < a.length; s++) a[s].$config.hidden || a[s].setContentSize(); + var o = this._getAutosizeMode(this.$config.autosize), l = this._resizeScrollbars(o, r); + if (this.$config.autosize && (this.autosize(this.$config.autosize), a.forEach(function(d) { + const c = d.$parent, u = c.getContentSize(o); + o.x && (c.$config.$originalWidthStored || (c.$config.$originalWidthStored = !0, c.$config.$originalWidth = c.$config.width), c.$config.width = u.width), o.y && (c.$config.$originalHeightStored || (c.$config.$originalHeightStored = !0, c.$config.$originalHeight = c.$config.height), c.$config.height = u.height); + }), l = !0), l) + for (this.resize(), s = 0; s < a.length; s++) a[s].$config.hidden || a[s].setContentSize(); + this.callEvent("onResize", []); + } + i && (this._resizeInProgress = !1); + }, e.prototype._eachChild = function(n, i) { + if (n(i = i || this), i.$cells) for (var a = 0; a < i.$cells.length; a++) this._eachChild(n, i.$cells[a]); + }, e.prototype.isChild = function(n) { + var i = !1; + return this._eachChild(function(a) { + a !== n && a.$content !== n || (i = !0); + }), i; + }, e.prototype.getCellsByType = function(n) { + var i = []; + if (n === this.$name && i.push(this), this.$content && this.$content.$name == n && i.push(this.$content), this.$cells) for (var a = 0; a < this.$cells.length; a++) { + var r = e.prototype.getCellsByType.call(this.$cells[a], n); + r.length && i.push.apply(i, r); + } + return i; + }, e.prototype.getNextSibling = function(n) { + var i = this.cellIndex(n); + return i >= 0 && this.$cells[i + 1] ? this.$cells[i + 1] : null; + }, e.prototype.getPrevSibling = function(n) { + var i = this.cellIndex(n); + return i >= 0 && this.$cells[i - 1] ? this.$cells[i - 1] : null; + }, e.prototype.cell = function(n) { + for (var i = 0; i < this.$cells.length; i++) { + var a = this.$cells[i]; + if (a.$id === n) return a; + var r = a.cell(n); + if (r) return r; + } + }, e.prototype.cellIndex = function(n) { + for (var i = 0; i < this.$cells.length; i++) if (this.$cells[i].$id === n) return i; + return -1; + }, e.prototype.moveView = function(n, i) { + if (this.$cells[i] !== n) return window.alert("Not implemented"); + i += this.$config.header ? 1 : 0; + var a = this.$view; + i >= a.childNodes.length ? a.appendChild(n.$view) : a.insertBefore(n.$view, a.childNodes[i]); + }, e.prototype._parseConfig = function(n) { + this.$cells = [], this._xLayout = !n.rows; + for (var i = n.rows || n.cols || n.views, a = 0; a < i.length; a++) { + var r = i[a]; + r.mode = this._xLayout ? "x" : "y"; + var s = this.$factory.initUI(r, this); + s ? (s.$parent = this, this.$cells.push(s)) : (i.splice(a, 1), a--); + } + }, e.prototype.getCells = function() { + return this.$cells; + }, e.prototype.render = function() { + var n = Qe(this.$container, this.$toHTML()); + this.$fill(n, null), this.callEvent("onReady", []), this.resize(), this.render = this.resize; + }, e.prototype.$fill = function(n, i) { + this.$view = n, this.$parent = i; + for (var a = en(n, "gantt_layout_cell"), r = a.length - 1; r >= 0; r--) { + var s = this.$cells[r]; + s.$fill(a[r], this), s.$config.hidden && s.$view.parentNode.removeChild(s.$view); + } + }, e.prototype.$toHTML = function() { + for (var n = this._xLayout ? "x" : "y", i = [], a = 0; a < this.$cells.length; a++) i.push(this.$cells[a].$toHTML()); + return t.prototype.$toHTML.call(this, i.join(""), (this.$root ? "gantt_layout_root " : "") + "gantt_layout gantt_layout_" + n); + }, e.prototype.getContentSize = function(n) { + for (var i, a, r, s = 0, o = 0, l = 0; l < this.$cells.length; l++) (a = this.$cells[l]).$config.hidden || (i = a.getContentSize(n), a.$config.view === "scrollbar" && n[a.$config.scroll] && (i.height = 0, i.width = 0), a.$config.resizer && (this._xLayout ? i.height = 0 : i.width = 0), r = a._getBorderSizes(), this._xLayout ? (s += i.width + r.horizontal, o = Math.max(o, i.height + r.vertical)) : (s = Math.max(s, i.width + r.horizontal), o += i.height + r.vertical)); + return { width: s += (r = this._getBorderSizes()).horizontal, height: o += r.vertical }; + }, e.prototype._cleanElSize = function(n) { + return 1 * (n || "").toString().replace("px", "") || 0; + }, e.prototype._getBoxStyles = function(n) { + var i = null, a = ["width", "height", "paddingTop", "paddingBottom", "paddingLeft", "paddingRight", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth"], r = { boxSizing: (i = window.getComputedStyle ? window.getComputedStyle(n, null) : { width: n.clientWidth, height: n.clientHeight }).boxSizing == "border-box" }; + i.MozBoxSizing && (r.boxSizing = i.MozBoxSizing == "border-box"); + for (var s = 0; s < a.length; s++) r[a[s]] = i[a[s]] ? this._cleanElSize(i[a[s]]) : 0; + var o = { horPaddings: r.paddingLeft + r.paddingRight + r.borderLeftWidth + r.borderRightWidth, vertPaddings: r.paddingTop + r.paddingBottom + r.borderTopWidth + r.borderBottomWidth, borderBox: r.boxSizing, innerWidth: r.width, innerHeight: r.height, outerWidth: r.width, outerHeight: r.height }; + return o.borderBox ? (o.innerWidth -= o.horPaddings, o.innerHeight -= o.vertPaddings) : (o.outerWidth += o.horPaddings, o.outerHeight += o.vertPaddings), o; + }, e.prototype._getAutosizeMode = function(n) { + var i = { x: !1, y: !1 }; + return n === "xy" ? i.x = i.y = !0 : n === "y" || n === !0 ? i.y = !0 : n === "x" && (i.x = !0), i; + }, e.prototype.autosize = function(n) { + var i = this._getAutosizeMode(n), a = this._getBoxStyles(this.$container), r = this.getContentSize(n), s = this.$container; + i.x && (a.borderBox && (r.width += a.horPaddings), s.style.width = r.width + "px"), i.y && (a.borderBox && (r.height += a.vertPaddings), s.style.height = r.height + "px"); + }, e.prototype.getSize = function() { + this._sizes = []; + for (var n = 0, i = 0, a = 1e11, r = 0, s = 1e11, o = 0, l = 0; l < this.$cells.length; l++) { + var d = this._sizes[l] = this.$cells[l].getSize(); + this.$cells[l].$config.hidden || (this._xLayout ? (!d.width && d.minWidth ? n += d.minWidth : n += d.width, a += d.maxWidth, i += d.minWidth, r = Math.max(r, d.height), s = Math.min(s, d.maxHeight), o = Math.max(o, d.minHeight)) : (!d.height && d.minHeight ? r += d.minHeight : r += d.height, s += d.maxHeight, o += d.minHeight, n = Math.max(n, d.width), a = Math.min(a, d.maxWidth), i = Math.max(i, d.minWidth))); + } + var c = t.prototype.getSize.call(this); + return c.maxWidth >= 1e5 && (c.maxWidth = a), c.maxHeight >= 1e5 && (c.maxHeight = s), c.minWidth = c.minWidth != c.minWidth ? 0 : c.minWidth, c.minHeight = c.minHeight != c.minHeight ? 0 : c.minHeight, this._xLayout ? (c.minWidth += this.$config.margin * this.$cells.length || 0, c.minWidth += 2 * this.$config.padding || 0, c.minHeight += 2 * this.$config.padding || 0) : (c.minHeight += this.$config.margin * this.$cells.length || 0, c.minHeight += 2 * this.$config.padding || 0), c; + }, e.prototype._calcFreeSpace = function(n, i, a) { + var r = a ? i.minWidth : i.minHeight, s = i.maxWidth, o = n; + return o ? (o > s && (o = s), o < r && (o = r), this._free -= o) : ((o = Math.floor(this._free / this._gravity * i.gravity)) > s && (o = s, this._free -= o, this._gravity -= i.gravity), o < r && (o = r, this._free -= o, this._gravity -= i.gravity)), o; + }, e.prototype._calcSize = function(n, i, a) { + var r = n, s = a ? i.minWidth : i.minHeight, o = a ? i.maxWidth : i.maxHeight; + return r || (r = Math.floor(this._free / this._gravity * i.gravity)), r > o && (r = o), r < s && (r = s), r; + }, e.prototype._configureBorders = function() { + this.$root && this._setBorders([this._borders.left, this._borders.top, this._borders.right, this._borders.bottom], this); + for (var n = this._xLayout ? this._borders.right : this._borders.bottom, i = this.$cells, a = i.length - 1, r = a; r >= 0; r--) if (!i[r].$config.hidden) { + a = r; + break; + } + for (r = 0; r < i.length; r++) if (!i[r].$config.hidden) { + var s = r >= a, o = ""; + !s && i[r + 1] && i[r + 1].$config.view == "scrollbar" && (this._xLayout ? s = !0 : o = "gantt_layout_cell_border_transparent"), this._setBorders(s ? [] : [n, o], i[r]); + } + }, e.prototype._updateCellVisibility = function() { + for (var n = this._visibleCells || {}, i = !this._visibleCells, a = {}, r = null, s = [], o = 0; o < this._sizes.length; o++) (r = this.$cells[o]).$config.hide_empty && s.push(r), !i && r.$config.hidden && n[r.$id] ? r._hide(!0) : r.$config.hidden || n[r.$id] || r._hide(!1), r.$config.hidden || (a[r.$id] = !0); + for (this._visibleCells = a, o = 0; o < s.length; o++) { + var l = (r = s[o]).$cells, d = !0; + l.forEach(function(c) { + c.$config.hidden || c.$config.resizer || (d = !1); + }), r.$config.hidden = d; + } + }, e.prototype.setSize = function(n, i) { + this._configureBorders(), t.prototype.setSize.call(this, n, i), i = this.$lastSize.contentY, n = this.$lastSize.contentX; + var a, r, s = this.$config.padding || 0; + this.$view.style.padding = s + "px", this._gravity = 0, this._free = this._xLayout ? n : i, this._free -= 2 * s, this._updateCellVisibility(); + for (var o = 0; o < this._sizes.length; o++) if (!(a = this.$cells[o]).$config.hidden) { + var l = this.$config.margin || 0; + a.$name != "resizer" || l || (l = -1); + var d = a.$view, c = this._xLayout ? "marginRight" : "marginBottom"; + o !== this.$cells.length - 1 && (d.style[c] = l + "px", this._free -= l), r = this._sizes[o], this._xLayout ? r.width || (this._gravity += r.gravity) : r.height || (this._gravity += r.gravity); + } + for (o = 0; o < this._sizes.length; o++) if (!(a = this.$cells[o]).$config.hidden) { + var u = (r = this._sizes[o]).width, h = r.height; + this._xLayout ? this._calcFreeSpace(u, r, !0) : this._calcFreeSpace(h, r, !1); + } + for (o = 0; o < this.$cells.length; o++) if (!(a = this.$cells[o]).$config.hidden) { + r = this._sizes[o]; + var g = void 0, f = void 0; + this._xLayout ? (g = this._calcSize(r.width, r, !0), f = i - 2 * s) : (g = n - 2 * s, f = this._calcSize(r.height, r, !1)), a.setSize(g, f); + } + }, e; +}(Pt), fa = function(t) { + function e(n, i, a) { + for (var r = t.apply(this, arguments) || this, s = 0; s < r.$cells.length; s++) r.$cells[s].$config.hidden = s !== 0; + return r.$cell = r.$cells[0], r.$name = "viewLayout", r; + } + return B(e, t), e.prototype.cell = function(n) { + var i = t.prototype.cell.call(this, n); + return i.$view || this.$fill(null, this), i; + }, e.prototype.moveView = function(n) { + var i = this.$view; + this.$cell && (this.$cell.$config.hidden = !0, i.removeChild(this.$cell.$view)), this.$cell = n, i.appendChild(n.$view); + }, e.prototype.setSize = function(n, i) { + Pt.prototype.setSize.call(this, n, i); + }, e.prototype.setContentSize = function() { + var n = this.$lastSize; + this.$cell.setSize(n.contentX, n.contentY); + }, e.prototype.getSize = function() { + var n = t.prototype.getSize.call(this); + if (this.$cell) { + var i = this.$cell.getSize(); + if (this.$config.byMaxSize) for (var a = 0; a < this.$cells.length; a++) { + var r = this.$cells[a].getSize(); + for (var s in i) i[s] = Math.max(i[s], r[s]); + } + for (var o in n) n[o] = n[o] || i[o]; + n.gravity = Math.max(n.gravity, i.gravity); + } + return n; + }, e; +}(vn), pa = function(t) { + function e(n, i, a) { + var r = t.apply(this, arguments) || this; + if (i.view) { + i.id && (this.$id = rt()); + var s = G(i); + if (delete s.config, delete s.templates, this.$content = this.$factory.createView(i.view, this, s, this), !this.$content) return !1; + } + return r.$name = "viewCell", r; + } + return B(e, t), e.prototype.destructor = function() { + this.clear(), t.prototype.destructor.call(this); + }, e.prototype.clear = function() { + if (this.$initialized = !1, this.$content) { + var n = this.$content.unload || this.$content.destructor; + n && n.call(this.$content); + } + t.prototype.clear.call(this); + }, e.prototype.scrollTo = function(n, i) { + this.$content && this.$content.scrollTo ? this.$content.scrollTo(n, i) : t.prototype.scrollTo.call(this, n, i); + }, e.prototype._setContentSize = function(n, i) { + var a = this._getBorderSizes(); + if (typeof n == "number") { + var r = n + a.horizontal; + this.$config.width = r; + } + if (typeof i == "number") { + var s = i + a.vertical; + this.$config.height = s; + } + }, e.prototype.setSize = function(n, i) { + if (t.prototype.setSize.call(this, n, i), !this.$preResize && this.$content && !this.$initialized) { + this.$initialized = !0; + var a = this.$view.childNodes[0], r = this.$view.childNodes[1]; + r || (r = a), this.$content.init(r); + } + }, e.prototype.setContentSize = function() { + !this.$preResize && this.$content && this.$initialized && this.$content.setSize(this.$lastSize.contentX, this.$lastSize.contentY); + }, e.prototype.getContentSize = function() { + var n = t.prototype.getContentSize.call(this); + if (this.$content && this.$initialized) { + var i = this.$content.getSize(); + n.width = i.contentX === void 0 ? i.width : i.contentX, n.height = i.contentY === void 0 ? i.height : i.contentY; + } + var a = this._getBorderSizes(); + return n.width += a.horizontal, n.height += a.vertical, n; + }, e; +}(Pt), ma = function(t) { + var e = ["altKey", "shiftKey", "metaKey"]; + function n(a, r, s, o) { + var l = t.apply(this, arguments) || this; + this.$config = L(r, { scroll: "x" }), l._scrollHorizontalHandler = R(l._scrollHorizontalHandler, l), l._scrollVerticalHandler = R(l._scrollVerticalHandler, l), l._outerScrollVerticalHandler = R(l._outerScrollVerticalHandler, l), l._outerScrollHorizontalHandler = R(l._outerScrollHorizontalHandler, l), l._mouseWheelHandler = R(l._mouseWheelHandler, l), this.$config.hidden = !0; + var d = o.config.scroll_size; + return o.env.isIE && (d += 1), this._isHorizontal() ? (l.$config.height = d, l.$parent.$config.height = d) : (l.$config.width = d, l.$parent.$config.width = d), this.$config.scrollPosition = 0, l.$name = "scroller", l; + } + function i(a, r) { + if (r.push(a), a.$cells) for (var s = 0; s < a.$cells.length; s++) i(a.$cells[s], r); + } + return B(n, t), n.prototype.init = function(a) { + a.innerHTML = this.$toHTML(), this.$view = a.firstChild, this.$view || this.init(), this._isVertical() ? this._initVertical() : this._initHorizontal(), this._initMouseWheel(), this._initLinkedViews(); + }, n.prototype.$toHTML = function() { + return "
"; + }, n.prototype._getRootParent = function() { + for (var a = this.$parent; a && a.$parent; ) a = a.$parent; + if (a) return a; + }, n.prototype._eachView = function() { + var a = []; + return i(this._getRootParent(), a), a; + }, n.prototype._getLinkedViews = function() { + for (var a = this._eachView(), r = [], s = 0; s < a.length; s++) a[s].$config && (this._isVertical() && a[s].$config.scrollY == this.$id || this._isHorizontal() && a[s].$config.scrollX == this.$id) && r.push(a[s]); + return r; + }, n.prototype._initHorizontal = function() { + this.$scroll_hor = this.$view, this.$domEvents.attach(this.$view, "scroll", this._scrollHorizontalHandler); + }, n.prototype._initLinkedViews = function() { + for (var a = this._getLinkedViews(), r = this._isVertical() ? "gantt_layout_outer_scroll gantt_layout_outer_scroll_vertical" : "gantt_layout_outer_scroll gantt_layout_outer_scroll_horizontal", s = 0; s < a.length; s++) $t(a[s].$view || a[s].getNode(), r); + }, n.prototype._initVertical = function() { + this.$scroll_ver = this.$view, this.$domEvents.attach(this.$view, "scroll", this._scrollVerticalHandler); + }, n.prototype._updateLinkedViews = function() { + }, n.prototype._initMouseWheel = function() { + pt.isFF ? this.$domEvents.attach(this._getRootParent().$view, "wheel", this._mouseWheelHandler, { passive: !1 }) : this.$domEvents.attach(this._getRootParent().$view, "mousewheel", this._mouseWheelHandler, { passive: !1 }); + }, n.prototype.scrollHorizontally = function(a) { + if (!this._scrolling) { + this._scrolling = !0, this.$scroll_hor.scrollLeft = a, this.$config.codeScrollLeft = a, a = this.$scroll_hor.scrollLeft; + for (var r = this._getLinkedViews(), s = 0; s < r.length; s++) r[s].scrollTo && r[s].scrollTo(a, void 0); + var o = this.$config.scrollPosition; + this.$config.scrollPosition = a, this.callEvent("onScroll", [o, a, this.$config.scroll]), this._scrolling = !1; + } + }, n.prototype.scrollVertically = function(a) { + if (!this._scrolling) { + this._scrolling = !0, this.$scroll_ver.scrollTop = a, a = this.$scroll_ver.scrollTop; + for (var r = this._getLinkedViews(), s = 0; s < r.length; s++) r[s].scrollTo && r[s].scrollTo(void 0, a); + var o = this.$config.scrollPosition; + this.$config.scrollPosition = a, this.callEvent("onScroll", [o, a, this.$config.scroll]), this._scrolling = !1; + } + }, n.prototype._isVertical = function() { + return this.$config.scroll == "y"; + }, n.prototype._isHorizontal = function() { + return this.$config.scroll == "x"; + }, n.prototype._scrollHorizontalHandler = function(a) { + if (!this._isVertical() && !this._scrolling) { + if (/* @__PURE__ */ new Date() - (this._wheel_time || 0) < 100) return !0; + var r = this.$scroll_hor.scrollLeft; + this.scrollHorizontally(r), this._oldLeft = this.$scroll_hor.scrollLeft; + } + }, n.prototype._outerScrollHorizontalHandler = function(a) { + this._isVertical(); + }, n.prototype.show = function() { + this.$parent.show(); + }, n.prototype.hide = function() { + this.$parent.hide(); + }, n.prototype._getScrollSize = function() { + for (var a, r = 0, s = 0, o = this._isHorizontal(), l = this._getLinkedViews(), d = o ? "scrollWidth" : "scrollHeight", c = o ? "contentX" : "contentY", u = o ? "x" : "y", h = this._getScrollOffset(), g = 0; g < l.length; g++) if ((a = l[g]) && a.$content && a.$content.getSize && !a.$config.hidden) { + var f, y = a.$content.getSize(); + if (f = y.hasOwnProperty(d) ? y[d] : y[c], h) y[c] > y[u] && y[c] > r && f > y[u] - h + 2 && (r = f + (o ? 0 : 2), s = y[u]); + else { + var v = Math.max(y[c] - f, 0); + (f += v) > Math.max(y[u] - v, 0) && f > r && (r = f, s = y[u]); + } + } + return { outerScroll: s, innerScroll: r }; + }, n.prototype.scroll = function(a) { + this._isHorizontal() ? this.scrollHorizontally(a) : this.scrollVertically(a); + }, n.prototype.getScrollState = function() { + return { visible: this.isVisible(), direction: this.$config.scroll, size: this.$config.outerSize, scrollSize: this.$config.scrollSize || 0, position: this.$config.scrollPosition || 0 }; + }, n.prototype.setSize = function(a, r) { + t.prototype.setSize.apply(this, arguments); + var s = this._getScrollSize(), o = (this._isVertical() ? r : a) - this._getScrollOffset() + (this._isHorizontal() ? 1 : 0); + s.innerScroll && o > s.outerScroll && (s.innerScroll += o - s.outerScroll), this.$config.scrollSize = s.innerScroll, this.$config.width = a, this.$config.height = r, this._setScrollSize(s.innerScroll); + }, n.prototype.isVisible = function() { + return !(!this.$parent || !this.$parent.$view.parentNode); + }, n.prototype.shouldShow = function() { + var a = this._getScrollSize(); + return !(!a.innerScroll && this.$parent && this.$parent.$view.parentNode) && !(!a.innerScroll || this.$parent && this.$parent.$view.parentNode); + }, n.prototype.shouldHide = function() { + return !(this._getScrollSize().innerScroll || !this.$parent || !this.$parent.$view.parentNode); + }, n.prototype.toggleVisibility = function() { + this.shouldHide() ? this.hide() : this.shouldShow() && this.show(); + }, n.prototype._getScaleOffset = function(a) { + var r = 0; + return !a || a.$config.view != "timeline" && a.$config.view != "grid" || (r = a.$content.$getConfig().scale_height), r; + }, n.prototype._getScrollOffset = function() { + var a = 0; + if (this._isVertical()) { + var r = this.$parent.$parent; + a = Math.max(this._getScaleOffset(r.getPrevSibling(this.$parent.$id)), this._getScaleOffset(r.getNextSibling(this.$parent.$id))); + } else for (var s = this._getLinkedViews(), o = 0; o < s.length; o++) { + var l = s[o].$parent.$cells, d = l[l.length - 1]; + if (d && d.$config.view == "scrollbar" && d.$config.hidden === !1) { + a = d.$config.width; + break; + } + } + return a || 0; + }, n.prototype._setScrollSize = function(a) { + var r = this._isHorizontal() ? "width" : "height", s = this._isHorizontal() ? this.$scroll_hor : this.$scroll_ver, o = this._getScrollOffset(), l = s.firstChild; + o ? this._isVertical() ? (this.$config.outerSize = this.$config.height - o + 3, s.style.height = this.$config.outerSize + "px", s.style.top = o - 1 + "px", $t(s, this.$parent._borders.top), $t(s.parentNode, "gantt_task_vscroll")) : (this.$config.outerSize = this.$config.width - o + 1, s.style.width = this.$config.outerSize + "px") : (s.style.top = "auto", Ut(s, this.$parent._borders.top), Ut(s.parentNode, "gantt_task_vscroll"), this.$config.outerSize = this.$config.height), l.style[r] = a + "px"; + }, n.prototype._scrollVerticalHandler = function(a) { + if (!this._scrollHorizontalHandler() && !this._scrolling) { + var r = this.$scroll_ver.scrollTop; + r != this._oldTop && (this.scrollVertically(r), this._oldTop = this.$scroll_ver.scrollTop); + } + }, n.prototype._outerScrollVerticalHandler = function(a) { + this._scrollHorizontalHandler(); + }, n.prototype._checkWheelTarget = function(a) { + for (var r = this._getLinkedViews().concat(this), s = 0; s < r.length; s++) + if (J(a, r[s].$view)) return !0; + return !1; + }, n.prototype._mouseWheelHandler = function(a) { + var r = a.target || a.srcElement; + if (this._checkWheelTarget(r)) { + this._wheel_time = /* @__PURE__ */ new Date(); + var s = {}, o = { x: 1, y: 1 }, l = this.$gantt.config.wheel_scroll_sensitivity; + typeof l == "number" && l ? o = { x: l, y: l } : {}.toString.apply(l) == "[object Object]" && (o = { x: l.x, y: l.y }); + var d = pt.isFF, c = d ? a.deltaX : a.wheelDeltaX, u = d ? a.deltaY : a.wheelDelta, h = -20; + d && (h = a.deltaMode !== 0 ? -40 : -10); + var g = d ? c * h * o.x : 2 * c * o.x, f = d ? u * h * o.y : u * o.y, y = this.$gantt.config.horizontal_scroll_key; + if (y !== !1 && e.indexOf(y) >= 0 && (!a[y] || a.deltaX || a.wheelDeltaX || (g = 2 * f, f = 0)), g && Math.abs(g) > Math.abs(f)) { + if (this._isVertical()) return; + if (s.x || !this.$scroll_hor || !this.$scroll_hor.offsetWidth) return !0; + var v = g / -40, b = this._oldLeft, _ = b + 30 * v; + if (this.scrollHorizontally(_), this.$scroll_hor.scrollLeft = _, b == this.$scroll_hor.scrollLeft) return !0; + this._oldLeft = this.$scroll_hor.scrollLeft; + } else { + if (this._isHorizontal()) return; + if (s.y || !this.$scroll_ver || !this.$scroll_ver.offsetHeight) return !0; + v = f / -40, f === void 0 && (v = a.detail); + var m = this._oldTop, p = this.$scroll_ver.scrollTop + 30 * v; + if (this.scrollVertically(p), this.$scroll_ver.scrollTop = p, m == this.$scroll_ver.scrollTop) return !0; + this._oldTop = this.$scroll_ver.scrollTop; + } + return a.preventDefault && a.preventDefault(), a.cancelBubble = !0, !1; + } + }, n; +}(Pt); +function kn(t) { + var e = {}, n = {}, i = null, a = -1, r = null, s = /* @__PURE__ */ function(o) { + var l = -1, d = -1; + return { resetCache: function() { + l = -1, d = -1; + }, _getRowHeight: function() { + return l === -1 && (l = o.$getConfig().row_height), l; + }, _refreshState: function() { + this.resetCache(), d = !0; + var c = o.$config.rowStore; + if (c) for (var u = this._getRowHeight(), h = 0; h < c.fullOrder.length; h++) { + var g = c.getItem(c.fullOrder[h]); + if (g && g.row_height && g.row_height !== u) { + d = !1; + break; + } + } + }, canUseSimpleCalculation: function() { + return d === -1 && this._refreshState(), d; + }, getRowTop: function(c) { + return o.$config.rowStore ? c * this._getRowHeight() : 0; + }, getItemHeight: function(c) { + return this._getRowHeight(); + }, getTotalHeight: function() { + return o.$config.rowStore ? o.$config.rowStore.countVisible() * this._getRowHeight() : 0; + }, getItemIndexByTopPosition: function(c) { + return o.$config.rowStore ? Math.floor(c / this._getRowHeight()) : 0; + } }; + }(t); + return { _resetTopPositionHeight: function() { + e = {}, n = {}, s.resetCache(); + }, _resetHeight: function() { + var o = this.$config.rowStore, l = this.getCacheStateTotalHeight(o); + r ? this.shouldClearHeightCache(r, l) && (r = l, i = null) : r = l, a = -1, s.resetCache(); + }, getRowTop: function(o) { + if (s.canUseSimpleCalculation()) return s.getRowTop(o); + var l = this.$config.rowStore; + if (!l) return 0; + if (n[o] !== void 0) return n[o]; + for (var d = l.getIndexRange(), c = 0, u = 0, h = 0; h < d.length; h++) n[h] = c, c += this.getItemHeight(d[h].id), h < o && (u = c); + return u; + }, getItemTop: function(o) { + if (this.$config.rowStore) { + if (e[o] !== void 0) return e[o]; + var l = this.$config.rowStore; + if (!l) return 0; + var d = l.getIndexById(o); + if (d === -1 && l.getParent && l.exists(o)) { + var c = l.getParent(o); + if (l.exists(c)) { + var u = l.getItem(c); + if (this.$gantt.isSplitTask(u)) return this.getItemTop(c); + } + } + return e[o] = this.getRowTop(d), e[o]; + } + return 0; + }, getItemHeight: function(o) { + if (s.canUseSimpleCalculation()) return s.getItemHeight(o); + if (!i && this.$config.rowStore && this._fillHeightCache(this.$config.rowStore), i[o] !== void 0) return i[o]; + var l = this.$getConfig().row_height; + if (this.$config.rowStore) { + var d = this.$config.rowStore; + if (!d) return l; + var c = d.getItem(o); + return i[o] = c && c.row_height || l; + } + return l; + }, _fillHeightCache: function(o) { + if (o) { + i = {}; + var l = this.$getConfig().row_height; + o.eachItem(function(d) { + return i[d.id] = d && d.row_height || l; + }); + } + }, getCacheStateTotalHeight: function(o) { + var l = this.$getConfig().row_height, d = {}, c = [], u = 0; + return o && o.eachItem(function(h) { + c.push(h), d[h.id] = h.row_height, u += h.row_height || l; + }), { globalHeight: l, items: c, count: c.length, sumHeight: u }; + }, shouldClearHeightCache: function(o, l) { + if (o.count != l.count || o.globalHeight != l.globalHeight || o.sumHeight != l.sumHeight) return !0; + for (var d in o.items) { + var c = l.items[d]; + if (c !== void 0 && c != o.items[d]) return !0; + } + return !1; + }, getTotalHeight: function() { + if (s.canUseSimpleCalculation()) return s.getTotalHeight(); + if (a != -1) return a; + if (this.$config.rowStore) { + var o = this.$config.rowStore; + this._fillHeightCache(o); + var l = this.getItemHeight.bind(this), d = o.getVisibleItems(), c = 0; + return d.forEach(function(u) { + c += l(u.id); + }), a = c, c; + } + return 0; + }, getItemIndexByTopPosition: function(o) { + if (this.$config.rowStore) { + if (s.canUseSimpleCalculation()) return s.getItemIndexByTopPosition(o); + for (var l = this.$config.rowStore, d = 0; d < l.countVisible(); d++) { + var c = this.getRowTop(d), u = this.getRowTop(d + 1); + if (!u) { + var h = l.getIdByIndex(d); + u = c + this.getItemHeight(h); + } + if (o >= c && o < u) return d; + } + return l.countVisible() + 2; + } + return 0; + } }; +} +const va = function() { + return { render: function() { + }, destroy: function() { + } }; +}; +var Ft = function(t, e, n, i) { + this.$config = L({}, e || {}), this.$scaleHelper = new he(i), this.$gantt = i, this._posFromDateCache = {}, this._timelineDragScroll = null, L(this, kn(this)), st(this); +}; +Ft.prototype = { init: function(t) { + t.innerHTML += "
", this.$task = t.childNodes[0], this.$task.innerHTML = "
", this.$task_scale = this.$task.childNodes[0], this.$task_data = this.$task.childNodes[1], this.$task_data.innerHTML = "
", this.$task_bg = this.$task_data.childNodes[0], this.$task_baselines = this.$task_data.childNodes[1], this.$task_links = this.$task_data.childNodes[2], this.$task_bars = this.$task_data.childNodes[3], this.$task_constraints = this.$task_data.childNodes[4], this.$task_deadlines = this.$task_data.childNodes[5], this._tasks = { col_width: 0, width: [], full_width: 0, trace_x: [], rendered: {} }; + var e = this.$getConfig(), n = e[this.$config.bind + "_attribute"], i = e[this.$config.bindLinks + "_attribute"]; + !n && this.$config.bind && (n = "data-" + this.$config.bind + "-id"), !i && this.$config.bindLinks && (i = "data-" + this.$config.bindLinks + "-id"), this.$config.item_attribute = n || null, this.$config.link_attribute = i || null; + var a = this._createLayerConfig(); + this.$config.layers || (this.$config.layers = a.tasks), this.$config.linkLayers || (this.$config.linkLayers = a.links), this._attachLayers(this.$gantt), this.callEvent("onReady", []), this.$gantt.ext.dragTimeline && (this._timelineDragScroll = this.$gantt.ext.dragTimeline.create(), this._timelineDragScroll.attach(this)); +}, setSize: function(t, e) { + var n = this.$getConfig(); + if (1 * t === t && (this.$config.width = t), 1 * e === e) { + this.$config.height = e; + var i = Math.max(this.$config.height - n.scale_height); + this.$task_data.style.height = i + "px"; + } + this.refresh(), this.$task_bg.style.backgroundImage = "", n.smart_rendering && this.$config.rowStore ? this.$task_bg.style.height = this.getTotalHeight() + "px" : this.$task_bg.style.height = ""; + for (var a = this._tasks, r = this.$task_data.childNodes, s = 0, o = r.length; s < o; s++) { + var l = r[s]; + l.hasAttribute("data-layer") && l.style && (l.style.width = a.full_width + "px"); + } +}, isVisible: function() { + return this.$parent && this.$parent.$config ? !this.$parent.$config.hidden : this.$task.offsetWidth; +}, getSize: function() { + var t = this.$getConfig(), e = this.$config.rowStore ? this.getTotalHeight() : 0, n = this.isVisible() ? this._tasks.full_width : 0; + return { x: this.isVisible() ? this.$config.width : 0, y: this.isVisible() ? this.$config.height : 0, contentX: this.isVisible() ? n : 0, contentY: this.isVisible() ? t.scale_height + e : 0, scrollHeight: this.isVisible() ? e : 0, scrollWidth: this.isVisible() ? n : 0 }; +}, scrollTo: function(t, e) { + if (this.isVisible()) { + var n = !1; + this.$config.scrollTop = this.$config.scrollTop || 0, this.$config.scrollLeft = this.$config.scrollLeft || 0, 1 * e === e && (this.$config.scrollTop = e, this.$task_data.scrollTop = this.$config.scrollTop, n = !0), 1 * t === t && (this.$task.scrollLeft = t, this.$config.scrollLeft = this.$task.scrollLeft, this._refreshScales(), n = !0), n && this.callEvent("onScroll", [this.$config.scrollLeft, this.$config.scrollTop]); + } +}, _refreshScales: function() { + if (this.isVisible() && this.$getConfig().smart_scales) { + var t = this.getViewPort(), e = this._scales; + this.$task_scale.innerHTML = this._getScaleChunkHtml(e, t.x, t.x_end); + } +}, getViewPort: function() { + var t = this.$config.scrollLeft || 0, e = this.$config.scrollTop || 0, n = this.$config.height || 0, i = this.$config.width || 0; + return { y: e, y_end: e + n, x: t, x_end: t + i, height: n, width: i }; +}, _createLayerConfig: function() { + var t = this, e = function() { + return t.isVisible(); + }; + this.$gantt; + var n = [{ expose: !0, renderer: this.$gantt.$ui.layers.taskBar(), container: this.$task_bars, filter: [e, function(i, a) { + return !a.hide_bar; + }] }]; + return n.push({ renderer: this.$gantt.$ui.layers.taskBg(), container: this.$task_bg, filter: [e] }), { tasks: n, links: [{ expose: !0, renderer: this.$gantt.$ui.layers.link(), container: this.$task_links, filter: [e] }] }; +}, _attachLayers: function(t) { + this._taskLayers = [], this._linkLayers = []; + var e = this, n = this.$gantt.$services.getService("layers"); + if (this.$config.bind) { + this._bindStore(); + var i = n.getDataRender(this.$config.bind); + i || (i = n.createDataRender({ name: this.$config.bind, defaultContainer: function() { + return e.$task_data; + } })), i.container = function() { + return e.$task_data; + }; + for (var a = this.$config.layers, r = 0; a && r < a.length; r++) { + typeof (d = a[r]) == "string" && (d = this.$gantt.$ui.layers[d]()), (typeof d == "function" || d && d.render && d.update) && (d = { renderer: d }), d.view = this; + var s = i.addLayer(d); + this._taskLayers.push(s), d.expose && (this._taskRenderer = i.getLayer(s)); + } + this._initStaticBackgroundRender(); + } + if (this.$config.bindLinks) { + e.$config.linkStore = e.$gantt.getDatastore(e.$config.bindLinks); + var o = n.getDataRender(this.$config.bindLinks); + o || (o = n.createDataRender({ name: this.$config.bindLinks, defaultContainer: function() { + return e.$task_data; + } })); + var l = this.$config.linkLayers; + for (r = 0; l && r < l.length; r++) { + var d; + typeof d == "string" && (d = this.$gantt.$ui.layers[d]()), (d = l[r]).view = this; + var c = o.addLayer(d); + this._taskLayers.push(c), l[r].expose && (this._linkRenderer = o.getLayer(c)); + } + } +}, _initStaticBackgroundRender: function() { + var t = this, e = va(), n = t.$config.rowStore; + n && (this._staticBgHandler = n.attachEvent("onStoreUpdated", function(i, a, r) { + if (i === null && t.isVisible()) { + var s = t.$getConfig(); + if (s.static_background || s.timeline_placeholder) { + var o = t.$gantt.getDatastore(t.$config.bind), l = t.$task_bg_static; + if (l || ((l = document.createElement("div")).className = "gantt_task_bg", t.$task_bg_static = l, t.$task_bg.nextSibling ? t.$task_data.insertBefore(l, t.$task_bg.nextSibling) : t.$task_data.appendChild(l)), o) { + var d = t.getTotalHeight(); + s.timeline_placeholder && (d = s.timeline_placeholder.height || t.$task_data.offsetHeight || 99999), e.render(l, s, t.getScale(), d, t.getItemHeight(a ? a.id : null)); + } + } else s.static_background && t.$task_bg_static && t.$task_bg_static.parentNode && t.$task_bg_static.parentNode.removeChild(t.$task_bg_static); + } + }), this.attachEvent("onDestroy", function() { + }), this._initStaticBackgroundRender = function() { + }); +}, _clearLayers: function(t) { + var e = this.$gantt.$services.getService("layers"), n = e.getDataRender(this.$config.bind), i = e.getDataRender(this.$config.bindLinks); + if (this._taskLayers) for (var a = 0; a < this._taskLayers.length; a++) n.removeLayer(this._taskLayers[a]); + if (this._linkLayers) for (a = 0; a < this._linkLayers.length; a++) i.removeLayer(this._linkLayers[a]); + this._linkLayers = [], this._taskLayers = []; +}, _render_tasks_scales: function() { + var t = this.$getConfig(), e = "", n = 0, i = 0, a = this.$gantt.getState(); + if (this.isVisible()) { + var r = this.$scaleHelper, s = this._getScales(); + i = t.scale_height; + var o = this.$config.width; + t.autosize != "x" && t.autosize != "xy" || (o = Math.max(t.autosize_min_width, 0)); + var l = r.prepareConfigs(s, t.min_column_width, o, i - 1, a.min_date, a.max_date, t.rtl), d = this._tasks = l[l.length - 1]; + this._scales = l, this._posFromDateCache = {}, e = this._getScaleChunkHtml(l, 0, this.$config.width), n = d.full_width + "px", i += "px"; + } + this.$task_scale.style.height = i, this.$task_data.style.width = this.$task_scale.style.width = n, this.$task_scale.innerHTML = e; +}, _getScaleChunkHtml: function(t, e, n) { + for (var i = [], a = this.$gantt.templates.scale_row_class, r = 0; r < t.length; r++) { + var s = "gantt_scale_line", o = a(t[r]); + o && (s += " " + o), i.push('
' + this._prepareScaleHtml(t[r], e, n, r) + "
"); + } + return i.join(""); +}, _prepareScaleHtml: function(t, e, n, i) { + var a = this.$getConfig(), r = this.$gantt.templates, s = [], o = null, l = null, d = t.format || t.template || t.date; + typeof d == "string" && (d = this.$gantt.date.date_to_str(d)); + var c = 0, u = t.count; + !a.smart_scales || isNaN(e) || isNaN(n) || (c = Dt(t.left, e), u = Dt(t.left, n) + 1), l = t.css || function() { + }, !t.css && a.inherit_scale_class && (l = r.scale_cell_class); + for (var h = c; h < u && t.trace_x[h]; h++) { + o = new Date(t.trace_x[h]); + var g = d.call(this, o), f = t.width[h], y = t.height, v = t.left[h], b = "", _ = "", m = ""; + if (f) { + b = "width:" + f + "px;height:" + y + "px;" + (a.smart_scales ? "position:absolute;left:" + v + "px" : ""); + const k = this.getViewPort(), $ = (a.scales[i] || {}).sticky; + let w = ""; + const x = 70; + if ($ !== !1 && f > x || $ === !0) { + if (v < k.x && v + f / 2 - x / 2 < k.x) w = ` style='position:absolute;left: ${k.x - v + 10}px;' `; + else if (v + f / 2 + x / 2 > k.x_end && f > x) { + let S = k.x_end - v - 10, T = "-100%"; + S < x && (S = x, T = `-${S}px`), w = ` style='position:absolute;left: ${S}px;transform: translate(${T},0);' `; + } + } + m = "gantt_scale_cell" + (h == t.count - 1 ? " gantt_last_cell" : ""), (_ = l.call(this, o)) && (m += " " + _); + var p = `
${g}
`; + s.push(p); + } + } + return s.join(""); +}, dateFromPos: function(t) { + var e = this._tasks; + if (t < 0 || t > e.full_width || !e.full_width) return null; + var n = Dt(this._tasks.left, t), i = this._tasks.left[n], a = e.width[n] || e.col_width, r = 0; + a && (r = (t - i) / a, e.rtl && (r = 1 - r)); + var s = 0; + return r && (s = this._getColumnDuration(e, e.trace_x[n])), new Date(e.trace_x[n].valueOf() + Math.round(r * s)); +}, posFromDate: function(t) { + if (!this.isVisible() || !t) return 0; + var e = String(t.valueOf()); + if (this._posFromDateCache[e] !== void 0) return this._posFromDateCache[e]; + var n = this.columnIndexByDate(t); + this.$gantt.assert(n >= 0, "Invalid day index"); + var i = Math.floor(n), a = n % 1, r = this._tasks.left[Math.min(i, this._tasks.width.length - 1)]; + i == this._tasks.width.length && (r += this._tasks.width[this._tasks.width.length - 1]), a && (i < this._tasks.width.length ? r += this._tasks.width[i] * (a % 1) : r += 1); + var s = Math.round(r); + return this._posFromDateCache[e] = s, Math.round(s); +}, _getNextVisibleColumn: function(t, e, n) { + for (var i = +e[t], a = t; n[i]; ) i = +e[++a]; + return a; +}, _getPrevVisibleColumn: function(t, e, n) { + for (var i = +e[t], a = t; n[i]; ) i = +e[--a]; + return a; +}, _getClosestVisibleColumn: function(t, e, n) { + var i = this._getNextVisibleColumn(t, e, n); + return e[i] || (i = this._getPrevVisibleColumn(t, e, n)), i; +}, columnIndexByDate: function(t) { + var e = new Date(t).valueOf(), n = this._tasks.trace_x_ascending, i = this._tasks.ignore_x, a = this.$gantt.getState(); + if (e <= a.min_date) return this._tasks.rtl ? n.length : 0; + if (e >= a.max_date) return this._tasks.rtl ? 0 : n.length; + var r = Dt(n, e), s = this._getClosestVisibleColumn(r, n, i), o = n[s], l = this._tasks.trace_index_transition; + if (!o) return l ? l[0] : 0; + var d = (t - n[s]) / this._getColumnDuration(this._tasks, n[s]); + return l ? l[s] + (1 - d) : s + d; +}, getItemPosition: function(t, e, n) { + var i, a, r; + let s = e || t.start_date || t.$auto_start_date, o = n || t.end_date || t.$auto_end_date; + return this._tasks.rtl ? (a = this.posFromDate(s), i = this.posFromDate(o)) : (i = this.posFromDate(s), a = this.posFromDate(o)), r = Math.max(a - i, 0), { left: i, top: this.getItemTop(t.id), height: this.getBarHeight(t.id), width: r, rowHeight: this.getItemHeight(t.id) }; +}, getBarHeight: function(t, e) { + var n = this.$getConfig(), i = this.$config.rowStore.getItem(t), a = i.task_height || i.bar_height || n.bar_height || n.task_height, r = this.getItemHeight(t); + return a == "full" && (a = r - (n.bar_height_padding || 3)), a = Math.min(a, r), e && (a = Math.round(a / Math.sqrt(2))), Math.max(a, 0); +}, getScale: function() { + return this._tasks; +}, _getScales: function() { + var t = this.$getConfig(), e = this.$scaleHelper, n = [e.primaryScale(t)].concat(e.getSubScales(t)); + return e.sortScales(n), n; +}, _getColumnDuration: function(t, e) { + return this.$gantt.date.add(e, t.step, t.unit) - e; +}, _bindStore: function() { + if (this.$config.bind) { + var t = this.$gantt.getDatastore(this.$config.bind); + if (this.$config.rowStore = t, t && !t._timelineCacheAttached) { + var e = this; + t._timelineCacheAttached = t.attachEvent("onBeforeFilter", function() { + e._resetTopPositionHeight(); + }); + } + } +}, _unbindStore: function() { + if (this.$config.bind) { + var t = this.$gantt.getDatastore(this.$config.bind); + t && t._timelineCacheAttached && (t.detachEvent(t._timelineCacheAttached), t._timelineCacheAttached = !1); + } +}, refresh: function() { + this._bindStore(), this.$config.bindLinks && (this.$config.linkStore = this.$gantt.getDatastore(this.$config.bindLinks)), this._resetTopPositionHeight(), this._resetHeight(), this._initStaticBackgroundRender(), this._render_tasks_scales(); +}, destructor: function() { + var t = this.$gantt; + this._clearLayers(t), this._unbindStore(), this.$task = null, this.$task_scale = null, this.$task_data = null, this.$task_bg = null, this.$task_links = null, this.$task_bars = null, this.$gantt = null, this.$config.rowStore && (this.$config.rowStore.detachEvent(this._staticBgHandler), this.$config.rowStore = null), this.$config.linkStore && (this.$config.linkStore = null), this._timelineDragScroll && (this._timelineDragScroll.destructor(), this._timelineDragScroll = null), this.callEvent("onDestroy", []), this.detachAllEvents(); +} }; +class ka { + constructor(e) { + this._scrollOrder = 0; + const { gantt: n, grid: i, dnd: a, getCurrentX: r } = e; + this.$gantt = n, this.$grid = i, this._dnd = a, this.getCurrentX = r, this._scrollView = this.$gantt.$ui.getView(this.$grid.$config.scrollX), this.attachEvents(); + } + attachEvents() { + this.isScrollable() && (this._dnd.attachEvent("onDragMove", (e, n) => { + const i = this.$grid.$grid.getBoundingClientRect(), a = i.right, r = i.left, s = this.getCurrentX(n.clientX); + return s >= a - 20 && (this.autoscrollRight(), this.autoscrollStart()), s <= r + 20 && (this.autoscrollLeft(), this.autoscrollStart()), s < a - 20 && s > r + 20 && this.autoscrollStop(), !0; + }), this._dnd.attachEvent("onDragEnd", () => { + this.autoscrollStop(); + })); + } + autoscrollStart() { + if (this._scrollOrder === 0) return; + const e = 10 * this._scrollOrder, n = this._scrollView.getScrollState(); + this._scrollView.scrollTo(n.position + e), setTimeout(() => { + this.autoscrollStart(); + }, 50); + } + autoscrollRight() { + this._scrollOrder = 1; + } + autoscrollLeft() { + this._scrollOrder = -1; + } + autoscrollStop() { + this._scrollOrder = 0; + } + getCorrection() { + return this.isScrollable() ? this._scrollView.getScrollState().position : 0; + } + isScrollable() { + return !!this.$grid.$config.scrollable; + } +} +const Ue = "data-column-id"; +class ya { + constructor(e, n) { + this._targetMarker = null, this.calculateCurrentPosition = (i) => { + const a = this.$grid.$grid.getBoundingClientRect(), r = a.right, s = a.left; + let o = i; + return o > r && (o = r), o < s && (o = s), o; + }, this.$gantt = e, this.$grid = n; + } + init() { + const e = this.$gantt.$services.getService("dnd"); + this._dnd = new e(this.$grid.$grid_scale, { updates_per_second: 60 }), this._scrollableGrid = new ka({ gantt: this.$gantt, grid: this.$grid, dnd: this._dnd, getCurrentX: this.calculateCurrentPosition }), this.attachEvents(); + } + attachEvents() { + this._dnd.attachEvent("onBeforeDragStart", (e, n) => { + if (this._draggedCell = this.$gantt.utils.dom.closest(n.target, ".gantt_grid_head_cell"), !this._draggedCell) return; + const i = this.$grid.$getConfig().columns, a = this._draggedCell.getAttribute(Ue); + let r, s; + return i.map(function(o, l) { + o.name === a && (r = o, s = l); + }), this.$grid.callEvent("onBeforeColumnDragStart", [{ draggedColumn: r, draggedIndex: s }]) !== !1 && !(!this._draggedCell || !r) && (this._gridConfig = this.$grid.$getConfig(), this._originAutoscroll = this.$gantt.config.autoscroll, this.$gantt.config.autoscroll = !1, !0); + }), this._dnd.attachEvent("onAfterDragStart", (e, n) => { + this._draggedCell && (this._dnd.config.column = this._draggedCell.getAttribute(Ue), this._dnd.config.marker.innerHTML = this._draggedCell.outerHTML, this._dnd.config.marker.classList.add("gantt_column_drag_marker"), this._dnd.config.marker.style.height = this._gridConfig.scale_height + "px", this._dnd.config.marker.style.lineHeight = this._gridConfig.scale_height + "px", this._draggedCell.classList.add("gantt_grid_head_cell_dragged")); + }), this._dnd.attachEvent("onDragMove", (e, n) => { + if (!this._draggedCell) return; + this._dragX = n.clientX; + const i = this.calculateCurrentPosition(n.clientX), a = this.findColumnsIndexes(), r = a.targetIndex, s = a.draggedIndex, o = this.$grid.$getConfig().columns, l = o[s], d = o[r]; + return this.$grid.callEvent("onColumnDragMove", [{ draggedColumn: l, targetColumn: d, draggedIndex: s, targetIndex: r }]) === !1 ? (this.cleanTargetMarker(), !1) : (this.setMarkerPosition(i), this.drawTargetMarker(a), !0); + }), this._dnd.attachEvent("onDragEnd", () => { + this._draggedCell && (this.$gantt.config.autoscroll = this._originAutoscroll, this._draggedCell.classList.remove("gantt_grid_head_cell_dragged"), this.cleanTargetMarker(), this.reorderColumns()); + }); + } + reorderColumns() { + const { targetIndex: e, draggedIndex: n } = this.findColumnsIndexes(), i = this.$grid.$getConfig().columns, a = i[n], r = i[e]; + this.$grid.callEvent("onBeforeColumnReorder", [{ draggedColumn: a, targetColumn: r, draggedIndex: n, targetIndex: e }]) !== !1 && e !== n && (i.splice(n, 1), i.splice(e, 0, a), this.$gantt.render(), this.$grid.callEvent("onAfterColumnReorder", [{ draggedColumn: a, targetColumn: r, draggedIndex: n, targetIndex: e }])); + } + findColumnsIndexes() { + const e = this._dnd.config.column, n = this.$grid.$getConfig().columns; + let i, a, r, s; + const o = { startX: 0, endX: 0 }; + let l, d = 0, c = n.length - 1, u = (f, y) => f <= y, h = (f) => ++f; + this.$gantt.config.rtl && (d = n.length - 1, c = 0, u = (f, y) => f >= y, h = (f) => --f); + const g = this._dragX - this.$grid.$grid.getBoundingClientRect().left + this._scrollableGrid.getCorrection(); + for (let f = d; u(f, c) && (i === void 0 || a === void 0); f = h(f)) n[f].hide || (o.startX = o.endX, o.endX += n[f].width, g >= o.startX && (g <= o.endX || !u(h(f), c)) && (i = f, r = o.startX, s = o.endX, l = (g - o.startX) / (o.endX - o.startX)), e === n[f].name && (a = f)); + return { targetIndex: i, draggedIndex: a, xBefore: r, xAfter: s, columnRelativePos: l }; + } + setMarkerPosition(e, n = 10) { + const { marker: i } = this._dnd.config, a = this._dnd._obj.getBoundingClientRect(); + i.style.top = `${a.y + n}px`, i.style.left = `${e}px`; + } + drawTargetMarker({ targetIndex: e, draggedIndex: n, xBefore: i, xAfter: a, columnRelativePos: r }) { + let s; + this._targetMarker || (this._targetMarker = document.createElement("div"), $t(this._targetMarker, "gantt_grid_target_marker"), this._targetMarker.style.display = "none", this._targetMarker.style.height = `${this._gridConfig.scale_height}px`), this._targetMarker.parentNode || this.$grid.$grid_scale.appendChild(this._targetMarker), s = e > n ? a : e < n ? i : r > 0.5 ? a : i, this._targetMarker.style.left = `${s}px`, this._targetMarker.style.display = "block"; + } + cleanTargetMarker() { + this._targetMarker && this._targetMarker.parentNode && this.$grid.$grid_scale.removeChild(this._targetMarker), this._targetMarker = null; + } +} +function Se(t) { + var e = []; + return { delegate: function(n, i, a, r) { + e.push([n, i, a, r]), t.$services.getService("mouseEvents").delegate(n, i, a, r); + }, destructor: function() { + for (var n = t.$services.getService("mouseEvents"), i = 0; i < e.length; i++) { + var a = e[i]; + n.detach(a[0], a[1], a[2], a[3]); + } + e = []; + } }; +} +var ve = function(t, e, n, i) { + this.$config = L({}, e || {}), this.$gantt = i, this.$parent = t, st(this), this.$state = {}, L(this, kn(this)); +}; +ve.prototype = { init: function(t) { + var e = this.$gantt, n = e._waiAria.gridAttrString(), i = e._waiAria.gridDataAttrString(), a = this.$getConfig(), r = a.reorder_grid_columns || !1; + this.$config.reorder_grid_columns !== void 0 && (r = this.$config.reorder_grid_columns), t.innerHTML = "
", this.$grid = t.childNodes[0], this.$grid.innerHTML = "
", this.$grid_scale = this.$grid.childNodes[0], this.$grid_data = this.$grid.childNodes[1]; + var s = a[this.$config.bind + "_attribute"]; + if (!s && this.$config.bind && (s = "data-" + this.$config.bind + "-id"), this.$config.item_attribute = s || null, !this.$config.layers) { + var o = this._createLayerConfig(); + this.$config.layers = o; + } + var l = { init: function() { + }, doOnRender: function() { + } }; + this._renderHeaderResizers = l.doOnRender, this._mouseDelegates = Se(e); + var d = function(c, u) { + var h = { row_before_start: c.bind(function(g, f, y) { + var v = u.$getConfig(), b = u.$config.rowStore; + if (!et(y, v.task_grid_row_resizer_attribute)) return !1; + var _ = this.locate(y, v.task_grid_row_resizer_attribute), m = b.getItem(_); + return u.callEvent("onBeforeRowResize", [m]) !== !1 && void 0; + }, c), row_after_start: c.bind(function(g, f, y) { + var v = u.$getConfig(), b = this.locate(y, v.task_grid_row_resizer_attribute); + g.config.marker.innerHTML = "", g.config.marker.className += " gantt_row_grid_resize_area", g.config.marker.style.width = u.$grid.offsetWidth + "px", g.config.drag_id = b; + }, c), row_drag_move: c.bind(function(g, f, y) { + var v = u.$config.rowStore, b = u.$getConfig(), _ = g.config, m = _.drag_id, p = u.getItemHeight(m), k = u.getItemTop(m) - f.scrollTop, $ = F(u.$grid_data), w = parseInt(_.marker.style.top, 10), x = k + $.y, S = 0, T = b.min_task_grid_row_height; + return (S = w - x) < T && (S = T), _.marker.style.left = $.x + "px", _.marker.style.top = x - 1 + "px", _.marker.style.height = Math.abs(S) + 1 + "px", _.marker_height = S, u.callEvent("onRowResize", [m, v.getItem(m), S + p]), !0; + }, c), row_drag_end: c.bind(function(g, f, y) { + var v = u.$config.rowStore, b = g.config, _ = b.drag_id, m = v.getItem(_), p = u.getItemHeight(_), k = b.marker_height; + u.callEvent("onBeforeRowResizeEnd", [_, m, k]) !== !1 && m.row_height != k && (m.row_height = k, c.updateTask(_), u.callEvent("onAfterRowResize", [_, m, p, k]), this.render()); + }, c) }; + return { init: function() { + var g = c.$services.getService("dnd"), f = u.$getConfig(), y = new g(u.$grid_data, { updates_per_second: 60 }); + c.defined(f.dnd_sensitivity) && (y.config.sensitivity = f.dnd_sensitivity), y.attachEvent("onBeforeDragStart", function(v, b) { + return h.row_before_start(y, v, b); + }), y.attachEvent("onAfterDragStart", function(v, b) { + return h.row_after_start(y, v, b); + }), y.attachEvent("onDragMove", function(v, b) { + return h.row_drag_move(y, v, b); + }), y.attachEvent("onDragEnd", function(v, b) { + return h.row_drag_end(y, v, b); + }); + } }; + }(e, this); + d.init(), this._addLayers(this.$gantt), this._initEvents(), r && (this._columnDND = new ya(e, this), this._columnDND.init()), this.callEvent("onReady", []); +}, _validateColumnWidth: function(t, e) { + var n = t[e]; + if (n && n != "*") { + var i = this.$gantt, a = 1 * n; + isNaN(a) ? i.assert(!1, "Wrong " + e + " value of column " + t.name) : t[e] = a; + } +}, setSize: function(t, e) { + this.$config.width = this.$state.width = t, this.$config.height = this.$state.height = e; + for (var n, i = this.getGridColumns(), a = 0, r = (d = this.$getConfig()).grid_elastic_columns, s = 0, o = i.length; s < o; s++) this._validateColumnWidth(i[s], "min_width"), this._validateColumnWidth(i[s], "max_width"), this._validateColumnWidth(i[s], "width"), a += 1 * i[s].width; + if (!isNaN(a) && this.$config.scrollable || (a = n = this._setColumnsWidth(t + 1)), this.$config.scrollable && r && !isNaN(a)) { + let u = "width"; + r == "min_width" && (u = "min_width"); + let h = 0; + i.forEach(function(g) { + h += g[u] || d.min_grid_column_width; + }); + var l = Math.max(h, t); + a = this._setColumnsWidth(l), n = t; + } + this.$config.scrollable ? (this.$grid_scale.style.width = a + "px", this.$grid_data.style.width = a + "px") : (this.$grid_scale.style.width = "inherit", this.$grid_data.style.width = "inherit"), this.$config.width -= 1; + var d = this.$getConfig(); + n !== t && (n !== void 0 ? (d.grid_width = n, this.$config.width = n - 1) : isNaN(a) || (this._setColumnsWidth(a), d.grid_width = a, this.$config.width = a - 1)); + var c = Math.max(this.$state.height - d.scale_height, 0); + this.$grid_data.style.height = c + "px", this.refresh(); +}, getSize: function() { + var t = this.$getConfig(), e = this.$config.rowStore ? this.getTotalHeight() : 0, n = this._getGridWidth(); + return { x: this.$state.width, y: this.$state.height, contentX: this.isVisible() ? n : 0, contentY: this.isVisible() ? t.scale_height + e : 0, scrollHeight: this.isVisible() ? e : 0, scrollWidth: this.isVisible() ? n : 0 }; +}, _bindStore: function() { + if (this.$config.bind) { + var t = this.$gantt.getDatastore(this.$config.bind); + if (this.$config.rowStore = t, t && !t._gridCacheAttached) { + var e = this; + t._gridCacheAttached = t.attachEvent("onBeforeFilter", function() { + e._resetTopPositionHeight(); + }); + } + } +}, _unbindStore: function() { + if (this.$config.bind) { + var t = this.$gantt.getDatastore(this.$config.bind); + t && t._gridCacheAttached && (t.detachEvent(t._gridCacheAttached), t._gridCacheAttached = !1); + } +}, refresh: function() { + this._bindStore(), this._resetTopPositionHeight(), this._resetHeight(), this._initSmartRenderingPlaceholder(), this._calculateGridWidth(), this._renderGridHeader(); +}, getViewPort: function() { + var t = this.$config.scrollLeft || 0, e = this.$config.scrollTop || 0, n = this.$config.height || 0, i = this.$config.width || 0; + return { y: e, y_end: e + n, x: t, x_end: t + i, height: n, width: i }; +}, scrollTo: function(t, e) { + if (this.isVisible()) { + var n = !1; + this.$config.scrollTop = this.$config.scrollTop || 0, this.$config.scrollLeft = this.$config.scrollLeft || 0, 1 * t == t && (this.$config.scrollLeft = this.$state.scrollLeft = this.$grid.scrollLeft = t, n = !0), 1 * e == e && (this.$config.scrollTop = this.$state.scrollTop = this.$grid_data.scrollTop = e, n = !0), n && this.callEvent("onScroll", [this.$config.scrollLeft, this.$config.scrollTop]); + } +}, getColumnIndex: function(t, e) { + for (var n = this.$getConfig().columns, i = 0, a = 0; a < n.length; a++) if (e && n[a].hide && i++, n[a].name == t) return a - i; + return null; +}, getColumn: function(t) { + var e = this.getColumnIndex(t); + return e === null ? null : this.$getConfig().columns[e]; +}, getGridColumns: function() { + return this.$getConfig().columns.slice(); +}, isVisible: function() { + return this.$parent && this.$parent.$config ? !this.$parent.$config.hidden : this.$grid.offsetWidth; +}, _createLayerConfig: function() { + var t = this.$gantt, e = this; + return [{ renderer: t.$ui.layers.gridLine(), container: this.$grid_data, filter: [function() { + return e.isVisible(); + }] }, { renderer: t.$ui.layers.gridTaskRowResizer(), container: this.$grid_data, append: !0, filter: [function() { + return t.config.resize_rows; + }] }]; +}, _addLayers: function(t) { + if (this.$config.bind) { + this._taskLayers = []; + var e = this, n = this.$gantt.$services.getService("layers"), i = n.getDataRender(this.$config.bind); + i || (i = n.createDataRender({ name: this.$config.bind, defaultContainer: function() { + return e.$grid_data; + } })); + for (var a = this.$config.layers, r = 0; a && r < a.length; r++) { + var s = a[r]; + s.view = this; + var o = i.addLayer(s); + this._taskLayers.push(o); + } + this._bindStore(), this._initSmartRenderingPlaceholder(); + } +}, _refreshPlaceholderOnStoreUpdate: function(t) { + var e = this.$getConfig(), n = this.$config.rowStore; + if (n && t === null && this.isVisible() && e.smart_rendering) { + var i; + if (this.$config.scrollY) { + var a = this.$gantt.$ui.getView(this.$config.scrollY); + a && (i = a.getScrollState().scrollSize); + } + if (i || (i = n ? this.getTotalHeight() : 0), i) { + this.$rowsPlaceholder && this.$rowsPlaceholder.parentNode && this.$rowsPlaceholder.parentNode.removeChild(this.$rowsPlaceholder); + var r = this.$rowsPlaceholder = document.createElement("div"); + r.style.visibility = "hidden", r.style.height = i + "px", r.style.width = "1px", this.$grid_data.appendChild(r); + } + } +}, _initSmartRenderingPlaceholder: function() { + var t = this.$config.rowStore; + t && (this._initSmartRenderingPlaceholder = function() { + }, this._staticBgHandler = t.attachEvent("onStoreUpdated", R(this._refreshPlaceholderOnStoreUpdate, this))); +}, _initEvents: function() { + var t = this.$gantt; + this._mouseDelegates.delegate("click", "gantt_close", t.bind(function(e, n, i) { + var a = this.$config.rowStore; + if (!a) return !0; + var r = et(e, this.$config.item_attribute); + return r && a.close(r.getAttribute(this.$config.item_attribute)), !1; + }, this), this.$grid), this._mouseDelegates.delegate("click", "gantt_open", t.bind(function(e, n, i) { + var a = this.$config.rowStore; + if (!a) return !0; + var r = et(e, this.$config.item_attribute); + return r && a.open(r.getAttribute(this.$config.item_attribute)), !1; + }, this), this.$grid); +}, _clearLayers: function(t) { + var e = this.$gantt.$services.getService("layers").getDataRender(this.$config.bind); + if (this._taskLayers) for (var n = 0; n < this._taskLayers.length; n++) e.removeLayer(this._taskLayers[n]); + this._taskLayers = []; +}, _getColumnWidth: function(t, e, n) { + var i = t.min_width || e.min_grid_column_width, a = Math.max(n, i || 10); + return t.max_width && (a = Math.min(a, t.max_width)), a; +}, _checkGridColumnMinWidthLimits: function(t, e) { + for (var n = 0, i = t.length; n < i; n++) { + var a = 1 * t[n].width; + !t[n].min_width && a < e.min_grid_column_width && (t[n].min_width = a); + } +}, _getGridWidthLimits: function() { + for (var t = this.$getConfig(), e = this.getGridColumns(), n = 0, i = 0, a = 0; a < e.length; a++) n += e[a].min_width ? e[a].min_width : t.min_grid_column_width, i !== void 0 && (i = e[a].max_width ? i + e[a].max_width : void 0); + return this._checkGridColumnMinWidthLimits(e, t), [n, i]; +}, _setColumnsWidth: function(t, e) { + var n = this.$getConfig(), i = this.getGridColumns(), a = 0, r = t; + e = window.isNaN(e) ? -1 : e; + for (var s = 0, o = i.length; s < o; s++) a += 1 * i[s].width; + if (window.isNaN(a)) + for (this._calculateGridWidth(), a = 0, s = 0, o = i.length; s < o; s++) a += 1 * i[s].width; + var l = r - a, d = 0; + for (s = 0; s < e + 1; s++) d += i[s].width; + for (a -= d, s = e + 1; s < i.length; s++) { + var c = i[s], u = Math.round(l * (c.width / a)); + l < 0 ? c.min_width && c.width + u < c.min_width ? u = c.min_width - c.width : !c.min_width && n.min_grid_column_width && c.width + u < n.min_grid_column_width && (u = n.min_grid_column_width - c.width) : c.max_width && c.width + u > c.max_width && (u = c.max_width - c.width), a -= c.width, c.width += u, l -= u; + } + for (var h = l > 0 ? 1 : -1; l > 0 && h === 1 || l < 0 && h === -1; ) { + var g = l; + for (s = e + 1; s < i.length; s++) { + var f; + if ((f = i[s].width + h) == this._getColumnWidth(i[s], n, f) && (l -= h, i[s].width = f), !l) break; + } + if (g == l) break; + } + return l && e > -1 && (f = i[e].width + l) == this._getColumnWidth(i[e], n, f) && (i[e].width = f), this._getColsTotalWidth(); +}, _getColsTotalWidth: function() { + for (var t = this.getGridColumns(), e = 0, n = 0; n < t.length; n++) { + var i = parseFloat(t[n].width); + if (window.isNaN(i)) return !1; + e += i; + } + return e; +}, _calculateGridWidth: function() { + for (var t = this.$getConfig(), e = this.getGridColumns(), n = 0, i = [], a = [], r = 0; r < e.length; r++) { + var s = parseFloat(e[r].width); + window.isNaN(s) && (s = t.min_grid_column_width || 10, i.push(r)), a[r] = s, n += s; + } + var o = this._getGridWidth() + 1; + if (t.autofit || i.length) { + var l = o - n; + if (t.autofit && !t.grid_elastic_columns) for (r = 0; r < a.length; r++) { + var d = Math.round(l / (a.length - r)); + a[r] += d, (c = this._getColumnWidth(e[r], t, a[r])) != a[r] && (d = c - a[r], a[r] = c), l -= d; + } + else if (i.length) for (r = 0; r < i.length; r++) { + d = Math.round(l / (i.length - r)); + var c, u = i[r]; + a[u] += d, (c = this._getColumnWidth(e[u], t, a[u])) != a[u] && (d = c - a[u], a[u] = c), l -= d; + } + for (r = 0; r < a.length; r++) e[r].width = a[r]; + } else { + var h = o != n; + this.$config.width = n - 1, t.grid_width = n, h && this.$parent._setContentSize(this.$config.width, null); + } +}, _renderGridHeader: function() { + var t = this.$gantt, e = this.$getConfig(), n = this.$gantt.locale, i = this.$gantt.templates, a = this.getGridColumns(); + e.rtl && (a = a.reverse()); + for (var r = [], s = 0, o = n.labels, l = e.scale_height - 1, d = 0; d < a.length; d++) { + var c = d == a.length - 1, u = a[d]; + u.name || (u.name = t.uid() + ""); + var h = 1 * u.width, g = this._getGridWidth(); + c && g > s + h && (u.width = h = g - s), s += h; + var f = t._sort && u.name == t._sort.name ? `
` : "", y = ["gantt_grid_head_cell", "gantt_grid_head_" + u.name, c ? "gantt_last_cell" : "", i.grid_header_class(u.name, u)].join(" "), v = "width:" + (h - (c ? 1 : 0)) + "px;", b = u.label || o["column_" + u.name] || o[u.name]; + b = b || ""; + var _ = "
" + b + f + "
"; + r.push(_); + } + this.$grid_scale.style.height = e.scale_height + "px", this.$grid_scale.style.lineHeight = l + "px", this.$grid_scale.innerHTML = r.join(""), this._renderHeaderResizers && this._renderHeaderResizers(); +}, _getGridWidth: function() { + return this.$config.width; +}, destructor: function() { + this._clearLayers(this.$gantt), this._mouseDelegates && (this._mouseDelegates.destructor(), this._mouseDelegates = null), this._unbindStore(), this.$grid = null, this.$grid_scale = null, this.$grid_data = null, this.$gantt = null, this.$config.rowStore && (this.$config.rowStore.detachEvent(this._staticBgHandler), this.$config.rowStore = null), this.callEvent("onDestroy", []), this.detachAllEvents(); +} }; +const ba = { init: function(t, e) { + var n = e.$gantt; + n.attachEvent("onTaskClick", function(i, a) { + if (n._is_icon_open_click(a)) return !0; + var r = t.getState(), s = t.locateCell(a.target); + return !s || !t.getEditorConfig(s.columnName) || (t.isVisible() && r.id == s.id && r.columnName == s.columnName || t.startEdit(s.id, s.columnName), !1); + }), n.attachEvent("onEmptyClick", function() { + return t.isVisible() && t.isChanged() ? t.save() : t.hide(), !0; + }), n.attachEvent("onTaskDblClick", function(i, a) { + var r = t.getState(), s = t.locateCell(a.target); + return !s || !t.isVisible() || s.columnName != r.columnName; + }); +}, onShow: function(t, e, n) { + var i = n.$gantt; + i.ext && i.ext.keyboardNavigation && i.ext.keyboardNavigation.attachEvent("onKeyDown", function(a, r) { + var s = i.constants.KEY_CODES, o = !1; + return r.keyCode === s.SPACE && t.isVisible() && (o = !0), !o; + }), e.onkeydown = function(a) { + a = a || window.event; + var r = i.constants.KEY_CODES; + if (!(a.defaultPrevented || a.shiftKey && a.keyCode != r.TAB)) { + var s = !0; + switch (a.keyCode) { + case i.keys.edit_save: + t.save(); + break; + case i.keys.edit_cancel: + t.hide(); + break; + case r.UP: + case r.DOWN: + t.isVisible() && (t.hide(), s = !1); + break; + case r.TAB: + a.shiftKey ? t.editPrevCell(!0) : t.editNextCell(!0); + break; + default: + s = !1; + } + s && a.preventDefault(); + } + }; +}, onHide: function() { +}, destroy: function() { +} }, xa = { init: function(t, e) { + var n = t, i = e.$gantt, a = null, r = i.ext.keyboardNavigation; + r.attachEvent("onBeforeFocus", function(s) { + var o = t.locateCell(s); + if (clearTimeout(a), o) { + var l = o.columnName, d = o.id, c = n.getState(); + if (n.isVisible() && c.id == d && c.columnName === l) return !1; + } + return !0; + }), r.attachEvent("onFocus", function(s) { + var o = t.locateCell(s), l = t.getState(); + return clearTimeout(a), !o || o.id == l.id && o.columnName == l.columnName || n.isVisible() && n.save(), !0; + }), t.attachEvent("onHide", function() { + clearTimeout(a); + }), r.attachEvent("onBlur", function() { + return a = setTimeout(function() { + n.save(); + }), !0; + }), i.attachEvent("onTaskDblClick", function(s, o) { + var l = t.getState(), d = t.locateCell(o.target); + return !d || !t.isVisible() || d.columnName != l.columnName; + }), i.attachEvent("onTaskClick", function(s, o) { + if (i._is_icon_open_click(o)) return !0; + var l = t.getState(), d = t.locateCell(o.target); + return !d || !t.getEditorConfig(d.columnName) || (t.isVisible() && l.id == d.id && l.columnName == d.columnName || t.startEdit(d.id, d.columnName), !1); + }), i.attachEvent("onEmptyClick", function() { + return n.save(), !0; + }), r.attachEvent("onKeyDown", function(s, o) { + var l = t.locateCell(o.target), d = !!l && t.getEditorConfig(l.columnName), c = t.getState(), u = i.constants.KEY_CODES, h = o.keyCode, g = !1; + switch (h) { + case u.ENTER: + t.isVisible() ? (t.save(), o.preventDefault(), g = !0) : d && !(o.ctrlKey || o.metaKey || o.shiftKey) && (n.startEdit(l.id, l.columnName), o.preventDefault(), g = !0); + break; + case u.ESC: + t.isVisible() && (t.hide(), o.preventDefault(), g = !0); + break; + case u.UP: + case u.DOWN: + break; + case u.LEFT: + case u.RIGHT: + (d && t.isVisible() || c.editorType === "date") && (g = !0); + break; + case u.SPACE: + t.isVisible() && (g = !0), d && !t.isVisible() && (n.startEdit(l.id, l.columnName), o.preventDefault(), g = !0); + break; + case u.DELETE: + d && !t.isVisible() ? (n.startEdit(l.id, l.columnName), g = !0) : d && t.isVisible() && (g = !0); + break; + case u.TAB: + if (t.isVisible()) { + o.shiftKey ? t.editPrevCell(!0) : t.editNextCell(!0); + var f = t.getState(); + f.id && r.focus({ type: "taskCell", id: f.id, column: f.columnName }), o.preventDefault(), g = !0; + } + break; + default: + if (t.isVisible()) g = !0; + else if (h >= 48 && h <= 57 || h > 95 && h < 112 || h >= 64 && h <= 91 || h > 185 && h < 193 || h > 218 && h < 223) { + var y = s.modifiers, v = y.alt || y.ctrl || y.meta || y.shift; + y.alt || v && r.getCommandHandler(s, "taskCell") || d && !t.isVisible() && (n.startEdit(l.id, l.columnName), g = !0); + } + } + return !g; + }); +}, onShow: function(t, e, n) { +}, onHide: function(t, e, n) { + const i = n.$gantt; + i && i.focus(); +}, destroy: function() { +} }; +function wt(t) { + var e = function() { + }; + return e.prototype = { show: function(n, i, a, r) { + }, hide: function() { + }, set_value: function(n, i, a, r) { + this.get_input(r).value = n; + }, get_value: function(n, i, a) { + return this.get_input(a).value || ""; + }, is_changed: function(n, i, a, r) { + var s = this.get_value(i, a, r); + return s && n && s.valueOf && n.valueOf ? s.valueOf() != n.valueOf() : s != n; + }, is_valid: function(n, i, a, r) { + return !0; + }, save: function(n, i, a) { + }, get_input: function(n) { + return n.querySelector("input"); + }, focus: function(n) { + var i = this.get_input(n); + i && (i.focus && i.focus(), i.select && i.select()); + } }, e; +} +function $a(t) { + var e = wt(); + function n() { + return e.apply(this, arguments) || this; + } + return B(n, e), L(n.prototype, { show: function(i, a, r, s) { + var o = `
`; + s.innerHTML = o; + } }, !0), n; +} +function wa(t) { + var e = wt(); + function n() { + return e.apply(this, arguments) || this; + } + return B(n, e), L(n.prototype, { show: function(i, a, r, s) { + var o = r.min || 0, l = r.max || 100, d = `
`; + s.innerHTML = d, s.oninput = function(c) { + +c.target.value < o && (c.target.value = o), +c.target.value > l && (c.target.value = l); + }; + }, get_value: function(i, a, r) { + return this.get_input(r).value || ""; + }, is_valid: function(i, a, r, s) { + return !isNaN(parseInt(i, 10)); + } }, !0), n; +} +function Sa(t) { + var e = wt(); + function n() { + return e.apply(this, arguments) || this; + } + return B(n, e), L(n.prototype, { show: function(i, a, r, s) { + for (var o = `
", s.innerHTML = o; + }, get_input: function(i) { + return i.querySelector("select"); + } }, !0), n; +} +function Ta(t) { + var e = wt(), n = "%Y-%m-%d", i = null, a = null; + function r() { + return e.apply(this, arguments) || this; + } + return B(r, e), L(r.prototype, { show: function(s, o, l, d) { + i || (i = t.date.date_to_str(n)), a || (a = t.date.str_to_date(n)); + var c = null, u = null; + c = typeof l.min == "function" ? l.min(s, o) : l.min, u = typeof l.max == "function" ? l.max(s, o) : l.max; + var h = `
`; + d.innerHTML = h, d.oninput = function(g) { + +t.date.str_to_date("%Y-%m-%d")(g.target.value) < +c && (g.target.value = t.date.date_to_str("%Y-%m-%d")(c)), +t.date.str_to_date("%Y-%m-%d")(g.target.value) > +u && (g.target.value = t.date.date_to_str("%Y-%m-%d")(u)); + }; + }, set_value: function(s, o, l, d) { + s && s.getFullYear ? this.get_input(d).value = i(s) : this.get_input(d).value = s; + }, is_valid: function(s, o, l, d) { + return !(!s || isNaN(s.getTime())); + }, get_value: function(s, o, l) { + var d; + try { + d = a(this.get_input(l).value || ""); + } catch { + d = null; + } + return d; + } }, !0), r; +} +function Ca(t) { + var e = wt(); + function n() { + return e.apply(this, arguments) || this; + } + function i(l) { + return l.formatter || t.ext.formatters.linkFormatter(); + } + function a(l, d) { + for (var c = (l || "").split(d.delimiter || ","), u = 0; u < c.length; u++) { + var h = c[u].trim(); + h ? c[u] = h : (c.splice(u, 1), u--); + } + return c.sort(), c; + } + function r(l, d, c) { + for (var u = l.$target, h = [], g = 0; g < u.length; g++) { + var f = c.getLink(u[g]); + h.push(i(d).format(f)); + } + return h.join((d.delimiter || ",") + " "); + } + function s(l) { + return l.source + "_" + l.target + "_" + l.type + "_" + (l.lag || 0); + } + function o(l, d, c) { + var u = function(v, b, _) { + var m = []; + return b.forEach(function(p) { + var k = i(_).parse(p); + k && (k.target = v, k.id = "predecessor_generated", t.isLinkAllowed(k) && (k.id = void 0, m.push(k))); + }), m; + }(l.id, d, c), h = {}; + l.$target.forEach(function(v) { + var b = t.getLink(v); + h[s(b)] = b.id; + }); + var g = []; + u.forEach(function(v) { + var b = s(v); + h[b] ? delete h[b] : g.push(v); + }); + var f = []; + for (var y in h) f.push(h[y]); + return { add: g, remove: f }; + } + return B(n, e), L(n.prototype, { show: function(l, d, c, u) { + var h = `
`; + u.innerHTML = h; + }, hide: function() { + }, set_value: function(l, d, c, u) { + this.get_input(u).value = r(l, c.editor, t); + }, get_value: function(l, d, c) { + return a(this.get_input(c).value || "", d.editor); + }, save: function(l, d, c) { + var u = o(t.getTask(l), this.get_value(l, d, c), d.editor); + (u.add.length || u.remove.length) && t.batchUpdate(function() { + u.add.forEach(function(h) { + t.addLink(h); + }), u.remove.forEach(function(h) { + t.deleteLink(h); + }), t.autoSchedule && t.autoSchedule(); + }); + }, is_changed: function(l, d, c, u) { + var h = this.get_value(d, c, u), g = a(r(l, c.editor, t), c.editor); + return h.join() !== g.join(); + } }, !0), n; +} +function Ea(t) { + var e = wt(); + function n() { + return e.apply(this, arguments) || this; + } + function i(a) { + return a.formatter || t.ext.formatters.durationFormatter(); + } + return B(n, e), L(n.prototype, { show: function(a, r, s, o) { + var l = `
`; + o.innerHTML = l; + }, set_value: function(a, r, s, o) { + this.get_input(o).value = i(s.editor).format(a); + }, get_value: function(a, r, s) { + return i(r.editor).parse(this.get_input(s).value || ""); + } }, !0), n; +} +function Da(t) { + return function(n, i, a) { + a == "keepDates" ? function(r, s) { + s == "duration" ? r.end_date = t.calculateEndDate(r) : s != "end_date" && s != "start_date" || (r.duration = t.calculateDuration(r)); + }(n, i) : a == "keepDuration" ? function(r, s) { + s == "end_date" ? r.start_date = e(r) : s != "start_date" && s != "duration" || (r.end_date = t.calculateEndDate(r)); + }(n, i) : function(r, s) { + t.config.schedule_from_end ? s == "end_date" || s == "duration" ? r.start_date = e(r) : s == "start_date" && (r.duration = t.calculateDuration(r)) : s == "start_date" || s == "duration" ? r.end_date = t.calculateEndDate(r) : s == "end_date" && (r.duration = t.calculateDuration(r)); + }(n, i); + }; + function e(n) { + return t.calculateEndDate({ start_date: n.end_date, duration: -n.duration, task: n }); + } +} +function Aa(t) { + t.config.editor_types = { text: new ($a())(), number: new (wa())(), select: new (Sa())(), date: new (Ta(t))(), predecessor: new (Ca(t))(), duration: new (Ea(t))() }; +} +function Ia(t) { + var e = /* @__PURE__ */ function(a) { + var r = null; + return { setMapping: function(s) { + r = s; + }, getMapping: function() { + return r || (a.config.keyboard_navigation_cells && a.ext.keyboardNavigation ? xa : ba); + } }; + }(t), n = {}; + st(n); + var i = { init: Aa, createEditors: function(a) { + function r(u, h) { + var g = a.$getConfig(), f = function(b, _) { + for (var m = a.$getConfig(), p = a.getItemTop(b), k = a.getItemHeight(b), $ = a.getGridColumns(), w = 0, x = 0, S = 0, T = 0; T < $.length; T++) { + if ($[T].name == _) { + S = $[T].width; + break; + } + m.rtl ? x += $[T].width : w += $[T].width; + } + return m.rtl ? { top: p, right: x, height: k, width: S } : { top: p, left: w, height: k, width: S }; + }(u, h), y = document.createElement("div"); + y.className = "gantt_grid_editor_placeholder", y.setAttribute(a.$config.item_attribute, u), y.setAttribute(a.$config.bind + "_id", u), y.setAttribute("data-column-name", h); + var v = function(b, _) { + for (var m = b.getGridColumns(), p = 0; p < m.length; p++) if (m[p].name == _) return p; + return 0; + }(a, h); + return y.setAttribute("data-column-index", v), t._waiAria.inlineEditorAttr(y), g.rtl ? y.style.cssText = ["top:" + f.top + "px", "right:" + f.right + "px", "width:" + f.width + "px", "height:" + f.height + "px"].join(";") : y.style.cssText = ["top:" + f.top + "px", "left:" + f.left + "px", "width:" + f.width + "px", "height:" + f.height + "px"].join(";"), y; + } + var s = Da(t), o = [], l = [], d = null, c = { _itemId: null, _columnName: null, _editor: null, _editorType: null, _placeholder: null, locateCell: function(u) { + if (!J(u, a.$grid)) return null; + var h = et(u, a.$config.item_attribute), g = et(u, "data-column-name"); + if (h && g) { + var f = g.getAttribute("data-column-name"); + return { id: h.getAttribute(a.$config.item_attribute), columnName: f }; + } + return null; + }, getEditorConfig: function(u) { + return a.getColumn(u).editor; + }, init: function() { + var u = e.getMapping(); + u.init && u.init(this, a), d = a.$gantt.getDatastore(a.$config.bind); + var h = this; + o.push(d.attachEvent("onIdChange", function(g, f) { + h._itemId == g && (h._itemId = f); + })), o.push(d.attachEvent("onStoreUpdated", function() { + a.$gantt.getState("batchUpdate").batch_update || h.isVisible() && !d.isVisible(h._itemId) && h.hide(); + })), l.push(t.attachEvent("onDataRender", function() { + h._editor && h._placeholder && !J(h._placeholder, t.$root) && a.$grid_data.appendChild(h._placeholder); + })), this.init = function() { + }; + }, getState: function() { + return { editor: this._editor, editorType: this._editorType, placeholder: this._placeholder, id: this._itemId, columnName: this._columnName }; + }, startEdit: function(u, h) { + if (this.isVisible() && this.save(), d.exists(u)) { + var g = { id: u, columnName: h }; + t.isReadonly(d.getItem(u)) ? this.callEvent("onEditPrevent", [g]) : this.callEvent("onBeforeEditStart", [g]) !== !1 ? (this.show(g.id, g.columnName), this.setValue(), this.callEvent("onEditStart", [g])) : this.callEvent("onEditPrevent", [g]); + } + }, isVisible: function() { + return !(!this._editor || !J(this._placeholder, t.$root)); + }, show: function(u, h) { + this.isVisible() && this.save(); + var g = { id: u, columnName: h }, f = a.getColumn(g.columnName), y = this.getEditorConfig(f.name); + if (y) { + var v = a.$getConfig().editor_types[y.type], b = r(g.id, g.columnName); + a.$grid_data.appendChild(b), v.show(g.id, f, y, b), this._editor = v, this._placeholder = b, this._itemId = g.id, this._columnName = g.columnName, this._editorType = y.type; + var _ = e.getMapping(); + _.onShow && _.onShow(this, b, a); + } + }, setValue: function() { + var u = this.getState(), h = u.id, g = u.columnName, f = a.getColumn(g), y = d.getItem(h), v = this.getEditorConfig(g); + if (v) { + var b = y[v.map_to]; + v.map_to == "auto" && (b = d.getItem(h)), this._editor.set_value(b, h, f, this._placeholder), this.focus(); + } + }, focus: function() { + this._editor.focus(this._placeholder); + }, getValue: function() { + var u = a.getColumn(this._columnName); + return this._editor.get_value(this._itemId, u, this._placeholder); + }, _getItemValue: function() { + var u = this.getEditorConfig(this._columnName); + if (u) { + var h = t.getTask(this._itemId)[u.map_to]; + return u.map_to == "auto" && (h = d.getItem(this._itemId)), h; + } + }, isChanged: function() { + var u = a.getColumn(this._columnName), h = this._getItemValue(); + return this._editor.is_changed(h, this._itemId, u, this._placeholder); + }, hide: function() { + if (this._itemId) { + var u = this._itemId, h = this._columnName, g = e.getMapping(); + g.onHide && g.onHide(this, this._placeholder, a), this._itemId = null, this._columnName = null, this._editorType = null, this._placeholder && (this._editor && this._editor.hide && this._editor.hide(this._placeholder), this._editor = null, this._placeholder.parentNode && this._placeholder.parentNode.removeChild(this._placeholder), this._placeholder = null, this.callEvent("onEditEnd", [{ id: u, columnName: h }])); + } + }, save: function() { + if (this.isVisible() && d.exists(this._itemId) && this.isChanged()) { + var u = this._itemId, h = this._columnName; + if (d.exists(u)) { + var g = d.getItem(u), f = this.getEditorConfig(h), y = { id: u, columnName: h, newValue: this.getValue(), oldValue: this._getItemValue() }; + if (this.callEvent("onBeforeSave", [y]) !== !1 && (!this._editor.is_valid || this._editor.is_valid(y.newValue, y.id, a.getColumn(h), this._placeholder))) { + var v = f.map_to, b = y.newValue; + v != "auto" ? (g[v] = b, s(g, v, t.config.inline_editors_date_processing), d.updateItem(u)) : this._editor.save(u, a.getColumn(h), this._placeholder), this.callEvent("onSave", [y]); + } + this.hide(); + } + } else this.hide(); + }, _findEditableCell: function(u, h) { + var g = u, f = a.getGridColumns()[g], y = f ? f.name : null; + if (y) { + for (; y && !this.getEditorConfig(y); ) y = this._findEditableCell(u + h, h); + return y; + } + return null; + }, getNextCell: function(u) { + return this._findEditableCell(a.getColumnIndex(this._columnName, !0) + u, u); + }, getFirstCell: function() { + return this._findEditableCell(0, 1); + }, getLastCell: function() { + return this._findEditableCell(a.getGridColumns().length - 1, -1); + }, editNextCell: function(u) { + var h = this.getNextCell(1); + if (h) { + var g = this.getNextCell(1); + g && this.getEditorConfig(g) && this.startEdit(this._itemId, g); + } else if (u && this.moveRow(1)) { + var f = this.moveRow(1); + (h = this.getFirstCell()) && this.getEditorConfig(h) && this.startEdit(f, h); + } + }, editPrevCell: function(u) { + var h = this.getNextCell(-1); + if (h) { + var g = this.getNextCell(-1); + g && this.getEditorConfig(g) && this.startEdit(this._itemId, g); + } else if (u && this.moveRow(-1)) { + var f = this.moveRow(-1); + (h = this.getLastCell()) && this.getEditorConfig(h) && this.startEdit(f, h); + } + }, moveRow: function(u) { + for (var h = u > 0 ? t.getNext : t.getPrev, g = (h = t.bind(h, t))(this._itemId); t.isTaskExists(g) && t.isReadonly(t.getTask(g)); ) g = h(g); + return g; + }, editNextRow: function(u) { + var h = this.getState().id; + if (t.isTaskExists(h)) { + var g = null; + g = u ? this.moveRow(1) : t.getNext(h), t.isTaskExists(g) && this.startEdit(g, this._columnName); + } + }, editPrevRow: function(u) { + var h = this.getState().id; + if (t.isTaskExists(h)) { + var g = null; + g = u ? this.moveRow(-1) : t.getPrev(h), t.isTaskExists(g) && this.startEdit(g, this._columnName); + } + }, destructor: function() { + o.forEach(function(u) { + d.detachEvent(u); + }), l.forEach(function(u) { + t.detachEvent(u); + }), o = [], l = [], d = null, this.hide(), this.detachAllEvents(); + } }; + return L(c, e), L(c, n), c; + } }; + return L(i, e), L(i, n), i; +} +function ke(t, e, n, i, a) { + if (!t.start_date || !t.end_date) return null; + var r = n.getItemTop(t.id), s = n.getItemHeight(t.id); + if (r > e.y_end || r + s < e.y) return !1; + var o = n.posFromDate(t.start_date), l = n.posFromDate(t.end_date), d = Math.min(o, l) - 200, c = Math.max(o, l) + 200; + return !(d > e.x_end || c < e.x); +} +function yn(t) { + function e(r, s, o) { + if (t._isAllowedUnscheduledTask(r) || !t._isTaskInTimelineLimits(r)) return; + var l = s.getItemPosition(r), d = o, c = s.$getTemplates(), u = t.getTaskType(r.type), h = s.getBarHeight(r.id, u == d.types.milestone), g = 0; + u == d.types.milestone && (g = (h - l.height) / 2); + var f = Math.floor((s.getItemHeight(r.id) - h) / 2); + const y = t.config.baselines !== !1 && r.baselines && r.baselines.length, v = t.config.baselines !== !1 && (t.config.baselines.render_mode == "separateRow" || t.config.baselines.render_mode == "individualRow"); + if (y && v && r.bar_height !== "full" && r.bar_height < r.row_height) if (u === d.types.milestone) { + let x = s.getBarHeight(r.id, !0), S = Math.sqrt(2 * x * x); + f = Math.floor((S - h) / 2) + 2; + } else f = 2; + u == d.types.milestone && (l.left -= Math.round(h / 2), l.width = h); + var b = document.createElement("div"), _ = Math.round(l.width); + s.$config.item_attribute && (b.setAttribute(s.$config.item_attribute, r.id), b.setAttribute(s.$config.bind + "_id", r.id)), d.show_progress && u != d.types.milestone && function(x, S, T, C, E) { + var D = 1 * x.progress || 0; + T = Math.max(T - 2, 0); + var A = document.createElement("div"), I = Math.round(T * D); + I = Math.min(T, I), A.style.width = I + "px", A.className = "gantt_task_progress", A.innerHTML = E.progress_text(x.start_date, x.end_date, x), C.rtl && (A.style.position = "absolute", A.style.right = "0px"); + var M = document.createElement("div"); + if (M.className = "gantt_task_progress_wrapper", M.appendChild(A), S.appendChild(M), t.config.drag_progress && !t.isReadonly(x)) { + var N = document.createElement("div"), P = I; + C.rtl && (P = T - I), N.style.left = P + "px", N.className = "gantt_task_progress_drag", N.innerHTML = ` + +`, A.appendChild(N), S.appendChild(N); + } + }(r, b, _, d, c); + var m = function(x, S, T) { + var C = document.createElement("div"); + return t.getTaskType(x.type) != t.config.types.milestone ? C.innerHTML = T.task_text(x.start_date, x.end_date, x) : t.getTaskType(x.type) == t.config.types.milestone && S && (C.style.height = C.style.width = S + "px"), C.className = "gantt_task_content", C; + }(r, _, c); + r.textColor && (m.style.color = r.textColor), b.appendChild(m); + var p = function(x, S, T, C) { + var E = C.$getConfig(), D = [x]; + S && D.push(S); + var A = t.getState(), I = t.getTask(T); + if (t.getTaskType(I.type) == E.types.milestone ? D.push("gantt_milestone") : t.getTaskType(I.type) == E.types.project && D.push("gantt_project"), D.push("gantt_bar_" + t.getTaskType(I.type)), t.isSummaryTask(I) && D.push("gantt_dependent_task"), t.isSplitTask(I) && (E.open_split_tasks && !I.$open || !E.open_split_tasks) && D.push("gantt_split_parent"), E.select_task && t.isSelectedTask(T) && D.push("gantt_selected"), T == A.drag_id && (D.push("gantt_drag_" + A.drag_mode), A.touch_drag && D.push("gantt_touch_" + A.drag_mode)), A.link_source_id == T && (D.push("gantt_link_source"), A.link_from_start ? D.push("gantt_link_from_start") : D.push("gantt_link_from_end")), A.link_target_id == T && D.push("gantt_link_target"), E.highlight_critical_path && t.isCriticalTask && t.isCriticalTask(I) && D.push("gantt_critical_task"), A.link_landing_area && A.link_target_id && A.link_source_id && A.link_target_id != A.link_source_id && (A.link_target_id == T || A.link_source_id == T)) { + var M = A.link_source_id, N = A.link_from_start, P = A.link_to_start, H = ""; + H = t.isLinkAllowed(M, T, N, P) ? P ? "link_start_allow" : "link_finish_allow" : P ? "link_start_deny" : "link_finish_deny", D.push(H); + } + return D.join(" "); + }("gantt_task_line", c.task_class(r.start_date, r.end_date, r), r.id, s); + (r.color || r.progressColor || r.textColor) && (p += " gantt_task_inline_color"), l.width < 20 && (p += " gantt_thin_task"), b.className = p; + var k = ["left:" + l.left + "px", "top:" + (f + l.top) + "px", "height:" + h + "px", "line-height:" + Math.max(h < 30 ? h - 2 : h, 0) + "px", "width:" + _ + "px"]; + b.style.cssText = k.join(";"), r.color && b.style.setProperty("--dhx-gantt-task-background", r.color), r.textColor && b.style.setProperty("--dhx-gantt-task-color", r.textColor), r.progressColor && b.style.setProperty("--dhx-gantt-task-progress-color", r.progressColor); + var $ = function(x, S, T, C) { + var E = "gantt_left " + i(!S.rtl, x), D = null; + return C && (D = { type: "marginRight", value: C }), n(x, T.leftside_text, E, D); + }(r, d, c, g); + $ && b.appendChild($), $ = function(x, S, T, C) { + var E = "gantt_right " + i(!!S.rtl, x), D = null; + return C && (D = { type: "marginLeft", value: C }), n(x, T.rightside_text, E, D); + }(r, d, c, g), $ && b.appendChild($), t._waiAria.setTaskBarAttr(r, b); + var w = t.getState(); + return t.isReadonly(r) || (d.drag_resize && !t.isSummaryTask(r) && u != d.types.milestone && a(b, "gantt_task_drag", r, function(x) { + var S = document.createElement("div"); + return S.className = x, S; + }, d), d.drag_links && d.show_links && a(b, "gantt_link_control", r, function(x) { + var S = document.createElement("div"); + S.className = x, S.style.cssText = ["height:" + h + "px", "line-height:" + h + "px"].join(";"); + var T = document.createElement("div"); + T.className = "gantt_link_point"; + var C = !1; + return w.link_source_id && d.touch && (C = !0), T.style.display = C ? "block" : "", S.appendChild(T), S; + }, d, g)), b; + } + function n(r, s, o, l) { + if (!s) return null; + var d = s(r.start_date, r.end_date, r); + if (!d) return null; + var c = document.createElement("div"); + return c.className = "gantt_side_content " + o, c.innerHTML = d, l && (c.style[l.type] = Math.abs(l.value) + "px"), c; + } + function i(r, s) { + var o = r ? { $source: [t.config.links.start_to_start], $target: [t.config.links.start_to_start, t.config.links.finish_to_start] } : { $source: [t.config.links.finish_to_start, t.config.links.finish_to_finish], $target: [t.config.links.finish_to_finish] }; + for (var l in o) for (var d = s[l], c = 0; c < d.length; c++) for (var u = t.getLink(d[c]), h = 0; h < o[l].length; h++) if (u.type == o[l][h]) return "gantt_link_crossing"; + return ""; + } + function a(r, s, o, l, d, c) { + var u, h = t.getState(); + +o.start_date >= +h.min_date && ((u = l([s, d.rtl ? "task_right" : "task_left", "task_start_date"].join(" "))).setAttribute("data-bind-property", "start_date"), c && (u.style.marginLeft = c + "px"), r.appendChild(u)), +o.end_date <= +h.max_date && ((u = l([s, d.rtl ? "task_left" : "task_right", "task_end_date"].join(" "))).setAttribute("data-bind-property", "end_date"), c && (u.style.marginRight = c + "px"), r.appendChild(u)); + } + return function(r, s, o) { + var l = (o = s.$getConfig()).type_renderers[t.getTaskType(r.type)], d = e; + return l ? l.call(t, r, function(c) { + return d.call(t, c, s, o); + }, s) : d.call(t, r, s, o); + }; +} +function qe(t) { + return { render: yn(t), update: null, isInViewPort: ke, getVisibleRange: gt }; +} +function Ct() { + return console.error("You are trying to use a Pro feature that is not available in the GPL version."), { render: function() { + }, isInViewPort: function() { + }, getVisibleRange: function() { + } }; +} +function Ge(t, e, n) { + return { top: e.getItemTop(t.id), height: e.getItemHeight(t.id), left: 0, right: 1 / 0 }; +} +function zt(t, e) { + var n = 0, i = t.left.length - 1; + if (e) for (var a = 0; a < t.left.length; a++) { + var r = t.left[a]; + if (r < e.x && (n = a), r > e.x_end) { + i = a; + break; + } + } + return { start: n, end: i }; +} +function ie(t, e, n, i) { + var a = e.width[t]; + if (a <= 0) return !1; + if (!i.config.smart_rendering || Mt(i)) return !0; + var r = e.left[t] - a, s = e.left[t] + a; + return r <= n.x_end && s >= n.x; +} +function Ma(t, e) { + var n = e.config.timeline_placeholder; + if (t = t || [], n && t.filter((l) => l.id === "timeline_placeholder_task").length === 0) { + var i = e.getState(), a = null, r = i.min_date, s = i.max_date; + t.length && (a = t[t.length - 1].id); + var o = { start_date: r, end_date: s, row_height: n.height || 0, id: "timeline_placeholder_task", unscheduled: !0, lastTaskId: a, calendar_id: n.calendar || "global", $source: [], $target: [] }; + t.push(o); + } +} +function Na(t) { + var e = { current_pos: null, dirs: { left: "left", right: "right", up: "up", down: "down" }, path: [], clear: function() { + this.current_pos = null, this.path = []; + }, point: function(a) { + this.current_pos = t.copy(a); + }, get_lines: function(a) { + this.clear(), this.point(a[0]); + for (var r = 1; r < a.length; r++) this.line_to(a[r]); + return this.get_path(); + }, line_to: function(a) { + var r = t.copy(a), s = this.current_pos, o = this._get_line(s, r); + this.path.push(o), this.current_pos = r; + }, get_path: function() { + return this.path; + }, get_wrapper_sizes: function(a, r, s) { + var o, l = r.$getConfig().link_wrapper_width, d = a.y - l / 2; + switch (a.direction) { + case this.dirs.left: + o = { top: d, height: l, lineHeight: l, left: a.x - a.size - l / 2, width: a.size + l }; + break; + case this.dirs.right: + o = { top: d, lineHeight: l, height: l, left: a.x - l / 2, width: a.size + l }; + break; + case this.dirs.up: + o = { top: d - a.size, lineHeight: a.size + l, height: a.size + l, left: a.x - l / 2, width: l }; + break; + case this.dirs.down: + o = { top: d, lineHeight: a.size + l, height: a.size + l, left: a.x - l / 2, width: l }; + } + return o; + }, get_line_sizes: function(a, r) { + var s, o = r.$getConfig(), l = o.link_line_width, d = o.link_wrapper_width, c = a.size + l; + switch (a.direction) { + case this.dirs.left: + case this.dirs.right: + s = { height: l, width: c, marginTop: (d - l) / 2, marginLeft: (d - l) / 2 }; + break; + case this.dirs.up: + case this.dirs.down: + s = { height: c, width: l, marginTop: (d - l) / 2, marginLeft: (d - l) / 2 }; + } + return s; + }, render_line: function(a, r, s, o) { + var l = this.get_wrapper_sizes(a, s, o), d = document.createElement("div"); + d.style.cssText = ["top:" + l.top + "px", "left:" + l.left + "px", "height:" + l.height + "px", "width:" + l.width + "px"].join(";"), d.className = "gantt_line_wrapper"; + var c = this.get_line_sizes(a, s), u = document.createElement("div"); + return u.style.cssText = ["height:" + c.height + "px", "width:" + c.width + "px", "margin-top:" + c.marginTop + "px", "margin-left:" + c.marginLeft + "px"].join(";"), u.className = "gantt_link_line_" + a.direction, d.appendChild(u), d; + }, render_corner: function(a, r) { + const s = a.radius, o = r.$getConfig(), l = o.link_line_width || 2, d = document.createElement("div"); + let c, u; + return d.classList.add("gantt_link_corner"), d.classList.add(`gantt_link_corner_${a.direction.from}_${a.direction.to}`), d.style.width = `${s}px`, d.style.height = `${s}px`, a.direction.from === "right" && a.direction.to === "down" ? (c = "Right", u = "Top", d.style.left = a.x - o.link_line_width / 2 + "px", d.style.top = `${a.y}px`) : a.direction.from === "down" && a.direction.to === "right" ? (c = "Left", u = "Bottom", d.style.left = a.x - o.link_line_width / 2 + "px", d.style.top = `${a.y}px`) : a.direction.from === "right" && a.direction.to === "up" ? (c = "Right", u = "Bottom", d.style.left = a.x - o.link_line_width / 2 + "px", d.style.top = a.y - s + "px") : a.direction.from === "up" && a.direction.to === "right" ? (c = "Left", u = "Top", d.style.left = a.x - o.link_line_width / 2 + "px", d.style.top = a.y - s + "px") : a.direction.from === "left" && a.direction.to === "down" ? (c = "Left", u = "Top", d.style.left = a.x - s - o.link_line_width / 2 + "px", d.style.top = `${a.y}px`) : a.direction.from === "down" && a.direction.to === "left" ? (c = "Right", u = "Bottom", d.style.left = a.x - s - o.link_line_width / 2 + "px", d.style.top = `${a.y}px`) : a.direction.from === "left" && a.direction.to === "up" ? (c = "Left", u = "Bottom", d.style.left = a.x - s - o.link_line_width / 2 + "px", d.style.top = a.y - s + "px") : a.direction.from === "up" && a.direction.to === "left" && (c = "Right", u = "Top", d.style.left = a.x - s - o.link_line_width / 2 + "px", d.style.top = a.y - s + "px"), d.style[`border${u}Width`] = `${l}px`, d.style[`border${c}Width`] = `${l}px`, d.style[`border${c}Style`] = "solid", d.style[`border${u}Style`] = "solid", d.style[`border${u}${c}Radius`] = `${s}px`, d; + }, render_arrow(a, r) { + var s = document.createElement("div"), o = a.y, l = a.x, d = r.link_arrow_size; + s.style.setProperty("--dhx-gantt-icon-size", `${d}px`); + var c = "gantt_link_arrow gantt_link_arrow_" + a.direction; + return s.style.top = o + "px", s.style.left = l + "px", s.className = c, s; + }, _get_line: function(a, r) { + var s = this.get_direction(a, r), o = { x: a.x, y: a.y, direction: this.get_direction(a, r) }; + return s == this.dirs.left || s == this.dirs.right ? o.size = Math.abs(a.x - r.x) : o.size = Math.abs(a.y - r.y), o; + }, get_direction: function(a, r) { + return r.x < a.x ? this.dirs.left : r.x > a.x ? this.dirs.right : r.y > a.y ? this.dirs.down : this.dirs.up; + } }, n = { path: [], clear: function() { + this.path = []; + }, current: function() { + return this.path[this.path.length - 1]; + }, point: function(a) { + return a ? (this.path.push(t.copy(a)), a) : this.current(); + }, point_to: function(a, r, s) { + s = s ? { x: s.x, y: s.y } : t.copy(this.point()); + var o = e.dirs; + switch (a) { + case o.left: + s.x -= r; + break; + case o.right: + s.x += r; + break; + case o.up: + s.y -= r; + break; + case o.down: + s.y += r; + } + return this.point(s); + }, get_points: function(a, r, s, o) { + var l = this.get_endpoint(a, r, s, o), d = t.config, c = l.e_y - l.y, u = l.e_x - l.x, h = e.dirs, g = r.getItemHeight(a.source); + this.clear(), this.point({ x: l.x, y: l.y }); + var f = 2 * d.link_arrow_size, y = this.get_line_type(a, r.$getConfig()), v = l.e_x > l.x; + if (y.from_start && y.to_start) this.point_to(h.left, f), v ? (this.point_to(h.down, c), this.point_to(h.right, u)) : (this.point_to(h.right, u), this.point_to(h.down, c)), this.point_to(h.right, f); + else if (!y.from_start && y.to_start) if (v = l.e_x > l.x + 2 * f, this.point_to(h.right, f), v) u -= f, this.point_to(h.down, c), this.point_to(h.right, u); + else { + u -= 2 * f; + var b = c > 0 ? 1 : -1; + this.point_to(h.down, b * (g / 2)), this.point_to(h.right, u), this.point_to(h.down, b * (Math.abs(c) - g / 2)), this.point_to(h.right, f); + } + else y.from_start || y.to_start ? y.from_start && !y.to_start && (v = l.e_x > l.x - 2 * f, this.point_to(h.left, f), v ? (u += 2 * f, b = c > 0 ? 1 : -1, this.point_to(h.down, b * (g / 2)), this.point_to(h.right, u), this.point_to(h.down, b * (Math.abs(c) - g / 2)), this.point_to(h.left, f)) : (u += f, this.point_to(h.down, c), this.point_to(h.right, u))) : (this.point_to(h.right, f), v ? (this.point_to(h.right, u), this.point_to(h.down, c)) : (this.point_to(h.down, c), this.point_to(h.right, u)), this.point_to(h.left, f)); + return this.path; + }, get_line_type: function(a, r) { + var s = r.links, o = !1, l = !1; + return a.type == s.start_to_start ? o = l = !0 : a.type == s.finish_to_finish ? o = l = !1 : a.type == s.finish_to_start ? (o = !1, l = !0) : a.type == s.start_to_finish ? (o = !0, l = !1) : t.assert(!1, "Invalid link type"), r.rtl && (o = !o, l = !l), { from_start: o, to_start: l }; + }, get_endpoint: function(a, r, s, o) { + var l = r.$getConfig(), d = this.get_line_type(a, l), c = d.from_start, u = d.to_start, h = i(s, r, l), g = i(o, r, l); + return { x: c ? h.left : h.left + h.width, e_x: u ? g.left : g.left + g.width, y: h.top + h.rowHeight / 2 - 1, e_y: g.top + g.rowHeight / 2 - 1 }; + } }; + function i(a, r, s) { + var o = r.getItemPosition(a); + let l = fi(t, r, a), d = l.maxHeight, c = l.splitChild; + const u = t.config.baselines !== !1 && (t.config.baselines.render_mode == "separateRow" || t.config.baselines.render_mode == "individualRow") && a.baselines && a.baselines.length; + let h; + l.shrinkHeight && (o.rowHeight = d); + let g = t.getTaskType(a.type) == s.types.milestone; + if (g) { + let f = r.getBarHeight(a.id, !0); + h = Math.sqrt(2 * f * f), l.shrinkHeight && d < f && (f = d, h = d), o.left -= h / 2, o.width = h; + } + if (c) if (d >= o.height) { + const f = gi(t, a.parent); + u || f ? g ? (o.rowHeight = o.height + 4, o.left += (o.width - o.rowHeight + 4) / 2, o.width = o.rowHeight - 3) : o.rowHeight = o.height + 6 : g && (o.left += (h - o.height) / 2); + } else o.rowHeight = d + 2, g && (o.left += (o.width - o.rowHeight + 4) / 2, o.width = o.rowHeight - 3); + else u && (o.rowHeight = o.height + 4); + return o; + } + return { render: function(a, r, s) { + var o = t.getTask(a.source); + if (o.hide_bar) return; + var l = t.getTask(a.target); + if (l.hide_bar) return; + var d = n.get_endpoint(a, r, o, l), c = d.e_y - d.y; + if (!(d.e_x - d.x) && !c) return null; + var u = n.get_points(a, r, o, l); + const h = function(v, b) { + const _ = b.link_radius || 4, m = b.link_arrow_size || 6, p = []; + for (let $ = 0; $ < v.length; $++) { + const w = v[$], x = v[$ + 1]; + if (!x || b.link_radius <= 1) p.push({ type: "line", data: w }); + else if (w.direction !== x.direction) { + if (w.size < _ || x.size < _) { + p.push({ type: "line", data: w }); + continue; + } + w.size -= _, p.push({ type: "line", data: w }); + let S = w.x, T = w.y - b.link_line_width / 2; + switch (w.direction) { + case "right": + S += w.size; + break; + case "left": + S -= w.size; + break; + case "down": + T += w.size; + break; + case "up": + T -= w.size; + } + const C = { x: S, y: T, direction: { from: w.direction, to: x.direction }, radius: _ }; + switch (p.push({ type: "corner", data: C }), x.direction) { + case "right": + x.x += _, x.size -= _; + break; + case "left": + x.x -= _, x.size -= _; + break; + case "down": + x.y += _, x.size -= _; + break; + case "up": + x.y -= _, x.size -= _; + } + } else p.push({ type: "line", data: w }); + } + const k = v[v.length - 1]; + if (k.direction === "right" || k.direction === "left") { + k.size -= 3 * m / 4; + let $ = k.direction === "right" ? k.x + k.size : k.x - k.size - m / 2, w = k.y - b.link_line_width / 2 - m / 2 + 1; + k.direction === "left" ? (w -= 1, $ -= 2) : $ -= 1; + const x = { x: $, y: w, size: m, direction: k.direction }; + p.push({ type: "line", data: k }), p.push({ type: "arrow", data: x }); + } else p.push({ type: "line", data: k }); + return p; + }(e.get_lines(u, r).filter((v) => v.size > 0), s), g = function(v, b, _, m) { + const p = document.createElement("div"); + return v.forEach((k) => { + let $; + k.type === "line" ? $ = e.render_line(k.data, null, b, _.source) : k.type === "corner" ? $ = e.render_corner(k.data, b) : k.type === "arrow" && ($ = e.render_arrow(k.data, m)), p.appendChild($); + }), p; + }(h, r, a, s); + var f = "gantt_task_link"; + a.color && (f += " gantt_link_inline_color"); + var y = t.templates.link_class ? t.templates.link_class(a) : ""; + return y && (f += " " + y), s.highlight_critical_path && t.isCriticalLink && t.isCriticalLink(a) && (f += " gantt_critical_link"), g.className = f, r.$config.link_attribute && (g.setAttribute(r.$config.link_attribute, a.id), g.setAttribute("link_id", a.id)), a.color && g.style.setProperty("--dhx-gantt-link-background", a.color), t._waiAria.linkAttr(a, g), g; + }, update: null, isInViewPort: mn, getVisibleRange: pn() }; +} +function La(t, e, n, i, a) { + if (a.$ui.getView("grid") && (a.config.keyboard_navigation && a.getSelectedId() || a.ext.inlineEditors && a.ext.inlineEditors.getState().id)) return !0; + var r = n.getItemTop(t.id), s = n.getItemHeight(t.id); + return !(r > e.y_end || r + s < e.y); +} +function Pa(t) { + let e = {}; + return t.$data.tasksStore.attachEvent("onStoreUpdated", function() { + e = {}; + }), function(n, i, a, r) { + const s = n.id + "_" + i + "_" + a.unit + "_" + a.step; + let o; + return o = e[s] ? e[s] : e[s] = function(l, d, c, u) { + let h, g = !1, f = {}; + t.config.process_resource_assignments && d === t.config.resource_property ? (h = l.$role == "task" ? t.getResourceAssignments(l.$resource_id, l.$task_id) : t.getResourceAssignments(l.id), g = !0) : h = l.$role == "task" ? [] : t.getTaskBy(d, l.id), f = function(x, S, T) { + const C = S.unit, E = S.step, D = {}, A = {}; + for (let I = 0; I < x.length; I++) { + const M = x[I]; + let N = M; + if (T && (N = t.getTask(M.task_id)), N.unscheduled) continue; + let P = M.start_date || N.start_date, H = M.end_date || N.end_date; + T && (M.start_date && (P = new Date(Math.max(M.start_date.valueOf(), N.start_date.valueOf()))), M.end_date && (H = new Date(Math.min(M.end_date.valueOf(), N.end_date.valueOf()))), M.mode && M.mode == "fixedDates" && (P = M.start_date, H = M.end_date)); + let V = Dt(S.trace_x, P.valueOf()), ht = new Date(S.trace_x[V] || t.date[C + "_start"](new Date(P))), O = new Date(Math.min(P.valueOf(), ht.valueOf())), K = t.config.work_time ? t.getTaskCalendar(N) : t; + for (A[K.id] = {}; O < H; ) { + const Y = A[K.id]; + let z = O; + const U = z.valueOf(); + O = t.date.add(O, E, C), Y[U] !== !1 && (K.isWorkTime({ date: z, task: N, unit: C }) ? (D[U] || (D[U] = { tasks: [], assignments: [] }), D[U].tasks.push(N), T && D[U].assignments.push(M)) : Y[U] = !1); + } + } + return D; + }(h, c, g); + const y = c.unit, v = c.step, b = []; + let _, m, p, k, $; + const w = u.$getConfig(); + for (let x = 0; x < c.trace_x.length; x++) _ = new Date(c.trace_x[x]), m = t.date.add(_, v, y), $ = f[_.valueOf()] || {}, p = $.tasks || [], k = $.assignments || [], p.length || w.resource_render_empty_cells ? b.push({ start_date: _, end_date: m, tasks: p, assignments: k }) : b.push(null); + return b; + }(n, i, a, r), o; + }; +} +const Ra = { init: function(t, e) { + var n = t.$services.getService("dnd"); + if (e.$config.bind && t.getDatastore(e.$config.bind)) { + var i = new n(e.$grid_data, { updates_per_second: 60 }); + t.defined(e.$getConfig().dnd_sensitivity) && (i.config.sensitivity = e.$getConfig().dnd_sensitivity), i.attachEvent("onBeforeDragStart", t.bind(function(o, l) { + var d = a(l); + if (!d || (t.hideQuickInfo && t.hideQuickInfo(), dt(l.target, ".gantt_grid_editor_placeholder"))) return !1; + var c = d.getAttribute(e.$config.item_attribute); + if (s(c)) return !1; + var u = r().getItem(c); + return !t.isReadonly(u) && (i.config.initial_open_state = u.$open, !!t.callEvent("onRowDragStart", [c, l.target || l.srcElement, l]) && void 0); + }, t)), i.attachEvent("onAfterDragStart", t.bind(function(o, l) { + var d = a(l); + i.config.marker.innerHTML = d.outerHTML; + var c = i.config.marker.firstChild; + c && (c.style.position = "static"), i.config.id = d.getAttribute(e.$config.item_attribute); + var u = r(), h = u.getItem(i.config.id); + i.config.index = u.getBranchIndex(i.config.id), i.config.parent = h.parent, h.$open = !1, h.$transparent = !0, this.refreshData(); + }, t)), i.lastTaskOfLevel = function(o) { + for (var l = null, d = r().getItems(), c = 0, u = d.length; c < u; c++) d[c].$level == o && (l = d[c]); + return l ? l.id : null; + }, i._getGridPos = t.bind(function(o) { + var l = F(e.$grid_data), d = l.x + e.$grid.scrollLeft, c = o.pos.y - 10, u = e.getItemHeight(i.config.id); + c < l.y && (c = l.y); + var h = e.getTotalHeight(); + c > l.y + h - u && (c = l.y + h - u); + const g = l.y + l.height; + return c > g - u && (c = g - u), l.x = d, l.y = c, l; + }, t), i._getTargetY = t.bind(function(o) { + var l = F(e.$grid_data), d = e.$state.scrollTop || 0, c = t.$grid_data.getBoundingClientRect().height + d, u = o.pageY - l.y + d; + return u > c ? u = c : u < d && (u = d), u; + }, t), i._getTaskByY = t.bind(function(o, l) { + var d = r(); + o = o || 0; + var c = e.getItemIndexByTopPosition(o); + return (c = l < c ? c - 1 : c) > d.countVisible() - 1 ? null : d.getIdByIndex(c); + }, t), i.attachEvent("onDragMove", t.bind(function(o, l) { + var d = t.$grid_data.getBoundingClientRect(), c = d.height + d.y + (e.$state.scrollTop || 0) + window.scrollY, u = i.config, h = i._getGridPos(l); + t._waiAria.reorderMarkerAttr(u.marker); + var g = e.$getConfig(), f = r(); + h.y < c ? u.marker.style.top = h.y + "px" : u.marker.style.top = c + "px", u.marker.style.left = h.x + 10 + "px"; + const y = F(t.$root); + h.width > y.width && (u.marker.style.width = y.width - 10 - 2 + "px", u.marker.style.overflow = "hidden"); + var v = f.getItem(i.config.id), b = i._getTargetY(l), _ = i._getTaskByY(b, f.getIndexById(v.id)); + function m(D, A) { + return !f.isChildOf(p.id, A.id) && (D.$level == A.$level || g.order_branch_free); + } + if (f.exists(_) || (_ = i.lastTaskOfLevel(g.order_branch_free ? v.$level : 0)) == i.config.id && (_ = null), f.exists(_)) { + var p = f.getItem(_), k = e.getItemTop(p.id), $ = e.getItemHeight(p.id); + if (k + $ / 2 < b) { + var w = f.getIndexById(p.id), x = f.getNext(p.id), S = f.getItem(x); + if (s(x)) { + var T = f.getPrev(S.id); + S = f.getItem(T); + } + if (S) { + if (S.id == v.id) return g.order_branch_free && f.isChildOf(v.id, p.id) && f.getChildren(p.id).length == 1 ? void f.move(v.id, f.getBranchIndex(p.id) + 1, f.getParent(p.id)) : void 0; + p = S; + } else if (x = f.getIdByIndex(w), S = f.getItem(x), s(x) && (T = f.getPrev(S.id), S = f.getItem(T)), m(S, v) && S.id != v.id) return void f.move(v.id, -1, f.getParent(S.id)); + } else if (g.order_branch_free && p.id != v.id && m(p, v) && !s(p.id)) { + if (!f.hasChild(p.id)) return p.$open = !0, void f.move(v.id, -1, p.id); + if (f.getIndexById(p.id) || $ / 3 < b) return; + } + w = f.getIndexById(p.id), T = f.getIdByIndex(w - 1); + for (var C = f.getItem(T), E = 1; (!C || C.id == p.id) && w - E >= 0; ) T = f.getIdByIndex(w - E), C = f.getItem(T), E++; + if (v.id == p.id || s(p.id)) return; + m(p, v) && v.id != p.id ? f.move(v.id, 0, 0, p.id) : p.$level != v.$level - 1 || f.getChildren(p.id).length ? C && m(C, v) && v.id != C.id && f.move(v.id, -1, f.getParent(C.id)) : f.move(v.id, 0, p.id); + } + return !0; + }, t)), i.attachEvent("onDragEnd", t.bind(function() { + var o = r(), l = o.getItem(i.config.id); + l.$transparent = !1, l.$open = i.config.initial_open_state, this.callEvent("onBeforeRowDragEnd", [i.config.id, i.config.parent, i.config.index]) === !1 ? (o.move(i.config.id, i.config.index, i.config.parent), l.$drop_target = null) : this.callEvent("onRowDragEnd", [i.config.id, l.$drop_target]), t.render(), this.refreshData(); + }, t)); + } + function a(o) { + return et(o, e.$config.item_attribute); + } + function r() { + return t.getDatastore(e.$config.bind); + } + function s(o) { + return Lt(o, t, r()); + } +} }, X = { createDropTargetObject: function(t) { + var e = { targetParent: null, targetIndex: 0, targetId: null, child: !1, nextSibling: !1, prevSibling: !1 }; + return t && L(e, t, !0), e; +}, nextSiblingTarget: function(t, e, n) { + var i = this.createDropTargetObject(); + return i.targetId = e, i.nextSibling = !0, i.targetParent = n.getParent(i.targetId), i.targetIndex = n.getBranchIndex(i.targetId), (n.getParent(t) != i.targetParent || i.targetIndex < n.getBranchIndex(t)) && (i.targetIndex += 1), i; +}, prevSiblingTarget: function(t, e, n) { + var i = this.createDropTargetObject(); + return i.targetId = e, i.prevSibling = !0, i.targetParent = n.getParent(i.targetId), i.targetIndex = n.getBranchIndex(i.targetId), n.getParent(t) == i.targetParent && i.targetIndex > n.getBranchIndex(t) && (i.targetIndex -= 1), i; +}, firstChildTarget: function(t, e, n) { + var i = this.createDropTargetObject(); + return i.targetId = e, i.targetParent = i.targetId, i.targetIndex = 0, i.child = !0, i; +}, lastChildTarget: function(t, e, n) { + var i = n.getChildren(e), a = this.createDropTargetObject(); + return a.targetId = i[i.length - 1], a.targetParent = e, a.targetIndex = i.length, a.nextSibling = !0, a; +} }; +function bn(t, e, n, i, a) { + for (var r = e; i.exists(r); ) { + var s = i.calculateItemLevel(i.getItem(r)); + if ((s === n || s === n - 1) && i.getBranchIndex(r) > -1) break; + r = a ? i.getPrev(r) : i.getNext(r); + } + return i.exists(r) ? i.calculateItemLevel(i.getItem(r)) === n ? a ? X.nextSiblingTarget(t, r, i) : X.prevSiblingTarget(t, r, i) : X.firstChildTarget(t, r, i) : null; +} +function ae(t, e, n, i) { + return bn(t, e, n, i, !0); +} +function Ye(t, e, n, i) { + return bn(t, e, n, i, !1); +} +function Je(t, e, n, i, a, r) { + var s; + if (e !== a.$getRootId()) { + var o = a.getItem(e), l = a.calculateItemLevel(o); + if (l === r) { + var d = a.getPrevSibling(e); + n < 0.5 && !d ? s = X.prevSiblingTarget(t, e, a) : (n < 0.5 && (e = d), s = X.nextSiblingTarget(t, e, a)); + } else if (l > r) a.eachParent(function(f) { + a.calculateItemLevel(f) === r && (e = f.id); + }, o), s = ae(t, e, r, a); + else { + var c = ae(t, e, r, a), u = Ye(t, e, r, a); + s = n < 0.5 ? c : u; + } + } else { + var h = a.$getRootId(), g = a.getChildren(h); + s = X.createDropTargetObject(), s = g.length && i >= 0 ? ae(t, function(f) { + for (var y = f.getNext(); f.exists(y); ) { + var v = f.getNext(y); + if (!f.exists(v)) return y; + y = v; + } + return null; + }(a), r, a) : Ye(t, h, r, a); + } + return s; +} +function Ke(t, e) { + var n = F(e.$grid_data); + return t.x += n.x + e.$grid.scrollLeft, t.y += n.y - e.$grid_data.scrollTop, t; +} +function re(t, e, n = 0) { + const i = F(t.$root); + return e > i.width && (e = i.width - n - 2), e; +} +const Xe = { removeLineHighlight: function(t) { + t.markerLine && t.markerLine.parentNode && t.markerLine.parentNode.removeChild(t.markerLine), t.markerLine = null; +}, highlightPosition: function(t, e, n) { + var i = function(r, s) { + var o = F(s.$grid_data), l = lt(r, s.$grid_data), d = o.x + s.$grid.scrollLeft, c = l.y - 10, u = s.getItemHeight(r.targetId); + c < o.y && (c = o.y); + var h = s.getTotalHeight(); + return c > o.y + h - u && (c = o.y + h - u), o.x = d, o.y = c, o.width = re(s.$gantt, o.width, 9), o; + }(t, n); + e.marker.style.left = i.x + 9 + "px", e.marker.style.width = i.width + "px", e.marker.style.overflow = "hidden"; + var a = e.markerLine; + a || ((a = document.createElement("div")).className = "gantt_drag_marker gantt_grid_dnd_marker", a.innerHTML = "
", a.style.pointerEvents = "none"), t.child ? function(r, s, o) { + var l = r.targetParent, d = Ke({ x: 0, y: o.getItemTop(l) }, o), c = o.$grid_data.getBoundingClientRect().bottom + window.scrollY; + let u = re(o.$gantt, o.$grid_data.offsetWidth); + s.innerHTML = "
", s.style.width = u + "px", s.style.top = d.y + "px", s.style.left = d.x + "px", s.style.height = o.getItemHeight(l) + "px", d.y > c && (s.style.top = c + "px"); + }(t, a, n) : function(r, s, o) { + var l = function(u, h) { + var g = h.$config.rowStore, f = { x: 0, y: 0 }, y = h.$grid_data.querySelector(".gantt_tree_indent"), v = 15, b = 0; + y && (v = y.offsetWidth); + var _ = 40; + if (u.targetId !== g.$getRootId()) { + var m = h.getItemTop(u.targetId), p = h.getItemHeight(u.targetId); + if (b = g.exists(u.targetId) ? g.calculateItemLevel(g.getItem(u.targetId)) : 0, u.prevSibling) f.y = m; + else if (u.nextSibling) { + var k = 0; + g.eachItem(function($) { + g.getIndexById($.id) !== -1 && k++; + }, u.targetId), f.y = m + p + k * p; + } else f.y = m + p, b += 1; + } + return f.x = _ + b * v, f.width = re(h.$gantt, Math.max(h.$grid_data.offsetWidth - f.x, 0), f.x), Ke(f, h); + }(r, o), d = o.$grid_data.getBoundingClientRect().bottom + window.scrollY; + s.innerHTML = "
", s.style.left = l.x + "px", s.style.height = "4px"; + var c = l.y - 2; + s.style.top = c + "px", s.style.width = l.width + "px", c > d && (s.style.top = d + "px"); + }(t, a, n), e.markerLine || (document.body.appendChild(a), e.markerLine = a); +} }, Ha = { init: function(t, e) { + var n = t.$services.getService("dnd"); + if (e.$config.bind && t.getDatastore(e.$config.bind)) { + var i = new n(e.$grid_data, { updates_per_second: 60 }); + t.defined(e.$getConfig().dnd_sensitivity) && (i.config.sensitivity = e.$getConfig().dnd_sensitivity), i.attachEvent("onBeforeDragStart", t.bind(function(o, l) { + var d = a(l); + if (!d || (t.hideQuickInfo && t.hideQuickInfo(), dt(l.target, ".gantt_grid_editor_placeholder"))) return !1; + var c = d.getAttribute(e.$config.item_attribute), u = e.$config.rowStore.getItem(c); + return !t.isReadonly(u) && !r(c) && (i.config.initial_open_state = u.$open, !!t.callEvent("onRowDragStart", [c, l.target || l.srcElement, l]) && void 0); + }, t)), i.attachEvent("onAfterDragStart", t.bind(function(o, l) { + var d = a(l); + i.config.marker.innerHTML = d.outerHTML; + var c = i.config.marker.firstChild; + c && (i.config.marker.style.opacity = 0.4, c.style.position = "static", c.style.pointerEvents = "none"), i.config.id = d.getAttribute(e.$config.item_attribute); + var u = e.$config.rowStore, h = u.getItem(i.config.id); + i.config.level = u.calculateItemLevel(h), i.config.drop_target = X.createDropTargetObject({ targetParent: u.getParent(h.id), targetIndex: u.getBranchIndex(h.id), targetId: h.id, nextSibling: !0 }), h.$open = !1, h.$transparent = !0, this.refreshData(); + }, t)), i.attachEvent("onDragMove", t.bind(function(o, l) { + var d = s(l); + return d && t.callEvent("onBeforeRowDragMove", [i.config.id, d.targetParent, d.targetIndex]) !== !1 || (d = X.createDropTargetObject(i.config.drop_target)), Xe.highlightPosition(d, i.config, e), i.config.drop_target = d, t._waiAria.reorderMarkerAttr(i.config.marker), this.callEvent("onRowDragMove", [i.config.id, d.targetParent, d.targetIndex]), !0; + }, t)), i.attachEvent("onDragEnd", t.bind(function() { + var o = e.$config.rowStore, l = o.getItem(i.config.id); + Xe.removeLineHighlight(i.config), l.$transparent = !1, l.$open = i.config.initial_open_state; + var d = i.config.drop_target; + this.callEvent("onBeforeRowDragEnd", [i.config.id, d.targetParent, d.targetIndex]) === !1 ? l.$drop_target = null : (o.move(i.config.id, d.targetIndex, d.targetParent), t.render(), this.callEvent("onRowDragEnd", [i.config.id, d.targetParent, d.targetIndex])), o.refresh(l.id); + }, t)); + } + function a(o) { + return et(o, e.$config.item_attribute); + } + function r(o) { + return Lt(o, t, t.getDatastore(e.$config.bind)); + } + function s(o) { + var l, d = function(f) { + var y = lt(f, e.$grid_data).y, v = e.$config.rowStore; + document.doctype || (y += window.scrollY), y = y || 0; + var b = e.$state.scrollTop || 0, _ = t.$grid_data.getBoundingClientRect().height + b + window.scrollY, m = b, p = e.getItemIndexByTopPosition(e.$state.scrollTop); + if (v.exists(p) || (p = v.countVisible() - 1), p < 0) return v.$getRootId(); + var k = v.getIdByIndex(p), $ = e.$state.scrollTop / e.getItemHeight(k), w = $ - Math.floor($); + w > 0.1 && w < 0.9 && (_ -= e.getItemHeight(k) * w, m += e.getItemHeight(k) * (1 - w)); + const x = F(e.$grid_data), S = x.y + x.height, T = i.config.marker.offsetHeight; + y + T + window.scrollY >= _ && (i.config.marker.style.top = S - T + "px"), y >= _ ? y = _ : y <= m && (y = m, i.config.marker.style.top = x.y + "px"); + var C = e.getItemIndexByTopPosition(y); + if (C > v.countVisible() - 1 || C < 0) return v.$getRootId(); + var E = v.getIdByIndex(C); + return r(E) ? v.getPrevSibling(E) : v.getIdByIndex(C); + }(o), c = null, u = e.$config.rowStore, h = !e.$getConfig().order_branch_free, g = lt(o, e.$grid_data).y; + return document.doctype || (g += window.scrollY), d !== u.$getRootId() && (c = (g - e.getItemTop(d)) / e.getItemHeight(d)), h ? (l = Je(i.config.id, d, c, g, u, i.config.level)) && l.targetParent && r(l.targetParent) && (d = u.getPrevSibling(l.targetParent), l = Je(i.config.id, d, c, g, u, i.config.level)) : l = function(f, y, v, b, _) { + var m; + if (y !== _.$getRootId()) m = v < 0.25 ? X.prevSiblingTarget(f, y, _) : !(v > 0.6) || _.hasChild(y) && _.getItem(y).$open ? X.firstChildTarget(f, y, _) : X.nextSiblingTarget(f, y, _); + else { + var p = _.$getRootId(); + m = _.hasChild(p) && b >= 0 ? X.lastChildTarget(f, p, _) : X.firstChildTarget(f, p, _); + } + return m; + }(i.config.id, d, c, g, u), l; + } +} }; +var Oa = function(t) { + return { onCreated: function(e) { + e.$config = L(e.$config, { bind: "task" }), e.$config.id == "grid" && (this.extendGantt(e), t.ext.inlineEditors = t.ext._inlineEditors.createEditors(e), t.ext.inlineEditors.init()), this._mouseDelegates = Se(t); + }, onInitialized: function(e) { + var n = e.$getConfig(); + n.order_branch && (n.order_branch == "marker" ? Ha.init(e.$gantt, e) : Ra.init(e.$gantt, e)), this.initEvents(e, t), e.$config.id == "grid" && this.extendDom(e); + }, onDestroyed: function(e) { + e.$config.id == "grid" && t.ext.inlineEditors.destructor(), this.clearEvents(e, t); + }, initEvents: function(e, n) { + this._mouseDelegates.delegate("click", "gantt_row", n.bind(function(i, a, r) { + var s = e.$getConfig(); + if (a !== null) { + var o = this.getTask(a); + s.scroll_on_click && !n._is_icon_open_click(i) && this.showDate(o.start_date), n.callEvent("onTaskRowClick", [a, r]); + } + }, n), e.$grid), this._mouseDelegates.delegate("click", "gantt_grid_head_cell", n.bind(function(i, a, r) { + var s = r.getAttribute("data-column-id"); + if (n.callEvent("onGridHeaderClick", [s, i])) { + var o = e.$getConfig(); + if (s != "add") { + if (o.sort && s) { + for (var l, d = s, c = 0; c < o.columns.length; c++) if (o.columns[c].name == s) { + l = o.columns[c]; + break; + } + if (l && l.sort !== void 0 && l.sort !== !0 && !(d = l.sort)) return; + var u = this._sort && this._sort.direction && this._sort.name == s ? this._sort.direction : "desc"; + u = u == "desc" ? "asc" : "desc", this._sort = { name: s, direction: u }, this.sort(d, u == "desc"); + } + } else n.$services.getService("mouseEvents").callHandler("click", "gantt_add", e.$grid, [i, o.root_id]); + } + }, n), e.$grid), this._mouseDelegates.delegate("click", "gantt_add", n.bind(function(i, a, r) { + if (!e.$getConfig().readonly) return this.createTask({}, a || n.config.root_id), !1; + }, n), e.$grid); + }, clearEvents: function(e, n) { + this._mouseDelegates.destructor(), this._mouseDelegates = null; + }, extendDom: function(e) { + t.$grid = e.$grid, t.$grid_scale = e.$grid_scale, t.$grid_data = e.$grid_data; + }, extendGantt: function(e) { + t.getGridColumns = t.bind(e.getGridColumns, e), e.attachEvent("onColumnResizeStart", function() { + return t.callEvent("onColumnResizeStart", arguments); + }), e.attachEvent("onColumnResize", function() { + return t.callEvent("onColumnResize", arguments); + }), e.attachEvent("onColumnResizeEnd", function() { + return t.callEvent("onColumnResizeEnd", arguments); + }), e.attachEvent("onColumnResizeComplete", function(n, i) { + t.config.grid_width = i; + }), e.attachEvent("onBeforeRowResize", function() { + return t.callEvent("onBeforeRowResize", arguments); + }), e.attachEvent("onRowResize", function() { + return t.callEvent("onRowResize", arguments); + }), e.attachEvent("onBeforeRowResizeEnd", function() { + return t.callEvent("onBeforeRowResizeEnd", arguments); + }), e.attachEvent("onAfterRowResize", function() { + return t.callEvent("onAfterRowResize", arguments); + }); + } }; +}; +const Ba = { createTaskDND: function() { + var t; + return { extend: function(e) { + e.roundTaskDates = function(n) { + t.round_task_dates(n); + }; + }, init: function(e, n) { + return t = function(i, a) { + var r = a.$services; + return { drag: null, dragMultiple: {}, _events: { before_start: {}, before_finish: {}, after_finish: {} }, _handlers: {}, init: function() { + this._domEvents = a._createDomEventScope(), this.clear_drag_state(); + var s = a.config.drag_mode; + this.set_actions(), r.getService("state").registerProvider("tasksDnd", R(function() { + return { drag_id: this.drag ? this.drag.id : void 0, drag_mode: this.drag ? this.drag.mode : void 0, drag_from_start: this.drag ? this.drag.left : void 0 }; + }, this)); + var o = { before_start: "onBeforeTaskDrag", before_finish: "onBeforeTaskChanged", after_finish: "onAfterTaskDrag" }; + for (var l in this._events) for (var d in s) this._events[l][d] = o[l]; + this._handlers[s.move] = this._move, this._handlers[s.resize] = this._resize, this._handlers[s.progress] = this._resize_progress; + }, set_actions: function() { + var s = i.$task_data; + this._domEvents.attach(s, "mousemove", a.bind(function(o) { + this.on_mouse_move(o); + }, this)), this._domEvents.attach(s, "mousedown", a.bind(function(o) { + this.on_mouse_down(o); + }, this)), this._domEvents.attach(document.body, "mouseup", a.bind(function(o) { + this.on_mouse_up(o); + }, this)); + }, clear_drag_state: function() { + this.drag = { id: null, mode: null, pos: null, start_x: null, start_y: null, obj: null, left: null }, this.dragMultiple = {}; + }, _resize: function(s, o, l) { + var d = i.$getConfig(), c = this._drag_task_coords(s, l); + l.left ? (s.start_date = a.dateFromPos(c.start + o), s.start_date || (s.start_date = new Date(a.getState().min_date))) : (s.end_date = a.dateFromPos(c.end + o), s.end_date || (s.end_date = new Date(a.getState().max_date))); + var u = this._calculateMinDuration(d.min_duration, d.duration_unit); + s.end_date - s.start_date < d.min_duration && (l.left ? s.start_date = a.calculateEndDate(s.end_date, -u, d.duration_unit, s) : s.end_date = a.calculateEndDate(s.start_date, u, d.duration_unit, s)), a._init_task_timing(s); + }, _calculateMinDuration: function(s, o) { + return Math.ceil(s / { minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5, month: 24192e5, year: 31356e6 }[o]); + }, _resize_progress: function(s, o, l) { + var d = this._drag_task_coords(s, l), c = i.$getConfig().rtl ? d.start - l.pos.x : l.pos.x - d.start, u = Math.max(0, c); + s.progress = Math.min(1, u / Math.abs(d.end - d.start)); + }, _find_max_shift: function(s, o) { + var l; + for (var d in s) { + var c = s[d], u = a.getTask(c.id), h = this._drag_task_coords(u, c), g = a.posFromDate(new Date(a.getState().min_date)), f = a.posFromDate(new Date(a.getState().max_date)); + if (h.end + o > f) { + var y = f - h.end; + (y < l || l === void 0) && (l = y); + } else if (h.start + o < g) { + var v = g - h.start; + (v > l || l === void 0) && (l = v); + } + } + return l; + }, _move: function(s, o, l, d) { + var c = this._drag_task_coords(s, l), u = null, h = null; + d ? (u = new Date(+l.obj.start_date + d), h = new Date(+l.obj.end_date + d)) : (u = a.dateFromPos(c.start + o), h = a.dateFromPos(c.end + o)), u ? h ? (s.start_date = u, s.end_date = h) : (s.end_date = new Date(a.getState().max_date), s.start_date = a.dateFromPos(a.posFromDate(s.end_date) - (c.end - c.start))) : (s.start_date = new Date(a.getState().min_date), s.end_date = a.dateFromPos(a.posFromDate(s.start_date) + (c.end - c.start))); + }, _drag_task_coords: function(s, o) { + return { start: o.obj_s_x = o.obj_s_x || a.posFromDate(s.start_date), end: o.obj_e_x = o.obj_e_x || a.posFromDate(s.end_date) }; + }, _mouse_position_change: function(s, o) { + var l = s.x - o.x, d = s.y - o.y; + return Math.sqrt(l * l + d * d); + }, _is_number: function(s) { + return !isNaN(parseFloat(s)) && isFinite(s); + }, on_mouse_move: function(s) { + if (this.drag.start_drag) { + var o = lt(s, a.$task_data), l = this.drag.start_drag.start_x, d = this.drag.start_drag.start_y; + (Date.now() - this.drag.timestamp > 50 || this._is_number(l) && this._is_number(d) && this._mouse_position_change({ x: l, y: d }, o) > 20) && this._start_dnd(s); + } + if (this.drag.mode) { + if (!dn(this, 40)) return; + this._update_on_move(s); + } + }, _update_item_on_move: function(s, o, l, d, c, u) { + var h = a.getTask(o), g = a.mixin({}, h), f = a.mixin({}, h); + this._handlers[l].apply(this, [f, s, d, u]), a.mixin(h, f, !0), a.callEvent("onTaskDrag", [h.id, l, f, g, c]), a.mixin(h, f, !0), a.refreshTask(o); + }, _update_on_move: function(s) { + var o = this.drag, l = i.$getConfig(); + if (o.mode) { + var d = lt(s, i.$task_data); + if (o.pos && o.pos.x == d.x) return; + o.pos = d; + var c = a.dateFromPos(d.x); + if (!c || isNaN(c.getTime())) return; + var u = d.x - o.start_x, h = a.getTask(o.id); + if (this._handlers[o.mode]) { + if (o.mode === l.drag_mode.move) { + var g = {}; + this._isMultiselect() && a.getSelectedTasks().indexOf(o.id) >= 0 && (g = this.dragMultiple); + var f = !1; + if (a.isSummaryTask(h) && a.config.drag_project) { + var y = {}; + y[o.id] = G(o), f = !0, g = L(y, this.dragMultiple); + } + var v = this._find_max_shift(g, u); + for (var b in v !== void 0 && (u = v), this._update_item_on_move(u, o.id, o.mode, o, s), g) { + var _ = g[b]; + if (f && _.id != o.id && (a._bulk_dnd = !0), v === void 0 && (f || Object.keys(g).length > 1)) var m = c - a.dateFromPos(o.start_x); + this._update_item_on_move(u, _.id, _.mode, _, s, m); + } + a._bulk_dnd = !1; + } else this._update_item_on_move(u, o.id, o.mode, o, s); + a._update_parents(o.id); + } + } + }, on_mouse_down: function(s, o) { + if (s.button != 2 || s.button === void 0) { + var l = i.$getConfig(), d = a.locate(s), c = null; + if (a.isTaskExists(d) && (c = a.getTask(d)), !a.isReadonly(c) && !this.drag.mode) { + this.clear_drag_state(); + var u = Z(o = o || s.target || s.srcElement), h = this._get_drag_mode(u, o); + if (!u || !h) return o.parentNode ? this.on_mouse_down(s, o.parentNode) : void 0; + if (h) if (h.mode && h.mode != l.drag_mode.ignore && l["drag_" + h.mode]) { + if (d = a.locate(o), c = a.copy(a.getTask(d) || {}), a.isReadonly(c)) return this.clear_drag_state(), !1; + if (a.isSummaryTask(c) && c.auto_scheduling !== !1 && !l.drag_project && h.mode != l.drag_mode.progress) return void this.clear_drag_state(); + h.id = d; + var g = lt(s, a.$task_data); + h.start_x = g.x, h.start_y = g.y, h.obj = c, this.drag.start_drag = h, this.drag.timestamp = Date.now(); + } else this.clear_drag_state(); + else if (a.checkEvent("onMouseDown") && a.callEvent("onMouseDown", [u.split(" ")[0]]) && o.parentNode) return this.on_mouse_down(s, o.parentNode); + } + } + }, _fix_dnd_scale_time: function(s, o) { + var l = i.$getConfig(), d = a.getScale().unit, c = a.getScale().step; + function u(h) { + if (a.config.correct_work_time) { + var g = i.$getConfig(); + a.isWorkTime(h.start_date, void 0, h) || (h.start_date = a.calculateEndDate({ start_date: h.start_date, duration: -1, unit: g.duration_unit, task: h })); + } + } + l.round_dnd_dates || (d = "minute", c = l.time_step), o.mode == l.drag_mode.resize ? o.left ? (s.start_date = a.roundDate({ date: s.start_date, unit: d, step: c }), u(s)) : (s.end_date = a.roundDate({ date: s.end_date, unit: d, step: c }), function(h) { + if (a.config.correct_work_time) { + var g = i.$getConfig(); + a.isWorkTime(new Date(h.end_date - 1), void 0, h) || (h.end_date = a.calculateEndDate({ start_date: h.end_date, duration: 1, unit: g.duration_unit, task: h })); + } + }(s)) : o.mode == l.drag_mode.move && (s.start_date = a.roundDate({ date: s.start_date, unit: d, step: c }), u(s), s.end_date = a.calculateEndDate(s)); + }, _fix_working_times: function(s, o) { + var l = i.$getConfig(); + (o = o || { mode: l.drag_mode.move }).mode == l.drag_mode.resize ? o.left ? s.start_date = a.getClosestWorkTime({ date: s.start_date, dir: "future", task: s }) : s.end_date = a.getClosestWorkTime({ date: s.end_date, dir: "past", task: s }) : o.mode == l.drag_mode.move && a.correctTaskWorkTime(s); + }, _finalize_mouse_up: function(s, o, l, d) { + var c = a.getTask(s); + if (o.work_time && o.correct_work_time && this._fix_working_times(c, l), this._fix_dnd_scale_time(c, l), this._fireEvent("before_finish", l.mode, [s, l.mode, a.copy(l.obj), d])) { + var u = s; + a._init_task_timing(c), this.clear_drag_state(), a.updateTask(c.id), this._fireEvent("after_finish", l.mode, [u, l.mode, d]); + } else this.clear_drag_state(), s == l.id && (l.obj._dhx_changed = !1, a.mixin(c, l.obj, !0)), a.refreshTask(c.id); + }, on_mouse_up: function(s) { + var o = this.drag; + if (o.mode && o.id) { + var l = i.$getConfig(), d = a.getTask(o.id), c = this.dragMultiple, u = !1, h = 0; + o.mode === l.drag_mode.move && (a.isSummaryTask(d) && l.drag_project || this._isMultiselect()) && (u = !0, h = Object.keys(c).length); + var g = function() { + if (u) for (var f in c) c[f].id != o.id && this._finalize_mouse_up(c[f].id, l, c[f], s); + this._finalize_mouse_up(o.id, l, o, s); + }; + u && h > 10 ? a.batchUpdate((function() { + g.call(this); + }).bind(this)) : g.call(this); + } + this.clear_drag_state(); + }, _get_drag_mode: function(s, o) { + var l = i.$getConfig().drag_mode, d = { mode: null, left: null }; + switch ((s || "").split(" ")[0]) { + case "gantt_task_line": + case "gantt_task_content": + d.mode = l.move; + break; + case "gantt_task_drag": + d.mode = l.resize; + var c = o.getAttribute("data-bind-property"); + d.left = c == "start_date"; + break; + case "gantt_task_progress_drag": + d.mode = l.progress; + break; + case "gantt_link_control": + case "gantt_link_point": + d.mode = l.ignore; + break; + default: + d = null; + } + return d; + }, _start_dnd: function(s) { + var o = this.drag = this.drag.start_drag; + delete o.start_drag; + var l = i.$getConfig(), d = o.id; + if (l["drag_" + o.mode] && a.callEvent("onBeforeDrag", [d, o.mode, s]) && this._fireEvent("before_start", o.mode, [d, o.mode, s])) { + delete o.start_drag; + var c = a.getTask(d); + if (a.isReadonly(c)) return void this.clear_drag_state(); + if (this._isMultiselect()) { + var u = a.getSelectedTasks(); + u.indexOf(o.id) >= 0 && vt(u, a.bind(function(h) { + var g = a.getTask(h); + a.isSummaryTask(g) && a.config.drag_project && o.mode == l.drag_mode.move && this._addSubtasksToDragMultiple(g.id), this.dragMultiple[h] = a.mixin({ id: g.id, obj: a.copy(g) }, this.drag); + }, this)); + } + a.isSummaryTask(c) && a.config.drag_project && o.mode == l.drag_mode.move && this._addSubtasksToDragMultiple(c.id), a.callEvent("onTaskDragStart", []); + } else this.clear_drag_state(); + }, _fireEvent: function(s, o, l) { + a.assert(this._events[s], "Invalid stage:{" + s + "}"); + var d = this._events[s][o]; + return a.assert(d, "Unknown after drop mode:{" + o + "}"), a.assert(l, "Invalid event arguments"), !a.checkEvent(d) || a.callEvent(d, l); + }, round_task_dates: function(s) { + var o = this.drag, l = i.$getConfig(); + o || (o = { mode: l.drag_mode.move }), this._fix_dnd_scale_time(s, o); + }, destructor: function() { + this._domEvents.detachAll(); + }, _isMultiselect: function() { + return a.config.drag_multiple && !!(a.getSelectedTasks && a.getSelectedTasks().length > 0); + }, _addSubtasksToDragMultiple: function(s) { + a.eachTask(function(o) { + this.dragMultiple[o.id] = a.mixin({ id: o.id, obj: a.copy(o) }, this.drag); + }, s, this); + } }; + }(e, n), e._tasks_dnd = t, t.init(n); + }, destructor: function() { + t && (t.destructor(), t = null); + } }; +} }; +var za = function(t, e) { + var n, i, a, r, s; + function o() { + return { link_source_id: r, link_target_id: i, link_from_start: s, link_to_start: a, link_landing_area: n }; + } + var l = e.$services, d = l.getService("state"), c = l.getService("dnd"); + d.registerProvider("linksDnD", o); + var u = "gantt_link_point", h = "gantt_link_control", g = new c(t.$task_bars, { sensitivity: 0, updates_per_second: 60, mousemoveContainer: e.$root, selector: "." + u, preventDefault: !0 }); + function f(m, p) { + var k, $ = g.getPosition(m), w = function(A) { + var I = 0, M = 0; + return A && (I = A.offsetWidth || 0, M = A.offsetHeight || 0), { width: I, height: M }; + }(p), x = { right: (k = e.$root).offsetWidth, bottom: k.offsetHeight }, S = e.config.tooltip_offset_x || 10, T = e.config.tooltip_offset_y || 10, C = e.config.scroll_size || 18, E = e.$container.getBoundingClientRect().y + window.scrollY, D = { y: $.y + T, x: $.x + S, bottom: $.y + w.height + T + C, right: $.x + w.width + S + C }; + return D.bottom > x.bottom + E && (D.y = x.bottom + E - w.height - T), D.right > x.right && (D.x = x.right - w.width - S), D; + } + function y(m) { + var p = o(); + p.link_source_id && p.link_target_id && e.isLinkAllowed(p.link_source_id, p.link_target_id, p.link_from_start, p.link_to_start); + var k = ""; + m.innerHTML = k; + } + function v() { + r = s = i = null, a = !0; + } + function b(m, p, k, $) { + var w = function() { + return g._direction && g._direction.parentNode || (g._direction = document.createElement("div"), t.$task_links.appendChild(g._direction)), g._direction; + }(), x = o(), S = ["gantt_link_direction"]; + e.templates.link_direction_class && S.push(e.templates.link_direction_class(x.link_source_id, x.link_from_start, x.link_target_id, x.link_to_start)); + var T = Math.sqrt(Math.pow(k - m, 2) + Math.pow($ - p, 2)); + if (T = Math.max(0, T - 3)) { + w.className = S.join(" "); + var C = ($ - p) / (k - m), E = Math.atan(C); + _(m, k, p, $) == 2 ? E += Math.PI : _(m, k, p, $) == 3 && (E -= Math.PI); + var D = Math.sin(E), A = Math.cos(E), I = Math.round(p), M = Math.round(m), N = ["-webkit-transform: rotate(" + E + "rad)", "-moz-transform: rotate(" + E + "rad)", "-ms-transform: rotate(" + E + "rad)", "-o-transform: rotate(" + E + "rad)", "transform: rotate(" + E + "rad)", "width:" + Math.round(T) + "px"]; + if (window.navigator.userAgent.indexOf("MSIE 8.0") != -1) { + N.push('-ms-filter: "' + function(V, ht) { + return "progid:DXImageTransform.Microsoft.Matrix(M11 = " + ht + ",M12 = -" + V + ",M21 = " + V + ",M22 = " + ht + ",SizingMethod = 'auto expand')"; + }(D, A) + '"'); + var P = Math.abs(Math.round(m - k)), H = Math.abs(Math.round($ - p)); + switch (_(m, k, p, $)) { + case 1: + I -= H; + break; + case 2: + M -= P, I -= H; + break; + case 3: + M -= P; + } + } + N.push("top:" + I + "px"), N.push("left:" + M + "px"), w.style.cssText = N.join(";"); + } + } + function _(m, p, k, $) { + return p >= m ? $ <= k ? 1 : 4 : $ <= k ? 2 : 3; + } + g.attachEvent("onBeforeDragStart", e.bind(function(m, p) { + var k = p.target || p.srcElement; + if (v(), e.getState("tasksDnd").drag_id) return !1; + if (ft(k, u)) { + ft(k, "task_start_date") && (s = !0); + var $ = e.locate(p); + r = $; + var w = e.getTask($); + return e.isReadonly(w) ? (v(), !1) : (this._dir_start = { x: g.config.original_element_sizes.x + g.config.original_element_sizes.width / 2, y: g.config.original_element_sizes.y + g.config.original_element_sizes.height / 2 }, !0); + } + return !1; + }, this)), g.attachEvent("onAfterDragStart", e.bind(function(m, p) { + e.config.touch && e.refreshData(), y(g.config.marker); + }, this)), g.attachEvent("onDragMove", e.bind(function(m, p) { + var k = g.config, $ = f(p, k.marker); + (function(A, I) { + A.style.left = I.x + "px", A.style.top = I.y + "px"; + })(k.marker, $); + var w = !!ft(p, h), x = i, S = n, T = a, C = e.locate(p), E = !0; + if (J(kt(p), e.$root) || (w = !1, C = null), w && (E = !ft(p, "task_end_date"), w = !!C), i = C, n = w, a = E, w) { + const A = ft(p, h).querySelector(`.${u}`); + if (A) { + const I = xe(A, t.$task_data); + this._dir_end = { x: I.x + A.offsetWidth / 2, y: I.y + A.offsetHeight / 2 }; + } + } else this._dir_end = lt(p, t.$task_data), e.env.isEdge && (this._dir_end.y += window.scrollY); + var D = !(S == w && x == C && T == E); + return D && (x && e.refreshTask(x, !1), C && e.refreshTask(C, !1)), D && y(k.marker), b(this._dir_start.x, this._dir_start.y, this._dir_end.x, this._dir_end.y), !0; + }, this)), g.attachEvent("onDragEnd", e.bind(function() { + var m = o(); + if (m.link_source_id && m.link_target_id && m.link_source_id != m.link_target_id) { + var p = e._get_link_type(m.link_from_start, m.link_to_start), k = { source: m.link_source_id, target: m.link_target_id, type: p }; + k.type && e.isLinkAllowed(k) && e.callEvent("onLinkCreated", [k]) && e.addLink(k); + } + v(), e.config.touch ? e.refreshData() : (m.link_source_id && e.refreshTask(m.link_source_id, !1), m.link_target_id && e.refreshTask(m.link_target_id, !1)), g._direction && (g._direction.parentNode && g._direction.parentNode.removeChild(g._direction), g._direction = null); + }, this)), e.attachEvent("onGanttRender", e.bind(function() { + g._direction && b(this._dir_start.x, this._dir_start.y, this._dir_end.x, this._dir_end.y); + }, this)); +}; +const Wa = function() { + return { init: za }; +}; +var ja = function(t) { + var e = t.$services; + return { onCreated: function(n) { + var i = n.$config; + i.bind = W(i.bind) ? i.bind : "task", i.bindLinks = W(i.bindLinks) ? i.bindLinks : "link", n._linksDnD = Wa(), n._tasksDnD = Ba.createTaskDND(), n._tasksDnD.extend(n), this._mouseDelegates = Se(t); + }, onInitialized: function(n) { + this._attachDomEvents(t), this._attachStateProvider(t, n), n._tasksDnD.init(n, t), n._linksDnD.init(n, t), n.$config.id == "timeline" && this.extendDom(n); + }, onDestroyed: function(n) { + this._clearDomEvents(t), this._clearStateProvider(t), n._tasksDnD && n._tasksDnD.destructor(); + }, extendDom: function(n) { + t.$task = n.$task, t.$task_scale = n.$task_scale, t.$task_data = n.$task_data, t.$task_bg = n.$task_bg, t.$task_links = n.$task_links, t.$task_bars = n.$task_bars; + }, _clearDomEvents: function() { + this._mouseDelegates.destructor(), this._mouseDelegates = null; + }, _attachDomEvents: function(n) { + function i(a, r) { + if (a && this.callEvent("onLinkDblClick", [a, r])) { + var s = this.getLink(a); + if (this.isReadonly(s)) return; + var o = this.locale.labels.link + " " + this.templates.link_description(this.getLink(a)) + " " + this.locale.labels.confirm_link_deleting; + window.setTimeout(function() { + n._simple_confirm(o, "", function() { + n.deleteLink(a); + }); + }, this.config.touch ? 300 : 1); + } + } + this._mouseDelegates.delegate("click", "gantt_task_link", n.bind(function(a, r) { + var s = this.locate(a, this.config.link_attribute); + s && this.callEvent("onLinkClick", [s, a]); + }, n), this.$task), this._mouseDelegates.delegate("click", "gantt_scale_cell", n.bind(function(a, r) { + var s = lt(a, n.$task_data), o = n.dateFromPos(s.x), l = Math.floor(n.columnIndexByDate(o)), d = n.getScale().trace_x[l]; + n.callEvent("onScaleClick", [a, d]); + }, n), this.$task), this._mouseDelegates.delegate("doubleclick", "gantt_task_link", n.bind(function(a, r, s) { + r = this.locate(a, n.config.link_attribute), i.call(this, r, a); + }, n), this.$task), this._mouseDelegates.delegate("doubleclick", "gantt_link_point", n.bind(function(a, r, s) { + r = this.locate(a); + var o = this.getTask(r), l = null; + return s.parentNode && Z(s.parentNode) && (l = Z(s.parentNode).indexOf("_left") > -1 ? o.$target[0] : o.$source[0]), l && i.call(this, l, a), !1; + }, n), this.$task); + }, _attachStateProvider: function(n, i) { + var a = i; + e.getService("state").registerProvider("tasksTimeline", function() { + return { scale_unit: a._tasks ? a._tasks.unit : void 0, scale_step: a._tasks ? a._tasks.step : void 0 }; + }); + }, _clearStateProvider: function() { + e.getService("state").unregisterProvider("tasksTimeline"); + } }; +}, Fa = function(t) { + return { getVerticalScrollbar: function() { + return t.$ui.getView("scrollVer"); + }, getHorizontalScrollbar: function() { + return t.$ui.getView("scrollHor"); + }, _legacyGridResizerClass: function(e) { + for (var n = e.getCellsByType("resizer"), i = 0; i < n.length; i++) { + var a = n[i], r = !1, s = a.$parent.getPrevSibling(a.$id); + if (s && s.$config && s.$config.id === "grid") r = !0; + else { + var o = a.$parent.getNextSibling(a.$id); + o && o.$config && o.$config.id === "grid" && (r = !0); + } + r && (a.$config.css = (a.$config.css ? a.$config.css + " " : "") + "gantt_grid_resize_wrap"); + } + }, onCreated: function(e) { + var n = !0; + this._legacyGridResizerClass(e), e.attachEvent("onBeforeResize", function() { + var i = t.$ui.getView("timeline"); + i && (i.$config.hidden = i.$parent.$config.hidden = !t.config.show_chart); + var a = t.$ui.getView("grid"); + if (a) { + var r = a._getColsTotalWidth(), s = !t.config.show_grid || !t.config.grid_width || r === 0; + if (n && !s && r !== !1 && (t.config.grid_width = r), a.$config.hidden = a.$parent.$config.hidden = s, !a.$config.hidden) { + var o = a._getGridWidthLimits(); + if (o[0] && t.config.grid_width < o[0] && (t.config.grid_width = o[0]), o[1] && t.config.grid_width > o[1] && (t.config.grid_width = o[1]), i && t.config.show_chart) { + if (a.$config.width = t.config.grid_width - 1, !a.$config.scrollable && a.$config.scrollY && t.$root.offsetWidth) { + var l = a.$gantt.$layout.$container.offsetWidth, d = t.$ui.getView(a.$config.scrollY).$config.width, c = l - (a.$config.width + d) - 4; + c < 0 && (a.$config.width += c, t.config.grid_width += c); + } + if (n) a.$parent.$config.width = t.config.grid_width, a.$parent.$config.group && t.$layout._syncCellSizes(a.$parent.$config.group, { value: a.$parent.$config.width, isGravity: !1 }); + else if (i && !J(i.$task, e.$view)) { + if (!a.$config.original_grid_width) { + var u = t.skins[t.skin]; + u && u.config && u.config.grid_width ? a.$config.original_grid_width = u.config.grid_width : a.$config.original_grid_width = 0; + } + t.config.grid_width = a.$config.original_grid_width, a.$parent.$config.width = t.config.grid_width; + } else a.$parent._setContentSize(a.$config.width, null), t.$layout._syncCellSizes(a.$parent.$config.group, { value: t.config.grid_width, isGravity: !1 }); + } else i && J(i.$task, e.$view) && (a.$config.original_grid_width = t.config.grid_width), n || (a.$parent.$config.width = 0); + } + n = !1; + } + }), this._initScrollStateEvents(e); + }, _initScrollStateEvents: function(e) { + t._getVerticalScrollbar = this.getVerticalScrollbar, t._getHorizontalScrollbar = this.getHorizontalScrollbar; + var n = this.getVerticalScrollbar(), i = this.getHorizontalScrollbar(); + n && n.attachEvent("onScroll", function(a, r, s) { + var o = t.getScrollState(); + t.callEvent("onGanttScroll", [o.x, a, o.x, r]); + }), i && i.attachEvent("onScroll", function(a, r, s) { + var o = t.getScrollState(); + t.callEvent("onGanttScroll", [a, o.y, r, o.y]); + var l = t.$ui.getView("grid"); + l && l.$grid_data && !l.$config.scrollable && (l.$grid_data.style.left = l.$grid.scrollLeft + "px", l.$grid_data.scrollLeft = l.$grid.scrollLeft); + }), e.attachEvent("onResize", function() { + n && !t.$scroll_ver && (t.$scroll_ver = n.$scroll_ver), i && !t.$scroll_hor && (t.$scroll_hor = i.$scroll_hor); + }); + }, _findGridResizer: function(e, n) { + for (var i, a = e.getCellsByType("resizer"), r = !0, s = 0; s < a.length; s++) { + var o = a[s]; + o._getSiblings(); + var l = o._behind, d = o._front; + if (l && l.$content === n || l.isChild && l.isChild(n)) { + i = o, r = !0; + break; + } + if (d && d.$content === n || d.isChild && d.isChild(n)) { + i = o, r = !1; + break; + } + } + return { resizer: i, gridFirst: r }; + }, onInitialized: function(e) { + var n = t.$ui.getView("grid"), i = this._findGridResizer(e, n); + if (i.resizer) { + var a, r = i.gridFirst, s = i.resizer; + if (s.$config.mode !== "x") return; + s.attachEvent("onResizeStart", function(o, l) { + var d = t.$ui.getView("grid"), c = d ? d.$parent : null; + if (c) { + var u = d._getGridWidthLimits(); + d.$config.scrollable || (c.$config.minWidth = u[0]), c.$config.maxWidth = u[1]; + } + return a = r ? o : l, t.callEvent("onGridResizeStart", [a]); + }), s.attachEvent("onResize", function(o, l) { + var d = r ? o : l; + return t.callEvent("onGridResize", [a, d]); + }), s.attachEvent("onResizeEnd", function(o, l, d, c) { + var u = r ? o : l, h = r ? d : c, g = t.$ui.getView("grid"), f = g ? g.$parent : null; + f && (f.$config.minWidth = void 0); + var y = t.callEvent("onGridResizeEnd", [u, h]); + return y && h !== 0 && (t.config.grid_width = h), y; + }); + } + }, onDestroyed: function(e) { + } }; +}; +const Va = { init: function(t) { + function e(r, s) { + var o = s(t); + o.onCreated && o.onCreated(r), r.attachEvent("onReady", function() { + o.onInitialized && o.onInitialized(r); + }), r.attachEvent("onDestroy", function() { + o.onDestroyed && o.onDestroyed(r); + }); + } + var n = ca(t); + n.registerView("cell", Pt), n.registerView("resizer", null), n.registerView("scrollbar", ma), n.registerView("layout", vn, function(r) { + (r.$config ? r.$config.id : null) === "main" && e(r, Fa); + }), n.registerView("viewcell", pa), n.registerView("multiview", fa), n.registerView("timeline", Ft, function(r) { + (r.$config ? r.$config.id : null) !== "timeline" && r.$config.bind != "task" || e(r, ja); + }), n.registerView("grid", ve, function(r) { + (r.$config ? r.$config.id : null) !== "grid" && r.$config.bind != "task" || e(r, Oa); + }), n.registerView("resourceGrid", ve), n.registerView("resourceTimeline", Ft), n.registerView("resourceHistogram", Ft); + var i = function(r) { + var s = _a(r); + return { getDataRender: function(o) { + return r.$services.getService("layer:" + o) || null; + }, createDataRender: function(o) { + var l = o.name, d = o.defaultContainer, c = o.defaultContainerSibling, u = s.createGroup(d, c, function(h, g) { + if (!u.filters) return !0; + for (var f = 0; f < u.filters.length; f++) if (u.filters[f](h, g) === !1) return !1; + }, ga); + return r.$services.setService("layer:" + l, function() { + return u; + }), r.attachEvent("onGanttReady", function() { + u.addLayer(); + }), u; + }, init: function() { + var o = this.createDataRender({ name: "task", defaultContainer: function() { + return r.$task_data ? r.$task_data : r.$ui.getView("timeline") ? r.$ui.getView("timeline").$task_data : void 0; + }, defaultContainerSibling: function() { + return r.$task_links ? r.$task_links : r.$ui.getView("timeline") ? r.$ui.getView("timeline").$task_links : void 0; + }, filter: function(d) { + } }, r), l = this.createDataRender({ name: "link", defaultContainer: function() { + return r.$task_data ? r.$task_data : r.$ui.getView("timeline") ? r.$ui.getView("timeline").$task_data : void 0; + } }, r); + return { addTaskLayer: function(d) { + const c = gt; + return typeof d == "function" ? d = { renderer: { render: d, getVisibleRange: c } } : d.renderer && !d.renderer.getVisibleRange && (d.renderer.getVisibleRange = c), d.view = "timeline", o.addLayer(d); + }, _getTaskLayers: function() { + return o.getLayers(); + }, removeTaskLayer: function(d) { + o.removeLayer(d); + }, _clearTaskLayers: function() { + o.clear(); + }, addLinkLayer: function(d) { + const c = pn(); + return typeof d == "function" ? d = { renderer: { render: d, getVisibleRange: c } } : d.renderer && !d.renderer.getVisibleRange && (d.renderer.getVisibleRange = c), d.view = "timeline", d && d.renderer && (d.renderer.getRectangle || d.renderer.isInViewPort || (d.renderer.isInViewPort = mn)), l.addLayer(d); + }, _getLinkLayers: function() { + return l.getLayers(); + }, removeLinkLayer: function(d) { + l.removeLayer(d); + }, _clearLinkLayers: function() { + l.clear(); + } }; + } }; + }(t), a = Ia(t); + return t.ext.inlineEditors = a, t.ext._inlineEditors = a, a.init(t), { factory: n, mouseEvents: ha.init(t), layersApi: i.init(), render: { gridLine: function() { + return /* @__PURE__ */ function(r) { + return { render: function(s, o, l, d) { + for (var c = o.getGridColumns(), u = o.$getTemplates(), h = o.$config.rowStore, g = [], f = 0; f < c.length; f++) { + var y, v, b, _ = f == c.length - 1, m = c[f]; + m.name == "add" ? (v = "
", b = "") : (Q(v = m.template ? m.template(s) : s[m.name]) && (v = u.date_grid(v, s, m.name)), v == null && (v = ""), b = v, v = "
" + v + "
"); + var p = "gantt_cell" + (_ ? " gantt_last_cell" : ""), k = []; + if (m.tree) { + p += " gantt_cell_tree"; + for (var $ = 0; $ < s.$level; $++) k.push(u.grid_indent(s)); + !h.hasChild(s.id) || r.isSplitTask(s) && !r.config.open_split_tasks ? (k.push(u.grid_blank(s)), k.push(u.grid_file(s))) : (k.push(u.grid_open(s)), k.push(u.grid_folder(s))); + } + var w = "width:" + (m.width - (_ ? 1 : 0)) + "px;"; + if (this.defined(m.align)) { + var x = { right: "flex-end", left: "flex-start", center: "center" }[m.align]; + w += "text-align:" + m.align + ";justify-content:" + x + ";"; + } + var S = r._waiAria.gridCellAttrString(m, b, s); + k.push(v), y = "
" + k.join("") + "
", g.push(y); + } + switch (p = "", h.$config.name) { + case "task": + p = r.getGlobalTaskIndex(s.id) % 2 == 0 ? "" : " odd"; + break; + case "resource": + p = h.visibleOrder.indexOf(s.id) % 2 == 0 ? "" : " odd"; + } + if (p += s.$transparent ? " gantt_transparent" : "", p += s.$dataprocessor_class ? " " + s.$dataprocessor_class : "", u.grid_row_class) { + var T = u.grid_row_class.call(r, s.start_date, s.end_date, s); + T && (p += " " + T); + } + h.isSelected(s.id) && (p += " gantt_selected"); + var C = document.createElement("div"); + C.className = "gantt_row" + p + " gantt_row_" + r.getTaskType(s.type); + var E = o.getItemHeight(s.id); + return C.style.height = E + "px", C.style.lineHeight = E + "px", l.smart_rendering && (C.style.position = "absolute", C.style.left = "0px", C.style.top = o.getItemTop(s.id) + "px"), o.$config.item_attribute && (C.setAttribute(o.$config.item_attribute, s.id), C.setAttribute(o.$config.bind + "_id", s.id)), r._waiAria.taskRowAttr(s, C), C.innerHTML = g.join(""), C; + }, update: null, getRectangle: Gt, isInViewPort: La, getVisibleRange: gt, onrender: function(s, o, l) { + for (var d = l.getGridColumns(), c = 0; c < d.length; c++) { + var u = d[c]; + if (u.onrender) { + var h = o.querySelector("[data-column-name=" + u.name + "]"); + if (h) { + var g = u.onrender(s, h); + if (g && typeof g == "string") h.innerHTML = g; + else if (g && typeof g == "object" && r.config.external_render) { + var f = r.config.external_render; + f.isElement(g) && f.renderElement(g, h); + } + } + } + } + } }; + }(t); + }, taskBg: function() { + return /* @__PURE__ */ function(r) { + var s = {}, o = {}; + function l(g, f) { + return !(!s[g.id][f] || !s[g.id][f].parentNode); + } + function d(g, f) { + s[g] && s[g][f] && s[g][f].parentNode && s[g][f].parentNode.removeChild(s[g][f]); + } + function c(g) { + var f, y = g.$getTemplates(); + return y.task_cell_class !== void 0 ? (f = y.task_cell_class, (console.warn || console.log)("gantt.templates.task_cell_class template is deprecated and will be removed soon. Please use gantt.templates.timeline_cell_class instead.")) : f = y.timeline_cell_class, f; + } + function u(g) { + return g.$getTemplates().timeline_cell_content; + } + function h(g, f, y, v, b, _, m, p) { + var k = g.width[f], $ = ""; + if (ie(f, g, v, r)) { + var w = _(y, g.trace_x[f]), x = ""; + if (m && (x = m(y, g.trace_x[f])), p.static_background) { + var S = !(!w && !x); + if (!p.static_background_cells || !S) return null; + } + if (s[y.id][f]) return o[y.id][f] = f, s[y.id][f]; + var T = document.createElement("div"); + return T.style.width = k + "px", $ = "gantt_task_cell" + (f == b - 1 ? " gantt_last_cell" : ""), w && ($ += " " + w), T.className = $, x && (T.innerHTML = x), T.style.position = "absolute", T.style.left = g.left[f] + "px", s[y.id][f] = T, o[y.id][f] = f, T; + } + return null; + } + return { render: function(g, f, y, v) { + var b = f.$getTemplates(), _ = f.getScale(), m = _.count; + if (y.static_background && !y.static_background_cells) return null; + var p, k = document.createElement("div"), $ = c(f), w = u(f); + if (p = v && y.smart_rendering && !Mt(r) ? zt(_, v.x) : { start: 0, end: m - 1 }, y.show_task_cells) { + s[g.id] = {}, o[g.id] = {}; + for (var x = p.start; x <= p.end; x++) { + var S = h(_, x, g, v, m, $, w, y); + S && k.appendChild(S); + } + } + const T = f.$config.rowStore, C = T.getIndexById(g.id) % 2 != 0; + var E = b.task_row_class(g.start_date, g.end_date, g), D = "gantt_task_row" + (C ? " odd" : "") + (E ? " " + E : ""); + if (T.isSelected(g.id) && (D += " gantt_selected"), k.className = D, y.smart_rendering ? (k.style.position = "absolute", k.style.top = f.getItemTop(g.id) + "px", k.style.width = "100%") : k.style.position = "relative", k.style.height = f.getItemHeight(g.id) + "px", g.id == "timeline_placeholder_task") { + var A = 0; + g.lastTaskId && (A = f.getItemTop(g.lastTaskId) + f.getItemHeight(g.lastTaskId)); + var I = (g.row_height || f.$task_data.offsetHeight) - A; + I < 0 && (I = 0), y.smart_rendering && (k.style.top = A + "px"), k.style.height = I + "px"; + } + return f.$config.item_attribute && (k.setAttribute(f.$config.item_attribute, g.id), k.setAttribute(f.$config.bind + "_id", g.id)), k; + }, update: function(g, f, y, v, b) { + var _ = y.getScale(), m = _.count, p = c(y), k = u(y); + if (v.show_task_cells) { + s[g.id] || (s[g.id] = {}), o[g.id] || (o[g.id] = {}); + var $ = zt(_, b); + for (var w in o[g.id]) { + var x = o[g.id][w]; + (Number(x) < $.start || Number(x) > $.end) && d(g.id, x); + } + o[g.id] = {}; + for (var S = $.start; S <= $.end; S++) { + var T = h(_, S, g, b, m, p, k, v); + !T && l(g, S) ? d(g.id, S) : T && !T.parentNode && f.appendChild(T); + } + } + }, getRectangle: Ge, getVisibleRange: gt, prepareData: Ma }; + }(t); + }, taskBar: function() { + return qe(t); + }, timedProjectBar: function() { + return qe(t); + }, taskRollupBar: function() { + return function(r) { + const s = yn(r), o = {}; + function l(u, h, g, f, y) { + let v = !0; + return f.smart_rendering && (v = ke(u, h, g)), v; + } + function d(u, h, g, f) { + const y = r.copy(r.getTask(h.id)); + if (y.$rendered_at = u.id, r.callEvent("onBeforeRollupTaskDisplay", [y.id, y, u.id]) === !1) return; + const v = s(y, g); + if (!v) return; + const b = g.getBarHeight(u.id, h.type == r.config.types.milestone), _ = Math.floor((g.getItemHeight(u.id) - b) / 2); + return v.style.top = f.top + _ + "px", v.classList.add("gantt_rollup_child"), v.setAttribute("data-rollup-parent-id", u.id), v; + } + function c(u, h) { + return u + "_" + h; + } + return { render: function(u, h, g, f) { + if (u.rollup !== !1 && u.$rollup && u.$rollup.length) { + const y = document.createElement("div"), v = r.getTaskPosition(u); + return f && (f.y = 0, f.y_end = r.$task_bg.scrollHeight), u.$rollup.forEach(function(b) { + if (!r.isTaskExists(b)) return; + const _ = r.getTask(b); + if (!l(_, f, h, g)) return; + const m = d(u, _, h, v); + m ? (o[c(_.id, u.id)] = m, y.appendChild(m)) : o[c(_.id, u.id)] = !1; + }), y; + } + return !1; + }, update: function(u, h, g, f, y) { + const v = document.createElement("div"), b = r.getTaskPosition(u); + y.y = 0, y.y_end = r.$task_bg.scrollHeight, u.$rollup.forEach(function(_) { + const m = r.getTask(_), p = c(m.id, u.id); + let k = l(m, y, g, f); + if (k !== !!o[p]) if (k) { + const $ = d(u, m, g, b); + o[p] = $ || !1; + } else o[p] = !1; + o[p] && v.appendChild(o[p]), h.innerHTML = "", h.appendChild(v); + }); + }, isInViewPort: ke, getVisibleRange: gt }; + }(t); + }, taskSplitBar: function() { + return Ct(); + }, taskConstraints: function() { + return Ct(); + }, taskDeadline: function() { + return Ct(); + }, taskBaselines: function() { + return Ct(); + }, link: function() { + return Na(t); + }, resourceRow: function() { + return function(r) { + var s = Pa(r), o = {}; + function l(c, u, h, g, f) { + var y = h.resource_cell_class(u.start_date, u.end_date, c, u.tasks, u.assignments), v = h.resource_cell_value(u.start_date, u.end_date, c, u.tasks, u.assignments), b = f.getItemHeight(c.id) - 1; + if (y || v) { + var _ = f.getItemPosition(c, u.start_date, u.end_date), m = document.createElement("div"); + return m.setAttribute(f.$config.item_attribute, c.id), m.className = ["gantt_resource_marker", y].join(" "), m.style.cssText = ["left:" + _.left + "px", "width:" + _.width + "px", "height:" + b + "px", "line-height:" + b + "px", "top:" + _.top + "px"].join(";"), v && (m.innerHTML = v), m; + } + return null; + } + function d(c, u) { + o[c] && o[c][u] && o[c][u].parentNode && o[c][u].parentNode.removeChild(o[c][u]); + } + return { render: function(c, u, h, g) { + var f = u.$getTemplates(), y = u.getScale(), v = s(c, h.resource_property, u.getScale(), u), b = !!g, _ = []; + o[c.id] = {}; + for (var m = zt(y, g), p = m.start; p <= m.end; p++) { + var k = v[p]; + if (k && (!b || ie(p, y, g, r))) { + var $ = l(c, k, f, 0, u); + $ && (_.push($), o[c.id][p] = $); + } + } + var w = null; + if (_.length) { + w = document.createElement("div"); + for (var x = 0; x < _.length; x++) w.appendChild(_[x]); + } + return w; + }, update: function(c, u, h, g, f) { + var y = h.$getTemplates(), v = h.getScale(), b = s(c, g.resource_property, h.getScale(), h), _ = zt(v, f), m = {}; + if (o && o[c.id]) for (var p in o[c.id]) m[p] = p; + for (var k = _.start; k <= _.end; k++) { + var $ = b[k]; + if (m[k] = !1, $) if (ie(k, v, f, r)) if (o[c.id] && o[c.id][k]) o[c.id] && o[c.id][k] && !o[c.id][k].parentNode && u.appendChild(o[c.id][k]); + else { + var w = l(c, $, y, 0, h); + w && (u.appendChild(w), o[c.id][k] = w); + } + else d(c.id, k); + } + for (var p in m) m[p] !== !1 && d(c.id, p); + }, getRectangle: Ge, getVisibleRange: gt }; + }(t); + }, resourceHistogram: function() { + return Ct(); + }, gridTaskRowResizer: function() { + return /* @__PURE__ */ function(r) { + return { render: function(s, o, l) { + var d = o.$getConfig(), c = document.createElement("div"); + return c.className = "gantt_task_grid_row_resize_wrap", c.style.top = o.getItemTop(s.id) + o.getItemHeight(s.id) + "px", c.innerHTML = "
", c.setAttribute(d.task_grid_row_resizer_attribute, s.id), r._waiAria.rowResizerAttr(c), c; + }, update: null, getRectangle: Gt, getVisibleRange: gt }; + }(t); + } }, layersService: { getDataRender: function(r) { + return i.getDataRender(r, t); + }, createDataRender: function(r) { + return i.createDataRender(r, t); + } } }; +} }; +function se(t, e) { + const n = getComputedStyle(e.$root).getPropertyValue("--dhx-gantt-theme"); + let i, a = !!n; + if (a) i = n; + else { + var r = e.skin; + if (i = r, !r || t) for (var s = document.getElementsByTagName("link"), o = 0; o < s.length; o++) { + var l = s[o].href.match("dhtmlxgantt_([a-z_]+).css"); + if (l && (e.skins[l[1]] || !r)) { + i = l[1]; + break; + } + } + } + e._theme_info = { theme: i, cssVarTheme: a }, e.skin = i || "terrace"; + var d = e.skins[e.skin] || e.skins.terrace; + (function(h, g, f) { + for (var y in g) (h[y] === void 0 || f) && (h[y] = g[y]); + })(e.config, d.config, t), a || (e.config.link_radius = 1); + var c = e.getGridColumns(); + for (c[1] && !e.defined(c[1].width) && (c[1].width = d._second_column_width), c[2] && !e.defined(c[2].width) && (c[2].width = d._third_column_width), o = 0; o < c.length; o++) { + var u = c[o]; + u.name == "add" && (u.width || (u.width = 44), e.defined(u.min_width) && e.defined(u.max_width) || (u.min_width = u.min_width || u.width, u.max_width = u.max_width || u.width), u.min_width && (u.min_width = +u.min_width), u.max_width && (u.max_width = +u.max_width), u.width && (u.width = +u.width, u.width = u.min_width && u.min_width > u.width ? u.min_width : u.width, u.width = u.max_width && u.max_width < u.width ? u.max_width : u.width)); + } + d.config.task_height && (e.config.task_height = d.config.task_height || "full"), d.config.bar_height && (e.config.bar_height = d.config.bar_height || "full"), d._lightbox_template && (e._lightbox_template = d._lightbox_template), d._redefine_lightbox_buttons && (e.config.buttons_right = d._redefine_lightbox_buttons.buttons_right, e.config.buttons_left = d._redefine_lightbox_buttons.buttons_left), e.resetLightbox(); +} +function Ua(t) { + var e = 50, n = 30, i = 10, a = 50, r = null, s = !1, o = null, l = { started: !1 }, d = {}; + function c(b) { + return b && J(b, t.$root) && b.offsetHeight; + } + function u() { + var b = !!document.querySelector(".gantt_drag_marker"), _ = !!document.querySelector(".gantt_drag_marker.gantt_grid_resize_area") || !!document.querySelector(".gantt_drag_marker.gantt_row_grid_resize_area"), m = !!document.querySelector(".gantt_link_direction"), p = t.getState(), k = p.autoscroll; + return s = b && !_ && !m, !(!p.drag_mode && !b || _) || k; + } + function h(b) { + if (o && (clearTimeout(o), o = null), b) { + var _ = t.config.autoscroll_speed; + _ && _ < 10 && (_ = 10), o = setTimeout(function() { + r = setInterval(y, _ || a); + }, t.config.autoscroll_delay || i); + } + } + function g(b) { + b ? (h(!0), l.started || (l.x = d.x, l.y = d.y, l.started = !0)) : (r && (clearInterval(r), r = null), h(!1), l.started = !1); + } + function f(b) { + var _ = u(); + if (!r && !o || _ || g(!1), !t.config.autoscroll || !_) return !1; + d = { x: b.clientX, y: b.clientY }, b.type == "touchmove" && (d.x = b.targetTouches[0].clientX, d.y = b.targetTouches[0].clientY), !r && _ && g(!0); + } + function y() { + if (!u()) return g(!1), !1; + var b = c(t.$task) ? t.$task : c(t.$grid) ? t.$grid : t.$root; + if (b) { + var _ = !1; + [".gantt_drag_marker.gantt_grid_resize_area", ".gantt_drag_marker .gantt_row.gantt_row_task", ".gantt_drag_marker.gantt_grid_dnd_marker"].forEach(function(M) { + _ = _ || !!document.querySelector(M); + }), _ && (b = t.$grid); + var m = F(b), p = d.x - m.x, k = d.y - m.y + window.scrollY, $ = s ? 0 : v(p, m.width, l.x - m.x), w = v(k, m.height, l.y - m.y + window.scrollY), x = t.getScrollState(), S = x.y, T = x.inner_height, C = x.height, E = x.x, D = x.inner_width, A = x.width; + (w && !T || w < 0 && !S || w > 0 && S + T >= C + 2) && (w = 0), ($ && !D || $ < 0 && !E || $ > 0 && E + D >= A) && ($ = 0); + var I = t.config.autoscroll_step; + I && I < 2 && (I = 2), w *= I || n, (($ *= I || n) || w) && function(M, N) { + var P = t.getScrollState(), H = null, V = null; + M && (H = P.x + M, H = Math.min(P.width, H), H = Math.max(0, H)), N && (V = P.y + N, V = Math.min(P.height, V), V = Math.max(0, V)), t.scrollTo(H, V); + }($, w); + } + } + function v(b, _, m) { + return b - e < 0 && b < m ? -1 : b > _ - e && b > m ? 1 : 0; + } + t.attachEvent("onGanttReady", function() { + if (!j(t)) { + var b = mt(t.$root) || document.body; + t.eventRemove(b, "mousemove", f), t.event(b, "mousemove", f), t.eventRemove(b, "touchmove", f), t.event(b, "touchmove", f), t.eventRemove(b, "pointermove", f), t.event(b, "pointermove", f); + } + }), t.attachEvent("onDestroy", function() { + g(!1); + }); +} +var oe, le; +window.jQuery && (oe = window.jQuery, le = [], oe.fn.dhx_gantt = function(t) { + if (typeof (t = t || {}) != "string") { + var e = []; + return this.each(function() { + if (this && this.getAttribute) if (this.gantt || window.gantt.$root == this) e.push(typeof this.gantt == "object" ? this.gantt : window.gantt); + else { + var n = window.gantt.$container && window.Gantt ? window.Gantt.getGanttInstance() : window.gantt; + for (var i in t) i != "data" && (n.config[i] = t[i]); + n.init(this), t.data && n.parse(t.data), e.push(n); + } + }), e.length === 1 ? e[0] : e; + } + if (le[t]) return le[t].apply(this, []); + oe.error("Method " + t + " does not exist on jQuery.dhx_gantt"); +}); +const qa = null; +window.dhtmlx && (window.dhtmlx.attaches || (window.dhtmlx.attaches = {}), window.dhtmlx.attaches.attachGantt = function(t, e, n) { + var i = document.createElement("DIV"); + n = n || window.gantt, i.id = "gantt_" + n.uid(), i.style.width = "100%", i.style.height = "100%", i.cmp = "grid", document.body.appendChild(i), this.attachObject(i.id), this.dataType = "gantt", this.dataObj = n; + var a = this.vs[this.av]; + return a.grid = n, n.init(i.id, t, e), i.firstChild.style.border = "none", a.gridId = i.id, a.gridObj = i, this.vs[this._viewRestore()].grid; +}), window.dhtmlXCellObject !== void 0 && (window.dhtmlXCellObject.prototype.attachGantt = function(t, e, n) { + n = n || window.gantt; + var i = document.createElement("DIV"); + return i.id = "gantt_" + n.uid(), i.style.width = "100%", i.style.height = "100%", i.cmp = "grid", document.body.appendChild(i), this.attachObject(i.id), this.dataType = "gantt", this.dataObj = n, n.init(i.id, t, e), i.firstChild.style.border = "none", i = null, this.callEvent("_onContentAttach", []), this.dataObj; +}); +const Ga = null, Ya = ["ctrlKey", "altKey", "shiftKey", "metaKey"], Ja = [[{ unit: "month", date: "%M", step: 1 }, { unit: "day", date: "%d", step: 1 }], [{ unit: "day", date: "%d %M", step: 1 }], [{ unit: "day", date: "%d %M", step: 1 }, { unit: "hour", date: "%H:00", step: 8 }], [{ unit: "day", date: "%d %M", step: 1 }, { unit: "hour", date: "%H:00", step: 1 }]]; +class Ka { + constructor(e) { + this.zoomIn = () => { + const n = this.getCurrentLevel() - 1; + n < 0 || this.setLevel(n); + }, this.zoomOut = () => { + const n = this.getCurrentLevel() + 1; + n > this._levels.length - 1 || this.setLevel(n); + }, this.getCurrentLevel = () => this._activeLevelIndex, this.getLevels = () => this._levels, this.setLevel = (n) => { + const i = this._getZoomIndexByName(n); + i === -1 && this.$gantt.assert(i !== -1, "Invalid zoom level for gantt.ext.zoom.setLevel. " + n + " is not an expected value."), this._setLevel(i, 0); + }, this._getZoomIndexByName = (n) => { + let i = -1; + if (typeof n == "string") { + if (!isNaN(Number(n)) && this._levels[Number(n)]) i = Number(n); + else for (let a = 0; a < this._levels.length; a++) if (this._levels[a].name === n) { + i = a; + break; + } + } else i = n; + return i; + }, this._getVisibleDate = () => { + if (!this.$gantt.$task) return null; + const n = this.$gantt.getScrollState().x, i = this.$gantt.$task.offsetWidth; + this._visibleDate = this.$gantt.dateFromPos(n + i / 2); + }, this._setLevel = (n, i) => { + this._activeLevelIndex = n; + const a = this.$gantt, r = a.copy(this._levels[this._activeLevelIndex]), s = a.copy(r); + if (delete s.name, a.mixin(a.config, s, !0), a.$root && a.$task) { + if (i) { + const o = this.$gantt.dateFromPos(i + this.$gantt.getScrollState().x); + this.$gantt.render(); + const l = this.$gantt.posFromDate(o); + this.$gantt.scrollTo(l - i); + } else { + const o = this.$gantt.$task.offsetWidth; + this._visibleDate || this._getVisibleDate(); + const l = this._visibleDate; + this.$gantt.render(); + const d = this.$gantt.posFromDate(l); + this.$gantt.scrollTo(d - o / 2); + } + this.callEvent("onAfterZoom", [this._activeLevelIndex, r]); + } + }, this._attachWheelEvent = (n) => { + const i = pt.isFF ? "wheel" : "mousewheel"; + let a; + a = typeof n.element == "function" ? n.element() : n.element, a && this._domEvents.attach(a, i, this.$gantt.bind(function(r) { + if (this._useKey && (Ya.indexOf(this._useKey) < 0 || !r[this._useKey])) + return !1; + if (typeof this._handler == "function") return this._handler.apply(this, [r]), !0; + }, this), { passive: !1 }); + }, this._defaultHandler = (n) => { + const i = this.$gantt.$task.getBoundingClientRect().x, a = n.clientX - i; + let r = !1; + (this.$gantt.env.isFF ? -40 * n.deltaY : n.wheelDelta) > 0 && (r = !0), n.preventDefault(), n.stopPropagation(), this._setScaleSettings(r, a); + }, this._setScaleDates = () => { + this._initialStartDate && this._initialEndDate && (this.$gantt.config.start_date = this._initialStartDate, this.$gantt.config.end_date = this._initialEndDate); + }, this.$gantt = e, this._domEvents = this.$gantt._createDomEventScope(); + } + init(e) { + this.$gantt.env.isNode || (this._initialStartDate = e.startDate, this._initialEndDate = e.endDate, this._activeLevelIndex = e.activeLevelIndex ? e.activeLevelIndex : 0, this._levels = this._mapScales(e.levels || Ja), this._handler = e.handler || this._defaultHandler, this._minColumnWidth = e.minColumnWidth || 60, this._maxColumnWidth = e.maxColumnWidth || 240, this._widthStep = e.widthStep || 3 / 8 * e.minColumnWidth, this._useKey = e.useKey, this._initialized || (st(this), this.$gantt.attachEvent("onGanttScroll", () => { + this._getVisibleDate(); + })), this._domEvents.detachAll(), e.trigger === "wheel" && (this.$gantt.$root ? this._attachWheelEvent(e) : this.$gantt.attachEvent("onGanttReady", () => { + this._attachWheelEvent(e); + })), this._initialized = !0, this.setLevel(this._activeLevelIndex)); + } + _mapScales(e) { + return e.map((n) => Array.isArray(n) ? { scales: n } : n); + } + _setScaleSettings(e, n) { + e ? this._stepUp(n) : this._stepDown(n); + } + _stepUp(e) { + if (this._activeLevelIndex >= this._levels.length - 1) return; + let n = this._activeLevelIndex; + if (this._setScaleDates(), this._widthStep) { + let i = this.$gantt.config.min_column_width + this._widthStep; + i > this._maxColumnWidth && (i = this._minColumnWidth, n++), this.$gantt.config.min_column_width = i; + } else n++; + this._setLevel(n, e); + } + _stepDown(e) { + if (this._activeLevelIndex < 1) return; + let n = this._activeLevelIndex; + if (this._setScaleDates(), this._widthStep) { + let i = this.$gantt.config.min_column_width - this._widthStep; + i < this._minColumnWidth && (i = this._maxColumnWidth, n--), this.$gantt.config.min_column_width = i; + } else n--; + this._setLevel(n, e); + } +} +function Xa(t) { + function e() { + if (t.config.touch != "force" && (t.config.touch = t.config.touch && (navigator.userAgent.indexOf("Mobile") != -1 || navigator.userAgent.indexOf("iPad") != -1 || navigator.userAgent.indexOf("Android") != -1 || navigator.userAgent.indexOf("Touch") != -1) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1), t.config.touch) { + var r = !0; + try { + document.createEvent("TouchEvent"); + } catch { + r = !1; + } + r ? t._touch_events(["touchmove", "touchstart", "touchend"], function(s) { + return s.touches && s.touches.length > 1 ? null : s.touches[0] ? { target: s.target, pageX: s.touches[0].pageX, pageY: s.touches[0].pageY, clientX: s.touches[0].clientX, clientY: s.touches[0].clientY } : s; + }, function() { + return !1; + }) : window.navigator.pointerEnabled ? t._touch_events(["pointermove", "pointerdown", "pointerup"], function(s) { + return s.pointerType == "mouse" ? null : s; + }, function(s) { + return !s || s.pointerType == "mouse"; + }) : window.navigator.msPointerEnabled && t._touch_events(["MSPointerMove", "MSPointerDown", "MSPointerUp"], function(s) { + return s.pointerType == s.MSPOINTER_TYPE_MOUSE ? null : s; + }, function(s) { + return !s || s.pointerType == s.MSPOINTER_TYPE_MOUSE; + }); + } + } + function n(r) { + var s = r.$config.scrollX ? t.$ui.getView(r.$config.scrollX) : null, o = r.$config.scrollY ? t.$ui.getView(r.$config.scrollY) : null, l = { x: null, y: null }; + return s && s.getScrollState().visible && (l.x = s.$view.scrollLeft), o && o.getScrollState().visible && (l.y = o.$view.scrollTop), l; + } + function i() { + var r; + return t.$ui.getView("timeline") && (r = t.$ui.getView("timeline")._tasks_dnd), r; + } + t.config.touch_drag = 75, t.config.touch = !0, t.config.touch_feedback = !0, t.config.touch_feedback_duration = 1, t._prevent_touch_scroll = !1, t._touch_feedback = function() { + t.config.touch_feedback && navigator.vibrate && navigator.vibrate(t.config.touch_feedback_duration); + }, t.attachEvent("onGanttReady", function() { + t.$container && e(); + }), t.attachEvent("onGanttLayoutReady", function() { + t.$container && t.attachEvent("onGanttRender", e, { once: !0 }); + }); + var a = []; + t._touch_events = function(r, s, o) { + var l, d = 0, c = !1, u = !1, h = null, g = null, f = null, y = [], v = null; + let b = {}; + for (var _ = 0; _ < a.length; _++) t.eventRemove(a[_][0], a[_][1], a[_][2]); + (a = []).push([t.$container, r[0], function(p) { + var k = i(); + if (!o(p) && c) { + g && clearTimeout(g); + var $ = s(p); + if (k && (k.drag.id || k.drag.start_drag)) return k.on_mouse_move($), p.preventDefault && p.preventDefault(), p.cancelBubble = !0, !1; + if (!t._prevent_touch_scroll) { + if ($ && h) { + var w = h.pageX - $.pageX, x = h.pageY - $.pageY; + if (!u && (Math.abs(w) > 5 || Math.abs(x) > 5) && (u = !0, d = 0, l = v ? n(v) : t.getScrollState()), u) { + var S, T = l.x + w, C = l.y + x; + if (v ? (function(E, D, A) { + var I = E.$config.scrollX ? t.$ui.getView(E.$config.scrollX) : null, M = E.$config.scrollY ? t.$ui.getView(E.$config.scrollY) : null; + I && I.scrollTo(D, null), M && M.scrollTo(null, A); + }(v, T, C), S = n(v)) : (t.scrollTo(T, C), S = t.getScrollState()), l.x != S.x && x > 2 * w || l.y != S.y && w > 2 * x) return m(p); + } + } + return m(p); + } + return !0; + } + }]); + try { + document.addEventListener("touchmove", function(p) { + t._touch_drag && m(p); + }, { passive: !1 }); + } catch { + console.warn("Cannot prevent touch event for the page drag"); + } + for (a.push([this.$container, "contextmenu", function(p) { + if (c) return m(p); + }]), a.push([this.$container, r[1], function(p) { + if (b = p.touches.length, document && document.body && document.body.classList.add("gantt_touch_active"), !o(p)) if (p.touches && p.touches.length > 1) c = !1; + else { + h = s(p), v = function($) { + for (var w = t.$layout.getCellsByType("viewCell"), x = 0; x < w.length; x++) { + var S = w[x].$view.getBoundingClientRect(); + if ($.clientX >= S.left && $.clientX <= S.right && $.clientY <= S.bottom && $.clientY >= S.top) return w[x]; + } + }(h), t._locate_css(h, "gantt_hor_scroll") || t._locate_css(h, "gantt_ver_scroll") || (c = !0); + var k = i(); + g = setTimeout(function() { + var $ = t.locate(h); + k && $ && !t._locate_css(h, "gantt_link_control") && !t._locate_css(h, "gantt_grid_data") && (k.on_mouse_down(h), k.drag && k.drag.start_drag && (function(w) { + const x = t._getTaskLayers(); + let S = t.getTask(w); + if (S) { + let T = t.isTaskVisible(w); + if (T) { + f = w; + for (let C = 0; C < x.length; C++) if (S = x[C].rendered[w], S && S.getAttribute(t.config.task_attribute) && S.getAttribute(t.config.task_attribute) == w) { + const E = S.cloneNode(!0); + y.push(S), x[C].rendered[w] = E, S.style.display = "none", E.className += " gantt_drag_move ", S.parentNode.appendChild(E); + } + } else if (S.$split_subtask) { + let C = S.$rendered_parent; + if (T = t.isTaskVisible(C), !T) return; + f = w; + for (let E = 0; E < x.length; E++) { + const D = x[E].rendered[C]; + let A; + if (D && D.childNodes && (A = D.querySelector(`[${t.config.task_attribute}="${S.id}"]`)), A) { + const I = A.cloneNode(!0); + A.parentNode.appendChild(I), t.$task_bars.appendChild(A), A.style.display = "none", y.push(A), A = null; + } + } + } + } + }($), k._start_dnd(h), t._touch_drag = !0, t.refreshTask($), t._touch_feedback())), g = null; + }, t.config.touch_drag); + } + }]), a.push([this.$container, r[2], function(p) { + if (document && document.body && document.body.classList.remove("gantt_touch_active"), !o(p)) { + g && clearTimeout(g), t._touch_drag = !1, c = !1; + var k = s(p), $ = i(); + if ($ && $.on_mouse_up(k), f && t.isTaskExists(f) && (t.refreshTask(f), y.length && (y.forEach(function(x) { + x.parentNode && x.parentNode.removeChild(x); + }), t._touch_feedback())), c = u = !1, y = [], f = null, h && d) { + var w = /* @__PURE__ */ new Date(); + w - d < 500 && b <= 1 ? (t.$services.getService("mouseEvents").onDoubleClick(h), m(p)) : d = w; + } else d = /* @__PURE__ */ new Date(); + } + }]), _ = 0; _ < a.length; _++) t.event(a[_][0], a[_][1], a[_][2]); + function m(p) { + return p && p.preventDefault && p.cancelable && p.preventDefault(), p.cancelBubble = !0, !1; + } + }; +} +function Wt() { + console.log("Method is not implemented."); +} +function It() { +} +function ut(t) { + return It; +} +It.prototype.render = Wt, It.prototype.set_value = Wt, It.prototype.get_value = Wt, It.prototype.focus = Wt; +var xn = { getHtmlSelect: function(t, e, n) { + var i = "", a = this; + return vt(t = t || [], function(r) { + var s = [{ key: "value", value: r.key }]; + n == r.key && (s[s.length] = { key: "selected", value: "selected" }), r.attributes && (s = s.concat(r.attributes)), i += a.getHtmlOption({ innerHTML: r.label }, s); + }), Et("select", { innerHTML: i }, e); +}, getHtmlOption: function(t, e) { + return Et("option", t, e); +}, getHtmlButton: function(t, e) { + return Et("button", t, e); +}, getHtmlDiv: function(t, e) { + return Et("div", t, e); +}, getHtmlLabel: function(t, e) { + return Et("label", t, e); +}, getHtmlInput: function(t) { + return ""; +} }; +function Et(t, e, n) { + return e = e || [], "<" + t + $n(n || []) + ">" + (e.innerHTML || "") + ""; +} +function $n(t) { + var e = ""; + return vt(t, function(n) { + e += " " + n.key + "='" + n.value + "'"; + }), e; +} +function Vt(t) { + const e = ut(); + function n() { + return e.apply(this, arguments) || this; + } + return B(n, e), n.prototype.render = function(i) { + const a = i.height ? `height:${i.height}px;` : ""; + let r = `
`; + return r += xn.getHtmlSelect(i.options, [{ key: "style", value: "width:100%;" }, { key: "title", value: i.name }]), r += "
", r; + }, n.prototype.set_value = function(i, a, r, s) { + var o = i.firstChild; + !o._dhx_onchange && s.onchange && (o.onchange = s.onchange, o._dhx_onchange = !0), a === void 0 && (a = (o.options[0] || {}).value), o.value = a || ""; + }, n.prototype.get_value = function(i) { + return i.firstChild.value; + }, n.prototype.focus = function(i) { + var a = i.firstChild; + t._focus(a, !0); + }, n; +} +function Za(t) { + var e = Vt(t); + function n() { + return e.apply(this, arguments) || this; + } + function i(a, r) { + var s = [], o = []; + r && (s = t.getTaskByTime(), a.allow_root && s.unshift({ id: t.config.root_id, text: a.root_label || "" }), s = function(u, h, g) { + var f = h.filter || function() { + return !0; + }; + u = u.slice(0); + for (var y = 0; y < u.length; y++) { + var v = u[y]; + (v.id == g || t.isChildOf(v.id, g) || f(v.id, v) === !1) && (u.splice(y, 1), y--); + } + return u; + }(s, a, r), a.sort && s.sort(a.sort)); + for (var l = a.template || t.templates.task_text, d = 0; d < s.length; d++) { + var c = l.apply(t, [s[d].start_date, s[d].end_date, s[d]]); + c === void 0 && (c = ""), o.push({ key: s[d].id, label: c }); + } + return a.options = o, a.map_to = a.map_to || "parent", t.form_blocks.select.render.apply(this, arguments); + } + return B(n, e), n.prototype.render = function(a) { + return i(a, !1); + }, n.prototype.set_value = function(a, r, s, o) { + r === 0 && (r = "0"); + var l = document.createElement("div"); + l.innerHTML = i(o, s.id); + var d = l.removeChild(l.firstChild); + return a.onselect = null, a.parentNode.replaceChild(d, a), t.form_blocks.select.set_value.apply(t, [d, r, s, o]); + }, n; +} +function Qa(t) { + var e = function() { + const _ = ut(); + function m() { + return _.apply(this, arguments) || this; + } + return B(m, _), m.prototype.render = function(p) { + let k = p.height ? `${p.height}px` : ""; + return `
`; + }, m.prototype.set_value = function(p, k) { + p.innerHTML = k || ""; + }, m.prototype.get_value = function(p) { + return p.innerHTML || ""; + }, m.prototype.focus = function() { + }, m; + }(), n = function(_) { + const m = ut(); + function p() { + return m.apply(this, arguments) || this; + } + return B(p, m), p.prototype.render = function(k) { + return `
`; + }, p.prototype.set_value = function(k, $) { + _.form_blocks.textarea._get_input(k).value = $ || ""; + }, p.prototype.get_value = function(k) { + return _.form_blocks.textarea._get_input(k).value; + }, p.prototype.focus = function(k) { + var $ = _.form_blocks.textarea._get_input(k); + _._focus($, !0); + }, p.prototype._get_input = function(k) { + return k.querySelector("textarea"); + }, p; + }(t), i = function(_) { + const m = ut(); + function p() { + return m.apply(this, arguments) || this; + } + return B(p, m), p.prototype.render = function(k) { + var $ = _.form_blocks.getTimePicker.call(this, k); + let w = "gantt_section_time"; + k.name !== "time" && (w += " gantt_section_" + k.name); + var x = "
"; + return x += $, k.single_date ? ($ = _.form_blocks.getTimePicker.call(this, k, !0), x += "") : x += "  –  ", (x += $) + "
"; + }, p.prototype.set_value = function(k, $, w, x) { + var S = x, T = k.getElementsByTagName("select"), C = x._time_format_order; + if (S.auto_end_date) for (var E = function() { + I = new Date(T[C[2]].value, T[C[1]].value, T[C[0]].value, 0, 0), M = _.calculateEndDate({ start_date: I, duration: 1, task: w }), _.form_blocks._fill_lightbox_select(T, C.size, M, C, S); + }, D = 0; D < 4; D++) T[D].onchange = E; + var A = _._resolve_default_mapping(x); + typeof A == "string" && (A = { start_date: A }); + var I = w[A.start_date] || /* @__PURE__ */ new Date(), M = w[A.end_date] || _.calculateEndDate({ start_date: I, duration: 1, task: w }); + _.form_blocks._fill_lightbox_select(T, 0, I, C, S), _.form_blocks._fill_lightbox_select(T, C.size, M, C, S); + }, p.prototype.get_value = function(k, $, w) { + var x, S = k.getElementsByTagName("select"), T = w._time_format_order; + return x = _.form_blocks.getTimePickerValue(S, w), typeof _._resolve_default_mapping(w) == "string" ? x : { start_date: x, end_date: function(C, E, D) { + var A = _.form_blocks.getTimePickerValue(C, w, E.size); + return A <= D && (w.autofix_end !== !1 || w.single_date) ? _.date.add(D, _._get_timepicker_step(), "minute") : A; + }(S, T, x) }; + }, p.prototype.focus = function(k) { + _._focus(k.getElementsByTagName("select")[0]); + }, p; + }(t), a = Vt(t), r = function(_) { + var m = ut(); + function p() { + return m.apply(this, arguments) || this; + } + return B(p, m), p.prototype.render = function(k) { + const $ = k.height ? `height:${k.height}px;` : ""; + let w = `
`; + if (k.options && k.options.length) for (var x = 0; x < k.options.length; x++) w += ""; + else k.single_value = !0, w += ""; + return w += "
", w; + }, p.prototype.set_value = function(k, $, w, x) { + var S = Array.prototype.slice.call(k.querySelectorAll("input[type=checkbox]")); + !k._dhx_onchange && x.onchange && (k.onchange = x.onchange, k._dhx_onchange = !0), x.single_value ? S[0].checked = !!$ : vt(S, function(T) { + T.checked = !!$ && $.indexOf(T.value) >= 0; + }); + }, p.prototype.get_value = function(k, $, w) { + return w.single_value ? k.querySelector("input[type=checkbox]").checked : function(x, S) { + if (x.map) return x.map(S); + for (var T = x.slice(), C = [], E = 0; E < T.length; E++) C.push(S(T[E], E)); + return C; + }(Array.prototype.slice.call(k.querySelectorAll("input[type=checkbox]:checked")), function(x) { + return x.value; + }); + }, p.prototype.focus = function(k) { + _._focus(k.querySelector("input[type=checkbox]")); + }, p; + }(t), s = function(_) { + const m = ut(); + function p() { + return m.apply(this, arguments) || this; + } + return B(p, m), p.prototype.render = function(k) { + const $ = k.height ? `${k.height}px` : ""; + let w = `
`; + if (k.options && k.options.length) for (var x = 0; x < k.options.length; x++) w += ""; + return w += "
", w; + }, p.prototype.set_value = function(k, $, w, x) { + var S; + x.options && x.options.length && (S = k.querySelector("input[type=radio][value='" + $ + "']") || k.querySelector("input[type=radio][value='" + x.default_value + "']")) && (!k._dhx_onchange && x.onchange && (k.onchange = x.onchange, k._dhx_onchange = !0), S.checked = !0); + }, p.prototype.get_value = function(k, $) { + var w = k.querySelector("input[type=radio]:checked"); + return w ? w.value : ""; + }, p.prototype.focus = function(k) { + _._focus(k.querySelector("input[type=radio]")); + }, p; + }(t), o = function(_) { + var m = ut(); + function p() { + return m.apply(this, arguments) || this; + } + function k(x) { + return x.formatter || new Nt(); + } + function $(x, S) { + var T = x.getElementsByTagName("select"), C = S._time_format_order, E = 0, D = 0; + if (_.defined(C[3])) { + var A = T[C[3]], I = parseInt(A.value, 10); + isNaN(I) && A.hasAttribute("data-value") && (I = parseInt(A.getAttribute("data-value"), 10)), E = Math.floor(I / 60), D = I % 60; + } + return new Date(T[C[2]].value, T[C[1]].value, T[C[0]].value, E, D); + } + function w(x, S) { + var T = x.getElementsByTagName("input")[1]; + return (T = k(S).parse(T.value)) && !window.isNaN(T) || (T = 1), T < 0 && (T *= -1), T; + } + return B(p, m), p.prototype.render = function(x) { + var S = "
" + _.form_blocks.getTimePicker.call(this, x) + "
", T = " " + _.locale.labels[_.config.duration_unit + "s"] + " ", C = x.single_date ? " style='display:none'" : "", E = x.readonly ? " disabled='disabled'" : "", D = _._waiAria.lightboxDurationInputAttrString(x), A = "gantt_duration_value"; + x.formatter && (T = "", A += " gantt_duration_value_formatted"); + var I = "
" + T + "
"; + let M = "gantt_section_time gantt_section_duration"; + return x.name !== "time" && (M += " gantt_section_" + x.name), "
" + S + " " + I + "
"; + }, p.prototype.set_value = function(x, S, T, C) { + var E, D, A, I, M = x.getElementsByTagName("select"), N = x.getElementsByTagName("input"), P = N[1], H = [N[0], N[2]], V = x.getElementsByTagName("span")[0], ht = C._time_format_order; + function O() { + var Y = $.call(_, x, C), z = w.call(_, x, C), U = _.calculateEndDate({ start_date: Y, duration: z, task: T }), St = _.templates.task_end_date || _.templates.task_date; + V.innerHTML = St(U); + } + function K(Y) { + var z = P.value; + z = k(C).parse(z), window.isNaN(z) && (z = 0), (z += Y) < 1 && (z = 1), P.value = k(C).format(z), O(); + } + H[0].onclick = _.bind(function() { + K(-1 * _.config.duration_step); + }, this), H[1].onclick = _.bind(function() { + K(1 * _.config.duration_step); + }, this), M[0].onchange = O, M[1].onchange = O, M[2].onchange = O, M[3] && (M[3].onchange = O), P.onkeydown = _.bind(function(Y) { + var z; + return (z = (Y = Y || window.event).charCode || Y.keyCode || Y.which) == _.constants.KEY_CODES.DOWN ? (K(-1 * _.config.duration_step), !1) : z == _.constants.KEY_CODES.UP ? (K(1 * _.config.duration_step), !1) : void window.setTimeout(O, 1); + }, this), P.onchange = _.bind(O, this), typeof (E = _._resolve_default_mapping(C)) == "string" && (E = { start_date: E }), D = T[E.start_date] || /* @__PURE__ */ new Date(), A = T[E.end_date] || _.calculateEndDate({ start_date: D, duration: 1, task: T }), I = Math.round(T[E.duration]) || _.calculateDuration({ start_date: D, end_date: A, task: T }), I = k(C).format(I), _.form_blocks._fill_lightbox_select(M, 0, D, ht, C), P.value = I, O(); + }, p.prototype.get_value = function(x, S, T) { + var C = $(x, T), E = w(x, T), D = _.calculateEndDate({ start_date: C, duration: E, task: S }); + return typeof _._resolve_default_mapping(T) == "string" ? C : { start_date: C, end_date: D, duration: E }; + }, p.prototype.focus = function(x) { + _._focus(x.getElementsByTagName("select")[0]); + }, p; + }(t), l = Za(t), d = Vt(t), c = function(_) { + var m = ut(); + function p() { + return m.apply(this, arguments) || this; + } + function k(w) { + return !w || w === _.config.constraint_types.ASAP || w === _.config.constraint_types.ALAP; + } + function $(w, x) { + for (var S = k(x), T = 0; T < w.length; T++) w[T].disabled = S; + } + return B(p, m), p.prototype.render = function(w) { + const x = w.height ? `height:${w.height}px;` : ""; + let S = `
`; + var T = []; + for (var C in _.config.constraint_types) T.push({ key: _.config.constraint_types[C], label: _.locale.labels[_.config.constraint_types[C]] }); + return w.options = w.options || T, S += "" + xn.getHtmlSelect(w.options, [{ key: "data-type", value: "constraint-type" }]) + "", S += "", S += "
", S; + }, p.prototype.set_value = function(w, x, S, T) { + var C = w.querySelector("[data-constraint-type-select] select"), E = w.querySelectorAll("[data-constraint-time-select] select"), D = T._time_format_order, A = _._resolve_default_mapping(T); + C._eventsInitialized || (C.addEventListener("change", function(N) { + $(E, N.target.value); + }), C._eventsInitialized = !0); + var I = S[A.constraint_date] || /* @__PURE__ */ new Date(); + _.form_blocks._fill_lightbox_select(E, 0, I, D, T); + var M = S[A.constraint_type] || _.getConstraintType(S); + C.value = M, $(E, M); + }, p.prototype.get_value = function(w, x, S) { + var T = w.querySelector("[data-constraint-type-select] select"), C = w.querySelectorAll("[data-constraint-time-select] select"), E = T.value, D = null; + return k(E) || (D = _.form_blocks.getTimePickerValue(C, S)), { constraint_type: E, constraint_date: D }; + }, p.prototype.focus = function(w) { + _._focus(w.querySelector("select")); + }, p; + }(t), u = function(_) { + const m = Vt(_); + function p() { + return m.apply(this, arguments) || this; + } + return B(p, m), p.prototype.render = function(k) { + var $ = _.config.types, w = _.locale.labels, x = [], S = k.filter || function(E, D) { + return !$.placeholder || D !== $.placeholder; + }; + for (var T in $) !S(T, $[T]) == 0 && x.push({ key: $[T], label: w["type_" + T] }); + k.options = x; + var C = k.onchange; + return k.onchange = function() { + _._lightbox_current_type = this.value, _.changeLightboxType(this.value), typeof C == "function" && C.apply(this, arguments); + }, m.prototype.render.apply(this, arguments); + }, p; + }(t), h = function(_) { + var m = ut(); + function p() { + return m.apply(this, arguments) || this; + } + function k(S) { + return S.formatter || new Nt(); + } + function $(S, T, C, E) { + const D = "
" + _.form_blocks.getTimePicker.call(_, E) + "
"; + let A = " " + _.locale.labels[_.config.duration_unit + "s"] + " "; + const I = E.single_date ? " style='display:none'" : "", M = E.readonly ? " disabled='disabled'" : "", N = _._waiAria.lightboxDurationInputAttrString(E), P = _.locale.labels.baselines_remove_button; + let H = "gantt_duration_value"; + E.formatter && (A = "", H += " gantt_duration_value_formatted"); + const V = "
" + A + "
", ht = `
${P}
`, O = document.createElement("div"); + O.className = "gantt_section_time gantt_section_duration", O.setAttribute("data-baseline-id", T.id), O.innerHTML = D + V + ht + "
", S.appendChild(O); + var K, Y, z, U = O.getElementsByTagName("select"), St = O.getElementsByTagName("input"), Tt = St[1], Te = [St[0], St[2]], wn = O.getElementsByTagName("span")[0], Sn = E._time_format_order; + function _t() { + var ct = w.call(_, O, E), q = x.call(_, O, E), Tn = _.calculateEndDate({ start_date: ct, duration: q, task: C }), Cn = _.templates.task_end_date || _.templates.task_date; + wn.innerHTML = Cn(Tn); + } + function Rt(ct) { + var q = Tt.value; + q = k(E).parse(q), window.isNaN(q) && (q = 0), (q += ct) < 1 && (q = 1), Tt.value = k(E).format(q), _t(); + } + O.querySelector(".baseline_delete_button").onclick = function(ct) { + const q = O.parentNode; + O.innerHTML = "", O.remove(), q.innerHTML === "" && (q.innerHTML = _.locale.labels.baselines_section_placeholder); + }, Te[0].onclick = _.bind(function() { + Rt(-1 * _.config.duration_step); + }, _), Te[1].onclick = _.bind(function() { + Rt(1 * _.config.duration_step); + }, _), U[0].onchange = _t, U[1].onchange = _t, U[2].onchange = _t, U[3] && (U[3].onchange = _t), Tt.onkeydown = _.bind(function(ct) { + var q; + return (q = (ct = ct || window.event).charCode || ct.keyCode || ct.which) == _.constants.KEY_CODES.DOWN ? (Rt(-1 * _.config.duration_step), !1) : q == _.constants.KEY_CODES.UP ? (Rt(1 * _.config.duration_step), !1) : void window.setTimeout(_t, 1); + }, _), Tt.onchange = _.bind(_t, _), _._resolve_default_mapping(E), K = T.start_date || /* @__PURE__ */ new Date(), Y = T.end_date || _.calculateEndDate({ start_date: K, duration: 1, task: C }), z = _.calculateDuration({ start_date: K, end_date: Y, task: C }), z = k(E).format(z), _.form_blocks._fill_lightbox_select(U, 0, K, Sn, E), Tt.value = z, _t(); + } + function w(S, T) { + var C = S.getElementsByTagName("select"), E = T._time_format_order, D = 0, A = 0; + if (_.defined(E[3])) { + var I = C[E[3]], M = parseInt(I.value, 10); + isNaN(M) && I.hasAttribute("data-value") && (M = parseInt(I.getAttribute("data-value"), 10)), D = Math.floor(M / 60), A = M % 60; + } + return new Date(C[E[2]].value, C[E[1]].value, C[E[0]].value, D, A); + } + function x(S, T) { + var C = S.getElementsByTagName("input")[1]; + return (C = k(T).parse(C.value)) && !window.isNaN(C) || (C = 1), C < 0 && (C *= -1), C; + } + return B(p, m), p.prototype.render = function(S) { + return `
`; + }, p.prototype.set_value = function(S, T, C, E) { + C.baselines ? (S.innerHTML = "", C.baselines.forEach((D) => { + $(S, D, C, E); + })) : S.innerHTML = _.locale.labels.baselines_section_placeholder; + }, p.prototype.get_value = function(S, T, C) { + const E = []; + return S.querySelectorAll("[data-baseline-id]").forEach((D) => { + const A = D.dataset.baselineId; + let I, M = _.getDatastore("baselines").getItem(A); + I = M ? _.copy(M) : { id: _.uid(), task_id: T.id, text: "Baseline 1" }, I.start_date = w(D, C), I.duration = x(D, C), I.end_date = _.calculateEndDate({ start_date: I.start_date, duration: I.duration, task: T }), E.push(I); + }), E; + }, p.prototype.button_click = function(S, T, C, E) { + if (_.callEvent("onSectionButton", [_._lightbox_id, C]) !== !1 && (T.closest(".gantt_custom_button.gantt_remove_baselines") && (E.innerHTML = _.locale.labels.baselines_section_placeholder), T.closest(".gantt_custom_button.gantt_add_baselines"))) { + E.innerHTML == _.locale.labels.baselines_section_placeholder && (E.innerHTML = ""); + const D = _.getTask(_._lightbox_id); + $(E, { id: _.uid(), task_id: D.id, text: "Baseline 1", start_date: D.start_date, end_date: D.end_date }, D, _._get_typed_lightbox_config()[S]); + } + }, p.prototype.focus = function(S) { + _._focus(S.getElementsByTagName("select")[0]); + }, p; + }(t); + t._lightbox_methods = {}, t._lightbox_template = "
 
", t._lightbox_template = `
  +
+
+ + +
`, t._lightbox_root = t.$root, t.$services.getService("state").registerProvider("lightbox", function() { + return { lightbox: t._lightbox_id }; + }), t.showLightbox = function(_) { + var m = this.getTask(_); + if (this.callEvent("onBeforeLightbox", [_])) { + var p = this.getLightbox(this.getTaskType(m.type)); + this.showCover(p), this._fill_lightbox(_, p), this._setLbPosition(p), this._waiAria.lightboxVisibleAttr(p), this.callEvent("onLightbox", [_]); + } else t.isTaskExists(_) && t.getTask(_).$new && this.$data.tasksStore._updateOrder(); + }, t._get_timepicker_step = function() { + if (this.config.round_dnd_dates) { + var _; + if (function(p) { + var k = p.$ui.getView("timeline"); + return !(!k || !k.isVisible()); + }(this)) { + var m = t.getScale(); + _ = jt(m.unit) * m.step / 60; + } + return (!_ || _ >= 1440) && (_ = this.config.time_step), _; + } + return this.config.time_step; + }, t.getLabel = function(_, m) { + for (var p = this._get_typed_lightbox_config(), k = 0; k < p.length; k++) if (p[k].map_to == _) { + for (var $ = p[k].options, w = 0; w < $.length; w++) if ($[w].key == m) return $[w].label; + } + return ""; + }, t.updateCollection = function(_, m) { + m = m.slice(0); + var p = t.serverList(_); + if (!p) return !1; + p.splice(0, p.length), p.push.apply(p, m || []), t.resetLightbox(); + }, t.getLightboxType = function() { + return this.getTaskType(this._lightbox_type); + }, t.getLightbox = function(_) { + var m, p, k, $, w, x = ""; + if (function() { + const T = t.config.csp === !0, C = !!window.Sfdc || !!window.$A || window.Aura || "$shadowResolver$" in document.body; + t._lightbox_root = T || C ? t.$root : document.body; + }(), _ === void 0 && (_ = this.getLightboxType()), !this._lightbox || this.getLightboxType() != this.getTaskType(_)) { + this._lightbox_type = this.getTaskType(_), m = document.createElement("div"), x = "gantt_cal_light", p = this._is_lightbox_timepicker(), t.config.wide_form && (x += " gantt_cal_light_wide"), p && (x += " gantt_cal_light_full"), m.className = x, m.style.visibility = "hidden", k = this._lightbox_template, k += "
", k += y(this.config.buttons_left), k += "
", k += y(this.config.buttons_right), k += "
", m.innerHTML = k, t._waiAria.lightboxAttr(m), t.config.drag_lightbox && (m.firstChild.onmousedown = t._ready_to_dnd, m.firstChild.ontouchstart = function(T) { + t._ready_to_dnd(T.touches[0]); + }, m.firstChild.onselectstart = function() { + return !1; + }, m.firstChild.style.cursor = "pointer", t._init_dnd_events()), this._lightbox && this.resetLightbox(), g(), this._cover.insertBefore(m, this._cover.firstChild), this._lightbox = m, $ = this._get_typed_lightbox_config(_), k = this._render_sections($); + var S = (w = m.querySelector("div.gantt_cal_larea")).style.overflow; + w.style.overflow = "hidden", w.innerHTML = k, function(T) { + var C, E, D, A, I, M; + for (M = 0; M < T.length; M++) C = T[M], D = t._lightbox_root.querySelector("#" + C.id), C.id && D && (E = D.querySelector("label"), (A = D.nextSibling) && (I = A.querySelector("input, select, textarea")) && (I.id = I.id || "input_" + t.uid(), C.inputId = I.id, E.setAttribute("for", C.inputId))); + }($), w.style.overflow = S, this._init_lightbox_events(this), m.style.display = "none", m.style.visibility = "visible"; + } + return this._lightbox; + }, t._render_sections = function(_) { + for (var m = "", p = 0; p < _.length; p++) { + var k = this.form_blocks[_[p].type]; + if (k) { + _[p].id = "area_" + this.uid(); + var $ = _[p].hidden ? " style='display:none'" : "", w = ""; + _[p].button && (w = "
" + this.locale.labels["button_" + _[p].button] + "
"), _[p].type == "baselines" && (w = "
" + this.locale.labels.baselines_remove_all_button + "
" + this.locale.labels.baselines_add_button + "
"), this.config.wide_form && (m += "
"), m += "
" + k.render.call(this, _[p]), m += "
"; + } + } + return m; + }, t._center_lightbox = function(_) { + t._setLbPosition(_); + }, t._setLbPosition = function(_) { + if (!_) return; + const m = t._lightbox_root || t.$root; + _.style.top = Math.max(m.offsetHeight / 2 - _.offsetHeight / 2, 0) + "px", _.style.left = Math.max(m.offsetWidth / 2 - _.offsetWidth / 2, 0) + "px"; + }, t.showCover = function(_) { + _ && (_.style.display = "block", this._setLbPosition(_)), g(), this._cover.style.display = ""; + }; + const g = function() { + t._cover || (t._cover = document.createElement("div"), t._cover.className = "gantt_cal_cover", t._cover.style.display = "none", t.event(t._cover, "mousemove", t._move_while_dnd), t.event(t._cover, "mouseup", t._finish_dnd), (t._lightbox_root || t.$root).appendChild(t._cover)); + }; + function f(_) { + for (var m in this.config.types) if (this.config.types[m] == _) return m; + return "task"; + } + function y(_, m) { + var p, k, $ = ""; + for (k = 0; k < _.length; k++) p = t.config._migrate_buttons[_[k]] ? t.config._migrate_buttons[_[k]] : _[k], $ += "
" + t.locale.labels[p] + "
"; + return $; + } + function v(_) { + var m, p; + return _.time_format ? _.time_format : (p = ["%d", "%m", "%Y"], jt((m = t.getScale()) ? m.unit : t.config.duration_unit) < jt("day") && p.push("%H:%i"), p); + } + function b(_, m, p) { + var k, $, w, x, S, T, C = ""; + switch (p.timeFormat[m]) { + case "%Y": + for (_._time_format_order[2] = m, _._time_format_order.size++, _.year_range && (isNaN(_.year_range) ? _.year_range.push && (w = _.year_range[0], x = _.year_range[1]) : k = _.year_range), k = k || 10, $ = $ || Math.floor(k / 2), w = w || p.date.getFullYear() - $, x = x || t.getState().max_date.getFullYear() + $, S = w; S < x; S++) C += ""; + break; + case "%m": + for (_._time_format_order[1] = m, _._time_format_order.size++, S = 0; S < 12; S++) C += ""; + break; + case "%d": + for (_._time_format_order[0] = m, _._time_format_order.size++, S = 1; S < 32; S++) C += ""; + break; + case "%H:%i": + for (_._time_format_order[3] = m, _._time_format_order.size++, S = p.first, T = p.date.getDate(), _._time_values = []; S < p.last; ) C += "", _._time_values.push(S), p.date.setTime(p.date.valueOf() + 60 * t._get_timepicker_step() * 1e3), S = 24 * (p.date.getDate() != T ? 1 : 0) * 60 + 60 * p.date.getHours() + p.date.getMinutes(); + } + return C; + } + t._init_lightbox_events = function() { + t.lightbox_events = {}, t.lightbox_events.gantt_save_btn = function() { + t._save_lightbox(); + }, t.lightbox_events.gantt_delete_btn = function() { + t._lightbox_current_type = null, t.callEvent("onLightboxDelete", [t._lightbox_id]) && (t.isTaskExists(t._lightbox_id) ? t.$click.buttons.delete(t._lightbox_id) : t.hideLightbox()); + }, t.lightbox_events.gantt_cancel_btn = function() { + t._cancel_lightbox(); + }, t.lightbox_events.default = function(_, m) { + if (m.getAttribute("data-dhx-button")) t.callEvent("onLightboxButton", [m.className, m, _]); + else { + var p, k, $ = Z(m); + if ($.indexOf("gantt_custom_button") != -1) if ($.indexOf("gantt_custom_button_") != -1) for (p = m.parentNode.getAttribute("data-index"), k = m; k && Z(k).indexOf("gantt_cal_lsection") == -1; ) k = k.parentNode; + else p = m.getAttribute("data-index"), k = m.parentNode, m = m.firstChild; + var w = t._get_typed_lightbox_config(); + p && (p *= 1, t.form_blocks[w[1 * p].type].button_click(p, m, k, k.nextSibling)); + } + }, this.event(t.getLightbox(), "click", function(_) { + _.target.closest(".gantt_cal_ltitle_close_btn") && t._cancel_lightbox(); + var m = kt(_), p = Z(m); + return p || (p = Z(m = m.previousSibling)), m && p && p.indexOf("gantt_btn_set") === 0 && (p = Z(m = m.firstChild)), !(!m || !p) && (t.defined(t.lightbox_events[m.className]) ? t.lightbox_events[m.className] : t.lightbox_events.default)(_, m); + }), t.getLightbox().onkeydown = function(_) { + var m = _ || window.event, p = _.target || _.srcElement, k = Z(p).indexOf("gantt_btn_set") > -1; + switch ((_ || m).keyCode) { + case t.constants.KEY_CODES.SPACE: + if ((_ || m).shiftKey) return; + k && p.click && p.click(); + break; + case t.keys.edit_save: + if ((_ || m).shiftKey) return; + k && p.click ? p.click() : t._save_lightbox(); + break; + case t.keys.edit_cancel: + t._cancel_lightbox(); + } + }; + }, t._cancel_lightbox = function() { + var _ = this.getLightboxValues(); + t._lightbox_current_type = null, this.callEvent("onLightboxCancel", [this._lightbox_id, _.$new]), t.isTaskExists(_.id) && _.$new && (this.silent(function() { + t.$data.tasksStore.removeItem(_.id), t._update_flags(_.id, null); + }), this.refreshData()), this.hideLightbox(); + }, t._save_lightbox = function() { + var _ = this.getLightboxValues(); + t._lightbox_current_type = null, this.callEvent("onLightboxSave", [this._lightbox_id, _, !!_.$new]) && (t.$data.tasksStore._skipTaskRecalculation = "lightbox", _.$new ? (delete _.$new, this.addTask(_, _.parent, this.getTaskIndex(_.id))) : this.isTaskExists(_.id) && (this.mixin(this.getTask(_.id), _, !0), this.refreshTask(_.id), this.updateTask(_.id)), t.$data.tasksStore._skipTaskRecalculation = !1, this.refreshData(), this.hideLightbox()); + }, t._resolve_default_mapping = function(_) { + var m = _.map_to; + return { time: !0, time_optional: !0, duration: !0, duration_optional: !0 }[_.type] ? _.map_to == "auto" ? m = { start_date: "start_date", end_date: "end_date", duration: "duration" } : typeof _.map_to == "string" && (m = { start_date: _.map_to }) : _.type === "constraint" && (_.map_to && typeof _.map_to != "string" || (m = { constraint_type: "constraint_type", constraint_date: "constraint_date" })), m; + }, t.getLightboxValues = function() { + var _ = {}; + t.isTaskExists(this._lightbox_id) && (_ = this.mixin({}, this.getTask(this._lightbox_id))); + for (var m = this._get_typed_lightbox_config(), p = 0; p < m.length; p++) { + var k = t._lightbox_root.querySelector("#" + m[p].id); + k = k && k.nextSibling; + var $ = this.form_blocks[m[p].type]; + if ($) { + var w = $.get_value.call(this, k, _, m[p]), x = t._resolve_default_mapping(m[p]); + if (typeof x == "string" && x != "auto") _[x] = w; + else if (typeof x == "object") for (var S in x) x[S] && (_[x[S]] = w[S]); + } + } + return t._lightbox_current_type && (_.type = t._lightbox_current_type), _; + }, t.hideLightbox = function() { + var _ = this.getLightbox(); + _ && (_.style.display = "none"), this._waiAria.lightboxHiddenAttr(_), this._lightbox_id = null, this.hideCover(_), this.resetLightbox(), this.callEvent("onAfterLightbox", []); + }, t.hideCover = function(_) { + _ && (_.style.display = "none"), this._cover && this._cover.parentNode.removeChild(this._cover), this._cover = null; + }, t.resetLightbox = function() { + t._lightbox && !t._custom_lightbox && t._lightbox.remove(), t._lightbox = null; + }, t._set_lightbox_values = function(_, m) { + var p = _, k = m.getElementsByTagName("span"), $ = []; + t.templates.lightbox_header ? ($.push(""), $.push(t.templates.lightbox_header(p.start_date, p.end_date, p)), k[1].innerHTML = "", k[2].innerHTML = t.templates.lightbox_header(p.start_date, p.end_date, p)) : ($.push(this.templates.task_time(p.start_date, p.end_date, p)), $.push(String(this.templates.task_text(p.start_date, p.end_date, p) || "").substr(0, 70)), k[1].innerHTML = this.templates.task_time(p.start_date, p.end_date, p), k[2].innerHTML = String(this.templates.task_text(p.start_date, p.end_date, p) || "").substr(0, 70)), k[1].innerHTML = $[0], k[2].innerHTML = $[1], t._waiAria.lightboxHeader(m, $.join(" ")); + for (var w = this._get_typed_lightbox_config(this.getLightboxType()), x = 0; x < w.length; x++) { + var S = w[x]; + if (this.form_blocks[S.type]) { + var T = t._lightbox_root.querySelector("#" + S.id).nextSibling, C = this.form_blocks[S.type], E = t._resolve_default_mapping(w[x]), D = this.defined(p[E]) ? p[E] : S.default_value; + C.set_value.call(t, T, D, p, S), S.focus && C.focus.call(t, T); + } + } + t.isTaskExists(_.id) && (t._lightbox_id = _.id); + }, t._fill_lightbox = function(_, m) { + var p = this.getTask(_); + this._set_lightbox_values(p, m); + }, t.getLightboxSection = function(_) { + for (var m = this._get_typed_lightbox_config(), p = 0; p < m.length && m[p].name != _; p++) ; + var k = m[p]; + if (!k) return null; + this._lightbox || this.getLightbox(); + var $ = t._lightbox_root.querySelector("#" + k.id), w = $.nextSibling, x = { section: k, header: $, node: w, getValue: function(T) { + return t.form_blocks[k.type].get_value.call(t, w, T || {}, k); + }, setValue: function(T, C) { + return t.form_blocks[k.type].set_value.call(t, w, T, C || {}, k); + } }, S = this._lightbox_methods["get_" + k.type + "_control"]; + return S ? S(x) : x; + }, t._lightbox_methods.get_template_control = function(_) { + return _.control = _.node, _; + }, t._lightbox_methods.get_select_control = function(_) { + return _.control = _.node.getElementsByTagName("select")[0], _; + }, t._lightbox_methods.get_textarea_control = function(_) { + return _.control = _.node.getElementsByTagName("textarea")[0], _; + }, t._lightbox_methods.get_time_control = function(_) { + return _.control = _.node.getElementsByTagName("select"), _; + }, t._init_dnd_events = function() { + var _ = t._lightbox_root; + this.event(_, "mousemove", t._move_while_dnd), this.event(_, "mouseup", t._finish_dnd), this.event(_, "touchmove", function(m) { + t._move_while_dnd(m.touches[0]); + }), this.event(_, "touchend", function(m) { + t._finish_dnd(m.touches[0]); + }); + }, t._move_while_dnd = function(_) { + if (t._dnd_start_lb) { + document.gantt_unselectable || (t._lightbox_root.className += " gantt_unselectable", document.gantt_unselectable = !0); + var m = t.getLightbox(), p = [_.pageX, _.pageY]; + m.style.top = t._lb_start[1] + p[1] - t._dnd_start_lb[1] + "px", m.style.left = t._lb_start[0] + p[0] - t._dnd_start_lb[0] + "px"; + } + }, t._ready_to_dnd = function(_) { + var m = t.getLightbox(); + t._lb_start = [m.offsetLeft, m.offsetTop], t._dnd_start_lb = [_.pageX, _.pageY]; + }, t._finish_dnd = function() { + t._lb_start && (t._lb_start = t._dnd_start_lb = !1, t._lightbox_root.className = t._lightbox_root.className.replace(" gantt_unselectable", ""), document.gantt_unselectable = !1); + }, t._focus = function(_, m) { + if (_ && _.focus && !t.config.touch) try { + m && _.select && _.select(), _.focus(); + } catch { + } + }, t.form_blocks = { getTimePicker: function(_, m) { + var p, k, $, w = "", x = this.config, S = { first: 0, last: 1440, date: this.date.date_part(new Date(t._min_date.valueOf())), timeFormat: v(_) }; + for (_._time_format_order = { size: 0 }, t.config.limit_time_select && (S.first = 60 * x.first_hour, S.last = 60 * x.last_hour + 1, S.date.setHours(x.first_hour)), p = 0; p < S.timeFormat.length; p++) p > 0 && (w += " "), (k = b(_, p, S)) && ($ = t._waiAria.lightboxSelectAttrString(S.timeFormat[p]), w += ""); + return w; + }, getTimePickerValue: function(_, m, p) { + var k, $ = m._time_format_order, w = 0, x = 0, S = p || 0; + return t.defined($[3]) && (k = parseInt(_[$[3] + S].value, 10), w = Math.floor(k / 60), x = k % 60), new Date(_[$[2] + S].value, _[$[1] + S].value, _[$[0] + S].value, w, x); + }, _fill_lightbox_select: function(_, m, p, k) { + if (_[m + k[0]].value = p.getDate(), _[m + k[1]].value = p.getMonth(), _[m + k[2]].value = p.getFullYear(), t.defined(k[3])) { + var $ = 60 * p.getHours() + p.getMinutes(); + $ = Math.round($ / t._get_timepicker_step()) * t._get_timepicker_step(); + var w = _[m + k[3]]; + w.value = $, w.setAttribute("data-value", $); + } + }, template: new e(), textarea: new n(), select: new a(), time: new i(), duration: new o(), parent: new l(), radio: new s(), checkbox: new r(), resources: new d(), constraint: new c(), baselines: new h(), typeselect: new u() }, t._is_lightbox_timepicker = function() { + for (var _ = this._get_typed_lightbox_config(), m = 0; m < _.length; m++) if (_[m].name == "time" && _[m].type == "time") return !0; + return !1; + }, t._simple_confirm = function(_, m, p, k) { + if (!_) return p(); + var $ = { text: _ }; + m && ($.title = m), k && ($.ok = k), p && ($.callback = function(w) { + w && p(); + }), t.confirm($); + }, t._get_typed_lightbox_config = function(_) { + _ === void 0 && (_ = this.getLightboxType()); + var m = f.call(this, _); + return t.config.lightbox[m + "_sections"] ? t.config.lightbox[m + "_sections"] : t.config.lightbox.sections; + }, t._silent_redraw_lightbox = function(_) { + var m = this.getLightboxType(); + if (this.getState().lightbox) { + var p = this.getState().lightbox, k = this.getLightboxValues(), $ = this.copy(this.getTask(p)); + this.resetLightbox(); + var w = this.mixin($, k, !0), x = this.getLightbox(_ || void 0); + this._set_lightbox_values(w, x), this.showCover(x); + } else this.resetLightbox(), this.getLightbox(_ || void 0); + this.callEvent("onLightboxChange", [m, this.getLightboxType()]); + }; +} +function tr(t) { + if (!pt.isNode) { + t.utils = { arrayFind: Ln, dom: rn }; + var e = we(); + t.event = e.attach, t.eventRemove = e.detach, t._eventRemoveAll = e.detachAll, t._createDomEventScope = e.extend, L(t, la(t)); + var n = Va.init(t); + t.$ui = n.factory, t.$ui.layers = n.render, t.$mouseEvents = n.mouseEvents, t.$services.setService("mouseEvents", function() { + return t.$mouseEvents; + }), t.mixin(t, n.layersApi), function(i) { + delete i.addTaskLayer, delete i.addLinkLayer; + }(t), t.$services.setService("layers", function() { + return n.layersService; + }), t.mixin(t, /* @__PURE__ */ function() { + function i(u) { + return u.$ui.getView("timeline"); + } + function a(u) { + return u.$ui.getView("grid"); + } + function r(u) { + var h = i(u); + if (h && !h.$config.hidden) return h; + var g = a(u); + return g && !g.$config.hidden ? g : null; + } + function s(u) { + var h = null, g = !1; + return [".gantt_drag_marker.gantt_grid_resize_area", ".gantt_drag_marker .gantt_row.gantt_row_task", ".gantt_drag_marker.gantt_grid_dnd_marker"].forEach(function(f) { + g = g || !!document.querySelector(f); + }), (h = g ? a(u) : r(u)) ? l(u, h, "scrollY") : null; + } + function o(u) { + var h = r(u); + return h && h.id != "grid" ? l(u, h, "scrollX") : null; + } + function l(u, h, g) { + var f = h.$config[g]; + return u.$ui.getView(f); + } + var d = "DEFAULT_VALUE"; + function c(u, h, g, f) { + var y = u(this); + return y && y.isVisible() ? y[h].apply(y, g) : f ? f() : d; + } + return { getColumnIndex: function(u) { + var h = c.call(this, a, "getColumnIndex", [u]); + return h === d ? 0 : h; + }, dateFromPos: function(u) { + var h = c.call(this, i, "dateFromPos", Array.prototype.slice.call(arguments)); + return h === d ? this.getState().min_date : h; + }, posFromDate: function(u) { + var h = c.call(this, i, "posFromDate", [u]); + return h === d ? 0 : h; + }, getRowTop: function(u) { + var h = this, g = c.call(h, i, "getRowTop", [u], function() { + return c.call(h, a, "getRowTop", [u]); + }); + return g === d ? 0 : g; + }, getTaskTop: function(u) { + var h = this, g = c.call(h, i, "getItemTop", [u], function() { + return c.call(h, a, "getItemTop", [u]); + }); + return g === d ? 0 : g; + }, getTaskPosition: function(u, h, g) { + var f = c.call(this, i, "getItemPosition", [u, h, g]); + return f === d ? { left: 0, top: this.getTaskTop(u.id), height: this.getTaskBarHeight(u.id), width: 0 } : f; + }, getTaskBarHeight: function(u, h) { + var g = this, f = c.call(g, i, "getBarHeight", [u, h], function() { + return c.call(g, a, "getItemHeight", [u]); + }); + return f === d ? 0 : f; + }, getTaskHeight: function(u) { + var h = this, g = c.call(h, i, "getItemHeight", [u], function() { + return c.call(h, a, "getItemHeight", [u]); + }); + return g === d ? 0 : g; + }, columnIndexByDate: function(u) { + var h = c.call(this, i, "columnIndexByDate", [u]); + return h === d ? 0 : h; + }, roundTaskDates: function() { + c.call(this, i, "roundTaskDates", []); + }, getScale: function() { + var u = c.call(this, i, "getScale", []); + return u === d ? null : u; + }, getTaskNode: function(u) { + var h = i(this); + if (h && h.isVisible()) { + var g = h._taskRenderer.rendered[u]; + if (!g) { + var f = h.$config.item_attribute; + g = h.$task_bars.querySelector("[" + f + "='" + u + "']"); + } + return g || null; + } + return null; + }, getLinkNode: function(u) { + var h = i(this); + return h.isVisible() ? h._linkRenderer.rendered[u] : null; + }, scrollTo: function(u, h) { + var g = s(this), f = o(this), y = { position: 0 }, v = { position: 0 }; + g && (v = g.getScrollState()), f && (y = f.getScrollState()); + var b = f && 1 * u == u, _ = g && 1 * h == h; + if (b && _) for (var m = g._getLinkedViews(), p = f._getLinkedViews(), k = [], $ = 0; $ < m.length; $++) for (var w = 0; w < p.length; w++) m[$].$config.id && p[w].$config.id && m[$].$config.id === p[w].$config.id && k.push(m[$].$config.id); + b && (k && k.forEach((function(T) { + this.$ui.getView(T).$config.$skipSmartRenderOnScroll = !0; + }).bind(this)), f.scroll(u), k && k.forEach((function(T) { + this.$ui.getView(T).$config.$skipSmartRenderOnScroll = !1; + }).bind(this))), _ && g.scroll(h); + var x = { position: 0 }, S = { position: 0 }; + g && (x = g.getScrollState()), f && (S = f.getScrollState()), this.callEvent("onGanttScroll", [y.position, v.position, S.position, x.position]); + }, showDate: function(u) { + var h = this.posFromDate(u), g = Math.max(h - this.config.task_scroll_offset, 0); + this.scrollTo(g); + }, showTask: function(u) { + var h = this.getTaskPosition(this.getTask(u)), g = h.left; + this.config.rtl && (g = h.left + h.width); + var f, y = Math.max(g - this.config.task_scroll_offset, 0), v = this._scroll_state().y; + f = v ? h.top - (v - this.getTaskBarHeight(u)) / 2 : h.top, this.scrollTo(y, f); + var b = a(this), _ = i(this); + b && _ && b.$config.scrollY != _.$config.scrollY && l(this, b, "scrollY").scrollTo(null, f); + }, _scroll_state: function() { + var u = { x: !1, y: !1, x_pos: 0, y_pos: 0, scroll_size: this.config.scroll_size + 1, x_inner: 0, y_inner: 0 }, h = s(this), g = o(this); + if (g) { + var f = g.getScrollState(); + f.visible && (u.x = f.size, u.x_inner = f.scrollSize), u.x_pos = f.position || 0; + } + if (h) { + var y = h.getScrollState(); + y.visible && (u.y = y.size, u.y_inner = y.scrollSize), u.y_pos = y.position || 0; + } + return u; + }, getScrollState: function() { + var u = this._scroll_state(); + return { x: u.x_pos, y: u.y_pos, inner_width: u.x, inner_height: u.y, width: u.x_inner, height: u.y_inner }; + }, getLayoutView: function(u) { + return this.$ui.getView(u); + }, scrollLayoutCell: function(u, h, g) { + const f = this.$ui.getView(u); + if (!f) return !1; + if (h !== null) { + const y = this.$ui.getView(f.$config.scrollX); + y && y.scrollTo(h, null); + } + if (g !== null) { + const y = this.$ui.getView(f.$config.scrollY); + y && y.scrollTo(null, g); + } + } }; + }()), function(i) { + i.resetSkin || (i.resetSkin = function() { + this.skin = "", se(!0, this); + }, i.skins = {}, i.attachEvent("onGanttLayoutReady", function() { + se(!1, this), r(); + })), i._addThemeClass = function() { + document.documentElement.setAttribute("data-gantt-theme", i.skin); + }, i.setSkin = function(s) { + this.skin = s, i._addThemeClass(), r(), i.$root && (se(!0, i), this.render()); + }; + let a = null; + function r() { + const s = i.$root; + a && clearInterval(a), s && (a = setInterval(() => { + const o = getComputedStyle(s).getPropertyValue("--dhx-gantt-theme"); + o && o !== i.skin && i.setSkin(o); + }, 100)); + } + i.attachEvent("onDestroy", function() { + clearInterval(a); + }); + }(t), function(i) { + i.skins.skyblue = { config: { grid_width: 370, row_height: 27, bar_height_padding: 4, scale_height: 27, link_line_width: 1, link_arrow_size: 8, link_radius: 2, lightbox_additional_height: 75 }, _second_column_width: 95, _third_column_width: 80 }; + }(t), function(i) { + i.skins.dark = { config: { grid_width: 390, row_height: 36, scale_height: 36, link_line_width: 2, link_arrow_size: 12, bar_height_padding: 9, lightbox_additional_height: 75 }, _second_column_width: 100, _third_column_width: 70 }; + }(t), function(i) { + i.skins.meadow = { config: { grid_width: 380, row_height: 27, scale_height: 30, link_line_width: 2, link_arrow_size: 10, bar_height_padding: 4, lightbox_additional_height: 72 }, _second_column_width: 95, _third_column_width: 80 }; + }(t), function(i) { + i.skins.terrace = { config: { grid_width: 390, row_height: 36, scale_height: 36, link_line_width: 2, link_arrow_size: 12, bar_height_padding: 9, lightbox_additional_height: 75 }, _second_column_width: 100, _third_column_width: 70 }; + }(t), function(i) { + i.skins.broadway = { config: { grid_width: 390, row_height: 35, scale_height: 35, link_line_width: 1, link_arrow_size: 9, bar_height_padding: 4, lightbox_additional_height: 86 }, _second_column_width: 100, _third_column_width: 80, _lightbox_template: "
 
", _config_buttons_left: {}, _config_buttons_right: { gantt_delete_btn: "icon_delete", gantt_save_btn: "icon_save" } }; + }(t), function(i) { + i.skins.material = { config: { grid_width: 411, row_height: 34, scale_height: 36, link_line_width: 2, link_arrow_size: 12, bar_height_padding: 9, lightbox_additional_height: 80 }, _second_column_width: 110, _third_column_width: 75, _redefine_lightbox_buttons: { buttons_left: ["dhx_delete_btn"], buttons_right: ["dhx_cancel_btn", "dhx_save_btn"] } }, i.attachEvent("onAfterTaskDrag", function(a) { + var r = i.getTaskNode(a); + r && (r.className += " gantt_drag_animation", setTimeout(function() { + var s = r.className.indexOf(" gantt_drag_animation"); + s > -1 && (r.className = r.className.slice(0, s)); + }, 200)); + }); + }(t), function(i) { + i.skins.contrast_black = { config: { grid_width: 390, row_height: 35, scale_height: 35, link_line_width: 2, link_arrow_size: 12, lightbox_additional_height: 75 }, _second_column_width: 100, _third_column_width: 80 }; + }(t), function(i) { + i.skins.contrast_white = { config: { grid_width: 390, row_height: 35, scale_height: 35, link_line_width: 2, link_arrow_size: 12, lightbox_additional_height: 75 }, _second_column_width: 100, _third_column_width: 80 }; + }(t), function(i) { + i.ext || (i.ext = {}); + for (var a = [Ua, qa, Ga], r = 0; r < a.length; r++) a[r] && a[r](i); + i.ext.zoom = new Ka(i); + }(t), Xa(t), Qa(t), function(i) { + i._extend_to_optional = function(a) { + var r = a, s = { render: r.render, focus: r.focus, set_value: function(o, l, d, c) { + var u = i._resolve_default_mapping(c); + if (!d[u.start_date] || u.start_date == "start_date" && this._isAllowedUnscheduledTask(d)) { + s.disable(o, c); + var h = {}; + for (var g in u) h[u[g]] = d[g]; + return r.set_value.call(i, o, l, h, c); + } + return s.enable(o, c), r.set_value.call(i, o, l, d, c); + }, get_value: function(o, l, d) { + return d.disabled ? { start_date: null } : r.get_value.call(i, o, l, d); + }, update_block: function(o, l) { + if (i.callEvent("onSectionToggle", [i._lightbox_id, l]), o.style.display = l.disabled ? "none" : "", l.button) { + var d = o.previousSibling.querySelector(".gantt_custom_button_label"), c = i.locale.labels, u = l.disabled ? c[l.name + "_enable_button"] : c[l.name + "_disable_button"]; + d.innerHTML = u; + } + }, disable: function(o, l) { + l.disabled = !0, s.update_block(o, l); + }, enable: function(o, l) { + l.disabled = !1, s.update_block(o, l); + }, button_click: function(o, l, d, c) { + if (i.callEvent("onSectionButton", [i._lightbox_id, d]) !== !1) { + var u = i._get_typed_lightbox_config()[o]; + u.disabled ? s.enable(c, u) : s.disable(c, u); + } + } }; + return s; + }, i.form_blocks.duration_optional = i._extend_to_optional(i.form_blocks.duration), i.form_blocks.time_optional = i._extend_to_optional(i.form_blocks.time); + }(t), function(i) { + var a = new RegExp(`<(?:.| +)*?>`, "gm"), r = new RegExp(" +", "gm"); + function s(c) { + return (c + "").replace(a, " ").replace(r, " "); + } + var o = new RegExp("'", "gm"); + function l(c) { + return (c + "").replace(o, "'"); + } + for (var d in i._waiAria = { getAttributeString: function(c) { + var u = [" "]; + for (var h in c) { + var g = l(s(c[h])); + u.push(h + "='" + g + "'"); + } + return u.push(" "), u.join(" "); + }, getTimelineCellAttr: function(c) { + return i._waiAria.getAttributeString({ "aria-label": c }); + }, _taskCommonAttr: function(c, u) { + c.start_date && c.end_date && (u.setAttribute("aria-label", s(i.templates.tooltip_text(c.start_date, c.end_date, c))), c.$dataprocessor_class && u.setAttribute("aria-busy", !0)); + }, setTaskBarAttr: function(c, u) { + this._taskCommonAttr(c, u), u.setAttribute("role", "img"), !i.isReadonly(c) && i.config.drag_move && (c.id != i.getState("tasksDnd").drag_id ? u.setAttribute("aria-grabbed", !1) : u.setAttribute("aria-grabbed", !0)); + }, taskRowAttr: function(c, u) { + this._taskCommonAttr(c, u), !i.isReadonly(c) && i.config.order_branch && u.setAttribute("aria-grabbed", !1), u.setAttribute("role", "row"), u.setAttribute("aria-selected", i.isSelectedTask(c.id) ? "true" : "false"), u.setAttribute("aria-level", c.$level + 1 || 1), i.hasChild(c.id) && u.setAttribute("aria-expanded", c.$open ? "true" : "false"); + }, linkAttr: function(c, u) { + var h = i.config.links, g = c.type == h.finish_to_start || c.type == h.start_to_start, f = c.type == h.start_to_start || c.type == h.start_to_finish, y = i.locale.labels.link + " " + i.templates.drag_link(c.source, f, c.target, g); + u.setAttribute("role", "img"), u.setAttribute("aria-label", s(y)), i.isReadonly(c) && u.setAttribute("aria-readonly", !0); + }, gridSeparatorAttr: function(c) { + c.setAttribute("role", "columnheader"); + }, rowResizerAttr: function(c) { + c.setAttribute("role", "row"); + }, lightboxHiddenAttr: function(c) { + c.setAttribute("aria-hidden", "true"); + }, lightboxVisibleAttr: function(c) { + c.setAttribute("aria-hidden", "false"); + }, lightboxAttr: function(c) { + c.setAttribute("role", "dialog"), c.setAttribute("aria-hidden", "true"), c.firstChild.setAttribute("role", "heading"), c.firstChild.setAttribute("aria-level", "1"); + }, lightboxButtonAttrString: function(c) { + return this.getAttributeString({ role: "button", "aria-label": i.locale.labels[c], tabindex: "0" }); + }, lightboxHeader: function(c, u) { + c.setAttribute("aria-label", u); + }, lightboxSelectAttrString: function(c) { + var u = ""; + switch (c) { + case "%Y": + u = i.locale.labels.years; + break; + case "%m": + u = i.locale.labels.months; + break; + case "%d": + u = i.locale.labels.days; + break; + case "%H:%i": + u = i.locale.labels.hours + i.locale.labels.minutes; + } + return i._waiAria.getAttributeString({ "aria-label": u }); + }, lightboxDurationInputAttrString: function(c) { + return this.getAttributeString({ "aria-label": i.locale.labels.column_duration, "aria-valuemin": "0", role: "spinbutton" }); + }, inlineEditorAttr: function(c) { + c.setAttribute("role", "row"); + }, gridAttrString: function() { + return [" role='treegrid'", i.config.multiselect ? "aria-multiselectable='true'" : "aria-multiselectable='false'", " "].join(" "); + }, gridScaleRowAttrString: function() { + return "role='row'"; + }, gridScaleCellAttrString: function(c, u) { + var h = ""; + if (c.name == "add") h = this.getAttributeString({ role: "columnheader", "aria-label": i.locale.labels.new_task }); + else { + var g = { role: "columnheader", "aria-label": u }; + i._sort && i._sort.name == c.name && (i._sort.direction == "asc" ? g["aria-sort"] = "ascending" : g["aria-sort"] = "descending"), h = this.getAttributeString(g); + } + return h; + }, gridDataAttrString: function() { + return "role='rowgroup'"; + }, reorderMarkerAttr: function(c) { + c.setAttribute("role", "grid"), c.firstChild.removeAttribute("aria-level"), c.firstChild.setAttribute("aria-grabbed", "true"); + }, gridCellAttrString: function(c, u, h) { + var g = { role: "gridcell", "aria-label": u }; + return c.editor && !i.isReadonly(h) || (g["aria-readonly"] = !0), this.getAttributeString(g); + }, gridAddButtonAttrString: function(c) { + return this.getAttributeString({ role: "button", "aria-label": i.locale.labels.new_task }); + }, messageButtonAttrString: function(c) { + return "tabindex='0' role='button' aria-label='" + c + "'"; + }, messageInfoAttr: function(c) { + c.setAttribute("role", "alert"); + }, messageModalAttr: function(c, u) { + c.setAttribute("role", "dialog"), u && c.setAttribute("aria-labelledby", u); + }, quickInfoAttr: function(c) { + c.setAttribute("role", "dialog"); + }, quickInfoHeaderAttrString: function() { + return " role='heading' aria-level='1' "; + }, quickInfoHeader: function(c, u) { + c.setAttribute("aria-label", u); + }, quickInfoButtonAttrString: function(c) { + return i._waiAria.getAttributeString({ role: "button", "aria-label": c, tabindex: "0" }); + }, tooltipAttr: function(c) { + c.setAttribute("role", "tooltip"); + }, tooltipVisibleAttr: function(c) { + c.setAttribute("aria-hidden", "false"); + }, tooltipHiddenAttr: function(c) { + c.setAttribute("aria-hidden", "true"); + } }, i._waiAria) i._waiAria[d] = /* @__PURE__ */ function(c) { + return function() { + return i.config.wai_aria_attributes ? c.apply(this, arguments) : ""; + }; + }(i._waiAria[d]); + }(t), t.locate = function(i) { + var a = kt(i); + if (dt(a, ".gantt_task_row")) return null; + var r = arguments[1] || this.config.task_attribute, s = et(a, r); + return s ? s.getAttribute(r) : null; + }, t._locate_css = function(i, a, r) { + return ft(i, a, r); + }, t._locateHTML = function(i, a) { + return et(i, a || this.config.task_attribute); + }; + } + t.attachEvent("onParse", function() { + j(t) || t.attachEvent("onGanttRender", function() { + if (t.config.initial_scroll) { + var i = t.getTaskByIndex(0), a = i ? i.id : t.config.root_id; + t.isTaskExists(a) && t.$task && t.utils.dom.isChildOf(t.$task, t.$container) && t.showTask(a); + } + }, { once: !0 }); + }), t.attachEvent("onBeforeGanttReady", function() { + this.config.scroll_size || (this.config.scroll_size = Ze() || 15), j(t) || (this._eventRemoveAll(), this.$mouseEvents.reset(), this.resetLightbox()); + }), t.attachEvent("onGanttReady", function() { + !j(t) && t.config.rtl && t.$layout.getCellsByType("viewCell").forEach(function(i) { + var a = i.$config.scrollX; + if (a) { + var r = t.$ui.getView(a); + r && r.scrollTo(r.$config.scrollSize, 0); + } + }); + }), t.attachEvent("onGanttReady", function() { + if (!j(t)) { + var i = t.plugins(), a = { auto_scheduling: t.autoSchedule, click_drag: t.ext.clickDrag, critical_path: t.isCriticalTask, drag_timeline: t.ext.dragTimeline, export_api: t.exportToPDF, fullscreen: t.ext.fullscreen, grouping: t.groupBy, keyboard_navigation: t.ext.keyboardNavigation, marker: t.addMarker, multiselect: t.eachSelectedTask, overlay: t.ext.overlay, quick_info: t.templates.quick_info_content, tooltip: t.ext.tooltips, undo: t.undo }; + for (let r in a) a[r] && !i[r] && console.warn(`You connected the '${r}' extension via an obsolete file. +To fix it, you need to remove the obsolete file and connect the extension via the plugins method: https://docs.dhtmlx.com/gantt/api__gantt_plugins.html`); + } + }); +} +const er = ot.gantt = function(t) { + var e = oa(t); + return e.env.isNode || (tr(e), function(n) { + n.load = function(i, a, r) { + this._load_url = i, this.assert(arguments.length, "Invalid load arguments"); + var s = "json", o = null; + return arguments.length >= 3 ? (s = a, o = r) : typeof arguments[1] == "string" ? s = arguments[1] : typeof arguments[1] == "function" && (o = arguments[1]), this._load_type = s, this.callEvent("onLoadStart", [i, s]), this.ajax.get(i, n.bind(function(l) { + this.on_load(l, s), this.callEvent("onLoadEnd", [i, s]), typeof o == "function" && o.call(this); + }, this)); + }; + }(e)), e; +}(Vn); +export { + er as default, + er as gantt +}; +//# sourceMappingURL=dhtmlxgantt.es.js.map diff --git a/codebase/dhtmlxgantt.es.js.map b/codebase/dhtmlxgantt.es.js.map new file mode 100644 index 0000000..f02fbe7 --- /dev/null +++ b/codebase/dhtmlxgantt.es.js.map @@ -0,0 +1 @@ +{"version":3,"file":"dhtmlxgantt.es.js","sources":["../sources/core/ui/utils/dom_helpers.js","../sources/utils/global.js","../sources/ext/click_drag/eventsManager.ts","../sources/utils/eventable.js","../sources/utils/helpers.js","../sources/ext/click_drag/selectedRegion.ts","../sources/ext/drag_timeline/eventsManager.ts","../sources/ext/keyboard_navigation/modals.js","../sources/ext/quick_info/quickInfo.ts","../sources/utils/utils.js","../sources/core/ui/utils/dom_event_scope.js","../sources/ext/tooltip/tooltip.ts","../sources/ext/tooltip/tooltipManager.ts","../sources/ext/undo/monitor.ts","../sources/ext/undo/undo.ts","../sources/ext/extensions_gpl.ts","../sources/ext/click_drag/index.ts","../sources/ext/drag_timeline/index.ts","../sources/ext/fullscreen/index.ts","../sources/ext/keyboard_navigation.js","../sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","../sources/ext/keyboard_navigation/common/eventhandler.js","../sources/ext/keyboard_navigation/common/trap_modal_focus.js","../sources/ext/keyboard_navigation/elements/gantt_node.js","../sources/ext/keyboard_navigation/elements/nav_node.js","../sources/ext/keyboard_navigation/elements/header_cell.js","../sources/ext/keyboard_navigation/elements/task_row.js","../sources/ext/keyboard_navigation/elements/task_cell.js","../sources/ext/keyboard_navigation/core.js","../sources/ext/quick_info/index.ts","../sources/ext/tooltip/index.ts","../sources/ext/undo/index.ts","../sources/ext/marker.js","../sources/ext/multiselect.js","../sources/ext/export_api/index.ts","../sources/constants/index.js","../sources/ext/extension_manager.ts","../sources/core/common/config.ts","../sources/utils/env.js","../sources/core/common/serialize.ts","../sources/core/common/ajax.js","../sources/core/common/date_parsers/fast_version.ts","../sources/core/common/date_parsers/csp_compliant_version.ts","../sources/core/common/date.js","../node_modules/remote-client/dist/remote.es6.js","../sources/core/remote/remote_events.js","../sources/utils/timeout.js","../sources/core/common/state.js","../sources/utils/promise.js","../sources/core/facades/datastore_tasks.js","../sources/core/datastore/power_array.js","../sources/utils/placeholder_task.js","../sources/core/datastore/datastore.js","../sources/core/datastore/treedatastore.js","../sources/utils/is_headless.js","../sources/core/datastore/datastore_render.js","../sources/core/facades/datastore.js","../sources/core/datastore/select.js","../sources/core/facades/datastore_links.js","../sources/core/ui/timeline/scales.js","../sources/core/gantt_data_range.js","../sources/utils/task_tree_helpers.js","../sources/core/dataprocessor/data_processor_events.ts","../sources/core/dataprocessor/simple_storage.ts","../sources/core/dataprocessor/data_processor.ts","../sources/core/dataprocessor/extend_gantt.ts","../sources/core/dataprocessor/index.js","../sources/core/plugins/batch_update.js","../sources/core/plugins/wbs.js","../sources/core/plugins/resources.js","../sources/core/plugins/resource_assignments.js","../sources/core/plugins/new_task_placeholder.js","../sources/core/plugins/auto_task_types.js","../sources/core/common/duration_formatter_numeric.ts","../sources/core/common/link_formatter_simple.ts","../sources/core/plugins/formatters.js","../sources/core/plugins/empty_state_screen.ts","../sources/core/ui/render/baseline_helper.js","../sources/core/plugins/baselines.js","../sources/core/loading/parsing.js","../sources/core/worktime/calendar_arguments_helper.js","../sources/core/worktime/strategy/work_calendar_merger.js","../sources/core/worktime/strategy/work_unit_cache/workunit_map_cache.ts","../sources/core/worktime/strategy/work_unit_cache/workunit_object_cache.ts","../sources/core/worktime/strategy/work_unit_cache/larger_units_helper.ts","../sources/core/worktime/strategy/work_unit_cache/date_duration_cache.ts","../sources/core/worktime/strategy/calendar_strategy.js","../sources/core/worktime/strategy/work_unit_cache/index.ts","../sources/core/worktime/legacy_resource_config.js","../sources/core/worktime/calendar_manager.js","../sources/core/worktime/dynamic_resource_calendars.js","../sources/core/worktime/strategy/no_work_time.js","../sources/core/worktime/time_calculator.js","../sources/core/facades/worktime_calendars.js","../sources/core/data.js","../sources/core/ui/resize_listener.js","../sources/core/gantt_core.js","../sources/core/common/assert.js","../sources/locale/locale_ar.ts","../sources/locale/locale_be.ts","../sources/locale/locale_ca.ts","../sources/locale/locale_cn.ts","../sources/locale/locale_cs.ts","../sources/locale/locale_da.ts","../sources/locale/locale_de.ts","../sources/locale/locale_el.ts","../sources/locale/locale_en.ts","../sources/locale/locale_es.ts","../sources/locale/locale_fa.ts","../sources/locale/locale_fi.ts","../sources/locale/locale_fr.ts","../sources/locale/locale_he.ts","../sources/locale/locale_hr.ts","../sources/locale/locale_hu.ts","../sources/locale/locale_id.ts","../sources/locale/locale_it.ts","../sources/locale/locale_jp.ts","../sources/locale/locale_kr.ts","../sources/locale/locale_manager.ts","../sources/locale/locale_nb.ts","../sources/locale/locale_nl.ts","../sources/locale/locale_no.ts","../sources/locale/locale_pl.ts","../sources/locale/locale_pt.ts","../sources/locale/locale_ro.ts","../sources/locale/locale_ru.ts","../sources/locale/locale_si.ts","../sources/locale/locale_sk.ts","../sources/locale/locale_sv.ts","../sources/locale/locale_tr.ts","../sources/locale/locale_ua.ts","../sources/factory/make_instance_common.js","../sources/core/common/services.js","../sources/core/common/dnd.js","../sources/core/common/templates.js","../sources/core/datastore/datastore_hooks.js","../sources/core/plugins/index.js","../sources/core/grid_column_api.gpl.js","../sources/core/tasks.js","../sources/core/worktime/work_time.js","../sources/core/data_task_types.gpl.js","../sources/core/cached_functions.js","../sources/core/destructor.js","../sources/locale/index.ts","../sources/core/ui/message.js","../sources/core/ui/configurable.js","../sources/core/ui/ui_factory.js","../sources/core/ui/mouse.js","../sources/core/ui/render/viewport/is_in_viewport.js","../sources/core/ui/render/is_legacy_smart_render.js","../sources/core/ui/render/viewport/get_grid_row_rectangle.js","../sources/core/ui/render/viewport/get_visible_bars_range.js","../sources/core/ui/render/render_factory.js","../sources/core/ui/render/layer_engine.js","../sources/core/ui/render/viewport/get_bar_rectangle.js","../sources/core/ui/render/viewport/factory/get_visible_link_range.js","../sources/core/ui/render/viewport/get_link_rectangle.js","../sources/core/ui/render/viewport/is_link_in_viewport.js","../sources/core/ui/gantt_layers.js","../sources/core/ui/layout/cell.js","../sources/utils/extends.js","../sources/core/ui/layout/layout.js","../sources/core/ui/layout/view_layout.js","../sources/core/ui/layout/view_cell.js","../sources/core/ui/layout/scrollbar_cell.js","../sources/core/ui/row_position_mixin.js","../sources/core/ui/row_position_fixed_height.js","../sources/core/ui/timeline/tasks_canvas_render.gpl.js","../sources/core/ui/timeline/timeline.js","../sources/core/ui/timeline/timeline_layers_gpl.js","../sources/core/ui/plugins/column_grid_dnd/scrollable_grid.ts","../sources/core/ui/plugins/column_grid_dnd/column_grid_dnd.ts","../sources/core/ui/mouse_event_container.js","../sources/core/ui/grid/grid.js","../sources/core/ui/grid/grid_resize.gpl.js","../sources/core/ui/grid/task_grid_row_resize.js","../sources/core/ui/grid/editors/keyboard_mappings/default.js","../sources/core/ui/grid/editors/keyboard_mappings/keyboard_navigation.js","../sources/core/ui/grid/editors/editors/base.js","../sources/core/ui/grid/editors/editors/text.js","../sources/core/ui/grid/editors/editors/number.js","../sources/core/ui/grid/editors/editors/select.js","../sources/core/ui/grid/editors/editors/date.js","../sources/core/ui/grid/editors/editors/predecessor.js","../sources/core/ui/grid/editors/editors/duration.js","../sources/core/ui/grid/editors/linked_properties.js","../sources/core/ui/grid/editors/controller.js","../sources/core/ui/grid/editors/keyboard_mappings.js","../sources/core/ui/render/viewport/is_bar_in_viewport.js","../sources/core/ui/render/task_bar_render.js","../sources/core/ui/render/task_bar_smart_render.js","../sources/core/ui/render/dummy_layer.js","../sources/core/ui/render/viewport/get_bg_row_rectangle.js","../sources/core/ui/render/viewport/get_visible_cells_range.js","../sources/core/ui/render/viewport/is_column_visible.js","../sources/core/ui/render/prerender/task_bg_placeholder.js","../sources/core/ui/render/link_render.js","../sources/core/ui/render/viewport/is_grid_row_in_viewport.js","../sources/core/resource_timetable_builder.js","../sources/core/ui/grid/tasks_grid_dnd.js","../sources/core/ui/grid/tasks_grid_dnd_marker_helpers/drop_target.js","../sources/core/ui/grid/tasks_grid_dnd_marker_helpers/locked_level.js","../sources/core/ui/grid/tasks_grid_dnd_marker_helpers/highlight.js","../sources/core/ui/grid/tasks_grid_dnd_marker.js","../sources/core/ui/grid/tasks_grid_dnd_marker_helpers/multi_level.js","../sources/core/ui/grid/main_grid_initializer.js","../sources/core/ui/timeline/tasks_dnd.js","../sources/core/ui/timeline/links_dnd.js","../sources/core/ui/timeline/main_timeline_initializer.js","../sources/core/ui/main_layout_initializer.js","../sources/core/ui/index.js","../sources/core/ui/layout/resizer_cell.gpl.js","../sources/core/ui/render/task_grid_line_render.js","../sources/core/ui/render/task_bg_render.js","../sources/core/ui/render/task_rollup_render.js","../sources/core/ui/render/resource_matrix_render.js","../sources/core/ui/render/task_grid_row_resize_render.js","../sources/core/ui/skin.js","../sources/core/ui/plugins/autoscroll.js","../sources/core/ui/plugins/jquery_hooks.js","../sources/core/ui/plugins/dhtmlx_hooks.js","../sources/core/ui/plugins/timeline_zoom.ts","../sources/core/ui/touch.js","../sources/core/ui/lightbox/controls/base_control.js","../sources/core/ui/utils/html_helpers.js","../sources/core/ui/lightbox/controls/select_control.js","../sources/core/ui/lightbox/controls/parent_control.js","../sources/core/ui/lightbox/index.js","../sources/core/ui/lightbox/controls/template_control.js","../sources/core/ui/lightbox/controls/textarea_control.js","../sources/core/ui/lightbox/controls/time_control.js","../sources/core/ui/lightbox/controls/checkbox_control.js","../sources/core/ui/lightbox/controls/radio_control.js","../sources/core/ui/lightbox/controls/duration_control.js","../sources/core/ui/lightbox/controls/constraint_control.js","../sources/core/ui/lightbox/controls/typeselect_control.js","../sources/core/ui/lightbox/controls/baseline_control.js","../sources/core/ui_core.js","../sources/core/data_task_layers.gpl.js","../sources/core/facades/layout.js","../sources/css/skins/skyblue.js","../sources/css/skins/dark.js","../sources/css/skins/meadow.js","../sources/css/skins/terrace.js","../sources/css/skins/broadway.js","../sources/css/skins/material.js","../sources/css/skins/contrast_black.js","../sources/css/skins/contrast_white.js","../sources/core/ui/plugins/index.js","../sources/core/ui/lightbox/lightbox_optional_time.js","../sources/core/ui/wai_aria.js","../sources/dhtmlxgantt.gpl.ts","../sources/factory/make_instance_web.js","../sources/core/loading/ajax_loading.js"],"sourcesContent":["//returns position of html element on the page\r\nfunction getNodePosition(elem) {\r\n\tvar top=0, left=0, right=0, bottom=0;\r\n\tif (elem.getBoundingClientRect) { //HTML5 method\r\n\t\tvar box = elem.getBoundingClientRect();\r\n\t\tvar body = document.body;\r\n\t\tvar docElem = (document.documentElement ||\r\n\t\t\tdocument.body.parentNode ||\r\n\t\t\tdocument.body);\r\n\r\n\t\tvar scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\r\n\t\tvar scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\r\n\t\tvar clientTop = docElem.clientTop || body.clientTop || 0;\r\n\t\tvar clientLeft = docElem.clientLeft || body.clientLeft || 0;\r\n\t\ttop = box.top + scrollTop - clientTop;\r\n\t\tleft = box.left + scrollLeft - clientLeft;\r\n\r\n\t\tright = document.body.offsetWidth - box.right;\r\n\t\tbottom = document.body.offsetHeight - box.bottom;\r\n\t} else { //fallback to naive approach\r\n\t\twhile(elem) {\r\n\t\t\ttop = top + parseInt(elem.offsetTop,10);\r\n\t\t\tleft = left + parseInt(elem.offsetLeft,10);\r\n\t\t\telem = elem.offsetParent;\r\n\t\t}\r\n\r\n\t\tright = document.body.offsetWidth - elem.offsetWidth - left;\r\n\t\tbottom = document.body.offsetHeight - elem.offsetHeight - top;\r\n\t}\r\n\treturn { y: Math.round(top), x: Math.round(left), width:elem.offsetWidth, height:elem.offsetHeight, right: Math.round(right), bottom: Math.round(bottom) };\r\n}\r\n\r\nfunction isVisible(node){\r\n\tvar display = false,\r\n\t\tvisibility = false;\r\n\tif(window.getComputedStyle){\r\n\t\tvar style = window.getComputedStyle(node, null);\r\n\t\tdisplay = style[\"display\"];\r\n\t\tvisibility = style[\"visibility\"];\r\n\t}else if(node.currentStyle){\r\n\t\tdisplay = node.currentStyle[\"display\"];\r\n\t\tvisibility = node.currentStyle[\"visibility\"];\r\n\t}\r\n\treturn (display != \"none\" && visibility != \"hidden\");\r\n}\r\n\r\nfunction hasNonNegativeTabIndex(node){\r\n\treturn !isNaN(node.getAttribute(\"tabindex\")) && (node.getAttribute(\"tabindex\")*1 >= 0);\r\n}\r\n\r\nfunction hasHref(node){\r\n\tvar canHaveHref = {\"a\": true, \"area\": true};\r\n\tif(canHaveHref[node.nodeName.loLowerCase()]){\r\n\t\treturn !!node.getAttribute(\"href\");\r\n\t}\r\n\treturn true;\r\n}\r\n\r\nfunction isEnabled(node){\r\n\tvar canDisable = {\"input\":true, \"select\":true, \"textarea\":true, \"button\":true, \"object\":true};\r\n\tif(canDisable[node.nodeName.toLowerCase()]){\r\n\t\treturn !node.hasAttribute(\"disabled\");\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nfunction getFocusableNodes(root){\r\n\tvar nodes = root.querySelectorAll([\r\n\t\t\"a[href]\",\r\n\t\t\"area[href]\",\r\n\t\t\"input\",\r\n\t\t\"select\",\r\n\t\t\"textarea\",\r\n\t\t\"button\",\r\n\t\t\"iframe\",\r\n\t\t\"object\",\r\n\t\t\"embed\",\r\n\t\t\"[tabindex]\",\r\n\t\t\"[contenteditable]\"\r\n\t].join(\", \"));\r\n\r\n\tvar nodesArray = Array.prototype.slice.call(nodes, 0);\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tnodesArray[i].$position = i;\r\n\t\t// we remember original nodes order, \r\n\t\t// so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \r\n\t\t// since some browsers do unstable sort\r\n\t}\r\n\t\r\n\t// use tabindex to sort focusable nodes\r\n\tnodesArray.sort(function(a, b) {\r\n\t\tif(a.tabIndex === 0 && b.tabIndex !== 0){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif(a.tabIndex !== 0 && b.tabIndex === 0){\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\tif (a.tabIndex === b.tabIndex){\r\n\t\t\t// ensure we do stable sort\r\n\t\t\treturn a.$position - b.$position;\r\n\t\t}\r\n\t\tif (a.tabIndex < b.tabIndex) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\treturn 1;\r\n\t});\r\n\t\r\n\tfor(var i = 0; i < nodesArray.length; i++){\r\n\t\tvar node = nodesArray[i];\r\n\t\tvar isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\r\n\t\tif(!isValid){\r\n\t\t\tnodesArray.splice(i, 1);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\treturn nodesArray;\r\n}\r\n\r\nfunction getScrollSize(){\r\n\tvar div = document.createElement(\"div\");\r\n\tdiv.style.cssText=\"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\r\n\r\n\tdocument.body.appendChild(div);\r\n\tvar width = div.offsetWidth-div.clientWidth;\r\n\tdocument.body.removeChild(div);\r\n\r\n\treturn Math.max(width, 15);\r\n}\r\n\r\nfunction getClassName(node){\r\n\tif(!node) return \"\";\r\n\r\n\tvar className = node.className || \"\";\r\n\tif(className.baseVal)//'className' exist but not a string - IE svg element in DOM\r\n\t\tclassName = className.baseVal;\r\n\r\n\tif(!className.indexOf)\r\n\t\tclassName = \"\";\r\n\r\n\treturn _trimString(className);\r\n}\r\n\r\nfunction addClassName(node, className){\r\n\tif (className && node.className.indexOf(className) === -1) {\r\n\t\tnode.className += \" \" + className;\r\n\t}\r\n}\r\n\r\nfunction removeClassName(node, name) {\r\n\tname = name.split(\" \");\r\n\tfor (var i = 0; i < name.length; i++) {\r\n\t\tvar regEx = new RegExp(\"\\\\s?\\\\b\" + name[i] + \"\\\\b(?![-_.])\", \"\");\r\n\t\tnode.className = node.className.replace(regEx, \"\");\r\n\t}\r\n}\r\n\r\nfunction hasClass(element, className){\r\n\tif ('classList' in element) {\r\n\t\treturn element.classList.contains(className);\r\n\t} else { \r\n\t\treturn new RegExp(\"\\\\b\" + className + \"\\\\b\").test(element.className);\r\n\t}\r\n}\r\n\r\nfunction toNode(node) {\r\n\tif (typeof node === \"string\") {\r\n\t\treturn (document.getElementById(node) || document.querySelector(node) || document.body);\r\n\t}\r\n\treturn node || document.body;\r\n}\r\n\r\nvar _slave;\r\nfunction insertNode(node, newone) {\r\n\tif(!_slave){\r\n\t\t_slave = document.createElement(\"div\");\r\n\t}\r\n\t_slave.innerHTML = newone;\r\n\tvar child = _slave.firstChild;\r\n\tnode.appendChild(child);\r\n\treturn child;\r\n}\r\n\r\nfunction removeNode(node) {\r\n\tif (node && node.parentNode) {\r\n\t\tnode.parentNode.removeChild(node);\r\n\t}\r\n}\r\n\r\nfunction getChildNodes(node, css) {\r\n\tvar ch = node.childNodes;\r\n\tvar len = ch.length;\r\n\tvar out = [];\r\n\tfor (var i = 0; i < len; i++) {\r\n\t\tvar obj = ch[i];\r\n\t\tif (obj.className && obj.className.indexOf(css) !== -1) {\r\n\t\t\tout.push(obj);\r\n\t\t}\r\n\t}\r\n\treturn out;\r\n}\r\n\r\nfunction getTargetNode(e) {\r\n\tvar trg;\r\n\tif (e.tagName)\r\n\t\ttrg = e;\r\n\telse {\r\n\t\te = e || window.event;\r\n\t\ttrg = e.target || e.srcElement;\r\n\t\tif (trg.shadowRoot && e.composedPath) {\r\n\t\t\ttrg = e.composedPath()[0];\r\n\t\t}\r\n\t}\r\n\treturn trg;\r\n}\r\n\r\nfunction locateAttribute(e, attribute) {\r\n\tif(!attribute) return;\r\n\r\n\tvar trg = getTargetNode(e);\r\n\r\n\twhile (trg){\r\n\t\tif (trg.getAttribute){\t//text nodes has not getAttribute\r\n\t\t\tvar test = trg.getAttribute(attribute);\r\n\t\t\tif (test) return trg;\r\n\t\t}\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\nfunction _trimString(str){\r\n\tvar func = String.prototype.trim || function(){ return this.replace(/^\\s+|\\s+$/g, \"\"); };\r\n\treturn func.apply(str);\r\n}\r\n\r\nfunction locateClassName(e, classname, strict){\r\n\tvar trg = getTargetNode(e);\r\n\tvar css = \"\";\r\n\r\n\tif(strict === undefined)\r\n\t\tstrict = true;\r\n\r\n\twhile (trg){\r\n\t\tcss = getClassName(trg);\r\n\t\tif(css){\r\n\t\t\tvar ind = css.indexOf(classname);\r\n\t\t\tif (ind >= 0){\r\n\t\t\t\tif (!strict)\r\n\t\t\t\t\treturn trg;\r\n\r\n\t\t\t\t//check that we have exact match\r\n\t\t\t\tvar left = (ind === 0) || (!_trimString(css.charAt(ind - 1)));\r\n\t\t\t\tvar right = ((ind + classname.length >= css.length)) || (!_trimString(css.charAt(ind + classname.length)));\r\n\r\n\t\t\t\tif (left && right)\r\n\t\t\t\t\treturn trg;\r\n\t\t\t}\r\n\t\t}\r\n\t\ttrg=trg.parentNode;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\n/*\r\nevent position relatively to DOM element\r\n */\r\nfunction getRelativeEventPosition(ev, node){\r\n\tvar d = document.documentElement;\r\n\tvar box = getNodePosition(node);\r\n\r\n\treturn {\r\n\t\tx: ev.clientX + d.scrollLeft - d.clientLeft - box.x + node.scrollLeft,\r\n\t\ty: ev.clientY + d.scrollTop - d.clientTop - box.y + node.scrollTop\r\n\t};\r\n}\r\n\r\nfunction getRelativeNodePosition(child, parent){\r\n\tconst childPos = getNodePosition(child);\r\n\tconst parentPos = getNodePosition(parent);\r\n\treturn {\r\n\t\tx: childPos.x - parentPos.x,\r\n\t\ty: childPos.y - parentPos.y\r\n\t};\r\n}\r\n\r\nfunction isChildOf(child, parent){\r\n\tif(!child || !parent){\r\n\t\treturn false;\r\n\t}\r\n\r\n\twhile(child && child != parent) {\r\n\t\tchild = child.parentNode;\r\n\t}\r\n\r\n\treturn child === parent;\r\n}\r\n\r\nfunction closest(element, selector){\r\n\tif(element.closest){\r\n\t\treturn element.closest(selector);\r\n\t}else if(element.matches || element.msMatchesSelector || element.webkitMatchesSelector){\r\n\t\tvar el = element;\r\n\t\tif (!document.documentElement.contains(el)) return null;\r\n\t\tdo {\r\n\t\t\tvar method = el.matches || el.msMatchesSelector || el.webkitMatchesSelector;\r\n\r\n\t\t\tif (method.call(el, selector)) return el;\r\n\t\t\tel = el.parentElement || el.parentNode;\r\n\t\t} while (el !== null && el.nodeType === 1); \r\n\t\treturn null;\r\n\t}else{\r\n\t\t// eslint-disable-next-line no-console\r\n\t\tconsole.error(\"Your browser is not supported\");\r\n\t\treturn null;\r\n\t}\r\n}\r\n\r\nfunction getClosestSizedElement(element) {\r\n\twhile (element) {\r\n\t\tif (element.offsetWidth > 0 && element.offsetHeight > 0) {\r\n\t\t\treturn element;\r\n\t\t}\r\n\t\telement = element.parentElement;\r\n\t}\r\n\treturn null;\r\n}\r\n\r\nfunction isShadowDomSupported() {\r\n\treturn document.head.createShadowRoot || document.head.attachShadow;\r\n}\r\n\r\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\r\nfunction getActiveElement(){\r\n\tvar activeElement = document.activeElement;\r\n\tif (activeElement.shadowRoot) {\r\n\t\tactiveElement = activeElement.shadowRoot.activeElement;\r\n\t}\r\n\tif (activeElement === document.body && document.getSelection) {\r\n\t\tactiveElement = document.getSelection().focusNode || document.body;\r\n\t}\r\n\r\n\treturn activeElement;\r\n}\r\n\r\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\r\nfunction getRootNode(element) {\r\n\tif (!element) {\r\n\t\treturn document.body;\r\n\t}\r\n\tif (!isShadowDomSupported()) {\r\n\t\treturn document.body;\r\n\t}\r\n\twhile (element.parentNode && (element = element.parentNode)) {\r\n\t\tif (element instanceof ShadowRoot) {\r\n\t\t\treturn element.host;\r\n\t\t}\r\n\t}\r\n\treturn document.body;\r\n}\r\n\r\nfunction hasShadowParent(element) {\r\n\treturn !!getRootNode(element);\r\n}\r\n\r\nexport {\r\n\tgetNodePosition,\r\n\tgetFocusableNodes,\r\n\tgetScrollSize,\r\n\tgetClassName,\r\n\taddClassName,\r\n\tremoveClassName,\r\n\tinsertNode,\r\n\tremoveNode,\r\n\tgetChildNodes,\r\n\ttoNode,\r\n\tlocateClassName,\r\n\tlocateAttribute,\r\n\tgetTargetNode,\r\n\tgetRelativeEventPosition,\r\n\tisChildOf,\r\n\thasClass,\r\n\tclosest,\r\n\tgetRootNode,\r\n\thasShadowParent,\r\n\tisShadowDomSupported,\r\n\tgetActiveElement,\r\n\tgetRelativeNodePosition,\r\n\tgetClosestSizedElement\r\n};","\r\n/* eslint-disable no-restricted-globals */\r\nvar globalScope;\r\nif(typeof window !== \"undefined\"){\r\n\tglobalScope = window;\r\n}else{\r\n\tglobalScope = global;\r\n}\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default globalScope;","import * as domHelpers from \"../../core/ui/utils/dom_helpers\";\r\nimport global from \"../../utils/global\";\r\nimport { SelectedRegion } from \"./selectedRegion\";\r\n\r\nexport class EventsManager {\r\n\tprivate _mouseDown: boolean = false;\r\n\tprivate _domEvents: any;\r\n\tprivate _originPosition: string;\r\n\tprivate _gantt: any;\r\n\tprivate _restoreOriginPosition: () => void;\r\n\tconstructor(gantt: any) {\r\n\t\tthis._gantt = gantt;\r\n\t\tthis._domEvents = gantt._createDomEventScope();\r\n\t}\r\n\r\n\tattach(selectedRegion: SelectedRegion, useKey?: \"shiftKey\" | \"ctrlKey\" | \"altKey\", ignore?: any): void {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst _target = selectedRegion.getViewPort();\r\n\t\tthis._originPosition = global.getComputedStyle(_target).display;\r\n\t\tthis._restoreOriginPosition = () => {\r\n\t\t\t_target.style.position = this._originPosition;\r\n\t\t};\r\n\t\tif (this._originPosition === \"static\") {\r\n\t\t\t_target.style.position = \"relative\";\r\n\t\t}\r\n\t\tconst state = gantt.$services.getService(\"state\");\r\n\t\tstate.registerProvider(\"clickDrag\", () => {\r\n\t\t\tconst result = { autoscroll: false };\r\n\t\t\treturn result;\r\n\t\t});\r\n\r\n\r\n\t\tlet scheduledDndCoordinates = null;\r\n\t\tconst startDragAndDrop = () => {\r\n\t\t\tif (!scheduledDndCoordinates) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._mouseDown = true;\r\n\t\t\tselectedRegion.setStart(gantt.copy(scheduledDndCoordinates));\r\n\t\t\tselectedRegion.setPosition(gantt.copy(scheduledDndCoordinates));\r\n\t\t\tselectedRegion.setEnd(gantt.copy(scheduledDndCoordinates));\r\n\t\t\tscheduledDndCoordinates = null;\r\n\t\t};\r\n\r\n\t\tthis._domEvents.attach(_target, \"mousedown\", (event) => {\r\n\t\t\tscheduledDndCoordinates = null;\r\n\t\t\tlet filterTargets = \".gantt_task_line, .gantt_task_link\";\r\n\t\t\tif (ignore !== undefined) {\r\n\t\t\t\tif (ignore instanceof Array) {\r\n\t\t\t\t\tfilterTargets = ignore.join(\", \");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfilterTargets = ignore;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (filterTargets) {\r\n\t\t\t\tif (gantt.utils.dom.closest(event.target, filterTargets)) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tstate.registerProvider(\"clickDrag\", () => {\r\n\t\t\t\tconst result = { autoscroll: this._mouseDown };\r\n\t\t\t\treturn result;\r\n\t\t\t});\r\n\r\n\t\t\tif (useKey && event[useKey] !== true) { return; }\r\n\t\t\tscheduledDndCoordinates = this._getCoordinates(event, selectedRegion);\r\n\t\t});\r\n\t\tconst eventElement = domHelpers.getRootNode(gantt.$root) || document.body;\r\n\t\tthis._domEvents.attach(eventElement, \"mouseup\", (event) => {\r\n\t\t\tscheduledDndCoordinates = null;\r\n\t\t\tif (useKey && event[useKey] !== true) { return; }\r\n\t\t\tif (this._mouseDown === true) {\r\n\t\t\t\tthis._mouseDown = false;\r\n\t\t\t\tconst coordinates = this._getCoordinates(event, selectedRegion);\r\n\t\t\t\tselectedRegion.dragEnd(coordinates);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis._domEvents.attach(_target, \"mousemove\", (event) => {\r\n\t\t\tif (useKey && event[useKey] !== true) { return; }\r\n\t\t\t// GS-854. If we don't have useKey for the click_drag extension,\r\n\t\t\t// check the drag_timeline to not simultaneously use both extensions\r\n\t\t\tconst dragTimeline = this._gantt.ext.clickDrag;\r\n\t\t\tconst dragTimelineUseKey = (this._gantt.config.drag_timeline || {}).useKey;\r\n\t\t\tif (dragTimeline && dragTimelineUseKey) {\r\n\t\t\t\tif (!useKey && event[dragTimelineUseKey]) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlet coordinates = null;\r\n\t\t\tif(!this._mouseDown && scheduledDndCoordinates){\r\n\t\t\t\tcoordinates = this._getCoordinates(event, selectedRegion);\r\n\t\t\t\tif(Math.abs(scheduledDndCoordinates.relative.left - coordinates.relative.left) > 5){\r\n\t\t\t\t\t// add small threshold not to start dnd on simple click\r\n\t\t\t\t\tstartDragAndDrop();\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (this._mouseDown === true) {\r\n\t\t\t\tcoordinates = this._getCoordinates(event, selectedRegion);\r\n\t\t\t\tselectedRegion.setEnd(coordinates);\r\n\t\t\t\tselectedRegion.render();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tdetach(): void {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis._domEvents.detachAll();\r\n\t\tif(this._restoreOriginPosition){\r\n\t\t\tthis._restoreOriginPosition();\r\n\t\t}\r\n\r\n\t\tconst state = gantt.$services.getService(\"state\");\r\n\t\tstate.unregisterProvider(\"clickDrag\");\r\n\t}\r\n\r\n\tdestructor(): void {\r\n\t\tthis.detach();\r\n\t}\r\n\r\n\tprivate _getCoordinates(event: MouseEvent, selectedRegion: SelectedRegion) {\r\n\t\tconst viewPort = selectedRegion.getViewPort();\r\n\t\tconst viewPortBounds = viewPort.getBoundingClientRect();\r\n\t\tconst { clientX, clientY } = event;\r\n\t\tconst result = {\r\n\t\t\tabsolute: {\r\n\t\t\t\tleft: clientX,\r\n\t\t\t\ttop: clientY\r\n\t\t\t},\r\n\t\t\trelative: {\r\n\t\t\t\tleft: clientX - viewPortBounds.left + viewPort.scrollLeft,\r\n\t\t\t\ttop: clientY - viewPortBounds.top + viewPort.scrollTop\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn result;\r\n\t}\r\n}","var EventHost = function(){\r\n\tthis._silent_mode = false;\r\n\tthis.listeners = {};\r\n};\r\n\r\nEventHost.prototype = {\r\n\t_silentStart: function() {\r\n\t\tthis._silent_mode = true;\r\n\t},\r\n\t_silentEnd: function() {\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n};\r\n\r\nvar\tcreateEventStorage = function(obj) {\r\n\tvar handlers = {};\r\n\tvar index = 0;\r\n\tvar eventStorage = function(){\r\n\t\tvar combinedResult = true;\r\n\t\tfor(var i in handlers){\r\n\t\t\tvar handlerResult = handlers[i].apply(obj, arguments);\r\n\t\t\tcombinedResult=combinedResult && handlerResult;\r\n\t\t}\r\n\t\treturn combinedResult;\r\n\t};\r\n\teventStorage.addEvent=function(handler, settings){\r\n\t\tif (typeof (handler) == \"function\"){\r\n\t\t\tvar handlerId;\r\n\t\t\tif(settings && settings.id){\r\n\t\t\t\thandlerId = settings.id;\r\n\t\t\t}else{\r\n\t\t\t\thandlerId = index;\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings && settings.once){\r\n\t\t\t\tvar originalHandler = handler;\r\n\t\t\t\thandler = function(){\r\n\t\t\t\t\toriginalHandler();\r\n\t\t\t\t\teventStorage.removeEvent(handlerId);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\thandlers[handlerId] = handler;\r\n\t\t\treturn handlerId;\r\n\t\t}\r\n\t\treturn false;\r\n\t};\r\n\teventStorage.removeEvent=function(id){\r\n\t\tdelete handlers[id];\r\n\t};\r\n\r\n\teventStorage.clear = function(){\r\n\t\thandlers = {};\r\n\t};\r\n\r\n\treturn eventStorage;\r\n};\r\n\r\nfunction makeEventable(obj){\r\n\r\n\tvar eventHost = new EventHost();\r\n\tobj.attachEvent=function(eventName, handler, settings){\r\n\t\teventName = 'ev_'+eventName.toLowerCase();\r\n\t\tif (!eventHost.listeners[eventName]){\r\n\t\t\teventHost.listeners[eventName] = createEventStorage(this);\r\n\t\t}\r\n\r\n\t\tif(settings && settings.thisObject){\r\n\t\t\thandler = handler.bind(settings.thisObject);\r\n\t\t}\r\n\r\n\t\tvar innerId = eventHost.listeners[eventName].addEvent(handler, settings);\r\n\r\n\t\tvar handlerId = (eventName+':'+innerId); //return ID (ev_eventname:1)\r\n\t\tif(settings && settings.id){\r\n\t\t\thandlerId = settings.id;\r\n\t\t}\r\n\t\treturn handlerId;\r\n\t};\r\n\r\n\tobj.attachAll = function(callback){\r\n\t\tthis.attachEvent('listen_all', callback);\r\n\t};\r\n\r\n\tobj.callEvent=function(name, eventArguments){\r\n\t\tif (eventHost._silent_mode) return true;\r\n\r\n\t\tvar handlerName = 'ev_'+name.toLowerCase();\r\n\r\n\t\tvar listeners = eventHost.listeners;\r\n\t\tif (listeners['ev_listen_all']){\r\n\t\t\tlisteners['ev_listen_all'].apply(this, [name].concat(eventArguments));\r\n\t\t}\r\n\r\n\t\tif (listeners[handlerName])\r\n\t\t\treturn listeners[handlerName].apply(this, eventArguments);\r\n\t\treturn true;\r\n\t};\r\n\r\n\tobj.checkEvent=function(name){\r\n\t\tvar listeners = eventHost.listeners;\r\n\t\treturn (!!listeners['ev_'+name.toLowerCase()]);\r\n\t};\r\n\r\n\tobj.detachEvent=function(id){\r\n\t\tif (id){\r\n\t\t\tvar listeners = eventHost.listeners;\r\n\t\t\tfor(var i in listeners){\r\n\t\t\t\tlisteners[i].removeEvent(id); //remove event\r\n\t\t\t}\r\n\r\n\t\t\tvar list = id.split(':');//get EventName and ID\r\n\t\t\tvar listeners = eventHost.listeners;\r\n\t\t\tif(list.length === 2){\r\n\t\t\t\tvar eventName = list[0];\r\n\t\t\t\tvar eventId = list[1];\r\n\t\t\t\tif(listeners[eventName]){\r\n\t\t\t\t\tlisteners[eventName].removeEvent(eventId); //remove event\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tobj.detachAllEvents = function(){\r\n\t\tfor (var name in eventHost.listeners) {\r\n\t\t\teventHost.listeners[name].clear();\r\n\t\t}\r\n\t};\r\n\r\n}\r\n\r\nexport default makeEventable;","var units = {\r\n\t\"second\": 1,\r\n\t\"minute\": 60,\r\n\t\"hour\": 60 * 60,\r\n\t\"day\": 60 * 60 * 24,\r\n\t\"week\": 60 * 60 * 24 * 7,\r\n\t\"month\": 60 * 60 * 24 * 30,\r\n\t\"quarter\": 60 * 60 * 24 * 30 * 3,\r\n\t\"year\": 60 * 60 * 24 * 365\r\n};\r\nfunction getSecondsInUnit(unit){\r\n\treturn units[unit] || units.hour;\r\n}\r\n\r\nfunction forEach(arr, callback) {\r\n\tif (arr.forEach) {\r\n\t\tarr.forEach(callback);\r\n\t} else {\r\n\t\tvar workArray = arr.slice();\r\n\t\tfor (var i = 0; i < workArray.length; i++) {\r\n\t\t\tcallback(workArray[i], i);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction arrayMap(arr, callback) {\r\n\tif (arr.map) {\r\n\t\treturn arr.map(callback);\r\n\t} else {\r\n\t\tvar workArray = arr.slice();\r\n\t\tvar resArray = [];\r\n\r\n\t\tfor (var i = 0; i < workArray.length; i++) {\r\n\t\t\tresArray.push(callback(workArray[i], i));\r\n\t\t}\r\n\t\treturn resArray;\r\n\t}\r\n}\r\n\r\n\r\nfunction arrayFind(arr, callback) {\r\n\tif (arr.find) {\r\n\t\treturn arr.find(callback);\r\n\t} else {\r\n\t\tfor (var i = 0; i < arr.length; i++) {\r\n\t\t\tif (callback(arr[i], i)) {\r\n\t\t\t\treturn arr[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction arrayIncludes(arr, item) {\r\n\tif(arr.includes){\r\n\t\treturn arr.includes(item);\r\n\t}else{\r\n\t\tfor (var i = 0; i < arr.length; i++) {\r\n\t\t\tif (arr[i] === item) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\n// iframe-safe array type check instead of using instanceof\r\nfunction isArray(obj){\r\n\tif(Array.isArray){\r\n\t\treturn Array.isArray(obj);\r\n\t}else{\r\n\t\t// close enough\r\n\t\treturn (obj && obj.length !== undefined && obj.pop && obj.push);\r\n\t}\r\n}\r\n\r\n// non-primitive string object, e.g. new String(\"abc\")\r\nfunction isStringObject(obj){\r\n\treturn obj && typeof obj === \"object\"\r\n\t\t&& Function.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Number(5)\r\nfunction isNumberObject(obj){\r\n\treturn obj && typeof obj === \"object\"\r\n\t\t&& Function.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\r\n}\r\n\r\n// non-primitive number object, e.g. new Boolean(true)\r\nfunction isBooleanObject(obj){\r\n\treturn obj && typeof obj === \"object\"\r\n\t\t&& Function.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\r\n}\r\n\r\nfunction isDate(obj) {\r\n\tif (obj && typeof obj === \"object\") {\r\n\t\treturn !!(obj.getFullYear && obj.getMonth && obj.getDate);\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}\r\n\r\nfunction isValidDate(obj){\r\n\treturn isDate(obj) && !isNaN(obj.getTime());\r\n}\r\n\r\nfunction arrayFilter(arr, callback) {\r\n\tvar result = [];\r\n\r\n\tif (arr.filter) {\r\n\t\treturn arr.filter(callback);\r\n\t} else {\r\n\t\tfor (var i = 0; i < arr.length; i++) {\r\n\t\t\tif (callback(arr[i], i)) {\r\n\t\t\t\tresult[result.length] = arr[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n}\r\n\r\nfunction hashToArray(hash) {\r\n\tvar result = [];\r\n\r\n\tfor (var key in hash) {\r\n\t\tif (hash.hasOwnProperty(key)) {\r\n\t\t\tresult.push(hash[key]);\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n}\r\n\r\nfunction arraySome(arr, callback) {\r\n\tif (arr.length === 0) return false;\r\n\r\n\tfor (var i = 0; i < arr.length; i++) {\r\n\t\tif (callback(arr[i], i, arr)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nfunction arrayDifference(arr, callback) {\r\n\treturn arrayFilter(arr, function(item, i) {\r\n\t\treturn !callback(item, i);\r\n\t});\r\n}\r\n\r\nfunction throttle (callback, timeout) {\r\n\tvar wait = false;\r\n\r\n\treturn function () {\r\n\t\tif (!wait) {\r\n\t\t\tcallback.apply(null, arguments);\r\n\t\t\twait = true;\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\twait = false;\r\n\t\t\t}, timeout);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction delay (callback, timeout){\r\n\tvar timer;\r\n\r\n\tvar result = function() {\r\n\t\tresult.$cancelTimeout();\r\n\t\tresult.$pending = true;\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\ttimer = setTimeout(function(){\r\n\t\t\tcallback.apply(this, args);\r\n\t\t\tresult.$pending = false;\r\n\t\t}, timeout);\r\n\t};\r\n\r\n\tresult.$pending = false;\r\n\tresult.$cancelTimeout = function(){\r\n\t\tclearTimeout(timer);\r\n\t\tresult.$pending = false;\r\n\t};\r\n\tresult.$execute = function(){\r\n\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\tcallback.apply(this, args);\r\n\t\tresult.$cancelTimeout();\r\n\t};\r\n\r\n\treturn result;\r\n}\r\n\r\nfunction sortArrayOfHash(arr, field, desc) {\r\n\tvar compare = function(a, b) {\r\n\t\treturn a < b;\r\n\t};\r\n\r\n\tarr.sort(function(a, b) {\r\n\t\tif (a[field] === b[field]) return 0;\r\n\r\n\t\treturn desc ? compare(a[field], b[field]) : compare(b[field], a[field]);\r\n\t});\r\n}\r\n\r\nfunction objectKeys(obj) {\r\n\tif (Object.keys) {\r\n\t\treturn Object.keys(obj);\r\n\t}\r\n\tvar result = [];\r\n\tvar key;\r\n\tfor (key in obj) {\r\n\t\tif (Object.prototype.hasOwnProperty.call(obj, key)) {\r\n\t\t\tresult.push(key);\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nfunction isEventable(obj) {\r\n\treturn obj.attachEvent && obj.detachEvent;\r\n}\r\n\r\n//GS-1090: A task should be able to have the id = 0\r\nfunction replaceValidZeroId(id, rootId) {\r\n\tif (checkZeroId(id) && !checkZeroId(rootId)){\r\n\t\tid = \"0\";\r\n\t}\r\n\treturn id;\r\n}\r\n\r\nfunction checkZeroId(id) {\r\n\tif (id === 0){\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nfunction findBinary(array, target) {\r\n\t// modified binary search, target value not exactly match array elements, looking for closest one\r\n\r\n\tvar low = 0, high = array.length - 1, i, item, prev;\r\n\twhile (low <= high) {\r\n\r\n\t\ti = Math.floor((low + high) / 2);\r\n\t\titem = +array[i];\r\n\t\tprev = +array[i - 1];\r\n\t\tif (item < target) {\r\n\t\t\tlow = i + 1;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif (item > target) {\r\n\t\t\tif (!(!isNaN(prev) && prev < target)) {\r\n\t\t\t\thigh = i - 1;\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\t// if target is between 'i' and 'i-1' return 'i - 1'\r\n\t\t\t\treturn i - 1;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\twhile (+array[i] == +array[i + 1]) i++;\r\n\r\n\t\treturn i;\r\n\t}\r\n\treturn array.length - 1;\r\n}\r\n\r\nexport {\r\n\tgetSecondsInUnit,\r\n\tforEach,\r\n\tarrayMap,\r\n\tarrayIncludes,\r\n\tarrayFind,\r\n\tarrayFilter,\r\n\tarrayDifference,\r\n\tarraySome,\r\n\thashToArray,\r\n\tsortArrayOfHash,\r\n\tthrottle,\r\n\tisArray,\r\n\tisDate,\r\n\tisValidDate,\r\n\tisStringObject,\r\n\tisNumberObject,\r\n\tisBooleanObject,\r\n\tdelay,\r\n\tobjectKeys,\r\n\tisEventable,\r\n\treplaceValidZeroId,\r\n\tcheckZeroId,\r\n\tfindBinary\r\n};","import eventable from \"../../utils/eventable\";\r\nimport { isEventable } from \"../../utils/helpers\";\r\n\r\nexport interface ISelectedRegionConfig {\r\n\tclassName?: string;\r\n\trender?: (startPoint: IPoint, endPoint: IPoint) => HTMLElement;\r\n\tviewPort?: HTMLElement;\r\n\tuseRequestAnimationFrame: boolean;\r\n\tcallback?: (startPoint: IPoint, endPoint: IPoint, startDate: Date, endDate: Date, tasksByDate: any[], tasksByIndex: any[]) => void;\r\n\tsingleRow: boolean;\r\n}\r\n\r\ninterface ICoordinates {\r\n\tleft: number;\r\n\ttop: number;\r\n}\r\n\r\nexport interface IPoint {\r\n\tabsolute: ICoordinates;\r\n\trelative: ICoordinates;\r\n}\r\n\r\nexport class SelectedRegion {\r\n\trender: () => void;\r\n\tprivate _viewPort: HTMLElement & eventable;\r\n\tprivate _el: HTMLElement = document.createElement(\"div\");\r\n\tprivate _callback: (startPoint: IPoint, endPoint: IPoint, startDate: Date, endDate: Date, tasksByDate: any[], tasksByIndex: any[]) => void;\r\n\tprivate _startPoint: IPoint;\r\n\tprivate _endPoint: IPoint;\r\n\tprivate _positionPoint: IPoint;\r\n\tprivate _useRequestAnimationFrame: boolean;\r\n\tprivate _startDate: Date;\r\n\tprivate _endDate: Date;\r\n\tprivate _singleRow: boolean;\r\n\tprivate _gantt: any;\r\n\tprivate _view: any;\r\n\r\n\tconstructor(config: ISelectedRegionConfig, gantt: any, view: any) {\r\n\t\tthis._gantt = gantt;\r\n\t\tthis._view = view;\r\n\t\tthis._viewPort = config.viewPort;\r\n\t\tthis._el.classList.add(config.className);\r\n\t\tif (typeof config.callback === \"function\") {\r\n\t\t\tthis._callback = config.callback;\r\n\t\t}\r\n\r\n\t\tthis.render = () => {\r\n\t\t\tlet node;\r\n\t\t\tif(config.render){\r\n\t\t\t\tnode = config.render(this._startPoint, this._endPoint);\r\n\t\t\t}else{\r\n\t\t\t\tnode = this.defaultRender(this._startPoint, this._endPoint);\r\n\t\t\t}\r\n\r\n\t\t\tif(node !== this._el){\r\n\t\t\t\tif(this._el && this._el.parentNode){\r\n\t\t\t\t\tthis._el.parentNode.removeChild(this._el);\r\n\t\t\t\t}\r\n\t\t\t\tthis._el = node;\r\n\t\t\t}\r\n\r\n\t\t\tif (config.className !== \"\") {\r\n\t\t\t\tthis._el.classList.add(config.className);\r\n\t\t\t}\r\n\t\t\tthis.draw();\r\n\t\t};\r\n\r\n\t\tif (!isEventable(this._viewPort)) {\r\n\t\t\teventable(this._viewPort);\r\n\t\t}\r\n\t\tthis._singleRow = config.singleRow;\r\n\t\tthis._useRequestAnimationFrame = config.useRequestAnimationFrame;\r\n\t}\r\n\r\n\tdefaultRender = (start: IPoint, end: IPoint) => {\r\n\t\tif(!this._el){\r\n\t\t\tthis._el = document.createElement(\"div\");\r\n\t\t}\r\n\t\tconst node = this._el;\r\n\t\t// const gantt = this._gantt;\r\n\r\n\t\tconst top = Math.min(start.relative.top, end.relative.top);\r\n\t\tconst bottom = Math.max(start.relative.top, end.relative.top);\r\n\t\tconst left = Math.min(start.relative.left, end.relative.left);\r\n\t\tconst right = Math.max(start.relative.left, end.relative.left);\r\n\r\n\t\tif (this._singleRow) {\r\n\t\t\tconst pos = this._getTaskPositionByTop(this._startPoint.relative.top);\r\n\t\t\tnode.style.height = pos.height + \"px\";\r\n\t\t\tnode.style.top = pos.top + \"px\";\r\n\t\t} else {\r\n\t\t\tnode.style.height = Math.abs(bottom - top) + \"px\";\r\n\t\t\tnode.style.top = top + \"px\";\r\n\t\t}\r\n\t\tnode.style.width = Math.abs(right - left) + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\t\treturn node;\r\n\t};\r\n\r\n\tdraw() {\r\n\t\tif (this._useRequestAnimationFrame) {\r\n\t\t\treturn requestAnimationFrame(() => {\r\n\t\t\t\tthis._viewPort.appendChild(this.getElement());\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tthis._viewPort.appendChild(this.getElement());\r\n\t\t}\r\n\t}\r\n\r\n\tclear() {\r\n\t\tif (this._useRequestAnimationFrame) {\r\n\t\t\treturn requestAnimationFrame(() => {\r\n\t\t\t\tif (!this._el.parentNode) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tthis._viewPort.removeChild(this._el);\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tif (!this._el.parentNode) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis._viewPort.removeChild(this._el);\r\n\t\t}\r\n\t}\r\n\r\n\tgetElement() {\r\n\t\treturn this._el;\r\n\t}\r\n\r\n\tgetViewPort() {\r\n\t\treturn this._viewPort;\r\n\t}\r\n\r\n\tsetStart(startPoint: IPoint) {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis._startPoint = startPoint;\r\n\t\tthis._startDate = gantt.dateFromPos(this._startPoint.relative.left);\r\n\t\tthis._viewPort.callEvent(\"onBeforeDrag\", [this._startPoint]);\r\n\t}\r\n\r\n\tsetEnd(endPoint: IPoint) {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis._endPoint = endPoint;\r\n\t\tif (this._singleRow) {\r\n\t\t\tconst pos = this._getTaskPositionByTop(this._startPoint.relative.top);\r\n\t\t\tthis._endPoint.relative.top = pos.top;\r\n\t\t}\r\n\t\tthis._endDate = gantt.dateFromPos(this._endPoint.relative.left);\r\n\t\tif (this._startPoint.relative.left > this._endPoint.relative.left) {\r\n\t\t\tthis._positionPoint = {\r\n\t\t\t\trelative: { left: this._endPoint.relative.left, top: this._positionPoint.relative.top },\r\n\t\t\t\tabsolute: { left: this._endPoint.absolute.left, top: this._positionPoint.absolute.top }\r\n\t\t\t};\r\n\t\t}\r\n\t\tif (this._startPoint.relative.top > this._endPoint.relative.top) {\r\n\t\t\tthis._positionPoint = {\r\n\t\t\t\trelative: { left: this._positionPoint.relative.left, top: this._endPoint.relative.top },\r\n\t\t\t\tabsolute: { left: this._positionPoint.absolute.left, top: this._endPoint.absolute.top }\r\n\t\t\t};\r\n\t\t}\r\n\r\n\r\n\t\tthis._viewPort.callEvent(\"onDrag\", [this._startPoint, this._endPoint]);\r\n\t}\r\n\r\n\tsetPosition(positionPoint: IPoint) {\r\n\t\tthis._positionPoint = positionPoint;\r\n\t}\r\n\r\n\tdragEnd(endPoint: IPoint) {\r\n\t\tconst gantt = this._gantt;\r\n\t\tif(endPoint.relative.left < 0){\r\n\t\t\tendPoint.relative.left = 0;\r\n\t\t}\r\n\t\tthis._viewPort.callEvent(\"onBeforeDragEnd\", [this._startPoint, endPoint]);\r\n\t\tthis.setEnd(endPoint);\r\n\t\t// GS-1422. The endDate can be null if we drag the mouse outside the Gantt container\r\n\t\tthis._endDate = this._endDate || gantt.getState().max_date;\r\n\r\n\t\tif (this._startDate.valueOf() > this._endDate.valueOf()) {\r\n\t\t\t[ this._startDate, this._endDate ] = [ this._endDate, this._startDate ];\r\n\t\t}\r\n\t\tthis.clear();\r\n\t\tconst tasksByTime = gantt.getTaskByTime(this._startDate, this._endDate);\r\n\t\tconst tasksByIndex = this._getTasksByTop(this._startPoint.relative.top, this._endPoint.relative.top);\r\n\r\n\t\tthis._viewPort.callEvent(\"onDragEnd\", [this._startPoint, this._endPoint]);\r\n\t\tif (this._callback) {\r\n\t\t\tthis._callback(this._startPoint, this._endPoint, this._startDate, this._endDate, tasksByTime, tasksByIndex);\r\n\t\t}\r\n\t}\r\n\r\n\tgetInBounds() {\r\n\t\treturn this._singleRow;\r\n\t}\r\n\r\n\tprivate _getTasksByTop(start: number, end:number) {\r\n\t\tconst gantt = this._gantt;\r\n\t\tlet startValue = start;\r\n\t\tlet endValue = end;\r\n\t\tif (start > end) {\r\n\t\t\tstartValue = end;\r\n\t\t\tendValue = start;\r\n\t\t}\r\n\t\tconst startIndex = this._getTaskPositionByTop(startValue).index;\r\n\t\tconst endIndex = this._getTaskPositionByTop(endValue).index;\r\n\t\tconst result = [];\r\n\t\tfor (let i = startIndex; i <= endIndex; i++) {\r\n\t\t\tconst task = gantt.getTaskByIndex(i);\r\n\t\t\tif (task) {\r\n\t\t\t\tresult.push(gantt.getTaskByIndex(i));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tprivate _getTaskPositionByTop(top: number){\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst view = this._view;\r\n\t\tconst index = view.getItemIndexByTopPosition(top);\r\n\t\tconst task = gantt.getTaskByIndex(index);\r\n\t\tif(task){\r\n\t\t\tconst height = view.getItemHeight(task.id);\r\n\t\t\tconst itemTop = view.getItemTop(task.id);\r\n\t\t\treturn {\r\n\t\t\t\ttop: itemTop || 0,\r\n\t\t\t\theight: height || 0,\r\n\t\t\t\tindex\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tconst dataHeight = view.getTotalHeight();\r\n\t\t\treturn {\r\n\t\t\t\ttop: top > dataHeight ? dataHeight : 0,\r\n\t\t\t\theight: gantt.config.row_height,\r\n\t\t\t\tindex: top > dataHeight ? gantt.getTaskCount() : 0\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n}","interface IPoint {\r\n\tx: number;\r\n\ty: number;\r\n}\r\n\r\nexport class EventsManager {\r\n\tstatic create(gantt: any) {\r\n\t\treturn new EventsManager(gantt);\r\n\t}\r\n\tprivate _mouseDown: boolean = false;\r\n\tprivate _startPoint: IPoint;\r\n\tprivate _scrollState: IPoint;\r\n\tprivate _originAutoscroll: boolean;\r\n\tprivate _domEvents: any;\r\n\tprivate _timeline: any;\r\n\tprivate _gantt: any;\r\n\tprivate _trace: IPoint[];\r\n\tprivate _originalReadonly: boolean;\r\n\r\n\tconstructor(gantt: any) {\r\n\t\tthis._gantt = gantt;\r\n\t\tthis._domEvents = gantt._createDomEventScope();\r\n\t\tthis._trace = [];\r\n\t}\r\n\r\n\tdestructor() {\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\r\n\tattach(timeline: any): void {\r\n\t\tthis._timeline = timeline;\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis._domEvents.attach(timeline.$task, \"mousedown\", (event) => {\r\n\t\t\tif (!gantt.config.drag_timeline) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst { useKey,ignore, enabled } = gantt.config.drag_timeline;\r\n\t\t\tif(enabled === false) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tlet filterTargets = \".gantt_task_line, .gantt_task_link\";\r\n\t\t\tif(ignore !== undefined) {\r\n\t\t\t\tif(ignore instanceof Array){\r\n\t\t\t\t\tfilterTargets = ignore.join(\", \");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfilterTargets = ignore;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (filterTargets) {\r\n\t\t\t\tif (gantt.utils.dom.closest(event.target, filterTargets)) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (useKey && event[useKey] !== true) { return; }\r\n\r\n\t\t\tthis._startDrag(event);\r\n\t\t});\r\n\r\n\t\tthis._domEvents.attach(document, \"keydown\", (event) => {\r\n\t\t\tif (!gantt.config.drag_timeline) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst { useKey } = gantt.config.drag_timeline;\r\n\t\t\tif (useKey && event[useKey] === true) {\r\n\t\t\t\tthis._applyDndReadyStyles();\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis._domEvents.attach(document, \"keyup\", (event) => {\r\n\t\t\tif (!gantt.config.drag_timeline) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst { useKey } = gantt.config.drag_timeline;\r\n\t\t\tif (useKey && event[useKey] === false) {\r\n\t\t\t\tthis._clearDndReadyStyles();\r\n\t\t\t\tthis._stopDrag(event);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis._domEvents.attach(document, \"mouseup\", (event) => {\r\n\t\t\tthis._stopDrag(event);\r\n\t\t});\r\n\t\tthis._domEvents.attach(gantt.$root, \"mouseup\", (event) => {\r\n\t\t\tthis._stopDrag(event);\r\n\t\t});\r\n\t\tthis._domEvents.attach(document, \"mouseleave\", (event) => {\r\n\t\t\tthis._stopDrag(event);\r\n\t\t});\r\n\t\tthis._domEvents.attach(gantt.$root, \"mouseleave\", (event) => {\r\n\t\t\tthis._stopDrag(event);\r\n\t\t});\r\n\r\n\t\tthis._domEvents.attach(gantt.$root, \"mousemove\", (event) => {\r\n\t\t\tif (!gantt.config.drag_timeline) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst { useKey } = gantt.config.drag_timeline;\r\n\t\t\tif (useKey && event[useKey] !== true) { return; }\r\n\t\t\t// GS-854. If we don't have useKey for the drag_timeline extension,\r\n\t\t\t// check the click_drag to not simultaneously use both extensions\r\n\t\t\tconst clickDrag = this._gantt.ext.clickDrag;\r\n\t\t\tconst clickDragUseKey = (this._gantt.config.click_drag || {}).useKey;\r\n\t\t\tif (clickDrag && clickDragUseKey) {\r\n\t\t\t\tif (!useKey && event[clickDragUseKey]) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (this._mouseDown === true) {\r\n\t\t\t\tthis._trace.push({ x: event.clientX, y: event.clientY });\r\n\t\t\t\tconst scrollPosition: IPoint = this._countNewScrollPosition({ x: event.clientX, y: event.clientY });\r\n\t\t\t\tthis._setScrollPosition(timeline, scrollPosition);\r\n\t\t\t\tthis._scrollState = scrollPosition;\r\n\t\t\t\tthis._startPoint = { x: event.clientX, y: event.clientY };\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _calculateDirectionVector = () => {\r\n\t\tconst traceSteps = 10;\r\n\t\tif(this._trace.length >= traceSteps) {\r\n\t\t\tconst dots = this._trace.slice(this._trace.length - traceSteps);\r\n\r\n\t\t\tconst vectors = [];\r\n\t\t\tfor(let i = 1; i < dots.length; i++) {\r\n\t\t\t\tvectors.push({\r\n\t\t\t\t\tx: dots[i].x - dots[i - 1].x,\r\n\t\t\t\t\ty: dots[i].y - dots[i - 1].y\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tconst resultVector = {x:0, y:0};\r\n\r\n\t\t\tvectors.forEach((vector) => {\r\n\t\t\t\tresultVector.x += vector.x;\r\n\t\t\t\tresultVector.y += vector.y;\r\n\t\t\t});\r\n\r\n\t\t\tconst magnitude = Math.sqrt(resultVector.x*resultVector.x + resultVector.y*resultVector.y);\r\n\t\t\tconst angleDegrees = Math.atan2(Math.abs(resultVector.y), Math.abs(resultVector.x)) * 180 / Math.PI;\r\n\r\n\t\t\treturn {\r\n\t\t\t\tmagnitude,\r\n\t\t\t\tangleDegrees\r\n\t\t\t};\r\n\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tprivate _applyDndReadyStyles = (): void => {\r\n\t\tthis._timeline.$task.classList.add(\"gantt_timeline_move_available\");\r\n\t};\r\n\r\n\tprivate _clearDndReadyStyles = (): void => {\r\n\t\tthis._timeline.$task.classList.remove(\"gantt_timeline_move_available\");\r\n\t};\r\n\r\n\tprivate _getScrollPosition = (timeline: any): IPoint => {\r\n\t\tconst gantt = this._gantt;\r\n\t\treturn {\r\n\t\t\tx: gantt.$ui.getView(timeline.$config.scrollX).getScrollState().position,\r\n\t\t\ty: gantt.$ui.getView(timeline.$config.scrollY).getScrollState().position\r\n\t\t};\r\n\t};\r\n\tprivate _countNewScrollPosition = (coords: IPoint): IPoint => {\r\n\t\tconst vector = this._calculateDirectionVector();\r\n\t\tlet shiftX = this._startPoint.x - coords.x;\r\n\t\tlet shiftY = this._startPoint.y - coords.y;\r\n\t\tif(vector){\r\n\t\t\tif(vector.angleDegrees < 15){\r\n\t\t\t\tshiftY = 0;\r\n\t\t\t} else if(vector.angleDegrees > 75){\r\n\t\t\t\tshiftX = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst result = {\r\n\t\t\tx: this._scrollState.x + shiftX,\r\n\t\t\ty: this._scrollState.y + shiftY\r\n\t\t};\r\n\t\treturn result;\r\n\t};\r\n\tprivate _setScrollPosition = (timeline: any, coords: IPoint): void => {\r\n\t\tconst gantt = this._gantt;\r\n\t\trequestAnimationFrame(() => {\r\n\t\t\tgantt.scrollLayoutCell(timeline.$id, coords.x, coords.y);\r\n\t\t});\r\n\t};\r\n\tprivate _stopDrag = (event: Event): void => {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis._trace = [];\r\n\t\tgantt.$root.classList.remove(\"gantt_noselect\");\r\n\r\n\t\tif(this._originalReadonly !== undefined){\r\n\t\t\tgantt.config.readonly = this._originalReadonly;\r\n\t\t\tif(this._mouseDown && gantt.config.drag_timeline && gantt.config.drag_timeline.render){\r\n\t\t\t\tgantt.render();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this._originAutoscroll !== undefined){\r\n\t\t\tgantt.config.autoscroll = this._originAutoscroll;\r\n\t\t}\r\n\r\n\t\tif(gantt.config.drag_timeline){\r\n\t\t\tconst { useKey } = gantt.config.drag_timeline;\r\n\t\t\tif (useKey && event[useKey] !== true) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._mouseDown = false;\r\n\t};\r\n\r\n\tprivate _startDrag = (event: any) : void => {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis._originAutoscroll = gantt.config.autoscroll;\r\n\t\tgantt.config.autoscroll = false;\r\n\r\n\t\tgantt.$root.classList.add(\"gantt_noselect\");\r\n\t\tthis._originalReadonly = gantt.config.readonly;\r\n\t\tgantt.config.readonly = true;\r\n\r\n\t\tif(gantt.config.drag_timeline && gantt.config.drag_timeline.render){\r\n\t\t\tgantt.render();\r\n\t\t}\r\n\r\n\t\tthis._trace = [];\r\n\t\tthis._mouseDown = true;\r\n\t\tconst { x, y } = this._getScrollPosition(this._timeline);\r\n\t\tthis._scrollState = { x, y };\r\n\t\tthis._startPoint = { x: event.clientX, y: event.clientY };\r\n\t\tthis._trace.push(this._startPoint);\r\n\t};\r\n}","export default function(gantt) {\r\n\r\n\t(function () {\r\n\t\tvar modalsStack = [];\r\n\r\n\t\tfunction isModal() {\r\n\t\t\treturn !!modalsStack.length;\r\n\t\t}\r\n\r\n\t\tfunction afterPopup(box) {\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tif (!isModal()){\r\n\t\t\t\t\tif(!gantt.$destroyed){\r\n\t\t\t\t\t\tgantt.focus();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, 1);\r\n\t\t}\r\n\r\n\t\tfunction startModal(box) {\r\n\t\t\tgantt.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\tgantt.event(box, \"keydown\", trapFocus);\r\n\t\t\tmodalsStack.push(box);\r\n\t\t\t//gantt.$keyboardNavigation.dispatcher.disable();\r\n\t\t}\r\n\r\n\t\tfunction endModal() {\r\n\t\t\tvar box = modalsStack.pop();\r\n\t\t\tif (box) {\r\n\t\t\t\tgantt.eventRemove(box, \"keydown\", trapFocus);\r\n\t\t\t}\r\n\t\t\tafterPopup(box);\r\n\r\n\t\t}\r\n\r\n\r\n\t\tfunction isTopModal(box) {\r\n\t\t\treturn box == modalsStack[modalsStack.length - 1];\r\n\t\t}\r\n\r\n\t\tfunction trapFocus(event) {\r\n\t\t\tvar target = event.currentTarget;\r\n\t\t\tif (!isTopModal(target)) return;\r\n\r\n\t\t\tgantt.$keyboardNavigation.trapFocus(target, event);\r\n\t\t}\r\n\r\n\t\tfunction traceLightbox() {\r\n\t\t\tstartModal(gantt.getLightbox());\r\n\t\t}\r\n\r\n\t\tgantt.attachEvent(\"onLightbox\", traceLightbox);\r\n\t\tgantt.attachEvent(\"onAfterLightbox\", endModal);\r\n\t\tgantt.attachEvent(\"onLightboxChange\", function () {\r\n\t\t\tendModal();\r\n\t\t\ttraceLightbox();\r\n\t\t});\r\n\r\n\r\n\t\tgantt.attachEvent(\"onAfterQuickInfo\", function () {\r\n\t\t\tafterPopup();\r\n\t\t});\r\n\r\n\t\tgantt.attachEvent(\"onMessagePopup\", function (box) {\r\n\t\t\tsaveFocus();\r\n\t\t\tstartModal(box);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterMessagePopup\", function () {\r\n\t\t\tendModal();\r\n\t\t\trestoreFocus();\r\n\t\t});\r\n\r\n\t\tvar focusElement = null;\r\n\r\n\t\tfunction saveFocus() {\r\n\t\t\tfocusElement = gantt.utils.dom.getActiveElement();\r\n\t\t}\r\n\r\n\t\tfunction restoreFocus() {\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tif (focusElement) {\r\n\t\t\t\t\tfocusElement.focus();\r\n\t\t\t\t\tfocusElement = null;\r\n\t\t\t\t}\r\n\t\t\t}, 1);\r\n\t\t}\r\n\r\n\t\tgantt.$keyboardNavigation.isModal = isModal;\r\n\r\n\r\n\t})();\r\n\r\n};","\r\ninterface IQuickInfoContainer{\r\n\tparent: HTMLElement;\r\n\txViewport: HTMLElement;\r\n\tyViewport: HTMLElement;\r\n}\r\n\r\nexport class QuickInfo {\r\n\tprivate _quickInfoTask: TaskID;\r\n\tprivate _quickInfoBoxId: number | string;\r\n\tprivate _quickInfoBox: HTMLElement;\r\n\tprivate _quickInfoReadonly: boolean | null;\r\n\tprivate _container: HTMLElement;\r\n\tprivate _gantt: any;\r\n\r\n\tconstructor(gantt: any) {\r\n\t\tthis._gantt = gantt;\r\n\t}\r\n\r\n\t// show at coordinates:\r\n\t// show(x: number, y: number)\r\n\t// show for a task:\r\n\t// show(id: TaskID)\r\n\tshow : {\r\n\t\t(x: number, y: number) : void;\r\n\t\t(id: TaskID) : void;\r\n\t} = (id: TaskID | number, y? : number) : void => {\r\n\t\tif (y === undefined) {\r\n\t\t\tthis._showForTask(id);\r\n\t\t} else {\r\n\t\t\tthis._showAtCoordinates(id as number, y);\r\n\t\t}\r\n\t};\r\n\r\n\thide = (forced?: boolean) : any => {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst qi = this._quickInfoBox;\r\n\t\tthis._quickInfoBoxId = 0;\r\n\t\tconst taskId = this._quickInfoTask;\r\n\t\tthis._quickInfoTask = null;\r\n\r\n\t\tif (qi && qi.parentNode){\r\n\r\n\t\t\tif (gantt.config.quick_info_detached) {\r\n\t\t\t\tgantt.callEvent(\"onAfterQuickInfo\", [taskId]);\r\n\t\t\t\treturn qi.parentNode.removeChild(qi);\r\n\t\t\t}\r\n\r\n\t\t\tqi.className += \" gantt_qi_hidden\";\r\n\t\t\tif (qi.style.right === \"auto\"){\r\n\t\t\t\tqi.style.left = \"-350px\";\r\n\t\t\t} else {\r\n\t\t\t\tqi.style.right = \"-350px\";\r\n\t\t\t}\r\n\r\n\t\t\tif (forced) {\r\n\t\t\t\tqi.style.left = qi.style.right = \"\";\r\n\t\t\t\tqi.parentNode.removeChild(qi);\r\n\t\t\t}\r\n\t\t\tgantt.callEvent(\"onAfterQuickInfo\", [taskId]);\r\n\t\t}\r\n\t};\r\n\r\n\tgetNode = (): HTMLElement => {\r\n\t\tif(this._quickInfoBox) {\r\n\t\t\treturn this._quickInfoBox;\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tsetContainer = (container: string|HTMLElement): void => {\r\n\t\tif(container){\r\n\t\t\tthis._container = typeof container === \"string\" ? document.getElementById(container) : container;\r\n\t\t}\r\n\t};\r\n\r\n\tsetContent = (content?: IQuickInfoContent) => {\r\n\t\tconst gantt = this._gantt;\r\n\r\n\t\tconst defaultContent = {\r\n\t\t\ttaskId: null,\r\n\t\t\theader: {\r\n\t\t\t\ttitle: \"\",\r\n\t\t\t\tdate: \"\"\r\n\t\t\t},\r\n\t\t\tcontent: \"\",\r\n\t\t\tbuttons: gantt.config.quickinfo_buttons\r\n\t\t};\r\n\r\n\t\tif(!content){\r\n\t\t\tcontent = defaultContent;\r\n\t\t}\r\n\r\n\t\tif(!content.taskId){\r\n\t\t\tcontent.taskId = defaultContent.taskId;\r\n\t\t}\r\n\r\n\t\tif(!content.header){\r\n\t\t\tcontent.header = defaultContent.header;\r\n\t\t}\r\n\r\n\t\tif(!content.header.title){\r\n\t\t\tcontent.header.title = defaultContent.header.title;\r\n\t\t}\r\n\t\tif(!content.header.date){\r\n\t\t\tcontent.header.date = defaultContent.header.date;\r\n\t\t}\r\n\t\tif(!content.content){\r\n\t\t\tcontent.content = defaultContent.content;\r\n\t\t}\r\n\t\tif(!content.buttons){\r\n\t\t\tcontent.buttons = defaultContent.buttons;\r\n\t\t}\r\n\r\n\r\n\t\tlet qi = this.getNode();\r\n\t\tif(!qi){\r\n\t\t\tqi = this._createQuickInfoElement();\r\n\t\t}\r\n\r\n\t\tif(content.taskId){\r\n\t\t\tthis._quickInfoBoxId = content.taskId;\r\n\t\t}\r\n\r\n\t\tconst titleBox = qi.querySelector(\".gantt_cal_qi_title\") as HTMLElement;\r\n\t\tconst titleContent = titleBox.querySelector(\".gantt_cal_qi_tcontent\");\r\n\t\tconst titleDate = titleBox.querySelector(\".gantt_cal_qi_tdate\");\r\n\t\tconst main = qi.querySelector(\".gantt_cal_qi_content\");\r\n\t\tconst controls = qi.querySelector(\".gantt_cal_qi_controls\") as HTMLElement;\r\n\r\n\t\tgantt._waiAria.quickInfoHeader(qi, [content.header.title, content.header.date].join(\" \"));\r\n\r\n\t\ttitleContent.innerHTML = content.header.title;\r\n\t\ttitleDate.innerHTML = content.header.date;\r\n\r\n\t\tif(!content.header.title && !content.header.date){\r\n\t\t\ttitleBox.style.display = \"none\";\r\n\t\t}else{\r\n\t\t\ttitleBox.style.display = \"\";\r\n\t\t}\r\n\t\tmain.innerHTML = content.content;\r\n\r\n\t\tconst buttons = content.buttons;\r\n\t\tif(!buttons.length){\r\n\t\t\tcontrols.style.display = \"none\";\r\n\t\t}else{\r\n\t\t\tcontrols.style.display = \"\";\r\n\t\t}\r\n\t\tlet html = \"\";\r\n\t\tfor (let i = 0; i < buttons.length; i++){\r\n\r\n\t\t\tconst ariaAttr = gantt._waiAria.quickInfoButtonAttrString(gantt.locale.labels[buttons[i]]);\r\n\r\n\t\t\thtml += `
\r\n
\r\n
${gantt.locale.labels[buttons[i]]}
\r\n
`;\r\n\t\t}\r\n\t\tcontrols.innerHTML = html;\r\n\r\n\t\tgantt.eventRemove(qi, \"click\", this._qiButtonClickHandler);\r\n\t\tgantt.eventRemove(qi, \"keypress\", this._qiKeyPressHandler);\r\n\r\n\t\tgantt.event(qi, \"click\", this._qiButtonClickHandler);\r\n\t\tgantt.event(qi, \"keypress\", this._qiKeyPressHandler);\r\n\t};\r\n\r\n\tprivate _qiButtonClickHandler = (ev) => {\r\n\t\tthis._qi_button_click(ev.target);\r\n\t};\r\n\r\n\tprivate _qiKeyPressHandler = (e) => {\r\n\r\n\t\tconst code = e.which;\r\n\t\tif (code === 13 || code === 32){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis._qi_button_click(e.target);\r\n\t\t\t},1);\r\n\t\t}\r\n\t};\r\n\r\n\tprivate _showAtCoordinates(x: number, y: number) : void {\r\n\t\tthis.hide(true);\r\n\t\tthis._quickInfoBoxId = 0;\r\n\t\tthis._quickInfoTask = null;\r\n\t\tif(!this._quickInfoBox){\r\n\t\t\tthis._createQuickInfoElement();\r\n\t\t\tthis.setContent();\r\n\t\t}\r\n\r\n\t\tthis._appendAtCoordinates(x, y);\r\n\t\tthis._gantt.callEvent(\"onQuickInfo\", [null]);\r\n\t}\r\n\r\n\tprivate _showForTask(id: TaskID) : void {\r\n\t\tconst gantt = this._gantt;\r\n\t\tif ((\r\n\t\t\tid === this._quickInfoBoxId &&\r\n\t\t\tgantt.utils.dom.isChildOf(this._quickInfoBox, document.body)\r\n\t\t) || !gantt.config.show_quick_info) {\r\n\t\t\t// not show if the quick info is already displayed for this task, or if it shouldn't be displayed\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.hide(true);\r\n\t\tconst offset = 6; // offset TASK <> QI-BOX in 'px'\r\n\t\tconst container = this._getContainer();\r\n\t\tconst pos = this._get_event_counter_part(id, offset, container.xViewport, container.yViewport);\r\n\r\n\t\tif (pos){\r\n\t\t\tthis._quickInfoBox = this._init_quick_info(id);\r\n\t\t\tthis._quickInfoTask = id;\r\n\t\t\tthis._quickInfoBox.className = this._prepare_quick_info_classname(id);\r\n\r\n\t\t\tthis._fill_quick_data(id);\r\n\t\t\tthis._show_quick_info(pos, offset);\r\n\t\t\tgantt.callEvent(\"onQuickInfo\", [id]);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _get_event_counter_part(id: TaskID, offset: number, xViewport: HTMLElement, yViewport: HTMLElement) : any {\r\n\t\tconst gantt = this._gantt;\r\n\t\tlet domEv = gantt.getTaskNode(id);\r\n\t\tif (!domEv) {\r\n\t\t\tdomEv = gantt.getTaskRowNode(id);\r\n\t\t\tif (!domEv) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tlet left = 0;\r\n\t\tconst top = offset + domEv.offsetTop + domEv.offsetHeight;\r\n\r\n\t\tlet node = domEv;\r\n\r\n\t\tif (gantt.utils.dom.isChildOf(node, xViewport)) {\r\n\t\t\twhile (node && node !== xViewport){\r\n\t\t\t\tleft += node.offsetLeft;\r\n\t\t\t\tnode = node.offsetParent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst scroll = gantt.getScrollState();\r\n\r\n\t\tif(node){\r\n\t\t\tconst dx = (left + domEv.offsetWidth/2) - scroll.x > (xViewport.offsetWidth/2) ? 1 : 0;\r\n\t\t\tconst dy = (top + domEv.offsetHeight/2) - scroll.y > (yViewport.offsetHeight/2) ? 1 : 0;\r\n\r\n\t\t\treturn { left, top, dx, dy, width:domEv.offsetWidth, height:domEv.offsetHeight };\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tprivate _createQuickInfoElement() : HTMLElement {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst qi = document.createElement(\"div\");\r\n\t\tqi.className += \"gantt_cal_quick_info\";\r\n\t\tgantt._waiAria.quickInfoAttr(qi);\r\n\r\n\t\t// title\r\n\t\tconst ariaAttr = gantt._waiAria.quickInfoHeaderAttrString();\r\n\t\tvar html = `\r\n\t\t
\r\n\t\t\t\r\n\t\t
\r\n\t\t
\r\n\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t
\r\n\t\t\t
\r\n\t\t\t
`;\r\n\r\n\t\t//buttons\r\n\t\thtml += \"
\";\r\n\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\r\n\r\n\t\tif (gantt.config.quick_info_detached) {\r\n\t\t\tconst container = this._getContainer();\r\n\t\t\tgantt.event(container.parent, \"scroll\", () => { this.hide(); });\r\n\t\t}\r\n\r\n\t\tthis._quickInfoBox = qi;\r\n\t\treturn qi;\r\n\t}\r\n\r\n\tprivate _init_quick_info(id: TaskID) : HTMLElement {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst task = gantt.getTask(id);\r\n\t\t\r\n\r\n\t\tif(typeof this._quickInfoReadonly === \"boolean\"){\r\n\t\t\tif(gantt.isReadonly(task) !== this._quickInfoReadonly){\r\n\t\t\t\tthis.hide(true);\r\n\t\t\t\tthis._quickInfoBox = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._quickInfoReadonly = gantt.isReadonly(task);\r\n\r\n\t\tif (!this._quickInfoBox){\r\n\t\t\tthis._quickInfoBox = this._createQuickInfoElement();\r\n\t\t}\r\n\r\n\t\treturn this._quickInfoBox;\r\n\t}\r\n\r\n\tprivate _prepare_quick_info_classname(id: TaskID) : string {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst task = gantt.getTask(id);\r\n\t\tconst taskType = gantt.getTaskType(task);\r\n\r\n\t\tlet css = `gantt_cal_quick_info gantt_${taskType}`;\r\n\t\tconst template = gantt.templates.quick_info_class(task.start_date, task.end_date, task);\r\n\r\n\t\tif(template){\r\n\t\t\tcss += \" \" + template;\r\n\t\t}\r\n\t\treturn css;\r\n\t}\r\n\r\n\tprivate _fill_quick_data(id: TaskID) : void {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst ev = gantt.getTask(id);\r\n\r\n\t\tthis._quickInfoBoxId = id;\r\n\r\n\t\tlet allowedButtons = [];\r\n\t\tif (this._quickInfoReadonly){\r\n\t\t\tconst buttons = gantt.config.quickinfo_buttons;\r\n\t\t\tconst isEditor = {icon_delete: true, icon_edit: true};\r\n\t\t\tfor (let i = 0; i < buttons.length; i++){\r\n\t\t\t\tif(this._quickInfoReadonly && isEditor[buttons[i]]){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tallowedButtons.push(buttons[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tallowedButtons = gantt.config.quickinfo_buttons;\r\n\t\t}\r\n\r\n\t\tthis.setContent({\r\n\t\t\theader: {\r\n\t\t\t\ttitle: gantt.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\t\t\tdate: gantt.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t\t\t},\r\n\t\t\tcontent: gantt.templates.quick_info_content(ev.start_date, ev.end_date, ev),\r\n\t\t\tbuttons: allowedButtons\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _appendAtCoordinates(x: number, y: number): void {\r\n\t\tconst qi = this._quickInfoBox;\r\n\t\tconst container = this._getContainer();\r\n\t\tif (!qi.parentNode ||\r\n\t\t\tqi.parentNode.nodeName.toLowerCase() === \"#document-fragment\"){ // IE8\r\n\t\t\tcontainer.parent.appendChild(qi);\r\n\t\t}\r\n\r\n\t\tqi.style.left = x + \"px\";\r\n\t\tqi.style.top = y + \"px\";\r\n\t}\r\n\r\n\tprivate _show_quick_info(pos: any, offset: number) : void {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst qi = this._quickInfoBox;\r\n\t\tif (gantt.config.quick_info_detached) {\r\n\t\t\tconst container = this._getContainer();\r\n\t\t\tif (!qi.parentNode ||\r\n\t\t\t\tqi.parentNode.nodeName.toLowerCase() === \"#document-fragment\"){ // IE8\r\n\t\t\t\tcontainer.parent.appendChild(qi);\r\n\t\t\t}\r\n\t\t\tconst width = qi.offsetWidth;\r\n\t\t\tconst popupHeight = qi.offsetHeight;\r\n\r\n\t\t\tconst scrolls = gantt.getScrollState();\r\n\t\t\tconst xViewport = container.xViewport;\r\n\t\t\tconst yViewport = container.yViewport;\r\n\t\t\tconst screenWidth = xViewport.offsetWidth + scrolls.x - width;\r\n\r\n\t\t\tconst relativePopupTop = pos.top - scrolls.y;\r\n\t\t\tconst relativePopupBottom = relativePopupTop + popupHeight;\r\n\r\n\t\t\tlet top = pos.top;\r\n\t\t\tif(relativePopupBottom > yViewport.offsetHeight / 2){\r\n\t\t\t\ttop = pos.top - (popupHeight + pos.height + 2*offset);\r\n\t\t\t\tif(top < scrolls.y && relativePopupBottom <= yViewport.offsetHeight){\r\n\t\t\t\t\ttop = pos.top;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (top < scrolls.y) {\r\n\t\t\t\ttop = scrolls.y;\r\n\t\t\t}\r\n\r\n\t\t\tconst x = Math.min(Math.max(scrolls.x, pos.left - pos.dx*(width - pos.width)), screenWidth);\r\n\t\t\tconst y = top;\r\n\r\n\t\t\tthis._appendAtCoordinates(x, y);\r\n\t\t} else {\r\n\t\t\tqi.style.top = 20 + \"px\";\r\n\t\t\tif (pos.dx === 1){\r\n\t\t\t\tqi.style.right = \"auto\";\r\n\t\t\t\tqi.style.left = \"-300px\";\r\n\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tqi.style.left = \"10px\";\r\n\t\t\t\t},1);\r\n\t\t\t} else {\r\n\t\t\t\tqi.style.left = \"auto\";\r\n\t\t\t\tqi.style.right = \"-300px\";\r\n\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tqi.style.right = \"10px\";\r\n\t\t\t\t},1);\r\n\t\t\t}\r\n\t\t\tqi.className += \" gantt_qi_\"+(pos.dx === 1 ? \"left\" : \"right\");\r\n\t\t\tgantt.$root.appendChild(qi);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _qi_button_click(node: any) : void {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst box = this._quickInfoBox;\r\n\t\tif (!node || node === box){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(node.closest(\".gantt_cal_qi_close_btn\")){\r\n\t\t\tthis.hide();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst mask = node.className;\r\n\t\tif (mask.indexOf(\"_icon\") !== -1){\r\n\t\t\tconst id = this._quickInfoBoxId;\r\n\t\t\tgantt.$click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else {\r\n\t\t\tthis._qi_button_click(node.parentNode);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _getContainer(): IQuickInfoContainer{\r\n\t\tconst gantt = this._gantt;\r\n\t\tlet container = this._container ? this._container : gantt.$task_data;\r\n\t\tif (container && container.offsetHeight && container.offsetWidth) {\r\n\t\t\treturn {\r\n\t\t\t\tparent: container,\r\n\t\t\t\txViewport: gantt.$task,\r\n\t\t\t\tyViewport: gantt.$task_data\r\n\t\t\t};\r\n\t\t}\r\n\t\tcontainer = this._container ? this._container : gantt.$grid_data;\r\n\t\tif (container && container.offsetHeight && container.offsetWidth) {\r\n\t\t\treturn {\r\n\t\t\t\tparent: container,\r\n\t\t\t\txViewport: gantt.$grid,\r\n\t\t\t\tyViewport: gantt.$grid_data\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tparent: this._container ? this._container : gantt.$layout,\r\n\t\t\txViewport: gantt.$layout,\r\n\t\t\tyViewport: gantt.$layout\r\n\t\t};\r\n\t}\r\n}\r\n","import * as helpers from \"./helpers\";\r\n\r\nvar plainObjectConstructor = ({}).constructor.toString();\r\nfunction isCustomType(object){\r\n\tvar constructorString = object.constructor.toString();\r\n\r\n\treturn constructorString !== plainObjectConstructor;\r\n}\r\n\r\nfunction copy(object) {\r\n\tvar i, result; // iterator, types array, result\r\n\r\n\tif (object && typeof object == \"object\") {\r\n\r\n\t\tswitch (true){\r\n\t\t\tcase (helpers.isDate(object)):\r\n\t\t\t\tresult = new Date(object);\r\n\t\t\t\tbreak;\r\n\t\t\tcase (helpers.isArray(object)):\r\n\t\t\t\tresult = new Array(object.length);\r\n\t\t\t\tfor(i = 0; i < object.length; i++){\r\n\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t/*\t\tcase (helpers.isStringObject(object)):\r\n\t\t\t\tresult = new String(object);\r\n\t\t\t\tbreak;\r\n\t\t\tcase (helpers.isNumberObject(object)):\r\n\t\t\t\tresult = new Number(object);\r\n\t\t\t\tbreak;\r\n\t\t\tcase (helpers.isBooleanObject(object)):\r\n\t\t\t\tresult = new Boolean(object);\r\n\t\t\t\tbreak;*/\r\n\t\t\tdefault:\r\n\t\t\t\tif(isCustomType(object)){\r\n\t\t\t\t\tresult = Object.create(object);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tresult = {};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (i in object) {\r\n\t\t\t\t\tif (Object.prototype.hasOwnProperty.apply(object, [i]))\r\n\t\t\t\t\t\tresult[i] = copy(object[i]);\r\n\t\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn result || object;\r\n}\r\n\r\nfunction mixin (target, source, force){\r\n\tfor (var f in source)\r\n\t\tif (((target[f] === undefined) || force)) target[f]=source[f];\r\n\treturn target;\r\n}\r\n\r\nfunction defined(obj) {\r\n\treturn typeof(obj) != \"undefined\";\r\n}\r\n\r\nvar seed;\r\nfunction uid() {\r\n\tif (!seed)\r\n\t\tseed = (new Date()).valueOf();\r\n\r\n\tseed++;\r\n\treturn seed;\r\n}\r\n\r\n//creates function with specified \"this\" pointer\r\nfunction bind(functor, object){\r\n\tif(functor.bind)\r\n\t\treturn functor.bind(object);\r\n\telse\r\n\t\treturn function(){ return functor.apply(object,arguments); };\r\n}\r\n\r\nfunction event(el, event, handler, capture){\r\n\tif (el.addEventListener)\r\n\t\tel.addEventListener(event, handler, capture === undefined ? false : capture);\r\n\r\n\telse if (el.attachEvent)\r\n\t\tel.attachEvent(\"on\"+event, handler);\r\n}\r\n\r\nfunction eventRemove(el, event, handler, capture){\r\n\tif (el.removeEventListener)\r\n\t\tel.removeEventListener(event, handler, capture === undefined ? false : capture);\r\n\r\n\telse if (el.detachEvent)\r\n\t\tel.detachEvent(\"on\"+event, handler);\r\n}\r\n\r\nexport {\r\n\tcopy,\r\n\tdefined,\r\n\tmixin,\r\n\tuid,\r\n\tbind,\r\n\tevent,\r\n\teventRemove\r\n};","import * as utils from \"../../../utils/utils\";\r\n\r\nfunction createScope(addEvent, removeEvent) {\r\n\taddEvent = addEvent || utils.event;\r\n\tremoveEvent = removeEvent || utils.eventRemove;\r\n\r\n\tvar handlers = [];\r\n\r\n\tvar eventScope = {\r\n\t\tattach: function(el, event, callback, capture){\r\n\t\t\thandlers.push({element: el, event:event, callback: callback, capture: capture});\r\n\t\t\taddEvent(el, event, callback, capture);\r\n\t\t},\r\n\t\tdetach: function(el, event, callback, capture){\r\n\t\t\tremoveEvent(el, event, callback, capture);\r\n\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\tvar handler = handlers[i];\r\n\t\t\t\tif (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\r\n\t\t\t\t\thandlers.splice(i, 1);\r\n\t\t\t\t\ti--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tdetachAll: function () {\r\n\t\t\tvar staticArray = handlers.slice();\r\n\t\t\t// original handlers array can be spliced on every iteration\r\n\t\t\tfor (var i = 0; i < staticArray.length; i++){\r\n\t\t\t\tvar handler = staticArray[i];\r\n\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\r\n\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, undefined);\r\n\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, false);\r\n\t\t\t\teventScope.detach(handler.element, handler.event, handler.callback, true);\r\n\t\t\t}\r\n\t\t\thandlers.splice(0, handlers.length);\r\n\t\t},\r\n\t\textend: function(){\r\n\t\t\treturn createScope(this.event, this.eventRemove);\r\n\t\t}\r\n\t};\r\n\r\n\treturn eventScope;\r\n}\r\n\r\nexport default createScope;","import * as domHelpers from \"../../core/ui/utils/dom_helpers\";\r\n\r\n/* eslint-disable no-restricted-globals */\r\n\r\ninterface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement;\r\n\tprivate _gantt: any;\r\n\r\n\tconstructor(gantt: any){\r\n\t\tthis._gantt = gantt;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst gantt = this._gantt;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"gantt_tooltip\";\r\n\t\t\tgantt._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\t// GS-2463. Don't put the node beyond the body coordinates\r\n\t\t\t// as it may trigger the resize event\r\n\t\t\tnode.style.top = node.style.top || \"0px\";\r\n\t\t\tnode.style.left = node.style.left || \"0px\";\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tgantt._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tgantt._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst gantt = this._gantt;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = gantt.config.tooltip_offset_x;\r\n\t\tconst offsetY = gantt.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of gantt\r\n\t\tif(container === gantt.$task_data){\r\n\t\t\tviewport = gantt.$task;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(gantt.$task);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import domEventsScope from \"../../core/ui/utils/dom_event_scope\";\r\nimport * as domHelpers from \"../../core/ui/utils/dom_helpers\";\r\nimport * as helpers from \"../../utils/helpers\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _gantt: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(gantt: any) {\r\n\t\tthis.tooltip = new Tooltip(gantt);\r\n\t\tthis._gantt = gantt;\r\n\t\tthis._domEvents = domEventsScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst gantt = this._gantt;\r\n\t\tif(!config.global){\r\n\t\t\troot = gantt.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst gantt = this._gantt;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\r\n\t\tthis.delayShow = helpers.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(gantt.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, gantt.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = helpers.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, gantt.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import { IInlineEditState, IMonitor, IUndo, IUndoCommand, TActionType, TEntityType, TUndoValue } from \"./types\";\r\n\r\nconst noTrack = {\r\n\tonBeforeUndo: \"onAfterUndo\",\r\n\tonBeforeRedo: \"onAfterRedo\"\r\n};\r\n\r\nconst batchActions = [\r\n\t\"onTaskDragStart\",\r\n\t\"onAfterTaskUpdate\",\r\n\t\"onAfterTaskDelete\",\r\n\t\"onBeforeBatchUpdate\"\r\n];\r\n\r\nexport class Monitor implements IMonitor {\r\n\tprivate _batchAction = null;\r\n\tprivate _batchMode = false;\r\n\tprivate _ignore = false;\r\n\tprivate _ignoreMoveEvents = false;\r\n\tprivate _initialTasks = {};\r\n\tprivate _initialLinks = {};\r\n\tprivate _nestedTasks = {};\r\n\tprivate _nestedLinks = {};\r\n\tprivate _timeout;\r\n\tprivate _gantt: any;\r\n\tprivate _undo: IUndo;\r\n\r\n\tconstructor(undo: IUndo, gantt: any) {\r\n\t\tthis._undo = undo;\r\n\t\tthis._gantt = gantt;\r\n\t\tthis._attachEvents();\r\n\t}\r\n\r\n\tstore(id: TaskID | LinkID, type: TEntityType, overwrite: boolean = false) {\r\n\t\tif (type === this._gantt.config.undo_types.task) {\r\n\t\t\treturn this._storeTask(id, overwrite);\r\n\t\t}\r\n\t\tif (type === this._gantt.config.undo_types.link) {\r\n\t\t\treturn this._storeLink(id, overwrite);\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\tisMoveEventsIgnored() {\r\n\t\treturn this._ignoreMoveEvents;\r\n\t}\r\n\ttoggleIgnoreMoveEvents(newValue?: boolean) {\r\n\t\tthis._ignoreMoveEvents = newValue || false;\r\n\t}\r\n\tstartIgnore() {\r\n\t\tthis._ignore = true;\r\n\t}\r\n\tstopIgnore() {\r\n\t\tthis._ignore = false;\r\n\t}\r\n\tstartBatchAction() {\r\n\t\t// try catching updates made from event handlers using timeout\r\n\t\tif (!this._timeout){\r\n\t\t\tthis._timeout = setTimeout(() => {\r\n\t\t\t\tthis.stopBatchAction();\r\n\t\t\t\tthis._timeout = null;\r\n\t\t\t}, 10);\r\n\t\t}\r\n\r\n\r\n\t\tif (this._ignore || this._batchMode) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._batchMode = true;\r\n\t\tthis._batchAction = this._undo.action.create();\r\n\t}\r\n\tstopBatchAction() {\r\n\t\tif (this._ignore) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst undo = this._undo;\r\n\t\tif (this._batchAction) {\r\n\t\t\tundo.logAction(this._batchAction);\r\n\t\t}\r\n\t\tthis._batchMode = false;\r\n\t\tthis._batchAction = null;\r\n\t}\r\n\tonTaskAdded(task: ITask) {\r\n\t\tif (!this._ignore) {\r\n\t\t\tthis._storeTaskCommand(task, this._undo.command.type.add);\r\n\t\t}\r\n\t}\r\n\tonTaskUpdated(task: ITask) {\r\n\t\tif (!this._ignore) {\r\n\t\t\tthis._storeTaskCommand(task, this._undo.command.type.update);\r\n\t\t}\r\n\t}\r\n\tonTaskMoved(task: ITask) {\r\n\t\tif (!this._ignore) {\r\n\t\t\t(task as any).$local_index = this._gantt.getTaskIndex(task.id);\r\n\t\t\tconst oldValue = this.getInitialTask(task.id);\r\n\t\t\tif((task as any).$local_index === oldValue.$local_index &&\r\n\t\t\t\tthis._gantt.getParent(task) === this._gantt.getParent(oldValue)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\tthis._storeEntityCommand(\r\n\t\t\t\ttask,\r\n\t\t\t\tthis.getInitialTask(task.id),\r\n\t\t\t\tthis._undo.command.type.move,\r\n\t\t\t\tthis._undo.command.entity.task\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\tonTaskDeleted(task: ITask) {\r\n\t\tif (!this._ignore) {\r\n\t\t\tthis._storeTaskCommand(task, this._undo.command.type.remove);\r\n\t\t\tif (this._nestedTasks[task.id]) {\r\n\t\t\t\tconst children = this._nestedTasks[task.id];\r\n\t\t\t\tfor (let i = 0; i < children.length; i++) {\r\n\t\t\t\t\tthis._storeTaskCommand(children[i], this._undo.command.type.remove);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (this._nestedLinks[task.id]) {\r\n\t\t\t\tconst childrenLinks = this._nestedLinks[task.id];\r\n\t\t\t\tfor (let i = 0; i < childrenLinks.length; i++) {\r\n\t\t\t\t\tthis._storeLinkCommand(childrenLinks[i], this._undo.command.type.remove);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tonLinkAdded(link: ILink) {\r\n\t\tif (!this._ignore) {\r\n\t\t\tthis._storeLinkCommand(link, this._undo.command.type.add);\r\n\t\t}\r\n\t}\r\n\tonLinkUpdated(link: ILink) {\r\n\t\tif (!this._ignore) {\r\n\t\t\tthis._storeLinkCommand(link, this._undo.command.type.update);\r\n\t\t}\r\n\t}\r\n\tonLinkDeleted(link: ILink) {\r\n\t\tif (!this._ignore) {\r\n\t\t\tthis._storeLinkCommand(link, this._undo.command.type.remove);\r\n\t\t}\r\n\t}\r\n\tsetNestedTasks(id: TaskID, taskIds: TaskID[]) {\r\n\t\tconst gantt = this._gantt;\r\n\t\tlet task = null;\r\n\t\tconst tasks = [];\r\n\t\tlet\tlinkIds = this._getLinks(gantt.getTask(id));\r\n\r\n\t\tfor (let i = 0; i < taskIds.length; i++) {\r\n\t\t\ttask = this.setInitialTask(taskIds[i]);\r\n\t\t\tlinkIds = linkIds.concat(this._getLinks(task));\r\n\t\t\ttasks.push(task);\r\n\t\t}\r\n\r\n\t\tconst uniqueLinks = {};\r\n\t\tfor (let i = 0; i < linkIds.length; i++) {\r\n\t\t\tuniqueLinks[linkIds[i]] = true;\r\n\t\t}\r\n\t\tconst links = [];\r\n\t\tfor (const i in uniqueLinks) {\r\n\t\t\tlinks.push(this.setInitialLink(i));\r\n\t\t}\r\n\t\tthis._nestedTasks[id] = tasks;\r\n\t\tthis._nestedLinks[id] = links;\r\n\t}\r\n\tsetInitialTask(id: TaskID, overwrite?: boolean) {\r\n\t\tconst gantt = this._gantt;\r\n\t\tif (overwrite || (!this._initialTasks[id] || !this._batchMode)) {\r\n\t\t\tconst task = gantt.copy(gantt.getTask(id));\r\n\t\t\ttask.$index = gantt.getGlobalTaskIndex(id);\r\n\t\t\ttask.$local_index = gantt.getTaskIndex(id);\r\n\t\t\tthis.setInitialTaskObject(id, task);\r\n\t\t}\r\n\t\treturn this._initialTasks[id];\r\n\t}\r\n\tgetInitialTask(id: TaskID) {\r\n\t\treturn this._initialTasks[id];\r\n\t}\r\n\tclearInitialTasks() {\r\n\t\tthis._initialTasks = {};\r\n\t}\r\n\tsetInitialTaskObject(id: TaskID, object: ITask) {\r\n\t\tthis._initialTasks[id] = object;\r\n\t}\r\n\tsetInitialLink(id: LinkID, overwrite?: boolean) {\r\n\t\tif (!this._initialLinks[id] || !this._batchMode) {\r\n\t\t\tthis._initialLinks[id] = this._gantt.copy(this._gantt.getLink(id));\r\n\t\t}\r\n\t\treturn this._initialLinks[id];\r\n\t}\r\n\tgetInitialLink(id: LinkID) {\r\n\t\treturn this._initialLinks[id];\r\n\t}\r\n\tclearInitialLinks() {\r\n\t\tthis._initialLinks = {};\r\n\t}\r\n\tprivate _attachEvents() {\r\n\t\tlet deleteCacheCooldown = null;\r\n\t\tconst gantt = this._gantt;\r\n\r\n\t\tconst saveInitialAll = () => {\r\n\t\t\tif (!deleteCacheCooldown) {\r\n\t\t\t\tdeleteCacheCooldown = setTimeout(() => {\r\n\t\t\t\t\tdeleteCacheCooldown = null;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.clearInitialTasks();\r\n\t\t\t\tgantt.eachTask((task: ITask) => {\r\n\t\t\t\t\tthis.setInitialTask(task.id);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.clearInitialLinks();\r\n\t\t\t\tgantt.getLinks().forEach((link: ILink) => {\r\n\t\t\t\t\tthis.setInitialLink(link.id);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\t\tconst getMoveObjectByTaskId = (id: TaskID) => {\r\n\t\t\treturn gantt.copy(gantt.getTask(id));\r\n\t\t};\r\n\r\n\t\tfor (const i in noTrack) {\r\n\t\t\tgantt.attachEvent(i, () => {\r\n\t\t\t\tthis.startIgnore();\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t\tgantt.attachEvent(noTrack[i], () => {\r\n\t\t\t\tthis.stopIgnore();\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < batchActions.length; i++) {\r\n\t\t\tgantt.attachEvent(batchActions[i], () => {\r\n\t\t\t\tthis.startBatchAction();\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tgantt.attachEvent(\"onParse\", () => {\r\n\t\t\tthis._undo.clearUndoStack();\r\n\t\t\tthis._undo.clearRedoStack();\r\n\t\t\tsaveInitialAll();\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterTaskAdd\", (id: TaskID, task: ITask) => {\r\n\t\t\tthis.setInitialTask(id, true);\r\n\t\t\tthis.onTaskAdded(task);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterTaskUpdate\", (id: TaskID, task: ITask) => {\r\n\t\t\tthis.onTaskUpdated(task);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterTaskDelete\", (id: TaskID, task: ITask) => {\r\n\t\t\tthis.onTaskDeleted(task);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterLinkAdd\", (id: LinkID, link: ILink) => {\r\n\t\t\tthis.setInitialLink(id, true);\r\n\t\t\tthis.onLinkAdded(link);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterLinkUpdate\", (id: LinkID, link: ILink) => {\r\n\t\t\tthis.onLinkUpdated(link);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterLinkDelete\", (id: LinkID, link: ILink) => {\r\n\t\t\tthis.onLinkDeleted(link);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onRowDragEnd\", (id: TaskID, target: TaskID) => {\r\n\t\t\tthis.onTaskMoved(getMoveObjectByTaskId(id));\r\n\t\t\tthis.toggleIgnoreMoveEvents();\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onBeforeTaskDelete\", (id: TaskID) => {\r\n\t\t\tthis.store(id, gantt.config.undo_types.task);\r\n\t\t\tconst nested = [];\r\n\r\n\t\t\t// remember task indexes in case their being deleted in a loop, so they could be restored in the correct order\r\n\t\t\tsaveInitialAll();\r\n\r\n\t\t\tgantt.eachTask((task: ITask) => {\r\n\t\t\t\tnested.push(task.id);\r\n\t\t\t}, id);\r\n\t\t\tthis.setNestedTasks(id, nested);\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tconst datastore = gantt.getDatastore(\"task\");\r\n\r\n\t\tdatastore.attachEvent(\"onBeforeItemMove\", (id: TaskID, parent: TaskID, tindex: number) => {\r\n\t\t\tif (!this.isMoveEventsIgnored()) {\r\n\t\t\t\tsaveInitialAll();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tdatastore.attachEvent(\"onAfterItemMove\", (id: TaskID, parent: TaskID, tindex: number) => {\r\n\t\t\tif (!this.isMoveEventsIgnored()) {\r\n\t\t\t\tthis.onTaskMoved(getMoveObjectByTaskId(id));\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tgantt.attachEvent(\"onRowDragStart\", (id: TaskID, target: TaskID, e: Event) => {\r\n\t\t\tthis.toggleIgnoreMoveEvents(true);\r\n\t\t\tsaveInitialAll();\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tlet dragId = null;\r\n\t\tlet projectDrag = false;\r\n\t\tgantt.attachEvent(\"onBeforeTaskDrag\", (taskId: TaskID) => {\r\n\t\t\tdragId = gantt.getState().drag_id;\r\n\t\t\tif (dragId === taskId){\r\n\t\t\t\tconst task = gantt.getTask(taskId);\r\n\t\t\t\tif (gantt.isSummaryTask(task) && gantt.config.drag_project){\r\n\t\t\t\t\tprojectDrag = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// GS-99. Store the initial task dates before multiple drag\r\n\t\t\tif (gantt.plugins().multiselect){\r\n\t\t\t\tconst selectedIds = gantt.getSelectedTasks();\r\n\t\t\t\tif (selectedIds.length > 1){\r\n\t\t\t\t\tselectedIds.forEach((id)=>{\r\n\t\t\t\t\t\tthis.store(id, gantt.config.undo_types.task, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn this.store(taskId, gantt.config.undo_types.task);\r\n\t\t});\r\n\r\n\t\tgantt.attachEvent(\"onAfterTaskDrag\", (taskId: TaskID) => {\r\n\t\t\t// if we drag multiple tasks and other tasks move to another date after that,\r\n\t\t\t// auto-scheduling/correct work time should occur in anoher command.\r\n\t\t\t// otherwise, when we undo the changes, the task constraint is not restored correctly\r\n\t\t\tconst multipleDrag = projectDrag || (gantt.plugins().multiselect && gantt.getSelectedTasks().length > 1);\r\n\t\t\tif (multipleDrag && dragId === taskId){\r\n\t\t\t\tprojectDrag = false;\r\n\t\t\t\tdragId = null;\r\n\t\t\t\tthis.stopBatchAction();\r\n\t\t\t}\r\n\t\t\t// GS-99. When dragging multiple tasks, we need to store the initial tasks\r\n\t\t\tthis.store(taskId, gantt.config.undo_types.task, true);\r\n\t\t});\r\n\r\n\t\tgantt.attachEvent(\"onLightbox\", (taskId: TaskID) => this.store(taskId, gantt.config.undo_types.task));\r\n\r\n\t\tgantt.attachEvent(\"onBeforeTaskAutoSchedule\", (task: ITask) => {\r\n\t\t\tthis.store(task.id, gantt.config.undo_types.task, true);\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tif (gantt.ext.inlineEditors) {\r\n\t\t\t// remove the onGanttLayoutReady wrapper when GS-1288 is merged\r\n\t\t\tlet onBeforeEditStartId = null;\r\n\t\t\tlet onEditStart = null;\r\n\t\t\tgantt.attachEvent(\"onGanttLayoutReady\", () => {\r\n\t\t\t\tif (onBeforeEditStartId) {\r\n\t\t\t\t\tgantt.ext.inlineEditors.detachEvent(onBeforeEditStartId);\r\n\t\t\t\t}\r\n\t\t\t\tif (onEditStart) {\r\n\t\t\t\t\tgantt.ext.inlineEditors.detachEvent(onEditStart);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tonEditStart = gantt.ext.inlineEditors.attachEvent(\"onEditStart\", (state: IInlineEditState) => {\r\n\t\t\t\t\tthis.store(state.id, gantt.config.undo_types.task);\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// GS-99. If another inline editor is opened and we open a new inline editor,\r\n\t\t\t\t// we shouldn't use the batchAction\r\n\t\t\t\tonBeforeEditStartId = gantt.ext.inlineEditors.attachEvent(\"onBeforeEditStart\", (state: IInlineEditState) => {\r\n\t\t\t\t\tthis.stopBatchAction();\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _storeCommand(command: IUndoCommand) {\r\n\t\tconst undo = this._undo;\r\n\t\tundo.updateConfigs();\r\n\r\n\t\tif (!undo.undoEnabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (this._batchMode) {\r\n\t\t\tthis._batchAction.commands.push(command);\r\n\t\t} else {\r\n\t\t\tconst action = undo.action.create([command]);\r\n\t\t\tundo.logAction(action);\r\n\t\t}\r\n\t}\r\n\tprivate _storeEntityCommand(obj: TUndoValue, old: TUndoValue, actionType: TActionType, entityType: TEntityType) {\r\n\t\tconst undo = this._undo;\r\n\t\tconst command = undo.command.create(obj, old, actionType, entityType);\r\n\t\tthis._storeCommand(command);\r\n\t}\r\n\tprivate _storeTaskCommand(obj: ITask, type: TActionType) {\r\n\t\tif(this._gantt.isTaskExists(obj.id)){\r\n\t\t\t(obj as any).$local_index = this._gantt.getTaskIndex(obj.id);\r\n\t\t}\r\n\r\n\t\tthis._storeEntityCommand(obj, this.getInitialTask(obj.id), type, this._undo.command.entity.task);\r\n\t}\r\n\tprivate _storeLinkCommand(obj: ILink, type: TActionType) {\r\n\t\tthis._storeEntityCommand(obj, this.getInitialLink(obj.id), type, this._undo.command.entity.link);\r\n\t}\r\n\tprivate _getLinks(task: ITask) {\r\n\t\treturn task.$source.concat(task.$target);\r\n\t}\r\n\tprivate _storeTask(taskId: TaskID, overwrite: boolean = false) {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis.setInitialTask(taskId, overwrite);\r\n\t\tgantt.eachTask((child: ITask) => {\r\n\t\t\tthis.setInitialTask(child.id);\r\n\t\t}, taskId);\r\n\t\treturn true;\r\n\t}\r\n\tprivate _storeLink(linkId: LinkID, overwrite: boolean = false) {\r\n\t\tthis.setInitialLink(linkId, overwrite);\r\n\t\treturn true;\r\n\t}\r\n}","import { IUndo, IUndoCommand, IUndoCommands, IUndoPropAction, IUndoPropCommand, TActionType, TEntityType, TUndoStack, TUndoValue } from \"./types\";\r\n\r\nconst MAX_UNDO_STEPS = 100;\r\n\r\nexport class Undo implements IUndo {\r\n\r\n\tmaxSteps = MAX_UNDO_STEPS;\r\n\tundoEnabled = true;\r\n\tredoEnabled = true;\r\n\taction: IUndoPropAction = {\r\n\t\tcreate: (commands?: IUndoCommand[]): IUndoCommands => {\r\n\t\t\treturn { commands: (commands ? commands.slice() : []) };\r\n\t\t},\r\n\t\tinvert: (action: IUndoCommands): IUndoCommands => {\r\n\t\t\tconst gantt = this._gantt;\r\n\t\t\tconst revert = gantt.copy(action);\r\n\t\t\tconst commands = this.command;\r\n\t\t\tfor (let i = 0; i < action.commands.length; i++) {\r\n\t\t\t\tconst command = revert.commands[i] = commands.invert(revert.commands[i]);\r\n\t\t\t\tif (command.type === commands.type.update || command.type === commands.type.move) {\r\n\t\t\t\t\t[command.value, command.oldValue] = [command.oldValue, command.value];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn revert as IUndoCommands;\r\n\t\t}\r\n\t};\r\n\tcommand: IUndoPropCommand = {\r\n\t\t// entities that require different processing for undoing-redoing changes (gantt.config.undo_types)\r\n\t\tentity: null,\r\n\r\n\t\t// types of traced actions (gantt.config.undo_actions)\r\n\t\ttype: null,\r\n\r\n\t\tcreate: (value: TUndoValue, oldValue: TUndoValue, type: TActionType, entity: TEntityType): IUndoCommand => {\r\n\t\t\tconst gantt = this._gantt;\r\n\t\t\treturn {\r\n\t\t\t\tentity,\r\n\t\t\t\ttype,\r\n\t\t\t\tvalue: gantt.copy(value),\r\n\t\t\t\toldValue: gantt.copy(oldValue || value)\r\n\t\t\t};\r\n\t\t},\r\n\t\tinvert: (command: IUndoCommand): IUndoCommand => {\r\n\t\t\tconst gantt = this._gantt;\r\n\t\t\tconst revert = gantt.copy(command);\r\n\t\t\trevert.type = this.command.inverseCommands(command.type);\r\n\t\t\treturn revert;\r\n\t\t},\r\n\t\tinverseCommands: (command: TActionType): TActionType => {\r\n\t\t\tconst gantt = this._gantt;\r\n\t\t\tconst types = this.command.type;\r\n\t\t\tswitch (command) {\r\n\t\t\t\tcase types.update:\r\n\t\t\t\t\treturn types.update;\r\n\t\t\t\tcase types.remove:\r\n\t\t\t\t\treturn types.add;\r\n\t\t\t\tcase types.add:\r\n\t\t\t\t\treturn types.remove;\r\n\t\t\t\tcase types.move:\r\n\t\t\t\t\treturn types.move;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tgantt.assert(false, \"Invalid command \"+ command);\r\n\t\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tprivate _undoStack = [];\r\n\tprivate _redoStack = [];\r\n\tprivate _gantt: any;\r\n\r\n\tconstructor(gantt: any){\r\n\t\tthis._gantt = gantt;\r\n\t}\r\n\tgetUndoStack() {\r\n\t\treturn this._undoStack;\r\n\t}\r\n\tsetUndoStack(stack: []) {\r\n\t\tthis._undoStack = stack;\r\n\t}\r\n\r\n\tgetRedoStack() {\r\n\t\treturn this._redoStack;\r\n\t}\r\n\tsetRedoStack(stack: []) {\r\n\t\tthis._redoStack = stack;\r\n\t}\r\n\r\n\tclearUndoStack() {\r\n\t\tthis._undoStack = [];\r\n\t}\r\n\r\n\tclearRedoStack() {\r\n\t\tthis._redoStack = [];\r\n\t}\r\n\r\n\tupdateConfigs() {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis.maxSteps = gantt.config.undo_steps || MAX_UNDO_STEPS;\r\n\t\tthis.command.entity = gantt.config.undo_types;\r\n\t\tthis.command.type = gantt.config.undo_actions;\r\n\t\tthis.undoEnabled = !!gantt.config.undo;\r\n\t\tthis.redoEnabled = !!gantt.config.redo; // GS-873, Redo should work even when the `gantt.config.undo` is disabled.\r\n\t}\r\n\r\n\tundo() {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis.updateConfigs();\r\n\t\tif (!this.undoEnabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst action = this._pop(this._undoStack);\r\n\t\tif (action) {\r\n\t\t\tthis._reorderCommands(action);\r\n\t\t}\r\n\t\tif (gantt.callEvent(\"onBeforeUndo\", [action]) !== false) {\r\n\t\t\tif (action) {\r\n\t\t\t\tthis._applyAction(this.action.invert(action));\r\n\t\t\t\tthis._push(this._redoStack, gantt.copy(action));\r\n\t\t\t\tgantt.callEvent(\"onAfterUndo\", [action]);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgantt.callEvent(\"onAfterUndo\", [null]);\r\n\t}\r\n\r\n\tredo() {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis.updateConfigs();\r\n\t\tif (!this.redoEnabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst action = this._pop(this._redoStack);\r\n\t\tif (action) {\r\n\t\t\tthis._reorderCommands(action);\r\n\t\t}\r\n\r\n\t\tif (gantt.callEvent(\"onBeforeRedo\", [action]) !== false) {\r\n\t\t\tif (action) {\r\n\t\t\t\tthis._applyAction(action);\r\n\t\t\t\tthis._push(this._undoStack, gantt.copy(action));\r\n\t\t\t\tgantt.callEvent(\"onAfterRedo\", [action]);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgantt.callEvent(\"onAfterRedo\", [null]);\r\n\t}\r\n\r\n\t// storeUndo:\r\n\tlogAction(action: IUndoCommands) {\r\n\t\tthis._push(this._undoStack, action);\r\n\t\tthis._redoStack = [];\r\n\t}\r\n\r\n\tprivate _push(stack: TUndoStack, action: IUndoCommands): IUndoCommands {\r\n\t\tconst gantt = this._gantt;\r\n\t\tif (!action.commands.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst event = stack === this._undoStack ? \"onBeforeUndoStack\" : \"onBeforeRedoStack\";\r\n\t\tif (gantt.callEvent(event, [action]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// commands can be removed from event handler\r\n\t\tif (!action.commands.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tstack.push(action);\r\n\t\twhile (stack.length > this.maxSteps) {\r\n\t\t\tstack.shift();\r\n\t\t}\r\n\t\treturn action;\r\n\t}\r\n\r\n\tprivate _pop(stack: TUndoStack): IUndoCommands {\r\n\t\treturn stack.pop();\r\n\t}\r\n\r\n\tprivate _reorderCommands(action) {\r\n\t\t// firstly process tasks and only then links\r\n\t\t// in order to ensure links are added not earlier than their tasks\r\n\t\t// firstly to 'move' actions and only then updates\r\n\t\tconst weights = { any: 0, link:1, task:2 };\r\n\t\tconst actionWeights = { move: 1, any:0 };\r\n\t\taction.commands.sort(function(a, b) {\r\n\t\t\tif (a.entity === \"task\" && b.entity === \"task\") {\r\n\t\t\t\tif (a.type !== b.type) {\r\n\t\t\t\t\treturn (actionWeights[b.type] || 0) - (actionWeights[a.type] || 0);\r\n\t\t\t\t} else if (a.type === \"move\" && a.oldValue && b.oldValue && b.oldValue.parent === a.oldValue.parent) {\r\n\t\t\t\t\treturn a.oldValue.$index - b.oldValue.$index;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst weightA = weights[a.entity] || weights.any;\r\n\t\t\t\tconst weightB = weights[b.entity] || weights.any;\r\n\t\t\t\treturn weightB - weightA;\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _applyAction(action: IUndoCommands) {\r\n\t\tlet command = null;\r\n\t\tconst entities = this.command.entity;\r\n\t\tconst actions = this.command.type;\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst methods = {};\r\n\t\tmethods[entities.task] = {\r\n\t\t\tadd: \"addTask\",\r\n\t\t\tget: \"getTask\",\r\n\t\t\tupdate: \"updateTask\",\r\n\t\t\tremove: \"deleteTask\",\r\n\t\t\tmove: \"moveTask\",\r\n\t\t\tisExists: \"isTaskExists\"\r\n\t\t};\r\n\t\tmethods[entities.link] = {\r\n\t\t\tadd: \"addLink\",\r\n\t\t\tget: \"getLink\",\r\n\t\t\tupdate: \"updateLink\",\r\n\t\t\tremove: \"deleteLink\",\r\n\t\t\tisExists: \"isLinkExists\"\r\n\t\t};\r\n\r\n\t\tgantt.batchUpdate(function() {\r\n\t\t\t// it is logical to undo actions from the last one to the first one\r\n\t\t\t// but we have to do it from the first one because the order\r\n\t\t\t// of tasks ($index and $local_index) depends on the existing tasks\r\n\t\t\tfor (let i = 0; i < action.commands.length; i++) {\r\n\t\t\t\tcommand = action.commands[i];\r\n\t\t\t\tconst method = methods[command.entity][command.type];\r\n\t\t\t\tconst getMethod = methods[command.entity].get;\r\n\t\t\t\tconst check = methods[command.entity].isExists;\r\n\r\n\t\t\t\tif (command.type === actions.add) {\r\n\t\t\t\t\tgantt[method](command.oldValue, command.oldValue.parent, command.oldValue.$local_index);\r\n\t\t\t\t} else if (command.type === actions.remove) {\r\n\t\t\t\t\tif (gantt[check](command.value.id)) {\r\n\t\t\t\t\t\tgantt[method](command.value.id);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (command.type === actions.update) {\r\n\t\t\t\t\tconst item = gantt[getMethod](command.value.id);\r\n\t\t\t\t\tfor(const prop in command.value){\r\n\t\t\t\t\t\tif(!prop.startsWith(\"$\") && !prop.startsWith(\"_\")){\r\n\t\t\t\t\t\t\titem[prop] = command.value[prop];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tgantt[method](command.value.id);\r\n\t\t\t\t} else if (command.type === actions.move) {\r\n\t\t\t\t\tgantt[method](command.value.id, command.value.$local_index, command.value.parent);\r\n\t\t\t\t\t// GS-680: We should send the changes to the server after we undo vertical reorder\r\n\t\t\t\t\tgantt.callEvent(\"onRowDragEnd\", [command.value.id]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}","\r\nimport click_drag from \"./click_drag\";\r\nimport drag_timeline from \"./drag_timeline\";\r\nimport export_api from \"./export_api\";\r\nimport fullscreen from \"./fullscreen\";\r\nimport keyboard_navigation from \"./keyboard_navigation\";\r\nimport marker from \"./marker\";\r\nimport multiselect from \"./multiselect\";\r\nimport quick_info from \"./quick_info\";\r\nimport tooltip from \"./tooltip\";\r\nimport undo from \"./undo\";\r\n\r\nexport default {\r\n\tclick_drag,\r\n\tdrag_timeline,\r\n\tfullscreen,\r\n\tkeyboard_navigation,\r\n\tquick_info,\r\n\ttooltip,\r\n\tundo,\r\n\tmarker,\r\n\tmultiselect,\r\n\texport_api\r\n};","import { EventsManager } from \"./eventsManager\";\r\nimport { ISelectedRegionConfig, SelectedRegion } from \"./selectedRegion\";\r\n\r\nexport default function(gantt: any){\r\n\tif (!gantt.ext) {\r\n\t\tgantt.ext = {};\r\n\t}\r\n\r\n\tconst defaultConfig: ISelectedRegionConfig = {\r\n\t\tclassName: \"gantt_click_drag_rect\",\r\n\t\tuseRequestAnimationFrame: true,\r\n\t\tcallback: undefined,\r\n\t\tsingleRow: false\r\n\t};\r\n\r\n\tconst eventsManager = new EventsManager(gantt);\r\n\r\n\tgantt.ext.clickDrag = eventsManager;\r\n\r\n\tgantt.attachEvent(\"onGanttReady\", () => {\r\n\t\tconst config: ISelectedRegionConfig = { viewPort: gantt.$task_data, ...defaultConfig };\r\n\t\tif (gantt.config.click_drag){\r\n\t\t\tconst clickDrag = gantt.config.click_drag;\r\n\t\t\tconfig.render = clickDrag.render || defaultConfig.render;\r\n\t\t\tconfig.className = clickDrag.className || defaultConfig.className;\r\n\t\t\tconfig.callback = clickDrag.callback || defaultConfig.callback;\r\n\t\t\tconfig.viewPort = clickDrag.viewPort || gantt.$task_data;\r\n\t\t\tconfig.useRequestAnimationFrame = clickDrag.useRequestAnimationFrame === undefined ?\r\n\t\t\t\tdefaultConfig.useRequestAnimationFrame : clickDrag.useRequestAnimationFrame;\r\n\r\n\t\t\tconfig.singleRow = clickDrag.singleRow === undefined ? defaultConfig.singleRow : clickDrag.singleRow;\r\n\t\t\tconst timeline = gantt.$ui.getView(\"timeline\");\r\n\t\t\tconst selectedRegion = new SelectedRegion(config, gantt, timeline);\r\n\t\t\tgantt.ext.clickDrag.attach(selectedRegion, clickDrag.useKey, clickDrag.ignore);\r\n\t\t}\r\n\t});\r\n\r\n\tgantt.attachEvent(\"onDestroy\", () => {\r\n\t\teventsManager.destructor();\r\n\t});\r\n\r\n}","import { EventsManager } from \"./eventsManager\";\r\nexport default function(gantt: any){\r\n\tif (!gantt.ext){\r\n\t\tgantt.ext = {};\r\n\t}\r\n\r\n\tgantt.ext.dragTimeline = {\r\n\t\tcreate: () => EventsManager.create(gantt)\r\n\t};\r\n\r\n\tgantt.config.drag_timeline = {\r\n\t\tenabled: true,\r\n\t\trender: false\r\n\t};\r\n}","export default function(gantt: any){\r\n\r\ninterface IBody extends HTMLElement {\r\n\tmsRequestFullscreen?: () => void;\r\n\tmozRequestFullScreen?: () => void;\r\n\twebkitRequestFullscreen?: (ALLOW_KEYBOARD_INPUT: any) => void;\r\n}\r\n\r\n\r\ninterface IConsole extends Console {\r\n\twarning?: (str: string) => void;\r\n}\r\n\r\ninterface IDocument extends Document {\r\n\tfullscreenElement: Element;\r\n\tmozFullScreenElement?: Element;\r\n\twebkitFullscreenElement?: Element;\r\n\tmsFullscreenElement?: Element;\r\n\twebkitFullscreenEnabled?: boolean;\r\n\tmozFullScreenEnabled?: boolean;\r\n\tmsFullscreenEnabled?: boolean;\r\n\tmsExitFullscreen?: () => void;\r\n\tmozCancelFullScreen?: () => void;\r\n\twebkitExitFullscreen?: () => void;\r\n}\r\n\r\ninterface IElement extends Element {\r\n\tALLOW_KEYBOARD_INPUT?: boolean;\r\n}\r\n\r\ninterface IElementSizes extends ISizes {\r\n\tmodified: boolean;\r\n}\r\n\r\ninterface ISizes {\r\n\twidth: null | string;\r\n\theight: null | string;\r\n\ttop: null | string;\r\n\tleft: null | string;\r\n\tposition: null | string;\r\n\tzIndex: null | number;\r\n}\r\n\r\nfunction isExpanded() {\r\n\tconst element = ((document as IDocument).fullscreenElement ||\r\n\t\t(document as IDocument).mozFullScreenElement ||\r\n\t\t(document as IDocument).webkitFullscreenElement ||\r\n\t\t(document as IDocument).msFullscreenElement);\r\n\treturn !!(element && element === document.body);\r\n}\r\n\r\nfunction isFullscreenAvailable() {\r\n\ttry {\r\n\t\treturn (document as IDocument).fullscreenEnabled ||\r\n\t\t\t(document as IDocument).webkitFullscreenEnabled ||\r\n\t\t\t(document as IDocument).mozFullScreenEnabled ||\r\n\t\t\t(document as IDocument).msFullscreenEnabled;\r\n\t} catch (e) {\r\n\t\t// eslint-disable-next-line no-console\r\n\t\tconsole.error(\"Fullscreen is not available:\", e); \r\n\t}\r\n}\r\n\r\nconst state = gantt.$services.getService(\"state\");\r\nstate.registerProvider(\"fullscreen\", () => {\r\n\tif (isFullscreenAvailable()){\r\n\t\treturn { fullscreen: isExpanded() };\r\n\t} else {\r\n\t\treturn undefined;\r\n\t}\r\n});\r\n\r\nlet backupBodyPadding = {\r\n\toverflow: null,\r\n\tpadding: null,\r\n\tpaddingTop: null,\r\n\tpaddingRight: null,\r\n\tpaddingBottom: null,\r\n\tpaddingLeft: null\r\n};\r\n\r\nconst backupElementSizes: IElementSizes = {\r\n\twidth: null,\r\n\theight: null,\r\n\ttop: null,\r\n\tleft: null,\r\n\tposition: null,\r\n\tzIndex: null,\r\n\tmodified: false\r\n};\r\n\r\nlet backupPositioning = null;\r\nfunction resetParentPositioning(root){\r\n\tlet parent = root.parentNode;\r\n\tconst positions = [];\r\n\twhile(parent && parent.style){\r\n\t\tpositions.push({\r\n\t\t\telement: parent,\r\n\t\t\toriginalPositioning: parent.style.position\r\n\t\t});\r\n\t\tparent.style.position = \"static\";\r\n\t\tparent = parent.parentNode;\r\n\t}\r\n\treturn positions;\r\n}\r\n\r\nfunction restoreParentPositioning(positions: any[]){\r\n\tpositions.forEach(record => {\r\n\t\trecord.element.style.position = record.originalPositioning;\r\n\t});\r\n}\r\n\r\n// expand gantt root element to fullscreen automatically\r\nfunction setFullScreenSizes() {\r\n\tconst root = gantt.ext.fullscreen.getFullscreenElement();\r\n\tconst body = document.body;\r\n\tupdateSizes(root.style, backupElementSizes);\r\n\tbackupBodyPadding = {\r\n\t\toverflow: body.style.overflow,\r\n\t\tpadding: body.style.padding ? body.style.padding : null,\r\n\t\tpaddingTop: body.style.paddingTop ? body.style.paddingTop : null,\r\n\t\tpaddingRight: body.style.paddingRight ? body.style.paddingRight : null,\r\n\t\tpaddingBottom: body.style.paddingBottom ? body.style.paddingBottom : null,\r\n\t\tpaddingLeft: body.style.paddingLeft ? body.style.paddingLeft : null\r\n\t};\r\n\r\n\tif (body.style.padding) {\r\n\t\tbody.style.padding = \"0\";\r\n\t}\r\n\tif (body.style.paddingTop) {\r\n\t\tbody.style.paddingTop = \"0\";\r\n\t}\r\n\tif (body.style.paddingRight) {\r\n\t\tbody.style.paddingRight = \"0\";\r\n\t}\r\n\tif (body.style.paddingBottom) {\r\n\t\tbody.style.paddingBottom = \"0\";\r\n\t}\r\n\tif (body.style.paddingLeft) {\r\n\t\tbody.style.paddingLeft = \"0\";\r\n\t}\r\n\r\n\tbody.style.overflow = \"hidden\";\r\n\r\n\troot.style.width = \"100vw\";\r\n\troot.style.height = \"100vh\";\r\n\troot.style.top = \"0px\";\r\n\troot.style.left = \"0px\";\r\n\troot.style.position = \"absolute\";\r\n\troot.style.zIndex = 1;\r\n\tbackupElementSizes.modified = true;\r\n\tbackupPositioning = resetParentPositioning(root);\r\n}\r\n\r\nfunction restoreSizes() {\r\n\tconst root = gantt.ext.fullscreen.getFullscreenElement();\r\n\tconst body = document.body;\r\n\tif (backupElementSizes.modified) {\r\n\t\tif (backupBodyPadding.padding) {\r\n\t\t\tbody.style.padding = backupBodyPadding.padding;\r\n\t\t}\r\n\t\tif (backupBodyPadding.paddingTop) {\r\n\t\t\tbody.style.paddingTop = backupBodyPadding.paddingTop;\r\n\t\t}\r\n\t\tif (backupBodyPadding.paddingRight) {\r\n\t\t\tbody.style.paddingRight = backupBodyPadding.paddingRight;\r\n\t\t}\r\n\t\tif (backupBodyPadding.paddingBottom) {\r\n\t\t\tbody.style.paddingBottom = backupBodyPadding.paddingBottom;\r\n\t\t}\r\n\t\tif (backupBodyPadding.paddingLeft) {\r\n\t\t\tbody.style.paddingLeft = backupBodyPadding.paddingLeft;\r\n\t\t}\r\n\r\n\t\tbody.style.overflow = backupBodyPadding.overflow;\r\n\t\tbackupBodyPadding = {\r\n\t\t\toverflow: null,\r\n\t\t\tpadding: null,\r\n\t\t\tpaddingTop: null,\r\n\t\t\tpaddingRight: null,\r\n\t\t\tpaddingBottom: null,\r\n\t\t\tpaddingLeft: null\r\n\t\t};\r\n\t\tupdateSizes(backupElementSizes, root.style);\r\n\t\tbackupElementSizes.modified = false;\r\n\t}\r\n\trestoreParentPositioning(backupPositioning);\r\n\tbackupPositioning = null;\r\n}\r\n\r\nfunction updateSizes(source: ISizes, target: ISizes) {\r\n\ttarget.width = source.width;\r\n\ttarget.height = source.height;\r\n\ttarget.top = source.top;\r\n\ttarget.left = source.left;\r\n\ttarget.position = source.position;\r\n\ttarget.zIndex = source.zIndex;\r\n}\r\n\r\nfunction addDOMEvents() {\r\n\tgantt.event(document, \"webkitfullscreenchange\", onFullScreenChange);\r\n\tgantt.event(document, \"mozfullscreenchange\", onFullScreenChange);\r\n\tgantt.event(document, \"MSFullscreenChange\", onFullScreenChange);\r\n\t// For IE on Win 10\r\n\tgantt.event(document, \"fullscreenChange\", onFullScreenChange);\r\n\tgantt.event(document, \"fullscreenchange\", onFullScreenChange);\r\n}\r\n\r\nlet expandGantt = false;\r\nfunction onFullScreenChange() {\r\n\tif (!gantt.$container) {\r\n\t\t// do nothing if gantt is not yet initialized\r\n\t\treturn;\r\n\t}\r\n\tlet event: \"onExpand\" | \"onCollapse\";\r\n\tconst isBodyExpanded = isExpanded();\r\n\r\n\tif (isBodyExpanded) {\r\n\t\tif (expandGantt) {\r\n\t\t\tevent = \"onExpand\";\r\n\t\t\tsetFullScreenSizes();\r\n\t\t}\r\n\t} else if (expandGantt) {\r\n\t\texpandGantt = false;\r\n\t\tevent = \"onCollapse\";\r\n\t\trestoreSizes();\r\n\t}\r\n\tsetTimeout(() => {\r\n\t\tgantt.render();\r\n\t});\r\n\tsetTimeout(() => {\r\n\t\tgantt.callEvent(event, [gantt.ext.fullscreen.getFullscreenElement()]);\r\n\t});\r\n}\r\n\r\nfunction cantFullscreen() {\r\n\tif (!gantt.$container) { // check is gantt initialized or not\r\n\t\treturn true;\r\n\t}\r\n\tif (!gantt.ext.fullscreen.getFullscreenElement()) {\r\n\t\treturn true;\r\n\t}\r\n\tif (!isFullscreenAvailable()) {\r\n\t\t// eslint-disable-next-line no-console\r\n\t\tconst method = (console as IConsole).warning || console.log;\r\n\t\tmethod(\"The `fullscreen` feature not being allowed, or full-screen mode not being supported\");\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\ngantt.ext.fullscreen = {\r\n\texpand(): void {\r\n\t\tif (cantFullscreen()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (isExpanded()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!gantt.callEvent(\"onBeforeExpand\", [this.getFullscreenElement()])) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\texpandGantt = true;\r\n\r\n\t\t// we switch body to fullscreen and then expand fullscreen element to viewport\r\n\t\t// we do it to correct display common elements: lightboxes, tooltip etc.\r\n\t\tconst element = document.body as IBody;\r\n\t\tconst requestArguments = element.webkitRequestFullscreen ?\r\n\t\t\t[(Element as unknown as IElement).ALLOW_KEYBOARD_INPUT] : [];\r\n\r\n\t\tconst requestFullscreen = element.msRequestFullscreen ||\r\n\t\t\telement.mozRequestFullScreen ||\r\n\t\t\telement.webkitRequestFullscreen ||\r\n\t\t\telement.requestFullscreen;\r\n\r\n\t\tif (requestFullscreen) {\r\n\t\t\trequestFullscreen.apply(element, requestArguments);\r\n\t\t}\r\n\t},\r\n\tcollapse(): void {\r\n\t\tif (cantFullscreen()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!isExpanded()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!gantt.callEvent(\"onBeforeCollapse\", [this.getFullscreenElement()])) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst requestExitFullscreen = (document as IDocument).msExitFullscreen ||\r\n\t\t\t(document as IDocument).mozCancelFullScreen ||\r\n\t\t\t(document as IDocument).webkitExitFullscreen ||\r\n\t\t\t(document as IDocument).exitFullscreen;\r\n\r\n\t\tif (requestExitFullscreen) {\r\n\t\t\trequestExitFullscreen.apply(document);\r\n\t\t}\r\n\t},\r\n\ttoggle(): void {\r\n\t\tif (cantFullscreen()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!isExpanded()) {\r\n\t\t\tthis.expand();\r\n\t\t} else {\r\n\t\t\tthis.collapse();\r\n\t\t}\r\n\r\n\t},\r\n\tgetFullscreenElement(): HTMLElement {\r\n\t\treturn gantt.$root;\r\n\t}\r\n};\r\n\r\ngantt.expand = function() {\r\n\tgantt.ext.fullscreen.expand();\r\n};\r\n\r\ngantt.collapse = function(){\r\n\tgantt.ext.fullscreen.collapse();\r\n};\r\n\r\ngantt.attachEvent(\"onGanttReady\", addDOMEvents);\r\n\r\n}","import eventable from \"../utils/eventable\";\r\nimport * as domHelpers from \"../core/ui/utils/dom_helpers\";\r\n\r\nimport keyboard_shortcuts from \"./keyboard_navigation/common/keyboard_shortcuts\";\r\nimport eventhandler from \"./keyboard_navigation/common/eventhandler\";\r\nimport trap_modal_focus from \"./keyboard_navigation/common/trap_modal_focus\";\r\nimport gantt_node from \"./keyboard_navigation/elements/gantt_node\";\r\nimport nav_node from \"./keyboard_navigation/elements/nav_node\";\r\nimport header_cell from \"./keyboard_navigation/elements/header_cell\";\r\nimport task_row from \"./keyboard_navigation/elements/task_row\";\r\nimport task_cell from \"./keyboard_navigation/elements/task_cell\";\r\nimport modals from \"./keyboard_navigation/modals\";\r\nimport core from \"./keyboard_navigation/core\";\r\n\r\n\r\n\r\nexport default function(gantt){\r\n\tfunction setupKeyNav(gantt){\r\n\t\tgantt.config.keyboard_navigation = true;\r\n\t\tgantt.config.keyboard_navigation_cells = false;\r\n\r\n\t\tgantt.$keyboardNavigation = {};\r\n\r\n\t\tgantt._compose = function(){\r\n\t\t\tvar parts = Array.prototype.slice.call(arguments, 0);\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\t\tvar obj = parts[i];\r\n\t\t\t\tif(typeof obj == \"function\"){\r\n\t\t\t\t\tobj = new obj();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var p in obj){\r\n\t\t\t\t\tres[p] = obj[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t};\r\n\r\n\t\tkeyboard_shortcuts(gantt);\r\n\t\teventhandler(gantt);\r\n\t\ttrap_modal_focus(gantt);\r\n\t\tgantt_node(gantt);\r\n\t\tnav_node(gantt);\r\n\t\theader_cell(gantt);\r\n\t\ttask_row(gantt);\r\n\t\ttask_cell(gantt);\r\n\t\tmodals(gantt);\r\n\t\tcore(gantt);\r\n\r\n\r\n\t\t(function(){\r\n\t\t\tvar dispatcher = gantt.$keyboardNavigation.dispatcher;\r\n\r\n\t\t\tdispatcher.isTaskFocused = function(id){\r\n\t\t\t\tvar node = dispatcher.activeNode;\r\n\t\t\t\tif(node instanceof gantt.$keyboardNavigation.TaskRow || node instanceof gantt.$keyboardNavigation.TaskCell) {\r\n\t\t\t\t\tif (node.taskId == id) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\r\n\t\t\tvar keyDownHandler = function(e){\r\n\t\t\t\tif(!gantt.config.keyboard_navigation) return;\r\n\t\t\t\t// GS-734 & GS-1078: we don't need keyboard navigation inside inline editors\r\n\t\t\t\tif(!gantt.config.keyboard_navigation_cells && isInlineEditorCell(e)) return;\r\n\r\n\t\t\t\tif (isNoKeyboardNavigationElement(e) || isLightboxElement(e)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn dispatcher.keyDownHandler(e);\r\n\t\t\t};\r\n\r\n\t\t\tvar focusHandler = function(e){\r\n\t\t\t\tif(dispatcher.$preventDefault){\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\tgantt.$container.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t// do nothing if key-nav focus is already planned\r\n\t\t\t\t} else if (!dispatcher.awaitsFocus()) {\r\n\t\t\t\t\t// otherwise - re-focus key-nav element on gantt focus\r\n\t\t\t\t\tdispatcher.focusGlobalNode();\r\n\t\t\t\t}\r\n\r\n\t\t\t};\r\n\r\n\t\t\tvar reFocusActiveNode = function(){\r\n\t\t\t\tif(!dispatcher.isEnabled())\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\tconst outsideGantt = !domHelpers.isChildOf(document.activeElement, gantt.$container) && document.activeElement.localName != \"body\";\r\n\t\t\t\tvar activeNode = dispatcher.getActiveNode();\r\n\t\t\t\tif(!activeNode || outsideGantt)\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\tvar domElement = activeNode.getNode();\r\n\t\t\t\tvar top, left;\r\n\t\t\t\tif(domElement && domElement.parentNode){\r\n\t\t\t\t\ttop = domElement.parentNode.scrollTop;\r\n\t\t\t\t\tleft = domElement.parentNode.scrollLeft;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tactiveNode.focus(true);\r\n\r\n\t\t\t\tif(domElement && domElement.parentNode){\r\n\t\t\t\t\tdomElement.parentNode.scrollTop = top;\r\n\t\t\t\t\tdomElement.parentNode.scrollLeft = left;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\r\n\t\t\tgantt.attachEvent(\"onDataRender\", function(){\r\n\t\t\t\tif(!gantt.config.keyboard_navigation) return;\r\n\t\t\t\treFocusActiveNode();\r\n\t\t\t});\r\n\r\n\t\t\tgantt.attachEvent(\"onGanttRender\", function(){\r\n\t\t\t\tgantt.eventRemove(gantt.$root, \"keydown\", keyDownHandler);\r\n\t\t\t\tgantt.eventRemove(gantt.$container, \"focus\", focusHandler);\r\n\t\t\t\tgantt.eventRemove(gantt.$container, \"mousedown\", mousedownHandler);\r\n\r\n\t\t\t\tif(gantt.config.keyboard_navigation){\r\n\r\n\t\t\t\t\tgantt.event(gantt.$root, \"keydown\", keyDownHandler);\r\n\t\t\t\t\tgantt.event(gantt.$container, \"focus\", focusHandler);\r\n\t\t\t\t\tgantt.event(gantt.$container, \"mousedown\", mousedownHandler);\r\n\t\t\t\t\tgantt.$container.setAttribute(\"tabindex\", \"0\");\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tgantt.$container.removeAttribute(\"tabindex\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfunction getTaskNodeConstructor(){\r\n\t\t\t\tif (gantt.config.keyboard_navigation_cells) {\r\n\t\t\t\t\treturn gantt.$keyboardNavigation.TaskCell;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn gantt.$keyboardNavigation.TaskRow;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfunction isInlineEditorCell(e){\r\n\t\t\t\treturn !!domHelpers.closest(e.target, \".gantt_grid_editor_placeholder\");\r\n\t\t\t}\r\n\t\t\t// GS-1445. Cancel keyboard navigation within custom elements\r\n\t\t\tfunction isNoKeyboardNavigationElement(e){\r\n\t\t\t\treturn !!domHelpers.closest(e.target, \".no_keyboard_navigation\");\r\n\t\t\t}\r\n\t\t\tfunction isLightboxElement(e){\r\n\t\t\t\treturn !!domHelpers.closest(e.target, \".gantt_cal_light\");\r\n\t\t\t}\r\n\r\n\t\t\tfunction mousedownHandler(e){\r\n\t\t\t\tif(!gantt.config.keyboard_navigation) return true;\r\n\t\t\t\t// GS-734 & GS-1078: we don't need keyboard navigation inside inline editors\r\n\t\t\t\tif(!gantt.config.keyboard_navigation_cells && isInlineEditorCell(e)) return true;\r\n\r\n\t\t\t\tif (isNoKeyboardNavigationElement(e)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar focusNode;\r\n\t\t\t\tvar locateTask = dispatcher.fromDomElement(e);\r\n\t\t\t\tif(locateTask){\r\n\t\t\t\t\t//var node = getTaskNodeConstructor();\r\n\t\t\t\t\tif(dispatcher.activeNode instanceof gantt.$keyboardNavigation.TaskCell && domHelpers.isChildOf(e.target, gantt.$task)){\r\n\t\t\t\t\t\tlocateTask = new gantt.$keyboardNavigation.TaskCell(locateTask.taskId, dispatcher.activeNode.columnIndex);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfocusNode = locateTask;\r\n\t\t\t\t}\r\n\t\t\t\tif (focusNode) {\r\n\t\t\t\t\tif (!dispatcher.isEnabled()) {\r\n\t\t\t\t\t\tdispatcher.activeNode = focusNode;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdispatcher.delay(function () {\r\n\t\t\t\t\t\t\tdispatcher.setActiveNode(focusNode);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// empty click should drop focus from gantt, insert of reselecting default node\r\n\t\t\t\t\tdispatcher.$preventDefault = true;\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tdispatcher.$preventDefault = false;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar onReady = gantt.attachEvent(\"onGanttReady\", function(){\r\n\t\t\t\t// restore focus on repainted tasks\r\n\t\t\t\tgantt.detachEvent(onReady);\r\n\r\n\t\t\t\tgantt.$data.tasksStore.attachEvent(\"onStoreUpdated\", function(id){\r\n\t\t\t\t\tif (gantt.config.keyboard_navigation && dispatcher.isEnabled()) {\r\n\t\t\t\t\t\tconst currentNode = dispatcher.getActiveNode();\r\n\t\t\t\t\t\tconst grid = gantt.$ui.getView(\"grid\");\r\n\t\t\t\t\t\tconst top = grid.getItemTop(id);\r\n\t\t\t\t\t\tconst gridDataTopScroll = grid.$grid_data.scrollTop;\r\n\t\t\t\t\t\tconst gridDataBottomScroll = gridDataTopScroll + grid.$grid_data.getBoundingClientRect().height;\r\n\t\t\t\t\t\tif(currentNode && currentNode.taskId == id){\r\n\t\t\t\t\t\t\t// GS-2539: Don't refocus the node if it is selected and outside the visible range in the grid\r\n\t\t\t\t\t\t\tif(gridDataTopScroll <= top && gridDataBottomScroll >= top){\r\n\t\t\t\t\t\t\t\treFocusActiveNode();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(gantt._smart_render){\r\n\t\t\t\t\tvar updateRender = gantt._smart_render._redrawTasks;\r\n\t\t\t\t\tgantt._smart_render._redrawTasks = function(renderers, items){\r\n\t\t\t\t\t\tif(gantt.config.keyboard_navigation && dispatcher.isEnabled()){\r\n\t\t\t\t\t\t\tvar currentNode = dispatcher.getActiveNode();\r\n\t\t\t\t\t\t\tif(currentNode && currentNode.taskId !== undefined){\r\n\t\t\t\t\t\t\t\tvar focusedItemVisible = false;\r\n\t\t\t\t\t\t\t\tfor(var i = 0; i < items.length; i++){\r\n\t\t\t\t\t\t\t\t\tif(items[i].id == currentNode.taskId && items[i].start_date){\r\n\t\t\t\t\t\t\t\t\t\tfocusedItemVisible = true;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(!focusedItemVisible){\r\n\t\t\t\t\t\t\t\t\titems.push(gantt.getTask(currentNode.taskId));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar res = updateRender.apply(this, arguments);\r\n\r\n\t\t\t\t\t\treturn res;\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\r\n\t\t\tlet createdTaskId = null;\r\n\t\t\tlet keepFocusOnNewTask = false;\r\n\t\t\tgantt.attachEvent(\"onTaskCreated\", function (task) {\r\n\t\t\t\tcreatedTaskId = task.id;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\r\n\t\t\tgantt.attachEvent(\"onAfterTaskAdd\", function(id,item){\r\n\t\t\t\tif(!gantt.config.keyboard_navigation) return true;\r\n\t\t\t\tif(dispatcher.isEnabled()){\r\n\r\n\t\t\t\t\t// GS-1394. After adding a new task, the focus shouldn't change to the placeholder task\r\n\t\t\t\t\tif (id == createdTaskId) {\r\n\t\t\t\t\t\tkeepFocusOnNewTask = true;\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tkeepFocusOnNewTask = false;\r\n\t\t\t\t\t\t\tcreatedTaskId = null;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (keepFocusOnNewTask && item.type == gantt.config.types.placeholder) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar columnIndex = 0;\r\n\t\t\t\t\tvar node = dispatcher.activeNode;\r\n\t\t\t\t\tif(node instanceof gantt.$keyboardNavigation.TaskCell){\r\n\t\t\t\t\t\tcolumnIndex = node.columnIndex;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar nodeConstructor = getTaskNodeConstructor();\r\n\r\n\t\t\t\t\tif (item.type == gantt.config.types.placeholder && gantt.config.placeholder_task.focusOnCreate === false) {\r\n\t\t\t\t\t\t// do not focus on the placeholder task\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdispatcher.setActiveNode(new nodeConstructor(id, columnIndex));\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tgantt.attachEvent(\"onTaskIdChange\", function(oldId, newId){\r\n\t\t\t\tif(!gantt.config.keyboard_navigation) return true;\r\n\r\n\t\t\t\tvar node = dispatcher.activeNode;\r\n\t\t\t\tif(dispatcher.isTaskFocused(oldId)){\r\n\t\t\t\t\tnode.taskId = newId;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\r\n\t\t\tvar interval = setInterval(function(){\r\n\t\t\t\tif(!gantt.config.keyboard_navigation) return;\r\n\t\t\t\tif(!dispatcher.isEnabled()){\r\n\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t}, 500);\r\n\r\n\t\t\tgantt.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tclearInterval(interval);\r\n\t\t\t});\r\n\r\n\t\t\tfunction getScopeName(obj){\r\n\t\t\t\tif(obj instanceof gantt.$keyboardNavigation.GanttNode){\r\n\t\t\t\t\treturn \"gantt\";\r\n\t\t\t\t}else if(obj instanceof gantt.$keyboardNavigation.HeaderCell){\r\n\t\t\t\t\treturn \"headerCell\";\r\n\t\t\t\t}else if(obj instanceof gantt.$keyboardNavigation.TaskRow){\r\n\t\t\t\t\treturn \"taskRow\";\r\n\t\t\t\t}else if(obj instanceof gantt.$keyboardNavigation.TaskCell){\r\n\t\t\t\t\treturn \"taskCell\";\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tfunction getScope(mode){\r\n\t\t\t\tvar scopes = {\r\n\t\t\t\t\t\"gantt\":gantt.$keyboardNavigation.GanttNode,\r\n\t\t\t\t\t\"headerCell\": gantt.$keyboardNavigation.HeaderCell,\r\n\t\t\t\t\t\"taskRow\": gantt.$keyboardNavigation.TaskRow,\r\n\t\t\t\t\t\"taskCell\": gantt.$keyboardNavigation.TaskCell\r\n\t\t\t\t};\r\n\r\n\t\t\t\treturn scopes[mode] || scopes.gantt;\r\n\t\t\t}\r\n\r\n\t\t\tfunction findVisibleColumnIndex(columnName) {\r\n\t\t\t\tvar columns = gantt.getGridColumns();\r\n\t\t\t\tfor (var i = 0; i < columns.length; i++){\r\n\t\t\t\t\tif(columns[i].name == columnName){\r\n\t\t\t\t\t\treturn i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\r\n\t\t\tvar keyNavFacade = {};\r\n\t\t\teventable(keyNavFacade);\r\n\t\t\tgantt.mixin(keyNavFacade, {\r\n\t\t\t\taddShortcut: function(shortcut, handler, scope){\r\n\t\t\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\t\t\tif(scopeObject){\r\n\t\t\t\t\t\tscopeObject.prototype.bind(shortcut, handler);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tgetShortcutHandler: function(shortcut, scope){\r\n\t\t\t\t\tvar commands = gantt.$keyboardNavigation.shortcuts.parse(shortcut);\r\n\t\t\t\t\tif(commands.length){\r\n\t\t\t\t\t\treturn keyNavFacade.getCommandHandler(commands[0], scope);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tgetCommandHandler: function(command, scope){\r\n\t\t\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\t\t\tif(scopeObject){\r\n\t\t\t\t\t\tif(command){\r\n\t\t\t\t\t\t\treturn scopeObject.prototype.findHandler(command);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tremoveShortcut: function(shortcut, scope){\r\n\t\t\t\t\tvar scopeObject = getScope(scope);\r\n\t\t\t\t\tif(scopeObject){\r\n\t\t\t\t\t\tscopeObject.prototype.unbind(shortcut);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tfocus: function(config){\r\n\t\t\t\t\tvar type = config ? config.type : null;\r\n\t\t\t\t\tvar constructor = getScope(type);\r\n\t\t\t\t\tvar node;\r\n\t\t\t\t\tswitch (type){\r\n\t\t\t\t\t\tcase \"taskCell\":\r\n\t\t\t\t\t\t\tnode = new constructor(config.id, findVisibleColumnIndex(config.column));\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"taskRow\":\r\n\t\t\t\t\t\t\tnode = new constructor(config.id);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"headerCell\":\r\n\t\t\t\t\t\t\tnode = new constructor(findVisibleColumnIndex(config.column));\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tdefault:\r\n\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdispatcher.delay(function(){\r\n\t\t\t\t\t\tif(node){\r\n\t\t\t\t\t\t\tdispatcher.setActiveNode(node);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\t\t\tif(!dispatcher.getActiveNode()){\r\n\r\n\t\t\t\t\t\t\t\tdispatcher.setDefaultNode();\r\n\t\t\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\t\t\tif(!dispatcher.awaitsFocus()){\r\n\t\t\t\t\t\t\t\t\tdispatcher.enable();\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\t\t\t\t},\r\n\r\n\t\t\t\tgetActiveNode: function(){\r\n\t\t\t\t\tif(dispatcher.isEnabled()){\r\n\t\t\t\t\t\tvar node = dispatcher.getActiveNode();\r\n\t\t\t\t\t\tvar scope = getScopeName(node);\r\n\t\t\t\t\t\tvar columns = gantt.getGridColumns();\r\n\t\t\t\t\t\tswitch (scope){\r\n\t\t\t\t\t\t\tcase \"taskCell\":\r\n\t\t\t\t\t\t\t\treturn {type:\"taskCell\", id:node.taskId, column:columns[node.columnIndex].name};\r\n\t\t\t\t\t\t\tcase \"taskRow\":\r\n\t\t\t\t\t\t\t\treturn {type:\"taskRow\", id:node.taskId};\r\n\t\t\t\t\t\t\tcase \"headerCell\":\r\n\t\t\t\t\t\t\t\treturn {type:\"headerCell\", column:columns[node.index].name};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tgantt.$keyboardNavigation.facade = keyNavFacade;\r\n\r\n\t\t\tgantt.ext.keyboardNavigation = keyNavFacade;\r\n\t\t\tgantt.focus = function(){\r\n\t\t\t\tkeyNavFacade.focus();\r\n\t\t\t};\r\n\t\t\tgantt.addShortcut = keyNavFacade.addShortcut;\r\n\t\t\tgantt.getShortcutHandler = keyNavFacade.getShortcutHandler;\r\n\t\t\tgantt.removeShortcut = keyNavFacade.removeShortcut;\r\n\t\t})();\r\n\r\n\r\n\t}\r\n\r\n\tsetupKeyNav(gantt);\r\n\r\n\r\n\r\n};","export default function(gantt) {\r\n\r\n\tgantt.$keyboardNavigation.shortcuts = {\r\n\t\tcreateCommand: function () {\r\n\t\t\treturn {\r\n\t\t\t\tmodifiers: {\r\n\t\t\t\t\t\"shift\": false,\r\n\t\t\t\t\t\"alt\": false,\r\n\t\t\t\t\t\"ctrl\": false,\r\n\t\t\t\t\t\"meta\": false\r\n\t\t\t\t},\r\n\t\t\t\tkeyCode: null\r\n\t\t\t};\r\n\t\t},\r\n\t\tparse: function (shortcut) {\r\n\t\t\tvar commands = [];\r\n\r\n\t\t\tvar expr = this.getExpressions(this.trim(shortcut));\r\n\t\t\tfor (var i = 0; i < expr.length; i++) {\r\n\t\t\t\tvar words = this.getWords(expr[i]);\r\n\r\n\t\t\t\tvar command = this.createCommand();\r\n\r\n\t\t\t\tfor (var j = 0; j < words.length; j++) {\r\n\t\t\t\t\tif (this.commandKeys[words[j]]) {\r\n\t\t\t\t\t\tcommand.modifiers[words[j]] = true;\r\n\t\t\t\t\t} else if (this.specialKeys[words[j]]) {\r\n\t\t\t\t\t\tcommand.keyCode = this.specialKeys[words[j]];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcommand.keyCode = words[j].charCodeAt(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcommands.push(command);\r\n\t\t\t}\r\n\t\t\treturn commands;\r\n\t\t},\r\n\r\n\t\tgetCommandFromEvent: function (domEvent) {\r\n\t\t\tvar command = this.createCommand();\r\n\t\t\tcommand.modifiers.shift = !!domEvent.shiftKey;\r\n\t\t\tcommand.modifiers.alt = !!domEvent.altKey;\r\n\t\t\tcommand.modifiers.ctrl = !!domEvent.ctrlKey;\r\n\t\t\tcommand.modifiers.meta = !!domEvent.metaKey;\r\n\t\t\tcommand.keyCode = domEvent.which || domEvent.keyCode;\r\n\r\n\t\t\tif(command.keyCode >= 96 && command.keyCode <= 105){\r\n\t\t\t\t// numpad keys 96-105 -> 48-57\r\n\t\t\t\tcommand.keyCode -= 48;//convert numpad number code to regular number code\r\n\t\t\t}\r\n\r\n\t\t\tvar printableKey = String.fromCharCode(command.keyCode);\r\n\t\t\tif (printableKey) {\r\n\t\t\t\tcommand.keyCode = printableKey.toLowerCase().charCodeAt(0);\r\n\t\t\t}\r\n\t\t\treturn command;\r\n\t\t},\r\n\r\n\t\tgetHashFromEvent: function (domEvent) {\r\n\t\t\treturn this.getHash(this.getCommandFromEvent(domEvent));\r\n\t\t},\r\n\r\n\t\tgetHash: function (command) {\r\n\t\t\tvar parts = [];\r\n\t\t\tfor (var i in command.modifiers) {\r\n\t\t\t\tif (command.modifiers[i]) {\r\n\t\t\t\t\tparts.push(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tparts.push(command.keyCode);\r\n\r\n\t\t\treturn parts.join(this.junctionChar);\r\n\t\t},\r\n\r\n\t\tgetExpressions: function (shortcut) {\r\n\t\t\treturn shortcut.split(this.junctionChar);\r\n\t\t},\r\n\t\tgetWords: function (term) {\r\n\t\t\treturn term.split(this.combinationChar);\r\n\t\t},\r\n\t\ttrim: function (shortcut) {\r\n\t\t\treturn shortcut.replace(/\\s/g, \"\");\r\n\t\t},\r\n\t\tjunctionChar: \",\",\r\n\t\tcombinationChar: \"+\",\r\n\t\tcommandKeys: {\r\n\t\t\t\"shift\": 16,\r\n\t\t\t\"alt\": 18,\r\n\t\t\t\"ctrl\": 17,\r\n\t\t\t\"meta\": true\r\n\t\t},\r\n\t\tspecialKeys: {\r\n\t\t\t\"backspace\": 8,\r\n\t\t\t\"tab\": 9,\r\n\t\t\t\"enter\": 13,\r\n\t\t\t\"esc\": 27,\r\n\t\t\t\"space\": 32,\r\n\t\t\t\"up\": 38,\r\n\t\t\t\"down\": 40,\r\n\t\t\t\"left\": 37,\r\n\t\t\t\"right\": 39,\r\n\t\t\t\"home\": 36,\r\n\t\t\t\"end\": 35,\r\n\t\t\t\"pageup\": 33,\r\n\t\t\t\"pagedown\": 34,\r\n\t\t\t\"delete\": 46,\r\n\t\t\t\"insert\": 45,\r\n\t\t\t\"plus\": 107,\r\n\t\t\t\"f1\": 112,\r\n\t\t\t\"f2\": 113,\r\n\t\t\t\"f3\": 114,\r\n\t\t\t\"f4\": 115,\r\n\t\t\t\"f5\": 116,\r\n\t\t\t\"f6\": 117,\r\n\t\t\t\"f7\": 118,\r\n\t\t\t\"f8\": 119,\r\n\t\t\t\"f9\": 120,\r\n\t\t\t\"f10\": 121,\r\n\t\t\t\"f11\": 122,\r\n\t\t\t\"f12\": 123\r\n\t\t}\r\n\t};\r\n};","export default function(gantt) {\r\n\r\n\tgantt.$keyboardNavigation.EventHandler = {\r\n\t\t_handlers: null,\r\n\t\tfindHandler: function (command) {\r\n\t\t\tif (!this._handlers) this._handlers = {};\r\n\t\t\tvar shortcuts = gantt.$keyboardNavigation.shortcuts;\r\n\t\t\tvar hash = shortcuts.getHash(command);\r\n\r\n\t\t\treturn this._handlers[hash];\r\n\t\t},\r\n\r\n\t\tdoAction: function (command, e) {\r\n\t\t\tvar handler = this.findHandler(command);\r\n\t\t\tif (handler) {\r\n\t\t\t\tvar eventFacade = gantt.$keyboardNavigation.facade;\r\n\r\n\t\t\t\tif(eventFacade.callEvent(\"onBeforeAction\", [command, e]) === false){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\thandler.call(this, e);\r\n\r\n\t\t\t\tif (e.preventDefault) e.preventDefault();\r\n\t\t\t\telse e.returnValue = false;\r\n\r\n\t\t\t}\r\n\t\t},\r\n\t\tbind: function (shortcut, handler) {\r\n\t\t\tif (!this._handlers) this._handlers = {};\r\n\r\n\t\t\tvar shortcuts = gantt.$keyboardNavigation.shortcuts;\r\n\r\n\t\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\t\tfor (var i = 0; i < commands.length; i++) {\r\n\t\t\t\tthis._handlers[shortcuts.getHash(commands[i])] = handler;\r\n\t\t\t}\r\n\t\t},\r\n\t\tunbind: function (shortcut) {\r\n\t\t\tvar shortcuts = gantt.$keyboardNavigation.shortcuts;\r\n\r\n\t\t\tvar commands = shortcuts.parse(shortcut);\r\n\t\t\tfor (var i = 0; i < commands.length; i++) {\r\n\t\t\t\tif (this._handlers[shortcuts.getHash(commands[i])]) {\r\n\t\t\t\t\tdelete this._handlers[shortcuts.getHash(commands[i])];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tbindAll: function (map) {\r\n\t\t\tfor (var i in map) {\r\n\t\t\t\tthis.bind(i, map[i]);\r\n\t\t\t}\r\n\t\t},\r\n\t\tinitKeys: function () {\r\n\t\t\tif (!this._handlers)\r\n\t\t\t\tthis._handlers = {};\r\n\t\t\tif (this.keys) {\r\n\t\t\t\tthis.bindAll(this.keys);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n};","import * as domHelpers from \"../../../core/ui/utils/dom_helpers\";\r\n\r\nexport default function(gantt) {\r\n\r\n\t(function () {\r\n\t\t\r\n\t\tgantt.$keyboardNavigation.getFocusableNodes = domHelpers.getFocusableNodes;\r\n\r\n\t\tgantt.$keyboardNavigation.trapFocus = function trapFocus(root, e) {\r\n\t\t\tif (e.keyCode != 9) return false;\r\n\r\n\t\t\tvar focusable = gantt.$keyboardNavigation.getFocusableNodes(root);\r\n\t\t\tvar currentFocus = domHelpers.getActiveElement();\r\n\t\t\tvar currentIndex = -1;\r\n\t\t\tfor (var i = 0; i < focusable.length; i++) {\r\n\t\t\t\tif (focusable[i] == currentFocus) {\r\n\t\t\t\t\tcurrentIndex = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (e.shiftKey) {\r\n\t\t\t\t// back tab\r\n\t\t\t\tif (currentIndex <= 0) {\r\n\t\t\t\t\t// go to the last element if we focused on the first\r\n\t\t\t\t\tvar lastItem = focusable[focusable.length - 1];\r\n\t\t\t\t\tif (lastItem) {\r\n\t\t\t\t\t\tlastItem.focus();\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// forward tab\r\n\t\t\t\tif (currentIndex >= focusable.length - 1) {\r\n\t\t\t\t\t// forward tab from last element should go back to the first element\r\n\t\t\t\t\tvar firstItem = focusable[0];\r\n\t\t\t\t\tif (firstItem) {\r\n\t\t\t\t\t\tfirstItem.focus();\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn false;\r\n\t\t};\r\n\t})();\r\n\r\n};","export default function(gantt) {\r\n\r\n\tgantt.$keyboardNavigation.GanttNode = function () {\r\n\t};\r\n\r\n\tgantt.$keyboardNavigation.GanttNode.prototype = gantt._compose(\r\n\t\tgantt.$keyboardNavigation.EventHandler,\r\n\t\t{\r\n\r\n\t\t\tfocus: function () {\r\n\t\t\t\tgantt.focus();\r\n\t\t\t},\r\n\r\n\t\t\tblur: function () {\r\n\r\n\t\t\t},\r\n\r\n\t\t\tisEnabled: function () {\r\n\t\t\t\treturn gantt.$container.hasAttribute(\"tabindex\");\r\n\t\t\t},\r\n\r\n\t\t\tscrollHorizontal: function scrollHorizontal(dir) {\r\n\t\t\t\tvar date = gantt.dateFromPos(gantt.getScrollState().x);\r\n\t\t\t\tvar scale = gantt.getScale();\r\n\t\t\t\tvar step = dir < 0 ? -scale.step : scale.step;\r\n\t\t\t\tdate = gantt.date.add(date, step, scale.unit);\r\n\t\t\t\tgantt.scrollTo(gantt.posFromDate(date));\r\n\t\t\t},\r\n\r\n\t\t\tscrollVertical: function scrollVertical(dir) {\r\n\t\t\t\tvar top = gantt.getScrollState().y;\r\n\t\t\t\tvar step = gantt.config.row_height;\r\n\t\t\t\tgantt.scrollTo(null, top + (dir < 0 ? -1 : 1) * step);\r\n\t\t\t},\r\n\r\n\t\t\tkeys: {\r\n\t\t\t\t\"alt+left\": function (e) {\r\n\t\t\t\t\tthis.scrollHorizontal(-1);\r\n\t\t\t\t},\r\n\t\t\t\t\"alt+right\": function (e) {\r\n\t\t\t\t\tthis.scrollHorizontal(1);\r\n\t\t\t\t},\r\n\t\t\t\t\"alt+up\": function (e) {\r\n\t\t\t\t\tthis.scrollVertical(-1);\r\n\t\t\t\t},\r\n\t\t\t\t\"alt+down\": function (e) {\r\n\t\t\t\t\tthis.scrollVertical(1);\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// undo\r\n\t\t\t\t\"ctrl+z\": function () {\r\n\t\t\t\t\tif (gantt.undo) gantt.undo();\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// redo\r\n\t\t\t\t\"ctrl+r\": function () {\r\n\t\t\t\t\tif (gantt.redo) gantt.redo();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t);\r\n\r\n\tgantt.$keyboardNavigation.GanttNode.prototype.bindAll(gantt.$keyboardNavigation.GanttNode.prototype.keys);\r\n\r\n};","export default function(gantt) {\r\n\r\n\tgantt.$keyboardNavigation.KeyNavNode = function () {\r\n\t};\r\n\r\n\tgantt.$keyboardNavigation.KeyNavNode.prototype = gantt._compose(\r\n\t\tgantt.$keyboardNavigation.EventHandler,\r\n\t\t{\r\n\t\t\tisValid: function () {\r\n\t\t\t\treturn true;\r\n\t\t\t},\r\n\t\t\tfallback: function () {\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\r\n\t\t\tmoveTo: function (element) {\r\n\t\t\t\tgantt.$keyboardNavigation.dispatcher.setActiveNode(element);\r\n\t\t\t},\r\n\r\n\t\t\tcompareTo: function (b) {\r\n\t\t\t\t// good enough comparison of two random objects\r\n\t\t\t\tif (!b) return false;\r\n\t\t\t\tfor (var i in this) {\r\n\t\t\t\t\tif (!!this[i] != !!b[i]) return false;\r\n\r\n\t\t\t\t\tvar canStringifyThis = !!(this[i] && this[i].toString);\r\n\t\t\t\t\tvar canStringifyThat = !!(b[i] && b[i].toString);\r\n\t\t\t\t\tif (canStringifyThat != canStringifyThis) return false;\r\n\t\t\t\t\tif (!(canStringifyThat && canStringifyThis)) {\r\n\t\t\t\t\t\tif (b[i] != this[i]) return false;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (b[i].toString() != this[i].toString())\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t},\r\n\r\n\t\t\tgetNode: function () {\r\n\t\t\t},\r\n\t\t\tfocus: function () {\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif(!node)\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\tvar eventFacade = gantt.$keyboardNavigation.facade;\r\n\r\n\t\t\t\tif(eventFacade.callEvent(\"onBeforeFocus\", [node]) === false){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (node) {\r\n\t\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t\tif(!node.$eventAttached){\r\n\t\t\t\t\t\tnode.$eventAttached = true;\r\n\t\t\t\t\t\tgantt.event(node, \"focus\",function(e){\r\n\t\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//node.className += \" gantt_focused\";\r\n\t\t\t\t\tif (gantt.utils.dom.isChildOf(document.activeElement, node)){\r\n\t\t\t\t\t\tnode = document.activeElement;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (node.focus) node.focus();\r\n\r\n\t\t\t\t\teventFacade.callEvent(\"onFocus\", [this.getNode()]);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\tblur: function () {\r\n\t\t\t\tvar node = this.getNode();\r\n\t\t\t\tif (node) {\r\n\t\t\t\t\tvar eventFacade = gantt.$keyboardNavigation.facade;\r\n\t\t\t\t\teventFacade.callEvent(\"onBlur\", [node]);\r\n\t\t\t\t\tnode.setAttribute(\"tabindex\", \"-1\");\r\n\t\t\t\t\t//node.className = (node.className || \"\").replace(/ ?gantt_focused/g, \"\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t);\r\n\r\n};","import * as domHelpers from \"../../../core/ui/utils/dom_helpers\";\r\n\r\nexport default function(gantt) {\r\n\r\n\tgantt.$keyboardNavigation.HeaderCell = function (index) {\r\n\t\tthis.index = index || 0;\r\n\t};\r\n\r\n\tgantt.$keyboardNavigation.HeaderCell.prototype = gantt._compose(\r\n\t\tgantt.$keyboardNavigation.KeyNavNode,\r\n\t\t{\r\n\t\t\t_handlers: null,\r\n\r\n\t\t\tisValid: function () {\r\n\t\t\t\tif (!gantt.config.show_grid) {\r\n\t\t\t\t\tif (gantt.getVisibleTaskCount())\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\treturn !!gantt.getGridColumns()[this.index] || !gantt.getVisibleTaskCount();\r\n\t\t\t},\r\n\t\t\tfallback: function () {\r\n\t\t\t\tif (!gantt.config.show_grid) {\r\n\t\t\t\t\tif (gantt.getVisibleTaskCount()) {\r\n\t\t\t\t\t\treturn new gantt.$keyboardNavigation.TaskRow();\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\tvar visibleColumns = gantt.getGridColumns();\r\n\t\t\t\tvar index = this.index;\r\n\t\t\t\twhile (index >= 0) {\r\n\t\t\t\t\tif (visibleColumns[index])\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tindex--;\r\n\t\t\t\t}\r\n\t\t\t\tif (visibleColumns[index]) {\r\n\t\t\t\t\treturn new gantt.$keyboardNavigation.HeaderCell(index);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tfromDomElement: function(el){\r\n\t\t\t\tvar cellElement = domHelpers.locateClassName(el, \"gantt_grid_head_cell\");\r\n\t\t\t\tif(cellElement){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\twhile(cellElement && cellElement.previousSibling){\r\n\t\t\t\t\t\tcellElement = cellElement.previousSibling;\r\n\t\t\t\t\t\tindex += 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn new gantt.$keyboardNavigation.HeaderCell(index);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tgetNode: function () {\r\n\t\t\t\tvar cells = gantt.$grid_scale.childNodes;\r\n\t\t\t\treturn cells[this.index];\r\n\t\t\t},\r\n\r\n\r\n\t\t\tkeys: {\r\n\r\n\t\t\t\t\"left\": function () {\r\n\t\t\t\t\tif (this.index > 0) {\r\n\t\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.HeaderCell(this.index - 1));\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t\"right\": function () {\r\n\t\t\t\t\tvar columns = gantt.getGridColumns();\r\n\t\t\t\t\tif (this.index < columns.length - 1) {\r\n\t\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.HeaderCell(this.index + 1));\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t\"down\": function () {\r\n\t\t\t\t\tvar taskRow;\r\n\t\t\t\t\tvar rootLevel = gantt.getChildren(gantt.config.root_id);\r\n\t\t\t\t\tif (gantt.isTaskExists(rootLevel[0])) {\r\n\t\t\t\t\t\ttaskRow = rootLevel[0];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (taskRow) {\r\n\t\t\t\t\t\tif (gantt.config.keyboard_navigation_cells) {\r\n\t\t\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.TaskCell(taskRow, this.index));\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.TaskRow(taskRow));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\t\"end\": function () {\r\n\t\t\t\t\tvar columns = gantt.getGridColumns();\r\n\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.HeaderCell(columns.length - 1));\r\n\t\t\t\t},\r\n\t\t\t\t\"home\": function () {\r\n\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.HeaderCell(0));\r\n\t\t\t\t},\r\n\r\n\r\n\t\t\t\t// press header button\r\n\t\t\t\t\"enter, space\": function () {\r\n\t\t\t\t\tvar node = domHelpers.getActiveElement();\r\n\t\t\t\t\tnode.click();\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// add new task\r\n\t\t\t\t\"ctrl+enter\": function () {\r\n\t\t\t\t\tif (gantt.isReadonly(this)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgantt.createTask({}, this.taskId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t);\r\n\r\n\tgantt.$keyboardNavigation.HeaderCell.prototype.bindAll(gantt.$keyboardNavigation.HeaderCell.prototype.keys);\r\n\r\n};","export default function(gantt) {\r\n\r\n\tgantt.$keyboardNavigation.TaskRow = function (taskId) {\r\n\t\tif (!taskId) {\r\n\t\t\tvar rootLevel = gantt.getChildren(gantt.config.root_id);\r\n\t\t\tif (rootLevel[0]) {\r\n\t\t\t\ttaskId = rootLevel[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.taskId = taskId;\r\n\t\tif (gantt.isTaskExists(this.taskId)) {\r\n\t\t\tthis.index = gantt.getTaskIndex(this.taskId);\r\n\t\t\tthis.globalIndex = gantt.getGlobalTaskIndex(this.taskId);\r\n\t\t\tthis.splitItem = !!gantt.getTask(this.taskId).$split_subtask;\r\n\t\t\tthis.parentId = gantt.getParent(this.taskId);\r\n\t\t}\r\n\t};\r\n\r\n\tgantt.$keyboardNavigation.TaskRow.prototype = gantt._compose(\r\n\t\tgantt.$keyboardNavigation.KeyNavNode,\r\n\t\t{\r\n\t\t\t_handlers: null,\r\n\t\t\tisValid: function () {\r\n\t\t\t\treturn gantt.isTaskExists(this.taskId) && (gantt.getTaskIndex(this.taskId) > -1);\r\n\t\t\t},\r\n\t\t\tfallback: function () {\r\n\t\t\t\tif (!gantt.getVisibleTaskCount()) {\r\n\t\t\t\t\tvar header = new gantt.$keyboardNavigation.HeaderCell();\r\n\t\t\t\t\tif (!header.isValid()) return null;\r\n\t\t\t\t\telse return header;\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tif(!this.splitItem){\r\n\t\t\t\t\t\tvar nextIndex = -1;\r\n\t\t\t\t\t\t// GS-1393. When Gantt tries to restore the focus, it should rely on the global index\r\n\t\t\t\t\t\tif (gantt.getTaskByIndex(this.globalIndex - 1)) {\r\n\t\t\t\t\t\t\tnextIndex = this.globalIndex - 1;\r\n\t\t\t\t\t\t} else if (gantt.getTaskByIndex(this.globalIndex + 1)) {\r\n\t\t\t\t\t\t\tnextIndex = this.globalIndex + 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvar globalIndex = this.globalIndex;\r\n\t\t\t\t\t\t\twhile (globalIndex >= 0) {\r\n\t\t\t\t\t\t\t\tif (gantt.getTaskByIndex(globalIndex)) {\r\n\t\t\t\t\t\t\t\t\tnextIndex = globalIndex;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tglobalIndex--;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (nextIndex > -1) {\r\n\t\t\t\t\t\t\treturn new gantt.$keyboardNavigation.TaskRow(gantt.getTaskByIndex(nextIndex).id);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\treturn new gantt.$keyboardNavigation.TaskRow(this.parentId);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tfromDomElement: function(el){\r\n\t\t\t\tif(gantt.config.keyboard_navigation_cells){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar taskId = gantt.locate(el);\r\n\t\t\t\tif(gantt.isTaskExists(taskId)){\r\n\t\t\t\t\treturn new gantt.$keyboardNavigation.TaskRow(taskId);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tgetNode: function () {\r\n\t\t\t\tif (gantt.isTaskExists(this.taskId) && gantt.isTaskVisible(this.taskId)) {\r\n\t\t\t\t\tif (gantt.config.show_grid) {\r\n\t\t\t\t\t\treturn gantt.$grid.querySelector(\".gantt_row[\" + gantt.config.task_attribute + \"='\" + this.taskId + \"']\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn gantt.getTaskNode(this.taskId);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tfocus: function (keptFocus) {\r\n\t\t\t\tif(!keptFocus) {\r\n\t\t\t\t\tconst pos = gantt.getTaskPosition(gantt.getTask(this.taskId));\r\n\t\t\t\t\tconst height = gantt.getTaskHeight(this.taskId);\r\n\t\t\t\t\tconst scroll = gantt.getScrollState();\r\n\r\n\t\t\t\t\tlet viewWidth;\r\n\t\t\t\t\tif(gantt.$task){\r\n\t\t\t\t\t\tviewWidth = gantt.$task.offsetWidth;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tviewWidth = scroll.inner_width;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tlet viewHeight;\r\n\t\t\t\t\tif(gantt.$grid_data || gantt.$task_data){\r\n\t\t\t\t\t\tviewHeight = (gantt.$grid_data || gantt.$task_data).offsetHeight;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tviewHeight = scroll.inner_height;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (pos.top < scroll.y || pos.top + height > (scroll.y + viewHeight)) {\r\n\t\t\t\t\t\t// GS-2346: additional scrolling to be sure that the task will be in the required range\r\n\t\t\t\t\t\tgantt.scrollTo(null, pos.top - 20);\r\n\t\t\t\t\t} else if (gantt.config.scroll_on_click && gantt.config.show_chart) {\r\n\t\t\t\t\t\t// horizontal scroll activated\r\n\t\t\t\t\t\tif (pos.left > (scroll.x + viewWidth)) { // scroll forward to the start of the task\r\n\t\t\t\t\t\t\tgantt.scrollTo(pos.left - gantt.config.task_scroll_offset);\r\n\t\t\t\t\t\t} else if (pos.left + pos.width < scroll.x) { // scroll back to the end of the task\r\n\t\t\t\t\t\t\tgantt.scrollTo(pos.left + pos.width - gantt.config.task_scroll_offset);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tgantt.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this, [keptFocus]);\r\n\r\n\t\t\t\t// GS-152 if there are scrollbars with custom names, change their scroll position\r\n\t\t\t\tscrollGrid();\r\n\r\n\t\t\t\tfunction scrollGrid() {\r\n\t\t\t\t\tvar grid = gantt.$ui.getView(\"grid\");\r\n\t\t\t\t\tvar scrollPositionX = parseInt(grid.$grid.scrollLeft);\r\n\t\t\t\t\tvar scrollPositionY = parseInt(grid.$grid_data.scrollTop);\r\n\r\n\t\t\t\t\tvar attachedScrollbarHorizontal = grid.$config.scrollX;\r\n\r\n\t\t\t\t\tif (attachedScrollbarHorizontal && grid.$config.scrollable) {\r\n\t\t\t\t\t\tvar scrollbarHorizontal = gantt.$ui.getView(attachedScrollbarHorizontal);\r\n\t\t\t\t\t\tif (scrollbarHorizontal) {\r\n\t\t\t\t\t\t\tscrollbarHorizontal.scrollTo(scrollPositionX, scrollPositionY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar attachedScrollbarVertical = grid.$config.scrollY;\r\n\r\n\t\t\t\t\tif (attachedScrollbarVertical) {\r\n\t\t\t\t\t\tvar scrollbarVertical = gantt.$ui.getView(attachedScrollbarVertical);\r\n\t\t\t\t\t\tif (scrollbarVertical) {\r\n\t\t\t\t\t\t\tscrollbarVertical.scrollTo(scrollPositionX, scrollPositionY);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\r\n\t\t\tkeys: {\r\n\t\t\t\t\"pagedown\": function () {\r\n\t\t\t\t\tif (gantt.getVisibleTaskCount()) {\r\n\t\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.TaskRow(gantt.getTaskByIndex(gantt.getVisibleTaskCount() - 1).id));\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t\"pageup\": function () {\r\n\t\t\t\t\tif (gantt.getVisibleTaskCount()) {\r\n\t\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.TaskRow(gantt.getTaskByIndex(0).id));\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t\"up\": function () {\r\n\t\t\t\t\tvar nextElement = null;\r\n\t\t\t\t\tvar prevTask = gantt.getPrev(this.taskId);\r\n\t\t\t\t\tif (!gantt.isTaskExists(prevTask)) {\r\n\t\t\t\t\t\tnextElement = new gantt.$keyboardNavigation.HeaderCell();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnextElement = new gantt.$keyboardNavigation.TaskRow(prevTask);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(nextElement);\r\n\t\t\t\t},\r\n\t\t\t\t\"down\": function () {\r\n\t\t\t\t\tvar nextTask = gantt.getNext(this.taskId);\r\n\t\t\t\t\tif (gantt.isTaskExists(nextTask)) {\r\n\t\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.TaskRow(nextTask));\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\t\"shift+down\": function(){\r\n\t\t\t\t\tif(gantt.hasChild(this.taskId) && !gantt.getTask(this.taskId).$open){\r\n\t\t\t\t\t\tgantt.open(this.taskId);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t\"shift+up\": function(){\r\n\t\t\t\t\tif(gantt.hasChild(this.taskId) && gantt.getTask(this.taskId).$open){\r\n\t\t\t\t\t\tgantt.close(this.taskId);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t\"shift+right\": function() {\r\n\t\t\t\t\tif (gantt.isReadonly(this)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar prevId = gantt.getPrevSibling(this.taskId);\r\n\t\t\t\t\tif(gantt.isTaskExists(prevId) && !gantt.isChildOf(this.taskId, prevId)){\r\n\t\t\t\t\t\tvar parent = gantt.getTask(prevId);\r\n\t\t\t\t\t\tparent.$open = true;\r\n\t\t\t\t\t\tvar result = gantt.moveTask(this.taskId, -1, prevId);\r\n\t\t\t\t\t\tif(result !== false)\r\n\t\t\t\t\t\t\tgantt.updateTask(this.taskId);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t\"shift+left\": function() {\r\n\t\t\t\t\tif (gantt.isReadonly(this)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar parent = gantt.getParent(this.taskId);\r\n\t\t\t\t\tif(gantt.isTaskExists(parent)){\r\n\t\t\t\t\t\tvar result = gantt.moveTask(this.taskId, gantt.getTaskIndex(parent) + 1, gantt.getParent(parent));\r\n\t\t\t\t\t\tif(result !== false)\r\n\t\t\t\t\t\t\tgantt.updateTask(this.taskId);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// select\r\n\t\t\t\t\"space\": function (e) {\r\n\t\t\t\t\tif (!gantt.isSelectedTask(this.taskId)) {\r\n\t\t\t\t\t\tgantt.selectTask(this.taskId);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tgantt.unselectTask(this.taskId);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// collapse\r\n\t\t\t\t\"ctrl+left\": function (e) {\r\n\t\t\t\t\tgantt.close(this.taskId);\r\n\t\t\t\t},\r\n\t\t\t\t// expand\r\n\t\t\t\t\"ctrl+right\": function (e) {\r\n\t\t\t\t\tgantt.open(this.taskId);\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// delete task\r\n\t\t\t\t\"delete\": function (e) {\r\n\t\t\t\t\tif (gantt.isReadonly(this)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgantt.$click.buttons[\"delete\"](this.taskId);\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// open lightbox\r\n\t\t\t\t\"enter\": function () {\r\n\t\t\t\t\tif (gantt.isReadonly(this)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgantt.showLightbox(this.taskId);\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// add subtask\r\n\t\t\t\t\"ctrl+enter\": function () {\r\n\t\t\t\t\tif (gantt.isReadonly(this)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgantt.createTask({}, this.taskId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t);\r\n\tgantt.$keyboardNavigation.TaskRow.prototype.bindAll(gantt.$keyboardNavigation.TaskRow.prototype.keys);\r\n\r\n};","import * as domHelpers from \"../../../core/ui/utils/dom_helpers\";\r\nimport {replaceValidZeroId} from \"../../../utils/helpers\";\r\n\r\nexport default function(gantt) {\r\n\r\n\r\n\tgantt.$keyboardNavigation.TaskCell = function (taskId, index) {\r\n\t\ttaskId = replaceValidZeroId(taskId, gantt.config.root_id);\r\n\t\tif (!taskId) {\r\n\t\t\tvar rootLevel = gantt.getChildren(gantt.config.root_id);\r\n\t\t\tif (rootLevel[0]) {\r\n\t\t\t\ttaskId = rootLevel[0];\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.taskId = taskId;\r\n\t\tthis.columnIndex = index || 0;\r\n\t\t// provided task may not exist, in this case node will be detectes as invalid\r\n\t\tif (gantt.isTaskExists(this.taskId)) {\r\n\t\t\tthis.index = gantt.getTaskIndex(this.taskId);\r\n\t\t\tthis.globalIndex = gantt.getGlobalTaskIndex(this.taskId);\r\n\t\t}\r\n\t};\r\n\r\n\tgantt.$keyboardNavigation.TaskCell.prototype = gantt._compose(\r\n\t\tgantt.$keyboardNavigation.TaskRow,\r\n\t\t{\r\n\t\t\t_handlers: null,\r\n\t\t\tisValid: function () {\r\n\r\n\t\t\t\treturn gantt.$keyboardNavigation.TaskRow.prototype.isValid.call(this) && !!gantt.getGridColumns()[this.columnIndex];\r\n\t\t\t},\r\n\t\t\tfallback: function () {\r\n\r\n\t\t\t\tvar node = gantt.$keyboardNavigation.TaskRow.prototype.fallback.call(this);\r\n\t\t\t\tvar result = node;\r\n\t\t\t\tif (node instanceof gantt.$keyboardNavigation.TaskRow) {\r\n\t\t\t\t\tvar visibleColumns = gantt.getGridColumns();\r\n\t\t\t\t\tvar index = this.columnIndex;\r\n\t\t\t\t\twhile (index >= 0) {\r\n\t\t\t\t\t\tif (visibleColumns[index])\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tindex--;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (visibleColumns[index]) {\r\n\t\t\t\t\t\tresult = new gantt.$keyboardNavigation.TaskCell(node.taskId, index);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn result;\r\n\t\t\t},\r\n\r\n\t\t\tfromDomElement: function(el){\r\n\t\t\t\tif(!gantt.config.keyboard_navigation_cells){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar taskId = gantt.locate(el);\r\n\t\t\t\tif(gantt.isTaskExists(taskId)){\r\n\t\t\t\t\tvar index = 0;\r\n\t\t\t\t\tvar cellElement = domHelpers.locateAttribute(el, \"data-column-index\");\r\n\r\n\t\t\t\t\tif(cellElement){\r\n\t\t\t\t\t\tindex = cellElement.getAttribute(\"data-column-index\")*1;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn new gantt.$keyboardNavigation.TaskCell(taskId, index);\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tgetNode: function () {\r\n\t\t\t\tif (gantt.isTaskExists(this.taskId) && gantt.isTaskVisible(this.taskId)) {\r\n\t\t\t\t\tif (gantt.config.show_grid) {\r\n\t\t\t\t\t\tvar row = gantt.$grid.querySelector(\".gantt_row[\" + gantt.config.task_attribute + \"='\" + this.taskId + \"']\");\r\n\t\t\t\t\t\tif(!row)\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\treturn row.querySelector(\"[data-column-index='\"+this.columnIndex+\"']\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn gantt.getTaskNode(this.taskId);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tkeys: {\r\n\t\t\t\t\"up\": function () {\r\n\r\n\t\t\t\t\tvar nextElement = null;\r\n\t\t\t\t\tvar prevTask = gantt.getPrev(this.taskId);\r\n\t\t\t\t\tif (!gantt.isTaskExists(prevTask)) {\r\n\t\t\t\t\t\tnextElement = new gantt.$keyboardNavigation.HeaderCell(this.columnIndex);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnextElement = new gantt.$keyboardNavigation.TaskCell(prevTask, this.columnIndex);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.moveTo(nextElement);\r\n\t\t\t\t},\r\n\t\t\t\t\"down\": function () {\r\n\t\t\t\t\tvar nextTask = gantt.getNext(this.taskId);\r\n\t\t\t\t\tif (gantt.isTaskExists(nextTask)) {\r\n\t\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.TaskCell(nextTask, this.columnIndex));\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t\"left\": function () {\r\n\t\t\t\t\tif (this.columnIndex > 0) {\r\n\t\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.TaskCell(this.taskId, this.columnIndex - 1));\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t\"right\": function () {\r\n\t\t\t\t\tvar columns = gantt.getGridColumns();\r\n\t\t\t\t\tif (this.columnIndex < columns.length - 1) {\r\n\t\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.TaskCell(this.taskId, this.columnIndex + 1));\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\t\"end\": function () {\r\n\t\t\t\t\tvar columns = gantt.getGridColumns();\r\n\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.TaskCell(this.taskId, columns.length - 1));\r\n\t\t\t\t},\r\n\t\t\t\t\"home\": function () {\r\n\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.TaskCell(this.taskId, 0));\r\n\t\t\t\t},\r\n\t\t\t\t\"pagedown\": function () {\r\n\t\t\t\t\tif (gantt.getVisibleTaskCount()) {\r\n\t\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.TaskCell(gantt.getTaskByIndex(gantt.getVisibleTaskCount() - 1).id, this.columnIndex));\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t\"pageup\": function () {\r\n\t\t\t\t\tif (gantt.getVisibleTaskCount()) {\r\n\t\t\t\t\t\tthis.moveTo(new gantt.$keyboardNavigation.TaskCell(gantt.getTaskByIndex(0).id, this.columnIndex));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t);\r\n\r\n\r\n\tgantt.$keyboardNavigation.TaskCell.prototype.bindAll(gantt.$keyboardNavigation.TaskRow.prototype.keys);\r\n\tgantt.$keyboardNavigation.TaskCell.prototype.bindAll(gantt.$keyboardNavigation.TaskCell.prototype.keys);\r\n\r\n};","export default function(gantt) {\r\n\r\n\tgantt.$keyboardNavigation.dispatcher = {\r\n\t\tisActive: false,\r\n\t\tactiveNode: null,\r\n\t\tglobalNode: new gantt.$keyboardNavigation.GanttNode(),\r\n\r\n\t\tenable: function () {\r\n\t\t\tthis.isActive = true;\r\n\t\t\tthis.setActiveNode(this.getActiveNode());\r\n\t\t},\r\n\r\n\t\tdisable: function () {\r\n\t\t\tthis.isActive = false;\r\n\t\t},\r\n\r\n\t\tisEnabled: function () {\r\n\t\t\treturn !!this.isActive;\r\n\t\t},\r\n\r\n\t\tgetDefaultNode: function () {\r\n\t\t\tvar node;\r\n\t\t\tif (gantt.config.keyboard_navigation_cells) {\r\n\t\t\t\tnode = new gantt.$keyboardNavigation.TaskCell();\r\n\t\t\t} else {\r\n\t\t\t\tnode = new gantt.$keyboardNavigation.TaskRow();\r\n\t\t\t}\r\n\r\n\t\t\tif (!node.isValid()) {\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\tsetDefaultNode: function () {\r\n\t\t\tthis.setActiveNode(this.getDefaultNode());\r\n\t\t},\r\n\r\n\t\tgetActiveNode: function () {\r\n\t\t\tvar node = this.activeNode;\r\n\t\t\tif (node && !node.isValid()) {\r\n\t\t\t\tnode = node.fallback();\r\n\t\t\t}\r\n\t\t\treturn node;\r\n\t\t},\r\n\r\n\t\tfromDomElement: function(e){\r\n\t\t\tvar inputs = [\r\n\t\t\t\tgantt.$keyboardNavigation.TaskRow,\r\n\t\t\t\tgantt.$keyboardNavigation.TaskCell,\r\n\t\t\t\tgantt.$keyboardNavigation.HeaderCell\r\n\t\t\t];\r\n\t\t\tfor(var i = 0; i < inputs.length; i++){\r\n\t\t\t\tif(inputs[i].prototype.fromDomElement){\r\n\t\t\t\t\tvar node = inputs[i].prototype.fromDomElement(e);\r\n\t\t\t\t\tif(node) return node;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tfocusGlobalNode: function () {\r\n\t\t\tthis.blurNode(this.globalNode);\r\n\t\t\tthis.focusNode(this.globalNode);\r\n\t\t},\r\n\r\n\t\tsetActiveNode: function (el) {\r\n\t\t\t//console.trace()\r\n\t\t\tvar focusChanged = true;\r\n\t\t\tif (this.activeNode) {\r\n\t\t\t\tif (this.activeNode.compareTo(el)) {\r\n\t\t\t\t\tfocusChanged = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (this.isEnabled()) {\r\n\t\t\t\tif(focusChanged)\r\n\t\t\t\t\tthis.blurNode(this.activeNode);\r\n\r\n\t\t\t\tthis.activeNode = el;\r\n\t\t\t\tthis.focusNode(this.activeNode, !focusChanged);\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfocusNode: function (el, keptFocus) {\r\n\t\t\tif (el && el.focus) {\r\n\t\t\t\tel.focus(keptFocus);\r\n\t\t\t}\r\n\t\t},\r\n\t\tblurNode: function (el) {\r\n\t\t\tif (el && el.blur) {\r\n\t\t\t\tel.blur();\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tkeyDownHandler: function (e) {\r\n\r\n\t\t\tif (gantt.$keyboardNavigation.isModal())\r\n\t\t\t\treturn;\r\n\r\n\t\t\tif (!this.isEnabled())\r\n\t\t\t\treturn;\r\n\r\n\t\t\tif(e.defaultPrevented){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar ganttNode = this.globalNode;\r\n\r\n\t\t\tvar command = gantt.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\r\n\r\n\t\t\tvar activeElement = this.getActiveNode();\r\n\t\t\tvar eventFacade = gantt.$keyboardNavigation.facade;\r\n\t\t\tif(eventFacade.callEvent(\"onKeyDown\", [command, e]) === false){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!activeElement) {\r\n\t\t\t\tthis.setDefaultNode();\r\n\t\t\t} else if (activeElement.findHandler(command)) {\r\n\t\t\t\tactiveElement.doAction(command, e);\r\n\t\t\t} else if (ganttNode.findHandler(command)) {\r\n\t\t\t\tganttNode.doAction(command, e);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\t_timeout: null,\r\n\t\tawaitsFocus: function(){\r\n\t\t\treturn this._timeout !== null;\r\n\t\t},\r\n\t\tdelay: function(callback, delay){\r\n\r\n\t\t\tclearTimeout(this._timeout);\r\n\t\t\tthis._timeout = setTimeout(gantt.bind(function(){\r\n\t\t\t\tthis._timeout = null;\r\n\t\t\t\tcallback();\r\n\t\t\t}, this) , delay || 1);\r\n\r\n\t\t},\r\n\t\tclearDelay: function(){\r\n\t\t\tclearTimeout(this._timeout);\r\n\t\t}\r\n\t};\r\n\r\n};","import { QuickInfo } from \"./quickInfo\";\r\n\r\nexport default function(gantt: any){\r\n\r\nif (!gantt.ext) {\r\n\tgantt.ext = {};\r\n}\r\ngantt.ext.quickInfo = new QuickInfo(gantt);\r\n\r\ngantt.config.quickinfo_buttons = [\"icon_edit\", \"icon_delete\"];\r\ngantt.config.quick_info_detached = true;\r\ngantt.config.show_quick_info = true;\r\n\r\ngantt.templates.quick_info_title = function(start, end, ev){ return ev.text.substr(0,50); };\r\ngantt.templates.quick_info_content = function(start, end, ev){ return ev.details || ev.text; };\r\ngantt.templates.quick_info_date = function(start, end, ev){\r\n\treturn gantt.templates.task_time(start, end, ev);\r\n};\r\ngantt.templates.quick_info_class = function(start, end, task){ return \"\"; };\r\n\r\ngantt.attachEvent(\"onTaskClick\", function(id,e){\r\n\t// GS-1460 Don't show Quick Info when clicking on the \"+\" button\r\n\tif (!gantt.utils.dom.closest(e.target, \".gantt_add\")){\r\n\t\tsetTimeout(function() {\r\n\t\t\tgantt.ext.quickInfo.show(id);\r\n\t\t}, 0);\r\n\t}\r\n\r\n\treturn true;\r\n});\r\n\r\nconst events = [\"onViewChange\", \"onLightbox\", \"onBeforeTaskDelete\", \"onBeforeDrag\"];\r\nconst hidingFunction = function(){\r\n\tgantt.ext.quickInfo.hide();\r\n\treturn true;\r\n};\r\nfor (let i=0; i {\r\n\t\t\tif (gantt.config.touch && !gantt.config.touch_tooltip) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst targetTaskId = gantt.locate(event);\r\n\t\t\tif(gantt.isTaskExists(targetTaskId)){\r\n\t\t\t\tconst task = gantt.getTask(targetTaskId);\r\n\t\t\t\treturn gantt.templates.tooltip_text(task.start_date, task.end_date, task);\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tglobal: false\r\n\t});\r\n});\r\n\r\ngantt.attachEvent(\"onDestroy\", function() {\r\n\ttooltipManager.destructor();\r\n});\r\n\r\ngantt.attachEvent(\"onLightbox\", function() {\r\n\ttooltipManager.hideTooltip();\r\n});\r\nconst isLinkCreate = () => {\r\n\tconst state = gantt.getState();\r\n\treturn !!state.link_source_id;\r\n};\r\ngantt.attachEvent(\"onBeforeTooltip\", function() {\r\n\tif (isLinkCreate()){\r\n\t\treturn false;\r\n\t}\r\n});\r\n\r\ngantt.attachEvent(\"onGanttScroll\", function(){\r\n\ttooltipManager.hideTooltip();\r\n});\r\n\r\n}","import { Monitor } from \"./monitor\";\r\nimport { IMonitor, IUndoCommand, TEntityType, TUndoStack } from \"./types\";\r\nimport { Undo } from \"./undo\";\r\n\r\nexport default function(gantt: any){\r\n\r\nconst _undo = new Undo(gantt);\r\nconst monitor: IMonitor = new Monitor(_undo, gantt);\r\n\r\ngantt.config.undo = true;\r\ngantt.config.redo = true;\r\n\r\n/**\r\n * entities that require different processing for undoing-redoing changes\r\n * @type {{link: string, task: string}}\r\n */\r\ngantt.config.undo_types = {\r\n\tlink: \"link\",\r\n\ttask: \"task\"\r\n};\r\n\r\n/**\r\n * types of traced actions\r\n * @type {{update: string, remove: string, add: string}}\r\n */\r\ngantt.config.undo_actions = {\r\n\tupdate: \"update\",\r\n\tremove: \"remove\", // remove item from datastore\r\n\tadd: \"add\",\r\n\tmove: \"move\" // move task in grid\r\n};\r\n\r\nif (!gantt.ext) {\r\n\tgantt.ext = {};\r\n}\r\n\r\ngantt.ext.undo = {\r\n\tundo: () => _undo.undo(),\r\n\tredo: () => _undo.redo(),\r\n\tgetUndoStack: () => _undo.getUndoStack(),\r\n\tsetUndoStack: (stack:[]) => _undo.setUndoStack(stack),\r\n\tgetRedoStack: () => _undo.getRedoStack(),\r\n\tsetRedoStack: (stack:[]) => _undo.setRedoStack(stack),\r\n\tclearUndoStack: () => _undo.clearUndoStack(),\r\n\tclearRedoStack: () => _undo.clearRedoStack(),\r\n\tsaveState: (id: TaskID | LinkID, type: TEntityType) => monitor.store(id, type, true),\r\n\tgetInitialState: (id: TaskID | LinkID, type: TEntityType) => {\r\n\t\tif(type === gantt.config.undo_types.link){\r\n\t\t\treturn monitor.getInitialLink(id);\r\n\t\t}else{\r\n\t\t\treturn monitor.getInitialTask(id);\r\n\t\t}\r\n\t}\r\n};\r\n\r\ngantt.undo = gantt.ext.undo.undo;\r\ngantt.redo = gantt.ext.undo.redo;\r\ngantt.getUndoStack = gantt.ext.undo.getUndoStack;\r\ngantt.getRedoStack = gantt.ext.undo.getRedoStack;\r\ngantt.clearUndoStack = gantt.ext.undo.clearUndoStack;\r\ngantt.clearRedoStack = gantt.ext.undo.clearRedoStack;\r\n\r\nfunction updTask(task: ITask, oldId: TaskID, newId: TaskID) {\r\n\tif (!task) { return; }\r\n\r\n\tif (task.id === oldId) {\r\n\t\ttask.id = newId;\r\n\t}\r\n\r\n\tif (task.parent === oldId) {\r\n\t\ttask.parent = newId;\r\n\t}\r\n}\r\n\r\nfunction changeTaskCommandId(command: IUndoCommand, oldId: TaskID, newId: TaskID) {\r\n\tupdTask(command.value, oldId, newId);\r\n\tupdTask(command.oldValue, oldId, newId);\r\n}\r\n\r\nfunction updLink(link: ILink, oldTaskId: TaskID, newTaskId: TaskID) {\r\n\tif (!link) { return; }\r\n\tif (link.source === oldTaskId) {\r\n\t\tlink.source = newTaskId;\r\n\t}\r\n\tif (link.target === oldTaskId) {\r\n\t\tlink.target = newTaskId;\r\n\t}\r\n}\r\n\r\nfunction changeLinkCommandId(command: IUndoCommand, oldId: LinkID, newId: LinkID) {\r\n\tupdLink(command.value, oldId, newId);\r\n\tupdLink(command.oldValue, oldId, newId);\r\n}\r\n\r\nfunction updateTasksIds(log: TUndoStack, oldId: TaskID, newId: TaskID) {\r\n\tconst undo = _undo;\r\n\r\n\tfor (let i = 0; i < log.length; i++) {\r\n\t\tconst entry = log[i];\r\n\t\tfor (let j = 0; j < entry.commands.length; j++) {\r\n\t\t\tif (entry.commands[j].entity === undo.command.entity.task) {\r\n\t\t\t\tchangeTaskCommandId(entry.commands[j], oldId, newId);\r\n\t\t\t} else if (entry.commands[j].entity === undo.command.entity.link) {\r\n\t\t\t\tchangeLinkCommandId(entry.commands[j], oldId, newId);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction updateLinksIds(log: TUndoStack, oldId: LinkID, newId: LinkID) {\r\n\tconst undo = _undo;\r\n\r\n\tfor (let i = 0; i < log.length; i++) {\r\n\t\tconst entry = log[i];\r\n\t\tfor (let j = 0; j < entry.commands.length; j++) {\r\n\t\t\tconst command = entry.commands[j];\r\n\t\t\tif (command.entity === undo.command.entity.link) {\r\n\t\t\t\tif (command.value && command.value.id === oldId) {\r\n\t\t\t\t\tcommand.value.id = newId;\r\n\t\t\t\t}\r\n\t\t\t\tif (command.oldValue && command.oldValue.id === oldId) {\r\n\t\t\t\t\tcommand.oldValue.id = newId;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\ngantt.attachEvent(\"onTaskIdChange\", (oldId: TaskID, newId: TaskID) => {\r\n\tconst undo = _undo;\r\n\tupdateTasksIds(undo.getUndoStack(), oldId, newId);\r\n\tupdateTasksIds(undo.getRedoStack(), oldId, newId);\r\n});\r\n\r\ngantt.attachEvent(\"onLinkIdChange\", (oldId: LinkID, newId: LinkID) => {\r\n\tconst undo = _undo;\r\n\tupdateLinksIds(undo.getUndoStack(), oldId, newId);\r\n\tupdateLinksIds(undo.getRedoStack(), oldId, newId);\r\n});\r\n\r\ngantt.attachEvent(\"onGanttReady\", () => {\r\n\t_undo.updateConfigs();\r\n});\r\n\r\n}","\r\nexport default function(gantt){\r\n\r\nif(!gantt._markers) {\r\n\tgantt._markers = gantt.createDatastore({\r\n\t\tname: \"marker\",\r\n\t\tinitItem: function (marker) {\r\n\t\t\tmarker.id = marker.id || gantt.uid();\r\n\t\t\treturn marker;\r\n\t\t}\r\n\t});\r\n}\r\n\r\ngantt.config.show_markers = true;\r\n\r\nfunction render_marker(marker){\r\n\tif(!gantt.config.show_markers)\r\n\t\treturn false;\r\n\r\n\tif(!marker.start_date)\r\n\t\treturn false;\r\n\r\n\tvar state = gantt.getState();\r\n\tif(+marker.start_date > +state.max_date)\r\n\t\treturn;\r\n\tif((!marker.end_date || +marker.end_date < +state.min_date) && +marker.start_date < +state.min_date)\r\n\t\treturn;\r\n\r\n\tvar div = document.createElement(\"div\");\r\n\r\n\tdiv.setAttribute(\"data-marker-id\", marker.id);\r\n\r\n\tvar css = \"gantt_marker\";\r\n\r\n\tif(marker.css){\r\n\t\tcss += \" \" + marker.css;\r\n\t}\r\n\r\n\tif(marker.title){\r\n\t\tdiv.title = marker.title;\r\n\t}\r\n\tdiv.className = css;\r\n\r\n\tvar start = gantt.posFromDate(marker.start_date);\r\n\tdiv.style.left = start + \"px\";\r\n\tlet markerHeight = Math.max(gantt.getRowTop(gantt.getVisibleTaskCount()), 0) + \"px\";\r\n\tif (gantt.config.timeline_placeholder && gantt.$task_data){\r\n\t\tmarkerHeight = gantt.$task_data.scrollHeight + \"px\";\r\n\t}\r\n\tdiv.style.height = markerHeight;\r\n\tif(marker.end_date){\r\n\t\tvar end = gantt.posFromDate(marker.end_date);\r\n\t\tdiv.style.width = Math.max((end - start), 0) + \"px\";\r\n\r\n\t}\r\n\r\n\tif(marker.text){\r\n\t\tdiv.innerHTML = \"
\" + marker.text + \"
\";\r\n\t}\r\n\r\n\treturn div;\r\n}\r\n\r\nfunction initMarkerArea(){\r\n\tif(!gantt.$task_data)\r\n\t\treturn;\r\n\r\n\tvar markerArea = document.createElement(\"div\");\r\n\tmarkerArea.className = \"gantt_marker_area\";\r\n\tgantt.$task_data.appendChild(markerArea);\r\n\tgantt.$marker_area = markerArea;\r\n}\r\n\r\ngantt.attachEvent(\"onBeforeGanttRender\", function(){\r\n\tif(!gantt.$marker_area)\r\n\t\tinitMarkerArea();\r\n});\r\n\r\ngantt.attachEvent(\"onDataRender\", function(){\r\n\tif(!gantt.$marker_area){\r\n\t\tinitMarkerArea();\r\n\t\tgantt.renderMarkers();\r\n\t}\r\n});\r\n\r\ngantt.attachEvent(\"onGanttLayoutReady\", function(){\r\n\t// GS-1304 - markers should attach when layout is initialized, both on gantt.init and gantt.resetLayout\r\n\t// wait for \"onBeforeGanttRender\", so all layout elements will be in DOM\r\n\tgantt.attachEvent(\"onBeforeGanttRender\", function(){\r\n\t\tinitMarkerArea();\r\n\r\n\t\tvar layers = gantt.$services.getService(\"layers\");\r\n\t\tvar markerRenderer = layers.createDataRender({\r\n\t\t\tname: \"marker\",\r\n\t\t\tdefaultContainer: function(){ return gantt.$marker_area;}\r\n\t\t});\r\n\t\tmarkerRenderer.addLayer(render_marker);\r\n\t}, {once: true});\r\n});\r\n\r\ngantt.getMarker = function(id){\r\n\tif(!this._markers) return null;\r\n\r\n\treturn this._markers.getItem(id);\r\n};\r\n\r\ngantt.addMarker = function(marker){\r\n\treturn this._markers.addItem(marker);\r\n};\r\n\r\ngantt.deleteMarker = function(id){\r\n\tif(!this._markers.exists(id))\r\n\t\treturn false;\r\n\r\n\tthis._markers.removeItem(id);\r\n\treturn true;\r\n};\r\ngantt.updateMarker = function(id){\r\n\tthis._markers.refresh(id);\r\n};\r\n\r\ngantt._getMarkers = function(){\r\n\treturn this._markers.getItems();\r\n};\r\n\r\ngantt.renderMarkers = function () {\r\n\tthis._markers.refresh();\r\n};\r\n\r\n};","import {replaceValidZeroId} from \"../utils/helpers\";\r\n\r\nexport default function(gantt){\r\n\r\ngantt.config.multiselect = true;\r\ngantt.config.multiselect_one_level = false;\r\n\r\ngantt._multiselect = {\r\n\t_selected: {},\r\n\t_one_level: false,\r\n\t_active: true,\r\n\t_first_selected_when_shift: null,\r\n\tgetDefaultSelected: function() {\r\n\t\tvar selected = this.getSelected();\r\n\t\treturn selected.length ? selected[selected.length - 1] : null;\r\n\t},\r\n\tsetFirstSelected: function(id) {\r\n\t\tthis._first_selected_when_shift = id;\r\n\t},\r\n\tgetFirstSelected: function() {\r\n\t\treturn this._first_selected_when_shift;\r\n\t},\r\n\tisActive: function() {\r\n\t\tthis.updateState();\r\n\t\treturn this._active;\r\n\t},\r\n\tupdateState: function() {\r\n\t\tthis._one_level = gantt.config.multiselect_one_level;\r\n\t\tvar active = this._active;\r\n\t\tthis._active = gantt.config.select_task;\r\n\t\tif (this._active != active) {\r\n\t\t\tthis.reset();\r\n\t\t}\r\n\t},\r\n\treset: function () {\r\n\t\tthis._selected = {};\r\n\t},\r\n\tsetLastSelected: function (id) {\r\n\t\tgantt.$data.tasksStore.silent(function(){\r\n\t\t\tvar store = gantt.$data.tasksStore;\r\n\t\t\tif (id)\r\n\t\t\t\tstore.select(id+\"\");\r\n\t\t\telse\r\n\t\t\t\tstore.unselect(null);\r\n\t\t});\r\n\t},\r\n\tgetLastSelected: function () {\r\n\t\tvar last = gantt.$data.tasksStore.getSelectedId();\r\n\t\tif (last && gantt.isTaskExists(last))\r\n\t\t\treturn last;\r\n\t\treturn null;\r\n\t},\r\n\tselect: function (id, e) {\r\n\t\tif (id && gantt.callEvent(\"onBeforeTaskMultiSelect\", [id, true, e]) && gantt.callEvent(\"onBeforeTaskSelected\", [id])) {\r\n\t\t\tthis._selected[id] = true;\r\n\t\t\tthis.setLastSelected(id);\r\n\t\t\tthis.afterSelect(id);\r\n\t\t\tgantt.callEvent(\"onTaskMultiSelect\", [id, true, e]);\r\n\t\t\tgantt.callEvent(\"onTaskSelected\", [id]);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\ttoggle: function (id, e) {\r\n\t\tif (this._selected[id]) {\r\n\t\t\tthis.unselect(id, e);\r\n\t\t} else {\r\n\t\t\tthis.select(id, e);\r\n\t\t}\r\n\t},\r\n\tunselect: function (id, e) {\r\n\t\tif (id && gantt.callEvent(\"onBeforeTaskMultiSelect\", [id, false, e])) {\r\n\t\t\tthis._selected[id] = false;\r\n\t\t\tif (this.getLastSelected() == id)\r\n\t\t\t\tthis.setLastSelected(this.getDefaultSelected());\r\n\t\t\tthis.afterSelect(id);\r\n\t\t\tgantt.callEvent(\"onTaskMultiSelect\", [id, false, e]);\r\n\t\t\tgantt.callEvent(\"onTaskUnselected\", [id]);\r\n\t\t}\r\n\t},\r\n\tisSelected: function (id) {\r\n\t\treturn !!(gantt.isTaskExists(id) && this._selected[id]);\r\n\t},\r\n\tgetSelected: function () {\r\n\t\tvar res = [];\r\n\t\tfor (var i in this._selected) {\r\n\t\t\tif (this._selected[i] && gantt.isTaskExists(i)) {\r\n\t\t\t\tres.push(i);\r\n\t\t\t} else {\r\n\t\t\t\tthis._selected[i] = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tres.sort(function(a, b) {\r\n\t\t\treturn gantt.getGlobalTaskIndex(a) > gantt.getGlobalTaskIndex(b) ? 1 : -1;\r\n\t\t});\r\n\t\treturn res;\r\n\t},\r\n\tforSelected: function (callback) {\r\n\t\tvar selected = this.getSelected();\r\n\t\tfor (var i = 0; i < selected.length; i++) {\r\n\t\t\tcallback(selected[i]);\r\n\t\t}\r\n\t},\r\n\tisSameLevel: function(id) {\r\n\t\tif (!this._one_level)\r\n\t\t\treturn true;\r\n\t\tvar last = this.getLastSelected();\r\n\t\tif (!last)\r\n\t\t\treturn true;\r\n\t\tif (!(gantt.isTaskExists(last) && gantt.isTaskExists(id)))\r\n\t\t\treturn true;\r\n\t\treturn !!(gantt.calculateTaskLevel(gantt.getTask(last)) == gantt.calculateTaskLevel(gantt.getTask(id)));\r\n\t},\r\n\tafterSelect: function(id) {\r\n\t\tif (gantt.isTaskExists(id)){\r\n\t\t\t// FIXME: quick workaround to prevent re-filtering inside refresh on multiselect\r\n\t\t\tgantt._quickRefresh(function(){\r\n\t\t\t\tgantt.refreshTask(id);\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\tdoSelection: function(e) {\r\n\t\tif (!this.isActive())\r\n\t\t\treturn false;\r\n\r\n\t\t// deny selection when click on 'expand' or 'collapse' icons\r\n\t\tif (gantt._is_icon_open_click(e))\r\n\t\t\treturn false;\r\n\r\n\t\tvar target_ev = gantt.locate(e);\r\n\t\tif (!target_ev)\r\n\t\t\treturn false;\r\n\r\n\t\tif (!gantt.callEvent(\"onBeforeMultiSelect\", [e]))\r\n\t\t\treturn false;\r\n\r\n\t\tvar selected = this.getSelected();\r\n\t\tvar defaultLast = this.getFirstSelected();\r\n\t\tvar isLast = false;\r\n\t\tvar last = this.getLastSelected();\r\n\t\tvar multiSelect = gantt.config.multiselect;\r\n\r\n\r\n\t\tvar singleSelection = (function () {\r\n\t\t\t// GS-719: If the multiselect extension is added we still need a way\r\n\t\t\t// to open the inline editors after clicking on the cells in the grid\r\n\t\t\tvar controller = gantt.ext.inlineEditors;\r\n\t\t\tvar state = controller.getState();\r\n\t\t\tvar cell = controller.locateCell(e.target);\r\n\r\n\t\t\tif (gantt.config.inline_editors_multiselect_open && cell && controller.getEditorConfig(cell.columnName)) {\r\n\t\t\t\tif (controller.isVisible() && state.id == cell.id && state.columnName == cell.columnName) {\r\n\t\t\t\t\t// do nothing if editor is already active in this cell\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontroller.startEdit(cell.id, cell.columnName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.setFirstSelected(target_ev);\r\n\r\n\t\t\tif (!this.isSelected(target_ev)) {\r\n\t\t\t\tthis.select(target_ev, e);\r\n\t\t\t}\r\n\t\t\tselected = this.getSelected();\r\n\t\t\tfor (var i = 0; i < selected.length; i++) {\r\n\t\t\t\tif (selected[i] !== target_ev) {\r\n\t\t\t\t\tthis.unselect(selected[i], e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}).bind(this);\r\n\r\n\t\tvar blockSelection = (function(){\r\n\t\t\tif (!last)\r\n\t\t\t\tlast = target_ev;\r\n\t\t\telse if (target_ev) {\r\n\t\t\t\tvar first_indx = gantt.getGlobalTaskIndex(this.getFirstSelected());\r\n\t\t\t\tvar target_indx = gantt.getGlobalTaskIndex(target_ev);\r\n\t\t\t\tvar last_indx = gantt.getGlobalTaskIndex(last);\r\n\r\n\t\t\t\t// clear prev selection\r\n\t\t\t\tvar tmp = last;\r\n\t\t\t\twhile (gantt.getGlobalTaskIndex(tmp) !== first_indx) {\r\n\t\t\t\t\tthis.unselect(tmp, e);\r\n\t\t\t\t\ttmp = (first_indx > last_indx) ? gantt.getNext(tmp) : gantt.getPrev(tmp);\r\n\t\t\t\t}\r\n\t\t\t\ttmp = target_ev;\r\n\t\t\t\twhile (gantt.getGlobalTaskIndex(tmp) !== first_indx) {\r\n\t\t\t\t\tif (this.select(tmp, e) && !isLast) {\r\n\t\t\t\t\t\tisLast = true;\r\n\t\t\t\t\t\tdefaultLast = tmp;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttmp = (first_indx > target_indx) ? gantt.getNext(tmp) : gantt.getPrev(tmp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}).bind(this);\r\n\r\n\r\n\t\tif (multiSelect && (e.ctrlKey || e.metaKey)) {\r\n\t\t\tif (!this.isSelected(target_ev))\r\n\t\t\t\tthis.setFirstSelected(target_ev);\r\n\r\n\t\t\tif (target_ev) {\r\n\t\t\t\tthis.toggle(target_ev, e);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (multiSelect && e.shiftKey) {\r\n\t\t\tif (!gantt.isTaskExists(this.getFirstSelected()) || this.getFirstSelected() === null) {\r\n\t\t\t\tthis.setFirstSelected(target_ev);\r\n\t\t\t}\r\n\r\n\t\t\tif (selected.length) { // select a group of tasks\r\n\t\t\t\tblockSelection();\r\n\t\t\t}\r\n\t\t\telse { // select a task when no task is selected and Shift is pressed\r\n\t\t\t\tsingleSelection();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse { // no key press or no multiple selection on the mouse click\r\n\t\t\tsingleSelection();\r\n\t\t}\r\n\r\n\r\n\t\tif (this.isSelected(target_ev)) {\r\n\t\t\tthis.setLastSelected(target_ev);\r\n\t\t} else if (defaultLast) {\r\n\t\t\tif (target_ev == last)\r\n\t\t\t\tthis.setLastSelected(e.shiftKey ? defaultLast : this.getDefaultSelected());\r\n\t\t} else {\r\n\t\t\tthis.setLastSelected(null);\r\n\t\t}\r\n\r\n\t\tif (!this.getSelected().length)\r\n\t\t\tthis.setLastSelected(null);\r\n\r\n\t\tif (!this.getLastSelected() || !this.isSelected(this.getFirstSelected()))\r\n\t\t\tthis.setFirstSelected(this.getLastSelected());\r\n\r\n\t\treturn true;\r\n\t}\r\n};\r\n\r\n(function(){\r\n\tvar old_selectTask = gantt.selectTask;\r\n\tgantt.selectTask = function(id) {\r\n\t\tid = replaceValidZeroId(id, this.config.root_id);\r\n\t\tif (!id)\r\n\t\t\treturn false;\r\n\t\tvar multiselect = gantt._multiselect;\r\n\t\tvar res = id;\r\n\t\tif (multiselect.isActive()) {\r\n\t\t\tif (multiselect.select(id, null)) {\r\n\t\t\t\tmultiselect.setLastSelected(id);\r\n\t\t\t}\r\n\t\t\tmultiselect.setFirstSelected(multiselect.getLastSelected());\r\n\t\t} else {\r\n\t\t\tres = old_selectTask.call(this, id);\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tvar old_unselectTask = gantt.unselectTask;\r\n\tgantt.unselectTask = function(id) {\r\n\t\tvar multiselect = gantt._multiselect;\r\n\t\tvar isActive = multiselect.isActive();\r\n\t\tid = id || multiselect.getLastSelected();\r\n\t\tif(id && isActive) {\r\n\t\t\tmultiselect.unselect(id, null);\r\n\t\t\tif (id == multiselect.getLastSelected())\r\n\t\t\t\tmultiselect.setLastSelected(null);\r\n\t\t\tgantt.refreshTask(id);\r\n\t\t\tmultiselect.setFirstSelected(multiselect.getLastSelected());\r\n\t\t}\r\n\t\tvar res = id;\r\n\t\tif (!isActive)\r\n\t\t\tres = old_unselectTask.call(this, id);\r\n\t\treturn res;\r\n\t};\r\n\r\n\tgantt.toggleTaskSelection = function(id) {\r\n\t\tvar multiselect = gantt._multiselect;\r\n\t\tif (id && multiselect.isActive()) {\r\n\t\t\tmultiselect.toggle(id);\r\n\t\t\tmultiselect.setFirstSelected(multiselect.getLastSelected());\r\n\t\t}\r\n\t};\r\n\tgantt.getSelectedTasks = function() {\r\n\t\tvar multiselect = gantt._multiselect;\r\n\t\tmultiselect.isActive();\r\n\t\treturn multiselect.getSelected();\r\n\t};\r\n\tgantt.eachSelectedTask = function(callback){\r\n\t\treturn this._multiselect.forSelected(callback);\r\n\t};\r\n\tgantt.isSelectedTask = function(id){\r\n\t\treturn this._multiselect.isSelected(id);\r\n\t};\r\n\tgantt.getLastSelectedTask = function(){\r\n\t\treturn this._multiselect.getLastSelected();\r\n\t};\r\n\tgantt.attachEvent(\"onGanttReady\", function(){\r\n\t\tvar old_isSelected = gantt.$data.tasksStore.isSelected;\r\n\t\tgantt.$data.tasksStore.isSelected = function(id){\r\n\t\t\tif (gantt._multiselect.isActive()) {\r\n\t\t\t\treturn gantt._multiselect.isSelected(id);\r\n\t\t\t}\r\n\t\t\treturn old_isSelected.call(this, id);\r\n\t\t};\r\n\t});\r\n})();\r\n\r\ngantt.attachEvent(\"onTaskIdChange\", function (id, new_id) {\r\n\tvar multiselect = gantt._multiselect;\r\n\tif (!multiselect.isActive())\r\n\t\treturn true;\r\n\tif (gantt.isSelectedTask(id)) {\r\n\t\tmultiselect.unselect(id, null);\r\n\t\tmultiselect.select(new_id, null);\r\n\t}\r\n});\r\n\r\ngantt.attachEvent(\"onAfterTaskDelete\", function (id, item) {\r\n\tvar multiselect = gantt._multiselect;\r\n\tif (!multiselect.isActive())\r\n\t\treturn true;\r\n\r\n\tif (multiselect._selected[id]) {\r\n\t\t// GS-1057: don't unselect the task here because the task is already unselected \r\n\t\t// it was in the select.js file before it was deleted\r\n\t\t// multiselect.unselect(id, null);\r\n\t\tmultiselect._selected[id] = false;\r\n\t\tmultiselect.setLastSelected(multiselect.getDefaultSelected());\r\n\t}\r\n\r\n\tmultiselect.forSelected(function (task_id) {\r\n\t\tif (!gantt.isTaskExists(task_id))\r\n\t\t\tmultiselect.unselect(task_id, null);\r\n\t});\r\n});\r\n\r\ngantt.attachEvent(\"onBeforeTaskMultiSelect\", function(id, state, e){\r\n\tvar multiselect = gantt._multiselect;\r\n\tif (state && multiselect.isActive()) {\r\n\t\tif (multiselect._one_level) {\r\n\t\t\treturn multiselect.isSameLevel(id);\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n});\r\n\r\ngantt.attachEvent(\"onTaskClick\", function(id, e) {\r\n\tif (gantt._multiselect.doSelection(e))\r\n\t\tgantt.callEvent(\"onMultiSelect\", [e]);\r\n\treturn true;\r\n});\r\n\r\n};","/* eslint-disable */\r\n\r\nexport default function(gantt: any) {\r\n\r\n\tgantt.ext = gantt.ext || {};\r\n\r\n\tgantt.ext.export_api = gantt.ext.export_api || {\r\n\r\n\t\t_apiUrl: \"https://export.dhtmlx.com/gantt\",\r\n\r\n\t\t_preparePDFConfigRaw(config, type){\r\n\t\t\tlet previousDateRage = null;\r\n\t\t\tif (config.start && config.end){\r\n\t\t\t\tpreviousDateRage = {\r\n\t\t\t\t\tstart_date: gantt.config.start_date,\r\n\t\t\t\t\tend_date: gantt.config.end_date,\r\n\t\t\t\t};\r\n\t\t\t\tgantt.config.start_date = gantt.date.str_to_date(gantt.config.date_format)(config.start);\r\n\t\t\t\tgantt.config.end_date = gantt.date.str_to_date(gantt.config.date_format)(config.end);\r\n\t\t\t}\r\n\r\n\t\t\tconfig = gantt.mixin(config, {\r\n\t\t\t\tname: \"gantt.\" + type, data: gantt.ext.export_api._serializeHtml()\r\n\t\t\t});\r\n\r\n\t\t\tif (previousDateRage){\r\n\t\t\t\tgantt.config.start_date = previousDateRage.start_date;\r\n\t\t\t\tgantt.config.end_date = previousDateRage.end_date;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_prepareConfigPDF(config, type){\r\n\t\t\tconfig = gantt.mixin((config || {}), {\r\n\t\t\t\tname: \"gantt.\" + type,\r\n\t\t\t\tdata: gantt.ext.export_api._serializeAll(),\r\n\t\t\t\tconfig: gantt.config\r\n\t\t\t});\r\n\t\t\tgantt.ext.export_api._fixColumns(config.config.columns);\r\n\t\t\treturn config;\r\n\t\t},\r\n\r\n\t\t_pdfExportRouter(config, type){\r\n\t\t\tif (config && config.raw) {\r\n\t\t\t\tgantt.ext.export_api._preparePDFConfigRaw(config, type);\r\n\t\t\t} else {\r\n\t\t\t\tconfig = gantt.ext.export_api._prepareConfigPDF(config, type);\r\n\t\t\t}\r\n\t\t\tconfig.version = gantt.version;\r\n\t\t\tgantt.ext.export_api._sendToExport(config, type);\r\n\t\t},\r\n\r\n\t\texportToPDF(config) {\r\n\t\t\tgantt.ext.export_api._pdfExportRouter(config, \"pdf\");\r\n\t\t},\r\n\r\n\t\texportToPNG(config) {\r\n\t\t\tgantt.ext.export_api._pdfExportRouter(config, \"png\");\r\n\t\t},\r\n\r\n\r\n\t\texportToICal(config) {\r\n\t\t\tconfig = gantt.mixin((config || {}), {\r\n\t\t\t\tname: \"gantt.ical\",\r\n\t\t\t\tdata: gantt.ext.export_api._serializePlain().data,\r\n\t\t\t\tversion: gantt.version\r\n\t\t\t});\r\n\t\t\tgantt.ext.export_api._sendToExport(config, \"ical\");\r\n\t\t},\r\n\r\n\t\texportToExcel(config) {\r\n\t\t\tconfig = config || {};\r\n\r\n\t\t\tlet tasks;\r\n\t\t\tlet dates;\r\n\t\t\tlet state;\r\n\t\t\tlet scroll;\r\n\t\t\t// GS-2124, we need to get all task nodes to correctly obtain the colors\r\n\t\t\tconst smartRendering = gantt.config.smart_rendering;\r\n\t\t\tif (config.visual === \"base-colors\"){\r\n\t\t\t\tgantt.config.smart_rendering = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (config.start || config.end) {\r\n\t\t\t\tstate = gantt.getState();\r\n\t\t\t\tdates = [gantt.config.start_date, gantt.config.end_date];\r\n\t\t\t\tscroll = gantt.getScrollState();\r\n\t\t\t\tconst convert = gantt.date.str_to_date(gantt.config.date_format);\r\n\t\t\t\ttasks = gantt.eachTask;\r\n\r\n\t\t\t\tif (config.start){\r\n\t\t\t\t\tgantt.config.start_date = convert(config.start);\r\n\t\t\t\t}\r\n\t\t\t\tif (config.end){\r\n\t\t\t\t\tgantt.config.end_date = convert(config.end);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tgantt.render();\r\n\t\t\t\tgantt.config.smart_rendering = smartRendering;\r\n\r\n\t\t\t\tgantt.eachTask = gantt.ext.export_api._eachTaskTimed(gantt.config.start_date, gantt.config.end_date);\r\n\t\t\t} else if (config.visual === \"base-colors\"){\r\n\t\t\t\tgantt.render();\r\n\t\t\t\tgantt.config.smart_rendering = smartRendering;\r\n\t\t\t}\r\n\r\n\t\t\tgantt._no_progress_colors = config.visual === \"base-colors\";\r\n\r\n\t\t\tconfig = gantt.mixin(config, {\r\n\t\t\t\tname: \"gantt.xlsx\",\r\n\t\t\t\ttitle: \"Tasks\",\r\n\t\t\t\tdata: gantt.ext.export_api._serializeTimeline(config).data,\r\n\t\t\t\tcolumns: gantt.ext.export_api._serializeGrid({ rawDates: true }),\r\n\t\t\t\tversion: gantt.version\r\n\t\t\t});\r\n\r\n\t\t\tif (config.visual){\r\n\t\t\t\tconfig.scales = gantt.ext.export_api._serializeScales(config);\r\n\t\t\t}\r\n\r\n\t\t\tgantt.ext.export_api._sendToExport(config, \"excel\");\r\n\r\n\t\t\tif (config.start || config.end) {\r\n\t\t\t\tgantt.config.start_date = state.min_date;\r\n\t\t\t\tgantt.config.end_date = state.max_date;\r\n\t\t\t\tgantt.eachTask = tasks;\r\n\r\n\t\t\t\tgantt.render();\r\n\t\t\t\tgantt.scrollTo(scroll.x, scroll.y);\r\n\r\n\t\t\t\tgantt.config.start_date = dates[0];\r\n\t\t\t\tgantt.config.end_date = dates[1];\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\texportToJSON(config) {\r\n\t\t\tconfig = gantt.mixin((config || {}), {\r\n\t\t\t\tname: \"gantt.json\",\r\n\t\t\t\tdata: gantt.ext.export_api._serializeAll(),\r\n\t\t\t\tconfig: gantt.config,\r\n\t\t\t\tcolumns: gantt.ext.export_api._serializeGrid(),\r\n\t\t\t\tworktime: gantt.ext.export_api._getWorktimeSettings(),\r\n\t\t\t\tversion: gantt.version\r\n\t\t\t});\r\n\t\t\tgantt.ext.export_api._sendToExport(config, \"json\");\r\n\t\t},\r\n\r\n\r\n\t\timportFromExcel(config) {\r\n\t\t\ttry {\r\n\t\t\t\tconst formData = config.data;\r\n\t\t\t\tif (formData instanceof File) {\r\n\t\t\t\t\tconst data = new FormData();\r\n\t\t\t\t\tdata.append(\"file\", formData);\r\n\t\t\t\t\tconfig.data = data;\r\n\t\t\t\t}\r\n\t\t\t} catch (error) {}\r\n\t\t\tgantt.ext.export_api._sendImportAjaxExcel(config);\r\n\t\t},\r\n\r\n\t\timportFromMSProject(config) {\r\n\t\t\tconst formData = config.data;\r\n\t\t\ttry {\r\n\t\t\t\tif (formData instanceof File) {\r\n\t\t\t\t\tconst data = new FormData();\r\n\t\t\t\t\tdata.append(\"file\", formData);\r\n\t\t\t\t\tconfig.data = data;\r\n\t\t\t\t}\r\n\t\t\t} catch (error) {}\r\n\t\t\tgantt.ext.export_api._sendImportAjaxMSP(config);\r\n\t\t},\r\n\r\n\t\timportFromPrimaveraP6(config) {\r\n\t\t\tconfig.type = \"primaveraP6-parse\";\r\n\t\t\treturn gantt.importFromMSProject(config);\r\n\t\t},\r\n\r\n\t\texportToMSProject(config) {\r\n\t\t\tconfig = config || {};\r\n\t\t\tconfig.skip_circular_links = config.skip_circular_links === undefined ? true : !!config.skip_circular_links;\r\n\r\n\t\t\tconst oldXmlFormat = gantt.templates.xml_format;\r\n\t\t\tconst oldFormatDate = gantt.templates.format_date;\r\n\t\t\tconst oldXmlDate = gantt.config.xml_date;\r\n\t\t\tconst oldDateFormat = gantt.config.date_format;\r\n\r\n\t\t\tconst exportServiceDateFormat = \"%d-%m-%Y %H:%i:%s\";\r\n\r\n\t\t\tgantt.config.xml_date = exportServiceDateFormat;\r\n\t\t\tgantt.config.date_format = exportServiceDateFormat;\r\n\t\t\tgantt.templates.xml_format = gantt.date.date_to_str(exportServiceDateFormat);\r\n\t\t\tgantt.templates.format_date = gantt.date.date_to_str(exportServiceDateFormat);\r\n\t\t\tconst data = gantt.ext.export_api._serializeAll();\r\n\r\n\t\t\tgantt.ext.export_api._customProjectProperties(data, config);\r\n\r\n\t\t\tgantt.ext.export_api._customTaskProperties(data, config);\r\n\r\n\t\t\tif (config.skip_circular_links) {\r\n\t\t\t\tgantt.ext.export_api._clearRecLinks(data);\r\n\t\t\t}\r\n\r\n\t\t\tconfig = gantt.ext.export_api._exportConfig(data, config);\r\n\r\n\t\t\tgantt.ext.export_api._sendToExport(config, config.type || \"msproject\");\r\n\t\t\tgantt.config.xml_date = oldXmlDate;\r\n\t\t\tgantt.config.date_format = oldDateFormat;\r\n\t\t\tgantt.templates.xml_format = oldXmlFormat;\r\n\t\t\tgantt.templates.format_date = oldFormatDate;\r\n\r\n\t\t\tgantt.config.$custom_data = null;\r\n\t\t\tgantt.config.custom = null;\r\n\t\t},\r\n\r\n\t\texportToPrimaveraP6(config) {\r\n\t\t\tconfig = config || {};\r\n\t\t\tconfig.type = \"primaveraP6\";\r\n\t\t\treturn gantt.exportToMSProject(config);\r\n\t\t},\r\n\r\n\t\t_fixColumns(columns) {\r\n\t\t\tfor (let i = 0; i < columns.length; i++) {\r\n\t\t\t\tcolumns[i].label = columns[i].label || gantt.locale.labels[\"column_\" + columns[i].name];\r\n\t\t\t\tif (typeof columns[i].width === \"string\") {\r\n\t\t\t\t\tcolumns[i].width = columns[i].width * 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_xdr(url, pack, cb) {\r\n\t\t\tgantt.ajax.post(url, pack, cb);\r\n\t\t},\r\n\r\n\t\t_markColumns(base) {\r\n\t\t\tconst columns = base.config.columns;\r\n\t\t\tif (columns){\r\n\t\t\t\tfor (let i = 0; i < columns.length; i++) {\r\n\t\t\t\t\tif (columns[i].template){\r\n\t\t\t\t\t\tcolumns[i].$template = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\t_sendImportAjaxExcel(config) {\r\n\t\t\tconst url = config.server || gantt.ext.export_api._apiUrl;\r\n\t\t\tconst store = config.store || 0;\r\n\t\t\tconst formData = config.data;\r\n\t\t\tconst callback = config.callback;\r\n\r\n\t\t\tformData.append(\"type\", \"excel-parse\");\r\n\t\t\tformData.append(\"data\", JSON.stringify({\r\n\t\t\t\tsheet: config.sheet || 0\r\n\t\t\t}));\r\n\r\n\t\t\tif (store){\r\n\t\t\t\tformData.append(\"store\", store);\r\n\t\t\t}\r\n\r\n\t\t\tconst xhr = new XMLHttpRequest();\r\n\t\t\txhr.onreadystatechange = function(e) {\r\n\t\t\t\tif (xhr.readyState === 4 && xhr.status === 0) {// network error\r\n\t\t\t\t\tif (callback) {\r\n\t\t\t\t\t\tcallback(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\txhr.onload = function() {\r\n\t\t\t\tconst fail = xhr.status > 400;\r\n\t\t\t\tlet info = null;\r\n\r\n\t\t\t\tif (!fail) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tinfo = JSON.parse(xhr.responseText);\r\n\t\t\t\t\t} catch (e) { }\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (callback) {\r\n\t\t\t\t\tcallback(info);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\txhr.open(\"POST\", url, true);\r\n\t\t\txhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\t\t\txhr.send(formData);\r\n\t\t},\r\n\r\n\r\n\t\t_ajaxToExport(data, type, callback) {\r\n\t\t\tdelete data.callback;\r\n\r\n\t\t\tconst url = data.server || gantt.ext.export_api._apiUrl;\r\n\t\t\tconst pack = \"type=\" + type + \"&store=1&data=\" + encodeURIComponent(JSON.stringify(data));\r\n\r\n\t\t\tconst cb = function(loader) {\r\n\t\t\t\tconst xdoc = loader.xmlDoc || loader;\r\n\t\t\t\tconst fail = xdoc.status > 400;\r\n\t\t\t\tlet info = null;\r\n\r\n\t\t\t\tif (!fail) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tinfo = JSON.parse(xdoc.responseText);\r\n\t\t\t\t\t} catch (e) { }\r\n\t\t\t\t}\r\n\t\t\t\tcallback(info);\r\n\t\t\t};\r\n\r\n\t\t\tgantt.ext.export_api._xdr(url, pack, cb);\r\n\t\t},\r\n\t\t_serializableGanttConfig(config) {\r\n\t\t\tconst result = gantt.mixin({}, config);\r\n\r\n\t\t\tif (result.columns) {\r\n\t\t\t\tresult.columns = result.columns.map(function(col) {\r\n\t\t\t\t\tconst copy = gantt.mixin({}, col);\r\n\t\t\t\t\tdelete copy.editor;\r\n\t\t\t\t\treturn copy;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tdelete result.editor_types;\r\n\t\t\treturn result;\r\n\t\t},\r\n\r\n\t\t_sendToExport(data, type) {\r\n\t\t\tconst convert = gantt.date.date_to_str(gantt.config.date_format || gantt.config.xml_date);\r\n\t\t\tif(!data.skin){\r\n\t\t\t\tdata.skin = gantt.skin;\r\n\t\t\t}\r\n\t\t\tif (data.config) {\r\n\t\t\t\tdata.config = gantt.copy(gantt.ext.export_api._serializableGanttConfig(data.config));\r\n\t\t\t\tgantt.ext.export_api._markColumns(data, type);\r\n\r\n\t\t\t\tif (data.config.start_date && data.config.end_date) {\r\n\t\t\t\t\tif (data.config.start_date instanceof Date) {\r\n\t\t\t\t\t\tdata.config.start_date = convert(data.config.start_date);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (data.config.end_date instanceof Date) {\r\n\t\t\t\t\t\tdata.config.end_date = convert(data.config.end_date);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (data.callback) {\r\n\t\t\t\treturn gantt.ext.export_api._ajaxToExport(data, type, data.callback);\r\n\t\t\t}\r\n\r\n\t\t\tconst form = gantt.ext.export_api._createHiddenForm();\r\n\t\t\tform.firstChild.action = data.server || gantt.ext.export_api._apiUrl;\r\n\t\t\tform.firstChild.childNodes[0].value = JSON.stringify(data);\r\n\t\t\tform.firstChild.childNodes[1].value = type;\r\n\t\t\tform.firstChild.submit();\r\n\t\t},\r\n\r\n\t\t_createHiddenForm() {\r\n\t\t\tif (!gantt.ext.export_api._hidden_export_form) {\r\n\t\t\t\tconst t = gantt.ext.export_api._hidden_export_form = document.createElement(\"div\");\r\n\t\t\t\tt.style.display = \"none\";\r\n\t\t\t\tt.innerHTML = \"
\";\r\n\t\t\t\tdocument.body.appendChild(t);\r\n\t\t\t}\r\n\t\t\treturn gantt.ext.export_api._hidden_export_form;\r\n\t\t},\r\n\r\n\r\n\t\t_copyObjectBase(obj) {\r\n\t\t\tconst copy = {\r\n\t\t\t\tstart_date: undefined,\r\n\t\t\t\tend_date: undefined,\r\n\t\t\t\tconstraint_date: undefined,\r\n\t\t\t\tdeadline: undefined\r\n\t\t\t};\r\n\t\t\tfor (const key in obj) {\r\n\t\t\t\tif (key.charAt(0) === \"$\" || key === \"baselines\"){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tcopy[key] = obj[key];\r\n\t\t\t}\r\n\t\t\tconst formatDate = gantt.templates.xml_format || gantt.templates.format_date;\r\n\r\n\t\t\tcopy.start_date = formatDate(copy.start_date);\r\n\t\t\tif (copy.end_date){\r\n\t\t\t\tcopy.end_date = formatDate(copy.end_date);\r\n\t\t\t}\r\n\t\t\tif (copy.constraint_date){\r\n\t\t\t\tcopy.constraint_date = formatDate(copy.constraint_date);\r\n\t\t\t}\r\n\t\t\tif (copy.deadline){\r\n\t\t\t\tcopy.deadline = formatDate(copy.deadline);\r\n\t\t\t}\r\n\r\n\t\t\treturn copy;\r\n\t\t},\r\n\r\n\r\n\t\t_color_box: null,\r\n\t\t_color_hash: {},\r\n\r\n\t\t_getStyles(css) {\r\n\t\t\tif (!gantt.ext.export_api._color_box) {\r\n\t\t\t\tgantt.ext.export_api._color_box = document.createElement(\"DIV\");\r\n\t\t\t\tgantt.ext.export_api._color_box.style.cssText = \"position:absolute; display:none;\";\r\n\t\t\t\tdocument.body.appendChild(gantt.ext.export_api._color_box);\r\n\t\t\t}\r\n\t\t\tif (gantt.ext.export_api._color_hash[css]){\r\n\t\t\t\treturn gantt.ext.export_api._color_hash[css];\r\n\t\t\t}\r\n\r\n\t\t\tgantt.ext.export_api._color_box.className = css;\r\n\t\t\tconst color = gantt.ext.export_api._getColor(gantt.ext.export_api._color_box, \"color\");\r\n\t\t\tconst backgroundColor = gantt.ext.export_api._getColor(gantt.ext.export_api._color_box, \"backgroundColor\");\r\n\t\t\treturn (gantt.ext.export_api._color_hash[css] = color + \";\" + backgroundColor);\r\n\t\t},\r\n\r\n\r\n\t\t_getMinutesWorktimeSettings(parsedRanges) {\r\n\t\t\tconst minutes = [];\r\n\t\t\tparsedRanges.forEach(function(range) {\r\n\t\t\t\tminutes.push(range.startMinute);\r\n\t\t\t\tminutes.push(range.endMinute);\r\n\t\t\t});\r\n\t\t\treturn minutes;\r\n\t\t},\r\n\r\n\t\t_getWorktimeSettings() {\r\n\r\n\t\t\tconst defaultWorkTimes = {\r\n\t\t\t\thours: [0, 24],\r\n\t\t\t\tminutes: null,\r\n\t\t\t\tdates: { 0: true, 1: true, 2: true, 3: true, 4: true, 5: true, 6: true }\r\n\t\t\t};\r\n\r\n\t\t\tlet time;\r\n\t\t\tif (!gantt.config.work_time) {\r\n\t\t\t\ttime = defaultWorkTimes;\r\n\t\t\t} else {\r\n\t\t\t\tconst wTime = gantt._working_time_helper;\r\n\t\t\t\tif (wTime && wTime.get_calendar) {\r\n\t\t\t\t\ttime = wTime.get_calendar();\r\n\t\t\t\t} else if (wTime) {\r\n\t\t\t\t\ttime = {\r\n\t\t\t\t\t\thours: wTime.hours,\r\n\t\t\t\t\t\tminutes: null,\r\n\t\t\t\t\t\tdates: wTime.dates\r\n\t\t\t\t\t};\r\n\t\t\t\t} else if (gantt.config.worktimes && gantt.config.worktimes.global) {\r\n\t\t\t\t\tconst settings = gantt.config.worktimes.global;\r\n\r\n\t\t\t\t\tif (settings.parsed) {\r\n\t\t\t\t\t\tconst minutes = gantt.ext.export_api._getMinutesWorktimeSettings(settings.parsed.hours);\r\n\t\t\t\t\t\ttime = {\r\n\t\t\t\t\t\t\thours: null,\r\n\t\t\t\t\t\t\tminutes,\r\n\t\t\t\t\t\t\tdates: {}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tfor (const i in settings.parsed.dates) {\r\n\t\t\t\t\t\t\tif (Array.isArray(settings.parsed.dates[i])) {\r\n\t\t\t\t\t\t\t\ttime.dates[i] = gantt.ext.export_api._getMinutesWorktimeSettings(settings.parsed.dates[i]);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\ttime.dates[i] = settings.parsed.dates[i];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttime = {\r\n\t\t\t\t\t\t\thours: settings.hours,\r\n\t\t\t\t\t\t\tminutes: null,\r\n\t\t\t\t\t\t\tdates: settings.dates\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttime = defaultWorkTimes;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn time;\r\n\t\t},\r\n\r\n\r\n\t\t_eachTaskTimed(start, end) {\r\n\t\t\treturn function(code, parent, master) {\r\n\t\t\t\tparent = parent || gantt.config.root_id;\r\n\t\t\t\tmaster = master || gantt;\r\n\r\n\t\t\t\tconst branch = gantt.getChildren(parent);\r\n\t\t\t\tif (branch){\r\n\t\t\t\t\tfor (let i = 0; i < branch.length; i++) {\r\n\t\t\t\t\t\tconst item = gantt._pull[branch[i]];\r\n\t\t\t\t\t\tif ((!start || item.end_date > start) && (!end || item.start_date < end)){\r\n\t\t\t\t\t\t\tcode.call(master, item);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (gantt.hasChild(item.id)){\r\n\t\t\t\t\t\t\tgantt.eachTask(code, item.id, master);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t},\r\n\r\n\r\n\t\t// patch broken json serialization in gantt 2.1\r\n\t\t_originalCopyObject: gantt.json._copyObject,\r\n\r\n\r\n\t\t_copyObjectPlain(obj) {\r\n\t\t\tconst text = gantt.templates.task_text(obj.start_date, obj.end_date, obj);\r\n\r\n\t\t\tconst copy = gantt.ext.export_api._copyObjectBase(obj);\r\n\t\t\tcopy.text = text || copy.text;\r\n\r\n\t\t\treturn copy;\r\n\t\t},\r\n\r\n\t\t_getColor(node, style) {\r\n\t\t\tconst value = node.currentStyle ? node.currentStyle[style] : getComputedStyle(node, null)[style];\r\n\t\t\tconst rgb = value.replace(/\\s/g, \"\").match(/^rgba?\\((\\d+),(\\d+),(\\d+)/i);\r\n\t\t\treturn ((rgb && rgb.length === 4) ?\r\n\t\t\t\t(\"0\" + parseInt(rgb[1], 10).toString(16)).slice(-2) +\r\n\t\t\t\t(\"0\" + parseInt(rgb[2], 10).toString(16)).slice(-2) +\r\n\t\t\t\t(\"0\" + parseInt(rgb[3], 10).toString(16)).slice(-2) : value).replace(\"#\", \"\");\r\n\t\t},\r\n\r\n\r\n\t\t// excel serialization\r\n\t\t_copyObjectTable(obj) {\r\n\t\t\t// Excel interprets UTC time as local time in every timezone, send local time instead of actual UTC time.\r\n\t\t\t// https://github.com/SheetJS/js-xlsx/issues/126#issuecomment-60531614\r\n\t\t\tconst toISOstring = gantt.date.date_to_str(\"%Y-%m-%dT%H:%i:%s.000Z\");\r\n\r\n\t\t\tconst copy = gantt.ext.export_api._copyObjectColumns(obj, gantt.ext.export_api._copyObjectPlain(obj));\r\n\t\t\tif (copy.start_date){\r\n\t\t\t\tcopy.start_date = toISOstring(obj.start_date);\r\n\t\t\t}\r\n\t\t\tif (copy.end_date){\r\n\t\t\t\tcopy.end_date = toISOstring(obj.end_date);\r\n\t\t\t}\r\n\r\n\t\t\t// private gantt._day_index_by_date was replaced by public gantt.columnIndexByDate in gantt 5.0\r\n\t\t\tconst getDayIndex = gantt._day_index_by_date ? gantt._day_index_by_date : gantt.columnIndexByDate;\r\n\r\n\t\t\tcopy.$start = getDayIndex.call(gantt, obj.start_date);\r\n\t\t\tcopy.$end = getDayIndex.call(gantt, obj.end_date);\r\n\r\n\t\t\t// GS-2100. Correct bar position considering hidden cells\r\n\t\t\tlet hiddenCells = 0;\r\n\t\t\tconst scaleCellsWidth = gantt.getScale().width;\r\n\t\t\tif (scaleCellsWidth.indexOf(0) > -1) {\r\n\t\t\t\tlet i = 0;\r\n\t\t\t\tfor (i; i < copy.$start; i++) {\r\n\t\t\t\t\tif (!scaleCellsWidth[i]) {\r\n\t\t\t\t\t\thiddenCells++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcopy.$start -= hiddenCells;\r\n\r\n\t\t\t\tfor (i; i < copy.$end; i++) {\r\n\t\t\t\t\tif (!scaleCellsWidth[i]) {\r\n\t\t\t\t\t\thiddenCells++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcopy.$end -= hiddenCells;\r\n\t\t\t}\r\n\r\n\t\t\tcopy.$level = obj.$level;\r\n\t\t\tcopy.$type = obj.$rendered_type;\r\n\r\n\t\t\tconst tmps = gantt.templates;\r\n\t\t\tcopy.$text = tmps.task_text(obj.start, obj.end_date, obj);\r\n\t\t\tcopy.$left = tmps.leftside_text ? tmps.leftside_text(obj.start, obj.end_date, obj) : \"\";\r\n\t\t\tcopy.$right = tmps.rightside_text ? tmps.rightside_text(obj.start, obj.end_date, obj) : \"\";\r\n\r\n\t\t\treturn copy;\r\n\t\t},\r\n\r\n\t\t_copyObjectColors(obj) {\r\n\t\t\tconst copy = gantt.ext.export_api._copyObjectTable(obj);\r\n\r\n\t\t\tconst node = gantt.getTaskNode(obj.id);\r\n\t\t\tif (node && node.firstChild) {\r\n\t\t\t\tlet color = gantt.ext.export_api._getColor((gantt._no_progress_colors ? node : node.firstChild), \"backgroundColor\");\r\n\t\t\t\tif (color === \"363636\"){\r\n\t\t\t\t\tcolor = gantt.ext.export_api._getColor(node, \"backgroundColor\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcopy.$color = color;\r\n\t\t\t} else if (obj.color){\r\n\t\t\t\tcopy.$color = obj.color;\r\n\t\t\t}\r\n\r\n\t\t\treturn copy;\r\n\t\t},\r\n\r\n\t\t_copyObjectColumns(obj, copy) {\r\n\t\t\tfor (let i = 0; i < gantt.config.columns.length; i++) {\r\n\t\t\t\tconst ct = gantt.config.columns[i].template;\r\n\t\t\t\tif (ct) {\r\n\t\t\t\t\tlet val = ct(obj);\r\n\t\t\t\t\tif (val instanceof Date){\r\n\t\t\t\t\t\tval = gantt.templates.date_grid(val, obj);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcopy[\"_\" + i] = val;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn copy;\r\n\t\t},\r\n\r\n\t\t_copyObjectAll(obj) {\r\n\t\t\tconst copy = gantt.ext.export_api._copyObjectBase(obj);\r\n\r\n\t\t\tconst templates = [\r\n\t\t\t\t\"leftside_text\",\r\n\t\t\t\t\"rightside_text\",\r\n\t\t\t\t\"task_text\",\r\n\t\t\t\t\"progress_text\",\r\n\t\t\t\t\"task_class\"\r\n\t\t\t];\r\n\r\n\t\t\t// serialize all text templates\r\n\t\t\tfor (let i = 0; i < templates.length; i++) {\r\n\t\t\t\tconst template = gantt.templates[templates[i]];\r\n\t\t\t\tif (template){\r\n\t\t\t\t\tcopy[\"$\" + i] = template(obj.start_date, obj.end_date, obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tgantt.ext.export_api._copyObjectColumns(obj, copy);\r\n\t\t\tcopy.open = obj.$open;\r\n\t\t\treturn copy;\r\n\t\t},\r\n\r\n\r\n\t\t_serializeHtml() {\r\n\t\t\tconst smartScales = gantt.config.smart_scales;\r\n\t\t\tconst smartRendering = gantt.config.smart_rendering;\r\n\t\t\tif (smartScales || smartRendering) {\r\n\t\t\t\tgantt.config.smart_rendering = false;\r\n\t\t\t\tgantt.config.smart_scales = false;\r\n\t\t\t\tgantt.render();\r\n\t\t\t}\r\n\r\n\t\t\tconst html = gantt.$container.parentNode.innerHTML;\r\n\r\n\t\t\tif (smartScales || smartRendering) {\r\n\t\t\t\tgantt.config.smart_scales = smartScales;\r\n\t\t\t\tgantt.config.smart_rendering = smartRendering;\r\n\t\t\t\tgantt.render();\r\n\t\t\t}\r\n\r\n\t\t\treturn html;\r\n\t\t},\r\n\r\n\t\t_serializeAll() {\r\n\t\t\tgantt.json._copyObject = gantt.ext.export_api._copyObjectAll;\r\n\t\t\tconst data = gantt.ext.export_api._exportSerialize();\r\n\t\t\tgantt.json._copyObject = gantt.ext.export_api._originalCopyObject;\r\n\t\t\treturn data;\r\n\t\t},\r\n\r\n\t\t_serializePlain() {\r\n\t\t\tconst oldXmlFormat = gantt.templates.xml_format;\r\n\t\t\tconst oldFormatDate = gantt.templates.format_date;\r\n\t\t\tgantt.templates.xml_format = gantt.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\t\t\tgantt.templates.format_date = gantt.date.date_to_str(\"%Y%m%dT%H%i%s\", true);\r\n\t\t\tgantt.json._copyObject = gantt.ext.export_api._copyObjectPlain;\r\n\r\n\t\t\tconst data = gantt.ext.export_api._exportSerialize();\r\n\r\n\t\t\tgantt.templates.xml_format = oldXmlFormat;\r\n\t\t\tgantt.templates.format_date = oldFormatDate;\r\n\t\t\tgantt.json._copyObject = gantt.ext.export_api._originalCopyObject;\r\n\r\n\t\t\tdelete data.links;\r\n\t\t\treturn data;\r\n\t\t},\r\n\r\n\t\t_getRaw() {\r\n\t\t\t// support Gantt < 5.0\r\n\t\t\tif (gantt._scale_helpers) {\r\n\t\t\t\tconst scales = gantt._get_scales();\r\n\t\t\t\tconst\tminWidth = gantt.config.min_column_width;\r\n\t\t\t\tconst\tautosizeMinWidth = gantt._get_resize_options().x ? Math.max(gantt.config.autosize_min_width, 0) : gantt.config.$task.offsetWidth;\r\n\t\t\t\tconst\theight = gantt.config.config.scale_height - 1;\r\n\t\t\t\treturn gantt._scale_helpers.prepareConfigs(scales, minWidth, autosizeMinWidth, height);\r\n\t\t\t} else { // Gantt >= 5.0\r\n\t\t\t\tconst timeline = gantt.$ui.getView(\"timeline\");\r\n\t\t\t\tif (timeline) {\r\n\t\t\t\t\tlet availWidth = timeline.$config.width;\r\n\t\t\t\t\tif (gantt.config.autosize === \"x\" || gantt.config.autosize === \"xy\") {\r\n\t\t\t\t\t\tavailWidth = Math.max(gantt.config.autosize_min_width, 0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst state = gantt.getState();\r\n\t\t\t\t\tconst\tscales = timeline._getScales();\r\n\t\t\t\t\tconst\tminWidth = gantt.config.min_column_width;\r\n\t\t\t\t\tconst\theight = gantt.config.scale_height - 1;\r\n\t\t\t\t\tconst\trtl = gantt.config.rtl;\r\n\t\t\t\t\treturn timeline.$scaleHelper.prepareConfigs(scales, minWidth, availWidth, height, state.min_date, state.max_date, rtl);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_serializeTimeline(config) {\r\n\t\t\tgantt.json._copyObject = config.visual ? gantt.ext.export_api._copyObjectColors : gantt.ext.export_api._copyObjectTable;\r\n\t\t\tconst data = gantt.ext.export_api._exportSerialize();\r\n\t\t\tgantt.json._copyObject = gantt.ext.export_api._originalCopyObject;\r\n\r\n\t\t\tdelete data.links;\r\n\r\n\t\t\tif (config.cellColors) {\r\n\t\t\t\tconst css = gantt.templates.timeline_cell_class || gantt.templates.task_cell_class;\r\n\t\t\t\tif (css) {\r\n\t\t\t\t\tconst raw = gantt.ext.export_api._getRaw();\r\n\t\t\t\t\tlet steps = raw[0].trace_x;\r\n\t\t\t\t\tfor (let i = 1; i < raw.length; i++){\r\n\t\t\t\t\t\tif (raw[i].trace_x.length > steps.length){\r\n\t\t\t\t\t\t\tsteps = raw[i].trace_x;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfor (let i = 0; i < data.data.length; i++) {\r\n\t\t\t\t\t\tdata.data[i].styles = [];\r\n\t\t\t\t\t\tconst task = gantt.getTask(data.data[i].id);\r\n\t\t\t\t\t\tfor (let j = 0; j < steps.length; j++) {\r\n\t\t\t\t\t\t\tconst date = steps[j];\r\n\t\t\t\t\t\t\tconst cellCss = css(task, date);\r\n\t\t\t\t\t\t\tif (cellCss){\r\n\t\t\t\t\t\t\t\tdata.data[i].styles.push({ index: j, styles: gantt.ext.export_api._getStyles(cellCss) });\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn data;\r\n\t\t},\r\n\r\n\t\t_serializeScales(config) {\r\n\t\t\tconst scales = [];\r\n\t\t\tconst raw = gantt.ext.export_api._getRaw();\r\n\r\n\t\t\tlet min = Infinity;\r\n\t\t\tlet max = 0;\r\n\t\t\tfor (let i = 0; i < raw.length; i++) {\r\n\t\t\t\tmin = Math.min(min, raw[i].col_width);\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < raw.length; i++) {\r\n\t\t\t\tlet start = 0;\r\n\t\t\t\tlet end = 0;\r\n\t\t\t\tconst row = [];\r\n\r\n\t\t\t\tscales.push(row);\r\n\t\t\t\tconst step = raw[i];\r\n\t\t\t\tmax = Math.max(max, step.trace_x.length);\r\n\t\t\t\tconst template = step.format || step.template || (step.date ? gantt.date.date_to_str(step.date) : gantt.config.date_scale);\r\n\r\n\t\t\t\tfor (let j = 0; j < step.trace_x.length; j++) {\r\n\t\t\t\t\tconst date = step.trace_x[j];\r\n\t\t\t\t\tend = start + Math.round(step.width[j] / min);\r\n\r\n\t\t\t\t\tconst scaleCell = { text: template(date), start, end, styles: \"\" };\r\n\r\n\t\t\t\t\tif (config.cellColors) {\r\n\t\t\t\t\t\tconst css = step.css || gantt.templates.scaleCell_class;\r\n\t\t\t\t\t\tif (css) {\r\n\t\t\t\t\t\t\tconst scaleCss = css(date);\r\n\t\t\t\t\t\t\tif (scaleCss){\r\n\t\t\t\t\t\t\t\tscaleCell.styles = gantt.ext.export_api._getStyles(scaleCss);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\trow.push(scaleCell);\r\n\t\t\t\t\tstart = end;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn { width: max, height: scales.length, data: scales };\r\n\t\t},\r\n\r\n\t\t_serializeGrid(config) {\r\n\t\t\tgantt.exportMode = true;\r\n\r\n\t\t\tconst columns = [];\r\n\t\t\tconst cols = gantt.config.columns;\r\n\r\n\t\t\tlet ccount = 0;\r\n\t\t\tfor (let i = 0; i < cols.length; i++) {\r\n\t\t\t\tif (cols[i].name === \"add\" || cols[i].name === \"buttons\") {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcolumns[ccount] = {\r\n\t\t\t\t\tid: ((cols[i].template) ? (\"_\" + i) : cols[i].name),\r\n\t\t\t\t\theader: cols[i].label || gantt.locale.labels[\"column_\" + cols[i].name],\r\n\t\t\t\t\twidth: (cols[i].width ? Math.floor(cols[i].width / 4) : \"\")\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif (cols[i].name === \"duration\"){\r\n\t\t\t\t\tcolumns[ccount].type = \"number\";\r\n\t\t\t\t}\r\n\t\t\t\tif (cols[i].name === \"start_date\" || cols[i].name === \"end_date\") {\r\n\t\t\t\t\tcolumns[ccount].type = \"date\";\r\n\t\t\t\t\tif (config && config.rawDates){\r\n\t\t\t\t\t\tcolumns[ccount].id = cols[i].name;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tccount++;\r\n\t\t\t}\r\n\r\n\t\t\tgantt.exportMode = false;\r\n\t\t\treturn columns;\r\n\t\t},\r\n\r\n\t\t_exportSerialize() {\r\n\t\t\tgantt.exportMode = true;\r\n\r\n\t\t\tconst xmlFormat = gantt.templates.xml_format;\r\n\t\t\tconst formatDate = gantt.templates.format_date;\r\n\r\n\t\t\t// use configuration date format for serialization so date could be parsed on the export\r\n\t\t\t// required when custom format date function is defined\r\n\t\t\tgantt.templates.xml_format =\r\n\t\t\t\tgantt.templates.format_date =\r\n\t\t\t\tgantt.date.date_to_str(gantt.config.date_format || gantt.config.xml_date);\r\n\r\n\t\t\tconst data = gantt.serialize();\r\n\r\n\t\t\tgantt.templates.xml_format = xmlFormat;\r\n\t\t\tgantt.templates.format_date = formatDate;\r\n\t\t\tgantt.exportMode = false;\r\n\t\t\treturn data;\r\n\t\t},\r\n\r\n\r\n\t\t_setLevel(data) {\r\n\t\t\tfor (let i = 0; i < data.length; i++) {\r\n\t\t\t\t// tslint:disable-next-line triple-equals\r\n\t\t\t\tif (data[i].parent == 0) {\r\n\t\t\t\t\tdata[i]._lvl = 1;\r\n\t\t\t\t}\r\n\t\t\t\tfor (let j = i + 1; j < data.length; j++) {\r\n\t\t\t\t\t// tslint:disable-next-line triple-equals\r\n\t\t\t\t\tif (data[i].id == data[j].parent) {\r\n\t\t\t\t\t\tdata[j]._lvl = data[i]._lvl + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_clearLevel(data) {\r\n\t\t\tfor (let i = 0; i < data.length; i++) {\r\n\t\t\t\tdelete data[i]._lvl;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_clearRecLinks(data) {\r\n\t\t\tgantt.ext.export_api._setLevel(data.data);\r\n\t\t\tconst tasks = {};\r\n\t\t\tfor (let i = 0; i < data.data.length; i++) {\r\n\t\t\t\ttasks[data.data[i].id] = data.data[i];\r\n\t\t\t}\r\n\r\n\t\t\tconst links = {};\r\n\r\n\t\t\tfor (let i = 0; i < data.links.length; i++) {\r\n\t\t\t\tconst link = data.links[i];\r\n\t\t\t\tif (gantt.isTaskExists(link.source) && gantt.isTaskExists(link.target) &&\r\n\t\t\t\t\ttasks[link.source] && tasks[link.target]) {\r\n\t\t\t\t\tlinks[link.id] = link;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor (const j in links) {\r\n\t\t\t\tgantt.ext.export_api._makeLinksSameLevel(links[j], tasks);\r\n\t\t\t}\r\n\r\n\t\t\tconst skippedLinks = {};\r\n\t\t\tfor (const j in tasks) {\r\n\t\t\t\tgantt.ext.export_api._clearCircDependencies(tasks[j], links, tasks, {}, skippedLinks, null);\r\n\t\t\t}\r\n\r\n\t\t\tif (Object.keys(links)) {\r\n\t\t\t\tgantt.ext.export_api._clearLinksSameLevel(links, tasks);\r\n\t\t\t}\r\n\r\n\t\t\tfor (let i = 0; i < data.links.length; i++) {\r\n\t\t\t\tif (!links[data.links[i].id]) {\r\n\t\t\t\t\tdata.links.splice(i, 1);\r\n\t\t\t\t\ti--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tgantt.ext.export_api._clearLevel(data.data);\r\n\t\t},\r\n\r\n\t\t_clearCircDependencies(task, links, tasks, usedTasks, skippedLinks, prevLink) {\r\n\t\t\tconst sources = task.$_source;\r\n\t\t\tif (!sources) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (usedTasks[task.id]) {\r\n\t\t\t\tgantt.ext.export_api._onCircDependencyFind(prevLink, links, usedTasks, skippedLinks);\r\n\t\t\t}\r\n\r\n\t\t\tusedTasks[task.id] = true;\r\n\r\n\t\t\tconst targets = {};\r\n\r\n\t\t\tfor (let i = 0; i < sources.length; i++) {\r\n\t\t\t\tif (skippedLinks[sources[i]]) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tconst curLink = links[sources[i]];\r\n\t\t\t\tconst targetTask = tasks[curLink._target];\r\n\t\t\t\tif (targets[targetTask.id]) { // two link from one task to another\r\n\t\t\t\t\tgantt.ext.export_api._onCircDependencyFind(curLink, links, usedTasks, skippedLinks);\r\n\t\t\t\t}\r\n\t\t\t\ttargets[targetTask.id] = true;\r\n\t\t\t\tgantt.ext.export_api._clearCircDependencies(targetTask, links, tasks, usedTasks, skippedLinks, curLink);\r\n\t\t\t}\r\n\t\t\tusedTasks[task.id] = false;\r\n\t\t},\r\n\r\n\t\t_onCircDependencyFind(link, links, usedTasks, skippedLinks) {\r\n\t\t\tif (link) {\r\n\t\t\t\tif (gantt.callEvent(\"onExportCircularDependency\", [link.id, link])) {\r\n\t\t\t\t\tdelete links[link.id];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdelete usedTasks[link._source];\r\n\t\t\t\tdelete usedTasks[link._target];\r\n\t\t\t\tskippedLinks[link.id] = true;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_makeLinksSameLevel(link, tasks) {\r\n\t\t\tlet task;\r\n\t\t\tlet targetLvl;\r\n\t\t\tconst linkT = {\r\n\t\t\t\ttarget: tasks[link.target],\r\n\t\t\t\tsource: tasks[link.source]\r\n\t\t\t};\r\n\t\t\t// tslint:disable-next-line triple-equals\r\n\t\t\tif (linkT.target._lvl != linkT.source._lvl) {\r\n\t\t\t\tif (linkT.target._lvl < linkT.source._lvl) {\r\n\t\t\t\t\ttask = \"source\";\r\n\t\t\t\t\ttargetLvl = linkT.target._lvl;\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttask = \"target\";\r\n\t\t\t\t\ttargetLvl = linkT.source._lvl;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdo {\r\n\t\t\t\t\tconst parent = tasks[linkT[task].parent];\r\n\t\t\t\t\tif (!parent) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlinkT[task] = parent;\r\n\t\t\t\t} while (linkT[task]._lvl < targetLvl);\r\n\r\n\t\t\t\tlet sourceParent = tasks[linkT.source.parent];\r\n\t\t\t\tlet\ttargetParent = tasks[linkT.target.parent];\r\n\t\t\t\t// tslint:disable-next-line triple-equals\r\n\t\t\t\twhile (sourceParent && targetParent && sourceParent.id != targetParent.id) {\r\n\t\t\t\t\tlinkT.source = sourceParent;\r\n\t\t\t\t\tlinkT.target = targetParent;\r\n\t\t\t\t\tsourceParent = tasks[linkT.source.parent];\r\n\t\t\t\t\ttargetParent = tasks[linkT.target.parent];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlink._target = linkT.target.id;\r\n\t\t\tlink._source = linkT.source.id;\r\n\r\n\t\t\tif (!linkT.target.$_target){\r\n\t\t\t\tlinkT.target.$_target = [];\r\n\t\t\t}\r\n\t\t\tlinkT.target.$_target.push(link.id);\r\n\r\n\t\t\tif (!linkT.source.$_source){\r\n\t\t\t\tlinkT.source.$_source = [];\r\n\t\t\t}\r\n\t\t\tlinkT.source.$_source.push(link.id);\r\n\t\t},\r\n\r\n\t\t_clearLinksSameLevel(links, tasks) {\r\n\t\t\tfor (const link in links) {\r\n\t\t\t\tdelete links[link]._target;\r\n\t\t\t\tdelete links[link]._source;\r\n\t\t\t}\r\n\r\n\t\t\tfor (const task in tasks) {\r\n\t\t\t\tdelete tasks[task].$_source;\r\n\t\t\t\tdelete tasks[task].$_target;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\t_customProjectProperties(data, config) {\r\n\t\t\tif (config && config.project) {\r\n\t\t\t\tfor (const i in config.project) {\r\n\t\t\t\t\tif (!gantt.config.$custom_data){\r\n\t\t\t\t\t\tgantt.config.$custom_data = {};\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgantt.config.$custom_data[i] = typeof config.project[i] === \"function\" ? config.project[i](gantt.config) : config.project[i];\r\n\t\t\t\t}\r\n\t\t\t\tdelete config.project;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_customTaskProperties(data, config) {\r\n\t\t\tif (config && config.tasks) {\r\n\t\t\t\tdata.data.forEach(function(el) {\r\n\t\t\t\t\tfor (const i in config.tasks) {\r\n\t\t\t\t\t\tif (!el.$custom_data){\r\n\t\t\t\t\t\t\tel.$custom_data = {};\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tel.$custom_data[i] = typeof config.tasks[i] === \"function\" ? config.tasks[i](el, gantt.config) : config.tasks[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tdelete config.tasks;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_exportConfig(data, config) {\r\n\t\t\tconst projectName = config.name || \"gantt.xml\";\r\n\t\t\tdelete config.name;\r\n\r\n\t\t\tgantt.config.custom = config;\r\n\r\n\t\t\tconst time = gantt.ext.export_api._getWorktimeSettings();\r\n\r\n\t\t\tconst projectDates = gantt.getSubtaskDates();\r\n\t\t\tif (projectDates.start_date && projectDates.end_date) {\r\n\t\t\t\tconst formatDate = gantt.templates.format_date || gantt.templates.xml_format;\r\n\t\t\t\tgantt.config.start_end = {\r\n\t\t\t\t\tstart_date: formatDate(projectDates.start_date),\r\n\t\t\t\t\tend_date: formatDate(projectDates.end_date)\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tconst manual = config.auto_scheduling === undefined ? false : !!config.auto_scheduling;\r\n\r\n\t\t\tconst res = {\r\n\t\t\t\tcallback: config.callback || null,\r\n\t\t\t\tconfig: gantt.config,\r\n\t\t\t\tdata,\r\n\t\t\t\tmanual,\r\n\t\t\t\tname: projectName,\r\n\t\t\t\tworktime: time\r\n\t\t\t};\r\n\t\t\tfor (const i in config) {\r\n\t\t\t\tres[i] = config[i];\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t},\r\n\r\n\r\n\t\t_sendImportAjaxMSP(config) {\r\n\t\t\tconst url = config.server || gantt.ext.export_api._apiUrl;\r\n\t\t\tconst store = config.store || 0;\r\n\t\t\tconst formData = config.data;\r\n\t\t\tconst callback = config.callback;\r\n\r\n\t\t\tconst settings = {\r\n\t\t\t\tdurationUnit: config.durationUnit || undefined,\r\n\t\t\t\tprojectProperties: config.projectProperties || undefined,\r\n\t\t\t\ttaskProperties: config.taskProperties || undefined\r\n\t\t\t};\r\n\r\n\t\t\tformData.append(\"type\", config.type || \"msproject-parse\");\r\n\t\t\tformData.append(\"data\", JSON.stringify(settings));\r\n\r\n\t\t\tif (store){\r\n\t\t\t\tformData.append(\"store\", store);\r\n\t\t\t}\r\n\r\n\t\t\tconst xhr = new XMLHttpRequest();\r\n\t\t\txhr.onreadystatechange = function(e) {\r\n\t\t\t\tif (xhr.readyState === 4 && xhr.status === 0) {// network error\r\n\t\t\t\t\tif (callback) {\r\n\t\t\t\t\t\tcallback(null);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\txhr.onload = function(){\r\n\t\t\t\tconst fail = xhr.status > 400;\r\n\t\t\t\tlet info = null;\r\n\r\n\t\t\t\tif (!fail) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tinfo = JSON.parse(xhr.responseText);\r\n\t\t\t\t\t} catch (e) { }\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (callback) {\r\n\t\t\t\t\tcallback(info);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\txhr.open(\"POST\", url, true);\r\n\t\t\txhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\t\t\txhr.send(formData);\r\n\t\t}\r\n\r\n\t};\r\n\r\n\r\n\tgantt.exportToPDF = gantt.ext.export_api.exportToPDF;\r\n\tgantt.exportToPNG = gantt.ext.export_api.exportToPNG;\r\n\tgantt.exportToICal = gantt.ext.export_api.exportToICal;\r\n\tgantt.exportToExcel = gantt.ext.export_api.exportToExcel;\r\n\tgantt.exportToJSON = gantt.ext.export_api.exportToJSON;\r\n\tgantt.importFromExcel = gantt.ext.export_api.importFromExcel;\r\n\tgantt.importFromMSProject = gantt.ext.export_api.importFromMSProject;\r\n\tgantt.exportToMSProject = gantt.ext.export_api.exportToMSProject;\r\n\tgantt.importFromPrimaveraP6 = gantt.ext.export_api.importFromPrimaveraP6;\r\n\tgantt.exportToPrimaveraP6 = gantt.ext.export_api.exportToPrimaveraP6;\r\n\r\n\r\n\treturn gantt.ext.export_api;\r\n}\r\n","export default {\r\n\tKEY_CODES: {\r\n\t\tUP: 38,\r\n\t\tDOWN: 40,\r\n\t\tLEFT: 37,\r\n\t\tRIGHT: 39,\r\n\t\tSPACE: 32,\r\n\t\tENTER: 13,\r\n\t\tDELETE: 46,\r\n\t\tESC: 27,\r\n\t\tTAB: 9\r\n\t}\r\n};","export default class ExtensionsManager{\r\n\tprivate _extensions:{[key:string]: GanttPlugin };\r\n\r\n\tconstructor(config: {[key:string]: GanttPlugin }){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension = (name: string, ext: GanttPlugin) => {\r\n\t\tthis._extensions[name] = ext;\r\n\t};\r\n\r\n\tgetExtension = (name: string): GanttPlugin => {\r\n\t\treturn this._extensions[name];\r\n\t};\r\n}","type DurationUnits = \"minute\" | \"hour\" | \"day\" | \"week\" | \"month\" | \"year\";\r\ntype Align = \"left\" | \"center\" | \"right\";\r\ntype SectionType = \"textarea\"\r\n\t\t\t\t\t| \"time\"\r\n\t\t\t\t\t| \"duration\"\r\n\t\t\t\t\t| \"select\"\r\n\t\t\t\t\t| \"typeselect\"\r\n\t\t\t\t\t| \"parent\"\r\n\t\t\t\t\t| \"template\"\r\n\t\t\t\t\t| \"checkbox\"\r\n\t\t\t\t\t| \"radio\"\r\n\t\t\t\t\t| \"resources\"\r\n\t\t\t\t\t| \"constraint\";\r\n\r\ntype LightboxSection = Array;\r\n\r\ntype LayoutView = \"grid\"\r\n\t| \"timeline\"\r\n\t| \"resizer\"\r\n\t| \"scrollbar\"\r\n\t| \"resourceGrid\"\r\n\t| \"resourceTimeline\";\r\n\r\ninterface IColumnItem {\r\n\tname: string;\r\n\tlabel?: string;\r\n\ttree?: boolean;\r\n\talign?: Align;\r\n\thide?: boolean;\r\n\tmax_width?: number;\r\n\tmin_width?: number;\r\n\tresize?: boolean;\r\n\ttemplate?: (obj: any) => string;\r\n\twidth?: number | \"*\";\r\n}\r\n\r\nexport type TModifierKeys = \"metaKey\" | \"ctrlKey\" | \"altKey\" | \"shiftKey\" | false | undefined;\r\n\r\nexport interface IScale {\r\n\tcss?: () => string;\r\n\tdate?: string;\r\n\tstep: number;\r\n\ttemplate?: (date: Date) => string;\r\n\tunit: DurationUnits;\r\n}\r\n\r\ninterface ILightboxSection {\r\n\tname: string;\r\n\tmap_to: string;\r\n\ttype: SectionType;\r\n\theight?: number;\r\n\tfocus?: boolean;\r\n}\r\n\r\ninterface ILightboxTimeAndDurationSection extends ILightboxSection {\r\n\treadonly: boolean;\r\n\tyear_range: number[] | number;\r\n\tsingle_date: boolean;\r\n\ttime_format: string;\r\n}\r\n\r\ninterface ILightboxInputControl extends ILightboxSection {\r\n\tdefault_value?: any;\r\n\toptions?: Array<{key: string, label: string}>;\r\n}\r\n\r\ninterface ILightboxSelectControl extends ILightboxInputControl {\r\n\tonchange: () => boolean | undefined;\r\n}\r\n\r\ninterface ILightboxParentControl extends ILightboxSection {\r\n\tallow_root: boolean;\r\n\troot_label: string;\r\n\tsort?: (a: any, b: any) => -1 | 0 | 1;\r\n\tfilter?: (task: string | number | object) => boolean;\r\n\ttemplate?: (start: Date, end: Date, ev: object) => string;\r\n}\r\n\r\ninterface ILightboxTypeselectControl extends ILightboxSection {\r\n\tfilter?: (typeName: string) => boolean;\r\n}\r\n\r\n\r\ninterface ILayoutScrollbar {\r\n\tview: \"scrollbar\";\r\n\tscroll?: \"x\" | \"y\";\r\n\tid: string;\r\n\theight?: number;\r\n\twidth?: number;\r\n}\r\n\r\ninterface ILayoutView {\r\n\tview: LayoutView;\r\n\tid?: string;\r\n\tscrollX?: string;\r\n\tscrollY?: string;\r\n\tconfig?: object;\r\n}\r\n\r\ninterface ILayoutGrid extends ILayoutView {\r\n\tview: \"grid\";\r\n\tbind?: string;\r\n}\r\n\r\ninterface ILayoutTimeline extends ILayoutView {\r\n\tview: \"timeline\";\r\n\tbindLinks?: string;\r\n\tlayers?: any[];\r\n}\r\n\r\ninterface ILayoutResizer {\r\n\tview?: undefined;\r\n\tresizer: boolean;\r\n\twidth: number;\r\n}\r\n\r\ninterface ILayoutResourceGrid extends ILayoutView {\r\n\tview: \"resourceGrid\";\r\n\twidth: number;\r\n\tgroup: \"string\";\r\n}\r\n\r\ninterface ILayoutResourceTimeline extends ILayoutView {\r\n\tview: \"resourceTimeline\";\r\n\twidth: number;\r\n\tgroup: \"string\";\r\n}\r\n\r\ninterface ILayoutHtml {\r\n\thtml: string;\r\n\tcss: string;\r\n\twidth: number;\r\n}\r\n\r\ntype LayoutRow = ILayoutGrid\r\n\t| ILayoutTimeline\r\n\t| ILayoutResizer\r\n\t| ILayoutResourceGrid\r\n\t| ILayoutResourceTimeline\r\n\t| ILayoutHtml\r\n\t| ILayoutScrollbar\r\n\t| { cols: LayoutCol[] };\r\n\r\ntype LayoutCol = ILayoutGrid\r\n\t| ILayoutTimeline\r\n\t| ILayoutResizer\r\n\t| ILayoutResourceGrid\r\n\t| ILayoutResourceTimeline\r\n\t| ILayoutHtml\r\n\t| ILayoutScrollbar\r\n\t| { rows: LayoutRow[] };\r\n\r\ninterface ILayout {\r\n\tcss: string;\r\n\trows?: LayoutRow[];\r\n\tcols?: LayoutCol[];\r\n}\r\n\r\ntype TCsp = boolean | \"auto\";\r\n\r\ninterface IResourceConfig {\r\n\tdataprocessor_assignments?: boolean;\r\n\tdataprocessor_resources?: boolean;\r\n\teditable_resource_diagram?: boolean;\r\n\tresource_store?: {\r\n\t\ttype?: \"treeDataStore\"|\"dataStore\"|string;\r\n\t\tfetchTasks?: boolean;\r\n\t\tinitItem?: (item: any) => any;\r\n\t};\r\n\tlightbox_resources?: (resources: any[]) => any[];\r\n\r\n}\r\n\r\ninterface IGanttConfig {\r\n\tlayout: ILayout;\r\n\tlinks: {\r\n\t\tfinish_to_start: \"0\";\r\n\t\tstart_to_start: \"1\";\r\n\t\tfinish_to_finish: \"2\";\r\n\t\tstart_to_finish: \"3\";\r\n\t};\r\n\ttypes: {\r\n\t\ttask: string;\r\n\t\tproject: string;\r\n\t\tmilestone: string;\r\n\t};\r\n\tauto_types: boolean;\r\n\tduration_unit: DurationUnits;\r\n\twork_time: boolean;\r\n\tcorrect_work_time: boolean;\r\n\tdeadlines: boolean;\r\n\tskip_off_time: boolean;\r\n\tcascade_delete: boolean;\r\n\tautosize: boolean | string;\r\n\tautoscroll: boolean;\r\n\tshow_links: boolean;\r\n\tshow_task_cells: boolean;\r\n\tautosize_min_width: number;\r\n\tautoscroll_speed: number;\r\n\tdeepcopy_on_parse: boolean;\r\n\tstatic_background: boolean;\r\n\tstatic_background_cells: boolean;\r\n\tbranch_loading: boolean;\r\n\tbranch_loading_property: string;\r\n\tshow_loading: boolean;\r\n\tshow_chart: boolean;\r\n\tshow_grid: boolean;\r\n\tmin_duration: number;\r\n\tdate_format: string; // use instead xml_date\r\n\txml_date?: string; // deprecated\r\n\tstart_on_monday: boolean;\r\n\tserver_utc: boolean;\r\n\tshow_progress: boolean;\r\n\tfit_tasks: boolean;\r\n\tselect_task: boolean;\r\n\tscroll_on_click: boolean;\r\n\tsmart_rendering: boolean;\r\n\tpreserve_scroll: boolean;\r\n\treadonly: boolean;\r\n\tcontainer_resize_timeout: number;\r\n\r\n\t/*grid */\r\n\tdate_grid: string;\r\n\r\n\tdrag_links: boolean;\r\n\tdrag_progress: boolean;\r\n\tdrag_resize: boolean;\r\n\tdrag_project: boolean;\r\n\tdrag_move: boolean;\r\n\tdrag_mode: {\r\n\t\tresize: \"resize\",\r\n\t\tprogress: \"progress\",\r\n\t\tmove: \"move\",\r\n\t\tignore: \"ignore\"\r\n\t};\r\n\tround_dnd_dates: boolean;\r\n\tlink_wrapper_width: number;\r\n\troot_id: string | number;\r\n\r\n\tlink_arrow_size:number;\r\n\r\n\tautofit: boolean;\r\n\tcolumns: IColumnItem[];\r\n\r\n\t/* scale*/\r\n\t/* it will be deprecated */\r\n\tdate_scale?: string;\r\n\tstep?: number;\r\n\tscale_unit?: DurationUnits;\r\n\tsubscales?: IScale[];\r\n\t/* it will be deprecated end */\r\n\r\n\tscales: IScale[];\r\n\r\n\tscale_offset_minimal: boolean;\r\n\r\n\tinherit_scale_class: boolean;\r\n\r\n\r\n\ttime_step: number;\r\n\tduration_step: number;\r\n\r\n\r\n\ttask_date: string;\r\n\ttime_picker: string;\r\n\ttask_attribute: string;\r\n\tlink_attribute: string;\r\n\tlayer_attribute: string;\r\n\tbuttons_left: string[];\r\n\t_migrate_buttons: {\r\n\t\tdhx_save_btn: \"gantt_save_btn\",\r\n\t\tdhx_cancel_btn: \"gantt_cancel_btn\",\r\n\t\tdhx_delete_btn: \"gantt_delete_btn\"\r\n\t};\r\n\r\n\tbuttons_right: string[];\r\n\r\n\r\n\tlightbox: {\r\n\t\tsections?: LightboxSection,\r\n\t\tproject_sections?: LightboxSection,\r\n\t\tmilestone_sections?: LightboxSection\r\n\t};\r\n\tdrag_lightbox: boolean;\r\n\tsort: boolean;\r\n\tdetails_on_create: boolean;\r\n\tdetails_on_dblclick: boolean;\r\n\tinitial_scroll: boolean;\r\n\ttask_scroll_offset: number;\r\n\r\n\torder_branch: boolean;\r\n\torder_branch_free: boolean;\r\n\r\n\t// task_height is deprecated, use 'bar_height` instead\r\n\ttask_height: number | \"full\" | undefined;\r\n\tbar_height: number | \"full\";\r\n\tmin_column_width: number;\r\n\tbar_height_padding: number,\r\n\trow_height: number,\r\n\r\n\t// min width for grid column (when resizing)\r\n\tmin_grid_column_width: number;\r\n\t// name of the attribute with column index for resize element\r\n\tgrid_resizer_column_attribute: string;\r\n\t// name of the attribute with column index for resize element\r\n\t// grid_resizer_attribute: string; // usage of this parameter is not found\r\n\r\n\t// grid width can be increased after the column has been resized\r\n\tkeep_grid_width: boolean;\r\n\r\n\t// grid width can be adjusted\r\n\tgrid_resize: boolean;\r\n\tgrid_elastic_columns: boolean;\r\n\tshow_tasks_outside_timescale: boolean;\r\n\tshow_unscheduled: boolean;\r\n\treadonly_property: string;\r\n\teditable_property: string;\r\n\tcalendar_property: string;\r\n\tresource_calendars: object;\r\n\tdynamic_resource_calendars: boolean;\r\n\tinherit_calendar: boolean;\r\n\ttype_renderers: object;\r\n\r\n\tresize_rows: boolean;\r\n\t// name of the attribute with row index for resize element\r\n\ttask_grid_row_resizer_attribute: string;\r\n\t// min height for row (when resizing)\r\n\tmin_task_grid_row_height: number;\r\n\r\n\topen_tree_initially: boolean;\r\n\toptimize_render: boolean;\r\n\tprevent_default_scroll: boolean;\r\n\tshow_errors: boolean;\r\n\twai_aria_attributes: boolean;\r\n\tsmart_scales: boolean;\r\n\trtl: boolean;\r\n\tplaceholder_task: boolean | object;\r\n\thorizontal_scroll_key: TModifierKeys;\r\n\tdrag_timeline: {\r\n\t\tuseKey: TModifierKeys;\r\n\t\tignore: string;\r\n\t\trender?: boolean;\r\n\t};\r\n\tdrag_multiple: boolean;\r\n\tcsp: TCsp;\r\n\r\n\tresources?: IResourceConfig;\r\n}\r\n\r\nexport default () => {\r\n\tconst result: IGanttConfig = {\r\n\t\tlayout: {\r\n\t\t\tcss: \"gantt_container\",\r\n\t\t\trows: [\r\n\t\t\t\t{\r\n\t\t\t\t\tcols: [\r\n\t\t\t\t\t\t{view: \"grid\", scrollX: \"scrollHor\", scrollY: \"scrollVer\"},\r\n\t\t\t\t\t\t{resizer: true, width: 1},\r\n\t\t\t\t\t\t{view: \"timeline\", scrollX: \"scrollHor\", scrollY: \"scrollVer\"},\r\n\t\t\t\t\t\t{view: \"scrollbar\", id: \"scrollVer\"}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{view: \"scrollbar\", id: \"scrollHor\", height: 20}\r\n\t\t\t]\r\n\t\t},\r\n\t\tlinks: {\r\n\t\t\tfinish_to_start: \"0\",\r\n\t\t\tstart_to_start: \"1\",\r\n\t\t\tfinish_to_finish: \"2\",\r\n\t\t\tstart_to_finish: \"3\"\r\n\t\t},\r\n\t\ttypes: {\r\n\t\t\ttask: \"task\",\r\n\t\t\tproject: \"project\",\r\n\t\t\tmilestone: \"milestone\"\r\n\t\t},\r\n\t\tauto_types: false,\r\n\t\tduration_unit: \"day\",\r\n\t\twork_time: false,\r\n\t\tcorrect_work_time: false,\r\n\t\tskip_off_time: false,\r\n\r\n\t\tcascade_delete: true,\r\n\r\n\t\tautosize: false,\r\n\t\tautosize_min_width: 0,\r\n\t\tautoscroll: true,\r\n\t\tautoscroll_speed: 30,\r\n\t\tdeepcopy_on_parse: false,\r\n\t\tshow_links: true,\r\n\t\tshow_task_cells: true,\r\n\t\t// replace backgroung of the task area with a canvas img\r\n\t\tstatic_background: false,\r\n\t\tstatic_background_cells: true,\r\n\t\tbranch_loading: false,\r\n\t\tbranch_loading_property: \"$has_child\",\r\n\t\tshow_loading: false,\r\n\t\tshow_chart: true,\r\n\t\tshow_grid: true,\r\n\t\tmin_duration: 60 * 60 * 1000,\r\n\t\tdate_format: \"%d-%m-%Y %H:%i\", // use instead xml_date\r\n\t\txml_date: undefined, // \"%d-%m-%Y %H:%i\", // deprecated\r\n\t\tstart_on_monday: true,\r\n\t\tserver_utc: false,\r\n\t\tshow_progress: true,\r\n\t\tfit_tasks: false,\r\n\t\tselect_task: true,\r\n\t\tscroll_on_click: true,\r\n\t\tsmart_rendering: true,\r\n\t\tpreserve_scroll: true,\r\n\t\treadonly: false,\r\n\t\tcontainer_resize_timeout: 20,\r\n\t\tdeadlines: true,\r\n\r\n\t\t/*grid */\r\n\t\tdate_grid: \"%Y-%m-%d\",\r\n\r\n\t\tdrag_links: true,\r\n\t\tdrag_progress: true,\r\n\t\tdrag_resize: true,\r\n\t\tdrag_project: false,\r\n\t\tdrag_move: true,\r\n\t\tdrag_mode: {\r\n\t\t\tresize: \"resize\",\r\n\t\t\tprogress: \"progress\",\r\n\t\t\tmove: \"move\",\r\n\t\t\tignore: \"ignore\"\r\n\t\t},\r\n\t\tround_dnd_dates: true,\r\n\t\tlink_wrapper_width: 20,\r\n\t\tlink_arrow_size:12,\r\n\t\troot_id: 0,\r\n\r\n\t\tautofit: false, // grid column automatic fit grid_width config\r\n\t\tcolumns: [\r\n\t\t\t{name: \"text\", tree: true, width: \"*\", resize: true},\r\n\t\t\t{name: \"start_date\", align: \"center\", resize: true},\r\n\t\t\t{name: \"duration\", align: \"center\"},\r\n\t\t\t{name: \"add\", width: 44}\r\n\t\t],\r\n\r\n\t\t/*scale*/\r\n\r\n\t\tscale_offset_minimal: true,\r\n\t\tinherit_scale_class: false,\r\n\r\n\t\tscales: [\r\n\t\t\t{\r\n\t\t\t\tunit: \"day\",\r\n\t\t\t\tstep: 1,\r\n\t\t\t\tdate: \"%d %M\"\r\n\t\t\t}\r\n\t\t],\r\n// \t\tdate_scale: \"%d %M\",\r\n\r\n\t\ttime_step: 60,\r\n\t\tduration_step: 1,\r\n\t\ttask_date: \"%d %F %Y\",\r\n\t\ttime_picker: \"%H:%i\",\r\n\t\ttask_attribute: \"data-task-id\",\r\n\t\tlink_attribute: \"data-link-id\",\r\n\t\tlayer_attribute: \"data-layer\",\r\n\t\tbuttons_left: [\r\n\t\t\t\"gantt_save_btn\",\r\n\t\t\t\"gantt_cancel_btn\"\r\n\t\t],\r\n\t\t_migrate_buttons: {\r\n\t\t\tdhx_save_btn: \"gantt_save_btn\",\r\n\t\t\tdhx_cancel_btn: \"gantt_cancel_btn\",\r\n\t\t\tdhx_delete_btn: \"gantt_delete_btn\"\r\n\t\t},\r\n\t\tbuttons_right: [\r\n\t\t\t\"gantt_delete_btn\"\r\n\t\t],\r\n\t\tlightbox: {\r\n\t\t\tsections: [\r\n\t\t\t\t{name: \"description\", height: 70, map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t\t{name: \"time\", type: \"duration\", map_to: \"auto\"}\r\n\t\t\t],\r\n\t\t\tproject_sections: [\r\n\t\t\t\t{name: \"description\", height: 70, map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t\t{name: \"type\", type: \"typeselect\", map_to: \"type\"},\r\n\t\t\t\t{name: \"time\", type: \"duration\", readonly: true, map_to: \"auto\"}\r\n\t\t\t],\r\n\t\t\tmilestone_sections: [\r\n\t\t\t\t{name: \"description\", height: 70, map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t\t{name: \"type\", type: \"typeselect\", map_to: \"type\"},\r\n\t\t\t\t{name: \"time\", type: \"duration\", single_date: true, map_to: \"auto\"}\r\n\t\t\t]\r\n\t\t},\r\n\t\tdrag_lightbox: true,\r\n\t\tsort: false,\r\n\t\tdetails_on_create: true,\r\n\t\tdetails_on_dblclick: true,\r\n\t\tinitial_scroll: true,\r\n\t\ttask_scroll_offset: 100,\r\n\r\n\t\torder_branch: false,\r\n\t\torder_branch_free: false,\r\n\r\n\t\t// task height is deprecated, use 'bar_height' instead\r\n\t\ttask_height: undefined,// number px of 'full' for row height\r\n\t\tbar_height: \"full\",\r\n\t\tbar_height_padding:9,\r\n\t\tmin_column_width: 70,\r\n\r\n\t\t// min width for grid column (when resizing)\r\n\t\tmin_grid_column_width: 70,\r\n\t\t// name of the attribute with column index for resize element\r\n\t\tgrid_resizer_column_attribute: \"data-column-index\",\r\n\t\t// name of the attribute with column index for resize element\r\n\t\t// grid_resizer_attribute: \"grid_resizer\", // - usage of this parameter is not found in code\r\n\r\n\t\t// grid width can be increased after the column has been resized\r\n\t\tkeep_grid_width: false,\r\n\r\n\t\t// grid width can be adjusted\r\n\t\tgrid_resize: false,\r\n\t\tgrid_elastic_columns: false,\r\n\t\tshow_tasks_outside_timescale: false,\r\n\t\tshow_unscheduled: true,\r\n\r\n\t\tresize_rows: false,\r\n\t\t// name of the attribute with row index for resize element\r\n\t\ttask_grid_row_resizer_attribute: \"data-row-index\",\r\n\t\t// min height for row (when resizing)\r\n\t\tmin_task_grid_row_height: 30,\r\n\t\trow_height: 36,\r\n\r\n\t\t//\r\n\t\treadonly_property: \"readonly\",\r\n\t\teditable_property: \"editable\",\r\n\t\tcalendar_property: \"calendar_id\",\r\n\t\tresource_calendars: {},\r\n\t\tdynamic_resource_calendars: false,\r\n\t\tinherit_calendar: false,\r\n\t\ttype_renderers: {},\r\n\r\n\t\topen_tree_initially: false,\r\n\t\toptimize_render: true,\r\n\t\tprevent_default_scroll: false,\r\n\t\tshow_errors: true,\r\n\t\twai_aria_attributes: true,\r\n\t\tsmart_scales: true,\r\n\t\trtl:false,\r\n\t\tplaceholder_task: false,\r\n\t\thorizontal_scroll_key: \"shiftKey\",\r\n\t\tdrag_timeline: {\r\n\t\t\tuseKey: undefined,\r\n\t\t\tignore: \".gantt_task_line, .gantt_task_link\",\r\n\t\t\trender: false\r\n\t\t},\r\n\t\tdrag_multiple: true,\r\n\t\tcsp: \"auto\"\r\n\t};\r\n\treturn result;\r\n};\r\n","/* eslint-disable no-restricted-globals */\r\nvar isWindowAwailable = typeof window !== \"undefined\";\r\n\r\n/* eslint-enable no-restricted-globals */\r\n\r\nexport default {\r\n\tisIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisIE6: isWindowAwailable && (!XMLHttpRequest && navigator.userAgent.indexOf(\"MSIE\") >= 0),\r\n\tisIE7: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE 7.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") < 0),\r\n\tisIE8: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE 8.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") >= 0),\r\n\tisOpera: isWindowAwailable && (navigator.userAgent.indexOf(\"Opera\") >= 0),\r\n\tisChrome: isWindowAwailable && (navigator.userAgent.indexOf(\"Chrome\") >= 0),\r\n\tisKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\r\n\tisFF: isWindowAwailable && (navigator.userAgent.indexOf(\"Firefox\") >= 0),\r\n\tisIPad: isWindowAwailable && (navigator.userAgent.search(/iPad/gi) >= 0),\r\n\tisEdge: isWindowAwailable && (navigator.userAgent.indexOf(\"Edge\")!=-1),\r\n\tisNode: (!isWindowAwailable || typeof navigator == \"undefined\" || (typeof PRODUCTION !== \"undefined\" && PRODUCTION === \"test\"))\r\n};\r\n","export default function serialize(data: object | string) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\r\n\tlet result = \"\";\r\n\r\n\tfor (const key in data) {\r\n\t\tlet serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = String(data[key]);\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}\r\n","import env from \"../../utils/env\";\r\nimport global from \"../../utils/global\";\r\nimport serialize from \"./serialize\";\r\n\r\nfunction createConfig(method, args) {\r\n\tvar result = {\r\n\t\tmethod: method\r\n\t};\r\n\r\n\tif (args.length === 0) {\r\n\t\tthrow new Error(\"Arguments list of query is wrong.\");\r\n\t}\r\n\tif (args.length === 1) {\r\n\t\tif (typeof args[0] === \"string\") {\r\n\t\t\tresult.url = args[0];\r\n\t\t\tresult.async = true;\r\n\t\t} else {\r\n\t\t\tresult.url = args[0].url;\r\n\t\t\tresult.async = (args[0].async || true);\r\n\t\t\tresult.callback = args[0].callback;\r\n\t\t\tresult.headers = args[0].headers;\r\n\t\t}\r\n\t\tif (method === \"POST\" || \"PUT\") {\r\n\t\t\tif (args[0].data) {\r\n\t\t\t\tif (typeof args[0].data !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[0].data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[0].data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tresult.url = args[0];\r\n\tswitch(method) {\r\n\t\tcase \"GET\":\r\n\t\tcase \"DELETE\":\r\n\t\t\tresult.callback = args[1];\r\n\t\t\tresult.headers = args[2];\r\n\t\tbreak;\r\n\t\tcase \"POST\":\r\n\t\tcase \"PUT\":\r\n\t\t\tif (args[1]) {\r\n\t\t\t\tif (typeof args[1] !== \"string\") {\r\n\t\t\t\t\tresult.data = serialize(args[1]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult.data = args[1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tresult.data = \"\";\r\n\t\t\t}\r\n\t\t\tresult.callback = args[2];\r\n\t\t\tresult.headers = args[3];\r\n\t\tbreak;\r\n\t}\r\n\treturn result;\r\n}\r\n\r\nexport default function(gantt) {\r\n\treturn {\r\n\r\n\t\t// if false - dhxr param will added to prevent caching on client side (default),\r\n\t\t// if true - do not add extra params\r\n\t\tcache: true,\r\n\r\n\t\t// default method for load/loadStruct, post/get allowed\r\n\t\t// get - since 4.1.1, this should fix 412 error for macos safari\r\n\t\tmethod: \"get\",\r\n\r\n\t\tparse: function(data) {\r\n\t\t\tif (typeof data !== \"string\") return data;\r\n\r\n\t\t\tvar obj;\r\n\t\t\tdata = data.replace(/^[\\s]+/,\"\");\r\n\t\t\tif (typeof DOMParser !== \"undefined\" && !env.isIE) { // ff,ie9\r\n\t\t\t\tobj = (new DOMParser()).parseFromString(data, \"text/xml\");\r\n\t\t\t} else if (typeof global.ActiveXObject !== \"undefined\") {\r\n\t\t\t\tobj = new global.ActiveXObject(\"Microsoft.XMLDOM\");\r\n\t\t\t\tobj.async = \"false\";\r\n\t\t\t\tobj.loadXML(data);\r\n\t\t\t}\r\n\t\t\treturn obj;\r\n\t\t},\r\n\t\txmltop: function(tagname, xhr, obj) {\r\n\t\t\tif (typeof xhr.status == \"undefined\" || xhr.status < 400) {\r\n\t\t\t\tvar xml = (!xhr.responseXML) ? this.parse(xhr.responseText || xhr) : (xhr.responseXML || xhr);\r\n\t\t\t\tif (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\r\n\t\t\t\t\treturn xml.getElementsByTagName(tagname)[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (obj !== -1) gantt.callEvent(\"onLoadXMLError\",[\"Incorrect XML\", arguments[1], obj]);\r\n\t\t\treturn document.createElement(\"DIV\");\r\n\t\t},\r\n\t\txpath: function(xpathExp, docObj) {\r\n\t\t\tif (!docObj.nodeName) docObj = docObj.responseXML || docObj;\r\n\t\t\tif (env.isIE) {\r\n\t\t\t\treturn docObj.selectNodes(xpathExp)||[];\r\n\t\t\t} else {\r\n\t\t\t\tvar rows = [];\r\n\t\t\t\tvar first;\r\n\t\t\t\tvar col = (docObj.ownerDocument||docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\r\n\r\n\t\t\t\twhile (true){\r\n\t\t\t\t\tfirst = col.iterateNext();\r\n\t\t\t\t\tif(first){\r\n\t\t\t\t\t\trows.push(first);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn rows;\r\n\t\t\t}\r\n\t\t},\r\n\t\tquery: function(config) {\r\n\t\t\treturn this._call(\r\n\t\t\t\t(config.method || \"GET\"),\r\n\t\t\t\tconfig.url,\r\n\t\t\t\tconfig.data || \"\",\r\n\t\t\t\t(config.async || true),\r\n\t\t\t\tconfig.callback,\r\n\t\t\t\tconfig.headers\r\n\t\t\t);\r\n\t\t},\r\n\t\tget: function(url, onLoad, headers) {\r\n\t\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\t\treturn this.query(config);\r\n\t\t},\r\n\t\tgetSync: function(url, headers) {\r\n\t\t\tvar config = createConfig(\"GET\", arguments);\r\n\t\t\tconfig.async = false;\r\n\t\t\treturn this.query(config);\r\n\t\t},\r\n\t\tput: function(url, postData, onLoad, headers) {\r\n\t\t\tvar config = createConfig(\"PUT\", arguments);\r\n\t\t\treturn this.query(config);\r\n\t\t},\r\n\t\tdel: function(url, onLoad, headers) {\r\n\t\t\t/**\r\n\t\t\t * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n\t\t\t * A payload within a DELETE request message has no defined semantics;\r\n\t\t\t * sending a payload body on a DELETE request might cause some existing\r\n\t\t\t * implementations to reject the request.\r\n\t\t\t */\r\n\t\t\tvar config = createConfig(\"DELETE\", arguments);\r\n\t\t\treturn this.query(config);\r\n\t\t},\r\n\t\tpost: function(url, postData, onLoad, headers) {\r\n\t\t\tif (arguments.length == 1) {\r\n\t\t\t\tpostData = \"\";\r\n\t\t\t} else if (arguments.length == 2 && typeof(postData) == \"function\") {\r\n\t\t\t\tonLoad = postData;\r\n\t\t\t\tpostData = \"\";\r\n\t\t\t}\r\n\t\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\t\treturn this.query(config);\r\n\t\t},\r\n\t\tpostSync: function(url, postData, headers) {\r\n\t\t\tpostData = (postData === null ? \"\" : String(postData));\r\n\r\n\t\t\tvar config = createConfig(\"POST\", arguments);\r\n\t\t\tconfig.async = false;\r\n\t\t\treturn this.query(config);\r\n\t\t},\r\n\t\t_call: function(method, url, postData, async, onLoad, headers) {\r\n\t\t\treturn new gantt.Promise(function(resolve, reject) {\r\n\t\t\t\tvar t = (typeof XMLHttpRequest !== undefined ? new XMLHttpRequest() : new global.ActiveXObject(\"Microsoft.XMLHTTP\"));\r\n\t\t\t\tvar isQt = (navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null);\r\n\r\n\t\t\t\tif (!!async) {\r\n\t\t\t\t\tt.onreadystatechange = function() {\r\n\t\t\t\t\t\tif ((t.readyState == 4) || (isQt && t.readyState == 3)) { // what for long response and status 404?\r\n\t\t\t\t\t\t\tif (t.status != 200 || t.responseText === \"\")\r\n\t\t\t\t\t\t\t\tif (!gantt.callEvent(\"onAjaxError\", [t])) return;\r\n\r\n\t\t\t\t\t\t\tsetTimeout(function() {\r\n\t\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\t\tonLoad.apply(global, [{xmlDoc:t, filePath:url}]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tresolve(t);\r\n\t\t\t\t\t\t\t\tif (typeof(onLoad) == \"function\") {\r\n\t\t\t\t\t\t\t\t\tonLoad = null;\r\n\t\t\t\t\t\t\t\t\tt = null;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}, 0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tvar noCache = !this || !this.cache;\r\n\t\t\t\tif (method == \"GET\" && noCache) {\r\n\t\t\t\t\turl += (url.indexOf(\"?\")>=0?\"&\":\"?\")+\"dhxr\"+new Date().getTime()+\"=1\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tt.open(method, url, async);\r\n\r\n\t\t\t\tif (headers){\r\n\t\t\t\t\tfor (var key in headers)\r\n\t\t\t\t\t\tt.setRequestHeader(key, headers[key]);\r\n\t\t\t\t} else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\r\n\t\t\t\t\tt.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n\t\t\t\t} else if (method == \"GET\") {\r\n\t\t\t\t\tpostData = null;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tt.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n\r\n\t\t\t\tt.send(postData);\r\n\r\n\t\t\t\tif (!async) return {xmlDoc:t, filePath:url}; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\r\n\t\t\t});\r\n\t\t},\r\n\t\turlSeparator: function(str){\r\n\t\t\tif (str.indexOf(\"?\") != -1)\r\n\t\t\t\treturn \"&\";\r\n\t\t\telse\r\n\t\t\t\treturn \"?\";\r\n\t\t}\r\n\t};\r\n};\r\n","const dateToStr = (format: string, utc: boolean, gantt) => {\r\n\tformat = format.replace(/%[a-zA-Z]/g, (a) => {\r\n\t\tswitch (a) {\r\n\t\t\tcase \"%d\":\r\n\t\t\t\treturn `\"+to_fixed(date.get${utc?\"UTC\":\"\"}Date())+\"`;\r\n\t\t\tcase \"%m\":\r\n\t\t\t\treturn `\"+to_fixed((date.get${utc?\"UTC\":\"\"}Month()+1))+\"`;\r\n\t\t\tcase \"%j\":\r\n\t\t\t\treturn `\"+date.get${utc?\"UTC\":\"\"}Date()+\"`;\r\n\t\t\tcase \"%n\":\r\n\t\t\t\treturn `\"+(date.get${utc?\"UTC\":\"\"}Month()+1)+\"`;\r\n\t\t\tcase \"%y\":\r\n\t\t\t\treturn `\"+to_fixed(date.get${utc?\"UTC\":\"\"}FullYear()%100)+\"`;\r\n\t\t\tcase \"%Y\":\r\n\t\t\t\treturn `\"+date.get${utc?\"UTC\":\"\"}FullYear()+\"`;\r\n\t\t\tcase \"%D\":\r\n\t\t\t\treturn `\"+locale.date.day_short[date.get${utc?\"UTC\":\"\"}Day()]+\"`;\r\n\t\t\tcase \"%l\":\r\n\t\t\t\treturn `\"+locale.date.day_full[date.get${utc?\"UTC\":\"\"}Day()]+\"`;\r\n\t\t\tcase \"%M\":\r\n\t\t\t\treturn `\"+locale.date.month_short[date.get${utc?\"UTC\":\"\"}Month()]+\"`;\r\n\t\t\tcase \"%F\":\r\n\t\t\t\treturn `\"+locale.date.month_full[date.get${utc?\"UTC\":\"\"}Month()]+\"`;\r\n\t\t\tcase \"%h\":\r\n\t\t\t\treturn `\"+to_fixed((date.get${utc?\"UTC\":\"\"}Hours()+11)%12+1)+\"`;\r\n\t\t\tcase \"%g\":\r\n\t\t\t\treturn `\"+((date.get${utc?\"UTC\":\"\"}Hours()+11)%12+1)+\"`;\r\n\t\t\tcase \"%G\":\r\n\t\t\t\treturn `\"+date.get${utc?\"UTC\":\"\"}Hours()+\"`;\r\n\t\t\tcase \"%H\":\r\n\t\t\t\treturn `\"+to_fixed(date.get${utc?\"UTC\":\"\"}Hours())+\"`;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\treturn `\"+to_fixed(date.get${utc?\"UTC\":\"\"}Minutes())+\"`;\r\n\t\t\tcase \"%a\":\r\n\t\t\t\treturn `\"+(date.get${utc?\"UTC\":\"\"}Hours()>11?\"pm\":\"am\")+\"`;\r\n\t\t\tcase \"%A\":\r\n\t\t\t\treturn `\"+(date.get${utc?\"UTC\":\"\"}Hours()>11?\"PM\":\"AM\")+\"`;\r\n\t\t\tcase \"%s\":\r\n\t\t\t\treturn `\"+to_fixed(date.get${utc?\"UTC\":\"\"}Seconds())+\"`;\r\n\t\t\tcase \"%W\":\r\n\t\t\t\treturn `\"+to_fixed(getISOWeek(date))+\"`;\r\n\t\t\tcase \"%w\":\r\n\t\t\t\treturn `\"+to_fixed(getWeek(date))+\"`;\r\n\t\t\tdefault:\r\n\t\t\t\treturn a;\r\n\t\t}\r\n\t});\r\n\r\n\t// tslint:disable-next-line: function-constructor\r\n\tconst dateToStrFn = new Function(\"date\", \"to_fixed\", \"locale\", \"getISOWeek\", \"getWeek\", `return \"${format}\";`);\r\n\r\n\treturn (date: Date) => {\r\n\t\treturn dateToStrFn(date, gantt.date.to_fixed, gantt.locale, gantt.date.getISOWeek, gantt.date.getWeek);\r\n\t};\r\n};\r\n\r\n\r\nconst strToDate = (format: string, utc: boolean, gantt:any) => {\r\n\tlet splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (let i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\":\r\n\t\t\t\tsplt += `set[2]=temp[${i}]||1;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\":\r\n\t\t\t\tsplt += `set[1]=(temp[${i}]||1)-1;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\":\r\n\t\t\t\tsplt += `set[0]=temp[${i}]*1+(temp[${i}]>50?1900:2000);`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += `set[3]=temp[${i}]||0;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += `set[4]=temp[${i}]||0;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\":\r\n\t\t\t\tsplt += `set[0]=temp[${i}]||0;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\":\r\n\t\t\t\tsplt += `set[3]=set[3]%12+((temp[${i}]||'').toLowerCase()=='am'?0:12);`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\":\r\n\t\t\t\tsplt += `set[5]=temp[${i}]||0;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\":\r\n\t\t\t\tsplt += `set[1]=locale.date.month_short_hash[temp[${i}]]||0;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\":\r\n\t\t\t\tsplt += `set[1]=locale.date.month_full_hash[temp[${i}]]||0;`;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tlet code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) { code = ` Date.UTC(${code})`; }\r\n\t// tslint:disable-next-line: function-constructor\r\n\tconst strToDateFn = new Function(\"date\", \"locale\", `var set=[0,0,1,0,0,0]; ${splt} return new Date(${code});`);\r\n\r\n\treturn (dateString) => {\r\n\t\treturn strToDateFn(dateString, gantt.locale);\r\n\t};\r\n};\r\n\r\nconst fastVersion = {\r\n\tdate_to_str: dateToStr,\r\n\tstr_to_date: strToDate\r\n};\r\n\r\nexport default fastVersion;","const dateToStr = (format: string, utc: boolean, gantt) => {\r\n\treturn (date) => {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, (a) => {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? gantt.date.to_fixed(date.getUTCDate()) : gantt.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? gantt.date.to_fixed((date.getUTCMonth() + 1)) : gantt.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? gantt.date.to_fixed(date.getUTCFullYear() % 100) : gantt.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? gantt.locale.date.day_short[date.getUTCDay()] : gantt.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? gantt.locale.date.day_full[date.getUTCDay()] : gantt.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? gantt.locale.date.month_short[date.getUTCMonth()] : gantt.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? gantt.locale.date.month_full[date.getUTCMonth()] : gantt.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? gantt.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : gantt.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? gantt.date.to_fixed(date.getUTCHours()) : gantt.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? gantt.date.to_fixed(date.getUTCMinutes()) : gantt.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? gantt.date.to_fixed(date.getUTCSeconds()) : gantt.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? gantt.date.to_fixed(gantt.date.getUTCISOWeek(date)) : gantt.date.to_fixed(gantt.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nconst strToDate = (format: string, utc: boolean, gantt:any) => {\r\n\treturn (date: string) => {\r\n\t\tconst set: Array = [0, 0, 1, 0, 0, 0];\r\n\t\tconst temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\t\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\r\n\t\tfor (let i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] as unknown as number || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] as unknown as number || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] as unknown as number * 1 + ((temp[i] as unknown as number) > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] as unknown as number || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] as unknown as number || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] as unknown as number || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] as number % 12 + ((temp[i] || \"\").toLowerCase() === \"am\" ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = gantt.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = gantt.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(\r\n\t\t\t\tset[0] as number,\r\n\t\t\t\tset[1] as number,\r\n\t\t\t\tset[2] as number,\r\n\t\t\t\tset[3] as number,\r\n\t\t\t\tset[4] as number,\r\n\t\t\t\tset[5] as number\r\n\t\t\t));\r\n\t\t}\r\n\t\treturn new Date(\r\n\t\t\tset[0] as number,\r\n\t\t\tset[1] as number,\r\n\t\t\tset[2] as number,\r\n\t\t\tset[3] as number,\r\n\t\t\tset[4] as number,\r\n\t\t\tset[5] as number\r\n\t\t);\r\n\t};\r\n\r\n};\r\n\r\n\r\nconst cspVersion = {\r\n\tdate_to_str: dateToStr,\r\n\tstr_to_date: strToDate\r\n};\r\n\r\nexport default cspVersion;","/*\r\n %d - the day as a number with a leading zero ( 01 to 31 );\r\n %j - the day as a number without a leading zero ( 1 to 31 );\r\n %D - the day as an abbreviation ( Sun to Sat );\r\n %l - the day as a full name ( Sunday to Saturday );\r\n %W - the ISO-8601 week number of the year. Weeks start on Monday; 1)\r\n %m - the month as a number without a leading zero ( 1 to 12 );\r\n %n - the month as a number with a leading zero ( 01 to 12);\r\n %M - the month as an abbreviation ( Jan to Dec );\r\n %F - the month as a full name ( January to December );\r\n %y - the year as a two-digit number ( 00 to 99 );\r\n %Y - the year as a four-digit number ( 1900–9999 );\r\n %h - the hour based on the 12-hour clock ( 00 to 11 );\r\n %H - the hour based on the 24-hour clock ( 00 to 23 );\r\n %i - the minute as a number with a leading zero ( 00 to 59 );\r\n %s - the second as a number without a leading zero ( 00 to 59 ); 2)\r\n %a - displays am (for times from midnight until noon) and pm (for times from noon until midnight);\r\n %A - displays AM (for times from midnight until noon) and PM (for times from noon until midnight).\r\n*/\r\n\r\nimport fastVersion from \"./date_parsers/fast_version\";\r\nimport cspCompliantVersion from \"./date_parsers/csp_compliant_version\";\r\n\r\nexport default function(gantt) {\r\n\tvar canUseCsp = null;\r\n\tfunction cspAutoCheck() {\r\n\t\ttry {\r\n\t\t\tnew Function(\"canUseCsp = false;\");\r\n\t\t} catch(e) {\r\n\t\t\tcanUseCsp = true;\r\n\t\t}\r\n\t}\r\n\tfunction useCsp() {\r\n\t\tvar result = false;\r\n\t\tif (gantt.config.csp === \"auto\") {\r\n\t\t\tif(canUseCsp === null) {\r\n\t\t\t\tcspAutoCheck();\r\n\t\t\t}\r\n\t\t\tresult = canUseCsp;\r\n\t\t} else {\r\n\t\t\tresult = gantt.config.csp;\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tvar dateHelper = {\r\n\t\tinit: function () {\r\n\t\t\tvar locale = gantt.locale;\r\n\r\n\t\t\tvar s = locale.date.month_short;\r\n\t\t\tvar t = locale.date.month_short_hash = {};\r\n\t\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\t\tt[s[i]] = i;\r\n\r\n\t\t\tvar s = locale.date.month_full;\r\n\t\t\tvar t = locale.date.month_full_hash = {};\r\n\t\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\t\tt[s[i]] = i;\r\n\t\t},\r\n\t\tdate_part: function (date) {\r\n\t\t\tvar old = new Date(date);\r\n\t\t\tdate.setHours(0);\r\n\t\t\tthis.hour_start(date);\r\n\t\t\tif (date.getHours() && //shift to yesterday on dst\r\n\t\t\t\t(date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear()))\r\n\t\t\t\tdate.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\r\n\t\t\treturn date;\r\n\t\t},\r\n\t\ttime_part: function (date) {\r\n\t\t\treturn (date.valueOf() / 1000 - date.getTimezoneOffset() * 60) % 86400;\r\n\t\t},\r\n\t\tweek_start: function (date) {\r\n\t\t\tvar shift = date.getDay();\r\n\t\t\tif (gantt.config.start_on_monday) {\r\n\t\t\t\tif (shift === 0) shift = 6;\r\n\t\t\t\telse shift--;\r\n\t\t\t}\r\n\t\t\treturn this.date_part(this.add(date, -1 * shift, \"day\"));\r\n\t\t},\r\n\t\tmonth_start: function (date) {\r\n\t\t\tdate.setDate(1);\r\n\t\t\treturn this.date_part(date);\r\n\t\t},\r\n\t\tquarter_start: function (date) {\r\n\t\t\tthis.month_start(date);\r\n\t\t\tvar m = date.getMonth(),\r\n\t\t\t\tres_month;\r\n\r\n\t\t\tif (m >= 9) {\r\n\t\t\t\tres_month = 9;\r\n\t\t\t} else if (m >= 6) {\r\n\t\t\t\tres_month = 6;\r\n\t\t\t} else if (m >= 3) {\r\n\t\t\t\tres_month = 3;\r\n\t\t\t} else {\r\n\t\t\t\tres_month = 0;\r\n\t\t\t}\r\n\r\n\t\t\tdate.setMonth(res_month);\r\n\t\t\treturn date;\r\n\t\t},\r\n\t\tyear_start: function (date) {\r\n\t\t\tdate.setMonth(0);\r\n\t\t\treturn this.month_start(date);\r\n\t\t},\r\n\t\tday_start: function (date) {\r\n\t\t\treturn this.date_part(date);\r\n\t\t},\r\n\t\thour_start: function (date) {\r\n\t\t\tif (date.getMinutes())\r\n\t\t\t\tdate.setMinutes(0);\r\n\t\t\tthis.minute_start(date);\r\n\r\n\t\t\treturn date;\r\n\t\t},\r\n\t\tminute_start: function (date) {\r\n\t\t\tif (date.getSeconds())\r\n\t\t\t\tdate.setSeconds(0);\r\n\t\t\tif (date.getMilliseconds())\r\n\t\t\t\tdate.setMilliseconds(0);\r\n\t\t\treturn date;\r\n\t\t},\r\n\t\t_add_days: function (modifiedDate, inc, originalDate) {\r\n\r\n\t\t\tmodifiedDate.setDate(modifiedDate.getDate() + inc);\r\n\t\t\tvar incCondition = inc >= 0;\r\n\t\t\tvar getHoursCondition = !originalDate.getHours() && modifiedDate.getHours(); //shift to yesterday on dst\r\n\t\t\tvar getDateCondition = (modifiedDate.getDate() <= originalDate.getDate() || modifiedDate.getMonth() < originalDate.getMonth() || modifiedDate.getFullYear() < originalDate.getFullYear());\r\n\t\t\tif (incCondition && getHoursCondition && getDateCondition){\r\n\t\t\t\tmodifiedDate.setTime(modifiedDate.getTime() + 60 * 60 * 1000 * (24 - modifiedDate.getHours()));\r\n\t\t\t}\r\n\t\t\tvar worktimeCalculation = inc > 1;\r\n\t\t\tif (worktimeCalculation && getHoursCondition){\r\n\t\t\t\t// try to shift the modified Date to 00:00\r\n\t\t\t\tmodifiedDate.setHours(0);\r\n\t\t\t}\r\n\t\t\treturn modifiedDate;\r\n\t\t},\r\n\r\n\t\tadd: function (date, inc, mode) {\r\n\t\t\t/*jsl:ignore*/\r\n\t\t\tvar ndate = new Date(date.valueOf());\r\n\t\t\tswitch (mode) {\r\n\t\t\t\tcase \"day\":\r\n\t\t\t\t\tndate = this._add_days(ndate, inc, date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"week\":\r\n\t\t\t\t\tndate = this._add_days(ndate, inc * 7, date);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"month\":\r\n\t\t\t\t\tndate.setMonth(ndate.getMonth() + inc);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"year\":\r\n\t\t\t\t\tndate.setYear(ndate.getFullYear() + inc);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"hour\":\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t\tadding hours/minutes via setHour(getHour() + inc) gives weird result when\r\n\t\t\t\t\t\tadding one hour to the time before switch to a Daylight Saving time\r\n\r\n\t\t\t\t\t\texample: //Sun Mar 30 2014 01:00:00 GMT+0100 (W. Europe Standard Time)\r\n\t\t\t\t\t\tnew Date(2014, 02, 30, 1).setHours(2)\r\n\t\t\t\t\t\t>>Sun Mar 30 2014 01:00:00 GMT+0100 (W. Europe Standard Time)\r\n\r\n\t\t\t\t\t\tsetTime seems working as expected\r\n\t\t\t\t\t */\r\n\t\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"minute\":\r\n\r\n\t\t\t\t\tndate.setTime(ndate.getTime() + inc * 60 * 1000);\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\treturn this[\"add_\" + mode](date, inc, mode);\r\n\t\t\t}\r\n\t\t\treturn ndate;\r\n\t\t\t/*jsl:end*/\r\n\t\t},\r\n\t\tadd_quarter: function (date, inc) {\r\n\t\t\treturn this.add(date, inc * 3, \"month\");\r\n\t\t},\r\n\r\n\t\tto_fixed: function (num) {\r\n\t\t\tif (num < 10) return \"0\" + num;\r\n\t\t\treturn num;\r\n\t\t},\r\n\t\tcopy: function (date) {\r\n\t\t\treturn new Date(date.valueOf());\r\n\t\t},\r\n\t\tdate_to_str: function (format, utc) {\r\n\t\t\tvar result = fastVersion;\r\n\t\t\tif (useCsp()) {\r\n\t\t\t\tresult = cspCompliantVersion;\r\n\t\t\t}\r\n\t\t\treturn result.date_to_str(format, utc, gantt);\r\n\t\t},\r\n\t\tstr_to_date: function (format, utc) {\r\n\t\t\tvar result = fastVersion;\r\n\t\t\tif (useCsp()) {\r\n\t\t\t\tresult = cspCompliantVersion;\r\n\t\t\t}\r\n\t\t\treturn result.str_to_date(format, utc, gantt);\r\n\t\t},\r\n\t\tgetISOWeek: function (ndate) {\r\n\t\t\treturn gantt.date._getWeekNumber(ndate, true);\r\n\t\t},\r\n\t\t_getWeekNumber: function(ndate, isoWeek){\r\n\t\t\tif (!ndate) return false;\r\n\t\t\tvar nday = ndate.getDay();\r\n\t\t\tif(isoWeek){\r\n\t\t\t\tif (nday === 0) {\r\n\t\t\t\t\tnday = 7;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar first_thursday = new Date(ndate.valueOf());\r\n\t\t\tfirst_thursday.setDate(ndate.getDate() + (4 - nday));\r\n\t\t\tvar year_number = first_thursday.getFullYear(); // year of the first Thursday\r\n\t\t\tvar ordinal_date = Math.round((first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\r\n\t\t\tvar week_number = 1 + Math.floor(ordinal_date / 7);\r\n\t\t\treturn week_number;\r\n\t\t},\r\n\r\n\t\tgetWeek: function(ndate){\r\n\t\t\treturn gantt.date._getWeekNumber(ndate, gantt.config.start_on_monday);\r\n\t\t},\r\n\t\tgetUTCISOWeek: function (ndate) {\r\n\t\t\treturn gantt.date.getISOWeek(ndate);\r\n\t\t},\r\n\t\tconvert_to_utc: function (date) {\r\n\t\t\treturn new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\r\n\t\t},\r\n\t\tparseDate: function (date, format) {\r\n\t\t\t// raw date may be of type string, number (timestamp) or something else\r\n\t\t\t// do not check for instanceof Date explicitly, since we may swap native date with different date implementation at some point\r\n\t\t\tif (date && !date.getFullYear) {\r\n\t\t\t\tif (typeof(format) !== \"function\") {\r\n\t\t\t\t\tif (typeof(format) === \"string\") {\r\n\t\t\t\t\t\tif (format === \"parse_date\" || format === \"xml_date\") {\r\n\t\t\t\t\t\t\tformat = gantt.defined(gantt.templates.xml_date) ? gantt.templates.xml_date : gantt.templates.parse_date;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tformat = gantt.defined(gantt.templates[format]) ? gantt.templates[format] : gantt.date.str_to_date(format);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tformat = gantt.defined(gantt.templates.xml_date) ? gantt.templates.xml_date : gantt.templates.parse_date;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (date) {\r\n\t\t\t\t\tdate = format(date);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdate = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn date;\r\n\t\t}\r\n\t};\r\n\treturn dateHelper;\r\n};","class t{constructor(t){const{url:e,token:s}=t;this._url=e,this._token=s,this._mode=1,this._seed=1,this._queue=[],this.data={},this.api={},this._events={}}headers(){return{Accept:\"application/json\",\"Content-Type\":\"application/json\",\"Remote-Token\":this._token}}fetch(t,e){const s={credentials:\"include\",headers:this.headers()};return e&&(s.method=\"POST\",s.body=e),fetch(t,s).then(t=>t.json())}load(t){return t&&(this._url=t),this.fetch(this._url).then(t=>this.parse(t))}parse(t){const{key:e,websocket:s}=t;e&&(this._token=t.key);for(const e in t.data)this.data[e]=t.data[e];for(const e in t.api){const s=this.api[e]={},i=t.api[e];for(const t in i)s[t]=this._wrapper(e+\".\"+t)}return s&&this.connect(),this}connect(){const t=this._socket;t&&(this._socket=null,t.onclose=function(){},t.close()),this._mode=2,this._socket=function(t,e,s,i){let n=e;\"/\"===n[0]&&(n=document.location.protocol+\"//\"+document.location.host+e);n=n.replace(/^http(s|):/,\"ws$1:\");const o=-1!=n.indexOf(\"?\")?\"&\":\"?\";n=`${n}${o}token=${s}&ws=1`;const r=new WebSocket(n);return r.onclose=()=>setTimeout(()=>t.connect(),2e3),r.onmessage=e=>{const s=JSON.parse(e.data);switch(s.action){case\"result\":t.result(s.body,[]);break;case\"event\":t.fire(s.body.name,s.body.value);break;case\"start\":i();break;default:t.onError(s.data)}},r}(this,this._url,this._token,()=>(this._mode=3,this._send(),this._resubscribe(),this))}_wrapper(t){return function(){const e=[].slice.call(arguments);let s=null;const i=new Promise((i,n)=>{s={data:{id:this._uid(),name:t,args:e},status:1,resolve:i,reject:n},this._queue.push(s)});return this.onCall(s,i),3===this._mode?this._send(s):setTimeout(()=>this._send(),1),i}.bind(this)}_uid(){return(this._seed++).toString()}_send(t){if(2==this._mode)return void setTimeout(()=>this._send(),100);const e=t?[t]:this._queue.filter(t=>1===t.status);if(!e.length)return;const s=e.map(t=>(t.status=2,t.data));3!==this._mode?this.fetch(this._url,JSON.stringify(s)).catch(t=>this.onError(t)).then(t=>this.result(t,s)):this._socket.send(JSON.stringify({action:\"call\",body:s}))}result(t,e){const s={};if(t)for(let e=0;e=0;t--){const e=this._queue[t],i=s[e.data.id];i&&(this.onResponse(e,i),i.error?e.reject(i.error):e.resolve(i.data),this._queue.splice(t,1))}}on(t,e){const s=this._uid();let i=this._events[t];const n=!!i;return n||(i=this._events[t]=[]),i.push({id:s,handler:e}),n||3!=this._mode||this._socket.send(JSON.stringify({action:\"subscribe\",name:t})),{name:t,id:s}}_resubscribe(){if(3==this._mode)for(const t in this._events)this._socket.send(JSON.stringify({action:\"subscribe\",name:t}))}detach(t){if(!t){if(3==this._mode)for(const t in this._events)this._socket.send(JSON.stringify({action:\"unsubscribe\",key:t}));return void(this._events={})}const{id:e,name:s}=t,i=this._events[s];if(i){const t=i.filter(t=>t.id!=e);t.length?this._events[s]=t:(delete this._events[s],3==this._mode&&this._socket.send(JSON.stringify({action:\"unsubscribe\",name:s})))}}fire(t,e){const s=this._events[t];if(s)for(let t=0;t res.json());\r\n };\r\n\r\n this._ready = remote.load().then((back) => (this._remote = back));\r\n\r\n function ready() {\r\n return this._ready;\r\n }\r\n \r\n function on(name, handler) {\r\n this.ready().then((back) => {\r\n if (typeof name === \"string\") back.on(name, handler);\r\n else {\r\n for (const key in name) {\r\n back.on(key, name[key]);\r\n }\r\n }\r\n });\r\n }\r\n\r\n this.ready = ready;\r\n this.on = on;\r\n };\r\n\r\n","function checkTimeout(host, updPerSecond){\r\n\tif (!updPerSecond)\r\n\t\treturn true;\r\n\t\r\n\tif (host._on_timeout)\r\n\t\treturn false;\r\n\t\r\n\tvar timeout = Math.ceil(1000/updPerSecond);\r\n\tif (timeout < 2) return true;\r\n\r\n\tsetTimeout(function(){\r\n\t\tdelete host._on_timeout;\r\n\t}, timeout);\r\n\r\n\thost._on_timeout = true;\r\n\treturn true;\r\n}\r\n\r\nexport default checkTimeout;","import * as utils from \"../../utils/utils\";\r\n\r\nvar StateService = (function(){\r\n\tvar stateProviders = {};\r\n\r\n\tfunction getState(name){\r\n\t\tvar provider = stateProviders[name];\r\n\t\tif(provider){\r\n\t\t\treturn stateProviders[name].method();\r\n\t\t}else{\r\n\t\t\tvar res = {};\r\n\t\t\tfor(var i in stateProviders){\r\n\t\t\t\tif(!stateProviders[i].internal)\r\n\t\t\t\t\tutils.mixin(res, stateProviders[i].method(), true);\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction registerProvider(name, provider, internal){\r\n\t\tstateProviders[name] = { method: provider, internal: internal};\r\n\t}\r\n\r\n\tfunction unregisterProvider(name){\r\n\t\tdelete stateProviders[name];\r\n\t}\r\n\r\n\treturn {\r\n\t\tgetState: getState,\r\n\t\tregisterProvider: registerProvider,\r\n\t\tunregisterProvider: unregisterProvider\r\n\t};\r\n});\r\n\r\nexport default StateService;\r\n\r\n","// eslint-disable-next-line no-restricted-globals\r\nexport default Promise;","import * as utils from \"../../utils/utils\";\r\nimport {replaceValidZeroId} from \"../../utils/helpers\";\r\n\r\nvar createTasksDatastoreFacade = function(){\r\n\treturn {\r\n\tgetTask: function (id) {\r\n\t\tid = replaceValidZeroId(id, this.config.root_id);\r\n\t\tthis.assert(id, \"Invalid argument for gantt.getTask\");\r\n\t\tvar task = this.$data.tasksStore.getItem(id);\r\n\t\tthis.assert(task, \"Task not found id=\" + id);\r\n\t\treturn task;\r\n\t},\r\n\tgetTaskByTime: function (from, to) {\r\n\t\tvar p = this.$data.tasksStore.getItems();\r\n\r\n\t\tvar res = [];\r\n\r\n\t\tif (!(from || to)) {\r\n\t\t\tres = p;\r\n\t\t} else {\r\n\t\t\tfrom = +from || -Infinity;\r\n\t\t\tto = +to || Infinity;\r\n\t\t\tfor (var t = 0; t < p.length; t++){\r\n\t\t\t\tvar task = p[t];\r\n\t\t\t\tif (+task.start_date < to && +task.end_date > from)\r\n\t\t\t\t\tres.push(task);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\tisTaskExists: function (id) {\r\n\t\tif(!this.$data || !this.$data.tasksStore){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn this.$data.tasksStore.exists(id);\r\n\t},\r\n\tupdateTask: function (id, item) {\r\n\t\tif (!utils.defined(item)) item = this.getTask(id);\r\n\t\tthis.$data.tasksStore.updateItem(id, item);\r\n\t\tif(this.isTaskExists(id))\r\n\t\t\tthis.refreshTask(id);\r\n\t},\r\n\taddTask: function (item, parent, index) {\r\n\t\tif (!utils.defined(item.id))\r\n\t\t\titem.id = utils.uid();\r\n\r\n\t\t//GS-761: assert unique ID\r\n\t\tif (this.isTaskExists(item.id)){\r\n\t\t\tvar task = this.getTask(item.id);\r\n\t\t\tif (task.$index != item.$index) {\r\n\t\t\t\t// Someone may try to mistakenly add a task with the same ID, and most likely\r\n\t\t\t\t// use the string format for the dates. Gantt shouldn't break in this scenario\r\n\t\t\t\tif (item.start_date && typeof item.start_date === \"string\"){\r\n\t\t\t\t\titem.start_date = this.date.parseDate(item.start_date, \"parse_date\");\r\n\t\t\t\t}\r\n\t\t\t\tif (item.end_date && typeof item.end_date === \"string\"){\r\n\t\t\t\t\titem.end_date = this.date.parseDate(item.end_date, \"parse_date\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn this.$data.tasksStore.updateItem(item.id, item);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tif (!utils.defined(parent)) parent = this.getParent(item) || 0;\r\n\t\tif (!this.isTaskExists(parent)) parent = this.config.root_id;\r\n\t\tthis.setParent(item, parent);\r\n\t\treturn this.$data.tasksStore.addItem(item, index, parent);\r\n\t},\r\n\tdeleteTask: function (id) {\r\n\t\tid = replaceValidZeroId(id, this.config.root_id);\r\n\t\treturn this.$data.tasksStore.removeItem(id);\r\n\t},\r\n\tgetTaskCount: function () {\r\n\t\treturn this.$data.tasksStore.count();\r\n\t},\r\n\tgetVisibleTaskCount: function () {\r\n\t\treturn this.$data.tasksStore.countVisible();\r\n\t},\r\n\tgetTaskIndex: function (id) {\r\n\t\treturn this.$data.tasksStore.getBranchIndex(id);\r\n\t},\r\n\tgetGlobalTaskIndex: function (id) {\r\n\t\tid = replaceValidZeroId(id, this.config.root_id);\r\n\t\tthis.assert(id, \"Invalid argument\");\r\n\t\treturn this.$data.tasksStore.getIndexById(id);\r\n\t},\r\n\teachTask: function (code, parent, master) {\r\n\t\treturn this.$data.tasksStore.eachItem(utils.bind(code, master||this), parent);\r\n\t},\r\n\teachParent: function (callback, startTask, master) {\r\n\t\treturn this.$data.tasksStore.eachParent(utils.bind(callback, master || this), startTask);\r\n\t},\r\n\tchangeTaskId: function (oldid, newid) {\r\n\t\tthis.$data.tasksStore.changeId(oldid, newid);\r\n\t\tvar task = this.$data.tasksStore.getItem(newid);\r\n\r\n\t\tvar links = [];\r\n\r\n\t\tif (task.$source) {\r\n\t\t\tlinks = links.concat(task.$source);\r\n\t\t}\r\n\t\tif (task.$target) {\r\n\t\t\tlinks = links.concat(task.$target);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < links.length; i++) {\r\n\t\t\tvar link = this.getLink(links[i]);\r\n\t\t\tif (link.source == oldid) {\r\n\t\t\t\tlink.source = newid;\r\n\t\t\t}\r\n\t\t\tif (link.target == oldid) {\r\n\t\t\t\tlink.target = newid;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\tcalculateTaskLevel: function (item) {\r\n\t\treturn this.$data.tasksStore.calculateItemLevel(item);\r\n\t},\r\n\tgetNext: function (id) {\r\n\t\treturn this.$data.tasksStore.getNext(id);\r\n\t},\r\n\tgetPrev: function (id) {\r\n\t\treturn this.$data.tasksStore.getPrev(id);\r\n\t},\r\n\tgetParent: function (id) {\r\n\t\treturn this.$data.tasksStore.getParent(id);\r\n\t},\r\n\tsetParent: function (task, new_pid, silent) {\r\n\t\treturn this.$data.tasksStore.setParent(task, new_pid, silent);\r\n\t},\r\n\tgetSiblings: function (id) {\r\n\t\treturn this.$data.tasksStore.getSiblings(id).slice();\r\n\t},\r\n\tgetNextSibling: function (id) {\r\n\t\treturn this.$data.tasksStore.getNextSibling(id);\r\n\t},\r\n\tgetPrevSibling: function (id) {\r\n\t\treturn this.$data.tasksStore.getPrevSibling(id);\r\n\t},\r\n\tgetTaskByIndex: function(index){\r\n\t\tvar id = this.$data.tasksStore.getIdByIndex(index);\r\n\t\tif(this.isTaskExists(id)){\r\n\t\t\treturn this.getTask(id);\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t},\r\n\tgetChildren: function (id) {\r\n\t\tif(!this.hasChild(id)){\r\n\t\t\treturn [];\r\n\t\t}else{\r\n\t\t\treturn this.$data.tasksStore.getChildren(id).slice();\r\n\t\t}\r\n\t},\r\n\thasChild: function (id) {\r\n\t\treturn this.$data.tasksStore.hasChild(id);\r\n\t},\r\n\topen: function (id) {\r\n\t\tthis.$data.tasksStore.open(id);\r\n\t},\r\n\tclose: function (id) {\r\n\t\tthis.$data.tasksStore.close(id);\r\n\t},\r\n\tmoveTask: function (sid, tindex, parent) {\r\n\t\tparent = replaceValidZeroId(parent, this.config.root_id);\r\n\t\treturn this.$data.tasksStore.move.apply(this.$data.tasksStore, arguments);\r\n\t},\r\n\tsort: function(field, desc, parent, silent) {\r\n\t\tvar render = !silent;//4th argument to cancel redraw after sorting\r\n\r\n\t\tthis.$data.tasksStore.sort(field, desc, parent);\r\n\t\tthis.callEvent(\"onAfterSort\", [field, desc, parent]);\r\n\r\n\t\tif (render) {\r\n\t\t\tthis.render();\r\n\t\t}\r\n\t}\r\n};\r\n};\r\n\r\nexport default createTasksDatastoreFacade;\r\n\r\n\r\n","import * as utils from \"../../utils/utils\";\r\n\r\nvar $powerArray = {\r\n\t$create: function(array){\r\n\t\treturn utils.mixin(array || [], this);\r\n\t},\r\n\t//remove element at specified position\r\n\t$removeAt:function(pos,len){\r\n\t\tif (pos>=0) this.splice(pos,(len||1));\r\n\t},\r\n\t//find element in collection and remove it\r\n\t$remove:function(value){\r\n\t\tthis.$removeAt(this.$find(value));\r\n\t},\r\n\t//add element to collection at specific position\r\n\t$insertAt:function(data,pos){\r\n\t\tif (!pos && pos!==0) \t//add to the end by default\r\n\t\t\tthis.push(data);\r\n\t\telse {\r\n\t\t\tvar b = this.splice(pos,(this.length-pos));\r\n\t\t\tthis[pos] = data;\r\n\t\t\tthis.push.apply(this,b); //reconstruct array without loosing this pointer\r\n\t\t}\r\n\t},\r\n\t//return index of element, -1 if it doesn't exists\r\n\t$find:function(data){\r\n\t\tfor (var i=0; i data_size){\r\n\t\t\t\t//dhx.log(\"Warning\",\"DataStore:add\",\"Index of out of bounds\");\r\n\t\t\t\tindex = Math.min(order.length,index);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t//gantt.assert(!this.exists(id), \"Not unique ID\");\r\n\r\n\t\tthis.pull[item.id]=item;\r\n\t\tif (!this.isSilent()){\r\n\t\t\tthis._updateOrder(function(){\r\n\t\t\t\tif(this.$find(item.id) === -1)\r\n\t\t\t\t\tthis.$insertAt(item.id,index);\r\n\t\t\t});\r\n\t\t}\r\n\t\tthis.filter();\r\n\t\t//order.$insertAt(item.id,index);\r\n\t},\r\n\r\n\r\n\tisVisible: function(id){\r\n\t\treturn this.visibleOrder.$find(id) > -1;\r\n\t},\r\n\tgetVisibleItems: function(){\r\n\t\treturn this.getIndexRange();\r\n\t},\r\n\r\n\taddItem: function(item, index){\r\n\t\tif (!utils.defined(item.id))\r\n\t\t\titem.id = utils.uid();\r\n\r\n\t\tif(this.$initItem){\r\n\t\t\titem = this.$initItem(item);\r\n\t\t}\r\n\r\n\t\tif (!this.isSilent()){\r\n\t\t\tif (this.callEvent(\"onBeforeAdd\", [item.id, item]) === false) return false;\r\n\t\t}\r\n\r\n\r\n\t\tthis._addItemInner(item, index);\r\n\r\n\t\tif (!this.isSilent()){\r\n\t\t\tthis.callEvent(\"onAfterAdd\",[item.id, item]);\r\n\t\t\t//repaint signal\r\n\t\t\tthis.callEvent(\"onStoreUpdated\",[item.id,item,\"add\"]);\r\n\t\t}\r\n\t\treturn item.id;\r\n\t},\r\n\r\n\t_changeIdInner: function(oldId, newId){\r\n\t\tif(this.pull[oldId])\r\n\t\t\tthis.pull[newId] = this.pull[oldId];\r\n\r\n\t\tvar visibleOrder = this._searchVisibleOrder[oldId];\r\n\t\tthis.pull[newId].id = newId;\r\n\t\tthis._updateOrder(function(){\r\n\t\t\tthis[this.$find(oldId)] = newId;\r\n\t\t});\r\n\t\tthis._searchVisibleOrder[newId] = visibleOrder;\r\n\t\tdelete this._searchVisibleOrder[oldId];\r\n\r\n\t\t//this.visibleOrder[this.visibleOrder.$find(oldId)]=newId;\r\n\t\tdelete this.pull[oldId];\r\n\t},\r\n\tchangeId: function(oldId, newId){\r\n\t\tthis._changeIdInner(oldId, newId);\r\n\r\n\t\tthis.callEvent(\"onIdChange\", [oldId, newId]);\r\n\r\n\t},\r\n\texists: function(id){\r\n\t\treturn !!(this.pull[id]);\r\n\t},\r\n\r\n\t_moveInner: function(sindex, tindex){\r\n\t\tvar id = this.getIdByIndex(sindex);\r\n\r\n\t\tthis._updateOrder(function(){\r\n\t\t\tthis.$removeAt(sindex);\r\n\t\t\tthis.$insertAt(id,Math.min(this.length, tindex));\r\n\t\t});\r\n\t\t//this.visibleOrder.$removeAt(sindex);\t//remove at old position\r\n\t\t//if (sindex=0 && tindex>=0, \"DataStore::move\",\"Incorrect indexes\");\r\n\r\n\t\tvar id = this.getIdByIndex(sindex);\r\n\t\tvar obj = this.getItem(id);\r\n\t\tthis._moveInner(sindex, tindex);\r\n\r\n\t\tif (!this.isSilent()) {\r\n\t\t\t//repaint signal\r\n\t\t\tthis.callEvent(\"onStoreUpdated\", [obj.id, obj, \"move\"]);\r\n\t\t}\r\n\t},\r\n\tclearAll: function(){\r\n\t\tif(this.$destroyed){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// GS-956 We need to unselect the resource as its ID is cached\r\n\t\tthis.silent(function(){\r\n\t\t\tthis.unselect();\r\n\t\t});\r\n\t\tthis.pull = {};\r\n\t\tthis.visibleOrder = powerArray.$create();\r\n\t\tthis.fullOrder = powerArray.$create();\r\n\t\tif (this.isSilent()) return;\r\n\t\tthis.callEvent(\"onClearAll\",[]);\r\n\t\tthis.refresh();\r\n\t},\r\n\r\n\tsilent:function(code, master){\r\n\t\tvar alreadySilent = false;\r\n\t\tif(this.isSilent()) {\r\n\t\t\talreadySilent = true;\r\n\t\t}\r\n\t\tthis._skip_refresh = true;\r\n\t\tcode.call(master||this);\r\n\t\t\r\n\t\tif (!alreadySilent) {\r\n\t\t\tthis._skip_refresh = false;\r\n\t\t}\r\n\t},\r\n\tisSilent: function(){\r\n\t\treturn !!this._skip_refresh;\r\n\t},\r\n\r\n\tarraysEqual: function (arr1, arr2) {\r\n\t\tif(arr1.length !== arr2.length)\r\n\t\t\treturn false;\r\n\t\tfor(var i = 0; i < arr1.length; i++) {\r\n\t\t\tif(arr1[i] !== arr2[i])\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\trefresh: function(id, quick){\r\n\t\tif (this.isSilent()) return;\r\n\r\n\t\tvar item;\r\n\t\tif(id){\r\n\t\t\titem = this.getItem(id);\r\n\t\t}\r\n\r\n\t\tvar args;\r\n\t\tif (id){\r\n\t\t\targs = [id, item, \"paint\"];\r\n\t\t}else{\r\n\t\t\targs = [null,null,null];\r\n\t\t}\r\n\r\n\t\tif(this.callEvent(\"onBeforeStoreUpdate\", args) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar skipFilter = this._quick_refresh && !this._mark_recompute;\r\n\t\tthis._mark_recompute = false;\r\n\t\tif(id){\r\n\t\t\t// if item changes visible order (e.g. expand-collapse branch) - do a complete repaint\r\n\t\t\tif(!quick && !skipFilter){\r\n\t\t\t\tvar oldOrder = this.visibleOrder;\r\n\t\t\t\tthis.filter();\r\n\t\t\t\tif(!this.arraysEqual(oldOrder, this.visibleOrder)){\r\n\t\t\t\t\tid = undefined;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else if(!skipFilter){\r\n\t\t\tthis.filter();\r\n\t\t}\r\n\r\n\t\tif (id){\r\n\t\t\targs = [id, item, \"paint\"];\r\n\t\t}else{\r\n\t\t\targs = [null,null,null];\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onStoreUpdated\",args);\r\n\t},\r\n\r\n\tcount: function(){\r\n\t\treturn this.fullOrder.length;\r\n\t},\r\n\tcountVisible: function(){\r\n\t\treturn this.visibleOrder.length;\r\n\t},\r\n\r\n\tsort: function(sort){},\r\n\r\n\tserialize: function(){},\r\n\r\n\teachItem: function(code){\r\n\t\tfor (var i=0; i= item.$level){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\twhile (item && this.exists(pid)) {\r\n\t\t\t\titem = this.getItem(pid);\r\n\r\n\t\t\t\tif (item && item.id == parentId)\r\n\t\t\t\t\treturn true;\r\n\t\t\t\tpid = this.getParent(item);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tgetSiblings: function(id){\r\n\t\t\tif(!this.exists(id)){\r\n\t\t\t\treturn powerArray.$create();\r\n\t\t\t}\r\n\t\t\tvar parent = this.getParent(id);\r\n\t\t\treturn this.getChildren(parent);\r\n\r\n\t\t},\r\n\t\tgetNextSibling: function(id){\r\n\t\t\tvar siblings = this.getSiblings(id);\r\n\t\t\tfor(var i= 0, len = siblings.length; i < len; i++){\r\n\t\t\t\tif(siblings[i] == id){\r\n\t\t\t\t\tvar nextSibling = siblings[i+1];\r\n\t\t\t\t\tif (nextSibling === 0 && i > 0){\r\n\t\t\t\t\t\tnextSibling = \"0\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn nextSibling || null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetPrevSibling: function(id){\r\n\t\t\tvar siblings = this.getSiblings(id);\r\n\t\t\tfor(var i= 0, len = siblings.length; i < len; i++){\r\n\t\t\t\tif(siblings[i] == id){\r\n\t\t\t\t\tvar previousSibling = siblings[i-1];\r\n\t\t\t\t\tif (previousSibling === 0 && i > 0){\r\n\t\t\t\t\t\tpreviousSibling = \"0\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn previousSibling || null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetParent: function(id){\r\n\t\t\tvar item = null;\r\n\t\t\tif(id.id !== undefined){\r\n\t\t\t\titem = id;\r\n\t\t\t}else{\r\n\t\t\t\titem = this.getItem(id);\r\n\t\t\t}\r\n\r\n\t\t\tvar parent;\r\n\t\t\tif(item){\r\n\t\t\t\tparent = item[this.$parentProperty];\r\n\t\t\t}else{\r\n\t\t\t\tparent = this.$getRootId();\r\n\t\t\t}\r\n\t\t\treturn parent;\r\n\r\n\t\t},\r\n\r\n\t\tclearAll: function(){\r\n\t\t\tthis._branches = {};\r\n\t\t\tDataStore.prototype.clearAll.call(this);\r\n\t\t},\r\n\r\n\t\tcalculateItemLevel: function(item){\r\n\t\t\tvar level = 0;\r\n\t\t\tthis.eachParent(function(){\r\n\t\t\t\tlevel++;\r\n\t\t\t}, item);\r\n\t\t\treturn level;\r\n\t\t},\r\n\r\n\t\t_setParentInner: function(item, new_pid, silent){\r\n\t\t\tif(!silent){\r\n\t\t\t\tif(item.hasOwnProperty(\"$rendered_parent\")){\r\n\t\t\t\t\tthis._move_branch(item, item.$rendered_parent, new_pid);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis._move_branch(item, item[this.$parentProperty], new_pid);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetParent: function(item, new_pid, silent){\r\n\t\t\tthis._setParentInner(item, new_pid, silent);\r\n\r\n\t\t\titem[this.$parentProperty] = new_pid;\r\n\t\t},\r\n\r\n\t\t_eachItemCached: function(code, cache){\r\n\t\t\tfor(var i = 0, len = cache.length; i < len; i++){\r\n\t\t\t\tcode.call(this, cache[i]);\r\n\t\t\t}\r\n\t\t},\r\n\t\t_eachItemIterate: function(code, startId, cache){\r\n\t\t\tvar itemsStack = this.getChildren(startId);\r\n\t\t\tif(itemsStack.length){\r\n\t\t\t\titemsStack = itemsStack.slice().reverse();\r\n\t\t\t}\r\n\t\t\twhile(itemsStack.length){\r\n\t\t\t\tvar itemId = itemsStack.pop();\r\n\t\t\t\tvar item = this.getItem(itemId);\r\n\t\t\t\tcode.call(this, item);\r\n\t\t\t\tif(cache){\r\n\t\t\t\t\tcache.push(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this.hasChild(item.id)){\r\n\t\t\t\t\tvar children = this.getChildren(item.id);\r\n\t\t\t\t\tvar len = children.length;\r\n\t\t\t\t\tfor(var i = len - 1; i >= 0; i--){\r\n\t\t\t\t\t\titemsStack.push(children[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\teachItem: function(code, parent){\r\n\t\t\tvar rootId = this.$getRootId();\r\n\t\t\tif (!utils.defined(parent)) {\r\n\t\t\t\tparent = rootId;\r\n\t\t\t}\r\n\t\t\tvar startId = replaceValidZeroId(parent, rootId) || rootId;\r\n\r\n\t\t\tvar useCache = false;\r\n\t\t\tvar buildCache = false;\r\n\t\t\tvar cache = null;\r\n\t\t\tif(startId === rootId){\r\n\t\t\t\tif(this._eachItemMainRangeCache){\r\n\t\t\t\t\tuseCache = true;\r\n\t\t\t\t\tcache = this._eachItemMainRangeCache;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbuildCache = true;\r\n\t\t\t\t\tcache = this._eachItemMainRangeCache = [];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(useCache){\r\n\t\t\t\tthis._eachItemCached(code, cache);\r\n\t\t\t}else{\r\n\t\t\t\tthis._eachItemIterate(code, startId, buildCache ? cache : null);\r\n\t\t\t}\r\n\t\t},\r\n\t\teachParent: function(code, startItem) {\r\n\t\t\tvar parentsHash = {};\r\n\t\t\tvar item = startItem;\r\n\t\t\tvar parent = this.getParent(item);\r\n\r\n\t\t\twhile (this.exists(parent)) {\r\n\t\t\t\tif (parentsHash[parent]) {\r\n\t\t\t\t\tthrow new Error(\"Invalid tasks tree. Cyclic reference has been detected on task \" + parent);\r\n\t\t\t\t}\r\n\t\t\t\tparentsHash[parent] = true;\r\n\t\t\t\titem = this.getItem(parent);\r\n\t\t\t\tcode.call(this, item);\r\n\t\t\t\tparent = this.getParent(item);\r\n\t\t\t}\r\n\t\t},\r\n\t\t_add_branch: function(item, index, parent){\r\n\t\t\tvar pid = parent === undefined ? this.getParent(item) : parent;\r\n\t\t\tif (!this.hasChild(pid))\r\n\t\t\t\tthis._branches[pid] = powerArray.$create();\r\n\t\t\tvar branch = this.getChildren(pid);\r\n\t\t\tvar added_already = branch.indexOf(item.id + \"\") > -1 || branch.indexOf(+item.id) > -1;\r\n\t\t\tif(!added_already){\r\n\t\t\t\tif(index*1 == index){\r\n\r\n\t\t\t\t\tbranch.splice(index, 0, item.id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tbranch.push(item.id);\r\n\t\t\t\t}\r\n\r\n\t\t\t\titem.$rendered_parent = pid;\r\n\t\t\t}\r\n\t\t},\r\n\t\t_move_branch: function(item, old_parent, new_parent){\r\n\t\t\tthis._eachItemMainRangeCache = null;\r\n\t\t\t//this.setParent(item, new_parent);\r\n\t\t\t//this._sync_parent(task);\r\n\t\t\tthis._replace_branch_child(old_parent, item.id);\r\n\t\t\tif(this.exists(new_parent) || new_parent == this.$getRootId()){\r\n\r\n\t\t\t\tthis._add_branch(item, undefined, new_parent);\r\n\t\t\t}else{\r\n\t\t\t\tdelete this._branches[item.id];\r\n\t\t\t}\r\n\t\t\titem.$level = this.calculateItemLevel(item);\r\n\t\t\tthis.eachItem(function(child){\r\n\t\t\t\tchild.$level = this.calculateItemLevel(child);\r\n\t\t\t}, item.id);\r\n\t\t},\r\n\r\n\t\t_replace_branch_child: function(node, old_id, new_id){\r\n\t\t\tvar branch = this.getChildren(node);\r\n\t\t\tif (branch && node !== undefined){\r\n\t\t\t\tvar newbranch = powerArray.$create();\r\n\r\n\t\t\t\tlet index = branch.indexOf(old_id + \"\");\r\n\t\t\t\tif (index == -1 && !isNaN(+old_id)){\r\n\t\t\t\t\tindex = branch.indexOf(+old_id);\r\n\t\t\t\t} \r\n\r\n\t\t\t\tif (index > -1){\r\n\t\t\t\t\tif (new_id){\r\n\t\t\t\t\t\tbranch.splice(index, 1, new_id);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tbranch.splice(index, 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tnewbranch = branch;\r\n\r\n\t\t\t\tthis._branches[node] = newbranch;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tsort: function(field, desc, parent){\r\n\t\t\tif (!this.exists(parent)) {\r\n\t\t\t\tparent = this.$getRootId();\r\n\t\t\t}\r\n\r\n\t\t\tif (!field) field = \"order\";\r\n\t\t\tvar criteria = (typeof(field) == \"string\") ? (function(a, b) {\r\n\t\t\t\tif (a[field] == b[field] ||\r\n\t\t\t\t\t(helpers.isDate(a[field]) && helpers.isDate(b[field]) && a[field].valueOf() == b[field].valueOf()))\r\n\t\t\t\t{\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar result = a[field] > b[field];\r\n\t\t\t\treturn result ? 1 : -1;\r\n\t\t\t}) : field;\r\n\r\n\t\t\tif (desc) {\r\n\t\t\t\tvar original_criteria = criteria;\r\n\t\t\t\tcriteria = function (a, b) {\r\n\t\t\t\t\treturn original_criteria(b, a);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\tvar els = this.getChildren(parent);\r\n\r\n\t\t\tif (els){\r\n\t\t\t\tvar temp = [];\r\n\t\t\t\tfor (var i = els.length - 1; i >= 0; i--)\r\n\t\t\t\t\ttemp[i] = this.getItem(els[i]);\r\n\r\n\t\t\t\ttemp.sort(criteria);\r\n\r\n\t\t\t\tfor (var i = 0; i < temp.length; i++) {\r\n\t\t\t\t\tels[i] = temp[i].id;\r\n\t\t\t\t\tthis.sort(field, desc, els[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tfilter: function(rule){\r\n\t\t\tfor(let i in this.pull){\r\n\t\t\t\tconst renderedParent = this.pull[i].$rendered_parent;\r\n\t\t\t\tconst actualParent = this.getParent(this.pull[i]);\r\n\t\t\t\tif(renderedParent !== actualParent){\r\n\t\t\t\t\tthis._move_branch(this.pull[i], renderedParent, actualParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn DataStore.prototype.filter.apply(this, arguments);\r\n\t\t},\r\n\r\n\t\topen: function(id){\r\n\t\t\tif(this.exists(id)){\r\n\t\t\t\tthis.getItem(id).$open = true;\r\n\t\t\t\t// GS-2170. Do not recalculate the indexes and dates as they will be recalculated later\r\n\t\t\t\tthis._skipTaskRecalculation = true;\r\n\t\t\t\tthis.callEvent(\"onItemOpen\", [id]);\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tclose: function(id){\r\n\t\t\tif(this.exists(id)){\r\n\t\t\t\tthis.getItem(id).$open = false;\r\n\t\t\t\t// GS-2170. Do not recalculate the indexes and dates as they will be recalculated later\r\n\t\t\t\tthis._skipTaskRecalculation = true;\r\n\t\t\t\tthis.callEvent(\"onItemClose\", [id]);\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tdestructor: function(){\r\n\t\t\tDataStore.prototype.destructor.call(this);\r\n\t\t\tthis._branches = null;\r\n\t\t\tthis._indexRangeCache = {};\r\n\t\t\tthis._eachItemMainRangeCache = null;\r\n\t\t}\r\n\t},\r\n\tDataStore.prototype\r\n);\r\n\r\nexport default TreeDataStore;","import env from \"./env\";\r\n\r\nexport default function(gantt){\r\n\treturn env.isNode || !gantt.$root;\r\n};","import isHeadless from \"../../utils/is_headless\";\r\n\r\nconst storeRenderCreator = function(name, gantt){\r\n\r\n\tconst store = gantt.getDatastore(name);\r\n\r\n\tconst itemRepainter = {\r\n\t\trenderItem: function(id, renderer){\r\n\r\n\t\t\tconst renders = renderer.getLayers();\r\n\r\n\t\t\tconst item = store.getItem(id);\r\n\t\t\tif(item && store.isVisible(id)) {\r\n\t\t\t\tfor (let i = 0; i < renders.length; i++)\r\n\t\t\t\t\trenders[i].render_item(item);\r\n\t\t\t}\r\n\t\t},\r\n\t\trenderItems: function(renderer){\r\n\t\t\tconst renderers = renderer.getLayers();\r\n\t\t\tfor (let i = 0; i < renderers.length; i++) {\r\n\t\t\t\trenderers[i].clear();\r\n\t\t\t}\r\n\r\n\t\t\tlet allData = null;\r\n\r\n\t\t\tconst loadedRanges = {};\r\n\t\t\tfor (let i = 0; i < renderers.length; i++) {\r\n\t\t\t\tconst layer = renderers[i];\r\n\t\t\t\tlet layerData;\r\n\t\t\t\tif(layer.get_visible_range){\r\n\r\n\t\t\t\t\tvar range = layer.get_visible_range(store);\r\n\t\t\t\t\tif(range.start !== undefined && range.end !== undefined){\r\n\t\t\t\t\t\tvar key = range.start + \" - \" + range.end;\r\n\t\t\t\t\t\tif(loadedRanges[key]){\r\n\t\t\t\t\t\t\tlayerData = loadedRanges[key];\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tlayerData = store.getIndexRange(range.start, range.end);\r\n\t\t\t\t\t\t\tloadedRanges[key] = layerData;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else if(range.ids !== undefined){\r\n\t\t\t\t\t\tlayerData = range.ids.map(function(id){\r\n\t\t\t\t\t\t\treturn store.getItem(id);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tthrow new Error(\"Invalid range returned from 'getVisibleRange' of the layer\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(!allData){\r\n\t\t\t\t\t\tallData = store.getVisibleItems();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlayerData = allData;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (layer.prepare_data) {\r\n\t\t\t\t\t// GS-1605. Highlight timeline cells below tasks and in an empty chart\r\n\t\t\t\t\tlayer.prepare_data(layerData);\r\n\t\t\t\t}\r\n\r\n\t\t\t\trenderers[i].render_items(layerData);\r\n\t\t\t}\r\n\t\t},\r\n\t\tupdateItems: function(layer) {\r\n\t\t\tif(layer.update_items){\r\n\t\t\t\tlet data = [];\r\n\t\t\t\tif(layer.get_visible_range){\r\n\r\n\t\t\t\t\tvar range = layer.get_visible_range(store);\r\n\t\t\t\t\tif(range.start !== undefined && range.end !== undefined){\r\n\t\t\t\t\t\tdata = store.getIndexRange(range.start, range.end);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(range.ids !== undefined){\r\n\t\t\t\t\t\tlet extraDataArr = range.ids.map(function(id){\r\n\t\t\t\t\t\t\treturn store.getItem(id);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\t// GS-2502: range.ids might not exist in other datastores\r\n\t\t\t\t\t\tif(extraDataArr.length > 0){\r\n\t\t\t\t\t\t\textraDataArr = extraDataArr.filter(element => element !== undefined);\r\n\t\t\t\t\t\t\tdata = data.concat(extraDataArr);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif((range.start == undefined || range.end == undefined) && range.ids == undefined) {\r\n\t\t\t\t\t\tthrow new Error(\"Invalid range returned from 'getVisibleRange' of the layer\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdata = store.getVisibleItems();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (layer.prepare_data) {\r\n\t\t\t\t\t// GS-1605. Highlight timeline cells below tasks and in an empty chart\r\n\t\t\t\t\tlayer.prepare_data(data, layer);\r\n\t\t\t\t}\r\n\t\t\t\tlayer.update_items(data);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tstore.attachEvent(\"onStoreUpdated\", function(id, item, action){\r\n\t\tif(isHeadless(gantt)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tconst renderer = gantt.$services.getService(\"layers\").getDataRender(name);\r\n\t\tif(renderer){\r\n\t\t\trenderer.onUpdateRequest = function(layer){\r\n\t\t\t\titemRepainter.updateItems(layer);\r\n\t\t\t};\r\n\t\t}\r\n\t});\r\n\r\n\tfunction skipRepaint(gantt){\r\n\t\tconst state = gantt.$services.getService(\"state\");\r\n\t\tif(state.getState(\"batchUpdate\").batch_update){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tstore.attachEvent(\"onStoreUpdated\", function(id, item, action){\r\n\t\tif(skipRepaint(gantt)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(!id || action == \"move\" || action == \"delete\"){\r\n\t\t\tstore.callEvent(\"onBeforeRefreshAll\", []);\r\n\t\t\tstore.callEvent(\"onAfterRefreshAll\", []);\r\n\t\t}else{\r\n\t\t\tstore.callEvent(\"onBeforeRefreshItem\", [item.id]);\r\n\t\t\tstore.callEvent(\"onAfterRefreshItem\", [item.id]);\r\n\t\t}\r\n\t});\r\n\r\n\tstore.attachEvent(\"onAfterRefreshAll\", function(){\r\n\t\tif(isHeadless(gantt)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tconst renderer = gantt.$services.getService(\"layers\").getDataRender(name);\r\n\t\tif(renderer && !skipRepaint(gantt)){\r\n\t\t\titemRepainter.renderItems(renderer);\r\n\t\t}\r\n\t});\r\n\tstore.attachEvent(\"onAfterRefreshItem\", function(id){\r\n\t\tif(isHeadless(gantt)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tconst renderer = gantt.$services.getService(\"layers\").getDataRender(name);\r\n\t\tif(renderer){\r\n\t\t\titemRepainter.renderItem(id, renderer);\r\n\t\t}\r\n\t});\r\n\r\n\t// TODO: probably can be done more in a more efficient way\r\n\tstore.attachEvent(\"onItemOpen\", function(){\r\n\t\tif(isHeadless(gantt)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tgantt.render();\r\n\t});\r\n\r\n\tstore.attachEvent(\"onItemClose\", function(){\r\n\t\tif(isHeadless(gantt)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tgantt.render();\r\n\t});\r\n\r\n\tfunction refreshId(renders, oldId, newId, item) {\r\n\t\tfor (let i = 0; i < renders.length; i++) {\r\n\t\t\trenders[i].change_id(oldId, newId);\r\n\t\t}\r\n\t}\r\n\r\n\tstore.attachEvent(\"onIdChange\", function(oldId, newId){\r\n\t\tif(isHeadless(gantt)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// in case of linked datastores (tasks <-> links), id change should recalculate something in linked datastore before any repaint\r\n\t\t// use onBeforeIdChange for this hook.\r\n\t\t// TODO: use something more reasonable instead\r\n\t\tstore.callEvent(\"onBeforeIdChange\", [oldId, newId]);\r\n\r\n\t\tif(skipRepaint(gantt)){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(!store.isSilent()){\r\n\t\t\tconst renderer = gantt.$services.getService(\"layers\").getDataRender(name);\r\n\t\t\tif(renderer){ // missing check for renderer GS-1814\r\n\t\t\t\trefreshId(renderer.getLayers(), oldId, newId, store.getItem(newId));\r\n\t\t\t\titemRepainter.renderItem(newId, renderer);\r\n\t\t\t}else{\r\n\t\t\t\t// GS-1814 repaint ui to apply new id when the datastore don't have own renderer\r\n\t\t\t\tgantt.render();\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n};\r\n\r\nexport default {\r\n\tbindDataStore: storeRenderCreator\r\n};","import * as utils from \"../../utils/utils\";\r\nimport createTasksFacade from \"./datastore_tasks\";\r\nimport createLinksFacade from \"./datastore_links\";\r\nimport DataStore from \"../datastore/datastore\";\r\nimport TreeDataStore from \"../datastore/treedatastore\";\r\nimport createDatastoreSelect from \"../datastore/select\";\r\nimport datastoreRender from \"../datastore/datastore_render\";\r\nimport isHeadless from \"../../utils/is_headless\";\r\nimport {replaceValidZeroId} from \"../../utils/helpers\";\r\n\r\nfunction getDatastores(){\r\n\tvar storeNames = this.$services.getService(\"datastores\");\r\n\tvar res = [];\r\n\tfor(var i = 0; i < storeNames.length; i++){\r\n\t\tvar store = this.getDatastore(storeNames[i]);\r\n\t\tif(!store.$destroyed){\r\n\t\t\tres.push(store);\r\n\t\t}\r\n\t}\r\n\treturn res;\r\n}\r\n\r\nvar createDatastoreFacade = function(){\r\n\treturn {\r\n\tcreateDatastore: function(config){\r\n\r\n\t\tvar $StoreType = (config.type || \"\").toLowerCase() == \"treedatastore\" ? TreeDataStore : DataStore;\r\n\r\n\t\tif (config) {\r\n\t\t\tvar self = this;\r\n\t\t\tconfig.openInitially = function(){ return self.config.open_tree_initially; };\r\n\t\t\tconfig.copyOnParse = function(){ return self.config.deepcopy_on_parse; };\r\n\t\t}\r\n\r\n\t\tvar store = new $StoreType(config);\r\n\t\tthis.mixin(store, createDatastoreSelect(store));\r\n\r\n\t\tif (config.name) {\r\n\t\t\tvar servicePrefix = \"datastore:\";\r\n\t\t\tvar storeAccessName = servicePrefix + config.name;\r\n\r\n\t\t\tstore.attachEvent(\"onDestroy\", function(){\r\n\t\t\t\tthis.$services.dropService(storeAccessName);\r\n\t\t\t\tvar storeList = this.$services.getService(\"datastores\");\r\n\t\t\t\tfor(var i = 0; i < storeList.length; i++){\r\n\t\t\t\t\tif(storeList[i] === config.name){\r\n\t\t\t\t\t\tstoreList.splice(i, 1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}.bind(this));\r\n\r\n\t\t\tthis.$services.dropService(storeAccessName);\r\n\t\t\tthis.$services.setService(storeAccessName, function() { return store; } );\r\n\r\n\t\t\tvar storeList = this.$services.getService(\"datastores\");\r\n\t\t\tif (!storeList) {\r\n\t\t\t\tstoreList = [];\r\n\t\t\t\tthis.$services.setService(\"datastores\", function() { return storeList; });\r\n\t\t\t\tstoreList.push(config.name);\r\n\t\t\t} else if (storeList.indexOf(config.name) < 0) {\r\n\t\t\t\tstoreList.push(config.name);\r\n\t\t\t}\r\n\r\n\t\t\tdatastoreRender.bindDataStore(config.name, this);\r\n\r\n\t\t}\r\n\r\n\t\treturn store;\r\n\t},\r\n\tgetDatastore: function(name){\r\n\t\treturn this.$services.getService(\"datastore:\" + name);\r\n\t},\r\n\t_getDatastores: getDatastores,\r\n\r\n\trefreshData: function () {\r\n\t\tvar scrollState;\r\n\t\tif(!isHeadless(this)){\r\n\t\t\tscrollState = this.getScrollState();\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onBeforeDataRender\", []);\r\n\r\n\t\tvar stores = getDatastores.call(this);\r\n\t\tfor(var i = 0; i < stores.length; i++){\r\n\t\t\tstores[i].refresh();\r\n\t\t}\r\n\r\n\t\tif(this.config.preserve_scroll && !isHeadless(this) && (scrollState.x || scrollState.y)){\r\n\t\t\tthis.scrollTo(scrollState.x, scrollState.y);\r\n\t\t}\r\n\t\tthis.callEvent(\"onDataRender\", []);\r\n\r\n\t},\r\n\r\n\tisChildOf: function(childId, parentId){\r\n\t\treturn this.$data.tasksStore.isChildOf(childId, parentId);\r\n\t},\r\n\r\n\trefreshTask: function (taskId, refresh_links) {\r\n\t\tvar task = this.getTask(taskId);\r\n\t\tvar self = this;\r\n\t\tfunction refreshLinks(){\r\n\t\t\tif (refresh_links !== undefined && !refresh_links)\r\n\t\t\t\treturn;\r\n\t\t\tfor (var i = 0; i < task.$source.length; i++) {\r\n\t\t\t\tself.refreshLink(task.$source[i]);\r\n\t\t\t}\r\n\t\t\tfor (var i = 0; i < task.$target.length; i++) {\r\n\t\t\t\tself.refreshLink(task.$target[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (task && this.isTaskVisible(taskId)) {\r\n\t\t\tthis.$data.tasksStore.refresh(taskId, !!this.getState(\"tasksDnd\").drag_id || refresh_links === false);// do quick refresh during drag and drop\r\n\t\t\trefreshLinks();\r\n\t\t}else if(this.isTaskExists(taskId) && this.isTaskExists(this.getParent(taskId)) && !this._bulk_dnd){\r\n\t\t\tthis.refreshTask(this.getParent(taskId));\r\n\r\n\t\t\tvar hasSplitParent = false;\r\n\t\t\tthis.eachParent(function(parent){\r\n\t\t\t\tif(hasSplitParent || this.isSplitTask(parent)){\r\n\t\t\t\t\thasSplitParent = true;\r\n\t\t\t\t}\r\n\t\t\t}, taskId);\r\n\t\t\tif(hasSplitParent){\r\n\t\t\t\trefreshLinks();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t},\r\n\trefreshLink: function (linkId) {\r\n\t\tthis.$data.linksStore.refresh(linkId, !!this.getState(\"tasksDnd\").drag_id);// do quick refresh during drag and drop\r\n\t},\r\n\r\n\tsilent: function(code){\r\n\t\tvar gantt = this;\r\n\t\tgantt.$data.tasksStore.silent(function(){\r\n\t\t\tgantt.$data.linksStore.silent(function(){\r\n\t\t\t\tcode();\r\n\t\t\t});\r\n\t\t});\r\n\t},\r\n\r\n\tclearAll: function () {\r\n\t\tvar stores = getDatastores.call(this);\r\n\t\t\r\n\t\t// clear all stores without invoking clearAll event\r\n\t\t// in order to prevent calling handlers when only some stores are cleared\r\n\t\tfor(var i = 0; i < stores.length; i++){\r\n\t\t\tstores[i].silent(function(){\r\n\t\t\t\tstores[i].clearAll();\t\r\n\t\t\t});\r\n\t\t}\r\n\t\t// run clearAll again to invoke events\r\n\t\tfor(var i = 0; i < stores.length; i++){\r\n\t\t\tstores[i].clearAll();\t\r\n\t\t}\r\n\r\n\t\tthis._update_flags();\r\n\t\tthis.userdata = {};\r\n\t\tthis.callEvent(\"onClear\", []);\r\n\t\tthis.render();\r\n\t},\r\n\t_clear_data: function () {\r\n\t\tthis.$data.tasksStore.clearAll();\r\n\t\tthis.$data.linksStore.clearAll();\r\n\t\tthis._update_flags();\r\n\t\tthis.userdata = {};\r\n\t},\r\n\r\n\tselectTask: function(id){\r\n\t\tvar store = this.$data.tasksStore;\r\n\t\tif(!this.config.select_task)\r\n\t\t\treturn false;\r\n\t\tid = replaceValidZeroId(id, this.config.root_id);\r\n\t\tif (id){\r\n\t\t\tlet oldSelectId = this.getSelectedId();\r\n\t\t\t// Don't repaint the resource panel as the data didn't change\r\n\t\t\tstore._skipResourceRepaint = true;\r\n\t\t\tstore.select(id);\r\n\t\t\tstore._skipResourceRepaint = false;\r\n\t\t\t// GS-730. Split task is not included in the tree, \r\n\t\t\t// so the datastore renderer will think that the task is not visible\r\n\t\t\tif (oldSelectId && store.pull[oldSelectId].$split_subtask && oldSelectId != id) {\r\n\t\t\t\tthis.refreshTask(oldSelectId);\r\n\t\t\t}\r\n\t\t\tif (store.pull[id].$split_subtask && oldSelectId != id) {// GS-1850. Do not repaint split task after double click\r\n\t\t\t\tthis.refreshTask(id);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn store.getSelectedId();\r\n\t},\r\n\tunselectTask: function(id){\r\n\t\tvar store = this.$data.tasksStore;\r\n\t\tstore.unselect(id);\r\n\t\t// GS-730. Split task is not included in the tree, \r\n\t\t// so the datastore renderer will think that the task is not visible\r\n\t\tif (id && store.pull[id].$split_subtask) {\r\n\t\t\tthis.refreshTask(id);\r\n\t\t}\r\n\t},\r\n\tisSelectedTask: function(id){\r\n\t\treturn this.$data.tasksStore.isSelected(id);\r\n\t},\r\n\tgetSelectedId: function() {\r\n\t\treturn this.$data.tasksStore.getSelectedId();\r\n\t}\r\n};\r\n};\r\n\r\nfunction createFacade(){\r\n\tvar res = utils.mixin({}, createDatastoreFacade());\r\n\tutils.mixin(res, createTasksFacade());\r\n\tutils.mixin(res, createLinksFacade());\r\n\treturn res;\r\n}\r\n\r\n\r\n\r\n\r\nexport default {create: createFacade};","function createDataStoreSelectMixin(store){\r\n\tvar selectedId = null;\r\n\r\n\tvar deleteItem = store._removeItemInner;\r\n\t\r\n\tfunction unselect(id){\r\n\t\tselectedId = null;\r\n\t\tthis.callEvent(\"onAfterUnselect\", [id]);\r\n\t}\r\n\r\n\tstore._removeItemInner = function(id){\r\n\t\tif(selectedId == id){\r\n\t\t\tunselect.call(this, id);\r\n\t\t}\r\n\r\n\t\tif(selectedId && this.eachItem){\r\n\t\t\tthis.eachItem(function(subItem){\r\n\t\t\t\tif(subItem.id == selectedId){\r\n\t\t\t\t\tunselect.call(this, subItem.id);\r\n\t\t\t\t}\r\n\t\t\t}, id);\r\n\t\t}\r\n\r\n\t\treturn deleteItem.apply(this, arguments);\r\n\t};\r\n\r\n\tstore.attachEvent(\"onIdChange\", function(oldId, newId) {\r\n\t\tif (store.getSelectedId() == oldId) {\r\n\t\t\tstore.silent(function () {\r\n\t\t\t\tstore.unselect(oldId);\r\n\t\t\t\tstore.select(newId);\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\r\n\treturn {\r\n\t\tselect: function(id){\r\n\t\t\tif (id){\r\n\r\n\t\t\t\tif(selectedId == id)\r\n\t\t\t\t\treturn selectedId;\r\n\r\n\t\t\t\tif(!this._skip_refresh) {\r\n\t\t\t\t\tif (!this.callEvent(\"onBeforeSelect\", [id])) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.unselect();\r\n\r\n\t\t\t\tselectedId = id;\r\n\r\n\t\t\t\tif(!this._skip_refresh) {\r\n\t\t\t\t\tthis.refresh(id);\r\n\t\t\t\t\tthis.callEvent(\"onAfterSelect\", [id]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn selectedId;\r\n\t\t},\r\n\t\tgetSelectedId: function(){\r\n\t\t\treturn selectedId;\r\n\t\t},\r\n\t\tisSelected: function(id){\r\n\t\t\treturn id == selectedId;\r\n\t\t},\r\n\t\tunselect: function(id){\r\n\t\t\tvar id = id || selectedId;\r\n\t\t\tif(!id)\r\n\t\t\t\treturn;\r\n\t\t\tselectedId = null;\r\n\t\t\tif(!this._skip_refresh){\r\n\t\t\t\tthis.refresh(id);\r\n\t\t\t\tunselect.call(this, id);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default createDataStoreSelectMixin;","import * as utils from \"../../utils/utils\";\r\n\r\n\r\nvar createLinksStoreFacade = function(){\r\n\treturn {\r\n\tgetLinkCount: function () {\r\n\t\treturn this.$data.linksStore.count();\r\n\t},\r\n\r\n\tgetLink : function (id) {\r\n\t\treturn this.$data.linksStore.getItem(id);\r\n\t},\r\n\r\n\tgetLinks : function () {\r\n\t\treturn this.$data.linksStore.getItems();\r\n\t},\r\n\r\n\tisLinkExists : function (id) {\r\n\t\treturn this.$data.linksStore.exists(id);\r\n\t},\r\n\r\n\taddLink : function (link) {\r\n\t\tconst newLink = this.$data.linksStore.addItem(link);\r\n\t\t// GS-1222. Update fullOrder otherwise the link won't appear after render\r\n\t\tif (this.$data.linksStore.isSilent()){\r\n\t\t\tthis.$data.linksStore.fullOrder.push(newLink);\r\n\t\t}\r\n\t\treturn newLink;\r\n\t},\r\n\r\n\tupdateLink : function (id, data) {\r\n\t\tif (!utils.defined(data))\r\n\t\t\tdata = this.getLink(id);\r\n\t\tthis.$data.linksStore.updateItem(id, data);\r\n\t},\r\n\r\n\tdeleteLink : function (id) {\r\n\t\treturn this.$data.linksStore.removeItem(id);\r\n\t},\r\n\r\n\tchangeLinkId : function (oldid, newid) {\r\n\t\treturn this.$data.linksStore.changeId(oldid, newid);\r\n\t}\r\n};\r\n};\r\n\r\nexport default createLinksStoreFacade;","import * as utils from \"../../../utils/utils\";\r\n\r\nfunction ScaleHelper(gantt){\r\n\tvar dateHelper = gantt.date;\r\n\tvar services = gantt.$services;\r\n\r\n\treturn {\r\n\t\tgetSum: function (sizes, from, to) {\r\n\t\t\tif (to === undefined)\r\n\t\t\t\tto = sizes.length - 1;\r\n\t\t\tif (from === undefined)\r\n\t\t\t\tfrom = 0;\r\n\r\n\t\t\tvar summ = 0;\r\n\t\t\tfor (var i = from; i <= to; i++)\r\n\t\t\t\tsumm += sizes[i];\r\n\r\n\t\t\treturn summ;\r\n\t\t},\r\n\t\tsetSumWidth: function (sum_width, scale, from, to) {\r\n\t\t\tvar parts = scale.width;\r\n\r\n\t\t\tif (to === undefined)\r\n\t\t\t\tto = parts.length - 1;\r\n\t\t\tif (from === undefined)\r\n\t\t\t\tfrom = 0;\r\n\t\t\tvar length = to - from + 1;\r\n\r\n\t\t\tif (from > parts.length - 1 || length <= 0 || to > parts.length - 1)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar oldWidth = this.getSum(parts, from, to);\r\n\r\n\t\t\tvar diff = sum_width - oldWidth;\r\n\r\n\t\t\tthis.adjustSize(diff, parts, from, to);\r\n\t\t\tthis.adjustSize(-diff, parts, to + 1);\r\n\r\n\t\t\tscale.full_width = this.getSum(parts);\r\n\t\t},\r\n\t\tsplitSize: function (width, count) {\r\n\t\t\tvar arr = [];\r\n\t\t\tfor (var i = 0; i < count; i++) arr[i] = 0;\r\n\r\n\t\t\tthis.adjustSize(width, arr);\r\n\t\t\treturn arr;\r\n\r\n\t\t},\r\n\t\tadjustSize: function (width, parts, from, to) {\r\n\t\t\tif (!from)\r\n\t\t\t\tfrom = 0;\r\n\t\t\tif (to === undefined)\r\n\t\t\t\tto = parts.length - 1;\r\n\r\n\t\t\tvar length = to - from + 1;\r\n\r\n\t\t\tvar full = this.getSum(parts, from, to);\r\n\r\n\t\t\tfor (var i = from; i <= to; i++) {\r\n\t\t\t\tvar share = Math.floor(width * (full ? (parts[i] / full) : (1 / length)));\r\n\r\n\t\t\t\tfull -= parts[i];\r\n\t\t\t\twidth -= share;\r\n\t\t\t\tlength--;\r\n\r\n\t\t\t\tparts[i] += share;\r\n\t\t\t}\r\n\t\t\tparts[parts.length - 1] += width;\r\n\t\t},\r\n\t\tsortScales: function (scales) {\r\n\t\t\tfunction cellSize(unit, step) {\r\n\t\t\t\tvar d = new Date(1970, 0, 1);\r\n\t\t\t\treturn dateHelper.add(d, step, unit) - d;\r\n\t\t\t}\r\n\r\n\t\t\tscales.sort(function (a, b) {\r\n\t\t\t\tif (cellSize(a.unit, a.step) < cellSize(b.unit, b.step)) {\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} else if (cellSize(a.unit, a.step) > cellSize(b.unit, b.step)) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfor (var i = 0; i < scales.length; i++) {\r\n\t\t\t\tscales[i].index = i;\r\n\t\t\t}\r\n\t\t},\r\n\t\t_isLegacyMode: function(config){\r\n\t\t\tvar scaleConfig = config || gantt.config;\r\n\t\t\treturn scaleConfig.scale_unit || scaleConfig.date_scale || scaleConfig.subscales;\r\n\t\t},\r\n\t\t_prepareScaleObject: function(scale){\r\n\t\t\tvar format = scale.format;\r\n\t\t\tif(!format){\r\n\t\t\t\tformat = scale.template || scale.date || \"%d %M\";\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof format === \"string\"){\r\n\t\t\t\tformat = gantt.date.date_to_str(format);\r\n\t\t\t}\r\n\t\t\treturn {\r\n\t\t\t\tunit: scale.unit || \"day\",\r\n\t\t\t\tstep: scale.step || 1,\r\n\t\t\t\tformat: format,\r\n\t\t\t\tcss: scale.css\r\n\t\t\t};\r\n\t\t},\r\n\t\tprimaryScale: function(config) {\r\n\t\t\tvar templates = services.getService(\"templateLoader\");\r\n\t\t\tvar legacyMode = this._isLegacyMode(config);\r\n\r\n\t\t\tvar scaleConfig = config || gantt.config;\r\n\r\n\t\t\tvar result;\r\n\t\t\tif(legacyMode){\r\n\t\t\t\ttemplates.initTemplate(\"date_scale\", undefined, undefined, scaleConfig, gantt.config.templates);\r\n\t\t\t\tresult = {\r\n\t\t\t\t\tunit: gantt.config.scale_unit,\r\n\t\t\t\t\tstep: gantt.config.step,\r\n\t\t\t\t\ttemplate: gantt.templates.date_scale,\r\n\t\t\t\t\tdate: gantt.config.date_scale,\r\n\t\t\t\t\tcss: gantt.templates.scale_cell_class\r\n\t\t\t\t};\r\n\t\t\t}else{\r\n\t\t\t\tvar primaryScale = scaleConfig.scales[0];\r\n\t\t\t\tresult = {\r\n\t\t\t\t\tunit: primaryScale.unit,\r\n\t\t\t\t\tstep: primaryScale.step,\r\n\t\t\t\t\ttemplate: primaryScale.template,\r\n\t\t\t\t\tformat: primaryScale.format,\r\n\t\t\t\t\tdate: primaryScale.date,\r\n\t\t\t\t\tcss: primaryScale.css || gantt.templates.scale_cell_class\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\treturn this._prepareScaleObject(result);\r\n\t\t},\r\n\t\tgetSubScales: function(config) {\r\n\t\t\tvar legacyMode = this._isLegacyMode(config);\r\n\t\t\tvar scaleConfig = config || gantt.config;\r\n\t\t\tvar scales;\r\n\t\t\tif(legacyMode){\r\n\t\t\t\tlet docLink = \"https://docs.dhtmlx.com/gantt/migrating.html#:~:text=%3D%20false%3B-,Time%20scale%20settings,-Configuration%20of%20time\";\r\n\t\t\t\tif (gantt.env.isFF){\r\n\t\t\t\t\tdocLink = \"https://docs.dhtmlx.com/gantt/migrating.html#6162\";\r\n\t\t\t\t}\r\n\t\t\t\t// eslint-disable-next-line no-console\r\n\t\t\t\tconsole.warn(`You are using the obsolete scale configuration.\r\nIt will stop working in the future versions.\r\nPlease migrate the configuration to the newer version:\r\n${docLink}`);\r\n\t\t\t\tscales = scaleConfig.subscales || [];\r\n\t\t\t}else{\r\n\t\t\t\tscales = scaleConfig.scales.slice(1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn scales.map(function(scale){\r\n\t\t\t\treturn this._prepareScaleObject(scale);\r\n\t\t\t}.bind(this));\r\n\t\t},\r\n\r\n\t\tprepareConfigs: function (scales, min_coll_width, container_width, scale_height, minDate, maxDate, rtl) {\r\n\t\t\tvar heights = this.splitSize(scale_height, scales.length);\r\n\t\t\tvar full_width = container_width;\r\n\r\n\t\t\tvar configs = [];\r\n\t\t\tfor (var i = scales.length - 1; i >= 0; i--) {\r\n\t\t\t\tvar main_scale = (i == scales.length - 1);\r\n\t\t\t\tvar cfg = this.initScaleConfig(scales[i], minDate, maxDate);\r\n\t\t\t\tif (main_scale) {\r\n\t\t\t\t\tthis.processIgnores(cfg);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.initColSizes(cfg, min_coll_width, full_width, heights[i]);\r\n\t\t\t\tthis.limitVisibleRange(cfg);\r\n\r\n\t\t\t\tif (main_scale) {\r\n\t\t\t\t\tfull_width = cfg.full_width;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfigs.unshift(cfg);\r\n\t\t\t}\r\n\r\n\r\n\t\t\tfor (var i = 0; i < configs.length - 1; i++) {\r\n\t\t\t\tthis.alineScaleColumns(configs[configs.length - 1], configs[i]);\r\n\t\t\t}\r\n\t\t\tfor (var i = 0; i < configs.length; i++) {\r\n\r\n\t\t\t\tif(rtl){\r\n\t\t\t\t\tthis.reverseScale(configs[i]);\r\n\t\t\t\t}\r\n\t\t\t\tthis.setPosSettings(configs[i]);\r\n\t\t\t}\r\n\t\t\treturn configs;\r\n\r\n\t\t},\r\n\r\n\t\treverseScale: function(scale){\r\n\t\t\tscale.width = scale.width.reverse();\r\n\t\t\tscale.trace_x = scale.trace_x.reverse();\r\n\r\n\t\t\tvar indexes = scale.trace_indexes;\r\n\t\t\tscale.trace_indexes = {};\r\n\t\t\tscale.trace_index_transition = {};\r\n\t\t\tscale.rtl = true;\r\n\t\t\tfor(var i = 0; i < scale.trace_x.length; i++){\r\n\t\t\t\tscale.trace_indexes[scale.trace_x[i].valueOf()] = i;\r\n\t\t\t\tscale.trace_index_transition[indexes[scale.trace_x[i].valueOf()]] = i;\r\n\t\t\t}\r\n\t\t\treturn scale;\r\n\t\t},\r\n\r\n\t\tsetPosSettings: function (config) {\r\n\t\t\tfor (var i = 0, len = config.trace_x.length; i < len; i++) {\r\n\t\t\t\tconfig.left.push((config.width[i - 1] || 0) + (config.left[i - 1] || 0));\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_ignore_time_config: function (date, scale) {\r\n\r\n\t\t\tif (gantt.config.skip_off_time) {\r\n\t\t\t\tvar skip = true;\r\n\t\t\t\tvar probe = date;\r\n\r\n\t\t\t\t// check dates in case custom scale unit, e.g. {unit: \"month\", step: 3}\r\n\t\t\t\tfor (var i = 0; i < scale.step; i++) {\r\n\t\t\t\t\tif (i) {\r\n\t\t\t\t\t\tprobe = dateHelper.add(date, i, scale.unit);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tskip = skip && !this.isWorkTime(probe, scale.unit);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn skip;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\t\t//defined in an extension\r\n\t\tprocessIgnores: function (config) {\r\n\t\t\tconfig.ignore_x = {};\r\n\t\t\tconfig.display_count = config.count;\r\n\t\t},\r\n\t\tinitColSizes: function (config, min_col_width, full_width, line_height) {\r\n\t\t\tvar cont_width = full_width;\r\n\r\n\t\t\tconfig.height = line_height;\r\n\r\n\t\t\tvar column_count = config.display_count === undefined ? config.count : config.display_count;\r\n\r\n\t\t\tif (!column_count)\r\n\t\t\t\tcolumn_count = 1;\r\n\r\n\t\t\tconfig.col_width = Math.floor(cont_width / column_count);\r\n\r\n\t\t\tif (min_col_width) {\r\n\t\t\t\tif (config.col_width < min_col_width) {\r\n\t\t\t\t\tconfig.col_width = min_col_width;\r\n\t\t\t\t\tcont_width = config.col_width * column_count;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tconfig.width = [];\r\n\t\t\tvar ignores = config.ignore_x || {};\r\n\t\t\tfor (var i = 0; i < config.trace_x.length; i++) {\r\n\t\t\t\tif (ignores[config.trace_x[i].valueOf()] || (config.display_count == config.count)) {\r\n\t\t\t\t\tconfig.width[i] = 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// width of month columns should be proportional month duration\r\n\t\t\t\t\tvar width = 1;\r\n\t\t\t\t\tif (config.unit == \"month\") {\r\n\t\t\t\t\t\tvar days = Math.round((dateHelper.add(config.trace_x[i], config.step, config.unit) - config.trace_x[i]) / (1000 * 60 * 60 * 24));\r\n\t\t\t\t\t\twidth = days;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconfig.width[i] = width;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.adjustSize(cont_width - this.getSum(config.width)/* 1 width per column from the code above */, config.width);\r\n\t\t\tconfig.full_width = this.getSum(config.width);\r\n\t\t},\r\n\t\tinitScaleConfig: function (config, min_date, max_date) {\r\n\t\t\tvar cfg = utils.mixin({\r\n\t\t\t\tcount: 0,\r\n\t\t\t\tcol_width: 0,\r\n\t\t\t\tfull_width: 0,\r\n\t\t\t\theight: 0,\r\n\t\t\t\twidth: [],\r\n\t\t\t\tleft: [],\r\n\t\t\t\ttrace_x: [],\r\n\t\t\t\ttrace_indexes: {},\r\n\t\t\t\tmin_date: new Date(min_date),\r\n\t\t\t\tmax_date: new Date(max_date)\r\n\t\t\t}, config);\r\n\r\n\t\t\tthis.eachColumn(config.unit, config.step, min_date, max_date, function (date) {\r\n\t\t\t\tcfg.count++;\r\n\t\t\t\tcfg.trace_x.push(new Date(date));\r\n\t\t\t\tcfg.trace_indexes[date.valueOf()] = cfg.trace_x.length - 1;\r\n\t\t\t});\r\n\r\n\t\t\tcfg.trace_x_ascending = cfg.trace_x.slice();\r\n\t\t\treturn cfg;\r\n\t\t},\r\n\t\titerateScales: function (lower_scale, upper_scale, from, to, callback) {\r\n\t\t\tvar upper_dates = upper_scale.trace_x;\r\n\t\t\tvar lower_dates = lower_scale.trace_x;\r\n\r\n\t\t\tvar prev = from || 0;\r\n\t\t\tvar end = to || (lower_dates.length - 1);\r\n\t\t\tvar prevUpper = 0;\r\n\r\n\r\n\t\t\tfor (var up = 1; up < upper_dates.length; up++) {\r\n\t\t\t\tvar target_index = (lower_scale.trace_indexes[+upper_dates[up]]);\r\n\t\t\t\tif (target_index !== undefined && target_index <= end) {\r\n\t\t\t\t\tif (callback) {\r\n\t\t\t\t\t\tcallback.apply(this, [prevUpper, up, prev, target_index]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tprev = target_index;\r\n\t\t\t\t\tprevUpper = up;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\talineScaleColumns: function (lower_scale, upper_scale, from, to) {\r\n\t\t\tthis.iterateScales(lower_scale, upper_scale, from, to, function (upper_start, upper_end, lower_start, lower_end) {\r\n\t\t\t\tvar targetWidth = this.getSum(lower_scale.width, lower_start, lower_end - 1);\r\n\t\t\t\tvar actualWidth = this.getSum(upper_scale.width, upper_start, upper_end - 1);\r\n\t\t\t\tif (actualWidth != targetWidth) {\r\n\t\t\t\t\tthis.setSumWidth(targetWidth, upper_scale, upper_start, upper_end - 1);\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\teachColumn: function (unit, step, min_date, max_date, callback) {\r\n\t\t\tvar start = new Date(min_date),\r\n\t\t\t\tend = new Date(max_date);\r\n\t\t\tif (dateHelper[unit + \"_start\"]) {\r\n\t\t\t\tstart = dateHelper[unit + \"_start\"](start);\r\n\t\t\t}\r\n\r\n\t\t\tvar curr = new Date(start);\r\n\t\t\tif (+curr >= +end) {\r\n\t\t\t\tend = dateHelper.add(curr, step, unit);\r\n\t\t\t}\r\n\t\t\twhile (+curr < +end) {\r\n\t\t\t\tcallback.call(this, new Date(curr));\r\n\t\t\t\tvar tzOffset = curr.getTimezoneOffset();\r\n\t\t\t\tcurr = dateHelper.add(curr, step, unit);\r\n\t\t\t\tcurr = gantt._correct_dst_change(curr, tzOffset, step, unit);\r\n\t\t\t\tif (dateHelper[unit + '_start'])\r\n\t\t\t\t\tcurr = dateHelper[unit + \"_start\"](curr);\r\n\t\t\t}\r\n\t\t},\r\n\t\tlimitVisibleRange: function (cfg) {\r\n\t\t\tvar dates = cfg.trace_x;\r\n\r\n\t\t\tvar left = 0, right = cfg.width.length - 1;\r\n\t\t\tvar diff = 0;\r\n\t\t\tif (+dates[0] < +cfg.min_date && left != right) {\r\n\t\t\t\tvar width = Math.floor(cfg.width[0] * ((dates[1] - cfg.min_date) / (dates[1] - dates[0])));\r\n\t\t\t\tdiff += cfg.width[0] - width;\r\n\t\t\t\tcfg.width[0] = width;\r\n\r\n\t\t\t\tdates[0] = new Date(cfg.min_date);\r\n\t\t\t}\r\n\r\n\t\t\tvar last = dates.length - 1;\r\n\t\t\tvar lastDate = dates[last];\r\n\t\t\tvar outDate = dateHelper.add(lastDate, cfg.step, cfg.unit);\r\n\t\t\tif (+outDate > +cfg.max_date && last > 0) {\r\n\t\t\t\tvar width = cfg.width[last] - Math.floor(cfg.width[last] * ((outDate - cfg.max_date) / (outDate - lastDate)));\r\n\t\t\t\tdiff += cfg.width[last] - width;\r\n\t\t\t\tcfg.width[last] = width;\r\n\t\t\t}\r\n\r\n\t\t\tif (diff) {\r\n\t\t\t\tvar full = this.getSum(cfg.width);\r\n\t\t\t\tvar shared = 0;\r\n\t\t\t\tfor (var i = 0; i < cfg.width.length; i++) {\r\n\t\t\t\t\tvar share = Math.floor(diff * (cfg.width[i] / full));\r\n\t\t\t\t\tcfg.width[i] += share;\r\n\t\t\t\t\tshared += share;\r\n\t\t\t\t}\r\n\t\t\t\tthis.adjustSize(diff - shared, cfg.width);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default ScaleHelper;\r\n","import ScaleHelper from \"./ui/timeline/scales_ignore\";\r\nimport PrimaryScaleHelper from \"./ui/timeline/scales\";\r\n\r\nfunction resolveConfigRange(unit, gantt){\r\n\tvar range = {\r\n\t\tstart_date:null,\r\n\t\tend_date:null\r\n\t};\r\n\r\n\tif (gantt.config.start_date && gantt.config.end_date) {\r\n\t\trange.start_date = gantt.date[unit + \"_start\"](new Date(gantt.config.start_date));\r\n\r\n\t\tvar end = new Date(gantt.config.end_date);\r\n\t\tvar start_interval = gantt.date[unit + \"_start\"](new Date(end));\r\n\t\tif (+end != +start_interval) {\r\n\t\t\tend = gantt.date.add(start_interval, 1, unit);\r\n\t\t} else {\r\n\t\t\tend = start_interval;\r\n\t\t}\r\n\r\n\t\trange.end_date = end;\r\n\t}\r\n\treturn range;\r\n}\r\n\r\nfunction _scale_range_unit(gantt) {\r\n\tvar primaryScale = (new PrimaryScaleHelper(gantt)).primaryScale();\r\n\tvar unit = primaryScale.unit;\r\n\tvar step = primaryScale.step;\r\n\tif (gantt.config.scale_offset_minimal) {\r\n\r\n\t\tvar helper = new ScaleHelper(gantt);\r\n\t\tvar scales = [helper.primaryScale()].concat(helper.getSubScales());\r\n\r\n\t\thelper.sortScales(scales);\r\n\t\tunit = scales[scales.length - 1].unit;\r\n\t\tstep = scales[scales.length - 1].step || 1;\r\n\t}\r\n\treturn { unit:unit, step:step };\r\n}\r\n\r\nfunction _init_tasks_range(gantt) {\r\n\tvar cfg = _scale_range_unit(gantt);\r\n\tvar unit = cfg.unit,\r\n\t\tstep = cfg.step;\r\n\tvar range = resolveConfigRange(unit, gantt);\r\n\r\n\t// GS-1544: Show correct date range if we have tasks or only projects\r\n\tif(!(range.start_date && range.end_date)){\r\n\t\tvar onlyProjectTasks = true;\r\n\t\tvar tasks = gantt.getTaskByTime();\r\n\t\tfor (var i = 0; i < tasks.length; i++) {\r\n\t\t\tvar task = tasks[i];\r\n\t\t\tif (task.type !== gantt.config.types.project){\r\n\t\t\t\tonlyProjectTasks = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (tasks.length && onlyProjectTasks){\r\n\t\t\tvar start_date = tasks[0].start_date;\r\n\t\t\tvar end_date = gantt.date.add(start_date, 1, gantt.config.duration_unit);\r\n\t\t\trange = {\r\n\t\t\t\tstart_date: new Date(start_date),\r\n\t\t\t\tend_date: new Date(end_date)\r\n\t\t\t};\r\n\t\t} else{\r\n\t\t\trange = gantt.getSubtaskDates();\r\n\t\t}\r\n\r\n\t\tif(!range.start_date || !range.end_date){\r\n\t\t\trange = {\r\n\t\t\t\tstart_date: new Date(),\r\n\t\t\t\tend_date: new Date()\r\n\t\t\t};\r\n\t\t}\r\n\t\t// extend the displayed date range including the constraints, deadlines and baselines\r\n\t\tgantt.eachTask(function(task){\r\n\t\t\tif (gantt.config.deadlines !== false && task.deadline){\r\n\t\t\t\textendRangeForDates(range, task.deadline, task.deadline);\r\n\t\t\t}\r\n\t\t\tif (task.constraint_date && task.constraint_type){\r\n\t\t\t\tif (gantt.config.constraint_types && task.constraint_type !== gantt.config.constraint_types.ASAP && task.constraint_type !== gantt.config.constraint_types.ALAP){\r\n\t\t\t\t\textendRangeForDates(range, task.constraint_date, task.constraint_date);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (gantt.config.baselines !== false && task.baselines){\r\n\t\t\t\ttask.baselines.forEach(function(baseline){\r\n\t\t\t\t\textendRangeForDates(range, baseline.start_date, baseline.end_date);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\trange.start_date = gantt.date[unit + \"_start\"](range.start_date);\r\n\t\trange.start_date = gantt.calculateEndDate({\r\n\t\t\tstart_date: gantt.date[unit + \"_start\"](range.start_date),\r\n\t\t\tduration: -1,\r\n\t\t\tunit: unit,\r\n\t\t\tstep:step\r\n\t\t});//one free column before first task\r\n\r\n\t\trange.end_date = gantt.date[unit + \"_start\"](range.end_date);\r\n\t\trange.end_date = gantt.calculateEndDate({start_date: range.end_date, duration: 2, unit: unit, step:step});//one free column after last task\r\n\t}\r\n\r\n\tgantt._min_date = range.start_date;\r\n\tgantt._max_date = range.end_date;\r\n}\r\n\r\nfunction extendRangeForDates(range, start_date, end_date){\r\n\tif (start_date < range.start_date){\r\n\t\trange.start_date = new Date(start_date);\r\n\t}\r\n\tif (end_date > range.end_date){\r\n\t\trange.end_date = new Date(end_date);\r\n\t}\r\n}\r\n\r\nfunction _adjust_scales(gantt) {\r\n\tif (gantt.config.fit_tasks) {\r\n\t\tvar old_min = +gantt._min_date,\r\n\t\t\told_max = +gantt._max_date;\r\n\t\t//this._init_tasks_range();\r\n\t\tif (+gantt._min_date != old_min || +gantt._max_date != old_max) {\r\n\t\t\tgantt.render();\r\n\r\n\t\t\tgantt.callEvent(\"onScaleAdjusted\", []);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nexport default function updateTasksRange(gantt){\r\n\t_init_tasks_range(gantt);\r\n\t_adjust_scales(gantt);\r\n};\r\n","function copyLinkIdsArray(gantt, linkIds, targetHash){\r\n\tfor(var i = 0; i < linkIds.length; i++) {\r\n\t\tif(gantt.isLinkExists(linkIds[i])){\r\n\t\t\ttargetHash[linkIds[i]] = gantt.getLink(linkIds[i]);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction copyLinkIds(gantt, task, targetHash){\r\n\tcopyLinkIdsArray(gantt, task.$source, targetHash);\r\n\tcopyLinkIdsArray(gantt, task.$target, targetHash);\r\n}\r\n\r\nfunction getSubtreeLinks(gantt, rootId){\r\n\tvar res = {};\r\n\r\n\tif(gantt.isTaskExists(rootId)){\r\n\t\tcopyLinkIds(gantt, gantt.getTask(rootId), res);\r\n\t}\r\n\r\n\tgantt.eachTask(function(child){\r\n\t\tcopyLinkIds(gantt, child, res);\r\n\t}, rootId);\r\n\r\n\treturn res;\r\n}\r\n\r\nfunction getSubtreeTasks(gantt, rootId){\r\n\tvar res = {};\r\n\r\n\tgantt.eachTask(function(child){\r\n\t\tres[child.id] = child;\r\n\t}, rootId);\r\n\r\n\treturn res;\r\n}\r\n\r\nexport default {\r\n\tgetSubtreeLinks: getSubtreeLinks,\r\n\tgetSubtreeTasks: getSubtreeTasks\r\n};","import * as helpers from \"../../utils/helpers\";\r\nimport treeHelper from \"../../utils/task_tree_helpers\";\r\n\r\n\r\nexport default class DataProcessorEvents {\r\n\tprotected _dataProcessorHandlers: any[];\r\n\tprotected $gantt: any;\r\n\tprotected $dp: any;\r\n\r\n\tconstructor(gantt: any, dp: any) {\r\n\t\tthis.$gantt = gantt;\r\n\t\tthis.$dp = dp;\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t}\r\n\r\n\tattach() {\r\n\t\tconst dp = this.$dp;\r\n\t\tconst gantt = this.$gantt;\r\n\t\tconst cascadeDelete = {};\r\n\r\n\t\tconst clientSideDelete = (id) => {\r\n\t\t\treturn this.clientSideDelete(id, dp, gantt);\r\n\t\t};\r\n\r\n\t\tfunction getTaskLinks(task) {\r\n\t\t\tlet _links = [];\r\n\r\n\t\t\tif (task.$source) {\r\n\t\t\t\t_links = _links.concat(task.$source);\r\n\t\t\t}\r\n\t\t\tif (task.$target) {\r\n\t\t\t\t_links = _links.concat(task.$target);\r\n\t\t\t}\r\n\r\n\t\t\treturn _links;\r\n\t\t}\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onAfterTaskAdd\", function(id, item) { // tslint:disable-line\r\n\t\t\tif (gantt.isTaskExists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"tasks\");\r\n\t\t\t\tdp.setUpdated(id, true, \"inserted\");\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onAfterTaskUpdate\", function(id, item) { // tslint:disable-line\r\n\t\t\tif (gantt.isTaskExists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"tasks\");\r\n\t\t\t\tdp.setUpdated(id, true);\r\n\r\n\t\t\t\t// gantt can be destroyed/reinitialized after dp.setUpdated\r\n\t\t\t\tif(gantt._sendTaskOrder){\r\n\t\t\t\t\tgantt._sendTaskOrder(id, item);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onBeforeTaskDelete\", function(id, item) { // tslint:disable-line\r\n\t\t\tif (gantt.config.cascade_delete) {\r\n\t\t\t\tcascadeDelete[id] = {\r\n\t\t\t\t\ttasks: treeHelper.getSubtreeTasks(gantt, id),\r\n\t\t\t\t\tlinks: treeHelper.getSubtreeLinks(gantt, id)\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t// GS-631. Keep the deleted item in Gantt until we receive the successful response from the server\r\n\t\t\tif (dp.deleteAfterConfirmation) {\r\n\t\t\t\tdp.setGanttMode(\"tasks\");\r\n\t\t\t\tdp.setUpdated(id, true, \"deleted\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onAfterTaskDelete\", function(id, item) { // tslint:disable-line\r\n\t\t\tdp.setGanttMode(\"tasks\");\r\n\r\n\t\t\t// not send delete request if item is not inserted into the db - just remove it from the client\r\n\t\t\tconst needDbDelete = !clientSideDelete(id);\r\n\t\t\tconst needCascadeDelete = gantt.config.cascade_delete && cascadeDelete[id];\r\n\t\t\tif (!needDbDelete && !needCascadeDelete) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (needCascadeDelete) {\r\n\t\t\t\tconst dpMode = dp.updateMode;\r\n\t\t\t\tdp.setUpdateMode(\"off\");\r\n\r\n\t\t\t\tconst cascade = cascadeDelete[id];\r\n\t\t\t\tfor (const i in cascade.tasks) {\r\n\t\t\t\t\tif (!clientSideDelete(i)) {\r\n\t\t\t\t\t\tdp.storeItem(cascade.tasks[i]);\r\n\t\t\t\t\t\tdp.setUpdated(i, true, \"deleted\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdp.setGanttMode(\"links\");\r\n\t\t\t\tfor (const i in cascade.links) {\r\n\t\t\t\t\tif (!clientSideDelete(i)) {\r\n\t\t\t\t\t\tdp.storeItem(cascade.links[i]);\r\n\t\t\t\t\t\tdp.setUpdated(i, true, \"deleted\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcascadeDelete[id] = null;\r\n\r\n\t\t\t\tif (dpMode !== \"off\") {\r\n\t\t\t\t\tdp.sendAllData();\r\n\t\t\t\t}\r\n\t\t\t\tdp.setGanttMode(\"tasks\");\r\n\t\t\t\tdp.setUpdateMode(dpMode);\r\n\t\t\t}\r\n\r\n\t\t\tif (needDbDelete){\r\n\t\t\t\tdp.storeItem(item);\r\n\t\t\t\tif (!dp.deleteAfterConfirmation){\r\n\t\t\t\t\tdp.setUpdated(id, true, \"deleted\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\tif (dp.updateMode !== \"off\" && !dp._tSend) {\r\n\t\t\t\tdp.sendAllData();\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onAfterLinkUpdate\", function(id, item) { // tslint:disable-line\r\n\t\t\tif (gantt.isLinkExists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"links\");\r\n\t\t\t\tdp.setUpdated(id, true);\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onAfterLinkAdd\", function(id, item) { // tslint:disable-line\r\n\t\t\tif (gantt.isLinkExists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"links\");\r\n\t\t\t\tdp.setUpdated(id, true,\"inserted\");\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onAfterLinkDelete\", function(id, item) { // tslint:disable-line\r\n\t\t\tdp.setGanttMode(\"links\");\r\n\r\n\t\t\tconst needDbDelete = !clientSideDelete(id);\r\n\t\t\tif (!needDbDelete) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdp.storeItem(item);\r\n\t\t\tdp.setUpdated(id, true,\"deleted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onRowDragEnd\", function(id, target) { // tslint:disable-line\r\n\t\t\tgantt._sendTaskOrder(id, gantt.getTask(id));\r\n\t\t}));\r\n\r\n\t\tlet tasks = null;\r\n\t\tlet links = null;\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onTaskIdChange\", function(oldId, newId) { // tslint:disable-line\r\n\t\t\tif (!dp._waitMode) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst children = gantt.getChildren(newId);\r\n\t\t\tif (children.length) {\r\n\t\t\t\ttasks = tasks || {};\r\n\r\n\t\t\t\tfor (let i = 0; i < children.length; i++) {\r\n\t\t\t\t\tconst ch = this.getTask(children[i]);\r\n\t\t\t\t\ttasks[ch.id] = ch;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst item = this.getTask(newId);\r\n\t\t\tconst itemLinks = getTaskLinks(item);\r\n\r\n\t\t\tif (itemLinks.length) {\r\n\t\t\t\tlinks = links || {};\r\n\r\n\t\t\t\tfor (let i = 0; i < itemLinks.length; i++) {\r\n\t\t\t\t\tconst link = this.getLink(itemLinks[i]);\r\n\t\t\t\t\tlinks[link.id] = link;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"onAfterUpdateFinish\", function() {\r\n\t\t\tif (tasks || links) {\r\n\t\t\t\tgantt.batchUpdate(function() {\r\n\t\t\t\t\tfor (const id in tasks) {\r\n\t\t\t\t\t\tgantt.updateTask(tasks[id].id);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfor (const id in links) {\r\n\t\t\t\t\t\tgantt.updateLink(links[id].id);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttasks = null;\r\n\t\t\t\t\tlinks = null;\r\n\t\t\t\t});\r\n\t\t\t\tif (tasks) {\r\n\t\t\t\t\tgantt._dp.setGanttMode(\"tasks\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tgantt._dp.setGanttMode(\"links\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tdp.attachEvent(\"onBeforeDataSending\", function() {\r\n\t\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tlet url = this._serverProcessor;\r\n\t\t\tif (this._tMode === \"REST-JSON\" || this._tMode === \"REST\") {\r\n\t\t\t\tconst mode = this._ganttMode;\r\n\r\n\t\t\t\turl = url.substring(0, url.indexOf(\"?\") > -1 ? url.indexOf(\"?\") : url.length);\r\n\t\t\t\t// editing=true&\r\n\t\t\t\tthis.serverProcessor = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + mode;\r\n\t\t\t} else {\r\n\t\t\t\tconst pluralizedMode = this._ganttMode + \"s\";\r\n\t\t\t\tthis.serverProcessor = url + gantt.ajax.urlSeparator(url) + \"gantt_mode=\" + pluralizedMode;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", function insertCallback(upd, id, parent, mode) { // tslint:disable-line\r\n\t\t\tconst data = upd.data || gantt.xml._xmlNodeToJSON(upd.firstChild);\r\n\t\t\tconst methods = {\r\n\t\t\t\tadd: gantt.addTask,\r\n\t\t\t\tisExist: gantt.isTaskExists\r\n\t\t\t};\r\n\t\t\tif (mode === \"links\") {\r\n\t\t\t\tmethods.add = gantt.addLink;\r\n\t\t\t\tmethods.isExist = gantt.isLinkExists;\r\n\t\t\t}\r\n\t\t\tif (methods.isExist.call(gantt, id)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdata.id = id;\r\n\t\t\tmethods.add.call(gantt, data);\r\n\t\t});\r\n\r\n\t\tdp.attachEvent(\"updateCallback\", function updateCallback(upd, id) {\r\n\t\t\tconst data = upd.data || gantt.xml._xmlNodeToJSON(upd.firstChild);\r\n\t\t\tif (!gantt.isTaskExists(id)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst objData = gantt.getTask(id);\r\n\t\t\tfor (const key in data) {\r\n\t\t\t\tlet property = data[key];\r\n\t\t\t\tswitch (key) {\r\n\t\t\t\t\tcase \"id\":\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tcase \"start_date\":\r\n\t\t\t\t\tcase \"end_date\":\r\n\t\t\t\t\t\tproperty = gantt.defined(gantt.templates.xml_date) ? gantt.templates.xml_date(property) : gantt.templates.parse_date(property);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"duration\":\r\n\t\t\t\t\t\tobjData.end_date = gantt.calculateEndDate({start_date: objData.start_date, duration: property, task:objData});\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tobjData[key] = property;\r\n\t\t\t}\r\n\t\t\tgantt.updateTask(id);\r\n\t\t\tgantt.refreshData();\r\n\t\t});\r\n\t\tdp.attachEvent(\"deleteCallback\", function deleteCallback(upd, id, parent, mode) { // tslint:disable-line\r\n\t\t\tconst methods = {\r\n\t\t\t\tdelete: gantt.deleteTask,\r\n\t\t\t\tisExist: gantt.isTaskExists\r\n\t\t\t};\r\n\t\t\tif (mode === \"links\") {\r\n\t\t\t\tmethods.delete = gantt.deleteLink;\r\n\t\t\t\tmethods.isExist = gantt.isLinkExists;\r\n\t\t\t} else if(mode === \"assignment\") {\r\n\t\t\t\tmethods.delete = function(val) {\r\n\t\t\t\t\tgantt.$data.assignmentsStore.remove(val);\r\n\t\t\t\t};\r\n\t\t\t\tmethods.isExist = function(val){\r\n\t\t\t\t\treturn gantt.$data.assignmentsStore.exists(val);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\tif (methods.isExist.call(gantt, id)) {\r\n\t\t\t\tmethods.delete.call(gantt, id);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.handleResourceCRUD(dp, gantt);\r\n\t\tthis.handleResourceAssignmentCRUD(dp, gantt);\r\n\t\tthis.handleBaselineCRUD(dp, gantt);\r\n\t}\r\n\r\n\tclientSideDelete(id, dp, gantt){\r\n\t\tconst updated = dp.updatedRows.slice();\r\n\t\tlet clientOnly = false;\r\n\r\n\t\tif(gantt.getUserData(id, \"!nativeeditor_status\", dp._ganttMode) === \"true_deleted\"){\r\n\t\t\tclientOnly = true;\r\n\t\t\tdp.setUpdated(id,false);\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < updated.length && !dp._in_progress[id]; i++) {\r\n\t\t\tif (updated[i] === id) {\r\n\t\t\t\tif (gantt.getUserData(id, \"!nativeeditor_status\", dp._ganttMode) === \"inserted\") {\r\n\t\t\t\t\tclientOnly = true;\r\n\t\t\t\t}\r\n\t\t\t\tdp.setUpdated(id,false);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn clientOnly;\r\n\t}\r\n\r\n\thandleResourceAssignmentCRUD(dp, gantt){\r\n\t\tif(!gantt.config.resources || gantt.config.resources.dataprocessor_assignments !== true){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst assignmentsStore = gantt.getDatastore(gantt.config.resource_assignment_store);\r\n\t\tconst insertedTasks = {};\r\n\t\tconst pendingAssignments = {};\r\n\r\n\t\tgantt.attachEvent(\"onBeforeTaskAdd\", function(id, task){\r\n\t\t\tinsertedTasks[id] = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tfunction putAssignmentToQueue(item){\r\n\t\t\tpendingAssignments[item.id] = item;\r\n\t\t\tinsertedTasks[item.task_id] = true;\r\n\t\t}\r\n\r\n\t\tfunction insertResourceAssignment(assignment){\r\n\t\t\tconst id = assignment.id;\r\n\t\t\tif (assignmentsStore.exists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"assignment\");\r\n\t\t\t\tdp.setUpdated(id, true,\"inserted\");\r\n\t\t\t}\r\n\t\t\tdelete pendingAssignments[id];\r\n\t\t}\r\n\r\n\t\tgantt.attachEvent(\"onTaskIdChange\", function(id, newId){\r\n\t\t\tdelete insertedTasks[id];\r\n\t\t});\r\n\r\n\t\tassignmentsStore.attachEvent(\"onAfterAdd\", (id, item) => {\r\n\t\t\tif(insertedTasks[item.task_id]){\r\n\t\t\t\t// inserting assignment of new task\r\n\t\t\t\t// task is not saved yet, need to wait till it gets permanent id and save assigmnents after that\r\n\t\t\t\tputAssignmentToQueue(item);\r\n\t\t\t}else{\r\n\t\t\t\tinsertResourceAssignment(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tassignmentsStore.attachEvent(\"onAfterUpdate\", (id, item) => {\r\n\t\t\tif (assignmentsStore.exists(id)) {\r\n\t\t\t\tif(pendingAssignments[id]){\r\n\t\t\t\t\tinsertResourceAssignment(item);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdp.setGanttMode(\"assignment\");\r\n\t\t\t\t\tdp.setUpdated(id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tassignmentsStore.attachEvent(\"onAfterDelete\", (id, item) => {\r\n\t\t\tdp.setGanttMode(\"assignment\");\r\n\r\n\t\t\tconst needDbDelete = !this.clientSideDelete(id, dp, gantt);\r\n\t\t\tif (!needDbDelete) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdp.storeItem(item);\r\n\t\t\tdp.setUpdated(id, true,\"deleted\");\r\n\t\t});\r\n\r\n\t}\r\n\r\n\thandleResourceCRUD(dp, gantt){\r\n\t\tif(!gantt.config.resources || gantt.config.resources.dataprocessor_resources !== true){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst resourcesStore = gantt.getDatastore(gantt.config.resource_store);\r\n\r\n\t\tfunction insertResource(resource){\r\n\t\t\tconst id = resource.id;\r\n\t\t\tif (resourcesStore.exists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"resource\");\r\n\t\t\t\tdp.setUpdated(id, true,\"inserted\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tresourcesStore.attachEvent(\"onAfterAdd\", (id, item) => {\r\n\t\t\tinsertResource(item);\r\n\t\t});\r\n\r\n\t\tresourcesStore.attachEvent(\"onAfterUpdate\", (id, item) => {\r\n\t\t\tif (resourcesStore.exists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"resource\");\r\n\t\t\t\tdp.setUpdated(id, true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tresourcesStore.attachEvent(\"onAfterDelete\", (id, item) => {\r\n\t\t\tdp.setGanttMode(\"resource\");\r\n\r\n\t\t\tconst needDbDelete = !this.clientSideDelete(id, dp, gantt);\r\n\t\t\tif (!needDbDelete) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdp.storeItem(item);\r\n\t\t\tdp.setUpdated(id, true,\"deleted\");\r\n\t\t});\r\n\r\n\t}\r\n\r\n\thandleBaselineCRUD(dp, gantt){\r\n\t\tif(!gantt.config.baselines || gantt.config.baselines.dataprocessor_baselines !== true){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst baselineStore = gantt.getDatastore(gantt.config.baselines.datastore);\r\n\r\n\t\tfunction insertResource(resource){\r\n\t\t\tconst id = resource.id;\r\n\t\t\tif (baselineStore.exists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"baseline\");\r\n\t\t\t\tdp.setUpdated(id, true,\"inserted\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbaselineStore.attachEvent(\"onAfterAdd\", (id, item) => {\r\n\t\t\tinsertResource(item);\r\n\t\t});\r\n\r\n\t\tbaselineStore.attachEvent(\"onAfterUpdate\", (id, item) => {\r\n\t\t\tif (baselineStore.exists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"baseline\");\r\n\t\t\t\tdp.setUpdated(id, true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbaselineStore.attachEvent(\"onAfterDelete\", (id, item) => {\r\n\t\t\tdp.setGanttMode(\"baseline\");\r\n\r\n\t\t\tconst needDbDelete = !this.clientSideDelete(id, dp, gantt);\r\n\t\t\tif (!needDbDelete) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdp.storeItem(item);\r\n\t\t\tdp.setUpdated(id, true,\"deleted\");\r\n\t\t});\r\n\t}\r\n\r\n\tdetach() {\r\n\t\thelpers.forEach(this._dataProcessorHandlers, (e) => {\r\n\t\t\tthis.$gantt.detachEvent(e);\r\n\t\t});\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t}\r\n}\r\n","import * as utils from \"../../utils/utils\";\r\n\r\nexport default class SimpleStorage {\r\n\tpublic static create = () : SimpleStorage => {\r\n\t\treturn new SimpleStorage();\r\n\t};\r\n\r\n\tprotected _storage: { [id: string]: any; };\r\n\r\n\tprotected constructor() {\r\n\t\tthis._storage = {};\r\n\t}\r\n\r\n\tpublic clear = (): void => {\r\n\t\tthis._storage = {};\r\n\t};\r\n\r\n\tpublic storeItem = (item: any): void => {\r\n\t\tthis._storage[item.id] = utils.copy(item);\r\n\t};\r\n\r\n\tpublic getStoredItem = (id: string): any => {\r\n\t\treturn this._storage[id] || null;\r\n\t};\r\n}","import eventable from \"../../utils/eventable\";\r\nimport * as helpers from \"../../utils/helpers\";\r\nimport * as utils from \"../../utils/utils\";\r\nimport DataProcessorEvents from \"./data_processor_events\";\r\nimport extendGantt from \"./extend_gantt\";\r\nimport SimpleStorage from \"./simple_storage\";\r\nimport global from \"../../utils/global\";\r\n\r\nexport interface DataProcessor { // tslint:disable-line\r\n\t$gantt: any;\r\n\tdetachAllEvents: any;\r\n\tattachEvent: any;\r\n\tcallEvent: any;\r\n\r\n\tserverProcessor: string;\r\n\taction_param: string;\r\n\tupdatedRows: any[];\r\n\tautoUpdate: boolean;\r\n\tupdateMode: string;\r\n\tmessages: any[];\r\n\tstyles: object;\r\n\tdnd: any;\r\n\tdeleteAfterConfirmation?: any;\r\n}\r\n\r\nexport function createDataProcessor(config: any) {\r\n\tlet router;\r\n\tlet tMode;\r\n\tlet headers;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if (config.hasOwnProperty(\"assignment\") || config.hasOwnProperty(\"baseline\") || config.hasOwnProperty(\"link\") || config.hasOwnProperty(\"task\")) {\r\n\t\trouter = config;\r\n\t} else if(config.hasOwnProperty(\"headers\")){\r\n\t\t// GS-2312 for custom headers\r\n\t\theaders = config.headers;\r\n\t}\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\tconst gantt = this; // tslint:disable-line\r\n\tconst dp = new DataProcessor(config.url);\r\n\r\n\r\n\tdp.init(gantt);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter,\r\n\t\theaders\r\n\t}, config.batchUpdate);\r\n\tif(config.deleteAfterConfirmation){\r\n\t\tdp.deleteAfterConfirmation = config.deleteAfterConfirmation;\r\n\t}\r\n\treturn dp;\r\n}\r\n\r\nexport class DataProcessor {\r\n\tpublic modes: object;\r\n\tpublic serverProcessor: string;\r\n\tpublic action_param: string; // tslint:disable-line\r\n\tpublic updatedRows: any[];\r\n\tpublic autoUpdate: boolean;\r\n\tpublic updateMode: string;\r\n\tpublic messages: any[];\r\n\tpublic styles: object;\r\n\tpublic dnd: any;\r\n\r\n\tprotected _tMode: string;\r\n\tprotected _headers: any;\r\n\tprotected _payload: any;\r\n\tprotected _postDelim: string;\r\n\tprotected _waitMode: number;\r\n\tprotected _in_progress: object; // tslint:disable-line\r\n\tprotected _invalid: object;\r\n\tprotected _storage: SimpleStorage;\r\n\tprotected _tSend: boolean;\r\n\tprotected _serializeAsJson: boolean;\r\n\tprotected _router: any;\r\n\tprotected _utf: boolean;\r\n\tprotected _methods: any[];\r\n\tprotected _user: any;\r\n\tprotected _uActions: object;\r\n\tprotected _needUpdate: boolean;\r\n\tprotected _ganttMode: \"task\"|\"link\";\r\n\tprotected _routerParametersFormat: \"parameters\"|\"object\";\r\n\r\n\tprotected _silent_mode: any; // tslint:disable-line\r\n\tprotected _updateBusy: any;\r\n\tprotected _serverProcessor: any;\r\n\tprotected _initialized: boolean;\r\n\r\n\tconstructor(serverProcessorURL?) {\r\n\t\tthis.serverProcessor = serverProcessorURL;\r\n\t\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\t\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\t\tthis.autoUpdate = true;\r\n\t\tthis.updateMode = \"cell\";\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tthis._postDelim = \"_\";\r\n\t\tthis._routerParametersFormat = \"parameters\";\r\n\r\n\t\tthis._waitMode = 0;\r\n\t\tthis._in_progress = {}; // ?\r\n\t\tthis._storage = SimpleStorage.create();\r\n\t\tthis._invalid = {};\r\n\t\tthis.messages = [];\r\n\r\n\t\tthis.styles = {\r\n\t\t\tupdated: \"font-weight:bold;\",\r\n\t\t\tinserted: \"font-weight:bold;\",\r\n\t\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\t\terror: \"color:red;\",\r\n\t\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t\t};\r\n\t\tthis.enableUTFencoding(true);\r\n\t\teventable(this);\r\n\t}\r\n\r\n\tsetTransactionMode(mode:any, total?:any) {\r\n\t\tif (typeof mode === \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (utils.defined(mode.headers)) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (utils.defined(mode.payload)) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t}\r\n\r\n\tescape(data:any) {\r\n\t\tif (this._utf) {\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\t} else {\r\n\t\t\treturn escape(data);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: allows to set escaping mode\r\n\t * @param: true - utf based escaping, simple - use current page encoding\r\n\t * @type: public\r\n\t */\r\n\tenableUTFencoding(mode:boolean) {\r\n\t\tthis._utf = !!mode;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: get state of updating\r\n\t * @returns: true - all in sync with server, false - some items not updated yet.\r\n\t * @type: public\r\n\t */\r\n\tgetSyncState() {\r\n\t\treturn !this.updatedRows.length;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: set if rows should be send to server automatically\r\n\t * @param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t * @type: public\r\n\t */\r\n\tsetUpdateMode(mode: string, dnd: any) {\r\n\t\tthis.autoUpdate = (mode === \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t}\r\n\r\n\tignore(code: any, master: any) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || global);\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: mark row as updated/normal. check mandatory fields, initiate autoupdate (if turned on)\r\n\t * @param: rowId - id of row to set update-status for\r\n\t * @param: state - true for \"updated\", false for \"not updated\"\r\n\t * @param: mode - update mode name\r\n\t * @type: public\r\n\t */\r\n\tsetUpdated(rowId:number|string, state: boolean, mode?: string) {\r\n\t\tif (this._silent_mode) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tconst existing = this.$gantt.getUserData(rowId, this.action_param, this._ganttMode);\r\n\t\tif (existing && mode === \"updated\") {\r\n\t\t\tmode = existing;\r\n\t\t}\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); // clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$gantt.setUserData(rowId, this.action_param, mode, this._ganttMode);\r\n\t\t\tif (this._in_progress[rowId]) {\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$gantt.setUserData(rowId, this.action_param, \"\", this._ganttMode);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) {\r\n\t\t\tthis.sendData(rowId);\r\n\t\t}\r\n\t}\r\n\r\n\tmarkRow(id: number | string, state: boolean, mode: string) {\r\n\t\tlet str = \"\";\r\n\t\tconst invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t// default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + \" \" + str;\r\n\r\n\t\t\tthis.$gantt[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (let i = 0; i < invalid.details.length; i++) {\r\n\t\t\t\t\tif (invalid.details[i]) {\r\n\t\t\t\t\t\tthis.$gantt[this._methods[1]](id, i, str);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetActionByState(state: string):string {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\r\n\t\t// reorder\r\n\t\treturn \"update\";\r\n\t}\r\n\r\n\tgetState(id: number | string) {\r\n\t\treturn this.$gantt.getUserData(id, this.action_param, this._ganttMode);\r\n\t}\r\n\r\n\tis_invalid(id: number | string) {\r\n\t\treturn this._invalid[id];\r\n\t}\r\n\r\n\tset_invalid(id: number | string, mode: any, details?) {\r\n\t\tif (details) {\r\n\t\t\tmode = {\r\n\t\t\t\tvalue: mode,\r\n\t\t\t\tdetails,\r\n\t\t\t\ttoString: function() { // tslint:disable-line\r\n\t\t\t\t\treturn this.value.toString();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t\tthis._invalid[id] = mode;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: check mandatory fields and verify values of cells, initiate update (if specified). Can be redefined in order to provide custom validation\r\n\t * @param: rowId - id of row to set update-status for\r\n\t * @type: public\r\n\t */\r\n\t// tslint:disable-next-line\r\n\tcheckBeforeUpdate(rowId: number | string) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: send row(s) values to server\r\n\t * @param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t * @type: public\r\n\t */\r\n\tsendData(rowId?: any) {\r\n\t\tif (this.$gantt.editStop) {\r\n\t\t\tthis.$gantt.editStop();\r\n\t\t}\r\n\r\n\t\tif (typeof rowId === \"undefined\" || this._tSend) {\r\n\r\n\t\t\tconst pendingUpdateModes = [];\r\n\t\t\tif(this.modes){\r\n\t\t\t\tconst knownModes = [\"task\", \"link\", \"assignment\", \"baseline\"];\r\n\t\t\t\tknownModes.forEach((mode) => {\r\n\t\t\t\t\tif(this.modes[mode] && this.modes[mode].updatedRows.length){\r\n\t\t\t\t\t\tpendingUpdateModes.push(mode);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (pendingUpdateModes.length){\r\n\t\t\t\tfor(let i = 0; i < pendingUpdateModes.length; i++){\r\n\t\t\t\t\tthis.setGanttMode(pendingUpdateModes[i]);\r\n\t\t\t\t\tthis.sendAllData();\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\treturn this.sendAllData();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this._in_progress[rowId]) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t}\r\n\r\n\tserialize(data: any, id: any) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\t\tif (typeof id !== \"undefined\") {\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\t} else {\r\n\t\t\tconst stack = [];\r\n\t\t\tconst keys = [];\r\n\t\t\tfor (const key in data) {\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this._postDelim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$gantt.security_key) {\r\n\t\t\t\tstack.push(\"dhx_security=\" + this.$gantt.security_key);\r\n\t\t\t}\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t}\r\n\r\n\tserialize_one(data: any, pref: string) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\t\tconst stack = [];\r\n\t\tlet serialized = \"\";\r\n\t\tfor (const key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key === \"id\" ||\r\n\t\t\t\t\tkey == this.action_param) && // tslint:disable-line\r\n\t\t\t\t\tthis._tMode === \"REST\") {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = String(data[key]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t}\r\n\r\n\tsendAllData() {\r\n\t\tif (!this.updatedRows.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tlet valid: any = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\t// this.updatedRows can be spliced from onBeforeUpdate via dp.setUpdated false\r\n\t\t\t// use an iterator instead of for(var i = 0; i < this.updatedRows; i++) then\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tfindRow(pattern: any) {\r\n\t\tlet i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++) {\r\n\t\t\tif (pattern == this.updatedRows[i]) { // tslint:disable-line\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn i;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: define custom actions\r\n\t * @param: name - name of action, same as value of action attribute\r\n\t * @param: handler - custom function, which receives a XMl response content for action\r\n\t * @type: private\r\n\t */\r\n\tdefineAction(name: string, handler: any) {\r\n\t\tif (!this._uActions) {\r\n\t\t\tthis._uActions = {};\r\n\t\t}\r\n\t\tthis._uActions[name] = handler;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t * @param: sid - id of item before update\r\n\t * @param: tid - id of item after up0ate\r\n\t * @param: action - action name\r\n\t * @type: public\r\n\t * @topic: 0\r\n\t */\r\n\tafterUpdateCallback(sid: number | string, tid: number | string, action: string, btag: any, ganttMode: string) {\r\n\t\tif(!this.$gantt){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.setGanttMode(ganttMode);\r\n\r\n\t\tconst marker = sid;\r\n\t\tconst correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tconst originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) { // tslint:disable-line\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$gantt[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tif(!this.deleteAfterConfirmation || this._ganttMode !== \"task\"){\r\n\t\t\t\t\tthis.$gantt.setUserData(sid, this.action_param, \"true_deleted\", this._ganttMode);\r\n\t\t\t\t\tthis.$gantt[this._methods[3]](sid);\r\n\t\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif (this._ganttMode === \"task\" && this.$gantt.isTaskExists(sid)) {\r\n\t\t\t\t\t\tthis.$gantt.setUserData(sid, this.action_param, \"true_deleted\", this._ganttMode);\r\n\t\t\t\t\t\tconst task = this.$gantt.getTask(sid);\r\n\t\t\t\t\t\tthis.$gantt.silent(() => {\r\n\t\t\t\t\t\t\tthis.$gantt.deleteTask(sid);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.$gantt.callEvent(\"onAfterTaskDelete\", [sid, task]);\r\n\t\t\t\t\t\tthis.$gantt.render();\r\n\t\t\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$gantt.setUserData(sid, this.action_param, \"\", this._ganttMode);\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$gantt.getUserData(sid, this.action_param, this._ganttMode));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: response from server\r\n\t * @param: xml - XMLLoader object with response XML\r\n\t * @type: private\r\n\t */\r\n\tafterUpdate(that: any, xml: any, id?:any) {\r\n\t\tlet _xml;\r\n\t\tif (arguments.length === 3) {\r\n\t\t\t_xml = arguments[1];\r\n\t\t} else {\r\n\t\t\t// old dataprocessor\r\n\t\t\t_xml = arguments[4];\r\n\t\t}\r\n\t\tlet mode = this.getGanttMode();\r\n\t\tconst reqUrl = _xml.filePath || _xml.url;\r\n\r\n\t\tif (this._tMode !== \"REST\" && this._tMode !== \"REST-JSON\") {\r\n\t\t\tif (reqUrl.indexOf(\"gantt_mode=links\") !== -1) {\r\n\t\t\t\tmode = \"link\";\r\n\t\t\t} else if (reqUrl.indexOf(\"gantt_mode=assignments\") !== -1) {\r\n\t\t\t\tmode = \"assignment\";\r\n\t\t\t} else if (reqUrl.indexOf(\"gantt_mode=baselines\") !== -1) {\r\n\t\t\t\tmode = \"baseline\";\r\n\t\t\t} else {\r\n\t\t\t\tmode = \"task\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (reqUrl.indexOf(\"/link\") >= 0) {\r\n\t\t\t\tmode = \"link\";\r\n\t\t\t} else if(reqUrl.indexOf(\"/assignment\") >= 0){\r\n\t\t\t\tmode = \"assignment\";\r\n\t\t\t} else if(reqUrl.indexOf(\"/baseline\") >= 0){\r\n\t\t\t\tmode = \"baseline\";\r\n\t\t\t} else {\r\n\t\t\t\tmode = \"task\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.setGanttMode(mode);\r\n\r\n\t\tconst ajax = this.$gantt.ajax;\r\n\t\t// try to use json first\r\n\t\tlet tag;\r\n\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst processCallback = (itemId: any) => {\r\n\t\t\tconst action = tag.action || this.getState(itemId) || \"updated\";\r\n\t\t\tconst sid = tag.sid || itemId[0];\r\n\t\t\tconst tid = tag.tid || itemId[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag, mode);\r\n\t\t};\r\n\t\tif (tag) {\r\n\t\t\t// GS-753. When multiple tasks are updated, unhighlight all of them\r\n\t\t\tif (Array.isArray(id) && id.length > 1) {\r\n\t\t\t\tid.forEach((taskId) => processCallback(taskId));\r\n\t\t\t} else {\r\n\t\t\t\tprocessCallback(id);\r\n\t\t\t}\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\tthis.setGanttMode(mode);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tconst top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this.cleanUpdate(id);\r\n\t\t}\r\n\t\tconst atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this.cleanUpdate(id);\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < atag.length; i++) {\r\n\t\t\tconst btag = atag[i];\r\n\t\t\tconst action = btag.getAttribute(\"type\");\r\n\t\t\tconst sid = btag.getAttribute(\"sid\");\r\n\t\t\tconst tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag, mode);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t}\r\n\r\n\tcleanUpdate(id: any[]) {\r\n\t\tif (id) {\r\n\t\t\tfor (let i = 0; i < id.length; i++) {\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfinalizeUpdate() {\r\n\t\tif (this._waitMode) {\r\n\t\t\tthis._waitMode--;\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length) {\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: initializes data-processor\r\n\t * @param: gantt - dhtmlxGantt object to attach this data-processor to\r\n\t * @type: public\r\n\t */\r\n\tinit(gantt: any) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$gantt = gantt;\r\n\t\tif (this.$gantt._dp_init) {\r\n\t\t\tthis.$gantt._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis.styles = {\r\n\t\t\tupdated:\"gantt_updated\",\r\n\t\t\torder:\"gantt_updated\",\r\n\t\t\tinserted:\"gantt_inserted\",\r\n\t\t\tdeleted:\"gantt_deleted\",\r\n\t\t\tdelete_confirmation:\"gantt_deleted\",\r\n\t\t\tinvalid:\"gantt_invalid\",\r\n\t\t\terror:\"gantt_error\",\r\n\t\t\tclear:\"\"\r\n\t\t};\r\n\r\n\t\tthis._methods=[\"_row_style\",\"setCellTextStyle\",\"_change_id\",\"_delete_task\"];\r\n\t\textendGantt(this.$gantt, this);\r\n\t\tconst dataProcessorEvents = new DataProcessorEvents(this.$gantt, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this.setGanttMode;\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$gantt._dp;\r\n\t\t\tdelete this.$gantt._change_id;\r\n\t\t\tdelete this.$gantt._row_style;\r\n\t\t\tdelete this.$gantt._delete_task;\r\n\t\t\tdelete this.$gantt._sendTaskOrder;\r\n\t\t\tdelete this.$gantt;\r\n\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$gantt.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\t}\r\n\r\n\tsetOnAfterUpdate(handler) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", handler);\r\n\t}\r\n\r\n\tsetOnBeforeUpdateHandler(handler) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", handler);\r\n\t}\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate(interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._needUpdate = false;\r\n\r\n\t\tthis._updateBusy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", this.afterAutoUpdate); // arguments sid, action, tid, xml_node;\r\n\r\n\t\tthis.attachEvent(\"onFullSync\", this.fullSync);\r\n\r\n\t\tsetInterval(() => {\r\n\t\t\tthis.loadUpdate();\r\n\t\t}, interval);\r\n\t}\r\n\r\n\t/* process updating request response\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate(sid, action, tid, xml_node) { // tslint:disable-line\r\n\t\tif (action === \"collision\") {\r\n\t\t\tthis._needUpdate = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync() {\r\n\t\tif (this._needUpdate) {\r\n\t\t\tthis._needUpdate = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates(url, callback) {\r\n\t\tconst ajax = this.$gantt.ajax;\r\n\t\tif (this._updateBusy) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis._updateBusy = true;\r\n\t\t}\r\n\r\n\t\tajax.get(url, callback);\r\n\r\n\t}\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate() {\r\n\t\tconst ajax = this.$gantt.ajax;\r\n\t\tconst version = this.$gantt.getUserData(0, \"version\", this._ganttMode);\r\n\t\tlet url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, (xml) => {\r\n\t\t\tconst vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tthis.$gantt.setUserData(0, \"version\", this._getXmlNodeValue(vers[0]), this._ganttMode);\r\n\r\n\t\t\tconst updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tthis._silent_mode = true;\r\n\r\n\t\t\t\tfor (let i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tconst status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tconst id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tconst parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._silent_mode = false;\r\n\t\t\t}\r\n\r\n\t\t\tthis._updateBusy = false;\r\n\t\t});\r\n\t}\r\n\r\n\tdestructor() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {}; // ?\r\n\t\tthis._invalid = {};\r\n\t\tthis._storage.clear();\r\n\t\tthis._storage = null;\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t}\r\n\r\n\tsetGanttMode(mode) {\r\n\t\tif (mode === \"tasks\") {\r\n\t\t\tmode = \"task\";\r\n\t\t} else if (mode === \"links\") {\r\n\t\t\tmode = \"link\";\r\n\t\t}\r\n\r\n\t\tconst modes = this.modes || {};\r\n\t\tconst ganttMode = this.getGanttMode();\r\n\t\tif (ganttMode) {\r\n\t\t\tmodes[ganttMode] = {\r\n\t\t\t\t_in_progress : this._in_progress,\r\n\t\t\t\t_invalid: this._invalid,\r\n\t\t\t\t_storage: this._storage,\r\n\t\t\t\tupdatedRows : this.updatedRows\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tlet newState = modes[mode];\r\n\t\tif (!newState) {\r\n\t\t\tnewState = modes[mode] = {\r\n\t\t\t\t_in_progress : {},\r\n\t\t\t\t_invalid : {},\r\n\t\t\t\t_storage : SimpleStorage.create(),\r\n\t\t\t\tupdatedRows : []\r\n\t\t\t};\r\n\t\t}\r\n\t\tthis._in_progress = newState._in_progress;\r\n\t\tthis._invalid = newState._invalid;\r\n\t\tthis._storage = newState._storage;\r\n\t\tthis.updatedRows = newState.updatedRows;\r\n\t\tthis.modes = modes;\r\n\t\tthis._ganttMode = mode;\r\n\t}\r\n\tgetGanttMode():string {\r\n\t\treturn this._ganttMode;\r\n\t}\r\n\r\n\tstoreItem(item) {\r\n\t\tthis._storage.storeItem(item);\r\n\t}\r\n\r\n\turl(url: string) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t}\r\n\r\n\tprotected _beforeSendData(data: any, rowId: any) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tthis._sendData(data, rowId);\r\n\t}\r\n\r\n\tprotected _serializeAsJSON(data: any) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tconst copy = utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t}\r\n\r\n\tprotected _applyPayload(url: string) {\r\n\t\tconst ajax = this.$gantt.ajax;\r\n\t\tif (this._payload) {\r\n\t\t\tfor (const key in this._payload) {\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn url;\r\n\t}\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\tprotected _cleanupArgumentsBeforeSend(dataToSend: any) {\r\n\t\tlet processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(const i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t}\r\n\tprotected _cleanupItemBeforeSend(updatedItem: any) {\r\n\t\tlet output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tprotected _sendData(dataToSend: any, rowId?: any) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tconst ajax = this.$gantt.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tconst taskState = this.getState(rowId);\r\n\t\t\tconst taskAction = this.getActionByState(taskState);\r\n\t\t\tconst ganttMode = this.getGanttMode();\r\n\t\t\tconst _onResolvedCreateUpdate = (tag) => {\r\n\t\t\t\tlet action = taskState || \"updated\";\r\n\t\t\t\tlet sid = rowId;\r\n\t\t\t\tlet tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\taction = tag.action || taskState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tthis.afterUpdateCallback(sid, tid, action, tag, ganttMode);\r\n\t\t\t};\r\n\r\n\t\t\tlet actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tif(this._routerParametersFormat === \"object\"){\r\n\t\t\t\t\tconst obj = {\r\n\t\t\t\t\t\tentity: ganttMode,\r\n\t\t\t\t\t\taction: taskAction,\r\n\t\t\t\t\t\tdata: dataToSend,\r\n\t\t\t\t\t\tid: rowId\r\n\t\t\t\t\t};\r\n\t\t\t\t\tactionPromise = this._router(obj);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tactionPromise = this._router(ganttMode, taskAction, dataToSend, rowId);\r\n\t\t\t\t}\r\n\t\t\t} else if (this._router[ganttMode] instanceof Function) {\r\n\t\t\t\tactionPromise = this._router[ganttMode](taskAction, dataToSend, rowId);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tconst errorMsgStart = \"Incorrect configuration of gantt.createDataProcessor\";\r\n\t\t\t\tconst errorMsgEnd = `\r\nYou need to either add missing properties to the dataProcessor router object or to use a router function.\r\nSee https://docs.dhtmlx.com/gantt/desktop__server_side.html#customrouting and https://docs.dhtmlx.com/gantt/api__gantt_createdataprocessor.html for details.`;\r\n\r\n\t\t\t\tif(!this._router[ganttMode]){\r\n\t\t\t\t\tthrow new Error(`${errorMsgStart}: router for the **${ganttMode}** entity is not defined. ${errorMsgEnd}`);\r\n\t\t\t\t}\r\n\t\t\t\tswitch (taskState) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tif(!this._router[ganttMode].create){\r\n\t\t\t\t\t\t\tthrow new Error(`${errorMsgStart}: **create** action for the **${ganttMode}** entity is not defined. ${errorMsgEnd}`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactionPromise = this._router[ganttMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tif(!this._router[ganttMode].delete){\r\n\t\t\t\t\t\t\tthrow new Error(`${errorMsgStart}: **delete** action for the **${ganttMode}** entity is not defined. ${errorMsgEnd}`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactionPromise = this._router[ganttMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!this._router[ganttMode].update){\r\n\t\t\t\t\t\t\tthrow new Error(`${errorMsgStart}: **update**\" action for the **${ganttMode}** entity is not defined. ${errorMsgEnd}`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactionPromise = this._router[ganttMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch((error) => {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet queryParams: any;\r\n\t\tqueryParams = {\r\n\t\t\tcallback: (xml) => {\r\n\t\t\t\tconst ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (const key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn this.afterUpdate(this, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: this._headers\r\n\t\t};\r\n\r\n\t\tconst dhxVersion = \"dhx_version=\" + this.$gantt.getUserData(0, \"version\", this._ganttMode);\r\n\t\tconst urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, dhxVersion].join(\"&\")) : \"\");\r\n\t\tlet url: any = this._applyPayload(urlParams);\r\n\t\tlet data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tconst preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (const key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t}\r\n\r\n\tprotected _forEachUpdatedRow(code: any) {\r\n\t\tconst updatedRows = this.updatedRows.slice();\r\n\t\tfor (let i = 0; i < updatedRows.length; i++) {\r\n\t\t\tconst rowId = updatedRows[i];\r\n\t\t\tif (this.$gantt.getUserData(rowId, this.action_param, this._ganttMode)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected _setDefaultTransactionMode() {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t}\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\tprotected _getXmlNodeValue(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tprotected _getAllData() {\r\n\t\tconst out = {};\r\n\t\tlet hasOne = false;\r\n\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thasOne = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\r\n\t\treturn hasOne ? out : null;\r\n\t}\r\n\r\n\tprotected _prepareDate(value: Date) : string {\r\n\t\treturn this.$gantt.defined(this.$gantt.templates.xml_format) ? this.$gantt.templates.xml_format(value) : this.$gantt.templates.format_date(value);\r\n\t}\r\n\r\n\tprotected _prepareArray(value: any[], traversedObjects: object[]) : any[] {\r\n\t\ttraversedObjects.push(value);\r\n\r\n\t\treturn value.map((item) => {\r\n\t\t\tif(helpers.isDate(item)){\r\n\t\t\t\treturn this._prepareDate(item);\r\n\t\t\t} else if (Array.isArray(item) && !helpers.arrayIncludes(traversedObjects, item)){\r\n\t\t\t\treturn this._prepareArray(item, traversedObjects);\r\n\t\t\t} else if (item && typeof item === \"object\" && !helpers.arrayIncludes(traversedObjects, item)) {\r\n\t\t\t\treturn this._prepareObject(item, traversedObjects);\r\n\t\t\t} else {\r\n\t\t\t\treturn item;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprotected _prepareObject(rawItem: any, traversedObjects: object[]) : any {\r\n\t\tconst processedItem = {};\r\n\t\ttraversedObjects.push(rawItem);\r\n\r\n\t\tfor (const key in rawItem) {\r\n\t\t\tif (key.substr(0, 1) === \"$\") {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tconst value = rawItem[key];\r\n\t\t\tif (helpers.isDate(value)) {\r\n\t\t\t\tprocessedItem[key] = this._prepareDate(value);\r\n\t\t\t} else if(value === null) {\r\n\t\t\t\tprocessedItem[key] = \"\";\r\n\t\t\t} else if (Array.isArray(value) && !helpers.arrayIncludes(traversedObjects, value)){\r\n\t\t\t\tprocessedItem[key] = this._prepareArray(value, traversedObjects);\r\n\t\t\t} else if (value && typeof value === \"object\" && !helpers.arrayIncludes(traversedObjects, value)) {\r\n\t\t\t\tprocessedItem[key] = this._prepareObject(value, traversedObjects);\r\n\t\t\t} else {\r\n\t\t\t\tprocessedItem[key] = value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn processedItem;\r\n\t}\r\n\r\n\tprotected _prepareDataItem(rawItem: any): any {\r\n\t\tconst processedItem = this._prepareObject(rawItem, []);\r\n\r\n\t\tprocessedItem[this.action_param] = this.$gantt.getUserData(rawItem.id, this.action_param, this._ganttMode);\r\n\t\treturn processedItem;\r\n\t}\r\n\r\n\tprotected getStoredItem(id){\r\n\t\treturn this._storage.getStoredItem(id);\r\n\t}\r\n\r\n\tprotected _getRowData(id) {\r\n\t\tlet dataItem;\r\n\t\tconst gantt = this.$gantt;\r\n\t\tif (this.getGanttMode() === \"task\") {\r\n\t\t\tif(gantt.isTaskExists(id)){\r\n\t\t\t\tdataItem =this.$gantt.getTask(id);\r\n\t\t\t}\r\n\t\t} else if (this.getGanttMode() === \"assignment\") {\r\n\t\t\tif(this.$gantt.$data.assignmentsStore.exists(id)){\r\n\t\t\t\tdataItem =this.$gantt.$data.assignmentsStore.getItem(id);\r\n\t\t\t}\r\n\t\t} else if (this.getGanttMode() === \"baseline\") {\r\n\t\t\tif(this.$gantt.$data.baselineStore.exists(id)){\r\n\t\t\t\tdataItem =this.$gantt.$data.baselineStore.getItem(id);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(gantt.isLinkExists(id)){\r\n\t\t\t\tdataItem =this.$gantt.getLink(id);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = this.getStoredItem(id);\r\n\t\t}\r\n\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id };\r\n\t\t}\r\n\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n}","\r\nexport default function extendGantt(gantt: any, dp: any) {\r\n\tgantt.getUserData = function(id, name, store) {\r\n\t\tif (!this.userdata) {\r\n\t\t\tthis.userdata = {};\r\n\t\t}\r\n\t\tthis.userdata[store] = this.userdata[store] || {};\r\n\t\tif (this.userdata[store][id] && this.userdata[store][id][name]) {\r\n\t\t\treturn this.userdata[store][id][name];\r\n\t\t}\r\n\t\treturn \"\";\r\n\t};\r\n\tgantt.setUserData = function(id, name, value, store) {\r\n\t\tif (!this.userdata) {\r\n\t\t\tthis.userdata = {};\r\n\t\t}\r\n\t\tthis.userdata[store] = this.userdata[store] || {};\r\n\t\tthis.userdata[store][id] = this.userdata[store][id] || {};\r\n\t\tthis.userdata[store][id][name] = value;\r\n\t};\r\n\r\n\tgantt._change_id = function(oldId, newId) {\r\n\t\tswitch (this._dp._ganttMode) {\r\n\t\t\tcase \"task\":\r\n\t\t\t\tthis.changeTaskId(oldId, newId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"link\":\r\n\t\t\t\tthis.changeLinkId(oldId, newId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"assignment\":\r\n\t\t\t\tthis.$data.assignmentsStore.changeId(oldId, newId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"resource\":\r\n\t\t\t\tthis.$data.resourcesStore.changeId(oldId, newId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"baseline\":\r\n\t\t\t\tthis.$data.baselineStore.changeId(oldId, newId);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Error(`Invalid mode of the dataProcessor after database id is received: ${this._dp._ganttMode}, new id: ${newId}`);\r\n\t\t}\r\n\t};\r\n\r\n\tgantt._row_style = function(rowId, classname){\r\n\t\tif (this._dp._ganttMode !== \"task\") {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!gantt.isTaskExists(rowId)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst task = gantt.getTask(rowId);\r\n\t\ttask.$dataprocessor_class = classname;\r\n\t\tgantt.refreshTask(rowId);\r\n\t};\r\n\r\n\t// fake method for dataprocessor\r\n\tgantt._delete_task = function(rowId, node) {}; // tslint:disable-line\r\n\r\n\tgantt._sendTaskOrder = function(id, item){\r\n\t\tif (item.$drop_target) {\r\n\t\t\tthis._dp.setGanttMode(\"task\");\r\n\t\t\tthis.getTask(id).target = item.$drop_target;\r\n\t\t\tthis._dp.setUpdated(id, true,\"order\");\r\n\t\t\tdelete this.getTask(id).$drop_target;\r\n\t\t}\r\n\t};\r\n\r\n\tgantt.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\r\n\tgantt.setDp();\r\n}","import * as DataProcessor from \"./data_processor\";\r\nexport default {\r\n\tDEPRECATED_api: function(server) {\r\n\t\treturn new (DataProcessor.DataProcessor)(server);\r\n\t},\r\n\tcreateDataProcessor: DataProcessor.createDataProcessor\r\n};","import global from \"../../utils/global\";\r\n\r\nfunction createMethod(gantt){\r\n\tvar methods = {};\r\n\tvar isActive = false;\r\n\tfunction disableMethod(methodName, dummyMethod){\r\n\t\tdummyMethod = typeof dummyMethod == \"function\" ? dummyMethod : function(){};\r\n\r\n\t\tif(!methods[methodName]){\r\n\t\t\tmethods[methodName] = this[methodName];\r\n\t\t\tthis[methodName] = dummyMethod;\r\n\t\t}\r\n\t}\r\n\tfunction restoreMethod(methodName){\r\n\t\tif(methods[methodName]){\r\n\t\t\tthis[methodName] = methods[methodName];\r\n\t\t\tmethods[methodName] = null;\r\n\t\t}\r\n\t}\r\n\tfunction disableMethods(methodsHash){\r\n\t\tfor(var i in methodsHash){\r\n\t\t\tdisableMethod.call(this, i, methodsHash[i]);\r\n\t\t}\r\n\t}\r\n\tfunction restoreMethods(){\r\n\t\tfor(var i in methods){\r\n\t\t\trestoreMethod.call(this, i);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction batchUpdatePayload(callback){\r\n\t\ttry{\r\n\t\t\tcallback();\r\n\t\t}catch(e){\r\n\t\t\tglobal.console.error(e);\r\n\t\t}\r\n\t}\r\n\r\n\tvar state = gantt.$services.getService(\"state\");\r\n\tstate.registerProvider(\"batchUpdate\", function(){\r\n\t\treturn {\r\n\t\t\tbatch_update: isActive\r\n\t\t};\r\n\t}, false);\r\n\r\n\treturn function batchUpdate(callback, noRedraw) {\r\n\t\tif(isActive){\r\n\t\t\t// batch mode is already active\r\n\t\t\tbatchUpdatePayload(callback);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar call_dp = (this._dp && this._dp.updateMode != \"off\");\r\n\t\tvar dp_mode;\r\n\t\tif (call_dp){\r\n\t\t\tdp_mode = this._dp.updateMode;\r\n\t\t\tthis._dp.setUpdateMode(\"off\");\r\n\t\t}\r\n\r\n\t\t// temporary disable some methods while updating multiple tasks\r\n\t\tvar resetProjects = {};\r\n\t\tvar methods = {\r\n\t\t\t\"render\":true,\r\n\t\t\t\"refreshData\":true,\r\n\t\t\t\"refreshTask\":true,\r\n\t\t\t\"refreshLink\":true,\r\n\t\t\t\"resetProjectDates\":function(task){\r\n\t\t\t\tresetProjects[task.id] = task;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tdisableMethods.call(this, methods);\r\n\r\n\t\tisActive = true;\r\n\t\tthis.callEvent(\"onBeforeBatchUpdate\", []);\r\n\r\n\t\tbatchUpdatePayload(callback);\r\n\r\n\t\tthis.callEvent(\"onAfterBatchUpdate\", []);\r\n\r\n\t\trestoreMethods.call(this);\r\n\r\n\t\t// do required updates after changes applied\r\n\t\tfor(var i in resetProjects){\r\n\t\t\tthis.resetProjectDates(resetProjects[i]);\r\n\t\t}\r\n\r\n\t\tisActive = false;\r\n\r\n\t\tif(!noRedraw){\r\n\t\t\tthis.render();\r\n\t\t}\r\n\r\n\t\tif (call_dp) {\r\n\t\t\tthis._dp.setUpdateMode(dp_mode);\r\n\t\t\tthis._dp.setGanttMode(\"task\");\r\n\t\t\tthis._dp.sendData();\r\n\t\t\tthis._dp.setGanttMode(\"link\");\r\n\t\t\tthis._dp.sendData();\r\n\t\t}\r\n\t};\r\n\r\n\r\n\r\n}\r\n\r\nexport default function(gantt){\r\n\tgantt.batchUpdate = createMethod(gantt);\r\n};","var createWbs = (function(gantt){\r\n\treturn {\r\n\t_needRecalc: true,\r\n\treset: function(){\r\n\t\tthis._needRecalc = true;\r\n\t},\r\n\t_isRecalcNeeded: function(){\r\n\t\treturn (!this._isGroupSort() && this._needRecalc);\r\n\t},\r\n\t_isGroupSort: function() {\r\n\t\treturn !!(gantt.getState().group_mode);\r\n\t},\r\n\t_getWBSCode: function(task) {\r\n\t\tif(!task) return \"\";\r\n\r\n\t\tif(this._isRecalcNeeded()){\r\n\t\t\tthis._calcWBS();\r\n\t\t}\r\n\r\n\t\tif(task.$virtual) return \"\";\r\n\t\tif(this._isGroupSort()) return task.$wbs || \"\";\r\n\r\n\t\tif(!task.$wbs) {\r\n\t\t\tthis.reset();\r\n\t\t\tthis._calcWBS();\r\n\t\t}\r\n\t\treturn task.$wbs;\r\n\t},\r\n\t_setWBSCode: function(task, value) {\r\n\t\ttask.$wbs = value;\r\n\t},\r\n\tgetWBSCode: function(task) {\r\n\t\treturn this._getWBSCode(task);\r\n\t},\r\n\tgetByWBSCode: function(code){\r\n\t\tvar parts = code.split(\".\");\r\n\t\tvar currentNode = gantt.config.root_id;\r\n\t\tfor(var i = 0; i < parts.length; i++){\r\n\t\t\tvar children = gantt.getChildren(currentNode);\r\n\t\t\tvar index = parts[i]*1 - 1;\r\n\t\t\tif(gantt.isTaskExists(children[index])){\r\n\t\t\t\tcurrentNode = children[index];\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(gantt.isTaskExists(currentNode)){\r\n\t\t\treturn gantt.getTask(currentNode);\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t},\r\n\t_calcWBS: function() {\r\n\t\tif(!this._isRecalcNeeded()) return;\r\n\r\n\t\tvar _isFirst = true;\r\n\t\tgantt.eachTask(function(ch) {\r\n\t\t\tif(_isFirst) {\r\n\t\t\t\t_isFirst = false;\r\n\t\t\t\tthis._setWBSCode(ch, \"1\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar _prevSibling = gantt.getPrevSibling(ch.id);\r\n\t\t\tif (_prevSibling !== null) {\r\n\t\t\t\tvar _wbs = gantt.getTask(_prevSibling).$wbs;\r\n\t\t\t\tif(_wbs) {\r\n\t\t\t\t\t_wbs = _wbs.split(\".\");\r\n\t\t\t\t\t_wbs[_wbs.length-1]++;\r\n\t\t\t\t\tthis._setWBSCode(ch, _wbs.join(\".\"));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tvar _parent = gantt.getParent(ch.id);\r\n\t\t\t\tthis._setWBSCode(ch, gantt.getTask(_parent).$wbs + \".1\");\r\n\t\t\t}\r\n\t\t}, gantt.config.root_id, this);\r\n\r\n\t\tthis._needRecalc = false;\r\n\t}\r\n};\r\n});\r\n\r\nexport default function(gantt){\r\n\tvar wbs = createWbs(gantt);\r\n\tgantt.getWBSCode = function getWBSCode(task) {\r\n\t\treturn wbs.getWBSCode(task);\r\n\t};\r\n\r\n\tgantt.getTaskByWBSCode = function(code) {\r\n\t\treturn wbs.getByWBSCode(code);\r\n\t};\r\n\r\n\tfunction resetCache(){\r\n\t\twbs.reset();\r\n\t\treturn true;\r\n\t}\r\n\r\n\tgantt.attachEvent(\"onAfterTaskMove\", resetCache);\r\n\tgantt.attachEvent(\"onBeforeParse\", resetCache);\r\n\tgantt.attachEvent(\"onAfterTaskDelete\", resetCache);\r\n\tgantt.attachEvent(\"onAfterTaskAdd\", resetCache);\r\n\tgantt.attachEvent(\"onAfterSort\", resetCache);\r\n\r\n};\r\n","import * as helpers from \"../../utils/helpers\";\r\n\r\nfunction createResourceMethods(gantt){\r\n\r\n\tvar resourceTaskCache = {};\r\n\tvar singleResourceCacheBuilt = false;\r\n\r\n\tgantt.$data.tasksStore.attachEvent(\"onStoreUpdated\", function(){\r\n\t\tresourceTaskCache = {};\r\n\t\tsingleResourceCacheBuilt = false;\r\n\t});\r\n\tgantt.attachEvent(\"onBeforeGanttRender\", function(){\r\n\t\tresourceTaskCache = {};\r\n\t});\r\n\r\n\tfunction getTaskBy(propertyName, propertyValue, typeFilter) {\r\n\t\tif (typeof propertyName == \"function\") {\r\n\t\t\treturn filterResourceTasks(propertyName);\r\n\t\t} else {\r\n\t\t\tif (helpers.isArray(propertyValue)) {\r\n\t\t\t\treturn getResourceTasks(propertyName, propertyValue, typeFilter);\r\n\t\t\t} else {\r\n\t\t\t\treturn getResourceTasks(propertyName, [propertyValue], typeFilter);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction filterResourceTasks(filter) {\r\n\t\tvar res = [];\r\n\t\tgantt.eachTask(function (task) {\r\n\t\t\tif (filter(task)) {\r\n\t\t\t\tres.push(task);\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn res;\r\n\t}\r\n\r\n\tvar falsyValuePrefix = String(Math.random());\r\n\tfunction resourceHashFunction(value){\r\n\t\tif (value === null){\r\n\t\t\treturn falsyValuePrefix + String(value);\r\n\t\t}\r\n\t\treturn String(value);\r\n\t}\r\n\r\n\tfunction getCacheKey(resourceIds, property, typeFilter) {\r\n\t\tif (Array.isArray(resourceIds)) {\r\n\t\t\treturn resourceIds.map(function (value) {\r\n\t\t\t\treturn resourceHashFunction(value);\r\n\t\t\t}).join(\"_\") + `_${property}_${typeFilter}`;\r\n\t\t} else {\r\n\t\t\treturn resourceHashFunction(resourceIds) + `_${property}_${typeFilter}`;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getResourceTasks(property, resourceIds, typeFilter) {\r\n\t\tvar res;\r\n\t\tvar cacheKey = getCacheKey(resourceIds, property, JSON.stringify(typeFilter));\r\n\t\tvar matchingResources = {};\r\n\t\thelpers.forEach(resourceIds, function(resourceId) {\r\n\t\t\tmatchingResources[resourceHashFunction(resourceId)] = true;\r\n\t\t});\r\n\r\n\t\tif (!resourceTaskCache[cacheKey]) {\r\n\t\t\tres = resourceTaskCache[cacheKey] = [];\r\n\t\t\tgantt.eachTask(function (task) {\r\n\t\t\t\tif (typeFilter) {\r\n\t\t\t\t\tif (!typeFilter[gantt.getTaskType(task)]) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (task.type == gantt.config.types.project) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (property in task) {\r\n\t\t\t\t\tvar resourceValue;\r\n\t\t\t\t\tif (!helpers.isArray(task[property])) {\r\n\t\t\t\t\t\tresourceValue = [task[property]];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tresourceValue = task[property];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\thelpers.forEach(resourceValue, function(value) {\r\n\t\t\t\t\t\tvar resourceValue = (value && value.resource_id) ? value.resource_id : value;\r\n\r\n\t\t\t\t\t\tif (matchingResources[resourceHashFunction(resourceValue)]) {\r\n\t\t\t\t\t\t\tres.push(task);\r\n\t\t\t\t\t\t}else if(!singleResourceCacheBuilt){\r\n\r\n\t\t\t\t\t\t\tvar key = getCacheKey(value, property);\r\n\t\t\t\t\t\t\tif(!resourceTaskCache[key]){\r\n\t\t\t\t\t\t\t\tresourceTaskCache[key] = [];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresourceTaskCache[key].push(task);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tsingleResourceCacheBuilt = true;\r\n\t\t} else {\r\n\t\t\tres = resourceTaskCache[cacheKey];\r\n\t\t}\r\n\r\n\t\treturn res;\r\n\t}\r\n\r\n\tfunction selectAssignments(resourceId, taskId, result){\r\n\t\tvar property = gantt.config.resource_property;\r\n\t\tvar owners = [];\r\n\t\tif (gantt.getDatastore(\"task\").exists(taskId)) {\r\n\t\t\tvar task = gantt.getTask(taskId);\r\n\t\t\towners = task[property] || [];\r\n\t\t}\r\n\r\n\t\tif (!Array.isArray(owners)) {\r\n\t\t\towners = [owners];\r\n\t\t}\r\n\t\tfor (var i = 0; i < owners.length; i++) {\r\n\t\t\tif (owners[i].resource_id == resourceId) {\r\n\t\t\t\tresult.push({task_id: task.id, resource_id:owners[i].resource_id, value:owners[i].value});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getResourceAssignments(resourceId, taskId){\r\n\t\t// resource assignment as an independent module:\r\n\t\t// {taskId:, resourceId, value}\r\n\t\t// TODO: probably should add a separate datastore for these\r\n\t\tvar assignments = [];\r\n\t\tvar property = gantt.config.resource_property;\r\n\t\tif(taskId !== undefined){\r\n\t\t\tselectAssignments(resourceId, taskId, assignments);\r\n\t\t}else{\r\n\t\t\tvar tasks = gantt.getTaskBy(property, resourceId);\r\n\t\t\ttasks.forEach(function(task){\r\n\t\t\t\tselectAssignments(resourceId, task.id, assignments);\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn assignments;\r\n\t}\r\n\r\n\treturn {\r\n\t\tgetTaskBy: getTaskBy,\r\n\t\tgetResourceAssignments: getResourceAssignments\r\n\t};\r\n}\r\n\r\nfunction createHelper(gantt){\r\n\tconst resourcePlugin = {\r\n\t\trenderEditableLabel: function(start_date, end_date, resource, tasks, assignments){\r\n\t\t\tconst editable = gantt.config.readonly ? \"\" : \"contenteditable\";\r\n\t\t\tif(start_date < resource.end_date && end_date > resource.start_date){\r\n\t\t\t\tfor(let i = 0; i < assignments.length; i++){\r\n\t\t\t\t\tconst a = assignments[i];\r\n\t\t\t\t\t\treturn \"
\" + a.value + \"
\";\r\n\t\t\t\t}\r\n\t\t\t\treturn \"
-
\";\r\n\t\t\t}\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\trenderSummaryLabel: function(start_date, end_date, resource, tasks, assignments){\r\n\t\t\tlet sum = assignments.reduce(function(total, assignment){ \r\n\t\t\t\treturn total + Number(assignment.value);\r\n\t\t\t}, 0);\r\n\r\n\t\t\tif(sum % 1){\r\n\t\t\t\tsum = Math.round(sum * 10)/10;\r\n\t\t\t}\r\n\r\n\t\t\tif(sum){\r\n\t\t\t\treturn \"
\" + sum + \"
\";\r\n\t\t\t}\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\teditableResourceCellTemplate: function(start_date, end_date, resource, tasks, assignments){\r\n\t\t\tif(resource.$role === \"task\"){\r\n\t\t\t\treturn resourcePlugin.renderEditableLabel(start_date, end_date, resource, tasks, assignments);\r\n\t\t\t}else{\r\n\t\t\t\treturn resourcePlugin.renderSummaryLabel(start_date, end_date, resource, tasks, assignments);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\t\r\n\t\teditableResourceCellClass: function(start_date, end_date, resource, tasks, assignments){\r\n\t\t\tconst css = [];\r\n\t\t\tcss.push(\"resource_marker\");\r\n\r\n\t\t\tif(resource.$role === \"task\"){\r\n\t\t\t\tcss.push(\"task_cell\");\r\n\t\t\t}else{\r\n\t\t\t\tcss.push(\"resource_cell\");\r\n\t\t\t}\r\n\r\n\t\t\tconst sum = assignments.reduce(function(total, assignment){ \r\n\t\t\t\treturn total + Number(assignment.value);\r\n\t\t\t}, 0);\r\n\r\n\t\t\tlet capacity = Number(resource.capacity);\r\n\t\t\tif(isNaN(capacity)){\r\n\t\t\t\tcapacity = 8;\r\n\t\t\t}\r\n\t\t\tif (sum <= capacity) {\r\n\t\t\t\tcss.push(\"workday_ok\");\r\n\t\t\t} else {\r\n\t\t\t\tcss.push(\"workday_over\");\r\n\t\t\t}\r\n\t\t\treturn css.join(\" \");\r\n\t\t},\r\n\t\tgetSummaryResourceAssignments: function getResourceAssignments(resourceId) {\r\n\t\t\tlet assignments;\r\n\t\t\tconst store = gantt.getDatastore(gantt.config.resource_store);\r\n\t\t\tconst resource = store.getItem(resourceId);\r\n\r\n\t\t\tif(resource.$role === \"task\"){\r\n\t\t\t\tassignments = gantt.getResourceAssignments(resource.$resource_id, resource.$task_id);\r\n\t\t\t}else{\r\n\t\t\t\tassignments = gantt.getResourceAssignments(resourceId);\r\n\t\t\t\tif(store.eachItem){\r\n\t\t\t\t\tstore.eachItem(function(childResource){\r\n\t\t\t\t\t\tif(childResource.$role !== \"task\"){\r\n\t\t\t\t\t\t\tassignments = assignments.concat(gantt.getResourceAssignments(childResource.id));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, resourceId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn assignments;\r\n\t\t},\r\n\t\t\r\n\t\tinitEditableDiagram: function(){\r\n\t\t\tgantt.config.resource_render_empty_cells = true;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t(function(){\r\n\t\t\t\t/// salesforce locker workaround\r\n\t\t\t\t// SF removes 'contenteditable' attribute from cells\r\n\t\t\t\t// restore it on render\r\n\t\t\t\tlet timeoutId = null;\r\n\t\t\t\tfunction makeEditable() {\r\n\t\t\t\t\tif (timeoutId) {\r\n\t\t\t\t\t\tcancelAnimationFrame(timeoutId);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttimeoutId = requestAnimationFrame(function () {\r\n\t\t\t\t\t\tif (gantt.$container){\r\n\t\t\t\t\t\t\tvar cells = Array.prototype.slice.call(gantt.$container.querySelectorAll(\".resourceTimeline_cell [data-assignment-cell]\"));\r\n\t\t\t\t\t\t\tcells.forEach(function (cell) {\r\n\t\t\t\t\t\t\t\tcell.contentEditable = true;\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tgantt.attachEvent(\"onGanttReady\", function(){\r\n\t\t\t\t\tgantt.getDatastore(gantt.config.resource_assignment_store).attachEvent(\"onStoreUpdated\", makeEditable);\r\n\t\t\t\t\tgantt.getDatastore(gantt.config.resource_store).attachEvent(\"onStoreUpdated\", makeEditable);\r\n\t\t\t\t}, {once: true});\r\n\t\t\t\tgantt.attachEvent(\"onGanttLayoutReady\", function(){\r\n\t\t\t\t\tconst ganttViews = gantt.$layout.getCellsByType(\"viewCell\");\r\n\t\t\t\t\tganttViews.forEach(function(view){\r\n\t\t\t\t\t\tif(view.$config && view.$config.view === \"resourceTimeline\" && view.$content){\r\n\t\t\t\t\t\t\tview.$content.attachEvent(\"onScroll\", makeEditable);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t})();\r\n\r\n\r\n\t\t\tgantt.attachEvent(\"onGanttReady\", function(){\r\n\t\t\t\tlet assignmentEditInProcess = false;\r\n\t\t\t\tgantt.event(gantt.$container, \"keypress\", function(e){\r\n\t\t\t\t\tvar target = e.target.closest(\".resourceTimeline_cell [data-assignment-cell]\");\r\n\t\t\t\t\tif(target){\r\n\t\t\t\t\t\tif (e.keyCode === 13 || e.keyCode === 27) {\r\n\t\t\t\t\t\t\ttarget.blur();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tgantt.event(gantt.$container, \"focusout\", function(e){\r\n\t\t\t\t\tif (assignmentEditInProcess){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tassignmentEditInProcess = true;\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tassignmentEditInProcess = false;\r\n\t\t\t\t\t}, 300);\r\n\t\t\t\t\tvar target = e.target.closest(\".resourceTimeline_cell [data-assignment-cell]\");\r\n\t\t\t\t\tif(target){\r\n\t\t\t\t\t\tvar strValue = (target.innerText || \"\").trim();\r\n\t\t\t\t\t\tif(strValue == \"-\"){\r\n\t\t\t\t\t\t\tstrValue = \"0\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar value = Number(strValue);\r\n\t\t\t\t\t\tvar rowId = target.getAttribute(\"data-row-id\");\r\n\t\t\t\t\t\tvar assignmentId = target.getAttribute(\"data-assignment-id\");\r\n\t\t\t\t\t\tvar taskId = target.getAttribute(\"data-task\");\r\n\t\t\t\t\t\tvar resourceId = target.getAttribute(\"data-resource-id\");\r\n\t\t\t\t\t\tvar startDate = gantt.templates.parse_date(target.getAttribute(\"data-start-date\"));\r\n\t\t\t\t\t\tvar endDate = gantt.templates.parse_date(target.getAttribute(\"data-end-date\"));\r\n\r\n\t\t\t\t\t\tvar assignmentStore = gantt.getDatastore(gantt.config.resource_assignment_store);\r\n\t\t\t\t\t\tif(isNaN(value)){\r\n\t\t\t\t\t\t\tgantt.getDatastore(gantt.config.resource_store).refresh(rowId);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tvar task = gantt.getTask(taskId);\r\n\t\t\t\t\t\t\t// GS-2141. Track the changes by the Undo extension\r\n\t\t\t\t\t\t\tif (gantt.plugins().undo){\r\n\t\t\t\t\t\t\t\tgantt.ext.undo.saveState(taskId, \"task\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(assignmentId){\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tvar assignment = assignmentStore.getItem(assignmentId);\r\n\t\t\t\t\t\t\t\tif(value === assignment.value){\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif(assignment.start_date.valueOf() === startDate.valueOf() && assignment.end_date.valueOf() === endDate.valueOf()){\r\n\t\t\t\t\t\t\t\t\tassignment.value = value;\r\n\t\t\t\t\t\t\t\t\tif(!value){\r\n\t\t\t\t\t\t\t\t\t\tassignmentStore.removeItem(assignment.id);\r\n\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\tassignmentStore.updateItem(assignment.id);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tif(assignment.end_date.valueOf() > endDate.valueOf()){\r\n\t\t\t\t\t\t\t\t\t\tvar nextChunk = gantt.copy(assignment);\r\n\t\t\t\t\t\t\t\t\t\tnextChunk.id = gantt.uid();\r\n\t\t\t\t\t\t\t\t\t\tnextChunk.start_date = endDate;\r\n\t\t\t\t\t\t\t\t\t\tnextChunk.duration = gantt.calculateDuration({\r\n\t\t\t\t\t\t\t\t\t\t\tstart_date: nextChunk.start_date,\r\n\t\t\t\t\t\t\t\t\t\t\tend_date: nextChunk.end_date,\r\n\t\t\t\t\t\t\t\t\t\t\ttask: task\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\tnextChunk.delay = gantt.calculateDuration({\r\n\t\t\t\t\t\t\t\t\t\t\tstart_date: task.start_date,\r\n\t\t\t\t\t\t\t\t\t\t\tend_date: nextChunk.start_date,\r\n\t\t\t\t\t\t\t\t\t\t\ttask: task\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\tnextChunk.mode = assignment.mode || \"default\";\r\n\t\t\t\t\t\t\t\t\t\tif(nextChunk.duration !== 0){\r\n\t\t\t\t\t\t\t\t\t\t\tassignmentStore.addItem(nextChunk);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif(assignment.start_date.valueOf() < startDate.valueOf()){\r\n\t\t\t\t\t\t\t\t\t\tassignment.end_date = startDate;\r\n\t\t\t\t\t\t\t\t\t\tassignment.duration = gantt.calculateDuration({\r\n\t\t\t\t\t\t\t\t\t\t\tstart_date: assignment.start_date,\r\n\t\t\t\t\t\t\t\t\t\t\tend_date: assignment.end_date,\r\n\t\t\t\t\t\t\t\t\t\t\ttask: task\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\tassignment.mode = \"fixedDuration\";\r\n\r\n\t\t\t\t\t\t\t\t\t\tif(assignment.duration === 0){\r\n\t\t\t\t\t\t\t\t\t\t\tassignmentStore.removeItem(assignment.id);\r\n\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\tassignmentStore.updateItem(assignment.id);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\tassignmentStore.removeItem(assignment.id);\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif(value){\r\n\t\t\t\t\t\t\t\t\t\tassignmentStore.addItem({\r\n\t\t\t\t\t\t\t\t\t\t\ttask_id: assignment.task_id,\r\n\t\t\t\t\t\t\t\t\t\t\tresource_id: assignment.resource_id,\r\n\t\t\t\t\t\t\t\t\t\t\tvalue: value,\r\n\t\t\t\t\t\t\t\t\t\t\tstart_date: startDate,\r\n\t\t\t\t\t\t\t\t\t\t\tend_date: endDate,\r\n\t\t\t\t\t\t\t\t\t\t\tduration: gantt.calculateDuration({\r\n\t\t\t\t\t\t\t\t\t\t\t\tstart_date: startDate,\r\n\t\t\t\t\t\t\t\t\t\t\t\tend_date: endDate,\r\n\t\t\t\t\t\t\t\t\t\t\t\ttask: task\r\n\t\t\t\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\t\t\t\tdelay: gantt.calculateDuration({\r\n\t\t\t\t\t\t\t\t\t\t\t\tstart_date: task.start_date,\r\n\t\t\t\t\t\t\t\t\t\t\t\tend_date: startDate,\r\n\t\t\t\t\t\t\t\t\t\t\t\ttask: task\r\n\t\t\t\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\t\t\t\tmode: \"fixedDuration\"\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tgantt.updateTaskAssignments(task.id);\r\n\t\t\t\t\t\t\t\tgantt.updateTask(task.id);\r\n\t\t\t\t\t\t\t}else if(value){\r\n\t\t\t\t\t\t\t\tvar assignment = {\r\n\t\t\t\t\t\t\t\t\ttask_id: taskId,\r\n\t\t\t\t\t\t\t\t\tresource_id: resourceId,\r\n\t\t\t\t\t\t\t\t\tvalue: value,\r\n\t\t\t\t\t\t\t\t\tstart_date: startDate,\r\n\t\t\t\t\t\t\t\t\tend_date: endDate,\r\n\t\t\t\t\t\t\t\t\tduration: gantt.calculateDuration({\r\n\t\t\t\t\t\t\t\t\t\tstart_date: startDate,\r\n\t\t\t\t\t\t\t\t\t\tend_date: endDate,\r\n\t\t\t\t\t\t\t\t\t\ttask: task\r\n\t\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\t\tdelay: gantt.calculateDuration({\r\n\t\t\t\t\t\t\t\t\t\tstart_date: task.start_date,\r\n\t\t\t\t\t\t\t\t\t\tend_date: startDate,\r\n\t\t\t\t\t\t\t\t\t\ttask: task\r\n\t\t\t\t\t\t\t\t\t}),\r\n\t\t\t\t\t\t\t\t\tmode: \"fixedDuration\"\r\n\t\t\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\t\tassignmentStore.addItem(assignment);\r\n\t\t\t\t\t\t\t\tgantt.updateTaskAssignments(task.id);\r\n\t\t\t\t\t\t\t\tgantt.updateTask(task.id);\r\n\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\t};\r\n\treturn resourcePlugin;\r\n}\r\n\r\nexport default function(gantt){\r\n\tvar methods = createResourceMethods(gantt);\r\n\t\r\n\tgantt.ext.resources = createHelper(gantt);\r\n\r\n\tgantt.config.resources = {\r\n\t\tdataprocessor_assignments: false,\r\n\t\tdataprocessor_resources: false,\r\n\t\teditable_resource_diagram: false,\r\n\t\tresource_store: {\r\n\t\t\ttype: \"treeDataStore\",\r\n\t\t\tfetchTasks: false,\r\n\t\t\tinitItem: function(item) {\r\n\t\t\t\titem.parent = item.parent || gantt.config.root_id;\r\n\t\t\t\titem[gantt.config.resource_property] = item.parent;\r\n\t\t\t\titem.open = true;\r\n\t\t\t\treturn item;\r\n\t\t\t}\r\n\t\t},\r\n\t\tlightbox_resources: function selectResourceControlOptions(resources){\r\n\t\t\tconst lightboxOptions = [];\r\n\t\t\tconst store = gantt.getDatastore(gantt.config.resource_store);\r\n\t\t\tresources.forEach(function(res) {\r\n\t\t\t\tif (!store.hasChild(res.id)) {\r\n\t\t\t\t\tconst copy = gantt.copy(res);\r\n\t\t\t\t\tcopy.key = res.id;\r\n\t\t\t\t\tcopy.label = res.text;\r\n\t\t\t\t\tlightboxOptions.push(copy);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn lightboxOptions;\r\n\t\t}\r\n\t};\r\n\r\n\tgantt.attachEvent(\"onBeforeGanttReady\", function(){\r\n\t\tif(gantt.getDatastore(gantt.config.resource_store)){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst resourceStoreConfig = gantt.config.resources ? gantt.config.resources.resource_store : undefined;\r\n\t\tlet fetchTasks = resourceStoreConfig ? resourceStoreConfig.fetchTasks : undefined;\r\n\t\tif(gantt.config.resources && gantt.config.resources.editable_resource_diagram){\r\n\t\t\tfetchTasks = true;\r\n\t\t}\r\n\r\n\t\tlet initItems = function(item) {\r\n\t\t\titem.parent = item.parent || gantt.config.root_id;\r\n\t\t\titem[gantt.config.resource_property] = item.parent;\r\n\t\t\titem.open = true;\r\n\t\t\treturn item;\r\n\t\t};\r\n\r\n\t\tif(resourceStoreConfig && resourceStoreConfig.initItem){\r\n\t\t\tinitItems = resourceStoreConfig.initItem;\r\n\t\t}\r\n\r\n\t\tconst storeType = resourceStoreConfig && resourceStoreConfig.type ? resourceStoreConfig.type : \"treeDatastore\";\r\n\r\n\t\tgantt.$resourcesStore = gantt.createDatastore({\r\n\t\t\tname: gantt.config.resource_store,\r\n\t\t\ttype: storeType,\r\n\t\t\tfetchTasks: fetchTasks !== undefined ? fetchTasks : false,\r\n\t\t\tinitItem: initItems\r\n\t\t});\r\n\r\n\t\tgantt.$data.resourcesStore = gantt.$resourcesStore;\r\n\r\n\t\tgantt.$resourcesStore.attachEvent(\"onParse\", function() {\r\n\t\t\tfunction selectResourceControlOptions(resources){\r\n\t\t\t\tconst lightboxOptions = [];\r\n\t\t\t\tresources.forEach(function(res) {\r\n\t\t\t\t\tif (!gantt.$resourcesStore.hasChild(res.id)) {\r\n\t\t\t\t\t\tvar copy = gantt.copy(res);\r\n\t\t\t\t\t\tcopy.key = res.id;\r\n\t\t\t\t\t\tcopy.label = res.text;\r\n\t\t\t\t\t\tlightboxOptions.push(copy);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\treturn lightboxOptions;\r\n\t\t\t}\r\n\r\n\t\t\tlet lightboxOptionsFnc = selectResourceControlOptions;\r\n\t\t\tif(gantt.config.resources && gantt.config.resources.lightbox_resources){\r\n\t\t\t\tlightboxOptionsFnc = gantt.config.resources.lightbox_resources;\r\n\t\t\t}\r\n\r\n\t\t\tconst options = lightboxOptionsFnc(gantt.$resourcesStore.getItems());\r\n\r\n\t\t\tgantt.updateCollection(\"resourceOptions\", options);\r\n\t\t});\r\n\t});\r\n\r\n\tgantt.getTaskBy = methods.getTaskBy;\r\n\tgantt.getResourceAssignments = methods.getResourceAssignments;\r\n\tgantt.config.resource_property = \"owner_id\";\r\n\tgantt.config.resource_store = \"resource\";\r\n\tgantt.config.resource_render_empty_cells = false;\r\n\r\n\t/**\r\n\t * these are placeholder functions that should be redefined by the user\r\n\t*/\r\n\tgantt.templates.histogram_cell_class = function(start_date, end_date, resource, tasks, assignments) {};\r\n\tgantt.templates.histogram_cell_label = function(start_date, end_date, resource, tasks, assignments) {\r\n\t\treturn tasks.length + \"/3\";\r\n\t};\r\n\tgantt.templates.histogram_cell_allocated = function(start_date, end_date, resource, tasks, assignments) {\r\n\t\treturn tasks.length / 3;\r\n\t};\r\n\tgantt.templates.histogram_cell_capacity = function(start_date, end_date, resource, tasks, assignments) {\r\n\t\treturn 0;\r\n\t};\r\n\r\n\r\n\tconst defaultResourceCellClass = function(start, end, resource, tasks, assignments) {\r\n\t\tvar css = \"\";\r\n\t\tif (tasks.length <= 1) {\r\n\t\t\tcss = \"gantt_resource_marker_ok\";\r\n\t\t} else {\r\n\t\t\tcss = \"gantt_resource_marker_overtime\";\r\n\t\t}\r\n\t\treturn css;\r\n\t};\r\n\r\n\tconst defaultResourceCellTemplate = function(start, end, resource, tasks, assignments) {\r\n\t\treturn tasks.length * 8;\r\n\t};\r\n\r\n\tgantt.templates.resource_cell_value = defaultResourceCellTemplate;\r\n\tgantt.templates.resource_cell_class = defaultResourceCellClass;\r\n\r\n\t//editable_resource_diagram\r\n\tgantt.attachEvent(\"onBeforeGanttReady\", function(){\r\n\t\tif(gantt.config.resources && gantt.config.resources.editable_resource_diagram){\r\n\r\n\t\t\tgantt.config.resource_render_empty_cells = true;\r\n\t\t\tif(gantt.templates.resource_cell_value === defaultResourceCellTemplate){\r\n\t\t\t\tgantt.templates.resource_cell_value = gantt.ext.resources.editableResourceCellTemplate;\r\n\t\t\t}\r\n\t\t\tif(gantt.templates.resource_cell_class === defaultResourceCellClass){\r\n\t\t\t\tgantt.templates.resource_cell_class = gantt.ext.resources.editableResourceCellClass;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tgantt.ext.resources.initEditableDiagram(gantt);\r\n\t\t}\r\n\t});\r\n};\r\n\r\n\r\n","export default function (gantt) {\r\n\tvar resourceAssignmentsProperty = \"$resourceAssignments\";\r\n\tgantt.config.resource_assignment_store = \"resourceAssignments\";\r\n\tgantt.config.process_resource_assignments = true;\r\n\r\n\tvar resourceAssignmentFormats = {\r\n\t\tauto: \"auto\",\r\n\t\tsingleValue: \"singleValue\",\r\n\t\tvalueArray: \"valueArray\",\r\n\t\tresourceValueArray: \"resourceValueArray\",\r\n\t\tassignmentsArray: \"assignmentsArray\"\r\n\t};\r\n\tvar resourceAssignmentFormat = resourceAssignmentFormats.auto;//\"primitiveSingle\";//\"primitive\";//\"object\"|\"assignment\"\r\n\r\n\tvar assignmentModes = {\r\n\t\tfixedDates: \"fixedDates\",\r\n\t\tfixedDuration: \"fixedDuration\",\r\n\t\tdefault: \"default\"\r\n\t};\r\n\r\n\r\n\tfunction initAssignmentFields(item, task){\r\n\t\tif (item.start_date) {\r\n\t\t\titem.start_date = gantt.date.parseDate(item.start_date, \"parse_date\");\r\n\t\t} else {\r\n\t\t\titem.start_date = null;\r\n\t\t}\r\n\r\n\t\tif (item.end_date) {\r\n\t\t\titem.end_date = gantt.date.parseDate(item.end_date, \"parse_date\");\r\n\t\t} else {\r\n\t\t\titem.end_date = null;\r\n\t\t}\r\n\r\n\t\tvar delay = Number(item.delay);\r\n\t\tvar initDelay = false;\r\n\t\tif (!isNaN(delay)) {\r\n\t\t\titem.delay = delay;\r\n\t\t} else {\r\n\t\t\titem.delay = 0;\r\n\t\t\tinitDelay = true;\r\n\t\t}\r\n\r\n\t\tif (!gantt.defined(item.value)) {\r\n\t\t\titem.value = null;\r\n\t\t}\r\n\r\n\t\tif (!item.task_id || !item.resource_id) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\titem.mode = item.mode || assignmentModes.default;\r\n\r\n\t\tif(item.mode === assignmentModes.fixedDuration){\r\n\t\t\tif(isNaN(Number(item.duration))){\r\n\t\t\t\ttask = task || gantt.getTask(item.task_id);\r\n\t\t\t\titem.duration = gantt.calculateDuration({\r\n\t\t\t\t\tstart_date: item.start_date,\r\n\t\t\t\t\tend_date: item.end_date,\r\n\t\t\t\t\tid: task\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif(initDelay){\r\n\t\t\t\ttask = task || gantt.getTask(item.task_id);\r\n\t\t\t\titem.delay = gantt.calculateDuration({\r\n\t\t\t\t\tstart_date: task.start_date,\r\n\t\t\t\t\tend_date: item.start_date,\r\n\t\t\t\t\tid: task\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (item.mode !== assignmentModes.fixedDates && (task || gantt.isTaskExists(item.task_id))) {\r\n\t\t\ttask = task || gantt.getTask(item.task_id);\r\n\t\t\tvar timing = _assignmentTimeFromTask(item, task);\r\n\t\t\titem.start_date = timing.start_date;\r\n\t\t\titem.end_date = timing.end_date;\r\n\t\t\titem.duration = timing.duration;\r\n\t\t}\r\n\t}\r\n\t// gantt init\r\n\tvar resourceAssignmentsStore = gantt.createDatastore({\r\n\t\tname: gantt.config.resource_assignment_store,\r\n\t\tinitItem: function (item) {\r\n\t\t\tif (!item.id) {\r\n\t\t\t\titem.id = gantt.uid();\r\n\t\t\t}\r\n\r\n\t\t\tinitAssignmentFields(item);\r\n\r\n\t\t\treturn item;\r\n\t\t}\r\n\t});\r\n\t\r\n\tgantt.$data.assignmentsStore = resourceAssignmentsStore;\r\n\r\n\tfunction _assignmentTimeFromTask(assignment, task) {\r\n\r\n\t\tif (assignment.mode === assignmentModes.fixedDates) {\r\n\t\t\treturn {\r\n\t\t\t\tstart_date: assignment.start_date,\r\n\t\t\t\tend_date: assignment.end_date,\r\n\t\t\t\tduration: assignment.duration\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tvar start = assignment.delay ? gantt.calculateEndDate({\r\n\t\t\t\tstart_date: task.start_date,\r\n\t\t\t\tduration: assignment.delay,\r\n\t\t\t\ttask: task\r\n\t\t\t}) : new Date(task.start_date);\r\n\r\n\t\t\tvar end;\r\n\t\t\tvar duration;\r\n\t\t\tif (assignment.mode === assignmentModes.fixedDuration) {\r\n\t\t\t\tend = gantt.calculateEndDate({\r\n\t\t\t\t\tstart_date: start,\r\n\t\t\t\t\tduration: assignment.duration,\r\n\t\t\t\t\ttask: task\r\n\t\t\t\t});\r\n\t\t\t\tduration = assignment.duration;\r\n\t\t\t} else {\r\n\t\t\t\tend = new Date(task.end_date);\r\n\t\t\t\tduration = task.duration - assignment.delay;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tstart_date: start,\r\n\t\t\tend_date: end,\r\n\t\t\tduration: duration\r\n\t\t};\r\n\t}\r\n\r\n\t// data loading\r\n\r\n\tfunction _makeAssignmentsFromTask(task) {\r\n\t\tconst property = gantt.config.resource_property;\r\n\t\tlet assignments = task[property];\r\n\t\tconst resourceAssignments = [];\r\n\t\tlet detectFormat = resourceAssignmentFormat === resourceAssignmentFormats.auto;\r\n\r\n\t\tif (gantt.defined(assignments) && assignments) {\r\n\t\t\tif (!Array.isArray(assignments)) {\r\n\t\t\t\tassignments = [assignments];\r\n\t\t\t\tif (detectFormat) {\r\n\t\t\t\t\tresourceAssignmentFormat = resourceAssignmentFormats.singleValue;\r\n\t\t\t\t\tdetectFormat = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst usedIds = {};\r\n\t\t\tassignments.forEach(function (res) {\r\n\t\t\t\tif (!res.resource_id) { // when resource is a string/number\r\n\t\t\t\t\tres = { resource_id: res };\r\n\t\t\t\t\tif (detectFormat) {\r\n\t\t\t\t\t\tresourceAssignmentFormat = resourceAssignmentFormats.valueArray;\r\n\t\t\t\t\t\tdetectFormat = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//\tisSimpleArray = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (detectFormat) {\r\n\t\t\t\t\tif (res.id && res.resource_id) {\r\n\t\t\t\t\t\tresourceAssignmentFormat = resourceAssignmentFormats.assignmentsArray;\r\n\t\t\t\t\t\tdetectFormat = false;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tresourceAssignmentFormat = resourceAssignmentFormats.resourceValueArray;\r\n\t\t\t\t\t\tdetectFormat = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet defaultMode = assignmentModes.default;\r\n\t\t\t\tif(!res.mode){\r\n\t\t\t\t\tif((res.start_date && res.end_date) || (res.start_date && res.duration)){\r\n\t\t\t\t\t\tdefaultMode = assignmentModes.fixedDuration;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet id;\r\n\t\t\t\tif(!res.id && res.$id && !usedIds[res.$id]){\r\n\t\t\t\t\tid = res.$id;\r\n\t\t\t\t} else if(res.id && !usedIds[res.id]){\r\n\t\t\t\t\tid = res.id;\r\n\t\t\t\t} else{\r\n\t\t\t\t\tid = gantt.uid();\r\n\t\t\t\t}\r\n\t\t\t\tusedIds[id] = true;\r\n\r\n\t\t\t\tconst assignment = {\r\n\t\t\t\t\tid: id,\r\n\t\t\t\t\tstart_date: res.start_date,\r\n\t\t\t\t\tduration: res.duration,\r\n\t\t\t\t\tend_date: res.end_date,\r\n\t\t\t\t\tdelay: res.delay,\r\n\t\t\t\t\ttask_id: task.id,\r\n\t\t\t\t\tresource_id: res.resource_id,\r\n\t\t\t\t\tvalue: res.value,\r\n\t\t\t\t\tmode: res.mode || defaultMode\r\n\t\t\t\t};\r\n\t\t\t\t// GS-2490: to add custom properties to assignment\r\n\t\t\t\t// need to exclude $id which incfluences on render \r\n\t\t\t\tObject.keys(res).forEach(key => {\r\n\t\t\t\t\tif(key != \"$id\") {\r\n\t\t\t\t\t\tassignment[key] = res[key];\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif(!(assignment.start_date && assignment.start_date.getMonth \r\n\t\t\t\t\t&& assignment.end_date && assignment.end_date.getMonth && typeof assignment.duration === \"number\")){\r\n\t\t\t\t\tinitAssignmentFields(assignment, task);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresourceAssignments.push(assignment);\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn resourceAssignments;\r\n\t}\r\n\r\n\tfunction _updateTaskBack(taskId) {\r\n\t\t// GS-1493. In some cases, the resource assignment store has the tasks that no longer exist\r\n\t\tif (!gantt.isTaskExists(taskId)){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar task = gantt.getTask(taskId);\r\n\t\tvar assignments = gantt.getTaskAssignments(task.id);\r\n\t\t_assignAssignments(task, assignments);\r\n\t}\r\n\r\n\tfunction _assignAssignments(task, assignments){\r\n\t\tassignments.sort(function(a, b){\r\n\t\t\tif(a.start_date && b.start_date && a.start_date.valueOf() != b.start_date.valueOf()){\r\n\t\t\t\treturn a.start_date - b.start_date;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t});\r\n\t\tif (resourceAssignmentFormat == resourceAssignmentFormats.assignmentsArray) {\r\n\t\t\ttask[gantt.config.resource_property] = assignments;\r\n\t\t} else if (resourceAssignmentFormat == resourceAssignmentFormats.resourceValueArray) {\r\n\t\t\ttask[gantt.config.resource_property] = assignments.map(function (a) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\t$id: a.id,\r\n\t\t\t\t\tstart_date: a.start_date,\r\n\t\t\t\t\tduration: a.duration,\r\n\t\t\t\t\tend_date: a.end_date,\r\n\t\t\t\t\tdelay: a.delay,\r\n\t\t\t\t\tresource_id: a.resource_id,\r\n\t\t\t\t\tvalue: a.value,\r\n\t\t\t\t\tmode: a.mode\r\n\t\t\t\t};\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\ttask[resourceAssignmentsProperty] = assignments;\r\n\t}\r\n\r\n\tfunction _loadAssignmentsFromTask(task) {\r\n\t\tvar assignments = _makeAssignmentsFromTask(task);\r\n\t\tvar taskAssignments = [];\r\n\t\tassignments.forEach(function (a) {\r\n\t\t\ta.id = a.id || gantt.uid();\r\n\t\t\t//var newId = resourceAssignmentsStore.addItem(a);\r\n\t\t\ttaskAssignments.push(a);\r\n\t\t});\r\n\r\n\t\treturn assignments;\r\n\t}\r\n\r\n\tfunction diffAssignments(taskValues, assignmentsStoreValues) {\r\n\t\tvar result = {\r\n\t\t\tinBoth: [],\r\n\t\t\tinTaskNotInStore: [],\r\n\t\t\tinStoreNotInTask: []\r\n\t\t};\r\n\r\n\t\tif (resourceAssignmentFormat == resourceAssignmentFormats.singleValue) {\r\n\t\t\tvar taskOwner = taskValues[0];\r\n\t\t\tvar ownerId = taskOwner ? taskOwner.resource_id : null;\r\n\t\t\tvar foundOwnerAssignment = false;\r\n\t\t\tassignmentsStoreValues.forEach(function (a) {\r\n\t\t\t\tif (a.resource_id != ownerId) {\r\n\t\t\t\t\tresult.inStoreNotInTask.push(a);\r\n\t\t\t\t} else if (a.resource_id == ownerId) {\r\n\t\t\t\t\tresult.inBoth.push({ store: a, task: taskOwner });\r\n\t\t\t\t\tfoundOwnerAssignment = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tif (!foundOwnerAssignment && taskOwner) {\r\n\t\t\t\tresult.inTaskNotInStore.push(taskOwner);\r\n\t\t\t}\r\n\r\n\r\n\t\t} else if (resourceAssignmentFormat == resourceAssignmentFormats.valueArray){\r\n\r\n\t\t\tvar taskSearch = {};\r\n\t\t\tvar storeSearch = {};\r\n\t\t\tvar processedIds = {};\r\n\t\t\ttaskValues.forEach(function (a) {\r\n\t\t\t\ttaskSearch[a.resource_id] = a;\r\n\t\t\t});\r\n\t\t\tassignmentsStoreValues.forEach(function (a) {\r\n\t\t\t\tstoreSearch[a.resource_id] = a;\r\n\t\t\t});\r\n\t\t\ttaskValues.concat(assignmentsStoreValues).forEach(function (a) {\r\n\t\t\t\tif (processedIds[a.resource_id]) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tprocessedIds[a.resource_id] = true;\r\n\t\t\t\tvar inTask = taskSearch[a.resource_id];\r\n\t\t\t\tvar inStore = storeSearch[a.resource_id];\r\n\r\n\t\t\t\tif (inTask && inStore) {\r\n\t\t\t\t\tresult.inBoth.push({ store: inStore, task: inTask });\r\n\t\t\t\t} else if (inTask && !inStore) {\r\n\t\t\t\t\tresult.inTaskNotInStore.push(inTask);\r\n\t\t\t\t} else if (!inTask && inStore) {\r\n\t\t\t\t\tresult.inStoreNotInTask.push(inStore);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else if ((resourceAssignmentFormat == resourceAssignmentFormats.assignmentsArray)\r\n\t\t\t|| (resourceAssignmentFormat == resourceAssignmentFormats.resourceValueArray)) {\r\n\t\t\tvar taskSearch = {};\r\n\t\t\tvar storeSearch = {};\r\n\t\t\tvar processedIds = {};\r\n\t\t\ttaskValues.forEach(function (a) {\r\n\t\t\t\ttaskSearch[a.id || a.$id] = a;\r\n\t\t\t});\r\n\t\t\tassignmentsStoreValues.forEach(function (a) {\r\n\t\t\t\tstoreSearch[a.id] = a;\r\n\t\t\t});\r\n\t\t\ttaskValues.concat(assignmentsStoreValues).forEach(function (a) {\r\n\t\t\t\tvar id = a.id || a.$id;\r\n\t\t\t\tif (processedIds[id]) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tprocessedIds[id] = true;\r\n\t\t\t\tvar inTask = taskSearch[id];\r\n\t\t\t\tvar inStore = storeSearch[id];\r\n\r\n\t\t\t\tif (inTask && inStore) {\r\n\t\t\t\t\tresult.inBoth.push({ store: inStore, task: inTask });\r\n\t\t\t\t} else if (inTask && !inStore) {\r\n\t\t\t\t\tresult.inTaskNotInStore.push(inTask);\r\n\t\t\t\t} else if (!inTask && inStore) {\r\n\t\t\t\t\tresult.inStoreNotInTask.push(inStore);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tfunction assignmentHasChanged(source, target) {\r\n\t\tvar ignoreFields = {\r\n\t\t\tid: true\r\n\t\t};\r\n\r\n\t\tfor (var i in source) {\r\n\t\t\tif (!ignoreFields[i]) {\r\n\t\t\t\tif (String(source[i]) !== String(target[i])) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\tfunction updateAssignment(source, target) {\r\n\t\tvar ignoreFields = {\r\n\t\t\tid: true\r\n\t\t};\r\n\r\n\t\tfor (var i in source) {\r\n\t\t\tif (!ignoreFields[i]) {\r\n\t\t\t\ttarget[i] = source[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _syncAssignments(task, storeAssignments){\r\n\t\tvar tasksAssignments = _makeAssignmentsFromTask(task);\r\n\r\n\t\tvar diff = diffAssignments(tasksAssignments, storeAssignments);\r\n\t\tdiff.inStoreNotInTask.forEach(function (a) {\r\n\t\t\tresourceAssignmentsStore.removeItem(a.id);\r\n\t\t});\r\n\t\tdiff.inTaskNotInStore.forEach(function (a) {\r\n\t\t\tresourceAssignmentsStore.addItem(a);\r\n\t\t});\r\n\r\n\t\tdiff.inBoth.forEach(function (a) {\r\n\t\t\tif (assignmentHasChanged(a.task, a.store)) {\r\n\t\t\t\tupdateAssignment(a.task, a.store);\r\n\t\t\t\tresourceAssignmentsStore.updateItem(a.store.id);\r\n\t\t\t} else {\r\n\t\t\t\tif (a.task.start_date && a.task.end_date && a.task.mode !== assignmentModes.fixedDates) {\r\n\t\t\t\t\tvar timing = _assignmentTimeFromTask(a.store, task);\r\n\t\t\t\t\tif (a.store.start_date.valueOf() != timing.start_date.valueOf() || a.store.end_date.valueOf() != timing.end_date.valueOf()) {\r\n\t\t\t\t\t\ta.store.start_date = timing.start_date;\r\n\t\t\t\t\t\ta.store.end_date = timing.end_date;\r\n\t\t\t\t\t\ta.store.duration = timing.duration;\r\n\t\t\t\t\t\tresourceAssignmentsStore.updateItem(a.store.id);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t_updateTaskBack(task.id);\r\n\t}\r\n\r\n\tfunction _syncOnTaskUpdate(task) {\r\n\t\tvar storeAssignments = task[resourceAssignmentsProperty] || resourceAssignmentsStore.find(function (a) {\r\n\t\t\treturn a.task_id == task.id;\r\n\t\t});\r\n\r\n\t\t_syncAssignments(task, storeAssignments);\r\n\t}\r\n\r\n\tfunction _syncOnTaskDelete(ids) {\r\n\t\tvar idsSearch = {};\r\n\t\tids.forEach(function (id) {\r\n\t\t\tidsSearch[id] = true;\r\n\t\t});\r\n\t\tvar taskResources = resourceAssignmentsStore.find(function (a) {\r\n\t\t\treturn idsSearch[a.task_id];\r\n\t\t});\r\n\t\ttaskResources.forEach(function (a) {\r\n\t\t\tresourceAssignmentsStore.removeItem(a.id);\r\n\t\t});\r\n\t}\r\n\r\n\tgantt.attachEvent(\"onGanttReady\", function(){\r\n\r\n\t\tif (gantt.config.process_resource_assignments) {\r\n\t\t\tgantt.attachEvent(\"onParse\", function () {\r\n\t\t\t\tgantt.silent(function () {\r\n\t\t\t\t\tresourceAssignmentsStore.clearAll();\r\n\t\t\t\t\tvar totalAssignments = [];\r\n\t\t\t\t\tgantt.eachTask(function (task) {\r\n\t\t\t\t\t\tif (task.type === gantt.config.types.project) {\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar assignments = _loadAssignmentsFromTask(task);\r\n\t\t\t\t\t\t_assignAssignments(task, assignments);\r\n\r\n\t\t\t\t\t\tassignments.forEach(function (a) {\r\n\t\t\t\t\t\t\ttotalAssignments.push(a);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t});\r\n\t\t\t\t\tresourceAssignmentsStore.parse(totalAssignments);\r\n\t\t\t\t});\r\n\r\n\t\t\t});\r\n\r\n\t\t\tvar batchUpdate = false;\r\n\t\t\tvar needUpdate = false;\r\n\t\t\tvar needUpdateFor = {};\r\n\t\t\tvar undoBatchCancel = false;\r\n\t\t\tgantt.attachEvent(\"onBeforeBatchUpdate\", function(){\r\n\t\t\t\tbatchUpdate = true;\r\n\t\t\t});\r\n\t\t\tgantt.attachEvent(\"onAfterBatchUpdate\", function(){\r\n\t\t\t\t\r\n\t\t\t\tif(needUpdate){\r\n\t\t\t\t\tvar assignmentsHash = {};\r\n\t\t\t\t\tfor(var i in needUpdateFor){\r\n\t\t\t\t\t\tassignmentsHash[i] = gantt.getTaskAssignments(needUpdateFor[i].id);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfor(var i in needUpdateFor){\r\n\t\t\t\t\t\t_syncAssignments(needUpdateFor[i], assignmentsHash[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tneedUpdate = false;\r\n\t\t\t\tbatchUpdate = false;\r\n\t\t\t\tneedUpdateFor = {};\r\n\t\t\t});\r\n\r\n\t\t\tgantt.attachEvent(\"onTaskCreated\", function (item) {\r\n\t\t\t\tvar assignments = _loadAssignmentsFromTask(item);\r\n\t\t\t\tresourceAssignmentsStore.parse(assignments);\r\n\t\t\t\t_assignAssignments(item, assignments);\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t\tgantt.attachEvent(\"onAfterTaskUpdate\", function (id, item) {\r\n\t\t\t\tif(batchUpdate){\r\n\t\t\t\t\tneedUpdate = true;\r\n\t\t\t\t\tneedUpdateFor[id] = item;\r\n\t\t\t\t}else if (!item.unscheduled){\r\n\t\t\t\t\t_syncOnTaskUpdate(item);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tgantt.attachEvent(\"onAfterTaskAdd\", function (id, item) {\r\n\t\t\t\tif(batchUpdate){\r\n\t\t\t\t\tneedUpdate = true;\r\n\t\t\t\t\tneedUpdateFor[id] = item;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t_syncOnTaskUpdate(item);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t/*\tgantt.attachEvent(\"onRowDragMove\", function (id) {\r\n\t\t\t\t_syncOnTaskUpdate(gantt.getTask(id));\r\n\t\t\t});*/\r\n\t\t\tgantt.attachEvent(\"onRowDragEnd\", function (id) {\r\n\t\t\t\t_syncOnTaskUpdate(gantt.getTask(id));\r\n\t\t\t});\r\n\t\t\tgantt.$data.tasksStore.attachEvent(\"onAfterDeleteConfirmed\", function (id, item) {\r\n\t\t\t\tvar deleteIds = [id];\r\n\t\t\t\tgantt.eachTask(function (task) {\r\n\t\t\t\t\tdeleteIds.push(task.id);\r\n\t\t\t\t}, id);\r\n\t\t\t\t_syncOnTaskDelete(deleteIds);\r\n\t\t\t});\r\n\t\t\tgantt.$data.tasksStore.attachEvent(\"onClearAll\", function () {\r\n\t\t\t\tresourceAssignmentsCache = null;\r\n\t\t\t\tresourceTaskAssignmentsCache = null;\r\n\t\t\t\ttaskAssignmentsCache = null;\r\n\t\t\t\tresourceAssignmentsStore.clearAll();\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t\tgantt.attachEvent(\"onTaskIdChange\", function (id, new_id) {\r\n\t\t\t\tvar taskResources = resourceAssignmentsStore.find(function (a) {\r\n\t\t\t\t\treturn a.task_id == id;\r\n\t\t\t\t});\r\n\t\t\t\ttaskResources.forEach(function (a) {\r\n\t\t\t\t\ta.task_id = new_id;\r\n\t\t\t\t\tresourceAssignmentsStore.updateItem(a.id);\r\n\t\t\t\t});\r\n\t\t\t\t_updateTaskBack(new_id);\r\n\t\t\t\t//any custom logic here\r\n\t\t\t});\r\n\t\t\t// GS-2144. When we Undo something, the cache should be reset\r\n\t\t\t// during the `onStoreUpdated` event to properly update the assignments\r\n\t\t\tgantt.attachEvent(\"onBeforeUndo\", function (action) {\r\n\t\t\t\tundoBatchCancel = true;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t\tgantt.attachEvent(\"onAfterUndo\", function (action) {\r\n\t\t\t\tundoBatchCancel = true;\r\n\t\t\t});\r\n\r\n\r\n\t\t\tvar resourceAssignmentsCache = null;\r\n\t\t\tvar resourceTaskAssignmentsCache = null;\r\n\t\t\tvar taskAssignmentsCache = null;\r\n\r\n\t\t\tresourceAssignmentsStore.attachEvent(\"onStoreUpdated\", function resetCache(){\r\n\t\t\t\tif(batchUpdate && !undoBatchCancel){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tresourceAssignmentsCache = null;\r\n\t\t\t\tresourceTaskAssignmentsCache = null;\r\n\t\t\t\ttaskAssignmentsCache = null;\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\r\n\t\t\tgantt.getResourceAssignments = function (resourceId, taskId) {\r\n\t\t\t\tvar searchTaskId = gantt.defined(taskId) && taskId !== null;\r\n\r\n\t\t\t\tif(resourceAssignmentsCache === null){\r\n\t\t\t\t\tresourceAssignmentsCache = {};\r\n\t\t\t\t\tresourceTaskAssignmentsCache = {};\r\n\r\n\t\t\t\t\tresourceAssignmentsStore.eachItem(function (a) {\r\n\t\t\t\t\t\tif(!resourceAssignmentsCache[a.resource_id]){\r\n\t\t\t\t\t\t\tresourceAssignmentsCache[a.resource_id] = [];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tresourceAssignmentsCache[a.resource_id].push(a);\r\n\r\n\t\t\t\t\t\tvar resourceTaskCacheKey = a.resource_id + \"-\" + a.task_id;\r\n\t\t\t\t\t\tif(!resourceTaskAssignmentsCache[resourceTaskCacheKey]){\r\n\t\t\t\t\t\t\tresourceTaskAssignmentsCache[resourceTaskCacheKey] = [];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tresourceTaskAssignmentsCache[resourceTaskCacheKey].push(a);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tif(searchTaskId){\r\n\t\t\t\t\treturn (resourceTaskAssignmentsCache[resourceId + \"-\" + taskId] || []).slice();\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn (resourceAssignmentsCache[resourceId] || []).slice();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t\r\n\t\t\tgantt.getTaskAssignments = function (taskId) {\r\n\t\t\t\tif(taskAssignmentsCache === null){\r\n\t\t\t\t\tvar result = [];\r\n\t\t\t\t\ttaskAssignmentsCache = {};\r\n\t\t\t\t\tresourceAssignmentsStore.eachItem(function (a) {\r\n\t\t\t\t\t\tif(!taskAssignmentsCache[a.task_id]){\r\n\t\t\t\t\t\t\ttaskAssignmentsCache[a.task_id] = [];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttaskAssignmentsCache[a.task_id].push(a);\r\n\t\t\t\t\t\tif (a.task_id == taskId) {\r\n\t\t\t\t\t\t\tresult.push(a);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn (taskAssignmentsCache[taskId] || []).slice();\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\tgantt.getTaskResources = function (taskId) {\r\n\t\t\t\tconst store = gantt.getDatastore(\"resource\");\r\n\t\t\t\tconst assignments = gantt.getTaskAssignments(taskId);\r\n\t\r\n\t\t\t\tconst uniqueResources = {};\r\n\t\t\t\tassignments.forEach(function(a){\r\n\t\t\t\t\tif(!uniqueResources[a.resource_id]){\r\n\t\t\t\t\t\tuniqueResources[a.resource_id] = a.resource_id;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tconst resources = [];\r\n\t\t\t\tfor(const i in uniqueResources){\r\n\t\t\t\t\tconst res = store.getItem(uniqueResources[i]);\r\n\t\t\t\t\tif(res){\r\n\t\t\t\t\t\tresources.push(res);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn resources;\r\n\t\t\t};\r\n\r\n\t\t\tgantt.updateTaskAssignments = _updateTaskBack;\r\n\t\t}\r\n\t}, {once: true});\r\n};","export default function addPlaceholder(gantt){\r\n\tfunction isEnabled(){\r\n\t\treturn gantt.config.placeholder_task;\r\n\t}\r\n\r\n\tfunction callIfEnabled(callback){\r\n\t\treturn function(){\r\n\t\t\tif(!isEnabled()){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn callback.apply(this, arguments);\r\n\t\t};\r\n\t}\r\n\r\n\tfunction silenceDataProcessor(dataProcessor){\r\n\t\tif(dataProcessor && !dataProcessor._silencedPlaceholder){\r\n\t\t\tdataProcessor._silencedPlaceholder = true;\r\n\t\t\tdataProcessor.attachEvent(\"onBeforeUpdate\", callIfEnabled(function(id, state, data){\r\n\t\t\t\tif(data.type == gantt.config.types.placeholder){\r\n\t\t\t\t\tdataProcessor.setUpdated(id, false);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}));\r\n\t\t}\r\n\t}\r\n\r\n\tfunction insertPlaceholder(){\r\n\t\tvar placeholders = gantt.getTaskBy(\"type\", gantt.config.types.placeholder);\r\n\t\tif(!placeholders.length || !gantt.isTaskExists(placeholders[0].id)){\r\n\t\t\tvar placeholder = {\r\n\t\t\t\tunscheduled: true,\r\n\t\t\t\ttype: gantt.config.types.placeholder,\r\n\t\t\t\tduration:0,\r\n\t\t\t\ttext: gantt.locale.labels.new_task\r\n\t\t\t};\r\n\t\t\tif(gantt.callEvent(\"onTaskCreated\", [placeholder]) === false){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tgantt.addTask(placeholder);\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\r\n\tfunction afterEdit(id){\r\n\t\tvar item = gantt.getTask(id);\r\n\t\tif(item.type == gantt.config.types.placeholder) {\r\n\t\t\tif(item.start_date && item.end_date && item.unscheduled){\r\n\t\t\t\titem.unscheduled = false;\r\n\t\t\t}\r\n\r\n\t\t\tgantt.batchUpdate(function(){\r\n\t\t\t\tvar newTask = gantt.copy(item);\r\n\t\t\t\tgantt.silent(function(){\r\n\t\t\t\t\tgantt.deleteTask(item.id);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tdelete newTask[\"!nativeeditor_status\"];\r\n\t\t\t\tnewTask.type = gantt.config.types.task;\r\n\t\t\t\tnewTask.id = gantt.uid();\r\n\t\t\t\tgantt.addTask(newTask);\r\n\r\n\t\t\t\t//insertPlaceholder();\r\n\t\t\t});\r\n\r\n\t\t}\r\n\t}\r\n\r\n\tgantt.config.types.placeholder = \"placeholder\";\r\n\tgantt.attachEvent(\"onDataProcessorReady\", callIfEnabled(silenceDataProcessor));\r\n\r\n\tvar ready = false;\r\n\tgantt.attachEvent(\"onGanttReady\", function(){\r\n\t\tif(ready){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tready = true;\r\n\t\tgantt.attachEvent(\"onAfterTaskUpdate\", callIfEnabled(afterEdit));\r\n\t\tgantt.attachEvent(\"onAfterTaskAdd\", callIfEnabled(function(id, task){\r\n\t\t\tif(task.type != gantt.config.types.placeholder){\r\n\t\t\t\tvar placeholders = gantt.getTaskBy(\"type\", gantt.config.types.placeholder);\r\n\t\t\t\tplaceholders.forEach(function(p){\r\n\t\t\t\t\tgantt.silent(function(){\r\n\t\t\t\t\t\tif(gantt.isTaskExists(p.id))\r\n\t\t\t\t\t\t\tgantt.deleteTask(p.id);\r\n\t\t\t\t\t});\r\n\t\t\t\t});\r\n\t\t\t\tinsertPlaceholder();\r\n\t\t\t}\r\n\t\t}));\r\n\t\tgantt.attachEvent(\"onParse\", callIfEnabled(insertPlaceholder));\r\n\t});\r\n\r\n\tfunction isPlaceholderTask(taskId){\r\n\t\tif(gantt.config.types.placeholder && gantt.isTaskExists(taskId)){\r\n\t\t\tvar task = gantt.getTask(taskId);\r\n\t\t\tif(task.type == gantt.config.types.placeholder){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\tfunction isPlaceholderLink(link){\r\n\t\tif(isPlaceholderTask(link.source) || isPlaceholderTask(link.target)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\tgantt.attachEvent(\"onLinkValidation\", function(link){\r\n\t\tif(isPlaceholderLink(link)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\tgantt.attachEvent(\"onBeforeLinkAdd\", function(id,link){\r\n\t\tif(isPlaceholderLink(link)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\tgantt.attachEvent(\"onBeforeUndoStack\", function(action){\r\n\t\tfor(var i = 0; i < action.commands.length; i++){\r\n\t\t\tvar command = action.commands[i];\r\n\t\t\tif(command.entity === \"task\" && command.value.type === gantt.config.types.placeholder){\r\n\t\t\t\taction.commands.splice(i,1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n};","export default function(gantt) {\r\n\tfunction isEnabled() {\r\n\t\treturn gantt.config.auto_types && // if enabled\r\n\t\t\t(gantt.getTaskType(gantt.config.types.project) == gantt.config.types.project);// and supported\r\n\t}\r\n\r\n\tfunction callIfEnabled(callback) {\r\n\t\treturn function() {\r\n\t\t\tif (!isEnabled()) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn callback.apply(this, arguments);\r\n\t\t};\r\n\t}\r\n\r\n\tfunction checkTaskType(id, changedTypes) {\r\n\t\tvar task = gantt.getTask(id);\r\n\t\tvar targetType = getTaskTypeToUpdate(task);\r\n\t\tif (targetType !== false && gantt.getTaskType(task) !== targetType) {\r\n\t\t\tchangedTypes.$needsUpdate = true;\r\n\t\t\tchangedTypes[task.id] = {task: task, type: targetType};\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getUpdatedTypes(id, changedTypes) {\r\n\t\tchangedTypes = changedTypes || {};\r\n\t\t\r\n\t\tcheckTaskType(id, changedTypes);\r\n\t\tgantt.eachParent(function(parent) {\r\n\t\t\tcheckTaskType(parent.id, changedTypes);\r\n\t\t}, id);\r\n\r\n\t\treturn changedTypes;\r\n\t}\r\n\r\n\tfunction applyChanges(changedTypes) {\r\n\t\tfor (var i in changedTypes) {\r\n\t\t\tif(changedTypes[i] && changedTypes[i].task){\r\n\t\t\t\tvar task = changedTypes[i].task;\r\n\t\t\t\ttask.type = changedTypes[i].type;\r\n\t\t\t\tgantt.updateTask(task.id);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction updateParentTypes(startId) {\r\n\t\tif (gantt.getState().group_mode) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tvar changedTypes = getUpdatedTypes(startId);\r\n\t\tif (changedTypes.$needsUpdate) {\r\n\t\t\tgantt.batchUpdate(function() {\r\n\t\t\t\tapplyChanges(changedTypes);\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tvar delTaskParent;\r\n\r\n\tfunction updateTaskType(task, targetType) {\r\n\t\tif(!gantt.getState().group_mode){\r\n\t\t\ttask.type = targetType;\r\n\t\t\tgantt.updateTask(task.id);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getTaskTypeToUpdate(task) {\r\n\t\tvar allTypes = gantt.config.types;\r\n\t\tvar hasChildren = gantt.hasChild(task.id);\r\n\t\tvar taskType = gantt.getTaskType(task.type);\r\n\r\n\t\tif (hasChildren && taskType === allTypes.task) {\r\n\t\t\treturn allTypes.project;\r\n\t\t}\r\n\r\n\t\tif (!hasChildren && taskType === allTypes.project) {\r\n\t\t\treturn allTypes.task;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tvar isParsingDone = true;\r\n\r\n\tgantt.attachEvent(\"onParse\", callIfEnabled(function() {\r\n\t\tisParsingDone = false;\r\n\t\tif(gantt.getState().group_mode){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tgantt.batchUpdate(function() {\r\n\t\t\tgantt.eachTask(function(task) {\r\n\t\t\t\tvar targetType = getTaskTypeToUpdate(task);\r\n\t\t\t\tif (targetType !== false) {\r\n\t\t\t\t\tupdateTaskType(task, targetType);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tisParsingDone = true;\r\n\t}));\r\n\r\n\tgantt.attachEvent(\"onAfterTaskAdd\", callIfEnabled(function(id) {\r\n\t\tif (isParsingDone) {\r\n\t\t\tupdateParentTypes(id);\r\n\t\t}\r\n\t}));\r\n\r\n\tgantt.attachEvent(\"onAfterTaskUpdate\", callIfEnabled(function(id) {\r\n\t\tif (isParsingDone) {\r\n\t\t\tupdateParentTypes(id);\r\n\t\t}\r\n\t}));\r\n\r\n\tfunction updateAfterRemoveChild(id){\r\n\t\tif (id != gantt.config.root_id && gantt.isTaskExists(id)) {\r\n\t\t\tupdateParentTypes(id);\r\n\t\t}\r\n\t}\r\n\r\n\tgantt.attachEvent(\"onBeforeTaskDelete\", callIfEnabled(function(id, task) {\r\n\t\tdelTaskParent = gantt.getParent(id);\r\n\t\treturn true;\r\n\t}));\r\n\r\n\tgantt.attachEvent(\"onAfterTaskDelete\", callIfEnabled(function(id, task) {\r\n\t\tupdateAfterRemoveChild(delTaskParent);\r\n\t}));\r\n\r\n\r\n\tvar originalRowDndParent;\r\n\r\n\tgantt.attachEvent(\"onRowDragStart\", callIfEnabled(function(id, target, e) {\r\n\t\toriginalRowDndParent = gantt.getParent(id);\r\n\t\treturn true;\r\n\t}));\r\n\r\n\tgantt.attachEvent(\"onRowDragEnd\", callIfEnabled(function(id, target) {\r\n\t\tupdateAfterRemoveChild(originalRowDndParent);\r\n\t\tupdateParentTypes(id);\r\n\t}));\r\n\r\n\tvar originalMoveTaskParent;\r\n\r\n\tgantt.attachEvent(\"onBeforeTaskMove\", callIfEnabled(function(sid, parent, tindex) {\r\n\t\toriginalMoveTaskParent = gantt.getParent(sid);\r\n\t\treturn true;\r\n\t}));\r\n\r\n\tgantt.attachEvent(\"onAfterTaskMove\", callIfEnabled(function(id, parent, tindex) {\r\n\t\tif (document.querySelector(\".gantt_drag_marker\")) {\r\n\t\t\t// vertical dnd in progress\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tupdateAfterRemoveChild(originalMoveTaskParent);\r\n\t\tupdateParentTypes(id);\r\n\t}));\r\n};","export default class DurationFormatterNumeric implements IDurationFormatter {\r\n\tstatic create = (settings: IDurationFormatterConfig = null): IDurationFormatter => {\r\n\t\treturn new DurationFormatterNumeric();\r\n\t};\r\n\tcanParse = (value: string) : boolean => {\r\n\t\treturn !isNaN(this.parse(value));\r\n\t};\r\n\tformat = (value: number) : string => {\r\n\t\treturn String(value);\r\n\t};\r\n\tparse = (value: string) : number => {\r\n\t\treturn parseInt(value, 10);\r\n\t};\r\n}","export default class LinkFormatterSimple implements ILinkFormatter {\r\n\tstatic create = (settings: ILinkFormatterConfig = null, gantt: any): LinkFormatterSimple => {\r\n\t\treturn new LinkFormatterSimple(gantt);\r\n\t};\r\n\tprotected _linkReg: RegExp;\r\n\tprotected _gantt: any;\r\n\r\n\tconstructor(gantt: any) {\r\n\t\tthis._linkReg = /^[0-9\\.]+/;\r\n\t\tthis._gantt = gantt;\r\n\t}\r\n\r\n\tformat = (link: ILink) : string => {\r\n\t\tconst wbs = this._getWBSCode(link.source);\r\n\t\treturn wbs;\r\n\t};\r\n\r\n\tcanParse = (value: string) : boolean => {\r\n\t\treturn this._linkReg.test(value);\r\n\t};\r\n\tparse = (value: string) : ILink => {\r\n\t\tif(!this.canParse(value)){\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tconst linkPart = this._linkReg.exec(value)[0].trim();\r\n\r\n\t\tconst source = this._findSource(linkPart) || null;\r\n\r\n\t\treturn {\r\n\t\t\tid: undefined,\r\n\t\t\tsource,\r\n\t\t\ttarget: null,\r\n\t\t\ttype: this._gantt.config.links.finish_to_start,\r\n\t\t\tlag: 0\r\n\t\t};\r\n\t};\r\n\r\n\tprotected _getWBSCode = (source: number | string) => {\r\n\t\tconst pred = this._gantt.getTask(source);\r\n\t\treturn this._gantt.getWBSCode(pred);\r\n\t};\r\n\r\n\tprotected _findSource = (value: string) => {\r\n\t\tconst reqTemplate = new RegExp(\"^[0-9\\.]+\", \"i\");\r\n\t\tif(reqTemplate.exec(value)){\r\n\t\t\tconst wbs = reqTemplate.exec(value)[0];\r\n\t\t\tconst task = this._gantt.getTaskByWBSCode(wbs);\r\n\t\t\tif(task){\r\n\t\t\t\treturn task.id;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n}","\r\nimport DurationFormatter from \"../common/duration_formatter\";\r\nimport LinkFormatter from \"../common/link_formatter\";\r\n\r\nexport default function(gantt){\r\n\tgantt.ext.formatters = {\r\n\t\tdurationFormatter: function(settings){\r\n\t\t\tif(!settings){\r\n\t\t\t\tsettings = {};\r\n\t\t\t}\r\n\t\t\tif(!settings.store){\r\n\t\t\t\tsettings.store = gantt.config.duration_unit;\r\n\t\t\t}\r\n\t\t\tif(!settings.enter){\r\n\t\t\t\tsettings.enter = gantt.config.duration_unit;\r\n\t\t\t}\r\n\t\t\treturn DurationFormatter.create(settings, gantt);\r\n\t\t},\r\n\t\tlinkFormatter: function(settings){\r\n\t\t\treturn LinkFormatter.create(settings, gantt);\r\n\t\t}\r\n\t};\r\n};","export default function(gantt: any){\r\n\r\n\tgantt.ext = gantt.ext || {};\r\n\tgantt.config.show_empty_state = false;\r\n\r\n\tgantt.ext.emptyStateElement = gantt.ext.emptyStateElement || {\r\n\t\tisEnabled() {\r\n\t\t\treturn gantt.config.show_empty_state === true;\r\n\t\t},\r\n\t\tisGanttEmpty(){\r\n\t\t\treturn !gantt.getTaskByTime().length;\r\n\t\t},\r\n\t\trenderContent(container){\r\n\t\t\tconst placeholderTextElement = `
\r\n \r\n
${gantt.locale.labels.empty_state_text_description}
\r\n
`;\r\n\t\t\tconst placeholderImageElement = \"
\";\r\n\r\n\t\t\tconst placeholderContainer = `
${placeholderImageElement}${placeholderTextElement}
`;\r\n\t\t\tcontainer.innerHTML = placeholderContainer;\r\n\t\t},\r\n\r\n\t\tclickEvents: [],\r\n\t\tattachAddTaskEvent(){\r\n\t\t\tconst id = gantt.attachEvent(\"onEmptyClick\", function(e){\r\n\t\t\t\tconst domHelpers = gantt.utils.dom;\r\n\t\t\t\tconst gridPlaceholder = domHelpers.closest(e.target, \"[data-empty-state-create-task]\");\r\n\t\t\t\tif (gridPlaceholder){\r\n\t\t\t\t\tgantt.createTask({\r\n\t\t\t\t\t\tid: gantt.uid(),\r\n\t\t\t\t\t\ttext: \"New Task\"\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tthis.clickEvents.push(id);\r\n\t\t},\r\n\t\tdetachAddTaskEvents(){\r\n\t\t\tthis.clickEvents.forEach(function(event){\r\n\t\t\t\tgantt.detachEvent(event);\r\n\t\t\t});\r\n\t\t\tthis.clickEvents = [];\r\n\t\t},\r\n\r\n\t\tgetContainer(){\r\n\t\t\tif (gantt.$container) {\r\n\t\t\t\tconst domHelpers = gantt.utils.dom;\r\n\t\t\t\tif (gantt.$container.contains(gantt.$grid_data)) {\r\n\t\t\t\t\treturn domHelpers.closest(gantt.$grid_data, \".gantt_layout_content\");\r\n\t\t\t\t}\r\n\t\t\t\tif (gantt.$container.contains(gantt.$task_data)){\r\n\t\t\t\t\treturn domHelpers.closest(gantt.$task_data, \".gantt_layout_content\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tgetNode(){\r\n\t\t\tconst container = this.getContainer();\r\n\t\t\tif (!container){\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tconst emptyStateElementNode = container.querySelector(\".gantt_empty_state_wrapper\");\r\n\t\t\treturn emptyStateElementNode;\r\n\t\t},\r\n\r\n\t\tshow(){\r\n\t\t\tconst container = this.getContainer();\r\n\t\t\tif (!container && this.isGanttEmpty()){\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tconst wrapper = document.createElement(\"div\");\r\n\t\t\twrapper.className = \"gantt_empty_state_wrapper\";\r\n\t\t\twrapper.style.marginTop = (gantt.config.scale_height - container.offsetHeight) + \"px\";\r\n\t\t\tconst oldNodes = gantt.$container.querySelectorAll(\".gantt_empty_state_wrapper\");\r\n\t\t\t// for IE11\r\n\t\t\tArray.prototype.forEach.call(oldNodes, function(node){\r\n\t\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\t});\r\n\r\n\t\t\tthis.detachAddTaskEvents();\r\n\t\t\tthis.attachAddTaskEvent();\r\n\r\n\t\t\tcontainer.appendChild(wrapper);\r\n\t\t\tthis.renderContent(wrapper);\r\n\t\t},\r\n\t\thide(){\r\n\t\t\tconst emptyStateElementNode = this.getNode();\r\n\t\t\tif (emptyStateElementNode){\r\n\t\t\t\temptyStateElementNode.parentNode.removeChild(emptyStateElementNode);\r\n\t\t\t} else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tinit(){ }\r\n\t};\r\n\r\n\tgantt.attachEvent(\"onDataRender\", function() {\r\n\t\tconst emptyStateElement = gantt.ext.emptyStateElement;\r\n\t\tif (emptyStateElement.isEnabled() && emptyStateElement.isGanttEmpty()) {\r\n\t\t\temptyStateElement.show();\r\n\t\t} else {\r\n\t\t\temptyStateElement.hide();\r\n\t\t}\r\n\t});\r\n\r\n\r\n\r\n\r\n}\r\n","export const hasBaselinesBelow = function (gantt, task) {\r\n const baselines = task.baselines && task.baselines.length;\r\n const baselinesOnDifferentRow = gantt.config.baselines.render_mode == \"separateRow\" || gantt.config.baselines.render_mode == \"individualRow\";\r\n if (baselines && baselinesOnDifferentRow) {\r\n return true;\r\n }\r\n};\r\n\r\nexport const childrenHaveBaselines = function (gantt, taskId) {\r\n let hasBaselines = false;\r\n gantt.eachTask(function (child) {\r\n if (hasBaselines) {\r\n return;\r\n }\r\n hasBaselines = hasBaselinesBelow(gantt, child);\r\n }, taskId);\r\n return hasBaselines;\r\n};\r\n\r\nexport const isSplitChild = function (gantt, id) {\r\n let splitChild = false;\r\n gantt.eachParent(function (parent) {\r\n if (isSplitParent(parent)) {\r\n splitChild = true;\r\n }\r\n }, id);\r\n return splitChild;\r\n};\r\n\r\nexport const isSplitParent = function (task) {\r\n return task.render && task.render == \"split\" && !task.$open;\r\n};\r\n\r\nexport const getMaxParentHeight = function (gantt, view, task, heightLimit) {\r\n let maxHeight = heightLimit || view.$task_data.scrollHeight;\r\n let shrinkHeight = false;\r\n let splitChild = false;\r\n\r\n gantt.eachParent(function (parent) {\r\n if (isSplitParent(parent)) {\r\n splitChild = true;\r\n const parentSizes = view.getItemPosition(parent);\r\n const parentHeight = parentSizes.rowHeight;\r\n if (parentHeight < maxHeight) {\r\n maxHeight = parentHeight;\r\n shrinkHeight = true;\r\n }\r\n }\r\n }, task.id);\r\n\r\n return { maxHeight, shrinkHeight, splitChild };\r\n};\r\n\r\nexport const getMilestoneHeight = function (height) {\r\n return Math.sqrt(2 * height * height);\r\n};\r\n\r\nexport const getInvertedMilestoneHeight = function (height) {\r\n return Math.round(height / Math.sqrt(2));\r\n};\r\n\r\nexport const getAdjustedPosition = function (gantt, timeline, sizes, heightLimit, task, childBaselines) {\r\n const baselines = hasBaselinesBelow(gantt, task);\r\n\r\n const splitParams = getMaxParentHeight(gantt, timeline, task);\r\n let maxHeight = splitParams.maxHeight;\r\n\r\n let height = sizes.height;\r\n let largerHeight = height > heightLimit;\r\n let noNeedToShrink = sizes.rowHeight >= heightLimit && !splitParams.splitChild && !baselines;\r\n if (largerHeight || noNeedToShrink) {\r\n height = heightLimit;\r\n }\r\n\r\n if (maxHeight < height) {\r\n height = maxHeight;\r\n }\r\n\r\n let marginTop = Math.floor((sizes.rowHeight - height) / 2);\r\n\r\n if (splitParams.splitChild) {\r\n marginTop = Math.floor((maxHeight - height) / 2);\r\n }\r\n if (childBaselines || baselines) {\r\n let heightDiff = Math.min(sizes.height, maxHeight) - height;\r\n\r\n let additionalMargin = 2;\r\n let exceedBarHeight = baselines && task.bar_height >= task.row_height;\r\n let exceedParentHeight = splitParams.splitChild && sizes.height >= maxHeight;\r\n if (exceedBarHeight || exceedParentHeight){\r\n additionalMargin = 0;\r\n }\r\n\r\n marginTop = Math.floor(heightDiff / 2) + additionalMargin;\r\n const bottom = height + marginTop;\r\n if (bottom > sizes.rowHeight || bottom > maxHeight) {\r\n // marginTop = 0;\r\n }\r\n }\r\n\r\n return { height, marginTop };\r\n};\r\n\r\nexport default {\r\n hasBaselinesBelow,\r\n childrenHaveBaselines,\r\n isSplitChild,\r\n isSplitParent,\r\n getMaxParentHeight,\r\n getMilestoneHeight,\r\n getInvertedMilestoneHeight,\r\n getAdjustedPosition\r\n};\r\n","import { hasBaselinesBelow, isSplitParent } from \"../ui/render/baseline_helper\";\r\n\r\nexport default function (gantt) {\r\n gantt.config.baselines = {\r\n datastore: \"baselines\",\r\n render_mode: false,\r\n dataprocessor_baselines: false,\r\n row_height: 16,\r\n bar_height: 8\r\n };\r\n\r\n function initBaselineFields(item, task) {\r\n if (item.start_date) {\r\n item.start_date = gantt.date.parseDate(item.start_date, \"parse_date\");\r\n } else {\r\n item.start_date = null;\r\n }\r\n\r\n if (item.end_date) {\r\n item.end_date = gantt.date.parseDate(item.end_date, \"parse_date\");\r\n } else {\r\n item.end_date = null;\r\n }\r\n\r\n if (!item.task_id) {\r\n return false;\r\n }\r\n }\r\n // gantt init\r\n const baselineStore = gantt.createDatastore({\r\n name: gantt.config.baselines.datastore,\r\n initItem: function (item) {\r\n if (!item.id) {\r\n item.id = gantt.uid();\r\n }\r\n\r\n initBaselineFields(item);\r\n\r\n return item;\r\n }\r\n });\r\n\r\n gantt.$data.baselineStore = baselineStore;\r\n\r\n function _syncBaselines(task) {\r\n let shouldRepaint = false;\r\n const iteratedBaselines = {};\r\n\r\n const taskBaselines = task.baselines || [];\r\n const exisingBaselines = gantt.getTaskBaselines(task.id);\r\n\r\n if (taskBaselines.length != exisingBaselines.length) {\r\n shouldRepaint = true;\r\n }\r\n\r\n taskBaselines.forEach(function (baseline) {\r\n iteratedBaselines[baseline.id] = true;\r\n const exisingBaseline = baselineStore.getItem(baseline.id);\r\n if (exisingBaseline) {\r\n const start = +exisingBaseline.start_date !== +baseline.start_date;\r\n const end = +exisingBaseline.end_date !== +baseline.end_date;\r\n if (start || end) {\r\n baselineStore.updateItem(baseline.id, baseline);\r\n }\r\n } else {\r\n baselineStore.addItem(baseline);\r\n }\r\n });\r\n\r\n exisingBaselines.forEach(function (baseline) {\r\n if (!iteratedBaselines[baseline.id]) {\r\n baselineStore.removeItem(baseline.id);\r\n }\r\n });\r\n\r\n if (shouldRepaint) {\r\n if (isSplitParent(task)){\r\n // here we adjust the parent height, then adjust it with the total child height\r\n _adjustSplitParentHeight (task);\r\n } else {\r\n gantt.adjustTaskHeightForBaselines(task);\r\n }\r\n gantt.render();\r\n }\r\n }\r\n\r\n function _deleteOrphanBaselines() {\r\n baselineStore.eachItem(function (baseline) {\r\n if (!gantt.isTaskExists(baseline.task_id)) {\r\n baselineStore.removeItem(baseline.id);\r\n }\r\n });\r\n }\r\n\r\n function _adjustSplitParentHeight (task){\r\n let maxParentHeight = 0;\r\n\r\n gantt.adjustTaskHeightForBaselines(task);\r\n\r\n gantt.eachTask(function(child){\r\n let childHeight = child.row_height || gantt.config.row_height;\r\n\r\n maxParentHeight = maxParentHeight || childHeight;\r\n if (childHeight > maxParentHeight){\r\n maxParentHeight = childHeight;\r\n }\r\n }, task.id);\r\n\r\n if (task.row_height < maxParentHeight){\r\n task.row_height = maxParentHeight;\r\n }\r\n }\r\n\r\n gantt.adjustTaskHeightForBaselines = function (task) {\r\n let height, baselineSize, betweenBaselines;\r\n let margins = 2;\r\n let baselineAmount = task.baselines && task.baselines.length || 0;\r\n const subrowHeight = gantt.config.baselines.row_height;\r\n //const baselineBarHeight = task?.baselines.bar_height\r\n\r\n switch (gantt.config.baselines.render_mode) {\r\n case \"taskRow\":\r\n task.row_height = task.bar_height + 4;\r\n break;\r\n\r\n case \"separateRow\":\r\n height = gantt.getLayoutView(\"timeline\").getBarHeight(task.id);\r\n if (baselineAmount) {\r\n task.bar_height = task.bar_height || height;\r\n\r\n if (task.bar_height > height){\r\n height = task.bar_height;\r\n }\r\n\r\n task.row_height = height + subrowHeight;\r\n } else if (task.bar_height) {\r\n task.row_height = task.bar_height + 4;\r\n }\r\n\r\n _increaseSplitParentHeight(task);\r\n break;\r\n\r\n case \"individualRow\":\r\n height = gantt.getLayoutView(\"timeline\").getBarHeight(task.id);\r\n\r\n if (baselineAmount) {\r\n task.bar_height = task.bar_height || height;\r\n\r\n if (task.bar_height > height){\r\n height = task.bar_height;\r\n }\r\n\r\n baselineSize = subrowHeight * baselineAmount;\r\n // betweenBaselines = 3 * (baselineAmount + 1);\r\n\r\n task.row_height = height + baselineSize + margins;\r\n } else if (task.bar_height){\r\n task.row_height = task.bar_height + 4;\r\n }\r\n\r\n _increaseSplitParentHeight(task);\r\n }\r\n };\r\n\r\n function _increaseSplitParentHeight(task) {\r\n gantt.eachParent(function (parent) {\r\n if (isSplitParent(parent)) {\r\n const parentHeight = parent.row_height || gantt.getLayoutView(\"timeline\").getBarHeight(parent.id);\r\n let maxHeight = task.row_height;\r\n\r\n // iterate only direct children\r\n const subtasks = gantt.getChildren(parent.id);\r\n subtasks.forEach(function (subtaskId) {\r\n const subtask = gantt.getTask(subtaskId);\r\n if (subtask.id == task.id) {\r\n return;\r\n }\r\n const subtaskHeight = subtask.row_height || gantt.getLayoutView(\"timeline\").getBarHeight(subtask.id);\r\n maxHeight = maxHeight || subtaskHeight;\r\n if (subtaskHeight > maxHeight) {\r\n maxHeight = subtaskHeight;\r\n }\r\n });\r\n\r\n parent.row_height = maxHeight;\r\n parent.bar_height = parent.bar_height || parentHeight;\r\n }\r\n }, task.id);\r\n }\r\n\r\n gantt.attachEvent(\r\n \"onGanttReady\",\r\n function () {\r\n\r\n if(gantt.config.baselines === false){\r\n return;\r\n }\r\n\r\n gantt.attachEvent(\"onParse\", function () {\r\n baselineStore.eachItem(function (baseline) {\r\n const taskId = baseline.task_id;\r\n if (gantt.isTaskExists(taskId)) {\r\n const task = gantt.getTask(taskId);\r\n\r\n task.baselines = task.baselines || [];\r\n\r\n let newBaseline = true;\r\n for (let i = 0; i < task.baselines.length; i++) {\r\n let existingBaseline = task.baselines[i];\r\n if (existingBaseline.id == baseline.id){\r\n newBaseline = false;\r\n gantt.mixin(existingBaseline, baseline, true);\r\n break;\r\n }\r\n }\r\n if (newBaseline){\r\n task.baselines.push(baseline);\r\n }\r\n\r\n if (isSplitParent(task)){\r\n _adjustSplitParentHeight (task);\r\n } else {\r\n gantt.adjustTaskHeightForBaselines(task);\r\n }\r\n }\r\n });\r\n });\r\n\r\n gantt.attachEvent(\"onBeforeTaskUpdate\", function (id, task) {\r\n _syncBaselines(task);\r\n return true;\r\n });\r\n\r\n gantt.attachEvent(\"onAfterUndo\", function(action){\r\n const baselinesRenderedBelow = gantt.config.baselines.render_mode == \"separateRow\" || gantt.config.baselines.render_mode == \"individualRow\";\r\n if (baselinesRenderedBelow && action){\r\n let repaint = false;\r\n action.commands.forEach(function(command){\r\n if (command.entity == \"task\"){\r\n const taskId = command.value.id;\r\n if (gantt.isTaskExists(taskId)){\r\n const task = gantt.getTask(taskId);\r\n if (task.parent && gantt.isTaskExists(task.parent)){\r\n const parent = gantt.getTask(task.parent);\r\n if (isSplitParent(parent)){\r\n _adjustSplitParentHeight (parent);\r\n repaint = true;\r\n }\r\n }\r\n } \r\n }\r\n });\r\n if (repaint){\r\n gantt.render();\r\n }\r\n }\r\n });\r\n\r\n gantt.attachEvent(\"onAfterTaskDelete\", function (id, task) {\r\n if (hasBaselinesBelow){\r\n if (task.parent && gantt.isTaskExists(task.parent)){\r\n const parent = gantt.getTask(task.parent);\r\n if (isSplitParent(parent)){\r\n _adjustSplitParentHeight (parent);\r\n }\r\n }\r\n }\r\n _deleteOrphanBaselines();\r\n });\r\n\r\n gantt.getTaskBaselines = function (taskId) {\r\n const baselines = [];\r\n baselineStore.eachItem(function (baseline) {\r\n if (baseline.task_id == taskId) {\r\n baselines.push(baseline);\r\n }\r\n });\r\n return baselines;\r\n };\r\n gantt.$data.baselineStore.attachEvent(\"onClearAll\", function () {\r\n gantt.eachTask(function(task){\r\n if (task.baselines){\r\n delete task.baselines;\r\n }\r\n });\r\n // The data should not be repainted as otherwise it causes issues when we have resource \r\n // assignments and group tasks. It should be fixed when we add a repaint stack\r\n // gantt.refreshData();\r\n return true;\r\n });\r\n\r\n gantt.$data.tasksStore.attachEvent(\"onClearAll\", function () {\r\n baselineStore.clearAll();\r\n return true;\r\n });\r\n gantt.attachEvent(\"onTaskIdChange\", function (id, new_id) {\r\n const baselines = baselineStore.find(function (a) {\r\n return a.task_id == id;\r\n });\r\n baselines.forEach(function (a) {\r\n a.task_id = new_id;\r\n baselineStore.updateItem(a.id);\r\n });\r\n });\r\n },\r\n { once: true }\r\n );\r\n};\r\n","import * as helpers from \"../../utils/helpers\";\r\n\r\nexport default function(gantt) {\r\n\tgantt.load = function(){\r\n\t\tthrow new Error(\"gantt.load() method is not available in the node.js, use gantt.parse() instead\");\r\n\t};\r\n\tgantt.parse = function (data, type) {\r\n\t\tthis.on_load({xmlDoc: {responseText: data}}, type);\r\n\t};\r\n\r\n\tgantt.serialize = function (type) {\r\n\t\ttype = type || \"json\";\r\n\t\treturn this[type].serialize();\r\n\t};\r\n\r\n\t/*\r\n\ttasks and relations\r\n\t{\r\n\tdata:[\r\n\t\t{\r\n\t\t\t\"id\":\"string\",\r\n\t\t\t\"text\":\"...\",\r\n\t\t\t\"start_date\":\"Date or string\",\r\n\t\t\t\"end_date\":\"Date or string\",\r\n\t\t\t\"duration\":\"number\",\r\n\t\t\t\"progress\":\"0..1\",\r\n\t\t\t\"parent_id\":\"string\",\r\n\t\t\t\"order\":\"number\"\r\n\t\t},...],\r\n\tlinks:[\r\n\t\t{\r\n\t\t\tid:\"string\",\r\n\t\t\tsource:\"string\",\r\n\t\t\ttarget:\"string\",\r\n\t\t\ttype:\"string\"\r\n\t\t},...],\r\n\tcollections:{\r\n\t\t\tcollectionName:[\r\n\t\t\t\t{key:, label:, optional:...},...\r\n\t\t\t],...\r\n\t\t}\r\n\t}\r\n\r\n\t* */\r\n\r\n\tgantt.on_load = function (resp, type) {\r\n\t\tif(resp.xmlDoc && resp.xmlDoc.status === 404){ // work if we don't have a file at current url\r\n\t\t\tthis.assert(false, \"Failed to load the data from \" \r\n\t\t\t\t+ resp.xmlDoc.responseURL + \", server returns 404\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(gantt.$destroyed){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.callEvent(\"onBeforeParse\", []);\r\n\t\tif (!type)\r\n\t\t\ttype = \"json\";\r\n\t\tthis.assert(this[type], \"Invalid data type:'\" + type + \"'\");\r\n\r\n\t\tvar raw = resp.xmlDoc.responseText;\r\n\r\n\t\tvar data = this[type].parse(raw, resp);\r\n\t\tthis._process_loading(data);\r\n\t};\r\n\r\n\tfunction attachAssignmentsToTasks(tasks, assignments) {\r\n\t\tconst assignmentsByTasks = {};\r\n\t\tassignments.forEach((a)=>{\r\n\t\t\tif(!assignmentsByTasks[a.task_id]) {\r\n\t\t\t\tassignmentsByTasks[a.task_id] = [];\r\n\t\t\t}\r\n\t\t\tassignmentsByTasks[a.task_id].push(a);\r\n\t\t});\r\n\t\ttasks.forEach((t) => {\r\n\t\t\tt[gantt.config.resource_property] = assignmentsByTasks[t.id] || [];\r\n\t\t});\t\r\n\t}\r\n\t\r\n\tgantt._process_loading = function (data) {\r\n\t\tif(data.collections)\r\n\t\t\tthis._load_collections(data.collections);\r\n\r\n\t\tif(data.resources && this.$data.resourcesStore){\r\n\t\t\tthis.$data.resourcesStore.parse(data.resources);\r\n\t\t}\r\n\t\tif(gantt.config.baselines !== false && data.baselines && this.$data.baselineStore){\r\n\t\t\tthis.$data.baselineStore.parse(data.baselines);\r\n\t\t}\r\n\t\t\r\n\t\tconst tasks = data.data || data.tasks;\r\n\t\tif(data.assignments){\r\n\t\t\tattachAssignmentsToTasks(tasks, data.assignments);\r\n\t\t}\r\n\r\n\t\tthis.$data.tasksStore.parse(tasks);\r\n\t\tvar links = data.links || (data.collections ? data.collections.links : []);\r\n\t\tthis.$data.linksStore.parse(links);\r\n\r\n\t\t//this._sync_links();\r\n\t\tthis.callEvent(\"onParse\", []);\r\n\t\tthis.render();\r\n\t};\r\n\r\n\tgantt._load_collections = function (collections) {\r\n\t\tvar collections_loaded = false;\r\n\t\tfor (var key in collections) {\r\n\t\t\tif (collections.hasOwnProperty(key)) {\r\n\t\t\t\tcollections_loaded = true;\r\n\t\t\t\tvar collection = collections[key];\r\n\t\t\t\t// GS-1728. Create an empty serverList if it doesn't exist\r\n\t\t\t\tthis.serverList[key] = this.serverList[key] || [];\r\n\t\t\t\tvar arr = this.serverList[key];\r\n\t\t\t\tif (!arr) continue;\r\n\t\t\t\tarr.splice(0, arr.length); //clear old options\r\n\t\t\t\tfor (var j = 0; j < collection.length; j++) {\r\n\t\t\t\t\tvar option = collection[j];\r\n\t\t\t\t\tvar obj = this.copy(option);\r\n\t\t\t\t\tobj.key = obj.value;// resulting option object\r\n\r\n\t\t\t\t\tfor (var option_key in option) {\r\n\t\t\t\t\t\tif (option.hasOwnProperty(option_key)) {\r\n\t\t\t\t\t\t\tif (option_key == \"value\" || option_key == \"label\")\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\tobj[option_key] = option[option_key]; // obj['value'] = option['value']\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (collections_loaded)\r\n\t\t\tthis.callEvent(\"onOptionsLoad\", []);\r\n\t};\r\n\r\n\tgantt.attachEvent(\"onBeforeTaskDisplay\", function (id, task) {\r\n\t\treturn !task.$ignore;\r\n\t});\r\n\r\n\tfunction jsonParseError(data){\r\n\t\tgantt.assert(false, \"Can't parse data: incorrect value of gantt.parse or gantt.load method. \"\r\n\t\t\t+ \"Actual argument value: \" + JSON.stringify(data));\r\n\t\tthrow new Error(\"Invalid argument for gantt.parse or gantt.load. An object or a JSON string of format https://docs.dhtmlx.com/gantt/desktop__supported_data_formats.html#json is expected. Actual argument value: \"\r\n\t\t\t+ JSON.stringify(data));\r\n\t}\r\n\r\n\tgantt.json = {\r\n\t\tparse: function (data) {\r\n\t\t\tif(!data){\r\n\t\t\t\tjsonParseError(data);\r\n\t\t\t}\r\n\r\n\t\t\tif (typeof data == \"string\") {\r\n\t\t\t\tif (typeof JSON != undefined){\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tdata = JSON.parse(data);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(e) {\r\n\t\t\t\t\t\tjsonParseError(data);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tgantt.assert(false, \"JSON is not supported\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(!data.data && !data.tasks){\r\n\t\t\t\tjsonParseError(data);\r\n\t\t\t}\r\n\r\n\t\t\tif (data.dhx_security)\r\n\t\t\t\tgantt.security_key = data.dhx_security;\r\n\t\t\treturn data;\r\n\t\t},\r\n\t\tserializeTask: function (task) {\r\n\t\t\treturn this._copyObject(task);\r\n\t\t},\r\n\t\tserializeLink: function (link) {\r\n\t\t\treturn this._copyLink(link);\r\n\t\t},\r\n\t\t_copyLink: function (obj) {\r\n\t\t\tvar copy = {};\r\n\t\t\tfor (var key in obj)\r\n\t\t\t\tcopy[key] = obj[key];\r\n\t\t\treturn copy;\r\n\t\t},\r\n\t\t_copyObject: function (obj) {\r\n\t\t\tvar copy = {};\r\n\t\t\tfor (var key in obj) {\r\n\t\t\t\tif (key.charAt(0) == \"$\")\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\tcopy[key] = obj[key];\r\n\r\n\t\t\t\tif (helpers.isDate(copy[key])) {\r\n\t\t\t\t\tcopy[key] = gantt.defined(gantt.templates.xml_format) ? gantt.templates.xml_format(copy[key]) : gantt.templates.format_date(copy[key]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn copy;\r\n\t\t},\r\n\t\tserialize: function () {\r\n\t\t\tvar tasks = [];\r\n\t\t\tvar links = [];\r\n\t\t\tlet baselines = [];\r\n\r\n\t\t\tgantt.eachTask(function (obj) {\r\n\t\t\t\tgantt.resetProjectDates(obj);\r\n\t\t\t\ttasks.push(this.serializeTask(obj));\r\n\t\t\t}, gantt.config.root_id, this);\r\n\r\n\t\t\tvar rawLinks = gantt.getLinks();\r\n\t\t\tfor (var i = 0; i < rawLinks.length; i++) {\r\n\t\t\t\tlinks.push(this.serializeLink(rawLinks[i]));\r\n\t\t\t}\r\n\r\n\t\t\tconst baselineStore = gantt.getDatastore(\"baselines\");\r\n\t\t\tbaselineStore.eachItem(function(baseline){\r\n\t\t\t\tconst baselineCopy = gantt.json.serializeTask(baseline);\r\n\t\t\t\tbaselines.push(baselineCopy);\r\n\t\t\t});\r\n\r\n\t\t\treturn {\r\n\t\t\t\tdata: tasks,\r\n\t\t\t\tlinks,\r\n\t\t\t\tbaselines\r\n\t\t\t};\r\n\t\t}\r\n\t};\r\n\r\n\t/*\r\n\t\r\n\t\t\r\n\t\t\tMy task 1\r\n\t\t\t16.08.2013\r\n\t\t\t22.08.2013\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\r\n\t\r\n\t*/\r\n\r\n\tfunction xmlParseError(data){\r\n\t\tgantt.assert(false, \"Can't parse data: incorrect value of gantt.parse or gantt.load method. \"\r\n\t\t\t+ \"Actual argument value: \" + JSON.stringify(data));\r\n\t\tthrow new Error(\"Invalid argument for gantt.parse or gantt.load. An XML of format https://docs.dhtmlx.com/gantt/desktop__supported_data_formats.html#xmldhtmlxgantt20 is expected. Actual argument value: \"\r\n\t\t\t+ JSON.stringify(data));\r\n\t}\r\n\r\n\tgantt.xml = {\r\n\t\t_xmlNodeToJSON: function (node, attrs_only) {\r\n\t\t\tvar t = {};\r\n\t\t\tfor (var i = 0; i < node.attributes.length; i++)\r\n\t\t\t\tt[node.attributes[i].name] = node.attributes[i].value;\r\n\r\n\t\t\tif (!attrs_only) {\r\n\t\t\t\tfor (var i = 0; i < node.childNodes.length; i++) {\r\n\t\t\t\t\tvar child = node.childNodes[i];\r\n\t\t\t\t\tif (child.nodeType == 1)\r\n\t\t\t\t\t\tt[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\r\n\t\t\t}\r\n\r\n\t\t\treturn t;\r\n\t\t},\r\n\t\t_getCollections: function (loader) {\r\n\t\t\tvar collection = {};\r\n\t\t\tvar opts = gantt.ajax.xpath(\"//coll_options\", loader);\r\n\t\t\tfor (var i = 0; i < opts.length; i++) {\r\n\t\t\t\tvar bind = opts[i].getAttribute(\"for\");\r\n\t\t\t\tvar arr = collection[bind] = [];\r\n\t\t\t\tvar itms = gantt.ajax.xpath(\".//item\", opts[i]);\r\n\t\t\t\tfor (var j = 0; j < itms.length; j++) {\r\n\t\t\t\t\tvar itm = itms[j];\r\n\t\t\t\t\tvar attrs = itm.attributes;\r\n\t\t\t\t\tvar obj = {key: itms[j].getAttribute(\"value\"), label: itms[j].getAttribute(\"label\")};\r\n\t\t\t\t\tfor (var k = 0; k < attrs.length; k++) {\r\n\t\t\t\t\t\tvar attr = attrs[k];\r\n\t\t\t\t\t\tif (attr.nodeName == \"value\" || attr.nodeName == \"label\")\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\tobj[attr.nodeName] = attr.nodeValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarr.push(obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn collection;\r\n\t\t},\r\n\t\t_getXML: function (text, loader, toptag) {\r\n\t\t\ttoptag = toptag || \"data\";\r\n\t\t\tif (!loader.getXMLTopNode) {\r\n\t\t\t\tloader = gantt.ajax.parse(loader);\r\n\t\t\t}\r\n\r\n\t\t\tvar xml = gantt.ajax.xmltop(toptag, loader.xmlDoc);\r\n\t\t\tif (!xml || xml.tagName != toptag) {\r\n\t\t\t\txmlParseError(text);\r\n\t\t\t}\r\n\r\n\t\t\tvar skey = xml.getAttribute(\"dhx_security\");\r\n\t\t\tif (skey)\r\n\t\t\t\tgantt.security_key = skey;\r\n\r\n\t\t\treturn xml;\r\n\t\t},\r\n\t\tparse: function (text, loader) {\r\n\t\t\tloader = this._getXML(text, loader);\r\n\t\t\tvar data = {};\r\n\r\n\t\t\tvar evs = data.data = [];\r\n\t\t\tvar xml = gantt.ajax.xpath(\"//task\", loader);\r\n\r\n\t\t\tfor (var i = 0; i < xml.length; i++)\r\n\t\t\t\tevs[i] = this._xmlNodeToJSON(xml[i]);\r\n\r\n\t\t\tdata.collections = this._getCollections(loader);\r\n\t\t\treturn data;\r\n\t\t},\r\n\t\t_copyLink: function (obj) {\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\t_copyObject: function (obj) {\r\n\t\t\treturn \"\";\r\n\t\t},\r\n\t\tserialize: function () {\r\n\t\t\tvar tasks = [];\r\n\t\t\tvar links = [];\r\n\r\n\t\t\tvar json = gantt.json.serialize();\r\n\t\t\tfor (var i = 0, len = json.data.length; i < len; i++) {\r\n\t\t\t\ttasks.push(this._copyObject(json.data[i]));\r\n\t\t\t}\r\n\t\t\tfor (var i = 0, len = json.links.length; i < len; i++) {\r\n\t\t\t\tlinks.push(this._copyLink(json.links[i]));\r\n\t\t\t}\r\n\t\t\treturn \"\" + tasks.join(\"\") + \"\" + links.join(\"\") + \"\";\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tgantt.oldxml = {\r\n\t\tparse: function (text, loader) {\r\n\t\t\tloader = gantt.xml._getXML(text, loader, \"projects\");\r\n\t\t\tvar data = {collections: {links: []}};\r\n\r\n\t\t\tvar evs = data.data = [];\r\n\t\t\tvar xml = gantt.ajax.xpath(\"//task\", loader);\r\n\r\n\t\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\t\tevs[i] = gantt.xml._xmlNodeToJSON(xml[i]);\r\n\t\t\t\tvar parent = xml[i].parentNode;\r\n\r\n\t\t\t\tif (parent.tagName == \"project\")\r\n\t\t\t\t\tevs[i].parent = \"project-\" + parent.getAttribute(\"id\");\r\n\t\t\t\telse\r\n\t\t\t\t\tevs[i].parent = parent.parentNode.getAttribute(\"id\");\r\n\t\t\t}\r\n\r\n\t\t\txml = gantt.ajax.xpath(\"//project\", loader);\r\n\t\t\tfor (var i = 0; i < xml.length; i++) {\r\n\t\t\t\tvar ev = gantt.xml._xmlNodeToJSON(xml[i], true);\r\n\t\t\t\tev.id = \"project-\" + ev.id;\r\n\t\t\t\tevs.push(ev);\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i = 0; i < evs.length; i++) {\r\n\t\t\t\tvar ev = evs[i];\r\n\t\t\t\tev.start_date = ev.startdate || ev.est;\r\n\t\t\t\tev.end_date = ev.enddate;\r\n\t\t\t\tev.text = ev.name;\r\n\t\t\t\tev.duration = ev.duration / 8;\r\n\t\t\t\tev.open = 1;\r\n\t\t\t\tif (!ev.duration && !ev.end_date) ev.duration = 1;\r\n\t\t\t\tif (ev.predecessortasks)\r\n\t\t\t\t\tdata.collections.links.push({\r\n\t\t\t\t\t\ttarget: ev.id,\r\n\t\t\t\t\t\tsource: ev.predecessortasks,\r\n\t\t\t\t\t\ttype: gantt.config.links.finish_to_start\r\n\t\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t},\r\n\t\tserialize: function () {\r\n\t\t\tgantt.message(\"Serialization to 'old XML' is not implemented\");\r\n\t\t}\r\n\t};\r\n\r\n\tgantt.serverList = function (name, array) {\r\n\t\tif (array) {\r\n\t\t\tthis.serverList[name] = array.slice(0);\r\n\t\t} else if (!this.serverList[name]) {\r\n\t\t\tthis.serverList[name] = [];\r\n\t\t}\r\n\t\treturn this.serverList[name];\r\n\t};\r\n\r\n};","import * as utils from \"../../utils/utils\";\r\nimport * as helpers from \"../../utils/helpers\";\r\n\r\n\r\nfunction IsWorkTimeArgument(date, unit, task, id, calendar){\r\n\tthis.date = date;\r\n\tthis.unit = unit;\r\n\tthis.task = task;\r\n\tthis.id = id;\r\n\tthis.calendar = calendar;\r\n\treturn this;\r\n}\r\n\r\nfunction ClosestWorkTimeArgument(date, dir, unit, task, id, calendar){\r\n\tthis.date = date;\r\n\tthis.dir = dir;\r\n\tthis.unit = unit;\r\n\tthis.task = task;\r\n\tthis.id = id;\r\n\tthis.calendar = calendar;\r\n\treturn this;\r\n}\r\n\r\nfunction CalculateEndDateArgument(start_date, duration, unit, step, task, id, calendar){\r\n\tthis.start_date = start_date;\r\n\tthis.duration = duration;\r\n\tthis.unit = unit;\r\n\tthis.step = step;\r\n\tthis.task = task;\r\n\tthis.id = id;\r\n\tthis.calendar = calendar;\r\n\treturn this;\r\n}\r\n\r\nfunction GetDurationArgument(start, end, task, calendar) {\r\n\tthis.start_date = start;\r\n\tthis.end_date = end;\r\n\tthis.task = task;\r\n\tthis.calendar = calendar;\r\n\tthis.unit = null;\r\n\tthis.step = null;\r\n\treturn this;\r\n}\r\n\r\nvar calendarArgumentsHelper = function(gantt){\r\n\treturn {\r\n\t\tgetWorkHoursArguments: function () {\r\n\t\t\tvar config = arguments[0];\r\n\t\t\tif (helpers.isDate(config)) {\r\n\t\t\t\tconfig = {\r\n\t\t\t\t\tdate: config\r\n\t\t\t\t};\r\n\t\t\t} else {\r\n\t\t\t\tconfig = utils.mixin({}, config);\r\n\t\t\t}\r\n\r\n\t\t\tif(!helpers.isValidDate(config.date)){\r\n\t\t\t\tgantt.assert(false, \"Invalid date argument for getWorkHours method\");\r\n\t\t\t\tthrow new Error(\"Invalid date argument for getWorkHours method\");\r\n\t\t\t}\r\n\r\n\t\t\treturn config;\r\n\t\t},\r\n\t\tsetWorkTimeArguments: function () {\r\n\t\t\treturn arguments[0];\r\n\t\t},\r\n\t\tunsetWorkTimeArguments: function () {\r\n\t\t\treturn arguments[0];\r\n\t\t},\r\n\t\tisWorkTimeArguments: function () {\r\n\t\t\tvar config = arguments[0];\r\n\t\t\tif(config instanceof IsWorkTimeArgument){\r\n\t\t\t\treturn config;\r\n\t\t\t}\r\n\r\n\t\t\tvar processedConfig;\r\n\t\t\tif (!config.date) {\r\n\t\t\t\t//IsWorkTimeArgument(date, unit, task, id, calendar)\r\n\t\t\t\tprocessedConfig = new IsWorkTimeArgument(arguments[0], arguments[1], arguments[2], null, arguments[3]);\r\n\t\t\t} else {\r\n\t\t\t\tprocessedConfig = new IsWorkTimeArgument(config.date, config.unit, config.task, null, config.calendar);\r\n\t\t\t}\r\n\r\n\t\t\tprocessedConfig.unit = processedConfig.unit || gantt.config.duration_unit;\r\n\r\n\t\t\tif(!helpers.isValidDate(processedConfig.date)){\r\n\t\t\t\tgantt.assert(false, \"Invalid date argument for isWorkTime method\");\r\n\t\t\t\tthrow new Error(\"Invalid date argument for isWorkTime method\");\r\n\t\t\t}\r\n\r\n\t\t\treturn processedConfig;\r\n\t\t},\r\n\t\tgetClosestWorkTimeArguments: function (arg) {\r\n\t\t\tvar config = arguments[0];\r\n\t\t\tif (config instanceof ClosestWorkTimeArgument)\r\n\t\t\t\treturn config;\r\n\r\n\t\t\tvar processedConfig;\r\n\t\t\tif (helpers.isDate(config)) {\r\n\t\t\t\tprocessedConfig = new ClosestWorkTimeArgument(config);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tprocessedConfig = new ClosestWorkTimeArgument(\r\n\t\t\t\t\tconfig.date,\r\n\t\t\t\t\tconfig.dir,\r\n\t\t\t\t\tconfig.unit,\r\n\t\t\t\t\tconfig.task,\r\n\t\t\t\t\tnull,//config.id,\r\n\t\t\t\t\tconfig.calendar\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif(config.id){\r\n\t\t\t\tprocessedConfig.task = config;\r\n\t\t\t}\r\n\t\t\tprocessedConfig.dir = config.dir || 'any';\r\n\t\t\tprocessedConfig.unit = config.unit || gantt.config.duration_unit;\r\n\r\n\t\t\tif(!helpers.isValidDate(processedConfig.date)){\r\n\t\t\t\tgantt.assert(false, \"Invalid date argument for getClosestWorkTime method\");\r\n\t\t\t\tthrow new Error(\"Invalid date argument for getClosestWorkTime method\");\r\n\t\t\t}\r\n\t\t\treturn processedConfig;\r\n\t\t},\r\n\r\n\t\t_getStartEndConfig: function (param) {\r\n\t\t\tvar argumentType = GetDurationArgument;\r\n\t\t\tvar config;\r\n\t\t\tif (param instanceof argumentType)\r\n\t\t\t\treturn param;\r\n\r\n\t\t\tif (helpers.isDate(param)) {\r\n\t\t\t\tconfig = new argumentType(arguments[0], arguments[1], arguments[2], arguments[3]);\r\n\t\t\t} else {\r\n\t\t\t\tconfig = new argumentType(param.start_date, param.end_date, param.task);\r\n\t\t\t\tif (param.id !== null && param.id !== undefined) {\r\n\t\t\t\t\tconfig.task = param;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconfig.unit = config.unit || gantt.config.duration_unit;\r\n\t\t\tconfig.step = config.step || gantt.config.duration_step;\r\n\t\t\tconfig.start_date = config.start_date || config.start || config.date;\r\n\r\n\t\t\tif(!helpers.isValidDate(config.start_date)){\r\n\t\t\t\tgantt.assert(false, \"Invalid start_date argument for getDuration method\");\r\n\t\t\t\tthrow new Error(\"Invalid start_date argument for getDuration method\");\r\n\t\t\t}\r\n\r\n\t\t\tif(!helpers.isValidDate(config.end_date)){\r\n\t\t\t\tgantt.assert(false, \"Invalid end_date argument for getDuration method\");\r\n\t\t\t\tthrow new Error(\"Invalid end_date argument for getDuration method\");\r\n\t\t\t}\r\n\r\n\t\t\treturn config;\r\n\t\t},\r\n\r\n\t\tgetDurationArguments: function (start, end, unit, step) {\r\n\t\t\treturn this._getStartEndConfig.apply(this, arguments);\r\n\t\t},\r\n\r\n\t\thasDurationArguments: function (start, end, unit, step) {\r\n\t\t\treturn this._getStartEndConfig.apply(this, arguments);\r\n\t\t},\r\n\r\n\t\tcalculateEndDateArguments: function (start, duration, unit, step) {\r\n\t\t\tvar config = arguments[0];\r\n\t\t\tif (config instanceof CalculateEndDateArgument)\r\n\t\t\t\treturn config;\r\n\r\n\t\t\tvar processedConfig;\r\n\t\t\t//CalculateEndDateArgument(start_date, duration, unit, step, task, id, calendar)\r\n\t\t\tif (helpers.isDate(config)) {\r\n\t\t\t\tprocessedConfig = new CalculateEndDateArgument(\r\n\t\t\t\t\targuments[0],\r\n\t\t\t\t\targuments[1],\r\n\t\t\t\t\targuments[2],\r\n\t\t\t\t\tundefined,\r\n\t\t\t\t\targuments[3],\r\n\t\t\t\t\tundefined,\r\n\t\t\t\t\targuments[4]\r\n\t\t\t\t);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tprocessedConfig = new CalculateEndDateArgument(\r\n\t\t\t\t\tconfig.start_date,\r\n\t\t\t\t\tconfig.duration,\r\n\t\t\t\t\tconfig.unit,\r\n\t\t\t\t\tconfig.step,\r\n\t\t\t\t\tconfig.task,\r\n\t\t\t\t\tnull,//config.id,\r\n\t\t\t\t\tconfig.calendar\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif(config.id !== null && config.id !== undefined){\r\n\t\t\t\tprocessedConfig.task = config;\r\n\r\n\t\t\t\t// received a task object as an argument\r\n\t\t\t\t// ignore 'unit' and 'step' properties in this case, since it's likely a part of data model of a task\r\n\t\t\t\tprocessedConfig.unit = null;\r\n\t\t\t\tprocessedConfig.step = null;\r\n\t\t\t}\r\n\r\n\t\t\tprocessedConfig.unit = processedConfig.unit || gantt.config.duration_unit;\r\n\t\t\tprocessedConfig.step = processedConfig.step || gantt.config.duration_step;\r\n\r\n\t\t\tif(!helpers.isValidDate(processedConfig.start_date)){\r\n\t\t\t\tgantt.assert(false, \"Invalid start_date argument for calculateEndDate method\");\r\n\t\t\t\tthrow new Error(\"Invalid start_date argument for calculateEndDate method\");\r\n\t\t\t}\r\n\r\n\t\t\treturn processedConfig;\r\n\t\t}\r\n\t};\r\n};\r\n\r\n\r\nexport default calendarArgumentsHelper;","import * as utils from \"../../../utils/utils\";\r\nfunction WorkTimeCalendarMerger(){\r\n}\r\n\r\nWorkTimeCalendarMerger.prototype = {\r\n\r\n\r\n\t/**\r\n\t * convert hours array items into objects, e.g. [8, 12, 17, 18] -> [{start: 8, end: 12}, {start:17, end:18}]\r\n\t * @param {Array} hoursArray\r\n\t */\r\n\t_getIntervals: function(hoursArray){\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < hoursArray.length; i += 2){\r\n\r\n\t\t\tresult.push({\r\n\t\t\t\tstart: hoursArray[i],\r\n\t\t\t\tend: hoursArray[i+1]\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn result;\r\n\t},\r\n\r\n\t/**\r\n\t * Convert ranges config into hours array\r\n\t * [{start: 8, end: 12}, {start:17, end:18}] --> [8, 12, 17, 18]\r\n\t * @param {*} intervalsArray\r\n\t */\r\n\t_toHoursArray: function(intervalsArray){\r\n\t\tvar result = [];\r\n\r\n\t\tfunction toFixed(value){\r\n\t\t\tvar str = String(value);\r\n\t\t\tif(str.length < 2){\r\n\t\t\t\tstr = \"0\" + str;\r\n\t\t\t}\r\n\t\t\treturn str;\r\n\t\t}\r\n\t\tfunction formatHHMM(secondsValue){\r\n\t\t\tvar hours = Math.floor(secondsValue / (60*60));\r\n\t\t\tvar minutePart = secondsValue - hours * 60 * 60;\r\n\r\n\t\t\tvar minutes = Math.floor(minutePart / (60));\r\n\t\t\treturn hours + \":\" + toFixed(minutes);\r\n\t\t}\r\n\t\tfor(var i = 0; i < intervalsArray.length; i++){\r\n\t\t\tresult.push(\r\n\t\t\t\tformatHHMM(intervalsArray[i].start) +\r\n\t\t\t\t\"-\" +\r\n\t\t\t\tformatHHMM(intervalsArray[i].end)\r\n\t\t\t);\r\n\t\t}\r\n\t\treturn result;\r\n\t},\r\n\r\n\t/**\r\n\t * Build intersection of hour intervals. e.g.\r\n\t * first: [{start: 8, end: 12}, {start:13, end:18}]\r\n\t * second: [{start: 10, end: 15}]\r\n\t * result: [{start: 10, end: 12}, {start: 13, end: 15}]\r\n\t * @param {Array} first\r\n\t * @param {Array} second\r\n\t */\r\n\t_intersectHourRanges: function(first, second){\r\n\t\tvar result = [];\r\n\r\n\t\tvar baseArray = first.length > second.length ? first : second;\r\n\t\tvar overridesArray = first === baseArray ? second: first;\r\n\t\tbaseArray = baseArray.slice();\r\n\t\toverridesArray = overridesArray.slice();\r\n\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < baseArray.length; i++){\r\n\t\t\tvar base = baseArray[i];\r\n\r\n\t\t\tfor(var j = 0; j < overridesArray.length; j++){\r\n\t\t\t\tvar current = overridesArray[j];\r\n\t\t\t\tif(current.start < base.end && current.end > base.start){\r\n\t\t\t\t\tresult.push({\r\n\t\t\t\t\t\tstart: Math.max(base.start, current.start),\r\n\t\t\t\t\t\tend: Math.min(base.end, current.end)\r\n\t\t\t\t\t});\r\n\t\t\t\t\tif(base.end > current.end){\r\n\t\t\t\t\t\toverridesArray.splice(j, 1);\r\n\t\t\t\t\t\tj--;\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t},\r\n\r\n\t/**\r\n\t * Reduce the number of ranges in config when possible,\r\n\t * joins ranges that can be merged\r\n\t * parts: [{start: 8, end: 12}, {start:12, end:13}, {start: 15, end: 17}]\r\n\t * result: [{start: 8, end: 13}, {start: 15, end: 17}]\r\n\t * @param {Array} parts\r\n\t */\r\n\t_mergeAdjacentIntervals: function(parts){\r\n\t\tvar result = parts.slice();\r\n\t\tresult.sort(function(a, b){\r\n\t\t\treturn a.start - b.start;\r\n\t\t});\r\n\t\tvar base = result[0];\r\n\t\tfor(var i = 1; i < result.length; i++){\r\n\t\t\tvar current = result[i];\r\n\t\t\tif(current.start <= base.end){\r\n\t\t\t\tif(current.end > base.end){\r\n\t\t\t\t\tbase.end = current.end;\r\n\t\t\t\t}\r\n\t\t\t\tresult.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}else{\r\n\t\t\t\tbase = current;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t},\r\n\r\n\t_mergeHoursConfig: function(firstHours, secondHours){\r\n\t\t//var firstIntervals = this._getIntervals(firstHours);\r\n\t\t//var secondIntervals = this._getIntervals(secondHours);\r\n\r\n\t\treturn this._mergeAdjacentIntervals(\r\n\t\t\tthis._intersectHourRanges(firstHours, secondHours)\r\n\t\t);\r\n\t},\r\n\r\n\tmerge: function(first, second){\r\n\t\tvar firstConfig = utils.copy(first.getConfig().parsed);\r\n\r\n\t\tvar secondConfig = utils.copy(second.getConfig().parsed);\r\n\r\n\t\tvar mergedSettings = {\r\n\t\t\thours: this._toHoursArray(this._mergeHoursConfig(firstConfig.hours, secondConfig.hours)),\r\n\t\t\tdates: {},\r\n\t\t\tcustomWeeks: {}\r\n\t\t};\r\n\r\n\t\tconst processCalendar = (config1, config2) => {\r\n\t\t\tfor (let i in config1.dates) {\r\n\t\t\t\tconst date1 = config1.dates[i];\r\n\t\r\n\t\t\t\t// dates contain day-of-week rules [0-7] and rules for specific dates (js date timestamps) - set false date rules initially\r\n\t\t\t\tif (+i > 1000) {\r\n\t\t\t\t\tmergedSettings.dates[i] = false;\r\n\t\t\t\t}\r\n\t\t\t\t// Check if the key exists in the fisrt calendar object\r\n\t\t\t\tfor (const key in config2.dates) {\r\n\t\t\t\t\tconst date2 = config2.dates[key];\r\n\t\r\n\t\t\t\t\t// Logical AND for week days\r\n\t\t\t\t\tif (key == i) {\r\n\t\t\t\t\t\tmergedSettings.dates[i] = !!(date1 && date2);\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t// Handle case where dates are arrays\r\n\t\t\t\t\tif (Array.isArray(date1)) {\r\n\t\t\t\t\t\tconst hours2 = Array.isArray(date2) ? date2 : config2.hours;\r\n\t\t\t\t\t\tmergedSettings.dates[i] = this._toHoursArray(this._mergeHoursConfig(date1, hours2));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\r\n\t\t// Check both calendars\r\n\t\tprocessCalendar(firstConfig, secondConfig);\r\n\t\tprocessCalendar(secondConfig, firstConfig);\r\n\r\n\t\t// transfer and overwrite custom week calendars\r\n\t\tif(firstConfig.customWeeks){\r\n\t\t\tfor(var i in firstConfig.customWeeks){\r\n\t\t\t\tmergedSettings.customWeeks[i] = firstConfig.customWeeks[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(secondConfig.customWeeks){\r\n\t\t\tfor(var i in secondConfig.customWeeks){\r\n\t\t\t\tmergedSettings.customWeeks[i] = secondConfig.customWeeks[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn mergedSettings;\r\n\r\n\t}\r\n\r\n};\r\n\r\nexport default WorkTimeCalendarMerger;","\r\n\r\nimport { IWorkUnitCache } from \"./workunit_cache_interface\";\r\n\r\nexport class WorkUnitsMapCache implements IWorkUnitCache {\r\n\tprivate _cache: Map>>;\r\n\tconstructor() {\r\n\t\tthis.clear();\r\n\t}\r\n\r\n\tgetItem(unit: string, timestamp: string, value: Date): number|boolean {\r\n\t\tif (this._cache.has(unit)) {\r\n\t\t\tconst unitCache = this._cache.get(unit);\r\n\r\n\t\t\tconst subCache = unitCache[value.getFullYear()];\r\n\t\t\tif (subCache && subCache.has(timestamp)) {\r\n\t\t\t\treturn subCache.get(timestamp);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}\r\n\tsetItem(unit: string, timestamp: string, value: boolean, rawValue: Date): void {\r\n\t\tif (!unit || !timestamp) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst cache = this._cache;\r\n\t\tconst year = rawValue.getFullYear();\r\n\r\n\t\tlet unitCache;\r\n\t\tif (!cache.has(unit)) {\r\n\t\t\tunitCache = [];\r\n\t\t\tcache.set(unit, unitCache);\r\n\t\t} else {\r\n\t\t\tunitCache = cache.get(unit);\r\n\t\t}\r\n\r\n\t\tlet yearCache = unitCache[year];\r\n\t\tif(!yearCache){\r\n\t\t\tyearCache = unitCache[year] = new Map();\r\n\t\t}\r\n\r\n\r\n\t\tyearCache.set(timestamp, value);\r\n\t}\r\n\tclear(): void{\r\n\t\tthis._cache = new Map>>();\r\n\t}\r\n}","import { IWorkUnitCache } from \"./workunit_cache_interface\";\r\n\r\nexport class WorkUnitsObjectCache implements IWorkUnitCache {\r\n\tprivate _cache: any;\r\n\tconstructor() {\r\n\t\tthis.clear();\r\n\t}\r\n\r\n\tgetItem(unit: string, timestamp: string, value: Date): number|boolean {\r\n\t\tconst cache = this._cache;\r\n\t\tif (cache && cache[unit]) {\r\n\t\t\tconst units = cache[unit];\r\n\t\t\tif(units === undefined){\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t\tconst subCache = units[value.getFullYear()];\r\n\t\t\tif (subCache && subCache[timestamp] !== undefined) {\r\n\t\t\t\treturn subCache[timestamp];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}\r\n\tsetItem(unit: string, timestamp: string, value: boolean, rawValue: Date): void {\r\n\t\tif (!unit || !timestamp) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst cache = this._cache;\r\n\r\n\t\tif (!cache) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!cache[unit]) {\r\n\t\t\tcache[unit] = [];\r\n\t\t}\r\n\t\tconst unitCache = cache[unit];\r\n\r\n\t\tconst year = rawValue.getFullYear();\r\n\t\tlet yearCache = unitCache[year];\r\n\t\tif(!yearCache){\r\n\t\t\tyearCache = unitCache[year] = {};\r\n\t\t}\r\n\t\tyearCache[timestamp] = value;\r\n\t}\r\n\tclear(): void{\r\n\t\tthis._cache = {};\r\n\t}\r\n}","\r\n\r\nexport class LargerUnitsCache {\r\n\tprivate _weekCache: Map;\r\n\tprivate _monthCache: Map;\r\n\tprivate _calendar: any;\r\n\tconstructor(calendar) {\r\n\t\tthis.clear();\r\n\t\tthis._calendar = calendar;\r\n\t}\r\n\r\n\tgetMinutesPerWeek = (weekStart: Date) => {\r\n\t\tconst key = weekStart.valueOf();\r\n\r\n\t\tif(this._weekCache.has(key)){\r\n\t\t\treturn this._weekCache.get(key);\r\n\t\t}\r\n\r\n\t\tconst calendar = this._calendar;\r\n\t\tconst gantt = this._calendar.$gantt;\r\n\r\n\t\tlet minutesPerWeek = 0;\r\n\t\tlet start = gantt.date.week_start(new Date(weekStart));\r\n\t\tfor(let i = 0; i < 7; i++){\r\n\t\t\tminutesPerWeek += calendar.getHoursPerDay(start) * 60;\r\n\t\t\tstart = gantt.date.add(start, 1, \"day\");\r\n\t\t}\r\n\r\n\t\tthis._weekCache.set(key, minutesPerWeek);\r\n\t\treturn minutesPerWeek;\r\n\t};\r\n\r\n\tgetMinutesPerMonth = (monthStart: Date) => {\r\n\t\tconst key = monthStart.valueOf();\r\n\r\n\t\tif(this._monthCache.has(key)){\r\n\t\t\treturn this._monthCache.get(key);\r\n\t\t}\r\n\r\n\t\tconst calendar = this._calendar;\r\n\t\tconst gantt = this._calendar.$gantt;\r\n\r\n\t\tlet minutesPerMonth = 0;\r\n\t\tlet start = gantt.date.week_start(new Date(monthStart));\r\n\t\tconst nextMonth = gantt.date.add(start, 1, \"month\").valueOf();\r\n\t\twhile(start.valueOf() < nextMonth){\r\n\t\t\tminutesPerMonth += calendar.getHoursPerDay(start) * 60;\r\n\t\t\tstart = gantt.date.add(start, 1, \"day\");\r\n\t\t}\r\n\r\n\t\tthis._monthCache.set(key, minutesPerMonth);\r\n\t\treturn minutesPerMonth;\r\n\t};\r\n\r\n\tclear = (): void => {\r\n\t\tthis._weekCache = new Map();\r\n\t\tthis._monthCache = new Map();\r\n\t};\r\n}","export class DateDurationCache {\r\n\tprivate _cache: any;\r\n\tconstructor() {\r\n\t\tthis.clear();\r\n\t}\r\n\r\n\t_getCacheObject(startDate: Date, unit: string, step:number){\r\n\t\tconst cache = this._cache;\r\n\t\tif (!cache[unit]) {\r\n\t\t\tcache[unit] = [];\r\n\t\t}\r\n\t\tlet unitCache = cache[unit];\r\n\t\tif(!unitCache) {\r\n\t\t\tunitCache = cache[unit] = {};\r\n\t\t}\r\n\r\n\t\tlet stepCache = unitCache[step];\r\n\t\tif(!stepCache) {\r\n\t\t\tstepCache = unitCache[step] = {};\r\n\t\t}\r\n\r\n\t\tconst year = startDate.getFullYear();\r\n\t\tlet yearCache = stepCache[year];\r\n\t\tif(!yearCache){\r\n\t\t\tyearCache = stepCache[year] = {durations: {}, endDates: {}};\r\n\t\t}\r\n\r\n\t\treturn yearCache;\r\n\t}\r\n\t_endDateCacheKey(startDate: number, duration: number){\r\n\t\treturn String(startDate) + \"-\" + String(duration);\r\n\t}\r\n\t_durationCacheKey(startDate: number, endDate: number){\r\n\t\treturn String(startDate) + \"-\" + String(endDate);\r\n\t}\r\n\tgetEndDate(startDate: Date, duration: number, unit: string, step: number, compute: () => Date): number|null{\r\n\t\tconst cache = this._getCacheObject(startDate, unit, step);\r\n\r\n\t\tconst startDateTimestamp = startDate.valueOf();\r\n\t\tconst key = this._endDateCacheKey(startDateTimestamp, duration);\r\n\t\tlet endDate;\r\n\t\tif(cache.endDates[key] === undefined){\r\n\t\t\tconst result = compute();\r\n\t\t\tconst resultTimestamp = result.valueOf();\r\n\t\t\tcache.endDates[key] = resultTimestamp;\r\n\t\t\tcache.durations[this._durationCacheKey(startDateTimestamp, resultTimestamp)] = duration;\r\n\t\t\tendDate = result;\r\n\t\t}else{\r\n\t\t\tendDate = new Date(cache.endDates[key]);\r\n\t\t}\r\n\r\n\t\treturn endDate;\r\n\t}\r\n\r\n\tgetDuration(startDate: Date, endDate: Date, unit: string, step: number, compute: () => number): number|null{\r\n\t\tconst cache = this._getCacheObject(startDate, unit, step);\r\n\r\n\t\tconst startDateTimestamp = startDate.valueOf();\r\n\t\tconst endDateTimestamp = endDate.valueOf();\r\n\t\tconst key = this._durationCacheKey(startDateTimestamp, endDateTimestamp);\r\n\t\tlet duration;\r\n\t\tif(cache.durations[key] === undefined){\r\n\t\t\tconst result = compute();\r\n\t\t\tcache.durations[key] = result.valueOf();\r\n\r\n\t\t\t// can't populate end date due to logic of end date calculation, current unit tests capture it\r\n\t\t\t// cache.endDates[this._endDateCacheKey(startDateTimestamp, result)] = endDateTimestamp;\r\n\t\t\tduration = result;\r\n\t\t}else{\r\n\t\t\tduration = cache.durations[key];\r\n\t\t}\r\n\r\n\t\treturn duration;\r\n\t}\r\n\r\n\tclear(): void{\r\n\t\tthis._cache = {};\r\n\t}\r\n}","import {createCacheObject} from \"./work_unit_cache\";\r\nimport {LargerUnitsCache} from \"./work_unit_cache\";\r\nimport * as utils from \"../../../utils/utils\";\r\nimport {DateDurationCache} from \"./work_unit_cache/date_duration_cache\";\r\n\r\nfunction CalendarWorkTimeStrategy(gantt, argumentsHelper) {\r\n\tthis.argumentsHelper = argumentsHelper;\r\n\tthis.$gantt = gantt;\r\n\tthis._workingUnitsCache = createCacheObject();\r\n\tthis._largeUnitsCache = new LargerUnitsCache(this);\r\n\tthis._dateDurationCache = new DateDurationCache();\r\n\tthis._worktime = null;\r\n\tthis._cached_timestamps = {};\r\n\tthis._cached_timestamps_count = 0;\r\n}\r\n\r\nCalendarWorkTimeStrategy.prototype = {\r\n\tunits: [\r\n\t\t\"year\",\r\n\t\t\"month\",\r\n\t\t\"week\",\r\n\t\t\"day\",\r\n\t\t\"hour\",\r\n\t\t\"minute\"\r\n\t],\r\n\t_clearCaches: function(){\r\n\t\tthis._workingUnitsCache.clear();\r\n\t\tthis._largeUnitsCache.clear();\r\n\t\tthis._dateDurationCache.clear();\r\n\t},\r\n\t// cache previously calculated worktime\r\n\t_getUnitOrder: function (unit) {\r\n\t\tfor (var i = 0, len = this.units.length; i < len; i++) {\r\n\t\t\tif (this.units[i] == unit)\r\n\t\t\t\treturn i;\r\n\t\t}\r\n\t},\r\n\t_resetTimestampCache: function(){\r\n\t\tthis._cached_timestamps = {};\r\n\t\tthis._cached_timestamps_count = 0;\r\n\t},\r\n\t_timestamp: function (settings) {\r\n\t\t// minor optimization, store calculated timestamps to reduce computations\r\n\t\t// reset cache when number of keys exceeds large number where key lookup may became more expensive than the recalculation\r\n\t\tif(this._cached_timestamps_count > 1000000){\r\n\t\t\tthis._resetTimestampCache();\r\n\t\t}\r\n\r\n\t\tvar timestamp = null;\r\n\t\tif ((settings.day || settings.day === 0)) {\r\n\t\t\ttimestamp = settings.day;\r\n\t\t} else if (settings.date) {\r\n\t\t\tvar value = String(settings.date.valueOf());\r\n\t\t\tif(this._cached_timestamps[value]){\r\n\t\t\t\ttimestamp = this._cached_timestamps[value];\r\n\t\t\t}else{\r\n\t\t\t\t// store worktime datestamp in utc so it could be recognized in different timezones (e.g. opened locally and sent to the export service in different timezone)\r\n\t\t\t\ttimestamp = Date.UTC(settings.date.getFullYear(), settings.date.getMonth(), settings.date.getDate());\r\n\t\t\t\tthis._cached_timestamps[value] = timestamp;\r\n\t\t\t\tthis._cached_timestamps_count++;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn timestamp;\r\n\t},\r\n\t_checkIfWorkingUnit: function (date, unit) {\r\n\t\t// GS-596: If unit is larger than day or has a custom logic\r\n\t\tif (!this[\"_is_work_\" + unit]) {\r\n\t\t\tconst from = this.$gantt.date[`${unit}_start`](new Date(date));\r\n\t\t\tconst to = this.$gantt.date.add(from, 1, unit);\r\n\t\t\treturn this.hasDuration(from, to);\r\n\t\t}\r\n\t\treturn this[\"_is_work_\" + unit](date);\r\n\t},\r\n\t//checkings for particular time units\r\n\t//methods for month-year-week can be defined, otherwise always return 'true'\r\n\t_is_work_day: function (date) {\r\n\t\tvar val = this._getWorkHours(date);\r\n\r\n\t\tif (Array.isArray(val)) {\r\n\t\t\treturn val.length > 0;\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\t_is_work_hour: function (date) {\r\n\t\tvar hours = this._getWorkHours(date); // [{start: 8*60*60, end: 12*60*60}, {start: 13*60*60, end: 17*60*60}]\r\n\t\tvar value = date.getHours();\r\n\t\tfor (var i = 0; i < hours.length; i++) {\r\n\t\t\tif(value >= hours[i].startHour && value < hours[i].endHour){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\t_getTimeOfDayStamp: function(date, dayEnd) {\r\n\t\tvar hours = date.getHours();\r\n\t\tif(!date.getHours() && !date.getMinutes() && dayEnd){\r\n\t\t\thours = 24;\r\n\t\t}\r\n\t\treturn hours * 60 * 60 + date.getMinutes() * 60;\r\n\t},\r\n\r\n\t_is_work_minute: function(date){\r\n\t\tvar hours = this._getWorkHours(date); // [{start: 8*60*60, end: 12*60*60}, {start: 13*60*60, end: 17*60*60}]\r\n\t\tvar checkTime = this._getTimeOfDayStamp(date);\r\n\t\tfor (var i = 0; i < hours.length; i++) {\r\n\t\t\tif(checkTime >= hours[i].start && checkTime < hours[i].end){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\t_nextDate: function (start, unit, step) {\r\n\t\treturn this.$gantt.date.add(start, step, unit);\r\n\t},\r\n\t_getWorkUnitsBetweenGeneric: function (from, to, unit, step) {\r\n\t\tvar dateHelper = this.$gantt.date;\r\n\t\tvar start = new Date(from),\r\n\t\t\tend = new Date(to);\r\n\t\tstep = step || 1;\r\n\t\tvar units = 0;\r\n\r\n\r\n\t\tvar next = null;\r\n\t\tvar stepStart,\r\n\t\t\tstepEnd;\r\n\r\n\t\t// calculating decimal durations, i.e. 2016-09-20 00:05:00 - 2016-09-20 01:00:00 ~ 0.95 instead of 1\r\n\t\t// and also 2016-09-20 00:00:00 - 2016-09-20 00:05:00 ~ 0.05 instead of 1\r\n\t\t// durations must be rounded later\r\n\t\tvar checkFirst = false;\r\n\t\tstepStart = dateHelper[unit + \"_start\"](new Date(start));\r\n\t\tif (stepStart.valueOf() != start.valueOf()) {\r\n\t\t\tcheckFirst = true;\r\n\t\t}\r\n\t\tvar checkLast = false;\r\n\t\tstepEnd = dateHelper[unit + \"_start\"](new Date(to));\r\n\t\tif (stepEnd.valueOf() != to.valueOf()) {\r\n\t\t\tcheckLast = true;\r\n\t\t}\r\n\r\n\t\tvar isLastStep = false;\r\n\t\twhile (start.valueOf() < end.valueOf()) {\r\n\t\t\tnext = this._nextDate(start, unit, step);\r\n\t\t\tisLastStep = (next.valueOf() > end.valueOf());\r\n\r\n\t\t\tif (this._isWorkTime(start, unit)) {\r\n\t\t\t\tif (checkFirst || (checkLast && isLastStep)) {\r\n\t\t\t\t\tstepStart = dateHelper[unit + \"_start\"](new Date(start));\r\n\t\t\t\t\tstepEnd = dateHelper.add(stepStart, step, unit);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (checkFirst) {\r\n\t\t\t\t\tcheckFirst = false;\r\n\t\t\t\t\tnext = this._nextDate(stepStart, unit, step);\r\n\t\t\t\t\tunits += ((stepEnd.valueOf() - start.valueOf()) / (stepEnd.valueOf() - stepStart.valueOf()));\r\n\t\t\t\t} else if (checkLast && isLastStep) {\r\n\t\t\t\t\tcheckLast = false;\r\n\t\t\t\t\tunits += ((end.valueOf() - start.valueOf()) / (stepEnd.valueOf() - stepStart.valueOf()));\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tunits++;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tvar unitOrder = this._getUnitOrder(unit);\r\n\t\t\t\tvar biggerTimeUnit = this.units[unitOrder - 1];\r\n\t\t\t\tif(biggerTimeUnit && !this._isWorkTime(start, biggerTimeUnit)){\r\n\t\t\t\t\tnext = this._getClosestWorkTimeFuture(start, biggerTimeUnit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tstart = next;\r\n\t\t}\r\n\t\treturn units;\r\n\t},\r\n\r\n\t_getMinutesPerHour: function (date) {\r\n\t\tvar hourStart = this._getTimeOfDayStamp(date);\r\n\t\tvar hourEnd = this._getTimeOfDayStamp(this._nextDate(date, \"hour\", 1));\r\n\t\tif (hourEnd === 0){\r\n\t\t\thourEnd = 24 * 60 * 60;\r\n\t\t}\r\n\t\tvar worktimes = this._getWorkHours(date);\r\n\r\n\t\tfor(var i = 0; i < worktimes.length; i++){\r\n\t\t\tvar interval = worktimes[i];\r\n\t\t\tif(hourStart >= interval.start && hourEnd <= interval.end){\r\n\t\t\t\treturn 60;// hour inside a working interval, all hour is a work hour\r\n\t\t\t}else if(hourStart < interval.end && hourEnd > interval.start){\r\n\t\t\t\t// hour is partially work time\r\n\t\t\t\tvar duration = Math.min(hourEnd, interval.end) - Math.max(hourStart, interval.start);\r\n\t\t\t\treturn duration / 60;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn 0;\r\n\t},\r\n\r\n\t_getMinutesPerDay: function (date) {\r\n\t\tvar hours = this._getWorkHours(date);\r\n\t\tvar res = 0;\r\n\t\thours.forEach(function(interval){\r\n\t\t\tres+= interval.durationMinutes;\r\n\t\t});\r\n\t\treturn res;\r\n\t},\r\n\tgetHoursPerDay: function (date) {\r\n\t\tvar hours = this._getWorkHours(date);\r\n\t\tvar res = 0;\r\n\t\thours.forEach(function(interval){\r\n\t\t\tres+= interval.durationHours;\r\n\t\t});\r\n\t\treturn res;\r\n\t},\r\n\t_getWorkUnitsForRange: function (from, to, unit, step) {\r\n\t\tvar total = 0;\r\n\t\tvar start = new Date(from),\r\n\t\t\tend = new Date(to);\r\n\r\n\t\tvar getUnitsPerDay;\r\n\t\tif (unit == \"minute\") {\r\n\t\t\tgetUnitsPerDay = utils.bind(this._getMinutesPerDay, this);\r\n\t\t} else {\r\n\t\t\tgetUnitsPerDay = utils.bind(this.getHoursPerDay, this);\r\n\t\t}\r\n\r\n\t\twhile (start.valueOf() < end.valueOf()) {\r\n\t\t\tif(end - start > 1000*60*60*24*32 && start.getDate() === 0) {\r\n\t\t\t\tvar units = this._largeUnitsCache.getMinutesPerMonth(start);\r\n\t\t\t\tif(unit == \"hour\"){\r\n\t\t\t\t\tunits = units / 60;\r\n\t\t\t\t}\r\n\t\t\t\ttotal += units;\r\n\t\t\t\tstart = this.$gantt.date.add(start, 1, \"month\");\r\n\t\t\t\tcontinue;\r\n\t\t\t}else if(end - start > 1000*60*60*24*16) {\r\n\t\t\t\tvar weekStart = this.$gantt.date.week_start(new Date(start));\r\n\t\t\t\tif(start.valueOf() === weekStart.valueOf()){\r\n\t\t\t\t\tvar units = this._largeUnitsCache.getMinutesPerWeek(start);\r\n\t\t\t\t\tif(unit == \"hour\"){\r\n\t\t\t\t\t\tunits = units / 60;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttotal += units;\r\n\t\t\t\t\tstart = this.$gantt.date.add(start, 7, \"day\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t//\tif (this._isWorkTime(start, \"day\")) {\r\n\t\t\ttotal += getUnitsPerDay(start);\r\n\t\t//\t}\r\n\t\t\tstart = this._nextDate(start, \"day\", 1);\r\n\t\t}\r\n\r\n\t\treturn total / step;\r\n\t},\r\n\r\n\r\n\t_getMinutesBetweenSingleDay: function(from, to){\r\n\t\tvar range = this._getIntervalTimestamp(from, to);\r\n\t\tvar worktimes = this._getWorkHours(from);\r\n\t\tvar result = 0;\r\n\r\n\t\tfor(var i = 0; i < worktimes.length; i++){\r\n\t\t\tvar interval = worktimes[i];\r\n\t\t\tif(range.end >= interval.start && range.start <= interval.end){\r\n\t\t\t\tvar minuteFrom = Math.max(interval.start, range.start);\r\n\t\t\t\tvar minuteTo = Math.min(interval.end, range.end);\r\n\r\n\t\t\t\tresult += (minuteTo - minuteFrom) / 60;\r\n\t\t\t\trange.start = minuteTo;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Math.floor(result);\r\n\t},\r\n\r\n\t_getMinutesBetween: function(from, to, unit, step){\r\n\t\tvar start = new Date(from),\r\n\t\t\tend = new Date(to);\r\n\t\tstep = step || 1;\r\n\r\n\t\tvar firstDayStart = new Date(start);\r\n\t\tvar firstDayEnd = this.$gantt.date.add(this.$gantt.date.day_start(new Date(start)), 1, \"day\");\r\n\r\n\t\tif (end.valueOf() <= firstDayEnd.valueOf()) {\r\n\t\t\treturn this._getMinutesBetweenSingleDay(from, to);\r\n\t\t} else {\r\n\r\n\t\t\tvar lastDayStart = this.$gantt.date.day_start(new Date(end));\r\n\t\t\tvar lastDayEnd = end;\r\n\r\n\t\t\tvar startPart = this._getMinutesBetweenSingleDay(firstDayStart, firstDayEnd);\r\n\t\t\tvar endPart = this._getMinutesBetweenSingleDay(lastDayStart, lastDayEnd);\r\n\r\n\t\t\tvar rangePart = this._getWorkUnitsForRange(firstDayEnd, lastDayStart, unit, step);\r\n\t\t\tvar total = startPart + rangePart + endPart;\r\n\r\n\t\t\treturn total;\r\n\t\t}\r\n\t},\r\n\t// optimized method for calculating work units duration of large time spans\r\n\t// implemented for hours and minutes units, bigger time units don't benefit from the optimization so much\r\n\t_getHoursBetween: function (from, to, unit, step) {\r\n\t\tvar start = new Date(from),\r\n\t\t\tend = new Date(to);\r\n\t\tstep = step || 1;\r\n\r\n\t\tvar firstDayStart = new Date(start);\r\n\t\tvar firstDayEnd = this.$gantt.date.add(this.$gantt.date.day_start(new Date(start)), 1, \"day\");\r\n\r\n\t\tif (end.valueOf() <= firstDayEnd.valueOf()) {\r\n\t\t\treturn Math.round(this._getMinutesBetweenSingleDay(from, to) / 60);\r\n\t\t} else {\r\n\r\n\t\t\tvar lastDayStart = this.$gantt.date.day_start(new Date(end));\r\n\t\t\tvar lastDayEnd = end;\r\n\r\n\t\t\tvar startPart = this._getMinutesBetweenSingleDay(firstDayStart, firstDayEnd, unit, step) / 60;\r\n\t\t\tvar endPart = this._getMinutesBetweenSingleDay(lastDayStart, lastDayEnd, unit, step) / 60;\r\n\r\n\t\t\tvar rangePart = this._getWorkUnitsForRange(firstDayEnd, lastDayStart, unit, step);\r\n\t\t\tvar total = startPart + rangePart + endPart;\r\n\r\n\t\t\treturn Math.round(total);\r\n\t\t}\r\n\t},\r\n\r\n\tgetConfig: function () {\r\n\t\treturn this._worktime;\r\n\t},\r\n\t_setConfig: function (settings) {\r\n\t\tthis._worktime = settings;\r\n\t\tthis._parseSettings();\r\n\t\tthis._clearCaches();\r\n\t},\r\n\t_parseSettings: function() {\r\n\t\tvar settings = this.getConfig();\r\n\t\tsettings.parsed = {\r\n\t\t\tdates: {},\r\n\t\t\thours: null,\r\n\t\t\thaveCustomWeeks: false,\r\n\t\t\tcustomWeeks: {},\r\n\t\t\tcustomWeeksRangeStart: null,\r\n\t\t\tcustomWeeksRangeEnd: null,\r\n\t\t\tcustomWeeksBoundaries: []\r\n\t\t};\r\n\r\n\t\tsettings.parsed.hours = this._parseHours(settings.hours);\r\n\t\tfor(var i in settings.dates){\r\n\t\t\tsettings.parsed.dates[i] = this._parseHours(settings.dates[i]);\r\n\t\t}\r\n\r\n\t\tif(settings.customWeeks) {\r\n\t\t\tvar minCustomRangeStart = null;\r\n\t\t\tvar maxCustomRangeEnd = null;\r\n\t\t\tfor(var i in settings.customWeeks){\r\n\t\t\t\tvar customTime = settings.customWeeks[i];\r\n\r\n\t\t\t\tif(customTime.from && customTime.to){\r\n\t\t\t\t\tvar rangeStart = customTime.from;\r\n\t\t\t\t\tvar rangeEnd = customTime.to;\r\n\t\t\t\t\tif(!minCustomRangeStart || minCustomRangeStart > rangeStart.valueOf()){\r\n\t\t\t\t\t\tminCustomRangeStart = rangeStart.valueOf();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(!maxCustomRangeEnd || maxCustomRangeEnd < rangeEnd.valueOf()){\r\n\t\t\t\t\t\tmaxCustomRangeEnd = rangeEnd.valueOf();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tsettings.parsed.customWeeksBoundaries.push({\r\n\t\t\t\t\t\tfrom: rangeStart.valueOf(),\r\n\t\t\t\t\t\tfromReadable: new Date(rangeStart),\r\n\t\t\t\t\t\tto: rangeEnd.valueOf(),\r\n\t\t\t\t\t\ttoReadable: new Date(rangeEnd),\r\n\t\t\t\t\t\tname: i\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tsettings.parsed.haveCustomWeeks = true;\r\n\t\t\t\t\tvar currentWeek = settings.parsed.customWeeks[i] = {\r\n\t\t\t\t\t\tfrom: customTime.from,\r\n\t\t\t\t\t\tto: customTime.to,\r\n\t\t\t\t\t\thours: this._parseHours(customTime.hours),\r\n\t\t\t\t\t\tdates: {}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tfor(var d in customTime.dates){\r\n\t\t\t\t\t\tcurrentWeek.dates[d] = this._parseHours(customTime.dates[d]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tsettings.parsed.customWeeksRangeStart = minCustomRangeStart;\r\n\t\t\tsettings.parsed.customWeeksRangeEnd = maxCustomRangeEnd;\r\n\r\n\t\t}\r\n\t},\r\n\r\n\t_tryChangeCalendarSettings: function (payload) {\r\n\t\tvar backup = JSON.stringify(this.getConfig());\r\n\t\tpayload();\r\n\t\tif (!this.hasWorkTime()) {\r\n\t\t//\tthis.$gantt.assert(false, \"Invalid calendar settings, no worktime available\");\r\n\t\t\tthis._setConfig(JSON.parse(backup));\r\n\t\t\tthis._clearCaches();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\r\n\t},\r\n\r\n\t_arraysEqual: function(a, b){\r\n\t\tif (a === b) return true;\r\n\t\tif (!a || !b) return false;\r\n\t\tif (a.length != b.length) return false;\r\n\r\n\t\tfor (var i = 0; i < a.length; ++i) {\r\n\t\t\tif (a[i] !== b[i]) return false;\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\r\n\t_compareSettings: function (mySettings, thatSettings) {\r\n\t\tif (!this._arraysEqual(mySettings.hours, thatSettings.hours)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar myDays = Object.keys(mySettings.dates);\r\n\t\tvar otherDates = Object.keys(thatSettings.dates);\r\n\t\tmyDays.sort();\r\n\t\totherDates.sort();\r\n\r\n\t\tif (!this._arraysEqual(myDays, otherDates)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < myDays.length; i++){\r\n\t\t\tvar timestamp = myDays[i];\r\n\t\t\tvar myHours = mySettings.dates[timestamp];\r\n\t\t\tvar otherHours = mySettings.dates[timestamp];\r\n\r\n\t\t\t// day settings not equal\r\n\t\t\tif(myHours !== otherHours &&\r\n\t\t\t\t// but still can be two arrays with the equivalent hour settings\r\n\t\t\t\t!(Array.isArray(myHours) && Array.isArray(otherHours) && this._arraysEqual(myHours, otherHours))\r\n\t\t\t\t){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\tequals: function (calendar) {\r\n\t\tif(!(calendar instanceof CalendarWorkTimeStrategy)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar mySettings = this.getConfig();\r\n\t\tvar thatSettings = calendar.getConfig();\r\n\r\n\t\tif(!this._compareSettings(mySettings, thatSettings)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif(mySettings.parsed.haveCustomWeeks && thatSettings.parsed.haveCustomWeeks){\r\n\t\t\tif(mySettings.parsed.customWeeksBoundaries.length != thatSettings.parsed.customWeeksBoundaries.length){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i in mySettings.parsed.customWeeks){\r\n\t\t\t\tvar myWeek = mySettings.parsed.customWeeks[i];\r\n\t\t\t\tvar thatWeek = thatSettings.parsed.customWeeks[i];\r\n\t\t\t\tif(!thatWeek){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!this._compareSettings(myWeek, thatWeek)){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else if(mySettings.parse.haveCustomWeeks !== thatSettings.parsed.haveCustomWeeks){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\tgetWorkHours: function () {\r\n\t\tvar config = this.argumentsHelper.getWorkHoursArguments.apply(this.argumentsHelper, arguments);\r\n\t\treturn this._getWorkHours(config.date, false);\r\n\t},\r\n\t_getWorkHours: function (date, parsed) {\r\n\t\tvar calendar = this.getConfig();\r\n\t\tif(parsed !== false){\r\n\t\t\tcalendar = calendar.parsed;\r\n\t\t}\r\n\r\n\t\tif(!date){\r\n\t\t\treturn calendar.hours;\r\n\t\t}\r\n\r\n\t\tvar dateValue = this._timestamp({date: date});\r\n\r\n\t\tif(calendar.haveCustomWeeks){\r\n\t\t\tif(calendar.customWeeksRangeStart <= dateValue && calendar.customWeeksRangeEnd > dateValue){\r\n\t\t\t\tfor(var i = 0; i < calendar.customWeeksBoundaries.length; i++){\r\n\t\t\t\t\tif(calendar.customWeeksBoundaries[i].from <= dateValue && calendar.customWeeksBoundaries[i].to > dateValue){\r\n\t\t\t\t\t\tcalendar = calendar.customWeeks[calendar.customWeeksBoundaries[i].name];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar hours = true;\r\n\r\n\t\tif (calendar.dates[dateValue] !== undefined) {\r\n\t\t\thours = calendar.dates[dateValue];//custom day\r\n\t\t} else if (calendar.dates[date.getDay()] !== undefined) {\r\n\t\t\thours = calendar.dates[date.getDay()];//week day\r\n\t\t}\r\n\t\tif (hours === true) {\r\n\t\t\treturn calendar.hours;\r\n\t\t} else if (hours) {\r\n\t\t\treturn hours;\r\n\t\t}\r\n\t\treturn [];\r\n\t},\r\n\r\n\t_getIntervalTimestamp: function(from, to){\r\n\t\tvar res = {\r\n\t\t\tstart: 0,\r\n\t\t\tend: 0\r\n\t\t};\r\n\r\n\t\tres.start = from.getHours() * 60 * 60 + from.getMinutes() * 60 + from.getSeconds();\r\n\t\tvar endHours = to.getHours();\r\n\t\tif(!endHours && !to.getMinutes() && !to.getSeconds() && from.valueOf() < to.valueOf()){\r\n\t\t\tendHours = 24;\r\n\t\t}\r\n\t\tres.end = endHours * 60 * 60 + to.getMinutes() * 60 + to.getSeconds();\r\n\t\treturn res;\r\n\t},\r\n\r\n\t_parseHours: function(hours) {\r\n\t\tif(Array.isArray(hours)){\r\n\r\n\t\t\tvar timestampRanges = [];// worktime as seconds range\r\n\t\t\thours.forEach(function(hour){\r\n\t\t\t\tif(typeof hour === \"number\"){\r\n\t\t\t\t\ttimestampRanges.push(hour*60*60);\r\n\t\t\t\t}else if(typeof hour === \"string\") {\r\n\t\t\t\t\t// \"12-13\", or \"12:00-13:00\", or \"12:00:00-13:00:00\"\r\n\t\t\t\t\thour.split(\"-\").map(function(time){\r\n\t\t\t\t\t\treturn time.trim();\r\n\t\t\t\t\t}).forEach(function(part){\r\n\t\t\t\t\t\tvar parsed = part.split(\":\").map(function(time){\r\n\t\t\t\t\t\t\treturn time.trim();\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tvar value = parseInt(parsed[0]*60*60);\r\n\t\t\t\t\t\tif(parsed[1]){\r\n\t\t\t\t\t\t\tvalue += parseInt(parsed[1]*60);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(parsed[2]){\r\n\t\t\t\t\t\t\tvalue += parseInt(parsed[2]);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\ttimestampRanges.push(value);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tvar timerangeConfig = [];\r\n\t\t\tfor (var i = 0; i < timestampRanges.length; i += 2) {\r\n\t\t\t\tvar start = timestampRanges[i];\r\n\t\t\t\tvar end = timestampRanges[i + 1];\r\n\t\t\t\tvar duration = end - start;\r\n\r\n\t\t\t\ttimerangeConfig.push({\r\n\t\t\t\t\tstart: start,\r\n\t\t\t\t\tend: end,\r\n\t\t\t\t\tstartHour: Math.floor(start / (60*60)),\r\n\t\t\t\t\tstartMinute: Math.floor(start / (60)),\r\n\t\t\t\t\tendHour: Math.ceil(end / (60*60)),\r\n\t\t\t\t\tendMinute: Math.ceil(end / (60)),\r\n\t\t\t\t\tdurationSeconds: duration,\r\n\t\t\t\t\tdurationMinutes: duration/60,\r\n\t\t\t\t\tdurationHours: duration/(60 * 60)\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\treturn timerangeConfig;\r\n\t\t} else {\r\n\t\t\treturn hours;\r\n\t\t}\r\n\t},\r\n\r\n\tsetWorkTime: function (settings) {\r\n\t\treturn this._tryChangeCalendarSettings(utils.bind(function () {\r\n\t\t\tvar hours = settings.hours !== undefined ? settings.hours : true;\r\n\t\t\tvar timestamp = this._timestamp(settings);\r\n\t\t\tvar calendarConfig = this.getConfig();\r\n\t\t\tif (timestamp !== null) {\r\n\t\t\t\tcalendarConfig.dates[timestamp] = hours;\r\n\t\t\t} else if(!settings.customWeeks) {\r\n\t\t\t\tcalendarConfig.hours = hours;\r\n\t\t\t}\r\n\r\n\t\t\tif(settings.customWeeks){\r\n\t\t\t\tif(!calendarConfig.customWeeks){\r\n\t\t\t\t\tcalendarConfig.customWeeks = {};\r\n\t\t\t\t}\r\n\t\t\t\t// GS-1867. allow setWorkTime to exclude dates in the customWeeks range\r\n\t\t\t\tif (typeof settings.customWeeks == \"string\"){\r\n\t\t\t\t\tif (timestamp !== null) {\r\n\t\t\t\t\t\tcalendarConfig.customWeeks[settings.customWeeks].dates[timestamp] = hours;\r\n\t\t\t\t\t} else if(!settings.customWeeks) {\r\n\t\t\t\t\t\tcalendarConfig.customWeeks[settings.customWeeks].hours = hours;\r\n\t\t\t\t\t}\t\t\r\n\t\t\t\t} else if (typeof settings.customWeeks === \"object\"\r\n\t\t\t\t&& Function.prototype.toString.call(settings.customWeeks.constructor) === \"function Object() { [native code] }\"){\r\n\t\t\t\t\tfor(var i in settings.customWeeks){\r\n\t\t\t\t\t\tcalendarConfig.customWeeks[i] = settings.customWeeks[i];\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis._parseSettings();\r\n\t\t\tthis._clearCaches();\r\n\t\t}, this));\r\n\t},\r\n\r\n\tunsetWorkTime: function (settings) {\r\n\t\treturn this._tryChangeCalendarSettings(utils.bind(function () {\r\n\t\t\tif (!settings) {\r\n\t\t\t\tthis.reset_calendar();\r\n\t\t\t} else {\r\n\r\n\t\t\t\tvar timestamp = this._timestamp(settings);\r\n\r\n\t\t\t\tif (timestamp !== null) {\r\n\t\t\t\t\tdelete this.getConfig().dates[timestamp];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Load updated settings and clear work units cache\r\n\t\t\tthis._parseSettings();\r\n\t\t\tthis._clearCaches();\r\n\t\t}, this));\r\n\t},\r\n\r\n\t_isWorkTime: function (date, unit) {\r\n\t\t// Check if this item has in the cache\r\n\r\n\t\tvar useCache = true;//unit === \"day\"; // use cache only for days. In case of hours/minutes cache size grows too large and the overhead exceeds the gains\r\n\t\tvar isWorkUnit = -1;\r\n\t\tvar dateKey = null;\r\n\r\n\t\tif(useCache){\r\n\t\t\t// use string keys\r\n\t\t\tdateKey = String(date.valueOf());\r\n\t\t\tisWorkUnit = this._workingUnitsCache.getItem(unit, dateKey, date);\r\n\t\t}\r\n\r\n\t\tif (isWorkUnit == -1) {\r\n\t\t\t// calculate if not cached\r\n\t\t\tisWorkUnit = this._checkIfWorkingUnit(date, unit);\r\n\t\t\tif(useCache){\r\n\t\t\t\tthis._workingUnitsCache.setItem(unit, dateKey, isWorkUnit, date);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn isWorkUnit;\r\n\t},\r\n\r\n\tisWorkTime: function () {\r\n\t\tvar config = this.argumentsHelper.isWorkTimeArguments.apply( this.argumentsHelper, arguments);\r\n\t\treturn this._isWorkTime(config.date, config.unit);\r\n\t},\r\n\r\n\tcalculateDuration: function () {\r\n\t\tvar config = this.argumentsHelper.getDurationArguments.apply( this.argumentsHelper, arguments);\r\n\r\n\t\tif (!config.unit) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//return this._calculateDuration(config.start_date, config.end_date, config.unit, config.step);\r\n\r\n\t\tvar self = this;\r\n\t\treturn this._dateDurationCache.getDuration(config.start_date, config.end_date, config.unit, config.step, function(){ \r\n\t\t\treturn self._calculateDuration(config.start_date, config.end_date, config.unit, config.step);\r\n\t\t});\r\n\t},\r\n\r\n\t_calculateDuration: function (from, to, unit, step) {\r\n\t\tvar res = 0;\r\n\r\n\t\tvar sign = 1;\r\n\t\tif(from.valueOf() > to.valueOf()){\r\n\t\t\tvar tmp = to;\r\n\t\t\tto = from;\r\n\t\t\tfrom = tmp;\r\n\t\t\tsign = -1;\r\n\t\t}\r\n\r\n\t\tif (unit == \"hour\" && step == 1) {\r\n\t\t\tres = this._getHoursBetween(from, to, unit, step);\r\n\t\t} else if(unit == \"minute\" && step == 1){\r\n\t\t\t// quick calculation for minutes with 1 minute step\r\n\t\t\tres = this._getMinutesBetween(from, to, unit, step);\r\n\t\t} else {\r\n\t\t\tres = this._getWorkUnitsBetweenGeneric(from, to, unit, step);\r\n\t\t}\r\n\r\n\t\t// getWorkUnits.. returns decimal durations\r\n\t\treturn sign * Math.round(res);\r\n\t},\r\n\thasDuration: function () {\r\n\t\tvar config = this.argumentsHelper.getDurationArguments.apply( this.argumentsHelper, arguments);\r\n\r\n\t\tvar from = config.start_date,\r\n\t\t\tto = config.end_date,\r\n\t\t\tunit = config.unit,\r\n\t\t\tstep = config.step;\r\n\r\n\t\tif (!unit) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tvar start = new Date(from),\r\n\t\t\tend = new Date(to);\r\n\t\tstep = step || 1;\r\n\r\n\t\twhile (start.valueOf() < end.valueOf()) {\r\n\t\t\tif (this._isWorkTime(start, unit))\r\n\t\t\t\treturn true;\r\n\t\t\tstart = this._nextDate(start, unit, step);\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\tcalculateEndDate: function () {\r\n\t\tvar config = this.argumentsHelper.calculateEndDateArguments.apply( this.argumentsHelper, arguments);\r\n\r\n\t\tvar from = config.start_date,\r\n\t\t\tduration = config.duration,\r\n\t\t\tunit = config.unit,\r\n\t\t\tstep = config.step;\r\n\r\n\t\tif (!unit)\r\n\t\t\treturn false;\r\n\r\n\t\tvar mult = (config.duration >= 0) ? 1 : -1;\r\n\t\tduration = Math.abs(duration * 1);\r\n\t//\tvar endDate = this._calculateEndDate(from, duration, unit, step * mult);\r\n\t//\treturn endDate;\r\n\t\tvar self = this;\r\n\t\treturn this._dateDurationCache.getEndDate(from, duration, unit, step * mult, function(){ \r\n\t\t\treturn self._calculateEndDate(from, duration, unit, step * mult);\r\n\t\t} );\r\n\t},\r\n\r\n\t_calculateEndDate: function (from, duration, unit, step) {\r\n\t\tif (!unit)\r\n\t\t\treturn false;\r\n\r\n\t\tif (step == 1 && unit == \"minute\") {\r\n\t\t\treturn this._calculateMinuteEndDate(from, duration, step);\r\n\t\t} else if(step == -1 && unit == \"minute\") {\r\n\t\t\treturn this._subtractMinuteDate(from, duration, step);\r\n\t\t} else if (step == 1 && unit == \"hour\") {\r\n\t\t\treturn this._calculateHourEndDate(from, duration, step);\r\n\t\t} else {\r\n\t\t\tvar interval = this._addInterval(from, duration, unit, step, null);\r\n\t\t\treturn interval.end;\r\n\t\t}\r\n\t},\r\n\r\n\t_addInterval: function (start, duration, unit, step, stopAction) {\r\n\t\tvar added = 0;\r\n\t\tvar current = start;\r\n\t\tvar dstShift = false;\r\n\r\n\t\twhile (added < duration && !(stopAction && stopAction(current))) {\r\n\t\t\tvar next = this._nextDate(current, unit, step);\r\n\r\n\t\t\t// GS-1501. Correct hours after DST change\r\n\t\t\tif (unit == \"day\"){\r\n\t\t\t\tdstShift = dstShift || !current.getHours() && next.getHours();\r\n\r\n\t\t\t\tif (dstShift){\r\n\t\t\t\t\tnext.setHours(0);\r\n\t\t\t\t\tif (next.getHours()){\r\n\t\t\t\t\t// the day when the timezone is changed, try to correct hours next time\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdstShift = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar dateValue = new Date(next.valueOf() + 1);\r\n\t\t\tif (step > 0) {\r\n\t\t\t\tdateValue = new Date(next.valueOf() - 1);\r\n\t\t\t}\r\n\t\t\tvar workTimeCheck = this._isWorkTime(dateValue, unit);\r\n\r\n\t\t\tif (workTimeCheck && !dstShift) {\r\n\t\t\t\tadded++;\r\n\t\t\t}\r\n\t\t\tcurrent = next;\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tend: current,\r\n\t\t\tstart: start,\r\n\t\t\tadded: added\r\n\t\t};\r\n\t},\r\n\r\n\t_addHoursUntilDayEnd: function(from, duration) {\r\n\t\tvar dayEnd = this.$gantt.date.add(this.$gantt.date.day_start(new Date(from)), 1, \"day\");\r\n\t\tvar added = 0;\r\n\t\tvar left = duration;\r\n\r\n\t\tvar range = this._getIntervalTimestamp(from, dayEnd);\r\n\t\tvar worktimes = this._getWorkHours(from);\r\n\t\tfor(var i = 0; i < worktimes.length && added < duration; i++){\r\n\t\t\tvar interval = worktimes[i];\r\n\t\t\tif(range.end >= interval.start && range.start <= interval.end){\r\n\t\t\t\tvar minuteFrom = Math.max(interval.start, range.start);\r\n\t\t\t\tvar minuteTo = Math.min(interval.end, range.end);\r\n\t\t\t\tvar rangeHours = (minuteTo - minuteFrom) / (60 * 60);\r\n\t\t\t\tif(rangeHours > left){\r\n\t\t\t\t\trangeHours = left;\r\n\t\t\t\t\tminuteTo = minuteFrom + (left * 60 * 60);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar addHours = Math.round((minuteTo - minuteFrom) / (60 * 60));\r\n\t\t\t\tadded += addHours;\r\n\t\t\t\tleft -= addHours;\r\n\t\t\t\trange.start = minuteTo;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar intervalEnd = dayEnd;\r\n\t\tif(added === duration){\r\n\t\t\tintervalEnd = new Date(from.getFullYear(), from.getMonth(), from.getDate(), 0, 0, range.start);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tadded: added,\r\n\t\t\tend: intervalEnd\r\n\t\t};\r\n\t},\r\n\r\n\t_calculateHourEndDate: function (from, duration, step) {\r\n\t\tvar start = new Date(from),\r\n\t\tadded = 0;\r\n\t\tstep = step || 1;\r\n\t\tduration = Math.abs(duration * 1);\r\n\r\n\t\tvar interval = this._addHoursUntilDayEnd(start, duration);\r\n\t\tadded = interval.added;\r\n\t\tstart = interval.end;\r\n\r\n\t\tvar durationLeft = duration - added;\r\n\r\n\t\tif (durationLeft) {\r\n\t\t\tvar current = start;\r\n\t\t\twhile (added < duration) {\r\n\t\t\t\tvar next = this._nextDate(current, \"day\", step);\r\n\t\t\t\t// reset to day start in case DST switch happens in the process\r\n\t\t\t\tnext.setHours(0);\r\n\t\t\t\tnext.setMinutes(0);\r\n\t\t\t\tnext.setSeconds(0);\r\n\r\n\t\t\t\tvar hoursPerDay = 0;\r\n\t\t\t\tif(step > 0){\r\n\t\t\t\t\thoursPerDay = this.getHoursPerDay(new Date(next.valueOf() - 1));\r\n\t\t\t\t}else{\r\n\t\t\t\t\thoursPerDay = this.getHoursPerDay(new Date(next.valueOf() + 1));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (added + hoursPerDay >= duration) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tadded += hoursPerDay;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrent = next;\r\n\t\t\t}\r\n\t\t\tstart = current;\r\n\t\t}\r\n\r\n\t\tif (added < duration) {\r\n\t\t\tvar durationLeft = duration - added;\r\n\t\t\tinterval = this._addHoursUntilDayEnd(start, durationLeft);\r\n\t\t\tstart = interval.end;\r\n\t\t}\r\n\r\n\t\treturn start;\r\n\t},\r\n\r\n\t_addMinutesUntilHourEnd: function(from, duration){\r\n\t\tif(from.getMinutes() === 0) {\r\n\t\t\t// already at hour end\r\n\t\t\treturn {\r\n\t\t\t\tadded: 0,\r\n\t\t\t\tend: new Date(from)\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar hourEnd = this.$gantt.date.add(this.$gantt.date.hour_start(new Date(from)), 1, \"hour\");\r\n\t\tvar added = 0;\r\n\t\tvar left = duration;\r\n\r\n\t\tvar range = this._getIntervalTimestamp(from, hourEnd);\r\n\t\tvar worktimes = this._getWorkHours(from);\r\n\t\tfor(var i = 0; i < worktimes.length && added < duration; i++){\r\n\t\t\tvar interval = worktimes[i];\r\n\t\t\tif(range.end >= interval.start && range.start <= interval.end){\r\n\t\t\t\tvar minuteFrom = Math.max(interval.start, range.start);\r\n\t\t\t\tvar minuteTo = Math.min(interval.end, range.end);\r\n\t\t\t\tvar rangeMinutes = (minuteTo - minuteFrom) / 60;\r\n\t\t\t\tif(rangeMinutes > left){\r\n\t\t\t\t\trangeMinutes = left;\r\n\t\t\t\t\tminuteTo = minuteFrom + (left * 60);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// TODO: verify testcase https://dhtmlxsupport.teamwork.com/desk/tickets/9625700/messages\r\n\t\t\t\t/*if (rangeMinutes === 0) {\r\n\t\t\t\t\trangeMinutes = left;\r\n\t\t\t\t\tminuteTo = minuteFrom + (left * 60);\r\n\t\t\t\t}*/\r\n\r\n\t\t\t\tvar addMinutes = Math.round((minuteTo - minuteFrom) / 60);\r\n\t\t\t\tleft -= addMinutes;\r\n\t\t\t\tadded += addMinutes;\r\n\t\t\t\trange.start = minuteTo;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar intervalEnd = hourEnd;\r\n\t\tif(added === duration){\r\n\t\t\tintervalEnd = new Date(from.getFullYear(), from.getMonth(), from.getDate(), 0, 0, range.start);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tadded: added,\r\n\t\t\tend: intervalEnd\r\n\t\t};\r\n\t},\r\n\r\n\t_subtractMinutesUntilHourStart: function(from, duration){\r\n\t\tvar hourStart = this.$gantt.date.hour_start(new Date(from));\r\n\t\tvar added = 0;\r\n\t\tvar left = duration;\r\n\r\n\t\tvar hourStartTimestamp = hourStart.getHours() * 60 * 60 + hourStart.getMinutes() * 60 + hourStart.getSeconds();\r\n\t\tvar initialDateTimestamp = from.getHours() * 60 * 60 + from.getMinutes() * 60 + from.getSeconds();\r\n\r\n\t\tvar worktimes = this._getWorkHours(from);\r\n\t\tfor(var i = worktimes.length - 1; i >= 0 && added < duration; i--){\r\n\t\t\tvar interval = worktimes[i];\r\n\t\t\tif(initialDateTimestamp > interval.start && hourStartTimestamp <= interval.end){\r\n\t\t\t\tvar minuteFrom = Math.min(initialDateTimestamp, interval.end);\r\n\t\t\t\tvar minuteTo = Math.max(hourStartTimestamp, interval.start);\r\n\r\n\t\t\t//\tvar minuteFrom = Math.max(interval.start, currentHour.start);\r\n\t\t\t//\tvar minuteTo = Math.min(interval.end, currentHour.end);\r\n\t\t\t\tvar rangeMinutes = (minuteFrom - minuteTo) / 60;\r\n\t\t\t\tif(rangeMinutes > left){\r\n\t\t\t\t\trangeMinutes = left;\r\n\t\t\t\t\tminuteTo = minuteFrom - (left * 60);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// TODO: verify testcase https://dhtmlxsupport.teamwork.com/desk/tickets/9625700/messages\r\n\t\t\t\t/*if (rangeMinutes === 0) {\r\n\t\t\t\t\trangeMinutes = left;\r\n\t\t\t\t\tminuteTo = minuteFrom - (left * 60);\r\n\t\t\t\t}*/\r\n\r\n\t\t\t\tvar addMinutes = Math.abs(Math.round((minuteFrom - minuteTo) / 60));\r\n\t\t\t\tleft -= addMinutes;\r\n\t\t\t\tadded += addMinutes;\r\n\t\t\t\tinitialDateTimestamp = minuteTo;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar intervalEnd = hourStart;\r\n\t\tif(added === duration){\r\n\t\t\tintervalEnd = new Date(from.getFullYear(), from.getMonth(), from.getDate(), 0, 0, initialDateTimestamp);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tadded: added,\r\n\t\t\tend: intervalEnd\r\n\t\t};\r\n\t},\r\n\r\n\t_subtractMinuteDate: function (from, duration, step) {\r\n\t\tvar start = new Date(from),\r\n\t\t\tadded = 0;\r\n\t\tstep = step || -1;\r\n\t\tduration = Math.abs(duration * 1);\r\n\t\tduration = Math.round(duration);\r\n\r\n\t\tconst minutePrecision = this._isMinutePrecision(start);\r\n\r\n\t\tlet addedInterval = this._subtractMinutesUntilHourStart(start, duration);\r\n\t\tadded += addedInterval.added;\r\n\r\n\t\tstart = addedInterval.end;\r\n\r\n\t\tvar calculatedDay = 0;\r\n\t\tvar daySchedule = [];\r\n\t\tvar minutesInDay = 0;\r\n\r\n\t\twhile (added < duration) {\r\n\t\t\tvar dayStart = this.$gantt.date.day_start(new Date(start));\r\n\r\n\t\t\tvar iterateFromDayEnd = false;\r\n\t\t\tif(start.valueOf() === dayStart.valueOf()){\r\n\t\t\t\tdayStart = this.$gantt.date.add(dayStart, -1, \"day\");\r\n\t\t\t\titerateFromDayEnd = true;\r\n\t\t\t}\r\n\t\t\t//var dayStartTimestamp = this.$gantt.date.day_start(new Date(start)).valueOf();\r\n\t\t\tvar dayEnd = new Date(dayStart.getFullYear(), dayStart.getMonth(), dayStart.getDate(), 23, 59,59,999).valueOf();\r\n\r\n\t\t\tif(dayEnd !== calculatedDay){\r\n\t\t\t\tdaySchedule = this._getWorkHours(dayStart);\r\n\t\t\t\tminutesInDay = this._getMinutesPerDay(dayStart);\r\n\t\t\t\tcalculatedDay = dayEnd;\r\n\t\t\t}\r\n\r\n\t\t\tvar left = duration - added;\r\n\t\t\tvar timestamp = this._getTimeOfDayStamp(start, iterateFromDayEnd);\r\n\r\n\t\t\tif(!daySchedule.length || !minutesInDay){\r\n\t\t\t\tstart = this.$gantt.date.add(start, -1, \"day\");\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif(daySchedule[daySchedule.length - 1].end <= timestamp){\r\n\t\t\t\tif(left > minutesInDay){\r\n\t\t\t\t\tadded += minutesInDay;\r\n\t\t\t\t\tstart = this.$gantt.date.add(start, -1, \"day\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar isWorkHour = false;\r\n\t\t\tvar workInterval = null;\r\n\t\t\tvar prevInterval = null;\r\n\t\t\tfor(var i = daySchedule.length - 1; i >= 0; i--){\r\n\t\t\t\tif(daySchedule[i].start < timestamp - 1 && daySchedule[i].end >= timestamp - 1){\r\n\t\t\t\t\tisWorkHour = true;\r\n\t\t\t\t\tworkInterval = daySchedule[i];\r\n\t\t\t\t\tprevInterval = daySchedule[i-1];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(isWorkHour){\r\n\r\n\t\t\t\t// we're at the end of worktime interval and subtracting more than the duration of the interval\r\n\t\t\t\t// -> subtract the duration of the interval and move to the start of the interval (we're moving from end)\r\n\t\t\t\tif(timestamp === workInterval.end && left >= workInterval.durationMinutes){\r\n\t\t\t\t\tadded += workInterval.durationMinutes;\r\n\t\t\t\t\tstart = this.$gantt.date.add(start, -workInterval.durationMinutes, \"minute\");\r\n\t\t\t\t} // worktime is set in whole hours (no intervals like 9:15-10:00)\r\n\t\t\t\t// the amount we need to subtract lies inside the interval\r\n\t\t\t\telse if(!minutePrecision && left <= (timestamp/60 - workInterval.startMinute)){\r\n\t\t\t\t\tadded += left;\r\n\t\t\t\t\tstart = this.$gantt.date.add(start, -left, \"minute\");\r\n\t\t\t\t}else if (minutePrecision){\r\n\t\t\t\t\t// GS-2129. If the working time is set in minutes, we accumulate the working time in minutes from right to left\r\n\t\t\t\t\t\r\n\t\t\t\t\t// duration we need to subtract lies completely inside the work interval\r\n\t\t\t\t\tif(left <= (timestamp/60 - workInterval.startMinute)){\r\n\t\t\t\t\t\tadded += left;\r\n\t\t\t\t\t\tstart = this.$gantt.date.add(start, -left, \"minute\");\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\t// we need to go trough multiple work intervals to subtract needed time\r\n\t\t\t\t\t\tadded += (timestamp/60 - workInterval.startMinute);\r\n\t\t\t\t\t\tif(prevInterval){\r\n\t\t\t\t\t\t\tstart = new Date(start.getFullYear(), start.getMonth(), start.getDate(), 0, 0, prevInterval.end);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tstart = this.$gantt.date.day_start(start);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar minutesInHour = this._getMinutesPerHour(start);\r\n\t\t\t\t\tif(minutesInHour <= left){\r\n\t\t\t\t\t\tadded += minutesInHour;\r\n\t\t\t\t\t\tstart = this._nextDate(start, \"hour\", step);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\taddedInterval = this._subtractMinutesUntilHourStart(start, left);\r\n\t\t\t\t\t\tadded += addedInterval.added;\r\n\t\t\t\t\t\tstart = addedInterval.end;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(start.getHours() === 0 && start.getMinutes() === 0 && start.getSeconds() === 0){\r\n\t\t\t\t\tvar prev = this._getClosestWorkTimePast(start, \"hour\");\r\n\t\t\t\t\tif(prev.valueOf() === start.valueOf()){\r\n\t\t\t\t\t\tvar prev = this.$gantt.date.add(start, -1, \"day\");\r\n\t\t\t\t\t\tvar times = this._getWorkHours(prev);\r\n\t\t\t\t\t\tif(times.length){\r\n\t\t\t\t\t\t\tvar lastInterval = times[times.length - 1];\r\n\t\t\t\t\t\t\tprev.setSeconds(lastInterval.durationSeconds);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstart = prev;\r\n\r\n\t\t\t\t} else{\r\n\t\t\t\t\tstart = this._getClosestWorkTimePast(new Date(start - 1), \"hour\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (added < duration) {\r\n\t\t\tvar durationLeft = duration - added;\r\n\t\t\taddedInterval = this._subtractMinutesUntilHourStart(start, durationLeft);\r\n\t\t\tadded += addedInterval.added;\r\n\t\t\tstart = addedInterval.end;\r\n\t\t}\r\n\r\n\t\treturn start;\r\n\t},\r\n\t_calculateMinuteEndDate: function (from, duration, step) {\r\n\t\tvar start = new Date(from),\r\n\t\t\tadded = 0;\r\n\t\tstep = step || 1;\r\n\t\tduration = Math.abs(duration * 1);\r\n\t\tduration = Math.round(duration);\r\n\r\n\t\tvar addedInterval = this._addMinutesUntilHourEnd(start, duration);\r\n\t\tadded += addedInterval.added;\r\n\r\n\t\tstart = addedInterval.end;\r\n\r\n\t\tvar calculatedDay = 0;\r\n\t\tvar daySchedule = [];\r\n\t\tvar minutesInDay = 0;\r\n\r\n\t\tvar minutePrecision = this._isMinutePrecision(start);\r\n\r\n\t\twhile (added < duration) {\r\n\t\t\tvar dayStart = this.$gantt.date.day_start(new Date(start)).valueOf();\r\n\t\t\tif(dayStart !== calculatedDay){\r\n\t\t\t\tdaySchedule = this._getWorkHours(start);\r\n\t\t\t\tminutesInDay = this._getMinutesPerDay(start);\r\n\t\t\t\tcalculatedDay = dayStart;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tvar left = duration - added;\r\n\t\t\tvar timestamp = this._getTimeOfDayStamp(start);\r\n\r\n\t\t\tif(!daySchedule.length || !minutesInDay){\r\n\t\t\t\tstart = this.$gantt.date.add(this.$gantt.date.day_start(start), 1, \"day\");\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif(daySchedule[0].start >= timestamp){\r\n\t\t\t\tif(left >= minutesInDay){\r\n\t\t\t\t\tadded += minutesInDay;\r\n\t\t\t\t\tif (left == minutesInDay) {\r\n\t\t\t\t\t\tstart = new Date(start.getFullYear(), start.getMonth(), start.getDate(), 0, 0, daySchedule[daySchedule.length - 1].end);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tstart = this.$gantt.date.add(start, 1, \"day\");\r\n\t\t\t\t\t\tstart = this.$gantt.date.day_start(start);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar isWorkHour = false;\r\n\t\t\tvar workInterval = null;\r\n\t\t\tfor(var i = 0; i < daySchedule.length; i++){\r\n\t\t\t\tif(daySchedule[i].start <= timestamp && daySchedule[i].end > timestamp){\r\n\t\t\t\t\tisWorkHour = true;\r\n\t\t\t\t\tworkInterval = daySchedule[i];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(isWorkHour){\r\n\r\n\t\t\t\tif(timestamp === workInterval.start && left >= workInterval.durationMinutes){\r\n\t\t\t\t\tadded += workInterval.durationMinutes;\r\n\t\t\t\t\tstart = this.$gantt.date.add(start, workInterval.durationMinutes, \"minute\");\r\n\t\t\t\t}else if(left <= (workInterval.endMinute - timestamp/60)){\r\n\t\t\t\t\tadded += left;\r\n\t\t\t\t\tstart = this.$gantt.date.add(start, left, \"minute\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tvar minutesInHour = this._getMinutesPerHour(start);\r\n\t\t\t\t\tif(minutesInHour <= left){\r\n\t\t\t\t\t\tadded += minutesInHour;\r\n\t\t\t\t\t\t// when the working time settings are set in minutes move to the next minutes\r\n\t\t\t\t\t\tif (minutePrecision) {\r\n\t\t\t\t\t\t\tstart = this.$gantt.date.add(start, minutesInHour, \"minute\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tstart = this._nextDate(start, \"hour\", step);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\taddedInterval = this._addMinutesUntilHourEnd(start, left);\r\n\t\t\t\t\t\tadded += addedInterval.added;\r\n\t\t\t\t\t\tstart = addedInterval.end;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tstart = this._getClosestWorkTimeFuture(start, \"hour\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (added < duration) {\r\n\t\t\tvar durationLeft = duration - added;\r\n\t\t\taddedInterval = this._addMinutesUntilHourEnd(start, durationLeft);\r\n\t\t\tadded += addedInterval.added;\r\n\t\t\tstart = addedInterval.end;\r\n\t\t}\r\n\r\n\t\treturn start;\r\n\t},\r\n\r\n\tgetClosestWorkTime: function () {\r\n\t\tvar settings = this.argumentsHelper.getClosestWorkTimeArguments.apply( this.argumentsHelper, arguments);\r\n\t\treturn this._getClosestWorkTime(settings.date, settings.unit, settings.dir);\r\n\t},\r\n\r\n\t_getClosestWorkTime: function (inputDate, unit, direction) {\r\n\t\tvar result = new Date(inputDate);\r\n\r\n\t\tif (this._isWorkTime(result, unit)) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\r\n\t\tresult = this.$gantt.date[unit + '_start'](result);\r\n\r\n\t\tif (direction == 'any' || !direction) {\r\n\t\t\tvar closestFuture = this._getClosestWorkTimeFuture(result, unit);\r\n\t\t\tvar closestPast = this._getClosestWorkTimePast(result, unit);\r\n\t\t\tif (Math.abs(closestFuture - inputDate) <= Math.abs(inputDate - closestPast)) {\r\n\t\t\t\tresult = closestFuture;\r\n\t\t\t} else {\r\n\t\t\t\tresult = closestPast;\r\n\t\t\t}\r\n\t\t} else if (direction == \"past\") {\r\n\t\t\tresult = this._getClosestWorkTimePast(result, unit);\r\n\t\t} else {\r\n\t\t\tresult = this._getClosestWorkTimeFuture(result, unit);\r\n\t\t}\r\n\t\treturn result;\r\n\t},\r\n\r\n\t_getClosestWorkTimeFuture: function (date, unit) {\r\n\t\treturn this._getClosestWorkTimeGeneric(date, unit, 1);\r\n\t},\r\n\r\n\t_getClosestWorkTimePast: function (date, unit) {\r\n\t\tvar result = this._getClosestWorkTimeGeneric(date, unit, -1);\r\n\t\t// should return the end of the closest work interval\r\n\t\treturn this.$gantt.date.add(result, 1, unit);\r\n\t},\r\n\r\n\t_findClosestTimeInDay: function(date, direction, worktimes) {\r\n\t\tvar start = new Date(date);\r\n\t\tvar resultDate = null;\r\n\t\tvar fromDayEnd = false;\r\n\t\tif(!this._getWorkHours(start).length){\r\n\t\t\tstart = this._getClosestWorkTime(start, \"day\", direction < 0 ? \"past\" : \"future\");\r\n\t\t\tif(direction < 0){\r\n\t\t\t\tstart = new Date(start.valueOf() - 1);\r\n\t\t\t\tfromDayEnd = true;\r\n\t\t\t}\r\n\t\t\tworktimes = this._getWorkHours(start);\r\n\t\t}\r\n\r\n\t\tvar value = this._getTimeOfDayStamp(start);\r\n\t\tif(fromDayEnd){\r\n\t\t\tvalue = this._getTimeOfDayStamp(new Date(start.valueOf() + 1), fromDayEnd);\r\n\t\t}\r\n\t\tif(direction > 0){\r\n\t\t\tfor(var i = 0; i < worktimes.length; i++){\r\n\t\t\t\tif(worktimes[i].start >= value){\r\n\t\t\t\t\tresultDate = new Date(start.getFullYear(), start.getMonth(), start.getDate(), 0, 0, worktimes[i].start);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tfor(var i = worktimes.length - 1; i >= 0; i--){\r\n\t\t\t\tif(worktimes[i].end <= value){\r\n\t\t\t\t\tresultDate = new Date(start.getFullYear(), start.getMonth(), start.getDate(), 0, 0, worktimes[i].end);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}else if(worktimes[i].end > value && worktimes[i].start <= value) {\r\n\t\t\t\t\tresultDate = new Date(start.getFullYear(), start.getMonth(), start.getDate(), 0, 0, value);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn resultDate;\r\n\t},\r\n\t_getClosestWorkMinute: function(date, unit, direction) {\r\n\t\tvar start = new Date(date);\r\n\t\tvar worktimes = this._getWorkHours(start);\r\n\t\tvar resultDate = this._findClosestTimeInDay(start, direction, worktimes);\r\n\t\tif(!resultDate){\r\n\t\t\tstart = this.calculateEndDate(start, direction, \"day\");\r\n\t\t\tif(direction > 0){\r\n\t\t\t\tstart = this.$gantt.date.day_start(start);\r\n\t\t\t}else{\r\n\t\t\t\tstart = this.$gantt.date.day_start(start);\r\n\t\t\t\tstart = this.$gantt.date.add(start, 1, \"day\");\r\n\t\t\t\tstart = new Date(start.valueOf() - 1);\r\n\t\t\t}\r\n\t\t\tworktimes = this._getWorkHours(start);\r\n\t\t\tresultDate = this._findClosestTimeInDay(start, direction, worktimes);\r\n\t\t}\r\n\t\tif(direction < 0){\r\n\t\t\t// getClosestWorkTimePast adds one time unit to the result date after this\r\n\t\t\tresultDate = this.$gantt.date.add(resultDate, -1, unit);\r\n\t\t}\r\n\t\treturn resultDate;\r\n\t},\r\n\r\n\t_getClosestWorkTimeGeneric: function (date, unit, increment) {\r\n\t\tif(unit === \"hour\" || unit === \"minute\"){\r\n\t\t\treturn this._getClosestWorkMinute(date, unit, increment);\r\n\t\t}\r\n\r\n\t\tvar unitOrder = this._getUnitOrder(unit),\r\n\t\t\tbiggerTimeUnit = this.units[unitOrder - 1];\r\n\r\n\t\tvar result = date;\r\n\r\n\t\t// be extra sure we won't fall into infinite loop, 3k seems big enough\r\n\t\tvar maximumLoop = 3000,\r\n\t\t\tcount = 0;\r\n\r\n\t\twhile (!this._isWorkTime(result, unit)) {\r\n\t\t\tif (biggerTimeUnit && !this._isWorkTime(result, biggerTimeUnit)) {\r\n\t\t\t\t// if we look for closest work hour and detect a week-end - first find the closest work day,\r\n\t\t\t\t// and continue iterations after that\r\n\t\t\t\tif (increment > 0) {\r\n\t\t\t\t\tresult = this._getClosestWorkTimeFuture(result, biggerTimeUnit);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult = this._getClosestWorkTimePast(result, biggerTimeUnit);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this._isWorkTime(result, unit)) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tcount++;\r\n\t\t\tif (count > maximumLoop) {\r\n\t\t\t\tthis.$gantt.assert(false, \"Invalid working time check\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tvar tzOffset = result.getTimezoneOffset();\r\n\t\t\tresult = this.$gantt.date.add(result, increment, unit);\r\n\r\n\t\t\tresult = this.$gantt._correct_dst_change(result, tzOffset, increment, unit);\r\n\t\t\tif (this.$gantt.date[unit + '_start']) {\r\n\t\t\t\tresult = this.$gantt.date[unit + '_start'](result);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t},\r\n\r\n\t/**\r\n\t * Check whether this calendar has working time. Calendar has working time only if there are regular working days of week\r\n\t *\r\n\t */\r\n\thasWorkTime: function () {\r\n\t\tvar worktime = this.getConfig();\r\n\t\tvar dates = worktime.dates;\r\n\r\n\t\tvar daysOfWeek = [0, 1, 2, 3, 4, 5, 6];\r\n\t\tvar exceptions = [];\r\n\t\tfor(var i in worktime.dates){\r\n\t\t\tif(Number(i) > 6){\r\n\t\t\t\texceptions.push(Number(i));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar hasRegularHours = this._checkWorkHours(worktime.hours);\r\n\r\n\t\tvar result = false;\r\n\t\tdaysOfWeek.forEach((function(day){\r\n\t\t\tif(result){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar dayConfig = dates[day];\r\n\t\t\tif(dayConfig === true){\r\n\t\t\t\t// workday uses global hours\r\n\t\t\t\tresult = hasRegularHours;\r\n\t\t\t}else if(Array.isArray(dayConfig)){\r\n\t\t\t\t// workday uses custom hours\r\n\t\t\t\tresult = this._checkWorkHours(dayConfig);\r\n\t\t\t}\r\n\t\t}).bind(this));\r\n\r\n\t\treturn result;\r\n\r\n\t},\r\n\r\n\t_checkWorkHours: function(hoursArray) {\r\n\t\tif (hoursArray.length === 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tvar result = false;\r\n\t\tfor (var i = 0; i < hoursArray.length; i += 2) {\r\n\t\t\tif (hoursArray[i] !== hoursArray[i + 1]) {\r\n\t\t\t\tresult = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t},\r\n\r\n\t_isMinutePrecision: function (date) {\r\n\t\tlet minutePrecision = false;\r\n\t\tthis._getWorkHours(date).forEach(function(interval){\r\n\t\t\tif (interval.startMinute % 60 || interval.endMinute % 60){\r\n\t\t\t\tminutePrecision = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn minutePrecision;\r\n\t}\r\n};\r\n\r\nexport default CalendarWorkTimeStrategy;","import { IWorkUnitCache } from \"./workunit_cache_interface\";\r\nimport { WorkUnitsMapCache } from \"./workunit_map_cache\";\r\nimport { WorkUnitsObjectCache } from \"./workunit_object_cache\";\r\nexport { LargerUnitsCache } from \"./larger_units_helper\";\r\n\r\nexport function createCacheObject(): IWorkUnitCache {\r\n\r\n\t// worktime hash is on the hot path,\r\n\t// Map seems to work faster than plain array, use it whenever possible\r\n\tif (typeof Map !== \"undefined\") {\r\n\t\treturn new WorkUnitsMapCache();\r\n\t} else {\r\n\t\treturn new WorkUnitsObjectCache();\r\n\t}\r\n}\r\n","export default {\r\n\tisLegacyResourceCalendarFormat: function(resourceCalendarsProperty){\r\n\t\t// modern format:\r\n\t\t//gantt.config.resource_calendars = {\r\n\t\t//\tresourceId: calendarId,\r\n\t\t//\tresourceId: calendarId,\r\n\t\t//\tresourceId: calendarId\r\n\t\t//\t};\r\n\t\t\r\n\t\t// legacy format:\r\n\t\t// gantt.config.resource_calendars = {\r\n\t\t//\t\"resourceProperty\": {\r\n\t\t//\t\tresourceId: calendarId,\r\n\t\t//\t\tresourceId: calendarId,\r\n\t\t//\t\tresourceId: calendarId\r\n\t\t//\t\t}\r\n\t\t//\t};\r\n\r\n\t\tif(!resourceCalendarsProperty){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tfor(var i in resourceCalendarsProperty){\r\n\t\t\tif(resourceCalendarsProperty[i] && typeof resourceCalendarsProperty[i] === \"object\"){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\tgetResourceProperty: function(config){\r\n\t\tvar resourceCalendarsConfig = config.resource_calendars;\r\n\t\tvar propertyName = config.resource_property;\r\n\t\tif(this.isLegacyResourceCalendarFormat(resourceCalendarsConfig)){\r\n\t\t\tfor(var i in config){\r\n\t\t\t\tpropertyName = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn propertyName;\r\n\t},\r\n\tgetCalendarIdFromLegacyConfig: function(task, config){\r\n\t\tif (config) {\r\n\t\t\tfor (var field in config) {\r\n\t\t\t\tvar resource = config[field];\r\n\t\t\t\tif (task[field]) {\r\n\t\t\t\t\tvar calendarId = resource[task[field]];\r\n\t\t\t\t\tif (calendarId) {\r\n\t\t\t\t\t\treturn calendarId;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n};","import * as utils from \"../../utils/utils\";\r\nimport createArgumentsHelper from \"./calendar_arguments_helper\";\r\nimport CalendarMergeHelper from \"./strategy/work_calendar_merger\";\r\nimport CalendarWorkTimeStrategy from \"./strategy/calendar_strategy\";\r\nimport legacyResourceCalendarConfig from \"./legacy_resource_config\";\r\nimport dynamicResourceCalendarsFactory from \"./dynamic_resource_calendars\";\r\n\r\nconst dynamicResourceCalendars = dynamicResourceCalendarsFactory();\r\n\r\nfunction CalendarManager (gantt){\r\n\tthis.$gantt = gantt;\r\n\tthis._calendars = {};\r\n\tthis._legacyConfig = undefined;\r\n\tthis.$gantt.attachEvent(\"onGanttReady\", function(){\r\n\t\tif(this.$gantt.config.resource_calendars){\r\n\t\t\tthis._isLegacyConfig = legacyResourceCalendarConfig.isLegacyResourceCalendarFormat(this.$gantt.config.resource_calendars);\r\n\t\t}\r\n\t}.bind(this));\r\n\r\n\tthis.$gantt.attachEvent(\"onBeforeGanttReady\", function(){\r\n\t\tthis.createDefaultCalendars();\r\n\t}.bind(this));\r\n\tthis.$gantt.attachEvent(\"onBeforeGanttRender\", function(){\r\n\t\tthis.createDefaultCalendars();\r\n\t}.bind(this));\r\n}\r\n\r\nCalendarManager.prototype = {\r\n\t_calendars: {},\r\n\t_convertWorkTimeSettings: function (settings) {\r\n\t\tvar days = settings.days;\r\n\t\tif (days && !settings.dates) {\r\n\t\t\tsettings.dates = settings.dates || {};\r\n\t\t\tfor (var i = 0; i < days.length; i++) {\r\n\t\t\t\tsettings.dates[i] = days[i];\r\n\t\t\t\tif (!(days[i] instanceof Array)) {\r\n\t\t\t\t\tsettings.dates[i] = !!days[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tdelete settings.days;\r\n\t\treturn settings;\r\n\t},\r\n\tmergeCalendars: function(){\r\n\t\tvar calendars = [];\r\n\t\tvar args = arguments;\r\n\t\tif(Array.isArray(args[0])){\r\n\t\t\tcalendars = args[0].slice();\r\n\t\t}else{\r\n\t\t\tfor(var i = 0; i < arguments.length; i++){\r\n\t\t\t\tcalendars.push(arguments[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar mergeHelper = new CalendarMergeHelper();\r\n\r\n\t\tvar result;\r\n\t\tcalendars.forEach(function(calendar){\r\n\t\t\tif(!result){\r\n\t\t\t\tresult = calendar;\r\n\t\t\t} else{\r\n\t\t\t\tresult = this._createCalendarFromConfig(mergeHelper.merge(result, calendar));\r\n\t\t\t}\r\n\r\n\t\t}.bind(this));\r\n\t\treturn this.createCalendar(result);\r\n\t},\r\n\r\n\t_createCalendarFromConfig: function(config){\r\n\t\tvar apiCore = new CalendarWorkTimeStrategy(this.$gantt, createArgumentsHelper(this.$gantt));\r\n\t\tapiCore.id = String(utils.uid());\r\n\r\n\t\tvar preparedConfig = this._convertWorkTimeSettings(config);\r\n\t\tif(preparedConfig.customWeeks){\r\n\t\t\tfor(var i in preparedConfig.customWeeks){\r\n\t\t\t\tpreparedConfig.customWeeks[i] = this._convertWorkTimeSettings(preparedConfig.customWeeks[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tapiCore._setConfig(preparedConfig);\r\n\r\n\t\treturn apiCore;\r\n\t},\r\n\r\n\tcreateCalendar: function (parentCalendar) {\r\n\t\tvar settings;\r\n\r\n\t\tif (!parentCalendar) {\r\n\t\t\tparentCalendar = {};\r\n\t\t}\r\n\r\n\t\tif (parentCalendar.getConfig){\r\n\t\t\tsettings = utils.copy(parentCalendar.getConfig());\r\n\t\t} else if (parentCalendar.worktime) {\r\n\t\t\tsettings = utils.copy(parentCalendar.worktime);\r\n\t\t} else {\r\n\t\t\tsettings = utils.copy(parentCalendar);\r\n\t\t}\r\n\r\n\t\tvar defaults = utils.copy(this.defaults.fulltime.worktime);\r\n\t\tutils.mixin(settings, defaults);\r\n\r\n\t\treturn this._createCalendarFromConfig(settings);\r\n\t},\r\n\r\n\tgetCalendar: function (id) {\r\n\t\tid = id || \"global\";\r\n\t\tvar calendar = this._calendars[id];\r\n\t\tif(!calendar){\r\n\t\t\tthis.createDefaultCalendars();\r\n\t\t\tcalendar = this._calendars[id];\r\n\t\t}\r\n\r\n\t\treturn calendar;\r\n\t},\r\n\r\n\tgetCalendars: function () {\r\n\t\tvar res = [];\r\n\t\tfor (var i in this._calendars) {\r\n\t\t\tres.push(this.getCalendar(i));\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\r\n\t_getOwnCalendar: function(task){\r\n\t\tvar config = this.$gantt.config;\r\n\t\tif (task[config.calendar_property]) {\r\n\t\t\treturn this.getCalendar(task[config.calendar_property]);\r\n\t\t}\r\n\r\n\t\tif (config.resource_calendars) {\r\n\t\t\tvar calendar;\r\n\t\t\tvar calendarId;\r\n\t\t\tvar resourceProperty;\r\n\t\t\tif(this._legacyConfig === false){\r\n\t\t\t\tresourceProperty = config.resource_property;\r\n\t\t\t}else{\r\n\t\t\t\tresourceProperty = legacyResourceCalendarConfig.getResourceProperty(config);\r\n\t\t\t}\r\n\t\t\tif(Array.isArray(task[resourceProperty])){\r\n\t\t\t\t// if multiple resources are attached to the task - merge their calendars\r\n\t\t\t\tif(config.dynamic_resource_calendars){\r\n\t\t\t\t\tcalendarId = dynamicResourceCalendars.getCalendarIdFromMultipleResources(task[resourceProperty], this);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(this._legacyConfig === undefined){\r\n\t\t\t\t\tthis._legacyConfig = legacyResourceCalendarConfig.isLegacyResourceCalendarFormat(config.resource_calendars);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(this._legacyConfig){\r\n\t\t\t\t\tvar calendarId = legacyResourceCalendarConfig.getCalendarIdFromLegacyConfig(task, config.resource_calendars);\r\n\t\t\t\t}else if(resourceProperty && task[resourceProperty] && config.resource_calendars[task[resourceProperty]]){\r\n\t\t\t\t\tvar calendar = this.getResourceCalendar(task[resourceProperty]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(calendarId){\r\n\t\t\t\tcalendar = this.getCalendar(calendarId);\r\n\t\t\t}\r\n\r\n\t\t\tif(calendar){\r\n\t\t\t\treturn calendar;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns calendar assigned to the specified resource.\r\n\t * Returns the global calendar if no custom calendar is associated with the resource.\r\n\t * @param {(string|number|Object)} resource - resource object or resource id\r\n\t * @returns {object} Calendar object\r\n\t */\r\n\tgetResourceCalendar: function(resource) {\r\n\t\tif (resource === null || resource === undefined) {\r\n\t\t\treturn this.getCalendar();\r\n\t\t}\r\n\r\n\t\tvar resourceId = null;\r\n\t\t// if task id is provided\r\n\t\tif((typeof resource === \"number\" || typeof resource === \"string\")){\r\n\t\t\tresourceId = resource;\r\n\t\t}else{\r\n\t\t\tresourceId = resource.id || resource.key;\r\n\t\t}\r\n\r\n\t\tvar config = this.$gantt.config;\r\n\t\tvar calendarsConfig = config.resource_calendars;\r\n\t\tvar calendarId = null;\r\n\t\tif (calendarsConfig) {\r\n\t\t\tif(this._legacyConfig === undefined){\r\n\t\t\t\tthis._legacyConfig = legacyResourceCalendarConfig.isLegacyResourceCalendarFormat(config.resource_calendars);\r\n\t\t\t}\r\n\r\n\t\t\tif(this._legacyConfig){\r\n\t\t\t\tfor(var field in calendarsConfig){\r\n\t\t\t\t\tif(calendarsConfig[field][resourceId]){\r\n\t\t\t\t\t\tcalendarId = calendarsConfig[field][resourceId];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tvar calendarId = calendarsConfig[resourceId];\r\n\t\t\t}\r\n\r\n\t\t\tif(calendarId){\r\n\t\t\t\treturn this.getCalendar(calendarId);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn this.getCalendar();\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the calendar assigned to a task.\r\n\t * - Returns a calendar assigned via task[gantt.config.calendar_property] if specified.\r\n\t * - Returns a calendar assigned to the task resource if specified.\r\n\t * - Returns the global calendar otherwise.\r\n\t * @param {(string|number|Object)} task - task object or task id\r\n\t * @returns {object} Calendar object\r\n\t */\r\n\tgetTaskCalendar: function (task) {\r\n\t\tvar gantt = this.$gantt;\r\n\t\tvar taskObject;\r\n\t\tif (task === null || task === undefined) {\r\n\t\t\treturn this.getCalendar();\r\n\t\t}\r\n\r\n\t\t// if task id is provided\r\n\t\tif((typeof task === \"number\" || typeof task === \"string\") && gantt.isTaskExists(task)){\r\n\t\t\ttaskObject = gantt.getTask(task);\r\n\t\t}else{\r\n\t\t\ttaskObject = task;\r\n\t\t}\r\n\r\n\t\tif(!taskObject){\r\n\t\t\treturn this.getCalendar();\r\n\t\t}\r\n\r\n\t\tvar calendar = this._getOwnCalendar(taskObject);\r\n\t\tvar groupMode = !!gantt.getState().group_mode;\r\n\r\n\t\tif (!calendar && gantt.config.inherit_calendar && gantt.isTaskExists(taskObject.parent)){\r\n\t\t\t// GS-1579 group mode overrides tree hierarchy, iterate using `.parent` property, instead of using eachParent iterator\r\n\t\t\tvar currentTask = taskObject;\r\n\t\t\twhile(gantt.isTaskExists(currentTask.parent)){\r\n\t\t\t\tcurrentTask = gantt.getTask(currentTask.parent);\r\n\t\t\t\tif(gantt.isSummaryTask(currentTask)){\r\n\t\t\t\t\tcalendar = this._getOwnCalendar(currentTask);\r\n\t\t\t\t\tif(calendar){\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(groupMode && !calendar){\r\n\t\t\t\t// if group mode and inherit_calendars is enabled - preserve previously applied parent calendar\r\n\t\t\t\t// we may need it when groupBy parses grouped data, old parent may be not loaded yet\r\n\t\t\t\tif(task.$effective_calendar){\r\n\t\t\t\t\tcalendar = this.getCalendar(task.$effective_calendar);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn calendar || this.getCalendar();\r\n\t},\r\n\r\n\taddCalendar: function(calendar) { // puts new calendar to Global Storage - gantt.calendarManager._calendars {}\r\n\t\tif (!(this.isCalendar(calendar))) {\r\n\t\t\tvar id = calendar.id;\r\n\t\t\tcalendar = this.createCalendar(calendar);\r\n\t\t\tcalendar.id = id;\r\n\t\t}\r\n\r\n\t\t// validate/check if empty calendar\r\n\t\tif (!calendar._tryChangeCalendarSettings(function () {\r\n\t\t\t})) {\r\n\r\n\t\t\tthis.$gantt.callEvent(\"onCalendarError\", [{message: \"Invalid calendar settings, no worktime available\"}, calendar]);\r\n\t\t\treturn null;\r\n\t\t} else {\r\n\t\t\tvar config = this.$gantt.config;\r\n\r\n\t\t\tcalendar.id = calendar.id || utils.uid();\r\n\t\t\tthis._calendars[calendar.id] = calendar;\r\n\t\t\tif (!config.worktimes)\r\n\t\t\t\tconfig.worktimes = {};\r\n\t\t\tconfig.worktimes[calendar.id] = calendar.getConfig();\r\n\t\t\treturn calendar.id;\r\n\t\t}\r\n\t},\r\n\r\n\tdeleteCalendar: function (calendar) {\r\n\t\tvar config = this.$gantt.config;\r\n\t\tif (!calendar) return false;\r\n\t\tif (this._calendars[calendar]) {\r\n\t\t\tdelete this._calendars[calendar];\r\n\t\t\tif (config.worktimes && config.worktimes[calendar])\r\n\t\t\t\tdelete config.worktimes[calendar];\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t},\r\n\r\n\trestoreConfigCalendars: function (configs) {\r\n\t\tfor (var i in configs) {\r\n\t\t\tif (this._calendars[i])\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tvar settings = configs[i];\r\n\t\t\tvar calendar = this.createCalendar(settings);\r\n\t\t\tcalendar.id = i;\r\n\t\t\tthis.addCalendar(calendar);\r\n\t\t}\r\n\t},\r\n\r\n\tdefaults: {\r\n\t\tglobal: {\r\n\t\t\tid: \"global\",\r\n\t\t\tworktime: {\r\n\t\t\t\thours: [8, 12, 13, 17],\r\n\t\t\t\tdays: [0, 1, 1, 1, 1, 1, 0]\r\n\t\t\t}\r\n\t\t},\r\n\t\tfulltime: {\r\n\t\t\tid: \"fulltime\",\r\n\t\t\tworktime: {\r\n\t\t\t\thours: [0, 24],\r\n\t\t\t\tdays: [1, 1, 1, 1, 1, 1, 1]\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tcreateDefaultCalendars: function () {\r\n\t\tvar config = this.$gantt.config;\r\n\t\tthis.restoreConfigCalendars(this.defaults);\r\n\t\tthis.restoreConfigCalendars(config.worktimes);\r\n\t},\r\n\r\n\tisCalendar: function(possibleCalendar) {\r\n\t\t// because we don't have any way to check without dependency to CalendarWorkTimeStrategy\r\n\t\tvar props = [\r\n\t\t\tpossibleCalendar.isWorkTime,\r\n\t\t\tpossibleCalendar.setWorkTime,\r\n\t\t\tpossibleCalendar.getWorkHours,\r\n\t\t\tpossibleCalendar.unsetWorkTime,\r\n\t\t\tpossibleCalendar.getClosestWorkTime,\r\n\t\t\tpossibleCalendar.calculateDuration,\r\n\t\t\tpossibleCalendar.hasDuration,\r\n\t\t\tpossibleCalendar.calculateEndDate\r\n\t\t];\r\n\t\treturn props.every(function(entry) {\r\n\t\t\treturn entry instanceof Function;\r\n\t\t});\r\n\t}\r\n};\r\n\r\nexport default CalendarManager;","export default function() {\r\n\tfunction getResourcesCalendarKey(resourceAssignments){\r\n\t\treturn resourceAssignments.map(function(res){\r\n\t\t\tif(res && res.resource_id){\r\n\t\t\t\treturn res.resource_id;\r\n\t\t\t} else {\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t}).sort().join(\"-\");\r\n\t}\r\n\r\n\tvar dynamicCalendars = {};\r\n\r\n\tfunction mergeResourceCalendars(resourceAssignments, manager){\r\n\t\treturn manager.mergeCalendars(resourceAssignments.map(function(assignment){\r\n\t\t\tvar resourceId = (assignment && assignment.resource_id) ? assignment.resource_id : assignment;\r\n\t\t\treturn manager.getResourceCalendar(resourceId);\r\n\t\t}));\r\n\t}\r\n\tfunction getCalendarIdFromMultipleResources(resourceAssignments, manager){\r\n\t\tvar key = getResourcesCalendarKey(resourceAssignments);\r\n\t\tif(!resourceAssignments.length){\r\n\t\t\treturn null;\r\n\t\t}else if(resourceAssignments.length === 1){\r\n\t\t\treturn manager.getResourceCalendar(key).id;\r\n\t\t}else if (dynamicCalendars[key]){\r\n\t\t\treturn dynamicCalendars[key].id;\r\n\t\t} else {\r\n\t\t\tvar tempCalendar = mergeResourceCalendars(resourceAssignments, manager);\r\n\r\n\t\t\tdynamicCalendars[key] = tempCalendar;\r\n\t\t\treturn manager.addCalendar(tempCalendar);\r\n\t\t}\r\n\t}\r\n\r\n\treturn {\r\n\t\tgetCalendarIdFromMultipleResources: getCalendarIdFromMultipleResources\r\n\t};\r\n};","function CalendarDisabledTimeStrategy(gantt, argumentsHelper){\r\n\tthis.argumentsHelper = argumentsHelper;\r\n\tthis.$gantt = gantt;\r\n}\r\n\r\nCalendarDisabledTimeStrategy.prototype = {\r\n\tgetWorkHours: function () {\r\n\t\treturn [0, 24];\r\n\t},\r\n\tsetWorkTime: function () {\r\n\t\treturn true;\r\n\t},\r\n\tunsetWorkTime: function () {\r\n\t\treturn true;\r\n\t},\r\n\tisWorkTime: function () {\r\n\t\treturn true;\r\n\t},\r\n\tgetClosestWorkTime: function (config) {\r\n\t\tvar config = this.argumentsHelper.getClosestWorkTimeArguments.apply(this.argumentsHelper, arguments);\r\n\t\treturn config.date;\r\n\t},\r\n\r\n\tcalculateDuration: function () {\r\n\t\tvar config = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments);\r\n\t\tvar from = config.start_date,\r\n\t\t\tto = config.end_date,\r\n\t\t\tunit = config.unit,\r\n\t\t\tstep = config.step;\r\n\r\n\t\treturn this._calculateDuration(from, to, unit, step);\r\n\t},\r\n\t_calculateDuration: function (start, end, unit, step) {\r\n\t\tvar dateHelper = this.$gantt.date;\r\n\t\tvar fixedUnits = {\r\n\t\t\t\"week\": 1000 * 60 * 60 * 24 * 7,\r\n\t\t\t\"day\": 1000 * 60 * 60 * 24,\r\n\t\t\t\"hour\": 1000 * 60 * 60,\r\n\t\t\t\"minute\": 1000 * 60\r\n\t\t};\r\n\r\n\t\tvar res = 0;\r\n\t\tif (fixedUnits[unit]) {\r\n\t\t\tres = Math.round((end - start) / (step * fixedUnits[unit]));\r\n\t\t} else {\r\n\t\t\tvar from = new Date(start),\r\n\t\t\t\tto = new Date(end);\r\n\t\t\twhile (from.valueOf() < to.valueOf()) {\r\n\t\t\t\tres += 1;\r\n\t\t\t\tfrom = dateHelper.add(from, step, unit);\r\n\t\t\t}\r\n\r\n\t\t\tif (from.valueOf() != end.valueOf()) {\r\n\t\t\t\tres += (to - from) / (dateHelper.add(from, step, unit) - from);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Math.round(res);\r\n\t},\r\n\r\n\thasDuration: function () {\r\n\t\tvar config = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments);\r\n\t\tvar from = config.start_date,\r\n\t\t\tto = config.end_date,\r\n\t\t\tunit = config.unit;\r\n\r\n\t\tif (!unit) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tfrom = new Date(from);\r\n\t\tto = new Date(to);\r\n\r\n\t\treturn (from.valueOf() < to.valueOf());\r\n\t},\r\n\r\n\thasWorkTime: function() {\r\n\t\treturn true;\r\n\t},\r\n\r\n\tequals: function(calendar) {\r\n\t\tif(!(calendar instanceof CalendarDisabledTimeStrategy)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\tcalculateEndDate: function () {\r\n\t\tvar config = this.argumentsHelper.calculateEndDateArguments.apply(this.argumentsHelper, arguments);\r\n\r\n\t\tvar start = config.start_date,\r\n\t\t\tduration = config.duration,\r\n\t\t\tunit = config.unit,\r\n\t\t\tstep = config.step;\r\n\r\n\t\treturn this.$gantt.date.add(start, step * duration, unit);\r\n\t}\r\n};\r\n\r\nexport default CalendarDisabledTimeStrategy;","import createArgumentsHelper from \"./calendar_arguments_helper\";\r\nimport NoWorkTimeCalendar from \"./strategy/no_work_time\";\r\n\r\nfunction TimeCalculator(calendarManager){\r\n\r\n\tthis.$gantt = calendarManager.$gantt;\r\n\tthis.argumentsHelper = createArgumentsHelper(this.$gantt);\r\n\tthis.calendarManager = calendarManager;\r\n\tthis.$disabledCalendar = new NoWorkTimeCalendar(this.$gantt, this.argumentsHelper);\r\n}\r\n\r\nTimeCalculator.prototype = {\r\n\t_getCalendar: function (config) {\r\n\t\tvar calendar;\r\n\t\tif (!this.$gantt.config.work_time) {\r\n\t\t\tcalendar = this.$disabledCalendar;\r\n\t\t} else {\r\n\t\t\tvar manager = this.calendarManager;\r\n\t\t\tif (config.task) {\r\n\t\t\t\tcalendar = manager.getTaskCalendar(config.task);\r\n\t\t\t} else if (config.id) {\r\n\t\t\t\tcalendar = manager.getTaskCalendar(config);\r\n\t\t\t} else if (config.calendar) {\r\n\t\t\t\tcalendar = config.calendar;\r\n\t\t\t}\r\n\t\t\tif (!calendar) {\r\n\t\t\t\tcalendar = manager.getTaskCalendar();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn calendar;\r\n\t},\r\n\r\n\tgetWorkHours: function (config) {\r\n\t\tconfig = this.argumentsHelper.getWorkHoursArguments.apply(this.argumentsHelper, arguments);\r\n\r\n\t\tvar calendar = this._getCalendar(config);\r\n\r\n\t\treturn calendar.getWorkHours(config.date);\r\n\t},\r\n\r\n\tsetWorkTime: function (config, calendar) {\r\n\t\tconfig = this.argumentsHelper.setWorkTimeArguments.apply(this.argumentsHelper, arguments);\r\n\r\n\t\tif (!calendar)\r\n\t\t\tcalendar = this.calendarManager.getCalendar(); // Global\r\n\t\treturn calendar.setWorkTime(config);\r\n\t},\r\n\r\n\tunsetWorkTime: function (config, calendar) {\r\n\t\tconfig = this.argumentsHelper.unsetWorkTimeArguments.apply(this.argumentsHelper, arguments);\r\n\r\n\t\tif (!calendar)\r\n\t\t\tcalendar = this.calendarManager.getCalendar(); // Global\r\n\t\treturn calendar.unsetWorkTime(config);\r\n\t},\r\n\tisWorkTime: function (date, unit, task, calendar) {\r\n\t\tvar config = this.argumentsHelper.isWorkTimeArguments.apply(this.argumentsHelper, arguments);\r\n\r\n\t\tcalendar = this._getCalendar(config);\r\n\t\treturn calendar.isWorkTime(config);\r\n\t},\r\n\tgetClosestWorkTime: function (config) {\r\n\t\tconfig = this.argumentsHelper.getClosestWorkTimeArguments.apply(this.argumentsHelper, arguments);\r\n\r\n\t\tvar calendar = this._getCalendar(config);\r\n\r\n\t\treturn calendar.getClosestWorkTime(config);\r\n\t},\r\n\r\n\tcalculateDuration: function () { // start_date_date, end_date, task\r\n\t\tvar config = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments);\r\n\r\n\r\n\t\tvar calendar = this._getCalendar(config);\r\n\t\treturn calendar.calculateDuration(config);\r\n\t},\r\n\thasDuration: function () {\r\n\t\tvar config = this.argumentsHelper.hasDurationArguments.apply(this.argumentsHelper, arguments);\r\n\r\n\t\tvar calendar = this._getCalendar(config);\r\n\r\n\t\treturn calendar.hasDuration(config);\r\n\t},\r\n\tcalculateEndDate: function (config) { // start_date, duration, unit, task\r\n\t\tvar config = this.argumentsHelper.calculateEndDateArguments.apply(this.argumentsHelper, arguments);\r\n\r\n\t\tvar calendar = this._getCalendar(config);\r\n\t\treturn calendar.calculateEndDate(config);\r\n\t}\r\n};\r\n\r\nexport default TimeCalculator;\r\n\r\n","// TODO: rework public api for date methods\r\nimport * as utils from \"../../utils/utils\";\r\n\r\nvar createWorkTimeFacade = function(calendarManager, timeCalculator){\r\n\treturn {\r\n\t\tgetWorkHours: function (date) {\r\n\t\t\treturn timeCalculator.getWorkHours(date);\r\n\t\t},\r\n\r\n\t\tsetWorkTime: function (config) {\r\n\t\t\treturn timeCalculator.setWorkTime(config);\r\n\t\t},\r\n\r\n\t\tunsetWorkTime: function (config) {\r\n\t\t\ttimeCalculator.unsetWorkTime(config);\r\n\t\t},\r\n\r\n\t\tisWorkTime: function (date, unit, task) {\r\n\t\t\treturn timeCalculator.isWorkTime(date, unit, task);\r\n\t\t},\r\n\r\n\t\tgetClosestWorkTime: function (config) {\r\n\t\t\treturn timeCalculator.getClosestWorkTime(config);\r\n\t\t},\r\n\r\n\t\tcalculateDuration: function (start_date, end_date, task) {\r\n\t\t\treturn timeCalculator.calculateDuration(start_date, end_date, task);\r\n\t\t},\r\n\t\t_hasDuration: function (start_date, end_date, task) {\r\n\t\t\treturn timeCalculator.hasDuration(start_date, end_date, task);\r\n\t\t},\r\n\r\n\t\tcalculateEndDate: function (start, duration, unit, task) {\r\n\t\t\treturn timeCalculator.calculateEndDate(start, duration, unit, task);\r\n\t\t},\r\n\r\n\t\tmergeCalendars: utils.bind(calendarManager.mergeCalendars, calendarManager),\r\n\t\tcreateCalendar: utils.bind(calendarManager.createCalendar, calendarManager),\r\n\t\taddCalendar: utils.bind(calendarManager.addCalendar, calendarManager),\r\n\t\tgetCalendar: utils.bind(calendarManager.getCalendar, calendarManager),\r\n\t\tgetCalendars: utils.bind(calendarManager.getCalendars, calendarManager),\r\n\t\tgetResourceCalendar: utils.bind(calendarManager.getResourceCalendar, calendarManager),\r\n\t\tgetTaskCalendar: utils.bind(calendarManager.getTaskCalendar, calendarManager),\r\n\t\tdeleteCalendar: utils.bind(calendarManager.deleteCalendar, calendarManager)\r\n\t};\r\n};\r\n\r\n\r\nexport default { create: createWorkTimeFacade };","import * as helpers from \"../utils/helpers\";\r\n\r\nexport default function(gantt) {\r\n\r\n\tgantt.isUnscheduledTask = function (task) {\r\n\t\tgantt.assert(task && task instanceof Object, \"Invalid argument task=\"+task+\" of gantt.isUnscheduledTask. Task object was expected\");\r\n\t\treturn (!!task.unscheduled || !task.start_date);\r\n\t};\r\n\r\n\tgantt._isAllowedUnscheduledTask = function (task) {\r\n\t\treturn !!(task.unscheduled && gantt.config.show_unscheduled);\r\n\t};\r\n\r\n\tgantt._isTaskInTimelineLimits = function(task) {\r\n\t\tvar taskStart = task.start_date ? task.start_date.valueOf() : null;\r\n\t\tvar taskEnd = task.end_date ? task.end_date.valueOf() : null;\r\n\t\treturn !!(taskStart && taskEnd && taskStart <= this._max_date.valueOf() && taskEnd >= this._min_date.valueOf());\r\n\t};\r\n\tgantt.isTaskVisible = function (id) {\r\n\t\tif (!this.isTaskExists(id)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar task = this.getTask(id);\r\n\t\tif (!(this._isAllowedUnscheduledTask(task) || this._isTaskInTimelineLimits(task))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn !!(this.getGlobalTaskIndex(id) >= 0);\r\n\t};\r\n\r\n\tgantt._getProjectEnd = function() {\r\n\t\tif(gantt.config.project_end){\r\n\t\t\treturn gantt.config.project_end;\r\n\t\t}else{\r\n\t\t\tvar tasks = gantt.getTaskByTime();\r\n\t\t\ttasks = tasks.sort(function (a, b) {\r\n\t\t\t\treturn +a.end_date > +b.end_date ? 1 : -1;\r\n\t\t\t});\r\n\t\t\treturn tasks.length ? tasks[tasks.length - 1].end_date : null;\r\n\t\t}\r\n\t};\r\n\tgantt._getProjectStart = function() {\r\n\t\tif (gantt.config.project_start) {\r\n\t\t\treturn gantt.config.project_start;\r\n\t\t}\r\n\r\n\t\t// use timeline start if project start is not specified\r\n\t\tif (gantt.config.start_date) {\r\n\t\t\treturn gantt.config.start_date;\r\n\t\t}\r\n\t\tif (gantt.getState().min_date) {\r\n\t\t\treturn gantt.getState().min_date;\r\n\t\t}\r\n\r\n\t\t// earliest task start if neither project start nor timeline are specified\r\n\t\tvar tasks = gantt.getTaskByTime();\r\n\t\ttasks = tasks.sort(function (a, b) {\r\n\t\t\treturn +a.start_date > +b.start_date ? 1 : -1;\r\n\t\t});\r\n\t\treturn tasks.length ? tasks[0].start_date : null;\r\n\t};\r\n\r\n\tvar getDefaultTaskDate = function (item, parent_id) {\r\n\t\tvar parentExists = parent_id && parent_id != gantt.config.root_id && gantt.isTaskExists(parent_id);\r\n\t\tvar parent = parentExists ? gantt.getTask(parent_id) : false,\r\n\t\t\tstartDate = null;\r\n\t\tif (parent) {\r\n\t\t\tif(gantt.config.schedule_from_end){\r\n\t\t\t\tstartDate = gantt.calculateEndDate({\r\n\t\t\t\t\tstart_date: parent.end_date,\r\n\t\t\t\t\tduration: - gantt.config.duration_step,\r\n\t\t\t\t\ttask:item\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\tif(!parent.start_date){\r\n\t\t\t\t\treturn getDefaultTaskDate(parent, gantt.getParent(parent));\r\n\t\t\t\t}\r\n\t\t\t\tstartDate = parent.start_date;\r\n\t\t\t}\r\n\r\n\t\t} else if(gantt.config.schedule_from_end) {\r\n\t\t\tstartDate = gantt.calculateEndDate({\r\n\t\t\t\tstart_date: gantt._getProjectEnd(),\r\n\t\t\t\tduration: - gantt.config.duration_step,\r\n\t\t\t\ttask:item\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tconst first = gantt.getTaskByIndex(0);\r\n\t\t\tconst minDate = gantt.config.start_date || gantt.getState().min_date;\r\n\r\n\t\t\tif (first){\r\n\t\t\t\tif (first.start_date){\r\n\t\t\t\t\tstartDate = first.start_date;\r\n\t\t\t\t}\r\n\t\t\t\telse if (first.end_date){\r\n\t\t\t\t\tstartDate = gantt.calculateEndDate({\r\n\t\t\t\t\t\tstart_date: first.end_date,\r\n\t\t\t\t\t\tduration: -gantt.config.duration_step,\r\n\t\t\t\t\t\ttask:item\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tstartDate = minDate;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tstartDate = minDate;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgantt.assert(startDate, \"Invalid dates\");\r\n\t\treturn new Date(startDate);\r\n\t};\r\n\r\n\tgantt._set_default_task_timing = function (task) {\r\n\t\ttask.start_date = task.start_date || getDefaultTaskDate(task, gantt.getParent(task));\r\n\t\ttask.duration = task.duration || gantt.config.duration_step;\r\n\t\ttask.end_date = task.end_date || gantt.calculateEndDate(task);\r\n\t};\r\n\r\n\tgantt.createTask = function (item, parent, index) {\r\n\t\titem = item || {};\r\n\r\n\t\tif (!gantt.defined(item.id))\r\n\t\t\titem.id = gantt.uid();\r\n\r\n\t\tif (!item.start_date) {\r\n\t\t\titem.start_date = getDefaultTaskDate(item, parent);\r\n\t\t}\r\n\t\tif (item.text === undefined) {\r\n\t\t\titem.text = gantt.locale.labels.new_task;\r\n\t\t}\r\n\t\tif (item.duration === undefined) {\r\n\t\t\titem.duration = 1;\r\n\t\t}\r\n\r\n\t\tif (this.isTaskExists(parent)) {\r\n\t\t\tthis.setParent(item, parent, true);\r\n\t\t\tvar parentObj = this.getTask(parent);\r\n\t\t\tparentObj.$open = true;\r\n\t\t}\r\n\r\n\t\tif (!this.callEvent(\"onTaskCreated\", [item])) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif (this.config.details_on_create) {\r\n\t\t\t//GS-761: assert unique ID\r\n\t\t\tif (gantt.isTaskExists(item.id)){\r\n\t\t\t\tvar task = gantt.getTask(item.id);\r\n\t\t\t\tif (task.$index != item.$index) {\r\n\t\t\t\t\t// Someone may try to mistakenly add a task with the same ID, and most likely\r\n\t\t\t\t\t// use the string format for the dates. Gantt shouldn't break in this scenario\r\n\t\t\t\t\tif (item.start_date && typeof item.start_date === \"string\"){\r\n\t\t\t\t\t\titem.start_date = this.date.parseDate(item.start_date, \"parse_date\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (item.end_date && typeof item.end_date === \"string\"){\r\n\t\t\t\t\t\titem.end_date = this.date.parseDate(item.end_date, \"parse_date\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.$data.tasksStore.updateItem(item.id, item);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\titem.$new = true;\r\n\t\t\t\tthis.silent(function(){\r\n\t\t\t\t\tgantt.$data.tasksStore.addItem(item, index);\r\n\t\t\t\t});\t\r\n\t\t\t}\r\n\t\t\tthis.selectTask(item.id);\r\n\t\t\tthis.refreshData();\r\n\t\t\tthis.showLightbox(item.id);\r\n\t\t} else {\r\n\t\t\tif (this.addTask(item, parent, index)) {\r\n\t\t\t\tthis.showTask(item.id);\r\n\t\t\t\tthis.selectTask(item.id);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn item.id;\r\n\t};\r\n\r\n\tgantt._update_flags = function (oldid, newid) {\r\n\t\t// TODO: need a proper way to update all possible flags\r\n\t\tvar store = gantt.$data.tasksStore;\r\n\t\tif (oldid === undefined) {\r\n\t\t\tthis._lightbox_id = null;\r\n\r\n\t\t\tstore.silent(function(){\r\n\t\t\t\tstore.unselect();\r\n\t\t\t});\r\n\t\t\t// GS-1522. If we have multiselect, unselect all previously selected tasks\r\n\t\t\tif (this.getSelectedTasks) {\r\n\t\t\t\tthis._multiselect.reset();\r\n\t\t\t}\r\n\r\n\t\t\tif (this._tasks_dnd && this._tasks_dnd.drag) {\r\n\t\t\t\tthis._tasks_dnd.drag.id = null;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (this._lightbox_id == oldid)\r\n\t\t\t\tthis._lightbox_id = newid;\r\n\r\n\t\t\t// TODO: probably can be removed\r\n\t\t\tif (store.getSelectedId() == oldid) {\r\n\t\t\t\tstore.silent(function(){\r\n\t\t\t\t\tstore.unselect(oldid);\r\n\t\t\t\t\tstore.select(newid);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tif (this._tasks_dnd && this._tasks_dnd.drag && this._tasks_dnd.drag.id == oldid) {\r\n\t\t\t\tthis._tasks_dnd.drag.id = newid;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tvar getTaskTimingMode = function (task, force) {\r\n\t\tvar task_type = gantt.getTaskType(task.type);\r\n\r\n\t\tvar state = {\r\n\t\t\ttype: task_type,\r\n\t\t\t$no_start: false,\r\n\t\t\t$no_end: false,\r\n\t\t\tscheduled_summary: false\r\n\t\t};\r\n\r\n\t\tif(task_type === gantt.config.types.project && task.auto_scheduling === false){\r\n\t\t\tstate.scheduled_summary = true;\r\n\t\t}\r\n\r\n\t\tif (!force && task_type == task.$rendered_type) {\r\n\t\t\tstate.$no_start = task.$no_start;\r\n\t\t\tstate.$no_end = task.$no_end;\r\n\t\t\treturn state;\r\n\t\t}\r\n\r\n\t\tif (task_type == gantt.config.types.project) {\r\n\t\t\t//project duration is always defined by children duration\r\n\t\t\tstate.$no_end = state.$no_start = true;\r\n\t\t} else if (task_type != gantt.config.types.milestone) {\r\n\t\t\t//tasks can have fixed duration, children duration(as projects), or one date fixed, and other defined by nested items\r\n\t\t\tstate.$no_end = !(task.end_date || task.duration);\r\n\t\t\tstate.$no_start = !task.start_date;\r\n\r\n\t\t\tif (gantt._isAllowedUnscheduledTask(task)) {\r\n\t\t\t\tstate.$no_end = state.$no_start = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn state;\r\n\t};\r\n\r\n\tgantt._init_task_timing = function (task) {\r\n\t\tvar task_mode = getTaskTimingMode(task, true);\r\n\r\n\t\tvar dirty = task.$rendered_type != task_mode.type;\r\n\r\n\t\tvar task_type = task_mode.type;\r\n\r\n\t\tif (dirty) {\r\n\t\t\ttask.$no_start = task_mode.$no_start;\r\n\t\t\ttask.$no_end = task_mode.$no_end;\r\n\t\t\ttask.$rendered_type = task_mode.type;\r\n\t\t}\r\n\r\n\t\tif (dirty && task_type != this.config.types.milestone) {\r\n\t\t\tif (task_type == this.config.types.project) {\r\n\t\t\t\t//project duration is always defined by children duration\r\n\t\t\t\tthis._set_default_task_timing(task);\r\n\t\t\t\ttask.$calculate_duration = false;// do not recalculate duration below\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (task_type == this.config.types.milestone) {\r\n\t\t\ttask.end_date = task.start_date;\r\n\t\t}\r\n\t\tif (task.start_date && task.end_date && task.$calculate_duration !== false) {\r\n\t\t\ttask.duration = this.calculateDuration(task);\r\n\t\t}\r\n\r\n\t\tif(!task.$calculate_duration){\r\n\t\t\ttask.$calculate_duration = true;\r\n\t\t}\r\n\r\n\t\tif (!task.end_date) {\r\n\t\t\ttask.end_date = task.start_date;\r\n\t\t}\r\n\r\n\t\ttask.duration = task.duration || 0;\r\n\t\t// GS-1145. We should let tasks to have 0 duration if user wants it\r\n\t\tif (this.config.min_duration === 0 && task.duration === 0){\r\n\t\t\ttask.$no_end = false;\r\n\t\t}\r\n\r\n\t\t// work calendar of task has changed\r\n\t\tvar effectiveCalendar = this.getTaskCalendar(task);\r\n\t\tif(task.$effective_calendar && task.$effective_calendar !== effectiveCalendar.id){\r\n\t\t\tupdateTaskTiming(task);\r\n\t\t\tif(this.config.inherit_calendar && this.isSummaryTask(task)){\r\n\t\t\t\tthis.eachTask(function(child){\r\n\t\t\t\t\tupdateTaskTiming(child);\r\n\t\t\t\t}, task.id);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttask.$effective_calendar = effectiveCalendar.id;\r\n\t};\r\n\r\n\tfunction updateTaskTiming(task) {\r\n\t\ttask.$effective_calendar = gantt.getTaskCalendar(task).id;\r\n\t\ttask.start_date = gantt.getClosestWorkTime({\r\n\t\t\tdir: \"future\",\r\n\t\t\tdate: task.start_date,\r\n\t\t\tunit: gantt.config.duration_unit,\r\n\t\t\ttask: task\r\n\t\t});\r\n\t\ttask.end_date = gantt.calculateEndDate(task);\r\n\t}\r\n\r\n\tgantt.isSummaryTask = function (task) {\r\n\t\tgantt.assert(task && task instanceof Object, \"Invalid argument task=\"+task+\" of gantt.isSummaryTask. Task object was expected\");\r\n\r\n\t\tvar mode = getTaskTimingMode(task);\r\n\r\n\t\treturn !!(mode.$no_end || mode.$no_start);\r\n\t};\r\n\r\n// downward calculation of project duration\r\n\tgantt.resetProjectDates = function (task) {\r\n\t\tvar taskMode = getTaskTimingMode(task);\r\n\t\tif (taskMode.$no_end || taskMode.$no_start) {\r\n\t\t\tvar info = getSubtaskInfo(task.id);\r\n\t\t\tassignProjectDates.call(this, task, taskMode, info.start_date, info.end_date);\r\n\t\t\ttask.$rollup = info.rollup;\r\n\t\t}\r\n\t};\r\n\r\n\tfunction assignProjectDates(task, taskTiming, from, to) {\r\n\r\n\t\tconst summaryDateFields = {\r\n\t\t\tstart: \"start_date\",\r\n\t\t\tend: \"end_date\"\r\n\t\t};\r\n\t\tconst manuallyScheduledSummaryDateFields = {\r\n\t\t\tstart: \"$auto_start_date\",\r\n\t\t\tend: \"$auto_end_date\"\r\n\t\t};\r\n\r\n\t\tlet dateFields;\r\n\t\tif(task.type === gantt.config.types.project && task.auto_scheduling === false){\r\n\t\t\tdateFields = manuallyScheduledSummaryDateFields;\r\n\t\t}else{\r\n\t\t\tdateFields = summaryDateFields;\r\n\t\t}\r\n\r\n\t\tif (taskTiming.$no_start) {\r\n\t\t\tif (from) {\r\n\t\t\t\ttask[dateFields.start] = new Date(from);\r\n\t\t\t} else {\r\n\t\t\t\ttask[dateFields.start] = getDefaultTaskDate(task, this.getParent(task));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (taskTiming.$no_end) {\r\n\t\t\tif (to) {\r\n\t\t\t\ttask[dateFields.end] = new Date(to);\r\n\t\t\t} else {\r\n\t\t\t\ttask[dateFields.end] = this.calculateEndDate({\r\n\t\t\t\t\tstart_date: task[dateFields.start],\r\n\t\t\t\t\tduration: this.config.duration_step,\r\n\t\t\t\t\ttask: task\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (taskTiming.$no_start || taskTiming.$no_end) {\r\n\t\t\tthis._init_task_timing(task);\r\n\t\t}\r\n\t}\r\n\r\n\tgantt.getSubtaskDuration = function (taskId) {\r\n\t\tvar res = 0,\r\n\t\t\troot = taskId !== undefined ? taskId : gantt.config.root_id;\r\n\r\n\t\tthis.eachTask(function (child) {\r\n\t\t\tif (this.getTaskType(child.type) == gantt.config.types.project || this.isUnscheduledTask(child))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tres += child.duration;\r\n\t\t}, root);\r\n\r\n\t\treturn res;\r\n\t};\r\n\r\n\tfunction getSubtaskInfo (taskId){\r\n\t\tvar min = null,\r\n\t\t\tmax = null,\r\n\t\t\troot = taskId !== undefined ? taskId : gantt.config.root_id,\r\n\t\t\trollup = [];\r\n\r\n\t\tgantt.eachTask(function (child) {\r\n\t\t\tconst isScheduledSummary = (gantt.getTaskType(child.type) == gantt.config.types.project && (child.auto_scheduling === false));\r\n\t\t\tif ((gantt.getTaskType(child.type) == gantt.config.types.project && !isScheduledSummary) || gantt.isUnscheduledTask(child))\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\tif(child.rollup){\r\n\t\t\t\trollup.push(child.id);\r\n\t\t\t}\r\n\r\n\t\t\tif ((child.start_date && (!child.$no_start || isScheduledSummary)) && (!min || min > child.start_date.valueOf()))\r\n\t\t\t\tmin = child.start_date.valueOf();\r\n\t\t\tif ((child.end_date && (!child.$no_end || isScheduledSummary)) && (!max || max < child.end_date.valueOf()))\r\n\t\t\t\tmax = child.end_date.valueOf();\r\n\t\t}, root);\r\n\r\n\t\treturn {\r\n\t\t\tstart_date: min ? new Date(min) : null,\r\n\t\t\tend_date: max ? new Date(max) : null,\r\n\t\t\trollup: rollup\r\n\t\t};\r\n\t}\r\n\r\n\tgantt.getSubtaskDates = function (task_id) {\r\n\t\tvar info = getSubtaskInfo(task_id);\r\n\t\treturn {\r\n\t\t\tstart_date: info.start_date,\r\n\t\t\tend_date: info.end_date\r\n\t\t};\r\n\t};\r\n\r\n\r\n// upward calculation of project duration\r\n\tgantt._update_parents = function (taskId, silent, updateAll) {\r\n\t\tif (!taskId) return;\r\n\r\n\t\tvar task = this.getTask(taskId);\r\n\t\tif(task.rollup){\r\n\t\t\tupdateAll = true;\r\n\t\t}\r\n\t\tvar pid = this.getParent(task);\r\n\r\n\t\tvar taskTiming = getTaskTimingMode(task);\r\n\r\n\t\tvar has_changed = true;\r\n\t\t// GS-761 the dates check is necessary for adding empty tasks: gantt.addTask({id:\"2\"})\r\n\t\tif (updateAll || (task.start_date && task.end_date && (taskTiming.$no_start || taskTiming.$no_end))) {\r\n\r\n\t\t\tconst startDateField = task.$auto_start_date ? \"$auto_start_date\" : \"start_date\";\r\n\t\t\tconst endDateField = task.$auto_end_date ? \"$auto_end_date\" : \"end_date\";\r\n\r\n\t\t\tvar oldStart = task[startDateField].valueOf(),\r\n\t\t\t\toldEnd = task[endDateField].valueOf();\r\n\r\n\t\t\tgantt.resetProjectDates(task);\r\n\r\n\t\t\t// not refresh parent projects if dates hasn't changed\r\n\t\t\tif (!updateAll && oldStart == task[startDateField].valueOf() && oldEnd == task[endDateField].valueOf()) {\r\n\t\t\t\thas_changed = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (has_changed && !silent) {\r\n\t\t\t\tthis.refreshTask(task.id, true);\r\n\t\t\t}\r\n\r\n\t\t\tif(taskTiming.scheduled_summary){\r\n\t\t\t\thas_changed = true;//recalculate upwards from scheduled summaries\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tif (has_changed && pid && this.isTaskExists(pid)) {\r\n\t\t\tthis._update_parents(pid, silent, updateAll);\r\n\t\t}\r\n\t};\r\n\r\n\tgantt.roundDate = function (config) {\r\n\t\tvar scale = gantt.getScale();\r\n\r\n\t\tif (helpers.isDate(config)) {\r\n\t\t\tconfig = {\r\n\t\t\t\tdate: config,\r\n\t\t\t\tunit: scale ? scale.unit : gantt.config.duration_unit,\r\n\t\t\t\tstep: scale ? scale.step : gantt.config.duration_step\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar date = config.date,\r\n\t\t\tsteps = config.step,\r\n\t\t\tunit = config.unit;\r\n\r\n\t\tif(!scale){\r\n\t\t\treturn date;\r\n\t\t}\r\n\r\n\t\tvar upper, lower, colIndex;\r\n\t\tif (unit == scale.unit && steps == scale.step &&\r\n\t\t\t+date >= +scale.min_date && +date <= +scale.max_date) {\r\n\t\t\t//find date in time scale config\r\n\t\t\tcolIndex = Math.floor(gantt.columnIndexByDate(date));\r\n\r\n\t\t\tif (!scale.trace_x[colIndex]) {\r\n\t\t\t\tcolIndex -= 1;// end of time scale\r\n\t\t\t\tif(scale.rtl){\r\n\t\t\t\t\tcolIndex = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlower = new Date(scale.trace_x[colIndex]);\r\n\t\t\tupper = gantt.date.add(lower, steps, unit);\r\n\t\t} else {\r\n\t\t\tcolIndex = Math.floor(gantt.columnIndexByDate(date));\r\n\r\n\t\t\tupper = gantt.date[unit + \"_start\"](new Date(scale.min_date));\r\n\t\t\tif (scale.trace_x[colIndex]) {\r\n\t\t\t\tupper = gantt.date[unit + \"_start\"](scale.trace_x[colIndex]);// end of time scale\r\n\t\t\t}\r\n\r\n\t\t\twhile (+upper < +date) {\r\n\t\t\t\tupper = gantt.date[unit + \"_start\"](gantt.date.add(upper, steps, unit));\r\n\r\n\t\t\t\tvar tzOffset = upper.getTimezoneOffset();\r\n\r\n\t\t\t\tupper = gantt._correct_dst_change(upper, tzOffset, upper, unit);\r\n\t\t\t\tif (gantt.date[unit + '_start'])\r\n\t\t\t\t\tupper = gantt.date[unit + '_start'](upper);\r\n\t\t\t}\r\n\r\n\t\t\tlower = gantt.date.add(upper, -1 * steps, unit);\r\n\r\n\t\t}\r\n\t\tif (config.dir && config.dir == 'future')\r\n\t\t\treturn upper;\r\n\t\tif (config.dir && config.dir == 'past')\r\n\t\t\treturn lower;\r\n\r\n\t\tif (Math.abs(date - lower) < Math.abs(upper - date)) {\r\n\t\t\treturn lower;\r\n\t\t} else {\r\n\t\t\treturn upper;\r\n\t\t}\r\n\r\n\t};\r\n\r\n\tgantt.correctTaskWorkTime = function (task) {\r\n\t\tif (gantt.config.work_time && gantt.config.correct_work_time) {\r\n\t\t\tif (!this.isWorkTime(task.start_date, undefined, task)) {\r\n\t\t\t\ttask.start_date = this.getClosestWorkTime({date: task.start_date, dir: 'future', task: task});\r\n\t\t\t\ttask.end_date = this.calculateEndDate(task);\r\n\t\t\t} else if (!this.isWorkTime(new Date(+task.end_date - 1), undefined, task)) {\r\n\t\t\t\ttask.end_date = this.calculateEndDate(task);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tgantt.attachEvent(\"onBeforeTaskUpdate\", function (id, task) {\r\n\t\tgantt._init_task_timing(task);\r\n\t\treturn true;\r\n\t});\r\n\tgantt.attachEvent(\"onBeforeTaskAdd\", function (id, task) {\r\n\t\tgantt._init_task_timing(task);\r\n\t\treturn true;\r\n\t});\r\n\r\n\tgantt.attachEvent(\"onAfterTaskMove\", function (id, parent, tindex) {\r\n\t\tgantt._init_task_timing(gantt.getTask(id));\r\n\t\treturn true;\r\n\t});\r\n\r\n};","function addResizeListener(gantt){\r\n\tvar containerStyles = window.getComputedStyle(gantt.$root);\r\n\tif(containerStyles.getPropertyValue(\"position\") == \"static\"){\r\n\t\tgantt.$root.style.position = \"relative\";\r\n\t}\r\n\r\n\tvar resizeWatcher = document.createElement('iframe');\r\n\tresizeWatcher.className = \"gantt_container_resize_watcher\";\r\n\tresizeWatcher.tabIndex = -1;\r\n\tif(gantt.config.wai_aria_attributes){\r\n\t\tresizeWatcher.setAttribute(\"role\", \"none\");\r\n\t\tresizeWatcher.setAttribute(\"aria-hidden\", true);\r\n\t}\r\n\r\n\tvar salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\r\n\tif (salesforce_environment){\r\n\t\tgantt.config.container_resize_method = \"timeout\";\r\n\t}\r\n\r\n\t// in some environments (namely, in SalesForce) iframe.contentWindow is not available\r\n\tgantt.$root.appendChild(resizeWatcher);\r\n\tif (resizeWatcher.contentWindow) {\r\n\t\tlistenWindowResize(gantt, resizeWatcher.contentWindow);\r\n\t} else {\r\n\t\t// if so - ditch the iframe and fallback to listening the main window resize\r\n\t\tgantt.$root.removeChild(resizeWatcher);\r\n\t\tlistenWindowResize(gantt, window);\r\n\t}\r\n}\r\n\r\nfunction listenWindowResize(gantt, window){\r\n\tvar resizeTimeout = gantt.config.container_resize_timeout || 20;\r\n\tvar resizeDelay;\r\n\tlet previousSize = getContainerSize(gantt);\r\n\r\n\tif (gantt.config.container_resize_method == \"timeout\"){\r\n\t\tlowlevelResizeWatcher();\r\n\t}\r\n\telse {\r\n\t\ttry {\r\n\t\t\tgantt.event(window, \"resize\", function () {\r\n\t\t\t\tif (gantt.$scrollbarRepaint) {\r\n\t\t\t\t\tgantt.$scrollbarRepaint = null;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// GS-2140. Don't repaint Gantt if it has the same sizes\r\n\t\t\t\t\tlet currentSize = getContainerSize(gantt);\r\n\t\t\t\t\tif (previousSize.x == currentSize.x && previousSize.y == currentSize.y){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpreviousSize = currentSize;\r\n\t\t\t\t\trepaintGantt();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\tcatch (e) {\r\n\t\t\tlowlevelResizeWatcher();\r\n\t\t}\r\n\t}\r\n\r\n\tfunction repaintGantt(){\r\n\t\tclearTimeout(resizeDelay);\r\n\t\tresizeDelay = setTimeout(function(){\r\n\t\t\tif(!gantt.$destroyed){\r\n\t\t\t\tgantt.render();\r\n\t\t\t}\r\n\t\t}, resizeTimeout);\r\n\t}\r\n\r\n\tvar previousHeight = gantt.$root.offsetHeight;\r\n\tvar previousWidth = gantt.$root.offsetWidth;\t\r\n\r\n\tfunction lowlevelResizeWatcher(){\r\n\t\tif (gantt.$root.offsetHeight != previousHeight ||\r\n\t\t\t\tgantt.$root.offsetWidth != previousWidth){\r\n\t\t\t\trepaintGantt();\r\n\t\t}\r\n\r\n\t\tpreviousHeight = gantt.$root.offsetHeight;\r\n\t\tpreviousWidth = gantt.$root.offsetWidth;\r\n\r\n\t\tsetTimeout(lowlevelResizeWatcher, resizeTimeout);\r\n\t}\r\n}\r\n\r\nfunction getContainerSize(gantt){\r\n\treturn {\r\n\t\tx: gantt.$root.offsetWidth,\r\n\t\ty: gantt.$root.offsetHeight\r\n\t};\r\n}\r\n\r\nexport default addResizeListener;","import * as domHelpers from \"./ui/utils/dom_helpers\";\r\nimport * as helpers from \"../utils/helpers\";\r\nimport isHeadless from \"../utils/is_headless\";\r\nimport addResizeListener from \"./ui/resize_listener\";\r\nimport calculateScaleRange from \"./gantt_data_range\";\r\nimport assert from \"./common/assert\";\r\n\r\nexport default function(gantt){\r\n\t\r\n\r\n\tgantt.assert = assert(gantt);\r\n\r\n\tfunction isHTMLElement(node){\r\n\t\ttry {\r\n\t\t\tnode.cloneNode(false);\r\n\t\t}\r\n\t\tcatch (e){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\r\n\t}\r\n\r\n\tvar invalidContainerMessage = \"Invalid value of the first argument of `gantt.init`. Supported values: HTMLElement, String (element id).\" +\r\n\t\"This error means that either invalid object is passed into `gantt.init` or that the element with the specified ID doesn't exist on the page when `gantt.init` is called.\";\r\n\r\n\tfunction validateNode(node){\r\n\t\tif (!node || (typeof node == 'string' && document.getElementById(node))) return true;\r\n\t\tif (isHTMLElement(node)) return true;\r\n\r\n\t\tgantt.assert(false, invalidContainerMessage);\r\n\t\tthrow new Error(invalidContainerMessage);\r\n\t}\r\n\r\n//initial initialization\r\n\tgantt.init = function(node, from, to){\r\n\t\tif (gantt.env.isNode) { \r\n\t\t\tnode = null; // for the nodejs version\r\n\t\t} else {\r\n\t\t\tvalidateNode(node); // for the web version\r\n\t\t}\r\n\r\n\t\tif(from && to){\r\n\t\t\tthis.config.start_date = this._min_date = new Date(from);\r\n\t\t\tthis.config.end_date = this._max_date = new Date(to);\r\n\t\t}\r\n\t\tthis.date.init();\r\n\r\n\t\t//can be called only once\r\n\t\tthis.init = function(node){\r\n\t\t\tif (gantt.env.isNode) { \r\n\t\t\t\tnode = null; // for the nodejs version\r\n\t\t\t} else {\r\n\t\t\t\tvalidateNode(node); // for the web version\r\n\t\t\t}\r\n\r\n\t\t\tif (this.$container && this.$container.parentNode){\r\n\t\t\t\tthis.$container.parentNode.removeChild(this.$container);\r\n\t\t\t\tthis.$container = null;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.$layout){\r\n\t\t\t\tthis.$layout.clear();\r\n\t\t\t}\r\n\t\t\tthis._reinit(node);\r\n\t\t};\r\n\t\tthis._reinit(node);\r\n\t};\r\n\r\n\tgantt._quickRefresh = function(code){\r\n\t\tvar stores = this._getDatastores.call(this);\r\n\t\tfor(var i = 0; i < stores.length; i++){\r\n\t\t\tstores[i]._quick_refresh = true;\r\n\t\t}\r\n\r\n\t\tcode();\r\n\r\n\t\tfor(var i = 0; i < stores.length; i++){\r\n\t\t\tstores[i]._quick_refresh = false;\r\n\t\t}\r\n\t};\r\n\r\n\tvar dropLayout = (function dropLayout(){\r\n\t\tif(this._clearTaskLayers){\r\n\t\t\tthis._clearTaskLayers();\r\n\t\t}\r\n\r\n\t\tif(this._clearLinkLayers){\r\n\t\t\tthis._clearLinkLayers();\r\n\t\t}\r\n\r\n\t\tif(this.$layout){\r\n\t\t\tthis.$layout.destructor();\r\n\t\t\tthis.$layout = null;\r\n\t\t\tthis.$ui.reset();\r\n\t\t}\r\n\t}).bind(gantt);\r\n\r\n\tvar rebuildLayout = (function rebuildLayout(){\r\n\t\tif(isHeadless(gantt)){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.$root.innerHTML = \"\";\r\n\r\n\t\tthis.$root.gantt = this;\r\n\t\tcalculateScaleRange(this);\r\n\t\tthis.config.layout.id = \"main\";\r\n\t\tthis.$layout = this.$ui.createView(\"layout\", this.$root, this.config.layout);\r\n\r\n\t\tthis.$layout.attachEvent(\"onBeforeResize\", function(){\r\n\t\t\tvar storeNames = gantt.$services.getService(\"datastores\");\r\n\t\t\tfor(var i = 0; i < storeNames.length; i++){\r\n\t\t\t\tgantt.getDatastore(storeNames[i]).filter();\r\n\t\t\t\tif (gantt.$data.tasksStore._skipTaskRecalculation){\r\n\t\t\t\t\t// do not repaint items, they will be repainted later in the onStoreUpdate event\r\n\t\t\t\t\tif (gantt.$data.tasksStore._skipTaskRecalculation != \"lightbox\"){\r\n\t\t\t\t\t\tgantt.$data.tasksStore._skipTaskRecalculation = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\tgantt.getDatastore(storeNames[i]).callEvent(\"onBeforeRefreshAll\", []);\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.$layout.attachEvent(\"onResize\", function(){\r\n\t\t\tgantt._quickRefresh(function(){\r\n\t\t\t\tgantt.refreshData();\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tthis.callEvent(\"onGanttLayoutReady\", []);\r\n\t\tthis.$layout.render();\r\n\r\n\t\tthis.$container = this.$layout.$container.firstChild;\r\n\r\n\t\taddResizeListener(this);\r\n\t}).bind(gantt);\r\n\r\n\tgantt.resetLayout = function(){\r\n\t\tdropLayout();\r\n\t\trebuildLayout();\r\n\t\tthis.render();\r\n\t};\r\n\r\n\tgantt._reinit = function(node){\r\n\t\tthis.callEvent(\"onBeforeGanttReady\", []);\r\n\t\tthis._update_flags();\r\n\r\n\t\tvar config = this.$services.getService(\"templateLoader\");\r\n\t\tconfig.initTemplates(this);\r\n\r\n\t\tdropLayout();\r\n\r\n\t\tthis.$root = null;\r\n\t\tif(node){\r\n\t\t\tthis.$root = domHelpers.toNode(node);\r\n\t\t\trebuildLayout();\r\n\t\t\tthis.$mouseEvents.reset(this.$root);\r\n\t\t\taddMinimalSizes(gantt);\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onTemplatesReady\",[]);\r\n\r\n\t\tthis.callEvent(\"onGanttReady\", []);\r\n\r\n\t\tthis.render();\r\n\t};\r\n\r\n\tfunction addMinimalSizes(gantt) {\r\n\t\tif (gantt.$container && !gantt.config.autosize) {\r\n\t\t\tif (gantt.$root.offsetHeight < 50) {\r\n\t\t\t\t// eslint-disable-next-line no-console\r\n\t\t\t\tconsole.warn(`The Gantt container has a small height, so you cannot see its content. If it is not intended, you need to set the 'height' style rule to the container:\r\nhttps://docs.dhtmlx.com/gantt/faq.html#theganttchartisntrenderedcorrectly`);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgantt.$click={\r\n\t\tbuttons:{\r\n\t\t\t\"edit\": function(id) {\r\n\t\t\t\tif (gantt.isReadonly(gantt.getTask(id))) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tgantt.showLightbox(id);\r\n\t\t\t},\r\n\t\t\t\"delete\": function(id) {\r\n\t\t\t\tvar task = gantt.getTask(id);\r\n\t\t\t\tif (gantt.isReadonly(task)) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar question = gantt.locale.labels.confirm_deleting;\r\n\t\t\t\tvar title = gantt.locale.labels.confirm_deleting_title;\r\n\r\n\t\t\t\tgantt._simple_confirm(question, title, function(){\r\n\t\t\t\t\tif(!gantt.isTaskExists(id)){\r\n\t\t\t\t\t\tgantt.hideLightbox();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(task.$new){\r\n\t\t\t\t\t\t// GS-2170. Do not recalculate the indexes and dates of other tasks\r\n\t\t\t\t\t\t// as they will be recalculated in the `refreshData`\r\n\t\t\t\t\t\tgantt.$data.tasksStore._skipTaskRecalculation = \"lightbox\";\r\n\t\t\t\t\t\tgantt.silent(function(){\r\n\t\t\t\t\t\t\tgantt.deleteTask(id, true);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tgantt.$data.tasksStore._skipTaskRecalculation = false;\r\n\t\t\t\t\t\tgantt.refreshData();\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tgantt.$data.tasksStore._skipTaskRecalculation = true;\r\n\t\t\t\t\t\tgantt.deleteTask(id);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tgantt.hideLightbox();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n//renders self\r\n\tgantt.render = function(){\r\n\t\tthis.callEvent(\"onBeforeGanttRender\", []);\r\n\r\n\t\tvar visibleDate;\r\n\t\tif(!isHeadless(gantt)){\r\n\t\t\tif (!this.config.sort && this._sort) {\r\n\t\t\t\tthis._sort = undefined;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.$root){\r\n\t\t\t\tif(this.config.rtl){\r\n\t\t\t\t\tthis.$root.classList.add(\"gantt_rtl\");\r\n\t\t\t\t\tthis.$root.firstChild.classList.add(\"gantt_rtl\"); // GS-1499\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.$root.classList.remove(\"gantt_rtl\");\r\n\t\t\t\t\tthis.$root.firstChild.classList.remove(\"gantt_rtl\"); // GS-1499\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar pos = this.getScrollState();\r\n\t\t\tvar posX = pos ? pos.x : 0;\r\n\t\t\tif(this._getHorizontalScrollbar()){\r\n\t\t\t\tvar scrollbar = this._getHorizontalScrollbar();\r\n\t\t\t\tposX = scrollbar.$config.codeScrollLeft || posX || 0;\r\n\t\t\t}\r\n\r\n\r\n\t\t\tvisibleDate = null;\r\n\t\t\tif(posX){\r\n\t\t\t\tvisibleDate = gantt.dateFromPos(posX + this.config.task_scroll_offset);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tcalculateScaleRange(this);\r\n\r\n\t\tif(!isHeadless(gantt)){\r\n\t\t\tthis.$layout.$config.autosize = this.config.autosize;\r\n\t\t\tvar preserveScroll = this.config.preserve_scroll;\r\n\t\t\tthis.config.preserve_scroll = false; // prevent scrolling from layout resize, scroll will be called here later on\r\n\t\t\tthis.$layout.resize();\r\n\t\t\tthis.config.preserve_scroll = preserveScroll;\r\n\r\n\t\t\tif(this.config.preserve_scroll && pos){\r\n\r\n\t\t\t\t// GS-1640: We need pos.y, otherwise part of the timeline won't be rendered if the scrollbar disappeared\r\n\t\t\t\tif (posX || pos.y) {\r\n\t\t\t\t\tvar new_pos = gantt.getScrollState();\r\n\t\t\t\t\tvar new_date = gantt.dateFromPos(new_pos.x);\r\n\t\t\t\t\tif(!(+visibleDate == +new_date && new_pos.y == pos.y)){\r\n\t\t\t\t\t\tvar posX = null;\r\n\t\t\t\t\t\tvar posY = null;\r\n\t\t\t\t\t\tif(visibleDate){\r\n\t\t\t\t\t\t\tvar posX = Math.max(gantt.posFromDate(visibleDate) - gantt.config.task_scroll_offset, 0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(pos.y){\r\n\t\t\t\t\t\t\tposY = pos.y;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tgantt.scrollTo(posX, posY);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// GS-1640: We need to reset the scroll position for the grid if the scrollbar disappeared and\r\n\t\t\t\t// the grid and timeline have different scrollbars\r\n\t\t\t\tvar gridCell = gantt.$ui.getView(\"grid\");\r\n\t\t\t\tif (gridCell) {\r\n\t\t\t\t\tvar attachedScrollbar = gridCell.$config.scrollY;\r\n\t\t\t\t\tvar verticalScrollbar = gantt.$ui.getView(attachedScrollbar);\r\n\t\t\t\t\tif (verticalScrollbar) {\r\n\t\t\t\t\t\tvar scrollbarNodeVisible = gantt.utils.dom.isChildOf(verticalScrollbar.$view, gantt.$container);\r\n\t\t\t\t\t\tif (!scrollbarNodeVisible) {\r\n\t\t\t\t\t\t\tgridCell.scrollTo(undefined, 0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tgantt.refreshData();\r\n\t\t}\r\n\t\tthis.callEvent(\"onGanttRender\", []);\r\n\t};\r\n\r\n\t//TODO: add layout.resize method that wouldn't trigger data repaint\r\n\tgantt.setSizes = gantt.render;\r\n\r\n\r\n\tgantt.getTaskRowNode = function(id) {\r\n\t\tvar els = this.$grid_data.childNodes;\r\n\t\tvar attribute = this.config.task_attribute;\r\n\t\tfor (var i = 0; i < els.length; i++) {\r\n\t\t\tif (els[i].getAttribute) {\r\n\t\t\t\tvar value = els[i].getAttribute(attribute);\r\n\t\t\t\tif (value == id) return els[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t};\r\n\r\n\tgantt.changeLightboxType = function(type){\r\n\t\tif(this.getLightboxType() == type)\r\n\t\t\treturn true;\r\n\t\tgantt._silent_redraw_lightbox(type);\r\n\t};\r\n\r\n\tgantt._get_link_type = function (from_start, to_start) {\r\n\t\tvar type = null;\r\n\t\tif (from_start && to_start) {\r\n\t\t\ttype = gantt.config.links.start_to_start;\r\n\t\t} else if (!from_start && to_start) {\r\n\t\t\ttype = gantt.config.links.finish_to_start;\r\n\t\t} else if (!from_start && !to_start) {\r\n\t\t\ttype = gantt.config.links.finish_to_finish;\r\n\t\t} else if (from_start && !to_start) {\r\n\t\t\ttype = gantt.config.links.start_to_finish;\r\n\t\t}\r\n\t\treturn type;\r\n\t};\r\n\r\n\tgantt.isLinkAllowed = function (from, to, from_start, to_start) {\r\n\t\tvar link = null;\r\n\t\tif (typeof(from) == \"object\") {\r\n\t\t\tlink = from;\r\n\t\t} else {\r\n\t\t\tlink = {source: from, target: to, type: this._get_link_type(from_start, to_start)};\r\n\t\t}\r\n\r\n\t\tif (!link) return false;\r\n\t\tif (!(link.source && link.target && link.type)) return false;\r\n\t\tif (link.source == link.target) return false;\r\n\r\n\t\tvar res = true;\r\n\t\t//any custom rules\r\n\t\tif (this.checkEvent(\"onLinkValidation\"))\r\n\t\t\tres = this.callEvent(\"onLinkValidation\", [link]);\r\n\r\n\t\treturn res;\r\n\t};\r\n\r\n\r\n\tgantt._correct_dst_change = function(date, prevOffset, step, unit){\r\n\t\tvar time_unit = helpers.getSecondsInUnit(unit) * step;\r\n\t\tif(time_unit > 60*60 && time_unit < 60*60*24){\r\n\t\t\t//correct dst change only if current unit is more than one hour and less than day (days have own checking), e.g. 12h\r\n\t\t\tvar offsetChanged = date.getTimezoneOffset() - prevOffset;\r\n\t\t\tif(offsetChanged){\r\n\t\t\t\tdate = gantt.date.add(date, offsetChanged, \"minute\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn date;\r\n\t};\r\n\r\n\tgantt.isSplitTask = function(task){\r\n\t\tgantt.assert(task && task instanceof Object, \"Invalid argument task=\"+task+\" of gantt.isSplitTask. Task object was expected\");\r\n\t\treturn this.$data.tasksStore._isSplitItem(task);\r\n\t};\r\n\r\n\tgantt._is_icon_open_click = function(e) {\r\n\t\tif (!e)\r\n\t\t\treturn false;\r\n\t\tvar target = e.target || e.srcElement;\r\n\t\tif (!(target && target.className))\r\n\t\t\treturn false;\r\n\t\tvar className = domHelpers.getClassName(target);\r\n\t\tif (className.indexOf(\"gantt_tree_icon\") !== -1 && (className.indexOf(\"gantt_close\") !== -1 || className.indexOf(\"gantt_open\") !== -1))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t};\r\n\r\n};","/*\r\n \tasserts will be removed in final code, so you can place them anythere\r\n\twithout caring about performance impacts\r\n*/\r\n\r\nexport default function(gantt){\r\n\treturn function assert(check, message){\r\n\t\tif (!check){\r\n\t\t\tif(gantt.config.show_errors && gantt.callEvent(\"onError\",[message]) !== false) {\r\n\t\t\t\tif (gantt.message) {\r\n\t\t\t\t\tgantt.message({type: \"error\", text: message, expire: -1});\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// eslint-disable-next-line\r\n\t\t\t\t\tconsole.log(message);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// eslint-disable-next-line no-debugger\r\n\t\t\t\tdebugger;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n};","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"مهمة جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"الغاء\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [\"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Новае заданне\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", // Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tsection_type: \"Тып\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"ІСР\",\r\n\t\tcolumn_text: \"Задача\",\r\n\t\tcolumn_start_date: \"Пачатак\",\r\n\t\tcolumn_duration: \"Працяг\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Сувязь\",\r\n\t\tconfirm_link_deleting: \"будзе выдалена\",\r\n\t\tlink_start: \"(пачатак)\",\r\n\t\tlink_end: \"(канец)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Хвiлiна\",\r\n\t\thours: \"Гадзiна\",\r\n\t\tdays: \"Дзень\",\r\n\t\tweeks: \"Тыдзень\",\r\n\t\tmonths: \"Месяц\",\r\n\t\tyears: \"Год\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Адмяніць\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nova tasca\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", // \"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel·lar\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\nTranslation by FreezeSoul\r\n\r\nUpdate 26/10/2015:\r\nTranslation of new labels by zwh8800\r\n https://github.com/DHTMLX/gantt/pull/7\r\n\r\n*/\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"新任務\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", // Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tsection_type: \"类型\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"工作分解结构\",\r\n\t\tcolumn_text: \"任务名\",\r\n\t\tcolumn_start_date: \"开始时间\",\r\n\t\tcolumn_duration: \"持续时间\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\r\n\t\tlink: \"关联\",\r\n\t\tconfirm_link_deleting: \"将被删除\",\r\n\t\tlink_start: \" (开始)\",\r\n\t\tlink_end: \" (结束)\",\r\n\r\n\t\ttype_task: \"任务\",\r\n\t\ttype_project: \"项目\",\r\n\t\ttype_milestone: \"里程碑\",\r\n\r\n\t\tminutes: \"分钟\",\r\n\t\thours: \"小时\",\r\n\t\tdays: \"天\",\r\n\t\tweeks: \"周\",\r\n\t\tmonths: \"月\",\r\n\t\tyears: \"年\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"关闭\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nová práce\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", // Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Zpět\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Ny opgave\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Fortryd\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Neue Aufgabe\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", // \"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"PSP\",\r\n\t\tcolumn_text: \"Task-Namen\",\r\n\t\tcolumn_start_date: \"Startzeit\",\r\n\t\tcolumn_duration: \"Dauer\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"werden gelöscht\",\r\n\t\tlink_start: \"(starten)\",\r\n\t\tlink_end: \"(ende)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minuten\",\r\n\t\thours: \"Stunden\",\r\n\t\tdays: \"Tage\",\r\n\t\tweeks: \"Wochen\",\r\n\t\tmonths: \"Monate\",\r\n\t\tyears: \"Jahre\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Abbrechen\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Regel\",\r\n\t\tconstraint_type: \"Regel\",\r\n\t\tconstraint_date: \"Regel - Datum\",\r\n\t\tasap: \"So bald wie möglich\",\r\n\t\talap: \"So spät wie möglich\",\r\n\t\tsnet: \"Beginn nicht vor\",\r\n\t\tsnlt: \"Beginn nicht später als\",\r\n\t\tfnet: \"Fertigstellung nicht vor\",\r\n\t\tfnlt: \"Fertigstellung nicht später als\",\r\n\t\tmso: \"Muss beginnen am\",\r\n\t\tmfo: \"Muss fertig sein am\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Κυριακή\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Νέα εργασία\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Άκυρο\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"New task\",\r\n\t\ticon_save: \"Save\",\r\n\t\ticon_cancel: \"Cancel\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Delete\",\r\n\t\tconfirm_closing: \"\",// Your changes will be lost, are you sure?\r\n\t\tconfirm_deleting: \"Task will be deleted permanently, are you sure?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Time period\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\r\n\t\t/* grid columns */\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n\r\n Update 30/10/2015:\r\n Translation of new labels by Jorge Macias\r\n https://disqus.com/by/disqus_bTuZk1voC7/\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nueva tarea\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", // \"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tsection_type: \"Tipo\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"EDT\",\r\n\t\tcolumn_text: \"Tarea\",\r\n\t\tcolumn_start_date: \"Inicio\",\r\n\t\tcolumn_duration: \"Duración\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Enlace\",\r\n\t\tconfirm_link_deleting: \"será borrada\",\r\n\t\tlink_start: \" (inicio)\",\r\n\t\tlink_end: \" (fin)\",\r\n\r\n\t\ttype_task: \"Tarea\",\r\n\t\ttype_project: \"Proyecto\",\r\n\t\ttype_milestone: \"Hito\",\r\n\r\n\r\n\t\tminutes: \"Minutos\",\r\n\t\thours: \"Horas\",\r\n\t\tdays: \"Días\",\r\n\t\tweeks: \"Semanas\",\r\n\t\tmonths: \"Meses\",\r\n\t\tyears: \"Años\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancelar\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n dhtmlxGantt Persian (Farsi, fa_IR) locale by Mohammad Shokri http://slashsbin.com/\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\r\n\t\t\t\"ژانویه\",\r\n\t\t\t\"فوریه\",\r\n\t\t\t\"مارس\",\r\n\t\t\t\"آوریل\",\r\n\t\t\t\"مه\",\r\n\t\t\t\"ژوئن\",\r\n\t\t\t\"ژوئیه\",\r\n\t\t\t\"اوت\",\r\n\t\t\t\"سپتامبر\",\r\n\t\t\t\"اکتبر\",\r\n\t\t\t\"نوامبر\",\r\n\t\t\t\"دسامبر\"\r\n\t\t],\r\n\t\tmonth_short: [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"],\r\n\t\tday_full: [\r\n\t\t\t\"يکشنبه\",\r\n\t\t\t\"دوشنبه\",\r\n\t\t\t\"سه‌شنبه\",\r\n\t\t\t\"چهارشنبه\",\r\n\t\t\t\"پنجشنبه\",\r\n\t\t\t\"جمعه\",\r\n\t\t\t\"شنبه\"\r\n\t\t],\r\n\t\tday_short: [\r\n\t\t\t\"ی\",\r\n\t\t\t\"د\",\r\n\t\t\t\"س\",\r\n\t\t\t\"چ\",\r\n\t\t\t\"پ\",\r\n\t\t\t\"ج\",\r\n\t\t\t\"ش\"\r\n\t\t]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"وظیفه جدید\",\r\n\t\ticon_save: \"ذخیره\",\r\n\t\ticon_cancel: \"لغو\",\r\n\t\ticon_details: \"جزییات\",\r\n\t\ticon_edit: \"ویرایش\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"تغییرات شما ازدست خواهد رفت، آیا مطمئن هستید؟\",\r\n\t\tconfirm_deleting: \"این مورد برای همیشه حذف خواهد شد، آیا مطمئن هستید؟\",\r\n\t\tsection_description: \"توضیحات\",\r\n\t\tsection_time: \"مدت زمان\",\r\n\t\tsection_type: \"نوع\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"عنوان\",\r\n\t\tcolumn_start_date: \"زمان شروع\",\r\n\t\tcolumn_duration: \"مدت\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"ارتباط\",\r\n\t\tconfirm_link_deleting: \"حذف خواهد شد\",\r\n\t\tlink_start: \" (آغاز)\",\r\n\t\tlink_end: \" (پایان)\",\r\n\r\n\t\ttype_task: \"وظیفه\",\r\n\t\ttype_project: \"پروژه\",\r\n\t\ttype_milestone: \"نگارش\",\r\n\r\n\t\tminutes: \"دقایق\",\r\n\t\thours: \"ساعات\",\r\n\t\tdays: \"روزها\",\r\n\t\tweeks: \"هفته\",\r\n\t\tmonths: \"ماه‌ها\",\r\n\t\tyears: \"سال‌ها\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"تایید\",\r\n\t\tmessage_cancel: \"لغو\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Uusi tehtävä\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Peru\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nouvelle tâche\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\",// Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"OTP\",\r\n\t\tcolumn_text: \"Nom de la tâche\",\r\n\t\tcolumn_start_date: \"Date initiale\",\r\n\t\tcolumn_duration: \"Durée\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Le lien\",\r\n\t\tconfirm_link_deleting: \"sera supprimé\",\r\n\t\tlink_start: \"(début)\",\r\n\t\tlink_end: \"(fin)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Heures\",\r\n\t\tdays: \"Jours\",\r\n\t\tweeks: \"Semaines\",\r\n\t\tmonths: \"Mois\",\r\n\t\tyears: \"Années\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Annuler\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"משימה חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"הסבר\",\r\n\t\tsection_time: \"תקופה\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"בטל\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n Translation by Davor\r\n http://docs.dhtmlx.com/gantt/desktop__localization.html#comment-2569116291\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Siječanj\", \"Veljača\", \"Ožujak\", \"Travanj\", \"Svibanj\", \"Lipanj\", \"Srpanj\", \"Kolovoz\", \"Rujan\", \"Listopad\", \"Studeni\", \"Prosinac\"],\r\n\t\tmonth_short: [\"Sij\", \"Velj\", \"Ožu\", \"Tra\", \"Svi\", \"Lip\", \"Srp\", \"Kol\", \"Ruj\", \"Lis\", \"Stu\", \"Pro\"],\r\n\t\tday_full: [\"Nedjelja\", \"Ponedjeljak\", \"Utorak\", \"Srijeda\", \"Četvrtak\", \"Petak\", \"Subota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Uto\", \"Sri\", \"Čet\", \"Pet\", \"Sub\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Novi Zadatak\",\r\n\t\ticon_save: \"Spremi\",\r\n\t\ticon_cancel: \"Odustani\",\r\n\t\ticon_details: \"Detalji\",\r\n\t\ticon_edit: \"Izmjeni\",\r\n\t\ticon_delete: \"Obriši\",\r\n\t\tconfirm_closing: \"\",\r\n\t\tconfirm_deleting: \"Zadatak će biti trajno izbrisan, jeste li sigurni?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Vremenski Period\",\r\n\t\tsection_type: \"Tip\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\r\n\t\t/* grid columns */\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Naziv Zadatka\",\r\n\t\tcolumn_start_date: \"Početno Vrijeme\",\r\n\t\tcolumn_duration: \"Trajanje\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Poveznica\",\r\n\t\tconfirm_link_deleting: \"će biti izbrisan\",\r\n\t\tlink_start: \" (početak)\",\r\n\t\tlink_end: \" (kraj)\",\r\n\r\n\t\ttype_task: \"Zadatak\",\r\n\t\ttype_project: \"Projekt\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\t\tminutes: \"Minute\",\r\n\t\thours: \"Sati\",\r\n\t\tdays: \"Dani\",\r\n\t\tweeks: \"Tjedni\",\r\n\t\tmonths: \"Mjeseci\",\r\n\t\tyears: \"Godine\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Odustani\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Új feladat\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", // A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Mégse\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Tugas baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /* Perubahan tidak akan disimpan ? */\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Batal\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n Update 29/12/2015:\r\n New labels translation by ARCANGELI CLAUDIO\r\n\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nuovo compito\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\",// \"Sei sicuro di confermare la chiusura?\",\r\n\t\tconfirm_deleting: \"Sei sicuro di confermare l'eliminazione?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tsection_type: \"Tipo\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Nome Attività\",\r\n\t\tcolumn_start_date: \"Inizio\",\r\n\t\tcolumn_duration: \"Durata\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"sarà eliminato\",\r\n\t\tlink_start: \" (inizio)\",\r\n\t\tlink_end: \" (fine)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minuti\",\r\n\t\thours: \"Ore\",\r\n\t\tdays: \"Giorni\",\r\n\t\tweeks: \"Settimane\",\r\n\t\tmonths: \"Mesi\",\r\n\t\tyears: \"Anni\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Chiudi\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"新しい仕事\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", // 変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"キャンセル\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n\tTranslated by cjkim@dbvalley.com\r\n*/\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"1월\", \"2월\", \"3월\", \"4월\", \"5월\", \"6월\", \"7월\", \"8월\", \"9월\", \"10월\", \"11월\", \"12월\"],\r\n\t\tmonth_short: [\"1월\", \"2월\", \"3월\", \"4월\", \"5월\", \"6월\", \"7월\", \"8월\", \"9월\", \"10월\", \"11월\", \"12월\"],\r\n\t\tday_full: [\"일요일\", \"월요일\", \"화요일\", \"수요일\", \"목요일\", \"금요일\", \"토요일\"],\r\n\t\tday_short: [\"일\", \"월\", \"화\", \"수\", \"목\", \"금\", \"토\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"이름없는 작업\",\r\n\t\ticon_save: \"저장\",\r\n\t\ticon_cancel: \"취소\",\r\n\t\ticon_details: \"세부 사항\",\r\n\t\ticon_edit: \"수정\",\r\n\t\ticon_delete: \"삭제\",\r\n\t\tconfirm_closing: \"\",\r\n\t\tconfirm_deleting: \"작업을 삭제하시겠습니까?\",\r\n\t\tsection_description: \"설명\",\r\n\t\tsection_time: \"기간\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"작업명\",\r\n\t\tcolumn_start_date: \"시작일\",\r\n\t\tcolumn_duration: \"기간\",\r\n\t\tcolumn_add: \"\",\r\n\t\tlink: \"전제\",\r\n\t\tconfirm_link_deleting: \"삭제 하시겠습니까?\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\t\ttype_task: \"작업\",\r\n\t\ttype_project: \"프로젝트\",\r\n\t\ttype_milestone: \"마일스톤\",\r\n\t\tminutes: \"분\",\r\n\t\thours: \"시간\",\r\n\t\tdays: \"일\",\r\n\t\tweeks: \"주\",\r\n\t\tmonths: \"달\",\r\n\t\tyears: \"년\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"취소\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","export default class LocaleManager{\r\n\tprivate _locales:{[key:string]: IGanttLocale };\r\n\r\n\tconstructor(config: {[key:string]: IGanttLocale }){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale = (name: string, locale: IGanttLocale) => {\r\n\t\tthis._locales[name] = locale;\r\n\t};\r\n\r\n\tgetLocale = (name: string): IGanttLocale => {\r\n\t\treturn this._locales[name];\r\n\t};\r\n}","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Ny oppgave\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Avbryt\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nieuwe taak\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Taak omschrijving\",\r\n\t\tcolumn_start_date: \"Startdatum\",\r\n\t\tcolumn_duration: \"Duur\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Koppeling\",\r\n\t\tconfirm_link_deleting: \"zal worden verwijderd\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (eind)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"minuten\",\r\n\t\thours: \"uren\",\r\n\t\tdays: \"dagen\",\r\n\t\tweeks: \"weken\",\r\n\t\tmonths: \"maanden\",\r\n\t\tyears: \"jaren\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Annuleren\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Ny oppgave\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", // Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Avbryt\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nowe zadanie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", // Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tsection_type: \"Typ\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Nazwa zadania\",\r\n\t\tcolumn_start_date: \"Początek\",\r\n\t\tcolumn_duration: \"Czas trwania\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"zostanie usunięty\",\r\n\t\tlink_start: \" (początek)\",\r\n\t\tlink_end: \" (koniec)\",\r\n\r\n\t\ttype_task: \"Zadanie\",\r\n\t\ttype_project: \"Projekt\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minuty\",\r\n\t\thours: \"Godziny\",\r\n\t\tdays: \"Dni\",\r\n\t\tweeks: \"Tydzień\",\r\n\t\tmonths: \"Miesiące\",\r\n\t\tyears: \"Lata\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Anuluj\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n\r\n Updated by Jorge Albernaz Martins\r\n\r\n jorgefox@hotmail.com\r\n\r\n www.redfox.inf.br\r\n\r\n JorgeFox\r\n\r\n*/\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nova tarefa\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Excluir\",\r\n\t\tconfirm_closing: \"\",// Suas alterações serão perdidas, confirme?\r\n\t\tconfirm_deleting: \"As tarefas serão excluidas permanentemente, confirme?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período\",\r\n\t\tsection_type: \"Tipo\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"EAP\",\r\n\t\tcolumn_text: \"Nome tarefa\",\r\n\t\tcolumn_start_date: \"Data início\",\r\n\t\tcolumn_duration: \"Duração\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"Será excluído!\",\r\n\t\tlink_start: \" (início)\",\r\n\t\tlink_end: \" (fim)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Projeto\",\r\n\t\ttype_milestone: \"Marco\",\r\n\r\n\r\n\t\tminutes: \"Minutos\",\r\n\t\thours: \"Horas\",\r\n\t\tdays: \"Dias\",\r\n\t\tweeks: \"Semanas\",\r\n\t\tmonths: \"Meses\",\r\n\t\tyears: \"Anos\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancelar\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Restrição\",\r\n\t\tconstraint_type: \"Tipo Restrição\",\r\n\t\tconstraint_date: \"Data restrição\",\r\n\t\tasap: \"Mais breve possível\",\r\n\t\talap: \"Mais tarde possível\",\r\n\t\tsnet: \"Não começar antes de\",\r\n\t\tsnlt: \"Não começar depois de\",\r\n\t\tfnet: \"Não terminar antes de\",\r\n\t\tfnlt: \"Não terminar depois de\",\r\n\t\tmso: \"Precisa começar em\",\r\n\t\tmfo: \"Precisa terminar em\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"Tipo de filtros\",\r\n\t\tresources_filter_label: \"Ocultar vazios\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short: [\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Sarcina noua\",\r\n\t\ticon_save: \"Salveaza\",\r\n\t\ticon_cancel: \"Anuleaza\",\r\n\t\ticon_details: \"Detalii\",\r\n\t\ticon_edit: \"Editeaza\",\r\n\t\ticon_delete: \"Sterge\",\r\n\t\tconfirm_closing: \"Schimbarile nu vor fi salvate, esti sigur?\",// Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description: \"Descriere\",\r\n\t\tsection_time: \"Interval\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Anuleaza\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Новое задание\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", // Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tsection_type: \"Тип\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"ИСР\",\r\n\t\tcolumn_text: \"Задача\",\r\n\t\tcolumn_start_date: \"Начало\",\r\n\t\tcolumn_duration: \"Длительность\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Связь\",\r\n\t\tconfirm_link_deleting: \"будет удалена\",\r\n\t\tlink_start: \" (начало)\",\r\n\t\tlink_end: \" (конец)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Минута\",\r\n\t\thours: \"Час\",\r\n\t\tdays: \"День\",\r\n\t\tweeks: \"Неделя\",\r\n\t\tmonths: \"Месяц\",\r\n\t\tyears: \"Год\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Отменить\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"начните вводить слово для фильтрации\",\r\n\t\tresources_filter_label: \"спрятать не установленные\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nova naloga\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", // Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Prekliči\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nová úloha\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", // Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\t\tsection_type: \"Type\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Späť\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n\tTranslation by Peter Eriksson\r\n */\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Ny uppgift\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detajer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\",\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tsection_type: \"Typ\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Uppgiftsnamn\",\r\n\t\tcolumn_start_date: \"Starttid\",\r\n\t\tcolumn_duration: \"Varaktighet\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\r\n\t\tlink: \"Länk\",\r\n\t\tconfirm_link_deleting: \"kommer tas bort\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (slut)\",\r\n\t\ttype_task: \"Uppgift\",\r\n\t\ttype_project: \"Projekt\",\r\n\t\ttype_milestone: \"Milstolpe\",\r\n\r\n\t\tminutes: \"Minuter\",\r\n\t\thours: \"Timmar\",\r\n\t\tdays: \"Dagar\",\r\n\t\tweeks: \"Veckor\",\r\n\t\tmonths: \"Månader\",\r\n\t\tyears: \"År\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Avbryt\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n * updated by @levkar at https://github.com/DHTMLX/gantt/pull/10\r\n */\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Şubat\", \"Mart\", \"Nisan\", \"Mayıs\", \"Haziran\", \"Temmuz\", \"Ağustos\", \"Eylül\", \"Ekim\", \"Kasım\", \"Aralık\"],\r\n\t\tmonth_short: [\"Oca\", \"Şub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Ağu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartesi\", \"Salı\", \"Çarşamba\", \"Perşembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pzt\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cmt\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Yeni görev\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"İptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Görev silinecek, emin misiniz?\",\r\n\t\tsection_description: \"Açıklama\",\r\n\t\tsection_time: \"Zaman Aralığı\",\r\n\t\tsection_type: \"Tip\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Görev Adı\",\r\n\t\tcolumn_start_date: \"Başlangıç\",\r\n\t\tcolumn_duration: \"Süre\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Bağlantı\",\r\n\t\tconfirm_link_deleting: \"silinecek\",\r\n\t\tlink_start: \" (başlangıç)\",\r\n\t\tlink_end: \" (bitiş)\",\r\n\r\n\t\ttype_task: \"Görev\",\r\n\t\ttype_project: \"Proje\",\r\n\t\ttype_milestone: \"Kilometretaşı\",\r\n\r\n\r\n\t\tminutes: \"Dakika\",\r\n\t\thours: \"Saat\",\r\n\t\tdays: \"Gün\",\r\n\t\tweeks: \"Hafta\",\r\n\t\tmonths: \"Ay\",\r\n\t\tyears: \"Yıl\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Ýptal\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Нове завдання\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", // Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tsection_type: \"Тип\",\r\n\t\tsection_deadline: \"Deadline\",\r\n\t\tsection_baselines: \"Baselines\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Відміна\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\",\r\n\r\n\t\t/* baselines control */\r\n\t\tbaselines_section_placeholder: \"Start adding a new baseline\",\r\n\t\tbaselines_add_button: \"Add Baseline\",\r\n\t\tbaselines_remove_button: \"Remove\",\r\n\t\tbaselines_remove_all_button: \"Remove All\",\r\n\r\n\t\t/* deadline control */\r\n\t\tdeadline_enable_button: \"Set\",\r\n\t\tdeadline_disable_button: \"Remove\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","import * as utils from \"../utils/utils\";\r\nimport constants from \"../constants\";\r\nimport ExtensionManager from \"../ext/extension_manager\";\r\n\r\nimport services from \"../core/common/services\";\r\nimport config from \"../core/common/config\";\r\nimport ajax from \"../core/common/ajax\";\r\nimport date from \"../core/common/date\";\r\nimport {remoteEvents} from \"../core/remote/remote_events\";\r\n\r\nimport DnD from \"../core/common/dnd\";\r\nimport templates from \"../core/common/templates\";\r\nimport eventable from \"../utils/eventable\";\r\n\r\nimport StateService from \"../core/common/state\";\r\n\r\nimport Promise from \"../utils/promise\";\r\nimport env from \"../utils/env\";\r\nimport datastoreHooks from \"../core/datastore/datastore_hooks\";\r\nimport DataProcessor from \"../core/dataprocessor\";\r\n\r\nimport plugins from \"../core/plugins\";\r\n\r\nimport grid_column_api from \"../core/grid_column_api\";\r\nimport tasks from \"../core/tasks\";\r\nimport parsing from \"../core/loading/parsing\";\r\nimport work_time from \"../core/worktime/work_time\";\r\nimport data from \"../core/data\";\r\n\r\nimport void_script_second from \"../publish_helpers/void_script_second\";\r\n\r\nimport data_task_types from \"../core/data_task_types\";\r\nimport cached_functions from \"../core/cached_functions\";\r\n\r\nimport gantt_core from \"../core/gantt_core\";\r\nimport destructor from \"../core/destructor\";\r\nimport void_script_third from \"../publish_helpers/void_script_third\";\r\n\r\nimport i18nFactory from \"../locale\";\r\n\r\nfunction DHXGantt(){\r\n\tthis.constants = constants;\r\n\tthis.version = VERSION;\r\n\tthis.license = LICENSE;\r\n\tthis.templates = {};\r\n\tthis.ext = {};\r\n\tthis.keys = {\r\n\t\tedit_save: this.constants.KEY_CODES.ENTER,\r\n\t\tedit_cancel: this.constants.KEY_CODES.ESC\r\n\t};\r\n}\r\n\r\nexport default function(supportedExtensions) {\r\n\t// use a named constructor to make gantt instance discoverable in heap snapshots\r\n\tvar gantt = new DHXGantt();\r\n\r\n\tvar extensionManager = new ExtensionManager(supportedExtensions);\r\n\tvar activePlugins = {};\r\n\tgantt.plugins = function(config){\r\n\t\tfor(var i in config){\r\n\t\t\tif(config[i] && !activePlugins[i]){\r\n\t\t\t\tvar plugin = extensionManager.getExtension(i);\r\n\t\t\t\tif(plugin){\r\n\t\t\t\t\tplugin(gantt);\r\n\t\t\t\t\tactivePlugins[i] = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn activePlugins;\r\n\t};\r\n\r\n\tgantt.$services = services();\r\n\tgantt.config = config();\r\n\tgantt.ajax = ajax(gantt);\r\n\tgantt.date = date(gantt);\r\n\tgantt.RemoteEvents = remoteEvents;\r\n\r\n\tvar dnd = DnD(gantt);\r\n\tgantt.$services.setService(\"dnd\", function(){return dnd;});\r\n\r\n\tvar templatesLoader = templates(gantt);\r\n\tgantt.$services.setService(\"templateLoader\", function () {\r\n\t\treturn templatesLoader;\r\n\t});\r\n\r\n\teventable(gantt);\r\n\r\n\t\r\n\tvar stateService = new StateService();\r\n\r\n\tstateService.registerProvider(\"global\", function () {\r\n\t\tvar res = {\r\n\t\t\tmin_date: gantt._min_date,\r\n\t\t\tmax_date: gantt._max_date,\r\n\t\t\tselected_task: null\r\n\t\t};\r\n\r\n\t\t// do not throw error if getState called from non-initialized gantt\r\n\t\tif(gantt.$data && gantt.$data.tasksStore){\r\n\t\t\tres.selected_task = gantt.$data.tasksStore.getSelectedId();\r\n\t\t}\r\n\t\treturn res;\r\n\t});\r\n\tgantt.getState = stateService.getState;\r\n\tgantt.$services.setService(\"state\", function () {\r\n\t\treturn stateService;\r\n\t});\r\n\r\n\tutils.mixin(gantt, utils);\r\n\r\n\tgantt.Promise = Promise;\r\n\tgantt.env = env;\r\n\r\n\tdatastoreHooks(gantt);\r\n\r\n\tgantt.dataProcessor = DataProcessor.DEPRECATED_api;\r\n\tgantt.createDataProcessor = DataProcessor.createDataProcessor;\r\n\r\n\tplugins(gantt);\r\n\r\n\tgrid_column_api(gantt);\r\n\ttasks(gantt);\r\n\tparsing(gantt);\r\n\twork_time(gantt);\r\n\tdata(gantt);\r\n\r\n\tvoid_script_second(gantt);\r\n\r\n\tdata_task_types(gantt);\r\n\tcached_functions(gantt);\r\n\r\n\tgantt_core(gantt);\r\n\tdestructor(gantt);\r\n\tvoid_script_third(gantt);\r\n\r\n\tvar i18n = i18nFactory();\r\n\tgantt.i18n = {\r\n\t\taddLocale: i18n.addLocale,\r\n\t\tsetLocale: function(locale){\r\n\t\t\tif(typeof locale === \"string\"){\r\n\t\t\t\tvar localeObject = i18n.getLocale(locale);\r\n\t\t\t\tif(!localeObject){\r\n\t\t\t\t\tlocaleObject = i18n.getLocale(\"en\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tgantt.locale = localeObject;\r\n\t\t\t}else if(locale){\r\n\t\t\t\tif(!gantt.locale){\r\n\t\t\t\t\tgantt.locale = locale;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(var i in locale){\r\n\t\t\t\t\t\tif(locale[i] && typeof locale[i] === \"object\"){\r\n\t\t\t\t\t\t\tif(!gantt.locale[i]){\r\n\t\t\t\t\t\t\t\tgantt.locale[i] = {};\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tgantt.mixin(gantt.locale[i], locale[i], true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tgantt.locale[i] = locale[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetLocale: i18n.getLocale\r\n\t};\r\n\tgantt.i18n.setLocale(\"en\");\r\n\treturn gantt;\r\n};","export default function(){\r\n\tvar services = {};\r\n\tfunction register (name, getter){\r\n\t\tservices[name] = getter;\r\n\t}\r\n\r\n\tfunction getService(name){\r\n\t\tif(!services[name]){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn services[name]();\r\n\t}\r\n\r\n\tfunction dropService(name) {\r\n\t\tif (services[name]) {\r\n\t\t\tdelete services[name];\r\n\t\t}\r\n\t}\r\n\r\n\tvar servicesEnum = {};\r\n\r\n\treturn {\r\n\t\tservices: servicesEnum,\r\n\t\tsetService: register,\r\n\t\tgetService: getService,\r\n\t\tdropService: dropService,\r\n\t\tdestructor: function(){\r\n\t\t\tfor(var i in services){\r\n\t\t\t\tif(services[i]){\r\n\t\t\t\t\tvar service = services[i];\r\n\t\t\t\t\tif(service && service.destructor){\r\n\t\t\t\t\t\tservice.destructor();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tservices = null;\r\n\t\t}\r\n\t};\r\n};\r\n","import eventable from \"../../utils/eventable\";\r\nimport * as utils from \"../../utils/utils\";\r\nimport timeout from \"../../utils/timeout\";\r\nimport global from \"../../utils/global\";\r\nimport * as domHelpers from \"../ui/utils/dom_helpers\";\r\n\r\nexport default function(gantt){\r\n\r\n\tfunction copyDomEvent(e){\r\n\t\treturn {\r\n\t\t\ttarget: e.target || e.srcElement,\r\n\t\t\tpageX: e.pageX,\r\n\t\t\tpageY: e.pageY,\r\n\t\t\tclientX: e.clientX,\r\n\t\t\tclientY: e.clientY,\r\n\t\t\tmetaKey: e.metaKey,\r\n\t\t\tshiftKey: e.shiftKey,\r\n\t\t\tctrlKey: e.ctrlKey,\r\n\t\t\taltKey: e.altKey\r\n\t\t};\r\n\t}\r\n\r\n\tfunction DnD(obj, config) {\r\n\t\tthis._obj = obj;\r\n\t\tthis._settings = config || {};\r\n\t\teventable(this);\r\n\r\n\t\tvar inputMethods = this.getInputMethods();\r\n\r\n\t\tthis._drag_start_timer = null;\r\n\t\tgantt.attachEvent(\"onGanttScroll\", utils.bind(function (left, top) {\r\n\t\t\tthis.clearDragTimer();\r\n\t\t}, this));\r\n\r\n\t\tvar lastDown = 0;\r\n\t\tvar eventParams = {passive: false};\r\n\t\tfor(var i = 0; i < inputMethods.length; i++){\r\n\t\t\t(utils.bind(function(input){\r\n\r\n\t\t\t\tgantt.event(obj, input.down, utils.bind(function (e) {\r\n\t\t\t\t\tif(!input.accessor(e)){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(config.preventDefault && config.selector && domHelpers.closest(e.target, config.selector)){\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (gantt.config.touch && e.timeStamp && e.timeStamp - lastDown < 300) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis._settings.original_target = copyDomEvent(e);\r\n\r\n\t\t\t\t\tthis._settings.original_element_sizes = {\r\n\t\t\t\t\t\t...domHelpers.getRelativeNodePosition(e.target, domHelpers.getClosestSizedElement(obj)), \r\n\t\t\t\t\t\twidth: e.target.offsetWidth,\r\n\t\t\t\t\t\theight: e.target.offsetHeight\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif (gantt.config.touch) {\r\n\t\t\t\t\t\tthis.clearDragTimer();\r\n\t\t\t\t\t\tthis._drag_start_timer = setTimeout(utils.bind(function () {\r\n\t\t\t\t\t\t\tif(gantt.getState().lightbox){\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tthis.dragStart(obj, e, input);\r\n\t\t\t\t\t\t}, this), gantt.config.touch_drag);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis.dragStart(obj, e, input);\r\n\t\t\t\t\t}\r\n\t\t\t\t}, this), eventParams);\r\n\t\t\t\tvar eventElement = document.body;\r\n\t\t\t\tgantt.event(eventElement, input.up, utils.bind(function (e) {\r\n\t\t\t\t\tif(!input.accessor(e)){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.clearDragTimer();\r\n\t\t\t\t}, this), eventParams);\r\n\r\n\t\t\t}, this))(inputMethods[i]);\r\n\t\t}\r\n\t}\r\n\r\n\tDnD.prototype = {\r\n\t\ttraceDragEvents: function (domElement, inputMethod) {\r\n\t\t\tvar mousemove = utils.bind(function (e) {\r\n\t\t\t\treturn this.dragMove(domElement, e, inputMethod.accessor);\r\n\t\t\t}, this);\r\n\t\t\tutils.bind(function (e) {\r\n\t\t\t\treturn this.dragScroll(domElement, e);\r\n\t\t\t}, this);\r\n\r\n\t\t\tvar limited_mousemove = utils.bind(function (e) {\r\n\t\t\t\tif (this.config.started && utils.defined(this.config.updates_per_second)) {\r\n\t\t\t\t\tif (!timeout(this, this.config.updates_per_second))\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar dndActive = mousemove(e);\r\n\r\n\t\t\t\tif (dndActive) {\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tif (e && e.preventDefault && e.cancelable){//e.cancelable condition - because navigator.vibrate is blocked by Chrome\r\n\t\t\t\t\t\t\te.preventDefault();//Cancel default action on DND\r\n\t\t\t\t\t\t} //Cancel default action on DND\r\n\t\t\t\t\t}catch (e){\r\n\t\t\t\t\t\t// just suppress the exception, nothing needed to be done here\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//e.cancelBubble = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn dndActive;\r\n\t\t\t}, this);\r\n\t\t\tvar eventElement = domHelpers.getRootNode(gantt.$root);\r\n\t\t\tvar mousemoveContainer = this.config.mousemoveContainer || domHelpers.getRootNode(gantt.$root);\r\n\r\n\t\t\tvar eventParams = {passive: false};\r\n\t\t\tvar mouseup = utils.bind(function (e) {\r\n\t\t\t\tgantt.eventRemove(mousemoveContainer, inputMethod.move, limited_mousemove);\r\n\t\t\t\tgantt.eventRemove(eventElement, inputMethod.up, mouseup, eventParams);\r\n\t\t\t\treturn this.dragEnd(domElement);\r\n\t\t\t}, this);\r\n\r\n\t\t\tgantt.event(mousemoveContainer, inputMethod.move, limited_mousemove, eventParams);\r\n\t\t\tgantt.event(eventElement, inputMethod.up, mouseup, eventParams);\r\n\t\t},\r\n\t\tcheckPositionChange: function (pos) {\r\n\t\t\tvar diff_x = pos.x - this.config.pos.x;\r\n\t\t\tvar diff_y = pos.y - this.config.pos.y;\r\n\t\t\tvar distance = Math.sqrt(Math.pow(Math.abs(diff_x), 2) + Math.pow(Math.abs(diff_y), 2));\r\n\r\n\t\t\tif (distance > this.config.sensitivity) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\t\tinitDnDMarker: function () {\r\n\t\t\t// create dnd placeholder and put it in dom\r\n\t\t\tvar marker = this.config.marker = document.createElement(\"div\");\r\n\t\t\tmarker.className = \"gantt_drag_marker\";\r\n\t\t\t// GS-1333: don't show any message when we resize grid columns\r\n\t\t\tmarker.innerHTML = \"\";\r\n\t\t\tdocument.body.appendChild(marker);\r\n\t\t},\r\n\t\tbackupEventTarget: function (domEvent, getEvent) {\r\n\t\t\tif (!gantt.config.touch) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// keep original event target in DOM in order to keep dnd on touchmove event\r\n\t\t\tvar e = getEvent(domEvent);\r\n\r\n\t\t\tvar el = e.target || e.srcElement;\r\n\t\t\tvar copy = el.cloneNode(true);\r\n\t\t\t//this.config.target.target = copy;\r\n\t\t\tthis.config.original_target = copyDomEvent(e);\r\n\t\t\tthis.config.original_target.target = copy;\r\n\t\t\tthis.config.backup_element = el;\r\n\t\t\tel.parentNode.appendChild(copy);\r\n\r\n\t\t\tel.style.display = \"none\";\r\n\t\t\tvar mousemoveContainer = this.config.mousemoveContainer || document.body;\r\n\t\t\tmousemoveContainer.appendChild(el);\r\n\t\t},\r\n\t\tgetInputMethods: function () {\r\n\t\t\t// bind actions to browser events\r\n\t\t\tvar inputMethods = [];\r\n\r\n\t\t\tinputMethods.push({\r\n\t\t\t\t\"move\": \"mousemove\",\r\n\t\t\t\t\"down\": \"mousedown\",\r\n\t\t\t\t\"up\": \"mouseup\",\r\n\t\t\t\t\"accessor\": function (e) {\r\n\t\t\t\t\treturn e;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (gantt.config.touch) {\r\n\r\n\t\t\t\tvar touchEventsSupported = true;\r\n\t\t\t\ttry{\r\n\t\t\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t\t\t}catch (e){\r\n\t\t\t\t\ttouchEventsSupported = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(touchEventsSupported){\r\n\t\t\t\t\tinputMethods.push({\r\n\t\t\t\t\t\t\"move\": \"touchmove\",\r\n\t\t\t\t\t\t\"down\": \"touchstart\",\r\n\t\t\t\t\t\t\"up\": \"touchend\",\r\n\t\t\t\t\t\t\"accessor\": function (ev) {\r\n\t\t\t\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\t\t\ttarget: document.elementFromPoint(ev.touches[0].clientX, ev.touches[0].clientY),\r\n\t\t\t\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\treturn ev;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else if(global.navigator.pointerEnabled){\r\n\t\t\t\t\tinputMethods.push({\r\n\t\t\t\t\t\t\"move\": \"pointermove\",\r\n\t\t\t\t\t\t\"down\": \"pointerdown\",\r\n\t\t\t\t\t\t\"up\": \"pointerup\",\r\n\t\t\t\t\t\t\"accessor\": function (ev) {\r\n\t\t\t\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\t\t\t\treturn ev;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}else if (global.navigator.msPointerEnabled){\r\n\t\t\t\t\tinputMethods.push({\r\n\t\t\t\t\t\t\"move\": \"MSPointerMove\",\r\n\t\t\t\t\t\t\"down\": \"MSPointerDown\",\r\n\t\t\t\t\t\t\"up\": \"MSPointerUp\",\r\n\t\t\t\t\t\t\"accessor\": function (ev) {\r\n\t\t\t\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\t\t\t\treturn ev;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn inputMethods;\r\n\t\t},\r\n\t\tclearDragTimer: function () {\r\n\t\t\tif (this._drag_start_timer) {\r\n\t\t\t\tclearTimeout(this._drag_start_timer);\r\n\t\t\t\tthis._drag_start_timer = null;\r\n\t\t\t}\r\n\t\t},\r\n\t\tdragStart: function (obj, e, inputMethod) {\r\n\t\t\tif (this.config && this.config.started) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.config = {\r\n\t\t\t\tobj: obj,\r\n\t\t\t\tmarker: null,\r\n\t\t\t\tstarted: false,\r\n\t\t\t\tpos: this.getPosition(e),\r\n\t\t\t\tsensitivity: 4\r\n\t\t\t};\r\n\t\t\tif (this._settings)\r\n\t\t\t\tutils.mixin(this.config, this._settings, true);\r\n\r\n\r\n\t\t\tthis.traceDragEvents(obj, inputMethod);\r\n\r\n\t\t\tgantt._prevent_touch_scroll = true;\r\n\t\t\tdocument.body.className += \" gantt_noselect\";\r\n\r\n\t\t\tif (gantt.config.touch) {\r\n\t\t\t\tthis.dragMove(obj, e, inputMethod.accessor);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tdragMove: function (obj, e, getEvent) {\r\n\t\t\tvar source = getEvent(e);\r\n\t\t\tif (!source) return false;\r\n\r\n\t\t\tif (!this.config.marker && !this.config.started) {\r\n\t\t\t\tvar pos = this.getPosition(source);\r\n\r\n\t\t\t\tif (gantt.config.touch || this.checkPositionChange(pos)) {\r\n\t\t\t\t\t// real drag starts here,\r\n\t\t\t\t\t// when user moves mouse at first time after onmousedown\r\n\t\t\t\t\tthis.config.started = true;\r\n\t\t\t\t\tthis.config.ignore = false;\r\n\t\t\t\t\tgantt._touch_drag = true;\r\n\t\t\t\t\tif (this.callEvent(\"onBeforeDragStart\", [obj, this.config.original_target]) === false) {\r\n\t\t\t\t\t\tthis.config.ignore = true;\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.backupEventTarget(e, getEvent);\r\n\t\t\t\t\tthis.initDnDMarker();\r\n\t\t\t\t\tgantt._touch_feedback();\r\n\t\t\t\t\tthis.callEvent(\"onAfterDragStart\", [obj, this.config.original_target]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.config.ignore = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!this.config.ignore) {\r\n\t\t\t\t// GS-1279 Gantt crashes on Mobile Firefox after starting to create a link and moving finger outisde the page.\r\n\t\t\t\tif (e.targetTouches && !source.target) return;\r\n\t\t\t\t\r\n\t\t\t\tsource.pos = this.getPosition(source);\r\n\t\t\t\tthis.config.marker.style.left = source.pos.x + \"px\";\r\n\t\t\t\tthis.config.marker.style.top = source.pos.y + \"px\";\r\n\t\t\t\tthis.callEvent(\"onDragMove\", [obj, source]);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\r\n\t\tdragEnd: function (obj) {\r\n\t\t\tvar target = this.config.backup_element;\r\n\t\t\tif (target && target.parentNode) {\r\n\t\t\t\ttarget.parentNode.removeChild(target);\r\n\t\t\t}\r\n\t\t\tgantt._prevent_touch_scroll = false;\r\n\t\t\tif (this.config.marker) {\r\n\t\t\t\tthis.config.marker.parentNode.removeChild(this.config.marker);\r\n\t\t\t\tthis.config.marker = null;\r\n\r\n\t\t\t\tthis.callEvent(\"onDragEnd\", []);\r\n\t\t\t}\r\n\t\t\tthis.config.started = false;\r\n\t\t\tgantt._touch_drag = false;\r\n\t\t\tdocument.body.className = document.body.className.replace(\" gantt_noselect\", \"\");\r\n\t\t},\r\n\r\n\t\tgetPosition: function (e) {\r\n\t\t\tvar x = 0, y = 0;\r\n\t\t\tif (e.pageX || e.pageY) {\r\n\t\t\t\tx = e.pageX;\r\n\t\t\t\ty = e.pageY;\r\n\t\t\t} else if (e.clientX || e.clientY) {\r\n\t\t\t\tx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;\r\n\t\t\t\ty = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;\r\n\t\t\t}\r\n\t\t\treturn {x: x, y: y};\r\n\t\t}\r\n\t};\r\n\r\n\treturn DnD;\r\n};\r\n","export default function(gantt) {\r\n\r\n\tvar regTemplates = {};\r\n\r\n\tfunction initTemplate(name, initial, template_name) {\r\n\t\ttemplate_name = template_name || name;\r\n\t\tvar config = gantt.config,\r\n\t\t\ttemplates = gantt.templates;\r\n\r\n\t\tif (gantt.config[name] && regTemplates[template_name] != config[name]) {\r\n\t\t\tif (!(initial && templates[template_name])) {\r\n\t\t\t\ttemplates[template_name] = gantt.date.date_to_str(config[name]);\r\n\t\t\t\tregTemplates[template_name] = config[name];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction initTemplates() {\r\n\t\tvar labels = gantt.locale.labels;\r\n\t\tlabels.gantt_save_btn = labels.icon_save;\r\n\t\tlabels.gantt_cancel_btn = labels.icon_cancel;\r\n\t\tlabels.gantt_delete_btn = labels.icon_delete;\r\n\r\n\r\n\t\tvar date = gantt.date;\r\n\r\n\t\t//build configuration based templates\r\n\t\tvar d = date.date_to_str;\r\n\t\tvar c = gantt.config;\r\n\t\tvar format_date = d(c.xml_date || c.date_format, c.server_utc);\r\n\t\tvar parse_date = date.str_to_date(c.xml_date || c.date_format, c.server_utc);\r\n\r\n\t\tinitTemplate(\"date_scale\", true, undefined, gantt.config, gantt.templates);\r\n\t\tinitTemplate(\"date_grid\", true, \"grid_date_format\", gantt.config, gantt.templates);\r\n\t\tinitTemplate(\"task_date\", true, undefined, gantt.config, gantt.templates);\r\n\r\n\t\tgantt.mixin(gantt.templates, {\r\n\t\t\txml_format: undefined, // deprecated\r\n\t\t\tformat_date: format_date,\r\n\r\n\t\t\txml_date: undefined, // deprecated\r\n\t\t\tparse_date: parse_date,\r\n\r\n\t\t\tprogress_text: function (start, end, task) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t},\r\n\t\t\tgrid_header_class: function (column, config) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t},\r\n\r\n\t\t\ttask_text: function (start, end, task) {\r\n\t\t\t\treturn task.text;\r\n\t\t\t},\r\n\t\t\ttask_class: function (start, end, task) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t},\r\n\t\t\ttask_end_date: function (date) {\r\n\t\t\t\treturn gantt.templates.task_date(date);\r\n\t\t\t},\r\n\t\t\tgrid_row_class: function (start, end, task) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t},\r\n\t\t\ttask_row_class: function (start, end, task) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t},\r\n\t\t\ttimeline_cell_class: function (item, date) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t},\r\n\t\t\ttimeline_cell_content: function (item, date) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t},\r\n\t\t\tscale_cell_class: function (date) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t},\r\n\t\t\tscale_row_class: function (date) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t},\r\n\r\n\t\t\tgrid_indent: function (item) {\r\n\t\t\t\treturn \"
\";\r\n\t\t\t},\r\n\t\t\tgrid_folder: function (item) {\r\n\t\t\t\treturn \"
\";\r\n\t\t\t},\r\n\t\t\tgrid_file: function (item) {\r\n\t\t\t\treturn \"
\";\r\n\t\t\t},\r\n\t\t\tgrid_open: function (item) {\r\n\t\t\t\treturn \"
\";\r\n\t\t\t},\r\n\t\t\tgrid_blank: function (item) {\r\n\t\t\t\treturn \"
\";\r\n\t\t\t},\r\n\t\t\tdate_grid: function (date, item, column) {\r\n\t\t\t\tif (item && gantt.isUnscheduledTask(item) && gantt.config.show_unscheduled) {\r\n\t\t\t\t\treturn gantt.templates.task_unscheduled_time(item);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn gantt.templates.grid_date_format(date, column);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\ttask_time: function (start, end, ev) {\r\n\t\t\t\tif (gantt.isUnscheduledTask(ev) && gantt.config.show_unscheduled) {\r\n\t\t\t\t\treturn gantt.templates.task_unscheduled_time(ev);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn gantt.templates.task_date(start) + \" - \" + gantt.templates.task_end_date(end);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\ttask_unscheduled_time: function (task) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t},\r\n\r\n\t\t\ttime_picker: d(c.time_picker),\r\n\t\t\tlink_class: function (link) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t},\r\n\t\t\tlink_description: function (link) {\r\n\t\t\t\tvar from = gantt.getTask(link.source),\r\n\t\t\t\t\tto = gantt.getTask(link.target);\r\n\r\n\t\t\t\treturn \"\" + from.text + \"\" + to.text + \"\";\r\n\t\t\t},\r\n\r\n\t\t\tdrag_link: function (from, from_start, to, to_start) {\r\n\t\t\t\tfrom = gantt.getTask(from);\r\n\t\t\t\tvar labels = gantt.locale.labels;\r\n\r\n\t\t\t\tvar text = \"\" + from.text + \" \" + (from_start ? labels.link_start : labels.link_end) + \"
\";\r\n\t\t\t\tif (to) {\r\n\t\t\t\t\tto = gantt.getTask(to);\r\n\t\t\t\t\ttext += \" \" + to.text + \" \" + (to_start ? labels.link_start : labels.link_end) + \"
\";\r\n\t\t\t\t}\r\n\t\t\t\treturn text;\r\n\t\t\t},\r\n\t\t\tdrag_link_class: function (from, from_start, to, to_start) {\r\n\t\t\t\tvar add = \"\";\r\n\r\n\t\t\t\tif (from && to) {\r\n\t\t\t\t\tvar allowed = gantt.isLinkAllowed(from, to, from_start, to_start);\r\n\t\t\t\t\tadd = \" \" + (allowed ? \"gantt_link_allow\" : \"gantt_link_deny\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn \"gantt_link_tooltip\" + add;\r\n\t\t\t},\r\n\r\n\t\t\t/* used for aria-labels of bar elements and for tooltip.js */\r\n\t\t\ttooltip_date_format: date.date_to_str(\"%Y-%m-%d\"),\r\n\t\t\ttooltip_text: function (start, end, event) {\r\n\t\t\t\treturn `
Task: ${event.text}
\r\n\t\t\t\t
Start date: ${gantt.templates.tooltip_date_format(start)}
\r\n\t\t\t\t
End date: ${gantt.templates.tooltip_date_format(end)}
`;\r\n\t\t\t},\r\n\t\t\tbaseline_text: function (task, baseline, index) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\treturn {\r\n\t\tinitTemplates: initTemplates,\r\n\t\tinitTemplate: initTemplate\r\n\t};\r\n\r\n};","import * as utils from \"../../utils/utils\";\r\nimport facadeFactory from \"./../facades/datastore\";\r\nimport calculateScaleRange from \"../gantt_data_range\";\r\nimport isPlaceholderTask from \"../../utils/placeholder_task\";\r\n\r\nimport treeHelper from \"../../utils/task_tree_helpers\";\r\n\r\nfunction initDataStores(gantt){\r\n\r\n\tvar facade = facadeFactory.create();\r\n\tutils.mixin(gantt, facade);\r\n\tvar tasksStore = gantt.createDatastore({\r\n\t\tname: \"task\",\r\n\t\ttype: \"treeDatastore\",\r\n\t\trootId: function() { return gantt.config.root_id; },\r\n\t\tinitItem: utils.bind(_init_task, gantt),\r\n\t\tgetConfig: function() { return gantt.config; }\r\n\t});\r\n\r\n\tvar linksStore = gantt.createDatastore({\r\n\t\tname: \"link\",\r\n\t\tinitItem: utils.bind(_init_link, gantt)\r\n\t});\r\n\r\n\tgantt.attachEvent(\"onDestroy\", function(){\r\n\t\ttasksStore.destructor();\r\n\t\tlinksStore.destructor();\r\n\t});\r\n\r\n\tgantt.attachEvent(\"onLinkValidation\", function(link){\r\n\t\tif(gantt.isLinkExists(link.id) || link.id === \"predecessor_generated\"){\r\n\t\t\t// link was already added into gantt\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar source = gantt.getTask(link.source);\r\n\t\tvar taskLinks = source.$source;\r\n\t\tfor (var i = 0; i < taskLinks.length; i++) {\r\n\t\t\tvar existingLink = gantt.getLink(taskLinks[i]);\r\n\r\n\t\t\tvar sourceMatch = link.source == existingLink.source;\r\n\t\t\tvar targetMatch = link.target == existingLink.target;\r\n\t\t\tvar typeMatch = link.type == existingLink.type;\r\n\r\n\t\t\t// prevent creating duplicated links from the UI\r\n\t\t\tif (sourceMatch && targetMatch && typeMatch) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\ttasksStore.attachEvent(\"onBeforeRefreshAll\", function(){\r\n\r\n\t\t// GS-2170 do not recalculate indexes and dates as the event will be called later in the onStoreUpdate event\r\n\t\tif (tasksStore._skipTaskRecalculation){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar order = tasksStore.getVisibleItems();\r\n\r\n\t\tfor(var i=0; i < order.length; i++){\r\n\t\t\tvar item = order[i];\r\n\t\t\titem.$index = i;\r\n\t\t\titem.$local_index = gantt.getTaskIndex(item.id);\r\n\t\t\tgantt.resetProjectDates(item);\r\n\t\t}\r\n\r\n\t});\r\n\r\n\ttasksStore.attachEvent(\"onFilterItem\", function(id, task) {\r\n\t\tif (gantt.config.show_tasks_outside_timescale) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar min = null, max = null;\r\n\t\tif (gantt.config.start_date && gantt.config.end_date) {\r\n\t\t\tif (gantt._isAllowedUnscheduledTask(task)) return true;\r\n\t\t\tmin = gantt.config.start_date.valueOf();\r\n\t\t\tmax = gantt.config.end_date.valueOf();\r\n\r\n\t\t\tif (+task.start_date > max || +task.end_date < +min)\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t});\r\n\r\n\ttasksStore.attachEvent(\"onIdChange\", function(oldId, newId){\r\n\t\tgantt._update_flags(oldId, newId);\r\n\r\n\t\tvar changedTask = gantt.getTask(newId);\r\n\t\tif(!tasksStore.isSilent()){\r\n\t\t\tif(changedTask.$split_subtask || changedTask.rollup){\r\n\t\t\t\tgantt.eachParent(function(parent){\r\n\t\t\t\t\tgantt.refreshTask(parent.id);\r\n\t\t\t\t}, newId);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\ttasksStore.attachEvent(\"onAfterUpdate\", function(id){\r\n\t\tgantt._update_parents(id);\r\n\t\tif(gantt.getState(\"batchUpdate\").batch_update){\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar task = tasksStore.getItem(id);\r\n\t\tif (!task.$source) task.$source = [];\r\n\t\tfor (var i = 0; i < task.$source.length; i++) {\r\n\t\t\tlinksStore.refresh(task.$source[i]);\r\n\t\t}\r\n\t\tif (!task.$target) task.$target = [];\r\n\t\tfor (var i = 0; i < task.$target.length; i++) {\r\n\t\t\tlinksStore.refresh(task.$target[i]);\r\n\t\t}\r\n\t});\r\n\r\n\ttasksStore.attachEvent(\"onBeforeItemMove\", function(sid, parent, tindex){\r\n\t\t// GS-125. Don't allow users to move the placeholder task\r\n\t\tif (isPlaceholderTask(sid, gantt, tasksStore)){\r\n\t\t\t//eslint-disable-next-line\r\n\t\t\tconsole.log(\"The placeholder task cannot be moved to another position.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t});\r\n\r\n\ttasksStore.attachEvent(\"onAfterItemMove\", function(sid, parent, tindex){\r\n\t\tvar source = gantt.getTask(sid);\r\n\r\n\t\tif(this.getNextSibling(sid) !== null){\r\n\t\t\tsource.$drop_target = this.getNextSibling(sid);\r\n\t\t} else if(this.getPrevSibling(sid) !== null){\r\n\t\t\tsource.$drop_target = \"next:\" + this.getPrevSibling(sid);\r\n\t\t}else{\r\n\t\t\tsource.$drop_target = \"next:null\";\r\n\t\t}\r\n\r\n\t});\r\n\r\n\ttasksStore.attachEvent(\"onStoreUpdated\", function(id, item, action){\r\n\t\tif(action == \"delete\"){\r\n\t\t\tgantt._update_flags(id, null);\r\n\t\t}\r\n\r\n\t\tvar state = gantt.$services.getService(\"state\");\r\n\t\tif(state.getState(\"batchUpdate\").batch_update){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(gantt.config.fit_tasks && action !== \"paint\"){\r\n\t\t\tvar oldState = gantt.getState();\r\n\t\t\tcalculateScaleRange(gantt);\r\n\t\t\tvar newState = gantt.getState();\r\n\r\n\t\t\t//this._init_tasks_range();\r\n\t\t\tif (+oldState.min_date != +newState.min_date || +oldState.max_date != +newState.max_date) {\r\n\t\t\t\tgantt.render();\r\n\r\n\t\t\t\tgantt.callEvent(\"onScaleAdjusted\", []);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif(action == \"add\" || action == \"move\" || action == \"delete\"){\r\n\t\t\tif(gantt.$layout){\r\n\t\t\t\t// GS-2170. Do not recalculate the indexes and dates of other tasks in the\r\n\t\t\t\t// onBeforeResize layout event, but do it later. If lightbox is opened, it will\r\n\t\t\t\t// trigger the refreshData, so the indexes and dates will be recalculated there\r\n\t\t\t\tif (this.$config.name == \"task\" && (action == \"add\" || action == \"delete\")){\r\n\t\t\t\t\tif (this._skipTaskRecalculation != \"lightbox\"){\r\n\t\t\t\t\t\tthis._skipTaskRecalculation = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tgantt.$layout.resize();\r\n\t\t\t}\r\n\r\n\t\t}else if(!id){\r\n\t\t\tlinksStore.refresh();\r\n\t\t}\r\n\r\n\t});\r\n\r\n\tlinksStore.attachEvent(\"onAfterAdd\", function(id, link){\r\n\t\tsync_link(link);\r\n\t});\r\n\tlinksStore.attachEvent(\"onAfterUpdate\", function(id, link){\r\n\t\tsync_links();\r\n\t});\r\n\tlinksStore.attachEvent(\"onAfterDelete\", function(id, link){\r\n\t\tsync_link_delete(link);\r\n\t});\r\n\tlinksStore.attachEvent(\"onAfterSilentDelete\", function(id, link){\r\n\t\tsync_link_delete(link);\r\n\t});\r\n\tlinksStore.attachEvent(\"onBeforeIdChange\", function(oldId, newId){\r\n\t\tsync_link_delete(gantt.mixin({id:oldId}, gantt.$data.linksStore.getItem(newId)));\r\n\t\tsync_link(gantt.$data.linksStore.getItem(newId));\r\n\t});\r\n\r\n\tfunction checkLinkedTaskVisibility(taskId){\r\n\t\tvar isVisible = gantt.isTaskVisible(taskId);\r\n\t\tif(!isVisible && gantt.isTaskExists(taskId)){\r\n\t\t\tvar parent = gantt.getParent(taskId);\r\n\t\t\tif(gantt.isTaskExists(parent) && gantt.isTaskVisible(parent)){\r\n\t\t\t\tparent = gantt.getTask(parent);\r\n\t\t\t\tif(gantt.isSplitTask(parent)){\r\n\t\t\t\t\tisVisible = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn isVisible;\r\n\t}\r\n\r\n\tlinksStore.attachEvent(\"onFilterItem\", function(id, link){\r\n\t\tif (!gantt.config.show_links) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar sourceVisible = checkLinkedTaskVisibility(link.source);\r\n\t\tvar targetVisible = checkLinkedTaskVisibility(link.target);\r\n\r\n\t\tif (!(sourceVisible && targetVisible) ||\r\n\t\t\tgantt._isAllowedUnscheduledTask(gantt.getTask(link.source)) || gantt._isAllowedUnscheduledTask(gantt.getTask(link.target)))\r\n\t\t\treturn false;\r\n\r\n\t\treturn gantt.callEvent(\"onBeforeLinkDisplay\", [id, link]);\r\n\t});\r\n\r\n\r\n\t(function(){\r\n\t\t// delete all connected links after task is deleted\r\n\t\tvar deletedLinks = {};\r\n\r\n\t\tgantt.attachEvent(\"onBeforeTaskDelete\", function(id, item){\r\n\t\t\tdeletedLinks[id] = treeHelper.getSubtreeLinks(gantt, id);\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tgantt.attachEvent(\"onAfterTaskDelete\", function(id, item) {\r\n\t\t\tif(deletedLinks[id]){\r\n\t\t\t\tgantt.$data.linksStore.silent(function(){\r\n\t\t\t\t\tfor(var i in deletedLinks[id]){\r\n\t\t\t\t\t\tif (gantt.isLinkExists(i)){\r\n\t\t\t\t\t\t\tgantt.$data.linksStore.removeItem(i);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsync_link_delete(deletedLinks[id][i]);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdeletedLinks[id] = null;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t})();\r\n\r\n\tgantt.attachEvent(\"onAfterLinkDelete\", function(id, link) {\r\n\t\tgantt.refreshTask(link.source);\r\n\t\tgantt.refreshTask(link.target);\r\n\t});\r\n\r\n\tgantt.attachEvent(\"onParse\", sync_links);\r\n\r\n\tmapEvents({\r\n\t\tsource: linksStore,\r\n\t\ttarget: gantt,\r\n\t\tevents:{\r\n\t\t\t\"onItemLoading\":\"onLinkLoading\",\r\n\t\t\t\"onBeforeAdd\":\"onBeforeLinkAdd\",\r\n\t\t\t\"onAfterAdd\":\"onAfterLinkAdd\",\r\n\t\t\t\"onBeforeUpdate\":\"onBeforeLinkUpdate\",\r\n\t\t\t\"onAfterUpdate\":\"onAfterLinkUpdate\",\r\n\t\t\t\"onBeforeDelete\":\"onBeforeLinkDelete\",\r\n\t\t\t\"onAfterDelete\":\"onAfterLinkDelete\",\r\n\t\t\t\"onIdChange\":\"onLinkIdChange\"\r\n\t\t}\r\n\t});\r\n\r\n\tmapEvents({\r\n\t\tsource: tasksStore,\r\n\t\ttarget: gantt,\r\n\t\tevents:{\r\n\t\t\t\"onItemLoading\":\"onTaskLoading\",\r\n\t\t\t\"onBeforeAdd\":\"onBeforeTaskAdd\",\r\n\t\t\t\"onAfterAdd\":\"onAfterTaskAdd\",\r\n\t\t\t\"onBeforeUpdate\":\"onBeforeTaskUpdate\",\r\n\t\t\t\"onAfterUpdate\":\"onAfterTaskUpdate\",\r\n\t\t\t\"onBeforeDelete\":\"onBeforeTaskDelete\",\r\n\t\t\t\"onAfterDelete\":\"onAfterTaskDelete\",\r\n\t\t\t\"onIdChange\":\"onTaskIdChange\",\r\n\t\t\t\"onBeforeItemMove\":\"onBeforeTaskMove\",\r\n\t\t\t\"onAfterItemMove\":\"onAfterTaskMove\",\r\n\t\t\t\"onFilterItem\":\"onBeforeTaskDisplay\",\r\n\t\t\t\"onItemOpen\":\"onTaskOpened\",\r\n\t\t\t\"onItemClose\":\"onTaskClosed\",\r\n\t\t\t\"onBeforeSelect\":\"onBeforeTaskSelected\",\r\n\t\t\t\"onAfterSelect\":\"onTaskSelected\",\r\n\t\t\t\"onAfterUnselect\":\"onTaskUnselected\"\r\n\t\t}\r\n\t});\r\n\r\n\tgantt.$data = {\r\n\t\ttasksStore: tasksStore,\r\n\t\tlinksStore: linksStore\r\n\t};\r\n\r\n\tfunction sync_link(link){\r\n\t\tif(gantt.isTaskExists(link.source)){\r\n\t\t\tvar sourceTask = gantt.getTask(link.source);\r\n\t\t\tsourceTask.$source = sourceTask.$source || [];\r\n\t\t\tsourceTask.$source.push(link.id);\r\n\t\t}\r\n\t\tif(gantt.isTaskExists(link.target)){\r\n\t\t\tvar targetTask = gantt.getTask(link.target);\r\n\t\t\ttargetTask.$target = targetTask.$target || [];\r\n\t\t\ttargetTask.$target.push(link.id);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction sync_link_delete(link){\r\n\t\tif(gantt.isTaskExists(link.source)){\r\n\t\t\tvar sourceTask = gantt.getTask(link.source);\r\n\t\t\tfor(var i = 0; i < sourceTask.$source.length; i++){\r\n\t\t\t\tif(sourceTask.$source[i] == link.id){\r\n\t\t\t\t\tsourceTask.$source.splice(i, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(gantt.isTaskExists(link.target)){\r\n\t\t\tvar targetTask = gantt.getTask(link.target);\r\n\t\t\tfor(var i = 0; i < targetTask.$target.length; i++){\r\n\t\t\t\tif(targetTask.$target[i] == link.id){\r\n\t\t\t\t\ttargetTask.$target.splice(i, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction sync_links() {\r\n\t\tvar task = null;\r\n\t\tvar tasks = gantt.$data.tasksStore.getItems();\r\n\r\n\t\tfor(var i = 0, len = tasks.length; i < len; i++){\r\n\t\t\ttask = tasks[i];\r\n\t\t\ttask.$source = [];\r\n\t\t\ttask.$target = [];\r\n\t\t}\r\n\r\n\t\tvar links = gantt.$data.linksStore.getItems();\r\n\t\tfor (var i = 0, len = links.length; i < len; i++) {\r\n\r\n\t\t\tvar link = links[i];\r\n\t\t\tsync_link(link);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction mapEvents(conf){\r\n\t\tvar mapFrom = conf.source;\r\n\t\tvar mapTo = conf.target;\r\n\t\tfor(var i in conf.events){\r\n\t\t\t(function(sourceEvent, targetEvent){\r\n\t\t\t\tmapFrom.attachEvent(sourceEvent, function(){\r\n\t\t\t\t\treturn mapTo.callEvent(targetEvent, Array.prototype.slice.call(arguments));\r\n\t\t\t\t}, targetEvent);\r\n\t\t\t})(i, conf.events[i]);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _init_task(task) {\r\n\t\tif (!this.defined(task.id))\r\n\t\t\ttask.id = this.uid();\r\n\r\n\t\tif (task.start_date)\r\n\t\t\ttask.start_date = gantt.date.parseDate(task.start_date, \"parse_date\");\r\n\t\tif (task.end_date)\r\n\t\t\ttask.end_date = gantt.date.parseDate(task.end_date, \"parse_date\");\r\n\r\n\r\n\t\tvar duration = null;\r\n\t\tif (task.duration || task.duration === 0) {\r\n\t\t\ttask.duration = duration = task.duration * 1;\r\n\t\t}\r\n\r\n\t\tif (duration) {\r\n\t\t\tif (task.start_date && !task.end_date) {\r\n\t\t\t\ttask.end_date = this.calculateEndDate(task);\r\n\t\t\t} else if (!task.start_date && task.end_date) {\r\n\t\t\t\ttask.start_date = this.calculateEndDate({\r\n\t\t\t\t\tstart_date: task.end_date,\r\n\t\t\t\t\tduration: -task.duration,\r\n\t\t\t\t\ttask: task\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t//task.$calculate_duration = false;\r\n\t\t}\r\n\r\n\t\tif (gantt.config.deadlines !== false && task.deadline){\r\n\t\t\ttask.deadline = gantt.date.parseDate(task.deadline, \"parse_date\");\r\n\t\t}\r\n\r\n\t\ttask.progress = Number(task.progress) || 0;\r\n\r\n\t\tif (this._isAllowedUnscheduledTask(task)) {\r\n\t\t\tthis._set_default_task_timing(task);\r\n\t\t}\r\n\t\tthis._init_task_timing(task);\r\n\t\tif (task.start_date && task.end_date)\r\n\t\t\tthis.correctTaskWorkTime(task);\r\n\r\n\t\ttask.$source = [];\r\n\t\ttask.$target = [];\r\n\r\n\t\tvar originalTask = this.$data.tasksStore.getItem(task.id);\r\n\t\tif (originalTask && !utils.defined(task.open)) {\r\n\t\t\t// if a task with the same id is already in the gantt and the new object doesn't specify the `open` state -\r\n\t\t\t// restore the `open` state we already have in the chart\r\n\t\t\ttask.$open = originalTask.$open;\r\n\t\t}\r\n\r\n\t\tif (task.parent === undefined) {\r\n\t\t\ttask.parent = this.config.root_id;\r\n\t\t}\r\n\t\treturn task;\r\n\t}\r\n\r\n\tfunction _init_link(link) {\r\n\t\tif (!this.defined(link.id))\r\n\t\t\tlink.id = this.uid();\r\n\t\treturn link;\r\n\t}\r\n}\r\n\r\n\r\nexport default initDataStores;\r\n","import batch_update from \"./batch_update\";\r\nimport wbs from \"./wbs\";\r\nimport resources from \"./resources\";\r\nimport resource_assignments from \"./resource_assignments\";\r\nimport new_task_placeholder from \"./new_task_placeholder\";\r\nimport auto_task_types from \"./auto_task_types\";\r\nimport formatters from \"./formatters\";\r\nimport empty_state_screen from \"./empty_state_screen\";\r\nimport baselines from \"./baselines\";\r\n\r\nexport default function(gantt){\r\n\tif(!gantt.ext){\r\n\t\tgantt.ext = {};\r\n\t}\r\n\r\n\tvar modules = [\r\n\t\tbatch_update,\r\n\t\twbs,\r\n\t\tresources,\r\n\t\tresource_assignments,\r\n\t\tnew_task_placeholder,\r\n\t\tauto_task_types,\r\n\t\tformatters,\r\n\t\tempty_state_screen,\r\n\t\tbaselines\r\n\t];\r\n\r\n\tfor(var i = 0; i < modules.length; i++){\r\n\t\tif(modules[i])\r\n\t\t\tmodules[i](gantt);\r\n\t}\r\n};","export default function(gantt) {\r\n\tgantt.getGridColumn = function(name) {\r\n\t\tvar columns = gantt.config.columns;\r\n\r\n\t\tfor (var i = 0; i < columns.length; i++) {\r\n\t\t\tif (columns[i].name == name)\r\n\t\t\t\treturn columns[i];\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t};\r\n\r\n\tgantt.getGridColumns = function() {\r\n\t\treturn gantt.config.columns.slice();\r\n\t};\r\n};","export default function(gantt) {\r\n\tgantt.isReadonly = function (item) {\r\n\r\n\t\tif((typeof item == \"number\" || typeof item == \"string\") && gantt.isTaskExists(item)){\r\n\t\t\titem = gantt.getTask(item);\r\n\t\t}\r\n\t\tif (item && item[this.config.editable_property]) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn (item && item[this.config.readonly_property]) || this.config.readonly;\r\n\t\t}\r\n\t};\r\n};","import CalendarManager from \"./calendar_manager\";\r\nimport TimeCalculator from \"./time_calculator\";\r\nimport worktimeFacadeFactory from \"../facades/worktime_calendars\";\r\nimport * as utils from \"../../utils/utils\";\r\n\r\nexport default function (gantt) {\r\n\tvar manager = new CalendarManager(gantt),\r\n\ttimeCalculator = new TimeCalculator(manager);\r\n\tvar facade = worktimeFacadeFactory.create(manager, timeCalculator);\r\n\tutils.mixin(gantt, facade);\r\n};\r\n","export default function(gantt) {\r\n\r\n\tgantt.getTaskType = function (type) {\r\n\t\treturn \"task\";\r\n\t};\r\n};","/*\r\n reuse results of functions that can be recalculated during rendering\r\n greatly increases the rendering speed when critical path enabled\r\n Sample - 94_dev/critical_path.html\r\n\r\n */\r\nexport default function(gantt){\r\n\r\ngantt._cached_functions = {\r\n\tcache: {},\r\n\tmode: false,\r\n\tcritical_path_mode: false,\r\n\twrap_methods : function(methods, object){\r\n\t\tif(object._prefetch_originals){\r\n\t\t\tfor(var i in object._prefetch_originals){\r\n\t\t\t\tobject[i] = object._prefetch_originals[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\tobject._prefetch_originals = {};\r\n\t\tfor(var i = 0; i < methods.length; i++)\r\n\t\t\tthis.prefetch(methods[i], object);\r\n\r\n\t},\r\n\tprefetch : function(methodname, host){\r\n\t\tvar original = host[methodname];\r\n\t\tif(original){\r\n\t\t\tvar optimizer = this;\r\n\r\n\t\t\thost._prefetch_originals[methodname] = original;\r\n\t\t\thost[methodname] = function get_prefetched_value(){\r\n\r\n\t\t\t\tvar argumentsArray = new Array(arguments.length);\r\n\t\t\t\tfor (var i = 0, l = arguments.length; i < l; i++) {\r\n\t\t\t\t\targumentsArray[i] = arguments[i];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(optimizer.active){\r\n\t\t\t\t\tvar args = optimizer.get_arguments_hash(Array.prototype.slice.call(argumentsArray));\r\n\t\t\t\t\tif(!optimizer.cache[methodname]){\r\n\t\t\t\t\t\toptimizer.cache[methodname] = {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar cached_values = optimizer.cache[methodname];\r\n\r\n\t\t\t\t\tif(optimizer.has_cached_value(cached_values, args)){\r\n\t\t\t\t\t\treturn optimizer.get_cached_value(cached_values, args);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar value = original.apply(this, argumentsArray);\r\n\t\t\t\t\t\toptimizer.cache_value(cached_values, args, value);\r\n\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn original.apply(this, argumentsArray);\r\n\t\t\t};\r\n\t\t}\r\n\t\treturn original;\r\n\t},\r\n\tcache_value: function(cache, arguments_hash, value){\r\n\t\tif(this.is_date(value))\r\n\t\t\tvalue = new Date(value);\r\n\t\tcache[arguments_hash] = value;\r\n\t},\r\n\thas_cached_value: function(cache, arguments_hash){\r\n\t\treturn cache.hasOwnProperty(arguments_hash);\r\n\t},\r\n\tget_cached_value: function(cache, arguments_hash){\r\n\t\tvar data = cache[arguments_hash];\r\n\r\n\t\t//for cached dates - return copy\r\n\t\tif(this.is_date(data)){\r\n\t\t\tdata = new Date(data);\r\n\t\t}\r\n\t\treturn data;\r\n\t},\r\n\tis_date: function(value){\r\n\t\treturn (value && value.getUTCDate);\r\n\t},\r\n\tget_arguments_hash:function(args){\r\n\t\tvar values = [];\r\n\t\tfor(var i = 0; i < args.length; i++){\r\n\t\t\tvalues.push(this.stringify_argument(args[i]));\r\n\t\t}\r\n\t\treturn \"(\" + values.join(\";\") + \")\";\r\n\t},\r\n\tstringify_argument: function(value){\r\n\t\t//expecting task or link, or any other data entries, dates and primitive values\r\n\t\tvar ret = \"\";\r\n\t\tif(value.id){\r\n\t\t\tret = value.id;\r\n\t\t}else if(this.is_date(value)){\r\n\t\t\tret = value.valueOf();\r\n\t\t}else{\r\n\t\t\tret = value;\r\n\t\t}\r\n\t\treturn ret + \"\";\r\n\t},\r\n\tactivate: function(){\r\n\t\tthis.clear();\r\n\t\tthis.active = true;\r\n\t},\r\n\tdeactivate: function(){\r\n\t\tthis.clear();\r\n\t\tthis.active = false;\r\n\t},\r\n\tclear: function(){\r\n\t\tthis.cache = {};\r\n\t},\r\n\r\n\tsetup: function(gantt){\r\n\t\tvar override_gantt = [];\r\n\r\n\t\tvar gantt_methods = [\r\n\t\t\t'_isProjectEnd',\r\n\t\t\t'_getProjectEnd',\r\n\t\t\t'_getSlack'\r\n\t\t];\r\n\r\n\r\n\r\n\t\tif(this.mode == 'auto'){\r\n\t\t\tif(gantt.config.highlight_critical_path){\r\n\t\t\t\toverride_gantt = gantt_methods;\r\n\t\t\t}\r\n\t\t}else if(this.mode === true){\r\n\t\t\toverride_gantt = gantt_methods;\r\n\t\t}\r\n\r\n\t\tthis.wrap_methods(override_gantt, gantt);\r\n\r\n\t},\r\n\tupdate_if_changed: function(gantt){\r\n\t\tvar changed = (this.critical_path_mode != gantt.config.highlight_critical_path ||\r\n\t\t\t\t\t\tthis.mode !== gantt.config.optimize_render);\r\n\t\tif(changed){\r\n\t\t\tthis.critical_path_mode = gantt.config.highlight_critical_path;\r\n\t\t\tthis.mode = gantt.config.optimize_render;\r\n\t\t\tthis.setup(gantt);\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfunction activate(){\r\n\tgantt._cached_functions.update_if_changed(gantt);\r\n\tif(!gantt._cached_functions.active){\r\n\t\tgantt._cached_functions.activate();\r\n\t}\r\n\treturn true;\r\n}\r\ngantt.attachEvent(\"onBeforeGanttRender\", activate);\r\ngantt.attachEvent(\"onBeforeDataRender\", activate);\r\ngantt.attachEvent(\"onBeforeSmartRender\", function(){\r\n\tactivate();\r\n});\r\ngantt.attachEvent(\"onBeforeParse\", activate);\r\ngantt.attachEvent(\"onDataRender\", function(){\r\n\tgantt._cached_functions.deactivate();\r\n});\r\nvar deactivTimeout = null;\r\ngantt.attachEvent(\"onSmartRender\", function(){\r\n\tif(deactivTimeout)\r\n\t\tclearTimeout(deactivTimeout);\r\n\tdeactivTimeout = setTimeout(function(){\r\n\t\tgantt._cached_functions.deactivate();\r\n\t}, 1000);\r\n});\r\n\r\ngantt.attachEvent(\"onBeforeGanttReady\", function(){\r\n\tgantt._cached_functions.update_if_changed(gantt);\r\n\treturn true;\r\n});\r\n\r\n};","function extend(gantt){\r\n\r\n\tgantt.destructor = function(){\r\n\t\tthis.clearAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\r\n\t\tif(this.$root){\r\n\t\t\tdelete this.$root.gantt;\r\n\t\t}\r\n\r\n\t\tif(this._eventRemoveAll){\r\n\t\t\tthis._eventRemoveAll();\r\n\t\t}\r\n\r\n\t\tif(this.$layout){\r\n\t\t\tthis.$layout.destructor();\r\n\t\t}\r\n\r\n\t\tif(this.resetLightbox){\r\n\t\t\tthis.resetLightbox();\r\n\t\t}\r\n\r\n\r\n\t\tif(this._dp && this._dp.destructor){\r\n\t\t\tthis._dp.destructor();\r\n\t\t}\r\n\t\tthis.$services.destructor();\r\n\r\n\t\t// detachAllEvents should be called last, because in components may be attached events\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tfor(var i in this){\r\n\t\t\tif(i.indexOf(\"$\") === 0){\r\n\t\t\t\tdelete this[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.$destroyed = true;\r\n\t};\r\n}\r\n\r\nexport default extend;\r\n","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fa from \"./locale_fa\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hr from \"./locale_hr\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\nimport kr from \"./locale_kr\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfa,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thr,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tkr,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","import * as utils from \"../../utils/utils\";\r\nimport * as domHelpers from \"./utils/dom_helpers\";\r\n\r\nexport default function(gantt) {\r\n\r\n\tvar boxAttribute = \"data-dhxbox\";\r\n\r\n\tvar _dhx_msg_cfg = null;\r\n\r\n\tfunction callback(config, result) {\r\n\t\tvar usercall = config.callback;\r\n\t\tmodalBox.hide(config.box);\r\n\r\n\t\t_dhx_msg_cfg = config.box = null;\r\n\t\tif (usercall)\r\n\t\t\tusercall(result);\r\n\t}\r\n\r\n\tfunction modal_key(event) {\r\n\t\tif (_dhx_msg_cfg) {\r\n\r\n\t\t\tvar code = event.which || event.keyCode;\r\n\t\t\tvar preventDefault = false;\r\n\r\n\t\t\tif (messageBox.keyboard) {\r\n\t\t\t\tif (code == 13 || code == 32) {\r\n\t\t\t\t\t// default behavior is to confirm/submit popup on space/enter\r\n\t\t\t\t\t// if browser focus is set on button element - do button click instead of default behavior\r\n\t\t\t\t\tvar target = event.target || event.srcElement;\r\n\t\t\t\t\tif (domHelpers.getClassName(target).indexOf(\"gantt_popup_button\") > -1 && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcallback(_dhx_msg_cfg, true);\r\n\t\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (code == 27) {\r\n\t\t\t\t\tcallback(_dhx_msg_cfg, false);\r\n\t\t\t\t\tpreventDefault = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (preventDefault) {\r\n\t\t\t\tif (event.preventDefault){\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\t\t\t\treturn !(event.cancelBubble = true);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\tvar eventElement = domHelpers.getRootNode(gantt.$root) || document;\r\n\tgantt.event(eventElement, \"keydown\", modal_key, true);\r\n\r\n\tfunction modality(mode) {\r\n\t\tif (!modality.cover) {\r\n\t\t\tmodality.cover = document.createElement(\"div\");\r\n\t\t\t//necessary for IE only\r\n\t\t\tmodality.cover.onkeydown = modal_key;\r\n\t\t\tmodality.cover.className = \"dhx_modal_cover\";\r\n\t\t\tdocument.body.appendChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tmodality.cover.style.display = mode ? \"inline-block\" : \"none\";\r\n\t}\r\n\r\n\tfunction button(text, className, result) {\r\n\t\tvar buttonAriaAttrs = gantt._waiAria.messageButtonAttrString(text);\r\n\t\tvar name = className.toLowerCase().replace(/ /g, \"_\");\r\n\t\tvar button_css = \"gantt_\" + name + \"_button\";\r\n\t\treturn \"
\" + text + \"
\";\r\n\t}\r\n\r\n\tfunction info(text) {\r\n\t\tif (!messageBox.area) {\r\n\t\t\tmessageBox.area = document.createElement(\"div\");\r\n\t\t\tmessageBox.area.className = \"gantt_message_area\";\r\n\t\t\tmessageBox.area.style[messageBox.position] = \"5px\";\r\n\t\t\tdocument.body.appendChild(messageBox.area);\r\n\t\t}\r\n\r\n\t\tmessageBox.hide(text.id);\r\n\t\tvar message = document.createElement(\"div\");\r\n\t\tmessage.innerHTML = \"
\" + text.text + \"
\";\r\n\t\tmessage.className = \"gantt-info gantt-\" + text.type;\r\n\t\tmessage.onclick = function () {\r\n\t\t\tmessageBox.hide(text.id);\r\n\t\t\ttext = null;\r\n\t\t};\r\n\r\n\t\tgantt._waiAria.messageInfoAttr(message);\r\n\r\n\t\tif (messageBox.position == \"bottom\" && messageBox.area.firstChild)\r\n\t\t\tmessageBox.area.insertBefore(message, messageBox.area.firstChild);\r\n\t\telse\r\n\t\t\tmessageBox.area.appendChild(message);\r\n\r\n\t\tif (text.expire > 0)\r\n\t\t\tmessageBox.timers[text.id] = window.setTimeout(function () {\r\n\t\t\t\t// GS-1213: We need that when Gantt is destroyed\r\n\t\t\t\tif (messageBox) messageBox.hide(text.id);\r\n\t\t\t}, text.expire);\r\n\r\n\t\tmessageBox.pull[text.id] = message;\r\n\t\tmessage = null;\r\n\r\n\t\treturn text.id;\r\n\t}\r\n\r\n\tfunction getFirstDefined() {\r\n\t\tvar values = [].slice.apply(arguments, [0]);\r\n\r\n\t\tfor (var i = 0; i < values.length; i++) {\r\n\t\t\tif (values[i]) {\r\n\t\t\t\treturn values[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tfunction _boxStructure(config, ok, cancel) {\r\n\t\tvar box = document.createElement(\"div\");\r\n\r\n\t\tvar contentId = utils.uid();\r\n\t\tgantt._waiAria.messageModalAttr(box, contentId);\r\n\r\n\r\n\t\tbox.className = \" gantt_modal_box gantt-\" + config.type;\r\n\t\tbox.setAttribute(boxAttribute, 1);\r\n\r\n\t\tvar inner = '';\r\n\r\n\t\tif (config.width)\r\n\t\t\tbox.style.width = config.width;\r\n\t\tif (config.height)\r\n\t\t\tbox.style.height = config.height;\r\n\t\tif (config.title)\r\n\t\t\tinner += '
' + config.title + '
';\r\n\t\tinner += '
' + (config.content ? '' : config.text) + '
';\r\n\t\tif (ok)\r\n\t\t\tinner += button(getFirstDefined(config.ok, gantt.locale.labels.message_ok, \"OK\"), \"ok\", true);\r\n\t\tif (cancel)\r\n\t\t\tinner += button(getFirstDefined(config.cancel, gantt.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\r\n\r\n\t\tif (config.buttons) {\r\n\t\t\tfor (var i = 0; i < config.buttons.length; i++) {\r\n\t\t\t\tvar btn = config.buttons[i];\r\n\t\t\t\tif (typeof btn == \"object\") {\r\n\t\t\t\t\t// Support { label:\"Save\", css:\"main_button\", value:\"save\" }\r\n\t\t\t\t\tvar label = btn.label;\r\n\t\t\t\t\tvar css = btn.css || (\"gantt_\" + btn.label.toLowerCase() + \"_button\");\r\n\t\t\t\t\tvar value = btn.value || i;\r\n\t\t\t\t\tinner += button(label, css, value);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tinner += button(btn, btn, i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tinner += '
';\r\n\t\tbox.innerHTML = inner;\r\n\r\n\t\tif (config.content) {\r\n\t\t\tvar node = config.content;\r\n\t\t\tif (typeof node == \"string\")\r\n\t\t\t\tnode = document.getElementById(node);\r\n\t\t\tif (node.style.display == 'none')\r\n\t\t\t\tnode.style.display = \"\";\r\n\t\t\tbox.childNodes[config.title ? 1 : 0].appendChild(node);\r\n\t\t}\r\n\r\n\t\tbox.onclick = function (event) {\r\n\t\t\tvar source = event.target || event.srcElement;\r\n\t\t\tif (!source.className) source = source.parentNode;\r\n\t\t\tif (domHelpers.closest(source, \".gantt_popup_button\")) {\r\n\t\t\t\tvar result = source.getAttribute(\"data-result\");\r\n\t\t\t\tresult = (result == \"true\") || (result == \"false\" ? false : result);\r\n\t\t\t\tcallback(config, result);\r\n\t\t\t}\r\n\t\t};\r\n\t\tconfig.box = box;\r\n\t\tif (ok || cancel)\r\n\t\t\t_dhx_msg_cfg = config;\r\n\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction _createBox(config, ok, cancel) {\r\n\t\tvar box = config.tagName ? config : _boxStructure(config, ok, cancel);\r\n\r\n\t\tif (!config.hidden)\r\n\t\t\tmodality(true);\r\n\t\tdocument.body.appendChild(box);\r\n\t\tvar x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\r\n\t\tvar y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\r\n\t\tif (config.position == \"top\")\r\n\t\t\tbox.style.top = \"-3px\";\r\n\t\telse\r\n\t\t\tbox.style.top = y + 'px';\r\n\t\tbox.style.left = x + 'px';\r\n\t\t//necessary for IE only\r\n\t\tbox.onkeydown = modal_key;\r\n\r\n\t\tmodalBox.focus(box);\r\n\r\n\t\tif (config.hidden)\r\n\t\t\tmodalBox.hide(box);\r\n\r\n\t\tgantt.callEvent(\"onMessagePopup\", [box]);\r\n\t\treturn box;\r\n\t}\r\n\r\n\tfunction alertPopup(config) {\r\n\t\treturn _createBox(config, true, false);\r\n\t}\r\n\r\n\tfunction confirmPopup(config) {\r\n\t\treturn _createBox(config, true, true);\r\n\t}\r\n\r\n\tfunction boxPopup(config) {\r\n\t\treturn _createBox(config);\r\n\t}\r\n\r\n\tfunction box_params(text, type, callback) {\r\n\t\tif (typeof text != \"object\") {\r\n\t\t\tif (typeof type == \"function\") {\r\n\t\t\t\tcallback = type;\r\n\t\t\t\ttype = \"\";\r\n\t\t\t}\r\n\t\t\ttext = {text: text, type: type, callback: callback};\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tfunction params(text, type, expire, id) {\r\n\t\tif (typeof text != \"object\")\r\n\t\t\ttext = {text: text, type: type, expire: expire, id: id};\r\n\t\ttext.id = text.id || utils.uid();\r\n\t\ttext.expire = text.expire || messageBox.expire;\r\n\t\treturn text;\r\n\t}\r\n\r\n\tvar alertBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"confirm\";\r\n\t\treturn alertPopup(text);\r\n\t};\r\n\tvar confirmBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn confirmPopup(text);\r\n\t};\r\n\tvar modalBox = function () {\r\n\t\tvar text = box_params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"alert\";\r\n\t\treturn boxPopup(text);\r\n\t};\r\n\tmodalBox.hide = function (node) {\r\n\t\twhile (node && node.getAttribute && !node.getAttribute(boxAttribute))\r\n\t\t\tnode = node.parentNode;\r\n\t\tif (node) {\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\tmodality(false);\r\n\r\n\t\t\tgantt.callEvent(\"onAfterMessagePopup\", [node]);\r\n\t\t}\r\n\t};\r\n\r\n\tmodalBox.focus = function (node) {\r\n\t\tsetTimeout(function () {\r\n\t\t\tvar focusable = domHelpers.getFocusableNodes(node);\r\n\t\t\tif (focusable.length) {\r\n\t\t\t\tif (focusable[0].focus) focusable[0].focus();\r\n\t\t\t}\r\n\t\t}, 1);\r\n\t};\r\n\r\n\tvar messageBox = function (text, type, expire, id) {\r\n\t\ttext = params.apply(this, arguments);\r\n\t\ttext.type = text.type || \"info\";\r\n\r\n\t\tvar subtype = text.type.split(\"-\")[0];\r\n\t\tswitch (subtype) {\r\n\t\t\tcase \"alert\":\r\n\t\t\t\treturn alertPopup(text);\r\n\t\t\tcase \"confirm\":\r\n\t\t\t\treturn confirmPopup(text);\r\n\t\t\tcase \"modalbox\":\r\n\t\t\t\treturn boxPopup(text);\r\n\t\t\tdefault:\r\n\t\t\t\treturn info(text);\r\n\t\t}\r\n\t};\r\n\r\n\tmessageBox.seed = (new Date()).valueOf();\r\n\tmessageBox.uid = utils.uid;\r\n\tmessageBox.expire = 4000;\r\n\tmessageBox.keyboard = true;\r\n\tmessageBox.position = \"top\";\r\n\tmessageBox.pull = {};\r\n\tmessageBox.timers = {};\r\n\r\n\tmessageBox.hideAll = function () {\r\n\t\tfor (var key in messageBox.pull)\r\n\t\t\tmessageBox.hide(key);\r\n\t};\r\n\tmessageBox.hide = function (id) {\r\n\t\tvar obj = messageBox.pull[id];\r\n\t\tif (obj && obj.parentNode) {\r\n\t\t\twindow.setTimeout(function () {\r\n\t\t\t\tobj.parentNode.removeChild(obj);\r\n\t\t\t\tobj = null;\r\n\t\t\t}, 2000);\r\n\t\t\tobj.className += \" hidden\";\r\n\r\n\t\t\tif (messageBox.timers[id])\r\n\t\t\t\twindow.clearTimeout(messageBox.timers[id]);\r\n\t\t\tdelete messageBox.pull[id];\r\n\t\t}\r\n\t};\r\n\r\n\tvar popups = [];\r\n\tgantt.attachEvent(\"onMessagePopup\", function(box){\r\n\t\tpopups.push(box);\r\n\t});\r\n\tgantt.attachEvent(\"onAfterMessagePopup\", function(box){\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i] === box){\r\n\t\t\t\tpopups.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\tgantt.attachEvent(\"onDestroy\", function(){\r\n\t\tif(modality.cover && modality.cover.parentNode){\r\n\t\t\tmodality.cover.parentNode.removeChild(modality.cover);\r\n\t\t}\r\n\r\n\t\tfor(var i = 0; i < popups.length; i++){\r\n\t\t\tif(popups[i].parentNode){\r\n\t\t\t\tpopups[i].parentNode.removeChild(popups[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpopups = null;\r\n\r\n\t\tif(messageBox.area && messageBox.area.parentNode){\r\n\t\t\tmessageBox.area.parentNode.removeChild(messageBox.area);\r\n\t\t}\r\n\t\tmessageBox = null;\r\n\t});\r\n\r\n\treturn {\r\n\t\talert: alertBox,\r\n\t\tconfirm: confirmBox,\r\n\t\tmessage: messageBox,\r\n\t\tmodalbox: modalBox\r\n\t};\r\n};","import * as utils from \"../../utils/utils\";\r\n\r\nfunction extendSettings (store, parentSettings){\r\n\tvar own = this.$config[store];\r\n\r\n\tif(own){\r\n\t\tif(!own.$extendedConfig){\r\n\t\t\town.$extendedConfig = true;\r\n\t\t\tObject.setPrototypeOf(own, parentSettings);\r\n\t\t}\r\n\t\treturn own;\r\n\t}else{\r\n\t\treturn parentSettings;\r\n\t}\r\n}\r\n\r\nvar configurable = function(parentView){\r\n\tvar parentConfig,\r\n\t\tparentTemplates;\r\n\r\n\treturn {\r\n\t\t$getConfig: function(){\r\n\t\t\tif(!parentConfig){\r\n\t\t\t\tparentConfig = parentView ? parentView.$getConfig() : this.$gantt.config;\r\n\t\t\t}\r\n\t\t\tif(!this.$config.config){\r\n\t\t\t\treturn parentConfig;\r\n\t\t\t}else{\r\n\t\t\t\treturn extendSettings.call(this, \"config\", parentConfig);\r\n\t\t\t}\r\n\t\t},\r\n\t\t$getTemplates: function(){\r\n\t\t\tif(!parentTemplates){\r\n\t\t\t\tparentTemplates = parentView ? parentView.$getTemplates() : this.$gantt.templates;\r\n\t\t\t}\r\n\t\t\tif(!this.$config.templates){\r\n\t\t\t\treturn parentTemplates;\r\n\t\t\t}else{\r\n\t\t\t\treturn extendSettings.call(this, \"templates\", parentTemplates);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n};\r\n\r\nexport default function(obj, parent){\r\n\tutils.mixin(obj, configurable(parent));\r\n};","import * as utils from \"../../utils/utils\";\r\nimport configurable from \"./configurable\";\r\n\r\nvar uiFactory = function createFactory(gantt){\r\n\tvar views = {};\r\n\r\n\tfunction ui(cell, parentView) {\r\n\t\tvar content;\r\n\t\tvar view = \"cell\";\r\n\t\tif (cell.view){\r\n\t\t\tview = \"viewcell\";\r\n\t\t}else if (cell.resizer) {\r\n\t\t\tview = \"resizer\";\r\n\t\t}\r\n\t\telse if (cell.rows || cell.cols) {\r\n\t\t\tview = \"layout\";\r\n\t\t}\r\n\t\telse if (cell.views) {\r\n\t\t\tview = \"multiview\";\r\n\t\t}\r\n\r\n\t\tcontent = createView.call(this, view, null, cell, parentView);\r\n\t\treturn content;\r\n\t}\r\n\t\r\n\tvar createdViews = {};\r\n\r\n\tfunction createView(name, parent, config, parentView) {\r\n\t\tvar creator = views[name];\r\n\r\n\t\tif(!creator || !creator.create)\r\n\t\t\treturn false;\r\n\r\n\t\tif(name == \"resizer\" && !config.mode){\r\n\t\t\tif(parentView.$config.cols){\r\n\t\t\t\tconfig.mode = \"x\";\r\n\t\t\t}else{\r\n\t\t\t\tconfig.mode = \"y\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(name == \"viewcell\" && config.view == \"scrollbar\" && !config.scroll){\r\n\t\t\tif(parentView.$config.cols){\r\n\t\t\t\tconfig.scroll = \"y\";\r\n\t\t\t}else{\r\n\t\t\t\tconfig.scroll = \"x\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar config = utils.copy(config);\r\n\r\n\t\tif(!config.id && !createdViews[config.view]){\r\n\t\t\tconfig.id = config.view;\r\n\t\t}\r\n\r\n\t\tif(config.id && !config.css){\r\n\t\t\tconfig.css = config.id+\"_cell\";\r\n\t\t}\r\n\r\n\t\tvar view = new creator.create(parent, config, this, gantt);\r\n\r\n\t\tif(creator.configure){\r\n\t\t\tcreator.configure(view);\r\n\t\t}\r\n\r\n\t\tconfigurable(view, parentView);\r\n\t\tif(!view.$id){\r\n\t\t\tview.$id = config.id || gantt.uid();\r\n\t\t}\r\n\r\n\t\tif(!view.$parent && typeof parent == \"object\"){\r\n\t\t\tview.$parent = parent;\r\n\t\t}\r\n\t\tif(!view.$config){\r\n\t\t\tview.$config = config;\r\n\t\t}\r\n\r\n\t\tif(createdViews[view.$id]){\r\n\t\t\tview.$id = gantt.uid();\r\n\t\t}\r\n\r\n\t\tcreatedViews[view.$id] = view;\r\n\r\n\t\treturn view;\r\n\t}\r\n\r\n\tfunction reset(){\r\n\t\tcreatedViews = {};\r\n\t}\r\n\r\n\tfunction register(name, viewConstructor, configure){\r\n\t\tviews[name] = {create: viewConstructor, configure: configure};\r\n\t}\r\n\r\n\tfunction getView(id){\r\n\t\treturn createdViews[id];\r\n\t}\r\n\r\n\tvar factory = {\r\n\t\tinitUI:ui,\r\n\t\treset: reset,\r\n\t\tregisterView: register,\r\n\t\tcreateView: createView,\r\n\t\tgetView: getView\r\n\t};\r\n\r\n\treturn factory;\r\n};\r\n\r\nexport default {\r\n\tcreateFactory: uiFactory\r\n};\r\n\r\n","import * as domHelpers from \"./utils/dom_helpers\";\r\n\r\nvar createMouseHandler = (function(domHelpers) {\r\n\treturn function (gantt) {\r\n\t\tvar eventHandlers = {\r\n\t\t\t\"click\": {},\r\n\t\t\t\"doubleclick\": {},\r\n\t\t\t\"contextMenu\": {}\r\n\t\t};\r\n\r\n\t\tfunction addEventTarget(event, className, handler, root) {\r\n\t\t\tif(!eventHandlers[event][className]){\r\n\t\t\t\teventHandlers[event][className] = [];\r\n\t\t\t}\r\n\r\n\t\t\teventHandlers[event][className].push({\r\n\t\t\t\thandler: handler,\r\n\t\t\t\troot: root\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfunction callHandler(eventName, className, root, args) {\r\n\t\t\tvar handlers = eventHandlers[eventName][className];\r\n\t\t\tif(handlers){\r\n\t\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\t\tif(!(root || handlers[i].root) || handlers[i].root === root){\r\n\t\t\t\t\t\thandlers[i].handler.apply(this, args);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction onClick(e) {\r\n\t\t\te = e || window.event;\r\n\t\t\tvar id = gantt.locate(e);\r\n\r\n\t\t\tvar handlers = findEventHandlers(e, eventHandlers.click);\r\n\t\t\tvar res = true;\r\n\t\t\tif (id !== null) {\r\n\t\t\t\tres = !gantt.checkEvent(\"onTaskClick\") || gantt.callEvent(\"onTaskClick\", [id, e]);\r\n\t\t\t} else {\r\n\t\t\t\tgantt.callEvent(\"onEmptyClick\", [e]);\r\n\t\t\t}\r\n\r\n\t\t\tif (res) {\r\n\t\t\t\tvar default_action = callEventHandlers(handlers, e, id);\r\n\t\t\t\tif (!default_action)\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\t// GS-1025: if we don't do that, the dropdown or date select will be closed for unselected tasks\r\n\t\t\t\t// GS-1078: or for the built-in select inline editor\r\n\t\t\t\tswitch(e.target.nodeName) {\r\n\t\t\t\t\tcase \"SELECT\":\r\n\t\t\t\t\tcase 'INPUT':\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//allow task selection when the multiselect plugin is not enabled\r\n\t\t\t\tif (id && gantt.getTask(id) && !gantt._multiselect && gantt.config.select_task) {\r\n\t\t\t\t\tgantt.selectTask(id);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction onContextMenu(e) {\r\n\t\t\te = e || window.event;\r\n\t\t\tvar src = e.target || e.srcElement,\r\n\t\t\t\ttaskId = gantt.locate(src),\r\n\t\t\t\tlinkId = gantt.locate(src, gantt.config.link_attribute);\r\n\r\n\t\t\tvar res = !gantt.checkEvent(\"onContextMenu\") || gantt.callEvent(\"onContextMenu\", [taskId, linkId, e]);\r\n\t\t\tif (!res) {\r\n\t\t\t\tif (e.preventDefault)\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\telse\r\n\t\t\t\t\te.returnValue = false;\r\n\t\t\t}\r\n\t\t\treturn res;\r\n\t\t}\r\n\r\n\t\tfunction findEventHandlers(e, hash){\r\n\t\t\tvar trg = e.target || e.srcElement;\r\n\t\t\tvar handlers = [];\r\n\t\t\twhile (trg) {\r\n\t\t\t\tvar css = domHelpers.getClassName(trg);\r\n\t\t\t\tif (css) {\r\n\t\t\t\t\tcss = css.split(\" \");\r\n\t\t\t\t\tfor (var i = 0; i < css.length; i++) {\r\n\t\t\t\t\t\tif (!css[i]) continue;\r\n\t\t\t\t\t\tif (hash[css[i]]) {\r\n\t\t\t\t\t\t\tvar delegateHandlers = hash[css[i]];\r\n\r\n\t\t\t\t\t\t\tfor(var h = 0; h < delegateHandlers.length; h++){\r\n\t\t\t\t\t\t\t\tif(delegateHandlers[h].root){\r\n\t\t\t\t\t\t\t\t\tif(!domHelpers.isChildOf(trg, delegateHandlers[h].root)){\r\n\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\thandlers.push(delegateHandlers[h].handler);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttrg = trg.parentNode;\r\n\t\t\t}\r\n\t\t\treturn handlers;\r\n\t\t}\r\n\r\n\t\tfunction callEventHandlers(handlers, e, id){\r\n\t\t\tvar res = true;\r\n\r\n\t\t\tfor(var i = 0; i < handlers.length; i++){\r\n\t\t\t\tvar handlerResult = handlers[i].call(gantt, e, id, e.target || e.srcElement);\r\n\t\t\t\tres = res && !(typeof handlerResult != \"undefined\" && handlerResult !== true);\r\n\t\t\t}\r\n\r\n\t\t\treturn res;\r\n\t\t}\r\n\r\n\r\n\t\tfunction onDoubleClick(e) {\r\n\t\t\te = e || window.event;\r\n\t\t\tvar id = gantt.locate(e);\r\n\r\n\t\t\tvar handlers = findEventHandlers(e, eventHandlers.doubleclick);\r\n\t\t\t// when doubleclick fired not on task, id === null\r\n\t\t\tvar res = !gantt.checkEvent(\"onTaskDblClick\") || id === null || gantt.callEvent(\"onTaskDblClick\", [id, e]);\r\n\t\t\tif (res) {\r\n\t\t\t\tvar default_action = callEventHandlers(handlers, e, id);\r\n\t\t\t\tif (!default_action)\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\tif (id !== null && gantt.getTask(id)) {\r\n\t\t\t\t\tif (res && gantt.config.details_on_dblclick && !gantt.isReadonly(id)) {\r\n\t\t\t\t\t\tgantt.showLightbox(id);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction onMouseMove(e) {\r\n\t\t\tif (gantt.checkEvent(\"onMouseMove\")) {\r\n\t\t\t\tvar id = gantt.locate(e);\r\n\t\t\t\tgantt._last_move_event = e;\r\n\t\t\t\tgantt.callEvent(\"onMouseMove\", [id, e]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction detach(eventName, className, handler, root) {\r\n\t\t\tif (eventHandlers[eventName] && eventHandlers[eventName][className]) {\r\n\t\t\t\tvar handlers = eventHandlers[eventName];\r\n\t\t\t\tvar elementHandlers = handlers[className];\r\n\t\t\t\tfor(var i = 0; i < elementHandlers.length; i++){\r\n\t\t\t\t\tif(elementHandlers[i].root == root){\r\n\t\t\t\t\t\telementHandlers.splice(i, 1);\r\n\t\t\t\t\t\ti--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(!elementHandlers.length){\r\n\t\t\t\t\tdelete handlers[className];\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar domEvents = gantt._createDomEventScope();\r\n\r\n\t\tfunction reset(node){\r\n\r\n\t\t\tdomEvents.detachAll();\r\n\r\n\t\t\tif(node){\r\n\t\t\t\tdomEvents.attach(node, \"click\", onClick);\r\n\t\t\t\tdomEvents.attach(node, \"dblclick\", onDoubleClick);\r\n\t\t\t\tdomEvents.attach(node, \"mousemove\", onMouseMove);\r\n\t\t\t\tdomEvents.attach(node, \"contextmenu\", onContextMenu);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\r\n\t\treturn {\r\n\t\t\treset: reset,\r\n\t\t\tglobal: function(event, classname, handler){\r\n\t\t\t\taddEventTarget(event, classname, handler, null);\r\n\t\t\t},\r\n\t\t\tdelegate: addEventTarget,\r\n\t\t\tdetach: detach,\r\n\t\t\tcallHandler: callHandler,\r\n\t\t\tonDoubleClick: onDoubleClick,\r\n\t\t\tonMouseMove: onMouseMove,\r\n\t\t\tonContextMenu: onContextMenu,\r\n\t\t\tonClick: onClick,\r\n\t\t\tdestructor: function(){\r\n\t\t\t\treset();\r\n\t\t\t\teventHandlers = null;\r\n\t\t\t\tdomEvents = null;\r\n\t\t\t}\r\n\r\n\t\t};\r\n\t};\r\n\r\n})(domHelpers);\r\n\r\n\r\nexport default {\r\n\tinit:createMouseHandler\r\n};","export default function(viewport, box, gantt){\r\n\tif(!box){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif(box.left > viewport.x_end || box.left + box.width < viewport.x){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif(box.top > viewport.y_end || box.top + box.height < viewport.y){\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\treturn true;\r\n};","export default function(gantt){\r\n\treturn gantt.config.smart_rendering && gantt._smart_render;\r\n};","export default function(item, view, config){\r\n\treturn {\r\n\t\ttop: view.getItemTop(item.id),\r\n\t\theight: view.getItemHeight(item.id),\r\n\t\tleft: 0,\r\n\t\tright: Infinity\r\n\t};\r\n};","export default function getVisibleTasksRange(gantt, view, config, datastore, viewport){\r\n\tvar buffer = 1;\r\n\tvar start = view.getItemIndexByTopPosition(viewport.y) || 0;\r\n\tvar end = view.getItemIndexByTopPosition(viewport.y_end) || datastore.count();\r\n\tvar indexStart = Math.max(0, start - buffer);\r\n\tvar indexEnd = Math.min(datastore.count(), end + buffer);\r\n\t// GS-2481 and GS-1715, need to take into account selected task when using keyboard shortcuts and when the inline editor is opened \r\n\tconst extraTasksIds= [];\r\n\tif (gantt.config.keyboard_navigation && gantt.getSelectedId()) {\r\n\t\textraTasksIds.push(gantt.getSelectedId());\r\n\t}\r\n\tif (gantt.$ui.getView(\"grid\") && gantt.ext.inlineEditors && gantt.ext.inlineEditors.getState().id) {\r\n\t\tlet inlineEditorId = gantt.ext.inlineEditors.getState().id;\r\n\t\tif (datastore.exists(inlineEditorId)){\r\n\t\t\textraTasksIds.push(inlineEditorId);\r\n\t\t}\r\n\t}\r\n\treturn {\r\n\t\tstart: indexStart,\r\n\t\tend: indexEnd,\r\n\t\tids: extraTasksIds \r\n\t};\r\n};","import genericViewPortChecker from \"./viewport/is_in_viewport\";\r\nimport isLegacyRender from \"./is_legacy_smart_render\";\r\nimport basicGetRectangle from \"./viewport/get_grid_row_rectangle\";\r\nimport basicGetRange from \"./viewport/get_visible_bars_range\";\r\nvar rendererFactory = function(gantt){\r\n\r\n\t//hash of dom elements is needed to redraw single bar/link\r\n\tvar task_area_pulls = {},\r\n\t\ttask_area_renderers = {};\r\n\r\n\tfunction getView(layer){\r\n\t\tvar view = null;\r\n\t\tif (typeof layer.view === \"string\") {\r\n\t\t\tview = gantt.$ui.getView(layer.view);\r\n\t\t} else if (layer.view) {\r\n\t\t\tview = layer.view;\r\n\t\t}\r\n\t\treturn view;\r\n\t}\r\n\r\n\tfunction getRenderer(id, layer, node) {\r\n\t\t\r\n\t\tif (task_area_renderers[id])\r\n\t\t\treturn task_area_renderers[id];\r\n\r\n\t\tif (!layer.renderer)\r\n\t\t\tgantt.assert(false, \"Invalid renderer call\");\r\n\r\n\t\tvar renderMethod = null;\r\n\t\tvar updateMethod = null;\r\n\t\tvar getRectangle = null;\r\n\t\tvar renderCallbackMethod = null;\r\n\t\tvar specializedViewPortChecker = null;\r\n\r\n\t\tif(typeof layer.renderer === \"function\"){\r\n\t\t\trenderMethod = layer.renderer;\r\n\t\t\tgetRectangle = basicGetRectangle;\r\n\t\t}else{\r\n\t\t\trenderMethod = layer.renderer.render;\r\n\t\t\tupdateMethod = layer.renderer.update;\r\n\t\t\trenderCallbackMethod = layer.renderer.onrender;\r\n\t\t\t\r\n\t\t\tif(layer.renderer.isInViewPort){\r\n\t\t\t\tspecializedViewPortChecker = layer.renderer.isInViewPort;\r\n\t\t\t}else{\r\n\t\t\t\tgetRectangle = layer.renderer.getRectangle;\r\n\t\t\t}\r\n\r\n\t\t\tif (!getRectangle && getRectangle !== null) {\r\n\t\t\t\tgetRectangle = basicGetRectangle;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar filter = layer.filter;\r\n\r\n\t\tif (node)\r\n\t\t\tnode.setAttribute(gantt.config.layer_attribute, true);\r\n\r\n\t\ttask_area_renderers[id] = {\r\n\t\t\trender_item: function (item, container, viewPort, layerView, viewConfig) {\r\n\t\t\t\tcontainer = container || node;\r\n\t\t\t\tif (filter) {\r\n\t\t\t\t\tif (!filter(item)) {\r\n\t\t\t\t\t\tthis.remove_item(item.id);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar view = layerView || getView(layer);\r\n\t\t\t\tvar config = viewConfig || (view ? view.$getConfig() : null);\r\n\t\t\t\tvar rendererViewPort = viewPort;\r\n\t\t\t\tif(!rendererViewPort && config && config.smart_rendering){\r\n\t\t\t\t\trendererViewPort = view.getViewPort();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar dom = null;\r\n\t\t\t\tif(!isLegacyRender(gantt) && (getRectangle || specializedViewPortChecker) && rendererViewPort){\r\n\t\t\t\t\tvar isVisible = false;\r\n\t\t\t\t\tif(specializedViewPortChecker){\r\n\t\t\t\t\t\tisVisible = specializedViewPortChecker(item, rendererViewPort, view, config, gantt);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tisVisible = genericViewPortChecker(rendererViewPort, getRectangle(item, view, config, gantt), gantt);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(isVisible){\r\n\t\t\t\t\t\tdom = renderMethod.call(gantt, item, view, config, rendererViewPort);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdom = renderMethod.call(gantt, item, view, config, rendererViewPort);\r\n\t\t\t\t}\r\n\t\t\t\tthis.append(item, dom, container);\r\n\r\n\t\t\t\tvar useBuffer = container.nodeType == 11;//DocumentFragment\r\n\t\t\t\tif(renderCallbackMethod && !useBuffer && dom) {\r\n\t\t\t\t\trenderCallbackMethod.call(gantt, item, dom, view);\r\n\t\t\t\t} \r\n\t\t\t},\r\n\r\n\t\t\tclear: function (container) {\r\n\r\n\t\t\t\tthis.rendered = task_area_pulls[id] = {};\r\n\t\t\t\tif(!layer.append)\r\n\t\t\t\t\tthis.clear_container(container);\r\n\t\t\t},\r\n\t\t\tclear_container: function (container) {\r\n\t\t\t\tcontainer = container || node;\r\n\t\t\t\tif (container){\r\n\t\t\t\t\tcontainer.innerHTML = \"\";\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tget_visible_range: function(datastore){\r\n\t\t\t\tvar view = getView(layer);\r\n\t\t\t\tvar viewport;\r\n\t\t\t\tvar viewConfig = view ? view.$getConfig() : null;\r\n\t\t\t\tif(viewConfig && viewConfig.smart_rendering){\r\n\t\t\t\t\tviewport = view.getViewPort();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar range;\r\n\t\t\t\tif(view && viewport){\r\n\t\t\t\t\tif(typeof layer.renderer === \"function\"){\r\n\t\t\t\t\t\trange = basicGetRange(gantt, view, viewConfig, datastore, viewport);\r\n\t\t\t\t\t}else if(layer.renderer && layer.renderer.getVisibleRange){\r\n\t\t\t\t\t\trange = layer.renderer.getVisibleRange(gantt, view, viewConfig, datastore, viewport);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(!range){\r\n\t\t\t\t\trange = {\r\n\t\t\t\t\t\tstart: 0,\r\n\t\t\t\t\t\tend: datastore.count()\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn range;\r\n\t\t\t},\r\n\t\t\tprepare_data: function(items){\r\n\t\t\t\tif(layer.renderer && layer.renderer.prepareData){\r\n\t\t\t\t\treturn layer.renderer.prepareData(items, gantt, layer);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\trender_items: function (items, container) {\r\n\t\t\t\tcontainer = container || node;\r\n\r\n\t\t\t\tvar buffer = document.createDocumentFragment();\r\n\t\t\t\tthis.clear(container);\r\n\r\n\t\t\t\tvar viewPort = null;\r\n\t\t\t\tvar view = getView(layer);\r\n\t\t\t\tvar viewConfig = view ? view.$getConfig() : null;\r\n\t\t\t\tif(viewConfig && viewConfig.smart_rendering){\r\n\t\t\t\t\tviewPort = view.getViewPort();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor (var i = 0, vis = items.length; i < vis; i++) {\r\n\t\t\t\t\tthis.render_item(items[i], buffer, viewPort, view, viewConfig);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcontainer.appendChild(buffer, container);\r\n\r\n\t\t\t\tvar itemsSearch = {};\r\n\t\t\t\titems.forEach(function(item){\r\n\t\t\t\t\titemsSearch[item.id] = item;\r\n\t\t\t\t});\r\n\t\t\t\tvar renderedItems = {};\r\n\t\t\t\tif (renderCallbackMethod) {\r\n\t\t\t\t\tvar newElements = {};\r\n\t\t\t\t\tfor(var i in this.rendered) {\r\n\t\t\t\t\t\tif(!renderedItems[i]){\r\n\t\t\t\t\t\t\tnewElements[i] = this.rendered[i];\r\n\t\t\t\t\t\t\trenderCallbackMethod.call(gantt, itemsSearch[i], this.rendered[i], view);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tupdate_items: function (items, container) {\r\n\t\t\t\tvar view = getView(layer);\r\n\t\t\t\tvar viewConfig = view ? view.$getConfig() : null;\r\n\t\t\t\tif(!view || !view.$getConfig().smart_rendering || isLegacyRender(gantt)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!this.rendered){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!(getRectangle || specializedViewPortChecker)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcontainer = container || node;\r\n\r\n\t\t\t\tvar buffer = document.createDocumentFragment();\r\n\r\n\t\t\t\tvar viewPort = null;\r\n\t\t\t\tif(view){\r\n\t\t\t\t\tviewPort = view.getViewPort();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar itemsSearch = {};\r\n\t\t\t\titems.forEach(function(item){\r\n\t\t\t\t\titemsSearch[item.id] = item;\r\n\t\t\t\t});\r\n\t\t\t\tvar renderedItems = {};\r\n\r\n\t\t\t\tvar nodesToRemove = {};\r\n\t\t\t\tfor(var i in this.rendered){\r\n\t\t\t\t\tnodesToRemove[i] = true;\r\n\t\t\t\t\trenderedItems[i] = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tvar renderCalledFor = {};\r\n\t\t\t\tfor (var i = 0, vis = items.length; i < vis; i++) {\r\n\t\t\t\t\tvar item = items[i];\r\n\t\t\t\t\tvar itemNode = this.rendered[item.id];\r\n\t\t\t\t\tnodesToRemove[item.id] = false;\r\n\t\t\t\t\tif (itemNode && itemNode.parentNode) {\r\n\t\t\t\t\t\tvar isVisible = false;\r\n\t\t\t\t\t\tif(specializedViewPortChecker){\r\n\t\t\t\t\t\t\tisVisible = specializedViewPortChecker(item, viewPort, view, viewConfig, gantt);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tisVisible = genericViewPortChecker(viewPort, getRectangle(item, view, viewConfig, gantt), gantt);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!isVisible) {\r\n\t\t\t\t\t\t\tnodesToRemove[item.id] = true;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif(updateMethod){\r\n\t\t\t\t\t\t\t\tupdateMethod.call(gantt, item, itemNode, view, viewConfig, viewPort);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tthis.restore(item, buffer);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\trenderCalledFor[items[i].id] = true;\r\n\t\t\t\t\t\tthis.render_item(items[i], buffer, viewPort, view, viewConfig);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfor(var i in nodesToRemove){\r\n\t\t\t\t\tif(nodesToRemove[i]){\r\n\t\t\t\t\t\tthis.hide(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif(buffer.childNodes.length){\r\n\t\t\t\t\tcontainer.appendChild(buffer, container);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (renderCallbackMethod) {\r\n\t\t\t\t\tvar newElements = {};\r\n\t\t\t\t\tfor(var i in this.rendered) {\r\n\t\t\t\t\t\tif(!renderedItems[i] || renderCalledFor[i]){\r\n\t\t\t\t\t\t\tnewElements[i] = this.rendered[i];\r\n\t\t\t\t\t\t\trenderCallbackMethod.call(gantt, itemsSearch[i], this.rendered[i], view);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tappend: function (item, node, container) {\r\n\t\t\t\tif(!this.rendered){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!node) {\r\n\t\t\t\t\tif (this.rendered[item.id]) {\r\n\t\t\t\t\t\tthis.remove_item(item.id);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.rendered[item.id] && this.rendered[item.id].parentNode) {\r\n\t\t\t\t\tthis.replace_item(item.id, node);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontainer.appendChild(node);\r\n\t\t\t\t}\r\n\t\t\t\tthis.rendered[item.id] = node;\r\n\t\t\t},\r\n\t\t\treplace_item: function (item_id, newNode) {\r\n\t\t\t\tvar item = this.rendered[item_id];\r\n\t\t\t\tif (item && item.parentNode) {\r\n\t\t\t\t\titem.parentNode.replaceChild(newNode, item);\r\n\r\n\t\t\t\t}\r\n\t\t\t\tthis.rendered[item_id] = newNode;\r\n\t\t\t},\r\n\t\t\tremove_item: function (item_id) {\r\n\t\t\t\tthis.hide(item_id);\r\n\t\t\t\tdelete this.rendered[item_id];\r\n\t\t\t},\r\n\t\t\thide: function (item_id) {\r\n\t\t\t\tvar item = this.rendered[item_id];\r\n\t\t\t\tif (item && item.parentNode) {\r\n\t\t\t\t\titem.parentNode.removeChild(item);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\trestore: function (item, container) {\r\n\t\t\t\tvar dom = this.rendered[item.id];\r\n\t\t\t\tif (dom) {\r\n\t\t\t\t\tif (!dom.parentNode) {\r\n\t\t\t\t\t\tthis.append(item, dom, container || node);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.render_item(item, container || node);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tchange_id: function (oldid, newid) {\r\n\t\t\t\tthis.rendered[newid] = this.rendered[oldid];\r\n\t\t\t\tdelete this.rendered[oldid];\r\n\t\t\t},\r\n\t\t\trendered: task_area_pulls[id],\r\n\t\t\tnode: node,\r\n\t\t\tdestructor: function () {\r\n\t\t\t\tthis.clear();\r\n\t\t\t\tdelete task_area_renderers[id];\r\n\t\t\t\tdelete task_area_pulls[id];\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\treturn task_area_renderers[id];\r\n\t}\r\n\r\n\r\n\tfunction clearRenderers() {\r\n\t\tfor (var i in task_area_renderers) {\r\n\t\t\tgetRenderer(i).destructor();\r\n\t\t}\r\n\t}\r\n\r\n\treturn {\r\n\t\tgetRenderer: getRenderer,\r\n\t\tclearRenderers: clearRenderers\r\n\t};\r\n\r\n};\r\n\r\nexport default rendererFactory;","import renderFactoryProvider from \"./render_factory\";\r\nimport * as utils from \"../../../utils/utils\";\r\nimport * as domHelpers from \"../utils/dom_helpers\";\r\nimport isLegacyRender from \"./is_legacy_smart_render\";\r\n\r\nvar layerFactory = function(gantt){\r\n\r\n\tvar renderFactory = renderFactoryProvider(gantt);\r\n\treturn {\r\n\tcreateGroup: function (getContainer, relativeRoot, defaultFilters, initLayer) {\r\n\r\n\t\tvar renderGroup = {\r\n\t\t\ttempCollection: [],\r\n\t\t\trenderers: {},\r\n\t\t\tcontainer: getContainer,\r\n\t\t\tfilters: [],\r\n\t\t\tgetLayers: function () {\r\n\t\t\t\tthis._add();// add pending layers\r\n\r\n\t\t\t\tvar res = [];\r\n\t\t\t\tfor (var i in this.renderers) {\r\n\t\t\t\t\tres.push(this.renderers[i]);\r\n\t\t\t\t}\r\n\t\t\t\treturn res;\r\n\t\t\t},\r\n\t\t\tgetLayer: function (id) {\r\n\t\t\t\treturn this.renderers[id];\r\n\t\t\t},\r\n\t\t\t_add: function (layer) {\r\n\t\t\t\tif (layer) {\r\n\t\t\t\t\tlayer.id = layer.id || utils.uid();\r\n\t\t\t\t\tthis.tempCollection.push(layer);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar container = this.container();\r\n\r\n\t\t\t\tvar pending = this.tempCollection;\r\n\t\t\t\tfor (var i = 0; i < pending.length; i++) {\r\n\t\t\t\t\tlayer = pending[i];\r\n\r\n\t\t\t\t\tif (!this.container() && !(layer && layer.container && domHelpers.isChildOf(layer.container, document.body))) continue;\r\n\r\n\t\t\t\t\tvar node = layer.container,\r\n\t\t\t\t\t\tid = layer.id,\r\n\t\t\t\t\t\ttopmost = layer.topmost;\r\n\t\t\t\t\tif (!node.parentNode) {\r\n\t\t\t\t\t\t//insert on top or below the tasks\r\n\t\t\t\t\t\tif (topmost) {\r\n\t\t\t\t\t\t\tcontainer.appendChild(node);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvar rel = relativeRoot ? relativeRoot() : container.firstChild;\r\n\t\t\t\t\t\t\t// GS-1274: if we don't add the second check, Gantt stops working if\r\n\t\t\t\t\t\t\t// we add the task layer without the timeline and switch to a layout with the timeline\r\n\t\t\t\t\t\t\tif (rel && rel.parentNode == container)\r\n\t\t\t\t\t\t\t\tcontainer.insertBefore(node, rel);\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tcontainer.appendChild(node);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.renderers[id] = renderFactory.getRenderer(\r\n\t\t\t\t\t\tid,\r\n\t\t\t\t\t\tlayer,\r\n\t\t\t\t\t\tnode\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tif (initLayer) {\r\n\t\t\t\t\t\tinitLayer(layer, gantt);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.tempCollection.splice(i, 1);\r\n\t\t\t\t\ti--;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\taddLayer: function (config) {\r\n\t\t\t\tif(config){\r\n\t\t\t\t\tif(typeof config == \"function\"){\r\n\t\t\t\t\t\tconfig = {renderer: config};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(config.filter === undefined){\r\n\t\t\t\t\t\tconfig.filter = mergeFilters(defaultFilters || []);\r\n\t\t\t\t\t}else if(config.filter instanceof Array){\r\n\t\t\t\t\t\tconfig.filter.push(defaultFilters);\r\n\t\t\t\t\t\tconfig.filter = mergeFilters(config.filter);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(!config.container){\r\n\t\t\t\t\t\tconfig.container = document.createElement(\"div\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar self = this;\r\n\t\t\t\t\tconfig.requestUpdate = function(){\r\n\t\t\t\t\t\tif(gantt.config.smart_rendering && !isLegacyRender(gantt)){\r\n\t\t\t\t\t\t\tif(self.renderers[config.id]){\r\n\t\t\t\t\t\t\t\tself.onUpdateRequest(self.renderers[config.id]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._add(config);\r\n\t\t\t\treturn (config ? config.id : undefined);\r\n\t\t\t},\r\n\t\t\tonUpdateRequest: function(layer){\r\n\r\n\t\t\t},\r\n\r\n\t\t\teachLayer: function(code){\r\n\t\t\t\tfor (var i in this.renderers) {\r\n\t\t\t\t\tcode(this.renderers[i]);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tremoveLayer: function (id) {\r\n\t\t\t\tif(!this.renderers[id])\r\n\t\t\t\t\treturn;\r\n\t\t\t\tthis.renderers[id].destructor();\r\n\t\t\t\tdelete this.renderers[id];\r\n\t\t\t},\r\n\t\t\tclear: function () {\r\n\t\t\t\tfor (var i in this.renderers) {\r\n\t\t\t\t\tthis.renderers[i].destructor();\r\n\t\t\t\t}\r\n\t\t\t\tthis.renderers = {};\r\n\t\t\t}//,\r\n\t\t\t//prepareConfig: prepareConfig\r\n\t\t};\r\n\r\n\t\tgantt.attachEvent(\"onDestroy\", function(){\r\n\t\t\trenderGroup.clear();\r\n\t\t\trenderGroup = null;\r\n\t\t});\r\n\r\n\t\treturn renderGroup;\r\n\t}\r\n};};\r\n\r\n\r\nfunction mergeFilters(filter_methods){\r\n\tif(!(filter_methods instanceof Array)){\r\n\t\tfilter_methods = Array.prototype.slice.call(arguments, 0);\r\n\t}\r\n\r\n\treturn function(obj){\r\n\t\tvar res = true;\r\n\t\tfor(var i = 0, len = filter_methods.length; i < len; i++){\r\n\t\t\tvar filter_method = filter_methods[i];\r\n\t\t\tif(filter_method){\r\n\t\t\t\tres = res && (filter_method(obj.id, obj) !== false);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn res;\r\n\t};\r\n}\r\n\r\n\r\nexport default layerFactory;\r\n","export default function(item, view, config){\r\n\tif(!item.start_date || !item.end_date){\r\n\t\treturn null;\r\n\t}\r\n\tvar padding = 200;\r\n\tvar startCoord = view.posFromDate(item.start_date);\r\n\tvar endCoord = view.posFromDate(item.end_date);\r\n\tvar left = Math.min(startCoord, endCoord) - padding;\r\n\tvar right = Math.max(startCoord, endCoord) + padding;\r\n\treturn {\r\n\t\ttop: view.getItemTop(item.id),\r\n\t\theight: view.getItemHeight(item.id),\r\n\t\tleft: left,\r\n\t\twidth: right - left\r\n\t};\r\n};","import getLinkRectangle from \"../get_link_rectangle\";\r\n\r\nexport default function(){\r\n\tvar coordinates = [];\r\n\tvar calculated = false;\r\n\r\n\tfunction clearCache(){\r\n\t\tcoordinates = [];\r\n\t\tcalculated = false;\r\n\t}\r\n\r\n\tfunction buildCache(datastore, view, gantt){\r\n\t\tvar config = view.$getConfig();\r\n\t\tvar visibleItems = datastore.getVisibleItems();\r\n\t\t//datastore.eachItem(function(link){\r\n\t\tvisibleItems.forEach(function(link){\r\n\t\t\tvar rec = getLinkRectangle(link, view, config, gantt);\r\n\t\t\tif(!rec){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tcoordinates.push({id: link.id, rec: rec});\r\n\t\t});\r\n\r\n\t\tcoordinates.sort(function(a, b){\r\n\t\t\tif(a.rec.right < b.rec.right){\r\n\t\t\t\treturn -1;\r\n\t\t\t}else {\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tcalculated = true;\r\n\t}\r\n\r\n\tvar initialized = false;\r\n\tfunction init(datastore){\r\n\t\tif(initialized){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tinitialized = true;\r\n\t\tdatastore.attachEvent(\"onPreFilter\", clearCache);\r\n\t\tdatastore.attachEvent(\"onStoreUpdated\", clearCache);\r\n\t\tdatastore.attachEvent(\"onClearAll\", clearCache);\r\n\t\tdatastore.attachEvent(\"onBeforeStoreUpdate\", clearCache);\r\n\t}\r\n\r\n\treturn function getVisibleLinksRange(gantt, view, config, datastore, viewport){\r\n\t\tinit(datastore);\r\n\t\tif(!calculated){\r\n\t\t\tbuildCache(datastore, view, gantt);\r\n\t\t}\r\n\r\n\t\tvar visibleBoxes = [];\r\n\t\tfor(var i = 0; i < coordinates.length; i++){\r\n\t\t\tvar item = coordinates[i];\r\n\t\t\tvar box = item.rec;\r\n\t\t\tif(box.right < viewport.x){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif(box.left < viewport.x_end && box.right > viewport.x && box.top < viewport.y_end && box.bottom > viewport.y){\r\n\t\t\t\tvisibleBoxes.push(item.id);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn {\r\n\t\t\tids: visibleBoxes\r\n\t\t};\r\n\t};\r\n};","\r\n\r\nimport barRectangle from \"./get_bar_rectangle\";\r\n\r\nexport default function getLinkBox(item, view, config, gantt){\r\n\tif(!gantt.isTaskExists(item.source)){\r\n\t\treturn null;\r\n\t}\r\n\r\n\tif(!gantt.isTaskExists(item.target)){\r\n\t\treturn null;\r\n\t}\r\n\tvar sourceBox = barRectangle(gantt.getTask(item.source), view, gantt);\r\n\tvar targetBox = barRectangle(gantt.getTask(item.target), view, gantt);\r\n\r\n\tif(!sourceBox || !targetBox){\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar padding = 100;\r\n\tvar left = Math.min(sourceBox.left, targetBox.left) - padding;\r\n\tvar right = Math.max(sourceBox.left + sourceBox.width, targetBox.left + targetBox.width) + padding;\r\n\tvar top = Math.min(sourceBox.top, targetBox.top) - padding;\r\n\tvar bottom = Math.max(sourceBox.top + sourceBox.height, targetBox.top + targetBox.height) + padding;\r\n\r\n\treturn {\r\n\t\ttop: top,\r\n\t\theight: bottom - top,\r\n\t\tbottom,\r\n\t\tleft: left,\r\n\t\twidth: right - left,\r\n\t\tright\r\n\t};\r\n};\r\n","\r\n// optimized checker for links smart rendering\r\n\r\n// first check the vertical position since it's easier to calculate\r\n\r\nexport default function isLinkInViewPort(item, viewport, view, config, gantt){\r\n\tvar source = view.$gantt.getTask(item.source);\r\n\tvar target = view.$gantt.getTask(item.target);\r\n\t// check vertical visibility first since it's a lighter check\r\n\tvar sourceTop = view.getItemTop(source.id);\r\n\tvar sourceHeight = view.getItemHeight(source.id);\r\n\r\n\tvar targetTop = view.getItemTop(target.id);\r\n\tvar targetHeight = view.getItemHeight(target.id);\r\n\r\n\tif(viewport.y > sourceTop + sourceHeight &&\r\n\t\tviewport.y > targetTop + targetHeight){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif(viewport.y_end < targetTop &&\r\n\t\tviewport.y_end < sourceTop){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tvar padding = 100;\r\n\tvar sourceLeft = view.posFromDate(source.start_date);\r\n\tvar sourceRight = view.posFromDate(source.end_date);\r\n\tvar targetLeft = view.posFromDate(target.start_date);\r\n\tvar targetRight = view.posFromDate(target.end_date);\r\n\r\n\tif(sourceLeft > sourceRight){\r\n\t\t// rtl\r\n\t\tvar tmp = sourceRight;\r\n\t\tsourceRight = sourceLeft;\r\n\t\tsourceLeft = tmp;\r\n\t}\r\n\tif(targetLeft > targetRight){\r\n\t\t// rtl\r\n\t\tvar tmp = targetRight;\r\n\t\ttargetRight = targetLeft;\r\n\t\ttargetLeft = tmp;\r\n\t}\r\n\tsourceLeft += -padding; // add buffer for custom elements\r\n\tsourceRight += padding;\r\n\ttargetLeft += -padding; // add buffer for custom elements\r\n\ttargetRight += padding;\r\n\r\n\tif(viewport.x > sourceRight &&\r\n\t\tviewport.x > targetRight){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif(viewport.x_end < sourceLeft &&\r\n\t\tviewport.x_end < targetLeft){\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n};\r\n","import createLayerFactory from \"./render/layer_engine\";\r\n\r\nimport getVisibleTaskRange from \"./render/viewport/get_visible_bars_range\";\r\nimport getVisibleLinksRangeFactory from \"./render/viewport/factory/get_visible_link_range\";\r\n\r\nimport isLinkInViewport from \"./render/viewport/is_link_in_viewport\";\r\n\r\nfunction initLayer(layer, gantt){\r\n\tif(!layer.view){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar view = layer.view;\r\n\tif(typeof view === \"string\"){\r\n\t\tview = gantt.$ui.getView(view);\r\n\t}\r\n\r\n\tif(view && view.attachEvent){\r\n\t\tview.attachEvent(\"onScroll\", function(){\r\n\t\t\tvar state = gantt.$services.getService(\"state\");\r\n\t\t\t// don't repaint if we're inside batchUpdate, a complete repaint will be called afterwards\r\n\t\t\tif(!state.getState(\"batchUpdate\").batch_update && !view.$config.$skipSmartRenderOnScroll){\r\n\t\t\t\tif(layer.requestUpdate){\r\n\t\t\t\t\tlayer.requestUpdate();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\nvar createLayerEngine = function(gantt){\r\n\tvar factory = createLayerFactory(gantt);\r\n\treturn {\r\n\t\tgetDataRender: function(name){\r\n\t\t\treturn gantt.$services.getService(\"layer:\" + name) || null;\r\n\t\t},\r\n\t\tcreateDataRender: function(config){\r\n\t\t\tvar name = config.name,\r\n\t\t\t\tdefaultContainer = config.defaultContainer,\r\n\t\t\t\tpreviusSiblingContainer = config.defaultContainerSibling;\r\n\r\n\t\t\tvar layers = factory.createGroup(\r\n\t\t\t\tdefaultContainer,\r\n\t\t\t\tpreviusSiblingContainer,\r\n\t\t\t\tfunction(itemId, item){\r\n\t\t\t\t\tif(layers.filters){\r\n\t\t\t\t\t\tfor(var i = 0; i < layers.filters.length; i++){\r\n\t\t\t\t\t\t\tif(layers.filters[i](itemId, item) === false){\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tinitLayer\r\n\t\t\t);\r\n\r\n\t\t\tgantt.$services.setService(\"layer:\" + name, function(){\r\n\t\t\t\treturn layers;\r\n\t\t\t});\r\n\r\n\t\t\tgantt.attachEvent(\"onGanttReady\", function () {\r\n\t\t\t\tlayers.addLayer();// init layers on start\r\n\t\t\t});\r\n\r\n\t\t\treturn layers;\r\n\t\t},\r\n\t\tinit: function(){\r\n\t\t\tvar taskLayers = this.createDataRender({\r\n\t\t\t\tname: \"task\",\r\n\t\t\t\tdefaultContainer: function(){\r\n\t\t\t\t\tif(gantt.$task_data){\r\n\t\t\t\t\t\treturn gantt.$task_data;\r\n\t\t\t\t\t}else if(gantt.$ui.getView(\"timeline\")){\r\n\t\t\t\t\t\treturn gantt.$ui.getView(\"timeline\").$task_data;\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tdefaultContainerSibling: function(){\r\n\t\t\t\t\tif(gantt.$task_links){\r\n\t\t\t\t\t\treturn gantt.$task_links;\r\n\t\t\t\t\t}else if(gantt.$ui.getView(\"timeline\")){\r\n\t\t\t\t\t\treturn gantt.$ui.getView(\"timeline\").$task_links;\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tfilter: function(item){\r\n\r\n\t\t\t\t}\r\n\t\t\t}, gantt);\r\n\r\n\t\t\tvar linkLayers = this.createDataRender({\r\n\t\t\t\tname: \"link\",\r\n\t\t\t\tdefaultContainer: function(){\r\n\t\t\t\t\tif(gantt.$task_data){\r\n\t\t\t\t\t\treturn gantt.$task_data;\r\n\t\t\t\t\t}else if(gantt.$ui.getView(\"timeline\")){\r\n\t\t\t\t\t\treturn gantt.$ui.getView(\"timeline\").$task_data;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, gantt);\r\n\r\n\t\t\treturn {\r\n\t\t\t\taddTaskLayer: function(config){\r\n\t\t\t\t\tconst rangeFunction = getVisibleTaskRange;\r\n\t\t\t\t\tif(typeof config === \"function\"){\r\n\t\t\t\t\t\tconfig = {\r\n\t\t\t\t\t\t\trenderer: {\r\n\t\t\t\t\t\t\t\trender: config,\r\n\t\t\t\t\t\t\t\tgetVisibleRange: rangeFunction\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(config.renderer && !config.renderer.getVisibleRange){\r\n\t\t\t\t\t\t\tconfig.renderer.getVisibleRange = rangeFunction;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconfig.view = \"timeline\";\r\n\r\n\t\t\t\t\treturn taskLayers.addLayer(config);\r\n\t\t\t\t},\r\n\r\n\t\t\t\t_getTaskLayers: function(){\r\n\t\t\t\t\treturn taskLayers.getLayers();\r\n\t\t\t\t},\r\n\t\t\t\tremoveTaskLayer: function(id){\r\n\t\t\t\t\ttaskLayers.removeLayer(id);\r\n\t\t\t\t},\r\n\r\n\t\t\t\t_clearTaskLayers: function(){\r\n\t\t\t\t\ttaskLayers.clear();\r\n\t\t\t\t},\r\n\t\t\t\taddLinkLayer: function(config){\r\n\t\t\t\t\tconst rangeFunction = getVisibleLinksRangeFactory();\r\n\t\t\t\t\tif(typeof config === \"function\"){\r\n\t\t\t\t\t\tconfig = {\r\n\t\t\t\t\t\t\trenderer: {\r\n\t\t\t\t\t\t\t\trender: config,\r\n\t\t\t\t\t\t\t\tgetVisibleRange: rangeFunction\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(config.renderer && !config.renderer.getVisibleRange){\r\n\t\t\t\t\t\t\tconfig.renderer.getVisibleRange = rangeFunction;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconfig.view = \"timeline\";\r\n\t\t\t\t\tif(config && config.renderer){\r\n\t\t\t\t\t\tif(!config.renderer.getRectangle && !config.renderer.isInViewPort){\r\n\t\t\t\t\t\t\tconfig.renderer.isInViewPort = isLinkInViewport;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn linkLayers.addLayer(config);\r\n\t\t\t\t},\r\n\r\n\t\t\t\t_getLinkLayers: function(){\r\n\t\t\t\t\treturn linkLayers.getLayers();\r\n\t\t\t\t},\r\n\t\t\t\tremoveLinkLayer: function(id){\r\n\t\t\t\t\tlinkLayers.removeLayer(id);\r\n\t\t\t\t},\r\n\r\n\t\t\t\t_clearLinkLayers: function(){\r\n\t\t\t\t\tlinkLayers.clear();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t};\r\n};\r\n\r\nexport default createLayerEngine;","import * as utils from \"../../../utils/utils\";\r\nimport eventable from \"../../../utils/eventable\";\r\nimport * as domHelpers from \"../utils/dom_helpers\";\r\n\r\nvar Cell = (function () {\r\n\t\"use strict\";\r\n\r\n\tfunction Cell(parent, config, factory, gantt) {\r\n\t\tif (parent) {\r\n\t\t\tthis.$container = domHelpers.toNode(parent);\r\n\t\t\tthis.$parent = parent;\r\n\t\t}\r\n\t\t// save config\r\n\t\tthis.$config = utils.mixin(config, {\r\n\t\t\theaderHeight: 33\r\n\t\t});\r\n\t\tthis.$gantt = gantt;\r\n\t\tthis.$domEvents = gantt._createDomEventScope();\r\n\t\t// set id\r\n\t\tthis.$id = config.id || \"c\" + utils.uid();\r\n\r\n\t\tthis.$name = \"cell\";\r\n\t\tthis.$factory = factory;\r\n\r\n\t\teventable(this);\r\n\r\n\t}\r\n\r\n\tCell.prototype.destructor = function () {\r\n\t\tthis.$parent = this.$container = this.$view = null;\r\n\t\tvar mouse = this.$gantt.$services.getService(\"mouseEvents\");\r\n\t\tmouse.detach(\"click\", \"gantt_header_arrow\", this._headerClickHandler);\r\n\t\tthis.$domEvents.detachAll();\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\t};\r\n\tCell.prototype.cell = function (id) {\r\n\t\treturn null;\r\n\t};\r\n\r\n\tCell.prototype.scrollTo = function(left, top){\r\n\r\n\t\t//GS-333 Add a way to scroll the HTML views:\r\n\t\tvar cell = this.$view;\r\n\t\tif (this.$config.html) cell = this.$view.firstChild;\r\n\r\n\t\tif (left*1 == left){\r\n\t\t\tcell.scrollLeft = left;\r\n\t\t}\r\n\t\tif(top*1 == top){\r\n\t\t\tcell.scrollTop = top;\r\n\t\t}\r\n\t};\r\n\r\n\tCell.prototype.clear = function(){\r\n\t\tthis.getNode().innerHTML = \"\";\r\n\t\tthis.getNode().className = \"gantt_layout_content\";\r\n\t\tthis.getNode().style.padding = \"0\";\r\n\t};\r\n\r\n\tCell.prototype.resize = function (final) {\r\n\t\tif (this.$parent) {\r\n\t\t\treturn this.$parent.resize(final);\r\n\t\t}\r\n\r\n\t\tif(final === false){\r\n\t\t\tthis.$preResize = true;\r\n\t\t}\r\n\r\n\t\tvar topCont = this.$container;\r\n\t\tvar x = topCont.offsetWidth;\r\n\t\tvar y = topCont.offsetHeight;\r\n\t\tvar topSize = this.getSize();\r\n\t\tif (topCont === document.body) {\r\n\t\t\tx = document.body.offsetWidth;\r\n\t\t\ty = document.body.offsetHeight;\r\n\t\t}\r\n\t\tif (x < topSize.minWidth) {\r\n\t\t\tx = topSize.minWidth;\r\n\t\t}\r\n\t\tif (x > topSize.maxWidth) {\r\n\t\t\tx = topSize.maxWidth;\r\n\t\t}\r\n\t\tif (y < topSize.minHeight) {\r\n\t\t\ty = topSize.minHeight;\r\n\t\t}\r\n\t\tif (y > topSize.maxHeight) {\r\n\t\t\ty = topSize.maxHeight;\r\n\t\t}\r\n\t\tthis.setSize(x, y);\r\n\r\n\t\tif(!this.$preResize){\r\n\t\t//\tself.callEvent(\"onResize\", [x, y]);\r\n\t\t}\r\n\t\tthis.$preResize = false;\r\n\t};\r\n\r\n\tCell.prototype.hide = function () {\r\n\t\tthis._hide(true);\r\n\t\tthis.resize();\r\n\t};\r\n\tCell.prototype.show = function (force) {\r\n\t\tthis._hide(false);\r\n\t\tif (force && this.$parent) {\r\n\t\t\tthis.$parent.show();\r\n\t\t}\r\n\t\tthis.resize();\r\n\t};\r\n\tCell.prototype._hide = function (mode) {\r\n\t\tif (mode === true && this.$view.parentNode) {\r\n\t\t\tthis.$view.parentNode.removeChild(this.$view);\r\n\t\t}\r\n\t\telse if (mode === false && !this.$view.parentNode) {\r\n\t\t\tvar index = this.$parent.cellIndex(this.$id);\r\n\t\t\tthis.$parent.moveView(this, index);\r\n\t\t}\r\n\t\tthis.$config.hidden = mode;\r\n\t};\r\n\tCell.prototype.$toHTML = function (content, css) {\r\n\t\tif (content === void 0) { content = \"\"; }\r\n\t\tcss = [(css || \"\"), (this.$config.css || \"\")].join(\" \");\r\n\t\tvar obj = this.$config;\r\n\t\tvar header = \"\";\r\n\t\tif (obj.raw) {\r\n\t\t\tcontent = typeof obj.raw === \"string\" ? obj.raw : \"\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (!content) {\r\n\t\t\t\tcontent = \"
\" + (obj.html || \"\") + \"
\";\r\n\t\t\t}\r\n\t\t\tif (obj.header) {\r\n\t\t\t\tvar collapseIcon = obj.canCollapse ? \"
\" : \"\";\r\n\t\t\t\theader = \"
\" + collapseIcon + \"
\" + obj.header + \"
\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"
\" + header + content + \"
\";\r\n\t};\r\n\tCell.prototype.$fill = function (node, parent) {\r\n\t\tthis.$view = node;\r\n\t\tthis.$parent = parent;\r\n\t\tthis.init();\r\n\t};\r\n\tCell.prototype.getNode = function () {\r\n\t\treturn (this.$view.querySelector(\"gantt_layout_cell\") || this.$view);\r\n\t};\r\n\tCell.prototype.init = function () {\r\n\t\t// [NOT-GOOD] code is executed for each component, while it still has only one handler, it is no good\r\n\r\n\t\tvar self = this;\r\n\r\n\t\tthis._headerClickHandler = function(e){\r\n\t\t\tvar cellId = domHelpers.locateAttribute(e, \"data-cell-id\");\r\n\t\t\tif(cellId == self.$id){\r\n\t\t\t\tself.toggle();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar mouse = this.$gantt.$services.getService(\"mouseEvents\");\r\n\t\tmouse.delegate(\"click\", \"gantt_header_arrow\", this._headerClickHandler);\r\n\r\n\t\tthis.callEvent(\"onReady\", []);\r\n\t};\r\n\tCell.prototype.toggle = function () {\r\n\t\tthis.$config.collapsed = !this.$config.collapsed;\r\n\t\tthis.resize();\r\n\t};\r\n\tCell.prototype.getSize = function () {\r\n\t\tvar size = {\r\n\t\t\theight: this.$config.height || 0,\r\n\t\t\twidth: this.$config.width || 0,\r\n\t\t\tgravity: this.$config.gravity || 1,\r\n\t\t\tminHeight: this.$config.minHeight || 0,\r\n\t\t\tminWidth: this.$config.minWidth || 0,\r\n\t\t\tmaxHeight: this.$config.maxHeight || 100000000000,\r\n\t\t\tmaxWidth: this.$config.maxWidth || 100000000000\r\n\t\t};\r\n\t\tif (this.$config.collapsed) {\r\n\t\t\tvar mode = this.$config.mode === \"x\";\r\n\t\t\tsize[mode ? \"width\" : \"height\"] = size[mode ? \"maxWidth\" : \"maxHeight\"] = this.$config.headerHeight;\r\n\t\t}\r\n\t\treturn size;\r\n\t};\r\n\r\n\tCell.prototype.getContentSize = function(){\r\n\r\n\t\tvar width = this.$lastSize.contentX;\r\n\t\tif(width !== width*1){\r\n\t\t\twidth = this.$lastSize.width;\r\n\t\t}\r\n\r\n\t\tvar height = this.$lastSize.contentY;\r\n\t\tif(height !== height*1){\r\n\t\t\theight = this.$lastSize.height;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\twidth: width,\r\n\t\t\theight: height\r\n\t\t};\r\n\t};\r\n\r\n\tCell.prototype._getBorderSizes = function(){\r\n\t\tvar borders = {\r\n\t\t\ttop: 0,\r\n\t\t\tright: 0,\r\n\t\t\tbottom: 0,\r\n\t\t\tleft: 0,\r\n\t\t\thorizontal: 0,\r\n\t\t\tvertical: 0\r\n\t\t};\r\n\t\tif(this._currentBorders){\r\n\t\t\tif(this._currentBorders[this._borders.left]){\r\n\t\t\t\tborders.left = 1;\r\n\t\t\t\tborders.horizontal++;\r\n\t\t\t}\r\n\r\n\t\t\tif(this._currentBorders[this._borders.right]){\r\n\t\t\t\tborders.right = 1;\r\n\t\t\t\tborders.horizontal++;\r\n\t\t\t}\r\n\r\n\t\t\tif(this._currentBorders[this._borders.top]){\r\n\t\t\t\tborders.top = 1;\r\n\t\t\t\tborders.vertical++;\r\n\t\t\t}\r\n\r\n\t\t\tif(this._currentBorders[this._borders.bottom]){\r\n\t\t\t\tborders.bottom = 1;\r\n\t\t\t\tborders.vertical++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn borders;\r\n\r\n\t};\r\n\r\n\tCell.prototype.setSize = function (x, y) {\r\n\t\tthis.$view.style.width = x + \"px\";\r\n\t\tthis.$view.style.height = y + \"px\";\r\n\r\n\t\tvar borders = this._getBorderSizes();\r\n\t\tvar contentY = y - borders.vertical;\r\n\t\tvar contentX = x - borders.horizontal;\r\n\r\n\t\tthis.$lastSize = { x: x, y: y, contentX: contentX, contentY: contentY };\r\n\t\tif (this.$config.header) {\r\n\t\t\tthis._sizeHeader();\r\n\t\t}else{\r\n\t\t\tthis._sizeContent();\r\n\t\t}\r\n\t};\r\n\r\n\tCell.prototype._borders = {\r\n\t\t\"left\":\"gantt_layout_cell_border_left\",\r\n\t\t\"right\":\"gantt_layout_cell_border_right\",\r\n\t\t\"top\":\"gantt_layout_cell_border_top\",\r\n\t\t\"bottom\":\"gantt_layout_cell_border_bottom\"\r\n\t};\r\n\r\n\tCell.prototype._setBorders = function(css, view){\r\n\t\tif(!view) {\r\n\t\t\tview = this;\r\n\t\t}\r\n\t\tvar node = view.$view;\r\n\r\n\t\tfor( var i in this._borders){\r\n\t\t\tdomHelpers.removeClassName(node, this._borders[i]);\r\n\t\t}\r\n\r\n\t\tif(typeof css == \"string\"){\r\n\t\t\tcss = [css];\r\n\t\t}\r\n\r\n\t\tvar cssHash = {};\r\n\r\n\t\tfor(var i = 0; i < css.length; i++){\r\n\t\t\tdomHelpers.addClassName(node, css[i]);\r\n\t\t\tcssHash[css[i]] = true;\r\n\t\t}\r\n\r\n\t\tview._currentBorders = cssHash;\r\n\t};\r\n\r\n\r\n\tCell.prototype._sizeContent = function(){\r\n\t\tvar content = this.$view.childNodes[0];\r\n\t\tif(content && content.className == \"gantt_layout_content\"){\r\n\t\t\tcontent.style.height = this.$lastSize.contentY + \"px\";\r\n\t\t}\r\n\t};\r\n\r\n\tCell.prototype._sizeHeader = function () {\r\n\t\tvar size = this.$lastSize;\r\n\t\tsize.contentY -= this.$config.headerHeight;\r\n\t\tvar header = this.$view.childNodes[0];\r\n\t\tvar content = this.$view.childNodes[1];\r\n\t\tvar xLayout = this.$config.mode === \"x\";\r\n\t\tif (this.$config.collapsed) {\r\n\t\t\tcontent.style.display = \"none\";\r\n\t\t\tif (xLayout) {\r\n\t\t\t\theader.className = \"gantt_layout_header collapsed_x\";\r\n\t\t\t\theader.style.width = size.y + \"px\";\r\n\t\t\t\tvar d = Math.floor(size.y / 2 - size.x / 2);\r\n\t\t\t\theader.style.transform = \"rotate(90deg) translate(\" + d + \"px, \" + d + \"px)\";\r\n\t\t\t\tcontent.style.display = \"none\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\theader.className = \"gantt_layout_header collapsed_y\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (xLayout) {\r\n\t\t\t\theader.className = \"gantt_layout_header\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\theader.className = \"gantt_layout_header vertical\";\r\n\t\t\t}\r\n\t\t\theader.style.width = 'auto';\r\n\t\t\theader.style.transform = '';\r\n\t\t\tcontent.style.display = \"\";\r\n\t\t\tcontent.style.height = size.contentY + \"px\";\r\n\t\t}\r\n\t\theader.style.height = this.$config.headerHeight + \"px\";\r\n\t};\r\n\treturn Cell;\r\n}());\r\n\r\nexport default Cell;\r\n","export default function (d, b) {\r\n\tfor (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\tfunction __() { this.constructor = d; }\r\n\td.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n};","import __extends from \"../../../utils/extends\";\r\nimport * as domHelpers from \"../utils/dom_helpers\";\r\nimport Cell from \"./cell\";\r\n\r\nvar Layout = (function (_super) {\r\n\t\"use strict\";\r\n\r\n\t__extends(Layout, _super);\r\n\tfunction Layout(parent, config, factory) {\r\n\t\tvar _this = _super.apply(this, arguments) || this;\r\n\r\n\t\tif(parent)\r\n\t\t\t_this.$root = true;\r\n\r\n\t\t_this._parseConfig(config);\r\n\t\t_this.$name = \"layout\";\r\n\t\treturn _this;\r\n\t}\r\n\r\n\tLayout.prototype.destructor = function () {\r\n\t\tif (this.$container && this.$view) {\r\n\t\t\tdomHelpers.removeNode(this.$view);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < this.$cells.length; i++) {\r\n\t\t\tvar child = this.$cells[i];\r\n\t\t\tchild.destructor();\r\n\t\t}\r\n\t\tthis.$cells = [];\r\n\r\n\t\t_super.prototype.destructor.call(this);\r\n\t};\r\n\r\n\tLayout.prototype._resizeScrollbars = function(autosize, scrollbars){\r\n\t\tvar scrollChanged = false;\r\n\t\tvar visibleScrollbars = [],\r\n\t\t\thiddenScrollbars = [];\r\n\r\n\t\tconst scrollbarsToHide = [];\r\n\r\n\t\tfunction showScrollbar(scrollbar){\r\n\t\t\tscrollbar.$parent.show();\r\n\t\t\tscrollChanged = true;\r\n\t\t\tvisibleScrollbars.push(scrollbar);\r\n\t\t}\r\n\t\tfunction hideScrollbar(scrollbar){\r\n\t\t\tscrollbar.$parent.hide();\r\n\t\t\tscrollChanged = true;\r\n\t\t\thiddenScrollbars.push(scrollbar);\r\n\t\t}\r\n\r\n\t\tvar scrollbar;\r\n\t\tfor(var i = 0; i < scrollbars.length; i++){\r\n\t\t\tscrollbar = scrollbars[i];\r\n\r\n\t\t\tif(autosize[scrollbar.$config.scroll]) {\r\n\t\t\t\thideScrollbar(scrollbar);\r\n\t\t\t}else if(scrollbar.shouldHide()){\r\n\t\t\t\t//hideScrollbar(scrollbar);\r\n\t\t\t\tscrollbarsToHide.push(scrollbar);\r\n\t\t\t}else if(scrollbar.shouldShow()){\r\n\t\t\t\tshowScrollbar(scrollbar);\r\n\t\t\t}else{\r\n\t\t\t\tif(scrollbar.isVisible()){\r\n\t\t\t\t\tvisibleScrollbars.push(scrollbar);\r\n\t\t\t\t}else{\r\n\t\t\t\t\thiddenScrollbars.push(scrollbar);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar visibleGroups = {};\r\n\t\tfor(var i = 0; i < visibleScrollbars.length; i++){\r\n\t\t\tif(visibleScrollbars[i].$config.group){\r\n\t\t\t\tvisibleGroups[visibleScrollbars[i].$config.group] = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// GS-2220\r\n\t\tscrollbarsToHide.forEach(function(scrollbar){\r\n\t\t\tif(!(scrollbar.$config.group && visibleGroups[scrollbar.$config.group])){\r\n\t\t\t\thideScrollbar(scrollbar);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tfor(var i = 0; i < hiddenScrollbars.length; i++){\r\n\t\t\tscrollbar = hiddenScrollbars[i];\r\n\r\n\t\t\tif(scrollbar.$config.group && visibleGroups[scrollbar.$config.group]){\r\n\t\t\t\tshowScrollbar(scrollbar);\r\n\t\t\t\t// GS-707 If the scrollbar was hidden then showed, the container resize shouldn't happen because of that\r\n\t\t\t\tfor(var j = 0; j < visibleScrollbars.length; j++){\r\n\t\t\t\t\tif(visibleScrollbars[j] == scrollbar){\r\n\t\t\t\t\t\tthis.$gantt.$scrollbarRepaint = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn scrollChanged;\r\n\t};\r\n\r\n\tLayout.prototype._syncCellSizes = function(groupName, newSize){\r\n\t\tif(!groupName)\r\n\t\t\treturn;\r\n\r\n\t\tvar groups = {};\r\n\r\n\t\tthis._eachChild(function(cell){\r\n\t\t\tif(cell.$config.group && cell.$name != \"scrollbar\" && cell.$name != \"resizer\"){\r\n\t\t\t\tif(!groups[cell.$config.group]){\r\n\t\t\t\t\tgroups[cell.$config.group] = [];\r\n\t\t\t\t}\r\n\t\t\t\tgroups[cell.$config.group].push(cell);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif(groups[groupName]){\r\n\t\t\tthis._syncGroupSize(groups[groupName], newSize);\r\n\t\t}\r\n\t\treturn groups[groupName];\r\n\t};\r\n\r\n\tLayout.prototype._syncGroupSize = function(cells, newSize){\r\n\t\tif(!cells.length) return;\r\n\r\n\t\tvar property = cells[0].$parent._xLayout ? \"width\" : \"height\";\r\n\t\tvar direction = cells[0].$parent.getNextSibling(cells[0].$id) ? 1 : -1;\r\n\r\n\t\tvar newSizeValue = newSize.value;\r\n\t\tvar isGravity = newSize.isGravity;\r\n\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\tvar ownSize = cells[i].getSize();\r\n\r\n\t\t\tvar resizeSibling = direction > 0 ? cells[i].$parent.getNextSibling(cells[i].$id) : cells[i].$parent.getPrevSibling(cells[i].$id);\r\n\t\t\tif(resizeSibling.$name == \"resizer\"){\r\n\t\t\t\tresizeSibling = direction > 0 ? resizeSibling.$parent.getNextSibling(resizeSibling.$id) : resizeSibling.$parent.getPrevSibling(resizeSibling.$id);\r\n\t\t\t}\r\n\t\t\tvar siblingSize = resizeSibling.getSize();\r\n\r\n\t\t\tif(!isGravity) {\r\n\t\t\t\tif(resizeSibling[property]){\r\n\t\t\t\t\tvar totalGravity = ownSize.gravity + siblingSize.gravity;\r\n\t\t\t\t\tvar totalSize = ownSize[property] + siblingSize[property];\r\n\t\t\t\t\tvar k = totalGravity / totalSize;\r\n\t\t\t\t\tcells[i].$config.gravity = k * newSizeValue;\r\n\r\n\t\t\t\t\tresizeSibling.$config[property] = totalSize - newSizeValue;\r\n\t\t\t\t\tresizeSibling.$config.gravity = totalGravity - k * newSizeValue;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcells[i].$config[property] = newSizeValue;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tcells[i].$config.gravity = newSizeValue;\r\n\t\t\t}\r\n\r\n\t\t\tvar mainGrid = this.$gantt.$ui.getView(\"grid\");\r\n\t\t\tif(mainGrid && cells[i].$content === mainGrid && !mainGrid.$config.scrollable && !isGravity){\r\n\t\t\t\tthis.$gantt.config.grid_width = newSizeValue;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tLayout.prototype.resize = function(startStage){\r\n\t\tvar mainCall = false;\r\n\t\tif(this.$root && !this._resizeInProgress){\r\n\t\t\tthis.callEvent(\"onBeforeResize\", []);\r\n\t\t\tmainCall = true;\r\n\t\t\tthis._resizeInProgress = true;\r\n\t\t}\r\n\r\n\t\t_super.prototype.resize.call(this, true);\r\n\t\t_super.prototype.resize.call(this, false);\r\n\r\n\t\tif(mainCall){\r\n\r\n\t\t\tvar contentViews = [];\r\n\t\t\tcontentViews = contentViews.concat(this.getCellsByType(\"viewCell\"));\r\n\t\t\tcontentViews = contentViews.concat(this.getCellsByType(\"viewLayout\"));\r\n\t\t\tcontentViews = contentViews.concat(this.getCellsByType(\"hostCell\"));\r\n\r\n\t\t\tvar scrollbars = this.getCellsByType(\"scroller\");\r\n\r\n\t\t\tfor(var i = 0; i < contentViews.length; i++){\r\n\t\t\t\tif(!contentViews[i].$config.hidden)\r\n\t\t\t\t\tcontentViews[i].setContentSize();\r\n\t\t\t}\r\n\r\n\t\t\tvar autosize = this._getAutosizeMode(this.$config.autosize);\r\n\r\n\t/* // possible to rollback set content size when autisize is disabled, not sure if need to\r\n\t\t\tcontentViews.forEach(function(view){\r\n\t\t\t\tconst parent = view.$parent;\r\n\t\t\t\tif(!autosize.x){\r\n\t\t\t\t\tif(parent.$config.$originalWidthStored){\r\n\t\t\t\t\t\tparent.$config.$originalWidthStored = false;\r\n\t\t\t\t\t\tparent.$config.width = parent.$config.$originalWidth;\r\n\t\t\t\t\t\tparent.$config.$originalWidth = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!autosize.y){\r\n\t\t\t\t\tif(parent.$config.$originalHeightStored){\r\n\t\t\t\t\t\tparent.$config.$originalHeightStored = false;\r\n\t\t\t\t\t\tparent.$config.height = parent.$config.$originalHeight;\r\n\t\t\t\t\t\tparent.$config.$originalHeight = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});*/\r\n\t\t\t\r\n\t\t\tvar scrollChanged = this._resizeScrollbars(autosize, scrollbars);\r\n\r\n\t\t\tif(this.$config.autosize){\r\n\t\t\t\tthis.autosize(this.$config.autosize);\r\n\t\t\t\tcontentViews.forEach(function(view){\r\n\t\t\t\t\tconst parent = view.$parent;\r\n\t\t\t\t\tconst sizes = parent.getContentSize(autosize);\r\n\t\t\t\t\tif(autosize.x){\r\n\t\t\t\t\t\tif(!parent.$config.$originalWidthStored){\r\n\t\t\t\t\t\t\tparent.$config.$originalWidthStored = true;\r\n\t\t\t\t\t\t\tparent.$config.$originalWidth = parent.$config.width;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tparent.$config.width = sizes.width;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(autosize.y){\r\n\t\t\t\t\t\tif(!parent.$config.$originalHeightStored){\r\n\t\t\t\t\t\t\tparent.$config.$originalHeightStored = true;\r\n\t\t\t\t\t\t\tparent.$config.$originalHeight = parent.$config.height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tparent.$config.height = sizes.height;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t\tscrollChanged = true;\r\n\t\t\t}\r\n\r\n\t\t\tif(scrollChanged){\r\n\t\t\t\tthis.resize();\r\n\t\t\t\tfor(var i = 0; i < contentViews.length; i++){\r\n\t\t\t\t\tif(!contentViews[i].$config.hidden)\r\n\t\t\t\t\t\tcontentViews[i].setContentSize();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.callEvent(\"onResize\", []);\r\n\t\t}\r\n\t\tif(mainCall){\r\n\t\t\tthis._resizeInProgress = false;\r\n\t\t}\r\n\t};\r\n\r\n\tLayout.prototype._eachChild = function(code, cell){\r\n\t\tcell = cell || this;\r\n\t\tcode(cell);\r\n\t\tif(cell.$cells){\r\n\t\t\tfor(var i = 0; i < cell.$cells.length; i++){\r\n\t\t\t\tthis._eachChild(code, cell.$cells[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tLayout.prototype.isChild = function(view){\r\n\t\tvar res = false;\r\n\t\tthis._eachChild(function(child){\r\n\t\t\tif(child === view || child.$content === view){\r\n\t\t\t\tres = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn res;\r\n\t};\r\n\r\n\tLayout.prototype.getCellsByType = function(type){\r\n\t\tvar res = [];\r\n\t\tif(type === this.$name){\r\n\t\t\tres.push(this);\r\n\t\t}\r\n\r\n\t\tif(this.$content && this.$content.$name == type){\r\n\t\t\tres.push(this.$content);\r\n\t\t}\r\n\r\n\t\tif(this.$cells){\r\n\t\t\tfor(var i = 0; i < this.$cells.length; i++){\r\n\t\t\t\tvar children = Layout.prototype.getCellsByType.call(this.$cells[i], type);\r\n\t\t\t\tif(children.length){\r\n\t\t\t\t\tres.push.apply(res, children);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tLayout.prototype.getNextSibling = function(cellId){\r\n\t\tvar index = this.cellIndex(cellId);\r\n\t\tif(index >= 0 && this.$cells[index + 1]){\r\n\t\t\treturn this.$cells[index + 1];\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t};\r\n\r\n\tLayout.prototype.getPrevSibling = function(cellId){\r\n\t\tvar index = this.cellIndex(cellId);\r\n\t\tif(index >= 0 && this.$cells[index - 1]){\r\n\t\t\treturn this.$cells[index - 1];\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tLayout.prototype.cell = function (id) {\r\n\t\tfor (var i = 0; i < this.$cells.length; i++) {\r\n\t\t\tvar child = this.$cells[i];\r\n\t\t\tif (child.$id === id) {\r\n\t\t\t\treturn child;\r\n\t\t\t}\r\n\t\t\tvar sub = child.cell(id);\r\n\t\t\tif (sub) {\r\n\t\t\t\treturn sub;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tLayout.prototype.cellIndex = function (id) {\r\n\t\tfor (var i = 0; i < this.$cells.length; i++) {\r\n\t\t\tif (this.$cells[i].$id === id) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t};\r\n\tLayout.prototype.moveView = function (view, ind) {\r\n\t\tif (this.$cells[ind] !== view) {\r\n\t\t\treturn window.alert(\"Not implemented\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tind += this.$config.header ? 1 : 0;\r\n\t\t\tvar node = this.$view;\r\n\t\t\tif (ind >= node.childNodes.length) {\r\n\t\t\t\tnode.appendChild(view.$view);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnode.insertBefore(view.$view, node.childNodes[ind]);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tLayout.prototype._parseConfig = function (config) {\r\n\t\tthis.$cells = [];\r\n\t\tthis._xLayout = !config.rows;\r\n\t\tvar cells = config.rows || config.cols || config.views;\r\n\t\tfor (var i = 0; i < cells.length; i++) {\r\n\t\t\tvar cell = cells[i];\r\n\t\t\tcell.mode = this._xLayout ? \"x\" : \"y\";\r\n\t\t\tvar $content = this.$factory.initUI(cell, this);\r\n\t\t\tif(!$content){\r\n\t\t\t\tcells.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}else{\r\n\t\t\t\t$content.$parent = this;\r\n\t\t\t\tthis.$cells.push($content);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tLayout.prototype.getCells = function () {\r\n\t\treturn this.$cells;\r\n\t};\r\n\tLayout.prototype.render = function () {\r\n\t\tvar view = domHelpers.insertNode(this.$container, this.$toHTML());\r\n\t\tthis.$fill(view, null);\r\n\t\tthis.callEvent(\"onReady\", []);\r\n\t\tthis.resize();\r\n\r\n\t\t// do simple repaint after the first call\r\n\t\tthis.render = this.resize;\r\n\t};\r\n\tLayout.prototype.$fill = function (node, parent) {\r\n\t\tthis.$view = node;\r\n\t\tthis.$parent = parent;\r\n\t\tvar cells = domHelpers.getChildNodes(node, \"gantt_layout_cell\");\r\n\t\tfor (var i = cells.length - 1; i >= 0; i--) {\r\n\t\t\tvar sub = this.$cells[i];\r\n\t\t\tsub.$fill(cells[i], this);\r\n\t\t\t// initially hidden cell\r\n\t\t\tif (sub.$config.hidden) {\r\n\t\t\t\tsub.$view.parentNode.removeChild(sub.$view);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\tLayout.prototype.$toHTML = function () {\r\n\t\tvar mode = this._xLayout ? \"x\" : \"y\";\r\n\t\tvar html = [];\r\n\t\tfor (var i = 0; i < this.$cells.length; i++) {\r\n\t\t\thtml.push(this.$cells[i].$toHTML());\r\n\t\t}\r\n\t\treturn _super.prototype.$toHTML.call(this, html.join(\"\"), (this.$root ? \"gantt_layout_root \" : \"\") + \"gantt_layout gantt_layout_\" + mode);\r\n\t};\r\n\r\n\tLayout.prototype.getContentSize = function(mode){\r\n\t\tvar contentWidth = 0,\r\n\t\t\tcontentHeight = 0;\r\n\r\n\t\tvar cellSize, cell, borders;\r\n\t\tfor (var i = 0; i < this.$cells.length; i++) {\r\n\t\t\tcell = this.$cells[i];\r\n\t\t\tif(cell.$config.hidden)\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\tcellSize = cell.getContentSize(mode);\r\n\r\n\t\t\tif(cell.$config.view === \"scrollbar\" && mode[cell.$config.scroll]){\r\n\t\t\t\tcellSize.height = 0;\r\n\t\t\t\tcellSize.width = 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(cell.$config.resizer){\r\n\t\t\t\tif(this._xLayout){\r\n\t\t\t\t\tcellSize.height = 0;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcellSize.width = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tborders = cell._getBorderSizes();\r\n\r\n\t\t\tif(this._xLayout){\r\n\t\t\t\tcontentWidth += (cellSize.width + borders.horizontal);\r\n\t\t\t\tcontentHeight = Math.max(contentHeight, (cellSize.height + borders.vertical));\r\n\t\t\t}else{\r\n\t\t\t\tcontentWidth = Math.max(contentWidth, cellSize.width + borders.horizontal);\r\n\t\t\t\tcontentHeight += cellSize.height + borders.vertical;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tborders = this._getBorderSizes();\r\n\t\tcontentWidth += borders.horizontal;\r\n\t\tcontentHeight += borders.vertical;\r\n\r\n\t\t// GS-149 & GS-150: By default this code only increases the container sizes, because of that, the cell sizes\r\n\t\t// are also increased. Keep this code here in the case if something goes wrong\r\n\t\t/*\r\n\t\tif(this.$root){\r\n\t\t\tcontentWidth += 1;\r\n\t\t\tcontentHeight += 1;\r\n\t\t}\r\n\t\t*/\r\n\t\treturn {\r\n\t\t\twidth: contentWidth,\r\n\t\t\theight: contentHeight\r\n\t\t};\r\n\t};\r\n\r\n\tLayout.prototype._cleanElSize = function(value){\r\n\t\treturn ((value || \"\").toString().replace(\"px\", \"\") * 1 || 0);\r\n\t};\r\n\tLayout.prototype._getBoxStyles = function(div){\r\n\t\tvar computed = null;\r\n\t\tif(window.getComputedStyle){\r\n\t\t\tcomputed = window.getComputedStyle(div, null);\r\n\t\t}else{\r\n\t\t\t//IE with elem.currentStyle does not calculate sizes from %, so will use the default approach\r\n\t\t\tcomputed = {\r\n\t\t\t\t\"width\":div.clientWidth,\r\n\t\t\t\t\"height\":div.clientHeight\r\n\t\t\t};\r\n\t\t}\r\n\t\tvar properties = [\r\n\t\t\t\"width\",\r\n\t\t\t\"height\",\r\n\r\n\t\t\t\"paddingTop\",\r\n\t\t\t\"paddingBottom\",\r\n\t\t\t\"paddingLeft\",\r\n\t\t\t\"paddingRight\",\r\n\r\n\t\t\t\"borderLeftWidth\",\r\n\t\t\t\"borderRightWidth\",\r\n\t\t\t\"borderTopWidth\",\r\n\t\t\t\"borderBottomWidth\"\r\n\t\t];\r\n\t\tvar styles = {\r\n\t\t\tboxSizing:(computed.boxSizing == \"border-box\")\r\n\t\t};\r\n\r\n\t\tif(computed.MozBoxSizing){\r\n\t\t\tstyles.boxSizing = (computed.MozBoxSizing == \"border-box\");\r\n\t\t}\r\n\t\tfor(var i =0; i < properties.length; i++){\r\n\t\t\tstyles[properties[i]] = computed[properties[i]] ? this._cleanElSize(computed[properties[i]]) : 0;\r\n\t\t}\r\n\r\n\r\n\t\tvar box = {\r\n\t\t\thorPaddings : (styles.paddingLeft + styles.paddingRight + styles.borderLeftWidth + styles.borderRightWidth),\r\n\t\t\tvertPaddings : (styles.paddingTop + styles.paddingBottom + styles.borderTopWidth + styles.borderBottomWidth),\r\n\t\t\tborderBox: styles.boxSizing,\r\n\t\t\tinnerWidth : styles.width,\r\n\t\t\tinnerHeight : styles.height,\r\n\t\t\touterWidth : styles.width,\r\n\t\t\touterHeight : styles.height\r\n\t\t};\r\n\r\n\r\n\t\tif(box.borderBox){\r\n\t\t\tbox.innerWidth -= box.horPaddings;\r\n\t\t\tbox.innerHeight -= box.vertPaddings;\r\n\t\t}else{\r\n\t\t\tbox.outerWidth += box.horPaddings;\r\n\t\t\tbox.outerHeight += box.vertPaddings;\r\n\t\t}\r\n\r\n\t\treturn box;\r\n\t};\r\n\r\n\tLayout.prototype._getAutosizeMode = function(config){\r\n\t\tvar res = {x:false, y:false};\r\n\t\tif(config === \"xy\"){\r\n\t\t\tres.x = res.y = true;\r\n\t\t}else if(config === \"y\" || config === true){\r\n\t\t\tres.y = true;\r\n\t\t}else if(config === \"x\"){\r\n\t\t\tres.x = true;\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\tLayout.prototype.autosize = function(mode) {\r\n\t\tvar res = this._getAutosizeMode(mode);\r\n\t\tvar boxSizes = this._getBoxStyles(this.$container);\r\n\t\tvar contentSizes = this.getContentSize(mode);\r\n\r\n\t\tvar node = this.$container;\r\n\t\tif(res.x){\r\n\t\t\tif(boxSizes.borderBox){\r\n\t\t\t\tcontentSizes.width += boxSizes.horPaddings;\r\n\t\t\t}\r\n\t\t\tnode.style.width = contentSizes.width + \"px\";\r\n\t\t}\r\n\t\tif(res.y){\r\n\t\t\tif(boxSizes.borderBox){\r\n\t\t\t\tcontentSizes.height += boxSizes.vertPaddings;\r\n\t\t\t}\r\n\t\t\tnode.style.height = contentSizes.height + \"px\";\r\n\t\t}\r\n\t};\r\n\r\n\tLayout.prototype.getSize = function () {\r\n\t\tthis._sizes = [];\r\n\t\tvar width = 0;\r\n\t\tvar minWidth = 0;\r\n\t\tvar maxWidth = 100000000000;\r\n\t\tvar height = 0;\r\n\t\tvar maxHeight = 100000000000;\r\n\t\tvar minHeight = 0;\r\n\r\n\t\tfor (var i = 0; i < this.$cells.length; i++) {\r\n\r\n\t\t\tvar size = this._sizes[i] = this.$cells[i].getSize();\r\n\t\t\tif (this.$cells[i].$config.hidden) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (this._xLayout) {\r\n\t\t\t\tif (!size.width && size.minWidth) {\r\n\t\t\t\t\twidth += size.minWidth;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\twidth += size.width;\r\n\t\t\t\t}\r\n\t\t\t\tmaxWidth += size.maxWidth;\r\n\t\t\t\tminWidth += size.minWidth;\r\n\t\t\t\theight = Math.max(height, size.height);\r\n\t\t\t\tmaxHeight = Math.min(maxHeight, size.maxHeight); // min of maxHeight\r\n\t\t\t\tminHeight = Math.max(minHeight, size.minHeight); // max of minHeight\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (!size.height && size.minHeight) {\r\n\t\t\t\t\theight += size.minHeight;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\theight += size.height;\r\n\t\t\t\t}\r\n\t\t\t\tmaxHeight += size.maxHeight;\r\n\t\t\t\tminHeight += size.minHeight;\r\n\t\t\t\twidth = Math.max(width, size.width);\r\n\t\t\t\tmaxWidth = Math.min(maxWidth, size.maxWidth); // min of maxWidth\r\n\t\t\t\tminWidth = Math.max(minWidth, size.minWidth); // max of minWidth\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar self = _super.prototype.getSize.call(this);\r\n\t\t// maxWidth\r\n\t\tif (self.maxWidth >= 100000) {\r\n\t\t\tself.maxWidth = maxWidth;\r\n\t\t}\r\n\t\t// maxHeight\r\n\t\tif (self.maxHeight >= 100000) {\r\n\t\t\tself.maxHeight = maxHeight;\r\n\t\t}\r\n\t\t// minWidth\r\n\t\tself.minWidth = self.minWidth !== self.minWidth ? 0 : self.minWidth;// || self.width || Math.max(minWidth, width);\r\n\t\t// minHeight\r\n\t\tself.minHeight = self.minHeight !== self.minHeight ? 0 : self.minHeight;//self.minHeight || self.height || Math.max(minHeight, height);\r\n\t\t// sizes with paddings and margins\r\n\t\tif (this._xLayout) {\r\n\t\t\tself.minWidth += this.$config.margin * (this.$cells.length) || 0;\r\n\t\t\tself.minWidth += this.$config.padding * 2 || 0;\r\n\t\t\tself.minHeight += (this.$config.padding * 2) || 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tself.minHeight += this.$config.margin * (this.$cells.length) || 0;\r\n\t\t\tself.minHeight += (this.$config.padding * 2) || 0;\r\n\t\t}\r\n\t\t\r\n\t\treturn self;\r\n\t};\r\n\t// calc total gravity and free space\r\n\tLayout.prototype._calcFreeSpace = function (s, cell, xLayout) {\r\n\t\tvar min = xLayout ? cell.minWidth : cell.minHeight;\r\n\t\tvar max = xLayout ? cell.maxWidth : cell.maxWidth;\r\n\t\tvar side = s;\r\n\t\tif (!side) {\r\n\t\t\tside = Math.floor(this._free / this._gravity * cell.gravity);\r\n\t\t\tif (side > max) {\r\n\t\t\t\tside = max;\r\n\t\t\t\tthis._free -= side;\r\n\t\t\t\tthis._gravity -= cell.gravity;\r\n\t\t\t}\r\n\t\t\tif (side < min) {\r\n\t\t\t\tside = min;\r\n\t\t\t\tthis._free -= side;\r\n\t\t\t\tthis._gravity -= cell.gravity;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (side > max) {\r\n\t\t\t\tside = max;\r\n\t\t\t}\r\n\t\t\tif (side < min) {\r\n\t\t\t\tside = min;\r\n\t\t\t}\r\n\t\t\tthis._free -= side;\r\n\t\t}\r\n\t\treturn side;\r\n\t};\r\n\tLayout.prototype._calcSize = function (s, size, xLayout) {\r\n\t\tvar side = s;\r\n\t\tvar min = xLayout ? size.minWidth : size.minHeight;\r\n\t\tvar max = xLayout ? size.maxWidth : size.maxHeight;\r\n\t\tif (!side) {\r\n\t\t\tside = Math.floor(this._free / this._gravity * size.gravity);\r\n\t\t}\r\n\t\tif (side > max) {\r\n\t\t\tside = max;\r\n\t\t}\r\n\t\tif (side < min) {\r\n\t\t\tside = min;\r\n\t\t}\r\n\t\treturn side;\r\n\t};\r\n\r\n\tLayout.prototype._configureBorders = function(){\r\n\t\tif(this.$root){\r\n\t\t\tthis._setBorders([\r\n\t\t\t\tthis._borders.left,\r\n\t\t\t\tthis._borders.top,\r\n\t\t\t\tthis._borders.right,\r\n\t\t\t\tthis._borders.bottom\r\n\t\t\t],\r\n\t\t\tthis);\r\n\t\t}\r\n\r\n\t\tvar borderClass = this._xLayout ? this._borders.right : this._borders.bottom;\r\n\r\n\t\tvar cells = this.$cells;\r\n\r\n\t\tvar lastVisibleIndex = cells.length - 1;\r\n\t\tfor(var i = lastVisibleIndex; i >= 0; i--){\r\n\t\t\tif (!cells[i].$config.hidden) {\r\n\t\t\t\tlastVisibleIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < cells.length; i++) {\r\n\t\t\tif (cells[i].$config.hidden) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tvar lastCell = i >= lastVisibleIndex;\r\n\t\t\tvar borderColorClass = \"\";\r\n\t\t\tif(!lastCell && cells[i + 1]){\r\n\t\t\t\tif(cells[i + 1].$config.view == \"scrollbar\"){\r\n\t\t\t\t\tif(this._xLayout){\r\n\t\t\t\t\t\tlastCell = true;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tborderColorClass = \"gantt_layout_cell_border_transparent\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\tthis._setBorders(lastCell ? [] : [borderClass, borderColorClass], cells[i]);\r\n\t\t}\r\n\t};\r\n\r\n\tLayout.prototype._updateCellVisibility = function(){\r\n\t\tvar oldVisibleCells = this._visibleCells || {};\r\n\t\tvar firstCall = !this._visibleCells;\r\n\t\tvar visibleCells = {};\r\n\t\tvar cell = null;\r\n\t\tvar parentVisibility = [];\r\n\t\tfor (var i = 0; i < this._sizes.length; i++) {\r\n\t\t\tcell = this.$cells[i];\r\n\t\t\tif (cell.$config.hide_empty){\r\n\t\t\t\tparentVisibility.push(cell);\r\n\t\t\t}\r\n\r\n\t\t\tif (!firstCall && cell.$config.hidden && oldVisibleCells[cell.$id]) {\r\n\t\t\t\tcell._hide(true);\r\n\t\t\t}else if(!cell.$config.hidden && !oldVisibleCells[cell.$id]){\r\n\t\t\t\tcell._hide(false);\r\n\t\t\t}\r\n\r\n\t\t\tif(!cell.$config.hidden){\r\n\t\t\t\tvisibleCells[cell.$id] = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis._visibleCells = visibleCells;\r\n\r\n\t\t// GS-27. A way to hide the whole cell if all its children are hidden\r\n\t\tfor (var i = 0; i < parentVisibility.length; i++) {\r\n\t\t\tvar cell = parentVisibility[i];\r\n\t\t\tvar children = cell.$cells;\r\n\t\t\tvar hideCell = true;\r\n\t\t\tchildren.forEach(function(child){\r\n\t\t\t\tif (!child.$config.hidden && !child.$config.resizer){\r\n\t\t\t\t\thideCell = false;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t\r\n\t\t\tcell.$config.hidden = hideCell;\r\n\t\t}\r\n\t};\r\n\r\n\tLayout.prototype.setSize = function (x, y) {\r\n\t\tthis._configureBorders();\r\n\t\t_super.prototype.setSize.call(this, x, y);\r\n\t\ty = this.$lastSize.contentY;\r\n\t\tx = this.$lastSize.contentX;\r\n\r\n\t\tvar padding = (this.$config.padding || 0);\r\n\t\tthis.$view.style.padding = padding + \"px\";\r\n\t\tthis._gravity = 0;\r\n\t\tthis._free = this._xLayout ? x : y;\r\n\t\tthis._free -= padding * 2;\r\n\t\t// calc all gravity\r\n\r\n\t\tvar cell,\r\n\t\t\tsize;\r\n\r\n\t\tthis._updateCellVisibility();\r\n\r\n\t\tfor (var i = 0; i < this._sizes.length; i++) {\r\n\t\t\tcell = this.$cells[i];\r\n\r\n\t\t\tif (cell.$config.hidden) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tvar margin = (this.$config.margin || 0);\r\n\t\t\tif(cell.$name == \"resizer\" && !margin){\r\n\t\t\t\tmargin = -1;\r\n\t\t\t}\r\n\r\n\t\t\t// set margins to child cell\r\n\t\t\tvar cellView = cell.$view;\r\n\r\n\t\t\tvar marginSide = this._xLayout ? \"marginRight\" : \"marginBottom\";\r\n\t\t\tif (i !== this.$cells.length - 1) {\r\n\t\t\t\tcellView.style[marginSide] = margin + \"px\";\r\n\t\t\t\tthis._free -= margin; // calc free space without margin\r\n\t\t\t}\r\n\t\t\tsize = this._sizes[i];\r\n\t\t\tif (this._xLayout) {\r\n\t\t\t\tif (!size.width) {\r\n\t\t\t\t\tthis._gravity += size.gravity;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif (!size.height) {\r\n\t\t\t\t\tthis._gravity += size.gravity;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (var i = 0; i < this._sizes.length; i++) {\r\n\t\t\tcell = this.$cells[i];\r\n\r\n\t\t\tif (cell.$config.hidden) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tsize = this._sizes[i];\r\n\t\t\tvar width = size.width;\r\n\t\t\tvar height = size.height;\r\n\t\t\tif (this._xLayout) {\r\n\t\t\t\tthis._calcFreeSpace(width, size, true);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis._calcFreeSpace(height, size, false);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (var i = 0; i < this.$cells.length; i++) {\r\n\t\t\tcell = this.$cells[i];\r\n\r\n\t\t\tif (cell.$config.hidden) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tsize = this._sizes[i];\r\n\t\t\tvar dx = void 0;\r\n\t\t\tvar dy = void 0;\r\n\t\t\tif (this._xLayout) {\r\n\t\t\t\tdx = this._calcSize(size.width, size, true);\r\n\t\t\t\tdy = y - padding * 2; // layout height without paddings\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tdx = x - padding * 2; // layout width without paddings\r\n\t\t\t\tdy = this._calcSize(size.height, size, false);\r\n\t\t\t}\r\n\r\n\t\t\tcell.setSize(dx, dy);\r\n\t\t}\r\n\r\n\t};\r\n\r\n\treturn Layout;\r\n}(Cell));\r\n\r\nexport default Layout;","import __extends from \"../../../utils/extends\";\r\nimport Layout from \"./layout\";\r\nimport Cell from \"./cell\";\r\n\r\nvar ViewLayout = (function (_super) {\r\n\t\"use strict\";\r\n\r\n\t__extends(ViewLayout, _super);\r\n\tfunction ViewLayout(parent, config, factory) {\r\n\t\tvar _this = _super.apply(this, arguments) || this;\r\n\t\tfor (var i = 0; i < _this.$cells.length; i++) {\r\n\t\t\t_this.$cells[i].$config.hidden = (i !== 0);\r\n\t\t}\r\n\t\t_this.$cell = _this.$cells[0];\r\n\t\t_this.$name = \"viewLayout\";\r\n\r\n\t\treturn _this;\r\n\t}\r\n\tViewLayout.prototype.cell = function (id) {\r\n\t\tvar cell = _super.prototype.cell.call(this, id);\r\n\t\tif (!cell.$view) {\r\n\t\t\tthis.$fill(null, this);\r\n\t\t}\r\n\t\treturn cell;\r\n\t};\r\n\tViewLayout.prototype.moveView = function (view) {\r\n\t\tvar body = this.$view;\r\n\t\tif (this.$cell) {\r\n\t\t\tthis.$cell.$config.hidden = true;\r\n\t\t\tbody.removeChild(this.$cell.$view);\r\n\t\t}\r\n\t\tthis.$cell = view;\r\n\t\tbody.appendChild(view.$view);\r\n\t};\r\n\tViewLayout.prototype.setSize = function (x, y) {\r\n\t\tCell.prototype.setSize.call(this, x, y);\r\n\t};\r\n\r\n\tViewLayout.prototype.setContentSize = function(){\r\n\t\tvar size = this.$lastSize;\r\n\t\tthis.$cell.setSize(size.contentX, size.contentY);\r\n\t};\r\n\r\n\tViewLayout.prototype.getSize = function () {\r\n\t\tvar sizes = _super.prototype.getSize.call(this);\r\n\t\tif (this.$cell) {\r\n\t\t\tvar cellSize = this.$cell.getSize();\r\n\t\t\tif (this.$config.byMaxSize) {\r\n\t\t\t\tfor (var i = 0; i < this.$cells.length; i++) {\r\n\t\t\t\t\tvar otherCell = this.$cells[i].getSize();\r\n\t\t\t\t\tfor (var cell in cellSize) {\r\n\t\t\t\t\t\tcellSize[cell] = Math.max(cellSize[cell], otherCell[cell]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (var size in sizes) {\r\n\t\t\t\tsizes[size] = sizes[size] || cellSize[size];\r\n\t\t\t}\r\n\t\t\tsizes.gravity = Math.max(sizes.gravity, cellSize.gravity);\r\n\t\t}\r\n\t\treturn sizes;\r\n\t};\r\n\treturn ViewLayout;\r\n}(Layout));\r\n\r\nexport default ViewLayout;","import __extends from \"../../../utils/extends\";\r\nimport * as utils from \"../../../utils/utils\";\r\nimport Cell from \"./cell\";\r\n\r\nvar ViewCell = (function (_super) {\r\n\t\"use strict\";\r\n\r\n\t__extends(ViewCell, _super);\r\n\tfunction ViewCell(parent, config, factory) {\r\n\r\n\t\tvar _this = _super.apply(this, arguments) || this;\r\n\r\n\t\tif(config.view){\r\n\t\t\tif(config.id){\r\n\t\t\t\t// pass id to the nested view\r\n\t\t\t\tthis.$id = utils.uid();\r\n\t\t\t}\r\n\t\t\tvar childConfig = utils.copy(config);\r\n\t\t\tdelete childConfig.config;\r\n\t\t\tdelete childConfig.templates;\r\n\r\n\t\t\tthis.$content = this.$factory.createView(config.view, this, childConfig, this);\r\n\t\t\tif(!this.$content)\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t_this.$name = \"viewCell\";\r\n\t\treturn _this;\r\n\t}\r\n\r\n\tViewCell.prototype.destructor = function(){\r\n\t\tthis.clear();\r\n\t\t_super.prototype.destructor.call(this);\r\n\t};\r\n\r\n\tViewCell.prototype.clear = function(){\r\n\r\n\t\tthis.$initialized = false;\r\n\r\n\t\t// call destructor\r\n\t\tif (this.$content){\r\n\t\t\tvar method = this.$content.unload || this.$content.destructor;\r\n\t\t\tif (method){\r\n\t\t\t\tmethod.call(this.$content);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t_super.prototype.clear.call(this);\r\n\r\n\t};\r\n\r\n\tViewCell.prototype.scrollTo = function(left, top){\r\n\r\n\t\tif(this.$content && this.$content.scrollTo){\r\n\t\t\tthis.$content.scrollTo(left, top);\r\n\t\t}else{\r\n\t\t\t_super.prototype.scrollTo.call(this, left, top);\r\n\t\t}\r\n\t};\r\n\r\n\tViewCell.prototype._setContentSize = function(x, y){\r\n\t\tvar borders = this._getBorderSizes();\r\n\t\tif(typeof x === \"number\"){\r\n\t\t\tvar outerX = x + borders.horizontal;\r\n\t\t\tthis.$config.width = outerX;\r\n\t\t}\r\n\t\tif(typeof y === \"number\"){\r\n\t\t\tvar outerY = y + borders.vertical;\r\n\t\t\tthis.$config.height = outerY;\r\n\t\t}\r\n\t};\r\n\r\n\tViewCell.prototype.setSize = function(x, y){\r\n\t\t_super.prototype.setSize.call(this, x, y);\r\n\r\n\t\tif(!this.$preResize && this.$content) {\r\n\t\t\tif (!this.$initialized) {\r\n\t\t\t\tthis.$initialized = true;\r\n\t\t\t\tvar header = this.$view.childNodes[0];\r\n\t\t\t\tvar content = this.$view.childNodes[1];\r\n\t\t\t\tif(!content) content = header;\r\n\r\n\t\t\t\t/*if(this.$content.$config){\r\n\t\t\t\t\tthis.$content.$config.width = this.$lastSize.contentX;\r\n\t\t\t\t\tthis.$content.$config.height = this.$lastSize.contentY;\r\n\t\t\t\t}*/\r\n\t\t\t\tthis.$content.init(content);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tViewCell.prototype.setContentSize = function(){\r\n\t\tif(!this.$preResize && this.$content) {\r\n\t\t\tif (this.$initialized) {\r\n\t\t\t\tthis.$content.setSize(this.$lastSize.contentX, this.$lastSize.contentY);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tViewCell.prototype.getContentSize = function(){\r\n\t\tvar size = _super.prototype.getContentSize.call(this);\r\n\r\n\t\tif(this.$content && this.$initialized){\r\n\t\t\tvar childSize = this.$content.getSize();\r\n\t\t\tsize.width = childSize.contentX === undefined ? childSize.width : childSize.contentX;\r\n\t\t\tsize.height = childSize.contentY === undefined ? childSize.height : childSize.contentY;\r\n\t\t}\r\n\r\n\t\tvar borders = this._getBorderSizes();\r\n\t\tsize.width += borders.horizontal;\r\n\t\tsize.height += borders.vertical;\r\n\r\n\t\treturn size;\r\n\t};\r\n\r\n\treturn ViewCell;\r\n}(Cell));\r\n\r\nexport default ViewCell;","import __extends from \"../../../utils/extends\";\r\nimport * as domHelpers from \"../utils/dom_helpers\";\r\nimport * as utils from \"../../../utils/utils\";\r\nimport env from \"../../../utils/env\";\r\nimport Cell from \"./cell\";\r\n\r\nvar ScrollbarCell = (function (_super) {\r\n\t\"use strict\";\r\n\r\n\tvar SCROLL_MODIFIER_KEYS = [\"altKey\", \"shiftKey\", \"metaKey\"]; // it's no way to disable ctrl+wheel\r\n\t__extends(ScrollbarCell, _super);\r\n\tfunction ScrollbarCell(parent, config, factory, gantt) {\r\n\r\n\t\tvar _this = _super.apply(this, arguments) || this;\r\n\t\tthis.$config = utils.mixin(config, {scroll: \"x\"});\r\n\t\t_this._scrollHorizontalHandler = utils.bind(_this._scrollHorizontalHandler, _this);\r\n\t\t_this._scrollVerticalHandler = utils.bind(_this._scrollVerticalHandler, _this);\r\n\t\t_this._outerScrollVerticalHandler = utils.bind(_this._outerScrollVerticalHandler, _this);\r\n\t\t_this._outerScrollHorizontalHandler = utils.bind(_this._outerScrollHorizontalHandler, _this);\r\n\t\t_this._mouseWheelHandler = utils.bind(_this._mouseWheelHandler, _this);\r\n\r\n\t\tthis.$config.hidden = true;\r\n\t\tvar size = gantt.config.scroll_size;\r\n\r\n\t\tif(gantt.env.isIE){\r\n\t\t\t// full element height/width must be bigger than just a browser scrollbar,\r\n\t\t\t// otherwise the scrollbar element won't be scrolled on click\r\n\t\t\tsize += 1;\r\n\t\t}\r\n\r\n\t\tif(this._isHorizontal()){\r\n\t\t\t_this.$config.height = size;\r\n\t\t\t_this.$parent.$config.height = size;\r\n\t\t}else{\r\n\t\t\t_this.$config.width = size;\r\n\t\t\t_this.$parent.$config.width = size;\r\n\t\t}\r\n\r\n\t\tthis.$config.scrollPosition = 0;\r\n\r\n\t\t_this.$name = \"scroller\";\r\n\t\treturn _this;\r\n\t}\r\n\r\n\tScrollbarCell.prototype.init = function(container){\r\n\t\tcontainer.innerHTML = this.$toHTML();\r\n\t\tthis.$view = container.firstChild;\r\n\r\n\t\tif(!this.$view){\r\n\t\t\tthis.init();\r\n\t\t}\r\n\t\tif(this._isVertical()){\r\n\t\t\tthis._initVertical();\r\n\t\t}else{\r\n\t\t\tthis._initHorizontal();\r\n\t\t}\r\n\t\tthis._initMouseWheel();\r\n\t\tthis._initLinkedViews();\r\n\t};\r\n\r\n\tScrollbarCell.prototype.$toHTML = function () {\r\n\t\tvar className = this._isHorizontal() ? \"gantt_hor_scroll\" : \"gantt_ver_scroll\";\r\n\t\treturn \"
\";\r\n\t};\r\n\r\n\tScrollbarCell.prototype._getRootParent = function(){\r\n\t\tvar parent = this.$parent;\r\n\t\twhile(parent && parent.$parent){\r\n\t\t\tparent = parent.$parent;\r\n\t\t}\r\n\t\tif(parent){\r\n\t\t\treturn parent;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tfunction eachCell(root, res){\r\n\t\tres.push(root);\r\n\t\tif(root.$cells){\r\n\t\t\tfor(var i = 0; i < root.$cells.length; i++){\r\n\t\t\t\teachCell(root.$cells[i], res);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tScrollbarCell.prototype._eachView = function(){\r\n\t\tvar res = [];\r\n\t\teachCell(this._getRootParent(), res);\r\n\t\treturn res;\r\n\t};\r\n\r\n\tScrollbarCell.prototype._getLinkedViews = function(){\r\n\t\tvar views = this._eachView();\r\n\t\tvar res = [];\r\n\t\tfor(var i = 0; i < views.length; i++){\r\n\t\t\tif(views[i].$config && ((this._isVertical() && views[i].$config.scrollY == this.$id) || (this._isHorizontal() && views[i].$config.scrollX == this.$id)) ){\r\n\t\t\t\tres.push(views[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn res;\r\n\t};\r\n\r\n\r\n\tScrollbarCell.prototype._initHorizontal = function(){\r\n\t\tthis.$scroll_hor = this.$view;\r\n\t\tthis.$domEvents.attach(this.$view, \"scroll\", this._scrollHorizontalHandler);\r\n\r\n\t};\r\n\r\n\tScrollbarCell.prototype._initLinkedViews = function(){\r\n\t\tvar views = this._getLinkedViews();\r\n\t\tvar css = this._isVertical() ?\"gantt_layout_outer_scroll gantt_layout_outer_scroll_vertical\" : \"gantt_layout_outer_scroll gantt_layout_outer_scroll_horizontal\";\r\n\t\tfor(var i = 0; i < views.length; i++){\r\n\t\t\t//views[i].$config.css = [views[i].$config.css || \"\", css].join(\" \");\r\n\t\t\tdomHelpers.addClassName(views[i].$view || views[i].getNode(), css);\r\n\t\t}\r\n\t};\r\n\r\n\tScrollbarCell.prototype._initVertical = function(){\r\n\t\tthis.$scroll_ver = this.$view;\r\n\t\tthis.$domEvents.attach(this.$view, \"scroll\", this._scrollVerticalHandler);\r\n\t};\r\n\r\n\tScrollbarCell.prototype._updateLinkedViews = function(){\r\n\t};\r\n\r\n\tScrollbarCell.prototype._initMouseWheel = function(){\r\n\t\tvar ff = env.isFF;\r\n\t\tif (ff)\r\n\t\t\tthis.$domEvents.attach(this._getRootParent().$view, \"wheel\", this._mouseWheelHandler, {passive: false});\r\n\t\telse\r\n\t\t\tthis.$domEvents.attach(this._getRootParent().$view, \"mousewheel\", this._mouseWheelHandler, {passive: false});\r\n\t};\r\n\r\n\r\n\r\n\r\n\tScrollbarCell.prototype.scrollHorizontally = function(left){\r\n\t\tif(this._scrolling) return;\r\n\t\tthis._scrolling = true;\r\n\r\n\t\tthis.$scroll_hor.scrollLeft = left;\r\n\t\tthis.$config.codeScrollLeft = left;\r\n\t\tleft = this.$scroll_hor.scrollLeft;\r\n\r\n\t\tvar views = this._getLinkedViews();\r\n\t\tfor(var i = 0; i < views.length; i++){\r\n\t\t\tif(views[i].scrollTo){\r\n\t\t\t\tviews[i].scrollTo(left, undefined);\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar oldSize = this.$config.scrollPosition;\r\n\t\tthis.$config.scrollPosition = left;\r\n\t\tthis.callEvent(\"onScroll\", [oldSize, left, this.$config.scroll]);\r\n\t\tthis._scrolling = false;\r\n\t};\r\n\tScrollbarCell.prototype.scrollVertically = function(top){\r\n\t\tif(this._scrolling) return;\r\n\t\tthis._scrolling = true;\r\n\r\n\t\tthis.$scroll_ver.scrollTop = top;\r\n\t\ttop = this.$scroll_ver.scrollTop;\r\n\r\n\t\tvar views = this._getLinkedViews();\r\n\r\n\t\tfor(var i = 0; i < views.length; i++){\r\n\t\t\tif(views[i].scrollTo){\r\n\t\t\t\tviews[i].scrollTo(undefined, top);\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar oldSize = this.$config.scrollPosition;\r\n\t\tthis.$config.scrollPosition = top;\r\n\t\tthis.callEvent(\"onScroll\", [oldSize, top, this.$config.scroll]);\r\n\t\tthis._scrolling = false;\r\n\t};\r\n\r\n\tScrollbarCell.prototype._isVertical = function(){\r\n\t\treturn this.$config.scroll == \"y\";\r\n\t};\r\n\tScrollbarCell.prototype._isHorizontal = function(){\r\n\t\treturn this.$config.scroll == \"x\";\r\n\t};\r\n\tScrollbarCell.prototype._scrollHorizontalHandler = function (e) {\r\n\t\tif(this._isVertical() || this._scrolling){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//in safari we can catch previous onscroll after setting new value from mouse-wheel event\r\n\t\t//set delay to prevent value drifiting\r\n\t\tif ((new Date()) - ( this._wheel_time || 0 ) < 100) return true;\r\n\t\t//if (this.$gantt._touch_scroll_active) return;\r\n\t\tvar left = this.$scroll_hor.scrollLeft;\r\n\r\n\t\tthis.scrollHorizontally(left);\r\n\r\n\t\tthis._oldLeft = this.$scroll_hor.scrollLeft;\r\n\t};\r\n\tScrollbarCell.prototype._outerScrollHorizontalHandler = function(e){\r\n\t\tif(this._isVertical()){\r\n\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tScrollbarCell.prototype.show = function(){\r\n\t\tthis.$parent.show();\r\n\t};\r\n\tScrollbarCell.prototype.hide = function(){\r\n\t\tthis.$parent.hide();\r\n\t};\r\n\r\n\tScrollbarCell.prototype._getScrollSize = function(){\r\n\t\tvar scrollSize = 0;\r\n\t\tvar outerSize = 0;\r\n\t\tvar isHorizontal = this._isHorizontal();\r\n\r\n\t\tvar linked = this._getLinkedViews();\r\n\t\tvar view;\r\n\t\tvar scrollProperty = isHorizontal ? \"scrollWidth\" : \"scrollHeight\",\r\n\t\t\tinnerSizeProperty = isHorizontal ? \"contentX\" : \"contentY\";\r\n\t\tvar outerProperty = isHorizontal ? \"x\" : \"y\";\r\n\t\tvar offset = this._getScrollOffset();\r\n\r\n\t\tfor(var i = 0; i < linked.length; i++){\r\n\t\t\tview = linked[i];\r\n\t\t\tif(!(view && view.$content && view.$content.getSize && !view.$config.hidden)) continue;\r\n\r\n\t\t\tvar sizes = view.$content.getSize();\r\n\t\t\tvar cellScrollSize;\r\n\t\t\tif(sizes.hasOwnProperty(scrollProperty)){\r\n\t\t\t\tcellScrollSize = sizes[scrollProperty];\r\n\t\t\t}else{\r\n\t\t\t\tcellScrollSize = sizes[innerSizeProperty];\r\n\t\t\t}\r\n\r\n\t\t\tif(offset){\r\n\t\t\t\t// precalculated vertical/horizontal offsets of scrollbar to emulate 4.x look\r\n\t\t\t\tif(sizes[innerSizeProperty] > sizes[outerProperty] && sizes[innerSizeProperty] > scrollSize && (cellScrollSize > (sizes[outerProperty] - offset + 2))){\r\n\t\t\t\t\tscrollSize = cellScrollSize + (isHorizontal ? 0 : 2);\r\n\t\t\t\t\touterSize = sizes[outerProperty];\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tvar nonScrollableSize = Math.max(sizes[innerSizeProperty] - cellScrollSize, 0);\r\n\t\t\t\tvar scrollableViewPortSize = Math.max(sizes[outerProperty] - nonScrollableSize, 0);\r\n\t\t\t\tcellScrollSize = cellScrollSize + nonScrollableSize;\r\n\r\n\t\t\t\tif(cellScrollSize > scrollableViewPortSize && (cellScrollSize > scrollSize) ){\r\n\t\t\t\t\t//|| (cellScrollSize === scrollSize && sizes[outerProperty] < outerSize) // same scroll width but smaller scrollable view port\r\n\r\n\t\t\t\t\tscrollSize = cellScrollSize;\r\n\t\t\t\t\touterSize = sizes[outerProperty];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\touterScroll: outerSize,\r\n\t\t\tinnerScroll: scrollSize\r\n\t\t};\r\n\t};\r\n\r\n\tScrollbarCell.prototype.scroll = function(position){\r\n\t\tif(this._isHorizontal()){\r\n\t\t\tthis.scrollHorizontally(position);\r\n\t\t}else{\r\n\t\t\tthis.scrollVertically(position);\r\n\t\t}\r\n\t};\r\n\r\n\tScrollbarCell.prototype.getScrollState = function(){\r\n\t\treturn {\r\n\t\t\tvisible: this.isVisible(),\r\n\t\t\tdirection: this.$config.scroll,\r\n\t\t\tsize: this.$config.outerSize,\r\n\t\t\tscrollSize: this.$config.scrollSize || 0,\r\n\t\t\tposition: this.$config.scrollPosition || 0\r\n\t\t};\r\n\t};\r\n\r\n\tScrollbarCell.prototype.setSize = function(width, height){\r\n\t\t_super.prototype.setSize.apply(this, arguments);\r\n\r\n\t\tvar scrollSizes = this._getScrollSize();\r\n\r\n\t\tvar ownSize = (this._isVertical() ? height : width) - this._getScrollOffset() + (this._isHorizontal() ? 1 : 0);\r\n\r\n\t\tif(scrollSizes.innerScroll && ownSize > scrollSizes.outerScroll){\r\n\t\t\tscrollSizes.innerScroll += (ownSize - scrollSizes.outerScroll);\r\n\t\t}\r\n\t\tthis.$config.scrollSize = scrollSizes.innerScroll;\r\n\r\n\t\tthis.$config.width = width;\r\n\t\tthis.$config.height = height;\r\n\t\tthis._setScrollSize(scrollSizes.innerScroll);\r\n\t};\r\n\r\n\tScrollbarCell.prototype.isVisible = function(){\r\n\t\treturn !!(this.$parent && this.$parent.$view.parentNode);\r\n\t};\r\n\r\n\tScrollbarCell.prototype.shouldShow = function(){\r\n\t\tvar scrollSizes = this._getScrollSize();\r\n\t\tif(!scrollSizes.innerScroll && (this.$parent && this.$parent.$view.parentNode)){\r\n\t\t\treturn false;\r\n\t\t}else if(scrollSizes.innerScroll && !(this.$parent && this.$parent.$view.parentNode)){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t};\r\n\r\n\tScrollbarCell.prototype.shouldHide = function(){\r\n\t\tvar scrollSizes = this._getScrollSize();\r\n\t\tif(!scrollSizes.innerScroll && (this.$parent && this.$parent.$view.parentNode)){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tScrollbarCell.prototype.toggleVisibility = function(){\r\n\t\tif(this.shouldHide()){\r\n\t\t\tthis.hide();\r\n\t\t}else if(this.shouldShow()){\r\n\t\t\tthis.show();\r\n\t\t}\r\n\t};\r\n\r\n\tScrollbarCell.prototype._getScaleOffset = function(view){\r\n\t\tvar offset = 0;\r\n\t\tif(view && (view.$config.view == \"timeline\" || view.$config.view == \"grid\")){\r\n\t\t\toffset = view.$content.$getConfig().scale_height;\r\n\t\t}\r\n\t\treturn offset;\r\n\t};\r\n\r\n\tScrollbarCell.prototype._getScrollOffset = function(){\r\n\t\tvar offset = 0;\r\n\t\tif(this._isVertical()){\r\n\t\t\tvar parentLayout = this.$parent.$parent;\r\n\t\t\toffset = Math.max(\r\n\t\t\t\tthis._getScaleOffset(parentLayout.getPrevSibling(this.$parent.$id)),\r\n\t\t\t\tthis._getScaleOffset(parentLayout.getNextSibling(this.$parent.$id))\r\n\t\t\t\t);\r\n\t\t}else{\r\n\t\t\tvar linked = this._getLinkedViews();\r\n\r\n\t\t\tfor (var i = 0; i < linked.length; i++) {\r\n\t\t\t\tvar view = linked[i],\r\n\t\t\t\t\tvparent = view.$parent;\r\n\t\t\t\tvar cells = vparent.$cells;\r\n\r\n\t\t\t\tvar last = cells[cells.length - 1];\r\n\r\n\t\t\t\tif (last && last.$config.view == \"scrollbar\" && last.$config.hidden === false) {\r\n\t\t\t\t\toffset = last.$config.width;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn offset || 0;\r\n\t};\r\n\r\n\tScrollbarCell.prototype._setScrollSize = function(size){\r\n\t\tvar property = this._isHorizontal() ? \"width\" : \"height\";\r\n\t\tvar scrollbar = this._isHorizontal() ? this.$scroll_hor : this.$scroll_ver;\r\n\r\n\t\tvar offset = this._getScrollOffset();\r\n\r\n\t\tvar node = scrollbar.firstChild;\r\n\r\n\t\tif(offset){\r\n\t\t\tif(this._isVertical()){\r\n\r\n\t\t\t\tthis.$config.outerSize = (this.$config.height - offset + 3);\r\n\t\t\t\tscrollbar.style.height = this.$config.outerSize + \"px\";\r\n\t\t\t\tscrollbar.style.top = (offset-1) + \"px\";\r\n\t\t\t\tdomHelpers.addClassName(scrollbar, this.$parent._borders.top);\r\n\t\t\t\tdomHelpers.addClassName(scrollbar.parentNode, \"gantt_task_vscroll\");\r\n\t\t\t}else{\r\n\t\t\t\tthis.$config.outerSize = (this.$config.width - offset + 1);\r\n\t\t\t\tscrollbar.style.width = this.$config.outerSize + \"px\";\r\n\t\t\t\t//domHelpers.addClassName(scrollbar, this.$parent._borders.right);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tscrollbar.style.top = \"auto\";\r\n\t\t\tdomHelpers.removeClassName(scrollbar, this.$parent._borders.top);\r\n\t\t\tdomHelpers.removeClassName(scrollbar.parentNode, \"gantt_task_vscroll\");\r\n\t\t\tthis.$config.outerSize = this.$config.height;\r\n\t\t}\r\n\r\n\t\tnode.style[property] = size + \"px\";\r\n\t};\r\n\r\n\tScrollbarCell.prototype._scrollVerticalHandler = function (e) {\r\n\t\tif(this._scrollHorizontalHandler() || this._scrolling){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t//if (this.$gantt._touch_scroll_active) return;\r\n\t\tvar top = this.$scroll_ver.scrollTop;\r\n\t\tvar prev = this._oldTop;\r\n\t\tif(top == prev) return;\r\n\r\n\t\tthis.scrollVertically(top);\r\n\r\n\t\tthis._oldTop = this.$scroll_ver.scrollTop;\r\n\r\n\t};\r\n\tScrollbarCell.prototype._outerScrollVerticalHandler = function(e){\r\n\t\tif(this._scrollHorizontalHandler()){\r\n\t\t\treturn;\r\n\t\t}\r\n\t};\r\n\r\n\tScrollbarCell.prototype._checkWheelTarget = function(targetNode){\r\n\t\tvar connectedViews = this._getLinkedViews().concat(this);\r\n\r\n\t\tfor(var i = 0; i < connectedViews.length; i++){\r\n\t\t\tvar node = connectedViews[i].$view;\r\n\t\t\tif(domHelpers.isChildOf(targetNode, node)){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t};\r\n\r\n\tScrollbarCell.prototype._mouseWheelHandler = function(e){\r\n\t\tvar target = e.target || e.srcElement;\r\n\r\n\t\tif(!this._checkWheelTarget(target))\r\n\t\t\treturn;\r\n\r\n\t\tthis._wheel_time = new Date();\r\n\r\n\t\tvar res = {};\r\n\r\n\t\tvar wheelSpeed = {x: 1, y: 1};\r\n\t\tvar wheelSpeedConfig = this.$gantt.config.wheel_scroll_sensitivity;\r\n\r\n\t\tif (typeof wheelSpeedConfig == \"number\" && !!wheelSpeedConfig) {\r\n\t\t\twheelSpeed = {x: wheelSpeedConfig, y: wheelSpeedConfig};\r\n\t\t}\r\n\t\telse if (({}).toString.apply(wheelSpeedConfig) == \"[object Object]\") {\r\n\t\t\twheelSpeed = {x: wheelSpeedConfig.x, y: wheelSpeedConfig.y};\r\n\t\t}\r\n\r\n\t\tvar ff = env.isFF;\r\n\t\tvar deltaX = ff ? (e.deltaX) : e.wheelDeltaX;\r\n\t\tvar deltaY = ff ? (e.deltaY) : e.wheelDelta;\r\n\r\n\t\tvar multiplier = -20;\r\n\t\tif (ff) {\r\n\t\t\tif (e.deltaMode !== 0) {\r\n\t\t\t\tmultiplier = -40;\r\n\t\t\t} else {\r\n\t\t\t\tmultiplier = -10;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar wx = ff ? (deltaX * multiplier * wheelSpeed.x) : deltaX * 2 * wheelSpeed.x;\r\n\t\tvar wy = ff ? (deltaY * multiplier * wheelSpeed.y) : deltaY * wheelSpeed.y;\r\n\r\n\t\tvar horizontalScrollModifier = this.$gantt.config.horizontal_scroll_key;\r\n\r\n\t\tif (horizontalScrollModifier !== false) {\r\n\t\t\tif (SCROLL_MODIFIER_KEYS.indexOf(horizontalScrollModifier) >= 0) {\r\n\t\t\t\tif(e[horizontalScrollModifier] && !(e.deltaX || e.wheelDeltaX)){\r\n\t\t\t\t\t// shift+mousewheel for horizontal scroll\r\n\t\t\t\t\twx = wy*2;\r\n\t\t\t\t\twy = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tif (wx && Math.abs(wx) > Math.abs(wy)){\r\n\t\t\tif(this._isVertical()){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(res.x) return true;//no horisontal scroll, must not block scrolling\r\n\t\t\tif(!this.$scroll_hor || !this.$scroll_hor.offsetWidth) return true;\r\n\r\n\t\t\tvar dir = wx/-40;\r\n\t\t\tvar oldLeft = this._oldLeft;\r\n\t\t\tvar left = oldLeft+dir*30;\r\n\t\t\tthis.scrollHorizontally(left);\r\n\t\t\tthis.$scroll_hor.scrollLeft = left;\r\n\t\t\t// not block scroll if position hasn't changed\r\n\t\t\tif(oldLeft == this.$scroll_hor.scrollLeft){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tthis._oldLeft = this.$scroll_hor.scrollLeft;\r\n\t\t} else {\r\n\t\t\tif(this._isHorizontal()){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(res.y) return true;//no vertical scroll, must not block scrolling\r\n\t\t\tif(!this.$scroll_ver || !this.$scroll_ver.offsetHeight) return true;\r\n\r\n\t\t\tvar dir = wy/-40;\r\n\t\t\tif (typeof wy == \"undefined\")\r\n\t\t\t\tdir = e.detail;\r\n\r\n\t\t\tvar oldTop = this._oldTop;\r\n\t\t\tvar top = this.$scroll_ver.scrollTop+dir*30;\r\n\r\n\t\t\t//if(!this.$gantt.config.prevent_default_scroll &&\r\n\t\t\t//\t(this.$gantt._cached_scroll_pos && ((this.$gantt._cached_scroll_pos.y == top) || (this.$gantt._cached_scroll_pos.y <= 0 && top <= 0)))) return true;\r\n\r\n\r\n\t\t\tthis.scrollVertically(top);\r\n\t\t\tthis.$scroll_ver.scrollTop = top;\r\n\r\n\t\t\t// not block scroll if position hasn't changed\r\n\t\t\tif(oldTop == this.$scroll_ver.scrollTop){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tthis._oldTop = this.$scroll_ver.scrollTop;\r\n\t\t}\r\n\r\n\t\tif (e.preventDefault)\r\n\t\t\te.preventDefault();\r\n\t\te.cancelBubble=true;\r\n\t\treturn false;\r\n\t};\r\n\r\n\treturn ScrollbarCell;\r\n})(Cell);\r\n\r\nexport default ScrollbarCell;","import quickPositionHelperFactory from \"./row_position_fixed_height\";\r\n\r\nfunction createMixin(view){\r\n\tvar getItemTopCache = {};\r\n\tvar getRowTopCache = {};\r\n\tvar getItemHeightCache = null;\r\n\tvar totalHeightCache = -1;\r\n\tvar getItemHeightCacheState = null;\r\n\r\n\tvar quickPosition = quickPositionHelperFactory(view);\r\n\r\n\treturn {\r\n\t\t_resetTopPositionHeight: function(){\r\n\t\t\tgetItemTopCache = {};\r\n\t\t\tgetRowTopCache = {};\r\n\t\t\tquickPosition.resetCache();\r\n\t\t},\r\n\t\t_resetHeight: function(){\r\n\t\t\tvar store = this.$config.rowStore;\r\n\t\t\tvar newState = this.getCacheStateTotalHeight(store);\r\n\t\t\tif(!getItemHeightCacheState){\r\n\t\t\t\tgetItemHeightCacheState = newState;\r\n\t\t\t}else if(this.shouldClearHeightCache(getItemHeightCacheState, newState)){\r\n\t\t\t\tgetItemHeightCacheState = newState;\r\n\t\t\t\tgetItemHeightCache = null;\r\n\t\t\t}\r\n\r\n\t\t\ttotalHeightCache = -1;\r\n\t\t\tquickPosition.resetCache();\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Get top coordinate by row index (order)\r\n\t\t * @param {number} index\r\n\t\t */\r\n\t\tgetRowTop: function(index){\r\n\t\t\tif(quickPosition.canUseSimpleCalculation()){\r\n\t\t\t\treturn quickPosition.getRowTop(index);\r\n\t\t\t}\r\n\r\n\t\t\tvar store = this.$config.rowStore;\r\n\t\t\tif(!store){\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\tif(getRowTopCache[index] !== undefined){\r\n\t\t\t\treturn getRowTopCache[index];\r\n\t\t\t}else {\r\n\t\t\t\tvar all = store.getIndexRange();\r\n\t\t\t\tvar top = 0;\r\n\t\t\t\tvar result = 0;\r\n\t\t\t\tfor(var i = 0; i < all.length; i++){\r\n\t\t\t\t\tgetRowTopCache[i] = top;\r\n\t\t\t\t\ttop += this.getItemHeight(all[i].id);\r\n\t\t\t\t\tif(i < index){\r\n\t\t\t\t\t\tresult = top;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Get top coordinate by item id\r\n\t\t * @param {*} task_id\r\n\t\t */\r\n\t\tgetItemTop: function (taskId) {\r\n\t\t\tif(this.$config.rowStore){\r\n\t\t\t\tif(getItemTopCache[taskId] !== undefined){\r\n\t\t\t\t\treturn getItemTopCache[taskId];\r\n\t\t\t\t}\r\n\t\t\t\tvar store = this.$config.rowStore;\r\n\t\t\t\tif(!store) return 0;\r\n\r\n\t\t\t\tvar itemIndex = store.getIndexById(taskId);\r\n\r\n\t\t\t\tif (itemIndex === -1 && store.getParent && store.exists(taskId)) {\r\n\t\t\t\t\tvar parentId = store.getParent(taskId);\r\n\t\t\t\t\tif (store.exists(parentId)) {\r\n\t\t\t\t\t\t// if task is not found in list - maybe it's parent is a split task and we should use parents index instead\r\n\t\t\t\t\t\tvar parent = store.getItem(parentId);\r\n\t\t\t\t\t\tif (this.$gantt.isSplitTask(parent)) {\r\n\t\t\t\t\t\t\treturn this.getItemTop(parentId);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tgetItemTopCache[taskId] = this.getRowTop(itemIndex);\r\n\t\t\t\treturn getItemTopCache[taskId];\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Get height of the item by item id\r\n\t\t * @param {*} itemId\r\n\t\t */\r\n\t\tgetItemHeight: function (itemId) {\r\n\t\t\tif(quickPosition.canUseSimpleCalculation()){\r\n\t\t\t\treturn quickPosition.getItemHeight(itemId);\r\n\t\t\t}\r\n\r\n\t\t\tif(!getItemHeightCache && this.$config.rowStore){\r\n\t\t\t\tthis._fillHeightCache(this.$config.rowStore);\r\n\t\t\t}\r\n\r\n\t\t\tif(getItemHeightCache[itemId] !== undefined){\r\n\t\t\t\treturn getItemHeightCache[itemId];\r\n\t\t\t}\r\n\r\n\t\t\tvar defaultHeight = this.$getConfig().row_height;\r\n\r\n\t\t\tif(this.$config.rowStore){\r\n\t\t\t\tvar store = this.$config.rowStore;\r\n\t\t\t\tif(!store) return defaultHeight;\r\n\r\n\t\t\t\tvar item = store.getItem(itemId);\r\n\r\n\t\t\t\treturn getItemHeightCache[itemId] = item && item.row_height || defaultHeight;\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultHeight;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_fillHeightCache: function(store){\r\n\t\t\tif(!store){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tgetItemHeightCache = {};\r\n\t\t\tvar defaultHeight = this.$getConfig().row_height;\r\n\t\t\tstore.eachItem(function(item){\r\n\t\t\t\treturn getItemHeightCache[item.id] = item && item.row_height || defaultHeight;\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tgetCacheStateTotalHeight: function(store){\r\n\r\n\t\t\tvar globalHeight = this.$getConfig().row_height;\r\n\t\t\tvar itemHeightCache = {};\r\n\t\t\tvar items = [];\r\n\t\t\tvar sumHeight = 0;\r\n\t\t\tif(store){\r\n\t\t\t\tstore.eachItem(function(item){\r\n\t\t\t\t\titems.push(item);\r\n\t\t\t\t\titemHeightCache[item.id] = item.row_height;\r\n\t\t\t\t\tsumHeight += item.row_height || globalHeight;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\r\n\t\t\treturn {\r\n\t\t\t\tglobalHeight: globalHeight,\r\n\t\t\t\titems: items,\r\n\t\t\t\tcount: items.length,\r\n\t\t\t\tsumHeight: sumHeight\r\n\t\t\t};\r\n\t\t},\r\n\t\tshouldClearHeightCache: function(oldState, newState){\r\n\r\n\t\t\tif(oldState.count != newState.count){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif(oldState.globalHeight != newState.globalHeight){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tif(oldState.sumHeight != newState.sumHeight){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tfor(var i in oldState.items){\r\n\t\t\t\tvar newValue = newState.items[i];\r\n\t\t\t\tif(newValue !== undefined && newValue != oldState.items[i]){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn false;\r\n\t\t},\r\n\t\t/**\r\n\t\t * Get total height of items\r\n\t\t */\r\n\t\tgetTotalHeight: function () {\r\n\t\t\tif(quickPosition.canUseSimpleCalculation()){\r\n\t\t\t\treturn quickPosition.getTotalHeight();\r\n\t\t\t}\r\n\r\n\t\t\tif(totalHeightCache != -1){\r\n\t\t\t\treturn totalHeightCache;\r\n\t\t\t}\r\n\r\n\t\t\tif(this.$config.rowStore){\r\n\t\t\t\tvar store = this.$config.rowStore;\r\n\t\t\t\tthis._fillHeightCache(store);\r\n\t\t\t\tvar getHeight = this.getItemHeight.bind(this);\r\n\t\t\t\tvar visibleItems = store.getVisibleItems();\r\n\t\t\t\tvar totalHeight = 0;\r\n\r\n\t\t\t\tvisibleItems.forEach(function(item){\r\n\t\t\t\t\ttotalHeight += getHeight(item.id);\r\n\t\t\t\t});\r\n\r\n\t\t\t\ttotalHeightCache = totalHeight;\r\n\t\t\t\treturn totalHeight;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Get item by top position\r\n\t\t * @param {*} top\r\n\t\t */\r\n\t\tgetItemIndexByTopPosition: function (top) {\r\n\t\t\tif(this.$config.rowStore){\r\n\t\t\t\tif(quickPosition.canUseSimpleCalculation()){\r\n\t\t\t\t\treturn quickPosition.getItemIndexByTopPosition(top);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar store = this.$config.rowStore;\r\n\t\t\t\tfor(var i = 0; i < store.countVisible(); i++){\r\n\t\t\t\t\tvar current = this.getRowTop(i);\r\n\t\t\t\t\tvar next = this.getRowTop(i+1);\r\n\t\t\t\t\tif(!next){\r\n\t\t\t\t\t\tvar taskId = store.getIdByIndex(i);\r\n\t\t\t\t\t\tnext = current + this.getItemHeight(taskId);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(top >= current && top < next){\r\n\t\t\t\t\t\treturn i;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// GS-1723: If we iterated all tasks and didn't find the position, the target is below all other tasks\r\n\t\t\t\treturn store.countVisible() + 2;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default createMixin;","function createHelper(view){\r\n\tvar cachedRowHeight = -1;\r\n\tvar canUseSimpleCalc = -1;\r\n\treturn {\r\n\t\tresetCache: function(){\r\n\t\t\tcachedRowHeight = -1;\r\n\t\t\tcanUseSimpleCalc = -1;\r\n\t\t},\r\n\t\t_getRowHeight: function(){\r\n\t\t\tif(cachedRowHeight === -1){\r\n\t\t\t\tcachedRowHeight = view.$getConfig().row_height;\r\n\t\t\t}\r\n\t\t\treturn cachedRowHeight;\r\n\t\t},\r\n\t\t_refreshState: function(){\r\n\t\t\tthis.resetCache();\r\n\t\t\tcanUseSimpleCalc = true;\r\n\t\t\tvar store = view.$config.rowStore;\r\n\t\t\tif(!store){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar globalRowHeight = this._getRowHeight();\r\n\t\t\tfor (var i=0; i\";\r\n\t\tthis.$task = container.childNodes[0];\r\n\r\n\t\tthis.$task.innerHTML = \"
\";\r\n\t\tthis.$task_scale = this.$task.childNodes[0];\r\n\r\n\t\tthis.$task_data = this.$task.childNodes[1];\r\n\t\tconst taskBg = \"
\";\r\n\t\tconst links = \"\";\r\n\t\tconst taskBars = \"
\";\r\n\r\n\t\tconst taskConstraints = \"
\";\r\n\t\tconst taskDeadlines = \"
\";\r\n\t\tconst taskBaselines = \"
\";\r\n\r\n\t\tthis.$task_data.innerHTML = taskBg + taskBaselines + links + taskBars + taskConstraints + taskDeadlines;\r\n\r\n\t\tthis.$task_bg = this.$task_data.childNodes[0];\r\n\t\tthis.$task_baselines = this.$task_data.childNodes[1];\r\n\t\tthis.$task_links = this.$task_data.childNodes[2];\r\n\t\tthis.$task_bars = this.$task_data.childNodes[3];\r\n\t\tthis.$task_constraints = this.$task_data.childNodes[4];\r\n\t\tthis.$task_deadlines = this.$task_data.childNodes[5];\r\n\r\n\t\tthis._tasks = {\r\n\t\t\tcol_width: 0,\r\n\t\t\twidth: [], // width of each column\r\n\t\t\tfull_width: 0, // width of all columns\r\n\t\t\ttrace_x: [],\r\n\t\t\trendered: {}\r\n\t\t};\r\n\r\n\t\tvar config = this.$getConfig();\r\n\t\tvar attr = config[this.$config.bind + \"_attribute\"];\r\n\t\tvar linksAttr = config[this.$config.bindLinks + \"_attribute\"];\r\n\t\tif(!attr && this.$config.bind){\r\n\t\t\tattr = \"data-\" + this.$config.bind + \"-id\";\r\n\t\t}\r\n\t\tif(!linksAttr && this.$config.bindLinks){\r\n\t\t\tlinksAttr = \"data-\" + this.$config.bindLinks + \"-id\";\r\n\t\t}\r\n\t\tthis.$config.item_attribute = attr || null;\r\n\t\tthis.$config.link_attribute = linksAttr || null;\r\n\r\n\t\tvar layers = this._createLayerConfig();\r\n\t\tif(!this.$config.layers){\r\n\t\t\tthis.$config.layers = layers.tasks;\r\n\t\t}\r\n\t\tif(!this.$config.linkLayers){\r\n\t\t\tthis.$config.linkLayers = layers.links;\r\n\t\t}\r\n\r\n\t\tthis._attachLayers(this.$gantt);\r\n\r\n\t\tthis.callEvent(\"onReady\", []);\r\n\t\t//this.refresh();\r\n\t\tif (this.$gantt.ext.dragTimeline) {\r\n\t\t\tthis._timelineDragScroll = this.$gantt.ext.dragTimeline.create();\r\n\t\t\tthis._timelineDragScroll.attach(this);\r\n\t\t}\r\n\t},\r\n\r\n\tsetSize: function(width, height){\r\n\t\tvar config = this.$getConfig();\r\n\r\n\t\tif(width*1 === width){\r\n\t\t\tthis.$config.width = width;\r\n\t\t}\r\n\t\tif(height*1 === height){\r\n\r\n\t\t\tthis.$config.height = height;\r\n\t\t\tvar dataHeight = Math.max(this.$config.height - config.scale_height);\r\n\t\t\tthis.$task_data.style.height = dataHeight + 'px';\r\n\t\t}\r\n\r\n\t\tthis.refresh();\r\n\t\tthis.$task_bg.style.backgroundImage = \"\";\r\n\r\n\t\tif(config.smart_rendering && this.$config.rowStore){\r\n\t\t\tthis.$task_bg.style.height = this.getTotalHeight() +\"px\";\r\n\t\t}else{\r\n\t\t\tthis.$task_bg.style.height = \"\";\r\n\t\t}\r\n\r\n\t\tvar scale = this._tasks;\r\n\t\t//timeline area layers\r\n\t\tvar data_els = this.$task_data.childNodes;\r\n\t\tfor(var i= 0, len = data_els.length; i < len; i++){\r\n\t\t\tvar el = data_els[i];\r\n\t\t\tif(el.hasAttribute(\"data-layer\") && el.style)\r\n\t\t\t\tel.style.width = scale.full_width + \"px\";\r\n\t\t}\r\n\t},\r\n\r\n\tisVisible: function(){\r\n\t\tif(this.$parent && this.$parent.$config){\r\n\t\t\treturn !this.$parent.$config.hidden;\r\n\t\t}else{\r\n\t\t\treturn this.$task.offsetWidth;\r\n\t\t}\r\n\t},\r\n\r\n\tgetSize: function(){\r\n\t\tvar config = this.$getConfig();\r\n\t\tvar store = this.$config.rowStore;\r\n\r\n\t\tvar contentHeight = store ? this.getTotalHeight() : 0,\r\n\t\t\tcontentWidth = this.isVisible() ? this._tasks.full_width : 0;\r\n\r\n\t\treturn {\r\n\t\t\tx: this.isVisible() ? this.$config.width : 0,\r\n\t\t\ty: this.isVisible() ? this.$config.height : 0,\r\n\t\t\tcontentX: this.isVisible() ? contentWidth : 0,\r\n\t\t\tcontentY: this.isVisible() ? (config.scale_height + contentHeight) : 0,\r\n\t\t\tscrollHeight: this.isVisible() ? contentHeight : 0,\r\n\t\t\tscrollWidth: this.isVisible() ? contentWidth : 0\r\n\t\t};\r\n\t},\r\n\r\n\tscrollTo: function(left, top){\r\n\t\tif(!this.isVisible())\r\n\t\t\treturn;\r\n\r\n\t\tvar scrolled = false;\r\n\r\n\t\tthis.$config.scrollTop = this.$config.scrollTop || 0;\r\n\t\tthis.$config.scrollLeft = this.$config.scrollLeft || 0;\r\n\t\tif(top*1 === top){\r\n\t\t\tthis.$config.scrollTop = top;\r\n\t\t\tthis.$task_data.scrollTop = this.$config.scrollTop;\r\n\t\t\tscrolled = true;\r\n\t\t}\r\n\t\tif (left*1 === left){\r\n\t\t\tthis.$task.scrollLeft = left;\r\n\t\t\tthis.$config.scrollLeft = this.$task.scrollLeft;\r\n\t\t\tthis._refreshScales();\r\n\t\t\tscrolled = true;\r\n\t\t}\r\n\r\n\t\tif(scrolled){\r\n\t\t\tthis.callEvent(\"onScroll\", [this.$config.scrollLeft, this.$config.scrollTop]);\r\n\t\t}\r\n\t},\r\n\r\n\t_refreshScales: function _refreshScales() {\r\n\t\tif(!this.isVisible())\r\n\t\t\treturn;\r\n\r\n\t\tvar config = this.$getConfig();\r\n\t\tif (!config.smart_scales) return;\r\n\r\n\t\tvar viewPort = this.getViewPort();\r\n\r\n\t\tvar scales = this._scales;\r\n\t\tthis.$task_scale.innerHTML = this._getScaleChunkHtml(scales, viewPort.x, viewPort.x_end);\r\n\t},\r\n\r\n\tgetViewPort: function(){\r\n\t\tvar scrollLeft = this.$config.scrollLeft || 0;\r\n\t\tvar scrollTop = this.$config.scrollTop || 0;\r\n\t\tvar height = this.$config.height || 0;\r\n\t\tvar width = this.$config.width || 0;\r\n\t\treturn {\r\n\t\t\ty: scrollTop,\r\n\t\t\ty_end: scrollTop + height,\r\n\t\t\tx: scrollLeft,\r\n\t\t\tx_end: scrollLeft + width,\r\n\t\t\theight: height,\r\n\t\t\twidth: width\r\n\t\t};\r\n\t},\r\n\r\n\t_createLayerConfig: createLayerConfig,\r\n\r\n\t_attachLayers: function(gantt){\r\n\t\tthis._taskLayers = [];\r\n\t\tthis._linkLayers = [];\r\n\r\n\t\tvar self = this;\r\n\r\n\t\tvar layers = this.$gantt.$services.getService(\"layers\");\r\n\r\n\t\tif(this.$config.bind){\r\n\r\n\t\t\tthis._bindStore();\r\n\t\t\tvar taskRenderer = layers.getDataRender(this.$config.bind);\r\n\r\n\t\t\tif(!taskRenderer){\r\n\t\t\t\ttaskRenderer = layers.createDataRender({\r\n\t\t\t\t\tname: this.$config.bind,\r\n\t\t\t\t\tdefaultContainer: function(){ return self.$task_data;}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\ttaskRenderer.container = function(){ return self.$task_data;};\r\n\r\n\t\t\tvar taskLayers = this.$config.layers;\r\n\t\t\tfor(var i = 0; taskLayers && i < taskLayers.length; i++){\r\n\t\t\t\tvar layer = taskLayers[i];\r\n\r\n\t\t\t\tif(typeof layer == \"string\"){\r\n\t\t\t\t\tlayer = this.$gantt.$ui.layers[layer]();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(typeof layer == \"function\" || (layer && layer.render && layer.update)){\r\n\t\t\t\t\tlayer = {renderer: layer};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlayer.view = this;\r\n\r\n\t\t\t\tvar bar_layer = taskRenderer.addLayer(layer);\r\n\t\t\t\tthis._taskLayers.push(bar_layer);\r\n\t\t\t\tif(layer.expose){\r\n\t\t\t\t\tthis._taskRenderer = taskRenderer.getLayer(bar_layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis._initStaticBackgroundRender();\r\n\t\t}\r\n\r\n\t\tif(this.$config.bindLinks){\r\n\t\t\tself.$config.linkStore = self.$gantt.getDatastore(self.$config.bindLinks);\r\n\r\n\t\t\tvar linkRenderer = layers.getDataRender(this.$config.bindLinks);\r\n\r\n\t\t\tif(!linkRenderer){\r\n\t\t\t\tlinkRenderer = layers.createDataRender({\r\n\t\t\t\t\tname: this.$config.bindLinks,\r\n\t\t\t\t\tdefaultContainer: function(){ return self.$task_data;}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tvar linkLayers = this.$config.linkLayers;\r\n\t\t\tfor(var i = 0; linkLayers && i < linkLayers.length; i++){\r\n\r\n\t\t\t\tif(typeof layer == \"string\"){\r\n\t\t\t\t\tlayer = this.$gantt.$ui.layers[layer]();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar layer = linkLayers[i];\r\n\t\t\t\tlayer.view = this;\r\n\t\t\t//\tlayer.getViewPort = getViewPort;\r\n\t\t\t//\tsubscribeSmartRender(layer);\r\n\t\t\t\tvar linkLayer = linkRenderer.addLayer(layer);\r\n\t\t\t\tthis._taskLayers.push(linkLayer);\r\n\t\t\t\tif(linkLayers[i].expose){\r\n\t\t\t\t\tthis._linkRenderer = linkRenderer.getLayer(linkLayer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_initStaticBackgroundRender: function(){\r\n\t\tvar self = this;\r\n\t\tvar staticRender = canvasRender.create();\r\n\t\tvar store = self.$config.rowStore;\r\n\t\tif(!store) return;\r\n\r\n\t\tthis._staticBgHandler = store.attachEvent(\"onStoreUpdated\", function(id, item, mode){\r\n\t\t\tif(id !== null) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif(!self.isVisible())\r\n\t\t\t\treturn;\r\n\t\t\tvar config = self.$getConfig();\r\n\t\t\tif(config.static_background || config.timeline_placeholder) {\r\n\t\t\t\tvar store = self.$gantt.getDatastore(self.$config.bind);\r\n\t\t\t\tvar staticBgContainer = self.$task_bg_static;\r\n\t\t\t\tif(!staticBgContainer){\r\n\t\t\t\t\tstaticBgContainer = document.createElement(\"div\");\r\n\t\t\t\t\tstaticBgContainer.className = \"gantt_task_bg\";\r\n\t\t\t\t\tself.$task_bg_static = staticBgContainer;\r\n\t\t\t\t\tif(self.$task_bg.nextSibling){\r\n\t\t\t\t\t\tself.$task_data.insertBefore(staticBgContainer, self.$task_bg.nextSibling);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tself.$task_data.appendChild(staticBgContainer);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (store) {\r\n\t\t\t\t\tvar staticBackgroundHeight = self.getTotalHeight();\r\n\t\t\t\t\tif (config.timeline_placeholder){\r\n\t\t\t\t\t\tstaticBackgroundHeight = config.timeline_placeholder.height || self.$task_data.offsetHeight || 99999;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstaticRender.render(staticBgContainer, config, self.getScale(), staticBackgroundHeight, self.getItemHeight(item ? item.id : null));\r\n\t\t\t\t}\r\n\t\t\t}else if(config.static_background){\r\n\t\t\t\tif(self.$task_bg_static && self.$task_bg_static.parentNode){\r\n\t\t\t\t\tself.$task_bg_static.parentNode.removeChild(self.$task_bg_static);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tthis.attachEvent(\"onDestroy\", function () {\r\n\t\t\tstaticRender.destroy();\r\n\t\t});\r\n\t\tthis._initStaticBackgroundRender = function(){};//init once\r\n\t},\r\n\r\n\t_clearLayers: function(gantt){\r\n\t\tvar layers = this.$gantt.$services.getService(\"layers\");\r\n\t\tvar taskRenderer = layers.getDataRender(this.$config.bind);\r\n\t\tvar linkRenderer = layers.getDataRender(this.$config.bindLinks);\r\n\r\n\t\tif (this._taskLayers) {\r\n\t\t\tfor(var i = 0; i < this._taskLayers.length; i++){\r\n\t\t\t\ttaskRenderer.removeLayer(this._taskLayers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this._linkLayers) {\r\n\t\t\tfor(var i = 0; i < this._linkLayers.length; i++){\r\n\t\t\t\tlinkRenderer.removeLayer(this._linkLayers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._linkLayers = [];\r\n\t\tthis._taskLayers = [];\r\n\t},\r\n\r\n\t_render_tasks_scales: function _render_tasks_scales() {\r\n\t\tvar config = this.$getConfig();\r\n\r\n\t\tvar scales_html = \"\",\r\n\t\t\touter_width = 0,\r\n\t\t\tscale_height = 0;\r\n\r\n\t\tvar state = this.$gantt.getState();\r\n\r\n\t\tif (this.isVisible()) {\r\n\t\t\tvar helpers = this.$scaleHelper;\r\n\t\t\tvar scales = this._getScales();\r\n\t\t\tscale_height = config.scale_height;\r\n\r\n\t\t\tvar availWidth = this.$config.width;\r\n\t\t\tif(config.autosize == \"x\" || config.autosize == \"xy\"){\r\n\t\t\t\tavailWidth = Math.max(config.autosize_min_width, 0);\r\n\t\t\t}\r\n\r\n\t\t\tvar cfgs = helpers.prepareConfigs(scales, config.min_column_width, availWidth, scale_height - 1, state.min_date, state.max_date, config.rtl);\r\n\t\t\tvar cfg = this._tasks = cfgs[cfgs.length - 1];\r\n\t\t\tthis._scales = cfgs;\r\n\t\t\tthis._posFromDateCache = {};\r\n\r\n\t\t\tscales_html = this._getScaleChunkHtml(cfgs, 0, this.$config.width);\r\n\r\n\t\t\touter_width = cfg.full_width + \"px\";//cfg.full_width + (this._scroll_sizes().y ? scrollSizes.scroll_size : 0) + \"px\";\r\n\t\t\tscale_height += \"px\";\r\n\t\t}\r\n\r\n\t\tthis.$task_scale.style.height = scale_height;\r\n\r\n\t\tthis.$task_data.style.width =\r\n\t\t\tthis.$task_scale.style.width = outer_width;\r\n\r\n\t\tthis.$task_scale.innerHTML = scales_html;\r\n\r\n\t},\r\n\r\n\t_getScaleChunkHtml: function _get_scale_chunk_html (scales, fromPos, toPos) {\r\n\t\tvar templates = this.$gantt.templates;\r\n\t\tvar html = [];\r\n\r\n\t\tvar css = templates.scale_row_class;\r\n\t\tfor (var i = 0; i < scales.length; i++) {\r\n\t\t\tvar cssClass = \"gantt_scale_line\";\r\n\t\t\tvar tplClass = css(scales[i]);\r\n\t\t\tif (tplClass) {\r\n\t\t\t\tcssClass += \" \" + tplClass;\r\n\t\t\t}\r\n\r\n\t\t\thtml.push(\"
\" + this._prepareScaleHtml(scales[i], fromPos, toPos, i) + \"
\");\r\n\t\t}\r\n\r\n\t\treturn html.join(\"\");\r\n\t},\r\n\t_prepareScaleHtml: function _prepare_scale_html(config, fromPos, toPos, index) {\r\n\t\tvar globalConfig = this.$getConfig();\r\n\t\tvar globalTemplates = this.$gantt.templates;\r\n\r\n\t\tvar cells = [];\r\n\t\tvar date = null, css = null;\r\n\r\n\t\tvar content = config.format || config.template || config.date;\r\n\r\n\t\tif(typeof content === \"string\"){\r\n\t\t\tcontent = this.$gantt.date.date_to_str(content);\r\n\t\t}\r\n\r\n\t\tvar startIndex = 0,\r\n\t\t\tendIndex = config.count;\r\n\r\n\t\tif (globalConfig.smart_scales && (!isNaN(fromPos) && !isNaN(toPos))) {\r\n\t\t\tstartIndex = helpers.findBinary(config.left, fromPos);\r\n\t\t\tendIndex = helpers.findBinary(config.left, toPos) + 1;\r\n\t\t}\r\n\r\n\t\tcss = config.css || function () {\r\n\t\t\t};\r\n\t\tif (!config.css && globalConfig.inherit_scale_class) {\r\n\t\t\tcss = globalTemplates.scale_cell_class;\r\n\t\t}\r\n\r\n\t\tfor (var i = startIndex; i < endIndex; i++) {\r\n\t\t\tif (!config.trace_x[i]) break;\r\n\r\n\t\t\tdate = new Date(config.trace_x[i]);\r\n\t\t\tvar value = content.call(this, date),\r\n\t\t\t\twidth = config.width[i],\r\n\t\t\t\theight = config.height,\r\n\t\t\t\tleft = config.left[i],\r\n\t\t\t\tstyle = \"\",\r\n\t\t\t\ttemplate = \"\",\r\n\t\t\t\tcssclass = \"\";\r\n\r\n\t\t\tif (width) {\r\n\t\t\t\tvar position = globalConfig.smart_scales ? (\"position:absolute;left:\" + left + \"px\") : \"\";\r\n\r\n\t\t\t\tstyle = \"width:\" + (width) + \"px;height:\" + height + \"px;\" + position;\r\n\t\t\t\t// GS-1188: Display the scale value in the viewport for long cells\r\n\t\t\t\tconst viewPort = this.getViewPort();\r\n\t\t\t\tconst floatConfig = (globalConfig.scales[index] || {}).sticky; // for old scale settings\r\n\r\n\t\t\t\tlet labelPosition = '';\r\n\t\t\t\tconst approxLabelWidth = 70;\r\n\t\t\t\t// if sticky config is not specified - sticky labels are enabled for long cells only\r\n\t\t\t\tif ((floatConfig !== false && width > approxLabelWidth) || floatConfig === true) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (left < viewPort.x && left + width/2 - approxLabelWidth/2 < viewPort.x){\r\n\t\t\t\t\t\tlabelPosition = ` style='position:absolute;left: ${viewPort.x - left + 10}px;' `;\r\n\t\t\t\t\t} else if(left + width/2 + approxLabelWidth/2 > viewPort.x_end && width > approxLabelWidth){\r\n\t\t\t\t\t\tlet labelPos = viewPort.x_end - left - 10;\r\n\t\t\t\t\t\tlet translateValue = \"-100%\";\r\n\t\t\t\t\t\tif(labelPos < approxLabelWidth) {\r\n\t\t\t\t\t\t\tlabelPos = approxLabelWidth;\r\n\t\t\t\t\t\t\ttranslateValue = `-${labelPos}px`;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlabelPosition = ` style='position:absolute;left: ${labelPos}px;transform: translate(${translateValue},0);' `;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcssclass = \"gantt_scale_cell\" + (i == config.count - 1 ? \" gantt_last_cell\" : \"\");\r\n\r\n\t\t\t\ttemplate = css.call(this, date);\r\n\t\t\t\tif (template) cssclass += \" \" + template;\r\n\r\n\t\t\t\tvar ariaAttr = this.$gantt._waiAria.getTimelineCellAttr(value);\r\n\t\t\t\tvar cell = `
${value}
`;\r\n\t\t\t\tcells.push(cell);\r\n\t\t\t} else {\r\n\t\t\t\t//do not render ignored cells\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn cells.join(\"\");\r\n\t},\r\n\tdateFromPos: function dateFromPos(x) {\r\n\t\tvar scale = this._tasks;\r\n\t\tif (x < 0 || x > scale.full_width || !scale.full_width) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tvar ind = helpers.findBinary(this._tasks.left, x);\r\n\t\tvar summ = this._tasks.left[ind];\r\n\r\n\t\tvar col_width = scale.width[ind] || scale.col_width;\r\n\t\tvar part = 0;\r\n\t\tif (col_width) {\r\n\t\t\tpart = (x - summ) / col_width;\r\n\t\t\tif(scale.rtl){\r\n\t\t\t\tpart = 1 - part;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tvar unit = 0;\r\n\t\tif (part) {\r\n\t\t\tunit = this._getColumnDuration(scale, scale.trace_x[ind]);\r\n\t\t}\r\n\r\n\t\tvar date = new Date(scale.trace_x[ind].valueOf() + Math.round(part * unit));\r\n\t\treturn date;\r\n\t},\r\n\tposFromDate: function posFromDate(date) {\r\n\t\tif (!this.isVisible())\r\n\t\t\treturn 0;\r\n\r\n\t\tif(!date){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tvar dateValue = String(date.valueOf());\r\n\r\n\t\tif(this._posFromDateCache[dateValue] !== undefined){\r\n\t\t\treturn this._posFromDateCache[dateValue];\r\n\t\t}\r\n\t\tvar ind = this.columnIndexByDate(date);\r\n\t\tthis.$gantt.assert(ind >= 0, \"Invalid day index\");\r\n\r\n\t\tvar wholeCells = Math.floor(ind);\r\n\t\tvar partCell = ind % 1;\r\n\r\n\t\tvar pos = this._tasks.left[Math.min(wholeCells, this._tasks.width.length - 1)];\r\n\t\tif (wholeCells == this._tasks.width.length)\r\n\t\t\tpos += this._tasks.width[this._tasks.width.length - 1];\r\n\t\t//for(var i=1; i <= wholeCells; i++)\r\n\t\t//\tpos += gantt._tasks.width[i-1];\r\n\r\n\t\tif (partCell) {\r\n\t\t\tif (wholeCells < this._tasks.width.length) {\r\n\t\t\t\tpos += this._tasks.width[wholeCells] * (partCell % 1);\r\n\t\t\t} else {\r\n\t\t\t\tpos += 1;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tvar roundPos = Math.round(pos);\r\n\t\tthis._posFromDateCache[dateValue] = roundPos;\r\n\t\treturn Math.round(roundPos);\r\n\t},\r\n\r\n\t_getNextVisibleColumn: function (startIndex, columns, ignores) {\r\n\t\t// iterate columns to the right\r\n\t\tvar date = +columns[startIndex];\r\n\t\tvar visibleDateIndex = startIndex;\r\n\t\twhile (ignores[date]) {\r\n\t\t\tvisibleDateIndex++;\r\n\t\t\tdate = +columns[visibleDateIndex];\r\n\t\t}\r\n\r\n\t\treturn visibleDateIndex;\r\n\t},\r\n\t_getPrevVisibleColumn: function (startIndex, columns, ignores) {\r\n\t\t// iterate columns to the left\r\n\t\tvar date = +columns[startIndex];\r\n\t\tvar visibleDateIndex = startIndex;\r\n\t\twhile (ignores[date]) {\r\n\t\t\tvisibleDateIndex--;\r\n\t\t\tdate = +columns[visibleDateIndex];\r\n\t\t}\r\n\t\treturn visibleDateIndex;\r\n\t},\r\n\t_getClosestVisibleColumn: function (startIndex, columns, ignores) {\r\n\t\tvar visibleDateIndex = this._getNextVisibleColumn(startIndex, columns, ignores);\r\n\t\tif (!columns[visibleDateIndex]) {\r\n\t\t\tvisibleDateIndex = this._getPrevVisibleColumn(startIndex, columns, ignores);\r\n\t\t}\r\n\t\treturn visibleDateIndex;\r\n\t},\r\n\tcolumnIndexByDate: function columnIndexByDate(date) {\r\n\t\tvar pos = new Date(date).valueOf();\r\n\t\tvar days = this._tasks.trace_x_ascending,\r\n\t\t\tignores = this._tasks.ignore_x;\r\n\r\n\t\tvar state = this.$gantt.getState();\r\n\r\n\t\tif (pos <= state.min_date) {\r\n\t\t\tif(this._tasks.rtl){\r\n\t\t\t\treturn days.length;\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif (pos >= state.max_date) {\r\n\t\t\tif(this._tasks.rtl){\r\n\t\t\t\treturn 0;\r\n\t\t\t}else{\r\n\t\t\t\treturn days.length;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dateIndex = helpers.findBinary(days, pos);\r\n\r\n\t\tvar visibleIndex = this._getClosestVisibleColumn(dateIndex, days, ignores);\r\n\t\tvar visibleDate = days[visibleIndex];\r\n\t\tvar transition = this._tasks.trace_index_transition;\r\n\r\n\t\tif(!visibleDate){\r\n\t\t\tif(transition){\r\n\t\t\t\treturn transition[0];\r\n\t\t\t}else{\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar part = ((date - days[visibleIndex]) / this._getColumnDuration(this._tasks, days[visibleIndex]));\r\n\t\tif(transition){\r\n\t\t\treturn transition[visibleIndex] + (1 - part);\r\n\t\t}else{\r\n\t\t\treturn visibleIndex + part;\r\n\t\t}\r\n\t},\r\n\tgetItemPosition:function (task, start_date, end_date) {\r\n\t\tvar xLeft, xRight, width;\r\n\r\n\t\tlet displayStart = start_date || task.start_date || task.$auto_start_date;\r\n\t\tlet displayEnd = end_date || task.end_date || task.$auto_end_date;\r\n\t\tif(this._tasks.rtl){\r\n\t\t\txRight = this.posFromDate(displayStart);\r\n\t\t\txLeft = this.posFromDate(displayEnd);\r\n\t\t}else{\r\n\t\t\txLeft = this.posFromDate(displayStart);\r\n\t\t\txRight = this.posFromDate(displayEnd);\r\n\t\t}\r\n\t\twidth = Math.max((xRight - xLeft), 0);\r\n\r\n\t\tvar y = this.getItemTop(task.id);\r\n\r\n\t\tvar height = this.getBarHeight(task.id);\r\n\t\tvar rowHeight = this.getItemHeight(task.id);\r\n\t\treturn {\r\n\t\t\tleft: xLeft,\r\n\t\t\ttop: y,\r\n\t\t\theight: height,\r\n\t\t\twidth: width,\r\n\t\t\trowHeight: rowHeight\r\n\t\t};\r\n\t},\r\n\r\n\tgetBarHeight: function(taskId, isMilestoneRender){\r\n\t\tvar config = this.$getConfig();\r\n\r\n\t\tvar task = this.$config.rowStore.getItem(taskId);\r\n\t\t// height of the bar item\r\n\t\tvar height = task.task_height || task.bar_height || config.bar_height || config.task_height;\r\n\t\tvar rowHeight = this.getItemHeight(taskId);\r\n\r\n\t\tif (height == \"full\") {\r\n\t\t\tvar offset = config.bar_height_padding || 3;\r\n\t\t\theight = rowHeight - offset;\r\n\t\t}\r\n\t\t//item height cannot be bigger than row height\r\n\t\theight = Math.min(height, rowHeight);\r\n\t\tif (isMilestoneRender) { // to get correct height for addapting Milestone to the row\r\n\t\t\theight = Math.round(height / Math.sqrt(2));\r\n\t\t}\r\n\t\treturn Math.max(height, 0);\r\n\t},\r\n\r\n\tgetScale: function(){\r\n\t\treturn this._tasks;\r\n\t},\r\n\r\n\t_getScales: function _get_scales() {\r\n\t\tvar config = this.$getConfig();\r\n\t\tvar helpers = this.$scaleHelper;\r\n\t\tvar scales = [helpers.primaryScale(config)].concat(helpers.getSubScales(config));\r\n\r\n\t\thelpers.sortScales(scales);\r\n\t\treturn scales;\r\n\t},\r\n\r\n\t_getColumnDuration: function _get_coll_duration(scale, date) {\r\n\t\treturn this.$gantt.date.add(date, scale.step, scale.unit) - date;\r\n\t},\r\n\t_bindStore: function () {\r\n\t\tif (this.$config.bind){\r\n\t\t\tvar rowStore = this.$gantt.getDatastore(this.$config.bind);\r\n\t\t\tthis.$config.rowStore = rowStore;\r\n\t\t\tif(rowStore && !rowStore._timelineCacheAttached){\r\n\t\t\t\tvar self = this;\r\n\t\t\t\trowStore._timelineCacheAttached = rowStore.attachEvent(\"onBeforeFilter\", function(){\r\n\t\t\t\t\tself._resetTopPositionHeight();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_unbindStore: function(){\r\n\t\tif (this.$config.bind){\r\n\t\t\tvar rowStore = this.$gantt.getDatastore(this.$config.bind);\r\n\t\t\tif(rowStore && rowStore._timelineCacheAttached){\r\n\t\t\t\trowStore.detachEvent(rowStore._timelineCacheAttached);\r\n\t\t\t\trowStore._timelineCacheAttached = false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\trefresh: function(){\r\n\t\tthis._bindStore();\r\n\r\n\t\tif(this.$config.bindLinks) {\r\n\t\t\tthis.$config.linkStore = this.$gantt.getDatastore(this.$config.bindLinks);\r\n\t\t}\r\n\r\n\t\tthis._resetTopPositionHeight();\r\n\t\tthis._resetHeight();\r\n\t\tthis._initStaticBackgroundRender();\r\n\t\tthis._render_tasks_scales();\r\n\t},\r\n\r\n\tdestructor: function(){\r\n\t\tvar gantt = this.$gantt;\r\n\t\tthis._clearLayers(gantt);\r\n\t\tthis._unbindStore();\r\n\t\tthis.$task = null;\r\n\t\tthis.$task_scale = null;\r\n\t\tthis.$task_data = null;\r\n\t\tthis.$task_bg = null;\r\n\t\tthis.$task_links = null;\r\n\t\tthis.$task_bars = null;\r\n\r\n\t\tthis.$gantt = null;\r\n\r\n\t\tif(this.$config.rowStore){\r\n\t\t\tthis.$config.rowStore.detachEvent(this._staticBgHandler);\r\n\t\t\tthis.$config.rowStore = null;\r\n\t\t}\r\n\t\tif(this.$config.linkStore){\r\n\t\t\tthis.$config.linkStore = null;\r\n\t\t}\r\n\r\n\t\tif(this._timelineDragScroll) {\r\n\t\t\tthis._timelineDragScroll.destructor();\r\n\t\t\tthis._timelineDragScroll = null;\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t}\r\n};\r\n\r\nexport default Timeline;","\r\nexport default function(){\r\n\tvar self = this;\r\n\tvar taskFilter = function(){\r\n\t\treturn self.isVisible();\r\n\t};\r\n\r\n\tvar barVisible = function(id, task){\r\n\t\treturn !task.hide_bar;\r\n\t};\r\n\r\n\tconst gantt = this.$gantt;\r\n\r\n\tvar taskLayers = [\r\n\t\t{\r\n\t\t\texpose: true,\r\n\t\t\trenderer: this.$gantt.$ui.layers.taskBar(),\r\n\t\t\tcontainer: this.$task_bars,\r\n\t\t\tfilter: [taskFilter, barVisible]\r\n\t\t}\r\n\t];\r\n\r\n\ttaskLayers.push({\r\n\t\trenderer: this.$gantt.$ui.layers.taskBg(),\r\n\t\tcontainer: this.$task_bg,\r\n\t\tfilter: [\r\n\t\t\t//function(){\r\n\t\t\t//\treturn !self.$getConfig().static_background;\r\n\t\t\t//},\r\n\t\t\ttaskFilter\r\n\t\t]\r\n\t});\r\n\r\n\tvar linkLayers = [\r\n\t\t{\r\n\t\t\texpose: true,\r\n\t\t\trenderer: this.$gantt.$ui.layers.link(),\r\n\t\t\tcontainer: this.$task_links,\r\n\t\t\tfilter: [taskFilter]\r\n\t\t}\r\n\t];\r\n\r\n\treturn {\r\n\t\ttasks: taskLayers,\r\n\t\tlinks: linkLayers\r\n\t};\r\n\r\n};","const SENSITIVITY = 20;\r\nconst TIMEOUT = 50;\r\nconst SCROLLSTEP = 10;\r\n\r\nexport default class ScrollableGrid {\r\n\tpublic getCurrentX;\r\n\tprivate $gantt;\r\n\tprivate $grid;\r\n\tprivate _dnd;\r\n\tprivate _scrollView;\r\n\tprivate _scrollOrder: 0 | 1 | -1 = 0;\r\n\r\n\tconstructor(params) {\r\n\t\tconst {gantt, grid, dnd, getCurrentX} = params;\r\n\t\tthis.$gantt = gantt;\r\n\t\tthis.$grid = grid;\r\n\t\tthis._dnd = dnd;\r\n\t\tthis.getCurrentX = getCurrentX;\r\n\t\tthis._scrollView = this.$gantt.$ui.getView(this.$grid.$config.scrollX);\r\n\t\tthis.attachEvents();\r\n\t}\r\n\tattachEvents() {\r\n\t\tif (this.isScrollable()) {\r\n\t\t\tthis._dnd.attachEvent(\"onDragMove\", (obj, e) => {\r\n\t\t\t\tconst gridBoundingRect = this.$grid.$grid.getBoundingClientRect();\r\n\t\t\t\tconst maxLeft = gridBoundingRect.right;\r\n\t\t\t\tconst minLeft = gridBoundingRect.left;\r\n\t\t\t\tconst currentX = this.getCurrentX(e.clientX);\r\n\r\n\t\t\t\tif (currentX >= maxLeft - SENSITIVITY) {\r\n\t\t\t\t\tthis.autoscrollRight();\r\n\t\t\t\t\tthis.autoscrollStart();\r\n\t\t\t\t}\r\n\t\t\t\tif (currentX <= minLeft + SENSITIVITY) {\r\n\t\t\t\t\tthis.autoscrollLeft();\r\n\t\t\t\t\tthis.autoscrollStart();\r\n\t\t\t\t}\r\n\t\t\t\tif (currentX < maxLeft - SENSITIVITY && currentX > minLeft + SENSITIVITY) {\r\n\t\t\t\t\tthis.autoscrollStop();\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t\tthis._dnd.attachEvent(\"onDragEnd\", () => {\r\n\t\t\t\tthis.autoscrollStop();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\tautoscrollStart() {\r\n\t\tif (this._scrollOrder === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst scrollStep = SCROLLSTEP * this._scrollOrder;\r\n\t\tconst scrollState = this._scrollView.getScrollState();\r\n\t\tthis._scrollView.scrollTo(scrollState.position + scrollStep);\r\n\t\tsetTimeout(() => { this.autoscrollStart(); }, TIMEOUT);\r\n\t}\r\n\tautoscrollRight() {\r\n\t\tthis._scrollOrder = 1;\r\n\t}\r\n\tautoscrollLeft() {\r\n\t\tthis._scrollOrder = -1;\r\n\t}\r\n\tautoscrollStop() {\r\n\t\tthis._scrollOrder = 0;\r\n\t}\r\n\tgetCorrection() {\r\n\t\tif (!this.isScrollable()) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn this._scrollView.getScrollState().position;\r\n\t}\r\n\tisScrollable() {\r\n\t\treturn !!this.$grid.$config.scrollable;\r\n\t}\r\n}","import * as domHelpers from \"../../utils/dom_helpers\";\r\nimport ScrollableGrid from \"./scrollable_grid\";\r\n\r\nconst COLUMN_ID_ATTR_NAME = \"data-column-id\";\r\n\r\nexport class ColumnsGridDnd {\r\n\tprivate $gantt;\r\n\tprivate $grid;\r\n\tprivate _dragX;\r\n\tprivate _dnd;\r\n\tprivate _originAutoscroll;\r\n\tprivate _scrollableGrid: ScrollableGrid;\r\n\tprivate _draggedCell;\r\n\tprivate _targetMarker = null;\r\n\tprivate _gridConfig;\r\n\tconstructor(gantt, grid) {\r\n\t\tthis.$gantt = gantt;\r\n\t\tthis.$grid = grid;\r\n\t}\r\n\tinit() {\r\n\t\tconst DND = this.$gantt.$services.getService(\"dnd\");\r\n\t\tthis._dnd = new DND(this.$grid.$grid_scale, { updates_per_second: 60 });\r\n\t\tthis._scrollableGrid = new ScrollableGrid({\r\n\t\t\tgantt: this.$gantt,\r\n\t\t\tgrid: this.$grid,\r\n\t\t\tdnd: this._dnd,\r\n\t\t\tgetCurrentX: this.calculateCurrentPosition\r\n\t\t});\r\n\t\tthis.attachEvents();\r\n\t}\r\n\tattachEvents() {\r\n\t\tthis._dnd.attachEvent(\"onBeforeDragStart\", (obj, e) => {\r\n\t\t\tthis._draggedCell = this.$gantt.utils.dom.closest(e.target, \".gantt_grid_head_cell\");\r\n\t\t\tif(!this._draggedCell){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst columns = this.$grid.$getConfig().columns;\r\n\t\t\tconst columnName = this._draggedCell.getAttribute(COLUMN_ID_ATTR_NAME);\r\n\t\t\tlet draggedColumn;\r\n\t\t\tlet draggedIndex;\r\n\t\t\tcolumns.map(function(column, index){\r\n\t\t\t\tif(column.name === columnName){\r\n\t\t\t\t\tdraggedColumn = column;\r\n\t\t\t\t\tdraggedIndex = index;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (this.$grid.callEvent(\"onBeforeColumnDragStart\", [{ draggedColumn, draggedIndex}]) === false) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (!this._draggedCell || !draggedColumn) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tthis._gridConfig = this.$grid.$getConfig();\r\n\t\t\tthis._originAutoscroll = this.$gantt.config.autoscroll;\r\n\t\t\tthis.$gantt.config.autoscroll = false;\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tthis._dnd.attachEvent(\"onAfterDragStart\", (obj, e) => {\r\n\t\t\tif (!this._draggedCell) {\r\n\t\t\t\treturn; // GS-1333: don't try to reorder a column when we resize it\r\n\t\t\t}\r\n\t\t\tthis._dnd.config.column = this._draggedCell.getAttribute(COLUMN_ID_ATTR_NAME);\r\n\t\t\tthis._dnd.config.marker.innerHTML = this._draggedCell.outerHTML;\r\n\t\t\tthis._dnd.config.marker.classList.add(\"gantt_column_drag_marker\");\r\n\t\t\tthis._dnd.config.marker.style.height = this._gridConfig.scale_height + \"px\";\r\n\t\t\tthis._dnd.config.marker.style.lineHeight = this._gridConfig.scale_height + \"px\";\r\n\t\t\tthis._draggedCell.classList.add(\"gantt_grid_head_cell_dragged\");\r\n\t\t});\r\n\r\n\t\tthis._dnd.attachEvent(\"onDragMove\", (obj, e) => {\r\n\t\t\tif(!this._draggedCell){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._dragX = e.clientX;\r\n\t\t\tconst x = this.calculateCurrentPosition(e.clientX);\r\n\t\t\tconst columnIndexes = this.findColumnsIndexes();\r\n\t\t\tconst targetIndex = columnIndexes.targetIndex;\r\n\t\t\tconst draggedIndex = columnIndexes.draggedIndex;\r\n\t\t\tconst columns = this.$grid.$getConfig().columns;\r\n\r\n\t\t\tconst draggedColumn = columns[draggedIndex];\r\n\t\t\tconst targetColumn = columns[targetIndex];\r\n\t\t\tif (this.$grid.callEvent(\"onColumnDragMove\", [{ draggedColumn, targetColumn, draggedIndex, targetIndex }]) === false) {\r\n\t\t\t\tthis.cleanTargetMarker();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tthis.setMarkerPosition(x);\r\n\t\t\tthis.drawTargetMarker(columnIndexes);\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tthis._dnd.attachEvent(\"onDragEnd\", () => {\r\n\t\t\tif (!this._draggedCell) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.$gantt.config.autoscroll = this._originAutoscroll;\r\n\t\t\tthis._draggedCell.classList.remove(\"gantt_grid_head_cell_dragged\");\r\n\t\t\tthis.cleanTargetMarker();\r\n\t\t\tthis.reorderColumns();\r\n\t\t});\r\n\r\n\t}\r\n\treorderColumns() {\r\n\t\tconst { targetIndex, draggedIndex } = this.findColumnsIndexes();\r\n\r\n\t\tconst columns = this.$grid.$getConfig().columns;\r\n\t\tconst draggedColumn = columns[draggedIndex];\r\n\t\tconst targetColumn = columns[targetIndex];\r\n\r\n\t\tif (this.$grid.callEvent(\"onBeforeColumnReorder\", [{ draggedColumn, targetColumn, draggedIndex, targetIndex }]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (targetIndex === draggedIndex) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcolumns.splice(draggedIndex, 1);\r\n\t\tcolumns.splice(targetIndex, 0, draggedColumn);\r\n\t\tthis.$gantt.render();\r\n\t\tthis.$grid.callEvent(\"onAfterColumnReorder\", [{ draggedColumn, targetColumn, draggedIndex, targetIndex }]);\r\n\t}\r\n\tfindColumnsIndexes() {\r\n\t\tconst draggedId = this._dnd.config.column;\r\n\t\tconst columns = this.$grid.$getConfig().columns;\r\n\t\tlet targetIndex: number;\r\n\t\tlet draggedIndex: number;\r\n\t\tlet xBefore: number;\r\n\t\tlet xAfter: number;\r\n\t\tconst currentColumn = { startX: 0, endX: 0 };\r\n\r\n\t\tlet start = 0;\r\n\t\tlet end = columns.length - 1;\r\n\t\tlet compare = (a, b) => a <= b;\r\n\t\tlet next = (index) => ++index;\r\n\t\tif (this.$gantt.config.rtl) {\r\n\t\t\tstart = columns.length - 1;\r\n\t\t\tend = 0;\r\n\t\t\tcompare = (a, b) => a >= b;\r\n\t\t\tnext = (index) => --index;\r\n\t\t}\r\n\r\n\t\tlet columnRelativePos: number;\r\n\r\n\t\tconst relativeX = this._dragX - this.$grid.$grid.getBoundingClientRect().left + this._scrollableGrid.getCorrection();\r\n\t\tfor (let i = start; compare(i, end); i = next(i)) {\r\n\t\t\tif (targetIndex !== undefined && draggedIndex !== undefined) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(!columns[i].hide) {\r\n\t\t\t\tcurrentColumn.startX = currentColumn.endX;\r\n\t\t\t\tcurrentColumn.endX += columns[i].width;\r\n\r\n\t\t\t\t// if drop on a column or drop after the last column\r\n\t\t\t\tif (relativeX >= currentColumn.startX && (relativeX <= currentColumn.endX || !compare(next(i), end))) {\r\n\t\t\t\t\ttargetIndex = i;\r\n\t\t\t\t\txBefore = currentColumn.startX;\r\n\t\t\t\t\txAfter = currentColumn.endX;\r\n\t\t\t\t\tcolumnRelativePos = (relativeX - currentColumn.startX) / (currentColumn.endX - currentColumn.startX);\r\n\t\t\t\t}\r\n\t\t\t\tif (draggedId === columns[i].name) {\r\n\t\t\t\t\tdraggedIndex = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttargetIndex,\r\n\t\t\tdraggedIndex,\r\n\t\t\txBefore,\r\n\t\t\txAfter,\r\n\t\t\tcolumnRelativePos\r\n\t\t};\r\n\t}\r\n\tsetMarkerPosition(x: number, y: number = 10) {\r\n\t\tconst { marker } = this._dnd.config;\r\n\t\tconst gridOffset = this._dnd._obj.getBoundingClientRect();\r\n\t\tmarker.style.top = `${gridOffset.y + y}px`;\r\n\t\tmarker.style.left = `${x}px`;\r\n\t}\r\n\tcalculateCurrentPosition = (eventX: number) => {\r\n\t\tconst gridBoundingRect = this.$grid.$grid.getBoundingClientRect();\r\n\t\tconst maxLeft = gridBoundingRect.right;\r\n\t\tconst minLeft = gridBoundingRect.left;\r\n\t\tlet x = eventX;\r\n\t\tif (x > maxLeft) {\r\n\t\t\tx = maxLeft;\r\n\t\t}\r\n\t\tif (x < minLeft) {\r\n\t\t\tx = minLeft;\r\n\t\t}\r\n\t\treturn x;\r\n\t};\r\n\tdrawTargetMarker({ targetIndex, draggedIndex, xBefore, xAfter, columnRelativePos }) {\r\n\t\tif (!this._targetMarker) {\r\n\t\t\tthis._targetMarker = document.createElement(\"div\");\r\n\t\t\tdomHelpers.addClassName(this._targetMarker, \"gantt_grid_target_marker\");\r\n\t\t\tthis._targetMarker.style.display = \"none\";\r\n\t\t\tthis._targetMarker.style.height = `${this._gridConfig.scale_height}px`;\r\n\t\t}\r\n\r\n\t\t// marker can be detached after gantt.render\r\n\t\tif(!this._targetMarker.parentNode){\r\n\t\t\tthis.$grid.$grid_scale.appendChild(this._targetMarker);\r\n\t\t}\r\n\r\n\t\tlet nextPosition: number;\r\n\t\tif (targetIndex > draggedIndex) {\r\n\t\t\tnextPosition = xAfter;\r\n\t\t} else if (targetIndex < draggedIndex) {\r\n\t\t\tnextPosition = xBefore;\r\n\t\t} else {\r\n\t\t\tif(columnRelativePos > 0.5){\r\n\t\t\t\tnextPosition = xAfter;\r\n\t\t\t}else{\r\n\t\t\t\tnextPosition = xBefore;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._targetMarker.style.left = `${nextPosition}px`;\r\n\t\tthis._targetMarker.style.display = \"block\";\r\n\t}\r\n\tcleanTargetMarker() {\r\n\t\tif (this._targetMarker && this._targetMarker.parentNode) {\r\n\t\t\tthis.$grid.$grid_scale.removeChild(this._targetMarker);\r\n\t\t}\r\n\t\tthis._targetMarker = null;\r\n\t}\r\n}","function create(gantt){\r\n\tvar events = [];\r\n\r\n\treturn {\r\n\t\tdelegate:function(event, className, handler, root) {\r\n\t\t\tevents.push([event, className, handler, root]);\r\n\r\n\t\t\tvar helper = gantt.$services.getService(\"mouseEvents\");\r\n\t\t\thelper.delegate(event, className, handler, root);\r\n\t\t},\r\n\t\tdestructor: function(){\r\n\t\t\tvar mouseEvents = gantt.$services.getService(\"mouseEvents\");\r\n\t\t\tfor(var i = 0; i < events.length; i++){\r\n\t\t\t\tvar h = events[i];\r\n\t\t\t\tmouseEvents.detach(h[0], h[1], h[2], h[3]);\r\n\t\t\t}\r\n\t\t\tevents = [];\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default create;","import * as domHelpers from \"../utils/dom_helpers\";\r\nimport * as utils from \"../../../utils/utils\";\r\nimport eventable from \"../../../utils/eventable\";\r\nimport gridResize from \"./grid_resize\";\r\nimport topPositionMixin from \"../row_position_mixin\";\r\nimport rowResize from \"./task_grid_row_resize\";\r\n\r\nimport ColumnDnd from \"../plugins/column_grid_dnd\";\r\n\r\nimport mouseEventContainer from \"../mouse_event_container\";\r\n\r\nvar Grid = function (parent, config, factory, gantt) {\r\n\tthis.$config = utils.mixin({}, config || {});\r\n\tthis.$gantt = gantt;\r\n\tthis.$parent = parent;\r\n\teventable(this);\r\n\tthis.$state = {};\r\n\tutils.mixin(this, topPositionMixin(this));\r\n};\r\n\r\n\r\nGrid.prototype = {\r\n\tinit: function(container) {\r\n\t\tvar gantt = this.$gantt;\r\n\t\tvar gridAriaAttr = gantt._waiAria.gridAttrString();\r\n\t\tvar gridDataAriaAttr = gantt._waiAria.gridDataAttrString();\r\n\t\tvar _ganttConfig = this.$getConfig();\r\n\t\tvar reorderColumns = _ganttConfig.reorder_grid_columns || false;\r\n\t\tif (this.$config.reorder_grid_columns !== undefined) {\r\n\t\t\treorderColumns = this.$config.reorder_grid_columns;\r\n\t\t}\r\n\r\n\r\n\t\tcontainer.innerHTML = \"
\";\r\n\t\tthis.$grid = container.childNodes[0];\r\n\r\n\t\tthis.$grid.innerHTML = \"
\";\r\n\r\n\t\tthis.$grid_scale = this.$grid.childNodes[0];\r\n\t\tthis.$grid_data = this.$grid.childNodes[1];\r\n\r\n\t\tvar attr = _ganttConfig[this.$config.bind + \"_attribute\"];\r\n\t\tif (!attr && this.$config.bind) {\r\n\t\t\tattr = \"data-\" + this.$config.bind + \"-id\";\r\n\t\t}\r\n\t\tthis.$config.item_attribute = attr || null;\r\n\r\n\t\tif (!this.$config.layers) {\r\n\t\t\tvar layers = this._createLayerConfig();\r\n\t\t\tthis.$config.layers = layers;\r\n\t\t}\r\n\r\n\t\tvar resizer = gridResize(gantt, this);\r\n\t\tresizer.init();\r\n\t\tthis._renderHeaderResizers = resizer.doOnRender;\r\n\t\tthis._mouseDelegates = mouseEventContainer(gantt);\r\n\r\n\t\tvar resizerrow = rowResize(gantt, this);\r\n\t\tresizerrow.init();\r\n\r\n\t\tthis._addLayers(this.$gantt);\r\n\t\tthis._initEvents();\r\n\r\n\t\tif (reorderColumns) {\r\n\t\t\tthis._columnDND = new ColumnDnd(gantt, this);\r\n\t\t\tthis._columnDND.init();\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onReady\", []);\r\n\t\t//this.refresh();\r\n\t},\r\n\r\n\t_validateColumnWidth: function (column, property) {\r\n\t\t// user can set {name:\"text\", width:\"200\",...} for some reason,\r\n\t\t// check and convert it to number when possible\r\n\t\tvar value = column[property];\r\n\t\tif (value && value != \"*\") {\r\n\t\t\tvar gantt = this.$gantt;\r\n\t\t\tvar numericWidth = value * 1;\r\n\t\t\tif (isNaN(numericWidth)) {\r\n\t\t\t\tgantt.assert(false, \"Wrong \" + property + \" value of column \" + column.name);\r\n\t\t\t} else {\r\n\t\t\t\tcolumn[property] = numericWidth;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tsetSize: function (width, height) {\r\n\t\tthis.$config.width = this.$state.width = width;\r\n\t\tthis.$config.height = this.$state.height = height;\r\n\r\n\t\t// TODO: maybe inherit and override in a subclass instead of extending here\r\n\r\n\t\tvar columns = this.getGridColumns(),\r\n\t\t\tinnerWidth = 0;\r\n\r\n\t\tvar config = this.$getConfig();\r\n\t\tvar elasticColumns = config.grid_elastic_columns;\r\n\r\n\t\tfor (var i = 0, l = columns.length; i < l; i++) {\r\n\t\t\tthis._validateColumnWidth(columns[i], \"min_width\");\r\n\t\t\tthis._validateColumnWidth(columns[i], \"max_width\");\r\n\t\t\tthis._validateColumnWidth(columns[i], \"width\");\r\n\r\n\t\t\tinnerWidth += columns[i].width * 1;\r\n\t\t}\r\n\r\n\t\tvar outerWidth;\r\n\t\tif (isNaN(innerWidth) || !this.$config.scrollable) {\r\n\t\t\touterWidth = this._setColumnsWidth(width + 1);\r\n\t\t\tinnerWidth = outerWidth;\r\n\t\t}\r\n\r\n\t\tif(this.$config.scrollable && elasticColumns && !isNaN(innerWidth)){\r\n\t\t\t// GS-1352: Allow resizing the grid columns, then the grid width is increased\r\n\t\t\t// or keep the grid width, but don't allow column resize to affect the grid width\r\n\t\t\tlet columnProperty = \"width\";\r\n\t\t\tif (elasticColumns == \"min_width\"){\r\n\t\t\t\tcolumnProperty = \"min_width\";\r\n\t\t\t}\r\n\t\t\tlet newColumnWidth = 0;\r\n\t\t\tcolumns.forEach(function(col){\r\n\t\t\t\tnewColumnWidth += col[columnProperty] || config.min_grid_column_width;\r\n\t\t\t});\r\n\t\t\t//newColumnWidth--; // the total column width shouldn't match the outerWidth // GS-2190 reducing width seems to be not needed\r\n\t\t\tvar columnsWidth = Math.max(newColumnWidth, width);\r\n\t\t\tinnerWidth = this._setColumnsWidth(columnsWidth);\r\n\t\t\touterWidth = width;\r\n\t\t}\r\n\r\n\t\tif (this.$config.scrollable) {\r\n\t\t\tthis.$grid_scale.style.width = innerWidth + \"px\";\r\n\t\t\tthis.$grid_data.style.width = innerWidth + \"px\";\r\n\t\t} else {\r\n\t\t\tthis.$grid_scale.style.width = \"inherit\";\r\n\t\t\tthis.$grid_data.style.width = \"inherit\";\r\n\t\t}\r\n\t\tthis.$config.width -= 1;\r\n\r\n\t\tvar config = this.$getConfig();\r\n\t\tif (outerWidth !== width) {\r\n\t\t\tif(outerWidth !== undefined){\r\n\t\t\t\tconfig.grid_width = outerWidth;\r\n\t\t\t\tthis.$config.width = outerWidth - 1;\r\n\t\t\t}else{\r\n\t\t\t\tif(!isNaN(innerWidth)){\r\n\t\t\t\t\tthis._setColumnsWidth(innerWidth);\r\n\t\t\t\t\tconfig.grid_width = innerWidth;\r\n\t\t\t\t\tthis.$config.width = innerWidth - 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar dataHeight = Math.max(this.$state.height - config.scale_height, 0);\r\n\t\tthis.$grid_data.style.height = dataHeight + \"px\";\r\n\t\tthis.refresh();\r\n\t},\r\n\tgetSize: function () {\r\n\r\n\t\tvar config = this.$getConfig();\r\n\r\n\t\tvar store = this.$config.rowStore;\r\n\r\n\t\tvar contentHeight = store ? this.getTotalHeight() : 0,\r\n\t\t\tcontentWidth = this._getGridWidth();\r\n\r\n\t\tvar size = {\r\n\t\t\tx: this.$state.width,\r\n\t\t\ty: this.$state.height,\r\n\t\t\tcontentX: this.isVisible() ? contentWidth : 0,\r\n\t\t\tcontentY: this.isVisible() ? (config.scale_height + contentHeight) : 0,\r\n\t\t\tscrollHeight: this.isVisible() ? contentHeight : 0,\r\n\t\t\tscrollWidth: this.isVisible() ? contentWidth : 0\r\n\t\t};\r\n\r\n\t\treturn size;\r\n\t},\r\n\r\n\t_bindStore: function () {\r\n\t\tif (this.$config.bind){\r\n\t\t\tvar rowStore = this.$gantt.getDatastore(this.$config.bind);\r\n\t\t\tthis.$config.rowStore = rowStore;\r\n\t\t\tif(rowStore && !rowStore._gridCacheAttached){\r\n\t\t\t\tvar self = this;\r\n\t\t\t\trowStore._gridCacheAttached = rowStore.attachEvent(\"onBeforeFilter\", function(){\r\n\t\t\t\t\tself._resetTopPositionHeight();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t_unbindStore: function(){\r\n\t\tif (this.$config.bind){\r\n\t\t\tvar rowStore = this.$gantt.getDatastore(this.$config.bind);\r\n\t\t\tif(rowStore && rowStore._gridCacheAttached){\r\n\t\t\t\trowStore.detachEvent(rowStore._gridCacheAttached);\r\n\t\t\t\trowStore._gridCacheAttached = false;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\trefresh: function () {\r\n\t\tthis._bindStore();\r\n\r\n\t\tthis._resetTopPositionHeight();\r\n\t\tthis._resetHeight();\r\n\t\tthis._initSmartRenderingPlaceholder();\r\n\r\n\t\tthis._calculateGridWidth();\r\n\t\tthis._renderGridHeader();\r\n\t},\r\n\r\n\tgetViewPort: function(){\r\n\t\tvar scrollLeft = this.$config.scrollLeft || 0;\r\n\t\tvar scrollTop = this.$config.scrollTop || 0;\r\n\t\tvar height = this.$config.height || 0;\r\n\t\tvar width = this.$config.width || 0;\r\n\t\treturn {\r\n\t\t\ty: scrollTop,\r\n\t\t\ty_end: scrollTop + height,\r\n\t\t\tx: scrollLeft,\r\n\t\t\tx_end: scrollLeft + width,\r\n\t\t\theight: height,\r\n\t\t\twidth: width\r\n\t\t};\r\n\t},\r\n\r\n\tscrollTo: function (left, top) {\r\n\t\tif (!this.isVisible())\r\n\t\t\treturn;\r\n\r\n\t\tvar scrolled = false;\r\n\r\n\t\tthis.$config.scrollTop = this.$config.scrollTop || 0;\r\n\t\tthis.$config.scrollLeft = this.$config.scrollLeft || 0;\r\n\r\n\t\tif (left * 1 == left) {\r\n\t\t\tthis.$config.scrollLeft = this.$state.scrollLeft = this.$grid.scrollLeft = left;\r\n\t\t\tscrolled = true;\r\n\t\t}\r\n\r\n\t\t// var config = this.$getConfig();\r\n\t\tif (top * 1 == top) {\r\n\t\t\tthis.$config.scrollTop = this.$state.scrollTop = this.$grid_data.scrollTop = top;\r\n\t\t\tscrolled = true;\r\n\t\t}\r\n\r\n\t\tif(scrolled){\r\n\t\t\tthis.callEvent(\"onScroll\", [this.$config.scrollLeft, this.$config.scrollTop]);\r\n\t\t}\r\n\t},\r\n\r\n\tgetColumnIndex: function (name, excludeHidden) {\r\n\t\tvar columns = this.$getConfig().columns;\r\n\t\tvar hiddenIndexShift = 0;\r\n\r\n\t\tfor (var i = 0; i < columns.length; i++) {\r\n\t\t\t// GS-1257. If the cell is hidden, the target column index should be correct\r\n\t\t\tif (excludeHidden && columns[i].hide){\r\n\t\t\t\thiddenIndexShift++;\r\n\t\t\t}\r\n\t\t\tif (columns[i].name == name) {\r\n\t\t\t\treturn i - hiddenIndexShift;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t},\r\n\r\n\tgetColumn: function (name) {\r\n\t\tvar index = this.getColumnIndex(name);\r\n\t\tif (index === null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn this.$getConfig().columns[index];\r\n\t},\r\n\r\n\tgetGridColumns: function () {\r\n\t\tvar config = this.$getConfig();\r\n\t\treturn config.columns.slice();\r\n\t},\r\n\tisVisible: function () {\r\n\t\tif (this.$parent && this.$parent.$config) {\r\n\t\t\treturn !this.$parent.$config.hidden;\r\n\t\t} else {\r\n\t\t\treturn this.$grid.offsetWidth;\r\n\t\t}\r\n\t},\r\n\r\n\t// getItemHeight: function () {\r\n\t// \tvar config = this.$getConfig();\r\n\t// \treturn config.row_height;\r\n\t// },\r\n\r\n\t_createLayerConfig: function () {\r\n\t\tvar gantt = this.$gantt;\r\n\t\tvar self = this;\r\n\t\tvar layers = [\r\n\t\t\t{\r\n\t\t\t\trenderer: gantt.$ui.layers.gridLine(),\r\n\t\t\t\tcontainer: this.$grid_data,\r\n\t\t\t\tfilter: [function () {\r\n\t\t\t\t\treturn self.isVisible();\r\n\t\t\t\t}]\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\trenderer: gantt.$ui.layers.gridTaskRowResizer(),\r\n\t\t\t\tcontainer: this.$grid_data,\r\n\t\t\t\tappend: true,\r\n\t\t\t\tfilter: [function () {\r\n\t\t\t\t\treturn gantt.config.resize_rows;\r\n\t\t\t\t}]\r\n\t\t\t}\r\n\t\t];\r\n\t\treturn layers;\r\n\t},\r\n\r\n\t_addLayers: function (gantt) {\r\n\t\tif (!this.$config.bind)\r\n\t\t\treturn;\r\n\r\n\t\tthis._taskLayers = [];\r\n\r\n\t\tvar self = this;\r\n\r\n\t\tvar layers = this.$gantt.$services.getService(\"layers\");\r\n\t\tvar taskRenderer = layers.getDataRender(this.$config.bind);\r\n\r\n\t\tif (!taskRenderer) {\r\n\t\t\ttaskRenderer = layers.createDataRender({\r\n\t\t\t\tname: this.$config.bind,\r\n\t\t\t\tdefaultContainer: function () { return self.$grid_data; }\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvar taskLayers = this.$config.layers;\r\n\t\tfor (var i = 0; taskLayers && i < taskLayers.length; i++) {\r\n\t\t\tvar layer = taskLayers[i];\r\n\t\t\tlayer.view = this;\r\n\r\n\t\t\tvar bar_layer = taskRenderer.addLayer(layer);\r\n\t\t\tthis._taskLayers.push(bar_layer);\r\n\t\t}\r\n\r\n\t\tthis._bindStore();\r\n\r\n\t\tthis._initSmartRenderingPlaceholder();\r\n\t},\r\n\r\n\t_refreshPlaceholderOnStoreUpdate: function (id) {\r\n\t\tvar config = this.$getConfig(),\r\n\t\t\tstore = this.$config.rowStore;\r\n\r\n\t\tif (!store || id !== null || !this.isVisible() || !config.smart_rendering) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar contentHeight;\r\n\t\tif (this.$config.scrollY) {\r\n\t\t\tvar scroll = this.$gantt.$ui.getView(this.$config.scrollY);\r\n\t\t\tif (scroll)\r\n\t\t\t\tcontentHeight = scroll.getScrollState().scrollSize;\r\n\t\t}\r\n\r\n\t\tif (!contentHeight) {\r\n\t\t\tcontentHeight = store ? this.getTotalHeight() : 0;\r\n\t\t}\r\n\r\n\t\tif (contentHeight) {\r\n\t\t\tif (this.$rowsPlaceholder && this.$rowsPlaceholder.parentNode) {\r\n\t\t\t\tthis.$rowsPlaceholder.parentNode.removeChild(this.$rowsPlaceholder);\r\n\t\t\t}\r\n\r\n\t\t\tvar placeholder = this.$rowsPlaceholder = document.createElement(\"div\");\r\n\t\t\tplaceholder.style.visibility = \"hidden\";\r\n\t\t\tplaceholder.style.height = contentHeight + \"px\";\r\n\t\t\tplaceholder.style.width = \"1px\";\r\n\t\t\tthis.$grid_data.appendChild(placeholder);\r\n\t\t}\r\n\t},\r\n\r\n\t_initSmartRenderingPlaceholder: function () {\r\n\t\tvar store = this.$config.rowStore;\r\n\t\tif (!store) {\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tthis._initSmartRenderingPlaceholder = function () { };\r\n\t\t}\r\n\t\tthis._staticBgHandler = store.attachEvent(\"onStoreUpdated\", utils.bind(this._refreshPlaceholderOnStoreUpdate, this));\r\n\t},\r\n\r\n\t_initEvents: function () {\r\n\t\tvar gantt = this.$gantt;\r\n\t\tthis._mouseDelegates.delegate(\"click\", \"gantt_close\", gantt.bind(function (e, id, trg) {\r\n\t\t\tvar store = this.$config.rowStore;\r\n\t\t\tif (!store) return true;\r\n\r\n\t\t\tvar target = domHelpers.locateAttribute(e, this.$config.item_attribute);\r\n\t\t\tif (target) {\r\n\t\t\t\tstore.close(target.getAttribute(this.$config.item_attribute));\r\n\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}, this), this.$grid);\r\n\r\n\t\tthis._mouseDelegates.delegate(\"click\", \"gantt_open\", gantt.bind(function (e, id, trg) {\r\n\t\t\tvar store = this.$config.rowStore;\r\n\t\t\tif (!store) return true;\r\n\r\n\t\t\tvar target = domHelpers.locateAttribute(e, this.$config.item_attribute);\r\n\t\t\tif (target) {\r\n\t\t\t\tstore.open(target.getAttribute(this.$config.item_attribute));\r\n\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}, this), this.$grid);\r\n\t},\r\n\r\n\t_clearLayers: function (gantt) {\r\n\t\tvar layers = this.$gantt.$services.getService(\"layers\");\r\n\t\tvar taskRenderer = layers.getDataRender(this.$config.bind);\r\n\r\n\t\tif (this._taskLayers) {\r\n\t\t\tfor (var i = 0; i < this._taskLayers.length; i++) {\r\n\t\t\t\ttaskRenderer.removeLayer(this._taskLayers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._taskLayers = [];\r\n\t},\r\n\r\n\t_getColumnWidth: function (column, config, width) {\r\n\t\tvar min_width = column.min_width || config.min_grid_column_width;\r\n\t\tvar new_width = Math.max(width, min_width || 10);\r\n\t\tif (column.max_width)\r\n\t\t\tnew_width = Math.min(new_width, column.max_width);\r\n\t\treturn new_width;\r\n\t},\r\n\t// set min width only if width < than config.min_grid_column_width\r\n\t_checkGridColumnMinWidthLimits: function (columns, config) {\r\n\t\tfor (var i = 0, l = columns.length; i < l; i++) {\r\n\t\t\tvar width = columns[i].width * 1;\r\n\t\t\tif (!columns[i].min_width && width < config.min_grid_column_width){\r\n\t\t\t\tcolumns[i].min_width = width;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t// return min and max possible grid width according to restricts\r\n\t_getGridWidthLimits: function () {\r\n\t\tvar config = this.$getConfig(),\r\n\t\t\tcolumns = this.getGridColumns(),\r\n\t\t\tmin_limit = 0,\r\n\t\t\tmax_limit = 0;\r\n\r\n\t\tfor (var i = 0; i < columns.length; i++) {\r\n\t\t\tmin_limit += columns[i].min_width ? columns[i].min_width : config.min_grid_column_width;\r\n\t\t\tif (max_limit !== undefined) {\r\n\t\t\t\tmax_limit = columns[i].max_width ? (max_limit + columns[i].max_width) : undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis._checkGridColumnMinWidthLimits(columns, config); // FIX ME: should it be before calculating limits?\r\n\t\treturn [min_limit, max_limit];\r\n\t},\r\n\t// resize columns to get total newWidth, starting from columns[start_index]\r\n\t_setColumnsWidth: function (newWidth, start_index) {\r\n\t\tvar config = this.$getConfig();\r\n\t\tvar columns = this.getGridColumns(),\r\n\t\t\tcolumns_width = 0,\r\n\t\t\tfinal_width = newWidth;\r\n\r\n\t\tstart_index = !window.isNaN(start_index) ? start_index : -1;\r\n\r\n\t\tfor (var i = 0, l = columns.length; i < l; i++) {\r\n\t\t\tcolumns_width += columns[i].width * 1;\r\n\t\t}\r\n\r\n\t\tif (window.isNaN(columns_width)) {\r\n\t\t\tthis._calculateGridWidth();\r\n\t\t\tcolumns_width = 0;\r\n\t\t\tfor (var i = 0, l = columns.length; i < l; i++) {\r\n\t\t\t\tcolumns_width += columns[i].width * 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar extra_width = final_width - columns_width;\r\n\r\n\t\tvar start_width = 0;\r\n\t\tfor (var i = 0; i < start_index + 1; i++) {\r\n\t\t\tstart_width += columns[i].width;\r\n\t\t}\r\n\r\n\t\tcolumns_width -= start_width;\r\n\r\n\t\tfor (var i = start_index + 1; i < columns.length; i++) {\r\n\r\n\t\t\tvar col = columns[i];\r\n\t\t\tvar share = Math.round(extra_width * (col.width / columns_width));\r\n\r\n\t\t\t// columns have 2 additional restrict fields - min_width & max_width that are set by user\r\n\t\t\tif (extra_width < 0) {\r\n\t\t\t\tif (col.min_width && col.width + share < col.min_width)\r\n\t\t\t\t\tshare = col.min_width - col.width;\r\n\t\t\t\telse if (!col.min_width && config.min_grid_column_width && col.width + share < config.min_grid_column_width)\r\n\t\t\t\t\tshare = config.min_grid_column_width - col.width;\r\n\t\t\t} else if (col.max_width && col.width + share > col.max_width)\r\n\t\t\t\tshare = col.max_width - col.width;\r\n\r\n\t\t\tcolumns_width -= col.width;\r\n\t\t\tcol.width += share;\r\n\t\t\textra_width -= share;\r\n\r\n\t\t}\r\n\r\n\t\tvar iterator = extra_width > 0 ? 1 : -1;\r\n\t\twhile ((extra_width > 0 && iterator === 1) || (extra_width < 0 && iterator === -1)) {\r\n\t\t\tvar curExtra = extra_width;\r\n\t\t\tfor (i = start_index + 1; i < columns.length; i++) {\r\n\t\t\t\tvar new_width = columns[i].width + iterator;\r\n\r\n\t\t\t\tif (new_width == this._getColumnWidth(columns[i], config, new_width)) {\r\n\t\t\t\t\textra_width -= iterator;\r\n\t\t\t\t\tcolumns[i].width = new_width;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!extra_width)\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif (curExtra == extra_width)\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t// if impossible to resize the right-side columns, resize the start column\r\n\t\tif (extra_width && start_index > -1) {\r\n\t\t\tvar new_width = columns[start_index].width + extra_width;\r\n\t\t\tif (new_width == this._getColumnWidth(columns[start_index], config, new_width))\r\n\t\t\t\tcolumns[start_index].width = new_width;\r\n\t\t}\r\n\r\n\t\t//if (this.callEvent(\"onGridResizeEnd\", [config.grid_width, final_width]) === false)\r\n\t\t//\treturn;\r\n\r\n\t\treturn this._getColsTotalWidth();\r\n\t},\r\n\r\n\t_getColsTotalWidth: function () {\r\n\t\tvar columns = this.getGridColumns();\r\n\t\tvar cols_width = 0;\r\n\r\n\t\tfor (var i = 0; i < columns.length; i++) {\r\n\t\t\tvar v = parseFloat(columns[i].width);\r\n\t\t\tif (window.isNaN(v)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tcols_width += v;\r\n\t\t}\r\n\t\treturn cols_width;\r\n\t},\r\n\t_calculateGridWidth: function () {\r\n\t\tvar config = this.$getConfig();\r\n\t\tvar columns = this.getGridColumns();\r\n\t\tvar cols_width = 0;\r\n\t\tvar unknown = [];\r\n\t\tvar width = [];\r\n\r\n\t\tfor (var i = 0; i < columns.length; i++) {\r\n\t\t\tvar v = parseFloat(columns[i].width);\r\n\t\t\tif (window.isNaN(v)) {\r\n\t\t\t\tv = config.min_grid_column_width || 10;\r\n\t\t\t\tunknown.push(i);\r\n\t\t\t}\r\n\t\t\twidth[i] = v;\r\n\t\t\tcols_width += v;\r\n\t\t}\r\n\t\tvar gridWidth = this._getGridWidth() + 1;\r\n\t\tif (config.autofit || unknown.length) {\r\n\t\t\tvar diff = gridWidth - cols_width;\r\n\t\t\t// TODO: logic may be improved for proportional changing of width\r\n\r\n\t\t\t// autofit adjusts columns widths to the outer grid width\r\n\t\t\t// it doesn't makes sense if grid has inner scroll with elastic columns\r\n\t\t\tif (config.autofit && !config.grid_elastic_columns) {\r\n\t\t\t\t// delta must be added for all columns\r\n\t\t\t\tfor (var i = 0; i < width.length; i++) {\r\n\t\t\t\t\tvar delta = Math.round(diff / (width.length - i));\r\n\t\t\t\t\twidth[i] += delta;\r\n\t\t\t\t\tvar new_width = this._getColumnWidth(columns[i], config, width[i]);\r\n\r\n\t\t\t\t\tif (new_width != width[i]) {\r\n\t\t\t\t\t\tdelta = new_width - width[i];\r\n\t\t\t\t\t\twidth[i] = new_width;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdiff -= delta;\r\n\t\t\t\t}\r\n\t\t\t} else if (unknown.length) {\r\n\t\t\t\t// there are several columns with undefined width\r\n\t\t\t\tfor (var i = 0; i < unknown.length; i++) {\r\n\t\t\t\t\tvar delta = Math.round(diff / (unknown.length - i)); // no float values, just integer\r\n\t\t\t\t\tvar index = unknown[i];\r\n\t\t\t\t\twidth[index] += delta;\r\n\t\t\t\t\tvar new_width = this._getColumnWidth(columns[index], config, width[index]);\r\n\t\t\t\t\tif (new_width != width[index]) {\r\n\t\t\t\t\t\tdelta = new_width - width[index];\r\n\t\t\t\t\t\twidth[index] = new_width;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdiff -= delta;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor (var i = 0; i < width.length; i++) {\r\n\t\t\t\tcolumns[i].width = width[i];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar changed = (gridWidth != cols_width);\r\n\t\t\tthis.$config.width = cols_width - 1;\r\n\t\t\tconfig.grid_width = cols_width;\r\n\t\t\tif (changed) {\r\n\t\t\t\tthis.$parent._setContentSize(this.$config.width, null);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t},\r\n\r\n\t_renderGridHeader: function () {\r\n\t\tvar gantt = this.$gantt;\r\n\t\tvar config = this.$getConfig();\r\n\t\tvar locale = this.$gantt.locale;\r\n\t\tvar templates = this.$gantt.templates;\r\n\r\n\t\tvar columns = this.getGridColumns();\r\n\t\tif (config.rtl) {\r\n\t\t\tcolumns = columns.reverse();\r\n\t\t}\r\n\t\tvar cells = [];\r\n\t\tvar width = 0,\r\n\t\t\tlabels = locale.labels;\r\n\r\n\t\tvar lineHeigth = config.scale_height - 1;\r\n\r\n\t\tfor (var i = 0; i < columns.length; i++) {\r\n\t\t\tvar last = i == columns.length - 1;\r\n\t\t\tvar col = columns[i];\r\n\r\n\t\t\t// ensure columns have non-empty names\r\n\t\t\tif (!col.name) {\r\n\t\t\t\tcol.name = gantt.uid() + \"\";\r\n\t\t\t}\r\n\r\n\t\t\tvar colWidth = col.width * 1;\r\n\r\n\t\t\tvar gridWidth = this._getGridWidth();\r\n\t\t\tif (last && gridWidth > width + colWidth)\r\n\t\t\t\tcol.width = colWidth = gridWidth - width;\r\n\t\t\twidth += colWidth;\r\n\t\t\tvar sort = (gantt._sort && col.name == gantt._sort.name) ? (`
`) : \"\";\r\n\t\t\tvar cssClass = [\"gantt_grid_head_cell\",\r\n\t\t\t\t(\"gantt_grid_head_\" + col.name),\r\n\t\t\t\t(last ? \"gantt_last_cell\" : \"\"),\r\n\t\t\t\ttemplates.grid_header_class(col.name, col)].join(\" \");\r\n\r\n\t\t\tvar style = \"width:\" + (colWidth - (last ? 1 : 0)) + \"px;\";\r\n\t\t\tvar label = (col.label || labels[\"column_\" + col.name] || labels[col.name]);\r\n\t\t\tlabel = label || \"\";\r\n\r\n\t\t\tvar ariaAttrs = gantt._waiAria.gridScaleCellAttrString(col, label);\r\n\r\n\t\t\tvar cell = \"
\" + label + sort + \"
\";\r\n\t\t\tcells.push(cell);\r\n\t\t}\r\n\t\tthis.$grid_scale.style.height = (config.scale_height) + \"px\";\r\n\t\tthis.$grid_scale.style.lineHeight = lineHeigth + \"px\";\r\n\t\t//this.$grid_scale.style.width = \"inherit\";\r\n\t\tthis.$grid_scale.innerHTML = cells.join(\"\");\r\n\r\n\t\tif (this._renderHeaderResizers) {\r\n\t\t\tthis._renderHeaderResizers();\r\n\t\t}\r\n\t},\r\n\r\n\t_getGridWidth: function () {\r\n\t\t// TODO: refactor/remove/comment some of _getGridWidth/this.$config.width/this.$state.width, it's not clear what they do\r\n\t\treturn this.$config.width;\r\n\t},\r\n\r\n\tdestructor: function () {\r\n\t\tthis._clearLayers(this.$gantt);\r\n\t\tif (this._mouseDelegates) {\r\n\t\t\tthis._mouseDelegates.destructor();\r\n\t\t\tthis._mouseDelegates = null;\r\n\t\t}\r\n\t\tthis._unbindStore();\r\n\t\tthis.$grid = null;\r\n\t\tthis.$grid_scale = null;\r\n\t\tthis.$grid_data = null;\r\n\t\tthis.$gantt = null;\r\n\t\tif (this.$config.rowStore) {\r\n\t\t\tthis.$config.rowStore.detachEvent(this._staticBgHandler);\r\n\t\t\tthis.$config.rowStore = null;\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\t}\r\n};\r\n\r\nexport default Grid;\r\n","function createResizer(gantt, grid){\r\n\treturn {\r\n\t\tinit: function(){},\r\n\t\tdoOnRender: function(){}\r\n\t};\r\n}\r\n\r\nexport default createResizer;","import * as domHelpers from \"../utils/dom_helpers\";\r\n\r\nfunction createRowResizer(gantt, grid){\r\n\r\n\tvar _task_grid_row_resize = {\r\n\t\trow_before_start: gantt.bind(function (dnd, obj, e) {\r\n\t\t\tvar config = grid.$getConfig();\r\n\t\t\tvar store = grid.$config.rowStore;\r\n\r\n\t\t\tvar el = domHelpers.locateAttribute(e, config.task_grid_row_resizer_attribute);\r\n\t\t\tif (!el) return false;\r\n\r\n\t\t\tvar row_id = this.locate(e, config.task_grid_row_resizer_attribute),\r\n\t\t\t\trow = store.getItem(row_id);\r\n\r\n\t\t\tif (grid.callEvent(\"onBeforeRowResize\", [row]) === false)\r\n\t\t\t\treturn false;\r\n\t\t}, gantt),\r\n\r\n\t\trow_after_start: gantt.bind(function (dnd, obj, e) {\r\n\t\t\tvar config = grid.$getConfig();\r\n\r\n\t\t\tvar row_id = this.locate(e, config.task_grid_row_resizer_attribute);\r\n\t\t\tdnd.config.marker.innerHTML = \"\";\r\n\r\n\t\t\tdnd.config.marker.className += \" gantt_row_grid_resize_area\";\r\n\t\t\tdnd.config.marker.style.width = grid.$grid.offsetWidth + \"px\";\r\n\t\t\tdnd.config.drag_id = row_id;\r\n\r\n\t\t}, gantt),\r\n\r\n\t\trow_drag_move: gantt.bind(function (dnd, obj, e) {\r\n\t\t\tvar store = grid.$config.rowStore;\r\n\t\t\tvar config = grid.$getConfig();\r\n\t\t\tvar dd = dnd.config;\r\n\t\t\tvar id = dd.drag_id,\r\n\t\t\t\titemHeight = grid.getItemHeight(id),\r\n\t\t\t\titemTop = grid.getItemTop(id) - obj.scrollTop;\r\n\t\t\tvar pos = domHelpers.getNodePosition(grid.$grid_data),\r\n\t\t\t\tpointerPosition = parseInt(dd.marker.style.top, 10),\r\n\t\t\t\tmarkerStartPosition = itemTop + pos.y,\r\n\t\t\t\tmarker_height = 0,\r\n\t\t\t\tminPointerPosition = config.min_task_grid_row_height;\r\n\r\n\t\t\tmarker_height = pointerPosition - markerStartPosition;\r\n\t\t\tif(marker_height < minPointerPosition){\r\n\t\t\t\tmarker_height = minPointerPosition;\r\n\t\t\t}\r\n\r\n\t\t\tdd.marker.style.left = pos.x + \"px\";\r\n\t\t\tdd.marker.style.top = markerStartPosition - 1 + \"px\";\r\n\t\t\tdd.marker.style.height = Math.abs(marker_height) + 1 + \"px\";\r\n\r\n\t\t\tdd.marker_height = marker_height;\r\n\t\t\t\r\n\t\t\tgrid.callEvent(\"onRowResize\", [id, store.getItem(id), marker_height + itemHeight]);\r\n\t\t\treturn true;\r\n\t\t}, gantt),\r\n\r\n\t\trow_drag_end: gantt.bind(function (dnd, obj, e) {\r\n\t\t\tvar store = grid.$config.rowStore;\r\n\t\t\tvar dd = dnd.config;\r\n\t\t\tvar id = dd.drag_id,\r\n\t\t\t\titem = store.getItem(id),\r\n\t\t\t\toldItemHeight = grid.getItemHeight(id);\r\n\r\n\t\t\tvar finalHeight = dd.marker_height;\r\n\r\n\t\t\tif (grid.callEvent(\"onBeforeRowResizeEnd\", [id, item, finalHeight]) === false)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tif (item.row_height == finalHeight)\r\n\t\t\t\treturn;\r\n\r\n\t\t\titem.row_height = finalHeight;\r\n\t\t\tgantt.updateTask(id);\r\n\r\n\t\t\tgrid.callEvent(\"onAfterRowResize\", [id, item, oldItemHeight, finalHeight]);\r\n\r\n\t\t\tthis.render();\r\n\t\t}, gantt)\r\n\t};\r\n\r\n\t// calls the initialization of the D'n'D events for resize elements\r\n\tvar _init_resize = function () {\r\n\r\n\t\tvar DnD = gantt.$services.getService(\"dnd\");\r\n\r\n\t\tvar config = grid.$getConfig();\r\n\r\n\t\tvar dnd = new DnD(grid.$grid_data, {updates_per_second: 60});\r\n\t\tif (gantt.defined(config.dnd_sensitivity))\r\n\t\t\tdnd.config.sensitivity = config.dnd_sensitivity;\r\n\r\n\t\tdnd.attachEvent(\"onBeforeDragStart\", function (obj, e) {\r\n\t\t\treturn _task_grid_row_resize.row_before_start(dnd, obj, e);\r\n\t\t});\r\n\t\tdnd.attachEvent(\"onAfterDragStart\", function (obj, e) {\r\n\t\t\treturn _task_grid_row_resize.row_after_start(dnd, obj, e);\r\n\t\t});\r\n\t\tdnd.attachEvent(\"onDragMove\", function (obj, e) {\r\n\t\t\treturn _task_grid_row_resize.row_drag_move(dnd, obj, e);\r\n\t\t});\r\n\t\tdnd.attachEvent(\"onDragEnd\", function (obj, e) {\r\n\t\t\treturn _task_grid_row_resize.row_drag_end(dnd, obj, e);\r\n\t\t});\r\n\r\n\t};\r\n\r\n\treturn {\r\n\t\tinit: _init_resize\r\n\t};\r\n}\r\n\r\nexport default createRowResizer;","export default {\r\n\tinit: function (controller, grid) {\r\n\t\tvar gantt = grid.$gantt;\r\n\r\n\t\tgantt.attachEvent(\"onTaskClick\", function (id, e) {\r\n\t\t\tif (gantt._is_icon_open_click(e))\r\n\t\t\t\treturn true;\r\n\t\t\tvar state = controller.getState();\r\n\t\t\tvar cell = controller.locateCell(e.target);\r\n\r\n\t\t\tif (cell && controller.getEditorConfig(cell.columnName)) {\r\n\t\t\t\tif (controller.isVisible() && state.id == cell.id && state.columnName == cell.columnName) {\r\n\t\t\t\t\t// do nothing if editor is already active in this cell\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontroller.startEdit(cell.id, cell.columnName);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tgantt.attachEvent(\"onEmptyClick\", function () {\r\n\t\t\tif (controller.isVisible() && controller.isChanged()) {\r\n\t\t\t\tcontroller.save();\r\n\t\t\t} else {\r\n\t\t\t\tcontroller.hide();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tgantt.attachEvent(\"onTaskDblClick\", function (id, e) {\r\n\t\t\tvar state = controller.getState();\r\n\t\t\tvar cell = controller.locateCell(e.target);\r\n\t\t\tif (cell && controller.isVisible() && cell.columnName == state.columnName) {\r\n\t\t\t\t//GS-933 probably, we don't need to hide the inline editor because the lightbox cannot be opened if you double-click on an inline editor\r\n\t\t\t\t//remove this code later if people don't complain\r\n\t\t\t\t//controller.hide();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\t},\r\n\r\n\tonShow: function (controller, placeholder, grid) {\r\n\t\tvar gantt = grid.$gantt;\r\n\t\t\r\n\r\n\t\tif(gantt.ext && gantt.ext.keyboardNavigation){\r\n\t\t\tvar keyNav = gantt.ext.keyboardNavigation;\r\n\t\t\tkeyNav.attachEvent(\"onKeyDown\", function(command, e){\r\n\t\t\t\tvar keyboard = gantt.constants.KEY_CODES;\r\n\t\t\t\tvar keyCode = e.keyCode;\r\n\t\t\t\tvar preventKeyNav = false;\r\n\r\n\t\t\t\tswitch (keyCode){\r\n\t\t\t\t\tcase keyboard.SPACE:\r\n\t\t\t\t\t\tif(controller.isVisible()){\r\n\t\t\t\t\t\t\tpreventKeyNav = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (preventKeyNav){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t} else{\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\t\r\n\t\tplaceholder.onkeydown = function (e) {\r\n\t\t\te = e || window.event;\r\n\r\n\t\t\tvar keyboard = gantt.constants.KEY_CODES;\r\n\t\t\tif (e.defaultPrevented || (e.shiftKey && e.keyCode != keyboard.TAB)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tvar shouldPrevent = true;\r\n\t\t\tswitch (e.keyCode) {\r\n\t\t\t\tcase gantt.keys.edit_save:\r\n\t\t\t\t\tcontroller.save();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase gantt.keys.edit_cancel:\r\n\t\t\t\t\tcontroller.hide();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase keyboard.UP:\r\n\t\t\t\tcase keyboard.DOWN:\r\n\t\t\t\t\tif (controller.isVisible()) {\r\n\t\t\t\t\t\tcontroller.hide();\r\n\t\t\t\t\t\tshouldPrevent = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase keyboard.TAB:\r\n\t\t\t\t\tif (e.shiftKey) {\r\n\t\t\t\t\t\tcontroller.editPrevCell(true);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcontroller.editNextCell(true);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tshouldPrevent = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (shouldPrevent) {\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t};\r\n\t},\r\n\tonHide: function () {\r\n\r\n\t},\r\n\r\n\tdestroy: function () {\r\n\r\n\t}\r\n};\r\n\r\n","export default {\r\n\tinit: function(controller, grid){\r\n\t\tvar self = controller;\r\n\t\tvar gantt = grid.$gantt;\r\n\r\n\t\tvar onBlurDelay = null;\r\n\t\tvar keyNav = gantt.ext.keyboardNavigation;\r\n\t\tkeyNav.attachEvent(\"onBeforeFocus\", function (node) {\r\n\t\t\tvar activeCell = controller.locateCell(node);\r\n\t\t\tclearTimeout(onBlurDelay);\r\n\t\t\tif (activeCell) {\r\n\t\t\t\tvar columnName = activeCell.columnName;\r\n\t\t\t\tvar id = activeCell.id;\r\n\r\n\t\t\t\tvar editorState = self.getState();\r\n\t\t\t\tif(self.isVisible()){\r\n\t\t\t\t\tif(editorState.id == id && editorState.columnName === columnName) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tkeyNav.attachEvent(\"onFocus\", function (node) {\r\n\t\t\tvar activeCell = controller.locateCell(node);\r\n\t\t\tvar state = controller.getState();\r\n\t\t\tclearTimeout(onBlurDelay);\r\n\t\t\tif (activeCell && !(activeCell.id == state.id && activeCell.columnName == state.columnName)) {\r\n\t\t\t\tif(self.isVisible()){\r\n\t\t\t\t\tself.save();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tcontroller.attachEvent(\"onHide\", function(){\r\n\t\t\tclearTimeout(onBlurDelay);\r\n\t\t});\r\n\r\n\t\tkeyNav.attachEvent(\"onBlur\", function () {\r\n\t\t\tonBlurDelay = setTimeout(function(){\r\n\t\t\t\tself.save();\r\n\t\t\t});\r\n\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tgantt.attachEvent(\"onTaskDblClick\", function(id,e){\r\n\t\t\t// block lightbox on double click inside editor\r\n\t\t\tvar state = controller.getState();\r\n\t\t\tvar cell = controller.locateCell(e.target);\r\n\t\t\tif(cell && controller.isVisible() && cell.columnName == state.columnName){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tgantt.attachEvent(\"onTaskClick\", function (id, e) {\r\n\t\t\tif(gantt._is_icon_open_click(e))\r\n\t\t\t\treturn true;\r\n\r\n\t\t\tvar state = controller.getState();\r\n\t\t\tvar cell = controller.locateCell(e.target);\r\n\r\n\t\t\tif (cell && controller.getEditorConfig(cell.columnName)) {\r\n\t\t\t\tif(controller.isVisible() && state.id == cell.id && state.columnName == cell.columnName){\r\n\t\t\t\t\t// do nothing if editor is already active in this cell\r\n\t\t\t\t}else{\r\n\t\t\t\t\tcontroller.startEdit(cell.id, cell.columnName);\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onEmptyClick\", function () {\r\n\t\t\tself.save();\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tkeyNav.attachEvent(\"onKeyDown\", function(command, e){\r\n\t\t\tvar activeCell = controller.locateCell(e.target);\r\n\t\t\tvar hasEditor = activeCell ? controller.getEditorConfig(activeCell.columnName) : false;\r\n\r\n\t\t\tvar state = controller.getState();\r\n\t\t\tvar keyboard = gantt.constants.KEY_CODES;\r\n\t\t\tvar keyCode = e.keyCode;\r\n\t\t\tvar preventKeyNav = false;\r\n\r\n\t\t\tswitch (keyCode){\r\n\t\t\t\tcase keyboard.ENTER:\r\n\t\t\t\t\tif(controller.isVisible()){\r\n\t\t\t\t\t\tcontroller.save();\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\tpreventKeyNav = true;\r\n\t\t\t\t\t}else if(hasEditor && !(e.ctrlKey || e.metaKey || e.shiftKey)){\r\n\t\t\t\t\t\tself.startEdit(activeCell.id, activeCell.columnName);\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\tpreventKeyNav = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase keyboard.ESC:\r\n\t\t\t\t\tif(controller.isVisible()){\r\n\t\t\t\t\t\tcontroller.hide();\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\tpreventKeyNav = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase keyboard.UP:\r\n\t\t\t\tcase keyboard.DOWN:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase keyboard.LEFT:\r\n\t\t\t\tcase keyboard.RIGHT:\r\n\t\t\t\t\tif((hasEditor && controller.isVisible()) || state.editorType === \"date\"){\r\n\t\t\t\t\t\tpreventKeyNav = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase keyboard.SPACE:\r\n\t\t\t\t\tif(controller.isVisible()){\r\n\t\t\t\t\t\tpreventKeyNav = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(hasEditor && !controller.isVisible()){\r\n\t\t\t\t\t\tself.startEdit(activeCell.id, activeCell.columnName);\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\tpreventKeyNav = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase keyboard.DELETE:\r\n\t\t\t\t\tif(hasEditor && !controller.isVisible()){\r\n\t\t\t\t\t\tself.startEdit(activeCell.id, activeCell.columnName);\r\n\t\t\t\t\t\tpreventKeyNav = true;\r\n\t\t\t\t\t} else if(hasEditor && controller.isVisible()){\r\n\t\t\t\t\t\tpreventKeyNav = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase keyboard.TAB:\r\n\t\t\t\t\tif(controller.isVisible()){\r\n\r\n\t\t\t\t\t\tif(e.shiftKey){\r\n\t\t\t\t\t\t\tcontroller.editPrevCell(true);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tcontroller.editNextCell(true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar newState = controller.getState();\r\n\t\t\t\t\t\tif(newState.id){\r\n\t\t\t\t\t\t\tkeyNav.focus({type:\"taskCell\", id: newState.id, column:newState.columnName});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\t\tpreventKeyNav = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tif(controller.isVisible())\r\n\t\t\t\t\t\tpreventKeyNav = true;\r\n\t\t\t\t\telse{\r\n\r\n\t\t\t\t\t\t// start editing on character key\r\n\t\t\t\t\t\tif((keyCode >= 48 && keyCode <= 57) || // [0-9]\r\n\t\t\t\t\t\t\t(keyCode > 95 && keyCode < 112) || // numpad\r\n\t\t\t\t\t\t\t(keyCode >= 64 && keyCode <= 91) || // [a-z]\r\n\t\t\t\t\t\t\t(keyCode > 185 && keyCode < 193) || //;=-,etc\r\n\t\t\t\t\t\t\t(keyCode > 218 && keyCode < 223)\r\n\t\t\t\t\t\t){\r\n\t\t\t\t\t\t\tvar modifiers = command.modifiers;\r\n\r\n\t\t\t\t\t\t\tvar anyModifier = modifiers.alt || modifiers.ctrl || modifiers.meta || modifiers.shift;\r\n\t\t\t\t\t\t\tif(modifiers.alt){\r\n\t\t\t\t\t\t\t\t// don't start editing on alt+key\r\n\t\t\t\t\t\t\t}else if (anyModifier && keyNav.getCommandHandler(command, \"taskCell\")){\r\n\t\t\t\t\t\t\t\t// don't start editing if command already have a keyboard shortcut\r\n\t\t\t\t\t\t\t}else if(hasEditor && !controller.isVisible()){\r\n\t\t\t\t\t\t\t\tself.startEdit(activeCell.id, activeCell.columnName);\r\n\t\t\t\t\t\t\t\tpreventKeyNav = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tif (preventKeyNav){\r\n\t\t\t\treturn false;\r\n\t\t\t} else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t},\r\n\tonShow: function(controller, placeholder, grid){},\r\n\tonHide: function(controller, placeholder, grid){\r\n\t\tconst gantt = grid.$gantt;\r\n\t\tif (gantt){\r\n\t\t\tgantt.focus();\r\n\t\t}\r\n\r\n\t},\r\n\tdestroy: function(){}\r\n};\r\n\r\n","export default function (gantt) {\r\n\r\n\tvar BaseEditor = function () {\r\n\t};\r\n\r\n\tBaseEditor.prototype = {\r\n\t\tshow: function (id, column, config, placeholder) {\r\n\t\t},\r\n\t\thide: function () {\r\n\t\t},\r\n\t\tset_value: function (value, id, column, node) {\r\n\t\t\tthis.get_input(node).value = value;\r\n\t\t},\r\n\t\tget_value: function (id, column, node) {\r\n\t\t\treturn this.get_input(node).value || \"\";\r\n\t\t},\r\n\t\tis_changed: function (value, id, column, node) {\r\n\t\t\tvar currentValue = this.get_value(id, column, node);\r\n\t\t\tif (currentValue && value && currentValue.valueOf && value.valueOf) {\r\n\t\t\t\treturn currentValue.valueOf() != value.valueOf();\r\n\t\t\t} else {\r\n\t\t\t\treturn currentValue != value;\r\n\t\t\t}\r\n\t\t},\r\n\t\tis_valid: function (value, id, column, node) {\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\tsave: function (id, column, node) {\r\n\r\n\t\t},\r\n\t\tget_input: function (node) {\r\n\t\t\treturn node.querySelector(\"input\");\r\n\t\t},\r\n\t\tfocus: function (node) {\r\n\t\t\tvar input = this.get_input(node);\r\n\t\t\tif (!input) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (input.focus) {\r\n\t\t\t\tinput.focus();\r\n\t\t\t}\r\n\r\n\t\t\tif (input.select) {\r\n\t\t\t\tinput.select();\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn BaseEditor;\r\n};","import BaseFactory from \"./base\";\r\nimport * as utils from \"../../../../../utils/utils\";\r\nimport __extends from \"../../../../../utils/extends\";\r\n\r\n\r\nexport default function(gantt) {\r\n\r\n\tvar BaseEditor = BaseFactory(gantt);\r\n\r\n\tfunction TextEditor() {\r\n\t\tvar self = BaseEditor.apply(this, arguments) || this;\r\n\t\treturn self;\r\n\t}\r\n\r\n\t__extends(TextEditor, BaseEditor);\r\n\r\n\tutils.mixin(TextEditor.prototype, {\r\n\t\tshow: function (id, column, config, placeholder) {\r\n\t\t\tvar html = `
`;\r\n\t\t\tplaceholder.innerHTML = html;\r\n\t\t}\r\n\t}, true);\r\n\r\n\treturn TextEditor;\r\n};","import BaseFactory from \"./base\";\r\nimport * as utils from \"../../../../../utils/utils\";\r\nimport __extends from \"../../../../../utils/extends\";\r\n\r\n\r\nexport default function(gantt) {\r\n\r\n\tvar BaseEditor = BaseFactory(gantt);\r\n\r\n\tfunction NumberEditor() {\r\n\t\tvar self = BaseEditor.apply(this, arguments) || this;\r\n\t\treturn self;\r\n\t}\r\n\r\n\t__extends(NumberEditor, BaseEditor);\r\n\r\n\tutils.mixin(NumberEditor.prototype, {\r\n\t\tshow: function (id, column, config, placeholder) {\r\n\t\t\tvar min = config.min || 0,\r\n\t\t\t\tmax = config.max || 100;\r\n\r\n\t\t\tvar html = `
`;\r\n\t\t\tplaceholder.innerHTML = html;\r\n\r\n\t\t\t// GS-1914. Do not allow entering alues beyond min and max via keyboard\r\n\t\t\tplaceholder.oninput = function (e) {\r\n\t\t\t\tif (+e.target.value < min) {\r\n\t\t\t\t\te.target.value = min;\r\n\t\t\t\t}\r\n\t\t\t\tif (+e.target.value > max) {\r\n\t\t\t\t\te.target.value = max;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t},\r\n\t\tget_value: function (id, column, node) {\r\n\t\t\treturn this.get_input(node).value || \"\";\r\n\t\t},\r\n\t\tis_valid: function (value, id, column, node) {\r\n\t\t\treturn !isNaN(parseInt(value, 10));\r\n\t\t}\r\n\t}, true);\r\n\r\n\treturn NumberEditor;\r\n};","import BaseFactory from \"./base\";\r\nimport * as utils from \"../../../../../utils/utils\";\r\nimport __extends from \"../../../../../utils/extends\";\r\n\r\n\r\nexport default function(gantt) {\r\n\r\n\tvar BaseEditor = BaseFactory(gantt);\r\n\r\n\tfunction SelectEditor() {\r\n\t\tvar self = BaseEditor.apply(this, arguments) || this;\r\n\t\treturn self;\r\n\t}\r\n\r\n\t__extends(SelectEditor, BaseEditor);\r\n\r\n\tutils.mixin(SelectEditor.prototype, {\r\n\t\tshow: function (id, column, config, placeholder) {\r\n\t\t\tvar html = `
\";\r\n\t\t\tplaceholder.innerHTML = html;\r\n\t\t},\r\n\t\tget_input: function (node) {\r\n\t\t\treturn node.querySelector(\"select\");\r\n\t\t}\r\n\t}, true);\r\n\r\n\treturn SelectEditor;\r\n};","import * as utils from \"../../../../../utils/utils\";\r\nimport __extends from \"../../../../../utils/extends\";\r\nimport BaseFactory from \"./base\";\r\n\r\nexport default function (gantt) {\r\n\tvar BaseEditor = BaseFactory(gantt);\r\n\t\r\n\t\r\n\r\n\tvar html5DateFormat = \"%Y-%m-%d\";\r\n\r\n\tvar dateToStr = null;\r\n\tvar strToDate = null;\r\n\r\n\tfunction init() {\r\n\t\tif (!dateToStr) {\r\n\t\t\tdateToStr = gantt.date.date_to_str(html5DateFormat);\r\n\t\t}\r\n\t\tif (!strToDate) {\r\n\t\t\tstrToDate = gantt.date.str_to_date(html5DateFormat);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction DateEditor() {\r\n\t\tvar self = BaseEditor.apply(this, arguments) || this;\r\n\r\n\t\treturn self;\r\n\t}\r\n\r\n\t__extends(DateEditor, BaseEditor);\r\n\r\n\tutils.mixin(DateEditor.prototype, {\r\n\t\tshow: function (id, column, config, placeholder) {\r\n\t\t\tinit();\r\n\t\t\tvar minValue = null;\r\n\t\t\tvar maxValue = null;\r\n\r\n\t\t\tif(typeof config.min === \"function\"){\r\n\t\t\t\tminValue = config.min(id, column);\r\n\t\t\t}else{\r\n\t\t\t\tminValue = config.min;\r\n\t\t\t}\r\n\r\n\t\t\tif(typeof config.max === \"function\"){\r\n\t\t\t\tmaxValue = config.max(id, column);\r\n\t\t\t}else{\r\n\t\t\t\tmaxValue = config.max;\r\n\t\t\t}\r\n\r\n\t\t\tvar minAttr = minValue ? \" min='\" + dateToStr(minValue)+\"' \" : \"\";\r\n\t\t\tvar maxAttr = maxValue ? \" max='\" + dateToStr(maxValue)+\"' \" : \"\";\r\n\t\t\tvar html = `
`;\r\n\t\t\tplaceholder.innerHTML = html;\r\n\r\n\t\t\t// GS-1914. Do not allow entering alues beyond min and max via keyboard\r\n\t\t\tplaceholder.oninput = function (e) {\r\n\t\t\t\tif (+gantt.date.str_to_date(\"%Y-%m-%d\")(e.target.value) < +minValue) {\r\n\t\t\t\t\te.target.value = gantt.date.date_to_str(\"%Y-%m-%d\")(minValue);\r\n\t\t\t\t}\r\n\t\t\t\tif (+gantt.date.str_to_date(\"%Y-%m-%d\")(e.target.value) > +maxValue) {\r\n\t\t\t\t\te.target.value = gantt.date.date_to_str(\"%Y-%m-%d\")(maxValue);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t},\r\n\t\tset_value: function (value, id, column, node) {\r\n\t\t\tif (value && value.getFullYear) {\r\n\t\t\t\tthis.get_input(node).value = dateToStr(value);\r\n\t\t\t} else {\r\n\t\t\t\tthis.get_input(node).value = value;\r\n\t\t\t}\r\n\t\t},\r\n\t\tis_valid: function (value, id, column, node) {\r\n\t\t\tif (!value || isNaN(value.getTime()))\r\n\t\t\t\treturn false;\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tget_value: function (id, column, node) {\r\n\t\t\tvar parsed;\r\n\t\t\ttry {\r\n\t\t\t\tparsed = strToDate(this.get_input(node).value || \"\");\r\n\t\t\t} catch (e) {\r\n\t\t\t\tparsed = null;// return null will cancel changes\r\n\t\t\t}\r\n\r\n\t\t\treturn parsed;\r\n\t\t}\r\n\t}, true);\r\n\r\n\treturn DateEditor;\r\n};\r\n","import BaseFactory from \"./base\";\r\nimport * as utils from \"../../../../../utils/utils\";\r\nimport __extends from \"../../../../../utils/extends\";\r\n\r\n\r\nexport default function(gantt) {\r\n\r\n\tvar BaseEditor = BaseFactory(gantt);\r\n\r\n\tfunction PredecessorEditor() {\r\n\t\tvar self = BaseEditor.apply(this, arguments) || this;\r\n\t\treturn self;\r\n\t}\r\n\r\n\t__extends(PredecessorEditor, BaseEditor);\r\n\r\n\tfunction getFormatter(config) {\r\n\t\treturn config.formatter || gantt.ext.formatters.linkFormatter();\r\n\t}\r\n\r\n\tfunction parseInputString(value, config) {\r\n\t\tvar predecessors = (value || \"\").split(config.delimiter || \",\");\r\n\t\tfor (var i = 0; i < predecessors.length; i++) {\r\n\t\t\tvar val = predecessors[i].trim();\r\n\t\t\tif (val) {\r\n\t\t\t\tpredecessors[i] = val;\r\n\t\t\t} else {\r\n\t\t\t\tpredecessors.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t\tpredecessors.sort();\r\n\t\treturn predecessors;\r\n\t}\r\n\r\n\tfunction formatPredecessors(task, config, gantt) {\r\n\t\tvar links = task.$target;\r\n\t\tvar labels = [];\r\n\t\tfor (var i = 0; i < links.length; i++) {\r\n\t\t\tvar link = gantt.getLink(links[i]);\r\n\t\t\tlabels.push(getFormatter(config).format(link));\r\n\t\t}\r\n\t\treturn labels.join((config.delimiter || \",\") + \" \");\r\n\t}\r\n\r\n\tfunction getSelectedLinks(taskId, predecessorCodes, config) {\r\n\t\tvar links = [];\r\n\t\tpredecessorCodes.forEach(function (code) {\r\n\t\t\tvar link = getFormatter(config).parse(code);\r\n\t\t\tif(link){\r\n\t\t\t\tlink.target = taskId;\r\n\t\t\t\t// GS-1290 A way to preserve the link. Otherwise validation will return false\r\n\t\t\t\t// because the existing link ID is not passed there\r\n\t\t\t\tlink.id = \"predecessor_generated\";\r\n\t\t\t\tif (gantt.isLinkAllowed(link)) {\r\n\t\t\t\t\tlink.id = undefined;\r\n\t\t\t\t\tlinks.push(link);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn links;\r\n\t}\r\n\r\n\tfunction formatLinkKey(link){\r\n\t\treturn link.source + \"_\" + link.target + \"_\" + link.type + \"_\" + (link.lag||0);\r\n\t}\r\n\r\n\tfunction getLinksDiff(task, predecessorCodes, config) {\r\n\t\tvar selectedLinks = getSelectedLinks(task.id, predecessorCodes, config);\r\n\t\tvar existingLinksSearch = {};\r\n\t\ttask.$target.forEach(function (linkId) {\r\n\t\t\tvar link = gantt.getLink(linkId);\r\n\t\t\texistingLinksSearch[formatLinkKey(link)] = link.id;\r\n\t\t});\r\n\r\n\t\tvar linksToAdd = [];\r\n\t\tselectedLinks.forEach(function (link) {\r\n\t\t\tvar linkKey = formatLinkKey(link);\r\n\t\t\tif (!existingLinksSearch[linkKey]) {\r\n\t\t\t\tlinksToAdd.push(link);\r\n\t\t\t} else {\r\n\t\t\t\tdelete existingLinksSearch[linkKey];\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tvar linksToDelete = [];\r\n\t\tfor (var i in existingLinksSearch) {\r\n\t\t\tlinksToDelete.push(existingLinksSearch[i]);\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tadd: linksToAdd,\r\n\t\t\tremove: linksToDelete\r\n\t\t};\r\n\t}\r\n\r\n\tutils.mixin(PredecessorEditor.prototype, {\r\n\t\tshow: function (id, column, config, placeholder) {\r\n\t\t\tvar html = `
`;\r\n\t\t\tplaceholder.innerHTML = html;\r\n\t\t},\r\n\t\thide: function () {\r\n\t\t},\r\n\t\tset_value: function (value, id, column, node) {\r\n\t\t\tthis.get_input(node).value = formatPredecessors(value, column.editor, gantt);\r\n\t\t},\r\n\t\tget_value: function (id, column, node) {\r\n\t\t\treturn parseInputString((this.get_input(node).value || \"\"), column.editor);\r\n\t\t},\r\n\t\tsave: function (id, column, node) {\r\n\t\t\tvar task = gantt.getTask(id);\r\n\r\n\t\t\tvar linksDiff = getLinksDiff(task, this.get_value(id, column, node), column.editor);\r\n\r\n\t\t\tif (linksDiff.add.length || linksDiff.remove.length) {\r\n\t\t\t\tgantt.batchUpdate(function () {\r\n\t\t\t\t\tlinksDiff.add.forEach(function (link) {\r\n\t\t\t\t\t\tgantt.addLink(link);\r\n\t\t\t\t\t});\r\n\t\t\t\t\tlinksDiff.remove.forEach(function (linkId) {\r\n\t\t\t\t\t\tgantt.deleteLink(linkId);\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\tif (gantt.autoSchedule)\r\n\t\t\t\t\t\tgantt.autoSchedule();\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t},\r\n\t\tis_changed: function (value, id, column, node) {\r\n\t\t\tvar inputPredecessors = this.get_value(id, column, node);\r\n\t\t\tvar taskPredecessors = parseInputString(formatPredecessors(value, column.editor, gantt), column.editor);\r\n\r\n\t\t\treturn inputPredecessors.join() !== taskPredecessors.join();\r\n\t\t}\r\n\t}, true);\r\n\r\n\treturn PredecessorEditor;\r\n};","import BaseFactory from \"./base\";\r\nimport * as utils from \"../../../../../utils/utils\";\r\nimport __extends from \"../../../../../utils/extends\";\r\n\r\n\r\nexport default function(gantt) {\r\n\r\n\tvar BaseEditor = BaseFactory(gantt);\r\n\r\n\tfunction TextEditor() {\r\n\t\tvar self = BaseEditor.apply(this, arguments) || this;\r\n\t\treturn self;\r\n\t}\r\n\r\n\t__extends(TextEditor, BaseEditor);\r\n\r\n\tfunction getFormatter(config) {\r\n\t\treturn config.formatter || gantt.ext.formatters.durationFormatter();\r\n\t}\r\n\tutils.mixin(TextEditor.prototype, {\r\n\t\tshow: function (id, column, config, placeholder) {\r\n\t\t\tvar html = `
`;\r\n\t\t\tplaceholder.innerHTML = html;\r\n\t\t},\r\n\t\tset_value: function (value, id, column, node) {\r\n\t\t\tthis.get_input(node).value = getFormatter(column.editor).format(value);\r\n\t\t},\r\n\t\tget_value: function (id, column, node) {\r\n\t\t\treturn getFormatter(column.editor).parse(this.get_input(node).value || \"\");\r\n\t\t}\r\n\t}, true);\r\n\r\n\treturn TextEditor;\r\n};","export default function (gantt) {\r\n\treturn function processTaskDateProperties(item, mapTo, mode) {\r\n\t\tif (mode == \"keepDates\") {\r\n\t\t\tkeepDatesOnEdit(item, mapTo);\r\n\t\t} else if (mode == \"keepDuration\") {\r\n\t\t\tkeepDurationOnEdit(item, mapTo);\r\n\t\t} else {\r\n\t\t\tdefaultActionOnEdit(item, mapTo);\r\n\t\t}\r\n\t};\r\n\r\n\t// resize task\r\n\t// resize task when start/end/duration changes\r\n\tfunction keepDatesOnEdit(item, mapTo) {\r\n\t\tif (mapTo == \"duration\") {\r\n\t\t\titem.end_date = gantt.calculateEndDate(item);\r\n\t\t} else if (mapTo == \"end_date\" || mapTo == \"start_date\") {\r\n\t\t\titem.duration = gantt.calculateDuration(item);\r\n\t\t}\r\n\t}\r\n\r\n\t// move task(before 6.2)\r\n\t// move task when start/end dates changes\r\n\t// resize task when duration changes\r\n\tfunction keepDurationOnEdit(item, mapTo) {\r\n\t\tif (mapTo == \"end_date\") {\r\n\t\t\titem.start_date = decreaseStartDate(item);\r\n\t\t} else if (mapTo == \"start_date\" || mapTo == \"duration\") {\r\n\t\t\titem.end_date = gantt.calculateEndDate(item);\r\n\t\t}\r\n\t}\r\n\r\n\t// default behavior\r\n\t// move task when start date changes\r\n\t// resize task when end date/duration changes\r\n\tfunction defaultActionOnEdit(item, mapTo) {\r\n\t\tif (gantt.config.schedule_from_end){\r\n\t\t\tif (mapTo == \"end_date\" || mapTo == \"duration\") {\r\n\t\t\t\titem.start_date = decreaseStartDate(item);\r\n\t\t\t} else if (mapTo == \"start_date\") {\r\n\t\t\t\titem.duration = gantt.calculateDuration(item);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (mapTo == \"start_date\" || mapTo == \"duration\") {\r\n\t\t\t\titem.end_date = gantt.calculateEndDate(item);\r\n\t\t\t} else if (mapTo == \"end_date\") {\r\n\t\t\t\titem.duration = gantt.calculateDuration(item);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction decreaseStartDate(item){\r\n\t\treturn gantt.calculateEndDate({\r\n\t\t\tstart_date: item.end_date,\r\n\t\t\tduration: -item.duration,\r\n\t\t\ttask: item\r\n\t\t});\r\n\t}\r\n};","import getKeyboardMapping from \"./keyboard_mappings\";\r\nimport textEditorFactory from \"./editors/text\";\r\nimport numberEditorFactory from \"./editors/number\";\r\nimport selectEditorFactory from \"./editors/select\";\r\nimport dateEditorFactory from \"./editors/date\";\r\nimport predecessorEditorFactory from \"./editors/predecessor\";\r\nimport durationEditorFactory from \"./editors/duration\";\r\nimport * as utils from \"../../../../utils/utils\";\r\nimport * as domHelpers from \"../../utils/dom_helpers\";\r\nimport eventable from \"../../../../utils/eventable\";\r\nimport linkedPropertiesProcessor from \"./linked_properties\";\r\n\r\nfunction initConfigs(gantt){\r\n\tgantt.config.editor_types = {\r\n\t\ttext: new (textEditorFactory(gantt))(),\r\n\t\tnumber: new (numberEditorFactory(gantt))(),\r\n\t\tselect: new (selectEditorFactory(gantt))(),\r\n\t\tdate: new (dateEditorFactory(gantt))(),\r\n\t\tpredecessor: new (predecessorEditorFactory(gantt))(),\r\n\t\tduration: new (durationEditorFactory(gantt))()\r\n\t};\r\n}\r\n\r\nfunction create(gantt){\r\n\tvar keyboardMapping = getKeyboardMapping(gantt);\r\n\r\n\tvar eventBus = {};\r\n\teventable(eventBus);\r\n\r\n\tfunction createGridEditors(grid) {\r\n\r\n\t\tfunction _getGridCellFromNode(node){\r\n\t\t\tif(!domHelpers.isChildOf(node, grid.$grid)){\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tvar row = domHelpers.locateAttribute(node, grid.$config.item_attribute);\r\n\t\t\tvar cell = domHelpers.locateAttribute(node, \"data-column-name\");\r\n\t\t\tif(row && cell){\r\n\t\t\t\tvar columnName = cell.getAttribute(\"data-column-name\");\r\n\t\t\t\tvar id = row.getAttribute(grid.$config.item_attribute);\r\n\t\t\t\treturn {\r\n\t\t\t\t\tid: id,\r\n\t\t\t\t\tcolumnName: columnName\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\r\n\t\t}\r\n\r\n\t\tfunction _getEditorPosition(itemId, columnName) {\r\n\t\t\tvar config = grid.$getConfig();\r\n\t\t\tvar top = grid.getItemTop(itemId);\r\n\t\t\tvar height = grid.getItemHeight(itemId);\r\n\t\t\tvar cols = grid.getGridColumns();\r\n\t\t\tvar left = 0,\r\n\t\t\t\tright = 0,\r\n\t\t\t\twidth = 0;\r\n\r\n\t\t\tfor (var i = 0; i < cols.length; i++) {\r\n\t\t\t\tif (cols[i].name == columnName) {\r\n\t\t\t\t\twidth = cols[i].width;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (config.rtl) {\r\n\t\t\t\t\tright += cols[i].width;\r\n\t\t\t\t}\telse {\r\n\t\t\t\t\tleft += cols[i].width;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (config.rtl) {\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttop: top,\r\n\t\t\t\t\tright: right,\r\n\t\t\t\t\theight: height,\r\n\t\t\t\t\twidth: width\r\n\t\t\t\t};\r\n\t\t\t} else {\r\n\t\t\t\treturn {\r\n\t\t\t\t\ttop: top,\r\n\t\t\t\t\tleft: left,\r\n\t\t\t\t\theight: height,\r\n\t\t\t\t\twidth: width\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tfunction findVisibleIndex(grid, columnName) {\r\n\t\t\tvar columns = grid.getGridColumns();\r\n\t\t\tfor (var i = 0; i < columns.length; i++){\r\n\t\t\t\tif(columns[i].name == columnName){\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tfunction _createPlaceholder(itemId, columnName) {\r\n\t\t\tvar config = grid.$getConfig();\r\n\t\t\tvar pos = _getEditorPosition(itemId, columnName);\r\n\t\t\tvar el = document.createElement(\"div\");\r\n\t\t\tel.className = \"gantt_grid_editor_placeholder\";\r\n\t\t\tel.setAttribute(grid.$config.item_attribute, itemId);\r\n\t\t\tel.setAttribute(grid.$config.bind + \"_id\", itemId);// for backward compatibility\r\n\r\n\t\t\tel.setAttribute(\"data-column-name\", columnName);\r\n\r\n\t\t\tvar visibleIndex = findVisibleIndex(grid, columnName);\r\n\t\t\tel.setAttribute(\"data-column-index\", visibleIndex);\r\n\r\n\t\t\tgantt._waiAria.inlineEditorAttr(el);\r\n\r\n\t\t\tif (config.rtl) {\r\n\t\t\t\tel.style.cssText = [\r\n\t\t\t\t\t\"top:\" + pos.top + \"px\",\r\n\t\t\t\t\t\"right:\" + pos.right + \"px\",\r\n\t\t\t\t\t\"width:\" + pos.width + \"px\",\r\n\t\t\t\t\t\"height:\" + pos.height + \"px\"\r\n\t\t\t\t].join(\";\");\r\n\t\t\t} else {\r\n\t\t\t\tel.style.cssText = [\r\n\t\t\t\t\t\"top:\" + pos.top + \"px\",\r\n\t\t\t\t\t\"left:\" + pos.left + \"px\",\r\n\t\t\t\t\t\"width:\" + pos.width + \"px\",\r\n\t\t\t\t\t\"height:\" + pos.height + \"px\"\r\n\t\t\t\t].join(\";\");\r\n\t\t\t}\r\n\r\n\t\t\treturn el;\r\n\t\t}\r\n\r\n\t\tvar updateTaskDateProperties = linkedPropertiesProcessor(gantt);\r\n\r\n\t\tvar handlers = [];\r\n\t\tvar ganttHandlers = [];\r\n\t\tvar store = null;\r\n\t\tvar controller = {\r\n\t\t\t_itemId: null,\r\n\t\t\t_columnName: null,\r\n\t\t\t_editor: null,\r\n\t\t\t_editorType: null,\r\n\t\t\t_placeholder: null,\r\n\r\n\t\t\tlocateCell: _getGridCellFromNode,\r\n\t\t\tgetEditorConfig: function (columnName) {\r\n\t\t\t\tvar column = grid.getColumn(columnName);\r\n\t\t\t\treturn column.editor;\r\n\t\t\t},\r\n\r\n\t\t\tinit: function () {\r\n\t\t\t\tvar mapping = keyboardMapping.getMapping();\r\n\t\t\t\tif(mapping.init){\r\n\t\t\t\t\tmapping.init(this, grid);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tstore = grid.$gantt.getDatastore(grid.$config.bind);\r\n\r\n\t\t\t\tvar self = this;\r\n\r\n\t\t\t\thandlers.push(store.attachEvent(\"onIdChange\", function(oldId, newId){\r\n\t\t\t\t\tif(self._itemId == oldId){\r\n\t\t\t\t\t\tself._itemId = newId;\r\n\t\t\t\t\t}\r\n\t\t\t\t}));\r\n\t\t\t\thandlers.push(store.attachEvent(\"onStoreUpdated\", function(){\r\n\t\t\t\t\tif(grid.$gantt.getState(\"batchUpdate\").batch_update){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(self.isVisible() && !store.isVisible(self._itemId)){\r\n\t\t\t\t\t\tself.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t}));\r\n\r\n\t\t\t\tganttHandlers.push(gantt.attachEvent(\"onDataRender\", function(){\r\n\t\t\t\t\tif(self._editor && self._placeholder && !domHelpers.isChildOf(self._placeholder, gantt.$root)){\r\n\t\t\t\t\t\tgrid.$grid_data.appendChild(self._placeholder);\r\n\t\t\t\t\t}\r\n\t\t\t\t}));\r\n\r\n\t\t\t\tthis.init = function(){};\r\n\t\t\t},\r\n\r\n\t\t\tgetState: function(){\r\n\t\t\t\treturn {\r\n\t\t\t\t\teditor: this._editor,\r\n\t\t\t\t\teditorType: this._editorType,\r\n\t\t\t\t\tplaceholder: this._placeholder,\r\n\t\t\t\t\tid: this._itemId,\r\n\t\t\t\t\tcolumnName: this._columnName\r\n\t\t\t\t};\r\n\t\t\t},\r\n\r\n\t\t\tstartEdit: function(itemId, columnName) {\r\n\t\t\t\tif (this.isVisible()) {\r\n\t\t\t\t\tthis.save();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!store.exists(itemId)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar editorState = {id: itemId, columnName: columnName};\r\n\t\t\t\tif (gantt.isReadonly(store.getItem(itemId))) {\r\n\t\t\t\t\tthis.callEvent(\"onEditPrevent\", [editorState]);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (this.callEvent(\"onBeforeEditStart\", [editorState]) === false) {\r\n\t\t\t\t\tthis.callEvent(\"onEditPrevent\", [editorState]);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.show(editorState.id, editorState.columnName);\r\n\t\t\t\tthis.setValue();\r\n\r\n\t\t\t\tthis.callEvent(\"onEditStart\", [editorState]);\r\n\t\t\t},\r\n\t\t\tisVisible: function(){\r\n\t\t\t\treturn !!(this._editor && domHelpers.isChildOf(this._placeholder, gantt.$root));\r\n\t\t\t},\r\n\t\t\tshow: function (itemId, columnName) {\r\n\t\t\t\tif (this.isVisible()) {\r\n\t\t\t\t\tthis.save();\r\n\t\t\t\t}\r\n\t\t\t\tvar editorState = {id: itemId, columnName: columnName};\r\n\r\n\t\t\t\tvar column = grid.getColumn(editorState.columnName);\r\n\t\t\t\tvar editorConfig = this.getEditorConfig(column.name);\r\n\t\t\t\tif(!editorConfig)\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\tvar editor = grid.$getConfig().editor_types[editorConfig.type];\r\n\r\n\t\t\t\tvar placeholder = _createPlaceholder(editorState.id, editorState.columnName);\r\n\t\t\t\tgrid.$grid_data.appendChild(placeholder);\r\n\t\t\t\teditor.show(editorState.id, column, editorConfig, placeholder);\r\n\t\t\t\tthis._editor = editor;\r\n\t\t\t\tthis._placeholder = placeholder;\r\n\t\t\t\tthis._itemId = editorState.id;\r\n\t\t\t\tthis._columnName = editorState.columnName;\r\n\t\t\t\tthis._editorType = editorConfig.type;\r\n\r\n\t\t\t\tvar mapping = keyboardMapping.getMapping();\r\n\t\t\t\tif(mapping.onShow){\r\n\t\t\t\t\tmapping.onShow(this, placeholder, grid);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tsetValue: function () {\r\n\t\t\t\tvar state = this.getState();\r\n\t\t\t\tvar itemId = state.id,\r\n\t\t\t\t\tcolumnName = state.columnName;\r\n\r\n\t\t\t\tvar column = grid.getColumn(columnName);\r\n\t\t\t\tvar item = store.getItem(itemId);\r\n\t\t\t\tvar editorConfig = this.getEditorConfig(columnName);\r\n\r\n\t\t\t\tif(!editorConfig)\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\tvar value = item[editorConfig.map_to];\r\n\t\t\t\tif(editorConfig.map_to == \"auto\"){\r\n\t\t\t\t\tvalue = store.getItem(itemId);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._editor.set_value(value, itemId, column, this._placeholder);\r\n\t\t\t\tthis.focus();\r\n\t\t\t},\r\n\r\n\t\t\tfocus: function(){\r\n\t\t\t\tthis._editor.focus(this._placeholder);\r\n\t\t\t},\r\n\r\n\t\t\tgetValue: function () {\r\n\t\t\t\tvar column = grid.getColumn(this._columnName);\r\n\t\t\t\treturn this._editor.get_value(this._itemId, column, this._placeholder);\r\n\t\t\t},\r\n\r\n\t\t\t_getItemValue: function() {\r\n\t\t\t\tvar editorConfig = this.getEditorConfig(this._columnName);\r\n\r\n\t\t\t\tif(!editorConfig)\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\tvar item = gantt.getTask(this._itemId);\r\n\t\t\t\tvar value = item[editorConfig.map_to];\r\n\t\t\t\tif(editorConfig.map_to == \"auto\"){\r\n\t\t\t\t\tvalue = store.getItem(this._itemId);\r\n\t\t\t\t}\r\n\t\t\t\treturn value;\r\n\t\t\t},\r\n\r\n\t\t\tisChanged: function(){\r\n\r\n\t\t\t\tvar column = grid.getColumn(this._columnName);\r\n\r\n\t\t\t\tvar value = this._getItemValue();\r\n\r\n\t\t\t\treturn this._editor.is_changed(value, this._itemId, column, this._placeholder);\r\n\t\t\t},\r\n\r\n\t\t\thide: function () {\r\n\t\t\t\tif(!this._itemId)\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\tvar itemId = this._itemId,\r\n\t\t\t\t\tcolumnName = this._columnName;\r\n\r\n\t\t\t\tvar mapping = keyboardMapping.getMapping();\r\n\t\t\t\tif(mapping.onHide){\r\n\t\t\t\t\tmapping.onHide(this, this._placeholder, grid);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._itemId = null;\r\n\t\t\t\tthis._columnName = null;\r\n\t\t\t\tthis._editorType = null;\r\n\t\t\t\tif (!this._placeholder) return;\r\n\r\n\t\t\t\tif (this._editor && this._editor.hide) {\r\n\t\t\t\t\tthis._editor.hide(this._placeholder);\r\n\t\t\t\t}\r\n\t\t\t\tthis._editor = null;\r\n\t\t\t\tif (this._placeholder.parentNode) {\r\n\t\t\t\t\tthis._placeholder.parentNode.removeChild(this._placeholder);\r\n\t\t\t\t}\r\n\t\t\t\tthis._placeholder = null;\r\n\r\n\t\t\t\tthis.callEvent(\"onEditEnd\", [{id: itemId, columnName: columnName}]);\r\n\t\t\t},\r\n\t\t\tsave: function () {\r\n\t\t\t\tif(!(this.isVisible() && store.exists(this._itemId) && this.isChanged())) {\r\n\t\t\t\t\tthis.hide();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar itemId = this._itemId,\r\n\t\t\t\t\tcolumnName = this._columnName;\r\n\r\n\t\t\t\tif(!store.exists(itemId)) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar item = store.getItem(itemId);\r\n\t\t\t\tvar editorConfig = this.getEditorConfig(columnName);\r\n\t\t\t\tvar editorState = {\r\n\t\t\t\t\tid: itemId,\r\n\t\t\t\t\tcolumnName: columnName,\r\n\t\t\t\t\tnewValue: this.getValue(),\r\n\t\t\t\t\toldValue: this._getItemValue()\r\n\t\t\t\t};\r\n\t\t\t\tif (this.callEvent(\"onBeforeSave\", [editorState]) !== false) {\r\n\t\t\t\t\tif (!this._editor.is_valid || this._editor.is_valid(editorState.newValue, editorState.id, grid.getColumn(columnName), this._placeholder)) {\r\n\r\n\t\t\t\t\t\tvar mapTo = editorConfig.map_to;\r\n\t\t\t\t\t\tvar value = editorState.newValue;\r\n\t\t\t\t\t\tif (mapTo != \"auto\") {\r\n\t\t\t\t\t\t\titem[mapTo] = value;\r\n\t\t\t\t\t\t\tupdateTaskDateProperties(item, mapTo, gantt.config.inline_editors_date_processing);\r\n\r\n\t\t\t\t\t\t\tstore.updateItem(itemId);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthis._editor.save(itemId, grid.getColumn(columnName), this._placeholder);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.callEvent(\"onSave\", [editorState]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.hide();\r\n\t\t\t},\r\n\r\n\t\t\t_findEditableCell: function findEditableCell(start, direction){\r\n\t\t\t\tvar nextIndex = start;\r\n\t\t\t\tvar columns = grid.getGridColumns();\r\n\t\t\t\tvar nextColumn = columns[nextIndex];\r\n\r\n\t\t\t\tvar columnName = nextColumn ? nextColumn.name : null;\r\n\t\t\t\tif(columnName){\r\n\t\t\t\t\twhile(columnName && !this.getEditorConfig(columnName)){\r\n\t\t\t\t\t\tcolumnName = this._findEditableCell(start + direction, direction);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn columnName;\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t},\r\n\r\n\t\t\tgetNextCell: function moveCell(dir){\r\n\t\t\t\t// GS-1257. true means to exclude hidden columns\r\n\t\t\t\treturn this._findEditableCell(grid.getColumnIndex(this._columnName, true) + dir, dir);\r\n\t\t\t},\r\n\r\n\t\t\tgetFirstCell: function getFirstCell(){\r\n\t\t\t\treturn this._findEditableCell(0, 1);\r\n\t\t\t},\r\n\r\n\t\t\tgetLastCell: function getLastCell(){\r\n\t\t\t\treturn this._findEditableCell(grid.getGridColumns().length - 1, -1);\r\n\t\t\t},\r\n\r\n\t\t\teditNextCell: function nextCell(canChangeRow){\r\n\t\t\t\tvar cell = this.getNextCell(1);\r\n\t\t\t\tif(cell){\r\n\t\t\t\t\tvar nextColumn = this.getNextCell(1);\r\n\t\t\t\t\tif(nextColumn && this.getEditorConfig(nextColumn)){\r\n\t\t\t\t\t\tthis.startEdit(this._itemId, nextColumn);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(canChangeRow && this.moveRow(1)){\r\n\t\t\t\t\tvar task = this.moveRow(1);\r\n\t\t\t\t\tcell = this.getFirstCell();\r\n\t\t\t\t\tif(cell && this.getEditorConfig(cell)){\r\n\t\t\t\t\t\tthis.startEdit(task, cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\teditPrevCell: function prevCell(canChangeRow){\r\n\t\t\t\tvar cell = this.getNextCell(-1);\r\n\t\t\t\tif(cell){\r\n\t\t\t\t\tvar nextColumn = this.getNextCell(-1);\r\n\t\t\t\t\tif(nextColumn && this.getEditorConfig(nextColumn)){\r\n\t\t\t\t\t\tthis.startEdit(this._itemId, nextColumn);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else if(canChangeRow && this.moveRow(-1)){\r\n\t\t\t\t\tvar task = this.moveRow(-1);\r\n\t\t\t\t\tcell = this.getLastCell();\r\n\t\t\t\t\tif(cell && this.getEditorConfig(cell)){\r\n\t\t\t\t\t\tthis.startEdit(task, cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tmoveRow: function moveRow(dir) {\r\n\t\t\t\tvar moveTask = dir > 0 ? gantt.getNext : gantt.getPrev;\r\n\t\t\t\tmoveTask = gantt.bind(moveTask, gantt);\r\n\r\n\t\t\t\tvar nextItem = moveTask(this._itemId);\r\n\t\t\t\t// skip readonly rows\r\n\t\t\t\twhile (gantt.isTaskExists(nextItem) && gantt.isReadonly(gantt.getTask(nextItem))) {\r\n\t\t\t\t\tnextItem = moveTask(nextItem);\r\n\t\t\t\t}\r\n\t\t\t\treturn nextItem;\r\n\t\t\t},\r\n\r\n\t\t\teditNextRow: function nextRow(skipReadonly){\r\n\t\t\t\tvar id = this.getState().id;\r\n\t\t\t\tif (!gantt.isTaskExists(id)) return;\r\n\r\n\t\t\t\tvar next = null;\r\n\t\t\t\tif (skipReadonly){\r\n\t\t\t\t\tnext = this.moveRow(1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tnext = gantt.getNext(id);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (gantt.isTaskExists(next)){\r\n\t\t\t\t\tthis.startEdit(next, this._columnName);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\teditPrevRow: function prevRow(skipReadonly){\r\n\t\t\t\tvar id = this.getState().id;\r\n\t\t\t\tif (!gantt.isTaskExists(id)) return;\r\n\r\n\t\t\t\tvar prev = null;\r\n\t\t\t\tif (skipReadonly){\r\n\t\t\t\t\tprev = this.moveRow(-1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tprev = gantt.getPrev(id);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (gantt.isTaskExists(prev)){\r\n\t\t\t\t\tthis.startEdit(prev, this._columnName);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdestructor: function(){\r\n\t\t\t\thandlers.forEach(function(handlerId){\r\n\t\t\t\t\tstore.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tganttHandlers.forEach(function(handlerId){\r\n\t\t\t\t\tgantt.detachEvent(handlerId);\r\n\t\t\t\t});\r\n\t\t\t\thandlers = [];\r\n\t\t\t\tganttHandlers = [];\r\n\r\n\t\t\t\tstore = null;\r\n\t\t\t\tthis.hide();\r\n\t\t\t\tthis.detachAllEvents();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tutils.mixin(controller, keyboardMapping);\r\n\t\tutils.mixin(controller, eventBus);\r\n\r\n\t\treturn controller;\r\n\t}\r\n\r\n\r\n\tvar inlineEditController = {\r\n\t\tinit: initConfigs,\r\n\t\tcreateEditors: createGridEditors\r\n\t};\r\n\r\n\tutils.mixin(inlineEditController, keyboardMapping);\r\n\tutils.mixin(inlineEditController, eventBus);\r\n\r\n\treturn inlineEditController;\r\n}\r\n\r\n\r\n\r\n\r\nexport default create;","import defaultMapping from \"./keyboard_mappings/default\";\r\nimport keyNavMappings from \"./keyboard_mappings/keyboard_navigation\";\r\n\r\nexport default function(gantt){\r\n\r\n\tvar mapping = null;\r\n\r\n\treturn {\r\n\t\tsetMapping: function(map){\r\n\t\t\tmapping = map;\r\n\t\t},\r\n\t\tgetMapping: function(){\r\n\r\n\t\t\tif(mapping){\r\n\t\t\t\treturn mapping;\r\n\t\t\t}else if(gantt.config.keyboard_navigation_cells && gantt.ext.keyboardNavigation){\r\n\t\t\t\treturn keyNavMappings;\r\n\t\t\t}else{\r\n\t\t\t\treturn defaultMapping;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n};\r\n","// optimized checker for task bars smart rendering\r\n\r\n// first check the vertical position since it's easier to calculate\r\nexport default function isBarInViewport(item, viewport, view, config, gantt){\r\n\tif(!item.start_date || !item.end_date){\r\n\t\treturn null;\r\n\t}\r\n\r\n\tvar top = view.getItemTop(item.id);\r\n\tvar height = view.getItemHeight(item.id);\r\n\r\n\tif(top > viewport.y_end || top + height < viewport.y){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tvar padding = 200;\r\n\tvar startCoord = view.posFromDate(item.start_date);\r\n\tvar endCoord = view.posFromDate(item.end_date);\r\n\tvar left = Math.min(startCoord, endCoord) - padding;\r\n\tvar right = Math.max(startCoord, endCoord) + padding;\r\n\r\n\tif(left > viewport.x_end || right < viewport.x){\r\n\t\treturn false;\r\n\t}\r\n\r\n\treturn true;\r\n};","function createTaskRenderer(gantt) {\r\n\r\n\tfunction _render_task_element(task, view, config) {\r\n\t\tvar config = view.$getConfig();\r\n\t\tvar painters = config.type_renderers;\r\n\t\tvar renderer = painters[gantt.getTaskType(task.type)],\r\n\t\t\tdefaultRenderer = _task_default_render;\r\n\r\n\t\tif (!renderer) {\r\n\t\t\treturn defaultRenderer.call(gantt, task, view, config);\r\n\t\t}else{\r\n\t\t\treturn renderer.call(gantt, task, function(task){ return defaultRenderer.call(gantt, task, view, config);}, view);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _task_default_render(task, view, config) {\r\n\t\tif (gantt._isAllowedUnscheduledTask(task))\r\n\t\t\treturn;\r\n\r\n\t\tif (!gantt._isTaskInTimelineLimits(task)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar pos = view.getItemPosition(task);\r\n\r\n\t\tvar cfg = config,\r\n\t\t\ttemplates = view.$getTemplates();\r\n\r\n\t\tvar taskType = gantt.getTaskType(task.type);\r\n\t\tvar height = view.getBarHeight(task.id, taskType == cfg.types.milestone);\r\n\r\n\t\tvar controlsMargin = 0;\r\n\t\tif (taskType == cfg.types.milestone) {\r\n\t\t\tcontrolsMargin = (height - pos.height)/2;\r\n\t\t}\r\n\r\n\t\tvar padd = Math.floor((view.getItemHeight(task.id) - height) / 2);\r\n\t\tconst hasBaselines = gantt.config.baselines !== false && task.baselines && task.baselines.length;\r\n\t\tconst baselinesOnDifferentRow = gantt.config.baselines !== false && (gantt.config.baselines.render_mode == \"separateRow\" || gantt.config.baselines.render_mode == \"individualRow\");\r\n\t\tif (hasBaselines && baselinesOnDifferentRow){\r\n\t\t\tif (task.bar_height !== \"full\" && task.bar_height < task.row_height){\r\n\t\t\t\tif (taskType === cfg.types.milestone){\r\n\t\t\t\t\tlet milestoneHeight = view.getBarHeight(task.id, true);\r\n\t\t\t\t\tlet milestoneWidth = Math.sqrt(2 * milestoneHeight * milestoneHeight);\r\n\t\t\t\t\tpadd = Math.floor((milestoneWidth - height) / 2) + 2;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpadd = 2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t//\tif(task.type == cfg.types.milestone){\r\n\t//\t\tpadd -= 1;\r\n\t//\t}\r\n\t//\tif (taskType == cfg.types.milestone && cfg.link_line_width > 1) {\r\n\t//\t\t//little adjust milestone position, so horisontal corners would match link arrow when thickness of link line is more than 1px\r\n\t//\t\tpadd += 1;\r\n\t//\t}\r\n\r\n\t\tif (taskType == cfg.types.milestone) {\r\n\t\t\tpos.left -= Math.round(height / 2);\r\n\t\t\tpos.width = height;\r\n\t\t}\r\n\r\n\t\tvar div = document.createElement(\"div\");\r\n\r\n\t\tvar width = Math.round(pos.width);\r\n\r\n\t\tif(view.$config.item_attribute) {\r\n\t\t\tdiv.setAttribute(view.$config.item_attribute, task.id);\r\n\t\t\tdiv.setAttribute(view.$config.bind + \"_id\", task.id); // 'task_id'/'resource_id' for backward compatibility\r\n\t\t}\r\n\r\n\t\tif (cfg.show_progress && taskType != cfg.types.milestone) {\r\n\t\t\t_render_task_progress(task, div, width, cfg, templates);\r\n\t\t}\r\n\r\n\t\t//use separate div to display content above progress bar\r\n\t\tvar content = _render_task_content(task, width, templates);\r\n\t\tif (task.textColor) {\r\n\t\t\tcontent.style.color = task.textColor;\r\n\t\t}\r\n\t\tdiv.appendChild(content);\r\n\r\n\t\tvar css = _combine_item_class(\"gantt_task_line\",\r\n\t\t\ttemplates.task_class(task.start_date, task.end_date, task),\r\n\t\t\ttask.id,\r\n\t\t\tview);\r\n\t\tif (task.color || task.progressColor || task.textColor) {\r\n\t\t\tcss += \" gantt_task_inline_color\";\r\n\t\t}\r\n\t\tif (pos.width < 20){\r\n\t\t\tcss += \" gantt_thin_task\";\r\n\t\t}\r\n\t\tdiv.className = css;\r\n\r\n\t\tvar styles = [\r\n\t\t\t\"left:\" + pos.left + \"px\",\r\n\t\t\t\"top:\" + (padd + pos.top) + 'px',\r\n\t\t\t\"height:\" + (height) + 'px',\r\n\t\t\t\"line-height:\" + (Math.max(height < 30 ? height - 2 : height, 0)) + 'px',\r\n\t\t\t\"width:\" + width + 'px'\r\n\t\t];\r\n\r\n\t\tdiv.style.cssText = styles.join(\";\");\r\n\t\tif (task.color) {\r\n\t\t\tdiv.style.setProperty(\"--dhx-gantt-task-background\", task.color);\r\n\t\t}\r\n\t\tif (task.textColor) {\r\n\t\t\tdiv.style.setProperty(\"--dhx-gantt-task-color\", task.textColor);\r\n\t\t}\r\n\r\n\t\tif (task.progressColor) {\r\n\t\t\tdiv.style.setProperty(\"--dhx-gantt-task-progress-color\", task.progressColor);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tvar side = _render_leftside_content(task, cfg, templates, controlsMargin);\r\n\t\tif (side) div.appendChild(side);\r\n\r\n\t\tside = _render_rightside_content(task, cfg, templates, controlsMargin);\r\n\t\tif (side) div.appendChild(side);\r\n\r\n\t\tgantt._waiAria.setTaskBarAttr(task, div);\r\n\r\n\t\tvar state = gantt.getState();\r\n\r\n\t\tif (!gantt.isReadonly(task)) {\r\n\t\t\tif (cfg.drag_resize && !gantt.isSummaryTask(task) && taskType != cfg.types.milestone) {\r\n\t\t\t\t_render_pair(div, \"gantt_task_drag\", task, function (css) {\r\n\t\t\t\t\tvar el = document.createElement(\"div\");\r\n\t\t\t\t\tel.className = css;\r\n\t\t\t\t\treturn el;\r\n\t\t\t\t}, cfg);\r\n\t\t\t}\r\n\t\t\tif (cfg.drag_links && cfg.show_links) {\r\n\t\t\t\t_render_pair(div, \"gantt_link_control\", task, function (css) {\r\n\t\t\t\t\tvar outer = document.createElement(\"div\");\r\n\t\t\t\t\touter.className = css;\r\n\t\t\t\t\touter.style.cssText = [\r\n\t\t\t\t\t\t\"height:\" + height + 'px',\r\n\t\t\t\t\t\t\"line-height:\" + height + 'px'\r\n\t\t\t\t\t].join(\";\");\r\n\t\t\t\t\tvar inner = document.createElement(\"div\");\r\n\t\t\t\t\tinner.className = \"gantt_link_point\";\r\n\r\n\t\t\t\t\tvar showLinkPoints = false;\r\n\t\t\t\t\tif(state.link_source_id && cfg.touch){\r\n\t\t\t\t\t\tshowLinkPoints = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tinner.style.display = showLinkPoints ? \"block\" : \"\";\r\n\t\t\t\t\touter.appendChild(inner);\r\n\t\t\t\t\treturn outer;\r\n\t\t\t\t}, cfg, controlsMargin);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn div;\r\n\t}\r\n\r\n\tfunction _render_side_content(task, template, cssClass, marginStyle) {\r\n\t\tif (!template) return null;\r\n\r\n\t\tvar text = template(task.start_date, task.end_date, task);\r\n\t\tif (!text) return null;\r\n\t\tvar content = document.createElement(\"div\");\r\n\t\tcontent.className = \"gantt_side_content \" + cssClass;\r\n\t\tcontent.innerHTML = text;\r\n\t\tif(marginStyle){\r\n\t\t\tcontent.style[marginStyle.type] = Math.abs(marginStyle.value) + \"px\";\r\n\t\t}\r\n\t\treturn content;\r\n\t}\r\n\r\n\tfunction _render_leftside_content(task, cfg, templates, margin) {\r\n\t\tvar css = \"gantt_left \" + _get_link_crossing_css(!cfg.rtl ? true : false, task, cfg);\r\n\t\tvar marginStyle = null;\r\n\t\tif(margin){\r\n\t\t\tmarginStyle = { type: \"marginRight\", value: margin };\r\n\t\t}\r\n\t\treturn _render_side_content(task, templates.leftside_text, css, marginStyle);\r\n\t}\r\n\r\n\tfunction _render_rightside_content(task, cfg, templates, margin) {\r\n\t\tvar css = \"gantt_right \" + _get_link_crossing_css(!cfg.rtl ? false : true, task, cfg);\r\n\t\tvar marginStyle = null;\r\n\t\tif(margin){\r\n\t\t\tmarginStyle = { type: \"marginLeft\", value: margin };\r\n\t\t}\r\n\t\treturn _render_side_content(task, templates.rightside_text, css, marginStyle);\r\n\t}\r\n\r\n\tfunction _get_link_crossing_css(left, task) {\r\n\t\tvar cond = _get_conditions(left);\r\n\r\n\t\tfor (var i in cond) {\r\n\t\t\tvar links = task[i];\r\n\t\t\tfor (var ln = 0; ln < links.length; ln++) {\r\n\t\t\t\tvar link = gantt.getLink(links[ln]);\r\n\r\n\t\t\t\tfor (var tp = 0; tp < cond[i].length; tp++) {\r\n\t\t\t\t\tif (link.type == cond[i][tp]) {\r\n\t\t\t\t\t\treturn \"gantt_link_crossing\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\r\n\tfunction _render_task_content(task, width, templates) {\r\n\t\tvar content = document.createElement(\"div\");\r\n\t\tif (gantt.getTaskType(task.type) != gantt.config.types.milestone){\r\n\t\t\tcontent.innerHTML = templates.task_text(task.start_date, task.end_date, task);\r\n\t\t} else if(gantt.getTaskType(task.type) == gantt.config.types.milestone && width) {\r\n\t\t\tcontent.style.height = content.style.width = width + \"px\";\r\n\t\t}\r\n\t\tcontent.className = \"gantt_task_content\";\r\n\t\t//content.style.width = width + 'px';\r\n\t\treturn content;\r\n\t}\r\n\r\n\tfunction _render_task_progress(task, element, maxWidth, cfg, templates) {\r\n\t\tvar done = task.progress * 1 || 0;\r\n\r\n\t\tmaxWidth = Math.max(maxWidth - 2, 0);//2px for borders\r\n\t\tvar pr = document.createElement(\"div\");\r\n\t\tvar width = Math.round(maxWidth * done);\r\n\r\n\t\twidth = Math.min(maxWidth, width);\r\n\r\n\t\tpr.style.width = width + 'px';\r\n\t\tpr.className = \"gantt_task_progress\";\r\n\t\tpr.innerHTML = templates.progress_text(task.start_date, task.end_date, task);\r\n\r\n\t\tif(cfg.rtl){\r\n\t\t\tpr.style.position = \"absolute\";\r\n\t\t\tpr.style.right = \"0px\";\r\n\t\t}\r\n\r\n\t\tvar wrapper = document.createElement(\"div\");\r\n\t\twrapper.className = \"gantt_task_progress_wrapper\";\r\n\t\twrapper.appendChild(pr);\r\n\t\telement.appendChild(wrapper);\r\n\r\n\t\tif (gantt.config.drag_progress && !gantt.isReadonly(task)) {\r\n\t\t\tvar drag = document.createElement(\"div\");\r\n\r\n\t\t\tvar markerPos = width;\r\n\t\t\tif(cfg.rtl){\r\n\t\t\t\tmarkerPos = maxWidth - width;\r\n\t\t\t}\r\n\r\n\t\t\tdrag.style.left = markerPos + 'px';\r\n\t\t\tdrag.className = \"gantt_task_progress_drag\";\r\n\t\t\tdrag.innerHTML = `\r\n\r\n`;\r\n\t\t\tpr.appendChild(drag);\r\n\t\t\telement.appendChild(drag);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _get_conditions(leftside) {\r\n\t\tif (leftside) {\r\n\t\t\treturn {\r\n\t\t\t\t$source: [\r\n\t\t\t\t\tgantt.config.links.start_to_start\r\n\t\t\t\t],\r\n\t\t\t\t$target: [\r\n\t\t\t\t\tgantt.config.links.start_to_start,\r\n\t\t\t\t\tgantt.config.links.finish_to_start\r\n\t\t\t\t]\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\treturn {\r\n\t\t\t\t$source: [\r\n\t\t\t\t\tgantt.config.links.finish_to_start,\r\n\t\t\t\t\tgantt.config.links.finish_to_finish\r\n\t\t\t\t],\r\n\t\t\t\t$target: [\r\n\t\t\t\t\tgantt.config.links.finish_to_finish\r\n\t\t\t\t]\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tfunction _combine_item_class(basic, template, itemId, view) {\r\n\t\tvar cfg = view.$getConfig();\r\n\t\tvar css = [basic];\r\n\t\tif (template)\r\n\t\t\tcss.push(template);\r\n\r\n\t\tvar state = gantt.getState();\r\n\r\n\t\tvar task = gantt.getTask(itemId);\r\n\r\n\t\tif (gantt.getTaskType(task.type) == cfg.types.milestone) {\r\n\t\t\tcss.push(\"gantt_milestone\");\r\n\t\t}else if (gantt.getTaskType(task.type) == cfg.types.project) {\r\n\t\t\tcss.push(\"gantt_project\");\r\n\t\t}\r\n\r\n\t\tcss.push(\"gantt_bar_\" + gantt.getTaskType(task.type));\r\n\r\n\r\n\t\tif (gantt.isSummaryTask(task))\r\n\t\t\tcss.push(\"gantt_dependent_task\");\r\n\r\n\t\tif (gantt.isSplitTask(task) && ((cfg.open_split_tasks && !task.$open) || !cfg.open_split_tasks)) {\r\n\t\t\tcss.push(\"gantt_split_parent\");\r\n\t\t}\r\n\r\n\t\tif (cfg.select_task && gantt.isSelectedTask(itemId)) {\r\n\t\t\tcss.push(\"gantt_selected\");\r\n\t\t}\r\n\r\n\t\tif (itemId == state.drag_id) {\r\n\t\t\tcss.push(\"gantt_drag_\" + state.drag_mode);\r\n\t\t\tif (state.touch_drag) {\r\n\t\t\t\tcss.push(\"gantt_touch_\" + state.drag_mode);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (state.link_source_id == itemId){\r\n\t\t\tcss.push(\"gantt_link_source\");\r\n\t\t\tif(state.link_from_start) {\r\n\t\t\t\tcss.push(\"gantt_link_from_start\");\r\n\t\t\t}else{\r\n\t\t\t\tcss.push(\"gantt_link_from_end\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (state.link_target_id == itemId)\r\n\t\t\tcss.push(\"gantt_link_target\");\r\n\r\n\r\n\t\tif (cfg.highlight_critical_path && gantt.isCriticalTask) {\r\n\t\t\tif (gantt.isCriticalTask(task))\r\n\t\t\t\tcss.push(\"gantt_critical_task\");\r\n\t\t}\r\n\r\n\t\tif (state.link_landing_area &&\r\n\t\t\t(state.link_target_id && state.link_source_id) &&\r\n\t\t\t(state.link_target_id != state.link_source_id) &&\r\n\t\t\t(state.link_target_id == itemId || state.link_source_id == itemId)) {\r\n\r\n\t\t\tvar from_id = state.link_source_id;\r\n\t\t\tvar from_start = state.link_from_start;\r\n\t\t\tvar to_start = state.link_to_start;\r\n\r\n\t\t\tvar allowDrag = gantt.isLinkAllowed(from_id, itemId, from_start, to_start);\r\n\r\n\t\t\tvar dragClass = \"\";\r\n\t\t\tif (allowDrag) {\r\n\t\t\t\tif (to_start)\r\n\t\t\t\t\tdragClass = \"link_start_allow\";\r\n\t\t\t\telse\r\n\t\t\t\t\tdragClass = \"link_finish_allow\";\r\n\t\t\t} else {\r\n\t\t\t\tif (to_start)\r\n\t\t\t\t\tdragClass = \"link_start_deny\";\r\n\t\t\t\telse\r\n\t\t\t\t\tdragClass = \"link_finish_deny\";\r\n\t\t\t}\r\n\t\t\tcss.push(dragClass);\r\n\t\t}\r\n\t\treturn css.join(\" \");\r\n\t}\r\n\r\n\tfunction _render_pair(parent, css, task, content, config, margin) {\r\n\t\tvar state = gantt.getState();\r\n\t\tvar className, element;\r\n\t\tif (+task.start_date >= +state.min_date) {\r\n\t\t\tclassName = [css, config.rtl ? \"task_right\" : \"task_left\", \"task_start_date\"];\r\n\t\t\telement = content(className.join(\" \"));\r\n\t\t\telement.setAttribute(\"data-bind-property\", \"start_date\");\r\n\t\t\tif(margin){\r\n\t\t\t\telement.style.marginLeft = margin + \"px\";\r\n\t\t\t}\r\n\t\t\tparent.appendChild(element);\r\n\t\t}\r\n\r\n\t\tif (+task.end_date <= +state.max_date){\r\n\t\t\tclassName = [css, config.rtl ? \"task_left\" : \"task_right\", \"task_end_date\"];\r\n\t\t\telement = content(className.join(\" \"));\r\n\t\t\telement.setAttribute(\"data-bind-property\", \"end_date\");\r\n\t\t\tif(margin){\r\n\t\t\t\telement.style.marginRight = margin + \"px\";\r\n\t\t\t}\r\n\t\t\tparent.appendChild(element);\r\n\t\t}\r\n\r\n\t}\r\n\r\n\treturn _render_task_element;\r\n}\r\n\r\nexport default createTaskRenderer;","import isInViewPort from \"./viewport/is_bar_in_viewport\";\r\nimport getVisibleRange from \"./viewport/get_visible_bars_range\";\r\nimport createBaseBarRender from \"./task_bar_render\";\r\n\r\nexport default function createTaskRenderer(gantt){\r\n\tvar defaultRender = createBaseBarRender(gantt);\r\n\treturn {\r\n\t\trender: defaultRender,\r\n\t\tupdate: null,\r\n\t\t//getRectangle: getBarRectangle\r\n\t\tisInViewPort: isInViewPort,\r\n\t\tgetVisibleRange: getVisibleRange\r\n\t};\r\n};","export default function () {\r\n // eslint-disable-next-line no-console\r\n console.error(\"You are trying to use a Pro feature that is not available in the GPL version.\");\r\n return {\r\n render: function (){},\r\n isInViewPort: function (){},\r\n getVisibleRange: function (){}\r\n };\r\n};\r\n","export default function(item, view, config){\r\n\treturn {\r\n\t\ttop: view.getItemTop(item.id),\r\n\t\theight: view.getItemHeight(item.id),\r\n\t\tleft: 0,\r\n\t\tright: Infinity\r\n\t};\r\n};","export default function getVisibleCellsRange(scale, viewport){\r\n\tvar firstCellIndex = 0;\r\n\tvar lastCellIndex = scale.left.length - 1;\r\n\tif(viewport){\r\n\t\tfor(var i = 0; i < scale.left.length; i++){\r\n\t\t\tvar left = scale.left[i];\r\n\t\t\tif(left < viewport.x){\r\n\t\t\t\tfirstCellIndex = i;\r\n\t\t\t}\r\n\t\t\tif(left > viewport.x_end){\r\n\t\t\t\tlastCellIndex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn {\r\n\t\tstart: firstCellIndex,\r\n\t\tend: lastCellIndex\r\n\t};\r\n};","import isLegacyRender from \"../is_legacy_smart_render\";\r\n\r\nexport default function isColumnVisible(columnIndex, scale, viewPort, gantt){\r\n\tvar width = scale.width[columnIndex];\r\n\tif(width <= 0){\r\n\t\treturn false;\r\n\t}\r\n\tif(!gantt.config.smart_rendering || isLegacyRender(gantt)){\r\n\t\treturn true;\r\n\t}\r\n\tvar cellLeftCoord = scale.left[columnIndex] - width;\r\n\tvar cellRightCoord = scale.left[columnIndex] + width;\r\n\treturn (cellLeftCoord <= viewPort.x_end && cellRightCoord >= viewPort.x);//do not render skipped columns\r\n};","export default function (items, gantt){\r\n\tvar placeholderConfig = gantt.config.timeline_placeholder;\r\n\titems = items || [];\r\n\tif (placeholderConfig && items.filter(e => e.id === 'timeline_placeholder_task').length === 0){\r\n\t\tvar state = gantt.getState();\r\n\t\tvar lastTaskId = null;\r\n\t\tvar start_date = state.min_date;\r\n\t\tvar end_date = state.max_date;\r\n\t\tif (items.length){\r\n\t\t\tlastTaskId = items[items.length -1].id;\r\n\t\t}\r\n\t\tvar placeholderTask = {\r\n\t\t\tstart_date: start_date, \r\n\t\t\tend_date: end_date, \r\n\t\t\trow_height: placeholderConfig.height || 0,\r\n\t\t\tid: \"timeline_placeholder_task\", \r\n\t\t\tunscheduled: true,\r\n\t\t\tlastTaskId: lastTaskId, \r\n\t\t\tcalendar_id: placeholderConfig.calendar || \"global\",\r\n\t\t\t$source:[], \r\n\t\t\t$target: []\r\n\t\t};\r\n\t\titems.push(placeholderTask);\r\n\t}\r\n};","import isInViewPort from \"./viewport/is_link_in_viewport\";\r\nimport getVisibleRange from \"./viewport/factory/get_visible_link_range\";\r\nimport { childrenHaveBaselines, getMaxParentHeight } from \"./baseline_helper\";\r\n\r\n\r\nfunction createLinkRender(gantt){\r\n\r\nfunction _render_link_element(link, view, config) {\r\n\tvar source = gantt.getTask(link.source);\r\n\tif(source.hide_bar){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar target = gantt.getTask(link.target);\r\n\tif(target.hide_bar){\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar pt = path_builder.get_endpoint(link, view, source, target);\r\n\tvar dy = pt.e_y - pt.y;\r\n\tvar dx = pt.e_x - pt.x;\r\n\tif(!dx && !dy){\r\n\t\treturn null;\r\n\t}\r\n\r\n\r\n\tvar dots = path_builder.get_points(link, view, source, target);\r\n\tconst lines = drawer.get_lines(dots, view);\r\n\r\n\tconst shapes = transform_lines_to_shapes(lines.filter(l => l.size > 0), config);\r\n \r\n\tconst div = render_shapes(shapes, view, link, config);\r\n\r\n\r\n\tvar css = \"gantt_task_link\";\r\n\r\n\tif (link.color) {\r\n\t\tcss += \" gantt_link_inline_color\";\r\n\t}\r\n\tvar cssTemplate = gantt.templates.link_class ? gantt.templates.link_class(link) : \"\";\r\n\tif (cssTemplate) {\r\n\t\tcss += \" \" + cssTemplate;\r\n\t}\r\n\r\n\tif (config.highlight_critical_path && gantt.isCriticalLink) {\r\n\t\tif (gantt.isCriticalLink(link))\r\n\t\t\tcss += \" gantt_critical_link\";\r\n\t}\r\n\r\n\tdiv.className = css;\r\n\r\n\tif(view.$config.link_attribute){\r\n\t\tdiv.setAttribute(view.$config.link_attribute, link.id);\r\n\t\tdiv.setAttribute(\"link_id\", link.id);\r\n\t}\r\n\tif (link.color) {\r\n\t\tdiv.style.setProperty(\"--dhx-gantt-link-background\", link.color);\r\n\t}\r\n\r\n\tgantt._waiAria.linkAttr(link, div);\r\n\r\n\treturn div;\r\n}\r\n\r\n\tfunction render_shapes(shapes, view, link, config) {\r\n\t\tconst container = document.createElement(\"div\");\r\n\r\n\t\tshapes.forEach(shape => {\r\n\t\t\tlet element;\r\n\t\t\tif (shape.type === 'line') {\r\n\t\t\t\telement = drawer.render_line(shape.data, null, view, link.source);\r\n\t\t\t} else if (shape.type === 'corner') {\r\n\t\t\t\telement = drawer.render_corner(shape.data, view);\r\n\t\t\t}else if (shape.type === 'arrow') {\r\n\t\t\t\telement = drawer.render_arrow(shape.data, config);\r\n\t\t\t}\r\n\r\n\t\t\tcontainer.appendChild(element);\r\n\t\t});\r\n\r\n\t\treturn container;\r\n\t}\r\n\r\n\tfunction transform_lines_to_shapes(lines, config) {\r\n\t\tconst radius = config.link_radius || 4;\r\n\t\tconst arrowSize = config.link_arrow_size || 6; // Arrow size from config\r\n\t\tconst shapes = [];\r\n\t\r\n\t\tfor (let i = 0; i < lines.length; i++) {\r\n\t\t\tconst line = lines[i];\r\n\t\t\tconst nextLine = lines[i + 1];\r\n\t\r\n\t\t\tif (!nextLine || config.link_radius <= 1) {\r\n\t\t\t\tshapes.push({ type: 'line', data: line });\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\r\n\t\t\tif (line.direction !== nextLine.direction) {\r\n\t\t\t\tif(line.size < radius || nextLine.size < radius){\r\n\t\t\t\t\tshapes.push({ type: 'line', data: line });\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tline.size -= radius;\r\n\t\t\t\tshapes.push({ type: 'line', data: line });\r\n\t\r\n\t\t\t\tlet cornerX = line.x;\r\n\t\t\t\tlet cornerY = line.y - config.link_line_width / 2;\r\n\t\r\n\t\t\t\tswitch (line.direction) {\r\n\t\t\t\t\tcase 'right':\r\n\t\t\t\t\t\tcornerX += line.size;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'left':\r\n\t\t\t\t\t\tcornerX -= line.size;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'down':\r\n\t\t\t\t\t\tcornerY += line.size;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'up':\r\n\t\t\t\t\t\tcornerY -= line.size;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\r\n\t\t\t\tconst corner = {\r\n\t\t\t\t\tx: cornerX,\r\n\t\t\t\t\ty: cornerY,\r\n\t\t\t\t\tdirection: { from: line.direction, to: nextLine.direction },\r\n\t\t\t\t\tradius\r\n\t\t\t\t};\r\n\t\t\t\tshapes.push({ type: 'corner', data: corner });\r\n\t\r\n\t\t\t\tswitch (nextLine.direction) {\r\n\t\t\t\t\tcase 'right':\r\n\t\t\t\t\t\tnextLine.x += radius;\r\n\t\t\t\t\t\tnextLine.size -= radius;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'left':\r\n\t\t\t\t\t\tnextLine.x -= radius;\r\n\t\t\t\t\t\tnextLine.size -= radius;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'down':\r\n\t\t\t\t\t\tnextLine.y += radius;\r\n\t\t\t\t\t\tnextLine.size -= radius;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'up':\r\n\t\t\t\t\t\tnextLine.y -= radius;\r\n\t\t\t\t\t\tnextLine.size -= radius;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tshapes.push({ type: 'line', data: line });\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tconst lastLine = lines[lines.length - 1];\r\n\t\r\n\t\tif (lastLine.direction === 'right' || lastLine.direction === 'left') {\r\n\t\t\tlastLine.size -= arrowSize*3/4; \r\n\t\r\n\t\t\tlet arrowX = lastLine.direction === 'right' ? (lastLine.x + lastLine.size) : lastLine.x - lastLine.size - arrowSize/2;\r\n\t\t\tlet arrowY = lastLine.y - (config.link_line_width / 2) - (arrowSize / 2) + 1;\r\n\t\r\n\t\t\tif(lastLine.direction === 'left'){\r\n\t\t\t\tarrowY -= 1;// left pointing arrows for some reason need adjustments\r\n\t\t\t\tarrowX -= 2;\r\n\t\t\t}else{\r\n\t\t\t\tarrowX -= 1;\r\n\t\t\t}\r\n\t\t\tconst arrow = {\r\n\t\t\t\tx: arrowX,\r\n\t\t\t\ty: arrowY,\r\n\t\t\t\tsize: arrowSize,\r\n\t\t\t\tdirection: lastLine.direction\r\n\t\t\t};\r\n\t\r\n\t\t\tshapes.push({ type: 'line', data: lastLine });\r\n\t\t\tshapes.push({ type: 'arrow', data: arrow });\r\n\t\t} else {\r\n\t\t\tshapes.push({ type: 'line', data: lastLine });\r\n\t\t}\r\n\t\r\n\t\treturn shapes;\r\n\t}\r\n\t\r\n\r\n\r\nvar drawer = {\r\n\tcurrent_pos: null,\r\n\tdirs: {\"left\": 'left', \"right\": 'right', \"up\": 'up', \"down\": 'down'},\r\n\tpath: [],\r\n\tclear: function () {\r\n\t\tthis.current_pos = null;\r\n\t\tthis.path = [];\r\n\t},\r\n\tpoint: function (pos) {\r\n\t\tthis.current_pos = gantt.copy(pos);\r\n\t},\r\n\tget_lines: function (dots) {\r\n\t\tthis.clear();\r\n\t\tthis.point(dots[0]);\r\n\t\tfor (var i = 1; i < dots.length; i++) {\r\n\t\t\tthis.line_to(dots[i]);\r\n\t\t}\r\n\t\treturn this.get_path();\r\n\t},\r\n\tline_to: function (pos) {\r\n\t\tvar next = gantt.copy(pos);\r\n\t\tvar prev = this.current_pos;\r\n\r\n\t\tvar line = this._get_line(prev, next);\r\n\t\tthis.path.push(line);\r\n\t\tthis.current_pos = next;\r\n\t},\r\n\tget_path: function () {\r\n\t\treturn this.path;\r\n\t},\r\n\tget_wrapper_sizes: function (v, view, itemId) {\r\n\t\tvar config = view.$getConfig();\r\n\t\tvar res,\r\n\t\t\twrapper_size = config.link_wrapper_width,\r\n\t\t\ty = v.y - (wrapper_size) / 2;\r\n\t\tswitch (v.direction) {\r\n\t\t\tcase this.dirs.left:\r\n\t\t\t\tres = {\r\n\t\t\t\t\ttop: y,\r\n\t\t\t\t\theight: wrapper_size,\r\n\t\t\t\t\tlineHeight: wrapper_size,\r\n\t\t\t\t\tleft: v.x - v.size - wrapper_size / 2,\r\n\t\t\t\t\twidth: v.size + wrapper_size\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.dirs.right:\r\n\t\t\t\tres = {\r\n\t\t\t\t\ttop: y,\r\n\t\t\t\t\tlineHeight: wrapper_size,\r\n\t\t\t\t\theight: wrapper_size,\r\n\t\t\t\t\tleft: v.x - wrapper_size / 2,\r\n\t\t\t\t\twidth: v.size + wrapper_size\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.dirs.up:\r\n\t\t\t\tres = {\r\n\t\t\t\t\ttop: y - v.size,\r\n\t\t\t\t\tlineHeight: v.size + wrapper_size,\r\n\t\t\t\t\theight: v.size + wrapper_size,\r\n\t\t\t\t\tleft: v.x - wrapper_size / 2,\r\n\t\t\t\t\twidth: wrapper_size\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.dirs.down:\r\n\t\t\t\tres = {\r\n\t\t\t\t\ttop: y /*- wrapper_size/2*/,\r\n\t\t\t\t\tlineHeight: v.size + wrapper_size,\r\n\t\t\t\t\theight: v.size + wrapper_size,\r\n\t\t\t\t\tleft: v.x - wrapper_size / 2,\r\n\t\t\t\t\twidth: wrapper_size\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn res;\r\n\t},\r\n\tget_line_sizes: function (v, view) {\r\n\t\tvar config = view.$getConfig();\r\n\t\tvar res,\r\n\t\t\tline_size = config.link_line_width,\r\n\t\t\twrapper_size = config.link_wrapper_width,\r\n\t\t\tsize = v.size + line_size;\r\n\t\tswitch (v.direction) {\r\n\t\t\tcase this.dirs.left:\r\n\t\t\tcase this.dirs.right:\r\n\t\t\t\tres = {\r\n\t\t\t\t\theight: line_size,\r\n\t\t\t\t\twidth: size,\r\n\t\t\t\t\tmarginTop: (wrapper_size - line_size) / 2,\r\n\t\t\t\t\tmarginLeft: (wrapper_size - line_size) / 2\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\tcase this.dirs.up:\r\n\t\t\tcase this.dirs.down:\r\n\t\t\t\tres = {\r\n\t\t\t\t\theight: size,\r\n\t\t\t\t\twidth: line_size,\r\n\t\t\t\t\tmarginTop: (wrapper_size - line_size) / 2,\r\n\t\t\t\t\tmarginLeft: (wrapper_size - line_size) / 2\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\r\n\t\treturn res;\r\n\t},\r\n\trender_line: function (v, end, view, itemId) {\r\n\t\tvar pos = this.get_wrapper_sizes(v, view, itemId);\r\n\t\tvar wrapper = document.createElement(\"div\");\r\n\t\twrapper.style.cssText = [\r\n\t\t\t\"top:\" + pos.top + \"px\",\r\n\t\t\t\"left:\" + pos.left + \"px\",\r\n\t\t\t\"height:\" + pos.height + \"px\",\r\n\t\t\t\"width:\" + pos.width + \"px\"\r\n\t\t].join(';');\r\n\t\twrapper.className = \"gantt_line_wrapper\";\r\n\r\n\t\tvar innerPos = this.get_line_sizes(v, view);\r\n\t\tvar inner = document.createElement(\"div\");\r\n\t\tinner.style.cssText = [\r\n\t\t\t\"height:\" + innerPos.height + \"px\",\r\n\t\t\t\"width:\" + innerPos.width + \"px\",\r\n\t\t\t\"margin-top:\" + innerPos.marginTop + \"px\",\r\n\t\t\t\"margin-left:\" + innerPos.marginLeft + \"px\"\r\n\t\t].join(\";\");\r\n\r\n\t\tinner.className = \"gantt_link_line_\" + v.direction;\r\n\t\twrapper.appendChild(inner);\r\n\r\n\t\treturn wrapper;\r\n\t},\r\n\r\n\trender_corner: function (corner, view) {\r\n\t\tconst radius = corner.radius;\r\n\t\tconst config = view.$getConfig();\r\n\t\tconst lineWidth = config.link_line_width || 2;\r\n\t\tconst cornerDiv = document.createElement(\"div\");\r\n\t\r\n\t\tcornerDiv.classList.add(\"gantt_link_corner\");\r\n\t\tcornerDiv.classList.add(`gantt_link_corner_${corner.direction.from}_${corner.direction.to}`);\r\n\t\r\n\t\tcornerDiv.style.width = `${radius}px`;\r\n\t\tcornerDiv.style.height = `${radius}px`;\r\n\t\r\n\t\tlet borderVertical;\r\n\t\tlet borderHorizontal;\r\n\r\n\t\tif (corner.direction.from === 'right' && corner.direction.to === 'down') {\r\n\t\t\tborderVertical = \"Right\";\r\n\t\t\tborderHorizontal = \"Top\";\r\n\t\t\tcornerDiv.style.left = `${corner.x - config.link_line_width/2}px`;\r\n\t\t\tcornerDiv.style.top = `${corner.y}px`;\r\n\t\t} else if (corner.direction.from === 'down' && corner.direction.to === 'right') {\r\n\t\t\tborderVertical = \"Left\";\r\n\t\t\tborderHorizontal = \"Bottom\";\r\n\t\t\tcornerDiv.style.left = `${corner.x - config.link_line_width/2}px`;\r\n\t\t\tcornerDiv.style.top = `${corner.y}px`;\r\n\t\t} else if (corner.direction.from === 'right' && corner.direction.to === 'up') {\r\n\t\t\tborderVertical = \"Right\";\r\n\t\t\tborderHorizontal = \"Bottom\";\r\n\t\t\tcornerDiv.style.left = `${corner.x - config.link_line_width/2}px`;\r\n\t\t\tcornerDiv.style.top = `${corner.y - radius}px`;\r\n\t\t} else if (corner.direction.from === 'up' && corner.direction.to === 'right') {\r\n\t\t\tborderVertical = \"Left\";\r\n\t\t\tborderHorizontal = \"Top\";\r\n\t\t\tcornerDiv.style.left = `${corner.x - config.link_line_width/2}px`;\r\n\t\t\tcornerDiv.style.top = `${corner.y - radius}px`;\r\n\t\t} else if (corner.direction.from === 'left' && corner.direction.to === 'down') {\r\n\t\t\tborderVertical = \"Left\";\r\n\t\t\tborderHorizontal = \"Top\";\r\n\t\t\tcornerDiv.style.left = `${corner.x - radius - config.link_line_width/2}px`;\r\n\t\t\tcornerDiv.style.top = `${corner.y}px`;\r\n\t\t} else if (corner.direction.from === 'down' && corner.direction.to === 'left') {\r\n\t\t\tborderVertical = \"Right\";\r\n\t\t\tborderHorizontal = \"Bottom\";\r\n\t\t\tcornerDiv.style.left = `${corner.x - radius - config.link_line_width/2}px`;\r\n\t\t\tcornerDiv.style.top = `${corner.y}px`;\r\n\t\t} else if (corner.direction.from === 'left' && corner.direction.to === 'up') {\r\n\t\t\tborderVertical = \"Left\";\r\n\t\t\tborderHorizontal = \"Bottom\";\r\n\t\t\tcornerDiv.style.left = `${corner.x - radius - config.link_line_width/2}px`;\r\n\t\t\tcornerDiv.style.top = `${corner.y - radius}px`;\r\n\t\t} else if (corner.direction.from === 'up' && corner.direction.to === 'left') {\r\n\t\t\tborderVertical = \"Right\";\r\n\t\t\tborderHorizontal = \"Top\";\r\n\t\t\tcornerDiv.style.left = `${corner.x - radius - config.link_line_width/2}px`;\r\n\t\t\tcornerDiv.style.top = `${corner.y - radius}px`;\r\n\t\t}\r\n\r\n\t\tcornerDiv.style[`border${borderHorizontal}Width`] = `${lineWidth}px`;\r\n\t\tcornerDiv.style[`border${borderVertical}Width`] = `${lineWidth}px`;\r\n\t\tcornerDiv.style[`border${borderVertical}Style`] = `solid`;\r\n\t\tcornerDiv.style[`border${borderHorizontal}Style`] = `solid`;\r\n\t\tcornerDiv.style[`border${borderHorizontal}${borderVertical}Radius`] = `${radius}px`;\r\n\r\n\t\r\n\t\treturn cornerDiv;\r\n\t},\r\n\r\n\trender_arrow(arrow, config) {\r\n\t\tvar div = document.createElement(\"div\");\r\n\t\tvar top = arrow.y;\r\n\t\tvar left = arrow.x;\r\n\t\r\n\t\tvar size = config.link_arrow_size;\r\n\t\tdiv.style.setProperty(\"--dhx-gantt-icon-size\", `${size}px`);\r\n\t\r\n\t\tvar className = \"gantt_link_arrow gantt_link_arrow_\" + arrow.direction;\r\n\r\n\t\tdiv.style.top = top + \"px\";\r\n\t\tdiv.style.left = left + 'px';\r\n\t\tdiv.className = className;\r\n\t\r\n\t\treturn div;\r\n\t},\r\n\t\r\n\t_get_line: function (from, to) {\r\n\t\tvar direction = this.get_direction(from, to);\r\n\t\tvar vect = {\r\n\t\t\tx: from.x,\r\n\t\t\ty: from.y,\r\n\t\t\tdirection: this.get_direction(from, to)\r\n\t\t};\r\n\t\tif (direction == this.dirs.left || direction == this.dirs.right) {\r\n\t\t\tvect.size = Math.abs(from.x - to.x);\r\n\t\t} else {\r\n\t\t\tvect.size = Math.abs(from.y - to.y);\r\n\t\t}\r\n\t\treturn vect;\r\n\t},\r\n\tget_direction: function (from, to) {\r\n\t\tvar direction = 0;\r\n\t\tif (to.x < from.x) {\r\n\t\t\tdirection = this.dirs.left;\r\n\t\t} else if (to.x > from.x) {\r\n\t\t\tdirection = this.dirs.right;\r\n\t\t} else if (to.y > from.y) {\r\n\t\t\tdirection = this.dirs.down;\r\n\t\t} else {\r\n\t\t\tdirection = this.dirs.up;\r\n\t\t}\r\n\t\treturn direction;\r\n\t}\r\n\r\n};\r\n\r\nvar path_builder = {\r\n\r\n\tpath: [],\r\n\tclear: function () {\r\n\t\tthis.path = [];\r\n\t},\r\n\tcurrent: function () {\r\n\t\treturn this.path[this.path.length - 1];\r\n\t},\r\n\tpoint: function (next) {\r\n\t\tif (!next)\r\n\t\t\treturn this.current();\r\n\r\n\t\tthis.path.push(gantt.copy(next));\r\n\t\treturn next;\r\n\t},\r\n\tpoint_to: function (direction, diff, point) {\r\n\t\tif (!point)\r\n\t\t\tpoint = gantt.copy(this.point());\r\n\t\telse\r\n\t\t\tpoint = {x: point.x, y: point.y};\r\n\t\tvar dir = drawer.dirs;\r\n\t\tswitch (direction) {\r\n\t\t\tcase (dir.left):\r\n\t\t\t\tpoint.x -= diff;\r\n\t\t\t\tbreak;\r\n\t\t\tcase (dir.right):\r\n\t\t\t\tpoint.x += diff;\r\n\t\t\t\tbreak;\r\n\t\t\tcase (dir.up):\r\n\t\t\t\tpoint.y -= diff;\r\n\t\t\t\tbreak;\r\n\t\t\tcase (dir.down):\r\n\t\t\t\tpoint.y += diff;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn this.point(point);\r\n\t},\r\n\tget_points: function (link, view, source, target) {\r\n\t\tvar pt = this.get_endpoint(link, view, source, target);\r\n\t\tvar xy = gantt.config;\r\n\r\n\t\tvar dy = pt.e_y - pt.y;\r\n\t\tvar dx = pt.e_x - pt.x;\r\n\r\n\t\tvar dir = drawer.dirs;\r\n\r\n\t\tvar rowHeight = view.getItemHeight(link.source);\r\n\r\n\t\tthis.clear();\r\n\t\tthis.point({x: pt.x, y: pt.y});\r\n\r\n\t\tvar shiftX = 2 * xy.link_arrow_size;//just random size for first line\r\n\t\tvar lineType = this.get_line_type(link, view.$getConfig());\r\n\r\n\t\tvar forward = (pt.e_x > pt.x);\r\n\t\tif (lineType.from_start && lineType.to_start) {\r\n\t\t\tthis.point_to(dir.left, shiftX);\r\n\t\t\tif (forward) {\r\n\t\t\t\tthis.point_to(dir.down, dy);\r\n\t\t\t\tthis.point_to(dir.right, dx);\r\n\t\t\t} else {\r\n\t\t\t\tthis.point_to(dir.right, dx);\r\n\t\t\t\tthis.point_to(dir.down, dy);\r\n\t\t\t}\r\n\t\t\tthis.point_to(dir.right, shiftX);\r\n\r\n\t\t} else if (!lineType.from_start && lineType.to_start) {\r\n\t\t\tforward = (pt.e_x > (pt.x + 2 * shiftX));\r\n\t\t\tthis.point_to(dir.right, shiftX);\r\n\t\t\tif (forward) {\r\n\t\t\t\tdx -= shiftX;\r\n\t\t\t\tthis.point_to(dir.down, dy);\r\n\t\t\t\tthis.point_to(dir.right, dx);\r\n\t\t\t} else {\r\n\t\t\t\tdx -= 2 * shiftX;\r\n\t\t\t\tvar sign = dy > 0 ? 1 : -1;\r\n\r\n\t\t\t\tthis.point_to(dir.down, sign * (rowHeight / 2));\r\n\t\t\t\tthis.point_to(dir.right, dx);\r\n\t\t\t\tthis.point_to(dir.down, sign * ( Math.abs(dy) - (rowHeight / 2)));\r\n\t\t\t\tthis.point_to(dir.right, shiftX);\r\n\t\t\t}\r\n\r\n\t\t} else if (!lineType.from_start && !lineType.to_start) {\r\n\t\t\tthis.point_to(dir.right, shiftX);\r\n\t\t\tif (forward) {\r\n\t\t\t\tthis.point_to(dir.right, dx);\r\n\t\t\t\tthis.point_to(dir.down, dy);\r\n\t\t\t} else {\r\n\t\t\t\tthis.point_to(dir.down, dy);\r\n\t\t\t\tthis.point_to(dir.right, dx);\r\n\t\t\t}\r\n\t\t\tthis.point_to(dir.left, shiftX);\r\n\t\t} else if (lineType.from_start && !lineType.to_start) {\r\n\r\n\t\t\tforward = (pt.e_x > (pt.x - 2 * shiftX));\r\n\t\t\tthis.point_to(dir.left, shiftX);\r\n\r\n\t\t\tif (!forward) {\r\n\t\t\t\tdx += shiftX;\r\n\t\t\t\tthis.point_to(dir.down, dy);\r\n\t\t\t\tthis.point_to(dir.right, dx);\r\n\t\t\t} else {\r\n\t\t\t\tdx += 2 * shiftX;\r\n\t\t\t\tvar sign = dy > 0 ? 1 : -1;\r\n\t\t\t\tthis.point_to(dir.down, sign * (rowHeight / 2));\r\n\t\t\t\tthis.point_to(dir.right, dx);\r\n\t\t\t\tthis.point_to(dir.down, sign * ( Math.abs(dy) - (rowHeight / 2)));\r\n\t\t\t\tthis.point_to(dir.left, shiftX);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn this.path;\r\n\t},\r\n\tget_line_type: function(link, config){\r\n\t\tvar types = config.links;\r\n\t\tvar from_start = false, to_start = false;\r\n\t\tif (link.type == types.start_to_start) {\r\n\t\t\tfrom_start = to_start = true;\r\n\t\t} else if (link.type == types.finish_to_finish) {\r\n\t\t\tfrom_start = to_start = false;\r\n\t\t} else if (link.type == types.finish_to_start) {\r\n\t\t\tfrom_start = false;\r\n\t\t\tto_start = true;\r\n\t\t} else if (link.type == types.start_to_finish) {\r\n\t\t\tfrom_start = true;\r\n\t\t\tto_start = false;\r\n\t\t} else {\r\n\t\t\tgantt.assert(false, \"Invalid link type\");\r\n\t\t}\r\n\r\n\t\tif(config.rtl){\r\n\t\t\tfrom_start = !from_start;\r\n\t\t\tto_start = !to_start;\r\n\t\t}\r\n\r\n\t\treturn {from_start: from_start, to_start: to_start};\r\n\t},\r\n\r\n\tget_endpoint: function (link, view, source, target) {\r\n\t\tvar config = view.$getConfig();\r\n\r\n\t\tvar lineType = this.get_line_type(link, config);\r\n\t\tvar from_start = lineType.from_start,\r\n\t\t\tto_start = lineType.to_start;\r\n\r\n\t\tvar from = getMilestonePosition(source, view, config),\r\n\t\t\tto = getMilestonePosition(target, view, config);\r\n\r\n\t\treturn {\r\n\t\t\tx: from_start ? from.left : (from.left + from.width),\r\n\t\t\te_x: to_start ? to.left : (to.left + to.width),\r\n\t\t\ty: from.top + (from.rowHeight/2) - 1,\r\n\t\t\te_y: to.top + (to.rowHeight/2) - 1\r\n\t\t};\r\n\t}\r\n};\r\n\r\nfunction getMilestonePosition(task, view, config){\r\n\tvar pos = view.getItemPosition(task);\r\n\r\n\t// GS-2270: Link to the split children shouldn't exceed the parent row height\r\n\tlet splitParams = getMaxParentHeight(gantt, view, task);\r\n\tlet maxHeight = splitParams.maxHeight;\r\n\r\n\tlet splitChild = splitParams.splitChild;\r\n\tconst baselinesOnDifferentRow = gantt.config.baselines !== false && (gantt.config.baselines.render_mode == \"separateRow\" || gantt.config.baselines.render_mode == \"individualRow\");\r\n\tconst baselines = baselinesOnDifferentRow && task.baselines && task.baselines.length;\r\n\r\n\tif (splitParams.shrinkHeight){\r\n\t\tpos.rowHeight = maxHeight;\r\n\t}\r\n\r\n\tlet milestoneWidth;\r\n\tlet milestoneTask = gantt.getTaskType(task.type) == config.types.milestone;\r\n\tif(milestoneTask){\r\n\t\tlet milestoneHeight = view.getBarHeight(task.id, true);\r\n\t\tmilestoneWidth = Math.sqrt(2*milestoneHeight*milestoneHeight);\r\n\t\tif (splitParams.shrinkHeight && maxHeight < milestoneHeight){\r\n\t\t\tmilestoneHeight = maxHeight;\r\n\t\t\tmilestoneWidth = maxHeight;\r\n\t\t}\r\n\t\tpos.left -= milestoneWidth / 2;\r\n\t\tpos.width = milestoneWidth;\r\n\t} \r\n\tif (splitChild){\r\n\t\tif (maxHeight >= pos.height) {\r\n\t\t\tconst siblingBaselines = childrenHaveBaselines(gantt, task.parent);\r\n\t\t\tif (baselines || siblingBaselines){\r\n\t\t\t\tif (milestoneTask){\r\n\t\t\t\t\tpos.rowHeight = pos.height + 4;\r\n\t\t\t\t\tpos.left += (pos.width - pos.rowHeight + 4) / 2;\r\n\t\t\t\t\tpos.width = pos.rowHeight - 3;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tpos.rowHeight = pos.height + 6;\r\n\t\t\t\t}\r\n\t\t\t} else if (milestoneTask) {\r\n\t\t\t\tpos.left += (milestoneWidth - pos.height) / 2;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tpos.rowHeight = maxHeight + 2;\r\n\t\t\tif (milestoneTask){\r\n\t\t\t\tpos.left += (pos.width - pos.rowHeight + 4) / 2;\r\n\t\t\t\tpos.width = pos.rowHeight - 3;\r\n\t\t\t}\r\n\t\t}\r\n\t} else if (baselines){\r\n\t\tpos.rowHeight = pos.height + 4;\r\n\t}\r\n\r\n\treturn pos;\r\n}\r\n\r\n\r\nreturn {\r\n\trender: _render_link_element,\r\n\tupdate: null,\r\n\t//getRectangle: getLinkRectangle\r\n\tisInViewPort: isInViewPort,\r\n\tgetVisibleRange: getVisibleRange()\r\n};\r\n}\r\n\r\nexport default createLinkRender;","export default function(item, viewport, view, config, gantt){\r\n // GS-2481 and GS-1715, don't remove selected task when using keyboard shortcuts and when the inline editor is opened\r\n if(gantt.$ui.getView(\"grid\") && ((gantt.config.keyboard_navigation && gantt.getSelectedId()) || (gantt.ext.inlineEditors && gantt.ext.inlineEditors.getState().id))) {\r\n\t\treturn true;\r\n\t}\r\n var top = view.getItemTop(item.id);\r\n\tvar height = view.getItemHeight(item.id);\r\n\r\n\tif(top > viewport.y_end || top + height < viewport.y){\r\n\t\treturn false;\r\n\t}\r\n\r\n\treturn true;\r\n};","import * as helpers from \"../utils/helpers\";\r\n\r\nexport default function createResourceTimelineBuilder(gantt){\r\n\r\n\tlet resourceTaskCache = {};\r\n\r\n\tgantt.$data.tasksStore.attachEvent(\"onStoreUpdated\", function(){\r\n\t\tresourceTaskCache = {};\r\n\t});\r\n\r\n\tfunction getResourceLoad(resource, resourceProperty, scale, timeline){\r\n\t\tconst cacheKey = resource.id + \"_\" + resourceProperty + \"_\" + scale.unit + \"_\" + scale.step;\r\n\t\tlet res;\r\n\t\tif (!resourceTaskCache[cacheKey]) {\r\n\t\t\tres = resourceTaskCache[cacheKey] = calculateResourceLoad(resource, resourceProperty, scale, timeline);\r\n\r\n\t\t} else {\r\n\t\t\tres = resourceTaskCache[cacheKey];\r\n\t\t}\r\n\t\treturn res;\r\n\t}\r\n\r\n\tfunction calculateResourceLoadFromAssignments(items, scale, assignmentsPassed){\r\n\t\tconst scaleUnit = scale.unit;\r\n\t\tconst scaleStep = scale.step;\r\n\t\tconst timegrid = {};\r\n\r\n\t\tconst precalculatedTimes = {};\r\n\t\tfor (let i = 0; i < items.length; i++) {\r\n\t\t\tconst item = items[i];\r\n\t\t\tlet task = item;\r\n\t\t\tif(assignmentsPassed){\r\n\t\t\t\ttask = gantt.getTask(item.task_id);\r\n\t\t\t}\r\n\t\t\tif (task.unscheduled){\r\n\t\t\t\tcontinue; // do not process assignments for unscheduled tasks\r\n\t\t\t}\r\n\t\t\tlet minDate = (item.start_date || task.start_date);\r\n\t\t\tlet maxDate = (item.end_date || task.end_date);\r\n\t\t\tif(assignmentsPassed){\r\n\t\t\t\tif(item.start_date){\r\n\t\t\t\t\tminDate = new Date(Math.max(item.start_date.valueOf(), task.start_date.valueOf()));\r\n\t\t\t\t}\r\n\t\t\t\tif(item.end_date){\r\n\t\t\t\t\tmaxDate = new Date(Math.min(item.end_date.valueOf(), task.end_date.valueOf()));\r\n\t\t\t\t}\r\n\t\t\t\t// GS-2063: handle case with fixedDates mode\r\n\t\t\t\tif(item.mode && item.mode == \"fixedDates\"){\r\n\t\t\t\t\tminDate = item.start_date;\r\n\t\t\t\t\tmaxDate = item.end_date;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlet firstColumn = helpers.findBinary(scale.trace_x, minDate.valueOf());\r\n\t\t\tlet minScaleDate = new Date(scale.trace_x[firstColumn] || gantt.date[scaleUnit + \"_start\"](new Date(minDate)));\r\n\t\t\t// GS-2307: need to take into account that task could start before the min scale date\r\n\t\t\t// so the task would be added to timegrid\r\n\t\t\tlet currDate = new Date(Math.min(minDate.valueOf(), minScaleDate.valueOf())); \r\n\r\n\t\t\tlet calendar = gantt.config.work_time ? gantt.getTaskCalendar(task) : gantt;\r\n\t\t\tprecalculatedTimes[calendar.id] = {};\r\n\t\t\twhile (currDate < maxDate) {\r\n\t\t\t\tconst cachedTimes = precalculatedTimes[calendar.id];\r\n\r\n\t\t\t\tlet date = currDate;\r\n\t\t\t\tconst timestamp = date.valueOf();\r\n\r\n\t\t\t\tcurrDate = gantt.date.add(currDate, scaleStep, scaleUnit);\r\n\r\n\t\t\t\tif(cachedTimes[timestamp] === false){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar isWorkTime = calendar.isWorkTime({date: date, task: task, unit: scaleUnit});\r\n\t\t\t\tif(!isWorkTime){\r\n\t\t\t\t\tcachedTimes[timestamp] = false;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!timegrid[timestamp]){\r\n\t\t\t\t\ttimegrid[timestamp] = {tasks: [], assignments: []};\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttimegrid[timestamp].tasks.push(task);\r\n\t\t\t\tif(assignmentsPassed){\r\n\t\t\t\t\ttimegrid[timestamp].assignments.push(item);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn timegrid;\r\n\t}\r\n\r\n\tfunction calculateResourceLoad(resource, resourceProperty, scale, timeline) {\r\n\r\n\t\tlet items;\r\n\t\tlet assignmentsPassed = false;\r\n\t\tlet timegrid = {};\r\n\r\n\t\tif(gantt.config.process_resource_assignments && resourceProperty === gantt.config.resource_property){\r\n\t\t\tif(resource.$role == \"task\"){\r\n\t\t\t\titems = gantt.getResourceAssignments(resource.$resource_id, resource.$task_id);\r\n\t\t\t}else{\r\n\t\t\t\titems = gantt.getResourceAssignments(resource.id);\r\n\t\t\t}\r\n\r\n\t\t\tassignmentsPassed = true;\r\n\t\t}else if(resource.$role == \"task\"){\r\n\t\t\titems = [];\r\n\t\t}else{\r\n\t\t\titems = gantt.getTaskBy(resourceProperty, resource.id);\r\n\t\t}\r\n\r\n\t\ttimegrid = calculateResourceLoadFromAssignments(items, scale, assignmentsPassed);\r\n\t\tconst scaleUnit = scale.unit;\r\n\t\tconst scaleStep = scale.step;\r\n\r\n\t\tconst timetable = [];\r\n\t\tlet start, end, tasks, assignments, cell;\r\n\t\tconst config = timeline.$getConfig();\r\n\r\n\t\tfor(let i = 0; i < scale.trace_x.length; i++){\r\n\t\t\tstart = new Date(scale.trace_x[i]);\r\n\t\t\tend = gantt.date.add(start, scaleStep, scaleUnit);\r\n\t\t\tcell = timegrid[start.valueOf()] || {};\r\n\t\t\ttasks = cell.tasks || [];\r\n\t\t\tassignments = cell.assignments || [];\r\n\t\t\tif(tasks.length || config.resource_render_empty_cells){\r\n\t\t\t\ttimetable.push({\r\n\t\t\t\t\tstart_date: start,\r\n\t\t\t\t\tend_date: end,\r\n\t\t\t\t\ttasks: tasks,\r\n\t\t\t\t\tassignments: assignments\r\n\t\t\t\t});\r\n\t\t\t}else{\r\n\t\t\t\ttimetable.push(null);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn timetable;\r\n\t}\r\n\r\n\r\n\r\n\treturn getResourceLoad;\r\n};","import * as domHelpers from \"../utils/dom_helpers\";\r\nimport isPlaceholderTask from \"../../../utils/placeholder_task\";\r\n\r\nfunction _init_dnd(gantt, grid) {\r\n\tvar DnD = gantt.$services.getService(\"dnd\");\r\n\r\n\tif(!grid.$config.bind || !gantt.getDatastore(grid.$config.bind)){\r\n\t\treturn;\r\n\t}\r\n\r\n\tfunction locate(e){\r\n\t\treturn domHelpers.locateAttribute(e, grid.$config.item_attribute);\r\n\t}\r\n\r\n\tfunction getStore(){\r\n\t\treturn gantt.getDatastore(grid.$config.bind);\r\n\t}\r\n\r\n\tfunction checkPlaceholderTask(id){\r\n\t\treturn isPlaceholderTask(id, gantt, getStore());\r\n\t}\r\n\r\n\tvar dnd = new DnD(grid.$grid_data, {updates_per_second: 60});\r\n\tif (gantt.defined(grid.$getConfig().dnd_sensitivity))\r\n\t\tdnd.config.sensitivity = grid.$getConfig().dnd_sensitivity;\r\n\r\n\tdnd.attachEvent(\"onBeforeDragStart\", gantt.bind(function (obj, e) {\r\n\t\tvar el = locate(e);\r\n\t\tif (!el) return false;\r\n\t\tif (gantt.hideQuickInfo) gantt.hideQuickInfo();\r\n\r\n\t\tif (domHelpers.closest(e.target, \".gantt_grid_editor_placeholder\")){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar id = el.getAttribute(grid.$config.item_attribute);\r\n\t\tif (checkPlaceholderTask(id)) return false;\r\n\r\n\t\tvar datastore = getStore();\r\n\r\n\t\tvar task = datastore.getItem(id);\r\n\r\n\t\tif (gantt.isReadonly(task))\r\n\t\t\treturn false;\r\n\r\n\t\tdnd.config.initial_open_state = task.$open;\r\n\t\tif (!gantt.callEvent(\"onRowDragStart\", [id, e.target || e.srcElement, e])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}, gantt));\r\n\r\n\tdnd.attachEvent(\"onAfterDragStart\", gantt.bind(function (obj, e) {\r\n\t\tvar el = locate(e);\r\n\t\tdnd.config.marker.innerHTML = el.outerHTML;\r\n\t\tvar element = dnd.config.marker.firstChild;\r\n\t\tif(element){\r\n\t\t\telement.style.position = \"static\";\r\n\t\t}\r\n\r\n\t\tdnd.config.id = el.getAttribute(grid.$config.item_attribute);\r\n\r\n\t\tvar store = getStore();\r\n\r\n\t\tvar task = store.getItem(dnd.config.id);\r\n\t\tdnd.config.index = store.getBranchIndex(dnd.config.id);\r\n\t\tdnd.config.parent = task.parent;\r\n\t\ttask.$open = false;\r\n\t\ttask.$transparent = true;\r\n\t\tthis.refreshData();\r\n\t}, gantt));\r\n\r\n\tdnd.lastTaskOfLevel = function (level) {\r\n\t\tvar last_item = null;\r\n\t\tvar store = getStore();\r\n\t\tvar tasks = store.getItems();\r\n\t\tfor (var i = 0, len = tasks.length; i < len; i++) {\r\n\t\t\tif (tasks[i].$level == level) {\r\n\t\t\t\tlast_item = tasks[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn last_item ? last_item.id : null;\r\n\t};\r\n\tdnd._getGridPos = gantt.bind(function (e) {\r\n\t\tvar pos = domHelpers.getNodePosition(grid.$grid_data);\r\n\t\t// row offset\r\n\t\tvar x = pos.x + grid.$grid.scrollLeft;\r\n\t\tvar y = e.pos.y - 10;\r\n\r\n\t\tvar rowHeight = grid.getItemHeight(dnd.config.id);\r\n\t\t// prevent moving row out of grid_data container\r\n\t\tif (y < pos.y) y = pos.y;\r\n\t\tvar gridHeight = grid.getTotalHeight();\r\n\t\tif (y > pos.y + gridHeight - rowHeight) y = pos.y + gridHeight - rowHeight;\r\n\t\tconst maxBottom = pos.y + pos.height;\r\n\t\tif (y > maxBottom - rowHeight) {\r\n\t\t\ty = maxBottom - rowHeight;\r\n\t\t}\r\n\r\n\t\tpos.x = x;\r\n\t\tpos.y = y;\r\n\t\treturn pos;\r\n\t}, gantt);\r\n\tdnd._getTargetY = gantt.bind(function (e) {\r\n\t\tvar pos = domHelpers.getNodePosition(grid.$grid_data);\r\n\t\tvar scrollPos = grid.$state.scrollTop || 0;\r\n\t\tvar maxBottom = gantt.$grid_data.getBoundingClientRect().height + scrollPos;\r\n\r\n\t\tvar y = e.pageY - pos.y + scrollPos;\r\n\t\tif (y > maxBottom) {\r\n\t\t\ty = maxBottom;\r\n\t\t} else if (y < scrollPos) {\r\n\t\t\ty = scrollPos;\r\n\t\t}\r\n\t\treturn y;\r\n\t}, gantt);\r\n\tdnd._getTaskByY = gantt.bind(function (y, dropIndex) {\r\n\r\n\t\tvar store = getStore();\r\n\r\n\t\ty = y || 0;\r\n\r\n\t\tvar index = grid.getItemIndexByTopPosition(y);\r\n\t\tindex = dropIndex < index ? index - 1 : index;\r\n\r\n\t\tif (index > store.countVisible() - 1)\r\n\t\t\treturn null;\r\n\r\n\t\treturn store.getIdByIndex(index);\r\n\t}, gantt);\r\n\tdnd.attachEvent(\"onDragMove\", gantt.bind(function (obj, e) {\r\n\t\tvar gridDataSizes = gantt.$grid_data.getBoundingClientRect();\r\n\t\tvar maxBottom = gridDataSizes.height + gridDataSizes.y + (grid.$state.scrollTop || 0) + window.scrollY;\r\n\t\tvar dd = dnd.config;\r\n\t\tvar pos = dnd._getGridPos(e);\r\n\r\n\t\tgantt._waiAria.reorderMarkerAttr(dd.marker);\r\n\r\n\t\tvar config = grid.$getConfig(),\r\n\t\t\tstore = getStore();\r\n\r\n\t\t// setting position of row\r\n\t\tif (pos.y < maxBottom) {\r\n\t\t\tdd.marker.style.top = pos.y + \"px\";\r\n\t\t} else {\r\n\t\t\tdd.marker.style.top = maxBottom + \"px\";\r\n\t\t}\r\n\t\tdd.marker.style.left = pos.x + 10 + \"px\";\r\n\t\tconst containerSize = domHelpers.getNodePosition(gantt.$root);\r\n\t\tif (pos.width > containerSize.width){\r\n\t\t\tdd.marker.style.width = containerSize.width - 10 - 2 + \"px\";\r\n\t\t\tdd.marker.style.overflow = \"hidden\";\t\r\n\t\t}\r\n\r\n\t\t// highlight row when mouseover\r\n\t\tvar item = store.getItem(dnd.config.id);\r\n\t\tvar targetY = dnd._getTargetY(e);\r\n\t\tvar el = dnd._getTaskByY(targetY, store.getIndexById(item.id));\r\n\r\n\t\tif (!store.exists(el)) {\r\n\t\t\tel = dnd.lastTaskOfLevel(config.order_branch_free ? item.$level : 0);\r\n\t\t\tif (el == dnd.config.id) {\r\n\t\t\t\tel = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction allowedLevel(next, item) {\r\n\t\t\treturn (!(store.isChildOf(over.id, item.id)) && (next.$level == item.$level || config.order_branch_free));\r\n\t\t}\r\n\r\n\t\tif (store.exists(el)) {\r\n\t\t\tvar over = store.getItem(el);\r\n\r\n\t\t\tvar itemTop = grid.getItemTop(over.id);\r\n\t\t\tvar itemHeight = grid.getItemHeight(over.id);\r\n\t\t\tif (itemTop + itemHeight / 2 < targetY) {\r\n\t\t\t\t//hovering over bottom part of item, check can be drop to bottom\r\n\t\t\t\tvar index = store.getIndexById(over.id);\r\n\t\t\t\tvar nextId = store.getNext(over.id);//adds +1 when hovering over placeholder\r\n\t\t\t\tvar next = store.getItem(nextId);\r\n\t\t\t\tif (checkPlaceholderTask(nextId)){\r\n\t\t\t\t\tvar prevId = store.getPrev(next.id);\r\n\t\t\t\t\tnext = store.getItem(prevId);\r\n\t\t\t\t}\r\n\t\t\t\tif (next) {\r\n\t\t\t\t\tif (next.id != item.id) {\r\n\t\t\t\t\t\tover = next; //there is a valid target\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tif (config.order_branch_free) {\r\n\t\t\t\t\t\t\tif (!(store.isChildOf(item.id, over.id) && store.getChildren(over.id).length == 1))\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tstore.move(item.id, store.getBranchIndex(over.id) + 1, store.getParent(over.id));\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//we at end of the list, check and drop at the end of list\r\n\t\t\t\t\tnextId = store.getIdByIndex(index);\r\n\t\t\t\t\tnext = store.getItem(nextId);\r\n\r\n\t\t\t\t\tif (checkPlaceholderTask(nextId)){\r\n\t\t\t\t\t\tvar prevId = store.getPrev(next.id);\r\n\t\t\t\t\t\tnext = store.getItem(prevId);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (allowedLevel(next, item) && next.id != item.id) {\r\n\t\t\t\t\t\tstore.move(item.id, -1, store.getParent(next.id));\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (config.order_branch_free) {\r\n\t\t\t\tif (over.id != item.id && allowedLevel(over, item) && !checkPlaceholderTask(over.id)) {\r\n\t\t\t\t\tif (!store.hasChild(over.id)) {\r\n\t\t\t\t\t\tover.$open = true;\r\n\t\t\t\t\t\tstore.move(item.id, -1, over.id);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (store.getIndexById(over.id) || itemHeight / 3 < targetY) return;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//if item is on different level, check the one before it\r\n\t\t\tvar index = store.getIndexById(over.id),\r\n\t\t\t\tprevId = store.getIdByIndex(index - 1);\r\n\r\n\t\t\tvar prev = store.getItem(prevId);\r\n\r\n\t\t\tvar shift = 1;\r\n\t\t\twhile ((!prev || prev.id == over.id) && index - shift >= 0) {\r\n\r\n\t\t\t\tprevId = store.getIdByIndex(index - shift);\r\n\t\t\t\tprev = store.getItem(prevId);\r\n\t\t\t\tshift++;\r\n\t\t\t}\r\n\r\n\t\t\tif (item.id == over.id || checkPlaceholderTask(over.id)) return;\r\n\t\t\t//replacing item under cursor\r\n\t\t\tif (allowedLevel(over, item) && item.id != over.id) {\r\n\t\t\t\tstore.move(item.id, 0, 0, over.id);\r\n\r\n\t\t\t} else if (over.$level == item.$level - 1 && !store.getChildren(over.id).length) {\r\n\t\t\t\tstore.move(item.id, 0, over.id);\r\n\r\n\t\t\t} else if (prev && (allowedLevel(prev, item)) && (item.id != prev.id)) {\r\n\t\t\t\tstore.move(item.id, -1, store.getParent(prev.id));\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}, gantt));\r\n\r\n\tdnd.attachEvent(\"onDragEnd\", gantt.bind(function () {\r\n\t\tvar store = getStore();\r\n\t\tvar task = store.getItem(dnd.config.id);\r\n\t\ttask.$transparent = false;\r\n\t\ttask.$open = dnd.config.initial_open_state;\r\n\r\n\t\tif (this.callEvent(\"onBeforeRowDragEnd\", [dnd.config.id, dnd.config.parent, dnd.config.index]) === false) {\r\n\t\t\tstore.move(dnd.config.id, dnd.config.index, dnd.config.parent);\r\n\t\t\ttask.$drop_target = null;\r\n\t\t} else {\r\n\t\t\tthis.callEvent(\"onRowDragEnd\", [dnd.config.id, task.$drop_target]);\r\n\t\t}\r\n\t\tgantt.render();\r\n\t\tthis.refreshData();\r\n\t}, gantt));\r\n}\r\n\r\nexport default {\r\n\tinit: _init_dnd\r\n};","/**\r\n * The state object for order branch drag and drop\r\n */\r\n\r\nimport * as utils from \"../../../../utils/utils\";\r\n\r\nexport default {\r\n\tcreateDropTargetObject: function createDropTargetObject(parent) {\r\n\t\tvar res = {\r\n\t\t\ttargetParent: null,\r\n\t\t\ttargetIndex: 0,\r\n\t\t\ttargetId: null,\r\n\t\t\tchild: false,\r\n\t\t\tnextSibling: false,\r\n\t\t\tprevSibling: false\r\n\t\t};\r\n\r\n\t\tif (parent) {\r\n\t\t\tutils.mixin(res, parent, true);\r\n\t\t}\r\n\t\treturn res;\r\n\t},\r\n\tnextSiblingTarget: function nextSiblingTarget(dndTaskId, targetTaskId, store) {\r\n\t\tvar result = this.createDropTargetObject();\r\n\t\tresult.targetId = targetTaskId;\r\n\t\tresult.nextSibling = true;\r\n\t\tresult.targetParent = store.getParent(result.targetId);\r\n\t\tresult.targetIndex = store.getBranchIndex(result.targetId);\r\n\t\tif(store.getParent(dndTaskId) != result.targetParent || result.targetIndex < store.getBranchIndex(dndTaskId)){\r\n\t\t\tresult.targetIndex += 1;\r\n\t\t}\r\n\t\treturn result;\r\n\t},\r\n\tprevSiblingTarget: function prevSiblingTarget(dndTaskId, targetTaskId, store) {\r\n\t\tvar result = this.createDropTargetObject();\r\n\t\tresult.targetId = targetTaskId;\r\n\t\tresult.prevSibling = true;\r\n\t\tresult.targetParent = store.getParent(result.targetId);\r\n\t\tresult.targetIndex = store.getBranchIndex(result.targetId);\r\n\t\tif(store.getParent(dndTaskId) == result.targetParent && result.targetIndex > store.getBranchIndex(dndTaskId)){\r\n\t\t\tresult.targetIndex -= 1;\r\n\t\t}\r\n\t\treturn result;\r\n\t},\r\n\tfirstChildTarget: function firstChildTarget(dndTaskId, targetTaskId, store) {\r\n\t\tvar result = this.createDropTargetObject();\r\n\t\tresult.targetId = targetTaskId;\r\n\t\tresult.targetParent = result.targetId;\r\n\t\tresult.targetIndex = 0;\r\n\t\tresult.child = true;\r\n\t\treturn result;\r\n\t},\r\n\tlastChildTarget: function lastChildTarget(dndTaskId, targetTaskId, store) {\r\n\t\tvar children = store.getChildren(targetTaskId);\r\n\t\tvar result = this.createDropTargetObject();\r\n\t\tresult.targetId = children[children.length - 1];\r\n\t\tresult.targetParent = targetTaskId;\r\n\t\tresult.targetIndex = children.length;\r\n\t\tresult.nextSibling = true;\r\n\t\treturn result;\r\n\t}\r\n};","/**\r\n * resolve dnd position of the task when gantt.config.order_branch_free = false\r\n */\r\n\r\nimport dropTarget from \"./drop_target\";\r\n\r\nfunction getLast(store){\r\n\tvar current = store.getNext();\r\n\twhile(store.exists(current)){\r\n\r\n\t\tvar next = store.getNext(current);\r\n\t\tif(!store.exists(next)){\r\n\t\t\treturn current;\r\n\t\t}else{\r\n\t\t\tcurrent = next;\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\nfunction findClosesTarget(dndTaskId, taskId, allowedLevel, store, up){\r\n\tvar prev = taskId;\r\n\twhile(store.exists(prev)){\r\n\t\tvar targetLevel = store.calculateItemLevel(store.getItem(prev));\r\n\t\tif((targetLevel === allowedLevel || targetLevel === (allowedLevel - 1)) && store.getBranchIndex(prev) > -1){\r\n\t\t\tbreak;\r\n\t\t}else {\r\n\t\t\tprev = up ? store.getPrev(prev) : store.getNext(prev);\r\n\t\t}\r\n\t}\r\n\r\n\tif(store.exists(prev)){\r\n\t\tif(store.calculateItemLevel(store.getItem(prev)) === allowedLevel){\r\n\t\t\treturn up ? dropTarget.nextSiblingTarget(dndTaskId, prev, store) : dropTarget.prevSiblingTarget(dndTaskId, prev, store);\r\n\t\t}else{\r\n\t\t\treturn dropTarget.firstChildTarget(dndTaskId, prev, store);\r\n\t\t}\r\n\t}\r\n\treturn null;\r\n}\r\n\r\nfunction findTargetAbove(dndTaskId, taskId, allowedLevel, store){\r\n\treturn findClosesTarget(dndTaskId, taskId, allowedLevel, store, true);\r\n}\r\nfunction findTargetBelow(dndTaskId, taskId, allowedLevel, store){\r\n\treturn findClosesTarget(dndTaskId, taskId, allowedLevel, store, false);\r\n}\r\n\r\nexport default function getSameLevelDropPosition(dndTaskId, targetTaskId, relTargetPos, eventTop, store, level){\r\n\tvar result;\r\n\tif(targetTaskId !== store.$getRootId()){\r\n\t\tvar targetTask = store.getItem(targetTaskId);\r\n\t\tvar targetLevel = store.calculateItemLevel(targetTask);\r\n\t\tif(targetLevel === level){\r\n\t\t\tvar prevSibling = store.getPrevSibling(targetTaskId);\r\n\t\t\tif(relTargetPos < 0.5 && !prevSibling){\r\n\t\t\t\tresult = dropTarget.prevSiblingTarget(dndTaskId, targetTaskId, store);\r\n\t\t\t}else{\r\n\t\t\t\tif(relTargetPos < 0.5){\r\n\t\t\t\t\ttargetTaskId = prevSibling;\r\n\t\t\t\t}\r\n\t\t\t\tresult = dropTarget.nextSiblingTarget(dndTaskId, targetTaskId, store);\r\n\t\t\t}\r\n\t\t}else if(targetLevel > level){\r\n\t\t\tstore.eachParent(function(parent){\r\n\t\t\t\tif(store.calculateItemLevel(parent) === level){\r\n\t\t\t\t\ttargetTaskId = parent.id;\r\n\t\t\t\t}\r\n\t\t\t}, targetTask); \r\n\t\t\tresult = findTargetAbove(dndTaskId, targetTaskId, level, store);\r\n\t\t}else{\r\n\t\t\tvar targetAbove = findTargetAbove(dndTaskId, targetTaskId, level, store);\r\n\t\t\tvar targetBelow = findTargetBelow(dndTaskId, targetTaskId, level, store);\r\n\t\t\tresult = (relTargetPos < 0.5) ? targetAbove : targetBelow;\r\n\t\t}\r\n\t}else{\r\n\t\tvar rootId = store.$getRootId();\r\n\t\tvar rootLevel = store.getChildren(rootId);\r\n\t\tresult = dropTarget.createDropTargetObject();\r\n\t\tif(rootLevel.length && eventTop >= 0){\r\n\t\t\tresult = findTargetAbove(dndTaskId, getLast(store), level, store);\r\n\t\t}else{\r\n\t\t\tresult = findTargetBelow(dndTaskId, rootId, level, store);\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};\r\n","import * as domHelpers from \"../../utils/dom_helpers\";\r\n\r\n/**\r\n * methods for highlighting current drag and drop position\r\n */\r\n\r\nfunction highlightPosition(target, root, grid){\r\n\tvar markerPos = getTaskMarkerPosition(target, grid);\r\n\t// setting position of row\r\n\troot.marker.style.left = markerPos.x + 9 + \"px\";\r\n\troot.marker.style.width = markerPos.width + \"px\";\r\n\troot.marker.style.overflow = \"hidden\";\r\n\tvar markerLine = root.markerLine;\r\n\tif(!markerLine){\r\n\t\tmarkerLine = document.createElement(\"div\");\r\n\t\tmarkerLine.className = \"gantt_drag_marker gantt_grid_dnd_marker\";\r\n\t\tmarkerLine.innerHTML = \"
\";\r\n\t\tmarkerLine.style.pointerEvents = \"none\";\r\n\t}\r\n\r\n\tif(target.child){\r\n\t\thighlightFolder(target, markerLine, grid);\r\n\t}else{\r\n\t\thighlightRow(target, markerLine, grid);\r\n\t}\r\n\r\n\tif(!root.markerLine){\r\n\t\tdocument.body.appendChild(markerLine);\r\n\t\troot.markerLine = markerLine;\r\n\t}\r\n}\r\n\r\nfunction removeLineHighlight(root){\r\n\tif(root.markerLine && root.markerLine.parentNode){\r\n\t\troot.markerLine.parentNode.removeChild(root.markerLine);\r\n\t}\r\n\troot.markerLine = null;\r\n}\r\n\r\nfunction highlightRow(target, markerLine, grid){\r\n\tvar linePos = getLineMarkerPosition(target, grid);\r\n\tvar maxBottom = grid.$grid_data.getBoundingClientRect().bottom + window.scrollY;\r\n\r\n\tmarkerLine.innerHTML = \"
\";\r\n\tmarkerLine.style.left = linePos.x + \"px\";\r\n\tmarkerLine.style.height = \"4px\";\r\n\r\n\tvar markerLineTop = linePos.y - 2;\r\n\tmarkerLine.style.top = markerLineTop + \"px\";\r\n\tmarkerLine.style.width = linePos.width + \"px\";\r\n\r\n\tif (markerLineTop > maxBottom) {\r\n\t\tmarkerLine.style.top = maxBottom + 'px';\r\n\t}\r\n\r\n\treturn markerLine;\r\n}\r\nfunction highlightFolder(target, markerFolder, grid){\r\n\tvar id = target.targetParent;\r\n\tvar pos = gridToPageCoordinates({x: 0, y: grid.getItemTop(id)}, grid);\r\n\tvar maxBottom = grid.$grid_data.getBoundingClientRect().bottom + window.scrollY;\r\n\r\n\tlet folderHighlightWidth = setWidthWithinContainer(grid.$gantt, grid.$grid_data.offsetWidth);\t\r\n\r\n\tmarkerFolder.innerHTML = \"
\";\r\n\tmarkerFolder.style.width = folderHighlightWidth + \"px\";\r\n\tmarkerFolder.style.top = pos.y + \"px\";\r\n\tmarkerFolder.style.left = pos.x + \"px\";\r\n\tmarkerFolder.style.height = grid.getItemHeight(id) + \"px\";\r\n\tif (pos.y > maxBottom) {\r\n\t\tmarkerFolder.style.top = maxBottom + 'px';\r\n\t}\r\n\r\n\treturn markerFolder;\r\n}\r\n\r\nfunction getLineMarkerPosition(target, grid){\r\n\tvar store = grid.$config.rowStore;\r\n\tvar pos = {x:0, y:0};\r\n\tvar indentNode = grid.$grid_data.querySelector(\".gantt_tree_indent\");\r\n\tvar indent = 15;\r\n\tvar level = 0;\r\n\tif(indentNode){\r\n\t\tindent = indentNode.offsetWidth;\r\n\t}\r\n\tvar iconWidth = 40;\r\n\tif(target.targetId !== store.$getRootId()){\r\n\t\tvar itemTop = grid.getItemTop(target.targetId);\r\n\t\tvar itemHeight = grid.getItemHeight(target.targetId);\r\n\t\tlevel = store.exists(target.targetId) ? store.calculateItemLevel(store.getItem(target.targetId)) : 0;\r\n\r\n\t\tif(target.prevSibling){\r\n\t\t\tpos.y = itemTop;\r\n\t\t}else if(target.nextSibling){\r\n\t\t\tvar childCount = 0;\r\n\t\t\tstore.eachItem(function(child){\r\n\t\t\t\tif(store.getIndexById(child.id) !== -1)\r\n\t\t\t\t\tchildCount++;\r\n\t\t\t}, target.targetId);\r\n\r\n\t\t\tpos.y = itemTop + itemHeight + childCount*itemHeight;\r\n\t\t}else {\r\n\t\t\tpos.y = itemTop + itemHeight;\r\n\t\t\tlevel += 1;\r\n\t\t}\r\n\t}\r\n\tpos.x = iconWidth + level * indent;\r\n\tpos.width = setWidthWithinContainer(grid.$gantt, Math.max(grid.$grid_data.offsetWidth - pos.x, 0), pos.x);\r\n\treturn gridToPageCoordinates(pos, grid);\r\n}\r\n\r\nfunction gridToPageCoordinates(pos, grid){\r\n\tvar gridPos = domHelpers.getNodePosition(grid.$grid_data);\r\n\tpos.x += gridPos.x + grid.$grid.scrollLeft;\r\n\tpos.y += gridPos.y - grid.$grid_data.scrollTop;\r\n\treturn pos;\r\n}\r\n\r\nfunction getTaskMarkerPosition(e, grid) {\r\n\tvar pos = domHelpers.getNodePosition(grid.$grid_data);\r\n\tvar ePos = domHelpers.getRelativeEventPosition(e, grid.$grid_data);\r\n\t// row offset\r\n\tvar x = pos.x + grid.$grid.scrollLeft;\r\n\tvar y = ePos.y - 10;\r\n\r\n\tvar rowHeight = grid.getItemHeight(e.targetId);\r\n\t// prevent moving row out of grid_data container\r\n\tif (y < pos.y) y = pos.y;\r\n\tvar gridHeight = grid.getTotalHeight();\r\n\tif (y > pos.y + gridHeight - rowHeight) y = pos.y + gridHeight - rowHeight;\r\n\r\n\tpos.x = x;\r\n\tpos.y = y;\r\n\tpos.width = setWidthWithinContainer(grid.$gantt, pos.width, 9);\r\n\treturn pos;\r\n}\r\n\r\nfunction setWidthWithinContainer(gantt, width, offset = 0){\r\n\tconst containerSize = domHelpers.getNodePosition(gantt.$root);\r\n\tif (width > containerSize.width){\r\n\t\twidth = containerSize.width - offset - 2;\r\n\t}\r\n\treturn width;\r\n}\r\n\r\nexport default {\r\n\tremoveLineHighlight: removeLineHighlight,\r\n\thighlightPosition: highlightPosition\r\n};\r\n","import * as domHelpers from \"../utils/dom_helpers\";\r\nimport dropTarget from \"./tasks_grid_dnd_marker_helpers/drop_target\";\r\nimport getLockedLevelTarget from \"./tasks_grid_dnd_marker_helpers/locked_level\";\r\nimport getMultiLevelTarget from \"./tasks_grid_dnd_marker_helpers/multi_level\";\r\nimport higlighter from \"./tasks_grid_dnd_marker_helpers/highlight\";\r\nimport isPlaceholderTask from \"../../../utils/placeholder_task\";\r\n\r\nfunction _init_dnd(gantt, grid) {\r\n\tvar DnD = gantt.$services.getService(\"dnd\");\r\n\r\n\tif(!grid.$config.bind || !gantt.getDatastore(grid.$config.bind)){\r\n\t\treturn;\r\n\t}\r\n\r\n\tfunction locate(e){\r\n\t\treturn domHelpers.locateAttribute(e, grid.$config.item_attribute);\r\n\t}\r\n\r\n\tfunction getStore(){\r\n\t\treturn gantt.getDatastore(grid.$config.bind);\r\n\t}\r\n\r\n\tfunction checkPlaceholderTask(id){\r\n\t\treturn isPlaceholderTask(id, gantt, getStore());\r\n\t}\r\n\r\n\tvar dnd = new DnD(grid.$grid_data, {updates_per_second: 60});\r\n\tif (gantt.defined(grid.$getConfig().dnd_sensitivity))\r\n\t\tdnd.config.sensitivity = grid.$getConfig().dnd_sensitivity;\r\n\r\n\tdnd.attachEvent(\"onBeforeDragStart\", gantt.bind(function (obj, e) {\r\n\t\tvar el = locate(e);\r\n\t\tif (!el) return false;\r\n\t\tif (gantt.hideQuickInfo) gantt.hideQuickInfo();\r\n\t\tif (domHelpers.closest(e.target, \".gantt_grid_editor_placeholder\")){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar id = el.getAttribute(grid.$config.item_attribute);\r\n\t\tvar datastore = grid.$config.rowStore;\r\n\t\tvar task = datastore.getItem(id);\r\n\r\n\t\tif (gantt.isReadonly(task) || checkPlaceholderTask(id))\r\n\t\t\treturn false;\r\n\r\n\t\tdnd.config.initial_open_state = task.$open;\r\n\t\tif (!gantt.callEvent(\"onRowDragStart\", [id, e.target || e.srcElement, e])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}, gantt));\r\n\r\n\tdnd.attachEvent(\"onAfterDragStart\", gantt.bind(function (obj, e) {\r\n\t\tvar el = locate(e);\r\n\r\n\t\tdnd.config.marker.innerHTML = el.outerHTML;\r\n\t\tvar element = dnd.config.marker.firstChild;\r\n\t\tif(element){\r\n\t\t\tdnd.config.marker.style.opacity = 0.4;\r\n\t\t\telement.style.position = \"static\";\r\n\t\t\telement.style.pointerEvents = \"none\";\r\n\t\t}\r\n\r\n\t\tdnd.config.id = el.getAttribute(grid.$config.item_attribute);\r\n\r\n\t\tvar store = grid.$config.rowStore;\r\n\r\n\t\tvar task = store.getItem(dnd.config.id);\r\n\t\tdnd.config.level = store.calculateItemLevel(task);\r\n\t\tdnd.config.drop_target = dropTarget.createDropTargetObject({\r\n\t\t\ttargetParent: store.getParent(task.id),\r\n\t\t\ttargetIndex: store.getBranchIndex(task.id),\r\n\t\t\ttargetId: task.id,\r\n\t\t\tnextSibling: true\r\n\t\t});\r\n\r\n\t\ttask.$open = false;\r\n\t\ttask.$transparent = true;\r\n\t\tthis.refreshData();\r\n\t}, gantt));\r\n\r\n\tfunction getTargetTaskId(e){\r\n\t\tvar y = domHelpers.getRelativeEventPosition(e, grid.$grid_data).y;\r\n\t\tvar store = grid.$config.rowStore;\r\n\r\n\t\tif (!document.doctype){\r\n\t\t\ty += window.scrollY;\r\n\t\t}\r\n\t\ty = y || 0;\r\n\r\n\t\t// limits for the marker according to the layout layer\r\n\t\tvar scrollPos = grid.$state.scrollTop || 0;\r\n\t\tvar maxBottom = gantt.$grid_data.getBoundingClientRect().height + scrollPos + window.scrollY;\r\n\t\tvar minTop = scrollPos;\r\n\r\n\t\tvar firstVisibleTaskIndex = grid.getItemIndexByTopPosition(grid.$state.scrollTop);\r\n\t\tif (!store.exists(firstVisibleTaskIndex)){\r\n\t\t\tfirstVisibleTaskIndex = store.countVisible() - 1;\r\n\t\t}\r\n\t\tif (firstVisibleTaskIndex < 0) {\r\n\t\t\treturn store.$getRootId();\r\n\t\t}\r\n\r\n\t\tvar firstVisibleTaskId = store.getIdByIndex(firstVisibleTaskIndex);\r\n\r\n\t\tvar firstVisibleTaskPos = grid.$state.scrollTop / grid.getItemHeight(firstVisibleTaskId);\r\n\t\tvar hiddenTaskPart = firstVisibleTaskPos - Math.floor(firstVisibleTaskPos);\r\n\t\tif (hiddenTaskPart > 0.1 && hiddenTaskPart < 0.9) {\r\n\t\t\tmaxBottom = maxBottom - grid.getItemHeight(firstVisibleTaskId) * hiddenTaskPart;\r\n\t\t\tminTop = minTop + grid.getItemHeight(firstVisibleTaskId) * (1 - hiddenTaskPart);\r\n\t\t}\r\n\r\n\t\t// GS-715. The placeholder task row shouldn't be draggable below the Gantt container\r\n\t\tconst gridPosition = domHelpers.getNodePosition(grid.$grid_data);\r\n\t\tconst gridBottom = gridPosition.y + gridPosition.height;\r\n\t\tconst placeholderRowHeight = dnd.config.marker.offsetHeight;\r\n\t\tif (y + placeholderRowHeight + window.scrollY >= maxBottom){\r\n\t\t\tdnd.config.marker.style.top = gridBottom - placeholderRowHeight\t+ \"px\";\r\n\t\t}\r\n\r\n\t\tif (y >= maxBottom) {\r\n\t\t\ty = maxBottom;\r\n\t\t} else if (y <= minTop) {\r\n\t\t\ty = minTop;\r\n\t\t\tdnd.config.marker.style.top = gridPosition.y + \"px\";\r\n\t\t}\r\n\r\n\t\tvar index = grid.getItemIndexByTopPosition(y);\r\n\r\n\t\tif (index > store.countVisible() - 1 || index < 0) {\r\n\t\t\treturn store.$getRootId();\r\n\t\t}\r\n\r\n\t\tvar targetId = store.getIdByIndex(index);\r\n\t\tif (checkPlaceholderTask(targetId)) {\r\n\t\t\treturn store.getPrevSibling(targetId);\r\n\t\t}\r\n\r\n\t\treturn store.getIdByIndex(index);\r\n\t}\r\n\r\n\tfunction getDropPosition(e){\r\n\t\tvar targetTaskId = getTargetTaskId(e);\r\n\t\tvar relTargetPos = null;\r\n\t\tvar store = grid.$config.rowStore;\r\n\t\tvar config = grid.$getConfig();\r\n\t\tvar lockLevel = !config.order_branch_free;\r\n\r\n\t\tvar eventTop = domHelpers.getRelativeEventPosition(e, grid.$grid_data).y;\r\n\t\tif (!document.doctype){\r\n\t\t\teventTop += window.scrollY;\r\n\t\t}\r\n\r\n\t\tif(targetTaskId !== store.$getRootId()) {\r\n\t\t\tvar rowTop = grid.getItemTop(targetTaskId);\r\n\t\t\tvar rowHeight = grid.getItemHeight(targetTaskId);\r\n\t\t\trelTargetPos = (eventTop - rowTop) / rowHeight;\r\n\t\t}\r\n\r\n\t\tvar result;\r\n\t\tif(!lockLevel){\r\n\t\t\tresult = getMultiLevelTarget(dnd.config.id, targetTaskId, relTargetPos, eventTop, store);\r\n\t\t}else{\r\n\t\t\tresult = getLockedLevelTarget(dnd.config.id, targetTaskId, relTargetPos, eventTop, store, dnd.config.level);\r\n\t\t\tif(result && result.targetParent && checkPlaceholderTask(result.targetParent)){\r\n\t\t\t\ttargetTaskId = store.getPrevSibling(result.targetParent);\r\n\t\t\t\tresult = getLockedLevelTarget(dnd.config.id, targetTaskId, relTargetPos, eventTop, store, dnd.config.level);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tdnd.attachEvent(\"onDragMove\", gantt.bind(function (obj, e) {\r\n\t\tvar target = getDropPosition(e);\r\n\r\n\t\tif(!target ||\r\n\t\t\tgantt.callEvent(\"onBeforeRowDragMove\", [dnd.config.id, target.targetParent, target.targetIndex]) === false){\r\n\t\t\t\ttarget = dropTarget.createDropTargetObject(dnd.config.drop_target);\r\n\t\t\t}\r\n\r\n\t\thiglighter.highlightPosition(target, dnd.config, grid);\r\n\t\tdnd.config.drop_target = target;\r\n\t\tgantt._waiAria.reorderMarkerAttr(dnd.config.marker);\r\n\r\n\t\tthis.callEvent(\"onRowDragMove\", [dnd.config.id, target.targetParent, target.targetIndex]);\r\n\t\treturn true;\r\n\t}, gantt));\r\n\r\n\tdnd.attachEvent(\"onDragEnd\", gantt.bind(function () {\r\n\t\tvar store = grid.$config.rowStore;\r\n\t\tvar task = store.getItem(dnd.config.id);\r\n\r\n\t\thiglighter.removeLineHighlight(dnd.config);\r\n\r\n\t\ttask.$transparent = false;\r\n\t\ttask.$open = dnd.config.initial_open_state;\r\n\t\tvar target = dnd.config.drop_target;\r\n\r\n\t\tif (this.callEvent(\"onBeforeRowDragEnd\", [dnd.config.id, target.targetParent, target.targetIndex]) === false) {\r\n\t\t\ttask.$drop_target = null;\r\n\t\t} else {\r\n\t\t\tstore.move(dnd.config.id, target.targetIndex, target.targetParent);\r\n\t\t\tgantt.render();\r\n\t\t\tthis.callEvent(\"onRowDragEnd\", [dnd.config.id, target.targetParent, target.targetIndex]);\r\n\t\t}\r\n\t\tstore.refresh(task.id);\r\n\t}, gantt));\r\n}\r\n\r\nexport default {\r\n\tinit: _init_dnd\r\n};","/**\r\n * resolve dnd position of the task when gantt.config.order_branch_free = true\r\n */\r\n\r\nimport dropTarget from \"./drop_target\";\r\n\r\nexport default function getMultiLevelDropPosition(dndTaskId, targetTaskId, relTargetPos, eventTop, store){\r\n\tvar result;\r\n\r\n\tif(targetTaskId !== store.$getRootId()){\r\n\t\tif(relTargetPos < 0.25){\r\n\t\t\tresult = dropTarget.prevSiblingTarget(dndTaskId, targetTaskId, store);\r\n\t\t}else if(relTargetPos > 0.60 && !(store.hasChild(targetTaskId) && store.getItem(targetTaskId).$open)){\r\n\t\t\tresult = dropTarget.nextSiblingTarget(dndTaskId, targetTaskId, store);\r\n\t\t}else {\r\n\t\t\tresult = dropTarget.firstChildTarget(dndTaskId, targetTaskId, store);\r\n\t\t}\r\n\t}else{\r\n\t\tvar rootId = store.$getRootId();\r\n\t\tif(store.hasChild(rootId) && eventTop >= 0){\r\n\t\t\tresult = dropTarget.lastChildTarget(dndTaskId, rootId, store);\r\n\t\t}else{\r\n\t\t\tresult = dropTarget.firstChildTarget(dndTaskId, rootId, store);\r\n\t\t}\r\n\t}\r\n\r\n\treturn result;\r\n};","import * as utils from \"../../../utils/utils\";\r\nimport rowDnd from \"./tasks_grid_dnd\";\r\nimport rowDndMarker from \"./tasks_grid_dnd_marker\";\r\nimport mouseEventContainer from \"../mouse_event_container\";\r\n\r\nvar initializer = (function(){\r\n\treturn function(gantt){\r\n\t\treturn {\r\n\t\t\tonCreated: function (grid) {\r\n\t\t\t\tgrid.$config = utils.mixin(grid.$config, {\r\n\t\t\t\t\tbind: \"task\"\r\n\t\t\t\t});\r\n\t\t\t\tif(grid.$config.id == \"grid\") {\r\n\t\t\t\t\tthis.extendGantt(grid);\r\n\t\t\t\t\tgantt.ext.inlineEditors = gantt.ext._inlineEditors.createEditors(grid);\r\n\t\t\t\t\tgantt.ext.inlineEditors.init();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._mouseDelegates = mouseEventContainer(gantt);\r\n\t\t\t},\r\n\t\t\tonInitialized: function (grid) {\r\n\t\t\t\tvar config = grid.$getConfig();\r\n\t\t\t\tif (config.order_branch) {\r\n\t\t\t\t\tif(config.order_branch == \"marker\"){\r\n\t\t\t\t\t\trowDndMarker.init(grid.$gantt, grid);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\trowDnd.init(grid.$gantt, grid);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.initEvents(grid, gantt);\r\n\t\t\t\tif(grid.$config.id == \"grid\") {\r\n\t\t\t\t\tthis.extendDom(grid);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonDestroyed: function (grid) {\r\n\t\t\t\tif(grid.$config.id == \"grid\") {\r\n\t\t\t\t\tgantt.ext.inlineEditors.destructor();\r\n\t\t\t\t}\r\n\t\t\t\tthis.clearEvents(grid, gantt);\r\n\t\t\t},\r\n\r\n\t\t\tinitEvents: function (grid, gantt) {\r\n\t\t\t\tthis._mouseDelegates.delegate(\"click\", \"gantt_row\", gantt.bind(function (e, id, trg) {\r\n\t\t\t\t\tvar config = grid.$getConfig();\r\n\t\t\t\t\tif (id !== null) {\r\n\t\t\t\t\t\tvar task = this.getTask(id);\r\n\t\t\t\t\t\tif (config.scroll_on_click && !gantt._is_icon_open_click(e))\r\n\t\t\t\t\t\t\tthis.showDate(task.start_date);\r\n\t\t\t\t\t\tgantt.callEvent(\"onTaskRowClick\", [id, trg]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}, gantt), grid.$grid);\r\n\r\n\t\t\t\tthis._mouseDelegates.delegate(\"click\", \"gantt_grid_head_cell\", gantt.bind(function (e, id, trg) {\r\n\t\t\t\t\tvar column = trg.getAttribute(\"data-column-id\");\r\n\r\n\t\t\t\t\tif (!gantt.callEvent(\"onGridHeaderClick\", [column, e]))\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\tvar config = grid.$getConfig();\r\n\r\n\t\t\t\t\tif (column == \"add\") {\r\n\t\t\t\t\t\tvar mouseEvents = gantt.$services.getService(\"mouseEvents\");\r\n\t\t\t\t\t\tmouseEvents.callHandler(\"click\", \"gantt_add\", grid.$grid, [e, config.root_id]);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (config.sort && column) { // GS-929: if there is no column name, we cannot sort the column\r\n\t\t\t\t\t\tvar sorting_method = column,\r\n\t\t\t\t\t\t\tconf;\r\n\r\n\t\t\t\t\t\tfor (var i = 0; i < config.columns.length; i++) {\r\n\t\t\t\t\t\t\tif (config.columns[i].name == column) {\r\n\t\t\t\t\t\t\t\tconf = config.columns[i];\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (conf && conf.sort !== undefined && conf.sort !== true) {\r\n\t\t\t\t\t\t\tsorting_method = conf.sort;\r\n\r\n\t\t\t\t\t\t\tif (!sorting_method) { // column sort property 'false', no sorting\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tvar sort = (this._sort && this._sort.direction && this._sort.name == column) ? this._sort.direction : \"desc\";\r\n\t\t\t\t\t\t// invert sort direction\r\n\t\t\t\t\t\tsort = (sort == \"desc\") ? \"asc\" : \"desc\";\r\n\t\t\t\t\t\tthis._sort = {\r\n\t\t\t\t\t\t\tname: column,\r\n\t\t\t\t\t\t\tdirection: sort\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tthis.sort(sorting_method, sort == \"desc\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}, gantt), grid.$grid);\r\n\r\n\t\t\t\tthis._mouseDelegates.delegate(\"click\", \"gantt_add\", gantt.bind(function (e, id, trg) {\r\n\t\t\t\t\tvar config = grid.$getConfig();\r\n\t\t\t\t\tif (config.readonly) return;\r\n\r\n\t\t\t\t\tvar item = {};\r\n\t\t\t\t\tthis.createTask(item, id ? id : gantt.config.root_id);\r\n\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}, gantt), grid.$grid);\r\n\r\n\t\t\t},\r\n\r\n\t\t\tclearEvents: function(grid, gantt){\r\n\t\t\t\tthis._mouseDelegates.destructor();\r\n\t\t\t\tthis._mouseDelegates = null;\r\n\t\t\t},\r\n\r\n\t\t\textendDom: function(grid){\r\n\t\t\t\tgantt.$grid = grid.$grid;\r\n\t\t\t\tgantt.$grid_scale = grid.$grid_scale;\r\n\t\t\t\tgantt.$grid_data = grid.$grid_data;\r\n\t\t\t},\r\n\t\t\textendGantt: function(grid){\r\n\t\t\t\tgantt.getGridColumns = gantt.bind(grid.getGridColumns, grid);\r\n\r\n\t\t\t\tgrid.attachEvent(\"onColumnResizeStart\", function(){\r\n\t\t\t\t\treturn gantt.callEvent(\"onColumnResizeStart\", arguments);\r\n\t\t\t\t});\r\n\t\t\t\tgrid.attachEvent(\"onColumnResize\", function(){\r\n\t\t\t\t\treturn gantt.callEvent(\"onColumnResize\", arguments);\r\n\t\t\t\t});\r\n\t\t\t\tgrid.attachEvent(\"onColumnResizeEnd\", function(){\r\n\t\t\t\t\treturn gantt.callEvent(\"onColumnResizeEnd\", arguments);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tgrid.attachEvent(\"onColumnResizeComplete\", function(columns, totalWidth){\r\n\t\t\t\t\tgantt.config.grid_width = totalWidth;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tgrid.attachEvent(\"onBeforeRowResize\", function(){\r\n\t\t\t\t\treturn gantt.callEvent(\"onBeforeRowResize\", arguments);\r\n\t\t\t\t});\r\n\t\t\t\tgrid.attachEvent(\"onRowResize\", function(){\r\n\t\t\t\t\treturn gantt.callEvent(\"onRowResize\", arguments);\r\n\t\t\t\t});\r\n\t\t\t\tgrid.attachEvent(\"onBeforeRowResizeEnd\", function(){\r\n\t\t\t\t\treturn gantt.callEvent(\"onBeforeRowResizeEnd\", arguments);\r\n\t\t\t\t});\r\n\t\t\t\tgrid.attachEvent(\"onAfterRowResize\", function(){\r\n\t\t\t\t\treturn gantt.callEvent(\"onAfterRowResize\", arguments);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\t};\r\n})();\r\n\r\nexport default initializer;","import * as domHelpers from \"../utils/dom_helpers\";\r\nimport * as utils from \"../../../utils/utils\";\r\nimport timeout from \"../../../utils/timeout\";\r\nimport * as helpers from \"../../../utils/helpers\";\r\n\r\nfunction createTaskDND(timeline, gantt) {\r\n\tvar services = gantt.$services;\r\n\treturn {\r\n\t\tdrag: null,\r\n\t\tdragMultiple: {},\r\n\t\t_events: {\r\n\t\t\tbefore_start: {},\r\n\t\t\tbefore_finish: {},\r\n\t\t\tafter_finish: {}\r\n\t\t},\r\n\t\t_handlers: {},\r\n\t\tinit: function() {\r\n\t\t\tthis._domEvents = gantt._createDomEventScope();\r\n\t\t\tthis.clear_drag_state();\r\n\t\t\tvar drag = gantt.config.drag_mode;\r\n\t\t\tthis.set_actions();\r\n\r\n\t\t\tvar stateService = services.getService(\"state\");\r\n\t\t\tstateService.registerProvider(\"tasksDnd\", utils.bind(function() {\r\n\t\t\t\treturn {\r\n\t\t\t\t\tdrag_id : this.drag ? this.drag.id : undefined,\r\n\t\t\t\t\tdrag_mode : this.drag ? this.drag.mode : undefined,\r\n\t\t\t\t\tdrag_from_start : this.drag ? this.drag.left : undefined\r\n\t\t\t\t};\r\n\t\t\t}, this));\r\n\r\n\t\t\tvar evs = {\r\n\t\t\t\t\"before_start\": \"onBeforeTaskDrag\",\r\n\t\t\t\t\"before_finish\": \"onBeforeTaskChanged\",\r\n\t\t\t\t\"after_finish\": \"onAfterTaskDrag\"\r\n\t\t\t};\r\n\t\t\t//for now, all drag operations will trigger the same events\r\n\t\t\tfor (var stage in this._events) {\r\n\t\t\t\tfor (var mode in drag) {\r\n\t\t\t\t\tthis._events[stage][mode] = evs[stage];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis._handlers[drag.move] = this._move;\r\n\t\t\tthis._handlers[drag.resize] = this._resize;\r\n\t\t\tthis._handlers[drag.progress] = this._resize_progress;\r\n\t\t},\r\n\t\tset_actions: function() {\r\n\t\t\tvar data = timeline.$task_data;\r\n\t\t\tthis._domEvents.attach(data, \"mousemove\", gantt.bind(function(e) {\r\n\t\t\t\tthis.on_mouse_move(e);\r\n\t\t\t}, this));\r\n\t\t\tthis._domEvents.attach(data, \"mousedown\", gantt.bind(function(e) {\r\n\t\t\t\tthis.on_mouse_down(e);\r\n\t\t\t}, this));\r\n\t\t\tthis._domEvents.attach(document.body, \"mouseup\", gantt.bind(function(e) {\r\n\t\t\t\tthis.on_mouse_up(e);\r\n\t\t\t}, this));\r\n\t\t},\r\n\r\n\t\tclear_drag_state: function() {\r\n\t\t\tthis.drag = {\r\n\t\t\t\tid: null,\r\n\t\t\t\tmode: null,\r\n\t\t\t\tpos: null,\r\n\t\t\t\tstart_x: null,\r\n\t\t\t\tstart_y: null,\r\n\t\t\t\tobj: null,\r\n\t\t\t\tleft: null\r\n\t\t\t};\r\n\t\t\tthis.dragMultiple = {};\r\n\t\t},\r\n\t\t_resize: function(task, shift, drag) {\r\n\t\t\tvar cfg = timeline.$getConfig();\r\n\t\t\tvar coords_x = this._drag_task_coords(task, drag);\r\n\t\t\tif (drag.left) {\r\n\t\t\t\ttask.start_date = gantt.dateFromPos(coords_x.start + shift);\r\n\t\t\t\tif (!task.start_date) {\r\n\t\t\t\t\ttask.start_date = new Date(gantt.getState().min_date);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\ttask.end_date = gantt.dateFromPos(coords_x.end + shift);\r\n\t\t\t\tif (!task.end_date) {\r\n\t\t\t\t\ttask.end_date = new Date(gantt.getState().max_date);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar minDurationInUnits = this._calculateMinDuration(cfg.min_duration, cfg.duration_unit);\r\n\t\t\tif (task.end_date - task.start_date < cfg.min_duration) {\r\n\t\t\t\tif (drag.left)\r\n\t\t\t\t\ttask.start_date = gantt.calculateEndDate(task.end_date, -minDurationInUnits, cfg.duration_unit, task);\r\n\t\t\t\telse\r\n\t\t\t\t\ttask.end_date = gantt.calculateEndDate(task.start_date, minDurationInUnits, cfg.duration_unit, task);\r\n\t\t\t}\r\n\t\t\tgantt._init_task_timing(task);\r\n\t\t},\r\n\t\t_calculateMinDuration: function(duration, unit) {\r\n\t\t\tvar inMs = {\r\n\t\t\t\t\"minute\": 60000,\r\n\t\t\t\t\"hour\": 3600000,\r\n\t\t\t\t\"day\": 86400000,\r\n\t\t\t\t\"week\": 604800000,\r\n\t\t\t\t\"month\": 2419200000,\r\n\t\t\t\t\"year\": 31356000000\r\n\t\t\t};\r\n\t\t\treturn Math.ceil(duration / inMs[unit]);\r\n\t\t},\r\n\t\t_resize_progress: function(task, shift, drag) {\r\n\t\t\tvar coords_x = this._drag_task_coords(task, drag);\r\n\r\n\t\t\tvar config = timeline.$getConfig();\r\n\t\t\tvar diffValue = !config.rtl ? (drag.pos.x - coords_x.start) : (coords_x.start - drag.pos.x);\r\n\r\n\t\t\tvar diff = Math.max(0, diffValue);\r\n\t\t\ttask.progress = Math.min(1, diff / Math.abs(coords_x.end - coords_x.start));\r\n\t\t},\r\n\t\t_find_max_shift: function(dragItems, shift) {\r\n\t\t\tvar correctShift;\r\n\t\t\tfor (var i in dragItems) {\r\n\t\t\t\tvar drag = dragItems[i];\r\n\t\t\t\tvar task = gantt.getTask(drag.id);\r\n\r\n\t\t\t\tvar coords_x = this._drag_task_coords(task, drag);\r\n\t\t\t\tvar minX = gantt.posFromDate(new Date(gantt.getState().min_date));\r\n\t\t\t\tvar maxX = gantt.posFromDate(new Date(gantt.getState().max_date));\r\n\r\n\t\t\t\tif (coords_x.end + shift > maxX) {\r\n\t\t\t\t\tvar maxShift = maxX - coords_x.end;\r\n\t\t\t\t\tif (maxShift < correctShift || correctShift === undefined) {\r\n\t\t\t\t\t\tcorrectShift = maxShift;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (coords_x.start + shift < minX) {\r\n\t\t\t\t\tvar minShift = minX - coords_x.start;\r\n\t\t\t\t\tif (minShift > correctShift || correctShift === undefined) {\r\n\t\t\t\t\t\tcorrectShift = minShift;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn correctShift;\r\n\t\t},\r\n\t\t_move: function(task, shift, drag, multipleDragShift) {\r\n\t\t\tvar coords_x = this._drag_task_coords(task, drag);\r\n\t\t\tvar new_start = null,\r\n\t\t\tnew_end = null;\r\n\t\t\t// GS-454: If we drag multiple tasks, rely on the dates instead of timeline coordinates\r\n\t\t\tif (multipleDragShift){\r\n\t\t\t\tnew_start = new Date(+drag.obj.start_date + multipleDragShift),\r\n\t\t\t\tnew_end = new Date(+drag.obj.end_date + multipleDragShift);\r\n\t\t\t} else {\r\n\t\t\t\tnew_start = gantt.dateFromPos(coords_x.start + shift),\r\n\t\t\t\tnew_end = gantt.dateFromPos(coords_x.end + shift);\r\n\t\t\t}\r\n\t\t\tif (!new_start) {\r\n\t\t\t\ttask.start_date = new Date(gantt.getState().min_date);\r\n\t\t\t\ttask.end_date = gantt.dateFromPos(gantt.posFromDate(task.start_date) + (coords_x.end - coords_x.start));\r\n\t\t\t} else if (!new_end) {\r\n\t\t\t\ttask.end_date = new Date(gantt.getState().max_date);\r\n\t\t\t\ttask.start_date = gantt.dateFromPos(gantt.posFromDate(task.end_date) - (coords_x.end - coords_x.start));\r\n\t\t\t} else {\r\n\t\t\t\ttask.start_date = new_start;\r\n\t\t\t\ttask.end_date = new_end;\r\n\t\t\t}\r\n\t\t},\r\n\t\t_drag_task_coords: function(t, drag) {\r\n\t\t\tvar start = drag.obj_s_x = drag.obj_s_x || gantt.posFromDate(t.start_date);\r\n\t\t\tvar end = drag.obj_e_x = drag.obj_e_x || gantt.posFromDate(t.end_date);\r\n\t\t\treturn {\r\n\t\t\t\tstart: start,\r\n\t\t\t\tend: end\r\n\t\t\t};\r\n\t\t},\r\n\t\t_mouse_position_change: function(oldPos, newPos) {\r\n\t\t\tvar dx = oldPos.x - newPos.x,\r\n\t\t\t\tdy = oldPos.y - newPos.y;\r\n\t\t\treturn Math.sqrt(dx * dx + dy * dy);\r\n\t\t},\r\n\t\t_is_number: function(n) {\r\n\t\t\treturn !isNaN(parseFloat(n)) && isFinite(n);\r\n\t\t},\r\n\r\n\t\ton_mouse_move: function(e) {\r\n\t\t\tif (this.drag.start_drag) {\r\n\t\t\t\tvar pos = domHelpers.getRelativeEventPosition(e, gantt.$task_data);\r\n\r\n\t\t\t\tvar sX = this.drag.start_drag.start_x,\r\n\t\t\t\t\tsY = this.drag.start_drag.start_y;\r\n\r\n\t\t\t\tif ((Date.now() - this.drag.timestamp > 50) ||\r\n\t\t\t\t\t(this._is_number(sX) && this._is_number(sY) && this._mouse_position_change({\r\n\t\t\t\t\t\tx: sX,\r\n\t\t\t\t\t\ty: sY\r\n\t\t\t\t\t}, pos) > 20)) {\r\n\t\t\t\t\tthis._start_dnd(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar drag = this.drag;\r\n\r\n\t\t\tif (drag.mode) {\r\n\t\t\t\tif (!timeout(this, 40))//limit update frequency\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\tthis._update_on_move(e);\r\n\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_update_item_on_move: function(shift, id, mode, drag, e, multipleDragShift) {\r\n\t\t\tvar task = gantt.getTask(id);\r\n\t\t\tvar original = gantt.mixin({}, task);\r\n\t\t\tvar copy = gantt.mixin({}, task);\r\n\t\t\tthis._handlers[mode].apply(this, [copy, shift, drag, multipleDragShift]);\r\n\t\t\tgantt.mixin(task, copy, true);\r\n\t\t\t//gantt._update_parents(drag.id, true);\r\n\t\t\tgantt.callEvent(\"onTaskDrag\", [task.id, mode, copy, original, e]);\r\n\t\t\tgantt.mixin(task, copy, true);\r\n\t\t\tgantt.refreshTask(id);\r\n\t\t},\r\n\r\n\t\t_update_on_move: function(e) {\r\n\t\t\tvar drag = this.drag;\r\n\t\t\tvar config = timeline.$getConfig();\r\n\t\t\tif (drag.mode) {\r\n\t\t\t\tvar pos = domHelpers.getRelativeEventPosition(e, timeline.$task_data);\r\n\t\t\t\tif (drag.pos && drag.pos.x == pos.x)\r\n\t\t\t\t\treturn;\r\n\r\n\t\t\t\tdrag.pos = pos;\r\n\r\n\t\t\t\tvar curr_date = gantt.dateFromPos(pos.x);\r\n\t\t\t\tif (!curr_date || isNaN(curr_date.getTime()))\r\n\t\t\t\t\treturn;\r\n\r\n\r\n\t\t\t\tvar shift = pos.x - drag.start_x;\r\n\t\t\t\tvar task = gantt.getTask(drag.id);\r\n\t\t\t\tif (this._handlers[drag.mode]) {\r\n\t\t\t\t\tif (drag.mode === config.drag_mode.move) {\r\n\t\t\t\t\t\tvar dragHash = {};\r\n\r\n\t\t\t\t\t\tif (this._isMultiselect()) {\r\n\t\t\t\t\t\t\tvar selectedTasksIds = gantt.getSelectedTasks();\r\n\t\t\t\t\t\t\tif (selectedTasksIds.indexOf(drag.id) >= 0) {\r\n\t\t\t\t\t\t\t\tdragHash = this.dragMultiple;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tvar dragProject = false;\r\n\t\t\t\t\t\tif (gantt.isSummaryTask(task) && gantt.config.drag_project) {\r\n\t\t\t\t\t\t\tvar initialDrag = {};\r\n\t\t\t\t\t\t\tinitialDrag[drag.id] = utils.copy(drag);\r\n\t\t\t\t\t\t\tdragProject = true;\r\n\t\t\t\t\t\t\tdragHash = utils.mixin(initialDrag, this.dragMultiple);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tvar maxShift = this._find_max_shift(dragHash, shift);\r\n\t\t\t\t\t\tif (maxShift !== undefined) {\r\n\t\t\t\t\t\t\tshift = maxShift;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis._update_item_on_move(shift, drag.id, drag.mode, drag, e);\r\n\r\n\t\t\t\t\t\tfor (var i in dragHash) {\r\n\t\t\t\t\t\t\tvar childDrag = dragHash[i];\r\n\t\t\t\t\t\t\tif(dragProject && childDrag.id != drag.id){\r\n\t\t\t\t\t\t\t\tgantt._bulk_dnd = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// GS-454: Calculate the date shift in milliseconds instead of pixels\r\n\t\t\t\t\t\t\tif (maxShift === undefined && (dragProject || Object.keys(dragHash).length > 1)) {\r\n\t\t\t\t\t\t\t\tvar shiftDate = gantt.dateFromPos(drag.start_x);\r\n\t\t\t\t\t\t\t\tvar multipleDragShift = curr_date - shiftDate;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tthis._update_item_on_move(shift, childDrag.id, childDrag.mode, childDrag, e, multipleDragShift);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tgantt._bulk_dnd = false;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// for resize and progress\r\n\t\t\t\t\t\tthis._update_item_on_move(shift, drag.id, drag.mode, drag, e);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tgantt._update_parents(drag.id);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\ton_mouse_down: function(e, src) {\r\n\t\t\t// on Mac we do not get onmouseup event when clicking right mouse button leaving us in dnd state\r\n\t\t\t// let's ignore right mouse button then\r\n\t\t\tif (e.button == 2 && e.button !== undefined)\r\n\t\t\t\treturn;\r\n\r\n\t\t\tvar config = timeline.$getConfig();\r\n\t\t\tvar id = gantt.locate(e);\r\n\t\t\tvar task = null;\r\n\t\t\tif (gantt.isTaskExists(id)) {\r\n\t\t\t\ttask = gantt.getTask(id);\r\n\t\t\t}\r\n\r\n\t\t\tif (gantt.isReadonly(task) || this.drag.mode) return;\r\n\r\n\t\t\tthis.clear_drag_state();\r\n\r\n\t\t\tsrc = src || (e.target || e.srcElement);\r\n\r\n\t\t\tvar className = domHelpers.getClassName(src);\r\n\t\t\tvar drag = this._get_drag_mode(className, src);\r\n\r\n\t\t\tif (!className || !drag) {\r\n\t\t\t\tif (src.parentNode)\r\n\t\t\t\t\treturn this.on_mouse_down(e, src.parentNode);\r\n\t\t\t\telse\r\n\t\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (!drag) {\r\n\t\t\t\tif (gantt.checkEvent(\"onMouseDown\") && gantt.callEvent(\"onMouseDown\", [className.split(\" \")[0]])) {\r\n\t\t\t\t\tif (src.parentNode)\r\n\t\t\t\t\t\treturn this.on_mouse_down(e, src.parentNode);\r\n\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (drag.mode && drag.mode != config.drag_mode.ignore && config[\"drag_\" + drag.mode]) {\r\n\t\t\t\t\tid = gantt.locate(src);\r\n\t\t\t\t\ttask = gantt.copy(gantt.getTask(id) || {});\r\n\r\n\t\t\t\t\tif (gantt.isReadonly(task)) {\r\n\t\t\t\t\t\tthis.clear_drag_state();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ((gantt.isSummaryTask(task) && !(task.auto_scheduling === false) && !config.drag_project) && drag.mode != config.drag_mode.progress) {//only progress drag is allowed for tasks with flexible duration\r\n\t\t\t\t\t\tthis.clear_drag_state();\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdrag.id = id;\r\n\t\t\t\t\tvar pos = domHelpers.getRelativeEventPosition(e, gantt.$task_data);\r\n\r\n\t\t\t\t\tdrag.start_x = pos.x;\r\n\t\t\t\t\tdrag.start_y = pos.y;\r\n\t\t\t\t\tdrag.obj = task;\r\n\t\t\t\t\tthis.drag.start_drag = drag;\r\n\t\t\t\t\tthis.drag.timestamp = Date.now();\r\n\r\n\t\t\t\t} else\r\n\t\t\t\t\tthis.clear_drag_state();\r\n\t\t\t}\r\n\t\t},\r\n\t\t_fix_dnd_scale_time: function(task, drag) {\r\n\t\t\tvar config = timeline.$getConfig();\r\n\t\t\tvar unit = gantt.getScale().unit,\r\n\t\t\t\tstep = gantt.getScale().step;\r\n\t\t\tif (!config.round_dnd_dates) {\r\n\t\t\t\tunit = 'minute';\r\n\t\t\t\tstep = config.time_step;\r\n\t\t\t}\r\n\r\n\t\t\tfunction fixStart(task) {\r\n\t\t\t\tif (!gantt.config.correct_work_time)\r\n\t\t\t\t\treturn;\r\n\t\t\t\tvar config = timeline.$getConfig();\r\n\t\t\t\tif (!gantt.isWorkTime(task.start_date, undefined, task))\r\n\t\t\t\t\ttask.start_date = gantt.calculateEndDate({\r\n\t\t\t\t\t\tstart_date: task.start_date,\r\n\t\t\t\t\t\tduration: -1,\r\n\t\t\t\t\t\tunit: config.duration_unit,\r\n\t\t\t\t\t\ttask: task\r\n\t\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tfunction fixEnd(task) {\r\n\t\t\t\tif (!gantt.config.correct_work_time)\r\n\t\t\t\t\treturn;\r\n\t\t\t\tvar config = timeline.$getConfig();\r\n\t\t\t\tif (!gantt.isWorkTime(new Date(task.end_date - 1), undefined, task))\r\n\t\t\t\t\ttask.end_date = gantt.calculateEndDate({\r\n\t\t\t\t\t\tstart_date: task.end_date,\r\n\t\t\t\t\t\tduration: 1,\r\n\t\t\t\t\t\tunit: config.duration_unit,\r\n\t\t\t\t\t\ttask: task\r\n\t\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (drag.mode == config.drag_mode.resize) {\r\n\t\t\t\tif (drag.left) {\r\n\t\t\t\t\ttask.start_date = gantt.roundDate({date: task.start_date, unit: unit, step: step});\r\n\t\t\t\t\tfixStart(task);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttask.end_date = gantt.roundDate({date: task.end_date, unit: unit, step: step});\r\n\t\t\t\t\tfixEnd(task);\r\n\t\t\t\t}\r\n\t\t\t} else if (drag.mode == config.drag_mode.move) {\r\n\t\t\t\ttask.start_date = gantt.roundDate({date: task.start_date, unit: unit, step: step});\r\n\t\t\t\tfixStart(task);\r\n\t\t\t\ttask.end_date = gantt.calculateEndDate(task);\r\n\t\t\t}\r\n\t\t},\r\n\t\t_fix_working_times: function(task, drag) {\r\n\t\t\tvar config = timeline.$getConfig();\r\n\t\t\tvar drag = drag || {mode: config.drag_mode.move};\r\n\r\n\t\t\tif (drag.mode == config.drag_mode.resize) {\r\n\t\t\t\tif (drag.left) {\r\n\t\t\t\t\ttask.start_date = gantt.getClosestWorkTime({date: task.start_date, dir: 'future', task: task});\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttask.end_date = gantt.getClosestWorkTime({date: task.end_date, dir: 'past', task: task});\r\n\t\t\t\t}\r\n\t\t\t} else if (drag.mode == config.drag_mode.move) {\r\n\t\t\t\tgantt.correctTaskWorkTime(task);\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\t_finalize_mouse_up: function(taskId, config, drag, e) {\r\n\t\t\tvar task = gantt.getTask(taskId);\r\n\r\n\t\t\tif (config.work_time && config.correct_work_time) {\r\n\t\t\t\tthis._fix_working_times(task, drag);\r\n\t\t\t}\r\n\r\n\t\t\tthis._fix_dnd_scale_time(task, drag);\r\n\r\n\t\t\tif (!this._fireEvent(\"before_finish\", drag.mode, [taskId, drag.mode, gantt.copy(drag.obj), e])) {\r\n\t\t\t\t//drag.obj._dhx_changed = false;\r\n\t\t\t\tthis.clear_drag_state();\r\n\t\t\t\tif (taskId == drag.id) {\r\n\t\t\t\t\tdrag.obj._dhx_changed = false;\r\n\t\t\t\t\tgantt.mixin(task, drag.obj, true);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\tgantt.refreshTask(task.id);\r\n\t\t\t} else {\r\n\t\t\t\tvar drag_id = taskId;\r\n\r\n\t\t\t\tgantt._init_task_timing(task);\r\n\r\n\t\t\t\tthis.clear_drag_state();\r\n\t\t\t\tgantt.updateTask(task.id);\r\n\t\t\t\tthis._fireEvent(\"after_finish\", drag.mode, [drag_id, drag.mode, e]);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\ton_mouse_up: function(e) {\r\n\r\n\t\t\tvar drag = this.drag;\r\n\t\t\tif (drag.mode && drag.id) {\r\n\t\t\t\tvar config = timeline.$getConfig();\r\n\t\t\t\t//drop\r\n\t\t\t\tvar task = gantt.getTask(drag.id);\r\n\t\t\t\tvar dragMultiple = this.dragMultiple;\r\n\r\n\t\t\t\tvar finalizingBulkMove = false;\r\n\t\t\t\tvar moveCount = 0;\r\n\t\t\t\tif (drag.mode === config.drag_mode.move) {\r\n\t\t\t\t\tif ((gantt.isSummaryTask(task) && config.drag_project) || (this._isMultiselect())) {\r\n\t\t\t\t\t\tfinalizingBulkMove = true;\r\n\t\t\t\t\t\tmoveCount = Object.keys(dragMultiple).length;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar doFinalize = function doFinalize(){\r\n\t\t\t\t\tif(finalizingBulkMove){\r\n\t\t\t\t\t\tfor (var i in dragMultiple) {\r\n\t\t\t\t\t\t\t// GS-1057: Don't call drag events for the dragged task as they will be called later\r\n\t\t\t\t\t\t\tif (dragMultiple[i].id != drag.id){\r\n\t\t\t\t\t\t\t\tthis._finalize_mouse_up(dragMultiple[i].id, config, dragMultiple[i], e);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._finalize_mouse_up(drag.id, config, drag, e);\r\n\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif(finalizingBulkMove && moveCount > 10){// 10 - arbitrary threshold for bulk dnd at which we start doing complete repaint to refresh\r\n\t\t\t\t\tgantt.batchUpdate(function(){\r\n\t\t\t\t\t\tdoFinalize.call(this);\r\n\t\t\t\t\t}.bind(this));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdoFinalize.call(this);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tthis.clear_drag_state();\r\n\t\t},\r\n\t\t_get_drag_mode: function(className, el) {\r\n\t\t\tvar config = timeline.$getConfig();\r\n\t\t\tvar modes = config.drag_mode;\r\n\t\t\tvar classes = (className || \"\").split(\" \");\r\n\t\t\tvar classname = classes[0];\r\n\t\t\tvar drag = {mode: null, left: null};\r\n\t\t\tswitch (classname) {\r\n\t\t\t\tcase \"gantt_task_line\":\r\n\t\t\t\tcase \"gantt_task_content\":\r\n\t\t\t\t\tdrag.mode = modes.move;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"gantt_task_drag\":\r\n\t\t\t\t\tdrag.mode = modes.resize;\r\n\r\n\t\t\t\t\tvar dragProperty = el.getAttribute(\"data-bind-property\");\r\n\r\n\t\t\t\t\tif (dragProperty == \"start_date\") {\r\n\t\t\t\t\t\tdrag.left = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tdrag.left = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"gantt_task_progress_drag\":\r\n\t\t\t\t\tdrag.mode = modes.progress;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"gantt_link_control\":\r\n\t\t\t\tcase \"gantt_link_point\":\r\n\t\t\t\t\tdrag.mode = modes.ignore;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tdrag = null;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn drag;\r\n\r\n\t\t},\r\n\r\n\t\t_start_dnd: function(e) {\r\n\t\t\tvar drag = this.drag = this.drag.start_drag;\r\n\t\t\tdelete drag.start_drag;\r\n\r\n\t\t\tvar cfg = timeline.$getConfig();\r\n\t\t\tvar id = drag.id;\r\n\r\n\t\t\tif (!cfg[\"drag_\" + drag.mode] || !gantt.callEvent(\"onBeforeDrag\", [id, drag.mode, e]) || !this._fireEvent(\"before_start\", drag.mode, [id, drag.mode, e])) {\r\n\t\t\t\tthis.clear_drag_state();\r\n\t\t\t} else {\r\n\t\t\t\tdelete drag.start_drag;\r\n\t\t\t\tvar task = gantt.getTask(id);\r\n\t\t\t\tif (gantt.isReadonly(task)){\r\n\t\t\t\t\tthis.clear_drag_state();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (this._isMultiselect()) {\r\n\t\t\t\t\t// for don't move selected tasks when drag unselected task\r\n\t\t\t\t\tvar selectedTasksIds = gantt.getSelectedTasks();\r\n\t\t\t\t\tif (selectedTasksIds.indexOf(drag.id) >= 0) {\r\n\t\t\t\t\t\thelpers.forEach(selectedTasksIds, gantt.bind(function(taskId) {\r\n\t\t\t\t\t\t\tvar selectedTask = gantt.getTask(taskId);\r\n\t\t\t\t\t\t\tif (gantt.isSummaryTask(selectedTask) && gantt.config.drag_project && drag.mode == cfg.drag_mode.move) {\r\n\t\t\t\t\t\t\t\tthis._addSubtasksToDragMultiple(selectedTask.id);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tthis.dragMultiple[taskId] = gantt.mixin({\r\n\t\t\t\t\t\t\t\tid: selectedTask.id,\r\n\t\t\t\t\t\t\t\tobj: gantt.copy(selectedTask)\r\n\t\t\t\t\t\t\t}, this.drag);\r\n\t\t\t\t\t\t}, this));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// for move unselected summary\r\n\t\t\t\tif (gantt.isSummaryTask(task) && gantt.config.drag_project && drag.mode == cfg.drag_mode.move) {\r\n\t\t\t\t\tthis._addSubtasksToDragMultiple(task.id);\r\n\t\t\t\t}\r\n\t\t\t\tgantt.callEvent(\"onTaskDragStart\", []);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\t_fireEvent: function(stage, mode, params) {\r\n\t\t\tgantt.assert(this._events[stage], \"Invalid stage:{\" + stage + \"}\");\r\n\r\n\t\t\tvar trigger = this._events[stage][mode];\r\n\r\n\t\t\tgantt.assert(trigger, \"Unknown after drop mode:{\" + mode + \"}\");\r\n\t\t\tgantt.assert(params, \"Invalid event arguments\");\r\n\r\n\r\n\t\t\tif (!gantt.checkEvent(trigger))\r\n\t\t\t\treturn true;\r\n\r\n\t\t\treturn gantt.callEvent(trigger, params);\r\n\t\t},\r\n\r\n\t\tround_task_dates: function(task) {\r\n\t\t\tvar drag_state = this.drag;\r\n\t\t\tvar config = timeline.$getConfig();\r\n\t\t\tif (!drag_state) {\r\n\t\t\t\tdrag_state = {mode: config.drag_mode.move};\r\n\t\t\t}\r\n\t\t\tthis._fix_dnd_scale_time(task, drag_state);\r\n\t\t},\r\n\t\tdestructor: function() {\r\n\t\t\tthis._domEvents.detachAll();\r\n\t\t},\r\n\t\t_isMultiselect: function() {\r\n\t\t\treturn gantt.config.drag_multiple && !!(gantt.getSelectedTasks && gantt.getSelectedTasks().length > 0);\r\n\t\t},\r\n\t\t_addSubtasksToDragMultiple: function(summaryId) {\r\n\t\t\tgantt.eachTask(function(child) {\r\n\t\t\t\tthis.dragMultiple[child.id] = gantt.mixin({\r\n\t\t\t\t\tid: child.id,\r\n\t\t\t\t\tobj: gantt.copy(child)\r\n\t\t\t\t}, this.drag);\r\n\t\t\t}, summaryId, this);\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction initTaskDND() {\r\n\tvar _tasks_dnd;\r\n\treturn {\r\n\t\textend: function(timeline) {\r\n\t\t\ttimeline.roundTaskDates = function(task) {\r\n\t\t\t\t_tasks_dnd.round_task_dates(task);\r\n\t\t\t};\r\n\r\n\t\t},\r\n\t\tinit: function(timeline, gantt) {\r\n\t\t\t_tasks_dnd = createTaskDND(timeline, gantt);\r\n\t\t\t// TODO: entry point for touch handlers, move touch to timeline\r\n\t\t\ttimeline._tasks_dnd = _tasks_dnd;\r\n\t\t\treturn _tasks_dnd.init(gantt);\r\n\t\t},\r\n\t\tdestructor: function() {\r\n\t\t\tif (_tasks_dnd) {\r\n\t\t\t\t_tasks_dnd.destructor();\r\n\t\t\t\t_tasks_dnd = null;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default {\r\n\tcreateTaskDND: initTaskDND\r\n};","import * as domHelpers from \"../utils/dom_helpers\";\r\n\r\nvar initLinksDND = function(timeline, gantt) {\r\n\tvar _link_landing,\r\n\t\t_link_target_task,\r\n\t\t_link_target_task_start,\r\n\t\t_link_source_task,\r\n\t\t_link_source_task_start,\r\n\t\tmarkerDefaultOffset = 10,\r\n\t\tscrollDefaultSize = 18;\r\n\r\n\tfunction getDndState(){\r\n\t\treturn {\r\n\t\t\tlink_source_id : _link_source_task,\r\n\t\t\tlink_target_id : _link_target_task,\r\n\t\t\tlink_from_start : _link_source_task_start,\r\n\t\t\tlink_to_start : _link_target_task_start,\r\n\t\t\tlink_landing_area : _link_landing\r\n\t\t};\r\n\t}\r\n\r\n\tvar services = gantt.$services;\r\n\r\n\tvar state = services.getService(\"state\");\r\n\tvar DnD = services.getService(\"dnd\");\r\n\r\n\tstate.registerProvider(\"linksDnD\", getDndState);\r\n\r\n\tvar start_marker = \"task_start_date\",\r\n\t\tend_marker = \"task_end_date\",\r\n\t\tlink_edge_marker = \"gantt_link_point\",\r\n\t\tlink_landing_hover_area = \"gantt_link_control\";\r\n\r\n\tvar dnd = new DnD(timeline.$task_bars, {\r\n\t\tsensitivity : 0,\r\n\t\tupdates_per_second : 60,\r\n\t\tmousemoveContainer: gantt.$root,\r\n\t\tselector: \".\" + link_edge_marker,\r\n\t\tpreventDefault: true\r\n\t});\r\n\r\n\tdnd.attachEvent(\"onBeforeDragStart\", gantt.bind(function(obj,e) {\r\n\t\tvar target = (e.target||e.srcElement);\r\n\t\tresetDndState();\r\n\t\tif(gantt.getState(\"tasksDnd\").drag_id)\r\n\t\t\treturn false;\r\n\r\n\t\tif(domHelpers.locateClassName(target, link_edge_marker)){\r\n\t\t\tif(domHelpers.locateClassName(target, start_marker))\r\n\t\t\t\t_link_source_task_start = true;\r\n\r\n\t\t\tvar sid = gantt.locate(e);\r\n\t\t\t_link_source_task = sid;\r\n\r\n\t\t\tvar t = gantt.getTask(sid);\r\n\t\t\tif(gantt.isReadonly(t)){\r\n\t\t\t\tresetDndState();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tthis._dir_start = {\r\n\t\t\t\tx: dnd.config.original_element_sizes.x + dnd.config.original_element_sizes.width/2,\r\n\t\t\t\ty: dnd.config.original_element_sizes.y + dnd.config.original_element_sizes.height/2\r\n\t\t\t};\r\n\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}, this));\r\n\r\n\tdnd.attachEvent(\"onAfterDragStart\", gantt.bind(function(obj,e) {\r\n\t\tif(gantt.config.touch) {\r\n\t\t\tgantt.refreshData();\r\n\t\t}\r\n\t\tupdateMarkedHtml(dnd.config.marker);\r\n\t}, this));\r\n\r\n\tfunction getVieportSize(){\r\n\t\tvar root = gantt.$root;\r\n\t\treturn { right: root.offsetWidth, bottom: root.offsetHeight };\r\n\t}\r\n\tfunction getMarkerSize (marker){\r\n\t\tvar width = 0, height = 0;\r\n\t\tif(marker){\r\n\t\t\twidth = marker.offsetWidth || 0;\r\n\t\t\theight = marker.offsetHeight || 0;\r\n\t\t}\r\n\t\treturn { width: width, height: height };\r\n\t}\r\n\r\n\tfunction getPosition(e, marker){\r\n\t\tvar oldPos = dnd.getPosition(e);\r\n\r\n\t\tvar markerSize = getMarkerSize(marker);\r\n\t\tvar viewportSize = getVieportSize();\r\n\r\n\t\tvar offsetX = gantt.config.tooltip_offset_x || markerDefaultOffset;\r\n\t\tvar offsetY = gantt.config.tooltip_offset_y || markerDefaultOffset;\r\n\r\n\t\tvar scrollSize = gantt.config.scroll_size || scrollDefaultSize;\r\n\r\n\t\t// GS-1315: Add offset if there are elements above Gantt\r\n\t\tvar ganttOffsetY = gantt.$container.getBoundingClientRect().y + window.scrollY;\r\n\r\n\t\tvar position = {\r\n\t\t\ty: oldPos.y + offsetY,\r\n\t\t\tx: oldPos.x + offsetX,\r\n\t\t\tbottom: oldPos.y + markerSize.height + offsetY + scrollSize,\r\n\t\t\tright: oldPos.x + markerSize.width + offsetX + scrollSize\r\n\t\t};\r\n\r\n\t\tif(position.bottom > viewportSize.bottom + ganttOffsetY){\r\n\t\t\tposition.y = viewportSize.bottom + ganttOffsetY - markerSize.height - offsetY;\r\n\t\t}\r\n\r\n\t\tif(position.right > viewportSize.right){\r\n\t\t\tposition.x = viewportSize.right - markerSize.width - offsetX;\r\n\t\t}\r\n\t\treturn position;\r\n\t}\r\n\r\n\tdnd.attachEvent(\"onDragMove\", gantt.bind(function(obj,e) {\r\n\t\tvar dd = dnd.config;\r\n\t\tvar pos = getPosition(e, dd.marker);\r\n\t\tadvanceMarker(dd.marker, pos);\r\n\t\tvar landing = !!domHelpers.locateClassName(e, link_landing_hover_area);\r\n\r\n\t\tvar prevTarget = _link_target_task;\r\n\t\tvar prevLanding = _link_landing;\r\n\t\tvar prevToStart = _link_target_task_start;\r\n\r\n\t\tvar targ = gantt.locate(e),\r\n\t\t\tto_start = true;\r\n\r\n\t\t// can drag and drop link to another gantt on the page, such links are not supported\r\n\t\tvar eventTarget = domHelpers.getTargetNode(e);\r\n\r\n\t\tvar sameGantt = domHelpers.isChildOf(eventTarget, gantt.$root);\r\n\t\tif(!sameGantt){\r\n\t\t\tlanding = false;\r\n\t\t\ttarg = null;\r\n\t\t}\r\n\r\n\t\tif(landing){\r\n\t\t\t//refreshTask\r\n\t\t\tto_start = !domHelpers.locateClassName(e, end_marker);\r\n\t\t\tlanding = !!targ;\r\n\t\t}\r\n\r\n\t\t_link_target_task = targ;\r\n\t\t_link_landing = landing;\r\n\t\t_link_target_task_start = to_start;\r\n\r\n\t\tif(landing){\r\n\r\n\t\t\tvar node = domHelpers.locateClassName(e, link_landing_hover_area);\r\n\t\t\r\n\t\t\tconst point = node.querySelector(`.${link_edge_marker}`);\r\n\t\t\tif(point){\r\n\t\t\t\tconst absCoords = domHelpers.getRelativeNodePosition(point, timeline.$task_data);\r\n\t\t\t\tthis._dir_end = {\r\n\t\t\t\t\tx: absCoords.x + point.offsetWidth/2,\r\n\t\t\t\t\ty: absCoords.y + point.offsetHeight/2\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t}else{\r\n\t\t\tthis._dir_end = domHelpers.getRelativeEventPosition(e, timeline.$task_data);\r\n\t\t\tif(gantt.env.isEdge){ // to fix margin collapsing\r\n\t\t\t\tthis._dir_end.y += window.scrollY;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar targetChanged = !(prevLanding == landing && prevTarget == targ && prevToStart == to_start);\r\n\t\tif(targetChanged){\r\n\t\t\tif(prevTarget)\r\n\t\t\t\tgantt.refreshTask(prevTarget, false);\r\n\t\t\tif(targ)\r\n\t\t\t\tgantt.refreshTask(targ, false);\r\n\t\t}\r\n\r\n\t\tif(targetChanged){\r\n\t\t\tupdateMarkedHtml(dd.marker);\r\n\t\t}\r\n\r\n\t\tshowDirectingLine(this._dir_start.x, this._dir_start.y, this._dir_end.x, this._dir_end.y);\r\n\r\n\t\treturn true;\r\n\t}, this));\r\n\r\n\r\n\tdnd.attachEvent(\"onDragEnd\", gantt.bind(function() {\r\n\t\tvar drag = getDndState();\r\n\r\n\t\tif(drag.link_source_id && drag.link_target_id && drag.link_source_id != drag.link_target_id){\r\n\t\t\tvar type = gantt._get_link_type(drag.link_from_start, drag.link_to_start);\r\n\r\n\t\t\tvar link = {source : drag.link_source_id, target: drag.link_target_id, type:type};\r\n\t\t\tif(link.type && gantt.isLinkAllowed(link)) {\r\n\t\t\t\tif(gantt.callEvent(\"onLinkCreated\", [link])){\r\n\t\t\t\t\tgantt.addLink(link);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tresetDndState();\r\n\r\n\t\tif(gantt.config.touch) {\r\n\t\t\tgantt.refreshData();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif (drag.link_source_id)\r\n\t\t\t\tgantt.refreshTask(drag.link_source_id, false);\r\n\t\t\tif (drag.link_target_id)\r\n\t\t\t\tgantt.refreshTask(drag.link_target_id, false);\r\n\t\t}\r\n\t\tremoveDirectionLine();\r\n\t}, this));\r\n\r\n\tfunction updateMarkedHtml(marker){\r\n\t\tvar link = getDndState();\r\n\r\n\t\tvar css = [\"gantt_link_tooltip\"];\r\n\t\tif(link.link_source_id && link.link_target_id){\r\n\t\t\tif(gantt.isLinkAllowed(link.link_source_id, link.link_target_id, link.link_from_start, link.link_to_start)){\r\n\t\t\t\tcss.push(\"gantt_allowed_link\");\r\n\t\t\t}else{\r\n\t\t\t\tcss.push(\"gantt_invalid_link\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar className = gantt.templates.drag_link_class(link.link_source_id, link.link_from_start, link.link_target_id, link.link_to_start);\r\n\t\tif(className)\r\n\t\t\tcss.push(className);\r\n\r\n\t\tvar html = \"
\" +\r\n\t\t\tgantt.templates.drag_link(link.link_source_id, link.link_from_start, link.link_target_id, link.link_to_start) +\r\n\t\t\t\"
\";\r\n\t\tmarker.innerHTML = html;\r\n\t}\r\n\r\n\tfunction advanceMarker(marker, pos){\r\n\t\tmarker.style.left = pos.x + \"px\";\r\n\t\tmarker.style.top = pos.y + \"px\";\r\n\t}\r\n\r\n\tfunction resetDndState(){\r\n\t\t_link_source_task =\r\n\t\t\t_link_source_task_start =\r\n\t\t\t\t_link_target_task = null;\r\n\t\t_link_target_task_start = true;\r\n\t}\r\n\tfunction showDirectingLine(s_x, s_y, e_x, e_y){\r\n\t\tvar div = getDirectionLine();\r\n\r\n\t\tvar link = getDndState();\r\n\r\n\t\tvar css = [\"gantt_link_direction\"];\r\n\t\tif(gantt.templates.link_direction_class){\r\n\t\t\tcss.push(gantt.templates.link_direction_class(link.link_source_id, link.link_from_start, link.link_target_id, link.link_to_start));\r\n\t\t}\r\n\r\n\t\tvar dist =Math.sqrt( (Math.pow(e_x - s_x, 2)) + (Math.pow(e_y - s_y, 2)) );\r\n\t\tdist = Math.max(0, dist - 3);\r\n\t\tif(!dist)\r\n\t\t\treturn;\r\n\r\n\t\tdiv.className = css.join(\" \");\r\n\t\tvar tan = (e_y - s_y)/(e_x - s_x),\r\n\t\t\tangle = Math.atan(tan);\r\n\r\n\t\tif(coordinateCircleQuarter(s_x, e_x, s_y, e_y) == 2){\r\n\t\t\tangle += Math.PI;\r\n\t\t}else if(coordinateCircleQuarter(s_x, e_x, s_y, e_y) == 3){\r\n\t\t\tangle -= Math.PI;\r\n\t\t}\r\n\r\n\r\n\r\n\t\tvar sin = Math.sin(angle),\r\n\t\t\tcos = Math.cos(angle),\r\n\t\t\ttop = Math.round(s_y),\r\n\t\t\tleft = Math.round(s_x);\r\n\r\n\r\n\t\tvar style = [\r\n\t\t\t\"-webkit-transform: rotate(\"+angle+\"rad)\",\r\n\t\t\t\"-moz-transform: rotate(\"+angle+\"rad)\",\r\n\t\t\t\"-ms-transform: rotate(\"+angle+\"rad)\",\r\n\t\t\t\"-o-transform: rotate(\"+angle+\"rad)\",\r\n\t\t\t\"transform: rotate(\"+angle+\"rad)\",\r\n\t\t\t\"width:\" + Math.round(dist) + \"px\"\r\n\t\t];\r\n\r\n\t\tif(window.navigator.userAgent.indexOf(\"MSIE 8.0\") != -1){\r\n\t\t\t//ms-filter breaks styles in ie9, so add it only for 8th\r\n\t\t\tstyle.push(\"-ms-filter: \\\"\" + ieTransform(sin, cos) + \"\\\"\");\r\n\r\n\t\t\tvar shiftLeft = Math.abs(Math.round(s_x - e_x)),\r\n\t\t\t\tshiftTop = Math.abs(Math.round(e_y - s_y));\r\n\t\t\t//fix rotation axis\r\n\t\t\tswitch(coordinateCircleQuarter(s_x, e_x, s_y, e_y)){\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\ttop -= shiftTop;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tleft -= shiftLeft;\r\n\t\t\t\t\ttop -= shiftTop;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tleft -= shiftLeft;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tstyle.push(\"top:\" + top + \"px\");\r\n\t\tstyle.push(\"left:\" + left + \"px\");\r\n\r\n\t\tdiv.style.cssText = style.join(\";\");\r\n\t}\r\n\r\n\tfunction ieTransform(sin, cos){\r\n\t\treturn \"progid:DXImageTransform.Microsoft.Matrix(\"+\r\n\t\t\t\"M11 = \"+cos+\",\"+\r\n\t\t\t\"M12 = -\"+sin+\",\"+\r\n\t\t\t\"M21 = \"+sin+\",\"+\r\n\t\t\t\"M22 = \"+cos+\",\"+\r\n\t\t\t\"SizingMethod = 'auto expand'\"+\r\n\t\t\")\";\r\n\t}\r\n\tfunction coordinateCircleQuarter(sX, eX, sY, eY){\r\n\t\tif(eX >= sX){\r\n\t\t\tif(eY <= sY){\r\n\t\t\t\treturn 1;\r\n\t\t\t}else{\r\n\t\t\t\treturn 4;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif(eY <= sY){\r\n\t\t\t\treturn 2;\r\n\t\t\t}else{\r\n\t\t\t\treturn 3;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\tfunction getDirectionLine(){\r\n\t\tif(!dnd._direction || !dnd._direction.parentNode){\r\n\t\t\tdnd._direction = document.createElement(\"div\");\r\n\t\t\ttimeline.$task_links.appendChild(dnd._direction);\r\n\t\t}\r\n\t\treturn dnd._direction;\r\n\t}\r\n\tfunction removeDirectionLine(){\r\n\t\tif(dnd._direction){\r\n\t\t\tif (dnd._direction.parentNode)\t//the event line can be detached because of data refresh\r\n\t\t\t\tdnd._direction.parentNode.removeChild(dnd._direction);\r\n\r\n\t\t\tdnd._direction = null;\r\n\t\t}\r\n\t}\r\n\tgantt.attachEvent(\"onGanttRender\", gantt.bind(function() {\r\n\t\tif(dnd._direction){\r\n\t\t\tshowDirectingLine(this._dir_start.x, this._dir_start.y, this._dir_end.x, this._dir_end.y);\r\n\t\t}\r\n\t}, this));\r\n};\r\n\r\nexport default {\r\n\tcreateLinkDND: function(){\r\n\t\treturn {\r\n\t\t\tinit: initLinksDND\r\n\t\t};\r\n\t}\r\n};","import * as utils from \"../../../utils/utils\";\r\nimport taskDnD from \"./tasks_dnd\";\r\nimport linkDnD from \"./links_dnd\";\r\nimport * as domHelpers from \"../utils/dom_helpers\";\r\nimport MouseDelegates from \"../mouse_event_container\";\r\n\r\nvar initializer = (function(){\r\n\treturn function(gantt){\r\n\t\tvar services = gantt.$services;\r\n\t\treturn {\r\n\t\t\tonCreated: function (timeline) {\r\n\t\t\t\tvar config = timeline.$config;\r\n\t\t\t\tconfig.bind = utils.defined(config.bind) ? config.bind : \"task\";\r\n\t\t\t\tconfig.bindLinks = utils.defined(config.bindLinks) ? config.bindLinks : \"link\";\r\n\r\n\t\t\t\ttimeline._linksDnD = linkDnD.createLinkDND();\r\n\t\t\t\ttimeline._tasksDnD = taskDnD.createTaskDND();\r\n\t\t\t\ttimeline._tasksDnD.extend(timeline);\r\n\r\n\t\t\t\tthis._mouseDelegates = MouseDelegates(gantt);\r\n\t\t\t},\r\n\t\t\tonInitialized: function (timeline) {\r\n\t\t\t\tthis._attachDomEvents(gantt);\r\n\r\n\t\t\t\tthis._attachStateProvider(gantt, timeline);\r\n\r\n\t\t\t\ttimeline._tasksDnD.init(timeline, gantt);\r\n\t\t\t\ttimeline._linksDnD.init(timeline, gantt);\r\n\r\n\t\t\t\tif(timeline.$config.id == \"timeline\"){\r\n\t\t\t\t\tthis.extendDom(timeline);\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\tonDestroyed: function (timeline) {\r\n\t\t\t\tthis._clearDomEvents(gantt);\r\n\t\t\t\tthis._clearStateProvider(gantt);\r\n\t\t\t\tif (timeline._tasksDnD) {\r\n\t\t\t\t\ttimeline._tasksDnD.destructor();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\textendDom: function(timeline){\r\n\t\t\t\tgantt.$task = timeline.$task;\r\n\t\t\t\tgantt.$task_scale = timeline.$task_scale;\r\n\t\t\t\tgantt.$task_data = timeline.$task_data;\r\n\t\t\t\tgantt.$task_bg = timeline.$task_bg;\r\n\t\t\t\tgantt.$task_links = timeline.$task_links;\r\n\t\t\t\tgantt.$task_bars = timeline.$task_bars;\r\n\t\t\t},\r\n\r\n\t\t\t_clearDomEvents: function(){\r\n\t\t\t\tthis._mouseDelegates.destructor();\r\n\t\t\t\tthis._mouseDelegates = null;\r\n\t\t\t},\r\n\r\n\t\t\t_attachDomEvents: function(gantt){\r\n\t\t\t\tfunction _delete_link_handler(id, e) {\r\n\t\t\t\t\tif (id && this.callEvent(\"onLinkDblClick\", [id, e])) {\r\n\r\n\t\t\t\t\t\tvar link = this.getLink(id);\r\n\t\t\t\t\t\tif (this.isReadonly(link)) return;\r\n\r\n\t\t\t\t\t\tvar title = \"\";\r\n\t\t\t\t\t\tvar question = this.locale.labels.link + \" \" + this.templates.link_description(this.getLink(id)) + \" \" + this.locale.labels.confirm_link_deleting;\r\n\r\n\t\t\t\t\t\twindow.setTimeout(function () {\r\n\t\t\t\t\t\t\tgantt._simple_confirm(question, title, function () {\r\n\t\t\t\t\t\t\t\tgantt.deleteLink(id);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}, (this.config.touch ? 300 : 1));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._mouseDelegates.delegate(\"click\", \"gantt_task_link\", gantt.bind(function (e, trg) {\r\n\t\t\t\t\tvar id = this.locate(e, this.config.link_attribute);\r\n\t\t\t\t\tif (id) {\r\n\t\t\t\t\t\tthis.callEvent(\"onLinkClick\", [id, e]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}, gantt), this.$task);\r\n\r\n\t\t\t\tthis._mouseDelegates.delegate(\"click\", \"gantt_scale_cell\", gantt.bind(function (e, trg) {\r\n\t\t\t\t\tvar pos = domHelpers.getRelativeEventPosition(e, gantt.$task_data);\r\n\t\t\t\t\tvar date = gantt.dateFromPos(pos.x);\r\n\t\t\t\t\tvar coll = Math.floor(gantt.columnIndexByDate(date));\r\n\r\n\t\t\t\t\tvar coll_date = gantt.getScale().trace_x[coll];\r\n\r\n\t\t\t\t\tgantt.callEvent(\"onScaleClick\", [e, coll_date]);\r\n\t\t\t\t}, gantt), this.$task);\r\n\r\n\t\t\t\tthis._mouseDelegates.delegate(\"doubleclick\", \"gantt_task_link\", gantt.bind(function (e, id, trg) {\r\n\t\t\t\t\tvar id = this.locate(e, gantt.config.link_attribute);\r\n\t\t\t\t\t_delete_link_handler.call(this, id, e);\r\n\t\t\t\t}, gantt), this.$task);\r\n\r\n\t\t\t\tthis._mouseDelegates.delegate(\"doubleclick\", \"gantt_link_point\", gantt.bind(function (e, id, trg) {\r\n\t\t\t\t\tvar id = this.locate(e),\r\n\t\t\t\t\t\ttask = this.getTask(id);\r\n\r\n\t\t\t\t\tvar link = null;\r\n\t\t\t\t\tif (trg.parentNode && domHelpers.getClassName(trg.parentNode)) {\r\n\t\t\t\t\t\tif (domHelpers.getClassName(trg.parentNode).indexOf(\"_left\") > -1) {\r\n\t\t\t\t\t\t\tlink = task.$target[0];\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tlink = task.$source[0];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (link)\r\n\t\t\t\t\t\t_delete_link_handler.call(this, link, e);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}, gantt), this.$task);\r\n\t\t\t},\r\n\r\n\t\t\t_attachStateProvider: function(gantt, timeline){\r\n\t\t\t\tvar self = timeline;\r\n\t\t\t\tvar state = services.getService(\"state\");\r\n\t\t\t\tstate.registerProvider(\"tasksTimeline\", function(){\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tscale_unit: self._tasks ? self._tasks.unit : undefined,\r\n\t\t\t\t\t\tscale_step: self._tasks ? self._tasks.step : undefined\r\n\t\t\t\t\t};\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t_clearStateProvider: function(){\r\n\t\t\t\tvar state = services.getService(\"state\");\r\n\t\t\t\tstate.unregisterProvider(\"tasksTimeline\");\r\n\t\t\t}\r\n\t\t};\r\n\t};\r\n\r\n})();\r\n\r\nexport default initializer;","import * as domHelpers from \"./utils/dom_helpers\";\r\n\r\nvar initializer = (function() {\r\n\treturn function (gantt) {\r\n\t\treturn {\r\n\r\n\t\t\tgetVerticalScrollbar: function(){\r\n\t\t\t\treturn gantt.$ui.getView(\"scrollVer\");\r\n\t\t\t},\r\n\t\t\tgetHorizontalScrollbar: function(){\r\n\t\t\t\treturn gantt.$ui.getView(\"scrollHor\");\r\n\t\t\t},\r\n\r\n\t\t\t_legacyGridResizerClass: function(layout){\r\n\t\t\t\tvar resizers = layout.getCellsByType(\"resizer\");\r\n\t\t\t\tfor(var i = 0; i < resizers.length; i++){\r\n\t\t\t\t\tvar r = resizers[i];\r\n\t\t\t\t\tvar gridResizer = false;\r\n\r\n\t\t\t\t\tvar prev = r.$parent.getPrevSibling(r.$id);\r\n\t\t\t\t\tif(prev && prev.$config && prev.$config.id === \"grid\"){\r\n\t\t\t\t\t\tgridResizer= true;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvar next = r.$parent.getNextSibling(r.$id);\r\n\t\t\t\t\t\tif(next && next.$config && next.$config.id === \"grid\"){\r\n\t\t\t\t\t\t\tgridResizer= true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif(gridResizer){\r\n\t\t\t\t\t\tr.$config.css = (r.$config.css ? r.$config.css + \" \" : \"\") + \"gantt_grid_resize_wrap\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\r\n\t\t\tonCreated: function(layout) {\r\n\t\t\t\tvar first = true;\r\n\r\n\t\t\t\tthis._legacyGridResizerClass(layout);\r\n\r\n\t\t\t\tlayout.attachEvent(\"onBeforeResize\", function() {\r\n\t\t\t\t\tvar mainTimeline = gantt.$ui.getView(\"timeline\");\r\n\t\t\t\t\tif (mainTimeline)\r\n\t\t\t\t\t\tmainTimeline.$config.hidden = mainTimeline.$parent.$config.hidden = !gantt.config.show_chart;\r\n\r\n\t\t\t\t\tvar mainGrid = gantt.$ui.getView(\"grid\");\r\n\r\n\t\t\t\t\tif(!mainGrid)\r\n\t\t\t\t\t\treturn;\r\n\r\n\t\t\t\t\tvar colsWidth = mainGrid._getColsTotalWidth();\r\n\t\t\t\t\tvar hideGrid = !gantt.config.show_grid || !gantt.config.grid_width || colsWidth === 0;\r\n\t\t\t\t\tif (first && !hideGrid && colsWidth !== false){\r\n\t\t\t\t\t\t\tgantt.config.grid_width = colsWidth;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmainGrid.$config.hidden = mainGrid.$parent.$config.hidden = hideGrid;\r\n\r\n\t\t\t\t\tif (!mainGrid.$config.hidden) {\r\n\t\t\t\t\t\t/* restrict grid width due to min_width, max_width, min_grid_column_width */\r\n\t\t\t\t\t\tvar grid_limits = mainGrid._getGridWidthLimits();\r\n\t\t\t\t\t\tif (grid_limits[0] && gantt.config.grid_width < grid_limits[0])\r\n\t\t\t\t\t\t\tgantt.config.grid_width = grid_limits[0];\r\n\t\t\t\t\t\tif (grid_limits[1] && gantt.config.grid_width > grid_limits[1])\r\n\t\t\t\t\t\t\tgantt.config.grid_width = grid_limits[1];\r\n\t\t\t\t\t\tif (mainTimeline && gantt.config.show_chart){\r\n\r\n\t\t\t\t\t\t\tmainGrid.$config.width = gantt.config.grid_width - 1;\r\n\r\n\t\t\t\t\t\t\t// GS-1314: Don't let the non-scrollable grid to be larger than the container with the correct width\r\n\t\t\t\t\t\t\tif (!mainGrid.$config.scrollable && mainGrid.$config.scrollY && gantt.$root.offsetWidth){\r\n\t\t\t\t\t\t\t\tvar ganttContainerWidth = mainGrid.$gantt.$layout.$container.offsetWidth;\r\n\t\t\t\t\t\t\t\tvar verticalScrollbar = gantt.$ui.getView(mainGrid.$config.scrollY);\r\n\t\t\t\t\t\t\t\tvar verticalScrollbarWidth = verticalScrollbar.$config.width;\r\n\r\n\t\t\t\t\t\t\t\t// GS-2488: to prevent grid from occupying the whole gantt container(timeline will be disabled) \r\n\t\t\t\t\t\t\t\t// need to leave min width for timeline\r\n\t\t\t\t\t\t\t\tvar gridOverflow = ganttContainerWidth - (mainGrid.$config.width + verticalScrollbarWidth) - 4;\r\n\t\t\t\t\t\t\t\tif (gridOverflow < 0){\r\n\t\t\t\t\t\t\t\t\tmainGrid.$config.width += gridOverflow;\r\n\t\t\t\t\t\t\t\t\tgantt.config.grid_width += gridOverflow;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (!first) {\r\n\t\t\t\t\t\t\t\tif (mainTimeline && !domHelpers.isChildOf(mainTimeline.$task, layout.$view)) {\r\n\t\t\t\t\t\t\t\t\t// timeline is being displayed after being not visible, reset grid with from full screen\r\n\t\t\t\t\t\t\t\t\tif (!mainGrid.$config.original_grid_width) {\r\n\t\t\t\t\t\t\t\t\t\tvar skinSettings = gantt.skins[gantt.skin];\r\n\t\t\t\t\t\t\t\t\t\tif(skinSettings && skinSettings.config && skinSettings.config.grid_width){\r\n\t\t\t\t\t\t\t\t\t\t\tmainGrid.$config.original_grid_width = skinSettings.config.grid_width;\r\n\t\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t\tmainGrid.$config.original_grid_width = 0;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tgantt.config.grid_width = mainGrid.$config.original_grid_width;\r\n\t\t\t\t\t\t\t\t\tmainGrid.$parent.$config.width = gantt.config.grid_width;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tmainGrid.$parent._setContentSize(mainGrid.$config.width, null);\r\n\t\t\t\t\t\t\t\t\tgantt.$layout._syncCellSizes(mainGrid.$parent.$config.group, {value: gantt.config.grid_width, isGravity: false});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tmainGrid.$parent.$config.width = gantt.config.grid_width;\r\n\t\t\t\t\t\t\t\tif (mainGrid.$parent.$config.group) {\r\n\t\t\t\t\t\t\t\t\tgantt.$layout._syncCellSizes(mainGrid.$parent.$config.group, {value: mainGrid.$parent.$config.width, isGravity: false});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (mainTimeline && domHelpers.isChildOf(mainTimeline.$task, layout.$view)) {\r\n\t\t\t\t\t\t\t\t// hiding timeline, remember grid with to restore it when timeline is displayed again\r\n\t\t\t\t\t\t\t\tmainGrid.$config.original_grid_width = gantt.config.grid_width;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (!first) {\r\n\t\t\t\t\t\t\t\tmainGrid.$parent.$config.width = 0;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfirst = false;\r\n\t\t\t\t});\r\n\t\t\t\tthis._initScrollStateEvents(layout);\r\n\t\t\t},\r\n\r\n\t\t\t_initScrollStateEvents: function(layout) {\r\n\t\t\t\tgantt._getVerticalScrollbar = this.getVerticalScrollbar;\r\n\t\t\t\tgantt._getHorizontalScrollbar = this.getHorizontalScrollbar;\r\n\r\n\t\t\t\tvar vertical = this.getVerticalScrollbar();\r\n\t\t\t\tvar horizontal = this.getHorizontalScrollbar();\r\n\t\t\t\tif (vertical) {\r\n\t\t\t\t\tvertical.attachEvent(\"onScroll\", function(oldPos, newPos, dir){\r\n\t\t\t\t\t\tvar scrollState = gantt.getScrollState();\r\n\t\t\t\t\t\tgantt.callEvent(\"onGanttScroll\", [scrollState.x, oldPos, scrollState.x, newPos]);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\tif (horizontal) {\r\n\t\t\t\t\thorizontal.attachEvent(\"onScroll\", function(oldPos, newPos, dir){\r\n\t\t\t\t\t\tvar scrollState = gantt.getScrollState();\r\n\t\t\t\t\t\tgantt.callEvent(\"onGanttScroll\", [oldPos, scrollState.y, newPos, scrollState.y]);\r\n\r\n\t\t\t\t\t\t// if the grid doesn't fit the width, scroll the row container\r\n\t\t\t\t\t\tvar grid = gantt.$ui.getView(\"grid\");\r\n\t\t\t\t\t\tif (grid && grid.$grid_data && !grid.$config.scrollable){\r\n\t\t\t\t\t\t\tgrid.$grid_data.style.left = grid.$grid.scrollLeft + \"px\";\r\n\t\t\t\t\t\t\tgrid.$grid_data.scrollLeft = grid.$grid.scrollLeft;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlayout.attachEvent(\"onResize\", function(){\r\n\t\t\t\t\tif (vertical && !gantt.$scroll_ver){\r\n\t\t\t\t\t\tgantt.$scroll_ver = vertical.$scroll_ver;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (horizontal && !gantt.$scroll_hor){\r\n\t\t\t\t\t\tgantt.$scroll_hor = horizontal.$scroll_hor;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\r\n\t\t\t_findGridResizer: function(layout, grid){\r\n\t\t\t\tvar resizers = layout.getCellsByType(\"resizer\");\r\n\r\n\t\t\t\tvar gridFirst = true;\r\n\t\t\t\tvar gridResizer;\r\n\t\t\t\tfor(var i = 0; i < resizers.length; i++){\r\n\t\t\t\t\tvar res = resizers[i];\r\n\t\t\t\t\tres._getSiblings();\r\n\t\t\t\t\tvar prev = res._behind;\r\n\t\t\t\t\tvar next = res._front;\r\n\t\t\t\t\tif(prev && prev.$content === grid || (prev.isChild && prev.isChild(grid))){\r\n\t\t\t\t\t\tgridResizer = res;\r\n\t\t\t\t\t\tgridFirst = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}else if(next && next.$content === grid || (next.isChild && next.isChild(grid))){\r\n\t\t\t\t\t\tgridResizer = res;\r\n\t\t\t\t\t\tgridFirst = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn {\r\n\t\t\t\t\tresizer: gridResizer,\r\n\t\t\t\t\tgridFirst: gridFirst\r\n\t\t\t\t};\r\n\t\t\t},\r\n\r\n\t\t\tonInitialized: function (layout) {\r\n\t\t\t\tvar grid = gantt.$ui.getView(\"grid\");\r\n\r\n\t\t\t\tvar resizeInfo = this._findGridResizer(layout, grid);\r\n\r\n\t\t\t\t// expose grid resize events\r\n\t\t\t\tif(resizeInfo.resizer){\r\n\t\t\t\t\tvar gridFirst = resizeInfo.gridFirst,\r\n\t\t\t\t\t\tnext = resizeInfo.resizer;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tif(next.$config.mode !== \"x\"){\r\n\t\t\t\t\t\treturn;// track only horizontal resize\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tvar initialWidth;\r\n\t\t\t\t\tnext.attachEvent(\"onResizeStart\", function(prevCellWidth, nextCellWidth){\r\n\r\n\t\t\t\t\t\tvar grid = gantt.$ui.getView(\"grid\");\r\n\t\t\t\t\t\tvar viewCell = grid ? grid.$parent : null;\r\n\t\t\t\t\t\tif(viewCell){\r\n\t\t\t\t\t\t\tvar limits = grid._getGridWidthLimits();\r\n\r\n\t\t\t\t\t\t\t// min grid width is defined by min widths of its columns, unless grid has horizontal scroll\r\n\t\t\t\t\t\t\tif(!grid.$config.scrollable)\r\n\t\t\t\t\t\t\t\tviewCell.$config.minWidth = limits[0];\r\n\r\n\t\t\t\t\t\t\tviewCell.$config.maxWidth = limits[1];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tinitialWidth = gridFirst ? prevCellWidth : nextCellWidth;\r\n\t\t\t\t\t\treturn gantt.callEvent(\"onGridResizeStart\", [initialWidth]);\r\n\t\t\t\t\t});\r\n\t\t\t\t\tnext.attachEvent(\"onResize\", function(newBehindSize, newFrontSize){\r\n\t\t\t\t\t\tvar newSize = gridFirst ? newBehindSize : newFrontSize;\r\n\t\t\t\t\t\treturn gantt.callEvent(\"onGridResize\", [initialWidth, newSize]);\r\n\t\t\t\t\t});\r\n\t\t\t\t\tnext.attachEvent(\"onResizeEnd\", function(oldBackSize, oldFrontSize, newBackSize, newFrontSize){\r\n\r\n\t\t\t\t\t\tvar oldSize = gridFirst ? oldBackSize : oldFrontSize;\r\n\t\t\t\t\t\tvar newSize = gridFirst ? newBackSize : newFrontSize;\r\n\t\t\t\t\t\tvar grid = gantt.$ui.getView(\"grid\");\r\n\t\t\t\t\t\tvar viewCell = grid ? grid.$parent : null;\r\n\t\t\t\t\t\tif(viewCell){\r\n\t\t\t\t\t\t\tviewCell.$config.minWidth = undefined;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvar res = gantt.callEvent(\"onGridResizeEnd\", [oldSize, newSize]);\r\n\t\t\t\t\t\tif(res && newSize !== 0){// new size may be numeric zero when cell size is defined by 'gravity', actual size will be calculated by layout later\r\n\t\t\t\t\t\t\tgantt.config.grid_width = newSize;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn res;\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t},\r\n\t\t\tonDestroyed: function (timeline) {\r\n\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t};\r\n})();\r\n\r\nexport default initializer;","import uiFactory from \"./ui_factory\";\r\nimport mouseEvents from \"./mouse\";\r\nimport createLayers from \"./gantt_layers\";\r\nimport Cell from \"./layout/cell\";\r\nimport Layout from \"./layout/layout\";\r\nimport ViewLayout from \"./layout/view_layout\";\r\nimport ViewCell from \"./layout/view_cell\";\r\nimport Resizer from \"./layout/resizer_cell\";\r\nimport Scrollbar from \"./layout/scrollbar_cell\";\r\nimport Timeline from \"./timeline/timeline\";\r\nimport Grid from \"./grid/grid\";\r\nimport ResourceGrid from \"./grid/resource_grid\";\r\nimport ResourceTimeline from \"./timeline/resource_timeline\";\r\nimport ResourceHistogram from \"./timeline/resource_histogram\";\r\n\r\n\r\nimport gridEditorsFactory from \"./grid/editors/controller\";\r\n\r\nimport renderTaskBar from \"./render/task_bar_smart_render\";\r\nimport renderTimedProjectBar from \"./render/task_project_smart_render\";\r\nimport renderSplitTaskBar from \"./render/task_split_render\";\r\nimport renderRollupTaskBar from \"./render/task_rollup_render\";\r\nimport renderTaskBg from \"./render/task_bg_render\";\r\nimport renderLink from \"./render/link_render\";\r\nimport gridRenderer from \"./render/task_grid_line_render\";\r\nimport resourceMatrixRenderer from \"./render/resource_matrix_render\";\r\nimport resourceHistogramRenderer from \"./render/resource_histogram_render\";\r\nimport gridTaskRowResizerRenderer from \"./render/task_grid_row_resize_render\";\r\nimport renderConstraints from \"./render/task_constraints_render\";\r\nimport renderDeadline from \"./render/task_deadline_render\";\r\nimport renderBaselines from \"./render/task_baselines_render\";\r\nimport mainGridInitializer from \"./grid/main_grid_initializer\";\r\nimport mainTimelineInitializer from \"./timeline/main_timeline_initializer\";\r\nimport mainLayoutInitializer from \"./main_layout_initializer\";\r\n\r\nfunction initUI(gantt){\r\n\tfunction attachInitializer(view, initializer){\r\n\t\tvar ext = initializer(gantt);\r\n\t\tif(ext.onCreated)\r\n\t\t\text.onCreated(view);\r\n\t\tview.attachEvent(\"onReady\", function(){\r\n\t\t\tif(ext.onInitialized)\r\n\t\t\t\text.onInitialized(view);\r\n\t\t});\r\n\t\tview.attachEvent(\"onDestroy\", function(){\r\n\t\t\tif(ext.onDestroyed)\r\n\t\t\t\text.onDestroyed(view);\r\n\t\t});\r\n\t}\r\n\r\n\tvar factory = uiFactory.createFactory(gantt);\r\n\tfactory.registerView(\"cell\", Cell);\r\n\tfactory.registerView(\"resizer\", Resizer);\r\n\tfactory.registerView(\"scrollbar\", Scrollbar);\r\n\tfactory.registerView(\"layout\", Layout, function(view){\r\n\t\tvar id = view.$config ? view.$config.id : null;\r\n\t\tif(id === \"main\"){\r\n\t\t\tattachInitializer(view, mainLayoutInitializer);\r\n\t\t}\r\n\t});\r\n\tfactory.registerView(\"viewcell\", ViewCell);\r\n\tfactory.registerView(\"multiview\", ViewLayout);\r\n\tfactory.registerView(\"timeline\", Timeline, function(view){\r\n\t\tvar id = view.$config ? view.$config.id : null;\r\n\t\tif(id === \"timeline\" || view.$config.bind == \"task\"){\r\n\t\t\tattachInitializer(view, mainTimelineInitializer);\r\n\t\t}\r\n\t});\r\n\tfactory.registerView(\"grid\", Grid, function(view){\r\n\t\tvar id = view.$config ? view.$config.id : null;\r\n\t\tif(id === \"grid\" || view.$config.bind == \"task\"){\r\n\t\t\tattachInitializer(view, mainGridInitializer);\r\n\t\t}\r\n\t});\r\n\r\n\tfactory.registerView(\"resourceGrid\", ResourceGrid);\r\n\tfactory.registerView(\"resourceTimeline\", ResourceTimeline);\r\n\tfactory.registerView(\"resourceHistogram\", ResourceHistogram);\r\n\r\n\tvar layersEngine = createLayers(gantt);\r\n\r\n\tvar inlineEditors = gridEditorsFactory(gantt);\r\n\r\n\tgantt.ext.inlineEditors = inlineEditors;\r\n\tgantt.ext._inlineEditors = inlineEditors;\r\n\tinlineEditors.init(gantt);\r\n\r\n\treturn {\r\n\t\tfactory:factory,\r\n\t\tmouseEvents: mouseEvents.init(gantt),\r\n\t\tlayersApi: layersEngine.init(),\r\n\t\trender:{\r\n\t\t\tgridLine: function(){\r\n\t\t\t\treturn gridRenderer(gantt);\r\n\t\t\t},\r\n\t\t\ttaskBg: function(){\r\n\t\t\t\treturn renderTaskBg(gantt);\r\n\t\t\t},\r\n\t\t\ttaskBar: function(){\r\n\t\t\t\treturn renderTaskBar(gantt);\r\n\t\t\t},\r\n\t\t\ttimedProjectBar: function(){\r\n\t\t\t\treturn renderTimedProjectBar(gantt);\r\n\t\t\t},\r\n\t\t\ttaskRollupBar: function() {\r\n\t\t\t\treturn renderRollupTaskBar(gantt);\r\n\t\t\t},\r\n\t\t\ttaskSplitBar: function(){\r\n\t\t\t\treturn renderSplitTaskBar(gantt);\r\n\t\t\t},\r\n\t\t\ttaskConstraints: function(){\r\n\t\t\t\treturn renderConstraints(gantt);\r\n\t\t\t},\r\n\t\t\ttaskDeadline: function(){\r\n\t\t\t\treturn renderDeadline(gantt);\r\n\t\t\t},\r\n\t\t\ttaskBaselines: function(){\r\n\t\t\t\treturn renderBaselines(gantt);\r\n\t\t\t},\r\n\t\t\tlink: function(){\r\n\t\t\t\treturn renderLink(gantt);\r\n\t\t\t},\r\n\t\t\tresourceRow: function(){\r\n\t\t\t\treturn resourceMatrixRenderer(gantt);\r\n\t\t\t},\r\n\t\t\tresourceHistogram: function(){\r\n\t\t\t\treturn resourceHistogramRenderer(gantt);\r\n\t\t\t},\r\n\t\t\tgridTaskRowResizer: function(){\r\n\t\t\t\treturn gridTaskRowResizerRenderer(gantt);\r\n\t\t\t}\r\n\t\t},\r\n\t\tlayersService: {\r\n\t\t\tgetDataRender: function(name){\r\n\t\t\t\treturn layersEngine.getDataRender(name, gantt);\r\n\t\t\t},\r\n\t\t\tcreateDataRender: function(config){\r\n\t\t\t\treturn layersEngine.createDataRender(config, gantt);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\nexport default {\r\n\tinit: initUI\r\n};","export default null;","import * as helpers from \"../../../utils/helpers\";\r\nimport getRowRectangle from \"./viewport/get_grid_row_rectangle\";\r\nimport getVisibleRange from \"./viewport/get_visible_bars_range\";\r\nimport isInViewPort from \"./viewport/is_grid_row_in_viewport\";\r\n\r\nfunction createGridLineRender(gantt){\r\n\r\n\tfunction _render_grid_item(item, view, config, viewport) {\r\n\t\tvar columns = view.getGridColumns();\r\n\t\tvar templates = view.$getTemplates();\r\n\r\n\t\tvar store = view.$config.rowStore;\r\n\r\n\t\tvar cells = [];\r\n\t\tvar has_child;\r\n\t\tfor (var i = 0; i < columns.length; i++) {\r\n\t\t\tvar last = i == columns.length - 1;\r\n\t\t\tvar col = columns[i];\r\n\t\t\tvar cell;\r\n\r\n\t\t\tvar value;\r\n\t\t\tvar textValue;\r\n\t\t\tif (col.name == \"add\") {\r\n\t\t\t\tvar aria = gantt._waiAria.gridAddButtonAttrString(col);\r\n\r\n\t\t\t\tvalue = \"
\";\r\n\t\t\t\ttextValue = \"\";\r\n\t\t\t} else {\r\n\t\t\t\tif (col.template)\r\n\t\t\t\t\tvalue = col.template(item);\r\n\t\t\t\telse\r\n\t\t\t\t\tvalue = item[col.name];\r\n\r\n\t\t\t\tif (helpers.isDate(value)){\r\n\t\t\t\t\tvalue = templates.date_grid(value, item, col.name);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (value === null || value === undefined) {\r\n\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttextValue = value;\r\n\t\t\t\tvalue = \"
\" + value + \"
\";\r\n\t\t\t}\r\n\t\t\tvar css = \"gantt_cell\" + (last ? \" gantt_last_cell\" : \"\");\r\n\r\n\t\t\tvar tree = [];\r\n\t\t\tif (col.tree) {\r\n\t\t\t\tcss += \" gantt_cell_tree\";\r\n\t\t\t\tfor (var j = 0; j < item.$level; j++)\r\n\t\t\t\t\ttree.push(templates.grid_indent(item));\r\n\r\n\t\t\t\thas_child = store.hasChild(item.id) && !(gantt.isSplitTask(item) && !gantt.config.open_split_tasks);\r\n\t\t\t\tif (has_child) {\r\n\t\t\t\t\ttree.push(templates.grid_open(item));\r\n\t\t\t\t\ttree.push(templates.grid_folder(item));\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttree.push(templates.grid_blank(item));\r\n\t\t\t\t\ttree.push(templates.grid_file(item));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvar style = \"width:\" + (col.width - (last ? 1 : 0)) + \"px;\";\r\n\t\t\tif (this.defined(col.align)){\r\n\t\t\t\tvar flexAlign = {\r\n\t\t\t\t\tright: \"flex-end\",\r\n\t\t\t\t\tleft: \"flex-start\",\r\n\t\t\t\t\tcenter: \"center\"\r\n\t\t\t\t};\r\n\t\t\t\tvar justifyContent = flexAlign[col.align];\r\n\r\n\t\t\t\tstyle += \"text-align:\" + col.align + \";justify-content:\" + justifyContent + \";\";\r\n\t\t\t}\r\n\r\n\t\t\tvar aria = gantt._waiAria.gridCellAttrString(col, textValue, item);\r\n\r\n\t\t\ttree.push(value);\r\n\t\t\tcell = \"
\" + tree.join(\"\") + \"
\";\r\n\t\t\tcells.push(cell);\r\n\t\t}\r\n\t\t// GS-291. The odd class should be assigned correctly\r\n\t\tcss = \"\";\r\n\t\tconst storeName = store.$config.name;\r\n\t\tswitch (storeName) {\r\n\t\t\tcase \"task\":\r\n\t\t\t\tcss = gantt.getGlobalTaskIndex(item.id) % 2 === 0 ? \"\" : \" odd\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"resource\":\r\n\t\t\t\tcss = store.visibleOrder.indexOf(item.id) % 2 === 0 ? \"\" : \" odd\";\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tcss += (item.$transparent) ? \" gantt_transparent\" : \"\";\r\n\r\n\t\tcss += (item.$dataprocessor_class ? \" \" + item.$dataprocessor_class : \"\");\r\n\r\n\t\tif (templates.grid_row_class) {\r\n\t\t\tvar css_template = templates.grid_row_class.call(gantt, item.start_date, item.end_date, item);\r\n\t\t\tif (css_template)\r\n\t\t\t\tcss += \" \" + css_template;\r\n\t\t}\r\n\r\n\t\tif(store.isSelected(item.id)) {\r\n\t\t\tcss += \" gantt_selected\";\r\n\t\t}\r\n\r\n\t\tvar el = document.createElement(\"div\");\r\n\t\tel.className = \"gantt_row\" + css + \" gantt_row_\" + gantt.getTaskType(item.type);\r\n\t\tvar height = view.getItemHeight(item.id);\r\n\t\tel.style.height = height + \"px\";\r\n\t\tel.style.lineHeight = height + \"px\";\r\n\r\n\t\tif(config.smart_rendering){\r\n\t\t\tel.style.position = \"absolute\";\r\n\t\t\tel.style.left = \"0px\";\r\n\t\t\tel.style.top = view.getItemTop(item.id) + \"px\";\r\n\t\t}\r\n\r\n\t\tif(view.$config.item_attribute){\r\n\t\t\tel.setAttribute(view.$config.item_attribute, item.id);\r\n\t\t\tel.setAttribute(view.$config.bind + \"_id\", item.id); // 'task_id'/'resource_id' for backward compatibility\r\n\t\t}\r\n\r\n\t\tgantt._waiAria.taskRowAttr(item, el);\r\n\r\n\t\tel.innerHTML = cells.join(\"\");\r\n\t\treturn el;\r\n\t}\r\n\r\n\tfunction onrender(item, rowNode, view){\r\n\t\tvar columns = view.getGridColumns();\r\n\t\tfor (var i = 0; i < columns.length; i++) {\r\n\t\t\tvar column = columns[i];\r\n\t\t\tif (column.onrender){\r\n\r\n\t\t\t\t// find cell node for current column\r\n\t\t\t\tvar cellNode = rowNode.querySelector(\"[data-column-name=\" + column.name + \"]\");\r\n\t\t\t\tif (cellNode) {\r\n\t\t\t\t\tvar content = column.onrender(item, cellNode);\r\n\t\t\t\t\tif (content && typeof content === \"string\") {\r\n\t\t\t\t\t\tcellNode.innerHTML = content;\r\n\t\t\t\t\t} else if (content && typeof content === \"object\") {\r\n\t\t\t\t\t\t// render object to node using additional functionality\r\n\t\t\t\t\t\tif (gantt.config.external_render){\r\n\t\t\t\t\t\t\tvar adapter = gantt.config.external_render;\r\n\t\t\t\t\t\t\tif (adapter.isElement(content)){\r\n\t\t\t\t\t\t\t\tadapter.renderElement(content, cellNode);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn {\r\n\t\trender: _render_grid_item,\r\n\t\tupdate: null,\r\n\t\tgetRectangle: getRowRectangle,\r\n\t\tisInViewPort: isInViewPort,\r\n\t\tgetVisibleRange: getVisibleRange,\r\n\t\tonrender: onrender\r\n\t};\r\n}\r\n\r\nexport default createGridLineRender;","import getRowRectangle from \"./viewport/get_bg_row_rectangle\";\r\nimport isLegacyRender from \"./is_legacy_smart_render\";\r\nimport getVisibleRange from \"./viewport/get_visible_bars_range\";\r\nimport getVisibleCellsRange from \"./viewport/get_visible_cells_range\";\r\nimport isColumnVisible from \"./viewport/is_column_visible\";\r\nimport bgPlaceholder from \"./prerender/task_bg_placeholder\";\r\n\r\nfunction createTaskBgRender(gantt){\r\n\tvar renderedCells = {};\r\n\tvar visibleCells = {};\r\n\r\n\tfunction isRendered(item, columnIndex){\r\n\t\tif(renderedCells[item.id][columnIndex] && renderedCells[item.id][columnIndex].parentNode){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction detachRenderedCell(itemId, columnIndex){\r\n\t\tif(renderedCells[itemId] && renderedCells[itemId][columnIndex] &&\r\n\t\t\trenderedCells[itemId][columnIndex].parentNode\r\n\t\t\t){\r\n\t\t\t\trenderedCells[itemId][columnIndex].parentNode.removeChild(renderedCells[itemId][columnIndex]);\r\n\t\t\t}\r\n\t}\r\n\r\n\tfunction getCellClassTemplate(view){\r\n\t\tvar templates = view.$getTemplates();\r\n\t\tvar cssTemplate;\r\n\t\tif (typeof templates.task_cell_class !== \"undefined\") {\r\n\t\t\tcssTemplate = templates.task_cell_class;\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tvar log = console.warn || console.log;\r\n\t\t\tlog('gantt.templates.task_cell_class template is deprecated and will be removed soon. Please use gantt.templates.timeline_cell_class instead.');\r\n\t\t} else {\r\n\t\t\tcssTemplate = templates.timeline_cell_class;\r\n\t\t}\r\n\t\treturn cssTemplate;\r\n\t}\r\n\tfunction getCellContentTemplate(view){\r\n\t\tvar templates = view.$getTemplates();\r\n\t\tvar contentTemplate = templates.timeline_cell_content;\r\n\t\treturn contentTemplate;\r\n\t}\r\n\r\n\tfunction renderCells(item, node, view, config, viewPort){\r\n\t\tvar cfg = view.getScale();\r\n\t\tvar count = cfg.count;\r\n\t\tvar cssTemplate = getCellClassTemplate(view);\r\n\t\tvar contentTemplate = getCellContentTemplate(view);\r\n\r\n\t\tif (config.show_task_cells) {\r\n\t\t\tif(!renderedCells[item.id]){\r\n\t\t\t\trenderedCells[item.id] = {};\r\n\t\t\t}\r\n\t\t\tif(!visibleCells[item.id]){\r\n\t\t\t\tvisibleCells[item.id] = {};\r\n\t\t\t}\r\n\r\n\t\t\tvar range = getVisibleCellsRange(cfg, viewPort);\r\n\r\n\t\t\tfor(var i in visibleCells[item.id]){\r\n\t\t\t\tvar index = visibleCells[item.id][i];\r\n\r\n\t\t\t\tif(Number(index) < range.start || Number(index) > range.end){\r\n\t\t\t\t\tdetachRenderedCell(item.id, index);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvisibleCells[item.id] = {};\r\n\t\t\t// TODO: do not iterate all cell, only ones in the viewport and once that are already rendered\r\n\t\t\tfor (var columnIndex = range.start; columnIndex <= range.end; columnIndex++) {\r\n\t\t\t\tvar cell = renderOneCell(cfg, columnIndex, item, viewPort, count, cssTemplate, contentTemplate, config);\r\n\t\t\t\tif(!cell && isRendered(item, columnIndex)){\r\n\t\t\t\t\tdetachRenderedCell(item.id, columnIndex);\r\n\t\t\t\t}else if (cell && !cell.parentNode){\r\n\t\t\t\t\tnode.appendChild(cell);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction renderOneCell(scale, columnIndex, item, viewPort, count, cssTemplate, contentTemplate, config){\r\n\t\tvar width = scale.width[columnIndex],\r\n\t\t\tcssclass = \"\";\r\n\r\n\t\tif (isColumnVisible(columnIndex, scale, viewPort, gantt)) {//do not render skipped columns\r\n\r\n\t\t\tvar cssTemplateContent = cssTemplate(item, scale.trace_x[columnIndex]);\r\n\t\t\tvar htmlTemplateContent = \"\";\r\n\t\t\tif (contentTemplate) {// for backward compatibility, contentTemplate was added in 7.2.0+, will be undefined if someone used copy of old config/template object\r\n\t\t\t\thtmlTemplateContent = contentTemplate(item, scale.trace_x[columnIndex]);\r\n\t\t\t}\r\n\r\n\t\t\tif(config.static_background){\r\n\t\t\t\t// if cell render in static background is not allowed, or if it's a blank cell\r\n\t\t\t\tvar customCell = !!(cssTemplateContent || htmlTemplateContent);\r\n\t\t\t\tif(!(config.static_background_cells && customCell)){\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(renderedCells[item.id][columnIndex]){\r\n\t\t\t\tvisibleCells[item.id][columnIndex] = columnIndex;\r\n\t\t\t\treturn renderedCells[item.id][columnIndex];\r\n\t\t\t}\r\n\t\t\tvar cell = document.createElement(\"div\");\r\n\t\t\tcell.style.width = (width) + \"px\";\r\n\r\n\t\t\tcssclass = \"gantt_task_cell\" + (columnIndex == count - 1 ? \" gantt_last_cell\" : \"\");\r\n\t\t\tif (cssTemplateContent) {\r\n\t\t\t\tcssclass += \" \" + cssTemplateContent;\r\n\t\t\t}\r\n\t\t\tcell.className = cssclass;\r\n\r\n\t\t\tif (htmlTemplateContent) {\r\n\t\t\t\tcell.innerHTML = htmlTemplateContent;\r\n\t\t\t}\r\n\r\n\t\t\tcell.style.position = \"absolute\";\r\n\t\t\tcell.style.left = scale.left[columnIndex] + \"px\";\r\n\t\t\trenderedCells[item.id][columnIndex] = cell;\r\n\t\t\tvisibleCells[item.id][columnIndex] = columnIndex;\r\n\r\n\t\t\treturn cell;\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction _render_bg_line(item, view, config, viewPort) {\r\n\t\tvar templates = view.$getTemplates();\r\n\t\tvar cfg = view.getScale();\r\n\t\tvar count = cfg.count;\r\n\r\n\t\tif(config.static_background && !config.static_background_cells){\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tvar row = document.createElement(\"div\");\r\n\r\n\t\tvar cellCssTemplate = getCellClassTemplate(view);\r\n\t\tvar cellHtmlTemplate = getCellContentTemplate(view);\r\n\r\n\t\tvar range;\r\n\r\n\t\tif(!viewPort || !config.smart_rendering || isLegacyRender(gantt)){\r\n\t\t\trange = {\r\n\t\t\t\tstart: 0,\r\n\t\t\t\tend: count - 1\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\trange = getVisibleCellsRange(cfg, viewPort.x);\r\n\t\t}\r\n\t\tif (config.show_task_cells) {\r\n\t\t\trenderedCells[item.id] = {};\r\n\t\t\tvisibleCells[item.id] = {};\r\n\t\t\tfor (var columnIndex = range.start; columnIndex <= range.end; columnIndex++) {\r\n\t\t\t\tvar cell = renderOneCell(cfg, columnIndex, item, viewPort, count, cellCssTemplate, cellHtmlTemplate, config);\r\n\t\t\t\tif(cell){\r\n\t\t\t\t\trow.appendChild(cell);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// GS-291. The odd class should be assigned correctly\r\n\t\tconst store = view.$config.rowStore;\r\n\t\tconst odd = store.getIndexById(item.id) % 2 !== 0;\r\n\r\n\t\tvar cssTemplate = templates.task_row_class(item.start_date, item.end_date, item);\r\n\t\tvar css = \"gantt_task_row\" + (odd ? \" odd\" : \"\") + (cssTemplate ? ' ' + cssTemplate : '');\r\n\r\n\t\tif(store.isSelected(item.id)) {\r\n\t\t\tcss += \" gantt_selected\";\r\n\t\t}\r\n\r\n\t\trow.className = css;\r\n\r\n\t\tif (config.smart_rendering) {\r\n\t\t\trow.style.position = \"absolute\";\r\n\t\t\trow.style.top = view.getItemTop(item.id) + \"px\";\r\n\t\t\trow.style.width = \"100%\";\r\n\t\t}else{\r\n\t\t\trow.style.position = \"relative\";\r\n\t\t}\r\n\t\trow.style.height = (view.getItemHeight(item.id)) + \"px\";\r\n\r\n\t\tif (item.id == \"timeline_placeholder_task\"){\r\n\t\t\tvar placeholderTop = 0;\r\n\t\t\tif (item.lastTaskId){\r\n\t\t\t\tvar lastTaskTop = view.getItemTop(item.lastTaskId);\r\n\t\t\t\tvar lastTaskHeight = view.getItemHeight(item.lastTaskId);\r\n\t\t\t\tplaceholderTop = lastTaskTop + lastTaskHeight;\t\r\n\t\t\t}\r\n\r\n\t\t\tvar maxHeight = item.row_height || view.$task_data.offsetHeight;\r\n\r\n\t\t\tvar placeholderHeight = maxHeight - placeholderTop;\r\n\t\t\t// So that it won't exceed the placeholder timeline height\r\n\t\t\tif (placeholderHeight < 0){\r\n\t\t\t\tplaceholderHeight = 0;\r\n\t\t\t}\r\n\r\n\t\t\tif (config.smart_rendering) {\r\n\t\t\t\trow.style.top = placeholderTop + \"px\";\t\r\n\t\t\t}\r\n\t\t\trow.style.height = placeholderHeight + \"px\";\r\n\t\t}\r\n\r\n\r\n\t\tif(view.$config.item_attribute){\r\n\t\t\trow.setAttribute(view.$config.item_attribute, item.id);\r\n\t\t\trow.setAttribute(view.$config.bind + \"_id\", item.id); // 'task_id'/'resource_id' for backward compatibility\r\n\t\t}\r\n\r\n\t\treturn row;\r\n\t}\r\n\r\n\treturn {\r\n\t\trender: _render_bg_line,\r\n\t\tupdate: renderCells,\r\n\t\tgetRectangle: getRowRectangle,\r\n\t\tgetVisibleRange: getVisibleRange,\r\n\t\tprepareData: bgPlaceholder\r\n\t};\r\n}\r\n\r\nexport default createTaskBgRender;\r\n","import createBaseBarRender from \"./task_bar_render\";\r\nimport isInViewPort from \"./viewport/is_bar_in_viewport\";\r\nimport getVisibleRange from \"./viewport/get_visible_bars_range\";\r\n\r\nfunction createTaskRenderer(gantt){\r\n\tconst defaultRender = createBaseBarRender(gantt);\r\n\r\n\tconst renderedNodes = {};\r\n\r\n\tfunction checkVisibility(child, viewPort, timeline, config, gantt){\r\n\t\tlet isVisible = true;\r\n\t\t// GS-2123. Don't render rollup tasks that are outside the viewport\r\n\t\tif (config.smart_rendering){\r\n\t\t\tisVisible = isInViewPort(child, viewPort, timeline, config, gantt);\r\n\t\t}\r\n\t\treturn isVisible;\r\n\t}\r\n\r\n\tfunction generateChildElement(task, child, timeline, sizes){\r\n\t\tconst childCopy = gantt.copy(gantt.getTask(child.id));\r\n\t\tchildCopy.$rendered_at = task.id;\r\n\t\t// a way to filter rollup tasks:\r\n\t\tconst displayRollup = gantt.callEvent(\"onBeforeRollupTaskDisplay\", [childCopy.id, childCopy, task.id]);\r\n\t\tif (displayRollup === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst element = defaultRender(childCopy, timeline);\r\n\t\tif(!element){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst height = timeline.getBarHeight(task.id, child.type == gantt.config.types.milestone);\r\n\t\tconst padding = Math.floor((timeline.getItemHeight(task.id) - height) / 2);\r\n\r\n\t\telement.style.top = (sizes.top + padding) + \"px\";\r\n\t\telement.classList.add(\"gantt_rollup_child\");\r\n\t\telement.setAttribute(\"data-rollup-parent-id\", task.id);\r\n\r\n\t\treturn element;\r\n\t}\r\n\r\n\tfunction getKey(childId, renderParentId){\r\n\t\treturn childId + \"_\" + renderParentId;\r\n\t}\r\n\r\n\r\n\tfunction renderRollupTask(task, timeline, config, viewPort) {\r\n\t\tif (task.rollup !== false && task.$rollup && task.$rollup.length) {\r\n\t\t\tconst el = document.createElement('div'),\r\n\t\t\t\tsizes = gantt.getTaskPosition(task);\r\n\r\n\t\t\t// vertical position is not important for the rollup tasks as long as the parent is rendered\r\n\t\t\tif (viewPort){\r\n\t\t\t\tviewPort.y = 0;\r\n\t\t\t\tviewPort.y_end = gantt.$task_bg.scrollHeight;\r\n\t\t\t}\r\n\r\n\t\t\ttask.$rollup.forEach(function(itemId){\r\n\t\t\t\tif (!gantt.isTaskExists(itemId)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tconst child = gantt.getTask(itemId);\r\n\t\t\t\tlet isVisible = checkVisibility(child, viewPort, timeline, config, gantt);\r\n\t\t\t\tif (!isVisible){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst element = generateChildElement(task, child, timeline, sizes);\r\n\t\t\t\tif (element) {\r\n\t\t\t\t\trenderedNodes[getKey(child.id, task.id)] = element;\r\n\t\t\t\t\tel.appendChild(element);\r\n\t\t\t\t} else{\r\n\t\t\t\t\trenderedNodes[getKey(child.id, task.id)] = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\r\n\t\t\treturn el;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction repaintRollupTask(task, itemNode, timeline, config, viewPort) {\r\n\t\tconst el = document.createElement(\"div\"),\r\n\t\tsizes = gantt.getTaskPosition(task);\r\n\r\n\t\t// vertical position is not important for the rollup tasks as long as the parent is rendered\r\n\t\tviewPort.y = 0;\r\n\t\tviewPort.y_end = gantt.$task_bg.scrollHeight;\r\n\r\n\t\ttask.$rollup.forEach(function(itemId){\r\n\t\t\tconst child = gantt.getTask(itemId);\r\n\t\t\tconst rollupKey = getKey(child.id, task.id);\r\n\t\t\tlet isVisible = checkVisibility(child, viewPort, timeline, config, gantt);\r\n\t\t\tif (isVisible !== !!renderedNodes[rollupKey]) {\r\n\r\n\t\t\t\tif (isVisible) {\r\n\t\t\t\t\tconst element = generateChildElement(task, child, timeline, sizes);\r\n\t\t\t\t\trenderedNodes[rollupKey] = element || false;\r\n\t\t\t\t} else {\r\n\t\t\t\t\trenderedNodes[rollupKey] = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!!renderedNodes[rollupKey]) {\r\n\t\t\t\tel.appendChild(renderedNodes[rollupKey]);\r\n\t\t\t}\r\n\t\t\titemNode.innerHTML = \"\";\r\n\t\t\titemNode.appendChild(el);\r\n\t\t});\r\n\t}\r\n\r\n\r\n\r\n\treturn {\r\n\t\trender: renderRollupTask,\r\n\t\tupdate: repaintRollupTask,\r\n\t\t//getRectangle: getBarRectangle\r\n\t\tisInViewPort: isInViewPort,\r\n\t\tgetVisibleRange: getVisibleRange\r\n\t};\r\n}\r\n\r\nexport default createTaskRenderer;","import getRectangle from \"./viewport/get_bg_row_rectangle\";\r\nimport getVisibleRange from \"./viewport/get_visible_bars_range\";\r\nimport getVisibleCellsRange from \"./viewport/get_visible_cells_range\";\r\nimport isColumnVisible from \"./viewport/is_column_visible\";\r\nimport resourceTimetable from \"../../resource_timetable_builder\";\r\n\r\nfunction generateRenderResourceLine(gantt){\r\n\tvar getResourceLoad = resourceTimetable(gantt);\r\n\tvar renderedResourceLines = {};\r\n\r\n\tfunction renderResourceLineCell(resource, day, templates, config, timeline){\r\n\t\tvar css = templates.resource_cell_class(day.start_date, day.end_date, resource, day.tasks, day.assignments);\r\n\t\tvar content = templates.resource_cell_value(day.start_date, day.end_date, resource, day.tasks, day.assignments);\r\n\t\tvar height = timeline.getItemHeight(resource.id) - 1;\r\n\r\n\t\tif (css || content){\r\n\t\t\tvar sizes = timeline.getItemPosition(resource, day.start_date, day.end_date);\r\n\t\t\tvar el = document.createElement('div');\r\n\t\t\tel.setAttribute(timeline.$config.item_attribute, resource.id);\r\n\t\t\tel.className = [\"gantt_resource_marker\", css].join(\" \");\r\n\r\n\t\t\tel.style.cssText = [\r\n\t\t\t\t'left:' + sizes.left + 'px',\r\n\t\t\t\t'width:' + sizes.width + 'px',\r\n\t\t\t\t'height:' + (height) + 'px',\r\n\t\t\t\t'line-height:' + (height) + 'px',\r\n\t\t\t\t'top:' + sizes.top + 'px'\r\n\t\t\t].join(\";\");\r\n\r\n\t\t\tif(content)\r\n\t\t\t\tel.innerHTML = content;\r\n\r\n\t\t\treturn el;\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tfunction detachRenderedResourceLine(id, index){\r\n\t\tif(renderedResourceLines[id] && renderedResourceLines[id][index] &&\r\n\t\t\trenderedResourceLines[id][index].parentNode\r\n\t\t\t){\r\n\t\t\t\trenderedResourceLines[id][index].parentNode.removeChild(renderedResourceLines[id][index]);\r\n\t\t\t}\r\n\t}\r\n\r\n\tfunction renderResourceLine(resource, timeline, config, viewport) {\r\n\t\tvar templates = timeline.$getTemplates();\r\n\t\tvar scale = timeline.getScale();\r\n\t\tvar timetable = getResourceLoad(resource, config.resource_property, timeline.getScale(), timeline);\r\n\t\tvar smartRendering = !!viewport;//no viewport means smart rendering is disabled\r\n\t\tvar cells = [];\r\n\t\trenderedResourceLines[resource.id] = {};\r\n\r\n\t\tvar range = getVisibleCellsRange(scale, viewport);\r\n\t\tfor (var columnIndex = range.start; columnIndex <= range.end; columnIndex++) {\r\n\r\n\t\t\tvar day = timetable[columnIndex];\r\n\t\t\tif(!day){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif(smartRendering && !isColumnVisible(columnIndex, scale, viewport, gantt)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tvar cell = renderResourceLineCell(resource, day, templates, config, timeline);\r\n\t\t\tif(cell){\r\n\t\t\t\tcells.push(cell);\r\n\t\t\t\trenderedResourceLines[resource.id][columnIndex] = cell;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar row = null;\r\n\t\tif(cells.length){\r\n\t\t\trow = document.createElement(\"div\");\r\n\t\t\tfor(var i = 0; i < cells.length; i++){\r\n\t\t\t\trow.appendChild(cells[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn row;\r\n\t}\r\n\r\n\tfunction updateResourceLine(resource, node, timeline, config, viewport) {\r\n\t\tvar templates = timeline.$getTemplates();\r\n\t\tvar scale = timeline.getScale();\r\n\t\tvar timetable = getResourceLoad(resource, config.resource_property, timeline.getScale(), timeline);\r\n\r\n\t\tvar range = getVisibleCellsRange(scale, viewport);\r\n\r\n\t\tvar checkedColumns = {};\r\n\t\tif(renderedResourceLines && renderedResourceLines[resource.id]){\r\n\t\t\tfor(var i in renderedResourceLines[resource.id]){\r\n\t\t\t\tcheckedColumns[i] = i;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (var columnIndex = range.start; columnIndex <= range.end; columnIndex++) {\r\n\t\t\tvar day = timetable[columnIndex];\r\n\t\t\tcheckedColumns[columnIndex] = false;\r\n\t\t\tif(!day){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif(!isColumnVisible(columnIndex, scale, viewport, gantt)){\r\n\t\t\t\tdetachRenderedResourceLine(resource.id, columnIndex);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif(!renderedResourceLines[resource.id] || !renderedResourceLines[resource.id][columnIndex]){\r\n\t\t\t\tvar cell = renderResourceLineCell(resource, day, templates, config, timeline);\r\n\t\t\t\tif(cell){\r\n\t\t\t\t\tnode.appendChild(cell);\r\n\t\t\t\t\trenderedResourceLines[resource.id][columnIndex] = cell;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(renderedResourceLines[resource.id] && renderedResourceLines[resource.id][columnIndex] && !renderedResourceLines[resource.id][columnIndex].parentNode){\r\n\t\t\t\tnode.appendChild(renderedResourceLines[resource.id][columnIndex]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor(var i in checkedColumns){\r\n\t\t\tif(checkedColumns[i] !== false){\r\n\t\t\t\tdetachRenderedResourceLine(resource.id, i);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn {\r\n\t\trender: renderResourceLine,\r\n\t\tupdate: updateResourceLine,\r\n\t\tgetRectangle: getRectangle,\r\n\t\tgetVisibleRange: getVisibleRange\r\n\t};\r\n}\r\n\r\nexport default generateRenderResourceLine;","import getRowRectangle from \"./viewport/get_grid_row_rectangle\";\r\nimport getVisibleRange from \"./viewport/get_visible_bars_range\";\r\n\r\nfunction createGridTaskRowResizerRender(gantt){\r\n\r\n\tfunction _render_grid_item(item, view, viewport) {\r\n\r\n\t\tvar config = view.$getConfig();\r\n\t\tvar resize_el = document.createElement(\"div\");\r\n\t\tresize_el.className = \"gantt_task_grid_row_resize_wrap\";\r\n\r\n\t\tresize_el.style.top = (view.getItemTop(item.id) + view.getItemHeight(item.id)) + \"px\";\r\n\r\n\t\tresize_el.innerHTML = \"
\";\r\n\t\tresize_el.setAttribute(config.task_grid_row_resizer_attribute, item.id);\r\n\r\n\t\tgantt._waiAria.rowResizerAttr(resize_el);\r\n\t\treturn resize_el;\r\n\t}\r\n\r\n\treturn {\r\n\t\trender: _render_grid_item,\r\n\t\tupdate: null,\r\n\t\tgetRectangle: getRowRectangle,\r\n\t\tgetVisibleRange: getVisibleRange\r\n\t};\r\n}\r\n\r\nexport default createGridTaskRowResizerRender;","function _configure(col, data, force) {\r\n\tfor (var key in data)\r\n\t\tif (typeof col[key] == \"undefined\" || force)\r\n\t\t\tcol[key] = data[key];\r\n}\r\n\r\nfunction _get_skin(force, gantt) {\r\n\r\n\tconst styles = getComputedStyle(gantt.$root);\r\n\tconst themeVar = styles.getPropertyValue(\"--dhx-gantt-theme\");\r\n\tlet isCssVarTheme = !!themeVar;\r\n\tlet themeName;\r\n\r\n\t\r\n\tif(isCssVarTheme){\r\n\t\tthemeName = themeVar;\r\n\t}else{\r\n\t\tvar skin = gantt.skin;\r\n\t\tthemeName = skin;\r\n\t\tif (!skin || force) {\r\n\t\t\tvar links = document.getElementsByTagName(\"link\");\r\n\t\t\tfor (var i = 0; i < links.length; i++) {\r\n\t\t\t\tvar res = links[i].href.match(\"dhtmlxgantt_([a-z_]+).css\");\r\n\t\t\t\tif (res) {\r\n\t\t\t\t\tif (gantt.skins[res[1]] || !skin) {\r\n\t\t\t\t\t\tthemeName = res[1];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tgantt._theme_info = {\r\n\t\ttheme: themeName,\r\n\t\tcssVarTheme: isCssVarTheme\r\n\t};\r\n\r\n\r\n\r\n\tgantt.skin = themeName || \"terrace\";\r\n\tvar skinset = gantt.skins[gantt.skin] || gantt.skins[\"terrace\"];\r\n\r\n\t//apply skin related settings\r\n\t_configure(gantt.config, skinset.config, force);\r\n\r\n\tif(!isCssVarTheme){\r\n\t\tgantt.config.link_radius = 1;\r\n\t}\r\n\r\n\tvar config = gantt.getGridColumns();\r\n\tif (config[1] && !gantt.defined(config[1].width))\r\n\t\tconfig[1].width = skinset._second_column_width;\r\n\tif (config[2] && !gantt.defined(config[2].width))\r\n\t\tconfig[2].width = skinset._third_column_width;\r\n\t\r\n\tfor (var i=0; i column.width) ? column.min_width : column.width;\r\n\t\t\t\tcolumn.width = (column.max_width && column.max_width < column.width) ? column.max_width : column.width;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif (skinset.config.task_height){\r\n\t\tgantt.config.task_height = skinset.config.task_height || \"full\";\r\n\t}\r\n\tif (skinset.config.bar_height){\r\n\t\tgantt.config.bar_height = skinset.config.bar_height || \"full\";\r\n\t}\r\n\r\n\tif (skinset._lightbox_template)\r\n\t\tgantt._lightbox_template = skinset._lightbox_template;\r\n\r\n\tif (skinset._redefine_lightbox_buttons) {\r\n\t\tgantt.config.buttons_right = skinset._redefine_lightbox_buttons[\"buttons_right\"];\r\n\t\tgantt.config.buttons_left = skinset._redefine_lightbox_buttons[\"buttons_left\"];\r\n\t}\r\n\r\n\r\n\tgantt.resetLightbox();\r\n}\r\n\r\n\r\n\r\nexport default function(gantt) {\r\n\t\r\n\tif(!gantt.resetSkin){\r\n\t\tgantt.resetSkin = function () {\r\n\t\t\tthis.skin = \"\";\r\n\t\t\t_get_skin(true, this);\r\n\t\t};\r\n\t\tgantt.skins = {};\r\n\r\n\t\tgantt.attachEvent(\"onGanttLayoutReady\", function(){\r\n\t\t\t_get_skin(false, this);\r\n\t\t\tmonitorThemeChange();\r\n\t\t});\r\n\t}\r\n\r\n\tgantt._addThemeClass = function(){\r\n\t\tdocument.documentElement.setAttribute(\"data-gantt-theme\", gantt.skin);\r\n\t};\r\n\r\n\tgantt.setSkin = function(value){\r\n\t\tthis.skin = value;\r\n\t\tgantt._addThemeClass();\r\n\t\tmonitorThemeChange();\r\n\t\tif(gantt.$root){\r\n\t\t\t_get_skin(true, gantt);\r\n\t\t\tthis.render();\r\n\t\t}\r\n\t\t\r\n\t\t//\r\n\t};\r\n\r\n\r\n\tlet monitorIntervalId = null;\r\n\tfunction monitorThemeChange(){\r\n\t\tconst container = gantt.$root;\r\n\t\t\r\n\t\tif(monitorIntervalId){\r\n\t\t\tclearInterval(monitorIntervalId);\r\n\t\t}\r\n\t\t\r\n\t\tif(container){\r\n\t\t\tmonitorIntervalId = setInterval(() => {\r\n\t\t\t\tconst csstheme = getComputedStyle(container).getPropertyValue('--dhx-gantt-theme');\r\n\t\t\t\tif(csstheme && csstheme !== gantt.skin){\r\n\t\t\t\t\tgantt.setSkin(csstheme);\r\n\t\t\t\t}\r\n\r\n\t\t\t}, 100);\r\n\t\t}\r\n\t}\r\n\tgantt.attachEvent(\"onDestroy\", function(){\r\n\t\tclearInterval(monitorIntervalId);\r\n\t});\r\n};","import * as domHelpers from \"../utils/dom_helpers\";\r\nimport isHeadless from \"../../../utils/is_headless\";\r\n\r\nexport default function(gantt){\r\n\r\n\tvar scrollRange = 50,\r\n\t\tscrollStep = 30,\r\n\t\tscrollDelay = 10,\r\n\t\tscrollSpeed = 50;\r\n\r\n\tvar interval = null,\r\n\t\tisMove = false,\r\n\t\tdelayTimeout = null,\r\n\t\tstartPos = {\r\n\t\t\tstarted: false\r\n\t\t},\r\n\t\teventPos = {};\r\n\r\n\r\n\tfunction isDisplayed(element){\r\n\t\treturn element &&\r\n\t\t\tdomHelpers.isChildOf(element, gantt.$root) &&\r\n\t\t\telement.offsetHeight;\r\n\t}\r\n\r\n\tfunction getAutoscrollContainer(){\r\n\t\tvar element;\r\n\t\tif(isDisplayed(gantt.$task)){\r\n\t\t\telement = gantt.$task;\r\n\t\t}else if(isDisplayed(gantt.$grid)){\r\n\t\t\telement = gantt.$grid;\r\n\t\t}else{\r\n\t\t\telement = gantt.$root;\r\n\t\t}\r\n\r\n\t\treturn element;\r\n\t}\r\n\r\n\tfunction isScrollState() {\r\n\t\tvar dragMarker = !!document.querySelector(\".gantt_drag_marker\");\r\n\t\tvar isResize = !!document.querySelector(\".gantt_drag_marker.gantt_grid_resize_area\")\r\n\t\t\t|| !!document.querySelector(\".gantt_drag_marker.gantt_row_grid_resize_area\") ;\r\n\t\tvar isLink = !!document.querySelector(\".gantt_link_direction\");\r\n\t\tvar state = gantt.getState();\r\n\t\tvar isClickDrag = state.autoscroll;\r\n\t\tisMove = dragMarker && !isResize && !isLink;\r\n\r\n\t\treturn !((!state.drag_mode && !dragMarker) || isResize) || isClickDrag;\r\n\t}\r\n\r\n\tfunction defineDelayTimeout(state) {\r\n\t\tif (delayTimeout) {\r\n\t\t\tclearTimeout(delayTimeout);\r\n\t\t\tdelayTimeout = null;\r\n\t\t}\r\n\t\tif (state) {\r\n\t\t\tvar speed = gantt.config.autoscroll_speed;\r\n\t\t\tif (speed && speed < 10) // limit speed value to 10\r\n\t\t\t\tspeed = 10;\r\n\r\n\t\t\tdelayTimeout = setTimeout(function() {\r\n\t\t\t\tinterval = setInterval(tick, speed || scrollSpeed);\r\n\t\t\t}, gantt.config.autoscroll_delay || scrollDelay);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction defineScrollInterval(state) {\r\n\t\tif (state) {\r\n\t\t\tdefineDelayTimeout(true);\r\n\t\t\tif (!startPos.started) {\r\n\t\t\t\tstartPos.x = eventPos.x;\r\n\t\t\t\tstartPos.y = eventPos.y;\r\n\t\t\t\tstartPos.started = true;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (interval) {\r\n\t\t\t\tclearInterval(interval);\r\n\t\t\t\tinterval = null;\r\n\t\t\t}\r\n\t\t\tdefineDelayTimeout(false);\r\n\t\t\tstartPos.started = false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction autoscrollInterval(event) {\r\n\t\tvar isScroll = isScrollState();\r\n\r\n\t\tif ((interval || delayTimeout) && !isScroll) {\r\n\t\t\tdefineScrollInterval(false);\r\n\t\t}\r\n\r\n\t\tif (!gantt.config.autoscroll || !isScroll) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\teventPos = {\r\n\t\t\tx: event.clientX,\r\n\t\t\ty: event.clientY\r\n\t\t};\r\n\r\n\t\t// if it is a mobile device, we need to detect the touch event coords\r\n\t\tif (event.type == \"touchmove\"){\r\n\t\t\teventPos.x = event.targetTouches[0].clientX;\r\n\t\t\teventPos.y = event.targetTouches[0].clientY;\r\n\t\t}\r\n\r\n\t\tif (!interval && isScroll) {\r\n\t\t\tdefineScrollInterval(true);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction tick() {\r\n\r\n\t\tif (!isScrollState()) {\r\n\t\t\tdefineScrollInterval(false);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar container = getAutoscrollContainer();\r\n\t\tif(!container){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// GS-1150: if we reorder or resize something in the grid, we should obtain the grid container\r\n\t\tvar gridDrag = false;\r\n\t\tvar gridMarkers = [\r\n\t\t\t\".gantt_drag_marker.gantt_grid_resize_area\",\r\n\t\t\t\".gantt_drag_marker .gantt_row.gantt_row_task\",\r\n\t\t\t\".gantt_drag_marker.gantt_grid_dnd_marker\"\r\n\t\t];\r\n\t\tgridMarkers.forEach(function (selector) {\r\n\t\t\tgridDrag = gridDrag || !!document.querySelector(selector);\r\n\t\t});\r\n\t\tif (gridDrag){\r\n\t\t\tcontainer = gantt.$grid;\r\n\t\t}\r\n\r\n\t\tvar box = domHelpers.getNodePosition(container);\r\n\r\n\t\tvar posX = eventPos.x - box.x;\r\n\t\tvar posY = eventPos.y - box.y + window.scrollY; // GS-1315: window.scrollY here and below for the elements above Gantt\r\n\r\n\t\tvar scrollLeft = isMove ? 0 : need_scroll(posX, box.width, startPos.x - box.x);\r\n\t\tvar scrollTop = need_scroll(posY, box.height, startPos.y - box.y + window.scrollY);\r\n\r\n\t\tvar scrollState = gantt.getScrollState();\r\n\r\n\t\tvar currentScrollTop = scrollState.y,\r\n\t\t\tscrollOuterHeight = scrollState.inner_height,\r\n\t\t\tscrollInnerHeight = scrollState.height,\r\n\t\t\tcurrentScrollLeft = scrollState.x,\r\n\t\t\tscrollOuterWidth = scrollState.inner_width,\r\n\t\t\tscrollInnerWidth = scrollState.width;\r\n\r\n\t\t// do scrolling only if we have scrollable area to do so\r\n\t\tif (scrollTop && !scrollOuterHeight) {\r\n\t\t\tscrollTop = 0;\r\n\t\t} else if (scrollTop < 0 && !currentScrollTop) {\r\n\t\t\tscrollTop = 0;\r\n\t\t} else if (scrollTop > 0 && currentScrollTop + scrollOuterHeight >= scrollInnerHeight + 2) {\r\n\t\t\tscrollTop = 0;\r\n\t\t}\r\n\r\n\t\tif (scrollLeft && !scrollOuterWidth) {\r\n\t\t\tscrollLeft = 0;\r\n\t\t} else if (scrollLeft < 0 && !currentScrollLeft) {\r\n\t\t\tscrollLeft = 0;\r\n\t\t} else if (scrollLeft > 0 && currentScrollLeft + scrollOuterWidth >= scrollInnerWidth) {\r\n\t\t\tscrollLeft = 0;\r\n\t\t}\r\n\r\n\t\tvar step = gantt.config.autoscroll_step;\r\n\r\n\t\tif (step && step < 2) // limit step value to 2\r\n\t\t\tstep = 2;\r\n\r\n\t\tscrollLeft = scrollLeft * (step || scrollStep);\r\n\t\tscrollTop = scrollTop * (step || scrollStep);\r\n\r\n\t\tif (scrollLeft || scrollTop) {\r\n\t\t\tscroll(scrollLeft, scrollTop);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction need_scroll(pos, boxSize, startCoord) {\r\n\t\tif ((pos - scrollRange < 0) && (pos < startCoord))\r\n\t\t\treturn -1;\r\n\t\telse if ((pos > boxSize - scrollRange) && (pos > startCoord))\r\n\t\t\treturn 1;\r\n\t\treturn 0;\r\n\t}\r\n\r\n\tfunction scroll(left, top) {\r\n\t\tvar scrollState = gantt.getScrollState();\r\n\r\n\t\tvar scrollLeft = null,\r\n\t\t\tscrollTop = null;\r\n\r\n\t\tif (left) {\r\n\t\t\tscrollLeft = scrollState.x + left;\r\n\t\t\tscrollLeft = Math.min(scrollState.width, scrollLeft);\r\n\t\t\tscrollLeft = Math.max(0, scrollLeft);\r\n\t\t}\r\n\r\n\t\tif (top) {\r\n\t\t\tscrollTop = scrollState.y + top;\r\n\t\t\tscrollTop = Math.min(scrollState.height, scrollTop);\r\n\t\t\tscrollTop = Math.max(0, scrollTop);\r\n\t\t}\r\n\r\n\t\tgantt.scrollTo(scrollLeft, scrollTop);\r\n\t}\r\n\r\n\tgantt.attachEvent(\"onGanttReady\", function() {\r\n\t\tif(!isHeadless(gantt)){\r\n\t\t\tvar eventElement = domHelpers.getRootNode(gantt.$root) || document.body;\r\n\t\t\tgantt.eventRemove(eventElement, \"mousemove\", autoscrollInterval);\r\n\t\t\tgantt.event(eventElement, \"mousemove\", autoscrollInterval);\r\n\r\n\t\t\tgantt.eventRemove(eventElement, \"touchmove\", autoscrollInterval);\r\n\t\t\tgantt.event(eventElement, \"touchmove\", autoscrollInterval);\r\n\r\n\t\t\tgantt.eventRemove(eventElement, \"pointermove\", autoscrollInterval);\r\n\t\t\tgantt.event(eventElement, \"pointermove\", autoscrollInterval);\r\n\t\t}\r\n\t});\r\n\r\n\tgantt.attachEvent(\"onDestroy\", function(){\r\n\t\tdefineScrollInterval(false);\r\n\t});\r\n\r\n};","if (window.jQuery){\r\n\r\n\t(function( $ ){\r\n\r\n\t\tvar methods = [];\r\n\t\t$.fn.dhx_gantt = function(config){\r\n\t\t\tconfig = config || {};\r\n\t\t\tif (typeof(config) === 'string') {\r\n\t\t\t\tif (methods[config] ) {\r\n\t\t\t\t\treturn methods[config].apply(this, []);\r\n\t\t\t\t}else {\r\n\t\t\t\t\t$.error('Method ' + config + ' does not exist on jQuery.dhx_gantt');\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tvar views = [];\r\n\t\t\t\tthis.each(function() {\r\n\t\t\t\t\tif (this && this.getAttribute){\r\n\t\t\t\t\t\tif (!this.gantt && !(window.gantt.$root == this)){\r\n\r\n\t\t\t\t\t\t\tvar newgantt = (window.gantt.$container && window.Gantt) ? window.Gantt.getGanttInstance():window.gantt;\r\n\t\t\t\t\t\t\tfor (var key in config)\r\n\t\t\t\t\t\t\t\tif (key!=\"data\")\r\n\t\t\t\t\t\t\t\t\tnewgantt.config[key] = config[key];\r\n\r\n\t\t\t\t\t\t\tnewgantt.init(this);\r\n\t\t\t\t\t\t\tif (config.data)\r\n\t\t\t\t\t\t\t\tnewgantt.parse(config.data);\r\n\r\n\t\t\t\t\t\t\tviews.push(newgantt);\r\n\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t\tviews.push(typeof this.gantt == \"object\" ? this.gantt : window.gantt);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\r\n\t\t\t\tif (views.length === 1) return views[0];\r\n\t\t\t\treturn views;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t})(window.jQuery);\r\n\r\n}\r\n\r\n\r\nexport default null;","if (window.dhtmlx){\r\n\r\n\tif (!window.dhtmlx.attaches)\r\n\twindow.dhtmlx.attaches = {};\r\n\r\n\twindow.dhtmlx.attaches.attachGantt=function(start, end, gantt){\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\r\n\t\tgantt = gantt || window.gantt;\r\n\r\n\t\tobj.id = \"gantt_\"+ gantt.uid();\r\n\t\tobj.style.width = \"100%\";\r\n\t\tobj.style.height = \"100%\";\r\n\t\tobj.cmp = \"grid\";\r\n\r\n\t\tdocument.body.appendChild(obj);\r\n\t\tthis.attachObject(obj.id);\r\n\t\tthis.dataType = \"gantt\";\r\n\t\tthis.dataObj = gantt;\r\n\r\n\t\tvar that = this.vs[this.av];\r\n\t\tthat.grid = gantt;\r\n\r\n\t\tgantt.init(obj.id, start, end);\r\n\t\tobj.firstChild.style.border = \"none\";\r\n\r\n\t\tthat.gridId = obj.id;\r\n\t\tthat.gridObj = obj;\r\n\r\n\t\tvar method_name=\"_viewRestore\";\r\n\t\treturn this.vs[this[method_name]()].grid;\r\n\t};\r\n\r\n}\r\nif (typeof(window.dhtmlXCellObject) != \"undefined\") {\r\n\r\n\twindow.dhtmlXCellObject.prototype.attachGantt=function(start, end, gantt){\r\n\t\tgantt = gantt || window.gantt;\r\n\r\n\t\tvar obj = document.createElement(\"DIV\");\r\n\t\tobj.id = \"gantt_\"+gantt.uid();\r\n\t\tobj.style.width = \"100%\";\r\n\t\tobj.style.height = \"100%\";\r\n\t\tobj.cmp = \"grid\";\r\n\r\n\t\tdocument.body.appendChild(obj);\r\n\t\tthis.attachObject(obj.id);\r\n\r\n\t\tthis.dataType = \"gantt\";\r\n\t\tthis.dataObj = gantt;\r\n\r\n\t\tgantt.init(obj.id, start, end);\r\n\t\tobj.firstChild.style.border = \"none\";\r\n\r\n\t\tobj = null;\r\n\t\tthis.callEvent(\"_onContentAttach\",[]);\r\n\r\n\t\treturn this.dataObj;\r\n\t};\r\n}\r\n\r\nexport default null;","import env from \"../../../utils/env\";\r\nimport eventable from \"../../../utils/eventable\";\r\nimport { IScale, TModifierKeys } from \"../../common/config\";\r\n\r\ninterface ITimelineZoomConfig {\r\n\thandler?: (e: Event) => {};\r\n\tstartDate?: Date;\r\n\tendDate?: Date;\r\n\tlevels: IZoomLevel[];\r\n\tactiveLevelIndex?: number;\r\n\twidthStep?: number;\r\n\tminColumnWidth?: number;\r\n\tmaxColumnWidth?: number;\r\n\tuseKey?: \"ctrlKey\" | \"altKey\" | \"shiftKey\";\r\n\ttrigger?: \"wheel\" | null | undefined;\r\n\telement?: Element | (() => Element);\r\n}\r\n\r\nconst USE_KEY = [\"ctrlKey\", \"altKey\", \"shiftKey\", \"metaKey\"];\r\n\r\ninterface IZoomLevel {\r\n\tname?: string;\r\n\tscale_height?: number;\r\n\tmin_column_width: number;\r\n\tscales: IScale[];\r\n}\r\n\r\nconst _defaultScales = [\r\n\t[\r\n\t\t{\r\n\t\t\tunit: \"month\",\r\n\t\t\tdate: \"%M\",\r\n\t\t\tstep: 1\r\n\t\t},\r\n\t\t{\r\n\t\t\tunit: \"day\",\r\n\t\t\tdate: \"%d\",\r\n\t\t\tstep: 1\r\n\t\t}\r\n\t],\r\n\t[\r\n\t\t{\r\n\t\t\tunit: \"day\",\r\n\t\t\tdate: \"%d %M\",\r\n\t\t\tstep: 1\r\n\t\t}\r\n\t],\r\n\t[\r\n\t\t{\r\n\t\t\tunit: \"day\",\r\n\t\t\tdate: \"%d %M\",\r\n\t\t\tstep: 1\r\n\t\t},\r\n\t\t{\r\n\t\t\tunit: \"hour\",\r\n\t\t\tdate: \"%H:00\",\r\n\t\t\tstep: 8\r\n\t\t}\r\n\t],\r\n\t[\r\n\t\t{\r\n\t\t\tunit: \"day\",\r\n\t\t\tdate: \"%d %M\",\r\n\t\t\tstep: 1\r\n\t\t},\r\n\t\t{\r\n\t\t\tunit: \"hour\",\r\n\t\t\tdate: \"%H:00\",\r\n\t\t\tstep: 1\r\n\t\t}\r\n\t]\r\n];\r\n\r\nexport default class TimelineZoom {\r\n\tpublic attachEvent: (eventName: string, handler: () => void) => string;\r\n\tpublic callEvent: (eventName: string, args: any[]) => any;\r\n\tpublic detachEvent: (eventName: string) => any;\r\n\tprotected _initialStartDate: Date;\r\n\tprotected _initialEndDate: Date;\r\n\tprotected _activeLevelIndex: number;\r\n\tprotected _levels: IZoomLevel[];\r\n\tprotected _handler: (e: any) => void;\r\n\tprotected $gantt;\r\n\tprotected _widthStep: number;\r\n\tprotected _minColumnWidth: number;\r\n\tprotected _maxColumnWidth: number;\r\n\tprotected _useKey: TModifierKeys;\r\n\tprotected _visibleDate: Date;\r\n\tprotected _initialized: boolean;\r\n\tprotected _domEvents: any;\r\n\r\n\tconstructor(gantt) {\r\n\t\tthis.$gantt = gantt;\r\n\t\tthis._domEvents = this.$gantt._createDomEventScope();\r\n\t}\r\n\r\n\tpublic init(config: ITimelineZoomConfig) {\r\n\t\t// GS-1354 and GS-1318. If we check the headless mode using the function,\r\n\t\t// it will return false when Gantt is not initialized, but we may want to do it later\r\n\t\tif(this.$gantt.env.isNode){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._initialStartDate = config.startDate;\r\n\t\tthis._initialEndDate = config.endDate;\r\n\t\tthis._activeLevelIndex = config.activeLevelIndex ? config.activeLevelIndex : 0;\r\n\t\tthis._levels = this._mapScales(config.levels || _defaultScales);\r\n\t\tthis._handler = config.handler || this._defaultHandler;\r\n\t\tthis._minColumnWidth = config.minColumnWidth || 60;\r\n\t\tthis._maxColumnWidth = config.maxColumnWidth || 240;\r\n\t\tthis._widthStep = config.widthStep || 3/8 * config.minColumnWidth;\r\n\t\tthis._useKey = config.useKey;\r\n\r\n\t\tif(!this._initialized){\r\n\t\t\teventable(this);\r\n\t\t\tthis.$gantt.attachEvent(\"onGanttScroll\", () => {\r\n\t\t\t\tthis._getVisibleDate();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\r\n\t\tif(config.trigger === \"wheel\"){\r\n\t\t\tif(this.$gantt.$root){\r\n\t\t\t\tthis._attachWheelEvent(config);\r\n\t\t\t}else{\r\n\t\t\t\tthis.$gantt.attachEvent(\"onGanttReady\", () => {\r\n\t\t\t\t\tthis._attachWheelEvent(config);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._initialized = true;\r\n\t\tthis.setLevel(this._activeLevelIndex);\r\n\t}\r\n\r\n\tpublic zoomIn = () => {\r\n\t\tconst index = this.getCurrentLevel() - 1;\r\n\t\tif(index < 0){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.setLevel(index);\r\n\t};\r\n\r\n\tpublic zoomOut = () => {\r\n\t\tconst index = this.getCurrentLevel() + 1;\r\n\t\tif(index > this._levels.length - 1){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.setLevel(index);\r\n\t};\r\n\r\n\tpublic getCurrentLevel = () => {\r\n\t\treturn this._activeLevelIndex;\r\n\t};\r\n\r\n\tpublic getLevels = () => {\r\n\t\treturn this._levels;\r\n\t};\r\n\r\n\tpublic setLevel = (level: number|string) => {\r\n\t\tconst zoomLevel = this._getZoomIndexByName(level);\r\n\r\n\t\tif(zoomLevel === -1){\r\n\t\t\tthis.$gantt.assert(zoomLevel !== -1, \"Invalid zoom level for gantt.ext.zoom.setLevel. \" + level + \" is not an expected value.\");\r\n\t\t}\r\n\t\tthis._setLevel(zoomLevel, 0);\r\n\t};\r\n\r\n\tprotected _getZoomIndexByName = (levelName: number|string) => {\r\n\t\tlet zoomLevel:number = -1;\r\n\t\tif(typeof levelName === \"string\"){\r\n\t\t\tif(!isNaN(Number(levelName)) && this._levels[Number(levelName)]){\r\n\t\t\t\tzoomLevel = Number(levelName);\r\n\t\t\t}else{\r\n\t\t\t\tfor(let i = 0; i < this._levels.length; i++){\r\n\t\t\t\t\tif(this._levels[i].name === levelName){\r\n\t\t\t\t\t\tzoomLevel = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tzoomLevel = levelName;\r\n\t\t}\r\n\t\treturn zoomLevel;\r\n\t};\r\n\r\n\tprotected _mapScales(levels: IScale[][] | any): IZoomLevel[]{\r\n\t\treturn levels.map((l) => {\r\n\t\t\tif(Array.isArray(l)){\r\n\t\t\t\treturn {\r\n\t\t\t\t\tscales: l\r\n\t\t\t\t};\r\n\t\t\t}else{\r\n\t\t\t\treturn l;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprotected _getVisibleDate = () => {\r\n\t\t// GS-1450. Don't try to get the visible date if there is no timeline\r\n\t\tif (!this.$gantt.$task){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tconst scrollPos = this.$gantt.getScrollState().x;\r\n\t\tconst viewPort = this.$gantt.$task.offsetWidth;\r\n\t\tthis._visibleDate = this.$gantt.dateFromPos(scrollPos + viewPort/2);\r\n\t};\r\n\r\n\tprotected _setLevel = (level: number, cursorOffset: number) => {\r\n\t\tthis._activeLevelIndex = level;\r\n\r\n\t\tconst gantt = this.$gantt;\r\n\t\tconst nextConfig = gantt.copy(this._levels[this._activeLevelIndex]);\r\n\t\tconst chartConfig = gantt.copy(nextConfig);\r\n\t\tdelete chartConfig.name;\r\n\r\n\t\tgantt.mixin(gantt.config, chartConfig, true);\r\n\r\n\t\tconst isRendered = !!gantt.$root && !!gantt.$task;\r\n\r\n\t\tif(isRendered){\r\n\t\t\tif(cursorOffset){\r\n\t\t\t\tconst cursorDate = this.$gantt.dateFromPos(cursorOffset + this.$gantt.getScrollState().x);\r\n\t\t\t\tthis.$gantt.render();\r\n\t\t\t\tconst newPosition = this.$gantt.posFromDate(cursorDate);\r\n\t\t\t\tthis.$gantt.scrollTo(newPosition - cursorOffset);\r\n\t\t\t}else{\r\n\t\t\t\tconst viewPort = this.$gantt.$task.offsetWidth;\r\n\t\t\t\tif(!this._visibleDate){\r\n\t\t\t\t\tthis._getVisibleDate();\r\n\t\t\t\t}\r\n\t\t\t\tconst middleDate = this._visibleDate;\r\n\t\t\t\tthis.$gantt.render();\r\n\t\t\t\tconst newPosition = this.$gantt.posFromDate(middleDate);\r\n\t\t\t\tthis.$gantt.scrollTo(newPosition - viewPort/2);\r\n\t\t\t}\r\n\r\n\t\t\tthis.callEvent(\"onAfterZoom\", [this._activeLevelIndex, nextConfig]);\r\n\t\t}\r\n\t};\r\n\r\n\tprivate _attachWheelEvent = (config) => {\r\n\t\tconst event = env.isFF ? \"wheel\" : \"mousewheel\";\r\n\t\tlet el: Element;\r\n\t\tif(typeof config.element === \"function\"){\r\n\t\t\tel = config.element();\r\n\t\t}else{\r\n\t\t\tel = config.element as Element;\r\n\t\t}\r\n\t\tif (!el){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(el, event, this.$gantt.bind(function(e) {\r\n\t\t\tif (this._useKey) {\r\n\t\t\t\tif (USE_KEY.indexOf(this._useKey) < 0) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!e[this._useKey]) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (typeof this._handler === \"function\") {\r\n\t\t\t\tthis._handler.apply(this, [e]);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}, this), {passive: false});\r\n\t};\r\n\r\n\tprivate _defaultHandler = (e: any):void => {\r\n\t\tconst timelineOffset = this.$gantt.$task.getBoundingClientRect().x;\r\n\t\tconst cursorOffset = e.clientX - timelineOffset;\r\n\t\tconst wheelY = this.$gantt.env.isFF ? (e.deltaY*-40) : e.wheelDelta;\r\n\t\tlet wheelUp = false;\r\n\t\tif (wheelY > 0) {\r\n\t\t\twheelUp = true;\r\n\t\t}\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t\tthis._setScaleSettings(wheelUp, cursorOffset);\r\n\t};\r\n\r\n\tprivate _setScaleSettings(wheelUp: boolean, cursorOffset: number) {\r\n\t\tif (wheelUp) {\r\n\t\t\tthis._stepUp(cursorOffset);\r\n\t\t} else {\r\n\t\t\tthis._stepDown(cursorOffset);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _setScaleDates = () => {\r\n\t\tif(this._initialStartDate && this._initialEndDate){\r\n\t\t\tthis.$gantt.config.start_date = this._initialStartDate;\r\n\t\t\tthis.$gantt.config.end_date = this._initialEndDate;\r\n\t\t}\r\n\t};\r\n\r\n\tprivate _stepUp(cursorOffset) {\r\n\t\tif (this._activeLevelIndex >= this._levels.length - 1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet nextLevel = this._activeLevelIndex;\r\n\t\tthis._setScaleDates();\r\n\r\n\t\tif(this._widthStep){\r\n\t\t\tlet newColumnWidth = this.$gantt.config.min_column_width + this._widthStep;\r\n\t\t\tif (newColumnWidth > this._maxColumnWidth) {\r\n\t\t\t\tnewColumnWidth = this._minColumnWidth;\r\n\t\t\t\tnextLevel++;\r\n\t\t\t}\r\n\r\n\t\t\tthis.$gantt.config.min_column_width = newColumnWidth;\r\n\t\t}else{\r\n\t\t\tnextLevel++;\r\n\t\t}\r\n\t\tthis._setLevel(nextLevel, cursorOffset);\r\n\t}\r\n\tprivate _stepDown(cursorOffset) {\r\n\t\tif (this._activeLevelIndex < 1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet nextLevel = this._activeLevelIndex;\r\n\t\tthis._setScaleDates();\r\n\r\n\t\tif(this._widthStep){\r\n\t\t\tlet newColumnWidth = this.$gantt.config.min_column_width - this._widthStep;\r\n\t\t\tif (newColumnWidth < this._minColumnWidth) {\r\n\t\t\t\tnewColumnWidth = this._maxColumnWidth;\r\n\t\t\t\tnextLevel--;\r\n\t\t\t}\r\n\t\t\tthis.$gantt.config.min_column_width = newColumnWidth;\r\n\t\t}else{\r\n\t\t\tnextLevel--;\r\n\t\t}\r\n\t\tthis._setLevel(nextLevel, cursorOffset);\r\n\t}\r\n}","export default function(gantt) {\r\n\r\n\tgantt.config.touch_drag = 75; //nearly immediate dnd\r\n\tgantt.config.touch = true;\r\n\tgantt.config.touch_feedback = true;\r\n\tgantt.config.touch_feedback_duration = 1;\r\n\tgantt._prevent_touch_scroll = false;\r\n\r\n\r\n\tgantt._touch_feedback = function () {\r\n\t\tif (gantt.config.touch_feedback) {\r\n\t\t\tif (navigator.vibrate)\r\n\t\t\t\tnavigator.vibrate(gantt.config.touch_feedback_duration);\r\n\t\t}\r\n\t};\r\n\r\n\tgantt.attachEvent(\"onGanttReady\", function(){\r\n\t\tif (gantt.$container)\t{\r\n\t\t\taddTouchEvents();\r\n\t\t}\r\n\t});\r\n\tgantt.attachEvent(\"onGanttLayoutReady\", function(){\r\n\t\tif (gantt.$container)\t{\r\n\t\t\t\tgantt.attachEvent(\"onGanttRender\", addTouchEvents, {once: true});\r\n\t\t}\r\n\t});\r\n\r\n\tfunction addTouchEvents(){\r\n\t\tif (gantt.config.touch != \"force\")\r\n\t\t\tgantt.config.touch = gantt.config.touch &&\r\n\t\t\t\t((navigator.userAgent.indexOf(\"Mobile\") != -1) ||\r\n\t\t\t\t\t(navigator.userAgent.indexOf(\"iPad\") != -1) ||\r\n\t\t\t\t\t(navigator.userAgent.indexOf(\"Android\") != -1) ||\r\n\t\t\t\t\t(navigator.userAgent.indexOf(\"Touch\") != -1)) ||\r\n\t\t\t\t\t((navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));\r\n\r\n\t\tif (gantt.config.touch) {\r\n\r\n\t\t\tvar touchEventsSupported = true;\r\n\t\t\ttry {\r\n\t\t\t\tdocument.createEvent(\"TouchEvent\");\r\n\t\t\t} catch (e) {\r\n\t\t\t\ttouchEventsSupported = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (touchEventsSupported) {\r\n\t\t\t\tgantt._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\r\n\t\t\t\t\tif (ev.touches && ev.touches.length > 1) return null;\r\n\t\t\t\t\tif (ev.touches[0])\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\ttarget: ev.target,\r\n\t\t\t\t\t\t\tpageX: ev.touches[0].pageX,\r\n\t\t\t\t\t\t\tpageY: ev.touches[0].pageY,\r\n\t\t\t\t\t\t\tclientX: ev.touches[0].clientX,\r\n\t\t\t\t\t\t\tclientY: ev.touches[0].clientY\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn ev;\r\n\t\t\t\t}, function () {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t});\r\n\t\t\t} else if (window.navigator.pointerEnabled) {\r\n\t\t\t\tgantt._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\r\n\t\t\t\t\tif (ev.pointerType == \"mouse\") return null;\r\n\t\t\t\t\treturn ev;\r\n\t\t\t\t}, function (ev) {\r\n\t\t\t\t\treturn (!ev || (ev.pointerType == \"mouse\" ));\r\n\t\t\t\t});\r\n\t\t\t} else if (window.navigator.msPointerEnabled) {\r\n\t\t\t\tgantt._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\r\n\t\t\t\t\tif (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\r\n\t\t\t\t\treturn ev;\r\n\t\t\t\t}, function (ev) {\r\n\t\t\t\t\treturn (!ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tfunction findTargetView(event){\r\n\t\tvar allViews = gantt.$layout.getCellsByType(\"viewCell\");\r\n\r\n\t\tfor(var i = 0; i < allViews.length; i++){\r\n\t\t\tvar box = allViews[i].$view.getBoundingClientRect();\r\n\t\t\tif(event.clientX >= box.left && event.clientX <= box.right &&\r\n\t\t\t\tevent.clientY <= box.bottom && event.clientY >= box.top){\r\n\t\t\t\t\treturn allViews[i];\r\n\t\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getScrollState(view){\r\n\t\tvar scrollX = view.$config.scrollX ? gantt.$ui.getView(view.$config.scrollX) : null;\r\n\t\tvar scrollY = view.$config.scrollY ? gantt.$ui.getView(view.$config.scrollY) : null;\r\n\r\n\t\tvar scrollState = {x: null, y: null};\r\n\t\tif(scrollX){\r\n\t\t\tvar state = scrollX.getScrollState();\r\n\t\t\tif(state.visible){\r\n\t\t\t\tscrollState.x = scrollX.$view.scrollLeft;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(scrollY){\r\n\t\t\tvar state = scrollY.getScrollState();\r\n\t\t\tif(state.visible){\r\n\t\t\t\tscrollState.y = scrollY.$view.scrollTop;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn scrollState;\r\n\t}\r\n\r\n\tfunction scrollView(view, left, top){\r\n\t\tvar scrollX = view.$config.scrollX ? gantt.$ui.getView(view.$config.scrollX) : null;\r\n\t\tvar scrollY = view.$config.scrollY ? gantt.$ui.getView(view.$config.scrollY) : null;\r\n\r\n\t\tif(scrollX){\r\n\t\t\tscrollX.scrollTo(left, null);\r\n\t\t}\r\n\t\tif(scrollY){\r\n\t\t\tscrollY.scrollTo(null, top);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getTaskDND(){\r\n\t\tvar tasksDnD;\r\n\t\tif(gantt.$ui.getView(\"timeline\")){\r\n\t\t\ttasksDnD = gantt.$ui.getView(\"timeline\")._tasks_dnd;\r\n\t\t}\r\n\t\treturn tasksDnD;\r\n\t}\r\n\r\n\tvar touchHandlers = [];\r\n\r\n//we can't use native scrolling, as we need to sync momentum between different parts\r\n//so we will block native scroll and use the custom one\r\n//in future we can add custom momentum\r\n\tgantt._touch_events = function (names, accessor, ignore) {\r\n\t\t//webkit on android need to be handled separately\r\n\t\tvar dblclicktime = 0;\r\n\t\tvar actionMode = false;\r\n\t\tvar scrollMode = false;\r\n\t\tvar actionStart = null;\r\n\t\tvar scrollState;\r\n\t\tvar longTapTimer = null;\r\n\t\tvar currentDndId = null;\r\n\t\tvar dndNodes = [];\r\n\t\tvar targetView = null;\r\n\t\tlet multiTouchEvents = {};\r\n\r\n\t\tfor(var i = 0; i < touchHandlers.length; i++){\r\n\t\t\tgantt.eventRemove(touchHandlers[i][0], touchHandlers[i][1], touchHandlers[i][2]);\r\n\t\t}\r\n\t\ttouchHandlers = [];\r\n\r\n\t\t//touch move\r\n\t\ttouchHandlers.push([gantt.$container, names[0], function (e) {\r\n\t\t\tvar tasksDnD = getTaskDND();\r\n\r\n\t\t\t\tif (ignore(e)) return;\r\n\r\n\t\t\t\t//ignore common and scrolling moves\r\n\t\t\t\tif (!actionMode) return;\r\n\r\n\t\t\t\tif (longTapTimer) clearTimeout(longTapTimer);\r\n\r\n\t\t\t\tvar source = accessor(e);\r\n\t\t\t\tif (tasksDnD && (tasksDnD.drag.id || tasksDnD.drag.start_drag)) {\r\n\t\t\t\t\ttasksDnD.on_mouse_move(source);\r\n\t\t\t\t\tif (e.preventDefault)\r\n\t\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\te.cancelBubble = true;\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!gantt._prevent_touch_scroll) {\r\n\t\t\t\t\tif (source && actionStart) {\r\n\t\t\t\t\t\tvar dx = actionStart.pageX - source.pageX;\r\n\t\t\t\t\t\tvar dy = actionStart.pageY - source.pageY;\r\n\t\t\t\t\t\tif (!scrollMode && (Math.abs(dx) > 5 || Math.abs(dy) > 5)) {\r\n\t\t\t\t\t\t\tscrollMode = true;\r\n\t\t\t\t\t\t\t//gantt._touch_scroll_active = scroll_mode = true;\r\n\t\t\t\t\t\t\tdblclicktime = 0;\r\n\r\n\t\t\t\t\t\t\tif(targetView){\r\n\t\t\t\t\t\t\t\tscrollState = getScrollState(targetView);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tscrollState = gantt.getScrollState();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif (scrollMode) {\r\n\r\n\t\t\t\t\t\t\tvar newScrollState;\r\n\t\t\t\t\t\t\tvar scrollX = scrollState.x + dx;\r\n\t\t\t\t\t\t\tvar scrollY = scrollState.y + dy;\r\n\t\t\t\t\t\t\tif(targetView){\r\n\t\t\t\t\t\t\t\tscrollView(targetView, scrollX, scrollY);\r\n\t\t\t\t\t\t\t\tnewScrollState = getScrollState(targetView);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tgantt.scrollTo(scrollX, scrollY);\r\n\t\t\t\t\t\t\t\tnewScrollState = gantt.getScrollState();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif ((scrollState.x != newScrollState.x && dy > 2 * dx) ||\r\n\t\t\t\t\t\t\t\t(scrollState.y != newScrollState.y && dx > 2 * dy )) {\r\n\t\t\t\t\t\t\t\treturn block_action(e);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn block_action(e);\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}]);\r\n\r\n\t\t// prevent page drag on touch move\r\n\t\ttry{\r\n\t\t\tdocument.addEventListener('touchmove', function(e) {\r\n\t\t\t\tif (gantt._touch_drag) {\r\n\t\t\t\t\tblock_action(e);\r\n\t\t\t\t}\r\n\t\t\t}, { passive: false });\r\n\t\t}\r\n\t\tcatch(e){\r\n\t\t\t// eslint-disable-next-line no-console\r\n\t\t\tconsole.warn(\"Cannot prevent touch event for the page drag\");\r\n\t\t}\r\n\r\n\t\t//block touch context menu in IE10\r\n\t\ttouchHandlers.push([this.$container, \"contextmenu\", function (e) {\r\n\t\t\tif (actionMode)\r\n\t\t\t\treturn block_action(e);\r\n\t\t}]);\r\n\r\n\t\t//touch start\r\n\t\ttouchHandlers.push([this.$container, names[1], function (e) {\r\n\t\t\tmultiTouchEvents = e.touches.length;\r\n\t\t\t// block pull-to-refresh\r\n\t\t\tif(document && document.body){\r\n\t\t\t\tdocument.body.classList.add(\"gantt_touch_active\");\r\n\t\t\t}\r\n\r\n\t\t\tif (ignore(e)) return;\r\n\t\t\tif (e.touches && e.touches.length > 1) {\r\n\t\t\t\tactionMode = false;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tactionStart = accessor(e);\r\n\t\t\ttargetView = findTargetView(actionStart);\r\n\t\t\tif (!gantt._locate_css(actionStart, \"gantt_hor_scroll\") && !gantt._locate_css(actionStart, \"gantt_ver_scroll\")) {\r\n\t\t\t\tactionMode = true;\r\n\t\t\t}\r\n\t\t\tvar tasksDnD = getTaskDND();\r\n\r\n\t\t\t//long tap\r\n\t\t\tlongTapTimer = setTimeout(function () {\r\n\t\t\t\tvar taskId = gantt.locate(actionStart);\r\n\t\t\t\tif (tasksDnD && (taskId && !gantt._locate_css(actionStart, \"gantt_link_control\") && !gantt._locate_css(actionStart, \"gantt_grid_data\"))) {\r\n\t\t\t\t\ttasksDnD.on_mouse_down(actionStart);\r\n\r\n\t\t\t\t\tif (tasksDnD.drag && tasksDnD.drag.start_drag) {\r\n\t\t\t\t\t\t// we need that as touch events break if the target node is removed from the DOM\r\n\t\t\t\t\t\tcloneTaskRendered(taskId);\r\n\t\t\t\t\t\ttasksDnD._start_dnd(actionStart);\r\n\t\t\t\t\t\tgantt._touch_drag = true;\r\n\r\n\t\t\t\t\t\tgantt.refreshTask(taskId);\r\n\r\n\t\t\t\t\t\tgantt._touch_feedback();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlongTapTimer = null;\r\n\t\t\t}, gantt.config.touch_drag);\r\n\t\t}]);\r\n\r\n\t\t//touch end\r\n\t\ttouchHandlers.push([this.$container, names[2], function (e) {\r\n\t\t\tif(document && document.body){\r\n\t\t\t\tdocument.body.classList.remove(\"gantt_touch_active\");\r\n\t\t\t}\r\n\t\t\tif (ignore(e)) return;\r\n\t\t\tif (longTapTimer) clearTimeout(longTapTimer);\r\n\t\t\tgantt._touch_drag = false;\r\n\t\t\tactionMode = false;\r\n\t\t\tvar source = accessor(e);\r\n\r\n\t\t\tvar tasksDnD = getTaskDND();\r\n\r\n\t\t\tif(tasksDnD)\r\n\t\t\t\ttasksDnD.on_mouse_up(source);\r\n\r\n\t\t\tif (currentDndId && gantt.isTaskExists(currentDndId)) {\r\n\t\t\t\tgantt.refreshTask(currentDndId);\r\n\t\t\t\tif(dndNodes.length){\r\n\t\t\t\t\tdndNodes.forEach(function(node){\r\n\t\t\t\t\t\tif(node.parentNode){\r\n\t\t\t\t\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tgantt._touch_feedback();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//gantt._touch_scroll_active = action_mode = scroll_mode = false;\r\n\t\t\tactionMode = scrollMode = false;\r\n\t\t\tdndNodes = [];\r\n\t\t\tcurrentDndId = null;\r\n\r\n\t\t\t//dbl-tap handling\r\n\t\t\tif (actionStart && dblclicktime) {\r\n\t\t\t\tvar now = new Date();\r\n\t\t\t\t// doubletap shouldn't happen with multitouch\r\n\t\t\t\tif ((now - dblclicktime) < 500 && multiTouchEvents <= 1) {\r\n\r\n\t\t\t\t\tvar mouseEvents = gantt.$services.getService(\"mouseEvents\");\r\n\t\t\t\t\tmouseEvents.onDoubleClick(actionStart);\r\n\t\t\t\t\tblock_action(e);\r\n\t\t\t\t} else\r\n\t\t\t\t\tdblclicktime = now;\r\n\t\t\t} else {\r\n\t\t\t\tdblclicktime = new Date();\r\n\t\t\t}\r\n\t\t}]);\r\n\r\n\t\tfor(var i = 0; i < touchHandlers.length; i++){\r\n\t\t\tgantt.event(touchHandlers[i][0], touchHandlers[i][1], touchHandlers[i][2]);\r\n\t\t}\r\n\r\n\t\t//common helper, prevents event\r\n\t\tfunction block_action(e) {\r\n\t\t\tif (e && e.preventDefault && e.cancelable){\r\n\t\t\t\te.preventDefault();\r\n\t\t\t}\r\n\t\t\te.cancelBubble = true;\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfunction cloneTaskRendered(taskId) {\r\n\t\t\tconst renders = gantt._getTaskLayers();\r\n\t\t\tlet task = gantt.getTask(taskId);\r\n\t\t\tif (task) {\r\n\t\t\t\tlet visible = gantt.isTaskVisible(taskId);\r\n\t\t\t\tif (visible){\r\n\t\t\t\t\tcurrentDndId = taskId;\r\n\t\t\t\t\tfor (let i = 0; i < renders.length; i++) {\r\n\t\t\t\t\t\ttask = renders[i].rendered[taskId];\r\n\t\t\t\t\t\tif (task && task.getAttribute(gantt.config.task_attribute) && task.getAttribute(gantt.config.task_attribute) == taskId) {\r\n\t\t\t\t\t\t\tconst copy = task.cloneNode(true);\r\n\t\t\t\t\t\t\tdndNodes.push(task);\r\n\t\t\t\t\t\t\trenders[i].rendered[taskId] = copy;\r\n\t\t\t\t\t\t\ttask.style.display = \"none\";\r\n\t\t\t\t\t\t\tcopy.className += \" gantt_drag_move \";\r\n\t\t\t\t\t\t\ttask.parentNode.appendChild(copy);\r\n\t\t\t\t\t\t\t//return copy;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (task.$split_subtask){\r\n\t\t\t\t\tlet renderedParent = task.$rendered_parent;\r\n\t\t\t\t\tvisible = gantt.isTaskVisible(renderedParent);\r\n\t\t\t\t\tif (!visible){\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcurrentDndId = taskId;\r\n\t\t\t\t\tfor (let i = 0; i < renders.length; i++) {\r\n\t\t\t\t\t\tconst parent = renders[i].rendered[renderedParent];\r\n\t\t\t\t\t\tlet taskNode;\r\n\t\t\t\t\t\tif (parent && parent.childNodes){\r\n\t\t\t\t\t\t\ttaskNode = parent.querySelector(`[${gantt.config.task_attribute}=\"${task.id}\"]`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (taskNode) {\r\n\t\t\t\t\t\t\t// move the child node to a different parent as the task bar will be repainted\r\n\t\t\t\t\t\t\t// and the initial node will be lost\r\n\t\t\t\t\t\t\tconst copy = taskNode.cloneNode(true);\r\n\t\t\t\t\t\t\ttaskNode.parentNode.appendChild(copy);\r\n\r\n\t\t\t\t\t\t\tgantt.$task_bars.appendChild(taskNode);\r\n\t\t\t\t\t\t\ttaskNode.style.display = \"none\";\r\n\r\n\t\t\t\t\t\t\t// don't add the node as rendered otherwise it will be lost:\r\n\t\t\t\t\t\t\t// renders[i].rendered[taskId] = taskNode;\r\n\t\t\t\t\t\t\t// instead, add it to dndNodes as its elements will be removed after drag\r\n\t\t\t\t\t\t\tdndNodes.push(taskNode);\r\n\r\n\t\t\t\t\t\t\ttaskNode = null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n};","function dummy() {\r\n\t// eslint-disable-next-line\r\n\tconsole.log(\"Method is not implemented.\"); \r\n}\r\nfunction BaseControl() {\r\n}\r\n\r\n// base methods will be runned in gantt context\r\nBaseControl.prototype.render = dummy; // arguments: sns\r\nBaseControl.prototype.set_value = dummy; // arguments: node, value, ev, sns(config)\r\nBaseControl.prototype.get_value = dummy; // arguments node, ev, sns(config)\r\nBaseControl.prototype.focus = dummy; // arguments: node\r\n\r\nexport default function(gantt) { // we could send current instance of gantt to module\r\n\treturn BaseControl;\r\n};","import * as helpers from \"../../../utils/helpers\";\r\n\r\nvar htmlHelpers = {\r\n\tgetHtmlSelect: function(options, attributes, value) {\r\n\t\tvar innerHTML = \"\";\r\n\t\tvar _this = this;\r\n\r\n\t\toptions = options || [];\r\n\t\t\r\n\t\thelpers.forEach(options, function(entry) {\r\n\t\t\tvar _attributes = [{ key: \"value\", value: entry.key }];\r\n\r\n\t\t\tif (value == entry.key) {\r\n\t\t\t\t_attributes[_attributes.length] = { key: \"selected\", value: \"selected\" };\r\n\t\t\t}\r\n\t\t\tif (entry.attributes) {\r\n\t\t\t\t_attributes = _attributes.concat(entry.attributes);\r\n\t\t\t}\r\n\t\t\tinnerHTML += _this.getHtmlOption({ innerHTML: entry.label }, _attributes);\r\n\t\t});\r\n\r\n\t\treturn _getHtmlContainer(\"select\", { innerHTML: innerHTML }, attributes);\r\n\t},\r\n\tgetHtmlOption: function(options, attributes) { return _getHtmlContainer(\"option\", options, attributes); },\r\n\tgetHtmlButton: function(options, attributes) { return _getHtmlContainer(\"button\", options, attributes); },\r\n\tgetHtmlDiv: function(options, attributes) { return _getHtmlContainer(\"div\", options, attributes); },\r\n\tgetHtmlLabel: function(options, attributes) { return _getHtmlContainer(\"label\", options, attributes); },\r\n\tgetHtmlInput: function(attributes) {\r\n\t\treturn \"\";\r\n\t}\r\n};\r\n\r\nfunction _getHtmlContainer(tag, options, attributes) {\r\n\tvar html;\r\n\r\n\toptions = options || [];\r\n\t\r\n\thtml = \"<\" + tag + _getHtmlAttributes(attributes || []) + \">\" + (options.innerHTML || \"\") + \"\";\r\n\treturn html;\r\n\r\n}\r\n\r\nfunction _getHtmlAttributes(attributes) {\r\n\tvar html = \"\";\r\n\r\n\thelpers.forEach(attributes, function(entry) {\r\n\t\thtml += \" \" + entry.key + \"='\" + entry.value + \"'\";\r\n\t});\r\n\treturn html;\r\n}\r\n\r\nexport default htmlHelpers;","import __extends from \"../../../../utils/extends\";\r\nimport htmlHelpers from \"../../utils/html_helpers\";\r\n\r\nimport Super from \"./base_control\";\r\n\r\nexport default function(gantt) {\r\n\tconst _super = Super(gantt);\r\n\r\n\tfunction SelectControl() {\r\n\t\tvar self = _super.apply(this, arguments) || this;\r\n\t\r\n\t\treturn self; \r\n\t}\r\n\t\r\n\t__extends(SelectControl, _super);\r\n\t\r\n\tSelectControl.prototype.render = function(sns) {\r\n\t\tconst height = sns.height ? `height:${sns.height}px;` : '';\r\n\t\tlet html = `
`;\r\n\r\n\t\thtml += htmlHelpers.getHtmlSelect(sns.options, [{ key: \"style\", value: \"width:100%;\" }, { key: \"title\", value: sns.name }]);\r\n\t\thtml += \"
\";\r\n\t\treturn html;\r\n\t};\r\n\r\n\tSelectControl.prototype.set_value = function(node, value, ev, sns) {\r\n\t\tvar select = node.firstChild;\r\n\t\tif (!select._dhx_onchange && sns.onchange) {\r\n\t\t\tselect.onchange = sns.onchange;\r\n\t\t\tselect._dhx_onchange = true;\r\n\t\t}\r\n\t\tif (typeof value === \"undefined\")\r\n\t\t\tvalue = (select.options[0] || {}).value;\r\n\t\tselect.value = value || \"\";\r\n\t};\r\n\t\r\n\tSelectControl.prototype.get_value = function(node) {\r\n\t\treturn node.firstChild.value;\r\n\t};\r\n\t\r\n\tSelectControl.prototype.focus = function(node) {\r\n\t\tvar a = node.firstChild;\r\n\t\tgantt._focus(a, true);\r\n\t};\r\n\t\r\n\treturn SelectControl;\r\n};","import __extends from \"../../../../utils/extends\";\r\nimport SelectControl from \"./select_control\";\r\nexport default function(gantt) {\r\n\tvar _super = SelectControl(gantt);\r\n\r\n\tfunction ParentControl() {\r\n\t\tvar self = _super.apply(this, arguments) || this; \r\n\r\n\t\treturn self; \r\n\t}\r\n\r\n\t__extends(ParentControl, _super);\r\n\r\n\r\n\tParentControl.prototype.render = function(sns) {\r\n\t\treturn _display(sns, false);\r\n\t};\r\n\r\n\tParentControl.prototype.set_value = function(node, value, ev, config) {\r\n\t\t// GS-1051. If the value is `0`, the set_value function in the select control won't select \r\n\t\t// the first child because (0 || '') = '';\r\n\t\tif (value === 0) value = \"0\";\r\n\r\n\t\tvar tmpDom = document.createElement(\"div\");\r\n\t\ttmpDom.innerHTML = _display(config, ev.id);\r\n\t\tvar newOptions = tmpDom.removeChild(tmpDom.firstChild);\r\n\t\tnode.onselect = null;\r\n\t\tnode.parentNode.replaceChild(newOptions, node);\r\n\r\n\t\treturn gantt.form_blocks.select.set_value.apply(gantt, [newOptions, value, ev, config]);\r\n\t};\r\n\r\n\tfunction _display(config, item_id) {\r\n\t\tvar tasks = [],\r\n\t\t\toptions = [];\r\n\t\tif (item_id) {\r\n\t\t\ttasks = gantt.getTaskByTime();\r\n\t\t\tif (config.allow_root) {\r\n\t\t\t\ttasks.unshift({id: gantt.config.root_id, text: config.root_label || \"\"});\r\n\t\t\t}\r\n\t\t\ttasks = _filter(tasks, config, item_id);\r\n\t\t\tif (config.sort) {\r\n\t\t\t\ttasks.sort(config.sort);\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar text = config.template || gantt.templates.task_text;\r\n\t\tfor (var i = 0; i < tasks.length; i++) {\r\n\t\t\tvar label = text.apply(gantt, [tasks[i].start_date, tasks[i].end_date, tasks[i]]);\r\n\t\t\tif (label === undefined) {\r\n\t\t\t\tlabel = \"\";\r\n\t\t\t}\r\n\t\t\toptions.push({\r\n\t\t\t\tkey: tasks[i].id,\r\n\t\t\t\tlabel: label\r\n\t\t\t});\r\n\t\t}\r\n\t\tconfig.options = options;\r\n\t\tconfig.map_to = config.map_to || \"parent\";\r\n\t\treturn gantt.form_blocks.select.render.apply(this, arguments);\r\n\t}\r\n\r\n\tfunction _filter(options, config, item_id) {\r\n\t\tvar filter = config.filter || function() {\r\n\t\t\treturn true;\r\n\t\t};\r\n\r\n\t\toptions = options.slice(0);\r\n\r\n\t\tfor (var i = 0; i < options.length; i++) {\r\n\t\t\tvar task = options[i];\r\n\t\t\tif (task.id == item_id || gantt.isChildOf(task.id, item_id) || filter(task.id, task) === false) {\r\n\t\t\t\toptions.splice(i, 1);\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn options;\r\n\t}\r\n\treturn ParentControl;\r\n};","import TemplateControlConstructor from \"./controls/template_control\";\r\nimport TextareaControlConstructor from \"./controls/textarea_control\";\r\nimport TimeControlConstructor from \"./controls/time_control\";\r\nimport SelectControlConstructor from \"./controls/select_control\";\r\nimport CheckboxControlConstructor from \"./controls/checkbox_control\";\r\nimport RadioControlConstructor from \"./controls/radio_control\";\r\nimport DurationControlConstructor from \"./controls/duration_control\";\r\nimport ParentControlConstructor from \"./controls/parent_control\";\r\nimport ResourcesControlConstructor from \"./controls/resources_control\";\r\nimport ConstraintControlConstructor from \"./controls/constraint_control\";\r\nimport TypeselectControlConstructor from \"./controls/typeselect_control\";\r\nimport BaselineControlConstructor from \"./controls/baseline_control\";\r\n\r\nimport * as domHelpers from \"../utils/dom_helpers\";\r\nimport * as helpers from \"../../../utils/helpers\";\r\n\t\r\n\r\nexport default function (gantt) {\r\n\r\n\r\n\tvar TemplateControl = TemplateControlConstructor(gantt);\r\n\tvar TextareaControl = TextareaControlConstructor(gantt);\r\n\tvar TimeControl = TimeControlConstructor(gantt);\r\n\tvar SelectControl = SelectControlConstructor(gantt);\r\n\tvar CheckboxControl = CheckboxControlConstructor(gantt);\r\n\tvar RadioControl = RadioControlConstructor(gantt);\r\n\tvar DurationControl = DurationControlConstructor(gantt);\r\n\tvar ParentControl = ParentControlConstructor(gantt);\r\n\tvar ResourcesControl = ResourcesControlConstructor(gantt);\r\n\tvar ConstraintControl = ConstraintControlConstructor(gantt);\r\n\tvar TypeselectControl = TypeselectControlConstructor(gantt);\r\n\tvar BaselineControl = BaselineControlConstructor(gantt);\r\n\r\n\tgantt._lightbox_methods = {};\r\n\tgantt._lightbox_template = \"
 
\";\r\n\tgantt._lightbox_template = `
 \r\n
\r\n
\r\n\t\r\n\r\n
`;\r\n\r\n\t// GS-1952. Attaching the lightbox to the BODY element is not considered secure.\r\n\t// Attach it to Gantt container for Salesforce and other secure environments\r\n\tgantt._lightbox_root = gantt.$root;\r\n\tfunction setParentNode() {\r\n\t\tconst cspEnvironment = gantt.config.csp === true;\r\n\t\tconst salesforceEnvironment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"] || ('$shadowResolver$' in document.body);\r\n\t\tif (cspEnvironment || salesforceEnvironment) {\r\n\t\t\tgantt._lightbox_root = gantt.$root;\r\n\t\t} else {\r\n\t\t\tgantt._lightbox_root = document.body;\r\n\t\t}\r\n\t}\r\n\r\n\t//TODO: gantt._lightbox_id is changed from data.js and accessed from autoscheduling, check if it can be removed from gantt object\r\n\tvar state = gantt.$services.getService(\"state\");\r\n\tstate.registerProvider(\"lightbox\", function () {\r\n\t\treturn {\r\n\t\t\tlightbox: gantt._lightbox_id\r\n\t\t};\r\n\t});\r\n\r\n\tgantt.showLightbox = function (id) {\r\n\t\tvar task = this.getTask(id);\r\n\t\tif (!this.callEvent(\"onBeforeLightbox\", [id])) {\r\n\t\t\tif(gantt.isTaskExists(id) && gantt.getTask(id).$new){\r\n\t\t\t\t//GS-2340 if 'onBeforeLightbox' returns 'false' need update the order in datastore\r\n\t\t\t\tthis.$data.tasksStore._updateOrder();\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar box = this.getLightbox(this.getTaskType(task.type));\r\n\r\n\t\tthis.showCover(box);\r\n\t\tthis._fill_lightbox(id, box);\r\n\t\tthis._setLbPosition(box);\r\n\t\tthis._waiAria.lightboxVisibleAttr(box);\r\n\r\n\t\tthis.callEvent(\"onLightbox\", [id]);\r\n\t};\r\n\r\n\tfunction _is_chart_visible(gantt) {\r\n\t\tvar timeline = gantt.$ui.getView(\"timeline\");\r\n\t\tif (timeline && timeline.isVisible()) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tgantt._get_timepicker_step = function () {\r\n\t\tif (this.config.round_dnd_dates) {\r\n\t\t\tvar step;\r\n\t\t\tif (_is_chart_visible(this)) {\r\n\t\t\t\tvar scale = gantt.getScale();\r\n\t\t\t\tstep = (helpers.getSecondsInUnit(scale.unit) * scale.step) / 60;//timepicker step is measured in minutes\r\n\t\t\t}\r\n\r\n\t\t\tif (!step || step >= 60 * 24) {\r\n\t\t\t\tstep = this.config.time_step;\r\n\t\t\t}\r\n\t\t\treturn step;\r\n\t\t}\r\n\t\treturn this.config.time_step;\r\n\t};\r\n\tgantt.getLabel = function (property, key) {\r\n\t\tvar sections = this._get_typed_lightbox_config();\r\n\t\tfor (var i = 0; i < sections.length; i++) {\r\n\t\t\tif (sections[i].map_to == property) {\r\n\t\t\t\tvar options = sections[i].options;\r\n\t\t\t\tfor (var j = 0; j < options.length; j++) {\r\n\t\t\t\t\tif (options[j].key == key) {\r\n\t\t\t\t\t\treturn options[j].label;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t};\r\n\r\n\tgantt.updateCollection = function (list_name, collection) {\r\n\t\tcollection = collection.slice(0);\r\n\t\tvar list = gantt.serverList(list_name);\r\n\t\tif (!list) return false;\r\n\t\tlist.splice(0, list.length);\r\n\t\tlist.push.apply(list, collection || []);\r\n\t\tgantt.resetLightbox();\r\n\t};\r\n\tgantt.getLightboxType = function () {\r\n\t\treturn this.getTaskType(this._lightbox_type);\r\n\t};\r\n\tgantt.getLightbox = function (type) {\r\n\t\tvar lightboxDiv;\r\n\t\tvar fullWidth;\r\n\t\tvar html;\r\n\t\tvar sns;\r\n\t\tvar ds;\r\n\t\tvar classNames = \"\";\r\n\t\tsetParentNode();\r\n\r\n\t\tif (type === undefined)\r\n\t\t\ttype = this.getLightboxType();\r\n\r\n\t\tif (!this._lightbox || this.getLightboxType() != this.getTaskType(type)) {\r\n\t\t\tthis._lightbox_type = this.getTaskType(type);\r\n\t\t\tlightboxDiv = document.createElement(\"div\");\r\n\t\t\tclassNames = \"gantt_cal_light\";\r\n\t\t\tfullWidth = this._is_lightbox_timepicker();\r\n\r\n\t\t\tif (gantt.config.wide_form)\r\n\t\t\t\tclassNames += \" gantt_cal_light_wide\";\r\n\r\n\t\t\tif (fullWidth) {\r\n\t\t\t\tclassNames += \" gantt_cal_light_full\";\r\n\t\t\t}\r\n\r\n\t\t\tlightboxDiv.className = classNames;\r\n\r\n\t\t\tlightboxDiv.style.visibility = \"hidden\";\r\n\t\t\thtml = this._lightbox_template;\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += getHtmlButtons(this.config.buttons_left);\r\n\t\t\thtml += \"
\";\r\n\t\t\thtml += getHtmlButtons(this.config.buttons_right, true);\r\n\t\t\thtml += \"
\";\r\n\r\n\t\t\tlightboxDiv.innerHTML = html;\r\n\r\n\t\t\tgantt._waiAria.lightboxAttr(lightboxDiv);\r\n\r\n\t\t\tif (gantt.config.drag_lightbox) {\r\n\t\t\t\tlightboxDiv.firstChild.onmousedown = gantt._ready_to_dnd;\r\n\t\t\t\tlightboxDiv.firstChild.ontouchstart = function (e){\r\n\t\t\t\t\tgantt._ready_to_dnd(e.touches[0]);\r\n\t\t\t\t};\r\n\t\t\t\tlightboxDiv.firstChild.onselectstart = function () {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t};\r\n\t\t\t\tlightboxDiv.firstChild.style.cursor = \"pointer\";\r\n\t\t\t\tgantt._init_dnd_events();\r\n\t\t\t}\r\n\r\n\t\t\t// GS-1428: If there is lightbox node, we need to remove it from the DOM\r\n\t\t\tif (this._lightbox){\r\n\t\t\t\tthis.resetLightbox();\r\n\t\t\t}\r\n\t\t\tshow_cover();\r\n\t\t\tthis._cover.insertBefore(lightboxDiv, this._cover.firstChild);\r\n\t\t\tthis._lightbox = lightboxDiv;\r\n\r\n\t\t\tsns = this._get_typed_lightbox_config(type);\r\n\t\t\thtml = this._render_sections(sns);\r\n\r\n\t\t\tds = lightboxDiv.querySelector(\"div.gantt_cal_larea\");\r\n\t\t\t\r\n\t\t\t//GS-1131. If gantt_cal_larea is displayed, Firefox renders buttons incorrectly;\r\n\t\t\tvar backup_overflow = ds.style.overflow;\r\n\t\t\tds.style.overflow = 'hidden';\r\n\r\n\t\t\tds.innerHTML = html;\r\n\r\n\t\t\t\r\n\r\n\t\t\tbindLabelsToInputs(sns);\r\n\r\n\t\t\tds.style.overflow = backup_overflow;\r\n\r\n\t\t\tthis._init_lightbox_events(this);\r\n\t\t\tlightboxDiv.style.display = \"none\";\r\n\t\t\tlightboxDiv.style.visibility = \"visible\";\r\n\t\t}\r\n\t\treturn this._lightbox;\r\n\t};\r\n\r\n\tgantt._render_sections = function (sns) {\r\n\t\tvar html = \"\";\r\n\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\tvar block = this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue; //ignore incorrect blocks\r\n\t\t\tsns[i].id = \"area_\" + this.uid();\r\n\r\n\t\t\tvar display = sns[i].hidden ? \" style='display:none'\" : \"\";\r\n\t\t\tvar button = \"\";\r\n\t\t\tif (sns[i].button) {\r\n\t\t\t\tbutton = \"
\" + this.locale.labels[\"button_\" + sns[i].button] + \"
\";\r\n\t\t\t}\r\n\t\t\tif (sns[i].type == \"baselines\") {\r\n\t\t\t\tbutton = \"
\" + this.locale.labels.baselines_remove_all_button + \"
\" +\r\n\t\t\t\t\"
\" + this.locale.labels.baselines_add_button + \"
\";\r\n\t\t\t}\r\n\t\t\tif (this.config.wide_form) {\r\n\t\t\t\thtml += \"
\";\r\n\t\t\t}\r\n\t\t\thtml += \"
\" + block.render.call(this, sns[i]);\r\n\t\t\thtml += \"
\";\r\n\t\t}\r\n\t\treturn html;\r\n\t};\r\n\r\n\tgantt._center_lightbox = function(box){\r\n\t\tgantt._setLbPosition(box);\r\n\t};\r\n\tgantt._setLbPosition = function(box) {\r\n\t\tif(!box){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst rootElement = gantt._lightbox_root || gantt.$root;\r\n\t\tbox.style.top = Math.max(rootElement.offsetHeight / 2 - box.offsetHeight/2, 0) + \"px\";\r\n\t\tbox.style.left = Math.max(rootElement.offsetWidth / 2 - box.offsetWidth/2, 0) + \"px\";\r\n\t};\r\n\r\n\tgantt.showCover = function (box) {\r\n\t\tif (box){\r\n\t\t\tbox.style.display=\"block\";\r\n\t\r\n\t\t\tthis._setLbPosition(box);\r\n\t\t}\r\n\t\tshow_cover();\r\n\t\tthis._cover.style.display = \"\";\r\n\t};\r\n\tconst show_cover=function(){\r\n\t\tif(gantt._cover) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\r\n\t\tgantt._cover=document.createElement(\"div\");\r\n\t\tgantt._cover.className=\"gantt_cal_cover\";\r\n\t\tgantt._cover.style.display = \"none\";\r\n\t\r\n\t\tgantt.event(gantt._cover, \"mousemove\", gantt._move_while_dnd);\r\n\t\tgantt.event(gantt._cover, \"mouseup\", gantt._finish_dnd);\r\n\t\r\n\t\tconst rootElement = gantt._lightbox_root || gantt.$root;\r\n\t\trootElement.appendChild(gantt._cover);\r\n\t};\r\n\r\n\tgantt._init_lightbox_events = function () {\r\n\t\tgantt.lightbox_events = {};\r\n\r\n\r\n\t\tgantt.lightbox_events.gantt_save_btn = function () {\r\n\t\t\tgantt._save_lightbox();\r\n\t\t};\r\n\r\n\r\n\t\tgantt.lightbox_events.gantt_delete_btn = function () {\r\n\t\t\tgantt._lightbox_current_type = null;\r\n\t\t\tif (!gantt.callEvent(\"onLightboxDelete\", [gantt._lightbox_id]))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tif (gantt.isTaskExists(gantt._lightbox_id)) {\r\n\t\t\t\tgantt.$click.buttons[\"delete\"](gantt._lightbox_id);\r\n\t\t\t} else {\r\n\t\t\t\tgantt.hideLightbox();\r\n\t\t\t}\r\n\r\n\t\t};\r\n\r\n\r\n\t\tgantt.lightbox_events.gantt_cancel_btn = function () {\r\n\t\t\tgantt._cancel_lightbox();\r\n\t\t};\r\n\r\n\r\n\t\tgantt.lightbox_events[\"default\"] = function (e, src) {\r\n\t\t\tif (src.getAttribute(\"data-dhx-button\")) {\r\n\t\t\t\tgantt.callEvent(\"onLightboxButton\", [src.className, src, e]);\r\n\t\t\t} else {\r\n\t\t\t\tvar index, block, sec;\r\n\r\n\t\t\t\tvar className = domHelpers.getClassName(src);\r\n\t\t\t\tif (className.indexOf(\"gantt_custom_button\") != -1) {\r\n\t\t\t\t\tif (className.indexOf(\"gantt_custom_button_\") != -1) {\r\n\t\t\t\t\t\tindex = src.parentNode.getAttribute(\"data-index\");\r\n\t\t\t\t\t\tsec = src;\r\n\t\t\t\t\t\twhile (sec && domHelpers.getClassName(sec).indexOf(\"gantt_cal_lsection\") == -1) {\r\n\t\t\t\t\t\t\tsec = sec.parentNode;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tindex = src.getAttribute(\"data-index\");\r\n\t\t\t\t\t\tsec = src.parentNode;\r\n\t\t\t\t\t\tsrc = src.firstChild;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar sections = gantt._get_typed_lightbox_config();\r\n\r\n\t\t\t\tif (index) {\r\n\t\t\t\t\tindex = index * 1;\r\n\t\t\t\t\tblock = gantt.form_blocks[sections[index * 1].type];\r\n\t\t\t\t\tblock.button_click(index, src, sec, sec.nextSibling);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.event(gantt.getLightbox(), \"click\", function (e) {\r\n\t\t\tif(e.target.closest(\".gantt_cal_ltitle_close_btn\")){\r\n\t\t\t\tgantt._cancel_lightbox();\r\n\t\t\t}\r\n\t\t\tvar src = domHelpers.getTargetNode(e);\r\n\r\n\t\t\tvar className = domHelpers.getClassName(src);\r\n\t\t\tif (!className) {\r\n\t\t\t\tsrc = src.previousSibling;\r\n\t\t\t\tclassName = domHelpers.getClassName(src);\r\n\t\t\t}\r\n\t\t\tif (src && className && className.indexOf(\"gantt_btn_set\") === 0) {\r\n\t\t\t\tsrc = src.firstChild;\r\n\t\t\t\tclassName = domHelpers.getClassName(src);\r\n\t\t\t}\r\n\t\t\tif (src && className) {\r\n\t\t\t\tvar func = gantt.defined(gantt.lightbox_events[src.className]) ? gantt.lightbox_events[src.className] : gantt.lightbox_events[\"default\"];\r\n\t\t\t\treturn func(e, src);\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t});\r\n\r\n\t\tgantt.getLightbox().onkeydown = function (e) {\r\n\t\t\tvar event = e || window.event;\r\n\t\t\tvar target = e.target || e.srcElement;\r\n\t\t\tvar buttonTarget = domHelpers.getClassName(target).indexOf(\"gantt_btn_set\") > -1;\r\n\r\n\t\t\tswitch ((e || event).keyCode) {\r\n\t\t\t\tcase gantt.constants.KEY_CODES.SPACE: {\r\n\t\t\t\t\tif ((e || event).shiftKey) return;\r\n\t\t\t\t\tif (buttonTarget && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcase gantt.keys.edit_save:\r\n\t\t\t\t\tif ((e || event).shiftKey) return;\r\n\t\t\t\t\tif (buttonTarget && target.click) {\r\n\t\t\t\t\t\ttarget.click();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tgantt._save_lightbox();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase gantt.keys.edit_cancel:\r\n\t\t\t\t\tgantt._cancel_lightbox();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t};\r\n\t};\r\n\r\n\tgantt._cancel_lightbox = function () {\r\n\t\tvar task = this.getLightboxValues();\r\n\t\tgantt._lightbox_current_type = null;\r\n\t\tthis.callEvent(\"onLightboxCancel\", [this._lightbox_id, task.$new]);\r\n\t\tif (gantt.isTaskExists(task.id) && task.$new) {\r\n\t\t\tthis.silent(function () {\r\n\t\t\t\tgantt.$data.tasksStore.removeItem(task.id);\r\n\t\t\t\tgantt._update_flags(task.id, null);\r\n\t\t\t});\r\n\t\t\tthis.refreshData();\r\n\t\t}\r\n\r\n\t\tthis.hideLightbox();\r\n\t};\r\n\r\n\tgantt._save_lightbox = function () {\r\n\t\tvar task = this.getLightboxValues();\r\n\t\tgantt._lightbox_current_type = null;\r\n\t\tif (!this.callEvent(\"onLightboxSave\", [this._lightbox_id, task, !!task.$new]))\r\n\t\t\treturn;\r\n\r\n\t\t// GS-2170. Do not recalculate the indexes and dates of other tasks\r\n\t\t// as they will be recalculated in the `refreshData`\r\n\t\tgantt.$data.tasksStore._skipTaskRecalculation = \"lightbox\";\r\n\t\tif (task.$new) {\r\n\t\t\tdelete task.$new;\r\n\t\t\tthis.addTask(task, task.parent, this.getTaskIndex(task.id));\r\n\t\t} else if (this.isTaskExists(task.id)) {\r\n\t\t\tthis.mixin(this.getTask(task.id), task, true);\r\n\t\t\tthis.refreshTask(task.id);\r\n\t\t\tthis.updateTask(task.id);\r\n\t\t}\r\n\t\tgantt.$data.tasksStore._skipTaskRecalculation = false;\r\n\t\tthis.refreshData();\r\n\r\n\t\t// TODO: do we need any blockable events here to prevent closing lightbox?\r\n\t\tthis.hideLightbox();\r\n\t};\r\n\r\n\tgantt._resolve_default_mapping = function (section) {\r\n\t\tvar mapping = section.map_to;\r\n\t\tvar time_controls = { \"time\": true, \"time_optional\": true, \"duration\": true, \"duration_optional\": true };\r\n\t\tif (time_controls[section.type]) {\r\n\t\t\tif (section.map_to == \"auto\") {\r\n\t\t\t\tmapping = { start_date: \"start_date\", end_date: \"end_date\", duration: \"duration\" };\r\n\t\t\t} else if (typeof (section.map_to) === \"string\") {\r\n\t\t\t\tmapping = { start_date: section.map_to };\r\n\t\t\t}\r\n\t\t} else if (section.type === \"constraint\") {\r\n\t\t\tif (!section.map_to || typeof (section.map_to) === \"string\") {\r\n\t\t\t\tmapping = { constraint_type: \"constraint_type\", constraint_date: \"constraint_date\" };\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn mapping;\r\n\t};\r\n\r\n\tgantt.getLightboxValues = function () {\r\n\t\tvar task = {};\r\n\r\n\t\tif (gantt.isTaskExists(this._lightbox_id)) {\r\n\t\t\ttask = this.mixin({}, this.getTask(this._lightbox_id));\r\n\t\t}\r\n\r\n\t\tvar sns = this._get_typed_lightbox_config();\r\n\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\tvar node = gantt._lightbox_root.querySelector(\"#\" + sns[i].id);\r\n\t\t\tnode = (node ? node.nextSibling : node);\r\n\t\t\tvar block = this.form_blocks[sns[i].type];\r\n\t\t\tif (!block) continue;\r\n\t\t\tvar res = block.get_value.call(this, node, task, sns[i]);\r\n\t\t\tvar map_to = gantt._resolve_default_mapping(sns[i]);\r\n\t\t\tif (typeof map_to == \"string\" && map_to != \"auto\") {\r\n\t\t\t\ttask[map_to] = res;\r\n\t\t\t} else if (typeof map_to == \"object\") {\r\n\t\t\t\tfor (var property in map_to) {\r\n\t\t\t\t\tif (map_to[property])\r\n\t\t\t\t\t\ttask[map_to[property]] = res[property];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// GS-1282 We need to preserve the task type even if the lightbox doesn't have the typeselect section\r\n\t\t// GS-2460 set the current type from selector\r\n\t\tif (gantt._lightbox_current_type) {\r\n\t\t\ttask.type = gantt._lightbox_current_type;\r\n\t\t}\r\n\r\n\t\treturn task;\r\n\t};\r\n\r\n\r\n\tgantt.hideLightbox = function () {\r\n\t\tvar box = this.getLightbox();\r\n\t\tif (box) box.style.display = \"none\";\r\n\r\n\t\tthis._waiAria.lightboxHiddenAttr(box);\r\n\t\tthis._lightbox_id = null;\r\n\r\n\t\tthis.hideCover(box);\r\n\t\tthis.resetLightbox();\r\n\t\tthis.callEvent(\"onAfterLightbox\", []);\r\n\t};\r\n\tgantt.hideCover = function (box) {\r\n\t\tif(box){\r\n\t\t\tbox.style.display = \"none\";\r\n\t\t}\r\n\t\tif (this._cover)\r\n\t\t\tthis._cover.parentNode.removeChild(this._cover);\r\n\t\tthis._cover = null;\r\n\t};\r\n\r\n\tgantt.resetLightbox = function () {\r\n\t\tif (gantt._lightbox && !gantt._custom_lightbox)\r\n\t\t\tgantt._lightbox.remove();\r\n\t\tgantt._lightbox = null;\r\n\t};\r\n\tgantt._set_lightbox_values = function (data, box) {\r\n\t\tvar task = data;\r\n\t\tvar s = box.getElementsByTagName(\"span\");\r\n\t\tvar lightboxHeader = [];\r\n\t\tif (gantt.templates.lightbox_header) {\r\n\t\t\tlightboxHeader.push(\"\");\r\n\t\t\tlightboxHeader.push(gantt.templates.lightbox_header(task.start_date, task.end_date, task));\r\n\t\t\ts[1].innerHTML = \"\";\r\n\t\t\ts[2].innerHTML = gantt.templates.lightbox_header(task.start_date, task.end_date, task);\r\n\t\t} else {\r\n\t\t\tlightboxHeader.push(this.templates.task_time(task.start_date, task.end_date, task));\r\n\t\t\tlightboxHeader.push(String(this.templates.task_text(task.start_date, task.end_date, task) || \"\").substr(0, 70)); //IE6 fix\r\n\t\t\ts[1].innerHTML = this.templates.task_time(task.start_date, task.end_date, task);\r\n\t\t\ts[2].innerHTML = String(this.templates.task_text(task.start_date, task.end_date, task) || \"\").substr(0, 70); //IE6 fix\r\n\t\t}\r\n\t\ts[1].innerHTML = lightboxHeader[0];\r\n\t\ts[2].innerHTML = lightboxHeader[1];\r\n\r\n\t\tgantt._waiAria.lightboxHeader(box, lightboxHeader.join(\" \"));\r\n\r\n\t\tvar sns = this._get_typed_lightbox_config(this.getLightboxType());\r\n\t\tfor (var i = 0; i < sns.length; i++) {\r\n\t\t\tvar section = sns[i];\r\n\r\n\t\t\tif (!this.form_blocks[section.type]) {\r\n\t\t\t\tcontinue;//skip incorrect sections, same check is done during rendering\r\n\t\t\t}\r\n\r\n\r\n\t\t\tvar node = gantt._lightbox_root.querySelector(\"#\" + section.id).nextSibling;\r\n\t\t\tvar block = this.form_blocks[section.type];\r\n\t\t\tvar map_to = gantt._resolve_default_mapping(sns[i]);\r\n\t\t\tvar value = this.defined(task[map_to]) ? task[map_to] : section.default_value;\r\n\t\t\tblock.set_value.call(gantt, node, value, task, section);\r\n\r\n\t\t\tif (section.focus)\r\n\t\t\t\tblock.focus.call(gantt, node);\r\n\t\t}\r\n\t\tif (gantt.isTaskExists(data.id)){\r\n\t\t\tgantt._lightbox_id = data.id;\r\n\t\t}\r\n\t};\r\n\tgantt._fill_lightbox = function (id, box) {\r\n\t\tvar task = this.getTask(id);\r\n\t\tthis._set_lightbox_values(task, box);\r\n\t};\r\n\r\n\r\n\tgantt.getLightboxSection = function (name) {\r\n\t\tvar config = this._get_typed_lightbox_config();\r\n\t\tvar i = 0;\r\n\t\tfor (i; i < config.length; i++)\r\n\t\t\tif (config[i].name == name)\r\n\t\t\t\tbreak;\r\n\t\tvar section = config[i];\r\n\t\tif (!section)\r\n\t\t\treturn null;\r\n\r\n\t\tif (!this._lightbox)\r\n\t\t\tthis.getLightbox();\r\n\t\tvar header = gantt._lightbox_root.querySelector(\"#\" + section.id);\r\n\t\tvar node = header.nextSibling;\r\n\r\n\t\tvar result = {\r\n\t\t\tsection: section,\r\n\t\t\theader: header,\r\n\t\t\tnode: node,\r\n\t\t\tgetValue: function (ev) {\r\n\t\t\t\treturn gantt.form_blocks[section.type].get_value.call(gantt, node, (ev || {}), section);\r\n\t\t\t},\r\n\t\t\tsetValue: function (value, ev) {\r\n\t\t\t\treturn gantt.form_blocks[section.type].set_value.call(gantt, node, value, (ev || {}), section);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tvar handler = this._lightbox_methods[\"get_\" + section.type + \"_control\"];\r\n\t\treturn handler ? handler(result) : result;\r\n\t};\r\n\r\n\tgantt._lightbox_methods.get_template_control = function (result) {\r\n\t\tresult.control = result.node;\r\n\t\treturn result;\r\n\t};\r\n\tgantt._lightbox_methods.get_select_control = function (result) {\r\n\t\tresult.control = result.node.getElementsByTagName(\"select\")[0];\r\n\t\treturn result;\r\n\t};\r\n\tgantt._lightbox_methods.get_textarea_control = function (result) {\r\n\t\tresult.control = result.node.getElementsByTagName(\"textarea\")[0];\r\n\t\treturn result;\r\n\t};\r\n\tgantt._lightbox_methods.get_time_control = function (result) {\r\n\t\tresult.control = result.node.getElementsByTagName(\"select\"); // array\r\n\t\treturn result;\r\n\t};\r\n\r\n\r\n\tgantt._init_dnd_events = function () {\r\n\t\tvar eventElement = gantt._lightbox_root;\r\n\t\tthis.event(eventElement, \"mousemove\", gantt._move_while_dnd);\r\n\t\tthis.event(eventElement, \"mouseup\", gantt._finish_dnd);\r\n\t\tthis.event(eventElement, \"touchmove\", function (e){\r\n\t\t\tgantt._move_while_dnd(e.touches[0]);\r\n\t\t});\r\n\t\tthis.event(eventElement, \"touchend\", function (e){\r\n\t\t\tgantt._finish_dnd(e.touches[0]);\r\n\t\t});\r\n\t\t// GS-1952: In Salesforce environment, the lightbox is attached to the Gantt container. \r\n\t\t// So when Gantt is reinitialized, the events are no longer attached to the Gantt container.\r\n\t\t// gantt._init_dnd_events = function () {\r\n\t\t// };\r\n\t};\r\n\tgantt._move_while_dnd = function (event) {\r\n\t\tif (gantt._dnd_start_lb) {\r\n\t\t\tif (!document.gantt_unselectable) {\r\n\t\t\t\tgantt._lightbox_root.className += \" gantt_unselectable\";\r\n\t\t\t\tdocument.gantt_unselectable = true;\r\n\t\t\t}\r\n\t\t\tvar lb = gantt.getLightbox();\r\n\t\t\tvar now = [event.pageX, event.pageY];\r\n\t\t\tlb.style.top = gantt._lb_start[1] + now[1] - gantt._dnd_start_lb[1] + \"px\";\r\n\t\t\tlb.style.left = gantt._lb_start[0] + now[0] - gantt._dnd_start_lb[0] + \"px\";\r\n\t\t}\r\n\t};\r\n\tgantt._ready_to_dnd = function (event) {\r\n\t\tvar lb = gantt.getLightbox();\r\n\t\tgantt._lb_start = [lb.offsetLeft, lb.offsetTop];\r\n\t\tgantt._dnd_start_lb = [event.pageX, event.pageY];\r\n\t};\r\n\tgantt._finish_dnd = function () {\r\n\t\tif (gantt._lb_start) {\r\n\t\t\tgantt._lb_start = gantt._dnd_start_lb = false;\r\n\t\t\tgantt._lightbox_root.className = gantt._lightbox_root.className.replace(\" gantt_unselectable\", \"\");\r\n\t\t\tdocument.gantt_unselectable = false;\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tgantt._focus = function (node, select) {\r\n\t\tif (node && node.focus) {\r\n\t\t\tif (gantt.config.touch) {\r\n\t\t\t\t//do not focus editor, to prevent auto-zoom\r\n\t\t\t} else {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tif (select && node.select) node.select();\r\n\t\t\t\t\tnode.focus();\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\t// silent errors\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\r\n\tgantt.form_blocks = {\r\n\t\tgetTimePicker: function (sns, hidden) {\r\n\t\t\tvar html = \"\";\r\n\t\t\tvar cfg = this.config;\r\n\t\t\tvar i;\r\n\t\t\tvar options;\r\n\t\t\tvar ariaAttrs;\r\n\t\t\tvar readonly;\r\n\t\t\tvar display;\r\n\t\t\tvar settings = {\r\n\t\t\t\tfirst: 0,\r\n\t\t\t\tlast: 24 * 60,\r\n\t\t\t\tdate: this.date.date_part(new Date(gantt._min_date.valueOf())),\r\n\t\t\t\ttimeFormat: getTimeFormat(sns)\r\n\t\t\t};\r\n\r\n\t\t\t// map: default order => real one\r\n\t\t\tsns._time_format_order = { size: 0 };\r\n\r\n\t\t\tif (gantt.config.limit_time_select) {\r\n\t\t\t\tsettings.first = 60 * cfg.first_hour;\r\n\t\t\t\tsettings.last = 60 * cfg.last_hour + 1;\r\n\t\t\t\tsettings.date.setHours(cfg.first_hour);\r\n\t\t\t}\r\n\r\n\t\t\tfor (i = 0; i < settings.timeFormat.length; i++) {\r\n\t\t\t\t// adding spaces between selects\r\n\t\t\t\tif (i > 0) {\r\n\t\t\t\t\thtml += \" \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\toptions = getHtmlTimePickerOptions(sns, i, settings);\r\n\r\n\t\t\t\tif (options) {\r\n\t\t\t\t\tariaAttrs = gantt._waiAria.lightboxSelectAttrString(settings.timeFormat[i]);\r\n\t\t\t\t\treadonly = sns.readonly ? \"disabled='disabled'\" : \"\";\r\n\t\t\t\t\tdisplay = hidden ? \" style='display:none' \" : \"\";\r\n\t\t\t\t\thtml += \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tgetTimePickerValue: function (selects, config, offset) {\r\n\t\t\tvar map = config._time_format_order;\r\n\t\t\tvar needSetTime = gantt.defined(map[3]);\r\n\r\n\t\t\tvar time;\r\n\t\t\tvar hours = 0;\r\n\t\t\tvar minutes = 0;\r\n\r\n\t\t\tvar mapOffset = offset || 0;\r\n\r\n\t\t\tif (needSetTime) {\r\n\t\t\t\ttime = parseInt(selects[map[3] + mapOffset].value, 10);\r\n\t\t\t\thours = Math.floor(time / 60);\r\n\t\t\t\tminutes = time % 60;\r\n\t\t\t}\r\n\t\t\treturn new Date(selects[map[2] + mapOffset].value, selects[map[1] + mapOffset].value, selects[map[0] + mapOffset].value, hours, minutes);\r\n\t\t},\r\n\r\n\t\t_fill_lightbox_select: function (s, i, d, map) {\r\n\t\t\ts[i + map[0]].value = d.getDate();\r\n\t\t\ts[i + map[1]].value = d.getMonth();\r\n\t\t\ts[i + map[2]].value = d.getFullYear();\r\n\t\t\tif (gantt.defined(map[3])) {\r\n\t\t\t\tvar v = d.getHours() * 60 + d.getMinutes();\r\n\t\t\t\tv = Math.round(v / gantt._get_timepicker_step()) * gantt._get_timepicker_step();\r\n\t\t\t\tvar input = s[i + map[3]];\r\n\t\t\t\tinput.value = v;\r\n\t\t\t\t//in case option not shown\r\n\t\t\t\tinput.setAttribute(\"data-value\", v);\r\n\t\t\t}\r\n\t\t},\r\n\t\ttemplate: new TemplateControl(),\r\n\t\ttextarea: new TextareaControl(),\r\n\t\tselect: new SelectControl(),\r\n\t\ttime: new TimeControl(),\r\n\t\tduration: new DurationControl(),\r\n\t\tparent: new ParentControl(),\r\n\t\tradio: new RadioControl(),\r\n\t\tcheckbox: new CheckboxControl(),\r\n\t\tresources: new ResourcesControl(),\r\n\t\tconstraint: new ConstraintControl(),\r\n\t\tbaselines: new BaselineControl(),\r\n\t\ttypeselect: new TypeselectControl()\r\n\t};\r\n\r\n\tgantt._is_lightbox_timepicker = function () {\r\n\t\tvar s = this._get_typed_lightbox_config();\r\n\t\tfor (var i = 0; i < s.length; i++)\r\n\t\t\tif (s[i].name == \"time\" && s[i].type == \"time\")\r\n\t\t\t\treturn true;\r\n\t\treturn false;\r\n\t};\r\n\r\n\tgantt._simple_confirm = function (message, title, callback, ok) {\r\n\t\tif (!message)\r\n\t\t\treturn callback();\r\n\t\tvar opts = { text: message };\r\n\t\tif (title)\r\n\t\t\topts.title = title;\r\n\t\tif (ok) {\r\n\t\t\topts.ok = ok;\r\n\t\t}\r\n\t\tif (callback) {\r\n\t\t\topts.callback = function (result) {\r\n\t\t\t\tif (result)\r\n\t\t\t\t\tcallback();\r\n\t\t\t};\r\n\t\t}\r\n\t\tgantt.confirm(opts);\r\n\t};\r\n\r\n\tfunction _get_type_name(type_value) {\r\n\t\tfor (var i in this.config.types) {\r\n\t\t\tif (this.config.types[i] == type_value) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"task\";\r\n\t}\r\n\r\n\tgantt._get_typed_lightbox_config = function (type) {\r\n\t\tif (type === undefined) {\r\n\t\t\ttype = this.getLightboxType();\r\n\t\t}\r\n\r\n\t\tvar field = _get_type_name.call(this, type);\r\n\r\n\t\tif (gantt.config.lightbox[field + \"_sections\"]) {\r\n\t\t\treturn gantt.config.lightbox[field + \"_sections\"];\r\n\t\t} else {\r\n\t\t\treturn gantt.config.lightbox.sections;\r\n\t\t}\r\n\t};\r\n\r\n\tgantt._silent_redraw_lightbox = function (type) {\r\n\t\tvar oldType = this.getLightboxType();\r\n\r\n\t\tif (this.getState().lightbox) {\r\n\t\t\tvar taskId = this.getState().lightbox;\r\n\t\t\tvar formData = this.getLightboxValues(),\r\n\t\t\t\ttask = this.copy(this.getTask(taskId));\r\n\r\n\t\t\tthis.resetLightbox();\r\n\r\n\t\t\tvar updTask = this.mixin(task, formData, true);\r\n\t\t\tvar box = this.getLightbox(type ? type : undefined);\r\n\t\t\tthis._set_lightbox_values(updTask, box);\r\n\t\t\tthis.showCover(box);\r\n\t\t} else {\r\n\t\t\tthis.resetLightbox();\r\n\t\t\tthis.getLightbox(type ? type : undefined);\r\n\t\t}\r\n\t\tthis.callEvent(\"onLightboxChange\", [oldType, this.getLightboxType()]);\r\n\t};\r\n\r\n\tfunction bindLabelsToInputs(sns) {\r\n\t\tvar section;\r\n\t\tvar label;\r\n\t\tvar labelBlock;\r\n\t\tvar inputBlock;\r\n\t\tvar input;\r\n\t\tvar i;\r\n\r\n\t\tfor (i = 0; i < sns.length; i++) {\r\n\t\t\tsection = sns[i];\r\n\t\t\tlabelBlock = gantt._lightbox_root.querySelector(\"#\" + section.id);\r\n\r\n\t\t\tif (!section.id || !labelBlock) continue;\r\n\r\n\t\t\tlabel = labelBlock.querySelector(\"label\");\r\n\t\t\tinputBlock = labelBlock.nextSibling;\r\n\r\n\t\t\tif (!inputBlock) continue;\r\n\r\n\t\t\tinput = inputBlock.querySelector(\"input, select, textarea\");\r\n\t\t\tif (input) {\r\n\t\t\t\tinput.id = input.id || \"input_\" + gantt.uid();\r\n\t\t\t\tsection.inputId = input.id;\r\n\t\t\t\tlabel.setAttribute(\"for\", section.inputId);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getHtmlButtons(buttons, floatRight) {\r\n\t\tvar button;\r\n\t\tvar ariaAttr;\r\n\t\tvar html = \"\";\r\n\t\tvar i;\r\n\r\n\t\tfor (i = 0; i < buttons.length; i++) {\r\n\t\t\t// needed to migrate from 'dhx_something' to 'gantt_something' naming in a lightbox\r\n\t\t\tbutton = gantt.config._migrate_buttons[buttons[i]] ? gantt.config._migrate_buttons[buttons[i]] : buttons[i];\r\n\r\n\t\t\tariaAttr = gantt._waiAria.lightboxButtonAttrString(button);\r\n\t\t\thtml += \"
\" + gantt.locale.labels[button] + \"
\";\r\n\t\t}\r\n\t\treturn html;\r\n\t}\r\n\r\n\tfunction getTimeFormat(sns) {\r\n\t\tvar scale;\r\n\t\tvar unit;\r\n\t\tvar result;\r\n\r\n\t\tif (sns.time_format) return sns.time_format;\r\n\r\n\t\t// default order\r\n\t\tresult = [\"%d\", \"%m\", \"%Y\"];\r\n\t\tscale = gantt.getScale();\r\n\t\tunit = scale ? scale.unit : gantt.config.duration_unit;\r\n\t\tif (helpers.getSecondsInUnit(unit) < helpers.getSecondsInUnit(\"day\")) {\r\n\t\t\tresult.push(\"%H:%i\");\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tfunction getHtmlTimePickerOptions(sns, index, settings) {\r\n\t\tvar range;\r\n\t\tvar offset;\r\n\t\tvar start_year;\r\n\t\tvar end_year;\r\n\t\tvar i;\r\n\t\tvar time;\r\n\t\tvar diff;\r\n\t\tvar tdate;\r\n\t\tvar html = \"\";\r\n\r\n\t\tswitch (settings.timeFormat[index]) {\r\n\t\t\tcase \"%Y\":\r\n\t\t\t\tsns._time_format_order[2] = index;\r\n\t\t\t\tsns._time_format_order.size++;\r\n\t\t\t\t//year\r\n\r\n\t\t\t\tif (sns.year_range) {\r\n\t\t\t\t\tif (!isNaN(sns.year_range)) {\r\n\t\t\t\t\t\trange = sns.year_range;\r\n\t\t\t\t\t} else if (sns.year_range.push) {\r\n\t\t\t\t\t\t// if\r\n\t\t\t\t\t\tstart_year = sns.year_range[0];\r\n\t\t\t\t\t\tend_year = sns.year_range[1];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\trange = range || 10;\r\n\t\t\t\toffset = offset || Math.floor(range / 2);\r\n\t\t\t\tstart_year = start_year || settings.date.getFullYear() - offset;\r\n\t\t\t\tend_year = end_year || gantt.getState().max_date.getFullYear() + offset;\r\n\r\n\t\t\t\tfor (i = start_year; i < end_year; i++)\r\n\t\t\t\t\thtml += \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%m\":\r\n\t\t\t\tsns._time_format_order[1] = index;\r\n\t\t\t\tsns._time_format_order.size++;\r\n\t\t\t\t//month\r\n\t\t\t\tfor (i = 0; i < 12; i++)\r\n\t\t\t\t\thtml += \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%d\":\r\n\t\t\t\tsns._time_format_order[0] = index;\r\n\t\t\t\tsns._time_format_order.size++;\r\n\t\t\t\t//days\r\n\t\t\t\tfor (i = 1; i < 32; i++)\r\n\t\t\t\t\thtml += \"\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%H:%i\":\r\n\t\t\t\t// var last = 24*60, first = 0;\r\n\t\t\t\tsns._time_format_order[3] = index;\r\n\t\t\t\tsns._time_format_order.size++;\r\n\t\t\t\t//hours\r\n\t\t\t\ti = settings.first;\r\n\t\t\t\ttdate = settings.date.getDate();\r\n\t\t\t\tsns._time_values = [];\r\n\r\n\t\t\t\twhile (i < settings.last) {\r\n\t\t\t\t\ttime = gantt.templates.time_picker(settings.date);\r\n\t\t\t\t\thtml += \"\";\r\n\t\t\t\t\tsns._time_values.push(i);\r\n\t\t\t\t\tsettings.date.setTime(settings.date.valueOf() + gantt._get_timepicker_step() * 60 * 1000);\r\n\t\t\t\t\tdiff = (settings.date.getDate() != tdate) ? 1 : 0; // moved or not to the next day\r\n\t\t\t\t\ti = diff * 24 * 60 + settings.date.getHours() * 60 + settings.date.getMinutes();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn html;\r\n\t}\r\n};","import __extends from \"../../../../utils/extends\";\r\n\r\nimport Super from \"./base_control\";\r\n\r\nexport default function(gantt) {\r\n\tconst _super = Super(gantt);\r\n\r\n\tfunction TemplateControl() {\r\n\t\tvar self = _super.apply(this, arguments) || this; \r\n\t\treturn self; \r\n\t}\r\n\r\n\t__extends(TemplateControl, _super);\r\n\r\n\r\n\tTemplateControl.prototype.render = function(sns) {\r\n\t\tlet height = sns.height ? `${sns.height}px` : '';\r\n\t\treturn `
`;\r\n\t};\r\n\r\n\tTemplateControl.prototype.set_value = function(node, value) {\r\n\t\tnode.innerHTML = value || \"\";\r\n\t};\r\n\r\n\tTemplateControl.prototype.get_value = function(node) {\r\n\t\treturn node.innerHTML || \"\";\r\n\t};\r\n\r\n\tTemplateControl.prototype.focus = function() {};\r\n\r\n\treturn TemplateControl;\r\n};","import __extends from \"../../../../utils/extends\";\r\n\r\nimport Super from \"./base_control\";\r\n\r\nexport default function(gantt) {\r\n\tconst _super = Super(gantt);\r\n\r\n\tfunction TextareaControl() {\r\n\t\tvar self = _super.apply(this, arguments) || this;\r\n\r\n\t\treturn self; \r\n\t}\r\n\r\n\t__extends(TextareaControl, _super);\r\n\r\n\tTextareaControl.prototype.render = function(sns) {\r\n\t\tconst height = (sns.height || \"130\") + \"px\";\r\n\t\tconst placeholder = sns.placeholder ? `placeholder='${sns.placeholder}'` : \"\";\r\n\t\treturn `
`;\r\n\t};\r\n\r\n\tTextareaControl.prototype.set_value = function(node, value) {\r\n\t\tgantt.form_blocks.textarea._get_input(node).value = value || \"\";\r\n\t};\r\n\r\n\tTextareaControl.prototype.get_value = function(node) {\r\n\t\treturn gantt.form_blocks.textarea._get_input(node).value;\r\n\t};\r\n\r\n\tTextareaControl.prototype.focus = function(node) {\r\n\t\tvar a = gantt.form_blocks.textarea._get_input(node);\r\n\t\tgantt._focus(a, true);\r\n\t};\r\n\r\n\tTextareaControl.prototype._get_input = function(node) {\r\n\t\treturn node.querySelector(\"textarea\");\r\n\t};\r\n\r\n\treturn TextareaControl;\r\n};","import __extends from \"../../../../utils/extends\";\r\n\r\nimport Super from \"./base_control\";\r\n\r\nexport default function(gantt) {\r\n\tconst _super = Super(gantt);\r\n\r\n\tfunction TimeControl() {\r\n\t\tvar self = _super.apply(this, arguments) || this;\r\n\r\n\t\treturn self;\r\n\t}\r\n\r\n\t__extends(TimeControl, _super);\r\n\r\n\tTimeControl.prototype.render = function (sns) {\r\n\t\tvar time = gantt.form_blocks.getTimePicker.call(this, sns);\r\n\t\tlet sectionClassName = \"gantt_section_time\";\r\n\t\tif (sns.name !== \"time\"){\r\n\t\t\tsectionClassName += \" gantt_section_\" + sns.name;\r\n\t\t}\r\n\t\tvar html = \"
\";\r\n\t\thtml += time;\r\n\r\n\t\tif (sns.single_date) {\r\n\t\t\ttime = gantt.form_blocks.getTimePicker.call(this, sns, true);\r\n\t\t\thtml += \"\";\r\n\t\t} else {\r\n\t\t\thtml += \"  –  \";\r\n\t\t}\r\n\r\n\t\thtml += time;\r\n\t\thtml += \"
\";\r\n\t\treturn html;\r\n\t};\r\n\r\n\tTimeControl.prototype.set_value = function (node, value, ev, config) {\r\n\t\tvar cfg = config;\r\n\t\tvar s = node.getElementsByTagName(\"select\");\r\n\t\tvar map = config._time_format_order;\r\n\r\n\t\tif (cfg.auto_end_date) {\r\n\t\t\tvar _update_lightbox_select = function () {\r\n\t\t\t\tstart_date = new Date(s[map[2]].value, s[map[1]].value, s[map[0]].value, 0, 0);\r\n\t\t\t\tend_date = gantt.calculateEndDate({ start_date: start_date, duration: 1, task: ev });\r\n\t\t\t\tgantt.form_blocks._fill_lightbox_select(s, map.size, end_date, map, cfg);\r\n\t\t\t};\r\n\t\t\tfor (var i = 0; i < 4; i++) {\r\n\t\t\t\ts[i].onchange = _update_lightbox_select;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar mapping = gantt._resolve_default_mapping(config);\r\n\r\n\t\tif (typeof (mapping) === \"string\") mapping = { start_date: mapping };\r\n\r\n\t\tvar start_date = ev[mapping.start_date] || new Date();\r\n\t\tvar end_date = ev[mapping.end_date] || gantt.calculateEndDate({\r\n\t\t\tstart_date: start_date,\r\n\t\t\tduration: 1,\r\n\t\t\ttask: ev\r\n\t\t});\r\n\r\n\t\tgantt.form_blocks._fill_lightbox_select(s, 0, start_date, map, cfg);\r\n\t\tgantt.form_blocks._fill_lightbox_select(s, map.size, end_date, map, cfg);\r\n\t};\r\n\r\n\tTimeControl.prototype.get_value = function (node, ev, config) {\r\n\t\tvar selects = node.getElementsByTagName(\"select\");\r\n\t\tvar startDate;\r\n\t\tvar map = config._time_format_order;\r\n\t\tfunction _getEndDate(selects, map, startDate) {\r\n\t\t\tvar endDate = gantt.form_blocks.getTimePickerValue(selects, config, map.size);\r\n\t\t\t// GS-1010: We need to add a way to obtain exact end_date for validation\r\n\t\t\tif (endDate <= startDate) { // when end date seems wrong\r\n\t\t\t\tif (config.autofix_end !== false || config.single_date) { // auto correct it in two cases - when the auto correction is not disabled, or when we have 'single date' control and the user don't have the UI to specify the end date\r\n\t\t\t\t\treturn gantt.date.add(startDate, gantt._get_timepicker_step(), \"minute\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn endDate;\r\n\t\t}\r\n\r\n\t\tstartDate = gantt.form_blocks.getTimePickerValue(selects, config);\r\n\r\n\t\tif (typeof gantt._resolve_default_mapping(config) === \"string\") {\r\n\t\t\treturn startDate;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tstart_date: startDate,\r\n\t\t\tend_date: _getEndDate(selects, map, startDate)\r\n\t\t};\r\n\t};\r\n\r\n\tTimeControl.prototype.focus = function (node) {\r\n\t\tgantt._focus(node.getElementsByTagName(\"select\")[0]);\r\n\t};\r\n\r\n\treturn TimeControl;\r\n};","import * as helpers from \"../../../../utils/helpers\";\r\nimport __extends from \"../../../../utils/extends\";\r\nimport BaseConstrutor from \"./base_control\";\r\n\r\nexport default function(gantt) {\r\n\tvar _super = BaseConstrutor(gantt);\r\n\r\n\tfunction CheckboxControl() {\r\n\t\tvar self = _super.apply(this, arguments) || this;\r\n\r\n\t\treturn self; \r\n\t}\r\n\r\n\t__extends(CheckboxControl, _super);\r\n\r\n\tCheckboxControl.prototype.render = function(sns) {\r\n\t\tconst height = sns.height ? `height:${sns.height}px;` : '';\r\n\t\tlet html = `
`;\r\n\r\n\t\tif (sns.options && sns.options.length) {\r\n\t\t\tfor (var i = 0; i < sns.options.length; i++) {\r\n\t\t\t\thtml += \"\";\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tsns.single_value = true;\r\n\t\t\thtml += \"\";\r\n\t\t}\r\n\t\thtml += \"
\";\r\n\t\treturn html;\r\n\t};\r\n\r\n\tCheckboxControl.prototype.set_value = function(node, value, ev, sns) {\r\n\t\tvar checkboxes = Array.prototype.slice.call(node.querySelectorAll(\"input[type=checkbox]\"));\r\n\r\n\t\tif (!node._dhx_onchange && sns.onchange) {\r\n\t\t\tnode.onchange = sns.onchange;\r\n\t\t\tnode._dhx_onchange = true;\r\n\t\t}\r\n\r\n\t\tif(sns.single_value){\r\n\t\t\tvar box = checkboxes[0];\r\n\t\t\tbox.checked = !!value;\r\n\t\t}else{\r\n\t\t\thelpers.forEach(checkboxes, function(entry) {\r\n\t\t\t\tentry.checked = value ? value.indexOf(entry.value) >= 0 : false;\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n\r\n\tCheckboxControl.prototype.get_value = function(node, task, sns) {\r\n\t\tif(sns.single_value){\r\n\t\t\tvar box = node.querySelector(\"input[type=checkbox]\");\r\n\t\t\treturn box.checked;\r\n\t\t}else{\r\n\t\t\treturn helpers.arrayMap(Array.prototype.slice.call(node.querySelectorAll(\"input[type=checkbox]:checked\")), function(entry) {\r\n\t\t\t\treturn entry.value;\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n\r\n\tCheckboxControl.prototype.focus = function(node) {\r\n\t\tgantt._focus(node.querySelector(\"input[type=checkbox]\"));\r\n\t};\r\n\r\n\treturn CheckboxControl;\r\n};","import __extends from \"../../../../utils/extends\";\r\nimport Super from \"./base_control\";\r\n\r\nexport default function(gantt) {\r\n\tconst _super = Super(gantt);\r\n\r\n\tfunction RadioControl() {\r\n\t\tvar self = _super.apply(this, arguments) || this;\r\n\r\n\t\treturn self; \r\n\t}\r\n\r\n\t__extends(RadioControl, _super);\r\n\r\n\tRadioControl.prototype.render = function(sns) {\r\n\t\tconst height = sns.height ? `${sns.height}px` : '';\r\n\t\tlet html = `
`;\r\n\r\n\t\tif (sns.options && sns.options.length) {\r\n\t\t\tfor (var i = 0; i < sns.options.length; i++) {\r\n\t\t\t\thtml += \"\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\thtml += \"
\";\r\n\t\treturn html;\r\n\t};\r\n\r\n\tRadioControl.prototype.set_value = function(node, value, ev, sns) {\r\n\t\tvar radio;\r\n\r\n\t\tif (!sns.options || !sns.options.length) return;\r\n\r\n\t\tradio = node.querySelector(\"input[type=radio][value='\" + value + \"']\") ||\r\n\t\t\t\tnode.querySelector(\"input[type=radio][value='\" + sns.default_value + \"']\");\r\n\r\n\t\tif (!radio) return;\r\n\r\n\t\tif (!node._dhx_onchange && sns.onchange) {\r\n\t\t\tnode.onchange = sns.onchange;\r\n\t\t\tnode._dhx_onchange = true;\r\n\t\t}\r\n\r\n\t\tradio.checked = true;\r\n\t};\r\n\r\n\tRadioControl.prototype.get_value = function(node, ev) {\r\n\t\tvar result = node.querySelector(\"input[type=radio]:checked\");\r\n\r\n\t\treturn result ? result.value : \"\";\r\n\t};\r\n\r\n\tRadioControl.prototype.focus = function(node) {\r\n\t\tgantt._focus(node.querySelector(\"input[type=radio]\"));\r\n\t};\r\n\r\n\treturn RadioControl;\r\n};","import __extends from \"../../../../utils/extends\";\r\n\r\nimport DurationFormatterNumeric from \"../../../common/duration_formatter_numeric\";\r\nimport BaseConstrutor from \"./base_control\";\r\n\r\nexport default function(gantt) {\r\n\tvar _super = BaseConstrutor(gantt);\r\n\r\n\tfunction DurationControl() {\r\n\t\tvar self = _super.apply(this, arguments) || this; \r\n\r\n\t\treturn self; \r\n\t}\r\n\r\n\tfunction getFormatter(config) {\r\n\t\treturn config.formatter || new DurationFormatterNumeric();\r\n\t}\r\n\r\n\t__extends(DurationControl, _super);\r\n\r\n\tDurationControl.prototype.render = function(sns) {\r\n\t\tvar time = \"
\" + gantt.form_blocks.getTimePicker.call(this, sns) + \"
\";\r\n\t\tvar label = \" \"+ gantt.locale.labels[gantt.config.duration_unit + \"s\"] +\" \";\r\n\t\tvar singleDate = sns.single_date ? \" style='display:none'\" : \"\";\r\n\t\tvar readonly = sns.readonly ? \" disabled='disabled'\" : \"\";\r\n\t\tvar ariaAttr = gantt._waiAria.lightboxDurationInputAttrString(sns);\r\n\r\n\t\tvar durationInputClass = \"gantt_duration_value\";\r\n\t\tif(sns.formatter) {\r\n\t\t\tlabel = \"\";\r\n\t\t\tdurationInputClass += \" gantt_duration_value_formatted\" ;\r\n\t\t}\r\n\r\n\t\tvar duration = \"
\" +\r\n\t\t\"
\" +\r\n\t\t\t\"\" +\r\n\t\t\t\"\" +\r\n\t\t\t\"\"+\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+label+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"\";\r\n\t\tlet sectionClassName = \"gantt_section_time gantt_section_duration\";\r\n\t\tif (sns.name !== \"time\"){\r\n\t\t\tsectionClassName += \" gantt_section_\" + sns.name;\r\n\t\t}\t\r\n\t\tvar html = \"
\" + time + \" \" + duration + \"
\";\r\n\t\treturn html;\r\n\t};\r\n\r\n\tDurationControl.prototype.set_value = function(node, value, ev, config) {\r\n\t\tvar s = node.getElementsByTagName(\"select\");\r\n\t\tvar inps = node.getElementsByTagName(\"input\");\r\n\t\tvar duration = inps[1];\r\n\t\tvar btns = [inps[0], inps[2]];\r\n\t\tvar endspan = node.getElementsByTagName(\"span\")[0];\r\n\t\tvar map = config._time_format_order;\r\n\t\tvar mapping;\r\n\t\tvar start_date;\r\n\t\tvar end_date;\r\n\t\tvar duration_val;\r\n\r\n\t\tfunction _calc_date() {\r\n\t\t\tvar start_date = _getStartDate.call(gantt, node, config);\r\n\t\t\tvar duration = _getDuration.call(gantt, node, config);\r\n\t\t\tvar end_date = gantt.calculateEndDate({start_date: start_date, duration: duration, task: ev});\r\n\r\n\t\t\tvar template = gantt.templates.task_end_date || gantt.templates.task_date;\r\n\t\t\tendspan.innerHTML = template(end_date);\r\n\t\t}\r\n\r\n\t\tfunction _change_duration(step) {\r\n\t\t\tvar value = duration.value;\r\n\r\n\t\t\tvalue = getFormatter(config).parse(value);\r\n\t\t\tif (window.isNaN(value))\r\n\t\t\t\tvalue = 0;\r\n\t\t\tvalue += step;\r\n\t\t\tif (value < 1) value = 1;\r\n\t\t\tduration.value = getFormatter(config).format(value);\r\n\t\t\t_calc_date();\r\n\t\t}\r\n\r\n\t\tbtns[0].onclick = gantt.bind(function() {\r\n\t\t\t_change_duration(-1 * gantt.config.duration_step);\r\n\t\t}, this);\r\n\t\tbtns[1].onclick = gantt.bind(function() {\r\n\t\t\t_change_duration(1 * gantt.config.duration_step);\r\n\t\t}, this);\r\n\t\ts[0].onchange = _calc_date;\r\n\t\ts[1].onchange = _calc_date;\r\n\t\ts[2].onchange = _calc_date;\r\n\t\tif (s[3]) s[3].onchange = _calc_date;\r\n\r\n\t\tduration.onkeydown = gantt.bind(function(e) {\r\n\t\t\tvar code; \r\n\r\n\t\t\te = e || window.event;\r\n\t\t\tcode = (e.charCode || e.keyCode || e.which);\r\n\t\t\t\r\n\t\t\tif (code == gantt.constants.KEY_CODES.DOWN) {\r\n\t\t\t\t_change_duration(-1 * gantt.config.duration_step);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (code == gantt.constants.KEY_CODES.UP) {\r\n\t\t\t\t_change_duration(1 * gantt.config.duration_step);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\twindow.setTimeout(_calc_date, 1);\r\n\t\t}, this);\r\n\r\n\t\tduration.onchange = gantt.bind(_calc_date, this);\r\n\r\n\t\tmapping = gantt._resolve_default_mapping(config);\r\n\t\tif (typeof(mapping) === \"string\") mapping = {start_date: mapping};\r\n\r\n\t\tstart_date = ev[mapping.start_date] || new Date();\r\n\t\tend_date = ev[mapping.end_date] || gantt.calculateEndDate({\r\n\t\t\tstart_date: start_date,\r\n\t\t\tduration: 1,\r\n\t\t\ttask: ev\r\n\t\t});\r\n\t\tduration_val = Math.round(ev[mapping.duration]) || gantt.calculateDuration({\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: end_date,\r\n\t\t\ttask: ev\r\n\t\t});\r\n\t\tduration_val = getFormatter(config).format(duration_val);\r\n\r\n\t\tgantt.form_blocks._fill_lightbox_select(s, 0, start_date, map, config);\r\n\t\tduration.value = duration_val;\r\n\t\t_calc_date();\r\n\t};\r\n\r\n\tDurationControl.prototype.get_value = function(node, ev, config) {\r\n\t\tvar startDate = _getStartDate(node, config);\r\n\t\tvar duration = _getDuration(node, config);\r\n\t\tvar endDate = gantt.calculateEndDate({start_date: startDate, duration: duration, task: ev});\r\n\r\n\t\tif (typeof gantt._resolve_default_mapping(config) == \"string\") {\r\n\t\t\treturn startDate;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tstart_date: startDate,\r\n\t\t\tend_date: endDate,\r\n\t\t\tduration: duration\r\n\t\t};\r\n\t};\r\n\r\n\tDurationControl.prototype.focus = function(node) {\r\n\t\tgantt._focus(node.getElementsByTagName(\"select\")[0]);\r\n\t};\r\n\r\n\r\n\tfunction _getStartDate(node, config) {\r\n\t\tvar s = node.getElementsByTagName(\"select\");\r\n\t\tvar map = config._time_format_order;\r\n\t\tvar hours = 0;\r\n\t\tvar minutes = 0;\r\n\r\n\t\tif (gantt.defined(map[3])) {\r\n\t\t\tvar input = s[map[3]];\r\n\t\t\tvar time = parseInt(input.value, 10);\r\n\t\t\tif (isNaN(time) && input.hasAttribute(\"data-value\")) {\r\n\t\t\t\ttime = parseInt(input.getAttribute(\"data-value\"), 10);\r\n\t\t\t}\r\n\r\n\t\t\thours = Math.floor(time / 60);\r\n\t\t\tminutes = time % 60;\r\n\t\t}\r\n\t\treturn new Date(s[map[2]].value, s[map[1]].value, s[map[0]].value, hours, minutes);\r\n\t}\r\n\r\n\tfunction _getDuration(node, config) {\r\n\t\tvar duration = node.getElementsByTagName(\"input\")[1];\r\n\r\n\t\tduration = getFormatter(config).parse(duration.value);\r\n\t\tif (!duration || window.isNaN(duration)) duration = 1;\r\n\t\tif (duration < 0) duration *= -1;\r\n\t\treturn duration;\r\n\t}\r\n\r\n\treturn DurationControl; \r\n};","import __extends from \"../../../../utils/extends\";\r\nimport htmlHelpers from \"../../utils/html_helpers\";\r\nimport BaseConstrutor from \"./base_control\";\r\n\r\nexport default function(gantt) {\r\n\tvar _super = BaseConstrutor(gantt);\r\n\r\n\tfunction ConstraintControl() {\r\n\t\tvar self = _super.apply(this, arguments) || this;\r\n\t\treturn self;\r\n\t}\r\n\r\n\t__extends(ConstraintControl, _super);\r\n\r\n\tfunction isNonTimedConstraint(value) {\r\n\t\tif (!value || value === gantt.config.constraint_types.ASAP || value === gantt.config.constraint_types.ALAP) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\tfunction toggleTimeSelect(timeSelects, typeValue) {\r\n\t\tvar isNonTimed = isNonTimedConstraint(typeValue);\r\n\t\tfor (var i = 0; i < timeSelects.length; i++) {\r\n\t\t\ttimeSelects[i].disabled = isNonTimed;\r\n\t\t}\r\n\t}\r\n\r\n\tConstraintControl.prototype.render = function (sns) {\r\n\t\tconst height = sns.height ? `height:${sns.height}px;` : '';\r\n\t\tlet html = `
`;\r\n\r\n\t\tvar options = [];\r\n\t\tfor (var i in gantt.config.constraint_types) {\r\n\t\t\toptions.push({ key: gantt.config.constraint_types[i], label: gantt.locale.labels[gantt.config.constraint_types[i]] });\r\n\t\t}\r\n\r\n\t\tsns.options = sns.options || options;\r\n\r\n\t\thtml += \"\" + htmlHelpers.getHtmlSelect(sns.options, [{ key: \"data-type\", value: \"constraint-type\" }]) + \"\";\r\n\r\n\t\tvar timeLabel = gantt.locale.labels[\"constraint_date\"] || \"Constraint date\";\r\n\t\thtml += \"\";\r\n\r\n\t\thtml += \"
\";\r\n\t\treturn html;\r\n\t};\r\n\r\n\tConstraintControl.prototype.set_value = function (node, value, task, config) {\r\n\t\tvar typeSelect = node.querySelector(\"[data-constraint-type-select] select\");\r\n\t\tvar timeSelects = node.querySelectorAll(\"[data-constraint-time-select] select\");\r\n\t\tvar map = config._time_format_order;\r\n\r\n\t\tvar mapping = gantt._resolve_default_mapping(config);\r\n\r\n\t\tif (!typeSelect._eventsInitialized) {\r\n\t\t\ttypeSelect.addEventListener(\"change\", function (e) {\r\n\t\t\t\ttoggleTimeSelect(timeSelects, e.target.value);\r\n\t\t\t});\r\n\t\t\ttypeSelect._eventsInitialized = true;\r\n\t\t}\r\n\r\n\t\tvar constraintDate = task[mapping.constraint_date] || new Date();\r\n\t\tgantt.form_blocks._fill_lightbox_select(timeSelects, 0, constraintDate, map, config);\r\n\r\n\t\tvar constraintType = task[mapping.constraint_type] || gantt.getConstraintType(task);\r\n\t\ttypeSelect.value = constraintType;\r\n\t\ttoggleTimeSelect(timeSelects, constraintType);\r\n\t};\r\n\r\n\tConstraintControl.prototype.get_value = function (node, task, config) {\r\n\t\tvar typeSelect = node.querySelector(\"[data-constraint-type-select] select\");\r\n\t\tvar timeSelects = node.querySelectorAll(\"[data-constraint-time-select] select\");\r\n\r\n\t\tvar constraintType = typeSelect.value;\r\n\t\tvar constraintDate = null;\r\n\t\tif (!isNonTimedConstraint(constraintType)) {\r\n\t\t\tconstraintDate = gantt.form_blocks.getTimePickerValue(timeSelects, config);\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tconstraint_type: constraintType,\r\n\t\t\tconstraint_date: constraintDate\r\n\t\t};\r\n\t};\r\n\r\n\tConstraintControl.prototype.focus = function (node) {\r\n\t\tgantt._focus(node.querySelector(\"select\"));\r\n\t};\r\n\r\n\treturn ConstraintControl;\r\n};","import __extends from \"../../../../utils/extends\";\r\n\r\nimport Super from \"./select_control\";\r\n\r\nexport default function(gantt) {\r\n\tconst _super = Super(gantt);\r\n\r\n\tfunction TypeselectControl() {\r\n\t\tvar self = _super.apply(this, arguments) || this;\r\n\r\n\t\treturn self;\r\n\t}\r\n\r\n\t__extends(TypeselectControl, _super);\r\n\r\n\tTypeselectControl.prototype.render = function(sns) {\r\n\t\tvar types = gantt.config.types,\r\n\t\t\tlocale = gantt.locale.labels,\r\n\t\t\toptions = [];\r\n\r\n\t\tvar filter = sns.filter || function (typeKey, typeValue) {\r\n\t\t\tif (!types.placeholder || typeValue !== types.placeholder) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t};\r\n\t\tfor (var i in types) {\r\n\t\t\tif (!filter(i, types[i]) === false) {\r\n\t\t\t\toptions.push({ key: types[i], label: locale[\"type_\" + i] });\r\n\t\t\t}\r\n\t\t}\r\n\t\tsns.options = options;\r\n\r\n\t\tvar oldOnChange = sns.onchange;\r\n\t\tsns.onchange = function () {\r\n\t\t\tgantt._lightbox_current_type = this.value;\r\n\t\t\tgantt.changeLightboxType(this.value);\r\n\t\t\tif (typeof oldOnChange == 'function') {\r\n\t\t\t\toldOnChange.apply(this, arguments);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\treturn _super.prototype.render.apply(this, arguments);\r\n\t};\r\n\r\n\treturn TypeselectControl;\r\n};\r\n","\r\nimport __extends from \"../../../../utils/extends\";\r\nimport DurationFormatterNumeric from \"../../../common/duration_formatter_numeric\";\r\nimport BaseConstrutor from \"./base_control\";\r\n\r\nexport default function(gantt) {\r\n\tvar _super = BaseConstrutor(gantt);\r\n\r\n\tfunction DurationControl() {\r\n\t\tvar self = _super.apply(this, arguments) || this; \r\n\r\n\t\treturn self; \r\n\t}\r\n\r\n\tfunction getFormatter(config) {\r\n\t\treturn config.formatter || new DurationFormatterNumeric();\r\n\t}\r\n\r\n\tfunction _generateBaselineRow (node, baseline, task, config){\r\n\t\tconst time = \"
\" + gantt.form_blocks.getTimePicker.call(gantt, config) + \"
\";\r\n\t\tlet durationLabel = \" \"+ gantt.locale.labels[gantt.config.duration_unit + \"s\"] +\" \";\r\n\t\tconst singleDate = config.single_date ? \" style='display:none'\" : \"\";\r\n\t\tconst readonly = config.readonly ? \" disabled='disabled'\" : \"\";\r\n\t\tconst ariaAttr = gantt._waiAria.lightboxDurationInputAttrString(config);\r\n\t\tconst deleteLabel = gantt.locale.labels.baselines_remove_button;\r\n\r\n\t\tlet durationInputClass = \"gantt_duration_value\";\r\n\t\tif(config.formatter) {\r\n\t\t\tdurationLabel = \"\";\r\n\t\t\tdurationInputClass += \" gantt_duration_value_formatted\";\r\n\t\t}\r\n\r\n\t\tconst durationEl = \"
\" +\r\n\t\t\"
\" +\r\n\t\t\t\"\" +\r\n\t\t\t\"\" +\r\n\t\t\t\"\"+\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\"+durationLabel+\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"\";\r\n\r\n\t\tconst deleteButton = `
${deleteLabel}
`;\r\n\r\n\t\tconst baselineRow = document.createElement(\"div\");\r\n\t\tbaselineRow.className = \"gantt_section_time gantt_section_duration\";\r\n\t\tbaselineRow.setAttribute(\"data-baseline-id\", baseline.id);\r\n\t\tbaselineRow.innerHTML = time + durationEl + deleteButton + \"
\";\r\n\t\tnode.appendChild(baselineRow);\r\n\r\n\t\tvar s = baselineRow.getElementsByTagName(\"select\");\r\n\t\tvar inps = baselineRow.getElementsByTagName(\"input\");\r\n\t\tvar duration = inps[1];\r\n\t\tvar btns = [inps[0], inps[2]];\r\n\t\tvar endspan = baselineRow.getElementsByTagName(\"span\")[0];\r\n\t\tvar map = config._time_format_order;\r\n\t\tvar mapping;\r\n\t\tvar start_date;\r\n\t\tvar end_date;\r\n\t\tvar duration_val;\r\n\r\n\t\tconst deleteEl = baselineRow.querySelector(\".baseline_delete_button\");\r\n\t\tdeleteEl.onclick = function(e){\r\n\t\t\tconst section = baselineRow.parentNode;\r\n\t\t\tbaselineRow.innerHTML = \"\";\r\n\t\t\tbaselineRow.remove();\r\n\t\t\tif (section.innerHTML === \"\"){\r\n\t\t\t\tsection.innerHTML = gantt.locale.labels.baselines_section_placeholder;\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\r\n\t\tfunction _calc_date() {\r\n\t\t\tvar start_date = _getStartDate.call(gantt, baselineRow, config);\r\n\t\t\tvar duration = _getDuration.call(gantt, baselineRow, config);\r\n\t\t\tvar end_date = gantt.calculateEndDate({start_date: start_date, duration: duration, task: task});\r\n\r\n\t\t\tvar template = gantt.templates.task_end_date || gantt.templates.task_date;\r\n\t\t\tendspan.innerHTML = template(end_date);\r\n\t\t}\r\n\r\n\t\tfunction _change_duration(step) {\r\n\t\t\tvar value = duration.value;\r\n\r\n\t\t\tvalue = getFormatter(config).parse(value);\r\n\t\t\tif (window.isNaN(value))\r\n\t\t\t\tvalue = 0;\r\n\t\t\tvalue += step;\r\n\t\t\tif (value < 1) value = 1;\r\n\t\t\tduration.value = getFormatter(config).format(value);\r\n\t\t\t_calc_date();\r\n\t\t}\r\n\r\n\t\tbtns[0].onclick = gantt.bind(function() {\r\n\t\t\t_change_duration(-1 * gantt.config.duration_step);\r\n\t\t}, gantt);\r\n\t\tbtns[1].onclick = gantt.bind(function() {\r\n\t\t\t_change_duration(1 * gantt.config.duration_step);\r\n\t\t}, gantt);\r\n\t\ts[0].onchange = _calc_date;\r\n\t\ts[1].onchange = _calc_date;\r\n\t\ts[2].onchange = _calc_date;\r\n\t\tif (s[3]) s[3].onchange = _calc_date;\r\n\r\n\t\tduration.onkeydown = gantt.bind(function(e) {\r\n\t\t\tvar code; \r\n\r\n\t\t\te = e || window.event;\r\n\t\t\tcode = (e.charCode || e.keyCode || e.which);\r\n\t\t\t\r\n\t\t\tif (code == gantt.constants.KEY_CODES.DOWN) {\r\n\t\t\t\t_change_duration(-1 * gantt.config.duration_step);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (code == gantt.constants.KEY_CODES.UP) {\r\n\t\t\t\t_change_duration(1 * gantt.config.duration_step);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\twindow.setTimeout(_calc_date, 1);\r\n\t\t}, gantt);\r\n\r\n\t\tduration.onchange = gantt.bind(_calc_date, gantt);\r\n\r\n\t\tmapping = gantt._resolve_default_mapping(config);\r\n\t\tif (typeof(mapping) === \"string\") mapping = {start_date: mapping};\r\n\r\n\t\tstart_date = baseline.start_date || new Date();\r\n\t\tend_date = baseline.end_date || gantt.calculateEndDate({\r\n\t\t\tstart_date: start_date,\r\n\t\t\tduration: 1,\r\n\t\t\ttask\r\n\t\t});\r\n\t\tduration_val = gantt.calculateDuration({\r\n\t\t\tstart_date: start_date,\r\n\t\t\tend_date: end_date,\r\n\t\t\ttask\r\n\t\t});\r\n\t\tduration_val = getFormatter(config).format(duration_val);\r\n\r\n\t\tgantt.form_blocks._fill_lightbox_select(s, 0, start_date, map, config);\r\n\t\tduration.value = duration_val;\r\n\t\t_calc_date();\r\n\t}\r\n\r\n\t__extends(DurationControl, _super);\r\n\r\n\tDurationControl.prototype.render = function(sns) {\r\n\t\tconst baselineSection = `
`;\r\n\t\treturn baselineSection;\r\n\t};\r\n\r\n\tDurationControl.prototype.set_value = function(node, value, task, config) {\r\n\t\tif (task.baselines){\r\n\t\t\tnode.innerHTML = \"\";\r\n\r\n\t\t\ttask.baselines.forEach((baseline)=>{\r\n\t\t\t\t_generateBaselineRow(node, baseline, task, config);\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tnode.innerHTML = gantt.locale.labels.baselines_section_placeholder;\r\n\t\t}\t\t\r\n\r\n\t};\r\n\r\n\tDurationControl.prototype.get_value = function(node, task, config) {\r\n\t\tconst baselines = [];\r\n\t\tconst baselineRows = node.querySelectorAll(`[data-baseline-id]`);\r\n\t\tbaselineRows.forEach((baselineNode)=>{\r\n\t\t\tconst baselineId = baselineNode.dataset.baselineId;\r\n\t\t\tconst baselineStore = gantt.getDatastore(\"baselines\");\r\n\t\t\tlet baseline = baselineStore.getItem(baselineId);\r\n\t\t\tlet updatedBaseline;\r\n\t\t\tif (baseline){\r\n\t\t\t\tupdatedBaseline = gantt.copy(baseline);\r\n\t\t\t} else {\r\n\t\t\t\tupdatedBaseline = {\r\n\t\t\t\t\tid: gantt.uid(),\r\n\t\t\t\t\ttask_id: task.id,\r\n\t\t\t\t\ttext: \"Baseline 1\"\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\tupdatedBaseline.start_date = _getStartDate(baselineNode, config);\r\n\t\t\tupdatedBaseline.duration = _getDuration(baselineNode, config);\r\n\t\t\tupdatedBaseline.end_date = gantt.calculateEndDate({start_date: updatedBaseline.start_date, duration: updatedBaseline.duration, task});\r\n\r\n\t\t\tbaselines.push(updatedBaseline);\r\n\t\t});\r\n\r\n\t\treturn baselines;\r\n\t};\r\n\r\n\tDurationControl.prototype.button_click = function (index, el, section, container) {\r\n\t\tif (gantt.callEvent(\"onSectionButton\", [gantt._lightbox_id, section]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (el.closest(\".gantt_custom_button.gantt_remove_baselines\")){\r\n\t\t\tcontainer.innerHTML = gantt.locale.labels.baselines_section_placeholder;\r\n\t\t}\r\n\t\tif (el.closest(\".gantt_custom_button.gantt_add_baselines\")){\r\n\t\t\tif (container.innerHTML == gantt.locale.labels.baselines_section_placeholder){\r\n\t\t\t\tcontainer.innerHTML = \"\";\r\n\t\t\t}\r\n\t\t\tconst task = gantt.getTask(gantt._lightbox_id);\r\n\t\t\tconst baseline = {\r\n\t\t\t\tid: gantt.uid(),\r\n\t\t\t\ttask_id: task.id,\r\n\t\t\t\ttext: \"Baseline 1\",\r\n\t\t\t\tstart_date: task.start_date,\r\n\t\t\t\tend_date: task.end_date\r\n\t\t\t};\r\n\t\t\tconst config = gantt._get_typed_lightbox_config()[index];\r\n\t\t\t_generateBaselineRow(container, baseline, task, config);\r\n\t\t}\r\n\t};\r\n\r\n\tDurationControl.prototype.focus = function(node) {\r\n\t\tgantt._focus(node.getElementsByTagName(\"select\")[0]);\r\n\t};\r\n\r\n\r\n\tfunction _getStartDate(node, config) {\r\n\t\tvar s = node.getElementsByTagName(\"select\");\r\n\t\tvar map = config._time_format_order;\r\n\t\tvar hours = 0;\r\n\t\tvar minutes = 0;\r\n\r\n\t\tif (gantt.defined(map[3])) {\r\n\t\t\tvar input = s[map[3]];\r\n\t\t\tvar time = parseInt(input.value, 10);\r\n\t\t\tif (isNaN(time) && input.hasAttribute(\"data-value\")) {\r\n\t\t\t\ttime = parseInt(input.getAttribute(\"data-value\"), 10);\r\n\t\t\t}\r\n\r\n\t\t\thours = Math.floor(time / 60);\r\n\t\t\tminutes = time % 60;\r\n\t\t}\r\n\t\treturn new Date(s[map[2]].value, s[map[1]].value, s[map[0]].value, hours, minutes);\r\n\t}\r\n\r\n\tfunction _getDuration(node, config) {\r\n\t\tvar duration = node.getElementsByTagName(\"input\")[1];\r\n\r\n\t\tduration = getFormatter(config).parse(duration.value);\r\n\t\tif (!duration || window.isNaN(duration)) duration = 1;\r\n\t\tif (duration < 0) duration *= -1;\r\n\t\treturn duration;\r\n\t}\r\n\r\n\treturn DurationControl; \r\n};","import * as utils from \"../utils/utils\";\r\nimport env from \"../utils/env\";\r\nimport isHeadless from \"../utils/is_headless\";\r\nimport * as domHelpers from \"./ui/utils/dom_helpers\";\r\nimport * as codeHelpers from \"../utils/helpers\";\r\nimport domEventScope from \"./ui/utils/dom_event_scope\";\r\nimport messages from \"./ui/message\";\r\nimport ui from \"./ui/index\";\r\nimport createLayoutFacade from \"./facades/layout\";\r\nimport taskLayers from \"./data_task_layers\";\r\n\r\nimport skin from \"./ui/skin\";\r\nimport skyblue from \"../css/skins/skyblue\";\r\nimport meadow from \"../css/skins/meadow\";\r\nimport terrace from \"../css/skins/terrace\";\r\nimport broadway from \"../css/skins/broadway\";\r\nimport material from \"../css/skins/material\";\r\nimport dark from \"../css/skins/dark\";\r\nimport contrast_black from \"../css/skins/contrast_black\";\r\nimport contrast_white from \"../css/skins/contrast_white\";\r\nimport plugins from \"./ui/plugins\";\r\nimport touch from \"./ui/touch\";\r\nimport lightbox from \"./ui/lightbox\";\r\nimport lightbox_optional_time from \"./ui/lightbox/lightbox_optional_time\";\r\nimport wai_aria from \"./ui/wai_aria\";\r\n\r\n\r\nexport default function(gantt) {\r\n\r\n\tif(!env.isNode){\r\n\r\n\t\tgantt.utils = {\r\n\t\t\tarrayFind: codeHelpers.arrayFind,\r\n\t\t\tdom: domHelpers\r\n\t\t};\r\n\r\n\t\tvar domEvents = domEventScope();\r\n\t\tgantt.event = domEvents.attach;\r\n\t\tgantt.eventRemove = domEvents.detach;\r\n\t\tgantt._eventRemoveAll = domEvents.detachAll;\r\n\t\tgantt._createDomEventScope = domEvents.extend;\r\n\r\n\t\tutils.mixin(gantt, messages(gantt));\r\n\t\tvar uiApi = ui.init(gantt);\r\n\t\tgantt.$ui = uiApi.factory;\r\n\t\tgantt.$ui.layers = uiApi.render;\r\n\t\tgantt.$mouseEvents = uiApi.mouseEvents;\r\n\t\tgantt.$services.setService(\"mouseEvents\", function () {\r\n\t\t\treturn gantt.$mouseEvents;\r\n\t\t});\r\n\t\tgantt.mixin(gantt, uiApi.layersApi);\r\n\r\n\t\ttaskLayers(gantt);\r\n\r\n\t\tgantt.$services.setService(\"layers\", function () {\r\n\t\t\treturn uiApi.layersService;\r\n\t\t});\r\n\r\n\t\tgantt.mixin(gantt, createLayoutFacade());\r\n\t\tskin(gantt);\r\n\t\tskyblue(gantt);\r\n\t\tdark(gantt);\r\n\t\tmeadow(gantt);\r\n\t\tterrace(gantt);\r\n\t\tbroadway(gantt);\r\n\t\tmaterial(gantt);\r\n\t\tcontrast_black(gantt);\r\n\t\tcontrast_white(gantt);\r\n\t\tplugins(gantt);\r\n\t\ttouch(gantt);\r\n\t\tlightbox(gantt);\r\n\t\tlightbox_optional_time(gantt);\r\n\t\twai_aria(gantt);\r\n\r\n\t\tgantt.locate = function(e) {\r\n\t\t\tvar trg = domHelpers.getTargetNode(e);\r\n\r\n\t\t\t// ignore empty rows/cells of the timeline\r\n\t\t\tif(domHelpers.closest(trg, \".gantt_task_row\")){\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tvar targetAttribute = arguments[1] || this.config.task_attribute;\r\n\r\n\t\t\tvar node = domHelpers.locateAttribute(trg, targetAttribute);\r\n\t\t\tif(node){\r\n\t\t\t\treturn node.getAttribute(targetAttribute);\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tgantt._locate_css = function(e, classname, strict){\r\n\t\t\treturn domHelpers.locateClassName(e, classname, strict);\r\n\t\t};\r\n\r\n\t\tgantt._locateHTML = function(e, attribute) {\r\n\t\t\treturn domHelpers.locateAttribute(e, attribute || this.config.task_attribute);\r\n\t\t};\r\n\t}\r\n\r\n\tgantt.attachEvent(\"onParse\", function(){\r\n\t\tif(!isHeadless(gantt)){\r\n\t\t\tgantt.attachEvent(\"onGanttRender\", function(){\r\n\t\t\t\tif(gantt.config.initial_scroll){\r\n\t\t\t\t\tvar firstTask = gantt.getTaskByIndex(0);\r\n\t\t\t\t\tvar id = firstTask ? firstTask.id : gantt.config.root_id;\r\n\t\t\t\t\t// GS-1450. Don't scroll to the task if there is no timeline\r\n\t\t\t\t\tif(gantt.isTaskExists(id) && gantt.$task && gantt.utils.dom.isChildOf(gantt.$task, gantt.$container)){\r\n\t\t\t\t\t\tgantt.showTask(id);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, {once: true});\r\n\t\t}\r\n\r\n\t});\r\n\r\n\tgantt.attachEvent(\"onBeforeGanttReady\", function(){\r\n\t\tif (!this.config.scroll_size)\r\n\t\t\tthis.config.scroll_size = domHelpers.getScrollSize() || 15;\r\n\r\n\t\tif(!isHeadless(gantt)){\r\n\t\t\t// detach listeners before clearing old DOM, possible IE errors when accessing detached nodes\r\n\t\t\tthis._eventRemoveAll();\r\n\t\t\tthis.$mouseEvents.reset();\r\n\r\n\t\t\tthis.resetLightbox();\r\n\t\t}\r\n\r\n\t});\r\n\r\n\t// GS-1261: scroll the views to the right side when RTL is enabled\r\n\tgantt.attachEvent(\"onGanttReady\", function(){\r\n\t\tif(!isHeadless(gantt) && gantt.config.rtl){\r\n\t\t\tgantt.$layout.getCellsByType(\"viewCell\").forEach(function(cell){ \r\n\t\t\t\tvar attachedScrollbar = cell.$config.scrollX;\r\n\t\t\t\tif (!attachedScrollbar) return;\r\n\r\n\t\t\t\tvar scrollbar = gantt.$ui.getView(attachedScrollbar);\r\n\t\t\t\tif (scrollbar) scrollbar.scrollTo(scrollbar.$config.scrollSize,0);\r\n\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\r\n\t// GS-1649: check if extensions are connected via files\r\n\tgantt.attachEvent(\"onGanttReady\", function(){\r\n\t\tif(!isHeadless(gantt)){\r\n\r\n\t\t\tvar activePlugins = gantt.plugins();\r\n\r\n\t\t\tvar availablePlugins = {\r\n\t\t\t\tauto_scheduling: gantt.autoSchedule,\r\n\t\t\t\tclick_drag: gantt.ext.clickDrag,\r\n\t\t\t\tcritical_path: gantt.isCriticalTask,\r\n\t\t\t\tdrag_timeline: gantt.ext.dragTimeline,\r\n\t\t\t\texport_api: gantt.exportToPDF,\r\n\t\t\t\tfullscreen: gantt.ext.fullscreen,\r\n\t\t\t\tgrouping: gantt.groupBy,\r\n\t\t\t\tkeyboard_navigation: gantt.ext.keyboardNavigation,\r\n\t\t\t\tmarker: gantt.addMarker,\r\n\t\t\t\tmultiselect: gantt.eachSelectedTask,\r\n\t\t\t\toverlay: gantt.ext.overlay,\r\n\t\t\t\tquick_info: gantt.templates.quick_info_content,\r\n\t\t\t\ttooltip: gantt.ext.tooltips,\r\n\t\t\t\tundo: gantt.undo\r\n\t\t\t};\r\n\r\n\t\t\tfor (let plugin in availablePlugins){\r\n\t\t\t\tif (availablePlugins[plugin] && !activePlugins[plugin]){\r\n\t\t\t\t\t// eslint-disable-next-line no-console\r\n\t\t\t\t\tconsole.warn(`You connected the '${plugin}' extension via an obsolete file. \r\nTo fix it, you need to remove the obsolete file and connect the extension via the plugins method: https://docs.dhtmlx.com/gantt/api__gantt_plugins.html`);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n};","export default function(gantt) {\r\n\tdelete gantt.addTaskLayer;\r\n\tdelete gantt.addLinkLayer;\r\n};","function createLayoutFacade(){\r\n\r\n\tfunction getTimeline(gantt){\r\n\t\treturn gantt.$ui.getView(\"timeline\");\r\n\t}\r\n\r\n\tfunction getGrid(gantt){\r\n\t\treturn gantt.$ui.getView(\"grid\");\r\n\t}\r\n\r\n\tfunction getBaseCell(gantt){\r\n\t\tvar timeline = getTimeline(gantt);\r\n\t\tif (timeline && !timeline.$config.hidden){\r\n\t\t\treturn timeline;\r\n\t\t} else{\r\n\t\t\tvar grid = getGrid(gantt);\r\n\t\t\tif (grid && !grid.$config.hidden){\r\n\t\t\t\treturn grid;\r\n\t\t\t} else {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfunction getVerticalScrollbar(gantt){\r\n\t\tvar baseCell = null;\r\n\t\t// GS-1150: if we reorder or resize something in the grid, we should obtain the grid container\r\n\t\tvar gridDrag = false;\r\n\t\tvar gridMarkers = [\r\n\t\t\t\".gantt_drag_marker.gantt_grid_resize_area\",\r\n\t\t\t\".gantt_drag_marker .gantt_row.gantt_row_task\",\r\n\t\t\t\".gantt_drag_marker.gantt_grid_dnd_marker\"\r\n\t\t];\r\n\t\tgridMarkers.forEach(function (selector) {\r\n\t\t\tgridDrag = gridDrag || !!document.querySelector(selector);\r\n\t\t});\r\n\t\tif (gridDrag){\r\n\t\t\tbaseCell = getGrid(gantt);\r\n\t\t} else{\r\n\t\t\tbaseCell = getBaseCell(gantt);\r\n\t\t}\r\n\r\n\t\t// GS-1827. If there is no grid and timeline, there is no scrollbar for them\r\n\t\tif (!baseCell){\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tvar verticalScrollbar = getAttachedScrollbar(gantt, baseCell, \"scrollY\");\r\n\t\treturn verticalScrollbar;\r\n\t}\r\n\r\n\tfunction getHorizontalScrollbar(gantt){\r\n\t\tvar baseCell = getBaseCell(gantt);\r\n\t\tif (!baseCell || baseCell.id == \"grid\"){\r\n\t\t\treturn null; // if the timeline is not displayed, do not return the scrollbar\r\n\t\t}\r\n\t\tvar horizontalScrollbar = getAttachedScrollbar(gantt, baseCell, \"scrollX\");\r\n\t\treturn horizontalScrollbar;\r\n\t}\r\n\r\n\tfunction getAttachedScrollbar(gantt, cell, type){\r\n\t\tvar attachedScrollbar = cell.$config[type];\r\n\t\tvar scrollbarView = gantt.$ui.getView(attachedScrollbar);\r\n\t\treturn scrollbarView;\r\n\t}\r\n\r\n\tvar DEFAULT_VALUE = \"DEFAULT_VALUE\";\r\n\r\n\tfunction tryCall(getView, method, args, fallback){\r\n\t\tvar view = getView(this);\r\n\t\tif (!(view && view.isVisible())) {\r\n\t\t\tif(fallback){\r\n\t\t\t\treturn fallback();\r\n\t\t\t}else{\r\n\t\t\t\treturn DEFAULT_VALUE;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn view[method].apply(view, args);\r\n\t\t}\r\n\t}\r\n\r\n\treturn {\r\n\r\n\t\tgetColumnIndex: function(name) {\r\n\t\t\tvar res = tryCall.call(this, getGrid, \"getColumnIndex\", [name]);\r\n\t\t\tif(res === DEFAULT_VALUE){\r\n\t\t\t\treturn 0;\r\n\t\t\t}else{\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tdateFromPos: function(x) {\r\n\t\t\tvar res = tryCall.call(this, getTimeline, \"dateFromPos\", Array.prototype.slice.call(arguments));\r\n\t\t\tif(res === DEFAULT_VALUE){\r\n\t\t\t\treturn this.getState().min_date;\r\n\t\t\t}else{\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tposFromDate: function(date) {\r\n\t\t\tvar res = tryCall.call(this, getTimeline, \"posFromDate\", [date]);\r\n\t\t\tif(res === DEFAULT_VALUE){\r\n\t\t\t\treturn 0;\r\n\t\t\t}else{\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetRowTop: function(index) {\r\n\t\t\tvar self = this;\r\n\t\t\tvar res = tryCall.call(self, getTimeline, \"getRowTop\", [index],\r\n\t\t\t\tfunction(){ return tryCall.call(self, getGrid, \"getRowTop\", [index]);}\r\n\t\t\t\t);\r\n\r\n\t\t\tif(res === DEFAULT_VALUE){\r\n\t\t\t\treturn 0;\r\n\t\t\t}else{\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetTaskTop: function(id) {\r\n\t\t\tvar self = this;\r\n\t\t\tvar res = tryCall.call(self, getTimeline, \"getItemTop\", [id],\r\n\t\t\t\tfunction(){ return tryCall.call(self, getGrid, \"getItemTop\", [id]);}\r\n\t\t\t);\r\n\r\n\t\t\tif(res === DEFAULT_VALUE){\r\n\t\t\t\treturn 0;\r\n\t\t\t}else{\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tgetTaskPosition: function(task, start_date, end_date) {\r\n\t\t\tvar res = tryCall.call(this, getTimeline, \"getItemPosition\", [task, start_date, end_date]);\r\n\r\n\t\t\tif(res === DEFAULT_VALUE){\r\n\t\t\t\tvar top = this.getTaskTop(task.id);\r\n\t\t\t\tvar height = this.getTaskBarHeight(task.id);\r\n\r\n\t\t\t\treturn {\r\n\t\t\t\t\tleft: 0,\r\n\t\t\t\t\ttop: top,\r\n\t\t\t\t\theight: height,\r\n\t\t\t\t\twidth: 0\r\n\t\t\t\t};\r\n\t\t\t}else{\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetTaskBarHeight: function(taskId, isMilestoneRender) {\r\n\t\t\tvar self = this;\r\n\t\t\tvar res = tryCall.call(self, getTimeline, \"getBarHeight\", [taskId, isMilestoneRender],\r\n\t\t\t\tfunction(){ return tryCall.call(self, getGrid, \"getItemHeight\", [taskId]);}\r\n\t\t\t);\r\n\r\n\t\t\tif(res === DEFAULT_VALUE){\r\n\t\t\t\treturn 0;\r\n\t\t\t}else{\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetTaskHeight: function(taskId) {\r\n\t\t\tvar self = this;\r\n\t\t\tvar res = tryCall.call(self, getTimeline, \"getItemHeight\", [taskId],\r\n\t\t\t\tfunction(){ return tryCall.call(self, getGrid, \"getItemHeight\", [taskId]);}\r\n\t\t\t);\r\n\r\n\t\t\tif(res === DEFAULT_VALUE){\r\n\t\t\t\treturn 0;\r\n\t\t\t}else{\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tcolumnIndexByDate: function(date) {\r\n\t\t\tvar res = tryCall.call(this, getTimeline, \"columnIndexByDate\", [date]);\r\n\t\t\tif(res === DEFAULT_VALUE){\r\n\t\t\t\treturn 0;\r\n\t\t\t}else{\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\troundTaskDates: function() {\r\n\t\t\ttryCall.call(this, getTimeline, \"roundTaskDates\", []);\r\n\t\t},\r\n\r\n\t\tgetScale: function() {\r\n\t\t\tvar res = tryCall.call(this, getTimeline, \"getScale\", []);\r\n\t\t\tif(res === DEFAULT_VALUE){\r\n\t\t\t\treturn null;\r\n\t\t\t}else{\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgetTaskNode: function(id) {\r\n\t\t\tvar timeline = getTimeline(this);\r\n\t\t\tif (!timeline || !timeline.isVisible()) {\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\t\t\t\tvar node = timeline._taskRenderer.rendered[id];\r\n\t\t\t\tif(!node){\r\n\t\t\t\t\tvar domAttr = timeline.$config.item_attribute;\r\n\t\t\t\t\tnode = timeline.$task_bars.querySelector(\"[\" +domAttr+ \"='\"+id+\"']\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn node || null;\r\n\t\t\t}\r\n\t\t},\r\n\r\n\r\n\t\tgetLinkNode: function(id) {\r\n\t\t\tvar timeline = getTimeline(this);\r\n\t\t\tif (!timeline.isVisible()) {\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\t\t\t\treturn timeline._linkRenderer.rendered[id];\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tscrollTo: function(left, top){\r\n\t\t\tvar vertical = getVerticalScrollbar(this);\r\n\t\t\tvar horizontal = getHorizontalScrollbar(this);\r\n\r\n\t\t\tvar oldH = {position: 0},\r\n\t\t\t\toldV = {position: 0};\r\n\r\n\t\t\tif(vertical){\r\n\t\t\t\toldV = vertical.getScrollState();\r\n\t\t\t}\r\n\t\t\tif(horizontal){\r\n\t\t\t\toldH = horizontal.getScrollState();\r\n\t\t\t}\r\n\r\n\t\t\tvar scrollHorizontal = (horizontal && left*1 == left);\r\n\t\t\tvar scrollVertical = (vertical && top*1 == top);\r\n\t\t\tvar scrollBoth = scrollHorizontal && scrollVertical;\r\n\r\n\t\t\tif(scrollBoth){\r\n\t\t\t\t// some views will be scrolled both horizontally and vertically and smart rendering can be called twice\r\n\t\t\t\t// set flag in order not to invoke smart rendering at the horizontal scroll stage\r\n\t\t\t\t// so it will repaint only once when the scroll is completed\r\n\t\t\t\tvar verticalViews = vertical._getLinkedViews();\r\n\t\t\t\tvar horizontalViews = horizontal._getLinkedViews();\r\n\r\n\t\t\t\tvar commonViews = [];\r\n\t\t\t\tfor(var i = 0; i < verticalViews.length; i++){\r\n\t\t\t\t\tfor(var j = 0; j < horizontalViews.length; j++){\r\n\r\n\t\t\t\t\t\tif(verticalViews[i].$config.id && horizontalViews[j].$config.id && verticalViews[i].$config.id === horizontalViews[j].$config.id){\r\n\t\t\t\t\t\t\tcommonViews.push(verticalViews[i].$config.id);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (scrollHorizontal){\r\n\t\t\t\tif(commonViews){\r\n\t\t\t\t\tcommonViews.forEach((function(viewId){\r\n\t\t\t\t\t\tthis.$ui.getView(viewId).$config.$skipSmartRenderOnScroll = true;\r\n\t\t\t\t\t}).bind(this));\r\n\t\t\t\t}\r\n\r\n\t\t\t\thorizontal.scroll(left);\r\n\t\t\t\tif(commonViews){\r\n\t\t\t\t\tcommonViews.forEach((function(viewId){\r\n\t\t\t\t\t\tthis.$ui.getView(viewId).$config.$skipSmartRenderOnScroll = false;\r\n\t\t\t\t\t}).bind(this));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(scrollVertical){\r\n\t\t\t\tvertical.scroll(top);\r\n\t\t\t}\r\n\r\n\t\t\tvar newV = {position: 0},\r\n\t\t\t\tnewH = {position: 0};\r\n\t\t\tif(vertical){\r\n\t\t\t\tnewV = vertical.getScrollState();\r\n\t\t\t}\r\n\t\t\tif(horizontal){\r\n\t\t\t\tnewH = horizontal.getScrollState();\r\n\t\t\t}\r\n\r\n\t\t\tthis.callEvent(\"onGanttScroll\", [oldH.position, oldV.position, newH.position, newV.position]);\r\n\t\t},\r\n\r\n\t\tshowDate: function(date){\r\n\t\t\tvar date_x = this.posFromDate(date);\r\n\t\t\tvar scroll_to = Math.max(date_x - this.config.task_scroll_offset, 0);\r\n\t\t\tthis.scrollTo(scroll_to);\r\n\t\t},\r\n\t\tshowTask: function(id) {\r\n\t\t\tvar pos = this.getTaskPosition(this.getTask(id));\r\n\r\n\t\t\t// GS-1261: we need to show the start_date even in the RTL mode\r\n\t\t\tvar leftPos = pos.left;\r\n\t\t\tif (this.config.rtl) leftPos = pos.left + pos.width;\r\n\r\n\t\t\tvar left = Math.max(leftPos - this.config.task_scroll_offset, 0);\r\n\r\n\t\t\tvar dataHeight = this._scroll_state().y;\r\n\t\t\tvar top;\r\n\t\t\tif(!dataHeight){\r\n\t\t\t\ttop = pos.top;\r\n\t\t\t}else{\r\n\t\t\t\ttop = pos.top - (dataHeight - this.getTaskBarHeight(id))/2;\r\n\t\t\t}\r\n\r\n\t\t\tthis.scrollTo(left, top);\r\n\t\t\t// GS-1150: if the grid and timeline have different scrollbars, we need to scroll thegrid to show the task\r\n\t\t\tvar gridCell = getGrid(this);\r\n\t\t\tvar timelineCell = getTimeline(this);\r\n\t\t\tif (gridCell && timelineCell && gridCell.$config.scrollY != timelineCell.$config.scrollY){\r\n\t\t\t\tvar gridScrollbar = getAttachedScrollbar(this, gridCell, \"scrollY\");\r\n\t\t\t\tgridScrollbar.scrollTo(null, top);\r\n\t\t\t}\r\n\t\t},\r\n\t\t_scroll_state: function(){\r\n\t\t\tvar result = {\r\n\t\t\t\tx: false,\r\n\t\t\t\ty: false,\r\n\t\t\t\tx_pos: 0,\r\n\t\t\t\ty_pos: 0,\r\n\t\t\t\tscroll_size: this.config.scroll_size + 1,//1px for inner content\r\n\t\t\t\tx_inner: 0,\r\n\t\t\t\ty_inner: 0\r\n\t\t\t};\r\n\r\n\t\t\tvar scrollVer = getVerticalScrollbar(this),\r\n\t\t\t\tscrollHor = getHorizontalScrollbar(this);\r\n\t\t\tif(scrollHor){\r\n\t\t\t\tvar horState = scrollHor.getScrollState();\r\n\t\t\t\tif(horState.visible){\r\n\t\t\t\t\tresult.x = horState.size;\r\n\t\t\t\t\tresult.x_inner = horState.scrollSize;\r\n\t\t\t\t}\r\n\t\t\t\tresult.x_pos = horState.position || 0;\r\n\t\t\t}\r\n\r\n\t\t\tif(scrollVer){\r\n\t\t\t\tvar verState = scrollVer.getScrollState();\r\n\t\t\t\tif(verState.visible){\r\n\t\t\t\t\tresult.y = verState.size;\r\n\r\n\t\t\t\t\tresult.y_inner = verState.scrollSize;\r\n\t\t\t\t}\r\n\t\t\t\tresult.y_pos = verState.position || 0;\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\t\t},\r\n\t\tgetScrollState: function(){\r\n\t\t\tvar state = this._scroll_state();\r\n\t\t\treturn { x:state.x_pos, y:state.y_pos, inner_width:state.x, inner_height:state.y, width: state.x_inner, height: state.y_inner };\r\n\t\t},\r\n\r\n\t\tgetLayoutView: function(cellName){\r\n\t\t\treturn this.$ui.getView(cellName);\r\n\t\t},\r\n\r\n\t\tscrollLayoutCell: function(cellName, left, top){\r\n\t\t\tconst cell = this.$ui.getView(cellName);\r\n\t\t\tif (!cell){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif (left !== null){\r\n\t\t\t\tconst horizontalScroll = this.$ui.getView(cell.$config.scrollX);\r\n\t\t\t\tif (horizontalScroll){\r\n\t\t\t\t\thorizontalScroll.scrollTo(left, null);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (top !== null){\r\n\t\t\t\tconst verticalScroll = this.$ui.getView(cell.$config.scrollY);\r\n\t\t\t\tif (verticalScroll){\r\n\t\t\t\t\tverticalScroll.scrollTo(null, top);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t};\r\n\r\n}\r\n\r\nexport default createLayoutFacade;","export default function(gantt) {\r\ngantt.skins.skyblue = {\r\n\tconfig:{\r\n\t\tgrid_width:370,\r\n\t\trow_height: 27,\r\n\t\tbar_height_padding:4,\r\n\t\tscale_height: 27,\r\n\t\tlink_line_width:1,\r\n\t\tlink_arrow_size:8,\r\n\t\tlink_radius:2,\r\n\t\tlightbox_additional_height:75\r\n\t},\r\n\t_second_column_width:95,\r\n\t_third_column_width:80\r\n};\r\n\r\n};","export default function(gantt) {\r\ngantt.skins.dark = {\r\n\tconfig:{\r\n\t\tgrid_width:390,\r\n\t\trow_height: 36,\r\n\t\tscale_height: 36,\r\n\t\tlink_line_width:2,\r\n\t\tlink_arrow_size:12,\r\n\t\tbar_height_padding:9,\r\n\t\tlightbox_additional_height:75\r\n\t},\r\n\t_second_column_width:100,\r\n\t_third_column_width:70\t\t\r\n};\r\n\r\n};","export default function(gantt) {\r\ngantt.skins.meadow = {\r\n\tconfig:{\r\n\t\tgrid_width:380,\r\n\t\trow_height: 27,\r\n\t\tscale_height: 30,\r\n\t\tlink_line_width:2,\r\n\t\tlink_arrow_size:10,\r\n\t\tbar_height_padding:4,\r\n\t\tlightbox_additional_height:72\r\n\t},\r\n\t_second_column_width:95,\r\n\t_third_column_width:80\r\n};\r\n\r\n};","export default function(gantt) {\r\ngantt.skins.terrace = {\r\n\tconfig:{\r\n\t\tgrid_width:390,\r\n\t\trow_height: 36,\r\n\t\tscale_height: 36,\r\n\t\tlink_line_width:2,\r\n\t\tlink_arrow_size:12,\r\n\t\tbar_height_padding:9,\r\n\t\tlightbox_additional_height:75\r\n\t},\r\n\t_second_column_width:100,\r\n\t_third_column_width:70\t\t\r\n};\r\n\r\n};","export default function(gantt) {\r\n\tgantt.skins.broadway = {\r\n\t\tconfig: {\r\n\t\t\tgrid_width: 390,\r\n\t\t\trow_height: 35,\r\n\t\t\tscale_height: 35,\r\n\t\t\tlink_line_width: 1,\r\n\t\t\tlink_arrow_size: 9,\r\n\t\t\tbar_height_padding:4,\r\n\t\t\tlightbox_additional_height: 86\r\n\t\t},\r\n\t\t_second_column_width: 100,\r\n\t\t_third_column_width: 80,\r\n\r\n\t\t_lightbox_template: \"
 
\",\r\n\t\t_config_buttons_left: {},\r\n\t\t_config_buttons_right: {\r\n\t\t\t\"gantt_delete_btn\": \"icon_delete\",\r\n\t\t\t\"gantt_save_btn\": \"icon_save\"\r\n\t\t}\r\n\t};\r\n};","export default function(gantt) {\r\n\tgantt.skins.material = {\r\n\t\tconfig: {\r\n\t\t\tgrid_width: 411,\r\n\t\t\trow_height: 34,\r\n\t\t\tscale_height: 36,\r\n\t\t\tlink_line_width: 2,\r\n\t\t\tlink_arrow_size: 12,\r\n\t\t\tbar_height_padding:9,\r\n\t\t\tlightbox_additional_height: 80\r\n\t\t},\r\n\t\t_second_column_width: 110,\r\n\t\t_third_column_width: 75,\r\n\t\t_redefine_lightbox_buttons: {\r\n\t\t\t\"buttons_left\": [\"dhx_delete_btn\"],\r\n\t\t\t\"buttons_right\": [\"dhx_cancel_btn\", \"dhx_save_btn\"]\r\n\t\t}\r\n\t};\r\n\r\n\tgantt.attachEvent(\"onAfterTaskDrag\", function (id) {\r\n\t\tvar t = gantt.getTaskNode(id);\r\n\t\tif (t) {\r\n\t\t\tt.className += \" gantt_drag_animation\";\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tvar indx = t.className.indexOf(\" gantt_drag_animation\");\r\n\t\t\t\tif (indx > -1) {\r\n\t\t\t\t\tt.className = t.className.slice(0, indx);\r\n\t\t\t\t}\r\n\t\t\t}, 200);\r\n\t\t}\r\n\t});\r\n\r\n};","export default function(gantt) {\r\ngantt.skins[\"contrast_black\"] = {\r\n\tconfig:{\r\n\t\tgrid_width:390,\r\n\t\trow_height: 35,\r\n\t\tscale_height: 35,\r\n\t\tlink_line_width:2,\r\n\t\tlink_arrow_size:12,\r\n\t\tlightbox_additional_height:75\r\n\t},\r\n\t_second_column_width:100,\r\n\t_third_column_width:80\r\n};\r\n\r\n};","export default function(gantt) {\r\ngantt.skins[\"contrast_white\"] = {\r\n\tconfig:{\r\n\t\tgrid_width:390,\r\n\t\trow_height: 35,\r\n\t\tscale_height: 35,\r\n\t\tlink_line_width:2,\r\n\t\tlink_arrow_size:12,\r\n\t\tlightbox_additional_height:75\r\n\t},\r\n\t_second_column_width:100,\r\n\t_third_column_width:80\r\n};\r\n\r\n};","import autoscroll from \"./autoscroll\";\r\nimport jquery_hooks from \"./jquery_hooks\";\r\nimport dhtmlx_hooks from \"./dhtmlx_hooks\";\r\nimport TimelineZoom from \"./timeline_zoom\";\r\n\r\n\r\nexport default function(gantt){\r\n\tif(!gantt.ext){\r\n\t\tgantt.ext = {};\r\n\t}\r\n\r\n\tvar modules = [\r\n\t\tautoscroll,\r\n\t\tjquery_hooks,\r\n\t\tdhtmlx_hooks\r\n\t];\r\n\r\n\tfor(var i = 0; i < modules.length; i++){\r\n\t\tif(modules[i])\r\n\t\t\tmodules[i](gantt);\r\n\t}\r\n\r\n\tgantt.ext.zoom = new TimelineZoom(gantt);\r\n};","export default function(gantt) {\r\n\r\n\tgantt._extend_to_optional = function (lightbox_block) {\r\n\r\n\t\tvar duration = lightbox_block;\r\n\t\tvar optional_time = {\r\n\t\t\trender: duration.render,\r\n\t\t\tfocus: duration.focus,\r\n\t\t\tset_value: function (node, value, task, section) {\r\n\t\t\t\tvar mapping = gantt._resolve_default_mapping(section);\r\n\t\t\t\tif (!task[mapping.start_date] || (mapping.start_date == \"start_date\" && this._isAllowedUnscheduledTask(task))) {\r\n\t\t\t\t\toptional_time.disable(node, section);\r\n\t\t\t\t\tvar val = {};\r\n\r\n\t\t\t\t\tfor (var i in mapping) {\r\n\t\t\t\t\t\t//take default values from the time control from task start/end dates\r\n\t\t\t\t\t\tval[mapping[i]] = task[i];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn duration.set_value.call(gantt, node, value, val, section);//set default value\r\n\t\t\t\t} else {\r\n\t\t\t\t\toptional_time.enable(node, section);\r\n\t\t\t\t\treturn duration.set_value.call(gantt, node, value, task, section);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tget_value: function (node, task, section) {\r\n\t\t\t\tif (section.disabled) {\r\n\t\t\t\t\treturn {start_date: null};\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn duration.get_value.call(gantt, node, task, section);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tupdate_block: function (node, section) {\r\n\t\t\t\tgantt.callEvent(\"onSectionToggle\", [gantt._lightbox_id, section]);\r\n\t\t\t\tnode.style.display = section.disabled ? \"none\" : \"\";\r\n\r\n\t\t\t\tif (section.button) {\r\n\t\t\t\t\tvar button = node.previousSibling.querySelector(\".gantt_custom_button_label\"),\r\n\t\t\t\t\t\tlabels = gantt.locale.labels;\r\n\r\n\t\t\t\t\tvar button_text = section.disabled ? labels[section.name + \"_enable_button\"] : labels[section.name + \"_disable_button\"];\r\n\r\n\t\t\t\t\tbutton.innerHTML = button_text;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdisable: function (node, section) {\r\n\t\t\t\tsection.disabled = true;\r\n\t\t\t\toptional_time.update_block(node, section);\r\n\r\n\t\t\t},\r\n\t\t\tenable: function (node, section) {\r\n\t\t\t\tsection.disabled = false;\r\n\t\t\t\toptional_time.update_block(node, section);\r\n\t\t\t},\r\n\t\t\tbutton_click: function (index, el, section, container) {\r\n\t\t\t\tif (gantt.callEvent(\"onSectionButton\", [gantt._lightbox_id, section]) === false) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tvar config = gantt._get_typed_lightbox_config()[index];\r\n\t\t\t\tif (config.disabled) {\r\n\t\t\t\t\toptional_time.enable(container, config);\r\n\t\t\t\t} else {\r\n\t\t\t\t\toptional_time.disable(container, config);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn optional_time;\r\n\t};\r\n\r\n\tgantt.form_blocks.duration_optional = gantt._extend_to_optional(gantt.form_blocks.duration);\r\n\tgantt.form_blocks.time_optional = gantt._extend_to_optional(gantt.form_blocks.time);\r\n\r\n};","export default function(gantt){\r\n\tvar htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\r\n\tvar extraSpaces = new RegExp(\" +\", \"gm\");\r\n\r\n\tfunction stripHTMLLite(htmlText){\r\n\t\treturn (htmlText + \"\")\r\n\t\t\t.replace(htmlTags, \" \").\r\n\t\t\treplace(extraSpaces, \" \");\r\n\t}\r\n\r\n\tvar singleQuotes = new RegExp(\"'\", \"gm\");\r\n\tfunction escapeQuotes(text){\r\n\t\treturn (text + \"\").replace(singleQuotes, \"'\");\r\n\t}\r\n\r\n\tgantt._waiAria = {\r\n\t\tgetAttributeString: function(attr){\r\n\t\t\tvar attributes = [\" \"];\r\n\t\t\tfor(var i in attr){\r\n\t\t\t\tvar text = escapeQuotes(stripHTMLLite(attr[i]));\r\n\t\t\t\tattributes.push(i + \"='\" + text + \"'\");\r\n\t\t\t}\r\n\t\t\tattributes.push(\" \");\r\n\t\t\treturn attributes.join(\" \");\r\n\r\n\t\t},\r\n\r\n\t\tgetTimelineCellAttr:function(dateString){\r\n\r\n\t\t\treturn gantt._waiAria.getAttributeString({\"aria-label\": dateString});\r\n\t\t},\r\n\r\n\t\t_taskCommonAttr: function(task, div){\r\n\r\n\t\t\tif(!(task.start_date && task.end_date))\r\n\t\t\t\treturn;\r\n\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(gantt.templates.tooltip_text(task.start_date, task.end_date, task)));\r\n\r\n\t\t\tif(task.$dataprocessor_class){\r\n\t\t\t\tdiv.setAttribute(\"aria-busy\", true);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tsetTaskBarAttr: function(task, div){\r\n\t\t\tthis._taskCommonAttr(task, div);\r\n\r\n\t\t\t// task bars are complex elements that should be treated as a single element\r\n\t\t\tdiv.setAttribute(\"role\", \"img\");\r\n\r\n\t\t\tif(!gantt.isReadonly(task) && gantt.config.drag_move){\r\n\t\t\t\tif(task.id != gantt.getState(\"tasksDnd\").drag_id){\r\n\t\t\t\t\tdiv.setAttribute(\"aria-grabbed\", false);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdiv.setAttribute(\"aria-grabbed\", true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\ttaskRowAttr: function(task, div){\r\n\r\n\t\t\tthis._taskCommonAttr(task, div);\r\n\r\n\t\t\tif(!gantt.isReadonly(task) && gantt.config.order_branch){\r\n\t\t\t\tdiv.setAttribute(\"aria-grabbed\", false);\r\n\t\t\t}\r\n\r\n\t\t\tdiv.setAttribute(\"role\", \"row\");\r\n\t\t\t// selected attribute should be added only to the grid because\r\n\t\t\t// other parts don't have the keyboard navigation\r\n\t\t\tdiv.setAttribute(\"aria-selected\", gantt.isSelectedTask(task.id) ? \"true\" : \"false\");\r\n\r\n\t\t\t// allowed values start from 1, set 1 for non-tree datastores\r\n\t\t\tdiv.setAttribute(\"aria-level\", task.$level + 1 || 1);\r\n\r\n\t\t\tif(gantt.hasChild(task.id)){\r\n\t\t\t\tdiv.setAttribute(\"aria-expanded\", task.$open ? \"true\" : \"false\");\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tlinkAttr: function(link, div){\r\n\r\n\t\t\tvar linkTypes = gantt.config.links;\r\n\r\n\t\t\tvar toStart = link.type == linkTypes.finish_to_start || link.type == linkTypes.start_to_start;\r\n\t\t\tvar fromStart = link.type == linkTypes.start_to_start || link.type == linkTypes.start_to_finish;\r\n\r\n\t\t\tvar content = gantt.locale.labels.link + \" \" + gantt.templates.drag_link(link.source, fromStart, link.target, toStart);\r\n\r\n\t\t\t// links are complex elements that should be treated as a single element\r\n\t\t\tdiv.setAttribute(\"role\", \"img\");\r\n\r\n\t\t\tdiv.setAttribute(\"aria-label\", stripHTMLLite(content));\r\n\t\t\tif(gantt.isReadonly(link)){\r\n\t\t\t\tdiv.setAttribute(\"aria-readonly\", true);\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tgridSeparatorAttr: function(div){\r\n\t\t\t// the only valid role for the grid header\r\n\t\t\tdiv.setAttribute(\"role\", \"columnheader\");\r\n\t\t},\r\n\t\trowResizerAttr: function(div){\r\n\t\t\t// the only valid role for the grid header\r\n\t\t\tdiv.setAttribute(\"role\", \"row\");\r\n\t\t},\r\n\r\n\t\tlightboxHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t},\r\n\r\n\t\tlightboxVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\tlightboxAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t\tdiv.firstChild.setAttribute(\"role\", \"heading\");\r\n\t\t\tdiv.firstChild.setAttribute(\"aria-level\", \"1\");\r\n\t\t},\r\n\r\n\t\tlightboxButtonAttrString:function(buttonName){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\":gantt.locale.labels[buttonName], \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\tlightboxHeader: function(div, headerText){\r\n\t\t\tdiv.setAttribute(\"aria-label\", headerText);\r\n\t\t},\r\n\r\n\t\tlightboxSelectAttrString: function(time_option){\r\n\t\t\tvar label = \"\";\r\n\r\n\t\t\tswitch (time_option) {\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tlabel = gantt.locale.labels.years;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tlabel = gantt.locale.labels.months;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tlabel = gantt.locale.labels.days;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%H:%i\":\r\n\t\t\t\t\tlabel = gantt.locale.labels.hours + gantt.locale.labels.minutes;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\treturn gantt._waiAria.getAttributeString({\"aria-label\": label});\r\n\t\t},\r\n\r\n\t\tlightboxDurationInputAttrString: function(section){\r\n\t\t\treturn this.getAttributeString({\r\n\t\t\t\t\"aria-label\": gantt.locale.labels.column_duration,\r\n\t\t\t\t\"aria-valuemin\": \"0\",\r\n\t\t\t\t\"role\": \"spinbutton\"\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\tinlineEditorAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"row\");\r\n\t\t},\r\n\r\n\t\tgridAttrString: function(){\r\n\t\t\treturn [\" role='treegrid'\", gantt.config.multiselect ? \"aria-multiselectable='true'\" : \"aria-multiselectable='false'\", \" \"].join(\" \");\r\n\t\t},\r\n\r\n\r\n\t\tgridScaleRowAttrString: function(){\r\n\t\t\treturn \"role='row'\";\r\n\t\t},\r\n\r\n\t\tgridScaleCellAttrString: function(column, label){\r\n\t\t\tvar attrs = \"\";\r\n\t\t\tif(column.name == \"add\"){\r\n\t\t\t\t// a more precise role is button, but it is not valid for the grid header\r\n\t\t\t\tattrs = this.getAttributeString({\"role\":\"columnheader\", \"aria-label\": gantt.locale.labels.new_task});\r\n\t\t\t}else{\r\n\r\n\t\t\t\tvar attributes = {\r\n\t\t\t\t\t\"role\":\"columnheader\",\r\n\t\t\t\t\t\"aria-label\": label\r\n\t\t\t\t};\r\n\r\n\t\t\t\tif(gantt._sort && gantt._sort.name == column.name){\r\n\t\t\t\t\tif(gantt._sort.direction == \"asc\"){\r\n\t\t\t\t\t\tattributes[\"aria-sort\"] = \"ascending\";\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tattributes[\"aria-sort\"] = \"descending\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tattrs = this.getAttributeString(attributes);\r\n\t\t\t}\r\n\t\t\treturn attrs;\r\n\t\t},\r\n\r\n\t\tgridDataAttrString: function(){\r\n\t\t\treturn \"role='rowgroup'\";\r\n\t\t},\r\n\r\n\t\treorderMarkerAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"grid\");\r\n\t\t\tdiv.firstChild.removeAttribute(\"aria-level\");\r\n\t\t\tdiv.firstChild.setAttribute(\"aria-grabbed\", \"true\");\r\n\t\t},\r\n\r\n\t\tgridCellAttrString: function(column, textValue, task){\r\n\t\t\tvar attributes = {\"role\":\"gridcell\", \"aria-label\": textValue};\r\n\t\t\tif(!column.editor || gantt.isReadonly(task)){\r\n\t\t\t\tattributes[\"aria-readonly\"] = true;\r\n\t\t\t}\r\n\r\n\t\t\treturn this.getAttributeString(attributes);\r\n\t\t},\r\n\r\n\t\tgridAddButtonAttrString: function(column){\r\n\t\t\treturn this.getAttributeString({\"role\":\"button\", \"aria-label\": gantt.locale.labels.new_task});\r\n\t\t},\r\n\r\n\t\tmessageButtonAttrString: function(buttonLabel){\r\n\t\t\treturn \"tabindex='0' role='button' aria-label='\"+buttonLabel+\"'\";\r\n\t\t},\r\n\r\n\t\tmessageInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"alert\");\r\n\t\t\t//div.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tmessageModalAttr: function(div, uid){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t\tif(uid){\r\n\t\t\t\tdiv.setAttribute(\"aria-labelledby\", uid);\r\n\t\t\t}\r\n\r\n\t\t//\tdiv.setAttribute(\"tabindex\", \"-1\");\r\n\t\t},\r\n\r\n\t\tquickInfoAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"dialog\");\r\n\t\t},\r\n\r\n\t\tquickInfoHeaderAttrString: function(){\r\n\t\t\treturn \" role='heading' aria-level='1' \";\r\n\t\t},\r\n\r\n\t\tquickInfoHeader: function(div, header){\r\n\t\t\tdiv.setAttribute(\"aria-label\", header);\r\n\t\t},\r\n\r\n\t\tquickInfoButtonAttrString: function(label){\r\n\t\t\treturn gantt._waiAria.getAttributeString({\"role\":\"button\", \"aria-label\":label, \"tabindex\":\"0\"});\r\n\t\t},\r\n\r\n\t\ttooltipAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"role\", \"tooltip\");\r\n\t\t},\r\n\r\n\t\ttooltipVisibleAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"false\");\r\n\t\t},\r\n\r\n\t\ttooltipHiddenAttr: function(div){\r\n\t\t\tdiv.setAttribute(\"aria-hidden\", \"true\");\r\n\t\t}\r\n\t};\r\n\r\n\tfunction isDisabled(){\r\n\t\treturn !gantt.config.wai_aria_attributes;\r\n\t}\r\n\r\n\tfor(var i in gantt._waiAria){\r\n\t\tgantt._waiAria[i] = (function(payload){\r\n\t\t\treturn function(){\r\n\t\t\t\tif(isDisabled()){\r\n\t\t\t\t\treturn \"\";\r\n\t\t\t\t}\r\n\t\t\t\treturn payload.apply(this, arguments);\r\n\t\t\t};\r\n\t\t})(gantt._waiAria[i]);\r\n\t}\r\n\r\n\r\n};","import extensions from \"./ext/extensions_gpl\";\r\nimport base from \"./factory/make_instance_web\";\r\nimport scope from \"./utils/global\";\r\nconst gantt = (scope as any).gantt = base(extensions);\r\n\r\nexport default gantt;\r\nexport { gantt };","import \"../css/dhtmlxgantt.less\";\r\n\r\nimport factory from \"./make_instance_common\";\r\nimport ui from \"../core/ui_core\";\r\nimport ajaxLoading from \"../core/loading/ajax_loading\";\r\nimport dynamicLoading from \"../core/loading/dynamic_loading\";\r\n\r\nexport default function(supportedExtensions) {\r\n\tvar gantt = factory(supportedExtensions);\r\n\r\n\tif(!gantt.env.isNode){\r\n\t\tui(gantt);\r\n\t\tajaxLoading(gantt);\r\n\t\tdynamicLoading(gantt);\r\n\t}\r\n\r\n\treturn gantt;\r\n};","export default function(gantt) {\r\n\tgantt.load = function (url, type, callback) {\r\n\t\tthis._load_url = url;\r\n\t\tthis.assert(arguments.length, \"Invalid load arguments\");\r\n\r\n\t\tvar tp = 'json', cl = null;\r\n\t\tif (arguments.length >= 3) {\r\n\t\t\ttp = type;\r\n\t\t\tcl = callback;\r\n\t\t} else {\r\n\t\t\tif (typeof arguments[1] == \"string\")\r\n\t\t\t\ttp = arguments[1];\r\n\t\t\telse if (typeof arguments[1] == \"function\")\r\n\t\t\t\tcl = arguments[1];\r\n\t\t}\r\n\r\n\t\tthis._load_type = tp;\r\n\r\n\t\tthis.callEvent(\"onLoadStart\", [url, tp]);\r\n\r\n\t\treturn this.ajax.get(url, gantt.bind(function (l) {\r\n\t\t\tthis.on_load(l, tp);\r\n\t\t\tthis.callEvent(\"onLoadEnd\", [url, tp]);\r\n\t\t\tif (typeof cl == \"function\")\r\n\t\t\t\tcl.call(this);\r\n\t\t}, this));\r\n\t};\r\n};"],"names":["getNodePosition","elem","top","left","right","bottom","getBoundingClientRect","box","body","document","docElem","documentElement","parentNode","scrollTop","window","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","offsetWidth","offsetHeight","parseInt","offsetTop","offsetLeft","offsetParent","y","Math","round","x","width","height","isVisible","node","display","visibility","getComputedStyle","style","currentStyle","hasNonNegativeTabIndex","isNaN","getAttribute","hasHref","a","area","nodeName","loLowerCase","isEnabled","input","select","textarea","button","object","toLowerCase","hasAttribute","getFocusableNodes","root","nodes","querySelectorAll","join","nodesArray","Array","prototype","slice","call","i","length","$position","sort","b","tabIndex","splice","getScrollSize","div","createElement","cssText","appendChild","clientWidth","removeChild","max","getClassName","className","baseVal","indexOf","_trimString","addClassName","removeClassName","name","split","regEx","RegExp","replace","toNode","getElementById","querySelector","_slave","insertNode","newone","innerHTML","child","firstChild","removeNode","getChildNodes","css","ch","childNodes","len","out","obj","push","getTargetNode","e","trg","tagName","event","target","srcElement","shadowRoot","composedPath","locateAttribute","attribute","str","String","trim","this","apply","locateClassName","classname","strict","ind","charAt","getRelativeEventPosition","ev","d","clientX","clientY","getRelativeNodePosition","parent","childPos","parentPos","isChildOf","closest","element","selector","matches","msMatchesSelector","webkitMatchesSelector","el","contains","parentElement","nodeType","console","error","getClosestSizedElement","isShadowDomSupported","head","createShadowRoot","attachShadow","getActiveElement","activeElement","getSelection","focusNode","getRootNode","ShadowRoot","host","classList","test","scope","global","EventsManager$1","gantt","_mouseDown","_gantt","_domEvents","_createDomEventScope","selectedRegion","useKey","ignore","_target","getViewPort","_originPosition","_restoreOriginPosition","position","state","$services","getService","registerProvider","autoscroll","scheduledDndCoordinates","startDragAndDrop","setStart","copy","setPosition","setEnd","attach","filterTargets","utils","dom","_getCoordinates","eventElement","domHelpers.getRootNode","$root","coordinates","dragEnd","dragTimeline","ext","clickDrag","dragTimelineUseKey","config","drag_timeline","abs","relative","render","detachAll","unregisterProvider","detach","viewPort","viewPortBounds","absolute","EventHost","_silent_mode","listeners","_silentStart","_silentEnd","createEventStorage","handlers","index","eventStorage","combinedResult","handlerResult","arguments","addEvent","handler","settings","t","handlerId","id","once","originalHandler","removeEvent","clear","makeEventable","eventHost","attachEvent","eventName","thisObject","bind","attachAll","callback","callEvent","eventArguments","handlerName","concat","checkEvent","detachEvent","list","eventId","detachAllEvents","units","second","minute","hour","day","week","month","quarter","year","getSecondsInUnit","unit","forEach","arr","workArray","arrayFind","find","arrayIncludes","item","includes","isArray","pop","isDate","getFullYear","getMonth","getDate","isValidDate","getTime","delay","timeout","timer","result","$cancelTimeout","$pending","args","setTimeout","clearTimeout","$execute","replaceValidZeroId","rootId","checkZeroId","findBinary","array","prev","low","high","floor","SelectedRegion","view","_el","defaultRender","start","end","min","_singleRow","pos","_getTaskPositionByTop","_startPoint","_view","_viewPort","add","_callback","_endPoint","draw","eventable","singleRow","_useRequestAnimationFrame","useRequestAnimationFrame","requestAnimationFrame","getElement","startPoint","_startDate","dateFromPos","endPoint","_endDate","_positionPoint","positionPoint","getState","max_date","valueOf","tasksByTime","getTaskByTime","tasksByIndex","_getTasksByTop","startValue","endValue","startIndex","endIndex","getTaskByIndex","getItemIndexByTopPosition","task","getItemHeight","getItemTop","dataHeight","getTotalHeight","row_height","getTaskCount","EventsManager","_calculateDirectionVector","_trace","dots","vectors","resultVector","vector","magnitude","sqrt","angleDegrees","atan2","PI","_applyDndReadyStyles","_timeline","$task","_clearDndReadyStyles","remove","_getScrollPosition","timeline","$ui","getView","$config","scrollX","getScrollState","scrollY","_countNewScrollPosition","coords","shiftX","shiftY","_scrollState","_setScrollPosition","scrollLayoutCell","$id","_stopDrag","_originalReadonly","readonly","_originAutoscroll","_startDrag","enabled","clickDragUseKey","click_drag","scrollPosition","modals","modalsStack","isModal","afterPopup","$destroyed","focus","startModal","eventRemove","trapFocus","endModal","currentTarget","$keyboardNavigation","traceLightbox","getLightbox","focusElement","QuickInfo","show","_showForTask","_showAtCoordinates","hide","forced","qi","_quickInfoBox","_quickInfoBoxId","taskId","_quickInfoTask","quick_info_detached","getNode","setContainer","container","_container","setContent","content","defaultContent","header","title","date","buttons","quickinfo_buttons","_createQuickInfoElement","titleBox","titleContent","titleDate","main","controls","_waiAria","quickInfoHeader","html","ariaAttr","quickInfoButtonAttrString","locale","labels","_qiButtonClickHandler","_qiKeyPressHandler","_qi_button_click","code","which","_appendAtCoordinates","show_quick_info","_getContainer","_get_event_counter_part","xViewport","yViewport","_init_quick_info","_prepare_quick_info_classname","_fill_quick_data","_show_quick_info","offset","domEv","getTaskNode","getTaskRowNode","scroll","dx","dy","quickInfoAttr","quickInfoHeaderAttrString","getTask","_quickInfoReadonly","isReadonly","getTaskType","template","templates","quick_info_class","start_date","end_date","allowedButtons","isEditor","icon_delete","icon_edit","quick_info_title","quick_info_date","quick_info_content","popupHeight","scrolls","screenWidth","relativePopupBottom","mask","$click","$task_data","$grid_data","$grid","$layout","seed","plainObjectConstructor","constructor","toString","helpers.isDate","Date","helpers.isArray","Object","create","hasOwnProperty","mixin","source","force","f","undefined","defined","uid","functor","capture","addEventListener","removeEventListener","createScope","utils.event","utils.eventRemove","eventScope","staticArray","extend","Tooltip","_tooltipNode","tooltipAttr","_root","domHelpers.isChildOf","_isLikeMouseEvent","_calculateTooltipPosition","tooltipVisibleAttr","tooltipHiddenAttr","viewport","_getViewPortSize","tooltipNode","tooltip","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","mouse","domHelpers.getRelativeEventPosition","containerPos","domHelpers.getNodePosition","_getViewPort","TooltipManager","_listeners","domEventsScope","_initDelayedFunctions","delayHide","watchableTarget","eventTarget","domHelpers.getTargetNode","targetNode","domHelpers.closest","doOnMouseEnter","onmouseenter","onmousemove","onmouseleave","listener","cloneDomEvent","clone","createEvent","delayShow","helpers.delay","tooltip_timeout","tooltip_hide_timeout","noTrack","onBeforeUndo","onBeforeRedo","batchActions","Monitor","undo","_batchAction","_batchMode","_ignore","_ignoreMoveEvents","_initialTasks","_initialLinks","_nestedTasks","_nestedLinks","_undo","_attachEvents","type","overwrite","undo_types","_storeTask","link","_storeLink","isMoveEventsIgnored","newValue","_timeout","stopBatchAction","action","logAction","_storeTaskCommand","command","update","$local_index","getTaskIndex","oldValue","getInitialTask","getParent","_storeEntityCommand","move","entity","children","childrenLinks","_storeLinkCommand","taskIds","tasks","linkIds","_getLinks","setInitialTask","uniqueLinks","links","setInitialLink","$index","getGlobalTaskIndex","setInitialTaskObject","getLink","deleteCacheCooldown","saveInitialAll","clearInitialTasks","eachTask","clearInitialLinks","getLinks","getMoveObjectByTaskId","startIgnore","stopIgnore","startBatchAction","clearUndoStack","clearRedoStack","onTaskAdded","onTaskUpdated","onTaskDeleted","onLinkAdded","onLinkUpdated","onLinkDeleted","onTaskMoved","toggleIgnoreMoveEvents","store","nested","setNestedTasks","datastore","getDatastore","tindex","dragId","projectDrag","drag_id","isSummaryTask","drag_project","plugins","multiselect","selectedIds","getSelectedTasks","inlineEditors","onBeforeEditStartId","onEditStart","updateConfigs","undoEnabled","commands","old","actionType","entityType","_storeCommand","isTaskExists","getInitialLink","$source","$target","linkId","Undo","maxSteps","redoEnabled","invert","revert","value","inverseCommands","types","assert","_undoStack","_redoStack","getUndoStack","stack","undo_steps","undo_actions","redo","_pop","_reorderCommands","_applyAction","_push","shift","weights","any","actionWeights","weightA","entities","actions","methods","get","isExists","batchUpdate","method","getMethod","check","prop","startsWith","extensions","defaultConfig","eventsManager","destructor","fullscreen","isExpanded","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","isFullscreenAvailable","fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled","backupBodyPadding","overflow","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","backupElementSizes","zIndex","modified","backupPositioning","updateSizes","expandGantt","onFullScreenChange","$container","getFullscreenElement","positions","originalPositioning","setFullScreenSizes","record","cantFullscreen","warning","log","requestArguments","webkitRequestFullscreen","Element","ALLOW_KEYBOARD_INPUT","requestFullscreen","msRequestFullscreen","mozRequestFullScreen","requestExitFullscreen","msExitFullscreen","mozCancelFullScreen","webkitExitFullscreen","exitFullscreen","collapse","expand","keyboard_navigation","keyboard_navigation_cells","_compose","parts","res","p","shortcuts","createCommand","modifiers","alt","ctrl","meta","keyCode","parse","shortcut","expr","getExpressions","words","getWords","j","commandKeys","specialKeys","charCodeAt","getCommandFromEvent","domEvent","shiftKey","altKey","ctrlKey","metaKey","printableKey","fromCharCode","getHashFromEvent","getHash","junctionChar","term","combinationChar","backspace","tab","enter","esc","space","up","down","home","pageup","pagedown","delete","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","EventHandler","_handlers","findHandler","hash","doAction","facade","preventDefault","returnValue","unbind","bindAll","map","initKeys","keys","domHelpers.getFocusableNodes","focusable","currentFocus","domHelpers.getActiveElement","currentIndex","lastItem","firstItem","GanttNode","blur","scrollHorizontal","dir","scale","getScale","step","scrollTo","posFromDate","scrollVertical","KeyNavNode","isValid","fallback","moveTo","dispatcher","setActiveNode","compareTo","canStringifyThis","canStringifyThat","eventFacade","setAttribute","$eventAttached","HeaderCell","show_grid","getVisibleTaskCount","getGridColumns","TaskRow","visibleColumns","fromDomElement","cellElement","domHelpers.locateClassName","previousSibling","$grid_scale","columns","taskRow","rootLevel","getChildren","root_id","TaskCell","click","createTask","globalIndex","splitItem","$split_subtask","parentId","nextIndex","locate","isTaskVisible","task_attribute","keptFocus","getTaskPosition","getTaskHeight","viewWidth","viewHeight","inner_width","inner_height","scroll_on_click","show_chart","task_scroll_offset","grid","scrollPositionX","scrollPositionY","attachedScrollbarHorizontal","scrollable","scrollbarHorizontal","attachedScrollbarVertical","scrollbarVertical","scrollGrid","nextElement","prevTask","getPrev","nextTask","getNext","hasChild","$open","open","close","prevId","getPrevSibling","moveTask","updateTask","isSelectedTask","unselectTask","selectTask","showLightbox","columnIndex","domHelpers.locateAttribute","row","isActive","activeNode","globalNode","enable","getActiveNode","disable","getDefaultNode","setDefaultNode","inputs","focusGlobalNode","blurNode","focusChanged","keyDownHandler","defaultPrevented","ganttNode","awaitsFocus","clearDelay","isTaskFocused","isInlineEditorCell","isNoKeyboardNavigationElement","focusHandler","$preventDefault","reFocusActiveNode","outsideGantt","localName","domElement","mousedownHandler","locateTask","removeAttribute","onReady","$data","tasksStore","currentNode","gridDataTopScroll","gridDataBottomScroll","_smart_render","updateRender","_redrawTasks","renderers","items","focusedItemVisible","createdTaskId","keepFocusOnNewTask","placeholder","nodeConstructor","placeholder_task","focusOnCreate","oldId","newId","interval","setInterval","getScope","mode","scopes","headerCell","taskCell","findVisibleColumnIndex","columnName","clearInterval","keyNavFacade","addShortcut","scopeObject","getShortcutHandler","getCommandHandler","removeShortcut","column","keyboardNavigation","quick_info","quickInfo","text","substr","details","task_time","events","hidingFunction","clearQuickInfo","hideQuickInfo","showQuickInfo","tooltipManager","tooltips","tooltipFor","touch","touch_tooltip","targetTaskId","tooltip_text","hideTooltip","link_source_id","monitor","updTask","changeTaskCommandId","updLink","oldTaskId","newTaskId","changeLinkCommandId","updateTasksIds","entry","updateLinksIds","setUndoStack","getRedoStack","setRedoStack","saveState","getInitialState","marker","render_marker","show_markers","min_date","markerHeight","getRowTop","timeline_placeholder","scrollHeight","initMarkerArea","markerArea","$marker_area","_markers","createDatastore","initItem","renderMarkers","createDataRender","defaultContainer","addLayer","getMarker","getItem","addMarker","addItem","deleteMarker","exists","removeItem","updateMarker","refresh","_getMarkers","getItems","multiselect_one_level","_multiselect","_selected","_one_level","_active","_first_selected_when_shift","getDefaultSelected","selected","getSelected","setFirstSelected","getFirstSelected","updateState","active","select_task","reset","setLastSelected","silent","unselect","getLastSelected","last","getSelectedId","afterSelect","toggle","isSelected","forSelected","isSameLevel","calculateTaskLevel","_quickRefresh","refreshTask","doSelection","_is_icon_open_click","target_ev","defaultLast","isLast","multiSelect","singleSelection","controller","cell","locateCell","inline_editors_multiselect_open","getEditorConfig","startEdit","blockSelection","first_indx","target_indx","last_indx","tmp","old_selectTask","old_unselectTask","toggleTaskSelection","eachSelectedTask","getLastSelectedTask","old_isSelected","new_id","task_id","export_api","_apiUrl","previousDateRage","str_to_date","date_format","data","_serializeHtml","_prepareConfigPDF","_serializeAll","_fixColumns","raw","_preparePDFConfigRaw","version","_sendToExport","_pdfExportRouter","_serializePlain","dates","smartRendering","smart_rendering","visual","convert","_eachTaskTimed","_no_progress_colors","_serializeTimeline","_serializeGrid","rawDates","scales","_serializeScales","worktime","_getWorktimeSettings","formData","File","FormData","append","_sendImportAjaxExcel","_sendImportAjaxMSP","importFromPrimaveraP6","importFromMSProject","skip_circular_links","oldXmlFormat","xml_format","oldFormatDate","format_date","oldXmlDate","xml_date","oldDateFormat","exportServiceDateFormat","date_to_str","_customProjectProperties","_customTaskProperties","_clearRecLinks","_exportConfig","$custom_data","custom","exportToPrimaveraP6","exportToMSProject","label","url","pack","cb","ajax","post","base","$template","server","JSON","stringify","sheet","xhr","XMLHttpRequest","onreadystatechange","readyState","status","onload","info","responseText","setRequestHeader","send","encodeURIComponent","_xdr","loader","xdoc","xmlDoc","col","editor","editor_types","skin","_serializableGanttConfig","_markColumns","_ajaxToExport","form","_createHiddenForm","submit","_hidden_export_form","constraint_date","deadline","key","formatDate","_color_box","_color_hash","color","_getColor","backgroundColor","parsedRanges","minutes","range","startMinute","endMinute","defaultWorkTimes","hours","time","work_time","wTime","_working_time_helper","get_calendar","worktimes","parsed","_getMinutesWorktimeSettings","master","branch","_pull","_originalCopyObject","json","_copyObject","task_text","_copyObjectBase","rgb","match","toISOstring","_copyObjectColumns","_copyObjectPlain","getDayIndex","_day_index_by_date","columnIndexByDate","$start","$end","hiddenCells","scaleCellsWidth","$level","$type","$rendered_type","tmps","$text","$left","leftside_text","$right","rightside_text","_copyObjectTable","$color","ct","val","date_grid","smartScales","smart_scales","_copyObjectAll","_exportSerialize","_getRaw","_scale_helpers","_get_scales","minWidth","min_column_width","autosizeMinWidth","_get_resize_options","autosize_min_width","scale_height","prepareConfigs","availWidth","autosize","_getScales","rtl","$scaleHelper","_copyObjectColors","cellColors","timeline_cell_class","task_cell_class","steps","trace_x","styles","cellCss","_getStyles","Infinity","col_width","format","date_scale","scaleCell","scaleCell_class","scaleCss","exportMode","cols","ccount","xmlFormat","serialize","_lvl","_setLevel","_makeLinksSameLevel","skippedLinks","_clearCircDependencies","_clearLinksSameLevel","_clearLevel","usedTasks","prevLink","sources","$_source","_onCircDependencyFind","targets","curLink","targetTask","_source","targetLvl","linkT","sourceParent","targetParent","$_target","project","projectName","projectDates","getSubtaskDates","start_end","manual","auto_scheduling","durationUnit","projectProperties","taskProperties","exportToPDF","exportToPNG","exportToICal","exportToExcel","exportToJSON","importFromExcel","constants","KEY_CODES","UP","DOWN","LEFT","RIGHT","SPACE","ENTER","DELETE","ESC","TAB","ExtensionsManager","addExtension","_extensions","getExtension","layout","rows","resizer","finish_to_start","start_to_start","finish_to_finish","start_to_finish","milestone","auto_types","duration_unit","correct_work_time","skip_off_time","cascade_delete","autoscroll_speed","deepcopy_on_parse","show_links","show_task_cells","static_background","static_background_cells","branch_loading","branch_loading_property","show_loading","min_duration","start_on_monday","server_utc","show_progress","fit_tasks","preserve_scroll","container_resize_timeout","deadlines","drag_links","drag_progress","drag_resize","drag_move","drag_mode","resize","progress","round_dnd_dates","link_wrapper_width","link_arrow_size","autofit","tree","align","scale_offset_minimal","inherit_scale_class","time_step","duration_step","task_date","time_picker","link_attribute","layer_attribute","buttons_left","_migrate_buttons","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","buttons_right","lightbox","sections","map_to","project_sections","milestone_sections","single_date","drag_lightbox","details_on_create","details_on_dblclick","initial_scroll","order_branch","order_branch_free","task_height","bar_height","bar_height_padding","min_grid_column_width","grid_resizer_column_attribute","keep_grid_width","grid_resize","grid_elastic_columns","show_tasks_outside_timescale","show_unscheduled","resize_rows","task_grid_row_resizer_attribute","min_task_grid_row_height","readonly_property","editable_property","calendar_property","resource_calendars","dynamic_resource_calendars","inherit_calendar","type_renderers","open_tree_initially","optimize_render","prevent_default_scroll","show_errors","wai_aria_attributes","horizontal_scroll_key","drag_multiple","csp","isWindowAwailable","env","isIE","navigator","userAgent","isIE6","isIE7","isIE8","isOpera","isChrome","isKHTML","isFF","isIPad","search","isEdge","isNode","serialized","createConfig","Error","async","headers","fastVersion","utc","dateToStrFn","Function","to_fixed","getISOWeek","getWeek","splt","strToDateFn","dateString","cspVersion","getUTCDate","getUTCMonth","getUTCFullYear","day_short","getUTCDay","getDay","day_full","month_short","month_full","getUTCHours","getHours","getUTCMinutes","getMinutes","getUTCSeconds","getSeconds","getUTCISOWeek","set","temp","month_short_hash","month_full_hash","UTC","canUseCsp","useCsp","cspAutoCheck","dateHelper","init","s","date_part","setHours","hour_start","setTime","time_part","getTimezoneOffset","week_start","month_start","setDate","quarter_start","res_month","m","setMonth","year_start","day_start","setMinutes","minute_start","setSeconds","getMilliseconds","setMilliseconds","_add_days","modifiedDate","inc","originalDate","incCondition","getHoursCondition","getDateCondition","ndate","setYear","add_quarter","num","cspCompliantVersion","_getWeekNumber","isoWeek","nday","first_thursday","year_number","ordinal_date","convert_to_utc","parseDate","parse_date","token","_url","_token","_mode","_seed","_queue","api","_events","Accept","credentials","fetch","then","websocket","_wrapper","connect","_socket","onclose","n","location","protocol","o","r","WebSocket","onmessage","fire","onError","_send","_resubscribe","Promise","_uid","resolve","reject","onCall","filter","catch","onResponse","remoteEvents","remote","remote_client.Client","req","_ready","load","back","_remote","ready","on","checkTimeout","updPerSecond","_on_timeout","ceil","StateService","stateProviders","internal","utils.mixin","provider","Promise$1","$powerArray","$create","$removeAt","$remove","$find","$insertAt","$each","$map","$filter","isPlaceholderTask","DataStore","pull","$initItem","visibleOrder","powerArray","fullOrder","_skip_refresh","_filterRule","_searchVisibleOrder","_indexRangeCache","_getItemsCache","_attachDataChange","_parseInner","loaded","copyOnParse","utils.copy","isSilent","_updateOrder","updateItem","utils.defined","_removeItemInner","_addItemInner","order","data_size","getVisibleItems","getIndexRange","utils.uid","_changeIdInner","changeId","_moveInner","sindex","getIdByIndex","clearAll","alreadySilent","arraysEqual","arr1","arr2","quick","skipFilter","_quick_refresh","_mark_recompute","oldOrder","count","countVisible","eachItem","rule","filteredOrder","placeholderIds","_ganttConfig","from","to","cacheKey","ret","getIndexById","_getNullIfUndefined","getFirst","getLast","TreeDataStore","_branches","loadedItem","existingItem","$parentProperty","parentProperty","$getRootId","$openInitially","openInitially","_eachItemMainRangeCache","getConfig","splitParents","splitItems","taskOpenState","taskVisibility","haveSplitItems","_isSplitItem","canOpenSplitTasks","open_split_tasks","$expanded_branch","isHeadless","_buildTree","setParent","_add_branch","calculateItemLevel","getBranchIndex","targetIndex","_move_branch","$rendered_parent","_replace_branch_child","_traverseBranches","itemId","sid","source_pid","tbranch","tid","diff","childId","pid","getSiblings","getNextSibling","siblings","nextSibling","level","eachParent","_setParentInner","new_pid","_eachItemCached","cache","_eachItemIterate","startId","itemsStack","reverse","useCache","buildCache","startItem","parentsHash","old_parent","new_parent","old_id","newbranch","field","desc","criteria","original_criteria","els","renderedParent","actualParent","_skipTaskRecalculation","datastoreRender","itemRepainter","renderer","renders","getLayers","render_item","allData","loadedRanges","layer","layerData","get_visible_range","ids","prepare_data","render_items","update_items","extraDataArr","skipRepaint","batch_update","getDataRender","onUpdateRequest","change_id","getDatastores","storeNames","facadeFactory","$StoreType","self","selectedId","deleteItem","subItem","storeAccessName","dropService","storeList","setService","_getDatastores","refreshData","scrollState","stores","refresh_links","refreshLinks","refreshLink","_bulk_dnd","hasSplitParent","isSplitTask","linksStore","_update_flags","userdata","_clear_data","oldSelectId","_skipResourceRepaint","addTask","deleteTask","utils.bind","startTask","changeTaskId","oldid","newid","getLinkCount","isLinkExists","addLink","newLink","updateLink","deleteLink","changeLinkId","ScaleHelper","services","getSum","sizes","summ","setSumWidth","sum_width","adjustSize","full_width","splitSize","full","share","sortScales","cellSize","_isLegacyMode","scaleConfig","scale_unit","subscales","_prepareScaleObject","primaryScale","legacyMode","initTemplate","scale_cell_class","getSubScales","docLink","warn","min_coll_width","container_width","minDate","maxDate","heights","configs","main_scale","cfg","initScaleConfig","processIgnores","initColSizes","limitVisibleRange","unshift","alineScaleColumns","reverseScale","setPosSettings","indexes","trace_indexes","trace_index_transition","_ignore_time_config","skip","probe","isWorkTime","ignore_x","display_count","min_col_width","line_height","cont_width","column_count","ignores","eachColumn","trace_x_ascending","iterateScales","lower_scale","upper_scale","upper_dates","lower_dates","prevUpper","target_index","upper_start","upper_end","lower_start","lower_end","targetWidth","curr","tzOffset","_correct_dst_change","lastDate","outDate","shared","_init_tasks_range","PrimaryScaleHelper","helper","start_interval","onlyProjectTasks","extendRangeForDates","constraint_type","constraint_types","ASAP","ALAP","baselines","baseline","calculateEndDate","duration","_min_date","_max_date","updateTasksRange","old_min","old_max","copyLinkIdsArray","targetHash","copyLinkIds","treeHelper","getSubtreeLinks","getSubtreeTasks","DataProcessorEvents","dp","$gantt","$dp","_dataProcessorHandlers","cascadeDelete","clientSideDelete","setGanttMode","setUpdated","_sendTaskOrder","deleteAfterConfirmation","needDbDelete","needCascadeDelete","dpMode","updateMode","setUpdateMode","cascade","storeItem","sendAllData","_tSend","_waitMode","itemLinks","_links","_dp","_tMode","_serverProcessor","_ganttMode","substring","serverProcessor","pluralizedMode","urlSeparator","upd","xml","_xmlNodeToJSON","isExist","objData","property","assignmentsStore","handleResourceCRUD","handleResourceAssignmentCRUD","handleBaselineCRUD","updated","updatedRows","clientOnly","getUserData","_in_progress","resources","dataprocessor_assignments","resource_assignment_store","insertedTasks","pendingAssignments","insertResourceAssignment","assignment","dataprocessor_resources","resourcesStore","resource_store","resource","dataprocessor_baselines","baselineStore","helpers.forEach","SimpleStorage","_storage","getStoredItem","_Vt","DataProcessor$1","serverProcessorURL","action_param","autoUpdate","_headers","_payload","_postDelim","_routerParametersFormat","_invalid","messages","inserted","deleted","invalid","invalid_cell","enableUTFencoding","total","payload","_serializeAsJson","_router","router","_utf","escape","getSyncState","dnd","rowId","findRow","existing","set_invalid","setUserData","is_invalid","markRow","sendData","_methods","editStop","pendingUpdateModes","modes","checkBeforeUpdate","_beforeSendData","_getRowData","_serializeAsJSON","serialize_one","security_key","pref","valid","_forEachUpdatedRow","_sendData","_getAllData","pattern","_uActions","btag","ganttMode","correct","originalSid","that","_xml","getGanttMode","reqUrl","filePath","tag","processCallback","afterUpdateCallback","finalizeUpdate","xmltop","cleanUpdate","atag","xpath","_initialized","_dp_init","_setDefaultTransactionMode","delete_confirmation","_change_id","_row_style","$dataprocessor_class","_delete_task","$drop_target","setDp","dataProcessorEvents","user","_user","_needUpdate","_updateBusy","afterAutoUpdate","fullSync","loadUpdate","xml_node","getUpdates","vers","_getXmlNodeValue","updates","newState","dataToSend","processedData","_cleanupArgumentsBeforeSend","_cleanupItemBeforeSend","updatedItem","output","taskState","taskAction","getActionByState","_onResolvedCreateUpdate","actionPromise","errorMsgStart","errorMsgEnd","queryParams","afterUpdate","dhxVersion","urlParams","_applyPayload","preprocessedData","query","setTransactionMode","nodeValue","hasOne","traversedObjects","_prepareDate","helpers.arrayIncludes","_prepareArray","_prepareObject","rawItem","processedItem","dataItem","_prepareDataItem","DataProcessor","DEPRECATED_api","DataProcessor.DataProcessor","createDataProcessor","tMode","createMethod","disableMethod","methodName","dummyMethod","restoreMethod","disableMethods","methodsHash","restoreMethods","batchUpdatePayload","noRedraw","dp_mode","call_dp","resetProjects","resetProjectDates","createWbs","_needRecalc","_isRecalcNeeded","_isGroupSort","_getWBSCode","_calcWBS","$virtual","$wbs","_setWBSCode","getWBSCode","getByWBSCode","_isFirst","_prevSibling","_wbs","_parent","wbs","resetCache","getTaskByWBSCode","createResourceMethods","resourceTaskCache","singleResourceCacheBuilt","falsyValuePrefix","random","resourceHashFunction","getCacheKey","resourceIds","typeFilter","getResourceTasks","matchingResources","resourceId","resourceValue","resource_id","selectAssignments","resource_property","owners","getTaskBy","propertyName","propertyValue","getResourceAssignments","assignments","resourcePlugin","renderEditableLabel","editable","$task_id","$resource_id","renderSummaryLabel","sum","reduce","Number","editableResourceCellTemplate","$role","editableResourceCellClass","capacity","getSummaryResourceAssignments","childResource","initEditableDiagram","resource_render_empty_cells","timeoutId","makeEditable","cancelAnimationFrame","contentEditable","getCellsByType","$content","assignmentEditInProcess","strValue","innerText","assignmentId","startDate","endDate","assignmentStore","nextChunk","calculateDuration","updateTaskAssignments","editable_resource_diagram","fetchTasks","lightbox_resources","lightboxOptions","resourceStoreConfig","initItems","storeType","$resourcesStore","lightboxOptionsFnc","options","updateCollection","histogram_cell_class","histogram_cell_label","histogram_cell_allocated","histogram_cell_capacity","defaultResourceCellClass","defaultResourceCellTemplate","resource_cell_value","resource_cell_class","resource_assignments","resourceAssignmentsProperty","process_resource_assignments","resourceAssignmentFormats","auto","singleValue","valueArray","resourceValueArray","assignmentsArray","resourceAssignmentFormat","assignmentModes","fixedDates","fixedDuration","default","initAssignmentFields","initDelay","timing","_assignmentTimeFromTask","resourceAssignmentsStore","_makeAssignmentsFromTask","resourceAssignments","detectFormat","usedIds","defaultMode","_updateTaskBack","_assignAssignments","getTaskAssignments","_loadAssignmentsFromTask","_syncAssignments","storeAssignments","taskValues","assignmentsStoreValues","inBoth","inTaskNotInStore","inStoreNotInTask","taskOwner","ownerId","foundOwnerAssignment","taskSearch","storeSearch","processedIds","inTask","inStore","ignoreFields","_syncOnTaskUpdate","totalAssignments","needUpdate","needUpdateFor","undoBatchCancel","assignmentsHash","unscheduled","idsSearch","deleteIds","resourceAssignmentsCache","resourceTaskAssignmentsCache","taskAssignmentsCache","searchTaskId","resourceTaskCacheKey","getTaskResources","uniqueResources","addPlaceholder","callIfEnabled","insertPlaceholder","placeholders","new_task","afterEdit","newTask","dataProcessor","_silencedPlaceholder","isPlaceholderLink","auto_task_types","checkTaskType","changedTypes","targetType","getTaskTypeToUpdate","$needsUpdate","updateParentTypes","group_mode","delTaskParent","allTypes","hasChildren","taskType","originalRowDndParent","originalMoveTaskParent","isParsingDone","updateAfterRemoveChild","DurationFormatterNumeric","canParse","_ie","LinkFormatterSimple","_linkReg","linkPart","exec","_findSource","lag","pred","reqTemplate","_ne","formatters","durationFormatter","DurationFormatter","linkFormatter","LinkFormatter","empty_state_screen","show_empty_state","emptyStateElement","isGanttEmpty","placeholderContainer","empty_state_text_link","empty_state_text_description","clickEvents","attachAddTaskEvent","domHelpers","getContainer","wrapper","marginTop","oldNodes","detachAddTaskEvents","renderContent","emptyStateElementNode","hasBaselinesBelow","baselinesOnDifferentRow","render_mode","childrenHaveBaselines","hasBaselines","isSplitParent","getMaxParentHeight","heightLimit","maxHeight","shrinkHeight","splitChild","parentHeight","getItemPosition","rowHeight","_adjustSplitParentHeight","maxParentHeight","adjustTaskHeightForBaselines","childHeight","_increaseSplitParentHeight","getLayoutView","getBarHeight","subtaskId","subtask","subtaskHeight","baselineSize","baselineAmount","subrowHeight","newBaseline","existingBaseline","shouldRepaint","iteratedBaselines","taskBaselines","exisingBaselines","getTaskBaselines","exisingBaseline","repaint","parsing","jsonParseError","on_load","resp","responseURL","_process_loading","collections","_load_collections","assignmentsByTasks","collections_loaded","collection","serverList","option","option_key","$ignore","dhx_security","serializeTask","serializeLink","_copyLink","rawLinks","baselineCopy","attrs_only","attributes","_getCollections","opts","itms","attrs","k","attr","_getXML","toptag","getXMLTopNode","skey","evs","oldxml","startdate","est","enddate","predecessortasks","message","IsWorkTimeArgument","calendar","ClosestWorkTimeArgument","CalculateEndDateArgument","GetDurationArgument","calendarArgumentsHelper","getWorkHoursArguments","helpers.isValidDate","setWorkTimeArguments","unsetWorkTimeArguments","isWorkTimeArguments","processedConfig","getClosestWorkTimeArguments","arg","_getStartEndConfig","param","argumentType","getDurationArguments","hasDurationArguments","calculateEndDateArguments","WorkTimeCalendarMerger","_getIntervals","hoursArray","_toHoursArray","intervalsArray","formatHHMM","secondsValue","minutePart","_intersectHourRanges","first","baseArray","overridesArray","current","_mergeAdjacentIntervals","_mergeHoursConfig","firstHours","secondHours","merge","firstConfig","secondConfig","mergedSettings","customWeeks","processCalendar","config1","config2","date1","date2","hours2","WorkUnitsMapCache","timestamp","_cache","has","subCache","rawValue","unitCache","yearCache","Map","WorkUnitsObjectCache","LargerUnitsCache","getMinutesPerWeek","weekStart","_weekCache","_calendar","minutesPerWeek","getHoursPerDay","getMinutesPerMonth","monthStart","_monthCache","minutesPerMonth","nextMonth","DateDurationCache","stepCache","durations","endDates","compute","_getCacheObject","startDateTimestamp","_endDateCacheKey","resultTimestamp","_durationCacheKey","endDateTimestamp","CalendarWorkTimeStrategy","argumentsHelper","_workingUnitsCache","_largeUnitsCache","_dateDurationCache","_worktime","_cached_timestamps","_cached_timestamps_count","_clearCaches","_getUnitOrder","_resetTimestampCache","_timestamp","_checkIfWorkingUnit","hasDuration","_is_work_day","_getWorkHours","_is_work_hour","startHour","endHour","_getTimeOfDayStamp","dayEnd","_is_work_minute","checkTime","_nextDate","_getWorkUnitsBetweenGeneric","stepStart","stepEnd","next","checkFirst","checkLast","isLastStep","_isWorkTime","unitOrder","biggerTimeUnit","_getClosestWorkTimeFuture","_getMinutesPerHour","hourStart","hourEnd","_getMinutesPerDay","durationMinutes","durationHours","_getWorkUnitsForRange","getUnitsPerDay","_getMinutesBetweenSingleDay","_getIntervalTimestamp","minuteFrom","minuteTo","_getMinutesBetween","firstDayStart","firstDayEnd","lastDayStart","lastDayEnd","startPart","endPart","_getHoursBetween","_setConfig","_parseSettings","haveCustomWeeks","customWeeksRangeStart","customWeeksRangeEnd","customWeeksBoundaries","_parseHours","minCustomRangeStart","maxCustomRangeEnd","customTime","rangeStart","rangeEnd","fromReadable","toReadable","currentWeek","_tryChangeCalendarSettings","backup","hasWorkTime","_arraysEqual","_compareSettings","mySettings","thatSettings","myDays","otherDates","myHours","otherHours","equals","myWeek","thatWeek","getWorkHours","dateValue","endHours","timestampRanges","part","timerangeConfig","durationSeconds","setWorkTime","calendarConfig","unsetWorkTime","reset_calendar","dateKey","isWorkUnit","setItem","getDuration","_calculateDuration","sign","mult","getEndDate","_calculateEndDate","_calculateMinuteEndDate","_subtractMinuteDate","_calculateHourEndDate","_addInterval","stopAction","added","dstShift","_addHoursUntilDayEnd","rangeHours","addHours","intervalEnd","durationLeft","hoursPerDay","_addMinutesUntilHourEnd","rangeMinutes","addMinutes","_subtractMinutesUntilHourStart","hourStartTimestamp","initialDateTimestamp","minutePrecision","_isMinutePrecision","addedInterval","calculatedDay","daySchedule","minutesInDay","dayStart","iterateFromDayEnd","isWorkHour","workInterval","prevInterval","minutesInHour","_getClosestWorkTimePast","times","lastInterval","getClosestWorkTime","_getClosestWorkTime","inputDate","direction","closestFuture","closestPast","_getClosestWorkTimeGeneric","_findClosestTimeInDay","resultDate","fromDayEnd","_getClosestWorkMinute","increment","hasRegularHours","_checkWorkHours","dayConfig","legacyResourceCalendarConfig","isLegacyResourceCalendarFormat","resourceCalendarsProperty","getResourceProperty","resourceCalendarsConfig","getCalendarIdFromLegacyConfig","calendarId","dynamicResourceCalendars","dynamicCalendars","getCalendarIdFromMultipleResources","manager","getResourceCalendar","tempCalendar","mergeCalendars","addCalendar","CalendarManager","_calendars","_legacyConfig","_isLegacyConfig","createDefaultCalendars","CalendarDisabledTimeStrategy","TimeCalculator","calendarManager","createArgumentsHelper","$disabledCalendar","NoWorkTimeCalendar","_convertWorkTimeSettings","days","calendars","mergeHelper","CalendarMergeHelper","_createCalendarFromConfig","createCalendar","apiCore","preparedConfig","parentCalendar","defaults","fulltime","getCalendar","getCalendars","_getOwnCalendar","resourceProperty","calendarsConfig","getTaskCalendar","taskObject","groupMode","currentTask","$effective_calendar","isCalendar","deleteCalendar","restoreConfigCalendars","possibleCalendar","every","fixedUnits","_getCalendar","worktimeFacadeFactory","timeCalculator","_hasDuration","isUnscheduledTask","_isAllowedUnscheduledTask","_isTaskInTimelineLimits","taskStart","taskEnd","_getProjectEnd","project_end","_getProjectStart","project_start","getDefaultTaskDate","parent_id","schedule_from_end","_set_default_task_timing","$new","showTask","_lightbox_id","_tasks_dnd","drag","getTaskTimingMode","task_type","$no_start","$no_end","scheduled_summary","updateTaskTiming","assignProjectDates","taskTiming","summaryDateFields","manuallyScheduledSummaryDateFields","dateFields","_init_task_timing","getSubtaskInfo","rollup","isScheduledSummary","task_mode","dirty","$calculate_duration","effectiveCalendar","taskMode","$rollup","getSubtaskDuration","_update_parents","updateAll","has_changed","startDateField","$auto_start_date","endDateField","$auto_end_date","oldStart","oldEnd","roundDate","upper","lower","colIndex","correctTaskWorkTime","listenWindowResize","resizeDelay","resizeTimeout","previousSize","getContainerSize","container_resize_method","lowlevelResizeWatcher","$scrollbarRepaint","currentSize","repaintGantt","previousHeight","previousWidth","gantt_core","expire","invalidContainerMessage","validateNode","cloneNode","_reinit","dropLayout","_clearTaskLayers","_clearLinkLayers","rebuildLayout","calculateScaleRange","createView","getPropertyValue","resizeWatcher","contentWindow","resetLayout","initTemplates","domHelpers.toNode","$mouseEvents","edit","question","confirm_deleting","confirm_deleting_title","_simple_confirm","hideLightbox","visibleDate","_sort","posX","_getHorizontalScrollbar","codeScrollLeft","preserveScroll","new_pos","posY","gridCell","attachedScrollbar","verticalScrollbar","$view","setSizes","changeLightboxType","getLightboxType","_silent_redraw_lightbox","_get_link_type","from_start","to_start","isLinkAllowed","prevOffset","time_unit","helpers.getSecondsInUnit","offsetChanged","domHelpers.getClassName","icon_save","icon_cancel","icon_details","confirm_closing","section_description","section_time","section_type","section_deadline","section_baselines","column_wbs","column_text","column_start_date","column_duration","column_add","confirm_link_deleting","link_start","link_end","type_task","type_project","type_milestone","weeks","months","years","message_ok","message_cancel","section_constraint","asap","alap","snet","snlt","fnet","fnlt","mso","mfo","resources_filter_placeholder","resources_filter_label","baselines_section_placeholder","baselines_add_button","baselines_remove_button","baselines_remove_all_button","deadline_enable_button","deadline_disable_button","LocaleManager","addLocale","_locales","getLocale","DHXGantt","license","edit_save","edit_cancel","factory","supportedExtensions","extensionManager","ExtensionManager","activePlugins","plugin","getter","service","DOMParser","ActiveXObject","loadXML","parseFromString","tagname","responseXML","getElementsByTagName","xpathExp","docObj","selectNodes","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","_call","onLoad","getSync","put","postData","del","postSync","isQt","noCache","toUpperCase","RemoteEvents","copyDomEvent","pageX","pageY","DnD","_obj","_settings","inputMethods","getInputMethods","_drag_start_timer","clearDragTimer","eventParams","passive","accessor","timeStamp","original_target","original_element_sizes","domHelpers.getRelativeNodePosition","domHelpers.getClosestSizedElement","dragStart","touch_drag","traceDragEvents","inputMethod","mousemove","dragMove","dragScroll","limited_mousemove","started","updates_per_second","dndActive","cancelable","mousemoveContainer","mouseup","checkPositionChange","diff_x","diff_y","pow","sensitivity","initDnDMarker","backupEventTarget","getEvent","backup_element","touchEventsSupported","touches","elementFromPoint","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","getPosition","_prevent_touch_scroll","_touch_drag","_touch_feedback","targetTouches","templatesLoader","regTemplates","initial","template_name","gantt_save_btn","gantt_cancel_btn","gantt_delete_btn","c","progress_text","grid_header_class","task_class","task_end_date","grid_row_class","task_row_class","timeline_cell_content","scale_row_class","grid_indent","grid_folder","grid_file","grid_open","grid_blank","task_unscheduled_time","grid_date_format","link_class","link_description","drag_link","drag_link_class","tooltip_date_format","baseline_text","stateService","selected_task","deletedLinks","originalTask","checkLinkedTaskVisibility","sync_link","sourceTask","sync_link_delete","sync_links","mapEvents","conf","mapFrom","mapTo","sourceEvent","targetEvent","taskLinks","existingLink","sourceMatch","targetMatch","typeMatch","changedTask","oldState","sourceVisible","targetVisible","onItemLoading","onBeforeAdd","onAfterAdd","onBeforeUpdate","onAfterUpdate","onBeforeDelete","onAfterDelete","onIdChange","onBeforeItemMove","onAfterItemMove","onFilterItem","onItemOpen","onItemClose","onBeforeSelect","onAfterSelect","onAfterUnselect","modules","new_task_placeholder","getGridColumn","activate","_cached_functions","update_if_changed","critical_path_mode","wrap_methods","_prefetch_originals","prefetch","methodname","original","optimizer","argumentsArray","l","get_arguments_hash","cached_values","has_cached_value","get_cached_value","cache_value","arguments_hash","is_date","values","stringify_argument","deactivate","setup","override_gantt","gantt_methods","highlight_critical_path","deactivTimeout","_eventRemoveAll","resetLightbox","i18n","en","ar","be","ca","cn","cs","da","de","es","fa","fi","fr","he","hr","hu","it","jp","kr","nb","nl","no","pl","pt","ro","ru","si","sk","sv","tr","ua","setLocale","localeObject","boxAttribute","_dhx_msg_cfg","usercall","modalBox","modal_key","messageBox","keyboard","cancelBubble","modality","cover","onkeydown","messageButtonAttrString","getFirstDefined","_createBox","ok","cancel","contentId","messageModalAttr","inner","btn","onclick","hidden","innerWidth","innerHeight","alertPopup","confirmPopup","boxPopup","box_params","params","messageInfoAttr","insertBefore","timers","hideAll","popups","alert","confirm","modalbox","extendSettings","parentSettings","own","$extendedConfig","setPrototypeOf","configurable$1","parentView","parentConfig","parentTemplates","$getConfig","$getTemplates","uiFactory$1","views","createdViews","creator","configure","configurable","$parent","initUI","registerView","viewConstructor","createMouseHandler","eventHandlers","doubleclick","contextMenu","addEventTarget","onClick","findEventHandlers","callEventHandlers","onContextMenu","src","delegateHandlers","h","onDoubleClick","onMouseMove","_last_move_event","domEvents","delegate","elementHandlers","callHandler","mouseEvents","genericViewPortChecker","x_end","y_end","isLegacyRender","getRowRectangle","getVisibleTasksRange","indexStart","indexEnd","extraTasksIds","inlineEditorId","layerFactory","renderFactory","task_area_pulls","task_area_renderers","getRenderer","renderMethod","updateMethod","getRectangle","renderCallbackMethod","specializedViewPortChecker","basicGetRectangle","onrender","isInViewPort","layerView","viewConfig","rendererViewPort","useBuffer","remove_item","rendered","clear_container","basicGetRange","getVisibleRange","prepareData","buffer","createDocumentFragment","vis","itemsSearch","renderedItems","newElements","nodesToRemove","renderCalledFor","itemNode","restore","replace_item","item_id","newNode","replaceChild","clearRenderers","createGroup","relativeRoot","defaultFilters","initLayer","renderGroup","tempCollection","filters","_add","getLayer","pending","topmost","rel","mergeFilters","requestUpdate","eachLayer","removeLayer","filter_methods","filter_method","barRectangle","startCoord","endCoord","calculated","clearCache","rec","sourceBox","targetBox","initialized","visibleBoxes","isLinkInViewPort","sourceTop","sourceHeight","targetTop","targetHeight","sourceLeft","sourceRight","targetLeft","targetRight","$skipSmartRenderOnScroll","Cell","headerHeight","$domEvents","$name","$factory","_headerClickHandler","final","$preResize","topCont","topSize","getSize","maxWidth","minHeight","setSize","_hide","cellIndex","moveView","$toHTML","canCollapse","$fill","collapsed","size","gravity","getContentSize","$lastSize","contentX","contentY","_getBorderSizes","borders","horizontal","vertical","_currentBorders","_borders","_sizeHeader","_sizeContent","_setBorders","domHelpers.removeClassName","cssHash","domHelpers.addClassName","xLayout","transform","__extends","__","Layout","_super","_this","_parseConfig","domHelpers.removeNode","$cells","_resizeScrollbars","scrollbars","scrollChanged","visibleScrollbars","hiddenScrollbars","scrollbarsToHide","showScrollbar","scrollbar","hideScrollbar","shouldHide","shouldShow","visibleGroups","group","_syncCellSizes","groupName","newSize","groups","_eachChild","_syncGroupSize","cells","_xLayout","newSizeValue","isGravity","ownSize","resizeSibling","siblingSize","totalGravity","totalSize","mainGrid","grid_width","startStage","mainCall","_resizeInProgress","contentViews","setContentSize","_getAutosizeMode","$originalWidthStored","$originalWidth","$originalHeightStored","$originalHeight","isChild","cellId","sub","getCells","domHelpers.insertNode","domHelpers.getChildNodes","contentWidth","contentHeight","_cleanElSize","_getBoxStyles","computed","properties","boxSizing","clientHeight","MozBoxSizing","horPaddings","borderLeftWidth","borderRightWidth","vertPaddings","borderTopWidth","borderBottomWidth","borderBox","outerWidth","outerHeight","boxSizes","contentSizes","_sizes","margin","_calcFreeSpace","side","_free","_gravity","_calcSize","_configureBorders","borderClass","lastVisibleIndex","lastCell","borderColorClass","_updateCellVisibility","oldVisibleCells","_visibleCells","firstCall","visibleCells","parentVisibility","hide_empty","hideCell","cellView","marginSide","ViewLayout","$cell","byMaxSize","otherCell","ViewCell","childConfig","$initialized","unload","_setContentSize","outerX","outerY","childSize","ScrollbarCell","SCROLL_MODIFIER_KEYS","_scrollHorizontalHandler","_scrollVerticalHandler","_outerScrollVerticalHandler","_outerScrollHorizontalHandler","_mouseWheelHandler","scroll_size","_isHorizontal","eachCell","_isVertical","_initVertical","_initHorizontal","_initMouseWheel","_initLinkedViews","_getRootParent","_eachView","_getLinkedViews","$scroll_hor","$scroll_ver","_updateLinkedViews","scrollHorizontally","_scrolling","oldSize","scrollVertically","_wheel_time","_oldLeft","_getScrollSize","scrollSize","outerSize","isHorizontal","linked","scrollProperty","innerSizeProperty","outerProperty","_getScrollOffset","cellScrollSize","nonScrollableSize","outerScroll","innerScroll","visible","scrollSizes","_setScrollSize","toggleVisibility","_getScaleOffset","parentLayout","_oldTop","_checkWheelTarget","connectedViews","wheelSpeed","wheelSpeedConfig","wheel_scroll_sensitivity","ff","deltaX","wheelDeltaX","deltaY","wheelDelta","multiplier","deltaMode","wx","wy","horizontalScrollModifier","oldLeft","detail","oldTop","createMixin","getItemTopCache","getRowTopCache","getItemHeightCache","totalHeightCache","getItemHeightCacheState","quickPosition","cachedRowHeight","canUseSimpleCalc","_getRowHeight","_refreshState","rowStore","globalRowHeight","canUseSimpleCalculation","_resetTopPositionHeight","_resetHeight","getCacheStateTotalHeight","shouldClearHeightCache","all","itemIndex","_fillHeightCache","defaultHeight","globalHeight","itemHeightCache","sumHeight","getHeight","visibleItems","totalHeight","canvasRender","destroy","Timeline","_posFromDateCache","_timelineDragScroll","topPositionMixin","$task_scale","taskBg","$task_bg","$task_baselines","$task_links","$task_bars","$task_constraints","$task_deadlines","_tasks","linksAttr","bindLinks","item_attribute","layers","_createLayerConfig","linkLayers","_attachLayers","backgroundImage","data_els","scrollWidth","scrolled","_refreshScales","_scales","_getScaleChunkHtml","taskFilter","taskLayers","expose","taskBar","hide_bar","_taskLayers","_linkLayers","_bindStore","taskRenderer","bar_layer","_taskRenderer","_initStaticBackgroundRender","linkStore","linkRenderer","linkLayer","_linkRenderer","staticRender","_staticBgHandler","staticBgContainer","$task_bg_static","staticBackgroundHeight","_clearLayers","_render_tasks_scales","scales_html","outer_width","helpers","cfgs","fromPos","toPos","cssClass","tplClass","_prepareScaleHtml","globalConfig","globalTemplates","helpers.findBinary","cssclass","g","floatConfig","sticky","labelPosition","approxLabelWidth","labelPos","translateValue","getTimelineCellAttr","_getColumnDuration","wholeCells","partCell","roundPos","_getNextVisibleColumn","visibleDateIndex","_getPrevVisibleColumn","_getClosestVisibleColumn","dateIndex","visibleIndex","transition","xLeft","xRight","displayStart","displayEnd","isMilestoneRender","_timelineCacheAttached","_unbindStore","ScrollableGrid","_scrollOrder","getCurrentX","_dnd","_scrollView","attachEvents","isScrollable","gridBoundingRect","maxLeft","minLeft","currentX","autoscrollRight","autoscrollStart","autoscrollLeft","autoscrollStop","scrollStep","COLUMN_ID_ATTR_NAME","ColumnsGridDnd","_targetMarker","calculateCurrentPosition","eventX","DND","_scrollableGrid","_draggedCell","draggedColumn","draggedIndex","_gridConfig","outerHTML","lineHeight","_dragX","columnIndexes","findColumnsIndexes","targetColumn","cleanTargetMarker","setMarkerPosition","drawTargetMarker","reorderColumns","draggedId","xBefore","xAfter","currentColumn","startX","endX","columnRelativePos","compare","relativeX","getCorrection","gridOffset","nextPosition","Grid","$state","gridAriaAttr","gridAttrString","gridDataAriaAttr","gridDataAttrString","reorder_grid_columns","gridScaleRowAttrString","doOnRender","_renderHeaderResizers","_mouseDelegates","mouseEventContainer","resizerrow","_task_grid_row_resize","row_before_start","row_id","row_after_start","row_drag_move","dd","itemHeight","itemTop","pointerPosition","markerStartPosition","marker_height","minPointerPosition","row_drag_end","oldItemHeight","finalHeight","dnd_sensitivity","_addLayers","_initEvents","_columnDND","ColumnDnd","_validateColumnWidth","numericWidth","elasticColumns","_setColumnsWidth","columnProperty","newColumnWidth","columnsWidth","_getGridWidth","_gridCacheAttached","_initSmartRenderingPlaceholder","_calculateGridWidth","_renderGridHeader","getColumnIndex","excludeHidden","hiddenIndexShift","getColumn","gridLine","gridTaskRowResizer","_refreshPlaceholderOnStoreUpdate","$rowsPlaceholder","_getColumnWidth","min_width","new_width","max_width","_checkGridColumnMinWidthLimits","_getGridWidthLimits","min_limit","max_limit","newWidth","start_index","columns_width","final_width","extra_width","start_width","iterator","curExtra","_getColsTotalWidth","cols_width","v","parseFloat","unknown","gridWidth","delta","changed","lineHeigth","colWidth","gridScaleCellAttrString","defaultMapping","isChanged","save","onShow","preventKeyNav","shouldPrevent","editPrevCell","editNextCell","onHide","keyNavMappings","onBlurDelay","keyNav","activeCell","editorState","hasEditor","editorType","anyModifier","BaseFactory","BaseEditor","set_value","get_input","get_value","is_changed","currentValue","is_valid","textEditorFactory","TextEditor","numberEditorFactory","NumberEditor","oninput","selectEditorFactory","SelectEditor","optionsHtml","dateEditorFactory","html5DateFormat","dateToStr","strToDate","DateEditor","minValue","maxValue","predecessorEditorFactory","PredecessorEditor","getFormatter","formatter","parseInputString","predecessors","delimiter","formatPredecessors","formatLinkKey","getLinksDiff","predecessorCodes","selectedLinks","existingLinksSearch","linksToAdd","linkKey","linksToDelete","linksDiff","autoSchedule","inputPredecessors","taskPredecessors","durationEditorFactory","linkedPropertiesProcessor","decreaseStartDate","initConfigs","number","predecessor","keyboardMapping","mapping","setMapping","getMapping","eventBus","inlineEditController","createEditors","_createPlaceholder","inlineEditorAttr","updateTaskDateProperties","ganttHandlers","_itemId","_columnName","_editor","_editorType","_placeholder","setValue","editorConfig","getValue","_getItemValue","inline_editors_date_processing","_findEditableCell","nextColumn","getNextCell","getFirstCell","getLastCell","canChangeRow","moveRow","nextItem","editNextRow","skipReadonly","editPrevRow","isBarInViewport","createTaskRenderer","_task_default_render","controlsMargin","padd","milestoneHeight","milestoneWidth","done","pr","markerPos","textColor","basic","link_from_start","link_target_id","isCriticalTask","link_landing_area","from_id","link_to_start","dragClass","progressColor","u","setProperty","_get_link_crossing_css","marginStyle","_render_side_content","setTaskBarAttr","_render_pair","outer","showLinkPoints","cond","ln","tp","marginLeft","marginRight","defaultRenderer","createBaseBarRender","resourceHistogramRenderer","getVisibleCellsRange","firstCellIndex","lastCellIndex","isColumnVisible","cellLeftCoord","cellRightCoord","bgPlaceholder","placeholderConfig","lastTaskId","placeholderTask","calendar_id","createLinkRender","drawer","current_pos","dirs","path","point","get_lines","line_to","get_path","line","_get_line","get_wrapper_sizes","wrapper_size","get_line_sizes","line_size","link_line_width","render_line","innerPos","render_corner","corner","radius","lineWidth","cornerDiv","borderVertical","borderHorizontal","arrow","get_direction","vect","path_builder","point_to","get_points","get_endpoint","xy","e_y","e_x","lineType","get_line_type","forward","getMilestonePosition","splitParams","milestoneTask","siblingBaselines","shapes","lines","link_radius","arrowSize","nextLine","cornerX","cornerY","lastLine","arrowX","arrowY","shape","render_arrow","cssTemplate","isCriticalLink","linkAttr","createResourceTimelineBuilder","assignmentsPassed","timegrid","scaleUnit","scaleStep","precalculatedTimes","firstColumn","minScaleDate","currDate","cachedTimes","timetable","rowDnd","checkPlaceholderTask","getStore","initial_open_state","$transparent","lastTaskOfLevel","last_item","_getGridPos","gridHeight","maxBottom","_getTargetY","scrollPos","_getTaskByY","dropIndex","gridDataSizes","reorderMarkerAttr","containerSize","targetY","allowedLevel","over","nextId","dropTarget","createDropTargetObject","targetId","prevSibling","nextSiblingTarget","dndTaskId","prevSiblingTarget","firstChildTarget","lastChildTarget","findClosesTarget","targetLevel","findTargetAbove","findTargetBelow","getSameLevelDropPosition","relTargetPos","eventTop","targetAbove","targetBelow","gridToPageCoordinates","gridPos","setWidthWithinContainer","higlighter","removeLineHighlight","markerLine","highlightPosition","ePos","pointerEvents","markerFolder","folderHighlightWidth","linePos","indentNode","indent","iconWidth","childCount","markerLineTop","rowDndMarker","opacity","drop_target","getDropPosition","doctype","minTop","firstVisibleTaskIndex","firstVisibleTaskId","firstVisibleTaskPos","hiddenTaskPart","gridPosition","gridBottom","placeholderRowHeight","lockLevel","getLockedLevelTarget","initializer","onCreated","extendGantt","_inlineEditors","onInitialized","initEvents","extendDom","onDestroyed","clearEvents","showDate","sorting_method","totalWidth","taskDnD","createTaskDND","roundTaskDates","round_task_dates","dragMultiple","before_start","before_finish","after_finish","clear_drag_state","set_actions","drag_from_start","stage","_move","_resize","_resize_progress","on_mouse_move","on_mouse_down","on_mouse_up","start_x","start_y","coords_x","_drag_task_coords","minDurationInUnits","_calculateMinDuration","diffValue","_find_max_shift","dragItems","correctShift","minX","maxX","maxShift","minShift","multipleDragShift","new_start","new_end","obj_s_x","obj_e_x","_mouse_position_change","oldPos","newPos","_is_number","isFinite","start_drag","sX","sY","now","_start_dnd","_update_on_move","_update_item_on_move","curr_date","dragHash","_isMultiselect","dragProject","initialDrag","childDrag","_get_drag_mode","_fix_dnd_scale_time","fixStart","_fix_working_times","_finalize_mouse_up","_fireEvent","_dhx_changed","finalizingBulkMove","moveCount","doFinalize","dragProperty","selectedTasksIds","selectedTask","_addSubtasksToDragMultiple","trigger","drag_state","summaryId","initLinksDND","_link_landing","_link_target_task","_link_target_task_start","_link_source_task","_link_source_task_start","getDndState","link_edge_marker","link_landing_hover_area","markerSize","viewportSize","ganttOffsetY","updateMarkedHtml","resetDndState","showDirectingLine","s_x","s_y","_direction","getDirectionLine","link_direction_class","dist","tan","angle","atan","coordinateCircleQuarter","sin","cos","shiftLeft","shiftTop","eX","eY","_dir_start","landing","prevTarget","prevLanding","prevToStart","targ","absCoords","_dir_end","targetChanged","linkDnD","_linksDnD","_tasksDnD","MouseDelegates","_attachDomEvents","_attachStateProvider","_clearDomEvents","_clearStateProvider","_delete_link_handler","coll","coll_date","scale_step","getVerticalScrollbar","getHorizontalScrollbar","_legacyGridResizerClass","resizers","gridResizer","mainTimeline","colsWidth","hideGrid","grid_limits","ganttContainerWidth","verticalScrollbarWidth","gridOverflow","original_grid_width","skinSettings","skins","_initScrollStateEvents","_getVerticalScrollbar","_findGridResizer","gridFirst","_getSiblings","_behind","_front","resizeInfo","initialWidth","prevCellWidth","nextCellWidth","viewCell","limits","newBehindSize","newFrontSize","oldBackSize","oldFrontSize","newBackSize","ui$1","attachInitializer","uiFactory","Scrollbar","mainLayoutInitializer","mainTimelineInitializer","mainGridInitializer","ResourceGrid","ResourceTimeline","ResourceHistogram","layersEngine","createLayerFactory","previusSiblingContainer","defaultContainerSibling","addTaskLayer","rangeFunction","getVisibleTaskRange","_getTaskLayers","removeTaskLayer","addLinkLayer","getVisibleLinksRangeFactory","isLinkInViewport","_getLinkLayers","removeLinkLayer","gridEditorsFactory","layersApi","textValue","aria","gridAddButtonAttrString","justifyContent","center","gridCellAttrString","css_template","taskRowAttr","rowNode","cellNode","external_render","adapter","isElement","renderElement","renderedCells","isRendered","detachRenderedCell","getCellClassTemplate","getCellContentTemplate","renderOneCell","contentTemplate","cssTemplateContent","htmlTemplateContent","customCell","cellCssTemplate","cellHtmlTemplate","odd","placeholderTop","placeholderHeight","renderTaskBar","timedProjectBar","renderTimedProjectBar","taskRollupBar","renderedNodes","checkVisibility","generateChildElement","childCopy","$rendered_at","getKey","renderParentId","rollupKey","taskSplitBar","renderSplitTaskBar","taskConstraints","renderConstraints","taskDeadline","renderDeadline","renderBaselines","renderLink","resourceRow","getResourceLoad","resourceTimetable","renderedResourceLines","renderResourceLineCell","detachRenderedResourceLine","checkedColumns","resourceHistogram","resize_el","rowResizerAttr","layersService","_get_skin","themeVar","themeName","isCssVarTheme","href","_theme_info","theme","cssVarTheme","skinset","_second_column_width","_third_column_width","_lightbox_template","_redefine_lightbox_buttons","scrollRange","scrollDelay","scrollSpeed","isMove","delayTimeout","startPos","eventPos","isDisplayed","isScrollState","dragMarker","isResize","isLink","isClickDrag","defineDelayTimeout","speed","tick","autoscroll_delay","defineScrollInterval","autoscrollInterval","isScroll","gridDrag","need_scroll","currentScrollTop","scrollOuterHeight","scrollInnerHeight","currentScrollLeft","scrollOuterWidth","scrollInnerWidth","autoscroll_step","boxSize","$","jQuery","fn","dhx_gantt","each","newgantt","Gantt","getGanttInstance","jquery_hooks","dhtmlx","attaches","attachGantt","cmp","attachObject","dataType","dataObj","vs","av","border","gridId","gridObj","dhtmlXCellObject","dhtmlx_hooks","USE_KEY","_defaultScales","TimelineZoom","zoomIn","getCurrentLevel","setLevel","zoomOut","_levels","_activeLevelIndex","getLevels","zoomLevel","_getZoomIndexByName","levelName","_getVisibleDate","_visibleDate","cursorOffset","nextConfig","chartConfig","cursorDate","newPosition","middleDate","_attachWheelEvent","_useKey","_handler","_defaultHandler","timelineOffset","wheelUp","stopPropagation","_setScaleSettings","_setScaleDates","_initialStartDate","_initialEndDate","activeLevelIndex","_mapScales","levels","_minColumnWidth","minColumnWidth","_maxColumnWidth","maxColumnWidth","_widthStep","widthStep","_stepUp","_stepDown","nextLevel","addTouchEvents","platform","maxTouchPoints","_touch_events","getTaskDND","tasksDnD","touch_feedback","touch_feedback_duration","vibrate","touchHandlers","names","dblclicktime","actionMode","scrollMode","actionStart","longTapTimer","currentDndId","dndNodes","targetView","multiTouchEvents","newScrollState","block_action","allViews","_locate_css","taskNode","dummy","BaseControl","BaseConstrutor","htmlHelpers","getHtmlSelect","_attributes","getHtmlOption","_getHtmlContainer","getHtmlButton","getHtmlDiv","getHtmlLabel","getHtmlInput","_getHtmlAttributes","ResourcesControlConstructor","Super","SelectControl","sns","_dhx_onchange","onchange","_focus","ParentControlConstructor","ParentControl","_display","allow_root","root_label","form_blocks","tmpDom","newOptions","onselect","TemplateControl","TextareaControl","_get_input","TimeControl","getTimePicker","sectionClassName","_time_format_order","auto_end_date","_update_lightbox_select","_fill_lightbox_select","_resolve_default_mapping","selects","getTimePickerValue","autofix_end","_get_timepicker_step","SelectControlConstructor","CheckboxControl","single_value","checkboxes","checked","resArray","RadioControl","radio","default_value","DurationControl","_getStartDate","_getDuration","singleDate","lightboxDurationInputAttrString","durationInputClass","duration_val","inps","btns","endspan","_calc_date","_change_duration","charCode","ResourcesControl","ConstraintControl","isNonTimedConstraint","toggleTimeSelect","timeSelects","typeValue","isNonTimed","disabled","typeSelect","_eventsInitialized","constraintDate","constraintType","getConstraintType","TypeselectControl","typeKey","oldOnChange","_lightbox_current_type","BaselineControl","_generateBaselineRow","durationLabel","deleteLabel","durationEl","deleteButton","baselineRow","section","baselineNode","baselineId","dataset","updatedBaseline","button_click","_get_typed_lightbox_config","_lightbox_methods","_lightbox_root","showCover","_fill_lightbox","_setLbPosition","lightboxVisibleAttr","getLabel","list_name","_lightbox_type","lightboxDiv","fullWidth","ds","classNames","cspEnvironment","salesforceEnvironment","_lightbox","_is_lightbox_timepicker","wide_form","getHtmlButtons","lightboxAttr","onmousedown","_ready_to_dnd","ontouchstart","onselectstart","cursor","_init_dnd_events","show_cover","_cover","_render_sections","backup_overflow","labelBlock","inputBlock","inputId","_init_lightbox_events","block","_center_lightbox","rootElement","_move_while_dnd","_finish_dnd","_get_type_name","type_value","floatRight","lightboxButtonAttrString","getTimeFormat","time_format","getHtmlTimePickerOptions","start_year","end_year","tdate","timeFormat","year_range","_time_values","lightbox_events","_save_lightbox","_cancel_lightbox","sec","buttonTarget","getLightboxValues","time_optional","duration_optional","lightboxHiddenAttr","hideCover","_custom_lightbox","_set_lightbox_values","lightboxHeader","lightbox_header","getLightboxSection","get_template_control","control","get_select_control","get_textarea_control","get_time_control","_dnd_start_lb","gantt_unselectable","lb","_lb_start","ariaAttrs","limit_time_select","first_hour","last_hour","lightboxSelectAttrString","mapOffset","checkbox","constraint","typeselect","oldType","ui","codeHelpers.arrayFind","domEventScope","uiApi","getTimeline","getGrid","getBaseCell","baseCell","getAttachedScrollbar","DEFAULT_VALUE","tryCall","getTaskTop","getTaskBarHeight","domAttr","getLinkNode","oldH","oldV","verticalViews","horizontalViews","commonViews","viewId","newV","newH","date_x","scroll_to","leftPos","_scroll_state","timelineCell","x_pos","y_pos","x_inner","y_inner","scrollVer","scrollHor","horState","verState","cellName","horizontalScroll","verticalScroll","createLayoutFacade","resetSkin","monitorThemeChange","_addThemeClass","setSkin","monitorIntervalId","csstheme","skyblue","lightbox_additional_height","dark","meadow","terrace","broadway","_config_buttons_left","_config_buttons_right","material","indx","zoom","_extend_to_optional","lightbox_block","optional_time","update_block","button_text","htmlTags","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","_taskCommonAttr","linkTypes","toStart","fromStart","gridSeparatorAttr","buttonName","role","tabindex","headerText","time_option","buttonLabel","targetAttribute","_locateHTML","firstTask","domHelpers.getScrollSize","availablePlugins","critical_path","grouping","groupBy","overlay","_load_url","cl","_load_type"],"mappings":";;;;;;;;;;;AACA,SAASA,EAAgBC,GACxB;AAAA,MAAIC,IAAI,GAAGC,IAAK,GAAGC,IAAM,GAAGC,IAAO;AACnC,MAAIJ,EAAKK,uBAAuB;AAC/B,QAAIC,IAAMN,EAAKK,yBACXE,IAAOC,SAASD,MAChBE,IAAWD,SAASE,mBACvBF,SAASD,KAAKI,cACdH,SAASD,MAENK,IAAYC,OAAOC,eAAeL,EAAQG,aAAaL,EAAKK,WAC5DG,IAAaF,OAAOG,eAAeP,EAAQM,cAAcR,EAAKQ,YAC9DE,IAAYR,EAAQQ,aAAaV,EAAKU,aAAa,GACnDC,IAAaT,EAAQS,cAAcX,EAAKW,cAAc;AAC1DjB,QAAOK,EAAIL,MAAOW,IAAYK,GAC9Bf,IAAOI,EAAIJ,OAAOa,IAAaG,GAE/Bf,IAAQK,SAASD,KAAKY,cAAcb,EAAIH,OACxCC,IAASI,SAASD,KAAKa,eAAed,EAAIF;AAAAA,EAC5C,OAAQ;AACN,WAAMJ,IACLC,MAAYoB,SAASrB,EAAKsB,WAAU,EAAA,GACpCpB,KAAcmB,SAASrB,EAAKuB,YAAW,EAAA,GACvC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AAA;AAAAA,MACZ,GAAKA,IACL,CAAA;AAAA,IAAA;AAAA,EACA,EDfc8C,CAAAA,IAINA;AACR,EDd0C2hB;","x_google_ignoreList":[44]} \ No newline at end of file diff --git a/codebase/dhtmlxgantt.js b/codebase/dhtmlxgantt.js index 3e36591..b831ebf 100644 --- a/codebase/dhtmlxgantt.js +++ b/codebase/dhtmlxgantt.js @@ -1,7 +1,6 @@ -/* -@license +(function(yt,z){typeof exports=="object"&&typeof module<"u"?z(exports):typeof define=="function"&&define.amd?define(["exports"],z):z((yt=typeof globalThis<"u"?globalThis:yt||self).dhtmlxgantt={})})(this,function(yt){"use strict";/** @license -dhtmlxGantt v.8.0.11 Standard +dhtmlxGantt v.9.0.0 Standard This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects. @@ -9,38 +8,37 @@ To use dhtmlxGantt in non-GPL projects (and get Pro version of the product), ple (c) XB Software -*/ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("dhtmlxgantt",[],e):"object"==typeof exports?exports.dhtmlxgantt=e():t.dhtmlxgantt=e()}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/codebase/",n(n.s=301)}([function(t,e,n){function i(t){"@babel/helpers - typeof";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})(t)}var r,a=n(2),o={}.constructor.toString();t.exports={copy:function t(e){var n,r;if(e&&"object"==i(e))switch(!0){case a.isDate(e):r=new Date(e);break;case a.isArray(e):for(r=new Array(e.length),n=0;n=0}function a(t){return!{a:!0,area:!0}[t.nodeName.loLowerCase()]||!!t.getAttribute("href")}function o(t){return!{input:!0,select:!0,textarea:!0,button:!0,object:!0}[t.nodeName.toLowerCase()]||!t.hasAttribute("disabled")}function s(t){if(!t)return"";var e=t.className||"";return e.baseVal&&(e=e.baseVal),e.indexOf||(e=""),u(e)}var l;function c(t){var e;return t.tagName?e=t:(e=(t=t||window.event).target||t.srcElement).shadowRoot&&t.composedPath&&(e=t.composedPath()[0]),e}function u(t){return(String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")}).apply(t)}function d(){return document.head.createShadowRoot||document.head.attachShadow}function h(t){if(!t)return document.body;if(!d())return document.body;for(;t.parentNode&&(t=t.parentNode);)if(t instanceof ShadowRoot)return t.host;return document.body}t.exports={getNodePosition:n,getFocusableNodes:function(t){for(var e=t.querySelectorAll(["a[href]","area[href]","input","select","textarea","button","iframe","object","embed","[tabindex]","[contenteditable]"].join(", ")),n=Array.prototype.slice.call(e,0),s=0;s=0){if(!n)return i;var o=0===a||!u(r.charAt(a-1)),l=a+e.length>=r.length||!u(r.charAt(a+e.length));if(o&&l)return i}}i=i.parentNode}return null},locateAttribute:function(t,e){if(e){for(var n=c(t);n;){if(n.getAttribute&&n.getAttribute(e))return n;n=n.parentNode}return null}},getTargetNode:c,getRelativeEventPosition:function(t,e){var i=document.documentElement,r=n(e);return{x:t.clientX+i.scrollLeft-i.clientLeft-r.x+e.scrollLeft,y:t.clientY+i.scrollTop-i.clientTop-r.y+e.scrollTop}},isChildOf:function(t,e){if(!t||!e)return!1;for(;t&&t!=e;)t=t.parentNode;return t===e},hasClass:function(t,e){return"classList"in t?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)},closest:function(t,e){if(t.closest)return t.closest(e);if(t.matches||t.msMatchesSelector||t.webkitMatchesSelector){var n=t;if(!document.documentElement.contains(n))return null;do{if((n.matches||n.msMatchesSelector||n.webkitMatchesSelector).call(n,e))return n;n=n.parentElement||n.parentNode}while(null!==n&&1===n.nodeType);return null}return console.error("Your browser is not supported"),null},getRootNode:h,hasShadowParent:function(t){return!!h(t)},isShadowDomSupported:d,getActiveElement:function(){var t=document.activeElement;return t.shadowRoot&&(t=t.shadowRoot.activeElement),t===document.body&&document.getSelection&&(t=document.getSelection().focusNode||document.body),t}}},function(t,e){function n(t){"@babel/helpers - typeof";return(n="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})(t)}var i={second:1,minute:60,hour:3600,day:86400,week:604800,month:2592e3,quarter:7776e3,year:31536e3};function r(t){return!(!t||"object"!==n(t))&&!!(t.getFullYear&&t.getMonth&&t.getDate)}function a(t,e){var n=[];if(t.filter)return t.filter(e);for(var i=0;ie)){for(;+t[n]==+t[n+1];)n++;return n}if(!isNaN(r)&&r1)for(var n=1;n=0||navigator.userAgent.indexOf("Trident")>=0),isIE6:n&&!XMLHttpRequest&&navigator.userAgent.indexOf("MSIE")>=0,isIE7:n&&navigator.userAgent.indexOf("MSIE 7.0")>=0&&navigator.userAgent.indexOf("Trident")<0,isIE8:n&&navigator.userAgent.indexOf("MSIE 8.0")>=0&&navigator.userAgent.indexOf("Trident")>=0,isOpera:n&&navigator.userAgent.indexOf("Opera")>=0,isChrome:n&&navigator.userAgent.indexOf("Chrome")>=0,isKHTML:n&&(navigator.userAgent.indexOf("Safari")>=0||navigator.userAgent.indexOf("Konqueror")>=0),isFF:n&&navigator.userAgent.indexOf("Firefox")>=0,isIPad:n&&navigator.userAgent.search(/iPad/gi)>=0,isEdge:n&&-1!=navigator.userAgent.indexOf("Edge"),isNode:!n||"undefined"==typeof navigator};t.exports=i},function(t,e,n){"use strict";var i=n(23),r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=d;var a=n(17);a.inherits=n(8);var o=n(62),s=n(58);a.inherits(d,o);for(var l=r(s.prototype),c=0;c - * @license MIT - */ -var i=n(293),r=n(292),a=n(67);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function _(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return B(t).length;default:if(i)return F(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function p(t,e,n,i,r){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof e&&(e=l.from(e,i)),l.isBuffer(e))return 0===e.length?-1:v(t,e,n,i,r);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,i,r);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,i,r){var a,o=1,s=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,n/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(r){var u=-1;for(a=n;as&&(n=s-l),a=n;a>=0;a--){for(var d=!0,h=0;hr&&(i=r):i=r;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");i>a/2&&(i=a/2);for(var o=0;o>8,r=n%256,a.push(r),a.push(i);return a}(e,t.length-n),t,n,i)}function S(t,e,n){return 0===e&&n===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,n))}function T(t,e,n){n=Math.min(t.length,n);for(var i=[],r=e;r239?4:c>223?3:c>191?2:1;if(r+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(a=t[r+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=t[r+1],o=t[r+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=t[r+1],o=t[r+2],s=t[r+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u),r+=d}return function(t){var e=t.length;if(e<=$)return String.fromCharCode.apply(String,t);var n="",i=0;for(;ithis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,n);case"utf8":case"utf-8":return T(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return E(this,e,n);case"base64":return S(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}.apply(this,arguments)},l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},l.prototype.compare=function(t,e,n,i,r){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),e<0||n>t.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&e>=n)return 0;if(i>=r)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,r>>>=0,this===t)return 0;for(var a=r-i,o=n-e,s=Math.min(a,o),c=this.slice(i,r),u=t.slice(e,n),d=0;dr)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return m(this,t,e,n);case"utf8":case"utf-8":return y(this,t,e,n);case"ascii":return k(this,t,e,n);case"latin1":case"binary":return b(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;function C(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;ri)&&(n=i);for(var r="",a=e;an)throw new RangeError("Trying to access beyond buffer length")}function I(t,e,n,i,r,a){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||et.length)throw new RangeError("Index out of range")}function P(t,e,n,i){e<0&&(e=65535+e+1);for(var r=0,a=Math.min(t.length-n,2);r>>8*(i?r:1-r)}function N(t,e,n,i){e<0&&(e=4294967295+e+1);for(var r=0,a=Math.min(t.length-n,4);r>>8*(i?r:3-r)&255}function O(t,e,n,i,r,a){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,i,a){return a||O(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function R(t,e,n,i,a){return a||O(t,0,n,8),r.write(t,e,n,i,52,8),n+8}l.prototype.slice=function(t,e){var n,i=this.length;if(t=~~t,e=void 0===e?i:~~e,t<0?(t+=i)<0&&(t=0):t>i&&(t=i),e<0?(e+=i)<0&&(e=0):e>i&&(e=i),e0&&(r*=256);)i+=this[t+--e]*r;return i},l.prototype.readUInt8=function(t,e){return e||M(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||M(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||M(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=this[t],r=1,a=0;++a=(r*=128)&&(i-=Math.pow(2,8*e)),i},l.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=e,r=1,a=this[t+--i];i>0&&(r*=256);)a+=this[t+--i]*r;return a>=(r*=128)&&(a-=Math.pow(2,8*e)),a},l.prototype.readInt8=function(t,e){return e||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||M(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){e||M(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return e||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||M(t,4,this.length),r.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||M(t,4,this.length),r.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||M(t,8,this.length),r.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||M(t,8,this.length),r.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,i){(t=+t,e|=0,n|=0,i)||I(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,a=0;for(this[e]=255&t;++a=0&&(a*=256);)this[e+r]=t/a&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):N(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);I(this,t,e,n,r-1,-r)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+n},l.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);I(this,t,e,n,r-1,-r)}var a=n-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):N(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||I(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):N(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return R(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return R(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--r)t[r+e]=this[r+n];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(a=e;a55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&a.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&a.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function B(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,i){for(var r=0;r=e.length||r>=t.length);++r)e[r+n]=t[r];return r}}).call(this,n(4))},function(t,e,n){var i=n(0),r=n(5),a=n(1),o=function(){"use strict";function t(t,e,n,o){t&&(this.$container=a.toNode(t),this.$parent=t),this.$config=i.mixin(e,{headerHeight:33}),this.$gantt=o,this.$domEvents=o._createDomEventScope(),this.$id=e.id||"c"+i.uid(),this.$name="cell",this.$factory=n,r(this)}return t.prototype.destructor=function(){this.$parent=this.$container=this.$view=null,this.$gantt.$services.getService("mouseEvents").detach("click","gantt_header_arrow",this._headerClickHandler),this.$domEvents.detachAll(),this.callEvent("onDestroy",[]),this.detachAllEvents()},t.prototype.cell=function(t){return null},t.prototype.scrollTo=function(t,e){var n=this.$view;this.$config.html&&(n=this.$view.firstChild),1*t==t&&(n.scrollLeft=t),1*e==e&&(n.scrollTop=e)},t.prototype.clear=function(){this.getNode().innerHTML="",this.getNode().className="gantt_layout_content",this.getNode().style.padding="0"},t.prototype.resize=function(t){if(this.$parent)return this.$parent.resize(t);!1===t&&(this.$preResize=!0);var e=this.$container,n=e.offsetWidth,i=e.offsetHeight,r=this.getSize();e===document.body&&(n=document.body.offsetWidth,i=document.body.offsetHeight),nr.maxWidth&&(n=r.maxWidth),ir.maxHeight&&(i=r.maxHeight),this.setSize(n,i),this.$preResize,this.$preResize=!1},t.prototype.hide=function(){this._hide(!0),this.resize()},t.prototype.show=function(t){this._hide(!1),t&&this.$parent&&this.$parent.show(),this.resize()},t.prototype._hide=function(t){if(!0===t&&this.$view.parentNode)this.$view.parentNode.removeChild(this.$view);else if(!1===t&&!this.$view.parentNode){var e=this.$parent.cellIndex(this.$id);this.$parent.moveView(this,e)}this.$config.hidden=t},t.prototype.$toHTML=function(t,e){void 0===t&&(t=""),e=[e||"",this.$config.css||""].join(" ");var n=this.$config,i="";n.raw?t="string"==typeof n.raw?n.raw:"":(t||(t="
"+(n.html||"")+"
"),n.header&&(i="
"+(n.canCollapse?"
":"")+"
"+n.header+"
"));return"
"+i+t+"
"},t.prototype.$fill=function(t,e){this.$view=t,this.$parent=e,this.init()},t.prototype.getNode=function(){return this.$view.querySelector("gantt_layout_cell")||this.$view},t.prototype.init=function(){var t=this;this._headerClickHandler=function(e){a.locateAttribute(e,"data-cell-id")==t.$id&&t.toggle()},this.$gantt.$services.getService("mouseEvents").delegate("click","gantt_header_arrow",this._headerClickHandler),this.callEvent("onReady",[])},t.prototype.toggle=function(){this.$config.collapsed=!this.$config.collapsed,this.resize()},t.prototype.getSize=function(){var t={height:this.$config.height||0,width:this.$config.width||0,gravity:this.$config.gravity||1,minHeight:this.$config.minHeight||0,minWidth:this.$config.minWidth||0,maxHeight:this.$config.maxHeight||1e11,maxWidth:this.$config.maxWidth||1e11};if(this.$config.collapsed){var e="x"===this.$config.mode;t[e?"width":"height"]=t[e?"maxWidth":"maxHeight"]=this.$config.headerHeight}return t},t.prototype.getContentSize=function(){var t=this.$lastSize.contentX;t!==1*t&&(t=this.$lastSize.width);var e=this.$lastSize.contentY;return e!==1*e&&(e=this.$lastSize.height),{width:t,height:e}},t.prototype._getBorderSizes=function(){var t={top:0,right:0,bottom:0,left:0,horizontal:0,vertical:0};return this._currentBorders&&(this._currentBorders[this._borders.left]&&(t.left=1,t.horizontal++),this._currentBorders[this._borders.right]&&(t.right=1,t.horizontal++),this._currentBorders[this._borders.top]&&(t.top=1,t.vertical++),this._currentBorders[this._borders.bottom]&&(t.bottom=1,t.vertical++)),t},t.prototype.setSize=function(t,e){this.$view.style.width=t+"px",this.$view.style.height=e+"px";var n=this._getBorderSizes(),i=e-n.vertical,r=t-n.horizontal;this.$lastSize={x:t,y:e,contentX:r,contentY:i},this.$config.header?this._sizeHeader():this._sizeContent()},t.prototype._borders={left:"gantt_layout_cell_border_left",right:"gantt_layout_cell_border_right",top:"gantt_layout_cell_border_top",bottom:"gantt_layout_cell_border_bottom"},t.prototype._setBorders=function(t,e){e||(e=this);var n=e.$view;for(var i in this._borders)a.removeClassName(n,this._borders[i]);"string"==typeof t&&(t=[t]);var r={};for(i=0;i";return n+=r.getHtmlSelect(t.options,[{key:"style",value:"width:100%;"},{key:"title",value:t.name}]),n+=""},a.prototype.set_value=function(t,e,n,i){var r=t.firstChild;!r._dhx_onchange&&i.onchange&&(r.onchange=i.onchange,r._dhx_onchange=!0),void 0===e&&(e=(r.options[0]||{}).value),r.value=e||""},a.prototype.get_value=function(t){return t.firstChild.value},a.prototype.focus=function(e){var n=e.firstChild;t._focus(n,!0)},a}},function(t,e){t.exports=function(t,e,n,i,r){if(!t.start_date||!t.end_date)return null;var a=n.getItemTop(t.id),o=n.getItemHeight(t.id);if(a>e.y_end||a+oe.x_end||un.getBranchIndex(t)&&(i.targetIndex-=1),i},firstChildTarget:function(t,e,n){var i=this.createDropTargetObject();return i.targetId=e,i.targetParent=i.targetId,i.targetIndex=0,i.child=!0,i},lastChildTarget:function(t,e,n){var i=n.getChildren(e),r=this.createDropTargetObject();return r.targetId=i[i.length-1],r.targetParent=e,r.targetIndex=i.length,r.nextSibling=!0,r}}},function(t,e,n){var i=n(20);t.exports=function(t,e,n,r){var a=e.width[t];if(a<=0)return!1;if(!r.config.smart_rendering||i(r))return!0;var o=e.left[t]-a,s=e.left[t]+a;return o<=n.x_end&&s>=n.x}},function(t,e){t.exports=function(t,e){var n=0,i=t.left.length-1;if(e)for(var r=0;re.x_end){i=r;break}}return{start:n,end:i}}},function(t,e){t.exports=function(t,e,n){return{top:e.getItemTop(t.id),height:e.getItemHeight(t.id),left:0,right:1/0}}},function(t,e){t.exports=function(t){function e(e,a,o){if(!t._isAllowedUnscheduledTask(e)&&t._isTaskInTimelineLimits(e)){var s=a.getItemPosition(e),l=o,c=a.$getTemplates(),u=t.getTaskType(e.type),d=a.getBarHeight(e.id,u==l.types.milestone),h=0;u==l.types.milestone&&(h=(d-s.height)/2);var f=Math.floor((a.getItemHeight(e.id)-d)/2);u==l.types.milestone&&(s.left-=Math.round(d/2),s.width=d);var _=document.createElement("div"),g=Math.round(s.width);a.$config.item_attribute&&(_.setAttribute(a.$config.item_attribute,e.id),_.setAttribute(a.$config.bind+"_id",e.id)),l.show_progress&&u!=l.types.milestone&&function(e,n,i,r,a){var o=1*e.progress||0;i=Math.max(i-2,0);var s=document.createElement("div"),l=Math.round(i*o);l=Math.min(i,l),e.progressColor&&(s.style.backgroundColor=e.progressColor,s.style.opacity=1),s.style.width=l+"px",s.className="gantt_task_progress",s.innerHTML=a.progress_text(e.start_date,e.end_date,e),r.rtl&&(s.style.position="absolute",s.style.right="0px");var c=document.createElement("div");if(c.className="gantt_task_progress_wrapper",c.appendChild(s),n.appendChild(c),t.config.drag_progress&&!t.isReadonly(e)){var u=document.createElement("div"),d=l;r.rtl&&(d=i-l),u.style.left=d+"px",u.className="gantt_task_progress_drag",s.appendChild(u),n.appendChild(u)}}(e,_,g,l,c);var p=function(e,n,i){var r=document.createElement("div");return t.getTaskType(e.type)!=t.config.types.milestone?r.innerHTML=i.task_text(e.start_date,e.end_date,e):t.getTaskType(e.type)==t.config.types.milestone&&n&&(r.style.height=r.style.width=n+"px"),r.className="gantt_task_content",r}(e,g,c);e.textColor&&(p.style.color=e.textColor),_.appendChild(p);var v=function(e,n,i,r){var a=r.$getConfig(),o=[e];n&&o.push(n);var s=t.getState(),l=t.getTask(i);if(t.getTaskType(l.type)==a.types.milestone?o.push("gantt_milestone"):t.getTaskType(l.type)==a.types.project&&o.push("gantt_project"),o.push("gantt_bar_"+t.getTaskType(l.type)),t.isSummaryTask(l)&&o.push("gantt_dependent_task"),t.isSplitTask(l)&&(a.open_split_tasks&&!l.$open||!a.open_split_tasks)&&o.push("gantt_split_parent"),a.select_task&&t.isSelectedTask(i)&&o.push("gantt_selected"),i==s.drag_id&&(o.push("gantt_drag_"+s.drag_mode),s.touch_drag&&o.push("gantt_touch_"+s.drag_mode)),s.link_source_id==i&&o.push("gantt_link_source"),s.link_target_id==i&&o.push("gantt_link_target"),a.highlight_critical_path&&t.isCriticalTask&&t.isCriticalTask(l)&&o.push("gantt_critical_task"),s.link_landing_area&&s.link_target_id&&s.link_source_id&&s.link_target_id!=s.link_source_id&&(s.link_target_id==i||s.link_source_id==i)){var c=s.link_source_id,u=s.link_from_start,d=s.link_to_start,h=t.isLinkAllowed(c,i,u,d),f="";f=h?d?"link_start_allow":"link_finish_allow":d?"link_start_deny":"link_finish_deny",o.push(f)}return o.join(" ")}("gantt_task_line",c.task_class(e.start_date,e.end_date,e),e.id,a);(e.color||e.progressColor||e.textColor)&&(v+=" gantt_task_inline_color"),s.width<20&&(v+=" gantt_thin_task"),_.className=v;var m=["left:"+s.left+"px","top:"+(f+s.top)+"px","height:"+(u==l.types.milestone?s.height:d)+"px","line-height:"+Math.max(d<30?d-2:d,0)+"px","width:"+g+"px"];e.color&&m.push("background-color:"+e.color),e.textColor&&m.push("color:"+e.textColor),_.style.cssText=m.join(";");var y=function(t,e,r,a){var o="gantt_left "+i(!e.rtl,t),s=null;return a&&(s={type:"marginRight",value:a}),n(t,r.leftside_text,o,s)}(e,l,c,h);y&&_.appendChild(y),(y=function(t,e,r,a){var o="gantt_right "+i(!!e.rtl,t),s=null;return a&&(s={type:"marginLeft",value:a}),n(t,r.rightside_text,o,s)}(e,l,c,h))&&_.appendChild(y),t._waiAria.setTaskBarAttr(e,_);var k=t.getState();return t.isReadonly(e)||(l.drag_resize&&!t.isSummaryTask(e)&&u!=l.types.milestone&&r(_,"gantt_task_drag",e,function(t){var e=document.createElement("div");return e.className=t,e},l),l.drag_links&&l.show_links&&r(_,"gantt_link_control",e,function(t){var e=document.createElement("div");e.className=t,e.style.cssText=["height:"+d+"px","line-height:"+d+"px"].join(";");var n=document.createElement("div");n.className="gantt_link_point";var i=!1;return k.link_source_id&&l.touch&&(i=!0),n.style.display=i?"block":"",e.appendChild(n),e},l,h)),_}}function n(t,e,n,i){if(!e)return null;var r=e(t.start_date,t.end_date,t);if(!r)return null;var a=document.createElement("div");return a.className="gantt_side_content "+n,a.innerHTML=r,i&&(a.style[i.type]=Math.abs(i.value)+"px"),a}function i(e,n){var i=function(e){return e?{$source:[t.config.links.start_to_start],$target:[t.config.links.start_to_start,t.config.links.finish_to_start]}:{$source:[t.config.links.finish_to_start,t.config.links.finish_to_finish],$target:[t.config.links.finish_to_finish]}}(e);for(var r in i)for(var a=n[r],o=0;o=+l.min_date&&((s=r([n,a.rtl?"task_right":"task_left","task_start_date"].join(" "))).setAttribute("data-bind-property","start_date"),o&&(s.style.marginLeft=o+"px"),e.appendChild(s)),+i.end_date<=+l.max_date&&((s=r([n,a.rtl?"task_left":"task_right","task_end_date"].join(" "))).setAttribute("data-bind-property","end_date"),o&&(s.style.marginRight=o+"px"),e.appendChild(s))}return function(n,i,r){var a=(r=i.$getConfig()).type_renderers[t.getTaskType(n.type)],o=e;return a?a.call(t,n,function(e){return o.call(t,e,i,r)},i):o.call(t,n,i,r)}}},function(t,e,n){var i=n(33),r=n(5),a=n(0),o=n(2),s=n(43),l=n(131),c=function(t,e,n,o){this.$config=a.mixin({},e||{}),this.$scaleHelper=new i(o),this.$gantt=o,this._posFromDateCache={},this._timelineDragScroll=null,a.mixin(this,s(this)),r(this)};c.prototype={init:function(t){t.innerHTML+="
",this.$task=t.childNodes[0],this.$task.innerHTML="
",this.$task_scale=this.$task.childNodes[0],this.$task_data=this.$task.childNodes[1],this.$task_data.innerHTML="
",this.$task_bg=this.$task_data.childNodes[0],this.$task_links=this.$task_data.childNodes[1],this.$task_bars=this.$task_data.childNodes[2],this._tasks={col_width:0,width:[],full_width:0,trace_x:[],rendered:{}};var e=this.$getConfig(),n=e[this.$config.bind+"_attribute"],i=e[this.$config.bindLinks+"_attribute"];!n&&this.$config.bind&&(n="data-"+this.$config.bind+"-id"),!i&&this.$config.bindLinks&&(i="data-"+this.$config.bindLinks+"-id"),this.$config.item_attribute=n||null,this.$config.link_attribute=i||null;var r=this._createLayerConfig();this.$config.layers||(this.$config.layers=r.tasks),this.$config.linkLayers||(this.$config.linkLayers=r.links),this._attachLayers(this.$gantt),this.callEvent("onReady",[]),this.$gantt.ext.dragTimeline&&(this._timelineDragScroll=this.$gantt.ext.dragTimeline.create(),this._timelineDragScroll.attach(this))},setSize:function(t,e){var n=this.$getConfig();if(1*t===t&&(this.$config.width=t),1*e===e){this.$config.height=e;var i=Math.max(this.$config.height-n.scale_height);this.$task_data.style.height=i+"px"}this.refresh(),this.$task_bg.style.backgroundImage="",n.smart_rendering&&this.$config.rowStore?this.$task_bg.style.height=this.getTotalHeight()+"px":this.$task_bg.style.height="";for(var r=this._tasks,a=this.$task_data.childNodes,o=0,s=a.length;o'+this._prepareScaleHtml(t[a],e,n)+"")}return i.join("")},_prepareScaleHtml:function(t,e,n){var i=this.$getConfig(),r=this.$gantt.templates,a=[],s=null,l=null,c=t.format||t.template||t.date;"string"==typeof c&&(c=this.$gantt.date.date_to_str(c));var u=0,d=t.count;!i.smart_scales||isNaN(e)||isNaN(n)||(u=o.findBinary(t.left,e),d=o.findBinary(t.left,n)+1),l=t.css||function(){},!t.css&&i.inherit_scale_class&&(l=r.scale_cell_class);for(var h=u;h"+f+"";a.push(k)}}return a.join("")},dateFromPos:function(t){var e=this._tasks;if(t<0||t>e.full_width||!e.full_width)return null;var n=o.findBinary(this._tasks.left,t),i=this._tasks.left[n],r=e.width[n]||e.col_width,a=0;r&&(a=(t-i)/r,e.rtl&&(a=1-a));var s=0;return a&&(s=this._getColumnDuration(e,e.trace_x[n])),new Date(e.trace_x[n].valueOf()+Math.round(a*s))},posFromDate:function(t){if(!this.isVisible())return 0;if(!t)return 0;var e=String(t.valueOf());if(void 0!==this._posFromDateCache[e])return this._posFromDateCache[e];var n=this.columnIndexByDate(t);this.$gantt.assert(n>=0,"Invalid day index");var i=Math.floor(n),r=n%1,a=this._tasks.left[Math.min(i,this._tasks.width.length-1)];i==this._tasks.width.length&&(a+=this._tasks.width[this._tasks.width.length-1]),r&&(i=r.max_date)return this._tasks.rtl?0:n.length;var a=o.findBinary(n,e),s=this._getClosestVisibleColumn(a,n,i),l=n[s],c=this._tasks.trace_index_transition;if(!l)return c?c[0]:0;var u=(t-n[s])/this._getColumnDuration(this._tasks,n[s]);return c?c[s]+(1-u):s+u},getItemPosition:function(t,e,n){var i,r,a;return this._tasks.rtl?(r=this.posFromDate(e||t.start_date),i=this.posFromDate(n||t.end_date)):(i=this.posFromDate(e||t.start_date),r=this.posFromDate(n||t.end_date)),a=Math.max(r-i,0),{left:i,top:this.getItemTop(t.id),height:this.getBarHeight(t.id),width:a,rowHeight:this.getItemHeight(t.id)}},getBarHeight:function(t,e){var n=this.$getConfig(),i=this.$config.rowStore.getItem(t),r=i.task_height||i.bar_height||n.bar_height||n.task_height,a=this.getItemHeight(t);"full"==r&&(r=a-(n.task_height_offset||5));return r=Math.min(r,a),e&&(r=Math.round(r/Math.sqrt(2))),Math.max(r,0)},getScale:function(){return this._tasks},_getScales:function(){var t=this.$getConfig(),e=this.$scaleHelper,n=[e.primaryScale(t)].concat(e.getSubScales(t));return e.sortScales(n),n},_getColumnDuration:function(t,e){return this.$gantt.date.add(e,t.step,t.unit)-e},_bindStore:function(){if(this.$config.bind){var t=this.$gantt.getDatastore(this.$config.bind);if(this.$config.rowStore=t,t&&!t._timelineCacheAttached){var e=this;t._timelineCacheAttached=t.attachEvent("onBeforeFilter",function(){e._resetTopPositionHeight()})}}},_unbindStore:function(){if(this.$config.bind){var t=this.$gantt.getDatastore(this.$config.bind);t&&t._timelineCacheAttached&&(t.detachEvent(t._timelineCacheAttached),t._timelineCacheAttached=!1)}},refresh:function(){this._bindStore(),this.$config.bindLinks&&(this.$config.linkStore=this.$gantt.getDatastore(this.$config.bindLinks)),this._resetTopPositionHeight(),this._resetHeight(),this._initStaticBackgroundRender(),this._render_tasks_scales()},destructor:function(){var t=this.$gantt;this._clearLayers(t),this._unbindStore(),this.$task=null,this.$task_scale=null,this.$task_data=null,this.$task_bg=null,this.$task_links=null,this.$task_bars=null,this.$gantt=null,this.$config.rowStore&&(this.$config.rowStore.detachEvent(this._staticBgHandler),this.$config.rowStore=null),this.$config.linkStore&&(this.$config.linkStore=null),this._timelineDragScroll&&(this._timelineDragScroll.destructor(),this._timelineDragScroll=null),this.callEvent("onDestroy",[]),this.detachAllEvents()}},t.exports=c},function(t,e){t.exports=function(t,e,n){return{top:e.getItemTop(t.id),height:e.getItemHeight(t.id),left:0,right:1/0}}},function(t,e){t.exports=function(t){var e=[];return{delegate:function(n,i,r,a){e.push([n,i,r,a]),t.$services.getService("mouseEvents").delegate(n,i,r,a)},destructor:function(){for(var n=t.$services.getService("mouseEvents"),i=0;i",this.$grid=t.childNodes[0],this.$grid.innerHTML="
",this.$grid_scale=this.$grid.childNodes[0],this.$grid_data=this.$grid.childNodes[1];var u=a[this.$config.bind+"_attribute"];if(!u&&this.$config.bind&&(u="data-"+this.$config.bind+"-id"),this.$config.item_attribute=u||null,!this.$config.layers){var d=this._createLayerConfig();this.$config.layers=d}var h=o(e,this);h.init(),this._renderHeaderResizers=h.doOnRender,this._mouseDelegates=n(31)(e),l(e,this).init(),this._addLayers(this.$gantt),this._initEvents(),s&&(this._columnDND=new c(e,this),this._columnDND.init()),this.callEvent("onReady",[])},_validateColumnWidth:function(t,e){var n=t[e];if(n&&"*"!=n){var i=this.$gantt,r=1*n;isNaN(r)?i.assert(!1,"Wrong "+e+" value of column "+t.name):t[e]=r}},setSize:function(t,e){this.$config.width=this.$state.width=t,this.$config.height=this.$state.height=e;for(var n,i=this.getGridColumns(),r=0,a=(d=this.$getConfig()).grid_elastic_columns,o=0,s=i.length;ou.max_width&&(d=u.max_width-u.width),r-=u.width,u.width+=d,l-=d}for(var h=l>0?1:-1;l>0&&1===h||l<0&&-1===h;){var f=l;for(o=e+1;o-1&&((_=i[e].width+l)==this._getColumnWidth(i[e],n,_)&&(i[e].width=_));return this._getColsTotalWidth()},_getColsTotalWidth:function(){for(var t=this.getGridColumns(),e=0,n=0;no+h&&(d.width=h=f-o),o+=h;var _=t._sort&&d.name==t._sort.name?'
'):"",g=["gantt_grid_head_cell","gantt_grid_head_"+d.name,u?"gantt_last_cell":"",i.grid_header_class(d.name,d)].join(" "),p="width:"+(h-(u?1:0))+"px;",v=d.label||s["column_"+d.name]||s[d.name];v=v||"";var m="
"+v+_+"
";a.push(m)}this.$grid_scale.style.height=e.scale_height+"px",this.$grid_scale.style.lineHeight=l+"px",this.$grid_scale.innerHTML=a.join(""),this._renderHeaderResizers&&this._renderHeaderResizers()},_getGridWidth:function(){return this.$config.width},destructor:function(){this._clearLayers(this.$gantt),this._mouseDelegates&&(this._mouseDelegates.destructor(),this._mouseDelegates=null),this._unbindStore(),this.$grid=null,this.$grid_scale=null,this.$grid_data=null,this.$gantt=null,this.$config.rowStore&&(this.$config.rowStore.detachEvent(this._staticBgHandler),this.$config.rowStore=null),this.callEvent("onDestroy",[]),this.detachAllEvents()}},t.exports=u},function(t,e,n){var i=n(0);t.exports=function(t){var e=t.date,n=t.$services;return{getSum:function(t,e,n){void 0===n&&(n=t.length-1),void 0===e&&(e=0);for(var i=0,r=e;r<=n;r++)i+=t[r];return i},setSumWidth:function(t,e,n,i){var r=e.width;void 0===i&&(i=r.length-1),void 0===n&&(n=0);var a=i-n+1;if(!(n>r.length-1||a<=0||i>r.length-1)){var o=t-this.getSum(r,n,i);this.adjustSize(o,r,n,i),this.adjustSize(-o,r,i+1),e.full_width=this.getSum(r)}},splitSize:function(t,e){for(var n=[],i=0;in(e.unit,e.step)?-1:0});for(var i=0;i=0;u--){var d=u==t.length-1,h=this.initScaleConfig(t[u],r,a);d&&this.processIgnores(h),this.initColSizes(h,e,l,s[u]),this.limitVisibleRange(h),d&&(l=h.full_width),c.unshift(h)}for(u=0;u=+l&&(l=e.add(c,i,n));+c<+l;){o.call(this,new Date(c));var u=c.getTimezoneOffset();c=e.add(c,i,n),c=t._correct_dst_change(c,u,i,n),e[n+"_start"]&&(c=e[n+"_start"](c))}},limitVisibleRange:function(t){var n=t.trace_x,i=t.width.length-1,r=0;if(+n[0]<+t.min_date&&0!=i){var a=Math.floor(t.width[0]*((n[1]-t.min_date)/(n[1]-n[0])));r+=t.width[0]-a,t.width[0]=a,n[0]=new Date(t.min_date)}var o=n.length-1,s=n[o],l=e.add(s,t.step,t.unit);if(+l>+t.max_date&&o>0&&(a=t.width[o]-Math.floor(t.width[o]*((l-t.max_date)/(l-s))),r+=t.width[o]-a,t.width[o]=a),r){for(var c=this.getSum(t.width),u=0,d=0;d"}};function a(t,e,n){return e=e||[],"<"+t+o(n||[])+">"+(e.innerHTML||"")+""}function o(t){var e="";return i.forEach(t,function(t){e+=" "+t.key+"='"+t.value+"'"}),e}t.exports=r},function(t,e,n){var i=n(2);t.exports=function(t){var e={};return t.$data.tasksStore.attachEvent("onStoreUpdated",function(){e={}}),function(n,r,a,o){var s=n.id+"_"+r+"_"+a.unit+"_"+a.step;return e[s]?e[s]:e[s]=function(e,n,r,a){var o,s=!1,l={};t.config.process_resource_assignments&&n===t.config.resource_property?(o="task"==e.$role?t.getResourceAssignments(e.$resource_id,e.$task_id):t.getResourceAssignments(e.id),s=!0):o="task"==e.$role?[]:t.getTaskBy(n,e.id),l=function(e,n,r){for(var a=n.unit,o=n.step,s={},l={},c=0;c0?t[o].$parent.getNextSibling(t[o].$id):t[o].$parent.getPrevSibling(t[o].$id);"resizer"==l.$name&&(l=i>0?l.$parent.getNextSibling(l.$id):l.$parent.getPrevSibling(l.$id));var c=l.getSize();if(a)t[o].$config.gravity=r;else if(l[n]){var u=s.gravity+c.gravity,d=s[n]+c[n],h=u/d;t[o].$config.gravity=h*r,l.$config[n]=d-r,l.$config.gravity=u-h*r}else t[o].$config[n]=r;var f=this.$gantt.$ui.getView("grid");!f||t[o].$content!==f||f.$config.scrollable||a||(this.$gantt.config.grid_width=r)}},e.prototype.resize=function(e){var n=!1;if(this.$root&&!this._resizeInProgress&&(this.callEvent("onBeforeResize",[]),n=!0,this._resizeInProgress=!0),t.prototype.resize.call(this,!0),t.prototype.resize.call(this,!1),n){var i=[];i=(i=(i=i.concat(this.getCellsByType("viewCell"))).concat(this.getCellsByType("viewLayout"))).concat(this.getCellsByType("hostCell"));for(var r=this.getCellsByType("scroller"),a=0;a=0&&this.$cells[e+1]?this.$cells[e+1]:null},e.prototype.getPrevSibling=function(t){var e=this.cellIndex(t);return e>=0&&this.$cells[e-1]?this.$cells[e-1]:null},e.prototype.cell=function(t){for(var e=0;e=n.childNodes.length?n.appendChild(t.$view):n.insertBefore(t.$view,n.childNodes[e])},e.prototype._parseConfig=function(t){this.$cells=[],this._xLayout=!t.rows;for(var e=t.rows||t.cols||t.views,n=0;n=0;i--){var a=this.$cells[i];a.$fill(n[i],this),a.$config.hidden&&a.$view.parentNode.removeChild(a.$view)}},e.prototype.$toHTML=function(){for(var e=this._xLayout?"x":"y",n=[],i=0;i=1e5&&(c.maxWidth=i),c.maxHeight>=1e5&&(c.maxHeight=a),c.minWidth=c.minWidth!=c.minWidth?0:c.minWidth,c.minHeight=c.minHeight!=c.minHeight?0:c.minHeight,this._xLayout?(c.minWidth+=this.$config.margin*this.$cells.length||0,c.minWidth+=2*this.$config.padding||0,c.minHeight+=2*this.$config.padding||0):(c.minHeight+=this.$config.margin*this.$cells.length||0,c.minHeight+=2*this.$config.padding||0),c},e.prototype._calcFreeSpace=function(t,e,n){var i=n?e.minWidth:e.minHeight,r=e.maxWidth,a=t;return a?(a>r&&(a=r),ar&&(a=r,this._free-=a,this._gravity-=e.gravity),aa&&(i=a),i=0;i--)if(!e[i].$config.hidden){n=i;break}for(i=0;i=n,a="";!r&&e[i+1]&&"scrollbar"==e[i+1].$config.view&&(this._xLayout?r=!0:a="gantt_layout_cell_border_transparent"),this._setBorders(r?[]:[t,a],e[i])}},e.prototype._updateCellVisibility=function(){for(var t=this._visibleCells||{},e=!this._visibleCells,n={},i=null,r=[],a=0;as+l&&e.y>c+u)return!1;if(e.y_endh){var g=h;h=d,d=g}if(f>_){g=_;_=f,f=g}return d+=-100,h+=100,f+=-100,_+=100,!(e.x>h&&e.x>_)&&!(e.x_endc.x&&f.topc.y&&u.push(h.id)}return{ids:u}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(199),r=n(198),a=n(197);e.LargerUnitsCache=a.LargerUnitsCache,e.createCacheObject=function(){return"undefined"!=typeof Map?new i.WorkUnitsMapCache:new r.WorkUnitsObjectCache}},function(t,e,n){var i=n(0),r=n(2);function a(t,e,n,i,r){return this.date=t,this.unit=e,this.task=n,this.id=i,this.calendar=r,this}function o(t,e,n,i,r,a){return this.date=t,this.dir=e,this.unit=n,this.task=i,this.id=r,this.calendar=a,this}function s(t,e,n,i,r,a,o){return this.start_date=t,this.duration=e,this.unit=n,this.step=i,this.task=r,this.id=a,this.calendar=o,this}function l(t,e,n,i){return this.start_date=t,this.end_date=e,this.task=n,this.calendar=i,this.unit=null,this.step=null,this}t.exports=function(t){return{getWorkHoursArguments:function(){var e=arguments[0];if(e=r.isDate(e)?{date:e}:i.mixin({},e),!r.isValidDate(e.date))throw t.assert(!1,"Invalid date argument for getWorkHours method"),new Error("Invalid date argument for getWorkHours method");return e},setWorkTimeArguments:function(){return arguments[0]},unsetWorkTimeArguments:function(){return arguments[0]},isWorkTimeArguments:function(){var e,n=arguments[0];if(n instanceof a)return n;if((e=n.date?new a(n.date,n.unit,n.task,null,n.calendar):new a(arguments[0],arguments[1],arguments[2],null,arguments[3])).unit=e.unit||t.config.duration_unit,!r.isValidDate(e.date))throw t.assert(!1,"Invalid date argument for isWorkTime method"),new Error("Invalid date argument for isWorkTime method");return e},getClosestWorkTimeArguments:function(e){var n,i=arguments[0];if(i instanceof o)return i;if(n=r.isDate(i)?new o(i):new o(i.date,i.dir,i.unit,i.task,null,i.calendar),i.id&&(n.task=i),n.dir=i.dir||"any",n.unit=i.unit||t.config.duration_unit,!r.isValidDate(n.date))throw t.assert(!1,"Invalid date argument for getClosestWorkTime method"),new Error("Invalid date argument for getClosestWorkTime method");return n},_getStartEndConfig:function(e){var n,i=l;if(e instanceof i)return e;if(r.isDate(e)?n=new i(arguments[0],arguments[1],arguments[2],arguments[3]):(n=new i(e.start_date,e.end_date,e.task),null!==e.id&&void 0!==e.id&&(n.task=e)),n.unit=n.unit||t.config.duration_unit,n.step=n.step||t.config.duration_step,n.start_date=n.start_date||n.start||n.date,!r.isValidDate(n.start_date))throw t.assert(!1,"Invalid start_date argument for getDuration method"),new Error("Invalid start_date argument for getDuration method");if(!r.isValidDate(n.end_date))throw t.assert(!1,"Invalid end_date argument for getDuration method"),new Error("Invalid end_date argument for getDuration method");return n},getDurationArguments:function(t,e,n,i){return this._getStartEndConfig.apply(this,arguments)},hasDurationArguments:function(t,e,n,i){return this._getStartEndConfig.apply(this,arguments)},calculateEndDateArguments:function(e,n,i,a){var o,l=arguments[0];if(l instanceof s)return l;if(o=r.isDate(l)?new s(arguments[0],arguments[1],arguments[2],void 0,arguments[3],void 0,arguments[4]):new s(l.start_date,l.duration,l.unit,l.step,l.task,null,l.calendar),null!==l.id&&void 0!==l.id&&(o.task=l,o.unit=null,o.step=null),o.unit=o.unit||t.config.duration_unit,o.step=o.step||t.config.duration_step,!r.isValidDate(o.start_date))throw t.assert(!1,"Invalid start_date argument for calculateEndDate method"),new Error("Invalid start_date argument for calculateEndDate method");return o}}}},function(t,e,n){var i=n(211);t.exports=function(t){var e={},n={},r=null,a=-1,o=null,s=i(t);return{_resetTopPositionHeight:function(){e={},n={},s.resetCache()},_resetHeight:function(){var t=this.$config.rowStore,e=this.getCacheStateTotalHeight(t);o?this.shouldClearHeightCache(o,e)&&(o=e,r=null):o=e,a=-1,s.resetCache()},getRowTop:function(t){if(s.canUseSimpleCalculation())return s.getRowTop(t);var e=this.$config.rowStore;if(!e)return 0;if(void 0!==n[t])return n[t];for(var i=e.getIndexRange(),r=0,a=0,o=0;o=i&&t=n.$level)return!1;for(;n&&this.exists(i);){if((n=this.getItem(i))&&n.id==e)return!0;i=this.getParent(n)}return!1},getSiblings:function(t){if(!this.exists(t))return i.$create();var e=this.getParent(t);return this.getChildren(e)},getNextSibling:function(t){for(var e=this.getSiblings(t),n=0,i=e.length;n0&&(r="0"),r||null}return null},getPrevSibling:function(t){for(var e=this.getSiblings(t),n=0,i=e.length;n0&&(r="0"),r||null}return null},getParent:function(t){var e=null;return(e=void 0!==t.id?t:this.getItem(t))?e[this.$parentProperty]:this.$getRootId()},clearAll:function(){this._branches={},o.prototype.clearAll.call(this)},calculateItemLevel:function(t){var e=0;return this.eachParent(function(){e++},t),e},_setParentInner:function(t,e,n){n||(t.hasOwnProperty("$rendered_parent")?this._move_branch(t,t.$rendered_parent,e):this._move_branch(t,t[this.$parentProperty],e))},setParent:function(t,e,n){this._setParentInner(t,e,n),t[this.$parentProperty]=e},_eachItemCached:function(t,e){for(var n=0,i=e.length;n=0;s--)i.push(o[s])}},eachItem:function(t,e){var n=this.$getRootId();r.defined(e)||(e=n);var i=l(e,n)||n,a=!1,o=!1,s=null;i===n&&(this._eachItemMainRangeCache?(a=!0,s=this._eachItemMainRangeCache):(o=!0,s=this._eachItemMainRangeCache=[])),a?this._eachItemCached(t,s):this._eachItemIterate(t,i,o?s:null)},eachParent:function(t,e){for(var n={},i=e,r=this.getParent(i);this.exists(r);){if(n[r])throw new Error("Invalid tasks tree. Cyclic reference has been detected on task "+r);n[r]=!0,i=this.getItem(r),t.call(this,i),r=this.getParent(i)}},_add_branch:function(t,e,n){var r=void 0===n?this.getParent(t):n;this.hasChild(r)||(this._branches[r]=i.$create());var a=this.getChildren(r);a.indexOf(t.id+"")>-1||a.indexOf(+t.id)>-1||(1*e==e?a.splice(e,0,t.id):a.push(t.id),t.$rendered_parent=r)},_move_branch:function(t,e,n){this._eachItemMainRangeCache=null,this._replace_branch_child(e,t.id),this.exists(n)||n==this.$getRootId()?this._add_branch(t,void 0,n):delete this._branches[t.id],t.$level=this.calculateItemLevel(t),this.eachItem(function(t){t.$level=this.calculateItemLevel(t)},t.id)},_replace_branch_child:function(t,e,n){var r=this.getChildren(t);if(r&&void 0!==t){var a=i.$create(),o=r.indexOf(e+"");-1!=o||isNaN(+e)||(o=r.indexOf(+e)),o>-1&&(n?r.splice(o,1,n):r.splice(o,1)),a=r,this._branches[t]=a}},sort:function(t,e,n){this.exists(n)||(n=this.$getRootId()),t||(t="order");var i="string"==typeof t?function(e,n){return e[t]==n[t]||a.isDate(e[t])&&a.isDate(n[t])&&e[t].valueOf()==n[t].valueOf()?0:e[t]>n[t]?1:-1}:t;if(e){var r=i;i=function(t,e){return r(e,t)}}var o=this.getChildren(n);if(o){for(var s=[],l=o.length-1;l>=0;l--)s[l]=this.getItem(o[l]);s.sort(i);for(l=0;l=0&&this.splice(t,e||1)},$remove:function(t){this.$removeAt(this.$find(t))},$insertAt:function(t,e){if(e||0===e){var n=this.splice(e,this.length-e);this[e]=t,this.push.apply(this,n)}else this.push(t)},$find:function(t){for(var e=0;ei&&(e=Math.min(n.length,e))}this.pull[t.id]=t,this.isSilent()||this._updateOrder(function(){-1===this.$find(t.id)&&this.$insertAt(t.id,e)}),this.filter()},isVisible:function(t){return this.visibleOrder.$find(t)>-1},getVisibleItems:function(){return this.getIndexRange()},addItem:function(t,e){return r.defined(t.id)||(t.id=r.uid()),this.$initItem&&(t=this.$initItem(t)),!(!this.isSilent()&&!1===this.callEvent("onBeforeAdd",[t.id,t]))&&(this._addItemInner(t,e),this.isSilent()||(this.callEvent("onAfterAdd",[t.id,t]),this.callEvent("onStoreUpdated",[t.id,t,"add"])),t.id)},_changeIdInner:function(t,e){this.pull[t]&&(this.pull[e]=this.pull[t]);var n=this._searchVisibleOrder[t];this.pull[e].id=e,this._updateOrder(function(){this[this.$find(t)]=e}),this._searchVisibleOrder[e]=n,delete this._searchVisibleOrder[t],delete this.pull[t]},changeId:function(t,e){this._changeIdInner(t,e),this.callEvent("onIdChange",[t,e])},exists:function(t){return!!this.pull[t]},_moveInner:function(t,e){var n=this.getIdByIndex(t);this._updateOrder(function(){this.$removeAt(t),this.$insertAt(n,Math.min(this.length,e))})},move:function(t,e){var n=this.getIdByIndex(t),i=this.getItem(n);this._moveInner(t,e),this.isSilent()||this.callEvent("onStoreUpdated",[i.id,i,"move"])},clearAll:function(){this.$destroyed||(this.silent(function(){this.unselect()}),this.pull={},this.visibleOrder=i.$create(),this.fullOrder=i.$create(),this.isSilent()||(this.callEvent("onClearAll",[]),this.refresh()))},silent:function(t,e){var n=!1;this.isSilent()&&(n=!0),this._skip_refresh=!0,t.call(e||this),n||(this._skip_refresh=!1)},isSilent:function(){return!!this._skip_refresh},arraysEqual:function(t,e){if(t.length!==e.length)return!1;for(var n=0;n",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(u),h=["%","/","?",";","#"].concat(d),f=["/","?","#"],_=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(277);function k(t,e,n){if(t&&a.isObject(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,n),i}o.prototype.parse=function(t,e,n){if(!a.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+i(t));var o=t.indexOf("?"),l=-1!==o&&o127?N+="x":N+=P[O];if(!N.match(_)){var R=M.slice(0,E),j=M.slice(E+1),H=P.match(g);H&&(R.push(H[1]),j.unshift(H[2])),j.length&&(k="/"+j.join(".")+k),this.hostname=R.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=r.toASCII(this.hostname));var F=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+F,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==k[0]&&(k="/"+k))}if(!p[w])for(E=0,I=d.length;E0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift());return n.search=t.search,n.query=t.query,a.isNull(n.pathname)&&a.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var T=w.slice(-1)[0],$=(n.host||t.host||w.length>1)&&("."===T||".."===T)||""===T,C=0,E=w.length;E>=0;E--)"."===(T=w[E])?w.splice(E,1):".."===T?(w.splice(E,1),C++):C&&(w.splice(E,1),C--);if(!b&&!x)for(;C--;C)w.unshift("..");!b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),$&&"/"!==w.join("/").substr(-1)&&w.push("");var A,D=""===w[0]||w[0]&&"/"===w[0].charAt(0);S&&(n.hostname=n.host=D?"":w.length?w.shift():"",(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift()));return(b=b||n.host&&w.length)&&!D&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),a.isNull(n.pathname)&&a.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=l.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){"use strict";t.exports=a;var i=n(12),r=n(17);function a(t){if(!(this instanceof a))return new a(t);i.call(this,t),this._transformState={afterTransform:function(t,e){var n=this._transformState;n.transforming=!1;var i=n.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),i(t);var r=this._readableState;r.reading=!1,(r.needReadable||r.length>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var i=n.charCodeAt(n.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function u(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function d(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return r>0&&(t.lastNeed=r-1),r;if(--i=0)return r>0&&(t.lastNeed=r-2),r;if(--i=0)return r>0&&(2===r?r=0:t.lastNeed=r-3),r;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var i=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){(function(t){var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,r=Function.prototype.apply;function a(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new a(r.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new a(r.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n(286),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(4))},function(t,e,n){"use strict";(function(e,i,r){var a=n(23);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var i=t.entry;t.entry=null;for(;i;){var r=i.callback;e.pendingcb--,r(n),i=i.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=m;var s,l=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?i:a.nextTick;m.WritableState=v;var c=n(17);c.inherits=n(8);var u={deprecate:n(285)},d=n(60),h=n(22).Buffer,f=r.Uint8Array||function(){};var _,g=n(59);function p(){}function v(t,e){s=s||n(12),t=t||{};var i=e instanceof s;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var r=t.highWaterMark,c=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i&&(c||0===c)?c:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===t.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,i=n.sync,r=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,i,r){--e.pendingcb,n?(a.nextTick(r,i),a.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(r(i),t._writableState.errorEmitted=!0,t.emit("error",i),S(t,e))}(t,n,i,e,r);else{var o=x(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||b(t,n),i?l(k,t,n,o,r):k(t,n,o,r)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function m(t){if(s=s||n(12),!(_.call(m,this)||this instanceof s))return new m(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),d.call(this)}function y(t,e,n,i,r,a,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,n?t._writev(r,e.onwrite):t._write(r,a,e.onwrite),e.sync=!1}function k(t,e,n,i){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),S(t,e)}function b(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var i=e.bufferedRequestCount,r=new Array(i),a=e.corkedRequestsFree;a.entry=n;for(var s=0,l=!0;n;)r[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;r.allBuffers=l,y(t,e,!0,e.length,r,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,d=n.callback;if(y(t,e,!1,e.objectMode?1:c.length,c,u,d),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function x(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function w(t,e){t._final(function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),S(t,e)})}function S(t,e){var n=x(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,a.nextTick(w,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}c.inherits(m,d),v.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(v.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(t){return!!_.call(this,t)||this===m&&(t&&t._writableState instanceof v)}})):_=function(t){return t instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(t,e,n){var i=this._writableState,r=!1,o=!i.objectMode&&function(t){return h.isBuffer(t)||t instanceof f}(t);return o&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(n=e,e=null),o?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=p),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),a.nextTick(e,n)}(this,n):(o||function(t,e,n,i){var r=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),a.nextTick(i,o),r=!1),r}(this,i,t,n))&&(i.pendingcb++,r=function(t,e,n,i,r,a){if(!n){var o=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,n));return e}(e,i,r);i!==o&&(n=!0,r="buffer",i=o)}var s=e.objectMode?1:i.length;e.length+=s;var l=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(t,e,n){var i=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,e,n){e.ending=!0,S(t,e),n&&(e.finished?a.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),m.prototype.destroy=g.destroy,m.prototype._undestroy=g.undestroy,m.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(9),n(57).setImmediate,n(4))},function(t,e,n){"use strict";var i=n(23);function r(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||i.nextTick(r,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(i.nextTick(r,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){t.exports=n(61).EventEmitter},function(t,e){function n(t){"@babel/helpers - typeof";return(n="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})(t)}function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function a(t){return"object"===n(t)&&null!==t}function o(t){return void 0===t}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(t){if(!function(t){return"number"==typeof t}(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},i.prototype.emit=function(t){var e,n,i,s,l,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var u=new Error('Uncaught, unspecified "error" event. ('+e+")");throw u.context=e,u}if(o(n=this._events[t]))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),i=(c=n.slice()).length,l=0;l0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(t,e){if(!r(e))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(t,i),n||(n=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},i.prototype.removeListener=function(t,e){var n,i,o,s;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(o=(n=this._events[t]).length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(a(n)){for(s=o;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},i.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[t]))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},i.prototype.listeners=function(t){return this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},i.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},i.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){"use strict";(function(e,i){var r=n(23);t.exports=y;var a,o=n(67);y.ReadableState=m;n(61).EventEmitter;var s=function(t,e){return t.listeners(e).length},l=n(60),c=n(22).Buffer,u=e.Uint8Array||function(){};var d=n(17);d.inherits=n(8);var h=n(289),f=void 0;f=h&&h.debuglog?h.debuglog("stream"):function(){};var _,g=n(288),p=n(59);d.inherits(y,l);var v=["error","close","destroy","pause","resume"];function m(t,e){a=a||n(12),t=t||{};var i=e instanceof a;this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,o=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(_||(_=n(56).StringDecoder),this.decoder=new _(t.encoding),this.encoding=t.encoding)}function y(t){if(a=a||n(12),!(this instanceof y))return new y(t);this._readableState=new m(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),l.call(this)}function k(t,e,n,i,r){var a,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,S(t)}(t,o)):(r||(a=function(t,e){var n;(function(t){return c.isBuffer(t)||t instanceof u})(e)||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(o,e)),a?t.emit("error",a):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),i?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):b(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(e=o.decoder.write(e),o.objectMode||0!==e.length?b(t,o,e,!1):$(t,o)):b(t,o,e,!1))):i||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=x?t=x:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(f("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?r.nextTick(T,t):T(t))}function T(t){f("emit readable"),t.emit("readable"),D(t)}function $(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(C,t,e))}function C(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var i;ta.length?a.length:t;if(o===a.length?r+=a:r+=a.slice(0,t),0===(t-=o)){o===a.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=a.slice(o));break}++i}return e.length-=i,r}(t,e):function(t,e){var n=c.allocUnsafe(t),i=e.head,r=1;i.data.copy(n),t-=i.data.length;for(;i=i.next;){var a=i.data,o=t>a.length?a.length:t;if(a.copy(n,n.length-t,0,o),0===(t-=o)){o===a.length?(++r,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=a.slice(o));break}++r}return e.length-=r,n}(t,e);return i}(t,e.buffer,e.decoder),n);var n}function I(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,r.nextTick(P,e,t))}function P(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function N(t,e){for(var n=0,i=t.length;n=e.highWaterMark||e.ended))return f("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?I(this):S(this),null;if(0===(t=w(t,e))&&e.ended)return 0===e.length&&I(this),null;var i,r=e.needReadable;return f("need readable",r),(0===e.length||e.length-t0?M(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&I(this)),null!==i&&this.emit("data",i),i},y.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(t,e){var n=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,f("pipe count=%d opts=%j",a.pipesCount,e);var l=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?u:y;function c(e,i){f("onunpipe"),e===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,f("cleanup"),t.removeListener("close",v),t.removeListener("finish",m),t.removeListener("drain",d),t.removeListener("error",p),t.removeListener("unpipe",c),n.removeListener("end",u),n.removeListener("end",y),n.removeListener("data",g),h=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||d())}function u(){f("onend"),t.end()}a.endEmitted?r.nextTick(l):n.once("end",l),t.on("unpipe",c);var d=function(t){return function(){var e=t._readableState;f("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,D(t))}}(n);t.on("drain",d);var h=!1;var _=!1;function g(e){f("ondata"),_=!1,!1!==t.write(e)||_||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==N(a.pipes,t))&&!h&&(f("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,_=!0),n.pause())}function p(e){f("onerror",e),y(),t.removeListener("error",p),0===s(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",m),y()}function m(){f("onfinish"),t.removeListener("close",v),y()}function y(){f("unpipe"),n.unpipe(t)}return n.on("data",g),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?o(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",p),t.once("close",v),t.once("finish",m),t.emit("pipe",n),a.flowing||(f("pipe resume"),n.resume()),t},y.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var i=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;at._pos){var a=n.substr(t._pos);if("x-user-defined"===t._charset){for(var o=new r(a.length),s=0;st._pos&&(t.push(new r(new Uint8Array(c.result.slice(t._pos)))),t._pos=c.result.byteLength)},c.onload=function(){t.push(null)},c.readAsArrayBuffer(n)}t._xhr.readyState===l.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,n(9),n(4),n(13).Buffer)},function(t,e,n){(function(t){e.fetch=s(t.fetch)&&s(t.ReadableStream),e.writableStream=s(t.WritableStream),e.abortController=s(t.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch(t){}var n;function i(){if(void 0!==n)return n;if(t.XMLHttpRequest){n=new t.XMLHttpRequest;try{n.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(t){n=null}}else n=null;return n}function r(t){var e=i();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}var a=void 0!==t.ArrayBuffer,o=a&&s(t.ArrayBuffer.prototype.slice);function s(t){return"function"==typeof t}e.arraybuffer=e.fetch||a&&r("arraybuffer"),e.msstream=!e.fetch&&o&&r("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&a&&r("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!i()&&s(i().overrideMimeType),e.vbArray=s(t.VBArray),n=null}).call(this,n(4))},function(t,e,n){(function(t){var i=n(290),r=n(64),a=n(282),o=n(281),s=n(54),l=e;l.request=function(e,n){e="string"==typeof e?s.parse(e):a(e);var r=-1===t.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||r,l=e.hostname||e.host,c=e.port,u=e.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),e.url=(l?o+"//"+l:"")+(c?":"+c:"")+u,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new i(e);return n&&d.on("response",n),d},l.get=function(t,e){var n=l.request(t,e);return n.end(),n},l.ClientRequest=i,l.IncomingMessage=r.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=o,l.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,n(4))},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){t.exports=function(t){var e=n(47),i={};t.attachEvent("onClearAll",function(){i={}});var r=e.prototype.hasChild;t.$data.tasksStore.hasChild=function(e){return t.config.branch_loading?!!r.call(this,e)||!!this.exists(e)&&this.getItem(e)[t.config.branch_loading_property]:r.call(this,e)},t.attachEvent("onTaskOpened",function(e){if(t.config.branch_loading&&t._load_url&&function(e){return!(!t.config.branch_loading||!t._load_url||i[e]||t.getChildren(e).length||!t.hasChild(e))}(e)){var n=t._load_url,r=(n=n.replace(/(\?|&)?parent_id=.+&?/,"")).indexOf("?")>=0?"&":"?",a=t.getScrollState().y||0,o={taskId:e,url:n+r+"parent_id="+encodeURIComponent(e)};if(!1===t.callEvent("onBeforeBranchLoading",[o]))return;t.load(o.url,this._load_type,function(){a&&t.scrollTo(null,a),t.callEvent("onAfterBranchLoading",[o])}),i[e]=!0}})}},function(t,e){t.exports=function(t){t.load=function(e,n,i){this._load_url=e,this.assert(arguments.length,"Invalid load arguments");var r="json",a=null;return arguments.length>=3?(r=n,a=i):"string"==typeof arguments[1]?r=arguments[1]:"function"==typeof arguments[1]&&(a=arguments[1]),this._load_type=r,this.callEvent("onLoadStart",[e,r]),this.ajax.get(e,t.bind(function(t){this.on_load(t,r),this.callEvent("onLoadEnd",[e,r]),"function"==typeof a&&a.call(this)},this))}}},function(t,e){t.exports=function(t){var e=new RegExp("<(?:.|\n)*?>","gm"),n=new RegExp(" +","gm");function i(t){return(t+"").replace(e," ").replace(n," ")}var r=new RegExp("'","gm");function a(t){return(t+"").replace(r,"'")}for(var o in t._waiAria={getAttributeString:function(t){var e=[" "];for(var n in t){var r=a(i(t[n]));e.push(n+"='"+r+"'")}return e.push(" "),e.join(" ")},getTimelineCellAttr:function(e){return t._waiAria.getAttributeString({"aria-label":e})},_taskCommonAttr:function(e,n){e.start_date&&e.end_date&&(n.setAttribute("aria-label",i(t.templates.tooltip_text(e.start_date,e.end_date,e))),e.$dataprocessor_class&&n.setAttribute("aria-busy",!0))},setTaskBarAttr:function(e,n){this._taskCommonAttr(e,n),n.setAttribute("role","img"),!t.isReadonly(e)&&t.config.drag_move&&(e.id!=t.getState("tasksDnd").drag_id?n.setAttribute("aria-grabbed",!1):n.setAttribute("aria-grabbed",!0))},taskRowAttr:function(e,n){this._taskCommonAttr(e,n),!t.isReadonly(e)&&t.config.order_branch&&n.setAttribute("aria-grabbed",!1),n.setAttribute("role","row"),n.setAttribute("aria-selected",t.isSelectedTask(e.id)?"true":"false"),n.setAttribute("aria-level",e.$level+1||1),t.hasChild(e.id)&&n.setAttribute("aria-expanded",e.$open?"true":"false")},linkAttr:function(e,n){var r=t.config.links,a=e.type==r.finish_to_start||e.type==r.start_to_start,o=e.type==r.start_to_start||e.type==r.start_to_finish,s=t.locale.labels.link+" "+t.templates.drag_link(e.source,o,e.target,a);n.setAttribute("role","img"),n.setAttribute("aria-label",i(s)),t.isReadonly(e)&&n.setAttribute("aria-readonly",!0)},gridSeparatorAttr:function(t){t.setAttribute("role","columnheader")},rowResizerAttr:function(t){t.setAttribute("role","row")},lightboxHiddenAttr:function(t){t.setAttribute("aria-hidden","true")},lightboxVisibleAttr:function(t){t.setAttribute("aria-hidden","false")},lightboxAttr:function(t){t.setAttribute("role","dialog"),t.setAttribute("aria-hidden","true"),t.firstChild.setAttribute("role","heading"),t.firstChild.setAttribute("aria-level","1")},lightboxButtonAttrString:function(e){return this.getAttributeString({role:"button","aria-label":t.locale.labels[e],tabindex:"0"})},lightboxHeader:function(t,e){t.setAttribute("aria-label",e)},lightboxSelectAttrString:function(e){var n="";switch(e){case"%Y":n=t.locale.labels.years;break;case"%m":n=t.locale.labels.months;break;case"%d":n=t.locale.labels.days;break;case"%H:%i":n=t.locale.labels.hours+t.locale.labels.minutes}return t._waiAria.getAttributeString({"aria-label":n})},lightboxDurationInputAttrString:function(e){return this.getAttributeString({"aria-label":t.locale.labels.column_duration,"aria-valuemin":"0",role:"spinbutton"})},inlineEditorAttr:function(t){t.setAttribute("role","row")},gridAttrString:function(){return[" role='treegrid'",t.config.multiselect?"aria-multiselectable='true'":"aria-multiselectable='false'"," "].join(" ")},gridScaleRowAttrString:function(){return"role='row'"},gridScaleCellAttrString:function(e,n){var i="";if("add"==e.name)i=this.getAttributeString({role:"columnheader","aria-label":t.locale.labels.new_task});else{var r={role:"columnheader","aria-label":n};t._sort&&t._sort.name==e.name&&("asc"==t._sort.direction?r["aria-sort"]="ascending":r["aria-sort"]="descending"),i=this.getAttributeString(r)}return i},gridDataAttrString:function(){return"role='rowgroup'"},reorderMarkerAttr:function(t){t.setAttribute("role","grid"),t.firstChild.removeAttribute("aria-level"),t.firstChild.setAttribute("aria-grabbed","true")},gridCellAttrString:function(e,n,i){var r={role:"gridcell","aria-label":n};return e.editor&&!t.isReadonly(i)||(r["aria-readonly"]=!0),this.getAttributeString(r)},gridAddButtonAttrString:function(e){return this.getAttributeString({role:"button","aria-label":t.locale.labels.new_task})},messageButtonAttrString:function(t){return"tabindex='0' role='button' aria-label='"+t+"'"},messageInfoAttr:function(t){t.setAttribute("role","alert")},messageModalAttr:function(t,e){t.setAttribute("role","dialog"),e&&t.setAttribute("aria-labelledby",e)},quickInfoAttr:function(t){t.setAttribute("role","dialog")},quickInfoHeaderAttrString:function(){return" role='heading' aria-level='1' "},quickInfoHeader:function(t,e){t.setAttribute("aria-label",e)},quickInfoButtonAttrString:function(e){return t._waiAria.getAttributeString({role:"button","aria-label":e,tabindex:"0"})},tooltipAttr:function(t){t.setAttribute("role","tooltip")},tooltipVisibleAttr:function(t){t.setAttribute("aria-hidden","false")},tooltipHiddenAttr:function(t){t.setAttribute("aria-hidden","true")}},t._waiAria)t._waiAria[o]=function(e){return function(){return t.config.wai_aria_attributes?e.apply(this,arguments):""}}(t._waiAria[o])}},function(t,e){t.exports=function(t){t._extend_to_optional=function(e){var n=e,i={render:n.render,focus:n.focus,set_value:function(e,r,a,o){var s=t._resolve_default_mapping(o);if(!a[s.start_date]||"start_date"==s.start_date&&this._isAllowedUnscheduledTask(a)){i.disable(e,o);var l={};for(var c in s)l[s[c]]=a[c];return n.set_value.call(t,e,r,l,o)}return i.enable(e,o),n.set_value.call(t,e,r,a,o)},get_value:function(e,i,r){return r.disabled?{start_date:null}:n.get_value.call(t,e,i,r)},update_block:function(e,n){if(t.callEvent("onSectionToggle",[t._lightbox_id,n]),e.style.display=n.disabled?"none":"block",n.button){var i=e.previousSibling.querySelector(".gantt_custom_button_label"),r=t.locale.labels,a=n.disabled?r[n.name+"_enable_button"]:r[n.name+"_disable_button"];i.innerHTML=a}t.resizeLightbox()},disable:function(t,e){e.disabled=!0,i.update_block(t,e)},enable:function(t,e){e.disabled=!1,i.update_block(t,e)},button_click:function(e,n,r,a){if(!1!==t.callEvent("onSectionButton",[t._lightbox_id,r])){var o=t._get_typed_lightbox_config()[e];o.disabled?i.enable(a,o):i.disable(a,o)}}};return i},t.form_blocks.duration_optional=t._extend_to_optional(t.form_blocks.duration),t.form_blocks.time_optional=t._extend_to_optional(t.form_blocks.time)}},function(t,e,n){var i=n(3);t.exports=function(t){var e=n(18)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(n){var i=t.config.types,r=t.locale.labels,a=[],o=n.filter||function(t,e){return!i.placeholder||e!==i.placeholder};for(var s in i)!1==!o(s,i[s])&&a.push({key:i[s],label:r["type_"+s]});n.options=a;var l=n.onchange;return n.onchange=function(){t._lightbox_current_type=this.value,t.changeLightboxType(this.value),"function"==typeof l&&l.apply(this,arguments)},e.prototype.render.apply(this,arguments)},r}},function(t,e,n){var i=n(3),r=n(36);t.exports=function(t){var e=n(7)(t);function a(){return e.apply(this,arguments)||this}function o(e){return!e||e===t.config.constraint_types.ASAP||e===t.config.constraint_types.ALAP}function s(t,e){for(var n=o(e),i=0;i",a=[];for(var o in t.config.constraint_types)a.push({key:t.config.constraint_types[o],label:t.locale.labels[t.config.constraint_types[o]]});return e.options=e.options||a,i+=""+r.getHtmlSelect(e.options,[{key:"data-type",value:"constraint-type"}])+"",i+="",i+=""},a.prototype.set_value=function(e,n,i,r){var a=e.querySelector("[data-constraint-type-select] select"),o=e.querySelectorAll("[data-constraint-time-select] select"),l=r._time_format_order,c=t._resolve_default_mapping(r);a._eventsInitialized||(a.addEventListener("change",function(t){s(o,t.target.value)}),a._eventsInitialized=!0);var u=i[c.constraint_date]||new Date;t.form_blocks._fill_lightbox_select(o,0,u,l,r);var d=i[c.constraint_type]||t.getConstraintType(i);a.value=d,s(o,d)},a.prototype.get_value=function(e,n,i){var r=e.querySelector("[data-constraint-type-select] select"),a=e.querySelectorAll("[data-constraint-time-select] select"),s=r.value,l=null;return o(s)||(l=t.form_blocks.getTimePickerValue(a,i)),{constraint_type:s,constraint_date:l}},a.prototype.focus=function(e){t._focus(e.querySelector("select"))},a}},function(t,e,n){var i=n(3);t.exports=function(t){var e=n(18)(t);function r(){return e.apply(this,arguments)||this}function a(e,n){var i=[],r=[];n&&(i=t.getTaskByTime(),e.allow_root&&i.unshift({id:t.config.root_id,text:e.root_label||""}),i=function(e,n,i){var r=n.filter||function(){return!0};e=e.slice(0);for(var a=0;a",i=" "+t.locale.labels[t.config.duration_unit+"s"]+" ",r=e.single_date?" style='display:none'":"",a=e.readonly?" disabled='disabled'":"",o=t._waiAria.lightboxDurationInputAttrString(e),s="gantt_duration_value";e.formatter&&(i="",s+=" gantt_duration_value_formatted");var l="
"+i+"
",c="gantt_section_time";return"time"!==e.name&&(c+=" gantt_section_"+e.name),"
"+n+" "+l+"
"},a.prototype.set_value=function(e,n,i,r){var a,c,u,d,h=e.getElementsByTagName("select"),f=e.getElementsByTagName("input"),_=f[1],g=[f[0],f[2]],p=e.getElementsByTagName("span")[0],v=r._time_format_order;function m(){var n=s.call(t,e,r),a=l.call(t,e,r),o=t.calculateEndDate({start_date:n,duration:a,task:i}),c=t.templates.task_end_date||t.templates.task_date;p.innerHTML=c(o)}function y(t){var e=_.value;e=o(r).parse(e),window.isNaN(e)&&(e=0),(e+=t)<1&&(e=1),_.value=o(r).format(e),m()}g[0].onclick=t.bind(function(){y(-1*t.config.duration_step)},this),g[1].onclick=t.bind(function(){y(1*t.config.duration_step)},this),h[0].onchange=m,h[1].onchange=m,h[2].onchange=m,h[3]&&(h[3].onchange=m),_.onkeydown=t.bind(function(e){var n;return(n=(e=e||window.event).charCode||e.keyCode||e.which)==t.constants.KEY_CODES.DOWN?(y(-1*t.config.duration_step),!1):n==t.constants.KEY_CODES.UP?(y(1*t.config.duration_step),!1):void window.setTimeout(m,1)},this),_.onchange=t.bind(m,this),"string"==typeof(a=t._resolve_default_mapping(r))&&(a={start_date:a}),c=i[a.start_date]||new Date,u=i[a.end_date]||t.calculateEndDate({start_date:c,duration:1,task:i}),d=Math.round(i[a.duration])||t.calculateDuration({start_date:c,end_date:u,task:i}),d=o(r).format(d),t.form_blocks._fill_lightbox_select(h,0,c,v,r),_.value=d,m()},a.prototype.get_value=function(e,n,i){var r=s(e,i),a=l(e,i),o=t.calculateEndDate({start_date:r,duration:a,task:n});return"string"==typeof t._resolve_default_mapping(i)?r:{start_date:r,end_date:o,duration:a}},a.prototype.focus=function(e){t._focus(e.getElementsByTagName("select")[0])},a}},function(t,e,n){var i=n(3);t.exports=function(t){var e=n(7)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(t){var e=(t.height||"23")+"px",n="
";if(t.options&&t.options.length)for(var i=0;i"+t.options[i].label+"";return n+="
"},r.prototype.set_value=function(t,e,n,i){var r;i.options&&i.options.length&&(r=t.querySelector("input[type=radio][value='"+e+"']")||t.querySelector("input[type=radio][value='"+i.default_value+"']"))&&(!t._dhx_onchange&&i.onchange&&(t.onchange=i.onchange,t._dhx_onchange=!0),r.checked=!0)},r.prototype.get_value=function(t,e){var n=t.querySelector("input[type=radio]:checked");return n?n.value:""},r.prototype.focus=function(e){t._focus(e.querySelector("input[type=radio]"))},r}},function(t,e,n){var i=n(2),r=n(3);t.exports=function(t){var e=n(7)(t);function a(){return e.apply(this,arguments)||this}return r(a,e),a.prototype.render=function(t){var e=(t.height||"23")+"px",n="
";if(t.options&&t.options.length)for(var i=0;i"+t.options[i].label+"";else t.single_value=!0,n+="";return n+="
"},a.prototype.set_value=function(t,e,n,r){var a=Array.prototype.slice.call(t.querySelectorAll("input[type=checkbox]"));(!t._dhx_onchange&&r.onchange&&(t.onchange=r.onchange,t._dhx_onchange=!0),r.single_value)?a[0].checked=!!e:i.forEach(a,function(t){t.checked=!!e&&e.indexOf(t.value)>=0})},a.prototype.get_value=function(t,e,n){return n.single_value?t.querySelector("input[type=checkbox]").checked:i.arrayMap(Array.prototype.slice.call(t.querySelectorAll("input[type=checkbox]:checked")),function(t){return t.value})},a.prototype.focus=function(e){t._focus(e.querySelector("input[type=checkbox]"))},a}},function(t,e,n){var i=n(3);t.exports=function(t){var e=n(7)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(e){var n=t.form_blocks.getTimePicker.call(this,e),i="gantt_section_time";"time"!==e.name&&(i+=" gantt_section_"+e.name);var r="
";return r+=n,e.single_date?(n=t.form_blocks.getTimePicker.call(this,e,!0),r+=""):r+="  –  ",r+=n,r+="
"},r.prototype.set_value=function(e,n,i,r){var a=r,o=e.getElementsByTagName("select"),s=r._time_format_order;if(a.auto_end_date)for(var l=function(){d=new Date(o[s[2]].value,o[s[1]].value,o[s[0]].value,0,0),h=t.calculateEndDate({start_date:d,duration:1,task:i}),t.form_blocks._fill_lightbox_select(o,s.size,h,s,a)},c=0;c<4;c++)o[c].onchange=l;var u=t._resolve_default_mapping(r);"string"==typeof u&&(u={start_date:u});var d=i[u.start_date]||new Date,h=i[u.end_date]||t.calculateEndDate({start_date:d,duration:1,task:i});t.form_blocks._fill_lightbox_select(o,0,d,s,a),t.form_blocks._fill_lightbox_select(o,s.size,h,s,a)},r.prototype.get_value=function(e,n,i){var r,a=e.getElementsByTagName("select"),o=i._time_format_order;return r=t.form_blocks.getTimePickerValue(a,i),"string"==typeof t._resolve_default_mapping(i)?r:{start_date:r,end_date:function(e,n,r){var a=t.form_blocks.getTimePickerValue(e,i,n.size);return a<=r&&(!1!==i.autofix_end||i.single_date)?t.date.add(r,t._get_timepicker_step(),"minute"):a}(a,o,r)}},r.prototype.focus=function(e){t._focus(e.getElementsByTagName("select")[0])},r}},function(t,e,n){var i=n(3);t.exports=function(t){var e=n(7)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(t){var e=(t.height||"130")+"px";return"
"},r.prototype.set_value=function(e,n){t.form_blocks.textarea._get_input(e).value=n||""},r.prototype.get_value=function(e){return t.form_blocks.textarea._get_input(e).value},r.prototype.focus=function(e){var n=t.form_blocks.textarea._get_input(e);t._focus(n,!0)},r.prototype._get_input=function(t){return t.querySelector("textarea")},r}},function(t,e,n){var i=n(3);t.exports=function(t){var e=n(7)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(t){var e=(t.height||"30")+"px";return"
"},r.prototype.set_value=function(t,e){t.innerHTML=e||""},r.prototype.get_value=function(t){return t.innerHTML||""},r.prototype.focus=function(){},r}},function(t,e,n){function i(t){"@babel/helpers - typeof";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})(t)}t.exports=function(t){var e=n(1),r=n(2),a=n(80)(t),o=n(79)(t),s=n(78)(t),l=n(18)(t),c=n(77)(t),u=n(76)(t),d=n(75)(t),h=n(74)(t),f=n(18)(t),_=n(73)(t),g=n(72)(t);function p(e,n){var i,r,a="";for(r=0;r
"+t.locale.labels[i]+"
";return a}function v(e,n,i){var r,a,o,s,l,c,u="";switch(i.timeFormat[n]){case"%Y":for(e._time_format_order[2]=n,e._time_format_order.size++,e.year_range&&(isNaN(e.year_range)?e.year_range.push&&(o=e.year_range[0],s=e.year_range[1]):r=e.year_range),r=r||10,a=a||Math.floor(r/2),o=o||i.date.getFullYear()-a,s=s||t.getState().max_date.getFullYear()+a,l=o;l"+l+"";break;case"%m":for(e._time_format_order[1]=n,e._time_format_order.size++,l=0;l<12;l++)u+="";break;case"%d":for(e._time_format_order[0]=n,e._time_format_order.size++,l=1;l<32;l++)u+="";break;case"%H:%i":for(e._time_format_order[3]=n,e._time_format_order.size++,l=i.first,c=i.date.getDate(),e._time_values=[];l"+t.templates.time_picker(i.date)+"",e._time_values.push(l),i.date.setTime(i.date.valueOf()+60*t._get_timepicker_step()*1e3),l=24*(i.date.getDate()!=c?1:0)*60+60*i.date.getHours()+i.date.getMinutes()}return u}t._lightbox_methods={},t._lightbox_template="
 
",t._lightbox_root=t.$root,t.$services.getService("state").registerProvider("lightbox",function(){return{lightbox:t._lightbox_id}}),t.showLightbox=function(e){var n=this.getTask(e);if(this.callEvent("onBeforeLightbox",[e])){var i=this.getLightbox(this.getTaskType(n.type));this._center_lightbox(i),this.showCover(),this._fill_lightbox(e,i),this._waiAria.lightboxVisibleAttr(i),this.callEvent("onLightbox",[e])}else t.isTaskExists(e)&&t.getTask(e).$new&&this.$data.tasksStore._updateOrder()},t._get_timepicker_step=function(){if(this.config.round_dnd_dates){var e;if(function(t){var e=t.$ui.getView("timeline");return!(!e||!e.isVisible())}(this)){var n=t.getScale();e=r.getSecondsInUnit(n.unit)*n.step/60}return(!e||e>=1440)&&(e=this.config.time_step),e}return this.config.time_step},t.getLabel=function(t,e){for(var n=this._get_typed_lightbox_config(),i=0;i
"+this.locale.labels["button_"+t[n].button]+"
"),this.config.wide_form&&(e+="
"),e+="
"+i.render.call(this,t[n]),e+="
"}}return e},t.resizeLightbox=function(){if(this._lightbox){var t=this._lightbox.querySelector(".gantt_cal_larea");t.style.height="0px",t.style.height=t.scrollHeight+"px",this._lightbox.style.height=t.scrollHeight+this.config.lightbox_additional_height+"px",t.style.height=t.scrollHeight+"px"}},t._center_lightbox=function(e){if(e){e.style.display="block";var n=window.pageYOffset||t._lightbox_root.scrollTop||document.documentElement.scrollTop,i=window.pageXOffset||t._lightbox_root.scrollLeft||document.documentElement.scrollLeft,r=window.innerHeight||document.documentElement.clientHeight;if(t._lightbox_root==t.$root)n-=document.documentElement.scrollTop+t.$root.getBoundingClientRect().top;e.style.top=n?Math.round(n+Math.max((r-e.offsetHeight)/2,0))+"px":Math.round(Math.max((r-e.offsetHeight)/2,0)+9)+"px",document.documentElement.scrollWidth>t._lightbox_root.offsetWidth?e.style.left=Math.round(i+(t._lightbox_root.offsetWidth-e.offsetWidth)/2)+"px":e.style.left=Math.round((t._lightbox_root.offsetWidth-e.offsetWidth)/2)+"px"}},t.showCover=function(){this._cover||(this._cover=document.createElement("DIV"),this._cover.className="gantt_cal_cover",(t._lightbox_root||t.$root).appendChild(this._cover))},t.event(window,"deviceorientation",function(){t.getState().lightbox&&t._center_lightbox(t.getLightbox())}),t._init_lightbox_events=function(){t.lightbox_events={},t.lightbox_events.gantt_save_btn=function(){t._save_lightbox()},t.lightbox_events.gantt_delete_btn=function(){t._lightbox_current_type=null,t.callEvent("onLightboxDelete",[t._lightbox_id])&&(t.isTaskExists(t._lightbox_id)?t.$click.buttons.delete(t._lightbox_id):t.hideLightbox())},t.lightbox_events.gantt_cancel_btn=function(){t._cancel_lightbox()},t.lightbox_events.default=function(n,i){if(i.getAttribute("data-dhx-button"))t.callEvent("onLightboxButton",[i.className,i,n]);else{var r,a,o=e.getClassName(i);if(-1!=o.indexOf("gantt_custom_button"))if(-1!=o.indexOf("gantt_custom_button_"))for(r=i.parentNode.getAttribute("data-index"),a=i;a&&-1==e.getClassName(a).indexOf("gantt_cal_lsection");)a=a.parentNode;else r=i.getAttribute("data-index"),a=i.parentNode,i=i.firstChild;var s=t._get_typed_lightbox_config();r&&(r*=1,t.form_blocks[s[1*r].type].button_click(r,i,a,a.nextSibling))}},this.event(t.getLightbox(),"click",function(n){n=n||window.event;var i=e.getTargetNode(n),r=e.getClassName(i);return r||(i=i.previousSibling,r=e.getClassName(i)),i&&r&&0===r.indexOf("gantt_btn_set")&&(i=i.firstChild,r=e.getClassName(i)),!(!i||!r)&&(t.defined(t.lightbox_events[i.className])?t.lightbox_events[i.className]:t.lightbox_events.default)(n,i)}),t.getLightbox().onkeydown=function(n){var i=n||window.event,r=n.target||n.srcElement,a=e.getClassName(r).indexOf("gantt_btn_set")>-1;switch((n||i).keyCode){case t.constants.KEY_CODES.SPACE:if((n||i).shiftKey)return;a&&r.click&&r.click();break;case t.keys.edit_save:if((n||i).shiftKey)return;a&&r.click?r.click():t._save_lightbox();break;case t.keys.edit_cancel:t._cancel_lightbox()}}},t._cancel_lightbox=function(){var e=this.getLightboxValues();t._lightbox_current_type=null,this.callEvent("onLightboxCancel",[this._lightbox_id,e.$new]),t.isTaskExists(e.id)&&e.$new&&(this.silent(function(){t.$data.tasksStore.removeItem(e.id),t._update_flags(e.id,null)}),this.refreshData()),this.hideLightbox()},t._save_lightbox=function(){var e=this.getLightboxValues();t._lightbox_current_type=null,this.callEvent("onLightboxSave",[this._lightbox_id,e,!!e.$new])&&(t.$data.tasksStore._skipTaskRecalculation="lightbox",e.$new?(delete e.$new,this.addTask(e,e.parent,this.getTaskIndex(e.id))):this.isTaskExists(e.id)&&(this.mixin(this.getTask(e.id),e,!0),this.refreshTask(e.id),this.updateTask(e.id)),t.$data.tasksStore._skipTaskRecalculation=!1,this.refreshData(),this.hideLightbox())},t._resolve_default_mapping=function(t){var e=t.map_to;return!{time:!0,time_optional:!0,duration:!0,duration_optional:!0}[t.type]?"constraint"===t.type&&(t.map_to&&"string"!=typeof t.map_to||(e={constraint_type:"constraint_type",constraint_date:"constraint_date"})):"auto"==t.map_to?e={start_date:"start_date",end_date:"end_date",duration:"duration"}:"string"==typeof t.map_to&&(e={start_date:t.map_to}),e},t.getLightboxValues=function(){var e={};t.isTaskExists(this._lightbox_id)&&(e=this.mixin({},this.getTask(this._lightbox_id)));for(var n=this._get_typed_lightbox_config(),r=0;r0&&(s+=" "),(a=v(e,i,c))&&(o=t._waiAria.lightboxSelectAttrString(c.timeFormat[i]),s+="");return s},getTimePickerValue:function(e,n,i){var r,a=n._time_format_order,o=t.defined(a[3]),s=0,l=0,c=i||0;return o&&(r=parseInt(e[a[3]+c].value,10),s=Math.floor(r/60),l=r%60),new Date(e[a[2]+c].value,e[a[1]+c].value,e[a[0]+c].value,s,l)},_fill_lightbox_select:function(e,n,i,r){if(e[n+r[0]].value=i.getDate(),e[n+r[1]].value=i.getMonth(),e[n+r[2]].value=i.getFullYear(),t.defined(r[3])){var a=60*i.getHours()+i.getMinutes();a=Math.round(a/t._get_timepicker_step())*t._get_timepicker_step();var o=e[n+r[3]];o.value=a,o.setAttribute("data-value",a)}},template:new a,textarea:new o,select:new l,time:new s,duration:new d,parent:new h,radio:new u,checkbox:new c,resources:new f,constraint:new _,typeselect:new g},t._is_lightbox_timepicker=function(){for(var t=this._get_typed_lightbox_config(),e=0;e1),t.config.touch){var e=!0;try{document.createEvent("TouchEvent")}catch(t){e=!1}e?t._touch_events(["touchmove","touchstart","touchend"],function(t){return t.touches&&t.touches.length>1?null:t.touches[0]?{target:t.target,pageX:t.touches[0].pageX,pageY:t.touches[0].pageY,clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}:t},function(){return!1}):window.navigator.pointerEnabled?t._touch_events(["pointermove","pointerdown","pointerup"],function(t){return"mouse"==t.pointerType?null:t},function(t){return!t||"mouse"==t.pointerType}):window.navigator.msPointerEnabled&&t._touch_events(["MSPointerMove","MSPointerDown","MSPointerUp"],function(t){return t.pointerType==t.MSPOINTER_TYPE_MOUSE?null:t},function(t){return!t||t.pointerType==t.MSPOINTER_TYPE_MOUSE})}}function n(e){var n=e.$config.scrollX?t.$ui.getView(e.$config.scrollX):null,i=e.$config.scrollY?t.$ui.getView(e.$config.scrollY):null,r={x:null,y:null};n&&(n.getScrollState().visible&&(r.x=n.$view.scrollLeft));i&&(i.getScrollState().visible&&(r.y=i.$view.scrollTop));return r}function i(){var e;return t.$ui.getView("timeline")&&(e=t.$ui.getView("timeline")._tasks_dnd),e}t.config.touch_drag=500,t.config.touch=!0,t.config.touch_feedback=!0,t.config.touch_feedback_duration=1,t._prevent_touch_scroll=!1,t._touch_feedback=function(){t.config.touch_feedback&&navigator.vibrate&&navigator.vibrate(t.config.touch_feedback_duration)},t.attachEvent("onGanttReady",function(){t.$container&&e()}),t.attachEvent("onGanttLayoutReady",function(){t.$container&&t.attachEvent("onGanttRender",e,{once:!0})});var r=[];t._touch_events=function(e,a,o){for(var s,l=0,c=!1,u=!1,d=null,h=null,f=null,_=[],g=null,p={},v=0;v5||Math.abs(p)>5)&&(u=!0,l=0,s=g?n(g):t.getScrollState()),u){var v,y=s.x+_,k=s.y+p;if(g?(!function(e,n,i){var r=e.$config.scrollX?t.$ui.getView(e.$config.scrollX):null,a=e.$config.scrollY?t.$ui.getView(e.$config.scrollY):null;r&&r.scrollTo(n,null),a&&a.scrollTo(null,i)}(g,y,k),v=n(g)):(t.scrollTo(y,k),v=t.getScrollState()),s.x!=v.x&&p>2*_||s.y!=v.y&&_>2*p)return m(e)}}return m(e)}return!0}}]);try{document.addEventListener("touchmove",function(e){t._touch_drag&&m(e)},{passive:!1})}catch(t){console.warn("Cannot prevent touch event for the page drag")}r.push([this.$container,"contextmenu",function(t){if(c)return m(t)}]),r.push([this.$container,e[1],function(e){if(p=e.touches.length,document&&document.body&&document.body.classList.add("gantt_touch_active"),!o(e))if(e.touches&&e.touches.length>1)c=!1;else{d=a(e),g=function(e){for(var n=t.$layout.getCellsByType("viewCell"),i=0;i=r.left&&e.clientX<=r.right&&e.clientY<=r.bottom&&e.clientY>=r.top)return n[i]}}(d),t._locate_css(d,"gantt_hor_scroll")||t._locate_css(d,"gantt_ver_scroll")||(c=!0);var n=i();h=setTimeout(function(){var e=t.locate(d);n&&e&&!t._locate_css(d,"gantt_link_control")&&!t._locate_css(d,"gantt_grid_data")&&(n.on_mouse_down(d),n.drag&&n.drag.start_drag&&(!function(e){var n=t._getTaskLayers(),i=t.getTask(e);if(i){var r=t.isTaskVisible(e);if(r){f=e;for(var a=0;ae._levels.length-1||e.setLevel(t)},this.getCurrentLevel=function(){return e._activeLevelIndex},this.getLevels=function(){return e._levels},this.setLevel=function(t){var n=e._getZoomIndexByName(t);-1===n&&e.$gantt.assert(-1!==n,"Invalid zoom level for gantt.ext.zoom.setLevel. "+t+" is not an expected value."),e._setLevel(n,0)},this._getZoomIndexByName=function(t){var n=-1;if("string"==typeof t){if(!isNaN(Number(t))&&e._levels[Number(t)])n=Number(t);else for(var i=0;i0&&(r=!0),t.preventDefault(),t.stopPropagation(),e._setScaleSettings(r,i)},this._setScaleDates=function(){e._initialStartDate&&e._initialEndDate&&(e.$gantt.config.start_date=e._initialStartDate,e.$gantt.config.end_date=e._initialEndDate)},this.$gantt=t,this._domEvents=this.$gantt._createDomEventScope()}return t.prototype.init=function(t){var e=this;this.$gantt.env.isNode||(this._initialStartDate=t.startDate,this._initialEndDate=t.endDate,this._activeLevelIndex=t.activeLevelIndex?t.activeLevelIndex:0,this._levels=this._mapScales(t.levels||o),this._handler=t.handler||this._defaultHandler,this._minColumnWidth=t.minColumnWidth||60,this._maxColumnWidth=t.maxColumnWidth||240,this._widthStep=t.widthStep||3/8*t.minColumnWidth,this._useKey=t.useKey,this._initialized||(r(this),this.$gantt.attachEvent("onGanttScroll",function(){e._getVisibleDate()})),this._domEvents.detachAll(),"wheel"===t.trigger&&(this.$gantt.$root?this._attachWheelEvent(t):this.$gantt.attachEvent("onGanttReady",function(){e._attachWheelEvent(t)})),this._initialized=!0,this.setLevel(this._activeLevelIndex))},t.prototype._mapScales=function(t){return t.map(function(t){return Array.isArray(t)?{scales:t}:t})},t.prototype._setScaleSettings=function(t,e){t?this._stepUp(e):this._stepDown(e)},t.prototype._stepUp=function(t){if(!(this._activeLevelIndex>=this._levels.length-1)){var e=this._activeLevelIndex;if(this._setScaleDates(),this._widthStep){var n=this.$gantt.config.min_column_width+this._widthStep;n>this._maxColumnWidth&&(n=this._minColumnWidth,e++),this.$gantt.config.min_column_width=n}else e++;this._setLevel(e,t)}},t.prototype._stepDown=function(t){if(!(this._activeLevelIndex<1)){var e=this._activeLevelIndex;if(this._setScaleDates(),this._widthStep){var n=this.$gantt.config.min_column_width-this._widthStep;n0&&v+y>=k+2&&(_=0),c&&!x?c=0:c<0&&!b?c=0:c>0&&b+x>=w&&(c=0);var S=t.config.autoscroll_step;S&&S<2&&(S=2),c*=S||n,_*=S||n,(c||_)&&function(e,n){var i=t.getScrollState(),r=null,a=null;e&&(r=i.x+e,r=Math.min(i.width,r),r=Math.max(0,r));n&&(a=i.y+n,a=Math.min(i.height,a),a=Math.max(0,a));t.scrollTo(r,a)}(c,_)}}function m(t,n,i){return t-e<0&&tn-e&&t>i?1:0}t.attachEvent("onGanttReady",function(){if(!r(t)){var e=i.getRootNode(t.$root)||document.body;t.eventRemove(e,"mousemove",p),t.event(e,"mousemove",p),t.eventRemove(e,"touchmove",p),t.event(e,"touchmove",p),t.eventRemove(e,"pointermove",p),t.event(e,"pointermove",p)}}),t.attachEvent("onDestroy",function(){g(!1)})}},function(t,e,n){t.exports=function(t){t.ext||(t.ext={});for(var e=[n(86),n(85),n(84)],i=0;i-1&&(n.className=n.className.slice(0,t))},200))})}},function(t,e){t.exports=function(t){t.skins.broadway={config:{grid_width:360,row_height:35,scale_height:35,link_line_width:1,link_arrow_size:7,lightbox_additional_height:86},_second_column_width:90,_third_column_width:80,_lightbox_template:"
 
",_config_buttons_left:{},_config_buttons_right:{gantt_delete_btn:"icon_delete",gantt_save_btn:"icon_save"}}}},function(t,e){t.exports=function(t){t.skins.terrace={config:{grid_width:360,row_height:35,scale_height:35,link_line_width:2,link_arrow_size:6,lightbox_additional_height:75},_second_column_width:90,_third_column_width:70}}},function(t,e){t.exports=function(t){t.skins.meadow={config:{grid_width:350,row_height:27,scale_height:30,link_line_width:2,link_arrow_size:6,lightbox_additional_height:72},_second_column_width:95,_third_column_width:80}}},function(t,e){t.exports=function(t){t.skins.skyblue={config:{grid_width:350,row_height:27,scale_height:27,link_line_width:1,link_arrow_size:8,lightbox_additional_height:75},_second_column_width:95,_third_column_width:80}}},function(t,e){function n(t,e){var n=e.skin;if(!n||t)for(var i=document.getElementsByTagName("link"),r=0;rl.width?l.min_width:l.width,l.width=l.max_width&&l.max_widthl[1]&&(t.config.grid_width=l[1]),r&&t.config.show_chart){if(a.$config.width=t.config.grid_width-1,!a.$config.scrollable&&a.$config.scrollY&&t.$root.offsetWidth){var c=a.$gantt.$layout.$container.offsetWidth,u=t.$ui.getView(a.$config.scrollY).$config.width,d=c-(a.$config.width+u)-4;d<0&&(a.$config.width+=d,t.config.grid_width+=d)}if(n)a.$parent.$config.width=t.config.grid_width,a.$parent.$config.group&&t.$layout._syncCellSizes(a.$parent.$config.group,{value:a.$parent.$config.width,isGravity:!1});else if(r&&!i.isChildOf(r.$task,e.$view)){if(!a.$config.original_grid_width){var h=t.skins[t.skin];h&&h.config&&h.config.grid_width?a.$config.original_grid_width=h.config.grid_width:a.$config.original_grid_width=0}t.config.grid_width=a.$config.original_grid_width,a.$parent.$config.width=t.config.grid_width}else a.$parent._setContentSize(a.$config.width,null),t.$layout._syncCellSizes(a.$parent.$config.group,{value:t.config.grid_width,isGravity:!1})}else r&&i.isChildOf(r.$task,e.$view)&&(a.$config.original_grid_width=t.config.grid_width),n||(a.$parent.$config.width=0)}n=!1}}),this._initScrollStateEvents(e)},_initScrollStateEvents:function(e){t._getVerticalScrollbar=this.getVerticalScrollbar,t._getHorizontalScrollbar=this.getHorizontalScrollbar;var n=this.getVerticalScrollbar(),i=this.getHorizontalScrollbar();n&&n.attachEvent("onScroll",function(e,n,i){var r=t.getScrollState();t.callEvent("onGanttScroll",[r.x,e,r.x,n])}),i&&i.attachEvent("onScroll",function(e,n,i){var r=t.getScrollState();t.callEvent("onGanttScroll",[e,r.y,n,r.y]);var a=t.$ui.getView("grid");a&&a.$grid_data&&!a.$config.scrollable&&(a.$grid_data.style.left=a.$grid.scrollLeft+"px",a.$grid_data.scrollLeft=a.$grid.scrollLeft)}),e.attachEvent("onResize",function(){n&&!t.$scroll_ver&&(t.$scroll_ver=n.$scroll_ver),i&&!t.$scroll_hor&&(t.$scroll_hor=i.$scroll_hor)})},_findGridResizer:function(t,e){for(var n,i=t.getCellsByType("resizer"),r=!0,a=0;aa.bottom+d&&(h.y=a.bottom+d-r.height-s),h.right>a.right&&(h.x=a.right-r.width-o),h}function v(t){var n=u(),i=["gantt_link_tooltip"];n.link_source_id&&n.link_target_id&&(e.isLinkAllowed(n.link_source_id,n.link_target_id,n.link_from_start,n.link_to_start)?i.push("gantt_allowed_link"):i.push("gantt_invalid_link"));var r=e.templates.drag_link_class(n.link_source_id,n.link_from_start,n.link_target_id,n.link_to_start);r&&i.push(r);var a="
"+e.templates.drag_link(n.link_source_id,n.link_from_start,n.link_target_id,n.link_to_start)+"
";t.innerHTML=a}function m(){o=s=r=null,a=!0}function y(n,i,r,a){var o=function(){_._direction&&_._direction.parentNode||(_._direction=document.createElement("div"),t.$task_links.appendChild(_._direction));return _._direction}(),s=u(),l=["gantt_link_direction"];e.templates.link_direction_class&&l.push(e.templates.link_direction_class(s.link_source_id,s.link_from_start,s.link_target_id,s.link_to_start));var c=Math.sqrt(Math.pow(r-n,2)+Math.pow(a-i,2));if(c=Math.max(0,c-3)){o.className=l.join(" ");var d=(a-i)/(r-n),h=Math.atan(d);2==k(n,r,i,a)?h+=Math.PI:3==k(n,r,i,a)&&(h-=Math.PI);var f=Math.sin(h),g=Math.cos(h),p=Math.round(i),v=Math.round(n),m=["-webkit-transform: rotate("+h+"rad)","-moz-transform: rotate("+h+"rad)","-ms-transform: rotate("+h+"rad)","-o-transform: rotate("+h+"rad)","transform: rotate("+h+"rad)","width:"+Math.round(c)+"px"];if(-1!=window.navigator.userAgent.indexOf("MSIE 8.0")){m.push('-ms-filter: "'+function(t,e){return"progid:DXImageTransform.Microsoft.Matrix(M11 = "+e+",M12 = -"+t+",M21 = "+t+",M22 = "+e+",SizingMethod = 'auto expand')"}(f,g)+'"');var y=Math.abs(Math.round(n-r)),b=Math.abs(Math.round(a-i));switch(k(n,r,i,a)){case 1:p-=b;break;case 2:v-=y,p-=b;break;case 3:v-=y}}m.push("top:"+p+"px"),m.push("left:"+v+"px"),o.style.cssText=m.join(";")}}function k(t,e,n,i){return e>=t?i<=n?1:4:i<=n?2:3}_.attachEvent("onBeforeDragStart",e.bind(function(n,r){var a=r.target||r.srcElement;if(m(),e.getState("tasksDnd").drag_id)return!1;if(i.locateClassName(a,"gantt_link_point")){i.locateClassName(a,"task_start_date")&&(s=!0);var l=e.locate(r);o=l;var c=e.getTask(l);if(e.isReadonly(c))return m(),!1;return this._dir_start=g(c,!!s,0,t.$getConfig(),!0),!0}return!1},this)),_.attachEvent("onAfterDragStart",e.bind(function(t,n){e.config.touch&&e.refreshData(),v(_.config.marker)},this)),_.attachEvent("onDragMove",e.bind(function(o,s){var l=_.config,c=p(s,l.marker);!function(t,e){t.style.left=e.x+"px",t.style.top=e.y+"px"}(l.marker,c);var u=!!i.locateClassName(s,"gantt_link_control"),d=r,h=n,f=a,m=e.locate(s),k=!0,b=i.getTargetNode(s);if(i.isChildOf(b,e.$root)||(u=!1,m=null),u&&(k=!i.locateClassName(s,"task_end_date"),u=!!m),r=m,n=u,a=k,u){var x=e.getTask(m),w=t.$getConfig(),S=i.locateClassName(s,"gantt_link_control"),T=0;S&&(T=Math.floor(S.offsetWidth/2)),this._dir_end=g(x,!!a,T,w)}else this._dir_end=i.getRelativeEventPosition(s,t.$task_data),e.env.isEdge&&(this._dir_end.y+=window.scrollY);var $=!(h==u&&d==m&&f==k);return $&&(d&&e.refreshTask(d,!1),m&&e.refreshTask(m,!1)),$&&v(l.marker),y(this._dir_start.x,this._dir_start.y,this._dir_end.x,this._dir_end.y),!0},this)),_.attachEvent("onDragEnd",e.bind(function(){var t=u();if(t.link_source_id&&t.link_target_id&&t.link_source_id!=t.link_target_id){var n=e._get_link_type(t.link_from_start,t.link_to_start),i={source:t.link_source_id,target:t.link_target_id,type:n};i.type&&e.isLinkAllowed(i)&&e.callEvent("onLinkCreated",[i])&&e.addLink(i)}m(),e.config.touch?e.refreshData():(t.link_source_id&&e.refreshTask(t.link_source_id,!1),t.link_target_id&&e.refreshTask(t.link_target_id,!1)),_._direction&&(_._direction.parentNode&&_._direction.parentNode.removeChild(_._direction),_._direction=null)},this)),e.attachEvent("onGanttRender",e.bind(function(){_._direction&&y(this._dir_start.x,this._dir_start.y,this._dir_end.x,this._dir_end.y)},this))};t.exports={createLinkDND:function(){return{init:r}}}},function(t,e,n){var i=n(1),r=n(0),a=n(50),o=n(2);t.exports={createTaskDND:function(){var t;return{extend:function(e){e.roundTaskDates=function(e){t.round_task_dates(e)}},init:function(e,n){return t=function(t,e){var n=e.$services;return{drag:null,dragMultiple:{},_events:{before_start:{},before_finish:{},after_finish:{}},_handlers:{},init:function(){this._domEvents=e._createDomEventScope(),this.clear_drag_state();var t=e.config.drag_mode;this.set_actions(),n.getService("state").registerProvider("tasksDnd",r.bind(function(){return{drag_id:this.drag?this.drag.id:void 0,drag_mode:this.drag?this.drag.mode:void 0,drag_from_start:this.drag?this.drag.left:void 0}},this));var i={before_start:"onBeforeTaskDrag",before_finish:"onBeforeTaskChanged",after_finish:"onAfterTaskDrag"};for(var a in this._events)for(var o in t)this._events[a][o]=i[a];this._handlers[t.move]=this._move,this._handlers[t.resize]=this._resize,this._handlers[t.progress]=this._resize_progress},set_actions:function(){var n=t.$task_data;this._domEvents.attach(n,"mousemove",e.bind(function(t){this.on_mouse_move(t)},this)),this._domEvents.attach(n,"mousedown",e.bind(function(t){this.on_mouse_down(t)},this)),this._domEvents.attach(document.body,"mouseup",e.bind(function(t){this.on_mouse_up(t)},this))},clear_drag_state:function(){this.drag={id:null,mode:null,pos:null,start_x:null,start_y:null,obj:null,left:null},this.dragMultiple={}},_resize:function(n,i,r){var a=t.$getConfig(),o=this._drag_task_coords(n,r);r.left?(n.start_date=e.dateFromPos(o.start+i),n.start_date||(n.start_date=new Date(e.getState().min_date))):(n.end_date=e.dateFromPos(o.end+i),n.end_date||(n.end_date=new Date(e.getState().max_date)));var s=this._calculateMinDuration(a.min_duration,a.duration_unit);n.end_date-n.start_datec){var u=c-s.end;(ui||void 0===i)&&(i=d)}}return i},_move:function(t,n,i,r){var a=this._drag_task_coords(t,i),o=null,s=null;r?(o=new Date(+i.obj.start_date+r),s=new Date(+i.obj.end_date+r)):(o=e.dateFromPos(a.start+n),s=e.dateFromPos(a.end+n)),o?s?(t.start_date=o,t.end_date=s):(t.end_date=new Date(e.getState().max_date),t.start_date=e.dateFromPos(e.posFromDate(t.end_date)-(a.end-a.start))):(t.start_date=new Date(e.getState().min_date),t.end_date=e.dateFromPos(e.posFromDate(t.start_date)+(a.end-a.start)))},_drag_task_coords:function(t,n){return{start:n.obj_s_x=n.obj_s_x||e.posFromDate(t.start_date),end:n.obj_e_x=n.obj_e_x||e.posFromDate(t.end_date)}},_mouse_position_change:function(t,e){var n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)},_is_number:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},on_mouse_move:function(t){if(this.drag.start_drag){var n=i.getRelativeEventPosition(t,e.$task_data),r=this.drag.start_drag.start_x,o=this.drag.start_drag.start_y;(Date.now()-this.drag.timestamp>50||this._is_number(r)&&this._is_number(o)&&this._mouse_position_change({x:r,y:o},n)>20)&&this._start_dnd(t)}if(this.drag.mode){if(!a(this,40))return;this._update_on_move(t)}},_update_item_on_move:function(t,n,i,r,a,o){var s=e.getTask(n),l=e.mixin({},s),c=e.mixin({},s);this._handlers[i].apply(this,[c,t,r,o]),e.mixin(s,c,!0),e.callEvent("onTaskDrag",[s.id,i,c,l,a]),e.mixin(s,c,!0),e.refreshTask(n)},_update_on_move:function(n){var a=this.drag,o=t.$getConfig();if(a.mode){var s=i.getRelativeEventPosition(n,t.$task_data);if(a.pos&&a.pos.x==s.x)return;a.pos=s;var l=e.dateFromPos(s.x);if(!l||isNaN(l.getTime()))return;var c=s.x-a.start_x,u=e.getTask(a.id);if(this._handlers[a.mode]){if(a.mode===o.drag_mode.move){var d={};this._isMultiselect()&&e.getSelectedTasks().indexOf(a.id)>=0&&(d=this.dragMultiple);var h=!1;if(e.isSummaryTask(u)&&e.config.drag_project){var f={};f[a.id]=r.copy(a),h=!0,d=r.mixin(f,this.dragMultiple)}var _=this._find_max_shift(d,c);for(var g in void 0!==_&&(c=_),this._update_item_on_move(c,a.id,a.mode,a,n),d){var p=d[g];if(h&&p.id!=a.id&&(e._bulk_dnd=!0),void 0===_&&(h||Object.keys(d).length>1))var v=l-e.dateFromPos(a.start_x);this._update_item_on_move(c,p.id,p.mode,p,n,v)}e._bulk_dnd=!1}else this._update_item_on_move(c,a.id,a.mode,a,n);e._update_parents(a.id)}}},on_mouse_down:function(n,r){if(2!=n.button||void 0===n.button){var a=t.$getConfig(),o=e.locate(n),s=null;if(e.isTaskExists(o)&&(s=e.getTask(o)),!e.isReadonly(s)&&!this.drag.mode){this.clear_drag_state(),r=r||n.target||n.srcElement;var l=i.getClassName(r),c=this._get_drag_mode(l,r);if(!l||!c)return r.parentNode?this.on_mouse_down(n,r.parentNode):void 0;if(c)if(c.mode&&c.mode!=a.drag_mode.ignore&&a["drag_"+c.mode]){if(o=e.locate(r),s=e.copy(e.getTask(o)||{}),e.isReadonly(s))return this.clear_drag_state(),!1;if(e.isSummaryTask(s)&&!a.drag_project&&c.mode!=a.drag_mode.progress)return void this.clear_drag_state();c.id=o;var u=i.getRelativeEventPosition(n,e.$task_data);c.start_x=u.x,c.start_y=u.y,c.obj=s,this.drag.start_drag=c,this.drag.timestamp=Date.now()}else this.clear_drag_state();else if(e.checkEvent("onMouseDown")&&e.callEvent("onMouseDown",[l.split(" ")[0]])&&r.parentNode)return this.on_mouse_down(n,r.parentNode)}}},_fix_dnd_scale_time:function(n,i){var r=t.$getConfig(),a=e.getScale().unit,o=e.getScale().step;function s(n){if(e.config.correct_work_time){var i=t.$getConfig();e.isWorkTime(n.start_date,void 0,n)||(n.start_date=e.calculateEndDate({start_date:n.start_date,duration:-1,unit:i.duration_unit,task:n}))}}r.round_dnd_dates||(a="minute",o=r.time_step),i.mode==r.drag_mode.resize?i.left?(n.start_date=e.roundDate({date:n.start_date,unit:a,step:o}),s(n)):(n.end_date=e.roundDate({date:n.end_date,unit:a,step:o}),function(n){if(e.config.correct_work_time){var i=t.$getConfig();e.isWorkTime(new Date(n.end_date-1),void 0,n)||(n.end_date=e.calculateEndDate({start_date:n.end_date,duration:1,unit:i.duration_unit,task:n}))}}(n)):i.mode==r.drag_mode.move&&(n.start_date=e.roundDate({date:n.start_date,unit:a,step:o}),s(n),n.end_date=e.calculateEndDate(n))},_fix_working_times:function(n,i){var r=t.$getConfig();(i=i||{mode:r.drag_mode.move}).mode==r.drag_mode.resize?i.left?n.start_date=e.getClosestWorkTime({date:n.start_date,dir:"future",task:n}):n.end_date=e.getClosestWorkTime({date:n.end_date,dir:"past",task:n}):i.mode==r.drag_mode.move&&e.correctTaskWorkTime(n)},_finalize_mouse_up:function(t,n,i,r){var a=e.getTask(t);if(n.work_time&&n.correct_work_time&&this._fix_working_times(a,i),this._fix_dnd_scale_time(a,i),this._fireEvent("before_finish",i.mode,[t,i.mode,e.copy(i.obj),r])){var o=t;e._init_task_timing(a),this.clear_drag_state(),e.updateTask(a.id),this._fireEvent("after_finish",i.mode,[o,i.mode,r])}else this.clear_drag_state(),t==i.id&&(i.obj._dhx_changed=!1,e.mixin(a,i.obj,!0)),e.refreshTask(a.id)},on_mouse_up:function(n){var i=this.drag;if(i.mode&&i.id){var r=t.$getConfig(),a=e.getTask(i.id),o=this.dragMultiple,s=!1,l=0;i.mode===r.drag_mode.move&&(e.isSummaryTask(a)&&r.drag_project||this._isMultiselect())&&(s=!0,l=Object.keys(o).length);var c=function(){if(s)for(var t in o)o[t].id!=i.id&&this._finalize_mouse_up(o[t].id,r,o[t],n);this._finalize_mouse_up(i.id,r,i,n)};s&&l>10?e.batchUpdate(function(){c.call(this)}.bind(this)):c.call(this)}this.clear_drag_state()},_get_drag_mode:function(e,n){var i=t.$getConfig().drag_mode,r={mode:null,left:null};switch((e||"").split(" ")[0]){case"gantt_task_line":case"gantt_task_content":r.mode=i.move;break;case"gantt_task_drag":r.mode=i.resize;var a=n.getAttribute("data-bind-property");r.left="start_date"==a;break;case"gantt_task_progress_drag":r.mode=i.progress;break;case"gantt_link_control":case"gantt_link_point":r.mode=i.ignore;break;default:r=null}return r},_start_dnd:function(n){var i=this.drag=this.drag.start_drag;delete i.start_drag;var r=t.$getConfig(),a=i.id;if(r["drag_"+i.mode]&&e.callEvent("onBeforeDrag",[a,i.mode,n])&&this._fireEvent("before_start",i.mode,[a,i.mode,n])){delete i.start_drag;var s=e.getTask(a);if(e.isReadonly(s))return void this.clear_drag_state();if(this._isMultiselect()){var l=e.getSelectedTasks();l.indexOf(i.id)>=0&&o.forEach(l,e.bind(function(t){var n=e.getTask(t);e.isSummaryTask(n)&&e.config.drag_project&&i.mode==r.drag_mode.move&&this._addSubtasksToDragMultiple(n.id),this.dragMultiple[t]=e.mixin({id:n.id,obj:e.copy(n)},this.drag)},this))}e.isSummaryTask(s)&&e.config.drag_project&&i.mode==r.drag_mode.move&&this._addSubtasksToDragMultiple(s.id),e.callEvent("onTaskDragStart",[])}else this.clear_drag_state()},_fireEvent:function(t,n,i){e.assert(this._events[t],"Invalid stage:{"+t+"}");var r=this._events[t][n];return e.assert(r,"Unknown after drop mode:{"+n+"}"),e.assert(i,"Invalid event arguments"),!e.checkEvent(r)||e.callEvent(r,i)},round_task_dates:function(e){var n=this.drag,i=t.$getConfig();n||(n={mode:i.drag_mode.move}),this._fix_dnd_scale_time(e,n)},destructor:function(){this._domEvents.detachAll()},_isMultiselect:function(){return e.config.drag_multiple&&!!(e.getSelectedTasks&&e.getSelectedTasks().length>0)},_addSubtasksToDragMultiple:function(t){e.eachTask(function(t){this.dragMultiple[t.id]=e.mixin({id:t.id,obj:e.copy(t)},this.drag)},t,this)}}}(e,n),e._tasks_dnd=t,t.init(n)},destructor:function(){t&&(t.destructor(),t=null)}}}}},function(t,e,n){var i=n(0),r=n(100),a=n(99),o=n(1),s=function(t){var e=t.$services;return{onCreated:function(e){var o=e.$config;o.bind=i.defined(o.bind)?o.bind:"task",o.bindLinks=i.defined(o.bindLinks)?o.bindLinks:"link",e._linksDnD=a.createLinkDND(),e._tasksDnD=r.createTaskDND(),e._tasksDnD.extend(e),this._mouseDelegates=n(31)(t)},onInitialized:function(e){this._attachDomEvents(t),this._attachStateProvider(t,e),e._tasksDnD.init(e,t),e._linksDnD.init(e,t),"timeline"==e.$config.id&&this.extendDom(e)},onDestroyed:function(e){this._clearDomEvents(t),this._clearStateProvider(t),e._tasksDnD&&e._tasksDnD.destructor()},extendDom:function(e){t.$task=e.$task,t.$task_scale=e.$task_scale,t.$task_data=e.$task_data,t.$task_bg=e.$task_bg,t.$task_links=e.$task_links,t.$task_bars=e.$task_bars},_clearDomEvents:function(){this._mouseDelegates.destructor(),this._mouseDelegates=null},_attachDomEvents:function(t){function e(e,n){if(e&&this.callEvent("onLinkDblClick",[e,n])){var i=this.getLink(e);if(this.isReadonly(i))return;var r=this.locale.labels.link+" "+this.templates.link_description(this.getLink(e))+" "+this.locale.labels.confirm_link_deleting;window.setTimeout(function(){t._simple_confirm(r,"",function(){t.deleteLink(e)})},this.config.touch?300:1)}}this._mouseDelegates.delegate("click","gantt_task_link",t.bind(function(t,e){var n=this.locate(t,this.config.link_attribute);n&&this.callEvent("onLinkClick",[n,t])},t),this.$task),this._mouseDelegates.delegate("click","gantt_scale_cell",t.bind(function(e,n){var i=o.getRelativeEventPosition(e,t.$task_data),r=t.dateFromPos(i.x),a=Math.floor(t.columnIndexByDate(r)),s=t.getScale().trace_x[a];t.callEvent("onScaleClick",[e,s])},t),this.$task),this._mouseDelegates.delegate("doubleclick","gantt_task_link",t.bind(function(n,i,r){i=this.locate(n,t.config.link_attribute),e.call(this,i,n)},t),this.$task),this._mouseDelegates.delegate("doubleclick","gantt_link_point",t.bind(function(t,n,i){n=this.locate(t);var r=this.getTask(n),a=null;return i.parentNode&&o.getClassName(i.parentNode)&&(a=o.getClassName(i.parentNode).indexOf("_left")>-1?r.$target[0]:r.$source[0]),a&&e.call(this,a,t),!1},t),this.$task)},_attachStateProvider:function(t,n){var i=n;e.getService("state").registerProvider("tasksTimeline",function(){return{scale_unit:i._tasks?i._tasks.unit:void 0,scale_step:i._tasks?i._tasks.step:void 0}})},_clearStateProvider:function(){e.getService("state").unregisterProvider("tasksTimeline")}}};t.exports=s},function(t,e,n){var i=n(1);function r(t,e){var n=i.getNodePosition(e.$grid_data);return t.x+=n.x+e.$grid.scrollLeft,t.y+=n.y-e.$grid_data.scrollTop,t}function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=i.getNodePosition(t.$root);return e>r.width&&(e=r.width-n-2),e}t.exports={removeLineHighlight:function(t){t.markerLine&&t.markerLine.parentNode&&t.markerLine.parentNode.removeChild(t.markerLine),t.markerLine=null},highlightPosition:function(t,e,n){var o=function(t,e){var n=i.getNodePosition(e.$grid_data),r=i.getRelativeEventPosition(t,e.$grid_data),o=n.x+e.$grid.scrollLeft,s=r.y-10,l=e.getItemHeight(t.targetId);sn.y+c-l&&(s=n.y+c-l),n.x=o,n.y=s,n.width=a(e.$gantt,n.width,9),n}(t,n);e.marker.style.left=o.x+9+"px",e.marker.style.width=o.width+"px",e.marker.style.overflow="hidden";var s=e.markerLine;s||((s=document.createElement("div")).className="gantt_drag_marker gantt_grid_dnd_marker",s.innerHTML="
",s.style.pointerEvents="none"),t.child?function(t,e,n){var i=t.targetParent,o=r({x:0,y:n.getItemTop(i)},n),s=n.$grid_data.getBoundingClientRect().bottom+window.scrollY,l=a(n.$gantt,n.$grid_data.offsetWidth);e.innerHTML="
",e.style.width=l+"px",e.style.top=o.y+"px",e.style.left=o.x+"px",e.style.height=n.getItemHeight(i)+"px",o.y>s&&(e.style.top=s+"px")}(t,s,n):function(t,e,n){var i=function(t,e){var n=e.$config.rowStore,i={x:0,y:0},o=e.$grid_data.querySelector(".gantt_tree_indent"),s=15,l=0;if(o&&(s=o.offsetWidth),t.targetId!==n.$getRootId()){var c=e.getItemTop(t.targetId),u=e.getItemHeight(t.targetId);if(l=n.exists(t.targetId)?n.calculateItemLevel(n.getItem(t.targetId)):0,t.prevSibling)i.y=c;else if(t.nextSibling){var d=0;n.eachItem(function(t){-1!==n.getIndexById(t.id)&&d++},t.targetId),i.y=c+u+d*u}else i.y=c+u,l+=1}return i.x=40+l*s,i.width=a(e.$gantt,Math.max(e.$grid_data.offsetWidth-i.x,0),i.x),r(i,e)}(t,n),o=n.$grid_data.getBoundingClientRect().bottom+window.scrollY;e.innerHTML="
",e.style.left=i.x+"px",e.style.height="4px";var s=i.y-2;e.style.top=s+"px",e.style.width=i.width+"px",s>o&&(e.style.top=o+"px")}(t,s,n),e.markerLine||(document.body.appendChild(s),e.markerLine=s)}}},function(t,e,n){var i=n(24);t.exports=function(t,e,n,r,a){var o;if(e!==a.$getRootId())o=n<.25?i.prevSiblingTarget(t,e,a):!(n>.6)||a.hasChild(e)&&a.getItem(e).$open?i.firstChildTarget(t,e,a):i.nextSiblingTarget(t,e,a);else{var s=a.$getRootId();o=a.hasChild(s)&&r>=0?i.lastChildTarget(t,s,a):i.firstChildTarget(t,s,a)}return o}},function(t,e,n){var i=n(24);function r(t,e,n,r,a){for(var o=e;r.exists(o);){var s=r.calculateItemLevel(r.getItem(o));if((s===n||s===n-1)&&r.getBranchIndex(o)>-1)break;o=a?r.getPrev(o):r.getNext(o)}return r.exists(o)?r.calculateItemLevel(r.getItem(o))===n?a?i.nextSiblingTarget(t,o,r):i.prevSiblingTarget(t,o,r):i.firstChildTarget(t,o,r):null}function a(t,e,n,i){return r(t,e,n,i,!0)}function o(t,e,n,i){return r(t,e,n,i,!1)}t.exports=function(t,e,n,r,s,l){var c;if(e!==s.$getRootId()){var u=s.getItem(e),d=s.calculateItemLevel(u);if(d===l){var h=s.getPrevSibling(e);n<.5&&!h?c=i.prevSiblingTarget(t,e,s):(n<.5&&(e=h),c=i.nextSiblingTarget(t,e,s))}else if(d>l)s.eachParent(function(t){s.calculateItemLevel(t)===l&&(e=t.id)},u),c=a(t,e,l,s);else{var f=a(t,e,l,s),_=o(t,e,l,s);c=n<.5?f:_}}else{var g=s.$getRootId(),p=s.getChildren(g);c=i.createDropTargetObject(),c=p.length&&r>=0?a(t,function(t){for(var e=t.getNext();t.exists(e);){var n=t.getNext(e);if(!t.exists(n))return e;e=n}return null}(s),l,s):o(t,g,l,s)}return c}},function(t,e,n){var i=n(1),r=n(24),a=n(104),o=n(103),s=n(102),l=n(16);t.exports={init:function(t,e){var n=t.$services.getService("dnd");if(e.$config.bind&&t.getDatastore(e.$config.bind)){var c=new n(e.$grid_data,{updates_per_second:60});t.defined(e.$getConfig().dnd_sensitivity)&&(c.config.sensitivity=e.$getConfig().dnd_sensitivity),c.attachEvent("onBeforeDragStart",t.bind(function(n,r){var a=u(r);if(!a)return!1;if(t.hideQuickInfo&&t._hideQuickInfo(),i.closest(r.target,".gantt_grid_editor_placeholder"))return!1;var o=a.getAttribute(e.$config.item_attribute),s=e.$config.rowStore.getItem(o);return!t.isReadonly(s)&&!d(o)&&(c.config.initial_open_state=s.$open,!!t.callEvent("onRowDragStart",[o,r.target||r.srcElement,r])&&void 0)},t)),c.attachEvent("onAfterDragStart",t.bind(function(t,n){var i=u(n);c.config.marker.innerHTML=i.outerHTML;var a=c.config.marker.firstChild;a&&(c.config.marker.style.opacity=.4,a.style.position="static",a.style.pointerEvents="none"),c.config.id=i.getAttribute(e.$config.item_attribute);var o=e.$config.rowStore,s=o.getItem(c.config.id);c.config.level=o.calculateItemLevel(s),c.config.drop_target=r.createDropTargetObject({targetParent:o.getParent(s.id),targetIndex:o.getBranchIndex(s.id),targetId:s.id,nextSibling:!0}),s.$open=!1,s.$transparent=!0,this.refreshData()},t)),c.attachEvent("onDragMove",t.bind(function(n,i){var a=h(i);return a&&!1!==t.callEvent("onBeforeRowDragMove",[c.config.id,a.targetParent,a.targetIndex])||(a=r.createDropTargetObject(c.config.drop_target)),s.highlightPosition(a,c.config,e),c.config.drop_target=a,t._waiAria.reorderMarkerAttr(c.config.marker),this.callEvent("onRowDragMove",[c.config.id,a.targetParent,a.targetIndex]),!0},t)),c.attachEvent("onDragEnd",t.bind(function(){var n=e.$config.rowStore,i=n.getItem(c.config.id);s.removeLineHighlight(c.config),i.$transparent=!1,i.$open=c.config.initial_open_state;var r=c.config.drop_target;!1===this.callEvent("onBeforeRowDragEnd",[c.config.id,r.targetParent,r.targetIndex])?i.$drop_target=null:(n.move(c.config.id,r.targetIndex,r.targetParent),t.render(),this.callEvent("onRowDragEnd",[c.config.id,r.targetParent,r.targetIndex])),n.refresh(i.id)},t))}function u(t){return i.locateAttribute(t,e.$config.item_attribute)}function d(n){return l(n,t,t.getDatastore(e.$config.bind))}function h(n){var r,s=function(n){var r=i.getRelativeEventPosition(n,e.$grid_data).y,a=e.$config.rowStore;document.doctype||(r+=window.scrollY),r=r||0;var o=e.$state.scrollTop||0,s=t.$grid_data.getBoundingClientRect().height+o+window.scrollY,l=o,u=e.getItemIndexByTopPosition(e.$state.scrollTop);if(a.exists(u)||(u=a.countVisible()-1),u<0)return a.$getRootId();var h=a.getIdByIndex(u),f=e.$state.scrollTop/e.getItemHeight(h),_=f-Math.floor(f);_>.1&&_<.9&&(s-=e.getItemHeight(h)*_,l+=e.getItemHeight(h)*(1-_));var g=i.getNodePosition(e.$grid_data),p=g.y+g.height,v=c.config.marker.offsetHeight;r+v+window.scrollY>=s&&(c.config.marker.style.top=p-v+"px"),r>=s?r=s:r<=l&&(r=l,c.config.marker.style.top=g.y+"px");var m=e.getItemIndexByTopPosition(r);if(m>a.countVisible()-1||m<0)return a.$getRootId();var y=a.getIdByIndex(m);return d(y)?a.getPrevSibling(y):a.getIdByIndex(m)}(n),l=null,u=e.$config.rowStore,h=!e.$getConfig().order_branch_free,f=i.getRelativeEventPosition(n,e.$grid_data).y;return document.doctype||(f+=window.scrollY),s!==u.$getRootId()&&(l=(f-e.getItemTop(s))/e.getItemHeight(s)),h?(r=a(c.config.id,s,l,f,u,c.config.level))&&r.targetParent&&d(r.targetParent)&&(s=u.getPrevSibling(r.targetParent),r=a(c.config.id,s,l,f,u,c.config.level)):r=o(c.config.id,s,l,f,u),r}}}},function(t,e,n){var i=n(1),r=n(16);t.exports={init:function(t,e){var n=t.$services.getService("dnd");if(e.$config.bind&&t.getDatastore(e.$config.bind)){var a=new n(e.$grid_data,{updates_per_second:60});t.defined(e.$getConfig().dnd_sensitivity)&&(a.config.sensitivity=e.$getConfig().dnd_sensitivity),a.attachEvent("onBeforeDragStart",t.bind(function(n,r){var c=o(r);if(!c)return!1;if(t.hideQuickInfo&&t._hideQuickInfo(),i.closest(r.target,".gantt_grid_editor_placeholder"))return!1;var u=c.getAttribute(e.$config.item_attribute);if(l(u))return!1;var d=s().getItem(u);return!t.isReadonly(d)&&(a.config.initial_open_state=d.$open,!!t.callEvent("onRowDragStart",[u,r.target||r.srcElement,r])&&void 0)},t)),a.attachEvent("onAfterDragStart",t.bind(function(t,n){var i=o(n);a.config.marker.innerHTML=i.outerHTML;var r=a.config.marker.firstChild;r&&(r.style.position="static"),a.config.id=i.getAttribute(e.$config.item_attribute);var l=s(),c=l.getItem(a.config.id);a.config.index=l.getBranchIndex(a.config.id),a.config.parent=c.parent,c.$open=!1,c.$transparent=!0,this.refreshData()},t)),a.lastTaskOfLevel=function(t){for(var e=null,n=s().getItems(),i=0,r=n.length;in.y+l-s&&(o=n.y+l-s);var c=n.y+n.height;return o>c-s&&(o=c-s),n.x=r,n.y=o,n},t),a._getTargetY=t.bind(function(n){var r=i.getNodePosition(e.$grid_data),a=e.$state.scrollTop||0,o=t.$grid_data.getBoundingClientRect().height+a,s=n.pageY-r.y+a;return s>o?s=o:si.countVisible()-1?null:i.getIdByIndex(r)},t),a.attachEvent("onDragMove",t.bind(function(n,r){var o=t.$grid_data.getBoundingClientRect(),c=o.height+o.y+(e.$state.scrollTop||0)+window.scrollY,u=a.config,d=a._getGridPos(r);t._waiAria.reorderMarkerAttr(u.marker);var h=e.$getConfig(),f=s();d.y_.width&&(u.marker.style.width=_.width-10-2+"px",u.marker.style.overflow="hidden");var g=f.getItem(a.config.id),p=a._getTargetY(r),v=a._getTaskByY(p,f.getIndexById(g.id));function m(t,e){return!f.isChildOf(y.id,e.id)&&(t.$level==e.$level||h.order_branch_free)}if(f.exists(v)||(v=a.lastTaskOfLevel(h.order_branch_free?g.$level:0))==a.config.id&&(v=null),f.exists(v)){var y=f.getItem(v),k=e.getItemTop(y.id),b=e.getItemHeight(y.id);if(k+b/2=0;)T=f.getIdByIndex(x-C),$=f.getItem(T),C++;if(g.id==y.id||l(y.id))return;m(y,g)&&g.id!=y.id?f.move(g.id,0,0,y.id):y.$level!=g.$level-1||f.getChildren(y.id).length?$&&m($,g)&&g.id!=$.id&&f.move(g.id,-1,f.getParent($.id)):f.move(g.id,0,y.id)}return!0},t)),a.attachEvent("onDragEnd",t.bind(function(){var e=s(),n=e.getItem(a.config.id);n.$transparent=!1,n.$open=a.config.initial_open_state,!1===this.callEvent("onBeforeRowDragEnd",[a.config.id,a.config.parent,a.config.index])?(e.move(a.config.id,a.config.index,a.config.parent),n.$drop_target=null):this.callEvent("onRowDragEnd",[a.config.id,n.$drop_target]),t.render(),this.refreshData()},t))}function o(t){return i.locateAttribute(t,e.$config.item_attribute)}function s(){return t.getDatastore(e.$config.bind)}function l(e){return r(e,t,s())}}}},function(t,e,n){var i=n(0),r=n(106),a=n(105),o=function(t){return{onCreated:function(e){e.$config=i.mixin(e.$config,{bind:"task"}),"grid"==e.$config.id&&(this.extendGantt(e),t.ext.inlineEditors=t.ext._inlineEditors.createEditors(e),t.ext.inlineEditors.init()),this._mouseDelegates=n(31)(t)},onInitialized:function(e){var n=e.$getConfig();n.order_branch&&("marker"==n.order_branch?a.init(e.$gantt,e):r.init(e.$gantt,e)),this.initEvents(e,t),"grid"==e.$config.id&&this.extendDom(e)},onDestroyed:function(e){"grid"==e.$config.id&&t.ext.inlineEditors.destructor(),this.clearEvents(e,t)},initEvents:function(t,e){this._mouseDelegates.delegate("click","gantt_row",e.bind(function(n,i,r){var a=t.$getConfig();if(null!==i){var o=this.getTask(i);a.scroll_on_click&&!e._is_icon_open_click(n)&&this.showDate(o.start_date),e.callEvent("onTaskRowClick",[i,r])}},e),t.$grid),this._mouseDelegates.delegate("click","gantt_grid_head_cell",e.bind(function(n,i,r){var a=r.getAttribute("data-column-id");if(e.callEvent("onGridHeaderClick",[a,n])){var o=t.$getConfig();if("add"!=a){if(o.sort&&a){for(var s,l=a,c=0;c",a.setAttribute(r.task_grid_row_resizer_attribute,e.id),t._waiAria.rowResizerAttr(a),a},update:null,getRectangle:i,getVisibleRange:r}}},function(t,e,n){var i=n(27),r=n(6),a=n(26),o=n(25),s=n(37);function l(t,e,n,i){var r=100*(1-(1*t||0)),a=i.posFromDate(e),o=i.posFromDate(n),s=document.createElement("div");return s.className="gantt_histogram_hor_bar",s.style.top=r+"%",s.style.left=a+"px",s.style.width=o-a+1+"px",s}function c(t,e,n){if(t===e)return null;var i=1-Math.max(t,e),r=Math.abs(t-e),a=document.createElement("div");return a.className="gantt_histogram_vert_bar",a.style.top=100*i+"%",a.style.height=100*r+"%",a.style.left=n+"px",a}t.exports=function(t){var e=s(t),n={},u={},d={};function h(t,e){var i=n[t];i&&i[e]&&i[e].parentNode&&i[e].parentNode.removeChild(i[e])}function f(e,n,i,r,o,s,u){var h=d[e.id];h&&h.parentNode&&h.parentNode.removeChild(h);var f=function(e,n,i,r){for(var o=n.getScale(),s=document.createElement("div"),u=a(o,r),d=u.start;d<=u.end;d++){var h=o.trace_x[d],f=o.trace_x[d+1]||t.date.add(h,o.step,o.unit),_=o.trace_x[d].valueOf(),g=Math.min(e[_]/i,1)||0;if(g<0)return null;var p=Math.min(e[f.valueOf()]/i,1)||0,v=l(g,h,f,n);v&&s.appendChild(v);var m=c(g,p,n.posFromDate(f));m&&s.appendChild(m)}return s}(i,o,s,u);return f&&n&&(f.setAttribute("data-resource-id",e.id),f.setAttribute(o.$config.item_attribute,e.id),f.style.position="absolute",f.style.top=n.top+1+"px",f.style.height=o.getItemHeight(e.id)-1+"px",f.style.left=0),f}function _(t,e,n,i,r,a,o){var s=r.histogram_cell_class(a.start_date,a.end_date,t,a.tasks,a.assignments),l=r.histogram_cell_label(a.start_date,a.end_date,t,a.tasks,a.assignments),c=r.histogram_cell_allocated(a.start_date,a.end_date,t,a.tasks,a.assignments),u=o.getItemHeight(t.id)-1;if(s||l){var d=document.createElement("div");return d.className=["gantt_histogram_cell",s].join(" "),d.setAttribute(o.$config.item_attribute,t.id),d.style.cssText=["left:"+e.left+"px","width:"+e.width+"px","height:"+u+"px","line-height:"+u+"px","top:"+(e.top+1)+"px"].join(";"),l&&(l="
"+l+"
"),c&&(l="
"+l),l&&(d.innerHTML=l),d}return null}return{render:function(i,r,s,l){var c=r.$getTemplates(),h=r.getScale(),g=e(i,s.resource_property,h,r),p=[],v={},m=i.capacity||r.$config.capacity||24;n[i.id]={},u[i.id]=null,d[i.id]=null;for(var y=!!l,k=a(h,l),b=k.start;b<=k.end;b++){var x=g[b];if(x&&(!y||o(b,h,l,t))){var w=c.histogram_cell_capacity(x.start_date,x.end_date,i,x.tasks,x.assignments);v[x.start_date.valueOf()]=w||0;var S=r.getItemPosition(i,x.start_date,x.end_date),T=_(i,S,m,0,c,x,r);T&&(p.push(T),n[i.id][b]=T)}}var $=null;if(p.length){$=document.createElement("div");for(var C=0;Ce.y_end||a+o",f=""):(h=g.template?g.template(e):e[g.name],r.isDate(h)&&(h=s.date_grid(h,e,g.name)),null!==h&&void 0!==h||(h=""),f=h,h="
"+h+"
");var p="gantt_cell"+(_?" gantt_last_cell":""),v=[];if(g.tree){p+=" gantt_cell_tree";for(var m=0;m"+v.join("")+"",c.push(d)}switch(p="",l.$config.name){case"task":p=t.getGlobalTaskIndex(e.id)%2==0?"":" odd";break;case"resource":p=l.visibleOrder.indexOf(e.id)%2==0?"":" odd"}if(p+=e.$transparent?" gantt_transparent":"",p+=e.$dataprocessor_class?" "+e.$dataprocessor_class:"",s.grid_row_class){var x=s.grid_row_class.call(t,e.start_date,e.end_date,e);x&&(p+=" "+x)}l.isSelected(e.id)&&(p+=" gantt_selected");var w=document.createElement("div");w.className="gantt_row"+p+" gantt_row_"+t.getTaskType(e.type);var S=n.getItemHeight(e.id);return w.style.height=S+"px",w.style.lineHeight=S+"px",i.smart_rendering&&(w.style.position="absolute",w.style.left="0px",w.style.top=n.getItemTop(e.id)+"px"),n.$config.item_attribute&&(w.setAttribute(n.$config.item_attribute,e.id),w.setAttribute(n.$config.bind+"_id",e.id)),t._waiAria.taskRowAttr(e,w),w.innerHTML=c.join(""),w},update:null,getRectangle:a,isInViewPort:s,getVisibleRange:o,onrender:function(e,n,r){for(var a=r.getGridColumns(),o=0;ot.x?this.dirs.right:e.y>t.y?this.dirs.down:this.dirs.up}},n={path:[],clear:function(){this.path=[]},current:function(){return this.path[this.path.length-1]},point:function(e){return e?(this.path.push(t.copy(e)),e):this.current()},point_to:function(n,i,r){r=r?{x:r.x,y:r.y}:t.copy(this.point());var a=e.dirs;switch(n){case a.left:r.x-=i;break;case a.right:r.x+=i;break;case a.up:r.y-=i;break;case a.down:r.y+=i}return this.point(r)},get_points:function(n,i,r,a){var o=this.get_endpoint(n,i,r,a),s=t.config,l=o.e_y-o.y,c=o.e_x-o.x,u=e.dirs,d=i.getItemHeight(n.source);this.clear(),this.point({x:o.x,y:o.y});var h=2*s.link_arrow_size,f=this.get_line_type(n,i.$getConfig()),_=o.e_x>o.x;if(f.from_start&&f.to_start)this.point_to(u.left,h),_?(this.point_to(u.down,l),this.point_to(u.right,c)):(this.point_to(u.right,c),this.point_to(u.down,l)),this.point_to(u.right,h);else if(!f.from_start&&f.to_start)if(_=o.e_x>o.x+2*h,this.point_to(u.right,h),_)c-=h,this.point_to(u.down,l),this.point_to(u.right,c);else{c-=2*h;var g=l>0?1:-1;this.point_to(u.down,g*(d/2)),this.point_to(u.right,c),this.point_to(u.down,g*(Math.abs(l)-d/2)),this.point_to(u.right,h)}else f.from_start||f.to_start?f.from_start&&!f.to_start&&(_=o.e_x>o.x-2*h,this.point_to(u.left,h),_?(c+=2*h,g=l>0?1:-1,this.point_to(u.down,g*(d/2)),this.point_to(u.right,c),this.point_to(u.down,g*(Math.abs(l)-d/2)),this.point_to(u.left,h)):(c+=h,this.point_to(u.down,l),this.point_to(u.right,c))):(this.point_to(u.right,h),_?(this.point_to(u.right,c),this.point_to(u.down,l)):(this.point_to(u.down,l),this.point_to(u.right,c)),this.point_to(u.left,h));return this.path},get_line_type:function(e,n){var i=n.links,r=!1,a=!1;return e.type==i.start_to_start?r=a=!0:e.type==i.finish_to_finish?r=a=!1:e.type==i.finish_to_start?(r=!1,a=!0):e.type==i.start_to_finish?(r=!0,a=!1):t.assert(!1,"Invalid link type"),n.rtl&&(r=!r,a=!a),{from_start:r,to_start:a}},get_endpoint:function(t,e,n,i){var r=e.$getConfig(),o=this.get_line_type(t,r),s=o.from_start,l=o.to_start,c=a(n,e,r),u=a(i,e,r);return{x:s?c.left:c.left+c.width,e_x:l?u.left:u.left+u.width,y:c.top+c.rowHeight/2-1,e_y:u.top+u.rowHeight/2-1}}};function a(e,n,i){var r=n.getItemPosition(e);if(t.getTaskType(e.type)==i.types.milestone){var a=n.getBarHeight(e.id,!0),o=Math.sqrt(2*a*a);r.left-=o/2,r.width=o}return r}return{render:function(i,r,a){var o=t.getTask(i.source);if(!o.hide_bar){var s=t.getTask(i.target);if(!s.hide_bar){var l=n.get_endpoint(i,r,o,s),c=l.e_y-l.y;if(!(l.e_x-l.x||c))return null;var u=n.get_points(i,r,o,s),d=e.get_lines(u,r),h=document.createElement("div"),f="gantt_task_link";i.color&&(f+=" gantt_link_inline_color");var _=t.templates.link_class?t.templates.link_class(i):"";_&&(f+=" "+_),a.highlight_critical_path&&t.isCriticalLink&&t.isCriticalLink(i)&&(f+=" gantt_critical_link"),h.className=f,r.$config.link_attribute&&(h.setAttribute(r.$config.link_attribute,i.id),h.setAttribute("link_id",i.id));for(var g=0;gv.end)&&u(t.id,y)}n[t.id]={};for(var k=v.start;k<=v.end;k++){var b=f(l,k,t,s,_,g,p,a);!b&&c(t,k)?u(t.id,k):b&&!b.parentNode&&i.appendChild(b)}}},getRectangle:i,getVisibleRange:a,prepareData:l}}},function(t,e,n){var i=n(28),r=n(19),a=n(6);t.exports=function(t){var e=i(t),n={};function o(t,e,n,i,a){var o=!0;return i.smart_rendering&&(o=r(t,e,n,i,a)),o}function s(n,i,r,a){var o=t.copy(t.getTask(i.id));if(o.$rendered_at=n.id,!1!==t.callEvent("onBeforeRollupTaskDisplay",[o.id,o,n.id])){var s=e(o,r);if(s){var l=r.getBarHeight(n.id,i.type==t.config.types.milestone),c=Math.floor((r.getItemHeight(n.id)-l)/2);return s.style.top=a.top+c+"px",s.classList.add("gantt_rollup_child"),s.setAttribute("data-rollup-parent-id",n.id),s}}}function l(t,e){return t+"_"+e}return{render:function(e,i,r,a){if(!1!==e.rollup&&e.$rollup&&e.$rollup.length){var c=document.createElement("div"),u=t.getTaskPosition(e);return a&&(a.y=0,a.y_end=t.$task_bg.scrollHeight),e.$rollup.forEach(function(d){if(t.isTaskExists(d)){var h=t.getTask(d);if(o(h,a,i,r,t)){var f=s(e,h,i,u);f?(n[l(h.id,e.id)]=f,c.appendChild(f)):n[l(h.id,e.id)]=!1}}}),c}return!1},update:function(e,i,r,a,c){var u=document.createElement("div"),d=t.getTaskPosition(e);c.y=0,c.y_end=t.$task_bg.scrollHeight,e.$rollup.forEach(function(h){var f=t.getTask(h),_=l(f.id,e.id),g=o(f,c,r,a,t);if(g!==!!n[_])if(g){var p=s(e,f,r,d);n[_]=p||!1}else n[_]=!1;n[_]&&u.appendChild(n[_]),i.innerHTML="",i.appendChild(u)})},isInViewPort:r,getVisibleRange:a}}},function(t,e,n){var i=n(19);t.exports=function(t,e,n,r,a){if(!a.isSplitTask(t))return!1;var o=a.getSubtaskDates(t.id);return i({id:t.id,start_date:o.start_date,end_date:o.end_date,parent:t.parent},e,n,a)}},function(t,e,n){var i=n(28),r=n(6),a=n(117),o=n(19);t.exports=function(t){var e=i(t),n={};function s(t,e,n,i,r){var a=!t.hide_bar;return i.smart_rendering&&a&&(a=o(t,e,n,i,r)),a}function l(n,i,r,a){if(!i.hide_bar){var o=t.isSummaryTask(i);o&&t.resetProjectDates(i);var s=t.copy(t.getTask(i.id));if(s.$rendered_at=n.id,!1!==t.callEvent("onBeforeSplitTaskDisplay",[s.id,s,n.id])){var l=e(s,r);if(l){var c=r.getBarHeight(n.id,i.type==t.config.types.milestone),u=Math.floor((r.getItemHeight(n.id)-c)/2);return l.style.top=a.top+u+"px",l.classList.add("gantt_split_child"),o&&l.classList.add("gantt_split_subproject"),l}}}}function c(t,e){return t+"_"+e}function u(e,n){return t.isSplitTask(e)&&(n.open_split_tasks&&!e.$open||!n.open_split_tasks)&&t.hasChild(e.id)}return{render:function(e,i,r,a){if(u(e,r)){var o=document.createElement("div"),d=t.getTaskPosition(e);return t.hasChild(e.id)&&t.eachTask(function(u){if(s(u,a,i,r,t)){var h=l(e,u,i,d);h?(n[c(u.id,e.id)]=h,o.appendChild(h)):n[c(u.id,e.id)]=!1}},e.id),o}return!1},update:function(e,i,r,a,o){if(u(e,a)){var d=document.createElement("div"),h=t.getTaskPosition(e);t.eachTask(function(u){var f=c(u.id,e.id),_=s(u,o,r,a,t);if(_!==!!n[f])if(_){var g=l(e,u,r,h);n[f]=g||!1}else n[f]=!1;n[f]&&d.appendChild(n[f]),i.innerHTML="",i.appendChild(d)},e.id)}},isInViewPort:a,getVisibleRange:r}}},function(t,e,n){var i=n(19),r=n(6),a=n(28);t.exports=function(t){return{render:a(t),update:null,isInViewPort:i,getVisibleRange:r}}},function(t,e){t.exports=function(t){return function(n,i,r){"keepDates"==r?function(e,n){"duration"==n?e.end_date=t.calculateEndDate(e):"end_date"!=n&&"start_date"!=n||(e.duration=t.calculateDuration(e))}(n,i):"keepDuration"==r?function(n,i){"end_date"==i?n.start_date=e(n):"start_date"!=i&&"duration"!=i||(n.end_date=t.calculateEndDate(n))}(n,i):function(n,i){t.config.schedule_from_end?"end_date"==i||"duration"==i?n.start_date=e(n):"start_date"==i&&(n.duration=t.calculateDuration(n)):"start_date"==i||"duration"==i?n.end_date=t.calculateEndDate(n):"end_date"==i&&(n.duration=t.calculateDuration(n))}(n,i)};function e(e){return t.calculateEndDate({start_date:e.end_date,duration:-e.duration,task:e})}}},function(t,e,n){t.exports=function(t){var e=n(10)(t),i=n(0);function r(){return e.apply(this,arguments)||this}function a(e){return e.formatter||t.ext.formatters.durationFormatter()}return n(3)(r,e),i.mixin(r.prototype,{show:function(t,e,n,i){var r="
");i.innerHTML=r},set_value:function(t,e,n,i){this.get_input(i).value=a(n.editor).format(t)},get_value:function(t,e,n){return a(e.editor).parse(this.get_input(n).value||"")}},!0),r}},function(t,e,n){t.exports=function(t){var e=n(10)(t),i=n(0);function r(){return e.apply(this,arguments)||this}function a(e){return e.formatter||t.ext.formatters.linkFormatter()}function o(t,e){for(var n=(t||"").split(e.delimiter||","),i=0;i");i.innerHTML=r},hide:function(){},set_value:function(e,n,i,r){this.get_input(r).value=s(e,i.editor,t)},get_value:function(t,e,n){return o(this.get_input(n).value||"",e.editor)},save:function(e,n,i){var r=c(t.getTask(e),this.get_value(e,n,i),n.editor);(r.add.length||r.remove.length)&&t.batchUpdate(function(){r.add.forEach(function(e){t.addLink(e)}),r.remove.forEach(function(e){t.deleteLink(e)}),t.autoSchedule&&t.autoSchedule()})},is_changed:function(e,n,i,r){var a=this.get_value(n,i,r),l=o(s(e,i.editor,t),i.editor);return a.join()!==l.join()}},!0),r}},function(t,e,n){t.exports=function(t){var e=n(10)(t),i=n(0),r="%Y-%m-%d",a=null,o=null;function s(){return e.apply(this,arguments)||this}return n(3)(s,e),i.mixin(s.prototype,{show:function(e,n,i,s){a||(a=t.date.date_to_str(r)),o||(o=t.date.str_to_date(r));var l=null,c=null;l="function"==typeof i.min?i.min(e,n):i.min,c="function"==typeof i.max?i.max(e,n):i.max;var u=l?" min='"+a(l)+"' ":"",d=c?" max='"+a(c)+"' ":"",h="
");s.innerHTML=h,s.oninput=function(e){+t.date.str_to_date("%Y-%m-%d")(e.target.value)<+l&&(e.target.value=t.date.date_to_str("%Y-%m-%d")(l)),+t.date.str_to_date("%Y-%m-%d")(e.target.value)>+c&&(e.target.value=t.date.date_to_str("%Y-%m-%d")(c))}},set_value:function(t,e,n,i){t&&t.getFullYear?this.get_input(i).value=a(t):this.get_input(i).value=t},is_valid:function(t,e,n,i){return!(!t||isNaN(t.getTime()))},get_value:function(t,e,n){var i;try{i=o(this.get_input(n).value||"")}catch(t){i=null}return i}},!0),s}},function(t,e,n){t.exports=function(t){var e=n(10)(t),i=n(0);function r(){return e.apply(this,arguments)||this}return n(3)(r,e),i.mixin(r.prototype,{show:function(t,e,n,i){for(var r="
",i.innerHTML=r},get_input:function(t){return t.querySelector("select")}},!0),r}},function(t,e,n){t.exports=function(t){var e=n(10)(t),i=n(0);function r(){return e.apply(this,arguments)||this}return n(3)(r,e),i.mixin(r.prototype,{show:function(t,e,n,i){var r=n.min||0,a=n.max||100,o="
");i.innerHTML=o,i.oninput=function(t){+t.target.valuea&&(t.target.value=a)}},get_value:function(t,e,n){return this.get_input(n).value||""},is_valid:function(t,e,n,i){return!isNaN(parseInt(t,10))}},!0),r}},function(t,e,n){t.exports=function(t){var e=n(10)(t),i=n(0);function r(){return e.apply(this,arguments)||this}return n(3)(r,e),i.mixin(r.prototype,{show:function(t,e,n,i){var r="
");i.innerHTML=r}},!0),r}},function(t,e){t.exports={init:function(t,e){var n=t,i=e.$gantt,r=null,a=i.ext.keyboardNavigation;a.attachEvent("onBeforeFocus",function(e){var i=t.locateCell(e);if(clearTimeout(r),i){var a=i.columnName,o=i.id,s=n.getState();if(n.isVisible()&&s.id==o&&s.columnName===a)return!1}return!0}),a.attachEvent("onFocus",function(e){var i=t.locateCell(e),a=t.getState();return clearTimeout(r),!i||i.id==a.id&&i.columnName==a.columnName||n.isVisible()&&n.save(),!0}),t.attachEvent("onHide",function(){clearTimeout(r)}),a.attachEvent("onBlur",function(){return r=setTimeout(function(){n.save()}),!0}),i.attachEvent("onTaskDblClick",function(e,n){var i=t.getState(),r=t.locateCell(n.target);return!r||!t.isVisible()||r.columnName!=i.columnName}),i.attachEvent("onTaskClick",function(e,n){if(i._is_icon_open_click(n))return!0;var r=t.getState(),a=t.locateCell(n.target);return!a||!t.getEditorConfig(a.columnName)||(t.isVisible()&&r.id==a.id&&r.columnName==a.columnName||t.startEdit(a.id,a.columnName),!1)}),i.attachEvent("onEmptyClick",function(){return n.save(),!0}),a.attachEvent("onKeyDown",function(e,r){var o=t.locateCell(r.target),s=!!o&&t.getEditorConfig(o.columnName),l=t.getState(),c=i.constants.KEY_CODES,u=r.keyCode,d=!1;switch(u){case c.ENTER:t.isVisible()?(t.save(),r.preventDefault(),d=!0):s&&!(r.ctrlKey||r.metaKey||r.shiftKey)&&(n.startEdit(o.id,o.columnName),r.preventDefault(),d=!0);break;case c.ESC:t.isVisible()&&(t.hide(),r.preventDefault(),d=!0);break;case c.UP:case c.DOWN:break;case c.LEFT:case c.RIGHT:(s&&t.isVisible()||"date"===l.editorType)&&(d=!0);break;case c.SPACE:t.isVisible()&&(d=!0),s&&!t.isVisible()&&(n.startEdit(o.id,o.columnName),r.preventDefault(),d=!0);break;case c.DELETE:s&&!t.isVisible()?(n.startEdit(o.id,o.columnName),d=!0):s&&t.isVisible()&&(d=!0);break;case c.TAB:if(t.isVisible()){r.shiftKey?t.editPrevCell(!0):t.editNextCell(!0);var h=t.getState();h.id&&a.focus({type:"taskCell",id:h.id,column:h.columnName}),r.preventDefault(),d=!0}break;default:if(t.isVisible())d=!0;else if(u>=48&&u<=57||u>95&&u<112||u>=64&&u<=91||u>185&&u<193||u>218&&u<223){var f=e.modifiers,_=f.alt||f.ctrl||f.meta||f.shift;f.alt||_&&a.getCommandHandler(e,"taskCell")||s&&!t.isVisible()&&(n.startEdit(o.id,o.columnName),d=!0)}}return!d})},onShow:function(t,e,n){},onHide:function(t,e,n){var i=n.$gantt;i&&i.focus()},destroy:function(){}}},function(t,e){t.exports={init:function(t,e){var n=e.$gantt;n.attachEvent("onTaskClick",function(e,i){if(n._is_icon_open_click(i))return!0;var r=t.getState(),a=t.locateCell(i.target);return!a||!t.getEditorConfig(a.columnName)||(t.isVisible()&&r.id==a.id&&r.columnName==a.columnName||t.startEdit(a.id,a.columnName),!1)}),n.attachEvent("onEmptyClick",function(){return t.isVisible()&&t.isChanged()?t.save():t.hide(),!0}),n.attachEvent("onTaskDblClick",function(e,n){var i=t.getState(),r=t.locateCell(n.target);return!r||!t.isVisible()||r.columnName!=i.columnName})},onShow:function(t,e,n){var i=n.$gantt;i.ext&&i.ext.keyboardNavigation&&i.ext.keyboardNavigation.attachEvent("onKeyDown",function(e,n){var r=i.constants.KEY_CODES,a=!1;switch(n.keyCode){case r.SPACE:t.isVisible()&&(a=!0)}return!a});e.onkeydown=function(e){e=e||window.event;var n=i.constants.KEY_CODES;if(!(e.defaultPrevented||e.shiftKey&&e.keyCode!=n.TAB)){var r=!0;switch(e.keyCode){case i.keys.edit_save:t.save();break;case i.keys.edit_cancel:t.hide();break;case n.UP:case n.DOWN:t.isVisible()&&(t.hide(),r=!1);break;case n.TAB:e.shiftKey?t.editPrevCell(!0):t.editNextCell(!0);break;default:r=!1}r&&e.preventDefault()}}},onHide:function(){},destroy:function(){}}},function(t,e,n){var i=n(128),r=n(127);t.exports=function(t){var e=null;return{setMapping:function(t){e=t},getMapping:function(){return e||(t.config.keyboard_navigation_cells&&t.ext.keyboardNavigation?r:i)}}}},function(t,e,n){var i=n(129),r=n(126),a=n(125),o=n(124),s=n(123),l=n(122),c=n(121),u=n(0),d=n(1),h=n(5),f=n(120);function _(t){t.config.editor_types={text:new(r(t)),number:new(a(t)),select:new(o(t)),date:new(s(t)),predecessor:new(l(t)),duration:new(c(t))}}t.exports=function(t){var e=i(t),n={};h(n);var r={init:_,createEditors:function(i){function r(e,n){var r=i.$getConfig(),a=function(t,e){for(var n=i.$getConfig(),r=i.getItemTop(t),a=i.getItemHeight(t),o=i.getGridColumns(),s=0,l=0,c=0,u=0;u0?t.getNext:t.getPrev,i=(n=t.bind(n,t))(this._itemId);t.isTaskExists(i)&&t.isReadonly(t.getTask(i));)i=n(i);return i},editNextRow:function(e){var n=this.getState().id;if(t.isTaskExists(n)){var i=null;i=e?this.moveRow(1):t.getNext(n),t.isTaskExists(i)&&this.startEdit(i,this._columnName)}},editPrevRow:function(e){var n=this.getState().id;if(t.isTaskExists(n)){var i=null;i=e?this.moveRow(-1):t.getPrev(n),t.isTaskExists(i)&&this.startEdit(i,this._columnName)}},destructor:function(){o.forEach(function(t){l.detachEvent(t)}),s.forEach(function(e){t.detachEvent(e)}),o=[],s=[],l=null,this.hide(),this.detachAllEvents()}};return u.mixin(c,e),u.mixin(c,n),c}};return u.mixin(r,e),u.mixin(r,n),r}},function(t,e){t.exports={create:function(){return{render:function(){},destroy:function(){}}}}},function(t,e,n){var i=n(3),r=n(1),a=n(0),o=n(11),s=function(t){"use strict";var e=["altKey","shiftKey","metaKey"];function n(e,n,i,r){var o=t.apply(this,arguments)||this;this.$config=a.mixin(n,{scroll:"x"}),o._scrollHorizontalHandler=a.bind(o._scrollHorizontalHandler,o),o._scrollVerticalHandler=a.bind(o._scrollVerticalHandler,o),o._outerScrollVerticalHandler=a.bind(o._outerScrollVerticalHandler,o),o._outerScrollHorizontalHandler=a.bind(o._outerScrollHorizontalHandler,o),o._mouseWheelHandler=a.bind(o._mouseWheelHandler,o),this.$config.hidden=!0;var s=r.config.scroll_size;return r.env.isIE&&(s+=1),this._isHorizontal()?(o.$config.height=s,o.$parent.$config.height=s):(o.$config.width=s,o.$parent.$config.width=s),this.$config.scrollPosition=0,o.$name="scroller",o}return i(n,t),n.prototype.init=function(t){t.innerHTML=this.$toHTML(),this.$view=t.firstChild,this.$view||this.init(),this._isVertical()?this._initVertical():this._initHorizontal(),this._initMouseWheel(),this._initLinkedViews()},n.prototype.$toHTML=function(){return"
"},n.prototype._getRootParent=function(){for(var t=this.$parent;t&&t.$parent;)t=t.$parent;if(t)return t},n.prototype._eachView=function(){var t=[];return function t(e,n){if(n.push(e),e.$cells)for(var i=0;id[s]&&d[o]>e&&u>d[s]-l+2&&(e=u+(i?0:2),n=d[s]);else{var h=Math.max(d[o]-u,0);(u+=h)>Math.max(d[s]-h,0)&&u>e&&(e=u,n=d[s])}}return{outerScroll:n,innerScroll:e}},n.prototype.scroll=function(t){this._isHorizontal()?this.scrollHorizontally(t):this.scrollVertically(t)},n.prototype.getScrollState=function(){return{visible:this.isVisible(),direction:this.$config.scroll,size:this.$config.outerSize,scrollSize:this.$config.scrollSize||0,position:this.$config.scrollPosition||0}},n.prototype.setSize=function(e,n){t.prototype.setSize.apply(this,arguments);var i=this._getScrollSize(),r=(this._isVertical()?n:e)-this._getScrollOffset()+(this._isHorizontal()?1:0);i.innerScroll&&r>i.outerScroll&&(i.innerScroll+=r-i.outerScroll),this.$config.scrollSize=i.innerScroll,this.$config.width=e,this.$config.height=n,this._setScrollSize(i.innerScroll)},n.prototype.isVisible=function(){return!(!this.$parent||!this.$parent.$view.parentNode)},n.prototype.shouldShow=function(){var t=this._getScrollSize();return!(!t.innerScroll&&this.$parent&&this.$parent.$view.parentNode)&&!(!t.innerScroll||this.$parent&&this.$parent.$view.parentNode)},n.prototype.shouldHide=function(){return!(this._getScrollSize().innerScroll||!this.$parent||!this.$parent.$view.parentNode)},n.prototype.toggleVisibility=function(){this.shouldHide()?this.hide():this.shouldShow()&&this.show()},n.prototype._getScaleOffset=function(t){var e=0;return!t||"timeline"!=t.$config.view&&"grid"!=t.$config.view||(e=t.$content.$getConfig().scale_height),e},n.prototype._getScrollOffset=function(){var t=0;if(this._isVertical()){var e=this.$parent.$parent;t=Math.max(this._getScaleOffset(e.getPrevSibling(this.$parent.$id)),this._getScaleOffset(e.getNextSibling(this.$parent.$id)))}else for(var n=this._getLinkedViews(),i=0;i=0&&(!t[f]||t.deltaX||t.wheelDeltaX||(d=2*h,h=0)),d&&Math.abs(d)>Math.abs(h)){if(this._isVertical())return;if(i.x)return!0;if(!this.$scroll_hor||!this.$scroll_hor.offsetWidth)return!0;var _=d/-40,g=this._oldLeft,p=g+30*_;if(this.scrollHorizontally(p),this.$scroll_hor.scrollLeft=p,g==this.$scroll_hor.scrollLeft)return!0;this._oldLeft=this.$scroll_hor.scrollLeft}else{if(this._isHorizontal())return;if(i.y)return!0;if(!this.$scroll_ver||!this.$scroll_ver.offsetHeight)return!0;_=h/-40;void 0===h&&(_=t.detail);var v=this._oldTop,m=this.$scroll_ver.scrollTop+30*_;if(this.scrollVertically(m),this.$scroll_ver.scrollTop=m,v==this.$scroll_ver.scrollTop)return!0;this._oldTop=this.$scroll_ver.scrollTop}return t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,!1}},n}(n(14));t.exports=s},function(t,e){t.exports=null},function(t,e,n){var i=n(3),r=n(0),a=function(t){"use strict";function e(e,n,i){var a=t.apply(this,arguments)||this;if(n.view){n.id&&(this.$id=r.uid());var o=r.copy(n);if(delete o.config,delete o.templates,this.$content=this.$factory.createView(n.view,this,o,this),!this.$content)return!1}return a.$name="viewCell",a}return i(e,t),e.prototype.destructor=function(){this.clear(),t.prototype.destructor.call(this)},e.prototype.clear=function(){if(this.$initialized=!1,this.$content){var e=this.$content.unload||this.$content.destructor;e&&e.call(this.$content)}t.prototype.clear.call(this)},e.prototype.scrollTo=function(e,n){this.$content&&this.$content.scrollTo?this.$content.scrollTo(e,n):t.prototype.scrollTo.call(this,e,n)},e.prototype._setContentSize=function(t,e){var n=this._getBorderSizes();if("number"==typeof t){var i=t+n.horizontal;this.$config.width=i}if("number"==typeof e){var r=e+n.vertical;this.$config.height=r}},e.prototype.setSize=function(e,n){if(t.prototype.setSize.call(this,e,n),!this.$preResize&&this.$content&&!this.$initialized){this.$initialized=!0;var i=this.$view.childNodes[0],r=this.$view.childNodes[1];r||(r=i),this.$content.init(r)}},e.prototype.setContentSize=function(){!this.$preResize&&this.$content&&this.$initialized&&this.$content.setSize(this.$lastSize.contentX,this.$lastSize.contentY)},e.prototype.getContentSize=function(){var e=t.prototype.getContentSize.call(this);if(this.$content&&this.$initialized){var n=this.$content.getSize();e.width=void 0===n.contentX?n.width:n.contentX,e.height=void 0===n.contentY?n.height:n.contentY}var i=this._getBorderSizes();return e.width+=i.horizontal,e.height+=i.vertical,e},e}(n(14));t.exports=a},function(t,e,n){var i=n(3),r=n(38),a=n(14),o=function(t){"use strict";function e(e,n,i){for(var r=t.apply(this,arguments)||this,a=0;at.x_end||e.left+e.widtht.y_end||e.top+e.height-1&&r.click?r.click():(o(n,!0),i=!0)}27==e&&(o(n,!1),i=!0)}return i?(t.preventDefault&&t.preventDefault(),!(t.cancelBubble=!0)):void 0}}var l=a.getRootNode(t.$root)||document;function c(t){c.cover||(c.cover=document.createElement("div"),c.cover.onkeydown=s,c.cover.className="dhx_modal_cover",document.body.appendChild(c.cover)),c.cover.style.display=t?"inline-block":"none"}function u(e,n,i){return"
"+e+"
"}function d(e){k.area||(k.area=document.createElement("div"),k.area.className="gantt_message_area",k.area.style[k.position]="5px",document.body.appendChild(k.area)),k.hide(e.id);var n=document.createElement("div");return n.innerHTML="
"+e.text+"
",n.className="gantt-info gantt-"+e.type,n.onclick=function(){k.hide(e.id),e=null},t._waiAria.messageInfoAttr(n),"bottom"==k.position&&k.area.firstChild?k.area.insertBefore(n,k.area.firstChild):k.area.appendChild(n),e.expire>0&&(k.timers[e.id]=window.setTimeout(function(){k&&k.hide(e.id)},e.expire)),k.pull[e.id]=n,n=null,e.id}function h(){for(var t=[].slice.apply(arguments,[0]),e=0;e'+s.title+""),_+='
'+(s.content?"":s.text)+'
',l&&(_+=u(h(s.ok,t.locale.labels.message_ok,"OK"),"ok",!0)),c&&(_+=u(h(s.cancel,t.locale.labels.message_cancel,"Cancel"),"cancel",!1)),s.buttons)for(var g=0;g",d.innerHTML=_,s.content){var v=s.content;"string"==typeof v&&(v=document.getElementById(v)),"none"==v.style.display&&(v.style.display=""),d.childNodes[s.title?1:0].appendChild(v)}return d.onclick=function(t){var e=t.target||t.srcElement;if(e.className||(e=e.parentNode),a.closest(e,".gantt_popup_button")){var n=e.getAttribute("data-result");o(s,n="true"==n||"false"!=n&&n)}},s.box=d,(l||c)&&(n=s),d}(l,d,f);l.hidden||c(!0),document.body.appendChild(_);var g=Math.abs(Math.floor(((window.innerWidth||document.documentElement.offsetWidth)-_.offsetWidth)/2)),p=Math.abs(Math.floor(((window.innerHeight||document.documentElement.offsetHeight)-_.offsetHeight)/2));return"top"==l.position?_.style.top="-3px":_.style.top=p+"px",_.style.left=g+"px",_.onkeydown=s,y.focus(_),l.hidden&&y.hide(_),t.callEvent("onMessagePopup",[_]),_}function _(t){return f(t,!0,!1)}function g(t){return f(t,!0,!0)}function p(t){return f(t)}function v(t,e,n){return"object"!=i(t)&&("function"==typeof e&&(n=e,e=""),t={text:t,type:e,callback:n}),t}function m(t,e,n,a){return"object"!=i(t)&&(t={text:t,type:e,expire:n,id:a}),t.id=t.id||r.uid(),t.expire=t.expire||k.expire,t}t.event(l,"keydown",s,!0);var y=function(){var t=v.apply(this,arguments);return t.type=t.type||"alert",p(t)};y.hide=function(n){for(;n&&n.getAttribute&&!n.getAttribute(e);)n=n.parentNode;n&&(n.parentNode.removeChild(n),c(!1),t.callEvent("onAfterMessagePopup",[n]))},y.focus=function(t){setTimeout(function(){var e=a.getFocusableNodes(t);e.length&&e[0].focus&&e[0].focus()},1)};var k=function(t,e,n,i){switch((t=m.apply(this,arguments)).type=t.type||"info",t.type.split("-")[0]){case"alert":return _(t);case"confirm":return g(t);case"modalbox":return p(t);default:return d(t)}};k.seed=(new Date).valueOf(),k.uid=r.uid,k.expire=4e3,k.keyboard=!0,k.position="top",k.pull={},k.timers={},k.hideAll=function(){for(var t in k.pull)k.hide(t)},k.hide=function(t){var e=k.pull[t];e&&e.parentNode&&(window.setTimeout(function(){e.parentNode.removeChild(e),e=null},2e3),e.className+=" hidden",k.timers[t]&&window.clearTimeout(k.timers[t]),delete k.pull[t])};var b=[];return t.attachEvent("onMessagePopup",function(t){b.push(t)}),t.attachEvent("onAfterMessagePopup",function(t){for(var e=0;e3600&&o<86400){var s=e.getTimezoneOffset()-n;s&&(e=t.date.add(e,s,"minute"))}return e},t.isSplitTask=function(e){return t.assert(e&&e instanceof Object,"Invalid argument task="+e+" of gantt.isSplitTask. Task object was expected"),this.$data.tasksStore._isSplitItem(e)},t._is_icon_open_click=function(t){if(!t)return!1;var e=t.target||t.srcElement;if(!e||!e.className)return!1;var n=r.getClassName(e);return-1!==n.indexOf("gantt_tree_icon")&&(-1!==n.indexOf("gantt_close")||-1!==n.indexOf("gantt_open"))}}},function(t,e){t.exports=function(t){function e(){return t._cached_functions.update_if_changed(t),t._cached_functions.active||t._cached_functions.activate(),!0}t._cached_functions={cache:{},mode:!1,critical_path_mode:!1,wrap_methods:function(t,e){if(e._prefetch_originals)for(var n in e._prefetch_originals)e[n]=e._prefetch_originals[n];e._prefetch_originals={};for(n=0;ntask="+e+" of gantt.isUnscheduledTask. Task object was expected"),!!e.unscheduled||!e.start_date},t._isAllowedUnscheduledTask=function(e){return!(!e.unscheduled||!t.config.show_unscheduled)},t._isTaskInTimelineLimits=function(t){var e=t.start_date?t.start_date.valueOf():null,n=t.end_date?t.end_date.valueOf():null;return!!(e&&n&&e<=this._max_date.valueOf()&&n>=this._min_date.valueOf())},t.isTaskVisible=function(t){if(!this.isTaskExists(t))return!1;var e=this.getTask(t);return!(!this._isAllowedUnscheduledTask(e)&&!this._isTaskInTimelineLimits(e))&&!!(this.getGlobalTaskIndex(t)>=0)},t._getProjectEnd=function(){if(t.config.project_end)return t.config.project_end;var e=t.getTaskByTime();return(e=e.sort(function(t,e){return+t.end_date>+e.end_date?1:-1})).length?e[e.length-1].end_date:null},t._getProjectStart=function(){if(t.config.project_start)return t.config.project_start;if(t.config.start_date)return t.config.start_date;if(t.getState().min_date)return t.getState().min_date;var e=t.getTaskByTime();return(e=e.sort(function(t,e){return+t.start_date>+e.start_date?1:-1})).length?e[0].start_date:null};var e=function e(n,i){var r=!!(i&&i!=t.config.root_id&&t.isTaskExists(i))&&t.getTask(i),a=null;if(r)if(t.config.schedule_from_end)a=t.calculateEndDate({start_date:r.end_date,duration:-t.config.duration_step,task:n});else{if(!r.start_date)return e(r,t.getParent(r));a=r.start_date}else if(t.config.schedule_from_end)a=t.calculateEndDate({start_date:t._getProjectEnd(),duration:-t.config.duration_step,task:n});else{var o=t.getTaskByIndex(0),s=t.config.start_date||t.getState().min_date;a=o?o.start_date?o.start_date:o.end_date?t.calculateEndDate({start_date:o.end_date,duration:-t.config.duration_step,task:n}):s:s}return t.assert(a,"Invalid dates"),new Date(a)};t._set_default_task_timing=function(n){n.start_date=n.start_date||e(n,t.getParent(n)),n.duration=n.duration||t.config.duration_step,n.end_date=n.end_date||t.calculateEndDate(n)},t.createTask=function(n,i,r){(n=n||{},t.defined(n.id)||(n.id=t.uid()),n.start_date||(n.start_date=e(n,i)),void 0===n.text&&(n.text=t.locale.labels.new_task),void 0===n.duration&&(n.duration=1),this.isTaskExists(i))&&(this.setParent(n,i,!0),this.getTask(i).$open=!0);if(!this.callEvent("onTaskCreated",[n]))return null;if(this.config.details_on_create){if(t.isTaskExists(n.id))t.getTask(n.id).$index!=n.$index&&(n.start_date&&"string"==typeof n.start_date&&(n.start_date=this.date.parseDate(n.start_date,"parse_date")),n.end_date&&"string"==typeof n.end_date&&(n.end_date=this.date.parseDate(n.end_date,"parse_date")),this.$data.tasksStore.updateItem(n.id,n));else n.$new=!0,this.silent(function(){t.$data.tasksStore.addItem(n,r)});this.selectTask(n.id),this.refreshData(),this.showLightbox(n.id)}else this.addTask(n,i,r)&&(this.showTask(n.id),this.selectTask(n.id));return n.id},t._update_flags=function(e,n){var i=t.$data.tasksStore;void 0===e?(this._lightbox_id=null,i.silent(function(){i.unselect()}),this.getSelectedTasks&&this._multiselect.reset(),this._tasks_dnd&&this._tasks_dnd.drag&&(this._tasks_dnd.drag.id=null)):(this._lightbox_id==e&&(this._lightbox_id=n),i.getSelectedId()==e&&i.silent(function(){i.unselect(e),i.select(n)}),this._tasks_dnd&&this._tasks_dnd.drag&&this._tasks_dnd.drag.id==e&&(this._tasks_dnd.drag.id=n))};var n=function(e,n){var i=t.getTaskType(e.type),r={type:i,$no_start:!1,$no_end:!1};return n||i!=e.$rendered_type?(i==t.config.types.project?r.$no_end=r.$no_start=!0:i!=t.config.types.milestone&&(r.$no_end=!(e.end_date||e.duration),r.$no_start=!e.start_date,t._isAllowedUnscheduledTask(e)&&(r.$no_end=r.$no_start=!1)),r):(r.$no_start=e.$no_start,r.$no_end=e.$no_end,r)};function r(e){e.$effective_calendar=t.getTaskCalendar(e).id,e.start_date=t.getClosestWorkTime({dir:"future",date:e.start_date,unit:t.config.duration_unit,task:e}),e.end_date=t.calculateEndDate(e)}function a(e){var n=null,i=null,r=void 0!==e?e:t.config.root_id,a=[];return t.eachTask(function(e){t.getTaskType(e.type)==t.config.types.project||t.isUnscheduledTask(e)||(e.rollup&&a.push(e.id),e.start_date&&!e.$no_start&&(!n||n>e.start_date.valueOf())&&(n=e.start_date.valueOf()),e.end_date&&!e.$no_end&&(!i||itask="+e+" of gantt.isSummaryTask. Task object was expected");var i=n(e);return!(!i.$no_end&&!i.$no_start)},t.resetProjectDates=function(t){var i=n(t);if(i.$no_end||i.$no_start){var r=a(t.id);(function(t,n,i,r){n.$no_start&&(t.start_date=i?new Date(i):e(t,this.getParent(t)));n.$no_end&&(t.end_date=r?new Date(r):this.calculateEndDate({start_date:t.start_date,duration:this.config.duration_step,task:t}));(n.$no_start||n.$no_end)&&this._init_task_timing(t)}).call(this,t,i,r.start_date,r.end_date),t.$rollup=r.rollup}},t.getSubtaskDuration=function(e){var n=0,i=void 0!==e?e:t.config.root_id;return this.eachTask(function(e){this.getTaskType(e.type)==t.config.types.project||this.isUnscheduledTask(e)||(n+=e.duration)},i),n},t.getSubtaskDates=function(t){var e=a(t);return{start_date:e.start_date,end_date:e.end_date}},t._update_parents=function(e,i,r){if(e){var a=this.getTask(e);a.rollup&&(r=!0);var o=this.getParent(a),s=n(a),l=!0;if(r||a.start_date&&a.end_date&&(s.$no_start||s.$no_end)){var c=a.start_date.valueOf(),u=a.end_date.valueOf();t.resetProjectDates(a),r||c!=a.start_date.valueOf()||u!=a.end_date.valueOf()||(l=!1),l&&!i&&this.refreshTask(a.id,!0)}l&&o&&this.isTaskExists(o)&&this._update_parents(o,i,r)}},t.roundDate=function(e){var n=t.getScale();i.isDate(e)&&(e={date:e,unit:n?n.unit:t.config.duration_unit,step:n?n.step:t.config.duration_step});var r,a,o,s=e.date,l=e.step,c=e.unit;if(!n)return s;if(c==n.unit&&l==n.step&&+s>=+n.min_date&&+s<=+n.max_date)o=Math.floor(t.columnIndexByDate(s)),n.trace_x[o]||(o-=1,n.rtl&&(o=0)),a=new Date(n.trace_x[o]),r=t.date.add(a,l,c);else{for(o=Math.floor(t.columnIndexByDate(s)),r=t.date[c+"_start"](new Date(n.min_date)),n.trace_x[o]&&(r=t.date[c+"_start"](n.trace_x[o]));+r<+s;){var u=(r=t.date[c+"_start"](t.date.add(r,l,c))).getTimezoneOffset();r=t._correct_dst_change(r,u,r,c),t.date[c+"_start"]&&(r=t.date[c+"_start"](r))}a=t.date.add(r,-1*l,c)}return e.dir&&"future"==e.dir?r:e.dir&&"past"==e.dir?a:Math.abs(s-a)1e6&&this._resetTimestampCache();var e=null;if(t.day||0===t.day)e=t.day;else if(t.date){var n=String(t.date.valueOf());this._cached_timestamps[n]?e=this._cached_timestamps[n]:(e=Date.UTC(t.date.getFullYear(),t.date.getMonth(),t.date.getDate()),this._cached_timestamps[n]=e,this._cached_timestamps_count++)}return e},_checkIfWorkingUnit:function(t,e){if(!this["_is_work_"+e]){var n=this.$gantt.date["".concat(e,"_start")](new Date(t)),i=this.$gantt.date.add(n,1,e);return this.hasDuration(n,i)}return this["_is_work_"+e](t)},_is_work_day:function(t){var e=this._getWorkHours(t);return!!Array.isArray(e)&&e.length>0},_is_work_hour:function(t){for(var e=this._getWorkHours(t),n=t.getHours(),i=0;i=e[i].startHour&&n=e[i].start&&no.valueOf(),this._isWorkTime(a,n))(d||h&&f)&&(s=r[n+"_start"](new Date(a)),l=r.add(s,i,n)),d?(d=!1,u=this._nextDate(s,n,i),c+=(l.valueOf()-a.valueOf())/(l.valueOf()-s.valueOf())):h&&f?(h=!1,c+=(o.valueOf()-a.valueOf())/(l.valueOf()-s.valueOf())):c++;else{var _=this._getUnitOrder(n),g=this.units[_-1];g&&!this._isWorkTime(a,g)&&(u=this._getClosestWorkTimeFuture(a,g))}a=u}return c},_getMinutesPerHour:function(t){var e=this._getTimeOfDayStamp(t),n=this._getTimeOfDayStamp(this._nextDate(t,"hour",1));0===n&&(n=86400);for(var i=this._getWorkHours(t),r=0;r=a.start&&n<=a.end)return 60;if(ea.start)return(Math.min(n,a.end)-Math.max(e,a.start))/60}return 0},_getMinutesPerDay:function(t){var e=0;return this._getWorkHours(t).forEach(function(t){e+=t.durationMinutes}),e},getHoursPerDay:function(t){var e=0;return this._getWorkHours(t).forEach(function(t){e+=t.durationHours}),e},_getWorkUnitsForRange:function(t,e,n,i){var r,a=0,s=new Date(t),l=new Date(e);for(r="minute"==n?o.bind(this._getMinutesPerDay,this):o.bind(this.getHoursPerDay,this);s.valueOf()27648e5&&0===s.getDate()){var c=this._largeUnitsCache.getMinutesPerMonth(s);"hour"==n&&(c/=60),a+=c,s=this.$gantt.date.add(s,1,"month")}else{if(l-s>13824e5){var u=this.$gantt.date.week_start(new Date(s));if(s.valueOf()===u.valueOf()){c=this._largeUnitsCache.getMinutesPerWeek(s);"hour"==n&&(c/=60),a+=c,s=this.$gantt.date.add(s,7,"day");continue}}a+=r(s),s=this._nextDate(s,"day",1)}return a/i},_getMinutesBetweenSingleDay:function(t,e){for(var n=this._getIntervalTimestamp(t,e),i=this._getWorkHours(t),r=0,a=0;a=o.start&&n.start<=o.end){var s=Math.max(o.start,n.start),l=Math.min(o.end,n.end);r+=(l-s)/60,n.start=l}}return Math.floor(r)},_getMinutesBetween:function(t,e,n,i){var r=new Date(t),a=new Date(e);i=i||1;var o=new Date(r),s=this.$gantt.date.add(this.$gantt.date.day_start(new Date(r)),1,"day");if(a.valueOf()<=s.valueOf())return this._getMinutesBetweenSingleDay(t,e);var l=this.$gantt.date.day_start(new Date(a)),c=a,u=this._getMinutesBetweenSingleDay(o,s),d=this._getMinutesBetweenSingleDay(l,c);return u+this._getWorkUnitsForRange(s,l,n,i)+d},_getHoursBetween:function(t,e,n,i){var r=new Date(t),a=new Date(e);i=i||1;var o=new Date(r),s=this.$gantt.date.add(this.$gantt.date.day_start(new Date(r)),1,"day");if(a.valueOf()<=s.valueOf())return Math.round(this._getMinutesBetweenSingleDay(t,e)/60);var l=this.$gantt.date.day_start(new Date(a)),c=a,u=this._getMinutesBetweenSingleDay(o,s,n,i)/60,d=this._getMinutesBetweenSingleDay(l,c,n,i)/60,h=u+this._getWorkUnitsForRange(s,l,n,i)+d;return Math.round(h)},getConfig:function(){return this._worktime},_setConfig:function(t){this._worktime=t,this._parseSettings(),this._clearCaches()},_parseSettings:function(){var t=this.getConfig();for(var e in t.parsed={dates:{},hours:null,haveCustomWeeks:!1,customWeeks:{},customWeeksRangeStart:null,customWeeksRangeEnd:null,customWeeksBoundaries:[]},t.parsed.hours=this._parseHours(t.hours),t.dates)t.parsed.dates[e]=this._parseHours(t.dates[e]);if(t.customWeeks){var n=null,i=null;for(var e in t.customWeeks){var r=t.customWeeks[e];if(r.from&&r.to){var a=r.from,o=r.to;(!n||n>a.valueOf())&&(n=a.valueOf()),(!i||ii)for(var r=0;ri){n=n.customWeeks[n.customWeeksBoundaries[r].name];break}var a=!0;return void 0!==n.dates[i]?a=n.dates[i]:void 0!==n.dates[t.getDay()]&&(a=n.dates[t.getDay()]),!0===a?n.hours:a||[]},_getIntervalTimestamp:function(t,e){var n={start:0,end:0};n.start=60*t.getHours()*60+60*t.getMinutes()+t.getSeconds();var i=e.getHours();return!i&&!e.getMinutes()&&!e.getSeconds()&&t.valueOf()e.valueOf()){var o=e;e=t,t=o,a=-1}return r="hour"==n&&1==i?this._getHoursBetween(t,e,n,i):"minute"==n&&1==i?this._getMinutesBetween(t,e,n,i):this._getWorkUnitsBetweenGeneric(t,e,n,i),a*Math.round(r)},hasDuration:function(){var t=this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper,arguments),e=t.start_date,n=t.end_date,i=t.unit,r=t.step;if(!i)return!1;var a=new Date(e),o=new Date(n);for(r=r||1;a.valueOf()=0?1:-1;n=Math.abs(1*n);var o=this;return this._dateDurationCache.getEndDate(e,n,i,r*a,function(){return o._calculateEndDate(e,n,i,r*a)})},_calculateEndDate:function(t,e,n,i){return!!n&&(1==i&&"minute"==n?this._calculateMinuteEndDate(t,e,i):-1==i&&"minute"==n?this._subtractMinuteDate(t,e,i):1==i&&"hour"==n?this._calculateHourEndDate(t,e,i):this._addInterval(t,e,n,i,null).end)},_addInterval:function(t,e,n,i,r){for(var a=0,o=t,s=!1;a0&&(c=new Date(l.valueOf()-1)),this._isWorkTime(c,n)&&!s&&a++,o=l}return{end:o,start:t,added:a}},_addHoursUntilDayEnd:function(t,e){for(var n=this.$gantt.date.add(this.$gantt.date.day_start(new Date(t)),1,"day"),i=0,r=e,a=this._getIntervalTimestamp(t,n),o=this._getWorkHours(t),s=0;s=l.start&&a.start<=l.end){var c=Math.max(l.start,a.start),u=Math.min(l.end,a.end),d=(u-c)/3600;d>r&&(d=r,u=c+60*r*60);var h=Math.round((u-c)/3600);i+=h,r-=h,a.start=u}}var f=n;return i===e&&(f=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,a.start)),{added:i,end:f}},_calculateHourEndDate:function(t,e,n){var i=new Date(t),r=0;n=n||1,e=Math.abs(1*e);var a=this._addHoursUntilDayEnd(i,e);if(r=a.added,i=a.end,c=e-r){for(var o=i;r0?this.getHoursPerDay(new Date(s.valueOf()-1)):this.getHoursPerDay(new Date(s.valueOf()+1)))>=e)break;r+=l,o=s}i=o}if(r=l.start&&a.start<=l.end){var c=Math.max(l.start,a.start),u=Math.min(l.end,a.end),d=(u-c)/60;d>r&&(d=r,u=c+60*r);var h=Math.round((u-c)/60);r-=h,i+=h,a.start=u}}var f=n;return i===e&&(f=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,a.start)),{added:i,end:f}},_subtractMinutesUntilHourStart:function(t,e){for(var n=this.$gantt.date.hour_start(new Date(t)),i=0,r=e,a=60*n.getHours()*60+60*n.getMinutes()+n.getSeconds(),o=60*t.getHours()*60+60*t.getMinutes()+t.getSeconds(),s=this._getWorkHours(t),l=s.length-1;l>=0&&ic.start&&a<=c.end){var u=Math.min(o,c.end),d=Math.max(a,c.start),h=(u-d)/60;h>r&&(h=r,d=u-60*r);var f=Math.abs(Math.round((u-d)/60));r-=f,i+=f,o=d}}var _=n;return i===e&&(_=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,o)),{added:i,end:_}},_subtractMinuteDate:function(t,e,n){var i=new Date(t),r=0;n=n||-1,e=Math.abs(1*e),e=Math.round(e);var a=this._isMinutePrecision(i),o=this._subtractMinutesUntilHourStart(i,e);r+=o.added,i=o.end;for(var s=0,l=[],c=0;rc)r+=c,i=this.$gantt.date.add(i,-1,"day");else{for(var g=!1,p=null,v=null,m=l.length-1;m>=0;m--)if(l[m].start<_-1&&l[m].end>=_-1){g=!0,p=l[m],v=l[m-1];break}if(g)if(_===p.end&&f>=p.durationMinutes)r+=p.durationMinutes,i=this.$gantt.date.add(i,-p.durationMinutes,"minute");else if(!a&&f<=_/60-p.startMinute)r+=f,i=this.$gantt.date.add(i,-f,"minute");else if(a)f<=_/60-p.startMinute?(r+=f,i=this.$gantt.date.add(i,-f,"minute")):(r+=_/60-p.startMinute,i=v?new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,v.end):this.$gantt.date.day_start(i));else{var y=this._getMinutesPerHour(i);y<=f?(r+=y,i=this._nextDate(i,"hour",n)):(r+=(o=this._subtractMinutesUntilHourStart(i,f)).added,i=o.end)}else if(0===i.getHours()&&0===i.getMinutes()&&0===i.getSeconds()){if((k=this._getClosestWorkTimePast(i,"hour")).valueOf()===i.valueOf()){var k=this.$gantt.date.add(i,-1,"day"),b=this._getWorkHours(k);if(b.length){var x=b[b.length-1];k.setSeconds(x.durationSeconds)}}i=k}else i=this._getClosestWorkTimePast(new Date(i-1),"hour")}else i=this.$gantt.date.add(i,-1,"day")}if(r=h&&d>=l){if(r+=l,d==l){i=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,s[s.length-1].end);break}i=this.$gantt.date.add(i,1,"day"),i=this.$gantt.date.day_start(i)}else{for(var f=!1,_=null,g=0;gh){f=!0,_=s[g];break}if(f)if(h===_.start&&d>=_.durationMinutes)r+=_.durationMinutes,i=this.$gantt.date.add(i,_.durationMinutes,"minute");else if(d<=_.endMinute-h/60)r+=d,i=this.$gantt.date.add(i,d,"minute");else{var p=this._getMinutesPerHour(i);p<=d?(r+=p,i=c?this.$gantt.date.add(i,p,"minute"):this._nextDate(i,"hour",n)):(r+=(a=this._addMinutesUntilHourEnd(i,d)).added,i=a.end)}else i=this._getClosestWorkTimeFuture(i,"hour")}else i=this.$gantt.date.add(this.$gantt.date.day_start(i),1,"day")}if(r0){for(var s=0;s=o){r=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,n[s].start);break}}else for(s=n.length-1;s>=0;s--){if(n[s].end<=o){r=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,n[s].end);break}if(n[s].end>o&&n[s].start<=o){r=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,o);break}}return r},_getClosestWorkMinute:function(t,e,n){var i=new Date(t),r=this._getWorkHours(i),a=this._findClosestTimeInDay(i,n,r);return a||(i=this.calculateEndDate(i,n,"day"),n>0?i=this.$gantt.date.day_start(i):(i=this.$gantt.date.day_start(i),i=this.$gantt.date.add(i,1,"day"),i=new Date(i.valueOf()-1)),r=this._getWorkHours(i),a=this._findClosestTimeInDay(i,n,r)),n<0&&(a=this.$gantt.date.add(a,-1,e)),a},_getClosestWorkTimeGeneric:function(t,e,n){if("hour"===e||"minute"===e)return this._getClosestWorkMinute(t,e,n);for(var i=this._getUnitOrder(e),r=this.units[i-1],a=t,o=0;!this._isWorkTime(a,e)&&(!r||this._isWorkTime(a,r)||(a=n>0?this._getClosestWorkTimeFuture(a,r):this._getClosestWorkTimePast(a,r),!this._isWorkTime(a,e)));){if(++o>3e3)return this.$gantt.assert(!1,"Invalid working time check"),!1;var s=a.getTimezoneOffset();a=this.$gantt.date.add(a,n,e),a=this.$gantt._correct_dst_change(a,s,n,e),this.$gantt.date[e+"_start"]&&(a=this.$gantt.date[e+"_start"](a))}return a},hasWorkTime:function(){var t=this.getConfig(),e=t.dates,n=[];for(var i in t.dates)Number(i)>6&&n.push(Number(i));var r=this._checkWorkHours(t.hours),a=!1;return[0,1,2,3,4,5,6].forEach(function(t){if(!a){var n=e[t];!0===n?a=r:Array.isArray(n)&&(a=this._checkWorkHours(n))}}.bind(this)),a},_checkWorkHours:function(t){if(0===t.length)return!1;for(var e=!1,n=0;ne.length?t:e,r=t===i?e:t;i=i.slice(),r=r.slice();n=[];for(var a=0;ao.start&&(n.push({start:Math.max(o.start,l.start),end:Math.min(o.end,l.end)}),o.end>l.end&&(r.splice(s,1),s--,a--))}return n},_mergeAdjacentIntervals:function(t){var e=t.slice();e.sort(function(t,e){return t.start-e.start});for(var n=e[0],i=1;in.end&&(n.end=r.end),e.splice(i,1),i--):n=r}return e},_mergeHoursConfig:function(t,e){return this._mergeAdjacentIntervals(this._intersectHourRanges(t,e))},merge:function(t,e){var n=this,r=i.copy(t.getConfig().parsed),a=i.copy(e.getConfig().parsed),o={hours:this._toHoursArray(this._mergeHoursConfig(r.hours,a.hours)),dates:{},customWeeks:{}},s=function(t,e){for(var i in t.dates){var r=t.dates[i];for(var a in+i>1e3&&(o.dates[i]=!1),e.dates){var s=e.dates[a];if(a==i&&(o.dates[i]=!(!r||!s)),Array.isArray(r)){var l=Array.isArray(s)?s:e.hours;o.dates[i]=n._toHoursArray(n._mergeHoursConfig(r,l))}}}};if(s(r,a),s(a,r),r.customWeeks)for(var l in r.customWeeks)o.customWeeks[l]=r.customWeeks[l];if(a.customWeeks)for(var l in a.customWeeks)o.customWeeks[l]=a.customWeeks[l];return o}},t.exports=r},function(t,e,n){var i=n(0),r=n(42),a=n(201),o=n(200),s=n(195),l=n(194)();function c(t){this.$gantt=t,this._calendars={},this._legacyConfig=void 0,this.$gantt.attachEvent("onGanttReady",function(){this.$gantt.config.resource_calendars&&(this._isLegacyConfig=s.isLegacyResourceCalendarFormat(this.$gantt.config.resource_calendars))}.bind(this)),this.$gantt.attachEvent("onBeforeGanttReady",function(){this.createDefaultCalendars()}.bind(this)),this.$gantt.attachEvent("onBeforeGanttRender",function(){this.createDefaultCalendars()}.bind(this))}c.prototype={_calendars:{},_convertWorkTimeSettings:function(t){var e=t.days;if(e&&!t.dates){t.dates=t.dates||{};for(var n=0;n"+e.xmlDoc.responseURL+", server returns 404");else if(!t.$destroyed){this.callEvent("onBeforeParse",[]),n||(n="json"),this.assert(this[n],"Invalid data type:'"+n+"'");var i=e.xmlDoc.responseText,r=this[n].parse(i,e);this._process_loading(r)}},t._process_loading=function(e){e.collections&&this._load_collections(e.collections),e.resources&&this.$data.resourcesStore&&this.$data.resourcesStore.parse(e.resources);var n=e.data||e.tasks;e.assignments&&function(e,n){var i={};n.forEach(function(t){i[t.task_id]||(i[t.task_id]=[]),i[t.task_id].push(t)}),e.forEach(function(e){e[t.config.resource_property]=i[e.id]||[]})}(n,e.assignments),this.$data.tasksStore.parse(n);var i=e.links||(e.collections?e.collections.links:[]);this.$data.linksStore.parse(i),this.callEvent("onParse",[]),this.render()},t._load_collections=function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){e=!0;var i=t[n];this.serverList[n]=this.serverList[n]||[];var r=this.serverList[n];if(!r)continue;r.splice(0,r.length);for(var a=0;a"},_copyObject:function(t){return""},serialize:function(){for(var e=[],n=[],i=t.json.serialize(),r=0,a=i.data.length;r"+e.join("")+""+n.join("")+""}},t.oldxml={parse:function(e,n){n=t.xml._getXML(e,n,"projects");for(var i={collections:{links:[]}},r=i.data=[],a=t.ajax.xpath("//task",n),o=0;o=r-20&&(t.autoscrollRight(),t.autoscrollStart()),o<=a+20&&(t.autoscrollLeft(),t.autoscrollStart()),oa+20&&t.autoscrollStop(),!0}),this._dnd.attachEvent("onDragEnd",function(){t.autoscrollStop()}))},t.prototype.autoscrollStart=function(){var t=this;if(0!==this._scrollOrder){var e=10*this._scrollOrder,n=this._scrollView.getScrollState();this._scrollView.scrollTo(n.position+e),setTimeout(function(){t.autoscrollStart()},50)}},t.prototype.autoscrollRight=function(){this._scrollOrder=1},t.prototype.autoscrollLeft=function(){this._scrollOrder=-1},t.prototype.autoscrollStop=function(){this._scrollOrder=0},t.prototype.getCorrection=function(){return this.isScrollable()?this._scrollView.getScrollState().position:0},t.prototype.isScrollable=function(){return!!this.$grid.$config.scrollable},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(207),a=function(){function t(t,e){var n=this;this._targetMarker=null,this.calculateCurrentPosition=function(t){var e=n.$grid.$grid.getBoundingClientRect(),i=e.right,r=e.left,a=t;return a>i&&(a=i),a=e},d=function(t){return--t});for(var h=this._dragX-this.$grid.$grid.getBoundingClientRect().left+this._scrollableGrid.getCorrection(),f=l;u(f,c)&&(void 0===t||void 0===e);f=d(f))o[f].hide||(s.startX=s.endX,s.endX+=o[f].width,h>=s.startX&&(h<=s.endX||!u(d(f),c))&&(t=f,n=s.startX,i=s.endX,r=(h-s.startX)/(s.endX-s.startX)),a===o[f].name&&(e=f));return{targetIndex:t,draggedIndex:e,xBefore:n,xAfter:i,columnRelativePos:r}},t.prototype.setMarkerPosition=function(t,e){void 0===e&&(e=10);var n=this._dnd.config.marker,i=this._dnd._obj.getBoundingClientRect();n.style.top=i.y+e+"px",n.style.left=t+"px"},t.prototype.drawTargetMarker=function(t){var e,n=t.targetIndex,r=t.draggedIndex,a=t.xBefore,o=t.xAfter,s=t.columnRelativePos;this._targetMarker||(this._targetMarker=document.createElement("div"),i.addClassName(this._targetMarker,"gantt_grid_target_marker"),this._targetMarker.style.display="none",this._targetMarker.style.height=this._gridConfig.scale_height+"px"),this._targetMarker.parentNode||this.$grid.$grid_scale.appendChild(this._targetMarker),e=n>r?o:n.5?o:a,this._targetMarker.style.left=e+"px",this._targetMarker.style.display="block"},t.prototype.cleanTargetMarker=function(){this._targetMarker&&this._targetMarker.parentNode&&this.$grid.$grid_scale.removeChild(this._targetMarker),this._targetMarker=null},t}();e.ColumnsGridDnd=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(208);e.default=i.ColumnsGridDnd},function(t,e,n){var i=n(1);t.exports=function(t,e){var n={row_before_start:t.bind(function(t,n,r){var a=e.$getConfig(),o=e.$config.rowStore;if(!i.locateAttribute(r,a.task_grid_row_resizer_attribute))return!1;var s=this.locate(r,a.task_grid_row_resizer_attribute),l=o.getItem(s);return!1!==e.callEvent("onBeforeRowResize",[l])&&void 0},t),row_after_start:t.bind(function(t,n,i){var r=e.$getConfig(),a=this.locate(i,r.task_grid_row_resizer_attribute);t.config.marker.innerHTML="",t.config.marker.className+=" gantt_row_grid_resize_area",t.config.marker.style.width=e.$grid.offsetWidth+"px",t.config.drag_id=a},t),row_drag_move:t.bind(function(t,n,r){var a=e.$config.rowStore,o=e.$getConfig(),s=t.config,l=s.drag_id,c=e.getItemHeight(l),u=e.getItemTop(l)-n.scrollTop,d=i.getNodePosition(e.$grid_data),h=parseInt(s.marker.style.top,10),f=u+d.y,_=0,g=o.min_task_grid_row_height;return(_=h-f)\n
"+t.locale.labels.empty_state_text_description+"
\n
";e.innerHTML=n},clickEvents:[],attachAddTaskEvent:function(){var e=t.attachEvent("onEmptyClick",function(e){t.utils.dom.closest(e.target,"[data-empty-state-create-task]")&&t.createTask({id:t.uid(),text:"New Task"})});this.clickEvents.push(e)},detachAddTaskEvents:function(){this.clickEvents.forEach(function(e){t.detachEvent(e)}),this.clickEvents=[]},getContainer:function(){if(t.$container){var e=t.utils.dom;if(t.$container.contains(t.$grid_data))return e.closest(t.$grid_data,".gantt_layout_content");if(t.$container.contains(t.$task_data))return e.closest(t.$task_data,".gantt_layout_content")}return null},getNode:function(){var t=this.getContainer();return t?t.querySelector(".gantt_empty_state_wrapper"):null},show:function(){var e=this.getContainer();if(!e&&this.isGanttEmpty())return null;var n=document.createElement("div");n.className="gantt_empty_state_wrapper",n.style.marginTop=t.config.scale_height-e.offsetHeight+"px";var i=t.$container.querySelectorAll(".gantt_empty_state_wrapper");Array.prototype.forEach.call(i,function(t){t.parentNode.removeChild(t)}),this.detachAddTaskEvents(),this.attachAddTaskEvent(),e.appendChild(n),this.renderContent(n)},hide:function(){var t=this.getNode();if(!t)return!1;t.parentNode.removeChild(t)},init:function(){}},t.attachEvent("onDataRender",function(){var e=t.ext.emptyStateElement;e.isEnabled()&&e.isGanttEmpty()?e.show():e.hide()})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){var e=this;this.format=function(t){return e._getWBSCode(t.source)},this.canParse=function(t){return e._linkReg.test(t)},this.parse=function(t){if(!e.canParse(t))return null;var n=e._linkReg.exec(t)[0].trim();return{id:void 0,source:e._findSource(n)||null,target:null,type:e._gantt.config.links.finish_to_start,lag:0}},this._getWBSCode=function(t){var n=e._gantt.getTask(t);return e._gantt.getWBSCode(n)},this._findSource=function(t){var n=new RegExp("^[0-9.]+","i");if(n.exec(t)){var i=n.exec(t)[0],r=e._gantt.getTaskByWBSCode(i);if(r)return r.id}return null},this._linkReg=/^[0-9\.]+/,this._gantt=t}return t.create=function(e,n){return void 0===e&&(e=null),new t(n)},t}();e.default=i},function(t,e,n){var i=n(44).default,r=n(215).default;t.exports=function(t){t.ext.formatters={durationFormatter:function(e){return e||(e={}),e.store||(e.store=t.config.duration_unit),e.enter||(e.enter=t.config.duration_unit),i.create(e,t)},linkFormatter:function(e){return r.create(e,t)}}}},function(t,e){t.exports=function(t){function e(e){return function(){return!t.config.auto_types||t.getTaskType(t.config.types.project)!=t.config.types.project||e.apply(this,arguments)}}function n(e,n){var i=t.getTask(e),r=a(i);!1!==r&&t.getTaskType(i)!==r&&(n.$needsUpdate=!0,n[i.id]={task:i,type:r})}function i(e){if(!t.getState().group_mode){var i=function(e,i){return n(e,i=i||{}),t.eachParent(function(t){n(t.id,i)},e),i}(e);i.$needsUpdate&&t.batchUpdate(function(){!function(e){for(var n in e)if(e[n]&&e[n].task){var i=e[n].task;i.type=e[n].type,t.updateTask(i.id)}}(i)})}}var r;function a(e){var n=t.config.types,i=t.hasChild(e.id),r=t.getTaskType(e.type);return i&&r===n.task?n.project:!i&&r===n.project&&n.task}var o,s,l=!0;function c(e){e!=t.config.root_id&&t.isTaskExists(e)&&i(e)}t.attachEvent("onParse",e(function(){l=!1,t.getState().group_mode||(t.batchUpdate(function(){t.eachTask(function(e){var n=a(e);!1!==n&&function(e,n){t.getState().group_mode||(e.type=n,t.updateTask(e.id))}(e,n)})}),l=!0)})),t.attachEvent("onAfterTaskAdd",e(function(t){l&&i(t)})),t.attachEvent("onAfterTaskUpdate",e(function(t){l&&i(t)})),t.attachEvent("onBeforeTaskDelete",e(function(e,n){return r=t.getParent(e),!0})),t.attachEvent("onAfterTaskDelete",e(function(t,e){c(r)})),t.attachEvent("onRowDragStart",e(function(e,n,i){return o=t.getParent(e),!0})),t.attachEvent("onRowDragEnd",e(function(t,e){c(o),i(t)})),t.attachEvent("onBeforeTaskMove",e(function(e,n,i){return s=t.getParent(e),!0})),t.attachEvent("onAfterTaskMove",e(function(t,e,n){document.querySelector(".gantt_drag_marker")||(c(s),i(t))}))}},function(t,e){t.exports=function(t){function e(e){return function(){return!t.config.placeholder_task||e.apply(this,arguments)}}function n(){var e=t.getTaskBy("type",t.config.types.placeholder);if(!e.length||!t.isTaskExists(e[0].id)){var n={unscheduled:!0,type:t.config.types.placeholder,duration:0,text:t.locale.labels.new_task};if(!1===t.callEvent("onTaskCreated",[n]))return;t.addTask(n)}}function i(e){var n=t.getTask(e);n.type==t.config.types.placeholder&&(n.start_date&&n.end_date&&n.unscheduled&&(n.unscheduled=!1),t.batchUpdate(function(){var e=t.copy(n);t.silent(function(){t.deleteTask(n.id)}),delete e["!nativeeditor_status"],e.type=t.config.types.task,e.id=t.uid(),t.addTask(e)}))}t.config.types.placeholder="placeholder",t.attachEvent("onDataProcessorReady",e(function(n){n&&!n._silencedPlaceholder&&(n._silencedPlaceholder=!0,n.attachEvent("onBeforeUpdate",e(function(e,i,r){return r.type!=t.config.types.placeholder||(n.setUpdated(e,!1),!1)})))}));var r=!1;function a(e){if(t.config.types.placeholder&&t.isTaskExists(e)&&t.getTask(e).type==t.config.types.placeholder)return!0;return!1}function o(t){return!(!a(t.source)&&!a(t.target))}t.attachEvent("onGanttReady",function(){r||(r=!0,t.attachEvent("onAfterTaskUpdate",e(i)),t.attachEvent("onAfterTaskAdd",e(function(e,i){i.type!=t.config.types.placeholder&&(t.getTaskBy("type",t.config.types.placeholder).forEach(function(e){t.silent(function(){t.isTaskExists(e.id)&&t.deleteTask(e.id)})}),n())})),t.attachEvent("onParse",e(n)))}),t.attachEvent("onLinkValidation",function(t){return!o(t)}),t.attachEvent("onBeforeLinkAdd",function(t,e){return!o(e)}),t.attachEvent("onBeforeUndoStack",function(e){for(var n=0;ni.start_date){for(var s=0;s"+l.value+""}return"
-
"}return""},renderSummaryLabel:function(t,e,n,i,r){var a=r.reduce(function(t,e){return t+Number(e.value)},0);return a%1&&(a=Math.round(10*a)/10),a?"
"+a+"
":""},editableResourceCellTemplate:function(t,n,i,r,a){return"task"===i.$role?e.renderEditableLabel(t,n,i,r,a):e.renderSummaryLabel(t,n,i,r,a)},editableResourceCellClass:function(t,e,n,i,r){var a=[];a.push("resource_marker"),"task"===n.$role?a.push("task_cell"):a.push("resource_cell");var o=r.reduce(function(t,e){return t+Number(e.value)},0),s=Number(n.capacity);return isNaN(s)&&(s=8),o<=s?a.push("workday_ok"):a.push("workday_over"),a.join(" ")},getSummaryResourceAssignments:function(e){var n,i=t.getDatastore(t.config.resource_store),r=i.getItem(e);return"task"===r.$role?n=t.getResourceAssignments(r.$resource_id,r.$task_id):(n=t.getResourceAssignments(e),i.eachItem&&i.eachItem(function(e){"task"!==e.$role&&(n=n.concat(t.getResourceAssignments(e.id)))},e)),n},initEditableDiagram:function(){t.config.resource_render_empty_cells=!0,function(){var e=null;function n(){return e&&cancelAnimationFrame(e),e=requestAnimationFrame(function(){t.$container&&Array.prototype.slice.call(t.$container.querySelectorAll(".resourceTimeline_cell [data-assignment-cell]")).forEach(function(t){t.contentEditable=!0})}),!0}t.attachEvent("onGanttReady",function(){t.getDatastore(t.config.resource_assignment_store).attachEvent("onStoreUpdated",n),t.getDatastore(t.config.resource_store).attachEvent("onStoreUpdated",n)},{once:!0}),t.attachEvent("onGanttLayoutReady",function(){t.$layout.getCellsByType("viewCell").forEach(function(t){t.$config&&"resourceTimeline"===t.$config.view&&t.$content&&t.$content.attachEvent("onScroll",n)})})}(),t.attachEvent("onGanttReady",function(){var e=!1;t.event(t.$container,"keypress",function(t){var e=t.target.closest(".resourceTimeline_cell [data-assignment-cell]");e&&(13!==t.keyCode&&27!==t.keyCode||e.blur())}),t.event(t.$container,"focusout",function(n){if(!e){e=!0,setTimeout(function(){e=!1},300);var i=n.target.closest(".resourceTimeline_cell [data-assignment-cell]");if(i){var r=(i.innerText||"").trim();"-"==r&&(r="0");var a=Number(r),o=i.getAttribute("data-row-id"),s=i.getAttribute("data-assignment-id"),l=i.getAttribute("data-task"),c=i.getAttribute("data-resource-id"),u=t.templates.parse_date(i.getAttribute("data-start-date")),d=t.templates.parse_date(i.getAttribute("data-end-date")),h=t.getDatastore(t.config.resource_assignment_store);if(isNaN(a))t.getDatastore(t.config.resource_store).refresh(o);else{var f=t.getTask(l);if(t.plugins().undo&&t.ext.undo.saveState(l,"task"),s){if(a===(g=h.getItem(s)).value)return;if(g.start_date.valueOf()===u.valueOf()&&g.end_date.valueOf()===d.valueOf())g.value=a,a?h.updateItem(g.id):h.removeItem(g.id);else{if(g.end_date.valueOf()>d.valueOf()){var _=t.copy(g);_.id=t.uid(),_.start_date=d,_.duration=t.calculateDuration({start_date:_.start_date,end_date:_.end_date,task:f}),_.delay=t.calculateDuration({start_date:f.start_date,end_date:_.start_date,task:f}),_.mode=g.mode||"default",0!==_.duration&&h.addItem(_)}g.start_date.valueOf()-1?t.indexOf("?"):t.length),this.serverProcessor=t+("/"===t.slice(-1)?"":"/")+e}else{var n=this._ganttMode+"s";this.serverProcessor=t+i.ajax.urlSeparator(t)+"gantt_mode="+n}return!0}),e.attachEvent("insertCallback",function(t,e,n,r){var a=t.data||i.xml._xmlNodeToJSON(t.firstChild),o={add:i.addTask,isExist:i.isTaskExists};"links"===r&&(o.add=i.addLink,o.isExist=i.isLinkExists),o.isExist.call(i,e)||(a.id=e,o.add.call(i,a))}),e.attachEvent("updateCallback",function(t,e){var n=t.data||i.xml._xmlNodeToJSON(t.firstChild);if(i.isTaskExists(e)){var r=i.getTask(e);for(var a in n){var o=n[a];switch(a){case"id":continue;case"start_date":case"end_date":o=i.defined(i.templates.xml_date)?i.templates.xml_date(o):i.templates.parse_date(o);break;case"duration":r.end_date=i.calculateEndDate({start_date:r.start_date,duration:o,task:r})}r[a]=o}i.updateTask(e),i.refreshData()}}),e.attachEvent("deleteCallback",function(t,e,n,r){var a={delete:i.deleteTask,isExist:i.isTaskExists};"links"===r?(a.delete=i.deleteLink,a.isExist=i.isLinkExists):"assignment"===r&&(a.delete=function(t){i.$data.assignmentsStore.remove(t)},a.isExist=function(t){return i.$data.assignmentsStore.exists(t)}),a.isExist.call(i,e)&&a.delete.call(i,e)}),this.handleResourceCRUD(e,i),this.handleResourceAssignmentCRUD(e,i)},t.prototype.clientSideDelete=function(t,e,n){var i=e.updatedRows.slice(),r=!1;"true_deleted"===n.getUserData(t,"!nativeeditor_status",e._ganttMode)&&(r=!0,e.setUpdated(t,!1));for(var a=0;a=0?"link":o.indexOf("/assignment")>=0?"assignment":"task",this.setGanttMode(a);var s,l=this.$gantt.ajax;try{s=JSON.parse(e.xmlDoc.responseText)}catch(t){e.xmlDoc.responseText.length||(s={})}var c=function(e){var n=s.action||r.getState(e)||"updated",i=s.sid||e[0],o=s.tid||e[0];t.afterUpdateCallback(i,o,n,s,a)};if(s)return Array.isArray(n)&&n.length>1?n.forEach(function(t){return c(t)}):c(n),t.finalizeUpdate(),void this.setGanttMode(a);var u=l.xmltop("data",e.xmlDoc);if(!u)return this.cleanUpdate(n);var d=l.xpath("//data/action",u);if(!d.length)return this.cleanUpdate(n);for(var h=0;h0&&(r=r.filter(function(t){return void 0!==t}),e=e.concat(r))}if((void 0==i.start||void 0==i.end)&&void 0==i.ids)throw new Error("Invalid range returned from 'getVisibleRange' of the layer")}else e=n.getVisibleItems();t.prepare_data&&t.prepare_data(e,t),t.update_items(e)}};function s(t){return!!t.$services.getService("state").getState("batchUpdate").batch_update}n.attachEvent("onStoreUpdated",function(n,r,a){if(i(e))return!0;var s=e.$services.getService("layers").getDataRender(t);s&&(s.onUpdateRequest=function(t){o(t)})}),n.attachEvent("onStoreUpdated",function(t,i,r){s(e)||(t&&"move"!=r&&"delete"!=r?(n.callEvent("onBeforeRefreshItem",[i.id]),n.callEvent("onAfterRefreshItem",[i.id])):(n.callEvent("onBeforeRefreshAll",[]),n.callEvent("onAfterRefreshAll",[])))}),n.attachEvent("onAfterRefreshAll",function(){if(i(e))return!0;var n=e.$services.getService("layers").getDataRender(t);n&&!s(e)&&a(n)}),n.attachEvent("onAfterRefreshItem",function(n){if(i(e))return!0;var a=e.$services.getService("layers").getDataRender(t);a&&r(n,a)}),n.attachEvent("onItemOpen",function(){if(i(e))return!0;e.render()}),n.attachEvent("onItemClose",function(){if(i(e))return!0;e.render()}),n.attachEvent("onIdChange",function(a,o){if(i(e))return!0;if(n.callEvent("onBeforeIdChange",[a,o]),!s(e)&&!n.isSilent()){var l=e.$services.getService("layers").getDataRender(t);l?(function(t,e,n,i){for(var r=0;rr||+n.end_date<+i)return!1}return!0}),s.attachEvent("onIdChange",function(e,n){t._update_flags(e,n);var i=t.getTask(n);s.isSilent()||(i.$split_subtask||i.rollup)&&t.eachParent(function(e){t.refreshTask(e.id)},n)}),s.attachEvent("onAfterUpdate",function(e){if(t._update_parents(e),t.getState("batchUpdate").batch_update)return!0;var n=s.getItem(e);n.$source||(n.$source=[]);for(var i=0;i0;)f(t)}function f(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var n=t.shift(),i=t.shift();e.call(n,i)}}l.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},l.prototype.hasCustomScheduler=function(){return this._customScheduler},l.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},l.prototype.disableTrampolineIfNecessary=function(){s.hasDevTools&&(this._trampolineEnabled=!1)},l.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},l.prototype.fatalError=function(t,e){e?(n.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),n.exit(2)):this.throwLater(t)},l.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},s.hasDevTools?(l.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?c.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},l.prototype.invoke=function(t,e,n){this._trampolineEnabled?u.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},l.prototype.settlePromises=function(t){this._trampolineEnabled?d.call(this,t):this._schedule(function(){t._settlePromises()})}):(l.prototype.invokeLater=c,l.prototype.invoke=u,l.prototype.settlePromises=d),l.prototype._drainQueues=function(){h(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,h(this._lateQueue)},l.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},l.prototype._reset=function(){this._isTickUsed=!1},e.exports=l,e.exports.firstLineError=r},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,i){var r=!1,a=function(t,e){this._reject(e)},o=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(a,a,null,this,t)},s=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},l=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(a){r||(r=!0,t.prototype._propagateFrom=i.propagateFromFunction(),t.prototype._boundValue=i.boundValueFunction());var c=n(a),u=new t(e);u._propagateFrom(this,1);var d=this._target();if(u._setBoundTo(c),c instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:d,bindingPromise:c};d._then(e,o,void 0,u,h),c._then(s,l,void 0,u,h),u._setOnCancel(c)}else u._resolveCallback(d);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";var i;"undefined"!=typeof Promise&&(i=Promise);var r=t("./promise")();r.noConflict=function(){try{Promise===r&&(Promise=i)}catch(t){}return r},e.exports=r},{"./promise":22}],5:[function(t,e,n){"use strict";var i=Object.create;if(i){var r=i(null),a=i(null);r[" size"]=a[" size"]=0}e.exports=function(e){var n=t("./util"),i=n.canEvaluate;n.isIdentifier;function r(t){return function(t,i){var r;if(null!=t&&(r=t[i]),"function"!=typeof r){var a="Object "+n.classString(t)+" has no method '"+n.toString(i)+"'";throw new e.TypeError(a)}return r}(t,this.pop()).apply(t,this)}function a(t){return t[this]}function o(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e;if("number"==typeof t)e=o;else if(i){var n=(void 0)(t);e=null!==n?n:a}else e=a;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,i,r){var a=t("./util"),o=a.tryCatch,s=a.errorObj,l=e._async;e.prototype.break=e.prototype.cancel=function(){if(!r.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(a.isArray(t))for(var n=0;n=0)return n[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},i.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,n.push(this._trace))},i.prototype._popContext=function(){if(void 0!==this._trace){var t=n.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},i.CapturedTrace=null,i.create=function(){if(e)return new i},i.deactivateLongStackTraces=function(){},i.activateLongStackTraces=function(){var n=t.prototype._pushContext,a=t.prototype._popContext,o=t._peekContext,s=t.prototype._peekContext,l=t.prototype._promiseCreated;i.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=a,t._peekContext=o,t.prototype._peekContext=s,t.prototype._promiseCreated=l,e=!1},e=!0,t.prototype._pushContext=i.prototype._pushContext,t.prototype._popContext=i.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},i}},{}],9:[function(t,e,i){"use strict";e.exports=function(e,i){var r,a,o,s=e._getDomain,c=e._async,u=t("./errors").Warning,d=t("./util"),h=t("./es5"),f=d.canAttachTrace,_=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,g=/\((?:timers\.js):\d+:\d+\)/,p=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,v=null,m=null,y=!1,k=!(0==d.env("BLUEBIRD_DEBUG")),b=!(0==d.env("BLUEBIRD_WARNINGS")||!k&&!d.env("BLUEBIRD_WARNINGS")),x=!(0==d.env("BLUEBIRD_LONG_STACK_TRACES")||!k&&!d.env("BLUEBIRD_LONG_STACK_TRACES")),w=0!=d.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(b||!!d.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){if(0==(524288&this._bitField)){this._setRejectionIsUnhandled();var t=this;setTimeout(function(){t._notifyUnhandledRejection()},1)}},e.prototype._notifyUnhandledRejectionIsHandled=function(){q("rejectionHandled",r,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),q("unhandledRejection",a,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return z(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=s();a="function"==typeof t?null===e?t:d.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=s();r="function"==typeof t?null===e?t:d.domainBind(e,t):void 0};var S=function(){};e.longStackTraces=function(){if(c.haveItemsQueued()&&!tt.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!tt.longStackTraces&&Y()){var t=e.prototype._captureStackTrace,n=e.prototype._attachExtraTrace,r=e.prototype._dereferenceTrace;tt.longStackTraces=!0,S=function(){if(c.haveItemsQueued()&&!tt.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=n,e.prototype._dereferenceTrace=r,i.deactivateLongStackTraces(),c.enableTrampoline(),tt.longStackTraces=!1},e.prototype._captureStackTrace=H,e.prototype._attachExtraTrace=F,e.prototype._dereferenceTrace=B,i.activateLongStackTraces(),c.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return tt.longStackTraces&&Y()};var T=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return d.global.dispatchEvent(t),function(t,e){var n={detail:e,cancelable:!0};h.defineProperty(n,"promise",{value:e.promise}),h.defineProperty(n,"reason",{value:e.reason});var i=new CustomEvent(t.toLowerCase(),n);return!d.global.dispatchEvent(i)}}if("function"==typeof Event){t=new Event("CustomEvent");return d.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,h.defineProperty(n,"promise",{value:e.promise}),h.defineProperty(n,"reason",{value:e.reason}),!d.global.dispatchEvent(n)}}return(t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),d.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!d.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),$=d.isNode?function(){return n.emit.apply(n,arguments)}:d.global?function(t){var e="on"+t.toLowerCase(),n=d.global[e];return!!n&&(n.apply(d.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function C(t,e){return{promise:e}}var E={promiseCreated:C,promiseFulfilled:C,promiseRejected:C,promiseResolved:C,promiseCancelled:C,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:C},A=function(t){var e=!1;try{e=$.apply(null,arguments)}catch(t){c.throwLater(t),e=!0}var n=!1;try{n=T(t,E[t].apply(null,arguments))}catch(t){c.throwLater(t),n=!0}return n||e};function D(){return!1}function M(t,e,n){var i=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+d.toString(t));i._attachCancellationCallback(t)})}catch(t){return t}}function I(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?d.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function P(){return this._onCancelField}function N(t){this._onCancelField=t}function O(){this._cancellationParent=void 0,this._onCancelField=void 0}function L(t,e){if(0!=(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}e.config=function(t){if("longStackTraces"in(t=Object(t))&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&S()),"warnings"in t){var n=t.warnings;tt.warnings=!!n,w=tt.warnings,d.isObject(n)&&"wForgottenReturn"in n&&(w=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!tt.cancellation){if(c.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=O,e.prototype._propagateFrom=L,e.prototype._onCancel=P,e.prototype._setOnCancel=N,e.prototype._attachCancellationCallback=I,e.prototype._execute=M,R=L,tt.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!tt.monitoring?(tt.monitoring=!0,e.prototype._fireEvent=A):!t.monitoring&&tt.monitoring&&(tt.monitoring=!1,e.prototype._fireEvent=D)),e},e.prototype._fireEvent=D,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(t){return t}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._dereferenceTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var R=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function j(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function H(){this._trace=new Q(this._peekContext())}function F(t,e){if(f(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var i=W(t);d.notEnumerableProp(t,"stack",i.message+"\n"+i.stack.join("\n")),d.notEnumerableProp(t,"__stackCleaned__",!0)}}}function B(){this._trace=void 0}function z(t,n,i){if(tt.warnings){var r,a=new u(t);if(n)i._attachExtraTrace(a);else if(tt.longStackTraces&&(r=e._peekContext()))r.attachExtraTrace(a);else{var o=W(a);a.stack=o.message+"\n"+o.stack.join("\n")}A("warning",a)||V(a,"",!0)}}function U(t){for(var e=[],n=0;n0?function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:U(e)}}function V(t,e,n){if("undefined"!=typeof console){var i;if(d.isObject(t)){var r=t.stack;i=e+m(r,t)}else i=e+String(t);"function"==typeof o?o(i,n):"function"!=typeof console.log&&"object"!==l(console.log)||console.log(i)}}function q(t,e,n,i){var r=!1;try{"function"==typeof e&&(r=!0,"rejectionHandled"===t?e(i):e(n,i))}catch(t){c.throwLater(t)}"unhandledRejection"===t?A(t,n,i)||r||V(n,"Unhandled rejection "):A(t,i)}function G(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():d.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+function(t){if(t.length<41)return t;return t.substr(0,38)+"..."}(e)+">, no stack trace)"}function Y(){return"function"==typeof Z}var J=function(){return!1},X=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function K(t){var e=t.match(X);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function Q(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);Z(this,Q),e>32&&this.uncycle()}d.inherits(Q,Error),i.CapturedTrace=Q,Q.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],n={},i=0,r=this;void 0!==r;++i)e.push(r),r=r._parent;for(i=(t=this._length=i)-1;i>=0;--i){var a=e[i].stack;void 0===n[a]&&(n[a]=i)}for(i=0;i0&&(e[o-1]._parent=void 0,e[o-1]._length=1),e[i]._parent=void 0,e[i]._length=1;var s=i>0?e[i-1]:this;o=0;--c)e[c]._length=l,l++;return}}}},Q.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=W(t),n=e.message,i=[e.stack],r=this;void 0!==r;)i.push(U(r.stack.split("\n"))),r=r._parent;!function(t){for(var e=t[0],n=1;n=0;--s)if(i[s]===a){o=s;break}for(s=o;s>=0;--s){var l=i[s];if(e[r]!==l)break;e.pop(),r--}e=i}}(i),function(t){for(var e=0;e=0)return v=/@/,m=e,y=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){i="stack"in t}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(m=function(t,e){return"string"==typeof t?t:"object"!==l(e)&&"function"!=typeof e||void 0===e.name||void 0===e.message?G(e):e.toString()},null):(v=t,m=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(o=function(t){console.warn(t)},d.isNode&&n.stderr.isTTY?o=function(t,e){var n=e?"":"";console.warn(n+t+"\n")}:d.isNode||"string"!=typeof(new Error).stack||(o=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var tt={warnings:b,longStackTraces:!1,cancellation:!1,monitoring:!1};return x&&e.longStackTraces(),{longStackTraces:function(){return tt.longStackTraces},warnings:function(){return tt.warnings},cancellation:function(){return tt.cancellation},monitoring:function(){return tt.monitoring},propagateFromFunction:function(){return R},boundValueFunction:function(){return j},checkForgottenReturns:function(t,e,n,i,r){if(void 0===t&&null!==e&&w){if(void 0!==r&&r._returnedNonUndefined())return;if(0==(65535&i._bitField))return;n&&(n+=" ");var a="",o="";if(e._trace){for(var s=e._trace.stack.split("\n"),l=U(s),c=l.length-1;c>=0;--c){var u=l[c];if(!g.test(u)){var d=u.match(p);d&&(a="at "+d[1]+":"+d[2]+":"+d[3]+" ");break}}if(l.length>0){var h=l[0];for(c=0;c0&&(o="\n"+s[c-1]);break}}}var f="a promise was created in a "+n+"handler "+a+"but was not returned from it, see http://goo.gl/rRqMUw"+o;i._warn(f,!0,e)}},setBounds:function(t,e){if(Y()){for(var n,i,r=t.stack.split("\n"),a=e.stack.split("\n"),o=-1,s=-1,l=0;l=s||(J=function(t){if(_.test(t))return!0;var e=K(t);return!!(e&&e.fileName===n&&o<=e.line&&e.line<=s)})}},warn:z,deprecated:function(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),z(n)},CapturedTrace:Q,fireDomEvent:T,fireGlobalEvent:$}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1];return this.caught(t,function(){throw e})},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var i=arguments[1];i instanceof t&&i.suppressUnhandledRejections();return this.caught(n,function(){return i})}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.reduce,i=t.all;function r(){return i(this)}t.prototype.each=function(t){return n(this,t,e,0)._then(r,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return n(this,t,e,e)},t.each=function(t,i){return n(t,i,e,0)._then(r,void 0,void 0,t,void 0)},t.mapSeries=function(t,i){return n(t,i,e,e)}}},{}],12:[function(t,e,n){"use strict";var i,r,a=t("./es5"),o=a.freeze,s=t("./util"),l=s.inherits,c=s.notEnumerableProp;function u(t,e){function n(i){if(!(this instanceof n))return new n(i);c(this,"message","string"==typeof i?i:e),c(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return l(n,Error),n}var d=u("Warning","warning"),h=u("CancellationError","cancellation error"),f=u("TimeoutError","timeout error"),_=u("AggregateError","aggregate error");try{i=TypeError,r=RangeError}catch(t){i=u("TypeError","type error"),r=u("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),p=0;p1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function d(){return f.call(this,this.promise._target()._settledValue())}function h(t){if(!u(this,t))return o.e=t,o}function f(t){var r=this.promise,s=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?s.call(r._boundValue()):s.call(r._boundValue(),t);if(l===i)return l;if(void 0!==l){r._setReturnedNonUndefined();var f=n(l,r);if(f instanceof e){if(null!=this.cancelPromise){if(f._isCancelled()){var _=new a("late cancellation observer");return r._attachExtraTrace(_),o.e=_,o}f.isPending()&&f._attachCancellationCallback(new c(this))}return f._then(d,h,void 0,this,void 0)}}}return r.isRejected()?(u(this),o.e=t,o):(u(this),t)}return l.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){u(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new l(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,f,f)},e.prototype.tap=function(t){return this._passThrough(t,1,f)},e.prototype.tapCatch=function(t){var n=arguments.length;if(1===n)return this._passThrough(t,1,void 0,f);var i,a=new Array(n-1),o=0;for(i=0;i0&&"function"==typeof arguments[e]&&(t=arguments[e]);var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,i,r,a,o){var s=e._getDomain,c=t("./util"),u=c.tryCatch,d=c.errorObj,h=e._async;function f(t,e,n,i){this.constructor$(t),this._promise._captureStackTrace();var r=s();this._callback=null===r?e:c.domainBind(r,e),this._preservedValues=i===a?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],h.invoke(this._asyncInit,this,void 0)}function _(t,n,r,a){if("function"!=typeof n)return i("expecting a function but got "+c.classString(n));var o=0;if(void 0!==r){if("object"!==l(r)||null===r)return e.reject(new TypeError("options argument must be an object but it is "+c.classString(r)));if("number"!=typeof r.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+c.classString(r.concurrency)));o=r.concurrency}return new f(t,n,o="number"==typeof o&&isFinite(o)&&o>=1?o:0,a).promise()}c.inherits(f,n),f.prototype._asyncInit=function(){this._init$(void 0,-2)},f.prototype._init=function(){},f.prototype._promiseFulfilled=function(t,n){var i=this._values,a=this.length(),s=this._preservedValues,l=this._limit;if(n<0){if(i[n=-1*n-1]=t,l>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(l>=1&&this._inFlight>=l)return i[n]=t,this._queue.push(n),!1;null!==s&&(s[n]=t);var c=this._promise,h=this._callback,f=c._boundValue();c._pushContext();var _=u(h).call(f,t,n,a),g=c._popContext();if(o.checkForgottenReturns(_,g,null!==s?"Promise.filter":"Promise.map",c),_===d)return this._reject(_.e),!0;var p=r(_,this._promise);if(p instanceof e){var v=(p=p._target())._bitField;if(0==(50397184&v))return l>=1&&this._inFlight++,i[n]=p,p._proxy(this,-1*(n+1)),!1;if(0==(33554432&v))return 0!=(16777216&v)?(this._reject(p._reason()),!0):(this._cancel(),!0);_=p._value()}i[n]=_}return++this._totalResolved>=a&&(null!==s?this._filter(i,s):this._resolve(i),!0)},f.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight1){a.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],u=arguments[2];i=o.isArray(c)?s(t).apply(u,c):s(t).call(u,c)}else i=s(t)();var d=l._popContext();return a.checkForgottenReturns(i,d,"Promise.try",l),l._resolveFromSyncValue(i),l},e.prototype._resolveFromSyncValue=function(t){t===o.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";var i=t("./util"),r=i.maybeWrapAsError,a=t("./errors").OperationalError,o=t("./es5");var s=/^(?:name|message|stack|cause)$/;function l(t){var e;if(function(t){return t instanceof Error&&o.getPrototypeOf(t)===Error.prototype}(t)){(e=new a(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var n=o.keys(t),r=0;r1){var n,i=new Array(e-1),r=0;for(n=0;n0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+c.classString(t);arguments.length>1&&(n+=", "+c.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},A.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},A.prototype.spread=function(t){return"function"!=typeof t?a("expecting a function but got "+c.classString(t)):this.all()._then(t,void 0,void 0,v,void 0)},A.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},A.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise()},A.prototype.error=function(t){return this.caught(c.originatesFromRejection,t)},A.getNewLibraryCopy=e.exports,A.is=function(t){return t instanceof A},A.fromNode=A.fromCallback=function(t){var e=new A(p);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,i=E(t)($(e,n));return i===C&&e._rejectCallback(i.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},A.all=function(t){return new k(t).promise()},A.cast=function(t){var e=y(t);return e instanceof A||((e=new A(p))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},A.resolve=A.fulfilled=A.cast,A.reject=A.rejected=function(t){var e=new A(p);return e._captureStackTrace(),e._rejectCallback(t,!0),e},A.setScheduler=function(t){if("function"!=typeof t)throw new _("expecting a function but got "+c.classString(t));return h.setScheduler(t)},A.prototype._then=function(t,e,n,i,r){var a=void 0!==r,o=a?r:new A(p),l=this._target(),u=l._bitField;a||(o._propagateFrom(this,3),o._captureStackTrace(),void 0===i&&0!=(2097152&this._bitField)&&(i=0!=(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,o));var d=s();if(0!=(50397184&u)){var f,_,v=l._settlePromiseCtx;0!=(33554432&u)?(_=l._rejectionHandler0,f=t):0!=(16777216&u)?(_=l._fulfillmentHandler0,f=e,l._unsetRejectionIsUnhandled()):(v=l._settlePromiseLateCancellationObserver,_=new g("late cancellation observer"),l._attachExtraTrace(_),f=e),h.invoke(v,l,{handler:null===d?f:"function"==typeof f&&c.domainBind(d,f),promise:o,receiver:i,value:_})}else l._addCallbacks(t,e,o,i,d);return o},A.prototype._length=function(){return 65535&this._bitField},A.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},A.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},A.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},A.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},A.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},A.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},A.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},A.prototype._isFinal=function(){return(4194304&this._bitField)>0},A.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},A.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},A.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},A.prototype._setAsyncGuaranteed=function(){h.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},A.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==l)return void 0===e&&this._isBound()?this._boundValue():e},A.prototype._promiseAt=function(t){return this[4*t-4+2]},A.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},A.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},A.prototype._boundValue=function(){},A.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,n=t._rejectionHandler0,i=t._promise0,r=t._receiverAt(0);void 0===r&&(r=l),this._addCallbacks(e,n,i,r,null)},A.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),i=t._rejectionHandlerAt(e),r=t._promiseAt(e),a=t._receiverAt(e);void 0===a&&(a=l),this._addCallbacks(n,i,r,a,null)},A.prototype._addCallbacks=function(t,e,n,i,r){var a=this._length();if(a>=65531&&(a=0,this._setLength(0)),0===a)this._promise0=n,this._receiver0=i,"function"==typeof t&&(this._fulfillmentHandler0=null===r?t:c.domainBind(r,t)),"function"==typeof e&&(this._rejectionHandler0=null===r?e:c.domainBind(r,e));else{var o=4*a-4;this[o+2]=n,this[o+3]=i,"function"==typeof t&&(this[o+0]=null===r?t:c.domainBind(r,t)),"function"==typeof e&&(this[o+1]=null===r?e:c.domainBind(r,e))}return this._setLength(a+1),a},A.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},A.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(i(),!1);var n=y(t,this);if(!(n instanceof A))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r!==this){var a=r._bitField;if(0==(50397184&a)){var o=this._length();o>0&&r._migrateCallback0(this);for(var s=1;s>>16)){if(t===this){var n=i();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():h.settlePromises(this),this._dereferenceTrace())}},A.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return h.fatalError(t,c.isNode);(65535&e)>0?h.settlePromises(this):this._ensurePossibleRejectionHandled()}},A.prototype._fulfillPromises=function(t,e){for(var n=1;n0){if(0!=(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var i=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,i,t),this._fulfillPromises(e,i)}this._setLength(0)}this._clearCancellationData()},A.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},A.defer=A.pending=function(){return w.deprecated("Promise.defer","new Promise"),{promise:new A(p),resolve:D,reject:M}},c.notEnumerableProp(A,"_makeSelfResolutionError",i),t("./method")(A,p,y,a,w),t("./bind")(A,p,y,w),t("./cancel")(A,k,a,w),t("./direct_resolve")(A),t("./synchronous_inspection")(A),t("./join")(A,k,y,p,h,s),A.Promise=A,A.version="3.5.4",t("./map.js")(A,k,a,y,p,w),t("./call_get.js")(A),t("./using.js")(A,a,y,x,p,w),t("./timers.js")(A,p,w),t("./generators.js")(A,a,p,y,o,w),t("./nodeify.js")(A),t("./promisify.js")(A,p),t("./props.js")(A,k,y,a),t("./race.js")(A,p,y,a),t("./reduce.js")(A,k,a,y,p,w),t("./settle.js")(A,k,w),t("./some.js")(A,k,a),t("./filter.js")(A,p),t("./each.js")(A,p),t("./any.js")(A),c.toFastProperties(A),c.toFastProperties(A.prototype),I({a:1}),I({b:2}),I({c:3}),I(1),I(function(){}),I(void 0),I(!1),I(new A(p)),w.setBounds(d.firstLineError,c.lastLineError),A}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,i,r,a){var o=t("./util");o.isArray;function s(t){var i=this._promise=new e(n);t instanceof e&&i._propagateFrom(t,3),i._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return o.inherits(s,a),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function t(n,a){var s=i(this._values,this._promise);if(s instanceof e){var l=(s=s._target())._bitField;if(this._values=s,0==(50397184&l))return this._promise._setAsyncGuaranteed(),s._then(t,this._reject,void 0,this,a);if(0==(33554432&l))return 0!=(16777216&l)?this._reject(s._reason()):this._cancel();s=s._value()}if(null!==(s=o.asArray(s)))0!==s.length?this._iterate(s):-5===a?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}(a));else{var c=r("expecting an array or an iterable object but got "+o.classString(s)).reason();this._promise._rejectCallback(c,!1)}},s.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var r=this._promise,a=!1,o=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n=this._length){var n;if(this._isMap)n=function(t){for(var e=new a,n=t.length/2|0,i=0;i>1},e.prototype.props=function(){return d(this)},e.props=function(t){return d(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseFulfilled=function(t,e){var n=new r;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},a.prototype._promiseRejected=function(t,e){var n=new r;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return i.deprecated(".settle()",".reflect()"),new a(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,i){var r=t("./util"),a=t("./errors").RangeError,o=t("./errors").AggregateError,s=r.isArray,l={};function c(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function u(t,e){if((0|e)!==e||e<0)return i("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new c(t),r=n.promise();return n.setHowMany(e),n.init(),r}r.inherits(c,n),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=s(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(t){this._howMany=t},c.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},c.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new o,e=this.length();e0?this._reject(t):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(t){this._values.push(t)},c.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return u(t,e)},e.prototype.some=function(t){return u(this,t)},e._SomePromiseArray=c}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},a=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},o=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return o.call(this._target())},t.prototype.isRejected=function(){return a.call(this._target())},t.prototype.isFulfilled=function(){return r.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),i.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){var i=t("./util"),r=i.errorObj,a=i.isObject;var o={}.hasOwnProperty;return function(t,s){if(a(t)){if(t instanceof e)return t;var l=function(t){try{return function(t){return t.then}(t)}catch(t){return r.e=t,r}}(t);if(l===r){s&&s._pushContext();var c=e.reject(l.e);return s&&s._popContext(),c}if("function"==typeof l)return function(t){try{return o.call(t,"_promise0")}catch(t){return!1}}(t)?(c=new e(n),t._then(c._fulfill,c._reject,void 0,c,null),c):function(t,a,o){var s=new e(n),l=s;o&&o._pushContext(),s._captureStackTrace(),o&&o._popContext();var c=!0,u=i.tryCatch(a).call(t,function(t){s&&(s._resolveCallback(t),s=null)},function(t){s&&(s._rejectCallback(t,c,!0),s=null)});return c=!1,s&&u===r&&(s._rejectCallback(u.e,!0,!0),s=null),l}(t,l,s)}return t}}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,i){var r=t("./util"),a=e.TimeoutError;function o(t){this.handle=t}o.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(t){return l(+this).thenReturn(t)},l=e.delay=function(t,r){var a,l;return void 0!==r?(a=e.resolve(r)._then(s,null,null,t,void 0),i.cancellation()&&r instanceof e&&a._setOnCancel(r)):(a=new e(n),l=setTimeout(function(){a._fulfill()},+t),i.cancellation()&&a._setOnCancel(new o(l)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};e.prototype.delay=function(t){return l(t,this)};function c(t){return clearTimeout(this.handle),t}function u(t){throw clearTimeout(this.handle),t}e.prototype.timeout=function(t,e){var n,s;t=+t;var l=new o(setTimeout(function(){n.isPending()&&function(t,e,n){var i;i="string"!=typeof e?e instanceof Error?e:new a("operation timed out"):new a(e),r.markAsOriginatingFromRejection(i),t._attachExtraTrace(i),t._reject(i),null!=n&&n.cancel()}(n,e,s)},t));return i.cancellation()?(s=this.then(),(n=s._then(c,u,void 0,l,void 0))._setOnCancel(l)):n=this._then(c,u,void 0,l,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,i,r,a,o){var s=t("./util"),l=t("./errors").TypeError,c=t("./util").inherits,u=s.errorObj,d=s.tryCatch,h={};function f(t){setTimeout(function(){throw t},0)}function _(t,n){var r=0,o=t.length,s=new e(a);return function a(){if(r>=o)return s._fulfill();var l=function(t){var e=i(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}(t[r++]);if(l instanceof e&&l._isDisposable()){try{l=i(l._getDisposer().tryDispose(n),t.promise)}catch(t){return f(t)}if(l instanceof e)return l._then(a,f,null,null,null)}a()}(),s}function g(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function v(t){return g.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function m(t){this.length=t,this.promise=null,this[t-1]=null}g.prototype.data=function(){return this._data},g.prototype.promise=function(){return this._promise},g.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},g.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var i=e!==h?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,i},g.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},c(p,g),p.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},m.prototype._resultCancelled=function(){for(var t=this.length,n=0;n0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,r());throw new l}}},{"./errors":12,"./util":36}],36:[function(t,e,r){"use strict";var a=t("./es5"),o="undefined"==typeof navigator,s={e:{}},c,u="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==i?i:void 0!==this?this:null;function d(){try{var t=c;return c=null,t.apply(this,arguments)}catch(t){return s.e=t,s}}function h(t){return c=t,d}var f=function(t,e){var n={}.hasOwnProperty;function i(){for(var i in this.constructor=t,this.constructor$=e,e.prototype)n.call(e.prototype,i)&&"$"!==i.charAt(i.length-1)&&(this[i+"$"]=e.prototype[i])}return i.prototype=e.prototype,t.prototype=new i,t.prototype};function _(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function g(t){return"function"==typeof t||"object"===l(t)&&null!==t}function p(t){return _(t)?new Error(E(t)):t}function v(t,e){var n,i=t.length,r=new Array(i+1);for(n=0;n1,i=e.length>0&&!(1===e.length&&"constructor"===e[0]),r=x.test(t+"")&&a.names(t).length>0;if(n||i||r)return!0}return!1}catch(t){return!1}}function S(t){function e(){}e.prototype=t;var n=new e;function i(){return l(n.foo)}return i(),i(),t}var T=/^[a-z$_][a-z$_0-9]*$/i;function $(t){return T.test(t)}function C(t,e,n){for(var i=new Array(t),r=0;r10||t[0]>0}(),U.isNode&&U.toFastProperties(n);try{throw new Error}catch(t){U.lastLineError=t}e.exports=U},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(this,n(9),n(4),n(57).setImmediate)},function(t,e,n){t.exports=n(235)},function(t,e,n){var i=n(0);t.exports=function(){var t={};return{getState:function(e){if(t[e])return t[e].method();var n={};for(var r in t)t[r].internal||i.mixin(n,t[r].method(),!0);return n},registerProvider:function(e,n,i){t[e]={method:n,internal:i}},unregisterProvider:function(e){delete t[e]}}}},function(t,e){t.exports=function(t){var e={};function n(n,i,r){r=r||n;var a=t.config,o=t.templates;t.config[n]&&e[r]!=a[n]&&(i&&o[r]||(o[r]=t.date.date_to_str(a[n]),e[r]=a[n]))}return{initTemplates:function(){var e=t.locale.labels;e.gantt_save_btn=e.icon_save,e.gantt_cancel_btn=e.icon_cancel,e.gantt_delete_btn=e.icon_delete;var i=t.date,r=i.date_to_str,a=t.config,o=r(a.xml_date||a.date_format,a.server_utc),s=i.str_to_date(a.xml_date||a.date_format,a.server_utc);n("date_scale",!0,void 0,t.config,t.templates),n("date_grid",!0,"grid_date_format",t.config,t.templates),n("task_date",!0,void 0,t.config,t.templates),t.mixin(t.templates,{xml_format:void 0,format_date:o,xml_date:void 0,parse_date:s,progress_text:function(t,e,n){return""},grid_header_class:function(t,e){return""},task_text:function(t,e,n){return n.text},task_class:function(t,e,n){return""},task_end_date:function(e){return t.templates.task_date(e)},grid_row_class:function(t,e,n){return""},task_row_class:function(t,e,n){return""},timeline_cell_class:function(t,e){return""},timeline_cell_content:function(t,e){return""},scale_cell_class:function(t){return""},scale_row_class:function(t){return""},grid_indent:function(t){return"
"},grid_folder:function(t){return"
"},grid_file:function(t){return"
"},grid_open:function(t){return"
"},grid_blank:function(t){return"
"},date_grid:function(e,n,i){return n&&t.isUnscheduledTask(n)&&t.config.show_unscheduled?t.templates.task_unscheduled_time(n):t.templates.grid_date_format(e,i)},task_time:function(e,n,i){return t.isUnscheduledTask(i)&&t.config.show_unscheduled?t.templates.task_unscheduled_time(i):t.templates.task_date(e)+" - "+t.templates.task_end_date(n)},task_unscheduled_time:function(t){return""},time_picker:r(a.time_picker),link_class:function(t){return""},link_description:function(e){var n=t.getTask(e.source),i=t.getTask(e.target);return""+n.text+""+i.text+""},drag_link:function(e,n,i,r){e=t.getTask(e);var a=t.locale.labels,o=""+e.text+" "+(n?a.link_start:a.link_end)+"
";return i&&(o+=" "+(i=t.getTask(i)).text+" "+(r?a.link_start:a.link_end)+"
"),o},drag_link_class:function(e,n,i,r){var a="";return e&&i&&(a=" "+(t.isLinkAllowed(e,i,n,r)?"gantt_link_allow":"gantt_link_deny")),"gantt_link_tooltip"+a},tooltip_date_format:i.date_to_str("%Y-%m-%d"),tooltip_text:function(e,n,i){return"Task: "+i.text+"
Start date: "+t.templates.tooltip_date_format(e)+"
End date: "+t.templates.tooltip_date_format(n)}})},initTemplate:n}}},function(t,e,n){var i=n(5),r=n(0),a=n(50),o=n(21),s=n(1);t.exports=function(t){function e(t){return{target:t.target||t.srcElement,pageX:t.pageX,pageY:t.pageY,clientX:t.clientX,clientY:t.clientY,metaKey:t.metaKey,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey}}function n(n,a){this._obj=n,this._settings=a||{},i(this);var o=this.getInputMethods();this._drag_start_timer=null,t.attachEvent("onGanttScroll",r.bind(function(t,e){this.clearDragTimer()},this));for(var l={passive:!1},c=0;cthis.config.sensitivity},initDnDMarker:function(){var t=this.config.marker=document.createElement("div");t.className="gantt_drag_marker",t.innerHTML="",document.body.appendChild(t)},backupEventTarget:function(n,i){if(t.config.touch){var r=i(n),a=r.target||r.srcElement,o=a.cloneNode(!0);this.config.original_target=e(r),this.config.original_target.target=o,this.config.backup_element=a,a.parentNode.appendChild(o),a.style.display="none",(this.config.mousemoveContainer||document.body).appendChild(a)}},getInputMethods:function(){var e=[];if(e.push({move:"mousemove",down:"mousedown",up:"mouseup",accessor:function(t){return t}}),t.config.touch){var n=!0;try{document.createEvent("TouchEvent")}catch(t){n=!1}n?e.push({move:"touchmove",down:"touchstart",up:"touchend",accessor:function(t){return t.touches&&t.touches.length>1?null:t.touches[0]?{target:document.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY),pageX:t.touches[0].pageX,pageY:t.touches[0].pageY,clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}:t}}):o.navigator.pointerEnabled?e.push({move:"pointermove",down:"pointerdown",up:"pointerup",accessor:function(t){return"mouse"==t.pointerType?null:t}}):o.navigator.msPointerEnabled&&e.push({move:"MSPointerMove",down:"MSPointerDown",up:"MSPointerUp",accessor:function(t){return t.pointerType==t.MSPOINTER_TYPE_MOUSE?null:t}})}return e},clearDragTimer:function(){this._drag_start_timer&&(clearTimeout(this._drag_start_timer),this._drag_start_timer=null)},dragStart:function(e,n,i){this.config&&this.config.started||(this.config={obj:e,marker:null,started:!1,pos:this.getPosition(n),sensitivity:4},this._settings&&r.mixin(this.config,this._settings,!0),this.traceDragEvents(e,i),t._prevent_touch_scroll=!0,document.body.className+=" gantt_noselect",t.config.touch&&this.dragMove(e,n,i.accessor))},dragMove:function(e,n,i){var r=i(n);if(!r)return!1;if(!this.config.marker&&!this.config.started){var a=this.getPosition(r);if(t.config.touch||this.checkPositionChange(a)){if(this.config.started=!0,this.config.ignore=!1,t._touch_drag=!0,!1===this.callEvent("onBeforeDragStart",[e,this.config.original_target]))return this.config.ignore=!0,!1;this.backupEventTarget(n,i),this.initDnDMarker(),t._touch_feedback(),this.callEvent("onAfterDragStart",[e,this.config.original_target])}else this.config.ignore=!0}if(!this.config.ignore){if(n.targetTouches&&!r.target)return;return r.pos=this.getPosition(r),this.config.marker.style.left=r.pos.x+"px",this.config.marker.style.top=r.pos.y+"px",this.callEvent("onDragMove",[e,r]),!0}return!1},dragEnd:function(e){var n=this.config.backup_element;n&&n.parentNode&&n.parentNode.removeChild(n),t._prevent_touch_scroll=!1,this.config.marker&&(this.config.marker.parentNode.removeChild(this.config.marker),this.config.marker=null,this.callEvent("onDragEnd",[])),this.config.started=!1,t._touch_drag=!1,document.body.className=document.body.className.replace(" gantt_noselect","")},getPosition:function(t){var e=0,n=0;return t.pageX||t.pageY?(e=t.pageX,n=t.pageY):(t.clientX||t.clientY)&&(e=t.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,n=t.clientY+document.body.scrollTop+document.documentElement.scrollTop),{x:e,y:n}}},n}},function(t,e,n){"use strict";function i(t,e){for(var n=0;n=0;a--){var o=this._queue[a],s=n[o.data.id];s&&(this.onResponse(o,s),s.error?o.reject(s.error):o.resolve(s.data),this._queue.splice(a,1))}}},{key:"on",value:function(t,e){var n=this._uid(),i=this._events[t],r=!!i;return r||(i=this._events[t]=[]),i.push({id:n,handler:e}),r||3!=this._mode||this._socket.send(JSON.stringify({action:"subscribe",name:t})),{name:t,id:n}}},{key:"_resubscribe",value:function(){if(3==this._mode)for(var t in this._events)this._socket.send(JSON.stringify({action:"subscribe",name:t}))}},{key:"detach",value:function(t){if(t){var e=t.id,n=t.name,i=this._events[n];if(i){var r=i.filter(function(t){return t.id!=e});r.length?this._events[n]=r:(delete this._events[n],3==this._mode&&this._socket.send(JSON.stringify({action:"unsubscribe",name:n})))}}else{if(3==this._mode)for(var a in this._events)this._socket.send(JSON.stringify({action:"unsubscribe",key:a}));this._events={}}}},{key:"fire",value:function(t,e){var n=this._events[t];if(n)for(var i=0;i11?"pm":"am":i.getHours()>11?"pm":"am";case"%A":return e?i.getUTCHours()>11?"PM":"AM":i.getHours()>11?"PM":"AM";case"%s":return e?n.date.to_fixed(i.getUTCSeconds()):n.date.to_fixed(i.getSeconds());case"%W":return e?n.date.to_fixed(n.date.getUTCISOWeek(i)):n.date.to_fixed(n.date.getISOWeek(i));default:return t}})}},str_to_date:function(t,e,n){return function(i){for(var r=[0,0,1,0,0,0],a=i.match(/[a-zA-Z]+|[0-9]+/g),o=t.match(/%[a-zA-Z]/g),s=0;s50?1900:2e3);break;case"%g":case"%G":case"%h":case"%H":r[3]=a[s]||0;break;case"%i":r[4]=a[s]||0;break;case"%Y":r[0]=a[s]||0;break;case"%a":case"%A":r[3]=r[3]%12+("am"===(a[s]||"").toLowerCase()?0:12);break;case"%s":r[5]=a[s]||0;break;case"%M":r[1]=n.locale.date.month_short_hash[a[s]]||0;break;case"%F":r[1]=n.locale.date.month_full_hash[a[s]]||0}return e?new Date(Date.UTC(r[0],r[1],r[2],r[3],r[4],r[5])):new Date(r[0],r[1],r[2],r[3],r[4],r[5])}}};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i={date_to_str:function(t,e,n){t=t.replace(/%[a-zA-Z]/g,function(t){switch(t){case"%d":return'"+to_fixed(date.get'+(e?"UTC":"")+'Date())+"';case"%m":return'"+to_fixed((date.get'+(e?"UTC":"")+'Month()+1))+"';case"%j":return'"+date.get'+(e?"UTC":"")+'Date()+"';case"%n":return'"+(date.get'+(e?"UTC":"")+'Month()+1)+"';case"%y":return'"+to_fixed(date.get'+(e?"UTC":"")+'FullYear()%100)+"';case"%Y":return'"+date.get'+(e?"UTC":"")+'FullYear()+"';case"%D":return'"+locale.date.day_short[date.get'+(e?"UTC":"")+'Day()]+"';case"%l":return'"+locale.date.day_full[date.get'+(e?"UTC":"")+'Day()]+"';case"%M":return'"+locale.date.month_short[date.get'+(e?"UTC":"")+'Month()]+"';case"%F":return'"+locale.date.month_full[date.get'+(e?"UTC":"")+'Month()]+"';case"%h":return'"+to_fixed((date.get'+(e?"UTC":"")+'Hours()+11)%12+1)+"';case"%g":return'"+((date.get'+(e?"UTC":"")+'Hours()+11)%12+1)+"';case"%G":return'"+date.get'+(e?"UTC":"")+'Hours()+"';case"%H":return'"+to_fixed(date.get'+(e?"UTC":"")+'Hours())+"';case"%i":return'"+to_fixed(date.get'+(e?"UTC":"")+'Minutes())+"';case"%a":return'"+(date.get'+(e?"UTC":"")+'Hours()>11?"pm":"am")+"';case"%A":return'"+(date.get'+(e?"UTC":"")+'Hours()>11?"PM":"AM")+"';case"%s":return'"+to_fixed(date.get'+(e?"UTC":"")+'Seconds())+"';case"%W":return'"+to_fixed(getISOWeek(date))+"';case"%w":return'"+to_fixed(getWeek(date))+"';default:return t}});var i=new Function("date","to_fixed","locale","getISOWeek","getWeek",'return "'+t+'";');return function(t){return i(t,n.date.to_fixed,n.locale,n.date.getISOWeek,n.date.getWeek)}},str_to_date:function(t,e,n){for(var i="var temp=date.match(/[a-zA-Z]+|[0-9]+/g);",r=t.match(/%[a-zA-Z]/g),a=0;a50?1900:2000);";break;case"%g":case"%G":case"%h":case"%H":i+="set[3]=temp["+a+"]||0;";break;case"%i":i+="set[4]=temp["+a+"]||0;";break;case"%Y":i+="set[0]=temp["+a+"]||0;";break;case"%a":case"%A":i+="set[3]=set[3]%12+((temp["+a+"]||'').toLowerCase()=='am'?0:12);";break;case"%s":i+="set[5]=temp["+a+"]||0;";break;case"%M":i+="set[1]=locale.date.month_short_hash[temp["+a+"]]||0;";break;case"%F":i+="set[1]=locale.date.month_full_hash[temp["+a+"]]||0;"}var o="set[0],set[1],set[2],set[3],set[4],set[5]";e&&(o=" Date.UTC("+o+")");var s=new Function("date","locale","var set=[0,0,1,0,0,0]; "+i+" return new Date("+o+");");return function(t){return s(t,n.locale)}}};e.default=i},function(t,e,n){var i=n(243).default,r=n(242).default;t.exports=function(t){var e=null;function n(){var n=!1;return"auto"===t.config.csp?(null===e&&function(){try{new Function("canUseCsp = false;")}catch(t){e=!0}}(),n=e):n=t.config.csp,n}return{init:function(){for(var e=t.locale,n=e.date.month_short,i=e.date.month_short_hash={},r=0;r=9?9:n>=6?6:n>=3?3:0,t.setMonth(e),t},year_start:function(t){return t.setMonth(0),this.month_start(t)},day_start:function(t){return this.date_part(t)},hour_start:function(t){return t.getMinutes()&&t.setMinutes(0),this.minute_start(t),t},minute_start:function(t){return t.getSeconds()&&t.setSeconds(0),t.getMilliseconds()&&t.setMilliseconds(0),t},_add_days:function(t,e,n){t.setDate(t.getDate()+e);var i=e>=0,r=!n.getHours()&&t.getHours(),a=t.getDate()<=n.getDate()||t.getMonth()1&&r&&t.setHours(0),t},add:function(t,e,n){var i=new Date(t.valueOf());switch(n){case"day":i=this._add_days(i,e,t);break;case"week":i=this._add_days(i,7*e,t);break;case"month":i.setMonth(i.getMonth()+e);break;case"year":i.setYear(i.getFullYear()+e);break;case"hour":i.setTime(i.getTime()+60*e*60*1e3);break;case"minute":i.setTime(i.getTime()+60*e*1e3);break;default:return this["add_"+n](t,e,n)}return i},add_quarter:function(t,e){return this.add(t,3*e,"month")},to_fixed:function(t){return t<10?"0"+t:t},copy:function(t){return new Date(t.valueOf())},date_to_str:function(e,a){var o=i;return n()&&(o=r),o.date_to_str(e,a,t)},str_to_date:function(e,a){var o=i;return n()&&(o=r),o.str_to_date(e,a,t)},getISOWeek:function(e){return t.date._getWeekNumber(e,!0)},_getWeekNumber:function(t,e){if(!t)return!1;var n=t.getDay();e&&0===n&&(n=7);var i=new Date(t.valueOf());i.setDate(t.getDate()+(4-n));var r=i.getFullYear(),a=Math.round((i.getTime()-new Date(r,0,1).getTime())/864e5);return 1+Math.floor(a/7)},getWeek:function(e){return t.date._getWeekNumber(e,t.config.start_on_monday)},getUTCISOWeek:function(e){return t.date.getISOWeek(e)},convert_to_utc:function(t){return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())},parseDate:function(e,n){return e&&!e.getFullYear&&("function"!=typeof n&&(n="string"==typeof n?"parse_date"===n||"xml_date"===n?t.defined(t.templates.xml_date)?t.templates.xml_date:t.templates.parse_date:t.defined(t.templates[n])?t.templates[n]:t.date.str_to_date(n):t.defined(t.templates.xml_date)?t.templates.xml_date:t.templates.parse_date),e=e?n(e):null),e}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("string"==typeof t||"number"==typeof t)return t;var e="";for(var n in t){var i="";t.hasOwnProperty(n)&&(i=n+"="+(i="string"==typeof t[n]?encodeURIComponent(t[n]):"number"==typeof t[n]?t[n]:encodeURIComponent(JSON.stringify(t[n]))),e.length&&(i="&"+i),e+=i)}return e}},function(t,e,n){function i(t){"@babel/helpers - typeof";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})(t)}var r=n(11),a=n(21),o=n(245).default;function s(t,e){var n={method:t};if(0===e.length)throw new Error("Arguments list of query is wrong.");if(1===e.length)return"string"==typeof e[0]?(n.url=e[0],n.async=!0):(n.url=e[0].url,n.async=e[0].async||!0,n.callback=e[0].callback,n.headers=e[0].headers),e[0].data?"string"!=typeof e[0].data?n.data=o(e[0].data):n.data=e[0].data:n.data="",n;switch(n.url=e[0],t){case"GET":case"DELETE":n.callback=e[1],n.headers=e[2];break;case"POST":case"PUT":e[1]?"string"!=typeof e[1]?n.data=o(e[1]):n.data=e[1]:n.data="",n.callback=e[2],n.headers=e[3]}return n}t.exports=function(t){return{cache:!0,method:"get",parse:function(t){return"string"!=typeof t?t:(t=t.replace(/^[\s]+/,""),"undefined"==typeof DOMParser||r.isIE?void 0!==a.ActiveXObject&&((e=new a.ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t)):e=(new DOMParser).parseFromString(t,"text/xml"),e);var e},xmltop:function(e,n,i){if(void 0===n.status||n.status<400){var r=n.responseXML?n.responseXML||n:this.parse(n.responseText||n);if(r&&null!==r.documentElement&&!r.getElementsByTagName("parsererror").length)return r.getElementsByTagName(e)[0]}return-1!==i&&t.callEvent("onLoadXMLError",["Incorrect XML",arguments[1],i]),document.createElement("DIV")},xpath:function(t,e){if(e.nodeName||(e=e.responseXML||e),r.isIE)return e.selectNodes(t)||[];for(var n,i=[],a=(e.ownerDocument||e).evaluate(t,e,null,XPathResult.ANY_TYPE,null);n=a.iterateNext();)i.push(n);return i},query:function(t){return this._call(t.method||"GET",t.url,t.data||"",t.async||!0,t.callback,t.headers)},get:function(t,e,n){var i=s("GET",arguments);return this.query(i)},getSync:function(t,e){var n=s("GET",arguments);return n.async=!1,this.query(n)},put:function(t,e,n,i){var r=s("PUT",arguments);return this.query(r)},del:function(t,e,n){var i=s("DELETE",arguments);return this.query(i)},post:function(t,e,n,i){1==arguments.length?e="":2==arguments.length&&"function"==typeof e&&(e,e="");var r=s("POST",arguments);return this.query(r)},postSync:function(t,e,n){e=null===e?"":String(e);var i=s("POST",arguments);return i.async=!1,this.query(i)},_call:function(e,n,r,o,s,l){return new t.Promise(function(c,u){var d=void 0!==("undefined"==typeof XMLHttpRequest?"undefined":i(XMLHttpRequest))?new XMLHttpRequest:new a.ActiveXObject("Microsoft.XMLHTTP"),h=null!==navigator.userAgent.match(/AppleWebKit/)&&null!==navigator.userAgent.match(/Qt/)&&null!==navigator.userAgent.match(/Safari/);o&&(d.onreadystatechange=function(){if(4==d.readyState||h&&3==d.readyState){if((200!=d.status||""===d.responseText)&&!t.callEvent("onAjaxError",[d]))return;setTimeout(function(){"function"==typeof s&&s.apply(a,[{xmlDoc:d,filePath:n}]),c(d),"function"==typeof s&&(s=null,d=null)},0)}});var f=!this||!this.cache;if("GET"==e&&f&&(n+=(n.indexOf("?")>=0?"&":"?")+"dhxr"+(new Date).getTime()+"=1"),d.open(e,n,o),l)for(var _ in l)d.setRequestHeader(_,l[_]);else"POST"==e.toUpperCase()||"PUT"==e||"DELETE"==e?d.setRequestHeader("Content-Type","application/x-www-form-urlencoded"):"GET"==e&&(r=null);if(d.setRequestHeader("X-Requested-With","XMLHttpRequest"),d.send(r),!o)return{xmlDoc:d,filePath:n}})},urlSeparator:function(t){return-1!=t.indexOf("?")?"&":"?"}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.exports=function(){return{layout:{css:"gantt_container",rows:[{cols:[{view:"grid",scrollX:"scrollHor",scrollY:"scrollVer"},{resizer:!0,width:1},{view:"timeline",scrollX:"scrollHor",scrollY:"scrollVer"},{view:"scrollbar",id:"scrollVer"}]},{view:"scrollbar",id:"scrollHor",height:20}]},links:{finish_to_start:"0",start_to_start:"1",finish_to_finish:"2",start_to_finish:"3"},types:{task:"task",project:"project",milestone:"milestone"},auto_types:!1,duration_unit:"day",work_time:!1,correct_work_time:!1,skip_off_time:!1,cascade_delete:!0,autosize:!1,autosize_min_width:0,autoscroll:!0,autoscroll_speed:30,deepcopy_on_parse:!1,show_links:!0,show_task_cells:!0,static_background:!1,static_background_cells:!0,branch_loading:!1,branch_loading_property:"$has_child",show_loading:!1,show_chart:!0,show_grid:!0,min_duration:36e5,date_format:"%d-%m-%Y %H:%i",xml_date:void 0,start_on_monday:!0,server_utc:!1,show_progress:!0,fit_tasks:!1,select_task:!0,scroll_on_click:!0,smart_rendering:!0,preserve_scroll:!0,readonly:!1,container_resize_timeout:20,date_grid:"%Y-%m-%d",drag_links:!0,drag_progress:!0,drag_resize:!0,drag_project:!1,drag_move:!0,drag_mode:{resize:"resize",progress:"progress",move:"move",ignore:"ignore"},round_dnd_dates:!0,link_wrapper_width:20,root_id:0,autofit:!1,columns:[{name:"text",tree:!0,width:"*",resize:!0},{name:"start_date",align:"center",resize:!0},{name:"duration",align:"center"},{name:"add",width:44}],scale_offset_minimal:!0,inherit_scale_class:!1,scales:[{unit:"day",step:1,date:"%d %M"}],time_step:60,duration_step:1,task_date:"%d %F %Y",time_picker:"%H:%i",task_attribute:"data-task-id",link_attribute:"data-link-id",layer_attribute:"data-layer",buttons_left:["gantt_save_btn","gantt_cancel_btn"],_migrate_buttons:{dhx_save_btn:"gantt_save_btn",dhx_cancel_btn:"gantt_cancel_btn",dhx_delete_btn:"gantt_delete_btn"},buttons_right:["gantt_delete_btn"],lightbox:{sections:[{name:"description",height:70,map_to:"text",type:"textarea",focus:!0},{name:"time",type:"duration",map_to:"auto"}],project_sections:[{name:"description",height:70,map_to:"text",type:"textarea",focus:!0},{name:"type",type:"typeselect",map_to:"type"},{name:"time",type:"duration",readonly:!0,map_to:"auto"}],milestone_sections:[{name:"description",height:70,map_to:"text",type:"textarea",focus:!0},{name:"type",type:"typeselect",map_to:"type"},{name:"time",type:"duration",single_date:!0,map_to:"auto"}]},drag_lightbox:!0,sort:!1,details_on_create:!0,details_on_dblclick:!0,initial_scroll:!0,task_scroll_offset:100,order_branch:!1,order_branch_free:!1,task_height:void 0,bar_height:"full",min_column_width:70,min_grid_column_width:70,grid_resizer_column_attribute:"data-column-index",keep_grid_width:!1,grid_resize:!1,grid_elastic_columns:!1,show_tasks_outside_timescale:!1,show_unscheduled:!0,resize_rows:!1,task_grid_row_resizer_attribute:"data-row-index",min_task_grid_row_height:30,readonly_property:"readonly",editable_property:"editable",calendar_property:"calendar_id",resource_calendars:{},dynamic_resource_calendars:!1,inherit_calendar:!1,type_renderers:{},open_tree_initially:!1,optimize_render:!0,prevent_default_scroll:!1,show_errors:!0,wai_aria_attributes:!0,smart_scales:!0,rtl:!1,placeholder_task:!1,horizontal_scroll_key:"shiftKey",drag_timeline:{useKey:void 0,ignore:".gantt_task_line, .gantt_task_link"},drag_multiple:!0,csp:"auto"}}},function(t,e){t.exports=function(){var t={};return{services:{},setService:function(e,n){t[e]=n},getService:function(e){return t[e]?t[e]():null},dropService:function(e){t[e]&&delete t[e]},destructor:function(){for(var e in t)if(t[e]){var n=t[e];n&&n.destructor&&n.destructor()}t=null}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){return function(t){var e=this;for(var n in this.addExtension=function(t,n){e._extensions[t]=n},this.getExtension=function(t){return e._extensions[t]},this._extensions={},t)this._extensions[n]=t[n]}}();e.default=i},function(t,e){t.exports={KEY_CODES:{UP:38,DOWN:40,LEFT:37,RIGHT:39,SPACE:32,ENTER:13,DELETE:46,ESC:27,TAB:9}}},function(t,e,n){function i(t){"@babel/helpers - typeof";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})(t)}t.exports=function(t){var e=new function(){this.constants=n(250),this.version="8.0.11",this.license="gpl",this.templates={},this.ext={},this.keys={edit_save:this.constants.KEY_CODES.ENTER,edit_cancel:this.constants.KEY_CODES.ESC}},r=new(0,n(249).default)(t),a={};e.plugins=function(t){for(var n in t)if(t[n]&&!a[n]){var i=r.getExtension(n);i&&(i(e),a[n]=!0)}return a},e.$services=n(248)(),e.config=n(247)(),e.ajax=n(246)(e),e.date=n(244)(e),e.RemoteEvents=n(241).remoteEvents;var o=n(239)(e);e.$services.setService("dnd",function(){return o});var s=n(238)(e);e.$services.setService("templateLoader",function(){return s}),n(5)(e);var l=new(n(237));l.registerProvider("global",function(){var t={min_date:e._min_date,max_date:e._max_date,selected_task:null};return e.$data&&e.$data.tasksStore&&(t.selected_task=e.$data.tasksStore.getSelectedId()),t}),e.getState=l.getState,e.$services.setService("state",function(){return l});var c=n(0);c.mixin(e,c),e.Promise=n(236),e.env=n(11),n(234)(e);var u=n(228);e.dataProcessor=u.DEPRECATED_api,e.createDataProcessor=u.createDataProcessor,n(223)(e),n(213)(e),n(205)(e),n(204)(e),n(203)(e),n(190)(e),n(189).default(e),n(188)(e),n(187)(e),n(186)(e),n(183)(e),n(182).default(e);var d=n(181).default();return e.i18n={addLocale:d.addLocale,setLocale:function(t){if("string"==typeof t){var n=d.getLocale(t);n||(n=d.getLocale("en")),e.locale=n}else if(t)if(e.locale)for(var r in t)t[r]&&"object"===i(t[r])?(e.locale[r]||(e.locale[r]={}),e.mixin(e.locale[r],t[r],!0)):e.locale[r]=t[r];else e.locale=t},getLocale:d.getLocale},e.i18n.setLocale("en"),e}},function(t,e,n){n(35);var i=n(251);t.exports=function(t){var e=i(t);return e.env.isNode||(n(147)(e),n(69)(e),n(68)(e)),e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=100,r=function(){function t(t){var e=this;this.maxSteps=i,this.undoEnabled=!0,this.redoEnabled=!0,this.action={create:function(t){return{commands:t?t.slice():[]}},invert:function(t){for(var n,i=e._gantt.copy(t),r=e.command,a=0;athis.maxSteps;)t.shift();return e}}},t.prototype._pop=function(t){return t.pop()},t.prototype._reorderCommands=function(t){var e={any:0,link:1,task:2},n={move:1,any:0};t.commands.sort(function(t,i){if("task"===t.entity&&"task"===i.entity)return t.type!==i.type?(n[i.type]||0)-(n[t.type]||0):"move"===t.type&&t.oldValue&&i.oldValue&&i.oldValue.parent===t.oldValue.parent?t.oldValue.$index-i.oldValue.$index:0;var r=e[t.entity]||e.any;return(e[i.entity]||e.any)-r})},t.prototype._applyAction=function(t){var e=null,n=this.command.entity,i=this.command.type,r=this._gantt,a={};a[n.task]={add:"addTask",get:"getTask",update:"updateTask",remove:"deleteTask",move:"moveTask",isExists:"isTaskExists"},a[n.link]={add:"addLink",get:"getLink",update:"updateLink",remove:"deleteLink",isExists:"isLinkExists"},r.batchUpdate(function(){for(var n=0;n1&&r.forEach(function(e){t.store(e,n.config.undo_types.task,!0)})}return t.store(e,n.config.undo_types.task)}),n.attachEvent("onAfterTaskDrag",function(e){(u||n.plugins().multiselect&&n.getSelectedTasks().length>1)&&c===e&&(u=!1,c=null,t.stopBatchAction()),t.store(e,n.config.undo_types.task,!0)}),n.attachEvent("onLightbox",function(e){return t.store(e,n.config.undo_types.task)}),n.attachEvent("onBeforeTaskAutoSchedule",function(e){return t.store(e.id,n.config.undo_types.task,!0),!0}),n.ext.inlineEditors){var d=null,h=null;n.attachEvent("onGanttLayoutReady",function(){d&&n.ext.inlineEditors.detachEvent(d),h&&n.ext.inlineEditors.detachEvent(h),h=n.ext.inlineEditors.attachEvent("onEditStart",function(e){t.store(e.id,n.config.undo_types.task)}),d=n.ext.inlineEditors.attachEvent("onBeforeEditStart",function(e){return t.stopBatchAction(),!0})})}},t.prototype._storeCommand=function(t){var e=this._undo;if(e.updateConfigs(),e.undoEnabled)if(this._batchMode)this._batchAction.commands.push(t);else{var n=e.action.create([t]);e.logAction(n)}},t.prototype._storeEntityCommand=function(t,e,n,i){var r=this._undo.command.create(t,e,n,i);this._storeCommand(r)},t.prototype._storeTaskCommand=function(t,e){this._gantt.isTaskExists(t.id)&&(t.$local_index=this._gantt.getTaskIndex(t.id)),this._storeEntityCommand(t,this.getInitialTask(t.id),e,this._undo.command.entity.task)},t.prototype._storeLinkCommand=function(t,e){this._storeEntityCommand(t,this.getInitialLink(t.id),e,this._undo.command.entity.link)},t.prototype._getLinks=function(t){return t.$source.concat(t.$target)},t.prototype._storeTask=function(t,e){var n=this;void 0===e&&(e=!1);var i=this._gantt;return this.setInitialTask(t,e),i.eachTask(function(t){n.setInitialTask(t.id)},t),!0},t.prototype._storeLink=function(t,e){return void 0===e&&(e=!1),this.setInitialLink(t,e),!0},t}();e.Monitor=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(254),r=n(253);e.default=function(t){var e=new r.Undo(t),n=new i.Monitor(e,t);function a(t,e,n){t&&(t.id===e&&(t.id=n),t.parent===e&&(t.parent=n))}function o(t,e,n){a(t.value,e,n),a(t.oldValue,e,n)}function s(t,e,n){t&&(t.source===e&&(t.source=n),t.target===e&&(t.target=n))}function l(t,e,n){s(t.value,e,n),s(t.oldValue,e,n)}function c(t,n,i){for(var r=e,a=0;an.bottom&&(a.bottom=n.bottom,a.top=a.bottom-a.height),a.leftn.right&&(a.right=n.right,a.left=a.right-a.width),c.x>=a.left&&c.x<=a.right&&(a.left=c.x-a.width-o,a.right=a.left+a.width),c.y>=a.top&&c.y<=a.bottom&&(a.top=c.y-a.height-s,a.bottom=a.top+a.height),a},t.prototype._getViewPortSize=function(){var t,e=this._gantt,n=this._getViewPort(),r=n,a=window.scrollY+document.body.scrollTop,o=window.scrollX+document.body.scrollLeft;return n===e.$task_data?(r=e.$task,a=0,o=0,t=i.getNodePosition(e.$task)):t=i.getNodePosition(r),{left:t.x+o,top:t.y+a,width:t.width,height:t.height,bottom:t.y+t.height+a,right:t.x+t.width+o}},t}();e.Tooltip=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(51),r=n(1),a=n(2),o=n(256),s=function(){function t(t){this._listeners={},this.tooltip=new o.Tooltip(t),this._gantt=t,this._domEvents=i(),this._initDelayedFunctions()}return t.prototype.destructor=function(){this.tooltip.hide(),this._domEvents.detachAll()},t.prototype.hideTooltip=function(){this.delayHide()},t.prototype.attach=function(t){var e=this,n=document.body,i=this._gantt;t.global||(n=i.$root);var a=null,o=function(n){var i=r.getTargetNode(n),o=r.closest(i,t.selector);if(!r.isChildOf(i,e.tooltip.getNode())){var s=function(){a=o,t.onmouseenter(n,o)};a?o&&o===a?t.onmousemove(n,o):(t.onmouseleave(n,a),a=null,o&&o!==a&&s()):o&&s()}};this.detach(t.selector),this._domEvents.attach(n,"mousemove",o),this._listeners[t.selector]={node:n,handler:o}},t.prototype.detach=function(t){var e=this._listeners[t];e&&this._domEvents.detach(e.node,"mousemove",e.handler)},t.prototype.tooltipFor=function(t){var e=this,n=function(t){var e=t;return document.createEventObject&&!document.createEvent&&(e=document.createEventObject(t)),e};this._initDelayedFunctions(),this.attach({selector:t.selector,global:t.global,onmouseenter:function(i,r){var a=t.html(i,r);a&&e.delayShow(n(i),a)},onmousemove:function(i,r){var a=t.html(i,r);a?e.delayShow(n(i),a):(e.delayShow.$cancelTimeout(),e.delayHide())},onmouseleave:function(){e.delayShow.$cancelTimeout(),e.delayHide()}})},t.prototype._initDelayedFunctions=function(){var t=this,e=this._gantt;this.delayShow&&this.delayShow.$cancelTimeout(),this.delayHide&&this.delayHide.$cancelTimeout(),this.tooltip.hide(),this.delayShow=a.delay(function(n,i){!1===e.callEvent("onBeforeTooltip",[n])?t.tooltip.hide():(t.tooltip.setContent(i),t.tooltip.show(n))},e.config.tooltip_timeout||1),this.delayHide=a.delay(function(){t.delayShow.$cancelTimeout(),t.tooltip.hide()},e.config.tooltip_hide_timeout||1)},t}();e.TooltipManager=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(257);e.default=function(t){t.config.tooltip_timeout=30,t.config.tooltip_offset_y=20,t.config.tooltip_offset_x=10,t.config.tooltip_hide_timeout=30;var e=new i.TooltipManager(t);t.ext.tooltips=e,t.attachEvent("onGanttReady",function(){e.tooltipFor({selector:"["+t.config.task_attribute+"]:not(.gantt_task_row)",html:function(e){if(!t.config.touch||t.config.touch_tooltip){var n=t.locate(e);if(t.isTaskExists(n)){var i=t.getTask(n);return t.templates.tooltip_text(i.start_date,i.end_date,i)}return null}},global:!1})}),t.attachEvent("onDestroy",function(){e.destructor()}),t.attachEvent("onLightbox",function(){e.hideTooltip()}),t.attachEvent("onBeforeTooltip",function(){if(t.getState().link_source_id)return!1}),t.attachEvent("onGanttScroll",function(){e.hideTooltip()})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){var e=this;this.show=function(t,n){void 0===n?e._showForTask(t):e._showAtCoordinates(t,n)},this.hide=function(t){var n=e._gantt,i=e._quickInfoBox;e._quickInfoBoxId=0;var r=e._quickInfoTask;if(e._quickInfoTask=null,i&&i.parentNode){if(n.config.quick_info_detached)return n.callEvent("onAfterQuickInfo",[r]),i.parentNode.removeChild(i);i.className+=" gantt_qi_hidden","auto"===i.style.right?i.style.left="-350px":i.style.right="-350px",t&&(i.style.left=i.style.right="",i.parentNode.removeChild(i)),n.callEvent("onAfterQuickInfo",[r])}},this.getNode=function(){return e._quickInfoBox?e._quickInfoBox:null},this.setContainer=function(t){t&&(e._container="string"==typeof t?document.getElementById(t):t)},this.setContent=function(t){var n=e._gantt,i={taskId:null,header:{title:"",date:""},content:"",buttons:n.config.quickinfo_buttons};t||(t=i),t.taskId||(t.taskId=i.taskId),t.header||(t.header=i.header),t.header.title||(t.header.title=i.header.title),t.header.date||(t.header.date=i.header.date),t.content||(t.content=i.content),t.buttons||(t.buttons=i.buttons);var r=e.getNode();r||(r=e._createQuickInfoElement()),t.taskId&&(e._quickInfoBoxId=t.taskId);var a=r.querySelector(".gantt_cal_qi_title"),o=a.querySelector(".gantt_cal_qi_tcontent"),s=a.querySelector(".gantt_cal_qi_tdate"),l=r.querySelector(".gantt_cal_qi_content"),c=r.querySelector(".gantt_cal_qi_controls");n._waiAria.quickInfoHeader(r,[t.header.title,t.header.date].join(" ")),o.innerHTML=t.header.title,s.innerHTML=t.header.date,t.header.title||t.header.date?a.style.display="":a.style.display="none",l.innerHTML=t.content;var u=t.buttons;u.length?c.style.display="":c.style.display="none";for(var d="",h=0;h
"+n.locale.labels[u[h]]+"
"}c.innerHTML=d,n.eventRemove(r,"click",e._qiButtonClickHandler),n.eventRemove(r,"keypress",e._qiKeyPressHandler),n.event(r,"click",e._qiButtonClickHandler),n.event(r,"keypress",e._qiKeyPressHandler)},this._qiButtonClickHandler=function(t){t=t||event,e._qi_button_click(t.target||t.srcElement)},this._qiKeyPressHandler=function(t){var n=(t=t||event).which||event.keyCode;13!==n&&32!==n||setTimeout(function(){e._qi_button_click(t.target||t.srcElement)},1)},this._gantt=t}return t.prototype._showAtCoordinates=function(t,e){this.hide(!0),this._quickInfoBoxId=0,this._quickInfoTask=null,this._quickInfoBox||(this._createQuickInfoElement(),this.setContent()),this._appendAtCoordinates(t,e),this._gantt.callEvent("onQuickInfo",[null])},t.prototype._showForTask=function(t){var e=this._gantt;if((t!==this._quickInfoBoxId||!e.utils.dom.isChildOf(this._quickInfoBox,document.body))&&e.config.show_quick_info){this.hide(!0);var n=this._getContainer(),i=this._get_event_counter_part(t,6,n.xViewport,n.yViewport);i&&(this._quickInfoBox=this._init_quick_info(t),this._quickInfoTask=t,this._quickInfoBox.className=this._prepare_quick_info_classname(t),this._fill_quick_data(t),this._show_quick_info(i,6),e.callEvent("onQuickInfo",[t]))}},t.prototype._get_event_counter_part=function(t,e,n,i){var r=this._gantt,a=r.getTaskNode(t);if(!a&&!(a=r.getTaskRowNode(t)))return null;var o=0,s=e+a.offsetTop+a.offsetHeight,l=a;if(r.utils.dom.isChildOf(l,n))for(;l&&l!==n;)o+=l.offsetLeft,l=l.offsetParent;var c=r.getScrollState();return l?{left:o,top:s,dx:o+a.offsetWidth/2-c.x>n.offsetWidth/2?1:0,dy:s+a.offsetHeight/2-c.y>i.offsetHeight/2?1:0,width:a.offsetWidth,height:a.offsetHeight}:null},t.prototype._createQuickInfoElement=function(){var t=this,e=this._gantt,n=document.createElement("div");n.className+="gantt_cal_quick_info",e._waiAria.quickInfoAttr(n);var i='
';if(i+='
',i+="
",n.innerHTML=i,e.config.quick_info_detached){var r=this._getContainer();e.event(r.parent,"scroll",function(){t.hide()})}return this._quickInfoBox=n,n},t.prototype._init_quick_info=function(t){var e=this._gantt,n=e.getTask(t);return"boolean"==typeof this._quickInfoReadonly&&e.isReadonly(n)!==this._quickInfoReadonly&&(this.hide(!0),this._quickInfoBox=null),this._quickInfoReadonly=e.isReadonly(n),this._quickInfoBox||(this._quickInfoBox=this._createQuickInfoElement()),this._quickInfoBox},t.prototype._prepare_quick_info_classname=function(t){var e=this._gantt,n=e.getTask(t),i="gantt_cal_quick_info",r=e.templates.quick_info_class(n.start_date,n.end_date,n);return r&&(i+=" "+r),i},t.prototype._fill_quick_data=function(t){var e=this._gantt,n=e.getTask(t);this._quickInfoBoxId=t;var i=[];if(this._quickInfoReadonly)for(var r=e.config.quickinfo_buttons,a={icon_delete:!0,icon_edit:!0},o=0;oc.offsetHeight/2&&(h=t.top-(o+t.height+2*e))t.getGlobalTaskIndex(n)?1:-1}),e},forSelected:function(t){for(var e=this.getSelected(),n=0;nl?t.getNext(c):t.getPrev(c);for(c=n;t.getGlobalTaskIndex(c)!==i;)this.select(c,e)&&!a&&(a=!0,r=c),c=i>s?t.getNext(c):t.getPrev(c)}}else o=n}.bind(this);return s&&(e.ctrlKey||e.metaKey)?(this.isSelected(n)||this.setFirstSelected(n),n&&this.toggle(n,e)):s&&e.shiftKey?(t.isTaskExists(this.getFirstSelected())&&null!==this.getFirstSelected()||this.setFirstSelected(n),i.length?c():l()):l(),this.isSelected(n)?this.setLastSelected(n):r?n==o&&this.setLastSelected(e.shiftKey?r:this.getDefaultSelected()):this.setLastSelected(null),this.getSelected().length||this.setLastSelected(null),this.getLastSelected()&&this.isSelected(this.getFirstSelected())||this.setFirstSelected(this.getLastSelected()),!0}},function(){var e=t.selectTask;t.selectTask=function(n){if(!(n=i(n,this.config.root_id)))return!1;var r=t._multiselect,a=n;return r.isActive()?(r.select(n,null)&&r.setLastSelected(n),r.setFirstSelected(r.getLastSelected())):a=e.call(this,n),a};var n=t.unselectTask;t.unselectTask=function(e){var i=t._multiselect,r=i.isActive();(e=e||i.getLastSelected())&&r&&(i.unselect(e,null),e==i.getLastSelected()&&i.setLastSelected(null),t.refreshTask(e),i.setFirstSelected(i.getLastSelected()));var a=e;return r||(a=n.call(this,e)),a},t.toggleTaskSelection=function(e){var n=t._multiselect;e&&n.isActive()&&(n.toggle(e),n.setFirstSelected(n.getLastSelected()))},t.getSelectedTasks=function(){var e=t._multiselect;return e.isActive(),e.getSelected()},t.eachSelectedTask=function(t){return this._multiselect.forSelected(t)},t.isSelectedTask=function(t){return this._multiselect.isSelected(t)},t.getLastSelectedTask=function(){return this._multiselect.getLastSelected()},t.attachEvent("onGanttReady",function(){var e=t.$data.tasksStore.isSelected;t.$data.tasksStore.isSelected=function(n){return t._multiselect.isActive()?t._multiselect.isSelected(n):e.call(this,n)}})}(),t.attachEvent("onTaskIdChange",function(e,n){var i=t._multiselect;if(!i.isActive())return!0;t.isSelectedTask(e)&&(i.unselect(e,null),i.select(n,null))}),t.attachEvent("onAfterTaskDelete",function(e,n){var i=t._multiselect;if(!i.isActive())return!0;i._selected[e]&&(i._selected[e]=!1,i.setLastSelected(i.getDefaultSelected())),i.forSelected(function(e){t.isTaskExists(e)||i.unselect(e,null)})}),t.attachEvent("onBeforeTaskMultiSelect",function(e,n,i){var r=t._multiselect;return!(n&&r.isActive()&&r._one_level)||r.isSameLevel(e)}),t.attachEvent("onTaskClick",function(e,n){return t._multiselect.doSelection(n)&&t.callEvent("onMultiSelect",[n]),!0})}},function(t,e){t.exports=function(t){function e(e){if(!t.config.show_markers)return!1;if(!e.start_date)return!1;var n=t.getState();if(!(+e.start_date>+n.max_date||(!e.end_date||+e.end_date<+n.min_date)&&+e.start_date<+n.min_date)){var i=document.createElement("div");i.setAttribute("data-marker-id",e.id);var r="gantt_marker";t.templates.marker_class&&(r+=" "+t.templates.marker_class(e)),e.css&&(r+=" "+e.css),e.title&&(i.title=e.title),i.className=r;var a=t.posFromDate(e.start_date);i.style.left=a+"px";var o=Math.max(t.getRowTop(t.getVisibleTaskCount()),0)+"px";if(t.config.timeline_placeholder&&t.$task_data&&(o=t.$task_data.scrollHeight+"px"),i.style.height=o,e.end_date){var s=t.posFromDate(e.end_date);i.style.width=Math.max(s-a,0)+"px"}return e.text&&(i.innerHTML="
"+e.text+"
"),i}}function n(){if(t.$task_data){var e=document.createElement("div");e.className="gantt_marker_area",t.$task_data.appendChild(e),t.$marker_area=e}}t._markers||(t._markers=t.createDatastore({name:"marker",initItem:function(e){return e.id=e.id||t.uid(),e}})),t.config.show_markers=!0,t.attachEvent("onBeforeGanttRender",function(){t.$marker_area||n()}),t.attachEvent("onDataRender",function(){t.$marker_area||(n(),t.renderMarkers())}),t.attachEvent("onGanttLayoutReady",function(){t.attachEvent("onBeforeGanttRender",function(){n(),t.$services.getService("layers").createDataRender({name:"marker",defaultContainer:function(){return t.$marker_area}}).addLayer(e)},{once:!0})}),t.getMarker=function(t){return this._markers?this._markers.getItem(t):null},t.addMarker=function(t){return this._markers.addItem(t)},t.deleteMarker=function(t){return!!this._markers.exists(t)&&(this._markers.removeItem(t),!0)},t.updateMarker=function(t){this._markers.refresh(t)},t._getMarkers=function(){return this._markers.getItems()},t.renderMarkers=function(){this._markers.refresh()}}},function(t,e){t.exports=function(t){t.$keyboardNavigation.dispatcher={isActive:!1,activeNode:null,globalNode:new t.$keyboardNavigation.GanttNode,enable:function(){this.isActive=!0,this.setActiveNode(this.getActiveNode())},disable:function(){this.isActive=!1},isEnabled:function(){return!!this.isActive},getDefaultNode:function(){var e;return(e=t.config.keyboard_navigation_cells?new t.$keyboardNavigation.TaskCell:new t.$keyboardNavigation.TaskRow).isValid()||(e=e.fallback()),e},setDefaultNode:function(){this.setActiveNode(this.getDefaultNode())},getActiveNode:function(){var t=this.activeNode;return t&&!t.isValid()&&(t=t.fallback()),t},fromDomElement:function(e){for(var n=[t.$keyboardNavigation.TaskRow,t.$keyboardNavigation.TaskCell,t.$keyboardNavigation.HeaderCell],i=0;i=0&&!i[r];)r--;i[r]&&(n=new t.$keyboardNavigation.TaskCell(e.taskId,r))}return n},fromDomElement:function(n){if(!t.config.keyboard_navigation_cells)return null;var i=t.locate(n);if(t.isTaskExists(i)){var r=0,a=e.locateAttribute(n,"data-column-index");return a&&(r=1*a.getAttribute("data-column-index")),new t.$keyboardNavigation.TaskCell(i,r)}return null},getNode:function(){if(t.isTaskExists(this.taskId)&&t.isTaskVisible(this.taskId)){if(t.config.show_grid){var e=t.$grid.querySelector(".gantt_row["+t.config.task_attribute+"='"+this.taskId+"']");return e?e.querySelector("[data-column-index='"+this.columnIndex+"']"):null}return t.getTaskNode(this.taskId)}},keys:{up:function(){var e=null,n=t.getPrev(this.taskId);e=t.isTaskExists(n)?new t.$keyboardNavigation.TaskCell(n,this.columnIndex):new t.$keyboardNavigation.HeaderCell(this.columnIndex),this.moveTo(e)},down:function(){var e=t.getNext(this.taskId);t.isTaskExists(e)&&this.moveTo(new t.$keyboardNavigation.TaskCell(e,this.columnIndex))},left:function(){this.columnIndex>0&&this.moveTo(new t.$keyboardNavigation.TaskCell(this.taskId,this.columnIndex-1))},right:function(){var e=t.getGridColumns();this.columnIndex-1},fallback:function(){if(!t.getVisibleTaskCount()){var e=new t.$keyboardNavigation.HeaderCell;return e.isValid()?e:null}var n=-1;if(t.getTaskByIndex(this.globalIndex-1))n=this.globalIndex-1;else if(t.getTaskByIndex(this.globalIndex+1))n=this.globalIndex+1;else for(var i=this.globalIndex;i>=0;){if(t.getTaskByIndex(i)){n=i;break}i--}if(n>-1)return new t.$keyboardNavigation.TaskRow(t.getTaskByIndex(n).id)},fromDomElement:function(e){if(t.config.keyboard_navigation_cells)return null;var n=t.locate(e);return t.isTaskExists(n)?new t.$keyboardNavigation.TaskRow(n):null},getNode:function(){if(t.isTaskExists(this.taskId)&&t.isTaskVisible(this.taskId))return t.config.show_grid?t.$grid.querySelector(".gantt_row["+t.config.task_attribute+"='"+this.taskId+"']"):t.getTaskNode(this.taskId)},focus:function(e){if(!e){var n,i,r=t.getTaskPosition(t.getTask(this.taskId)),a=t.getTaskHeight(this.taskId),o=t.getScrollState();n=t.$task?t.$task.offsetWidth:o.inner_width,i=t.$grid_data||t.$task_data?(t.$grid_data||t.$task_data).offsetHeight:o.inner_height,r.topo.y+i?t.scrollTo(null,r.top-20):t.config.scroll_on_click&&t.config.show_chart&&(r.left>o.x+n?t.scrollTo(r.left-t.config.task_scroll_offset):r.left+r.width=0&&!e[n];)n--;return e[n]?new t.$keyboardNavigation.HeaderCell(n):null},fromDomElement:function(n){var i=e.locateClassName(n,"gantt_grid_head_cell");if(i){for(var r=0;i&&i.previousSibling;)i=i.previousSibling,r+=1;return new t.$keyboardNavigation.HeaderCell(r)}return null},getNode:function(){return t.$grid_scale.childNodes[this.index]},keys:{left:function(){this.index>0&&this.moveTo(new t.$keyboardNavigation.HeaderCell(this.index-1))},right:function(){var e=t.getGridColumns();this.index=r.length-1){var c=r[0];if(c)return c.focus(),i.preventDefault(),!0}return!1}}()}},function(t,e){t.exports=function(t){t.$keyboardNavigation.EventHandler={_handlers:null,findHandler:function(e){this._handlers||(this._handlers={});var n=t.$keyboardNavigation.shortcuts.getHash(e);return this._handlers[n]},doAction:function(e,n){var i=this.findHandler(e);if(i){if(!1===t.$keyboardNavigation.facade.callEvent("onBeforeAction",[e,n]))return;i.call(this,n),n.preventDefault?n.preventDefault():n.returnValue=!1}},bind:function(e,n){this._handlers||(this._handlers={});for(var i=t.$keyboardNavigation.shortcuts,r=i.parse(e),a=0;a=96&&e.keyCode<=105&&(e.keyCode-=48);var n=String.fromCharCode(e.keyCode);return n&&(e.keyCode=n.toLowerCase().charCodeAt(0)),e},getHashFromEvent:function(t){return this.getHash(this.getCommandFromEvent(t))},getHash:function(t){var e=[];for(var n in t.modifiers)t.modifiers[n]&&e.push(n);return e.push(t.keyCode),e.join(this.junctionChar)},getExpressions:function(t){return t.split(this.junctionChar)},getWords:function(t){return t.split(this.combinationChar)},trim:function(t){return t.replace(/\s/g,"")},junctionChar:",",combinationChar:"+",commandKeys:{shift:16,alt:18,ctrl:17,meta:!0},specialKeys:{backspace:8,tab:9,enter:13,esc:27,space:32,up:38,down:40,left:37,right:39,home:36,end:35,pageup:33,pagedown:34,delete:46,insert:45,plus:107,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123}}}},function(t,e,n){t.exports=function(t){var e=n(5);!function(t){t.config.keyboard_navigation=!0,t.config.keyboard_navigation_cells=!1,t.$keyboardNavigation={},t._compose=function(){for(var t=Array.prototype.slice.call(arguments,0),e={},n=0;n=a&&o()}}),t._smart_render){var e=t._smart_render._redrawTasks;t._smart_render._redrawTasks=function(i,r){if(t.config.keyboard_navigation&&n.isEnabled()){var a=n.getActiveNode();if(a&&void 0!==a.taskId){for(var o=!1,s=0;s0&&c>l&&(c=l);for(var u=0;u=0?(d=g.substr(0,p),h=g.substr(p+1)):(d=g,h=""),f=decodeURIComponent(d),_=decodeURIComponent(h),i(o,f)?r(o[f])?o[f].push(_):o[f]=[o[f],_]:o[f]=_}return o};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";e.decode=e.parse=n(276),e.encode=e.stringify=n(275)},function(t,e,n){"use strict";function i(t){"@babel/helpers - typeof";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})(t)}t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"===i(t)&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},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}},function(t,e,n){(function(t,i){var r;function a(t){"@babel/helpers - typeof";return(a="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})(t)} -/*! https://mths.be/punycode v1.4.1 by @mathias */!function(o){var s="object"==a(e)&&e&&!e.nodeType&&e,l="object"==a(t)&&t&&!t.nodeType&&t,c="object"==(void 0===i?"undefined":a(i))&&i;c.global!==c&&c.window!==c&&c.self!==c||(o=c);var u,d,h=2147483647,f=36,_=1,g=26,p=38,v=700,m=72,y=128,k="-",b=/^xn--/,x=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,S={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=f-_,$=Math.floor,C=String.fromCharCode;function E(t){throw new RangeError(S[t])}function A(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function D(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+A((t=t.replace(w,".")).split("."),e).join(".")}function M(t){for(var e,n,i=[],r=0,a=t.length;r=55296&&e<=56319&&r65535&&(e+=C((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=C(t)}).join("")}function P(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:f}function N(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function O(t,e,n){var i=0;for(t=n?$(t/v):t>>1,t+=$(t/e);t>T*g>>1;i+=f)t=$(t/T);return $(i+(T+1)*t/(t+p))}function L(t){var e,n,i,r,a,o,s,l,c,u,d=[],p=t.length,v=0,b=y,x=m;for((n=t.lastIndexOf(k))<0&&(n=0),i=0;i=128&&E("not-basic"),d.push(t.charCodeAt(i));for(r=n>0?n+1:0;r=p&&E("invalid-input"),((l=P(t.charCodeAt(r++)))>=f||l>$((h-v)/o))&&E("overflow"),v+=l*o,!(l<(c=s<=x?_:s>=x+g?g:s-x));s+=f)o>$(h/(u=f-c))&&E("overflow"),o*=u;x=O(v-a,e=d.length+1,0==a),$(v/e)>h-b&&E("overflow"),b+=$(v/e),v%=e,d.splice(v++,0,b)}return I(d)}function R(t){var e,n,i,r,a,o,s,l,c,u,d,p,v,b,x,w=[];for(p=(t=M(t)).length,e=y,n=0,a=m,o=0;o=e&&d$((h-n)/(v=i+1))&&E("overflow"),n+=(s-e)*v,e=s,o=0;oh&&E("overflow"),d==e){for(l=n,c=f;!(l<(u=c<=a?_:c>=a+g?g:c-a));c+=f)x=l-u,b=f-u,w.push(C(N(u+x%b,0))),l=$(x/b);w.push(C(N(l,0))),a=O(n,v,i==r),n=0,++i}++n,++e}return w.join("")}if(u={version:"1.4.1",ucs2:{decode:M,encode:I},decode:L,encode:R,toASCII:function(t){return D(t,function(t){return x.test(t)?"xn--"+R(t):t})},toUnicode:function(t){return D(t,function(t){return b.test(t)?L(t.slice(4).toLowerCase()):t})}},"object"==a(n(53))&&n(53))void 0===(r=function(){return u}.call(e,n,e,t))||(t.exports=r);else if(s&&l)if(t.exports==s)l.exports=u;else for(d in u)u.hasOwnProperty(d)&&(s[d]=u[d]);else o.punycode=u}(this)}).call(this,n(279)(t),n(4))},function(t,e){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(t,e){t.exports=function(){for(var t={},e=0;e0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var e=i.allocUnsafe(t>>>0),n=this.head,r=0;n;)a(n.data,e,r),r+=n.data.length,n=n.next;return e},t}(),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var t=r.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,n){(function(e,i,r){var a=n(65),o=n(8),s=n(64),l=n(63),c=n(283),u=s.IncomingMessage,d=s.readyStates;var h=t.exports=function(t){var n,i=this;l.Writable.call(i),i._opts=t,i._body=[],i._headers={},t.auth&&i.setHeader("Authorization","Basic "+new e(t.auth).toString("base64")),Object.keys(t.headers).forEach(function(e){i.setHeader(e,t.headers[e])});var r=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!a.abortController)r=!1,n=!0;else if("prefer-streaming"===t.mode)n=!1;else if("allow-wrong-content-type"===t.mode)n=!a.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");n=!0}i._mode=function(t,e){return a.fetch&&e?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&t?"arraybuffer":a.vbArray&&t?"text:vbarray":"text"}(n,r),i._fetchTimer=null,i.on("finish",function(){i._onFinish()})};o(h,l.Writable),h.prototype.setHeader=function(t,e){var n=t.toLowerCase();-1===f.indexOf(n)&&(this._headers[n]={name:t,value:e})},h.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},h.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},h.prototype._onFinish=function(){var t=this;if(!t._destroyed){var n=t._opts,o=t._headers,s=null;"GET"!==n.method&&"HEAD"!==n.method&&(s=a.arraybuffer?c(e.concat(t._body)):a.blobConstructor?new i.Blob(t._body.map(function(t){return c(t)}),{type:(o["content-type"]||{}).value||""}):e.concat(t._body).toString());var l=[];if(Object.keys(o).forEach(function(t){var e=o[t].name,n=o[t].value;Array.isArray(n)?n.forEach(function(t){l.push([e,t])}):l.push([e,n])}),"fetch"===t._mode){var u=null;if(a.abortController){var h=new AbortController;u=h.signal,t._fetchAbortController=h,"requestTimeout"in n&&0!==n.requestTimeout&&(t._fetchTimer=i.setTimeout(function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()},n.requestTimeout))}i.fetch(t._opts.url,{method:t._opts.method,headers:l,body:s||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin",signal:u}).then(function(e){t._fetchResponse=e,t._connect()},function(e){i.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)})}else{var f=t._xhr=new i.XMLHttpRequest;try{f.open(t._opts.method,t._opts.url,!0)}catch(e){return void r.nextTick(function(){t.emit("error",e)})}"responseType"in f&&(f.responseType=t._mode.split(":")[0]),"withCredentials"in f&&(f.withCredentials=!!n.withCredentials),"text"===t._mode&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in n&&(f.timeout=n.requestTimeout,f.ontimeout=function(){t.emit("requestTimeout")}),l.forEach(function(t){f.setRequestHeader(t[0],t[1])}),t._response=null,f.onreadystatechange=function(){switch(f.readyState){case d.LOADING:case d.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(f.onprogress=function(){t._onXHRProgress()}),f.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{f.send(s)}catch(e){return void r.nextTick(function(){t.emit("error",e)})}}}},h.prototype._onXHRProgress=function(){(function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},h.prototype._connect=function(){var t=this;t._destroyed||(t._response=new u(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",function(e){t.emit("error",e)}),t.emit("response",t._response))},h.prototype._write=function(t,e,n){this._body.push(t),n()},h.prototype.abort=h.prototype.destroy=function(){this._destroyed=!0,i.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},h.prototype.end=function(t,e,n){"function"==typeof t&&(n=t,t=void 0),l.Writable.prototype.end.call(this,t,e,n)},h.prototype.flushHeaders=function(){},h.prototype.setTimeout=function(){},h.prototype.setNoDelay=function(){},h.prototype.setSocketKeepAlive=function(){};var f=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,n(13).Buffer,n(4),n(9))},function(t,e,n){var i=n(66),r=n(54),a=t.exports;for(var o in i)i.hasOwnProperty(o)&&(a[o]=i[o]);function s(t){if("string"==typeof t&&(t=r.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}a.request=function(t,e){return t=s(t),i.request.call(this,t,e)},a.get=function(t,e){return t=s(t),i.get.call(this,t,e)}},function(t,e){e.read=function(t,e,n,i,r){var a,o,s=8*r-i-1,l=(1<>1,u=-7,d=n?r-1:0,h=n?-1:1,f=t[e+d];for(d+=h,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+t[e+d],d+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=i;u>0;o=256*o+t[e+d],d+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,i),a-=c}return(f?-1:1)*o*Math.pow(2,a-i)},e.write=function(t,e,n,i,r,a){var o,s,l,c=8*a-r-1,u=(1<>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:a-1,_=i?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(o++,l/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(e*l-1)*Math.pow(2,r),o+=d):(s=e*Math.pow(2,d-1)*Math.pow(2,r),o=0));r>=8;t[n+f]=255&s,f+=_,s/=256,r-=8);for(o=o<0;t[n+f]=255&o,f+=_,o/=256,c-=8);t[n+f-_]|=128*g}},function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],i=e[1];return 3*(n+i)/4-i},e.toByteArray=function(t){for(var e,n=c(t),i=n[0],o=n[1],s=new a(function(t,e,n){return 3*(e+n)/4-n}(0,i,o)),l=0,u=o>0?i-4:i,d=0;d>16&255,s[l++]=e>>8&255,s[l++]=255&e;2===o&&(e=r[t.charCodeAt(d)]<<2|r[t.charCodeAt(d+1)]>>4,s[l++]=255&e);1===o&&(e=r[t.charCodeAt(d)]<<10|r[t.charCodeAt(d+1)]<<4|r[t.charCodeAt(d+2)]>>2,s[l++]=e>>8&255,s[l++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,r=n%3,a=[],o=0,s=n-r;os?s:o+16383));1===r?(e=t[n-1],a.push(i[e>>2]+i[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],a.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"="));return a.join("")};for(var i=[],r=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t){return i[t>>18&63]+i[t>>12&63]+i[t>>6&63]+i[63&t]}function d(t,e,n){for(var i,r=[],a=e;a400))try{t=JSON.parse(o.responseText)}catch(t){}a&&a(t)},o.open("POST",n,!0),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.send(r)},_ajaxToExport:function(t,n,i){delete t.callback;var r=t.server||e.ext.export_api._apiUrl,a="type="+n+"&store=1&data="+encodeURIComponent(JSON.stringify(t));e.ext.export_api._xdr(r,a,function(t){var e=t.xmlDoc||t,n=null;if(!(e.status>400))try{n=JSON.parse(e.responseText)}catch(t){}i(n)})},_serializableGanttConfig:function(t){var n=e.mixin({},t);return n.columns&&(n.columns=n.columns.map(function(t){var n=e.mixin({},t);return delete n.editor,n})),delete n.editor_types,n},_sendToExport:function(t,n){var i=e.date.date_to_str(e.config.date_format||e.config.xml_date);if(t.config&&(t.config=e.copy(e.ext.export_api._serializableGanttConfig(t.config)),e.ext.export_api._markColumns(t,n),t.config.start_date&&t.config.end_date&&(t.config.start_date instanceof Date&&(t.config.start_date=i(t.config.start_date)),t.config.end_date instanceof Date&&(t.config.end_date=i(t.config.end_date)))),e.env.isNode){var r=t.server||e.ext.export_api._apiUrl,a={type:n,store:0,data:JSON.stringify(t)},o=t.callback||function(t){console.log(t)};return e.ext.export_api._xdr(r,a,o)}if(t.callback)return e.ext.export_api._ajaxToExport(t,n,t.callback);var s=e.ext.export_api._createHiddenForm();s.firstChild.action=t.server||e.ext.export_api._apiUrl,s.firstChild.childNodes[0].value=JSON.stringify(t),s.firstChild.childNodes[1].value=n,s.firstChild.submit()},_createHiddenForm:function(){if(!e.ext.export_api._hidden_export_form){var t=e.ext.export_api._hidden_export_form=document.createElement("div");t.style.display="none",t.innerHTML="
",document.body.appendChild(t)}return e.ext.export_api._hidden_export_form},_copyObjectBase:function(t){var n={start_date:void 0,end_date:void 0};for(var i in t)"$"!==i.charAt(0)&&(n[i]=t[i]);var r=e.templates.xml_format||e.templates.format_date;return n.start_date=r(n.start_date),n.end_date&&(n.end_date=r(n.end_date)),n},_color_box:null,_color_hash:{},_getStyles:function(t){if(e.ext.export_api._color_box||(e.ext.export_api._color_box=document.createElement("DIV"),e.ext.export_api._color_box.style.cssText="position:absolute; display:none;",document.body.appendChild(e.ext.export_api._color_box)),e.ext.export_api._color_hash[t])return e.ext.export_api._color_hash[t];e.ext.export_api._color_box.className=t;var n=e.ext.export_api._getColor(e.ext.export_api._color_box,"color"),i=e.ext.export_api._getColor(e.ext.export_api._color_box,"backgroundColor");return e.ext.export_api._color_hash[t]=n+";"+i},_getMinutesWorktimeSettings:function(t){var e=[];return t.forEach(function(t){e.push(t.startMinute),e.push(t.endMinute)}),e},_getWorktimeSettings:function(){var t,n={hours:[0,24],minutes:null,dates:{0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0}};if(e.config.work_time){var i=e._working_time_helper;if(i&&i.get_calendar)t=i.get_calendar();else if(i)t={hours:i.hours,minutes:null,dates:i.dates};else if(e.config.worktimes&&e.config.worktimes.global){var r=e.config.worktimes.global;if(r.parsed){var a=e.ext.export_api._getMinutesWorktimeSettings(r.parsed.hours);for(var o in t={hours:null,minutes:a,dates:{}},r.parsed.dates)Array.isArray(r.parsed.dates[o])?t.dates[o]=e.ext.export_api._getMinutesWorktimeSettings(r.parsed.dates[o]):t.dates[o]=r.parsed.dates[o]}else t={hours:r.hours,minutes:null,dates:r.dates}}else t=n}else t=n;return t},_eachTaskTimed:function(t,n){return function(i,r,a){r=r||e.config.root_id,a=a||e;var o=e.getChildren(r);if(o)for(var s=0;st)&&(!n||l.start_date-1){for(var s=0;sa.length&&(a=r[o].trace_x);for(o=0;o400))try{t=JSON.parse(s.responseText)}catch(t){}a&&a(t)},s.open("POST",n,!0),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.send(r)}},e.exportToPDF=e.ext.export_api.exportToPDF,e.exportToPNG=e.ext.export_api.exportToPNG,e.exportToICal=e.ext.export_api.exportToICal,e.exportToExcel=e.ext.export_api.exportToExcel,e.exportToJSON=e.ext.export_api.exportToJSON,e.importFromExcel=e.ext.export_api.importFromExcel,e.importFromMSProject=e.ext.export_api.importFromMSProject,e.exportToMSProject=e.ext.export_api.exportToMSProject,e.importFromPrimaveraP6=e.ext.export_api.importFromPrimaveraP6,e.exportToPrimaveraP6=e.ext.export_api.exportToPrimaveraP6}}).call(this,n(13).Buffer)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t){var e=this;this._mouseDown=!1,this._calculateDirectionVector=function(){if(e._trace.length>=10){for(var t=e._trace.slice(e._trace.length-10),n=[],i=1;i75&&(i=0)),{x:e._scrollState.x+i,y:e._scrollState.y+r}},this._setScrollPosition=function(t,n){var i=e._gantt;requestAnimationFrame(function(){i.scrollLayoutCell(t.$id,n.x,n.y)})},this._stopDrag=function(t){var n=e._gantt;if(e._trace=[],n.$root.classList.remove("gantt_noselect"),void 0!==e._originalReadonly&&(n.config.readonly=e._originalReadonly,e._mouseDown&&n.config.drag_timeline&&n.config.drag_timeline.render&&n.render()),void 0!==e._originAutoscroll&&(n.config.autoscroll=e._originAutoscroll),n.config.drag_timeline){var i=n.config.drag_timeline.useKey;if(i&&!0!==t[i])return}e._mouseDown=!1},this._startDrag=function(t){var n=e._gantt;e._originAutoscroll=n.config.autoscroll,n.config.autoscroll=!1,n.$root.classList.add("gantt_noselect"),e._originalReadonly=n.config.readonly,n.config.readonly=!0,n.config.drag_timeline&&n.config.drag_timeline.render&&n.render(),e._trace=[],e._mouseDown=!0;var i=e._getScrollPosition(e._timeline),r=i.x,a=i.y;e._scrollState={x:r,y:a},e._startPoint={x:t.clientX,y:t.clientY},e._trace.push(e._startPoint)},this._gantt=t,this._domEvents=t._createDomEventScope(),this._trace=[]}return t.create=function(e){return new t(e)},t.prototype.destructor=function(){this._domEvents.detachAll()},t.prototype.attach=function(t){var e=this;this._timeline=t;var n=this._gantt;this._domEvents.attach(t.$task,"mousedown",function(t){if(n.config.drag_timeline){var i=n.config.drag_timeline,r=i.useKey,a=i.ignore;if(!1!==i.enabled){var o=".gantt_task_line, .gantt_task_link";void 0!==a&&(o=a instanceof Array?a.join(", "):a),o&&n.utils.dom.closest(t.target,o)||r&&!0!==t[r]||e._startDrag(t)}}}),this._domEvents.attach(document,"keydown",function(t){if(n.config.drag_timeline){var i=n.config.drag_timeline.useKey;i&&!0===t[i]&&e._applyDndReadyStyles()}}),this._domEvents.attach(document,"keyup",function(t){if(n.config.drag_timeline){var i=n.config.drag_timeline.useKey;i&&!1===t[i]&&(e._clearDndReadyStyles(),e._stopDrag(t))}}),this._domEvents.attach(document,"mouseup",function(t){e._stopDrag(t)}),this._domEvents.attach(n.$root,"mouseup",function(t){e._stopDrag(t)}),this._domEvents.attach(document,"mouseleave",function(t){e._stopDrag(t)}),this._domEvents.attach(n.$root,"mouseleave",function(t){e._stopDrag(t)}),this._domEvents.attach(n.$root,"mousemove",function(i){if(n.config.drag_timeline){var r=n.config.drag_timeline.useKey;if(!r||!0===i[r]){var a=e._gantt.ext.clickDrag,o=(e._gantt.config.click_drag||{}).useKey;if((!a||!o||r||!i[o])&&!0===e._mouseDown){e._trace.push({x:i.clientX,y:i.clientY});var s=e._countNewScrollPosition({x:i.clientX,y:i.clientY});e._setScrollPosition(t,s),e._scrollState=s,e._startPoint={x:i.clientX,y:i.clientY}}}}})},t}();e.EventsManager=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(295);e.default=function(t){t.ext||(t.ext={}),t.ext.dragTimeline={create:function(){return i.EventsManager.create(t)}},t.config.drag_timeline={enabled:!0,render:!1}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5),r=n(2),a=function(){function t(t,e,n){var a=this;this._el=document.createElement("div"),this.defaultRender=function(t,e){a._el||(a._el=document.createElement("div"));var n=a._el,i=Math.min(t.relative.top,e.relative.top),r=Math.max(t.relative.top,e.relative.top),o=Math.min(t.relative.left,e.relative.left),s=Math.max(t.relative.left,e.relative.left);if(a._singleRow){var l=a._getTaskPositionByTop(a._startPoint.relative.top);n.style.height=l.height+"px",n.style.top=l.top+"px"}else n.style.height=Math.abs(r-i)+"px",n.style.top=i+"px";return n.style.width=Math.abs(s-o)+"px",n.style.left=o+"px",n},this._gantt=e,this._view=n,this._viewPort=t.viewPort,this._el.classList.add(t.className),"function"==typeof t.callback&&(this._callback=t.callback),this.render=function(){var e;(e=t.render?t.render(a._startPoint,a._endPoint):a.defaultRender(a._startPoint,a._endPoint))!==a._el&&(a._el&&a._el.parentNode&&a._el.parentNode.removeChild(a._el),a._el=e),""!==t.className&&a._el.classList.add(t.className),a.draw()},r.isEventable(this._viewPort)||i(this._viewPort),this._singleRow=t.singleRow,this._useRequestAnimationFrame=t.useRequestAnimationFrame}return t.prototype.draw=function(){var t=this;if(this._useRequestAnimationFrame)return requestAnimationFrame(function(){t._viewPort.appendChild(t.getElement())});this._viewPort.appendChild(this.getElement())},t.prototype.clear=function(){var t=this;if(this._useRequestAnimationFrame)return requestAnimationFrame(function(){t._el.parentNode&&t._viewPort.removeChild(t._el)});this._el.parentNode&&this._viewPort.removeChild(this._el)},t.prototype.getElement=function(){return this._el},t.prototype.getViewPort=function(){return this._viewPort},t.prototype.setStart=function(t){var e=this._gantt;this._startPoint=t,this._startDate=e.dateFromPos(this._startPoint.relative.left),this._viewPort.callEvent("onBeforeDrag",[this._startPoint])},t.prototype.setEnd=function(t){var e=this._gantt;if(this._endPoint=t,this._singleRow){var n=this._getTaskPositionByTop(this._startPoint.relative.top);this._endPoint.relative.top=n.top}this._endDate=e.dateFromPos(this._endPoint.relative.left),this._startPoint.relative.left>this._endPoint.relative.left&&(this._positionPoint={relative:{left:this._endPoint.relative.left,top:this._positionPoint.relative.top},absolute:{left:this._endPoint.absolute.left,top:this._positionPoint.absolute.top}}),this._startPoint.relative.top>this._endPoint.relative.top&&(this._positionPoint={relative:{left:this._positionPoint.relative.left,top:this._endPoint.relative.top},absolute:{left:this._positionPoint.absolute.left,top:this._endPoint.absolute.top}}),this._viewPort.callEvent("onDrag",[this._startPoint,this._endPoint])},t.prototype.setPosition=function(t){this._positionPoint=t},t.prototype.dragEnd=function(t){var e,n=this._gantt;t.relative.left<0&&(t.relative.left=0),this._viewPort.callEvent("onBeforeDragEnd",[this._startPoint,t]),this.setEnd(t),this._endDate=this._endDate||n.getState().max_date,this._startDate.valueOf()>this._endDate.valueOf()&&(e=[this._endDate,this._startDate],this._startDate=e[0],this._endDate=e[1]),this.clear();var i=n.getTaskByTime(this._startDate,this._endDate),r=this._getTasksByTop(this._startPoint.relative.top,this._endPoint.relative.top);this._viewPort.callEvent("onDragEnd",[this._startPoint,this._endPoint]),this._callback&&this._callback(this._startPoint,this._endPoint,this._startDate,this._endDate,i,r)},t.prototype.getInBounds=function(){return this._singleRow},t.prototype._getTasksByTop=function(t,e){var n=this._gantt,i=t,r=e;t>e&&(i=e,r=t);for(var a=this._getTaskPositionByTop(i).index,o=this._getTaskPositionByTop(r).index,s=[],l=a;l<=o;l++){n.getTaskByIndex(l)&&s.push(n.getTaskByIndex(l))}return s},t.prototype._getTaskPositionByTop=function(t){var e=this._gantt,n=this._view,i=n.getItemIndexByTopPosition(t),r=e.getTaskByIndex(i);if(r){var a=n.getItemHeight(r.id);return{top:n.getItemTop(r.id)||0,height:a||0,index:i}}var o=n.getTotalHeight();return{top:t>o?o:0,height:e.config.row_height,index:t>o?e.getTaskCount():0}},t}();e.SelectedRegion=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=function(){function t(t){this._mouseDown=!1,this._gantt=t,this._domEvents=t._createDomEventScope()}return t.prototype.attach=function(t,e,n){var r=this,a=this._gantt,o=t.getViewPort();this._originPosition=window.getComputedStyle(o).display,this._restoreOriginPosition=function(){o.style.position=r._originPosition},"static"===this._originPosition&&(o.style.position="relative");var s=a.$services.getService("state");s.registerProvider("clickDrag",function(){return{autoscroll:!1}});var l=null;this._domEvents.attach(o,"mousedown",function(i){l=null;var o=".gantt_task_line, .gantt_task_link";void 0!==n&&(o=n instanceof Array?n.join(", "):n),o&&a.utils.dom.closest(i.target,o)||(s.registerProvider("clickDrag",function(){return{autoscroll:r._mouseDown}}),e&&!0!==i[e]||(l=r._getCoordinates(i,t)))});var c=i.getRootNode(a.$root)||document.body;this._domEvents.attach(c,"mouseup",function(n){if(l=null,(!e||!0===n[e])&&!0===r._mouseDown){r._mouseDown=!1;var i=r._getCoordinates(n,t);t.dragEnd(i)}}),this._domEvents.attach(o,"mousemove",function(n){if(!e||!0===n[e]){var i=r._gantt.ext.clickDrag,o=(r._gantt.config.drag_timeline||{}).useKey;if(!i||!o||e||!n[o]){var s=null;if(!r._mouseDown&&l)return s=r._getCoordinates(n,t),void(Math.abs(l.relative.left-s.relative.left)>5&&l&&(r._mouseDown=!0,t.setStart(a.copy(l)),t.setPosition(a.copy(l)),t.setEnd(a.copy(l)),l=null));!0===r._mouseDown&&(s=r._getCoordinates(n,t),t.setEnd(s),t.render())}}})},t.prototype.detach=function(){var t=this._gantt;this._domEvents.detachAll(),this._restoreOriginPosition&&this._restoreOriginPosition(),t.$services.getService("state").unregisterProvider("clickDrag")},t.prototype.destructor=function(){this.detach()},t.prototype._getCoordinates=function(t,e){var n=e.getViewPort(),i=n.getBoundingClientRect(),r=t.clientX,a=t.clientY;return{absolute:{left:r,top:a},relative:{left:r-i.left+n.scrollLeft,top:a-i.top+n.scrollTop}}},t}();e.EventsManager=r},function(t,e,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n=0}function En(t){return!{a:!0,area:!0}[t.nodeName.loLowerCase()]||!!t.getAttribute("href")}function Dn(t){return!{input:!0,select:!0,textarea:!0,button:!0,object:!0}[t.nodeName.toLowerCase()]||!t.hasAttribute("disabled")}function Zt(t){for(var e=t.querySelectorAll(["a[href]","area[href]","input","select","textarea","button","iframe","object","embed","[tabindex]","[contenteditable]"].join(", ")),n=Array.prototype.slice.call(e,0),i=0;i=0){if(!n)return i;var s=r===0||!te(a.charAt(r-1)),o=r+e.length>=a.length||!te(a.charAt(r+e.length));if(s&&o)return i}}i=i.parentNode}return null}function ot(t,e){var n=document.documentElement,i=z(e);return{x:t.clientX+n.scrollLeft-n.clientLeft-i.x+e.scrollLeft,y:t.clientY+n.scrollTop-n.clientTop-i.y+e.scrollTop}}function ee(t,e){const n=z(t),i=z(e);return{x:n.x-i.x,y:n.y-i.y}}function Y(t,e){if(!t||!e)return!1;for(;t&&t!=e;)t=t.parentNode;return t===e}function lt(t,e){if(t.closest)return t.closest(e);if(t.matches||t.msMatchesSelector||t.webkitMatchesSelector){var n=t;if(!document.documentElement.contains(n))return null;do{if((n.matches||n.msMatchesSelector||n.webkitMatchesSelector).call(n,e))return n;n=n.parentElement||n.parentNode}while(n!==null&&n.nodeType===1);return null}return console.error("Your browser is not supported"),null}function Ie(t){for(;t;){if(t.offsetWidth>0&&t.offsetHeight>0)return t;t=t.parentElement}return null}function Me(){return document.head.createShadowRoot||document.head.attachShadow}function ne(){var t=document.activeElement;return t.shadowRoot&&(t=t.shadowRoot.activeElement),t===document.body&&document.getSelection&&(t=document.getSelection().focusNode||document.body),t}function vt(t){if(!t||!Me())return document.body;for(;t.parentNode&&(t=t.parentNode);)if(t instanceof ShadowRoot)return t.host;return document.body}const Ne=Object.freeze(Object.defineProperty({__proto__:null,addClassName:bt,closest:lt,getActiveElement:ne,getChildNodes:Ae,getClassName:K,getClosestSizedElement:Ie,getFocusableNodes:Zt,getNodePosition:z,getRelativeEventPosition:ot,getRelativeNodePosition:ee,getRootNode:vt,getScrollSize:Ce,getTargetNode:mt,hasClass:function(t,e){return"classList"in t?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)},hasShadowParent:function(t){return!!vt(t)},insertNode:Ee,isChildOf:Y,isShadowDomSupported:Me,locateAttribute:tt,locateClassName:ht,removeClassName:Ht,removeNode:De,toNode:Qt},Symbol.toStringTag,{value:"Module"})),dt=typeof window<"u"?window:global;let An=class{constructor(t){this._mouseDown=!1,this._gantt=t,this._domEvents=t._createDomEventScope()}attach(t,e,n){const i=this._gantt,a=t.getViewPort();this._originPosition=dt.getComputedStyle(a).display,this._restoreOriginPosition=()=>{a.style.position=this._originPosition},this._originPosition==="static"&&(a.style.position="relative");const r=i.$services.getService("state");r.registerProvider("clickDrag",()=>({autoscroll:!1}));let s=null;const o=()=>{s&&(this._mouseDown=!0,t.setStart(i.copy(s)),t.setPosition(i.copy(s)),t.setEnd(i.copy(s)),s=null)};this._domEvents.attach(a,"mousedown",d=>{s=null;let c=".gantt_task_line, .gantt_task_link";n!==void 0&&(c=n instanceof Array?n.join(", "):n),c&&i.utils.dom.closest(d.target,c)||(r.registerProvider("clickDrag",()=>({autoscroll:this._mouseDown})),e&&d[e]!==!0||(s=this._getCoordinates(d,t)))});const l=vt(i.$root)||document.body;this._domEvents.attach(l,"mouseup",d=>{if(s=null,(!e||d[e]===!0)&&this._mouseDown===!0){this._mouseDown=!1;const c=this._getCoordinates(d,t);t.dragEnd(c)}}),this._domEvents.attach(a,"mousemove",d=>{if(e&&d[e]!==!0)return;const c=this._gantt.ext.clickDrag,u=(this._gantt.config.drag_timeline||{}).useKey;if(c&&u&&!e&&d[u])return;let h=null;if(!this._mouseDown&&s)return h=this._getCoordinates(d,t),void(Math.abs(s.relative.left-h.relative.left)>5&&o());this._mouseDown===!0&&(h=this._getCoordinates(d,t),t.setEnd(h),t.render())})}detach(){const t=this._gantt;this._domEvents.detachAll(),this._restoreOriginPosition&&this._restoreOriginPosition(),t.$services.getService("state").unregisterProvider("clickDrag")}destructor(){this.detach()}_getCoordinates(t,e){const n=e.getViewPort(),i=n.getBoundingClientRect(),{clientX:a,clientY:r}=t;return{absolute:{left:a,top:r},relative:{left:a-i.left+n.scrollLeft,top:r-i.top+n.scrollTop}}}};var Le=function(){this._silent_mode=!1,this.listeners={}};Le.prototype={_silentStart:function(){this._silent_mode=!0},_silentEnd:function(){this._silent_mode=!1}};var In=function(t){var e={},n=0,i=function(){var a=!0;for(var r in e){var s=e[r].apply(t,arguments);a=a&&s}return a};return i.addEvent=function(a,r){if(typeof a=="function"){var s;if(r&&r.id?s=r.id:(s=n,n++),r&&r.once){var o=a;a=function(){o(),i.removeEvent(s)}}return e[s]=a,s}return!1},i.removeEvent=function(a){delete e[a]},i.clear=function(){e={}},i};function nt(t){var e=new Le;t.attachEvent=function(n,i,a){n="ev_"+n.toLowerCase(),e.listeners[n]||(e.listeners[n]=In(this)),a&&a.thisObject&&(i=i.bind(a.thisObject));var r=n+":"+e.listeners[n].addEvent(i,a);return a&&a.id&&(r=a.id),r},t.attachAll=function(n){this.attachEvent("listen_all",n)},t.callEvent=function(n,i){if(e._silent_mode)return!0;var a="ev_"+n.toLowerCase(),r=e.listeners;return r.ev_listen_all&&r.ev_listen_all.apply(this,[n].concat(i)),!r[a]||r[a].apply(this,i)},t.checkEvent=function(n){return!!e.listeners["ev_"+n.toLowerCase()]},t.detachEvent=function(n){if(n){var i=e.listeners;for(var a in i)i[a].removeEvent(n);var r=n.split(":");if(i=e.listeners,r.length===2){var s=r[0],o=r[1];i[s]&&i[s].removeEvent(o)}}},t.detachAllEvents=function(){for(var n in e.listeners)e.listeners[n].clear()}}var Pe={second:1,minute:60,hour:3600,day:86400,week:604800,month:2592e3,quarter:7776e3,year:31536e3};function Bt(t){return Pe[t]||Pe.hour}function kt(t,e){if(t.forEach)t.forEach(e);else for(var n=t.slice(),i=0;ie)){for(;+t[n]==+t[n+1];)n++;return n}if(!isNaN(a)&&a{this._el||(this._el=document.createElement("div"));const o=this._el,l=Math.min(r.relative.top,s.relative.top),d=Math.max(r.relative.top,s.relative.top),c=Math.min(r.relative.left,s.relative.left),u=Math.max(r.relative.left,s.relative.left);if(this._singleRow){const h=this._getTaskPositionByTop(this._startPoint.relative.top);o.style.height=h.height+"px",o.style.top=h.top+"px"}else o.style.height=Math.abs(d-l)+"px",o.style.top=l+"px";return o.style.width=Math.abs(u-c)+"px",o.style.left=c+"px",o},this._gantt=n,this._view=i,this._viewPort=e.viewPort,this._el.classList.add(e.className),typeof e.callback=="function"&&(this._callback=e.callback),this.render=()=>{let r;r=e.render?e.render(this._startPoint,this._endPoint):this.defaultRender(this._startPoint,this._endPoint),r!==this._el&&(this._el&&this._el.parentNode&&this._el.parentNode.removeChild(this._el),this._el=r),e.className!==""&&this._el.classList.add(e.className),this.draw()},(a=this._viewPort).attachEvent&&a.detachEvent||nt(this._viewPort),this._singleRow=e.singleRow,this._useRequestAnimationFrame=e.useRequestAnimationFrame}draw(){if(this._useRequestAnimationFrame)return requestAnimationFrame(()=>{this._viewPort.appendChild(this.getElement())});this._viewPort.appendChild(this.getElement())}clear(){if(this._useRequestAnimationFrame)return requestAnimationFrame(()=>{this._el.parentNode&&this._viewPort.removeChild(this._el)});this._el.parentNode&&this._viewPort.removeChild(this._el)}getElement(){return this._el}getViewPort(){return this._viewPort}setStart(e){const n=this._gantt;this._startPoint=e,this._startDate=n.dateFromPos(this._startPoint.relative.left),this._viewPort.callEvent("onBeforeDrag",[this._startPoint])}setEnd(e){const n=this._gantt;if(this._endPoint=e,this._singleRow){const i=this._getTaskPositionByTop(this._startPoint.relative.top);this._endPoint.relative.top=i.top}this._endDate=n.dateFromPos(this._endPoint.relative.left),this._startPoint.relative.left>this._endPoint.relative.left&&(this._positionPoint={relative:{left:this._endPoint.relative.left,top:this._positionPoint.relative.top},absolute:{left:this._endPoint.absolute.left,top:this._positionPoint.absolute.top}}),this._startPoint.relative.top>this._endPoint.relative.top&&(this._positionPoint={relative:{left:this._positionPoint.relative.left,top:this._endPoint.relative.top},absolute:{left:this._positionPoint.absolute.left,top:this._endPoint.absolute.top}}),this._viewPort.callEvent("onDrag",[this._startPoint,this._endPoint])}setPosition(e){this._positionPoint=e}dragEnd(e){const n=this._gantt;e.relative.left<0&&(e.relative.left=0),this._viewPort.callEvent("onBeforeDragEnd",[this._startPoint,e]),this.setEnd(e),this._endDate=this._endDate||n.getState().max_date,this._startDate.valueOf()>this._endDate.valueOf()&&([this._startDate,this._endDate]=[this._endDate,this._startDate]),this.clear();const i=n.getTaskByTime(this._startDate,this._endDate),a=this._getTasksByTop(this._startPoint.relative.top,this._endPoint.relative.top);this._viewPort.callEvent("onDragEnd",[this._startPoint,this._endPoint]),this._callback&&this._callback(this._startPoint,this._endPoint,this._startDate,this._endDate,i,a)}getInBounds(){return this._singleRow}_getTasksByTop(e,n){const i=this._gantt;let a=e,r=n;e>n&&(a=n,r=e);const s=this._getTaskPositionByTop(a).index,o=this._getTaskPositionByTop(r).index,l=[];for(let d=s;d<=o;d++)i.getTaskByIndex(d)&&l.push(i.getTaskByIndex(d));return l}_getTaskPositionByTop(e){const n=this._gantt,i=this._view,a=i.getItemIndexByTopPosition(e),r=n.getTaskByIndex(a);if(r){const s=i.getItemHeight(r.id);return{top:i.getItemTop(r.id)||0,height:s||0,index:a}}{const s=i.getTotalHeight();return{top:e>s?s:0,height:n.config.row_height,index:e>s?n.getTaskCount():0}}}}class ae{constructor(e){this._mouseDown=!1,this._calculateDirectionVector=()=>{if(this._trace.length>=10){const n=this._trace.slice(this._trace.length-10),i=[];for(let r=1;r{a.x+=r.x,a.y+=r.y}),{magnitude:Math.sqrt(a.x*a.x+a.y*a.y),angleDegrees:180*Math.atan2(Math.abs(a.y),Math.abs(a.x))/Math.PI}}return null},this._applyDndReadyStyles=()=>{this._timeline.$task.classList.add("gantt_timeline_move_available")},this._clearDndReadyStyles=()=>{this._timeline.$task.classList.remove("gantt_timeline_move_available")},this._getScrollPosition=n=>{const i=this._gantt;return{x:i.$ui.getView(n.$config.scrollX).getScrollState().position,y:i.$ui.getView(n.$config.scrollY).getScrollState().position}},this._countNewScrollPosition=n=>{const i=this._calculateDirectionVector();let a=this._startPoint.x-n.x,r=this._startPoint.y-n.y;return i&&(i.angleDegrees<15?r=0:i.angleDegrees>75&&(a=0)),{x:this._scrollState.x+a,y:this._scrollState.y+r}},this._setScrollPosition=(n,i)=>{const a=this._gantt;requestAnimationFrame(()=>{a.scrollLayoutCell(n.$id,i.x,i.y)})},this._stopDrag=n=>{const i=this._gantt;if(this._trace=[],i.$root.classList.remove("gantt_noselect"),this._originalReadonly!==void 0&&(i.config.readonly=this._originalReadonly,this._mouseDown&&i.config.drag_timeline&&i.config.drag_timeline.render&&i.render()),this._originAutoscroll!==void 0&&(i.config.autoscroll=this._originAutoscroll),i.config.drag_timeline){const{useKey:a}=i.config.drag_timeline;if(a&&n[a]!==!0)return}this._mouseDown=!1},this._startDrag=n=>{const i=this._gantt;this._originAutoscroll=i.config.autoscroll,i.config.autoscroll=!1,i.$root.classList.add("gantt_noselect"),this._originalReadonly=i.config.readonly,i.config.readonly=!0,i.config.drag_timeline&&i.config.drag_timeline.render&&i.render(),this._trace=[],this._mouseDown=!0;const{x:a,y:r}=this._getScrollPosition(this._timeline);this._scrollState={x:a,y:r},this._startPoint={x:n.clientX,y:n.clientY},this._trace.push(this._startPoint)},this._gantt=e,this._domEvents=e._createDomEventScope(),this._trace=[]}static create(e){return new ae(e)}destructor(){this._domEvents.detachAll()}attach(e){this._timeline=e;const n=this._gantt;this._domEvents.attach(e.$task,"mousedown",i=>{if(!n.config.drag_timeline)return;const{useKey:a,ignore:r,enabled:s}=n.config.drag_timeline;if(s===!1)return;let o=".gantt_task_line, .gantt_task_link";r!==void 0&&(o=r instanceof Array?r.join(", "):r),o&&n.utils.dom.closest(i.target,o)||a&&i[a]!==!0||this._startDrag(i)}),this._domEvents.attach(document,"keydown",i=>{if(!n.config.drag_timeline)return;const{useKey:a}=n.config.drag_timeline;a&&i[a]===!0&&this._applyDndReadyStyles()}),this._domEvents.attach(document,"keyup",i=>{if(!n.config.drag_timeline)return;const{useKey:a}=n.config.drag_timeline;a&&i[a]===!1&&(this._clearDndReadyStyles(),this._stopDrag(i))}),this._domEvents.attach(document,"mouseup",i=>{this._stopDrag(i)}),this._domEvents.attach(n.$root,"mouseup",i=>{this._stopDrag(i)}),this._domEvents.attach(document,"mouseleave",i=>{this._stopDrag(i)}),this._domEvents.attach(n.$root,"mouseleave",i=>{this._stopDrag(i)}),this._domEvents.attach(n.$root,"mousemove",i=>{if(!n.config.drag_timeline)return;const{useKey:a}=n.config.drag_timeline;if(a&&i[a]!==!0)return;const r=this._gantt.ext.clickDrag,s=(this._gantt.config.click_drag||{}).useKey;if((!r||!s||a||!i[s])&&this._mouseDown===!0){this._trace.push({x:i.clientX,y:i.clientY});const o=this._countNewScrollPosition({x:i.clientX,y:i.clientY});this._setScrollPosition(e,o),this._scrollState=o,this._startPoint={x:i.clientX,y:i.clientY}}})}}function Ln(t){(function(){var e=[];function n(){return!!e.length}function i(d){setTimeout(function(){n()||t.$destroyed||t.focus()},1)}function a(d){t.eventRemove(d,"keydown",s),t.event(d,"keydown",s),e.push(d)}function r(){var d=e.pop();d&&t.eventRemove(d,"keydown",s),i()}function s(d){var c=d.currentTarget;c==e[e.length-1]&&t.$keyboardNavigation.trapFocus(c,d)}function o(){a(t.getLightbox())}t.attachEvent("onLightbox",o),t.attachEvent("onAfterLightbox",r),t.attachEvent("onLightboxChange",function(){r(),o()}),t.attachEvent("onAfterQuickInfo",function(){i()}),t.attachEvent("onMessagePopup",function(d){l=t.utils.dom.getActiveElement(),a(d)}),t.attachEvent("onAfterMessagePopup",function(){r(),setTimeout(function(){l&&(l.focus(),l=null)},1)});var l=null;t.$keyboardNavigation.isModal=n})()}class Pn{constructor(e){this.show=(n,i)=>{i===void 0?this._showForTask(n):this._showAtCoordinates(n,i)},this.hide=n=>{const i=this._gantt,a=this._quickInfoBox;this._quickInfoBoxId=0;const r=this._quickInfoTask;if(this._quickInfoTask=null,a&&a.parentNode){if(i.config.quick_info_detached)return i.callEvent("onAfterQuickInfo",[r]),a.parentNode.removeChild(a);a.className+=" gantt_qi_hidden",a.style.right==="auto"?a.style.left="-350px":a.style.right="-350px",n&&(a.style.left=a.style.right="",a.parentNode.removeChild(a)),i.callEvent("onAfterQuickInfo",[r])}},this.getNode=()=>this._quickInfoBox?this._quickInfoBox:null,this.setContainer=n=>{n&&(this._container=typeof n=="string"?document.getElementById(n):n)},this.setContent=n=>{const i=this._gantt,a={taskId:null,header:{title:"",date:""},content:"",buttons:i.config.quickinfo_buttons};n||(n=a),n.taskId||(n.taskId=a.taskId),n.header||(n.header=a.header),n.header.title||(n.header.title=a.header.title),n.header.date||(n.header.date=a.header.date),n.content||(n.content=a.content),n.buttons||(n.buttons=a.buttons);let r=this.getNode();r||(r=this._createQuickInfoElement()),n.taskId&&(this._quickInfoBoxId=n.taskId);const s=r.querySelector(".gantt_cal_qi_title"),o=s.querySelector(".gantt_cal_qi_tcontent"),l=s.querySelector(".gantt_cal_qi_tdate"),d=r.querySelector(".gantt_cal_qi_content"),c=r.querySelector(".gantt_cal_qi_controls");i._waiAria.quickInfoHeader(r,[n.header.title,n.header.date].join(" ")),o.innerHTML=n.header.title,l.innerHTML=n.header.date,n.header.title||n.header.date?s.style.display="":s.style.display="none",d.innerHTML=n.content;const u=n.buttons;u.length?c.style.display="":c.style.display="none";let h="";for(let g=0;g +
+
${i.locale.labels[u[g]]}
+ `}c.innerHTML=h,i.eventRemove(r,"click",this._qiButtonClickHandler),i.eventRemove(r,"keypress",this._qiKeyPressHandler),i.event(r,"click",this._qiButtonClickHandler),i.event(r,"keypress",this._qiKeyPressHandler)},this._qiButtonClickHandler=n=>{this._qi_button_click(n.target)},this._qiKeyPressHandler=n=>{const i=n.which;i!==13&&i!==32||setTimeout(()=>{this._qi_button_click(n.target)},1)},this._gantt=e}_showAtCoordinates(e,n){this.hide(!0),this._quickInfoBoxId=0,this._quickInfoTask=null,this._quickInfoBox||(this._createQuickInfoElement(),this.setContent()),this._appendAtCoordinates(e,n),this._gantt.callEvent("onQuickInfo",[null])}_showForTask(e){const n=this._gantt;if(e===this._quickInfoBoxId&&n.utils.dom.isChildOf(this._quickInfoBox,document.body)||!n.config.show_quick_info)return;this.hide(!0);const i=this._getContainer(),a=this._get_event_counter_part(e,6,i.xViewport,i.yViewport);a&&(this._quickInfoBox=this._init_quick_info(e),this._quickInfoTask=e,this._quickInfoBox.className=this._prepare_quick_info_classname(e),this._fill_quick_data(e),this._show_quick_info(a,6),n.callEvent("onQuickInfo",[e]))}_get_event_counter_part(e,n,i,a){const r=this._gantt;let s=r.getTaskNode(e);if(!s&&(s=r.getTaskRowNode(e),!s))return null;let o=0;const l=n+s.offsetTop+s.offsetHeight;let d=s;if(r.utils.dom.isChildOf(d,i))for(;d&&d!==i;)o+=d.offsetLeft,d=d.offsetParent;const c=r.getScrollState();return d?{left:o,top:l,dx:o+s.offsetWidth/2-c.x>i.offsetWidth/2?1:0,dy:l+s.offsetHeight/2-c.y>a.offsetHeight/2?1:0,width:s.offsetWidth,height:s.offsetHeight}:null}_createQuickInfoElement(){const e=this._gantt,n=document.createElement("div");n.className+="gantt_cal_quick_info",e._waiAria.quickInfoAttr(n);var i=` +
+ +
+
+ +
+
+
+
`;if(i+='
',i+="
",n.innerHTML=i,e.config.quick_info_detached){const a=this._getContainer();e.event(a.parent,"scroll",()=>{this.hide()})}return this._quickInfoBox=n,n}_init_quick_info(e){const n=this._gantt,i=n.getTask(e);return typeof this._quickInfoReadonly=="boolean"&&n.isReadonly(i)!==this._quickInfoReadonly&&(this.hide(!0),this._quickInfoBox=null),this._quickInfoReadonly=n.isReadonly(i),this._quickInfoBox||(this._quickInfoBox=this._createQuickInfoElement()),this._quickInfoBox}_prepare_quick_info_classname(e){const n=this._gantt,i=n.getTask(e);let a=`gantt_cal_quick_info gantt_${n.getTaskType(i)}`;const r=n.templates.quick_info_class(i.start_date,i.end_date,i);return r&&(a+=" "+r),a}_fill_quick_data(e){const n=this._gantt,i=n.getTask(e);this._quickInfoBoxId=e;let a=[];if(this._quickInfoReadonly){const r=n.config.quickinfo_buttons,s={icon_delete:!0,icon_edit:!0};for(let o=0;oc.offsetHeight/2&&(g=e.top-(o+e.height+2*n),g{a.style.left="10px"},1)):(a.style.left="auto",a.style.right="-300px",setTimeout(()=>{a.style.right="10px"},1)),a.className+=" gantt_qi_"+(e.dx===1?"left":"right"),i.$root.appendChild(a)}_qi_button_click(e){const n=this._gantt,i=this._quickInfoBox;if(!e||e===i)return;if(e.closest(".gantt_cal_qi_close_btn"))return void this.hide();const a=e.className;if(a.indexOf("_icon")!==-1){const r=this._quickInfoBoxId;n.$click.buttons[a.split(" ")[1].replace("icon_","")](r)}else this._qi_button_click(e.parentNode)}_getContainer(){const e=this._gantt;let n=this._container?this._container:e.$task_data;return n&&n.offsetHeight&&n.offsetWidth?{parent:n,xViewport:e.$task,yViewport:e.$task_data}:(n=this._container?this._container:e.$grid_data,n&&n.offsetHeight&&n.offsetWidth?{parent:n,xViewport:e.$grid,yViewport:e.$grid_data}:{parent:this._container?this._container:e.$layout,xViewport:e.$layout,yViewport:e.$layout})}}var re,Rn={}.constructor.toString();function V(t){var e,n;if(t&&typeof t=="object")switch(!0){case X(t):n=new Date(t);break;case ie(t):for(n=new Array(t.length),e=0;ei.bottom&&(r.bottom=i.bottom,r.top=r.bottom-r.height),r.lefti.right&&(r.right=i.right,r.left=r.right-r.width),d.x>=r.left&&d.x<=r.right&&(r.left=d.x-r.width-s,r.right=r.left+r.width),d.y>=r.top&&d.y<=r.bottom&&(r.top=d.y-r.height-o,r.bottom=r.top+r.height),r}_getViewPortSize(){const e=this._gantt,n=this._getViewPort();let i,a=n,r=window.scrollY+document.body.scrollTop,s=window.scrollX+document.body.scrollLeft;return n===e.$task_data?(a=e.$task,r=0,s=0,i=z(e.$task)):i=z(a),{left:i.x+s,top:i.y+r,width:i.width,height:i.height,bottom:i.y+i.height+r,right:i.x+i.width+s}}}class Bn{constructor(e){this._listeners={},this.tooltip=new On(e),this._gantt=e,this._domEvents=se(),this._initDelayedFunctions()}destructor(){this.tooltip.hide(),this._domEvents.detachAll()}hideTooltip(){this.delayHide()}attach(e){let n=document.body;const i=this._gantt;e.global||(n=i.$root);let a=null;const r=s=>{const o=mt(s),l=lt(o,e.selector);if(Y(o,this.tooltip.getNode()))return;const d=()=>{a=l,e.onmouseenter(s,l)};a?l&&l===a?e.onmousemove(s,l):(e.onmouseleave(s,a),a=null,l&&l!==a&&d()):l&&d()};this.detach(e.selector),this._domEvents.attach(n,"mousemove",r),this._listeners[e.selector]={node:n,handler:r}}detach(e){const n=this._listeners[e];n&&this._domEvents.detach(n.node,"mousemove",n.handler)}tooltipFor(e){const n=i=>{let a=i;return document.createEventObject&&!document.createEvent&&(a=document.createEventObject(i)),a};this._initDelayedFunctions(),this.attach({selector:e.selector,global:e.global,onmouseenter:(i,a)=>{const r=e.html(i,a);r&&this.delayShow(n(i),r)},onmousemove:(i,a)=>{const r=e.html(i,a);r?this.delayShow(n(i),r):(this.delayShow.$cancelTimeout(),this.delayHide())},onmouseleave:()=>{this.delayShow.$cancelTimeout(),this.delayHide()}})}_initDelayedFunctions(){const e=this._gantt;this.delayShow&&this.delayShow.$cancelTimeout(),this.delayHide&&this.delayHide.$cancelTimeout(),this.tooltip.hide(),this.delayShow=Re((n,i)=>{e.callEvent("onBeforeTooltip",[n])===!1?this.tooltip.hide():(this.tooltip.setContent(i),this.tooltip.show(n))},e.config.tooltip_timeout||1),this.delayHide=Re(()=>{this.delayShow.$cancelTimeout(),this.tooltip.hide()},e.config.tooltip_hide_timeout||1)}}const ze={onBeforeUndo:"onAfterUndo",onBeforeRedo:"onAfterRedo"},We=["onTaskDragStart","onAfterTaskUpdate","onAfterTaskDelete","onBeforeBatchUpdate"];class zn{constructor(e,n){this._batchAction=null,this._batchMode=!1,this._ignore=!1,this._ignoreMoveEvents=!1,this._initialTasks={},this._initialLinks={},this._nestedTasks={},this._nestedLinks={},this._undo=e,this._gantt=n,this._attachEvents()}store(e,n,i=!1){return n===this._gantt.config.undo_types.task?this._storeTask(e,i):n===this._gantt.config.undo_types.link&&this._storeLink(e,i)}isMoveEventsIgnored(){return this._ignoreMoveEvents}toggleIgnoreMoveEvents(e){this._ignoreMoveEvents=e||!1}startIgnore(){this._ignore=!0}stopIgnore(){this._ignore=!1}startBatchAction(){this._timeout||(this._timeout=setTimeout(()=>{this.stopBatchAction(),this._timeout=null},10)),this._ignore||this._batchMode||(this._batchMode=!0,this._batchAction=this._undo.action.create())}stopBatchAction(){if(this._ignore)return;const e=this._undo;this._batchAction&&e.logAction(this._batchAction),this._batchMode=!1,this._batchAction=null}onTaskAdded(e){this._ignore||this._storeTaskCommand(e,this._undo.command.type.add)}onTaskUpdated(e){this._ignore||this._storeTaskCommand(e,this._undo.command.type.update)}onTaskMoved(e){if(!this._ignore){e.$local_index=this._gantt.getTaskIndex(e.id);const n=this.getInitialTask(e.id);if(e.$local_index===n.$local_index&&this._gantt.getParent(e)===this._gantt.getParent(n))return;this._storeEntityCommand(e,this.getInitialTask(e.id),this._undo.command.type.move,this._undo.command.entity.task)}}onTaskDeleted(e){if(!this._ignore){if(this._storeTaskCommand(e,this._undo.command.type.remove),this._nestedTasks[e.id]){const n=this._nestedTasks[e.id];for(let i=0;i{e||(e=setTimeout(()=>{e=null}),this.clearInitialTasks(),n.eachTask(l=>{this.setInitialTask(l.id)}),this.clearInitialLinks(),n.getLinks().forEach(l=>{this.setInitialLink(l.id)}))},a=l=>n.copy(n.getTask(l));for(const l in ze)n.attachEvent(l,()=>(this.startIgnore(),!0)),n.attachEvent(ze[l],()=>(this.stopIgnore(),!0));for(let l=0;l(this.startBatchAction(),!0));n.attachEvent("onParse",()=>{this._undo.clearUndoStack(),this._undo.clearRedoStack(),i()}),n.attachEvent("onAfterTaskAdd",(l,d)=>{this.setInitialTask(l,!0),this.onTaskAdded(d)}),n.attachEvent("onAfterTaskUpdate",(l,d)=>{this.onTaskUpdated(d)}),n.attachEvent("onAfterTaskDelete",(l,d)=>{this.onTaskDeleted(d)}),n.attachEvent("onAfterLinkAdd",(l,d)=>{this.setInitialLink(l,!0),this.onLinkAdded(d)}),n.attachEvent("onAfterLinkUpdate",(l,d)=>{this.onLinkUpdated(d)}),n.attachEvent("onAfterLinkDelete",(l,d)=>{this.onLinkDeleted(d)}),n.attachEvent("onRowDragEnd",(l,d)=>(this.onTaskMoved(a(l)),this.toggleIgnoreMoveEvents(),!0)),n.attachEvent("onBeforeTaskDelete",l=>{this.store(l,n.config.undo_types.task);const d=[];return i(),n.eachTask(c=>{d.push(c.id)},l),this.setNestedTasks(l,d),!0});const r=n.getDatastore("task");r.attachEvent("onBeforeItemMove",(l,d,c)=>(this.isMoveEventsIgnored()||i(),!0)),r.attachEvent("onAfterItemMove",(l,d,c)=>(this.isMoveEventsIgnored()||this.onTaskMoved(a(l)),!0)),n.attachEvent("onRowDragStart",(l,d,c)=>(this.toggleIgnoreMoveEvents(!0),i(),!0));let s=null,o=!1;if(n.attachEvent("onBeforeTaskDrag",l=>{if(s=n.getState().drag_id,s===l){const d=n.getTask(l);n.isSummaryTask(d)&&n.config.drag_project&&(o=!0)}if(n.plugins().multiselect){const d=n.getSelectedTasks();d.length>1&&d.forEach(c=>{this.store(c,n.config.undo_types.task,!0)})}return this.store(l,n.config.undo_types.task)}),n.attachEvent("onAfterTaskDrag",l=>{(o||n.plugins().multiselect&&n.getSelectedTasks().length>1)&&s===l&&(o=!1,s=null,this.stopBatchAction()),this.store(l,n.config.undo_types.task,!0)}),n.attachEvent("onLightbox",l=>this.store(l,n.config.undo_types.task)),n.attachEvent("onBeforeTaskAutoSchedule",l=>(this.store(l.id,n.config.undo_types.task,!0),!0)),n.ext.inlineEditors){let l=null,d=null;n.attachEvent("onGanttLayoutReady",()=>{l&&n.ext.inlineEditors.detachEvent(l),d&&n.ext.inlineEditors.detachEvent(d),d=n.ext.inlineEditors.attachEvent("onEditStart",c=>{this.store(c.id,n.config.undo_types.task)}),l=n.ext.inlineEditors.attachEvent("onBeforeEditStart",c=>(this.stopBatchAction(),!0))})}}_storeCommand(e){const n=this._undo;if(n.updateConfigs(),n.undoEnabled)if(this._batchMode)this._batchAction.commands.push(e);else{const i=n.action.create([e]);n.logAction(i)}}_storeEntityCommand(e,n,i,a){const r=this._undo.command.create(e,n,i,a);this._storeCommand(r)}_storeTaskCommand(e,n){this._gantt.isTaskExists(e.id)&&(e.$local_index=this._gantt.getTaskIndex(e.id)),this._storeEntityCommand(e,this.getInitialTask(e.id),n,this._undo.command.entity.task)}_storeLinkCommand(e,n){this._storeEntityCommand(e,this.getInitialLink(e.id),n,this._undo.command.entity.link)}_getLinks(e){return e.$source.concat(e.$target)}_storeTask(e,n=!1){const i=this._gantt;return this.setInitialTask(e,n),i.eachTask(a=>{this.setInitialTask(a.id)},e),!0}_storeLink(e,n=!1){return this.setInitialLink(e,n),!0}}class Wn{constructor(e){this.maxSteps=100,this.undoEnabled=!0,this.redoEnabled=!0,this.action={create:n=>({commands:n?n.slice():[]}),invert:n=>{const i=this._gantt.copy(n),a=this.command;for(let r=0;r{const s=this._gantt;return{entity:r,type:a,value:s.copy(n),oldValue:s.copy(i||n)}},invert:n=>{const i=this._gantt.copy(n);return i.type=this.command.inverseCommands(n.type),i},inverseCommands:n=>{const i=this._gantt,a=this.command.type;switch(n){case a.update:return a.update;case a.remove:return a.add;case a.add:return a.remove;case a.move:return a.move;default:return i.assert(!1,"Invalid command "+n),null}}},this._undoStack=[],this._redoStack=[],this._gantt=e}getUndoStack(){return this._undoStack}setUndoStack(e){this._undoStack=e}getRedoStack(){return this._redoStack}setRedoStack(e){this._redoStack=e}clearUndoStack(){this._undoStack=[]}clearRedoStack(){this._redoStack=[]}updateConfigs(){const e=this._gantt;this.maxSteps=e.config.undo_steps||100,this.command.entity=e.config.undo_types,this.command.type=e.config.undo_actions,this.undoEnabled=!!e.config.undo,this.redoEnabled=!!e.config.redo}undo(){const e=this._gantt;if(this.updateConfigs(),!this.undoEnabled)return;const n=this._pop(this._undoStack);if(n&&this._reorderCommands(n),e.callEvent("onBeforeUndo",[n])!==!1&&n)return this._applyAction(this.action.invert(n)),this._push(this._redoStack,e.copy(n)),void e.callEvent("onAfterUndo",[n]);e.callEvent("onAfterUndo",[null])}redo(){const e=this._gantt;if(this.updateConfigs(),!this.redoEnabled)return;const n=this._pop(this._redoStack);if(n&&this._reorderCommands(n),e.callEvent("onBeforeRedo",[n])!==!1&&n)return this._applyAction(n),this._push(this._undoStack,e.copy(n)),void e.callEvent("onAfterRedo",[n]);e.callEvent("onAfterRedo",[null])}logAction(e){this._push(this._undoStack,e),this._redoStack=[]}_push(e,n){const i=this._gantt;if(!n.commands.length)return;const a=e===this._undoStack?"onBeforeUndoStack":"onBeforeRedoStack";if(i.callEvent(a,[n])!==!1&&n.commands.length){for(e.push(n);e.length>this.maxSteps;)e.shift();return n}}_pop(e){return e.pop()}_reorderCommands(e){const n={any:0,link:1,task:2},i={move:1,any:0};e.commands.sort(function(a,r){if(a.entity==="task"&&r.entity==="task")return a.type!==r.type?(i[r.type]||0)-(i[a.type]||0):a.type==="move"&&a.oldValue&&r.oldValue&&r.oldValue.parent===a.oldValue.parent?a.oldValue.$index-r.oldValue.$index:0;{const s=n[a.entity]||n.any;return(n[r.entity]||n.any)-s}})}_applyAction(e){let n=null;const i=this.command.entity,a=this.command.type,r=this._gantt,s={};s[i.task]={add:"addTask",get:"getTask",update:"updateTask",remove:"deleteTask",move:"moveTask",isExists:"isTaskExists"},s[i.link]={add:"addLink",get:"getLink",update:"updateLink",remove:"deleteLink",isExists:"isLinkExists"},r.batchUpdate(function(){for(let o=0;o{const i={viewPort:t.$task_data,...e};if(t.config.click_drag){const a=t.config.click_drag;i.render=a.render||e.render,i.className=a.className||e.className,i.callback=a.callback||e.callback,i.viewPort=a.viewPort||t.$task_data,i.useRequestAnimationFrame=a.useRequestAnimationFrame===void 0?e.useRequestAnimationFrame:a.useRequestAnimationFrame,i.singleRow=a.singleRow===void 0?e.singleRow:a.singleRow;const r=t.$ui.getView("timeline"),s=new Nn(i,t,r);t.ext.clickDrag.attach(s,a.useKey,a.ignore)}}),t.attachEvent("onDestroy",()=>{n.destructor()})},drag_timeline:function(t){t.ext||(t.ext={}),t.ext.dragTimeline={create:()=>ae.create(t)},t.config.drag_timeline={enabled:!0,render:!1}},fullscreen:function(t){function e(){const c=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;return!(!c||c!==document.body)}function n(){try{return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled}catch(c){console.error("Fullscreen is not available:",c)}}t.$services.getService("state").registerProvider("fullscreen",()=>n()?{fullscreen:e()}:void 0);let i={overflow:null,padding:null,paddingTop:null,paddingRight:null,paddingBottom:null,paddingLeft:null};const a={width:null,height:null,top:null,left:null,position:null,zIndex:null,modified:!1};let r=null;function s(c,u){u.width=c.width,u.height=c.height,u.top=c.top,u.left=c.left,u.position=c.position,u.zIndex=c.zIndex}let o=!1;function l(){if(!t.$container)return;let c;e()?o&&(c="onExpand",function(){const u=t.ext.fullscreen.getFullscreenElement(),h=document.body;s(u.style,a),i={overflow:h.style.overflow,padding:h.style.padding?h.style.padding:null,paddingTop:h.style.paddingTop?h.style.paddingTop:null,paddingRight:h.style.paddingRight?h.style.paddingRight:null,paddingBottom:h.style.paddingBottom?h.style.paddingBottom:null,paddingLeft:h.style.paddingLeft?h.style.paddingLeft:null},h.style.padding&&(h.style.padding="0"),h.style.paddingTop&&(h.style.paddingTop="0"),h.style.paddingRight&&(h.style.paddingRight="0"),h.style.paddingBottom&&(h.style.paddingBottom="0"),h.style.paddingLeft&&(h.style.paddingLeft="0"),h.style.overflow="hidden",u.style.width="100vw",u.style.height="100vh",u.style.top="0px",u.style.left="0px",u.style.position="absolute",u.style.zIndex=1,a.modified=!0,r=function(g){let f=g.parentNode;const y=[];for(;f&&f.style;)y.push({element:f,originalPositioning:f.style.position}),f.style.position="static",f=f.parentNode;return y}(u)}()):o&&(o=!1,c="onCollapse",function(){const u=t.ext.fullscreen.getFullscreenElement(),h=document.body;a.modified&&(i.padding&&(h.style.padding=i.padding),i.paddingTop&&(h.style.paddingTop=i.paddingTop),i.paddingRight&&(h.style.paddingRight=i.paddingRight),i.paddingBottom&&(h.style.paddingBottom=i.paddingBottom),i.paddingLeft&&(h.style.paddingLeft=i.paddingLeft),h.style.overflow=i.overflow,i={overflow:null,padding:null,paddingTop:null,paddingRight:null,paddingBottom:null,paddingLeft:null},s(a,u.style),a.modified=!1),r.forEach(g=>{g.element.style.position=g.originalPositioning}),r=null}()),setTimeout(()=>{t.render()}),setTimeout(()=>{t.callEvent(c,[t.ext.fullscreen.getFullscreenElement()])})}function d(){return!t.$container||!t.ext.fullscreen.getFullscreenElement()?!0:n()?!1:((console.warning||console.log)("The `fullscreen` feature not being allowed, or full-screen mode not being supported"),!0)}t.ext.fullscreen={expand(){if(d()||e()||!t.callEvent("onBeforeExpand",[this.getFullscreenElement()]))return;o=!0;const c=document.body,u=c.webkitRequestFullscreen?[Element.ALLOW_KEYBOARD_INPUT]:[],h=c.msRequestFullscreen||c.mozRequestFullScreen||c.webkitRequestFullscreen||c.requestFullscreen;h&&h.apply(c,u)},collapse(){if(d()||!e()||!t.callEvent("onBeforeCollapse",[this.getFullscreenElement()]))return;const c=document.msExitFullscreen||document.mozCancelFullScreen||document.webkitExitFullscreen||document.exitFullscreen;c&&c.apply(document)},toggle(){d()||(e()?this.collapse():this.expand())},getFullscreenElement:()=>t.$root},t.expand=function(){t.ext.fullscreen.expand()},t.collapse=function(){t.ext.fullscreen.collapse()},t.attachEvent("onGanttReady",function(){t.event(document,"webkitfullscreenchange",l),t.event(document,"mozfullscreenchange",l),t.event(document,"MSFullscreenChange",l),t.event(document,"fullscreenChange",l),t.event(document,"fullscreenchange",l)})},keyboard_navigation:function(t){(function(e){e.config.keyboard_navigation=!0,e.config.keyboard_navigation_cells=!1,e.$keyboardNavigation={},e._compose=function(){for(var n=Array.prototype.slice.call(arguments,0),i={},a=0;a=96&&a.keyCode<=105&&(a.keyCode-=48);var r=String.fromCharCode(a.keyCode);return r&&(a.keyCode=r.toLowerCase().charCodeAt(0)),a},getHashFromEvent:function(i){return this.getHash(this.getCommandFromEvent(i))},getHash:function(i){var a=[];for(var r in i.modifiers)i.modifiers[r]&&a.push(r);return a.push(i.keyCode),a.join(this.junctionChar)},getExpressions:function(i){return i.split(this.junctionChar)},getWords:function(i){return i.split(this.combinationChar)},trim:function(i){return i.replace(/\s/g,"")},junctionChar:",",combinationChar:"+",commandKeys:{shift:16,alt:18,ctrl:17,meta:!0},specialKeys:{backspace:8,tab:9,enter:13,esc:27,space:32,up:38,down:40,left:37,right:39,home:36,end:35,pageup:33,pagedown:34,delete:46,insert:45,plus:107,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123}}}(e),function(n){n.$keyboardNavigation.EventHandler={_handlers:null,findHandler:function(i){this._handlers||(this._handlers={});var a=n.$keyboardNavigation.shortcuts.getHash(i);return this._handlers[a]},doAction:function(i,a){var r=this.findHandler(i);if(r){if(n.$keyboardNavigation.facade.callEvent("onBeforeAction",[i,a])===!1)return;r.call(this,a),a.preventDefault?a.preventDefault():a.returnValue=!1}},bind:function(i,a){this._handlers||(this._handlers={});for(var r=n.$keyboardNavigation.shortcuts,s=r.parse(i),o=0;o=r.length-1){var c=r[0];if(c)return c.focus(),a.preventDefault(),!0}return!1}}(e),function(n){n.$keyboardNavigation.GanttNode=function(){},n.$keyboardNavigation.GanttNode.prototype=n._compose(n.$keyboardNavigation.EventHandler,{focus:function(){n.focus()},blur:function(){},isEnabled:function(){return n.$container.hasAttribute("tabindex")},scrollHorizontal:function(i){var a=n.dateFromPos(n.getScrollState().x),r=n.getScale(),s=i<0?-r.step:r.step;a=n.date.add(a,s,r.unit),n.scrollTo(n.posFromDate(a))},scrollVertical:function(i){var a=n.getScrollState().y,r=n.config.row_height;n.scrollTo(null,a+(i<0?-1:1)*r)},keys:{"alt+left":function(i){this.scrollHorizontal(-1)},"alt+right":function(i){this.scrollHorizontal(1)},"alt+up":function(i){this.scrollVertical(-1)},"alt+down":function(i){this.scrollVertical(1)},"ctrl+z":function(){n.undo&&n.undo()},"ctrl+r":function(){n.redo&&n.redo()}}}),n.$keyboardNavigation.GanttNode.prototype.bindAll(n.$keyboardNavigation.GanttNode.prototype.keys)}(e),function(n){n.$keyboardNavigation.KeyNavNode=function(){},n.$keyboardNavigation.KeyNavNode.prototype=n._compose(n.$keyboardNavigation.EventHandler,{isValid:function(){return!0},fallback:function(){return null},moveTo:function(i){n.$keyboardNavigation.dispatcher.setActiveNode(i)},compareTo:function(i){if(!i)return!1;for(var a in this){if(!!this[a]!=!!i[a])return!1;var r=!(!this[a]||!this[a].toString),s=!(!i[a]||!i[a].toString);if(s!=r)return!1;if(s&&r){if(i[a].toString()!=this[a].toString())return!1}else if(i[a]!=this[a])return!1}return!0},getNode:function(){},focus:function(){var i=this.getNode();if(i){var a=n.$keyboardNavigation.facade;a.callEvent("onBeforeFocus",[i])!==!1&&i&&(i.setAttribute("tabindex","-1"),i.$eventAttached||(i.$eventAttached=!0,n.event(i,"focus",function(r){return r.preventDefault(),!1},!1)),n.utils.dom.isChildOf(document.activeElement,i)&&(i=document.activeElement),i.focus&&i.focus(),a.callEvent("onFocus",[this.getNode()]))}},blur:function(){var i=this.getNode();i&&(n.$keyboardNavigation.facade.callEvent("onBlur",[i]),i.setAttribute("tabindex","-1"))}})}(e),function(n){n.$keyboardNavigation.HeaderCell=function(i){this.index=i||0},n.$keyboardNavigation.HeaderCell.prototype=n._compose(n.$keyboardNavigation.KeyNavNode,{_handlers:null,isValid:function(){return!(!n.config.show_grid&&n.getVisibleTaskCount()||!n.getGridColumns()[this.index]&&n.getVisibleTaskCount())},fallback:function(){if(!n.config.show_grid)return n.getVisibleTaskCount()?new n.$keyboardNavigation.TaskRow:null;for(var i=n.getGridColumns(),a=this.index;a>=0&&!i[a];)a--;return i[a]?new n.$keyboardNavigation.HeaderCell(a):null},fromDomElement:function(i){var a=ht(i,"gantt_grid_head_cell");if(a){for(var r=0;a&&a.previousSibling;)a=a.previousSibling,r+=1;return new n.$keyboardNavigation.HeaderCell(r)}return null},getNode:function(){return n.$grid_scale.childNodes[this.index]},keys:{left:function(){this.index>0&&this.moveTo(new n.$keyboardNavigation.HeaderCell(this.index-1))},right:function(){var i=n.getGridColumns();this.index-1},fallback:function(){if(!n.getVisibleTaskCount()){var i=new n.$keyboardNavigation.HeaderCell;return i.isValid()?i:null}if(this.splitItem)return new n.$keyboardNavigation.TaskRow(this.parentId);var a=-1;if(n.getTaskByIndex(this.globalIndex-1))a=this.globalIndex-1;else if(n.getTaskByIndex(this.globalIndex+1))a=this.globalIndex+1;else for(var r=this.globalIndex;r>=0;){if(n.getTaskByIndex(r)){a=r;break}r--}return a>-1?new n.$keyboardNavigation.TaskRow(n.getTaskByIndex(a).id):void 0},fromDomElement:function(i){if(n.config.keyboard_navigation_cells)return null;var a=n.locate(i);return n.isTaskExists(a)?new n.$keyboardNavigation.TaskRow(a):null},getNode:function(){if(n.isTaskExists(this.taskId)&&n.isTaskVisible(this.taskId))return n.config.show_grid?n.$grid.querySelector(".gantt_row["+n.config.task_attribute+"='"+this.taskId+"']"):n.getTaskNode(this.taskId)},focus:function(i){if(!i){const a=n.getTaskPosition(n.getTask(this.taskId)),r=n.getTaskHeight(this.taskId),s=n.getScrollState();let o,l;o=n.$task?n.$task.offsetWidth:s.inner_width,l=n.$grid_data||n.$task_data?(n.$grid_data||n.$task_data).offsetHeight:s.inner_height,a.tops.y+l?n.scrollTo(null,a.top-20):n.config.scroll_on_click&&n.config.show_chart&&(a.left>s.x+o?n.scrollTo(a.left-n.config.task_scroll_offset):a.left+a.width=0&&!r[s];)s--;r[s]&&(a=new n.$keyboardNavigation.TaskCell(i.taskId,s))}return a},fromDomElement:function(i){if(!n.config.keyboard_navigation_cells)return null;var a=n.locate(i);if(n.isTaskExists(a)){var r=0,s=tt(i,"data-column-index");return s&&(r=1*s.getAttribute("data-column-index")),new n.$keyboardNavigation.TaskCell(a,r)}return null},getNode:function(){if(n.isTaskExists(this.taskId)&&n.isTaskVisible(this.taskId)){if(n.config.show_grid){var i=n.$grid.querySelector(".gantt_row["+n.config.task_attribute+"='"+this.taskId+"']");return i?i.querySelector("[data-column-index='"+this.columnIndex+"']"):null}return n.getTaskNode(this.taskId)}},keys:{up:function(){var i=null,a=n.getPrev(this.taskId);i=n.isTaskExists(a)?new n.$keyboardNavigation.TaskCell(a,this.columnIndex):new n.$keyboardNavigation.HeaderCell(this.columnIndex),this.moveTo(i)},down:function(){var i=n.getNext(this.taskId);n.isTaskExists(i)&&this.moveTo(new n.$keyboardNavigation.TaskCell(i,this.columnIndex))},left:function(){this.columnIndex>0&&this.moveTo(new n.$keyboardNavigation.TaskCell(this.taskId,this.columnIndex-1))},right:function(){var i=n.getGridColumns();this.columnIndex=p&&r()}}),e._smart_render){var v=e._smart_render._redrawTasks;e._smart_render._redrawTasks=function(b,_){if(e.config.keyboard_navigation&&n.isEnabled()){var m=n.getActiveNode();if(m&&m.taskId!==void 0){for(var p=!1,k=0;k<_.length;k++)if(_[k].id==m.taskId&&_[k].start_date){p=!0;break}p||_.push(e.getTask(m.taskId))}}return v.apply(this,arguments)}}});let c=null,u=!1;e.attachEvent("onTaskCreated",function(v){return c=v.id,!0}),e.attachEvent("onAfterTaskAdd",function(v,b){if(!e.config.keyboard_navigation)return!0;if(n.isEnabled()){if(v==c&&(u=!0,setTimeout(()=>{u=!1,c=null})),u&&b.type==e.config.types.placeholder)return;var _=0,m=n.activeNode;m instanceof e.$keyboardNavigation.TaskCell&&(_=m.columnIndex);var p=e.config.keyboard_navigation_cells?e.$keyboardNavigation.TaskCell:e.$keyboardNavigation.TaskRow;b.type==e.config.types.placeholder&&e.config.placeholder_task.focusOnCreate===!1||n.setActiveNode(new p(v,_))}}),e.attachEvent("onTaskIdChange",function(v,b){if(!e.config.keyboard_navigation)return!0;var _=n.activeNode;return n.isTaskFocused(v)&&(_.taskId=b),!0});var h=setInterval(function(){e.config.keyboard_navigation&&(n.isEnabled()||n.enable())},500);function g(v){var b={gantt:e.$keyboardNavigation.GanttNode,headerCell:e.$keyboardNavigation.HeaderCell,taskRow:e.$keyboardNavigation.TaskRow,taskCell:e.$keyboardNavigation.TaskCell};return b[v]||b.gantt}function f(v){for(var b=e.getGridColumns(),_=0;_{if(t.config.touch&&!t.config.touch_tooltip)return;const i=t.locate(n);if(t.isTaskExists(i)){const a=t.getTask(i);return t.templates.tooltip_text(a.start_date,a.end_date,a)}return null},global:!1})}),t.attachEvent("onDestroy",function(){e.destructor()}),t.attachEvent("onLightbox",function(){e.hideTooltip()}),t.attachEvent("onBeforeTooltip",function(){if(t.getState().link_source_id)return!1}),t.attachEvent("onGanttScroll",function(){e.hideTooltip()})},undo:function(t){const e=new Wn(t),n=new zn(e,t);function i(d,c,u){d&&(d.id===c&&(d.id=u),d.parent===c&&(d.parent=u))}function a(d,c,u){i(d.value,c,u),i(d.oldValue,c,u)}function r(d,c,u){d&&(d.source===c&&(d.source=u),d.target===c&&(d.target=u))}function s(d,c,u){r(d.value,c,u),r(d.oldValue,c,u)}function o(d,c,u){const h=e;for(let g=0;ge.undo(),redo:()=>e.redo(),getUndoStack:()=>e.getUndoStack(),setUndoStack:d=>e.setUndoStack(d),getRedoStack:()=>e.getRedoStack(),setRedoStack:d=>e.setRedoStack(d),clearUndoStack:()=>e.clearUndoStack(),clearRedoStack:()=>e.clearRedoStack(),saveState:(d,c)=>n.store(d,c,!0),getInitialState:(d,c)=>c===t.config.undo_types.link?n.getInitialLink(d):n.getInitialTask(d)},t.undo=t.ext.undo.undo,t.redo=t.ext.undo.redo,t.getUndoStack=t.ext.undo.getUndoStack,t.getRedoStack=t.ext.undo.getRedoStack,t.clearUndoStack=t.ext.undo.clearUndoStack,t.clearRedoStack=t.ext.undo.clearRedoStack,t.attachEvent("onTaskIdChange",(d,c)=>{const u=e;o(u.getUndoStack(),d,c),o(u.getRedoStack(),d,c)}),t.attachEvent("onLinkIdChange",(d,c)=>{const u=e;l(u.getUndoStack(),d,c),l(u.getRedoStack(),d,c)}),t.attachEvent("onGanttReady",()=>{e.updateConfigs()})},marker:function(t){function e(i){if(!t.config.show_markers||!i.start_date)return!1;var a=t.getState();if(+i.start_date>+a.max_date||(!i.end_date||+i.end_date<+a.min_date)&&+i.start_date<+a.min_date)return;var r=document.createElement("div");r.setAttribute("data-marker-id",i.id);var s="gantt_marker";i.css&&(s+=" "+i.css),i.title&&(r.title=i.title),r.className=s;var o=t.posFromDate(i.start_date);r.style.left=o+"px";let l=Math.max(t.getRowTop(t.getVisibleTaskCount()),0)+"px";if(t.config.timeline_placeholder&&t.$task_data&&(l=t.$task_data.scrollHeight+"px"),r.style.height=l,i.end_date){var d=t.posFromDate(i.end_date);r.style.width=Math.max(d-o,0)+"px"}return i.text&&(r.innerHTML="
"+i.text+"
"),r}function n(){if(t.$task_data){var i=document.createElement("div");i.className="gantt_marker_area",t.$task_data.appendChild(i),t.$marker_area=i}}t._markers||(t._markers=t.createDatastore({name:"marker",initItem:function(i){return i.id=i.id||t.uid(),i}})),t.config.show_markers=!0,t.attachEvent("onBeforeGanttRender",function(){t.$marker_area||n()}),t.attachEvent("onDataRender",function(){t.$marker_area||(n(),t.renderMarkers())}),t.attachEvent("onGanttLayoutReady",function(){t.attachEvent("onBeforeGanttRender",function(){n(),t.$services.getService("layers").createDataRender({name:"marker",defaultContainer:function(){return t.$marker_area}}).addLayer(e)},{once:!0})}),t.getMarker=function(i){return this._markers?this._markers.getItem(i):null},t.addMarker=function(i){return this._markers.addItem(i)},t.deleteMarker=function(i){return!!this._markers.exists(i)&&(this._markers.removeItem(i),!0)},t.updateMarker=function(i){this._markers.refresh(i)},t._getMarkers=function(){return this._markers.getItems()},t.renderMarkers=function(){this._markers.refresh()}},multiselect:function(t){t.config.multiselect=!0,t.config.multiselect_one_level=!1,t._multiselect={_selected:{},_one_level:!1,_active:!0,_first_selected_when_shift:null,getDefaultSelected:function(){var e=this.getSelected();return e.length?e[e.length-1]:null},setFirstSelected:function(e){this._first_selected_when_shift=e},getFirstSelected:function(){return this._first_selected_when_shift},isActive:function(){return this.updateState(),this._active},updateState:function(){this._one_level=t.config.multiselect_one_level;var e=this._active;this._active=t.config.select_task,this._active!=e&&this.reset()},reset:function(){this._selected={}},setLastSelected:function(e){t.$data.tasksStore.silent(function(){var n=t.$data.tasksStore;e?n.select(e+""):n.unselect(null)})},getLastSelected:function(){var e=t.$data.tasksStore.getSelectedId();return e&&t.isTaskExists(e)?e:null},select:function(e,n){return!!(e&&t.callEvent("onBeforeTaskMultiSelect",[e,!0,n])&&t.callEvent("onBeforeTaskSelected",[e]))&&(this._selected[e]=!0,this.setLastSelected(e),this.afterSelect(e),t.callEvent("onTaskMultiSelect",[e,!0,n]),t.callEvent("onTaskSelected",[e]),!0)},toggle:function(e,n){this._selected[e]?this.unselect(e,n):this.select(e,n)},unselect:function(e,n){e&&t.callEvent("onBeforeTaskMultiSelect",[e,!1,n])&&(this._selected[e]=!1,this.getLastSelected()==e&&this.setLastSelected(this.getDefaultSelected()),this.afterSelect(e),t.callEvent("onTaskMultiSelect",[e,!1,n]),t.callEvent("onTaskUnselected",[e]))},isSelected:function(e){return!(!t.isTaskExists(e)||!this._selected[e])},getSelected:function(){var e=[];for(var n in this._selected)this._selected[n]&&t.isTaskExists(n)?e.push(n):this._selected[n]=!1;return e.sort(function(i,a){return t.getGlobalTaskIndex(i)>t.getGlobalTaskIndex(a)?1:-1}),e},forSelected:function(e){for(var n=this.getSelected(),i=0;ih?t.getNext(g):t.getPrev(g);for(g=n;t.getGlobalTaskIndex(g)!==c;)this.select(g,e)&&!r&&(r=!0,a=g),g=c>u?t.getNext(g):t.getPrev(g)}}else s=n}).bind(this);return o&&(e.ctrlKey||e.metaKey)?(this.isSelected(n)||this.setFirstSelected(n),n&&this.toggle(n,e)):o&&e.shiftKey?(t.isTaskExists(this.getFirstSelected())&&this.getFirstSelected()!==null||this.setFirstSelected(n),i.length?d():l()):l(),this.isSelected(n)?this.setLastSelected(n):a?n==s&&this.setLastSelected(e.shiftKey?a:this.getDefaultSelected()):this.setLastSelected(null),this.getSelected().length||this.setLastSelected(null),this.getLastSelected()&&this.isSelected(this.getFirstSelected())||this.setFirstSelected(this.getLastSelected()),!0}},function(){var e=t.selectTask;t.selectTask=function(i){if(!(i=it(i,this.config.root_id)))return!1;var a=t._multiselect,r=i;return a.isActive()?(a.select(i,null)&&a.setLastSelected(i),a.setFirstSelected(a.getLastSelected())):r=e.call(this,i),r};var n=t.unselectTask;t.unselectTask=function(i){var a=t._multiselect,r=a.isActive();(i=i||a.getLastSelected())&&r&&(a.unselect(i,null),i==a.getLastSelected()&&a.setLastSelected(null),t.refreshTask(i),a.setFirstSelected(a.getLastSelected()));var s=i;return r||(s=n.call(this,i)),s},t.toggleTaskSelection=function(i){var a=t._multiselect;i&&a.isActive()&&(a.toggle(i),a.setFirstSelected(a.getLastSelected()))},t.getSelectedTasks=function(){var i=t._multiselect;return i.isActive(),i.getSelected()},t.eachSelectedTask=function(i){return this._multiselect.forSelected(i)},t.isSelectedTask=function(i){return this._multiselect.isSelected(i)},t.getLastSelectedTask=function(){return this._multiselect.getLastSelected()},t.attachEvent("onGanttReady",function(){var i=t.$data.tasksStore.isSelected;t.$data.tasksStore.isSelected=function(a){return t._multiselect.isActive()?t._multiselect.isSelected(a):i.call(this,a)}})}(),t.attachEvent("onTaskIdChange",function(e,n){var i=t._multiselect;if(!i.isActive())return!0;t.isSelectedTask(e)&&(i.unselect(e,null),i.select(n,null))}),t.attachEvent("onAfterTaskDelete",function(e,n){var i=t._multiselect;if(!i.isActive())return!0;i._selected[e]&&(i._selected[e]=!1,i.setLastSelected(i.getDefaultSelected())),i.forSelected(function(a){t.isTaskExists(a)||i.unselect(a,null)})}),t.attachEvent("onBeforeTaskMultiSelect",function(e,n,i){var a=t._multiselect;return!(n&&a.isActive()&&a._one_level)||a.isSameLevel(e)}),t.attachEvent("onTaskClick",function(e,n){return t._multiselect.doSelection(n)&&t.callEvent("onMultiSelect",[n]),!0})},export_api:function(t){return t.ext=t.ext||{},t.ext.export_api=t.ext.export_api||{_apiUrl:"https://export.dhtmlx.com/gantt",_preparePDFConfigRaw(e,n){let i=null;e.start&&e.end&&(i={start_date:t.config.start_date,end_date:t.config.end_date},t.config.start_date=t.date.str_to_date(t.config.date_format)(e.start),t.config.end_date=t.date.str_to_date(t.config.date_format)(e.end)),e=t.mixin(e,{name:"gantt."+n,data:t.ext.export_api._serializeHtml()}),i&&(t.config.start_date=i.start_date,t.config.end_date=i.end_date)},_prepareConfigPDF:(e,n)=>(e=t.mixin(e||{},{name:"gantt."+n,data:t.ext.export_api._serializeAll(),config:t.config}),t.ext.export_api._fixColumns(e.config.columns),e),_pdfExportRouter(e,n){e&&e.raw?t.ext.export_api._preparePDFConfigRaw(e,n):e=t.ext.export_api._prepareConfigPDF(e,n),e.version=t.version,t.ext.export_api._sendToExport(e,n)},exportToPDF(e){t.ext.export_api._pdfExportRouter(e,"pdf")},exportToPNG(e){t.ext.export_api._pdfExportRouter(e,"png")},exportToICal(e){e=t.mixin(e||{},{name:"gantt.ical",data:t.ext.export_api._serializePlain().data,version:t.version}),t.ext.export_api._sendToExport(e,"ical")},exportToExcel(e){let n,i,a,r;e=e||{};const s=t.config.smart_rendering;if(e.visual==="base-colors"&&(t.config.smart_rendering=!1),e.start||e.end){a=t.getState(),i=[t.config.start_date,t.config.end_date],r=t.getScrollState();const o=t.date.str_to_date(t.config.date_format);n=t.eachTask,e.start&&(t.config.start_date=o(e.start)),e.end&&(t.config.end_date=o(e.end)),t.render(),t.config.smart_rendering=s,t.eachTask=t.ext.export_api._eachTaskTimed(t.config.start_date,t.config.end_date)}else e.visual==="base-colors"&&(t.render(),t.config.smart_rendering=s);t._no_progress_colors=e.visual==="base-colors",(e=t.mixin(e,{name:"gantt.xlsx",title:"Tasks",data:t.ext.export_api._serializeTimeline(e).data,columns:t.ext.export_api._serializeGrid({rawDates:!0}),version:t.version})).visual&&(e.scales=t.ext.export_api._serializeScales(e)),t.ext.export_api._sendToExport(e,"excel"),(e.start||e.end)&&(t.config.start_date=a.min_date,t.config.end_date=a.max_date,t.eachTask=n,t.render(),t.scrollTo(r.x,r.y),t.config.start_date=i[0],t.config.end_date=i[1])},exportToJSON(e){e=t.mixin(e||{},{name:"gantt.json",data:t.ext.export_api._serializeAll(),config:t.config,columns:t.ext.export_api._serializeGrid(),worktime:t.ext.export_api._getWorktimeSettings(),version:t.version}),t.ext.export_api._sendToExport(e,"json")},importFromExcel(e){try{const n=e.data;if(n instanceof File){const i=new FormData;i.append("file",n),e.data=i}}catch{}t.ext.export_api._sendImportAjaxExcel(e)},importFromMSProject(e){const n=e.data;try{if(n instanceof File){const i=new FormData;i.append("file",n),e.data=i}}catch{}t.ext.export_api._sendImportAjaxMSP(e)},importFromPrimaveraP6:e=>(e.type="primaveraP6-parse",t.importFromMSProject(e)),exportToMSProject(e){(e=e||{}).skip_circular_links=e.skip_circular_links===void 0||!!e.skip_circular_links;const n=t.templates.xml_format,i=t.templates.format_date,a=t.config.xml_date,r=t.config.date_format,s="%d-%m-%Y %H:%i:%s";t.config.xml_date=s,t.config.date_format=s,t.templates.xml_format=t.date.date_to_str(s),t.templates.format_date=t.date.date_to_str(s);const o=t.ext.export_api._serializeAll();t.ext.export_api._customProjectProperties(o,e),t.ext.export_api._customTaskProperties(o,e),e.skip_circular_links&&t.ext.export_api._clearRecLinks(o),e=t.ext.export_api._exportConfig(o,e),t.ext.export_api._sendToExport(e,e.type||"msproject"),t.config.xml_date=a,t.config.date_format=r,t.templates.xml_format=n,t.templates.format_date=i,t.config.$custom_data=null,t.config.custom=null},exportToPrimaveraP6:e=>((e=e||{}).type="primaveraP6",t.exportToMSProject(e)),_fixColumns(e){for(let n=0;n400))try{o=JSON.parse(s.responseText)}catch{}r&&r(o)},s.open("POST",n,!0),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.send(a)},_ajaxToExport(e,n,i){delete e.callback;const a=e.server||t.ext.export_api._apiUrl,r="type="+n+"&store=1&data="+encodeURIComponent(JSON.stringify(e));t.ext.export_api._xdr(a,r,function(s){const o=s.xmlDoc||s;let l=null;if(!(o.status>400))try{l=JSON.parse(o.responseText)}catch{}i(l)})},_serializableGanttConfig(e){const n=t.mixin({},e);return n.columns&&(n.columns=n.columns.map(function(i){const a=t.mixin({},i);return delete a.editor,a})),delete n.editor_types,n},_sendToExport(e,n){const i=t.date.date_to_str(t.config.date_format||t.config.xml_date);if(e.skin||(e.skin=t.skin),e.config&&(e.config=t.copy(t.ext.export_api._serializableGanttConfig(e.config)),t.ext.export_api._markColumns(e,n),e.config.start_date&&e.config.end_date&&(e.config.start_date instanceof Date&&(e.config.start_date=i(e.config.start_date)),e.config.end_date instanceof Date&&(e.config.end_date=i(e.config.end_date)))),e.callback)return t.ext.export_api._ajaxToExport(e,n,e.callback);const a=t.ext.export_api._createHiddenForm();a.firstChild.action=e.server||t.ext.export_api._apiUrl,a.firstChild.childNodes[0].value=JSON.stringify(e),a.firstChild.childNodes[1].value=n,a.firstChild.submit()},_createHiddenForm(){if(!t.ext.export_api._hidden_export_form){const e=t.ext.export_api._hidden_export_form=document.createElement("div");e.style.display="none",e.innerHTML="
",document.body.appendChild(e)}return t.ext.export_api._hidden_export_form},_copyObjectBase(e){const n={start_date:void 0,end_date:void 0,constraint_date:void 0,deadline:void 0};for(const a in e)a.charAt(0)!=="$"&&a!=="baselines"&&(n[a]=e[a]);const i=t.templates.xml_format||t.templates.format_date;return n.start_date=i(n.start_date),n.end_date&&(n.end_date=i(n.end_date)),n.constraint_date&&(n.constraint_date=i(n.constraint_date)),n.deadline&&(n.deadline=i(n.deadline)),n},_color_box:null,_color_hash:{},_getStyles(e){if(t.ext.export_api._color_box||(t.ext.export_api._color_box=document.createElement("DIV"),t.ext.export_api._color_box.style.cssText="position:absolute; display:none;",document.body.appendChild(t.ext.export_api._color_box)),t.ext.export_api._color_hash[e])return t.ext.export_api._color_hash[e];t.ext.export_api._color_box.className=e;const n=t.ext.export_api._getColor(t.ext.export_api._color_box,"color"),i=t.ext.export_api._getColor(t.ext.export_api._color_box,"backgroundColor");return t.ext.export_api._color_hash[e]=n+";"+i},_getMinutesWorktimeSettings(e){const n=[];return e.forEach(function(i){n.push(i.startMinute),n.push(i.endMinute)}),n},_getWorktimeSettings(){const e={hours:[0,24],minutes:null,dates:{0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0}};let n;if(t.config.work_time){const i=t._working_time_helper;if(i&&i.get_calendar)n=i.get_calendar();else if(i)n={hours:i.hours,minutes:null,dates:i.dates};else if(t.config.worktimes&&t.config.worktimes.global){const a=t.config.worktimes.global;if(a.parsed){n={hours:null,minutes:t.ext.export_api._getMinutesWorktimeSettings(a.parsed.hours),dates:{}};for(const r in a.parsed.dates)Array.isArray(a.parsed.dates[r])?n.dates[r]=t.ext.export_api._getMinutesWorktimeSettings(a.parsed.dates[r]):n.dates[r]=a.parsed.dates[r]}else n={hours:a.hours,minutes:null,dates:a.dates}}else n=e}else n=e;return n},_eachTaskTimed:(e,n)=>function(i,a,r){a=a||t.config.root_id,r=r||t;const s=t.getChildren(a);if(s)for(let o=0;oe)&&(!n||l.start_date-1){let l=0;for(;lr.length&&(r=a[s].trace_x);for(let s=0;s400))try{l=JSON.parse(o.responseText)}catch{}r&&r(l)},o.open("POST",n,!0),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.send(a)}},t.exportToPDF=t.ext.export_api.exportToPDF,t.exportToPNG=t.ext.export_api.exportToPNG,t.exportToICal=t.ext.export_api.exportToICal,t.exportToExcel=t.ext.export_api.exportToExcel,t.exportToJSON=t.ext.export_api.exportToJSON,t.importFromExcel=t.ext.export_api.importFromExcel,t.importFromMSProject=t.ext.export_api.importFromMSProject,t.exportToMSProject=t.ext.export_api.exportToMSProject,t.importFromPrimaveraP6=t.ext.export_api.importFromPrimaveraP6,t.exportToPrimaveraP6=t.ext.export_api.exportToPrimaveraP6,t.ext.export_api}},Fn={KEY_CODES:{UP:38,DOWN:40,LEFT:37,RIGHT:39,SPACE:32,ENTER:13,DELETE:46,ESC:27,TAB:9}};class Vn{constructor(e){this.addExtension=(n,i)=>{this._extensions[n]=i},this.getExtension=n=>this._extensions[n],this._extensions={};for(const n in e)this._extensions[n]=e[n]}}const Un=()=>({layout:{css:"gantt_container",rows:[{cols:[{view:"grid",scrollX:"scrollHor",scrollY:"scrollVer"},{resizer:!0,width:1},{view:"timeline",scrollX:"scrollHor",scrollY:"scrollVer"},{view:"scrollbar",id:"scrollVer"}]},{view:"scrollbar",id:"scrollHor",height:20}]},links:{finish_to_start:"0",start_to_start:"1",finish_to_finish:"2",start_to_finish:"3"},types:{task:"task",project:"project",milestone:"milestone"},auto_types:!1,duration_unit:"day",work_time:!1,correct_work_time:!1,skip_off_time:!1,cascade_delete:!0,autosize:!1,autosize_min_width:0,autoscroll:!0,autoscroll_speed:30,deepcopy_on_parse:!1,show_links:!0,show_task_cells:!0,static_background:!1,static_background_cells:!0,branch_loading:!1,branch_loading_property:"$has_child",show_loading:!1,show_chart:!0,show_grid:!0,min_duration:36e5,date_format:"%d-%m-%Y %H:%i",xml_date:void 0,start_on_monday:!0,server_utc:!1,show_progress:!0,fit_tasks:!1,select_task:!0,scroll_on_click:!0,smart_rendering:!0,preserve_scroll:!0,readonly:!1,container_resize_timeout:20,deadlines:!0,date_grid:"%Y-%m-%d",drag_links:!0,drag_progress:!0,drag_resize:!0,drag_project:!1,drag_move:!0,drag_mode:{resize:"resize",progress:"progress",move:"move",ignore:"ignore"},round_dnd_dates:!0,link_wrapper_width:20,link_arrow_size:12,root_id:0,autofit:!1,columns:[{name:"text",tree:!0,width:"*",resize:!0},{name:"start_date",align:"center",resize:!0},{name:"duration",align:"center"},{name:"add",width:44}],scale_offset_minimal:!0,inherit_scale_class:!1,scales:[{unit:"day",step:1,date:"%d %M"}],time_step:60,duration_step:1,task_date:"%d %F %Y",time_picker:"%H:%i",task_attribute:"data-task-id",link_attribute:"data-link-id",layer_attribute:"data-layer",buttons_left:["gantt_save_btn","gantt_cancel_btn"],_migrate_buttons:{dhx_save_btn:"gantt_save_btn",dhx_cancel_btn:"gantt_cancel_btn",dhx_delete_btn:"gantt_delete_btn"},buttons_right:["gantt_delete_btn"],lightbox:{sections:[{name:"description",height:70,map_to:"text",type:"textarea",focus:!0},{name:"time",type:"duration",map_to:"auto"}],project_sections:[{name:"description",height:70,map_to:"text",type:"textarea",focus:!0},{name:"type",type:"typeselect",map_to:"type"},{name:"time",type:"duration",readonly:!0,map_to:"auto"}],milestone_sections:[{name:"description",height:70,map_to:"text",type:"textarea",focus:!0},{name:"type",type:"typeselect",map_to:"type"},{name:"time",type:"duration",single_date:!0,map_to:"auto"}]},drag_lightbox:!0,sort:!1,details_on_create:!0,details_on_dblclick:!0,initial_scroll:!0,task_scroll_offset:100,order_branch:!1,order_branch_free:!1,task_height:void 0,bar_height:"full",bar_height_padding:9,min_column_width:70,min_grid_column_width:70,grid_resizer_column_attribute:"data-column-index",keep_grid_width:!1,grid_resize:!1,grid_elastic_columns:!1,show_tasks_outside_timescale:!1,show_unscheduled:!0,resize_rows:!1,task_grid_row_resizer_attribute:"data-row-index",min_task_grid_row_height:30,row_height:36,readonly_property:"readonly",editable_property:"editable",calendar_property:"calendar_id",resource_calendars:{},dynamic_resource_calendars:!1,inherit_calendar:!1,type_renderers:{},open_tree_initially:!1,optimize_render:!0,prevent_default_scroll:!1,show_errors:!0,wai_aria_attributes:!0,smart_scales:!0,rtl:!1,placeholder_task:!1,horizontal_scroll_key:"shiftKey",drag_timeline:{useKey:void 0,ignore:".gantt_task_line, .gantt_task_link",render:!1},drag_multiple:!0,csp:"auto"});var rt=typeof window<"u";const _t={isIE:rt&&(navigator.userAgent.indexOf("MSIE")>=0||navigator.userAgent.indexOf("Trident")>=0),isIE6:rt&&!XMLHttpRequest&&navigator.userAgent.indexOf("MSIE")>=0,isIE7:rt&&navigator.userAgent.indexOf("MSIE 7.0")>=0&&navigator.userAgent.indexOf("Trident")<0,isIE8:rt&&navigator.userAgent.indexOf("MSIE 8.0")>=0&&navigator.userAgent.indexOf("Trident")>=0,isOpera:rt&&navigator.userAgent.indexOf("Opera")>=0,isChrome:rt&&navigator.userAgent.indexOf("Chrome")>=0,isKHTML:rt&&(navigator.userAgent.indexOf("Safari")>=0||navigator.userAgent.indexOf("Konqueror")>=0),isFF:rt&&navigator.userAgent.indexOf("Firefox")>=0,isIPad:rt&&navigator.userAgent.search(/iPad/gi)>=0,isEdge:rt&&navigator.userAgent.indexOf("Edge")!=-1,isNode:!rt||typeof navigator>"u"||!1};function je(t){if(typeof t=="string"||typeof t=="number")return t;let e="";for(const n in t){let i="";t.hasOwnProperty(n)&&(i=typeof t[n]=="string"?encodeURIComponent(t[n]):typeof t[n]=="number"?String(t[n]):encodeURIComponent(JSON.stringify(t[n])),i=n+"="+i,e.length&&(i="&"+i),e+=i)}return e}function $t(t,e){var n={method:t};if(e.length===0)throw new Error("Arguments list of query is wrong.");if(e.length===1)return typeof e[0]=="string"?(n.url=e[0],n.async=!0):(n.url=e[0].url,n.async=e[0].async||!0,n.callback=e[0].callback,n.headers=e[0].headers),e[0].data?typeof e[0].data!="string"?n.data=je(e[0].data):n.data=e[0].data:n.data="",n;switch(n.url=e[0],t){case"GET":case"DELETE":n.callback=e[1],n.headers=e[2];break;case"POST":case"PUT":e[1]?typeof e[1]!="string"?n.data=je(e[1]):n.data=e[1]:n.data="",n.callback=e[2],n.headers=e[3]}return n}const Fe={date_to_str:(t,e,n)=>{t=t.replace(/%[a-zA-Z]/g,a=>{switch(a){case"%d":return`"+to_fixed(date.get${e?"UTC":""}Date())+"`;case"%m":return`"+to_fixed((date.get${e?"UTC":""}Month()+1))+"`;case"%j":return`"+date.get${e?"UTC":""}Date()+"`;case"%n":return`"+(date.get${e?"UTC":""}Month()+1)+"`;case"%y":return`"+to_fixed(date.get${e?"UTC":""}FullYear()%100)+"`;case"%Y":return`"+date.get${e?"UTC":""}FullYear()+"`;case"%D":return`"+locale.date.day_short[date.get${e?"UTC":""}Day()]+"`;case"%l":return`"+locale.date.day_full[date.get${e?"UTC":""}Day()]+"`;case"%M":return`"+locale.date.month_short[date.get${e?"UTC":""}Month()]+"`;case"%F":return`"+locale.date.month_full[date.get${e?"UTC":""}Month()]+"`;case"%h":return`"+to_fixed((date.get${e?"UTC":""}Hours()+11)%12+1)+"`;case"%g":return`"+((date.get${e?"UTC":""}Hours()+11)%12+1)+"`;case"%G":return`"+date.get${e?"UTC":""}Hours()+"`;case"%H":return`"+to_fixed(date.get${e?"UTC":""}Hours())+"`;case"%i":return`"+to_fixed(date.get${e?"UTC":""}Minutes())+"`;case"%a":return`"+(date.get${e?"UTC":""}Hours()>11?"pm":"am")+"`;case"%A":return`"+(date.get${e?"UTC":""}Hours()>11?"PM":"AM")+"`;case"%s":return`"+to_fixed(date.get${e?"UTC":""}Seconds())+"`;case"%W":return'"+to_fixed(getISOWeek(date))+"';case"%w":return'"+to_fixed(getWeek(date))+"';default:return a}});const i=new Function("date","to_fixed","locale","getISOWeek","getWeek",`return "${t}";`);return a=>i(a,n.date.to_fixed,n.locale,n.date.getISOWeek,n.date.getWeek)},str_to_date:(t,e,n)=>{let i="var temp=date.match(/[a-zA-Z]+|[0-9]+/g);";const a=t.match(/%[a-zA-Z]/g);for(let o=0;o50?1900:2000);`;break;case"%g":case"%G":case"%h":case"%H":i+=`set[3]=temp[${o}]||0;`;break;case"%i":i+=`set[4]=temp[${o}]||0;`;break;case"%Y":i+=`set[0]=temp[${o}]||0;`;break;case"%a":case"%A":i+=`set[3]=set[3]%12+((temp[${o}]||'').toLowerCase()=='am'?0:12);`;break;case"%s":i+=`set[5]=temp[${o}]||0;`;break;case"%M":i+=`set[1]=locale.date.month_short_hash[temp[${o}]]||0;`;break;case"%F":i+=`set[1]=locale.date.month_full_hash[temp[${o}]]||0;`}let r="set[0],set[1],set[2],set[3],set[4],set[5]";e&&(r=` Date.UTC(${r})`);const s=new Function("date","locale",`var set=[0,0,1,0,0,0]; ${i} return new Date(${r});`);return o=>s(o,n.locale)}},Ve={date_to_str:(t,e,n)=>i=>t.replace(/%[a-zA-Z]/g,a=>{switch(a){case"%d":return e?n.date.to_fixed(i.getUTCDate()):n.date.to_fixed(i.getDate());case"%m":return e?n.date.to_fixed(i.getUTCMonth()+1):n.date.to_fixed(i.getMonth()+1);case"%j":return e?i.getUTCDate():i.getDate();case"%n":return e?i.getUTCMonth()+1:i.getMonth()+1;case"%y":return e?n.date.to_fixed(i.getUTCFullYear()%100):n.date.to_fixed(i.getFullYear()%100);case"%Y":return e?i.getUTCFullYear():i.getFullYear();case"%D":return e?n.locale.date.day_short[i.getUTCDay()]:n.locale.date.day_short[i.getDay()];case"%l":return e?n.locale.date.day_full[i.getUTCDay()]:n.locale.date.day_full[i.getDay()];case"%M":return e?n.locale.date.month_short[i.getUTCMonth()]:n.locale.date.month_short[i.getMonth()];case"%F":return e?n.locale.date.month_full[i.getUTCMonth()]:n.locale.date.month_full[i.getMonth()];case"%h":return e?n.date.to_fixed((i.getUTCHours()+11)%12+1):n.date.to_fixed((i.getHours()+11)%12+1);case"%g":return e?(i.getUTCHours()+11)%12+1:(i.getHours()+11)%12+1;case"%G":return e?i.getUTCHours():i.getHours();case"%H":return e?n.date.to_fixed(i.getUTCHours()):n.date.to_fixed(i.getHours());case"%i":return e?n.date.to_fixed(i.getUTCMinutes()):n.date.to_fixed(i.getMinutes());case"%a":return e?i.getUTCHours()>11?"pm":"am":i.getHours()>11?"pm":"am";case"%A":return e?i.getUTCHours()>11?"PM":"AM":i.getHours()>11?"PM":"AM";case"%s":return e?n.date.to_fixed(i.getUTCSeconds()):n.date.to_fixed(i.getSeconds());case"%W":return e?n.date.to_fixed(n.date.getUTCISOWeek(i)):n.date.to_fixed(n.date.getISOWeek(i));default:return a}}),str_to_date:(t,e,n)=>i=>{const a=[0,0,1,0,0,0],r=i.match(/[a-zA-Z]+|[0-9]+/g),s=t.match(/%[a-zA-Z]/g);for(let o=0;o50?1900:2e3);break;case"%g":case"%G":case"%h":case"%H":a[3]=r[o]||0;break;case"%i":a[4]=r[o]||0;break;case"%Y":a[0]=r[o]||0;break;case"%a":case"%A":a[3]=a[3]%12+((r[o]||"").toLowerCase()==="am"?0:12);break;case"%s":a[5]=r[o]||0;break;case"%M":a[1]=n.locale.date.month_short_hash[r[o]]||0;break;case"%F":a[1]=n.locale.date.month_full_hash[r[o]]||0}return e?new Date(Date.UTC(a[0],a[1],a[2],a[3],a[4],a[5])):new Date(a[0],a[1],a[2],a[3],a[4],a[5])}};function qn(t){var e=null;function n(){var a=!1;return t.config.csp==="auto"?(e===null&&function(){try{new Function("canUseCsp = false;")}catch{e=!0}}(),a=e):a=t.config.csp,a}var i={init:function(){for(var a=t.locale,r=a.date.month_short,s=a.date.month_short_hash={},o=0;o=9?9:s>=6?6:s>=3?3:0,a.setMonth(r),a},year_start:function(a){return a.setMonth(0),this.month_start(a)},day_start:function(a){return this.date_part(a)},hour_start:function(a){return a.getMinutes()&&a.setMinutes(0),this.minute_start(a),a},minute_start:function(a){return a.getSeconds()&&a.setSeconds(0),a.getMilliseconds()&&a.setMilliseconds(0),a},_add_days:function(a,r,s){a.setDate(a.getDate()+r);var o=r>=0,l=!s.getHours()&&a.getHours(),d=a.getDate()<=s.getDate()||a.getMonth()1&&l&&a.setHours(0),a},add:function(a,r,s){var o=new Date(a.valueOf());switch(s){case"day":o=this._add_days(o,r,a);break;case"week":o=this._add_days(o,7*r,a);break;case"month":o.setMonth(o.getMonth()+r);break;case"year":o.setYear(o.getFullYear()+r);break;case"hour":o.setTime(o.getTime()+60*r*60*1e3);break;case"minute":o.setTime(o.getTime()+60*r*1e3);break;default:return this["add_"+s](a,r,s)}return o},add_quarter:function(a,r){return this.add(a,3*r,"month")},to_fixed:function(a){return a<10?"0"+a:a},copy:function(a){return new Date(a.valueOf())},date_to_str:function(a,r){var s=Fe;return n()&&(s=Ve),s.date_to_str(a,r,t)},str_to_date:function(a,r){var s=Fe;return n()&&(s=Ve),s.str_to_date(a,r,t)},getISOWeek:function(a){return t.date._getWeekNumber(a,!0)},_getWeekNumber:function(a,r){if(!a)return!1;var s=a.getDay();r&&s===0&&(s=7);var o=new Date(a.valueOf());o.setDate(a.getDate()+(4-s));var l=o.getFullYear(),d=Math.round((o.getTime()-new Date(l,0,1).getTime())/864e5);return 1+Math.floor(d/7)},getWeek:function(a){return t.date._getWeekNumber(a,t.config.start_on_monday)},getUTCISOWeek:function(a){return t.date.getISOWeek(a)},convert_to_utc:function(a){return new Date(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds())},parseDate:function(a,r){return a&&!a.getFullYear&&(typeof r!="function"&&(r=typeof r=="string"?r==="parse_date"||r==="xml_date"?t.defined(t.templates.xml_date)?t.templates.xml_date:t.templates.parse_date:t.defined(t.templates[r])?t.templates[r]:t.date.str_to_date(r):t.defined(t.templates.xml_date)?t.templates.xml_date:t.templates.parse_date),a=a?r(a):null),a}};return i}class Gn{constructor(e){const{url:n,token:i}=e;this._url=n,this._token=i,this._mode=1,this._seed=1,this._queue=[],this.data={},this.api={},this._events={}}headers(){return{Accept:"application/json","Content-Type":"application/json","Remote-Token":this._token}}fetch(e,n){const i={credentials:"include",headers:this.headers()};return n&&(i.method="POST",i.body=n),fetch(e,i).then(a=>a.json())}load(e){return e&&(this._url=e),this.fetch(this._url).then(n=>this.parse(n))}parse(e){const{key:n,websocket:i}=e;n&&(this._token=e.key);for(const a in e.data)this.data[a]=e.data[a];for(const a in e.api){const r=this.api[a]={},s=e.api[a];for(const o in s)r[o]=this._wrapper(a+"."+o)}return i&&this.connect(),this}connect(){const e=this._socket;e&&(this._socket=null,e.onclose=function(){},e.close()),this._mode=2,this._socket=function(n,i,a,r){let s=i;s[0]==="/"&&(s=document.location.protocol+"//"+document.location.host+i),s=s.replace(/^http(s|):/,"ws$1:");const o=s.indexOf("?")!=-1?"&":"?";s=`${s}${o}token=${a}&ws=1`;const l=new WebSocket(s);return l.onclose=()=>setTimeout(()=>n.connect(),2e3),l.onmessage=d=>{const c=JSON.parse(d.data);switch(c.action){case"result":n.result(c.body,[]);break;case"event":n.fire(c.body.name,c.body.value);break;case"start":r();break;default:n.onError(c.data)}},l}(this,this._url,this._token,()=>(this._mode=3,this._send(),this._resubscribe(),this))}_wrapper(e){return(function(){const n=[].slice.call(arguments);let i=null;const a=new Promise((r,s)=>{i={data:{id:this._uid(),name:e,args:n},status:1,resolve:r,reject:s},this._queue.push(i)});return this.onCall(i,a),this._mode===3?this._send(i):setTimeout(()=>this._send(),1),a}).bind(this)}_uid(){return(this._seed++).toString()}_send(e){if(this._mode==2)return void setTimeout(()=>this._send(),100);const n=e?[e]:this._queue.filter(a=>a.status===1);if(!n.length)return;const i=n.map(a=>(a.status=2,a.data));this._mode!==3?this.fetch(this._url,JSON.stringify(i)).catch(a=>this.onError(a)).then(a=>this.result(a,i)):this._socket.send(JSON.stringify({action:"call",body:i}))}result(e,n){const i={};if(e)for(let a=0;a=0;a--){const r=this._queue[a],s=i[r.data.id];s&&(this.onResponse(r,s),s.error?r.reject(s.error):r.resolve(s.data),this._queue.splice(a,1))}}on(e,n){const i=this._uid();let a=this._events[e];const r=!!a;return r||(a=this._events[e]=[]),a.push({id:i,handler:n}),r||this._mode!=3||this._socket.send(JSON.stringify({action:"subscribe",name:e})),{name:e,id:i}}_resubscribe(){if(this._mode==3)for(const e in this._events)this._socket.send(JSON.stringify({action:"subscribe",name:e}))}detach(e){if(!e){if(this._mode==3)for(const r in this._events)this._socket.send(JSON.stringify({action:"unsubscribe",key:r}));return void(this._events={})}const{id:n,name:i}=e,a=this._events[i];if(a){const r=a.filter(s=>s.id!=n);r.length?this._events[i]=r:(delete this._events[i],this._mode==3&&this._socket.send(JSON.stringify({action:"unsubscribe",name:i})))}}fire(e,n){const i=this._events[e];if(i)for(let a=0;as.json())},this._ready=n.load().then(i=>this._remote=i),this.ready=function(){return this._ready},this.on=function(i,a){this.ready().then(r=>{if(typeof i=="string")r.on(i,a);else for(const s in i)r.on(s,i[s])})}};function Ue(t,e){if(!e)return!0;if(t._on_timeout)return!1;var n=Math.ceil(1e3/e);return n<2||(setTimeout(function(){delete t._on_timeout},n),t._on_timeout=!0),!0}var Jn=function(){var t={};return{getState:function(e){if(t[e])return t[e].method();var n={};for(var i in t)t[i].internal||N(n,t[i].method(),!0);return n},registerProvider:function(e,n,i){t[e]={method:n,internal:i}},unregisterProvider:function(e){delete t[e]}}};const Kn=Promise;var et={$create:function(t){return N(t||[],this)},$removeAt:function(t,e){t>=0&&this.splice(t,e||1)},$remove:function(t){this.$removeAt(this.$find(t))},$insertAt:function(t,e){if(e||e===0){var n=this.splice(e,this.length-e);this[e]=t,this.push.apply(this,n)}else this.push(t)},$find:function(t){for(var e=0;ei&&(e=Math.min(n.length,e))}this.pull[t.id]=t,this.isSilent()||this._updateOrder(function(){this.$find(t.id)===-1&&this.$insertAt(t.id,e)}),this.filter()},isVisible:function(t){return this.visibleOrder.$find(t)>-1},getVisibleItems:function(){return this.getIndexRange()},addItem:function(t,e){return W(t.id)||(t.id=at()),this.$initItem&&(t=this.$initItem(t)),!(!this.isSilent()&&this.callEvent("onBeforeAdd",[t.id,t])===!1)&&(this._addItemInner(t,e),this.isSilent()||(this.callEvent("onAfterAdd",[t.id,t]),this.callEvent("onStoreUpdated",[t.id,t,"add"])),t.id)},_changeIdInner:function(t,e){this.pull[t]&&(this.pull[e]=this.pull[t]);var n=this._searchVisibleOrder[t];this.pull[e].id=e,this._updateOrder(function(){this[this.$find(t)]=e}),this._searchVisibleOrder[e]=n,delete this._searchVisibleOrder[t],delete this.pull[t]},changeId:function(t,e){this._changeIdInner(t,e),this.callEvent("onIdChange",[t,e])},exists:function(t){return!!this.pull[t]},_moveInner:function(t,e){var n=this.getIdByIndex(t);this._updateOrder(function(){this.$removeAt(t),this.$insertAt(n,Math.min(this.length,e))})},move:function(t,e){var n=this.getIdByIndex(t),i=this.getItem(n);this._moveInner(t,e),this.isSilent()||this.callEvent("onStoreUpdated",[i.id,i,"move"])},clearAll:function(){this.$destroyed||(this.silent(function(){this.unselect()}),this.pull={},this.visibleOrder=et.$create(),this.fullOrder=et.$create(),this.isSilent()||(this.callEvent("onClearAll",[]),this.refresh()))},silent:function(t,e){var n=!1;this.isSilent()&&(n=!0),this._skip_refresh=!0,t.call(e||this),n||(this._skip_refresh=!1)},isSilent:function(){return!!this._skip_refresh},arraysEqual:function(t,e){if(t.length!==e.length)return!1;for(var n=0;n=n.$level)return!1;for(;n&&this.exists(i);){if((n=this.getItem(i))&&n.id==e)return!0;i=this.getParent(n)}return!1},getSiblings:function(t){if(!this.exists(t))return et.$create();var e=this.getParent(t);return this.getChildren(e)},getNextSibling:function(t){for(var e=this.getSiblings(t),n=0,i=e.length;n0&&(a="0"),a||null}return null},getPrevSibling:function(t){for(var e=this.getSiblings(t),n=0,i=e.length;n0&&(a="0"),a||null}return null},getParent:function(t){var e=null;return(e=t.id!==void 0?t:this.getItem(t))?e[this.$parentProperty]:this.$getRootId()},clearAll:function(){this._branches={},st.prototype.clearAll.call(this)},calculateItemLevel:function(t){var e=0;return this.eachParent(function(){e++},t),e},_setParentInner:function(t,e,n){n||(t.hasOwnProperty("$rendered_parent")?this._move_branch(t,t.$rendered_parent,e):this._move_branch(t,t[this.$parentProperty],e))},setParent:function(t,e,n){this._setParentInner(t,e,n),t[this.$parentProperty]=e},_eachItemCached:function(t,e){for(var n=0,i=e.length;n=0;o--)i.push(s[o])}},eachItem:function(t,e){var n=this.$getRootId();W(e)||(e=n);var i=it(e,n)||n,a=!1,r=!1,s=null;i===n&&(this._eachItemMainRangeCache?(a=!0,s=this._eachItemMainRangeCache):(r=!0,s=this._eachItemMainRangeCache=[])),a?this._eachItemCached(t,s):this._eachItemIterate(t,i,r?s:null)},eachParent:function(t,e){for(var n={},i=e,a=this.getParent(i);this.exists(a);){if(n[a])throw new Error("Invalid tasks tree. Cyclic reference has been detected on task "+a);n[a]=!0,i=this.getItem(a),t.call(this,i),a=this.getParent(i)}},_add_branch:function(t,e,n){var i=n===void 0?this.getParent(t):n;this.hasChild(i)||(this._branches[i]=et.$create());var a=this.getChildren(i);a.indexOf(t.id+"")>-1||a.indexOf(+t.id)>-1||(1*e==e?a.splice(e,0,t.id):a.push(t.id),t.$rendered_parent=i)},_move_branch:function(t,e,n){this._eachItemMainRangeCache=null,this._replace_branch_child(e,t.id),this.exists(n)||n==this.$getRootId()?this._add_branch(t,void 0,n):delete this._branches[t.id],t.$level=this.calculateItemLevel(t),this.eachItem(function(i){i.$level=this.calculateItemLevel(i)},t.id)},_replace_branch_child:function(t,e,n){var i=this.getChildren(t);if(i&&t!==void 0){var a=et.$create();let r=i.indexOf(e+"");r!=-1||isNaN(+e)||(r=i.indexOf(+e)),r>-1&&(n?i.splice(r,1,n):i.splice(r,1)),a=i,this._branches[t]=a}},sort:function(t,e,n){this.exists(n)||(n=this.$getRootId()),t||(t="order");var i=typeof t=="string"?function(l,d){return l[t]==d[t]||X(l[t])&&X(d[t])&&l[t].valueOf()==d[t].valueOf()?0:l[t]>d[t]?1:-1}:t;if(e){var a=i;i=function(l,d){return a(d,l)}}var r=this.getChildren(n);if(r){for(var s=[],o=r.length-1;o>=0;o--)s[o]=this.getItem(r[o]);for(s.sort(i),o=0;o0&&(c=c.filter(u=>u!==void 0),d=d.concat(c))}if((l.start==null||l.end==null)&&l.ids==null)throw new Error("Invalid range returned from 'getVisibleRange' of the layer")}else d=n.getVisibleItems();o.prepare_data&&o.prepare_data(d,o),o.update_items(d)}};function s(o){return!!o.$services.getService("state").getState("batchUpdate").batch_update}n.attachEvent("onStoreUpdated",function(o,l,d){if(F(e))return!0;const c=e.$services.getService("layers").getDataRender(t);c&&(c.onUpdateRequest=function(u){r(u)})}),n.attachEvent("onStoreUpdated",function(o,l,d){s(e)||(o&&d!="move"&&d!="delete"?(n.callEvent("onBeforeRefreshItem",[l.id]),n.callEvent("onAfterRefreshItem",[l.id])):(n.callEvent("onBeforeRefreshAll",[]),n.callEvent("onAfterRefreshAll",[])))}),n.attachEvent("onAfterRefreshAll",function(){if(F(e))return!0;const o=e.$services.getService("layers").getDataRender(t);o&&!s(e)&&a(o)}),n.attachEvent("onAfterRefreshItem",function(o){if(F(e))return!0;const l=e.$services.getService("layers").getDataRender(t);l&&i(o,l)}),n.attachEvent("onItemOpen",function(){if(F(e))return!0;e.render()}),n.attachEvent("onItemClose",function(){if(F(e))return!0;e.render()}),n.attachEvent("onIdChange",function(o,l){if(F(e))return!0;if(n.callEvent("onBeforeIdChange",[o,l]),!s(e)&&!n.isSilent()){const d=e.$services.getService("layers").getDataRender(t);d?(function(c,u,h){for(let g=0;go.length-1||l<=0||s>o.length-1)){var d=i-this.getSum(o,r,s);this.adjustSize(d,o,r,s),this.adjustSize(-d,o,s+1),a.full_width=this.getSum(o)}},splitSize:function(i,a){for(var r=[],s=0;sa(o.unit,o.step)?-1:0});for(var r=0;r=0;g--){var f=g==i.length-1,y=this.initScaleConfig(i[g],o,l);f&&this.processIgnores(y),this.initColSizes(y,a,u,c[g]),this.limitVisibleRange(y),f&&(u=y.full_width),h.unshift(y)}for(g=0;g=+d&&(d=e.add(c,a,i));+c<+d;){o.call(this,new Date(c));var u=c.getTimezoneOffset();c=e.add(c,a,i),c=t._correct_dst_change(c,u,a,i),e[i+"_start"]&&(c=e[i+"_start"](c))}},limitVisibleRange:function(i){var a=i.trace_x,r=i.width.length-1,s=0;if(+a[0]<+i.min_date&&r!=0){var o=Math.floor(i.width[0]*((a[1]-i.min_date)/(a[1]-a[0])));s+=i.width[0]-o,i.width[0]=o,a[0]=new Date(i.min_date)}var l=a.length-1,d=a[l],c=e.add(d,i.step,i.unit);if(+c>+i.max_date&&l>0&&(o=i.width[l]-Math.floor(i.width[l]*((c-i.max_date)/(c-d))),s+=i.width[l]-o,i.width[l]=o),s){for(var u=this.getSum(i.width),h=0,g=0;gt.end_date&&(t.end_date=new Date(n))}function ce(t){Qn(t),function(e){if(e.config.fit_tasks){var n=+e._min_date,i=+e._max_date;if(+e._min_date!=n||+e._max_date!=i)return e.render(),e.callEvent("onScaleAdjusted",[]),!0}}(t)}function Ge(t,e,n){for(var i=0;ithis.clientSideDelete(o,e,n);this._dataProcessorHandlers.push(n.attachEvent("onAfterTaskAdd",function(o,l){n.isTaskExists(o)&&(e.setGanttMode("tasks"),e.setUpdated(o,!0,"inserted"))})),this._dataProcessorHandlers.push(n.attachEvent("onAfterTaskUpdate",function(o,l){n.isTaskExists(o)&&(e.setGanttMode("tasks"),e.setUpdated(o,!0),n._sendTaskOrder&&n._sendTaskOrder(o,l))})),this._dataProcessorHandlers.push(n.attachEvent("onBeforeTaskDelete",function(o,l){return n.config.cascade_delete&&(i[o]={tasks:ue.getSubtreeTasks(n,o),links:ue.getSubtreeLinks(n,o)}),!e.deleteAfterConfirmation||(e.setGanttMode("tasks"),e.setUpdated(o,!0,"deleted"),!1)})),this._dataProcessorHandlers.push(n.attachEvent("onAfterTaskDelete",function(o,l){e.setGanttMode("tasks");const d=!a(o),c=n.config.cascade_delete&&i[o];if(d||c){if(c){const u=e.updateMode;e.setUpdateMode("off");const h=i[o];for(const g in h.tasks)a(g)||(e.storeItem(h.tasks[g]),e.setUpdated(g,!0,"deleted"));e.setGanttMode("links");for(const g in h.links)a(g)||(e.storeItem(h.links[g]),e.setUpdated(g,!0,"deleted"));i[o]=null,u!=="off"&&e.sendAllData(),e.setGanttMode("tasks"),e.setUpdateMode(u)}d&&(e.storeItem(l),e.deleteAfterConfirmation||e.setUpdated(o,!0,"deleted")),e.updateMode==="off"||e._tSend||e.sendAllData()}})),this._dataProcessorHandlers.push(n.attachEvent("onAfterLinkUpdate",function(o,l){n.isLinkExists(o)&&(e.setGanttMode("links"),e.setUpdated(o,!0))})),this._dataProcessorHandlers.push(n.attachEvent("onAfterLinkAdd",function(o,l){n.isLinkExists(o)&&(e.setGanttMode("links"),e.setUpdated(o,!0,"inserted"))})),this._dataProcessorHandlers.push(n.attachEvent("onAfterLinkDelete",function(o,l){e.setGanttMode("links"),!a(o)&&(e.storeItem(l),e.setUpdated(o,!0,"deleted"))})),this._dataProcessorHandlers.push(n.attachEvent("onRowDragEnd",function(o,l){n._sendTaskOrder(o,n.getTask(o))}));let r=null,s=null;this._dataProcessorHandlers.push(n.attachEvent("onTaskIdChange",function(o,l){if(!e._waitMode)return;const d=n.getChildren(l);if(d.length){r=r||{};for(let u=0;u-1?o.indexOf("?"):o.length),this.serverProcessor=o+(o.slice(-1)==="/"?"":"/")+l}else{const l=this._ganttMode+"s";this.serverProcessor=o+n.ajax.urlSeparator(o)+"gantt_mode="+l}return!0}),e.attachEvent("insertCallback",function(o,l,d,c){const u=o.data||n.xml._xmlNodeToJSON(o.firstChild),h={add:n.addTask,isExist:n.isTaskExists};c==="links"&&(h.add=n.addLink,h.isExist=n.isLinkExists),h.isExist.call(n,l)||(u.id=l,h.add.call(n,u))}),e.attachEvent("updateCallback",function(o,l){const d=o.data||n.xml._xmlNodeToJSON(o.firstChild);if(!n.isTaskExists(l))return;const c=n.getTask(l);for(const u in d){let h=d[u];switch(u){case"id":continue;case"start_date":case"end_date":h=n.defined(n.templates.xml_date)?n.templates.xml_date(h):n.templates.parse_date(h);break;case"duration":c.end_date=n.calculateEndDate({start_date:c.start_date,duration:h,task:c})}c[u]=h}n.updateTask(l),n.refreshData()}),e.attachEvent("deleteCallback",function(o,l,d,c){const u={delete:n.deleteTask,isExist:n.isTaskExists};c==="links"?(u.delete=n.deleteLink,u.isExist=n.isLinkExists):c==="assignment"&&(u.delete=function(h){n.$data.assignmentsStore.remove(h)},u.isExist=function(h){return n.$data.assignmentsStore.exists(h)}),u.isExist.call(n,l)&&u.delete.call(n,l)}),this.handleResourceCRUD(e,n),this.handleResourceAssignmentCRUD(e,n),this.handleBaselineCRUD(e,n)}clientSideDelete(e,n,i){const a=n.updatedRows.slice();let r=!1;i.getUserData(e,"!nativeeditor_status",n._ganttMode)==="true_deleted"&&(r=!0,n.setUpdated(e,!1));for(let s=0;s{a[l.task_id]?function(d){r[d.id]=d,a[d.task_id]=!0}(l):s(l)}),i.attachEvent("onAfterUpdate",(o,l)=>{i.exists(o)&&(r[o]?s(l):(e.setGanttMode("assignment"),e.setUpdated(o,!0)))}),i.attachEvent("onAfterDelete",(o,l)=>{e.setGanttMode("assignment"),!this.clientSideDelete(o,e,n)&&(e.storeItem(l),e.setUpdated(o,!0,"deleted"))})}handleResourceCRUD(e,n){if(!n.config.resources||n.config.resources.dataprocessor_resources!==!0)return;const i=n.getDatastore(n.config.resource_store);i.attachEvent("onAfterAdd",(a,r)=>{(function(s){const o=s.id;i.exists(o)&&(e.setGanttMode("resource"),e.setUpdated(o,!0,"inserted"))})(r)}),i.attachEvent("onAfterUpdate",(a,r)=>{i.exists(a)&&(e.setGanttMode("resource"),e.setUpdated(a,!0))}),i.attachEvent("onAfterDelete",(a,r)=>{e.setGanttMode("resource"),!this.clientSideDelete(a,e,n)&&(e.storeItem(r),e.setUpdated(a,!0,"deleted"))})}handleBaselineCRUD(e,n){if(!n.config.baselines||n.config.baselines.dataprocessor_baselines!==!0)return;const i=n.getDatastore(n.config.baselines.datastore);i.attachEvent("onAfterAdd",(a,r)=>{(function(s){const o=s.id;i.exists(o)&&(e.setGanttMode("baseline"),e.setUpdated(o,!0,"inserted"))})(r)}),i.attachEvent("onAfterUpdate",(a,r)=>{i.exists(a)&&(e.setGanttMode("baseline"),e.setUpdated(a,!0))}),i.attachEvent("onAfterDelete",(a,r)=>{e.setGanttMode("baseline"),!this.clientSideDelete(a,e,n)&&(e.storeItem(r),e.setUpdated(a,!0,"deleted"))})}detach(){kt(this._dataProcessorHandlers,e=>{this.$gantt.detachEvent(e)}),this._dataProcessorHandlers=[]}}const Yt=class Yt{constructor(){this.clear=()=>{this._storage={}},this.storeItem=e=>{this._storage[e.id]=V(e)},this.getStoredItem=e=>this._storage[e]||null,this._storage={}}};Yt.create=()=>new Yt;let Wt=Yt,Je=class{constructor(t){this.serverProcessor=t,this.action_param="!nativeeditor_status",this.updatedRows=[],this.autoUpdate=!0,this.updateMode="cell",this._headers=null,this._payload=null,this._postDelim="_",this._routerParametersFormat="parameters",this._waitMode=0,this._in_progress={},this._storage=Wt.create(),this._invalid={},this.messages=[],this.styles={updated:"font-weight:bold;",inserted:"font-weight:bold;",deleted:"text-decoration : line-through;",invalid:"background-color:FFE0E0;",invalid_cell:"border-bottom:2px solid red;",error:"color:red;",clear:"font-weight:normal;text-decoration:none;"},this.enableUTFencoding(!0),nt(this)}setTransactionMode(t,e){typeof t=="object"?(this._tMode=t.mode||this._tMode,W(t.headers)&&(this._headers=t.headers),W(t.payload)&&(this._payload=t.payload),this._tSend=!!e):(this._tMode=t,this._tSend=e),this._tMode==="REST"&&(this._tSend=!1),this._tMode==="JSON"||this._tMode==="REST-JSON"?(this._tSend=!1,this._serializeAsJson=!0,this._headers=this._headers||{},this._headers["Content-Type"]="application/json"):this._headers&&!this._headers["Content-Type"]&&(this._headers["Content-Type"]="application/x-www-form-urlencoded"),this._tMode==="CUSTOM"&&(this._tSend=!1,this._router=t.router)}escape(t){return this._utf?encodeURIComponent(t):escape(t)}enableUTFencoding(t){this._utf=!!t}getSyncState(){return!this.updatedRows.length}setUpdateMode(t,e){this.autoUpdate=t==="cell",this.updateMode=t,this.dnd=e}ignore(t,e){this._silent_mode=!0,t.call(e||dt),this._silent_mode=!1}setUpdated(t,e,n){if(this._silent_mode)return;const i=this.findRow(t);n=n||"updated";const a=this.$gantt.getUserData(t,this.action_param,this._ganttMode);a&&n==="updated"&&(n=a),e?(this.set_invalid(t,!1),this.updatedRows[i]=t,this.$gantt.setUserData(t,this.action_param,n,this._ganttMode),this._in_progress[t]&&(this._in_progress[t]="wait")):this.is_invalid(t)||(this.updatedRows.splice(i,1),this.$gantt.setUserData(t,this.action_param,"",this._ganttMode)),this.markRow(t,e,n),e&&this.autoUpdate&&this.sendData(t)}markRow(t,e,n){let i="";const a=this.is_invalid(t);if(a&&(i=this.styles[a],e=!0),this.callEvent("onRowMark",[t,e,n,a])&&(i=this.styles[e?n:"clear"]+" "+i,this.$gantt[this._methods[0]](t,i),a&&a.details)){i+=this.styles[a+"_cell"];for(let r=0;r{this.modes[n]&&this.modes[n].updatedRows.length&&e.push(n)}),e.length){for(let n=0;n{this.$gantt.deleteTask(t)}),this.$gantt.callEvent("onAfterTaskDelete",[t,l]),this.$gantt.render(),delete this._in_progress[r]}return this.callEvent("onAfterUpdate",[t,n,e,i])}return this.$gantt.setUserData(t,this.action_param,"true_deleted",this._ganttMode),this.$gantt[this._methods[3]](t),delete this._in_progress[r],this.callEvent("onAfterUpdate",[t,n,e,i])}this._in_progress[r]!=="wait"?(s&&this.$gantt.setUserData(t,this.action_param,"",this._ganttMode),delete this._in_progress[r]):(delete this._in_progress[r],this.setUpdated(e,!0,this.$gantt.getUserData(t,this.action_param,this._ganttMode))),this.callEvent("onAfterUpdate",[o,n,e,i])}afterUpdate(t,e,n){let i;i=arguments.length===3?arguments[1]:arguments[4];let a=this.getGanttMode();const r=i.filePath||i.url;a=this._tMode!=="REST"&&this._tMode!=="REST-JSON"?r.indexOf("gantt_mode=links")!==-1?"link":r.indexOf("gantt_mode=assignments")!==-1?"assignment":r.indexOf("gantt_mode=baselines")!==-1?"baseline":"task":r.indexOf("/link")>=0?"link":r.indexOf("/assignment")>=0?"assignment":r.indexOf("/baseline")>=0?"baseline":"task",this.setGanttMode(a);const s=this.$gantt.ajax;let o;try{o=JSON.parse(e.xmlDoc.responseText)}catch{e.xmlDoc.responseText.length||(o={})}const l=u=>{const h=o.action||this.getState(u)||"updated",g=o.sid||u[0],f=o.tid||u[0];t.afterUpdateCallback(g,f,h,o,a)};if(o)return Array.isArray(n)&&n.length>1?n.forEach(u=>l(u)):l(n),t.finalizeUpdate(),void this.setGanttMode(a);const d=s.xmltop("data",e.xmlDoc);if(!d)return this.cleanUpdate(n);const c=s.xpath("//data/action",d);if(!c.length)return this.cleanUpdate(n);for(let u=0;u{this.loadUpdate()},t)}afterAutoUpdate(t,e,n,i){return e!=="collision"||(this._needUpdate=!0,!1)}fullSync(){return this._needUpdate&&(this._needUpdate=!1,this.loadUpdate()),!0}getUpdates(t,e){const n=this.$gantt.ajax;if(this._updateBusy)return!1;this._updateBusy=!0,n.get(t,e)}loadUpdate(){const t=this.$gantt.ajax,e=this.$gantt.getUserData(0,"version",this._ganttMode);let n=this.serverProcessor+t.urlSeparator(this.serverProcessor)+["dhx_user="+this._user,"dhx_version="+e].join("&");n=n.replace("editing=true&",""),this.getUpdates(n,i=>{const a=t.xpath("//userdata",i);this.$gantt.setUserData(0,"version",this._getXmlNodeValue(a[0]),this._ganttMode);const r=t.xpath("//update",i);if(r.length){this._silent_mode=!0;for(let s=0;s{let f=l||"updated",y=e,v=e;g&&(f=g.action||l,y=g.sid||y,v=g.id||g.tid||v),this.afterUpdateCallback(y,v,f,g,c)};let h;if(this._router instanceof Function)if(this._routerParametersFormat==="object"){const g={entity:c,action:d,data:t,id:e};h=this._router(g)}else h=this._router(c,d,t,e);else if(this._router[c]instanceof Function)h=this._router[c](d,t,e);else{const g="Incorrect configuration of gantt.createDataProcessor",f=` +You need to either add missing properties to the dataProcessor router object or to use a router function. +See https://docs.dhtmlx.com/gantt/desktop__server_side.html#customrouting and https://docs.dhtmlx.com/gantt/api__gantt_createdataprocessor.html for details.`;if(!this._router[c])throw new Error(`${g}: router for the **${c}** entity is not defined. ${f}`);switch(l){case"inserted":if(!this._router[c].create)throw new Error(`${g}: **create** action for the **${c}** entity is not defined. ${f}`);h=this._router[c].create(t);break;case"deleted":if(!this._router[c].delete)throw new Error(`${g}: **delete** action for the **${c}** entity is not defined. ${f}`);h=this._router[c].delete(e);break;default:if(!this._router[c].update)throw new Error(`${g}: **update**" action for the **${c}** entity is not defined. ${f}`);h=this._router[c].update(t,e)}}if(h){if(!h.then&&h.id===void 0&&h.tid===void 0&&h.action===void 0)throw new Error("Incorrect router return value. A Promise or a response object is expected");h.then?h.then(u).catch(g=>{g&&g.action?u(g):u({action:"error",value:g})}):u(h)}else u(null);return}let i;i={callback:l=>{const d=[];if(e)d.push(e);else if(t)for(const c in t)d.push(c);return this.afterUpdate(this,l,d)},headers:this._headers};const a="dhx_version="+this.$gantt.getUserData(0,"version",this._ganttMode),r=this.serverProcessor+(this._user?n.urlSeparator(this.serverProcessor)+["dhx_user="+this._user,a].join("&"):"");let s,o=this._applyPayload(r);switch(this._tMode){case"GET":s=this._cleanupArgumentsBeforeSend(t),i.url=o+n.urlSeparator(o)+this.serialize(s,e),i.method="GET";break;case"POST":s=this._cleanupArgumentsBeforeSend(t),i.url=o,i.method="POST",i.data=this.serialize(s,e);break;case"JSON":s={};const l=this._cleanupItemBeforeSend(t);for(const d in l)d!==this.action_param&&d!=="id"&&d!=="gr_id"&&(s[d]=l[d]);i.url=o,i.method="POST",i.data=JSON.stringify({id:e,action:t[this.action_param],data:s});break;case"REST":case"REST-JSON":switch(o=r.replace(/(&|\?)editing=true/,""),s="",this.getState(e)){case"inserted":i.method="POST",i.data=this.serialize(t,e);break;case"deleted":i.method="DELETE",o=o+(o.slice(-1)==="/"?"":"/")+e;break;default:i.method="PUT",i.data=this.serialize(t,e),o=o+(o.slice(-1)==="/"?"":"/")+e}i.url=this._applyPayload(o)}return this._waitMode++,n.query(i)}_forEachUpdatedRow(t){const e=this.updatedRows.slice();for(let n=0;nX(n)?this._prepareDate(n):Array.isArray(n)&&!zt(e,n)?this._prepareArray(n,e):n&&typeof n=="object"&&!zt(e,n)?this._prepareObject(n,e):n)}_prepareObject(t,e){const n={};e.push(t);for(const i in t){if(i.substr(0,1)==="$")continue;const a=t[i];X(a)?n[i]=this._prepareDate(a):a===null?n[i]="":Array.isArray(a)&&!zt(e,a)?n[i]=this._prepareArray(a,e):a&&typeof a=="object"&&!zt(e,a)?n[i]=this._prepareObject(a,e):n[i]=a}return n}_prepareDataItem(t){const e=this._prepareObject(t,[]);return e[this.action_param]=this.$gantt.getUserData(t.id,this.action_param,this._ganttMode),e}getStoredItem(t){return this._storage.getStoredItem(t)}_getRowData(t){let e;const n=this.$gantt;return this.getGanttMode()==="task"?n.isTaskExists(t)&&(e=this.$gantt.getTask(t)):this.getGanttMode()==="assignment"?this.$gantt.$data.assignmentsStore.exists(t)&&(e=this.$gantt.$data.assignmentsStore.getItem(t)):this.getGanttMode()==="baseline"?this.$gantt.$data.baselineStore.exists(t)&&(e=this.$gantt.$data.baselineStore.getItem(t)):n.isLinkExists(t)&&(e=this.$gantt.getLink(t)),e||(e=this.getStoredItem(t)),e||(e={id:t}),this._prepareDataItem(e)}};const Ke={DEPRECATED_api:function(t){return new Je(t)},createDataProcessor:function(t){let e,n,i;t instanceof Function?e=t:t.hasOwnProperty("router")?e=t.router:t.hasOwnProperty("assignment")||t.hasOwnProperty("baseline")||t.hasOwnProperty("link")||t.hasOwnProperty("task")?e=t:t.hasOwnProperty("headers")&&(i=t.headers),n=e?"CUSTOM":t.mode||"REST-JSON";const a=new Je(t.url);return a.init(this),a.setTransactionMode({mode:n,router:e,headers:i},t.batchUpdate),t.deleteAfterConfirmation&&(a.deleteAfterConfirmation=t.deleteAfterConfirmation),a}};function ei(t){var e={},n=!1;function i(l,d){d=typeof d=="function"?d:function(){},e[l]||(e[l]=this[l],this[l]=d)}function a(l){e[l]&&(this[l]=e[l],e[l]=null)}function r(l){for(var d in l)i.call(this,d,l[d])}function s(){for(var l in e)a.call(this,l)}function o(l){try{l()}catch(d){dt.console.error(d)}}return t.$services.getService("state").registerProvider("batchUpdate",function(){return{batch_update:n}},!1),function(l,d){if(n)o(l);else{var c,u=this._dp&&this._dp.updateMode!="off";u&&(c=this._dp.updateMode,this._dp.setUpdateMode("off"));var h={},g={render:!0,refreshData:!0,refreshTask:!0,refreshLink:!0,resetProjectDates:function(y){h[y.id]=y}};for(var f in r.call(this,g),n=!0,this.callEvent("onBeforeBatchUpdate",[]),o(l),this.callEvent("onAfterBatchUpdate",[]),s.call(this),h)this.resetProjectDates(h[f]);n=!1,d||this.render(),u&&(this._dp.setUpdateMode(c),this._dp.setGanttMode("task"),this._dp.sendData(),this._dp.setGanttMode("link"),this._dp.sendData())}}}function ni(t){t.batchUpdate=ei(t)}var ii=function(t){return{_needRecalc:!0,reset:function(){this._needRecalc=!0},_isRecalcNeeded:function(){return!this._isGroupSort()&&this._needRecalc},_isGroupSort:function(){return!!t.getState().group_mode},_getWBSCode:function(e){return e?(this._isRecalcNeeded()&&this._calcWBS(),e.$virtual?"":this._isGroupSort()?e.$wbs||"":(e.$wbs||(this.reset(),this._calcWBS()),e.$wbs)):""},_setWBSCode:function(e,n){e.$wbs=n},getWBSCode:function(e){return this._getWBSCode(e)},getByWBSCode:function(e){for(var n=e.split("."),i=t.config.root_id,a=0;al.start_date){for(let h=0;h"+g.value+""}return"
-
"}return""},renderSummaryLabel:function(s,o,l,d,c){let u=c.reduce(function(h,g){return h+Number(g.value)},0);return u%1&&(u=Math.round(10*u)/10),u?"
"+u+"
":""},editableResourceCellTemplate:function(s,o,l,d,c){return l.$role==="task"?r.renderEditableLabel(s,o,l,d,c):r.renderSummaryLabel(s,o,l,d,c)},editableResourceCellClass:function(s,o,l,d,c){const u=[];u.push("resource_marker"),l.$role==="task"?u.push("task_cell"):u.push("resource_cell");const h=c.reduce(function(f,y){return f+Number(y.value)},0);let g=Number(l.capacity);return isNaN(g)&&(g=8),h<=g?u.push("workday_ok"):u.push("workday_over"),u.join(" ")},getSummaryResourceAssignments:function(s){let o;const l=a.getDatastore(a.config.resource_store),d=l.getItem(s);return d.$role==="task"?o=a.getResourceAssignments(d.$resource_id,d.$task_id):(o=a.getResourceAssignments(s),l.eachItem&&l.eachItem(function(c){c.$role!=="task"&&(o=o.concat(a.getResourceAssignments(c.id)))},s)),o},initEditableDiagram:function(){a.config.resource_render_empty_cells=!0,function(){let s=null;function o(){return s&&cancelAnimationFrame(s),s=requestAnimationFrame(function(){a.$container&&Array.prototype.slice.call(a.$container.querySelectorAll(".resourceTimeline_cell [data-assignment-cell]")).forEach(function(l){l.contentEditable=!0})}),!0}a.attachEvent("onGanttReady",function(){a.getDatastore(a.config.resource_assignment_store).attachEvent("onStoreUpdated",o),a.getDatastore(a.config.resource_store).attachEvent("onStoreUpdated",o)},{once:!0}),a.attachEvent("onGanttLayoutReady",function(){a.$layout.getCellsByType("viewCell").forEach(function(l){l.$config&&l.$config.view==="resourceTimeline"&&l.$content&&l.$content.attachEvent("onScroll",o)})})}(),a.attachEvent("onGanttReady",function(){let s=!1;a.event(a.$container,"keypress",function(o){var l=o.target.closest(".resourceTimeline_cell [data-assignment-cell]");l&&(o.keyCode!==13&&o.keyCode!==27||l.blur())}),a.event(a.$container,"focusout",function(o){if(!s){s=!0,setTimeout(function(){s=!1},300);var l=o.target.closest(".resourceTimeline_cell [data-assignment-cell]");if(l){var d=(l.innerText||"").trim();d=="-"&&(d="0");var c=Number(d),u=l.getAttribute("data-row-id"),h=l.getAttribute("data-assignment-id"),g=l.getAttribute("data-task"),f=l.getAttribute("data-resource-id"),y=a.templates.parse_date(l.getAttribute("data-start-date")),v=a.templates.parse_date(l.getAttribute("data-end-date")),b=a.getDatastore(a.config.resource_assignment_store);if(isNaN(c))a.getDatastore(a.config.resource_store).refresh(u);else{var _=a.getTask(g);if(a.plugins().undo&&a.ext.undo.saveState(g,"task"),h){if(c===(p=b.getItem(h)).value)return;if(p.start_date.valueOf()===y.valueOf()&&p.end_date.valueOf()===v.valueOf())p.value=c,c?b.updateItem(p.id):b.removeItem(p.id);else{if(p.end_date.valueOf()>v.valueOf()){var m=a.copy(p);m.id=a.uid(),m.start_date=v,m.duration=a.calculateDuration({start_date:m.start_date,end_date:m.end_date,task:_}),m.delay=a.calculateDuration({start_date:_.start_date,end_date:m.start_date,task:_}),m.mode=p.mode||"default",m.duration!==0&&b.addItem(m)}p.start_date.valueOf(){x!="$id"&&(w[x]=p[x])}),w.start_date&&w.start_date.getMonth&&w.end_date&&w.end_date.getMonth&&typeof w.duration=="number"||r(w,f),b.push(w)})}return b}function d(f){if(t.isTaskExists(f)){var y=t.getTask(f);c(y,t.getTaskAssignments(y.id))}}function c(f,y){y.sort(function(v,b){return v.start_date&&b.start_date&&v.start_date.valueOf()!=b.start_date.valueOf()?v.start_date-b.start_date:0}),i==n.assignmentsArray?f[t.config.resource_property]=y:i==n.resourceValueArray&&(f[t.config.resource_property]=y.map(function(v){return{$id:v.id,start_date:v.start_date,duration:v.duration,end_date:v.end_date,delay:v.delay,resource_id:v.resource_id,value:v.value,mode:v.mode}})),f[e]=y}function u(f){var y=l(f);return y.forEach(function(v){v.id=v.id||t.uid()}),y}function h(f,y){var v=function(b,_){var m={inBoth:[],inTaskNotInStore:[],inStoreNotInTask:[]};if(i==n.singleValue){var p=b[0],k=p?p.resource_id:null,$=!1;_.forEach(function(T){T.resource_id!=k?m.inStoreNotInTask.push(T):T.resource_id==k&&(m.inBoth.push({store:T,task:p}),$=!0)}),!$&&p&&m.inTaskNotInStore.push(p)}else if(i==n.valueArray){var w={},x={},S={};b.forEach(function(T){w[T.resource_id]=T}),_.forEach(function(T){x[T.resource_id]=T}),b.concat(_).forEach(function(T){if(!S[T.resource_id]){S[T.resource_id]=!0;var C=w[T.resource_id],E=x[T.resource_id];C&&E?m.inBoth.push({store:E,task:C}):C&&!E?m.inTaskNotInStore.push(C):!C&&E&&m.inStoreNotInTask.push(E)}})}else i!=n.assignmentsArray&&i!=n.resourceValueArray||(w={},x={},S={},b.forEach(function(T){w[T.id||T.$id]=T}),_.forEach(function(T){x[T.id]=T}),b.concat(_).forEach(function(T){var C=T.id||T.$id;if(!S[C]){S[C]=!0;var E=w[C],D=x[C];E&&D?m.inBoth.push({store:D,task:E}):E&&!D?m.inTaskNotInStore.push(E):!E&&D&&m.inStoreNotInTask.push(D)}}));return m}(l(f),y);v.inStoreNotInTask.forEach(function(b){s.removeItem(b.id)}),v.inTaskNotInStore.forEach(function(b){s.addItem(b)}),v.inBoth.forEach(function(b){if(function(m,p){var k={id:!0};for(var $ in m)if(!k[$]&&String(m[$])!==String(p[$]))return!0;return!1}(b.task,b.store))(function(m,p){var k={id:!0};for(var $ in m)k[$]||(p[$]=m[$])})(b.task,b.store),s.updateItem(b.store.id);else if(b.task.start_date&&b.task.end_date&&b.task.mode!==a.fixedDates){var _=o(b.store,f);b.store.start_date.valueOf()==_.start_date.valueOf()&&b.store.end_date.valueOf()==_.end_date.valueOf()||(b.store.start_date=_.start_date,b.store.end_date=_.end_date,b.store.duration=_.duration,s.updateItem(b.store.id))}}),d(f.id)}function g(f){var y=f[e]||s.find(function(v){return v.task_id==f.id});h(f,y)}t.$data.assignmentsStore=s,t.attachEvent("onGanttReady",function(){if(t.config.process_resource_assignments){t.attachEvent("onParse",function(){t.silent(function(){s.clearAll();var k=[];t.eachTask(function($){if($.type!==t.config.types.project){var w=u($);c($,w),w.forEach(function(x){k.push(x)})}}),s.parse(k)})});var f=!1,y=!1,v={},b=!1;t.attachEvent("onBeforeBatchUpdate",function(){f=!0}),t.attachEvent("onAfterBatchUpdate",function(){if(y){var k={};for(var $ in v)k[$]=t.getTaskAssignments(v[$].id);for(var $ in v)h(v[$],k[$])}y=!1,f=!1,v={}}),t.attachEvent("onTaskCreated",function(k){var $=u(k);return s.parse($),c(k,$),!0}),t.attachEvent("onAfterTaskUpdate",function(k,$){f?(y=!0,v[k]=$):$.unscheduled||g($)}),t.attachEvent("onAfterTaskAdd",function(k,$){f?(y=!0,v[k]=$):g($)}),t.attachEvent("onRowDragEnd",function(k){g(t.getTask(k))}),t.$data.tasksStore.attachEvent("onAfterDeleteConfirmed",function(k,$){var w,x=[k];t.eachTask(function(S){x.push(S.id)},k),w={},x.forEach(function(S){w[S]=!0}),s.find(function(S){return w[S.task_id]}).forEach(function(S){s.removeItem(S.id)})}),t.$data.tasksStore.attachEvent("onClearAll",function(){return _=null,m=null,p=null,s.clearAll(),!0}),t.attachEvent("onTaskIdChange",function(k,$){s.find(function(w){return w.task_id==k}).forEach(function(w){w.task_id=$,s.updateItem(w.id)}),d($)}),t.attachEvent("onBeforeUndo",function(k){return b=!0,!0}),t.attachEvent("onAfterUndo",function(k){b=!0});var _=null,m=null,p=null;s.attachEvent("onStoreUpdated",function(){return f&&!b||(_=null,m=null,p=null),!0}),t.getResourceAssignments=function(k,$){var w=t.defined($)&&$!==null;return _===null&&(_={},m={},s.eachItem(function(x){_[x.resource_id]||(_[x.resource_id]=[]),_[x.resource_id].push(x);var S=x.resource_id+"-"+x.task_id;m[S]||(m[S]=[]),m[S].push(x)})),w?(m[k+"-"+$]||[]).slice():(_[k]||[]).slice()},t.getTaskAssignments=function(k){if(p===null){var $=[];p={},s.eachItem(function(w){p[w.task_id]||(p[w.task_id]=[]),p[w.task_id].push(w),w.task_id==k&&$.push(w)})}return(p[k]||[]).slice()},t.getTaskResources=function(k){const $=t.getDatastore("resource"),w=t.getTaskAssignments(k),x={};w.forEach(function(T){x[T.resource_id]||(x[T.resource_id]=T.resource_id)});const S=[];for(const T in x){const C=$.getItem(x[T]);C&&S.push(C)}return S},t.updateTaskAssignments=d}},{once:!0})}function li(t){function e(o){return function(){return!t.config.placeholder_task||o.apply(this,arguments)}}function n(){var o=t.getTaskBy("type",t.config.types.placeholder);if(!o.length||!t.isTaskExists(o[0].id)){var l={unscheduled:!0,type:t.config.types.placeholder,duration:0,text:t.locale.labels.new_task};if(t.callEvent("onTaskCreated",[l])===!1)return;t.addTask(l)}}function i(o){var l=t.getTask(o);l.type==t.config.types.placeholder&&(l.start_date&&l.end_date&&l.unscheduled&&(l.unscheduled=!1),t.batchUpdate(function(){var d=t.copy(l);t.silent(function(){t.deleteTask(l.id)}),delete d["!nativeeditor_status"],d.type=t.config.types.task,d.id=t.uid(),t.addTask(d)}))}t.config.types.placeholder="placeholder",t.attachEvent("onDataProcessorReady",e(function(o){o&&!o._silencedPlaceholder&&(o._silencedPlaceholder=!0,o.attachEvent("onBeforeUpdate",e(function(l,d,c){return c.type!=t.config.types.placeholder||(o.setUpdated(l,!1),!1)})))}));var a=!1;function r(o){return!!(t.config.types.placeholder&&t.isTaskExists(o)&&t.getTask(o).type==t.config.types.placeholder)}function s(o){return!(!r(o.source)&&!r(o.target))}t.attachEvent("onGanttReady",function(){a||(a=!0,t.attachEvent("onAfterTaskUpdate",e(i)),t.attachEvent("onAfterTaskAdd",e(function(o,l){l.type!=t.config.types.placeholder&&(t.getTaskBy("type",t.config.types.placeholder).forEach(function(d){t.silent(function(){t.isTaskExists(d.id)&&t.deleteTask(d.id)})}),n())})),t.attachEvent("onParse",e(n)))}),t.attachEvent("onLinkValidation",function(o){return!s(o)}),t.attachEvent("onBeforeLinkAdd",function(o,l){return!s(l)}),t.attachEvent("onBeforeUndoStack",function(o){for(var l=0;l!isNaN(this.parse(e)),this.format=e=>String(e),this.parse=e=>parseInt(e,10)}};Jt.create=(e=null)=>new Jt;let Et=Jt;const Kt=class Kt{constructor(e){this.format=n=>this._getWBSCode(n.source),this.canParse=n=>this._linkReg.test(n),this.parse=n=>{if(!this.canParse(n))return null;const i=this._linkReg.exec(n)[0].trim();return{id:void 0,source:this._findSource(i)||null,target:null,type:this._gantt.config.links.finish_to_start,lag:0}},this._getWBSCode=n=>{const i=this._gantt.getTask(n);return this._gantt.getWBSCode(i)},this._findSource=n=>{const i=new RegExp("^[0-9.]+","i");if(i.exec(n)){const a=i.exec(n)[0],r=this._gantt.getTaskByWBSCode(a);if(r)return r.id}return null},this._linkReg=/^[0-9\.]+/,this._gantt=e}};Kt.create=(e=null,n)=>new Kt(n);let he=Kt;function ci(t){t.ext.formatters={durationFormatter:function(e){return e||(e={}),e.store||(e.store=t.config.duration_unit),e.enter||(e.enter=t.config.duration_unit),Et.create(e,t)},linkFormatter:function(e){return he.create(e,t)}}}function ui(t){t.ext=t.ext||{},t.config.show_empty_state=!1,t.ext.emptyStateElement=t.ext.emptyStateElement||{isEnabled:()=>t.config.show_empty_state===!0,isGanttEmpty:()=>!t.getTaskByTime().length,renderContent(e){const n=`
${`
+ +
${t.locale.labels.empty_state_text_description}
+
`}
`;e.innerHTML=n},clickEvents:[],attachAddTaskEvent(){const e=t.attachEvent("onEmptyClick",function(n){t.utils.dom.closest(n.target,"[data-empty-state-create-task]")&&t.createTask({id:t.uid(),text:"New Task"})});this.clickEvents.push(e)},detachAddTaskEvents(){this.clickEvents.forEach(function(e){t.detachEvent(e)}),this.clickEvents=[]},getContainer(){if(t.$container){const e=t.utils.dom;if(t.$container.contains(t.$grid_data))return e.closest(t.$grid_data,".gantt_layout_content");if(t.$container.contains(t.$task_data))return e.closest(t.$task_data,".gantt_layout_content")}return null},getNode(){const e=this.getContainer();return e?e.querySelector(".gantt_empty_state_wrapper"):null},show(){const e=this.getContainer();if(!e&&this.isGanttEmpty())return null;const n=document.createElement("div");n.className="gantt_empty_state_wrapper",n.style.marginTop=t.config.scale_height-e.offsetHeight+"px";const i=t.$container.querySelectorAll(".gantt_empty_state_wrapper");Array.prototype.forEach.call(i,function(a){a.parentNode.removeChild(a)}),this.detachAddTaskEvents(),this.attachAddTaskEvent(),e.appendChild(n),this.renderContent(n)},hide(){const e=this.getNode();if(!e)return!1;e.parentNode.removeChild(e)},init(){}},t.attachEvent("onDataRender",function(){const e=t.ext.emptyStateElement;e.isEnabled()&&e.isGanttEmpty()?e.show():e.hide()})}const Xe=function(t,e){const n=e.baselines&&e.baselines.length,i=t.config.baselines.render_mode=="separateRow"||t.config.baselines.render_mode=="individualRow";if(n&&i)return!0},hi=function(t,e){let n=!1;return t.eachTask(function(i){n||(n=Xe(t,i))},e),n},wt=function(t){return t.render&&t.render=="split"&&!t.$open},_i=function(t,e,n,i){let a=i||e.$task_data.scrollHeight,r=!1,s=!1;return t.eachParent(function(o){if(wt(o)){s=!0;const l=e.getItemPosition(o).rowHeight;lr&&(r=o)},a.id),a.row_heighto&&(o=c)}),r.row_height=o,r.bar_height=r.bar_height||s}},a.id)}t.$data.baselineStore=e,t.adjustTaskHeightForBaselines=function(a){let r,s,o=a.baselines&&a.baselines.length||0;const l=t.config.baselines.row_height;switch(t.config.baselines.render_mode){case"taskRow":a.row_height=a.bar_height+4;break;case"separateRow":r=t.getLayoutView("timeline").getBarHeight(a.id),o?(a.bar_height=a.bar_height||r,a.bar_height>r&&(r=a.bar_height),a.row_height=r+l):a.bar_height&&(a.row_height=a.bar_height+4),i(a);break;case"individualRow":r=t.getLayoutView("timeline").getBarHeight(a.id),o?(a.bar_height=a.bar_height||r,a.bar_height>r&&(r=a.bar_height),s=l*o,a.row_height=r+s+2):a.bar_height&&(a.row_height=a.bar_height+4),i(a)}},t.attachEvent("onGanttReady",function(){t.config.baselines!==!1&&(t.attachEvent("onParse",function(){e.eachItem(function(a){const r=a.task_id;if(t.isTaskExists(r)){const s=t.getTask(r);s.baselines=s.baselines||[];let o=!0;for(let l=0;l"+n.xmlDoc.responseURL+", server returns 404");else if(!t.$destroyed){this.callEvent("onBeforeParse",[]),i||(i="json"),this.assert(this[i],"Invalid data type:'"+i+"'");var a=n.xmlDoc.responseText,r=this[i].parse(a,n);this._process_loading(r)}},t._process_loading=function(n){n.collections&&this._load_collections(n.collections),n.resources&&this.$data.resourcesStore&&this.$data.resourcesStore.parse(n.resources),t.config.baselines!==!1&&n.baselines&&this.$data.baselineStore&&this.$data.baselineStore.parse(n.baselines);const i=n.data||n.tasks;n.assignments&&function(r,s){const o={};s.forEach(l=>{o[l.task_id]||(o[l.task_id]=[]),o[l.task_id].push(l)}),r.forEach(l=>{l[t.config.resource_property]=o[l.id]||[]})}(i,n.assignments),this.$data.tasksStore.parse(i);var a=n.links||(n.collections?n.collections.links:[]);this.$data.linksStore.parse(a),this.callEvent("onParse",[]),this.render()},t._load_collections=function(n){var i=!1;for(var a in n)if(n.hasOwnProperty(a)){i=!0;var r=n[a];this.serverList[a]=this.serverList[a]||[];var s=this.serverList[a];if(!s)continue;s.splice(0,s.length);for(var o=0;o"},_copyObject:function(n){return""},serialize:function(){for(var n=[],i=[],a=t.json.serialize(),r=0,s=a.data.length;r"+n.join("")+""+i.join("")+""}},t.oldxml={parse:function(n,i){i=t.xml._getXML(n,i,"projects");for(var a={collections:{links:[]}},r=a.data=[],s=t.ajax.xpath("//task",i),o=0;oe.length?t:e,a=t===i?e:t;i=i.slice(),a=a.slice(),n=[];for(var r=0;rs.start&&(n.push({start:Math.max(s.start,l.start),end:Math.min(s.end,l.end)}),s.end>l.end&&(a.splice(o,1),o--,r--))}return n},_mergeAdjacentIntervals:function(t){var e=t.slice();e.sort(function(r,s){return r.start-s.start});for(var n=e[0],i=1;in.end&&(n.end=a.end),e.splice(i,1),i--):n=a}return e},_mergeHoursConfig:function(t,e){return this._mergeAdjacentIntervals(this._intersectHourRanges(t,e))},merge:function(t,e){var n=V(t.getConfig().parsed),i=V(e.getConfig().parsed),a={hours:this._toHoursArray(this._mergeHoursConfig(n.hours,i.hours)),dates:{},customWeeks:{}};const r=(o,l)=>{for(let d in o.dates){const c=o.dates[d];+d>1e3&&(a.dates[d]=!1);for(const u in l.dates){const h=l.dates[u];if(u==d&&(a.dates[d]=!(!c||!h)),Array.isArray(c)){const g=Array.isArray(h)?h:l.hours;a.dates[d]=this._toHoursArray(this._mergeHoursConfig(c,g))}}}};if(r(n,i),r(i,n),n.customWeeks)for(var s in n.customWeeks)a.customWeeks[s]=n.customWeeks[s];if(i.customWeeks)for(var s in i.customWeeks)a.customWeeks[s]=i.customWeeks[s];return a}};class mi{constructor(){this.clear()}getItem(e,n,i){if(this._cache.has(e)){const a=this._cache.get(e)[i.getFullYear()];if(a&&a.has(n))return a.get(n)}return-1}setItem(e,n,i,a){if(!e||!n)return;const r=this._cache,s=a.getFullYear();let o;r.has(e)?o=r.get(e):(o=[],r.set(e,o));let l=o[s];l||(l=o[s]=new Map),l.set(n,i)}clear(){this._cache=new Map}}class vi{constructor(){this.clear()}getItem(e,n,i){const a=this._cache;if(a&&a[e]){const r=a[e];if(r===void 0)return-1;const s=r[i.getFullYear()];if(s&&s[n]!==void 0)return s[n]}return-1}setItem(e,n,i,a){if(!e||!n)return;const r=this._cache;if(!r)return;r[e]||(r[e]=[]);const s=r[e],o=a.getFullYear();let l=s[o];l||(l=s[o]={}),l[n]=i}clear(){this._cache={}}}class ki{constructor(e){this.getMinutesPerWeek=n=>{const i=n.valueOf();if(this._weekCache.has(i))return this._weekCache.get(i);const a=this._calendar,r=this._calendar.$gantt;let s=0,o=r.date.week_start(new Date(n));for(let l=0;l<7;l++)s+=60*a.getHoursPerDay(o),o=r.date.add(o,1,"day");return this._weekCache.set(i,s),s},this.getMinutesPerMonth=n=>{const i=n.valueOf();if(this._monthCache.has(i))return this._monthCache.get(i);const a=this._calendar,r=this._calendar.$gantt;let s=0,o=r.date.week_start(new Date(n));const l=r.date.add(o,1,"month").valueOf();for(;o.valueOf(){this._weekCache=new Map,this._monthCache=new Map},this.clear(),this._calendar=e}}class yi{constructor(){this.clear()}_getCacheObject(e,n,i){const a=this._cache;a[n]||(a[n]=[]);let r=a[n];r||(r=a[n]={});let s=r[i];s||(s=r[i]={});const o=e.getFullYear();let l=s[o];return l||(l=s[o]={durations:{},endDates:{}}),l}_endDateCacheKey(e,n){return String(e)+"-"+String(n)}_durationCacheKey(e,n){return String(e)+"-"+String(n)}getEndDate(e,n,i,a,r){const s=this._getCacheObject(e,i,a),o=e.valueOf(),l=this._endDateCacheKey(o,n);let d;if(s.endDates[l]===void 0){const c=r(),u=c.valueOf();s.endDates[l]=u,s.durations[this._durationCacheKey(o,u)]=n,d=c}else d=new Date(s.endDates[l]);return d}getDuration(e,n,i,a,r){const s=this._getCacheObject(e,i,a),o=e.valueOf(),l=n.valueOf(),d=this._durationCacheKey(o,l);let c;if(s.durations[d]===void 0){const u=r();s.durations[d]=u.valueOf(),c=u}else c=s.durations[d];return c}clear(){this._cache={}}}function pe(t,e){this.argumentsHelper=e,this.$gantt=t,this._workingUnitsCache=typeof Map<"u"?new mi:new vi,this._largeUnitsCache=new ki(this),this._dateDurationCache=new yi,this._worktime=null,this._cached_timestamps={},this._cached_timestamps_count=0}pe.prototype={units:["year","month","week","day","hour","minute"],_clearCaches:function(){this._workingUnitsCache.clear(),this._largeUnitsCache.clear(),this._dateDurationCache.clear()},_getUnitOrder:function(t){for(var e=0,n=this.units.length;e1e6&&this._resetTimestampCache();var e=null;if(t.day||t.day===0)e=t.day;else if(t.date){var n=String(t.date.valueOf());this._cached_timestamps[n]?e=this._cached_timestamps[n]:(e=Date.UTC(t.date.getFullYear(),t.date.getMonth(),t.date.getDate()),this._cached_timestamps[n]=e,this._cached_timestamps_count++)}return e},_checkIfWorkingUnit:function(t,e){if(!this["_is_work_"+e]){const n=this.$gantt.date[`${e}_start`](new Date(t)),i=this.$gantt.date.add(n,1,e);return this.hasDuration(n,i)}return this["_is_work_"+e](t)},_is_work_day:function(t){var e=this._getWorkHours(t);return!!Array.isArray(e)&&e.length>0},_is_work_hour:function(t){for(var e=this._getWorkHours(t),n=t.getHours(),i=0;i=e[i].startHour&&n=e[i].start&&ns.valueOf(),this._isWorkTime(r,n))(u||h&&g)&&(o=a[n+"_start"](new Date(r)),l=a.add(o,i,n)),u?(u=!1,c=this._nextDate(o,n,i),d+=(l.valueOf()-r.valueOf())/(l.valueOf()-o.valueOf())):h&&g?(h=!1,d+=(s.valueOf()-r.valueOf())/(l.valueOf()-o.valueOf())):d++;else{var f=this._getUnitOrder(n),y=this.units[f-1];y&&!this._isWorkTime(r,y)&&(c=this._getClosestWorkTimeFuture(r,y))}r=c}return d},_getMinutesPerHour:function(t){var e=this._getTimeOfDayStamp(t),n=this._getTimeOfDayStamp(this._nextDate(t,"hour",1));n===0&&(n=86400);for(var i=this._getWorkHours(t),a=0;a=r.start&&n<=r.end)return 60;if(er.start)return(Math.min(n,r.end)-Math.max(e,r.start))/60}return 0},_getMinutesPerDay:function(t){var e=this._getWorkHours(t),n=0;return e.forEach(function(i){n+=i.durationMinutes}),n},getHoursPerDay:function(t){var e=this._getWorkHours(t),n=0;return e.forEach(function(i){n+=i.durationHours}),n},_getWorkUnitsForRange:function(t,e,n,i){var a,r=0,s=new Date(t),o=new Date(e);for(a=R(n=="minute"?this._getMinutesPerDay:this.getHoursPerDay,this);s.valueOf()27648e5&&s.getDate()===0){var l=this._largeUnitsCache.getMinutesPerMonth(s);n=="hour"&&(l/=60),r+=l,s=this.$gantt.date.add(s,1,"month")}else{if(o-s>13824e5){var d=this.$gantt.date.week_start(new Date(s));if(s.valueOf()===d.valueOf()){l=this._largeUnitsCache.getMinutesPerWeek(s),n=="hour"&&(l/=60),r+=l,s=this.$gantt.date.add(s,7,"day");continue}}r+=a(s),s=this._nextDate(s,"day",1)}return r/i},_getMinutesBetweenSingleDay:function(t,e){for(var n=this._getIntervalTimestamp(t,e),i=this._getWorkHours(t),a=0,r=0;r=s.start&&n.start<=s.end){var o=Math.max(s.start,n.start),l=Math.min(s.end,n.end);a+=(l-o)/60,n.start=l}}return Math.floor(a)},_getMinutesBetween:function(t,e,n,i){var a=new Date(t),r=new Date(e);i=i||1;var s=new Date(a),o=this.$gantt.date.add(this.$gantt.date.day_start(new Date(a)),1,"day");if(r.valueOf()<=o.valueOf())return this._getMinutesBetweenSingleDay(t,e);var l=this.$gantt.date.day_start(new Date(r)),d=r,c=this._getMinutesBetweenSingleDay(s,o),u=this._getMinutesBetweenSingleDay(l,d);return c+this._getWorkUnitsForRange(o,l,n,i)+u},_getHoursBetween:function(t,e,n,i){var a=new Date(t),r=new Date(e);i=i||1;var s=new Date(a),o=this.$gantt.date.add(this.$gantt.date.day_start(new Date(a)),1,"day");if(r.valueOf()<=o.valueOf())return Math.round(this._getMinutesBetweenSingleDay(t,e)/60);var l=this.$gantt.date.day_start(new Date(r)),d=r,c=this._getMinutesBetweenSingleDay(s,o,n,i)/60,u=this._getMinutesBetweenSingleDay(l,d,n,i)/60,h=c+this._getWorkUnitsForRange(o,l,n,i)+u;return Math.round(h)},getConfig:function(){return this._worktime},_setConfig:function(t){this._worktime=t,this._parseSettings(),this._clearCaches()},_parseSettings:function(){var t=this.getConfig();for(var e in t.parsed={dates:{},hours:null,haveCustomWeeks:!1,customWeeks:{},customWeeksRangeStart:null,customWeeksRangeEnd:null,customWeeksBoundaries:[]},t.parsed.hours=this._parseHours(t.hours),t.dates)t.parsed.dates[e]=this._parseHours(t.dates[e]);if(t.customWeeks){var n=null,i=null;for(var e in t.customWeeks){var a=t.customWeeks[e];if(a.from&&a.to){var r=a.from,s=a.to;(!n||n>r.valueOf())&&(n=r.valueOf()),(!i||ii){for(var a=0;ai){n=n.customWeeks[n.customWeeksBoundaries[a].name];break}}var r=!0;return n.dates[i]!==void 0?r=n.dates[i]:n.dates[t.getDay()]!==void 0&&(r=n.dates[t.getDay()]),r===!0?n.hours:r||[]},_getIntervalTimestamp:function(t,e){var n={start:0,end:0};n.start=60*t.getHours()*60+60*t.getMinutes()+t.getSeconds();var i=e.getHours();return!i&&!e.getMinutes()&&!e.getSeconds()&&t.valueOf()e.valueOf()){var s=e;e=t,t=s,r=-1}return a=n=="hour"&&i==1?this._getHoursBetween(t,e,n,i):n=="minute"&&i==1?this._getMinutesBetween(t,e,n,i):this._getWorkUnitsBetweenGeneric(t,e,n,i),r*Math.round(a)},hasDuration:function(){var t=this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper,arguments),e=t.start_date,n=t.end_date,i=t.unit,a=t.step;if(!i)return!1;var r=new Date(e),s=new Date(n);for(a=a||1;r.valueOf()=0?1:-1;n=Math.abs(1*n);var s=this;return this._dateDurationCache.getEndDate(e,n,i,a*r,function(){return s._calculateEndDate(e,n,i,a*r)})},_calculateEndDate:function(t,e,n,i){return!!n&&(i==1&&n=="minute"?this._calculateMinuteEndDate(t,e,i):i==-1&&n=="minute"?this._subtractMinuteDate(t,e,i):i==1&&n=="hour"?this._calculateHourEndDate(t,e,i):this._addInterval(t,e,n,i,null).end)},_addInterval:function(t,e,n,i,a){for(var r=0,s=t,o=!1;r0&&(d=new Date(l.valueOf()-1)),this._isWorkTime(d,n)&&!o&&r++,s=l}return{end:s,start:t,added:r}},_addHoursUntilDayEnd:function(t,e){for(var n=this.$gantt.date.add(this.$gantt.date.day_start(new Date(t)),1,"day"),i=0,a=e,r=this._getIntervalTimestamp(t,n),s=this._getWorkHours(t),o=0;o=l.start&&r.start<=l.end){var d=Math.max(l.start,r.start),c=Math.min(l.end,r.end),u=(c-d)/3600;u>a&&(u=a,c=d+60*a*60);var h=Math.round((c-d)/3600);i+=h,a-=h,r.start=c}}var g=n;return i===e&&(g=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,r.start)),{added:i,end:g}},_calculateHourEndDate:function(t,e,n){var i=new Date(t),a=0;n=n||1,e=Math.abs(1*e);var r=this._addHoursUntilDayEnd(i,e);if(a=r.added,i=r.end,d=e-a){for(var s=i;a0?this.getHoursPerDay(new Date(o.valueOf()-1)):this.getHoursPerDay(new Date(o.valueOf()+1)))>=e)break;a+=l,s=o}i=s}if(a=l.start&&r.start<=l.end){var d=Math.max(l.start,r.start),c=Math.min(l.end,r.end),u=(c-d)/60;u>a&&(u=a,c=d+60*a);var h=Math.round((c-d)/60);a-=h,i+=h,r.start=c}}var g=n;return i===e&&(g=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,r.start)),{added:i,end:g}},_subtractMinutesUntilHourStart:function(t,e){for(var n=this.$gantt.date.hour_start(new Date(t)),i=0,a=e,r=60*n.getHours()*60+60*n.getMinutes()+n.getSeconds(),s=60*t.getHours()*60+60*t.getMinutes()+t.getSeconds(),o=this._getWorkHours(t),l=o.length-1;l>=0&&id.start&&r<=d.end){var c=Math.min(s,d.end),u=Math.max(r,d.start),h=(c-u)/60;h>a&&(h=a,u=c-60*a);var g=Math.abs(Math.round((c-u)/60));a-=g,i+=g,s=u}}var f=n;return i===e&&(f=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,s)),{added:i,end:f}},_subtractMinuteDate:function(t,e,n){var i=new Date(t),a=0;n=n||-1,e=Math.abs(1*e),e=Math.round(e);const r=this._isMinutePrecision(i);let s=this._subtractMinutesUntilHourStart(i,e);a+=s.added,i=s.end;for(var o=0,l=[],d=0;ad)a+=d,i=this.$gantt.date.add(i,-1,"day");else{for(var y=!1,v=null,b=null,_=l.length-1;_>=0;_--)if(l[_].start=f-1){y=!0,v=l[_],b=l[_-1];break}if(y)if(f===v.end&&g>=v.durationMinutes)a+=v.durationMinutes,i=this.$gantt.date.add(i,-v.durationMinutes,"minute");else if(!r&&g<=f/60-v.startMinute)a+=g,i=this.$gantt.date.add(i,-g,"minute");else if(r)g<=f/60-v.startMinute?(a+=g,i=this.$gantt.date.add(i,-g,"minute")):(a+=f/60-v.startMinute,i=b?new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,b.end):this.$gantt.date.day_start(i));else{var m=this._getMinutesPerHour(i);m<=g?(a+=m,i=this._nextDate(i,"hour",n)):(s=this._subtractMinutesUntilHourStart(i,g),a+=s.added,i=s.end)}else if(i.getHours()===0&&i.getMinutes()===0&&i.getSeconds()===0){if((p=this._getClosestWorkTimePast(i,"hour")).valueOf()===i.valueOf()){var p=this.$gantt.date.add(i,-1,"day"),k=this._getWorkHours(p);if(k.length){var $=k[k.length-1];p.setSeconds($.durationSeconds)}}i=p}else i=this._getClosestWorkTimePast(new Date(i-1),"hour")}else i=this.$gantt.date.add(i,-1,"day")}if(a=h&&u>=l){if(a+=l,u==l){i=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,o[o.length-1].end);break}i=this.$gantt.date.add(i,1,"day"),i=this.$gantt.date.day_start(i)}else{for(var g=!1,f=null,y=0;yh){g=!0,f=o[y];break}if(g)if(h===f.start&&u>=f.durationMinutes)a+=f.durationMinutes,i=this.$gantt.date.add(i,f.durationMinutes,"minute");else if(u<=f.endMinute-h/60)a+=u,i=this.$gantt.date.add(i,u,"minute");else{var v=this._getMinutesPerHour(i);v<=u?(a+=v,i=d?this.$gantt.date.add(i,v,"minute"):this._nextDate(i,"hour",n)):(a+=(r=this._addMinutesUntilHourEnd(i,u)).added,i=r.end)}else i=this._getClosestWorkTimeFuture(i,"hour")}else i=this.$gantt.date.add(this.$gantt.date.day_start(i),1,"day")}if(a0){for(var o=0;o=s){a=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,n[o].start);break}}else for(o=n.length-1;o>=0;o--){if(n[o].end<=s){a=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,n[o].end);break}if(n[o].end>s&&n[o].start<=s){a=new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,0,s);break}}return a},_getClosestWorkMinute:function(t,e,n){var i=new Date(t),a=this._getWorkHours(i),r=this._findClosestTimeInDay(i,n,a);return r||(i=this.calculateEndDate(i,n,"day"),n>0?i=this.$gantt.date.day_start(i):(i=this.$gantt.date.day_start(i),i=this.$gantt.date.add(i,1,"day"),i=new Date(i.valueOf()-1)),a=this._getWorkHours(i),r=this._findClosestTimeInDay(i,n,a)),n<0&&(r=this.$gantt.date.add(r,-1,e)),r},_getClosestWorkTimeGeneric:function(t,e,n){if(e==="hour"||e==="minute")return this._getClosestWorkMinute(t,e,n);for(var i=this._getUnitOrder(e),a=this.units[i-1],r=t,s=0;!this._isWorkTime(r,e)&&(!a||this._isWorkTime(r,a)||(r=n>0?this._getClosestWorkTimeFuture(r,a):this._getClosestWorkTimePast(r,a),!this._isWorkTime(r,e)));){if(++s>3e3)return this.$gantt.assert(!1,"Invalid working time check"),!1;var o=r.getTimezoneOffset();r=this.$gantt.date.add(r,n,e),r=this.$gantt._correct_dst_change(r,o,n,e),this.$gantt.date[e+"_start"]&&(r=this.$gantt.date[e+"_start"](r))}return r},hasWorkTime:function(){var t=this.getConfig(),e=t.dates;for(var n in t.dates);var i=this._checkWorkHours(t.hours),a=!1;return[0,1,2,3,4,5,6].forEach((function(r){if(!a){var s=e[r];s===!0?a=i:Array.isArray(s)&&(a=this._checkWorkHours(s))}}).bind(this)),a},_checkWorkHours:function(t){if(t.length===0)return!1;for(var e=!1,n=0;ntask="+s+" of gantt.isUnscheduledTask. Task object was expected"),!!s.unscheduled||!s.start_date},t._isAllowedUnscheduledTask=function(s){return!(!s.unscheduled||!t.config.show_unscheduled)},t._isTaskInTimelineLimits=function(s){var o=s.start_date?s.start_date.valueOf():null,l=s.end_date?s.end_date.valueOf():null;return!!(o&&l&&o<=this._max_date.valueOf()&&l>=this._min_date.valueOf())},t.isTaskVisible=function(s){if(!this.isTaskExists(s))return!1;var o=this.getTask(s);return!(!this._isAllowedUnscheduledTask(o)&&!this._isTaskInTimelineLimits(o))&&this.getGlobalTaskIndex(s)>=0},t._getProjectEnd=function(){if(t.config.project_end)return t.config.project_end;var s=t.getTaskByTime();return(s=s.sort(function(o,l){return+o.end_date>+l.end_date?1:-1})).length?s[s.length-1].end_date:null},t._getProjectStart=function(){if(t.config.project_start)return t.config.project_start;if(t.config.start_date)return t.config.start_date;if(t.getState().min_date)return t.getState().min_date;var s=t.getTaskByTime();return(s=s.sort(function(o,l){return+o.start_date>+l.start_date?1:-1})).length?s[0].start_date:null};var e=function(s,o){var l=!!(o&&o!=t.config.root_id&&t.isTaskExists(o))&&t.getTask(o),d=null;if(l)if(t.config.schedule_from_end)d=t.calculateEndDate({start_date:l.end_date,duration:-t.config.duration_step,task:s});else{if(!l.start_date)return e(l,t.getParent(l));d=l.start_date}else if(t.config.schedule_from_end)d=t.calculateEndDate({start_date:t._getProjectEnd(),duration:-t.config.duration_step,task:s});else{const c=t.getTaskByIndex(0),u=t.config.start_date||t.getState().min_date;d=c?c.start_date?c.start_date:c.end_date?t.calculateEndDate({start_date:c.end_date,duration:-t.config.duration_step,task:s}):u:u}return t.assert(d,"Invalid dates"),new Date(d)};t._set_default_task_timing=function(s){s.start_date=s.start_date||e(s,t.getParent(s)),s.duration=s.duration||t.config.duration_step,s.end_date=s.end_date||t.calculateEndDate(s)},t.createTask=function(s,o,l){return s=s||{},t.defined(s.id)||(s.id=t.uid()),s.start_date||(s.start_date=e(s,o)),s.text===void 0&&(s.text=t.locale.labels.new_task),s.duration===void 0&&(s.duration=1),this.isTaskExists(o)&&(this.setParent(s,o,!0),this.getTask(o).$open=!0),this.callEvent("onTaskCreated",[s])?(this.config.details_on_create?(t.isTaskExists(s.id)?t.getTask(s.id).$index!=s.$index&&(s.start_date&&typeof s.start_date=="string"&&(s.start_date=this.date.parseDate(s.start_date,"parse_date")),s.end_date&&typeof s.end_date=="string"&&(s.end_date=this.date.parseDate(s.end_date,"parse_date")),this.$data.tasksStore.updateItem(s.id,s)):(s.$new=!0,this.silent(function(){t.$data.tasksStore.addItem(s,l)})),this.selectTask(s.id),this.refreshData(),this.showLightbox(s.id)):this.addTask(s,o,l)&&(this.showTask(s.id),this.selectTask(s.id)),s.id):null},t._update_flags=function(s,o){var l=t.$data.tasksStore;s===void 0?(this._lightbox_id=null,l.silent(function(){l.unselect()}),this.getSelectedTasks&&this._multiselect.reset(),this._tasks_dnd&&this._tasks_dnd.drag&&(this._tasks_dnd.drag.id=null)):(this._lightbox_id==s&&(this._lightbox_id=o),l.getSelectedId()==s&&l.silent(function(){l.unselect(s),l.select(o)}),this._tasks_dnd&&this._tasks_dnd.drag&&this._tasks_dnd.drag.id==s&&(this._tasks_dnd.drag.id=o))};var n=function(s,o){var l=t.getTaskType(s.type),d={type:l,$no_start:!1,$no_end:!1,scheduled_summary:!1};return l===t.config.types.project&&s.auto_scheduling===!1&&(d.scheduled_summary=!0),o||l!=s.$rendered_type?(l==t.config.types.project?d.$no_end=d.$no_start=!0:l!=t.config.types.milestone&&(d.$no_end=!(s.end_date||s.duration),d.$no_start=!s.start_date,t._isAllowedUnscheduledTask(s)&&(d.$no_end=d.$no_start=!1)),d):(d.$no_start=s.$no_start,d.$no_end=s.$no_end,d)};function i(s){s.$effective_calendar=t.getTaskCalendar(s).id,s.start_date=t.getClosestWorkTime({dir:"future",date:s.start_date,unit:t.config.duration_unit,task:s}),s.end_date=t.calculateEndDate(s)}function a(s,o,l,d){const c={start:"start_date",end:"end_date"},u={start:"$auto_start_date",end:"$auto_end_date"};let h;h=s.type===t.config.types.project&&s.auto_scheduling===!1?u:c,o.$no_start&&(s[h.start]=l?new Date(l):e(s,this.getParent(s))),o.$no_end&&(s[h.end]=d?new Date(d):this.calculateEndDate({start_date:s[h.start],duration:this.config.duration_step,task:s})),(o.$no_start||o.$no_end)&&this._init_task_timing(s)}function r(s){var o=null,l=null,d=s!==void 0?s:t.config.root_id,c=[];return t.eachTask(function(u){const h=t.getTaskType(u.type)==t.config.types.project&&u.auto_scheduling===!1;t.getTaskType(u.type)==t.config.types.project&&!h||t.isUnscheduledTask(u)||(u.rollup&&c.push(u.id),!u.start_date||u.$no_start&&!h||o&&!(o>u.start_date.valueOf())||(o=u.start_date.valueOf()),!u.end_date||u.$no_end&&!h||l&&!(ltask="+s+" of gantt.isSummaryTask. Task object was expected");var o=n(s);return!(!o.$no_end&&!o.$no_start)},t.resetProjectDates=function(s){var o=n(s);if(o.$no_end||o.$no_start){var l=r(s.id);a.call(this,s,o,l.start_date,l.end_date),s.$rollup=l.rollup}},t.getSubtaskDuration=function(s){var o=0,l=s!==void 0?s:t.config.root_id;return this.eachTask(function(d){this.getTaskType(d.type)==t.config.types.project||this.isUnscheduledTask(d)||(o+=d.duration)},l),o},t.getSubtaskDates=function(s){var o=r(s);return{start_date:o.start_date,end_date:o.end_date}},t._update_parents=function(s,o,l){if(s){var d=this.getTask(s);d.rollup&&(l=!0);var c=this.getParent(d),u=n(d),h=!0;if(l||d.start_date&&d.end_date&&(u.$no_start||u.$no_end)){const y=d.$auto_start_date?"$auto_start_date":"start_date",v=d.$auto_end_date?"$auto_end_date":"end_date";var g=d[y].valueOf(),f=d[v].valueOf();t.resetProjectDates(d),l||g!=d[y].valueOf()||f!=d[v].valueOf()||(h=!1),h&&!o&&this.refreshTask(d.id,!0),u.scheduled_summary&&(h=!0)}h&&c&&this.isTaskExists(c)&&this._update_parents(c,o,l)}},t.roundDate=function(s){var o=t.getScale();X(s)&&(s={date:s,unit:o?o.unit:t.config.duration_unit,step:o?o.step:t.config.duration_step});var l,d,c,u=s.date,h=s.step,g=s.unit;if(!o)return u;if(g==o.unit&&h==o.step&&+u>=+o.min_date&&+u<=+o.max_date)c=Math.floor(t.columnIndexByDate(u)),o.trace_x[c]||(c-=1,o.rtl&&(c=0)),d=new Date(o.trace_x[c]),l=t.date.add(d,h,g);else{for(c=Math.floor(t.columnIndexByDate(u)),l=t.date[g+"_start"](new Date(o.min_date)),o.trace_x[c]&&(l=t.date[g+"_start"](o.trace_x[c]));+l<+u;){var f=(l=t.date[g+"_start"](t.date.add(l,h,g))).getTimezoneOffset();l=t._correct_dst_change(l,f,l,g),t.date[g+"_start"]&&(l=t.date[g+"_start"](l))}d=t.date.add(l,-1*h,g)}return s.dir&&s.dir=="future"?l:s.dir&&s.dir=="past"||Math.abs(u-d)3600&&d<86400){var c=r.getTimezoneOffset()-s;c&&(r=t.date.add(r,c,"minute"))}return r},t.isSplitTask=function(r){return t.assert(r&&r instanceof Object,"Invalid argument task="+r+" of gantt.isSplitTask. Task object was expected"),this.$data.tasksStore._isSplitItem(r)},t._is_icon_open_click=function(r){if(!r)return!1;var s=r.target||r.srcElement;if(!s||!s.className)return!1;var o=K(s);return o.indexOf("gantt_tree_icon")!==-1&&(o.indexOf("gantt_close")!==-1||o.indexOf("gantt_open")!==-1)}}const Si={date:{month_full:["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],month_short:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],day_full:["الأحد","الأثنين","ألثلاثاء","الأربعاء","ألحميس","ألجمعة","السبت"],day_short:["احد","اثنين","ثلاثاء","اربعاء","خميس","جمعة","سبت"]},labels:{new_task:"مهمة جديد",icon_save:"اخزن",icon_cancel:"الغاء",icon_details:"تفاصيل",icon_edit:"تحرير",icon_delete:"حذف",confirm_closing:"التغييرات سوف تضيع, هل انت متأكد؟",confirm_deleting:"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟",section_description:"الوصف",section_time:"الفترة الزمنية",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"الغاء",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Ti={date:{month_full:["Студзень","Люты","Сакавік","Красавік","Maй","Чэрвень","Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Снежань"],month_short:["Студз","Лют","Сак","Крас","Maй","Чэр","Ліп","Жнів","Вер","Каст","Ліст","Снеж"],day_full:["Нядзеля","Панядзелак","Аўторак","Серада","Чацвер","Пятніца","Субота"],day_short:["Нд","Пн","Аўт","Ср","Чцв","Пт","Сб"]},labels:{new_task:"Новае заданне",icon_save:"Захаваць",icon_cancel:"Адмяніць",icon_details:"Дэталі",icon_edit:"Змяніць",icon_delete:"Выдаліць",confirm_closing:"",confirm_deleting:"Падзея будзе выдалена незваротна, працягнуць?",section_description:"Апісанне",section_time:"Перыяд часу",section_type:"Тып",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"ІСР",column_text:"Задача",column_start_date:"Пачатак",column_duration:"Працяг",column_add:"",link:"Сувязь",confirm_link_deleting:"будзе выдалена",link_start:"(пачатак)",link_end:"(канец)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Хвiлiна",hours:"Гадзiна",days:"Дзень",weeks:"Тыдзень",months:"Месяц",years:"Год",message_ok:"OK",message_cancel:"Адмяніць",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Ci={date:{month_full:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],month_short:["Gen","Feb","Mar","Abr","Mai","Jun","Jul","Ago","Set","Oct","Nov","Des"],day_full:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"],day_short:["Dg","Dl","Dm","Dc","Dj","Dv","Ds"]},labels:{new_task:"Nova tasca",icon_save:"Guardar",icon_cancel:"Cancel·lar",icon_details:"Detalls",icon_edit:"Editar",icon_delete:"Esborrar",confirm_closing:"",confirm_deleting:"L'esdeveniment s'esborrarà definitivament, continuar ?",section_description:"Descripció",section_time:"Periode de temps",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Cancel·lar",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Ei={date:{month_full:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],month_short:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],day_full:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],day_short:["日","一","二","三","四","五","六"]},labels:{new_task:"新任務",icon_save:"保存",icon_cancel:"关闭",icon_details:"详细",icon_edit:"编辑",icon_delete:"删除",confirm_closing:"请确认是否撤销修改!",confirm_deleting:"是否删除日程?",section_description:"描述",section_time:"时间范围",section_type:"类型",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"工作分解结构",column_text:"任务名",column_start_date:"开始时间",column_duration:"持续时间",column_add:"",link:"关联",confirm_link_deleting:"将被删除",link_start:" (开始)",link_end:" (结束)",type_task:"任务",type_project:"项目",type_milestone:"里程碑",minutes:"分钟",hours:"小时",days:"天",weeks:"周",months:"月",years:"年",message_ok:"OK",message_cancel:"关闭",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Di={date:{month_full:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],month_short:["Led","Ún","Bře","Dub","Kvě","Čer","Čec","Srp","Září","Říj","List","Pro"],day_full:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota"],day_short:["Ne","Po","Út","St","Čt","Pá","So"]},labels:{new_task:"Nová práce",icon_save:"Uložit",icon_cancel:"Zpět",icon_details:"Detail",icon_edit:"Edituj",icon_delete:"Smazat",confirm_closing:"",confirm_deleting:"Událost bude trvale smazána, opravdu?",section_description:"Poznámky",section_time:"Doba platnosti",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Zpět",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Ai={date:{month_full:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],month_short:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],day_full:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],day_short:["Søn","Man","Tir","Ons","Tor","Fre","Lør"]},labels:{new_task:"Ny opgave",icon_save:"Gem",icon_cancel:"Fortryd",icon_details:"Detaljer",icon_edit:"Tilret",icon_delete:"Slet",confirm_closing:"Dine rettelser vil gå tabt.. Er dy sikker?",confirm_deleting:"Bigivenheden vil blive slettet permanent. Er du sikker?",section_description:"Beskrivelse",section_time:"Tidsperiode",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Fortryd",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Ii={date:{month_full:[" Januar"," Februar"," März "," April"," Mai"," Juni"," Juli"," August"," September "," Oktober"," November "," Dezember"],month_short:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],day_full:["Sonntag","Montag","Dienstag"," Mittwoch"," Donnerstag","Freitag","Samstag"],day_short:["So","Mo","Di","Mi","Do","Fr","Sa"]},labels:{new_task:"Neue Aufgabe",icon_save:"Speichern",icon_cancel:"Abbrechen",icon_details:"Details",icon_edit:"Ändern",icon_delete:"Löschen",confirm_closing:"",confirm_deleting:"Der Eintrag wird gelöscht",section_description:"Beschreibung",section_time:"Zeitspanne",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"PSP",column_text:"Task-Namen",column_start_date:"Startzeit",column_duration:"Dauer",column_add:"",link:"Link",confirm_link_deleting:"werden gelöscht",link_start:"(starten)",link_end:"(ende)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minuten",hours:"Stunden",days:"Tage",weeks:"Wochen",months:"Monate",years:"Jahre",message_ok:"OK",message_cancel:"Abbrechen",section_constraint:"Regel",constraint_type:"Regel",constraint_date:"Regel - Datum",asap:"So bald wie möglich",alap:"So spät wie möglich",snet:"Beginn nicht vor",snlt:"Beginn nicht später als",fnet:"Fertigstellung nicht vor",fnlt:"Fertigstellung nicht später als",mso:"Muss beginnen am",mfo:"Muss fertig sein am",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Mi={date:{month_full:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάϊος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],month_short:["ΙΑΝ","ΦΕΒ","ΜΑΡ","ΑΠΡ","ΜΑΙ","ΙΟΥΝ","ΙΟΥΛ","ΑΥΓ","ΣΕΠ","ΟΚΤ","ΝΟΕ","ΔΕΚ"],day_full:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Κυριακή"],day_short:["ΚΥ","ΔΕ","ΤΡ","ΤΕ","ΠΕ","ΠΑ","ΣΑ"]},labels:{new_task:"Νέα εργασία",icon_save:"Αποθήκευση",icon_cancel:"Άκυρο",icon_details:"Λεπτομέρειες",icon_edit:"Επεξεργασία",icon_delete:"Διαγραφή",confirm_closing:"",confirm_deleting:"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;",section_description:"Περιγραφή",section_time:"Χρονική περίοδος",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Άκυρο",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Ni={date:{month_full:["January","February","March","April","May","June","July","August","September","October","November","December"],month_short:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],day_full:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],day_short:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},labels:{new_task:"New task",icon_save:"Save",icon_cancel:"Cancel",icon_details:"Details",icon_edit:"Edit",icon_delete:"Delete",confirm_closing:"",confirm_deleting:"Task will be deleted permanently, are you sure?",section_description:"Description",section_time:"Time period",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Cancel",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Li={date:{month_full:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],month_short:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],day_full:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],day_short:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]},labels:{new_task:"Nueva tarea",icon_save:"Guardar",icon_cancel:"Cancelar",icon_details:"Detalles",icon_edit:"Editar",icon_delete:"Eliminar",confirm_closing:"",confirm_deleting:"El evento se borrará definitivamente, ¿continuar?",section_description:"Descripción",section_time:"Período",section_type:"Tipo",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"EDT",column_text:"Tarea",column_start_date:"Inicio",column_duration:"Duración",column_add:"",link:"Enlace",confirm_link_deleting:"será borrada",link_start:" (inicio)",link_end:" (fin)",type_task:"Tarea",type_project:"Proyecto",type_milestone:"Hito",minutes:"Minutos",hours:"Horas",days:"Días",weeks:"Semanas",months:"Meses",years:"Años",message_ok:"OK",message_cancel:"Cancelar",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Pi={date:{month_full:["ژانویه","فوریه","مارس","آوریل","مه","ژوئن","ژوئیه","اوت","سپتامبر","اکتبر","نوامبر","دسامبر"],month_short:["1","2","3","4","5","6","7","8","9","10","11","12"],day_full:["يکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],day_short:["ی","د","س","چ","پ","ج","ش"]},labels:{new_task:"وظیفه جدید",icon_save:"ذخیره",icon_cancel:"لغو",icon_details:"جزییات",icon_edit:"ویرایش",icon_delete:"حذف",confirm_closing:"تغییرات شما ازدست خواهد رفت، آیا مطمئن هستید؟",confirm_deleting:"این مورد برای همیشه حذف خواهد شد، آیا مطمئن هستید؟",section_description:"توضیحات",section_time:"مدت زمان",section_type:"نوع",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"عنوان",column_start_date:"زمان شروع",column_duration:"مدت",column_add:"",link:"ارتباط",confirm_link_deleting:"حذف خواهد شد",link_start:" (آغاز)",link_end:" (پایان)",type_task:"وظیفه",type_project:"پروژه",type_milestone:"نگارش",minutes:"دقایق",hours:"ساعات",days:"روزها",weeks:"هفته",months:"ماه‌ها",years:"سال‌ها",message_ok:"تایید",message_cancel:"لغو",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Ri={date:{month_full:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],month_short:["Tam","Hel","Maa","Huh","Tou","Kes","Hei","Elo","Syy","Lok","Mar","Jou"],day_full:["Sunnuntai","Maanantai","Tiistai","Keskiviikko","Torstai","Perjantai","Lauantai"],day_short:["Su","Ma","Ti","Ke","To","Pe","La"]},labels:{new_task:"Uusi tehtävä",icon_save:"Tallenna",icon_cancel:"Peru",icon_details:"Tiedot",icon_edit:"Muokkaa",icon_delete:"Poista",confirm_closing:"",confirm_deleting:"Haluatko varmasti poistaa tapahtuman?",section_description:"Kuvaus",section_time:"Aikajakso",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Peru",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Hi={date:{month_full:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],month_short:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Aoû","Sep","Oct","Nov","Déc"],day_full:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],day_short:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},labels:{new_task:"Nouvelle tâche",icon_save:"Enregistrer",icon_cancel:"Annuler",icon_details:"Détails",icon_edit:"Modifier",icon_delete:"Effacer",confirm_closing:"",confirm_deleting:"L'événement sera effacé sans appel, êtes-vous sûr ?",section_description:"Description",section_time:"Période",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"OTP",column_text:"Nom de la tâche",column_start_date:"Date initiale",column_duration:"Durée",column_add:"",link:"Le lien",confirm_link_deleting:"sera supprimé",link_start:"(début)",link_end:"(fin)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Heures",days:"Jours",weeks:"Semaines",months:"Mois",years:"Années",message_ok:"OK",message_cancel:"Annuler",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Oi={date:{month_full:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],month_short:["ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ"],day_full:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת"],day_short:["א","ב","ג","ד","ה","ו","ש"]},labels:{new_task:"משימה חדש",icon_save:"שמור",icon_cancel:"בטל",icon_details:"פרטים",icon_edit:"ערוך",icon_delete:"מחק",confirm_closing:"",confirm_deleting:"ארוע ימחק סופית.להמשיך?",section_description:"הסבר",section_time:"תקופה",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"בטל",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Bi={date:{month_full:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],month_short:["Sij","Velj","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro"],day_full:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"],day_short:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"]},labels:{new_task:"Novi Zadatak",icon_save:"Spremi",icon_cancel:"Odustani",icon_details:"Detalji",icon_edit:"Izmjeni",icon_delete:"Obriši",confirm_closing:"",confirm_deleting:"Zadatak će biti trajno izbrisan, jeste li sigurni?",section_description:"Opis",section_time:"Vremenski Period",section_type:"Tip",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Naziv Zadatka",column_start_date:"Početno Vrijeme",column_duration:"Trajanje",column_add:"",link:"Poveznica",confirm_link_deleting:"će biti izbrisan",link_start:" (početak)",link_end:" (kraj)",type_task:"Zadatak",type_project:"Projekt",type_milestone:"Milestone",minutes:"Minute",hours:"Sati",days:"Dani",weeks:"Tjedni",months:"Mjeseci",years:"Godine",message_ok:"OK",message_cancel:"Odustani",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},zi={date:{month_full:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],month_short:["Jan","Feb","Már","Ápr","Máj","Jún","Júl","Aug","Sep","Okt","Nov","Dec"],day_full:["Vasárnap","Hétfõ","Kedd","Szerda","Csütörtök","Péntek","szombat"],day_short:["Va","Hé","Ke","Sze","Csü","Pé","Szo"]},labels:{new_task:"Új feladat",icon_save:"Mentés",icon_cancel:"Mégse",icon_details:"Részletek",icon_edit:"Szerkesztés",icon_delete:"Törlés",confirm_closing:"",confirm_deleting:"Az esemény törölve lesz, biztosan folytatja?",section_description:"Leírás",section_time:"Idõszak",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Mégse",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Wi={date:{month_full:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],month_short:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],day_full:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],day_short:["Ming","Sen","Sel","Rab","Kam","Jum","Sab"]},labels:{new_task:"Tugas baru",icon_save:"Simpan",icon_cancel:"Batal",icon_details:"Detail",icon_edit:"Edit",icon_delete:"Hapus",confirm_closing:"",confirm_deleting:"Acara akan dihapus",section_description:"Keterangan",section_time:"Periode",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Batal",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},ji={date:{month_full:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],month_short:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],day_full:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"],day_short:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},labels:{new_task:"Nuovo compito",icon_save:"Salva",icon_cancel:"Chiudi",icon_details:"Dettagli",icon_edit:"Modifica",icon_delete:"Elimina",confirm_closing:"",confirm_deleting:"Sei sicuro di confermare l'eliminazione?",section_description:"Descrizione",section_time:"Periodo di tempo",section_type:"Tipo",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Nome Attività",column_start_date:"Inizio",column_duration:"Durata",column_add:"",link:"Link",confirm_link_deleting:"sarà eliminato",link_start:" (inizio)",link_end:" (fine)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minuti",hours:"Ore",days:"Giorni",weeks:"Settimane",months:"Mesi",years:"Anni",message_ok:"OK",message_cancel:"Chiudi",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Fi={date:{month_full:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],month_short:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],day_full:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],day_short:["日","月","火","水","木","金","土"]},labels:{new_task:"新しい仕事",icon_save:"保存",icon_cancel:"キャンセル",icon_details:"詳細",icon_edit:"編集",icon_delete:"削除",confirm_closing:"",confirm_deleting:"イベント完全に削除されます、宜しいですか?",section_description:"デスクリプション",section_time:"期間",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"キャンセル",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Vi={date:{month_full:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],month_short:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],day_full:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],day_short:["일","월","화","수","목","금","토"]},labels:{new_task:"이름없는 작업",icon_save:"저장",icon_cancel:"취소",icon_details:"세부 사항",icon_edit:"수정",icon_delete:"삭제",confirm_closing:"",confirm_deleting:"작업을 삭제하시겠습니까?",section_description:"설명",section_time:"기간",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"작업명",column_start_date:"시작일",column_duration:"기간",column_add:"",link:"전제",confirm_link_deleting:"삭제 하시겠습니까?",link_start:" (start)",link_end:" (end)",type_task:"작업",type_project:"프로젝트",type_milestone:"마일스톤",minutes:"분",hours:"시간",days:"일",weeks:"주",months:"달",years:"년",message_ok:"OK",message_cancel:"취소",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}};class Ui{constructor(e){this.addLocale=(n,i)=>{this._locales[n]=i},this.getLocale=n=>this._locales[n],this._locales={};for(const n in e)this._locales[n]=e[n]}}const qi={date:{month_full:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],month_short:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],day_full:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],day_short:["Søn","Mon","Tir","Ons","Tor","Fre","Lør"]},labels:{new_task:"Ny oppgave",icon_save:"Lagre",icon_cancel:"Avbryt",icon_details:"Detaljer",icon_edit:"Rediger",icon_delete:"Slett",confirm_closing:"",confirm_deleting:"Hendelsen vil bli slettet permanent. Er du sikker?",section_description:"Beskrivelse",section_time:"Tidsperiode",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Avbryt",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Gi={date:{month_full:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],month_short:["Jan","Feb","mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],day_full:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag"],day_short:["Zo","Ma","Di","Wo","Do","Vr","Za"]},labels:{new_task:"Nieuwe taak",icon_save:"Opslaan",icon_cancel:"Annuleren",icon_details:"Details",icon_edit:"Bewerken",icon_delete:"Verwijderen",confirm_closing:"",confirm_deleting:"Item zal permanent worden verwijderd, doorgaan?",section_description:"Beschrijving",section_time:"Tijd periode",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Taak omschrijving",column_start_date:"Startdatum",column_duration:"Duur",column_add:"",link:"Koppeling",confirm_link_deleting:"zal worden verwijderd",link_start:" (start)",link_end:" (eind)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"minuten",hours:"uren",days:"dagen",weeks:"weken",months:"maanden",years:"jaren",message_ok:"OK",message_cancel:"Annuleren",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Yi={date:{month_full:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],month_short:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],day_full:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],day_short:["Søn","Man","Tir","Ons","Tor","Fre","Lør"]},labels:{new_task:"Ny oppgave",icon_save:"Lagre",icon_cancel:"Avbryt",icon_details:"Detaljer",icon_edit:"Endre",icon_delete:"Slett",confirm_closing:"Endringer blir ikke lagret, er du sikker?",confirm_deleting:"Oppføringen vil bli slettet, er du sikker?",section_description:"Beskrivelse",section_time:"Tidsperiode",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Avbryt",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Ji={date:{month_full:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],month_short:["Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"],day_full:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota"],day_short:["Nie","Pon","Wto","Śro","Czw","Pią","Sob"]},labels:{new_task:"Nowe zadanie",icon_save:"Zapisz",icon_cancel:"Anuluj",icon_details:"Szczegóły",icon_edit:"Edytuj",icon_delete:"Usuń",confirm_closing:"",confirm_deleting:"Zdarzenie zostanie usunięte na zawsze, kontynuować?",section_description:"Opis",section_time:"Okres czasu",section_type:"Typ",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Nazwa zadania",column_start_date:"Początek",column_duration:"Czas trwania",column_add:"",link:"Link",confirm_link_deleting:"zostanie usunięty",link_start:" (początek)",link_end:" (koniec)",type_task:"Zadanie",type_project:"Projekt",type_milestone:"Milestone",minutes:"Minuty",hours:"Godziny",days:"Dni",weeks:"Tydzień",months:"Miesiące",years:"Lata",message_ok:"OK",message_cancel:"Anuluj",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Ki={date:{month_full:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],month_short:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],day_full:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],day_short:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},labels:{new_task:"Nova tarefa",icon_save:"Salvar",icon_cancel:"Cancelar",icon_details:"Detalhes",icon_edit:"Editar",icon_delete:"Excluir",confirm_closing:"",confirm_deleting:"As tarefas serão excluidas permanentemente, confirme?",section_description:"Descrição",section_time:"Período",section_type:"Tipo",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"EAP",column_text:"Nome tarefa",column_start_date:"Data início",column_duration:"Duração",column_add:"",link:"Link",confirm_link_deleting:"Será excluído!",link_start:" (início)",link_end:" (fim)",type_task:"Task",type_project:"Projeto",type_milestone:"Marco",minutes:"Minutos",hours:"Horas",days:"Dias",weeks:"Semanas",months:"Meses",years:"Anos",message_ok:"OK",message_cancel:"Cancelar",section_constraint:"Restrição",constraint_type:"Tipo Restrição",constraint_date:"Data restrição",asap:"Mais breve possível",alap:"Mais tarde possível",snet:"Não começar antes de",snlt:"Não começar depois de",fnet:"Não terminar antes de",fnlt:"Não terminar depois de",mso:"Precisa começar em",mfo:"Precisa terminar em",resources_filter_placeholder:"Tipo de filtros",resources_filter_label:"Ocultar vazios",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Xi={date:{month_full:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","November","December"],month_short:["Ian","Feb","Mar","Apr","Mai","Iun","Iul","Aug","Sep","Oct","Nov","Dec"],day_full:["Duminica","Luni","Marti","Miercuri","Joi","Vineri","Sambata"],day_short:["Du","Lu","Ma","Mi","Jo","Vi","Sa"]},labels:{new_task:"Sarcina noua",icon_save:"Salveaza",icon_cancel:"Anuleaza",icon_details:"Detalii",icon_edit:"Editeaza",icon_delete:"Sterge",confirm_closing:"Schimbarile nu vor fi salvate, esti sigur?",confirm_deleting:"Evenimentul va fi sters permanent, esti sigur?",section_description:"Descriere",section_time:"Interval",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Anuleaza",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Zi={date:{month_full:["Январь","Февраль","Март","Апрель","Maй","Июнь","Июль","Август","Сентябрь","Oктябрь","Ноябрь","Декабрь"],month_short:["Янв","Фев","Maр","Aпр","Maй","Июн","Июл","Aвг","Сен","Окт","Ноя","Дек"],day_full:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],day_short:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]},labels:{new_task:"Новое задание",icon_save:"Сохранить",icon_cancel:"Отменить",icon_details:"Детали",icon_edit:"Изменить",icon_delete:"Удалить",confirm_closing:"",confirm_deleting:"Событие будет удалено безвозвратно, продолжить?",section_description:"Описание",section_time:"Период времени",section_type:"Тип",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"ИСР",column_text:"Задача",column_start_date:"Начало",column_duration:"Длительность",column_add:"",link:"Связь",confirm_link_deleting:"будет удалена",link_start:" (начало)",link_end:" (конец)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Минута",hours:"Час",days:"День",weeks:"Неделя",months:"Месяц",years:"Год",message_ok:"OK",message_cancel:"Отменить",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"начните вводить слово для фильтрации",resources_filter_label:"спрятать не установленные",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},Qi={date:{month_full:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],month_short:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],day_full:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"],day_short:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"]},labels:{new_task:"Nova naloga",icon_save:"Shrani",icon_cancel:"Prekliči",icon_details:"Podrobnosti",icon_edit:"Uredi",icon_delete:"Izbriši",confirm_closing:"",confirm_deleting:"Dogodek bo izbrisan. Želite nadaljevati?",section_description:"Opis",section_time:"Časovni okvir",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Prekliči",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},ta={date:{month_full:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"],month_short:["Jan","Feb","Mar","Apr","Máj","Jún","Júl","Aug","Sept","Okt","Nov","Dec"],day_full:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"],day_short:["Ne","Po","Ut","St","Št","Pi","So"]},labels:{new_task:"Nová úloha",icon_save:"Uložiť",icon_cancel:"Späť",icon_details:"Detail",icon_edit:"Edituj",icon_delete:"Zmazať",confirm_closing:"Vaše zmeny nebudú uložené. Skutočne?",confirm_deleting:"Udalosť bude natrvalo vymazaná. Skutočne?",section_description:"Poznámky",section_time:"Doba platnosti",section_type:"Type",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Späť",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},ea={date:{month_full:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],month_short:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],day_full:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],day_short:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},labels:{new_task:"Ny uppgift",icon_save:"Spara",icon_cancel:"Avbryt",icon_details:"Detajer",icon_edit:"Ändra",icon_delete:"Ta bort",confirm_closing:"",confirm_deleting:"Är du säker på att du vill ta bort händelsen permanent?",section_description:"Beskrivning",section_time:"Tid",section_type:"Typ",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Uppgiftsnamn",column_start_date:"Starttid",column_duration:"Varaktighet",column_add:"",link:"Länk",confirm_link_deleting:"kommer tas bort",link_start:" (start)",link_end:" (slut)",type_task:"Uppgift",type_project:"Projekt",type_milestone:"Milstolpe",minutes:"Minuter",hours:"Timmar",days:"Dagar",weeks:"Veckor",months:"Månader",years:"År",message_ok:"OK",message_cancel:"Avbryt",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},na={date:{month_full:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],month_short:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],day_full:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],day_short:["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"]},labels:{new_task:"Yeni görev",icon_save:"Kaydet",icon_cancel:"İptal",icon_details:"Detaylar",icon_edit:"Düzenle",icon_delete:"Sil",confirm_closing:"",confirm_deleting:"Görev silinecek, emin misiniz?",section_description:"Açıklama",section_time:"Zaman Aralığı",section_type:"Tip",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Görev Adı",column_start_date:"Başlangıç",column_duration:"Süre",column_add:"",link:"Bağlantı",confirm_link_deleting:"silinecek",link_start:" (başlangıç)",link_end:" (bitiş)",type_task:"Görev",type_project:"Proje",type_milestone:"Kilometretaşı",minutes:"Dakika",hours:"Saat",days:"Gün",weeks:"Hafta",months:"Ay",years:"Yıl",message_ok:"OK",message_cancel:"Ýptal",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}},ia={date:{month_full:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],month_short:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],day_full:["Неділя","Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота"],day_short:["Нед","Пон","Вів","Сер","Чет","Птн","Суб"]},labels:{new_task:"Нове завдання",icon_save:"Зберегти",icon_cancel:"Відміна",icon_details:"Деталі",icon_edit:"Редагувати",icon_delete:"Вилучити",confirm_closing:"",confirm_deleting:"Подія вилучиться назавжди. Ви впевнені?",section_description:"Опис",section_time:"Часовий проміжок",section_type:"Тип",section_deadline:"Deadline",section_baselines:"Baselines",column_wbs:"WBS",column_text:"Task name",column_start_date:"Start time",column_duration:"Duration",column_add:"",link:"Link",confirm_link_deleting:"will be deleted",link_start:" (start)",link_end:" (end)",type_task:"Task",type_project:"Project",type_milestone:"Milestone",minutes:"Minutes",hours:"Hours",days:"Days",weeks:"Week",months:"Months",years:"Years",message_ok:"OK",message_cancel:"Відміна",section_constraint:"Constraint",constraint_type:"Constraint type",constraint_date:"Constraint date",asap:"As Soon As Possible",alap:"As Late As Possible",snet:"Start No Earlier Than",snlt:"Start No Later Than",fnet:"Finish No Earlier Than",fnlt:"Finish No Later Than",mso:"Must Start On",mfo:"Must Finish On",resources_filter_placeholder:"type to filter",resources_filter_label:"hide empty",empty_state_text_link:"Click here",empty_state_text_description:"to create your first task",baselines_section_placeholder:"Start adding a new baseline",baselines_add_button:"Add Baseline",baselines_remove_button:"Remove",baselines_remove_all_button:"Remove All",deadline_enable_button:"Set",deadline_disable_button:"Remove"}};function aa(){this.constants=Fn,this.version="9.0.0",this.license="gpl",this.templates={},this.ext={},this.keys={edit_save:this.constants.KEY_CODES.ENTER,edit_cancel:this.constants.KEY_CODES.ESC}}function ra(t){var e=new aa,n=new Vn(t),i={};e.plugins=function(l){for(var d in l)if(l[d]&&!i[d]){var c=n.getExtension(d);c&&(c(e),i[d]=!0)}return i},e.$services=function(){var l={};return{services:{},setService:function(d,c){l[d]=c},getService:function(d){return l[d]?l[d]():null},dropService:function(d){l[d]&&delete l[d]},destructor:function(){for(var d in l)if(l[d]){var c=l[d];c&&c.destructor&&c.destructor()}l=null}}}(),e.config=Un(),e.ajax=function(l){return{cache:!0,method:"get",parse:function(d){return typeof d!="string"?d:(d=d.replace(/^[\s]+/,""),typeof DOMParser>"u"||_t.isIE?dt.ActiveXObject!==void 0&&((c=new dt.ActiveXObject("Microsoft.XMLDOM")).async="false",c.loadXML(d)):c=new DOMParser().parseFromString(d,"text/xml"),c);var c},xmltop:function(d,c,u){if(c.status===void 0||c.status<400){var h=c.responseXML?c.responseXML||c:this.parse(c.responseText||c);if(h&&h.documentElement!==null&&!h.getElementsByTagName("parsererror").length)return h.getElementsByTagName(d)[0]}return u!==-1&&l.callEvent("onLoadXMLError",["Incorrect XML",arguments[1],u]),document.createElement("DIV")},xpath:function(d,c){if(c.nodeName||(c=c.responseXML||c),_t.isIE)return c.selectNodes(d)||[];for(var u,h=[],g=(c.ownerDocument||c).evaluate(d,c,null,XPathResult.ANY_TYPE,null);u=g.iterateNext();)h.push(u);return h},query:function(d){return this._call(d.method||"GET",d.url,d.data||"",d.async||!0,d.callback,d.headers)},get:function(d,c,u){var h=$t("GET",arguments);return this.query(h)},getSync:function(d,c){var u=$t("GET",arguments);return u.async=!1,this.query(u)},put:function(d,c,u,h){var g=$t("PUT",arguments);return this.query(g)},del:function(d,c,u){var h=$t("DELETE",arguments);return this.query(h)},post:function(d,c,u,h){arguments.length==1?c="":arguments.length==2&&typeof c=="function"&&(u=c,c="");var g=$t("POST",arguments);return this.query(g)},postSync:function(d,c,u){c=c===null?"":String(c);var h=$t("POST",arguments);return h.async=!1,this.query(h)},_call:function(d,c,u,h,g,f){return new l.Promise(function(y,v){var b=typeof XMLHttpRequest!==void 0?new XMLHttpRequest:new dt.ActiveXObject("Microsoft.XMLHTTP"),_=navigator.userAgent.match(/AppleWebKit/)!==null&&navigator.userAgent.match(/Qt/)!==null&&navigator.userAgent.match(/Safari/)!==null;h&&(b.onreadystatechange=function(){if(b.readyState==4||_&&b.readyState==3){if((b.status!=200||b.responseText==="")&&!l.callEvent("onAjaxError",[b]))return;setTimeout(function(){typeof g=="function"&&g.apply(dt,[{xmlDoc:b,filePath:c}]),y(b),typeof g=="function"&&(g=null,b=null)},0)}});var m=!this||!this.cache;if(d=="GET"&&m&&(c+=(c.indexOf("?")>=0?"&":"?")+"dhxr"+new Date().getTime()+"=1"),b.open(d,c,h),f)for(var p in f)b.setRequestHeader(p,f[p]);else d.toUpperCase()=="POST"||d=="PUT"||d=="DELETE"?b.setRequestHeader("Content-Type","application/x-www-form-urlencoded"):d=="GET"&&(u=null);if(b.setRequestHeader("X-Requested-With","XMLHttpRequest"),b.send(u),!h)return{xmlDoc:b,filePath:c}})},urlSeparator:function(d){return d.indexOf("?")!=-1?"&":"?"}}}(e),e.date=qn(e),e.RemoteEvents=Yn;var a=function(l){function d(u){return{target:u.target||u.srcElement,pageX:u.pageX,pageY:u.pageY,clientX:u.clientX,clientY:u.clientY,metaKey:u.metaKey,shiftKey:u.shiftKey,ctrlKey:u.ctrlKey,altKey:u.altKey}}function c(u,h){this._obj=u,this._settings=h||{},nt(this);var g=this.getInputMethods();this._drag_start_timer=null,l.attachEvent("onGanttScroll",R(function(v,b){this.clearDragTimer()},this));for(var f={passive:!1},y=0;ythis.config.sensitivity},initDnDMarker:function(){var u=this.config.marker=document.createElement("div");u.className="gantt_drag_marker",u.innerHTML="",document.body.appendChild(u)},backupEventTarget:function(u,h){if(l.config.touch){var g=h(u),f=g.target||g.srcElement,y=f.cloneNode(!0);this.config.original_target=d(g),this.config.original_target.target=y,this.config.backup_element=f,f.parentNode.appendChild(y),f.style.display="none",(this.config.mousemoveContainer||document.body).appendChild(f)}},getInputMethods:function(){var u=[];if(u.push({move:"mousemove",down:"mousedown",up:"mouseup",accessor:function(g){return g}}),l.config.touch){var h=!0;try{document.createEvent("TouchEvent")}catch{h=!1}h?u.push({move:"touchmove",down:"touchstart",up:"touchend",accessor:function(g){return g.touches&&g.touches.length>1?null:g.touches[0]?{target:document.elementFromPoint(g.touches[0].clientX,g.touches[0].clientY),pageX:g.touches[0].pageX,pageY:g.touches[0].pageY,clientX:g.touches[0].clientX,clientY:g.touches[0].clientY}:g}}):dt.navigator.pointerEnabled?u.push({move:"pointermove",down:"pointerdown",up:"pointerup",accessor:function(g){return g.pointerType=="mouse"?null:g}}):dt.navigator.msPointerEnabled&&u.push({move:"MSPointerMove",down:"MSPointerDown",up:"MSPointerUp",accessor:function(g){return g.pointerType==g.MSPOINTER_TYPE_MOUSE?null:g}})}return u},clearDragTimer:function(){this._drag_start_timer&&(clearTimeout(this._drag_start_timer),this._drag_start_timer=null)},dragStart:function(u,h,g){this.config&&this.config.started||(this.config={obj:u,marker:null,started:!1,pos:this.getPosition(h),sensitivity:4},this._settings&&N(this.config,this._settings,!0),this.traceDragEvents(u,g),l._prevent_touch_scroll=!0,document.body.className+=" gantt_noselect",l.config.touch&&this.dragMove(u,h,g.accessor))},dragMove:function(u,h,g){var f=g(h);if(!f)return!1;if(!this.config.marker&&!this.config.started){var y=this.getPosition(f);if(l.config.touch||this.checkPositionChange(y)){if(this.config.started=!0,this.config.ignore=!1,l._touch_drag=!0,this.callEvent("onBeforeDragStart",[u,this.config.original_target])===!1)return this.config.ignore=!0,!1;this.backupEventTarget(h,g),this.initDnDMarker(),l._touch_feedback(),this.callEvent("onAfterDragStart",[u,this.config.original_target])}else this.config.ignore=!0}return this.config.ignore?!1:h.targetTouches&&!f.target?void 0:(f.pos=this.getPosition(f),this.config.marker.style.left=f.pos.x+"px",this.config.marker.style.top=f.pos.y+"px",this.callEvent("onDragMove",[u,f]),!0)},dragEnd:function(u){var h=this.config.backup_element;h&&h.parentNode&&h.parentNode.removeChild(h),l._prevent_touch_scroll=!1,this.config.marker&&(this.config.marker.parentNode.removeChild(this.config.marker),this.config.marker=null,this.callEvent("onDragEnd",[])),this.config.started=!1,l._touch_drag=!1,document.body.className=document.body.className.replace(" gantt_noselect","")},getPosition:function(u){var h=0,g=0;return u.pageX||u.pageY?(h=u.pageX,g=u.pageY):(u.clientX||u.clientY)&&(h=u.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,g=u.clientY+document.body.scrollTop+document.documentElement.scrollTop),{x:h,y:g}}},c}(e);e.$services.setService("dnd",function(){return a});var r=function(l){var d={};function c(u,h,g){g=g||u;var f=l.config,y=l.templates;l.config[u]&&d[g]!=f[u]&&(h&&y[g]||(y[g]=l.date.date_to_str(f[u]),d[g]=f[u]))}return{initTemplates:function(){var u=l.locale.labels;u.gantt_save_btn=u.icon_save,u.gantt_cancel_btn=u.icon_cancel,u.gantt_delete_btn=u.icon_delete;var h=l.date,g=h.date_to_str,f=l.config,y=g(f.xml_date||f.date_format,f.server_utc),v=h.str_to_date(f.xml_date||f.date_format,f.server_utc);c("date_scale",!0,void 0,l.config,l.templates),c("date_grid",!0,"grid_date_format",l.config,l.templates),c("task_date",!0,void 0,l.config,l.templates),l.mixin(l.templates,{xml_format:void 0,format_date:y,xml_date:void 0,parse_date:v,progress_text:function(b,_,m){return""},grid_header_class:function(b,_){return""},task_text:function(b,_,m){return m.text},task_class:function(b,_,m){return""},task_end_date:function(b){return l.templates.task_date(b)},grid_row_class:function(b,_,m){return""},task_row_class:function(b,_,m){return""},timeline_cell_class:function(b,_){return""},timeline_cell_content:function(b,_){return""},scale_cell_class:function(b){return""},scale_row_class:function(b){return""},grid_indent:function(b){return"
"},grid_folder:function(b){return"
"},grid_file:function(b){return"
"},grid_open:function(b){return"
"},grid_blank:function(b){return"
"},date_grid:function(b,_,m){return _&&l.isUnscheduledTask(_)&&l.config.show_unscheduled?l.templates.task_unscheduled_time(_):l.templates.grid_date_format(b,m)},task_time:function(b,_,m){return l.isUnscheduledTask(m)&&l.config.show_unscheduled?l.templates.task_unscheduled_time(m):l.templates.task_date(b)+" - "+l.templates.task_end_date(_)},task_unscheduled_time:function(b){return""},time_picker:g(f.time_picker),link_class:function(b){return""},link_description:function(b){var _=l.getTask(b.source),m=l.getTask(b.target);return""+_.text+""+m.text+""},drag_link:function(b,_,m,p){b=l.getTask(b);var k=l.locale.labels,$=""+b.text+" "+(_?k.link_start:k.link_end)+"
";return m&&($+=" "+(m=l.getTask(m)).text+" "+(p?k.link_start:k.link_end)+"
"),$},drag_link_class:function(b,_,m,p){var k="";return b&&m&&(k=" "+(l.isLinkAllowed(b,m,_,p)?"gantt_link_allow":"gantt_link_deny")),"gantt_link_tooltip"+k},tooltip_date_format:h.date_to_str("%Y-%m-%d"),tooltip_text:function(b,_,m){return`
Task: ${m.text}
+
Start date: ${l.templates.tooltip_date_format(b)}
+
End date: ${l.templates.tooltip_date_format(_)}
`},baseline_text:function(b,_,m){return""}})},initTemplate:c}}(e);e.$services.setService("templateLoader",function(){return r}),nt(e);var s=new Jn;s.registerProvider("global",function(){var l={min_date:e._min_date,max_date:e._max_date,selected_task:null};return e.$data&&e.$data.tasksStore&&(l.selected_task=e.$data.tasksStore.getSelectedId()),l}),e.getState=s.getState,e.$services.setService("state",function(){return s}),N(e,Hn),e.Promise=Kn,e.env=_t,function(l){var d=Zn.create();N(l,d);var c,u=l.createDatastore({name:"task",type:"treeDatastore",rootId:function(){return l.config.root_id},initItem:R(function(_){this.defined(_.id)||(_.id=this.uid()),_.start_date&&(_.start_date=l.date.parseDate(_.start_date,"parse_date")),_.end_date&&(_.end_date=l.date.parseDate(_.end_date,"parse_date"));var m=null;(_.duration||_.duration===0)&&(_.duration=m=1*_.duration),m&&(_.start_date&&!_.end_date?_.end_date=this.calculateEndDate(_):!_.start_date&&_.end_date&&(_.start_date=this.calculateEndDate({start_date:_.end_date,duration:-_.duration,task:_}))),l.config.deadlines!==!1&&_.deadline&&(_.deadline=l.date.parseDate(_.deadline,"parse_date")),_.progress=Number(_.progress)||0,this._isAllowedUnscheduledTask(_)&&this._set_default_task_timing(_),this._init_task_timing(_),_.start_date&&_.end_date&&this.correctTaskWorkTime(_),_.$source=[],_.$target=[];var p=this.$data.tasksStore.getItem(_.id);return p&&!W(_.open)&&(_.$open=p.$open),_.parent===void 0&&(_.parent=this.config.root_id),_},l),getConfig:function(){return l.config}}),h=l.createDatastore({name:"link",initItem:R(function(_){return this.defined(_.id)||(_.id=this.uid()),_},l)});function g(_){var m=l.isTaskVisible(_);if(!m&&l.isTaskExists(_)){var p=l.getParent(_);l.isTaskExists(p)&&l.isTaskVisible(p)&&(p=l.getTask(p),l.isSplitTask(p)&&(m=!0))}return m}function f(_){if(l.isTaskExists(_.source)){var m=l.getTask(_.source);m.$source=m.$source||[],m.$source.push(_.id)}if(l.isTaskExists(_.target)){var p=l.getTask(_.target);p.$target=p.$target||[],p.$target.push(_.id)}}function y(_){if(l.isTaskExists(_.source)){for(var m=l.getTask(_.source),p=0;pk||+m.end_date<+p)return!1}return!0}),u.attachEvent("onIdChange",function(_,m){l._update_flags(_,m);var p=l.getTask(m);u.isSilent()||(p.$split_subtask||p.rollup)&&l.eachParent(function(k){l.refreshTask(k.id)},m)}),u.attachEvent("onAfterUpdate",function(_){if(l._update_parents(_),l.getState("batchUpdate").batch_update)return!0;var m=u.getItem(_);m.$source||(m.$source=[]);for(var p=0;p-1&&k.click?k.click():(i(n,!0),p=!0)}m==27&&(i(n,!1),p=!0)}return p?(_.preventDefault&&_.preventDefault(),!(_.cancelBubble=!0)):void 0}}var r=vt(t.$root)||document;function s(_){s.cover||(s.cover=document.createElement("div"),s.cover.onkeydown=a,s.cover.className="dhx_modal_cover",document.body.appendChild(s.cover)),s.cover.style.display=_?"inline-block":"none"}function o(_,m,p){return"
"+_+"
"}function l(){for(var _=[].slice.apply(arguments,[0]),m=0;m<_.length;m++)if(_[m])return _[m]}function d(_,m,p){var k=_.tagName?_:function(x,S,T){var C=document.createElement("div"),E=at();t._waiAria.messageModalAttr(C,E),C.className=" gantt_modal_box gantt-"+x.type,C.setAttribute(e,1);var D="";if(x.width&&(C.style.width=x.width),x.height&&(C.style.height=x.height),x.title&&(D+='
'+x.title+"
"),D+='
'+(x.content?"":x.text)+'
',S&&(D+=o(l(x.ok,t.locale.labels.message_ok,"OK"),"ok",!0)),T&&(D+=o(l(x.cancel,t.locale.labels.message_cancel,"Cancel"),"cancel",!1)),x.buttons)for(var A=0;A",C.innerHTML=D,x.content){var M=x.content;typeof M=="string"&&(M=document.getElementById(M)),M.style.display=="none"&&(M.style.display=""),C.childNodes[x.title?1:0].appendChild(M)}return C.onclick=function(L){var P=L.target||L.srcElement;if(P.className||(P=P.parentNode),lt(P,".gantt_popup_button")){var H=P.getAttribute("data-result");i(x,H=H=="true"||H!="false"&&H)}},x.box=C,(S||T)&&(n=x),C}(_,m,p);_.hidden||s(!0),document.body.appendChild(k);var $=Math.abs(Math.floor(((window.innerWidth||document.documentElement.offsetWidth)-k.offsetWidth)/2)),w=Math.abs(Math.floor(((window.innerHeight||document.documentElement.offsetHeight)-k.offsetHeight)/2));return _.position=="top"?k.style.top="-3px":k.style.top=w+"px",k.style.left=$+"px",k.onkeydown=a,y.focus(k),_.hidden&&y.hide(k),t.callEvent("onMessagePopup",[k]),k}function c(_){return d(_,!0,!1)}function u(_){return d(_,!0,!0)}function h(_){return d(_)}function g(_,m,p){return typeof _!="object"&&(typeof m=="function"&&(p=m,m=""),_={text:_,type:m,callback:p}),_}function f(_,m,p,k){return typeof _!="object"&&(_={text:_,type:m,expire:p,id:k}),_.id=_.id||at(),_.expire=_.expire||v.expire,_}t.event(r,"keydown",a,!0);var y=function(){var _=g.apply(this,arguments);return _.type=_.type||"alert",h(_)};y.hide=function(_){for(;_&&_.getAttribute&&!_.getAttribute(e);)_=_.parentNode;_&&(_.parentNode.removeChild(_),s(!1),t.callEvent("onAfterMessagePopup",[_]))},y.focus=function(_){setTimeout(function(){var m=Zt(_);m.length&&m[0].focus&&m[0].focus()},1)};var v=function(_,m,p,k){switch((_=f.apply(this,arguments)).type=_.type||"info",_.type.split("-")[0]){case"alert":return c(_);case"confirm":return u(_);case"modalbox":return h(_);default:return function($){v.area||(v.area=document.createElement("div"),v.area.className="gantt_message_area",v.area.style[v.position]="5px",document.body.appendChild(v.area)),v.hide($.id);var w=document.createElement("div");return w.innerHTML="
"+$.text+"
",w.className="gantt-info gantt-"+$.type,w.onclick=function(){v.hide($.id),$=null},t._waiAria.messageInfoAttr(w),v.position=="bottom"&&v.area.firstChild?v.area.insertBefore(w,v.area.firstChild):v.area.appendChild(w),$.expire>0&&(v.timers[$.id]=window.setTimeout(function(){v&&v.hide($.id)},$.expire)),v.pull[$.id]=w,w=null,$.id}(_)}};v.seed=new Date().valueOf(),v.uid=at,v.expire=4e3,v.keyboard=!0,v.position="top",v.pull={},v.timers={},v.hideAll=function(){for(var _ in v.pull)v.hide(_)},v.hide=function(_){var m=v.pull[_];m&&m.parentNode&&(window.setTimeout(function(){m.parentNode.removeChild(m),m=null},2e3),m.className+=" hidden",v.timers[_]&&window.clearTimeout(v.timers[_]),delete v.pull[_])};var b=[];return t.attachEvent("onMessagePopup",function(_){b.push(_)}),t.attachEvent("onAfterMessagePopup",function(_){for(var m=0;mt.x_end||e.left+e.widtht.y_end||e.top+e.heightd.x&&g.topd.y&&c.push(h.id)}return{ids:c}}}function cn(t,e,n,i,a){var r=n.$gantt.getTask(t.source),s=n.$gantt.getTask(t.target),o=n.getItemTop(r.id),l=n.getItemHeight(r.id),d=n.getItemTop(s.id),c=n.getItemHeight(s.id);if(e.y>o+l&&e.y>d+c||e.y_endg){var v=g;g=h,h=v}return f>y&&(v=y,y=f,f=v),h+=-100,g+=u,f+=-100,y+=u,!(e.x>g&&e.x>y)&&!(e.x_endr.maxWidth&&(i=r.maxWidth),ar.maxHeight&&(a=r.maxHeight),this.setSize(i,a),this.$preResize,this.$preResize=!1},t.prototype.hide=function(){this._hide(!0),this.resize()},t.prototype.show=function(e){this._hide(!1),e&&this.$parent&&this.$parent.show(),this.resize()},t.prototype._hide=function(e){if(e===!0&&this.$view.parentNode)this.$view.parentNode.removeChild(this.$view);else if(e===!1&&!this.$view.parentNode){var n=this.$parent.cellIndex(this.$id);this.$parent.moveView(this,n)}this.$config.hidden=e},t.prototype.$toHTML=function(e,n){e===void 0&&(e=""),n=[n||"",this.$config.css||""].join(" ");var i=this.$config,a="";return i.raw?e=typeof i.raw=="string"?i.raw:"":(e||(e="
"+(i.html||"")+"
"),i.header&&(a="
"+(i.canCollapse?"
":"")+"
"+i.header+"
")),"
"+a+e+"
"},t.prototype.$fill=function(e,n){this.$view=e,this.$parent=n,this.init()},t.prototype.getNode=function(){return this.$view.querySelector("gantt_layout_cell")||this.$view},t.prototype.init=function(){var e=this;this._headerClickHandler=function(n){tt(n,"data-cell-id")==e.$id&&e.toggle()},this.$gantt.$services.getService("mouseEvents").delegate("click","gantt_header_arrow",this._headerClickHandler),this.callEvent("onReady",[])},t.prototype.toggle=function(){this.$config.collapsed=!this.$config.collapsed,this.resize()},t.prototype.getSize=function(){var e={height:this.$config.height||0,width:this.$config.width||0,gravity:this.$config.gravity||1,minHeight:this.$config.minHeight||0,minWidth:this.$config.minWidth||0,maxHeight:this.$config.maxHeight||1e11,maxWidth:this.$config.maxWidth||1e11};if(this.$config.collapsed){var n=this.$config.mode==="x";e[n?"width":"height"]=e[n?"maxWidth":"maxHeight"]=this.$config.headerHeight}return e},t.prototype.getContentSize=function(){var e=this.$lastSize.contentX;e!==1*e&&(e=this.$lastSize.width);var n=this.$lastSize.contentY;return n!==1*n&&(n=this.$lastSize.height),{width:e,height:n}},t.prototype._getBorderSizes=function(){var e={top:0,right:0,bottom:0,left:0,horizontal:0,vertical:0};return this._currentBorders&&(this._currentBorders[this._borders.left]&&(e.left=1,e.horizontal++),this._currentBorders[this._borders.right]&&(e.right=1,e.horizontal++),this._currentBorders[this._borders.top]&&(e.top=1,e.vertical++),this._currentBorders[this._borders.bottom]&&(e.bottom=1,e.vertical++)),e},t.prototype.setSize=function(e,n){this.$view.style.width=e+"px",this.$view.style.height=n+"px";var i=this._getBorderSizes(),a=n-i.vertical,r=e-i.horizontal;this.$lastSize={x:e,y:n,contentX:r,contentY:a},this.$config.header?this._sizeHeader():this._sizeContent()},t.prototype._borders={left:"gantt_layout_cell_border_left",right:"gantt_layout_cell_border_right",top:"gantt_layout_cell_border_top",bottom:"gantt_layout_cell_border_bottom"},t.prototype._setBorders=function(e,n){n||(n=this);var i=n.$view;for(var a in this._borders)Ht(i,this._borders[a]);typeof e=="string"&&(e=[e]);var r={};for(a=0;a0?n[l].$parent.getNextSibling(n[l].$id):n[l].$parent.getPrevSibling(n[l].$id);c.$name=="resizer"&&(c=r>0?c.$parent.getNextSibling(c.$id):c.$parent.getPrevSibling(c.$id));var u=c.getSize();if(o)n[l].$config.gravity=s;else if(c[a]){var h=d.gravity+u.gravity,g=d[a]+u[a],f=h/g;n[l].$config.gravity=f*s,c.$config[a]=g-s,c.$config.gravity=h-f*s}else n[l].$config[a]=s;var y=this.$gantt.$ui.getView("grid");!y||n[l].$content!==y||y.$config.scrollable||o||(this.$gantt.config.grid_width=s)}},e.prototype.resize=function(n){var i=!1;if(this.$root&&!this._resizeInProgress&&(this.callEvent("onBeforeResize",[]),i=!0,this._resizeInProgress=!0),t.prototype.resize.call(this,!0),t.prototype.resize.call(this,!1),i){var a=[];a=(a=(a=a.concat(this.getCellsByType("viewCell"))).concat(this.getCellsByType("viewLayout"))).concat(this.getCellsByType("hostCell"));for(var r=this.getCellsByType("scroller"),s=0;s=0&&this.$cells[i+1]?this.$cells[i+1]:null},e.prototype.getPrevSibling=function(n){var i=this.cellIndex(n);return i>=0&&this.$cells[i-1]?this.$cells[i-1]:null},e.prototype.cell=function(n){for(var i=0;i=a.childNodes.length?a.appendChild(n.$view):a.insertBefore(n.$view,a.childNodes[i])},e.prototype._parseConfig=function(n){this.$cells=[],this._xLayout=!n.rows;for(var i=n.rows||n.cols||n.views,a=0;a=0;r--){var s=this.$cells[r];s.$fill(a[r],this),s.$config.hidden&&s.$view.parentNode.removeChild(s.$view)}},e.prototype.$toHTML=function(){for(var n=this._xLayout?"x":"y",i=[],a=0;a=1e5&&(c.maxWidth=a),c.maxHeight>=1e5&&(c.maxHeight=s),c.minWidth=c.minWidth!=c.minWidth?0:c.minWidth,c.minHeight=c.minHeight!=c.minHeight?0:c.minHeight,this._xLayout?(c.minWidth+=this.$config.margin*this.$cells.length||0,c.minWidth+=2*this.$config.padding||0,c.minHeight+=2*this.$config.padding||0):(c.minHeight+=this.$config.margin*this.$cells.length||0,c.minHeight+=2*this.$config.padding||0),c},e.prototype._calcFreeSpace=function(n,i,a){var r=a?i.minWidth:i.minHeight,s=i.maxWidth,o=n;return o?(o>s&&(o=s),os&&(o=s,this._free-=o,this._gravity-=i.gravity),oo&&(r=o),r=0;r--)if(!i[r].$config.hidden){a=r;break}for(r=0;r=a,o="";!s&&i[r+1]&&i[r+1].$config.view=="scrollbar"&&(this._xLayout?s=!0:o="gantt_layout_cell_border_transparent"),this._setBorders(s?[]:[n,o],i[r])}},e.prototype._updateCellVisibility=function(){for(var n=this._visibleCells||{},i=!this._visibleCells,a={},r=null,s=[],o=0;o
"},n.prototype._getRootParent=function(){for(var a=this.$parent;a&&a.$parent;)a=a.$parent;if(a)return a},n.prototype._eachView=function(){var a=[];return i(this._getRootParent(),a),a},n.prototype._getLinkedViews=function(){for(var a=this._eachView(),r=[],s=0;sy[u]&&y[c]>r&&f>y[u]-h+2&&(r=f+(o?0:2),s=y[u]);else{var v=Math.max(y[c]-f,0);(f+=v)>Math.max(y[u]-v,0)&&f>r&&(r=f,s=y[u])}}return{outerScroll:s,innerScroll:r}},n.prototype.scroll=function(a){this._isHorizontal()?this.scrollHorizontally(a):this.scrollVertically(a)},n.prototype.getScrollState=function(){return{visible:this.isVisible(),direction:this.$config.scroll,size:this.$config.outerSize,scrollSize:this.$config.scrollSize||0,position:this.$config.scrollPosition||0}},n.prototype.setSize=function(a,r){t.prototype.setSize.apply(this,arguments);var s=this._getScrollSize(),o=(this._isVertical()?r:a)-this._getScrollOffset()+(this._isHorizontal()?1:0);s.innerScroll&&o>s.outerScroll&&(s.innerScroll+=o-s.outerScroll),this.$config.scrollSize=s.innerScroll,this.$config.width=a,this.$config.height=r,this._setScrollSize(s.innerScroll)},n.prototype.isVisible=function(){return!(!this.$parent||!this.$parent.$view.parentNode)},n.prototype.shouldShow=function(){var a=this._getScrollSize();return!(!a.innerScroll&&this.$parent&&this.$parent.$view.parentNode)&&!(!a.innerScroll||this.$parent&&this.$parent.$view.parentNode)},n.prototype.shouldHide=function(){return!(this._getScrollSize().innerScroll||!this.$parent||!this.$parent.$view.parentNode)},n.prototype.toggleVisibility=function(){this.shouldHide()?this.hide():this.shouldShow()&&this.show()},n.prototype._getScaleOffset=function(a){var r=0;return!a||a.$config.view!="timeline"&&a.$config.view!="grid"||(r=a.$content.$getConfig().scale_height),r},n.prototype._getScrollOffset=function(){var a=0;if(this._isVertical()){var r=this.$parent.$parent;a=Math.max(this._getScaleOffset(r.getPrevSibling(this.$parent.$id)),this._getScaleOffset(r.getNextSibling(this.$parent.$id)))}else for(var s=this._getLinkedViews(),o=0;o=0&&(!a[y]||a.deltaX||a.wheelDeltaX||(g=2*f,f=0)),g&&Math.abs(g)>Math.abs(f)){if(this._isVertical())return;if(s.x||!this.$scroll_hor||!this.$scroll_hor.offsetWidth)return!0;var v=g/-40,b=this._oldLeft,_=b+30*v;if(this.scrollHorizontally(_),this.$scroll_hor.scrollLeft=_,b==this.$scroll_hor.scrollLeft)return!0;this._oldLeft=this.$scroll_hor.scrollLeft}else{if(this._isHorizontal())return;if(s.y||!this.$scroll_ver||!this.$scroll_ver.offsetHeight)return!0;v=f/-40,f===void 0&&(v=a.detail);var m=this._oldTop,p=this.$scroll_ver.scrollTop+30*v;if(this.scrollVertically(p),this.$scroll_ver.scrollTop=p,m==this.$scroll_ver.scrollTop)return!0;this._oldTop=this.$scroll_ver.scrollTop}return a.preventDefault&&a.preventDefault(),a.cancelBubble=!0,!1}},n}(It);function hn(t){var e={},n={},i=null,a=-1,r=null,s=function(o){var l=-1,d=-1;return{resetCache:function(){l=-1,d=-1},_getRowHeight:function(){return l===-1&&(l=o.$getConfig().row_height),l},_refreshState:function(){this.resetCache(),d=!0;var c=o.$config.rowStore;if(c)for(var u=this._getRowHeight(),h=0;h=c&&o",this.$task=t.childNodes[0],this.$task.innerHTML="
",this.$task_scale=this.$task.childNodes[0],this.$task_data=this.$task.childNodes[1],this.$task_data.innerHTML="
",this.$task_bg=this.$task_data.childNodes[0],this.$task_baselines=this.$task_data.childNodes[1],this.$task_links=this.$task_data.childNodes[2],this.$task_bars=this.$task_data.childNodes[3],this.$task_constraints=this.$task_data.childNodes[4],this.$task_deadlines=this.$task_data.childNodes[5],this._tasks={col_width:0,width:[],full_width:0,trace_x:[],rendered:{}};var e=this.$getConfig(),n=e[this.$config.bind+"_attribute"],i=e[this.$config.bindLinks+"_attribute"];!n&&this.$config.bind&&(n="data-"+this.$config.bind+"-id"),!i&&this.$config.bindLinks&&(i="data-"+this.$config.bindLinks+"-id"),this.$config.item_attribute=n||null,this.$config.link_attribute=i||null;var a=this._createLayerConfig();this.$config.layers||(this.$config.layers=a.tasks),this.$config.linkLayers||(this.$config.linkLayers=a.links),this._attachLayers(this.$gantt),this.callEvent("onReady",[]),this.$gantt.ext.dragTimeline&&(this._timelineDragScroll=this.$gantt.ext.dragTimeline.create(),this._timelineDragScroll.attach(this))},setSize:function(t,e){var n=this.$getConfig();if(1*t===t&&(this.$config.width=t),1*e===e){this.$config.height=e;var i=Math.max(this.$config.height-n.scale_height);this.$task_data.style.height=i+"px"}this.refresh(),this.$task_bg.style.backgroundImage="",n.smart_rendering&&this.$config.rowStore?this.$task_bg.style.height=this.getTotalHeight()+"px":this.$task_bg.style.height="";for(var a=this._tasks,r=this.$task_data.childNodes,s=0,o=r.length;s'+this._prepareScaleHtml(t[r],e,n,r)+"")}return i.join("")},_prepareScaleHtml:function(t,e,n,i){var a=this.$getConfig(),r=this.$gantt.templates,s=[],o=null,l=null,d=t.format||t.template||t.date;typeof d=="string"&&(d=this.$gantt.date.date_to_str(d));var c=0,u=t.count;!a.smart_scales||isNaN(e)||isNaN(n)||(c=Tt(t.left,e),u=Tt(t.left,n)+1),l=t.css||function(){},!t.css&&a.inherit_scale_class&&(l=r.scale_cell_class);for(var h=c;hx||$===!0){if(vk.x_end&&f>x){let S=k.x_end-v-10,T="-100%";S${g}`;s.push(p)}}return s.join("")},dateFromPos:function(t){var e=this._tasks;if(t<0||t>e.full_width||!e.full_width)return null;var n=Tt(this._tasks.left,t),i=this._tasks.left[n],a=e.width[n]||e.col_width,r=0;a&&(r=(t-i)/a,e.rtl&&(r=1-r));var s=0;return r&&(s=this._getColumnDuration(e,e.trace_x[n])),new Date(e.trace_x[n].valueOf()+Math.round(r*s))},posFromDate:function(t){if(!this.isVisible()||!t)return 0;var e=String(t.valueOf());if(this._posFromDateCache[e]!==void 0)return this._posFromDateCache[e];var n=this.columnIndexByDate(t);this.$gantt.assert(n>=0,"Invalid day index");var i=Math.floor(n),a=n%1,r=this._tasks.left[Math.min(i,this._tasks.width.length-1)];i==this._tasks.width.length&&(r+=this._tasks.width[this._tasks.width.length-1]),a&&(i=a.max_date)return this._tasks.rtl?0:n.length;var r=Tt(n,e),s=this._getClosestVisibleColumn(r,n,i),o=n[s],l=this._tasks.trace_index_transition;if(!o)return l?l[0]:0;var d=(t-n[s])/this._getColumnDuration(this._tasks,n[s]);return l?l[s]+(1-d):s+d},getItemPosition:function(t,e,n){var i,a,r;let s=e||t.start_date||t.$auto_start_date,o=n||t.end_date||t.$auto_end_date;return this._tasks.rtl?(a=this.posFromDate(s),i=this.posFromDate(o)):(i=this.posFromDate(s),a=this.posFromDate(o)),r=Math.max(a-i,0),{left:i,top:this.getItemTop(t.id),height:this.getBarHeight(t.id),width:r,rowHeight:this.getItemHeight(t.id)}},getBarHeight:function(t,e){var n=this.$getConfig(),i=this.$config.rowStore.getItem(t),a=i.task_height||i.bar_height||n.bar_height||n.task_height,r=this.getItemHeight(t);return a=="full"&&(a=r-(n.bar_height_padding||3)),a=Math.min(a,r),e&&(a=Math.round(a/Math.sqrt(2))),Math.max(a,0)},getScale:function(){return this._tasks},_getScales:function(){var t=this.$getConfig(),e=this.$scaleHelper,n=[e.primaryScale(t)].concat(e.getSubScales(t));return e.sortScales(n),n},_getColumnDuration:function(t,e){return this.$gantt.date.add(e,t.step,t.unit)-e},_bindStore:function(){if(this.$config.bind){var t=this.$gantt.getDatastore(this.$config.bind);if(this.$config.rowStore=t,t&&!t._timelineCacheAttached){var e=this;t._timelineCacheAttached=t.attachEvent("onBeforeFilter",function(){e._resetTopPositionHeight()})}}},_unbindStore:function(){if(this.$config.bind){var t=this.$gantt.getDatastore(this.$config.bind);t&&t._timelineCacheAttached&&(t.detachEvent(t._timelineCacheAttached),t._timelineCacheAttached=!1)}},refresh:function(){this._bindStore(),this.$config.bindLinks&&(this.$config.linkStore=this.$gantt.getDatastore(this.$config.bindLinks)),this._resetTopPositionHeight(),this._resetHeight(),this._initStaticBackgroundRender(),this._render_tasks_scales()},destructor:function(){var t=this.$gantt;this._clearLayers(t),this._unbindStore(),this.$task=null,this.$task_scale=null,this.$task_data=null,this.$task_bg=null,this.$task_links=null,this.$task_bars=null,this.$gantt=null,this.$config.rowStore&&(this.$config.rowStore.detachEvent(this._staticBgHandler),this.$config.rowStore=null),this.$config.linkStore&&(this.$config.linkStore=null),this._timelineDragScroll&&(this._timelineDragScroll.destructor(),this._timelineDragScroll=null),this.callEvent("onDestroy",[]),this.detachAllEvents()}};class ma{constructor(e){this._scrollOrder=0;const{gantt:n,grid:i,dnd:a,getCurrentX:r}=e;this.$gantt=n,this.$grid=i,this._dnd=a,this.getCurrentX=r,this._scrollView=this.$gantt.$ui.getView(this.$grid.$config.scrollX),this.attachEvents()}attachEvents(){this.isScrollable()&&(this._dnd.attachEvent("onDragMove",(e,n)=>{const i=this.$grid.$grid.getBoundingClientRect(),a=i.right,r=i.left,s=this.getCurrentX(n.clientX);return s>=a-20&&(this.autoscrollRight(),this.autoscrollStart()),s<=r+20&&(this.autoscrollLeft(),this.autoscrollStart()),sr+20&&this.autoscrollStop(),!0}),this._dnd.attachEvent("onDragEnd",()=>{this.autoscrollStop()}))}autoscrollStart(){if(this._scrollOrder===0)return;const e=10*this._scrollOrder,n=this._scrollView.getScrollState();this._scrollView.scrollTo(n.position+e),setTimeout(()=>{this.autoscrollStart()},50)}autoscrollRight(){this._scrollOrder=1}autoscrollLeft(){this._scrollOrder=-1}autoscrollStop(){this._scrollOrder=0}getCorrection(){return this.isScrollable()?this._scrollView.getScrollState().position:0}isScrollable(){return!!this.$grid.$config.scrollable}}const _n="data-column-id";class va{constructor(e,n){this._targetMarker=null,this.calculateCurrentPosition=i=>{const a=this.$grid.$grid.getBoundingClientRect(),r=a.right,s=a.left;let o=i;return o>r&&(o=r),o{if(this._draggedCell=this.$gantt.utils.dom.closest(n.target,".gantt_grid_head_cell"),!this._draggedCell)return;const i=this.$grid.$getConfig().columns,a=this._draggedCell.getAttribute(_n);let r,s;return i.map(function(o,l){o.name===a&&(r=o,s=l)}),this.$grid.callEvent("onBeforeColumnDragStart",[{draggedColumn:r,draggedIndex:s}])!==!1&&!(!this._draggedCell||!r)&&(this._gridConfig=this.$grid.$getConfig(),this._originAutoscroll=this.$gantt.config.autoscroll,this.$gantt.config.autoscroll=!1,!0)}),this._dnd.attachEvent("onAfterDragStart",(e,n)=>{this._draggedCell&&(this._dnd.config.column=this._draggedCell.getAttribute(_n),this._dnd.config.marker.innerHTML=this._draggedCell.outerHTML,this._dnd.config.marker.classList.add("gantt_column_drag_marker"),this._dnd.config.marker.style.height=this._gridConfig.scale_height+"px",this._dnd.config.marker.style.lineHeight=this._gridConfig.scale_height+"px",this._draggedCell.classList.add("gantt_grid_head_cell_dragged"))}),this._dnd.attachEvent("onDragMove",(e,n)=>{if(!this._draggedCell)return;this._dragX=n.clientX;const i=this.calculateCurrentPosition(n.clientX),a=this.findColumnsIndexes(),r=a.targetIndex,s=a.draggedIndex,o=this.$grid.$getConfig().columns,l=o[s],d=o[r];return this.$grid.callEvent("onColumnDragMove",[{draggedColumn:l,targetColumn:d,draggedIndex:s,targetIndex:r}])===!1?(this.cleanTargetMarker(),!1):(this.setMarkerPosition(i),this.drawTargetMarker(a),!0)}),this._dnd.attachEvent("onDragEnd",()=>{this._draggedCell&&(this.$gantt.config.autoscroll=this._originAutoscroll,this._draggedCell.classList.remove("gantt_grid_head_cell_dragged"),this.cleanTargetMarker(),this.reorderColumns())})}reorderColumns(){const{targetIndex:e,draggedIndex:n}=this.findColumnsIndexes(),i=this.$grid.$getConfig().columns,a=i[n],r=i[e];this.$grid.callEvent("onBeforeColumnReorder",[{draggedColumn:a,targetColumn:r,draggedIndex:n,targetIndex:e}])!==!1&&e!==n&&(i.splice(n,1),i.splice(e,0,a),this.$gantt.render(),this.$grid.callEvent("onAfterColumnReorder",[{draggedColumn:a,targetColumn:r,draggedIndex:n,targetIndex:e}]))}findColumnsIndexes(){const e=this._dnd.config.column,n=this.$grid.$getConfig().columns;let i,a,r,s;const o={startX:0,endX:0};let l,d=0,c=n.length-1,u=(f,y)=>f<=y,h=f=>++f;this.$gantt.config.rtl&&(d=n.length-1,c=0,u=(f,y)=>f>=y,h=f=>--f);const g=this._dragX-this.$grid.$grid.getBoundingClientRect().left+this._scrollableGrid.getCorrection();for(let f=d;u(f,c)&&(i===void 0||a===void 0);f=h(f))n[f].hide||(o.startX=o.endX,o.endX+=n[f].width,g>=o.startX&&(g<=o.endX||!u(h(f),c))&&(i=f,r=o.startX,s=o.endX,l=(g-o.startX)/(o.endX-o.startX)),e===n[f].name&&(a=f));return{targetIndex:i,draggedIndex:a,xBefore:r,xAfter:s,columnRelativePos:l}}setMarkerPosition(e,n=10){const{marker:i}=this._dnd.config,a=this._dnd._obj.getBoundingClientRect();i.style.top=`${a.y+n}px`,i.style.left=`${e}px`}drawTargetMarker({targetIndex:e,draggedIndex:n,xBefore:i,xAfter:a,columnRelativePos:r}){let s;this._targetMarker||(this._targetMarker=document.createElement("div"),bt(this._targetMarker,"gantt_grid_target_marker"),this._targetMarker.style.display="none",this._targetMarker.style.height=`${this._gridConfig.scale_height}px`),this._targetMarker.parentNode||this.$grid.$grid_scale.appendChild(this._targetMarker),s=e>n?a:e.5?a:i,this._targetMarker.style.left=`${s}px`,this._targetMarker.style.display="block"}cleanTargetMarker(){this._targetMarker&&this._targetMarker.parentNode&&this.$grid.$grid_scale.removeChild(this._targetMarker),this._targetMarker=null}}function ve(t){var e=[];return{delegate:function(n,i,a,r){e.push([n,i,a,r]),t.$services.getService("mouseEvents").delegate(n,i,a,r)},destructor:function(){for(var n=t.$services.getService("mouseEvents"),i=0;i",this.$grid=t.childNodes[0],this.$grid.innerHTML="
",this.$grid_scale=this.$grid.childNodes[0],this.$grid_data=this.$grid.childNodes[1];var s=a[this.$config.bind+"_attribute"];if(!s&&this.$config.bind&&(s="data-"+this.$config.bind+"-id"),this.$config.item_attribute=s||null,!this.$config.layers){var o=this._createLayerConfig();this.$config.layers=o}var l={init:function(){},doOnRender:function(){}};this._renderHeaderResizers=l.doOnRender,this._mouseDelegates=ve(e);var d=function(c,u){var h={row_before_start:c.bind(function(g,f,y){var v=u.$getConfig(),b=u.$config.rowStore;if(!tt(y,v.task_grid_row_resizer_attribute))return!1;var _=this.locate(y,v.task_grid_row_resizer_attribute),m=b.getItem(_);return u.callEvent("onBeforeRowResize",[m])!==!1&&void 0},c),row_after_start:c.bind(function(g,f,y){var v=u.$getConfig(),b=this.locate(y,v.task_grid_row_resizer_attribute);g.config.marker.innerHTML="",g.config.marker.className+=" gantt_row_grid_resize_area",g.config.marker.style.width=u.$grid.offsetWidth+"px",g.config.drag_id=b},c),row_drag_move:c.bind(function(g,f,y){var v=u.$config.rowStore,b=u.$getConfig(),_=g.config,m=_.drag_id,p=u.getItemHeight(m),k=u.getItemTop(m)-f.scrollTop,$=z(u.$grid_data),w=parseInt(_.marker.style.top,10),x=k+$.y,S=0,T=b.min_task_grid_row_height;return(S=w-x)c.max_width&&(u=c.max_width-c.width),a-=c.width,c.width+=u,l-=u}for(var h=l>0?1:-1;l>0&&h===1||l<0&&h===-1;){var g=l;for(s=e+1;s-1&&(f=i[e].width+l)==this._getColumnWidth(i[e],n,f)&&(i[e].width=f),this._getColsTotalWidth()},_getColsTotalWidth:function(){for(var t=this.getGridColumns(),e=0,n=0;ns+h&&(u.width=h=g-s),s+=h;var f=t._sort&&u.name==t._sort.name?`
`:"",y=["gantt_grid_head_cell","gantt_grid_head_"+u.name,c?"gantt_last_cell":"",i.grid_header_class(u.name,u)].join(" "),v="width:"+(h-(c?1:0))+"px;",b=u.label||o["column_"+u.name]||o[u.name];b=b||"";var _="
"+b+f+"
";r.push(_)}this.$grid_scale.style.height=e.scale_height+"px",this.$grid_scale.style.lineHeight=l+"px",this.$grid_scale.innerHTML=r.join(""),this._renderHeaderResizers&&this._renderHeaderResizers()},_getGridWidth:function(){return this.$config.width},destructor:function(){this._clearLayers(this.$gantt),this._mouseDelegates&&(this._mouseDelegates.destructor(),this._mouseDelegates=null),this._unbindStore(),this.$grid=null,this.$grid_scale=null,this.$grid_data=null,this.$gantt=null,this.$config.rowStore&&(this.$config.rowStore.detachEvent(this._staticBgHandler),this.$config.rowStore=null),this.callEvent("onDestroy",[]),this.detachAllEvents()}};const ka={init:function(t,e){var n=e.$gantt;n.attachEvent("onTaskClick",function(i,a){if(n._is_icon_open_click(a))return!0;var r=t.getState(),s=t.locateCell(a.target);return!s||!t.getEditorConfig(s.columnName)||(t.isVisible()&&r.id==s.id&&r.columnName==s.columnName||t.startEdit(s.id,s.columnName),!1)}),n.attachEvent("onEmptyClick",function(){return t.isVisible()&&t.isChanged()?t.save():t.hide(),!0}),n.attachEvent("onTaskDblClick",function(i,a){var r=t.getState(),s=t.locateCell(a.target);return!s||!t.isVisible()||s.columnName!=r.columnName})},onShow:function(t,e,n){var i=n.$gantt;i.ext&&i.ext.keyboardNavigation&&i.ext.keyboardNavigation.attachEvent("onKeyDown",function(a,r){var s=i.constants.KEY_CODES,o=!1;return r.keyCode===s.SPACE&&t.isVisible()&&(o=!0),!o}),e.onkeydown=function(a){a=a||window.event;var r=i.constants.KEY_CODES;if(!(a.defaultPrevented||a.shiftKey&&a.keyCode!=r.TAB)){var s=!0;switch(a.keyCode){case i.keys.edit_save:t.save();break;case i.keys.edit_cancel:t.hide();break;case r.UP:case r.DOWN:t.isVisible()&&(t.hide(),s=!1);break;case r.TAB:a.shiftKey?t.editPrevCell(!0):t.editNextCell(!0);break;default:s=!1}s&&a.preventDefault()}}},onHide:function(){},destroy:function(){}},ya={init:function(t,e){var n=t,i=e.$gantt,a=null,r=i.ext.keyboardNavigation;r.attachEvent("onBeforeFocus",function(s){var o=t.locateCell(s);if(clearTimeout(a),o){var l=o.columnName,d=o.id,c=n.getState();if(n.isVisible()&&c.id==d&&c.columnName===l)return!1}return!0}),r.attachEvent("onFocus",function(s){var o=t.locateCell(s),l=t.getState();return clearTimeout(a),!o||o.id==l.id&&o.columnName==l.columnName||n.isVisible()&&n.save(),!0}),t.attachEvent("onHide",function(){clearTimeout(a)}),r.attachEvent("onBlur",function(){return a=setTimeout(function(){n.save()}),!0}),i.attachEvent("onTaskDblClick",function(s,o){var l=t.getState(),d=t.locateCell(o.target);return!d||!t.isVisible()||d.columnName!=l.columnName}),i.attachEvent("onTaskClick",function(s,o){if(i._is_icon_open_click(o))return!0;var l=t.getState(),d=t.locateCell(o.target);return!d||!t.getEditorConfig(d.columnName)||(t.isVisible()&&l.id==d.id&&l.columnName==d.columnName||t.startEdit(d.id,d.columnName),!1)}),i.attachEvent("onEmptyClick",function(){return n.save(),!0}),r.attachEvent("onKeyDown",function(s,o){var l=t.locateCell(o.target),d=!!l&&t.getEditorConfig(l.columnName),c=t.getState(),u=i.constants.KEY_CODES,h=o.keyCode,g=!1;switch(h){case u.ENTER:t.isVisible()?(t.save(),o.preventDefault(),g=!0):d&&!(o.ctrlKey||o.metaKey||o.shiftKey)&&(n.startEdit(l.id,l.columnName),o.preventDefault(),g=!0);break;case u.ESC:t.isVisible()&&(t.hide(),o.preventDefault(),g=!0);break;case u.UP:case u.DOWN:break;case u.LEFT:case u.RIGHT:(d&&t.isVisible()||c.editorType==="date")&&(g=!0);break;case u.SPACE:t.isVisible()&&(g=!0),d&&!t.isVisible()&&(n.startEdit(l.id,l.columnName),o.preventDefault(),g=!0);break;case u.DELETE:d&&!t.isVisible()?(n.startEdit(l.id,l.columnName),g=!0):d&&t.isVisible()&&(g=!0);break;case u.TAB:if(t.isVisible()){o.shiftKey?t.editPrevCell(!0):t.editNextCell(!0);var f=t.getState();f.id&&r.focus({type:"taskCell",id:f.id,column:f.columnName}),o.preventDefault(),g=!0}break;default:if(t.isVisible())g=!0;else if(h>=48&&h<=57||h>95&&h<112||h>=64&&h<=91||h>185&&h<193||h>218&&h<223){var y=s.modifiers,v=y.alt||y.ctrl||y.meta||y.shift;y.alt||v&&r.getCommandHandler(s,"taskCell")||d&&!t.isVisible()&&(n.startEdit(l.id,l.columnName),g=!0)}}return!g})},onShow:function(t,e,n){},onHide:function(t,e,n){const i=n.$gantt;i&&i.focus()},destroy:function(){}};function St(t){var e=function(){};return e.prototype={show:function(n,i,a,r){},hide:function(){},set_value:function(n,i,a,r){this.get_input(r).value=n},get_value:function(n,i,a){return this.get_input(a).value||""},is_changed:function(n,i,a,r){var s=this.get_value(i,a,r);return s&&n&&s.valueOf&&n.valueOf?s.valueOf()!=n.valueOf():s!=n},is_valid:function(n,i,a,r){return!0},save:function(n,i,a){},get_input:function(n){return n.querySelector("input")},focus:function(n){var i=this.get_input(n);i&&(i.focus&&i.focus(),i.select&&i.select())}},e}function ba(t){var e=St();function n(){return e.apply(this,arguments)||this}return B(n,e),N(n.prototype,{show:function(i,a,r,s){var o=`
`;s.innerHTML=o}},!0),n}function xa(t){var e=St();function n(){return e.apply(this,arguments)||this}return B(n,e),N(n.prototype,{show:function(i,a,r,s){var o=r.min||0,l=r.max||100,d=`
`;s.innerHTML=d,s.oninput=function(c){+c.target.valuel&&(c.target.value=l)}},get_value:function(i,a,r){return this.get_input(r).value||""},is_valid:function(i,a,r,s){return!isNaN(parseInt(i,10))}},!0),n}function $a(t){var e=St();function n(){return e.apply(this,arguments)||this}return B(n,e),N(n.prototype,{show:function(i,a,r,s){for(var o=`
",s.innerHTML=o},get_input:function(i){return i.querySelector("select")}},!0),n}function wa(t){var e=St(),n="%Y-%m-%d",i=null,a=null;function r(){return e.apply(this,arguments)||this}return B(r,e),N(r.prototype,{show:function(s,o,l,d){i||(i=t.date.date_to_str(n)),a||(a=t.date.str_to_date(n));var c=null,u=null;c=typeof l.min=="function"?l.min(s,o):l.min,u=typeof l.max=="function"?l.max(s,o):l.max;var h=`
`;d.innerHTML=h,d.oninput=function(g){+t.date.str_to_date("%Y-%m-%d")(g.target.value)<+c&&(g.target.value=t.date.date_to_str("%Y-%m-%d")(c)),+t.date.str_to_date("%Y-%m-%d")(g.target.value)>+u&&(g.target.value=t.date.date_to_str("%Y-%m-%d")(u))}},set_value:function(s,o,l,d){s&&s.getFullYear?this.get_input(d).value=i(s):this.get_input(d).value=s},is_valid:function(s,o,l,d){return!(!s||isNaN(s.getTime()))},get_value:function(s,o,l){var d;try{d=a(this.get_input(l).value||"")}catch{d=null}return d}},!0),r}function Sa(t){var e=St();function n(){return e.apply(this,arguments)||this}function i(l){return l.formatter||t.ext.formatters.linkFormatter()}function a(l,d){for(var c=(l||"").split(d.delimiter||","),u=0;u`;u.innerHTML=h},hide:function(){},set_value:function(l,d,c,u){this.get_input(u).value=r(l,c.editor,t)},get_value:function(l,d,c){return a(this.get_input(c).value||"",d.editor)},save:function(l,d,c){var u=o(t.getTask(l),this.get_value(l,d,c),d.editor);(u.add.length||u.remove.length)&&t.batchUpdate(function(){u.add.forEach(function(h){t.addLink(h)}),u.remove.forEach(function(h){t.deleteLink(h)}),t.autoSchedule&&t.autoSchedule()})},is_changed:function(l,d,c,u){var h=this.get_value(d,c,u),g=a(r(l,c.editor,t),c.editor);return h.join()!==g.join()}},!0),n}function Ta(t){var e=St();function n(){return e.apply(this,arguments)||this}function i(a){return a.formatter||t.ext.formatters.durationFormatter()}return B(n,e),N(n.prototype,{show:function(a,r,s,o){var l=`
`;o.innerHTML=l},set_value:function(a,r,s,o){this.get_input(o).value=i(s.editor).format(a)},get_value:function(a,r,s){return i(r.editor).parse(this.get_input(s).value||"")}},!0),n}function Ca(t){return function(n,i,a){a=="keepDates"?function(r,s){s=="duration"?r.end_date=t.calculateEndDate(r):s!="end_date"&&s!="start_date"||(r.duration=t.calculateDuration(r))}(n,i):a=="keepDuration"?function(r,s){s=="end_date"?r.start_date=e(r):s!="start_date"&&s!="duration"||(r.end_date=t.calculateEndDate(r))}(n,i):function(r,s){t.config.schedule_from_end?s=="end_date"||s=="duration"?r.start_date=e(r):s=="start_date"&&(r.duration=t.calculateDuration(r)):s=="start_date"||s=="duration"?r.end_date=t.calculateEndDate(r):s=="end_date"&&(r.duration=t.calculateDuration(r))}(n,i)};function e(n){return t.calculateEndDate({start_date:n.end_date,duration:-n.duration,task:n})}}function Ea(t){t.config.editor_types={text:new(ba()),number:new(xa()),select:new($a()),date:new(wa(t)),predecessor:new(Sa(t)),duration:new(Ta(t))}}function Da(t){var e=function(a){var r=null;return{setMapping:function(s){r=s},getMapping:function(){return r||(a.config.keyboard_navigation_cells&&a.ext.keyboardNavigation?ya:ka)}}}(t),n={};nt(n);var i={init:Ea,createEditors:function(a){function r(u,h){var g=a.$getConfig(),f=function(b,_){for(var m=a.$getConfig(),p=a.getItemTop(b),k=a.getItemHeight(b),$=a.getGridColumns(),w=0,x=0,S=0,T=0;T<$.length;T++){if($[T].name==_){S=$[T].width;break}m.rtl?x+=$[T].width:w+=$[T].width}return m.rtl?{top:p,right:x,height:k,width:S}:{top:p,left:w,height:k,width:S}}(u,h),y=document.createElement("div");y.className="gantt_grid_editor_placeholder",y.setAttribute(a.$config.item_attribute,u),y.setAttribute(a.$config.bind+"_id",u),y.setAttribute("data-column-name",h);var v=function(b,_){for(var m=b.getGridColumns(),p=0;p0?t.getNext:t.getPrev,g=(h=t.bind(h,t))(this._itemId);t.isTaskExists(g)&&t.isReadonly(t.getTask(g));)g=h(g);return g},editNextRow:function(u){var h=this.getState().id;if(t.isTaskExists(h)){var g=null;g=u?this.moveRow(1):t.getNext(h),t.isTaskExists(g)&&this.startEdit(g,this._columnName)}},editPrevRow:function(u){var h=this.getState().id;if(t.isTaskExists(h)){var g=null;g=u?this.moveRow(-1):t.getPrev(h),t.isTaskExists(g)&&this.startEdit(g,this._columnName)}},destructor:function(){o.forEach(function(u){d.detachEvent(u)}),l.forEach(function(u){t.detachEvent(u)}),o=[],l=[],d=null,this.hide(),this.detachAllEvents()}};return N(c,e),N(c,n),c}};return N(i,e),N(i,n),i}function ye(t,e,n,i,a){if(!t.start_date||!t.end_date)return null;var r=n.getItemTop(t.id),s=n.getItemHeight(t.id);if(r>e.y_end||r+se.x_end||c + +`,A.appendChild(L),S.appendChild(L)}}(r,b,_,d,c);var m=function(x,S,T){var C=document.createElement("div");return t.getTaskType(x.type)!=t.config.types.milestone?C.innerHTML=T.task_text(x.start_date,x.end_date,x):t.getTaskType(x.type)==t.config.types.milestone&&S&&(C.style.height=C.style.width=S+"px"),C.className="gantt_task_content",C}(r,_,c);r.textColor&&(m.style.color=r.textColor),b.appendChild(m);var p=function(x,S,T,C){var E=C.$getConfig(),D=[x];S&&D.push(S);var A=t.getState(),I=t.getTask(T);if(t.getTaskType(I.type)==E.types.milestone?D.push("gantt_milestone"):t.getTaskType(I.type)==E.types.project&&D.push("gantt_project"),D.push("gantt_bar_"+t.getTaskType(I.type)),t.isSummaryTask(I)&&D.push("gantt_dependent_task"),t.isSplitTask(I)&&(E.open_split_tasks&&!I.$open||!E.open_split_tasks)&&D.push("gantt_split_parent"),E.select_task&&t.isSelectedTask(T)&&D.push("gantt_selected"),T==A.drag_id&&(D.push("gantt_drag_"+A.drag_mode),A.touch_drag&&D.push("gantt_touch_"+A.drag_mode)),A.link_source_id==T&&(D.push("gantt_link_source"),A.link_from_start?D.push("gantt_link_from_start"):D.push("gantt_link_from_end")),A.link_target_id==T&&D.push("gantt_link_target"),E.highlight_critical_path&&t.isCriticalTask&&t.isCriticalTask(I)&&D.push("gantt_critical_task"),A.link_landing_area&&A.link_target_id&&A.link_source_id&&A.link_target_id!=A.link_source_id&&(A.link_target_id==T||A.link_source_id==T)){var M=A.link_source_id,L=A.link_from_start,P=A.link_to_start,H="";H=t.isLinkAllowed(M,T,L,P)?P?"link_start_allow":"link_finish_allow":P?"link_start_deny":"link_finish_deny",D.push(H)}return D.join(" ")}("gantt_task_line",c.task_class(r.start_date,r.end_date,r),r.id,s);(r.color||r.progressColor||r.textColor)&&(p+=" gantt_task_inline_color"),l.width<20&&(p+=" gantt_thin_task"),b.className=p;var k=["left:"+l.left+"px","top:"+(f+l.top)+"px","height:"+h+"px","line-height:"+Math.max(h<30?h-2:h,0)+"px","width:"+_+"px"];b.style.cssText=k.join(";"),r.color&&b.style.setProperty("--dhx-gantt-task-background",r.color),r.textColor&&b.style.setProperty("--dhx-gantt-task-color",r.textColor),r.progressColor&&b.style.setProperty("--dhx-gantt-task-progress-color",r.progressColor);var $=function(x,S,T,C){var E="gantt_left "+i(!S.rtl,x),D=null;return C&&(D={type:"marginRight",value:C}),n(x,T.leftside_text,E,D)}(r,d,c,g);$&&b.appendChild($),$=function(x,S,T,C){var E="gantt_right "+i(!!S.rtl,x),D=null;return C&&(D={type:"marginLeft",value:C}),n(x,T.rightside_text,E,D)}(r,d,c,g),$&&b.appendChild($),t._waiAria.setTaskBarAttr(r,b);var w=t.getState();return t.isReadonly(r)||(d.drag_resize&&!t.isSummaryTask(r)&&u!=d.types.milestone&&a(b,"gantt_task_drag",r,function(x){var S=document.createElement("div");return S.className=x,S},d),d.drag_links&&d.show_links&&a(b,"gantt_link_control",r,function(x){var S=document.createElement("div");S.className=x,S.style.cssText=["height:"+h+"px","line-height:"+h+"px"].join(";");var T=document.createElement("div");T.className="gantt_link_point";var C=!1;return w.link_source_id&&d.touch&&(C=!0),T.style.display=C?"block":"",S.appendChild(T),S},d,g)),b}function n(r,s,o,l){if(!s)return null;var d=s(r.start_date,r.end_date,r);if(!d)return null;var c=document.createElement("div");return c.className="gantt_side_content "+o,c.innerHTML=d,l&&(c.style[l.type]=Math.abs(l.value)+"px"),c}function i(r,s){var o=r?{$source:[t.config.links.start_to_start],$target:[t.config.links.start_to_start,t.config.links.finish_to_start]}:{$source:[t.config.links.finish_to_start,t.config.links.finish_to_finish],$target:[t.config.links.finish_to_finish]};for(var l in o)for(var d=s[l],c=0;c=+h.min_date&&((u=l([s,d.rtl?"task_right":"task_left","task_start_date"].join(" "))).setAttribute("data-bind-property","start_date"),c&&(u.style.marginLeft=c+"px"),r.appendChild(u)),+o.end_date<=+h.max_date&&((u=l([s,d.rtl?"task_left":"task_right","task_end_date"].join(" "))).setAttribute("data-bind-property","end_date"),c&&(u.style.marginRight=c+"px"),r.appendChild(u))}return function(r,s,o){var l=(o=s.$getConfig()).type_renderers[t.getTaskType(r.type)],d=e;return l?l.call(t,r,function(c){return d.call(t,c,s,o)},s):d.call(t,r,s,o)}}function fn(t){return{render:gn(t),update:null,isInViewPort:ye,getVisibleRange:gt}}function Mt(){return console.error("You are trying to use a Pro feature that is not available in the GPL version."),{render:function(){},isInViewPort:function(){},getVisibleRange:function(){}}}function pn(t,e,n){return{top:e.getItemTop(t.id),height:e.getItemHeight(t.id),left:0,right:1/0}}function Ut(t,e){var n=0,i=t.left.length-1;if(e)for(var a=0;ae.x_end){i=a;break}}return{start:n,end:i}}function be(t,e,n,i){var a=e.width[t];if(a<=0)return!1;if(!i.config.smart_rendering||At(i))return!0;var r=e.left[t]-a,s=e.left[t]+a;return r<=n.x_end&&s>=n.x}function Aa(t,e){var n=e.config.timeline_placeholder;if(t=t||[],n&&t.filter(l=>l.id==="timeline_placeholder_task").length===0){var i=e.getState(),a=null,r=i.min_date,s=i.max_date;t.length&&(a=t[t.length-1].id);var o={start_date:r,end_date:s,row_height:n.height||0,id:"timeline_placeholder_task",unscheduled:!0,lastTaskId:a,calendar_id:n.calendar||"global",$source:[],$target:[]};t.push(o)}}function Ia(t){var e={current_pos:null,dirs:{left:"left",right:"right",up:"up",down:"down"},path:[],clear:function(){this.current_pos=null,this.path=[]},point:function(a){this.current_pos=t.copy(a)},get_lines:function(a){this.clear(),this.point(a[0]);for(var r=1;ra.x?this.dirs.right:r.y>a.y?this.dirs.down:this.dirs.up}},n={path:[],clear:function(){this.path=[]},current:function(){return this.path[this.path.length-1]},point:function(a){return a?(this.path.push(t.copy(a)),a):this.current()},point_to:function(a,r,s){s=s?{x:s.x,y:s.y}:t.copy(this.point());var o=e.dirs;switch(a){case o.left:s.x-=r;break;case o.right:s.x+=r;break;case o.up:s.y-=r;break;case o.down:s.y+=r}return this.point(s)},get_points:function(a,r,s,o){var l=this.get_endpoint(a,r,s,o),d=t.config,c=l.e_y-l.y,u=l.e_x-l.x,h=e.dirs,g=r.getItemHeight(a.source);this.clear(),this.point({x:l.x,y:l.y});var f=2*d.link_arrow_size,y=this.get_line_type(a,r.$getConfig()),v=l.e_x>l.x;if(y.from_start&&y.to_start)this.point_to(h.left,f),v?(this.point_to(h.down,c),this.point_to(h.right,u)):(this.point_to(h.right,u),this.point_to(h.down,c)),this.point_to(h.right,f);else if(!y.from_start&&y.to_start)if(v=l.e_x>l.x+2*f,this.point_to(h.right,f),v)u-=f,this.point_to(h.down,c),this.point_to(h.right,u);else{u-=2*f;var b=c>0?1:-1;this.point_to(h.down,b*(g/2)),this.point_to(h.right,u),this.point_to(h.down,b*(Math.abs(c)-g/2)),this.point_to(h.right,f)}else y.from_start||y.to_start?y.from_start&&!y.to_start&&(v=l.e_x>l.x-2*f,this.point_to(h.left,f),v?(u+=2*f,b=c>0?1:-1,this.point_to(h.down,b*(g/2)),this.point_to(h.right,u),this.point_to(h.down,b*(Math.abs(c)-g/2)),this.point_to(h.left,f)):(u+=f,this.point_to(h.down,c),this.point_to(h.right,u))):(this.point_to(h.right,f),v?(this.point_to(h.right,u),this.point_to(h.down,c)):(this.point_to(h.down,c),this.point_to(h.right,u)),this.point_to(h.left,f));return this.path},get_line_type:function(a,r){var s=r.links,o=!1,l=!1;return a.type==s.start_to_start?o=l=!0:a.type==s.finish_to_finish?o=l=!1:a.type==s.finish_to_start?(o=!1,l=!0):a.type==s.start_to_finish?(o=!0,l=!1):t.assert(!1,"Invalid link type"),r.rtl&&(o=!o,l=!l),{from_start:o,to_start:l}},get_endpoint:function(a,r,s,o){var l=r.$getConfig(),d=this.get_line_type(a,l),c=d.from_start,u=d.to_start,h=i(s,r,l),g=i(o,r,l);return{x:c?h.left:h.left+h.width,e_x:u?g.left:g.left+g.width,y:h.top+h.rowHeight/2-1,e_y:g.top+g.rowHeight/2-1}}};function i(a,r,s){var o=r.getItemPosition(a);let l=_i(t,r,a),d=l.maxHeight,c=l.splitChild;const u=t.config.baselines!==!1&&(t.config.baselines.render_mode=="separateRow"||t.config.baselines.render_mode=="individualRow")&&a.baselines&&a.baselines.length;let h;l.shrinkHeight&&(o.rowHeight=d);let g=t.getTaskType(a.type)==s.types.milestone;if(g){let f=r.getBarHeight(a.id,!0);h=Math.sqrt(2*f*f),l.shrinkHeight&&d=o.height){const f=hi(t,a.parent);u||f?g?(o.rowHeight=o.height+4,o.left+=(o.width-o.rowHeight+4)/2,o.width=o.rowHeight-3):o.rowHeight=o.height+6:g&&(o.left+=(h-o.height)/2)}else o.rowHeight=d+2,g&&(o.left+=(o.width-o.rowHeight+4)/2,o.width=o.rowHeight-3);else u&&(o.rowHeight=o.height+4);return o}return{render:function(a,r,s){var o=t.getTask(a.source);if(o.hide_bar)return;var l=t.getTask(a.target);if(l.hide_bar)return;var d=n.get_endpoint(a,r,o,l),c=d.e_y-d.y;if(!(d.e_x-d.x)&&!c)return null;var u=n.get_points(a,r,o,l);const h=function(v,b){const _=b.link_radius||4,m=b.link_arrow_size||6,p=[];for(let $=0;$v.size>0),s),g=function(v,b,_,m){const p=document.createElement("div");return v.forEach(k=>{let $;k.type==="line"?$=e.render_line(k.data,null,b,_.source):k.type==="corner"?$=e.render_corner(k.data,b):k.type==="arrow"&&($=e.render_arrow(k.data,m)),p.appendChild($)}),p}(h,r,a,s);var f="gantt_task_link";a.color&&(f+=" gantt_link_inline_color");var y=t.templates.link_class?t.templates.link_class(a):"";return y&&(f+=" "+y),s.highlight_critical_path&&t.isCriticalLink&&t.isCriticalLink(a)&&(f+=" gantt_critical_link"),g.className=f,r.$config.link_attribute&&(g.setAttribute(r.$config.link_attribute,a.id),g.setAttribute("link_id",a.id)),a.color&&g.style.setProperty("--dhx-gantt-link-background",a.color),t._waiAria.linkAttr(a,g),g},update:null,isInViewPort:cn,getVisibleRange:dn()}}function Ma(t,e,n,i,a){if(a.$ui.getView("grid")&&(a.config.keyboard_navigation&&a.getSelectedId()||a.ext.inlineEditors&&a.ext.inlineEditors.getState().id))return!0;var r=n.getItemTop(t.id),s=n.getItemHeight(t.id);return!(r>e.y_end||r+sl.y+h-u&&(c=l.y+h-u);const g=l.y+l.height;return c>g-u&&(c=g-u),l.x=d,l.y=c,l},t),i._getTargetY=t.bind(function(o){var l=z(e.$grid_data),d=e.$state.scrollTop||0,c=t.$grid_data.getBoundingClientRect().height+d,u=o.pageY-l.y+d;return u>c?u=c:ud.countVisible()-1?null:d.getIdByIndex(c)},t),i.attachEvent("onDragMove",t.bind(function(o,l){var d=t.$grid_data.getBoundingClientRect(),c=d.height+d.y+(e.$state.scrollTop||0)+window.scrollY,u=i.config,h=i._getGridPos(l);t._waiAria.reorderMarkerAttr(u.marker);var g=e.$getConfig(),f=r();h.yy.width&&(u.marker.style.width=y.width-10-2+"px",u.marker.style.overflow="hidden");var v=f.getItem(i.config.id),b=i._getTargetY(l),_=i._getTaskByY(b,f.getIndexById(v.id));function m(D,A){return!f.isChildOf(p.id,A.id)&&(D.$level==A.$level||g.order_branch_free)}if(f.exists(_)||(_=i.lastTaskOfLevel(g.order_branch_free?v.$level:0))==i.config.id&&(_=null),f.exists(_)){var p=f.getItem(_),k=e.getItemTop(p.id),$=e.getItemHeight(p.id);if(k+$/2=0;)T=f.getIdByIndex(w-E),C=f.getItem(T),E++;if(v.id==p.id||s(p.id))return;m(p,v)&&v.id!=p.id?f.move(v.id,0,0,p.id):p.$level!=v.$level-1||f.getChildren(p.id).length?C&&m(C,v)&&v.id!=C.id&&f.move(v.id,-1,f.getParent(C.id)):f.move(v.id,0,p.id)}return!0},t)),i.attachEvent("onDragEnd",t.bind(function(){var o=r(),l=o.getItem(i.config.id);l.$transparent=!1,l.$open=i.config.initial_open_state,this.callEvent("onBeforeRowDragEnd",[i.config.id,i.config.parent,i.config.index])===!1?(o.move(i.config.id,i.config.index,i.config.parent),l.$drop_target=null):this.callEvent("onRowDragEnd",[i.config.id,l.$drop_target]),t.render(),this.refreshData()},t))}function a(o){return tt(o,e.$config.item_attribute)}function r(){return t.getDatastore(e.$config.bind)}function s(o){return Ct(o,t,r())}}},Z={createDropTargetObject:function(t){var e={targetParent:null,targetIndex:0,targetId:null,child:!1,nextSibling:!1,prevSibling:!1};return t&&N(e,t,!0),e},nextSiblingTarget:function(t,e,n){var i=this.createDropTargetObject();return i.targetId=e,i.nextSibling=!0,i.targetParent=n.getParent(i.targetId),i.targetIndex=n.getBranchIndex(i.targetId),(n.getParent(t)!=i.targetParent||i.targetIndexn.getBranchIndex(t)&&(i.targetIndex-=1),i},firstChildTarget:function(t,e,n){var i=this.createDropTargetObject();return i.targetId=e,i.targetParent=i.targetId,i.targetIndex=0,i.child=!0,i},lastChildTarget:function(t,e,n){var i=n.getChildren(e),a=this.createDropTargetObject();return a.targetId=i[i.length-1],a.targetParent=e,a.targetIndex=i.length,a.nextSibling=!0,a}};function mn(t,e,n,i,a){for(var r=e;i.exists(r);){var s=i.calculateItemLevel(i.getItem(r));if((s===n||s===n-1)&&i.getBranchIndex(r)>-1)break;r=a?i.getPrev(r):i.getNext(r)}return i.exists(r)?i.calculateItemLevel(i.getItem(r))===n?a?Z.nextSiblingTarget(t,r,i):Z.prevSiblingTarget(t,r,i):Z.firstChildTarget(t,r,i):null}function xe(t,e,n,i){return mn(t,e,n,i,!0)}function vn(t,e,n,i){return mn(t,e,n,i,!1)}function kn(t,e,n,i,a,r){var s;if(e!==a.$getRootId()){var o=a.getItem(e),l=a.calculateItemLevel(o);if(l===r){var d=a.getPrevSibling(e);n<.5&&!d?s=Z.prevSiblingTarget(t,e,a):(n<.5&&(e=d),s=Z.nextSiblingTarget(t,e,a))}else if(l>r)a.eachParent(function(f){a.calculateItemLevel(f)===r&&(e=f.id)},o),s=xe(t,e,r,a);else{var c=xe(t,e,r,a),u=vn(t,e,r,a);s=n<.5?c:u}}else{var h=a.$getRootId(),g=a.getChildren(h);s=Z.createDropTargetObject(),s=g.length&&i>=0?xe(t,function(f){for(var y=f.getNext();f.exists(y);){var v=f.getNext(y);if(!f.exists(v))return y;y=v}return null}(a),r,a):vn(t,h,r,a)}return s}function yn(t,e){var n=z(e.$grid_data);return t.x+=n.x+e.$grid.scrollLeft,t.y+=n.y-e.$grid_data.scrollTop,t}function $e(t,e,n=0){const i=z(t.$root);return e>i.width&&(e=i.width-n-2),e}const bn={removeLineHighlight:function(t){t.markerLine&&t.markerLine.parentNode&&t.markerLine.parentNode.removeChild(t.markerLine),t.markerLine=null},highlightPosition:function(t,e,n){var i=function(r,s){var o=z(s.$grid_data),l=ot(r,s.$grid_data),d=o.x+s.$grid.scrollLeft,c=l.y-10,u=s.getItemHeight(r.targetId);co.y+h-u&&(c=o.y+h-u),o.x=d,o.y=c,o.width=$e(s.$gantt,o.width,9),o}(t,n);e.marker.style.left=i.x+9+"px",e.marker.style.width=i.width+"px",e.marker.style.overflow="hidden";var a=e.markerLine;a||((a=document.createElement("div")).className="gantt_drag_marker gantt_grid_dnd_marker",a.innerHTML="
",a.style.pointerEvents="none"),t.child?function(r,s,o){var l=r.targetParent,d=yn({x:0,y:o.getItemTop(l)},o),c=o.$grid_data.getBoundingClientRect().bottom+window.scrollY;let u=$e(o.$gantt,o.$grid_data.offsetWidth);s.innerHTML="
",s.style.width=u+"px",s.style.top=d.y+"px",s.style.left=d.x+"px",s.style.height=o.getItemHeight(l)+"px",d.y>c&&(s.style.top=c+"px")}(t,a,n):function(r,s,o){var l=function(u,h){var g=h.$config.rowStore,f={x:0,y:0},y=h.$grid_data.querySelector(".gantt_tree_indent"),v=15,b=0;y&&(v=y.offsetWidth);var _=40;if(u.targetId!==g.$getRootId()){var m=h.getItemTop(u.targetId),p=h.getItemHeight(u.targetId);if(b=g.exists(u.targetId)?g.calculateItemLevel(g.getItem(u.targetId)):0,u.prevSibling)f.y=m;else if(u.nextSibling){var k=0;g.eachItem(function($){g.getIndexById($.id)!==-1&&k++},u.targetId),f.y=m+p+k*p}else f.y=m+p,b+=1}return f.x=_+b*v,f.width=$e(h.$gantt,Math.max(h.$grid_data.offsetWidth-f.x,0),f.x),yn(f,h)}(r,o),d=o.$grid_data.getBoundingClientRect().bottom+window.scrollY;s.innerHTML="
",s.style.left=l.x+"px",s.style.height="4px";var c=l.y-2;s.style.top=c+"px",s.style.width=l.width+"px",c>d&&(s.style.top=d+"px")}(t,a,n),e.markerLine||(document.body.appendChild(a),e.markerLine=a)}},Pa={init:function(t,e){var n=t.$services.getService("dnd");if(e.$config.bind&&t.getDatastore(e.$config.bind)){var i=new n(e.$grid_data,{updates_per_second:60});t.defined(e.$getConfig().dnd_sensitivity)&&(i.config.sensitivity=e.$getConfig().dnd_sensitivity),i.attachEvent("onBeforeDragStart",t.bind(function(o,l){var d=a(l);if(!d||(t.hideQuickInfo&&t.hideQuickInfo(),lt(l.target,".gantt_grid_editor_placeholder")))return!1;var c=d.getAttribute(e.$config.item_attribute),u=e.$config.rowStore.getItem(c);return!t.isReadonly(u)&&!r(c)&&(i.config.initial_open_state=u.$open,!!t.callEvent("onRowDragStart",[c,l.target||l.srcElement,l])&&void 0)},t)),i.attachEvent("onAfterDragStart",t.bind(function(o,l){var d=a(l);i.config.marker.innerHTML=d.outerHTML;var c=i.config.marker.firstChild;c&&(i.config.marker.style.opacity=.4,c.style.position="static",c.style.pointerEvents="none"),i.config.id=d.getAttribute(e.$config.item_attribute);var u=e.$config.rowStore,h=u.getItem(i.config.id);i.config.level=u.calculateItemLevel(h),i.config.drop_target=Z.createDropTargetObject({targetParent:u.getParent(h.id),targetIndex:u.getBranchIndex(h.id),targetId:h.id,nextSibling:!0}),h.$open=!1,h.$transparent=!0,this.refreshData()},t)),i.attachEvent("onDragMove",t.bind(function(o,l){var d=s(l);return d&&t.callEvent("onBeforeRowDragMove",[i.config.id,d.targetParent,d.targetIndex])!==!1||(d=Z.createDropTargetObject(i.config.drop_target)),bn.highlightPosition(d,i.config,e),i.config.drop_target=d,t._waiAria.reorderMarkerAttr(i.config.marker),this.callEvent("onRowDragMove",[i.config.id,d.targetParent,d.targetIndex]),!0},t)),i.attachEvent("onDragEnd",t.bind(function(){var o=e.$config.rowStore,l=o.getItem(i.config.id);bn.removeLineHighlight(i.config),l.$transparent=!1,l.$open=i.config.initial_open_state;var d=i.config.drop_target;this.callEvent("onBeforeRowDragEnd",[i.config.id,d.targetParent,d.targetIndex])===!1?l.$drop_target=null:(o.move(i.config.id,d.targetIndex,d.targetParent),t.render(),this.callEvent("onRowDragEnd",[i.config.id,d.targetParent,d.targetIndex])),o.refresh(l.id)},t))}function a(o){return tt(o,e.$config.item_attribute)}function r(o){return Ct(o,t,t.getDatastore(e.$config.bind))}function s(o){var l,d=function(f){var y=ot(f,e.$grid_data).y,v=e.$config.rowStore;document.doctype||(y+=window.scrollY),y=y||0;var b=e.$state.scrollTop||0,_=t.$grid_data.getBoundingClientRect().height+b+window.scrollY,m=b,p=e.getItemIndexByTopPosition(e.$state.scrollTop);if(v.exists(p)||(p=v.countVisible()-1),p<0)return v.$getRootId();var k=v.getIdByIndex(p),$=e.$state.scrollTop/e.getItemHeight(k),w=$-Math.floor($);w>.1&&w<.9&&(_-=e.getItemHeight(k)*w,m+=e.getItemHeight(k)*(1-w));const x=z(e.$grid_data),S=x.y+x.height,T=i.config.marker.offsetHeight;y+T+window.scrollY>=_&&(i.config.marker.style.top=S-T+"px"),y>=_?y=_:y<=m&&(y=m,i.config.marker.style.top=x.y+"px");var C=e.getItemIndexByTopPosition(y);if(C>v.countVisible()-1||C<0)return v.$getRootId();var E=v.getIdByIndex(C);return r(E)?v.getPrevSibling(E):v.getIdByIndex(C)}(o),c=null,u=e.$config.rowStore,h=!e.$getConfig().order_branch_free,g=ot(o,e.$grid_data).y;return document.doctype||(g+=window.scrollY),d!==u.$getRootId()&&(c=(g-e.getItemTop(d))/e.getItemHeight(d)),h?(l=kn(i.config.id,d,c,g,u,i.config.level))&&l.targetParent&&r(l.targetParent)&&(d=u.getPrevSibling(l.targetParent),l=kn(i.config.id,d,c,g,u,i.config.level)):l=function(f,y,v,b,_){var m;if(y!==_.$getRootId())m=v<.25?Z.prevSiblingTarget(f,y,_):!(v>.6)||_.hasChild(y)&&_.getItem(y).$open?Z.firstChildTarget(f,y,_):Z.nextSiblingTarget(f,y,_);else{var p=_.$getRootId();m=_.hasChild(p)&&b>=0?Z.lastChildTarget(f,p,_):Z.firstChildTarget(f,p,_)}return m}(i.config.id,d,c,g,u),l}}};var Ra=function(t){return{onCreated:function(e){e.$config=N(e.$config,{bind:"task"}),e.$config.id=="grid"&&(this.extendGantt(e),t.ext.inlineEditors=t.ext._inlineEditors.createEditors(e),t.ext.inlineEditors.init()),this._mouseDelegates=ve(t)},onInitialized:function(e){var n=e.$getConfig();n.order_branch&&(n.order_branch=="marker"?Pa.init(e.$gantt,e):La.init(e.$gantt,e)),this.initEvents(e,t),e.$config.id=="grid"&&this.extendDom(e)},onDestroyed:function(e){e.$config.id=="grid"&&t.ext.inlineEditors.destructor(),this.clearEvents(e,t)},initEvents:function(e,n){this._mouseDelegates.delegate("click","gantt_row",n.bind(function(i,a,r){var s=e.$getConfig();if(a!==null){var o=this.getTask(a);s.scroll_on_click&&!n._is_icon_open_click(i)&&this.showDate(o.start_date),n.callEvent("onTaskRowClick",[a,r])}},n),e.$grid),this._mouseDelegates.delegate("click","gantt_grid_head_cell",n.bind(function(i,a,r){var s=r.getAttribute("data-column-id");if(n.callEvent("onGridHeaderClick",[s,i])){var o=e.$getConfig();if(s!="add"){if(o.sort&&s){for(var l,d=s,c=0;cf){var y=f-h.end;(yl||l===void 0)&&(l=v)}}return l},_move:function(s,o,l,d){var c=this._drag_task_coords(s,l),u=null,h=null;d?(u=new Date(+l.obj.start_date+d),h=new Date(+l.obj.end_date+d)):(u=a.dateFromPos(c.start+o),h=a.dateFromPos(c.end+o)),u?h?(s.start_date=u,s.end_date=h):(s.end_date=new Date(a.getState().max_date),s.start_date=a.dateFromPos(a.posFromDate(s.end_date)-(c.end-c.start))):(s.start_date=new Date(a.getState().min_date),s.end_date=a.dateFromPos(a.posFromDate(s.start_date)+(c.end-c.start)))},_drag_task_coords:function(s,o){return{start:o.obj_s_x=o.obj_s_x||a.posFromDate(s.start_date),end:o.obj_e_x=o.obj_e_x||a.posFromDate(s.end_date)}},_mouse_position_change:function(s,o){var l=s.x-o.x,d=s.y-o.y;return Math.sqrt(l*l+d*d)},_is_number:function(s){return!isNaN(parseFloat(s))&&isFinite(s)},on_mouse_move:function(s){if(this.drag.start_drag){var o=ot(s,a.$task_data),l=this.drag.start_drag.start_x,d=this.drag.start_drag.start_y;(Date.now()-this.drag.timestamp>50||this._is_number(l)&&this._is_number(d)&&this._mouse_position_change({x:l,y:d},o)>20)&&this._start_dnd(s)}if(this.drag.mode){if(!Ue(this,40))return;this._update_on_move(s)}},_update_item_on_move:function(s,o,l,d,c,u){var h=a.getTask(o),g=a.mixin({},h),f=a.mixin({},h);this._handlers[l].apply(this,[f,s,d,u]),a.mixin(h,f,!0),a.callEvent("onTaskDrag",[h.id,l,f,g,c]),a.mixin(h,f,!0),a.refreshTask(o)},_update_on_move:function(s){var o=this.drag,l=i.$getConfig();if(o.mode){var d=ot(s,i.$task_data);if(o.pos&&o.pos.x==d.x)return;o.pos=d;var c=a.dateFromPos(d.x);if(!c||isNaN(c.getTime()))return;var u=d.x-o.start_x,h=a.getTask(o.id);if(this._handlers[o.mode]){if(o.mode===l.drag_mode.move){var g={};this._isMultiselect()&&a.getSelectedTasks().indexOf(o.id)>=0&&(g=this.dragMultiple);var f=!1;if(a.isSummaryTask(h)&&a.config.drag_project){var y={};y[o.id]=V(o),f=!0,g=N(y,this.dragMultiple)}var v=this._find_max_shift(g,u);for(var b in v!==void 0&&(u=v),this._update_item_on_move(u,o.id,o.mode,o,s),g){var _=g[b];if(f&&_.id!=o.id&&(a._bulk_dnd=!0),v===void 0&&(f||Object.keys(g).length>1))var m=c-a.dateFromPos(o.start_x);this._update_item_on_move(u,_.id,_.mode,_,s,m)}a._bulk_dnd=!1}else this._update_item_on_move(u,o.id,o.mode,o,s);a._update_parents(o.id)}}},on_mouse_down:function(s,o){if(s.button!=2||s.button===void 0){var l=i.$getConfig(),d=a.locate(s),c=null;if(a.isTaskExists(d)&&(c=a.getTask(d)),!a.isReadonly(c)&&!this.drag.mode){this.clear_drag_state();var u=K(o=o||s.target||s.srcElement),h=this._get_drag_mode(u,o);if(!u||!h)return o.parentNode?this.on_mouse_down(s,o.parentNode):void 0;if(h)if(h.mode&&h.mode!=l.drag_mode.ignore&&l["drag_"+h.mode]){if(d=a.locate(o),c=a.copy(a.getTask(d)||{}),a.isReadonly(c))return this.clear_drag_state(),!1;if(a.isSummaryTask(c)&&c.auto_scheduling!==!1&&!l.drag_project&&h.mode!=l.drag_mode.progress)return void this.clear_drag_state();h.id=d;var g=ot(s,a.$task_data);h.start_x=g.x,h.start_y=g.y,h.obj=c,this.drag.start_drag=h,this.drag.timestamp=Date.now()}else this.clear_drag_state();else if(a.checkEvent("onMouseDown")&&a.callEvent("onMouseDown",[u.split(" ")[0]])&&o.parentNode)return this.on_mouse_down(s,o.parentNode)}}},_fix_dnd_scale_time:function(s,o){var l=i.$getConfig(),d=a.getScale().unit,c=a.getScale().step;function u(h){if(a.config.correct_work_time){var g=i.$getConfig();a.isWorkTime(h.start_date,void 0,h)||(h.start_date=a.calculateEndDate({start_date:h.start_date,duration:-1,unit:g.duration_unit,task:h}))}}l.round_dnd_dates||(d="minute",c=l.time_step),o.mode==l.drag_mode.resize?o.left?(s.start_date=a.roundDate({date:s.start_date,unit:d,step:c}),u(s)):(s.end_date=a.roundDate({date:s.end_date,unit:d,step:c}),function(h){if(a.config.correct_work_time){var g=i.$getConfig();a.isWorkTime(new Date(h.end_date-1),void 0,h)||(h.end_date=a.calculateEndDate({start_date:h.end_date,duration:1,unit:g.duration_unit,task:h}))}}(s)):o.mode==l.drag_mode.move&&(s.start_date=a.roundDate({date:s.start_date,unit:d,step:c}),u(s),s.end_date=a.calculateEndDate(s))},_fix_working_times:function(s,o){var l=i.$getConfig();(o=o||{mode:l.drag_mode.move}).mode==l.drag_mode.resize?o.left?s.start_date=a.getClosestWorkTime({date:s.start_date,dir:"future",task:s}):s.end_date=a.getClosestWorkTime({date:s.end_date,dir:"past",task:s}):o.mode==l.drag_mode.move&&a.correctTaskWorkTime(s)},_finalize_mouse_up:function(s,o,l,d){var c=a.getTask(s);if(o.work_time&&o.correct_work_time&&this._fix_working_times(c,l),this._fix_dnd_scale_time(c,l),this._fireEvent("before_finish",l.mode,[s,l.mode,a.copy(l.obj),d])){var u=s;a._init_task_timing(c),this.clear_drag_state(),a.updateTask(c.id),this._fireEvent("after_finish",l.mode,[u,l.mode,d])}else this.clear_drag_state(),s==l.id&&(l.obj._dhx_changed=!1,a.mixin(c,l.obj,!0)),a.refreshTask(c.id)},on_mouse_up:function(s){var o=this.drag;if(o.mode&&o.id){var l=i.$getConfig(),d=a.getTask(o.id),c=this.dragMultiple,u=!1,h=0;o.mode===l.drag_mode.move&&(a.isSummaryTask(d)&&l.drag_project||this._isMultiselect())&&(u=!0,h=Object.keys(c).length);var g=function(){if(u)for(var f in c)c[f].id!=o.id&&this._finalize_mouse_up(c[f].id,l,c[f],s);this._finalize_mouse_up(o.id,l,o,s)};u&&h>10?a.batchUpdate((function(){g.call(this)}).bind(this)):g.call(this)}this.clear_drag_state()},_get_drag_mode:function(s,o){var l=i.$getConfig().drag_mode,d={mode:null,left:null};switch((s||"").split(" ")[0]){case"gantt_task_line":case"gantt_task_content":d.mode=l.move;break;case"gantt_task_drag":d.mode=l.resize;var c=o.getAttribute("data-bind-property");d.left=c=="start_date";break;case"gantt_task_progress_drag":d.mode=l.progress;break;case"gantt_link_control":case"gantt_link_point":d.mode=l.ignore;break;default:d=null}return d},_start_dnd:function(s){var o=this.drag=this.drag.start_drag;delete o.start_drag;var l=i.$getConfig(),d=o.id;if(l["drag_"+o.mode]&&a.callEvent("onBeforeDrag",[d,o.mode,s])&&this._fireEvent("before_start",o.mode,[d,o.mode,s])){delete o.start_drag;var c=a.getTask(d);if(a.isReadonly(c))return void this.clear_drag_state();if(this._isMultiselect()){var u=a.getSelectedTasks();u.indexOf(o.id)>=0&&kt(u,a.bind(function(h){var g=a.getTask(h);a.isSummaryTask(g)&&a.config.drag_project&&o.mode==l.drag_mode.move&&this._addSubtasksToDragMultiple(g.id),this.dragMultiple[h]=a.mixin({id:g.id,obj:a.copy(g)},this.drag)},this))}a.isSummaryTask(c)&&a.config.drag_project&&o.mode==l.drag_mode.move&&this._addSubtasksToDragMultiple(c.id),a.callEvent("onTaskDragStart",[])}else this.clear_drag_state()},_fireEvent:function(s,o,l){a.assert(this._events[s],"Invalid stage:{"+s+"}");var d=this._events[s][o];return a.assert(d,"Unknown after drop mode:{"+o+"}"),a.assert(l,"Invalid event arguments"),!a.checkEvent(d)||a.callEvent(d,l)},round_task_dates:function(s){var o=this.drag,l=i.$getConfig();o||(o={mode:l.drag_mode.move}),this._fix_dnd_scale_time(s,o)},destructor:function(){this._domEvents.detachAll()},_isMultiselect:function(){return a.config.drag_multiple&&!!(a.getSelectedTasks&&a.getSelectedTasks().length>0)},_addSubtasksToDragMultiple:function(s){a.eachTask(function(o){this.dragMultiple[o.id]=a.mixin({id:o.id,obj:a.copy(o)},this.drag)},s,this)}}}(e,n),e._tasks_dnd=t,t.init(n)},destructor:function(){t&&(t.destructor(),t=null)}}}};var Oa=function(t,e){var n,i,a,r,s;function o(){return{link_source_id:r,link_target_id:i,link_from_start:s,link_to_start:a,link_landing_area:n}}var l=e.$services,d=l.getService("state"),c=l.getService("dnd");d.registerProvider("linksDnD",o);var u="gantt_link_point",h="gantt_link_control",g=new c(t.$task_bars,{sensitivity:0,updates_per_second:60,mousemoveContainer:e.$root,selector:"."+u,preventDefault:!0});function f(m,p){var k,$=g.getPosition(m),w=function(A){var I=0,M=0;return A&&(I=A.offsetWidth||0,M=A.offsetHeight||0),{width:I,height:M}}(p),x={right:(k=e.$root).offsetWidth,bottom:k.offsetHeight},S=e.config.tooltip_offset_x||10,T=e.config.tooltip_offset_y||10,C=e.config.scroll_size||18,E=e.$container.getBoundingClientRect().y+window.scrollY,D={y:$.y+T,x:$.x+S,bottom:$.y+w.height+T+C,right:$.x+w.width+S+C};return D.bottom>x.bottom+E&&(D.y=x.bottom+E-w.height-T),D.right>x.right&&(D.x=x.right-w.width-S),D}function y(m){var p=o();p.link_source_id&&p.link_target_id&&e.isLinkAllowed(p.link_source_id,p.link_target_id,p.link_from_start,p.link_to_start);var k="";m.innerHTML=k}function v(){r=s=i=null,a=!0}function b(m,p,k,$){var w=function(){return g._direction&&g._direction.parentNode||(g._direction=document.createElement("div"),t.$task_links.appendChild(g._direction)),g._direction}(),x=o(),S=["gantt_link_direction"];e.templates.link_direction_class&&S.push(e.templates.link_direction_class(x.link_source_id,x.link_from_start,x.link_target_id,x.link_to_start));var T=Math.sqrt(Math.pow(k-m,2)+Math.pow($-p,2));if(T=Math.max(0,T-3)){w.className=S.join(" ");var C=($-p)/(k-m),E=Math.atan(C);_(m,k,p,$)==2?E+=Math.PI:_(m,k,p,$)==3&&(E-=Math.PI);var D=Math.sin(E),A=Math.cos(E),I=Math.round(p),M=Math.round(m),L=["-webkit-transform: rotate("+E+"rad)","-moz-transform: rotate("+E+"rad)","-ms-transform: rotate("+E+"rad)","-o-transform: rotate("+E+"rad)","transform: rotate("+E+"rad)","width:"+Math.round(T)+"px"];if(window.navigator.userAgent.indexOf("MSIE 8.0")!=-1){L.push('-ms-filter: "'+function(U,ft){return"progid:DXImageTransform.Microsoft.Matrix(M11 = "+ft+",M12 = -"+U+",M21 = "+U+",M22 = "+ft+",SizingMethod = 'auto expand')"}(D,A)+'"');var P=Math.abs(Math.round(m-k)),H=Math.abs(Math.round($-p));switch(_(m,k,p,$)){case 1:I-=H;break;case 2:M-=P,I-=H;break;case 3:M-=P}}L.push("top:"+I+"px"),L.push("left:"+M+"px"),w.style.cssText=L.join(";")}}function _(m,p,k,$){return p>=m?$<=k?1:4:$<=k?2:3}g.attachEvent("onBeforeDragStart",e.bind(function(m,p){var k=p.target||p.srcElement;if(v(),e.getState("tasksDnd").drag_id)return!1;if(ht(k,u)){ht(k,"task_start_date")&&(s=!0);var $=e.locate(p);r=$;var w=e.getTask($);return e.isReadonly(w)?(v(),!1):(this._dir_start={x:g.config.original_element_sizes.x+g.config.original_element_sizes.width/2,y:g.config.original_element_sizes.y+g.config.original_element_sizes.height/2},!0)}return!1},this)),g.attachEvent("onAfterDragStart",e.bind(function(m,p){e.config.touch&&e.refreshData(),y(g.config.marker)},this)),g.attachEvent("onDragMove",e.bind(function(m,p){var k=g.config,$=f(p,k.marker);(function(A,I){A.style.left=I.x+"px",A.style.top=I.y+"px"})(k.marker,$);var w=!!ht(p,h),x=i,S=n,T=a,C=e.locate(p),E=!0;if(Y(mt(p),e.$root)||(w=!1,C=null),w&&(E=!ht(p,"task_end_date"),w=!!C),i=C,n=w,a=E,w){const A=ht(p,h).querySelector(`.${u}`);if(A){const I=ee(A,t.$task_data);this._dir_end={x:I.x+A.offsetWidth/2,y:I.y+A.offsetHeight/2}}}else this._dir_end=ot(p,t.$task_data),e.env.isEdge&&(this._dir_end.y+=window.scrollY);var D=!(S==w&&x==C&&T==E);return D&&(x&&e.refreshTask(x,!1),C&&e.refreshTask(C,!1)),D&&y(k.marker),b(this._dir_start.x,this._dir_start.y,this._dir_end.x,this._dir_end.y),!0},this)),g.attachEvent("onDragEnd",e.bind(function(){var m=o();if(m.link_source_id&&m.link_target_id&&m.link_source_id!=m.link_target_id){var p=e._get_link_type(m.link_from_start,m.link_to_start),k={source:m.link_source_id,target:m.link_target_id,type:p};k.type&&e.isLinkAllowed(k)&&e.callEvent("onLinkCreated",[k])&&e.addLink(k)}v(),e.config.touch?e.refreshData():(m.link_source_id&&e.refreshTask(m.link_source_id,!1),m.link_target_id&&e.refreshTask(m.link_target_id,!1)),g._direction&&(g._direction.parentNode&&g._direction.parentNode.removeChild(g._direction),g._direction=null)},this)),e.attachEvent("onGanttRender",e.bind(function(){g._direction&&b(this._dir_start.x,this._dir_start.y,this._dir_end.x,this._dir_end.y)},this))};const Ba=function(){return{init:Oa}};var za=function(t){var e=t.$services;return{onCreated:function(n){var i=n.$config;i.bind=W(i.bind)?i.bind:"task",i.bindLinks=W(i.bindLinks)?i.bindLinks:"link",n._linksDnD=Ba(),n._tasksDnD=Ha.createTaskDND(),n._tasksDnD.extend(n),this._mouseDelegates=ve(t)},onInitialized:function(n){this._attachDomEvents(t),this._attachStateProvider(t,n),n._tasksDnD.init(n,t),n._linksDnD.init(n,t),n.$config.id=="timeline"&&this.extendDom(n)},onDestroyed:function(n){this._clearDomEvents(t),this._clearStateProvider(t),n._tasksDnD&&n._tasksDnD.destructor()},extendDom:function(n){t.$task=n.$task,t.$task_scale=n.$task_scale,t.$task_data=n.$task_data,t.$task_bg=n.$task_bg,t.$task_links=n.$task_links,t.$task_bars=n.$task_bars},_clearDomEvents:function(){this._mouseDelegates.destructor(),this._mouseDelegates=null},_attachDomEvents:function(n){function i(a,r){if(a&&this.callEvent("onLinkDblClick",[a,r])){var s=this.getLink(a);if(this.isReadonly(s))return;var o=this.locale.labels.link+" "+this.templates.link_description(this.getLink(a))+" "+this.locale.labels.confirm_link_deleting;window.setTimeout(function(){n._simple_confirm(o,"",function(){n.deleteLink(a)})},this.config.touch?300:1)}}this._mouseDelegates.delegate("click","gantt_task_link",n.bind(function(a,r){var s=this.locate(a,this.config.link_attribute);s&&this.callEvent("onLinkClick",[s,a])},n),this.$task),this._mouseDelegates.delegate("click","gantt_scale_cell",n.bind(function(a,r){var s=ot(a,n.$task_data),o=n.dateFromPos(s.x),l=Math.floor(n.columnIndexByDate(o)),d=n.getScale().trace_x[l];n.callEvent("onScaleClick",[a,d])},n),this.$task),this._mouseDelegates.delegate("doubleclick","gantt_task_link",n.bind(function(a,r,s){r=this.locate(a,n.config.link_attribute),i.call(this,r,a)},n),this.$task),this._mouseDelegates.delegate("doubleclick","gantt_link_point",n.bind(function(a,r,s){r=this.locate(a);var o=this.getTask(r),l=null;return s.parentNode&&K(s.parentNode)&&(l=K(s.parentNode).indexOf("_left")>-1?o.$target[0]:o.$source[0]),l&&i.call(this,l,a),!1},n),this.$task)},_attachStateProvider:function(n,i){var a=i;e.getService("state").registerProvider("tasksTimeline",function(){return{scale_unit:a._tasks?a._tasks.unit:void 0,scale_step:a._tasks?a._tasks.step:void 0}})},_clearStateProvider:function(){e.getService("state").unregisterProvider("tasksTimeline")}}},Wa=function(t){return{getVerticalScrollbar:function(){return t.$ui.getView("scrollVer")},getHorizontalScrollbar:function(){return t.$ui.getView("scrollHor")},_legacyGridResizerClass:function(e){for(var n=e.getCellsByType("resizer"),i=0;io[1]&&(t.config.grid_width=o[1]),i&&t.config.show_chart){if(a.$config.width=t.config.grid_width-1,!a.$config.scrollable&&a.$config.scrollY&&t.$root.offsetWidth){var l=a.$gantt.$layout.$container.offsetWidth,d=t.$ui.getView(a.$config.scrollY).$config.width,c=l-(a.$config.width+d)-4;c<0&&(a.$config.width+=c,t.config.grid_width+=c)}if(n)a.$parent.$config.width=t.config.grid_width,a.$parent.$config.group&&t.$layout._syncCellSizes(a.$parent.$config.group,{value:a.$parent.$config.width,isGravity:!1});else if(i&&!Y(i.$task,e.$view)){if(!a.$config.original_grid_width){var u=t.skins[t.skin];u&&u.config&&u.config.grid_width?a.$config.original_grid_width=u.config.grid_width:a.$config.original_grid_width=0}t.config.grid_width=a.$config.original_grid_width,a.$parent.$config.width=t.config.grid_width}else a.$parent._setContentSize(a.$config.width,null),t.$layout._syncCellSizes(a.$parent.$config.group,{value:t.config.grid_width,isGravity:!1})}else i&&Y(i.$task,e.$view)&&(a.$config.original_grid_width=t.config.grid_width),n||(a.$parent.$config.width=0)}n=!1}}),this._initScrollStateEvents(e)},_initScrollStateEvents:function(e){t._getVerticalScrollbar=this.getVerticalScrollbar,t._getHorizontalScrollbar=this.getHorizontalScrollbar;var n=this.getVerticalScrollbar(),i=this.getHorizontalScrollbar();n&&n.attachEvent("onScroll",function(a,r,s){var o=t.getScrollState();t.callEvent("onGanttScroll",[o.x,a,o.x,r])}),i&&i.attachEvent("onScroll",function(a,r,s){var o=t.getScrollState();t.callEvent("onGanttScroll",[a,o.y,r,o.y]);var l=t.$ui.getView("grid");l&&l.$grid_data&&!l.$config.scrollable&&(l.$grid_data.style.left=l.$grid.scrollLeft+"px",l.$grid_data.scrollLeft=l.$grid.scrollLeft)}),e.attachEvent("onResize",function(){n&&!t.$scroll_ver&&(t.$scroll_ver=n.$scroll_ver),i&&!t.$scroll_hor&&(t.$scroll_hor=i.$scroll_hor)})},_findGridResizer:function(e,n){for(var i,a=e.getCellsByType("resizer"),r=!0,s=0;s",b=""):(X(v=m.template?m.template(s):s[m.name])&&(v=u.date_grid(v,s,m.name)),v==null&&(v=""),b=v,v="
"+v+"
");var p="gantt_cell"+(_?" gantt_last_cell":""),k=[];if(m.tree){p+=" gantt_cell_tree";for(var $=0;$"+k.join("")+"",g.push(y)}switch(p="",h.$config.name){case"task":p=r.getGlobalTaskIndex(s.id)%2==0?"":" odd";break;case"resource":p=h.visibleOrder.indexOf(s.id)%2==0?"":" odd"}if(p+=s.$transparent?" gantt_transparent":"",p+=s.$dataprocessor_class?" "+s.$dataprocessor_class:"",u.grid_row_class){var T=u.grid_row_class.call(r,s.start_date,s.end_date,s);T&&(p+=" "+T)}h.isSelected(s.id)&&(p+=" gantt_selected");var C=document.createElement("div");C.className="gantt_row"+p+" gantt_row_"+r.getTaskType(s.type);var E=o.getItemHeight(s.id);return C.style.height=E+"px",C.style.lineHeight=E+"px",l.smart_rendering&&(C.style.position="absolute",C.style.left="0px",C.style.top=o.getItemTop(s.id)+"px"),o.$config.item_attribute&&(C.setAttribute(o.$config.item_attribute,s.id),C.setAttribute(o.$config.bind+"_id",s.id)),r._waiAria.taskRowAttr(s,C),C.innerHTML=g.join(""),C},update:null,getRectangle:Ft,isInViewPort:Ma,getVisibleRange:gt,onrender:function(s,o,l){for(var d=l.getGridColumns(),c=0;c$.end)&&d(g.id,x)}o[g.id]={};for(var S=$.start;S<=$.end;S++){var T=h(_,S,g,b,m,p,k,v);!T&&l(g,S)?d(g.id,S):T&&!T.parentNode&&f.appendChild(T)}}},getRectangle:pn,getVisibleRange:gt,prepareData:Aa}}(t)},taskBar:function(){return fn(t)},timedProjectBar:function(){return fn(t)},taskRollupBar:function(){return function(r){const s=gn(r),o={};function l(u,h,g,f,y){let v=!0;return f.smart_rendering&&(v=ye(u,h,g)),v}function d(u,h,g,f){const y=r.copy(r.getTask(h.id));if(y.$rendered_at=u.id,r.callEvent("onBeforeRollupTaskDisplay",[y.id,y,u.id])===!1)return;const v=s(y,g);if(!v)return;const b=g.getBarHeight(u.id,h.type==r.config.types.milestone),_=Math.floor((g.getItemHeight(u.id)-b)/2);return v.style.top=f.top+_+"px",v.classList.add("gantt_rollup_child"),v.setAttribute("data-rollup-parent-id",u.id),v}function c(u,h){return u+"_"+h}return{render:function(u,h,g,f){if(u.rollup!==!1&&u.$rollup&&u.$rollup.length){const y=document.createElement("div"),v=r.getTaskPosition(u);return f&&(f.y=0,f.y_end=r.$task_bg.scrollHeight),u.$rollup.forEach(function(b){if(!r.isTaskExists(b))return;const _=r.getTask(b);if(!l(_,f,h,g))return;const m=d(u,_,h,v);m?(o[c(_.id,u.id)]=m,y.appendChild(m)):o[c(_.id,u.id)]=!1}),y}return!1},update:function(u,h,g,f,y){const v=document.createElement("div"),b=r.getTaskPosition(u);y.y=0,y.y_end=r.$task_bg.scrollHeight,u.$rollup.forEach(function(_){const m=r.getTask(_),p=c(m.id,u.id);let k=l(m,y,g,f);if(k!==!!o[p])if(k){const $=d(u,m,g,b);o[p]=$||!1}else o[p]=!1;o[p]&&v.appendChild(o[p]),h.innerHTML="",h.appendChild(v)})},isInViewPort:ye,getVisibleRange:gt}}(t)},taskSplitBar:function(){return Mt()},taskConstraints:function(){return Mt()},taskDeadline:function(){return Mt()},taskBaselines:function(){return Mt()},link:function(){return Ia(t)},resourceRow:function(){return function(r){var s=Na(r),o={};function l(c,u,h,g,f){var y=h.resource_cell_class(u.start_date,u.end_date,c,u.tasks,u.assignments),v=h.resource_cell_value(u.start_date,u.end_date,c,u.tasks,u.assignments),b=f.getItemHeight(c.id)-1;if(y||v){var _=f.getItemPosition(c,u.start_date,u.end_date),m=document.createElement("div");return m.setAttribute(f.$config.item_attribute,c.id),m.className=["gantt_resource_marker",y].join(" "),m.style.cssText=["left:"+_.left+"px","width:"+_.width+"px","height:"+b+"px","line-height:"+b+"px","top:"+_.top+"px"].join(";"),v&&(m.innerHTML=v),m}return null}function d(c,u){o[c]&&o[c][u]&&o[c][u].parentNode&&o[c][u].parentNode.removeChild(o[c][u])}return{render:function(c,u,h,g){var f=u.$getTemplates(),y=u.getScale(),v=s(c,h.resource_property,u.getScale(),u),b=!!g,_=[];o[c.id]={};for(var m=Ut(y,g),p=m.start;p<=m.end;p++){var k=v[p];if(k&&(!b||be(p,y,g,r))){var $=l(c,k,f,0,u);$&&(_.push($),o[c.id][p]=$)}}var w=null;if(_.length){w=document.createElement("div");for(var x=0;x<_.length;x++)w.appendChild(_[x])}return w},update:function(c,u,h,g,f){var y=h.$getTemplates(),v=h.getScale(),b=s(c,g.resource_property,h.getScale(),h),_=Ut(v,f),m={};if(o&&o[c.id])for(var p in o[c.id])m[p]=p;for(var k=_.start;k<=_.end;k++){var $=b[k];if(m[k]=!1,$)if(be(k,v,f,r))if(o[c.id]&&o[c.id][k])o[c.id]&&o[c.id][k]&&!o[c.id][k].parentNode&&u.appendChild(o[c.id][k]);else{var w=l(c,$,y,0,h);w&&(u.appendChild(w),o[c.id][k]=w)}else d(c.id,k)}for(var p in m)m[p]!==!1&&d(c.id,p)},getRectangle:pn,getVisibleRange:gt}}(t)},resourceHistogram:function(){return Mt()},gridTaskRowResizer:function(){return function(r){return{render:function(s,o,l){var d=o.$getConfig(),c=document.createElement("div");return c.className="gantt_task_grid_row_resize_wrap",c.style.top=o.getItemTop(s.id)+o.getItemHeight(s.id)+"px",c.innerHTML="
",c.setAttribute(d.task_grid_row_resizer_attribute,s.id),r._waiAria.rowResizerAttr(c),c},update:null,getRectangle:Ft,getVisibleRange:gt}}(t)}},layersService:{getDataRender:function(r){return i.getDataRender(r,t)},createDataRender:function(r){return i.createDataRender(r,t)}}}}};function we(t,e){const n=getComputedStyle(e.$root).getPropertyValue("--dhx-gantt-theme");let i,a=!!n;if(a)i=n;else{var r=e.skin;if(i=r,!r||t)for(var s=document.getElementsByTagName("link"),o=0;ou.width?u.min_width:u.width,u.width=u.max_width&&u.max_width0&&S+T>=C+2)&&(w=0),($&&!D||$<0&&!E||$>0&&E+D>=A)&&($=0);var I=t.config.autoscroll_step;I&&I<2&&(I=2),w*=I||n,(($*=I||n)||w)&&function(M,L){var P=t.getScrollState(),H=null,U=null;M&&(H=P.x+M,H=Math.min(P.width,H),H=Math.max(0,H)),L&&(U=P.y+L,U=Math.min(P.height,U),U=Math.max(0,U)),t.scrollTo(H,U)}($,w)}}function v(b,_,m){return b-e<0&&b_-e&&b>m?1:0}t.attachEvent("onGanttReady",function(){if(!F(t)){var b=vt(t.$root)||document.body;t.eventRemove(b,"mousemove",f),t.event(b,"mousemove",f),t.eventRemove(b,"touchmove",f),t.event(b,"touchmove",f),t.eventRemove(b,"pointermove",f),t.event(b,"pointermove",f)}}),t.attachEvent("onDestroy",function(){g(!1)})}var Se,Te;window.jQuery&&(Se=window.jQuery,Te=[],Se.fn.dhx_gantt=function(t){if(typeof(t=t||{})!="string"){var e=[];return this.each(function(){if(this&&this.getAttribute)if(this.gantt||window.gantt.$root==this)e.push(typeof this.gantt=="object"?this.gantt:window.gantt);else{var n=window.gantt.$container&&window.Gantt?window.Gantt.getGanttInstance():window.gantt;for(var i in t)i!="data"&&(n.config[i]=t[i]);n.init(this),t.data&&n.parse(t.data),e.push(n)}}),e.length===1?e[0]:e}if(Te[t])return Te[t].apply(this,[]);Se.error("Method "+t+" does not exist on jQuery.dhx_gantt")});const Va=null;window.dhtmlx&&(window.dhtmlx.attaches||(window.dhtmlx.attaches={}),window.dhtmlx.attaches.attachGantt=function(t,e,n){var i=document.createElement("DIV");n=n||window.gantt,i.id="gantt_"+n.uid(),i.style.width="100%",i.style.height="100%",i.cmp="grid",document.body.appendChild(i),this.attachObject(i.id),this.dataType="gantt",this.dataObj=n;var a=this.vs[this.av];return a.grid=n,n.init(i.id,t,e),i.firstChild.style.border="none",a.gridId=i.id,a.gridObj=i,this.vs[this._viewRestore()].grid}),window.dhtmlXCellObject!==void 0&&(window.dhtmlXCellObject.prototype.attachGantt=function(t,e,n){n=n||window.gantt;var i=document.createElement("DIV");return i.id="gantt_"+n.uid(),i.style.width="100%",i.style.height="100%",i.cmp="grid",document.body.appendChild(i),this.attachObject(i.id),this.dataType="gantt",this.dataObj=n,n.init(i.id,t,e),i.firstChild.style.border="none",i=null,this.callEvent("_onContentAttach",[]),this.dataObj});const Ua=null,qa=["ctrlKey","altKey","shiftKey","metaKey"],Ga=[[{unit:"month",date:"%M",step:1},{unit:"day",date:"%d",step:1}],[{unit:"day",date:"%d %M",step:1}],[{unit:"day",date:"%d %M",step:1},{unit:"hour",date:"%H:00",step:8}],[{unit:"day",date:"%d %M",step:1},{unit:"hour",date:"%H:00",step:1}]];class Ya{constructor(e){this.zoomIn=()=>{const n=this.getCurrentLevel()-1;n<0||this.setLevel(n)},this.zoomOut=()=>{const n=this.getCurrentLevel()+1;n>this._levels.length-1||this.setLevel(n)},this.getCurrentLevel=()=>this._activeLevelIndex,this.getLevels=()=>this._levels,this.setLevel=n=>{const i=this._getZoomIndexByName(n);i===-1&&this.$gantt.assert(i!==-1,"Invalid zoom level for gantt.ext.zoom.setLevel. "+n+" is not an expected value."),this._setLevel(i,0)},this._getZoomIndexByName=n=>{let i=-1;if(typeof n=="string"){if(!isNaN(Number(n))&&this._levels[Number(n)])i=Number(n);else for(let a=0;a{if(!this.$gantt.$task)return null;const n=this.$gantt.getScrollState().x,i=this.$gantt.$task.offsetWidth;this._visibleDate=this.$gantt.dateFromPos(n+i/2)},this._setLevel=(n,i)=>{this._activeLevelIndex=n;const a=this.$gantt,r=a.copy(this._levels[this._activeLevelIndex]),s=a.copy(r);if(delete s.name,a.mixin(a.config,s,!0),a.$root&&a.$task){if(i){const o=this.$gantt.dateFromPos(i+this.$gantt.getScrollState().x);this.$gantt.render();const l=this.$gantt.posFromDate(o);this.$gantt.scrollTo(l-i)}else{const o=this.$gantt.$task.offsetWidth;this._visibleDate||this._getVisibleDate();const l=this._visibleDate;this.$gantt.render();const d=this.$gantt.posFromDate(l);this.$gantt.scrollTo(d-o/2)}this.callEvent("onAfterZoom",[this._activeLevelIndex,r])}},this._attachWheelEvent=n=>{const i=_t.isFF?"wheel":"mousewheel";let a;a=typeof n.element=="function"?n.element():n.element,a&&this._domEvents.attach(a,i,this.$gantt.bind(function(r){if(this._useKey&&(qa.indexOf(this._useKey)<0||!r[this._useKey]))return!1;if(typeof this._handler=="function")return this._handler.apply(this,[r]),!0},this),{passive:!1})},this._defaultHandler=n=>{const i=this.$gantt.$task.getBoundingClientRect().x,a=n.clientX-i;let r=!1;(this.$gantt.env.isFF?-40*n.deltaY:n.wheelDelta)>0&&(r=!0),n.preventDefault(),n.stopPropagation(),this._setScaleSettings(r,a)},this._setScaleDates=()=>{this._initialStartDate&&this._initialEndDate&&(this.$gantt.config.start_date=this._initialStartDate,this.$gantt.config.end_date=this._initialEndDate)},this.$gantt=e,this._domEvents=this.$gantt._createDomEventScope()}init(e){this.$gantt.env.isNode||(this._initialStartDate=e.startDate,this._initialEndDate=e.endDate,this._activeLevelIndex=e.activeLevelIndex?e.activeLevelIndex:0,this._levels=this._mapScales(e.levels||Ga),this._handler=e.handler||this._defaultHandler,this._minColumnWidth=e.minColumnWidth||60,this._maxColumnWidth=e.maxColumnWidth||240,this._widthStep=e.widthStep||3/8*e.minColumnWidth,this._useKey=e.useKey,this._initialized||(nt(this),this.$gantt.attachEvent("onGanttScroll",()=>{this._getVisibleDate()})),this._domEvents.detachAll(),e.trigger==="wheel"&&(this.$gantt.$root?this._attachWheelEvent(e):this.$gantt.attachEvent("onGanttReady",()=>{this._attachWheelEvent(e)})),this._initialized=!0,this.setLevel(this._activeLevelIndex))}_mapScales(e){return e.map(n=>Array.isArray(n)?{scales:n}:n)}_setScaleSettings(e,n){e?this._stepUp(n):this._stepDown(n)}_stepUp(e){if(this._activeLevelIndex>=this._levels.length-1)return;let n=this._activeLevelIndex;if(this._setScaleDates(),this._widthStep){let i=this.$gantt.config.min_column_width+this._widthStep;i>this._maxColumnWidth&&(i=this._minColumnWidth,n++),this.$gantt.config.min_column_width=i}else n++;this._setLevel(n,e)}_stepDown(e){if(this._activeLevelIndex<1)return;let n=this._activeLevelIndex;if(this._setScaleDates(),this._widthStep){let i=this.$gantt.config.min_column_width-this._widthStep;i1),t.config.touch){var r=!0;try{document.createEvent("TouchEvent")}catch{r=!1}r?t._touch_events(["touchmove","touchstart","touchend"],function(s){return s.touches&&s.touches.length>1?null:s.touches[0]?{target:s.target,pageX:s.touches[0].pageX,pageY:s.touches[0].pageY,clientX:s.touches[0].clientX,clientY:s.touches[0].clientY}:s},function(){return!1}):window.navigator.pointerEnabled?t._touch_events(["pointermove","pointerdown","pointerup"],function(s){return s.pointerType=="mouse"?null:s},function(s){return!s||s.pointerType=="mouse"}):window.navigator.msPointerEnabled&&t._touch_events(["MSPointerMove","MSPointerDown","MSPointerUp"],function(s){return s.pointerType==s.MSPOINTER_TYPE_MOUSE?null:s},function(s){return!s||s.pointerType==s.MSPOINTER_TYPE_MOUSE})}}function n(r){var s=r.$config.scrollX?t.$ui.getView(r.$config.scrollX):null,o=r.$config.scrollY?t.$ui.getView(r.$config.scrollY):null,l={x:null,y:null};return s&&s.getScrollState().visible&&(l.x=s.$view.scrollLeft),o&&o.getScrollState().visible&&(l.y=o.$view.scrollTop),l}function i(){var r;return t.$ui.getView("timeline")&&(r=t.$ui.getView("timeline")._tasks_dnd),r}t.config.touch_drag=75,t.config.touch=!0,t.config.touch_feedback=!0,t.config.touch_feedback_duration=1,t._prevent_touch_scroll=!1,t._touch_feedback=function(){t.config.touch_feedback&&navigator.vibrate&&navigator.vibrate(t.config.touch_feedback_duration)},t.attachEvent("onGanttReady",function(){t.$container&&e()}),t.attachEvent("onGanttLayoutReady",function(){t.$container&&t.attachEvent("onGanttRender",e,{once:!0})});var a=[];t._touch_events=function(r,s,o){var l,d=0,c=!1,u=!1,h=null,g=null,f=null,y=[],v=null;let b={};for(var _=0;_5||Math.abs(x)>5)&&(u=!0,d=0,l=v?n(v):t.getScrollState()),u){var S,T=l.x+w,C=l.y+x;if(v?(function(E,D,A){var I=E.$config.scrollX?t.$ui.getView(E.$config.scrollX):null,M=E.$config.scrollY?t.$ui.getView(E.$config.scrollY):null;I&&I.scrollTo(D,null),M&&M.scrollTo(null,A)}(v,T,C),S=n(v)):(t.scrollTo(T,C),S=t.getScrollState()),l.x!=S.x&&x>2*w||l.y!=S.y&&w>2*x)return m(p)}}return m(p)}return!0}}]);try{document.addEventListener("touchmove",function(p){t._touch_drag&&m(p)},{passive:!1})}catch{console.warn("Cannot prevent touch event for the page drag")}for(a.push([this.$container,"contextmenu",function(p){if(c)return m(p)}]),a.push([this.$container,r[1],function(p){if(b=p.touches.length,document&&document.body&&document.body.classList.add("gantt_touch_active"),!o(p))if(p.touches&&p.touches.length>1)c=!1;else{h=s(p),v=function($){for(var w=t.$layout.getCellsByType("viewCell"),x=0;x=S.left&&$.clientX<=S.right&&$.clientY<=S.bottom&&$.clientY>=S.top)return w[x]}}(h),t._locate_css(h,"gantt_hor_scroll")||t._locate_css(h,"gantt_ver_scroll")||(c=!0);var k=i();g=setTimeout(function(){var $=t.locate(h);k&&$&&!t._locate_css(h,"gantt_link_control")&&!t._locate_css(h,"gantt_grid_data")&&(k.on_mouse_down(h),k.drag&&k.drag.start_drag&&(function(w){const x=t._getTaskLayers();let S=t.getTask(w);if(S){let T=t.isTaskVisible(w);if(T){f=w;for(let C=0;C"}};function Lt(t,e,n){return e=e||[],"<"+t+$n(n||[])+">"+(e.innerHTML||"")+""}function $n(t){var e="";return kt(t,function(n){e+=" "+n.key+"='"+n.value+"'"}),e}function Gt(t){const e=ct();function n(){return e.apply(this,arguments)||this}return B(n,e),n.prototype.render=function(i){const a=i.height?`height:${i.height}px;`:"";let r=`
`;return r+=xn.getHtmlSelect(i.options,[{key:"style",value:"width:100%;"},{key:"title",value:i.name}]),r+="
",r},n.prototype.set_value=function(i,a,r,s){var o=i.firstChild;!o._dhx_onchange&&s.onchange&&(o.onchange=s.onchange,o._dhx_onchange=!0),a===void 0&&(a=(o.options[0]||{}).value),o.value=a||""},n.prototype.get_value=function(i){return i.firstChild.value},n.prototype.focus=function(i){var a=i.firstChild;t._focus(a,!0)},n}function Ka(t){var e=Gt(t);function n(){return e.apply(this,arguments)||this}function i(a,r){var s=[],o=[];r&&(s=t.getTaskByTime(),a.allow_root&&s.unshift({id:t.config.root_id,text:a.root_label||""}),s=function(u,h,g){var f=h.filter||function(){return!0};u=u.slice(0);for(var y=0;y`},m.prototype.set_value=function(p,k){p.innerHTML=k||""},m.prototype.get_value=function(p){return p.innerHTML||""},m.prototype.focus=function(){},m}(),n=function(_){const m=ct();function p(){return m.apply(this,arguments)||this}return B(p,m),p.prototype.render=function(k){return`
`},p.prototype.set_value=function(k,$){_.form_blocks.textarea._get_input(k).value=$||""},p.prototype.get_value=function(k){return _.form_blocks.textarea._get_input(k).value},p.prototype.focus=function(k){var $=_.form_blocks.textarea._get_input(k);_._focus($,!0)},p.prototype._get_input=function(k){return k.querySelector("textarea")},p}(t),i=function(_){const m=ct();function p(){return m.apply(this,arguments)||this}return B(p,m),p.prototype.render=function(k){var $=_.form_blocks.getTimePicker.call(this,k);let w="gantt_section_time";k.name!=="time"&&(w+=" gantt_section_"+k.name);var x="
";return x+=$,k.single_date?($=_.form_blocks.getTimePicker.call(this,k,!0),x+=""):x+="  –  ",(x+=$)+"
"},p.prototype.set_value=function(k,$,w,x){var S=x,T=k.getElementsByTagName("select"),C=x._time_format_order;if(S.auto_end_date)for(var E=function(){I=new Date(T[C[2]].value,T[C[1]].value,T[C[0]].value,0,0),M=_.calculateEndDate({start_date:I,duration:1,task:w}),_.form_blocks._fill_lightbox_select(T,C.size,M,C,S)},D=0;D<4;D++)T[D].onchange=E;var A=_._resolve_default_mapping(x);typeof A=="string"&&(A={start_date:A});var I=w[A.start_date]||new Date,M=w[A.end_date]||_.calculateEndDate({start_date:I,duration:1,task:w});_.form_blocks._fill_lightbox_select(T,0,I,C,S),_.form_blocks._fill_lightbox_select(T,C.size,M,C,S)},p.prototype.get_value=function(k,$,w){var x,S=k.getElementsByTagName("select"),T=w._time_format_order;return x=_.form_blocks.getTimePickerValue(S,w),typeof _._resolve_default_mapping(w)=="string"?x:{start_date:x,end_date:function(C,E,D){var A=_.form_blocks.getTimePickerValue(C,w,E.size);return A<=D&&(w.autofix_end!==!1||w.single_date)?_.date.add(D,_._get_timepicker_step(),"minute"):A}(S,T,x)}},p.prototype.focus=function(k){_._focus(k.getElementsByTagName("select")[0])},p}(t),a=Gt(t),r=function(_){var m=ct();function p(){return m.apply(this,arguments)||this}return B(p,m),p.prototype.render=function(k){const $=k.height?`height:${k.height}px;`:"";let w=`
`;if(k.options&&k.options.length)for(var x=0;x"+k.options[x].label+"";else k.single_value=!0,w+="";return w+="
",w},p.prototype.set_value=function(k,$,w,x){var S=Array.prototype.slice.call(k.querySelectorAll("input[type=checkbox]"));!k._dhx_onchange&&x.onchange&&(k.onchange=x.onchange,k._dhx_onchange=!0),x.single_value?S[0].checked=!!$:kt(S,function(T){T.checked=!!$&&$.indexOf(T.value)>=0})},p.prototype.get_value=function(k,$,w){return w.single_value?k.querySelector("input[type=checkbox]").checked:function(x,S){if(x.map)return x.map(S);for(var T=x.slice(),C=[],E=0;E`;if(k.options&&k.options.length)for(var x=0;x"+k.options[x].label+"";return w+="",w},p.prototype.set_value=function(k,$,w,x){var S;x.options&&x.options.length&&(S=k.querySelector("input[type=radio][value='"+$+"']")||k.querySelector("input[type=radio][value='"+x.default_value+"']"))&&(!k._dhx_onchange&&x.onchange&&(k.onchange=x.onchange,k._dhx_onchange=!0),S.checked=!0)},p.prototype.get_value=function(k,$){var w=k.querySelector("input[type=radio]:checked");return w?w.value:""},p.prototype.focus=function(k){_._focus(k.querySelector("input[type=radio]"))},p}(t),o=function(_){var m=ct();function p(){return m.apply(this,arguments)||this}function k(x){return x.formatter||new Et}function $(x,S){var T=x.getElementsByTagName("select"),C=S._time_format_order,E=0,D=0;if(_.defined(C[3])){var A=T[C[3]],I=parseInt(A.value,10);isNaN(I)&&A.hasAttribute("data-value")&&(I=parseInt(A.getAttribute("data-value"),10)),E=Math.floor(I/60),D=I%60}return new Date(T[C[2]].value,T[C[1]].value,T[C[0]].value,E,D)}function w(x,S){var T=x.getElementsByTagName("input")[1];return(T=k(S).parse(T.value))&&!window.isNaN(T)||(T=1),T<0&&(T*=-1),T}return B(p,m),p.prototype.render=function(x){var S="
"+_.form_blocks.getTimePicker.call(this,x)+"
",T=" "+_.locale.labels[_.config.duration_unit+"s"]+" ",C=x.single_date?" style='display:none'":"",E=x.readonly?" disabled='disabled'":"",D=_._waiAria.lightboxDurationInputAttrString(x),A="gantt_duration_value";x.formatter&&(T="",A+=" gantt_duration_value_formatted");var I="
"+T+"
";let M="gantt_section_time gantt_section_duration";return x.name!=="time"&&(M+=" gantt_section_"+x.name),"
"+S+" "+I+"
"},p.prototype.set_value=function(x,S,T,C){var E,D,A,I,M=x.getElementsByTagName("select"),L=x.getElementsByTagName("input"),P=L[1],H=[L[0],L[2]],U=x.getElementsByTagName("span")[0],ft=C._time_format_order;function O(){var J=$.call(_,x,C),j=w.call(_,x,C),q=_.calculateEndDate({start_date:J,duration:j,task:T}),Pt=_.templates.task_end_date||_.templates.task_date;U.innerHTML=Pt(q)}function Q(J){var j=P.value;j=k(C).parse(j),window.isNaN(j)&&(j=0),(j+=J)<1&&(j=1),P.value=k(C).format(j),O()}H[0].onclick=_.bind(function(){Q(-1*_.config.duration_step)},this),H[1].onclick=_.bind(function(){Q(1*_.config.duration_step)},this),M[0].onchange=O,M[1].onchange=O,M[2].onchange=O,M[3]&&(M[3].onchange=O),P.onkeydown=_.bind(function(J){var j;return(j=(J=J||window.event).charCode||J.keyCode||J.which)==_.constants.KEY_CODES.DOWN?(Q(-1*_.config.duration_step),!1):j==_.constants.KEY_CODES.UP?(Q(1*_.config.duration_step),!1):void window.setTimeout(O,1)},this),P.onchange=_.bind(O,this),typeof(E=_._resolve_default_mapping(C))=="string"&&(E={start_date:E}),D=T[E.start_date]||new Date,A=T[E.end_date]||_.calculateEndDate({start_date:D,duration:1,task:T}),I=Math.round(T[E.duration])||_.calculateDuration({start_date:D,end_date:A,task:T}),I=k(C).format(I),_.form_blocks._fill_lightbox_select(M,0,D,ft,C),P.value=I,O()},p.prototype.get_value=function(x,S,T){var C=$(x,T),E=w(x,T),D=_.calculateEndDate({start_date:C,duration:E,task:S});return typeof _._resolve_default_mapping(T)=="string"?C:{start_date:C,end_date:D,duration:E}},p.prototype.focus=function(x){_._focus(x.getElementsByTagName("select")[0])},p}(t),l=Ka(t),d=Gt(t),c=function(_){var m=ct();function p(){return m.apply(this,arguments)||this}function k(w){return!w||w===_.config.constraint_types.ASAP||w===_.config.constraint_types.ALAP}function $(w,x){for(var S=k(x),T=0;T`;var T=[];for(var C in _.config.constraint_types)T.push({key:_.config.constraint_types[C],label:_.locale.labels[_.config.constraint_types[C]]});return w.options=w.options||T,S+=""+xn.getHtmlSelect(w.options,[{key:"data-type",value:"constraint-type"}])+"",S+="",S+="",S},p.prototype.set_value=function(w,x,S,T){var C=w.querySelector("[data-constraint-type-select] select"),E=w.querySelectorAll("[data-constraint-time-select] select"),D=T._time_format_order,A=_._resolve_default_mapping(T);C._eventsInitialized||(C.addEventListener("change",function(L){$(E,L.target.value)}),C._eventsInitialized=!0);var I=S[A.constraint_date]||new Date;_.form_blocks._fill_lightbox_select(E,0,I,D,T);var M=S[A.constraint_type]||_.getConstraintType(S);C.value=M,$(E,M)},p.prototype.get_value=function(w,x,S){var T=w.querySelector("[data-constraint-type-select] select"),C=w.querySelectorAll("[data-constraint-time-select] select"),E=T.value,D=null;return k(E)||(D=_.form_blocks.getTimePickerValue(C,S)),{constraint_type:E,constraint_date:D}},p.prototype.focus=function(w){_._focus(w.querySelector("select"))},p}(t),u=function(_){const m=Gt(_);function p(){return m.apply(this,arguments)||this}return B(p,m),p.prototype.render=function(k){var $=_.config.types,w=_.locale.labels,x=[],S=k.filter||function(E,D){return!$.placeholder||D!==$.placeholder};for(var T in $)!S(T,$[T])==0&&x.push({key:$[T],label:w["type_"+T]});k.options=x;var C=k.onchange;return k.onchange=function(){_._lightbox_current_type=this.value,_.changeLightboxType(this.value),typeof C=="function"&&C.apply(this,arguments)},m.prototype.render.apply(this,arguments)},p}(t),h=function(_){var m=ct();function p(){return m.apply(this,arguments)||this}function k(S){return S.formatter||new Et}function $(S,T,C,E){const D="
"+_.form_blocks.getTimePicker.call(_,E)+"
";let A=" "+_.locale.labels[_.config.duration_unit+"s"]+" ";const I=E.single_date?" style='display:none'":"",M=E.readonly?" disabled='disabled'":"",L=_._waiAria.lightboxDurationInputAttrString(E),P=_.locale.labels.baselines_remove_button;let H="gantt_duration_value";E.formatter&&(A="",H+=" gantt_duration_value_formatted");const U="
"+A+"
",ft=`
${P}
`,O=document.createElement("div");O.className="gantt_section_time gantt_section_duration",O.setAttribute("data-baseline-id",T.id),O.innerHTML=D+U+ft+"
",S.appendChild(O);var Q,J,j,q=O.getElementsByTagName("select"),Pt=O.getElementsByTagName("input"),Rt=Pt[1],Sn=[Pt[0],Pt[2]],Qa=O.getElementsByTagName("span")[0],tr=E._time_format_order;function pt(){var ut=w.call(_,O,E),G=x.call(_,O,E),er=_.calculateEndDate({start_date:ut,duration:G,task:C}),nr=_.templates.task_end_date||_.templates.task_date;Qa.innerHTML=nr(er)}function Xt(ut){var G=Rt.value;G=k(E).parse(G),window.isNaN(G)&&(G=0),(G+=ut)<1&&(G=1),Rt.value=k(E).format(G),pt()}O.querySelector(".baseline_delete_button").onclick=function(ut){const G=O.parentNode;O.innerHTML="",O.remove(),G.innerHTML===""&&(G.innerHTML=_.locale.labels.baselines_section_placeholder)},Sn[0].onclick=_.bind(function(){Xt(-1*_.config.duration_step)},_),Sn[1].onclick=_.bind(function(){Xt(1*_.config.duration_step)},_),q[0].onchange=pt,q[1].onchange=pt,q[2].onchange=pt,q[3]&&(q[3].onchange=pt),Rt.onkeydown=_.bind(function(ut){var G;return(G=(ut=ut||window.event).charCode||ut.keyCode||ut.which)==_.constants.KEY_CODES.DOWN?(Xt(-1*_.config.duration_step),!1):G==_.constants.KEY_CODES.UP?(Xt(1*_.config.duration_step),!1):void window.setTimeout(pt,1)},_),Rt.onchange=_.bind(pt,_),_._resolve_default_mapping(E),Q=T.start_date||new Date,J=T.end_date||_.calculateEndDate({start_date:Q,duration:1,task:C}),j=_.calculateDuration({start_date:Q,end_date:J,task:C}),j=k(E).format(j),_.form_blocks._fill_lightbox_select(q,0,Q,tr,E),Rt.value=j,pt()}function w(S,T){var C=S.getElementsByTagName("select"),E=T._time_format_order,D=0,A=0;if(_.defined(E[3])){var I=C[E[3]],M=parseInt(I.value,10);isNaN(M)&&I.hasAttribute("data-value")&&(M=parseInt(I.getAttribute("data-value"),10)),D=Math.floor(M/60),A=M%60}return new Date(C[E[2]].value,C[E[1]].value,C[E[0]].value,D,A)}function x(S,T){var C=S.getElementsByTagName("input")[1];return(C=k(T).parse(C.value))&&!window.isNaN(C)||(C=1),C<0&&(C*=-1),C}return B(p,m),p.prototype.render=function(S){return`
`},p.prototype.set_value=function(S,T,C,E){C.baselines?(S.innerHTML="",C.baselines.forEach(D=>{$(S,D,C,E)})):S.innerHTML=_.locale.labels.baselines_section_placeholder},p.prototype.get_value=function(S,T,C){const E=[];return S.querySelectorAll("[data-baseline-id]").forEach(D=>{const A=D.dataset.baselineId;let I,M=_.getDatastore("baselines").getItem(A);I=M?_.copy(M):{id:_.uid(),task_id:T.id,text:"Baseline 1"},I.start_date=w(D,C),I.duration=x(D,C),I.end_date=_.calculateEndDate({start_date:I.start_date,duration:I.duration,task:T}),E.push(I)}),E},p.prototype.button_click=function(S,T,C,E){if(_.callEvent("onSectionButton",[_._lightbox_id,C])!==!1&&(T.closest(".gantt_custom_button.gantt_remove_baselines")&&(E.innerHTML=_.locale.labels.baselines_section_placeholder),T.closest(".gantt_custom_button.gantt_add_baselines"))){E.innerHTML==_.locale.labels.baselines_section_placeholder&&(E.innerHTML="");const D=_.getTask(_._lightbox_id);$(E,{id:_.uid(),task_id:D.id,text:"Baseline 1",start_date:D.start_date,end_date:D.end_date},D,_._get_typed_lightbox_config()[S])}},p.prototype.focus=function(S){_._focus(S.getElementsByTagName("select")[0])},p}(t);t._lightbox_methods={},t._lightbox_template="
 
",t._lightbox_template=`
  +
+
+ + +
`,t._lightbox_root=t.$root,t.$services.getService("state").registerProvider("lightbox",function(){return{lightbox:t._lightbox_id}}),t.showLightbox=function(_){var m=this.getTask(_);if(this.callEvent("onBeforeLightbox",[_])){var p=this.getLightbox(this.getTaskType(m.type));this.showCover(p),this._fill_lightbox(_,p),this._setLbPosition(p),this._waiAria.lightboxVisibleAttr(p),this.callEvent("onLightbox",[_])}else t.isTaskExists(_)&&t.getTask(_).$new&&this.$data.tasksStore._updateOrder()},t._get_timepicker_step=function(){if(this.config.round_dnd_dates){var _;if(function(p){var k=p.$ui.getView("timeline");return!(!k||!k.isVisible())}(this)){var m=t.getScale();_=Bt(m.unit)*m.step/60}return(!_||_>=1440)&&(_=this.config.time_step),_}return this.config.time_step},t.getLabel=function(_,m){for(var p=this._get_typed_lightbox_config(),k=0;k",k+=y(this.config.buttons_left),k+="
",k+=y(this.config.buttons_right),k+="",m.innerHTML=k,t._waiAria.lightboxAttr(m),t.config.drag_lightbox&&(m.firstChild.onmousedown=t._ready_to_dnd,m.firstChild.ontouchstart=function(T){t._ready_to_dnd(T.touches[0])},m.firstChild.onselectstart=function(){return!1},m.firstChild.style.cursor="pointer",t._init_dnd_events()),this._lightbox&&this.resetLightbox(),g(),this._cover.insertBefore(m,this._cover.firstChild),this._lightbox=m,$=this._get_typed_lightbox_config(_),k=this._render_sections($);var S=(w=m.querySelector("div.gantt_cal_larea")).style.overflow;w.style.overflow="hidden",w.innerHTML=k,function(T){var C,E,D,A,I,M;for(M=0;M
"+this.locale.labels["button_"+_[p].button]+"
"),_[p].type=="baselines"&&(w="
"+this.locale.labels.baselines_remove_all_button+"
"+this.locale.labels.baselines_add_button+"
"),this.config.wide_form&&(m+="
"),m+="
"+k.render.call(this,_[p]),m+="
"}}return m},t._center_lightbox=function(_){t._setLbPosition(_)},t._setLbPosition=function(_){if(!_)return;const m=t._lightbox_root||t.$root;_.style.top=Math.max(m.offsetHeight/2-_.offsetHeight/2,0)+"px",_.style.left=Math.max(m.offsetWidth/2-_.offsetWidth/2,0)+"px"},t.showCover=function(_){_&&(_.style.display="block",this._setLbPosition(_)),g(),this._cover.style.display=""};const g=function(){t._cover||(t._cover=document.createElement("div"),t._cover.className="gantt_cal_cover",t._cover.style.display="none",t.event(t._cover,"mousemove",t._move_while_dnd),t.event(t._cover,"mouseup",t._finish_dnd),(t._lightbox_root||t.$root).appendChild(t._cover))};function f(_){for(var m in this.config.types)if(this.config.types[m]==_)return m;return"task"}function y(_,m){var p,k,$="";for(k=0;k<_.length;k++)p=t.config._migrate_buttons[_[k]]?t.config._migrate_buttons[_[k]]:_[k],$+="
"+t.locale.labels[p]+"
";return $}function v(_){var m,p;return _.time_format?_.time_format:(p=["%d","%m","%Y"],Bt((m=t.getScale())?m.unit:t.config.duration_unit)"+S+"";break;case"%m":for(_._time_format_order[1]=m,_._time_format_order.size++,S=0;S<12;S++)C+="";break;case"%d":for(_._time_format_order[0]=m,_._time_format_order.size++,S=1;S<32;S++)C+="";break;case"%H:%i":for(_._time_format_order[3]=m,_._time_format_order.size++,S=p.first,T=p.date.getDate(),_._time_values=[];S"+t.templates.time_picker(p.date)+"",_._time_values.push(S),p.date.setTime(p.date.valueOf()+60*t._get_timepicker_step()*1e3),S=24*(p.date.getDate()!=T?1:0)*60+60*p.date.getHours()+p.date.getMinutes()}return C}t._init_lightbox_events=function(){t.lightbox_events={},t.lightbox_events.gantt_save_btn=function(){t._save_lightbox()},t.lightbox_events.gantt_delete_btn=function(){t._lightbox_current_type=null,t.callEvent("onLightboxDelete",[t._lightbox_id])&&(t.isTaskExists(t._lightbox_id)?t.$click.buttons.delete(t._lightbox_id):t.hideLightbox())},t.lightbox_events.gantt_cancel_btn=function(){t._cancel_lightbox()},t.lightbox_events.default=function(_,m){if(m.getAttribute("data-dhx-button"))t.callEvent("onLightboxButton",[m.className,m,_]);else{var p,k,$=K(m);if($.indexOf("gantt_custom_button")!=-1)if($.indexOf("gantt_custom_button_")!=-1)for(p=m.parentNode.getAttribute("data-index"),k=m;k&&K(k).indexOf("gantt_cal_lsection")==-1;)k=k.parentNode;else p=m.getAttribute("data-index"),k=m.parentNode,m=m.firstChild;var w=t._get_typed_lightbox_config();p&&(p*=1,t.form_blocks[w[1*p].type].button_click(p,m,k,k.nextSibling))}},this.event(t.getLightbox(),"click",function(_){_.target.closest(".gantt_cal_ltitle_close_btn")&&t._cancel_lightbox();var m=mt(_),p=K(m);return p||(p=K(m=m.previousSibling)),m&&p&&p.indexOf("gantt_btn_set")===0&&(p=K(m=m.firstChild)),!(!m||!p)&&(t.defined(t.lightbox_events[m.className])?t.lightbox_events[m.className]:t.lightbox_events.default)(_,m)}),t.getLightbox().onkeydown=function(_){var m=_||window.event,p=_.target||_.srcElement,k=K(p).indexOf("gantt_btn_set")>-1;switch((_||m).keyCode){case t.constants.KEY_CODES.SPACE:if((_||m).shiftKey)return;k&&p.click&&p.click();break;case t.keys.edit_save:if((_||m).shiftKey)return;k&&p.click?p.click():t._save_lightbox();break;case t.keys.edit_cancel:t._cancel_lightbox()}}},t._cancel_lightbox=function(){var _=this.getLightboxValues();t._lightbox_current_type=null,this.callEvent("onLightboxCancel",[this._lightbox_id,_.$new]),t.isTaskExists(_.id)&&_.$new&&(this.silent(function(){t.$data.tasksStore.removeItem(_.id),t._update_flags(_.id,null)}),this.refreshData()),this.hideLightbox()},t._save_lightbox=function(){var _=this.getLightboxValues();t._lightbox_current_type=null,this.callEvent("onLightboxSave",[this._lightbox_id,_,!!_.$new])&&(t.$data.tasksStore._skipTaskRecalculation="lightbox",_.$new?(delete _.$new,this.addTask(_,_.parent,this.getTaskIndex(_.id))):this.isTaskExists(_.id)&&(this.mixin(this.getTask(_.id),_,!0),this.refreshTask(_.id),this.updateTask(_.id)),t.$data.tasksStore._skipTaskRecalculation=!1,this.refreshData(),this.hideLightbox())},t._resolve_default_mapping=function(_){var m=_.map_to;return{time:!0,time_optional:!0,duration:!0,duration_optional:!0}[_.type]?_.map_to=="auto"?m={start_date:"start_date",end_date:"end_date",duration:"duration"}:typeof _.map_to=="string"&&(m={start_date:_.map_to}):_.type==="constraint"&&(_.map_to&&typeof _.map_to!="string"||(m={constraint_type:"constraint_type",constraint_date:"constraint_date"})),m},t.getLightboxValues=function(){var _={};t.isTaskExists(this._lightbox_id)&&(_=this.mixin({},this.getTask(this._lightbox_id)));for(var m=this._get_typed_lightbox_config(),p=0;p0&&(w+=" "),(k=b(_,p,S))&&($=t._waiAria.lightboxSelectAttrString(S.timeFormat[p]),w+="");return w},getTimePickerValue:function(_,m,p){var k,$=m._time_format_order,w=0,x=0,S=p||0;return t.defined($[3])&&(k=parseInt(_[$[3]+S].value,10),w=Math.floor(k/60),x=k%60),new Date(_[$[2]+S].value,_[$[1]+S].value,_[$[0]+S].value,w,x)},_fill_lightbox_select:function(_,m,p,k){if(_[m+k[0]].value=p.getDate(),_[m+k[1]].value=p.getMonth(),_[m+k[2]].value=p.getFullYear(),t.defined(k[3])){var $=60*p.getHours()+p.getMinutes();$=Math.round($/t._get_timepicker_step())*t._get_timepicker_step();var w=_[m+k[3]];w.value=$,w.setAttribute("data-value",$)}},template:new e,textarea:new n,select:new a,time:new i,duration:new o,parent:new l,radio:new s,checkbox:new r,resources:new d,constraint:new c,baselines:new h,typeselect:new u},t._is_lightbox_timepicker=function(){for(var _=this._get_typed_lightbox_config(),m=0;m<_.length;m++)if(_[m].name=="time"&&_[m].type=="time")return!0;return!1},t._simple_confirm=function(_,m,p,k){if(!_)return p();var $={text:_};m&&($.title=m),k&&($.ok=k),p&&($.callback=function(w){w&&p()}),t.confirm($)},t._get_typed_lightbox_config=function(_){_===void 0&&(_=this.getLightboxType());var m=f.call(this,_);return t.config.lightbox[m+"_sections"]?t.config.lightbox[m+"_sections"]:t.config.lightbox.sections},t._silent_redraw_lightbox=function(_){var m=this.getLightboxType();if(this.getState().lightbox){var p=this.getState().lightbox,k=this.getLightboxValues(),$=this.copy(this.getTask(p));this.resetLightbox();var w=this.mixin($,k,!0),x=this.getLightbox(_||void 0);this._set_lightbox_values(w,x),this.showCover(x)}else this.resetLightbox(),this.getLightbox(_||void 0);this.callEvent("onLightboxChange",[m,this.getLightboxType()])}}function Za(t){if(!_t.isNode){t.utils={arrayFind:Mn,dom:Ne};var e=se();t.event=e.attach,t.eventRemove=e.detach,t._eventRemoveAll=e.detachAll,t._createDomEventScope=e.extend,N(t,sa(t));var n=ja.init(t);t.$ui=n.factory,t.$ui.layers=n.render,t.$mouseEvents=n.mouseEvents,t.$services.setService("mouseEvents",function(){return t.$mouseEvents}),t.mixin(t,n.layersApi),function(i){delete i.addTaskLayer,delete i.addLinkLayer}(t),t.$services.setService("layers",function(){return n.layersService}),t.mixin(t,function(){function i(u){return u.$ui.getView("timeline")}function a(u){return u.$ui.getView("grid")}function r(u){var h=i(u);if(h&&!h.$config.hidden)return h;var g=a(u);return g&&!g.$config.hidden?g:null}function s(u){var h=null,g=!1;return[".gantt_drag_marker.gantt_grid_resize_area",".gantt_drag_marker .gantt_row.gantt_row_task",".gantt_drag_marker.gantt_grid_dnd_marker"].forEach(function(f){g=g||!!document.querySelector(f)}),(h=g?a(u):r(u))?l(u,h,"scrollY"):null}function o(u){var h=r(u);return h&&h.id!="grid"?l(u,h,"scrollX"):null}function l(u,h,g){var f=h.$config[g];return u.$ui.getView(f)}var d="DEFAULT_VALUE";function c(u,h,g,f){var y=u(this);return y&&y.isVisible()?y[h].apply(y,g):f?f():d}return{getColumnIndex:function(u){var h=c.call(this,a,"getColumnIndex",[u]);return h===d?0:h},dateFromPos:function(u){var h=c.call(this,i,"dateFromPos",Array.prototype.slice.call(arguments));return h===d?this.getState().min_date:h},posFromDate:function(u){var h=c.call(this,i,"posFromDate",[u]);return h===d?0:h},getRowTop:function(u){var h=this,g=c.call(h,i,"getRowTop",[u],function(){return c.call(h,a,"getRowTop",[u])});return g===d?0:g},getTaskTop:function(u){var h=this,g=c.call(h,i,"getItemTop",[u],function(){return c.call(h,a,"getItemTop",[u])});return g===d?0:g},getTaskPosition:function(u,h,g){var f=c.call(this,i,"getItemPosition",[u,h,g]);return f===d?{left:0,top:this.getTaskTop(u.id),height:this.getTaskBarHeight(u.id),width:0}:f},getTaskBarHeight:function(u,h){var g=this,f=c.call(g,i,"getBarHeight",[u,h],function(){return c.call(g,a,"getItemHeight",[u])});return f===d?0:f},getTaskHeight:function(u){var h=this,g=c.call(h,i,"getItemHeight",[u],function(){return c.call(h,a,"getItemHeight",[u])});return g===d?0:g},columnIndexByDate:function(u){var h=c.call(this,i,"columnIndexByDate",[u]);return h===d?0:h},roundTaskDates:function(){c.call(this,i,"roundTaskDates",[])},getScale:function(){var u=c.call(this,i,"getScale",[]);return u===d?null:u},getTaskNode:function(u){var h=i(this);if(h&&h.isVisible()){var g=h._taskRenderer.rendered[u];if(!g){var f=h.$config.item_attribute;g=h.$task_bars.querySelector("["+f+"='"+u+"']")}return g||null}return null},getLinkNode:function(u){var h=i(this);return h.isVisible()?h._linkRenderer.rendered[u]:null},scrollTo:function(u,h){var g=s(this),f=o(this),y={position:0},v={position:0};g&&(v=g.getScrollState()),f&&(y=f.getScrollState());var b=f&&1*u==u,_=g&&1*h==h;if(b&&_)for(var m=g._getLinkedViews(),p=f._getLinkedViews(),k=[],$=0;${const o=getComputedStyle(s).getPropertyValue("--dhx-gantt-theme");o&&o!==i.skin&&i.setSkin(o)},100))}i.attachEvent("onDestroy",function(){clearInterval(a)})}(t),function(i){i.skins.skyblue={config:{grid_width:370,row_height:27,bar_height_padding:4,scale_height:27,link_line_width:1,link_arrow_size:8,link_radius:2,lightbox_additional_height:75},_second_column_width:95,_third_column_width:80}}(t),function(i){i.skins.dark={config:{grid_width:390,row_height:36,scale_height:36,link_line_width:2,link_arrow_size:12,bar_height_padding:9,lightbox_additional_height:75},_second_column_width:100,_third_column_width:70}}(t),function(i){i.skins.meadow={config:{grid_width:380,row_height:27,scale_height:30,link_line_width:2,link_arrow_size:10,bar_height_padding:4,lightbox_additional_height:72},_second_column_width:95,_third_column_width:80}}(t),function(i){i.skins.terrace={config:{grid_width:390,row_height:36,scale_height:36,link_line_width:2,link_arrow_size:12,bar_height_padding:9,lightbox_additional_height:75},_second_column_width:100,_third_column_width:70}}(t),function(i){i.skins.broadway={config:{grid_width:390,row_height:35,scale_height:35,link_line_width:1,link_arrow_size:9,bar_height_padding:4,lightbox_additional_height:86},_second_column_width:100,_third_column_width:80,_lightbox_template:"
 
",_config_buttons_left:{},_config_buttons_right:{gantt_delete_btn:"icon_delete",gantt_save_btn:"icon_save"}}}(t),function(i){i.skins.material={config:{grid_width:411,row_height:34,scale_height:36,link_line_width:2,link_arrow_size:12,bar_height_padding:9,lightbox_additional_height:80},_second_column_width:110,_third_column_width:75,_redefine_lightbox_buttons:{buttons_left:["dhx_delete_btn"],buttons_right:["dhx_cancel_btn","dhx_save_btn"]}},i.attachEvent("onAfterTaskDrag",function(a){var r=i.getTaskNode(a);r&&(r.className+=" gantt_drag_animation",setTimeout(function(){var s=r.className.indexOf(" gantt_drag_animation");s>-1&&(r.className=r.className.slice(0,s))},200))})}(t),function(i){i.skins.contrast_black={config:{grid_width:390,row_height:35,scale_height:35,link_line_width:2,link_arrow_size:12,lightbox_additional_height:75},_second_column_width:100,_third_column_width:80}}(t),function(i){i.skins.contrast_white={config:{grid_width:390,row_height:35,scale_height:35,link_line_width:2,link_arrow_size:12,lightbox_additional_height:75},_second_column_width:100,_third_column_width:80}}(t),function(i){i.ext||(i.ext={});for(var a=[Fa,Va,Ua],r=0;r`,"gm"),r=new RegExp(" +","gm");function s(c){return(c+"").replace(a," ").replace(r," ")}var o=new RegExp("'","gm");function l(c){return(c+"").replace(o,"'")}for(var d in i._waiAria={getAttributeString:function(c){var u=[" "];for(var h in c){var g=l(s(c[h]));u.push(h+"='"+g+"'")}return u.push(" "),u.join(" ")},getTimelineCellAttr:function(c){return i._waiAria.getAttributeString({"aria-label":c})},_taskCommonAttr:function(c,u){c.start_date&&c.end_date&&(u.setAttribute("aria-label",s(i.templates.tooltip_text(c.start_date,c.end_date,c))),c.$dataprocessor_class&&u.setAttribute("aria-busy",!0))},setTaskBarAttr:function(c,u){this._taskCommonAttr(c,u),u.setAttribute("role","img"),!i.isReadonly(c)&&i.config.drag_move&&(c.id!=i.getState("tasksDnd").drag_id?u.setAttribute("aria-grabbed",!1):u.setAttribute("aria-grabbed",!0))},taskRowAttr:function(c,u){this._taskCommonAttr(c,u),!i.isReadonly(c)&&i.config.order_branch&&u.setAttribute("aria-grabbed",!1),u.setAttribute("role","row"),u.setAttribute("aria-selected",i.isSelectedTask(c.id)?"true":"false"),u.setAttribute("aria-level",c.$level+1||1),i.hasChild(c.id)&&u.setAttribute("aria-expanded",c.$open?"true":"false")},linkAttr:function(c,u){var h=i.config.links,g=c.type==h.finish_to_start||c.type==h.start_to_start,f=c.type==h.start_to_start||c.type==h.start_to_finish,y=i.locale.labels.link+" "+i.templates.drag_link(c.source,f,c.target,g);u.setAttribute("role","img"),u.setAttribute("aria-label",s(y)),i.isReadonly(c)&&u.setAttribute("aria-readonly",!0)},gridSeparatorAttr:function(c){c.setAttribute("role","columnheader")},rowResizerAttr:function(c){c.setAttribute("role","row")},lightboxHiddenAttr:function(c){c.setAttribute("aria-hidden","true")},lightboxVisibleAttr:function(c){c.setAttribute("aria-hidden","false")},lightboxAttr:function(c){c.setAttribute("role","dialog"),c.setAttribute("aria-hidden","true"),c.firstChild.setAttribute("role","heading"),c.firstChild.setAttribute("aria-level","1")},lightboxButtonAttrString:function(c){return this.getAttributeString({role:"button","aria-label":i.locale.labels[c],tabindex:"0"})},lightboxHeader:function(c,u){c.setAttribute("aria-label",u)},lightboxSelectAttrString:function(c){var u="";switch(c){case"%Y":u=i.locale.labels.years;break;case"%m":u=i.locale.labels.months;break;case"%d":u=i.locale.labels.days;break;case"%H:%i":u=i.locale.labels.hours+i.locale.labels.minutes}return i._waiAria.getAttributeString({"aria-label":u})},lightboxDurationInputAttrString:function(c){return this.getAttributeString({"aria-label":i.locale.labels.column_duration,"aria-valuemin":"0",role:"spinbutton"})},inlineEditorAttr:function(c){c.setAttribute("role","row")},gridAttrString:function(){return[" role='treegrid'",i.config.multiselect?"aria-multiselectable='true'":"aria-multiselectable='false'"," "].join(" ")},gridScaleRowAttrString:function(){return"role='row'"},gridScaleCellAttrString:function(c,u){var h="";if(c.name=="add")h=this.getAttributeString({role:"columnheader","aria-label":i.locale.labels.new_task});else{var g={role:"columnheader","aria-label":u};i._sort&&i._sort.name==c.name&&(i._sort.direction=="asc"?g["aria-sort"]="ascending":g["aria-sort"]="descending"),h=this.getAttributeString(g)}return h},gridDataAttrString:function(){return"role='rowgroup'"},reorderMarkerAttr:function(c){c.setAttribute("role","grid"),c.firstChild.removeAttribute("aria-level"),c.firstChild.setAttribute("aria-grabbed","true")},gridCellAttrString:function(c,u,h){var g={role:"gridcell","aria-label":u};return c.editor&&!i.isReadonly(h)||(g["aria-readonly"]=!0),this.getAttributeString(g)},gridAddButtonAttrString:function(c){return this.getAttributeString({role:"button","aria-label":i.locale.labels.new_task})},messageButtonAttrString:function(c){return"tabindex='0' role='button' aria-label='"+c+"'"},messageInfoAttr:function(c){c.setAttribute("role","alert")},messageModalAttr:function(c,u){c.setAttribute("role","dialog"),u&&c.setAttribute("aria-labelledby",u)},quickInfoAttr:function(c){c.setAttribute("role","dialog")},quickInfoHeaderAttrString:function(){return" role='heading' aria-level='1' "},quickInfoHeader:function(c,u){c.setAttribute("aria-label",u)},quickInfoButtonAttrString:function(c){return i._waiAria.getAttributeString({role:"button","aria-label":c,tabindex:"0"})},tooltipAttr:function(c){c.setAttribute("role","tooltip")},tooltipVisibleAttr:function(c){c.setAttribute("aria-hidden","false")},tooltipHiddenAttr:function(c){c.setAttribute("aria-hidden","true")}},i._waiAria)i._waiAria[d]=function(c){return function(){return i.config.wai_aria_attributes?c.apply(this,arguments):""}}(i._waiAria[d])}(t),t.locate=function(i){var a=mt(i);if(lt(a,".gantt_task_row"))return null;var r=arguments[1]||this.config.task_attribute,s=tt(a,r);return s?s.getAttribute(r):null},t._locate_css=function(i,a,r){return ht(i,a,r)},t._locateHTML=function(i,a){return tt(i,a||this.config.task_attribute)}}t.attachEvent("onParse",function(){F(t)||t.attachEvent("onGanttRender",function(){if(t.config.initial_scroll){var i=t.getTaskByIndex(0),a=i?i.id:t.config.root_id;t.isTaskExists(a)&&t.$task&&t.utils.dom.isChildOf(t.$task,t.$container)&&t.showTask(a)}},{once:!0})}),t.attachEvent("onBeforeGanttReady",function(){this.config.scroll_size||(this.config.scroll_size=Ce()||15),F(t)||(this._eventRemoveAll(),this.$mouseEvents.reset(),this.resetLightbox())}),t.attachEvent("onGanttReady",function(){!F(t)&&t.config.rtl&&t.$layout.getCellsByType("viewCell").forEach(function(i){var a=i.$config.scrollX;if(a){var r=t.$ui.getView(a);r&&r.scrollTo(r.$config.scrollSize,0)}})}),t.attachEvent("onGanttReady",function(){if(!F(t)){var i=t.plugins(),a={auto_scheduling:t.autoSchedule,click_drag:t.ext.clickDrag,critical_path:t.isCriticalTask,drag_timeline:t.ext.dragTimeline,export_api:t.exportToPDF,fullscreen:t.ext.fullscreen,grouping:t.groupBy,keyboard_navigation:t.ext.keyboardNavigation,marker:t.addMarker,multiselect:t.eachSelectedTask,overlay:t.ext.overlay,quick_info:t.templates.quick_info_content,tooltip:t.ext.tooltips,undo:t.undo};for(let r in a)a[r]&&!i[r]&&console.warn(`You connected the '${r}' extension via an obsolete file. +To fix it, you need to remove the obsolete file and connect the extension via the plugins method: https://docs.dhtmlx.com/gantt/api__gantt_plugins.html`)}})}const wn=dt.gantt=function(t){var e=ra(t);return e.env.isNode||(Za(e),function(n){n.load=function(i,a,r){this._load_url=i,this.assert(arguments.length,"Invalid load arguments");var s="json",o=null;return arguments.length>=3?(s=a,o=r):typeof arguments[1]=="string"?s=arguments[1]:typeof arguments[1]=="function"&&(o=arguments[1]),this._load_type=s,this.callEvent("onLoadStart",[i,s]),this.ajax.get(i,n.bind(function(l){this.on_load(l,s),this.callEvent("onLoadEnd",[i,s]),typeof o=="function"&&o.call(this)},this))}}(e)),e}(jn);yt.default=wn,yt.gantt=wn,Object.defineProperties(yt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); +//# sourceMappingURL=dhtmlxgantt.js.map diff --git a/codebase/dhtmlxgantt.js.map b/codebase/dhtmlxgantt.js.map index 361c6dc..ec10951 100644 --- a/codebase/dhtmlxgantt.js.map +++ b/codebase/dhtmlxgantt.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://dhtmlxgantt/webpack/universalModuleDefinition","webpack://dhtmlxgantt/webpack/bootstrap","webpack://dhtmlxgantt/./sources/utils/utils.js","webpack://dhtmlxgantt/./sources/core/ui/utils/dom_helpers.js","webpack://dhtmlxgantt/./sources/utils/helpers.js","webpack://dhtmlxgantt/./sources/utils/extends.js","webpack://dhtmlxgantt/(webpack)/buildin/global.js","webpack://dhtmlxgantt/./sources/utils/eventable.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/get_visible_bars_range.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/controls/base_control.js","webpack://dhtmlxgantt/./node_modules/inherits/inherits_browser.js","webpack://dhtmlxgantt/./node_modules/process/browser.js","webpack://dhtmlxgantt/./sources/core/ui/grid/editors/editors/base.js","webpack://dhtmlxgantt/./sources/utils/env.js","webpack://dhtmlxgantt/./node_modules/readable-stream/lib/_stream_duplex.js","webpack://dhtmlxgantt/./node_modules/buffer/index.js","webpack://dhtmlxgantt/./sources/core/ui/layout/cell.js","webpack://dhtmlxgantt/./sources/utils/is_headless.js","webpack://dhtmlxgantt/./sources/utils/placeholder_task.js","webpack://dhtmlxgantt/./node_modules/core-util-is/lib/util.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/controls/select_control.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/is_bar_in_viewport.js","webpack://dhtmlxgantt/./sources/core/ui/render/is_legacy_smart_render.js","webpack://dhtmlxgantt/./sources/utils/global.js","webpack://dhtmlxgantt/./node_modules/safe-buffer/index.js","webpack://dhtmlxgantt/./node_modules/process-nextick-args/index.js","webpack://dhtmlxgantt/./sources/core/ui/grid/tasks_grid_dnd_marker_helpers/drop_target.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/is_column_visible.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/get_visible_cells_range.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/get_bg_row_rectangle.js","webpack://dhtmlxgantt/./sources/core/ui/render/task_bar_render.js","webpack://dhtmlxgantt/./sources/core/ui/timeline/timeline.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/get_grid_row_rectangle.js","webpack://dhtmlxgantt/./sources/core/ui/mouse_event_container.js","webpack://dhtmlxgantt/./sources/core/ui/grid/grid.js","webpack://dhtmlxgantt/./sources/core/ui/timeline/scales.js","webpack://dhtmlxgantt/./sources/core/ui/utils/html_helpers.js","webpack://dhtmlxgantt/./sources/core/resource_timetable_builder.js","webpack://dhtmlxgantt/./sources/core/ui/layout/layout.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/is_link_in_viewport.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/factory/get_visible_link_range.js","webpack://dhtmlxgantt/./sources/core/worktime/strategy/work_unit_cache/index.ts","webpack://dhtmlxgantt/./sources/core/worktime/calendar_arguments_helper.js","webpack://dhtmlxgantt/./sources/core/ui/row_position_mixin.js","webpack://dhtmlxgantt/./sources/core/common/duration_formatter_numeric.ts","webpack://dhtmlxgantt/./sources/utils/task_tree_helpers.js","webpack://dhtmlxgantt/./sources/core/gantt_data_range.js","webpack://dhtmlxgantt/./sources/core/datastore/treedatastore.js","webpack://dhtmlxgantt/./sources/core/datastore/power_array.js","webpack://dhtmlxgantt/./sources/core/datastore/datastore.js","webpack://dhtmlxgantt/./sources/utils/timeout.js","webpack://dhtmlxgantt/./sources/core/ui/utils/dom_event_scope.js","webpack://dhtmlxgantt/./node_modules/form-data/lib/browser.js","webpack://dhtmlxgantt/(webpack)/buildin/amd-options.js","webpack://dhtmlxgantt/./node_modules/url/url.js","webpack://dhtmlxgantt/./node_modules/readable-stream/lib/_stream_transform.js","webpack://dhtmlxgantt/./node_modules/string_decoder/lib/string_decoder.js","webpack://dhtmlxgantt/./node_modules/timers-browserify/main.js","webpack://dhtmlxgantt/./node_modules/readable-stream/lib/_stream_writable.js","webpack://dhtmlxgantt/./node_modules/readable-stream/lib/internal/streams/destroy.js","webpack://dhtmlxgantt/./node_modules/readable-stream/lib/internal/streams/stream-browser.js","webpack://dhtmlxgantt/./node_modules/events/events.js","webpack://dhtmlxgantt/./node_modules/readable-stream/lib/_stream_readable.js","webpack://dhtmlxgantt/./node_modules/readable-stream/readable-browser.js","webpack://dhtmlxgantt/./node_modules/stream-http/lib/response.js","webpack://dhtmlxgantt/./node_modules/stream-http/lib/capability.js","webpack://dhtmlxgantt/./node_modules/stream-http/index.js","webpack://dhtmlxgantt/./node_modules/isarray/index.js","webpack://dhtmlxgantt/./sources/core/loading/dynamic_loading.js","webpack://dhtmlxgantt/./sources/core/loading/ajax_loading.js","webpack://dhtmlxgantt/./sources/core/ui/wai_aria.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/lightbox_optional_time.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/controls/typeselect_control.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/controls/constraint_control.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/controls/parent_control.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/controls/duration_control.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/controls/radio_control.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/controls/checkbox_control.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/controls/time_control.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/controls/textarea_control.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/controls/template_control.js","webpack://dhtmlxgantt/./sources/core/ui/lightbox/index.js","webpack://dhtmlxgantt/./sources/core/ui/touch.js","webpack://dhtmlxgantt/./sources/core/ui/plugins/timeline_zoom.ts","webpack://dhtmlxgantt/./sources/core/ui/plugins/dhtmlx_hooks.js","webpack://dhtmlxgantt/./sources/core/ui/plugins/jquery_hooks.js","webpack://dhtmlxgantt/./sources/core/ui/plugins/autoscroll.js","webpack://dhtmlxgantt/./sources/core/ui/plugins/index.js","webpack://dhtmlxgantt/./sources/css/skins/contrast_white.js","webpack://dhtmlxgantt/./sources/css/skins/contrast_black.js","webpack://dhtmlxgantt/./sources/css/skins/material.js","webpack://dhtmlxgantt/./sources/css/skins/broadway.js","webpack://dhtmlxgantt/./sources/css/skins/terrace.js","webpack://dhtmlxgantt/./sources/css/skins/meadow.js","webpack://dhtmlxgantt/./sources/css/skins/skyblue.js","webpack://dhtmlxgantt/./sources/core/ui/skin.js","webpack://dhtmlxgantt/./sources/core/facades/layout.js","webpack://dhtmlxgantt/./sources/core/data_task_layers.gpl.js","webpack://dhtmlxgantt/./sources/core/ui/main_layout_initializer.js","webpack://dhtmlxgantt/./sources/core/ui/timeline/links_dnd.js","webpack://dhtmlxgantt/./sources/core/ui/timeline/tasks_dnd.js","webpack://dhtmlxgantt/./sources/core/ui/timeline/main_timeline_initializer.js","webpack://dhtmlxgantt/./sources/core/ui/grid/tasks_grid_dnd_marker_helpers/highlight.js","webpack://dhtmlxgantt/./sources/core/ui/grid/tasks_grid_dnd_marker_helpers/multi_level.js","webpack://dhtmlxgantt/./sources/core/ui/grid/tasks_grid_dnd_marker_helpers/locked_level.js","webpack://dhtmlxgantt/./sources/core/ui/grid/tasks_grid_dnd_marker.js","webpack://dhtmlxgantt/./sources/core/ui/grid/tasks_grid_dnd.js","webpack://dhtmlxgantt/./sources/core/ui/grid/main_grid_initializer.js","webpack://dhtmlxgantt/./sources/core/ui/render/task_grid_row_resize_render.js","webpack://dhtmlxgantt/./sources/core/ui/render/resource_histogram_render.js","webpack://dhtmlxgantt/./sources/core/ui/render/resource_matrix_render.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/is_grid_row_in_viewport.js","webpack://dhtmlxgantt/./sources/core/ui/render/task_grid_line_render.js","webpack://dhtmlxgantt/./sources/core/ui/render/link_render.js","webpack://dhtmlxgantt/./sources/core/ui/render/prerender/task_bg_placeholder.js","webpack://dhtmlxgantt/./sources/core/ui/render/task_bg_render.js","webpack://dhtmlxgantt/./sources/core/ui/render/task_rollup_render.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/is_split_task_in_viewport.js","webpack://dhtmlxgantt/./sources/core/ui/render/task_split_render.js","webpack://dhtmlxgantt/./sources/core/ui/render/task_bar_smart_render.js","webpack://dhtmlxgantt/./sources/core/ui/grid/editors/linked_properties.js","webpack://dhtmlxgantt/./sources/core/ui/grid/editors/editors/duration.js","webpack://dhtmlxgantt/./sources/core/ui/grid/editors/editors/predecessor.js","webpack://dhtmlxgantt/./sources/core/ui/grid/editors/editors/date.js","webpack://dhtmlxgantt/./sources/core/ui/grid/editors/editors/select.js","webpack://dhtmlxgantt/./sources/core/ui/grid/editors/editors/number.js","webpack://dhtmlxgantt/./sources/core/ui/grid/editors/editors/text.js","webpack://dhtmlxgantt/./sources/core/ui/grid/editors/keyboard_mappings/keyboard_navigation.js","webpack://dhtmlxgantt/./sources/core/ui/grid/editors/keyboard_mappings/default.js","webpack://dhtmlxgantt/./sources/core/ui/grid/editors/keyboard_mappings.js","webpack://dhtmlxgantt/./sources/core/ui/grid/editors/controller.js","webpack://dhtmlxgantt/./sources/core/ui/timeline/tasks_canvas_render.gpl.js","webpack://dhtmlxgantt/./sources/core/ui/layout/scrollbar_cell.js","webpack://dhtmlxgantt/./sources/core/ui/layout/resizer_cell.gpl.js","webpack://dhtmlxgantt/./sources/core/ui/layout/view_cell.js","webpack://dhtmlxgantt/./sources/core/ui/layout/view_layout.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/get_bar_rectangle.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/get_link_rectangle.js","webpack://dhtmlxgantt/./sources/core/ui/render/viewport/is_in_viewport.js","webpack://dhtmlxgantt/./sources/core/ui/render/render_factory.js","webpack://dhtmlxgantt/./sources/core/ui/render/layer_engine.js","webpack://dhtmlxgantt/./sources/core/ui/gantt_layers.js","webpack://dhtmlxgantt/./sources/core/ui/mouse.js","webpack://dhtmlxgantt/./sources/core/ui/configurable.js","webpack://dhtmlxgantt/./sources/core/ui/ui_factory.js","webpack://dhtmlxgantt/./sources/core/ui/index.js","webpack://dhtmlxgantt/./sources/core/ui/message.js","webpack://dhtmlxgantt/./sources/core/ui_core.js","webpack://dhtmlxgantt/./sources/locale/locale_ua.ts","webpack://dhtmlxgantt/./sources/locale/locale_tr.ts","webpack://dhtmlxgantt/./sources/locale/locale_sv.ts","webpack://dhtmlxgantt/./sources/locale/locale_sk.ts","webpack://dhtmlxgantt/./sources/locale/locale_si.ts","webpack://dhtmlxgantt/./sources/locale/locale_ru.ts","webpack://dhtmlxgantt/./sources/locale/locale_ro.ts","webpack://dhtmlxgantt/./sources/locale/locale_pt.ts","webpack://dhtmlxgantt/./sources/locale/locale_pl.ts","webpack://dhtmlxgantt/./sources/locale/locale_no.ts","webpack://dhtmlxgantt/./sources/locale/locale_nl.ts","webpack://dhtmlxgantt/./sources/locale/locale_nb.ts","webpack://dhtmlxgantt/./sources/locale/locale_manager.ts","webpack://dhtmlxgantt/./sources/locale/locale_kr.ts","webpack://dhtmlxgantt/./sources/locale/locale_jp.ts","webpack://dhtmlxgantt/./sources/locale/locale_it.ts","webpack://dhtmlxgantt/./sources/locale/locale_id.ts","webpack://dhtmlxgantt/./sources/locale/locale_hu.ts","webpack://dhtmlxgantt/./sources/locale/locale_hr.ts","webpack://dhtmlxgantt/./sources/locale/locale_he.ts","webpack://dhtmlxgantt/./sources/locale/locale_fr.ts","webpack://dhtmlxgantt/./sources/locale/locale_fi.ts","webpack://dhtmlxgantt/./sources/locale/locale_fa.ts","webpack://dhtmlxgantt/./sources/locale/locale_es.ts","webpack://dhtmlxgantt/./sources/locale/locale_en.ts","webpack://dhtmlxgantt/./sources/locale/locale_el.ts","webpack://dhtmlxgantt/./sources/locale/locale_de.ts","webpack://dhtmlxgantt/./sources/locale/locale_da.ts","webpack://dhtmlxgantt/./sources/locale/locale_cs.ts","webpack://dhtmlxgantt/./sources/locale/locale_cn.ts","webpack://dhtmlxgantt/./sources/locale/locale_ca.ts","webpack://dhtmlxgantt/./sources/locale/locale_be.ts","webpack://dhtmlxgantt/./sources/locale/locale_ar.ts","webpack://dhtmlxgantt/./sources/locale/index.ts","webpack://dhtmlxgantt/./sources/publish_helpers/void_script_third.ts","webpack://dhtmlxgantt/./sources/core/destructor.js","webpack://dhtmlxgantt/./sources/core/common/assert.js","webpack://dhtmlxgantt/./sources/core/ui/resize_listener.js","webpack://dhtmlxgantt/./sources/core/gantt_core.js","webpack://dhtmlxgantt/./sources/core/cached_functions.js","webpack://dhtmlxgantt/./sources/core/data_task_types.js","webpack://dhtmlxgantt/./sources/publish_helpers/void_script_second.ts","webpack://dhtmlxgantt/./sources/core/data.js","webpack://dhtmlxgantt/./sources/core/facades/worktime_calendars.js","webpack://dhtmlxgantt/./sources/core/worktime/strategy/no_work_time.js","webpack://dhtmlxgantt/./sources/core/worktime/time_calculator.js","webpack://dhtmlxgantt/./sources/core/worktime/dynamic_resource_calendars.js","webpack://dhtmlxgantt/./sources/core/worktime/legacy_resource_config.js","webpack://dhtmlxgantt/./sources/core/worktime/strategy/work_unit_cache/date_duration_cache.ts","webpack://dhtmlxgantt/./sources/core/worktime/strategy/work_unit_cache/larger_units_helper.ts","webpack://dhtmlxgantt/./sources/core/worktime/strategy/work_unit_cache/workunit_object_cache.ts","webpack://dhtmlxgantt/./sources/core/worktime/strategy/work_unit_cache/workunit_map_cache.ts","webpack://dhtmlxgantt/./sources/core/worktime/strategy/calendar_strategy.js","webpack://dhtmlxgantt/./sources/core/worktime/strategy/work_calendar_merger.js","webpack://dhtmlxgantt/./sources/core/worktime/calendar_manager.js","webpack://dhtmlxgantt/./sources/core/worktime/work_time.js","webpack://dhtmlxgantt/./sources/core/loading/parsing.js","webpack://dhtmlxgantt/./sources/core/tasks.js","webpack://dhtmlxgantt/./sources/core/grid_column_api.gpl.js","webpack://dhtmlxgantt/./sources/core/ui/plugins/column_grid_dnd/scrollable_grid.ts","webpack://dhtmlxgantt/./sources/core/ui/plugins/column_grid_dnd/column_grid_dnd.ts","webpack://dhtmlxgantt/./sources/core/ui/plugins/column_grid_dnd/index.ts","webpack://dhtmlxgantt/./sources/core/ui/grid/task_grid_row_resize.js","webpack://dhtmlxgantt/./sources/core/ui/row_position_fixed_height.js","webpack://dhtmlxgantt/./sources/core/ui/grid/grid_resize.gpl.js","webpack://dhtmlxgantt/./sources/core/grid_column_api.js","webpack://dhtmlxgantt/./sources/core/plugins/empty_state_screen.ts","webpack://dhtmlxgantt/./sources/core/common/link_formatter_simple.ts","webpack://dhtmlxgantt/./sources/core/plugins/formatters.js","webpack://dhtmlxgantt/./sources/core/plugins/auto_task_types.js","webpack://dhtmlxgantt/./sources/core/plugins/new_task_placeholder.js","webpack://dhtmlxgantt/./sources/core/plugins/resource_assignments.js","webpack://dhtmlxgantt/./sources/core/plugins/resources.js","webpack://dhtmlxgantt/./sources/core/plugins/wbs.js","webpack://dhtmlxgantt/./sources/core/plugins/batch_update.js","webpack://dhtmlxgantt/./sources/core/plugins/index.js","webpack://dhtmlxgantt/./sources/core/dataprocessor/simple_storage.ts","webpack://dhtmlxgantt/./sources/core/dataprocessor/extend_gantt.ts","webpack://dhtmlxgantt/./sources/core/dataprocessor/data_processor_events.ts","webpack://dhtmlxgantt/./sources/core/dataprocessor/data_processor.ts","webpack://dhtmlxgantt/./sources/core/dataprocessor/index.js","webpack://dhtmlxgantt/./sources/core/datastore/datastore_render.js","webpack://dhtmlxgantt/./sources/core/datastore/select.js","webpack://dhtmlxgantt/./sources/core/facades/datastore_links.js","webpack://dhtmlxgantt/./sources/core/facades/datastore_tasks.js","webpack://dhtmlxgantt/./sources/core/facades/datastore.js","webpack://dhtmlxgantt/./sources/core/datastore/datastore_hooks.js","webpack://dhtmlxgantt/./node_modules/bluebird/js/browser/bluebird.js","webpack://dhtmlxgantt/./sources/utils/promise.js","webpack://dhtmlxgantt/./sources/core/common/state.js","webpack://dhtmlxgantt/./sources/core/common/templates.js","webpack://dhtmlxgantt/./sources/core/common/dnd.js","webpack://dhtmlxgantt/./node_modules/remote-client/dist/remote.es6.js","webpack://dhtmlxgantt/./sources/core/remote/remote_events.js","webpack://dhtmlxgantt/./sources/core/common/date_parsers/csp_compliant_version.ts","webpack://dhtmlxgantt/./sources/core/common/date_parsers/fast_version.ts","webpack://dhtmlxgantt/./sources/core/common/date.js","webpack://dhtmlxgantt/./sources/core/common/serialize.ts","webpack://dhtmlxgantt/./sources/core/common/ajax.js","webpack://dhtmlxgantt/./sources/core/common/config.ts","webpack://dhtmlxgantt/./sources/core/common/services.js","webpack://dhtmlxgantt/./sources/ext/extension_manager.ts","webpack://dhtmlxgantt/./sources/constants/index.js","webpack://dhtmlxgantt/./sources/factory/make_instance_common.js","webpack://dhtmlxgantt/./sources/factory/make_instance_web.js","webpack://dhtmlxgantt/./sources/ext/undo/undo.ts","webpack://dhtmlxgantt/./sources/ext/undo/monitor.ts","webpack://dhtmlxgantt/./sources/ext/undo/index.ts","webpack://dhtmlxgantt/./sources/ext/tooltip/tooltip.ts","webpack://dhtmlxgantt/./sources/ext/tooltip/tooltipManager.ts","webpack://dhtmlxgantt/./sources/ext/tooltip/index.ts","webpack://dhtmlxgantt/./sources/ext/quick_info/quickInfo.ts","webpack://dhtmlxgantt/./sources/ext/quick_info/index.ts","webpack://dhtmlxgantt/./sources/ext/multiselect.js","webpack://dhtmlxgantt/./sources/ext/marker.js","webpack://dhtmlxgantt/./sources/ext/keyboard_navigation/core.js","webpack://dhtmlxgantt/./sources/ext/keyboard_navigation/modals.js","webpack://dhtmlxgantt/./sources/ext/keyboard_navigation/elements/task_cell.js","webpack://dhtmlxgantt/./sources/ext/keyboard_navigation/elements/task_row.js","webpack://dhtmlxgantt/./sources/ext/keyboard_navigation/elements/header_cell.js","webpack://dhtmlxgantt/./sources/ext/keyboard_navigation/elements/nav_node.js","webpack://dhtmlxgantt/./sources/ext/keyboard_navigation/elements/gantt_node.js","webpack://dhtmlxgantt/./sources/ext/keyboard_navigation/common/trap_modal_focus.js","webpack://dhtmlxgantt/./sources/ext/keyboard_navigation/common/eventhandler.js","webpack://dhtmlxgantt/./sources/ext/keyboard_navigation/common/keyboard_shortcuts.js","webpack://dhtmlxgantt/./sources/ext/keyboard_navigation.js","webpack://dhtmlxgantt/./sources/ext/fullscreen/index.ts","webpack://dhtmlxgantt/./node_modules/querystring-es3/encode.js","webpack://dhtmlxgantt/./node_modules/querystring-es3/decode.js","webpack://dhtmlxgantt/./node_modules/querystring-es3/index.js","webpack://dhtmlxgantt/./node_modules/url/util.js","webpack://dhtmlxgantt/(webpack)/buildin/module.js","webpack://dhtmlxgantt/./node_modules/punycode/punycode.js","webpack://dhtmlxgantt/./node_modules/builtin-status-codes/browser.js","webpack://dhtmlxgantt/./node_modules/xtend/immutable.js","webpack://dhtmlxgantt/./node_modules/to-arraybuffer/index.js","webpack://dhtmlxgantt/./node_modules/readable-stream/lib/_stream_passthrough.js","webpack://dhtmlxgantt/./node_modules/util-deprecate/browser.js","webpack://dhtmlxgantt/./node_modules/setimmediate/setImmediate.js","webpack://dhtmlxgantt/./node_modules/readable-stream/lib/internal/streams/BufferList.js","webpack://dhtmlxgantt/./node_modules/stream-http/lib/request.js","webpack://dhtmlxgantt/./node_modules/https-browserify/index.js","webpack://dhtmlxgantt/./node_modules/ieee754/index.js","webpack://dhtmlxgantt/./node_modules/base64-js/index.js","webpack://dhtmlxgantt/./sources/ext/export_api/index.ts","webpack://dhtmlxgantt/./sources/ext/drag_timeline/eventsManager.ts","webpack://dhtmlxgantt/./sources/ext/drag_timeline/index.ts","webpack://dhtmlxgantt/./sources/ext/click_drag/selectedRegion.ts","webpack://dhtmlxgantt/./sources/ext/click_drag/eventsManager.ts","webpack://dhtmlxgantt/./sources/ext/click_drag/index.ts","webpack://dhtmlxgantt/./sources/ext/extensions_gpl.ts","webpack://dhtmlxgantt/./sources/dhtmlxgantt.gpl.ts"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","_typeof","obj","iterator","constructor","seed","helpers","plainObjectConstructor","toString","copy","result","isDate","Date","isArray","Array","length","isCustomType","apply","defined","mixin","target","source","force","f","undefined","uid","valueOf","functor","arguments","event","el","handler","capture","addEventListener","attachEvent","eventRemove","removeEventListener","detachEvent","elementPosition","elem","top","left","right","bottom","getBoundingClientRect","box","body","document","docElem","documentElement","parentNode","scrollTop","pageYOffset","scrollLeft","pageXOffset","clientTop","clientLeft","offsetWidth","offsetHeight","parseInt","offsetTop","offsetLeft","offsetParent","y","Math","round","x","width","height","isVisible","node","display","visibility","getComputedStyle","style","currentStyle","hasNonNegativeTabIndex","isNaN","getAttribute","hasHref","a","area","nodeName","loLowerCase","isEnabled","input","select","textarea","button","toLowerCase","hasAttribute","getClassName","className","baseVal","indexOf","_trimString","_slave","getTargetNode","e","trg","tagName","srcElement","shadowRoot","composedPath","str","String","trim","this","replace","isShadowDomSupported","head","createShadowRoot","attachShadow","getRootNode","element","ShadowRoot","host","getNodePosition","getFocusableNodes","nodes","querySelectorAll","join","nodesArray","slice","$position","sort","b","tabIndex","splice","getScrollSize","div","createElement","cssText","appendChild","clientWidth","removeChild","addClassName","removeClassName","split","regEx","RegExp","insertNode","newone","innerHTML","child","firstChild","removeNode","getChildNodes","css","ch","childNodes","len","out","push","toNode","getElementById","querySelector","locateClassName","classname","strict","ind","charAt","locateAttribute","attribute","getRelativeEventPosition","ev","clientX","clientY","isChildOf","parent","hasClass","classList","contains","test","closest","selector","matches","msMatchesSelector","webkitMatchesSelector","parentElement","nodeType","console","error","hasShadowParent","getActiveElement","activeElement","getSelection","focusNode","units","second","minute","hour","day","week","month","quarter","year","getFullYear","getMonth","getDate","arrayFilter","arr","callback","filter","checkZeroId","id","getSecondsInUnit","unit","forEach","workArray","arrayMap","map","resArray","arrayIncludes","item","includes","arrayFind","find","arrayDifference","arraySome","hashToArray","hash","sortArrayOfHash","field","desc","compare","throttle","timeout","wait","setTimeout","pop","isValidDate","getTime","isStringObject","Function","isNumberObject","isBooleanObject","delay","timer","$cancelTimeout","$pending","args","clearTimeout","$execute","objectKeys","keys","isEventable","replaceValidZeroId","rootId","findBinary","array","prev","low","high","floor","__","g","eval","EventHost","_silent_mode","listeners","_silentStart","_silentEnd","createEventStorage","handlers","index","eventStorage","combinedResult","handlerResult","addEvent","settings","handlerId","once","originalHandler","removeEvent","clear","eventHost","eventName","thisObject","attachAll","callEvent","eventArguments","handlerName","concat","checkEvent","list","eventId","detachAllEvents","gantt","view","config","datastore","viewport","start","getItemIndexByTopPosition","end","y_end","count","indexStart","max","indexEnd","min","extraTasksIds","keyboard_navigation","getSelectedId","$ui","getView","ext","inlineEditors","getState","inlineEditorId","exists","ids","dummy","log","BaseControl","render","set_value","get_value","focus","ctor","superCtor","super_","writable","configurable","TempCtor","cachedSetTimeout","cachedClearTimeout","process","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","run","marker","runClearTimeout","Item","noop","nextTick","title","browser","env","argv","version","versions","on","addListener","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","binding","cwd","chdir","dir","umask","BaseEditor","show","column","placeholder","hide","get_input","is_changed","currentValue","is_valid","save","isWindowAwailable","isIE","navigator","userAgent","isIE6","XMLHttpRequest","isIE7","isIE8","isOpera","isChrome","isKHTML","isFF","isIPad","search","isEdge","isNode","pna","Duplex","util","inherits","Readable","Writable","v","method","options","readable","allowHalfOpen","onend","_writableState","ended","onEndNT","self","highWaterMark","_readableState","destroyed","set","_destroy","err","cb","global","base64","ieee754","kMaxLength","Buffer","TYPED_ARRAY_SUPPORT","createBuffer","that","RangeError","Uint8Array","__proto__","arg","encodingOrOffset","allocUnsafe","from","TypeError","ArrayBuffer","byteOffset","byteLength","fromArrayLike","fromArrayBuffer","string","encoding","isEncoding","actual","write","fromString","isBuffer","checked","buffer","val","isnan","type","data","fromObject","assertSize","size","isView","loweredCase","utf8ToBytes","base64ToBytes","swap","bidirectionalIndexOf","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","read","buf","readUInt16BE","foundIndex","found","j","hexWrite","offset","Number","remaining","strLen","parsed","substr","utf8Write","blitBuffer","asciiWrite","byteArray","charCodeAt","asciiToBytes","latin1Write","base64Write","ucs2Write","hi","lo","utf16leToBytes","base64Slice","fromByteArray","utf8Slice","res","secondByte","thirdByte","fourthByte","tempCodePoint","firstByte","codePoint","bytesPerSequence","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","decodeCodePointsArray","SlowBuffer","alloc","INSPECT_MAX_BYTES","foo","subarray","typedArraySupport","poolSize","_augment","species","fill","allocUnsafeSlow","_isBuffer","pos","swap16","swap32","swap64","hexSlice","asciiSlice","latin1Slice","utf16leSlice","equals","inspect","match","thisStart","thisEnd","thisCopy","targetCopy","isFinite","toJSON","_arr","ret","toHex","bytes","checkOffset","checkInt","objectWriteUInt16","littleEndian","objectWriteUInt32","checkIEEE754","writeFloat","noAssert","writeDouble","newBuf","sliceLen","readUIntLE","mul","readUIntBE","readUInt8","readUInt16LE","readUInt32LE","readUInt32BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUIntLE","writeUIntBE","writeUInt8","writeUInt16LE","writeUInt16BE","writeUInt32LE","writeUInt32BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","code","INVALID_BASE64_RE","Infinity","leadSurrogate","toByteArray","stringtrim","base64clean","src","dst","utils","eventable","domHelpers","Cell","$container","$parent","$config","headerHeight","$gantt","$domEvents","_createDomEventScope","$id","$name","$factory","destructor","$view","$services","getService","detach","_headerClickHandler","detachAll","cell","scrollTo","html","getNode","padding","resize","_final","$preResize","topCont","topSize","getSize","minWidth","maxWidth","minHeight","maxHeight","setSize","_hide","cellIndex","moveView","hidden","$toHTML","content","header","raw","canCollapse","$fill","init","toggle","delegate","collapsed","gravity","getContentSize","$lastSize","contentX","contentY","_getBorderSizes","borders","horizontal","vertical","_currentBorders","_borders","_sizeHeader","_sizeContent","_setBorders","cssHash","xLayout","transform","$root","store","placeholder_task","getItem","types","objectToString","isBoolean","isNull","isNullOrUndefined","isNumber","isString","isSymbol","isUndefined","isRegExp","re","isObject","isError","isFunction","isPrimitive","__extends","htmlHelpers","_super","SelectControl","sns","getHtmlSelect","_dhx_onchange","onchange","_focus","start_date","end_date","getItemTop","getItemHeight","startCoord","posFromDate","endCoord","x_end","smart_rendering","_smart_render","globalScope","copyProps","SafeBuffer","fn","arg1","arg2","arg3","createDropTargetObject","targetParent","targetIndex","targetId","nextSibling","prevSibling","nextSiblingTarget","dndTaskId","targetTaskId","getParent","getBranchIndex","prevSiblingTarget","firstChildTarget","lastChildTarget","children","getChildren","isLegacyRender","columnIndex","scale","viewPort","cellLeftCoord","cellRightCoord","firstCellIndex","lastCellIndex","_task_default_render","task","_isAllowedUnscheduledTask","_isTaskInTimelineLimits","getItemPosition","cfg","templates","$getTemplates","taskType","getTaskType","getBarHeight","milestone","controlsMargin","padd","item_attribute","setAttribute","show_progress","done","progress","pr","progressColor","backgroundColor","opacity","progress_text","rtl","position","wrapper","drag_progress","isReadonly","drag","markerPos","_render_task_progress","task_text","_render_task_content","textColor","color","basic","template","itemId","$getConfig","state","getTask","project","isSummaryTask","isSplitTask","open_split_tasks","$open","select_task","isSelectedTask","drag_id","drag_mode","touch_drag","link_source_id","link_target_id","highlight_critical_path","isCriticalTask","link_landing_area","from_id","from_start","link_from_start","to_start","link_to_start","allowDrag","isLinkAllowed","dragClass","_combine_item_class","task_class","styles","side","margin","_get_link_crossing_css","marginStyle","_render_side_content","leftside_text","_render_leftside_content","rightside_text","_render_rightside_content","_waiAria","setTaskBarAttr","drag_resize","_render_pair","drag_links","show_links","outer","inner","showLinkPoints","touch","cssClass","text","abs","cond","leftside","$source","links","start_to_start","$target","finish_to_start","finish_to_finish","_get_conditions","ln","link","getLink","tp","min_date","marginLeft","max_date","marginRight","renderer","type_renderers","defaultRenderer","ScaleHelper","topPositionMixin","canvasRender","Timeline","$scaleHelper","_posFromDateCache","_timelineDragScroll","container","$task","$task_scale","$task_data","$task_bg","$task_links","$task_bars","_tasks","col_width","full_width","trace_x","rendered","attr","linksAttr","bindLinks","link_attribute","layers","_createLayerConfig","tasks","linkLayers","_attachLayers","dragTimeline","attach","dataHeight","scale_height","refresh","backgroundImage","rowStore","getTotalHeight","data_els","contentHeight","contentWidth","scrollHeight","scrollWidth","scrolled","_refreshScales","smart_scales","getViewPort","scales","_scales","_getScaleChunkHtml","taskFilter","expose","taskBar","hide_bar","taskSplitBar","append","taskRollupBar","taskBg","_taskLayers","_linkLayers","_bindStore","taskRenderer","getDataRender","createDataRender","defaultContainer","taskLayers","layer","update","bar_layer","addLayer","_taskRenderer","getLayer","_initStaticBackgroundRender","linkStore","getDatastore","linkRenderer","linkLayer","_linkRenderer","staticRender","_staticBgHandler","static_background","timeline_placeholder","staticBgContainer","$task_bg_static","insertBefore","staticBackgroundHeight","getScale","destroy","_clearLayers","removeLayer","_render_tasks_scales","scales_html","outer_width","_getScales","availWidth","autosize","autosize_min_width","cfgs","prepareConfigs","min_column_width","fromPos","toPos","scale_row_class","tplClass","_prepareScaleHtml","globalConfig","globalTemplates","cells","date","format","date_to_str","startIndex","endIndex","inherit_scale_class","scale_cell_class","cssclass","getTimelineCellAttr","dateFromPos","summ","part","_getColumnDuration","dateValue","columnIndexByDate","assert","wholeCells","partCell","roundPos","_getNextVisibleColumn","columns","ignores","visibleDateIndex","_getPrevVisibleColumn","_getClosestVisibleColumn","days","trace_x_ascending","ignore_x","dateIndex","visibleIndex","visibleDate","transition","trace_index_transition","xLeft","xRight","rowHeight","taskId","isMilestoneRender","task_height","bar_height","task_height_offset","sqrt","primaryScale","getSubScales","sortScales","add","step","_timelineCacheAttached","_resetTopPositionHeight","_unbindStore","_resetHeight","events","mouseEvents","h","gridResize","rowResize","ColumnDnd","Grid","$state","gridAriaAttr","gridAttrString","gridDataAriaAttr","gridDataAttrString","_ganttConfig","reorderColumns","reorder_grid_columns","$grid","gridScaleRowAttrString","$grid_scale","$grid_data","resizer","_renderHeaderResizers","doOnRender","_mouseDelegates","_addLayers","_initEvents","_columnDND","_validateColumnWidth","numericWidth","outerWidth","getGridColumns","innerWidth","elasticColumns","grid_elastic_columns","scrollable","_setColumnsWidth","columnProperty","newColumnWidth","col","min_grid_column_width","columnsWidth","grid_width","_getGridWidth","_gridCacheAttached","_initSmartRenderingPlaceholder","_calculateGridWidth","_renderGridHeader","getColumnIndex","excludeHidden","hiddenIndexShift","getColumn","gridLine","gridTaskRowResizer","resize_rows","_refreshPlaceholderOnStoreUpdate","scrollY","scroll","getScrollState","scrollSize","$rowsPlaceholder","close","open","_getColumnWidth","min_width","new_width","max_width","_checkGridColumnMinWidthLimits","_getGridWidthLimits","min_limit","max_limit","newWidth","start_index","columns_width","final_width","extra_width","start_width","share","curExtra","_getColsTotalWidth","cols_width","parseFloat","unknown","gridWidth","autofit","diff","delta","changed","_setContentSize","locale","reverse","labels","lineHeigth","last","colWidth","_sort","direction","grid_header_class","label","gridScaleCellAttrString","lineHeight","dateHelper","services","getSum","sizes","to","setSumWidth","sum_width","parts","adjustSize","splitSize","full","cellSize","_isLegacyMode","scaleConfig","scale_unit","date_scale","subscales","_prepareScaleObject","legacyMode","initTemplate","min_coll_width","container_width","minDate","maxDate","heights","configs","main_scale","initScaleConfig","processIgnores","initColSizes","limitVisibleRange","unshift","alineScaleColumns","reverseScale","setPosSettings","indexes","trace_indexes","_ignore_time_config","skip_off_time","skip","probe","isWorkTime","display_count","min_col_width","line_height","cont_width","column_count","eachColumn","iterateScales","lower_scale","upper_scale","upper_dates","lower_dates","prevUpper","up","target_index","upper_start","upper_end","lower_start","lower_end","targetWidth","curr","tzOffset","getTimezoneOffset","_correct_dst_change","dates","lastDate","outDate","shared","attributes","_this","entry","_attributes","getHtmlOption","_getHtmlContainer","getHtmlButton","getHtmlDiv","getHtmlLabel","getHtmlInput","_getHtmlAttributes","tag","resourceTaskCache","$data","tasksStore","resource","resourceProperty","timeline","cacheKey","items","assignmentsPassed","timegrid","process_resource_assignments","resource_property","$role","getResourceAssignments","$resource_id","$task_id","getTaskBy","scaleUnit","scaleStep","precalculatedTimes","task_id","unscheduled","firstColumn","minScaleDate","currDate","calendar","work_time","getTaskCalendar","cachedTimes","timestamp","assignments","calculateResourceLoadFromAssignments","timetable","resource_render_empty_cells","calculateResourceLoad","Layout","_parseConfig","$cells","_resizeScrollbars","scrollbars","scrollbar","scrollChanged","visibleScrollbars","hiddenScrollbars","scrollbarsToHide","showScrollbar","hideScrollbar","shouldHide","shouldShow","visibleGroups","group","$scrollbarRepaint","_syncCellSizes","groupName","newSize","groups","_eachChild","_syncGroupSize","_xLayout","getNextSibling","newSizeValue","isGravity","ownSize","resizeSibling","getPrevSibling","siblingSize","totalGravity","totalSize","k","mainGrid","$content","startStage","mainCall","_resizeInProgress","contentViews","getCellsByType","setContentSize","_getAutosizeMode","$originalWidthStored","$originalWidth","$originalHeightStored","$originalHeight","isChild","cellId","alert","rows","cols","views","initUI","getCells","_cleanElSize","_getBoxStyles","computed","properties","boxSizing","clientHeight","MozBoxSizing","horPaddings","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth","vertPaddings","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth","borderBox","innerHeight","outerHeight","boxSizes","contentSizes","_sizes","_calcFreeSpace","_free","_gravity","_calcSize","_configureBorders","borderClass","lastVisibleIndex","lastCell","borderColorClass","_updateCellVisibility","oldVisibleCells","_visibleCells","firstCall","visibleCells","parentVisibility","hide_empty","hideCell","cellView","marginSide","dx","dy","sourceTop","sourceHeight","targetTop","targetHeight","sourceLeft","sourceRight","targetLeft","targetRight","tmp","getLinkRectangle","coordinates","calculated","clearCache","initialized","getVisibleItems","rec","buildCache","visibleBoxes","workunit_map_cache_1","workunit_object_cache_1","larger_units_helper_1","LargerUnitsCache","createCacheObject","Map","WorkUnitsMapCache","WorkUnitsObjectCache","IsWorkTimeArgument","ClosestWorkTimeArgument","CalculateEndDateArgument","duration","GetDurationArgument","getWorkHoursArguments","setWorkTimeArguments","unsetWorkTimeArguments","isWorkTimeArguments","processedConfig","duration_unit","getClosestWorkTimeArguments","_getStartEndConfig","param","argumentType","duration_step","getDurationArguments","hasDurationArguments","calculateEndDateArguments","quickPositionHelperFactory","getItemTopCache","getRowTopCache","getItemHeightCache","totalHeightCache","getItemHeightCacheState","quickPosition","resetCache","newState","getCacheStateTotalHeight","shouldClearHeightCache","getRowTop","canUseSimpleCalculation","all","getIndexRange","itemIndex","getIndexById","parentId","_fillHeightCache","defaultHeight","row_height","eachItem","globalHeight","itemHeightCache","sumHeight","oldState","newValue","getHeight","totalHeight","countVisible","current","next","getIdByIndex","DurationFormatterNumeric","canParse","parse","copyLinkIdsArray","linkIds","targetHash","isLinkExists","copyLinkIds","getSubtreeLinks","isTaskExists","eachTask","getSubtreeTasks","PrimaryScaleHelper","_init_tasks_range","scale_offset_minimal","helper","_scale_range_unit","range","start_interval","resolveConfigRange","onlyProjectTasks","getTaskByTime","getSubtaskDates","calculateEndDate","_min_date","_max_date","fit_tasks","old_min","old_max","_adjust_scales","powerArray","DataStore","isPlaceholderTask","TreeDataStore","_branches","pull","$initItem","loadedItem","initItem","existingItem","move","$index","root_id","$parentProperty","parentProperty","$getRootId","$openInitially","openInitially","visibleOrder","$create","fullOrder","_searchVisibleOrder","_indexRangeCache","_eachItemMainRangeCache","_getItemsCache","_skip_refresh","getConfig","splitParents","splitItems","taskOpenState","taskVisibility","haveSplitItems","_attachDataChange","_isSplitItem","canOpenSplitTasks","$split_subtask","$expanded_branch","_buildTree","setParent","_add_branch","$level","calculateItemLevel","$local_index","_updateOrder","hasChild","loaded","_parseInner","_addItemInner","_move_branch","$rendered_parent","_changeIdInner","oldId","newId","_replace_branch_child","_traverseBranches","branch","_removeItemInner","sid","tindex","source_pid","tbranch","placeholderIds","tid","_moveInner","childId","pid","getSiblings","siblings","previousSibling","clearAll","level","eachParent","_setParentInner","new_pid","silent","_eachItemCached","cache","_eachItemIterate","startId","itemsStack","useCache","startItem","parentsHash","old_parent","new_parent","old_id","new_id","newbranch","criteria","original_criteria","els","temp","rule","renderedParent","actualParent","_skipTaskRecalculation","$powerArray","$removeAt","$remove","$find","$insertAt","$each","master","$map","$filter","_filterRule","copyOnParse","isSilent","updateItem","removeItem","order","data_size","addItem","changeId","sindex","$destroyed","unselect","alreadySilent","arraysEqual","arr1","arr2","quick","skipFilter","_quick_refresh","_mark_recompute","oldOrder","serialize","filteredOrder","getItems","_getNullIfUndefined","getFirst","getLast","getNext","getPrev","updPerSecond","_on_timeout","ceil","createScope","eventScope","staticArray","extend","FormData","__webpack_amd_options__","punycode","Url","protocol","slashes","auth","port","hostname","query","pathname","path","href","urlParse","resolve","relative","resolveObject","protocolPattern","portPattern","simplePathPattern","unwise","autoEscape","nonHostChars","hostEndingChars","hostnamePartPattern","hostnamePartStart","unsafeProtocol","javascript","javascript:","hostlessProtocol","slashedProtocol","http","https","ftp","gopher","file","http:","https:","ftp:","gopher:","file:","querystring","url","parseQueryString","slashesDenoteHost","u","queryIndex","splitter","uSplit","rest","simplePath","exec","proto","lowerProto","atSign","hostEnd","hec","decodeURIComponent","parseHost","ipv6Hostname","hostparts","newpart","validParts","notHost","bit","toASCII","ae","esc","encodeURIComponent","escape","qm","stringify","rel","tkeys","tk","tkey","rkeys","rk","rkey","relPath","shift","isSourceAbs","isRelAbs","mustEndAbs","removeAllDots","srcPath","psychotic","authInHost","hasTrailingSlash","isAbsolute","Transform","_transformState","afterTransform","er","ts","transforming","writecb","writechunk","rs","reading","needReadable","_read","needTransform","writeencoding","sync","_transform","flush","_flush","prefinish","stream","chunk","_write","_this2","err2","StringDecoder","nb","enc","nenc","retried","_normalizeEncoding","normalizeEncoding","utf16Text","utf16End","fillLast","utf8FillLast","base64Text","base64End","simpleWrite","simpleEnd","lastNeed","lastTotal","lastChar","utf8CheckByte","_byte","utf8CheckExtraBytes","total","utf8CheckIncomplete","scope","Timeout","clearFn","_id","_clearFn","setInterval","clearInterval","unref","ref","enroll","msecs","_idleTimeoutId","_idleTimeout","unenroll","_unrefActive","active","_onTimeout","setImmediate","clearImmediate","CorkedRequest","finish","corkReq","pendingcb","corkedRequestsFree","onCorkedFinish","asyncWrite","WritableState","internalUtil","deprecate","Stream","OurUint8Array","realHasInstance","destroyImpl","nop","isDuplex","objectMode","writableObjectMode","hwm","writableHwm","writableHighWaterMark","defaultHwm","finalCalled","needDrain","ending","finished","noDecode","decodeStrings","defaultEncoding","writing","corked","bufferProcessing","onwrite","writelen","onwriteStateUpdate","finishMaybe","errorEmitted","onwriteError","needFinish","bufferedRequest","clearBuffer","afterWrite","lastBufferedRequest","prefinished","bufferedRequestCount","writev","_writev","doWrite","onwriteDrain","holder","allBuffers","isBuf","callFinal","need","getBuffer","_","hasInstance","pipe","_isUint8Array","_uint8ArrayToBuffer","writeAfterEnd","valid","validChunk","newChunk","decodeChunk","writeOrBuffer","cork","uncork","setDefaultEncoding","endWritable","_undestroy","undestroy","emitErrorNT","readableDestroyed","writableDestroyed","endEmitted","EventEmitter","_events","_maxListeners","defaultMaxListeners","setMaxListeners","context","listener","newListener","warned","trace","fired","listenerCount","evlistener","emitter","ReadableState","EElistenerCount","debugUtil","debug","debuglog","BufferList","kProxyEvents","readableObjectMode","readableHwm","readableHighWaterMark","pipes","pipesCount","flowing","emittedReadable","readableListening","resumeScheduled","awaitDrain","readingMore","decoder","readableAddChunk","addToFront","skipChunkCheck","emitReadable","onEofChunk","chunkInvalid","getPrototypeOf","addChunk","maybeReadMore","needMoreData","isPaused","setEncoding","MAX_HWM","howMuchToRead","computeNewHighWaterMark","emitReadable_","flow","maybeReadMore_","nReadingNextTick","resume_","fromList","hasStrings","tail","copyFromBufferString","copyFromBuffer","fromListPartial","endReadable","endReadableNT","xs","nOrig","doRead","dest","pipeOpts","endFn","stdout","stderr","unpipe","onunpipe","unpipeInfo","hasUnpiped","onclose","onfinish","ondrain","onerror","ondata","cleanedUp","pipeOnDrain","increasedAwaitDrain","pause","resume","dests","wrap","paused","_fromList","PassThrough","capability","rStates","readyStates","UNSENT","OPENED","HEADERS_RECEIVED","LOADING","DONE","IncomingMessage","xhr","response","fetchTimer","_mode","headers","rawHeaders","trailers","rawTrailers","_fetchResponse","statusCode","status","statusMessage","statusText","writableStream","WritableStream","Promise","reject","_destroyed","_resumeFetch","abort","pipeTo","reader","getReader","then","_xhr","_pos","responseURL","getAllResponseHeaders","_charset","overrideMimeType","mimeType","charsetMatch","_onXHRProgress","readyState","VBArray","responseBody","toArray","responseText","newData","MSStreamReader","onprogress","onload","readAsArrayBuffer","fetch","ReadableStream","abortController","AbortController","blobConstructor","Blob","getXHR","XDomainRequest","checkTypeSupport","responseType","haveArrayBuffer","haveSlice","arraybuffer","msstream","mozchunkedarraybuffer","vbArray","ClientRequest","statusCodes","request","opts","defaultProtocol","location","toUpperCase","req","Agent","defaultMaxSockets","globalAgent","STATUS_CODES","METHODS","loadedBranches","oldHasChildren","branch_loading","branch_loading_property","_load_url","needLoading","requestData","load","_load_type","cl","ajax","on_load","htmlTags","extraSpaces","stripHTMLLite","htmlText","singleQuotes","escapeQuotes","getAttributeString","dateString","aria-label","_taskCommonAttr","tooltip_text","$dataprocessor_class","drag_move","taskRowAttr","order_branch","linkAttr","linkTypes","toStart","fromStart","start_to_finish","drag_link","gridSeparatorAttr","rowResizerAttr","lightboxHiddenAttr","lightboxVisibleAttr","lightboxAttr","lightboxButtonAttrString","buttonName","role","tabindex","lightboxHeader","headerText","lightboxSelectAttrString","time_option","years","months","hours","minutes","lightboxDurationInputAttrString","section","column_duration","aria-valuemin","inlineEditorAttr","multiselect","attrs","new_task","reorderMarkerAttr","removeAttribute","gridCellAttrString","textValue","editor","gridAddButtonAttrString","messageButtonAttrString","buttonLabel","messageInfoAttr","messageModalAttr","quickInfoAttr","quickInfoHeaderAttrString","quickInfoHeader","quickInfoButtonAttrString","tooltipAttr","tooltipVisibleAttr","tooltipHiddenAttr","payload","wai_aria_attributes","_extend_to_optional","lightbox_block","optional_time","mapping","_resolve_default_mapping","disable","enable","disabled","update_block","_lightbox_id","button_text","resizeLightbox","button_click","_get_typed_lightbox_config","form_blocks","duration_optional","time_optional","time","TypeselectControl","typeKey","typeValue","oldOnChange","_lightbox_current_type","changeLightboxType","ConstraintControl","isNonTimedConstraint","constraint_types","ASAP","ALAP","toggleTimeSelect","timeSelects","isNonTimed","getTimePicker","typeSelect","_time_format_order","_eventsInitialized","constraintDate","constraint_date","_fill_lightbox_select","constraintType","constraint_type","getConstraintType","getTimePickerValue","ParentControl","_display","item_id","allow_root","root_label","_filter","map_to","tmpDom","newOptions","onselect","replaceChild","DurationControl","getFormatter","formatter","_getStartDate","getElementsByTagName","_getDuration","singleDate","single_date","readonly","ariaAttr","durationInputClass","sectionClassName","duration_val","inps","btns","endspan","_calc_date","task_end_date","task_date","_change_duration","onclick","onkeydown","charCode","keyCode","which","constants","KEY_CODES","DOWN","UP","calculateDuration","startDate","endDate","RadioControl","radio","default_value","CheckboxControl","single_value","checkboxes","TimeControl","auto_end_date","_update_lightbox_select","selects","autofix_end","_get_timepicker_step","_getEndDate","TextareaControl","_get_input","TemplateControl","ResourcesControl","getHtmlButtons","buttons","floatRight","_migrate_buttons","getHtmlTimePickerOptions","start_year","end_year","tdate","timeFormat","year_range","month_full","first","_time_values","time_picker","setTime","getHours","getMinutes","_lightbox_methods","_lightbox_template","_lightbox_root","registerProvider","lightbox","showLightbox","getLightbox","_center_lightbox","showCover","_fill_lightbox","$new","round_dnd_dates","_is_chart_visible","time_step","getLabel","sections","updateCollection","list_name","collection","serverList","resetLightbox","getLightboxType","_lightbox_type","lightboxDiv","fullWidth","ds","classNames","cspEnvironment","csp","salesforceEnvironment","setParentNode","_lightbox","_is_lightbox_timepicker","wide_form","buttons_left","buttons_right","drag_lightbox","onmousedown","_ready_to_dnd","ontouchstart","touches","onselectstart","cursor","_init_dnd_events","_render_sections","backup_overflow","overflow","labelBlock","inputBlock","inputId","bindLabelsToInputs","_init_lightbox_events","block","con","lightbox_additional_height","scroll_top","scroll_left","view_height","_cover","lightbox_events","gantt_save_btn","_save_lightbox","gantt_delete_btn","$click","hideLightbox","gantt_cancel_btn","_cancel_lightbox","sec","buttonTarget","SPACE","shiftKey","click","edit_save","edit_cancel","getLightboxValues","_update_flags","refreshData","addTask","getTaskIndex","refreshTask","updateTask","hideCover","_custom_lightbox","_set_lightbox_values","lightbox_header","task_time","getLightboxSection","getValue","setValue","get_template_control","control","get_select_control","get_textarea_control","get_time_control","eventElement","_move_while_dnd","_finish_dnd","_dnd_start_lb","gantt_unselectable","lb","now","pageX","pageY","_lb_start","ariaAttrs","date_part","time_format","getTimeFormat","limit_time_select","first_hour","last_hour","setHours","needSetTime","mapOffset","checkbox","resources","constraint","typeselect","_simple_confirm","message","ok","confirm","type_value","_silent_redraw_lightbox","oldType","formData","updTask","addTouchEvents","platform","maxTouchPoints","touchEventsSupported","createEvent","_touch_events","pointerEnabled","pointerType","msPointerEnabled","MSPOINTER_TYPE_MOUSE","scrollX","scrollState","visible","getTaskDND","tasksDnD","_tasks_dnd","touch_feedback","touch_feedback_duration","_prevent_touch_scroll","_touch_feedback","vibrate","touchHandlers","names","accessor","ignore","dblclicktime","actionMode","scrollMode","actionStart","longTapTimer","currentDndId","dndNodes","targetView","multiTouchEvents","start_drag","on_mouse_move","preventDefault","cancelBubble","newScrollState","scrollView","block_action","_touch_drag","passive","warn","allViews","$layout","findTargetView","_locate_css","locate","on_mouse_down","renders","_getTaskLayers","isTaskVisible","_i","task_attribute","cloneNode","_i2","taskNode","_copy","cloneTaskRendered","_start_dnd","remove","on_mouse_up","onDoubleClick","cancelable","USE_KEY","_defaultScales","TimelineZoom","zoomIn","getCurrentLevel","setLevel","zoomOut","_levels","_activeLevelIndex","getLevels","zoomLevel","_getZoomIndexByName","_setLevel","levelName","_getVisibleDate","scrollPos","_visibleDate","cursorOffset","nextConfig","chartConfig","cursorDate","newPosition","middleDate","_attachWheelEvent","_domEvents","_useKey","_handler","_defaultHandler","timelineOffset","wheelUp","deltaY","wheelDelta","stopPropagation","_setScaleSettings","_setScaleDates","_initialStartDate","_initialEndDate","activeLevelIndex","_mapScales","levels","_minColumnWidth","minColumnWidth","_maxColumnWidth","maxColumnWidth","_widthStep","widthStep","useKey","_initialized","trigger","_stepUp","_stepDown","nextLevel","dhtmlx","attaches","attachGantt","cmp","attachObject","dataType","dataObj","vs","av","grid","border","gridId","gridObj","dhtmlXCellObject","jQuery","$","methods","dhx_gantt","each","newgantt","Gantt","getGanttInstance","isHeadless","scrollRange","scrollStep","scrollDelay","scrollSpeed","interval","isMove","delayTimeout","startPos","started","eventPos","isDisplayed","isScrollState","dragMarker","isResize","isLink","isClickDrag","autoscroll","defineDelayTimeout","speed","autoscroll_speed","tick","autoscroll_delay","defineScrollInterval","autoscrollInterval","isScroll","targetTouches","gridDrag","posX","posY","need_scroll","currentScrollTop","scrollOuterHeight","inner_height","scrollInnerHeight","currentScrollLeft","scrollOuterWidth","inner_width","scrollInnerWidth","autoscroll_step","boxSize","zoom","skins","link_line_width","link_arrow_size","_second_column_width","_third_column_width","material","_redefine_lightbox_buttons","getTaskNode","indx","broadway","_config_buttons_left","_config_buttons_right","terrace","meadow","skyblue","_get_skin","skin","skinset","_configure","resetSkin","getTimeline","getGrid","getBaseCell","getVerticalScrollbar","baseCell","getAttachedScrollbar","getHorizontalScrollbar","attachedScrollbar","DEFAULT_VALUE","tryCall","fallback","getTaskTop","getTaskPosition","getTaskBarHeight","getTaskHeight","roundTaskDates","domAttr","getLinkNode","oldH","oldV","scrollHorizontal","scrollVertical","verticalViews","_getLinkedViews","horizontalViews","commonViews","viewId","$skipSmartRenderOnScroll","newV","newH","showDate","date_x","scroll_to","task_scroll_offset","showTask","leftPos","_scroll_state","gridCell","timelineCell","x_pos","y_pos","scroll_size","x_inner","y_inner","scrollVer","scrollHor","horState","verState","getLayoutView","cellName","scrollLayoutCell","horizontalScroll","verticalScroll","addTaskLayer","addLinkLayer","initializer","_legacyGridResizerClass","layout","resizers","gridResizer","onCreated","mainTimeline","show_chart","colsWidth","hideGrid","show_grid","grid_limits","ganttContainerWidth","verticalScrollbarWidth","gridOverflow","original_grid_width","skinSettings","_initScrollStateEvents","_getVerticalScrollbar","_getHorizontalScrollbar","oldPos","newPos","$scroll_ver","$scroll_hor","_findGridResizer","gridFirst","_getSiblings","_behind","_front","onInitialized","resizeInfo","initialWidth","prevCellWidth","nextCellWidth","viewCell","limits","newBehindSize","newFrontSize","oldBackSize","oldFrontSize","newBackSize","oldSize","onDestroyed","initLinksDND","_link_landing","_link_target_task","_link_target_task_start","_link_source_task","_link_source_task_start","markerDefaultOffset","scrollDefaultSize","getDndState","DnD","dnd","sensitivity","updates_per_second","mousemoveContainer","getLinePos","isStart","taskPos","xEnd","yEnd","milestoneWidth","origWidth","getVisibleMilestoneWidth","getMilestonePosition","isMilestone","getPosition","markerSize","getMarkerSize","viewportSize","getVieportSize","offsetX","tooltip_offset_x","offsetY","tooltip_offset_y","ganttOffsetY","updateMarkedHtml","drag_link_class","resetDndState","showDirectingLine","s_x","s_y","e_x","e_y","_direction","getDirectionLine","link_direction_class","dist","tan","angle","atan","coordinateCircleQuarter","PI","sin","cos","ieTransform","shiftLeft","shiftTop","sX","eX","sY","eY","_dir_start","dd","advanceMarker","landing","prevTarget","prevLanding","prevToStart","targ","eventTarget","_dir_end","targetChanged","_get_link_type","addLink","createLinkDND","createTaskDND","round_task_dates","dragMultiple","before_start","before_finish","after_finish","_handlers","clear_drag_state","set_actions","drag_from_start","evs","stage","_move","_resize","_resize_progress","start_x","start_y","coords_x","_drag_task_coords","minDurationInUnits","_calculateMinDuration","min_duration","_init_task_timing","diffValue","_find_max_shift","dragItems","correctShift","minX","maxX","maxShift","minShift","multipleDragShift","new_start","new_end","obj_s_x","obj_e_x","_mouse_position_change","_is_number","_update_on_move","_update_item_on_move","original","curr_date","dragHash","_isMultiselect","getSelectedTasks","dragProject","drag_project","initialDrag","childDrag","_bulk_dnd","_update_parents","_get_drag_mode","_fix_dnd_scale_time","fixStart","correct_work_time","roundDate","fixEnd","_fix_working_times","getClosestWorkTime","correctTaskWorkTime","_finalize_mouse_up","_fireEvent","_dhx_changed","finalizingBulkMove","moveCount","doFinalize","batchUpdate","modes","dragProperty","selectedTasksIds","selectedTask","_addSubtasksToDragMultiple","params","drag_state","drag_multiple","summaryId","taskDnD","linkDnD","_linksDnD","_tasksDnD","_attachDomEvents","_attachStateProvider","extendDom","_clearDomEvents","_clearStateProvider","_delete_link_handler","question","link_description","confirm_link_deleting","deleteLink","coll","coll_date","scale_step","unregisterProvider","gridToPageCoordinates","gridPos","setWidthWithinContainer","containerSize","removeLineHighlight","markerLine","highlightPosition","ePos","gridHeight","getTaskMarkerPosition","pointerEvents","markerFolder","maxBottom","folderHighlightWidth","highlightFolder","linePos","indentNode","indent","itemTop","itemHeight","childCount","getLineMarkerPosition","markerLineTop","highlightRow","dropTarget","relTargetPos","eventTop","findClosesTarget","allowedLevel","targetLevel","findTargetAbove","findTargetBelow","targetTask","targetAbove","targetBelow","rootLevel","getLockedLevelTarget","getMultiLevelTarget","higlighter","dnd_sensitivity","hideQuickInfo","_hideQuickInfo","checkPlaceholderTask","initial_open_state","outerHTML","drop_target","$transparent","getDropPosition","$drop_target","doctype","minTop","firstVisibleTaskIndex","firstVisibleTaskId","firstVisibleTaskPos","hiddenTaskPart","gridPosition","gridBottom","placeholderRowHeight","getTargetTaskId","lockLevel","order_branch_free","getStore","lastTaskOfLevel","last_item","_getGridPos","_getTargetY","_getTaskByY","dropIndex","gridDataSizes","targetY","over","nextId","prevId","rowDnd","rowDndMarker","extendGantt","_inlineEditors","createEditors","initEvents","clearEvents","scroll_on_click","_is_icon_open_click","conf","sorting_method","callHandler","createTask","totalWidth","getRowRectangle","getVisibleRange","resize_el","task_grid_row_resizer_attribute","getRectangle","getVisibleCellsRange","isColumnVisible","resourceTimetable","renderBar","renderConnection","prevLevel","getResourceLoad","renderedHistogramCells","renderedHistogramRows","renderedHistogramCapacity","detachRenderedHistogramCell","renderedRow","renderCapacityElement","capacityMatrix","maxCapacity","renderedElement","capacityElement","capacity","colStart","colEnd","bar","connection","renderHistogramLine","renderHistogramCell","histogram_cell_class","histogram_cell_label","histogram_cell_allocated","smartRendering","histogram_cell_capacity","row","checkedColumns","renderedCell","renderedResourceLines","renderResourceLineCell","resource_cell_class","resource_cell_value","detachRenderedResourceLine","isInViewPort","aria","date_grid","tree","grid_indent","grid_blank","grid_file","grid_open","grid_folder","align","justifyContent","center","getGlobalTaskIndex","grid_row_class","css_template","isSelected","onrender","rowNode","cellNode","external_render","adapter","isElement","renderElement","drawer","current_pos","dirs","down","point","get_lines","dots","line_to","get_path","line","_get_line","get_wrapper_sizes","wrapper_size","link_wrapper_width","get_line_sizes","line_size","marginTop","render_line","innerPos","get_direction","vect","path_builder","point_to","get_points","pt","get_endpoint","xy","shiftX","lineType","get_line_type","forward","sign","milestoneHeight","lines","cssTemplate","link_class","isCriticalLink","endpoint","_render_link_arrow","borderColor","placeholderConfig","lastTaskId","placeholderTask","calendar_id","bgPlaceholder","renderedCells","isRendered","detachRenderedCell","getCellClassTemplate","task_cell_class","timeline_cell_class","getCellContentTemplate","timeline_cell_content","renderOneCell","contentTemplate","cssTemplateContent","htmlTemplateContent","customCell","static_background_cells","cellCssTemplate","cellHtmlTemplate","show_task_cells","odd","task_row_class","placeholderTop","placeholderHeight","prepareData","createBaseBarRender","defaultRender","renderedNodes","checkVisibility","generateChildElement","childCopy","$rendered_at","getKey","renderParentId","rollup","$rollup","itemNode","rollupKey","isBarInViewport","isInViewPortParent","isInViewPortChild","isProject","resetProjectDates","shouldUseSplitRendering","splitKey","mapTo","keepDatesOnEdit","decreaseStartDate","keepDurationOnEdit","schedule_from_end","defaultActionOnEdit","TextEditor","formatters","durationFormatter","PredecessorEditor","linkFormatter","parseInputString","predecessors","delimiter","formatPredecessors","formatLinkKey","lag","getLinksDiff","predecessorCodes","selectedLinks","getSelectedLinks","existingLinksSearch","linkId","linksToAdd","linkKey","linksToDelete","linksDiff","autoSchedule","inputPredecessors","taskPredecessors","html5DateFormat","dateToStr","strToDate","DateEditor","str_to_date","minValue","maxValue","minAttr","maxAttr","oninput","SelectEditor","optionsHtml","NumberEditor","controller","onBlurDelay","keyNav","keyboardNavigation","activeCell","locateCell","columnName","editorState","getEditorConfig","startEdit","command","hasEditor","keyboard","preventKeyNav","ENTER","ctrlKey","metaKey","ESC","LEFT","RIGHT","editorType","DELETE","TAB","editPrevCell","editNextCell","modifiers","anyModifier","alt","ctrl","meta","getCommandHandler","onShow","onHide","isChanged","defaultPrevented","shouldPrevent","defaultMapping","keyNavMappings","setMapping","getMapping","keyboard_navigation_cells","getKeyboardMapping","textEditorFactory","numberEditorFactory","selectEditorFactory","dateEditorFactory","predecessorEditorFactory","durationEditorFactory","linkedPropertiesProcessor","initConfigs","editor_types","number","predecessor","keyboardMapping","eventBus","inlineEditController","_createPlaceholder","_getEditorPosition","findVisibleIndex","updateTaskDateProperties","ganttHandlers","_itemId","_columnName","_editor","_editorType","_placeholder","batch_update","editorConfig","_getItemValue","oldValue","inline_editors_date_processing","_findEditableCell","nextIndex","nextColumn","getNextCell","getFirstCell","getLastCell","canChangeRow","moveRow","moveTask","nextItem","editNextRow","skipReadonly","editPrevRow","ScrollbarCell","SCROLL_MODIFIER_KEYS","_scrollHorizontalHandler","_scrollVerticalHandler","_outerScrollVerticalHandler","_outerScrollHorizontalHandler","_mouseWheelHandler","_isHorizontal","scrollPosition","_isVertical","_initVertical","_initHorizontal","_initMouseWheel","_initLinkedViews","_getRootParent","_eachView","eachCell","_updateLinkedViews","scrollHorizontally","_scrolling","codeScrollLeft","scrollVertically","_wheel_time","_oldLeft","_getScrollSize","outerSize","isHorizontal","linked","scrollProperty","innerSizeProperty","outerProperty","_getScrollOffset","cellScrollSize","nonScrollableSize","outerScroll","innerScroll","scrollSizes","_setScrollSize","toggleVisibility","_getScaleOffset","parentLayout","_oldTop","_checkWheelTarget","targetNode","connectedViews","wheelSpeed","wheelSpeedConfig","wheel_scroll_sensitivity","ff","deltaX","wheelDeltaX","multiplier","deltaMode","wx","wy","horizontalScrollModifier","horizontal_scroll_key","oldLeft","detail","oldTop","ViewCell","childConfig","createView","$initialized","unload","outerX","outerY","childSize","ViewLayout","$cell","byMaxSize","otherCell","barRectangle","sourceBox","targetBox","genericViewPortChecker","basicGetRectangle","basicGetRange","task_area_pulls","task_area_renderers","getRenderer","renderMethod","updateMethod","renderCallbackMethod","specializedViewPortChecker","layer_attribute","render_item","layerView","viewConfig","rendererViewPort","dom","useBuffer","remove_item","clear_container","get_visible_range","prepare_data","render_items","createDocumentFragment","vis","itemsSearch","renderedItems","newElements","update_items","nodesToRemove","renderCalledFor","restore","replace_item","newNode","change_id","oldid","newid","clearRenderers","renderFactoryProvider","mergeFilters","filter_methods","filter_method","renderFactory","createGroup","getContainer","relativeRoot","defaultFilters","initLayer","renderGroup","tempCollection","renderers","filters","getLayers","_add","pending","topmost","requestUpdate","onUpdateRequest","eachLayer","createLayerFactory","getVisibleTaskRange","getVisibleLinksRangeFactory","isLinkInViewport","previusSiblingContainer","defaultContainerSibling","setService","rangeFunction","removeTaskLayer","_clearTaskLayers","_getLinkLayers","removeLinkLayer","_clearLinkLayers","createMouseHandler","eventHandlers","doubleclick","contextMenu","addEventTarget","onClick","findEventHandlers","callEventHandlers","_multiselect","selectTask","onContextMenu","returnValue","delegateHandlers","details_on_dblclick","onMouseMove","_last_move_event","domEvents","reset","elementHandlers","extendSettings","parentSettings","own","$extendedConfig","setPrototypeOf","parentView","parentConfig","parentTemplates","createFactory","createdViews","creator","configure","registerView","viewConstructor","uiFactory","createLayers","Resizer","Scrollbar","ResourceGrid","ResourceTimeline","ResourceHistogram","gridEditorsFactory","renderTaskBar","renderSplitTaskBar","renderRollupTaskBar","renderTaskBg","renderLink","gridRenderer","resourceMatrixRenderer","resourceHistogramRenderer","gridTaskRowResizerRenderer","mainGridInitializer","mainTimelineInitializer","mainLayoutInitializer","attachInitializer","layersEngine","layersApi","resourceRow","resourceHistogram","layersService","boxAttribute","_dhx_msg_cfg","usercall","modalBox","modal_key","messageBox","modality","cover","info","expire","timers","getFirstDefined","values","_createBox","cancel","contentId","message_ok","message_cancel","btn","_boxStructure","alertPopup","confirmPopup","boxPopup","box_params","focusable","hideAll","popups","modalbox","codeHelpers","_eventRemoveAll","uiApi","$mouseEvents","createLayoutFacade","targetAttribute","_locateHTML","initial_scroll","firstTask","getTaskByIndex","activePlugins","plugins","availablePlugins","auto_scheduling","click_drag","clickDrag","critical_path","drag_timeline","export_api","exportToPDF","fullscreen","grouping","groupBy","addMarker","eachSelectedTask","overlay","quick_info","quick_info_content","tooltip","tooltips","undo","plugin","default","month_short","day_full","day_short","icon_save","icon_cancel","icon_details","icon_edit","icon_delete","confirm_closing","confirm_deleting","section_description","section_time","section_type","column_wbs","column_text","column_start_date","column_add","link_start","link_end","type_task","type_project","type_milestone","weeks","section_constraint","asap","alap","snet","snlt","fnet","fnlt","mso","mfo","resources_filter_placeholder","resources_filter_label","empty_state_text_link","empty_state_text_description","LocaleManager","addLocale","_locales","getLocale","locale_ar_1","locale_be_1","locale_ca_1","locale_cn_1","locale_cs_1","locale_da_1","locale_de_1","locale_el_1","locale_en_1","locale_es_1","locale_fa_1","locale_fi_1","locale_fr_1","locale_he_1","locale_hr_1","locale_hu_1","locale_id_1","locale_it_1","locale_jp_1","locale_kr_1","locale_manager_1","locale_nb_1","locale_nl_1","locale_no_1","locale_pl_1","locale_pt_1","locale_ro_1","locale_ru_1","locale_si_1","locale_sk_1","locale_sv_1","locale_tr_1","locale_ua_1","en","ar","be","ca","cn","cs","da","de","es","fa","fi","fr","he","hr","hu","it","jp","kr","nl","no","pl","ro","ru","si","sk","sv","tr","ua","_dp","check","show_errors","listenWindowResize","resizeDelay","resizeTimeout","container_resize_timeout","previousSize","getContainerSize","container_resize_method","lowlevelResizeWatcher","currentSize","repaintGantt","previousHeight","previousWidth","getPropertyValue","resizeWatcher","contentWindow","addResizeListener","calculateScaleRange","invalidContainerMessage","validateNode","isHTMLElement","_reinit","_quickRefresh","stores","_getDatastores","dropLayout","rebuildLayout","storeNames","resetLayout","initTemplates","edit","delete","confirm_deleting_title","deleteTask","preserveScroll","preserve_scroll","new_pos","verticalScrollbar","setSizes","getTaskRowNode","prevOffset","time_unit","offsetChanged","activate","_cached_functions","update_if_changed","critical_path_mode","wrap_methods","_prefetch_originals","prefetch","methodname","optimizer","argumentsArray","get_arguments_hash","cached_values","has_cached_value","get_cached_value","cache_value","arguments_hash","is_date","getUTCDate","stringify_argument","deactivate","setup","override_gantt","gantt_methods","optimize_render","deactivTimeout","checkType","isUnscheduledTask","show_unscheduled","taskStart","taskEnd","_getProjectEnd","project_end","_getProjectStart","project_start","getDefaultTaskDate","parent_id","_set_default_task_timing","details_on_create","parseDate","getTaskTimingMode","task_type","$no_start","$no_end","$rendered_type","updateTaskTiming","$effective_calendar","getSubtaskInfo","task_mode","dirty","$calculate_duration","effectiveCalendar","inherit_calendar","taskMode","taskTiming","getSubtaskDuration","updateAll","has_changed","oldStart","oldEnd","upper","lower","colIndex","steps","calendarManager","timeCalculator","getWorkHours","setWorkTime","unsetWorkTime","_hasDuration","hasDuration","mergeCalendars","createCalendar","addCalendar","getCalendar","getCalendars","getResourceCalendar","deleteCalendar","CalendarDisabledTimeStrategy","argumentsHelper","_calculateDuration","fixedUnits","hasWorkTime","createArgumentsHelper","NoWorkTimeCalendar","TimeCalculator","$disabledCalendar","_getCalendar","manager","dynamicCalendars","getCalendarIdFromMultipleResources","resourceAssignments","resource_id","getResourcesCalendarKey","tempCalendar","assignment","resourceId","mergeResourceCalendars","isLegacyResourceCalendarFormat","resourceCalendarsProperty","getResourceProperty","resourceCalendarsConfig","resource_calendars","propertyName","getCalendarIdFromLegacyConfig","calendarId","DateDurationCache","_getCacheObject","_cache","unitCache","stepCache","yearCache","durations","endDates","_endDateCacheKey","_durationCacheKey","getEndDate","compute","startDateTimestamp","resultTimestamp","getDuration","endDateTimestamp","getMinutesPerWeek","weekStart","_weekCache","has","_calendar","minutesPerWeek","week_start","getHoursPerDay","getMinutesPerMonth","monthStart","_monthCache","minutesPerMonth","nextMonth","subCache","setItem","rawValue","CalendarWorkTimeStrategy","_workingUnitsCache","_largeUnitsCache","_dateDurationCache","_worktime","_cached_timestamps","_cached_timestamps_count","_clearCaches","_getUnitOrder","_resetTimestampCache","_timestamp","UTC","_checkIfWorkingUnit","_is_work_day","_getWorkHours","_is_work_hour","startHour","endHour","_getTimeOfDayStamp","dayEnd","_is_work_minute","checkTime","_nextDate","_getWorkUnitsBetweenGeneric","stepStart","stepEnd","checkFirst","checkLast","isLastStep","_isWorkTime","unitOrder","biggerTimeUnit","_getClosestWorkTimeFuture","_getMinutesPerHour","hourStart","hourEnd","worktimes","_getMinutesPerDay","durationMinutes","durationHours","_getWorkUnitsForRange","getUnitsPerDay","_getMinutesBetweenSingleDay","_getIntervalTimestamp","minuteFrom","minuteTo","_getMinutesBetween","firstDayStart","firstDayEnd","day_start","lastDayStart","lastDayEnd","startPart","endPart","_getHoursBetween","_setConfig","_parseSettings","haveCustomWeeks","customWeeks","customWeeksRangeStart","customWeeksRangeEnd","customWeeksBoundaries","_parseHours","minCustomRangeStart","maxCustomRangeEnd","customTime","rangeStart","rangeEnd","fromReadable","toReadable","currentWeek","_tryChangeCalendarSettings","backup","JSON","_arraysEqual","_compareSettings","mySettings","thatSettings","myDays","otherDates","myHours","otherHours","myWeek","thatWeek","getDay","getSeconds","endHours","timestampRanges","timerangeConfig","startMinute","endMinute","durationSeconds","calendarConfig","reset_calendar","isWorkUnit","dateKey","mult","_calculateEndDate","_calculateMinuteEndDate","_subtractMinuteDate","_calculateHourEndDate","_addInterval","stopAction","added","dstShift","_addHoursUntilDayEnd","rangeHours","addHours","intervalEnd","durationLeft","setMinutes","setSeconds","hoursPerDay","_addMinutesUntilHourEnd","hour_start","rangeMinutes","addMinutes","_subtractMinutesUntilHourStart","hourStartTimestamp","initialDateTimestamp","minutePrecision","_isMinutePrecision","addedInterval","calculatedDay","daySchedule","minutesInDay","dayStart","iterateFromDayEnd","isWorkHour","workInterval","prevInterval","minutesInHour","_getClosestWorkTimePast","times","lastInterval","_getClosestWorkTime","inputDate","closestFuture","closestPast","_getClosestWorkTimeGeneric","_findClosestTimeInDay","resultDate","fromDayEnd","_getClosestWorkMinute","increment","worktime","exceptions","hasRegularHours","_checkWorkHours","dayConfig","hoursArray","WorkTimeCalendarMerger","_getIntervals","_toHoursArray","intervalsArray","formatHHMM","secondsValue","minutePart","toFixed","_intersectHourRanges","baseArray","overridesArray","base","_mergeAdjacentIntervals","_mergeHoursConfig","firstHours","secondHours","merge","firstConfig","secondConfig","mergedSettings","processCalendar","config1","config2","date1","date2","hours2","CalendarMergeHelper","legacyResourceCalendarConfig","dynamicResourceCalendars","CalendarManager","_calendars","_legacyConfig","_isLegacyConfig","createDefaultCalendars","_convertWorkTimeSettings","calendars","mergeHelper","_createCalendarFromConfig","apiCore","preparedConfig","parentCalendar","defaults","fulltime","_getOwnCalendar","calendar_property","dynamic_resource_calendars","calendarsConfig","taskObject","groupMode","group_mode","currentTask","isCalendar","restoreConfigCalendars","possibleCalendar","every","worktimeFacadeFactory","facade","jsonParseError","xmlDoc","resp","_process_loading","collections","_load_collections","resourcesStore","assignmentsByTasks","attachAssignmentsToTasks","linksStore","collections_loaded","option","option_key","$ignore","json","dhx_security","security_key","serializeTask","_copyObject","serializeLink","_copyLink","xml_format","format_date","rawLinks","getLinks","xml","_xmlNodeToJSON","attrs_only","nodeValue","_getCollections","loader","xpath","itms","_getXML","toptag","getXMLTopNode","xmltop","xmlParseError","skey","oldxml","startdate","est","enddate","predecessortasks","editable_property","readonly_property","getGridColumn","ScrollableGrid","_scrollOrder","getCurrentX","_dnd","_scrollView","attachEvents","isScrollable","gridBoundingRect","maxLeft","minLeft","currentX","autoscrollRight","autoscrollStart","autoscrollLeft","autoscrollStop","getCorrection","scrollable_grid_1","ColumnsGridDnd","_targetMarker","calculateCurrentPosition","eventX","DND","_scrollableGrid","_draggedCell","draggedColumn","draggedIndex","_gridConfig","_originAutoscroll","_dragX","columnIndexes","findColumnsIndexes","targetColumn","cleanTargetMarker","setMarkerPosition","drawTargetMarker","_a","xBefore","xAfter","columnRelativePos","draggedId","currentColumn","startX","endX","relativeX","gridOffset","_obj","nextPosition","column_grid_dnd_1","_task_grid_row_resize","row_before_start","row_id","row_after_start","row_drag_move","pointerPosition","markerStartPosition","marker_height","minPointerPosition","min_task_grid_row_height","row_drag_end","oldItemHeight","finalHeight","cachedRowHeight","canUseSimpleCalc","_getRowHeight","_refreshState","globalRowHeight","visibleColumns","show_empty_state","emptyStateElement","isGanttEmpty","renderContent","placeholderContainer","clickEvents","attachAddTaskEvent","detachAddTaskEvents","oldNodes","emptyStateElementNode","LinkFormatterSimple","_getWBSCode","_linkReg","linkPart","_findSource","_gantt","pred","getWBSCode","reqTemplate","wbs","getTaskByWBSCode","DurationFormatter","LinkFormatter","enter","callIfEnabled","auto_types","checkTaskType","changedTypes","targetType","getTaskTypeToUpdate","$needsUpdate","updateParentTypes","getUpdatedTypes","applyChanges","delTaskParent","allTypes","hasChildren","originalRowDndParent","originalMoveTaskParent","isParsingDone","updateAfterRemoveChild","updateTaskType","insertPlaceholder","placeholders","afterEdit","newTask","dataProcessor","_silencedPlaceholder","setUpdated","ready","isPlaceholderLink","action","commands","entity","resourceAssignmentsProperty","resource_assignment_store","resourceAssignmentFormats","auto","singleValue","valueArray","resourceValueArray","assignmentsArray","resourceAssignmentFormat","assignmentModes","fixedDates","fixedDuration","initAssignmentFields","initDelay","timing","_assignmentTimeFromTask","resourceAssignmentsStore","createDatastore","_makeAssignmentsFromTask","detectFormat","usedIds","defaultMode","_updateTaskBack","_assignAssignments","getTaskAssignments","_loadAssignmentsFromTask","taskAssignments","_syncAssignments","storeAssignments","taskValues","assignmentsStoreValues","inBoth","inTaskNotInStore","inStoreNotInTask","taskOwner","ownerId","foundOwnerAssignment","taskSearch","storeSearch","processedIds","inTask","inStore","diffAssignments","ignoreFields","assignmentHasChanged","updateAssignment","_syncOnTaskUpdate","assignmentsStore","totalAssignments","needUpdate","needUpdateFor","undoBatchCancel","assignmentsHash","deleteIds","idsSearch","_syncOnTaskDelete","resourceAssignmentsCache","resourceTaskAssignmentsCache","taskAssignmentsCache","searchTaskId","resourceTaskCacheKey","getTaskResources","uniqueResources","updateTaskAssignments","createResourceMethods","singleResourceCacheBuilt","falsyValuePrefix","random","resourceHashFunction","getCacheKey","resourceIds","typeFilter","getResourceTasks","matchingResources","resourceValue","selectAssignments","owners","propertyValue","filterResourceTasks","resourcePlugin","renderEditableLabel","editable","renderSummaryLabel","sum","reduce","editableResourceCellTemplate","editableResourceCellClass","getSummaryResourceAssignments","resource_store","childResource","initEditableDiagram","timeoutId","makeEditable","cancelAnimationFrame","requestAnimationFrame","contentEditable","assignmentEditInProcess","blur","strValue","innerText","rowId","assignmentId","parse_date","assignmentStore","saveState","nextChunk","createHelper","dataprocessor_assignments","dataprocessor_resources","editable_resource_diagram","fetchTasks","lightbox_resources","lightboxOptions","resourceStoreConfig","initItems","storeType","$resourcesStore","lightboxOptionsFnc","defaultResourceCellClass","defaultResourceCellTemplate","_needRecalc","_isRecalcNeeded","_isGroupSort","_calcWBS","$virtual","$wbs","_setWBSCode","getByWBSCode","currentNode","_isFirst","_prevSibling","_wbs","_parent","createWbs","createMethod","isActive","disableMethod","methodName","dummyMethod","restoreMethod","restoreMethods","batchUpdatePayload","noRedraw","dp_mode","call_dp","updateMode","setUpdateMode","resetProjects","refreshLink","methodsHash","setGanttMode","sendData","SimpleStorage","_storage","storeItem","getStoredItem","dp","getUserData","userdata","setUserData","_change_id","_ganttMode","changeTaskId","changeLinkId","_row_style","_delete_task","_sendTaskOrder","setDp","DataProcessorEvents","$dp","_dataProcessorHandlers","treeHelper","cascadeDelete","clientSideDelete","cascade_delete","deleteAfterConfirmation","needDbDelete","needCascadeDelete","dpMode","cascade","sendAllData","_tSend","_waitMode","itemLinks","_links","getTaskLinks","updateLink","_tMode","_serverProcessor","substring","serverProcessor","pluralizedMode","urlSeparator","upd","isExist","objData","xml_date","handleResourceCRUD","handleResourceAssignmentCRUD","updated","updatedRows","clientOnly","_in_progress","insertedTasks","pendingAssignments","putAssignmentToQueue","insertResourceAssignment","insertResource","data_processor_events_1","extend_gantt_1","simple_storage_1","createDataProcessor","router","tMode","DataProcessor","setTransactionMode","serverProcessorURL","action_param","autoUpdate","_headers","_payload","_postDelim","_routerParametersFormat","_invalid","messages","inserted","deleted","invalid","invalid_cell","enableUTFencoding","_serializeAsJson","_router","_utf","getSyncState","findRow","existing","set_invalid","is_invalid","markRow","_methods","details","getActionByState","checkBeforeUpdate","editStop","pendingUpdateModes_1","_beforeSendData","_getRowData","_serializeAsJSON","serialize_one","stack","pref","serialized","_forEachUpdatedRow","_sendData","_getAllData","pattern","defineAction","_uActions","afterUpdateCallback","btag","ganttMode","correct","originalSid","afterUpdate","_xml","getGanttMode","reqUrl","filePath","processCallback","finalizeUpdate","cleanUpdate","atag","_dp_init","_setDefaultTransactionMode","delete_confirmation","dataProcessorEvents","setOnAfterUpdate","setOnBeforeUpdateHandler","setAutoUpdate","user","_user","_needUpdate","_updateBusy","afterAutoUpdate","fullSync","loadUpdate","xml_node","getUpdates","vers","_getXmlNodeValue","updates","status_1","parent_1","_applyPayload","_cleanupArgumentsBeforeSend","dataToSend","processedData","_cleanupItemBeforeSend","updatedItem","output","queryParams","dhxVersion","urlParams","preprocessedData","taskState_1","taskAction","ganttMode_1","_onResolvedCreateUpdate_1","actionPromise","errorMsgStart","errorMsgEnd","catch","hasOne","_prepareDate","_prepareArray","traversedObjects","_prepareObject","rawItem","processedItem","_prepareDataItem","dataItem","DEPRECATED_api","server","getDataProcessorModes","getAvailableModes","bindDataStore","itemRepainter","allData","loadedRanges","layerData","extraDataArr","skipRepaint","refreshId","selectedId","deleteItem","_unselect","subItem","getLinkCount","newLink","getTaskCount","getVisibleTaskCount","startTask","calculateTaskLevel","createTasksFacade","createLinksFacade","createDatastoreSelect","datastoreRender","getDatastores","createDatastoreFacade","$StoreType","open_tree_initially","deepcopy_on_parse","storeAccessName","dropService","storeList","refresh_links","refreshLinks","hasSplitParent","_clear_data","oldSelectId","_skipResourceRepaint","unselectTask","facadeFactory","originalTask","checkLinkedTaskVisibility","sync_link","sourceTask","sync_link_delete","sync_links","mapEvents","mapFrom","sourceEvent","targetEvent","taskLinks","existingLink","sourceMatch","targetMatch","typeMatch","show_tasks_outside_timescale","changedTask","sourceVisible","targetVisible","deletedLinks","onItemLoading","onBeforeAdd","onAfterAdd","onBeforeUpdate","onAfterUpdate","onBeforeDelete","onAfterDelete","onIdChange","onBeforeItemMove","onAfterItemMove","onFilterItem","onItemOpen","onItemClose","onBeforeSelect","onAfterSelect","onAfterUnselect","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","_dereq_","1","SomePromiseArray","_SomePromiseArray","any","promises","promise","setHowMany","setUnwrap","2","firstLineError","schedule","Queue","Async","_customScheduler","_isTickUsed","_lateQueue","_normalQueue","_haveDrainedQueues","_trampolineEnabled","drainQueues","_drainQueues","_schedule","AsyncInvokeLater","receiver","_queueTick","AsyncInvoke","AsyncSettlePromises","_pushOne","_drainQueue","_drainQueueStep","_settlePromises","setScheduler","hasCustomScheduler","enableTrampoline","disableTrampolineIfNecessary","hasDevTools","haveItemsQueued","fatalError","exit","throwLater","invokeLater","invoke","settlePromises","_reset","./queue","./schedule","./util","3","INTERNAL","tryConvertToPromise","calledBind","rejectThis","_reject","targetRejected","promiseRejectionQueued","bindingPromise","_then","bindingResolved","thisArg","_bitField","_resolveCallback","bindingRejected","_propagateFrom","propagateFromFunction","_boundValue","boundValueFunction","maybePromise","_target","_setBoundTo","_setOnCancel","_boundTo","_isBound","4","old","bluebird","noConflict","./promise","5","cr","callerCache","getterCache","canEvaluate","isIdentifier","caller","classString","ensureMethod","namedGetter","indexedGetter","maybeGetter","getGetter","6","PromiseArray","apiRejection","tryCatch","errorObj","async","_async","cancellation","_warn","_isCancellable","_cancelBy","_isFollowing","_followee","_cancelBranched","_cancellationParent","_setWillBeCancelled","_branchHasCancelled","_branchesRemainingToCancel","_enoughBranchesHaveCancelled","canceller","_invokeOnCancel","_cancel","_setCancelled","_cancelPromises","_length","_unsetOnCancel","_onCancelField","isPending","_isCancelled","isCancellable","isCancelled","_doInvokeOnCancel","onCancelCallback","internalOnly","_attachExtraTrace","_resultCancelled","_onCancel","_invokeInternalOnCancel","7","NEXT_FILTER","getKeys","instances","boundTo","predicateLoop","matchesPredicate","./es5","8","longStackTraces","contextStack","Context","_trace","CapturedTrace","peekContext","lastIndex","_promiseCreated","_pushContext","_popContext","_peekContext","deactivateLongStackTraces","activateLongStackTraces","Promise_pushContext","Promise_popContext","Promise_PeekContext","Promise_peekContext","Promise_promiseCreated","ctx","9","unhandledRejectionHandled","possiblyUnhandledRejection","printWarning","getDomain","_getDomain","Warning","es5","canAttachTrace","bluebirdFramePattern","nodeFramePattern","parseLinePattern","stackFramePattern","formatStack","indentStackFrames","debugging","warnings","wForgottenReturn","suppressUnhandledRejections","_ensurePossibleRejectionHandled","_setRejectionIsUnhandled","_notifyUnhandledRejection","_notifyUnhandledRejectionIsHandled","fireRejectionEvent","_setReturnedNonUndefined","_returnedNonUndefined","_isRejectionUnhandled","reason","_settledValue","_setUnhandledRejectionIsNotified","_unsetUnhandledRejectionIsNotified","_isUnhandledRejectionNotified","_unsetRejectionIsUnhandled","shouldUseOwnTrace","onPossiblyUnhandledRejection","domain","domainBind","onUnhandledRejectionHandled","disableLongStackTraces","longStackTracesIsSupported","Promise_captureStackTrace","_captureStackTrace","Promise_attachExtraTrace","Promise_dereferenceTrace","_dereferenceTrace","longStackTracesCaptureStackTrace","longStackTracesAttachExtraTrace","longStackTracesDereferenceTrace","hasLongStackTraces","fireDomEvent","CustomEvent","dispatchEvent","eventData","domEvent","Event","initCustomEvent","fireGlobalEvent","generatePromiseLifecycleEventObject","eventToObjectGenerator","promiseCreated","promiseFulfilled","promiseRejected","promiseResolved","promiseCancelled","promiseChained","warning","_warning","unhandledRejection","rejectionHandled","activeFireEvent","globalEventFired","domEventFired","defaultFireEvent","cancellationExecute","executor","onCancel","_attachCancellationCallback","cancellationAttachCancellationCallback","previousOnCancel","cancellationOnCancel","cancellationSetOnCancel","cancellationClearCancellationData","cancellationPropagateFrom","flags","branchesRemainingToCancel","warningsOption","_clearCancellationData","_execute","_propagateFromFunction","monitoring","_boundValueFunction","isFulfilled","ignoreSelf","attachExtraTrace","__stackCleaned__","parseStackAndMessage","notEnumerableProp","formatAndLogError","cleanStack","isTraceLine","isInternalFrame","shouldIgnore","stackFramesAsArray","isSoft","localHandler","localEventFired","formatNonError","maxChars","snip","captureStackTrace","parseLineInfoRegex","parseLineInfo","fileName","_promisesCreated","uncycle","stackToIndex","cycleEdgeNode","currentChildLength","stacks","currentLastIndex","currentLastLine","commonRootMeetPoint","removeCommonRoots","removeDuplicateOrEmptyJumps","reconstructStack","v8stackFramePattern","v8stackFormatter","stackTraceLimit","ignoreUntil","hasStackAfterThrow","isTTY","checkForgottenReturns","handlerLine","creatorLine","traceLines","lineMatches","firstUserLine","msg","setBounds","lastLineError","firstFileName","lastFileName","firstStackLines","lastStackLines","firstIndex","deprecated","replacement","./errors","10","returner","thrower","thenReturn","thenThrow","catchThrow","_reason","caught","catchReturn","_value","11","PromiseReduce","PromiseAll","promiseAllThis","mapSeries","12","_TypeError","_RangeError","Objectfreeze","freeze","subError","nameProperty","defaultMessage","SubError","CancellationError","TimeoutError","AggregateError","OperationalError","cause","errorTypes","RejectionError","13","isES5","getDescriptor","getOwnPropertyDescriptor","getOwnPropertyNames","propertyIsWritable","prop","descriptor","ObjectKeys","14","PromiseMap","15","catchFilter","PassThroughHandlerContext","called","cancelPromise","FinallyHandlerCancelReaction","finallyHandler","checkCancel","succeed","fail","reasonOrValue","isFinallyHandler","isRejected","_passThrough","success","lastly","tap","tapCatch","handlerOrPredicate","catchInstances","./catch_filter","16","Proxyable","yieldHandlers","PromiseSpawn","generatorFunction","yieldHandler","internal","_finallyPromise","_promise","_stack","_generatorFunction","_receiver","_generator","_yieldHandlers","_yieldedPromise","_cancellationPhase","_isResolved","_cleanup","_fulfill","_promiseCancelled","coroutine","returnSentinel","_continue","_promiseFulfilled","_promiseRejected","_run","_rejectCallback","traceParent","promiseFromYieldHandler","bitField","_proxy","PromiseSpawn$","generator","spawn","addYieldHandler","17","spread","18","MappingPromiseArray","constructor$","_callback","_preservedValues","_limit","_inFlight","_queue","_asyncInit","concurrency","_init$","_init","_values","preservedValues","_totalResolved","_resolve","booleans","19","_resolveFromSyncValue","attempt","20","maybeWrapAsError","rErrorKey","wrapAsOperationalError","isUntypedError","markAsOriginatingFromRejection","multiArgs","wrapped","21","spreadAdapter","nodeback","successAdapter","errorAdapter","newReason","asCallback","nodeify","22","makeSelfResolutionError","reflectHandler","PromiseInspection","UNDEFINED_BINDING","errors","APPLY","createContext","nodebackForPromise","_fulfillmentHandler0","_rejectionHandler0","_promise0","_receiver0","_resolveFromExecutor","deferResolve","deferReject","fillTypes","reflect","didFulfill","didReject","_setIsFinal","fulfillmentValue","rejectionReason","originatesFromRejection","getNewLibraryCopy","is","fromNode","fromCallback","_isFateSealed","_setAsyncGuaranteed","cast","_setFulfilled","fulfilled","rejected","internalData","haveInternalData","settler","_settlePromiseCtx","_settlePromiseLateCancellationObserver","_addCallbacks","_setLength","_setRejected","_setFollowing","_isFinal","_unsetCancelled","_receiverAt","_promiseAt","_fulfillmentHandlerAt","_rejectionHandlerAt","_migrateCallback0","follower","fulfill","_migrateCallbackAt","proxyable","shouldBind","_setFollowee","synchronous","ignoreNonErrorWarnings","ensureErrorObject","hasStack","_settlePromiseFromHandler","_settlePromise","isPromise","asyncGuaranteed","_settlePromise0","_clearCallbackDataAtIndex","_fulfillPromises","_rejectPromises","defer","toFastProperties","./any.js","./async","./bind","./call_get.js","./cancel","./context","./debuggability","./direct_resolve","./each.js","./filter.js","./finally","./generators.js","./join","./map.js","./method","./nodeback","./nodeify.js","./promise_array","./promisify.js","./props.js","./race.js","./reduce.js","./settle.js","./some.js","./synchronous_inspection","./thenables","./timers.js","./using.js","23","resolveValueIfEmpty","asArray","_iterate","_resolveEmptyArray","toResolutionValue","getActualLength","shouldCopyValues","isResolved","24","THIS","withAppended","defaultPromisified","__isPromisified__","noCopyPropsPattern","defaultFilter","propsFilter","isPromisified","hasPromisified","suffix","getDataPropertyOrDefault","promisifiableMethods","suffixRegexp","inheritedDataKeys","passesDefaultFilter","keyWithoutAsyncSuffix","checkValid","escapeIdentRegex","makeNodePromisified","makeNodePromisifiedEval","defaultThis","promisified","promisifyAll","promisifier","promisifiedKey","promisify","copyDescriptors","isClass","25","Es6Map","mapToEntries","extractEntry","PropertiesPromiseArray","entries","isMap","_isMap","props","castValue","entriesToMap","keyOffset","26","_capacity","_willBeOverCapacity","_checkCapacity","wrapMask","front","_resizeTo","oldCapacity","srcIndex","dstIndex","arrayMove","27","raceLater","race","28","ReductionPromiseArray","initialValue","_each","_fn","_initialValue","_currentCancellable","_eachValues","completed","valueOrReason","gotAccum","accum","_gotAccum","gotValue","_eachComplete","sender","_resultCancelled$","29","NativePromise","getNativePromise","MutationObserver","GlobalSetImmediate","ProcessNextTick","isRecentNode","nativePromise","standalone","cordova","toggleScheduled","div2","observe","disconnect","30","SettledPromiseArray","_promiseResolved","inspection","_settledValueField","settle","31","CANCELLATION","_howMany","_unwrap","some","howMany","isArrayResolved","_canPossiblyFulfill","_getRangeError","_addFulfilled","_fulfilled","_addRejected","_checkOutcome","_rejected","32","__isCancelled","33","hasProp","doGetThen","getThen","isAnyBluebirdPromise","doThenable","34","HandleWrapper","handle","afterValue","ms","successClear","failureClear","handleWrapper","afterTimeout","35","NULL","dispose","thenable","_isDisposable","_getDisposer","_setDisposable","castPreservingDisposable","tryDispose","Disposer","_data","_context","FunctionDisposer","maybeUnwrapDisposer","isDisposer","ResourceList","doDispose","_unsetDisposable","using","spreadArgs","disposer","reflectedResources","resultPromise","inspections","_disposer","36","tryCatchTarget","globalObject","tryCatcher","Child","Parent","T","maybeError","safeToString","appendee","defaultValue","excludedPrototypes","isExcludedProto","visitedKeys","enumeration","thisAssignmentPattern","hasMethods","hasMethodsOtherThanConstructor","hasThisAssignmentAndStaticMethods","FakeConstructor","ic","rident","filledRange","prefix","ArrayFrom","itResult","hasEnvVariables","chrome","loadTimes","P","stateProviders","provider","regTemplates","initial","template_name","date_format","server_utc","task_unscheduled_time","grid_date_format","tooltip_date_format","copyDomEvent","altKey","_settings","inputMethods","getInputMethods","_drag_start_timer","clearDragTimer","eventParams","timeStamp","original_target","dragStart","traceDragEvents","domElement","inputMethod","mousemove","dragMove","dragScroll","limited_mousemove","dndActive","mouseup","dragEnd","checkPositionChange","diff_x","diff_y","initDnDMarker","backupEventTarget","getEvent","backup_element","elementFromPoint","_defineProperties","__webpack_exports__","_t","instance","Constructor","_classCallCheck","token","_url","_token","_seed","api","protoProps","staticProps","_createClass","Accept","Content-Type","Remote-Token","_fetch","_x","_x2","_t2","credentials","_t3","_t4","_t5","_t6","websocket","_e","_e2","_s","_t29","_wrapper","connect","_t8","_socket","WebSocket","onmessage","fire","_send","_resubscribe","onError","_t9","_this3","_uid","onCall","_t10","_this4","_t11","_t12","_t13","_t14","send","_t15","_e3","_t30","_t31","_e4","onResponse","_t18","_t32","_t20","_t34","_t23","_t33","_t24","_t35","_t26","_t27","_t28","remote_client","remoteEvents","remote","Client","_ready","back","_remote","cspVersion","utc","to_fixed","getUTCMonth","getUTCFullYear","getUTCDay","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCISOWeek","getISOWeek","mask","month_short_hash","month_full_hash","fastVersion","dateToStrFn","getWeek","splt","strToDateFn","cspCompliantVersion","canUseCsp","useCsp","cspAutoCheck","time_part","start_on_monday","month_start","setDate","quarter_start","res_month","setMonth","year_start","minute_start","getMilliseconds","setMilliseconds","_add_days","modifiedDate","inc","originalDate","incCondition","getHoursCondition","getDateCondition","ndate","setYear","add_quarter","num","_getWeekNumber","isoWeek","nday","first_thursday","year_number","ordinal_date","convert_to_utc","createConfig","DOMParser","ActiveXObject","loadXML","parseFromString","tagname","responseXML","xpathExp","docObj","selectNodes","ownerDocument","evaluate","XPathResult","ANY_TYPE","iterateNext","_call","onLoad","getSync","put","postData","del","post","postSync","isQt","onreadystatechange","noCache","setRequestHeader","show_loading","dhx_save_btn","dhx_cancel_btn","dhx_delete_btn","project_sections","milestone_sections","grid_resizer_column_attribute","keep_grid_width","grid_resize","prevent_default_scroll","service","ExtensionsManager","addExtension","_extensions","getExtension","supportedExtensions","license","extensionManager","ExtensionManager","RemoteEvents","templatesLoader","stateService","selected_task","i18n","setLocale","localeObject","MAX_UNDO_STEPS","Undo","maxSteps","undoEnabled","redoEnabled","invert","revert","inverseCommands","_undoStack","_redoStack","getUndoStack","setUndoStack","getRedoStack","setRedoStack","clearUndoStack","clearRedoStack","updateConfigs","undo_steps","undo_types","undo_actions","redo","_pop","_reorderCommands","_applyAction","_push","logAction","weights","actionWeights","weightA","entities","actions","isExists","getMethod","startsWith","noTrack","onBeforeUndo","onBeforeRedo","batchActions","Monitor","_batchAction","_batchMode","_ignore","_ignoreMoveEvents","_initialTasks","_initialLinks","_nestedTasks","_nestedLinks","_undo","_attachEvents","overwrite","_storeTask","_storeLink","isMoveEventsIgnored","toggleIgnoreMoveEvents","startIgnore","stopIgnore","startBatchAction","_timeout","stopBatchAction","onTaskAdded","_storeTaskCommand","onTaskUpdated","onTaskMoved","getInitialTask","_storeEntityCommand","onTaskDeleted","childrenLinks","_storeLinkCommand","onLinkAdded","onLinkUpdated","onLinkDeleted","setNestedTasks","taskIds","_getLinks","setInitialTask","uniqueLinks","setInitialLink","setInitialTaskObject","clearInitialTasks","getInitialLink","clearInitialLinks","deleteCacheCooldown","saveInitialAll","getMoveObjectByTaskId","nested","dragId","projectDrag","selectedIds","onBeforeEditStartId_1","onEditStart_1","_storeCommand","actionType","entityType","monitor_1","undo_1","monitor","changeTaskCommandId","updLink","oldTaskId","newTaskId","changeLinkCommandId","updateTasksIds","updateLinksIds","getInitialState","Tooltip","_tooltipNode","setViewport","_root","_isLikeMouseEvent","_calculateTooltipPosition","setContent","_getViewPort","_getViewPortSize","tooltipNode","mouse","containerPos","domEventsScope","tooltip_1","TooltipManager","_listeners","_initDelayedFunctions","hideTooltip","delayHide","watchableTarget","doOnMouseEnter","onmouseenter","onmousemove","onmouseleave","tooltipFor","cloneDomEvent","clone","delayShow","tooltip_timeout","tooltip_hide_timeout","tooltipManager_1","tooltipManager","touch_tooltip","QuickInfo","_showForTask","_showAtCoordinates","forced","qi","_quickInfoBox","_quickInfoBoxId","_quickInfoTask","quick_info_detached","setContainer","_container","defaultContent","quickinfo_buttons","_createQuickInfoElement","titleBox","titleContent","titleDate","main","controls","_qiButtonClickHandler","_qiKeyPressHandler","_qi_button_click","_appendAtCoordinates","show_quick_info","_getContainer","_get_event_counter_part","xViewport","yViewport","_init_quick_info","_prepare_quick_info_classname","_fill_quick_data","_show_quick_info","domEv","_quickInfoReadonly","quick_info_class","allowedButtons","isEditor","quick_info_title","quick_info_date","popupHeight","scrolls","screenWidth","relativePopupBottom","top_1","quickInfo_1","quickInfo","hidingFunction","clearQuickInfo","multiselect_one_level","_selected","_one_level","_active","_first_selected_when_shift","getDefaultSelected","selected","getSelected","setFirstSelected","getFirstSelected","updateState","setLastSelected","getLastSelected","afterSelect","forSelected","isSameLevel","doSelection","target_ev","defaultLast","isLast","multiSelect","singleSelection","inline_editors_multiselect_open","blockSelection","first_indx","target_indx","last_indx","old_selectTask","old_unselectTask","toggleTaskSelection","getLastSelectedTask","old_isSelected","render_marker","show_markers","marker_class","markerHeight","initMarkerArea","markerArea","$marker_area","_markers","renderMarkers","getMarker","deleteMarker","updateMarker","_getMarkers","$keyboardNavigation","dispatcher","activeNode","globalNode","GanttNode","setActiveNode","getActiveNode","getDefaultNode","TaskCell","TaskRow","isValid","setDefaultNode","fromDomElement","inputs","HeaderCell","focusGlobalNode","blurNode","focusChanged","compareTo","keptFocus","keyDownHandler","isModal","ganttNode","shortcuts","getCommandFromEvent","findHandler","doAction","awaitsFocus","_delay","clearDelay","modalsStack","afterPopup","startModal","trapFocus","endModal","currentTarget","isTopModal","traceLightbox","focusElement","globalIndex","_compose","cellElement","nextElement","prevTask","moveTo","nextTask","home","pagedown","pageup","bindAll","KeyNavNode","viewWidth","viewHeight","scrollPositionX","scrollPositionY","attachedScrollbarHorizontal","scrollbarHorizontal","attachedScrollbarVertical","scrollbarVertical","scrollGrid","shift+down","shift+up","shift+right","shift+left","space","ctrl+left","ctrl+right","ctrl+enter","taskRow","enter, space","EventHandler","canStringifyThis","canStringifyThat","eventFacade","$eventAttached","alt+left","alt+right","alt+up","alt+down","ctrl+z","ctrl+r","currentFocus","currentIndex","lastItem","firstItem","getHash","shortcut","unbind","initKeys","createCommand","expr","getExpressions","words","getWords","commandKeys","specialKeys","printableKey","getHashFromEvent","junctionChar","term","combinationChar","backspace","tab","insert","plus","f1","f2","f3","f4","f5","f6","f7","f8","f9","f10","f11","f12","isTaskFocused","isInlineEditorCell","isNoKeyboardNavigationElement","isLightboxElement","focusHandler","$preventDefault","reFocusActiveNode","outsideGantt","localName","mousedownHandler","locateTask","onReady","gridDataTopScroll","gridDataBottomScroll","updateRender","_redrawTasks","focusedItemVisible","createdTaskId","keepFocusOnNewTask","nodeConstructor","focusOnCreate","getScope","scopes","headerCell","taskCell","findVisibleColumnIndex","keyNavFacade","addShortcut","scopeObject","getShortcutHandler","removeShortcut","getScopeName","setupKeyNav","isExpanded","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","isFullscreenAvailable","fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled","backupBodyPadding","backupElementSizes","zIndex","modified","backupPositioning","updateSizes","expandGantt","onFullScreenChange","getFullscreenElement","positions","originalPositioning","resetParentPositioning","setFullScreenSizes","record","restoreParentPositioning","restoreSizes","cantFullscreen","expand","requestArguments","webkitRequestFullscreen","Element","ALLOW_KEYBOARD_INPUT","requestFullscreen","msRequestFullscreen","mozRequestFullScreen","collapse","requestExitFullscreen","msExitFullscreen","mozCancelFullScreen","webkitExitFullscreen","exitFullscreen","stringifyPrimitive","sep","eq","ks","qs","regexp","maxKeys","kstr","vstr","idx","decode","encode","webpackPolyfill","paths","freeExports","freeModule","freeGlobal","maxInt","tMin","tMax","skew","damp","initialBias","initialN","regexPunycode","regexNonASCII","regexSeparators","not-basic","invalid-input","baseMinusTMin","stringFromCharCode","mapDomain","ucs2decode","extra","counter","ucs2encode","basicToDigit","digitToBasic","digit","flag","adapt","numPoints","firstTime","oldi","w","baseMinusT","inputLength","bias","handledCPCount","basicLength","q","handledCPCountPlusOne","qMinusT","ucs2","toUnicode","100","101","102","200","201","202","203","204","205","206","207","208","226","300","301","302","303","304","305","307","308","400","401","402","403","404","405","406","407","408","409","410","411","412","413","414","415","416","417","418","421","422","423","424","425","426","428","429","431","451","500","501","502","503","504","505","506","507","508","509","510","511","arrayCopy","localStorage","registerImmediate","nextHandle","tasksByHandle","currentlyRunningATask","doc","attachTo","runIfPresent","postMessage","importScripts","postMessageIsAsynchronous","oldOnMessage","canUsePostMessage","messagePrefix","onGlobalMessage","installPostMessageImplementation","MessageChannel","channel","port1","port2","installMessageChannelImplementation","script","installReadyStateChangeImplementation","copyBuffer","custom","toArrayBuffer","preferBinary","_opts","_body","setHeader","useFetch","decideMode","_fetchTimer","_onFinish","lowerName","unsafeHeaders","getHeader","removeHeader","headersObj","headersList","keyName","signal","_fetchAbortController","requestTimeout","withCredentials","_connect","ontimeout","_response","statusValid","flushHeaders","setNoDelay","setSocketKeepAlive","validateParams","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","NaN","rt","LN2","b64","lens","getLens","validLen","placeHoldersLen","Arr","_byteLength","curByte","revLookup","uint8","extraBytes","len2","encodeChunk","lookup","tripletToBase64","_apiUrl","getNodeJSTransport","defaultPort","_prepareConfigPDF","previousDateRage","_serializeHtml","_serializeAll","_fixColumns","_sendToExport","exportToPNG","exportToICal","_serializePlain","exportToExcel","visual","convert","_eachTaskTimed","_no_progress_colors","_serializeTable","_serializeColumns","rawDates","_serializeScales","exportToJSON","_getWorktimeSettings","importFromExcel","File","_nodejsImportExcel","_sendImportAjaxExcel","importFromMSProject","_nodejsImportMSP","_sendImportAjaxMSP","importFromPrimaveraP6","exportToMSProject","skip_circular_links","oldXmlFormat","oldFormatDate","oldXmlDate","oldDateFormat","_customProjectProperties","_customTaskProperties","_clearRecLinks","_exportConfig","$custom_data","exportToPrimaveraP6","formDataInstance","network","parts1","parts2","parts3","X-Requested-With","sheet","getHeaders","resData","durationUnit","projectProperties","taskProperties","_xdr","pack","_nodejsPostRequest","Content-Length","_markColumns","$template","_ajaxToExport","xdoc","_serializableGanttConfig","callbackFunction","form","_createHiddenForm","submit","_hidden_export_form","_copyObjectBase","formatDate","_color_box","_color_hash","_getStyles","_getColor","_getMinutesWorktimeSettings","parsedRanges","defaultWorkTimes","0","wTime","_working_time_helper","get_calendar","_pull","_originalCopyObject","_copyObjectPlain","rgb","_copyObjectTable","toISOstring","_copyObjectColumns","getDayIndex","_day_index_by_date","$start","$end","hiddenCells","scaleCellsWidth","$type","tmps","$text","$left","$right","_copyObjectColors","$color","ct","_copyObjectAll","smartScales","_exportSerialize","_getRaw","_scale_helpers","_get_scales","autosizeMinWidth","_get_resize_options","cellColors","cellCss","scaleCell","scaleCell_class","scaleCss","exportMode","ccount","xmlFormat","_lvl","_clearLevel","_makeLinksSameLevel","skippedLinks","_clearCircDependencies","_clearLinksSameLevel","usedTasks","prevLink","sources","$_source","_onCircDependencyFind","targets","curLink","_source","targetLvl","linkT","sourceParent","$_target","projectName","projectDates","start_end","manual","EventsManager","_mouseDown","_calculateDirectionVector","vectors","resultVector_1","vector","magnitude","angleDegrees","atan2","_applyDndReadyStyles","_timeline","_clearDndReadyStyles","_getScrollPosition","_countNewScrollPosition","coords","_startPoint","shiftY","_scrollState","_setScrollPosition","_stopDrag","_originalReadonly","_startDrag","enabled","filterTargets","clickDragUseKey","eventsManager_1","helpers_1","SelectedRegion","_el","_singleRow","_getTaskPositionByTop","_view","_viewPort","_endPoint","draw","singleRow","_useRequestAnimationFrame","useRequestAnimationFrame","getElement","setStart","startPoint","_startDate","setEnd","endPoint","_endDate","_positionPoint","absolute","setPosition","positionPoint","tasksByTime","tasksByIndex","_getTasksByTop","getInBounds","startValue","endValue","selectedRegion","_originPosition","_restoreOriginPosition","scheduledDndCoordinates","_getCoordinates","dragTimelineUseKey","viewPortBounds","selectedRegion_1","defaultConfig","eventsManager","__assign","click_drag_1","drag_timeline_1","export_api_1","fullscreen_1","quick_info_1","extensions_gpl_1"],"mappings":";;;;;;;;;;;;CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,IARA,CASCK,OAAA,WACD,mBCTA,I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wFCtBX,IAAAqxF,EAAA/mM,EAAA,KACAwxH,EAAAxxH,EAAA,KAEMiU,EADNjU,EAAA,IAC6BiU,MAAQu9G,EAAKu1E,EAAArxF,SAGjCh2G,EAAAuU,QADTvU,EAAAg2G,QAAezhG","file":"dhtmlxgantt.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"dhtmlxgantt\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"dhtmlxgantt\"] = factory();\n\telse\n\t\troot[\"dhtmlxgantt\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\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\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 = \"/codebase/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 301);\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar helpers = require(\"./helpers\");\n\nvar plainObjectConstructor = {}.constructor.toString();\n\nfunction isCustomType(object) {\n var constructorString = object.constructor.toString();\n return constructorString !== plainObjectConstructor;\n}\n\nfunction copy(object) {\n var i, result; // iterator, types array, result\n\n if (object && _typeof(object) == \"object\") {\n switch (true) {\n case helpers.isDate(object):\n result = new Date(object);\n break;\n\n case helpers.isArray(object):\n result = new Array(object.length);\n\n for (i = 0; i < object.length; i++) {\n result[i] = copy(object[i]);\n }\n\n break;\n\n /*\t\tcase (helpers.isStringObject(object)):\r\n \t\t\tresult = new String(object);\r\n \t\t\tbreak;\r\n \t\tcase (helpers.isNumberObject(object)):\r\n \t\t\tresult = new Number(object);\r\n \t\t\tbreak;\r\n \t\tcase (helpers.isBooleanObject(object)):\r\n \t\t\tresult = new Boolean(object);\r\n \t\t\tbreak;*/\n\n default:\n if (isCustomType(object)) {\n result = Object.create(object);\n } else {\n result = {};\n }\n\n for (i in object) {\n if (Object.prototype.hasOwnProperty.apply(object, [i])) result[i] = copy(object[i]);\n }\n\n break;\n }\n }\n\n return result || object;\n}\n\nfunction mixin(target, source, force) {\n for (var f in source) {\n if (target[f] === undefined || force) target[f] = source[f];\n }\n\n return target;\n}\n\nfunction defined(obj) {\n return typeof obj != \"undefined\";\n}\n\nvar seed;\n\nfunction uid() {\n if (!seed) seed = new Date().valueOf();\n seed++;\n return seed;\n} //creates function with specified \"this\" pointer\n\n\nfunction bind(functor, object) {\n if (functor.bind) return functor.bind(object);else return function () {\n return functor.apply(object, arguments);\n };\n}\n\nfunction event(el, event, handler, capture) {\n if (el.addEventListener) el.addEventListener(event, handler, capture === undefined ? false : capture);else if (el.attachEvent) el.attachEvent(\"on\" + event, handler);\n}\n\nfunction eventRemove(el, event, handler, capture) {\n if (el.removeEventListener) el.removeEventListener(event, handler, capture === undefined ? false : capture);else if (el.detachEvent) el.detachEvent(\"on\" + event, handler);\n}\n\nmodule.exports = {\n copy: copy,\n defined: defined,\n mixin: mixin,\n uid: uid,\n bind: bind,\n event: event,\n eventRemove: eventRemove\n};","//returns position of html element on the page\nfunction elementPosition(elem) {\n var top = 0,\n left = 0,\n right = 0,\n bottom = 0;\n\n if (elem.getBoundingClientRect) {\n //HTML5 method\n var box = elem.getBoundingClientRect();\n var body = document.body;\n var docElem = document.documentElement || document.body.parentNode || document.body;\n var scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;\n var scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;\n var clientTop = docElem.clientTop || body.clientTop || 0;\n var clientLeft = docElem.clientLeft || body.clientLeft || 0;\n top = box.top + scrollTop - clientTop;\n left = box.left + scrollLeft - clientLeft;\n right = document.body.offsetWidth - box.right;\n bottom = document.body.offsetHeight - box.bottom;\n } else {\n //fallback to naive approach\n while (elem) {\n top = top + parseInt(elem.offsetTop, 10);\n left = left + parseInt(elem.offsetLeft, 10);\n elem = elem.offsetParent;\n }\n\n right = document.body.offsetWidth - elem.offsetWidth - left;\n bottom = document.body.offsetHeight - elem.offsetHeight - top;\n }\n\n return {\n y: Math.round(top),\n x: Math.round(left),\n width: elem.offsetWidth,\n height: elem.offsetHeight,\n right: Math.round(right),\n bottom: Math.round(bottom)\n };\n}\n\nfunction isVisible(node) {\n var display = false,\n visibility = false;\n\n if (window.getComputedStyle) {\n var style = window.getComputedStyle(node, null);\n display = style[\"display\"];\n visibility = style[\"visibility\"];\n } else if (node.currentStyle) {\n display = node.currentStyle[\"display\"];\n visibility = node.currentStyle[\"visibility\"];\n }\n\n return display != \"none\" && visibility != \"hidden\";\n}\n\nfunction hasNonNegativeTabIndex(node) {\n return !isNaN(node.getAttribute(\"tabindex\")) && node.getAttribute(\"tabindex\") * 1 >= 0;\n}\n\nfunction hasHref(node) {\n var canHaveHref = {\n \"a\": true,\n \"area\": true\n };\n\n if (canHaveHref[node.nodeName.loLowerCase()]) {\n return !!node.getAttribute(\"href\");\n }\n\n return true;\n}\n\nfunction isEnabled(node) {\n var canDisable = {\n \"input\": true,\n \"select\": true,\n \"textarea\": true,\n \"button\": true,\n \"object\": true\n };\n\n if (canDisable[node.nodeName.toLowerCase()]) {\n return !node.hasAttribute(\"disabled\");\n }\n\n return true;\n}\n\nfunction getFocusableNodes(root) {\n var nodes = root.querySelectorAll([\"a[href]\", \"area[href]\", \"input\", \"select\", \"textarea\", \"button\", \"iframe\", \"object\", \"embed\", \"[tabindex]\", \"[contenteditable]\"].join(\", \"));\n var nodesArray = Array.prototype.slice.call(nodes, 0);\n\n for (var i = 0; i < nodesArray.length; i++) {\n nodesArray[i].$position = i; // we remember original nodes order, \n // so when we sort them by tabindex we ensure order of nodes with same tabindex is preserved, \n // since some browsers do unstable sort\n } // use tabindex to sort focusable nodes\n\n\n nodesArray.sort(function (a, b) {\n if (a.tabIndex === 0 && b.tabIndex !== 0) {\n return 1;\n }\n\n if (a.tabIndex !== 0 && b.tabIndex === 0) {\n return -1;\n }\n\n if (a.tabIndex === b.tabIndex) {\n // ensure we do stable sort\n return a.$position - b.$position;\n }\n\n if (a.tabIndex < b.tabIndex) {\n return -1;\n }\n\n return 1;\n });\n\n for (var i = 0; i < nodesArray.length; i++) {\n var node = nodesArray[i];\n var isValid = (hasNonNegativeTabIndex(node) || isEnabled(node) || hasHref(node)) && isVisible(node);\n\n if (!isValid) {\n nodesArray.splice(i, 1);\n i--;\n }\n }\n\n return nodesArray;\n}\n\nfunction getScrollSize() {\n var div = document.createElement(\"div\");\n div.style.cssText = \"visibility:hidden;position:absolute;left:-1000px;width:100px;padding:0px;margin:0px;height:110px;min-height:100px;overflow-y:scroll;\";\n document.body.appendChild(div);\n var width = div.offsetWidth - div.clientWidth;\n document.body.removeChild(div);\n return width;\n}\n\nfunction getClassName(node) {\n if (!node) return \"\";\n var className = node.className || \"\";\n if (className.baseVal) //'className' exist but not a string - IE svg element in DOM\n className = className.baseVal;\n if (!className.indexOf) className = \"\";\n return _trimString(className);\n}\n\nfunction addClassName(node, className) {\n if (className && node.className.indexOf(className) === -1) {\n node.className += \" \" + className;\n }\n}\n\nfunction removeClassName(node, name) {\n name = name.split(\" \");\n\n for (var i = 0; i < name.length; i++) {\n var regEx = new RegExp(\"\\\\s?\\\\b\" + name[i] + \"\\\\b(?![-_.])\", \"\");\n node.className = node.className.replace(regEx, \"\");\n }\n}\n\nfunction hasClass(element, className) {\n if ('classList' in element) {\n return element.classList.contains(className);\n } else {\n return new RegExp(\"\\\\b\" + className + \"\\\\b\").test(element.className);\n }\n}\n\nfunction toNode(node) {\n if (typeof node === \"string\") {\n return document.getElementById(node) || document.querySelector(node) || document.body;\n }\n\n return node || document.body;\n}\n\nvar _slave;\n\nfunction insert(node, newone) {\n if (!_slave) {\n _slave = document.createElement(\"div\");\n }\n\n _slave.innerHTML = newone;\n var child = _slave.firstChild;\n node.appendChild(child);\n return child;\n}\n\nfunction remove(node) {\n if (node && node.parentNode) {\n node.parentNode.removeChild(node);\n }\n}\n\nfunction getChildren(node, css) {\n var ch = node.childNodes;\n var len = ch.length;\n var out = [];\n\n for (var i = 0; i < len; i++) {\n var obj = ch[i];\n\n if (obj.className && obj.className.indexOf(css) !== -1) {\n out.push(obj);\n }\n }\n\n return out;\n}\n\nfunction getTargetNode(e) {\n var trg;\n if (e.tagName) trg = e;else {\n e = e || window.event;\n trg = e.target || e.srcElement;\n\n if (trg.shadowRoot && e.composedPath) {\n trg = e.composedPath()[0];\n }\n }\n return trg;\n}\n\nfunction locateAttribute(e, attribute) {\n if (!attribute) return;\n var trg = getTargetNode(e);\n\n while (trg) {\n if (trg.getAttribute) {\n //text nodes has not getAttribute\n var test = trg.getAttribute(attribute);\n if (test) return trg;\n }\n\n trg = trg.parentNode;\n }\n\n return null;\n}\n\nfunction _trimString(str) {\n var func = String.prototype.trim || function () {\n return this.replace(/^\\s+|\\s+$/g, \"\");\n };\n\n return func.apply(str);\n}\n\nfunction locateClassName(e, classname, strict) {\n var trg = getTargetNode(e);\n var css = \"\";\n if (strict === undefined) strict = true;\n\n while (trg) {\n css = getClassName(trg);\n\n if (css) {\n var ind = css.indexOf(classname);\n\n if (ind >= 0) {\n if (!strict) return trg; //check that we have exact match\n\n var left = ind === 0 || !_trimString(css.charAt(ind - 1));\n var right = ind + classname.length >= css.length || !_trimString(css.charAt(ind + classname.length));\n if (left && right) return trg;\n }\n }\n\n trg = trg.parentNode;\n }\n\n return null;\n}\n/*\r\nevent position relatively to DOM element\r\n */\n\n\nfunction getRelativeEventPosition(ev, node) {\n var d = document.documentElement;\n var box = elementPosition(node);\n return {\n x: ev.clientX + d.scrollLeft - d.clientLeft - box.x + node.scrollLeft,\n y: ev.clientY + d.scrollTop - d.clientTop - box.y + node.scrollTop\n };\n}\n\nfunction isChildOf(child, parent) {\n if (!child || !parent) {\n return false;\n }\n\n while (child && child != parent) {\n child = child.parentNode;\n }\n\n return child === parent;\n}\n\nfunction closest(element, selector) {\n if (element.closest) {\n return element.closest(selector);\n } else if (element.matches || element.msMatchesSelector || element.webkitMatchesSelector) {\n var el = element;\n if (!document.documentElement.contains(el)) return null;\n\n do {\n var method = el.matches || el.msMatchesSelector || el.webkitMatchesSelector;\n if (method.call(el, selector)) return el;\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n\n return null;\n } else {\n // eslint-disable-next-line no-console\n console.error(\"Your browser is not supported\");\n return null;\n }\n}\n\nfunction isShadowDomSupported() {\n return document.head.createShadowRoot || document.head.attachShadow;\n}\n/**\r\n * Returns element that has the browser focus, or null if no element has focus.\r\n * Works with shadow DOM, so it's prefereed to use this function instead of document.activeElement directly.\r\n * @returns HTMLElement\r\n */\n\n\nfunction getActiveElement() {\n var activeElement = document.activeElement;\n\n if (activeElement.shadowRoot) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n\n if (activeElement === document.body && document.getSelection) {\n activeElement = document.getSelection().focusNode || document.body;\n }\n\n return activeElement;\n}\n/**\r\n * Returns document.body or the host node of the ShadowRoot, if the element is attached to ShadowDom\r\n * @param {HTMLElement} element \r\n * @returns HTMLElement\r\n */\n\n\nfunction getRootNode(element) {\n if (!element) {\n return document.body;\n }\n\n if (!isShadowDomSupported()) {\n return document.body;\n }\n\n while (element.parentNode && (element = element.parentNode)) {\n if (element instanceof ShadowRoot) {\n return element.host;\n }\n }\n\n return document.body;\n}\n\nfunction hasShadowParent(element) {\n return !!getRootNode(element);\n}\n\nmodule.exports = {\n getNodePosition: elementPosition,\n getFocusableNodes: getFocusableNodes,\n getScrollSize: getScrollSize,\n getClassName: getClassName,\n addClassName: addClassName,\n removeClassName: removeClassName,\n insertNode: insert,\n removeNode: remove,\n getChildNodes: getChildren,\n toNode: toNode,\n locateClassName: locateClassName,\n locateAttribute: locateAttribute,\n getTargetNode: getTargetNode,\n getRelativeEventPosition: getRelativeEventPosition,\n isChildOf: isChildOf,\n hasClass: hasClass,\n closest: closest,\n getRootNode: getRootNode,\n hasShadowParent: hasShadowParent,\n isShadowDomSupported: isShadowDomSupported,\n getActiveElement: getActiveElement\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar units = {\n \"second\": 1,\n \"minute\": 60,\n \"hour\": 60 * 60,\n \"day\": 60 * 60 * 24,\n \"week\": 60 * 60 * 24 * 7,\n \"month\": 60 * 60 * 24 * 30,\n \"quarter\": 60 * 60 * 24 * 30 * 3,\n \"year\": 60 * 60 * 24 * 365\n};\n\nfunction getSecondsInUnit(unit) {\n return units[unit] || units.hour;\n}\n\nfunction forEach(arr, callback) {\n if (arr.forEach) {\n arr.forEach(callback);\n } else {\n var workArray = arr.slice();\n\n for (var i = 0; i < workArray.length; i++) {\n callback(workArray[i], i);\n }\n }\n}\n\nfunction arrayMap(arr, callback) {\n if (arr.map) {\n return arr.map(callback);\n } else {\n var workArray = arr.slice();\n var resArray = [];\n\n for (var i = 0; i < workArray.length; i++) {\n resArray.push(callback(workArray[i], i));\n }\n\n return resArray;\n }\n}\n\nfunction arrayFind(arr, callback) {\n if (arr.find) {\n return arr.find(callback);\n } else {\n for (var i = 0; i < arr.length; i++) {\n if (callback(arr[i], i)) {\n return arr[i];\n }\n }\n }\n}\n\nfunction arrayIncludes(arr, item) {\n if (arr.includes) {\n return arr.includes(item);\n } else {\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] === item) {\n return true;\n }\n }\n\n return false;\n }\n} // iframe-safe array type check instead of using instanceof\n\n\nfunction isArray(obj) {\n if (Array.isArray) {\n return Array.isArray(obj);\n } else {\n // close enough\n return obj && obj.length !== undefined && obj.pop && obj.push;\n }\n} // non-primitive string object, e.g. new String(\"abc\")\n\n\nfunction isStringObject(obj) {\n return obj && _typeof(obj) === \"object\" && Function.prototype.toString.call(obj.constructor) === \"function String() { [native code] }\";\n} // non-primitive number object, e.g. new Number(5)\n\n\nfunction isNumberObject(obj) {\n return obj && _typeof(obj) === \"object\" && Function.prototype.toString.call(obj.constructor) === \"function Number() { [native code] }\";\n} // non-primitive number object, e.g. new Boolean(true)\n\n\nfunction isBooleanObject(obj) {\n return obj && _typeof(obj) === \"object\" && Function.prototype.toString.call(obj.constructor) === \"function Boolean() { [native code] }\";\n}\n\nfunction isDate(obj) {\n if (obj && _typeof(obj) === \"object\") {\n return !!(obj.getFullYear && obj.getMonth && obj.getDate);\n } else {\n return false;\n }\n}\n\nfunction isValidDate(obj) {\n return isDate(obj) && !isNaN(obj.getTime());\n}\n\nfunction arrayFilter(arr, callback) {\n var result = [];\n\n if (arr.filter) {\n return arr.filter(callback);\n } else {\n for (var i = 0; i < arr.length; i++) {\n if (callback(arr[i], i)) {\n result[result.length] = arr[i];\n }\n }\n\n return result;\n }\n}\n\nfunction hashToArray(hash) {\n var result = [];\n\n for (var key in hash) {\n if (hash.hasOwnProperty(key)) {\n result.push(hash[key]);\n }\n }\n\n return result;\n}\n\nfunction arraySome(arr, callback) {\n if (arr.length === 0) return false;\n\n for (var i = 0; i < arr.length; i++) {\n if (callback(arr[i], i, arr)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction arrayDifference(arr, callback) {\n return arrayFilter(arr, function (item, i) {\n return !callback(item, i);\n });\n}\n\nfunction throttle(callback, timeout) {\n var wait = false;\n return function () {\n if (!wait) {\n callback.apply(null, arguments);\n wait = true;\n setTimeout(function () {\n wait = false;\n }, timeout);\n }\n };\n}\n\nfunction delay(callback, timeout) {\n var timer;\n\n var result = function result() {\n result.$cancelTimeout();\n result.$pending = true;\n var args = Array.prototype.slice.call(arguments);\n timer = setTimeout(function () {\n callback.apply(this, args);\n result.$pending = false;\n }, timeout);\n };\n\n result.$pending = false;\n\n result.$cancelTimeout = function () {\n clearTimeout(timer);\n result.$pending = false;\n };\n\n result.$execute = function () {\n var args = Array.prototype.slice.call(arguments);\n callback.apply(this, args);\n result.$cancelTimeout();\n };\n\n return result;\n}\n\nfunction sortArrayOfHash(arr, field, desc) {\n var compare = function compare(a, b) {\n return a < b;\n };\n\n arr.sort(function (a, b) {\n if (a[field] === b[field]) return 0;\n return desc ? compare(a[field], b[field]) : compare(b[field], a[field]);\n });\n}\n\nfunction objectKeys(obj) {\n if (Object.keys) {\n return Object.keys(obj);\n }\n\n var result = [];\n var key;\n\n for (key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n result.push(key);\n }\n }\n\n return result;\n}\n\nfunction isEventable(obj) {\n return obj.attachEvent && obj.detachEvent;\n} //GS-1090: A task should be able to have the id = 0\n\n\nfunction replaceValidZeroId(id, rootId) {\n if (checkZeroId(id) && !checkZeroId(rootId)) {\n id = \"0\";\n }\n\n return id;\n}\n\nfunction checkZeroId(id) {\n if (id === 0) {\n return true;\n }\n\n return false;\n}\n\nfunction findBinary(array, target) {\n // modified binary search, target value not exactly match array elements, looking for closest one\n var low = 0,\n high = array.length - 1,\n i,\n item,\n prev;\n\n while (low <= high) {\n i = Math.floor((low + high) / 2);\n item = +array[i];\n prev = +array[i - 1];\n\n if (item < target) {\n low = i + 1;\n continue;\n }\n\n if (item > target) {\n if (!(!isNaN(prev) && prev < target)) {\n high = i - 1;\n continue;\n } else {\n // if target is between 'i' and 'i-1' return 'i - 1'\n return i - 1;\n }\n }\n\n while (+array[i] == +array[i + 1]) {\n i++;\n }\n\n return i;\n }\n\n return array.length - 1;\n}\n\nmodule.exports = {\n getSecondsInUnit: getSecondsInUnit,\n forEach: forEach,\n arrayMap: arrayMap,\n arrayIncludes: arrayIncludes,\n arrayFind: arrayFind,\n arrayFilter: arrayFilter,\n arrayDifference: arrayDifference,\n arraySome: arraySome,\n hashToArray: hashToArray,\n sortArrayOfHash: sortArrayOfHash,\n throttle: throttle,\n isArray: isArray,\n isDate: isDate,\n isValidDate: isValidDate,\n isStringObject: isStringObject,\n isNumberObject: isNumberObject,\n isBooleanObject: isBooleanObject,\n delay: delay,\n objectKeys: objectKeys,\n isEventable: isEventable,\n replaceValidZeroId: replaceValidZeroId,\n checkZeroId: checkZeroId,\n findBinary: findBinary\n};","module.exports = function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar g; // This works in non-strict mode\n\ng = function () {\n return this;\n}();\n\ntry {\n // This works if eval is allowed (see CSP)\n g = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n // This works if the window reference is available\n if ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n} // g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\n\nmodule.exports = g;","var EventHost = function EventHost() {\n this._silent_mode = false;\n this.listeners = {};\n};\n\nEventHost.prototype = {\n _silentStart: function _silentStart() {\n this._silent_mode = true;\n },\n _silentEnd: function _silentEnd() {\n this._silent_mode = false;\n }\n};\n\nvar createEventStorage = function createEventStorage(obj) {\n var handlers = {};\n var index = 0;\n\n var eventStorage = function eventStorage() {\n var combinedResult = true;\n\n for (var i in handlers) {\n var handlerResult = handlers[i].apply(obj, arguments);\n combinedResult = combinedResult && handlerResult;\n }\n\n return combinedResult;\n };\n\n eventStorage.addEvent = function (handler, settings) {\n if (typeof handler == \"function\") {\n var handlerId;\n\n if (settings && settings.id) {\n handlerId = settings.id;\n } else {\n handlerId = index;\n index++;\n }\n\n if (settings && settings.once) {\n var originalHandler = handler;\n\n handler = function handler() {\n originalHandler();\n eventStorage.removeEvent(handlerId);\n };\n }\n\n handlers[handlerId] = handler;\n return handlerId;\n }\n\n return false;\n };\n\n eventStorage.removeEvent = function (id) {\n delete handlers[id];\n };\n\n eventStorage.clear = function () {\n handlers = {};\n };\n\n return eventStorage;\n};\n\nfunction makeEventable(obj) {\n var eventHost = new EventHost();\n\n obj.attachEvent = function (eventName, handler, settings) {\n eventName = 'ev_' + eventName.toLowerCase();\n\n if (!eventHost.listeners[eventName]) {\n eventHost.listeners[eventName] = createEventStorage(this);\n }\n\n if (settings && settings.thisObject) {\n handler = handler.bind(settings.thisObject);\n }\n\n var innerId = eventHost.listeners[eventName].addEvent(handler, settings);\n var handlerId = eventName + ':' + innerId; //return ID (ev_eventname:1)\n\n if (settings && settings.id) {\n handlerId = settings.id;\n }\n\n return handlerId;\n };\n\n obj.attachAll = function (callback) {\n this.attachEvent('listen_all', callback);\n };\n\n obj.callEvent = function (name, eventArguments) {\n if (eventHost._silent_mode) return true;\n var handlerName = 'ev_' + name.toLowerCase();\n var listeners = eventHost.listeners;\n\n if (listeners['ev_listen_all']) {\n listeners['ev_listen_all'].apply(this, [name].concat(eventArguments));\n }\n\n if (listeners[handlerName]) return listeners[handlerName].apply(this, eventArguments);\n return true;\n };\n\n obj.checkEvent = function (name) {\n var listeners = eventHost.listeners;\n return !!listeners['ev_' + name.toLowerCase()];\n };\n\n obj.detachEvent = function (id) {\n if (id) {\n var listeners = eventHost.listeners;\n\n for (var i in listeners) {\n listeners[i].removeEvent(id); //remove event\n }\n\n var list = id.split(':'); //get EventName and ID\n\n var listeners = eventHost.listeners;\n\n if (list.length === 2) {\n var eventName = list[0];\n var eventId = list[1];\n\n if (listeners[eventName]) {\n listeners[eventName].removeEvent(eventId); //remove event\n }\n }\n }\n };\n\n obj.detachAllEvents = function () {\n for (var name in eventHost.listeners) {\n eventHost.listeners[name].clear();\n }\n };\n}\n\nmodule.exports = makeEventable;","module.exports = function getVisibleTasksRange(gantt, view, config, datastore, viewport) {\n var buffer = 1;\n var start = view.getItemIndexByTopPosition(viewport.y) || 0;\n var end = view.getItemIndexByTopPosition(viewport.y_end) || datastore.count();\n var indexStart = Math.max(0, start - buffer);\n var indexEnd = Math.min(datastore.count(), end + buffer); // GS-2481 and GS-1715, need to take into account selected task when using keyboard shortcuts and when the inline editor is opened \n\n var extraTasksIds = [];\n\n if (gantt.config.keyboard_navigation && gantt.getSelectedId()) {\n extraTasksIds.push(gantt.getSelectedId());\n }\n\n if (gantt.$ui.getView(\"grid\") && gantt.ext.inlineEditors && gantt.ext.inlineEditors.getState().id) {\n var inlineEditorId = gantt.ext.inlineEditors.getState().id;\n\n if (datastore.exists(inlineEditorId)) {\n extraTasksIds.push(inlineEditorId);\n }\n }\n\n return {\n start: indexStart,\n end: indexEnd,\n ids: extraTasksIds\n };\n};","function dummy() {\n // eslint-disable-next-line\n console.log(\"Method is not implemented.\");\n}\n\nfunction BaseControl() {} // base methods will be runned in gantt context\n\n\nBaseControl.prototype.render = dummy; // arguments: sns\n\nBaseControl.prototype.set_value = dummy; // arguments: node, value, ev, sns(config)\n\nBaseControl.prototype.get_value = dummy; // arguments node, ev, sns(config)\n\nBaseControl.prototype.focus = dummy; // arguments: node\n\nmodule.exports = function (gantt) {\n // we could send current instance of gantt to module\n return BaseControl;\n};","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor;\n\n var TempCtor = function TempCtor() {};\n\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n };\n}","// shim for using process in browser\nvar process = module.exports = {}; // cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\n\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n})();\n\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n } // if setTimeout wasn't available but was latter defined\n\n\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\n\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n } // if clearTimeout wasn't available but was latter defined\n\n\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\n\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n\n draining = false;\n\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n var len = queue.length;\n\n while (len) {\n currentQueue = queue;\n queue = [];\n\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n\n queueIndex = -1;\n len = queue.length;\n }\n\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n\n queue.push(new Item(fun, args));\n\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n}; // v8 likes predictible objects\n\n\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\n\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\n\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) {\n return [];\n};\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () {\n return '/';\n};\n\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\nprocess.umask = function () {\n return 0;\n};","module.exports = function (gantt) {\n var BaseEditor = function BaseEditor() {};\n\n BaseEditor.prototype = {\n show: function show(id, column, config, placeholder) {},\n hide: function hide() {},\n set_value: function set_value(value, id, column, node) {\n this.get_input(node).value = value;\n },\n get_value: function get_value(id, column, node) {\n return this.get_input(node).value || \"\";\n },\n is_changed: function is_changed(value, id, column, node) {\n var currentValue = this.get_value(id, column, node);\n\n if (currentValue && value && currentValue.valueOf && value.valueOf) {\n return currentValue.valueOf() != value.valueOf();\n } else {\n return currentValue != value;\n }\n },\n is_valid: function is_valid(value, id, column, node) {\n return true;\n },\n save: function save(id, column, node) {},\n get_input: function get_input(node) {\n return node.querySelector(\"input\");\n },\n focus: function focus(node) {\n var input = this.get_input(node);\n\n if (!input) {\n return;\n }\n\n if (input.focus) {\n input.focus();\n }\n\n if (input.select) {\n input.select();\n }\n }\n };\n return BaseEditor;\n};","/* eslint-disable no-restricted-globals */\nvar isWindowAwailable = typeof window !== \"undefined\";\n/* eslint-enable no-restricted-globals */\n\nvar env = {\n isIE: isWindowAwailable && (navigator.userAgent.indexOf(\"MSIE\") >= 0 || navigator.userAgent.indexOf(\"Trident\") >= 0),\n isIE6: isWindowAwailable && !XMLHttpRequest && navigator.userAgent.indexOf(\"MSIE\") >= 0,\n isIE7: isWindowAwailable && navigator.userAgent.indexOf(\"MSIE 7.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") < 0,\n isIE8: isWindowAwailable && navigator.userAgent.indexOf(\"MSIE 8.0\") >= 0 && navigator.userAgent.indexOf(\"Trident\") >= 0,\n isOpera: isWindowAwailable && navigator.userAgent.indexOf(\"Opera\") >= 0,\n isChrome: isWindowAwailable && navigator.userAgent.indexOf(\"Chrome\") >= 0,\n isKHTML: isWindowAwailable && (navigator.userAgent.indexOf(\"Safari\") >= 0 || navigator.userAgent.indexOf(\"Konqueror\") >= 0),\n isFF: isWindowAwailable && navigator.userAgent.indexOf(\"Firefox\") >= 0,\n isIPad: isWindowAwailable && navigator.userAgent.search(/iPad/gi) >= 0,\n isEdge: isWindowAwailable && navigator.userAgent.indexOf(\"Edge\") != -1,\n isNode: !isWindowAwailable || typeof navigator == \"undefined\"\n};\nmodule.exports = env;","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a duplex stream is just a stream that is both readable and writable.\n// Since JS doesn't have multiple prototypal inheritance, this class\n// prototypally inherits from Readable, and then parasitically from\n// Writable.\n'use strict';\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\n/**/\n\n\nvar objectKeys = Object.keys || function (obj) {\n var keys = [];\n\n for (var key in obj) {\n keys.push(key);\n }\n\n return keys;\n};\n/**/\n\n\nmodule.exports = Duplex;\n/**/\n\nvar util = require('core-util-is');\n\nutil.inherits = require('inherits');\n/**/\n\nvar Readable = require('./_stream_readable');\n\nvar Writable = require('./_stream_writable');\n\nutil.inherits(Duplex, Readable);\n{\n // avoid scope creep, the keys array can then be collected\n var keys = objectKeys(Writable.prototype);\n\n for (var v = 0; v < keys.length; v++) {\n var method = keys[v];\n if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];\n }\n}\n\nfunction Duplex(options) {\n if (!(this instanceof Duplex)) return new Duplex(options);\n Readable.call(this, options);\n Writable.call(this, options);\n if (options && options.readable === false) this.readable = false;\n if (options && options.writable === false) this.writable = false;\n this.allowHalfOpen = true;\n if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;\n this.once('end', onend);\n}\n\nObject.defineProperty(Duplex.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n}); // the no-half-open enforcer\n\nfunction onend() {\n // if we allow half-open state, or if the writable side ended,\n // then we're ok.\n if (this.allowHalfOpen || this._writableState.ended) return; // no more data can be written.\n // But allow more writes to happen in this tick.\n\n pna.nextTick(onEndNT, this);\n}\n\nfunction onEndNT(self) {\n self.end();\n}\n\nObject.defineProperty(Duplex.prototype, 'destroyed', {\n get: function get() {\n if (this._readableState === undefined || this._writableState === undefined) {\n return false;\n }\n\n return this._readableState.destroyed && this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (this._readableState === undefined || this._writableState === undefined) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n this._writableState.destroyed = value;\n }\n});\n\nDuplex.prototype._destroy = function (err, cb) {\n this.push(null);\n this.end();\n pna.nextTick(cb, err);\n};","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n/* eslint-disable no-proto */\n'use strict';\n\nvar base64 = require('base64-js');\n\nvar ieee754 = require('ieee754');\n\nvar isArray = require('isarray');\n\nexports.Buffer = Buffer;\nexports.SlowBuffer = SlowBuffer;\nexports.INSPECT_MAX_BYTES = 50;\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Use Object implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * Due to various browser bugs, sometimes the Object implementation will be used even\n * when the browser supports typed arrays.\n *\n * Note:\n *\n * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\n * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\n *\n * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\n *\n * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\n * incorrect length in some situations.\n\n * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\n * get the Object implementation, which is slower but behaves correctly.\n */\n\nBuffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined ? global.TYPED_ARRAY_SUPPORT : typedArraySupport();\n/*\n * Export kMaxLength after typed array support is determined.\n */\n\nexports.kMaxLength = kMaxLength();\n\nfunction typedArraySupport() {\n try {\n var arr = new Uint8Array(1);\n arr.__proto__ = {\n __proto__: Uint8Array.prototype,\n foo: function foo() {\n return 42;\n }\n };\n return arr.foo() === 42 && // typed array instances can be augmented\n typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\n arr.subarray(1, 1).byteLength === 0; // ie10 has broken `subarray`\n } catch (e) {\n return false;\n }\n}\n\nfunction kMaxLength() {\n return Buffer.TYPED_ARRAY_SUPPORT ? 0x7fffffff : 0x3fffffff;\n}\n\nfunction createBuffer(that, length) {\n if (kMaxLength() < length) {\n throw new RangeError('Invalid typed array length');\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = new Uint8Array(length);\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n if (that === null) {\n that = new Buffer(length);\n }\n\n that.length = length;\n }\n\n return that;\n}\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\n\nfunction Buffer(arg, encodingOrOffset, length) {\n if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {\n return new Buffer(arg, encodingOrOffset, length);\n } // Common case.\n\n\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new Error('If encoding is specified then the first argument must be a string');\n }\n\n return allocUnsafe(this, arg);\n }\n\n return from(this, arg, encodingOrOffset, length);\n}\n\nBuffer.poolSize = 8192; // not used by this implementation\n// TODO: Legacy, not needed anymore. Remove in next major version.\n\nBuffer._augment = function (arr) {\n arr.__proto__ = Buffer.prototype;\n return arr;\n};\n\nfunction from(that, value, encodingOrOffset, length) {\n if (typeof value === 'number') {\n throw new TypeError('\"value\" argument must not be a number');\n }\n\n if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {\n return fromArrayBuffer(that, value, encodingOrOffset, length);\n }\n\n if (typeof value === 'string') {\n return fromString(that, value, encodingOrOffset);\n }\n\n return fromObject(that, value);\n}\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\n\n\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(null, value, encodingOrOffset, length);\n};\n\nif (Buffer.TYPED_ARRAY_SUPPORT) {\n Buffer.prototype.__proto__ = Uint8Array.prototype;\n Buffer.__proto__ = Uint8Array;\n\n if (typeof Symbol !== 'undefined' && Symbol.species && Buffer[Symbol.species] === Buffer) {\n // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true\n });\n }\n}\n\nfunction assertSize(size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be a number');\n } else if (size < 0) {\n throw new RangeError('\"size\" argument must not be negative');\n }\n}\n\nfunction alloc(that, size, fill, encoding) {\n assertSize(size);\n\n if (size <= 0) {\n return createBuffer(that, size);\n }\n\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string' ? createBuffer(that, size).fill(fill, encoding) : createBuffer(that, size).fill(fill);\n }\n\n return createBuffer(that, size);\n}\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\n\n\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(null, size, fill, encoding);\n};\n\nfunction allocUnsafe(that, size) {\n assertSize(size);\n that = createBuffer(that, size < 0 ? 0 : checked(size) | 0);\n\n if (!Buffer.TYPED_ARRAY_SUPPORT) {\n for (var i = 0; i < size; ++i) {\n that[i] = 0;\n }\n }\n\n return that;\n}\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\n\n\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(null, size);\n};\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\n\n\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(null, size);\n};\n\nfunction fromString(that, string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8';\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('\"encoding\" must be a valid string encoding');\n }\n\n var length = byteLength(string, encoding) | 0;\n that = createBuffer(that, length);\n var actual = that.write(string, encoding);\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n that = that.slice(0, actual);\n }\n\n return that;\n}\n\nfunction fromArrayLike(that, array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0;\n that = createBuffer(that, length);\n\n for (var i = 0; i < length; i += 1) {\n that[i] = array[i] & 255;\n }\n\n return that;\n}\n\nfunction fromArrayBuffer(that, array, byteOffset, length) {\n array.byteLength; // this throws if `array` is not a valid ArrayBuffer\n\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\\'offset\\' is out of bounds');\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\\'length\\' is out of bounds');\n }\n\n if (byteOffset === undefined && length === undefined) {\n array = new Uint8Array(array);\n } else if (length === undefined) {\n array = new Uint8Array(array, byteOffset);\n } else {\n array = new Uint8Array(array, byteOffset, length);\n }\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n // Return an augmented `Uint8Array` instance, for best performance\n that = array;\n that.__proto__ = Buffer.prototype;\n } else {\n // Fallback: Return an object instance of the Buffer class\n that = fromArrayLike(that, array);\n }\n\n return that;\n}\n\nfunction fromObject(that, obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0;\n that = createBuffer(that, len);\n\n if (that.length === 0) {\n return that;\n }\n\n obj.copy(that, 0, 0, len);\n return that;\n }\n\n if (obj) {\n if (typeof ArrayBuffer !== 'undefined' && obj.buffer instanceof ArrayBuffer || 'length' in obj) {\n if (typeof obj.length !== 'number' || isnan(obj.length)) {\n return createBuffer(that, 0);\n }\n\n return fromArrayLike(that, obj);\n }\n\n if (obj.type === 'Buffer' && isArray(obj.data)) {\n return fromArrayLike(that, obj.data);\n }\n }\n\n throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.');\n}\n\nfunction checked(length) {\n // Note: cannot use `length < kMaxLength()` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= kMaxLength()) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + kMaxLength().toString(16) + ' bytes');\n }\n\n return length | 0;\n}\n\nfunction SlowBuffer(length) {\n if (+length != length) {\n // eslint-disable-line eqeqeq\n length = 0;\n }\n\n return Buffer.alloc(+length);\n}\n\nBuffer.isBuffer = function isBuffer(b) {\n return !!(b != null && b._isBuffer);\n};\n\nBuffer.compare = function compare(a, b) {\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError('Arguments must be Buffers');\n }\n\n if (a === b) return 0;\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) return -1;\n if (y < x) return 1;\n return 0;\n};\n\nBuffer.isEncoding = function isEncoding(encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true;\n\n default:\n return false;\n }\n};\n\nBuffer.concat = function concat(list, length) {\n if (!isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0);\n }\n\n var i;\n\n if (length === undefined) {\n length = 0;\n\n for (i = 0; i < list.length; ++i) {\n length += list[i].length;\n }\n }\n\n var buffer = Buffer.allocUnsafe(length);\n var pos = 0;\n\n for (i = 0; i < list.length; ++i) {\n var buf = list[i];\n\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers');\n }\n\n buf.copy(buffer, pos);\n pos += buf.length;\n }\n\n return buffer;\n};\n\nfunction byteLength(string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length;\n }\n\n if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {\n return string.byteLength;\n }\n\n if (typeof string !== 'string') {\n string = '' + string;\n }\n\n var len = string.length;\n if (len === 0) return 0; // Use a for loop to avoid recursion\n\n var loweredCase = false;\n\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len;\n\n case 'utf8':\n case 'utf-8':\n case undefined:\n return utf8ToBytes(string).length;\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2;\n\n case 'hex':\n return len >>> 1;\n\n case 'base64':\n return base64ToBytes(string).length;\n\n default:\n if (loweredCase) return utf8ToBytes(string).length; // assume utf8\n\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n}\n\nBuffer.byteLength = byteLength;\n\nfunction slowToString(encoding, start, end) {\n var loweredCase = false; // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n\n if (start === undefined || start < 0) {\n start = 0;\n } // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n\n\n if (start > this.length) {\n return '';\n }\n\n if (end === undefined || end > this.length) {\n end = this.length;\n }\n\n if (end <= 0) {\n return '';\n } // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n\n\n end >>>= 0;\n start >>>= 0;\n\n if (end <= start) {\n return '';\n }\n\n if (!encoding) encoding = 'utf8';\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end);\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end);\n\n case 'ascii':\n return asciiSlice(this, start, end);\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end);\n\n case 'base64':\n return base64Slice(this, start, end);\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end);\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n encoding = (encoding + '').toLowerCase();\n loweredCase = true;\n }\n }\n} // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect\n// Buffer instances.\n\n\nBuffer.prototype._isBuffer = true;\n\nfunction swap(b, n, m) {\n var i = b[n];\n b[n] = b[m];\n b[m] = i;\n}\n\nBuffer.prototype.swap16 = function swap16() {\n var len = this.length;\n\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits');\n }\n\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1);\n }\n\n return this;\n};\n\nBuffer.prototype.swap32 = function swap32() {\n var len = this.length;\n\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits');\n }\n\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3);\n swap(this, i + 1, i + 2);\n }\n\n return this;\n};\n\nBuffer.prototype.swap64 = function swap64() {\n var len = this.length;\n\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits');\n }\n\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7);\n swap(this, i + 1, i + 6);\n swap(this, i + 2, i + 5);\n swap(this, i + 3, i + 4);\n }\n\n return this;\n};\n\nBuffer.prototype.toString = function toString() {\n var length = this.length | 0;\n if (length === 0) return '';\n if (arguments.length === 0) return utf8Slice(this, 0, length);\n return slowToString.apply(this, arguments);\n};\n\nBuffer.prototype.equals = function equals(b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');\n if (this === b) return true;\n return Buffer.compare(this, b) === 0;\n};\n\nBuffer.prototype.inspect = function inspect() {\n var str = '';\n var max = exports.INSPECT_MAX_BYTES;\n\n if (this.length > 0) {\n str = this.toString('hex', 0, max).match(/.{2}/g).join(' ');\n if (this.length > max) str += ' ... ';\n }\n\n return '';\n};\n\nBuffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n if (!Buffer.isBuffer(target)) {\n throw new TypeError('Argument must be a Buffer');\n }\n\n if (start === undefined) {\n start = 0;\n }\n\n if (end === undefined) {\n end = target ? target.length : 0;\n }\n\n if (thisStart === undefined) {\n thisStart = 0;\n }\n\n if (thisEnd === undefined) {\n thisEnd = this.length;\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index');\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0;\n }\n\n if (thisStart >= thisEnd) {\n return -1;\n }\n\n if (start >= end) {\n return 1;\n }\n\n start >>>= 0;\n end >>>= 0;\n thisStart >>>= 0;\n thisEnd >>>= 0;\n if (this === target) return 0;\n var x = thisEnd - thisStart;\n var y = end - start;\n var len = Math.min(x, y);\n var thisCopy = this.slice(thisStart, thisEnd);\n var targetCopy = target.slice(start, end);\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i];\n y = targetCopy[i];\n break;\n }\n }\n\n if (x < y) return -1;\n if (y < x) return 1;\n return 0;\n}; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\n\n\nfunction bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1; // Normalize byteOffset\n\n if (typeof byteOffset === 'string') {\n encoding = byteOffset;\n byteOffset = 0;\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff;\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000;\n }\n\n byteOffset = +byteOffset; // Coerce to Number.\n\n if (isNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : buffer.length - 1;\n } // Normalize byteOffset: negative offsets start from the end of the buffer\n\n\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\n if (byteOffset >= buffer.length) {\n if (dir) return -1;else byteOffset = buffer.length - 1;\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0;else return -1;\n } // Normalize val\n\n\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding);\n } // Finally, search either indexOf (if dir is true) or lastIndexOf\n\n\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1;\n }\n\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n } else if (typeof val === 'number') {\n val = val & 0xFF; // Search for a byte value [0-255]\n\n if (Buffer.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n }\n }\n\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n }\n\n throw new TypeError('val must be string, number or Buffer');\n}\n\nfunction arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n var indexSize = 1;\n var arrLength = arr.length;\n var valLength = val.length;\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase();\n\n if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1;\n }\n\n indexSize = 2;\n arrLength /= 2;\n valLength /= 2;\n byteOffset /= 2;\n }\n }\n\n function read(buf, i) {\n if (indexSize === 1) {\n return buf[i];\n } else {\n return buf.readUInt16BE(i * indexSize);\n }\n }\n\n var i;\n\n if (dir) {\n var foundIndex = -1;\n\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i;\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;\n } else {\n if (foundIndex !== -1) i -= i - foundIndex;\n foundIndex = -1;\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n\n for (i = byteOffset; i >= 0; i--) {\n var found = true;\n\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false;\n break;\n }\n }\n\n if (found) return i;\n }\n }\n\n return -1;\n}\n\nBuffer.prototype.includes = function includes(val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1;\n};\n\nBuffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n};\n\nBuffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n};\n\nfunction hexWrite(buf, string, offset, length) {\n offset = Number(offset) || 0;\n var remaining = buf.length - offset;\n\n if (!length) {\n length = remaining;\n } else {\n length = Number(length);\n\n if (length > remaining) {\n length = remaining;\n }\n } // must be an even number of digits\n\n\n var strLen = string.length;\n if (strLen % 2 !== 0) throw new TypeError('Invalid hex string');\n\n if (length > strLen / 2) {\n length = strLen / 2;\n }\n\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16);\n if (isNaN(parsed)) return i;\n buf[offset + i] = parsed;\n }\n\n return i;\n}\n\nfunction utf8Write(buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);\n}\n\nfunction asciiWrite(buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length);\n}\n\nfunction latin1Write(buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length);\n}\n\nfunction base64Write(buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length);\n}\n\nfunction ucs2Write(buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n}\n\nBuffer.prototype.write = function write(string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8';\n length = this.length;\n offset = 0; // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset;\n length = this.length;\n offset = 0; // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset | 0;\n\n if (isFinite(length)) {\n length = length | 0;\n if (encoding === undefined) encoding = 'utf8';\n } else {\n encoding = length;\n length = undefined;\n } // legacy write(string, encoding, offset, length) - remove in v0.13\n\n } else {\n throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');\n }\n\n var remaining = this.length - offset;\n if (length === undefined || length > remaining) length = remaining;\n\n if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds');\n }\n\n if (!encoding) encoding = 'utf8';\n var loweredCase = false;\n\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length);\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length);\n\n case 'ascii':\n return asciiWrite(this, string, offset, length);\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length);\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length);\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length);\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n encoding = ('' + encoding).toLowerCase();\n loweredCase = true;\n }\n }\n};\n\nBuffer.prototype.toJSON = function toJSON() {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n };\n};\n\nfunction base64Slice(buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf);\n } else {\n return base64.fromByteArray(buf.slice(start, end));\n }\n}\n\nfunction utf8Slice(buf, start, end) {\n end = Math.min(buf.length, end);\n var res = [];\n var i = start;\n\n while (i < end) {\n var firstByte = buf[i];\n var codePoint = null;\n var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint;\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte;\n }\n\n break;\n\n case 2:\n secondByte = buf[i + 1];\n\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;\n\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint;\n }\n }\n\n break;\n\n case 3:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;\n\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint;\n }\n }\n\n break;\n\n case 4:\n secondByte = buf[i + 1];\n thirdByte = buf[i + 2];\n fourthByte = buf[i + 3];\n\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;\n\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint;\n }\n }\n\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD;\n bytesPerSequence = 1;\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000;\n res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n codePoint = 0xDC00 | codePoint & 0x3FF;\n }\n\n res.push(codePoint);\n i += bytesPerSequence;\n }\n\n return decodeCodePointsArray(res);\n} // Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\n\n\nvar MAX_ARGUMENTS_LENGTH = 0x1000;\n\nfunction decodeCodePointsArray(codePoints) {\n var len = codePoints.length;\n\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints); // avoid extra slice()\n } // Decode in chunks to avoid \"call stack size exceeded\".\n\n\n var res = '';\n var i = 0;\n\n while (i < len) {\n res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));\n }\n\n return res;\n}\n\nfunction asciiSlice(buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F);\n }\n\n return ret;\n}\n\nfunction latin1Slice(buf, start, end) {\n var ret = '';\n end = Math.min(buf.length, end);\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i]);\n }\n\n return ret;\n}\n\nfunction hexSlice(buf, start, end) {\n var len = buf.length;\n if (!start || start < 0) start = 0;\n if (!end || end < 0 || end > len) end = len;\n var out = '';\n\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i]);\n }\n\n return out;\n}\n\nfunction utf16leSlice(buf, start, end) {\n var bytes = buf.slice(start, end);\n var res = '';\n\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n }\n\n return res;\n}\n\nBuffer.prototype.slice = function slice(start, end) {\n var len = this.length;\n start = ~~start;\n end = end === undefined ? len : ~~end;\n\n if (start < 0) {\n start += len;\n if (start < 0) start = 0;\n } else if (start > len) {\n start = len;\n }\n\n if (end < 0) {\n end += len;\n if (end < 0) end = 0;\n } else if (end > len) {\n end = len;\n }\n\n if (end < start) end = start;\n var newBuf;\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n newBuf = this.subarray(start, end);\n newBuf.__proto__ = Buffer.prototype;\n } else {\n var sliceLen = end - start;\n newBuf = new Buffer(sliceLen, undefined);\n\n for (var i = 0; i < sliceLen; ++i) {\n newBuf[i] = this[i + start];\n }\n }\n\n return newBuf;\n};\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\n\n\nfunction checkOffset(offset, ext, length) {\n if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n var val = this[offset];\n var mul = 1;\n var i = 0;\n\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n\n return val;\n};\n\nBuffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length);\n }\n\n var val = this[offset + --byteLength];\n var mul = 1;\n\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul;\n }\n\n return val;\n};\n\nBuffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n return this[offset];\n};\n\nBuffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] | this[offset + 1] << 8;\n};\n\nBuffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n return this[offset] << 8 | this[offset + 1];\n};\n\nBuffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;\n};\n\nBuffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n};\n\nBuffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n var val = this[offset];\n var mul = 1;\n var i = 0;\n\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul;\n }\n\n mul *= 0x80;\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n return val;\n};\n\nBuffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {\n offset = offset | 0;\n byteLength = byteLength | 0;\n if (!noAssert) checkOffset(offset, byteLength, this.length);\n var i = byteLength;\n var mul = 1;\n var val = this[offset + --i];\n\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul;\n }\n\n mul *= 0x80;\n if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n return val;\n};\n\nBuffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 1, this.length);\n if (!(this[offset] & 0x80)) return this[offset];\n return (0xff - this[offset] + 1) * -1;\n};\n\nBuffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset] | this[offset + 1] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\n\nBuffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 2, this.length);\n var val = this[offset + 1] | this[offset] << 8;\n return val & 0x8000 ? val | 0xFFFF0000 : val;\n};\n\nBuffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n};\n\nBuffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n};\n\nBuffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, true, 23, 4);\n};\n\nBuffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 4, this.length);\n return ieee754.read(this, offset, false, 23, 4);\n};\n\nBuffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, true, 52, 8);\n};\n\nBuffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n if (!noAssert) checkOffset(offset, 8, this.length);\n return ieee754.read(this, offset, false, 52, 8);\n};\n\nfunction checkInt(buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance');\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds');\n if (offset + ext > buf.length) throw new RangeError('Index out of range');\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var mul = 1;\n var i = 0;\n this[offset] = value & 0xFF;\n\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = value / mul & 0xFF;\n }\n\n return offset + byteLength;\n};\n\nBuffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n byteLength = byteLength | 0;\n\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n checkInt(this, value, offset, byteLength, maxBytes, 0);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n this[offset + i] = value & 0xFF;\n\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = value / mul & 0xFF;\n }\n\n return offset + byteLength;\n};\n\nBuffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n this[offset] = value & 0xff;\n return offset + 1;\n};\n\nfunction objectWriteUInt16(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffff + value + 1;\n\n for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {\n buf[offset + i] = (value & 0xff << 8 * (littleEndian ? i : 1 - i)) >>> (littleEndian ? i : 1 - i) * 8;\n }\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n\n return offset + 2;\n};\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n\n return offset + 2;\n};\n\nfunction objectWriteUInt32(buf, value, offset, littleEndian) {\n if (value < 0) value = 0xffffffff + value + 1;\n\n for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {\n buf[offset + i] = value >>> (littleEndian ? i : 3 - i) * 8 & 0xff;\n }\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset + 3] = value >>> 24;\n this[offset + 2] = value >>> 16;\n this[offset + 1] = value >>> 8;\n this[offset] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n\n return offset + 4;\n};\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n\n return offset + 4;\n};\n\nBuffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = 0;\n var mul = 1;\n var sub = 0;\n this[offset] = value & 0xFF;\n\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1;\n }\n\n this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength;\n};\n\nBuffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {\n value = +value;\n offset = offset | 0;\n\n if (!noAssert) {\n var limit = Math.pow(2, 8 * byteLength - 1);\n checkInt(this, value, offset, byteLength, limit - 1, -limit);\n }\n\n var i = byteLength - 1;\n var mul = 1;\n var sub = 0;\n this[offset + i] = value & 0xFF;\n\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1;\n }\n\n this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n }\n\n return offset + byteLength;\n};\n\nBuffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value);\n if (value < 0) value = 0xff + value + 1;\n this[offset] = value & 0xff;\n return offset + 1;\n};\n\nBuffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n } else {\n objectWriteUInt16(this, value, offset, true);\n }\n\n return offset + 2;\n};\n\nBuffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 8;\n this[offset + 1] = value & 0xff;\n } else {\n objectWriteUInt16(this, value, offset, false);\n }\n\n return offset + 2;\n};\n\nBuffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value & 0xff;\n this[offset + 1] = value >>> 8;\n this[offset + 2] = value >>> 16;\n this[offset + 3] = value >>> 24;\n } else {\n objectWriteUInt32(this, value, offset, true);\n }\n\n return offset + 4;\n};\n\nBuffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n value = +value;\n offset = offset | 0;\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n if (value < 0) value = 0xffffffff + value + 1;\n\n if (Buffer.TYPED_ARRAY_SUPPORT) {\n this[offset] = value >>> 24;\n this[offset + 1] = value >>> 16;\n this[offset + 2] = value >>> 8;\n this[offset + 3] = value & 0xff;\n } else {\n objectWriteUInt32(this, value, offset, false);\n }\n\n return offset + 4;\n};\n\nfunction checkIEEE754(buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range');\n if (offset < 0) throw new RangeError('Index out of range');\n}\n\nfunction writeFloat(buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);\n }\n\n ieee754.write(buf, value, offset, littleEndian, 23, 4);\n return offset + 4;\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert);\n};\n\nBuffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert);\n};\n\nfunction writeDouble(buf, value, offset, littleEndian, noAssert) {\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);\n }\n\n ieee754.write(buf, value, offset, littleEndian, 52, 8);\n return offset + 8;\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert);\n};\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert);\n}; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\n\n\nBuffer.prototype.copy = function copy(target, targetStart, start, end) {\n if (!start) start = 0;\n if (!end && end !== 0) end = this.length;\n if (targetStart >= target.length) targetStart = target.length;\n if (!targetStart) targetStart = 0;\n if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done\n\n if (end === start) return 0;\n if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions\n\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds');\n }\n\n if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds');\n if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob?\n\n if (end > this.length) end = this.length;\n\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start;\n }\n\n var len = end - start;\n var i;\n\n if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start];\n }\n } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\n // ascending copy from start\n for (i = 0; i < len; ++i) {\n target[i + targetStart] = this[i + start];\n }\n } else {\n Uint8Array.prototype.set.call(target, this.subarray(start, start + len), targetStart);\n }\n\n return len;\n}; // Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\n\n\nBuffer.prototype.fill = function fill(val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start;\n start = 0;\n end = this.length;\n } else if (typeof end === 'string') {\n encoding = end;\n end = this.length;\n }\n\n if (val.length === 1) {\n var code = val.charCodeAt(0);\n\n if (code < 256) {\n val = code;\n }\n }\n\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string');\n }\n\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding);\n }\n } else if (typeof val === 'number') {\n val = val & 255;\n } // Invalid ranges are not set to a default, so can range check early.\n\n\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index');\n }\n\n if (end <= start) {\n return this;\n }\n\n start = start >>> 0;\n end = end === undefined ? this.length : end >>> 0;\n if (!val) val = 0;\n var i;\n\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val;\n }\n } else {\n var bytes = Buffer.isBuffer(val) ? val : utf8ToBytes(new Buffer(val, encoding).toString());\n var len = bytes.length;\n\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len];\n }\n }\n\n return this;\n}; // HELPER FUNCTIONS\n// ================\n\n\nvar INVALID_BASE64_RE = /[^+\\/0-9A-Za-z-_]/g;\n\nfunction base64clean(str) {\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = stringtrim(str).replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to ''\n\n if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n\n while (str.length % 4 !== 0) {\n str = str + '=';\n }\n\n return str;\n}\n\nfunction stringtrim(str) {\n if (str.trim) return str.trim();\n return str.replace(/^\\s+|\\s+$/g, '');\n}\n\nfunction toHex(n) {\n if (n < 16) return '0' + n.toString(16);\n return n.toString(16);\n}\n\nfunction utf8ToBytes(string, units) {\n units = units || Infinity;\n var codePoint;\n var length = string.length;\n var leadSurrogate = null;\n var bytes = [];\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i); // is surrogate component\n\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue;\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n continue;\n } // valid lead\n\n\n leadSurrogate = codePoint;\n continue;\n } // 2 leads in a row\n\n\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n leadSurrogate = codePoint;\n continue;\n } // valid surrogate pair\n\n\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n }\n\n leadSurrogate = null; // encode utf8\n\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break;\n bytes.push(codePoint);\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break;\n bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break;\n bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break;\n bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n } else {\n throw new Error('Invalid code point');\n }\n }\n\n return bytes;\n}\n\nfunction asciiToBytes(str) {\n var byteArray = [];\n\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF);\n }\n\n return byteArray;\n}\n\nfunction utf16leToBytes(str, units) {\n var c, hi, lo;\n var byteArray = [];\n\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break;\n c = str.charCodeAt(i);\n hi = c >> 8;\n lo = c % 256;\n byteArray.push(lo);\n byteArray.push(hi);\n }\n\n return byteArray;\n}\n\nfunction base64ToBytes(str) {\n return base64.toByteArray(base64clean(str));\n}\n\nfunction blitBuffer(src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if (i + offset >= dst.length || i >= src.length) break;\n dst[i + offset] = src[i];\n }\n\n return i;\n}\n\nfunction isnan(val) {\n return val !== val; // eslint-disable-line no-self-compare\n}","var utils = require(\"../../../utils/utils\"),\n eventable = require(\"../../../utils/eventable\"),\n domHelpers = require(\"../utils/dom_helpers\");\n\nvar Cell = function () {\n \"use strict\";\n\n function Cell(parent, config, factory, gantt) {\n if (parent) {\n this.$container = domHelpers.toNode(parent);\n this.$parent = parent;\n } // save config\n\n\n this.$config = utils.mixin(config, {\n headerHeight: 33\n });\n this.$gantt = gantt;\n this.$domEvents = gantt._createDomEventScope(); // set id\n\n this.$id = config.id || \"c\" + utils.uid();\n this.$name = \"cell\";\n this.$factory = factory;\n eventable(this);\n }\n\n Cell.prototype.destructor = function () {\n this.$parent = this.$container = this.$view = null;\n var mouse = this.$gantt.$services.getService(\"mouseEvents\");\n mouse.detach(\"click\", \"gantt_header_arrow\", this._headerClickHandler);\n this.$domEvents.detachAll();\n this.callEvent(\"onDestroy\", []);\n this.detachAllEvents();\n };\n\n Cell.prototype.cell = function (id) {\n return null;\n };\n\n Cell.prototype.scrollTo = function (left, top) {\n //GS-333 Add a way to scroll the HTML views:\n var cell = this.$view;\n if (this.$config.html) cell = this.$view.firstChild;\n\n if (left * 1 == left) {\n cell.scrollLeft = left;\n }\n\n if (top * 1 == top) {\n cell.scrollTop = top;\n }\n };\n\n Cell.prototype.clear = function () {\n this.getNode().innerHTML = \"\";\n this.getNode().className = \"gantt_layout_content\";\n this.getNode().style.padding = \"0\";\n };\n\n Cell.prototype.resize = function (_final) {\n if (this.$parent) {\n return this.$parent.resize(_final);\n }\n\n if (_final === false) {\n this.$preResize = true;\n }\n\n var topCont = this.$container;\n var x = topCont.offsetWidth;\n var y = topCont.offsetHeight;\n var topSize = this.getSize();\n\n if (topCont === document.body) {\n x = document.body.offsetWidth;\n y = document.body.offsetHeight;\n }\n\n if (x < topSize.minWidth) {\n x = topSize.minWidth;\n }\n\n if (x > topSize.maxWidth) {\n x = topSize.maxWidth;\n }\n\n if (y < topSize.minHeight) {\n y = topSize.minHeight;\n }\n\n if (y > topSize.maxHeight) {\n y = topSize.maxHeight;\n }\n\n this.setSize(x, y);\n\n if (!this.$preResize) {//\tself.callEvent(\"onResize\", [x, y]);\n }\n\n this.$preResize = false;\n };\n\n Cell.prototype.hide = function () {\n this._hide(true);\n\n this.resize();\n };\n\n Cell.prototype.show = function (force) {\n this._hide(false);\n\n if (force && this.$parent) {\n this.$parent.show();\n }\n\n this.resize();\n };\n\n Cell.prototype._hide = function (mode) {\n if (mode === true && this.$view.parentNode) {\n this.$view.parentNode.removeChild(this.$view);\n } else if (mode === false && !this.$view.parentNode) {\n var index = this.$parent.cellIndex(this.$id);\n this.$parent.moveView(this, index);\n }\n\n this.$config.hidden = mode;\n };\n\n Cell.prototype.$toHTML = function (content, css) {\n if (content === void 0) {\n content = \"\";\n }\n\n css = [css || \"\", this.$config.css || \"\"].join(\" \");\n var obj = this.$config;\n var header = \"\";\n\n if (obj.raw) {\n content = typeof obj.raw === \"string\" ? obj.raw : \"\";\n } else {\n if (!content) {\n content = \"
\" + (obj.html || \"\") + \"
\";\n }\n\n if (obj.header) {\n var collapseIcon = obj.canCollapse ? \"
\" : \"\";\n header = \"
\" + collapseIcon + \"
\" + obj.header + \"
\";\n }\n }\n\n return \"
\" + header + content + \"
\";\n };\n\n Cell.prototype.$fill = function (node, parent) {\n this.$view = node;\n this.$parent = parent;\n this.init();\n };\n\n Cell.prototype.getNode = function () {\n return this.$view.querySelector(\"gantt_layout_cell\") || this.$view;\n };\n\n Cell.prototype.init = function () {\n // [NOT-GOOD] code is executed for each component, while it still has only one handler, it is no good\n var self = this;\n\n this._headerClickHandler = function (e) {\n var cellId = domHelpers.locateAttribute(e, \"data-cell-id\");\n\n if (cellId == self.$id) {\n self.toggle();\n }\n };\n\n var mouse = this.$gantt.$services.getService(\"mouseEvents\");\n mouse.delegate(\"click\", \"gantt_header_arrow\", this._headerClickHandler);\n this.callEvent(\"onReady\", []);\n };\n\n Cell.prototype.toggle = function () {\n this.$config.collapsed = !this.$config.collapsed;\n this.resize();\n };\n\n Cell.prototype.getSize = function () {\n var size = {\n height: this.$config.height || 0,\n width: this.$config.width || 0,\n gravity: this.$config.gravity || 1,\n minHeight: this.$config.minHeight || 0,\n minWidth: this.$config.minWidth || 0,\n maxHeight: this.$config.maxHeight || 100000000000,\n maxWidth: this.$config.maxWidth || 100000000000\n };\n\n if (this.$config.collapsed) {\n var mode = this.$config.mode === \"x\";\n size[mode ? \"width\" : \"height\"] = size[mode ? \"maxWidth\" : \"maxHeight\"] = this.$config.headerHeight;\n }\n\n return size;\n };\n\n Cell.prototype.getContentSize = function () {\n var width = this.$lastSize.contentX;\n\n if (width !== width * 1) {\n width = this.$lastSize.width;\n }\n\n var height = this.$lastSize.contentY;\n\n if (height !== height * 1) {\n height = this.$lastSize.height;\n }\n\n return {\n width: width,\n height: height\n };\n };\n\n Cell.prototype._getBorderSizes = function () {\n var borders = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n horizontal: 0,\n vertical: 0\n };\n\n if (this._currentBorders) {\n if (this._currentBorders[this._borders.left]) {\n borders.left = 1;\n borders.horizontal++;\n }\n\n if (this._currentBorders[this._borders.right]) {\n borders.right = 1;\n borders.horizontal++;\n }\n\n if (this._currentBorders[this._borders.top]) {\n borders.top = 1;\n borders.vertical++;\n }\n\n if (this._currentBorders[this._borders.bottom]) {\n borders.bottom = 1;\n borders.vertical++;\n }\n }\n\n return borders;\n };\n\n Cell.prototype.setSize = function (x, y) {\n this.$view.style.width = x + \"px\";\n this.$view.style.height = y + \"px\";\n\n var borders = this._getBorderSizes();\n\n var contentY = y - borders.vertical;\n var contentX = x - borders.horizontal;\n this.$lastSize = {\n x: x,\n y: y,\n contentX: contentX,\n contentY: contentY\n };\n\n if (this.$config.header) {\n this._sizeHeader();\n } else {\n this._sizeContent();\n }\n };\n\n Cell.prototype._borders = {\n \"left\": \"gantt_layout_cell_border_left\",\n \"right\": \"gantt_layout_cell_border_right\",\n \"top\": \"gantt_layout_cell_border_top\",\n \"bottom\": \"gantt_layout_cell_border_bottom\"\n };\n\n Cell.prototype._setBorders = function (css, view) {\n if (!view) {\n view = this;\n }\n\n var node = view.$view;\n\n for (var i in this._borders) {\n domHelpers.removeClassName(node, this._borders[i]);\n }\n\n if (typeof css == \"string\") {\n css = [css];\n }\n\n var cssHash = {};\n\n for (var i = 0; i < css.length; i++) {\n domHelpers.addClassName(node, css[i]);\n cssHash[css[i]] = true;\n }\n\n view._currentBorders = cssHash;\n };\n\n Cell.prototype._sizeContent = function () {\n var content = this.$view.childNodes[0];\n\n if (content && content.className == \"gantt_layout_content\") {\n content.style.height = this.$lastSize.contentY + \"px\";\n }\n };\n\n Cell.prototype._sizeHeader = function () {\n var size = this.$lastSize;\n size.contentY -= this.$config.headerHeight;\n var header = this.$view.childNodes[0];\n var content = this.$view.childNodes[1];\n var xLayout = this.$config.mode === \"x\";\n\n if (this.$config.collapsed) {\n content.style.display = \"none\";\n\n if (xLayout) {\n header.className = \"gantt_layout_header collapsed_x\";\n header.style.width = size.y + \"px\";\n var d = Math.floor(size.y / 2 - size.x / 2);\n header.style.transform = \"rotate(90deg) translate(\" + d + \"px, \" + d + \"px)\";\n content.style.display = \"none\";\n } else {\n header.className = \"gantt_layout_header collapsed_y\";\n }\n } else {\n if (xLayout) {\n header.className = \"gantt_layout_header\";\n } else {\n header.className = \"gantt_layout_header vertical\";\n }\n\n header.style.width = 'auto';\n header.style.transform = '';\n content.style.display = \"\";\n content.style.height = size.contentY + \"px\";\n }\n\n header.style.height = this.$config.headerHeight + \"px\";\n };\n\n return Cell;\n}();\n\nmodule.exports = Cell;","var utils = require(\"./env\");\n\nmodule.exports = function (gantt) {\n return utils.isNode || !gantt.$root;\n};","/**\r\n * Check the over task or draggble task is placeholder task\r\n */\nmodule.exports = function isPlaceholderTask(id, gantt, store, config) {\n // return false;\n var config = gantt ? gantt.config : config;\n\n if (config && config.placeholder_task) {\n if (store.exists(id)) {\n var item = store.getItem(id);\n return item.type === config.types.placeholder;\n }\n }\n\n return false;\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(arg) {\n if (Array.isArray) {\n return Array.isArray(arg);\n }\n\n return objectToString(arg) === '[object Array]';\n}\n\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\n\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\n\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\n\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\n\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return _typeof(arg) === 'symbol';\n}\n\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\n\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return objectToString(re) === '[object RegExp]';\n}\n\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return _typeof(arg) === 'object' && arg !== null;\n}\n\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return objectToString(d) === '[object Date]';\n}\n\nexports.isDate = isDate;\n\nfunction isError(e) {\n return objectToString(e) === '[object Error]' || e instanceof Error;\n}\n\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || _typeof(arg) === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\n\nexports.isPrimitive = isPrimitive;\nexports.isBuffer = Buffer.isBuffer;\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}","var __extends = require(\"../../../../utils/extends\");\n\nvar htmlHelpers = require(\"../../utils/html_helpers\");\n\nmodule.exports = function (gantt) {\n var _super = require(\"./base_control\")(gantt);\n\n function SelectControl() {\n var self = _super.apply(this, arguments) || this;\n return self;\n }\n\n __extends(SelectControl, _super);\n\n SelectControl.prototype.render = function (sns) {\n var height = (sns.height || \"23\") + \"px\";\n var html = \"
\";\n html += htmlHelpers.getHtmlSelect(sns.options, [{\n key: \"style\",\n value: \"width:100%;\"\n }, {\n key: \"title\",\n value: sns.name\n }]);\n html += \"
\";\n return html;\n };\n\n SelectControl.prototype.set_value = function (node, value, ev, sns) {\n var select = node.firstChild;\n\n if (!select._dhx_onchange && sns.onchange) {\n select.onchange = sns.onchange;\n select._dhx_onchange = true;\n }\n\n if (typeof value === \"undefined\") value = (select.options[0] || {}).value;\n select.value = value || \"\";\n };\n\n SelectControl.prototype.get_value = function (node) {\n return node.firstChild.value;\n };\n\n SelectControl.prototype.focus = function (node) {\n var a = node.firstChild;\n\n gantt._focus(a, true);\n };\n\n return SelectControl;\n};","// optimized checker for task bars smart rendering\n// first check the vertical position since it's easier to calculate\nmodule.exports = function isBarInViewport(item, viewport, view, config, gantt) {\n if (!item.start_date || !item.end_date) {\n return null;\n }\n\n var top = view.getItemTop(item.id);\n var height = view.getItemHeight(item.id);\n\n if (top > viewport.y_end || top + height < viewport.y) {\n return false;\n }\n\n var padding = 200;\n var startCoord = view.posFromDate(item.start_date);\n var endCoord = view.posFromDate(item.end_date);\n var left = Math.min(startCoord, endCoord) - padding;\n var right = Math.max(startCoord, endCoord) + padding;\n\n if (left > viewport.x_end || right < viewport.x) {\n return false;\n }\n\n return true;\n};","module.exports = function (gantt) {\n return gantt.config.smart_rendering && gantt._smart_render;\n};","/* eslint-disable no-restricted-globals */\nvar globalScope;\n\nif (typeof window !== \"undefined\") {\n globalScope = window;\n} else {\n globalScope = global;\n}\n/* eslint-enable no-restricted-globals */\n\n\nmodule.exports = globalScope;","/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer');\n\nvar Buffer = buffer.Buffer; // alternative to using Object.keys for old browsers\n\nfunction copyProps(src, dst) {\n for (var key in src) {\n dst[key] = src[key];\n }\n}\n\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer;\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports);\n exports.Buffer = SafeBuffer;\n}\n\nfunction SafeBuffer(arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length);\n} // Copy static methods from Buffer\n\n\ncopyProps(Buffer, SafeBuffer);\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number');\n }\n\n return Buffer(arg, encodingOrOffset, length);\n};\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number');\n }\n\n var buf = Buffer(size);\n\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding);\n } else {\n buf.fill(fill);\n }\n } else {\n buf.fill(0);\n }\n\n return buf;\n};\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number');\n }\n\n return Buffer(size);\n};\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number');\n }\n\n return buffer.SlowBuffer(size);\n};","'use strict';\n\nif (!process.version || process.version.indexOf('v0.') === 0 || process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {\n module.exports = {\n nextTick: nextTick\n };\n} else {\n module.exports = process;\n}\n\nfunction nextTick(fn, arg1, arg2, arg3) {\n if (typeof fn !== 'function') {\n throw new TypeError('\"callback\" argument must be a function');\n }\n\n var len = arguments.length;\n var args, i;\n\n switch (len) {\n case 0:\n case 1:\n return process.nextTick(fn);\n\n case 2:\n return process.nextTick(function afterTickOne() {\n fn.call(null, arg1);\n });\n\n case 3:\n return process.nextTick(function afterTickTwo() {\n fn.call(null, arg1, arg2);\n });\n\n case 4:\n return process.nextTick(function afterTickThree() {\n fn.call(null, arg1, arg2, arg3);\n });\n\n default:\n args = new Array(len - 1);\n i = 0;\n\n while (i < args.length) {\n args[i++] = arguments[i];\n }\n\n return process.nextTick(function afterTick() {\n fn.apply(null, args);\n });\n }\n}","/**\r\n * The state object for order branch drag and drop\r\n */\nvar utils = require(\"../../../../utils/utils\");\n\nmodule.exports = {\n createDropTargetObject: function createDropTargetObject(parent) {\n var res = {\n targetParent: null,\n targetIndex: 0,\n targetId: null,\n child: false,\n nextSibling: false,\n prevSibling: false\n };\n\n if (parent) {\n utils.mixin(res, parent, true);\n }\n\n return res;\n },\n nextSiblingTarget: function nextSiblingTarget(dndTaskId, targetTaskId, store) {\n var result = this.createDropTargetObject();\n result.targetId = targetTaskId;\n result.nextSibling = true;\n result.targetParent = store.getParent(result.targetId);\n result.targetIndex = store.getBranchIndex(result.targetId);\n\n if (store.getParent(dndTaskId) != result.targetParent || result.targetIndex < store.getBranchIndex(dndTaskId)) {\n result.targetIndex += 1;\n }\n\n return result;\n },\n prevSiblingTarget: function prevSiblingTarget(dndTaskId, targetTaskId, store) {\n var result = this.createDropTargetObject();\n result.targetId = targetTaskId;\n result.prevSibling = true;\n result.targetParent = store.getParent(result.targetId);\n result.targetIndex = store.getBranchIndex(result.targetId);\n\n if (store.getParent(dndTaskId) == result.targetParent && result.targetIndex > store.getBranchIndex(dndTaskId)) {\n result.targetIndex -= 1;\n }\n\n return result;\n },\n firstChildTarget: function firstChildTarget(dndTaskId, targetTaskId, store) {\n var result = this.createDropTargetObject();\n result.targetId = targetTaskId;\n result.targetParent = result.targetId;\n result.targetIndex = 0;\n result.child = true;\n return result;\n },\n lastChildTarget: function lastChildTarget(dndTaskId, targetTaskId, store) {\n var children = store.getChildren(targetTaskId);\n var result = this.createDropTargetObject();\n result.targetId = children[children.length - 1];\n result.targetParent = targetTaskId;\n result.targetIndex = children.length;\n result.nextSibling = true;\n return result;\n }\n};","var isLegacyRender = require(\"../is_legacy_smart_render\");\n\nmodule.exports = function isColumnVisible(columnIndex, scale, viewPort, gantt) {\n var width = scale.width[columnIndex];\n\n if (width <= 0) {\n return false;\n }\n\n if (!gantt.config.smart_rendering || isLegacyRender(gantt)) {\n return true;\n }\n\n var cellLeftCoord = scale.left[columnIndex] - width;\n var cellRightCoord = scale.left[columnIndex] + width;\n return cellLeftCoord <= viewPort.x_end && cellRightCoord >= viewPort.x; //do not render skipped columns\n};","module.exports = function getVisibleCellsRange(scale, viewport) {\n var firstCellIndex = 0;\n var lastCellIndex = scale.left.length - 1;\n\n if (viewport) {\n for (var i = 0; i < scale.left.length; i++) {\n var left = scale.left[i];\n\n if (left < viewport.x) {\n firstCellIndex = i;\n }\n\n if (left > viewport.x_end) {\n lastCellIndex = i;\n break;\n }\n }\n }\n\n return {\n start: firstCellIndex,\n end: lastCellIndex\n };\n};","module.exports = function (item, view, config) {\n return {\n top: view.getItemTop(item.id),\n height: view.getItemHeight(item.id),\n left: 0,\n right: Infinity\n };\n};","function createTaskRenderer(gantt) {\n function _render_task_element(task, view, config) {\n var config = view.$getConfig();\n var painters = config.type_renderers;\n var renderer = painters[gantt.getTaskType(task.type)],\n defaultRenderer = _task_default_render;\n\n if (!renderer) {\n return defaultRenderer.call(gantt, task, view, config);\n } else {\n return renderer.call(gantt, task, function (task) {\n return defaultRenderer.call(gantt, task, view, config);\n }, view);\n }\n }\n\n function _task_default_render(task, view, config) {\n if (gantt._isAllowedUnscheduledTask(task)) return;\n\n if (!gantt._isTaskInTimelineLimits(task)) {\n return;\n }\n\n var pos = view.getItemPosition(task);\n var cfg = config,\n templates = view.$getTemplates();\n var taskType = gantt.getTaskType(task.type);\n var height = view.getBarHeight(task.id, taskType == cfg.types.milestone);\n var controlsMargin = 0;\n\n if (taskType == cfg.types.milestone) {\n controlsMargin = (height - pos.height) / 2;\n }\n\n var padd = Math.floor((view.getItemHeight(task.id) - height) / 2); //\tif(task.type == cfg.types.milestone){\n //\t\tpadd -= 1;\n //\t}\n //\tif (taskType == cfg.types.milestone && cfg.link_line_width > 1) {\n //\t\t//little adjust milestone position, so horisontal corners would match link arrow when thickness of link line is more than 1px\n //\t\tpadd += 1;\n //\t}\n\n if (taskType == cfg.types.milestone) {\n pos.left -= Math.round(height / 2);\n pos.width = height;\n }\n\n var div = document.createElement(\"div\");\n var width = Math.round(pos.width);\n\n if (view.$config.item_attribute) {\n div.setAttribute(view.$config.item_attribute, task.id);\n div.setAttribute(view.$config.bind + \"_id\", task.id); // 'task_id'/'resource_id' for backward compatibility\n }\n\n if (cfg.show_progress && taskType != cfg.types.milestone) {\n _render_task_progress(task, div, width, cfg, templates);\n } //use separate div to display content above progress bar\n\n\n var content = _render_task_content(task, width, templates);\n\n if (task.textColor) {\n content.style.color = task.textColor;\n }\n\n div.appendChild(content);\n\n var css = _combine_item_class(\"gantt_task_line\", templates.task_class(task.start_date, task.end_date, task), task.id, view);\n\n if (task.color || task.progressColor || task.textColor) {\n css += \" gantt_task_inline_color\";\n }\n\n if (pos.width < 20) {\n css += \" gantt_thin_task\";\n }\n\n div.className = css;\n var styles = [\"left:\" + pos.left + \"px\", \"top:\" + (padd + pos.top) + 'px', \"height:\" + (taskType == cfg.types.milestone ? pos.height : height) + 'px', \"line-height:\" + Math.max(height < 30 ? height - 2 : height, 0) + 'px', \"width:\" + width + 'px'];\n\n if (task.color) {\n styles.push(\"background-color:\" + task.color);\n }\n\n if (task.textColor) {\n styles.push(\"color:\" + task.textColor);\n }\n\n div.style.cssText = styles.join(\";\");\n\n var side = _render_leftside_content(task, cfg, templates, controlsMargin);\n\n if (side) div.appendChild(side);\n side = _render_rightside_content(task, cfg, templates, controlsMargin);\n if (side) div.appendChild(side);\n\n gantt._waiAria.setTaskBarAttr(task, div);\n\n var state = gantt.getState();\n\n if (!gantt.isReadonly(task)) {\n if (cfg.drag_resize && !gantt.isSummaryTask(task) && taskType != cfg.types.milestone) {\n _render_pair(div, \"gantt_task_drag\", task, function (css) {\n var el = document.createElement(\"div\");\n el.className = css;\n return el;\n }, cfg);\n }\n\n if (cfg.drag_links && cfg.show_links) {\n _render_pair(div, \"gantt_link_control\", task, function (css) {\n var outer = document.createElement(\"div\");\n outer.className = css;\n outer.style.cssText = [\"height:\" + height + 'px', \"line-height:\" + height + 'px'].join(\";\");\n var inner = document.createElement(\"div\");\n inner.className = \"gantt_link_point\";\n var showLinkPoints = false;\n\n if (state.link_source_id && cfg.touch) {\n showLinkPoints = true;\n }\n\n inner.style.display = showLinkPoints ? \"block\" : \"\";\n outer.appendChild(inner);\n return outer;\n }, cfg, controlsMargin);\n }\n }\n\n return div;\n }\n\n function _render_side_content(task, template, cssClass, marginStyle) {\n if (!template) return null;\n var text = template(task.start_date, task.end_date, task);\n if (!text) return null;\n var content = document.createElement(\"div\");\n content.className = \"gantt_side_content \" + cssClass;\n content.innerHTML = text;\n\n if (marginStyle) {\n content.style[marginStyle.type] = Math.abs(marginStyle.value) + \"px\";\n }\n\n return content;\n }\n\n function _render_leftside_content(task, cfg, templates, margin) {\n var css = \"gantt_left \" + _get_link_crossing_css(!cfg.rtl ? true : false, task, cfg);\n\n var marginStyle = null;\n\n if (margin) {\n marginStyle = {\n type: \"marginRight\",\n value: margin\n };\n }\n\n return _render_side_content(task, templates.leftside_text, css, marginStyle);\n }\n\n function _render_rightside_content(task, cfg, templates, margin) {\n var css = \"gantt_right \" + _get_link_crossing_css(!cfg.rtl ? false : true, task, cfg);\n\n var marginStyle = null;\n\n if (margin) {\n marginStyle = {\n type: \"marginLeft\",\n value: margin\n };\n }\n\n return _render_side_content(task, templates.rightside_text, css, marginStyle);\n }\n\n function _get_link_crossing_css(left, task) {\n var cond = _get_conditions(left);\n\n for (var i in cond) {\n var links = task[i];\n\n for (var ln = 0; ln < links.length; ln++) {\n var link = gantt.getLink(links[ln]);\n\n for (var tp = 0; tp < cond[i].length; tp++) {\n if (link.type == cond[i][tp]) {\n return \"gantt_link_crossing\";\n }\n }\n }\n }\n\n return \"\";\n }\n\n function _render_task_content(task, width, templates) {\n var content = document.createElement(\"div\");\n\n if (gantt.getTaskType(task.type) != gantt.config.types.milestone) {\n content.innerHTML = templates.task_text(task.start_date, task.end_date, task);\n } else if (gantt.getTaskType(task.type) == gantt.config.types.milestone && width) {\n content.style.height = content.style.width = width + \"px\";\n }\n\n content.className = \"gantt_task_content\"; //content.style.width = width + 'px';\n\n return content;\n }\n\n function _render_task_progress(task, element, maxWidth, cfg, templates) {\n var done = task.progress * 1 || 0;\n maxWidth = Math.max(maxWidth - 2, 0); //2px for borders\n\n var pr = document.createElement(\"div\");\n var width = Math.round(maxWidth * done);\n width = Math.min(maxWidth, width);\n\n if (task.progressColor) {\n pr.style.backgroundColor = task.progressColor;\n pr.style.opacity = 1;\n }\n\n pr.style.width = width + 'px';\n pr.className = \"gantt_task_progress\";\n pr.innerHTML = templates.progress_text(task.start_date, task.end_date, task);\n\n if (cfg.rtl) {\n pr.style.position = \"absolute\";\n pr.style.right = \"0px\";\n }\n\n var wrapper = document.createElement(\"div\");\n wrapper.className = \"gantt_task_progress_wrapper\";\n wrapper.appendChild(pr);\n element.appendChild(wrapper);\n\n if (gantt.config.drag_progress && !gantt.isReadonly(task)) {\n var drag = document.createElement(\"div\");\n var markerPos = width;\n\n if (cfg.rtl) {\n markerPos = maxWidth - width;\n }\n\n drag.style.left = markerPos + 'px';\n drag.className = \"gantt_task_progress_drag\";\n pr.appendChild(drag);\n element.appendChild(drag);\n }\n }\n\n function _get_conditions(leftside) {\n if (leftside) {\n return {\n $source: [gantt.config.links.start_to_start],\n $target: [gantt.config.links.start_to_start, gantt.config.links.finish_to_start]\n };\n } else {\n return {\n $source: [gantt.config.links.finish_to_start, gantt.config.links.finish_to_finish],\n $target: [gantt.config.links.finish_to_finish]\n };\n }\n }\n\n function _combine_item_class(basic, template, itemId, view) {\n var cfg = view.$getConfig();\n var css = [basic];\n if (template) css.push(template);\n var state = gantt.getState();\n var task = gantt.getTask(itemId);\n\n if (gantt.getTaskType(task.type) == cfg.types.milestone) {\n css.push(\"gantt_milestone\");\n } else if (gantt.getTaskType(task.type) == cfg.types.project) {\n css.push(\"gantt_project\");\n }\n\n css.push(\"gantt_bar_\" + gantt.getTaskType(task.type));\n if (gantt.isSummaryTask(task)) css.push(\"gantt_dependent_task\");\n\n if (gantt.isSplitTask(task) && (cfg.open_split_tasks && !task.$open || !cfg.open_split_tasks)) {\n css.push(\"gantt_split_parent\");\n }\n\n if (cfg.select_task && gantt.isSelectedTask(itemId)) {\n css.push(\"gantt_selected\");\n }\n\n if (itemId == state.drag_id) {\n css.push(\"gantt_drag_\" + state.drag_mode);\n\n if (state.touch_drag) {\n css.push(\"gantt_touch_\" + state.drag_mode);\n }\n }\n\n if (state.link_source_id == itemId) css.push(\"gantt_link_source\");\n if (state.link_target_id == itemId) css.push(\"gantt_link_target\");\n\n if (cfg.highlight_critical_path && gantt.isCriticalTask) {\n if (gantt.isCriticalTask(task)) css.push(\"gantt_critical_task\");\n }\n\n if (state.link_landing_area && state.link_target_id && state.link_source_id && state.link_target_id != state.link_source_id && (state.link_target_id == itemId || state.link_source_id == itemId)) {\n var from_id = state.link_source_id;\n var from_start = state.link_from_start;\n var to_start = state.link_to_start;\n var allowDrag = gantt.isLinkAllowed(from_id, itemId, from_start, to_start);\n var dragClass = \"\";\n\n if (allowDrag) {\n if (to_start) dragClass = \"link_start_allow\";else dragClass = \"link_finish_allow\";\n } else {\n if (to_start) dragClass = \"link_start_deny\";else dragClass = \"link_finish_deny\";\n }\n\n css.push(dragClass);\n }\n\n return css.join(\" \");\n }\n\n function _render_pair(parent, css, task, content, config, margin) {\n var state = gantt.getState();\n var className, element;\n\n if (+task.start_date >= +state.min_date) {\n className = [css, config.rtl ? \"task_right\" : \"task_left\", \"task_start_date\"];\n element = content(className.join(\" \"));\n element.setAttribute(\"data-bind-property\", \"start_date\");\n\n if (margin) {\n element.style.marginLeft = margin + \"px\";\n }\n\n parent.appendChild(element);\n }\n\n if (+task.end_date <= +state.max_date) {\n className = [css, config.rtl ? \"task_left\" : \"task_right\", \"task_end_date\"];\n element = content(className.join(\" \"));\n element.setAttribute(\"data-bind-property\", \"end_date\");\n\n if (margin) {\n element.style.marginRight = margin + \"px\";\n }\n\n parent.appendChild(element);\n }\n }\n\n return _render_task_element;\n}\n\nmodule.exports = createTaskRenderer;","var ScaleHelper = require(\"./scales_ignore\");\n\nvar eventable = require(\"../../../utils/eventable\");\n\nvar utils = require(\"../../../utils/utils\");\n\nvar helpers = require(\"../../../utils/helpers\");\n\nvar topPositionMixin = require(\"../row_position_mixin\");\n\nvar canvasRender = require(\"./tasks_canvas_render\");\n\nvar Timeline = function Timeline(parent, config, factory, gantt) {\n this.$config = utils.mixin({}, config || {});\n this.$scaleHelper = new ScaleHelper(gantt);\n this.$gantt = gantt;\n this._posFromDateCache = {};\n this._timelineDragScroll = null;\n utils.mixin(this, topPositionMixin(this));\n eventable(this);\n};\n\nTimeline.prototype = {\n init: function init(container) {\n container.innerHTML += \"
\";\n this.$task = container.childNodes[0];\n this.$task.innerHTML = \"
\";\n this.$task_scale = this.$task.childNodes[0];\n this.$task_data = this.$task.childNodes[1];\n this.$task_data.innerHTML = \"
\";\n this.$task_bg = this.$task_data.childNodes[0];\n this.$task_links = this.$task_data.childNodes[1];\n this.$task_bars = this.$task_data.childNodes[2];\n this._tasks = {\n col_width: 0,\n width: [],\n // width of each column\n full_width: 0,\n // width of all columns\n trace_x: [],\n rendered: {}\n };\n var config = this.$getConfig();\n var attr = config[this.$config.bind + \"_attribute\"];\n var linksAttr = config[this.$config.bindLinks + \"_attribute\"];\n\n if (!attr && this.$config.bind) {\n attr = \"data-\" + this.$config.bind + \"-id\";\n }\n\n if (!linksAttr && this.$config.bindLinks) {\n linksAttr = \"data-\" + this.$config.bindLinks + \"-id\";\n }\n\n this.$config.item_attribute = attr || null;\n this.$config.link_attribute = linksAttr || null;\n\n var layers = this._createLayerConfig();\n\n if (!this.$config.layers) {\n this.$config.layers = layers.tasks;\n }\n\n if (!this.$config.linkLayers) {\n this.$config.linkLayers = layers.links;\n }\n\n this._attachLayers(this.$gantt);\n\n this.callEvent(\"onReady\", []); //this.refresh();\n\n if (this.$gantt.ext.dragTimeline) {\n this._timelineDragScroll = this.$gantt.ext.dragTimeline.create();\n\n this._timelineDragScroll.attach(this);\n }\n },\n setSize: function setSize(width, height) {\n var config = this.$getConfig();\n\n if (width * 1 === width) {\n this.$config.width = width;\n }\n\n if (height * 1 === height) {\n this.$config.height = height;\n var dataHeight = Math.max(this.$config.height - config.scale_height);\n this.$task_data.style.height = dataHeight + 'px';\n }\n\n this.refresh();\n this.$task_bg.style.backgroundImage = \"\";\n\n if (config.smart_rendering && this.$config.rowStore) {\n this.$task_bg.style.height = this.getTotalHeight() + \"px\";\n } else {\n this.$task_bg.style.height = \"\";\n }\n\n var scale = this._tasks; //timeline area layers\n\n var data_els = this.$task_data.childNodes;\n\n for (var i = 0, len = data_els.length; i < len; i++) {\n var el = data_els[i];\n if (el.hasAttribute(\"data-layer\") && el.style) el.style.width = scale.full_width + \"px\";\n }\n },\n isVisible: function isVisible() {\n if (this.$parent && this.$parent.$config) {\n return !this.$parent.$config.hidden;\n } else {\n return this.$task.offsetWidth;\n }\n },\n getSize: function getSize() {\n var config = this.$getConfig();\n var store = this.$config.rowStore;\n var contentHeight = store ? this.getTotalHeight() : 0,\n contentWidth = this.isVisible() ? this._tasks.full_width : 0;\n return {\n x: this.isVisible() ? this.$config.width : 0,\n y: this.isVisible() ? this.$config.height : 0,\n contentX: this.isVisible() ? contentWidth : 0,\n contentY: this.isVisible() ? config.scale_height + contentHeight : 0,\n scrollHeight: this.isVisible() ? contentHeight : 0,\n scrollWidth: this.isVisible() ? contentWidth : 0\n };\n },\n scrollTo: function scrollTo(left, top) {\n if (!this.isVisible()) return;\n var scrolled = false;\n this.$config.scrollTop = this.$config.scrollTop || 0;\n this.$config.scrollLeft = this.$config.scrollLeft || 0;\n\n if (top * 1 === top) {\n this.$config.scrollTop = top;\n this.$task_data.scrollTop = this.$config.scrollTop;\n scrolled = true;\n }\n\n if (left * 1 === left) {\n this.$task.scrollLeft = left;\n this.$config.scrollLeft = this.$task.scrollLeft;\n\n this._refreshScales();\n\n scrolled = true;\n }\n\n if (scrolled) {\n this.callEvent(\"onScroll\", [this.$config.scrollLeft, this.$config.scrollTop]);\n }\n },\n _refreshScales: function _refreshScales() {\n if (!this.isVisible()) return;\n var config = this.$getConfig();\n if (!config.smart_scales) return;\n var viewPort = this.getViewPort();\n var scales = this._scales;\n this.$task_scale.innerHTML = this._getScaleChunkHtml(scales, viewPort.x, viewPort.x_end);\n },\n getViewPort: function getViewPort() {\n var scrollLeft = this.$config.scrollLeft || 0;\n var scrollTop = this.$config.scrollTop || 0;\n var height = this.$config.height || 0;\n var width = this.$config.width || 0;\n return {\n y: scrollTop,\n y_end: scrollTop + height,\n x: scrollLeft,\n x_end: scrollLeft + width,\n height: height,\n width: width\n };\n },\n _createLayerConfig: function _createLayerConfig() {\n var self = this;\n\n var taskFilter = function taskFilter() {\n return self.isVisible();\n };\n\n var barVisible = function barVisible(id, task) {\n return !task.hide_bar;\n };\n\n var taskLayers = [{\n expose: true,\n renderer: this.$gantt.$ui.layers.taskBar(),\n container: this.$task_bars,\n filter: [taskFilter, barVisible]\n }, {\n renderer: this.$gantt.$ui.layers.taskSplitBar(),\n filter: [taskFilter],\n container: this.$task_bars,\n append: true\n }, {\n renderer: this.$gantt.$ui.layers.taskRollupBar(),\n filter: [taskFilter],\n container: this.$task_bars,\n append: true\n }, {\n renderer: this.$gantt.$ui.layers.taskBg(),\n container: this.$task_bg,\n filter: [//function(){\n //\treturn !self.$getConfig().static_background;\n //},\n taskFilter]\n }];\n var linkLayers = [{\n expose: true,\n renderer: this.$gantt.$ui.layers.link(),\n container: this.$task_links,\n filter: [taskFilter]\n }];\n return {\n tasks: taskLayers,\n links: linkLayers\n };\n },\n _attachLayers: function _attachLayers(gantt) {\n this._taskLayers = [];\n this._linkLayers = [];\n var self = this;\n var layers = this.$gantt.$services.getService(\"layers\");\n\n if (this.$config.bind) {\n this._bindStore();\n\n var taskRenderer = layers.getDataRender(this.$config.bind);\n\n if (!taskRenderer) {\n taskRenderer = layers.createDataRender({\n name: this.$config.bind,\n defaultContainer: function defaultContainer() {\n return self.$task_data;\n }\n });\n }\n\n taskRenderer.container = function () {\n return self.$task_data;\n };\n\n var taskLayers = this.$config.layers;\n\n for (var i = 0; taskLayers && i < taskLayers.length; i++) {\n var layer = taskLayers[i];\n\n if (typeof layer == \"string\") {\n layer = this.$gantt.$ui.layers[layer]();\n }\n\n if (typeof layer == \"function\" || layer && layer.render && layer.update) {\n layer = {\n renderer: layer\n };\n }\n\n layer.view = this;\n var bar_layer = taskRenderer.addLayer(layer);\n\n this._taskLayers.push(bar_layer);\n\n if (layer.expose) {\n this._taskRenderer = taskRenderer.getLayer(bar_layer);\n }\n }\n\n this._initStaticBackgroundRender();\n }\n\n if (this.$config.bindLinks) {\n self.$config.linkStore = self.$gantt.getDatastore(self.$config.bindLinks);\n var linkRenderer = layers.getDataRender(this.$config.bindLinks);\n\n if (!linkRenderer) {\n linkRenderer = layers.createDataRender({\n name: this.$config.bindLinks,\n defaultContainer: function defaultContainer() {\n return self.$task_data;\n }\n });\n }\n\n var linkLayers = this.$config.linkLayers;\n\n for (var i = 0; linkLayers && i < linkLayers.length; i++) {\n if (typeof layer == \"string\") {\n layer = this.$gantt.$ui.layers[layer]();\n }\n\n var layer = linkLayers[i];\n layer.view = this; //\tlayer.getViewPort = getViewPort;\n //\tsubscribeSmartRender(layer);\n\n var linkLayer = linkRenderer.addLayer(layer);\n\n this._taskLayers.push(linkLayer);\n\n if (linkLayers[i].expose) {\n this._linkRenderer = linkRenderer.getLayer(linkLayer);\n }\n }\n }\n },\n _initStaticBackgroundRender: function _initStaticBackgroundRender() {\n var self = this;\n var staticRender = canvasRender.create();\n var store = self.$config.rowStore;\n if (!store) return;\n this._staticBgHandler = store.attachEvent(\"onStoreUpdated\", function (id, item, mode) {\n if (id !== null) {\n return;\n }\n\n if (!self.isVisible()) return;\n var config = self.$getConfig();\n\n if (config.static_background || config.timeline_placeholder) {\n var store = self.$gantt.getDatastore(self.$config.bind);\n var staticBgContainer = self.$task_bg_static;\n\n if (!staticBgContainer) {\n staticBgContainer = document.createElement(\"div\");\n staticBgContainer.className = \"gantt_task_bg\";\n self.$task_bg_static = staticBgContainer;\n\n if (self.$task_bg.nextSibling) {\n self.$task_data.insertBefore(staticBgContainer, self.$task_bg.nextSibling);\n } else {\n self.$task_data.appendChild(staticBgContainer);\n }\n }\n\n if (store) {\n var staticBackgroundHeight = self.getTotalHeight();\n\n if (config.timeline_placeholder) {\n staticBackgroundHeight = config.timeline_placeholder.height || self.$task_data.offsetHeight || 99999;\n }\n\n staticRender.render(staticBgContainer, config, self.getScale(), staticBackgroundHeight, self.getItemHeight(item ? item.id : null));\n }\n } else if (config.static_background) {\n if (self.$task_bg_static && self.$task_bg_static.parentNode) {\n self.$task_bg_static.parentNode.removeChild(self.$task_bg_static);\n }\n }\n });\n this.attachEvent(\"onDestroy\", function () {\n staticRender.destroy();\n });\n\n this._initStaticBackgroundRender = function () {}; //init once\n\n },\n _clearLayers: function _clearLayers(gantt) {\n var layers = this.$gantt.$services.getService(\"layers\");\n var taskRenderer = layers.getDataRender(this.$config.bind);\n var linkRenderer = layers.getDataRender(this.$config.bindLinks);\n\n if (this._taskLayers) {\n for (var i = 0; i < this._taskLayers.length; i++) {\n taskRenderer.removeLayer(this._taskLayers[i]);\n }\n }\n\n if (this._linkLayers) {\n for (var i = 0; i < this._linkLayers.length; i++) {\n linkRenderer.removeLayer(this._linkLayers[i]);\n }\n }\n\n this._linkLayers = [];\n this._taskLayers = [];\n },\n _render_tasks_scales: function _render_tasks_scales() {\n var config = this.$getConfig();\n var scales_html = \"\",\n outer_width = 0,\n scale_height = 0;\n var state = this.$gantt.getState();\n\n if (this.isVisible()) {\n var helpers = this.$scaleHelper;\n\n var scales = this._getScales();\n\n scale_height = config.scale_height;\n var availWidth = this.$config.width;\n\n if (config.autosize == \"x\" || config.autosize == \"xy\") {\n availWidth = Math.max(config.autosize_min_width, 0);\n }\n\n var cfgs = helpers.prepareConfigs(scales, config.min_column_width, availWidth, scale_height - 1, state.min_date, state.max_date, config.rtl);\n var cfg = this._tasks = cfgs[cfgs.length - 1];\n this._scales = cfgs;\n this._posFromDateCache = {};\n scales_html = this._getScaleChunkHtml(cfgs, 0, this.$config.width);\n outer_width = cfg.full_width + \"px\"; //cfg.full_width + (this._scroll_sizes().y ? scrollSizes.scroll_size : 0) + \"px\";\n\n scale_height += \"px\";\n }\n\n this.$task_scale.style.height = scale_height;\n this.$task_data.style.width = this.$task_scale.style.width = outer_width;\n this.$task_scale.innerHTML = scales_html;\n },\n _getScaleChunkHtml: function _get_scale_chunk_html(scales, fromPos, toPos) {\n var templates = this.$gantt.templates;\n var html = [];\n var css = templates.scale_row_class;\n\n for (var i = 0; i < scales.length; i++) {\n var cssClass = \"gantt_scale_line\";\n var tplClass = css(scales[i]);\n\n if (tplClass) {\n cssClass += \" \" + tplClass;\n }\n\n html.push(\"
\" + this._prepareScaleHtml(scales[i], fromPos, toPos) + \"
\");\n }\n\n return html.join(\"\");\n },\n _prepareScaleHtml: function _prepare_scale_html(config, fromPos, toPos) {\n var globalConfig = this.$getConfig();\n var globalTemplates = this.$gantt.templates;\n var cells = [];\n var date = null,\n css = null;\n var content = config.format || config.template || config.date;\n\n if (typeof content === \"string\") {\n content = this.$gantt.date.date_to_str(content);\n }\n\n var startIndex = 0,\n endIndex = config.count;\n\n if (globalConfig.smart_scales && !isNaN(fromPos) && !isNaN(toPos)) {\n startIndex = helpers.findBinary(config.left, fromPos);\n endIndex = helpers.findBinary(config.left, toPos) + 1;\n }\n\n css = config.css || function () {};\n\n if (!config.css && globalConfig.inherit_scale_class) {\n css = globalTemplates.scale_cell_class;\n }\n\n for (var i = startIndex; i < endIndex; i++) {\n if (!config.trace_x[i]) break;\n date = new Date(config.trace_x[i]);\n var value = content.call(this, date),\n width = config.width[i],\n height = config.height,\n left = config.left[i],\n style = \"\",\n template = \"\",\n cssclass = \"\";\n\n if (width) {\n var position = globalConfig.smart_scales ? \"position:absolute;left:\" + left + \"px\" : \"\";\n style = \"width:\" + width + \"px;height:\" + height + \"px;\" + position;\n cssclass = \"gantt_scale_cell\" + (i == config.count - 1 ? \" gantt_last_cell\" : \"\");\n template = css.call(this, date);\n if (template) cssclass += \" \" + template;\n\n var ariaAttr = this.$gantt._waiAria.getTimelineCellAttr(value);\n\n var cell = \"
\" + value + \"
\";\n cells.push(cell);\n } else {//do not render ignored cells\n }\n }\n\n return cells.join(\"\");\n },\n dateFromPos: function dateFromPos(x) {\n var scale = this._tasks;\n\n if (x < 0 || x > scale.full_width || !scale.full_width) {\n return null;\n }\n\n var ind = helpers.findBinary(this._tasks.left, x);\n var summ = this._tasks.left[ind];\n var col_width = scale.width[ind] || scale.col_width;\n var part = 0;\n\n if (col_width) {\n part = (x - summ) / col_width;\n\n if (scale.rtl) {\n part = 1 - part;\n }\n }\n\n var unit = 0;\n\n if (part) {\n unit = this._getColumnDuration(scale, scale.trace_x[ind]);\n }\n\n var date = new Date(scale.trace_x[ind].valueOf() + Math.round(part * unit));\n return date;\n },\n posFromDate: function posFromDate(date) {\n if (!this.isVisible()) return 0;\n\n if (!date) {\n return 0;\n }\n\n var dateValue = String(date.valueOf());\n\n if (this._posFromDateCache[dateValue] !== undefined) {\n return this._posFromDateCache[dateValue];\n }\n\n var ind = this.columnIndexByDate(date);\n this.$gantt.assert(ind >= 0, \"Invalid day index\");\n var wholeCells = Math.floor(ind);\n var partCell = ind % 1;\n\n var pos = this._tasks.left[Math.min(wholeCells, this._tasks.width.length - 1)];\n\n if (wholeCells == this._tasks.width.length) pos += this._tasks.width[this._tasks.width.length - 1]; //for(var i=1; i <= wholeCells; i++)\n //\tpos += gantt._tasks.width[i-1];\n\n if (partCell) {\n if (wholeCells < this._tasks.width.length) {\n pos += this._tasks.width[wholeCells] * (partCell % 1);\n } else {\n pos += 1;\n }\n }\n\n var roundPos = Math.round(pos);\n this._posFromDateCache[dateValue] = roundPos;\n return Math.round(roundPos);\n },\n _getNextVisibleColumn: function _getNextVisibleColumn(startIndex, columns, ignores) {\n // iterate columns to the right\n var date = +columns[startIndex];\n var visibleDateIndex = startIndex;\n\n while (ignores[date]) {\n visibleDateIndex++;\n date = +columns[visibleDateIndex];\n }\n\n return visibleDateIndex;\n },\n _getPrevVisibleColumn: function _getPrevVisibleColumn(startIndex, columns, ignores) {\n // iterate columns to the left\n var date = +columns[startIndex];\n var visibleDateIndex = startIndex;\n\n while (ignores[date]) {\n visibleDateIndex--;\n date = +columns[visibleDateIndex];\n }\n\n return visibleDateIndex;\n },\n _getClosestVisibleColumn: function _getClosestVisibleColumn(startIndex, columns, ignores) {\n var visibleDateIndex = this._getNextVisibleColumn(startIndex, columns, ignores);\n\n if (!columns[visibleDateIndex]) {\n visibleDateIndex = this._getPrevVisibleColumn(startIndex, columns, ignores);\n }\n\n return visibleDateIndex;\n },\n columnIndexByDate: function columnIndexByDate(date) {\n var pos = new Date(date).valueOf();\n var days = this._tasks.trace_x_ascending,\n ignores = this._tasks.ignore_x;\n var state = this.$gantt.getState();\n\n if (pos <= state.min_date) {\n if (this._tasks.rtl) {\n return days.length;\n } else {\n return 0;\n }\n }\n\n if (pos >= state.max_date) {\n if (this._tasks.rtl) {\n return 0;\n } else {\n return days.length;\n }\n }\n\n var dateIndex = helpers.findBinary(days, pos);\n\n var visibleIndex = this._getClosestVisibleColumn(dateIndex, days, ignores);\n\n var visibleDate = days[visibleIndex];\n var transition = this._tasks.trace_index_transition;\n\n if (!visibleDate) {\n if (transition) {\n return transition[0];\n } else {\n return 0;\n }\n }\n\n var part = (date - days[visibleIndex]) / this._getColumnDuration(this._tasks, days[visibleIndex]);\n\n if (transition) {\n return transition[visibleIndex] + (1 - part);\n } else {\n return visibleIndex + part;\n }\n },\n getItemPosition: function getItemPosition(task, start_date, end_date) {\n var xLeft, xRight, width;\n\n if (this._tasks.rtl) {\n xRight = this.posFromDate(start_date || task.start_date);\n xLeft = this.posFromDate(end_date || task.end_date);\n } else {\n xLeft = this.posFromDate(start_date || task.start_date);\n xRight = this.posFromDate(end_date || task.end_date);\n }\n\n width = Math.max(xRight - xLeft, 0);\n var y = this.getItemTop(task.id);\n var height = this.getBarHeight(task.id);\n var rowHeight = this.getItemHeight(task.id);\n return {\n left: xLeft,\n top: y,\n height: height,\n width: width,\n rowHeight: rowHeight\n };\n },\n getBarHeight: function getBarHeight(taskId, isMilestoneRender) {\n var config = this.$getConfig();\n var task = this.$config.rowStore.getItem(taskId); // height of the bar item\n\n var height = task.task_height || task.bar_height || config.bar_height || config.task_height;\n var rowHeight = this.getItemHeight(taskId);\n\n if (height == \"full\") {\n var offset = config.task_height_offset || 5;\n height = rowHeight - offset;\n } //item height cannot be bigger than row height\n\n\n height = Math.min(height, rowHeight);\n\n if (isMilestoneRender) {\n // to get correct height for addapting Milestone to the row\n height = Math.round(height / Math.sqrt(2));\n }\n\n return Math.max(height, 0);\n },\n getScale: function getScale() {\n return this._tasks;\n },\n _getScales: function _get_scales() {\n var config = this.$getConfig();\n var helpers = this.$scaleHelper;\n var scales = [helpers.primaryScale(config)].concat(helpers.getSubScales(config));\n helpers.sortScales(scales);\n return scales;\n },\n _getColumnDuration: function _get_coll_duration(scale, date) {\n return this.$gantt.date.add(date, scale.step, scale.unit) - date;\n },\n _bindStore: function _bindStore() {\n if (this.$config.bind) {\n var rowStore = this.$gantt.getDatastore(this.$config.bind);\n this.$config.rowStore = rowStore;\n\n if (rowStore && !rowStore._timelineCacheAttached) {\n var self = this;\n rowStore._timelineCacheAttached = rowStore.attachEvent(\"onBeforeFilter\", function () {\n self._resetTopPositionHeight();\n });\n }\n }\n },\n _unbindStore: function _unbindStore() {\n if (this.$config.bind) {\n var rowStore = this.$gantt.getDatastore(this.$config.bind);\n\n if (rowStore && rowStore._timelineCacheAttached) {\n rowStore.detachEvent(rowStore._timelineCacheAttached);\n rowStore._timelineCacheAttached = false;\n }\n }\n },\n refresh: function refresh() {\n this._bindStore();\n\n if (this.$config.bindLinks) {\n this.$config.linkStore = this.$gantt.getDatastore(this.$config.bindLinks);\n }\n\n this._resetTopPositionHeight();\n\n this._resetHeight();\n\n this._initStaticBackgroundRender();\n\n this._render_tasks_scales();\n },\n destructor: function destructor() {\n var gantt = this.$gantt;\n\n this._clearLayers(gantt);\n\n this._unbindStore();\n\n this.$task = null;\n this.$task_scale = null;\n this.$task_data = null;\n this.$task_bg = null;\n this.$task_links = null;\n this.$task_bars = null;\n this.$gantt = null;\n\n if (this.$config.rowStore) {\n this.$config.rowStore.detachEvent(this._staticBgHandler);\n this.$config.rowStore = null;\n }\n\n if (this.$config.linkStore) {\n this.$config.linkStore = null;\n }\n\n if (this._timelineDragScroll) {\n this._timelineDragScroll.destructor();\n\n this._timelineDragScroll = null;\n }\n\n this.callEvent(\"onDestroy\", []);\n this.detachAllEvents();\n }\n};\nmodule.exports = Timeline;","module.exports = function (item, view, config) {\n return {\n top: view.getItemTop(item.id),\n height: view.getItemHeight(item.id),\n left: 0,\n right: Infinity\n };\n};","function create(gantt) {\n var events = [];\n return {\n delegate: function delegate(event, className, handler, root) {\n events.push([event, className, handler, root]);\n var helper = gantt.$services.getService(\"mouseEvents\");\n helper.delegate(event, className, handler, root);\n },\n destructor: function destructor() {\n var mouseEvents = gantt.$services.getService(\"mouseEvents\");\n\n for (var i = 0; i < events.length; i++) {\n var h = events[i];\n mouseEvents.detach(h[0], h[1], h[2], h[3]);\n }\n\n events = [];\n }\n };\n}\n\nmodule.exports = create;","var domHelpers = require(\"../utils/dom_helpers\"),\n utils = require(\"../../../utils/utils\"),\n eventable = require(\"../../../utils/eventable\"),\n gridResize = require(\"./grid_resize\"),\n topPositionMixin = require(\"../row_position_mixin\"),\n rowResize = require(\"./task_grid_row_resize\");\n\nvar ColumnDnd = require(\"../plugins/column_grid_dnd\")[\"default\"];\n\nvar Grid = function Grid(parent, config, factory, gantt) {\n this.$config = utils.mixin({}, config || {});\n this.$gantt = gantt;\n this.$parent = parent;\n eventable(this);\n this.$state = {};\n utils.mixin(this, topPositionMixin(this));\n};\n\nGrid.prototype = {\n init: function init(container) {\n var gantt = this.$gantt;\n\n var gridAriaAttr = gantt._waiAria.gridAttrString();\n\n var gridDataAriaAttr = gantt._waiAria.gridDataAttrString();\n\n var _ganttConfig = this.$getConfig();\n\n var reorderColumns = _ganttConfig.reorder_grid_columns || false;\n\n if (this.$config.reorder_grid_columns !== undefined) {\n reorderColumns = this.$config.reorder_grid_columns;\n }\n\n container.innerHTML = \"
\";\n this.$grid = container.childNodes[0];\n this.$grid.innerHTML = \"
\";\n this.$grid_scale = this.$grid.childNodes[0];\n this.$grid_data = this.$grid.childNodes[1];\n var attr = _ganttConfig[this.$config.bind + \"_attribute\"];\n\n if (!attr && this.$config.bind) {\n attr = \"data-\" + this.$config.bind + \"-id\";\n }\n\n this.$config.item_attribute = attr || null;\n\n if (!this.$config.layers) {\n var layers = this._createLayerConfig();\n\n this.$config.layers = layers;\n }\n\n var resizer = gridResize(gantt, this);\n resizer.init();\n this._renderHeaderResizers = resizer.doOnRender;\n this._mouseDelegates = require(\"../mouse_event_container\")(gantt);\n var resizerrow = rowResize(gantt, this);\n resizerrow.init();\n\n this._addLayers(this.$gantt);\n\n this._initEvents();\n\n if (reorderColumns) {\n this._columnDND = new ColumnDnd(gantt, this);\n\n this._columnDND.init();\n }\n\n this.callEvent(\"onReady\", []); //this.refresh();\n },\n _validateColumnWidth: function _validateColumnWidth(column, property) {\n // user can set {name:\"text\", width:\"200\",...} for some reason,\n // check and convert it to number when possible\n var value = column[property];\n\n if (value && value != \"*\") {\n var gantt = this.$gantt;\n var numericWidth = value * 1;\n\n if (isNaN(numericWidth)) {\n gantt.assert(false, \"Wrong \" + property + \" value of column \" + column.name);\n } else {\n column[property] = numericWidth;\n }\n }\n },\n setSize: function setSize(width, height) {\n this.$config.width = this.$state.width = width;\n this.$config.height = this.$state.height = height; // TODO: maybe inherit and override in a subclass instead of extending here\n\n var columns = this.getGridColumns(),\n innerWidth = 0;\n var config = this.$getConfig();\n var elasticColumns = config.grid_elastic_columns;\n\n for (var i = 0, l = columns.length; i < l; i++) {\n this._validateColumnWidth(columns[i], \"min_width\");\n\n this._validateColumnWidth(columns[i], \"max_width\");\n\n this._validateColumnWidth(columns[i], \"width\");\n\n innerWidth += columns[i].width * 1;\n }\n\n var outerWidth;\n\n if (isNaN(innerWidth) || !this.$config.scrollable) {\n outerWidth = this._setColumnsWidth(width + 1);\n innerWidth = outerWidth;\n }\n\n if (this.$config.scrollable && elasticColumns && !isNaN(innerWidth)) {\n // GS-1352: Allow resizing the grid columns, then the grid width is increased\n // or keep the grid width, but don't allow column resize to affect the grid width\n var columnProperty = \"width\";\n\n if (elasticColumns == \"min_width\") {\n columnProperty = \"min_width\";\n }\n\n var newColumnWidth = 0;\n columns.forEach(function (col) {\n newColumnWidth += col[columnProperty] || config.min_grid_column_width;\n }); //newColumnWidth--; // the total column width shouldn't match the outerWidth // GS-2190 reducing width seems to be not needed\n\n var columnsWidth = Math.max(newColumnWidth, width);\n innerWidth = this._setColumnsWidth(columnsWidth);\n outerWidth = width;\n }\n\n if (this.$config.scrollable) {\n this.$grid_scale.style.width = innerWidth + \"px\";\n this.$grid_data.style.width = innerWidth + \"px\";\n } else {\n this.$grid_scale.style.width = \"inherit\";\n this.$grid_data.style.width = \"inherit\";\n }\n\n this.$config.width -= 1;\n var config = this.$getConfig();\n\n if (outerWidth !== width) {\n if (outerWidth !== undefined) {\n config.grid_width = outerWidth;\n this.$config.width = outerWidth - 1;\n } else {\n if (!isNaN(innerWidth)) {\n this._setColumnsWidth(innerWidth);\n\n config.grid_width = innerWidth;\n this.$config.width = innerWidth - 1;\n }\n }\n }\n\n var dataHeight = Math.max(this.$state.height - config.scale_height, 0);\n this.$grid_data.style.height = dataHeight + \"px\";\n this.refresh();\n },\n getSize: function getSize() {\n var config = this.$getConfig();\n var store = this.$config.rowStore;\n\n var contentHeight = store ? this.getTotalHeight() : 0,\n contentWidth = this._getGridWidth();\n\n var size = {\n x: this.$state.width,\n y: this.$state.height,\n contentX: this.isVisible() ? contentWidth : 0,\n contentY: this.isVisible() ? config.scale_height + contentHeight : 0,\n scrollHeight: this.isVisible() ? contentHeight : 0,\n scrollWidth: this.isVisible() ? contentWidth : 0\n };\n return size;\n },\n _bindStore: function _bindStore() {\n if (this.$config.bind) {\n var rowStore = this.$gantt.getDatastore(this.$config.bind);\n this.$config.rowStore = rowStore;\n\n if (rowStore && !rowStore._gridCacheAttached) {\n var self = this;\n rowStore._gridCacheAttached = rowStore.attachEvent(\"onBeforeFilter\", function () {\n self._resetTopPositionHeight();\n });\n }\n }\n },\n _unbindStore: function _unbindStore() {\n if (this.$config.bind) {\n var rowStore = this.$gantt.getDatastore(this.$config.bind);\n\n if (rowStore && rowStore._gridCacheAttached) {\n rowStore.detachEvent(rowStore._gridCacheAttached);\n rowStore._gridCacheAttached = false;\n }\n }\n },\n refresh: function refresh() {\n this._bindStore();\n\n this._resetTopPositionHeight();\n\n this._resetHeight();\n\n this._initSmartRenderingPlaceholder();\n\n this._calculateGridWidth();\n\n this._renderGridHeader();\n },\n getViewPort: function getViewPort() {\n var scrollLeft = this.$config.scrollLeft || 0;\n var scrollTop = this.$config.scrollTop || 0;\n var height = this.$config.height || 0;\n var width = this.$config.width || 0;\n return {\n y: scrollTop,\n y_end: scrollTop + height,\n x: scrollLeft,\n x_end: scrollLeft + width,\n height: height,\n width: width\n };\n },\n scrollTo: function scrollTo(left, top) {\n if (!this.isVisible()) return;\n var scrolled = false;\n this.$config.scrollTop = this.$config.scrollTop || 0;\n this.$config.scrollLeft = this.$config.scrollLeft || 0;\n\n if (left * 1 == left) {\n this.$config.scrollLeft = this.$state.scrollLeft = this.$grid.scrollLeft = left;\n scrolled = true;\n } // var config = this.$getConfig();\n\n\n if (top * 1 == top) {\n this.$config.scrollTop = this.$state.scrollTop = this.$grid_data.scrollTop = top;\n scrolled = true;\n }\n\n if (scrolled) {\n this.callEvent(\"onScroll\", [this.$config.scrollLeft, this.$config.scrollTop]);\n }\n },\n getColumnIndex: function getColumnIndex(name, excludeHidden) {\n var columns = this.$getConfig().columns;\n var hiddenIndexShift = 0;\n\n for (var i = 0; i < columns.length; i++) {\n // GS-1257. If the cell is hidden, the target column index should be correct\n if (excludeHidden && columns[i].hide) {\n hiddenIndexShift++;\n }\n\n if (columns[i].name == name) {\n return i - hiddenIndexShift;\n }\n }\n\n return null;\n },\n getColumn: function getColumn(name) {\n var index = this.getColumnIndex(name);\n\n if (index === null) {\n return null;\n }\n\n return this.$getConfig().columns[index];\n },\n getGridColumns: function getGridColumns() {\n var config = this.$getConfig();\n return config.columns.slice();\n },\n isVisible: function isVisible() {\n if (this.$parent && this.$parent.$config) {\n return !this.$parent.$config.hidden;\n } else {\n return this.$grid.offsetWidth;\n }\n },\n // getItemHeight: function () {\n // \tvar config = this.$getConfig();\n // \treturn config.row_height;\n // },\n _createLayerConfig: function _createLayerConfig() {\n var gantt = this.$gantt;\n var self = this;\n var layers = [{\n renderer: gantt.$ui.layers.gridLine(),\n container: this.$grid_data,\n filter: [function () {\n return self.isVisible();\n }]\n }, {\n renderer: gantt.$ui.layers.gridTaskRowResizer(),\n container: this.$grid_data,\n append: true,\n filter: [function () {\n return gantt.config.resize_rows;\n }]\n }];\n return layers;\n },\n _addLayers: function _addLayers(gantt) {\n if (!this.$config.bind) return;\n this._taskLayers = [];\n var self = this;\n var layers = this.$gantt.$services.getService(\"layers\");\n var taskRenderer = layers.getDataRender(this.$config.bind);\n\n if (!taskRenderer) {\n taskRenderer = layers.createDataRender({\n name: this.$config.bind,\n defaultContainer: function defaultContainer() {\n return self.$grid_data;\n }\n });\n }\n\n var taskLayers = this.$config.layers;\n\n for (var i = 0; taskLayers && i < taskLayers.length; i++) {\n var layer = taskLayers[i];\n layer.view = this;\n var bar_layer = taskRenderer.addLayer(layer);\n\n this._taskLayers.push(bar_layer);\n }\n\n this._bindStore();\n\n this._initSmartRenderingPlaceholder();\n },\n _refreshPlaceholderOnStoreUpdate: function _refreshPlaceholderOnStoreUpdate(id) {\n var config = this.$getConfig(),\n store = this.$config.rowStore;\n\n if (!store || id !== null || !this.isVisible() || !config.smart_rendering) {\n return;\n }\n\n var contentHeight;\n\n if (this.$config.scrollY) {\n var scroll = this.$gantt.$ui.getView(this.$config.scrollY);\n if (scroll) contentHeight = scroll.getScrollState().scrollSize;\n }\n\n if (!contentHeight) {\n contentHeight = store ? this.getTotalHeight() : 0;\n }\n\n if (contentHeight) {\n if (this.$rowsPlaceholder && this.$rowsPlaceholder.parentNode) {\n this.$rowsPlaceholder.parentNode.removeChild(this.$rowsPlaceholder);\n }\n\n var placeholder = this.$rowsPlaceholder = document.createElement(\"div\");\n placeholder.style.visibility = \"hidden\";\n placeholder.style.height = contentHeight + \"px\";\n placeholder.style.width = \"1px\";\n this.$grid_data.appendChild(placeholder);\n }\n },\n _initSmartRenderingPlaceholder: function _initSmartRenderingPlaceholder() {\n var store = this.$config.rowStore;\n\n if (!store) {\n return;\n } else {\n this._initSmartRenderingPlaceholder = function () {};\n }\n\n this._staticBgHandler = store.attachEvent(\"onStoreUpdated\", utils.bind(this._refreshPlaceholderOnStoreUpdate, this));\n },\n _initEvents: function _initEvents() {\n var gantt = this.$gantt;\n\n this._mouseDelegates.delegate(\"click\", \"gantt_close\", gantt.bind(function (e, id, trg) {\n var store = this.$config.rowStore;\n if (!store) return true;\n var target = domHelpers.locateAttribute(e, this.$config.item_attribute);\n\n if (target) {\n store.close(target.getAttribute(this.$config.item_attribute));\n }\n\n return false;\n }, this), this.$grid);\n\n this._mouseDelegates.delegate(\"click\", \"gantt_open\", gantt.bind(function (e, id, trg) {\n var store = this.$config.rowStore;\n if (!store) return true;\n var target = domHelpers.locateAttribute(e, this.$config.item_attribute);\n\n if (target) {\n store.open(target.getAttribute(this.$config.item_attribute));\n }\n\n return false;\n }, this), this.$grid);\n },\n _clearLayers: function _clearLayers(gantt) {\n var layers = this.$gantt.$services.getService(\"layers\");\n var taskRenderer = layers.getDataRender(this.$config.bind);\n\n if (this._taskLayers) {\n for (var i = 0; i < this._taskLayers.length; i++) {\n taskRenderer.removeLayer(this._taskLayers[i]);\n }\n }\n\n this._taskLayers = [];\n },\n _getColumnWidth: function _getColumnWidth(column, config, width) {\n var min_width = column.min_width || config.min_grid_column_width;\n var new_width = Math.max(width, min_width || 10);\n if (column.max_width) new_width = Math.min(new_width, column.max_width);\n return new_width;\n },\n // set min width only if width < than config.min_grid_column_width\n _checkGridColumnMinWidthLimits: function _checkGridColumnMinWidthLimits(columns, config) {\n for (var i = 0, l = columns.length; i < l; i++) {\n var width = columns[i].width * 1;\n\n if (!columns[i].min_width && width < config.min_grid_column_width) {\n columns[i].min_width = width;\n }\n }\n },\n // return min and max possible grid width according to restricts\n _getGridWidthLimits: function _getGridWidthLimits() {\n var config = this.$getConfig(),\n columns = this.getGridColumns(),\n min_limit = 0,\n max_limit = 0;\n\n for (var i = 0; i < columns.length; i++) {\n min_limit += columns[i].min_width ? columns[i].min_width : config.min_grid_column_width;\n\n if (max_limit !== undefined) {\n max_limit = columns[i].max_width ? max_limit + columns[i].max_width : undefined;\n }\n }\n\n this._checkGridColumnMinWidthLimits(columns, config); // FIX ME: should it be before calculating limits?\n\n\n return [min_limit, max_limit];\n },\n // resize columns to get total newWidth, starting from columns[start_index]\n _setColumnsWidth: function _setColumnsWidth(newWidth, start_index) {\n var config = this.$getConfig();\n var columns = this.getGridColumns(),\n columns_width = 0,\n final_width = newWidth;\n start_index = !window.isNaN(start_index) ? start_index : -1;\n\n for (var i = 0, l = columns.length; i < l; i++) {\n columns_width += columns[i].width * 1;\n }\n\n if (window.isNaN(columns_width)) {\n this._calculateGridWidth();\n\n columns_width = 0;\n\n for (var i = 0, l = columns.length; i < l; i++) {\n columns_width += columns[i].width * 1;\n }\n }\n\n var extra_width = final_width - columns_width;\n var start_width = 0;\n\n for (var i = 0; i < start_index + 1; i++) {\n start_width += columns[i].width;\n }\n\n columns_width -= start_width;\n\n for (var i = start_index + 1; i < columns.length; i++) {\n var col = columns[i];\n var share = Math.round(extra_width * (col.width / columns_width)); // columns have 2 additional restrict fields - min_width & max_width that are set by user\n\n if (extra_width < 0) {\n if (col.min_width && col.width + share < col.min_width) share = col.min_width - col.width;else if (!col.min_width && config.min_grid_column_width && col.width + share < config.min_grid_column_width) share = config.min_grid_column_width - col.width;\n } else if (col.max_width && col.width + share > col.max_width) share = col.max_width - col.width;\n\n columns_width -= col.width;\n col.width += share;\n extra_width -= share;\n }\n\n var iterator = extra_width > 0 ? 1 : -1;\n\n while (extra_width > 0 && iterator === 1 || extra_width < 0 && iterator === -1) {\n var curExtra = extra_width;\n\n for (i = start_index + 1; i < columns.length; i++) {\n var new_width = columns[i].width + iterator;\n\n if (new_width == this._getColumnWidth(columns[i], config, new_width)) {\n extra_width -= iterator;\n columns[i].width = new_width;\n }\n\n if (!extra_width) break;\n }\n\n if (curExtra == extra_width) break;\n } // if impossible to resize the right-side columns, resize the start column\n\n\n if (extra_width && start_index > -1) {\n var new_width = columns[start_index].width + extra_width;\n if (new_width == this._getColumnWidth(columns[start_index], config, new_width)) columns[start_index].width = new_width;\n } //if (this.callEvent(\"onGridResizeEnd\", [config.grid_width, final_width]) === false)\n //\treturn;\n\n\n return this._getColsTotalWidth();\n },\n _getColsTotalWidth: function _getColsTotalWidth() {\n var columns = this.getGridColumns();\n var cols_width = 0;\n\n for (var i = 0; i < columns.length; i++) {\n var v = parseFloat(columns[i].width);\n\n if (window.isNaN(v)) {\n return false;\n }\n\n cols_width += v;\n }\n\n return cols_width;\n },\n _calculateGridWidth: function _calculateGridWidth() {\n var config = this.$getConfig();\n var columns = this.getGridColumns();\n var cols_width = 0;\n var unknown = [];\n var width = [];\n\n for (var i = 0; i < columns.length; i++) {\n var v = parseFloat(columns[i].width);\n\n if (window.isNaN(v)) {\n v = config.min_grid_column_width || 10;\n unknown.push(i);\n }\n\n width[i] = v;\n cols_width += v;\n }\n\n var gridWidth = this._getGridWidth() + 1;\n\n if (config.autofit || unknown.length) {\n var diff = gridWidth - cols_width; // TODO: logic may be improved for proportional changing of width\n // autofit adjusts columns widths to the outer grid width\n // it doesn't makes sense if grid has inner scroll with elastic columns\n\n if (config.autofit && !config.grid_elastic_columns) {\n // delta must be added for all columns\n for (var i = 0; i < width.length; i++) {\n var delta = Math.round(diff / (width.length - i));\n width[i] += delta;\n\n var new_width = this._getColumnWidth(columns[i], config, width[i]);\n\n if (new_width != width[i]) {\n delta = new_width - width[i];\n width[i] = new_width;\n }\n\n diff -= delta;\n }\n } else if (unknown.length) {\n // there are several columns with undefined width\n for (var i = 0; i < unknown.length; i++) {\n var delta = Math.round(diff / (unknown.length - i)); // no float values, just integer\n\n var index = unknown[i];\n width[index] += delta;\n\n var new_width = this._getColumnWidth(columns[index], config, width[index]);\n\n if (new_width != width[index]) {\n delta = new_width - width[index];\n width[index] = new_width;\n }\n\n diff -= delta;\n }\n }\n\n for (var i = 0; i < width.length; i++) {\n columns[i].width = width[i];\n }\n } else {\n var changed = gridWidth != cols_width;\n this.$config.width = cols_width - 1;\n config.grid_width = cols_width;\n\n if (changed) {\n this.$parent._setContentSize(this.$config.width, null);\n }\n }\n },\n _renderGridHeader: function _renderGridHeader() {\n var gantt = this.$gantt;\n var config = this.$getConfig();\n var locale = this.$gantt.locale;\n var templates = this.$gantt.templates;\n var columns = this.getGridColumns();\n\n if (config.rtl) {\n columns = columns.reverse();\n }\n\n var cells = [];\n var width = 0,\n labels = locale.labels;\n var lineHeigth = config.scale_height - 1;\n\n for (var i = 0; i < columns.length; i++) {\n var last = i == columns.length - 1;\n var col = columns[i]; // ensure columns have non-empty names\n\n if (!col.name) {\n col.name = gantt.uid() + \"\";\n }\n\n var colWidth = col.width * 1;\n\n var gridWidth = this._getGridWidth();\n\n if (last && gridWidth > width + colWidth) col.width = colWidth = gridWidth - width;\n width += colWidth;\n var sort = gantt._sort && col.name == gantt._sort.name ? \"
\") : \"\";\n var cssClass = [\"gantt_grid_head_cell\", \"gantt_grid_head_\" + col.name, last ? \"gantt_last_cell\" : \"\", templates.grid_header_class(col.name, col)].join(\" \");\n var style = \"width:\" + (colWidth - (last ? 1 : 0)) + \"px;\";\n var label = col.label || labels[\"column_\" + col.name] || labels[col.name];\n label = label || \"\";\n\n var ariaAttrs = gantt._waiAria.gridScaleCellAttrString(col, label);\n\n var cell = \"
\" + label + sort + \"
\";\n cells.push(cell);\n }\n\n this.$grid_scale.style.height = config.scale_height + \"px\";\n this.$grid_scale.style.lineHeight = lineHeigth + \"px\"; //this.$grid_scale.style.width = \"inherit\";\n\n this.$grid_scale.innerHTML = cells.join(\"\");\n\n if (this._renderHeaderResizers) {\n this._renderHeaderResizers();\n }\n },\n _getGridWidth: function _getGridWidth() {\n // TODO: refactor/remove/comment some of _getGridWidth/this.$config.width/this.$state.width, it's not clear what they do\n return this.$config.width;\n },\n destructor: function destructor() {\n this._clearLayers(this.$gantt);\n\n if (this._mouseDelegates) {\n this._mouseDelegates.destructor();\n\n this._mouseDelegates = null;\n }\n\n this._unbindStore();\n\n this.$grid = null;\n this.$grid_scale = null;\n this.$grid_data = null;\n this.$gantt = null;\n\n if (this.$config.rowStore) {\n this.$config.rowStore.detachEvent(this._staticBgHandler);\n this.$config.rowStore = null;\n }\n\n this.callEvent(\"onDestroy\", []);\n this.detachAllEvents();\n }\n};\nmodule.exports = Grid;","var utils = require(\"../../../utils/utils\");\n\nfunction ScaleHelper(gantt) {\n var dateHelper = gantt.date;\n var services = gantt.$services;\n return {\n getSum: function getSum(sizes, from, to) {\n if (to === undefined) to = sizes.length - 1;\n if (from === undefined) from = 0;\n var summ = 0;\n\n for (var i = from; i <= to; i++) {\n summ += sizes[i];\n }\n\n return summ;\n },\n setSumWidth: function setSumWidth(sum_width, scale, from, to) {\n var parts = scale.width;\n if (to === undefined) to = parts.length - 1;\n if (from === undefined) from = 0;\n var length = to - from + 1;\n if (from > parts.length - 1 || length <= 0 || to > parts.length - 1) return;\n var oldWidth = this.getSum(parts, from, to);\n var diff = sum_width - oldWidth;\n this.adjustSize(diff, parts, from, to);\n this.adjustSize(-diff, parts, to + 1);\n scale.full_width = this.getSum(parts);\n },\n splitSize: function splitSize(width, count) {\n var arr = [];\n\n for (var i = 0; i < count; i++) {\n arr[i] = 0;\n }\n\n this.adjustSize(width, arr);\n return arr;\n },\n adjustSize: function adjustSize(width, parts, from, to) {\n if (!from) from = 0;\n if (to === undefined) to = parts.length - 1;\n var length = to - from + 1;\n var full = this.getSum(parts, from, to);\n\n for (var i = from; i <= to; i++) {\n var share = Math.floor(width * (full ? parts[i] / full : 1 / length));\n full -= parts[i];\n width -= share;\n length--;\n parts[i] += share;\n }\n\n parts[parts.length - 1] += width;\n },\n sortScales: function sortScales(scales) {\n function cellSize(unit, step) {\n var d = new Date(1970, 0, 1);\n return dateHelper.add(d, step, unit) - d;\n }\n\n scales.sort(function (a, b) {\n if (cellSize(a.unit, a.step) < cellSize(b.unit, b.step)) {\n return 1;\n } else if (cellSize(a.unit, a.step) > cellSize(b.unit, b.step)) {\n return -1;\n } else {\n return 0;\n }\n });\n\n for (var i = 0; i < scales.length; i++) {\n scales[i].index = i;\n }\n },\n _isLegacyMode: function _isLegacyMode(config) {\n var scaleConfig = config || gantt.config;\n return scaleConfig.scale_unit || scaleConfig.date_scale || scaleConfig.subscales;\n },\n _prepareScaleObject: function _prepareScaleObject(scale) {\n var format = scale.format;\n\n if (!format) {\n format = scale.template || scale.date || \"%d %M\";\n }\n\n if (typeof format === \"string\") {\n format = gantt.date.date_to_str(format);\n }\n\n return {\n unit: scale.unit || \"day\",\n step: scale.step || 1,\n format: format,\n css: scale.css\n };\n },\n primaryScale: function primaryScale(config) {\n var templates = services.getService(\"templateLoader\");\n\n var legacyMode = this._isLegacyMode(config);\n\n var scaleConfig = config || gantt.config;\n var result;\n\n if (legacyMode) {\n templates.initTemplate(\"date_scale\", undefined, undefined, scaleConfig, gantt.config.templates);\n result = {\n unit: gantt.config.scale_unit,\n step: gantt.config.step,\n template: gantt.templates.date_scale,\n date: gantt.config.date_scale,\n css: gantt.templates.scale_cell_class\n };\n } else {\n var primaryScale = scaleConfig.scales[0];\n result = {\n unit: primaryScale.unit,\n step: primaryScale.step,\n template: primaryScale.template,\n format: primaryScale.format,\n date: primaryScale.date,\n css: primaryScale.css || gantt.templates.scale_cell_class\n };\n }\n\n return this._prepareScaleObject(result);\n },\n getSubScales: function getSubScales(config) {\n var legacyMode = this._isLegacyMode(config);\n\n var scaleConfig = config || gantt.config;\n var scales;\n\n if (legacyMode) {\n scales = scaleConfig.subscales || [];\n } else {\n scales = scaleConfig.scales.slice(1);\n }\n\n return scales.map(function (scale) {\n return this._prepareScaleObject(scale);\n }.bind(this));\n },\n prepareConfigs: function prepareConfigs(scales, min_coll_width, container_width, scale_height, minDate, maxDate, rtl) {\n var heights = this.splitSize(scale_height, scales.length);\n var full_width = container_width;\n var configs = [];\n\n for (var i = scales.length - 1; i >= 0; i--) {\n var main_scale = i == scales.length - 1;\n var cfg = this.initScaleConfig(scales[i], minDate, maxDate);\n\n if (main_scale) {\n this.processIgnores(cfg);\n }\n\n this.initColSizes(cfg, min_coll_width, full_width, heights[i]);\n this.limitVisibleRange(cfg);\n\n if (main_scale) {\n full_width = cfg.full_width;\n }\n\n configs.unshift(cfg);\n }\n\n for (var i = 0; i < configs.length - 1; i++) {\n this.alineScaleColumns(configs[configs.length - 1], configs[i]);\n }\n\n for (var i = 0; i < configs.length; i++) {\n if (rtl) {\n this.reverseScale(configs[i]);\n }\n\n this.setPosSettings(configs[i]);\n }\n\n return configs;\n },\n reverseScale: function reverseScale(scale) {\n scale.width = scale.width.reverse();\n scale.trace_x = scale.trace_x.reverse();\n var indexes = scale.trace_indexes;\n scale.trace_indexes = {};\n scale.trace_index_transition = {};\n scale.rtl = true;\n\n for (var i = 0; i < scale.trace_x.length; i++) {\n scale.trace_indexes[scale.trace_x[i].valueOf()] = i;\n scale.trace_index_transition[indexes[scale.trace_x[i].valueOf()]] = i;\n }\n\n return scale;\n },\n setPosSettings: function setPosSettings(config) {\n for (var i = 0, len = config.trace_x.length; i < len; i++) {\n config.left.push((config.width[i - 1] || 0) + (config.left[i - 1] || 0));\n }\n },\n _ignore_time_config: function _ignore_time_config(date, scale) {\n if (gantt.config.skip_off_time) {\n var skip = true;\n var probe = date; // check dates in case custom scale unit, e.g. {unit: \"month\", step: 3}\n\n for (var i = 0; i < scale.step; i++) {\n if (i) {\n probe = dateHelper.add(date, i, scale.unit);\n }\n\n skip = skip && !this.isWorkTime(probe, scale.unit);\n }\n\n return skip;\n }\n\n return false;\n },\n //defined in an extension\n processIgnores: function processIgnores(config) {\n config.ignore_x = {};\n config.display_count = config.count;\n },\n initColSizes: function initColSizes(config, min_col_width, full_width, line_height) {\n var cont_width = full_width;\n config.height = line_height;\n var column_count = config.display_count === undefined ? config.count : config.display_count;\n if (!column_count) column_count = 1;\n config.col_width = Math.floor(cont_width / column_count);\n\n if (min_col_width) {\n if (config.col_width < min_col_width) {\n config.col_width = min_col_width;\n cont_width = config.col_width * column_count;\n }\n }\n\n config.width = [];\n var ignores = config.ignore_x || {};\n\n for (var i = 0; i < config.trace_x.length; i++) {\n if (ignores[config.trace_x[i].valueOf()] || config.display_count == config.count) {\n config.width[i] = 0;\n } else {\n // width of month columns should be proportional month duration\n var width = 1;\n\n if (config.unit == \"month\") {\n var days = Math.round((dateHelper.add(config.trace_x[i], config.step, config.unit) - config.trace_x[i]) / (1000 * 60 * 60 * 24));\n width = days;\n }\n\n config.width[i] = width;\n }\n }\n\n this.adjustSize(cont_width - this.getSum(config.width)\n /* 1 width per column from the code above */\n , config.width);\n config.full_width = this.getSum(config.width);\n },\n initScaleConfig: function initScaleConfig(config, min_date, max_date) {\n var cfg = utils.mixin({\n count: 0,\n col_width: 0,\n full_width: 0,\n height: 0,\n width: [],\n left: [],\n trace_x: [],\n trace_indexes: {},\n min_date: new Date(min_date),\n max_date: new Date(max_date)\n }, config);\n this.eachColumn(config.unit, config.step, min_date, max_date, function (date) {\n cfg.count++;\n cfg.trace_x.push(new Date(date));\n cfg.trace_indexes[date.valueOf()] = cfg.trace_x.length - 1;\n });\n cfg.trace_x_ascending = cfg.trace_x.slice();\n return cfg;\n },\n iterateScales: function iterateScales(lower_scale, upper_scale, from, to, callback) {\n var upper_dates = upper_scale.trace_x;\n var lower_dates = lower_scale.trace_x;\n var prev = from || 0;\n var end = to || lower_dates.length - 1;\n var prevUpper = 0;\n\n for (var up = 1; up < upper_dates.length; up++) {\n var target_index = lower_scale.trace_indexes[+upper_dates[up]];\n\n if (target_index !== undefined && target_index <= end) {\n if (callback) {\n callback.apply(this, [prevUpper, up, prev, target_index]);\n }\n\n prev = target_index;\n prevUpper = up;\n continue;\n }\n }\n },\n alineScaleColumns: function alineScaleColumns(lower_scale, upper_scale, from, to) {\n this.iterateScales(lower_scale, upper_scale, from, to, function (upper_start, upper_end, lower_start, lower_end) {\n var targetWidth = this.getSum(lower_scale.width, lower_start, lower_end - 1);\n var actualWidth = this.getSum(upper_scale.width, upper_start, upper_end - 1);\n\n if (actualWidth != targetWidth) {\n this.setSumWidth(targetWidth, upper_scale, upper_start, upper_end - 1);\n }\n });\n },\n eachColumn: function eachColumn(unit, step, min_date, max_date, callback) {\n var start = new Date(min_date),\n end = new Date(max_date);\n\n if (dateHelper[unit + \"_start\"]) {\n start = dateHelper[unit + \"_start\"](start);\n }\n\n var curr = new Date(start);\n\n if (+curr >= +end) {\n end = dateHelper.add(curr, step, unit);\n }\n\n while (+curr < +end) {\n callback.call(this, new Date(curr));\n var tzOffset = curr.getTimezoneOffset();\n curr = dateHelper.add(curr, step, unit);\n curr = gantt._correct_dst_change(curr, tzOffset, step, unit);\n if (dateHelper[unit + '_start']) curr = dateHelper[unit + \"_start\"](curr);\n }\n },\n limitVisibleRange: function limitVisibleRange(cfg) {\n var dates = cfg.trace_x;\n var left = 0,\n right = cfg.width.length - 1;\n var diff = 0;\n\n if (+dates[0] < +cfg.min_date && left != right) {\n var width = Math.floor(cfg.width[0] * ((dates[1] - cfg.min_date) / (dates[1] - dates[0])));\n diff += cfg.width[0] - width;\n cfg.width[0] = width;\n dates[0] = new Date(cfg.min_date);\n }\n\n var last = dates.length - 1;\n var lastDate = dates[last];\n var outDate = dateHelper.add(lastDate, cfg.step, cfg.unit);\n\n if (+outDate > +cfg.max_date && last > 0) {\n var width = cfg.width[last] - Math.floor(cfg.width[last] * ((outDate - cfg.max_date) / (outDate - lastDate)));\n diff += cfg.width[last] - width;\n cfg.width[last] = width;\n }\n\n if (diff) {\n var full = this.getSum(cfg.width);\n var shared = 0;\n\n for (var i = 0; i < cfg.width.length; i++) {\n var share = Math.floor(diff * (cfg.width[i] / full));\n cfg.width[i] += share;\n shared += share;\n }\n\n this.adjustSize(diff - shared, cfg.width);\n }\n }\n };\n}\n\nmodule.exports = ScaleHelper;","var helpers = require(\"../../../utils/helpers\");\n\nvar htmlHelpers = {\n getHtmlSelect: function getHtmlSelect(options, attributes, value) {\n var innerHTML = \"\";\n\n var _this = this;\n\n options = options || [];\n helpers.forEach(options, function (entry) {\n var _attributes = [{\n key: \"value\",\n value: entry.key\n }];\n\n if (value == entry.key) {\n _attributes[_attributes.length] = {\n key: \"selected\",\n value: \"selected\"\n };\n }\n\n if (entry.attributes) {\n _attributes = _attributes.concat(entry.attributes);\n }\n\n innerHTML += _this.getHtmlOption({\n innerHTML: entry.label\n }, _attributes);\n });\n return _getHtmlContainer(\"select\", {\n innerHTML: innerHTML\n }, attributes);\n },\n getHtmlOption: function getHtmlOption(options, attributes) {\n return _getHtmlContainer(\"option\", options, attributes);\n },\n getHtmlButton: function getHtmlButton(options, attributes) {\n return _getHtmlContainer(\"button\", options, attributes);\n },\n getHtmlDiv: function getHtmlDiv(options, attributes) {\n return _getHtmlContainer(\"div\", options, attributes);\n },\n getHtmlLabel: function getHtmlLabel(options, attributes) {\n return _getHtmlContainer(\"label\", options, attributes);\n },\n getHtmlInput: function getHtmlInput(attributes) {\n return \"\";\n }\n};\n\nfunction _getHtmlContainer(tag, options, attributes) {\n var html;\n options = options || [];\n html = \"<\" + tag + _getHtmlAttributes(attributes || []) + \">\" + (options.innerHTML || \"\") + \"\";\n return html;\n}\n\nfunction _getHtmlAttributes(attributes) {\n var html = \"\";\n helpers.forEach(attributes, function (entry) {\n html += \" \" + entry.key + \"='\" + entry.value + \"'\";\n });\n return html;\n}\n\nmodule.exports = htmlHelpers;","var helpers = require(\"../utils/helpers\");\n\nmodule.exports = function createResourceTimelineBuilder(gantt) {\n var resourceTaskCache = {};\n gantt.$data.tasksStore.attachEvent(\"onStoreUpdated\", function () {\n resourceTaskCache = {};\n });\n\n function getResourceLoad(resource, resourceProperty, scale, timeline) {\n var cacheKey = resource.id + \"_\" + resourceProperty + \"_\" + scale.unit + \"_\" + scale.step;\n var res;\n\n if (!resourceTaskCache[cacheKey]) {\n res = resourceTaskCache[cacheKey] = calculateResourceLoad(resource, resourceProperty, scale, timeline);\n } else {\n res = resourceTaskCache[cacheKey];\n }\n\n return res;\n }\n\n function calculateResourceLoadFromAssignments(items, scale, assignmentsPassed) {\n var scaleUnit = scale.unit;\n var scaleStep = scale.step;\n var timegrid = {};\n var precalculatedTimes = {};\n\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n var task = item;\n\n if (assignmentsPassed) {\n task = gantt.getTask(item.task_id);\n }\n\n if (task.unscheduled) {\n continue; // do not process assignments for unscheduled tasks\n }\n\n var minDate = item.start_date || task.start_date;\n var maxDate = item.end_date || task.end_date;\n\n if (assignmentsPassed) {\n if (item.start_date) {\n minDate = new Date(Math.max(item.start_date.valueOf(), task.start_date.valueOf()));\n }\n\n if (item.end_date) {\n maxDate = new Date(Math.min(item.end_date.valueOf(), task.end_date.valueOf()));\n } // GS-2063: handle case with fixedDates mode\n\n\n if (item.mode && item.mode == \"fixedDates\") {\n minDate = item.start_date;\n maxDate = item.end_date;\n }\n }\n\n var firstColumn = helpers.findBinary(scale.trace_x, minDate.valueOf());\n var minScaleDate = new Date(scale.trace_x[firstColumn] || gantt.date[scaleUnit + \"_start\"](new Date(minDate))); // GS-2307: need to take into account that task could start before the min scale date\n // so the task would be added to timegrid\n\n var currDate = new Date(Math.min(minDate.valueOf(), minScaleDate.valueOf()));\n var calendar = gantt.config.work_time ? gantt.getTaskCalendar(task) : gantt;\n precalculatedTimes[calendar.id] = {};\n\n while (currDate < maxDate) {\n var cachedTimes = precalculatedTimes[calendar.id];\n var date = currDate;\n var timestamp = date.valueOf();\n currDate = gantt.date.add(currDate, scaleStep, scaleUnit);\n\n if (cachedTimes[timestamp] === false) {\n continue;\n }\n\n var isWorkTime = calendar.isWorkTime({\n date: date,\n task: task,\n unit: scaleUnit\n });\n\n if (!isWorkTime) {\n cachedTimes[timestamp] = false;\n continue;\n }\n\n if (!timegrid[timestamp]) {\n timegrid[timestamp] = {\n tasks: [],\n assignments: []\n };\n }\n\n timegrid[timestamp].tasks.push(task);\n\n if (assignmentsPassed) {\n timegrid[timestamp].assignments.push(item);\n }\n }\n }\n\n return timegrid;\n }\n\n function calculateResourceLoad(resource, resourceProperty, scale, timeline) {\n var items;\n var assignmentsPassed = false;\n var timegrid = {};\n\n if (gantt.config.process_resource_assignments && resourceProperty === gantt.config.resource_property) {\n if (resource.$role == \"task\") {\n items = gantt.getResourceAssignments(resource.$resource_id, resource.$task_id);\n } else {\n items = gantt.getResourceAssignments(resource.id);\n }\n\n assignmentsPassed = true;\n } else if (resource.$role == \"task\") {\n items = [];\n } else {\n items = gantt.getTaskBy(resourceProperty, resource.id);\n }\n\n timegrid = calculateResourceLoadFromAssignments(items, scale, assignmentsPassed);\n var scaleUnit = scale.unit;\n var scaleStep = scale.step;\n var timetable = [];\n var start, end, tasks, assignments, cell;\n var config = timeline.$getConfig();\n\n for (var i = 0; i < scale.trace_x.length; i++) {\n start = new Date(scale.trace_x[i]);\n end = gantt.date.add(start, scaleStep, scaleUnit);\n cell = timegrid[start.valueOf()] || {};\n tasks = cell.tasks || [];\n assignments = cell.assignments || [];\n\n if (tasks.length || config.resource_render_empty_cells) {\n timetable.push({\n start_date: start,\n end_date: end,\n tasks: tasks,\n assignments: assignments\n });\n } else {\n timetable.push(null);\n }\n }\n\n return timetable;\n }\n\n return getResourceLoad;\n};","var __extends = require(\"../../../utils/extends\"),\n domHelpers = require(\"../utils/dom_helpers\"),\n Cell = require(\"./cell\");\n\nvar Layout = function (_super) {\n \"use strict\";\n\n __extends(Layout, _super);\n\n function Layout(parent, config, factory) {\n var _this = _super.apply(this, arguments) || this;\n\n if (parent) _this.$root = true;\n\n _this._parseConfig(config);\n\n _this.$name = \"layout\";\n return _this;\n }\n\n Layout.prototype.destructor = function () {\n if (this.$container && this.$view) {\n domHelpers.removeNode(this.$view);\n }\n\n for (var i = 0; i < this.$cells.length; i++) {\n var child = this.$cells[i];\n child.destructor();\n }\n\n this.$cells = [];\n\n _super.prototype.destructor.call(this);\n };\n\n Layout.prototype._resizeScrollbars = function (autosize, scrollbars) {\n var scrollChanged = false;\n var visibleScrollbars = [],\n hiddenScrollbars = [];\n var scrollbarsToHide = [];\n\n function showScrollbar(scrollbar) {\n scrollbar.$parent.show();\n scrollChanged = true;\n visibleScrollbars.push(scrollbar);\n }\n\n function hideScrollbar(scrollbar) {\n scrollbar.$parent.hide();\n scrollChanged = true;\n hiddenScrollbars.push(scrollbar);\n }\n\n var scrollbar;\n\n for (var i = 0; i < scrollbars.length; i++) {\n scrollbar = scrollbars[i];\n\n if (autosize[scrollbar.$config.scroll]) {\n hideScrollbar(scrollbar);\n } else if (scrollbar.shouldHide()) {\n //hideScrollbar(scrollbar);\n scrollbarsToHide.push(scrollbar);\n } else if (scrollbar.shouldShow()) {\n showScrollbar(scrollbar);\n } else {\n if (scrollbar.isVisible()) {\n visibleScrollbars.push(scrollbar);\n } else {\n hiddenScrollbars.push(scrollbar);\n }\n }\n }\n\n var visibleGroups = {};\n\n for (var i = 0; i < visibleScrollbars.length; i++) {\n if (visibleScrollbars[i].$config.group) {\n visibleGroups[visibleScrollbars[i].$config.group] = true;\n }\n } // GS-2220\n\n\n scrollbarsToHide.forEach(function (scrollbar) {\n if (!(scrollbar.$config.group && visibleGroups[scrollbar.$config.group])) {\n hideScrollbar(scrollbar);\n }\n });\n\n for (var i = 0; i < hiddenScrollbars.length; i++) {\n scrollbar = hiddenScrollbars[i];\n\n if (scrollbar.$config.group && visibleGroups[scrollbar.$config.group]) {\n showScrollbar(scrollbar); // GS-707 If the scrollbar was hidden then showed, the container resize shouldn't happen because of that\n\n for (var j = 0; j < visibleScrollbars.length; j++) {\n if (visibleScrollbars[j] == scrollbar) {\n this.$gantt.$scrollbarRepaint = true;\n break;\n }\n }\n }\n }\n\n return scrollChanged;\n };\n\n Layout.prototype._syncCellSizes = function (groupName, newSize) {\n if (!groupName) return;\n var groups = {};\n\n this._eachChild(function (cell) {\n if (cell.$config.group && cell.$name != \"scrollbar\" && cell.$name != \"resizer\") {\n if (!groups[cell.$config.group]) {\n groups[cell.$config.group] = [];\n }\n\n groups[cell.$config.group].push(cell);\n }\n });\n\n if (groups[groupName]) {\n this._syncGroupSize(groups[groupName], newSize);\n }\n\n return groups[groupName];\n };\n\n Layout.prototype._syncGroupSize = function (cells, newSize) {\n if (!cells.length) return;\n var property = cells[0].$parent._xLayout ? \"width\" : \"height\";\n var direction = cells[0].$parent.getNextSibling(cells[0].$id) ? 1 : -1;\n var newSizeValue = newSize.value;\n var isGravity = newSize.isGravity;\n\n for (var i = 0; i < cells.length; i++) {\n var ownSize = cells[i].getSize();\n var resizeSibling = direction > 0 ? cells[i].$parent.getNextSibling(cells[i].$id) : cells[i].$parent.getPrevSibling(cells[i].$id);\n\n if (resizeSibling.$name == \"resizer\") {\n resizeSibling = direction > 0 ? resizeSibling.$parent.getNextSibling(resizeSibling.$id) : resizeSibling.$parent.getPrevSibling(resizeSibling.$id);\n }\n\n var siblingSize = resizeSibling.getSize();\n\n if (!isGravity) {\n if (resizeSibling[property]) {\n var totalGravity = ownSize.gravity + siblingSize.gravity;\n var totalSize = ownSize[property] + siblingSize[property];\n var k = totalGravity / totalSize;\n cells[i].$config.gravity = k * newSizeValue;\n resizeSibling.$config[property] = totalSize - newSizeValue;\n resizeSibling.$config.gravity = totalGravity - k * newSizeValue;\n } else {\n cells[i].$config[property] = newSizeValue;\n }\n } else {\n cells[i].$config.gravity = newSizeValue;\n }\n\n var mainGrid = this.$gantt.$ui.getView(\"grid\");\n\n if (mainGrid && cells[i].$content === mainGrid && !mainGrid.$config.scrollable && !isGravity) {\n this.$gantt.config.grid_width = newSizeValue;\n }\n }\n };\n\n Layout.prototype.resize = function (startStage) {\n var mainCall = false;\n\n if (this.$root && !this._resizeInProgress) {\n this.callEvent(\"onBeforeResize\", []);\n mainCall = true;\n this._resizeInProgress = true;\n }\n\n _super.prototype.resize.call(this, true);\n\n _super.prototype.resize.call(this, false);\n\n if (mainCall) {\n var contentViews = [];\n contentViews = contentViews.concat(this.getCellsByType(\"viewCell\"));\n contentViews = contentViews.concat(this.getCellsByType(\"viewLayout\"));\n contentViews = contentViews.concat(this.getCellsByType(\"hostCell\"));\n var scrollbars = this.getCellsByType(\"scroller\");\n\n for (var i = 0; i < contentViews.length; i++) {\n if (!contentViews[i].$config.hidden) contentViews[i].setContentSize();\n }\n\n var autosize = this._getAutosizeMode(this.$config.autosize);\n /* // possible to rollback set content size when autisize is disabled, not sure if need to\r\n \t\tcontentViews.forEach(function(view){\r\n \t\t\tconst parent = view.$parent;\r\n \t\t\tif(!autosize.x){\r\n \t\t\t\tif(parent.$config.$originalWidthStored){\r\n \t\t\t\t\tparent.$config.$originalWidthStored = false;\r\n \t\t\t\t\tparent.$config.width = parent.$config.$originalWidth;\r\n \t\t\t\t\tparent.$config.$originalWidth = undefined;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \n \t\t\tif(!autosize.y){\r\n \t\t\t\tif(parent.$config.$originalHeightStored){\r\n \t\t\t\t\tparent.$config.$originalHeightStored = false;\r\n \t\t\t\t\tparent.$config.height = parent.$config.$originalHeight;\r\n \t\t\t\t\tparent.$config.$originalHeight = undefined;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t});*/\n\n\n var scrollChanged = this._resizeScrollbars(autosize, scrollbars);\n\n if (this.$config.autosize) {\n this.autosize(this.$config.autosize);\n contentViews.forEach(function (view) {\n var parent = view.$parent;\n var sizes = parent.getContentSize(autosize);\n\n if (autosize.x) {\n if (!parent.$config.$originalWidthStored) {\n parent.$config.$originalWidthStored = true;\n parent.$config.$originalWidth = parent.$config.width;\n }\n\n parent.$config.width = sizes.width;\n }\n\n if (autosize.y) {\n if (!parent.$config.$originalHeightStored) {\n parent.$config.$originalHeightStored = true;\n parent.$config.$originalHeight = parent.$config.height;\n }\n\n parent.$config.height = sizes.height;\n }\n });\n scrollChanged = true;\n }\n\n if (scrollChanged) {\n this.resize();\n\n for (var i = 0; i < contentViews.length; i++) {\n if (!contentViews[i].$config.hidden) contentViews[i].setContentSize();\n }\n }\n\n this.callEvent(\"onResize\", []);\n }\n\n if (mainCall) {\n this._resizeInProgress = false;\n }\n };\n\n Layout.prototype._eachChild = function (code, cell) {\n cell = cell || this;\n code(cell);\n\n if (cell.$cells) {\n for (var i = 0; i < cell.$cells.length; i++) {\n this._eachChild(code, cell.$cells[i]);\n }\n }\n };\n\n Layout.prototype.isChild = function (view) {\n var res = false;\n\n this._eachChild(function (child) {\n if (child === view || child.$content === view) {\n res = true;\n }\n });\n\n return res;\n };\n\n Layout.prototype.getCellsByType = function (type) {\n var res = [];\n\n if (type === this.$name) {\n res.push(this);\n }\n\n if (this.$content && this.$content.$name == type) {\n res.push(this.$content);\n }\n\n if (this.$cells) {\n for (var i = 0; i < this.$cells.length; i++) {\n var children = Layout.prototype.getCellsByType.call(this.$cells[i], type);\n\n if (children.length) {\n res.push.apply(res, children);\n }\n }\n }\n\n return res;\n };\n\n Layout.prototype.getNextSibling = function (cellId) {\n var index = this.cellIndex(cellId);\n\n if (index >= 0 && this.$cells[index + 1]) {\n return this.$cells[index + 1];\n } else {\n return null;\n }\n };\n\n Layout.prototype.getPrevSibling = function (cellId) {\n var index = this.cellIndex(cellId);\n\n if (index >= 0 && this.$cells[index - 1]) {\n return this.$cells[index - 1];\n } else {\n return null;\n }\n };\n\n Layout.prototype.cell = function (id) {\n for (var i = 0; i < this.$cells.length; i++) {\n var child = this.$cells[i];\n\n if (child.$id === id) {\n return child;\n }\n\n var sub = child.cell(id);\n\n if (sub) {\n return sub;\n }\n }\n };\n\n Layout.prototype.cellIndex = function (id) {\n for (var i = 0; i < this.$cells.length; i++) {\n if (this.$cells[i].$id === id) {\n return i;\n }\n }\n\n return -1;\n };\n\n Layout.prototype.moveView = function (view, ind) {\n if (this.$cells[ind] !== view) {\n return window.alert(\"Not implemented\");\n } else {\n ind += this.$config.header ? 1 : 0;\n var node = this.$view;\n\n if (ind >= node.childNodes.length) {\n node.appendChild(view.$view);\n } else {\n node.insertBefore(view.$view, node.childNodes[ind]);\n }\n }\n };\n\n Layout.prototype._parseConfig = function (config) {\n this.$cells = [];\n this._xLayout = !config.rows;\n var cells = config.rows || config.cols || config.views;\n\n for (var i = 0; i < cells.length; i++) {\n var cell = cells[i];\n cell.mode = this._xLayout ? \"x\" : \"y\";\n var $content = this.$factory.initUI(cell, this);\n\n if (!$content) {\n cells.splice(i, 1);\n i--;\n } else {\n $content.$parent = this;\n this.$cells.push($content);\n }\n }\n };\n\n Layout.prototype.getCells = function () {\n return this.$cells;\n };\n\n Layout.prototype.render = function () {\n var view = domHelpers.insertNode(this.$container, this.$toHTML());\n this.$fill(view, null);\n this.callEvent(\"onReady\", []);\n this.resize(); // do simple repaint after the first call\n\n this.render = this.resize;\n };\n\n Layout.prototype.$fill = function (node, parent) {\n this.$view = node;\n this.$parent = parent;\n var cells = domHelpers.getChildNodes(node, \"gantt_layout_cell\");\n\n for (var i = cells.length - 1; i >= 0; i--) {\n var sub = this.$cells[i];\n sub.$fill(cells[i], this); // initially hidden cell\n\n if (sub.$config.hidden) {\n sub.$view.parentNode.removeChild(sub.$view);\n }\n }\n };\n\n Layout.prototype.$toHTML = function () {\n var mode = this._xLayout ? \"x\" : \"y\";\n var html = [];\n\n for (var i = 0; i < this.$cells.length; i++) {\n html.push(this.$cells[i].$toHTML());\n }\n\n return _super.prototype.$toHTML.call(this, html.join(\"\"), (this.$root ? \"gantt_layout_root \" : \"\") + \"gantt_layout gantt_layout_\" + mode);\n };\n\n Layout.prototype.getContentSize = function (mode) {\n var contentWidth = 0,\n contentHeight = 0;\n var cellSize, cell, borders;\n\n for (var i = 0; i < this.$cells.length; i++) {\n cell = this.$cells[i];\n if (cell.$config.hidden) continue;\n cellSize = cell.getContentSize(mode);\n\n if (cell.$config.view === \"scrollbar\" && mode[cell.$config.scroll]) {\n cellSize.height = 0;\n cellSize.width = 0;\n }\n\n if (cell.$config.resizer) {\n if (this._xLayout) {\n cellSize.height = 0;\n } else {\n cellSize.width = 0;\n }\n }\n\n borders = cell._getBorderSizes();\n\n if (this._xLayout) {\n contentWidth += cellSize.width + borders.horizontal;\n contentHeight = Math.max(contentHeight, cellSize.height + borders.vertical);\n } else {\n contentWidth = Math.max(contentWidth, cellSize.width + borders.horizontal);\n contentHeight += cellSize.height + borders.vertical;\n }\n }\n\n borders = this._getBorderSizes();\n contentWidth += borders.horizontal;\n contentHeight += borders.vertical; // GS-149 & GS-150: By default this code only increases the container sizes, because of that, the cell sizes\n // are also increased. Keep this code here in the case if something goes wrong\n\n /*\r\n if(this.$root){\r\n \tcontentWidth += 1;\r\n \tcontentHeight += 1;\r\n }\r\n */\n\n return {\n width: contentWidth,\n height: contentHeight\n };\n };\n\n Layout.prototype._cleanElSize = function (value) {\n return (value || \"\").toString().replace(\"px\", \"\") * 1 || 0;\n };\n\n Layout.prototype._getBoxStyles = function (div) {\n var computed = null;\n\n if (window.getComputedStyle) {\n computed = window.getComputedStyle(div, null);\n } else {\n //IE with elem.currentStyle does not calculate sizes from %, so will use the default approach\n computed = {\n \"width\": div.clientWidth,\n \"height\": div.clientHeight\n };\n }\n\n var properties = [\"width\", \"height\", \"paddingTop\", \"paddingBottom\", \"paddingLeft\", \"paddingRight\", \"borderLeftWidth\", \"borderRightWidth\", \"borderTopWidth\", \"borderBottomWidth\"];\n var styles = {\n boxSizing: computed.boxSizing == \"border-box\"\n };\n\n if (computed.MozBoxSizing) {\n styles.boxSizing = computed.MozBoxSizing == \"border-box\";\n }\n\n for (var i = 0; i < properties.length; i++) {\n styles[properties[i]] = computed[properties[i]] ? this._cleanElSize(computed[properties[i]]) : 0;\n }\n\n var box = {\n horPaddings: styles.paddingLeft + styles.paddingRight + styles.borderLeftWidth + styles.borderRightWidth,\n vertPaddings: styles.paddingTop + styles.paddingBottom + styles.borderTopWidth + styles.borderBottomWidth,\n borderBox: styles.boxSizing,\n innerWidth: styles.width,\n innerHeight: styles.height,\n outerWidth: styles.width,\n outerHeight: styles.height\n };\n\n if (box.borderBox) {\n box.innerWidth -= box.horPaddings;\n box.innerHeight -= box.vertPaddings;\n } else {\n box.outerWidth += box.horPaddings;\n box.outerHeight += box.vertPaddings;\n }\n\n return box;\n };\n\n Layout.prototype._getAutosizeMode = function (config) {\n var res = {\n x: false,\n y: false\n };\n\n if (config === \"xy\") {\n res.x = res.y = true;\n } else if (config === \"y\" || config === true) {\n res.y = true;\n } else if (config === \"x\") {\n res.x = true;\n }\n\n return res;\n };\n\n Layout.prototype.autosize = function (mode) {\n var res = this._getAutosizeMode(mode);\n\n var boxSizes = this._getBoxStyles(this.$container);\n\n var contentSizes = this.getContentSize(mode);\n var node = this.$container;\n\n if (res.x) {\n if (boxSizes.borderBox) {\n contentSizes.width += boxSizes.horPaddings;\n }\n\n node.style.width = contentSizes.width + \"px\";\n }\n\n if (res.y) {\n if (boxSizes.borderBox) {\n contentSizes.height += boxSizes.vertPaddings;\n }\n\n node.style.height = contentSizes.height + \"px\";\n }\n };\n\n Layout.prototype.getSize = function () {\n this._sizes = [];\n var width = 0;\n var minWidth = 0;\n var maxWidth = 100000000000;\n var height = 0;\n var maxHeight = 100000000000;\n var minHeight = 0;\n\n for (var i = 0; i < this.$cells.length; i++) {\n var size = this._sizes[i] = this.$cells[i].getSize();\n\n if (this.$cells[i].$config.hidden) {\n continue;\n }\n\n if (this._xLayout) {\n if (!size.width && size.minWidth) {\n width += size.minWidth;\n } else {\n width += size.width;\n }\n\n maxWidth += size.maxWidth;\n minWidth += size.minWidth;\n height = Math.max(height, size.height);\n maxHeight = Math.min(maxHeight, size.maxHeight); // min of maxHeight\n\n minHeight = Math.max(minHeight, size.minHeight); // max of minHeight\n } else {\n if (!size.height && size.minHeight) {\n height += size.minHeight;\n } else {\n height += size.height;\n }\n\n maxHeight += size.maxHeight;\n minHeight += size.minHeight;\n width = Math.max(width, size.width);\n maxWidth = Math.min(maxWidth, size.maxWidth); // min of maxWidth\n\n minWidth = Math.max(minWidth, size.minWidth); // max of minWidth\n }\n }\n\n var self = _super.prototype.getSize.call(this); // maxWidth\n\n\n if (self.maxWidth >= 100000) {\n self.maxWidth = maxWidth;\n } // maxHeight\n\n\n if (self.maxHeight >= 100000) {\n self.maxHeight = maxHeight;\n } // minWidth\n\n\n self.minWidth = self.minWidth !== self.minWidth ? 0 : self.minWidth; // || self.width || Math.max(minWidth, width);\n // minHeight\n\n self.minHeight = self.minHeight !== self.minHeight ? 0 : self.minHeight; //self.minHeight || self.height || Math.max(minHeight, height);\n // sizes with paddings and margins\n\n if (this._xLayout) {\n self.minWidth += this.$config.margin * this.$cells.length || 0;\n self.minWidth += this.$config.padding * 2 || 0;\n self.minHeight += this.$config.padding * 2 || 0;\n } else {\n self.minHeight += this.$config.margin * this.$cells.length || 0;\n self.minHeight += this.$config.padding * 2 || 0;\n }\n\n return self;\n }; // calc total gravity and free space\n\n\n Layout.prototype._calcFreeSpace = function (s, cell, xLayout) {\n var min = xLayout ? cell.minWidth : cell.minHeight;\n var max = xLayout ? cell.maxWidth : cell.maxWidth;\n var side = s;\n\n if (!side) {\n side = Math.floor(this._free / this._gravity * cell.gravity);\n\n if (side > max) {\n side = max;\n this._free -= side;\n this._gravity -= cell.gravity;\n }\n\n if (side < min) {\n side = min;\n this._free -= side;\n this._gravity -= cell.gravity;\n }\n } else {\n if (side > max) {\n side = max;\n }\n\n if (side < min) {\n side = min;\n }\n\n this._free -= side;\n }\n\n return side;\n };\n\n Layout.prototype._calcSize = function (s, size, xLayout) {\n var side = s;\n var min = xLayout ? size.minWidth : size.minHeight;\n var max = xLayout ? size.maxWidth : size.maxHeight;\n\n if (!side) {\n side = Math.floor(this._free / this._gravity * size.gravity);\n }\n\n if (side > max) {\n side = max;\n }\n\n if (side < min) {\n side = min;\n }\n\n return side;\n };\n\n Layout.prototype._configureBorders = function () {\n if (this.$root) {\n this._setBorders([this._borders.left, this._borders.top, this._borders.right, this._borders.bottom], this);\n }\n\n var borderClass = this._xLayout ? this._borders.right : this._borders.bottom;\n var cells = this.$cells;\n var lastVisibleIndex = cells.length - 1;\n\n for (var i = lastVisibleIndex; i >= 0; i--) {\n if (!cells[i].$config.hidden) {\n lastVisibleIndex = i;\n break;\n }\n }\n\n for (var i = 0; i < cells.length; i++) {\n if (cells[i].$config.hidden) {\n continue;\n }\n\n var lastCell = i >= lastVisibleIndex;\n var borderColorClass = \"\";\n\n if (!lastCell && cells[i + 1]) {\n if (cells[i + 1].$config.view == \"scrollbar\") {\n if (this._xLayout) {\n lastCell = true;\n } else {\n borderColorClass = \"gantt_layout_cell_border_transparent\";\n }\n }\n }\n\n this._setBorders(lastCell ? [] : [borderClass, borderColorClass], cells[i]);\n }\n };\n\n Layout.prototype._updateCellVisibility = function () {\n var oldVisibleCells = this._visibleCells || {};\n var firstCall = !this._visibleCells;\n var visibleCells = {};\n var cell = null;\n var parentVisibility = [];\n\n for (var i = 0; i < this._sizes.length; i++) {\n cell = this.$cells[i];\n\n if (cell.$config.hide_empty) {\n parentVisibility.push(cell);\n }\n\n if (!firstCall && cell.$config.hidden && oldVisibleCells[cell.$id]) {\n cell._hide(true);\n } else if (!cell.$config.hidden && !oldVisibleCells[cell.$id]) {\n cell._hide(false);\n }\n\n if (!cell.$config.hidden) {\n visibleCells[cell.$id] = true;\n }\n }\n\n this._visibleCells = visibleCells; // GS-27. A way to hide the whole cell if all its children are hidden\n\n for (var i = 0; i < parentVisibility.length; i++) {\n var cell = parentVisibility[i];\n var children = cell.$cells;\n var hideCell = true;\n children.forEach(function (child) {\n if (!child.$config.hidden && !child.$config.resizer) {\n hideCell = false;\n }\n });\n cell.$config.hidden = hideCell;\n }\n };\n\n Layout.prototype.setSize = function (x, y) {\n this._configureBorders();\n\n _super.prototype.setSize.call(this, x, y);\n\n y = this.$lastSize.contentY;\n x = this.$lastSize.contentX;\n var padding = this.$config.padding || 0;\n this.$view.style.padding = padding + \"px\";\n this._gravity = 0;\n this._free = this._xLayout ? x : y;\n this._free -= padding * 2; // calc all gravity\n\n var cell, size;\n\n this._updateCellVisibility();\n\n for (var i = 0; i < this._sizes.length; i++) {\n cell = this.$cells[i];\n\n if (cell.$config.hidden) {\n continue;\n }\n\n var margin = this.$config.margin || 0;\n\n if (cell.$name == \"resizer\" && !margin) {\n margin = -1;\n } // set margins to child cell\n\n\n var cellView = cell.$view;\n var marginSide = this._xLayout ? \"marginRight\" : \"marginBottom\";\n\n if (i !== this.$cells.length - 1) {\n cellView.style[marginSide] = margin + \"px\";\n this._free -= margin; // calc free space without margin\n }\n\n size = this._sizes[i];\n\n if (this._xLayout) {\n if (!size.width) {\n this._gravity += size.gravity;\n }\n } else {\n if (!size.height) {\n this._gravity += size.gravity;\n }\n }\n }\n\n for (var i = 0; i < this._sizes.length; i++) {\n cell = this.$cells[i];\n\n if (cell.$config.hidden) {\n continue;\n }\n\n size = this._sizes[i];\n var width = size.width;\n var height = size.height;\n\n if (this._xLayout) {\n this._calcFreeSpace(width, size, true);\n } else {\n this._calcFreeSpace(height, size, false);\n }\n }\n\n for (var i = 0; i < this.$cells.length; i++) {\n cell = this.$cells[i];\n\n if (cell.$config.hidden) {\n continue;\n }\n\n size = this._sizes[i];\n var dx = void 0;\n var dy = void 0;\n\n if (this._xLayout) {\n dx = this._calcSize(size.width, size, true);\n dy = y - padding * 2; // layout height without paddings\n } else {\n dx = x - padding * 2; // layout width without paddings\n\n dy = this._calcSize(size.height, size, false);\n }\n\n cell.setSize(dx, dy);\n }\n };\n\n return Layout;\n}(Cell);\n\nmodule.exports = Layout;","// optimized checker for links smart rendering\n// first check the vertical position since it's easier to calculate\nmodule.exports = function isLinkInViewPort(item, viewport, view, config, gantt) {\n var source = view.$gantt.getTask(item.source);\n var target = view.$gantt.getTask(item.target); // check vertical visibility first since it's a lighter check\n\n var sourceTop = view.getItemTop(source.id);\n var sourceHeight = view.getItemHeight(source.id);\n var targetTop = view.getItemTop(target.id);\n var targetHeight = view.getItemHeight(target.id);\n\n if (viewport.y > sourceTop + sourceHeight && viewport.y > targetTop + targetHeight) {\n return false;\n }\n\n if (viewport.y_end < targetTop && viewport.y_end < sourceTop) {\n return false;\n }\n\n var padding = 100;\n var sourceLeft = view.posFromDate(source.start_date);\n var sourceRight = view.posFromDate(source.end_date);\n var targetLeft = view.posFromDate(target.start_date);\n var targetRight = view.posFromDate(target.end_date);\n\n if (sourceLeft > sourceRight) {\n // rtl\n var tmp = sourceRight;\n sourceRight = sourceLeft;\n sourceLeft = tmp;\n }\n\n if (targetLeft > targetRight) {\n // rtl\n var tmp = targetRight;\n targetRight = targetLeft;\n targetLeft = tmp;\n }\n\n sourceLeft += -padding; // add buffer for custom elements\n\n sourceRight += padding;\n targetLeft += -padding; // add buffer for custom elements\n\n targetRight += padding;\n\n if (viewport.x > sourceRight && viewport.x > targetRight) {\n return false;\n }\n\n if (viewport.x_end < sourceLeft && viewport.x_end < targetLeft) {\n return false;\n }\n\n return true;\n};","var getLinkRectangle = require(\"../get_link_rectangle\");\n\nmodule.exports = function () {\n var coordinates = [];\n var calculated = false;\n\n function clearCache() {\n coordinates = [];\n calculated = false;\n }\n\n function buildCache(datastore, view, gantt) {\n var config = view.$getConfig();\n var visibleItems = datastore.getVisibleItems(); //datastore.eachItem(function(link){\n\n visibleItems.forEach(function (link) {\n var rec = getLinkRectangle(link, view, config, gantt);\n\n if (!rec) {\n return;\n }\n\n coordinates.push({\n id: link.id,\n rec: rec\n });\n });\n coordinates.sort(function (a, b) {\n if (a.rec.right < b.rec.right) {\n return -1;\n } else {\n return 1;\n }\n });\n calculated = true;\n }\n\n var initialized = false;\n\n function init(datastore) {\n if (initialized) {\n return;\n }\n\n initialized = true;\n datastore.attachEvent(\"onPreFilter\", clearCache);\n datastore.attachEvent(\"onStoreUpdated\", clearCache);\n datastore.attachEvent(\"onClearAll\", clearCache);\n datastore.attachEvent(\"onBeforeStoreUpdate\", clearCache);\n }\n\n return function getVisibleLinksRange(gantt, view, config, datastore, viewport) {\n init(datastore);\n\n if (!calculated) {\n buildCache(datastore, view, gantt);\n }\n\n var visibleBoxes = [];\n\n for (var i = 0; i < coordinates.length; i++) {\n var item = coordinates[i];\n var box = item.rec;\n\n if (box.right < viewport.x) {\n continue;\n }\n\n if (box.left < viewport.x_end && box.right > viewport.x && box.top < viewport.y_end && box.bottom > viewport.y) {\n visibleBoxes.push(item.id);\n }\n }\n\n return {\n ids: visibleBoxes\n };\n };\n};","import { IWorkUnitCache } from \"./workunit_cache_interface\";\r\nimport { WorkUnitsMapCache } from \"./workunit_map_cache\";\r\nimport { WorkUnitsObjectCache } from \"./workunit_object_cache\";\r\nexport { LargerUnitsCache } from \"./larger_units_helper\";\r\n\r\nexport function createCacheObject(): IWorkUnitCache {\r\n\r\n\t// worktime hash is on the hot path,\r\n\t// Map seems to work faster than plain array, use it whenever possible\r\n\tif (typeof Map !== \"undefined\") {\r\n\t\treturn new WorkUnitsMapCache();\r\n\t} else {\r\n\t\treturn new WorkUnitsObjectCache();\r\n\t}\r\n}\r\n","var utils = require(\"../../utils/utils\");\n\nvar helpers = require(\"../../utils/helpers\");\n\nfunction IsWorkTimeArgument(date, unit, task, id, calendar) {\n this.date = date;\n this.unit = unit;\n this.task = task;\n this.id = id;\n this.calendar = calendar;\n return this;\n}\n\nfunction ClosestWorkTimeArgument(date, dir, unit, task, id, calendar) {\n this.date = date;\n this.dir = dir;\n this.unit = unit;\n this.task = task;\n this.id = id;\n this.calendar = calendar;\n return this;\n}\n\nfunction CalculateEndDateArgument(start_date, duration, unit, step, task, id, calendar) {\n this.start_date = start_date;\n this.duration = duration;\n this.unit = unit;\n this.step = step;\n this.task = task;\n this.id = id;\n this.calendar = calendar;\n return this;\n}\n\nfunction GetDurationArgument(start, end, task, calendar) {\n this.start_date = start;\n this.end_date = end;\n this.task = task;\n this.calendar = calendar;\n this.unit = null;\n this.step = null;\n return this;\n}\n\nvar calendarArgumentsHelper = function calendarArgumentsHelper(gantt) {\n return {\n getWorkHoursArguments: function getWorkHoursArguments() {\n var config = arguments[0];\n\n if (helpers.isDate(config)) {\n config = {\n date: config\n };\n } else {\n config = utils.mixin({}, config);\n }\n\n if (!helpers.isValidDate(config.date)) {\n gantt.assert(false, \"Invalid date argument for getWorkHours method\");\n throw new Error(\"Invalid date argument for getWorkHours method\");\n }\n\n return config;\n },\n setWorkTimeArguments: function setWorkTimeArguments() {\n return arguments[0];\n },\n unsetWorkTimeArguments: function unsetWorkTimeArguments() {\n return arguments[0];\n },\n isWorkTimeArguments: function isWorkTimeArguments() {\n var config = arguments[0];\n\n if (config instanceof IsWorkTimeArgument) {\n return config;\n }\n\n var processedConfig;\n\n if (!config.date) {\n //IsWorkTimeArgument(date, unit, task, id, calendar)\n processedConfig = new IsWorkTimeArgument(arguments[0], arguments[1], arguments[2], null, arguments[3]);\n } else {\n processedConfig = new IsWorkTimeArgument(config.date, config.unit, config.task, null, config.calendar);\n }\n\n processedConfig.unit = processedConfig.unit || gantt.config.duration_unit;\n\n if (!helpers.isValidDate(processedConfig.date)) {\n gantt.assert(false, \"Invalid date argument for isWorkTime method\");\n throw new Error(\"Invalid date argument for isWorkTime method\");\n }\n\n return processedConfig;\n },\n getClosestWorkTimeArguments: function getClosestWorkTimeArguments(arg) {\n var config = arguments[0];\n if (config instanceof ClosestWorkTimeArgument) return config;\n var processedConfig;\n\n if (helpers.isDate(config)) {\n processedConfig = new ClosestWorkTimeArgument(config);\n } else {\n processedConfig = new ClosestWorkTimeArgument(config.date, config.dir, config.unit, config.task, null, //config.id,\n config.calendar);\n }\n\n if (config.id) {\n processedConfig.task = config;\n }\n\n processedConfig.dir = config.dir || 'any';\n processedConfig.unit = config.unit || gantt.config.duration_unit;\n\n if (!helpers.isValidDate(processedConfig.date)) {\n gantt.assert(false, \"Invalid date argument for getClosestWorkTime method\");\n throw new Error(\"Invalid date argument for getClosestWorkTime method\");\n }\n\n return processedConfig;\n },\n _getStartEndConfig: function _getStartEndConfig(param) {\n var argumentType = GetDurationArgument;\n var config;\n if (param instanceof argumentType) return param;\n\n if (helpers.isDate(param)) {\n config = new argumentType(arguments[0], arguments[1], arguments[2], arguments[3]);\n } else {\n config = new argumentType(param.start_date, param.end_date, param.task);\n\n if (param.id !== null && param.id !== undefined) {\n config.task = param;\n }\n }\n\n config.unit = config.unit || gantt.config.duration_unit;\n config.step = config.step || gantt.config.duration_step;\n config.start_date = config.start_date || config.start || config.date;\n\n if (!helpers.isValidDate(config.start_date)) {\n gantt.assert(false, \"Invalid start_date argument for getDuration method\");\n throw new Error(\"Invalid start_date argument for getDuration method\");\n }\n\n if (!helpers.isValidDate(config.end_date)) {\n gantt.assert(false, \"Invalid end_date argument for getDuration method\");\n throw new Error(\"Invalid end_date argument for getDuration method\");\n }\n\n return config;\n },\n getDurationArguments: function getDurationArguments(start, end, unit, step) {\n return this._getStartEndConfig.apply(this, arguments);\n },\n hasDurationArguments: function hasDurationArguments(start, end, unit, step) {\n return this._getStartEndConfig.apply(this, arguments);\n },\n calculateEndDateArguments: function calculateEndDateArguments(start, duration, unit, step) {\n var config = arguments[0];\n if (config instanceof CalculateEndDateArgument) return config;\n var processedConfig; //CalculateEndDateArgument(start_date, duration, unit, step, task, id, calendar)\n\n if (helpers.isDate(config)) {\n processedConfig = new CalculateEndDateArgument(arguments[0], arguments[1], arguments[2], undefined, arguments[3], undefined, arguments[4]);\n } else {\n processedConfig = new CalculateEndDateArgument(config.start_date, config.duration, config.unit, config.step, config.task, null, //config.id,\n config.calendar);\n }\n\n if (config.id !== null && config.id !== undefined) {\n processedConfig.task = config; // received a task object as an argument\n // ignore 'unit' and 'step' properties in this case, since it's likely a part of data model of a task\n\n processedConfig.unit = null;\n processedConfig.step = null;\n }\n\n processedConfig.unit = processedConfig.unit || gantt.config.duration_unit;\n processedConfig.step = processedConfig.step || gantt.config.duration_step;\n\n if (!helpers.isValidDate(processedConfig.start_date)) {\n gantt.assert(false, \"Invalid start_date argument for calculateEndDate method\");\n throw new Error(\"Invalid start_date argument for calculateEndDate method\");\n }\n\n return processedConfig;\n }\n };\n};\n\nmodule.exports = calendarArgumentsHelper;","var quickPositionHelperFactory = require(\"./row_position_fixed_height\");\n\nfunction createMixin(view) {\n var getItemTopCache = {};\n var getRowTopCache = {};\n var getItemHeightCache = null;\n var totalHeightCache = -1;\n var getItemHeightCacheState = null;\n var quickPosition = quickPositionHelperFactory(view);\n return {\n _resetTopPositionHeight: function _resetTopPositionHeight() {\n getItemTopCache = {};\n getRowTopCache = {};\n quickPosition.resetCache();\n },\n _resetHeight: function _resetHeight() {\n var store = this.$config.rowStore;\n var newState = this.getCacheStateTotalHeight(store);\n\n if (!getItemHeightCacheState) {\n getItemHeightCacheState = newState;\n } else if (this.shouldClearHeightCache(getItemHeightCacheState, newState)) {\n getItemHeightCacheState = newState;\n getItemHeightCache = null;\n }\n\n totalHeightCache = -1;\n quickPosition.resetCache();\n },\n\n /**\r\n * Get top coordinate by row index (order)\r\n * @param {number} index\r\n */\n getRowTop: function getRowTop(index) {\n if (quickPosition.canUseSimpleCalculation()) {\n return quickPosition.getRowTop(index);\n }\n\n var store = this.$config.rowStore;\n\n if (!store) {\n return 0;\n }\n\n if (getRowTopCache[index] !== undefined) {\n return getRowTopCache[index];\n } else {\n var all = store.getIndexRange();\n var top = 0;\n var result = 0;\n\n for (var i = 0; i < all.length; i++) {\n getRowTopCache[i] = top;\n top += this.getItemHeight(all[i].id);\n\n if (i < index) {\n result = top;\n }\n }\n\n return result;\n }\n },\n\n /**\r\n * Get top coordinate by item id\r\n * @param {*} task_id\r\n */\n getItemTop: function getItemTop(taskId) {\n if (this.$config.rowStore) {\n if (getItemTopCache[taskId] !== undefined) {\n return getItemTopCache[taskId];\n }\n\n var store = this.$config.rowStore;\n if (!store) return 0;\n var itemIndex = store.getIndexById(taskId);\n\n if (itemIndex === -1 && store.getParent && store.exists(taskId)) {\n var parentId = store.getParent(taskId);\n\n if (store.exists(parentId)) {\n // if task is not found in list - maybe it's parent is a split task and we should use parents index instead\n var parent = store.getItem(parentId);\n\n if (this.$gantt.isSplitTask(parent)) {\n return this.getItemTop(parentId);\n }\n }\n }\n\n getItemTopCache[taskId] = this.getRowTop(itemIndex);\n return getItemTopCache[taskId];\n } else {\n return 0;\n }\n },\n\n /**\r\n * Get height of the item by item id\r\n * @param {*} itemId\r\n */\n getItemHeight: function getItemHeight(itemId) {\n if (quickPosition.canUseSimpleCalculation()) {\n return quickPosition.getItemHeight(itemId);\n }\n\n if (!getItemHeightCache && this.$config.rowStore) {\n this._fillHeightCache(this.$config.rowStore);\n }\n\n if (getItemHeightCache[itemId] !== undefined) {\n return getItemHeightCache[itemId];\n }\n\n var defaultHeight = this.$getConfig().row_height;\n\n if (this.$config.rowStore) {\n var store = this.$config.rowStore;\n if (!store) return defaultHeight;\n var item = store.getItem(itemId);\n return getItemHeightCache[itemId] = item && item.row_height || defaultHeight;\n } else {\n return defaultHeight;\n }\n },\n _fillHeightCache: function _fillHeightCache(store) {\n if (!store) {\n return;\n }\n\n getItemHeightCache = {};\n var defaultHeight = this.$getConfig().row_height;\n store.eachItem(function (item) {\n return getItemHeightCache[item.id] = item && item.row_height || defaultHeight;\n });\n },\n getCacheStateTotalHeight: function getCacheStateTotalHeight(store) {\n var globalHeight = this.$getConfig().row_height;\n var itemHeightCache = {};\n var items = [];\n var sumHeight = 0;\n\n if (store) {\n store.eachItem(function (item) {\n items.push(item);\n itemHeightCache[item.id] = item.row_height;\n sumHeight += item.row_height || globalHeight;\n });\n }\n\n return {\n globalHeight: globalHeight,\n items: items,\n count: items.length,\n sumHeight: sumHeight\n };\n },\n shouldClearHeightCache: function shouldClearHeightCache(oldState, newState) {\n if (oldState.count != newState.count) {\n return true;\n }\n\n if (oldState.globalHeight != newState.globalHeight) {\n return true;\n }\n\n if (oldState.sumHeight != newState.sumHeight) {\n return true;\n }\n\n for (var i in oldState.items) {\n var newValue = newState.items[i];\n\n if (newValue !== undefined && newValue != oldState.items[i]) {\n return true;\n }\n }\n\n return false;\n },\n\n /**\r\n * Get total height of items\r\n */\n getTotalHeight: function getTotalHeight() {\n if (quickPosition.canUseSimpleCalculation()) {\n return quickPosition.getTotalHeight();\n }\n\n if (totalHeightCache != -1) {\n return totalHeightCache;\n }\n\n if (this.$config.rowStore) {\n var store = this.$config.rowStore;\n\n this._fillHeightCache(store);\n\n var getHeight = this.getItemHeight.bind(this);\n var visibleItems = store.getVisibleItems();\n var totalHeight = 0;\n visibleItems.forEach(function (item) {\n totalHeight += getHeight(item.id);\n });\n totalHeightCache = totalHeight;\n return totalHeight;\n } else {\n return 0;\n }\n },\n\n /**\r\n * Get item by top position\r\n * @param {*} top\r\n */\n getItemIndexByTopPosition: function getItemIndexByTopPosition(top) {\n if (this.$config.rowStore) {\n if (quickPosition.canUseSimpleCalculation()) {\n return quickPosition.getItemIndexByTopPosition(top);\n }\n\n var store = this.$config.rowStore;\n\n for (var i = 0; i < store.countVisible(); i++) {\n var current = this.getRowTop(i);\n var next = this.getRowTop(i + 1);\n\n if (!next) {\n var taskId = store.getIdByIndex(i);\n next = current + this.getItemHeight(taskId);\n }\n\n if (top >= current && top < next) {\n return i;\n }\n } // GS-1723: If we iterated all tasks and didn't find the position, the target is below all other tasks\n\n\n return store.countVisible() + 2;\n } else {\n return 0;\n }\n }\n };\n}\n\nmodule.exports = createMixin;","export default class DurationFormatterNumeric implements IDurationFormatter {\r\n\tstatic create = (settings: IDurationFormatterConfig = null): IDurationFormatter => {\r\n\t\treturn new DurationFormatterNumeric();\r\n\t}\r\n\tcanParse = (value: string) : boolean => {\r\n\t\treturn !isNaN(this.parse(value));\r\n\t}\r\n\tformat = (value: number) : string => {\r\n\t\treturn String(value);\r\n\t}\r\n\tparse = (value: string) : number => {\r\n\t\treturn parseInt(value, 10);\r\n\t}\r\n}","function copyLinkIdsArray(gantt, linkIds, targetHash) {\n for (var i = 0; i < linkIds.length; i++) {\n if (gantt.isLinkExists(linkIds[i])) {\n targetHash[linkIds[i]] = gantt.getLink(linkIds[i]);\n }\n }\n}\n\nfunction copyLinkIds(gantt, task, targetHash) {\n copyLinkIdsArray(gantt, task.$source, targetHash);\n copyLinkIdsArray(gantt, task.$target, targetHash);\n}\n\nfunction getSubtreeLinks(gantt, rootId) {\n var res = {};\n\n if (gantt.isTaskExists(rootId)) {\n copyLinkIds(gantt, gantt.getTask(rootId), res);\n }\n\n gantt.eachTask(function (child) {\n copyLinkIds(gantt, child, res);\n }, rootId);\n return res;\n}\n\nfunction getSubtreeTasks(gantt, rootId) {\n var res = {};\n gantt.eachTask(function (child) {\n res[child.id] = child;\n }, rootId);\n return res;\n}\n\nmodule.exports = {\n getSubtreeLinks: getSubtreeLinks,\n getSubtreeTasks: getSubtreeTasks\n};","var ScaleHelper = require(\"./ui/timeline/scales_ignore\");\n\nvar PrimaryScaleHelper = require(\"./ui/timeline/scales\");\n\nfunction resolveConfigRange(unit, gantt) {\n var range = {\n start_date: null,\n end_date: null\n };\n\n if (gantt.config.start_date && gantt.config.end_date) {\n range.start_date = gantt.date[unit + \"_start\"](new Date(gantt.config.start_date));\n var end = new Date(gantt.config.end_date);\n var start_interval = gantt.date[unit + \"_start\"](new Date(end));\n\n if (+end != +start_interval) {\n end = gantt.date.add(start_interval, 1, unit);\n } else {\n end = start_interval;\n }\n\n range.end_date = end;\n }\n\n return range;\n}\n\nfunction _scale_range_unit(gantt) {\n var primaryScale = new PrimaryScaleHelper(gantt).primaryScale();\n var unit = primaryScale.unit;\n var step = primaryScale.step;\n\n if (gantt.config.scale_offset_minimal) {\n var helper = new ScaleHelper(gantt);\n var scales = [helper.primaryScale()].concat(helper.getSubScales());\n helper.sortScales(scales);\n unit = scales[scales.length - 1].unit;\n step = scales[scales.length - 1].step || 1;\n }\n\n return {\n unit: unit,\n step: step\n };\n}\n\nfunction _init_tasks_range(gantt) {\n var cfg = _scale_range_unit(gantt);\n\n var unit = cfg.unit,\n step = cfg.step;\n var range = resolveConfigRange(unit, gantt); // GS-1544: Show correct date range if we have tasks or only projects\n\n if (!(range.start_date && range.end_date)) {\n var onlyProjectTasks = true;\n var tasks = gantt.getTaskByTime();\n\n for (var i = 0; i < tasks.length; i++) {\n var task = tasks[i];\n\n if (task.type !== gantt.config.types.project) {\n onlyProjectTasks = false;\n break;\n }\n }\n\n if (tasks.length && onlyProjectTasks) {\n var start_date = tasks[0].start_date;\n var end_date = gantt.date.add(start_date, 1, gantt.config.duration_unit);\n range = {\n start_date: new Date(start_date),\n end_date: new Date(end_date)\n };\n } else {\n range = gantt.getSubtaskDates();\n }\n\n if (!range.start_date || !range.end_date) {\n range = {\n start_date: new Date(),\n end_date: new Date()\n };\n }\n\n range.start_date = gantt.date[unit + \"_start\"](range.start_date);\n range.start_date = gantt.calculateEndDate({\n start_date: gantt.date[unit + \"_start\"](range.start_date),\n duration: -1,\n unit: unit,\n step: step\n }); //one free column before first task\n\n range.end_date = gantt.date[unit + \"_start\"](range.end_date);\n range.end_date = gantt.calculateEndDate({\n start_date: range.end_date,\n duration: 2,\n unit: unit,\n step: step\n }); //one free column after last task\n }\n\n gantt._min_date = range.start_date;\n gantt._max_date = range.end_date;\n}\n\nfunction _adjust_scales(gantt) {\n if (gantt.config.fit_tasks) {\n var old_min = +gantt._min_date,\n old_max = +gantt._max_date; //this._init_tasks_range();\n\n if (+gantt._min_date != old_min || +gantt._max_date != old_max) {\n gantt.render();\n gantt.callEvent(\"onScaleAdjusted\", []);\n return true;\n }\n }\n\n return false;\n}\n\nmodule.exports = function updateTasksRange(gantt) {\n _init_tasks_range(gantt);\n\n _adjust_scales(gantt);\n};","var powerArray = require(\"./power_array\");\n\nvar utils = require(\"../../utils/utils\");\n\nvar helpers = require(\"../../utils/helpers\");\n\nvar DataStore = require(\"./datastore\");\n\nvar isPlaceholderTask = require(\"../../utils/placeholder_task\");\n\nvar _require = require(\"../../utils/helpers\"),\n replaceValidZeroId = _require.replaceValidZeroId; // TODO: remove workaround for mixup with es5 and ts imports\n\n\nif (DataStore[\"default\"]) {\n DataStore = DataStore[\"default\"];\n}\n\nvar TreeDataStore = function TreeDataStore(config) {\n DataStore.apply(this, [config]);\n this._branches = {};\n this.pull = {}; //GS-761 Update existing item instead of adding it to the new position\n\n this.$initItem = function (item) {\n var loadedItem = item;\n\n if (config.initItem) {\n loadedItem = config.initItem(loadedItem);\n }\n\n var existingItem = this.getItem(item.id);\n\n if (existingItem && existingItem.parent != loadedItem.parent) {\n this.move(loadedItem.id, loadedItem.$index || -1, loadedItem.parent || this._ganttConfig.root_id);\n }\n\n return loadedItem;\n };\n\n this.$parentProperty = config.parentProperty || \"parent\";\n\n if (typeof config.rootId !== \"function\") {\n this.$getRootId = function (val) {\n return function () {\n return val;\n };\n }(config.rootId || 0);\n } else {\n this.$getRootId = config.rootId;\n } // TODO: replace with live reference to gantt config\n\n\n this.$openInitially = config.openInitially;\n this.visibleOrder = powerArray.$create();\n this.fullOrder = powerArray.$create();\n this._searchVisibleOrder = {};\n this._indexRangeCache = {};\n this._eachItemMainRangeCache = null;\n this._getItemsCache = null;\n this._skip_refresh = false;\n this._ganttConfig = null;\n\n if (config.getConfig) {\n this._ganttConfig = config.getConfig();\n }\n\n var splitParents = {};\n var splitItems = {};\n var taskOpenState = {};\n var taskVisibility = {};\n var haveSplitItems = false;\n\n this._attachDataChange(function () {\n this._indexRangeCache = {};\n this._eachItemMainRangeCache = null;\n this._getItemsCache = null;\n return true;\n });\n\n this.attachEvent(\"onPreFilter\", function () {\n this._indexRangeCache = {};\n this._eachItemMainRangeCache = null;\n splitParents = {};\n splitItems = {};\n taskOpenState = {};\n taskVisibility = {};\n haveSplitItems = false;\n this.eachItem(function (item) {\n var parent = this.getParent(item.id);\n\n if (item.$open && taskOpenState[parent] !== false) {\n taskOpenState[item.id] = true;\n } else {\n taskOpenState[item.id] = false;\n }\n\n if (this._isSplitItem(item)) {\n haveSplitItems = true;\n splitParents[item.id] = true;\n splitItems[item.id] = true;\n }\n\n if (haveSplitItems && splitItems[parent]) {\n splitItems[item.id] = true;\n }\n\n if (taskOpenState[parent] || taskOpenState[parent] === undefined) {\n taskVisibility[item.id] = true;\n } else {\n taskVisibility[item.id] = false;\n }\n });\n });\n this.attachEvent(\"onFilterItem\", function (id, item) {\n var canOpenSplitTasks = false;\n\n if (this._ganttConfig) {\n var canOpenSplitTasks = this._ganttConfig.open_split_tasks;\n }\n\n var open = taskVisibility[item.id];\n\n if (haveSplitItems) {\n if (open && splitItems[item.id] && !splitParents[item.id]) {\n open = !!canOpenSplitTasks;\n }\n\n if (splitItems[item.id] && !splitParents[item.id]) {\n item.$split_subtask = true;\n }\n }\n\n item.$expanded_branch = !!taskVisibility[item.id];\n return !!open;\n });\n this.attachEvent(\"onFilter\", function () {\n splitParents = {};\n splitItems = {};\n taskOpenState = {};\n taskVisibility = {};\n });\n return this;\n};\n\nTreeDataStore.prototype = utils.mixin({\n _buildTree: function _buildTree(data) {\n var item = null;\n var rootId = this.$getRootId();\n\n for (var i = 0, len = data.length; i < len; i++) {\n item = data[i];\n this.setParent(item, replaceValidZeroId(this.getParent(item), rootId) || rootId);\n } // calculating $level for each item\n\n\n for (var i = 0, len = data.length; i < len; i++) {\n item = data[i];\n\n this._add_branch(item);\n\n item.$level = this.calculateItemLevel(item);\n item.$local_index = this.getBranchIndex(item.id);\n\n if (!utils.defined(item.$open)) {\n item.$open = utils.defined(item.open) ? item.open : this.$openInitially();\n }\n }\n\n this._updateOrder();\n },\n _isSplitItem: function _isSplitItem(item) {\n return item.render == \"split\" && this.hasChild(item.id);\n },\n parse: function parse(data) {\n if (!this._skip_refresh) {\n this.callEvent(\"onBeforeParse\", [data]);\n }\n\n var loaded = this._parseInner(data);\n\n this._buildTree(loaded);\n\n this.filter();\n\n if (!this._skip_refresh) {\n this.callEvent(\"onParse\", [loaded]);\n }\n },\n _addItemInner: function _addItemInner(item, index) {\n var parent = this.getParent(item);\n\n if (!utils.defined(parent)) {\n parent = this.$getRootId();\n this.setParent(item, parent);\n }\n\n var parentIndex = this.getIndexById(parent);\n var targetIndex = parentIndex + Math.min(Math.max(index, 0), this.visibleOrder.length);\n\n if (targetIndex * 1 !== targetIndex) {\n targetIndex = undefined;\n }\n\n DataStore.prototype._addItemInner.call(this, item, targetIndex);\n\n this.setParent(item, parent);\n\n if (item.hasOwnProperty(\"$rendered_parent\")) {\n this._move_branch(item, item.$rendered_parent);\n }\n\n this._add_branch(item, index);\n },\n _changeIdInner: function _changeIdInner(oldId, newId) {\n var children = this.getChildren(oldId);\n var visibleOrder = this._searchVisibleOrder[oldId];\n\n DataStore.prototype._changeIdInner.call(this, oldId, newId);\n\n var parent = this.getParent(newId);\n\n this._replace_branch_child(parent, oldId, newId);\n\n if (this._branches[oldId]) {\n this._branches[newId] = this._branches[oldId];\n }\n\n for (var i = 0; i < children.length; i++) {\n var child = this.getItem(children[i]);\n child[this.$parentProperty] = newId;\n child.$rendered_parent = newId;\n }\n\n this._searchVisibleOrder[newId] = visibleOrder;\n delete this._branches[oldId];\n },\n _traverseBranches: function _traverseBranches(code, parent) {\n if (!utils.defined(parent)) {\n parent = this.$getRootId();\n }\n\n var branch = this._branches[parent];\n\n if (branch) {\n for (var i = 0; i < branch.length; i++) {\n var itemId = branch[i];\n code.call(this, itemId);\n if (this._branches[itemId]) this._traverseBranches(code, itemId);\n }\n }\n },\n _updateOrder: function _updateOrder(code) {\n this.fullOrder = powerArray.$create();\n\n this._traverseBranches(function (taskId) {\n this.fullOrder.push(taskId);\n });\n\n if (code) DataStore.prototype._updateOrder.call(this, code);\n },\n _removeItemInner: function _removeItemInner(id) {\n var items = [];\n this.eachItem(function (child) {\n items.push(child);\n }, id);\n items.push(this.getItem(id));\n\n for (var i = 0; i < items.length; i++) {\n this._move_branch(items[i], this.getParent(items[i]), null);\n\n DataStore.prototype._removeItemInner.call(this, items[i].id);\n\n this._move_branch(items[i], this.getParent(items[i]), null);\n }\n },\n move: function move(sid, tindex, parent) {\n //target id as 4th parameter\n var id = arguments[3];\n var config = this._ganttConfig || {};\n var root_id = config.root_id || 0;\n id = replaceValidZeroId(id, root_id);\n\n if (id) {\n if (id === sid) return;\n parent = this.getParent(id);\n tindex = this.getBranchIndex(id);\n }\n\n if (sid == parent) {\n return;\n }\n\n if (!utils.defined(parent)) {\n parent = this.$getRootId();\n }\n\n var source = this.getItem(sid);\n var source_pid = this.getParent(source.id);\n var tbranch = this.getChildren(parent);\n if (tindex == -1) tindex = tbranch.length + 1;\n\n if (source_pid == parent) {\n var sindex = this.getBranchIndex(sid);\n if (sindex == tindex) return;\n }\n\n if (this.callEvent(\"onBeforeItemMove\", [sid, parent, tindex]) === false) return false;\n var placeholderIds = [];\n\n for (var i = 0; i < tbranch.length; i++) {\n if (isPlaceholderTask(tbranch[i], null, this, this._ganttConfig)) {\n placeholderIds.push(tbranch[i]);\n tbranch.splice(i, 1);\n i--;\n }\n }\n\n this._replace_branch_child(source_pid, sid);\n\n tbranch = this.getChildren(parent);\n var tid = tbranch[tindex];\n tid = replaceValidZeroId(tid, root_id);\n if (!tid) //adding as last element\n tbranch.push(sid);else tbranch = tbranch.slice(0, tindex).concat([sid]).concat(tbranch.slice(tindex));\n\n if (placeholderIds.length) {\n tbranch = tbranch.concat(placeholderIds);\n } // GS-2423 to return initial parent to the task before it will be moved\n\n\n if (source.$rendered_parent !== source_pid && source_pid !== parent) {\n source.$rendered_parent = source_pid;\n }\n\n this.setParent(source, parent);\n this._branches[parent] = tbranch;\n var diff = this.calculateItemLevel(source) - source.$level;\n source.$level += diff;\n this.eachItem(function (item) {\n item.$level += diff;\n }, source.id, this);\n\n this._moveInner(this.getIndexById(sid), this.getIndexById(parent) + tindex);\n\n this.callEvent(\"onAfterItemMove\", [sid, parent, tindex]);\n this.refresh();\n },\n getBranchIndex: function getBranchIndex(id) {\n var branch = this.getChildren(this.getParent(id));\n var index = branch.indexOf(id + \"\");\n\n if (index == -1) {\n index = branch.indexOf(+id);\n }\n\n return index;\n },\n hasChild: function hasChild(id) {\n var branch = this._branches[id];\n return branch && branch.length;\n },\n getChildren: function getChildren(id) {\n var branch = this._branches[id];\n return branch ? branch : powerArray.$create();\n },\n isChildOf: function isChildOf(childId, parentId) {\n if (!this.exists(childId)) return false;\n if (parentId === this.$getRootId()) return true;\n if (!this.hasChild(parentId)) return false;\n var item = this.getItem(childId);\n var pid = this.getParent(childId);\n var parent = this.getItem(parentId);\n\n if (parent.$level >= item.$level) {\n return false;\n }\n\n while (item && this.exists(pid)) {\n item = this.getItem(pid);\n if (item && item.id == parentId) return true;\n pid = this.getParent(item);\n }\n\n return false;\n },\n getSiblings: function getSiblings(id) {\n if (!this.exists(id)) {\n return powerArray.$create();\n }\n\n var parent = this.getParent(id);\n return this.getChildren(parent);\n },\n getNextSibling: function getNextSibling(id) {\n var siblings = this.getSiblings(id);\n\n for (var i = 0, len = siblings.length; i < len; i++) {\n if (siblings[i] == id) {\n var nextSibling = siblings[i + 1];\n\n if (nextSibling === 0 && i > 0) {\n nextSibling = \"0\";\n }\n\n return nextSibling || null;\n }\n }\n\n return null;\n },\n getPrevSibling: function getPrevSibling(id) {\n var siblings = this.getSiblings(id);\n\n for (var i = 0, len = siblings.length; i < len; i++) {\n if (siblings[i] == id) {\n var previousSibling = siblings[i - 1];\n\n if (previousSibling === 0 && i > 0) {\n previousSibling = \"0\";\n }\n\n return previousSibling || null;\n }\n }\n\n return null;\n },\n getParent: function getParent(id) {\n var item = null;\n\n if (id.id !== undefined) {\n item = id;\n } else {\n item = this.getItem(id);\n }\n\n var parent;\n\n if (item) {\n parent = item[this.$parentProperty];\n } else {\n parent = this.$getRootId();\n }\n\n return parent;\n },\n clearAll: function clearAll() {\n this._branches = {};\n DataStore.prototype.clearAll.call(this);\n },\n calculateItemLevel: function calculateItemLevel(item) {\n var level = 0;\n this.eachParent(function () {\n level++;\n }, item);\n return level;\n },\n _setParentInner: function _setParentInner(item, new_pid, silent) {\n if (!silent) {\n if (item.hasOwnProperty(\"$rendered_parent\")) {\n this._move_branch(item, item.$rendered_parent, new_pid);\n } else {\n this._move_branch(item, item[this.$parentProperty], new_pid);\n }\n }\n },\n setParent: function setParent(item, new_pid, silent) {\n this._setParentInner(item, new_pid, silent);\n\n item[this.$parentProperty] = new_pid;\n },\n _eachItemCached: function _eachItemCached(code, cache) {\n for (var i = 0, len = cache.length; i < len; i++) {\n code.call(this, cache[i]);\n }\n },\n _eachItemIterate: function _eachItemIterate(code, startId, cache) {\n var itemsStack = this.getChildren(startId);\n\n if (itemsStack.length) {\n itemsStack = itemsStack.slice().reverse();\n }\n\n while (itemsStack.length) {\n var itemId = itemsStack.pop();\n var item = this.getItem(itemId);\n code.call(this, item);\n\n if (cache) {\n cache.push(item);\n }\n\n if (this.hasChild(item.id)) {\n var children = this.getChildren(item.id);\n var len = children.length;\n\n for (var i = len - 1; i >= 0; i--) {\n itemsStack.push(children[i]);\n }\n }\n }\n },\n eachItem: function eachItem(code, parent) {\n var rootId = this.$getRootId();\n\n if (!utils.defined(parent)) {\n parent = rootId;\n }\n\n var startId = replaceValidZeroId(parent, rootId) || rootId;\n var useCache = false;\n var buildCache = false;\n var cache = null;\n\n if (startId === rootId) {\n if (this._eachItemMainRangeCache) {\n useCache = true;\n cache = this._eachItemMainRangeCache;\n } else {\n buildCache = true;\n cache = this._eachItemMainRangeCache = [];\n }\n }\n\n if (useCache) {\n this._eachItemCached(code, cache);\n } else {\n this._eachItemIterate(code, startId, buildCache ? cache : null);\n }\n },\n eachParent: function eachParent(code, startItem) {\n var parentsHash = {};\n var item = startItem;\n var parent = this.getParent(item);\n\n while (this.exists(parent)) {\n if (parentsHash[parent]) {\n throw new Error(\"Invalid tasks tree. Cyclic reference has been detected on task \" + parent);\n }\n\n parentsHash[parent] = true;\n item = this.getItem(parent);\n code.call(this, item);\n parent = this.getParent(item);\n }\n },\n _add_branch: function _add_branch(item, index, parent) {\n var pid = parent === undefined ? this.getParent(item) : parent;\n if (!this.hasChild(pid)) this._branches[pid] = powerArray.$create();\n var branch = this.getChildren(pid);\n var added_already = branch.indexOf(item.id + \"\") > -1 || branch.indexOf(+item.id) > -1;\n\n if (!added_already) {\n if (index * 1 == index) {\n branch.splice(index, 0, item.id);\n } else {\n branch.push(item.id);\n }\n\n item.$rendered_parent = pid;\n }\n },\n _move_branch: function _move_branch(item, old_parent, new_parent) {\n this._eachItemMainRangeCache = null; //this.setParent(item, new_parent);\n //this._sync_parent(task);\n\n this._replace_branch_child(old_parent, item.id);\n\n if (this.exists(new_parent) || new_parent == this.$getRootId()) {\n this._add_branch(item, undefined, new_parent);\n } else {\n delete this._branches[item.id];\n }\n\n item.$level = this.calculateItemLevel(item);\n this.eachItem(function (child) {\n child.$level = this.calculateItemLevel(child);\n }, item.id);\n },\n _replace_branch_child: function _replace_branch_child(node, old_id, new_id) {\n var branch = this.getChildren(node);\n\n if (branch && node !== undefined) {\n var newbranch = powerArray.$create();\n var index = branch.indexOf(old_id + \"\");\n\n if (index == -1 && !isNaN(+old_id)) {\n index = branch.indexOf(+old_id);\n }\n\n if (index > -1) {\n if (new_id) {\n branch.splice(index, 1, new_id);\n } else {\n branch.splice(index, 1);\n }\n }\n\n newbranch = branch;\n this._branches[node] = newbranch;\n }\n },\n sort: function sort(field, desc, parent) {\n if (!this.exists(parent)) {\n parent = this.$getRootId();\n }\n\n if (!field) field = \"order\";\n var criteria = typeof field == \"string\" ? function (a, b) {\n if (a[field] == b[field] || helpers.isDate(a[field]) && helpers.isDate(b[field]) && a[field].valueOf() == b[field].valueOf()) {\n return 0;\n }\n\n var result = a[field] > b[field];\n return result ? 1 : -1;\n } : field;\n\n if (desc) {\n var original_criteria = criteria;\n\n criteria = function criteria(a, b) {\n return original_criteria(b, a);\n };\n }\n\n var els = this.getChildren(parent);\n\n if (els) {\n var temp = [];\n\n for (var i = els.length - 1; i >= 0; i--) {\n temp[i] = this.getItem(els[i]);\n }\n\n temp.sort(criteria);\n\n for (var i = 0; i < temp.length; i++) {\n els[i] = temp[i].id;\n this.sort(field, desc, els[i]);\n }\n }\n },\n filter: function filter(rule) {\n for (var i in this.pull) {\n var renderedParent = this.pull[i].$rendered_parent;\n var actualParent = this.getParent(this.pull[i]);\n\n if (renderedParent !== actualParent) {\n this._move_branch(this.pull[i], renderedParent, actualParent);\n }\n }\n\n return DataStore.prototype.filter.apply(this, arguments);\n },\n open: function open(id) {\n if (this.exists(id)) {\n this.getItem(id).$open = true; // GS-2170. Do not recalculate the indexes and dates as they will be recalculated later\n\n this._skipTaskRecalculation = true;\n this.callEvent(\"onItemOpen\", [id]);\n }\n },\n close: function close(id) {\n if (this.exists(id)) {\n this.getItem(id).$open = false; // GS-2170. Do not recalculate the indexes and dates as they will be recalculated later\n\n this._skipTaskRecalculation = true;\n this.callEvent(\"onItemClose\", [id]);\n }\n },\n destructor: function destructor() {\n DataStore.prototype.destructor.call(this);\n this._branches = null;\n this._indexRangeCache = {};\n this._eachItemMainRangeCache = null;\n }\n}, DataStore.prototype);\nmodule.exports = TreeDataStore;","var utils = require(\"../../utils/utils\");\n\nvar $powerArray = {\n $create: function $create(array) {\n return utils.mixin(array || [], this);\n },\n //remove element at specified position\n $removeAt: function $removeAt(pos, len) {\n if (pos >= 0) this.splice(pos, len || 1);\n },\n //find element in collection and remove it\n $remove: function $remove(value) {\n this.$removeAt(this.$find(value));\n },\n //add element to collection at specific position\n $insertAt: function $insertAt(data, pos) {\n if (!pos && pos !== 0) //add to the end by default\n this.push(data);else {\n var b = this.splice(pos, this.length - pos);\n this[pos] = data;\n this.push.apply(this, b); //reconstruct array without loosing this pointer\n }\n },\n //return index of element, -1 if it doesn't exists\n $find: function $find(data) {\n for (var i = 0; i < this.length; i++) {\n if (data == this[i]) return i;\n }\n\n return -1;\n },\n //execute some method for each element of array\n $each: function $each(functor, master) {\n for (var i = 0; i < this.length; i++) {\n functor.call(master || this, this[i]);\n }\n },\n //create new array from source, by using results of functor\n $map: function $map(functor, master) {\n for (var i = 0; i < this.length; i++) {\n this[i] = functor.call(master || this, this[i]);\n }\n\n return this;\n },\n $filter: function $filter(functor, master) {\n for (var i = 0; i < this.length; i++) {\n if (!functor.call(master || this, this[i])) {\n this.splice(i, 1);\n i--;\n }\n }\n\n return this;\n }\n};\nmodule.exports = $powerArray;","var powerArray = require(\"./power_array\");\n\nvar utils = require(\"../../utils/utils\");\n\nvar eventable = require(\"../../utils/eventable\");\n\nvar isPlaceholderTask = require(\"../../utils/placeholder_task\");\n\nvar DataStore = function DataStore(config) {\n this.pull = {};\n this.$initItem = config.initItem;\n this.visibleOrder = powerArray.$create();\n this.fullOrder = powerArray.$create();\n this._skip_refresh = false;\n this._filterRule = null;\n this._searchVisibleOrder = {};\n this._indexRangeCache = {};\n this._getItemsCache = null;\n this.$config = config;\n eventable(this);\n\n this._attachDataChange(function () {\n this._indexRangeCache = {};\n this._getItemsCache = null;\n return true;\n });\n\n return this;\n};\n\nDataStore.prototype = {\n _attachDataChange: function _attachDataChange(callback) {\n this.attachEvent(\"onClearAll\", callback);\n this.attachEvent(\"onBeforeParse\", callback);\n this.attachEvent(\"onBeforeUpdate\", callback);\n this.attachEvent(\"onBeforeDelete\", callback);\n this.attachEvent(\"onBeforeAdd\", callback);\n this.attachEvent(\"onParse\", callback);\n this.attachEvent(\"onBeforeFilter\", callback);\n },\n _parseInner: function _parseInner(data) {\n var item = null,\n loaded = [];\n\n for (var i = 0, len = data.length; i < len; i++) {\n item = data[i];\n\n if (this.$initItem) {\n if (this.$config.copyOnParse()) {\n item = utils.copy(item);\n }\n\n item = this.$initItem(item);\n }\n\n if (this.callEvent(\"onItemLoading\", [item])) {\n if (!this.pull.hasOwnProperty(item.id)) {\n this.fullOrder.push(item.id);\n }\n\n loaded.push(item);\n this.pull[item.id] = item;\n }\n }\n\n return loaded;\n },\n parse: function parse(data) {\n if (!this.isSilent()) {\n this.callEvent(\"onBeforeParse\", [data]);\n }\n\n var loaded = this._parseInner(data);\n\n if (!this.isSilent()) {\n this.refresh();\n this.callEvent(\"onParse\", [loaded]);\n }\n },\n getItem: function getItem(id) {\n return this.pull[id];\n },\n _updateOrder: function _updateOrder(code) {\n code.call(this.visibleOrder);\n code.call(this.fullOrder);\n },\n updateItem: function updateItem(id, item) {\n if (!utils.defined(item)) item = this.getItem(id);\n\n if (!this.isSilent()) {\n if (this.callEvent(\"onBeforeUpdate\", [item.id, item]) === false) return false;\n } // This is how it worked before updating the properties:\n // this.pull[id]=item;\n\n\n utils.mixin(this.pull[id], item, true);\n\n if (!this.isSilent()) {\n this.callEvent(\"onAfterUpdate\", [item.id, item]);\n this.callEvent(\"onStoreUpdated\", [item.id, item, \"update\"]);\n }\n },\n _removeItemInner: function _removeItemInner(id) {\n //clear from collections\n //this.visibleOrder.$remove(id);\n this._updateOrder(function () {\n this.$remove(id);\n });\n\n delete this.pull[id];\n },\n removeItem: function removeItem(id) {\n //utils.assert(this.exists(id), \"Not existing ID in remove command\"+id);\n var obj = this.getItem(id); //save for later event\n\n if (!this.isSilent()) {\n if (this.callEvent(\"onBeforeDelete\", [obj.id, obj]) === false) return false;\n }\n\n this.callEvent(\"onAfterDeleteConfirmed\", [obj.id, obj]);\n\n this._removeItemInner(id);\n\n if (this.isSilent()) {\n this.callEvent(\"onAfterSilentDelete\", [obj.id, obj]);\n }\n\n if (!this.isSilent()) {\n this.filter();\n this.callEvent(\"onAfterDelete\", [obj.id, obj]); //repaint signal\n\n this.callEvent(\"onStoreUpdated\", [obj.id, obj, \"delete\"]);\n }\n },\n _addItemInner: function _addItemInner(item, index) {\n //in case of treetable order is sent as 3rd parameter\n //var order = index;\n if (this.exists(item.id)) {\n this.silent(function () {\n this.updateItem(item.id, item);\n });\n } else {\n var order = this.visibleOrder; //by default item is added to the end of the list\n\n var data_size = order.length;\n if (!utils.defined(index) || index < 0) index = data_size; //check to prevent too big indexes\n\n if (index > data_size) {\n //dhx.log(\"Warning\",\"DataStore:add\",\"Index of out of bounds\");\n index = Math.min(order.length, index);\n }\n } //gantt.assert(!this.exists(id), \"Not unique ID\");\n\n\n this.pull[item.id] = item;\n\n if (!this.isSilent()) {\n this._updateOrder(function () {\n if (this.$find(item.id) === -1) this.$insertAt(item.id, index);\n });\n }\n\n this.filter(); //order.$insertAt(item.id,index);\n },\n isVisible: function isVisible(id) {\n return this.visibleOrder.$find(id) > -1;\n },\n getVisibleItems: function getVisibleItems() {\n return this.getIndexRange();\n },\n addItem: function addItem(item, index) {\n if (!utils.defined(item.id)) item.id = utils.uid();\n\n if (this.$initItem) {\n item = this.$initItem(item);\n }\n\n if (!this.isSilent()) {\n if (this.callEvent(\"onBeforeAdd\", [item.id, item]) === false) return false;\n }\n\n this._addItemInner(item, index);\n\n if (!this.isSilent()) {\n this.callEvent(\"onAfterAdd\", [item.id, item]); //repaint signal\n\n this.callEvent(\"onStoreUpdated\", [item.id, item, \"add\"]);\n }\n\n return item.id;\n },\n _changeIdInner: function _changeIdInner(oldId, newId) {\n if (this.pull[oldId]) this.pull[newId] = this.pull[oldId];\n var visibleOrder = this._searchVisibleOrder[oldId];\n this.pull[newId].id = newId;\n\n this._updateOrder(function () {\n this[this.$find(oldId)] = newId;\n });\n\n this._searchVisibleOrder[newId] = visibleOrder;\n delete this._searchVisibleOrder[oldId]; //this.visibleOrder[this.visibleOrder.$find(oldId)]=newId;\n\n delete this.pull[oldId];\n },\n changeId: function changeId(oldId, newId) {\n this._changeIdInner(oldId, newId);\n\n this.callEvent(\"onIdChange\", [oldId, newId]);\n },\n exists: function exists(id) {\n return !!this.pull[id];\n },\n _moveInner: function _moveInner(sindex, tindex) {\n var id = this.getIdByIndex(sindex);\n\n this._updateOrder(function () {\n this.$removeAt(sindex);\n this.$insertAt(id, Math.min(this.length, tindex));\n }); //this.visibleOrder.$removeAt(sindex);\t//remove at old position\n //if (sindex=0 && tindex>=0, \"DataStore::move\",\"Incorrect indexes\");\n var id = this.getIdByIndex(sindex);\n var obj = this.getItem(id);\n\n this._moveInner(sindex, tindex);\n\n if (!this.isSilent()) {\n //repaint signal\n this.callEvent(\"onStoreUpdated\", [obj.id, obj, \"move\"]);\n }\n },\n clearAll: function clearAll() {\n if (this.$destroyed) {\n return;\n } // GS-956 We need to unselect the resource as its ID is cached\n\n\n this.silent(function () {\n this.unselect();\n });\n this.pull = {};\n this.visibleOrder = powerArray.$create();\n this.fullOrder = powerArray.$create();\n if (this.isSilent()) return;\n this.callEvent(\"onClearAll\", []);\n this.refresh();\n },\n silent: function silent(code, master) {\n var alreadySilent = false;\n\n if (this.isSilent()) {\n alreadySilent = true;\n }\n\n this._skip_refresh = true;\n code.call(master || this);\n\n if (!alreadySilent) {\n this._skip_refresh = false;\n }\n },\n isSilent: function isSilent() {\n return !!this._skip_refresh;\n },\n arraysEqual: function arraysEqual(arr1, arr2) {\n if (arr1.length !== arr2.length) return false;\n\n for (var i = 0; i < arr1.length; i++) {\n if (arr1[i] !== arr2[i]) return false;\n }\n\n return true;\n },\n refresh: function refresh(id, quick) {\n if (this.isSilent()) return;\n var item;\n\n if (id) {\n item = this.getItem(id);\n }\n\n var args;\n\n if (id) {\n args = [id, item, \"paint\"];\n } else {\n args = [null, null, null];\n }\n\n if (this.callEvent(\"onBeforeStoreUpdate\", args) === false) {\n return;\n }\n\n var skipFilter = this._quick_refresh && !this._mark_recompute;\n this._mark_recompute = false;\n\n if (id) {\n // if item changes visible order (e.g. expand-collapse branch) - do a complete repaint\n if (!quick && !skipFilter) {\n var oldOrder = this.visibleOrder;\n this.filter();\n\n if (!this.arraysEqual(oldOrder, this.visibleOrder)) {\n id = undefined;\n }\n }\n } else if (!skipFilter) {\n this.filter();\n }\n\n if (id) {\n args = [id, item, \"paint\"];\n } else {\n args = [null, null, null];\n }\n\n this.callEvent(\"onStoreUpdated\", args);\n },\n count: function count() {\n return this.fullOrder.length;\n },\n countVisible: function countVisible() {\n return this.visibleOrder.length;\n },\n sort: function sort(_sort) {},\n serialize: function serialize() {},\n eachItem: function eachItem(code) {\n for (var i = 0; i < this.fullOrder.length; i++) {\n var item = this.getItem(this.fullOrder[i]);\n code.call(this, item);\n }\n },\n find: function find(filter) {\n var result = [];\n this.eachItem(function (item) {\n if (filter(item)) {\n result.push(item);\n }\n });\n return result;\n },\n filter: function filter(rule) {\n if (!this.isSilent()) {\n this.callEvent(\"onBeforeFilter\", []);\n }\n\n this.callEvent(\"onPreFilter\", []);\n var filteredOrder = powerArray.$create();\n var placeholderIds = [];\n this.eachItem(function (item) {\n if (this.callEvent(\"onFilterItem\", [item.id, item])) {\n if (isPlaceholderTask(item.id, null, this, this._ganttConfig)) {\n placeholderIds.push(item.id);\n } else {\n filteredOrder.push(item.id);\n }\n }\n });\n\n for (var i = 0; i < placeholderIds.length; i++) {\n filteredOrder.push(placeholderIds[i]);\n }\n\n this.visibleOrder = filteredOrder;\n this._searchVisibleOrder = {};\n\n for (var i = 0; i < this.visibleOrder.length; i++) {\n this._searchVisibleOrder[this.visibleOrder[i]] = i;\n }\n\n if (!this.isSilent()) {\n this.callEvent(\"onFilter\", []);\n }\n },\n getIndexRange: function getIndexRange(from, to) {\n var max = Math.min(to || Infinity, this.countVisible() - 1);\n var min = from || 0;\n var cacheKey = min + '-' + max;\n\n if (this._indexRangeCache[cacheKey]) {\n return this._indexRangeCache[cacheKey].slice();\n }\n\n var ret = [];\n\n for (var i = min; i <= max; i++) {\n ret.push(this.getItem(this.visibleOrder[i]));\n }\n\n this._indexRangeCache[cacheKey] = ret.slice();\n return ret;\n },\n getItems: function getItems() {\n if (this._getItemsCache) {\n return this._getItemsCache.slice();\n }\n\n var res = [];\n\n for (var i in this.pull) {\n res.push(this.pull[i]);\n }\n\n this._getItemsCache = res.slice();\n return res;\n },\n getIdByIndex: function getIdByIndex(index) {\n return this.visibleOrder[index];\n },\n getIndexById: function getIndexById(id) {\n var res = this._searchVisibleOrder[id];\n\n if (res === undefined) {\n res = -1;\n }\n\n return res;\n },\n _getNullIfUndefined: function _getNullIfUndefined(value) {\n if (value === undefined) {\n return null;\n } else {\n return value;\n }\n },\n getFirst: function getFirst() {\n return this._getNullIfUndefined(this.visibleOrder[0]);\n },\n getLast: function getLast() {\n return this._getNullIfUndefined(this.visibleOrder[this.visibleOrder.length - 1]);\n },\n getNext: function getNext(id) {\n return this._getNullIfUndefined(this.visibleOrder[this.getIndexById(id) + 1]);\n },\n getPrev: function getPrev(id) {\n return this._getNullIfUndefined(this.visibleOrder[this.getIndexById(id) - 1]);\n },\n destructor: function destructor() {\n this.callEvent(\"onDestroy\", []);\n this.detachAllEvents();\n this.$destroyed = true;\n this.pull = null;\n this.$initItem = null;\n this.visibleOrder = null;\n this.fullOrder = null;\n this._skip_refresh = null;\n this._filterRule = null;\n this._searchVisibleOrder = null;\n this._indexRangeCache = {};\n }\n};\nmodule.exports = DataStore;","function checkTimeout(host, updPerSecond) {\n if (!updPerSecond) return true;\n if (host._on_timeout) return false;\n var timeout = Math.ceil(1000 / updPerSecond);\n if (timeout < 2) return true;\n setTimeout(function () {\n delete host._on_timeout;\n }, timeout);\n host._on_timeout = true;\n return true;\n}\n\nmodule.exports = checkTimeout;","var utils = require(\"../../../utils/utils\");\n\nfunction createScope(addEvent, removeEvent) {\n addEvent = addEvent || utils.event;\n removeEvent = removeEvent || utils.eventRemove;\n var handlers = [];\n var eventScope = {\n attach: function attach(el, event, callback, capture) {\n handlers.push({\n element: el,\n event: event,\n callback: callback,\n capture: capture\n });\n addEvent(el, event, callback, capture);\n },\n detach: function detach(el, event, callback, capture) {\n removeEvent(el, event, callback, capture);\n\n for (var i = 0; i < handlers.length; i++) {\n var handler = handlers[i];\n\n if (handler.element === el && handler.event === event && handler.callback === callback && handler.capture === capture) {\n handlers.splice(i, 1);\n i--;\n }\n }\n },\n detachAll: function detachAll() {\n var staticArray = handlers.slice(); // original handlers array can be spliced on every iteration\n\n for (var i = 0; i < staticArray.length; i++) {\n var handler = staticArray[i];\n eventScope.detach(handler.element, handler.event, handler.callback, handler.capture);\n eventScope.detach(handler.element, handler.event, handler.callback, undefined);\n eventScope.detach(handler.element, handler.event, handler.callback, false);\n eventScope.detach(handler.element, handler.event, handler.callback, true);\n }\n\n handlers.splice(0, handlers.length);\n },\n extend: function extend() {\n return createScope(this.event, this.eventRemove);\n }\n };\n return eventScope;\n}\n\nmodule.exports = createScope;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* eslint-env browser */\nmodule.exports = (typeof self === \"undefined\" ? \"undefined\" : _typeof(self)) == 'object' ? self.FormData : window.FormData;","/* globals __webpack_amd_options__ */\r\nmodule.exports = __webpack_amd_options__;\r\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar punycode = require('punycode');\n\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n} // Reference: RFC 3986, RFC 1808, RFC 2396\n// define these here so at least they only have to be\n// compiled once on the first module load.\n\n\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n // Special case for a simple path URL\nsimplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n // RFC 2396: characters reserved for delimiting URLs.\n// We actually just auto-escape these.\ndelims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n // RFC 2396: characters not allowed for various reasons.\nunwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\nautoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n// Note that any invalid chars are also handled, but these\n// are the ones that are *expected* to be seen, so we fast-path\n// them.\nnonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\nunsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n},\n // protocols that never have a hostname.\nhostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n},\n // protocols that always contain a // bit.\nslashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n},\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n var u = new Url();\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function (url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + _typeof(url));\n } // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n\n\n var queryIndex = url.indexOf('?'),\n splitter = queryIndex !== -1 && queryIndex < url.indexOf('#') ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n var rest = url; // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n\n if (simplePath[2]) {\n this.search = simplePath[2];\n\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n } // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n\n\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] && (slashes || proto && !slashedProtocol[proto])) {\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec;\n } // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n\n\n var auth, atSign;\n\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n } // Now we have a portion which is definitely the auth.\n // Pull that off.\n\n\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n } // the host is the remaining to the left of the first non-host char\n\n\n hostEnd = -1;\n\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec;\n } // if we still have not hit it, then the entire thing is a host.\n\n\n if (hostEnd === -1) hostEnd = rest.length;\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd); // pull out port.\n\n this.parseHost(); // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n\n this.hostname = this.hostname || ''; // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n\n var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']'; // validate a little.\n\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n } // we test again with ASCII char only\n\n\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host; // strip [ and ] from the hostname\n // the host field still retains them, though\n\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n } // now rest is set to the post-host stuff.\n // chop off any delim chars.\n\n\n if (!unsafeProtocol[lowerProto]) {\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1) continue;\n var esc = encodeURIComponent(ae);\n\n if (esc === ae) {\n esc = escape(ae);\n }\n\n rest = rest.split(ae).join(esc);\n }\n } // chop off from the tail first.\n\n\n var hash = rest.indexOf('#');\n\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n\n var qm = rest.indexOf('?');\n\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n\n if (rest) this.pathname = rest;\n\n if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) {\n this.pathname = '/';\n } //to support http.request\n\n\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n } // finally, reconstruct the href based on what has been validated.\n\n\n this.href = this.format();\n return this;\n}; // format a parsed object into a url string\n\n\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function () {\n var auth = this.auth || '';\n\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']');\n\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query && util.isObject(this.query) && Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || query && '?' + query || '';\n if (protocol && protocol.substr(-1) !== ':') protocol += ':'; // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n\n if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n pathname = pathname.replace(/[?#]/g, function (match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function (relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function (relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n } // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n\n\n result.hash = relative.hash; // if the relative url is empty, then there's nothing left to do here.\n\n if (relative.href === '') {\n result.href = result.format();\n return result;\n } // hrefs like //foo/bar always cut to the protocol.\n\n\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol') result[rkey] = relative[rkey];\n } //urlParse appends trailing / to urls like http://www.example.com\n\n\n if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n\n while (relPath.length && !(relative.host = relPath.shift())) {\n ;\n }\n\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port; // to support http.request\n\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = result.pathname && result.pathname.charAt(0) === '/',\n isRelAbs = relative.host || relative.pathname && relative.pathname.charAt(0) === '/',\n mustEndAbs = isRelAbs || isSourceAbs || result.host && relative.pathname,\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol]; // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;else srcPath.unshift(result.host);\n }\n\n result.host = '';\n\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;else relPath.unshift(relative.host);\n }\n\n relative.host = null;\n }\n\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = relative.host || relative.host === '' ? relative.host : result.host;\n result.hostname = relative.hostname || relative.hostname === '' ? relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath; // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift(); //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n result.search = relative.search;\n result.query = relative.query; //to support http.request\n\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null; //to support http.request\n\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n\n result.href = result.format();\n return result;\n } // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n\n\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === ''; // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n\n var up = 0;\n\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n } // if the path is allowed to go above the root, restore leading ..s\n\n\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && srcPath.join('/').substr(-1) !== '/') {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' || srcPath[0] && srcPath[0].charAt(0) === '/'; // put the host back\n\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' : srcPath.length ? srcPath.shift() : ''; //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n\n var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false;\n\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || result.host && srcPath.length;\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n } //to support request.http\n\n\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : '');\n }\n\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function () {\n var host = this.host;\n var port = portPattern.exec(host);\n\n if (port) {\n port = port[0];\n\n if (port !== ':') {\n this.port = port.substr(1);\n }\n\n host = host.substr(0, host.length - port.length);\n }\n\n if (host) this.hostname = host;\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a transform stream is a readable/writable stream where you do\n// something with the data. Sometimes it's called a \"filter\",\n// but that's not a great name for it, since that implies a thing where\n// some bits pass through, and others are simply ignored. (That would\n// be a valid example of a transform, of course.)\n//\n// While the output is causally related to the input, it's not a\n// necessarily symmetric or synchronous transformation. For example,\n// a zlib stream might take multiple plain-text writes(), and then\n// emit a single compressed chunk some time in the future.\n//\n// Here's how this works:\n//\n// The Transform stream has all the aspects of the readable and writable\n// stream classes. When you write(chunk), that calls _write(chunk,cb)\n// internally, and returns false if there's a lot of pending writes\n// buffered up. When you call read(), that calls _read(n) until\n// there's enough pending readable data buffered up.\n//\n// In a transform stream, the written data is placed in a buffer. When\n// _read(n) is called, it transforms the queued up data, calling the\n// buffered _write cb's as it consumes chunks. If consuming a single\n// written chunk would result in multiple output chunks, then the first\n// outputted bit calls the readcb, and subsequent chunks just go into\n// the read buffer, and will cause it to emit 'readable' if necessary.\n//\n// This way, back-pressure is actually determined by the reading side,\n// since _read has to be called to start processing a new chunk. However,\n// a pathological inflate type of transform can cause excessive buffering\n// here. For example, imagine a stream where every byte of input is\n// interpreted as an integer from 0-255, and then results in that many\n// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in\n// 1kb of data being output. In this case, you could write a very small\n// amount of input, and end up with a very large amount of output. In\n// such a pathological inflating mechanism, there'd be no way to tell\n// the system to stop doing the transform. A single 4MB write could\n// cause the system to run out of memory.\n//\n// However, even in such a pathological case, only a single written chunk\n// would be consumed, and then the rest would wait (un-transformed) until\n// the results of the previous transformed chunk were consumed.\n'use strict';\n\nmodule.exports = Transform;\n\nvar Duplex = require('./_stream_duplex');\n/**/\n\n\nvar util = require('core-util-is');\n\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(Transform, Duplex);\n\nfunction afterTransform(er, data) {\n var ts = this._transformState;\n ts.transforming = false;\n var cb = ts.writecb;\n\n if (!cb) {\n return this.emit('error', new Error('write callback called multiple times'));\n }\n\n ts.writechunk = null;\n ts.writecb = null;\n if (data != null) // single equals check for both `null` and `undefined`\n this.push(data);\n cb(er);\n var rs = this._readableState;\n rs.reading = false;\n\n if (rs.needReadable || rs.length < rs.highWaterMark) {\n this._read(rs.highWaterMark);\n }\n}\n\nfunction Transform(options) {\n if (!(this instanceof Transform)) return new Transform(options);\n Duplex.call(this, options);\n this._transformState = {\n afterTransform: afterTransform.bind(this),\n needTransform: false,\n transforming: false,\n writecb: null,\n writechunk: null,\n writeencoding: null\n }; // start out asking for a readable event once data is transformed.\n\n this._readableState.needReadable = true; // we have implemented the _read method, and done the other things\n // that Readable wants before the first _read call, so unset the\n // sync guard flag.\n\n this._readableState.sync = false;\n\n if (options) {\n if (typeof options.transform === 'function') this._transform = options.transform;\n if (typeof options.flush === 'function') this._flush = options.flush;\n } // When the writable side finishes, then flush out anything remaining.\n\n\n this.on('prefinish', prefinish);\n}\n\nfunction prefinish() {\n var _this = this;\n\n if (typeof this._flush === 'function') {\n this._flush(function (er, data) {\n done(_this, er, data);\n });\n } else {\n done(this, null, null);\n }\n}\n\nTransform.prototype.push = function (chunk, encoding) {\n this._transformState.needTransform = false;\n return Duplex.prototype.push.call(this, chunk, encoding);\n}; // This is the part where you do stuff!\n// override this function in implementation classes.\n// 'chunk' is an input chunk.\n//\n// Call `push(newChunk)` to pass along transformed output\n// to the readable side. You may call 'push' zero or more times.\n//\n// Call `cb(err)` when you are done with this chunk. If you pass\n// an error, then that'll put the hurt on the whole operation. If you\n// never call cb(), then you'll never get another chunk.\n\n\nTransform.prototype._transform = function (chunk, encoding, cb) {\n throw new Error('_transform() is not implemented');\n};\n\nTransform.prototype._write = function (chunk, encoding, cb) {\n var ts = this._transformState;\n ts.writecb = cb;\n ts.writechunk = chunk;\n ts.writeencoding = encoding;\n\n if (!ts.transforming) {\n var rs = this._readableState;\n if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);\n }\n}; // Doesn't matter what the args are here.\n// _transform does all the work.\n// That we got here means that the readable side wants more data.\n\n\nTransform.prototype._read = function (n) {\n var ts = this._transformState;\n\n if (ts.writechunk !== null && ts.writecb && !ts.transforming) {\n ts.transforming = true;\n\n this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);\n } else {\n // mark that we need a transform, so that any data that comes in\n // will get processed, now that we've asked for it.\n ts.needTransform = true;\n }\n};\n\nTransform.prototype._destroy = function (err, cb) {\n var _this2 = this;\n\n Duplex.prototype._destroy.call(this, err, function (err2) {\n cb(err2);\n\n _this2.emit('close');\n });\n};\n\nfunction done(stream, er, data) {\n if (er) return stream.emit('error', er);\n if (data != null) // single equals check for both `null` and `undefined`\n stream.push(data); // if there's nothing in the write buffer, then that means\n // that nothing more will ever be provided\n\n if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');\n if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');\n return stream.push(null);\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n/**/\n\nvar Buffer = require('safe-buffer').Buffer;\n/**/\n\n\nvar isEncoding = Buffer.isEncoding || function (encoding) {\n encoding = '' + encoding;\n\n switch (encoding && encoding.toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n case 'raw':\n return true;\n\n default:\n return false;\n }\n};\n\nfunction _normalizeEncoding(enc) {\n if (!enc) return 'utf8';\n var retried;\n\n while (true) {\n switch (enc) {\n case 'utf8':\n case 'utf-8':\n return 'utf8';\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return 'utf16le';\n\n case 'latin1':\n case 'binary':\n return 'latin1';\n\n case 'base64':\n case 'ascii':\n case 'hex':\n return enc;\n\n default:\n if (retried) return; // undefined\n\n enc = ('' + enc).toLowerCase();\n retried = true;\n }\n }\n}\n\n; // Do not cache `Buffer.isEncoding` when checking encoding names as some\n// modules monkey-patch it to support additional encodings\n\nfunction normalizeEncoding(enc) {\n var nenc = _normalizeEncoding(enc);\n\n if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);\n return nenc || enc;\n} // StringDecoder provides an interface for efficiently splitting a series of\n// buffers into a series of JS strings without breaking apart multi-byte\n// characters.\n\n\nexports.StringDecoder = StringDecoder;\n\nfunction StringDecoder(encoding) {\n this.encoding = normalizeEncoding(encoding);\n var nb;\n\n switch (this.encoding) {\n case 'utf16le':\n this.text = utf16Text;\n this.end = utf16End;\n nb = 4;\n break;\n\n case 'utf8':\n this.fillLast = utf8FillLast;\n nb = 4;\n break;\n\n case 'base64':\n this.text = base64Text;\n this.end = base64End;\n nb = 3;\n break;\n\n default:\n this.write = simpleWrite;\n this.end = simpleEnd;\n return;\n }\n\n this.lastNeed = 0;\n this.lastTotal = 0;\n this.lastChar = Buffer.allocUnsafe(nb);\n}\n\nStringDecoder.prototype.write = function (buf) {\n if (buf.length === 0) return '';\n var r;\n var i;\n\n if (this.lastNeed) {\n r = this.fillLast(buf);\n if (r === undefined) return '';\n i = this.lastNeed;\n this.lastNeed = 0;\n } else {\n i = 0;\n }\n\n if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);\n return r || '';\n};\n\nStringDecoder.prototype.end = utf8End; // Returns only complete characters in a Buffer\n\nStringDecoder.prototype.text = utf8Text; // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer\n\nStringDecoder.prototype.fillLast = function (buf) {\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n\n buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);\n this.lastNeed -= buf.length;\n}; // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a\n// continuation byte. If an invalid byte is detected, -2 is returned.\n\n\nfunction utf8CheckByte(_byte) {\n if (_byte <= 0x7F) return 0;else if (_byte >> 5 === 0x06) return 2;else if (_byte >> 4 === 0x0E) return 3;else if (_byte >> 3 === 0x1E) return 4;\n return _byte >> 6 === 0x02 ? -1 : -2;\n} // Checks at most 3 bytes at the end of a Buffer in order to detect an\n// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)\n// needed to complete the UTF-8 character (if applicable) are returned.\n\n\nfunction utf8CheckIncomplete(self, buf, i) {\n var j = buf.length - 1;\n if (j < i) return 0;\n var nb = utf8CheckByte(buf[j]);\n\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 1;\n return nb;\n }\n\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n\n if (nb >= 0) {\n if (nb > 0) self.lastNeed = nb - 2;\n return nb;\n }\n\n if (--j < i || nb === -2) return 0;\n nb = utf8CheckByte(buf[j]);\n\n if (nb >= 0) {\n if (nb > 0) {\n if (nb === 2) nb = 0;else self.lastNeed = nb - 3;\n }\n\n return nb;\n }\n\n return 0;\n} // Validates as many continuation bytes for a multi-byte UTF-8 character as\n// needed or are available. If we see a non-continuation byte where we expect\n// one, we \"replace\" the validated continuation bytes we've seen so far with\n// a single UTF-8 replacement character ('\\ufffd'), to match v8's UTF-8 decoding\n// behavior. The continuation byte check is included three times in the case\n// where all of the continuation bytes for a character exist in the same buffer.\n// It is also done this way as a slight performance increase instead of using a\n// loop.\n\n\nfunction utf8CheckExtraBytes(self, buf, p) {\n if ((buf[0] & 0xC0) !== 0x80) {\n self.lastNeed = 0;\n return \"\\uFFFD\";\n }\n\n if (self.lastNeed > 1 && buf.length > 1) {\n if ((buf[1] & 0xC0) !== 0x80) {\n self.lastNeed = 1;\n return \"\\uFFFD\";\n }\n\n if (self.lastNeed > 2 && buf.length > 2) {\n if ((buf[2] & 0xC0) !== 0x80) {\n self.lastNeed = 2;\n return \"\\uFFFD\";\n }\n }\n }\n} // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.\n\n\nfunction utf8FillLast(buf) {\n var p = this.lastTotal - this.lastNeed;\n var r = utf8CheckExtraBytes(this, buf, p);\n if (r !== undefined) return r;\n\n if (this.lastNeed <= buf.length) {\n buf.copy(this.lastChar, p, 0, this.lastNeed);\n return this.lastChar.toString(this.encoding, 0, this.lastTotal);\n }\n\n buf.copy(this.lastChar, p, 0, buf.length);\n this.lastNeed -= buf.length;\n} // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a\n// partial character, the character's bytes are buffered until the required\n// number of bytes are available.\n\n\nfunction utf8Text(buf, i) {\n var total = utf8CheckIncomplete(this, buf, i);\n if (!this.lastNeed) return buf.toString('utf8', i);\n this.lastTotal = total;\n var end = buf.length - (total - this.lastNeed);\n buf.copy(this.lastChar, 0, end);\n return buf.toString('utf8', i, end);\n} // For UTF-8, a replacement character is added when ending on a partial\n// character.\n\n\nfunction utf8End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + \"\\uFFFD\";\n return r;\n} // UTF-16LE typically needs two bytes per character, but even if we have an even\n// number of bytes available, we need to check if we end on a leading/high\n// surrogate. In that case, we need to wait for the next two bytes in order to\n// decode the last character properly.\n\n\nfunction utf16Text(buf, i) {\n if ((buf.length - i) % 2 === 0) {\n var r = buf.toString('utf16le', i);\n\n if (r) {\n var c = r.charCodeAt(r.length - 1);\n\n if (c >= 0xD800 && c <= 0xDBFF) {\n this.lastNeed = 2;\n this.lastTotal = 4;\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n return r.slice(0, -1);\n }\n }\n\n return r;\n }\n\n this.lastNeed = 1;\n this.lastTotal = 2;\n this.lastChar[0] = buf[buf.length - 1];\n return buf.toString('utf16le', i, buf.length - 1);\n} // For UTF-16LE we do not explicitly append special replacement characters if we\n// end on a partial character, we simply let v8 handle that.\n\n\nfunction utf16End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n\n if (this.lastNeed) {\n var end = this.lastTotal - this.lastNeed;\n return r + this.lastChar.toString('utf16le', 0, end);\n }\n\n return r;\n}\n\nfunction base64Text(buf, i) {\n var n = (buf.length - i) % 3;\n if (n === 0) return buf.toString('base64', i);\n this.lastNeed = 3 - n;\n this.lastTotal = 3;\n\n if (n === 1) {\n this.lastChar[0] = buf[buf.length - 1];\n } else {\n this.lastChar[0] = buf[buf.length - 2];\n this.lastChar[1] = buf[buf.length - 1];\n }\n\n return buf.toString('base64', i, buf.length - n);\n}\n\nfunction base64End(buf) {\n var r = buf && buf.length ? this.write(buf) : '';\n if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);\n return r;\n} // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)\n\n\nfunction simpleWrite(buf) {\n return buf.toString(this.encoding);\n}\n\nfunction simpleEnd(buf) {\n return buf && buf.length ? this.write(buf) : '';\n}","var scope = typeof global !== \"undefined\" && global || typeof self !== \"undefined\" && self || window;\nvar apply = Function.prototype.apply; // DOM APIs, for completeness\n\nexports.setTimeout = function () {\n return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);\n};\n\nexports.setInterval = function () {\n return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);\n};\n\nexports.clearTimeout = exports.clearInterval = function (timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\n\nTimeout.prototype.unref = Timeout.prototype.ref = function () {};\n\nTimeout.prototype.close = function () {\n this._clearFn.call(scope, this._id);\n}; // Does not start the time, just sets up the members needed.\n\n\nexports.enroll = function (item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function (item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function (item) {\n clearTimeout(item._idleTimeoutId);\n var msecs = item._idleTimeout;\n\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout) item._onTimeout();\n }, msecs);\n }\n}; // setimmediate attaches itself to the global object\n\n\nrequire(\"setimmediate\"); // On some exotic environments, it's not clear which object `setimmediate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\n\n\nexports.setImmediate = typeof self !== \"undefined\" && self.setImmediate || typeof global !== \"undefined\" && global.setImmediate || this && this.setImmediate;\nexports.clearImmediate = typeof self !== \"undefined\" && self.clearImmediate || typeof global !== \"undefined\" && global.clearImmediate || this && this.clearImmediate;","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// A bit simpler than readable streams.\n// Implement an async ._write(chunk, encoding, cb), and it'll handle all\n// the drain event emission and buffering.\n'use strict';\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\n\nmodule.exports = Writable;\n/* */\n\nfunction WriteReq(chunk, encoding, cb) {\n this.chunk = chunk;\n this.encoding = encoding;\n this.callback = cb;\n this.next = null;\n} // It seems a linked list but it is not\n// there will be only 2 of these for each stream\n\n\nfunction CorkedRequest(state) {\n var _this = this;\n\n this.next = null;\n this.entry = null;\n\n this.finish = function () {\n onCorkedFinish(_this, state);\n };\n}\n/* */\n\n/**/\n\n\nvar asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;\n/**/\n\n/**/\n\nvar Duplex;\n/**/\n\nWritable.WritableState = WritableState;\n/**/\n\nvar util = require('core-util-is');\n\nutil.inherits = require('inherits');\n/**/\n\n/**/\n\nvar internalUtil = {\n deprecate: require('util-deprecate')\n};\n/**/\n\n/**/\n\nvar Stream = require('./internal/streams/stream');\n/**/\n\n/**/\n\n\nvar Buffer = require('safe-buffer').Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n/**/\n\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nutil.inherits(Writable, Stream);\n\nfunction nop() {}\n\nfunction WritableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {}; // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n\n var isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream\n // contains buffers or objects.\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false\n // Note: 0 is a valid value, means that we always return false if\n // the entire buffer is not flushed immediately on write()\n\n var hwm = options.highWaterMark;\n var writableHwm = options.writableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm; // cast to ints.\n\n this.highWaterMark = Math.floor(this.highWaterMark); // if _final has been called\n\n this.finalCalled = false; // drain event flag.\n\n this.needDrain = false; // at the start of calling end()\n\n this.ending = false; // when end() has been called, and returned\n\n this.ended = false; // when 'finish' is emitted\n\n this.finished = false; // has it been destroyed\n\n this.destroyed = false; // should we decode strings into buffers before passing to _write?\n // this is here so that some node-core streams can optimize string\n // handling at a lower level.\n\n var noDecode = options.decodeStrings === false;\n this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement\n // of how much we're waiting to get pushed to some underlying\n // socket or file.\n\n this.length = 0; // a flag to see when we're in the middle of a write.\n\n this.writing = false; // when true all writes will be buffered until .uncork() call\n\n this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately,\n // or on a later tick. We set this to true at first, because any\n // actions that shouldn't happen until \"later\" should generally also\n // not happen before the first write call.\n\n this.sync = true; // a flag to know if we're processing previously buffered items, which\n // may call the _write() callback in the same tick, so that we don't\n // end up in an overlapped onwrite situation.\n\n this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)\n\n this.onwrite = function (er) {\n onwrite(stream, er);\n }; // the callback that the user supplies to write(chunk,encoding,cb)\n\n\n this.writecb = null; // the amount that is being written when _write is called.\n\n this.writelen = 0;\n this.bufferedRequest = null;\n this.lastBufferedRequest = null; // number of pending user-supplied write callbacks\n // this must be 0 before 'finish' can be emitted\n\n this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs\n // This is relevant for synchronous Transform streams\n\n this.prefinished = false; // True if the error was already emitted and should not be thrown again\n\n this.errorEmitted = false; // count buffered requests\n\n this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always\n // one allocated and free to use, and we maintain at most two\n\n this.corkedRequestsFree = new CorkedRequest(this);\n}\n\nWritableState.prototype.getBuffer = function getBuffer() {\n var current = this.bufferedRequest;\n var out = [];\n\n while (current) {\n out.push(current);\n current = current.next;\n }\n\n return out;\n};\n\n(function () {\n try {\n Object.defineProperty(WritableState.prototype, 'buffer', {\n get: internalUtil.deprecate(function () {\n return this.getBuffer();\n }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')\n });\n } catch (_) {}\n})(); // Test _writableState for inheritance to account for Duplex streams,\n// whose prototype chain only points to Readable.\n\n\nvar realHasInstance;\n\nif (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {\n realHasInstance = Function.prototype[Symbol.hasInstance];\n Object.defineProperty(Writable, Symbol.hasInstance, {\n value: function value(object) {\n if (realHasInstance.call(this, object)) return true;\n if (this !== Writable) return false;\n return object && object._writableState instanceof WritableState;\n }\n });\n} else {\n realHasInstance = function realHasInstance(object) {\n return object instanceof this;\n };\n}\n\nfunction Writable(options) {\n Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too.\n // `realHasInstance` is necessary because using plain `instanceof`\n // would return false, as no `_writableState` property is attached.\n // Trying to use the custom `instanceof` for Writable here will also break the\n // Node.js LazyTransform implementation, which has a non-trivial getter for\n // `_writableState` that would lead to infinite recursion.\n\n if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {\n return new Writable(options);\n }\n\n this._writableState = new WritableState(options, this); // legacy.\n\n this.writable = true;\n\n if (options) {\n if (typeof options.write === 'function') this._write = options.write;\n if (typeof options.writev === 'function') this._writev = options.writev;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n if (typeof options[\"final\"] === 'function') this._final = options[\"final\"];\n }\n\n Stream.call(this);\n} // Otherwise people can pipe Writable streams, which is just wrong.\n\n\nWritable.prototype.pipe = function () {\n this.emit('error', new Error('Cannot pipe, not readable'));\n};\n\nfunction writeAfterEnd(stream, cb) {\n var er = new Error('write after end'); // TODO: defer error events consistently everywhere, not just the cb\n\n stream.emit('error', er);\n pna.nextTick(cb, er);\n} // Checks that a user-supplied chunk is valid, especially for the particular\n// mode the stream is in. Currently this means that `null` is never accepted\n// and undefined/non-string values are only allowed in object mode.\n\n\nfunction validChunk(stream, state, chunk, cb) {\n var valid = true;\n var er = false;\n\n if (chunk === null) {\n er = new TypeError('May not write null values to stream');\n } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n\n if (er) {\n stream.emit('error', er);\n pna.nextTick(cb, er);\n valid = false;\n }\n\n return valid;\n}\n\nWritable.prototype.write = function (chunk, encoding, cb) {\n var state = this._writableState;\n var ret = false;\n\n var isBuf = !state.objectMode && _isUint8Array(chunk);\n\n if (isBuf && !Buffer.isBuffer(chunk)) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;\n if (typeof cb !== 'function') cb = nop;\n if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {\n state.pendingcb++;\n ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);\n }\n return ret;\n};\n\nWritable.prototype.cork = function () {\n var state = this._writableState;\n state.corked++;\n};\n\nWritable.prototype.uncork = function () {\n var state = this._writableState;\n\n if (state.corked) {\n state.corked--;\n if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);\n }\n};\n\nWritable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {\n // node::ParseEncoding() requires lower case.\n if (typeof encoding === 'string') encoding = encoding.toLowerCase();\n if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);\n this._writableState.defaultEncoding = encoding;\n return this;\n};\n\nfunction decodeChunk(state, chunk, encoding) {\n if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {\n chunk = Buffer.from(chunk, encoding);\n }\n\n return chunk;\n}\n\nObject.defineProperty(Writable.prototype, 'writableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._writableState.highWaterMark;\n }\n}); // if we're already writing something, then just put this\n// in the queue, and wait our turn. Otherwise, call _write\n// If we return false, then we need a drain event, so set that flag.\n\nfunction writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {\n if (!isBuf) {\n var newChunk = decodeChunk(state, chunk, encoding);\n\n if (chunk !== newChunk) {\n isBuf = true;\n encoding = 'buffer';\n chunk = newChunk;\n }\n }\n\n var len = state.objectMode ? 1 : chunk.length;\n state.length += len;\n var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.\n\n if (!ret) state.needDrain = true;\n\n if (state.writing || state.corked) {\n var last = state.lastBufferedRequest;\n state.lastBufferedRequest = {\n chunk: chunk,\n encoding: encoding,\n isBuf: isBuf,\n callback: cb,\n next: null\n };\n\n if (last) {\n last.next = state.lastBufferedRequest;\n } else {\n state.bufferedRequest = state.lastBufferedRequest;\n }\n\n state.bufferedRequestCount += 1;\n } else {\n doWrite(stream, state, false, len, chunk, encoding, cb);\n }\n\n return ret;\n}\n\nfunction doWrite(stream, state, writev, len, chunk, encoding, cb) {\n state.writelen = len;\n state.writecb = cb;\n state.writing = true;\n state.sync = true;\n if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);\n state.sync = false;\n}\n\nfunction onwriteError(stream, state, sync, er, cb) {\n --state.pendingcb;\n\n if (sync) {\n // defer the callback if we are being called synchronously\n // to avoid piling up things on the stack\n pna.nextTick(cb, er); // this can emit finish, and it will always happen\n // after error\n\n pna.nextTick(finishMaybe, stream, state);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er);\n } else {\n // the caller expect this to happen before if\n // it is async\n cb(er);\n stream._writableState.errorEmitted = true;\n stream.emit('error', er); // this can emit finish, but finish must\n // always follow error\n\n finishMaybe(stream, state);\n }\n}\n\nfunction onwriteStateUpdate(state) {\n state.writing = false;\n state.writecb = null;\n state.length -= state.writelen;\n state.writelen = 0;\n}\n\nfunction onwrite(stream, er) {\n var state = stream._writableState;\n var sync = state.sync;\n var cb = state.writecb;\n onwriteStateUpdate(state);\n if (er) onwriteError(stream, state, sync, er, cb);else {\n // Check if we're actually ready to finish, but don't emit yet\n var finished = needFinish(state);\n\n if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {\n clearBuffer(stream, state);\n }\n\n if (sync) {\n /**/\n asyncWrite(afterWrite, stream, state, finished, cb);\n /**/\n } else {\n afterWrite(stream, state, finished, cb);\n }\n }\n}\n\nfunction afterWrite(stream, state, finished, cb) {\n if (!finished) onwriteDrain(stream, state);\n state.pendingcb--;\n cb();\n finishMaybe(stream, state);\n} // Must force callback to be called on nextTick, so that we don't\n// emit 'drain' before the write() consumer gets the 'false' return\n// value, and has a chance to attach a 'drain' listener.\n\n\nfunction onwriteDrain(stream, state) {\n if (state.length === 0 && state.needDrain) {\n state.needDrain = false;\n stream.emit('drain');\n }\n} // if there's something in the buffer waiting, then process it\n\n\nfunction clearBuffer(stream, state) {\n state.bufferProcessing = true;\n var entry = state.bufferedRequest;\n\n if (stream._writev && entry && entry.next) {\n // Fast case, write everything using _writev()\n var l = state.bufferedRequestCount;\n var buffer = new Array(l);\n var holder = state.corkedRequestsFree;\n holder.entry = entry;\n var count = 0;\n var allBuffers = true;\n\n while (entry) {\n buffer[count] = entry;\n if (!entry.isBuf) allBuffers = false;\n entry = entry.next;\n count += 1;\n }\n\n buffer.allBuffers = allBuffers;\n doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time\n // as the hot path ends with doWrite\n\n state.pendingcb++;\n state.lastBufferedRequest = null;\n\n if (holder.next) {\n state.corkedRequestsFree = holder.next;\n holder.next = null;\n } else {\n state.corkedRequestsFree = new CorkedRequest(state);\n }\n\n state.bufferedRequestCount = 0;\n } else {\n // Slow case, write chunks one-by-one\n while (entry) {\n var chunk = entry.chunk;\n var encoding = entry.encoding;\n var cb = entry.callback;\n var len = state.objectMode ? 1 : chunk.length;\n doWrite(stream, state, false, len, chunk, encoding, cb);\n entry = entry.next;\n state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then\n // it means that we need to wait until it does.\n // also, that means that the chunk and cb are currently\n // being processed, so move the buffer counter past them.\n\n if (state.writing) {\n break;\n }\n }\n\n if (entry === null) state.lastBufferedRequest = null;\n }\n\n state.bufferedRequest = entry;\n state.bufferProcessing = false;\n}\n\nWritable.prototype._write = function (chunk, encoding, cb) {\n cb(new Error('_write() is not implemented'));\n};\n\nWritable.prototype._writev = null;\n\nWritable.prototype.end = function (chunk, encoding, cb) {\n var state = this._writableState;\n\n if (typeof chunk === 'function') {\n cb = chunk;\n chunk = null;\n encoding = null;\n } else if (typeof encoding === 'function') {\n cb = encoding;\n encoding = null;\n }\n\n if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks\n\n if (state.corked) {\n state.corked = 1;\n this.uncork();\n } // ignore unnecessary end() calls.\n\n\n if (!state.ending && !state.finished) endWritable(this, state, cb);\n};\n\nfunction needFinish(state) {\n return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;\n}\n\nfunction callFinal(stream, state) {\n stream._final(function (err) {\n state.pendingcb--;\n\n if (err) {\n stream.emit('error', err);\n }\n\n state.prefinished = true;\n stream.emit('prefinish');\n finishMaybe(stream, state);\n });\n}\n\nfunction prefinish(stream, state) {\n if (!state.prefinished && !state.finalCalled) {\n if (typeof stream._final === 'function') {\n state.pendingcb++;\n state.finalCalled = true;\n pna.nextTick(callFinal, stream, state);\n } else {\n state.prefinished = true;\n stream.emit('prefinish');\n }\n }\n}\n\nfunction finishMaybe(stream, state) {\n var need = needFinish(state);\n\n if (need) {\n prefinish(stream, state);\n\n if (state.pendingcb === 0) {\n state.finished = true;\n stream.emit('finish');\n }\n }\n\n return need;\n}\n\nfunction endWritable(stream, state, cb) {\n state.ending = true;\n finishMaybe(stream, state);\n\n if (cb) {\n if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);\n }\n\n state.ended = true;\n stream.writable = false;\n}\n\nfunction onCorkedFinish(corkReq, state, err) {\n var entry = corkReq.entry;\n corkReq.entry = null;\n\n while (entry) {\n var cb = entry.callback;\n state.pendingcb--;\n cb(err);\n entry = entry.next;\n }\n\n if (state.corkedRequestsFree) {\n state.corkedRequestsFree.next = corkReq;\n } else {\n state.corkedRequestsFree = corkReq;\n }\n}\n\nObject.defineProperty(Writable.prototype, 'destroyed', {\n get: function get() {\n if (this._writableState === undefined) {\n return false;\n }\n\n return this._writableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._writableState) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._writableState.destroyed = value;\n }\n});\nWritable.prototype.destroy = destroyImpl.destroy;\nWritable.prototype._undestroy = destroyImpl.undestroy;\n\nWritable.prototype._destroy = function (err, cb) {\n this.end();\n cb(err);\n};","'use strict';\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n// undocumented cb() API, needed for core, not for public API\n\n\nfunction destroy(err, cb) {\n var _this = this;\n\n var readableDestroyed = this._readableState && this._readableState.destroyed;\n var writableDestroyed = this._writableState && this._writableState.destroyed;\n\n if (readableDestroyed || writableDestroyed) {\n if (cb) {\n cb(err);\n } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {\n pna.nextTick(emitErrorNT, this, err);\n }\n\n return this;\n } // we set destroyed to true before firing error callbacks in order\n // to make it re-entrance safe in case destroy() is called within callbacks\n\n\n if (this._readableState) {\n this._readableState.destroyed = true;\n } // if this is a duplex stream mark the writable part as destroyed as well\n\n\n if (this._writableState) {\n this._writableState.destroyed = true;\n }\n\n this._destroy(err || null, function (err) {\n if (!cb && err) {\n pna.nextTick(emitErrorNT, _this, err);\n\n if (_this._writableState) {\n _this._writableState.errorEmitted = true;\n }\n } else if (cb) {\n cb(err);\n }\n });\n\n return this;\n}\n\nfunction undestroy() {\n if (this._readableState) {\n this._readableState.destroyed = false;\n this._readableState.reading = false;\n this._readableState.ended = false;\n this._readableState.endEmitted = false;\n }\n\n if (this._writableState) {\n this._writableState.destroyed = false;\n this._writableState.ended = false;\n this._writableState.ending = false;\n this._writableState.finished = false;\n this._writableState.errorEmitted = false;\n }\n}\n\nfunction emitErrorNT(self, err) {\n self.emit('error', err);\n}\n\nmodule.exports = {\n destroy: destroy,\n undestroy: undestroy\n};","module.exports = require('events').EventEmitter;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\nfunction EventEmitter() {\n this._events = this._events || {};\n this._maxListeners = this._maxListeners || undefined;\n}\n\nmodule.exports = EventEmitter; // Backwards-compat with node 0.10.x\n\nEventEmitter.EventEmitter = EventEmitter;\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\n\nEventEmitter.defaultMaxListeners = 10; // Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\n\nEventEmitter.prototype.setMaxListeners = function (n) {\n if (!isNumber(n) || n < 0 || isNaN(n)) throw TypeError('n must be a positive number');\n this._maxListeners = n;\n return this;\n};\n\nEventEmitter.prototype.emit = function (type) {\n var er, handler, len, args, i, listeners;\n if (!this._events) this._events = {}; // If there is no 'error' event listener then throw.\n\n if (type === 'error') {\n if (!this._events.error || isObject(this._events.error) && !this._events.error.length) {\n er = arguments[1];\n\n if (er instanceof Error) {\n throw er; // Unhandled 'error' event\n } else {\n // At least give some kind of context to the user\n var err = new Error('Uncaught, unspecified \"error\" event. (' + er + ')');\n err.context = er;\n throw err;\n }\n }\n }\n\n handler = this._events[type];\n if (isUndefined(handler)) return false;\n\n if (isFunction(handler)) {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n\n case 2:\n handler.call(this, arguments[1]);\n break;\n\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n\n default:\n args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n } else if (isObject(handler)) {\n args = Array.prototype.slice.call(arguments, 1);\n listeners = handler.slice();\n len = listeners.length;\n\n for (i = 0; i < len; i++) {\n listeners[i].apply(this, args);\n }\n }\n\n return true;\n};\n\nEventEmitter.prototype.addListener = function (type, listener) {\n var m;\n if (!isFunction(listener)) throw TypeError('listener must be a function');\n if (!this._events) this._events = {}; // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n\n if (this._events.newListener) this.emit('newListener', type, isFunction(listener.listener) ? listener.listener : listener);\n if (!this._events[type]) // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;else if (isObject(this._events[type])) // If we've already got an array, just append.\n this._events[type].push(listener);else // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener]; // Check for listener leak\n\n if (isObject(this._events[type]) && !this._events[type].warned) {\n if (!isUndefined(this._maxListeners)) {\n m = this._maxListeners;\n } else {\n m = EventEmitter.defaultMaxListeners;\n }\n\n if (m && m > 0 && this._events[type].length > m) {\n this._events[type].warned = true;\n console.error('(node) warning: possible EventEmitter memory ' + 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.', this._events[type].length);\n\n if (typeof console.trace === 'function') {\n // not supported in IE 10\n console.trace();\n }\n }\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function (type, listener) {\n if (!isFunction(listener)) throw TypeError('listener must be a function');\n var fired = false;\n\n function g() {\n this.removeListener(type, g);\n\n if (!fired) {\n fired = true;\n listener.apply(this, arguments);\n }\n }\n\n g.listener = listener;\n this.on(type, g);\n return this;\n}; // emits a 'removeListener' event iff the listener was removed\n\n\nEventEmitter.prototype.removeListener = function (type, listener) {\n var list, position, length, i;\n if (!isFunction(listener)) throw TypeError('listener must be a function');\n if (!this._events || !this._events[type]) return this;\n list = this._events[type];\n length = list.length;\n position = -1;\n\n if (list === listener || isFunction(list.listener) && list.listener === listener) {\n delete this._events[type];\n if (this._events.removeListener) this.emit('removeListener', type, listener);\n } else if (isObject(list)) {\n for (i = length; i-- > 0;) {\n if (list[i] === listener || list[i].listener && list[i].listener === listener) {\n position = i;\n break;\n }\n }\n\n if (position < 0) return this;\n\n if (list.length === 1) {\n list.length = 0;\n delete this._events[type];\n } else {\n list.splice(position, 1);\n }\n\n if (this._events.removeListener) this.emit('removeListener', type, listener);\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function (type) {\n var key, listeners;\n if (!this._events) return this; // not listening for removeListener, no need to emit\n\n if (!this._events.removeListener) {\n if (arguments.length === 0) this._events = {};else if (this._events[type]) delete this._events[type];\n return this;\n } // emit removeListener for all listeners on all events\n\n\n if (arguments.length === 0) {\n for (key in this._events) {\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n\n this.removeAllListeners('removeListener');\n this._events = {};\n return this;\n }\n\n listeners = this._events[type];\n\n if (isFunction(listeners)) {\n this.removeListener(type, listeners);\n } else if (listeners) {\n // LIFO order\n while (listeners.length) {\n this.removeListener(type, listeners[listeners.length - 1]);\n }\n }\n\n delete this._events[type];\n return this;\n};\n\nEventEmitter.prototype.listeners = function (type) {\n var ret;\n if (!this._events || !this._events[type]) ret = [];else if (isFunction(this._events[type])) ret = [this._events[type]];else ret = this._events[type].slice();\n return ret;\n};\n\nEventEmitter.prototype.listenerCount = function (type) {\n if (this._events) {\n var evlistener = this._events[type];\n if (isFunction(evlistener)) return 1;else if (evlistener) return evlistener.length;\n }\n\n return 0;\n};\n\nEventEmitter.listenerCount = function (emitter, type) {\n return emitter.listenerCount(type);\n};\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\n\nfunction isObject(arg) {\n return _typeof(arg) === 'object' && arg !== null;\n}\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n/**/\n\nvar pna = require('process-nextick-args');\n/**/\n\n\nmodule.exports = Readable;\n/**/\n\nvar isArray = require('isarray');\n/**/\n\n/**/\n\n\nvar Duplex;\n/**/\n\nReadable.ReadableState = ReadableState;\n/**/\n\nvar EE = require('events').EventEmitter;\n\nvar EElistenerCount = function EElistenerCount(emitter, type) {\n return emitter.listeners(type).length;\n};\n/**/\n\n/**/\n\n\nvar Stream = require('./internal/streams/stream');\n/**/\n\n/**/\n\n\nvar Buffer = require('safe-buffer').Buffer;\n\nvar OurUint8Array = global.Uint8Array || function () {};\n\nfunction _uint8ArrayToBuffer(chunk) {\n return Buffer.from(chunk);\n}\n\nfunction _isUint8Array(obj) {\n return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;\n}\n/**/\n\n/**/\n\n\nvar util = require('core-util-is');\n\nutil.inherits = require('inherits');\n/**/\n\n/**/\n\nvar debugUtil = require('util');\n\nvar debug = void 0;\n\nif (debugUtil && debugUtil.debuglog) {\n debug = debugUtil.debuglog('stream');\n} else {\n debug = function debug() {};\n}\n/**/\n\n\nvar BufferList = require('./internal/streams/BufferList');\n\nvar destroyImpl = require('./internal/streams/destroy');\n\nvar StringDecoder;\nutil.inherits(Readable, Stream);\nvar kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];\n\nfunction prependListener(emitter, event, fn) {\n // Sadly this is not cacheable as some libraries bundle their own\n // event emitter implementation with them.\n if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any\n // userland ones. NEVER DO THIS. This is here only because this code needs\n // to continue to work with older versions of Node.js that do not include\n // the prependListener() method. The goal is to eventually remove this hack.\n\n if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];\n}\n\nfunction ReadableState(options, stream) {\n Duplex = Duplex || require('./_stream_duplex');\n options = options || {}; // Duplex streams are both readable and writable, but share\n // the same options object.\n // However, some cases require setting options to different\n // values for the readable and the writable sides of the duplex stream.\n // These options can be provided separately as readableXXX and writableXXX.\n\n var isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to\n // make all the buffer merging and length checks go away\n\n this.objectMode = !!options.objectMode;\n if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer\n // Note: 0 is a valid value, means \"don't call _read preemptively ever\"\n\n var hwm = options.highWaterMark;\n var readableHwm = options.readableHighWaterMark;\n var defaultHwm = this.objectMode ? 16 : 16 * 1024;\n if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm; // cast to ints.\n\n this.highWaterMark = Math.floor(this.highWaterMark); // A linked list is used to store data chunks instead of an array because the\n // linked list can remove elements from the beginning faster than\n // array.shift()\n\n this.buffer = new BufferList();\n this.length = 0;\n this.pipes = null;\n this.pipesCount = 0;\n this.flowing = null;\n this.ended = false;\n this.endEmitted = false;\n this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted\n // immediately, or on a later tick. We set this to true at first, because\n // any actions that shouldn't happen until \"later\" should generally also\n // not happen before the first read call.\n\n this.sync = true; // whenever we return null, then we set a flag to say\n // that we're awaiting a 'readable' event emission.\n\n this.needReadable = false;\n this.emittedReadable = false;\n this.readableListening = false;\n this.resumeScheduled = false; // has it been destroyed\n\n this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string\n // encoding is 'binary' so we have to make this configurable.\n // Everything else in the universe uses 'utf8', though.\n\n this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s\n\n this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled\n\n this.readingMore = false;\n this.decoder = null;\n this.encoding = null;\n\n if (options.encoding) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this.decoder = new StringDecoder(options.encoding);\n this.encoding = options.encoding;\n }\n}\n\nfunction Readable(options) {\n Duplex = Duplex || require('./_stream_duplex');\n if (!(this instanceof Readable)) return new Readable(options);\n this._readableState = new ReadableState(options, this); // legacy\n\n this.readable = true;\n\n if (options) {\n if (typeof options.read === 'function') this._read = options.read;\n if (typeof options.destroy === 'function') this._destroy = options.destroy;\n }\n\n Stream.call(this);\n}\n\nObject.defineProperty(Readable.prototype, 'destroyed', {\n get: function get() {\n if (this._readableState === undefined) {\n return false;\n }\n\n return this._readableState.destroyed;\n },\n set: function set(value) {\n // we ignore the value if the stream\n // has not been initialized yet\n if (!this._readableState) {\n return;\n } // backward compatibility, the user is explicitly\n // managing destroyed\n\n\n this._readableState.destroyed = value;\n }\n});\nReadable.prototype.destroy = destroyImpl.destroy;\nReadable.prototype._undestroy = destroyImpl.undestroy;\n\nReadable.prototype._destroy = function (err, cb) {\n this.push(null);\n cb(err);\n}; // Manually shove something into the read() buffer.\n// This returns true if the highWaterMark has not been hit yet,\n// similar to how Writable.write() returns true if you should\n// write() some more.\n\n\nReadable.prototype.push = function (chunk, encoding) {\n var state = this._readableState;\n var skipChunkCheck;\n\n if (!state.objectMode) {\n if (typeof chunk === 'string') {\n encoding = encoding || state.defaultEncoding;\n\n if (encoding !== state.encoding) {\n chunk = Buffer.from(chunk, encoding);\n encoding = '';\n }\n\n skipChunkCheck = true;\n }\n } else {\n skipChunkCheck = true;\n }\n\n return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);\n}; // Unshift should *always* be something directly out of read()\n\n\nReadable.prototype.unshift = function (chunk) {\n return readableAddChunk(this, chunk, null, true, false);\n};\n\nfunction readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {\n var state = stream._readableState;\n\n if (chunk === null) {\n state.reading = false;\n onEofChunk(stream, state);\n } else {\n var er;\n if (!skipChunkCheck) er = chunkInvalid(state, chunk);\n\n if (er) {\n stream.emit('error', er);\n } else if (state.objectMode || chunk && chunk.length > 0) {\n if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {\n chunk = _uint8ArrayToBuffer(chunk);\n }\n\n if (addToFront) {\n if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);\n } else if (state.ended) {\n stream.emit('error', new Error('stream.push() after EOF'));\n } else {\n state.reading = false;\n\n if (state.decoder && !encoding) {\n chunk = state.decoder.write(chunk);\n if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);\n } else {\n addChunk(stream, state, chunk, false);\n }\n }\n } else if (!addToFront) {\n state.reading = false;\n }\n }\n\n return needMoreData(state);\n}\n\nfunction addChunk(stream, state, chunk, addToFront) {\n if (state.flowing && state.length === 0 && !state.sync) {\n stream.emit('data', chunk);\n stream.read(0);\n } else {\n // update the buffer info.\n state.length += state.objectMode ? 1 : chunk.length;\n if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);\n if (state.needReadable) emitReadable(stream);\n }\n\n maybeReadMore(stream, state);\n}\n\nfunction chunkInvalid(state, chunk) {\n var er;\n\n if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {\n er = new TypeError('Invalid non-string/buffer chunk');\n }\n\n return er;\n} // if it's past the high water mark, we can push in some more.\n// Also, if we have no data yet, we can stand some\n// more bytes. This is to work around cases where hwm=0,\n// such as the repl. Also, if the push() triggered a\n// readable event, and the user called read(largeNumber) such that\n// needReadable was set, then we ought to push more, so that another\n// 'readable' event will be triggered.\n\n\nfunction needMoreData(state) {\n return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);\n}\n\nReadable.prototype.isPaused = function () {\n return this._readableState.flowing === false;\n}; // backwards compatibility.\n\n\nReadable.prototype.setEncoding = function (enc) {\n if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;\n this._readableState.decoder = new StringDecoder(enc);\n this._readableState.encoding = enc;\n return this;\n}; // Don't raise the hwm > 8MB\n\n\nvar MAX_HWM = 0x800000;\n\nfunction computeNewHighWaterMark(n) {\n if (n >= MAX_HWM) {\n n = MAX_HWM;\n } else {\n // Get the next highest power of 2 to prevent increasing hwm excessively in\n // tiny amounts\n n--;\n n |= n >>> 1;\n n |= n >>> 2;\n n |= n >>> 4;\n n |= n >>> 8;\n n |= n >>> 16;\n n++;\n }\n\n return n;\n} // This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction howMuchToRead(n, state) {\n if (n <= 0 || state.length === 0 && state.ended) return 0;\n if (state.objectMode) return 1;\n\n if (n !== n) {\n // Only flow one buffer at a time\n if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;\n } // If we're asking for more than the current hwm, then raise the hwm.\n\n\n if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);\n if (n <= state.length) return n; // Don't have enough\n\n if (!state.ended) {\n state.needReadable = true;\n return 0;\n }\n\n return state.length;\n} // you can override either this method, or the async _read(n) below.\n\n\nReadable.prototype.read = function (n) {\n debug('read', n);\n n = parseInt(n, 10);\n var state = this._readableState;\n var nOrig = n;\n if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we\n // already have a bunch of data in the buffer, then just trigger\n // the 'readable' event and move on.\n\n if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {\n debug('read: emitReadable', state.length, state.ended);\n if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);\n return null;\n }\n\n n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up.\n\n if (n === 0 && state.ended) {\n if (state.length === 0) endReadable(this);\n return null;\n } // All the actual chunk generation logic needs to be\n // *below* the call to _read. The reason is that in certain\n // synthetic stream cases, such as passthrough streams, _read\n // may be a completely synchronous operation which may change\n // the state of the read buffer, providing enough data when\n // before there was *not* enough.\n //\n // So, the steps are:\n // 1. Figure out what the state of things will be after we do\n // a read from the buffer.\n //\n // 2. If that resulting state will trigger a _read, then call _read.\n // Note that this may be asynchronous, or synchronous. Yes, it is\n // deeply ugly to write APIs this way, but that still doesn't mean\n // that the Readable class should behave improperly, as streams are\n // designed to be sync/async agnostic.\n // Take note if the _read call is sync or async (ie, if the read call\n // has returned yet), so that we know whether or not it's safe to emit\n // 'readable' etc.\n //\n // 3. Actually pull the requested chunks out of the buffer and return.\n // if we need a readable event, then we need to do some reading.\n\n\n var doRead = state.needReadable;\n debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some\n\n if (state.length === 0 || state.length - n < state.highWaterMark) {\n doRead = true;\n debug('length less than watermark', doRead);\n } // however, if we've ended, then there's no point, and if we're already\n // reading, then it's unnecessary.\n\n\n if (state.ended || state.reading) {\n doRead = false;\n debug('reading or ended', doRead);\n } else if (doRead) {\n debug('do read');\n state.reading = true;\n state.sync = true; // if the length is currently zero, then we *need* a readable event.\n\n if (state.length === 0) state.needReadable = true; // call internal read method\n\n this._read(state.highWaterMark);\n\n state.sync = false; // If _read pushed data synchronously, then `reading` will be false,\n // and we need to re-evaluate how much data we can return to the user.\n\n if (!state.reading) n = howMuchToRead(nOrig, state);\n }\n\n var ret;\n if (n > 0) ret = fromList(n, state);else ret = null;\n\n if (ret === null) {\n state.needReadable = true;\n n = 0;\n } else {\n state.length -= n;\n }\n\n if (state.length === 0) {\n // If we have nothing in the buffer, then we want to know\n // as soon as we *do* get something into the buffer.\n if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick.\n\n if (nOrig !== n && state.ended) endReadable(this);\n }\n\n if (ret !== null) this.emit('data', ret);\n return ret;\n};\n\nfunction onEofChunk(stream, state) {\n if (state.ended) return;\n\n if (state.decoder) {\n var chunk = state.decoder.end();\n\n if (chunk && chunk.length) {\n state.buffer.push(chunk);\n state.length += state.objectMode ? 1 : chunk.length;\n }\n }\n\n state.ended = true; // emit 'readable' now to make sure it gets picked up.\n\n emitReadable(stream);\n} // Don't emit readable right away in sync mode, because this can trigger\n// another read() call => stack overflow. This way, it might trigger\n// a nextTick recursion warning, but that's not so bad.\n\n\nfunction emitReadable(stream) {\n var state = stream._readableState;\n state.needReadable = false;\n\n if (!state.emittedReadable) {\n debug('emitReadable', state.flowing);\n state.emittedReadable = true;\n if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);\n }\n}\n\nfunction emitReadable_(stream) {\n debug('emit readable');\n stream.emit('readable');\n flow(stream);\n} // at this point, the user has presumably seen the 'readable' event,\n// and called read() to consume some data. that may have triggered\n// in turn another _read(n) call, in which case reading = true if\n// it's in progress.\n// However, if we're not ended, or reading, and the length < hwm,\n// then go ahead and try to read some more preemptively.\n\n\nfunction maybeReadMore(stream, state) {\n if (!state.readingMore) {\n state.readingMore = true;\n pna.nextTick(maybeReadMore_, stream, state);\n }\n}\n\nfunction maybeReadMore_(stream, state) {\n var len = state.length;\n\n while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {\n debug('maybeReadMore read 0');\n stream.read(0);\n if (len === state.length) // didn't get any data, stop spinning.\n break;else len = state.length;\n }\n\n state.readingMore = false;\n} // abstract method. to be overridden in specific implementation classes.\n// call cb(er, data) where data is <= n in length.\n// for virtual (non-string, non-buffer) streams, \"length\" is somewhat\n// arbitrary, and perhaps not very meaningful.\n\n\nReadable.prototype._read = function (n) {\n this.emit('error', new Error('_read() is not implemented'));\n};\n\nReadable.prototype.pipe = function (dest, pipeOpts) {\n var src = this;\n var state = this._readableState;\n\n switch (state.pipesCount) {\n case 0:\n state.pipes = dest;\n break;\n\n case 1:\n state.pipes = [state.pipes, dest];\n break;\n\n default:\n state.pipes.push(dest);\n break;\n }\n\n state.pipesCount += 1;\n debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);\n var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;\n var endFn = doEnd ? onend : unpipe;\n if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);\n dest.on('unpipe', onunpipe);\n\n function onunpipe(readable, unpipeInfo) {\n debug('onunpipe');\n\n if (readable === src) {\n if (unpipeInfo && unpipeInfo.hasUnpiped === false) {\n unpipeInfo.hasUnpiped = true;\n cleanup();\n }\n }\n }\n\n function onend() {\n debug('onend');\n dest.end();\n } // when the dest drains, it reduces the awaitDrain counter\n // on the source. This would be more elegant with a .once()\n // handler in flow(), but adding and removing repeatedly is\n // too slow.\n\n\n var ondrain = pipeOnDrain(src);\n dest.on('drain', ondrain);\n var cleanedUp = false;\n\n function cleanup() {\n debug('cleanup'); // cleanup event handlers once the pipe is broken\n\n dest.removeListener('close', onclose);\n dest.removeListener('finish', onfinish);\n dest.removeListener('drain', ondrain);\n dest.removeListener('error', onerror);\n dest.removeListener('unpipe', onunpipe);\n src.removeListener('end', onend);\n src.removeListener('end', unpipe);\n src.removeListener('data', ondata);\n cleanedUp = true; // if the reader is waiting for a drain event from this\n // specific writer, then it would cause it to never start\n // flowing again.\n // So, if this is awaiting a drain, then we just call it now.\n // If we don't know, then assume that we are waiting for one.\n\n if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();\n } // If the user pushes more data while we're writing to dest then we'll end up\n // in ondata again. However, we only want to increase awaitDrain once because\n // dest will only emit one 'drain' event for the multiple writes.\n // => Introduce a guard on increasing awaitDrain.\n\n\n var increasedAwaitDrain = false;\n src.on('data', ondata);\n\n function ondata(chunk) {\n debug('ondata');\n increasedAwaitDrain = false;\n var ret = dest.write(chunk);\n\n if (false === ret && !increasedAwaitDrain) {\n // If the user unpiped during `dest.write()`, it is possible\n // to get stuck in a permanently paused state if that write\n // also returned false.\n // => Check whether `dest` is still a piping destination.\n if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {\n debug('false write response, pause', src._readableState.awaitDrain);\n src._readableState.awaitDrain++;\n increasedAwaitDrain = true;\n }\n\n src.pause();\n }\n } // if the dest has an error, then stop piping into it.\n // however, don't suppress the throwing behavior for this.\n\n\n function onerror(er) {\n debug('onerror', er);\n unpipe();\n dest.removeListener('error', onerror);\n if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);\n } // Make sure our error handler is attached before userland ones.\n\n\n prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.\n\n function onclose() {\n dest.removeListener('finish', onfinish);\n unpipe();\n }\n\n dest.once('close', onclose);\n\n function onfinish() {\n debug('onfinish');\n dest.removeListener('close', onclose);\n unpipe();\n }\n\n dest.once('finish', onfinish);\n\n function unpipe() {\n debug('unpipe');\n src.unpipe(dest);\n } // tell the dest that it's being piped to\n\n\n dest.emit('pipe', src); // start the flow if it hasn't been started already.\n\n if (!state.flowing) {\n debug('pipe resume');\n src.resume();\n }\n\n return dest;\n};\n\nfunction pipeOnDrain(src) {\n return function () {\n var state = src._readableState;\n debug('pipeOnDrain', state.awaitDrain);\n if (state.awaitDrain) state.awaitDrain--;\n\n if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {\n state.flowing = true;\n flow(src);\n }\n };\n}\n\nReadable.prototype.unpipe = function (dest) {\n var state = this._readableState;\n var unpipeInfo = {\n hasUnpiped: false\n }; // if we're not piping anywhere, then do nothing.\n\n if (state.pipesCount === 0) return this; // just one destination. most common case.\n\n if (state.pipesCount === 1) {\n // passed in one, but it's not the right one.\n if (dest && dest !== state.pipes) return this;\n if (!dest) dest = state.pipes; // got a match.\n\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n if (dest) dest.emit('unpipe', this, unpipeInfo);\n return this;\n } // slow case. multiple pipe destinations.\n\n\n if (!dest) {\n // remove all.\n var dests = state.pipes;\n var len = state.pipesCount;\n state.pipes = null;\n state.pipesCount = 0;\n state.flowing = false;\n\n for (var i = 0; i < len; i++) {\n dests[i].emit('unpipe', this, unpipeInfo);\n }\n\n return this;\n } // try to find the right one.\n\n\n var index = indexOf(state.pipes, dest);\n if (index === -1) return this;\n state.pipes.splice(index, 1);\n state.pipesCount -= 1;\n if (state.pipesCount === 1) state.pipes = state.pipes[0];\n dest.emit('unpipe', this, unpipeInfo);\n return this;\n}; // set up data events if they are asked for\n// Ensure readable listeners eventually get something\n\n\nReadable.prototype.on = function (ev, fn) {\n var res = Stream.prototype.on.call(this, ev, fn);\n\n if (ev === 'data') {\n // Start flowing on next tick if stream isn't explicitly paused\n if (this._readableState.flowing !== false) this.resume();\n } else if (ev === 'readable') {\n var state = this._readableState;\n\n if (!state.endEmitted && !state.readableListening) {\n state.readableListening = state.needReadable = true;\n state.emittedReadable = false;\n\n if (!state.reading) {\n pna.nextTick(nReadingNextTick, this);\n } else if (state.length) {\n emitReadable(this);\n }\n }\n }\n\n return res;\n};\n\nReadable.prototype.addListener = Readable.prototype.on;\n\nfunction nReadingNextTick(self) {\n debug('readable nexttick read 0');\n self.read(0);\n} // pause() and resume() are remnants of the legacy readable stream API\n// If the user uses them, then switch into old mode.\n\n\nReadable.prototype.resume = function () {\n var state = this._readableState;\n\n if (!state.flowing) {\n debug('resume');\n state.flowing = true;\n resume(this, state);\n }\n\n return this;\n};\n\nfunction resume(stream, state) {\n if (!state.resumeScheduled) {\n state.resumeScheduled = true;\n pna.nextTick(resume_, stream, state);\n }\n}\n\nfunction resume_(stream, state) {\n if (!state.reading) {\n debug('resume read 0');\n stream.read(0);\n }\n\n state.resumeScheduled = false;\n state.awaitDrain = 0;\n stream.emit('resume');\n flow(stream);\n if (state.flowing && !state.reading) stream.read(0);\n}\n\nReadable.prototype.pause = function () {\n debug('call pause flowing=%j', this._readableState.flowing);\n\n if (false !== this._readableState.flowing) {\n debug('pause');\n this._readableState.flowing = false;\n this.emit('pause');\n }\n\n return this;\n};\n\nfunction flow(stream) {\n var state = stream._readableState;\n debug('flow', state.flowing);\n\n while (state.flowing && stream.read() !== null) {}\n} // wrap an old-style stream as the async data source.\n// This is *not* part of the readable stream interface.\n// It is an ugly unfortunate mess of history.\n\n\nReadable.prototype.wrap = function (stream) {\n var _this = this;\n\n var state = this._readableState;\n var paused = false;\n stream.on('end', function () {\n debug('wrapped end');\n\n if (state.decoder && !state.ended) {\n var chunk = state.decoder.end();\n if (chunk && chunk.length) _this.push(chunk);\n }\n\n _this.push(null);\n });\n stream.on('data', function (chunk) {\n debug('wrapped data');\n if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode\n\n if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;\n\n var ret = _this.push(chunk);\n\n if (!ret) {\n paused = true;\n stream.pause();\n }\n }); // proxy all the other methods.\n // important when wrapping filters and duplexes.\n\n for (var i in stream) {\n if (this[i] === undefined && typeof stream[i] === 'function') {\n this[i] = function (method) {\n return function () {\n return stream[method].apply(stream, arguments);\n };\n }(i);\n }\n } // proxy certain important events.\n\n\n for (var n = 0; n < kProxyEvents.length; n++) {\n stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));\n } // when we try to consume some more bytes, simply unpause the\n // underlying stream.\n\n\n this._read = function (n) {\n debug('wrapped _read', n);\n\n if (paused) {\n paused = false;\n stream.resume();\n }\n };\n\n return this;\n};\n\nObject.defineProperty(Readable.prototype, 'readableHighWaterMark', {\n // making it explicit this property is not enumerable\n // because otherwise some prototype manipulation in\n // userland will fail\n enumerable: false,\n get: function get() {\n return this._readableState.highWaterMark;\n }\n}); // exposed for testing purposes only.\n\nReadable._fromList = fromList; // Pluck off n bytes from an array of buffers.\n// Length is the combined lengths of all the buffers in the list.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\nfunction fromList(n, state) {\n // nothing buffered\n if (state.length === 0) return null;\n var ret;\n if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {\n // read it all, truncate the list\n if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);\n state.buffer.clear();\n } else {\n // read part of list\n ret = fromListPartial(n, state.buffer, state.decoder);\n }\n return ret;\n} // Extracts only enough buffered data to satisfy the amount requested.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction fromListPartial(n, list, hasStrings) {\n var ret;\n\n if (n < list.head.data.length) {\n // slice is the same for buffers and strings\n ret = list.head.data.slice(0, n);\n list.head.data = list.head.data.slice(n);\n } else if (n === list.head.data.length) {\n // first chunk is a perfect match\n ret = list.shift();\n } else {\n // result spans more than one buffer\n ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);\n }\n\n return ret;\n} // Copies a specified amount of characters from the list of buffered data\n// chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction copyFromBufferString(n, list) {\n var p = list.head;\n var c = 1;\n var ret = p.data;\n n -= ret.length;\n\n while (p = p.next) {\n var str = p.data;\n var nb = n > str.length ? str.length : n;\n if (nb === str.length) ret += str;else ret += str.slice(0, n);\n n -= nb;\n\n if (n === 0) {\n if (nb === str.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = str.slice(nb);\n }\n\n break;\n }\n\n ++c;\n }\n\n list.length -= c;\n return ret;\n} // Copies a specified amount of bytes from the list of buffered data chunks.\n// This function is designed to be inlinable, so please take care when making\n// changes to the function body.\n\n\nfunction copyFromBuffer(n, list) {\n var ret = Buffer.allocUnsafe(n);\n var p = list.head;\n var c = 1;\n p.data.copy(ret);\n n -= p.data.length;\n\n while (p = p.next) {\n var buf = p.data;\n var nb = n > buf.length ? buf.length : n;\n buf.copy(ret, ret.length - n, 0, nb);\n n -= nb;\n\n if (n === 0) {\n if (nb === buf.length) {\n ++c;\n if (p.next) list.head = p.next;else list.head = list.tail = null;\n } else {\n list.head = p;\n p.data = buf.slice(nb);\n }\n\n break;\n }\n\n ++c;\n }\n\n list.length -= c;\n return ret;\n}\n\nfunction endReadable(stream) {\n var state = stream._readableState; // If we get here before consuming all the bytes, then that is a\n // bug in node. Should never happen.\n\n if (state.length > 0) throw new Error('\"endReadable()\" called on non-empty stream');\n\n if (!state.endEmitted) {\n state.ended = true;\n pna.nextTick(endReadableNT, state, stream);\n }\n}\n\nfunction endReadableNT(state, stream) {\n // Check that we didn't get one last unshift.\n if (!state.endEmitted && state.length === 0) {\n state.endEmitted = true;\n stream.readable = false;\n stream.emit('end');\n }\n}\n\nfunction indexOf(xs, x) {\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) return i;\n }\n\n return -1;\n}","exports = module.exports = require('./lib/_stream_readable.js');\nexports.Stream = exports;\nexports.Readable = exports;\nexports.Writable = require('./lib/_stream_writable.js');\nexports.Duplex = require('./lib/_stream_duplex.js');\nexports.Transform = require('./lib/_stream_transform.js');\nexports.PassThrough = require('./lib/_stream_passthrough.js');","var capability = require('./capability');\n\nvar inherits = require('inherits');\n\nvar stream = require('readable-stream');\n\nvar rStates = exports.readyStates = {\n UNSENT: 0,\n OPENED: 1,\n HEADERS_RECEIVED: 2,\n LOADING: 3,\n DONE: 4\n};\n\nvar IncomingMessage = exports.IncomingMessage = function (xhr, response, mode, fetchTimer) {\n var self = this;\n stream.Readable.call(self);\n self._mode = mode;\n self.headers = {};\n self.rawHeaders = [];\n self.trailers = {};\n self.rawTrailers = []; // Fake the 'close' event, but only once 'end' fires\n\n self.on('end', function () {\n // The nextTick is necessary to prevent the 'request' module from causing an infinite loop\n process.nextTick(function () {\n self.emit('close');\n });\n });\n\n if (mode === 'fetch') {\n var read = function read() {\n reader.read().then(function (result) {\n if (self._destroyed) return;\n\n if (result.done) {\n global.clearTimeout(fetchTimer);\n self.push(null);\n return;\n }\n\n self.push(new Buffer(result.value));\n read();\n })[\"catch\"](function (err) {\n global.clearTimeout(fetchTimer);\n if (!self._destroyed) self.emit('error', err);\n });\n };\n\n self._fetchResponse = response;\n self.url = response.url;\n self.statusCode = response.status;\n self.statusMessage = response.statusText;\n response.headers.forEach(function (header, key) {\n self.headers[key.toLowerCase()] = header;\n self.rawHeaders.push(key, header);\n });\n\n if (capability.writableStream) {\n var writable = new WritableStream({\n write: function write(chunk) {\n return new Promise(function (resolve, reject) {\n if (self._destroyed) {\n reject();\n } else if (self.push(new Buffer(chunk))) {\n resolve();\n } else {\n self._resumeFetch = resolve;\n }\n });\n },\n close: function close() {\n global.clearTimeout(fetchTimer);\n if (!self._destroyed) self.push(null);\n },\n abort: function abort(err) {\n if (!self._destroyed) self.emit('error', err);\n }\n });\n\n try {\n response.body.pipeTo(writable)[\"catch\"](function (err) {\n global.clearTimeout(fetchTimer);\n if (!self._destroyed) self.emit('error', err);\n });\n return;\n } catch (e) {} // pipeTo method isn't defined. Can't find a better way to feature test this\n\n } // fallback for when writableStream or pipeTo aren't available\n\n\n var reader = response.body.getReader();\n read();\n } else {\n self._xhr = xhr;\n self._pos = 0;\n self.url = xhr.responseURL;\n self.statusCode = xhr.status;\n self.statusMessage = xhr.statusText;\n var headers = xhr.getAllResponseHeaders().split(/\\r?\\n/);\n headers.forEach(function (header) {\n var matches = header.match(/^([^:]+):\\s*(.*)/);\n\n if (matches) {\n var key = matches[1].toLowerCase();\n\n if (key === 'set-cookie') {\n if (self.headers[key] === undefined) {\n self.headers[key] = [];\n }\n\n self.headers[key].push(matches[2]);\n } else if (self.headers[key] !== undefined) {\n self.headers[key] += ', ' + matches[2];\n } else {\n self.headers[key] = matches[2];\n }\n\n self.rawHeaders.push(matches[1], matches[2]);\n }\n });\n self._charset = 'x-user-defined';\n\n if (!capability.overrideMimeType) {\n var mimeType = self.rawHeaders['mime-type'];\n\n if (mimeType) {\n var charsetMatch = mimeType.match(/;\\s*charset=([^;])(;|$)/);\n\n if (charsetMatch) {\n self._charset = charsetMatch[1].toLowerCase();\n }\n }\n\n if (!self._charset) self._charset = 'utf-8'; // best guess\n }\n }\n};\n\ninherits(IncomingMessage, stream.Readable);\n\nIncomingMessage.prototype._read = function () {\n var self = this;\n var resolve = self._resumeFetch;\n\n if (resolve) {\n self._resumeFetch = null;\n resolve();\n }\n};\n\nIncomingMessage.prototype._onXHRProgress = function () {\n var self = this;\n var xhr = self._xhr;\n var response = null;\n\n switch (self._mode) {\n case 'text:vbarray':\n // For IE9\n if (xhr.readyState !== rStates.DONE) break;\n\n try {\n // This fails in IE8\n response = new global.VBArray(xhr.responseBody).toArray();\n } catch (e) {}\n\n if (response !== null) {\n self.push(new Buffer(response));\n break;\n }\n\n // Falls through in IE8\t\n\n case 'text':\n try {\n // This will fail when readyState = 3 in IE9. Switch mode and wait for readyState = 4\n response = xhr.responseText;\n } catch (e) {\n self._mode = 'text:vbarray';\n break;\n }\n\n if (response.length > self._pos) {\n var newData = response.substr(self._pos);\n\n if (self._charset === 'x-user-defined') {\n var buffer = new Buffer(newData.length);\n\n for (var i = 0; i < newData.length; i++) {\n buffer[i] = newData.charCodeAt(i) & 0xff;\n }\n\n self.push(buffer);\n } else {\n self.push(newData, self._charset);\n }\n\n self._pos = response.length;\n }\n\n break;\n\n case 'arraybuffer':\n if (xhr.readyState !== rStates.DONE || !xhr.response) break;\n response = xhr.response;\n self.push(new Buffer(new Uint8Array(response)));\n break;\n\n case 'moz-chunked-arraybuffer':\n // take whole\n response = xhr.response;\n if (xhr.readyState !== rStates.LOADING || !response) break;\n self.push(new Buffer(new Uint8Array(response)));\n break;\n\n case 'ms-stream':\n response = xhr.response;\n if (xhr.readyState !== rStates.LOADING) break;\n var reader = new global.MSStreamReader();\n\n reader.onprogress = function () {\n if (reader.result.byteLength > self._pos) {\n self.push(new Buffer(new Uint8Array(reader.result.slice(self._pos))));\n self._pos = reader.result.byteLength;\n }\n };\n\n reader.onload = function () {\n self.push(null);\n }; // reader.onerror = ??? // TODO: this\n\n\n reader.readAsArrayBuffer(response);\n break;\n } // The ms-stream case handles end separately in reader.onload()\n\n\n if (self._xhr.readyState === rStates.DONE && self._mode !== 'ms-stream') {\n self.push(null);\n }\n};","exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream);\nexports.writableStream = isFunction(global.WritableStream);\nexports.abortController = isFunction(global.AbortController);\nexports.blobConstructor = false;\n\ntry {\n new Blob([new ArrayBuffer(1)]);\n exports.blobConstructor = true;\n} catch (e) {} // The xhr request to example.com may violate some restrictive CSP configurations,\n// so if we're running in a browser that supports `fetch`, avoid calling getXHR()\n// and assume support for certain features below.\n\n\nvar xhr;\n\nfunction getXHR() {\n // Cache the xhr value\n if (xhr !== undefined) return xhr;\n\n if (global.XMLHttpRequest) {\n xhr = new global.XMLHttpRequest(); // If XDomainRequest is available (ie only, where xhr might not work\n // cross domain), use the page location. Otherwise use example.com\n // Note: this doesn't actually make an http request.\n\n try {\n xhr.open('GET', global.XDomainRequest ? '/' : 'https://example.com');\n } catch (e) {\n xhr = null;\n }\n } else {\n // Service workers don't have XHR\n xhr = null;\n }\n\n return xhr;\n}\n\nfunction checkTypeSupport(type) {\n var xhr = getXHR();\n if (!xhr) return false;\n\n try {\n xhr.responseType = type;\n return xhr.responseType === type;\n } catch (e) {}\n\n return false;\n} // For some strange reason, Safari 7.0 reports typeof global.ArrayBuffer === 'object'.\n// Safari 7.1 appears to have fixed this bug.\n\n\nvar haveArrayBuffer = typeof global.ArrayBuffer !== 'undefined';\nvar haveSlice = haveArrayBuffer && isFunction(global.ArrayBuffer.prototype.slice); // If fetch is supported, then arraybuffer will be supported too. Skip calling\n// checkTypeSupport(), since that calls getXHR().\n\nexports.arraybuffer = exports.fetch || haveArrayBuffer && checkTypeSupport('arraybuffer'); // These next two tests unavoidably show warnings in Chrome. Since fetch will always\n// be used if it's available, just return false for these to avoid the warnings.\n\nexports.msstream = !exports.fetch && haveSlice && checkTypeSupport('ms-stream');\nexports.mozchunkedarraybuffer = !exports.fetch && haveArrayBuffer && checkTypeSupport('moz-chunked-arraybuffer'); // If fetch is supported, then overrideMimeType will be supported too. Skip calling\n// getXHR().\n\nexports.overrideMimeType = exports.fetch || (getXHR() ? isFunction(getXHR().overrideMimeType) : false);\nexports.vbArray = isFunction(global.VBArray);\n\nfunction isFunction(value) {\n return typeof value === 'function';\n}\n\nxhr = null; // Help gc","var ClientRequest = require('./lib/request');\n\nvar response = require('./lib/response');\n\nvar extend = require('xtend');\n\nvar statusCodes = require('builtin-status-codes');\n\nvar url = require('url');\n\nvar http = exports;\n\nhttp.request = function (opts, cb) {\n if (typeof opts === 'string') opts = url.parse(opts);else opts = extend(opts); // Normally, the page is loaded from http or https, so not specifying a protocol\n // will result in a (valid) protocol-relative url. However, this won't work if\n // the protocol is something else, like 'file:'\n\n var defaultProtocol = global.location.protocol.search(/^https?:$/) === -1 ? 'http:' : '';\n var protocol = opts.protocol || defaultProtocol;\n var host = opts.hostname || opts.host;\n var port = opts.port;\n var path = opts.path || '/'; // Necessary for IPv6 addresses\n\n if (host && host.indexOf(':') !== -1) host = '[' + host + ']'; // This may be a relative url. The browser should always be able to interpret it correctly.\n\n opts.url = (host ? protocol + '//' + host : '') + (port ? ':' + port : '') + path;\n opts.method = (opts.method || 'GET').toUpperCase();\n opts.headers = opts.headers || {}; // Also valid opts.auth, opts.mode\n\n var req = new ClientRequest(opts);\n if (cb) req.on('response', cb);\n return req;\n};\n\nhttp.get = function get(opts, cb) {\n var req = http.request(opts, cb);\n req.end();\n return req;\n};\n\nhttp.ClientRequest = ClientRequest;\nhttp.IncomingMessage = response.IncomingMessage;\n\nhttp.Agent = function () {};\n\nhttp.Agent.defaultMaxSockets = 4;\nhttp.globalAgent = new http.Agent();\nhttp.STATUS_CODES = statusCodes;\nhttp.METHODS = ['CHECKOUT', 'CONNECT', 'COPY', 'DELETE', 'GET', 'HEAD', 'LOCK', 'M-SEARCH', 'MERGE', 'MKACTIVITY', 'MKCOL', 'MOVE', 'NOTIFY', 'OPTIONS', 'PATCH', 'POST', 'PROPFIND', 'PROPPATCH', 'PURGE', 'PUT', 'REPORT', 'SEARCH', 'SUBSCRIBE', 'TRACE', 'UNLOCK', 'UNSUBSCRIBE'];","var toString = {}.toString;\n\nmodule.exports = Array.isArray || function (arr) {\n return toString.call(arr) == '[object Array]';\n};","module.exports = function (gantt) {\n var TreeDataStore = require(\"../datastore/treedatastore\");\n\n var loadedBranches = {};\n gantt.attachEvent(\"onClearAll\", function () {\n loadedBranches = {};\n });\n var oldHasChildren = TreeDataStore.prototype.hasChild;\n\n gantt.$data.tasksStore.hasChild = function (id) {\n if (!gantt.config.branch_loading) {\n return oldHasChildren.call(this, id);\n } else {\n if (oldHasChildren.call(this, id)) return true;\n\n if (this.exists(id)) {\n return this.getItem(id)[gantt.config.branch_loading_property];\n }\n }\n\n return false;\n };\n\n function needLoading(id) {\n if (gantt.config.branch_loading && gantt._load_url) {\n var alreadyLoaded = !!loadedBranches[id]; // call ajax only if branch has children\n\n if (!alreadyLoaded && !gantt.getChildren(id).length && gantt.hasChild(id)) {\n return true;\n }\n }\n\n return false;\n }\n\n gantt.attachEvent(\"onTaskOpened\", function (id) {\n if (gantt.config.branch_loading && gantt._load_url) {\n // call ajax only if branch has children\n if (needLoading(id)) {\n var url = gantt._load_url;\n url = url.replace(/(\\?|&)?parent_id=.+&?/, \"\");\n var param = url.indexOf(\"?\") >= 0 ? \"&\" : \"?\";\n var y = gantt.getScrollState().y || 0;\n var requestData = {\n taskId: id,\n url: url + param + \"parent_id=\" + encodeURIComponent(id)\n };\n\n if (gantt.callEvent(\"onBeforeBranchLoading\", [requestData]) === false) {\n return;\n }\n\n gantt.load(requestData.url, this._load_type, function () {\n if (y) {\n gantt.scrollTo(null, y);\n }\n\n gantt.callEvent(\"onAfterBranchLoading\", [requestData]);\n });\n loadedBranches[id] = true;\n }\n }\n });\n};","module.exports = function (gantt) {\n gantt.load = function (url, type, callback) {\n this._load_url = url;\n this.assert(arguments.length, \"Invalid load arguments\");\n var tp = 'json',\n cl = null;\n\n if (arguments.length >= 3) {\n tp = type;\n cl = callback;\n } else {\n if (typeof arguments[1] == \"string\") tp = arguments[1];else if (typeof arguments[1] == \"function\") cl = arguments[1];\n }\n\n this._load_type = tp;\n this.callEvent(\"onLoadStart\", [url, tp]);\n return this.ajax.get(url, gantt.bind(function (l) {\n this.on_load(l, tp);\n this.callEvent(\"onLoadEnd\", [url, tp]);\n if (typeof cl == \"function\") cl.call(this);\n }, this));\n };\n};","module.exports = function (gantt) {\n // TODO: why eslint fails on regexp?\n // eslint-disable-next-line no-control-regex\n var htmlTags = new RegExp(\"<(?:.|\\n)*?>\", \"gm\");\n var extraSpaces = new RegExp(\" +\", \"gm\");\n\n function stripHTMLLite(htmlText) {\n return (htmlText + \"\").replace(htmlTags, \" \").replace(extraSpaces, \" \");\n }\n\n var singleQuotes = new RegExp(\"'\", \"gm\");\n\n function escapeQuotes(text) {\n return (text + \"\").replace(singleQuotes, \"'\");\n }\n\n gantt._waiAria = {\n getAttributeString: function getAttributeString(attr) {\n var attributes = [\" \"];\n\n for (var i in attr) {\n var text = escapeQuotes(stripHTMLLite(attr[i]));\n attributes.push(i + \"='\" + text + \"'\");\n }\n\n attributes.push(\" \");\n return attributes.join(\" \");\n },\n getTimelineCellAttr: function getTimelineCellAttr(dateString) {\n return gantt._waiAria.getAttributeString({\n \"aria-label\": dateString\n });\n },\n _taskCommonAttr: function _taskCommonAttr(task, div) {\n if (!(task.start_date && task.end_date)) return;\n div.setAttribute(\"aria-label\", stripHTMLLite(gantt.templates.tooltip_text(task.start_date, task.end_date, task)));\n\n if (task.$dataprocessor_class) {\n div.setAttribute(\"aria-busy\", true);\n }\n },\n setTaskBarAttr: function setTaskBarAttr(task, div) {\n this._taskCommonAttr(task, div); // task bars are complex elements that should be treated as a single element\n\n\n div.setAttribute(\"role\", \"img\");\n\n if (!gantt.isReadonly(task) && gantt.config.drag_move) {\n if (task.id != gantt.getState(\"tasksDnd\").drag_id) {\n div.setAttribute(\"aria-grabbed\", false);\n } else {\n div.setAttribute(\"aria-grabbed\", true);\n }\n }\n },\n taskRowAttr: function taskRowAttr(task, div) {\n this._taskCommonAttr(task, div);\n\n if (!gantt.isReadonly(task) && gantt.config.order_branch) {\n div.setAttribute(\"aria-grabbed\", false);\n }\n\n div.setAttribute(\"role\", \"row\"); // selected attribute should be added only to the grid because\n // other parts don't have the keyboard navigation\n\n div.setAttribute(\"aria-selected\", gantt.isSelectedTask(task.id) ? \"true\" : \"false\"); // allowed values start from 1, set 1 for non-tree datastores\n\n div.setAttribute(\"aria-level\", task.$level + 1 || 1);\n\n if (gantt.hasChild(task.id)) {\n div.setAttribute(\"aria-expanded\", task.$open ? \"true\" : \"false\");\n }\n },\n linkAttr: function linkAttr(link, div) {\n var linkTypes = gantt.config.links;\n var toStart = link.type == linkTypes.finish_to_start || link.type == linkTypes.start_to_start;\n var fromStart = link.type == linkTypes.start_to_start || link.type == linkTypes.start_to_finish;\n var content = gantt.locale.labels.link + \" \" + gantt.templates.drag_link(link.source, fromStart, link.target, toStart); // links are complex elements that should be treated as a single element\n\n div.setAttribute(\"role\", \"img\");\n div.setAttribute(\"aria-label\", stripHTMLLite(content));\n\n if (gantt.isReadonly(link)) {\n div.setAttribute(\"aria-readonly\", true);\n }\n },\n gridSeparatorAttr: function gridSeparatorAttr(div) {\n // the only valid role for the grid header\n div.setAttribute(\"role\", \"columnheader\");\n },\n rowResizerAttr: function rowResizerAttr(div) {\n // the only valid role for the grid header\n div.setAttribute(\"role\", \"row\");\n },\n lightboxHiddenAttr: function lightboxHiddenAttr(div) {\n div.setAttribute(\"aria-hidden\", \"true\");\n },\n lightboxVisibleAttr: function lightboxVisibleAttr(div) {\n div.setAttribute(\"aria-hidden\", \"false\");\n },\n lightboxAttr: function lightboxAttr(div) {\n div.setAttribute(\"role\", \"dialog\");\n div.setAttribute(\"aria-hidden\", \"true\");\n div.firstChild.setAttribute(\"role\", \"heading\");\n div.firstChild.setAttribute(\"aria-level\", \"1\");\n },\n lightboxButtonAttrString: function lightboxButtonAttrString(buttonName) {\n return this.getAttributeString({\n \"role\": \"button\",\n \"aria-label\": gantt.locale.labels[buttonName],\n \"tabindex\": \"0\"\n });\n },\n lightboxHeader: function lightboxHeader(div, headerText) {\n div.setAttribute(\"aria-label\", headerText);\n },\n lightboxSelectAttrString: function lightboxSelectAttrString(time_option) {\n var label = \"\";\n\n switch (time_option) {\n case \"%Y\":\n label = gantt.locale.labels.years;\n break;\n\n case \"%m\":\n label = gantt.locale.labels.months;\n break;\n\n case \"%d\":\n label = gantt.locale.labels.days;\n break;\n\n case \"%H:%i\":\n label = gantt.locale.labels.hours + gantt.locale.labels.minutes;\n break;\n\n default:\n break;\n }\n\n return gantt._waiAria.getAttributeString({\n \"aria-label\": label\n });\n },\n lightboxDurationInputAttrString: function lightboxDurationInputAttrString(section) {\n return this.getAttributeString({\n \"aria-label\": gantt.locale.labels.column_duration,\n \"aria-valuemin\": \"0\",\n \"role\": \"spinbutton\"\n });\n },\n inlineEditorAttr: function inlineEditorAttr(div) {\n div.setAttribute(\"role\", \"row\");\n },\n gridAttrString: function gridAttrString() {\n return [\" role='treegrid'\", gantt.config.multiselect ? \"aria-multiselectable='true'\" : \"aria-multiselectable='false'\", \" \"].join(\" \");\n },\n gridScaleRowAttrString: function gridScaleRowAttrString() {\n return \"role='row'\";\n },\n gridScaleCellAttrString: function gridScaleCellAttrString(column, label) {\n var attrs = \"\";\n\n if (column.name == \"add\") {\n // a more precise role is button, but it is not valid for the grid header\n attrs = this.getAttributeString({\n \"role\": \"columnheader\",\n \"aria-label\": gantt.locale.labels.new_task\n });\n } else {\n var attributes = {\n \"role\": \"columnheader\",\n \"aria-label\": label\n };\n\n if (gantt._sort && gantt._sort.name == column.name) {\n if (gantt._sort.direction == \"asc\") {\n attributes[\"aria-sort\"] = \"ascending\";\n } else {\n attributes[\"aria-sort\"] = \"descending\";\n }\n }\n\n attrs = this.getAttributeString(attributes);\n }\n\n return attrs;\n },\n gridDataAttrString: function gridDataAttrString() {\n return \"role='rowgroup'\";\n },\n reorderMarkerAttr: function reorderMarkerAttr(div) {\n div.setAttribute(\"role\", \"grid\");\n div.firstChild.removeAttribute(\"aria-level\");\n div.firstChild.setAttribute(\"aria-grabbed\", \"true\");\n },\n gridCellAttrString: function gridCellAttrString(column, textValue, task) {\n var attributes = {\n \"role\": \"gridcell\",\n \"aria-label\": textValue\n };\n\n if (!column.editor || gantt.isReadonly(task)) {\n attributes[\"aria-readonly\"] = true;\n }\n\n return this.getAttributeString(attributes);\n },\n gridAddButtonAttrString: function gridAddButtonAttrString(column) {\n return this.getAttributeString({\n \"role\": \"button\",\n \"aria-label\": gantt.locale.labels.new_task\n });\n },\n messageButtonAttrString: function messageButtonAttrString(buttonLabel) {\n return \"tabindex='0' role='button' aria-label='\" + buttonLabel + \"'\";\n },\n messageInfoAttr: function messageInfoAttr(div) {\n div.setAttribute(\"role\", \"alert\"); //div.setAttribute(\"tabindex\", \"-1\");\n },\n messageModalAttr: function messageModalAttr(div, uid) {\n div.setAttribute(\"role\", \"dialog\");\n\n if (uid) {\n div.setAttribute(\"aria-labelledby\", uid);\n } //\tdiv.setAttribute(\"tabindex\", \"-1\");\n\n },\n quickInfoAttr: function quickInfoAttr(div) {\n div.setAttribute(\"role\", \"dialog\");\n },\n quickInfoHeaderAttrString: function quickInfoHeaderAttrString() {\n return \" role='heading' aria-level='1' \";\n },\n quickInfoHeader: function quickInfoHeader(div, header) {\n div.setAttribute(\"aria-label\", header);\n },\n quickInfoButtonAttrString: function quickInfoButtonAttrString(label) {\n return gantt._waiAria.getAttributeString({\n \"role\": \"button\",\n \"aria-label\": label,\n \"tabindex\": \"0\"\n });\n },\n tooltipAttr: function tooltipAttr(div) {\n div.setAttribute(\"role\", \"tooltip\");\n },\n tooltipVisibleAttr: function tooltipVisibleAttr(div) {\n div.setAttribute(\"aria-hidden\", \"false\");\n },\n tooltipHiddenAttr: function tooltipHiddenAttr(div) {\n div.setAttribute(\"aria-hidden\", \"true\");\n }\n };\n\n function isDisabled() {\n return !gantt.config.wai_aria_attributes;\n }\n\n for (var i in gantt._waiAria) {\n gantt._waiAria[i] = function (payload) {\n return function () {\n if (isDisabled()) {\n return \"\";\n }\n\n return payload.apply(this, arguments);\n };\n }(gantt._waiAria[i]);\n }\n};","module.exports = function (gantt) {\n gantt._extend_to_optional = function (lightbox_block) {\n var duration = lightbox_block;\n var optional_time = {\n render: duration.render,\n focus: duration.focus,\n set_value: function set_value(node, value, task, section) {\n var mapping = gantt._resolve_default_mapping(section);\n\n if (!task[mapping.start_date] || mapping.start_date == \"start_date\" && this._isAllowedUnscheduledTask(task)) {\n optional_time.disable(node, section);\n var val = {};\n\n for (var i in mapping) {\n //take default values from the time control from task start/end dates\n val[mapping[i]] = task[i];\n }\n\n return duration.set_value.call(gantt, node, value, val, section); //set default value\n } else {\n optional_time.enable(node, section);\n return duration.set_value.call(gantt, node, value, task, section);\n }\n },\n get_value: function get_value(node, task, section) {\n if (section.disabled) {\n return {\n start_date: null\n };\n } else {\n return duration.get_value.call(gantt, node, task, section);\n }\n },\n update_block: function update_block(node, section) {\n gantt.callEvent(\"onSectionToggle\", [gantt._lightbox_id, section]);\n node.style.display = section.disabled ? \"none\" : \"block\";\n\n if (section.button) {\n var button = node.previousSibling.querySelector(\".gantt_custom_button_label\"),\n labels = gantt.locale.labels;\n var button_text = section.disabled ? labels[section.name + \"_enable_button\"] : labels[section.name + \"_disable_button\"];\n button.innerHTML = button_text;\n }\n\n gantt.resizeLightbox();\n },\n disable: function disable(node, section) {\n section.disabled = true;\n optional_time.update_block(node, section);\n },\n enable: function enable(node, section) {\n section.disabled = false;\n optional_time.update_block(node, section);\n },\n button_click: function button_click(index, el, section, container) {\n if (gantt.callEvent(\"onSectionButton\", [gantt._lightbox_id, section]) === false) {\n return;\n }\n\n var config = gantt._get_typed_lightbox_config()[index];\n\n if (config.disabled) {\n optional_time.enable(container, config);\n } else {\n optional_time.disable(container, config);\n }\n }\n };\n return optional_time;\n };\n\n gantt.form_blocks.duration_optional = gantt._extend_to_optional(gantt.form_blocks.duration);\n gantt.form_blocks.time_optional = gantt._extend_to_optional(gantt.form_blocks.time);\n};","var __extends = require(\"../../../../utils/extends\");\n\nmodule.exports = function (gantt) {\n var _super = require(\"./select_control\")(gantt);\n\n function TypeselectControl() {\n var self = _super.apply(this, arguments) || this;\n return self;\n }\n\n __extends(TypeselectControl, _super);\n\n TypeselectControl.prototype.render = function (sns) {\n var types = gantt.config.types,\n locale = gantt.locale.labels,\n options = [];\n\n var filter = sns.filter || function (typeKey, typeValue) {\n if (!types.placeholder || typeValue !== types.placeholder) {\n return true;\n }\n\n return false;\n };\n\n for (var i in types) {\n if (!filter(i, types[i]) === false) {\n options.push({\n key: types[i],\n label: locale[\"type_\" + i]\n });\n }\n }\n\n sns.options = options;\n var oldOnChange = sns.onchange;\n\n sns.onchange = function () {\n gantt._lightbox_current_type = this.value;\n gantt.changeLightboxType(this.value);\n\n if (typeof oldOnChange == 'function') {\n oldOnChange.apply(this, arguments);\n }\n };\n\n return _super.prototype.render.apply(this, arguments);\n };\n\n return TypeselectControl;\n};","var __extends = require(\"../../../../utils/extends\");\n\nvar htmlHelpers = require(\"../../utils/html_helpers\");\n\nmodule.exports = function (gantt) {\n var _super = require(\"./base_control\")(gantt);\n\n function ConstraintControl() {\n var self = _super.apply(this, arguments) || this;\n return self;\n }\n\n __extends(ConstraintControl, _super);\n\n function isNonTimedConstraint(value) {\n if (!value || value === gantt.config.constraint_types.ASAP || value === gantt.config.constraint_types.ALAP) {\n return true;\n } else {\n return false;\n }\n }\n\n function toggleTimeSelect(timeSelects, typeValue) {\n var isNonTimed = isNonTimedConstraint(typeValue);\n\n for (var i = 0; i < timeSelects.length; i++) {\n timeSelects[i].disabled = isNonTimed;\n }\n }\n\n ConstraintControl.prototype.render = function (sns) {\n var height = (sns.height || 30) + \"px\";\n var html = \"
\";\n var options = [];\n\n for (var i in gantt.config.constraint_types) {\n options.push({\n key: gantt.config.constraint_types[i],\n label: gantt.locale.labels[gantt.config.constraint_types[i]]\n });\n }\n\n sns.options = sns.options || options;\n html += \"\" + htmlHelpers.getHtmlSelect(sns.options, [{\n key: \"data-type\",\n value: \"constraint-type\"\n }]) + \"\";\n var timeLabel = gantt.locale.labels[\"constraint_date\"] || \"Constraint date\";\n html += \"\";\n html += \"
\";\n return html;\n };\n\n ConstraintControl.prototype.set_value = function (node, value, task, config) {\n var typeSelect = node.querySelector(\"[data-constraint-type-select] select\");\n var timeSelects = node.querySelectorAll(\"[data-constraint-time-select] select\");\n var map = config._time_format_order;\n\n var mapping = gantt._resolve_default_mapping(config);\n\n if (!typeSelect._eventsInitialized) {\n typeSelect.addEventListener(\"change\", function (e) {\n toggleTimeSelect(timeSelects, e.target.value);\n });\n typeSelect._eventsInitialized = true;\n }\n\n var constraintDate = task[mapping.constraint_date] || new Date();\n\n gantt.form_blocks._fill_lightbox_select(timeSelects, 0, constraintDate, map, config);\n\n var constraintType = task[mapping.constraint_type] || gantt.getConstraintType(task);\n typeSelect.value = constraintType;\n toggleTimeSelect(timeSelects, constraintType);\n };\n\n ConstraintControl.prototype.get_value = function (node, task, config) {\n var typeSelect = node.querySelector(\"[data-constraint-type-select] select\");\n var timeSelects = node.querySelectorAll(\"[data-constraint-time-select] select\");\n var constraintType = typeSelect.value;\n var constraintDate = null;\n\n if (!isNonTimedConstraint(constraintType)) {\n constraintDate = gantt.form_blocks.getTimePickerValue(timeSelects, config);\n }\n\n return {\n constraint_type: constraintType,\n constraint_date: constraintDate\n };\n };\n\n ConstraintControl.prototype.focus = function (node) {\n gantt._focus(node.querySelector(\"select\"));\n };\n\n return ConstraintControl;\n};","var __extends = require(\"../../../../utils/extends\");\n\nmodule.exports = function (gantt) {\n var _super = require(\"./select_control\")(gantt);\n\n function ParentControl() {\n var self = _super.apply(this, arguments) || this;\n return self;\n }\n\n __extends(ParentControl, _super);\n\n ParentControl.prototype.render = function (sns) {\n return _display(sns, false);\n };\n\n ParentControl.prototype.set_value = function (node, value, ev, config) {\n // GS-1051. If the value is `0`, the set_value function in the select control won't select \n // the first child because (0 || '') = '';\n if (value === 0) value = \"0\";\n var tmpDom = document.createElement(\"div\");\n tmpDom.innerHTML = _display(config, ev.id);\n var newOptions = tmpDom.removeChild(tmpDom.firstChild);\n node.onselect = null;\n node.parentNode.replaceChild(newOptions, node);\n return gantt.form_blocks.select.set_value.apply(gantt, [newOptions, value, ev, config]);\n };\n\n function _display(config, item_id) {\n var tasks = [],\n options = [];\n\n if (item_id) {\n tasks = gantt.getTaskByTime();\n\n if (config.allow_root) {\n tasks.unshift({\n id: gantt.config.root_id,\n text: config.root_label || \"\"\n });\n }\n\n tasks = _filter(tasks, config, item_id);\n\n if (config.sort) {\n tasks.sort(config.sort);\n }\n }\n\n var text = config.template || gantt.templates.task_text;\n\n for (var i = 0; i < tasks.length; i++) {\n var label = text.apply(gantt, [tasks[i].start_date, tasks[i].end_date, tasks[i]]);\n\n if (label === undefined) {\n label = \"\";\n }\n\n options.push({\n key: tasks[i].id,\n label: label\n });\n }\n\n config.options = options;\n config.map_to = config.map_to || \"parent\";\n return gantt.form_blocks.select.render.apply(this, arguments);\n }\n\n function _filter(options, config, item_id) {\n var filter = config.filter || function () {\n return true;\n };\n\n options = options.slice(0);\n\n for (var i = 0; i < options.length; i++) {\n var task = options[i];\n\n if (task.id == item_id || gantt.isChildOf(task.id, item_id) || filter(task.id, task) === false) {\n options.splice(i, 1);\n i--;\n }\n }\n\n return options;\n }\n\n return ParentControl;\n};","var __extends = require(\"../../../../utils/extends\");\n\nvar DurationFormatterNumeric = require(\"../../../common/duration_formatter_numeric\")[\"default\"];\n\nmodule.exports = function (gantt) {\n var _super = require(\"./base_control\")(gantt);\n\n function DurationControl() {\n var self = _super.apply(this, arguments) || this;\n return self;\n }\n\n function getFormatter(config) {\n return config.formatter || new DurationFormatterNumeric();\n }\n\n __extends(DurationControl, _super);\n\n DurationControl.prototype.render = function (sns) {\n var time = \"
\" + gantt.form_blocks.getTimePicker.call(this, sns) + \"
\";\n var label = \" \" + gantt.locale.labels[gantt.config.duration_unit + \"s\"] + \" \";\n var singleDate = sns.single_date ? \" style='display:none'\" : \"\";\n var readonly = sns.readonly ? \" disabled='disabled'\" : \"\";\n\n var ariaAttr = gantt._waiAria.lightboxDurationInputAttrString(sns);\n\n var durationInputClass = \"gantt_duration_value\";\n\n if (sns.formatter) {\n label = \"\";\n durationInputClass += \" gantt_duration_value_formatted\";\n }\n\n var duration = \"
\" + \"\" + \"\" + \"\" + label + \"\" + \"
\";\n var sectionClassName = \"gantt_section_time\";\n\n if (sns.name !== \"time\") {\n sectionClassName += \" gantt_section_\" + sns.name;\n }\n\n var html = \"
\" + time + \" \" + duration + \"
\";\n return html;\n };\n\n DurationControl.prototype.set_value = function (node, value, ev, config) {\n var s = node.getElementsByTagName(\"select\");\n var inps = node.getElementsByTagName(\"input\");\n var duration = inps[1];\n var btns = [inps[0], inps[2]];\n var endspan = node.getElementsByTagName(\"span\")[0];\n var map = config._time_format_order;\n var mapping;\n var start_date;\n var end_date;\n var duration_val;\n\n function _calc_date() {\n var start_date = _getStartDate.call(gantt, node, config);\n\n var duration = _getDuration.call(gantt, node, config);\n\n var end_date = gantt.calculateEndDate({\n start_date: start_date,\n duration: duration,\n task: ev\n });\n var template = gantt.templates.task_end_date || gantt.templates.task_date;\n endspan.innerHTML = template(end_date);\n }\n\n function _change_duration(step) {\n var value = duration.value;\n value = getFormatter(config).parse(value);\n if (window.isNaN(value)) value = 0;\n value += step;\n if (value < 1) value = 1;\n duration.value = getFormatter(config).format(value);\n\n _calc_date();\n }\n\n btns[0].onclick = gantt.bind(function () {\n _change_duration(-1 * gantt.config.duration_step);\n }, this);\n btns[1].onclick = gantt.bind(function () {\n _change_duration(1 * gantt.config.duration_step);\n }, this);\n s[0].onchange = _calc_date;\n s[1].onchange = _calc_date;\n s[2].onchange = _calc_date;\n if (s[3]) s[3].onchange = _calc_date;\n duration.onkeydown = gantt.bind(function (e) {\n var code;\n e = e || window.event;\n code = e.charCode || e.keyCode || e.which;\n\n if (code == gantt.constants.KEY_CODES.DOWN) {\n _change_duration(-1 * gantt.config.duration_step);\n\n return false;\n }\n\n if (code == gantt.constants.KEY_CODES.UP) {\n _change_duration(1 * gantt.config.duration_step);\n\n return false;\n }\n\n window.setTimeout(_calc_date, 1);\n }, this);\n duration.onchange = gantt.bind(_calc_date, this);\n mapping = gantt._resolve_default_mapping(config);\n if (typeof mapping === \"string\") mapping = {\n start_date: mapping\n };\n start_date = ev[mapping.start_date] || new Date();\n end_date = ev[mapping.end_date] || gantt.calculateEndDate({\n start_date: start_date,\n duration: 1,\n task: ev\n });\n duration_val = Math.round(ev[mapping.duration]) || gantt.calculateDuration({\n start_date: start_date,\n end_date: end_date,\n task: ev\n });\n duration_val = getFormatter(config).format(duration_val);\n\n gantt.form_blocks._fill_lightbox_select(s, 0, start_date, map, config);\n\n duration.value = duration_val;\n\n _calc_date();\n };\n\n DurationControl.prototype.get_value = function (node, ev, config) {\n var startDate = _getStartDate(node, config);\n\n var duration = _getDuration(node, config);\n\n var endDate = gantt.calculateEndDate({\n start_date: startDate,\n duration: duration,\n task: ev\n });\n\n if (typeof gantt._resolve_default_mapping(config) == \"string\") {\n return startDate;\n }\n\n return {\n start_date: startDate,\n end_date: endDate,\n duration: duration\n };\n };\n\n DurationControl.prototype.focus = function (node) {\n gantt._focus(node.getElementsByTagName(\"select\")[0]);\n };\n\n function _getStartDate(node, config) {\n var s = node.getElementsByTagName(\"select\");\n var map = config._time_format_order;\n var hours = 0;\n var minutes = 0;\n\n if (gantt.defined(map[3])) {\n var input = s[map[3]];\n var time = parseInt(input.value, 10);\n\n if (isNaN(time) && input.hasAttribute(\"data-value\")) {\n time = parseInt(input.getAttribute(\"data-value\"), 10);\n }\n\n hours = Math.floor(time / 60);\n minutes = time % 60;\n }\n\n return new Date(s[map[2]].value, s[map[1]].value, s[map[0]].value, hours, minutes);\n }\n\n function _getDuration(node, config) {\n var duration = node.getElementsByTagName(\"input\")[1];\n duration = getFormatter(config).parse(duration.value);\n if (!duration || window.isNaN(duration)) duration = 1;\n if (duration < 0) duration *= -1;\n return duration;\n }\n\n return DurationControl;\n};","var __extends = require(\"../../../../utils/extends\");\n\nmodule.exports = function (gantt) {\n var _super = require(\"./base_control\")(gantt);\n\n function RadioControl() {\n var self = _super.apply(this, arguments) || this;\n return self;\n }\n\n __extends(RadioControl, _super);\n\n RadioControl.prototype.render = function (sns) {\n var height = (sns.height || \"23\") + \"px\";\n var html = \"
\";\n\n if (sns.options && sns.options.length) {\n for (var i = 0; i < sns.options.length; i++) {\n html += \"\";\n }\n }\n\n html += \"
\";\n return html;\n };\n\n RadioControl.prototype.set_value = function (node, value, ev, sns) {\n var radio;\n if (!sns.options || !sns.options.length) return;\n radio = node.querySelector(\"input[type=radio][value='\" + value + \"']\") || node.querySelector(\"input[type=radio][value='\" + sns.default_value + \"']\");\n if (!radio) return;\n\n if (!node._dhx_onchange && sns.onchange) {\n node.onchange = sns.onchange;\n node._dhx_onchange = true;\n }\n\n radio.checked = true;\n };\n\n RadioControl.prototype.get_value = function (node, ev) {\n var result = node.querySelector(\"input[type=radio]:checked\");\n return result ? result.value : \"\";\n };\n\n RadioControl.prototype.focus = function (node) {\n gantt._focus(node.querySelector(\"input[type=radio]\"));\n };\n\n return RadioControl;\n};","var helpers = require(\"../../../../utils/helpers\");\n\nvar __extends = require(\"../../../../utils/extends\");\n\nmodule.exports = function (gantt) {\n var _super = require(\"./base_control\")(gantt);\n\n function CheckboxControl() {\n var self = _super.apply(this, arguments) || this;\n return self;\n }\n\n __extends(CheckboxControl, _super);\n\n CheckboxControl.prototype.render = function (sns) {\n var height = (sns.height || \"23\") + \"px\";\n var html = \"
\";\n\n if (sns.options && sns.options.length) {\n for (var i = 0; i < sns.options.length; i++) {\n html += \"\";\n }\n } else {\n sns.single_value = true;\n html += \"\";\n }\n\n html += \"
\";\n return html;\n };\n\n CheckboxControl.prototype.set_value = function (node, value, ev, sns) {\n var checkboxes = Array.prototype.slice.call(node.querySelectorAll(\"input[type=checkbox]\"));\n\n if (!node._dhx_onchange && sns.onchange) {\n node.onchange = sns.onchange;\n node._dhx_onchange = true;\n }\n\n if (sns.single_value) {\n var box = checkboxes[0];\n box.checked = !!value;\n } else {\n helpers.forEach(checkboxes, function (entry) {\n entry.checked = value ? value.indexOf(entry.value) >= 0 : false;\n });\n }\n };\n\n CheckboxControl.prototype.get_value = function (node, task, sns) {\n if (sns.single_value) {\n var box = node.querySelector(\"input[type=checkbox]\");\n return box.checked;\n } else {\n return helpers.arrayMap(Array.prototype.slice.call(node.querySelectorAll(\"input[type=checkbox]:checked\")), function (entry) {\n return entry.value;\n });\n }\n };\n\n CheckboxControl.prototype.focus = function (node) {\n gantt._focus(node.querySelector(\"input[type=checkbox]\"));\n };\n\n return CheckboxControl;\n};","var __extends = require(\"../../../../utils/extends\");\n\nmodule.exports = function (gantt) {\n var _super = require(\"./base_control\")(gantt);\n\n function TimeControl() {\n var self = _super.apply(this, arguments) || this;\n return self;\n }\n\n __extends(TimeControl, _super);\n\n TimeControl.prototype.render = function (sns) {\n var time = gantt.form_blocks.getTimePicker.call(this, sns);\n var sectionClassName = \"gantt_section_time\";\n\n if (sns.name !== \"time\") {\n sectionClassName += \" gantt_section_\" + sns.name;\n }\n\n var html = \"
\";\n html += time;\n\n if (sns.single_date) {\n time = gantt.form_blocks.getTimePicker.call(this, sns, true);\n html += \"\";\n } else {\n html += \"  –  \";\n }\n\n html += time;\n html += \"
\";\n return html;\n };\n\n TimeControl.prototype.set_value = function (node, value, ev, config) {\n var cfg = config;\n var s = node.getElementsByTagName(\"select\");\n var map = config._time_format_order;\n\n if (cfg.auto_end_date) {\n var _update_lightbox_select = function _update_lightbox_select() {\n start_date = new Date(s[map[2]].value, s[map[1]].value, s[map[0]].value, 0, 0);\n end_date = gantt.calculateEndDate({\n start_date: start_date,\n duration: 1,\n task: ev\n });\n\n gantt.form_blocks._fill_lightbox_select(s, map.size, end_date, map, cfg);\n };\n\n for (var i = 0; i < 4; i++) {\n s[i].onchange = _update_lightbox_select;\n }\n }\n\n var mapping = gantt._resolve_default_mapping(config);\n\n if (typeof mapping === \"string\") mapping = {\n start_date: mapping\n };\n var start_date = ev[mapping.start_date] || new Date();\n var end_date = ev[mapping.end_date] || gantt.calculateEndDate({\n start_date: start_date,\n duration: 1,\n task: ev\n });\n\n gantt.form_blocks._fill_lightbox_select(s, 0, start_date, map, cfg);\n\n gantt.form_blocks._fill_lightbox_select(s, map.size, end_date, map, cfg);\n };\n\n TimeControl.prototype.get_value = function (node, ev, config) {\n var selects = node.getElementsByTagName(\"select\");\n var startDate;\n var map = config._time_format_order;\n\n function _getEndDate(selects, map, startDate) {\n var endDate = gantt.form_blocks.getTimePickerValue(selects, config, map.size); // GS-1010: We need to add a way to obtain exact end_date for validation\n\n if (endDate <= startDate) {\n // when end date seems wrong\n if (config.autofix_end !== false || config.single_date) {\n // auto correct it in two cases - when the auto correction is not disabled, or when we have 'single date' control and the user don't have the UI to specify the end date\n return gantt.date.add(startDate, gantt._get_timepicker_step(), \"minute\");\n }\n }\n\n return endDate;\n }\n\n startDate = gantt.form_blocks.getTimePickerValue(selects, config);\n\n if (typeof gantt._resolve_default_mapping(config) === \"string\") {\n return startDate;\n }\n\n return {\n start_date: startDate,\n end_date: _getEndDate(selects, map, startDate)\n };\n };\n\n TimeControl.prototype.focus = function (node) {\n gantt._focus(node.getElementsByTagName(\"select\")[0]);\n };\n\n return TimeControl;\n};","var __extends = require(\"../../../../utils/extends\");\n\nmodule.exports = function (gantt) {\n var _super = require(\"./base_control\")(gantt);\n\n function TextareaControl() {\n var self = _super.apply(this, arguments) || this;\n return self;\n }\n\n __extends(TextareaControl, _super);\n\n TextareaControl.prototype.render = function (sns) {\n var height = (sns.height || \"130\") + \"px\";\n return \"
\";\n };\n\n TextareaControl.prototype.set_value = function (node, value) {\n gantt.form_blocks.textarea._get_input(node).value = value || \"\";\n };\n\n TextareaControl.prototype.get_value = function (node) {\n return gantt.form_blocks.textarea._get_input(node).value;\n };\n\n TextareaControl.prototype.focus = function (node) {\n var a = gantt.form_blocks.textarea._get_input(node);\n\n gantt._focus(a, true);\n };\n\n TextareaControl.prototype._get_input = function (node) {\n return node.querySelector(\"textarea\");\n };\n\n return TextareaControl;\n};","var __extends = require(\"../../../../utils/extends\");\n\nmodule.exports = function (gantt) {\n var _super = require(\"./base_control\")(gantt);\n\n function TemplateControl() {\n var self = _super.apply(this, arguments) || this;\n return self;\n }\n\n __extends(TemplateControl, _super);\n\n TemplateControl.prototype.render = function (sns) {\n var height = (sns.height || \"30\") + \"px\";\n return \"
\";\n };\n\n TemplateControl.prototype.set_value = function (node, value) {\n node.innerHTML = value || \"\";\n };\n\n TemplateControl.prototype.get_value = function (node) {\n return node.innerHTML || \"\";\n };\n\n TemplateControl.prototype.focus = function () {};\n\n return TemplateControl;\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nmodule.exports = function (gantt) {\n var domHelpers = require(\"../utils/dom_helpers\");\n\n var helpers = require(\"../../../utils/helpers\");\n\n var TemplateControl = require(\"./controls/template_control\")(gantt);\n\n var TextareaControl = require(\"./controls/textarea_control\")(gantt);\n\n var TimeControl = require(\"./controls/time_control\")(gantt);\n\n var SelectControl = require(\"./controls/select_control\")(gantt);\n\n var CheckboxControl = require(\"./controls/checkbox_control\")(gantt);\n\n var RadioControl = require(\"./controls/radio_control\")(gantt);\n\n var DurationControl = require(\"./controls/duration_control\")(gantt);\n\n var ParentControl = require(\"./controls/parent_control\")(gantt);\n\n var ResourcesControl = require(\"./controls/resources_control\")(gantt);\n\n var ConstraintControl = require(\"./controls/constraint_control\")(gantt);\n\n var TypeselectControl = require(\"./controls/typeselect_control\")(gantt);\n\n gantt._lightbox_methods = {};\n gantt._lightbox_template = \"
 
\"; // GS-1952. Attaching the lightbox to the BODY element is not considered secure.\n // Attach it to Gantt container for Salesforce and other secure environments\n\n gantt._lightbox_root = gantt.$root;\n\n function setParentNode() {\n var cspEnvironment = gantt.config.csp === true;\n var salesforceEnvironment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"] || '$shadowResolver$' in document.body;\n\n if (cspEnvironment || salesforceEnvironment) {\n gantt._lightbox_root = gantt.$root;\n } else {\n gantt._lightbox_root = document.body;\n }\n } //TODO: gantt._lightbox_id is changed from data.js and accessed from autoscheduling, check if it can be removed from gantt object\n\n\n var state = gantt.$services.getService(\"state\");\n state.registerProvider(\"lightbox\", function () {\n return {\n lightbox: gantt._lightbox_id\n };\n });\n\n gantt.showLightbox = function (id) {\n var task = this.getTask(id);\n\n if (!this.callEvent(\"onBeforeLightbox\", [id])) {\n if (gantt.isTaskExists(id) && gantt.getTask(id).$new) {\n //GS-2340 if 'onBeforeLightbox' returns 'false' need update the order in datastore\n this.$data.tasksStore._updateOrder();\n }\n\n return;\n }\n\n var box = this.getLightbox(this.getTaskType(task.type));\n\n this._center_lightbox(box);\n\n this.showCover();\n\n this._fill_lightbox(id, box);\n\n this._waiAria.lightboxVisibleAttr(box);\n\n this.callEvent(\"onLightbox\", [id]);\n };\n\n function _is_chart_visible(gantt) {\n var timeline = gantt.$ui.getView(\"timeline\");\n\n if (timeline && timeline.isVisible()) {\n return true;\n } else {\n return false;\n }\n }\n\n gantt._get_timepicker_step = function () {\n if (this.config.round_dnd_dates) {\n var step;\n\n if (_is_chart_visible(this)) {\n var scale = gantt.getScale();\n step = helpers.getSecondsInUnit(scale.unit) * scale.step / 60; //timepicker step is measured in minutes\n }\n\n if (!step || step >= 60 * 24) {\n step = this.config.time_step;\n }\n\n return step;\n }\n\n return this.config.time_step;\n };\n\n gantt.getLabel = function (property, key) {\n var sections = this._get_typed_lightbox_config();\n\n for (var i = 0; i < sections.length; i++) {\n if (sections[i].map_to == property) {\n var options = sections[i].options;\n\n for (var j = 0; j < options.length; j++) {\n if (options[j].key == key) {\n return options[j].label;\n }\n }\n }\n }\n\n return \"\";\n };\n\n gantt.updateCollection = function (list_name, collection) {\n collection = collection.slice(0);\n var list = gantt.serverList(list_name);\n if (!list) return false;\n list.splice(0, list.length);\n list.push.apply(list, collection || []);\n gantt.resetLightbox();\n };\n\n gantt.getLightboxType = function () {\n return this.getTaskType(this._lightbox_type);\n };\n\n gantt.getLightbox = function (type) {\n var lightboxDiv;\n var fullWidth;\n var html;\n var sns;\n var ds;\n var classNames = \"\";\n setParentNode();\n if (type === undefined) type = this.getLightboxType();\n\n if (!this._lightbox || this.getLightboxType() != this.getTaskType(type)) {\n this._lightbox_type = this.getTaskType(type);\n lightboxDiv = document.createElement(\"div\");\n classNames = \"gantt_cal_light\";\n fullWidth = this._is_lightbox_timepicker();\n if (gantt.config.wide_form) classNames += \" gantt_cal_light_wide\";\n\n if (fullWidth) {\n classNames += \" gantt_cal_light_full\";\n }\n\n lightboxDiv.className = classNames;\n lightboxDiv.style.visibility = \"hidden\";\n html = this._lightbox_template;\n html += getHtmlButtons(this.config.buttons_left);\n html += getHtmlButtons(this.config.buttons_right, true);\n lightboxDiv.innerHTML = html;\n\n gantt._waiAria.lightboxAttr(lightboxDiv);\n\n if (gantt.config.drag_lightbox) {\n lightboxDiv.firstChild.onmousedown = gantt._ready_to_dnd;\n\n lightboxDiv.firstChild.ontouchstart = function (e) {\n gantt._ready_to_dnd(e.touches[0]);\n };\n\n lightboxDiv.firstChild.onselectstart = function () {\n return false;\n };\n\n lightboxDiv.firstChild.style.cursor = \"pointer\";\n\n gantt._init_dnd_events();\n } // GS-1428: If there is lightbox node, we need to remove it from the DOM\n\n\n if (this._lightbox) {\n this.resetLightbox();\n }\n\n gantt._lightbox_root.insertBefore(lightboxDiv, gantt._lightbox_root.firstChild);\n\n this._lightbox = lightboxDiv;\n sns = this._get_typed_lightbox_config(type);\n html = this._render_sections(sns);\n ds = lightboxDiv.querySelector(\"div.gantt_cal_larea\"); //GS-1131. If gantt_cal_larea is displayed, Firefox renders buttons incorrectly;\n\n var backup_overflow = ds.style.overflow;\n ds.style.overflow = 'hidden';\n ds.innerHTML = html;\n bindLabelsToInputs(sns); //sizes\n\n this.resizeLightbox();\n ds.style.overflow = backup_overflow;\n\n this._init_lightbox_events(this);\n\n lightboxDiv.style.display = \"none\";\n lightboxDiv.style.visibility = \"visible\";\n }\n\n return this._lightbox;\n };\n\n gantt._render_sections = function (sns) {\n var html = \"\";\n\n for (var i = 0; i < sns.length; i++) {\n var block = this.form_blocks[sns[i].type];\n if (!block) continue; //ignore incorrect blocks\n\n sns[i].id = \"area_\" + this.uid();\n var display = sns[i].hidden ? \" style='display:none'\" : \"\";\n var button = \"\";\n\n if (sns[i].button) {\n button = \"
\" + this.locale.labels[\"button_\" + sns[i].button] + \"
\";\n }\n\n if (this.config.wide_form) {\n html += \"
\";\n }\n\n html += \"
\" + block.render.call(this, sns[i]);\n html += \"
\";\n }\n\n return html;\n };\n\n gantt.resizeLightbox = function () {\n if (!this._lightbox) return;\n\n var con = this._lightbox.querySelector(\".gantt_cal_larea\");\n\n con.style.height = \"0px\";\n con.style.height = con.scrollHeight + \"px\";\n this._lightbox.style.height = con.scrollHeight + this.config.lightbox_additional_height + \"px\";\n con.style.height = con.scrollHeight + \"px\"; //it is incredible , how ugly IE can be\n };\n\n gantt._center_lightbox = function (box) {\n if (box) {\n box.style.display = \"block\";\n var scroll_top = window.pageYOffset || gantt._lightbox_root.scrollTop || document.documentElement.scrollTop;\n var scroll_left = window.pageXOffset || gantt._lightbox_root.scrollLeft || document.documentElement.scrollLeft;\n var view_height = window.innerHeight || document.documentElement.clientHeight; // Adjust the position in the Salesforce environment because Gantt container has the relative position\n\n if (gantt._lightbox_root == gantt.$root) {\n var containerTop = document.documentElement.scrollTop + gantt.$root.getBoundingClientRect().top;\n scroll_top -= containerTop;\n }\n\n if (scroll_top) {\n // vertical scroll on window\n box.style.top = Math.round(scroll_top + Math.max((view_height - box.offsetHeight) / 2, 0)) + \"px\";\n } else {\n // vertical scroll on body\n box.style.top = Math.round(Math.max((view_height - box.offsetHeight) / 2, 0) + 9) + \"px\"; // +9 for compatibility with auto tests\n } // not quite accurate but used for compatibility reasons\n\n\n if (document.documentElement.scrollWidth > gantt._lightbox_root.offsetWidth) // if horizontal scroll on the window\n box.style.left = Math.round(scroll_left + (gantt._lightbox_root.offsetWidth - box.offsetWidth) / 2) + \"px\";else // horizontal scroll on the body\n box.style.left = Math.round((gantt._lightbox_root.offsetWidth - box.offsetWidth) / 2) + \"px\";\n }\n };\n\n gantt.showCover = function () {\n if (this._cover) return;\n this._cover = document.createElement(\"DIV\");\n this._cover.className = \"gantt_cal_cover\";\n var rootElement = gantt._lightbox_root || gantt.$root;\n rootElement.appendChild(this._cover);\n };\n\n gantt.event(window, \"deviceorientation\", function () {\n if (gantt.getState().lightbox) {\n gantt._center_lightbox(gantt.getLightbox());\n }\n });\n\n gantt._init_lightbox_events = function () {\n gantt.lightbox_events = {};\n\n gantt.lightbox_events.gantt_save_btn = function () {\n gantt._save_lightbox();\n };\n\n gantt.lightbox_events.gantt_delete_btn = function () {\n gantt._lightbox_current_type = null;\n if (!gantt.callEvent(\"onLightboxDelete\", [gantt._lightbox_id])) return;\n\n if (gantt.isTaskExists(gantt._lightbox_id)) {\n gantt.$click.buttons[\"delete\"](gantt._lightbox_id);\n } else {\n gantt.hideLightbox();\n }\n };\n\n gantt.lightbox_events.gantt_cancel_btn = function () {\n gantt._cancel_lightbox();\n };\n\n gantt.lightbox_events[\"default\"] = function (e, src) {\n if (src.getAttribute(\"data-dhx-button\")) {\n gantt.callEvent(\"onLightboxButton\", [src.className, src, e]);\n } else {\n var index, block, sec;\n var className = domHelpers.getClassName(src);\n\n if (className.indexOf(\"gantt_custom_button\") != -1) {\n if (className.indexOf(\"gantt_custom_button_\") != -1) {\n index = src.parentNode.getAttribute(\"data-index\");\n sec = src;\n\n while (sec && domHelpers.getClassName(sec).indexOf(\"gantt_cal_lsection\") == -1) {\n sec = sec.parentNode;\n }\n } else {\n index = src.getAttribute(\"data-index\");\n sec = src.parentNode;\n src = src.firstChild;\n }\n }\n\n var sections = gantt._get_typed_lightbox_config();\n\n if (index) {\n index = index * 1;\n block = gantt.form_blocks[sections[index * 1].type];\n block.button_click(index, src, sec, sec.nextSibling);\n }\n }\n };\n\n this.event(gantt.getLightbox(), \"click\", function (e) {\n e = e || window.event;\n var src = domHelpers.getTargetNode(e);\n var className = domHelpers.getClassName(src);\n\n if (!className) {\n src = src.previousSibling;\n className = domHelpers.getClassName(src);\n }\n\n if (src && className && className.indexOf(\"gantt_btn_set\") === 0) {\n src = src.firstChild;\n className = domHelpers.getClassName(src);\n }\n\n if (src && className) {\n var func = gantt.defined(gantt.lightbox_events[src.className]) ? gantt.lightbox_events[src.className] : gantt.lightbox_events[\"default\"];\n return func(e, src);\n }\n\n return false;\n });\n\n gantt.getLightbox().onkeydown = function (e) {\n var event = e || window.event;\n var target = e.target || e.srcElement;\n var buttonTarget = domHelpers.getClassName(target).indexOf(\"gantt_btn_set\") > -1;\n\n switch ((e || event).keyCode) {\n case gantt.constants.KEY_CODES.SPACE:\n {\n if ((e || event).shiftKey) return;\n\n if (buttonTarget && target.click) {\n target.click();\n }\n\n break;\n }\n\n case gantt.keys.edit_save:\n if ((e || event).shiftKey) return;\n\n if (buttonTarget && target.click) {\n target.click();\n } else {\n gantt._save_lightbox();\n }\n\n break;\n\n case gantt.keys.edit_cancel:\n gantt._cancel_lightbox();\n\n break;\n\n default:\n break;\n }\n };\n };\n\n gantt._cancel_lightbox = function () {\n var task = this.getLightboxValues();\n gantt._lightbox_current_type = null;\n this.callEvent(\"onLightboxCancel\", [this._lightbox_id, task.$new]);\n\n if (gantt.isTaskExists(task.id) && task.$new) {\n this.silent(function () {\n gantt.$data.tasksStore.removeItem(task.id);\n\n gantt._update_flags(task.id, null);\n });\n this.refreshData();\n }\n\n this.hideLightbox();\n };\n\n gantt._save_lightbox = function () {\n var task = this.getLightboxValues();\n gantt._lightbox_current_type = null;\n if (!this.callEvent(\"onLightboxSave\", [this._lightbox_id, task, !!task.$new])) return; // GS-2170. Do not recalculate the indexes and dates of other tasks\n // as they will be recalculated in the `refreshData`\n\n gantt.$data.tasksStore._skipTaskRecalculation = \"lightbox\";\n\n if (task.$new) {\n delete task.$new;\n this.addTask(task, task.parent, this.getTaskIndex(task.id));\n } else if (this.isTaskExists(task.id)) {\n this.mixin(this.getTask(task.id), task, true);\n this.refreshTask(task.id);\n this.updateTask(task.id);\n }\n\n gantt.$data.tasksStore._skipTaskRecalculation = false;\n this.refreshData(); // TODO: do we need any blockable events here to prevent closing lightbox?\n\n this.hideLightbox();\n };\n\n gantt._resolve_default_mapping = function (section) {\n var mapping = section.map_to;\n var time_controls = {\n \"time\": true,\n \"time_optional\": true,\n \"duration\": true,\n \"duration_optional\": true\n };\n\n if (time_controls[section.type]) {\n if (section.map_to == \"auto\") {\n mapping = {\n start_date: \"start_date\",\n end_date: \"end_date\",\n duration: \"duration\"\n };\n } else if (typeof section.map_to === \"string\") {\n mapping = {\n start_date: section.map_to\n };\n }\n } else if (section.type === \"constraint\") {\n if (!section.map_to || typeof section.map_to === \"string\") {\n mapping = {\n constraint_type: \"constraint_type\",\n constraint_date: \"constraint_date\"\n };\n }\n }\n\n return mapping;\n };\n\n gantt.getLightboxValues = function () {\n var task = {};\n\n if (gantt.isTaskExists(this._lightbox_id)) {\n task = this.mixin({}, this.getTask(this._lightbox_id));\n }\n\n var sns = this._get_typed_lightbox_config();\n\n for (var i = 0; i < sns.length; i++) {\n var node = gantt._lightbox_root.querySelector(\"#\" + sns[i].id);\n\n node = node ? node.nextSibling : node;\n var block = this.form_blocks[sns[i].type];\n if (!block) continue;\n var res = block.get_value.call(this, node, task, sns[i]);\n\n var map_to = gantt._resolve_default_mapping(sns[i]);\n\n if (typeof map_to == \"string\" && map_to != \"auto\") {\n task[map_to] = res;\n } else if (_typeof(map_to) == \"object\") {\n for (var property in map_to) {\n if (map_to[property]) task[map_to[property]] = res[property];\n }\n }\n } // GS-1282 We need to preserve the task type even if the lightbox doesn't have the typeselect section\n // GS-2460 set the current type from selector\n\n\n if (gantt._lightbox_current_type) {\n task.type = gantt._lightbox_current_type;\n }\n\n return task;\n };\n\n gantt.hideLightbox = function () {\n var box = this.getLightbox();\n if (box) box.style.display = \"none\";\n\n this._waiAria.lightboxHiddenAttr(box);\n\n this._lightbox_id = null;\n this.hideCover();\n this.callEvent(\"onAfterLightbox\", []);\n };\n\n gantt.hideCover = function () {\n if (this._cover) this._cover.parentNode.removeChild(this._cover);\n this._cover = null;\n };\n\n gantt.resetLightbox = function () {\n if (gantt._lightbox && !gantt._custom_lightbox) gantt._lightbox.parentNode.removeChild(gantt._lightbox);\n gantt._lightbox = null;\n gantt.hideCover();\n };\n\n gantt._set_lightbox_values = function (data, box) {\n var task = data;\n var s = box.getElementsByTagName(\"span\");\n var lightboxHeader = [];\n\n if (gantt.templates.lightbox_header) {\n lightboxHeader.push(\"\");\n lightboxHeader.push(gantt.templates.lightbox_header(task.start_date, task.end_date, task));\n s[1].innerHTML = \"\";\n s[2].innerHTML = gantt.templates.lightbox_header(task.start_date, task.end_date, task);\n } else {\n lightboxHeader.push(this.templates.task_time(task.start_date, task.end_date, task));\n lightboxHeader.push(String(this.templates.task_text(task.start_date, task.end_date, task) || \"\").substr(0, 70)); //IE6 fix\n\n s[1].innerHTML = this.templates.task_time(task.start_date, task.end_date, task);\n s[2].innerHTML = String(this.templates.task_text(task.start_date, task.end_date, task) || \"\").substr(0, 70); //IE6 fix\n }\n\n s[1].innerHTML = lightboxHeader[0];\n s[2].innerHTML = lightboxHeader[1];\n\n gantt._waiAria.lightboxHeader(box, lightboxHeader.join(\" \"));\n\n var sns = this._get_typed_lightbox_config(this.getLightboxType());\n\n for (var i = 0; i < sns.length; i++) {\n var section = sns[i];\n\n if (!this.form_blocks[section.type]) {\n continue; //skip incorrect sections, same check is done during rendering\n }\n\n var node = gantt._lightbox_root.querySelector(\"#\" + section.id).nextSibling;\n\n var block = this.form_blocks[section.type];\n\n var map_to = gantt._resolve_default_mapping(sns[i]);\n\n var value = this.defined(task[map_to]) ? task[map_to] : section.default_value;\n block.set_value.call(gantt, node, value, task, section);\n if (section.focus) block.focus.call(gantt, node);\n }\n\n if (gantt.isTaskExists(data.id)) {\n gantt._lightbox_id = data.id;\n }\n };\n\n gantt._fill_lightbox = function (id, box) {\n var task = this.getTask(id);\n\n this._set_lightbox_values(task, box);\n };\n\n gantt.getLightboxSection = function (name) {\n var config = this._get_typed_lightbox_config();\n\n var i = 0;\n\n for (i; i < config.length; i++) {\n if (config[i].name == name) break;\n }\n\n var section = config[i];\n if (!section) return null;\n if (!this._lightbox) this.getLightbox();\n\n var header = gantt._lightbox_root.querySelector(\"#\" + section.id);\n\n var node = header.nextSibling;\n var result = {\n section: section,\n header: header,\n node: node,\n getValue: function getValue(ev) {\n return gantt.form_blocks[section.type].get_value.call(gantt, node, ev || {}, section);\n },\n setValue: function setValue(value, ev) {\n return gantt.form_blocks[section.type].set_value.call(gantt, node, value, ev || {}, section);\n }\n };\n var handler = this._lightbox_methods[\"get_\" + section.type + \"_control\"];\n return handler ? handler(result) : result;\n };\n\n gantt._lightbox_methods.get_template_control = function (result) {\n result.control = result.node;\n return result;\n };\n\n gantt._lightbox_methods.get_select_control = function (result) {\n result.control = result.node.getElementsByTagName(\"select\")[0];\n return result;\n };\n\n gantt._lightbox_methods.get_textarea_control = function (result) {\n result.control = result.node.getElementsByTagName(\"textarea\")[0];\n return result;\n };\n\n gantt._lightbox_methods.get_time_control = function (result) {\n result.control = result.node.getElementsByTagName(\"select\"); // array\n\n return result;\n };\n\n gantt._init_dnd_events = function () {\n var eventElement = gantt._lightbox_root;\n this.event(eventElement, \"mousemove\", gantt._move_while_dnd);\n this.event(eventElement, \"mouseup\", gantt._finish_dnd);\n this.event(eventElement, \"touchmove\", function (e) {\n gantt._move_while_dnd(e.touches[0]);\n });\n this.event(eventElement, \"touchend\", function (e) {\n gantt._finish_dnd(e.touches[0]);\n }); // GS-1952: In Salesforce environment, the lightbox is attached to the Gantt container. \n // So when Gantt is reinitialized, the events are no longer attached to the Gantt container.\n // gantt._init_dnd_events = function () {\n // };\n };\n\n gantt._move_while_dnd = function (event) {\n if (gantt._dnd_start_lb) {\n if (!document.gantt_unselectable) {\n gantt._lightbox_root.className += \" gantt_unselectable\";\n document.gantt_unselectable = true;\n }\n\n var lb = gantt.getLightbox();\n var now = [event.pageX, event.pageY];\n lb.style.top = gantt._lb_start[1] + now[1] - gantt._dnd_start_lb[1] + \"px\";\n lb.style.left = gantt._lb_start[0] + now[0] - gantt._dnd_start_lb[0] + \"px\";\n }\n };\n\n gantt._ready_to_dnd = function (event) {\n var lb = gantt.getLightbox();\n gantt._lb_start = [parseInt(lb.style.left, 10), parseInt(lb.style.top, 10)];\n gantt._dnd_start_lb = [event.pageX, event.pageY];\n };\n\n gantt._finish_dnd = function () {\n if (gantt._lb_start) {\n gantt._lb_start = gantt._dnd_start_lb = false;\n gantt._lightbox_root.className = gantt._lightbox_root.className.replace(\" gantt_unselectable\", \"\");\n document.gantt_unselectable = false;\n }\n };\n\n gantt._focus = function (node, select) {\n if (node && node.focus) {\n if (gantt.config.touch) {//do not focus editor, to prevent auto-zoom\n } else {\n try {\n if (select && node.select) node.select();\n node.focus();\n } catch (e) {// silent errors\n }\n }\n }\n };\n\n gantt.form_blocks = {\n getTimePicker: function getTimePicker(sns, hidden) {\n var html = \"\";\n var cfg = this.config;\n var i;\n var options;\n var ariaAttrs;\n var readonly;\n var display;\n var settings = {\n first: 0,\n last: 24 * 60,\n date: this.date.date_part(new Date(gantt._min_date.valueOf())),\n timeFormat: getTimeFormat(sns)\n }; // map: default order => real one\n\n sns._time_format_order = {\n size: 0\n };\n\n if (gantt.config.limit_time_select) {\n settings.first = 60 * cfg.first_hour;\n settings.last = 60 * cfg.last_hour + 1;\n settings.date.setHours(cfg.first_hour);\n }\n\n for (i = 0; i < settings.timeFormat.length; i++) {\n // adding spaces between selects\n if (i > 0) {\n html += \" \";\n }\n\n options = getHtmlTimePickerOptions(sns, i, settings);\n\n if (options) {\n ariaAttrs = gantt._waiAria.lightboxSelectAttrString(settings.timeFormat[i]);\n readonly = sns.readonly ? \"disabled='disabled'\" : \"\";\n display = hidden ? \" style='display:none' \" : \"\";\n html += \"\";\n }\n }\n\n return html;\n },\n getTimePickerValue: function getTimePickerValue(selects, config, offset) {\n var map = config._time_format_order;\n var needSetTime = gantt.defined(map[3]);\n var time;\n var hours = 0;\n var minutes = 0;\n var mapOffset = offset || 0;\n\n if (needSetTime) {\n time = parseInt(selects[map[3] + mapOffset].value, 10);\n hours = Math.floor(time / 60);\n minutes = time % 60;\n }\n\n return new Date(selects[map[2] + mapOffset].value, selects[map[1] + mapOffset].value, selects[map[0] + mapOffset].value, hours, minutes);\n },\n _fill_lightbox_select: function _fill_lightbox_select(s, i, d, map) {\n s[i + map[0]].value = d.getDate();\n s[i + map[1]].value = d.getMonth();\n s[i + map[2]].value = d.getFullYear();\n\n if (gantt.defined(map[3])) {\n var v = d.getHours() * 60 + d.getMinutes();\n v = Math.round(v / gantt._get_timepicker_step()) * gantt._get_timepicker_step();\n var input = s[i + map[3]];\n input.value = v; //in case option not shown\n\n input.setAttribute(\"data-value\", v);\n }\n },\n template: new TemplateControl(),\n textarea: new TextareaControl(),\n select: new SelectControl(),\n time: new TimeControl(),\n duration: new DurationControl(),\n parent: new ParentControl(),\n radio: new RadioControl(),\n checkbox: new CheckboxControl(),\n resources: new ResourcesControl(),\n constraint: new ConstraintControl(),\n typeselect: new TypeselectControl()\n };\n\n gantt._is_lightbox_timepicker = function () {\n var s = this._get_typed_lightbox_config();\n\n for (var i = 0; i < s.length; i++) {\n if (s[i].name == \"time\" && s[i].type == \"time\") return true;\n }\n\n return false;\n };\n\n gantt._simple_confirm = function (message, title, callback, ok) {\n if (!message) return callback();\n var opts = {\n text: message\n };\n if (title) opts.title = title;\n\n if (ok) {\n opts.ok = ok;\n }\n\n if (callback) {\n opts.callback = function (result) {\n if (result) callback();\n };\n }\n\n gantt.confirm(opts);\n };\n\n function _get_type_name(type_value) {\n for (var i in this.config.types) {\n if (this.config.types[i] == type_value) {\n return i;\n }\n }\n\n return \"task\";\n }\n\n gantt._get_typed_lightbox_config = function (type) {\n if (type === undefined) {\n type = this.getLightboxType();\n }\n\n var field = _get_type_name.call(this, type);\n\n if (gantt.config.lightbox[field + \"_sections\"]) {\n return gantt.config.lightbox[field + \"_sections\"];\n } else {\n return gantt.config.lightbox.sections;\n }\n };\n\n gantt._silent_redraw_lightbox = function (type) {\n var oldType = this.getLightboxType();\n\n if (this.getState().lightbox) {\n var taskId = this.getState().lightbox;\n var formData = this.getLightboxValues(),\n task = this.copy(this.getTask(taskId));\n this.resetLightbox();\n var updTask = this.mixin(task, formData, true);\n var box = this.getLightbox(type ? type : undefined);\n\n this._center_lightbox(this.getLightbox());\n\n this._set_lightbox_values(updTask, box);\n\n this.showCover();\n } else {\n this.resetLightbox();\n this.getLightbox(type ? type : undefined);\n }\n\n this.callEvent(\"onLightboxChange\", [oldType, this.getLightboxType()]);\n };\n\n function bindLabelsToInputs(sns) {\n var section;\n var label;\n var labelBlock;\n var inputBlock;\n var input;\n var i;\n\n for (i = 0; i < sns.length; i++) {\n section = sns[i];\n labelBlock = gantt._lightbox_root.querySelector(\"#\" + section.id);\n if (!section.id || !labelBlock) continue;\n label = labelBlock.querySelector(\"label\");\n inputBlock = labelBlock.nextSibling;\n if (!inputBlock) continue;\n input = inputBlock.querySelector(\"input, select, textarea\");\n\n if (input) {\n input.id = input.id || \"input_\" + gantt.uid();\n section.inputId = input.id;\n label.setAttribute(\"for\", section.inputId);\n }\n }\n }\n\n function getHtmlButtons(buttons, floatRight) {\n var button;\n var ariaAttr;\n var html = \"\";\n var i;\n\n for (i = 0; i < buttons.length; i++) {\n // needed to migrate from 'dhx_something' to 'gantt_something' naming in a lightbox\n button = gantt.config._migrate_buttons[buttons[i]] ? gantt.config._migrate_buttons[buttons[i]] : buttons[i];\n ariaAttr = gantt._waiAria.lightboxButtonAttrString(button);\n html += \"
\" + gantt.locale.labels[button] + \"
\";\n }\n\n return html;\n }\n\n function getTimeFormat(sns) {\n var scale;\n var unit;\n var result;\n if (sns.time_format) return sns.time_format; // default order\n\n result = [\"%d\", \"%m\", \"%Y\"];\n scale = gantt.getScale();\n unit = scale ? scale.unit : gantt.config.duration_unit;\n\n if (helpers.getSecondsInUnit(unit) < helpers.getSecondsInUnit(\"day\")) {\n result.push(\"%H:%i\");\n }\n\n return result;\n }\n\n function getHtmlTimePickerOptions(sns, index, settings) {\n var range;\n var offset;\n var start_year;\n var end_year;\n var i;\n var time;\n var diff;\n var tdate;\n var html = \"\";\n\n switch (settings.timeFormat[index]) {\n case \"%Y\":\n sns._time_format_order[2] = index;\n sns._time_format_order.size++; //year\n\n if (sns.year_range) {\n if (!isNaN(sns.year_range)) {\n range = sns.year_range;\n } else if (sns.year_range.push) {\n // if\n start_year = sns.year_range[0];\n end_year = sns.year_range[1];\n }\n }\n\n range = range || 10;\n offset = offset || Math.floor(range / 2);\n start_year = start_year || settings.date.getFullYear() - offset;\n end_year = end_year || gantt.getState().max_date.getFullYear() + offset;\n\n for (i = start_year; i < end_year; i++) {\n html += \"\";\n }\n\n break;\n\n case \"%m\":\n sns._time_format_order[1] = index;\n sns._time_format_order.size++; //month\n\n for (i = 0; i < 12; i++) {\n html += \"\";\n }\n\n break;\n\n case \"%d\":\n sns._time_format_order[0] = index;\n sns._time_format_order.size++; //days\n\n for (i = 1; i < 32; i++) {\n html += \"\";\n }\n\n break;\n\n case \"%H:%i\":\n // var last = 24*60, first = 0;\n sns._time_format_order[3] = index;\n sns._time_format_order.size++; //hours\n\n i = settings.first;\n tdate = settings.date.getDate();\n sns._time_values = [];\n\n while (i < settings.last) {\n time = gantt.templates.time_picker(settings.date);\n html += \"\";\n\n sns._time_values.push(i);\n\n settings.date.setTime(settings.date.valueOf() + gantt._get_timepicker_step() * 60 * 1000);\n diff = settings.date.getDate() != tdate ? 1 : 0; // moved or not to the next day\n\n i = diff * 24 * 60 + settings.date.getHours() * 60 + settings.date.getMinutes();\n }\n\n break;\n\n default:\n break;\n }\n\n return html;\n }\n};","module.exports = function (gantt) {\n gantt.config.touch_drag = 500; //nearly immediate dnd\n\n gantt.config.touch = true;\n gantt.config.touch_feedback = true;\n gantt.config.touch_feedback_duration = 1;\n gantt._prevent_touch_scroll = false;\n\n gantt._touch_feedback = function () {\n if (gantt.config.touch_feedback) {\n if (navigator.vibrate) navigator.vibrate(gantt.config.touch_feedback_duration);\n }\n };\n\n gantt.attachEvent(\"onGanttReady\", function () {\n if (gantt.$container) {\n addTouchEvents();\n }\n });\n gantt.attachEvent(\"onGanttLayoutReady\", function () {\n if (gantt.$container) {\n gantt.attachEvent(\"onGanttRender\", addTouchEvents, {\n once: true\n });\n }\n });\n\n function addTouchEvents() {\n if (gantt.config.touch != \"force\") gantt.config.touch = gantt.config.touch && (navigator.userAgent.indexOf(\"Mobile\") != -1 || navigator.userAgent.indexOf(\"iPad\") != -1 || navigator.userAgent.indexOf(\"Android\") != -1 || navigator.userAgent.indexOf(\"Touch\") != -1) || navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1;\n\n if (gantt.config.touch) {\n var touchEventsSupported = true;\n\n try {\n document.createEvent(\"TouchEvent\");\n } catch (e) {\n touchEventsSupported = false;\n }\n\n if (touchEventsSupported) {\n gantt._touch_events([\"touchmove\", \"touchstart\", \"touchend\"], function (ev) {\n if (ev.touches && ev.touches.length > 1) return null;\n if (ev.touches[0]) return {\n target: ev.target,\n pageX: ev.touches[0].pageX,\n pageY: ev.touches[0].pageY,\n clientX: ev.touches[0].clientX,\n clientY: ev.touches[0].clientY\n };else return ev;\n }, function () {\n return false;\n });\n } else if (window.navigator.pointerEnabled) {\n gantt._touch_events([\"pointermove\", \"pointerdown\", \"pointerup\"], function (ev) {\n if (ev.pointerType == \"mouse\") return null;\n return ev;\n }, function (ev) {\n return !ev || ev.pointerType == \"mouse\";\n });\n } else if (window.navigator.msPointerEnabled) {\n gantt._touch_events([\"MSPointerMove\", \"MSPointerDown\", \"MSPointerUp\"], function (ev) {\n if (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\n return ev;\n }, function (ev) {\n return !ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE;\n });\n }\n }\n }\n\n function findTargetView(event) {\n var allViews = gantt.$layout.getCellsByType(\"viewCell\");\n\n for (var i = 0; i < allViews.length; i++) {\n var box = allViews[i].$view.getBoundingClientRect();\n\n if (event.clientX >= box.left && event.clientX <= box.right && event.clientY <= box.bottom && event.clientY >= box.top) {\n return allViews[i];\n }\n }\n }\n\n function getScrollState(view) {\n var scrollX = view.$config.scrollX ? gantt.$ui.getView(view.$config.scrollX) : null;\n var scrollY = view.$config.scrollY ? gantt.$ui.getView(view.$config.scrollY) : null;\n var scrollState = {\n x: null,\n y: null\n };\n\n if (scrollX) {\n var state = scrollX.getScrollState();\n\n if (state.visible) {\n scrollState.x = scrollX.$view.scrollLeft;\n }\n }\n\n if (scrollY) {\n var state = scrollY.getScrollState();\n\n if (state.visible) {\n scrollState.y = scrollY.$view.scrollTop;\n }\n }\n\n return scrollState;\n }\n\n function scrollView(view, left, top) {\n var scrollX = view.$config.scrollX ? gantt.$ui.getView(view.$config.scrollX) : null;\n var scrollY = view.$config.scrollY ? gantt.$ui.getView(view.$config.scrollY) : null;\n\n if (scrollX) {\n scrollX.scrollTo(left, null);\n }\n\n if (scrollY) {\n scrollY.scrollTo(null, top);\n }\n }\n\n function getTaskDND() {\n var tasksDnD;\n\n if (gantt.$ui.getView(\"timeline\")) {\n tasksDnD = gantt.$ui.getView(\"timeline\")._tasks_dnd;\n }\n\n return tasksDnD;\n }\n\n var touchHandlers = []; //we can't use native scrolling, as we need to sync momentum between different parts\n //so we will block native scroll and use the custom one\n //in future we can add custom momentum\n\n gantt._touch_events = function (names, accessor, ignore) {\n //webkit on android need to be handled separately\n var dblclicktime = 0;\n var actionMode = false;\n var scrollMode = false;\n var actionStart = null;\n var scrollState;\n var longTapTimer = null;\n var currentDndId = null;\n var dndNodes = [];\n var targetView = null;\n var multiTouchEvents = {};\n\n for (var i = 0; i < touchHandlers.length; i++) {\n gantt.eventRemove(touchHandlers[i][0], touchHandlers[i][1], touchHandlers[i][2]);\n }\n\n touchHandlers = []; //touch move\n\n touchHandlers.push([gantt.$container, names[0], function (e) {\n var tasksDnD = getTaskDND();\n if (ignore(e)) return; //ignore common and scrolling moves\n\n if (!actionMode) return;\n if (longTapTimer) clearTimeout(longTapTimer);\n var source = accessor(e);\n\n if (tasksDnD && (tasksDnD.drag.id || tasksDnD.drag.start_drag)) {\n tasksDnD.on_mouse_move(source);\n if (e.preventDefault) e.preventDefault();\n e.cancelBubble = true;\n return false;\n }\n\n if (!gantt._prevent_touch_scroll) {\n if (source && actionStart) {\n var dx = actionStart.pageX - source.pageX;\n var dy = actionStart.pageY - source.pageY;\n\n if (!scrollMode && (Math.abs(dx) > 5 || Math.abs(dy) > 5)) {\n scrollMode = true; //gantt._touch_scroll_active = scroll_mode = true;\n\n dblclicktime = 0;\n\n if (targetView) {\n scrollState = getScrollState(targetView);\n } else {\n scrollState = gantt.getScrollState();\n }\n }\n\n if (scrollMode) {\n var newScrollState;\n var scrollX = scrollState.x + dx;\n var scrollY = scrollState.y + dy;\n\n if (targetView) {\n scrollView(targetView, scrollX, scrollY);\n newScrollState = getScrollState(targetView);\n } else {\n gantt.scrollTo(scrollX, scrollY);\n newScrollState = gantt.getScrollState();\n }\n\n if (scrollState.x != newScrollState.x && dy > 2 * dx || scrollState.y != newScrollState.y && dx > 2 * dy) {\n return block_action(e);\n }\n }\n }\n\n return block_action(e);\n }\n\n return true;\n }]); // prevent page drag on touch move\n\n try {\n document.addEventListener('touchmove', function (e) {\n if (gantt._touch_drag) {\n block_action(e);\n }\n }, {\n passive: false\n });\n } catch (e) {\n // eslint-disable-next-line no-console\n console.warn(\"Cannot prevent touch event for the page drag\");\n } //block touch context menu in IE10\n\n\n touchHandlers.push([this.$container, \"contextmenu\", function (e) {\n if (actionMode) return block_action(e);\n }]); //touch start\n\n touchHandlers.push([this.$container, names[1], function (e) {\n multiTouchEvents = e.touches.length; // block pull-to-refresh\n\n if (document && document.body) {\n document.body.classList.add(\"gantt_touch_active\");\n }\n\n if (ignore(e)) return;\n\n if (e.touches && e.touches.length > 1) {\n actionMode = false;\n return;\n }\n\n actionStart = accessor(e);\n targetView = findTargetView(actionStart);\n\n if (!gantt._locate_css(actionStart, \"gantt_hor_scroll\") && !gantt._locate_css(actionStart, \"gantt_ver_scroll\")) {\n actionMode = true;\n }\n\n var tasksDnD = getTaskDND(); //long tap\n\n longTapTimer = setTimeout(function () {\n var taskId = gantt.locate(actionStart);\n\n if (tasksDnD && taskId && !gantt._locate_css(actionStart, \"gantt_link_control\") && !gantt._locate_css(actionStart, \"gantt_grid_data\")) {\n tasksDnD.on_mouse_down(actionStart);\n\n if (tasksDnD.drag && tasksDnD.drag.start_drag) {\n // we need that as touch events break if the target node is removed from the DOM\n cloneTaskRendered(taskId);\n\n tasksDnD._start_dnd(actionStart);\n\n gantt._touch_drag = true;\n gantt.refreshTask(taskId);\n\n gantt._touch_feedback();\n }\n }\n\n longTapTimer = null;\n }, gantt.config.touch_drag);\n }]); //touch end\n\n touchHandlers.push([this.$container, names[2], function (e) {\n if (document && document.body) {\n document.body.classList.remove(\"gantt_touch_active\");\n }\n\n if (ignore(e)) return;\n if (longTapTimer) clearTimeout(longTapTimer);\n gantt._touch_drag = false;\n actionMode = false;\n var source = accessor(e);\n var tasksDnD = getTaskDND();\n if (tasksDnD) tasksDnD.on_mouse_up(source);\n\n if (currentDndId && gantt.isTaskExists(currentDndId)) {\n gantt.refreshTask(currentDndId);\n\n if (dndNodes.length) {\n dndNodes.forEach(function (node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n });\n\n gantt._touch_feedback();\n }\n } //gantt._touch_scroll_active = action_mode = scroll_mode = false;\n\n\n actionMode = scrollMode = false;\n dndNodes = [];\n currentDndId = null; //dbl-tap handling\n\n if (actionStart && dblclicktime) {\n var now = new Date(); // doubletap shouldn't happen with multitouch\n\n if (now - dblclicktime < 500 && multiTouchEvents <= 1) {\n var mouseEvents = gantt.$services.getService(\"mouseEvents\");\n mouseEvents.onDoubleClick(actionStart);\n block_action(e);\n } else dblclicktime = now;\n } else {\n dblclicktime = new Date();\n }\n }]);\n\n for (var i = 0; i < touchHandlers.length; i++) {\n gantt.event(touchHandlers[i][0], touchHandlers[i][1], touchHandlers[i][2]);\n } //common helper, prevents event\n\n\n function block_action(e) {\n if (e && e.preventDefault && e.cancelable) {\n e.preventDefault();\n }\n\n e.cancelBubble = true;\n return false;\n }\n\n function cloneTaskRendered(taskId) {\n var renders = gantt._getTaskLayers();\n\n var task = gantt.getTask(taskId);\n\n if (task) {\n var visible = gantt.isTaskVisible(taskId);\n\n if (visible) {\n currentDndId = taskId;\n\n for (var _i = 0; _i < renders.length; _i++) {\n task = renders[_i].rendered[taskId];\n\n if (task && task.getAttribute(gantt.config.task_attribute) && task.getAttribute(gantt.config.task_attribute) == taskId) {\n var copy = task.cloneNode(true);\n dndNodes.push(task);\n renders[_i].rendered[taskId] = copy;\n task.style.display = \"none\";\n copy.className += \" gantt_drag_move \";\n task.parentNode.appendChild(copy); //return copy;\n }\n }\n } else if (task.$split_subtask) {\n var renderedParent = task.$rendered_parent;\n visible = gantt.isTaskVisible(renderedParent);\n\n if (!visible) {\n return;\n }\n\n currentDndId = taskId;\n\n for (var _i2 = 0; _i2 < renders.length; _i2++) {\n var parent = renders[_i2].rendered[renderedParent];\n var taskNode = void 0;\n\n if (parent && parent.childNodes) {\n taskNode = parent.querySelector(\"[\".concat(gantt.config.task_attribute, \"=\\\"\").concat(task.id, \"\\\"]\"));\n }\n\n if (taskNode) {\n // move the child node to a different parent as the task bar will be repainted\n // and the initial node will be lost\n var _copy = taskNode.cloneNode(true);\n\n taskNode.parentNode.appendChild(_copy);\n gantt.$task_bars.appendChild(taskNode);\n taskNode.style.display = \"none\"; // don't add the node as rendered otherwise it will be lost:\n // renders[i].rendered[taskId] = taskNode;\n // instead, add it to dndNodes as its elements will be removed after drag\n\n dndNodes.push(taskNode);\n taskNode = null;\n }\n }\n }\n }\n }\n };\n};","import * as env from \"../../../utils/env\";\r\nimport * as eventable from \"../../../utils/eventable\";\r\nimport { IScale, TModifierKeys } from \"../../common/config\";\r\n\r\ninterface ITimelineZoomConfig {\r\n\thandler?: (e: Event) => {};\r\n\tstartDate?: Date;\r\n\tendDate?: Date;\r\n\tlevels: IZoomLevel[];\r\n\tactiveLevelIndex?: number;\r\n\twidthStep?: number;\r\n\tminColumnWidth?: number;\r\n\tmaxColumnWidth?: number;\r\n\tuseKey?: \"ctrlKey\" | \"altKey\" | \"shiftKey\";\r\n\ttrigger?: \"wheel\" | null | undefined;\r\n\telement?: Element | (() => Element);\r\n}\r\n\r\nconst USE_KEY = [\"ctrlKey\", \"altKey\", \"shiftKey\", \"metaKey\"];\r\n\r\ninterface IZoomLevel {\r\n\tname?: string;\r\n\tscale_height?: number;\r\n\tmin_column_width: number;\r\n\tscales: IScale[];\r\n}\r\n\r\nconst _defaultScales = [\r\n\t[\r\n\t\t{\r\n\t\t\tunit: \"month\",\r\n\t\t\tdate: \"%M\",\r\n\t\t\tstep: 1\r\n\t\t},\r\n\t\t{\r\n\t\t\tunit: \"day\",\r\n\t\t\tdate: \"%d\",\r\n\t\t\tstep: 1\r\n\t\t}\r\n\t],\r\n\t[\r\n\t\t{\r\n\t\t\tunit: \"day\",\r\n\t\t\tdate: \"%d %M\",\r\n\t\t\tstep: 1\r\n\t\t}\r\n\t],\r\n\t[\r\n\t\t{\r\n\t\t\tunit: \"day\",\r\n\t\t\tdate: \"%d %M\",\r\n\t\t\tstep: 1\r\n\t\t},\r\n\t\t{\r\n\t\t\tunit: \"hour\",\r\n\t\t\tdate: \"%H:00\",\r\n\t\t\tstep: 8\r\n\t\t},\r\n\t],\r\n\t[\r\n\t\t{\r\n\t\t\tunit: \"day\",\r\n\t\t\tdate: \"%d %M\",\r\n\t\t\tstep: 1\r\n\t\t},\r\n\t\t{\r\n\t\t\tunit: \"hour\",\r\n\t\t\tdate: \"%H:00\",\r\n\t\t\tstep: 1\r\n\t\t},\r\n\t],\r\n];\r\n\r\nexport default class TimelineZoom {\r\n\tpublic attachEvent: (eventName: string, handler: () => void) => string;\r\n\tpublic callEvent: (eventName: string, args: any[]) => any;\r\n\tpublic detachEvent: (eventName: string) => any;\r\n\tprotected _initialStartDate: Date;\r\n\tprotected _initialEndDate: Date;\r\n\tprotected _activeLevelIndex: number;\r\n\tprotected _levels: IZoomLevel[];\r\n\tprotected _handler: (e: any) => void;\r\n\tprotected $gantt;\r\n\tprotected _widthStep: number;\r\n\tprotected _minColumnWidth: number;\r\n\tprotected _maxColumnWidth: number;\r\n\tprotected _useKey: TModifierKeys;\r\n\tprotected _visibleDate: Date;\r\n\tprotected _initialized: boolean;\r\n\tprotected _domEvents: any;\r\n\r\n\tconstructor(gantt) {\r\n\t\tthis.$gantt = gantt;\r\n\t\tthis._domEvents = this.$gantt._createDomEventScope();\r\n\t}\r\n\r\n\tpublic init(config: ITimelineZoomConfig) {\r\n\t\t// GS-1354 and GS-1318. If we check the headless mode using the function,\r\n\t\t// it will return false when Gantt is not initialized, but we may want to do it later\r\n\t\tif(this.$gantt.env.isNode){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._initialStartDate = config.startDate;\r\n\t\tthis._initialEndDate = config.endDate;\r\n\t\tthis._activeLevelIndex = config.activeLevelIndex ? config.activeLevelIndex : 0;\r\n\t\tthis._levels = this._mapScales(config.levels || _defaultScales);\r\n\t\tthis._handler = config.handler || this._defaultHandler;\r\n\t\tthis._minColumnWidth = config.minColumnWidth || 60;\r\n\t\tthis._maxColumnWidth = config.maxColumnWidth || 240;\r\n\t\tthis._widthStep = config.widthStep || 3/8 * config.minColumnWidth;\r\n\t\tthis._useKey = config.useKey;\r\n\r\n\t\tif(!this._initialized){\r\n\t\t\teventable(this);\r\n\t\t\tthis.$gantt.attachEvent(\"onGanttScroll\", () => {\r\n\t\t\t\tthis._getVisibleDate();\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis._domEvents.detachAll();\r\n\r\n\t\tif(config.trigger === \"wheel\"){\r\n\t\t\tif(this.$gantt.$root){\r\n\t\t\t\tthis._attachWheelEvent(config);\r\n\t\t\t}else{\r\n\t\t\t\tthis.$gantt.attachEvent(\"onGanttReady\", () => {\r\n\t\t\t\t\tthis._attachWheelEvent(config);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._initialized = true;\r\n\t\tthis.setLevel(this._activeLevelIndex);\r\n\t}\r\n\r\n\tpublic zoomIn = () => {\r\n\t\tconst index = this.getCurrentLevel() - 1;\r\n\t\tif(index < 0){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.setLevel(index);\r\n\t}\r\n\r\n\tpublic zoomOut = () => {\r\n\t\tconst index = this.getCurrentLevel() + 1;\r\n\t\tif(index > this._levels.length - 1){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.setLevel(index);\r\n\t}\r\n\r\n\tpublic getCurrentLevel = () => {\r\n\t\treturn this._activeLevelIndex;\r\n\t}\r\n\r\n\tpublic getLevels = () => {\r\n\t\treturn this._levels;\r\n\t}\r\n\r\n\tpublic setLevel = (level: number|string) => {\r\n\t\tconst zoomLevel = this._getZoomIndexByName(level);\r\n\r\n\t\tif(zoomLevel === -1){\r\n\t\t\tthis.$gantt.assert(zoomLevel !== -1, \"Invalid zoom level for gantt.ext.zoom.setLevel. \" + level + \" is not an expected value.\");\r\n\t\t}\r\n\t\tthis._setLevel(zoomLevel, 0);\r\n\t}\r\n\r\n\tprotected _getZoomIndexByName = (levelName: number|string) => {\r\n\t\tlet zoomLevel:number = -1;\r\n\t\tif(typeof levelName === \"string\"){\r\n\t\t\tif(!isNaN(Number(levelName)) && this._levels[Number(levelName)]){\r\n\t\t\t\tzoomLevel = Number(levelName);\r\n\t\t\t}else{\r\n\t\t\t\tfor(let i = 0; i < this._levels.length; i++){\r\n\t\t\t\t\tif(this._levels[i].name === levelName){\r\n\t\t\t\t\t\tzoomLevel = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tzoomLevel = levelName;\r\n\t\t}\r\n\t\treturn zoomLevel;\r\n\t}\r\n\r\n\tprotected _mapScales(levels: IScale[][] | any): IZoomLevel[]{\r\n\t\treturn levels.map((l) => {\r\n\t\t\tif(Array.isArray(l)){\r\n\t\t\t\treturn {\r\n\t\t\t\t\tscales: l\r\n\t\t\t\t};\r\n\t\t\t}else{\r\n\t\t\t\treturn l;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprotected _getVisibleDate = () => {\r\n\t\t// GS-1450. Don't try to get the visible date if there is no timeline\r\n\t\tif (!this.$gantt.$task){\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tconst scrollPos = this.$gantt.getScrollState().x;\r\n\t\tconst viewPort = this.$gantt.$task.offsetWidth;\r\n\t\tthis._visibleDate = this.$gantt.dateFromPos(scrollPos + viewPort/2);\r\n\t}\r\n\r\n\tprotected _setLevel = (level: number, cursorOffset: number) => {\r\n\t\tthis._activeLevelIndex = level;\r\n\r\n\t\tconst gantt = this.$gantt;\r\n\t\tconst nextConfig = gantt.copy(this._levels[this._activeLevelIndex]);\r\n\t\tconst chartConfig = gantt.copy(nextConfig);\r\n\t\tdelete chartConfig.name;\r\n\r\n\t\tgantt.mixin(gantt.config, chartConfig, true);\r\n\r\n\t\tconst isRendered = !!gantt.$root && !!gantt.$task;\r\n\r\n\t\tif(isRendered){\r\n\t\t\tif(cursorOffset){\r\n\t\t\t\tconst cursorDate = this.$gantt.dateFromPos(cursorOffset + this.$gantt.getScrollState().x);\r\n\t\t\t\tthis.$gantt.render();\r\n\t\t\t\tconst newPosition = this.$gantt.posFromDate(cursorDate);\r\n\t\t\t\tthis.$gantt.scrollTo(newPosition - cursorOffset);\r\n\t\t\t}else{\r\n\t\t\t\tconst viewPort = this.$gantt.$task.offsetWidth;\r\n\t\t\t\tif(!this._visibleDate){\r\n\t\t\t\t\tthis._getVisibleDate();\r\n\t\t\t\t}\r\n\t\t\t\tconst middleDate = this._visibleDate;\r\n\t\t\t\tthis.$gantt.render();\r\n\t\t\t\tconst newPosition = this.$gantt.posFromDate(middleDate);\r\n\t\t\t\tthis.$gantt.scrollTo(newPosition - viewPort/2);\r\n\t\t\t}\r\n\r\n\t\t\tthis.callEvent(\"onAfterZoom\", [this._activeLevelIndex, nextConfig]);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _attachWheelEvent = (config) => {\r\n\t\tconst event = env.isFF ? \"wheel\" : \"mousewheel\";\r\n\t\tlet el: Element;\r\n\t\tif(typeof config.element === \"function\"){\r\n\t\t\tel = config.element();\r\n\t\t}else{\r\n\t\t\tel = config.element as Element;\r\n\t\t}\r\n\t\tif (!el){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._domEvents.attach(el, event, this.$gantt.bind(function(e) {\r\n\t\t\tif (this._useKey) {\r\n\t\t\t\tif (USE_KEY.indexOf(this._useKey) < 0) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!e[this._useKey]) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (typeof this._handler === \"function\") {\r\n\t\t\t\tthis._handler.apply(this, [e]);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}, this), {passive: false});\r\n\t}\r\n\r\n\tprivate _defaultHandler = (e: any):void => {\r\n\t\tconst timelineOffset = this.$gantt.$task.getBoundingClientRect().x;\r\n\t\tconst cursorOffset = e.clientX - timelineOffset;\r\n\t\tconst wheelY = this.$gantt.env.isFF ? (e.deltaY*-40) : e.wheelDelta;\r\n\t\tlet wheelUp = false;\r\n\t\tif (wheelY > 0) {\r\n\t\t\twheelUp = true;\r\n\t\t}\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t\tthis._setScaleSettings(wheelUp, cursorOffset);\r\n\t}\r\n\r\n\tprivate _setScaleSettings(wheelUp: boolean, cursorOffset: number) {\r\n\t\tif (wheelUp) {\r\n\t\t\tthis._stepUp(cursorOffset);\r\n\t\t} else {\r\n\t\t\tthis._stepDown(cursorOffset);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _setScaleDates = () => {\r\n\t\tif(this._initialStartDate && this._initialEndDate){\r\n\t\t\tthis.$gantt.config.start_date = this._initialStartDate;\r\n\t\t\tthis.$gantt.config.end_date = this._initialEndDate;\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _stepUp(cursorOffset) {\r\n\t\tif (this._activeLevelIndex >= this._levels.length - 1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet nextLevel = this._activeLevelIndex;\r\n\t\tthis._setScaleDates();\r\n\r\n\t\tif(this._widthStep){\r\n\t\t\tlet newColumnWidth = this.$gantt.config.min_column_width + this._widthStep;\r\n\t\t\tif (newColumnWidth > this._maxColumnWidth) {\r\n\t\t\t\tnewColumnWidth = this._minColumnWidth;\r\n\t\t\t\tnextLevel++;\r\n\t\t\t}\r\n\r\n\t\t\tthis.$gantt.config.min_column_width = newColumnWidth;\r\n\t\t}else{\r\n\t\t\tnextLevel++;\r\n\t\t}\r\n\t\tthis._setLevel(nextLevel, cursorOffset);\r\n\t}\r\n\tprivate _stepDown(cursorOffset) {\r\n\t\tif (this._activeLevelIndex < 1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet nextLevel = this._activeLevelIndex;\r\n\t\tthis._setScaleDates();\r\n\r\n\t\tif(this._widthStep){\r\n\t\t\tlet newColumnWidth = this.$gantt.config.min_column_width - this._widthStep;\r\n\t\t\tif (newColumnWidth < this._minColumnWidth) {\r\n\t\t\t\tnewColumnWidth = this._maxColumnWidth;\r\n\t\t\t\tnextLevel--;\r\n\t\t\t}\r\n\t\t\tthis.$gantt.config.min_column_width = newColumnWidth;\r\n\t\t}else{\r\n\t\t\tnextLevel--;\r\n\t\t}\r\n\t\tthis._setLevel(nextLevel, cursorOffset);\r\n\t}\r\n}","if (window.dhtmlx) {\n if (!window.dhtmlx.attaches) window.dhtmlx.attaches = {};\n\n window.dhtmlx.attaches.attachGantt = function (start, end, gantt) {\n var obj = document.createElement(\"DIV\");\n gantt = gantt || window.gantt;\n obj.id = \"gantt_\" + gantt.uid();\n obj.style.width = \"100%\";\n obj.style.height = \"100%\";\n obj.cmp = \"grid\";\n document.body.appendChild(obj);\n this.attachObject(obj.id);\n this.dataType = \"gantt\";\n this.dataObj = gantt;\n var that = this.vs[this.av];\n that.grid = gantt;\n gantt.init(obj.id, start, end);\n obj.firstChild.style.border = \"none\";\n that.gridId = obj.id;\n that.gridObj = obj;\n var method_name = \"_viewRestore\";\n return this.vs[this[method_name]()].grid;\n };\n}\n\nif (typeof window.dhtmlXCellObject != \"undefined\") {\n window.dhtmlXCellObject.prototype.attachGantt = function (start, end, gantt) {\n gantt = gantt || window.gantt;\n var obj = document.createElement(\"DIV\");\n obj.id = \"gantt_\" + gantt.uid();\n obj.style.width = \"100%\";\n obj.style.height = \"100%\";\n obj.cmp = \"grid\";\n document.body.appendChild(obj);\n this.attachObject(obj.id);\n this.dataType = \"gantt\";\n this.dataObj = gantt;\n gantt.init(obj.id, start, end);\n obj.firstChild.style.border = \"none\";\n obj = null;\n this.callEvent(\"_onContentAttach\", []);\n return this.dataObj;\n };\n}\n\nmodule.exports = null;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nif (window.jQuery) {\n (function ($) {\n var methods = [];\n\n $.fn.dhx_gantt = function (config) {\n config = config || {};\n\n if (typeof config === 'string') {\n if (methods[config]) {\n return methods[config].apply(this, []);\n } else {\n $.error('Method ' + config + ' does not exist on jQuery.dhx_gantt');\n }\n } else {\n var views = [];\n this.each(function () {\n if (this && this.getAttribute) {\n if (!this.gantt && !(window.gantt.$root == this)) {\n var newgantt = window.gantt.$container && window.Gantt ? window.Gantt.getGanttInstance() : window.gantt;\n\n for (var key in config) {\n if (key != \"data\") newgantt.config[key] = config[key];\n }\n\n newgantt.init(this);\n if (config.data) newgantt.parse(config.data);\n views.push(newgantt);\n } else views.push(_typeof(this.gantt) == \"object\" ? this.gantt : window.gantt);\n }\n });\n if (views.length === 1) return views[0];\n return views;\n }\n };\n })(window.jQuery);\n}\n\nmodule.exports = null;","var domHelpers = require(\"../utils/dom_helpers\");\n\nvar isHeadless = require(\"../../../utils/is_headless\");\n\nmodule.exports = function (gantt) {\n var scrollRange = 50,\n scrollStep = 30,\n scrollDelay = 10,\n scrollSpeed = 50;\n var interval = null,\n isMove = false,\n delayTimeout = null,\n startPos = {\n started: false\n },\n eventPos = {};\n\n function isDisplayed(element) {\n return element && domHelpers.isChildOf(element, gantt.$root) && element.offsetHeight;\n }\n\n function getAutoscrollContainer() {\n var element;\n\n if (isDisplayed(gantt.$task)) {\n element = gantt.$task;\n } else if (isDisplayed(gantt.$grid)) {\n element = gantt.$grid;\n } else {\n element = gantt.$root;\n }\n\n return element;\n }\n\n function isScrollState() {\n var dragMarker = !!document.querySelector(\".gantt_drag_marker\");\n var isResize = !!document.querySelector(\".gantt_drag_marker.gantt_grid_resize_area\") || !!document.querySelector(\".gantt_drag_marker.gantt_row_grid_resize_area\");\n var isLink = !!document.querySelector(\".gantt_link_direction\");\n var state = gantt.getState();\n var isClickDrag = state.autoscroll;\n isMove = dragMarker && !isResize && !isLink;\n return !(!state.drag_mode && !dragMarker || isResize) || isClickDrag;\n }\n\n function defineDelayTimeout(state) {\n if (delayTimeout) {\n clearTimeout(delayTimeout);\n delayTimeout = null;\n }\n\n if (state) {\n var speed = gantt.config.autoscroll_speed;\n if (speed && speed < 10) // limit speed value to 10\n speed = 10;\n delayTimeout = setTimeout(function () {\n interval = setInterval(tick, speed || scrollSpeed);\n }, gantt.config.autoscroll_delay || scrollDelay);\n }\n }\n\n function defineScrollInterval(state) {\n if (state) {\n defineDelayTimeout(true);\n\n if (!startPos.started) {\n startPos.x = eventPos.x;\n startPos.y = eventPos.y;\n startPos.started = true;\n }\n } else {\n if (interval) {\n clearInterval(interval);\n interval = null;\n }\n\n defineDelayTimeout(false);\n startPos.started = false;\n }\n }\n\n function autoscrollInterval(event) {\n var isScroll = isScrollState();\n\n if ((interval || delayTimeout) && !isScroll) {\n defineScrollInterval(false);\n }\n\n if (!gantt.config.autoscroll || !isScroll) {\n return false;\n }\n\n eventPos = {\n x: event.clientX,\n y: event.clientY\n }; // if it is a mobile device, we need to detect the touch event coords\n\n if (event.type == \"touchmove\") {\n eventPos.x = event.targetTouches[0].clientX;\n eventPos.y = event.targetTouches[0].clientY;\n }\n\n if (!interval && isScroll) {\n defineScrollInterval(true);\n }\n }\n\n function tick() {\n if (!isScrollState()) {\n defineScrollInterval(false);\n return false;\n }\n\n var container = getAutoscrollContainer();\n\n if (!container) {\n return;\n } // GS-1150: if we reorder or resize something in the grid, we should obtain the grid container\n\n\n var gridDrag = false;\n var gridMarkers = [\".gantt_drag_marker.gantt_grid_resize_area\", \".gantt_drag_marker .gantt_row.gantt_row_task\", \".gantt_drag_marker.gantt_grid_dnd_marker\"];\n gridMarkers.forEach(function (selector) {\n gridDrag = gridDrag || !!document.querySelector(selector);\n });\n\n if (gridDrag) {\n container = gantt.$grid;\n }\n\n var box = domHelpers.getNodePosition(container);\n var posX = eventPos.x - box.x;\n var posY = eventPos.y - box.y + window.scrollY; // GS-1315: window.scrollY here and below for the elements above Gantt\n\n var scrollLeft = isMove ? 0 : need_scroll(posX, box.width, startPos.x - box.x);\n var scrollTop = need_scroll(posY, box.height, startPos.y - box.y + window.scrollY);\n var scrollState = gantt.getScrollState();\n var currentScrollTop = scrollState.y,\n scrollOuterHeight = scrollState.inner_height,\n scrollInnerHeight = scrollState.height,\n currentScrollLeft = scrollState.x,\n scrollOuterWidth = scrollState.inner_width,\n scrollInnerWidth = scrollState.width; // do scrolling only if we have scrollable area to do so\n\n if (scrollTop && !scrollOuterHeight) {\n scrollTop = 0;\n } else if (scrollTop < 0 && !currentScrollTop) {\n scrollTop = 0;\n } else if (scrollTop > 0 && currentScrollTop + scrollOuterHeight >= scrollInnerHeight + 2) {\n scrollTop = 0;\n }\n\n if (scrollLeft && !scrollOuterWidth) {\n scrollLeft = 0;\n } else if (scrollLeft < 0 && !currentScrollLeft) {\n scrollLeft = 0;\n } else if (scrollLeft > 0 && currentScrollLeft + scrollOuterWidth >= scrollInnerWidth) {\n scrollLeft = 0;\n }\n\n var step = gantt.config.autoscroll_step;\n if (step && step < 2) // limit step value to 2\n step = 2;\n scrollLeft = scrollLeft * (step || scrollStep);\n scrollTop = scrollTop * (step || scrollStep);\n\n if (scrollLeft || scrollTop) {\n scroll(scrollLeft, scrollTop);\n }\n }\n\n function need_scroll(pos, boxSize, startCoord) {\n if (pos - scrollRange < 0 && pos < startCoord) return -1;else if (pos > boxSize - scrollRange && pos > startCoord) return 1;\n return 0;\n }\n\n function scroll(left, top) {\n var scrollState = gantt.getScrollState();\n var scrollLeft = null,\n scrollTop = null;\n\n if (left) {\n scrollLeft = scrollState.x + left;\n scrollLeft = Math.min(scrollState.width, scrollLeft);\n scrollLeft = Math.max(0, scrollLeft);\n }\n\n if (top) {\n scrollTop = scrollState.y + top;\n scrollTop = Math.min(scrollState.height, scrollTop);\n scrollTop = Math.max(0, scrollTop);\n }\n\n gantt.scrollTo(scrollLeft, scrollTop);\n }\n\n gantt.attachEvent(\"onGanttReady\", function () {\n if (!isHeadless(gantt)) {\n var eventElement = domHelpers.getRootNode(gantt.$root) || document.body;\n gantt.eventRemove(eventElement, \"mousemove\", autoscrollInterval);\n gantt.event(eventElement, \"mousemove\", autoscrollInterval);\n gantt.eventRemove(eventElement, \"touchmove\", autoscrollInterval);\n gantt.event(eventElement, \"touchmove\", autoscrollInterval);\n gantt.eventRemove(eventElement, \"pointermove\", autoscrollInterval);\n gantt.event(eventElement, \"pointermove\", autoscrollInterval);\n }\n });\n gantt.attachEvent(\"onDestroy\", function () {\n defineScrollInterval(false);\n });\n};","module.exports = function (gantt) {\n if (!gantt.ext) {\n gantt.ext = {};\n }\n\n var modules = [require(\"./autoscroll\"), require(\"./jquery_hooks\"), require(\"./dhtmlx_hooks\")];\n\n for (var i = 0; i < modules.length; i++) {\n if (modules[i]) modules[i](gantt);\n }\n\n var TimelineZoom = require(\"./timeline_zoom\")[\"default\"];\n\n gantt.ext.zoom = new TimelineZoom(gantt);\n};","module.exports = function (gantt) {\n gantt.skins[\"contrast_white\"] = {\n config: {\n grid_width: 360,\n row_height: 35,\n scale_height: 35,\n link_line_width: 2,\n link_arrow_size: 6,\n lightbox_additional_height: 75\n },\n _second_column_width: 100,\n _third_column_width: 80\n };\n};","module.exports = function (gantt) {\n gantt.skins[\"contrast_black\"] = {\n config: {\n grid_width: 360,\n row_height: 35,\n scale_height: 35,\n link_line_width: 2,\n link_arrow_size: 6,\n lightbox_additional_height: 75\n },\n _second_column_width: 100,\n _third_column_width: 80\n };\n};","module.exports = function (gantt) {\n gantt.skins.material = {\n config: {\n grid_width: 411,\n row_height: 34,\n task_height_offset: 6,\n scale_height: 36,\n link_line_width: 2,\n link_arrow_size: 6,\n lightbox_additional_height: 80\n },\n _second_column_width: 110,\n _third_column_width: 75,\n _redefine_lightbox_buttons: {\n \"buttons_left\": [\"dhx_delete_btn\"],\n \"buttons_right\": [\"dhx_save_btn\", \"dhx_cancel_btn\"]\n }\n };\n gantt.attachEvent(\"onAfterTaskDrag\", function (id) {\n var t = gantt.getTaskNode(id);\n\n if (t) {\n t.className += \" gantt_drag_animation\";\n setTimeout(function () {\n var indx = t.className.indexOf(\" gantt_drag_animation\");\n\n if (indx > -1) {\n t.className = t.className.slice(0, indx);\n }\n }, 200);\n }\n });\n};","module.exports = function (gantt) {\n gantt.skins.broadway = {\n config: {\n grid_width: 360,\n row_height: 35,\n scale_height: 35,\n link_line_width: 1,\n link_arrow_size: 7,\n lightbox_additional_height: 86\n },\n _second_column_width: 90,\n _third_column_width: 80,\n _lightbox_template: \"
 
\",\n _config_buttons_left: {},\n _config_buttons_right: {\n \"gantt_delete_btn\": \"icon_delete\",\n \"gantt_save_btn\": \"icon_save\"\n }\n };\n};","module.exports = function (gantt) {\n gantt.skins.terrace = {\n config: {\n grid_width: 360,\n row_height: 35,\n scale_height: 35,\n link_line_width: 2,\n link_arrow_size: 6,\n lightbox_additional_height: 75\n },\n _second_column_width: 90,\n _third_column_width: 70\n };\n};","module.exports = function (gantt) {\n gantt.skins.meadow = {\n config: {\n grid_width: 350,\n row_height: 27,\n scale_height: 30,\n link_line_width: 2,\n link_arrow_size: 6,\n lightbox_additional_height: 72\n },\n _second_column_width: 95,\n _third_column_width: 80\n };\n};","module.exports = function (gantt) {\n gantt.skins.skyblue = {\n config: {\n grid_width: 350,\n row_height: 27,\n scale_height: 27,\n link_line_width: 1,\n link_arrow_size: 8,\n lightbox_additional_height: 75\n },\n _second_column_width: 95,\n _third_column_width: 80\n };\n};","function _configure(col, data, force) {\n for (var key in data) {\n if (typeof col[key] == \"undefined\" || force) col[key] = data[key];\n }\n}\n\nfunction _get_skin(force, gantt) {\n var skin = gantt.skin;\n\n if (!skin || force) {\n var links = document.getElementsByTagName(\"link\");\n\n for (var i = 0; i < links.length; i++) {\n var res = links[i].href.match(\"dhtmlxgantt_([a-z_]+).css\");\n\n if (res) {\n if (gantt.skins[res[1]] || !skin) {\n skin = res[1];\n break;\n }\n }\n }\n }\n\n gantt.skin = skin || \"terrace\";\n var skinset = gantt.skins[gantt.skin] || gantt.skins[\"terrace\"]; //apply skin related settings\n\n _configure(gantt.config, skinset.config, force);\n\n var config = gantt.getGridColumns();\n if (config[1] && !gantt.defined(config[1].width)) config[1].width = skinset._second_column_width;\n if (config[2] && !gantt.defined(config[2].width)) config[2].width = skinset._third_column_width;\n\n for (var i = 0; i < config.length; i++) {\n var column = config[i];\n\n if (column.name == \"add\") {\n if (!column.width) {\n column.width = 44;\n }\n\n if (!(gantt.defined(column.min_width) && gantt.defined(column.max_width))) {\n column.min_width = column.min_width || column.width;\n column.max_width = column.max_width || column.width;\n }\n\n if (column.min_width) column.min_width = +column.min_width;\n if (column.max_width) column.max_width = +column.max_width;\n\n if (column.width) {\n column.width = +column.width;\n column.width = column.min_width && column.min_width > column.width ? column.min_width : column.width;\n column.width = column.max_width && column.max_width < column.width ? column.max_width : column.width;\n }\n }\n }\n\n if (skinset.config.task_height) {\n gantt.config.task_height = skinset.config.task_height || \"full\";\n }\n\n if (skinset.config.bar_height) {\n gantt.config.bar_height = skinset.config.bar_height || \"full\";\n }\n\n if (skinset._lightbox_template) gantt._lightbox_template = skinset._lightbox_template;\n\n if (skinset._redefine_lightbox_buttons) {\n gantt.config.buttons_right = skinset._redefine_lightbox_buttons[\"buttons_right\"];\n gantt.config.buttons_left = skinset._redefine_lightbox_buttons[\"buttons_left\"];\n }\n\n gantt.resetLightbox();\n}\n\nmodule.exports = function (gantt) {\n if (!gantt.resetSkin) {\n gantt.resetSkin = function () {\n this.skin = \"\";\n\n _get_skin(true, this);\n };\n\n gantt.skins = {};\n gantt.attachEvent(\"onGanttLayoutReady\", function () {\n _get_skin(false, this);\n });\n }\n};","function createLayoutFacade() {\n function getTimeline(gantt) {\n return gantt.$ui.getView(\"timeline\");\n }\n\n function getGrid(gantt) {\n return gantt.$ui.getView(\"grid\");\n }\n\n function getBaseCell(gantt) {\n var timeline = getTimeline(gantt);\n\n if (timeline && !timeline.$config.hidden) {\n return timeline;\n } else {\n var grid = getGrid(gantt);\n\n if (grid && !grid.$config.hidden) {\n return grid;\n } else {\n return null;\n }\n }\n }\n\n function getVerticalScrollbar(gantt) {\n var baseCell = null; // GS-1150: if we reorder or resize something in the grid, we should obtain the grid container\n\n var gridDrag = false;\n var gridMarkers = [\".gantt_drag_marker.gantt_grid_resize_area\", \".gantt_drag_marker .gantt_row.gantt_row_task\", \".gantt_drag_marker.gantt_grid_dnd_marker\"];\n gridMarkers.forEach(function (selector) {\n gridDrag = gridDrag || !!document.querySelector(selector);\n });\n\n if (gridDrag) {\n baseCell = getGrid(gantt);\n } else {\n baseCell = getBaseCell(gantt);\n } // GS-1827. If there is no grid and timeline, there is no scrollbar for them\n\n\n if (!baseCell) {\n return null;\n }\n\n var verticalScrollbar = getAttachedScrollbar(gantt, baseCell, \"scrollY\");\n return verticalScrollbar;\n }\n\n function getHorizontalScrollbar(gantt) {\n var baseCell = getBaseCell(gantt);\n\n if (!baseCell || baseCell.id == \"grid\") {\n return null; // if the timeline is not displayed, do not return the scrollbar\n }\n\n var horizontalScrollbar = getAttachedScrollbar(gantt, baseCell, \"scrollX\");\n return horizontalScrollbar;\n }\n\n function getAttachedScrollbar(gantt, cell, type) {\n var attachedScrollbar = cell.$config[type];\n var scrollbarView = gantt.$ui.getView(attachedScrollbar);\n return scrollbarView;\n }\n\n var DEFAULT_VALUE = \"DEFAULT_VALUE\";\n\n function tryCall(getView, method, args, fallback) {\n var view = getView(this);\n\n if (!(view && view.isVisible())) {\n if (fallback) {\n return fallback();\n } else {\n return DEFAULT_VALUE;\n }\n } else {\n return view[method].apply(view, args);\n }\n }\n\n return {\n getColumnIndex: function getColumnIndex(name) {\n var res = tryCall.call(this, getGrid, \"getColumnIndex\", [name]);\n\n if (res === DEFAULT_VALUE) {\n return 0;\n } else {\n return res;\n }\n },\n dateFromPos: function dateFromPos(x) {\n var res = tryCall.call(this, getTimeline, \"dateFromPos\", Array.prototype.slice.call(arguments));\n\n if (res === DEFAULT_VALUE) {\n return this.getState().min_date;\n } else {\n return res;\n }\n },\n posFromDate: function posFromDate(date) {\n var res = tryCall.call(this, getTimeline, \"posFromDate\", [date]);\n\n if (res === DEFAULT_VALUE) {\n return 0;\n } else {\n return res;\n }\n },\n getRowTop: function getRowTop(index) {\n var self = this;\n var res = tryCall.call(self, getTimeline, \"getRowTop\", [index], function () {\n return tryCall.call(self, getGrid, \"getRowTop\", [index]);\n });\n\n if (res === DEFAULT_VALUE) {\n return 0;\n } else {\n return res;\n }\n },\n getTaskTop: function getTaskTop(id) {\n var self = this;\n var res = tryCall.call(self, getTimeline, \"getItemTop\", [id], function () {\n return tryCall.call(self, getGrid, \"getItemTop\", [id]);\n });\n\n if (res === DEFAULT_VALUE) {\n return 0;\n } else {\n return res;\n }\n },\n getTaskPosition: function getTaskPosition(task, start_date, end_date) {\n var res = tryCall.call(this, getTimeline, \"getItemPosition\", [task, start_date, end_date]);\n\n if (res === DEFAULT_VALUE) {\n var top = this.getTaskTop(task.id);\n var height = this.getTaskBarHeight(task.id);\n return {\n left: 0,\n top: top,\n height: height,\n width: 0\n };\n } else {\n return res;\n }\n },\n getTaskBarHeight: function getTaskBarHeight(taskId, isMilestoneRender) {\n var self = this;\n var res = tryCall.call(self, getTimeline, \"getBarHeight\", [taskId, isMilestoneRender], function () {\n return tryCall.call(self, getGrid, \"getItemHeight\", [taskId]);\n });\n\n if (res === DEFAULT_VALUE) {\n return 0;\n } else {\n return res;\n }\n },\n getTaskHeight: function getTaskHeight(taskId) {\n var self = this;\n var res = tryCall.call(self, getTimeline, \"getItemHeight\", [taskId], function () {\n return tryCall.call(self, getGrid, \"getItemHeight\", [taskId]);\n });\n\n if (res === DEFAULT_VALUE) {\n return 0;\n } else {\n return res;\n }\n },\n columnIndexByDate: function columnIndexByDate(date) {\n var res = tryCall.call(this, getTimeline, \"columnIndexByDate\", [date]);\n\n if (res === DEFAULT_VALUE) {\n return 0;\n } else {\n return res;\n }\n },\n roundTaskDates: function roundTaskDates() {\n tryCall.call(this, getTimeline, \"roundTaskDates\", []);\n },\n getScale: function getScale() {\n var res = tryCall.call(this, getTimeline, \"getScale\", []);\n\n if (res === DEFAULT_VALUE) {\n return null;\n } else {\n return res;\n }\n },\n getTaskNode: function getTaskNode(id) {\n var timeline = getTimeline(this);\n\n if (!timeline || !timeline.isVisible()) {\n return null;\n } else {\n var node = timeline._taskRenderer.rendered[id];\n\n if (!node) {\n var domAttr = timeline.$config.item_attribute;\n node = timeline.$task_bars.querySelector(\"[\" + domAttr + \"='\" + id + \"']\");\n }\n\n return node || null;\n }\n },\n getLinkNode: function getLinkNode(id) {\n var timeline = getTimeline(this);\n\n if (!timeline.isVisible()) {\n return null;\n } else {\n return timeline._linkRenderer.rendered[id];\n }\n },\n scrollTo: function scrollTo(left, top) {\n var vertical = getVerticalScrollbar(this);\n var horizontal = getHorizontalScrollbar(this);\n var oldH = {\n position: 0\n },\n oldV = {\n position: 0\n };\n\n if (vertical) {\n oldV = vertical.getScrollState();\n }\n\n if (horizontal) {\n oldH = horizontal.getScrollState();\n }\n\n var scrollHorizontal = horizontal && left * 1 == left;\n var scrollVertical = vertical && top * 1 == top;\n var scrollBoth = scrollHorizontal && scrollVertical;\n\n if (scrollBoth) {\n // some views will be scrolled both horizontally and vertically and smart rendering can be called twice\n // set flag in order not to invoke smart rendering at the horizontal scroll stage\n // so it will repaint only once when the scroll is completed\n var verticalViews = vertical._getLinkedViews();\n\n var horizontalViews = horizontal._getLinkedViews();\n\n var commonViews = [];\n\n for (var i = 0; i < verticalViews.length; i++) {\n for (var j = 0; j < horizontalViews.length; j++) {\n if (verticalViews[i].$config.id && horizontalViews[j].$config.id && verticalViews[i].$config.id === horizontalViews[j].$config.id) {\n commonViews.push(verticalViews[i].$config.id);\n }\n }\n }\n }\n\n if (scrollHorizontal) {\n if (commonViews) {\n commonViews.forEach(function (viewId) {\n this.$ui.getView(viewId).$config.$skipSmartRenderOnScroll = true;\n }.bind(this));\n }\n\n horizontal.scroll(left);\n\n if (commonViews) {\n commonViews.forEach(function (viewId) {\n this.$ui.getView(viewId).$config.$skipSmartRenderOnScroll = false;\n }.bind(this));\n }\n }\n\n if (scrollVertical) {\n vertical.scroll(top);\n }\n\n var newV = {\n position: 0\n },\n newH = {\n position: 0\n };\n\n if (vertical) {\n newV = vertical.getScrollState();\n }\n\n if (horizontal) {\n newH = horizontal.getScrollState();\n }\n\n this.callEvent(\"onGanttScroll\", [oldH.position, oldV.position, newH.position, newV.position]);\n },\n showDate: function showDate(date) {\n var date_x = this.posFromDate(date);\n var scroll_to = Math.max(date_x - this.config.task_scroll_offset, 0);\n this.scrollTo(scroll_to);\n },\n showTask: function showTask(id) {\n var pos = this.getTaskPosition(this.getTask(id)); // GS-1261: we need to show the start_date even in the RTL mode\n\n var leftPos = pos.left;\n if (this.config.rtl) leftPos = pos.left + pos.width;\n var left = Math.max(leftPos - this.config.task_scroll_offset, 0);\n\n var dataHeight = this._scroll_state().y;\n\n var top;\n\n if (!dataHeight) {\n top = pos.top;\n } else {\n top = pos.top - (dataHeight - this.getTaskBarHeight(id)) / 2;\n }\n\n this.scrollTo(left, top); // GS-1150: if the grid and timeline have different scrollbars, we need to scroll thegrid to show the task\n\n var gridCell = getGrid(this);\n var timelineCell = getTimeline(this);\n\n if (gridCell && timelineCell && gridCell.$config.scrollY != timelineCell.$config.scrollY) {\n var gridScrollbar = getAttachedScrollbar(this, gridCell, \"scrollY\");\n gridScrollbar.scrollTo(null, top);\n }\n },\n _scroll_state: function _scroll_state() {\n var result = {\n x: false,\n y: false,\n x_pos: 0,\n y_pos: 0,\n scroll_size: this.config.scroll_size + 1,\n //1px for inner content\n x_inner: 0,\n y_inner: 0\n };\n var scrollVer = getVerticalScrollbar(this),\n scrollHor = getHorizontalScrollbar(this);\n\n if (scrollHor) {\n var horState = scrollHor.getScrollState();\n\n if (horState.visible) {\n result.x = horState.size;\n result.x_inner = horState.scrollSize;\n }\n\n result.x_pos = horState.position || 0;\n }\n\n if (scrollVer) {\n var verState = scrollVer.getScrollState();\n\n if (verState.visible) {\n result.y = verState.size;\n result.y_inner = verState.scrollSize;\n }\n\n result.y_pos = verState.position || 0;\n }\n\n return result;\n },\n getScrollState: function getScrollState() {\n var state = this._scroll_state();\n\n return {\n x: state.x_pos,\n y: state.y_pos,\n inner_width: state.x,\n inner_height: state.y,\n width: state.x_inner,\n height: state.y_inner\n };\n },\n getLayoutView: function getLayoutView(cellName) {\n return this.$ui.getView(cellName);\n },\n scrollLayoutCell: function scrollLayoutCell(cellName, left, top) {\n var cell = this.$ui.getView(cellName);\n\n if (!cell) {\n return false;\n }\n\n if (left !== null) {\n var horizontalScroll = this.$ui.getView(cell.$config.scrollX);\n\n if (horizontalScroll) {\n horizontalScroll.scrollTo(left, null);\n }\n }\n\n if (top !== null) {\n var verticalScroll = this.$ui.getView(cell.$config.scrollY);\n\n if (verticalScroll) {\n verticalScroll.scrollTo(null, top);\n }\n }\n }\n };\n}\n\nmodule.exports = createLayoutFacade;","module.exports = function (gantt) {\n delete gantt.addTaskLayer;\n delete gantt.addLinkLayer;\n};","var domHelpers = require(\"./utils/dom_helpers\");\n\nvar initializer = function () {\n return function (gantt) {\n return {\n getVerticalScrollbar: function getVerticalScrollbar() {\n return gantt.$ui.getView(\"scrollVer\");\n },\n getHorizontalScrollbar: function getHorizontalScrollbar() {\n return gantt.$ui.getView(\"scrollHor\");\n },\n _legacyGridResizerClass: function _legacyGridResizerClass(layout) {\n var resizers = layout.getCellsByType(\"resizer\");\n\n for (var i = 0; i < resizers.length; i++) {\n var r = resizers[i];\n var gridResizer = false;\n var prev = r.$parent.getPrevSibling(r.$id);\n\n if (prev && prev.$config && prev.$config.id === \"grid\") {\n gridResizer = true;\n } else {\n var next = r.$parent.getNextSibling(r.$id);\n\n if (next && next.$config && next.$config.id === \"grid\") {\n gridResizer = true;\n }\n }\n\n if (gridResizer) {\n r.$config.css = (r.$config.css ? r.$config.css + \" \" : \"\") + \"gantt_grid_resize_wrap\";\n }\n }\n },\n onCreated: function onCreated(layout) {\n var first = true;\n\n this._legacyGridResizerClass(layout);\n\n layout.attachEvent(\"onBeforeResize\", function () {\n var mainTimeline = gantt.$ui.getView(\"timeline\");\n if (mainTimeline) mainTimeline.$config.hidden = mainTimeline.$parent.$config.hidden = !gantt.config.show_chart;\n var mainGrid = gantt.$ui.getView(\"grid\");\n if (!mainGrid) return;\n\n var colsWidth = mainGrid._getColsTotalWidth();\n\n var hideGrid = !gantt.config.show_grid || !gantt.config.grid_width || colsWidth === 0;\n\n if (first && !hideGrid && colsWidth !== false) {\n gantt.config.grid_width = colsWidth;\n }\n\n mainGrid.$config.hidden = mainGrid.$parent.$config.hidden = hideGrid;\n\n if (!mainGrid.$config.hidden) {\n /* restrict grid width due to min_width, max_width, min_grid_column_width */\n var grid_limits = mainGrid._getGridWidthLimits();\n\n if (grid_limits[0] && gantt.config.grid_width < grid_limits[0]) gantt.config.grid_width = grid_limits[0];\n if (grid_limits[1] && gantt.config.grid_width > grid_limits[1]) gantt.config.grid_width = grid_limits[1];\n\n if (mainTimeline && gantt.config.show_chart) {\n mainGrid.$config.width = gantt.config.grid_width - 1; // GS-1314: Don't let the non-scrollable grid to be larger than the container with the correct width\n\n if (!mainGrid.$config.scrollable && mainGrid.$config.scrollY && gantt.$root.offsetWidth) {\n var ganttContainerWidth = mainGrid.$gantt.$layout.$container.offsetWidth;\n var verticalScrollbar = gantt.$ui.getView(mainGrid.$config.scrollY);\n var verticalScrollbarWidth = verticalScrollbar.$config.width; // GS-2488: to prevent grid from occupying the whole gantt container(timeline will be disabled) \n // need to leave min width for timeline\n\n var gridOverflow = ganttContainerWidth - (mainGrid.$config.width + verticalScrollbarWidth) - 4;\n\n if (gridOverflow < 0) {\n mainGrid.$config.width += gridOverflow;\n gantt.config.grid_width += gridOverflow;\n }\n }\n\n if (!first) {\n if (mainTimeline && !domHelpers.isChildOf(mainTimeline.$task, layout.$view)) {\n // timeline is being displayed after being not visible, reset grid with from full screen\n if (!mainGrid.$config.original_grid_width) {\n var skinSettings = gantt.skins[gantt.skin];\n\n if (skinSettings && skinSettings.config && skinSettings.config.grid_width) {\n mainGrid.$config.original_grid_width = skinSettings.config.grid_width;\n } else {\n mainGrid.$config.original_grid_width = 0;\n }\n }\n\n gantt.config.grid_width = mainGrid.$config.original_grid_width;\n mainGrid.$parent.$config.width = gantt.config.grid_width;\n } else {\n mainGrid.$parent._setContentSize(mainGrid.$config.width, null);\n\n gantt.$layout._syncCellSizes(mainGrid.$parent.$config.group, {\n value: gantt.config.grid_width,\n isGravity: false\n });\n }\n } else {\n mainGrid.$parent.$config.width = gantt.config.grid_width;\n\n if (mainGrid.$parent.$config.group) {\n gantt.$layout._syncCellSizes(mainGrid.$parent.$config.group, {\n value: mainGrid.$parent.$config.width,\n isGravity: false\n });\n }\n }\n } else {\n if (mainTimeline && domHelpers.isChildOf(mainTimeline.$task, layout.$view)) {\n // hiding timeline, remember grid with to restore it when timeline is displayed again\n mainGrid.$config.original_grid_width = gantt.config.grid_width;\n }\n\n if (!first) {\n mainGrid.$parent.$config.width = 0;\n }\n }\n }\n\n first = false;\n });\n\n this._initScrollStateEvents(layout);\n },\n _initScrollStateEvents: function _initScrollStateEvents(layout) {\n gantt._getVerticalScrollbar = this.getVerticalScrollbar;\n gantt._getHorizontalScrollbar = this.getHorizontalScrollbar;\n var vertical = this.getVerticalScrollbar();\n var horizontal = this.getHorizontalScrollbar();\n\n if (vertical) {\n vertical.attachEvent(\"onScroll\", function (oldPos, newPos, dir) {\n var scrollState = gantt.getScrollState();\n gantt.callEvent(\"onGanttScroll\", [scrollState.x, oldPos, scrollState.x, newPos]);\n });\n }\n\n if (horizontal) {\n horizontal.attachEvent(\"onScroll\", function (oldPos, newPos, dir) {\n var scrollState = gantt.getScrollState();\n gantt.callEvent(\"onGanttScroll\", [oldPos, scrollState.y, newPos, scrollState.y]); // if the grid doesn't fit the width, scroll the row container\n\n var grid = gantt.$ui.getView(\"grid\");\n\n if (grid && grid.$grid_data && !grid.$config.scrollable) {\n grid.$grid_data.style.left = grid.$grid.scrollLeft + \"px\";\n grid.$grid_data.scrollLeft = grid.$grid.scrollLeft;\n }\n });\n }\n\n layout.attachEvent(\"onResize\", function () {\n if (vertical && !gantt.$scroll_ver) {\n gantt.$scroll_ver = vertical.$scroll_ver;\n }\n\n if (horizontal && !gantt.$scroll_hor) {\n gantt.$scroll_hor = horizontal.$scroll_hor;\n }\n });\n },\n _findGridResizer: function _findGridResizer(layout, grid) {\n var resizers = layout.getCellsByType(\"resizer\");\n var gridFirst = true;\n var gridResizer;\n\n for (var i = 0; i < resizers.length; i++) {\n var res = resizers[i];\n\n res._getSiblings();\n\n var prev = res._behind;\n var next = res._front;\n\n if (prev && prev.$content === grid || prev.isChild && prev.isChild(grid)) {\n gridResizer = res;\n gridFirst = true;\n break;\n } else if (next && next.$content === grid || next.isChild && next.isChild(grid)) {\n gridResizer = res;\n gridFirst = false;\n break;\n }\n }\n\n return {\n resizer: gridResizer,\n gridFirst: gridFirst\n };\n },\n onInitialized: function onInitialized(layout) {\n var grid = gantt.$ui.getView(\"grid\");\n\n var resizeInfo = this._findGridResizer(layout, grid); // expose grid resize events\n\n\n if (resizeInfo.resizer) {\n var gridFirst = resizeInfo.gridFirst,\n next = resizeInfo.resizer;\n\n if (next.$config.mode !== \"x\") {\n return; // track only horizontal resize\n }\n\n var initialWidth;\n next.attachEvent(\"onResizeStart\", function (prevCellWidth, nextCellWidth) {\n var grid = gantt.$ui.getView(\"grid\");\n var viewCell = grid ? grid.$parent : null;\n\n if (viewCell) {\n var limits = grid._getGridWidthLimits(); // min grid width is defined by min widths of its columns, unless grid has horizontal scroll\n\n\n if (!grid.$config.scrollable) viewCell.$config.minWidth = limits[0];\n viewCell.$config.maxWidth = limits[1];\n }\n\n initialWidth = gridFirst ? prevCellWidth : nextCellWidth;\n return gantt.callEvent(\"onGridResizeStart\", [initialWidth]);\n });\n next.attachEvent(\"onResize\", function (newBehindSize, newFrontSize) {\n var newSize = gridFirst ? newBehindSize : newFrontSize;\n return gantt.callEvent(\"onGridResize\", [initialWidth, newSize]);\n });\n next.attachEvent(\"onResizeEnd\", function (oldBackSize, oldFrontSize, newBackSize, newFrontSize) {\n var oldSize = gridFirst ? oldBackSize : oldFrontSize;\n var newSize = gridFirst ? newBackSize : newFrontSize;\n var grid = gantt.$ui.getView(\"grid\");\n var viewCell = grid ? grid.$parent : null;\n\n if (viewCell) {\n viewCell.$config.minWidth = undefined;\n }\n\n var res = gantt.callEvent(\"onGridResizeEnd\", [oldSize, newSize]);\n\n if (res && newSize !== 0) {\n // new size may be numeric zero when cell size is defined by 'gravity', actual size will be calculated by layout later\n gantt.config.grid_width = newSize;\n }\n\n return res;\n });\n }\n },\n onDestroyed: function onDestroyed(timeline) {}\n };\n };\n}();\n\nmodule.exports = initializer;","var domHelpers = require(\"../utils/dom_helpers\");\n\nvar initLinksDND = function initLinksDND(timeline, gantt) {\n var _link_landing,\n _link_target_task,\n _link_target_task_start,\n _link_source_task,\n _link_source_task_start,\n markerDefaultOffset = 10,\n scrollDefaultSize = 18;\n\n function getVisibleMilestoneWidth(taskId) {\n var origWidth = timeline.getBarHeight(taskId, true); //m-s have square shape\n\n return Math.round(Math.sqrt(2 * origWidth * origWidth)) - 2;\n }\n\n function isMilestone(task) {\n return gantt.getTaskType(task.type) == gantt.config.types.milestone;\n }\n\n function getDndState() {\n return {\n link_source_id: _link_source_task,\n link_target_id: _link_target_task,\n link_from_start: _link_source_task_start,\n link_to_start: _link_target_task_start,\n link_landing_area: _link_landing\n };\n }\n\n var services = gantt.$services;\n var state = services.getService(\"state\");\n var DnD = services.getService(\"dnd\");\n state.registerProvider(\"linksDnD\", getDndState);\n var start_marker = \"task_start_date\",\n end_marker = \"task_end_date\",\n link_edge_marker = \"gantt_link_point\",\n link_landing_hover_area = \"gantt_link_control\";\n var dnd = new DnD(timeline.$task_bars, {\n sensitivity: 0,\n updates_per_second: 60,\n mousemoveContainer: gantt.$root,\n selector: \".\" + link_edge_marker,\n preventDefault: true\n });\n dnd.attachEvent(\"onBeforeDragStart\", gantt.bind(function (obj, e) {\n var target = e.target || e.srcElement;\n resetDndState();\n if (gantt.getState(\"tasksDnd\").drag_id) return false;\n\n if (domHelpers.locateClassName(target, link_edge_marker)) {\n if (domHelpers.locateClassName(target, start_marker)) _link_source_task_start = true;\n var sid = gantt.locate(e);\n _link_source_task = sid;\n var t = gantt.getTask(sid);\n\n if (gantt.isReadonly(t)) {\n resetDndState();\n return false;\n }\n\n var shift = 0;\n this._dir_start = getLinePos(t, !!_link_source_task_start, shift, timeline.$getConfig(), true);\n return true;\n } else {\n return false;\n }\n }, this));\n dnd.attachEvent(\"onAfterDragStart\", gantt.bind(function (obj, e) {\n if (gantt.config.touch) {\n gantt.refreshData();\n }\n\n updateMarkedHtml(dnd.config.marker);\n }, this));\n\n function getLinePos(task, to_start, shift, cfg, isStart) {\n var taskPos = getMilestonePosition(task, function (task) {\n return gantt.getTaskPosition(task);\n }, cfg);\n var pos = {\n x: taskPos.x,\n y: taskPos.y\n };\n\n if (!to_start) {\n pos.x = taskPos.xEnd;\n } //var pos = gantt._get_task_pos(task, !!to_start);\n\n\n pos.y += gantt.getTaskHeight(task.id) / 2;\n var offset = isMilestone(task) && isStart ? 2 : 0;\n shift = shift || 0;\n if (cfg.rtl) shift = shift * -1;\n pos.x += (to_start ? -1 : 1) * shift - offset;\n return pos;\n }\n\n function getMilestonePosition(task, getTaskPosition, cfg) {\n var pos = getTaskPosition(task);\n var res = {\n x: pos.left,\n y: pos.top,\n width: pos.width,\n height: pos.height\n };\n\n if (cfg.rtl) {\n res.xEnd = res.x;\n res.x = res.xEnd + res.width;\n } else {\n res.xEnd = res.x + res.width;\n }\n\n res.yEnd = res.y + res.height;\n\n if (gantt.getTaskType(task.type) == gantt.config.types.milestone) {\n var milestoneWidth = getVisibleMilestoneWidth(task.id);\n res.x += (!cfg.rtl ? -1 : 1) * (milestoneWidth / 2);\n res.xEnd += (!cfg.rtl ? 1 : -1) * (milestoneWidth / 2); //pos.x -= milestoneWidth / 2;\n //pos.xEnd += milestoneWidth / 2;\n\n res.width = pos.xEnd - pos.x;\n }\n\n return res;\n }\n\n function getVieportSize() {\n var root = gantt.$root;\n return {\n right: root.offsetWidth,\n bottom: root.offsetHeight\n };\n }\n\n function getMarkerSize(marker) {\n var width = 0,\n height = 0;\n\n if (marker) {\n width = marker.offsetWidth || 0;\n height = marker.offsetHeight || 0;\n }\n\n return {\n width: width,\n height: height\n };\n }\n\n function getPosition(e, marker) {\n var oldPos = dnd.getPosition(e);\n var markerSize = getMarkerSize(marker);\n var viewportSize = getVieportSize();\n var offsetX = gantt.config.tooltip_offset_x || markerDefaultOffset;\n var offsetY = gantt.config.tooltip_offset_y || markerDefaultOffset;\n var scrollSize = gantt.config.scroll_size || scrollDefaultSize; // GS-1315: Add offset if there are elements above Gantt\n\n var ganttOffsetY = gantt.$container.getBoundingClientRect().y + window.scrollY;\n var position = {\n y: oldPos.y + offsetY,\n x: oldPos.x + offsetX,\n bottom: oldPos.y + markerSize.height + offsetY + scrollSize,\n right: oldPos.x + markerSize.width + offsetX + scrollSize\n };\n\n if (position.bottom > viewportSize.bottom + ganttOffsetY) {\n position.y = viewportSize.bottom + ganttOffsetY - markerSize.height - offsetY;\n }\n\n if (position.right > viewportSize.right) {\n position.x = viewportSize.right - markerSize.width - offsetX;\n }\n\n return position;\n }\n\n dnd.attachEvent(\"onDragMove\", gantt.bind(function (obj, e) {\n var dd = dnd.config;\n var pos = getPosition(e, dd.marker);\n advanceMarker(dd.marker, pos);\n var landing = !!domHelpers.locateClassName(e, link_landing_hover_area);\n var prevTarget = _link_target_task;\n var prevLanding = _link_landing;\n var prevToStart = _link_target_task_start;\n var targ = gantt.locate(e),\n to_start = true; // can drag and drop link to another gantt on the page, such links are not supported\n\n var eventTarget = domHelpers.getTargetNode(e);\n var sameGantt = domHelpers.isChildOf(eventTarget, gantt.$root);\n\n if (!sameGantt) {\n landing = false;\n targ = null;\n }\n\n if (landing) {\n //refreshTask\n to_start = !domHelpers.locateClassName(e, end_marker);\n landing = !!targ;\n }\n\n _link_target_task = targ;\n _link_landing = landing;\n _link_target_task_start = to_start;\n\n if (landing) {\n var t = gantt.getTask(targ);\n var config = timeline.$getConfig();\n var node = domHelpers.locateClassName(e, link_landing_hover_area);\n var shift = 0;\n\n if (node) {\n shift = Math.floor(node.offsetWidth / 2);\n }\n\n this._dir_end = getLinePos(t, !!_link_target_task_start, shift, config);\n } else {\n this._dir_end = domHelpers.getRelativeEventPosition(e, timeline.$task_data);\n\n if (gantt.env.isEdge) {\n // to fix margin collapsing\n this._dir_end.y += window.scrollY;\n }\n }\n\n var targetChanged = !(prevLanding == landing && prevTarget == targ && prevToStart == to_start);\n\n if (targetChanged) {\n if (prevTarget) gantt.refreshTask(prevTarget, false);\n if (targ) gantt.refreshTask(targ, false);\n }\n\n if (targetChanged) {\n updateMarkedHtml(dd.marker);\n }\n\n showDirectingLine(this._dir_start.x, this._dir_start.y, this._dir_end.x, this._dir_end.y);\n return true;\n }, this));\n dnd.attachEvent(\"onDragEnd\", gantt.bind(function () {\n var drag = getDndState();\n\n if (drag.link_source_id && drag.link_target_id && drag.link_source_id != drag.link_target_id) {\n var type = gantt._get_link_type(drag.link_from_start, drag.link_to_start);\n\n var link = {\n source: drag.link_source_id,\n target: drag.link_target_id,\n type: type\n };\n\n if (link.type && gantt.isLinkAllowed(link)) {\n if (gantt.callEvent(\"onLinkCreated\", [link])) {\n gantt.addLink(link);\n }\n }\n }\n\n resetDndState();\n\n if (gantt.config.touch) {\n gantt.refreshData();\n } else {\n if (drag.link_source_id) gantt.refreshTask(drag.link_source_id, false);\n if (drag.link_target_id) gantt.refreshTask(drag.link_target_id, false);\n }\n\n removeDirectionLine();\n }, this));\n\n function updateMarkedHtml(marker) {\n var link = getDndState();\n var css = [\"gantt_link_tooltip\"];\n\n if (link.link_source_id && link.link_target_id) {\n if (gantt.isLinkAllowed(link.link_source_id, link.link_target_id, link.link_from_start, link.link_to_start)) {\n css.push(\"gantt_allowed_link\");\n } else {\n css.push(\"gantt_invalid_link\");\n }\n }\n\n var className = gantt.templates.drag_link_class(link.link_source_id, link.link_from_start, link.link_target_id, link.link_to_start);\n if (className) css.push(className);\n var html = \"
\" + gantt.templates.drag_link(link.link_source_id, link.link_from_start, link.link_target_id, link.link_to_start) + \"
\";\n marker.innerHTML = html;\n }\n\n function advanceMarker(marker, pos) {\n marker.style.left = pos.x + \"px\";\n marker.style.top = pos.y + \"px\";\n }\n\n function resetDndState() {\n _link_source_task = _link_source_task_start = _link_target_task = null;\n _link_target_task_start = true;\n }\n\n function showDirectingLine(s_x, s_y, e_x, e_y) {\n var div = getDirectionLine();\n var link = getDndState();\n var css = [\"gantt_link_direction\"];\n\n if (gantt.templates.link_direction_class) {\n css.push(gantt.templates.link_direction_class(link.link_source_id, link.link_from_start, link.link_target_id, link.link_to_start));\n }\n\n var dist = Math.sqrt(Math.pow(e_x - s_x, 2) + Math.pow(e_y - s_y, 2));\n dist = Math.max(0, dist - 3);\n if (!dist) return;\n div.className = css.join(\" \");\n var tan = (e_y - s_y) / (e_x - s_x),\n angle = Math.atan(tan);\n\n if (coordinateCircleQuarter(s_x, e_x, s_y, e_y) == 2) {\n angle += Math.PI;\n } else if (coordinateCircleQuarter(s_x, e_x, s_y, e_y) == 3) {\n angle -= Math.PI;\n }\n\n var sin = Math.sin(angle),\n cos = Math.cos(angle),\n top = Math.round(s_y),\n left = Math.round(s_x);\n var style = [\"-webkit-transform: rotate(\" + angle + \"rad)\", \"-moz-transform: rotate(\" + angle + \"rad)\", \"-ms-transform: rotate(\" + angle + \"rad)\", \"-o-transform: rotate(\" + angle + \"rad)\", \"transform: rotate(\" + angle + \"rad)\", \"width:\" + Math.round(dist) + \"px\"];\n\n if (window.navigator.userAgent.indexOf(\"MSIE 8.0\") != -1) {\n //ms-filter breaks styles in ie9, so add it only for 8th\n style.push(\"-ms-filter: \\\"\" + ieTransform(sin, cos) + \"\\\"\");\n var shiftLeft = Math.abs(Math.round(s_x - e_x)),\n shiftTop = Math.abs(Math.round(e_y - s_y)); //fix rotation axis\n\n switch (coordinateCircleQuarter(s_x, e_x, s_y, e_y)) {\n case 1:\n top -= shiftTop;\n break;\n\n case 2:\n left -= shiftLeft;\n top -= shiftTop;\n break;\n\n case 3:\n left -= shiftLeft;\n break;\n\n default:\n break;\n }\n }\n\n style.push(\"top:\" + top + \"px\");\n style.push(\"left:\" + left + \"px\");\n div.style.cssText = style.join(\";\");\n }\n\n function ieTransform(sin, cos) {\n return \"progid:DXImageTransform.Microsoft.Matrix(\" + \"M11 = \" + cos + \",\" + \"M12 = -\" + sin + \",\" + \"M21 = \" + sin + \",\" + \"M22 = \" + cos + \",\" + \"SizingMethod = 'auto expand'\" + \")\";\n }\n\n function coordinateCircleQuarter(sX, eX, sY, eY) {\n if (eX >= sX) {\n if (eY <= sY) {\n return 1;\n } else {\n return 4;\n }\n } else {\n if (eY <= sY) {\n return 2;\n } else {\n return 3;\n }\n }\n }\n\n function getDirectionLine() {\n if (!dnd._direction || !dnd._direction.parentNode) {\n dnd._direction = document.createElement(\"div\");\n timeline.$task_links.appendChild(dnd._direction);\n }\n\n return dnd._direction;\n }\n\n function removeDirectionLine() {\n if (dnd._direction) {\n if (dnd._direction.parentNode) //the event line can be detached because of data refresh\n dnd._direction.parentNode.removeChild(dnd._direction);\n dnd._direction = null;\n }\n }\n\n gantt.attachEvent(\"onGanttRender\", gantt.bind(function () {\n if (dnd._direction) {\n showDirectingLine(this._dir_start.x, this._dir_start.y, this._dir_end.x, this._dir_end.y);\n }\n }, this));\n};\n\nmodule.exports = {\n createLinkDND: function createLinkDND() {\n return {\n init: initLinksDND\n };\n }\n};","var domHelpers = require(\"../utils/dom_helpers\");\n\nvar utils = require(\"../../../utils/utils\");\n\nvar timeout = require(\"../../../utils/timeout\");\n\nvar helpers = require(\"../../../utils/helpers\");\n\nfunction createTaskDND(timeline, gantt) {\n var services = gantt.$services;\n return {\n drag: null,\n dragMultiple: {},\n _events: {\n before_start: {},\n before_finish: {},\n after_finish: {}\n },\n _handlers: {},\n init: function init() {\n this._domEvents = gantt._createDomEventScope();\n this.clear_drag_state();\n var drag = gantt.config.drag_mode;\n this.set_actions();\n var stateService = services.getService(\"state\");\n stateService.registerProvider(\"tasksDnd\", utils.bind(function () {\n return {\n drag_id: this.drag ? this.drag.id : undefined,\n drag_mode: this.drag ? this.drag.mode : undefined,\n drag_from_start: this.drag ? this.drag.left : undefined\n };\n }, this));\n var evs = {\n \"before_start\": \"onBeforeTaskDrag\",\n \"before_finish\": \"onBeforeTaskChanged\",\n \"after_finish\": \"onAfterTaskDrag\"\n }; //for now, all drag operations will trigger the same events\n\n for (var stage in this._events) {\n for (var mode in drag) {\n this._events[stage][mode] = evs[stage];\n }\n }\n\n this._handlers[drag.move] = this._move;\n this._handlers[drag.resize] = this._resize;\n this._handlers[drag.progress] = this._resize_progress;\n },\n set_actions: function set_actions() {\n var data = timeline.$task_data;\n\n this._domEvents.attach(data, \"mousemove\", gantt.bind(function (e) {\n this.on_mouse_move(e);\n }, this));\n\n this._domEvents.attach(data, \"mousedown\", gantt.bind(function (e) {\n this.on_mouse_down(e);\n }, this));\n\n this._domEvents.attach(document.body, \"mouseup\", gantt.bind(function (e) {\n this.on_mouse_up(e);\n }, this));\n },\n clear_drag_state: function clear_drag_state() {\n this.drag = {\n id: null,\n mode: null,\n pos: null,\n start_x: null,\n start_y: null,\n obj: null,\n left: null\n };\n this.dragMultiple = {};\n },\n _resize: function _resize(task, shift, drag) {\n var cfg = timeline.$getConfig();\n\n var coords_x = this._drag_task_coords(task, drag);\n\n if (drag.left) {\n task.start_date = gantt.dateFromPos(coords_x.start + shift);\n\n if (!task.start_date) {\n task.start_date = new Date(gantt.getState().min_date);\n }\n } else {\n task.end_date = gantt.dateFromPos(coords_x.end + shift);\n\n if (!task.end_date) {\n task.end_date = new Date(gantt.getState().max_date);\n }\n }\n\n var minDurationInUnits = this._calculateMinDuration(cfg.min_duration, cfg.duration_unit);\n\n if (task.end_date - task.start_date < cfg.min_duration) {\n if (drag.left) task.start_date = gantt.calculateEndDate(task.end_date, -minDurationInUnits, cfg.duration_unit, task);else task.end_date = gantt.calculateEndDate(task.start_date, minDurationInUnits, cfg.duration_unit, task);\n }\n\n gantt._init_task_timing(task);\n },\n _calculateMinDuration: function _calculateMinDuration(duration, unit) {\n var inMs = {\n \"minute\": 60000,\n \"hour\": 3600000,\n \"day\": 86400000,\n \"week\": 604800000,\n \"month\": 2419200000,\n \"year\": 31356000000\n };\n return Math.ceil(duration / inMs[unit]);\n },\n _resize_progress: function _resize_progress(task, shift, drag) {\n var coords_x = this._drag_task_coords(task, drag);\n\n var config = timeline.$getConfig();\n var diffValue = !config.rtl ? drag.pos.x - coords_x.start : coords_x.start - drag.pos.x;\n var diff = Math.max(0, diffValue);\n task.progress = Math.min(1, diff / Math.abs(coords_x.end - coords_x.start));\n },\n _find_max_shift: function _find_max_shift(dragItems, shift) {\n var correctShift;\n\n for (var i in dragItems) {\n var drag = dragItems[i];\n var task = gantt.getTask(drag.id);\n\n var coords_x = this._drag_task_coords(task, drag);\n\n var minX = gantt.posFromDate(new Date(gantt.getState().min_date));\n var maxX = gantt.posFromDate(new Date(gantt.getState().max_date));\n\n if (coords_x.end + shift > maxX) {\n var maxShift = maxX - coords_x.end;\n\n if (maxShift < correctShift || correctShift === undefined) {\n correctShift = maxShift;\n }\n } else if (coords_x.start + shift < minX) {\n var minShift = minX - coords_x.start;\n\n if (minShift > correctShift || correctShift === undefined) {\n correctShift = minShift;\n }\n }\n }\n\n return correctShift;\n },\n _move: function _move(task, shift, drag, multipleDragShift) {\n var coords_x = this._drag_task_coords(task, drag);\n\n var new_start = null,\n new_end = null; // GS-454: If we drag multiple tasks, rely on the dates instead of timeline coordinates\n\n if (multipleDragShift) {\n new_start = new Date(+drag.obj.start_date + multipleDragShift), new_end = new Date(+drag.obj.end_date + multipleDragShift);\n } else {\n new_start = gantt.dateFromPos(coords_x.start + shift), new_end = gantt.dateFromPos(coords_x.end + shift);\n }\n\n if (!new_start) {\n task.start_date = new Date(gantt.getState().min_date);\n task.end_date = gantt.dateFromPos(gantt.posFromDate(task.start_date) + (coords_x.end - coords_x.start));\n } else if (!new_end) {\n task.end_date = new Date(gantt.getState().max_date);\n task.start_date = gantt.dateFromPos(gantt.posFromDate(task.end_date) - (coords_x.end - coords_x.start));\n } else {\n task.start_date = new_start;\n task.end_date = new_end;\n }\n },\n _drag_task_coords: function _drag_task_coords(t, drag) {\n var start = drag.obj_s_x = drag.obj_s_x || gantt.posFromDate(t.start_date);\n var end = drag.obj_e_x = drag.obj_e_x || gantt.posFromDate(t.end_date);\n return {\n start: start,\n end: end\n };\n },\n _mouse_position_change: function _mouse_position_change(oldPos, newPos) {\n var dx = oldPos.x - newPos.x,\n dy = oldPos.y - newPos.y;\n return Math.sqrt(dx * dx + dy * dy);\n },\n _is_number: function _is_number(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n },\n on_mouse_move: function on_mouse_move(e) {\n if (this.drag.start_drag) {\n var pos = domHelpers.getRelativeEventPosition(e, gantt.$task_data);\n var sX = this.drag.start_drag.start_x,\n sY = this.drag.start_drag.start_y;\n\n if (Date.now() - this.drag.timestamp > 50 || this._is_number(sX) && this._is_number(sY) && this._mouse_position_change({\n x: sX,\n y: sY\n }, pos) > 20) {\n this._start_dnd(e);\n }\n }\n\n var drag = this.drag;\n\n if (drag.mode) {\n if (!timeout(this, 40)) //limit update frequency\n return;\n\n this._update_on_move(e);\n }\n },\n _update_item_on_move: function _update_item_on_move(shift, id, mode, drag, e, multipleDragShift) {\n var task = gantt.getTask(id);\n var original = gantt.mixin({}, task);\n var copy = gantt.mixin({}, task);\n\n this._handlers[mode].apply(this, [copy, shift, drag, multipleDragShift]);\n\n gantt.mixin(task, copy, true); //gantt._update_parents(drag.id, true);\n\n gantt.callEvent(\"onTaskDrag\", [task.id, mode, copy, original, e]);\n gantt.mixin(task, copy, true);\n gantt.refreshTask(id);\n },\n _update_on_move: function _update_on_move(e) {\n var drag = this.drag;\n var config = timeline.$getConfig();\n\n if (drag.mode) {\n var pos = domHelpers.getRelativeEventPosition(e, timeline.$task_data);\n if (drag.pos && drag.pos.x == pos.x) return;\n drag.pos = pos;\n var curr_date = gantt.dateFromPos(pos.x);\n if (!curr_date || isNaN(curr_date.getTime())) return;\n var shift = pos.x - drag.start_x;\n var task = gantt.getTask(drag.id);\n\n if (this._handlers[drag.mode]) {\n if (drag.mode === config.drag_mode.move) {\n var dragHash = {};\n\n if (this._isMultiselect()) {\n var selectedTasksIds = gantt.getSelectedTasks();\n\n if (selectedTasksIds.indexOf(drag.id) >= 0) {\n dragHash = this.dragMultiple;\n }\n }\n\n var dragProject = false;\n\n if (gantt.isSummaryTask(task) && gantt.config.drag_project) {\n var initialDrag = {};\n initialDrag[drag.id] = utils.copy(drag);\n dragProject = true;\n dragHash = utils.mixin(initialDrag, this.dragMultiple);\n }\n\n var maxShift = this._find_max_shift(dragHash, shift);\n\n if (maxShift !== undefined) {\n shift = maxShift;\n }\n\n this._update_item_on_move(shift, drag.id, drag.mode, drag, e);\n\n for (var i in dragHash) {\n var childDrag = dragHash[i];\n\n if (dragProject && childDrag.id != drag.id) {\n gantt._bulk_dnd = true;\n } // GS-454: Calculate the date shift in milliseconds instead of pixels\n\n\n if (maxShift === undefined && (dragProject || Object.keys(dragHash).length > 1)) {\n var shiftDate = gantt.dateFromPos(drag.start_x);\n var multipleDragShift = curr_date - shiftDate;\n }\n\n this._update_item_on_move(shift, childDrag.id, childDrag.mode, childDrag, e, multipleDragShift);\n }\n\n gantt._bulk_dnd = false;\n } else {\n // for resize and progress\n this._update_item_on_move(shift, drag.id, drag.mode, drag, e);\n }\n\n gantt._update_parents(drag.id);\n }\n }\n },\n on_mouse_down: function on_mouse_down(e, src) {\n // on Mac we do not get onmouseup event when clicking right mouse button leaving us in dnd state\n // let's ignore right mouse button then\n if (e.button == 2 && e.button !== undefined) return;\n var config = timeline.$getConfig();\n var id = gantt.locate(e);\n var task = null;\n\n if (gantt.isTaskExists(id)) {\n task = gantt.getTask(id);\n }\n\n if (gantt.isReadonly(task) || this.drag.mode) return;\n this.clear_drag_state();\n src = src || e.target || e.srcElement;\n var className = domHelpers.getClassName(src);\n\n var drag = this._get_drag_mode(className, src);\n\n if (!className || !drag) {\n if (src.parentNode) return this.on_mouse_down(e, src.parentNode);else return;\n }\n\n if (!drag) {\n if (gantt.checkEvent(\"onMouseDown\") && gantt.callEvent(\"onMouseDown\", [className.split(\" \")[0]])) {\n if (src.parentNode) return this.on_mouse_down(e, src.parentNode);\n }\n } else {\n if (drag.mode && drag.mode != config.drag_mode.ignore && config[\"drag_\" + drag.mode]) {\n id = gantt.locate(src);\n task = gantt.copy(gantt.getTask(id) || {});\n\n if (gantt.isReadonly(task)) {\n this.clear_drag_state();\n return false;\n }\n\n if (gantt.isSummaryTask(task) && !config.drag_project && drag.mode != config.drag_mode.progress) {\n //only progress drag is allowed for tasks with flexible duration\n this.clear_drag_state();\n return;\n }\n\n drag.id = id;\n var pos = domHelpers.getRelativeEventPosition(e, gantt.$task_data);\n drag.start_x = pos.x;\n drag.start_y = pos.y;\n drag.obj = task;\n this.drag.start_drag = drag;\n this.drag.timestamp = Date.now();\n } else this.clear_drag_state();\n }\n },\n _fix_dnd_scale_time: function _fix_dnd_scale_time(task, drag) {\n var config = timeline.$getConfig();\n var unit = gantt.getScale().unit,\n step = gantt.getScale().step;\n\n if (!config.round_dnd_dates) {\n unit = 'minute';\n step = config.time_step;\n }\n\n function fixStart(task) {\n if (!gantt.config.correct_work_time) return;\n var config = timeline.$getConfig();\n if (!gantt.isWorkTime(task.start_date, undefined, task)) task.start_date = gantt.calculateEndDate({\n start_date: task.start_date,\n duration: -1,\n unit: config.duration_unit,\n task: task\n });\n }\n\n function fixEnd(task) {\n if (!gantt.config.correct_work_time) return;\n var config = timeline.$getConfig();\n if (!gantt.isWorkTime(new Date(task.end_date - 1), undefined, task)) task.end_date = gantt.calculateEndDate({\n start_date: task.end_date,\n duration: 1,\n unit: config.duration_unit,\n task: task\n });\n }\n\n if (drag.mode == config.drag_mode.resize) {\n if (drag.left) {\n task.start_date = gantt.roundDate({\n date: task.start_date,\n unit: unit,\n step: step\n });\n fixStart(task);\n } else {\n task.end_date = gantt.roundDate({\n date: task.end_date,\n unit: unit,\n step: step\n });\n fixEnd(task);\n }\n } else if (drag.mode == config.drag_mode.move) {\n task.start_date = gantt.roundDate({\n date: task.start_date,\n unit: unit,\n step: step\n });\n fixStart(task);\n task.end_date = gantt.calculateEndDate(task);\n }\n },\n _fix_working_times: function _fix_working_times(task, drag) {\n var config = timeline.$getConfig();\n var drag = drag || {\n mode: config.drag_mode.move\n };\n\n if (drag.mode == config.drag_mode.resize) {\n if (drag.left) {\n task.start_date = gantt.getClosestWorkTime({\n date: task.start_date,\n dir: 'future',\n task: task\n });\n } else {\n task.end_date = gantt.getClosestWorkTime({\n date: task.end_date,\n dir: 'past',\n task: task\n });\n }\n } else if (drag.mode == config.drag_mode.move) {\n gantt.correctTaskWorkTime(task);\n }\n },\n _finalize_mouse_up: function _finalize_mouse_up(taskId, config, drag, e) {\n var task = gantt.getTask(taskId);\n\n if (config.work_time && config.correct_work_time) {\n this._fix_working_times(task, drag);\n }\n\n this._fix_dnd_scale_time(task, drag);\n\n if (!this._fireEvent(\"before_finish\", drag.mode, [taskId, drag.mode, gantt.copy(drag.obj), e])) {\n //drag.obj._dhx_changed = false;\n this.clear_drag_state();\n\n if (taskId == drag.id) {\n drag.obj._dhx_changed = false;\n gantt.mixin(task, drag.obj, true);\n }\n\n gantt.refreshTask(task.id);\n } else {\n var drag_id = taskId;\n\n gantt._init_task_timing(task);\n\n this.clear_drag_state();\n gantt.updateTask(task.id);\n\n this._fireEvent(\"after_finish\", drag.mode, [drag_id, drag.mode, e]);\n }\n },\n on_mouse_up: function on_mouse_up(e) {\n var drag = this.drag;\n\n if (drag.mode && drag.id) {\n var config = timeline.$getConfig(); //drop\n\n var task = gantt.getTask(drag.id);\n var dragMultiple = this.dragMultiple;\n var finalizingBulkMove = false;\n var moveCount = 0;\n\n if (drag.mode === config.drag_mode.move) {\n if (gantt.isSummaryTask(task) && config.drag_project || this._isMultiselect()) {\n finalizingBulkMove = true;\n moveCount = Object.keys(dragMultiple).length;\n }\n }\n\n var doFinalize = function doFinalize() {\n if (finalizingBulkMove) {\n for (var i in dragMultiple) {\n // GS-1057: Don't call drag events for the dragged task as they will be called later\n if (dragMultiple[i].id != drag.id) {\n this._finalize_mouse_up(dragMultiple[i].id, config, dragMultiple[i], e);\n }\n }\n }\n\n this._finalize_mouse_up(drag.id, config, drag, e);\n };\n\n if (finalizingBulkMove && moveCount > 10) {\n // 10 - arbitrary threshold for bulk dnd at which we start doing complete repaint to refresh\n gantt.batchUpdate(function () {\n doFinalize.call(this);\n }.bind(this));\n } else {\n doFinalize.call(this);\n }\n }\n\n this.clear_drag_state();\n },\n _get_drag_mode: function _get_drag_mode(className, el) {\n var config = timeline.$getConfig();\n var modes = config.drag_mode;\n var classes = (className || \"\").split(\" \");\n var classname = classes[0];\n var drag = {\n mode: null,\n left: null\n };\n\n switch (classname) {\n case \"gantt_task_line\":\n case \"gantt_task_content\":\n drag.mode = modes.move;\n break;\n\n case \"gantt_task_drag\":\n drag.mode = modes.resize;\n var dragProperty = el.getAttribute(\"data-bind-property\");\n\n if (dragProperty == \"start_date\") {\n drag.left = true;\n } else {\n drag.left = false;\n }\n\n break;\n\n case \"gantt_task_progress_drag\":\n drag.mode = modes.progress;\n break;\n\n case \"gantt_link_control\":\n case \"gantt_link_point\":\n drag.mode = modes.ignore;\n break;\n\n default:\n drag = null;\n break;\n }\n\n return drag;\n },\n _start_dnd: function _start_dnd(e) {\n var drag = this.drag = this.drag.start_drag;\n delete drag.start_drag;\n var cfg = timeline.$getConfig();\n var id = drag.id;\n\n if (!cfg[\"drag_\" + drag.mode] || !gantt.callEvent(\"onBeforeDrag\", [id, drag.mode, e]) || !this._fireEvent(\"before_start\", drag.mode, [id, drag.mode, e])) {\n this.clear_drag_state();\n } else {\n delete drag.start_drag;\n var task = gantt.getTask(id);\n\n if (gantt.isReadonly(task)) {\n this.clear_drag_state();\n return;\n }\n\n if (this._isMultiselect()) {\n // for don't move selected tasks when drag unselected task\n var selectedTasksIds = gantt.getSelectedTasks();\n\n if (selectedTasksIds.indexOf(drag.id) >= 0) {\n helpers.forEach(selectedTasksIds, gantt.bind(function (taskId) {\n var selectedTask = gantt.getTask(taskId);\n\n if (gantt.isSummaryTask(selectedTask) && gantt.config.drag_project && drag.mode == cfg.drag_mode.move) {\n this._addSubtasksToDragMultiple(selectedTask.id);\n }\n\n this.dragMultiple[taskId] = gantt.mixin({\n id: selectedTask.id,\n obj: gantt.copy(selectedTask)\n }, this.drag);\n }, this));\n }\n } // for move unselected summary\n\n\n if (gantt.isSummaryTask(task) && gantt.config.drag_project && drag.mode == cfg.drag_mode.move) {\n this._addSubtasksToDragMultiple(task.id);\n }\n\n gantt.callEvent(\"onTaskDragStart\", []);\n }\n },\n _fireEvent: function _fireEvent(stage, mode, params) {\n gantt.assert(this._events[stage], \"Invalid stage:{\" + stage + \"}\");\n var trigger = this._events[stage][mode];\n gantt.assert(trigger, \"Unknown after drop mode:{\" + mode + \"}\");\n gantt.assert(params, \"Invalid event arguments\");\n if (!gantt.checkEvent(trigger)) return true;\n return gantt.callEvent(trigger, params);\n },\n round_task_dates: function round_task_dates(task) {\n var drag_state = this.drag;\n var config = timeline.$getConfig();\n\n if (!drag_state) {\n drag_state = {\n mode: config.drag_mode.move\n };\n }\n\n this._fix_dnd_scale_time(task, drag_state);\n },\n destructor: function destructor() {\n this._domEvents.detachAll();\n },\n _isMultiselect: function _isMultiselect() {\n return gantt.config.drag_multiple && !!(gantt.getSelectedTasks && gantt.getSelectedTasks().length > 0);\n },\n _addSubtasksToDragMultiple: function _addSubtasksToDragMultiple(summaryId) {\n gantt.eachTask(function (child) {\n this.dragMultiple[child.id] = gantt.mixin({\n id: child.id,\n obj: gantt.copy(child)\n }, this.drag);\n }, summaryId, this);\n }\n };\n}\n\nfunction initTaskDND() {\n var _tasks_dnd;\n\n return {\n extend: function extend(timeline) {\n timeline.roundTaskDates = function (task) {\n _tasks_dnd.round_task_dates(task);\n };\n },\n init: function init(timeline, gantt) {\n _tasks_dnd = createTaskDND(timeline, gantt); // TODO: entry point for touch handlers, move touch to timeline\n\n timeline._tasks_dnd = _tasks_dnd;\n return _tasks_dnd.init(gantt);\n },\n destructor: function destructor() {\n if (_tasks_dnd) {\n _tasks_dnd.destructor();\n\n _tasks_dnd = null;\n }\n }\n };\n}\n\nmodule.exports = {\n createTaskDND: initTaskDND\n};","var utils = require(\"../../../utils/utils\"),\n taskDnD = require(\"./tasks_dnd\"),\n linkDnD = require(\"./links_dnd\"),\n domHelpers = require(\"../utils/dom_helpers\");\n\nvar initializer = function () {\n return function (gantt) {\n var services = gantt.$services;\n return {\n onCreated: function onCreated(timeline) {\n var config = timeline.$config;\n config.bind = utils.defined(config.bind) ? config.bind : \"task\";\n config.bindLinks = utils.defined(config.bindLinks) ? config.bindLinks : \"link\";\n timeline._linksDnD = linkDnD.createLinkDND();\n timeline._tasksDnD = taskDnD.createTaskDND();\n\n timeline._tasksDnD.extend(timeline);\n\n this._mouseDelegates = require(\"../mouse_event_container\")(gantt);\n },\n onInitialized: function onInitialized(timeline) {\n this._attachDomEvents(gantt);\n\n this._attachStateProvider(gantt, timeline);\n\n timeline._tasksDnD.init(timeline, gantt);\n\n timeline._linksDnD.init(timeline, gantt);\n\n if (timeline.$config.id == \"timeline\") {\n this.extendDom(timeline);\n }\n },\n onDestroyed: function onDestroyed(timeline) {\n this._clearDomEvents(gantt);\n\n this._clearStateProvider(gantt);\n\n if (timeline._tasksDnD) {\n timeline._tasksDnD.destructor();\n }\n },\n extendDom: function extendDom(timeline) {\n gantt.$task = timeline.$task;\n gantt.$task_scale = timeline.$task_scale;\n gantt.$task_data = timeline.$task_data;\n gantt.$task_bg = timeline.$task_bg;\n gantt.$task_links = timeline.$task_links;\n gantt.$task_bars = timeline.$task_bars;\n },\n _clearDomEvents: function _clearDomEvents() {\n this._mouseDelegates.destructor();\n\n this._mouseDelegates = null;\n },\n _attachDomEvents: function _attachDomEvents(gantt) {\n function _delete_link_handler(id, e) {\n if (id && this.callEvent(\"onLinkDblClick\", [id, e])) {\n var link = this.getLink(id);\n if (this.isReadonly(link)) return;\n var title = \"\";\n var question = this.locale.labels.link + \" \" + this.templates.link_description(this.getLink(id)) + \" \" + this.locale.labels.confirm_link_deleting;\n window.setTimeout(function () {\n gantt._simple_confirm(question, title, function () {\n gantt.deleteLink(id);\n });\n }, this.config.touch ? 300 : 1);\n }\n }\n\n this._mouseDelegates.delegate(\"click\", \"gantt_task_link\", gantt.bind(function (e, trg) {\n var id = this.locate(e, this.config.link_attribute);\n\n if (id) {\n this.callEvent(\"onLinkClick\", [id, e]);\n }\n }, gantt), this.$task);\n\n this._mouseDelegates.delegate(\"click\", \"gantt_scale_cell\", gantt.bind(function (e, trg) {\n var pos = domHelpers.getRelativeEventPosition(e, gantt.$task_data);\n var date = gantt.dateFromPos(pos.x);\n var coll = Math.floor(gantt.columnIndexByDate(date));\n var coll_date = gantt.getScale().trace_x[coll];\n gantt.callEvent(\"onScaleClick\", [e, coll_date]);\n }, gantt), this.$task);\n\n this._mouseDelegates.delegate(\"doubleclick\", \"gantt_task_link\", gantt.bind(function (e, id, trg) {\n var id = this.locate(e, gantt.config.link_attribute);\n\n _delete_link_handler.call(this, id, e);\n }, gantt), this.$task);\n\n this._mouseDelegates.delegate(\"doubleclick\", \"gantt_link_point\", gantt.bind(function (e, id, trg) {\n var id = this.locate(e),\n task = this.getTask(id);\n var link = null;\n\n if (trg.parentNode && domHelpers.getClassName(trg.parentNode)) {\n if (domHelpers.getClassName(trg.parentNode).indexOf(\"_left\") > -1) {\n link = task.$target[0];\n } else {\n link = task.$source[0];\n }\n }\n\n if (link) _delete_link_handler.call(this, link, e);\n return false;\n }, gantt), this.$task);\n },\n _attachStateProvider: function _attachStateProvider(gantt, timeline) {\n var self = timeline;\n var state = services.getService(\"state\");\n state.registerProvider(\"tasksTimeline\", function () {\n return {\n scale_unit: self._tasks ? self._tasks.unit : undefined,\n scale_step: self._tasks ? self._tasks.step : undefined\n };\n });\n },\n _clearStateProvider: function _clearStateProvider() {\n var state = services.getService(\"state\");\n state.unregisterProvider(\"tasksTimeline\");\n }\n };\n };\n}();\n\nmodule.exports = initializer;","var domHelpers = require(\"../../utils/dom_helpers\");\n/**\r\n * methods for highlighting current drag and drop position\r\n */\n\n\nfunction highlightPosition(target, root, grid) {\n var markerPos = getTaskMarkerPosition(target, grid); // setting position of row\n\n root.marker.style.left = markerPos.x + 9 + \"px\";\n root.marker.style.width = markerPos.width + \"px\";\n root.marker.style.overflow = \"hidden\";\n var markerLine = root.markerLine;\n\n if (!markerLine) {\n markerLine = document.createElement(\"div\");\n markerLine.className = \"gantt_drag_marker gantt_grid_dnd_marker\";\n markerLine.innerHTML = \"
\";\n markerLine.style.pointerEvents = \"none\";\n }\n\n if (target.child) {\n highlightFolder(target, markerLine, grid);\n } else {\n highlightRow(target, markerLine, grid);\n }\n\n if (!root.markerLine) {\n document.body.appendChild(markerLine);\n root.markerLine = markerLine;\n }\n}\n\nfunction removeLineHighlight(root) {\n if (root.markerLine && root.markerLine.parentNode) {\n root.markerLine.parentNode.removeChild(root.markerLine);\n }\n\n root.markerLine = null;\n}\n\nfunction highlightRow(target, markerLine, grid) {\n var linePos = getLineMarkerPosition(target, grid);\n var maxBottom = grid.$grid_data.getBoundingClientRect().bottom + window.scrollY;\n markerLine.innerHTML = \"
\";\n markerLine.style.left = linePos.x + \"px\";\n markerLine.style.height = \"4px\";\n var markerLineTop = linePos.y - 2;\n markerLine.style.top = markerLineTop + \"px\";\n markerLine.style.width = linePos.width + \"px\";\n\n if (markerLineTop > maxBottom) {\n markerLine.style.top = maxBottom + 'px';\n }\n\n return markerLine;\n}\n\nfunction highlightFolder(target, markerFolder, grid) {\n var id = target.targetParent;\n var pos = gridToPageCoordinates({\n x: 0,\n y: grid.getItemTop(id)\n }, grid);\n var maxBottom = grid.$grid_data.getBoundingClientRect().bottom + window.scrollY;\n var folderHighlightWidth = setWidthWithinContainer(grid.$gantt, grid.$grid_data.offsetWidth);\n markerFolder.innerHTML = \"
\";\n markerFolder.style.width = folderHighlightWidth + \"px\";\n markerFolder.style.top = pos.y + \"px\";\n markerFolder.style.left = pos.x + \"px\";\n markerFolder.style.height = grid.getItemHeight(id) + \"px\";\n\n if (pos.y > maxBottom) {\n markerFolder.style.top = maxBottom + 'px';\n }\n\n return markerFolder;\n}\n\nfunction getLineMarkerPosition(target, grid) {\n var store = grid.$config.rowStore;\n var pos = {\n x: 0,\n y: 0\n };\n var indentNode = grid.$grid_data.querySelector(\".gantt_tree_indent\");\n var indent = 15;\n var level = 0;\n\n if (indentNode) {\n indent = indentNode.offsetWidth;\n }\n\n var iconWidth = 40;\n\n if (target.targetId !== store.$getRootId()) {\n var itemTop = grid.getItemTop(target.targetId);\n var itemHeight = grid.getItemHeight(target.targetId);\n level = store.exists(target.targetId) ? store.calculateItemLevel(store.getItem(target.targetId)) : 0;\n\n if (target.prevSibling) {\n pos.y = itemTop;\n } else if (target.nextSibling) {\n var childCount = 0;\n store.eachItem(function (child) {\n if (store.getIndexById(child.id) !== -1) childCount++;\n }, target.targetId);\n pos.y = itemTop + itemHeight + childCount * itemHeight;\n } else {\n pos.y = itemTop + itemHeight;\n level += 1;\n }\n }\n\n pos.x = iconWidth + level * indent;\n pos.width = setWidthWithinContainer(grid.$gantt, Math.max(grid.$grid_data.offsetWidth - pos.x, 0), pos.x);\n return gridToPageCoordinates(pos, grid);\n}\n\nfunction gridToPageCoordinates(pos, grid) {\n var gridPos = domHelpers.getNodePosition(grid.$grid_data);\n pos.x += gridPos.x + grid.$grid.scrollLeft;\n pos.y += gridPos.y - grid.$grid_data.scrollTop;\n return pos;\n}\n\nfunction getTaskMarkerPosition(e, grid) {\n var pos = domHelpers.getNodePosition(grid.$grid_data);\n var ePos = domHelpers.getRelativeEventPosition(e, grid.$grid_data); // row offset\n\n var x = pos.x + grid.$grid.scrollLeft;\n var y = ePos.y - 10;\n var rowHeight = grid.getItemHeight(e.targetId); // prevent moving row out of grid_data container\n\n if (y < pos.y) y = pos.y;\n var gridHeight = grid.getTotalHeight();\n if (y > pos.y + gridHeight - rowHeight) y = pos.y + gridHeight - rowHeight;\n pos.x = x;\n pos.y = y;\n pos.width = setWidthWithinContainer(grid.$gantt, pos.width, 9);\n return pos;\n}\n\nfunction setWidthWithinContainer(gantt, width) {\n var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var containerSize = domHelpers.getNodePosition(gantt.$root);\n\n if (width > containerSize.width) {\n width = containerSize.width - offset - 2;\n }\n\n return width;\n}\n\nmodule.exports = {\n removeLineHighlight: removeLineHighlight,\n highlightPosition: highlightPosition\n};","/**\r\n * resolve dnd position of the task when gantt.config.order_branch_free = true\r\n */\nvar dropTarget = require(\"./drop_target\");\n\nmodule.exports = function getMultiLevelDropPosition(dndTaskId, targetTaskId, relTargetPos, eventTop, store) {\n var result;\n\n if (targetTaskId !== store.$getRootId()) {\n if (relTargetPos < 0.25) {\n result = dropTarget.prevSiblingTarget(dndTaskId, targetTaskId, store);\n } else if (relTargetPos > 0.60 && !(store.hasChild(targetTaskId) && store.getItem(targetTaskId).$open)) {\n result = dropTarget.nextSiblingTarget(dndTaskId, targetTaskId, store);\n } else {\n result = dropTarget.firstChildTarget(dndTaskId, targetTaskId, store);\n }\n } else {\n var rootId = store.$getRootId();\n\n if (store.hasChild(rootId) && eventTop >= 0) {\n result = dropTarget.lastChildTarget(dndTaskId, rootId, store);\n } else {\n result = dropTarget.firstChildTarget(dndTaskId, rootId, store);\n }\n }\n\n return result;\n};","/**\r\n * resolve dnd position of the task when gantt.config.order_branch_free = false\r\n */\nvar dropTarget = require(\"./drop_target\");\n\nfunction getLast(store) {\n var current = store.getNext();\n\n while (store.exists(current)) {\n var next = store.getNext(current);\n\n if (!store.exists(next)) {\n return current;\n } else {\n current = next;\n }\n }\n\n return null;\n}\n\nfunction findClosesTarget(dndTaskId, taskId, allowedLevel, store, up) {\n var prev = taskId;\n\n while (store.exists(prev)) {\n var targetLevel = store.calculateItemLevel(store.getItem(prev));\n\n if ((targetLevel === allowedLevel || targetLevel === allowedLevel - 1) && store.getBranchIndex(prev) > -1) {\n break;\n } else {\n prev = up ? store.getPrev(prev) : store.getNext(prev);\n }\n }\n\n if (store.exists(prev)) {\n if (store.calculateItemLevel(store.getItem(prev)) === allowedLevel) {\n return up ? dropTarget.nextSiblingTarget(dndTaskId, prev, store) : dropTarget.prevSiblingTarget(dndTaskId, prev, store);\n } else {\n return dropTarget.firstChildTarget(dndTaskId, prev, store);\n }\n }\n\n return null;\n}\n\nfunction findTargetAbove(dndTaskId, taskId, allowedLevel, store) {\n return findClosesTarget(dndTaskId, taskId, allowedLevel, store, true);\n}\n\nfunction findTargetBelow(dndTaskId, taskId, allowedLevel, store) {\n return findClosesTarget(dndTaskId, taskId, allowedLevel, store, false);\n}\n\nmodule.exports = function getSameLevelDropPosition(dndTaskId, targetTaskId, relTargetPos, eventTop, store, level) {\n var result;\n\n if (targetTaskId !== store.$getRootId()) {\n var targetTask = store.getItem(targetTaskId);\n var targetLevel = store.calculateItemLevel(targetTask);\n\n if (targetLevel === level) {\n var prevSibling = store.getPrevSibling(targetTaskId);\n\n if (relTargetPos < 0.5 && !prevSibling) {\n result = dropTarget.prevSiblingTarget(dndTaskId, targetTaskId, store);\n } else {\n if (relTargetPos < 0.5) {\n targetTaskId = prevSibling;\n }\n\n result = dropTarget.nextSiblingTarget(dndTaskId, targetTaskId, store);\n }\n } else if (targetLevel > level) {\n store.eachParent(function (parent) {\n if (store.calculateItemLevel(parent) === level) {\n targetTaskId = parent.id;\n }\n }, targetTask);\n result = findTargetAbove(dndTaskId, targetTaskId, level, store);\n } else {\n var targetAbove = findTargetAbove(dndTaskId, targetTaskId, level, store);\n var targetBelow = findTargetBelow(dndTaskId, targetTaskId, level, store);\n result = relTargetPos < 0.5 ? targetAbove : targetBelow;\n }\n } else {\n var rootId = store.$getRootId();\n var rootLevel = store.getChildren(rootId);\n result = dropTarget.createDropTargetObject();\n\n if (rootLevel.length && eventTop >= 0) {\n result = findTargetAbove(dndTaskId, getLast(store), level, store);\n } else {\n result = findTargetBelow(dndTaskId, rootId, level, store);\n }\n }\n\n return result;\n};","var domHelpers = require(\"../utils/dom_helpers\");\n\nvar dropTarget = require(\"./tasks_grid_dnd_marker_helpers/drop_target\");\n\nvar getLockedLevelTarget = require(\"./tasks_grid_dnd_marker_helpers/locked_level\");\n\nvar getMultiLevelTarget = require(\"./tasks_grid_dnd_marker_helpers/multi_level\");\n\nvar higlighter = require(\"./tasks_grid_dnd_marker_helpers/highlight\");\n\nvar isPlaceholderTask = require(\"../../../utils/placeholder_task\");\n\nfunction _init_dnd(gantt, grid) {\n var DnD = gantt.$services.getService(\"dnd\");\n\n if (!grid.$config.bind || !gantt.getDatastore(grid.$config.bind)) {\n return;\n }\n\n function locate(e) {\n return domHelpers.locateAttribute(e, grid.$config.item_attribute);\n }\n\n function getStore() {\n return gantt.getDatastore(grid.$config.bind);\n }\n\n function checkPlaceholderTask(id) {\n return isPlaceholderTask(id, gantt, getStore());\n }\n\n var dnd = new DnD(grid.$grid_data, {\n updates_per_second: 60\n });\n if (gantt.defined(grid.$getConfig().dnd_sensitivity)) dnd.config.sensitivity = grid.$getConfig().dnd_sensitivity;\n dnd.attachEvent(\"onBeforeDragStart\", gantt.bind(function (obj, e) {\n var el = locate(e);\n if (!el) return false;\n if (gantt.hideQuickInfo) gantt._hideQuickInfo();\n\n if (domHelpers.closest(e.target, \".gantt_grid_editor_placeholder\")) {\n return false;\n }\n\n var id = el.getAttribute(grid.$config.item_attribute);\n var datastore = grid.$config.rowStore;\n var task = datastore.getItem(id);\n if (gantt.isReadonly(task) || checkPlaceholderTask(id)) return false;\n dnd.config.initial_open_state = task.$open;\n\n if (!gantt.callEvent(\"onRowDragStart\", [id, e.target || e.srcElement, e])) {\n return false;\n }\n }, gantt));\n dnd.attachEvent(\"onAfterDragStart\", gantt.bind(function (obj, e) {\n var el = locate(e);\n dnd.config.marker.innerHTML = el.outerHTML;\n var element = dnd.config.marker.firstChild;\n\n if (element) {\n dnd.config.marker.style.opacity = 0.4;\n element.style.position = \"static\";\n element.style.pointerEvents = \"none\";\n }\n\n dnd.config.id = el.getAttribute(grid.$config.item_attribute);\n var store = grid.$config.rowStore;\n var task = store.getItem(dnd.config.id);\n dnd.config.level = store.calculateItemLevel(task);\n dnd.config.drop_target = dropTarget.createDropTargetObject({\n targetParent: store.getParent(task.id),\n targetIndex: store.getBranchIndex(task.id),\n targetId: task.id,\n nextSibling: true\n });\n task.$open = false;\n task.$transparent = true;\n this.refreshData();\n }, gantt));\n\n function getTargetTaskId(e) {\n var y = domHelpers.getRelativeEventPosition(e, grid.$grid_data).y;\n var store = grid.$config.rowStore;\n\n if (!document.doctype) {\n y += window.scrollY;\n }\n\n y = y || 0; // limits for the marker according to the layout layer\n\n var scrollPos = grid.$state.scrollTop || 0;\n var maxBottom = gantt.$grid_data.getBoundingClientRect().height + scrollPos + window.scrollY;\n var minTop = scrollPos;\n var firstVisibleTaskIndex = grid.getItemIndexByTopPosition(grid.$state.scrollTop);\n\n if (!store.exists(firstVisibleTaskIndex)) {\n firstVisibleTaskIndex = store.countVisible() - 1;\n }\n\n if (firstVisibleTaskIndex < 0) {\n return store.$getRootId();\n }\n\n var firstVisibleTaskId = store.getIdByIndex(firstVisibleTaskIndex);\n var firstVisibleTaskPos = grid.$state.scrollTop / grid.getItemHeight(firstVisibleTaskId);\n var hiddenTaskPart = firstVisibleTaskPos - Math.floor(firstVisibleTaskPos);\n\n if (hiddenTaskPart > 0.1 && hiddenTaskPart < 0.9) {\n maxBottom = maxBottom - grid.getItemHeight(firstVisibleTaskId) * hiddenTaskPart;\n minTop = minTop + grid.getItemHeight(firstVisibleTaskId) * (1 - hiddenTaskPart);\n } // GS-715. The placeholder task row shouldn't be draggable below the Gantt container\n\n\n var gridPosition = domHelpers.getNodePosition(grid.$grid_data);\n var gridBottom = gridPosition.y + gridPosition.height;\n var placeholderRowHeight = dnd.config.marker.offsetHeight;\n\n if (y + placeholderRowHeight + window.scrollY >= maxBottom) {\n dnd.config.marker.style.top = gridBottom - placeholderRowHeight + \"px\";\n }\n\n if (y >= maxBottom) {\n y = maxBottom;\n } else if (y <= minTop) {\n y = minTop;\n dnd.config.marker.style.top = gridPosition.y + \"px\";\n }\n\n var index = grid.getItemIndexByTopPosition(y);\n\n if (index > store.countVisible() - 1 || index < 0) {\n return store.$getRootId();\n }\n\n var targetId = store.getIdByIndex(index);\n\n if (checkPlaceholderTask(targetId)) {\n return store.getPrevSibling(targetId);\n }\n\n return store.getIdByIndex(index);\n }\n\n function getDropPosition(e) {\n var targetTaskId = getTargetTaskId(e);\n var relTargetPos = null;\n var store = grid.$config.rowStore;\n var config = grid.$getConfig();\n var lockLevel = !config.order_branch_free;\n var eventTop = domHelpers.getRelativeEventPosition(e, grid.$grid_data).y;\n\n if (!document.doctype) {\n eventTop += window.scrollY;\n }\n\n if (targetTaskId !== store.$getRootId()) {\n var rowTop = grid.getItemTop(targetTaskId);\n var rowHeight = grid.getItemHeight(targetTaskId);\n relTargetPos = (eventTop - rowTop) / rowHeight;\n }\n\n var result;\n\n if (!lockLevel) {\n result = getMultiLevelTarget(dnd.config.id, targetTaskId, relTargetPos, eventTop, store);\n } else {\n result = getLockedLevelTarget(dnd.config.id, targetTaskId, relTargetPos, eventTop, store, dnd.config.level);\n\n if (result && result.targetParent && checkPlaceholderTask(result.targetParent)) {\n targetTaskId = store.getPrevSibling(result.targetParent);\n result = getLockedLevelTarget(dnd.config.id, targetTaskId, relTargetPos, eventTop, store, dnd.config.level);\n }\n }\n\n return result;\n }\n\n dnd.attachEvent(\"onDragMove\", gantt.bind(function (obj, e) {\n var target = getDropPosition(e);\n\n if (!target || gantt.callEvent(\"onBeforeRowDragMove\", [dnd.config.id, target.targetParent, target.targetIndex]) === false) {\n target = dropTarget.createDropTargetObject(dnd.config.drop_target);\n }\n\n higlighter.highlightPosition(target, dnd.config, grid);\n dnd.config.drop_target = target;\n\n gantt._waiAria.reorderMarkerAttr(dnd.config.marker);\n\n this.callEvent(\"onRowDragMove\", [dnd.config.id, target.targetParent, target.targetIndex]);\n return true;\n }, gantt));\n dnd.attachEvent(\"onDragEnd\", gantt.bind(function () {\n var store = grid.$config.rowStore;\n var task = store.getItem(dnd.config.id);\n higlighter.removeLineHighlight(dnd.config);\n task.$transparent = false;\n task.$open = dnd.config.initial_open_state;\n var target = dnd.config.drop_target;\n\n if (this.callEvent(\"onBeforeRowDragEnd\", [dnd.config.id, target.targetParent, target.targetIndex]) === false) {\n task.$drop_target = null;\n } else {\n store.move(dnd.config.id, target.targetIndex, target.targetParent);\n gantt.render();\n this.callEvent(\"onRowDragEnd\", [dnd.config.id, target.targetParent, target.targetIndex]);\n }\n\n store.refresh(task.id);\n }, gantt));\n}\n\nmodule.exports = {\n init: _init_dnd\n};","var domHelpers = require(\"../utils/dom_helpers\");\n\nvar isPlaceholderTask = require(\"../../../utils/placeholder_task\");\n\nfunction _init_dnd(gantt, grid) {\n var DnD = gantt.$services.getService(\"dnd\");\n\n if (!grid.$config.bind || !gantt.getDatastore(grid.$config.bind)) {\n return;\n }\n\n function locate(e) {\n return domHelpers.locateAttribute(e, grid.$config.item_attribute);\n }\n\n function getStore() {\n return gantt.getDatastore(grid.$config.bind);\n }\n\n function checkPlaceholderTask(id) {\n return isPlaceholderTask(id, gantt, getStore());\n }\n\n var dnd = new DnD(grid.$grid_data, {\n updates_per_second: 60\n });\n if (gantt.defined(grid.$getConfig().dnd_sensitivity)) dnd.config.sensitivity = grid.$getConfig().dnd_sensitivity;\n dnd.attachEvent(\"onBeforeDragStart\", gantt.bind(function (obj, e) {\n var el = locate(e);\n if (!el) return false;\n if (gantt.hideQuickInfo) gantt._hideQuickInfo();\n\n if (domHelpers.closest(e.target, \".gantt_grid_editor_placeholder\")) {\n return false;\n }\n\n var id = el.getAttribute(grid.$config.item_attribute);\n if (checkPlaceholderTask(id)) return false;\n var datastore = getStore();\n var task = datastore.getItem(id);\n if (gantt.isReadonly(task)) return false;\n dnd.config.initial_open_state = task.$open;\n\n if (!gantt.callEvent(\"onRowDragStart\", [id, e.target || e.srcElement, e])) {\n return false;\n }\n }, gantt));\n dnd.attachEvent(\"onAfterDragStart\", gantt.bind(function (obj, e) {\n var el = locate(e);\n dnd.config.marker.innerHTML = el.outerHTML;\n var element = dnd.config.marker.firstChild;\n\n if (element) {\n element.style.position = \"static\";\n }\n\n dnd.config.id = el.getAttribute(grid.$config.item_attribute);\n var store = getStore();\n var task = store.getItem(dnd.config.id);\n dnd.config.index = store.getBranchIndex(dnd.config.id);\n dnd.config.parent = task.parent;\n task.$open = false;\n task.$transparent = true;\n this.refreshData();\n }, gantt));\n\n dnd.lastTaskOfLevel = function (level) {\n var last_item = null;\n var store = getStore();\n var tasks = store.getItems();\n\n for (var i = 0, len = tasks.length; i < len; i++) {\n if (tasks[i].$level == level) {\n last_item = tasks[i];\n }\n }\n\n return last_item ? last_item.id : null;\n };\n\n dnd._getGridPos = gantt.bind(function (e) {\n var pos = domHelpers.getNodePosition(grid.$grid_data); // row offset\n\n var x = pos.x + grid.$grid.scrollLeft;\n var y = e.pos.y - 10;\n var rowHeight = grid.getItemHeight(dnd.config.id); // prevent moving row out of grid_data container\n\n if (y < pos.y) y = pos.y;\n var gridHeight = grid.getTotalHeight();\n if (y > pos.y + gridHeight - rowHeight) y = pos.y + gridHeight - rowHeight;\n var maxBottom = pos.y + pos.height;\n\n if (y > maxBottom - rowHeight) {\n y = maxBottom - rowHeight;\n }\n\n pos.x = x;\n pos.y = y;\n return pos;\n }, gantt);\n dnd._getTargetY = gantt.bind(function (e) {\n var pos = domHelpers.getNodePosition(grid.$grid_data);\n var scrollPos = grid.$state.scrollTop || 0;\n var maxBottom = gantt.$grid_data.getBoundingClientRect().height + scrollPos;\n var y = e.pageY - pos.y + scrollPos;\n\n if (y > maxBottom) {\n y = maxBottom;\n } else if (y < scrollPos) {\n y = scrollPos;\n }\n\n return y;\n }, gantt);\n dnd._getTaskByY = gantt.bind(function (y, dropIndex) {\n var store = getStore();\n y = y || 0;\n var index = grid.getItemIndexByTopPosition(y);\n index = dropIndex < index ? index - 1 : index;\n if (index > store.countVisible() - 1) return null;\n return store.getIdByIndex(index);\n }, gantt);\n dnd.attachEvent(\"onDragMove\", gantt.bind(function (obj, e) {\n var gridDataSizes = gantt.$grid_data.getBoundingClientRect();\n var maxBottom = gridDataSizes.height + gridDataSizes.y + (grid.$state.scrollTop || 0) + window.scrollY;\n var dd = dnd.config;\n\n var pos = dnd._getGridPos(e);\n\n gantt._waiAria.reorderMarkerAttr(dd.marker);\n\n var config = grid.$getConfig(),\n store = getStore(); // setting position of row\n\n if (pos.y < maxBottom) {\n dd.marker.style.top = pos.y + \"px\";\n } else {\n dd.marker.style.top = maxBottom + \"px\";\n }\n\n dd.marker.style.left = pos.x + 10 + \"px\";\n var containerSize = domHelpers.getNodePosition(gantt.$root);\n\n if (pos.width > containerSize.width) {\n dd.marker.style.width = containerSize.width - 10 - 2 + \"px\";\n dd.marker.style.overflow = \"hidden\";\n } // highlight row when mouseover\n\n\n var item = store.getItem(dnd.config.id);\n\n var targetY = dnd._getTargetY(e);\n\n var el = dnd._getTaskByY(targetY, store.getIndexById(item.id));\n\n if (!store.exists(el)) {\n el = dnd.lastTaskOfLevel(config.order_branch_free ? item.$level : 0);\n\n if (el == dnd.config.id) {\n el = null;\n }\n }\n\n function allowedLevel(next, item) {\n return !store.isChildOf(over.id, item.id) && (next.$level == item.$level || config.order_branch_free);\n }\n\n if (store.exists(el)) {\n var over = store.getItem(el);\n var itemTop = grid.getItemTop(over.id);\n var itemHeight = grid.getItemHeight(over.id);\n\n if (itemTop + itemHeight / 2 < targetY) {\n //hovering over bottom part of item, check can be drop to bottom\n var index = store.getIndexById(over.id);\n var nextId = store.getNext(over.id); //adds +1 when hovering over placeholder\n\n var next = store.getItem(nextId);\n\n if (checkPlaceholderTask(nextId)) {\n var prevId = store.getPrev(next.id);\n next = store.getItem(prevId);\n }\n\n if (next) {\n if (next.id != item.id) {\n over = next; //there is a valid target\n } else {\n if (config.order_branch_free) {\n if (!(store.isChildOf(item.id, over.id) && store.getChildren(over.id).length == 1)) return;else {\n store.move(item.id, store.getBranchIndex(over.id) + 1, store.getParent(over.id));\n return;\n }\n } else {\n return;\n }\n }\n } else {\n //we at end of the list, check and drop at the end of list\n nextId = store.getIdByIndex(index);\n next = store.getItem(nextId);\n\n if (checkPlaceholderTask(nextId)) {\n var prevId = store.getPrev(next.id);\n next = store.getItem(prevId);\n }\n\n if (allowedLevel(next, item) && next.id != item.id) {\n store.move(item.id, -1, store.getParent(next.id));\n return;\n }\n }\n } else if (config.order_branch_free) {\n if (over.id != item.id && allowedLevel(over, item) && !checkPlaceholderTask(over.id)) {\n if (!store.hasChild(over.id)) {\n over.$open = true;\n store.move(item.id, -1, over.id);\n return;\n }\n\n if (store.getIndexById(over.id) || itemHeight / 3 < targetY) return;\n }\n } //if item is on different level, check the one before it\n\n\n var index = store.getIndexById(over.id),\n prevId = store.getIdByIndex(index - 1);\n var prev = store.getItem(prevId);\n var shift = 1;\n\n while ((!prev || prev.id == over.id) && index - shift >= 0) {\n prevId = store.getIdByIndex(index - shift);\n prev = store.getItem(prevId);\n shift++;\n }\n\n if (item.id == over.id || checkPlaceholderTask(over.id)) return; //replacing item under cursor\n\n if (allowedLevel(over, item) && item.id != over.id) {\n store.move(item.id, 0, 0, over.id);\n } else if (over.$level == item.$level - 1 && !store.getChildren(over.id).length) {\n store.move(item.id, 0, over.id);\n } else if (prev && allowedLevel(prev, item) && item.id != prev.id) {\n store.move(item.id, -1, store.getParent(prev.id));\n }\n }\n\n return true;\n }, gantt));\n dnd.attachEvent(\"onDragEnd\", gantt.bind(function () {\n var store = getStore();\n var task = store.getItem(dnd.config.id);\n task.$transparent = false;\n task.$open = dnd.config.initial_open_state;\n\n if (this.callEvent(\"onBeforeRowDragEnd\", [dnd.config.id, dnd.config.parent, dnd.config.index]) === false) {\n store.move(dnd.config.id, dnd.config.index, dnd.config.parent);\n task.$drop_target = null;\n } else {\n this.callEvent(\"onRowDragEnd\", [dnd.config.id, task.$drop_target]);\n }\n\n gantt.render();\n this.refreshData();\n }, gantt));\n}\n\nmodule.exports = {\n init: _init_dnd\n};","var utils = require(\"../../../utils/utils\");\n\nvar rowDnd = require(\"./tasks_grid_dnd\");\n\nvar rowDndMarker = require(\"./tasks_grid_dnd_marker\");\n\nvar initializer = function () {\n return function (gantt) {\n return {\n onCreated: function onCreated(grid) {\n grid.$config = utils.mixin(grid.$config, {\n bind: \"task\"\n });\n\n if (grid.$config.id == \"grid\") {\n this.extendGantt(grid);\n gantt.ext.inlineEditors = gantt.ext._inlineEditors.createEditors(grid);\n gantt.ext.inlineEditors.init();\n }\n\n this._mouseDelegates = require(\"../mouse_event_container\")(gantt);\n },\n onInitialized: function onInitialized(grid) {\n var config = grid.$getConfig();\n\n if (config.order_branch) {\n if (config.order_branch == \"marker\") {\n rowDndMarker.init(grid.$gantt, grid);\n } else {\n rowDnd.init(grid.$gantt, grid);\n }\n }\n\n this.initEvents(grid, gantt);\n\n if (grid.$config.id == \"grid\") {\n this.extendDom(grid);\n }\n },\n onDestroyed: function onDestroyed(grid) {\n if (grid.$config.id == \"grid\") {\n gantt.ext.inlineEditors.destructor();\n }\n\n this.clearEvents(grid, gantt);\n },\n initEvents: function initEvents(grid, gantt) {\n this._mouseDelegates.delegate(\"click\", \"gantt_row\", gantt.bind(function (e, id, trg) {\n var config = grid.$getConfig();\n\n if (id !== null) {\n var task = this.getTask(id);\n if (config.scroll_on_click && !gantt._is_icon_open_click(e)) this.showDate(task.start_date);\n gantt.callEvent(\"onTaskRowClick\", [id, trg]);\n }\n }, gantt), grid.$grid);\n\n this._mouseDelegates.delegate(\"click\", \"gantt_grid_head_cell\", gantt.bind(function (e, id, trg) {\n var column = trg.getAttribute(\"data-column-id\");\n if (!gantt.callEvent(\"onGridHeaderClick\", [column, e])) return;\n var config = grid.$getConfig();\n\n if (column == \"add\") {\n var mouseEvents = gantt.$services.getService(\"mouseEvents\");\n mouseEvents.callHandler(\"click\", \"gantt_add\", grid.$grid, [e, config.root_id]);\n return;\n }\n\n if (config.sort && column) {\n // GS-929: if there is no column name, we cannot sort the column\n var sorting_method = column,\n conf;\n\n for (var i = 0; i < config.columns.length; i++) {\n if (config.columns[i].name == column) {\n conf = config.columns[i];\n break;\n }\n }\n\n if (conf && conf.sort !== undefined && conf.sort !== true) {\n sorting_method = conf.sort;\n\n if (!sorting_method) {\n // column sort property 'false', no sorting\n return;\n }\n }\n\n var sort = this._sort && this._sort.direction && this._sort.name == column ? this._sort.direction : \"desc\"; // invert sort direction\n\n sort = sort == \"desc\" ? \"asc\" : \"desc\";\n this._sort = {\n name: column,\n direction: sort\n };\n this.sort(sorting_method, sort == \"desc\");\n }\n }, gantt), grid.$grid);\n\n this._mouseDelegates.delegate(\"click\", \"gantt_add\", gantt.bind(function (e, id, trg) {\n var config = grid.$getConfig();\n if (config.readonly) return;\n var item = {};\n this.createTask(item, id ? id : gantt.config.root_id);\n return false;\n }, gantt), grid.$grid);\n },\n clearEvents: function clearEvents(grid, gantt) {\n this._mouseDelegates.destructor();\n\n this._mouseDelegates = null;\n },\n extendDom: function extendDom(grid) {\n gantt.$grid = grid.$grid;\n gantt.$grid_scale = grid.$grid_scale;\n gantt.$grid_data = grid.$grid_data;\n },\n extendGantt: function extendGantt(grid) {\n gantt.getGridColumns = gantt.bind(grid.getGridColumns, grid);\n grid.attachEvent(\"onColumnResizeStart\", function () {\n return gantt.callEvent(\"onColumnResizeStart\", arguments);\n });\n grid.attachEvent(\"onColumnResize\", function () {\n return gantt.callEvent(\"onColumnResize\", arguments);\n });\n grid.attachEvent(\"onColumnResizeEnd\", function () {\n return gantt.callEvent(\"onColumnResizeEnd\", arguments);\n });\n grid.attachEvent(\"onColumnResizeComplete\", function (columns, totalWidth) {\n gantt.config.grid_width = totalWidth;\n });\n grid.attachEvent(\"onBeforeRowResize\", function () {\n return gantt.callEvent(\"onBeforeRowResize\", arguments);\n });\n grid.attachEvent(\"onRowResize\", function () {\n return gantt.callEvent(\"onRowResize\", arguments);\n });\n grid.attachEvent(\"onBeforeRowResizeEnd\", function () {\n return gantt.callEvent(\"onBeforeRowResizeEnd\", arguments);\n });\n grid.attachEvent(\"onAfterRowResize\", function () {\n return gantt.callEvent(\"onAfterRowResize\", arguments);\n });\n }\n };\n };\n}();\n\nmodule.exports = initializer;","var getRowRectangle = require(\"./viewport/get_grid_row_rectangle\");\n\nvar getVisibleRange = require(\"./viewport/get_visible_bars_range\");\n\nfunction createGridTaskRowResizerRender(gantt) {\n function _render_grid_item(item, view, viewport) {\n var config = view.$getConfig();\n var resize_el = document.createElement(\"div\");\n resize_el.className = \"gantt_task_grid_row_resize_wrap\";\n resize_el.style.top = view.getItemTop(item.id) + view.getItemHeight(item.id) + \"px\";\n resize_el.innerHTML = \"
\";\n resize_el.setAttribute(config.task_grid_row_resizer_attribute, item.id);\n\n gantt._waiAria.rowResizerAttr(resize_el);\n\n return resize_el;\n }\n\n return {\n render: _render_grid_item,\n update: null,\n getRectangle: getRowRectangle,\n getVisibleRange: getVisibleRange\n };\n}\n\nmodule.exports = createGridTaskRowResizerRender;","var getRectangle = require(\"./viewport/get_bg_row_rectangle\");\n\nvar getVisibleRange = require(\"./viewport/get_visible_bars_range\");\n\nvar getVisibleCellsRange = require(\"./viewport/get_visible_cells_range\");\n\nvar isColumnVisible = require(\"./viewport/is_column_visible\");\n\nvar resourceTimetable = require(\"../../resource_timetable_builder\");\n\nfunction renderBar(level, start, end, timeline) {\n var top = (1 - (level * 1 || 0)) * 100;\n var left = timeline.posFromDate(start);\n var right = timeline.posFromDate(end);\n var element = document.createElement(\"div\");\n element.className = \"gantt_histogram_hor_bar\";\n element.style.top = top + '%';\n element.style.left = left + \"px\";\n element.style.width = right - left + 1 + \"px\";\n return element;\n}\n\nfunction renderConnection(prevLevel, nextLevel, left) {\n if (prevLevel === nextLevel) {\n return null;\n }\n\n var top = 1 - Math.max(prevLevel, nextLevel);\n var height = Math.abs(prevLevel - nextLevel);\n var element = document.createElement(\"div\");\n element.className = \"gantt_histogram_vert_bar\";\n element.style.top = top * 100 + \"%\";\n element.style.height = height * 100 + \"%\";\n element.style.left = left + \"px\";\n return element;\n}\n\nfunction generateRenderResourceHistogram(gantt) {\n var getResourceLoad = resourceTimetable(gantt);\n var renderedHistogramCells = {};\n var renderedHistogramRows = {};\n var renderedHistogramCapacity = {};\n\n function detachRenderedHistogramCell(id, index) {\n var renderedRow = renderedHistogramCells[id];\n\n if (renderedRow && renderedRow[index] && renderedRow[index].parentNode) {\n renderedRow[index].parentNode.removeChild(renderedRow[index]);\n }\n }\n\n function renderHistogramLine(capacity, timeline, maxCapacity, viewport) {\n var scale = timeline.getScale();\n var el = document.createElement(\"div\");\n var range = getVisibleCellsRange(scale, viewport);\n\n for (var i = range.start; i <= range.end; i++) {\n var colStart = scale.trace_x[i];\n var colEnd = scale.trace_x[i + 1] || gantt.date.add(colStart, scale.step, scale.unit);\n var col = scale.trace_x[i].valueOf();\n var level = Math.min(capacity[col] / maxCapacity, 1) || 0; // do not render histogram for lines with below zero capacity, as it's reserved for folders\n\n if (level < 0) {\n return null;\n }\n\n var nextLevel = Math.min(capacity[colEnd.valueOf()] / maxCapacity, 1) || 0;\n var bar = renderBar(level, colStart, colEnd, timeline);\n\n if (bar) {\n el.appendChild(bar);\n }\n\n var connection = renderConnection(level, nextLevel, timeline.posFromDate(colEnd));\n\n if (connection) {\n el.appendChild(connection);\n }\n }\n\n return el;\n }\n\n function renderCapacityElement(resource, sizes, capacityMatrix, config, timeline, maxCapacity, viewport) {\n var renderedElement = renderedHistogramCapacity[resource.id];\n\n if (renderedElement && renderedElement.parentNode) {\n renderedElement.parentNode.removeChild(renderedElement);\n }\n\n var capacityElement = renderHistogramLine(capacityMatrix, timeline, maxCapacity, viewport);\n\n if (capacityElement && sizes) {\n capacityElement.setAttribute(\"data-resource-id\", resource.id);\n capacityElement.setAttribute(timeline.$config.item_attribute, resource.id);\n capacityElement.style.position = \"absolute\";\n capacityElement.style.top = sizes.top + 1 + \"px\";\n capacityElement.style.height = timeline.getItemHeight(resource.id) - 1 + \"px\";\n capacityElement.style.left = 0;\n }\n\n return capacityElement;\n }\n\n function renderHistogramCell(resource, sizes, maxCapacity, config, templates, day, timeline) {\n var css = templates.histogram_cell_class(day.start_date, day.end_date, resource, day.tasks, day.assignments);\n var content = templates.histogram_cell_label(day.start_date, day.end_date, resource, day.tasks, day.assignments);\n var fill = templates.histogram_cell_allocated(day.start_date, day.end_date, resource, day.tasks, day.assignments);\n var height = timeline.getItemHeight(resource.id) - 1;\n\n if (css || content) {\n var el = document.createElement('div');\n el.className = [\"gantt_histogram_cell\", css].join(\" \");\n el.setAttribute(timeline.$config.item_attribute, resource.id);\n el.style.cssText = ['left:' + sizes.left + 'px', 'width:' + sizes.width + 'px', 'height:' + height + 'px', 'line-height:' + height + 'px', 'top:' + (sizes.top + 1) + 'px'].join(\";\");\n\n if (content) {\n content = \"
\" + content + \"
\";\n }\n\n if (fill) {\n content = \"
\" + content;\n }\n\n if (content) {\n el.innerHTML = content;\n }\n\n return el;\n }\n\n return null;\n }\n\n function renderResourceHistogram(resource, timeline, config, viewport) {\n var templates = timeline.$getTemplates();\n var scale = timeline.getScale();\n var timetable = getResourceLoad(resource, config.resource_property, scale, timeline);\n var cells = [];\n var capacityMatrix = {};\n var maxCapacity = resource.capacity || timeline.$config.capacity || 24;\n renderedHistogramCells[resource.id] = {};\n renderedHistogramRows[resource.id] = null;\n renderedHistogramCapacity[resource.id] = null;\n var smartRendering = !!viewport; //no viewport means smart rendering is disabled\n\n var range = getVisibleCellsRange(scale, viewport);\n\n for (var columnIndex = range.start; columnIndex <= range.end; columnIndex++) {\n var day = timetable[columnIndex];\n\n if (!day) {\n continue;\n }\n\n if (smartRendering && !isColumnVisible(columnIndex, scale, viewport, gantt)) {\n continue;\n }\n\n var capacity = templates.histogram_cell_capacity(day.start_date, day.end_date, resource, day.tasks, day.assignments);\n capacityMatrix[day.start_date.valueOf()] = capacity || 0;\n var sizes = timeline.getItemPosition(resource, day.start_date, day.end_date);\n var el = renderHistogramCell(resource, sizes, maxCapacity, config, templates, day, timeline);\n\n if (el) {\n cells.push(el);\n renderedHistogramCells[resource.id][columnIndex] = el;\n }\n }\n\n var row = null;\n\n if (cells.length) {\n row = document.createElement(\"div\");\n\n for (var i = 0; i < cells.length; i++) {\n row.appendChild(cells[i]);\n }\n\n var capacityElement = renderCapacityElement(resource, sizes, capacityMatrix, config, timeline, maxCapacity, viewport);\n\n if (capacityElement) {\n row.appendChild(capacityElement);\n renderedHistogramCapacity[resource.id] = capacityElement;\n }\n\n renderedHistogramRows[resource.id] = row;\n }\n\n return row;\n }\n\n function updateResourceHistogram(resource, node, timeline, config, viewport) {\n var templates = timeline.$getTemplates();\n var scale = timeline.getScale();\n var timetable = getResourceLoad(resource, config.resource_property, scale, timeline);\n var maxCapacity = resource.capacity || timeline.$config.capacity || 24;\n var capacityMatrix = {};\n var smartRendering = !!viewport; //no viewport means smart rendering is disabled\n\n var range = getVisibleCellsRange(scale, viewport);\n var checkedColumns = {};\n\n if (renderedHistogramCells && renderedHistogramCells[resource.id]) {\n for (var i in renderedHistogramCells[resource.id]) {\n checkedColumns[i] = i;\n }\n }\n\n for (var columnIndex = range.start; columnIndex <= range.end; columnIndex++) {\n var day = timetable[columnIndex];\n checkedColumns[columnIndex] = false;\n\n if (!day) {\n continue;\n }\n\n var capacity = templates.histogram_cell_capacity(day.start_date, day.end_date, resource, day.tasks, day.assignments);\n capacityMatrix[day.start_date.valueOf()] = capacity || 0;\n var sizes = timeline.getItemPosition(resource, day.start_date, day.end_date);\n\n if (smartRendering && !isColumnVisible(columnIndex, scale, viewport, gantt)) {\n detachRenderedHistogramCell(resource.id, columnIndex);\n continue;\n }\n\n var renderedCell = renderedHistogramCells[resource.id];\n\n if (!renderedCell || !renderedCell[columnIndex]) {\n var el = renderHistogramCell(resource, sizes, maxCapacity, config, templates, day, timeline);\n\n if (el) {\n node.appendChild(el);\n renderedHistogramCells[resource.id][columnIndex] = el;\n }\n } else if (renderedCell && renderedCell[columnIndex] && !renderedCell[columnIndex].parentNode) {\n node.appendChild(renderedCell[columnIndex]);\n }\n }\n\n for (var i in checkedColumns) {\n if (checkedColumns[i] !== false) {\n detachRenderedHistogramCell(resource.id, i);\n }\n }\n\n var capacityElement = renderCapacityElement(resource, sizes, capacityMatrix, config, timeline, maxCapacity, viewport);\n\n if (capacityElement) {\n node.appendChild(capacityElement);\n renderedHistogramCapacity[resource.id] = capacityElement;\n }\n }\n\n return {\n render: renderResourceHistogram,\n update: updateResourceHistogram,\n getRectangle: getRectangle,\n getVisibleRange: getVisibleRange\n };\n}\n\nmodule.exports = generateRenderResourceHistogram;","var getRectangle = require(\"./viewport/get_bg_row_rectangle\");\n\nvar getVisibleRange = require(\"./viewport/get_visible_bars_range\");\n\nvar getVisibleCellsRange = require(\"./viewport/get_visible_cells_range\");\n\nvar isColumnVisible = require(\"./viewport/is_column_visible\");\n\nvar resourceTimetable = require(\"../../resource_timetable_builder\");\n\nfunction generateRenderResourceLine(gantt) {\n var getResourceLoad = resourceTimetable(gantt);\n var renderedResourceLines = {};\n\n function renderResourceLineCell(resource, day, templates, config, timeline) {\n var css = templates.resource_cell_class(day.start_date, day.end_date, resource, day.tasks, day.assignments);\n var content = templates.resource_cell_value(day.start_date, day.end_date, resource, day.tasks, day.assignments);\n var height = timeline.getItemHeight(resource.id) - 1;\n\n if (css || content) {\n var sizes = timeline.getItemPosition(resource, day.start_date, day.end_date);\n var el = document.createElement('div');\n el.setAttribute(timeline.$config.item_attribute, resource.id);\n el.className = [\"gantt_resource_marker\", css].join(\" \");\n el.style.cssText = ['left:' + sizes.left + 'px', 'width:' + sizes.width + 'px', 'height:' + height + 'px', 'line-height:' + height + 'px', 'top:' + sizes.top + 'px'].join(\";\");\n if (content) el.innerHTML = content;\n return el;\n }\n\n return null;\n }\n\n function detachRenderedResourceLine(id, index) {\n if (renderedResourceLines[id] && renderedResourceLines[id][index] && renderedResourceLines[id][index].parentNode) {\n renderedResourceLines[id][index].parentNode.removeChild(renderedResourceLines[id][index]);\n }\n }\n\n function renderResourceLine(resource, timeline, config, viewport) {\n var templates = timeline.$getTemplates();\n var scale = timeline.getScale();\n var timetable = getResourceLoad(resource, config.resource_property, timeline.getScale(), timeline);\n var smartRendering = !!viewport; //no viewport means smart rendering is disabled\n\n var cells = [];\n renderedResourceLines[resource.id] = {};\n var range = getVisibleCellsRange(scale, viewport);\n\n for (var columnIndex = range.start; columnIndex <= range.end; columnIndex++) {\n var day = timetable[columnIndex];\n\n if (!day) {\n continue;\n }\n\n if (smartRendering && !isColumnVisible(columnIndex, scale, viewport, gantt)) {\n continue;\n }\n\n var cell = renderResourceLineCell(resource, day, templates, config, timeline);\n\n if (cell) {\n cells.push(cell);\n renderedResourceLines[resource.id][columnIndex] = cell;\n }\n }\n\n var row = null;\n\n if (cells.length) {\n row = document.createElement(\"div\");\n\n for (var i = 0; i < cells.length; i++) {\n row.appendChild(cells[i]);\n }\n }\n\n return row;\n }\n\n function updateResourceLine(resource, node, timeline, config, viewport) {\n var templates = timeline.$getTemplates();\n var scale = timeline.getScale();\n var timetable = getResourceLoad(resource, config.resource_property, timeline.getScale(), timeline);\n var range = getVisibleCellsRange(scale, viewport);\n var checkedColumns = {};\n\n if (renderedResourceLines && renderedResourceLines[resource.id]) {\n for (var i in renderedResourceLines[resource.id]) {\n checkedColumns[i] = i;\n }\n }\n\n for (var columnIndex = range.start; columnIndex <= range.end; columnIndex++) {\n var day = timetable[columnIndex];\n checkedColumns[columnIndex] = false;\n\n if (!day) {\n continue;\n }\n\n if (!isColumnVisible(columnIndex, scale, viewport, gantt)) {\n detachRenderedResourceLine(resource.id, columnIndex);\n continue;\n }\n\n if (!renderedResourceLines[resource.id] || !renderedResourceLines[resource.id][columnIndex]) {\n var cell = renderResourceLineCell(resource, day, templates, config, timeline);\n\n if (cell) {\n node.appendChild(cell);\n renderedResourceLines[resource.id][columnIndex] = cell;\n }\n } else if (renderedResourceLines[resource.id] && renderedResourceLines[resource.id][columnIndex] && !renderedResourceLines[resource.id][columnIndex].parentNode) {\n node.appendChild(renderedResourceLines[resource.id][columnIndex]);\n }\n }\n\n for (var i in checkedColumns) {\n if (checkedColumns[i] !== false) {\n detachRenderedResourceLine(resource.id, i);\n }\n }\n }\n\n return {\n render: renderResourceLine,\n update: updateResourceLine,\n getRectangle: getRectangle,\n getVisibleRange: getVisibleRange\n };\n}\n\nmodule.exports = generateRenderResourceLine;","module.exports = function (item, viewport, view, config, gantt) {\n // GS-2481 and GS-1715, don't remove selected task when using keyboard shortcuts and when the inline editor is opened\n if (gantt.$ui.getView(\"grid\") && (gantt.config.keyboard_navigation && gantt.getSelectedId() || gantt.ext.inlineEditors && gantt.ext.inlineEditors.getState().id)) {\n return true;\n }\n\n var top = view.getItemTop(item.id);\n var height = view.getItemHeight(item.id);\n\n if (top > viewport.y_end || top + height < viewport.y) {\n return false;\n }\n\n return true;\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar helpers = require(\"../../../utils/helpers\");\n\nvar getRowRectangle = require(\"./viewport/get_grid_row_rectangle\");\n\nvar getVisibleRange = require(\"./viewport/get_visible_bars_range\");\n\nvar isInViewPort = require(\"./viewport/is_grid_row_in_viewport\");\n\nfunction createGridLineRender(gantt) {\n function _render_grid_item(item, view, config, viewport) {\n var columns = view.getGridColumns();\n var templates = view.$getTemplates();\n var store = view.$config.rowStore;\n var cells = [];\n var has_child;\n\n for (var i = 0; i < columns.length; i++) {\n var last = i == columns.length - 1;\n var col = columns[i];\n var cell;\n var value;\n var textValue;\n\n if (col.name == \"add\") {\n var aria = gantt._waiAria.gridAddButtonAttrString(col);\n\n value = \"
\";\n textValue = \"\";\n } else {\n if (col.template) value = col.template(item);else value = item[col.name];\n\n if (helpers.isDate(value)) {\n value = templates.date_grid(value, item, col.name);\n }\n\n if (value === null || value === undefined) {\n value = \"\";\n }\n\n textValue = value;\n value = \"
\" + value + \"
\";\n }\n\n var css = \"gantt_cell\" + (last ? \" gantt_last_cell\" : \"\");\n var tree = [];\n\n if (col.tree) {\n css += \" gantt_cell_tree\";\n\n for (var j = 0; j < item.$level; j++) {\n tree.push(templates.grid_indent(item));\n }\n\n has_child = store.hasChild(item.id) && !(gantt.isSplitTask(item) && !gantt.config.open_split_tasks);\n\n if (has_child) {\n tree.push(templates.grid_open(item));\n tree.push(templates.grid_folder(item));\n } else {\n tree.push(templates.grid_blank(item));\n tree.push(templates.grid_file(item));\n }\n }\n\n var style = \"width:\" + (col.width - (last ? 1 : 0)) + \"px;\";\n\n if (this.defined(col.align)) {\n var flexAlign = {\n right: \"flex-end\",\n left: \"flex-start\",\n center: \"center\"\n };\n var justifyContent = flexAlign[col.align];\n style += \"text-align:\" + col.align + \";justify-content:\" + justifyContent + \";\";\n }\n\n var aria = gantt._waiAria.gridCellAttrString(col, textValue, item);\n\n tree.push(value);\n cell = \"
\" + tree.join(\"\") + \"
\";\n cells.push(cell);\n } // GS-291. The odd class should be assigned correctly\n\n\n css = \"\";\n var storeName = store.$config.name;\n\n switch (storeName) {\n case \"task\":\n css = gantt.getGlobalTaskIndex(item.id) % 2 === 0 ? \"\" : \" odd\";\n break;\n\n case \"resource\":\n css = store.visibleOrder.indexOf(item.id) % 2 === 0 ? \"\" : \" odd\";\n break;\n }\n\n css += item.$transparent ? \" gantt_transparent\" : \"\";\n css += item.$dataprocessor_class ? \" \" + item.$dataprocessor_class : \"\";\n\n if (templates.grid_row_class) {\n var css_template = templates.grid_row_class.call(gantt, item.start_date, item.end_date, item);\n if (css_template) css += \" \" + css_template;\n }\n\n if (store.isSelected(item.id)) {\n css += \" gantt_selected\";\n }\n\n var el = document.createElement(\"div\");\n el.className = \"gantt_row\" + css + \" gantt_row_\" + gantt.getTaskType(item.type);\n var height = view.getItemHeight(item.id);\n el.style.height = height + \"px\";\n el.style.lineHeight = height + \"px\";\n\n if (config.smart_rendering) {\n el.style.position = \"absolute\";\n el.style.left = \"0px\";\n el.style.top = view.getItemTop(item.id) + \"px\";\n }\n\n if (view.$config.item_attribute) {\n el.setAttribute(view.$config.item_attribute, item.id);\n el.setAttribute(view.$config.bind + \"_id\", item.id); // 'task_id'/'resource_id' for backward compatibility\n }\n\n gantt._waiAria.taskRowAttr(item, el);\n\n el.innerHTML = cells.join(\"\");\n return el;\n }\n\n function onrender(item, rowNode, view) {\n var columns = view.getGridColumns();\n\n for (var i = 0; i < columns.length; i++) {\n var column = columns[i];\n\n if (column.onrender) {\n // find cell node for current column\n var cellNode = rowNode.querySelector(\"[data-column-name=\" + column.name + \"]\");\n\n if (cellNode) {\n var content = column.onrender(item, cellNode);\n\n if (content && typeof content === \"string\") {\n cellNode.innerHTML = content;\n } else if (content && _typeof(content) === \"object\") {\n // render object to node using additional functionality\n if (gantt.config.external_render) {\n var adapter = gantt.config.external_render;\n\n if (adapter.isElement(content)) {\n adapter.renderElement(content, cellNode);\n }\n }\n }\n }\n }\n }\n }\n\n return {\n render: _render_grid_item,\n update: null,\n getRectangle: getRowRectangle,\n isInViewPort: isInViewPort,\n getVisibleRange: getVisibleRange,\n onrender: onrender\n };\n}\n\nmodule.exports = createGridLineRender;","var isInViewPort = require(\"./viewport/is_link_in_viewport\");\n\nvar getVisibleRange = require(\"./viewport/factory/get_visible_link_range\");\n\nfunction createLinkRender(gantt) {\n function _render_link_element(link, view, config) {\n var source = gantt.getTask(link.source);\n\n if (source.hide_bar) {\n return;\n }\n\n var target = gantt.getTask(link.target);\n\n if (target.hide_bar) {\n return;\n }\n\n var pt = path_builder.get_endpoint(link, view, source, target);\n var dy = pt.e_y - pt.y;\n var dx = pt.e_x - pt.x;\n\n if (!dx && !dy) {\n return null;\n }\n\n var dots = path_builder.get_points(link, view, source, target);\n var lines = drawer.get_lines(dots, view);\n var div = document.createElement(\"div\");\n var css = \"gantt_task_link\";\n\n if (link.color) {\n css += \" gantt_link_inline_color\";\n }\n\n var cssTemplate = gantt.templates.link_class ? gantt.templates.link_class(link) : \"\";\n\n if (cssTemplate) {\n css += \" \" + cssTemplate;\n }\n\n if (config.highlight_critical_path && gantt.isCriticalLink) {\n if (gantt.isCriticalLink(link)) css += \" gantt_critical_link\";\n }\n\n div.className = css;\n\n if (view.$config.link_attribute) {\n div.setAttribute(view.$config.link_attribute, link.id);\n div.setAttribute(\"link_id\", link.id);\n }\n\n for (var i = 0; i < lines.length; i++) {\n if (i == lines.length - 1) {\n lines[i].size -= config.link_arrow_size;\n }\n\n var el = drawer.render_line(lines[i], lines[i + 1], view, link.source);\n\n if (link.color) {\n el.firstChild.style.backgroundColor = link.color;\n }\n\n div.appendChild(el);\n }\n\n var direction = lines[lines.length - 1].direction;\n\n var endpoint = _render_link_arrow(dots[dots.length - 1], direction, view, link.source);\n\n if (link.color) {\n endpoint.style.borderColor = link.color;\n }\n\n div.appendChild(endpoint);\n\n gantt._waiAria.linkAttr(link, div);\n\n return div;\n }\n\n function _render_link_arrow(point, direction, view, targetId) {\n var config = view.$getConfig();\n var div = document.createElement(\"div\");\n var top = point.y;\n var left = point.x;\n var size = config.link_arrow_size;\n var className = \"gantt_link_arrow gantt_link_arrow_\" + direction;\n\n switch (direction) {\n case drawer.dirs.right:\n top -= size / 2;\n left -= size;\n break;\n\n case drawer.dirs.left:\n top -= size / 2;\n break;\n\n case drawer.dirs.up:\n left -= size;\n break;\n\n case drawer.dirs.down:\n top += size * 2;\n left -= size;\n break;\n\n default:\n break;\n }\n\n div.style.cssText = [\"top:\" + top + \"px\", \"left:\" + left + 'px'].join(';');\n div.className = className;\n return div;\n }\n\n var drawer = {\n current_pos: null,\n dirs: {\n \"left\": 'left',\n \"right\": 'right',\n \"up\": 'up',\n \"down\": 'down'\n },\n path: [],\n clear: function clear() {\n this.current_pos = null;\n this.path = [];\n },\n point: function point(pos) {\n this.current_pos = gantt.copy(pos);\n },\n get_lines: function get_lines(dots) {\n this.clear();\n this.point(dots[0]);\n\n for (var i = 1; i < dots.length; i++) {\n this.line_to(dots[i]);\n }\n\n return this.get_path();\n },\n line_to: function line_to(pos) {\n var next = gantt.copy(pos);\n var prev = this.current_pos;\n\n var line = this._get_line(prev, next);\n\n this.path.push(line);\n this.current_pos = next;\n },\n get_path: function get_path() {\n return this.path;\n },\n get_wrapper_sizes: function get_wrapper_sizes(v, view, itemId) {\n var config = view.$getConfig();\n var res,\n wrapper_size = config.link_wrapper_width,\n y = v.y - wrapper_size / 2;\n\n switch (v.direction) {\n case this.dirs.left:\n res = {\n top: y,\n height: wrapper_size,\n lineHeight: wrapper_size,\n left: v.x - v.size - wrapper_size / 2,\n width: v.size + wrapper_size\n };\n break;\n\n case this.dirs.right:\n res = {\n top: y,\n lineHeight: wrapper_size,\n height: wrapper_size,\n left: v.x - wrapper_size / 2,\n width: v.size + wrapper_size\n };\n break;\n\n case this.dirs.up:\n res = {\n top: y - v.size,\n lineHeight: v.size + wrapper_size,\n height: v.size + wrapper_size,\n left: v.x - wrapper_size / 2,\n width: wrapper_size\n };\n break;\n\n case this.dirs.down:\n res = {\n top: y\n /*- wrapper_size/2*/\n ,\n lineHeight: v.size + wrapper_size,\n height: v.size + wrapper_size,\n left: v.x - wrapper_size / 2,\n width: wrapper_size\n };\n break;\n\n default:\n break;\n }\n\n return res;\n },\n get_line_sizes: function get_line_sizes(v, view) {\n var config = view.$getConfig();\n var res,\n line_size = config.link_line_width,\n wrapper_size = config.link_wrapper_width,\n size = v.size + line_size;\n\n switch (v.direction) {\n case this.dirs.left:\n case this.dirs.right:\n res = {\n height: line_size,\n width: size,\n marginTop: (wrapper_size - line_size) / 2,\n marginLeft: (wrapper_size - line_size) / 2\n };\n break;\n\n case this.dirs.up:\n case this.dirs.down:\n res = {\n height: size,\n width: line_size,\n marginTop: (wrapper_size - line_size) / 2,\n marginLeft: (wrapper_size - line_size) / 2\n };\n break;\n\n default:\n break;\n }\n\n return res;\n },\n render_line: function render_line(v, end, view, itemId) {\n var pos = this.get_wrapper_sizes(v, view, itemId);\n var wrapper = document.createElement(\"div\");\n wrapper.style.cssText = [\"top:\" + pos.top + \"px\", \"left:\" + pos.left + \"px\", \"height:\" + pos.height + \"px\", \"width:\" + pos.width + \"px\"].join(';');\n wrapper.className = \"gantt_line_wrapper\";\n var innerPos = this.get_line_sizes(v, view);\n var inner = document.createElement(\"div\");\n inner.style.cssText = [\"height:\" + innerPos.height + \"px\", \"width:\" + innerPos.width + \"px\", \"margin-top:\" + innerPos.marginTop + \"px\", \"margin-left:\" + innerPos.marginLeft + \"px\"].join(\";\");\n inner.className = \"gantt_link_line_\" + v.direction;\n wrapper.appendChild(inner);\n return wrapper;\n },\n _get_line: function _get_line(from, to) {\n var direction = this.get_direction(from, to);\n var vect = {\n x: from.x,\n y: from.y,\n direction: this.get_direction(from, to)\n };\n\n if (direction == this.dirs.left || direction == this.dirs.right) {\n vect.size = Math.abs(from.x - to.x);\n } else {\n vect.size = Math.abs(from.y - to.y);\n }\n\n return vect;\n },\n get_direction: function get_direction(from, to) {\n var direction = 0;\n\n if (to.x < from.x) {\n direction = this.dirs.left;\n } else if (to.x > from.x) {\n direction = this.dirs.right;\n } else if (to.y > from.y) {\n direction = this.dirs.down;\n } else {\n direction = this.dirs.up;\n }\n\n return direction;\n }\n };\n var path_builder = {\n path: [],\n clear: function clear() {\n this.path = [];\n },\n current: function current() {\n return this.path[this.path.length - 1];\n },\n point: function point(next) {\n if (!next) return this.current();\n this.path.push(gantt.copy(next));\n return next;\n },\n point_to: function point_to(direction, diff, point) {\n if (!point) point = gantt.copy(this.point());else point = {\n x: point.x,\n y: point.y\n };\n var dir = drawer.dirs;\n\n switch (direction) {\n case dir.left:\n point.x -= diff;\n break;\n\n case dir.right:\n point.x += diff;\n break;\n\n case dir.up:\n point.y -= diff;\n break;\n\n case dir.down:\n point.y += diff;\n break;\n\n default:\n break;\n }\n\n return this.point(point);\n },\n get_points: function get_points(link, view, source, target) {\n var pt = this.get_endpoint(link, view, source, target);\n var xy = gantt.config;\n var dy = pt.e_y - pt.y;\n var dx = pt.e_x - pt.x;\n var dir = drawer.dirs;\n var rowHeight = view.getItemHeight(link.source);\n this.clear();\n this.point({\n x: pt.x,\n y: pt.y\n });\n var shiftX = 2 * xy.link_arrow_size; //just random size for first line\n\n var lineType = this.get_line_type(link, view.$getConfig());\n var forward = pt.e_x > pt.x;\n\n if (lineType.from_start && lineType.to_start) {\n this.point_to(dir.left, shiftX);\n\n if (forward) {\n this.point_to(dir.down, dy);\n this.point_to(dir.right, dx);\n } else {\n this.point_to(dir.right, dx);\n this.point_to(dir.down, dy);\n }\n\n this.point_to(dir.right, shiftX);\n } else if (!lineType.from_start && lineType.to_start) {\n forward = pt.e_x > pt.x + 2 * shiftX;\n this.point_to(dir.right, shiftX);\n\n if (forward) {\n dx -= shiftX;\n this.point_to(dir.down, dy);\n this.point_to(dir.right, dx);\n } else {\n dx -= 2 * shiftX;\n var sign = dy > 0 ? 1 : -1;\n this.point_to(dir.down, sign * (rowHeight / 2));\n this.point_to(dir.right, dx);\n this.point_to(dir.down, sign * (Math.abs(dy) - rowHeight / 2));\n this.point_to(dir.right, shiftX);\n }\n } else if (!lineType.from_start && !lineType.to_start) {\n this.point_to(dir.right, shiftX);\n\n if (forward) {\n this.point_to(dir.right, dx);\n this.point_to(dir.down, dy);\n } else {\n this.point_to(dir.down, dy);\n this.point_to(dir.right, dx);\n }\n\n this.point_to(dir.left, shiftX);\n } else if (lineType.from_start && !lineType.to_start) {\n forward = pt.e_x > pt.x - 2 * shiftX;\n this.point_to(dir.left, shiftX);\n\n if (!forward) {\n dx += shiftX;\n this.point_to(dir.down, dy);\n this.point_to(dir.right, dx);\n } else {\n dx += 2 * shiftX;\n var sign = dy > 0 ? 1 : -1;\n this.point_to(dir.down, sign * (rowHeight / 2));\n this.point_to(dir.right, dx);\n this.point_to(dir.down, sign * (Math.abs(dy) - rowHeight / 2));\n this.point_to(dir.left, shiftX);\n }\n }\n\n return this.path;\n },\n get_line_type: function get_line_type(link, config) {\n var types = config.links;\n var from_start = false,\n to_start = false;\n\n if (link.type == types.start_to_start) {\n from_start = to_start = true;\n } else if (link.type == types.finish_to_finish) {\n from_start = to_start = false;\n } else if (link.type == types.finish_to_start) {\n from_start = false;\n to_start = true;\n } else if (link.type == types.start_to_finish) {\n from_start = true;\n to_start = false;\n } else {\n gantt.assert(false, \"Invalid link type\");\n }\n\n if (config.rtl) {\n from_start = !from_start;\n to_start = !to_start;\n }\n\n return {\n from_start: from_start,\n to_start: to_start\n };\n },\n get_endpoint: function get_endpoint(link, view, source, target) {\n var config = view.$getConfig();\n var lineType = this.get_line_type(link, config);\n var from_start = lineType.from_start,\n to_start = lineType.to_start;\n var from = getMilestonePosition(source, view, config),\n to = getMilestonePosition(target, view, config);\n return {\n x: from_start ? from.left : from.left + from.width,\n e_x: to_start ? to.left : to.left + to.width,\n y: from.top + from.rowHeight / 2 - 1,\n e_y: to.top + to.rowHeight / 2 - 1\n };\n }\n };\n\n function getMilestonePosition(task, view, config) {\n var pos = view.getItemPosition(task);\n\n if (gantt.getTaskType(task.type) == config.types.milestone) {\n var milestoneHeight = view.getBarHeight(task.id, true);\n var milestoneWidth = Math.sqrt(2 * milestoneHeight * milestoneHeight);\n pos.left -= milestoneWidth / 2;\n pos.width = milestoneWidth;\n }\n\n return pos;\n }\n\n return {\n render: _render_link_element,\n update: null,\n //getRectangle: getLinkRectangle\n isInViewPort: isInViewPort,\n getVisibleRange: getVisibleRange()\n };\n}\n\nmodule.exports = createLinkRender;","module.exports = function (items, gantt) {\n var placeholderConfig = gantt.config.timeline_placeholder;\n items = items || [];\n\n if (placeholderConfig && items.filter(function (e) {\n return e.id === 'timeline_placeholder_task';\n }).length === 0) {\n var state = gantt.getState();\n var lastTaskId = null;\n var start_date = state.min_date;\n var end_date = state.max_date;\n\n if (items.length) {\n lastTaskId = items[items.length - 1].id;\n }\n\n var placeholderTask = {\n start_date: start_date,\n end_date: end_date,\n row_height: placeholderConfig.height || 0,\n id: \"timeline_placeholder_task\",\n unscheduled: true,\n lastTaskId: lastTaskId,\n calendar_id: placeholderConfig.calendar || \"global\",\n $source: [],\n $target: []\n };\n items.push(placeholderTask);\n }\n};","var getRowRectangle = require(\"./viewport/get_bg_row_rectangle\");\n\nvar isLegacyRender = require(\"./is_legacy_smart_render\");\n\nvar getVisibleRange = require(\"./viewport/get_visible_bars_range\");\n\nvar getVisibleCellsRange = require(\"./viewport/get_visible_cells_range\");\n\nvar isColumnVisible = require(\"./viewport/is_column_visible\");\n\nvar bgPlaceholder = require(\"./prerender/task_bg_placeholder\");\n\nfunction createTaskBgRender(gantt) {\n var renderedCells = {};\n var visibleCells = {};\n\n function isRendered(item, columnIndex) {\n if (renderedCells[item.id][columnIndex] && renderedCells[item.id][columnIndex].parentNode) {\n return true;\n } else {\n return false;\n }\n }\n\n function detachRenderedCell(itemId, columnIndex) {\n if (renderedCells[itemId] && renderedCells[itemId][columnIndex] && renderedCells[itemId][columnIndex].parentNode) {\n renderedCells[itemId][columnIndex].parentNode.removeChild(renderedCells[itemId][columnIndex]);\n }\n }\n\n function getCellClassTemplate(view) {\n var templates = view.$getTemplates();\n var cssTemplate;\n\n if (typeof templates.task_cell_class !== \"undefined\") {\n cssTemplate = templates.task_cell_class; // eslint-disable-next-line no-console\n\n var log = console.warn || console.log;\n log('gantt.templates.task_cell_class template is deprecated and will be removed soon. Please use gantt.templates.timeline_cell_class instead.');\n } else {\n cssTemplate = templates.timeline_cell_class;\n }\n\n return cssTemplate;\n }\n\n function getCellContentTemplate(view) {\n var templates = view.$getTemplates();\n var contentTemplate = templates.timeline_cell_content;\n return contentTemplate;\n }\n\n function renderCells(item, node, view, config, viewPort) {\n var cfg = view.getScale();\n var count = cfg.count;\n var cssTemplate = getCellClassTemplate(view);\n var contentTemplate = getCellContentTemplate(view);\n\n if (config.show_task_cells) {\n if (!renderedCells[item.id]) {\n renderedCells[item.id] = {};\n }\n\n if (!visibleCells[item.id]) {\n visibleCells[item.id] = {};\n }\n\n var range = getVisibleCellsRange(cfg, viewPort);\n\n for (var i in visibleCells[item.id]) {\n var index = visibleCells[item.id][i];\n\n if (Number(index) < range.start || Number(index) > range.end) {\n detachRenderedCell(item.id, index);\n }\n }\n\n visibleCells[item.id] = {}; // TODO: do not iterate all cell, only ones in the viewport and once that are already rendered\n\n for (var columnIndex = range.start; columnIndex <= range.end; columnIndex++) {\n var cell = renderOneCell(cfg, columnIndex, item, viewPort, count, cssTemplate, contentTemplate, config);\n\n if (!cell && isRendered(item, columnIndex)) {\n detachRenderedCell(item.id, columnIndex);\n } else if (cell && !cell.parentNode) {\n node.appendChild(cell);\n }\n }\n }\n }\n\n function renderOneCell(scale, columnIndex, item, viewPort, count, cssTemplate, contentTemplate, config) {\n var width = scale.width[columnIndex],\n cssclass = \"\";\n\n if (isColumnVisible(columnIndex, scale, viewPort, gantt)) {\n //do not render skipped columns\n var cssTemplateContent = cssTemplate(item, scale.trace_x[columnIndex]);\n var htmlTemplateContent = \"\";\n\n if (contentTemplate) {\n // for backward compatibility, contentTemplate was added in 7.2.0+, will be undefined if someone used copy of old config/template object\n htmlTemplateContent = contentTemplate(item, scale.trace_x[columnIndex]);\n }\n\n if (config.static_background) {\n // if cell render in static background is not allowed, or if it's a blank cell\n var customCell = !!(cssTemplateContent || htmlTemplateContent);\n\n if (!(config.static_background_cells && customCell)) {\n return null;\n }\n }\n\n if (renderedCells[item.id][columnIndex]) {\n visibleCells[item.id][columnIndex] = columnIndex;\n return renderedCells[item.id][columnIndex];\n }\n\n var cell = document.createElement(\"div\");\n cell.style.width = width + \"px\";\n cssclass = \"gantt_task_cell\" + (columnIndex == count - 1 ? \" gantt_last_cell\" : \"\");\n\n if (cssTemplateContent) {\n cssclass += \" \" + cssTemplateContent;\n }\n\n cell.className = cssclass;\n\n if (htmlTemplateContent) {\n cell.innerHTML = htmlTemplateContent;\n }\n\n cell.style.position = \"absolute\";\n cell.style.left = scale.left[columnIndex] + \"px\";\n renderedCells[item.id][columnIndex] = cell;\n visibleCells[item.id][columnIndex] = columnIndex;\n return cell;\n }\n\n return null;\n }\n\n function _render_bg_line(item, view, config, viewPort) {\n var templates = view.$getTemplates();\n var cfg = view.getScale();\n var count = cfg.count;\n\n if (config.static_background && !config.static_background_cells) {\n return null;\n }\n\n var row = document.createElement(\"div\");\n var cellCssTemplate = getCellClassTemplate(view);\n var cellHtmlTemplate = getCellContentTemplate(view);\n var range;\n\n if (!viewPort || !config.smart_rendering || isLegacyRender(gantt)) {\n range = {\n start: 0,\n end: count - 1\n };\n } else {\n range = getVisibleCellsRange(cfg, viewPort.x);\n }\n\n if (config.show_task_cells) {\n renderedCells[item.id] = {};\n visibleCells[item.id] = {};\n\n for (var columnIndex = range.start; columnIndex <= range.end; columnIndex++) {\n var cell = renderOneCell(cfg, columnIndex, item, viewPort, count, cellCssTemplate, cellHtmlTemplate, config);\n\n if (cell) {\n row.appendChild(cell);\n }\n }\n } // GS-291. The odd class should be assigned correctly\n\n\n var store = view.$config.rowStore;\n var odd = store.getIndexById(item.id) % 2 !== 0;\n var cssTemplate = templates.task_row_class(item.start_date, item.end_date, item);\n var css = \"gantt_task_row\" + (odd ? \" odd\" : \"\") + (cssTemplate ? ' ' + cssTemplate : '');\n\n if (store.isSelected(item.id)) {\n css += \" gantt_selected\";\n }\n\n row.className = css;\n\n if (config.smart_rendering) {\n row.style.position = \"absolute\";\n row.style.top = view.getItemTop(item.id) + \"px\";\n row.style.width = \"100%\";\n } else {\n row.style.position = \"relative\";\n }\n\n row.style.height = view.getItemHeight(item.id) + \"px\";\n\n if (item.id == \"timeline_placeholder_task\") {\n var placeholderTop = 0;\n\n if (item.lastTaskId) {\n var lastTaskTop = view.getItemTop(item.lastTaskId);\n var lastTaskHeight = view.getItemHeight(item.lastTaskId);\n placeholderTop = lastTaskTop + lastTaskHeight;\n }\n\n var maxHeight = item.row_height || view.$task_data.offsetHeight;\n var placeholderHeight = maxHeight - placeholderTop; // So that it won't exceed the placeholder timeline height\n\n if (placeholderHeight < 0) {\n placeholderHeight = 0;\n }\n\n if (config.smart_rendering) {\n row.style.top = placeholderTop + \"px\";\n }\n\n row.style.height = placeholderHeight + \"px\";\n }\n\n if (view.$config.item_attribute) {\n row.setAttribute(view.$config.item_attribute, item.id);\n row.setAttribute(view.$config.bind + \"_id\", item.id); // 'task_id'/'resource_id' for backward compatibility\n }\n\n return row;\n }\n\n return {\n render: _render_bg_line,\n update: renderCells,\n getRectangle: getRowRectangle,\n getVisibleRange: getVisibleRange,\n prepareData: bgPlaceholder\n };\n}\n\nmodule.exports = createTaskBgRender;","var createBaseBarRender = require(\"./task_bar_render\");\n\nvar isInViewPort = require(\"./viewport/is_bar_in_viewport\");\n\nvar getVisibleRange = require(\"./viewport/get_visible_bars_range\");\n\nfunction createTaskRenderer(gantt) {\n var defaultRender = createBaseBarRender(gantt);\n var renderedNodes = {};\n\n function checkVisibility(child, viewPort, timeline, config, gantt) {\n var isVisible = true; // GS-2123. Don't render rollup tasks that are outside the viewport\n\n if (config.smart_rendering) {\n isVisible = isInViewPort(child, viewPort, timeline, config, gantt);\n }\n\n return isVisible;\n }\n\n function generateChildElement(task, child, timeline, sizes) {\n var childCopy = gantt.copy(gantt.getTask(child.id));\n childCopy.$rendered_at = task.id; // a way to filter rollup tasks:\n\n var displayRollup = gantt.callEvent(\"onBeforeRollupTaskDisplay\", [childCopy.id, childCopy, task.id]);\n\n if (displayRollup === false) {\n return;\n }\n\n var element = defaultRender(childCopy, timeline);\n\n if (!element) {\n return;\n }\n\n var height = timeline.getBarHeight(task.id, child.type == gantt.config.types.milestone);\n var padding = Math.floor((timeline.getItemHeight(task.id) - height) / 2);\n element.style.top = sizes.top + padding + \"px\";\n element.classList.add(\"gantt_rollup_child\");\n element.setAttribute(\"data-rollup-parent-id\", task.id);\n return element;\n }\n\n function getKey(childId, renderParentId) {\n return childId + \"_\" + renderParentId;\n }\n\n function renderRollupTask(task, timeline, config, viewPort) {\n if (task.rollup !== false && task.$rollup && task.$rollup.length) {\n var el = document.createElement('div'),\n sizes = gantt.getTaskPosition(task); // vertical position is not important for the rollup tasks as long as the parent is rendered\n\n if (viewPort) {\n viewPort.y = 0;\n viewPort.y_end = gantt.$task_bg.scrollHeight;\n }\n\n task.$rollup.forEach(function (itemId) {\n if (!gantt.isTaskExists(itemId)) {\n return;\n }\n\n var child = gantt.getTask(itemId);\n var isVisible = checkVisibility(child, viewPort, timeline, config, gantt);\n\n if (!isVisible) {\n return;\n }\n\n var element = generateChildElement(task, child, timeline, sizes);\n\n if (element) {\n renderedNodes[getKey(child.id, task.id)] = element;\n el.appendChild(element);\n } else {\n renderedNodes[getKey(child.id, task.id)] = false;\n }\n });\n return el;\n }\n\n return false;\n }\n\n function repaintRollupTask(task, itemNode, timeline, config, viewPort) {\n var el = document.createElement(\"div\"),\n sizes = gantt.getTaskPosition(task); // vertical position is not important for the rollup tasks as long as the parent is rendered\n\n viewPort.y = 0;\n viewPort.y_end = gantt.$task_bg.scrollHeight;\n task.$rollup.forEach(function (itemId) {\n var child = gantt.getTask(itemId);\n var rollupKey = getKey(child.id, task.id);\n var isVisible = checkVisibility(child, viewPort, timeline, config, gantt);\n\n if (isVisible !== !!renderedNodes[rollupKey]) {\n if (isVisible) {\n var element = generateChildElement(task, child, timeline, sizes);\n renderedNodes[rollupKey] = element || false;\n } else {\n renderedNodes[rollupKey] = false;\n }\n }\n\n if (!!renderedNodes[rollupKey]) {\n el.appendChild(renderedNodes[rollupKey]);\n }\n\n itemNode.innerHTML = \"\";\n itemNode.appendChild(el);\n });\n }\n\n return {\n render: renderRollupTask,\n update: repaintRollupTask,\n //getRectangle: getBarRectangle\n isInViewPort: isInViewPort,\n getVisibleRange: getVisibleRange\n };\n}\n\nmodule.exports = createTaskRenderer;","var isBarInViewport = require(\"./is_bar_in_viewport\");\n\nmodule.exports = function isSplitTaskInViewport(item, viewport, view, config, gantt) {\n if (!gantt.isSplitTask(item)) {\n return false;\n }\n\n var range = gantt.getSubtaskDates(item.id);\n return isBarInViewport({\n id: item.id,\n start_date: range.start_date,\n end_date: range.end_date,\n parent: item.parent\n }, viewport, view, gantt);\n};","var createBaseBarRender = require(\"./task_bar_render\"); //const isInViewPort = require(\"./viewport/is_split_task_in_viewport\");\n\n\nvar getVisibleRange = require(\"./viewport/get_visible_bars_range\");\n\nvar isInViewPortParent = require(\"./viewport/is_split_task_in_viewport\");\n\nvar isInViewPortChild = require(\"./viewport/is_bar_in_viewport\");\n\nfunction createTaskRenderer(gantt) {\n var defaultRender = createBaseBarRender(gantt);\n var renderedNodes = {};\n\n function checkVisibility(child, viewPort, timeline, config, gantt) {\n var isVisible = !child.hide_bar; // GS-1195. Don't render split tasks that are outside the viewport\n\n if (config.smart_rendering && isVisible) {\n isVisible = isInViewPortChild(child, viewPort, timeline, config, gantt);\n }\n\n return isVisible;\n }\n\n function generateChildElement(task, child, timeline, sizes) {\n if (child.hide_bar) {\n return;\n }\n\n var isProject = gantt.isSummaryTask(child);\n\n if (isProject) {\n gantt.resetProjectDates(child);\n }\n\n var childCopy = gantt.copy(gantt.getTask(child.id));\n childCopy.$rendered_at = task.id; // a way to filter split tasks:\n\n var showSplitTask = gantt.callEvent(\"onBeforeSplitTaskDisplay\", [childCopy.id, childCopy, task.id]);\n\n if (showSplitTask === false) {\n return;\n }\n\n var element = defaultRender(childCopy, timeline);\n if (!element) return;\n var height = timeline.getBarHeight(task.id, child.type == gantt.config.types.milestone);\n var padding = Math.floor((timeline.getItemHeight(task.id) - height) / 2);\n element.style.top = sizes.top + padding + \"px\";\n element.classList.add(\"gantt_split_child\");\n\n if (isProject) {\n element.classList.add(\"gantt_split_subproject\");\n }\n\n return element;\n }\n\n function getKey(childId, renderParentId) {\n return childId + \"_\" + renderParentId;\n }\n\n function shouldUseSplitRendering(task, config) {\n return gantt.isSplitTask(task) && (config.open_split_tasks && !task.$open || !config.open_split_tasks) && gantt.hasChild(task.id);\n }\n\n function renderSplitTask(task, timeline, config, viewPort) {\n if (shouldUseSplitRendering(task, config)) {\n var el = document.createElement('div'),\n sizes = gantt.getTaskPosition(task);\n\n if (gantt.hasChild(task.id)) {\n gantt.eachTask(function (child) {\n var isVisible = checkVisibility(child, viewPort, timeline, config, gantt);\n\n if (!isVisible) {\n return;\n }\n\n var element = generateChildElement(task, child, timeline, sizes);\n\n if (element) {\n renderedNodes[getKey(child.id, task.id)] = element;\n el.appendChild(element);\n } else {\n renderedNodes[getKey(child.id, task.id)] = false;\n }\n }, task.id);\n }\n\n return el;\n }\n\n return false;\n }\n\n function repaintSplitTask(task, itemNode, timeline, config, viewPort) {\n if (shouldUseSplitRendering(task, config)) {\n var el = document.createElement(\"div\"),\n sizes = gantt.getTaskPosition(task);\n gantt.eachTask(function (child) {\n var splitKey = getKey(child.id, task.id);\n var isVisible = checkVisibility(child, viewPort, timeline, config, gantt);\n\n if (isVisible !== !!renderedNodes[splitKey]) {\n if (isVisible) {\n var element = generateChildElement(task, child, timeline, sizes);\n renderedNodes[splitKey] = element || false;\n } else {\n renderedNodes[splitKey] = false;\n }\n }\n\n if (!!renderedNodes[splitKey]) {\n el.appendChild(renderedNodes[splitKey]);\n }\n\n itemNode.innerHTML = \"\";\n itemNode.appendChild(el);\n }, task.id);\n }\n }\n\n return {\n render: renderSplitTask,\n update: repaintSplitTask,\n isInViewPort: isInViewPortParent,\n getVisibleRange: getVisibleRange\n };\n}\n\nmodule.exports = createTaskRenderer;","var isInViewPort = require(\"./viewport/is_bar_in_viewport\");\n\nvar getVisibleRange = require(\"./viewport/get_visible_bars_range\");\n\nvar createBaseBarRender = require(\"./task_bar_render\");\n\nmodule.exports = function createTaskRenderer(gantt) {\n var defaultRender = createBaseBarRender(gantt);\n return {\n render: defaultRender,\n update: null,\n //getRectangle: getBarRectangle\n isInViewPort: isInViewPort,\n getVisibleRange: getVisibleRange\n };\n};","module.exports = function (gantt) {\n return function processTaskDateProperties(item, mapTo, mode) {\n if (mode == \"keepDates\") {\n keepDatesOnEdit(item, mapTo);\n } else if (mode == \"keepDuration\") {\n keepDurationOnEdit(item, mapTo);\n } else {\n defaultActionOnEdit(item, mapTo);\n }\n }; // resize task\n // resize task when start/end/duration changes\n\n function keepDatesOnEdit(item, mapTo) {\n if (mapTo == \"duration\") {\n item.end_date = gantt.calculateEndDate(item);\n } else if (mapTo == \"end_date\" || mapTo == \"start_date\") {\n item.duration = gantt.calculateDuration(item);\n }\n } // move task(before 6.2)\n // move task when start/end dates changes\n // resize task when duration changes\n\n\n function keepDurationOnEdit(item, mapTo) {\n if (mapTo == \"end_date\") {\n item.start_date = decreaseStartDate(item);\n } else if (mapTo == \"start_date\" || mapTo == \"duration\") {\n item.end_date = gantt.calculateEndDate(item);\n }\n } // default behavior\n // move task when start date changes\n // resize task when end date/duration changes\n\n\n function defaultActionOnEdit(item, mapTo) {\n if (gantt.config.schedule_from_end) {\n if (mapTo == \"end_date\" || mapTo == \"duration\") {\n item.start_date = decreaseStartDate(item);\n } else if (mapTo == \"start_date\") {\n item.duration = gantt.calculateDuration(item);\n }\n } else {\n if (mapTo == \"start_date\" || mapTo == \"duration\") {\n item.end_date = gantt.calculateEndDate(item);\n } else if (mapTo == \"end_date\") {\n item.duration = gantt.calculateDuration(item);\n }\n }\n }\n\n function decreaseStartDate(item) {\n return gantt.calculateEndDate({\n start_date: item.end_date,\n duration: -item.duration,\n task: item\n });\n }\n};","module.exports = function (gantt) {\n var BaseEditor = require(\"./base\")(gantt),\n utils = require(\"../../../../../utils/utils\");\n\n var __extends = require(\"../../../../../utils/extends\");\n\n function TextEditor() {\n var self = BaseEditor.apply(this, arguments) || this;\n return self;\n }\n\n __extends(TextEditor, BaseEditor);\n\n function getFormatter(config) {\n return config.formatter || gantt.ext.formatters.durationFormatter();\n }\n\n utils.mixin(TextEditor.prototype, {\n show: function show(id, column, config, placeholder) {\n var html = \"
\");\n placeholder.innerHTML = html;\n },\n set_value: function set_value(value, id, column, node) {\n this.get_input(node).value = getFormatter(column.editor).format(value);\n },\n get_value: function get_value(id, column, node) {\n return getFormatter(column.editor).parse(this.get_input(node).value || \"\");\n }\n }, true);\n return TextEditor;\n};","module.exports = function (gantt) {\n var BaseEditor = require(\"./base\")(gantt),\n utils = require(\"../../../../../utils/utils\");\n\n var __extends = require(\"../../../../../utils/extends\");\n\n function PredecessorEditor() {\n var self = BaseEditor.apply(this, arguments) || this;\n return self;\n }\n\n __extends(PredecessorEditor, BaseEditor);\n\n function getFormatter(config) {\n return config.formatter || gantt.ext.formatters.linkFormatter();\n }\n\n function parseInputString(value, config) {\n var predecessors = (value || \"\").split(config.delimiter || \",\");\n\n for (var i = 0; i < predecessors.length; i++) {\n var val = predecessors[i].trim();\n\n if (val) {\n predecessors[i] = val;\n } else {\n predecessors.splice(i, 1);\n i--;\n }\n }\n\n predecessors.sort();\n return predecessors;\n }\n\n function formatPredecessors(task, config, gantt) {\n var links = task.$target;\n var labels = [];\n\n for (var i = 0; i < links.length; i++) {\n var link = gantt.getLink(links[i]);\n labels.push(getFormatter(config).format(link));\n }\n\n return labels.join((config.delimiter || \",\") + \" \");\n }\n\n function getSelectedLinks(taskId, predecessorCodes, config) {\n var links = [];\n predecessorCodes.forEach(function (code) {\n var link = getFormatter(config).parse(code);\n\n if (link) {\n link.target = taskId; // GS-1290 A way to preserve the link. Otherwise validation will return false\n // because the existing link ID is not passed there\n\n link.id = \"predecessor_generated\";\n\n if (gantt.isLinkAllowed(link)) {\n link.id = undefined;\n links.push(link);\n }\n }\n });\n return links;\n }\n\n function formatLinkKey(link) {\n return link.source + \"_\" + link.target + \"_\" + link.type + \"_\" + (link.lag || 0);\n }\n\n function getLinksDiff(task, predecessorCodes, config) {\n var selectedLinks = getSelectedLinks(task.id, predecessorCodes, config);\n var existingLinksSearch = {};\n task.$target.forEach(function (linkId) {\n var link = gantt.getLink(linkId);\n existingLinksSearch[formatLinkKey(link)] = link.id;\n });\n var linksToAdd = [];\n selectedLinks.forEach(function (link) {\n var linkKey = formatLinkKey(link);\n\n if (!existingLinksSearch[linkKey]) {\n linksToAdd.push(link);\n } else {\n delete existingLinksSearch[linkKey];\n }\n });\n var linksToDelete = [];\n\n for (var i in existingLinksSearch) {\n linksToDelete.push(existingLinksSearch[i]);\n }\n\n return {\n add: linksToAdd,\n remove: linksToDelete\n };\n }\n\n utils.mixin(PredecessorEditor.prototype, {\n show: function show(id, column, config, placeholder) {\n var html = \"
\");\n placeholder.innerHTML = html;\n },\n hide: function hide() {},\n set_value: function set_value(value, id, column, node) {\n this.get_input(node).value = formatPredecessors(value, column.editor, gantt);\n },\n get_value: function get_value(id, column, node) {\n return parseInputString(this.get_input(node).value || \"\", column.editor);\n },\n save: function save(id, column, node) {\n var task = gantt.getTask(id);\n var linksDiff = getLinksDiff(task, this.get_value(id, column, node), column.editor);\n\n if (linksDiff.add.length || linksDiff.remove.length) {\n gantt.batchUpdate(function () {\n linksDiff.add.forEach(function (link) {\n gantt.addLink(link);\n });\n linksDiff.remove.forEach(function (linkId) {\n gantt.deleteLink(linkId);\n });\n if (gantt.autoSchedule) gantt.autoSchedule();\n });\n }\n },\n is_changed: function is_changed(value, id, column, node) {\n var inputPredecessors = this.get_value(id, column, node);\n var taskPredecessors = parseInputString(formatPredecessors(value, column.editor, gantt), column.editor);\n return inputPredecessors.join() !== taskPredecessors.join();\n }\n }, true);\n return PredecessorEditor;\n};","module.exports = function (gantt) {\n var BaseEditor = require(\"./base\")(gantt),\n utils = require(\"../../../../../utils/utils\");\n\n var __extends = require(\"../../../../../utils/extends\");\n\n var html5DateFormat = \"%Y-%m-%d\";\n var dateToStr = null;\n var strToDate = null;\n\n function init() {\n if (!dateToStr) {\n dateToStr = gantt.date.date_to_str(html5DateFormat);\n }\n\n if (!strToDate) {\n strToDate = gantt.date.str_to_date(html5DateFormat);\n }\n }\n\n function DateEditor() {\n var self = BaseEditor.apply(this, arguments) || this;\n return self;\n }\n\n __extends(DateEditor, BaseEditor);\n\n utils.mixin(DateEditor.prototype, {\n show: function show(id, column, config, placeholder) {\n init();\n var minValue = null;\n var maxValue = null;\n\n if (typeof config.min === \"function\") {\n minValue = config.min(id, column);\n } else {\n minValue = config.min;\n }\n\n if (typeof config.max === \"function\") {\n maxValue = config.max(id, column);\n } else {\n maxValue = config.max;\n }\n\n var minAttr = minValue ? \" min='\" + dateToStr(minValue) + \"' \" : \"\";\n var maxAttr = maxValue ? \" max='\" + dateToStr(maxValue) + \"' \" : \"\";\n var html = \"
\");\n placeholder.innerHTML = html; // GS-1914. Do not allow entering alues beyond min and max via keyboard\n\n placeholder.oninput = function (e) {\n if (+gantt.date.str_to_date(\"%Y-%m-%d\")(e.target.value) < +minValue) {\n e.target.value = gantt.date.date_to_str(\"%Y-%m-%d\")(minValue);\n }\n\n if (+gantt.date.str_to_date(\"%Y-%m-%d\")(e.target.value) > +maxValue) {\n e.target.value = gantt.date.date_to_str(\"%Y-%m-%d\")(maxValue);\n }\n };\n },\n set_value: function set_value(value, id, column, node) {\n if (value && value.getFullYear) {\n this.get_input(node).value = dateToStr(value);\n } else {\n this.get_input(node).value = value;\n }\n },\n is_valid: function is_valid(value, id, column, node) {\n if (!value || isNaN(value.getTime())) return false;\n return true;\n },\n get_value: function get_value(id, column, node) {\n var parsed;\n\n try {\n parsed = strToDate(this.get_input(node).value || \"\");\n } catch (e) {\n parsed = null; // return null will cancel changes\n }\n\n return parsed;\n }\n }, true);\n return DateEditor;\n};","module.exports = function (gantt) {\n var BaseEditor = require(\"./base\")(gantt),\n utils = require(\"../../../../../utils/utils\");\n\n var __extends = require(\"../../../../../utils/extends\");\n\n function SelectEditor() {\n var self = BaseEditor.apply(this, arguments) || this;\n return self;\n }\n\n __extends(SelectEditor, BaseEditor);\n\n utils.mixin(SelectEditor.prototype, {\n show: function show(id, column, config, placeholder) {\n var html = \"
\";\n placeholder.innerHTML = html;\n },\n get_input: function get_input(node) {\n return node.querySelector(\"select\");\n }\n }, true);\n return SelectEditor;\n};","module.exports = function (gantt) {\n var BaseEditor = require(\"./base\")(gantt),\n utils = require(\"../../../../../utils/utils\");\n\n var __extends = require(\"../../../../../utils/extends\");\n\n function NumberEditor() {\n var self = BaseEditor.apply(this, arguments) || this;\n return self;\n }\n\n __extends(NumberEditor, BaseEditor);\n\n utils.mixin(NumberEditor.prototype, {\n show: function show(id, column, config, placeholder) {\n var min = config.min || 0,\n max = config.max || 100;\n var html = \"
\");\n placeholder.innerHTML = html; // GS-1914. Do not allow entering alues beyond min and max via keyboard\n\n placeholder.oninput = function (e) {\n if (+e.target.value < min) {\n e.target.value = min;\n }\n\n if (+e.target.value > max) {\n e.target.value = max;\n }\n };\n },\n get_value: function get_value(id, column, node) {\n return this.get_input(node).value || \"\";\n },\n is_valid: function is_valid(value, id, column, node) {\n return !isNaN(parseInt(value, 10));\n }\n }, true);\n return NumberEditor;\n};","module.exports = function (gantt) {\n var BaseEditor = require(\"./base\")(gantt),\n utils = require(\"../../../../../utils/utils\");\n\n var __extends = require(\"../../../../../utils/extends\");\n\n function TextEditor() {\n var self = BaseEditor.apply(this, arguments) || this;\n return self;\n }\n\n __extends(TextEditor, BaseEditor);\n\n utils.mixin(TextEditor.prototype, {\n show: function show(id, column, config, placeholder) {\n var html = \"
\");\n placeholder.innerHTML = html;\n }\n }, true);\n return TextEditor;\n};","module.exports = {\n init: function init(controller, grid) {\n var self = controller;\n var gantt = grid.$gantt;\n var onBlurDelay = null;\n var keyNav = gantt.ext.keyboardNavigation;\n keyNav.attachEvent(\"onBeforeFocus\", function (node) {\n var activeCell = controller.locateCell(node);\n clearTimeout(onBlurDelay);\n\n if (activeCell) {\n var columnName = activeCell.columnName;\n var id = activeCell.id;\n var editorState = self.getState();\n\n if (self.isVisible()) {\n if (editorState.id == id && editorState.columnName === columnName) {\n return false;\n }\n }\n }\n\n return true;\n });\n keyNav.attachEvent(\"onFocus\", function (node) {\n var activeCell = controller.locateCell(node);\n var state = controller.getState();\n clearTimeout(onBlurDelay);\n\n if (activeCell && !(activeCell.id == state.id && activeCell.columnName == state.columnName)) {\n if (self.isVisible()) {\n self.save();\n }\n }\n\n return true;\n });\n controller.attachEvent(\"onHide\", function () {\n clearTimeout(onBlurDelay);\n });\n keyNav.attachEvent(\"onBlur\", function () {\n onBlurDelay = setTimeout(function () {\n self.save();\n });\n return true;\n });\n gantt.attachEvent(\"onTaskDblClick\", function (id, e) {\n // block lightbox on double click inside editor\n var state = controller.getState();\n var cell = controller.locateCell(e.target);\n\n if (cell && controller.isVisible() && cell.columnName == state.columnName) {\n return false;\n }\n\n return true;\n });\n gantt.attachEvent(\"onTaskClick\", function (id, e) {\n if (gantt._is_icon_open_click(e)) return true;\n var state = controller.getState();\n var cell = controller.locateCell(e.target);\n\n if (cell && controller.getEditorConfig(cell.columnName)) {\n if (controller.isVisible() && state.id == cell.id && state.columnName == cell.columnName) {// do nothing if editor is already active in this cell\n } else {\n controller.startEdit(cell.id, cell.columnName);\n }\n\n return false;\n }\n\n return true;\n });\n gantt.attachEvent(\"onEmptyClick\", function () {\n self.save();\n return true;\n });\n keyNav.attachEvent(\"onKeyDown\", function (command, e) {\n var activeCell = controller.locateCell(e.target);\n var hasEditor = activeCell ? controller.getEditorConfig(activeCell.columnName) : false;\n var state = controller.getState();\n var keyboard = gantt.constants.KEY_CODES;\n var keyCode = e.keyCode;\n var preventKeyNav = false;\n\n switch (keyCode) {\n case keyboard.ENTER:\n if (controller.isVisible()) {\n controller.save();\n e.preventDefault();\n preventKeyNav = true;\n } else if (hasEditor && !(e.ctrlKey || e.metaKey || e.shiftKey)) {\n self.startEdit(activeCell.id, activeCell.columnName);\n e.preventDefault();\n preventKeyNav = true;\n }\n\n break;\n\n case keyboard.ESC:\n if (controller.isVisible()) {\n controller.hide();\n e.preventDefault();\n preventKeyNav = true;\n }\n\n break;\n\n case keyboard.UP:\n case keyboard.DOWN:\n break;\n\n case keyboard.LEFT:\n case keyboard.RIGHT:\n if (hasEditor && controller.isVisible() || state.editorType === \"date\") {\n preventKeyNav = true;\n }\n\n break;\n\n case keyboard.SPACE:\n if (controller.isVisible()) {\n preventKeyNav = true;\n }\n\n if (hasEditor && !controller.isVisible()) {\n self.startEdit(activeCell.id, activeCell.columnName);\n e.preventDefault();\n preventKeyNav = true;\n }\n\n break;\n\n case keyboard.DELETE:\n if (hasEditor && !controller.isVisible()) {\n self.startEdit(activeCell.id, activeCell.columnName);\n preventKeyNav = true;\n } else if (hasEditor && controller.isVisible()) {\n preventKeyNav = true;\n }\n\n break;\n\n case keyboard.TAB:\n if (controller.isVisible()) {\n if (e.shiftKey) {\n controller.editPrevCell(true);\n } else {\n controller.editNextCell(true);\n }\n\n var newState = controller.getState();\n\n if (newState.id) {\n keyNav.focus({\n type: \"taskCell\",\n id: newState.id,\n column: newState.columnName\n });\n }\n\n e.preventDefault();\n preventKeyNav = true;\n }\n\n break;\n\n default:\n if (controller.isVisible()) preventKeyNav = true;else {\n // start editing on character key\n if (keyCode >= 48 && keyCode <= 57 || // [0-9]\n keyCode > 95 && keyCode < 112 || // numpad\n keyCode >= 64 && keyCode <= 91 || // [a-z]\n keyCode > 185 && keyCode < 193 || //;=-,etc\n keyCode > 218 && keyCode < 223) {\n var modifiers = command.modifiers;\n var anyModifier = modifiers.alt || modifiers.ctrl || modifiers.meta || modifiers.shift;\n\n if (modifiers.alt) {// don't start editing on alt+key\n } else if (anyModifier && keyNav.getCommandHandler(command, \"taskCell\")) {// don't start editing if command already have a keyboard shortcut\n } else if (hasEditor && !controller.isVisible()) {\n self.startEdit(activeCell.id, activeCell.columnName);\n preventKeyNav = true;\n }\n }\n }\n break;\n }\n\n if (preventKeyNav) {\n return false;\n } else {\n return true;\n }\n });\n },\n onShow: function onShow(controller, placeholder, grid) {},\n onHide: function onHide(controller, placeholder, grid) {\n var gantt = grid.$gantt;\n\n if (gantt) {\n gantt.focus();\n }\n },\n destroy: function destroy() {}\n};","module.exports = {\n init: function init(controller, grid) {\n var gantt = grid.$gantt;\n gantt.attachEvent(\"onTaskClick\", function (id, e) {\n if (gantt._is_icon_open_click(e)) return true;\n var state = controller.getState();\n var cell = controller.locateCell(e.target);\n\n if (cell && controller.getEditorConfig(cell.columnName)) {\n if (controller.isVisible() && state.id == cell.id && state.columnName == cell.columnName) {// do nothing if editor is already active in this cell\n } else {\n controller.startEdit(cell.id, cell.columnName);\n }\n\n return false;\n }\n\n return true;\n });\n gantt.attachEvent(\"onEmptyClick\", function () {\n if (controller.isVisible() && controller.isChanged()) {\n controller.save();\n } else {\n controller.hide();\n }\n\n return true;\n });\n gantt.attachEvent(\"onTaskDblClick\", function (id, e) {\n var state = controller.getState();\n var cell = controller.locateCell(e.target);\n\n if (cell && controller.isVisible() && cell.columnName == state.columnName) {\n //GS-933 probably, we don't need to hide the inline editor because the lightbox cannot be opened if you double-click on an inline editor\n //remove this code later if people don't complain\n //controller.hide();\n return false;\n }\n\n return true;\n });\n },\n onShow: function onShow(controller, placeholder, grid) {\n var gantt = grid.$gantt;\n\n if (gantt.ext && gantt.ext.keyboardNavigation) {\n var keyNav = gantt.ext.keyboardNavigation;\n keyNav.attachEvent(\"onKeyDown\", function (command, e) {\n var keyboard = gantt.constants.KEY_CODES;\n var keyCode = e.keyCode;\n var preventKeyNav = false;\n\n switch (keyCode) {\n case keyboard.SPACE:\n if (controller.isVisible()) {\n preventKeyNav = true;\n }\n\n break;\n }\n\n if (preventKeyNav) {\n return false;\n } else {\n return true;\n }\n });\n }\n\n placeholder.onkeydown = function (e) {\n e = e || window.event;\n var keyboard = gantt.constants.KEY_CODES;\n\n if (e.defaultPrevented || e.shiftKey && e.keyCode != keyboard.TAB) {\n return;\n }\n\n var shouldPrevent = true;\n\n switch (e.keyCode) {\n case gantt.keys.edit_save:\n controller.save();\n break;\n\n case gantt.keys.edit_cancel:\n controller.hide();\n break;\n\n case keyboard.UP:\n case keyboard.DOWN:\n if (controller.isVisible()) {\n controller.hide();\n shouldPrevent = false;\n }\n\n break;\n\n case keyboard.TAB:\n if (e.shiftKey) {\n controller.editPrevCell(true);\n } else {\n controller.editNextCell(true);\n }\n\n break;\n\n default:\n shouldPrevent = false;\n break;\n }\n\n if (shouldPrevent) {\n e.preventDefault();\n }\n };\n },\n onHide: function onHide() {},\n destroy: function destroy() {}\n};","var defaultMapping = require(\"./keyboard_mappings/default\");\n\nvar keyNavMappings = require(\"./keyboard_mappings/keyboard_navigation\");\n\nmodule.exports = function (gantt) {\n var mapping = null;\n return {\n setMapping: function setMapping(map) {\n mapping = map;\n },\n getMapping: function getMapping() {\n if (mapping) {\n return mapping;\n } else if (gantt.config.keyboard_navigation_cells && gantt.ext.keyboardNavigation) {\n return keyNavMappings;\n } else {\n return defaultMapping;\n }\n }\n };\n};","var getKeyboardMapping = require(\"./keyboard_mappings\");\n\nvar textEditorFactory = require(\"./editors/text\"),\n numberEditorFactory = require(\"./editors/number\"),\n selectEditorFactory = require(\"./editors/select\"),\n dateEditorFactory = require(\"./editors/date\"),\n predecessorEditorFactory = require(\"./editors/predecessor\"),\n durationEditorFactory = require(\"./editors/duration\");\n\nvar utils = require(\"../../../../utils/utils\");\n\nvar domHelpers = require(\"../../utils/dom_helpers\");\n\nvar eventable = require(\"../../../../utils/eventable\");\n\nvar linkedPropertiesProcessor = require(\"./linked_properties\");\n\nfunction initConfigs(gantt) {\n gantt.config.editor_types = {\n text: new (textEditorFactory(gantt))(),\n number: new (numberEditorFactory(gantt))(),\n select: new (selectEditorFactory(gantt))(),\n date: new (dateEditorFactory(gantt))(),\n predecessor: new (predecessorEditorFactory(gantt))(),\n duration: new (durationEditorFactory(gantt))()\n };\n}\n\nfunction create(gantt) {\n var keyboardMapping = getKeyboardMapping(gantt);\n var eventBus = {};\n eventable(eventBus);\n\n function createGridEditors(grid) {\n function _getGridCellFromNode(node) {\n if (!domHelpers.isChildOf(node, grid.$grid)) {\n return null;\n }\n\n var row = domHelpers.locateAttribute(node, grid.$config.item_attribute);\n var cell = domHelpers.locateAttribute(node, \"data-column-name\");\n\n if (row && cell) {\n var columnName = cell.getAttribute(\"data-column-name\");\n var id = row.getAttribute(grid.$config.item_attribute);\n return {\n id: id,\n columnName: columnName\n };\n }\n\n return null;\n }\n\n function _getEditorPosition(itemId, columnName) {\n var config = grid.$getConfig();\n var top = grid.getItemTop(itemId);\n var height = grid.getItemHeight(itemId);\n var cols = grid.getGridColumns();\n var left = 0,\n right = 0,\n width = 0;\n\n for (var i = 0; i < cols.length; i++) {\n if (cols[i].name == columnName) {\n width = cols[i].width;\n break;\n }\n\n if (config.rtl) {\n right += cols[i].width;\n } else {\n left += cols[i].width;\n }\n }\n\n if (config.rtl) {\n return {\n top: top,\n right: right,\n height: height,\n width: width\n };\n } else {\n return {\n top: top,\n left: left,\n height: height,\n width: width\n };\n }\n }\n\n function findVisibleIndex(grid, columnName) {\n var columns = grid.getGridColumns();\n\n for (var i = 0; i < columns.length; i++) {\n if (columns[i].name == columnName) {\n return i;\n }\n }\n\n return 0;\n }\n\n function _createPlaceholder(itemId, columnName) {\n var config = grid.$getConfig();\n\n var pos = _getEditorPosition(itemId, columnName);\n\n var el = document.createElement(\"div\");\n el.className = \"gantt_grid_editor_placeholder\";\n el.setAttribute(grid.$config.item_attribute, itemId);\n el.setAttribute(grid.$config.bind + \"_id\", itemId); // for backward compatibility\n\n el.setAttribute(\"data-column-name\", columnName);\n var visibleIndex = findVisibleIndex(grid, columnName);\n el.setAttribute(\"data-column-index\", visibleIndex);\n\n gantt._waiAria.inlineEditorAttr(el);\n\n if (config.rtl) {\n el.style.cssText = [\"top:\" + pos.top + \"px\", \"right:\" + pos.right + \"px\", \"width:\" + pos.width + \"px\", \"height:\" + pos.height + \"px\"].join(\";\");\n } else {\n el.style.cssText = [\"top:\" + pos.top + \"px\", \"left:\" + pos.left + \"px\", \"width:\" + pos.width + \"px\", \"height:\" + pos.height + \"px\"].join(\";\");\n }\n\n return el;\n }\n\n var updateTaskDateProperties = linkedPropertiesProcessor(gantt);\n var handlers = [];\n var ganttHandlers = [];\n var store = null;\n var controller = {\n _itemId: null,\n _columnName: null,\n _editor: null,\n _editorType: null,\n _placeholder: null,\n locateCell: _getGridCellFromNode,\n getEditorConfig: function getEditorConfig(columnName) {\n var column = grid.getColumn(columnName);\n return column.editor;\n },\n init: function init() {\n var mapping = keyboardMapping.getMapping();\n\n if (mapping.init) {\n mapping.init(this, grid);\n }\n\n store = grid.$gantt.getDatastore(grid.$config.bind);\n var self = this;\n handlers.push(store.attachEvent(\"onIdChange\", function (oldId, newId) {\n if (self._itemId == oldId) {\n self._itemId = newId;\n }\n }));\n handlers.push(store.attachEvent(\"onStoreUpdated\", function () {\n if (grid.$gantt.getState(\"batchUpdate\").batch_update) {\n return;\n }\n\n if (self.isVisible() && !store.isVisible(self._itemId)) {\n self.hide();\n }\n }));\n ganttHandlers.push(gantt.attachEvent(\"onDataRender\", function () {\n if (self._editor && self._placeholder && !domHelpers.isChildOf(self._placeholder, gantt.$root)) {\n grid.$grid_data.appendChild(self._placeholder);\n }\n }));\n\n this.init = function () {};\n },\n getState: function getState() {\n return {\n editor: this._editor,\n editorType: this._editorType,\n placeholder: this._placeholder,\n id: this._itemId,\n columnName: this._columnName\n };\n },\n startEdit: function startEdit(itemId, columnName) {\n if (this.isVisible()) {\n this.save();\n }\n\n if (!store.exists(itemId)) {\n return;\n }\n\n var editorState = {\n id: itemId,\n columnName: columnName\n };\n\n if (gantt.isReadonly(store.getItem(itemId))) {\n this.callEvent(\"onEditPrevent\", [editorState]);\n return;\n }\n\n if (this.callEvent(\"onBeforeEditStart\", [editorState]) === false) {\n this.callEvent(\"onEditPrevent\", [editorState]);\n return;\n }\n\n this.show(editorState.id, editorState.columnName);\n this.setValue();\n this.callEvent(\"onEditStart\", [editorState]);\n },\n isVisible: function isVisible() {\n return !!(this._editor && domHelpers.isChildOf(this._placeholder, gantt.$root));\n },\n show: function show(itemId, columnName) {\n if (this.isVisible()) {\n this.save();\n }\n\n var editorState = {\n id: itemId,\n columnName: columnName\n };\n var column = grid.getColumn(editorState.columnName);\n var editorConfig = this.getEditorConfig(column.name);\n if (!editorConfig) return;\n var editor = grid.$getConfig().editor_types[editorConfig.type];\n\n var placeholder = _createPlaceholder(editorState.id, editorState.columnName);\n\n grid.$grid_data.appendChild(placeholder);\n editor.show(editorState.id, column, editorConfig, placeholder);\n this._editor = editor;\n this._placeholder = placeholder;\n this._itemId = editorState.id;\n this._columnName = editorState.columnName;\n this._editorType = editorConfig.type;\n var mapping = keyboardMapping.getMapping();\n\n if (mapping.onShow) {\n mapping.onShow(this, placeholder, grid);\n }\n },\n setValue: function setValue() {\n var state = this.getState();\n var itemId = state.id,\n columnName = state.columnName;\n var column = grid.getColumn(columnName);\n var item = store.getItem(itemId);\n var editorConfig = this.getEditorConfig(columnName);\n if (!editorConfig) return;\n var value = item[editorConfig.map_to];\n\n if (editorConfig.map_to == \"auto\") {\n value = store.getItem(itemId);\n }\n\n this._editor.set_value(value, itemId, column, this._placeholder);\n\n this.focus();\n },\n focus: function focus() {\n this._editor.focus(this._placeholder);\n },\n getValue: function getValue() {\n var column = grid.getColumn(this._columnName);\n return this._editor.get_value(this._itemId, column, this._placeholder);\n },\n _getItemValue: function _getItemValue() {\n var editorConfig = this.getEditorConfig(this._columnName);\n if (!editorConfig) return;\n var item = gantt.getTask(this._itemId);\n var value = item[editorConfig.map_to];\n\n if (editorConfig.map_to == \"auto\") {\n value = store.getItem(this._itemId);\n }\n\n return value;\n },\n isChanged: function isChanged() {\n var column = grid.getColumn(this._columnName);\n\n var value = this._getItemValue();\n\n return this._editor.is_changed(value, this._itemId, column, this._placeholder);\n },\n hide: function hide() {\n if (!this._itemId) return;\n var itemId = this._itemId,\n columnName = this._columnName;\n var mapping = keyboardMapping.getMapping();\n\n if (mapping.onHide) {\n mapping.onHide(this, this._placeholder, grid);\n }\n\n this._itemId = null;\n this._columnName = null;\n this._editorType = null;\n if (!this._placeholder) return;\n\n if (this._editor && this._editor.hide) {\n this._editor.hide(this._placeholder);\n }\n\n this._editor = null;\n\n if (this._placeholder.parentNode) {\n this._placeholder.parentNode.removeChild(this._placeholder);\n }\n\n this._placeholder = null;\n this.callEvent(\"onEditEnd\", [{\n id: itemId,\n columnName: columnName\n }]);\n },\n save: function save() {\n if (!(this.isVisible() && store.exists(this._itemId) && this.isChanged())) {\n this.hide();\n return;\n }\n\n var itemId = this._itemId,\n columnName = this._columnName;\n\n if (!store.exists(itemId)) {\n return;\n }\n\n var item = store.getItem(itemId);\n var editorConfig = this.getEditorConfig(columnName);\n var editorState = {\n id: itemId,\n columnName: columnName,\n newValue: this.getValue(),\n oldValue: this._getItemValue()\n };\n\n if (this.callEvent(\"onBeforeSave\", [editorState]) !== false) {\n if (!this._editor.is_valid || this._editor.is_valid(editorState.newValue, editorState.id, grid.getColumn(columnName), this._placeholder)) {\n var mapTo = editorConfig.map_to;\n var value = editorState.newValue;\n\n if (mapTo != \"auto\") {\n item[mapTo] = value;\n updateTaskDateProperties(item, mapTo, gantt.config.inline_editors_date_processing);\n store.updateItem(itemId);\n } else {\n this._editor.save(itemId, grid.getColumn(columnName), this._placeholder);\n }\n\n this.callEvent(\"onSave\", [editorState]);\n }\n }\n\n this.hide();\n },\n _findEditableCell: function findEditableCell(start, direction) {\n var nextIndex = start;\n var columns = grid.getGridColumns();\n var nextColumn = columns[nextIndex];\n var columnName = nextColumn ? nextColumn.name : null;\n\n if (columnName) {\n while (columnName && !this.getEditorConfig(columnName)) {\n columnName = this._findEditableCell(start + direction, direction);\n }\n\n return columnName;\n }\n\n return null;\n },\n getNextCell: function moveCell(dir) {\n // GS-1257. true means to exclude hidden columns\n return this._findEditableCell(grid.getColumnIndex(this._columnName, true) + dir, dir);\n },\n getFirstCell: function getFirstCell() {\n return this._findEditableCell(0, 1);\n },\n getLastCell: function getLastCell() {\n return this._findEditableCell(grid.getGridColumns().length - 1, -1);\n },\n editNextCell: function nextCell(canChangeRow) {\n var cell = this.getNextCell(1);\n\n if (cell) {\n var nextColumn = this.getNextCell(1);\n\n if (nextColumn && this.getEditorConfig(nextColumn)) {\n this.startEdit(this._itemId, nextColumn);\n }\n } else if (canChangeRow && this.moveRow(1)) {\n var task = this.moveRow(1);\n cell = this.getFirstCell();\n\n if (cell && this.getEditorConfig(cell)) {\n this.startEdit(task, cell);\n }\n }\n },\n editPrevCell: function prevCell(canChangeRow) {\n var cell = this.getNextCell(-1);\n\n if (cell) {\n var nextColumn = this.getNextCell(-1);\n\n if (nextColumn && this.getEditorConfig(nextColumn)) {\n this.startEdit(this._itemId, nextColumn);\n }\n } else if (canChangeRow && this.moveRow(-1)) {\n var task = this.moveRow(-1);\n cell = this.getLastCell();\n\n if (cell && this.getEditorConfig(cell)) {\n this.startEdit(task, cell);\n }\n }\n },\n moveRow: function moveRow(dir) {\n var moveTask = dir > 0 ? gantt.getNext : gantt.getPrev;\n moveTask = gantt.bind(moveTask, gantt);\n var nextItem = moveTask(this._itemId); // skip readonly rows\n\n while (gantt.isTaskExists(nextItem) && gantt.isReadonly(gantt.getTask(nextItem))) {\n nextItem = moveTask(nextItem);\n }\n\n return nextItem;\n },\n editNextRow: function nextRow(skipReadonly) {\n var id = this.getState().id;\n if (!gantt.isTaskExists(id)) return;\n var next = null;\n\n if (skipReadonly) {\n next = this.moveRow(1);\n } else {\n next = gantt.getNext(id);\n }\n\n if (gantt.isTaskExists(next)) {\n this.startEdit(next, this._columnName);\n }\n },\n editPrevRow: function prevRow(skipReadonly) {\n var id = this.getState().id;\n if (!gantt.isTaskExists(id)) return;\n var prev = null;\n\n if (skipReadonly) {\n prev = this.moveRow(-1);\n } else {\n prev = gantt.getPrev(id);\n }\n\n if (gantt.isTaskExists(prev)) {\n this.startEdit(prev, this._columnName);\n }\n },\n destructor: function destructor() {\n handlers.forEach(function (handlerId) {\n store.detachEvent(handlerId);\n });\n ganttHandlers.forEach(function (handlerId) {\n gantt.detachEvent(handlerId);\n });\n handlers = [];\n ganttHandlers = [];\n store = null;\n this.hide();\n this.detachAllEvents();\n }\n };\n utils.mixin(controller, keyboardMapping);\n utils.mixin(controller, eventBus);\n return controller;\n }\n\n var inlineEditController = {\n init: initConfigs,\n createEditors: createGridEditors\n };\n utils.mixin(inlineEditController, keyboardMapping);\n utils.mixin(inlineEditController, eventBus);\n return inlineEditController;\n}\n\nmodule.exports = create;","var createStaticBgHelper = function createStaticBgHelper() {\n return {\n render: function render() {},\n destroy: function destroy() {}\n };\n};\n\nmodule.exports = {\n create: function create() {\n return createStaticBgHelper();\n }\n};","var __extends = require(\"../../../utils/extends\"),\n domHelpers = require(\"../utils/dom_helpers\"),\n utils = require(\"../../../utils/utils\"),\n env = require(\"../../../utils/env\"),\n Cell = require(\"./cell\");\n\nvar ScrollbarCell = function (_super) {\n \"use strict\";\n\n var SCROLL_MODIFIER_KEYS = [\"altKey\", \"shiftKey\", \"metaKey\"]; // it's no way to disable ctrl+wheel\n\n __extends(ScrollbarCell, _super);\n\n function ScrollbarCell(parent, config, factory, gantt) {\n var _this = _super.apply(this, arguments) || this;\n\n this.$config = utils.mixin(config, {\n scroll: \"x\"\n });\n _this._scrollHorizontalHandler = utils.bind(_this._scrollHorizontalHandler, _this);\n _this._scrollVerticalHandler = utils.bind(_this._scrollVerticalHandler, _this);\n _this._outerScrollVerticalHandler = utils.bind(_this._outerScrollVerticalHandler, _this);\n _this._outerScrollHorizontalHandler = utils.bind(_this._outerScrollHorizontalHandler, _this);\n _this._mouseWheelHandler = utils.bind(_this._mouseWheelHandler, _this);\n this.$config.hidden = true;\n var size = gantt.config.scroll_size;\n\n if (gantt.env.isIE) {\n // full element height/width must be bigger than just a browser scrollbar,\n // otherwise the scrollbar element won't be scrolled on click\n size += 1;\n }\n\n if (this._isHorizontal()) {\n _this.$config.height = size;\n _this.$parent.$config.height = size;\n } else {\n _this.$config.width = size;\n _this.$parent.$config.width = size;\n }\n\n this.$config.scrollPosition = 0;\n _this.$name = \"scroller\";\n return _this;\n }\n\n ScrollbarCell.prototype.init = function (container) {\n container.innerHTML = this.$toHTML();\n this.$view = container.firstChild;\n\n if (!this.$view) {\n this.init();\n }\n\n if (this._isVertical()) {\n this._initVertical();\n } else {\n this._initHorizontal();\n }\n\n this._initMouseWheel();\n\n this._initLinkedViews();\n };\n\n ScrollbarCell.prototype.$toHTML = function () {\n var className = this._isHorizontal() ? \"gantt_hor_scroll\" : \"gantt_ver_scroll\";\n return \"
\";\n };\n\n ScrollbarCell.prototype._getRootParent = function () {\n var parent = this.$parent;\n\n while (parent && parent.$parent) {\n parent = parent.$parent;\n }\n\n if (parent) {\n return parent;\n }\n };\n\n function eachCell(root, res) {\n res.push(root);\n\n if (root.$cells) {\n for (var i = 0; i < root.$cells.length; i++) {\n eachCell(root.$cells[i], res);\n }\n }\n }\n\n ScrollbarCell.prototype._eachView = function () {\n var res = [];\n eachCell(this._getRootParent(), res);\n return res;\n };\n\n ScrollbarCell.prototype._getLinkedViews = function () {\n var views = this._eachView();\n\n var res = [];\n\n for (var i = 0; i < views.length; i++) {\n if (views[i].$config && (this._isVertical() && views[i].$config.scrollY == this.$id || this._isHorizontal() && views[i].$config.scrollX == this.$id)) {\n res.push(views[i]);\n }\n }\n\n return res;\n };\n\n ScrollbarCell.prototype._initHorizontal = function () {\n this.$scroll_hor = this.$view;\n this.$domEvents.attach(this.$view, \"scroll\", this._scrollHorizontalHandler);\n };\n\n ScrollbarCell.prototype._initLinkedViews = function () {\n var views = this._getLinkedViews();\n\n var css = this._isVertical() ? \"gantt_layout_outer_scroll gantt_layout_outer_scroll_vertical\" : \"gantt_layout_outer_scroll gantt_layout_outer_scroll_horizontal\";\n\n for (var i = 0; i < views.length; i++) {\n //views[i].$config.css = [views[i].$config.css || \"\", css].join(\" \");\n domHelpers.addClassName(views[i].$view || views[i].getNode(), css);\n }\n };\n\n ScrollbarCell.prototype._initVertical = function () {\n this.$scroll_ver = this.$view;\n this.$domEvents.attach(this.$view, \"scroll\", this._scrollVerticalHandler);\n };\n\n ScrollbarCell.prototype._updateLinkedViews = function () {};\n\n ScrollbarCell.prototype._initMouseWheel = function () {\n var ff = env.isFF;\n if (ff) this.$domEvents.attach(this._getRootParent().$view, \"wheel\", this._mouseWheelHandler, {\n passive: false\n });else this.$domEvents.attach(this._getRootParent().$view, \"mousewheel\", this._mouseWheelHandler, {\n passive: false\n });\n };\n\n ScrollbarCell.prototype.scrollHorizontally = function (left) {\n if (this._scrolling) return;\n this._scrolling = true;\n this.$scroll_hor.scrollLeft = left;\n this.$config.codeScrollLeft = left;\n left = this.$scroll_hor.scrollLeft;\n\n var views = this._getLinkedViews();\n\n for (var i = 0; i < views.length; i++) {\n if (views[i].scrollTo) {\n views[i].scrollTo(left, undefined);\n }\n }\n\n var oldSize = this.$config.scrollPosition;\n this.$config.scrollPosition = left;\n this.callEvent(\"onScroll\", [oldSize, left, this.$config.scroll]);\n this._scrolling = false;\n };\n\n ScrollbarCell.prototype.scrollVertically = function (top) {\n if (this._scrolling) return;\n this._scrolling = true;\n this.$scroll_ver.scrollTop = top;\n top = this.$scroll_ver.scrollTop;\n\n var views = this._getLinkedViews();\n\n for (var i = 0; i < views.length; i++) {\n if (views[i].scrollTo) {\n views[i].scrollTo(undefined, top);\n }\n }\n\n var oldSize = this.$config.scrollPosition;\n this.$config.scrollPosition = top;\n this.callEvent(\"onScroll\", [oldSize, top, this.$config.scroll]);\n this._scrolling = false;\n };\n\n ScrollbarCell.prototype._isVertical = function () {\n return this.$config.scroll == \"y\";\n };\n\n ScrollbarCell.prototype._isHorizontal = function () {\n return this.$config.scroll == \"x\";\n };\n\n ScrollbarCell.prototype._scrollHorizontalHandler = function (e) {\n if (this._isVertical() || this._scrolling) {\n return;\n } //in safari we can catch previous onscroll after setting new value from mouse-wheel event\n //set delay to prevent value drifiting\n\n\n if (new Date() - (this._wheel_time || 0) < 100) return true; //if (this.$gantt._touch_scroll_active) return;\n\n var left = this.$scroll_hor.scrollLeft;\n this.scrollHorizontally(left);\n this._oldLeft = this.$scroll_hor.scrollLeft;\n };\n\n ScrollbarCell.prototype._outerScrollHorizontalHandler = function (e) {\n if (this._isVertical()) {\n return;\n }\n };\n\n ScrollbarCell.prototype.show = function () {\n this.$parent.show();\n };\n\n ScrollbarCell.prototype.hide = function () {\n this.$parent.hide();\n };\n\n ScrollbarCell.prototype._getScrollSize = function () {\n var scrollSize = 0;\n var outerSize = 0;\n\n var isHorizontal = this._isHorizontal();\n\n var linked = this._getLinkedViews();\n\n var view;\n var scrollProperty = isHorizontal ? \"scrollWidth\" : \"scrollHeight\",\n innerSizeProperty = isHorizontal ? \"contentX\" : \"contentY\";\n var outerProperty = isHorizontal ? \"x\" : \"y\";\n\n var offset = this._getScrollOffset();\n\n for (var i = 0; i < linked.length; i++) {\n view = linked[i];\n if (!(view && view.$content && view.$content.getSize && !view.$config.hidden)) continue;\n var sizes = view.$content.getSize();\n var cellScrollSize;\n\n if (sizes.hasOwnProperty(scrollProperty)) {\n cellScrollSize = sizes[scrollProperty];\n } else {\n cellScrollSize = sizes[innerSizeProperty];\n }\n\n if (offset) {\n // precalculated vertical/horizontal offsets of scrollbar to emulate 4.x look\n if (sizes[innerSizeProperty] > sizes[outerProperty] && sizes[innerSizeProperty] > scrollSize && cellScrollSize > sizes[outerProperty] - offset + 2) {\n scrollSize = cellScrollSize + (isHorizontal ? 0 : 2);\n outerSize = sizes[outerProperty];\n }\n } else {\n var nonScrollableSize = Math.max(sizes[innerSizeProperty] - cellScrollSize, 0);\n var scrollableViewPortSize = Math.max(sizes[outerProperty] - nonScrollableSize, 0);\n cellScrollSize = cellScrollSize + nonScrollableSize;\n\n if (cellScrollSize > scrollableViewPortSize && cellScrollSize > scrollSize) {\n //|| (cellScrollSize === scrollSize && sizes[outerProperty] < outerSize) // same scroll width but smaller scrollable view port\n scrollSize = cellScrollSize;\n outerSize = sizes[outerProperty];\n }\n }\n }\n\n return {\n outerScroll: outerSize,\n innerScroll: scrollSize\n };\n };\n\n ScrollbarCell.prototype.scroll = function (position) {\n if (this._isHorizontal()) {\n this.scrollHorizontally(position);\n } else {\n this.scrollVertically(position);\n }\n };\n\n ScrollbarCell.prototype.getScrollState = function () {\n return {\n visible: this.isVisible(),\n direction: this.$config.scroll,\n size: this.$config.outerSize,\n scrollSize: this.$config.scrollSize || 0,\n position: this.$config.scrollPosition || 0\n };\n };\n\n ScrollbarCell.prototype.setSize = function (width, height) {\n _super.prototype.setSize.apply(this, arguments);\n\n var scrollSizes = this._getScrollSize();\n\n var ownSize = (this._isVertical() ? height : width) - this._getScrollOffset() + (this._isHorizontal() ? 1 : 0);\n\n if (scrollSizes.innerScroll && ownSize > scrollSizes.outerScroll) {\n scrollSizes.innerScroll += ownSize - scrollSizes.outerScroll;\n }\n\n this.$config.scrollSize = scrollSizes.innerScroll;\n this.$config.width = width;\n this.$config.height = height;\n\n this._setScrollSize(scrollSizes.innerScroll);\n };\n\n ScrollbarCell.prototype.isVisible = function () {\n return !!(this.$parent && this.$parent.$view.parentNode);\n };\n\n ScrollbarCell.prototype.shouldShow = function () {\n var scrollSizes = this._getScrollSize();\n\n if (!scrollSizes.innerScroll && this.$parent && this.$parent.$view.parentNode) {\n return false;\n } else if (scrollSizes.innerScroll && !(this.$parent && this.$parent.$view.parentNode)) {\n return true;\n } else {\n return false;\n }\n };\n\n ScrollbarCell.prototype.shouldHide = function () {\n var scrollSizes = this._getScrollSize();\n\n if (!scrollSizes.innerScroll && this.$parent && this.$parent.$view.parentNode) {\n return true;\n } else {\n return false;\n }\n };\n\n ScrollbarCell.prototype.toggleVisibility = function () {\n if (this.shouldHide()) {\n this.hide();\n } else if (this.shouldShow()) {\n this.show();\n }\n };\n\n ScrollbarCell.prototype._getScaleOffset = function (view) {\n var offset = 0;\n\n if (view && (view.$config.view == \"timeline\" || view.$config.view == \"grid\")) {\n offset = view.$content.$getConfig().scale_height;\n }\n\n return offset;\n };\n\n ScrollbarCell.prototype._getScrollOffset = function () {\n var offset = 0;\n\n if (this._isVertical()) {\n var parentLayout = this.$parent.$parent;\n offset = Math.max(this._getScaleOffset(parentLayout.getPrevSibling(this.$parent.$id)), this._getScaleOffset(parentLayout.getNextSibling(this.$parent.$id)));\n } else {\n var linked = this._getLinkedViews();\n\n for (var i = 0; i < linked.length; i++) {\n var view = linked[i],\n vparent = view.$parent;\n var cells = vparent.$cells;\n var last = cells[cells.length - 1];\n\n if (last && last.$config.view == \"scrollbar\" && last.$config.hidden === false) {\n offset = last.$config.width;\n break;\n }\n }\n }\n\n return offset || 0;\n };\n\n ScrollbarCell.prototype._setScrollSize = function (size) {\n var property = this._isHorizontal() ? \"width\" : \"height\";\n var scrollbar = this._isHorizontal() ? this.$scroll_hor : this.$scroll_ver;\n\n var offset = this._getScrollOffset();\n\n var node = scrollbar.firstChild;\n\n if (offset) {\n if (this._isVertical()) {\n this.$config.outerSize = this.$config.height - offset + 3;\n scrollbar.style.height = this.$config.outerSize + \"px\";\n scrollbar.style.top = offset - 1 + \"px\";\n domHelpers.addClassName(scrollbar, this.$parent._borders.top);\n domHelpers.addClassName(scrollbar.parentNode, \"gantt_task_vscroll\");\n } else {\n this.$config.outerSize = this.$config.width - offset + 1;\n scrollbar.style.width = this.$config.outerSize + \"px\"; //domHelpers.addClassName(scrollbar, this.$parent._borders.right);\n }\n } else {\n scrollbar.style.top = \"auto\";\n domHelpers.removeClassName(scrollbar, this.$parent._borders.top);\n domHelpers.removeClassName(scrollbar.parentNode, \"gantt_task_vscroll\");\n this.$config.outerSize = this.$config.height;\n }\n\n node.style[property] = size + \"px\";\n };\n\n ScrollbarCell.prototype._scrollVerticalHandler = function (e) {\n if (this._scrollHorizontalHandler() || this._scrolling) {\n return;\n } //if (this.$gantt._touch_scroll_active) return;\n\n\n var top = this.$scroll_ver.scrollTop;\n var prev = this._oldTop;\n if (top == prev) return;\n this.scrollVertically(top);\n this._oldTop = this.$scroll_ver.scrollTop;\n };\n\n ScrollbarCell.prototype._outerScrollVerticalHandler = function (e) {\n if (this._scrollHorizontalHandler()) {\n return;\n }\n };\n\n ScrollbarCell.prototype._checkWheelTarget = function (targetNode) {\n var connectedViews = this._getLinkedViews().concat(this);\n\n for (var i = 0; i < connectedViews.length; i++) {\n var node = connectedViews[i].$view;\n\n if (domHelpers.isChildOf(targetNode, node)) {\n return true;\n }\n }\n\n return false;\n };\n\n ScrollbarCell.prototype._mouseWheelHandler = function (e) {\n var target = e.target || e.srcElement;\n if (!this._checkWheelTarget(target)) return;\n this._wheel_time = new Date();\n var res = {};\n var wheelSpeed = {\n x: 1,\n y: 1\n };\n var wheelSpeedConfig = this.$gantt.config.wheel_scroll_sensitivity;\n\n if (typeof wheelSpeedConfig == \"number\" && !!wheelSpeedConfig) {\n wheelSpeed = {\n x: wheelSpeedConfig,\n y: wheelSpeedConfig\n };\n } else if ({}.toString.apply(wheelSpeedConfig) == \"[object Object]\") {\n wheelSpeed = {\n x: wheelSpeedConfig.x,\n y: wheelSpeedConfig.y\n };\n }\n\n var ff = env.isFF;\n var deltaX = ff ? e.deltaX : e.wheelDeltaX;\n var deltaY = ff ? e.deltaY : e.wheelDelta;\n var multiplier = -20;\n\n if (ff) {\n if (e.deltaMode !== 0) {\n multiplier = -40;\n } else {\n multiplier = -10;\n }\n }\n\n var wx = ff ? deltaX * multiplier * wheelSpeed.x : deltaX * 2 * wheelSpeed.x;\n var wy = ff ? deltaY * multiplier * wheelSpeed.y : deltaY * wheelSpeed.y;\n var horizontalScrollModifier = this.$gantt.config.horizontal_scroll_key;\n\n if (horizontalScrollModifier !== false) {\n if (SCROLL_MODIFIER_KEYS.indexOf(horizontalScrollModifier) >= 0) {\n if (e[horizontalScrollModifier] && !(e.deltaX || e.wheelDeltaX)) {\n // shift+mousewheel for horizontal scroll\n wx = wy * 2;\n wy = 0;\n }\n }\n }\n\n if (wx && Math.abs(wx) > Math.abs(wy)) {\n if (this._isVertical()) {\n return;\n }\n\n if (res.x) return true; //no horisontal scroll, must not block scrolling\n\n if (!this.$scroll_hor || !this.$scroll_hor.offsetWidth) return true;\n var dir = wx / -40;\n var oldLeft = this._oldLeft;\n var left = oldLeft + dir * 30;\n this.scrollHorizontally(left);\n this.$scroll_hor.scrollLeft = left; // not block scroll if position hasn't changed\n\n if (oldLeft == this.$scroll_hor.scrollLeft) {\n return true;\n }\n\n this._oldLeft = this.$scroll_hor.scrollLeft;\n } else {\n if (this._isHorizontal()) {\n return;\n }\n\n if (res.y) return true; //no vertical scroll, must not block scrolling\n\n if (!this.$scroll_ver || !this.$scroll_ver.offsetHeight) return true;\n var dir = wy / -40;\n if (typeof wy == \"undefined\") dir = e.detail;\n var oldTop = this._oldTop;\n var top = this.$scroll_ver.scrollTop + dir * 30; //if(!this.$gantt.config.prevent_default_scroll &&\n //\t(this.$gantt._cached_scroll_pos && ((this.$gantt._cached_scroll_pos.y == top) || (this.$gantt._cached_scroll_pos.y <= 0 && top <= 0)))) return true;\n\n this.scrollVertically(top);\n this.$scroll_ver.scrollTop = top; // not block scroll if position hasn't changed\n\n if (oldTop == this.$scroll_ver.scrollTop) {\n return true;\n }\n\n this._oldTop = this.$scroll_ver.scrollTop;\n }\n\n if (e.preventDefault) e.preventDefault();\n e.cancelBubble = true;\n return false;\n };\n\n return ScrollbarCell;\n}(Cell);\n\nmodule.exports = ScrollbarCell;","module.exports = null;","var __extends = require(\"../../../utils/extends\"),\n utils = require(\"../../../utils/utils\"),\n Cell = require(\"./cell\");\n\nvar ViewCell = function (_super) {\n \"use strict\";\n\n __extends(ViewCell, _super);\n\n function ViewCell(parent, config, factory) {\n var _this = _super.apply(this, arguments) || this;\n\n if (config.view) {\n if (config.id) {\n // pass id to the nested view\n this.$id = utils.uid();\n }\n\n var childConfig = utils.copy(config);\n delete childConfig.config;\n delete childConfig.templates;\n this.$content = this.$factory.createView(config.view, this, childConfig, this);\n if (!this.$content) return false;\n }\n\n _this.$name = \"viewCell\";\n return _this;\n }\n\n ViewCell.prototype.destructor = function () {\n this.clear();\n\n _super.prototype.destructor.call(this);\n };\n\n ViewCell.prototype.clear = function () {\n this.$initialized = false; // call destructor\n\n if (this.$content) {\n var method = this.$content.unload || this.$content.destructor;\n\n if (method) {\n method.call(this.$content);\n }\n }\n\n _super.prototype.clear.call(this);\n };\n\n ViewCell.prototype.scrollTo = function (left, top) {\n if (this.$content && this.$content.scrollTo) {\n this.$content.scrollTo(left, top);\n } else {\n _super.prototype.scrollTo.call(this, left, top);\n }\n };\n\n ViewCell.prototype._setContentSize = function (x, y) {\n var borders = this._getBorderSizes();\n\n if (typeof x === \"number\") {\n var outerX = x + borders.horizontal;\n this.$config.width = outerX;\n }\n\n if (typeof y === \"number\") {\n var outerY = y + borders.vertical;\n this.$config.height = outerY;\n }\n };\n\n ViewCell.prototype.setSize = function (x, y) {\n _super.prototype.setSize.call(this, x, y);\n\n if (!this.$preResize && this.$content) {\n if (!this.$initialized) {\n this.$initialized = true;\n var header = this.$view.childNodes[0];\n var content = this.$view.childNodes[1];\n if (!content) content = header;\n /*if(this.$content.$config){\r\n \tthis.$content.$config.width = this.$lastSize.contentX;\r\n \tthis.$content.$config.height = this.$lastSize.contentY;\r\n }*/\n\n this.$content.init(content);\n }\n }\n };\n\n ViewCell.prototype.setContentSize = function () {\n if (!this.$preResize && this.$content) {\n if (this.$initialized) {\n this.$content.setSize(this.$lastSize.contentX, this.$lastSize.contentY);\n }\n }\n };\n\n ViewCell.prototype.getContentSize = function () {\n var size = _super.prototype.getContentSize.call(this);\n\n if (this.$content && this.$initialized) {\n var childSize = this.$content.getSize();\n size.width = childSize.contentX === undefined ? childSize.width : childSize.contentX;\n size.height = childSize.contentY === undefined ? childSize.height : childSize.contentY;\n }\n\n var borders = this._getBorderSizes();\n\n size.width += borders.horizontal;\n size.height += borders.vertical;\n return size;\n };\n\n return ViewCell;\n}(Cell);\n\nmodule.exports = ViewCell;","var __extends = require(\"../../../utils/extends\"),\n Layout = require(\"./layout\"),\n Cell = require(\"./cell\");\n\nvar ViewLayout = function (_super) {\n \"use strict\";\n\n __extends(ViewLayout, _super);\n\n function ViewLayout(parent, config, factory) {\n var _this = _super.apply(this, arguments) || this;\n\n for (var i = 0; i < _this.$cells.length; i++) {\n _this.$cells[i].$config.hidden = i !== 0;\n }\n\n _this.$cell = _this.$cells[0];\n _this.$name = \"viewLayout\";\n return _this;\n }\n\n ViewLayout.prototype.cell = function (id) {\n var cell = _super.prototype.cell.call(this, id);\n\n if (!cell.$view) {\n this.$fill(null, this);\n }\n\n return cell;\n };\n\n ViewLayout.prototype.moveView = function (view) {\n var body = this.$view;\n\n if (this.$cell) {\n this.$cell.$config.hidden = true;\n body.removeChild(this.$cell.$view);\n }\n\n this.$cell = view;\n body.appendChild(view.$view);\n };\n\n ViewLayout.prototype.setSize = function (x, y) {\n Cell.prototype.setSize.call(this, x, y);\n };\n\n ViewLayout.prototype.setContentSize = function () {\n var size = this.$lastSize;\n this.$cell.setSize(size.contentX, size.contentY);\n };\n\n ViewLayout.prototype.getSize = function () {\n var sizes = _super.prototype.getSize.call(this);\n\n if (this.$cell) {\n var cellSize = this.$cell.getSize();\n\n if (this.$config.byMaxSize) {\n for (var i = 0; i < this.$cells.length; i++) {\n var otherCell = this.$cells[i].getSize();\n\n for (var cell in cellSize) {\n cellSize[cell] = Math.max(cellSize[cell], otherCell[cell]);\n }\n }\n }\n\n for (var size in sizes) {\n sizes[size] = sizes[size] || cellSize[size];\n }\n\n sizes.gravity = Math.max(sizes.gravity, cellSize.gravity);\n }\n\n return sizes;\n };\n\n return ViewLayout;\n}(Layout);\n\nmodule.exports = ViewLayout;","module.exports = function (item, view, config) {\n if (!item.start_date || !item.end_date) {\n return null;\n }\n\n var padding = 200;\n var startCoord = view.posFromDate(item.start_date);\n var endCoord = view.posFromDate(item.end_date);\n var left = Math.min(startCoord, endCoord) - padding;\n var right = Math.max(startCoord, endCoord) + padding;\n return {\n top: view.getItemTop(item.id),\n height: view.getItemHeight(item.id),\n left: left,\n width: right - left\n };\n};","var barRectangle = require(\"./get_bar_rectangle\");\n\nmodule.exports = function getLinkBox(item, view, config, gantt) {\n if (!gantt.isTaskExists(item.source)) {\n return null;\n }\n\n if (!gantt.isTaskExists(item.target)) {\n return null;\n }\n\n var sourceBox = barRectangle(gantt.getTask(item.source), view, gantt);\n var targetBox = barRectangle(gantt.getTask(item.target), view, gantt);\n\n if (!sourceBox || !targetBox) {\n return null;\n }\n\n var padding = 100;\n var left = Math.min(sourceBox.left, targetBox.left) - padding;\n var right = Math.max(sourceBox.left + sourceBox.width, targetBox.left + targetBox.width) + padding;\n var top = Math.min(sourceBox.top, targetBox.top) - padding;\n var bottom = Math.max(sourceBox.top + sourceBox.height, targetBox.top + targetBox.height) + padding;\n return {\n top: top,\n height: bottom - top,\n bottom: bottom,\n left: left,\n width: right - left,\n right: right\n };\n};","module.exports = function (viewport, box, gantt) {\n if (!box) {\n return false;\n }\n\n if (box.left > viewport.x_end || box.left + box.width < viewport.x) {\n return false;\n }\n\n if (box.top > viewport.y_end || box.top + box.height < viewport.y) {\n return false;\n }\n\n return true;\n};","var genericViewPortChecker = require(\"./viewport/is_in_viewport\");\n\nvar isLegacyRender = require(\"./is_legacy_smart_render\");\n\nvar basicGetRectangle = require(\"./viewport/get_grid_row_rectangle\");\n\nvar basicGetRange = require(\"./viewport/get_visible_bars_range\");\n\nvar rendererFactory = function rendererFactory(gantt) {\n //hash of dom elements is needed to redraw single bar/link\n var task_area_pulls = {},\n task_area_renderers = {};\n\n function getView(layer) {\n var view = null;\n\n if (typeof layer.view === \"string\") {\n view = gantt.$ui.getView(layer.view);\n } else if (layer.view) {\n view = layer.view;\n }\n\n return view;\n }\n\n function getRenderer(id, layer, node) {\n if (task_area_renderers[id]) return task_area_renderers[id];\n if (!layer.renderer) gantt.assert(false, \"Invalid renderer call\");\n var renderMethod = null;\n var updateMethod = null;\n var getRectangle = null;\n var renderCallbackMethod = null;\n var specializedViewPortChecker = null;\n\n if (typeof layer.renderer === \"function\") {\n renderMethod = layer.renderer;\n getRectangle = basicGetRectangle;\n } else {\n renderMethod = layer.renderer.render;\n updateMethod = layer.renderer.update;\n renderCallbackMethod = layer.renderer.onrender;\n\n if (layer.renderer.isInViewPort) {\n specializedViewPortChecker = layer.renderer.isInViewPort;\n } else {\n getRectangle = layer.renderer.getRectangle;\n }\n\n if (!getRectangle && getRectangle !== null) {\n getRectangle = basicGetRectangle;\n }\n }\n\n var filter = layer.filter;\n if (node) node.setAttribute(gantt.config.layer_attribute, true);\n task_area_renderers[id] = {\n render_item: function render_item(item, container, viewPort, layerView, viewConfig) {\n container = container || node;\n\n if (filter) {\n if (!filter(item)) {\n this.remove_item(item.id);\n return;\n }\n }\n\n var view = layerView || getView(layer);\n var config = viewConfig || (view ? view.$getConfig() : null);\n var rendererViewPort = viewPort;\n\n if (!rendererViewPort && config && config.smart_rendering) {\n rendererViewPort = view.getViewPort();\n }\n\n var dom = null;\n\n if (!isLegacyRender(gantt) && (getRectangle || specializedViewPortChecker) && rendererViewPort) {\n var isVisible = false;\n\n if (specializedViewPortChecker) {\n isVisible = specializedViewPortChecker(item, rendererViewPort, view, config, gantt);\n } else {\n isVisible = genericViewPortChecker(rendererViewPort, getRectangle(item, view, config, gantt), gantt);\n }\n\n if (isVisible) {\n dom = renderMethod.call(gantt, item, view, config, rendererViewPort);\n }\n } else {\n dom = renderMethod.call(gantt, item, view, config, rendererViewPort);\n }\n\n this.append(item, dom, container);\n var useBuffer = container.nodeType == 11; //DocumentFragment\n\n if (renderCallbackMethod && !useBuffer && dom) {\n renderCallbackMethod.call(gantt, item, dom, view);\n }\n },\n clear: function clear(container) {\n this.rendered = task_area_pulls[id] = {};\n if (!layer.append) this.clear_container(container);\n },\n clear_container: function clear_container(container) {\n container = container || node;\n\n if (container) {\n container.innerHTML = \"\";\n }\n },\n get_visible_range: function get_visible_range(datastore) {\n var view = getView(layer);\n var viewport;\n var viewConfig = view ? view.$getConfig() : null;\n\n if (viewConfig && viewConfig.smart_rendering) {\n viewport = view.getViewPort();\n }\n\n var range;\n\n if (view && viewport) {\n if (typeof layer.renderer === \"function\") {\n range = basicGetRange(gantt, view, viewConfig, datastore, viewport);\n } else if (layer.renderer && layer.renderer.getVisibleRange) {\n range = layer.renderer.getVisibleRange(gantt, view, viewConfig, datastore, viewport);\n }\n }\n\n if (!range) {\n range = {\n start: 0,\n end: datastore.count()\n };\n }\n\n return range;\n },\n prepare_data: function prepare_data(items) {\n if (layer.renderer && layer.renderer.prepareData) {\n return layer.renderer.prepareData(items, gantt, layer);\n }\n },\n render_items: function render_items(items, container) {\n container = container || node;\n var buffer = document.createDocumentFragment();\n this.clear(container);\n var viewPort = null;\n var view = getView(layer);\n var viewConfig = view ? view.$getConfig() : null;\n\n if (viewConfig && viewConfig.smart_rendering) {\n viewPort = view.getViewPort();\n }\n\n for (var i = 0, vis = items.length; i < vis; i++) {\n this.render_item(items[i], buffer, viewPort, view, viewConfig);\n }\n\n container.appendChild(buffer, container);\n var itemsSearch = {};\n items.forEach(function (item) {\n itemsSearch[item.id] = item;\n });\n var renderedItems = {};\n\n if (renderCallbackMethod) {\n var newElements = {};\n\n for (var i in this.rendered) {\n if (!renderedItems[i]) {\n newElements[i] = this.rendered[i];\n renderCallbackMethod.call(gantt, itemsSearch[i], this.rendered[i], view);\n }\n }\n }\n },\n update_items: function update_items(items, container) {\n var view = getView(layer);\n var viewConfig = view ? view.$getConfig() : null;\n\n if (!view || !view.$getConfig().smart_rendering || isLegacyRender(gantt)) {\n return;\n }\n\n if (!this.rendered) {\n return;\n }\n\n if (!(getRectangle || specializedViewPortChecker)) {\n return;\n }\n\n container = container || node;\n var buffer = document.createDocumentFragment();\n var viewPort = null;\n\n if (view) {\n viewPort = view.getViewPort();\n }\n\n var itemsSearch = {};\n items.forEach(function (item) {\n itemsSearch[item.id] = item;\n });\n var renderedItems = {};\n var nodesToRemove = {};\n\n for (var i in this.rendered) {\n nodesToRemove[i] = true;\n renderedItems[i] = true;\n }\n\n var renderCalledFor = {};\n\n for (var i = 0, vis = items.length; i < vis; i++) {\n var item = items[i];\n var itemNode = this.rendered[item.id];\n nodesToRemove[item.id] = false;\n\n if (itemNode && itemNode.parentNode) {\n var isVisible = false;\n\n if (specializedViewPortChecker) {\n isVisible = specializedViewPortChecker(item, viewPort, view, viewConfig, gantt);\n } else {\n isVisible = genericViewPortChecker(viewPort, getRectangle(item, view, viewConfig, gantt), gantt);\n }\n\n if (!isVisible) {\n nodesToRemove[item.id] = true;\n } else {\n if (updateMethod) {\n updateMethod.call(gantt, item, itemNode, view, viewConfig, viewPort);\n }\n\n this.restore(item, buffer);\n }\n } else {\n renderCalledFor[items[i].id] = true;\n this.render_item(items[i], buffer, viewPort, view, viewConfig);\n }\n }\n\n for (var i in nodesToRemove) {\n if (nodesToRemove[i]) {\n this.hide(i);\n }\n }\n\n if (buffer.childNodes.length) {\n container.appendChild(buffer, container);\n }\n\n if (renderCallbackMethod) {\n var newElements = {};\n\n for (var i in this.rendered) {\n if (!renderedItems[i] || renderCalledFor[i]) {\n newElements[i] = this.rendered[i];\n renderCallbackMethod.call(gantt, itemsSearch[i], this.rendered[i], view);\n }\n }\n }\n },\n append: function append(item, node, container) {\n if (!this.rendered) {\n return;\n }\n\n if (!node) {\n if (this.rendered[item.id]) {\n this.remove_item(item.id);\n }\n\n return;\n }\n\n if (this.rendered[item.id] && this.rendered[item.id].parentNode) {\n this.replace_item(item.id, node);\n } else {\n container.appendChild(node);\n }\n\n this.rendered[item.id] = node;\n },\n replace_item: function replace_item(item_id, newNode) {\n var item = this.rendered[item_id];\n\n if (item && item.parentNode) {\n item.parentNode.replaceChild(newNode, item);\n }\n\n this.rendered[item_id] = newNode;\n },\n remove_item: function remove_item(item_id) {\n this.hide(item_id);\n delete this.rendered[item_id];\n },\n hide: function hide(item_id) {\n var item = this.rendered[item_id];\n\n if (item && item.parentNode) {\n item.parentNode.removeChild(item);\n }\n },\n restore: function restore(item, container) {\n var dom = this.rendered[item.id];\n\n if (dom) {\n if (!dom.parentNode) {\n this.append(item, dom, container || node);\n }\n } else {\n this.render_item(item, container || node);\n }\n },\n change_id: function change_id(oldid, newid) {\n this.rendered[newid] = this.rendered[oldid];\n delete this.rendered[oldid];\n },\n rendered: task_area_pulls[id],\n node: node,\n destructor: function destructor() {\n this.clear();\n delete task_area_renderers[id];\n delete task_area_pulls[id];\n }\n };\n return task_area_renderers[id];\n }\n\n function clearRenderers() {\n for (var i in task_area_renderers) {\n getRenderer(i).destructor();\n }\n }\n\n return {\n getRenderer: getRenderer,\n clearRenderers: clearRenderers\n };\n};\n\nmodule.exports = rendererFactory;","var renderFactoryProvider = require(\"./render_factory\");\n\nvar utils = require(\"../../../utils/utils\"),\n domHelpers = require(\"../utils/dom_helpers\"),\n isLegacyRender = require(\"./is_legacy_smart_render\");\n\nvar layerFactory = function layerFactory(gantt) {\n var renderFactory = renderFactoryProvider(gantt);\n return {\n createGroup: function createGroup(getContainer, relativeRoot, defaultFilters, initLayer) {\n var renderGroup = {\n tempCollection: [],\n renderers: {},\n container: getContainer,\n filters: [],\n getLayers: function getLayers() {\n this._add(); // add pending layers\n\n\n var res = [];\n\n for (var i in this.renderers) {\n res.push(this.renderers[i]);\n }\n\n return res;\n },\n getLayer: function getLayer(id) {\n return this.renderers[id];\n },\n _add: function _add(layer) {\n if (layer) {\n layer.id = layer.id || utils.uid();\n this.tempCollection.push(layer);\n }\n\n var container = this.container();\n var pending = this.tempCollection;\n\n for (var i = 0; i < pending.length; i++) {\n layer = pending[i];\n if (!this.container() && !(layer && layer.container && domHelpers.isChildOf(layer.container, document.body))) continue;\n var node = layer.container,\n id = layer.id,\n topmost = layer.topmost;\n\n if (!node.parentNode) {\n //insert on top or below the tasks\n if (topmost) {\n container.appendChild(node);\n } else {\n var rel = relativeRoot ? relativeRoot() : container.firstChild; // GS-1274: if we don't add the second check, Gantt stops working if\n // we add the task layer without the timeline and switch to a layout with the timeline\n\n if (rel && rel.parentNode == container) container.insertBefore(node, rel);else container.appendChild(node);\n }\n }\n\n this.renderers[id] = renderFactory.getRenderer(id, layer, node);\n\n if (initLayer) {\n initLayer(layer, gantt);\n }\n\n this.tempCollection.splice(i, 1);\n i--;\n }\n },\n addLayer: function addLayer(config) {\n if (config) {\n if (typeof config == \"function\") {\n config = {\n renderer: config\n };\n }\n\n if (config.filter === undefined) {\n config.filter = mergeFilters(defaultFilters || []);\n } else if (config.filter instanceof Array) {\n config.filter.push(defaultFilters);\n config.filter = mergeFilters(config.filter);\n }\n\n if (!config.container) {\n config.container = document.createElement(\"div\");\n }\n\n var self = this;\n\n config.requestUpdate = function () {\n if (gantt.config.smart_rendering && !isLegacyRender(gantt)) {\n if (self.renderers[config.id]) {\n self.onUpdateRequest(self.renderers[config.id]);\n }\n }\n };\n }\n\n this._add(config);\n\n return config ? config.id : undefined;\n },\n onUpdateRequest: function onUpdateRequest(layer) {},\n eachLayer: function eachLayer(code) {\n for (var i in this.renderers) {\n code(this.renderers[i]);\n }\n },\n removeLayer: function removeLayer(id) {\n if (!this.renderers[id]) return;\n this.renderers[id].destructor();\n delete this.renderers[id];\n },\n clear: function clear() {\n for (var i in this.renderers) {\n this.renderers[i].destructor();\n }\n\n this.renderers = {};\n } //,\n //prepareConfig: prepareConfig\n\n };\n gantt.attachEvent(\"onDestroy\", function () {\n renderGroup.clear();\n renderGroup = null;\n });\n return renderGroup;\n }\n };\n};\n\nfunction mergeFilters(filter_methods) {\n if (!(filter_methods instanceof Array)) {\n filter_methods = Array.prototype.slice.call(arguments, 0);\n }\n\n return function (obj) {\n var res = true;\n\n for (var i = 0, len = filter_methods.length; i < len; i++) {\n var filter_method = filter_methods[i];\n\n if (filter_method) {\n res = res && filter_method(obj.id, obj) !== false;\n }\n }\n\n return res;\n };\n}\n\nmodule.exports = layerFactory;","var createLayerFactory = require(\"./render/layer_engine\");\n\nvar getVisibleTaskRange = require(\"./render/viewport/get_visible_bars_range\");\n\nvar getVisibleLinksRangeFactory = require(\"./render/viewport/factory/get_visible_link_range\");\n\nvar isLinkInViewport = require(\"./render/viewport/is_link_in_viewport\");\n\nfunction initLayer(layer, gantt) {\n if (!layer.view) {\n return;\n }\n\n var view = layer.view;\n\n if (typeof view === \"string\") {\n view = gantt.$ui.getView(view);\n }\n\n if (view && view.attachEvent) {\n view.attachEvent(\"onScroll\", function () {\n var state = gantt.$services.getService(\"state\"); // don't repaint if we're inside batchUpdate, a complete repaint will be called afterwards\n\n if (!state.getState(\"batchUpdate\").batch_update && !view.$config.$skipSmartRenderOnScroll) {\n if (layer.requestUpdate) {\n layer.requestUpdate();\n }\n }\n });\n }\n}\n\nvar createLayerEngine = function createLayerEngine(gantt) {\n var factory = createLayerFactory(gantt);\n return {\n getDataRender: function getDataRender(name) {\n return gantt.$services.getService(\"layer:\" + name) || null;\n },\n createDataRender: function createDataRender(config) {\n var name = config.name,\n defaultContainer = config.defaultContainer,\n previusSiblingContainer = config.defaultContainerSibling;\n var layers = factory.createGroup(defaultContainer, previusSiblingContainer, function (itemId, item) {\n if (layers.filters) {\n for (var i = 0; i < layers.filters.length; i++) {\n if (layers.filters[i](itemId, item) === false) {\n return false;\n }\n }\n } else {\n return true;\n }\n }, initLayer);\n gantt.$services.setService(\"layer:\" + name, function () {\n return layers;\n });\n gantt.attachEvent(\"onGanttReady\", function () {\n layers.addLayer(); // init layers on start\n });\n return layers;\n },\n init: function init() {\n var taskLayers = this.createDataRender({\n name: \"task\",\n defaultContainer: function defaultContainer() {\n if (gantt.$task_data) {\n return gantt.$task_data;\n } else if (gantt.$ui.getView(\"timeline\")) {\n return gantt.$ui.getView(\"timeline\").$task_data;\n }\n },\n defaultContainerSibling: function defaultContainerSibling() {\n if (gantt.$task_links) {\n return gantt.$task_links;\n } else if (gantt.$ui.getView(\"timeline\")) {\n return gantt.$ui.getView(\"timeline\").$task_links;\n }\n },\n filter: function filter(item) {}\n }, gantt);\n var linkLayers = this.createDataRender({\n name: \"link\",\n defaultContainer: function defaultContainer() {\n if (gantt.$task_data) {\n return gantt.$task_data;\n } else if (gantt.$ui.getView(\"timeline\")) {\n return gantt.$ui.getView(\"timeline\").$task_data;\n }\n }\n }, gantt);\n return {\n addTaskLayer: function addTaskLayer(config) {\n var rangeFunction = getVisibleTaskRange;\n\n if (typeof config === \"function\") {\n config = {\n renderer: {\n render: config,\n getVisibleRange: rangeFunction\n }\n };\n } else {\n if (config.renderer && !config.renderer.getVisibleRange) {\n config.renderer.getVisibleRange = rangeFunction;\n }\n }\n\n config.view = \"timeline\";\n return taskLayers.addLayer(config);\n },\n _getTaskLayers: function _getTaskLayers() {\n return taskLayers.getLayers();\n },\n removeTaskLayer: function removeTaskLayer(id) {\n taskLayers.removeLayer(id);\n },\n _clearTaskLayers: function _clearTaskLayers() {\n taskLayers.clear();\n },\n addLinkLayer: function addLinkLayer(config) {\n var rangeFunction = getVisibleLinksRangeFactory();\n\n if (typeof config === \"function\") {\n config = {\n renderer: {\n render: config,\n getVisibleRange: rangeFunction\n }\n };\n } else {\n if (config.renderer && !config.renderer.getVisibleRange) {\n config.renderer.getVisibleRange = rangeFunction;\n }\n }\n\n config.view = \"timeline\";\n\n if (config && config.renderer) {\n if (!config.renderer.getRectangle && !config.renderer.isInViewPort) {\n config.renderer.isInViewPort = isLinkInViewport;\n }\n }\n\n return linkLayers.addLayer(config);\n },\n _getLinkLayers: function _getLinkLayers() {\n return linkLayers.getLayers();\n },\n removeLinkLayer: function removeLinkLayer(id) {\n linkLayers.removeLayer(id);\n },\n _clearLinkLayers: function _clearLinkLayers() {\n linkLayers.clear();\n }\n };\n }\n };\n};\n\nmodule.exports = createLayerEngine;","var domHelpers = require(\"./utils/dom_helpers\");\n\nvar createMouseHandler = function (domHelpers) {\n return function (gantt) {\n var eventHandlers = {\n \"click\": {},\n \"doubleclick\": {},\n \"contextMenu\": {}\n };\n\n function addEventTarget(event, className, handler, root) {\n if (!eventHandlers[event][className]) {\n eventHandlers[event][className] = [];\n }\n\n eventHandlers[event][className].push({\n handler: handler,\n root: root\n });\n }\n\n function callHandler(eventName, className, root, args) {\n var handlers = eventHandlers[eventName][className];\n\n if (handlers) {\n for (var i = 0; i < handlers.length; i++) {\n if (!(root || handlers[i].root) || handlers[i].root === root) {\n handlers[i].handler.apply(this, args);\n }\n }\n }\n }\n\n function onClick(e) {\n e = e || window.event;\n var id = gantt.locate(e);\n var handlers = findEventHandlers(e, eventHandlers.click);\n var res = true;\n\n if (id !== null) {\n res = !gantt.checkEvent(\"onTaskClick\") || gantt.callEvent(\"onTaskClick\", [id, e]);\n } else {\n gantt.callEvent(\"onEmptyClick\", [e]);\n }\n\n if (res) {\n var default_action = callEventHandlers(handlers, e, id);\n if (!default_action) return; // GS-1025: if we don't do that, the dropdown or date select will be closed for unselected tasks\n // GS-1078: or for the built-in select inline editor\n\n switch (e.target.nodeName) {\n case \"SELECT\":\n case 'INPUT':\n return;\n } //allow task selection when the multiselect plugin is not enabled\n\n\n if (id && gantt.getTask(id) && !gantt._multiselect && gantt.config.select_task) {\n gantt.selectTask(id);\n }\n }\n }\n\n function onContextMenu(e) {\n e = e || window.event;\n var src = e.target || e.srcElement,\n taskId = gantt.locate(src),\n linkId = gantt.locate(src, gantt.config.link_attribute);\n var res = !gantt.checkEvent(\"onContextMenu\") || gantt.callEvent(\"onContextMenu\", [taskId, linkId, e]);\n\n if (!res) {\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n }\n\n return res;\n }\n\n function findEventHandlers(e, hash) {\n var trg = e.target || e.srcElement;\n var handlers = [];\n\n while (trg) {\n var css = domHelpers.getClassName(trg);\n\n if (css) {\n css = css.split(\" \");\n\n for (var i = 0; i < css.length; i++) {\n if (!css[i]) continue;\n\n if (hash[css[i]]) {\n var delegateHandlers = hash[css[i]];\n\n for (var h = 0; h < delegateHandlers.length; h++) {\n if (delegateHandlers[h].root) {\n if (!domHelpers.isChildOf(trg, delegateHandlers[h].root)) {\n continue;\n }\n }\n\n handlers.push(delegateHandlers[h].handler);\n }\n }\n }\n }\n\n trg = trg.parentNode;\n }\n\n return handlers;\n }\n\n function callEventHandlers(handlers, e, id) {\n var res = true;\n\n for (var i = 0; i < handlers.length; i++) {\n var handlerResult = handlers[i].call(gantt, e, id, e.target || e.srcElement);\n res = res && !(typeof handlerResult != \"undefined\" && handlerResult !== true);\n }\n\n return res;\n }\n\n function onDoubleClick(e) {\n e = e || window.event;\n var id = gantt.locate(e);\n var handlers = findEventHandlers(e, eventHandlers.doubleclick); // when doubleclick fired not on task, id === null\n\n var res = !gantt.checkEvent(\"onTaskDblClick\") || id === null || gantt.callEvent(\"onTaskDblClick\", [id, e]);\n\n if (res) {\n var default_action = callEventHandlers(handlers, e, id);\n if (!default_action) return;\n\n if (id !== null && gantt.getTask(id)) {\n if (res && gantt.config.details_on_dblclick && !gantt.isReadonly(id)) {\n gantt.showLightbox(id);\n }\n }\n }\n }\n\n function onMouseMove(e) {\n if (gantt.checkEvent(\"onMouseMove\")) {\n var id = gantt.locate(e);\n gantt._last_move_event = e;\n gantt.callEvent(\"onMouseMove\", [id, e]);\n }\n }\n\n function detach(eventName, className, handler, root) {\n if (eventHandlers[eventName] && eventHandlers[eventName][className]) {\n var handlers = eventHandlers[eventName];\n var elementHandlers = handlers[className];\n\n for (var i = 0; i < elementHandlers.length; i++) {\n if (elementHandlers[i].root == root) {\n elementHandlers.splice(i, 1);\n i--;\n }\n }\n\n if (!elementHandlers.length) {\n delete handlers[className];\n }\n }\n }\n\n var domEvents = gantt._createDomEventScope();\n\n function reset(node) {\n domEvents.detachAll();\n\n if (node) {\n domEvents.attach(node, \"click\", onClick);\n domEvents.attach(node, \"dblclick\", onDoubleClick);\n domEvents.attach(node, \"mousemove\", onMouseMove);\n domEvents.attach(node, \"contextmenu\", onContextMenu);\n }\n }\n\n return {\n reset: reset,\n global: function global(event, classname, handler) {\n addEventTarget(event, classname, handler, null);\n },\n delegate: addEventTarget,\n detach: detach,\n callHandler: callHandler,\n onDoubleClick: onDoubleClick,\n onMouseMove: onMouseMove,\n onContextMenu: onContextMenu,\n onClick: onClick,\n destructor: function destructor() {\n reset();\n eventHandlers = null;\n domEvents = null;\n }\n };\n };\n}(domHelpers);\n\nmodule.exports = {\n init: createMouseHandler\n};","var utils = require(\"../../utils/utils\");\n\nfunction extendSettings(store, parentSettings) {\n var own = this.$config[store];\n\n if (own) {\n if (!own.$extendedConfig) {\n own.$extendedConfig = true;\n Object.setPrototypeOf(own, parentSettings);\n }\n\n return own;\n } else {\n return parentSettings;\n }\n}\n\nvar configurable = function configurable(parentView) {\n var parentConfig, parentTemplates;\n return {\n $getConfig: function $getConfig() {\n if (!parentConfig) {\n parentConfig = parentView ? parentView.$getConfig() : this.$gantt.config;\n }\n\n if (!this.$config.config) {\n return parentConfig;\n } else {\n return extendSettings.call(this, \"config\", parentConfig);\n }\n },\n $getTemplates: function $getTemplates() {\n if (!parentTemplates) {\n parentTemplates = parentView ? parentView.$getTemplates() : this.$gantt.templates;\n }\n\n if (!this.$config.templates) {\n return parentTemplates;\n } else {\n return extendSettings.call(this, \"templates\", parentTemplates);\n }\n }\n };\n};\n\nmodule.exports = function (obj, parent) {\n utils.mixin(obj, configurable(parent));\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar utils = require(\"../../utils/utils\"),\n configurable = require(\"./configurable\");\n\nvar uiFactory = function createFactory(gantt) {\n var views = {};\n\n function ui(cell, parentView) {\n var content;\n var view = \"cell\";\n\n if (cell.view) {\n view = \"viewcell\";\n } else if (cell.resizer) {\n view = \"resizer\";\n } else if (cell.rows || cell.cols) {\n view = \"layout\";\n } else if (cell.views) {\n view = \"multiview\";\n }\n\n content = createView.call(this, view, null, cell, parentView);\n return content;\n }\n\n var createdViews = {};\n\n function createView(name, parent, config, parentView) {\n var creator = views[name];\n if (!creator || !creator.create) return false;\n\n if (name == \"resizer\" && !config.mode) {\n if (parentView.$config.cols) {\n config.mode = \"x\";\n } else {\n config.mode = \"y\";\n }\n }\n\n if (name == \"viewcell\" && config.view == \"scrollbar\" && !config.scroll) {\n if (parentView.$config.cols) {\n config.scroll = \"y\";\n } else {\n config.scroll = \"x\";\n }\n }\n\n var config = utils.copy(config);\n\n if (!config.id && !createdViews[config.view]) {\n config.id = config.view;\n }\n\n if (config.id && !config.css) {\n config.css = config.id + \"_cell\";\n }\n\n var view = new creator.create(parent, config, this, gantt);\n\n if (creator.configure) {\n creator.configure(view);\n }\n\n configurable(view, parentView);\n\n if (!view.$id) {\n view.$id = config.id || gantt.uid();\n }\n\n if (!view.$parent && _typeof(parent) == \"object\") {\n view.$parent = parent;\n }\n\n if (!view.$config) {\n view.$config = config;\n }\n\n if (createdViews[view.$id]) {\n view.$id = gantt.uid();\n }\n\n createdViews[view.$id] = view;\n return view;\n }\n\n function reset() {\n createdViews = {};\n }\n\n function register(name, viewConstructor, configure) {\n views[name] = {\n create: viewConstructor,\n configure: configure\n };\n }\n\n function getView(id) {\n return createdViews[id];\n }\n\n var factory = {\n initUI: ui,\n reset: reset,\n registerView: register,\n createView: createView,\n getView: getView\n };\n return factory;\n};\n\nmodule.exports = {\n createFactory: uiFactory\n};","var uiFactory = require(\"./ui_factory\"),\n mouseEvents = require(\"./mouse\"),\n createLayers = require(\"./gantt_layers\"),\n Cell = require(\"./layout/cell\"),\n Layout = require(\"./layout/layout\"),\n ViewLayout = require(\"./layout/view_layout\"),\n ViewCell = require(\"./layout/view_cell\"),\n Resizer = require(\"./layout/resizer_cell\"),\n Scrollbar = require(\"./layout/scrollbar_cell\"),\n Timeline = require(\"./timeline/timeline\"),\n Grid = require(\"./grid/grid\"),\n ResourceGrid = require(\"./grid/resource_grid\"),\n ResourceTimeline = require(\"./timeline/resource_timeline\"),\n ResourceHistogram = require(\"./timeline/resource_histogram\");\n\nvar gridEditorsFactory = require(\"./grid/editors/controller\");\n\nvar renderTaskBar = require(\"./render/task_bar_smart_render\"),\n renderSplitTaskBar = require(\"./render/task_split_render\"),\n renderRollupTaskBar = require(\"./render/task_rollup_render\"),\n renderTaskBg = require(\"./render/task_bg_render\"),\n renderLink = require(\"./render/link_render\"),\n gridRenderer = require(\"./render/task_grid_line_render\"),\n resourceMatrixRenderer = require(\"./render/resource_matrix_render\"),\n resourceHistogramRenderer = require(\"./render/resource_histogram_render\"),\n gridTaskRowResizerRenderer = require(\"./render/task_grid_row_resize_render\");\n\nvar mainGridInitializer = require(\"./grid/main_grid_initializer\");\n\nvar mainTimelineInitializer = require(\"./timeline/main_timeline_initializer\");\n\nvar mainLayoutInitializer = require(\"./main_layout_initializer\");\n\nfunction initUI(gantt) {\n function attachInitializer(view, initializer) {\n var ext = initializer(gantt);\n if (ext.onCreated) ext.onCreated(view);\n view.attachEvent(\"onReady\", function () {\n if (ext.onInitialized) ext.onInitialized(view);\n });\n view.attachEvent(\"onDestroy\", function () {\n if (ext.onDestroyed) ext.onDestroyed(view);\n });\n }\n\n var factory = uiFactory.createFactory(gantt);\n factory.registerView(\"cell\", Cell);\n factory.registerView(\"resizer\", Resizer);\n factory.registerView(\"scrollbar\", Scrollbar);\n factory.registerView(\"layout\", Layout, function (view) {\n var id = view.$config ? view.$config.id : null;\n\n if (id === \"main\") {\n attachInitializer(view, mainLayoutInitializer);\n }\n });\n factory.registerView(\"viewcell\", ViewCell);\n factory.registerView(\"multiview\", ViewLayout);\n factory.registerView(\"timeline\", Timeline, function (view) {\n var id = view.$config ? view.$config.id : null;\n\n if (id === \"timeline\" || view.$config.bind == \"task\") {\n attachInitializer(view, mainTimelineInitializer);\n }\n });\n factory.registerView(\"grid\", Grid, function (view) {\n var id = view.$config ? view.$config.id : null;\n\n if (id === \"grid\" || view.$config.bind == \"task\") {\n attachInitializer(view, mainGridInitializer);\n }\n });\n factory.registerView(\"resourceGrid\", ResourceGrid);\n factory.registerView(\"resourceTimeline\", ResourceTimeline);\n factory.registerView(\"resourceHistogram\", ResourceHistogram);\n var layersEngine = createLayers(gantt);\n var inlineEditors = gridEditorsFactory(gantt);\n gantt.ext.inlineEditors = inlineEditors;\n gantt.ext._inlineEditors = inlineEditors;\n inlineEditors.init(gantt);\n return {\n factory: factory,\n mouseEvents: mouseEvents.init(gantt),\n layersApi: layersEngine.init(),\n render: {\n gridLine: function gridLine() {\n return gridRenderer(gantt);\n },\n taskBg: function taskBg() {\n return renderTaskBg(gantt);\n },\n taskBar: function taskBar() {\n return renderTaskBar(gantt);\n },\n taskRollupBar: function taskRollupBar() {\n return renderRollupTaskBar(gantt);\n },\n taskSplitBar: function taskSplitBar() {\n return renderSplitTaskBar(gantt);\n },\n link: function link() {\n return renderLink(gantt);\n },\n resourceRow: function resourceRow() {\n return resourceMatrixRenderer(gantt);\n },\n resourceHistogram: function resourceHistogram() {\n return resourceHistogramRenderer(gantt);\n },\n gridTaskRowResizer: function gridTaskRowResizer() {\n return gridTaskRowResizerRenderer(gantt);\n }\n },\n layersService: {\n getDataRender: function getDataRender(name) {\n return layersEngine.getDataRender(name, gantt);\n },\n createDataRender: function createDataRender(config) {\n return layersEngine.createDataRender(config, gantt);\n }\n }\n };\n}\n\nmodule.exports = {\n init: initUI\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar utils = require(\"../../utils/utils\");\n\nvar domHelpers = require(\"./utils/dom_helpers\");\n\nmodule.exports = function (gantt) {\n var boxAttribute = \"data-dhxbox\";\n var _dhx_msg_cfg = null;\n\n function callback(config, result) {\n var usercall = config.callback;\n modalBox.hide(config.box);\n _dhx_msg_cfg = config.box = null;\n if (usercall) usercall(result);\n }\n\n function modal_key(event) {\n if (_dhx_msg_cfg) {\n var code = event.which || event.keyCode;\n var preventDefault = false;\n\n if (messageBox.keyboard) {\n if (code == 13 || code == 32) {\n // default behavior is to confirm/submit popup on space/enter\n // if browser focus is set on button element - do button click instead of default behavior\n var target = event.target || event.srcElement;\n\n if (domHelpers.getClassName(target).indexOf(\"gantt_popup_button\") > -1 && target.click) {\n target.click();\n } else {\n callback(_dhx_msg_cfg, true);\n preventDefault = true;\n }\n }\n\n if (code == 27) {\n callback(_dhx_msg_cfg, false);\n preventDefault = true;\n }\n }\n\n if (preventDefault) {\n if (event.preventDefault) {\n event.preventDefault();\n }\n\n return !(event.cancelBubble = true);\n }\n\n return;\n }\n }\n\n var eventElement = domHelpers.getRootNode(gantt.$root) || document;\n gantt.event(eventElement, \"keydown\", modal_key, true);\n\n function modality(mode) {\n if (!modality.cover) {\n modality.cover = document.createElement(\"div\"); //necessary for IE only\n\n modality.cover.onkeydown = modal_key;\n modality.cover.className = \"dhx_modal_cover\";\n document.body.appendChild(modality.cover);\n }\n\n modality.cover.style.display = mode ? \"inline-block\" : \"none\";\n }\n\n function button(text, className, result) {\n var buttonAriaAttrs = gantt._waiAria.messageButtonAttrString(text);\n\n var name = className.toLowerCase().replace(/ /g, \"_\");\n var button_css = \"gantt_\" + name + \"_button\";\n return \"
\" + text + \"
\";\n }\n\n function info(text) {\n if (!messageBox.area) {\n messageBox.area = document.createElement(\"div\");\n messageBox.area.className = \"gantt_message_area\";\n messageBox.area.style[messageBox.position] = \"5px\";\n document.body.appendChild(messageBox.area);\n }\n\n messageBox.hide(text.id);\n var message = document.createElement(\"div\");\n message.innerHTML = \"
\" + text.text + \"
\";\n message.className = \"gantt-info gantt-\" + text.type;\n\n message.onclick = function () {\n messageBox.hide(text.id);\n text = null;\n };\n\n gantt._waiAria.messageInfoAttr(message);\n\n if (messageBox.position == \"bottom\" && messageBox.area.firstChild) messageBox.area.insertBefore(message, messageBox.area.firstChild);else messageBox.area.appendChild(message);\n if (text.expire > 0) messageBox.timers[text.id] = window.setTimeout(function () {\n // GS-1213: We need that when Gantt is destroyed\n if (messageBox) messageBox.hide(text.id);\n }, text.expire);\n messageBox.pull[text.id] = message;\n message = null;\n return text.id;\n }\n\n function getFirstDefined() {\n var values = [].slice.apply(arguments, [0]);\n\n for (var i = 0; i < values.length; i++) {\n if (values[i]) {\n return values[i];\n }\n }\n }\n\n function _boxStructure(config, ok, cancel) {\n var box = document.createElement(\"div\");\n var contentId = utils.uid();\n\n gantt._waiAria.messageModalAttr(box, contentId);\n\n box.className = \" gantt_modal_box gantt-\" + config.type;\n box.setAttribute(boxAttribute, 1);\n var inner = '';\n if (config.width) box.style.width = config.width;\n if (config.height) box.style.height = config.height;\n if (config.title) inner += '
' + config.title + '
';\n inner += '
' + (config.content ? '' : config.text) + '
';\n if (ok) inner += button(getFirstDefined(config.ok, gantt.locale.labels.message_ok, \"OK\"), \"ok\", true);\n if (cancel) inner += button(getFirstDefined(config.cancel, gantt.locale.labels.message_cancel, \"Cancel\"), \"cancel\", false);\n\n if (config.buttons) {\n for (var i = 0; i < config.buttons.length; i++) {\n var btn = config.buttons[i];\n\n if (_typeof(btn) == \"object\") {\n // Support { label:\"Save\", css:\"main_button\", value:\"save\" }\n var label = btn.label;\n var css = btn.css || \"gantt_\" + btn.label.toLowerCase() + \"_button\";\n var value = btn.value || i;\n inner += button(label, css, value);\n } else {\n inner += button(btn, btn, i);\n }\n }\n }\n\n inner += '
';\n box.innerHTML = inner;\n\n if (config.content) {\n var node = config.content;\n if (typeof node == \"string\") node = document.getElementById(node);\n if (node.style.display == 'none') node.style.display = \"\";\n box.childNodes[config.title ? 1 : 0].appendChild(node);\n }\n\n box.onclick = function (event) {\n var source = event.target || event.srcElement;\n if (!source.className) source = source.parentNode;\n\n if (domHelpers.closest(source, \".gantt_popup_button\")) {\n var result = source.getAttribute(\"data-result\");\n result = result == \"true\" || (result == \"false\" ? false : result);\n callback(config, result);\n }\n };\n\n config.box = box;\n if (ok || cancel) _dhx_msg_cfg = config;\n return box;\n }\n\n function _createBox(config, ok, cancel) {\n var box = config.tagName ? config : _boxStructure(config, ok, cancel);\n if (!config.hidden) modality(true);\n document.body.appendChild(box);\n var x = Math.abs(Math.floor(((window.innerWidth || document.documentElement.offsetWidth) - box.offsetWidth) / 2));\n var y = Math.abs(Math.floor(((window.innerHeight || document.documentElement.offsetHeight) - box.offsetHeight) / 2));\n if (config.position == \"top\") box.style.top = \"-3px\";else box.style.top = y + 'px';\n box.style.left = x + 'px'; //necessary for IE only\n\n box.onkeydown = modal_key;\n modalBox.focus(box);\n if (config.hidden) modalBox.hide(box);\n gantt.callEvent(\"onMessagePopup\", [box]);\n return box;\n }\n\n function alertPopup(config) {\n return _createBox(config, true, false);\n }\n\n function confirmPopup(config) {\n return _createBox(config, true, true);\n }\n\n function boxPopup(config) {\n return _createBox(config);\n }\n\n function box_params(text, type, callback) {\n if (_typeof(text) != \"object\") {\n if (typeof type == \"function\") {\n callback = type;\n type = \"\";\n }\n\n text = {\n text: text,\n type: type,\n callback: callback\n };\n }\n\n return text;\n }\n\n function params(text, type, expire, id) {\n if (_typeof(text) != \"object\") text = {\n text: text,\n type: type,\n expire: expire,\n id: id\n };\n text.id = text.id || utils.uid();\n text.expire = text.expire || messageBox.expire;\n return text;\n }\n\n var alertBox = function alertBox() {\n var text = box_params.apply(this, arguments);\n text.type = text.type || \"confirm\";\n return alertPopup(text);\n };\n\n var confirmBox = function confirmBox() {\n var text = box_params.apply(this, arguments);\n text.type = text.type || \"alert\";\n return confirmPopup(text);\n };\n\n var modalBox = function modalBox() {\n var text = box_params.apply(this, arguments);\n text.type = text.type || \"alert\";\n return boxPopup(text);\n };\n\n modalBox.hide = function (node) {\n while (node && node.getAttribute && !node.getAttribute(boxAttribute)) {\n node = node.parentNode;\n }\n\n if (node) {\n node.parentNode.removeChild(node);\n modality(false);\n gantt.callEvent(\"onAfterMessagePopup\", [node]);\n }\n };\n\n modalBox.focus = function (node) {\n setTimeout(function () {\n var focusable = domHelpers.getFocusableNodes(node);\n\n if (focusable.length) {\n if (focusable[0].focus) focusable[0].focus();\n }\n }, 1);\n };\n\n var messageBox = function messageBox(text, type, expire, id) {\n text = params.apply(this, arguments);\n text.type = text.type || \"info\";\n var subtype = text.type.split(\"-\")[0];\n\n switch (subtype) {\n case \"alert\":\n return alertPopup(text);\n\n case \"confirm\":\n return confirmPopup(text);\n\n case \"modalbox\":\n return boxPopup(text);\n\n default:\n return info(text);\n }\n };\n\n messageBox.seed = new Date().valueOf();\n messageBox.uid = utils.uid;\n messageBox.expire = 4000;\n messageBox.keyboard = true;\n messageBox.position = \"top\";\n messageBox.pull = {};\n messageBox.timers = {};\n\n messageBox.hideAll = function () {\n for (var key in messageBox.pull) {\n messageBox.hide(key);\n }\n };\n\n messageBox.hide = function (id) {\n var obj = messageBox.pull[id];\n\n if (obj && obj.parentNode) {\n window.setTimeout(function () {\n obj.parentNode.removeChild(obj);\n obj = null;\n }, 2000);\n obj.className += \" hidden\";\n if (messageBox.timers[id]) window.clearTimeout(messageBox.timers[id]);\n delete messageBox.pull[id];\n }\n };\n\n var popups = [];\n gantt.attachEvent(\"onMessagePopup\", function (box) {\n popups.push(box);\n });\n gantt.attachEvent(\"onAfterMessagePopup\", function (box) {\n for (var i = 0; i < popups.length; i++) {\n if (popups[i] === box) {\n popups.splice(i, 1);\n i--;\n }\n }\n });\n gantt.attachEvent(\"onDestroy\", function () {\n if (modality.cover && modality.cover.parentNode) {\n modality.cover.parentNode.removeChild(modality.cover);\n }\n\n for (var i = 0; i < popups.length; i++) {\n if (popups[i].parentNode) {\n popups[i].parentNode.removeChild(popups[i]);\n }\n }\n\n popups = null;\n\n if (messageBox.area && messageBox.area.parentNode) {\n messageBox.area.parentNode.removeChild(messageBox.area);\n }\n\n messageBox = null;\n });\n return {\n alert: alertBox,\n confirm: confirmBox,\n message: messageBox,\n modalbox: modalBox\n };\n};","module.exports = function (gantt) {\n var utils = require(\"../utils/utils\");\n\n var env = require(\"../utils/env\");\n\n var isHeadless = require(\"../utils/is_headless\");\n\n if (!env.isNode) {\n var domHelpers = require(\"./ui/utils/dom_helpers\");\n\n var codeHelpers = require(\"../utils/helpers\");\n\n gantt.utils = {\n arrayFind: codeHelpers.arrayFind,\n dom: domHelpers\n };\n\n var domEvents = require(\"./ui/utils/dom_event_scope\")();\n\n gantt.event = domEvents.attach;\n gantt.eventRemove = domEvents.detach;\n gantt._eventRemoveAll = domEvents.detachAll;\n gantt._createDomEventScope = domEvents.extend;\n utils.mixin(gantt, require(\"./ui/message\")(gantt));\n\n var uiApi = require(\"./ui/index\").init(gantt);\n\n gantt.$ui = uiApi.factory;\n gantt.$ui.layers = uiApi.render;\n gantt.$mouseEvents = uiApi.mouseEvents;\n gantt.$services.setService(\"mouseEvents\", function () {\n return gantt.$mouseEvents;\n });\n gantt.mixin(gantt, uiApi.layersApi);\n\n require(\"./data_task_layers\")(gantt);\n\n gantt.$services.setService(\"layers\", function () {\n return uiApi.layersService;\n });\n\n var createLayoutFacade = require(\"./facades/layout\");\n\n gantt.mixin(gantt, createLayoutFacade());\n\n require(\"./ui/skin\")(gantt);\n\n require(\"../css/skins/skyblue\")(gantt);\n\n require(\"../css/skins/meadow\")(gantt);\n\n require(\"../css/skins/terrace\")(gantt);\n\n require(\"../css/skins/broadway\")(gantt);\n\n require(\"../css/skins/material\")(gantt);\n\n require(\"../css/skins/contrast_black\")(gantt);\n\n require(\"../css/skins/contrast_white\")(gantt);\n\n require(\"./ui/plugins\")(gantt);\n\n require(\"./ui/touch\")(gantt);\n\n require(\"./ui/lightbox\")(gantt);\n\n require(\"./ui/lightbox/lightbox_optional_time\")(gantt);\n\n require(\"./ui/wai_aria\")(gantt);\n\n gantt.locate = function (e) {\n var trg = domHelpers.getTargetNode(e); // ignore empty rows/cells of the timeline\n\n if (domHelpers.closest(trg, \".gantt_task_row\")) {\n return null;\n }\n\n var targetAttribute = arguments[1] || this.config.task_attribute;\n var node = domHelpers.locateAttribute(trg, targetAttribute);\n\n if (node) {\n return node.getAttribute(targetAttribute);\n } else {\n return null;\n }\n };\n\n gantt._locate_css = function (e, classname, strict) {\n return domHelpers.locateClassName(e, classname, strict);\n };\n\n gantt._locateHTML = function (e, attribute) {\n return domHelpers.locateAttribute(e, attribute || this.config.task_attribute);\n };\n }\n\n gantt.attachEvent(\"onParse\", function () {\n if (!isHeadless(gantt)) {\n gantt.attachEvent(\"onGanttRender\", function () {\n if (gantt.config.initial_scroll) {\n var firstTask = gantt.getTaskByIndex(0);\n var id = firstTask ? firstTask.id : gantt.config.root_id; // GS-1450. Don't scroll to the task if there is no timeline\n\n if (gantt.isTaskExists(id) && gantt.$task && gantt.utils.dom.isChildOf(gantt.$task, gantt.$container)) {\n gantt.showTask(id);\n }\n }\n }, {\n once: true\n });\n }\n });\n gantt.attachEvent(\"onBeforeGanttReady\", function () {\n if (!this.config.scroll_size) this.config.scroll_size = domHelpers.getScrollSize() || 1;\n\n if (!isHeadless(gantt)) {\n // detach listeners before clearing old DOM, possible IE errors when accessing detached nodes\n this._eventRemoveAll();\n\n this.$mouseEvents.reset();\n this.resetLightbox();\n }\n }); // GS-1261: scroll the views to the right side when RTL is enabled\n\n gantt.attachEvent(\"onGanttReady\", function () {\n if (!isHeadless(gantt) && gantt.config.rtl) {\n gantt.$layout.getCellsByType(\"viewCell\").forEach(function (cell) {\n var attachedScrollbar = cell.$config.scrollX;\n if (!attachedScrollbar) return;\n var scrollbar = gantt.$ui.getView(attachedScrollbar);\n if (scrollbar) scrollbar.scrollTo(scrollbar.$config.scrollSize, 0);\n });\n }\n }); // GS-1649: check if extensions are connected via files\n\n gantt.attachEvent(\"onGanttReady\", function () {\n if (!isHeadless(gantt)) {\n var activePlugins = gantt.plugins();\n var availablePlugins = {\n auto_scheduling: gantt.autoSchedule,\n click_drag: gantt.ext.clickDrag,\n critical_path: gantt.isCriticalTask,\n drag_timeline: gantt.ext.dragTimeline,\n export_api: gantt.exportToPDF,\n fullscreen: gantt.ext.fullscreen,\n grouping: gantt.groupBy,\n keyboard_navigation: gantt.ext.keyboardNavigation,\n marker: gantt.addMarker,\n multiselect: gantt.eachSelectedTask,\n overlay: gantt.ext.overlay,\n quick_info: gantt.templates.quick_info_content,\n tooltip: gantt.ext.tooltips,\n undo: gantt.undo\n };\n\n for (var plugin in availablePlugins) {\n if (availablePlugins[plugin] && !activePlugins[plugin]) {\n // eslint-disable-next-line no-console\n console.warn(\"You connected the '\".concat(plugin, \"' extension via an obsolete file. \\nTo fix it, you need to remove the obsolete file and connect the extension via the plugins method: https://docs.dhtmlx.com/gantt/api__gantt_plugins.html\"));\n }\n }\n }\n });\n};","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Січень\", \"Лютий\", \"Березень\", \"Квітень\", \"Травень\", \"Червень\", \"Липень\", \"Серпень\", \"Вересень\", \"Жовтень\", \"Листопад\", \"Грудень\"],\r\n\t\tmonth_short: [\"Січ\", \"Лют\", \"Бер\", \"Кві\", \"Тра\", \"Чер\", \"Лип\", \"Сер\", \"Вер\", \"Жов\", \"Лис\", \"Гру\"],\r\n\t\tday_full: [\"Неділя\", \"Понеділок\", \"Вівторок\", \"Середа\", \"Четвер\", \"П'ятниця\", \"Субота\"],\r\n\t\tday_short: [\"Нед\", \"Пон\", \"Вів\", \"Сер\", \"Чет\", \"Птн\", \"Суб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Нове завдання\",\r\n\t\ticon_save: \"Зберегти\",\r\n\t\ticon_cancel: \"Відміна\",\r\n\t\ticon_details: \"Деталі\",\r\n\t\ticon_edit: \"Редагувати\",\r\n\t\ticon_delete: \"Вилучити\",\r\n\t\tconfirm_closing: \"\", // Ваші зміни втратяться. Ви впевнені ?\r\n\t\tconfirm_deleting: \"Подія вилучиться назавжди. Ви впевнені?\",\r\n\t\tsection_description: \"Опис\",\r\n\t\tsection_time: \"Часовий проміжок\",\r\n\t\tsection_type: \"Тип\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Відміна\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n * updated by @levkar at https://github.com/DHTMLX/gantt/pull/10\r\n */\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ocak\", \"Şubat\", \"Mart\", \"Nisan\", \"Mayıs\", \"Haziran\", \"Temmuz\", \"Ağustos\", \"Eylül\", \"Ekim\", \"Kasım\", \"Aralık\"],\r\n\t\tmonth_short: [\"Oca\", \"Şub\", \"Mar\", \"Nis\", \"May\", \"Haz\", \"Tem\", \"Ağu\", \"Eyl\", \"Eki\", \"Kas\", \"Ara\"],\r\n\t\tday_full: [\"Pazar\", \"Pazartesi\", \"Salı\", \"Çarşamba\", \"Perşembe\", \"Cuma\", \"Cumartesi\"],\r\n\t\tday_short: [\"Paz\", \"Pzt\", \"Sal\", \"Çar\", \"Per\", \"Cum\", \"Cmt\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Yeni görev\",\r\n\t\ticon_save: \"Kaydet\",\r\n\t\ticon_cancel: \"İptal\",\r\n\t\ticon_details: \"Detaylar\",\r\n\t\ticon_edit: \"Düzenle\",\r\n\t\ticon_delete: \"Sil\",\r\n\t\tconfirm_closing: \"\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Görev silinecek, emin misiniz?\",\r\n\t\tsection_description: \"Açıklama\",\r\n\t\tsection_time: \"Zaman Aralığı\",\r\n\t\tsection_type: \"Tip\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Görev Adı\",\r\n\t\tcolumn_start_date: \"Başlangıç\",\r\n\t\tcolumn_duration: \"Süre\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Bağlantı\",\r\n\t\tconfirm_link_deleting: \"silinecek\",\r\n\t\tlink_start: \" (başlangıç)\",\r\n\t\tlink_end: \" (bitiş)\",\r\n\r\n\t\ttype_task: \"Görev\",\r\n\t\ttype_project: \"Proje\",\r\n\t\ttype_milestone: \"Kilometretaşı\",\r\n\r\n\r\n\t\tminutes: \"Dakika\",\r\n\t\thours: \"Saat\",\r\n\t\tdays: \"Gün\",\r\n\t\tweeks: \"Hafta\",\r\n\t\tmonths: \"Ay\",\r\n\t\tyears: \"Yıl\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Ýptal\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n\tTranslation by Peter Eriksson\r\n */\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Mars\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"Augusti\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Söndag\", \"Måndag\", \"Tisdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lördag\"],\r\n\t\tday_short: [\"Sön\", \"Mån\", \"Tis\", \"Ons\", \"Tor\", \"Fre\", \"Lör\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Ny uppgift\",\r\n\t\ticon_save: \"Spara\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detajer\",\r\n\t\ticon_edit: \"Ändra\",\r\n\t\ticon_delete: \"Ta bort\",\r\n\t\tconfirm_closing: \"\",\r\n\t\tconfirm_deleting: \"Är du säker på att du vill ta bort händelsen permanent?\",\r\n\t\tsection_description: \"Beskrivning\",\r\n\t\tsection_time: \"Tid\",\r\n\t\tsection_type: \"Typ\",\r\n\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Uppgiftsnamn\",\r\n\t\tcolumn_start_date: \"Starttid\",\r\n\t\tcolumn_duration: \"Varaktighet\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\r\n\t\tlink: \"Länk\",\r\n\t\tconfirm_link_deleting: \"kommer tas bort\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (slut)\",\r\n\t\ttype_task: \"Uppgift\",\r\n\t\ttype_project: \"Projekt\",\r\n\t\ttype_milestone: \"Milstolpe\",\r\n\r\n\t\tminutes: \"Minuter\",\r\n\t\thours: \"Timmar\",\r\n\t\tdays: \"Dagar\",\r\n\t\tweeks: \"Veckor\",\r\n\t\tmonths: \"Månader\",\r\n\t\tyears: \"År\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Avbryt\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Marec\", \"Apríl\", \"Máj\", \"Jún\", \"Júl\", \"August\", \"September\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sept\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedeľa\", \"Pondelok\", \"Utorok\", \"Streda\", \"Štvrtok\", \"Piatok\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Ut\", \"St\", \"Št\", \"Pi\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nová úloha\",\r\n\t\ticon_save: \"Uložiť\",\r\n\t\ticon_cancel: \"Späť\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Zmazať\",\r\n\t\tconfirm_closing: \"Vaše zmeny nebudú uložené. Skutočne?\", // Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Udalosť bude natrvalo vymazaná. Skutočne?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Späť\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marec\", \"April\", \"Maj\", \"Junij\", \"Julij\", \"Avgust\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Nedelja\", \"Ponedeljek\", \"Torek\", \"Sreda\", \"Četrtek\", \"Petek\", \"Sobota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Tor\", \"Sre\", \"Čet\", \"Pet\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nova naloga\",\r\n\t\ticon_save: \"Shrani\",\r\n\t\ticon_cancel: \"Prekliči\",\r\n\t\ticon_details: \"Podrobnosti\",\r\n\t\ticon_edit: \"Uredi\",\r\n\t\ticon_delete: \"Izbriši\",\r\n\t\tconfirm_closing: \"\", // Spremembe ne bodo shranjene. Želite nadaljevati ?\r\n\t\tconfirm_deleting: \"Dogodek bo izbrisan. Želite nadaljevati?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Časovni okvir\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Prekliči\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Январь\", \"Февраль\", \"Март\", \"Апрель\", \"Maй\", \"Июнь\", \"Июль\", \"Август\", \"Сентябрь\", \"Oктябрь\", \"Ноябрь\", \"Декабрь\"],\r\n\t\tmonth_short: [\"Янв\", \"Фев\", \"Maр\", \"Aпр\", \"Maй\", \"Июн\", \"Июл\", \"Aвг\", \"Сен\", \"Окт\", \"Ноя\", \"Дек\"],\r\n\t\tday_full: [\"Воскресенье\", \"Понедельник\", \"Вторник\", \"Среда\", \"Четверг\", \"Пятница\", \"Суббота\"],\r\n\t\tday_short: [\"Вс\", \"Пн\", \"Вт\", \"Ср\", \"Чт\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Новое задание\",\r\n\t\ticon_save: \"Сохранить\",\r\n\t\ticon_cancel: \"Отменить\",\r\n\t\ticon_details: \"Детали\",\r\n\t\ticon_edit: \"Изменить\",\r\n\t\ticon_delete: \"Удалить\",\r\n\t\tconfirm_closing: \"\", // Ваши изменения будут потеряны, продолжить?\r\n\t\tconfirm_deleting: \"Событие будет удалено безвозвратно, продолжить?\",\r\n\t\tsection_description: \"Описание\",\r\n\t\tsection_time: \"Период времени\",\r\n\t\tsection_type: \"Тип\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"ИСР\",\r\n\t\tcolumn_text: \"Задача\",\r\n\t\tcolumn_start_date: \"Начало\",\r\n\t\tcolumn_duration: \"Длительность\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Связь\",\r\n\t\tconfirm_link_deleting: \"будет удалена\",\r\n\t\tlink_start: \" (начало)\",\r\n\t\tlink_end: \" (конец)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Минута\",\r\n\t\thours: \"Час\",\r\n\t\tdays: \"День\",\r\n\t\tweeks: \"Неделя\",\r\n\t\tmonths: \"Месяц\",\r\n\t\tyears: \"Год\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Отменить\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"начните вводить слово для фильтрации\",\r\n\t\tresources_filter_label: \"спрятать не установленные\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n\tTraducere de Ovidiu Lixandru: http://www.madball.ro\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ianuarie\", \"Februarie\", \"Martie\", \"Aprilie\", \"Mai\", \"Iunie\", \"Iulie\", \"August\", \"Septembrie\", \"Octombrie\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Ian\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Iun\", \"Iul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Duminica\", \"Luni\", \"Marti\", \"Miercuri\", \"Joi\", \"Vineri\", \"Sambata\"],\r\n\t\tday_short: [\"Du\", \"Lu\", \"Ma\", \"Mi\", \"Jo\", \"Vi\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Sarcina noua\",\r\n\t\ticon_save: \"Salveaza\",\r\n\t\ticon_cancel: \"Anuleaza\",\r\n\t\ticon_details: \"Detalii\",\r\n\t\ticon_edit: \"Editeaza\",\r\n\t\ticon_delete: \"Sterge\",\r\n\t\tconfirm_closing: \"Schimbarile nu vor fi salvate, esti sigur?\",// Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Evenimentul va fi sters permanent, esti sigur?\",\r\n\t\tsection_description: \"Descriere\",\r\n\t\tsection_time: \"Interval\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Anuleaza\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n\r\n TRANSLATION BY MATTHEUS PIROVANI RORIZ GONЗALVES\r\n\r\n mattheusroriz@hotmail.com / mattheus.pirovani@gmail.com /\r\n\r\n www.atrixian.com.br\r\n\r\n\r\n Updated by Jorge Albernaz Martins\r\n\r\n jorgefox@hotmail.com\r\n\r\n www.redfox.inf.br\r\n\r\n JorgeFox\r\n\r\n*/\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janeiro\", \"Fevereiro\", \"Março\", \"Abril\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"],\r\n\t\tmonth_short: [\"Jan\", \"Fev\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Out\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Domingo\", \"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Seg\", \"Ter\", \"Qua\", \"Qui\", \"Sex\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nova tarefa\",\r\n\t\ticon_save: \"Salvar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalhes\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Excluir\",\r\n\t\tconfirm_closing: \"\",// Suas alterações serão perdidas, confirme?\r\n\t\tconfirm_deleting: \"As tarefas serão excluidas permanentemente, confirme?\",\r\n\t\tsection_description: \"Descrição\",\r\n\t\tsection_time: \"Período\",\r\n\t\tsection_type: \"Tipo\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"EAP\",\r\n\t\tcolumn_text: \"Nome tarefa\",\r\n\t\tcolumn_start_date: \"Data início\",\r\n\t\tcolumn_duration: \"Duração\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"Será excluído!\",\r\n\t\tlink_start: \" (início)\",\r\n\t\tlink_end: \" (fim)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Projeto\",\r\n\t\ttype_milestone: \"Marco\",\r\n\r\n\r\n\t\tminutes: \"Minutos\",\r\n\t\thours: \"Horas\",\r\n\t\tdays: \"Dias\",\r\n\t\tweeks: \"Semanas\",\r\n\t\tmonths: \"Meses\",\r\n\t\tyears: \"Anos\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancelar\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Restrição\",\r\n\t\tconstraint_type: \"Tipo Restrição\",\r\n\t\tconstraint_date: \"Data restrição\",\r\n\t\tasap: \"Mais breve possível\",\r\n\t\talap: \"Mais tarde possível\",\r\n\t\tsnet: \"Não começar antes de\",\r\n\t\tsnlt: \"Não começar depois de\",\r\n\t\tfnet: \"Não terminar antes de\",\r\n\t\tfnlt: \"Não terminar depois de\",\r\n\t\tmso: \"Precisa começar em\",\r\n\t\tmfo: \"Precisa terminar em\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"Tipo de filtros\",\r\n\t\tresources_filter_label: \"Ocultar vazios\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Styczeń\", \"Luty\", \"Marzec\", \"Kwiecień\", \"Maj\", \"Czerwiec\", \"Lipiec\", \"Sierpień\", \"Wrzesień\", \"Październik\", \"Listopad\", \"Grudzień\"],\r\n\t\tmonth_short: [\"Sty\", \"Lut\", \"Mar\", \"Kwi\", \"Maj\", \"Cze\", \"Lip\", \"Sie\", \"Wrz\", \"Paź\", \"Lis\", \"Gru\"],\r\n\t\tday_full: [\"Niedziela\", \"Poniedziałek\", \"Wtorek\", \"Środa\", \"Czwartek\", \"Piątek\", \"Sobota\"],\r\n\t\tday_short: [\"Nie\", \"Pon\", \"Wto\", \"Śro\", \"Czw\", \"Pią\", \"Sob\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nowe zadanie\",\r\n\t\ticon_save: \"Zapisz\",\r\n\t\ticon_cancel: \"Anuluj\",\r\n\t\ticon_details: \"Szczegóły\",\r\n\t\ticon_edit: \"Edytuj\",\r\n\t\ticon_delete: \"Usuń\",\r\n\t\tconfirm_closing: \"\", // Zmiany zostaną usunięte, jesteś pewien?\r\n\t\tconfirm_deleting: \"Zdarzenie zostanie usunięte na zawsze, kontynuować?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Okres czasu\",\r\n\t\tsection_type: \"Typ\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Nazwa zadania\",\r\n\t\tcolumn_start_date: \"Początek\",\r\n\t\tcolumn_duration: \"Czas trwania\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"zostanie usunięty\",\r\n\t\tlink_start: \" (początek)\",\r\n\t\tlink_end: \" (koniec)\",\r\n\r\n\t\ttype_task: \"Zadanie\",\r\n\t\ttype_project: \"Projekt\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minuty\",\r\n\t\thours: \"Godziny\",\r\n\t\tdays: \"Dni\",\r\n\t\tweeks: \"Tydzień\",\r\n\t\tmonths: \"Miesiące\",\r\n\t\tyears: \"Lata\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Anuluj\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Ny oppgave\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Endre\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"Endringer blir ikke lagret, er du sikker?\", // Endringer blir ikke lagret, er du sikker?\r\n\t\tconfirm_deleting: \"Oppføringen vil bli slettet, er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Avbryt\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maart\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Augustus\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\r\n\t\tday_short: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nieuwe taak\",\r\n\t\ticon_save: \"Opslaan\",\r\n\t\ticon_cancel: \"Annuleren\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Bewerken\",\r\n\t\ticon_delete: \"Verwijderen\",\r\n\t\tconfirm_closing: \"\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Item zal permanent worden verwijderd, doorgaan?\",\r\n\t\tsection_description: \"Beschrijving\",\r\n\t\tsection_time: \"Tijd periode\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Taak omschrijving\",\r\n\t\tcolumn_start_date: \"Startdatum\",\r\n\t\tcolumn_duration: \"Duur\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Koppeling\",\r\n\t\tconfirm_link_deleting: \"zal worden verwijderd\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (eind)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"minuten\",\r\n\t\thours: \"uren\",\r\n\t\tdays: \"dagen\",\r\n\t\tweeks: \"weken\",\r\n\t\tmonths: \"maanden\",\r\n\t\tyears: \"jaren\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Annuleren\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Mon\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Ny oppgave\",\r\n\t\ticon_save: \"Lagre\",\r\n\t\ticon_cancel: \"Avbryt\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Rediger\",\r\n\t\ticon_delete: \"Slett\",\r\n\t\tconfirm_closing: \"\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Hendelsen vil bli slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Avbryt\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","export default class LocaleManager{\r\n\tprivate _locales:{[key:string]: IGanttLocale };\r\n\r\n\tconstructor(config: {[key:string]: IGanttLocale }){\r\n\t\tthis._locales = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._locales[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddLocale = (name: string, locale: IGanttLocale) => {\r\n\t\tthis._locales[name] = locale;\r\n\t}\r\n\r\n\tgetLocale = (name: string): IGanttLocale => {\r\n\t\treturn this._locales[name];\r\n\t}\r\n}","/*\r\n\tTranslated by cjkim@dbvalley.com\r\n*/\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"1월\", \"2월\", \"3월\", \"4월\", \"5월\", \"6월\", \"7월\", \"8월\", \"9월\", \"10월\", \"11월\", \"12월\"],\r\n\t\tmonth_short: [\"1월\", \"2월\", \"3월\", \"4월\", \"5월\", \"6월\", \"7월\", \"8월\", \"9월\", \"10월\", \"11월\", \"12월\"],\r\n\t\tday_full: [\"일요일\", \"월요일\", \"화요일\", \"수요일\", \"목요일\", \"금요일\", \"토요일\"],\r\n\t\tday_short: [\"일\", \"월\", \"화\", \"수\", \"목\", \"금\", \"토\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"이름없는 작업\",\r\n\t\ticon_save: \"저장\",\r\n\t\ticon_cancel: \"취소\",\r\n\t\ticon_details: \"세부 사항\",\r\n\t\ticon_edit: \"수정\",\r\n\t\ticon_delete: \"삭제\",\r\n\t\tconfirm_closing: \"\",\r\n\t\tconfirm_deleting: \"작업을 삭제하시겠습니까?\",\r\n\t\tsection_description: \"설명\",\r\n\t\tsection_time: \"기간\",\r\n\t\tsection_type: \"Type\",\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"작업명\",\r\n\t\tcolumn_start_date: \"시작일\",\r\n\t\tcolumn_duration: \"기간\",\r\n\t\tcolumn_add: \"\",\r\n\t\tlink: \"전제\",\r\n\t\tconfirm_link_deleting: \"삭제 하시겠습니까?\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\t\ttype_task: \"작업\",\r\n\t\ttype_project: \"프로젝트\",\r\n\t\ttype_milestone: \"마일스톤\",\r\n\t\tminutes: \"분\",\r\n\t\thours: \"시간\",\r\n\t\tdays: \"일\",\r\n\t\tweeks: \"주\",\r\n\t\tmonths: \"달\",\r\n\t\tyears: \"년\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"취소\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n Translation by Genexus Japan Inc.\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"日曜日\", \"月曜日\", \"火曜日\", \"水曜日\", \"木曜日\", \"金曜日\", \"土曜日\"],\r\n\t\tday_short: [\"日\", \"月\", \"火\", \"水\", \"木\", \"金\", \"土\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"新しい仕事\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"キャンセル\",\r\n\t\ticon_details: \"詳細\",\r\n\t\ticon_edit: \"編集\",\r\n\t\ticon_delete: \"削除\",\r\n\t\tconfirm_closing: \"\", // 変更が取り消されます、宜しいですか?\r\n\t\tconfirm_deleting: \"イベント完全に削除されます、宜しいですか?\",\r\n\t\tsection_description: \"デスクリプション\",\r\n\t\tsection_time: \"期間\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"キャンセル\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n Update 29/12/2015:\r\n New labels translation by ARCANGELI CLAUDIO\r\n\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gennaio\", \"Febbraio\", \"Marzo\", \"Aprile\", \"Maggio\", \"Giugno\", \"Luglio\", \"Agosto\", \"Settembre\", \"Ottobre\", \"Novembre\", \"Dicembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Apr\", \"Mag\", \"Giu\", \"Lug\", \"Ago\", \"Set\", \"Ott\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domenica\", \"Lunedì\", \"Martedì\", \"Mercoledì\", \"Giovedì\", \"Venerdì\", \"Sabato\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mer\", \"Gio\", \"Ven\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nuovo compito\",\r\n\t\ticon_save: \"Salva\",\r\n\t\ticon_cancel: \"Chiudi\",\r\n\t\ticon_details: \"Dettagli\",\r\n\t\ticon_edit: \"Modifica\",\r\n\t\ticon_delete: \"Elimina\",\r\n\t\tconfirm_closing: \"\",// \"Sei sicuro di confermare la chiusura?\",\r\n\t\tconfirm_deleting: \"Sei sicuro di confermare l'eliminazione?\",\r\n\t\tsection_description: \"Descrizione\",\r\n\t\tsection_time: \"Periodo di tempo\",\r\n\t\tsection_type: \"Tipo\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Nome Attività\",\r\n\t\tcolumn_start_date: \"Inizio\",\r\n\t\tcolumn_duration: \"Durata\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"sarà eliminato\",\r\n\t\tlink_start: \" (inizio)\",\r\n\t\tlink_end: \" (fine)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minuti\",\r\n\t\thours: \"Ore\",\r\n\t\tdays: \"Giorni\",\r\n\t\tweeks: \"Settimane\",\r\n\t\tmonths: \"Mesi\",\r\n\t\tyears: \"Anni\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Chiudi\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januari\", \"Februari\", \"Maret\", \"April\", \"Mei\", \"Juni\", \"Juli\", \"Agustus\", \"September\", \"Oktober\", \"November\", \"Desember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Ags\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Minggu\", \"Senin\", \"Selasa\", \"Rabu\", \"Kamis\", \"Jumat\", \"Sabtu\"],\r\n\t\tday_short: [\"Ming\", \"Sen\", \"Sel\", \"Rab\", \"Kam\", \"Jum\", \"Sab\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Tugas baru\",\r\n\t\ticon_save: \"Simpan\",\r\n\t\ticon_cancel: \"Batal\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Hapus\",\r\n\t\tconfirm_closing: \"\", /* Perubahan tidak akan disimpan ? */\r\n\t\tconfirm_deleting: \"Acara akan dihapus\",\r\n\t\tsection_description: \"Keterangan\",\r\n\t\tsection_time: \"Periode\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Batal\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Január\", \"Február\", \"Március\", \"Április\", \"Május\", \"Június\", \"Július\", \"Augusztus\", \"Szeptember\", \"Október\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Már\", \"Ápr\", \"Máj\", \"Jún\", \"Júl\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Vasárnap\", \"Hétfõ\", \"Kedd\", \"Szerda\", \"Csütörtök\", \"Péntek\", \"szombat\"],\r\n\t\tday_short: [\"Va\", \"Hé\", \"Ke\", \"Sze\", \"Csü\", \"Pé\", \"Szo\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Új feladat\",\r\n\t\ticon_save: \"Mentés\",\r\n\t\ticon_cancel: \"Mégse\",\r\n\t\ticon_details: \"Részletek\",\r\n\t\ticon_edit: \"Szerkesztés\",\r\n\t\ticon_delete: \"Törlés\",\r\n\t\tconfirm_closing: \"\", // A változások elvesznek, biztosan folytatja? \"\r\n\t\tconfirm_deleting: \"Az esemény törölve lesz, biztosan folytatja?\",\r\n\t\tsection_description: \"Leírás\",\r\n\t\tsection_time: \"Idõszak\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Mégse\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n Translation by Davor\r\n http://docs.dhtmlx.com/gantt/desktop__localization.html#comment-2569116291\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Siječanj\", \"Veljača\", \"Ožujak\", \"Travanj\", \"Svibanj\", \"Lipanj\", \"Srpanj\", \"Kolovoz\", \"Rujan\", \"Listopad\", \"Studeni\", \"Prosinac\"],\r\n\t\tmonth_short: [\"Sij\", \"Velj\", \"Ožu\", \"Tra\", \"Svi\", \"Lip\", \"Srp\", \"Kol\", \"Ruj\", \"Lis\", \"Stu\", \"Pro\"],\r\n\t\tday_full: [\"Nedjelja\", \"Ponedjeljak\", \"Utorak\", \"Srijeda\", \"Četvrtak\", \"Petak\", \"Subota\"],\r\n\t\tday_short: [\"Ned\", \"Pon\", \"Uto\", \"Sri\", \"Čet\", \"Pet\", \"Sub\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Novi Zadatak\",\r\n\t\ticon_save: \"Spremi\",\r\n\t\ticon_cancel: \"Odustani\",\r\n\t\ticon_details: \"Detalji\",\r\n\t\ticon_edit: \"Izmjeni\",\r\n\t\ticon_delete: \"Obriši\",\r\n\t\tconfirm_closing: \"\",\r\n\t\tconfirm_deleting: \"Zadatak će biti trajno izbrisan, jeste li sigurni?\",\r\n\t\tsection_description: \"Opis\",\r\n\t\tsection_time: \"Vremenski Period\",\r\n\t\tsection_type: \"Tip\",\r\n\r\n\t\t/* grid columns */\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Naziv Zadatka\",\r\n\t\tcolumn_start_date: \"Početno Vrijeme\",\r\n\t\tcolumn_duration: \"Trajanje\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Poveznica\",\r\n\t\tconfirm_link_deleting: \"će biti izbrisan\",\r\n\t\tlink_start: \" (početak)\",\r\n\t\tlink_end: \" (kraj)\",\r\n\r\n\t\ttype_task: \"Zadatak\",\r\n\t\ttype_project: \"Projekt\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\t\tminutes: \"Minute\",\r\n\t\thours: \"Sati\",\r\n\t\tdays: \"Dani\",\r\n\t\tweeks: \"Tjedni\",\r\n\t\tmonths: \"Mjeseci\",\r\n\t\tyears: \"Godine\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Odustani\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"ינואר\", \"פברואר\", \"מרץ\", \"אפריל\", \"מאי\", \"יוני\", \"יולי\", \"אוגוסט\", \"ספטמבר\", \"אוקטובר\", \"נובמבר\", \"דצמבר\"],\r\n\t\tmonth_short: [\"ינו\", \"פבר\", \"מרץ\", \"אפר\", \"מאי\", \"יונ\", \"יול\", \"אוג\", \"ספט\", \"אוק\", \"נוב\", \"דצמ\"],\r\n\t\tday_full: [\"ראשון\", \"שני\", \"שלישי\", \"רביעי\", \"חמישי\", \"שישי\", \"שבת\"],\r\n\t\tday_short: [\"א\", \"ב\", \"ג\", \"ד\", \"ה\", \"ו\", \"ש\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"משימה חדש\",\r\n\t\ticon_save: \"שמור\",\r\n\t\ticon_cancel: \"בטל\",\r\n\t\ticon_details: \"פרטים\",\r\n\t\ticon_edit: \"ערוך\",\r\n\t\ticon_delete: \"מחק\",\r\n\t\tconfirm_closing: \"\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"ארוע ימחק סופית.להמשיך?\",\r\n\t\tsection_description: \"הסבר\",\r\n\t\tsection_time: \"תקופה\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"בטל\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Janvier\", \"Février\", \"Mars\", \"Avril\", \"Mai\", \"Juin\", \"Juillet\", \"Août\", \"Septembre\", \"Octobre\", \"Novembre\", \"Décembre\"],\r\n\t\tmonth_short: [\"Jan\", \"Fév\", \"Mar\", \"Avr\", \"Mai\", \"Juin\", \"Juil\", \"Aoû\", \"Sep\", \"Oct\", \"Nov\", \"Déc\"],\r\n\t\tday_full: [\"Dimanche\", \"Lundi\", \"Mardi\", \"Mercredi\", \"Jeudi\", \"Vendredi\", \"Samedi\"],\r\n\t\tday_short: [\"Dim\", \"Lun\", \"Mar\", \"Mer\", \"Jeu\", \"Ven\", \"Sam\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nouvelle tâche\",\r\n\t\ticon_save: \"Enregistrer\",\r\n\t\ticon_cancel: \"Annuler\",\r\n\t\ticon_details: \"Détails\",\r\n\t\ticon_edit: \"Modifier\",\r\n\t\ticon_delete: \"Effacer\",\r\n\t\tconfirm_closing: \"\",// Vos modifications seront perdus, êtes-vous sûr ?\r\n\t\tconfirm_deleting: \"L'événement sera effacé sans appel, êtes-vous sûr ?\",\r\n\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Période\",\r\n\t\tsection_type: \"Type\",\r\n\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"OTP\",\r\n\t\tcolumn_text: \"Nom de la tâche\",\r\n\t\tcolumn_start_date: \"Date initiale\",\r\n\t\tcolumn_duration: \"Durée\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Le lien\",\r\n\t\tconfirm_link_deleting: \"sera supprimé\",\r\n\t\tlink_start: \"(début)\",\r\n\t\tlink_end: \"(fin)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Heures\",\r\n\t\tdays: \"Jours\",\r\n\t\tweeks: \"Semaines\",\r\n\t\tmonths: \"Mois\",\r\n\t\tyears: \"Années\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Annuler\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Tammikuu\", \"Helmikuu\", \"Maaliskuu\", \"Huhtikuu\", \"Toukokuu\", \"Kesäkuu\", \"Heinäkuu\", \"Elokuu\", \"Syyskuu\", \"Lokakuu\", \"Marraskuu\", \"Joulukuu\"],\r\n\t\tmonth_short: [\"Tam\", \"Hel\", \"Maa\", \"Huh\", \"Tou\", \"Kes\", \"Hei\", \"Elo\", \"Syy\", \"Lok\", \"Mar\", \"Jou\"],\r\n\t\tday_full: [\"Sunnuntai\", \"Maanantai\", \"Tiistai\", \"Keskiviikko\", \"Torstai\", \"Perjantai\", \"Lauantai\"],\r\n\t\tday_short: [\"Su\", \"Ma\", \"Ti\", \"Ke\", \"To\", \"Pe\", \"La\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Uusi tehtävä\",\r\n\t\ticon_save: \"Tallenna\",\r\n\t\ticon_cancel: \"Peru\",\r\n\t\ticon_details: \"Tiedot\",\r\n\t\ticon_edit: \"Muokkaa\",\r\n\t\ticon_delete: \"Poista\",\r\n\t\tconfirm_closing: \"\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Haluatko varmasti poistaa tapahtuman?\",\r\n\t\tsection_description: \"Kuvaus\",\r\n\t\tsection_time: \"Aikajakso\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Peru\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n dhtmlxGantt Persian (Farsi, fa_IR) locale by Mohammad Shokri http://slashsbin.com/\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\r\n\t\t\t\"ژانویه\",\r\n\t\t\t\"فوریه\",\r\n\t\t\t\"مارس\",\r\n\t\t\t\"آوریل\",\r\n\t\t\t\"مه\",\r\n\t\t\t\"ژوئن\",\r\n\t\t\t\"ژوئیه\",\r\n\t\t\t\"اوت\",\r\n\t\t\t\"سپتامبر\",\r\n\t\t\t\"اکتبر\",\r\n\t\t\t\"نوامبر\",\r\n\t\t\t\"دسامبر\"\r\n\t\t],\r\n\t\tmonth_short: [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"],\r\n\t\tday_full: [\r\n\t\t\t\"يکشنبه\",\r\n\t\t\t\"دوشنبه\",\r\n\t\t\t\"سه‌شنبه\",\r\n\t\t\t\"چهارشنبه\",\r\n\t\t\t\"پنجشنبه\",\r\n\t\t\t\"جمعه\",\r\n\t\t\t\"شنبه\"\r\n\t\t],\r\n\t\tday_short: [\r\n\t\t\t\"ی\",\r\n\t\t\t\"د\",\r\n\t\t\t\"س\",\r\n\t\t\t\"چ\",\r\n\t\t\t\"پ\",\r\n\t\t\t\"ج\",\r\n\t\t\t\"ش\"\r\n\t\t]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"وظیفه جدید\",\r\n\t\ticon_save: \"ذخیره\",\r\n\t\ticon_cancel: \"لغو\",\r\n\t\ticon_details: \"جزییات\",\r\n\t\ticon_edit: \"ویرایش\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"تغییرات شما ازدست خواهد رفت، آیا مطمئن هستید؟\",\r\n\t\tconfirm_deleting: \"این مورد برای همیشه حذف خواهد شد، آیا مطمئن هستید؟\",\r\n\t\tsection_description: \"توضیحات\",\r\n\t\tsection_time: \"مدت زمان\",\r\n\t\tsection_type: \"نوع\",\r\n\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"عنوان\",\r\n\t\tcolumn_start_date: \"زمان شروع\",\r\n\t\tcolumn_duration: \"مدت\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"ارتباط\",\r\n\t\tconfirm_link_deleting: \"حذف خواهد شد\",\r\n\t\tlink_start: \" (آغاز)\",\r\n\t\tlink_end: \" (پایان)\",\r\n\r\n\t\ttype_task: \"وظیفه\",\r\n\t\ttype_project: \"پروژه\",\r\n\t\ttype_milestone: \"نگارش\",\r\n\r\n\t\tminutes: \"دقایق\",\r\n\t\thours: \"ساعات\",\r\n\t\tdays: \"روزها\",\r\n\t\tweeks: \"هفته\",\r\n\t\tmonths: \"ماه‌ها\",\r\n\t\tyears: \"سال‌ها\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"تایید\",\r\n\t\tmessage_cancel: \"لغو\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n @Autor Manuel Fernandez Panzuela - www.mfernandez.es\r\n\r\n Update 30/10/2015:\r\n Translation of new labels by Jorge Macias\r\n https://disqus.com/by/disqus_bTuZk1voC7/\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Enero\", \"Febrero\", \"Marzo\", \"Abril\", \"Mayo\", \"Junio\", \"Julio\", \"Agosto\", \"Septiembre\", \"Octubre\", \"Noviembre\", \"Diciembre\"],\r\n\t\tmonth_short: [\"Ene\", \"Feb\", \"Mar\", \"Abr\", \"May\", \"Jun\", \"Jul\", \"Ago\", \"Sep\", \"Oct\", \"Nov\", \"Dic\"],\r\n\t\tday_full: [\"Domingo\", \"Lunes\", \"Martes\", \"Miércoles\", \"Jueves\", \"Viernes\", \"Sábado\"],\r\n\t\tday_short: [\"Dom\", \"Lun\", \"Mar\", \"Mié\", \"Jue\", \"Vie\", \"Sáb\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nueva tarea\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancelar\",\r\n\t\ticon_details: \"Detalles\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Eliminar\",\r\n\t\tconfirm_closing: \"\", // \"Sus cambios se perderán, continuar ?\"\r\n\t\tconfirm_deleting: \"El evento se borrará definitivamente, ¿continuar?\",\r\n\t\tsection_description: \"Descripción\",\r\n\t\tsection_time: \"Período\",\r\n\t\tsection_type: \"Tipo\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"EDT\",\r\n\t\tcolumn_text: \"Tarea\",\r\n\t\tcolumn_start_date: \"Inicio\",\r\n\t\tcolumn_duration: \"Duración\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Enlace\",\r\n\t\tconfirm_link_deleting: \"será borrada\",\r\n\t\tlink_start: \" (inicio)\",\r\n\t\tlink_end: \" (fin)\",\r\n\r\n\t\ttype_task: \"Tarea\",\r\n\t\ttype_project: \"Proyecto\",\r\n\t\ttype_milestone: \"Hito\",\r\n\r\n\r\n\t\tminutes: \"Minutos\",\r\n\t\thours: \"Horas\",\r\n\t\tdays: \"Días\",\r\n\t\tweeks: \"Semanas\",\r\n\t\tmonths: \"Meses\",\r\n\t\tyears: \"Años\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancelar\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\r\n\t\tday_short: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"New task\",\r\n\t\ticon_save: \"Save\",\r\n\t\ticon_cancel: \"Cancel\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Edit\",\r\n\t\ticon_delete: \"Delete\",\r\n\t\tconfirm_closing: \"\",// Your changes will be lost, are you sure?\r\n\t\tconfirm_deleting: \"Task will be deleted permanently, are you sure?\",\r\n\t\tsection_description: \"Description\",\r\n\t\tsection_time: \"Time period\",\r\n\t\tsection_type: \"Type\",\r\n\r\n\t\t/* grid columns */\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Ιανουάριος\", \"Φεβρουάριος\", \"Μάρτιος\", \"Απρίλιος\", \"Μάϊος\", \"Ιούνιος\", \"Ιούλιος\", \"Αύγουστος\", \"Σεπτέμβριος\", \"Οκτώβριος\", \"Νοέμβριος\", \"Δεκέμβριος\"],\r\n\t\tmonth_short: [\"ΙΑΝ\", \"ΦΕΒ\", \"ΜΑΡ\", \"ΑΠΡ\", \"ΜΑΙ\", \"ΙΟΥΝ\", \"ΙΟΥΛ\", \"ΑΥΓ\", \"ΣΕΠ\", \"ΟΚΤ\", \"ΝΟΕ\", \"ΔΕΚ\"],\r\n\t\tday_full: [\"Κυριακή\", \"Δευτέρα\", \"Τρίτη\", \"Τετάρτη\", \"Πέμπτη\", \"Παρασκευή\", \"Κυριακή\"],\r\n\t\tday_short: [\"ΚΥ\", \"ΔΕ\", \"ΤΡ\", \"ΤΕ\", \"ΠΕ\", \"ΠΑ\", \"ΣΑ\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Νέα εργασία\",\r\n\t\ticon_save: \"Αποθήκευση\",\r\n\t\ticon_cancel: \"Άκυρο\",\r\n\t\ticon_details: \"Λεπτομέρειες\",\r\n\t\ticon_edit: \"Επεξεργασία\",\r\n\t\ticon_delete: \"Διαγραφή\",\r\n\t\tconfirm_closing: \"\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Το έργο θα διαγραφεί οριστικά. Θέλετε να συνεχίσετε;\",\r\n\t\tsection_description: \"Περιγραφή\",\r\n\t\tsection_time: \"Χρονική περίοδος\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Άκυρο\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\" Januar\", \" Februar\", \" März \", \" April\", \" Mai\", \" Juni\", \" Juli\", \" August\", \" September \", \" Oktober\", \" November \", \" Dezember\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mär\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dez\"],\r\n\t\tday_full: [\"Sonntag\", \"Montag\", \"Dienstag\", \" Mittwoch\", \" Donnerstag\", \"Freitag\", \"Samstag\"],\r\n\t\tday_short: [\"So\", \"Mo\", \"Di\", \"Mi\", \"Do\", \"Fr\", \"Sa\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Neue Aufgabe\",\r\n\t\ticon_save: \"Speichern\",\r\n\t\ticon_cancel: \"Abbrechen\",\r\n\t\ticon_details: \"Details\",\r\n\t\ticon_edit: \"Ändern\",\r\n\t\ticon_delete: \"Löschen\",\r\n\t\tconfirm_closing: \"\", // \"Ihre Veränderungen werden verloren sein, wollen Sie ergänzen? \"\r\n\t\tconfirm_deleting: \"Der Eintrag wird gelöscht\",\r\n\t\tsection_description: \"Beschreibung\",\r\n\t\tsection_time: \"Zeitspanne\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"PSP\",\r\n\t\tcolumn_text: \"Task-Namen\",\r\n\t\tcolumn_start_date: \"Startzeit\",\r\n\t\tcolumn_duration: \"Dauer\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"werden gelöscht\",\r\n\t\tlink_start: \"(starten)\",\r\n\t\tlink_end: \"(ende)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minuten\",\r\n\t\thours: \"Stunden\",\r\n\t\tdays: \"Tage\",\r\n\t\tweeks: \"Wochen\",\r\n\t\tmonths: \"Monate\",\r\n\t\tyears: \"Jahre\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Abbrechen\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Regel\",\r\n\t\tconstraint_type: \"Regel\",\r\n\t\tconstraint_date: \"Regel - Datum\",\r\n\t\tasap: \"So bald wie möglich\",\r\n\t\talap: \"So spät wie möglich\",\r\n\t\tsnet: \"Beginn nicht vor\",\r\n\t\tsnlt: \"Beginn nicht später als\",\r\n\t\tfnet: \"Fertigstellung nicht vor\",\r\n\t\tfnlt: \"Fertigstellung nicht später als\",\r\n\t\tmso: \"Muss beginnen am\",\r\n\t\tmfo: \"Muss fertig sein am\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\"],\r\n\t\tmonth_short: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Maj\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\r\n\t\tday_full: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\"],\r\n\t\tday_short: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Ny opgave\",\r\n\t\ticon_save: \"Gem\",\r\n\t\ticon_cancel: \"Fortryd\",\r\n\t\ticon_details: \"Detaljer\",\r\n\t\ticon_edit: \"Tilret\",\r\n\t\ticon_delete: \"Slet\",\r\n\t\tconfirm_closing: \"Dine rettelser vil gå tabt.. Er dy sikker?\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"Bigivenheden vil blive slettet permanent. Er du sikker?\",\r\n\t\tsection_description: \"Beskrivelse\",\r\n\t\tsection_time: \"Tidsperiode\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Fortryd\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Leden\", \"Únor\", \"Březen\", \"Duben\", \"Květen\", \"Červen\", \"Červenec\", \"Srpen\", \"Září\", \"Říjen\", \"Listopad\", \"Prosinec\"],\r\n\t\tmonth_short: [\"Led\", \"Ún\", \"Bře\", \"Dub\", \"Kvě\", \"Čer\", \"Čec\", \"Srp\", \"Září\", \"Říj\", \"List\", \"Pro\"],\r\n\t\tday_full: [\"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"],\r\n\t\tday_short: [\"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nová práce\",\r\n\t\ticon_save: \"Uložit\",\r\n\t\ticon_cancel: \"Zpět\",\r\n\t\ticon_details: \"Detail\",\r\n\t\ticon_edit: \"Edituj\",\r\n\t\ticon_delete: \"Smazat\",\r\n\t\tconfirm_closing: \"\", // Vaše změny budou ztraceny, opravdu ?\r\n\t\tconfirm_deleting: \"Událost bude trvale smazána, opravdu?\",\r\n\t\tsection_description: \"Poznámky\",\r\n\t\tsection_time: \"Doba platnosti\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Zpět\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\nTranslation by FreezeSoul\r\n\r\nUpdate 26/10/2015:\r\nTranslation of new labels by zwh8800\r\n https://github.com/DHTMLX/gantt/pull/7\r\n\r\n*/\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"一月\", \"二月\", \"三月\", \"四月\", \"五月\", \"六月\", \"七月\", \"八月\", \"九月\", \"十月\", \"十一月\", \"十二月\"],\r\n\t\tmonth_short: [\"1月\", \"2月\", \"3月\", \"4月\", \"5月\", \"6月\", \"7月\", \"8月\", \"9月\", \"10月\", \"11月\", \"12月\"],\r\n\t\tday_full: [\"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\"],\r\n\t\tday_short: [\"日\", \"一\", \"二\", \"三\", \"四\", \"五\", \"六\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"新任務\",\r\n\t\ticon_save: \"保存\",\r\n\t\ticon_cancel: \"关闭\",\r\n\t\ticon_details: \"详细\",\r\n\t\ticon_edit: \"编辑\",\r\n\t\ticon_delete: \"删除\",\r\n\t\tconfirm_closing: \"请确认是否撤销修改!\", // Your changes will be lost, are your sure?\r\n\t\tconfirm_deleting: \"是否删除日程?\",\r\n\t\tsection_description: \"描述\",\r\n\t\tsection_time: \"时间范围\",\r\n\t\tsection_type: \"类型\",\r\n\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"工作分解结构\",\r\n\t\tcolumn_text: \"任务名\",\r\n\t\tcolumn_start_date: \"开始时间\",\r\n\t\tcolumn_duration: \"持续时间\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\r\n\t\tlink: \"关联\",\r\n\t\tconfirm_link_deleting: \"将被删除\",\r\n\t\tlink_start: \" (开始)\",\r\n\t\tlink_end: \" (结束)\",\r\n\r\n\t\ttype_task: \"任务\",\r\n\t\ttype_project: \"项目\",\r\n\t\ttype_milestone: \"里程碑\",\r\n\r\n\t\tminutes: \"分钟\",\r\n\t\thours: \"小时\",\r\n\t\tdays: \"天\",\r\n\t\tweeks: \"周\",\r\n\t\tmonths: \"月\",\r\n\t\tyears: \"年\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"关闭\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","/*\r\n @Traducido por Vicente Adria Bohigues - vicenteadria@hotmail.com\r\n */\r\n\r\nconst locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Gener\", \"Febrer\", \"Març\", \"Abril\", \"Maig\", \"Juny\", \"Juliol\", \"Agost\", \"Setembre\", \"Octubre\", \"Novembre\", \"Desembre\"],\r\n\t\tmonth_short: [\"Gen\", \"Feb\", \"Mar\", \"Abr\", \"Mai\", \"Jun\", \"Jul\", \"Ago\", \"Set\", \"Oct\", \"Nov\", \"Des\"],\r\n\t\tday_full: [\"Diumenge\", \"Dilluns\", \"Dimarts\", \"Dimecres\", \"Dijous\", \"Divendres\", \"Dissabte\"],\r\n\t\tday_short: [\"Dg\", \"Dl\", \"Dm\", \"Dc\", \"Dj\", \"Dv\", \"Ds\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Nova tasca\",\r\n\t\ticon_save: \"Guardar\",\r\n\t\ticon_cancel: \"Cancel·lar\",\r\n\t\ticon_details: \"Detalls\",\r\n\t\ticon_edit: \"Editar\",\r\n\t\ticon_delete: \"Esborrar\",\r\n\t\tconfirm_closing: \"\", // \"Els seus canvis es perdràn, continuar ?\"\r\n\t\tconfirm_deleting: \"L'esdeveniment s'esborrarà definitivament, continuar ?\",\r\n\t\tsection_description: \"Descripció\",\r\n\t\tsection_time: \"Periode de temps\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Cancel·lar\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"Студзень\", \"Люты\", \"Сакавік\", \"Красавік\", \"Maй\", \"Чэрвень\", \"Ліпень\", \"Жнівень\", \"Верасень\", \"Кастрычнік\", \"Лістапад\", \"Снежань\"],\r\n\t\tmonth_short: [\"Студз\", \"Лют\", \"Сак\", \"Крас\", \"Maй\", \"Чэр\", \"Ліп\", \"Жнів\", \"Вер\", \"Каст\", \"Ліст\", \"Снеж\"],\r\n\t\tday_full: [\"Нядзеля\", \"Панядзелак\", \"Аўторак\", \"Серада\", \"Чацвер\", \"Пятніца\", \"Субота\"],\r\n\t\tday_short: [\"Нд\", \"Пн\", \"Аўт\", \"Ср\", \"Чцв\", \"Пт\", \"Сб\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"Новае заданне\",\r\n\t\ticon_save: \"Захаваць\",\r\n\t\ticon_cancel: \"Адмяніць\",\r\n\t\ticon_details: \"Дэталі\",\r\n\t\ticon_edit: \"Змяніць\",\r\n\t\ticon_delete: \"Выдаліць\",\r\n\t\tconfirm_closing: \"\", // Унесеныя змены будуць страчаны, працягнуць?\r\n\t\tconfirm_deleting: \"Падзея будзе выдалена незваротна, працягнуць?\",\r\n\t\tsection_description: \"Апісанне\",\r\n\t\tsection_time: \"Перыяд часу\",\r\n\t\tsection_type: \"Тып\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"ІСР\",\r\n\t\tcolumn_text: \"Задача\",\r\n\t\tcolumn_start_date: \"Пачатак\",\r\n\t\tcolumn_duration: \"Працяг\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Сувязь\",\r\n\t\tconfirm_link_deleting: \"будзе выдалена\",\r\n\t\tlink_start: \"(пачатак)\",\r\n\t\tlink_end: \"(канец)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\r\n\t\tminutes: \"Хвiлiна\",\r\n\t\thours: \"Гадзiна\",\r\n\t\tdays: \"Дзень\",\r\n\t\tweeks: \"Тыдзень\",\r\n\t\tmonths: \"Месяц\",\r\n\t\tyears: \"Год\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"Адмяніць\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","const locale: IGanttLocale = {\r\n\tdate: {\r\n\t\tmonth_full: [\"كانون الثاني\", \"شباط\", \"آذار\", \"نيسان\", \"أيار\", \"حزيران\", \"تموز\", \"آب\", \"أيلول\", \"تشرين الأول\", \"تشرين الثاني\", \"كانون الأول\"],\r\n\t\tmonth_short: [\"يناير\", \"فبراير\", \"مارس\", \"أبريل\", \"مايو\", \"يونيو\", \"يوليو\", \"أغسطس\", \"سبتمبر\", \"أكتوبر\", \"نوفمبر\", \"ديسمبر\"],\r\n\t\tday_full: [\"الأحد\", \"الأثنين\", \"ألثلاثاء\", \"الأربعاء\", \"ألحميس\", \"ألجمعة\", \"السبت\"],\r\n\t\tday_short: [\"احد\", \"اثنين\", \"ثلاثاء\", \"اربعاء\", \"خميس\", \"جمعة\", \"سبت\"]\r\n\t},\r\n\tlabels: {\r\n\t\tnew_task: \"مهمة جديد\",\r\n\t\ticon_save: \"اخزن\",\r\n\t\ticon_cancel: \"الغاء\",\r\n\t\ticon_details: \"تفاصيل\",\r\n\t\ticon_edit: \"تحرير\",\r\n\t\ticon_delete: \"حذف\",\r\n\t\tconfirm_closing: \"التغييرات سوف تضيع, هل انت متأكد؟\", // Your changes will be lost, are your sure ?\r\n\t\tconfirm_deleting: \"الحدث سيتم حذفها نهائيا ، هل أنت متأكد؟\",\r\n\t\tsection_description: \"الوصف\",\r\n\t\tsection_time: \"الفترة الزمنية\",\r\n\t\tsection_type: \"Type\",\r\n\t\t/* grid columns */\r\n\r\n\t\tcolumn_wbs: \"WBS\",\r\n\t\tcolumn_text: \"Task name\",\r\n\t\tcolumn_start_date: \"Start time\",\r\n\t\tcolumn_duration: \"Duration\",\r\n\t\tcolumn_add: \"\",\r\n\r\n\t\t/* link confirmation */\r\n\t\tlink: \"Link\",\r\n\t\tconfirm_link_deleting: \"will be deleted\",\r\n\t\tlink_start: \" (start)\",\r\n\t\tlink_end: \" (end)\",\r\n\r\n\t\ttype_task: \"Task\",\r\n\t\ttype_project: \"Project\",\r\n\t\ttype_milestone: \"Milestone\",\r\n\r\n\t\tminutes: \"Minutes\",\r\n\t\thours: \"Hours\",\r\n\t\tdays: \"Days\",\r\n\t\tweeks: \"Week\",\r\n\t\tmonths: \"Months\",\r\n\t\tyears: \"Years\",\r\n\r\n\t\t/* message popup */\r\n\t\tmessage_ok: \"OK\",\r\n\t\tmessage_cancel: \"الغاء\",\r\n\r\n\t\t/* constraints */\r\n\t\tsection_constraint: \"Constraint\",\r\n\t\tconstraint_type: \"Constraint type\",\r\n\t\tconstraint_date: \"Constraint date\",\r\n\t\tasap: \"As Soon As Possible\",\r\n\t\talap: \"As Late As Possible\",\r\n\t\tsnet: \"Start No Earlier Than\",\r\n\t\tsnlt: \"Start No Later Than\",\r\n\t\tfnet: \"Finish No Earlier Than\",\r\n\t\tfnlt: \"Finish No Later Than\",\r\n\t\tmso: \"Must Start On\",\r\n\t\tmfo: \"Must Finish On\",\r\n\r\n\t\t/* resource control */\r\n\t\tresources_filter_placeholder: \"type to filter\",\r\n\t\tresources_filter_label: \"hide empty\",\r\n\r\n\t\t/* empty state screen */\r\n\t\tempty_state_text_link: \"Click here\",\r\n\t\tempty_state_text_description: \"to create your first task\"\r\n\t}\r\n};\r\n\r\nexport default locale;\r\n","import ar from \"./locale_ar\";\r\nimport be from \"./locale_be\";\r\nimport ca from \"./locale_ca\";\r\nimport cn from \"./locale_cn\";\r\nimport cs from \"./locale_cs\";\r\nimport da from \"./locale_da\";\r\nimport de from \"./locale_de\";\r\nimport el from \"./locale_el\";\r\nimport en from \"./locale_en\";\r\nimport es from \"./locale_es\";\r\nimport fa from \"./locale_fa\";\r\nimport fi from \"./locale_fi\";\r\nimport fr from \"./locale_fr\";\r\nimport he from \"./locale_he\";\r\nimport hr from \"./locale_hr\";\r\nimport hu from \"./locale_hu\";\r\nimport id from \"./locale_id\";\r\nimport it from \"./locale_it\";\r\nimport jp from \"./locale_jp\";\r\nimport kr from \"./locale_kr\";\r\n\r\nimport LocaleManager from \"./locale_manager\";\r\n\r\nimport nb from \"./locale_nb\";\r\nimport nl from \"./locale_nl\";\r\nimport no from \"./locale_no\";\r\nimport pl from \"./locale_pl\";\r\nimport pt from \"./locale_pt\";\r\nimport ro from \"./locale_ro\";\r\nimport ru from \"./locale_ru\";\r\nimport si from \"./locale_si\";\r\nimport sk from \"./locale_sk\";\r\nimport sv from \"./locale_sv\";\r\nimport tr from \"./locale_tr\";\r\nimport ua from \"./locale_ua\";\r\n\r\nexport default function(){\r\n\treturn new LocaleManager({\r\n\t\ten,\r\n\t\tar,\r\n\t\tbe,\r\n\t\tca,\r\n\t\tcn,\r\n\t\tcs,\r\n\t\tda,\r\n\t\tde,\r\n\t\tel,\r\n\t\tes,\r\n\t\tfa,\r\n\t\tfi,\r\n\t\tfr,\r\n\t\the,\r\n\t\thr,\r\n\t\thu,\r\n\t\tid,\r\n\t\tit,\r\n\t\tjp,\r\n\t\tkr,\r\n\t\tnb,\r\n\t\tnl,\r\n\t\tno,\r\n\t\tpl,\r\n\t\tpt,\r\n\t\tro,\r\n\t\tru,\r\n\t\tsi,\r\n\t\tsk,\r\n\t\tsv,\r\n\t\ttr,\r\n\t\tua\r\n\t});\r\n}","// all builds except for evaluation version get this mockup\r\n// the evaluation build gets actual codes\r\nexport default () => {};","function extend(gantt) {\n gantt.destructor = function () {\n this.clearAll();\n this.callEvent(\"onDestroy\", []);\n\n if (this.$root) {\n delete this.$root.gantt;\n }\n\n if (this._eventRemoveAll) {\n this._eventRemoveAll();\n }\n\n if (this.$layout) {\n this.$layout.destructor();\n }\n\n if (this.resetLightbox) {\n this.resetLightbox();\n }\n\n if (this._dp && this._dp.destructor) {\n this._dp.destructor();\n }\n\n this.$services.destructor(); // detachAllEvents should be called last, because in components may be attached events\n\n this.detachAllEvents();\n\n for (var i in this) {\n if (i.indexOf(\"$\") === 0) {\n delete this[i];\n }\n }\n\n this.$destroyed = true;\n };\n}\n\nmodule.exports = extend;","/*\r\n \tasserts will be removed in final code, so you can place them anythere\r\n\twithout caring about performance impacts\r\n*/\nmodule.exports = function (gantt) {\n return function assert(check, message) {\n if (!check) {\n if (gantt.config.show_errors && gantt.callEvent(\"onError\", [message]) !== false) {\n if (gantt.message) {\n gantt.message({\n type: \"error\",\n text: message,\n expire: -1\n });\n } else {\n // eslint-disable-next-line\n console.log(message);\n } // eslint-disable-next-line no-debugger\n\n\n debugger;\n }\n }\n };\n};","function addResizeListener(gantt) {\n var containerStyles = window.getComputedStyle(gantt.$root);\n\n if (containerStyles.getPropertyValue(\"position\") == \"static\") {\n gantt.$root.style.position = \"relative\";\n }\n\n var resizeWatcher = document.createElement('iframe');\n resizeWatcher.className = \"gantt_container_resize_watcher\";\n resizeWatcher.tabIndex = -1;\n\n if (gantt.config.wai_aria_attributes) {\n resizeWatcher.setAttribute(\"role\", \"none\");\n resizeWatcher.setAttribute(\"aria-hidden\", true);\n }\n\n var salesforce_environment = !!window[\"Sfdc\"] || !!window[\"$A\"] || window[\"Aura\"];\n\n if (salesforce_environment) {\n gantt.config.container_resize_method = \"timeout\";\n } // in some environments (namely, in SalesForce) iframe.contentWindow is not available\n\n\n gantt.$root.appendChild(resizeWatcher);\n\n if (resizeWatcher.contentWindow) {\n listenWindowResize(gantt, resizeWatcher.contentWindow);\n } else {\n // if so - ditch the iframe and fallback to listening the main window resize\n gantt.$root.removeChild(resizeWatcher);\n listenWindowResize(gantt, window);\n }\n}\n\nfunction listenWindowResize(gantt, window) {\n var resizeTimeout = gantt.config.container_resize_timeout || 20;\n var resizeDelay;\n var previousSize = getContainerSize(gantt);\n\n if (gantt.config.container_resize_method == \"timeout\") {\n lowlevelResizeWatcher();\n } else {\n try {\n gantt.event(window, \"resize\", function () {\n if (gantt.$scrollbarRepaint) {\n gantt.$scrollbarRepaint = null;\n } else {\n // GS-2140. Don't repaint Gantt if it has the same sizes\n var currentSize = getContainerSize(gantt);\n\n if (previousSize.x == currentSize.x && previousSize.y == currentSize.y) {\n return;\n }\n\n previousSize = currentSize;\n repaintGantt();\n }\n });\n } catch (e) {\n lowlevelResizeWatcher();\n }\n }\n\n function repaintGantt() {\n clearTimeout(resizeDelay);\n resizeDelay = setTimeout(function () {\n if (!gantt.$destroyed) {\n gantt.render();\n }\n }, resizeTimeout);\n }\n\n var previousHeight = gantt.$root.offsetHeight;\n var previousWidth = gantt.$root.offsetWidth;\n\n function lowlevelResizeWatcher() {\n if (gantt.$root.offsetHeight != previousHeight || gantt.$root.offsetWidth != previousWidth) {\n repaintGantt();\n }\n\n previousHeight = gantt.$root.offsetHeight;\n previousWidth = gantt.$root.offsetWidth;\n setTimeout(lowlevelResizeWatcher, resizeTimeout);\n }\n}\n\nfunction getContainerSize(gantt) {\n return {\n x: gantt.$root.offsetWidth,\n y: gantt.$root.offsetHeight\n };\n}\n\nmodule.exports = addResizeListener;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar domHelpers = require(\"./ui/utils/dom_helpers\"),\n helpers = require(\"../utils/helpers\");\n\nvar isHeadless = require(\"../utils/is_headless\");\n\nvar addResizeListener = require(\"./ui/resize_listener\");\n\nmodule.exports = function (gantt) {\n var calculateScaleRange = require(\"./gantt_data_range\");\n\n gantt.assert = require(\"./common/assert\")(gantt);\n\n function isHTMLElement(node) {\n try {\n node.cloneNode(false);\n } catch (e) {\n return false;\n }\n\n return true;\n }\n\n var invalidContainerMessage = \"Invalid value of the first argument of `gantt.init`. Supported values: HTMLElement, String (element id).\" + \"This error means that either invalid object is passed into `gantt.init` or that the element with the specified ID doesn't exist on the page when `gantt.init` is called.\";\n\n function validateNode(node) {\n if (!node || typeof node == 'string' && document.getElementById(node)) return true;\n if (isHTMLElement(node)) return true;\n gantt.assert(false, invalidContainerMessage);\n throw new Error(invalidContainerMessage);\n } //initial initialization\n\n\n gantt.init = function (node, from, to) {\n if (gantt.env.isNode) {\n node = null; // for the nodejs version\n } else {\n validateNode(node); // for the web version\n }\n\n if (from && to) {\n this.config.start_date = this._min_date = new Date(from);\n this.config.end_date = this._max_date = new Date(to);\n }\n\n this.date.init(); //can be called only once\n\n this.init = function (node) {\n if (gantt.env.isNode) {\n node = null; // for the nodejs version\n } else {\n validateNode(node); // for the web version\n }\n\n if (this.$container && this.$container.parentNode) {\n this.$container.parentNode.removeChild(this.$container);\n this.$container = null;\n }\n\n if (this.$layout) {\n this.$layout.clear();\n }\n\n this._reinit(node);\n };\n\n this._reinit(node);\n };\n\n gantt._quickRefresh = function (code) {\n var stores = this._getDatastores.call(this);\n\n for (var i = 0; i < stores.length; i++) {\n stores[i]._quick_refresh = true;\n }\n\n code();\n\n for (var i = 0; i < stores.length; i++) {\n stores[i]._quick_refresh = false;\n }\n };\n\n var dropLayout = function dropLayout() {\n if (this._clearTaskLayers) {\n this._clearTaskLayers();\n }\n\n if (this._clearLinkLayers) {\n this._clearLinkLayers();\n }\n\n if (this.$layout) {\n this.$layout.destructor();\n this.$layout = null;\n this.$ui.reset();\n }\n }.bind(gantt);\n\n var rebuildLayout = function rebuildLayout() {\n if (isHeadless(gantt)) {\n return;\n }\n\n this.$root.innerHTML = \"\";\n this.$root.gantt = this;\n calculateScaleRange(this);\n this.config.layout.id = \"main\";\n this.$layout = this.$ui.createView(\"layout\", this.$root, this.config.layout);\n this.$layout.attachEvent(\"onBeforeResize\", function () {\n var storeNames = gantt.$services.getService(\"datastores\");\n\n for (var i = 0; i < storeNames.length; i++) {\n gantt.getDatastore(storeNames[i]).filter();\n\n if (gantt.$data.tasksStore._skipTaskRecalculation) {\n // do not repaint items, they will be repainted later in the onStoreUpdate event\n if (gantt.$data.tasksStore._skipTaskRecalculation != \"lightbox\") {\n gantt.$data.tasksStore._skipTaskRecalculation = false;\n }\n } else {\n gantt.getDatastore(storeNames[i]).callEvent(\"onBeforeRefreshAll\", []);\n }\n }\n });\n this.$layout.attachEvent(\"onResize\", function () {\n gantt._quickRefresh(function () {\n gantt.refreshData();\n });\n });\n this.callEvent(\"onGanttLayoutReady\", []);\n this.$layout.render();\n this.$container = this.$layout.$container.firstChild;\n addResizeListener(this);\n }.bind(gantt);\n\n gantt.resetLayout = function () {\n dropLayout();\n rebuildLayout();\n this.render();\n };\n\n gantt._reinit = function (node) {\n this.callEvent(\"onBeforeGanttReady\", []);\n\n this._update_flags();\n\n var config = this.$services.getService(\"templateLoader\");\n config.initTemplates(this);\n dropLayout();\n this.$root = null;\n\n if (node) {\n this.$root = domHelpers.toNode(node);\n rebuildLayout();\n this.$mouseEvents.reset(this.$root);\n }\n\n this.callEvent(\"onTemplatesReady\", []);\n this.callEvent(\"onGanttReady\", []);\n this.render();\n };\n\n gantt.$click = {\n buttons: {\n \"edit\": function edit(id) {\n if (gantt.isReadonly(gantt.getTask(id))) {\n return;\n }\n\n gantt.showLightbox(id);\n },\n \"delete\": function _delete(id) {\n var task = gantt.getTask(id);\n\n if (gantt.isReadonly(task)) {\n return;\n }\n\n var question = gantt.locale.labels.confirm_deleting;\n var title = gantt.locale.labels.confirm_deleting_title;\n\n gantt._simple_confirm(question, title, function () {\n if (!gantt.isTaskExists(id)) {\n gantt.hideLightbox();\n return;\n }\n\n if (task.$new) {\n // GS-2170. Do not recalculate the indexes and dates of other tasks\n // as they will be recalculated in the `refreshData`\n gantt.$data.tasksStore._skipTaskRecalculation = \"lightbox\";\n gantt.silent(function () {\n gantt.deleteTask(id, true);\n });\n gantt.$data.tasksStore._skipTaskRecalculation = false;\n gantt.refreshData();\n } else {\n gantt.$data.tasksStore._skipTaskRecalculation = true;\n gantt.deleteTask(id);\n }\n\n gantt.hideLightbox();\n });\n }\n }\n }; //renders self\n\n gantt.render = function () {\n this.callEvent(\"onBeforeGanttRender\", []);\n var visibleDate;\n\n if (!isHeadless(gantt)) {\n if (!this.config.sort && this._sort) {\n this._sort = undefined;\n }\n\n if (this.$root) {\n if (this.config.rtl) {\n this.$root.classList.add(\"gantt_rtl\");\n this.$root.firstChild.classList.add(\"gantt_rtl\"); // GS-1499\n } else {\n this.$root.classList.remove(\"gantt_rtl\");\n this.$root.firstChild.classList.remove(\"gantt_rtl\"); // GS-1499\n }\n }\n\n var pos = this.getScrollState();\n var posX = pos ? pos.x : 0;\n\n if (this._getHorizontalScrollbar()) {\n var scrollbar = this._getHorizontalScrollbar();\n\n posX = scrollbar.$config.codeScrollLeft || posX || 0;\n }\n\n visibleDate = null;\n\n if (posX) {\n visibleDate = gantt.dateFromPos(posX + this.config.task_scroll_offset);\n }\n }\n\n calculateScaleRange(this);\n\n if (!isHeadless(gantt)) {\n this.$layout.$config.autosize = this.config.autosize;\n var preserveScroll = this.config.preserve_scroll;\n this.config.preserve_scroll = false; // prevent scrolling from layout resize, scroll will be called here later on\n\n this.$layout.resize();\n this.config.preserve_scroll = preserveScroll;\n\n if (this.config.preserve_scroll && pos) {\n // GS-1640: We need pos.y, otherwise part of the timeline won't be rendered if the scrollbar disappeared\n if (posX || pos.y) {\n var new_pos = gantt.getScrollState();\n var new_date = gantt.dateFromPos(new_pos.x);\n\n if (!(+visibleDate == +new_date && new_pos.y == pos.y)) {\n var posX = null;\n var posY = null;\n\n if (visibleDate) {\n var posX = Math.max(gantt.posFromDate(visibleDate) - gantt.config.task_scroll_offset, 0);\n }\n\n if (pos.y) {\n posY = pos.y;\n }\n\n gantt.scrollTo(posX, posY);\n }\n } // GS-1640: We need to reset the scroll position for the grid if the scrollbar disappeared and\n // the grid and timeline have different scrollbars\n\n\n var gridCell = gantt.$ui.getView(\"grid\");\n\n if (gridCell) {\n var attachedScrollbar = gridCell.$config.scrollY;\n var verticalScrollbar = gantt.$ui.getView(attachedScrollbar);\n\n if (verticalScrollbar) {\n var scrollbarNodeVisible = gantt.utils.dom.isChildOf(verticalScrollbar.$view, gantt.$container);\n\n if (!scrollbarNodeVisible) {\n gridCell.scrollTo(undefined, 0);\n }\n }\n }\n }\n } else {\n gantt.refreshData();\n }\n\n this.callEvent(\"onGanttRender\", []);\n }; //TODO: add layout.resize method that wouldn't trigger data repaint\n\n\n gantt.setSizes = gantt.render;\n\n gantt.getTaskRowNode = function (id) {\n var els = this.$grid_data.childNodes;\n var attribute = this.config.task_attribute;\n\n for (var i = 0; i < els.length; i++) {\n if (els[i].getAttribute) {\n var value = els[i].getAttribute(attribute);\n if (value == id) return els[i];\n }\n }\n\n return null;\n };\n\n gantt.changeLightboxType = function (type) {\n if (this.getLightboxType() == type) return true;\n\n gantt._silent_redraw_lightbox(type);\n };\n\n gantt._get_link_type = function (from_start, to_start) {\n var type = null;\n\n if (from_start && to_start) {\n type = gantt.config.links.start_to_start;\n } else if (!from_start && to_start) {\n type = gantt.config.links.finish_to_start;\n } else if (!from_start && !to_start) {\n type = gantt.config.links.finish_to_finish;\n } else if (from_start && !to_start) {\n type = gantt.config.links.start_to_finish;\n }\n\n return type;\n };\n\n gantt.isLinkAllowed = function (from, to, from_start, to_start) {\n var link = null;\n\n if (_typeof(from) == \"object\") {\n link = from;\n } else {\n link = {\n source: from,\n target: to,\n type: this._get_link_type(from_start, to_start)\n };\n }\n\n if (!link) return false;\n if (!(link.source && link.target && link.type)) return false;\n if (link.source == link.target) return false;\n var res = true; //any custom rules\n\n if (this.checkEvent(\"onLinkValidation\")) res = this.callEvent(\"onLinkValidation\", [link]);\n return res;\n };\n\n gantt._correct_dst_change = function (date, prevOffset, step, unit) {\n var time_unit = helpers.getSecondsInUnit(unit) * step;\n\n if (time_unit > 60 * 60 && time_unit < 60 * 60 * 24) {\n //correct dst change only if current unit is more than one hour and less than day (days have own checking), e.g. 12h\n var offsetChanged = date.getTimezoneOffset() - prevOffset;\n\n if (offsetChanged) {\n date = gantt.date.add(date, offsetChanged, \"minute\");\n }\n }\n\n return date;\n };\n\n gantt.isSplitTask = function (task) {\n gantt.assert(task && task instanceof Object, \"Invalid argument task=\" + task + \" of gantt.isSplitTask. Task object was expected\");\n return this.$data.tasksStore._isSplitItem(task);\n };\n\n gantt._is_icon_open_click = function (e) {\n if (!e) return false;\n var target = e.target || e.srcElement;\n if (!(target && target.className)) return false;\n var className = domHelpers.getClassName(target);\n if (className.indexOf(\"gantt_tree_icon\") !== -1 && (className.indexOf(\"gantt_close\") !== -1 || className.indexOf(\"gantt_open\") !== -1)) return true;\n return false;\n };\n};","/*\r\n reuse results of functions that can be recalculated during rendering\r\n greatly increases the rendering speed when critical path enabled\r\n Sample - 94_dev/critical_path.html\r\n\r\n */\nmodule.exports = function (gantt) {\n gantt._cached_functions = {\n cache: {},\n mode: false,\n critical_path_mode: false,\n wrap_methods: function wrap_methods(methods, object) {\n if (object._prefetch_originals) {\n for (var i in object._prefetch_originals) {\n object[i] = object._prefetch_originals[i];\n }\n }\n\n object._prefetch_originals = {};\n\n for (var i = 0; i < methods.length; i++) {\n this.prefetch(methods[i], object);\n }\n },\n prefetch: function prefetch(methodname, host) {\n var original = host[methodname];\n\n if (original) {\n var optimizer = this;\n host._prefetch_originals[methodname] = original;\n\n host[methodname] = function get_prefetched_value() {\n var argumentsArray = new Array(arguments.length);\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n argumentsArray[i] = arguments[i];\n }\n\n if (optimizer.active) {\n var args = optimizer.get_arguments_hash(Array.prototype.slice.call(argumentsArray));\n\n if (!optimizer.cache[methodname]) {\n optimizer.cache[methodname] = {};\n }\n\n var cached_values = optimizer.cache[methodname];\n\n if (optimizer.has_cached_value(cached_values, args)) {\n return optimizer.get_cached_value(cached_values, args);\n } else {\n var value = original.apply(this, argumentsArray);\n optimizer.cache_value(cached_values, args, value);\n return value;\n }\n }\n\n return original.apply(this, argumentsArray);\n };\n }\n\n return original;\n },\n cache_value: function cache_value(cache, arguments_hash, value) {\n if (this.is_date(value)) value = new Date(value);\n cache[arguments_hash] = value;\n },\n has_cached_value: function has_cached_value(cache, arguments_hash) {\n return cache.hasOwnProperty(arguments_hash);\n },\n get_cached_value: function get_cached_value(cache, arguments_hash) {\n var data = cache[arguments_hash]; //for cached dates - return copy\n\n if (this.is_date(data)) {\n data = new Date(data);\n }\n\n return data;\n },\n is_date: function is_date(value) {\n return value && value.getUTCDate;\n },\n get_arguments_hash: function get_arguments_hash(args) {\n var values = [];\n\n for (var i = 0; i < args.length; i++) {\n values.push(this.stringify_argument(args[i]));\n }\n\n return \"(\" + values.join(\";\") + \")\";\n },\n stringify_argument: function stringify_argument(value) {\n //expecting task or link, or any other data entries, dates and primitive values\n var ret = \"\";\n\n if (value.id) {\n ret = value.id;\n } else if (this.is_date(value)) {\n ret = value.valueOf();\n } else {\n ret = value;\n }\n\n return ret + \"\";\n },\n activate: function activate() {\n this.clear();\n this.active = true;\n },\n deactivate: function deactivate() {\n this.clear();\n this.active = false;\n },\n clear: function clear() {\n this.cache = {};\n },\n setup: function setup(gantt) {\n var override_gantt = [];\n var gantt_methods = ['_isProjectEnd', '_getProjectEnd', '_getSlack'];\n\n if (this.mode == 'auto') {\n if (gantt.config.highlight_critical_path) {\n override_gantt = gantt_methods;\n }\n } else if (this.mode === true) {\n override_gantt = gantt_methods;\n }\n\n this.wrap_methods(override_gantt, gantt);\n },\n update_if_changed: function update_if_changed(gantt) {\n var changed = this.critical_path_mode != gantt.config.highlight_critical_path || this.mode !== gantt.config.optimize_render;\n\n if (changed) {\n this.critical_path_mode = gantt.config.highlight_critical_path;\n this.mode = gantt.config.optimize_render;\n this.setup(gantt);\n }\n }\n };\n\n function activate() {\n gantt._cached_functions.update_if_changed(gantt);\n\n if (!gantt._cached_functions.active) {\n gantt._cached_functions.activate();\n }\n\n return true;\n }\n\n gantt.attachEvent(\"onBeforeGanttRender\", activate);\n gantt.attachEvent(\"onBeforeDataRender\", activate);\n gantt.attachEvent(\"onBeforeSmartRender\", function () {\n activate();\n });\n gantt.attachEvent(\"onBeforeParse\", activate);\n gantt.attachEvent(\"onDataRender\", function () {\n gantt._cached_functions.deactivate();\n });\n var deactivTimeout = null;\n gantt.attachEvent(\"onSmartRender\", function () {\n if (deactivTimeout) clearTimeout(deactivTimeout);\n deactivTimeout = setTimeout(function () {\n gantt._cached_functions.deactivate();\n }, 1000);\n });\n gantt.attachEvent(\"onBeforeGanttReady\", function () {\n gantt._cached_functions.update_if_changed(gantt);\n\n return true;\n });\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nmodule.exports = function (gantt) {\n gantt.getTaskType = function (type) {\n var checkType = type;\n\n if (type && _typeof(type) == \"object\") {\n checkType = type.type;\n }\n\n for (var i in this.config.types) {\n if (this.config.types[i] == checkType) {\n return checkType;\n }\n }\n\n return gantt.config.types.task;\n };\n};","// all builds except for evaluation version get this mockup\r\n// the evaluation build gets actual codes\r\nexport default () => {};","var helpers = require(\"../utils/helpers\");\n\nmodule.exports = function (gantt) {\n gantt.isUnscheduledTask = function (task) {\n gantt.assert(task && task instanceof Object, \"Invalid argument task=\" + task + \" of gantt.isUnscheduledTask. Task object was expected\");\n return !!task.unscheduled || !task.start_date;\n };\n\n gantt._isAllowedUnscheduledTask = function (task) {\n return !!(task.unscheduled && gantt.config.show_unscheduled);\n };\n\n gantt._isTaskInTimelineLimits = function (task) {\n var taskStart = task.start_date ? task.start_date.valueOf() : null;\n var taskEnd = task.end_date ? task.end_date.valueOf() : null;\n return !!(taskStart && taskEnd && taskStart <= this._max_date.valueOf() && taskEnd >= this._min_date.valueOf());\n };\n\n gantt.isTaskVisible = function (id) {\n if (!this.isTaskExists(id)) {\n return false;\n }\n\n var task = this.getTask(id);\n\n if (!(this._isAllowedUnscheduledTask(task) || this._isTaskInTimelineLimits(task))) {\n return false;\n }\n\n return !!(this.getGlobalTaskIndex(id) >= 0);\n };\n\n gantt._getProjectEnd = function () {\n if (gantt.config.project_end) {\n return gantt.config.project_end;\n } else {\n var tasks = gantt.getTaskByTime();\n tasks = tasks.sort(function (a, b) {\n return +a.end_date > +b.end_date ? 1 : -1;\n });\n return tasks.length ? tasks[tasks.length - 1].end_date : null;\n }\n };\n\n gantt._getProjectStart = function () {\n if (gantt.config.project_start) {\n return gantt.config.project_start;\n } // use timeline start if project start is not specified\n\n\n if (gantt.config.start_date) {\n return gantt.config.start_date;\n }\n\n if (gantt.getState().min_date) {\n return gantt.getState().min_date;\n } // earliest task start if neither project start nor timeline are specified\n\n\n var tasks = gantt.getTaskByTime();\n tasks = tasks.sort(function (a, b) {\n return +a.start_date > +b.start_date ? 1 : -1;\n });\n return tasks.length ? tasks[0].start_date : null;\n };\n\n var getDefaultTaskDate = function getDefaultTaskDate(item, parent_id) {\n var parentExists = parent_id && parent_id != gantt.config.root_id && gantt.isTaskExists(parent_id);\n var parent = parentExists ? gantt.getTask(parent_id) : false,\n startDate = null;\n\n if (parent) {\n if (gantt.config.schedule_from_end) {\n startDate = gantt.calculateEndDate({\n start_date: parent.end_date,\n duration: -gantt.config.duration_step,\n task: item\n });\n } else {\n if (!parent.start_date) {\n return getDefaultTaskDate(parent, gantt.getParent(parent));\n }\n\n startDate = parent.start_date;\n }\n } else if (gantt.config.schedule_from_end) {\n startDate = gantt.calculateEndDate({\n start_date: gantt._getProjectEnd(),\n duration: -gantt.config.duration_step,\n task: item\n });\n } else {\n var first = gantt.getTaskByIndex(0);\n var minDate = gantt.config.start_date || gantt.getState().min_date;\n\n if (first) {\n if (first.start_date) {\n startDate = first.start_date;\n } else if (first.end_date) {\n startDate = gantt.calculateEndDate({\n start_date: first.end_date,\n duration: -gantt.config.duration_step,\n task: item\n });\n } else {\n startDate = minDate;\n }\n } else {\n startDate = minDate;\n }\n }\n\n gantt.assert(startDate, \"Invalid dates\");\n return new Date(startDate);\n };\n\n gantt._set_default_task_timing = function (task) {\n task.start_date = task.start_date || getDefaultTaskDate(task, gantt.getParent(task));\n task.duration = task.duration || gantt.config.duration_step;\n task.end_date = task.end_date || gantt.calculateEndDate(task);\n };\n\n gantt.createTask = function (item, parent, index) {\n item = item || {};\n if (!gantt.defined(item.id)) item.id = gantt.uid();\n\n if (!item.start_date) {\n item.start_date = getDefaultTaskDate(item, parent);\n }\n\n if (item.text === undefined) {\n item.text = gantt.locale.labels.new_task;\n }\n\n if (item.duration === undefined) {\n item.duration = 1;\n }\n\n if (this.isTaskExists(parent)) {\n this.setParent(item, parent, true);\n var parentObj = this.getTask(parent);\n parentObj.$open = true;\n }\n\n if (!this.callEvent(\"onTaskCreated\", [item])) {\n return null;\n }\n\n if (this.config.details_on_create) {\n //GS-761: assert unique ID\n if (gantt.isTaskExists(item.id)) {\n var task = gantt.getTask(item.id);\n\n if (task.$index != item.$index) {\n // Someone may try to mistakenly add a task with the same ID, and most likely\n // use the string format for the dates. Gantt shouldn't break in this scenario\n if (item.start_date && typeof item.start_date === \"string\") {\n item.start_date = this.date.parseDate(item.start_date, \"parse_date\");\n }\n\n if (item.end_date && typeof item.end_date === \"string\") {\n item.end_date = this.date.parseDate(item.end_date, \"parse_date\");\n }\n\n this.$data.tasksStore.updateItem(item.id, item);\n }\n } else {\n item.$new = true;\n this.silent(function () {\n gantt.$data.tasksStore.addItem(item, index);\n });\n }\n\n this.selectTask(item.id);\n this.refreshData();\n this.showLightbox(item.id);\n } else {\n if (this.addTask(item, parent, index)) {\n this.showTask(item.id);\n this.selectTask(item.id);\n }\n }\n\n return item.id;\n };\n\n gantt._update_flags = function (oldid, newid) {\n // TODO: need a proper way to update all possible flags\n var store = gantt.$data.tasksStore;\n\n if (oldid === undefined) {\n this._lightbox_id = null;\n store.silent(function () {\n store.unselect();\n }); // GS-1522. If we have multiselect, unselect all previously selected tasks\n\n if (this.getSelectedTasks) {\n this._multiselect.reset();\n }\n\n if (this._tasks_dnd && this._tasks_dnd.drag) {\n this._tasks_dnd.drag.id = null;\n }\n } else {\n if (this._lightbox_id == oldid) this._lightbox_id = newid; // TODO: probably can be removed\n\n if (store.getSelectedId() == oldid) {\n store.silent(function () {\n store.unselect(oldid);\n store.select(newid);\n });\n }\n\n if (this._tasks_dnd && this._tasks_dnd.drag && this._tasks_dnd.drag.id == oldid) {\n this._tasks_dnd.drag.id = newid;\n }\n }\n };\n\n var getTaskTimingMode = function getTaskTimingMode(task, force) {\n var task_type = gantt.getTaskType(task.type);\n var state = {\n type: task_type,\n $no_start: false,\n $no_end: false\n };\n\n if (!force && task_type == task.$rendered_type) {\n state.$no_start = task.$no_start;\n state.$no_end = task.$no_end;\n return state;\n }\n\n if (task_type == gantt.config.types.project) {\n //project duration is always defined by children duration\n state.$no_end = state.$no_start = true;\n } else if (task_type != gantt.config.types.milestone) {\n //tasks can have fixed duration, children duration(as projects), or one date fixed, and other defined by nested items\n state.$no_end = !(task.end_date || task.duration);\n state.$no_start = !task.start_date;\n\n if (gantt._isAllowedUnscheduledTask(task)) {\n state.$no_end = state.$no_start = false;\n }\n }\n\n return state;\n };\n\n gantt._init_task_timing = function (task) {\n var task_mode = getTaskTimingMode(task, true);\n var dirty = task.$rendered_type != task_mode.type;\n var task_type = task_mode.type;\n\n if (dirty) {\n task.$no_start = task_mode.$no_start;\n task.$no_end = task_mode.$no_end;\n task.$rendered_type = task_mode.type;\n }\n\n if (dirty && task_type != this.config.types.milestone) {\n if (task_type == this.config.types.project) {\n //project duration is always defined by children duration\n this._set_default_task_timing(task);\n\n task.$calculate_duration = false; // do not recalculate duration below\n }\n }\n\n if (task_type == this.config.types.milestone) {\n task.end_date = task.start_date;\n }\n\n if (task.start_date && task.end_date && task.$calculate_duration !== false) {\n task.duration = this.calculateDuration(task);\n }\n\n if (!task.$calculate_duration) {\n task.$calculate_duration = true;\n }\n\n if (!task.end_date) {\n task.end_date = task.start_date;\n }\n\n task.duration = task.duration || 0; // GS-1145. We should let tasks to have 0 duration if user wants it\n\n if (this.config.min_duration === 0 && task.duration === 0) {\n task.$no_end = false;\n } // work calendar of task has changed\n\n\n var effectiveCalendar = this.getTaskCalendar(task);\n\n if (task.$effective_calendar && task.$effective_calendar !== effectiveCalendar.id) {\n updateTaskTiming(task);\n\n if (this.config.inherit_calendar && this.isSummaryTask(task)) {\n this.eachTask(function (child) {\n updateTaskTiming(child);\n }, task.id);\n }\n }\n\n task.$effective_calendar = effectiveCalendar.id;\n };\n\n function updateTaskTiming(task) {\n task.$effective_calendar = gantt.getTaskCalendar(task).id;\n task.start_date = gantt.getClosestWorkTime({\n dir: \"future\",\n date: task.start_date,\n unit: gantt.config.duration_unit,\n task: task\n });\n task.end_date = gantt.calculateEndDate(task);\n }\n\n gantt.isSummaryTask = function (task) {\n gantt.assert(task && task instanceof Object, \"Invalid argument task=\" + task + \" of gantt.isSummaryTask. Task object was expected\");\n var mode = getTaskTimingMode(task);\n return !!(mode.$no_end || mode.$no_start);\n }; // downward calculation of project duration\n\n\n gantt.resetProjectDates = function (task) {\n var taskMode = getTaskTimingMode(task);\n\n if (taskMode.$no_end || taskMode.$no_start) {\n var info = getSubtaskInfo(task.id);\n assignProjectDates.call(this, task, taskMode, info.start_date, info.end_date);\n task.$rollup = info.rollup;\n }\n };\n\n function assignProjectDates(task, taskTiming, from, to) {\n if (taskTiming.$no_start) {\n if (from) {\n task.start_date = new Date(from);\n } else {\n task.start_date = getDefaultTaskDate(task, this.getParent(task));\n }\n }\n\n if (taskTiming.$no_end) {\n if (to) {\n task.end_date = new Date(to);\n } else {\n task.end_date = this.calculateEndDate({\n start_date: task.start_date,\n duration: this.config.duration_step,\n task: task\n });\n }\n }\n\n if (taskTiming.$no_start || taskTiming.$no_end) {\n this._init_task_timing(task);\n }\n }\n\n gantt.getSubtaskDuration = function (taskId) {\n var res = 0,\n root = taskId !== undefined ? taskId : gantt.config.root_id;\n this.eachTask(function (child) {\n if (this.getTaskType(child.type) == gantt.config.types.project || this.isUnscheduledTask(child)) return;\n res += child.duration;\n }, root);\n return res;\n };\n\n function getSubtaskInfo(taskId) {\n var min = null,\n max = null,\n root = taskId !== undefined ? taskId : gantt.config.root_id,\n rollup = [];\n gantt.eachTask(function (child) {\n if (gantt.getTaskType(child.type) == gantt.config.types.project || gantt.isUnscheduledTask(child)) return;\n\n if (child.rollup) {\n rollup.push(child.id);\n }\n\n if (child.start_date && !child.$no_start && (!min || min > child.start_date.valueOf())) min = child.start_date.valueOf();\n if (child.end_date && !child.$no_end && (!max || max < child.end_date.valueOf())) max = child.end_date.valueOf();\n }, root);\n return {\n start_date: min ? new Date(min) : null,\n end_date: max ? new Date(max) : null,\n rollup: rollup\n };\n }\n\n gantt.getSubtaskDates = function (task_id) {\n var info = getSubtaskInfo(task_id);\n return {\n start_date: info.start_date,\n end_date: info.end_date\n };\n }; // upward calculation of project duration\n\n\n gantt._update_parents = function (taskId, silent, updateAll) {\n if (!taskId) return;\n var task = this.getTask(taskId);\n\n if (task.rollup) {\n updateAll = true;\n }\n\n var pid = this.getParent(task);\n var taskTiming = getTaskTimingMode(task);\n var has_changed = true; // GS-761 the dates check is necessary for adding empty tasks: gantt.addTask({id:\"2\"})\n\n if (updateAll || task.start_date && task.end_date && (taskTiming.$no_start || taskTiming.$no_end)) {\n var oldStart = task.start_date.valueOf(),\n oldEnd = task.end_date.valueOf();\n gantt.resetProjectDates(task); // not refresh parent projects if dates hasn't changed\n\n if (!updateAll && oldStart == task.start_date.valueOf() && oldEnd == task.end_date.valueOf()) {\n has_changed = false;\n }\n\n if (has_changed && !silent) {\n this.refreshTask(task.id, true);\n }\n }\n\n if (has_changed && pid && this.isTaskExists(pid)) {\n this._update_parents(pid, silent, updateAll);\n }\n };\n\n gantt.roundDate = function (config) {\n var scale = gantt.getScale();\n\n if (helpers.isDate(config)) {\n config = {\n date: config,\n unit: scale ? scale.unit : gantt.config.duration_unit,\n step: scale ? scale.step : gantt.config.duration_step\n };\n }\n\n var date = config.date,\n steps = config.step,\n unit = config.unit;\n\n if (!scale) {\n return date;\n }\n\n var upper, lower, colIndex;\n\n if (unit == scale.unit && steps == scale.step && +date >= +scale.min_date && +date <= +scale.max_date) {\n //find date in time scale config\n colIndex = Math.floor(gantt.columnIndexByDate(date));\n\n if (!scale.trace_x[colIndex]) {\n colIndex -= 1; // end of time scale\n\n if (scale.rtl) {\n colIndex = 0;\n }\n }\n\n lower = new Date(scale.trace_x[colIndex]);\n upper = gantt.date.add(lower, steps, unit);\n } else {\n colIndex = Math.floor(gantt.columnIndexByDate(date));\n upper = gantt.date[unit + \"_start\"](new Date(scale.min_date));\n\n if (scale.trace_x[colIndex]) {\n upper = gantt.date[unit + \"_start\"](scale.trace_x[colIndex]); // end of time scale\n }\n\n while (+upper < +date) {\n upper = gantt.date[unit + \"_start\"](gantt.date.add(upper, steps, unit));\n var tzOffset = upper.getTimezoneOffset();\n upper = gantt._correct_dst_change(upper, tzOffset, upper, unit);\n if (gantt.date[unit + '_start']) upper = gantt.date[unit + '_start'](upper);\n }\n\n lower = gantt.date.add(upper, -1 * steps, unit);\n }\n\n if (config.dir && config.dir == 'future') return upper;\n if (config.dir && config.dir == 'past') return lower;\n\n if (Math.abs(date - lower) < Math.abs(upper - date)) {\n return lower;\n } else {\n return upper;\n }\n };\n\n gantt.correctTaskWorkTime = function (task) {\n if (gantt.config.work_time && gantt.config.correct_work_time) {\n if (!this.isWorkTime(task.start_date, undefined, task)) {\n task.start_date = this.getClosestWorkTime({\n date: task.start_date,\n dir: 'future',\n task: task\n });\n task.end_date = this.calculateEndDate(task);\n } else if (!this.isWorkTime(new Date(+task.end_date - 1), undefined, task)) {\n task.end_date = this.calculateEndDate(task);\n }\n }\n };\n\n gantt.attachEvent(\"onBeforeTaskUpdate\", function (id, task) {\n gantt._init_task_timing(task);\n\n return true;\n });\n gantt.attachEvent(\"onBeforeTaskAdd\", function (id, task) {\n gantt._init_task_timing(task);\n\n return true;\n });\n gantt.attachEvent(\"onAfterTaskMove\", function (id, parent, tindex) {\n gantt._init_task_timing(gantt.getTask(id));\n\n return true;\n });\n};","// TODO: rework public api for date methods\nvar utils = require(\"../../utils/utils\");\n\nvar createWorkTimeFacade = function createWorkTimeFacade(calendarManager, timeCalculator) {\n return {\n getWorkHours: function getWorkHours(date) {\n return timeCalculator.getWorkHours(date);\n },\n setWorkTime: function setWorkTime(config) {\n return timeCalculator.setWorkTime(config);\n },\n unsetWorkTime: function unsetWorkTime(config) {\n timeCalculator.unsetWorkTime(config);\n },\n isWorkTime: function isWorkTime(date, unit, task) {\n return timeCalculator.isWorkTime(date, unit, task);\n },\n getClosestWorkTime: function getClosestWorkTime(config) {\n return timeCalculator.getClosestWorkTime(config);\n },\n calculateDuration: function calculateDuration(start_date, end_date, task) {\n return timeCalculator.calculateDuration(start_date, end_date, task);\n },\n _hasDuration: function _hasDuration(start_date, end_date, task) {\n return timeCalculator.hasDuration(start_date, end_date, task);\n },\n calculateEndDate: function calculateEndDate(start, duration, unit, task) {\n return timeCalculator.calculateEndDate(start, duration, unit, task);\n },\n mergeCalendars: utils.bind(calendarManager.mergeCalendars, calendarManager),\n createCalendar: utils.bind(calendarManager.createCalendar, calendarManager),\n addCalendar: utils.bind(calendarManager.addCalendar, calendarManager),\n getCalendar: utils.bind(calendarManager.getCalendar, calendarManager),\n getCalendars: utils.bind(calendarManager.getCalendars, calendarManager),\n getResourceCalendar: utils.bind(calendarManager.getResourceCalendar, calendarManager),\n getTaskCalendar: utils.bind(calendarManager.getTaskCalendar, calendarManager),\n deleteCalendar: utils.bind(calendarManager.deleteCalendar, calendarManager)\n };\n};\n\nmodule.exports = {\n create: createWorkTimeFacade\n};","function CalendarDisabledTimeStrategy(gantt, argumentsHelper) {\n this.argumentsHelper = argumentsHelper;\n this.$gantt = gantt;\n}\n\nCalendarDisabledTimeStrategy.prototype = {\n getWorkHours: function getWorkHours() {\n return [0, 24];\n },\n setWorkTime: function setWorkTime() {\n return true;\n },\n unsetWorkTime: function unsetWorkTime() {\n return true;\n },\n isWorkTime: function isWorkTime() {\n return true;\n },\n getClosestWorkTime: function getClosestWorkTime(config) {\n var config = this.argumentsHelper.getClosestWorkTimeArguments.apply(this.argumentsHelper, arguments);\n return config.date;\n },\n calculateDuration: function calculateDuration() {\n var config = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments);\n var from = config.start_date,\n to = config.end_date,\n unit = config.unit,\n step = config.step;\n return this._calculateDuration(from, to, unit, step);\n },\n _calculateDuration: function _calculateDuration(start, end, unit, step) {\n var dateHelper = this.$gantt.date;\n var fixedUnits = {\n \"week\": 1000 * 60 * 60 * 24 * 7,\n \"day\": 1000 * 60 * 60 * 24,\n \"hour\": 1000 * 60 * 60,\n \"minute\": 1000 * 60\n };\n var res = 0;\n\n if (fixedUnits[unit]) {\n res = Math.round((end - start) / (step * fixedUnits[unit]));\n } else {\n var from = new Date(start),\n to = new Date(end);\n\n while (from.valueOf() < to.valueOf()) {\n res += 1;\n from = dateHelper.add(from, step, unit);\n }\n\n if (from.valueOf() != end.valueOf()) {\n res += (to - from) / (dateHelper.add(from, step, unit) - from);\n }\n }\n\n return Math.round(res);\n },\n hasDuration: function hasDuration() {\n var config = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments);\n var from = config.start_date,\n to = config.end_date,\n unit = config.unit;\n\n if (!unit) {\n return false;\n }\n\n from = new Date(from);\n to = new Date(to);\n return from.valueOf() < to.valueOf();\n },\n hasWorkTime: function hasWorkTime() {\n return true;\n },\n equals: function equals(calendar) {\n if (!(calendar instanceof CalendarDisabledTimeStrategy)) {\n return false;\n }\n\n return true;\n },\n calculateEndDate: function calculateEndDate() {\n var config = this.argumentsHelper.calculateEndDateArguments.apply(this.argumentsHelper, arguments);\n var start = config.start_date,\n duration = config.duration,\n unit = config.unit,\n step = config.step;\n return this.$gantt.date.add(start, step * duration, unit);\n }\n};\nmodule.exports = CalendarDisabledTimeStrategy;","var createArgumentsHelper = require(\"./calendar_arguments_helper\"),\n NoWorkTimeCalendar = require(\"./strategy/no_work_time\");\n\nfunction TimeCalculator(calendarManager) {\n this.$gantt = calendarManager.$gantt;\n this.argumentsHelper = createArgumentsHelper(this.$gantt);\n this.calendarManager = calendarManager;\n this.$disabledCalendar = new NoWorkTimeCalendar(this.$gantt, this.argumentsHelper);\n}\n\nTimeCalculator.prototype = {\n _getCalendar: function _getCalendar(config) {\n var calendar;\n\n if (!this.$gantt.config.work_time) {\n calendar = this.$disabledCalendar;\n } else {\n var manager = this.calendarManager;\n\n if (config.task) {\n calendar = manager.getTaskCalendar(config.task);\n } else if (config.id) {\n calendar = manager.getTaskCalendar(config);\n } else if (config.calendar) {\n calendar = config.calendar;\n }\n\n if (!calendar) {\n calendar = manager.getTaskCalendar();\n }\n }\n\n return calendar;\n },\n getWorkHours: function getWorkHours(config) {\n config = this.argumentsHelper.getWorkHoursArguments.apply(this.argumentsHelper, arguments);\n\n var calendar = this._getCalendar(config);\n\n return calendar.getWorkHours(config.date);\n },\n setWorkTime: function setWorkTime(config, calendar) {\n config = this.argumentsHelper.setWorkTimeArguments.apply(this.argumentsHelper, arguments);\n if (!calendar) calendar = this.calendarManager.getCalendar(); // Global\n\n return calendar.setWorkTime(config);\n },\n unsetWorkTime: function unsetWorkTime(config, calendar) {\n config = this.argumentsHelper.unsetWorkTimeArguments.apply(this.argumentsHelper, arguments);\n if (!calendar) calendar = this.calendarManager.getCalendar(); // Global\n\n return calendar.unsetWorkTime(config);\n },\n isWorkTime: function isWorkTime(date, unit, task, calendar) {\n var config = this.argumentsHelper.isWorkTimeArguments.apply(this.argumentsHelper, arguments);\n calendar = this._getCalendar(config);\n return calendar.isWorkTime(config);\n },\n getClosestWorkTime: function getClosestWorkTime(config) {\n config = this.argumentsHelper.getClosestWorkTimeArguments.apply(this.argumentsHelper, arguments);\n\n var calendar = this._getCalendar(config);\n\n return calendar.getClosestWorkTime(config);\n },\n calculateDuration: function calculateDuration() {\n // start_date_date, end_date, task\n var config = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments);\n\n var calendar = this._getCalendar(config);\n\n return calendar.calculateDuration(config);\n },\n hasDuration: function hasDuration() {\n var config = this.argumentsHelper.hasDurationArguments.apply(this.argumentsHelper, arguments);\n\n var calendar = this._getCalendar(config);\n\n return calendar.hasDuration(config);\n },\n calculateEndDate: function calculateEndDate(config) {\n // start_date, duration, unit, task\n var config = this.argumentsHelper.calculateEndDateArguments.apply(this.argumentsHelper, arguments);\n\n var calendar = this._getCalendar(config);\n\n return calendar.calculateEndDate(config);\n }\n};\nmodule.exports = TimeCalculator;","module.exports = function () {\n function getResourcesCalendarKey(resourceAssignments) {\n return resourceAssignments.map(function (res) {\n if (res && res.resource_id) {\n return res.resource_id;\n } else {\n return res;\n }\n }).sort().join(\"-\");\n }\n\n var dynamicCalendars = {};\n\n function mergeResourceCalendars(resourceAssignments, manager) {\n return manager.mergeCalendars(resourceAssignments.map(function (assignment) {\n var resourceId = assignment && assignment.resource_id ? assignment.resource_id : assignment;\n return manager.getResourceCalendar(resourceId);\n }));\n }\n\n function getCalendarIdFromMultipleResources(resourceAssignments, manager) {\n var key = getResourcesCalendarKey(resourceAssignments);\n\n if (!resourceAssignments.length) {\n return null;\n } else if (resourceAssignments.length === 1) {\n return manager.getResourceCalendar(key).id;\n } else if (dynamicCalendars[key]) {\n return dynamicCalendars[key].id;\n } else {\n var tempCalendar = mergeResourceCalendars(resourceAssignments, manager);\n dynamicCalendars[key] = tempCalendar;\n return manager.addCalendar(tempCalendar);\n }\n }\n\n return {\n getCalendarIdFromMultipleResources: getCalendarIdFromMultipleResources\n };\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nmodule.exports = {\n isLegacyResourceCalendarFormat: function isLegacyResourceCalendarFormat(resourceCalendarsProperty) {\n // modern format:\n //gantt.config.resource_calendars = {\n //\tresourceId: calendarId,\n //\tresourceId: calendarId,\n //\tresourceId: calendarId\n //\t};\n // legacy format:\n // gantt.config.resource_calendars = {\n //\t\"resourceProperty\": {\n //\t\tresourceId: calendarId,\n //\t\tresourceId: calendarId,\n //\t\tresourceId: calendarId\n //\t\t}\n //\t};\n if (!resourceCalendarsProperty) {\n return false;\n }\n\n for (var i in resourceCalendarsProperty) {\n if (resourceCalendarsProperty[i] && _typeof(resourceCalendarsProperty[i]) === \"object\") {\n return true;\n }\n }\n\n return false;\n },\n getResourceProperty: function getResourceProperty(config) {\n var resourceCalendarsConfig = config.resource_calendars;\n var propertyName = config.resource_property;\n\n if (this.isLegacyResourceCalendarFormat(resourceCalendarsConfig)) {\n for (var i in config) {\n propertyName = i;\n break;\n }\n }\n\n return propertyName;\n },\n getCalendarIdFromLegacyConfig: function getCalendarIdFromLegacyConfig(task, config) {\n if (config) {\n for (var field in config) {\n var resource = config[field];\n\n if (task[field]) {\n var calendarId = resource[task[field]];\n\n if (calendarId) {\n return calendarId;\n }\n }\n }\n }\n\n return null;\n }\n};","export class DateDurationCache {\r\n\tprivate _cache: any;\r\n\tconstructor() {\r\n\t\tthis.clear();\r\n\t}\r\n\r\n\t_getCacheObject(startDate: Date, unit: string, step:number){\r\n\t\tconst cache = this._cache;\r\n\t\tif (!cache[unit]) {\r\n\t\t\tcache[unit] = [];\r\n\t\t}\r\n\t\tlet unitCache = cache[unit];\r\n\t\tif(!unitCache) {\r\n\t\t\tunitCache = cache[unit] = {};\r\n\t\t}\r\n\r\n\t\tlet stepCache = unitCache[step];\r\n\t\tif(!stepCache) {\r\n\t\t\tstepCache = unitCache[step] = {};\r\n\t\t}\r\n\r\n\t\tconst year = startDate.getFullYear();\r\n\t\tlet yearCache = stepCache[year];\r\n\t\tif(!yearCache){\r\n\t\t\tyearCache = stepCache[year] = {durations: {}, endDates: {}};\r\n\t\t}\r\n\r\n\t\treturn yearCache;\r\n\t}\r\n\t_endDateCacheKey(startDate: number, duration: number){\r\n\t\treturn String(startDate) + \"-\" + String(duration);\r\n\t}\r\n\t_durationCacheKey(startDate: number, endDate: number){\r\n\t\treturn String(startDate) + \"-\" + String(endDate);\r\n\t}\r\n\tgetEndDate(startDate: Date, duration: number, unit: string, step: number, compute: () => Date): number|null{\r\n\t\tconst cache = this._getCacheObject(startDate, unit, step);\r\n\r\n\t\tconst startDateTimestamp = startDate.valueOf();\r\n\t\tconst key = this._endDateCacheKey(startDateTimestamp, duration);\r\n\t\tlet endDate;\r\n\t\tif(cache.endDates[key] === undefined){\r\n\t\t\tconst result = compute();\r\n\t\t\tconst resultTimestamp = result.valueOf();\r\n\t\t\tcache.endDates[key] = resultTimestamp;\r\n\t\t\tcache.durations[this._durationCacheKey(startDateTimestamp, resultTimestamp)] = duration;\r\n\t\t\tendDate = result;\r\n\t\t}else{\r\n\t\t\tendDate = new Date(cache.endDates[key]);\r\n\t\t}\r\n\r\n\t\treturn endDate;\r\n\t}\r\n\r\n\tgetDuration(startDate: Date, endDate: Date, unit: string, step: number, compute: () => number): number|null{\r\n\t\tconst cache = this._getCacheObject(startDate, unit, step);\r\n\r\n\t\tconst startDateTimestamp = startDate.valueOf();\r\n\t\tconst endDateTimestamp = endDate.valueOf();\r\n\t\tconst key = this._durationCacheKey(startDateTimestamp, endDateTimestamp);\r\n\t\tlet duration;\r\n\t\tif(cache.durations[key] === undefined){\r\n\t\t\tconst result = compute();\r\n\t\t\tcache.durations[key] = result.valueOf();\r\n\r\n\t\t\t// can't populate end date due to logic of end date calculation, current unit tests capture it\r\n\t\t\t// cache.endDates[this._endDateCacheKey(startDateTimestamp, result)] = endDateTimestamp;\r\n\t\t\tduration = result;\r\n\t\t}else{\r\n\t\t\tduration = cache.durations[key];\r\n\t\t}\r\n\r\n\t\treturn duration;\r\n\t}\r\n\r\n\tclear(): void{\r\n\t\tthis._cache = {};\r\n\t}\r\n}","\r\n\r\nexport class LargerUnitsCache {\r\n\tprivate _weekCache: Map;\r\n\tprivate _monthCache: Map;\r\n\tprivate _calendar: any;\r\n\tconstructor(calendar) {\r\n\t\tthis.clear();\r\n\t\tthis._calendar = calendar;\r\n\t}\r\n\r\n\tgetMinutesPerWeek = (weekStart: Date) => {\r\n\t\tconst key = weekStart.valueOf();\r\n\r\n\t\tif(this._weekCache.has(key)){\r\n\t\t\treturn this._weekCache.get(key);\r\n\t\t}\r\n\r\n\t\tconst calendar = this._calendar;\r\n\t\tconst gantt = this._calendar.$gantt;\r\n\r\n\t\tlet minutesPerWeek = 0;\r\n\t\tlet start = gantt.date.week_start(new Date(weekStart));\r\n\t\tfor(let i = 0; i < 7; i++){\r\n\t\t\tminutesPerWeek += calendar.getHoursPerDay(start) * 60;\r\n\t\t\tstart = gantt.date.add(start, 1, \"day\");\r\n\t\t}\r\n\r\n\t\tthis._weekCache.set(key, minutesPerWeek);\r\n\t\treturn minutesPerWeek;\r\n\t}\r\n\r\n\tgetMinutesPerMonth = (monthStart: Date) => {\r\n\t\tconst key = monthStart.valueOf();\r\n\r\n\t\tif(this._monthCache.has(key)){\r\n\t\t\treturn this._monthCache.get(key);\r\n\t\t}\r\n\r\n\t\tconst calendar = this._calendar;\r\n\t\tconst gantt = this._calendar.$gantt;\r\n\r\n\t\tlet minutesPerMonth = 0;\r\n\t\tlet start = gantt.date.week_start(new Date(monthStart));\r\n\t\tconst nextMonth = gantt.date.add(start, 1, \"month\").valueOf();\r\n\t\twhile(start.valueOf() < nextMonth){\r\n\t\t\tminutesPerMonth += calendar.getHoursPerDay(start) * 60;\r\n\t\t\tstart = gantt.date.add(start, 1, \"day\");\r\n\t\t}\r\n\r\n\t\tthis._monthCache.set(key, minutesPerMonth);\r\n\t\treturn minutesPerMonth;\r\n\t}\r\n\r\n\tclear = (): void => {\r\n\t\tthis._weekCache = new Map();\r\n\t\tthis._monthCache = new Map();\r\n\t}\r\n}","import { IWorkUnitCache } from \"./workunit_cache_interface\";\r\n\r\nexport class WorkUnitsObjectCache implements IWorkUnitCache {\r\n\tprivate _cache: any;\r\n\tconstructor() {\r\n\t\tthis.clear();\r\n\t}\r\n\r\n\tgetItem(unit: string, timestamp: string, value: Date): number|boolean {\r\n\t\tconst cache = this._cache;\r\n\t\tif (cache && cache[unit]) {\r\n\t\t\tconst units = cache[unit];\r\n\t\t\tif(units === undefined){\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t\tconst subCache = units[value.getFullYear()];\r\n\t\t\tif (subCache && subCache[timestamp] !== undefined) {\r\n\t\t\t\treturn subCache[timestamp];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}\r\n\tsetItem(unit: string, timestamp: string, value: boolean, rawValue: Date): void {\r\n\t\tif (!unit || !timestamp) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst cache = this._cache;\r\n\r\n\t\tif (!cache) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!cache[unit]) {\r\n\t\t\tcache[unit] = [];\r\n\t\t}\r\n\t\tconst unitCache = cache[unit];\r\n\r\n\t\tconst year = rawValue.getFullYear();\r\n\t\tlet yearCache = unitCache[year];\r\n\t\tif(!yearCache){\r\n\t\t\tyearCache = unitCache[year] = {};\r\n\t\t}\r\n\t\tyearCache[timestamp] = value;\r\n\t}\r\n\tclear(): void{\r\n\t\tthis._cache = {};\r\n\t}\r\n}","\r\n\r\nimport { IWorkUnitCache } from \"./workunit_cache_interface\";\r\n\r\nexport class WorkUnitsMapCache implements IWorkUnitCache {\r\n\tprivate _cache: Map>>;\r\n\tconstructor() {\r\n\t\tthis.clear();\r\n\t}\r\n\r\n\tgetItem(unit: string, timestamp: string, value: Date): number|boolean {\r\n\t\tif (this._cache.has(unit)) {\r\n\t\t\tconst unitCache = this._cache.get(unit);\r\n\r\n\t\t\tconst subCache = unitCache[value.getFullYear()];\r\n\t\t\tif (subCache && subCache.has(timestamp)) {\r\n\t\t\t\treturn subCache.get(timestamp);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t}\r\n\tsetItem(unit: string, timestamp: string, value: boolean, rawValue: Date): void {\r\n\t\tif (!unit || !timestamp) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst cache = this._cache;\r\n\t\tconst year = rawValue.getFullYear();\r\n\r\n\t\tlet unitCache;\r\n\t\tif (!cache.has(unit)) {\r\n\t\t\tunitCache = [];\r\n\t\t\tcache.set(unit, unitCache);\r\n\t\t} else {\r\n\t\t\tunitCache = cache.get(unit);\r\n\t\t}\r\n\r\n\t\tlet yearCache = unitCache[year];\r\n\t\tif(!yearCache){\r\n\t\t\tyearCache = unitCache[year] = new Map();\r\n\t\t}\r\n\r\n\r\n\t\tyearCache.set(timestamp, value);\r\n\t}\r\n\tclear(): void{\r\n\t\tthis._cache = new Map>>();\r\n\t}\r\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar createCacheObject = require(\"./work_unit_cache\").createCacheObject;\n\nvar LargerUnitsCache = require(\"./work_unit_cache\").LargerUnitsCache;\n\nvar utils = require(\"../../../utils/utils\");\n\nvar DateDurationCache = require(\"./work_unit_cache/date_duration_cache\").DateDurationCache;\n\nfunction CalendarWorkTimeStrategy(gantt, argumentsHelper) {\n this.argumentsHelper = argumentsHelper;\n this.$gantt = gantt;\n this._workingUnitsCache = createCacheObject();\n this._largeUnitsCache = new LargerUnitsCache(this);\n this._dateDurationCache = new DateDurationCache();\n this._worktime = null;\n this._cached_timestamps = {};\n this._cached_timestamps_count = 0;\n}\n\nCalendarWorkTimeStrategy.prototype = {\n units: [\"year\", \"month\", \"week\", \"day\", \"hour\", \"minute\"],\n _clearCaches: function _clearCaches() {\n this._workingUnitsCache.clear();\n\n this._largeUnitsCache.clear();\n\n this._dateDurationCache.clear();\n },\n // cache previously calculated worktime\n _getUnitOrder: function _getUnitOrder(unit) {\n for (var i = 0, len = this.units.length; i < len; i++) {\n if (this.units[i] == unit) return i;\n }\n },\n _resetTimestampCache: function _resetTimestampCache() {\n this._cached_timestamps = {};\n this._cached_timestamps_count = 0;\n },\n _timestamp: function _timestamp(settings) {\n // minor optimization, store calculated timestamps to reduce computations\n // reset cache when number of keys exceeds large number where key lookup may became more expensive than the recalculation\n if (this._cached_timestamps_count > 1000000) {\n this._resetTimestampCache();\n }\n\n var timestamp = null;\n\n if (settings.day || settings.day === 0) {\n timestamp = settings.day;\n } else if (settings.date) {\n var value = String(settings.date.valueOf());\n\n if (this._cached_timestamps[value]) {\n timestamp = this._cached_timestamps[value];\n } else {\n // store worktime datestamp in utc so it could be recognized in different timezones (e.g. opened locally and sent to the export service in different timezone)\n timestamp = Date.UTC(settings.date.getFullYear(), settings.date.getMonth(), settings.date.getDate());\n this._cached_timestamps[value] = timestamp;\n this._cached_timestamps_count++;\n }\n }\n\n return timestamp;\n },\n _checkIfWorkingUnit: function _checkIfWorkingUnit(date, unit) {\n // GS-596: If unit is larger than day or has a custom logic\n if (!this[\"_is_work_\" + unit]) {\n var from = this.$gantt.date[\"\".concat(unit, \"_start\")](new Date(date));\n var to = this.$gantt.date.add(from, 1, unit);\n return this.hasDuration(from, to);\n }\n\n return this[\"_is_work_\" + unit](date);\n },\n //checkings for particular time units\n //methods for month-year-week can be defined, otherwise always return 'true'\n _is_work_day: function _is_work_day(date) {\n var val = this._getWorkHours(date);\n\n if (Array.isArray(val)) {\n return val.length > 0;\n }\n\n return false;\n },\n _is_work_hour: function _is_work_hour(date) {\n var hours = this._getWorkHours(date); // [{start: 8*60*60, end: 12*60*60}, {start: 13*60*60, end: 17*60*60}]\n\n\n var value = date.getHours();\n\n for (var i = 0; i < hours.length; i++) {\n if (value >= hours[i].startHour && value < hours[i].endHour) {\n return true;\n }\n }\n\n return false;\n },\n _getTimeOfDayStamp: function _getTimeOfDayStamp(date, dayEnd) {\n var hours = date.getHours();\n\n if (!date.getHours() && !date.getMinutes() && dayEnd) {\n hours = 24;\n }\n\n return hours * 60 * 60 + date.getMinutes() * 60;\n },\n _is_work_minute: function _is_work_minute(date) {\n var hours = this._getWorkHours(date); // [{start: 8*60*60, end: 12*60*60}, {start: 13*60*60, end: 17*60*60}]\n\n\n var checkTime = this._getTimeOfDayStamp(date);\n\n for (var i = 0; i < hours.length; i++) {\n if (checkTime >= hours[i].start && checkTime < hours[i].end) {\n return true;\n }\n }\n\n return false;\n },\n _nextDate: function _nextDate(start, unit, step) {\n return this.$gantt.date.add(start, step, unit);\n },\n _getWorkUnitsBetweenGeneric: function _getWorkUnitsBetweenGeneric(from, to, unit, step) {\n var dateHelper = this.$gantt.date;\n var start = new Date(from),\n end = new Date(to);\n step = step || 1;\n var units = 0;\n var next = null;\n var stepStart, stepEnd; // calculating decimal durations, i.e. 2016-09-20 00:05:00 - 2016-09-20 01:00:00 ~ 0.95 instead of 1\n // and also 2016-09-20 00:00:00 - 2016-09-20 00:05:00 ~ 0.05 instead of 1\n // durations must be rounded later\n\n var checkFirst = false;\n stepStart = dateHelper[unit + \"_start\"](new Date(start));\n\n if (stepStart.valueOf() != start.valueOf()) {\n checkFirst = true;\n }\n\n var checkLast = false;\n stepEnd = dateHelper[unit + \"_start\"](new Date(to));\n\n if (stepEnd.valueOf() != to.valueOf()) {\n checkLast = true;\n }\n\n var isLastStep = false;\n\n while (start.valueOf() < end.valueOf()) {\n next = this._nextDate(start, unit, step);\n isLastStep = next.valueOf() > end.valueOf();\n\n if (this._isWorkTime(start, unit)) {\n if (checkFirst || checkLast && isLastStep) {\n stepStart = dateHelper[unit + \"_start\"](new Date(start));\n stepEnd = dateHelper.add(stepStart, step, unit);\n }\n\n if (checkFirst) {\n checkFirst = false;\n next = this._nextDate(stepStart, unit, step);\n units += (stepEnd.valueOf() - start.valueOf()) / (stepEnd.valueOf() - stepStart.valueOf());\n } else if (checkLast && isLastStep) {\n checkLast = false;\n units += (end.valueOf() - start.valueOf()) / (stepEnd.valueOf() - stepStart.valueOf());\n } else {\n units++;\n }\n } else {\n var unitOrder = this._getUnitOrder(unit);\n\n var biggerTimeUnit = this.units[unitOrder - 1];\n\n if (biggerTimeUnit && !this._isWorkTime(start, biggerTimeUnit)) {\n next = this._getClosestWorkTimeFuture(start, biggerTimeUnit);\n }\n }\n\n start = next;\n }\n\n return units;\n },\n _getMinutesPerHour: function _getMinutesPerHour(date) {\n var hourStart = this._getTimeOfDayStamp(date);\n\n var hourEnd = this._getTimeOfDayStamp(this._nextDate(date, \"hour\", 1));\n\n if (hourEnd === 0) {\n hourEnd = 24 * 60 * 60;\n }\n\n var worktimes = this._getWorkHours(date);\n\n for (var i = 0; i < worktimes.length; i++) {\n var interval = worktimes[i];\n\n if (hourStart >= interval.start && hourEnd <= interval.end) {\n return 60; // hour inside a working interval, all hour is a work hour\n } else if (hourStart < interval.end && hourEnd > interval.start) {\n // hour is partially work time\n var duration = Math.min(hourEnd, interval.end) - Math.max(hourStart, interval.start);\n return duration / 60;\n }\n }\n\n return 0;\n },\n _getMinutesPerDay: function _getMinutesPerDay(date) {\n var hours = this._getWorkHours(date);\n\n var res = 0;\n hours.forEach(function (interval) {\n res += interval.durationMinutes;\n });\n return res;\n },\n getHoursPerDay: function getHoursPerDay(date) {\n var hours = this._getWorkHours(date);\n\n var res = 0;\n hours.forEach(function (interval) {\n res += interval.durationHours;\n });\n return res;\n },\n _getWorkUnitsForRange: function _getWorkUnitsForRange(from, to, unit, step) {\n var total = 0;\n var start = new Date(from),\n end = new Date(to);\n var getUnitsPerDay;\n\n if (unit == \"minute\") {\n getUnitsPerDay = utils.bind(this._getMinutesPerDay, this);\n } else {\n getUnitsPerDay = utils.bind(this.getHoursPerDay, this);\n }\n\n while (start.valueOf() < end.valueOf()) {\n if (end - start > 1000 * 60 * 60 * 24 * 32 && start.getDate() === 0) {\n var units = this._largeUnitsCache.getMinutesPerMonth(start);\n\n if (unit == \"hour\") {\n units = units / 60;\n }\n\n total += units;\n start = this.$gantt.date.add(start, 1, \"month\");\n continue;\n } else if (end - start > 1000 * 60 * 60 * 24 * 16) {\n var weekStart = this.$gantt.date.week_start(new Date(start));\n\n if (start.valueOf() === weekStart.valueOf()) {\n var units = this._largeUnitsCache.getMinutesPerWeek(start);\n\n if (unit == \"hour\") {\n units = units / 60;\n }\n\n total += units;\n start = this.$gantt.date.add(start, 7, \"day\");\n continue;\n }\n } //\tif (this._isWorkTime(start, \"day\")) {\n\n\n total += getUnitsPerDay(start); //\t}\n\n start = this._nextDate(start, \"day\", 1);\n }\n\n return total / step;\n },\n _getMinutesBetweenSingleDay: function _getMinutesBetweenSingleDay(from, to) {\n var range = this._getIntervalTimestamp(from, to);\n\n var worktimes = this._getWorkHours(from);\n\n var result = 0;\n\n for (var i = 0; i < worktimes.length; i++) {\n var interval = worktimes[i];\n\n if (range.end >= interval.start && range.start <= interval.end) {\n var minuteFrom = Math.max(interval.start, range.start);\n var minuteTo = Math.min(interval.end, range.end);\n result += (minuteTo - minuteFrom) / 60;\n range.start = minuteTo;\n }\n }\n\n return Math.floor(result);\n },\n _getMinutesBetween: function _getMinutesBetween(from, to, unit, step) {\n var start = new Date(from),\n end = new Date(to);\n step = step || 1;\n var firstDayStart = new Date(start);\n var firstDayEnd = this.$gantt.date.add(this.$gantt.date.day_start(new Date(start)), 1, \"day\");\n\n if (end.valueOf() <= firstDayEnd.valueOf()) {\n return this._getMinutesBetweenSingleDay(from, to);\n } else {\n var lastDayStart = this.$gantt.date.day_start(new Date(end));\n var lastDayEnd = end;\n\n var startPart = this._getMinutesBetweenSingleDay(firstDayStart, firstDayEnd);\n\n var endPart = this._getMinutesBetweenSingleDay(lastDayStart, lastDayEnd);\n\n var rangePart = this._getWorkUnitsForRange(firstDayEnd, lastDayStart, unit, step);\n\n var total = startPart + rangePart + endPart;\n return total;\n }\n },\n // optimized method for calculating work units duration of large time spans\n // implemented for hours and minutes units, bigger time units don't benefit from the optimization so much\n _getHoursBetween: function _getHoursBetween(from, to, unit, step) {\n var start = new Date(from),\n end = new Date(to);\n step = step || 1;\n var firstDayStart = new Date(start);\n var firstDayEnd = this.$gantt.date.add(this.$gantt.date.day_start(new Date(start)), 1, \"day\");\n\n if (end.valueOf() <= firstDayEnd.valueOf()) {\n return Math.round(this._getMinutesBetweenSingleDay(from, to) / 60);\n } else {\n var lastDayStart = this.$gantt.date.day_start(new Date(end));\n var lastDayEnd = end;\n var startPart = this._getMinutesBetweenSingleDay(firstDayStart, firstDayEnd, unit, step) / 60;\n var endPart = this._getMinutesBetweenSingleDay(lastDayStart, lastDayEnd, unit, step) / 60;\n\n var rangePart = this._getWorkUnitsForRange(firstDayEnd, lastDayStart, unit, step);\n\n var total = startPart + rangePart + endPart;\n return Math.round(total);\n }\n },\n getConfig: function getConfig() {\n return this._worktime;\n },\n _setConfig: function _setConfig(settings) {\n this._worktime = settings;\n\n this._parseSettings();\n\n this._clearCaches();\n },\n _parseSettings: function _parseSettings() {\n var settings = this.getConfig();\n settings.parsed = {\n dates: {},\n hours: null,\n haveCustomWeeks: false,\n customWeeks: {},\n customWeeksRangeStart: null,\n customWeeksRangeEnd: null,\n customWeeksBoundaries: []\n };\n settings.parsed.hours = this._parseHours(settings.hours);\n\n for (var i in settings.dates) {\n settings.parsed.dates[i] = this._parseHours(settings.dates[i]);\n }\n\n if (settings.customWeeks) {\n var minCustomRangeStart = null;\n var maxCustomRangeEnd = null;\n\n for (var i in settings.customWeeks) {\n var customTime = settings.customWeeks[i];\n\n if (customTime.from && customTime.to) {\n var rangeStart = customTime.from;\n var rangeEnd = customTime.to;\n\n if (!minCustomRangeStart || minCustomRangeStart > rangeStart.valueOf()) {\n minCustomRangeStart = rangeStart.valueOf();\n }\n\n if (!maxCustomRangeEnd || maxCustomRangeEnd < rangeEnd.valueOf()) {\n maxCustomRangeEnd = rangeEnd.valueOf();\n }\n\n settings.parsed.customWeeksBoundaries.push({\n from: rangeStart.valueOf(),\n fromReadable: new Date(rangeStart),\n to: rangeEnd.valueOf(),\n toReadable: new Date(rangeEnd),\n name: i\n });\n settings.parsed.haveCustomWeeks = true;\n var currentWeek = settings.parsed.customWeeks[i] = {\n from: customTime.from,\n to: customTime.to,\n hours: this._parseHours(customTime.hours),\n dates: {}\n };\n\n for (var d in customTime.dates) {\n currentWeek.dates[d] = this._parseHours(customTime.dates[d]);\n }\n }\n }\n\n settings.parsed.customWeeksRangeStart = minCustomRangeStart;\n settings.parsed.customWeeksRangeEnd = maxCustomRangeEnd;\n }\n },\n _tryChangeCalendarSettings: function _tryChangeCalendarSettings(payload) {\n var backup = JSON.stringify(this.getConfig());\n payload();\n\n if (!this.hasWorkTime()) {\n //\tthis.$gantt.assert(false, \"Invalid calendar settings, no worktime available\");\n this._setConfig(JSON.parse(backup));\n\n this._clearCaches();\n\n return false;\n }\n\n return true;\n },\n _arraysEqual: function _arraysEqual(a, b) {\n if (a === b) return true;\n if (!a || !b) return false;\n if (a.length != b.length) return false;\n\n for (var i = 0; i < a.length; ++i) {\n if (a[i] !== b[i]) return false;\n }\n\n return true;\n },\n _compareSettings: function _compareSettings(mySettings, thatSettings) {\n if (!this._arraysEqual(mySettings.hours, thatSettings.hours)) {\n return false;\n }\n\n var myDays = Object.keys(mySettings.dates);\n var otherDates = Object.keys(thatSettings.dates);\n myDays.sort();\n otherDates.sort();\n\n if (!this._arraysEqual(myDays, otherDates)) {\n return false;\n }\n\n for (var i = 0; i < myDays.length; i++) {\n var timestamp = myDays[i];\n var myHours = mySettings.dates[timestamp];\n var otherHours = mySettings.dates[timestamp]; // day settings not equal\n\n if (myHours !== otherHours && // but still can be two arrays with the equivalent hour settings\n !(Array.isArray(myHours) && Array.isArray(otherHours) && this._arraysEqual(myHours, otherHours))) {\n return false;\n }\n }\n\n return true;\n },\n equals: function equals(calendar) {\n if (!(calendar instanceof CalendarWorkTimeStrategy)) {\n return false;\n }\n\n var mySettings = this.getConfig();\n var thatSettings = calendar.getConfig();\n\n if (!this._compareSettings(mySettings, thatSettings)) {\n return false;\n }\n\n if (mySettings.parsed.haveCustomWeeks && thatSettings.parsed.haveCustomWeeks) {\n if (mySettings.parsed.customWeeksBoundaries.length != thatSettings.parsed.customWeeksBoundaries.length) {\n return false;\n }\n\n for (var i in mySettings.parsed.customWeeks) {\n var myWeek = mySettings.parsed.customWeeks[i];\n var thatWeek = thatSettings.parsed.customWeeks[i];\n\n if (!thatWeek) {\n return false;\n }\n\n if (!this._compareSettings(myWeek, thatWeek)) {\n return false;\n }\n }\n } else if (mySettings.parse.haveCustomWeeks !== thatSettings.parsed.haveCustomWeeks) {\n return false;\n }\n\n return true;\n },\n getWorkHours: function getWorkHours() {\n var config = this.argumentsHelper.getWorkHoursArguments.apply(this.argumentsHelper, arguments);\n return this._getWorkHours(config.date, false);\n },\n _getWorkHours: function _getWorkHours(date, parsed) {\n var calendar = this.getConfig();\n\n if (parsed !== false) {\n calendar = calendar.parsed;\n }\n\n if (!date) {\n return calendar.hours;\n }\n\n var dateValue = this._timestamp({\n date: date\n });\n\n if (calendar.haveCustomWeeks) {\n if (calendar.customWeeksRangeStart <= dateValue && calendar.customWeeksRangeEnd > dateValue) {\n for (var i = 0; i < calendar.customWeeksBoundaries.length; i++) {\n if (calendar.customWeeksBoundaries[i].from <= dateValue && calendar.customWeeksBoundaries[i].to > dateValue) {\n calendar = calendar.customWeeks[calendar.customWeeksBoundaries[i].name];\n break;\n }\n }\n }\n }\n\n var hours = true;\n\n if (calendar.dates[dateValue] !== undefined) {\n hours = calendar.dates[dateValue]; //custom day\n } else if (calendar.dates[date.getDay()] !== undefined) {\n hours = calendar.dates[date.getDay()]; //week day\n }\n\n if (hours === true) {\n return calendar.hours;\n } else if (hours) {\n return hours;\n }\n\n return [];\n },\n _getIntervalTimestamp: function _getIntervalTimestamp(from, to) {\n var res = {\n start: 0,\n end: 0\n };\n res.start = from.getHours() * 60 * 60 + from.getMinutes() * 60 + from.getSeconds();\n var endHours = to.getHours();\n\n if (!endHours && !to.getMinutes() && !to.getSeconds() && from.valueOf() < to.valueOf()) {\n endHours = 24;\n }\n\n res.end = endHours * 60 * 60 + to.getMinutes() * 60 + to.getSeconds();\n return res;\n },\n _parseHours: function _parseHours(hours) {\n if (Array.isArray(hours)) {\n var timestampRanges = []; // worktime as seconds range\n\n hours.forEach(function (hour) {\n if (typeof hour === \"number\") {\n timestampRanges.push(hour * 60 * 60);\n } else if (typeof hour === \"string\") {\n // \"12-13\", or \"12:00-13:00\", or \"12:00:00-13:00:00\"\n hour.split(\"-\").map(function (time) {\n return time.trim();\n }).forEach(function (part) {\n var parsed = part.split(\":\").map(function (time) {\n return time.trim();\n });\n var value = parseInt(parsed[0] * 60 * 60);\n\n if (parsed[1]) {\n value += parseInt(parsed[1] * 60);\n }\n\n if (parsed[2]) {\n value += parseInt(parsed[2]);\n }\n\n timestampRanges.push(value);\n });\n }\n });\n var timerangeConfig = [];\n\n for (var i = 0; i < timestampRanges.length; i += 2) {\n var start = timestampRanges[i];\n var end = timestampRanges[i + 1];\n var duration = end - start;\n timerangeConfig.push({\n start: start,\n end: end,\n startHour: Math.floor(start / (60 * 60)),\n startMinute: Math.floor(start / 60),\n endHour: Math.ceil(end / (60 * 60)),\n endMinute: Math.ceil(end / 60),\n durationSeconds: duration,\n durationMinutes: duration / 60,\n durationHours: duration / (60 * 60)\n });\n }\n\n return timerangeConfig;\n } else {\n return hours;\n }\n },\n setWorkTime: function setWorkTime(settings) {\n return this._tryChangeCalendarSettings(utils.bind(function () {\n var hours = settings.hours !== undefined ? settings.hours : true;\n\n var timestamp = this._timestamp(settings);\n\n var calendarConfig = this.getConfig();\n\n if (timestamp !== null) {\n calendarConfig.dates[timestamp] = hours;\n } else if (!settings.customWeeks) {\n calendarConfig.hours = hours;\n }\n\n if (settings.customWeeks) {\n if (!calendarConfig.customWeeks) {\n calendarConfig.customWeeks = {};\n } // GS-1867. allow setWorkTime to exclude dates in the customWeeks range\n\n\n if (typeof settings.customWeeks == \"string\") {\n if (timestamp !== null) {\n calendarConfig.customWeeks[settings.customWeeks].dates[timestamp] = hours;\n } else if (!settings.customWeeks) {\n calendarConfig.customWeeks[settings.customWeeks].hours = hours;\n }\n } else if (_typeof(settings.customWeeks) === \"object\" && Function.prototype.toString.call(settings.customWeeks.constructor) === \"function Object() { [native code] }\") {\n for (var i in settings.customWeeks) {\n calendarConfig.customWeeks[i] = settings.customWeeks[i];\n }\n }\n }\n\n this._parseSettings();\n\n this._clearCaches();\n }, this));\n },\n unsetWorkTime: function unsetWorkTime(settings) {\n return this._tryChangeCalendarSettings(utils.bind(function () {\n if (!settings) {\n this.reset_calendar();\n } else {\n var timestamp = this._timestamp(settings);\n\n if (timestamp !== null) {\n delete this.getConfig().dates[timestamp];\n }\n } // Load updated settings and clear work units cache\n\n\n this._parseSettings();\n\n this._clearCaches();\n }, this));\n },\n _isWorkTime: function _isWorkTime(date, unit) {\n // Check if this item has in the cache\n var useCache = true; //unit === \"day\"; // use cache only for days. In case of hours/minutes cache size grows too large and the overhead exceeds the gains\n\n var isWorkUnit = -1;\n var dateKey = null;\n\n if (useCache) {\n // use string keys\n dateKey = String(date.valueOf());\n isWorkUnit = this._workingUnitsCache.getItem(unit, dateKey, date);\n }\n\n if (isWorkUnit == -1) {\n // calculate if not cached\n isWorkUnit = this._checkIfWorkingUnit(date, unit);\n\n if (useCache) {\n this._workingUnitsCache.setItem(unit, dateKey, isWorkUnit, date);\n }\n }\n\n return isWorkUnit;\n },\n isWorkTime: function isWorkTime() {\n var config = this.argumentsHelper.isWorkTimeArguments.apply(this.argumentsHelper, arguments);\n return this._isWorkTime(config.date, config.unit);\n },\n calculateDuration: function calculateDuration() {\n var config = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments);\n\n if (!config.unit) {\n return false;\n } //return this._calculateDuration(config.start_date, config.end_date, config.unit, config.step);\n\n\n var self = this;\n return this._dateDurationCache.getDuration(config.start_date, config.end_date, config.unit, config.step, function () {\n return self._calculateDuration(config.start_date, config.end_date, config.unit, config.step);\n });\n },\n _calculateDuration: function _calculateDuration(from, to, unit, step) {\n var res = 0;\n var sign = 1;\n\n if (from.valueOf() > to.valueOf()) {\n var tmp = to;\n to = from;\n from = tmp;\n sign = -1;\n }\n\n if (unit == \"hour\" && step == 1) {\n res = this._getHoursBetween(from, to, unit, step);\n } else if (unit == \"minute\" && step == 1) {\n // quick calculation for minutes with 1 minute step\n res = this._getMinutesBetween(from, to, unit, step);\n } else {\n res = this._getWorkUnitsBetweenGeneric(from, to, unit, step);\n } // getWorkUnits.. returns decimal durations\n\n\n return sign * Math.round(res);\n },\n hasDuration: function hasDuration() {\n var config = this.argumentsHelper.getDurationArguments.apply(this.argumentsHelper, arguments);\n var from = config.start_date,\n to = config.end_date,\n unit = config.unit,\n step = config.step;\n\n if (!unit) {\n return false;\n }\n\n var start = new Date(from),\n end = new Date(to);\n step = step || 1;\n\n while (start.valueOf() < end.valueOf()) {\n if (this._isWorkTime(start, unit)) return true;\n start = this._nextDate(start, unit, step);\n }\n\n return false;\n },\n calculateEndDate: function calculateEndDate() {\n var config = this.argumentsHelper.calculateEndDateArguments.apply(this.argumentsHelper, arguments);\n var from = config.start_date,\n duration = config.duration,\n unit = config.unit,\n step = config.step;\n if (!unit) return false;\n var mult = config.duration >= 0 ? 1 : -1;\n duration = Math.abs(duration * 1); //\tvar endDate = this._calculateEndDate(from, duration, unit, step * mult);\n //\treturn endDate;\n\n var self = this;\n return this._dateDurationCache.getEndDate(from, duration, unit, step * mult, function () {\n return self._calculateEndDate(from, duration, unit, step * mult);\n });\n },\n _calculateEndDate: function _calculateEndDate(from, duration, unit, step) {\n if (!unit) return false;\n\n if (step == 1 && unit == \"minute\") {\n return this._calculateMinuteEndDate(from, duration, step);\n } else if (step == -1 && unit == \"minute\") {\n return this._subtractMinuteDate(from, duration, step);\n } else if (step == 1 && unit == \"hour\") {\n return this._calculateHourEndDate(from, duration, step);\n } else {\n var interval = this._addInterval(from, duration, unit, step, null);\n\n return interval.end;\n }\n },\n _addInterval: function _addInterval(start, duration, unit, step, stopAction) {\n var added = 0;\n var current = start;\n var dstShift = false;\n\n while (added < duration && !(stopAction && stopAction(current))) {\n var next = this._nextDate(current, unit, step); // GS-1501. Correct hours after DST change\n\n\n if (unit == \"day\") {\n dstShift = dstShift || !current.getHours() && next.getHours();\n\n if (dstShift) {\n next.setHours(0);\n\n if (next.getHours()) {// the day when the timezone is changed, try to correct hours next time\n } else {\n dstShift = false;\n }\n }\n }\n\n var dateValue = new Date(next.valueOf() + 1);\n\n if (step > 0) {\n dateValue = new Date(next.valueOf() - 1);\n }\n\n var workTimeCheck = this._isWorkTime(dateValue, unit);\n\n if (workTimeCheck && !dstShift) {\n added++;\n }\n\n current = next;\n }\n\n return {\n end: current,\n start: start,\n added: added\n };\n },\n _addHoursUntilDayEnd: function _addHoursUntilDayEnd(from, duration) {\n var dayEnd = this.$gantt.date.add(this.$gantt.date.day_start(new Date(from)), 1, \"day\");\n var added = 0;\n var left = duration;\n\n var range = this._getIntervalTimestamp(from, dayEnd);\n\n var worktimes = this._getWorkHours(from);\n\n for (var i = 0; i < worktimes.length && added < duration; i++) {\n var interval = worktimes[i];\n\n if (range.end >= interval.start && range.start <= interval.end) {\n var minuteFrom = Math.max(interval.start, range.start);\n var minuteTo = Math.min(interval.end, range.end);\n var rangeHours = (minuteTo - minuteFrom) / (60 * 60);\n\n if (rangeHours > left) {\n rangeHours = left;\n minuteTo = minuteFrom + left * 60 * 60;\n }\n\n var addHours = Math.round((minuteTo - minuteFrom) / (60 * 60));\n added += addHours;\n left -= addHours;\n range.start = minuteTo;\n }\n }\n\n var intervalEnd = dayEnd;\n\n if (added === duration) {\n intervalEnd = new Date(from.getFullYear(), from.getMonth(), from.getDate(), 0, 0, range.start);\n }\n\n return {\n added: added,\n end: intervalEnd\n };\n },\n _calculateHourEndDate: function _calculateHourEndDate(from, duration, step) {\n var start = new Date(from),\n added = 0;\n step = step || 1;\n duration = Math.abs(duration * 1);\n\n var interval = this._addHoursUntilDayEnd(start, duration);\n\n added = interval.added;\n start = interval.end;\n var durationLeft = duration - added;\n\n if (durationLeft) {\n var current = start;\n\n while (added < duration) {\n var next = this._nextDate(current, \"day\", step); // reset to day start in case DST switch happens in the process\n\n\n next.setHours(0);\n next.setMinutes(0);\n next.setSeconds(0);\n var hoursPerDay = 0;\n\n if (step > 0) {\n hoursPerDay = this.getHoursPerDay(new Date(next.valueOf() - 1));\n } else {\n hoursPerDay = this.getHoursPerDay(new Date(next.valueOf() + 1));\n }\n\n if (added + hoursPerDay >= duration) {\n break;\n } else {\n added += hoursPerDay;\n }\n\n current = next;\n }\n\n start = current;\n }\n\n if (added < duration) {\n var durationLeft = duration - added;\n interval = this._addHoursUntilDayEnd(start, durationLeft);\n start = interval.end;\n }\n\n return start;\n },\n _addMinutesUntilHourEnd: function _addMinutesUntilHourEnd(from, duration) {\n if (from.getMinutes() === 0) {\n // already at hour end\n return {\n added: 0,\n end: new Date(from)\n };\n }\n\n var hourEnd = this.$gantt.date.add(this.$gantt.date.hour_start(new Date(from)), 1, \"hour\");\n var added = 0;\n var left = duration;\n\n var range = this._getIntervalTimestamp(from, hourEnd);\n\n var worktimes = this._getWorkHours(from);\n\n for (var i = 0; i < worktimes.length && added < duration; i++) {\n var interval = worktimes[i];\n\n if (range.end >= interval.start && range.start <= interval.end) {\n var minuteFrom = Math.max(interval.start, range.start);\n var minuteTo = Math.min(interval.end, range.end);\n var rangeMinutes = (minuteTo - minuteFrom) / 60;\n\n if (rangeMinutes > left) {\n rangeMinutes = left;\n minuteTo = minuteFrom + left * 60;\n } // TODO: verify testcase https://dhtmlxsupport.teamwork.com/desk/tickets/9625700/messages\n\n /*if (rangeMinutes === 0) {\r\n \trangeMinutes = left;\r\n \tminuteTo = minuteFrom + (left * 60);\r\n }*/\n\n\n var addMinutes = Math.round((minuteTo - minuteFrom) / 60);\n left -= addMinutes;\n added += addMinutes;\n range.start = minuteTo;\n }\n }\n\n var intervalEnd = hourEnd;\n\n if (added === duration) {\n intervalEnd = new Date(from.getFullYear(), from.getMonth(), from.getDate(), 0, 0, range.start);\n }\n\n return {\n added: added,\n end: intervalEnd\n };\n },\n _subtractMinutesUntilHourStart: function _subtractMinutesUntilHourStart(from, duration) {\n var hourStart = this.$gantt.date.hour_start(new Date(from));\n var added = 0;\n var left = duration;\n var hourStartTimestamp = hourStart.getHours() * 60 * 60 + hourStart.getMinutes() * 60 + hourStart.getSeconds();\n var initialDateTimestamp = from.getHours() * 60 * 60 + from.getMinutes() * 60 + from.getSeconds();\n\n var worktimes = this._getWorkHours(from);\n\n for (var i = worktimes.length - 1; i >= 0 && added < duration; i--) {\n var interval = worktimes[i];\n\n if (initialDateTimestamp > interval.start && hourStartTimestamp <= interval.end) {\n var minuteFrom = Math.min(initialDateTimestamp, interval.end);\n var minuteTo = Math.max(hourStartTimestamp, interval.start); //\tvar minuteFrom = Math.max(interval.start, currentHour.start);\n //\tvar minuteTo = Math.min(interval.end, currentHour.end);\n\n var rangeMinutes = (minuteFrom - minuteTo) / 60;\n\n if (rangeMinutes > left) {\n rangeMinutes = left;\n minuteTo = minuteFrom - left * 60;\n } // TODO: verify testcase https://dhtmlxsupport.teamwork.com/desk/tickets/9625700/messages\n\n /*if (rangeMinutes === 0) {\r\n \trangeMinutes = left;\r\n \tminuteTo = minuteFrom - (left * 60);\r\n }*/\n\n\n var addMinutes = Math.abs(Math.round((minuteFrom - minuteTo) / 60));\n left -= addMinutes;\n added += addMinutes;\n initialDateTimestamp = minuteTo;\n }\n }\n\n var intervalEnd = hourStart;\n\n if (added === duration) {\n intervalEnd = new Date(from.getFullYear(), from.getMonth(), from.getDate(), 0, 0, initialDateTimestamp);\n }\n\n return {\n added: added,\n end: intervalEnd\n };\n },\n _subtractMinuteDate: function _subtractMinuteDate(from, duration, step) {\n var start = new Date(from),\n added = 0;\n step = step || -1;\n duration = Math.abs(duration * 1);\n duration = Math.round(duration);\n\n var minutePrecision = this._isMinutePrecision(start);\n\n var addedInterval = this._subtractMinutesUntilHourStart(start, duration);\n\n added += addedInterval.added;\n start = addedInterval.end;\n var calculatedDay = 0;\n var daySchedule = [];\n var minutesInDay = 0;\n\n while (added < duration) {\n var dayStart = this.$gantt.date.day_start(new Date(start));\n var iterateFromDayEnd = false;\n\n if (start.valueOf() === dayStart.valueOf()) {\n dayStart = this.$gantt.date.add(dayStart, -1, \"day\");\n iterateFromDayEnd = true;\n } //var dayStartTimestamp = this.$gantt.date.day_start(new Date(start)).valueOf();\n\n\n var dayEnd = new Date(dayStart.getFullYear(), dayStart.getMonth(), dayStart.getDate(), 23, 59, 59, 999).valueOf();\n\n if (dayEnd !== calculatedDay) {\n daySchedule = this._getWorkHours(dayStart);\n minutesInDay = this._getMinutesPerDay(dayStart);\n calculatedDay = dayEnd;\n }\n\n var left = duration - added;\n\n var timestamp = this._getTimeOfDayStamp(start, iterateFromDayEnd);\n\n if (!daySchedule.length || !minutesInDay) {\n start = this.$gantt.date.add(start, -1, \"day\");\n continue;\n }\n\n if (daySchedule[daySchedule.length - 1].end <= timestamp) {\n if (left > minutesInDay) {\n added += minutesInDay;\n start = this.$gantt.date.add(start, -1, \"day\");\n continue;\n }\n }\n\n var isWorkHour = false;\n var workInterval = null;\n var prevInterval = null;\n\n for (var i = daySchedule.length - 1; i >= 0; i--) {\n if (daySchedule[i].start < timestamp - 1 && daySchedule[i].end >= timestamp - 1) {\n isWorkHour = true;\n workInterval = daySchedule[i];\n prevInterval = daySchedule[i - 1];\n break;\n }\n }\n\n if (isWorkHour) {\n // we're at the end of worktime interval and subtracting more than the duration of the interval\n // -> subtract the duration of the interval and move to the start of the interval (we're moving from end)\n if (timestamp === workInterval.end && left >= workInterval.durationMinutes) {\n added += workInterval.durationMinutes;\n start = this.$gantt.date.add(start, -workInterval.durationMinutes, \"minute\");\n } // worktime is set in whole hours (no intervals like 9:15-10:00)\n // the amount we need to subtract lies inside the interval\n else if (!minutePrecision && left <= timestamp / 60 - workInterval.startMinute) {\n added += left;\n start = this.$gantt.date.add(start, -left, \"minute\");\n } else if (minutePrecision) {\n // GS-2129. If the working time is set in minutes, we accumulate the working time in minutes from right to left\n // duration we need to subtract lies completely inside the work interval\n if (left <= timestamp / 60 - workInterval.startMinute) {\n added += left;\n start = this.$gantt.date.add(start, -left, \"minute\");\n } else {\n // we need to go trough multiple work intervals to subtract needed time\n added += timestamp / 60 - workInterval.startMinute;\n\n if (prevInterval) {\n start = new Date(start.getFullYear(), start.getMonth(), start.getDate(), 0, 0, prevInterval.end);\n } else {\n start = this.$gantt.date.day_start(start);\n }\n }\n } else {\n var minutesInHour = this._getMinutesPerHour(start);\n\n if (minutesInHour <= left) {\n added += minutesInHour;\n start = this._nextDate(start, \"hour\", step);\n } else {\n addedInterval = this._subtractMinutesUntilHourStart(start, left);\n added += addedInterval.added;\n start = addedInterval.end;\n }\n }\n } else {\n if (start.getHours() === 0 && start.getMinutes() === 0 && start.getSeconds() === 0) {\n var prev = this._getClosestWorkTimePast(start, \"hour\");\n\n if (prev.valueOf() === start.valueOf()) {\n var prev = this.$gantt.date.add(start, -1, \"day\");\n\n var times = this._getWorkHours(prev);\n\n if (times.length) {\n var lastInterval = times[times.length - 1];\n prev.setSeconds(lastInterval.durationSeconds);\n }\n }\n\n start = prev;\n } else {\n start = this._getClosestWorkTimePast(new Date(start - 1), \"hour\");\n }\n }\n }\n\n if (added < duration) {\n var durationLeft = duration - added;\n addedInterval = this._subtractMinutesUntilHourStart(start, durationLeft);\n added += addedInterval.added;\n start = addedInterval.end;\n }\n\n return start;\n },\n _calculateMinuteEndDate: function _calculateMinuteEndDate(from, duration, step) {\n var start = new Date(from),\n added = 0;\n step = step || 1;\n duration = Math.abs(duration * 1);\n duration = Math.round(duration);\n\n var addedInterval = this._addMinutesUntilHourEnd(start, duration);\n\n added += addedInterval.added;\n start = addedInterval.end;\n var calculatedDay = 0;\n var daySchedule = [];\n var minutesInDay = 0;\n\n var minutePrecision = this._isMinutePrecision(start);\n\n while (added < duration) {\n var dayStart = this.$gantt.date.day_start(new Date(start)).valueOf();\n\n if (dayStart !== calculatedDay) {\n daySchedule = this._getWorkHours(start);\n minutesInDay = this._getMinutesPerDay(start);\n calculatedDay = dayStart;\n }\n\n var left = duration - added;\n\n var timestamp = this._getTimeOfDayStamp(start);\n\n if (!daySchedule.length || !minutesInDay) {\n start = this.$gantt.date.add(this.$gantt.date.day_start(start), 1, \"day\");\n continue;\n }\n\n if (daySchedule[0].start >= timestamp) {\n if (left >= minutesInDay) {\n added += minutesInDay;\n\n if (left == minutesInDay) {\n start = new Date(start.getFullYear(), start.getMonth(), start.getDate(), 0, 0, daySchedule[daySchedule.length - 1].end);\n break;\n } else {\n start = this.$gantt.date.add(start, 1, \"day\");\n start = this.$gantt.date.day_start(start);\n }\n\n continue;\n }\n }\n\n var isWorkHour = false;\n var workInterval = null;\n\n for (var i = 0; i < daySchedule.length; i++) {\n if (daySchedule[i].start <= timestamp && daySchedule[i].end > timestamp) {\n isWorkHour = true;\n workInterval = daySchedule[i];\n break;\n }\n }\n\n if (isWorkHour) {\n if (timestamp === workInterval.start && left >= workInterval.durationMinutes) {\n added += workInterval.durationMinutes;\n start = this.$gantt.date.add(start, workInterval.durationMinutes, \"minute\");\n } else if (left <= workInterval.endMinute - timestamp / 60) {\n added += left;\n start = this.$gantt.date.add(start, left, \"minute\");\n } else {\n var minutesInHour = this._getMinutesPerHour(start);\n\n if (minutesInHour <= left) {\n added += minutesInHour; // when the working time settings are set in minutes move to the next minutes\n\n if (minutePrecision) {\n start = this.$gantt.date.add(start, minutesInHour, \"minute\");\n } else {\n start = this._nextDate(start, \"hour\", step);\n }\n } else {\n addedInterval = this._addMinutesUntilHourEnd(start, left);\n added += addedInterval.added;\n start = addedInterval.end;\n }\n }\n } else {\n start = this._getClosestWorkTimeFuture(start, \"hour\");\n }\n }\n\n if (added < duration) {\n var durationLeft = duration - added;\n addedInterval = this._addMinutesUntilHourEnd(start, durationLeft);\n added += addedInterval.added;\n start = addedInterval.end;\n }\n\n return start;\n },\n getClosestWorkTime: function getClosestWorkTime() {\n var settings = this.argumentsHelper.getClosestWorkTimeArguments.apply(this.argumentsHelper, arguments);\n return this._getClosestWorkTime(settings.date, settings.unit, settings.dir);\n },\n _getClosestWorkTime: function _getClosestWorkTime(inputDate, unit, direction) {\n var result = new Date(inputDate);\n\n if (this._isWorkTime(result, unit)) {\n return result;\n }\n\n result = this.$gantt.date[unit + '_start'](result);\n\n if (direction == 'any' || !direction) {\n var closestFuture = this._getClosestWorkTimeFuture(result, unit);\n\n var closestPast = this._getClosestWorkTimePast(result, unit);\n\n if (Math.abs(closestFuture - inputDate) <= Math.abs(inputDate - closestPast)) {\n result = closestFuture;\n } else {\n result = closestPast;\n }\n } else if (direction == \"past\") {\n result = this._getClosestWorkTimePast(result, unit);\n } else {\n result = this._getClosestWorkTimeFuture(result, unit);\n }\n\n return result;\n },\n _getClosestWorkTimeFuture: function _getClosestWorkTimeFuture(date, unit) {\n return this._getClosestWorkTimeGeneric(date, unit, 1);\n },\n _getClosestWorkTimePast: function _getClosestWorkTimePast(date, unit) {\n var result = this._getClosestWorkTimeGeneric(date, unit, -1); // should return the end of the closest work interval\n\n\n return this.$gantt.date.add(result, 1, unit);\n },\n _findClosestTimeInDay: function _findClosestTimeInDay(date, direction, worktimes) {\n var start = new Date(date);\n var resultDate = null;\n var fromDayEnd = false;\n\n if (!this._getWorkHours(start).length) {\n start = this._getClosestWorkTime(start, \"day\", direction < 0 ? \"past\" : \"future\");\n\n if (direction < 0) {\n start = new Date(start.valueOf() - 1);\n fromDayEnd = true;\n }\n\n worktimes = this._getWorkHours(start);\n }\n\n var value = this._getTimeOfDayStamp(start);\n\n if (fromDayEnd) {\n value = this._getTimeOfDayStamp(new Date(start.valueOf() + 1), fromDayEnd);\n }\n\n if (direction > 0) {\n for (var i = 0; i < worktimes.length; i++) {\n if (worktimes[i].start >= value) {\n resultDate = new Date(start.getFullYear(), start.getMonth(), start.getDate(), 0, 0, worktimes[i].start);\n break;\n }\n }\n } else {\n for (var i = worktimes.length - 1; i >= 0; i--) {\n if (worktimes[i].end <= value) {\n resultDate = new Date(start.getFullYear(), start.getMonth(), start.getDate(), 0, 0, worktimes[i].end);\n break;\n } else if (worktimes[i].end > value && worktimes[i].start <= value) {\n resultDate = new Date(start.getFullYear(), start.getMonth(), start.getDate(), 0, 0, value);\n break;\n }\n }\n }\n\n return resultDate;\n },\n _getClosestWorkMinute: function _getClosestWorkMinute(date, unit, direction) {\n var start = new Date(date);\n\n var worktimes = this._getWorkHours(start);\n\n var resultDate = this._findClosestTimeInDay(start, direction, worktimes);\n\n if (!resultDate) {\n start = this.calculateEndDate(start, direction, \"day\");\n\n if (direction > 0) {\n start = this.$gantt.date.day_start(start);\n } else {\n start = this.$gantt.date.day_start(start);\n start = this.$gantt.date.add(start, 1, \"day\");\n start = new Date(start.valueOf() - 1);\n }\n\n worktimes = this._getWorkHours(start);\n resultDate = this._findClosestTimeInDay(start, direction, worktimes);\n }\n\n if (direction < 0) {\n // getClosestWorkTimePast adds one time unit to the result date after this\n resultDate = this.$gantt.date.add(resultDate, -1, unit);\n }\n\n return resultDate;\n },\n _getClosestWorkTimeGeneric: function _getClosestWorkTimeGeneric(date, unit, increment) {\n if (unit === \"hour\" || unit === \"minute\") {\n return this._getClosestWorkMinute(date, unit, increment);\n }\n\n var unitOrder = this._getUnitOrder(unit),\n biggerTimeUnit = this.units[unitOrder - 1];\n\n var result = date; // be extra sure we won't fall into infinite loop, 3k seems big enough\n\n var maximumLoop = 3000,\n count = 0;\n\n while (!this._isWorkTime(result, unit)) {\n if (biggerTimeUnit && !this._isWorkTime(result, biggerTimeUnit)) {\n // if we look for closest work hour and detect a week-end - first find the closest work day,\n // and continue iterations after that\n if (increment > 0) {\n result = this._getClosestWorkTimeFuture(result, biggerTimeUnit);\n } else {\n result = this._getClosestWorkTimePast(result, biggerTimeUnit);\n }\n\n if (this._isWorkTime(result, unit)) {\n break;\n }\n }\n\n count++;\n\n if (count > maximumLoop) {\n this.$gantt.assert(false, \"Invalid working time check\");\n return false;\n }\n\n var tzOffset = result.getTimezoneOffset();\n result = this.$gantt.date.add(result, increment, unit);\n result = this.$gantt._correct_dst_change(result, tzOffset, increment, unit);\n\n if (this.$gantt.date[unit + '_start']) {\n result = this.$gantt.date[unit + '_start'](result);\n }\n }\n\n return result;\n },\n\n /**\r\n * Check whether this calendar has working time. Calendar has working time only if there are regular working days of week\r\n *\r\n */\n hasWorkTime: function hasWorkTime() {\n var worktime = this.getConfig();\n var dates = worktime.dates;\n var daysOfWeek = [0, 1, 2, 3, 4, 5, 6];\n var exceptions = [];\n\n for (var i in worktime.dates) {\n if (Number(i) > 6) {\n exceptions.push(Number(i));\n }\n }\n\n var hasRegularHours = this._checkWorkHours(worktime.hours);\n\n var result = false;\n daysOfWeek.forEach(function (day) {\n if (result) {\n return;\n }\n\n var dayConfig = dates[day];\n\n if (dayConfig === true) {\n // workday uses global hours\n result = hasRegularHours;\n } else if (Array.isArray(dayConfig)) {\n // workday uses custom hours\n result = this._checkWorkHours(dayConfig);\n }\n }.bind(this));\n return result;\n },\n _checkWorkHours: function _checkWorkHours(hoursArray) {\n if (hoursArray.length === 0) {\n return false;\n }\n\n var result = false;\n\n for (var i = 0; i < hoursArray.length; i += 2) {\n if (hoursArray[i] !== hoursArray[i + 1]) {\n result = true;\n }\n }\n\n return result;\n },\n _isMinutePrecision: function _isMinutePrecision(date) {\n var minutePrecision = false;\n\n this._getWorkHours(date).forEach(function (interval) {\n if (interval.startMinute % 60 || interval.endMinute % 60) {\n minutePrecision = true;\n }\n });\n\n return minutePrecision;\n }\n};\nmodule.exports = CalendarWorkTimeStrategy;","var utils = require(\"../../../utils/utils\");\n\nfunction WorkTimeCalendarMerger() {}\n\nWorkTimeCalendarMerger.prototype = {\n /**\r\n * convert hours array items into objects, e.g. [8, 12, 17, 18] -> [{start: 8, end: 12}, {start:17, end:18}]\r\n * @param {Array} hoursArray\r\n */\n _getIntervals: function _getIntervals(hoursArray) {\n var result = [];\n\n for (var i = 0; i < hoursArray.length; i += 2) {\n result.push({\n start: hoursArray[i],\n end: hoursArray[i + 1]\n });\n }\n\n return result;\n },\n\n /**\r\n * Convert ranges config into hours array\r\n * [{start: 8, end: 12}, {start:17, end:18}] --> [8, 12, 17, 18]\r\n * @param {*} intervalsArray\r\n */\n _toHoursArray: function _toHoursArray(intervalsArray) {\n var result = [];\n\n function toFixed(value) {\n var str = String(value);\n\n if (str.length < 2) {\n str = \"0\" + str;\n }\n\n return str;\n }\n\n function formatHHMM(secondsValue) {\n var hours = Math.floor(secondsValue / (60 * 60));\n var minutePart = secondsValue - hours * 60 * 60;\n var minutes = Math.floor(minutePart / 60);\n return hours + \":\" + toFixed(minutes);\n }\n\n for (var i = 0; i < intervalsArray.length; i++) {\n result.push(formatHHMM(intervalsArray[i].start) + \"-\" + formatHHMM(intervalsArray[i].end));\n }\n\n return result;\n },\n\n /**\r\n * Build intersection of hour intervals. e.g.\r\n * first: [{start: 8, end: 12}, {start:13, end:18}]\r\n * second: [{start: 10, end: 15}]\r\n * result: [{start: 10, end: 12}, {start: 13, end: 15}]\r\n * @param {Array} first\r\n * @param {Array} second\r\n */\n _intersectHourRanges: function _intersectHourRanges(first, second) {\n var result = [];\n var baseArray = first.length > second.length ? first : second;\n var overridesArray = first === baseArray ? second : first;\n baseArray = baseArray.slice();\n overridesArray = overridesArray.slice();\n var result = [];\n\n for (var i = 0; i < baseArray.length; i++) {\n var base = baseArray[i];\n\n for (var j = 0; j < overridesArray.length; j++) {\n var current = overridesArray[j];\n\n if (current.start < base.end && current.end > base.start) {\n result.push({\n start: Math.max(base.start, current.start),\n end: Math.min(base.end, current.end)\n });\n\n if (base.end > current.end) {\n overridesArray.splice(j, 1);\n j--;\n i--;\n }\n }\n }\n }\n\n return result;\n },\n\n /**\r\n * Reduce the number of ranges in config when possible,\r\n * joins ranges that can be merged\r\n * parts: [{start: 8, end: 12}, {start:12, end:13}, {start: 15, end: 17}]\r\n * result: [{start: 8, end: 13}, {start: 15, end: 17}]\r\n * @param {Array} parts\r\n */\n _mergeAdjacentIntervals: function _mergeAdjacentIntervals(parts) {\n var result = parts.slice();\n result.sort(function (a, b) {\n return a.start - b.start;\n });\n var base = result[0];\n\n for (var i = 1; i < result.length; i++) {\n var current = result[i];\n\n if (current.start <= base.end) {\n if (current.end > base.end) {\n base.end = current.end;\n }\n\n result.splice(i, 1);\n i--;\n } else {\n base = current;\n }\n }\n\n return result;\n },\n _mergeHoursConfig: function _mergeHoursConfig(firstHours, secondHours) {\n //var firstIntervals = this._getIntervals(firstHours);\n //var secondIntervals = this._getIntervals(secondHours);\n return this._mergeAdjacentIntervals(this._intersectHourRanges(firstHours, secondHours));\n },\n merge: function merge(first, second) {\n var _this = this;\n\n var firstConfig = utils.copy(first.getConfig().parsed);\n var secondConfig = utils.copy(second.getConfig().parsed);\n var mergedSettings = {\n hours: this._toHoursArray(this._mergeHoursConfig(firstConfig.hours, secondConfig.hours)),\n dates: {},\n customWeeks: {}\n };\n\n var processCalendar = function processCalendar(config1, config2) {\n for (var _i in config1.dates) {\n var date1 = config1.dates[_i]; // dates contain day-of-week rules [0-7] and rules for specific dates (js date timestamps) - set false date rules initially\n\n if (+_i > 1000) {\n mergedSettings.dates[_i] = false;\n } // Check if the key exists in the fisrt calendar object\n\n\n for (var key in config2.dates) {\n var date2 = config2.dates[key]; // Logical AND for week days\n\n if (key == _i) {\n mergedSettings.dates[_i] = !!(date1 && date2);\n } // Handle case where dates are arrays\n\n\n if (Array.isArray(date1)) {\n var hours2 = Array.isArray(date2) ? date2 : config2.hours;\n mergedSettings.dates[_i] = _this._toHoursArray(_this._mergeHoursConfig(date1, hours2));\n }\n }\n }\n }; // Check both calendars\n\n\n processCalendar(firstConfig, secondConfig);\n processCalendar(secondConfig, firstConfig); // transfer and overwrite custom week calendars\n\n if (firstConfig.customWeeks) {\n for (var i in firstConfig.customWeeks) {\n mergedSettings.customWeeks[i] = firstConfig.customWeeks[i];\n }\n }\n\n if (secondConfig.customWeeks) {\n for (var i in secondConfig.customWeeks) {\n mergedSettings.customWeeks[i] = secondConfig.customWeeks[i];\n }\n }\n\n return mergedSettings;\n }\n};\nmodule.exports = WorkTimeCalendarMerger;","var utils = require(\"../../utils/utils\");\n\nvar createArgumentsHelper = require(\"./calendar_arguments_helper\");\n\nvar CalendarMergeHelper = require(\"./strategy/work_calendar_merger\");\n\nvar CalendarWorkTimeStrategy = require(\"./strategy/calendar_strategy\");\n\nvar legacyResourceCalendarConfig = require(\"./legacy_resource_config\");\n\nvar dynamicResourceCalendars = require(\"./dynamic_resource_calendars\")();\n\nfunction CalendarManager(gantt) {\n this.$gantt = gantt;\n this._calendars = {};\n this._legacyConfig = undefined;\n this.$gantt.attachEvent(\"onGanttReady\", function () {\n if (this.$gantt.config.resource_calendars) {\n this._isLegacyConfig = legacyResourceCalendarConfig.isLegacyResourceCalendarFormat(this.$gantt.config.resource_calendars);\n }\n }.bind(this));\n this.$gantt.attachEvent(\"onBeforeGanttReady\", function () {\n this.createDefaultCalendars();\n }.bind(this));\n this.$gantt.attachEvent(\"onBeforeGanttRender\", function () {\n this.createDefaultCalendars();\n }.bind(this));\n}\n\nCalendarManager.prototype = {\n _calendars: {},\n _convertWorkTimeSettings: function _convertWorkTimeSettings(settings) {\n var days = settings.days;\n\n if (days && !settings.dates) {\n settings.dates = settings.dates || {};\n\n for (var i = 0; i < days.length; i++) {\n settings.dates[i] = days[i];\n\n if (!(days[i] instanceof Array)) {\n settings.dates[i] = !!days[i];\n }\n }\n }\n\n delete settings.days;\n return settings;\n },\n mergeCalendars: function mergeCalendars() {\n var calendars = [];\n var args = arguments;\n\n if (Array.isArray(args[0])) {\n calendars = args[0].slice();\n } else {\n for (var i = 0; i < arguments.length; i++) {\n calendars.push(arguments[i]);\n }\n }\n\n var mergeHelper = new CalendarMergeHelper();\n var result;\n calendars.forEach(function (calendar) {\n if (!result) {\n result = calendar;\n } else {\n result = this._createCalendarFromConfig(mergeHelper.merge(result, calendar));\n }\n }.bind(this));\n return this.createCalendar(result);\n },\n _createCalendarFromConfig: function _createCalendarFromConfig(config) {\n var apiCore = new CalendarWorkTimeStrategy(this.$gantt, createArgumentsHelper(this.$gantt));\n apiCore.id = String(utils.uid());\n\n var preparedConfig = this._convertWorkTimeSettings(config);\n\n if (preparedConfig.customWeeks) {\n for (var i in preparedConfig.customWeeks) {\n preparedConfig.customWeeks[i] = this._convertWorkTimeSettings(preparedConfig.customWeeks[i]);\n }\n }\n\n apiCore._setConfig(preparedConfig);\n\n return apiCore;\n },\n createCalendar: function createCalendar(parentCalendar) {\n var settings;\n\n if (!parentCalendar) {\n parentCalendar = {};\n }\n\n if (parentCalendar.getConfig) {\n settings = utils.copy(parentCalendar.getConfig());\n } else if (parentCalendar.worktime) {\n settings = utils.copy(parentCalendar.worktime);\n } else {\n settings = utils.copy(parentCalendar);\n }\n\n var defaults = utils.copy(this.defaults.fulltime.worktime);\n utils.mixin(settings, defaults);\n return this._createCalendarFromConfig(settings);\n },\n getCalendar: function getCalendar(id) {\n id = id || \"global\";\n var calendar = this._calendars[id];\n\n if (!calendar) {\n this.createDefaultCalendars();\n calendar = this._calendars[id];\n }\n\n return calendar;\n },\n getCalendars: function getCalendars() {\n var res = [];\n\n for (var i in this._calendars) {\n res.push(this.getCalendar(i));\n }\n\n return res;\n },\n _getOwnCalendar: function _getOwnCalendar(task) {\n var config = this.$gantt.config;\n\n if (task[config.calendar_property]) {\n return this.getCalendar(task[config.calendar_property]);\n }\n\n if (config.resource_calendars) {\n var calendar;\n var calendarId;\n var resourceProperty;\n\n if (this._legacyConfig === false) {\n resourceProperty = config.resource_property;\n } else {\n resourceProperty = legacyResourceCalendarConfig.getResourceProperty(config);\n }\n\n if (Array.isArray(task[resourceProperty])) {\n // if multiple resources are attached to the task - merge their calendars\n if (config.dynamic_resource_calendars) {\n calendarId = dynamicResourceCalendars.getCalendarIdFromMultipleResources(task[resourceProperty], this);\n }\n } else {\n if (this._legacyConfig === undefined) {\n this._legacyConfig = legacyResourceCalendarConfig.isLegacyResourceCalendarFormat(config.resource_calendars);\n }\n\n if (this._legacyConfig) {\n var calendarId = legacyResourceCalendarConfig.getCalendarIdFromLegacyConfig(task, config.resource_calendars);\n } else if (resourceProperty && task[resourceProperty] && config.resource_calendars[task[resourceProperty]]) {\n var calendar = this.getResourceCalendar(task[resourceProperty]);\n }\n }\n\n if (calendarId) {\n calendar = this.getCalendar(calendarId);\n }\n\n if (calendar) {\n return calendar;\n }\n }\n\n return null;\n },\n\n /**\r\n * Returns calendar assigned to the specified resource.\r\n * Returns the global calendar if no custom calendar is associated with the resource.\r\n * @param {(string|number|Object)} resource - resource object or resource id\r\n * @returns {object} Calendar object\r\n */\n getResourceCalendar: function getResourceCalendar(resource) {\n if (resource === null || resource === undefined) {\n return this.getCalendar();\n }\n\n var resourceId = null; // if task id is provided\n\n if (typeof resource === \"number\" || typeof resource === \"string\") {\n resourceId = resource;\n } else {\n resourceId = resource.id || resource.key;\n }\n\n var config = this.$gantt.config;\n var calendarsConfig = config.resource_calendars;\n var calendarId = null;\n\n if (calendarsConfig) {\n if (this._legacyConfig === undefined) {\n this._legacyConfig = legacyResourceCalendarConfig.isLegacyResourceCalendarFormat(config.resource_calendars);\n }\n\n if (this._legacyConfig) {\n for (var field in calendarsConfig) {\n if (calendarsConfig[field][resourceId]) {\n calendarId = calendarsConfig[field][resourceId];\n break;\n }\n }\n } else {\n var calendarId = calendarsConfig[resourceId];\n }\n\n if (calendarId) {\n return this.getCalendar(calendarId);\n }\n }\n\n return this.getCalendar();\n },\n\n /**\r\n * Returns the calendar assigned to a task.\r\n * - Returns a calendar assigned via task[gantt.config.calendar_property] if specified.\r\n * - Returns a calendar assigned to the task resource if specified.\r\n * - Returns the global calendar otherwise.\r\n * @param {(string|number|Object)} task - task object or task id\r\n * @returns {object} Calendar object\r\n */\n getTaskCalendar: function getTaskCalendar(task) {\n var gantt = this.$gantt;\n var taskObject;\n\n if (task === null || task === undefined) {\n return this.getCalendar();\n } // if task id is provided\n\n\n if ((typeof task === \"number\" || typeof task === \"string\") && gantt.isTaskExists(task)) {\n taskObject = gantt.getTask(task);\n } else {\n taskObject = task;\n }\n\n if (!taskObject) {\n return this.getCalendar();\n }\n\n var calendar = this._getOwnCalendar(taskObject);\n\n var groupMode = !!gantt.getState().group_mode;\n\n if (!calendar && gantt.config.inherit_calendar && gantt.isTaskExists(taskObject.parent)) {\n // GS-1579 group mode overrides tree hierarchy, iterate using `.parent` property, instead of using eachParent iterator\n var currentTask = taskObject;\n\n while (gantt.isTaskExists(currentTask.parent)) {\n currentTask = gantt.getTask(currentTask.parent);\n\n if (gantt.isSummaryTask(currentTask)) {\n calendar = this._getOwnCalendar(currentTask);\n\n if (calendar) {\n break;\n }\n }\n }\n\n if (groupMode && !calendar) {\n // if group mode and inherit_calendars is enabled - preserve previously applied parent calendar\n // we may need it when groupBy parses grouped data, old parent may be not loaded yet\n if (task.$effective_calendar) {\n calendar = this.getCalendar(task.$effective_calendar);\n }\n }\n }\n\n return calendar || this.getCalendar();\n },\n addCalendar: function addCalendar(calendar) {\n // puts new calendar to Global Storage - gantt.calendarManager._calendars {}\n if (!this.isCalendar(calendar)) {\n var id = calendar.id;\n calendar = this.createCalendar(calendar);\n calendar.id = id;\n } // validate/check if empty calendar\n\n\n if (!calendar._tryChangeCalendarSettings(function () {})) {\n this.$gantt.callEvent(\"onCalendarError\", [{\n message: \"Invalid calendar settings, no worktime available\"\n }, calendar]);\n return null;\n } else {\n var config = this.$gantt.config;\n calendar.id = calendar.id || utils.uid();\n this._calendars[calendar.id] = calendar;\n if (!config.worktimes) config.worktimes = {};\n config.worktimes[calendar.id] = calendar.getConfig();\n return calendar.id;\n }\n },\n deleteCalendar: function deleteCalendar(calendar) {\n var config = this.$gantt.config;\n if (!calendar) return false;\n\n if (this._calendars[calendar]) {\n delete this._calendars[calendar];\n if (config.worktimes && config.worktimes[calendar]) delete config.worktimes[calendar];\n return true;\n } else {\n return false;\n }\n },\n restoreConfigCalendars: function restoreConfigCalendars(configs) {\n for (var i in configs) {\n if (this._calendars[i]) continue;\n var settings = configs[i];\n var calendar = this.createCalendar(settings);\n calendar.id = i;\n this.addCalendar(calendar);\n }\n },\n defaults: {\n global: {\n id: \"global\",\n worktime: {\n hours: [8, 12, 13, 17],\n days: [0, 1, 1, 1, 1, 1, 0]\n }\n },\n fulltime: {\n id: \"fulltime\",\n worktime: {\n hours: [0, 24],\n days: [1, 1, 1, 1, 1, 1, 1]\n }\n }\n },\n createDefaultCalendars: function createDefaultCalendars() {\n var config = this.$gantt.config;\n this.restoreConfigCalendars(this.defaults);\n this.restoreConfigCalendars(config.worktimes);\n },\n isCalendar: function isCalendar(possibleCalendar) {\n // because we don't have any way to check without dependency to CalendarWorkTimeStrategy\n var props = [possibleCalendar.isWorkTime, possibleCalendar.setWorkTime, possibleCalendar.getWorkHours, possibleCalendar.unsetWorkTime, possibleCalendar.getClosestWorkTime, possibleCalendar.calculateDuration, possibleCalendar.hasDuration, possibleCalendar.calculateEndDate];\n return props.every(function (entry) {\n return entry instanceof Function;\n });\n }\n};\nmodule.exports = CalendarManager;","var CalendarManager = require(\"./calendar_manager\"),\n TimeCalculator = require(\"./time_calculator\"),\n worktimeFacadeFactory = require(\"../facades/worktime_calendars\"),\n utils = require(\"../../utils/utils\");\n\nmodule.exports = function (gantt) {\n var manager = new CalendarManager(gantt),\n timeCalculator = new TimeCalculator(manager);\n var facade = worktimeFacadeFactory.create(manager, timeCalculator);\n utils.mixin(gantt, facade);\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar helpers = require(\"../../utils/helpers\");\n\nmodule.exports = function (gantt) {\n gantt.load = function () {\n throw new Error(\"gantt.load() method is not available in the node.js, use gantt.parse() instead\");\n };\n\n gantt.parse = function (data, type) {\n this.on_load({\n xmlDoc: {\n responseText: data\n }\n }, type);\n };\n\n gantt.serialize = function (type) {\n type = type || \"json\";\n return this[type].serialize();\n };\n /*\r\n tasks and relations\r\n {\r\n data:[\r\n \t{\r\n \t\t\"id\":\"string\",\r\n \t\t\"text\":\"...\",\r\n \t\t\"start_date\":\"Date or string\",\r\n \t\t\"end_date\":\"Date or string\",\r\n \t\t\"duration\":\"number\",\r\n \t\t\"progress\":\"0..1\",\r\n \t\t\"parent_id\":\"string\",\r\n \t\t\"order\":\"number\"\r\n \t},...],\r\n links:[\r\n \t{\r\n \t\tid:\"string\",\r\n \t\tsource:\"string\",\r\n \t\ttarget:\"string\",\r\n \t\ttype:\"string\"\r\n \t},...],\r\n collections:{\r\n \t\tcollectionName:[\r\n \t\t\t{key:, label:, optional:...},...\r\n \t\t],...\r\n \t}\r\n }\r\n \n * */\n\n\n gantt.on_load = function (resp, type) {\n if (resp.xmlDoc && resp.xmlDoc.status === 404) {\n // work if we don't have a file at current url\n this.assert(false, \"Failed to load the data from \" + resp.xmlDoc.responseURL + \", server returns 404\");\n return;\n }\n\n if (gantt.$destroyed) {\n return;\n }\n\n this.callEvent(\"onBeforeParse\", []);\n if (!type) type = \"json\";\n this.assert(this[type], \"Invalid data type:'\" + type + \"'\");\n var raw = resp.xmlDoc.responseText;\n var data = this[type].parse(raw, resp);\n\n this._process_loading(data);\n };\n\n function attachAssignmentsToTasks(tasks, assignments) {\n var assignmentsByTasks = {};\n assignments.forEach(function (a) {\n if (!assignmentsByTasks[a.task_id]) {\n assignmentsByTasks[a.task_id] = [];\n }\n\n assignmentsByTasks[a.task_id].push(a);\n });\n tasks.forEach(function (t) {\n t[gantt.config.resource_property] = assignmentsByTasks[t.id] || [];\n });\n }\n\n gantt._process_loading = function (data) {\n if (data.collections) this._load_collections(data.collections);\n\n if (data.resources && this.$data.resourcesStore) {\n this.$data.resourcesStore.parse(data.resources);\n }\n\n var tasks = data.data || data.tasks;\n\n if (data.assignments) {\n attachAssignmentsToTasks(tasks, data.assignments);\n }\n\n this.$data.tasksStore.parse(tasks);\n var links = data.links || (data.collections ? data.collections.links : []);\n this.$data.linksStore.parse(links); //this._sync_links();\n\n this.callEvent(\"onParse\", []);\n this.render();\n };\n\n gantt._load_collections = function (collections) {\n var collections_loaded = false;\n\n for (var key in collections) {\n if (collections.hasOwnProperty(key)) {\n collections_loaded = true;\n var collection = collections[key]; // GS-1728. Create an empty serverList if it doesn't exist\n\n this.serverList[key] = this.serverList[key] || [];\n var arr = this.serverList[key];\n if (!arr) continue;\n arr.splice(0, arr.length); //clear old options\n\n for (var j = 0; j < collection.length; j++) {\n var option = collection[j];\n var obj = this.copy(option);\n obj.key = obj.value; // resulting option object\n\n for (var option_key in option) {\n if (option.hasOwnProperty(option_key)) {\n if (option_key == \"value\" || option_key == \"label\") continue;\n obj[option_key] = option[option_key]; // obj['value'] = option['value']\n }\n }\n\n arr.push(obj);\n }\n }\n }\n\n if (collections_loaded) this.callEvent(\"onOptionsLoad\", []);\n };\n\n gantt.attachEvent(\"onBeforeTaskDisplay\", function (id, task) {\n return !task.$ignore;\n });\n\n function jsonParseError(data) {\n gantt.assert(false, \"Can't parse data: incorrect value of gantt.parse or gantt.load method. \" + \"Actual argument value: \" + JSON.stringify(data));\n throw new Error(\"Invalid argument for gantt.parse or gantt.load. An object or a JSON string of format https://docs.dhtmlx.com/gantt/desktop__supported_data_formats.html#json is expected. Actual argument value: \" + JSON.stringify(data));\n }\n\n gantt.json = {\n parse: function parse(data) {\n if (!data) {\n jsonParseError(data);\n }\n\n if (typeof data == \"string\") {\n if ((typeof JSON === \"undefined\" ? \"undefined\" : _typeof(JSON)) != undefined) {\n try {\n data = JSON.parse(data);\n } catch (e) {\n jsonParseError(data);\n }\n } else {\n gantt.assert(false, \"JSON is not supported\");\n }\n }\n\n if (!data.data && !data.tasks) {\n jsonParseError(data);\n }\n\n if (data.dhx_security) gantt.security_key = data.dhx_security;\n return data;\n },\n serializeTask: function serializeTask(task) {\n return this._copyObject(task);\n },\n serializeLink: function serializeLink(link) {\n return this._copyLink(link);\n },\n _copyLink: function _copyLink(obj) {\n var copy = {};\n\n for (var key in obj) {\n copy[key] = obj[key];\n }\n\n return copy;\n },\n _copyObject: function _copyObject(obj) {\n var copy = {};\n\n for (var key in obj) {\n if (key.charAt(0) == \"$\") continue;\n copy[key] = obj[key];\n\n if (helpers.isDate(copy[key])) {\n copy[key] = gantt.defined(gantt.templates.xml_format) ? gantt.templates.xml_format(copy[key]) : gantt.templates.format_date(copy[key]);\n }\n }\n\n return copy;\n },\n serialize: function serialize() {\n var tasks = [];\n var links = [];\n gantt.eachTask(function (obj) {\n gantt.resetProjectDates(obj);\n tasks.push(this.serializeTask(obj));\n }, gantt.config.root_id, this);\n var rawLinks = gantt.getLinks();\n\n for (var i = 0; i < rawLinks.length; i++) {\n links.push(this.serializeLink(rawLinks[i]));\n }\n\n return {\n data: tasks,\n links: links\n };\n }\n };\n /*\r\n \r\n \t\r\n \t\tMy task 1\r\n \t\t16.08.2013\r\n \t\t22.08.2013\r\n \t\r\n \t\r\n \t\t\r\n \t\t\t\r\n \t\t\r\n \t\r\n \r\n */\n\n function xmlParseError(data) {\n gantt.assert(false, \"Can't parse data: incorrect value of gantt.parse or gantt.load method. \" + \"Actual argument value: \" + JSON.stringify(data));\n throw new Error(\"Invalid argument for gantt.parse or gantt.load. An XML of format https://docs.dhtmlx.com/gantt/desktop__supported_data_formats.html#xmldhtmlxgantt20 is expected. Actual argument value: \" + JSON.stringify(data));\n }\n\n gantt.xml = {\n _xmlNodeToJSON: function _xmlNodeToJSON(node, attrs_only) {\n var t = {};\n\n for (var i = 0; i < node.attributes.length; i++) {\n t[node.attributes[i].name] = node.attributes[i].value;\n }\n\n if (!attrs_only) {\n for (var i = 0; i < node.childNodes.length; i++) {\n var child = node.childNodes[i];\n if (child.nodeType == 1) t[child.tagName] = child.firstChild ? child.firstChild.nodeValue : \"\";\n }\n\n if (!t.text) t.text = node.firstChild ? node.firstChild.nodeValue : \"\";\n }\n\n return t;\n },\n _getCollections: function _getCollections(loader) {\n var collection = {};\n var opts = gantt.ajax.xpath(\"//coll_options\", loader);\n\n for (var i = 0; i < opts.length; i++) {\n var bind = opts[i].getAttribute(\"for\");\n var arr = collection[bind] = [];\n var itms = gantt.ajax.xpath(\".//item\", opts[i]);\n\n for (var j = 0; j < itms.length; j++) {\n var itm = itms[j];\n var attrs = itm.attributes;\n var obj = {\n key: itms[j].getAttribute(\"value\"),\n label: itms[j].getAttribute(\"label\")\n };\n\n for (var k = 0; k < attrs.length; k++) {\n var attr = attrs[k];\n if (attr.nodeName == \"value\" || attr.nodeName == \"label\") continue;\n obj[attr.nodeName] = attr.nodeValue;\n }\n\n arr.push(obj);\n }\n }\n\n return collection;\n },\n _getXML: function _getXML(text, loader, toptag) {\n toptag = toptag || \"data\";\n\n if (!loader.getXMLTopNode) {\n loader = gantt.ajax.parse(loader);\n }\n\n var xml = gantt.ajax.xmltop(toptag, loader.xmlDoc);\n\n if (!xml || xml.tagName != toptag) {\n xmlParseError(text);\n }\n\n var skey = xml.getAttribute(\"dhx_security\");\n if (skey) gantt.security_key = skey;\n return xml;\n },\n parse: function parse(text, loader) {\n loader = this._getXML(text, loader);\n var data = {};\n var evs = data.data = [];\n var xml = gantt.ajax.xpath(\"//task\", loader);\n\n for (var i = 0; i < xml.length; i++) {\n evs[i] = this._xmlNodeToJSON(xml[i]);\n }\n\n data.collections = this._getCollections(loader);\n return data;\n },\n _copyLink: function _copyLink(obj) {\n return \"\";\n },\n _copyObject: function _copyObject(obj) {\n return \"\";\n },\n serialize: function serialize() {\n var tasks = [];\n var links = [];\n var json = gantt.json.serialize();\n\n for (var i = 0, len = json.data.length; i < len; i++) {\n tasks.push(this._copyObject(json.data[i]));\n }\n\n for (var i = 0, len = json.links.length; i < len; i++) {\n links.push(this._copyLink(json.links[i]));\n }\n\n return \"\" + tasks.join(\"\") + \"\" + links.join(\"\") + \"\";\n }\n };\n gantt.oldxml = {\n parse: function parse(text, loader) {\n loader = gantt.xml._getXML(text, loader, \"projects\");\n var data = {\n collections: {\n links: []\n }\n };\n var evs = data.data = [];\n var xml = gantt.ajax.xpath(\"//task\", loader);\n\n for (var i = 0; i < xml.length; i++) {\n evs[i] = gantt.xml._xmlNodeToJSON(xml[i]);\n var parent = xml[i].parentNode;\n if (parent.tagName == \"project\") evs[i].parent = \"project-\" + parent.getAttribute(\"id\");else evs[i].parent = parent.parentNode.getAttribute(\"id\");\n }\n\n xml = gantt.ajax.xpath(\"//project\", loader);\n\n for (var i = 0; i < xml.length; i++) {\n var ev = gantt.xml._xmlNodeToJSON(xml[i], true);\n\n ev.id = \"project-\" + ev.id;\n evs.push(ev);\n }\n\n for (var i = 0; i < evs.length; i++) {\n var ev = evs[i];\n ev.start_date = ev.startdate || ev.est;\n ev.end_date = ev.enddate;\n ev.text = ev.name;\n ev.duration = ev.duration / 8;\n ev.open = 1;\n if (!ev.duration && !ev.end_date) ev.duration = 1;\n if (ev.predecessortasks) data.collections.links.push({\n target: ev.id,\n source: ev.predecessortasks,\n type: gantt.config.links.finish_to_start\n });\n }\n\n return data;\n },\n serialize: function serialize() {\n gantt.message(\"Serialization to 'old XML' is not implemented\");\n }\n };\n\n gantt.serverList = function (name, array) {\n if (array) {\n this.serverList[name] = array.slice(0);\n } else if (!this.serverList[name]) {\n this.serverList[name] = [];\n }\n\n return this.serverList[name];\n };\n};","module.exports = function (gantt) {\n gantt.isReadonly = function (item) {\n if ((typeof item == \"number\" || typeof item == \"string\") && gantt.isTaskExists(item)) {\n item = gantt.getTask(item);\n }\n\n if (item && item[this.config.editable_property]) {\n return false;\n } else {\n return item && item[this.config.readonly_property] || this.config.readonly;\n }\n };\n};","module.exports = function (gantt) {\n gantt.getGridColumn = function (name) {\n var columns = gantt.config.columns;\n\n for (var i = 0; i < columns.length; i++) {\n if (columns[i].name == name) return columns[i];\n }\n\n return null;\n };\n\n gantt.getGridColumns = function () {\n return gantt.config.columns.slice();\n };\n};","const SENSITIVITY = 20;\r\nconst TIMEOUT = 50;\r\nconst SCROLLSTEP = 10;\r\n\r\nexport default class ScrollableGrid {\r\n\tpublic getCurrentX;\r\n\tprivate $gantt;\r\n\tprivate $grid;\r\n\tprivate _dnd;\r\n\tprivate _scrollView;\r\n\tprivate _scrollOrder: 0 | 1 | -1 = 0;\r\n\r\n\tconstructor(params) {\r\n\t\tconst {gantt, grid, dnd, getCurrentX} = params;\r\n\t\tthis.$gantt = gantt;\r\n\t\tthis.$grid = grid;\r\n\t\tthis._dnd = dnd;\r\n\t\tthis.getCurrentX = getCurrentX;\r\n\t\tthis._scrollView = this.$gantt.$ui.getView(this.$grid.$config.scrollX);\r\n\t\tthis.attachEvents();\r\n\t}\r\n\tattachEvents() {\r\n\t\tif (this.isScrollable()) {\r\n\t\t\tthis._dnd.attachEvent(\"onDragMove\", (obj, e) => {\r\n\t\t\t\tconst gridBoundingRect = this.$grid.$grid.getBoundingClientRect();\r\n\t\t\t\tconst maxLeft = gridBoundingRect.right;\r\n\t\t\t\tconst minLeft = gridBoundingRect.left;\r\n\t\t\t\tconst currentX = this.getCurrentX(e.clientX);\r\n\r\n\t\t\t\tif (currentX >= maxLeft - SENSITIVITY) {\r\n\t\t\t\t\tthis.autoscrollRight();\r\n\t\t\t\t\tthis.autoscrollStart();\r\n\t\t\t\t}\r\n\t\t\t\tif (currentX <= minLeft + SENSITIVITY) {\r\n\t\t\t\t\tthis.autoscrollLeft();\r\n\t\t\t\t\tthis.autoscrollStart();\r\n\t\t\t\t}\r\n\t\t\t\tif (currentX < maxLeft - SENSITIVITY && currentX > minLeft + SENSITIVITY) {\r\n\t\t\t\t\tthis.autoscrollStop();\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t\tthis._dnd.attachEvent(\"onDragEnd\", () => {\r\n\t\t\t\tthis.autoscrollStop();\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\tautoscrollStart() {\r\n\t\tif (this._scrollOrder === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst scrollStep = SCROLLSTEP * this._scrollOrder;\r\n\t\tconst scrollState = this._scrollView.getScrollState();\r\n\t\tthis._scrollView.scrollTo(scrollState.position + scrollStep);\r\n\t\tsetTimeout(() => { this.autoscrollStart(); }, TIMEOUT);\r\n\t}\r\n\tautoscrollRight() {\r\n\t\tthis._scrollOrder = 1;\r\n\t}\r\n\tautoscrollLeft() {\r\n\t\tthis._scrollOrder = -1;\r\n\t}\r\n\tautoscrollStop() {\r\n\t\tthis._scrollOrder = 0;\r\n\t}\r\n\tgetCorrection() {\r\n\t\tif (!this.isScrollable()) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn this._scrollView.getScrollState().position;\r\n\t}\r\n\tisScrollable() {\r\n\t\treturn !!this.$grid.$config.scrollable;\r\n\t}\r\n}","import * as domHelpers from \"../../utils/dom_helpers\";\r\nimport ScrollableGrid from \"./scrollable_grid\";\r\n\r\nconst COLUMN_ID_ATTR_NAME = \"data-column-id\";\r\n\r\nexport class ColumnsGridDnd {\r\n\tprivate $gantt;\r\n\tprivate $grid;\r\n\tprivate _dragX;\r\n\tprivate _dnd;\r\n\tprivate _originAutoscroll;\r\n\tprivate _scrollableGrid: ScrollableGrid;\r\n\tprivate _draggedCell;\r\n\tprivate _targetMarker = null;\r\n\tprivate _gridConfig;\r\n\tconstructor(gantt, grid) {\r\n\t\tthis.$gantt = gantt;\r\n\t\tthis.$grid = grid;\r\n\t}\r\n\tinit() {\r\n\t\tconst DND = this.$gantt.$services.getService(\"dnd\");\r\n\t\tthis._dnd = new DND(this.$grid.$grid_scale, { updates_per_second: 60 });\r\n\t\tthis._scrollableGrid = new ScrollableGrid({\r\n\t\t\tgantt: this.$gantt,\r\n\t\t\tgrid: this.$grid,\r\n\t\t\tdnd: this._dnd,\r\n\t\t\tgetCurrentX: this.calculateCurrentPosition\r\n\t\t});\r\n\t\tthis.attachEvents();\r\n\t}\r\n\tattachEvents() {\r\n\t\tthis._dnd.attachEvent(\"onBeforeDragStart\", (obj, e) => {\r\n\t\t\tthis._draggedCell = this.$gantt.utils.dom.closest(e.target, \".gantt_grid_head_cell\");\r\n\t\t\tif(!this._draggedCell){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst columns = this.$grid.$getConfig().columns;\r\n\t\t\tconst columnName = this._draggedCell.getAttribute(COLUMN_ID_ATTR_NAME);\r\n\t\t\tlet draggedColumn;\r\n\t\t\tlet draggedIndex;\r\n\t\t\tcolumns.map(function(column, index){\r\n\t\t\t\tif(column.name === columnName){\r\n\t\t\t\t\tdraggedColumn = column;\r\n\t\t\t\t\tdraggedIndex = index;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif (this.$grid.callEvent(\"onBeforeColumnDragStart\", [{ draggedColumn, draggedIndex}]) === false) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tif (!this._draggedCell || !draggedColumn) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tthis._gridConfig = this.$grid.$getConfig();\r\n\t\t\tthis._originAutoscroll = this.$gantt.config.autoscroll;\r\n\t\t\tthis.$gantt.config.autoscroll = false;\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tthis._dnd.attachEvent(\"onAfterDragStart\", (obj, e) => {\r\n\t\t\tif (!this._draggedCell) {\r\n\t\t\t\treturn; // GS-1333: don't try to reorder a column when we resize it\r\n\t\t\t}\r\n\t\t\tthis._dnd.config.column = this._draggedCell.getAttribute(COLUMN_ID_ATTR_NAME);\r\n\t\t\tthis._dnd.config.marker.innerHTML = this._draggedCell.outerHTML;\r\n\t\t\tthis._dnd.config.marker.classList.add(\"gantt_column_drag_marker\");\r\n\t\t\tthis._dnd.config.marker.style.height = this._gridConfig.scale_height + \"px\";\r\n\t\t\tthis._dnd.config.marker.style.lineHeight = this._gridConfig.scale_height + \"px\";\r\n\t\t\tthis._draggedCell.classList.add(\"gantt_grid_head_cell_dragged\");\r\n\t\t});\r\n\r\n\t\tthis._dnd.attachEvent(\"onDragMove\", (obj, e) => {\r\n\t\t\tif(!this._draggedCell){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tthis._dragX = e.clientX;\r\n\t\t\tconst x = this.calculateCurrentPosition(e.clientX);\r\n\t\t\tconst columnIndexes = this.findColumnsIndexes();\r\n\t\t\tconst targetIndex = columnIndexes.targetIndex;\r\n\t\t\tconst draggedIndex = columnIndexes.draggedIndex;\r\n\t\t\tconst columns = this.$grid.$getConfig().columns;\r\n\r\n\t\t\tconst draggedColumn = columns[draggedIndex];\r\n\t\t\tconst targetColumn = columns[targetIndex];\r\n\t\t\tif (this.$grid.callEvent(\"onColumnDragMove\", [{ draggedColumn, targetColumn, draggedIndex, targetIndex }]) === false) {\r\n\t\t\t\tthis.cleanTargetMarker();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tthis.setMarkerPosition(x);\r\n\t\t\tthis.drawTargetMarker(columnIndexes);\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tthis._dnd.attachEvent(\"onDragEnd\", () => {\r\n\t\t\tif (!this._draggedCell) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tthis.$gantt.config.autoscroll = this._originAutoscroll;\r\n\t\t\tthis._draggedCell.classList.remove(\"gantt_grid_head_cell_dragged\");\r\n\t\t\tthis.cleanTargetMarker();\r\n\t\t\tthis.reorderColumns();\r\n\t\t});\r\n\r\n\t}\r\n\treorderColumns() {\r\n\t\tconst { targetIndex, draggedIndex } = this.findColumnsIndexes();\r\n\r\n\t\tconst columns = this.$grid.$getConfig().columns;\r\n\t\tconst draggedColumn = columns[draggedIndex];\r\n\t\tconst targetColumn = columns[targetIndex];\r\n\r\n\t\tif (this.$grid.callEvent(\"onBeforeColumnReorder\", [{ draggedColumn, targetColumn, draggedIndex, targetIndex }]) === false) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (targetIndex === draggedIndex) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcolumns.splice(draggedIndex, 1);\r\n\t\tcolumns.splice(targetIndex, 0, draggedColumn);\r\n\t\tthis.$gantt.render();\r\n\t\tthis.$grid.callEvent(\"onAfterColumnReorder\", [{ draggedColumn, targetColumn, draggedIndex, targetIndex }]);\r\n\t}\r\n\tfindColumnsIndexes() {\r\n\t\tconst draggedId = this._dnd.config.column;\r\n\t\tconst columns = this.$grid.$getConfig().columns;\r\n\t\tlet targetIndex: number;\r\n\t\tlet draggedIndex: number;\r\n\t\tlet xBefore: number;\r\n\t\tlet xAfter: number;\r\n\t\tconst currentColumn = { startX: 0, endX: 0 };\r\n\r\n\t\tlet start = 0;\r\n\t\tlet end = columns.length - 1;\r\n\t\tlet compare = (a, b) => a <= b;\r\n\t\tlet next = (index) => ++index;\r\n\t\tif (this.$gantt.config.rtl) {\r\n\t\t\tstart = columns.length - 1;\r\n\t\t\tend = 0;\r\n\t\t\tcompare = (a, b) => a >= b;\r\n\t\t\tnext = (index) => --index;\r\n\t\t}\r\n\r\n\t\tlet columnRelativePos: number;\r\n\r\n\t\tconst relativeX = this._dragX - this.$grid.$grid.getBoundingClientRect().left + this._scrollableGrid.getCorrection();\r\n\t\tfor (let i = start; compare(i, end); i = next(i)) {\r\n\t\t\tif (targetIndex !== undefined && draggedIndex !== undefined) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(!columns[i].hide) {\r\n\t\t\t\tcurrentColumn.startX = currentColumn.endX;\r\n\t\t\t\tcurrentColumn.endX += columns[i].width;\r\n\r\n\t\t\t\t// if drop on a column or drop after the last column\r\n\t\t\t\tif (relativeX >= currentColumn.startX && (relativeX <= currentColumn.endX || !compare(next(i), end))) {\r\n\t\t\t\t\ttargetIndex = i;\r\n\t\t\t\t\txBefore = currentColumn.startX;\r\n\t\t\t\t\txAfter = currentColumn.endX;\r\n\t\t\t\t\tcolumnRelativePos = (relativeX - currentColumn.startX) / (currentColumn.endX - currentColumn.startX);\r\n\t\t\t\t}\r\n\t\t\t\tif (draggedId === columns[i].name) {\r\n\t\t\t\t\tdraggedIndex = i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttargetIndex,\r\n\t\t\tdraggedIndex,\r\n\t\t\txBefore,\r\n\t\t\txAfter,\r\n\t\t\tcolumnRelativePos\r\n\t\t};\r\n\t}\r\n\tsetMarkerPosition(x: number, y: number = 10) {\r\n\t\tconst { marker } = this._dnd.config;\r\n\t\tconst gridOffset = this._dnd._obj.getBoundingClientRect();\r\n\t\tmarker.style.top = `${gridOffset.y + y}px`;\r\n\t\tmarker.style.left = `${x}px`;\r\n\t}\r\n\tcalculateCurrentPosition = (eventX: number) => {\r\n\t\tconst gridBoundingRect = this.$grid.$grid.getBoundingClientRect();\r\n\t\tconst maxLeft = gridBoundingRect.right;\r\n\t\tconst minLeft = gridBoundingRect.left;\r\n\t\tlet x = eventX;\r\n\t\tif (x > maxLeft) {\r\n\t\t\tx = maxLeft;\r\n\t\t}\r\n\t\tif (x < minLeft) {\r\n\t\t\tx = minLeft;\r\n\t\t}\r\n\t\treturn x;\r\n\t}\r\n\tdrawTargetMarker({ targetIndex, draggedIndex, xBefore, xAfter, columnRelativePos }) {\r\n\t\tif (!this._targetMarker) {\r\n\t\t\tthis._targetMarker = document.createElement(\"div\");\r\n\t\t\tdomHelpers.addClassName(this._targetMarker, \"gantt_grid_target_marker\");\r\n\t\t\tthis._targetMarker.style.display = \"none\";\r\n\t\t\tthis._targetMarker.style.height = `${this._gridConfig.scale_height}px`;\r\n\t\t}\r\n\r\n\t\t// marker can be detached after gantt.render\r\n\t\tif(!this._targetMarker.parentNode){\r\n\t\t\tthis.$grid.$grid_scale.appendChild(this._targetMarker);\r\n\t\t}\r\n\r\n\t\tlet nextPosition: number;\r\n\t\tif (targetIndex > draggedIndex) {\r\n\t\t\tnextPosition = xAfter;\r\n\t\t} else if (targetIndex < draggedIndex) {\r\n\t\t\tnextPosition = xBefore;\r\n\t\t} else {\r\n\t\t\tif(columnRelativePos > 0.5){\r\n\t\t\t\tnextPosition = xAfter;\r\n\t\t\t}else{\r\n\t\t\t\tnextPosition = xBefore;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._targetMarker.style.left = `${nextPosition}px`;\r\n\t\tthis._targetMarker.style.display = \"block\";\r\n\t}\r\n\tcleanTargetMarker() {\r\n\t\tif (this._targetMarker && this._targetMarker.parentNode) {\r\n\t\t\tthis.$grid.$grid_scale.removeChild(this._targetMarker);\r\n\t\t}\r\n\t\tthis._targetMarker = null;\r\n\t}\r\n}","import {ColumnsGridDnd} from \"./column_grid_dnd\";\r\nexport default ColumnsGridDnd;","var domHelpers = require(\"../utils/dom_helpers\");\n\nfunction createRowResizer(gantt, grid) {\n var _task_grid_row_resize = {\n row_before_start: gantt.bind(function (dnd, obj, e) {\n var config = grid.$getConfig();\n var store = grid.$config.rowStore;\n var el = domHelpers.locateAttribute(e, config.task_grid_row_resizer_attribute);\n if (!el) return false;\n var row_id = this.locate(e, config.task_grid_row_resizer_attribute),\n row = store.getItem(row_id);\n if (grid.callEvent(\"onBeforeRowResize\", [row]) === false) return false;\n }, gantt),\n row_after_start: gantt.bind(function (dnd, obj, e) {\n var config = grid.$getConfig();\n var row_id = this.locate(e, config.task_grid_row_resizer_attribute);\n dnd.config.marker.innerHTML = \"\";\n dnd.config.marker.className += \" gantt_row_grid_resize_area\";\n dnd.config.marker.style.width = grid.$grid.offsetWidth + \"px\";\n dnd.config.drag_id = row_id;\n }, gantt),\n row_drag_move: gantt.bind(function (dnd, obj, e) {\n var store = grid.$config.rowStore;\n var config = grid.$getConfig();\n var dd = dnd.config;\n var id = dd.drag_id,\n itemHeight = grid.getItemHeight(id),\n itemTop = grid.getItemTop(id) - obj.scrollTop;\n var pos = domHelpers.getNodePosition(grid.$grid_data),\n pointerPosition = parseInt(dd.marker.style.top, 10),\n markerStartPosition = itemTop + pos.y,\n marker_height = 0,\n minPointerPosition = config.min_task_grid_row_height;\n marker_height = pointerPosition - markerStartPosition;\n\n if (marker_height < minPointerPosition) {\n marker_height = minPointerPosition;\n }\n\n dd.marker.style.left = pos.x + \"px\";\n dd.marker.style.top = markerStartPosition - 1 + \"px\";\n dd.marker.style.height = Math.abs(marker_height) + 1 + \"px\";\n dd.marker_height = marker_height;\n grid.callEvent(\"onRowResize\", [id, store.getItem(id), marker_height + itemHeight]);\n return true;\n }, gantt),\n row_drag_end: gantt.bind(function (dnd, obj, e) {\n var store = grid.$config.rowStore;\n var dd = dnd.config;\n var id = dd.drag_id,\n item = store.getItem(id),\n oldItemHeight = grid.getItemHeight(id);\n var finalHeight = dd.marker_height;\n if (grid.callEvent(\"onBeforeRowResizeEnd\", [id, item, finalHeight]) === false) return;\n if (item.row_height == finalHeight) return;\n item.row_height = finalHeight;\n gantt.updateTask(id);\n grid.callEvent(\"onAfterRowResize\", [id, item, oldItemHeight, finalHeight]);\n this.render();\n }, gantt)\n }; // calls the initialization of the D'n'D events for resize elements\n\n var _init_resize = function _init_resize() {\n var DnD = gantt.$services.getService(\"dnd\");\n var config = grid.$getConfig();\n var dnd = new DnD(grid.$grid_data, {\n updates_per_second: 60\n });\n if (gantt.defined(config.dnd_sensitivity)) dnd.config.sensitivity = config.dnd_sensitivity;\n dnd.attachEvent(\"onBeforeDragStart\", function (obj, e) {\n return _task_grid_row_resize.row_before_start(dnd, obj, e);\n });\n dnd.attachEvent(\"onAfterDragStart\", function (obj, e) {\n return _task_grid_row_resize.row_after_start(dnd, obj, e);\n });\n dnd.attachEvent(\"onDragMove\", function (obj, e) {\n return _task_grid_row_resize.row_drag_move(dnd, obj, e);\n });\n dnd.attachEvent(\"onDragEnd\", function (obj, e) {\n return _task_grid_row_resize.row_drag_end(dnd, obj, e);\n });\n };\n\n return {\n init: _init_resize\n };\n}\n\nmodule.exports = createRowResizer;","function createHelper(view) {\n var cachedRowHeight = -1;\n var canUseSimpleCalc = -1;\n return {\n resetCache: function resetCache() {\n cachedRowHeight = -1;\n canUseSimpleCalc = -1;\n },\n _getRowHeight: function _getRowHeight() {\n if (cachedRowHeight === -1) {\n cachedRowHeight = view.$getConfig().row_height;\n }\n\n return cachedRowHeight;\n },\n _refreshState: function _refreshState() {\n this.resetCache();\n canUseSimpleCalc = true;\n var store = view.$config.rowStore;\n\n if (!store) {\n return;\n }\n\n var globalRowHeight = this._getRowHeight();\n\n for (var i = 0; i < store.fullOrder.length; i++) {\n var item = store.getItem(store.fullOrder[i]); // GS-1491: ignore the task when it is filtered:\n\n if (!item) {\n continue;\n }\n\n if (item.row_height && item.row_height !== globalRowHeight) {\n canUseSimpleCalc = false;\n break;\n }\n }\n },\n canUseSimpleCalculation: function canUseSimpleCalculation() {\n if (canUseSimpleCalc === -1) {\n this._refreshState();\n }\n\n return canUseSimpleCalc;\n },\n\n /**\r\n * Get top coordinate by row index (order)\r\n * @param {number} index\r\n */\n getRowTop: function getRowTop(index) {\n var store = view.$config.rowStore;\n\n if (!store) {\n return 0;\n }\n\n return index * this._getRowHeight();\n },\n\n /**\r\n * Get height of the item by item id\r\n * @param {*} itemId\r\n */\n getItemHeight: function getItemHeight(itemId) {\n return this._getRowHeight();\n },\n\n /**\r\n * Get total height of items\r\n */\n getTotalHeight: function getTotalHeight() {\n if (view.$config.rowStore) {\n var store = view.$config.rowStore;\n return store.countVisible() * this._getRowHeight();\n } else {\n return 0;\n }\n },\n\n /**\r\n * Get item by top position\r\n * @param {*} top\r\n */\n getItemIndexByTopPosition: function getItemIndexByTopPosition(top) {\n if (view.$config.rowStore) {\n return Math.floor(top / this._getRowHeight());\n } else {\n return 0;\n }\n }\n };\n}\n\nmodule.exports = createHelper;","function createResizer(gantt, grid) {\n return {\n init: function init() {},\n doOnRender: function doOnRender() {}\n };\n}\n\nmodule.exports = createResizer;","var Grid = require(\"./ui/grid/grid\");\n\nmodule.exports = function (gantt) {\n require(\"./grid_column_api.gpl\")(gantt);\n\n Grid.prototype.getGridColumns = function () {\n var config = this.$getConfig();\n var columns = config.columns,\n visibleColumns = [];\n\n for (var i = 0; i < columns.length; i++) {\n if (!columns[i].hide) visibleColumns.push(columns[i]);\n }\n\n return visibleColumns;\n };\n};","export default function(gantt: any){\r\n\r\n\tgantt.ext = gantt.ext || {};\r\n\tgantt.config.show_empty_state = false;\r\n\r\n\tgantt.ext.emptyStateElement = gantt.ext.emptyStateElement || {\r\n\t\tisEnabled() {\r\n\t\t\treturn gantt.config.show_empty_state === true;\r\n\t\t},\r\n\t\tisGanttEmpty(){\r\n\t\t\treturn !gantt.getTaskByTime().length;\r\n\t\t},\r\n\t\trenderContent(container){\r\n\t\t\tconst placeholderTextElement = `
\r\n \r\n
${gantt.locale.labels.empty_state_text_description}
\r\n
`;\r\n\t\t\tconst placeholderImageElement = \"
\";\r\n\r\n\t\t\tconst placeholderContainer = `
${placeholderImageElement}${placeholderTextElement}
`;\r\n\t\t\tcontainer.innerHTML = placeholderContainer;\r\n\t\t},\r\n\r\n\t\tclickEvents: [],\r\n\t\tattachAddTaskEvent(){\r\n\t\t\tconst id = gantt.attachEvent(\"onEmptyClick\", function(e){\r\n\t\t\t\tconst domHelpers = gantt.utils.dom;\r\n\t\t\t\tconst gridPlaceholder = domHelpers.closest(e.target, \"[data-empty-state-create-task]\");\r\n\t\t\t\tif (gridPlaceholder){\r\n\t\t\t\t\tgantt.createTask({\r\n\t\t\t\t\t\tid: gantt.uid(),\r\n\t\t\t\t\t\ttext: \"New Task\"\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tthis.clickEvents.push(id);\r\n\t\t},\r\n\t\tdetachAddTaskEvents(){\r\n\t\t\tthis.clickEvents.forEach(function(event){\r\n\t\t\t\tgantt.detachEvent(event);\r\n\t\t\t});\r\n\t\t\tthis.clickEvents = [];\r\n\t\t},\r\n\r\n\t\tgetContainer(){\r\n\t\t\tif (gantt.$container) {\r\n\t\t\t\tconst domHelpers = gantt.utils.dom;\r\n\t\t\t\tif (gantt.$container.contains(gantt.$grid_data)) {\r\n\t\t\t\t\treturn domHelpers.closest(gantt.$grid_data, \".gantt_layout_content\");\r\n\t\t\t\t}\r\n\t\t\t\tif (gantt.$container.contains(gantt.$task_data)){\r\n\t\t\t\t\treturn domHelpers.closest(gantt.$task_data, \".gantt_layout_content\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn null;\r\n\t\t},\r\n\r\n\t\tgetNode(){\r\n\t\t\tconst container = this.getContainer();\r\n\t\t\tif (!container){\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tconst emptyStateElementNode = container.querySelector(\".gantt_empty_state_wrapper\");\r\n\t\t\treturn emptyStateElementNode;\r\n\t\t},\r\n\r\n\t\tshow(){\r\n\t\t\tconst container = this.getContainer();\r\n\t\t\tif (!container && this.isGanttEmpty()){\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tconst wrapper = document.createElement(\"div\");\r\n\t\t\twrapper.className = \"gantt_empty_state_wrapper\";\r\n\t\t\twrapper.style.marginTop = (gantt.config.scale_height - container.offsetHeight) + \"px\";\r\n\t\t\tconst oldNodes = gantt.$container.querySelectorAll(\".gantt_empty_state_wrapper\");\r\n\t\t\t// for IE11\r\n\t\t\tArray.prototype.forEach.call(oldNodes, function(node){\r\n\t\t\t\tnode.parentNode.removeChild(node);\r\n\t\t\t});\r\n\r\n\t\t\tthis.detachAddTaskEvents();\r\n\t\t\tthis.attachAddTaskEvent();\r\n\r\n\t\t\tcontainer.appendChild(wrapper);\r\n\t\t\tthis.renderContent(wrapper);\r\n\t\t},\r\n\t\thide(){\r\n\t\t\tconst emptyStateElementNode = this.getNode();\r\n\t\t\tif (emptyStateElementNode){\r\n\t\t\t\temptyStateElementNode.parentNode.removeChild(emptyStateElementNode);\r\n\t\t\t} else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t},\r\n\t\tinit(){ }\r\n\t};\r\n\r\n\tgantt.attachEvent(\"onDataRender\", function() {\r\n\t\tconst emptyStateElement = gantt.ext.emptyStateElement;\r\n\t\tif (emptyStateElement.isEnabled() && emptyStateElement.isGanttEmpty()) {\r\n\t\t\temptyStateElement.show();\r\n\t\t} else {\r\n\t\t\temptyStateElement.hide();\r\n\t\t}\r\n\t});\r\n\r\n\r\n\r\n\r\n}\r\n","export default class LinkFormatterSimple implements ILinkFormatter {\r\n\tstatic create = (settings: ILinkFormatterConfig = null, gantt: any): LinkFormatterSimple => {\r\n\t\treturn new LinkFormatterSimple(gantt);\r\n\t}\r\n\tprotected _linkReg: RegExp;\r\n\tprotected _gantt: any;\r\n\r\n\tconstructor(gantt: any) {\r\n\t\tthis._linkReg = /^[0-9\\.]+/;\r\n\t\tthis._gantt = gantt;\r\n\t}\r\n\r\n\tformat = (link: ILink) : string => {\r\n\t\tconst wbs = this._getWBSCode(link.source);\r\n\t\treturn wbs;\r\n\t}\r\n\r\n\tcanParse = (value: string) : boolean => {\r\n\t\treturn this._linkReg.test(value);\r\n\t}\r\n\tparse = (value: string) : ILink => {\r\n\t\tif(!this.canParse(value)){\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tconst linkPart = this._linkReg.exec(value)[0].trim();\r\n\r\n\t\tconst source = this._findSource(linkPart) || null;\r\n\r\n\t\treturn {\r\n\t\t\tid: undefined,\r\n\t\t\tsource,\r\n\t\t\ttarget: null,\r\n\t\t\ttype: this._gantt.config.links.finish_to_start,\r\n\t\t\tlag: 0\r\n\t\t};\r\n\t}\r\n\r\n\tprotected _getWBSCode = (source: number | string) => {\r\n\t\tconst pred = this._gantt.getTask(source);\r\n\t\treturn this._gantt.getWBSCode(pred);\r\n\t}\r\n\r\n\tprotected _findSource = (value: string) => {\r\n\t\tconst reqTemplate = new RegExp(\"^[0-9\\.]+\", \"i\");\r\n\t\tif(reqTemplate.exec(value)){\r\n\t\t\tconst wbs = reqTemplate.exec(value)[0];\r\n\t\t\tconst task = this._gantt.getTaskByWBSCode(wbs);\r\n\t\t\tif(task){\r\n\t\t\t\treturn task.id;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n}","var DurationFormatter = require(\"../common/duration_formatter\")[\"default\"];\n\nvar LinkFormatter = require(\"../common/link_formatter\")[\"default\"];\n\nmodule.exports = function (gantt) {\n gantt.ext.formatters = {\n durationFormatter: function durationFormatter(settings) {\n if (!settings) {\n settings = {};\n }\n\n if (!settings.store) {\n settings.store = gantt.config.duration_unit;\n }\n\n if (!settings.enter) {\n settings.enter = gantt.config.duration_unit;\n }\n\n return DurationFormatter.create(settings, gantt);\n },\n linkFormatter: function linkFormatter(settings) {\n return LinkFormatter.create(settings, gantt);\n }\n };\n};","module.exports = function (gantt) {\n function isEnabled() {\n return gantt.config.auto_types && // if enabled\n gantt.getTaskType(gantt.config.types.project) == gantt.config.types.project; // and supported\n }\n\n function callIfEnabled(callback) {\n return function () {\n if (!isEnabled()) {\n return true;\n }\n\n return callback.apply(this, arguments);\n };\n }\n\n function checkTaskType(id, changedTypes) {\n var task = gantt.getTask(id);\n var targetType = getTaskTypeToUpdate(task);\n\n if (targetType !== false && gantt.getTaskType(task) !== targetType) {\n changedTypes.$needsUpdate = true;\n changedTypes[task.id] = {\n task: task,\n type: targetType\n };\n }\n }\n\n function getUpdatedTypes(id, changedTypes) {\n changedTypes = changedTypes || {};\n checkTaskType(id, changedTypes);\n gantt.eachParent(function (parent) {\n checkTaskType(parent.id, changedTypes);\n }, id);\n return changedTypes;\n }\n\n function applyChanges(changedTypes) {\n for (var i in changedTypes) {\n if (changedTypes[i] && changedTypes[i].task) {\n var task = changedTypes[i].task;\n task.type = changedTypes[i].type;\n gantt.updateTask(task.id);\n }\n }\n }\n\n function updateParentTypes(startId) {\n if (gantt.getState().group_mode) {\n return;\n }\n\n var changedTypes = getUpdatedTypes(startId);\n\n if (changedTypes.$needsUpdate) {\n gantt.batchUpdate(function () {\n applyChanges(changedTypes);\n });\n }\n }\n\n var delTaskParent;\n\n function updateTaskType(task, targetType) {\n if (!gantt.getState().group_mode) {\n task.type = targetType;\n gantt.updateTask(task.id);\n }\n }\n\n function getTaskTypeToUpdate(task) {\n var allTypes = gantt.config.types;\n var hasChildren = gantt.hasChild(task.id);\n var taskType = gantt.getTaskType(task.type);\n\n if (hasChildren && taskType === allTypes.task) {\n return allTypes.project;\n }\n\n if (!hasChildren && taskType === allTypes.project) {\n return allTypes.task;\n }\n\n return false;\n }\n\n var isParsingDone = true;\n gantt.attachEvent(\"onParse\", callIfEnabled(function () {\n isParsingDone = false;\n\n if (gantt.getState().group_mode) {\n return;\n }\n\n gantt.batchUpdate(function () {\n gantt.eachTask(function (task) {\n var targetType = getTaskTypeToUpdate(task);\n\n if (targetType !== false) {\n updateTaskType(task, targetType);\n }\n });\n });\n isParsingDone = true;\n }));\n gantt.attachEvent(\"onAfterTaskAdd\", callIfEnabled(function (id) {\n if (isParsingDone) {\n updateParentTypes(id);\n }\n }));\n gantt.attachEvent(\"onAfterTaskUpdate\", callIfEnabled(function (id) {\n if (isParsingDone) {\n updateParentTypes(id);\n }\n }));\n\n function updateAfterRemoveChild(id) {\n if (id != gantt.config.root_id && gantt.isTaskExists(id)) {\n updateParentTypes(id);\n }\n }\n\n gantt.attachEvent(\"onBeforeTaskDelete\", callIfEnabled(function (id, task) {\n delTaskParent = gantt.getParent(id);\n return true;\n }));\n gantt.attachEvent(\"onAfterTaskDelete\", callIfEnabled(function (id, task) {\n updateAfterRemoveChild(delTaskParent);\n }));\n var originalRowDndParent;\n gantt.attachEvent(\"onRowDragStart\", callIfEnabled(function (id, target, e) {\n originalRowDndParent = gantt.getParent(id);\n return true;\n }));\n gantt.attachEvent(\"onRowDragEnd\", callIfEnabled(function (id, target) {\n updateAfterRemoveChild(originalRowDndParent);\n updateParentTypes(id);\n }));\n var originalMoveTaskParent;\n gantt.attachEvent(\"onBeforeTaskMove\", callIfEnabled(function (sid, parent, tindex) {\n originalMoveTaskParent = gantt.getParent(sid);\n return true;\n }));\n gantt.attachEvent(\"onAfterTaskMove\", callIfEnabled(function (id, parent, tindex) {\n if (document.querySelector(\".gantt_drag_marker\")) {\n // vertical dnd in progress\n return;\n }\n\n updateAfterRemoveChild(originalMoveTaskParent);\n updateParentTypes(id);\n }));\n};","module.exports = function addPlaceholder(gantt) {\n function isEnabled() {\n return gantt.config.placeholder_task;\n }\n\n function callIfEnabled(callback) {\n return function () {\n if (!isEnabled()) {\n return true;\n }\n\n return callback.apply(this, arguments);\n };\n }\n\n function silenceDataProcessor(dataProcessor) {\n if (dataProcessor && !dataProcessor._silencedPlaceholder) {\n dataProcessor._silencedPlaceholder = true;\n dataProcessor.attachEvent(\"onBeforeUpdate\", callIfEnabled(function (id, state, data) {\n if (data.type == gantt.config.types.placeholder) {\n dataProcessor.setUpdated(id, false);\n return false;\n }\n\n return true;\n }));\n }\n }\n\n function insertPlaceholder() {\n var placeholders = gantt.getTaskBy(\"type\", gantt.config.types.placeholder);\n\n if (!placeholders.length || !gantt.isTaskExists(placeholders[0].id)) {\n var placeholder = {\n unscheduled: true,\n type: gantt.config.types.placeholder,\n duration: 0,\n text: gantt.locale.labels.new_task\n };\n\n if (gantt.callEvent(\"onTaskCreated\", [placeholder]) === false) {\n return;\n }\n\n gantt.addTask(placeholder);\n }\n }\n\n function afterEdit(id) {\n var item = gantt.getTask(id);\n\n if (item.type == gantt.config.types.placeholder) {\n if (item.start_date && item.end_date && item.unscheduled) {\n item.unscheduled = false;\n }\n\n gantt.batchUpdate(function () {\n var newTask = gantt.copy(item);\n gantt.silent(function () {\n gantt.deleteTask(item.id);\n });\n delete newTask[\"!nativeeditor_status\"];\n newTask.type = gantt.config.types.task;\n newTask.id = gantt.uid();\n gantt.addTask(newTask); //insertPlaceholder();\n });\n }\n }\n\n gantt.config.types.placeholder = \"placeholder\";\n gantt.attachEvent(\"onDataProcessorReady\", callIfEnabled(silenceDataProcessor));\n var ready = false;\n gantt.attachEvent(\"onGanttReady\", function () {\n if (ready) {\n return;\n }\n\n ready = true;\n gantt.attachEvent(\"onAfterTaskUpdate\", callIfEnabled(afterEdit));\n gantt.attachEvent(\"onAfterTaskAdd\", callIfEnabled(function (id, task) {\n if (task.type != gantt.config.types.placeholder) {\n var placeholders = gantt.getTaskBy(\"type\", gantt.config.types.placeholder);\n placeholders.forEach(function (p) {\n gantt.silent(function () {\n if (gantt.isTaskExists(p.id)) gantt.deleteTask(p.id);\n });\n });\n insertPlaceholder();\n }\n }));\n gantt.attachEvent(\"onParse\", callIfEnabled(insertPlaceholder));\n });\n\n function isPlaceholderTask(taskId) {\n if (gantt.config.types.placeholder && gantt.isTaskExists(taskId)) {\n var task = gantt.getTask(taskId);\n\n if (task.type == gantt.config.types.placeholder) {\n return true;\n }\n }\n\n return false;\n }\n\n function isPlaceholderLink(link) {\n if (isPlaceholderTask(link.source) || isPlaceholderTask(link.target)) {\n return true;\n }\n\n return false;\n }\n\n gantt.attachEvent(\"onLinkValidation\", function (link) {\n if (isPlaceholderLink(link)) {\n return false;\n }\n\n return true;\n });\n gantt.attachEvent(\"onBeforeLinkAdd\", function (id, link) {\n if (isPlaceholderLink(link)) {\n return false;\n }\n\n return true;\n });\n gantt.attachEvent(\"onBeforeUndoStack\", function (action) {\n for (var i = 0; i < action.commands.length; i++) {\n var command = action.commands[i];\n\n if (command.entity === \"task\" && command.value.type === gantt.config.types.placeholder) {\n action.commands.splice(i, 1);\n i--;\n }\n }\n\n return true;\n });\n};","module.exports = function (gantt) {\n var resourceAssignmentsProperty = \"$resourceAssignments\";\n gantt.config.resource_assignment_store = \"resourceAssignments\";\n gantt.config.process_resource_assignments = true;\n var resourceAssignmentFormats = {\n auto: \"auto\",\n singleValue: \"singleValue\",\n valueArray: \"valueArray\",\n resourceValueArray: \"resourceValueArray\",\n assignmentsArray: \"assignmentsArray\"\n };\n var resourceAssignmentFormat = resourceAssignmentFormats.auto; //\"primitiveSingle\";//\"primitive\";//\"object\"|\"assignment\"\n\n var assignmentModes = {\n fixedDates: \"fixedDates\",\n fixedDuration: \"fixedDuration\",\n \"default\": \"default\"\n };\n\n function initAssignmentFields(item, task) {\n if (item.start_date) {\n item.start_date = gantt.date.parseDate(item.start_date, \"parse_date\");\n } else {\n item.start_date = null;\n }\n\n if (item.end_date) {\n item.end_date = gantt.date.parseDate(item.end_date, \"parse_date\");\n } else {\n item.end_date = null;\n }\n\n var delay = Number(item.delay);\n var initDelay = false;\n\n if (!isNaN(delay)) {\n item.delay = delay;\n } else {\n item.delay = 0;\n initDelay = true;\n }\n\n if (!gantt.defined(item.value)) {\n item.value = null;\n }\n\n if (!item.task_id || !item.resource_id) {\n return false;\n }\n\n item.mode = item.mode || assignmentModes[\"default\"];\n\n if (item.mode === assignmentModes.fixedDuration) {\n if (isNaN(Number(item.duration))) {\n task = task || gantt.getTask(item.task_id);\n item.duration = gantt.calculateDuration({\n start_date: item.start_date,\n end_date: item.end_date,\n id: task\n });\n }\n\n if (initDelay) {\n task = task || gantt.getTask(item.task_id);\n item.delay = gantt.calculateDuration({\n start_date: task.start_date,\n end_date: item.start_date,\n id: task\n });\n }\n }\n\n if (item.mode !== assignmentModes.fixedDates && (task || gantt.isTaskExists(item.task_id))) {\n task = task || gantt.getTask(item.task_id);\n\n var timing = _assignmentTimeFromTask(item, task);\n\n item.start_date = timing.start_date;\n item.end_date = timing.end_date;\n item.duration = timing.duration;\n }\n } // gantt init\n\n\n var resourceAssignmentsStore = gantt.createDatastore({\n name: gantt.config.resource_assignment_store,\n initItem: function initItem(item) {\n if (!item.id) {\n item.id = gantt.uid();\n }\n\n initAssignmentFields(item);\n return item;\n }\n });\n gantt.$data.assignmentsStore = resourceAssignmentsStore;\n\n function _assignmentTimeFromTask(assignment, task) {\n if (assignment.mode === assignmentModes.fixedDates) {\n return {\n start_date: assignment.start_date,\n end_date: assignment.end_date,\n duration: assignment.duration\n };\n } else {\n var start = assignment.delay ? gantt.calculateEndDate({\n start_date: task.start_date,\n duration: assignment.delay,\n task: task\n }) : new Date(task.start_date);\n var end;\n var duration;\n\n if (assignment.mode === assignmentModes.fixedDuration) {\n end = gantt.calculateEndDate({\n start_date: start,\n duration: assignment.duration,\n task: task\n });\n duration = assignment.duration;\n } else {\n end = new Date(task.end_date);\n duration = task.duration - assignment.delay;\n }\n }\n\n return {\n start_date: start,\n end_date: end,\n duration: duration\n };\n } // data loading\n\n\n function _makeAssignmentsFromTask(task) {\n var property = gantt.config.resource_property;\n var assignments = task[property];\n var resourceAssignments = [];\n var detectFormat = resourceAssignmentFormat === resourceAssignmentFormats.auto;\n\n if (gantt.defined(assignments) && assignments) {\n if (!Array.isArray(assignments)) {\n assignments = [assignments];\n\n if (detectFormat) {\n resourceAssignmentFormat = resourceAssignmentFormats.singleValue;\n detectFormat = false;\n }\n }\n\n var usedIds = {};\n assignments.forEach(function (res) {\n if (!res.resource_id) {\n // when resource is a string/number\n res = {\n resource_id: res\n };\n\n if (detectFormat) {\n resourceAssignmentFormat = resourceAssignmentFormats.valueArray;\n detectFormat = false;\n } //\tisSimpleArray = true;\n\n }\n\n if (detectFormat) {\n if (res.id && res.resource_id) {\n resourceAssignmentFormat = resourceAssignmentFormats.assignmentsArray;\n detectFormat = false;\n } else {\n resourceAssignmentFormat = resourceAssignmentFormats.resourceValueArray;\n detectFormat = false;\n }\n }\n\n var defaultMode = assignmentModes[\"default\"];\n\n if (!res.mode) {\n if (res.start_date && res.end_date || res.start_date && res.duration) {\n defaultMode = assignmentModes.fixedDuration;\n }\n }\n\n var id;\n\n if (!res.id && res.$id && !usedIds[res.$id]) {\n id = res.$id;\n } else if (res.id && !usedIds[res.id]) {\n id = res.id;\n } else {\n id = gantt.uid();\n }\n\n usedIds[id] = true;\n var assignment = {\n id: id,\n start_date: res.start_date,\n duration: res.duration,\n end_date: res.end_date,\n delay: res.delay,\n task_id: task.id,\n resource_id: res.resource_id,\n value: res.value,\n mode: res.mode || defaultMode\n }; // GS-2490: to add custom properties to assignment\n // need to exclude $id which incfluences on render \n\n Object.keys(res).forEach(function (key) {\n if (key != \"$id\") {\n assignment[key] = res[key];\n }\n });\n\n if (!(assignment.start_date && assignment.start_date.getMonth && assignment.end_date && assignment.end_date.getMonth && typeof assignment.duration === \"number\")) {\n initAssignmentFields(assignment, task);\n }\n\n resourceAssignments.push(assignment);\n });\n }\n\n return resourceAssignments;\n }\n\n function _updateTaskBack(taskId) {\n // GS-1493. In some cases, the resource assignment store has the tasks that no longer exist\n if (!gantt.isTaskExists(taskId)) {\n return;\n }\n\n var task = gantt.getTask(taskId);\n var assignments = gantt.getTaskAssignments(task.id);\n\n _assignAssignments(task, assignments);\n }\n\n function _assignAssignments(task, assignments) {\n assignments.sort(function (a, b) {\n if (a.start_date && b.start_date && a.start_date.valueOf() != b.start_date.valueOf()) {\n return a.start_date - b.start_date;\n } else {\n return 0;\n }\n });\n\n if (resourceAssignmentFormat == resourceAssignmentFormats.assignmentsArray) {\n task[gantt.config.resource_property] = assignments;\n } else if (resourceAssignmentFormat == resourceAssignmentFormats.resourceValueArray) {\n task[gantt.config.resource_property] = assignments.map(function (a) {\n return {\n $id: a.id,\n start_date: a.start_date,\n duration: a.duration,\n end_date: a.end_date,\n delay: a.delay,\n resource_id: a.resource_id,\n value: a.value,\n mode: a.mode\n };\n });\n }\n\n task[resourceAssignmentsProperty] = assignments;\n }\n\n function _loadAssignmentsFromTask(task) {\n var assignments = _makeAssignmentsFromTask(task);\n\n var taskAssignments = [];\n assignments.forEach(function (a) {\n a.id = a.id || gantt.uid(); //var newId = resourceAssignmentsStore.addItem(a);\n\n taskAssignments.push(a);\n });\n return assignments;\n }\n\n function diffAssignments(taskValues, assignmentsStoreValues) {\n var result = {\n inBoth: [],\n inTaskNotInStore: [],\n inStoreNotInTask: []\n };\n\n if (resourceAssignmentFormat == resourceAssignmentFormats.singleValue) {\n var taskOwner = taskValues[0];\n var ownerId = taskOwner ? taskOwner.resource_id : null;\n var foundOwnerAssignment = false;\n assignmentsStoreValues.forEach(function (a) {\n if (a.resource_id != ownerId) {\n result.inStoreNotInTask.push(a);\n } else if (a.resource_id == ownerId) {\n result.inBoth.push({\n store: a,\n task: taskOwner\n });\n foundOwnerAssignment = true;\n }\n });\n\n if (!foundOwnerAssignment && taskOwner) {\n result.inTaskNotInStore.push(taskOwner);\n }\n } else if (resourceAssignmentFormat == resourceAssignmentFormats.valueArray) {\n var taskSearch = {};\n var storeSearch = {};\n var processedIds = {};\n taskValues.forEach(function (a) {\n taskSearch[a.resource_id] = a;\n });\n assignmentsStoreValues.forEach(function (a) {\n storeSearch[a.resource_id] = a;\n });\n taskValues.concat(assignmentsStoreValues).forEach(function (a) {\n if (processedIds[a.resource_id]) {\n return;\n }\n\n processedIds[a.resource_id] = true;\n var inTask = taskSearch[a.resource_id];\n var inStore = storeSearch[a.resource_id];\n\n if (inTask && inStore) {\n result.inBoth.push({\n store: inStore,\n task: inTask\n });\n } else if (inTask && !inStore) {\n result.inTaskNotInStore.push(inTask);\n } else if (!inTask && inStore) {\n result.inStoreNotInTask.push(inStore);\n }\n });\n } else if (resourceAssignmentFormat == resourceAssignmentFormats.assignmentsArray || resourceAssignmentFormat == resourceAssignmentFormats.resourceValueArray) {\n var taskSearch = {};\n var storeSearch = {};\n var processedIds = {};\n taskValues.forEach(function (a) {\n taskSearch[a.id || a.$id] = a;\n });\n assignmentsStoreValues.forEach(function (a) {\n storeSearch[a.id] = a;\n });\n taskValues.concat(assignmentsStoreValues).forEach(function (a) {\n var id = a.id || a.$id;\n\n if (processedIds[id]) {\n return;\n }\n\n processedIds[id] = true;\n var inTask = taskSearch[id];\n var inStore = storeSearch[id];\n\n if (inTask && inStore) {\n result.inBoth.push({\n store: inStore,\n task: inTask\n });\n } else if (inTask && !inStore) {\n result.inTaskNotInStore.push(inTask);\n } else if (!inTask && inStore) {\n result.inStoreNotInTask.push(inStore);\n }\n });\n }\n\n return result;\n }\n\n function assignmentHasChanged(source, target) {\n var ignoreFields = {\n id: true\n };\n\n for (var i in source) {\n if (!ignoreFields[i]) {\n if (String(source[i]) !== String(target[i])) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n function updateAssignment(source, target) {\n var ignoreFields = {\n id: true\n };\n\n for (var i in source) {\n if (!ignoreFields[i]) {\n target[i] = source[i];\n }\n }\n }\n\n function _syncAssignments(task, storeAssignments) {\n var tasksAssignments = _makeAssignmentsFromTask(task);\n\n var diff = diffAssignments(tasksAssignments, storeAssignments);\n diff.inStoreNotInTask.forEach(function (a) {\n resourceAssignmentsStore.removeItem(a.id);\n });\n diff.inTaskNotInStore.forEach(function (a) {\n resourceAssignmentsStore.addItem(a);\n });\n diff.inBoth.forEach(function (a) {\n if (assignmentHasChanged(a.task, a.store)) {\n updateAssignment(a.task, a.store);\n resourceAssignmentsStore.updateItem(a.store.id);\n } else {\n if (a.task.start_date && a.task.end_date && a.task.mode !== assignmentModes.fixedDates) {\n var timing = _assignmentTimeFromTask(a.store, task);\n\n if (a.store.start_date.valueOf() != timing.start_date.valueOf() || a.store.end_date.valueOf() != timing.end_date.valueOf()) {\n a.store.start_date = timing.start_date;\n a.store.end_date = timing.end_date;\n a.store.duration = timing.duration;\n resourceAssignmentsStore.updateItem(a.store.id);\n }\n }\n }\n });\n\n _updateTaskBack(task.id);\n }\n\n function _syncOnTaskUpdate(task) {\n var storeAssignments = task[resourceAssignmentsProperty] || resourceAssignmentsStore.find(function (a) {\n return a.task_id == task.id;\n });\n\n _syncAssignments(task, storeAssignments);\n }\n\n function _syncOnTaskDelete(ids) {\n var idsSearch = {};\n ids.forEach(function (id) {\n idsSearch[id] = true;\n });\n var taskResources = resourceAssignmentsStore.find(function (a) {\n return idsSearch[a.task_id];\n });\n taskResources.forEach(function (a) {\n resourceAssignmentsStore.removeItem(a.id);\n });\n }\n\n gantt.attachEvent(\"onGanttReady\", function () {\n if (gantt.config.process_resource_assignments) {\n gantt.attachEvent(\"onParse\", function () {\n gantt.silent(function () {\n resourceAssignmentsStore.clearAll();\n var totalAssignments = [];\n gantt.eachTask(function (task) {\n if (task.type === gantt.config.types.project) {\n return;\n }\n\n var assignments = _loadAssignmentsFromTask(task);\n\n _assignAssignments(task, assignments);\n\n assignments.forEach(function (a) {\n totalAssignments.push(a);\n });\n });\n resourceAssignmentsStore.parse(totalAssignments);\n });\n });\n var batchUpdate = false;\n var needUpdate = false;\n var needUpdateFor = {};\n var undoBatchCancel = false;\n gantt.attachEvent(\"onBeforeBatchUpdate\", function () {\n batchUpdate = true;\n });\n gantt.attachEvent(\"onAfterBatchUpdate\", function () {\n if (needUpdate) {\n var assignmentsHash = {};\n\n for (var i in needUpdateFor) {\n assignmentsHash[i] = gantt.getTaskAssignments(needUpdateFor[i].id);\n }\n\n for (var i in needUpdateFor) {\n _syncAssignments(needUpdateFor[i], assignmentsHash[i]);\n }\n }\n\n needUpdate = false;\n batchUpdate = false;\n needUpdateFor = {};\n });\n gantt.attachEvent(\"onTaskCreated\", function (item) {\n var assignments = _loadAssignmentsFromTask(item);\n\n resourceAssignmentsStore.parse(assignments);\n\n _assignAssignments(item, assignments);\n\n return true;\n });\n gantt.attachEvent(\"onAfterTaskUpdate\", function (id, item) {\n if (batchUpdate) {\n needUpdate = true;\n needUpdateFor[id] = item;\n } else if (!item.unscheduled) {\n _syncOnTaskUpdate(item);\n }\n });\n gantt.attachEvent(\"onAfterTaskAdd\", function (id, item) {\n if (batchUpdate) {\n needUpdate = true;\n needUpdateFor[id] = item;\n } else {\n _syncOnTaskUpdate(item);\n }\n });\n /*\tgantt.attachEvent(\"onRowDragMove\", function (id) {\r\n \t\t_syncOnTaskUpdate(gantt.getTask(id));\r\n \t});*/\n\n gantt.attachEvent(\"onRowDragEnd\", function (id) {\n _syncOnTaskUpdate(gantt.getTask(id));\n });\n gantt.$data.tasksStore.attachEvent(\"onAfterDeleteConfirmed\", function (id, item) {\n var deleteIds = [id];\n gantt.eachTask(function (task) {\n deleteIds.push(task.id);\n }, id);\n\n _syncOnTaskDelete(deleteIds);\n });\n gantt.$data.tasksStore.attachEvent(\"onClearAll\", function () {\n resourceAssignmentsCache = null;\n resourceTaskAssignmentsCache = null;\n taskAssignmentsCache = null;\n resourceAssignmentsStore.clearAll();\n return true;\n });\n gantt.attachEvent(\"onTaskIdChange\", function (id, new_id) {\n var taskResources = resourceAssignmentsStore.find(function (a) {\n return a.task_id == id;\n });\n taskResources.forEach(function (a) {\n a.task_id = new_id;\n resourceAssignmentsStore.updateItem(a.id);\n });\n\n _updateTaskBack(new_id); //any custom logic here\n\n }); // GS-2144. When we Undo something, the cache should be reset\n // during the `onStoreUpdated` event to properly update the assignments\n\n gantt.attachEvent(\"onBeforeUndo\", function (action) {\n undoBatchCancel = true;\n return true;\n });\n gantt.attachEvent(\"onAfterUndo\", function (action) {\n undoBatchCancel = true;\n });\n var resourceAssignmentsCache = null;\n var resourceTaskAssignmentsCache = null;\n var taskAssignmentsCache = null;\n resourceAssignmentsStore.attachEvent(\"onStoreUpdated\", function resetCache() {\n if (batchUpdate && !undoBatchCancel) {\n return true;\n }\n\n resourceAssignmentsCache = null;\n resourceTaskAssignmentsCache = null;\n taskAssignmentsCache = null;\n return true;\n });\n\n gantt.getResourceAssignments = function (resourceId, taskId) {\n var searchTaskId = gantt.defined(taskId) && taskId !== null;\n\n if (resourceAssignmentsCache === null) {\n resourceAssignmentsCache = {};\n resourceTaskAssignmentsCache = {};\n resourceAssignmentsStore.eachItem(function (a) {\n if (!resourceAssignmentsCache[a.resource_id]) {\n resourceAssignmentsCache[a.resource_id] = [];\n }\n\n resourceAssignmentsCache[a.resource_id].push(a);\n var resourceTaskCacheKey = a.resource_id + \"-\" + a.task_id;\n\n if (!resourceTaskAssignmentsCache[resourceTaskCacheKey]) {\n resourceTaskAssignmentsCache[resourceTaskCacheKey] = [];\n }\n\n resourceTaskAssignmentsCache[resourceTaskCacheKey].push(a);\n });\n }\n\n if (searchTaskId) {\n return (resourceTaskAssignmentsCache[resourceId + \"-\" + taskId] || []).slice();\n } else {\n return (resourceAssignmentsCache[resourceId] || []).slice();\n }\n };\n\n gantt.getTaskAssignments = function (taskId) {\n if (taskAssignmentsCache === null) {\n var result = [];\n taskAssignmentsCache = {};\n resourceAssignmentsStore.eachItem(function (a) {\n if (!taskAssignmentsCache[a.task_id]) {\n taskAssignmentsCache[a.task_id] = [];\n }\n\n taskAssignmentsCache[a.task_id].push(a);\n\n if (a.task_id == taskId) {\n result.push(a);\n }\n });\n }\n\n return (taskAssignmentsCache[taskId] || []).slice();\n };\n\n gantt.getTaskResources = function (taskId) {\n var store = gantt.getDatastore(\"resource\");\n var assignments = gantt.getTaskAssignments(taskId);\n var uniqueResources = {};\n assignments.forEach(function (a) {\n if (!uniqueResources[a.resource_id]) {\n uniqueResources[a.resource_id] = a.resource_id;\n }\n });\n var resources = [];\n\n for (var i in uniqueResources) {\n var res = store.getItem(uniqueResources[i]);\n\n if (res) {\n resources.push(res);\n }\n }\n\n return resources;\n };\n\n gantt.updateTaskAssignments = _updateTaskBack;\n }\n }, {\n once: true\n });\n};","var helpers = require(\"../../utils/helpers\");\n\nfunction createResourceMethods(gantt) {\n var resourceTaskCache = {};\n var singleResourceCacheBuilt = false;\n gantt.$data.tasksStore.attachEvent(\"onStoreUpdated\", function () {\n resourceTaskCache = {};\n singleResourceCacheBuilt = false;\n });\n gantt.attachEvent(\"onBeforeGanttRender\", function () {\n resourceTaskCache = {};\n });\n\n function getTaskBy(propertyName, propertyValue, typeFilter) {\n if (typeof propertyName == \"function\") {\n return filterResourceTasks(propertyName);\n } else {\n if (helpers.isArray(propertyValue)) {\n return getResourceTasks(propertyName, propertyValue, typeFilter);\n } else {\n return getResourceTasks(propertyName, [propertyValue], typeFilter);\n }\n }\n }\n\n function filterResourceTasks(filter) {\n var res = [];\n gantt.eachTask(function (task) {\n if (filter(task)) {\n res.push(task);\n }\n });\n return res;\n }\n\n var falsyValuePrefix = String(Math.random());\n\n function resourceHashFunction(value) {\n if (value === null) {\n return falsyValuePrefix + String(value);\n }\n\n return String(value);\n }\n\n function getCacheKey(resourceIds, property, typeFilter) {\n if (Array.isArray(resourceIds)) {\n return resourceIds.map(function (value) {\n return resourceHashFunction(value);\n }).join(\"_\") + \"_\".concat(property, \"_\").concat(typeFilter);\n } else {\n return resourceHashFunction(resourceIds) + \"_\".concat(property, \"_\").concat(typeFilter);\n }\n }\n\n function getResourceTasks(property, resourceIds, typeFilter) {\n var res;\n var cacheKey = getCacheKey(resourceIds, property, JSON.stringify(typeFilter));\n var matchingResources = {};\n helpers.forEach(resourceIds, function (resourceId) {\n matchingResources[resourceHashFunction(resourceId)] = true;\n });\n\n if (!resourceTaskCache[cacheKey]) {\n res = resourceTaskCache[cacheKey] = [];\n gantt.eachTask(function (task) {\n if (typeFilter) {\n if (!typeFilter[gantt.getTaskType(task)]) {\n return;\n }\n } else if (task.type == gantt.config.types.project) {\n return;\n }\n\n if (property in task) {\n var resourceValue;\n\n if (!helpers.isArray(task[property])) {\n resourceValue = [task[property]];\n } else {\n resourceValue = task[property];\n }\n\n helpers.forEach(resourceValue, function (value) {\n var resourceValue = value && value.resource_id ? value.resource_id : value;\n\n if (matchingResources[resourceHashFunction(resourceValue)]) {\n res.push(task);\n } else if (!singleResourceCacheBuilt) {\n var key = getCacheKey(value, property);\n\n if (!resourceTaskCache[key]) {\n resourceTaskCache[key] = [];\n }\n\n resourceTaskCache[key].push(task);\n }\n });\n }\n });\n singleResourceCacheBuilt = true;\n } else {\n res = resourceTaskCache[cacheKey];\n }\n\n return res;\n }\n\n function selectAssignments(resourceId, taskId, result) {\n var property = gantt.config.resource_property;\n var owners = [];\n\n if (gantt.getDatastore(\"task\").exists(taskId)) {\n var task = gantt.getTask(taskId);\n owners = task[property] || [];\n }\n\n if (!Array.isArray(owners)) {\n owners = [owners];\n }\n\n for (var i = 0; i < owners.length; i++) {\n if (owners[i].resource_id == resourceId) {\n result.push({\n task_id: task.id,\n resource_id: owners[i].resource_id,\n value: owners[i].value\n });\n }\n }\n }\n\n function getResourceAssignments(resourceId, taskId) {\n // resource assignment as an independent module:\n // {taskId:, resourceId, value}\n // TODO: probably should add a separate datastore for these\n var assignments = [];\n var property = gantt.config.resource_property;\n\n if (taskId !== undefined) {\n selectAssignments(resourceId, taskId, assignments);\n } else {\n var tasks = gantt.getTaskBy(property, resourceId);\n tasks.forEach(function (task) {\n selectAssignments(resourceId, task.id, assignments);\n });\n }\n\n return assignments;\n }\n\n return {\n getTaskBy: getTaskBy,\n getResourceAssignments: getResourceAssignments\n };\n}\n\nfunction createHelper(gantt) {\n var resourcePlugin = {\n renderEditableLabel: function renderEditableLabel(start_date, end_date, resource, tasks, assignments) {\n var editable = gantt.config.readonly ? \"\" : \"contenteditable\";\n\n if (start_date < resource.end_date && end_date > resource.start_date) {\n for (var i = 0; i < assignments.length; i++) {\n var a = assignments[i];\n return \"
\" + a.value + \"
\";\n }\n\n return \"
-
\";\n }\n\n return \"\";\n },\n renderSummaryLabel: function renderSummaryLabel(start_date, end_date, resource, tasks, assignments) {\n var sum = assignments.reduce(function (total, assignment) {\n return total + Number(assignment.value);\n }, 0);\n\n if (sum % 1) {\n sum = Math.round(sum * 10) / 10;\n }\n\n if (sum) {\n return \"
\" + sum + \"
\";\n }\n\n return \"\";\n },\n editableResourceCellTemplate: function editableResourceCellTemplate(start_date, end_date, resource, tasks, assignments) {\n if (resource.$role === \"task\") {\n return resourcePlugin.renderEditableLabel(start_date, end_date, resource, tasks, assignments);\n } else {\n return resourcePlugin.renderSummaryLabel(start_date, end_date, resource, tasks, assignments);\n }\n },\n editableResourceCellClass: function editableResourceCellClass(start_date, end_date, resource, tasks, assignments) {\n var css = [];\n css.push(\"resource_marker\");\n\n if (resource.$role === \"task\") {\n css.push(\"task_cell\");\n } else {\n css.push(\"resource_cell\");\n }\n\n var sum = assignments.reduce(function (total, assignment) {\n return total + Number(assignment.value);\n }, 0);\n var capacity = Number(resource.capacity);\n\n if (isNaN(capacity)) {\n capacity = 8;\n }\n\n if (sum <= capacity) {\n css.push(\"workday_ok\");\n } else {\n css.push(\"workday_over\");\n }\n\n return css.join(\" \");\n },\n getSummaryResourceAssignments: function getResourceAssignments(resourceId) {\n var assignments;\n var store = gantt.getDatastore(gantt.config.resource_store);\n var resource = store.getItem(resourceId);\n\n if (resource.$role === \"task\") {\n assignments = gantt.getResourceAssignments(resource.$resource_id, resource.$task_id);\n } else {\n assignments = gantt.getResourceAssignments(resourceId);\n\n if (store.eachItem) {\n store.eachItem(function (childResource) {\n if (childResource.$role !== \"task\") {\n assignments = assignments.concat(gantt.getResourceAssignments(childResource.id));\n }\n }, resourceId);\n }\n }\n\n return assignments;\n },\n initEditableDiagram: function initEditableDiagram() {\n gantt.config.resource_render_empty_cells = true;\n\n (function () {\n /// salesforce locker workaround\n // SF removes 'contenteditable' attribute from cells\n // restore it on render\n var timeoutId = null;\n\n function makeEditable() {\n if (timeoutId) {\n cancelAnimationFrame(timeoutId);\n }\n\n timeoutId = requestAnimationFrame(function () {\n if (gantt.$container) {\n var cells = Array.prototype.slice.call(gantt.$container.querySelectorAll(\".resourceTimeline_cell [data-assignment-cell]\"));\n cells.forEach(function (cell) {\n cell.contentEditable = true;\n });\n }\n });\n return true;\n }\n\n gantt.attachEvent(\"onGanttReady\", function () {\n gantt.getDatastore(gantt.config.resource_assignment_store).attachEvent(\"onStoreUpdated\", makeEditable);\n gantt.getDatastore(gantt.config.resource_store).attachEvent(\"onStoreUpdated\", makeEditable);\n }, {\n once: true\n });\n gantt.attachEvent(\"onGanttLayoutReady\", function () {\n var ganttViews = gantt.$layout.getCellsByType(\"viewCell\");\n ganttViews.forEach(function (view) {\n if (view.$config && view.$config.view === \"resourceTimeline\" && view.$content) {\n view.$content.attachEvent(\"onScroll\", makeEditable);\n }\n });\n });\n })();\n\n gantt.attachEvent(\"onGanttReady\", function () {\n var assignmentEditInProcess = false;\n gantt.event(gantt.$container, \"keypress\", function (e) {\n var target = e.target.closest(\".resourceTimeline_cell [data-assignment-cell]\");\n\n if (target) {\n if (e.keyCode === 13 || e.keyCode === 27) {\n target.blur();\n }\n }\n });\n gantt.event(gantt.$container, \"focusout\", function (e) {\n if (assignmentEditInProcess) {\n return;\n }\n\n assignmentEditInProcess = true;\n setTimeout(function () {\n assignmentEditInProcess = false;\n }, 300);\n var target = e.target.closest(\".resourceTimeline_cell [data-assignment-cell]\");\n\n if (target) {\n var strValue = (target.innerText || \"\").trim();\n\n if (strValue == \"-\") {\n strValue = \"0\";\n }\n\n var value = Number(strValue);\n var rowId = target.getAttribute(\"data-row-id\");\n var assignmentId = target.getAttribute(\"data-assignment-id\");\n var taskId = target.getAttribute(\"data-task\");\n var resourceId = target.getAttribute(\"data-resource-id\");\n var startDate = gantt.templates.parse_date(target.getAttribute(\"data-start-date\"));\n var endDate = gantt.templates.parse_date(target.getAttribute(\"data-end-date\"));\n var assignmentStore = gantt.getDatastore(gantt.config.resource_assignment_store);\n\n if (isNaN(value)) {\n gantt.getDatastore(gantt.config.resource_store).refresh(rowId);\n } else {\n var task = gantt.getTask(taskId); // GS-2141. Track the changes by the Undo extension\n\n if (gantt.plugins().undo) {\n gantt.ext.undo.saveState(taskId, \"task\");\n }\n\n if (assignmentId) {\n var assignment = assignmentStore.getItem(assignmentId);\n\n if (value === assignment.value) {\n return;\n }\n\n if (assignment.start_date.valueOf() === startDate.valueOf() && assignment.end_date.valueOf() === endDate.valueOf()) {\n assignment.value = value;\n\n if (!value) {\n assignmentStore.removeItem(assignment.id);\n } else {\n assignmentStore.updateItem(assignment.id);\n }\n } else {\n if (assignment.end_date.valueOf() > endDate.valueOf()) {\n var nextChunk = gantt.copy(assignment);\n nextChunk.id = gantt.uid();\n nextChunk.start_date = endDate;\n nextChunk.duration = gantt.calculateDuration({\n start_date: nextChunk.start_date,\n end_date: nextChunk.end_date,\n task: task\n });\n nextChunk.delay = gantt.calculateDuration({\n start_date: task.start_date,\n end_date: nextChunk.start_date,\n task: task\n });\n nextChunk.mode = assignment.mode || \"default\";\n\n if (nextChunk.duration !== 0) {\n assignmentStore.addItem(nextChunk);\n }\n }\n\n if (assignment.start_date.valueOf() < startDate.valueOf()) {\n assignment.end_date = startDate;\n assignment.duration = gantt.calculateDuration({\n start_date: assignment.start_date,\n end_date: assignment.end_date,\n task: task\n });\n assignment.mode = \"fixedDuration\";\n\n if (assignment.duration === 0) {\n assignmentStore.removeItem(assignment.id);\n } else {\n assignmentStore.updateItem(assignment.id);\n }\n } else {\n assignmentStore.removeItem(assignment.id);\n }\n\n if (value) {\n assignmentStore.addItem({\n task_id: assignment.task_id,\n resource_id: assignment.resource_id,\n value: value,\n start_date: startDate,\n end_date: endDate,\n duration: gantt.calculateDuration({\n start_date: startDate,\n end_date: endDate,\n task: task\n }),\n delay: gantt.calculateDuration({\n start_date: task.start_date,\n end_date: startDate,\n task: task\n }),\n mode: \"fixedDuration\"\n });\n }\n }\n\n gantt.updateTaskAssignments(task.id);\n gantt.updateTask(task.id);\n } else if (value) {\n var assignment = {\n task_id: taskId,\n resource_id: resourceId,\n value: value,\n start_date: startDate,\n end_date: endDate,\n duration: gantt.calculateDuration({\n start_date: startDate,\n end_date: endDate,\n task: task\n }),\n delay: gantt.calculateDuration({\n start_date: task.start_date,\n end_date: startDate,\n task: task\n }),\n mode: \"fixedDuration\"\n };\n assignmentStore.addItem(assignment);\n gantt.updateTaskAssignments(task.id);\n gantt.updateTask(task.id);\n }\n }\n }\n });\n }, {\n once: true\n });\n }\n };\n return resourcePlugin;\n}\n\nmodule.exports = function (gantt) {\n var methods = createResourceMethods(gantt);\n gantt.ext.resources = createHelper(gantt);\n gantt.config.resources = {\n dataprocessor_assignments: false,\n dataprocessor_resources: false,\n editable_resource_diagram: false,\n resource_store: {\n type: \"treeDataStore\",\n fetchTasks: false,\n initItem: function initItem(item) {\n item.parent = item.parent || gantt.config.root_id;\n item[gantt.config.resource_property] = item.parent;\n item.open = true;\n return item;\n }\n },\n lightbox_resources: function selectResourceControlOptions(resources) {\n var lightboxOptions = [];\n var store = gantt.getDatastore(gantt.config.resource_store);\n resources.forEach(function (res) {\n if (!store.hasChild(res.id)) {\n var copy = gantt.copy(res);\n copy.key = res.id;\n copy.label = res.text;\n lightboxOptions.push(copy);\n }\n });\n return lightboxOptions;\n }\n };\n gantt.attachEvent(\"onBeforeGanttReady\", function () {\n if (gantt.getDatastore(gantt.config.resource_store)) {\n return;\n }\n\n var resourceStoreConfig = gantt.config.resources ? gantt.config.resources.resource_store : undefined;\n var fetchTasks = resourceStoreConfig ? resourceStoreConfig.fetchTasks : undefined;\n\n if (gantt.config.resources && gantt.config.resources.editable_resource_diagram) {\n fetchTasks = true;\n }\n\n var initItems = function initItems(item) {\n item.parent = item.parent || gantt.config.root_id;\n item[gantt.config.resource_property] = item.parent;\n item.open = true;\n return item;\n };\n\n if (resourceStoreConfig && resourceStoreConfig.initItem) {\n initItems = resourceStoreConfig.initItem;\n }\n\n var storeType = resourceStoreConfig && resourceStoreConfig.type ? resourceStoreConfig.type : \"treeDatastore\";\n gantt.$resourcesStore = gantt.createDatastore({\n name: gantt.config.resource_store,\n type: storeType,\n fetchTasks: fetchTasks !== undefined ? fetchTasks : false,\n initItem: initItems\n });\n gantt.$data.resourcesStore = gantt.$resourcesStore;\n gantt.$resourcesStore.attachEvent(\"onParse\", function () {\n function selectResourceControlOptions(resources) {\n var lightboxOptions = [];\n resources.forEach(function (res) {\n if (!gantt.$resourcesStore.hasChild(res.id)) {\n var copy = gantt.copy(res);\n copy.key = res.id;\n copy.label = res.text;\n lightboxOptions.push(copy);\n }\n });\n return lightboxOptions;\n }\n\n var lightboxOptionsFnc = selectResourceControlOptions;\n\n if (gantt.config.resources && gantt.config.resources.lightbox_resources) {\n lightboxOptionsFnc = gantt.config.resources.lightbox_resources;\n }\n\n var options = lightboxOptionsFnc(gantt.$resourcesStore.getItems());\n gantt.updateCollection(\"resourceOptions\", options);\n });\n });\n gantt.getTaskBy = methods.getTaskBy;\n gantt.getResourceAssignments = methods.getResourceAssignments;\n gantt.config.resource_property = \"owner_id\";\n gantt.config.resource_store = \"resource\";\n gantt.config.resource_render_empty_cells = false;\n /**\r\n * these are placeholder functions that should be redefined by the user\r\n */\n\n gantt.templates.histogram_cell_class = function (start_date, end_date, resource, tasks, assignments) {};\n\n gantt.templates.histogram_cell_label = function (start_date, end_date, resource, tasks, assignments) {\n return tasks.length + \"/3\";\n };\n\n gantt.templates.histogram_cell_allocated = function (start_date, end_date, resource, tasks, assignments) {\n return tasks.length / 3;\n };\n\n gantt.templates.histogram_cell_capacity = function (start_date, end_date, resource, tasks, assignments) {\n return 0;\n };\n\n var defaultResourceCellClass = function defaultResourceCellClass(start, end, resource, tasks, assignments) {\n var css = \"\";\n\n if (tasks.length <= 1) {\n css = \"gantt_resource_marker_ok\";\n } else {\n css = \"gantt_resource_marker_overtime\";\n }\n\n return css;\n };\n\n var defaultResourceCellTemplate = function defaultResourceCellTemplate(start, end, resource, tasks, assignments) {\n return tasks.length * 8;\n };\n\n gantt.templates.resource_cell_value = defaultResourceCellTemplate;\n gantt.templates.resource_cell_class = defaultResourceCellClass; //editable_resource_diagram\n\n gantt.attachEvent(\"onBeforeGanttReady\", function () {\n if (gantt.config.resources && gantt.config.resources.editable_resource_diagram) {\n gantt.config.resource_render_empty_cells = true;\n\n if (gantt.templates.resource_cell_value === defaultResourceCellTemplate) {\n gantt.templates.resource_cell_value = gantt.ext.resources.editableResourceCellTemplate;\n }\n\n if (gantt.templates.resource_cell_class === defaultResourceCellClass) {\n gantt.templates.resource_cell_class = gantt.ext.resources.editableResourceCellClass;\n }\n\n gantt.ext.resources.initEditableDiagram(gantt);\n }\n });\n};","var createWbs = function createWbs(gantt) {\n return {\n _needRecalc: true,\n reset: function reset() {\n this._needRecalc = true;\n },\n _isRecalcNeeded: function _isRecalcNeeded() {\n return !this._isGroupSort() && this._needRecalc;\n },\n _isGroupSort: function _isGroupSort() {\n return !!gantt.getState().group_mode;\n },\n _getWBSCode: function _getWBSCode(task) {\n if (!task) return \"\";\n\n if (this._isRecalcNeeded()) {\n this._calcWBS();\n }\n\n if (task.$virtual) return \"\";\n if (this._isGroupSort()) return task.$wbs || \"\";\n\n if (!task.$wbs) {\n this.reset();\n\n this._calcWBS();\n }\n\n return task.$wbs;\n },\n _setWBSCode: function _setWBSCode(task, value) {\n task.$wbs = value;\n },\n getWBSCode: function getWBSCode(task) {\n return this._getWBSCode(task);\n },\n getByWBSCode: function getByWBSCode(code) {\n var parts = code.split(\".\");\n var currentNode = gantt.config.root_id;\n\n for (var i = 0; i < parts.length; i++) {\n var children = gantt.getChildren(currentNode);\n var index = parts[i] * 1 - 1;\n\n if (gantt.isTaskExists(children[index])) {\n currentNode = children[index];\n } else {\n return null;\n }\n }\n\n if (gantt.isTaskExists(currentNode)) {\n return gantt.getTask(currentNode);\n } else {\n return null;\n }\n },\n _calcWBS: function _calcWBS() {\n if (!this._isRecalcNeeded()) return;\n var _isFirst = true;\n gantt.eachTask(function (ch) {\n if (_isFirst) {\n _isFirst = false;\n\n this._setWBSCode(ch, \"1\");\n\n return;\n }\n\n var _prevSibling = gantt.getPrevSibling(ch.id);\n\n if (_prevSibling !== null) {\n var _wbs = gantt.getTask(_prevSibling).$wbs;\n\n if (_wbs) {\n _wbs = _wbs.split(\".\");\n _wbs[_wbs.length - 1]++;\n\n this._setWBSCode(ch, _wbs.join(\".\"));\n }\n } else {\n var _parent = gantt.getParent(ch.id);\n\n this._setWBSCode(ch, gantt.getTask(_parent).$wbs + \".1\");\n }\n }, gantt.config.root_id, this);\n this._needRecalc = false;\n }\n };\n};\n\nmodule.exports = function (gantt) {\n var wbs = createWbs(gantt);\n\n gantt.getWBSCode = function getWBSCode(task) {\n return wbs.getWBSCode(task);\n };\n\n gantt.getTaskByWBSCode = function (code) {\n return wbs.getByWBSCode(code);\n };\n\n function resetCache() {\n wbs.reset();\n return true;\n }\n\n gantt.attachEvent(\"onAfterTaskMove\", resetCache);\n gantt.attachEvent(\"onBeforeParse\", resetCache);\n gantt.attachEvent(\"onAfterTaskDelete\", resetCache);\n gantt.attachEvent(\"onAfterTaskAdd\", resetCache);\n gantt.attachEvent(\"onAfterSort\", resetCache);\n};","var global = require(\"../../utils/global\");\n\nfunction createMethod(gantt) {\n var methods = {};\n var isActive = false;\n\n function disableMethod(methodName, dummyMethod) {\n dummyMethod = typeof dummyMethod == \"function\" ? dummyMethod : function () {};\n\n if (!methods[methodName]) {\n methods[methodName] = this[methodName];\n this[methodName] = dummyMethod;\n }\n }\n\n function restoreMethod(methodName) {\n if (methods[methodName]) {\n this[methodName] = methods[methodName];\n methods[methodName] = null;\n }\n }\n\n function disableMethods(methodsHash) {\n for (var i in methodsHash) {\n disableMethod.call(this, i, methodsHash[i]);\n }\n }\n\n function restoreMethods() {\n for (var i in methods) {\n restoreMethod.call(this, i);\n }\n }\n\n function batchUpdatePayload(callback) {\n try {\n callback();\n } catch (e) {\n global.console.error(e);\n }\n }\n\n var state = gantt.$services.getService(\"state\");\n state.registerProvider(\"batchUpdate\", function () {\n return {\n batch_update: isActive\n };\n }, false);\n return function batchUpdate(callback, noRedraw) {\n if (isActive) {\n // batch mode is already active\n batchUpdatePayload(callback);\n return;\n }\n\n var call_dp = this._dp && this._dp.updateMode != \"off\";\n var dp_mode;\n\n if (call_dp) {\n dp_mode = this._dp.updateMode;\n\n this._dp.setUpdateMode(\"off\");\n } // temporary disable some methods while updating multiple tasks\n\n\n var resetProjects = {};\n var methods = {\n \"render\": true,\n \"refreshData\": true,\n \"refreshTask\": true,\n \"refreshLink\": true,\n \"resetProjectDates\": function resetProjectDates(task) {\n resetProjects[task.id] = task;\n }\n };\n disableMethods.call(this, methods);\n isActive = true;\n this.callEvent(\"onBeforeBatchUpdate\", []);\n batchUpdatePayload(callback);\n this.callEvent(\"onAfterBatchUpdate\", []);\n restoreMethods.call(this); // do required updates after changes applied\n\n for (var i in resetProjects) {\n this.resetProjectDates(resetProjects[i]);\n }\n\n isActive = false;\n\n if (!noRedraw) {\n this.render();\n }\n\n if (call_dp) {\n this._dp.setUpdateMode(dp_mode);\n\n this._dp.setGanttMode(\"task\");\n\n this._dp.sendData();\n\n this._dp.setGanttMode(\"link\");\n\n this._dp.sendData();\n }\n };\n}\n\nmodule.exports = function (gantt) {\n gantt.batchUpdate = createMethod(gantt);\n};","module.exports = function (gantt) {\n if (!gantt.ext) {\n gantt.ext = {};\n }\n\n var modules = [require(\"./batch_update\"), require(\"./wbs\"), require(\"./resources\"), require(\"./resource_assignments\"), require(\"./new_task_placeholder\"), require(\"./auto_task_types\"), require(\"./formatters\"), require(\"./empty_state_screen\")[\"default\"]];\n\n for (var i = 0; i < modules.length; i++) {\n if (modules[i]) modules[i](gantt);\n }\n};","import * as utils from \"../../utils/utils\";\r\n\r\nexport default class SimpleStorage {\r\n\tpublic static create = () : SimpleStorage => {\r\n\t\treturn new SimpleStorage();\r\n\t}\r\n\r\n\tprotected _storage: { [id: string]: any; };\r\n\r\n\tprotected constructor() {\r\n\t\tthis._storage = {};\r\n\t}\r\n\r\n\tpublic clear = (): void => {\r\n\t\tthis._storage = {};\r\n\t}\r\n\r\n\tpublic storeItem = (item: any): void => {\r\n\t\tthis._storage[item.id] = utils.copy(item);\r\n\t}\r\n\r\n\tpublic getStoredItem = (id: string): any => {\r\n\t\treturn this._storage[id] || null;\r\n\t}\r\n}","\r\nexport default function extendGantt(gantt: any, dp: any) {\r\n\tgantt.getUserData = function(id, name, store) {\r\n\t\tif (!this.userdata) {\r\n\t\t\tthis.userdata = {};\r\n\t\t}\r\n\t\tthis.userdata[store] = this.userdata[store] || {};\r\n\t\tif (this.userdata[store][id] && this.userdata[store][id][name]) {\r\n\t\t\treturn this.userdata[store][id][name];\r\n\t\t}\r\n\t\treturn \"\";\r\n\t};\r\n\tgantt.setUserData = function(id, name, value, store) {\r\n\t\tif (!this.userdata) {\r\n\t\t\tthis.userdata = {};\r\n\t\t}\r\n\t\tthis.userdata[store] = this.userdata[store] || {};\r\n\t\tthis.userdata[store][id] = this.userdata[store][id] || {};\r\n\t\tthis.userdata[store][id][name] = value;\r\n\t};\r\n\r\n\tgantt._change_id = function(oldId, newId) {\r\n\t\tswitch (this._dp._ganttMode) {\r\n\t\t\tcase \"task\":\r\n\t\t\t\tthis.changeTaskId(oldId, newId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"link\":\r\n\t\t\t\tthis.changeLinkId(oldId, newId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"assignment\":\r\n\t\t\t\tthis.$data.assignmentsStore.changeId(oldId, newId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"resource\":\r\n\t\t\t\tthis.$data.resourcesStore.changeId(oldId, newId);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tthrow new Error(`Invalid mode of the dataProcessor after database id is received: ${this._dp._ganttMode}, new id: ${newId}`);\r\n\t\t}\r\n\t};\r\n\r\n\tgantt._row_style = function(rowId, classname){\r\n\t\tif (this._dp._ganttMode !== \"task\") {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!gantt.isTaskExists(rowId)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst task = gantt.getTask(rowId);\r\n\t\ttask.$dataprocessor_class = classname;\r\n\t\tgantt.refreshTask(rowId);\r\n\t};\r\n\r\n\t// fake method for dataprocessor\r\n\tgantt._delete_task = function(rowId, node) {}; // tslint:disable-line\r\n\r\n\tgantt._sendTaskOrder = function(id, item){\r\n\t\tif (item.$drop_target) {\r\n\t\t\tthis._dp.setGanttMode(\"task\");\r\n\t\t\tthis.getTask(id).target = item.$drop_target;\r\n\t\t\tthis._dp.setUpdated(id, true,\"order\");\r\n\t\t\tdelete this.getTask(id).$drop_target;\r\n\t\t}\r\n\t};\r\n\r\n\tgantt.setDp = function() {\r\n\t\tthis._dp = dp;\r\n\t};\r\n\r\n\tgantt.setDp();\r\n}","import * as helpers from \"../../utils/helpers\";\r\n\r\nexport default class DataProcessorEvents {\r\n\tprotected _dataProcessorHandlers: any[];\r\n\tprotected $gantt: any;\r\n\tprotected $dp: any;\r\n\r\n\tconstructor(gantt: any, dp: any) {\r\n\t\tthis.$gantt = gantt;\r\n\t\tthis.$dp = dp;\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t}\r\n\r\n\tattach() {\r\n\t\tconst dp = this.$dp;\r\n\t\tconst gantt = this.$gantt;\r\n\t\tconst treeHelper = require(\"../../utils/task_tree_helpers\");\r\n\t\tconst cascadeDelete = {};\r\n\r\n\t\tconst clientSideDelete = (id) => {\r\n\t\t\treturn this.clientSideDelete(id, dp, gantt);\r\n\t\t};\r\n\r\n\t\tfunction getTaskLinks(task) {\r\n\t\t\tlet _links = [];\r\n\r\n\t\t\tif (task.$source) {\r\n\t\t\t\t_links = _links.concat(task.$source);\r\n\t\t\t}\r\n\t\t\tif (task.$target) {\r\n\t\t\t\t_links = _links.concat(task.$target);\r\n\t\t\t}\r\n\r\n\t\t\treturn _links;\r\n\t\t}\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onAfterTaskAdd\", function(id, item) { // tslint:disable-line\r\n\t\t\tif (gantt.isTaskExists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"tasks\");\r\n\t\t\t\tdp.setUpdated(id, true, \"inserted\");\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onAfterTaskUpdate\", function(id, item) { // tslint:disable-line\r\n\t\t\tif (gantt.isTaskExists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"tasks\");\r\n\t\t\t\tdp.setUpdated(id, true);\r\n\r\n\t\t\t\t// gantt can be destroyed/reinitialized after dp.setUpdated\r\n\t\t\t\tif(gantt._sendTaskOrder){\r\n\t\t\t\t\tgantt._sendTaskOrder(id, item);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onBeforeTaskDelete\", function(id, item) { // tslint:disable-line\r\n\t\t\tif (gantt.config.cascade_delete) {\r\n\t\t\t\tcascadeDelete[id] = {\r\n\t\t\t\t\ttasks: treeHelper.getSubtreeTasks(gantt, id),\r\n\t\t\t\t\tlinks: treeHelper.getSubtreeLinks(gantt, id)\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\t// GS-631. Keep the deleted item in Gantt until we receive the successful response from the server\r\n\t\t\tif (dp.deleteAfterConfirmation) {\r\n\t\t\t\tdp.setGanttMode(\"tasks\");\r\n\t\t\t\tdp.setUpdated(id, true, \"deleted\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onAfterTaskDelete\", function(id, item) { // tslint:disable-line\r\n\t\t\tdp.setGanttMode(\"tasks\");\r\n\r\n\t\t\t// not send delete request if item is not inserted into the db - just remove it from the client\r\n\t\t\tconst needDbDelete = !clientSideDelete(id);\r\n\t\t\tconst needCascadeDelete = gantt.config.cascade_delete && cascadeDelete[id];\r\n\t\t\tif (!needDbDelete && !needCascadeDelete) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif (needCascadeDelete) {\r\n\t\t\t\tconst dpMode = dp.updateMode;\r\n\t\t\t\tdp.setUpdateMode(\"off\");\r\n\r\n\t\t\t\tconst cascade = cascadeDelete[id];\r\n\t\t\t\tfor (const i in cascade.tasks) {\r\n\t\t\t\t\tif (!clientSideDelete(i)) {\r\n\t\t\t\t\t\tdp.storeItem(cascade.tasks[i]);\r\n\t\t\t\t\t\tdp.setUpdated(i, true, \"deleted\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdp.setGanttMode(\"links\");\r\n\t\t\t\tfor (const i in cascade.links) {\r\n\t\t\t\t\tif (!clientSideDelete(i)) {\r\n\t\t\t\t\t\tdp.storeItem(cascade.links[i]);\r\n\t\t\t\t\t\tdp.setUpdated(i, true, \"deleted\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcascadeDelete[id] = null;\r\n\r\n\t\t\t\tif (dpMode !== \"off\") {\r\n\t\t\t\t\tdp.sendAllData();\r\n\t\t\t\t}\r\n\t\t\t\tdp.setGanttMode(\"tasks\");\r\n\t\t\t\tdp.setUpdateMode(dpMode);\r\n\t\t\t}\r\n\r\n\t\t\tif (needDbDelete){\r\n\t\t\t\tdp.storeItem(item);\r\n\t\t\t\tif (!dp.deleteAfterConfirmation){\r\n\t\t\t\t\tdp.setUpdated(id, true, \"deleted\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t\tif (dp.updateMode !== \"off\" && !dp._tSend) {\r\n\t\t\t\tdp.sendAllData();\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onAfterLinkUpdate\", function(id, item) { // tslint:disable-line\r\n\t\t\tif (gantt.isLinkExists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"links\");\r\n\t\t\t\tdp.setUpdated(id, true);\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onAfterLinkAdd\", function(id, item) { // tslint:disable-line\r\n\t\t\tif (gantt.isLinkExists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"links\");\r\n\t\t\t\tdp.setUpdated(id, true,\"inserted\");\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onAfterLinkDelete\", function(id, item) { // tslint:disable-line\r\n\t\t\tdp.setGanttMode(\"links\");\r\n\r\n\t\t\tconst needDbDelete = !clientSideDelete(id);\r\n\t\t\tif (!needDbDelete) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdp.storeItem(item);\r\n\t\t\tdp.setUpdated(id, true,\"deleted\");\r\n\t\t}));\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onRowDragEnd\", function(id, target) { // tslint:disable-line\r\n\t\t\tgantt._sendTaskOrder(id, gantt.getTask(id));\r\n\t\t}));\r\n\r\n\t\tlet tasks = null;\r\n\t\tlet links = null;\r\n\r\n\t\tthis._dataProcessorHandlers.push(gantt.attachEvent(\"onTaskIdChange\", function(oldId, newId) { // tslint:disable-line\r\n\t\t\tif (!dp._waitMode) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst children = gantt.getChildren(newId);\r\n\t\t\tif (children.length) {\r\n\t\t\t\ttasks = tasks || {};\r\n\r\n\t\t\t\tfor (let i = 0; i < children.length; i++) {\r\n\t\t\t\t\tconst ch = this.getTask(children[i]);\r\n\t\t\t\t\ttasks[ch.id] = ch;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconst item = this.getTask(newId);\r\n\t\t\tconst itemLinks = getTaskLinks(item);\r\n\r\n\t\t\tif (itemLinks.length) {\r\n\t\t\t\tlinks = links || {};\r\n\r\n\t\t\t\tfor (let i = 0; i < itemLinks.length; i++) {\r\n\t\t\t\t\tconst link = this.getLink(itemLinks[i]);\r\n\t\t\t\t\tlinks[link.id] = link;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}));\r\n\r\n\t\tdp.attachEvent(\"onAfterUpdateFinish\", function() {\r\n\t\t\tif (tasks || links) {\r\n\t\t\t\tgantt.batchUpdate(function() {\r\n\t\t\t\t\tfor (const id in tasks) {\r\n\t\t\t\t\t\tgantt.updateTask(tasks[id].id);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfor (const id in links) {\r\n\t\t\t\t\t\tgantt.updateLink(links[id].id);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttasks = null;\r\n\t\t\t\t\tlinks = null;\r\n\t\t\t\t});\r\n\t\t\t\tif (tasks) {\r\n\t\t\t\t\tgantt._dp.setGanttMode(\"tasks\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tgantt._dp.setGanttMode(\"links\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tdp.attachEvent(\"onBeforeDataSending\", function() {\r\n\t\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tlet url = this._serverProcessor;\r\n\t\t\tif (this._tMode === \"REST-JSON\" || this._tMode === \"REST\") {\r\n\t\t\t\tconst mode = this._ganttMode;\r\n\r\n\t\t\t\turl = url.substring(0, url.indexOf(\"?\") > -1 ? url.indexOf(\"?\") : url.length);\r\n\t\t\t\t// editing=true&\r\n\t\t\t\tthis.serverProcessor = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + mode;\r\n\t\t\t} else {\r\n\t\t\t\tconst pluralizedMode = this._ganttMode + \"s\";\r\n\t\t\t\tthis.serverProcessor = url + gantt.ajax.urlSeparator(url) + \"gantt_mode=\" + pluralizedMode;\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tdp.attachEvent(\"insertCallback\", function insertCallback(upd, id, parent, mode) { // tslint:disable-line\r\n\t\t\tconst data = upd.data || gantt.xml._xmlNodeToJSON(upd.firstChild);\r\n\t\t\tconst methods = {\r\n\t\t\t\tadd: gantt.addTask,\r\n\t\t\t\tisExist: gantt.isTaskExists\r\n\t\t\t};\r\n\t\t\tif (mode === \"links\") {\r\n\t\t\t\tmethods.add = gantt.addLink;\r\n\t\t\t\tmethods.isExist = gantt.isLinkExists;\r\n\t\t\t}\r\n\t\t\tif (methods.isExist.call(gantt, id)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdata.id = id;\r\n\t\t\tmethods.add.call(gantt, data);\r\n\t\t});\r\n\r\n\t\tdp.attachEvent(\"updateCallback\", function updateCallback(upd, id) {\r\n\t\t\tconst data = upd.data || gantt.xml._xmlNodeToJSON(upd.firstChild);\r\n\t\t\tif (!gantt.isTaskExists(id)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst objData = gantt.getTask(id);\r\n\t\t\tfor (const key in data) {\r\n\t\t\t\tlet property = data[key];\r\n\t\t\t\tswitch (key) {\r\n\t\t\t\t\tcase \"id\":\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tcase \"start_date\":\r\n\t\t\t\t\tcase \"end_date\":\r\n\t\t\t\t\t\tproperty = gantt.defined(gantt.templates.xml_date) ? gantt.templates.xml_date(property) : gantt.templates.parse_date(property);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"duration\":\r\n\t\t\t\t\t\tobjData.end_date = gantt.calculateEndDate({start_date: objData.start_date, duration: property, task:objData});\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tobjData[key] = property;\r\n\t\t\t}\r\n\t\t\tgantt.updateTask(id);\r\n\t\t\tgantt.refreshData();\r\n\t\t});\r\n\t\tdp.attachEvent(\"deleteCallback\", function deleteCallback(upd, id, parent, mode) { // tslint:disable-line\r\n\t\t\tconst methods = {\r\n\t\t\t\tdelete: gantt.deleteTask,\r\n\t\t\t\tisExist: gantt.isTaskExists\r\n\t\t\t};\r\n\t\t\tif (mode === \"links\") {\r\n\t\t\t\tmethods.delete = gantt.deleteLink;\r\n\t\t\t\tmethods.isExist = gantt.isLinkExists;\r\n\t\t\t} else if(mode === \"assignment\") {\r\n\t\t\t\tmethods.delete = function(val) {\r\n\t\t\t\t\tgantt.$data.assignmentsStore.remove(val);\r\n\t\t\t\t};\r\n\t\t\t\tmethods.isExist = function(val){\r\n\t\t\t\t\treturn gantt.$data.assignmentsStore.exists(val);\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\tif (methods.isExist.call(gantt, id)) {\r\n\t\t\t\tmethods.delete.call(gantt, id);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.handleResourceCRUD(dp, gantt);\r\n\t\tthis.handleResourceAssignmentCRUD(dp, gantt);\r\n\t}\r\n\r\n\tclientSideDelete(id, dp, gantt){\r\n\t\tconst updated = dp.updatedRows.slice();\r\n\t\tlet clientOnly = false;\r\n\r\n\t\tif(gantt.getUserData(id, \"!nativeeditor_status\", dp._ganttMode) === \"true_deleted\"){\r\n\t\t\tclientOnly = true;\r\n\t\t\tdp.setUpdated(id,false);\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < updated.length && !dp._in_progress[id]; i++) {\r\n\t\t\tif (updated[i] === id) {\r\n\t\t\t\tif (gantt.getUserData(id, \"!nativeeditor_status\", dp._ganttMode) === \"inserted\") {\r\n\t\t\t\t\tclientOnly = true;\r\n\t\t\t\t}\r\n\t\t\t\tdp.setUpdated(id,false);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn clientOnly;\r\n\t}\r\n\r\n\thandleResourceAssignmentCRUD(dp, gantt){\r\n\t\tif(!gantt.config.resources || gantt.config.resources.dataprocessor_assignments !== true){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst assignmentsStore = gantt.getDatastore(gantt.config.resource_assignment_store);\r\n\t\tconst insertedTasks = {};\r\n\t\tconst pendingAssignments = {};\r\n\r\n\t\tgantt.attachEvent(\"onBeforeTaskAdd\", function(id, task){\r\n\t\t\tinsertedTasks[id] = true;\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tfunction putAssignmentToQueue(item){\r\n\t\t\tpendingAssignments[item.id] = item;\r\n\t\t\tinsertedTasks[item.task_id] = true;\r\n\t\t}\r\n\r\n\t\tfunction insertResourceAssignment(assignment){\r\n\t\t\tconst id = assignment.id;\r\n\t\t\tif (assignmentsStore.exists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"assignment\");\r\n\t\t\t\tdp.setUpdated(id, true,\"inserted\");\r\n\t\t\t}\r\n\t\t\tdelete pendingAssignments[id];\r\n\t\t}\r\n\r\n\t\tgantt.attachEvent(\"onTaskIdChange\", function(id, newId){\r\n\t\t\tdelete insertedTasks[id];\r\n\t\t});\r\n\r\n\t\tassignmentsStore.attachEvent(\"onAfterAdd\", (id, item) => {\r\n\t\t\tif(insertedTasks[item.task_id]){\r\n\t\t\t\t// inserting assignment of new task\r\n\t\t\t\t// task is not saved yet, need to wait till it gets permanent id and save assigmnents after that\r\n\t\t\t\tputAssignmentToQueue(item);\r\n\t\t\t}else{\r\n\t\t\t\tinsertResourceAssignment(item);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tassignmentsStore.attachEvent(\"onAfterUpdate\", (id, item) => {\r\n\t\t\tif (assignmentsStore.exists(id)) {\r\n\t\t\t\tif(pendingAssignments[id]){\r\n\t\t\t\t\tinsertResourceAssignment(item);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdp.setGanttMode(\"assignment\");\r\n\t\t\t\t\tdp.setUpdated(id, true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tassignmentsStore.attachEvent(\"onAfterDelete\", (id, item) => {\r\n\t\t\tdp.setGanttMode(\"assignment\");\r\n\r\n\t\t\tconst needDbDelete = !this.clientSideDelete(id, dp, gantt);\r\n\t\t\tif (!needDbDelete) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdp.storeItem(item);\r\n\t\t\tdp.setUpdated(id, true,\"deleted\");\r\n\t\t});\r\n\r\n\t}\r\n\r\n\thandleResourceCRUD(dp, gantt){\r\n\t\tif(!gantt.config.resources || gantt.config.resources.dataprocessor_resources !== true){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst resourcesStore = gantt.getDatastore(gantt.config.resource_store);\r\n\r\n\t\tfunction insertResource(resource){\r\n\t\t\tconst id = resource.id;\r\n\t\t\tif (resourcesStore.exists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"resource\");\r\n\t\t\t\tdp.setUpdated(id, true,\"inserted\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tresourcesStore.attachEvent(\"onAfterAdd\", (id, item) => {\r\n\t\t\tinsertResource(item);\r\n\t\t});\r\n\r\n\t\tresourcesStore.attachEvent(\"onAfterUpdate\", (id, item) => {\r\n\t\t\tif (resourcesStore.exists(id)) {\r\n\t\t\t\tdp.setGanttMode(\"resource\");\r\n\t\t\t\tdp.setUpdated(id, true);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tresourcesStore.attachEvent(\"onAfterDelete\", (id, item) => {\r\n\t\t\tdp.setGanttMode(\"resource\");\r\n\r\n\t\t\tconst needDbDelete = !this.clientSideDelete(id, dp, gantt);\r\n\t\t\tif (!needDbDelete) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tdp.storeItem(item);\r\n\t\t\tdp.setUpdated(id, true,\"deleted\");\r\n\t\t});\r\n\r\n\t}\r\n\r\n\r\n\tdetach() {\r\n\t\thelpers.forEach(this._dataProcessorHandlers, (e) => {\r\n\t\t\tthis.$gantt.detachEvent(e);\r\n\t\t});\r\n\t\tthis._dataProcessorHandlers = [];\r\n\t}\r\n}\r\n","import * as eventable from \"../../utils/eventable\";\r\nimport * as helpers from \"../../utils/helpers\";\r\nimport * as utils from \"../../utils/utils\";\r\nimport DataProcessorEvents from \"./data_processor_events\";\r\nimport extendGantt from \"./extend_gantt\";\r\nimport SimpleStorage from \"./simple_storage\";\r\n\r\nexport interface DataProcessor { // tslint:disable-line\r\n\t$gantt: any;\r\n\tdetachAllEvents: any;\r\n\tattachEvent: any;\r\n\tcallEvent: any;\r\n\r\n\tserverProcessor: string;\r\n\taction_param: string;\r\n\tupdatedRows: any[];\r\n\tautoUpdate: boolean;\r\n\tupdateMode: string;\r\n\tmessages: any[];\r\n\tstyles: object;\r\n\tdnd: any;\r\n\tdeleteAfterConfirmation?: any;\r\n}\r\n\r\nexport function createDataProcessor(config: any) {\r\n\tlet router;\r\n\tlet tMode;\r\n\tlet headers;\r\n\tif (config instanceof Function) {\r\n\t\trouter = config;\r\n\t} else if (config.hasOwnProperty(\"router\")) {\r\n\t\trouter = config.router;\r\n\t} else if (config.hasOwnProperty(\"assignment\") || config.hasOwnProperty(\"link\") || config.hasOwnProperty(\"task\")) {\r\n\t\trouter = config;\r\n\t} else if(config.hasOwnProperty(\"headers\")){\r\n\t\t// GS-2312 for custom headers\r\n\t\theaders = config.headers;\r\n\t}\r\n\tif (router) {\r\n\t\ttMode = \"CUSTOM\";\r\n\t} else {\r\n\t\ttMode = config.mode || \"REST-JSON\";\r\n\t}\r\n\tconst gantt = this; // tslint:disable-line\r\n\tconst dp = new DataProcessor(config.url);\r\n\r\n\r\n\tdp.init(gantt);\r\n\tdp.setTransactionMode({\r\n\t\tmode: tMode,\r\n\t\trouter,\r\n\t\theaders\r\n\t}, config.batchUpdate);\r\n\tif(config.deleteAfterConfirmation){\r\n\t\tdp.deleteAfterConfirmation = config.deleteAfterConfirmation;\r\n\t}\r\n\treturn dp;\r\n}\r\n\r\nexport class DataProcessor {\r\n\tpublic modes: object;\r\n\tpublic serverProcessor: string;\r\n\tpublic action_param: string; // tslint:disable-line\r\n\tpublic updatedRows: any[];\r\n\tpublic autoUpdate: boolean;\r\n\tpublic updateMode: string;\r\n\tpublic messages: any[];\r\n\tpublic styles: object;\r\n\tpublic dnd: any;\r\n\r\n\tprotected _tMode: string;\r\n\tprotected _headers: any;\r\n\tprotected _payload: any;\r\n\tprotected _postDelim: string;\r\n\tprotected _waitMode: number;\r\n\tprotected _in_progress: object; // tslint:disable-line\r\n\tprotected _invalid: object;\r\n\tprotected _storage: SimpleStorage;\r\n\tprotected _tSend: boolean;\r\n\tprotected _serializeAsJson: boolean;\r\n\tprotected _router: any;\r\n\tprotected _utf: boolean;\r\n\tprotected _methods: any[];\r\n\tprotected _user: any;\r\n\tprotected _uActions: object;\r\n\tprotected _needUpdate: boolean;\r\n\tprotected _ganttMode: \"task\"|\"link\";\r\n\tprotected _routerParametersFormat: \"parameters\"|\"object\";\r\n\r\n\tprotected _silent_mode: any; // tslint:disable-line\r\n\tprotected _updateBusy: any;\r\n\tprotected _serverProcessor: any;\r\n\tprotected _initialized: boolean;\r\n\r\n\tconstructor(serverProcessorURL?) {\r\n\t\tthis.serverProcessor = serverProcessorURL;\r\n\t\tthis.action_param = \"!nativeeditor_status\";\r\n\r\n\t\tthis.updatedRows = []; // ids of updated rows\r\n\r\n\t\tthis.autoUpdate = true;\r\n\t\tthis.updateMode = \"cell\";\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tthis._postDelim = \"_\";\r\n\t\tthis._routerParametersFormat = \"parameters\";\r\n\r\n\t\tthis._waitMode = 0;\r\n\t\tthis._in_progress = {}; // ?\r\n\t\tthis._storage = SimpleStorage.create();\r\n\t\tthis._invalid = {};\r\n\t\tthis.messages = [];\r\n\r\n\t\tthis.styles = {\r\n\t\t\tupdated: \"font-weight:bold;\",\r\n\t\t\tinserted: \"font-weight:bold;\",\r\n\t\t\tdeleted: \"text-decoration : line-through;\",\r\n\t\t\tinvalid: \"background-color:FFE0E0;\",\r\n\t\t\tinvalid_cell: \"border-bottom:2px solid red;\",\r\n\t\t\terror: \"color:red;\",\r\n\t\t\tclear: \"font-weight:normal;text-decoration:none;\"\r\n\t\t};\r\n\t\tthis.enableUTFencoding(true);\r\n\t\teventable(this);\r\n\t}\r\n\r\n\tsetTransactionMode(mode:any, total?:any) {\r\n\t\tif (typeof mode === \"object\") {\r\n\t\t\tthis._tMode = mode.mode || this._tMode;\r\n\r\n\t\t\tif (utils.defined(mode.headers)) {\r\n\t\t\t\tthis._headers = mode.headers;\r\n\t\t\t}\r\n\r\n\t\t\tif (utils.defined(mode.payload)) {\r\n\t\t\t\tthis._payload = mode.payload;\r\n\t\t\t}\r\n\t\t\tthis._tSend = !!total;\r\n\t\t} else {\r\n\t\t\tthis._tMode = mode;\r\n\t\t\tthis._tSend = total;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"REST\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"JSON\" || this._tMode === \"REST-JSON\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._serializeAsJson = true;\r\n\t\t\tthis._headers = this._headers || {};\r\n\t\t\tthis._headers[\"Content-Type\"] = \"application/json\";\r\n\t\t}else{\r\n\t\t\tif(this._headers && !this._headers[\"Content-Type\"]){\r\n\t\t\t\tthis._headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tthis._tSend = false;\r\n\t\t\tthis._router = mode.router;\r\n\t\t}\r\n\t}\r\n\r\n\tescape(data:any) {\r\n\t\tif (this._utf) {\r\n\t\t\treturn encodeURIComponent(data);\r\n\t\t} else {\r\n\t\t\treturn escape(data);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: allows to set escaping mode\r\n\t * @param: true - utf based escaping, simple - use current page encoding\r\n\t * @type: public\r\n\t */\r\n\tenableUTFencoding(mode:boolean) {\r\n\t\tthis._utf = !!mode;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: get state of updating\r\n\t * @returns: true - all in sync with server, false - some items not updated yet.\r\n\t * @type: public\r\n\t */\r\n\tgetSyncState() {\r\n\t\treturn !this.updatedRows.length;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: set if rows should be send to server automatically\r\n\t * @param: mode - \"row\" - based on row selection changed, \"cell\" - based on cell editing finished, \"off\" - manual data sending\r\n\t * @type: public\r\n\t */\r\n\tsetUpdateMode(mode: string, dnd: any) {\r\n\t\tthis.autoUpdate = (mode === \"cell\");\r\n\t\tthis.updateMode = mode;\r\n\t\tthis.dnd = dnd;\r\n\t}\r\n\r\n\tignore(code: any, master: any) {\r\n\t\tthis._silent_mode = true;\r\n\t\tcode.call(master || window);\r\n\t\tthis._silent_mode = false;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: mark row as updated/normal. check mandatory fields, initiate autoupdate (if turned on)\r\n\t * @param: rowId - id of row to set update-status for\r\n\t * @param: state - true for \"updated\", false for \"not updated\"\r\n\t * @param: mode - update mode name\r\n\t * @type: public\r\n\t */\r\n\tsetUpdated(rowId:number|string, state: boolean, mode?: string) {\r\n\t\tif (this._silent_mode) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst ind = this.findRow(rowId);\r\n\r\n\t\tmode = mode || \"updated\";\r\n\t\tconst existing = this.$gantt.getUserData(rowId, this.action_param, this._ganttMode);\r\n\t\tif (existing && mode === \"updated\") {\r\n\t\t\tmode = existing;\r\n\t\t}\r\n\t\tif (state) {\r\n\t\t\tthis.set_invalid(rowId, false); // clear previous error flag\r\n\t\t\tthis.updatedRows[ind] = rowId;\r\n\t\t\tthis.$gantt.setUserData(rowId, this.action_param, mode, this._ganttMode);\r\n\t\t\tif (this._in_progress[rowId]) {\r\n\t\t\t\tthis._in_progress[rowId] = \"wait\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (!this.is_invalid(rowId)) {\r\n\t\t\t\tthis.updatedRows.splice(ind, 1);\r\n\t\t\t\tthis.$gantt.setUserData(rowId, this.action_param, \"\", this._ganttMode);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.markRow(rowId, state, mode);\r\n\t\tif (state && this.autoUpdate) {\r\n\t\t\tthis.sendData(rowId);\r\n\t\t}\r\n\t}\r\n\r\n\tmarkRow(id: number | string, state: boolean, mode: string) {\r\n\t\tlet str = \"\";\r\n\t\tconst invalid = this.is_invalid(id);\r\n\t\tif (invalid) {\r\n\t\t\tstr = this.styles[invalid];\r\n\t\t\tstate = true;\r\n\t\t}\r\n\t\tif (this.callEvent(\"onRowMark\", [id, state, mode, invalid])) {\r\n\t\t\t// default logic\r\n\t\t\tstr = this.styles[state ? mode : \"clear\"] + \" \" + str;\r\n\r\n\t\t\tthis.$gantt[this._methods[0]](id, str);\r\n\r\n\t\t\tif (invalid && invalid.details) {\r\n\t\t\t\tstr += this.styles[invalid + \"_cell\"];\r\n\t\t\t\tfor (let i = 0; i < invalid.details.length; i++) {\r\n\t\t\t\t\tif (invalid.details[i]) {\r\n\t\t\t\t\t\tthis.$gantt[this._methods[1]](id, i, str);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tgetActionByState(state: string):string {\r\n\t\tif (state === \"inserted\") {\r\n\t\t\treturn \"create\";\r\n\t\t}\r\n\r\n\t\tif (state === \"updated\") {\r\n\t\t\treturn \"update\";\r\n\t\t}\r\n\r\n\t\tif (state === \"deleted\") {\r\n\t\t\treturn \"delete\";\r\n\t\t}\r\n\r\n\t\t// reorder\r\n\t\treturn \"update\";\r\n\t}\r\n\r\n\tgetState(id: number | string) {\r\n\t\treturn this.$gantt.getUserData(id, this.action_param, this._ganttMode);\r\n\t}\r\n\r\n\tis_invalid(id: number | string) {\r\n\t\treturn this._invalid[id];\r\n\t}\r\n\r\n\tset_invalid(id: number | string, mode: any, details?) {\r\n\t\tif (details) {\r\n\t\t\tmode = {\r\n\t\t\t\tvalue: mode,\r\n\t\t\t\tdetails,\r\n\t\t\t\ttoString: function() { // tslint:disable-line\r\n\t\t\t\t\treturn this.value.toString();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t\tthis._invalid[id] = mode;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: check mandatory fields and verify values of cells, initiate update (if specified). Can be redefined in order to provide custom validation\r\n\t * @param: rowId - id of row to set update-status for\r\n\t * @type: public\r\n\t */\r\n\t// tslint:disable-next-line\r\n\tcheckBeforeUpdate(rowId: number | string) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: send row(s) values to server\r\n\t * @param: rowId - id of row which data to send. If not specified, then all \"updated\" rows will be send\r\n\t * @type: public\r\n\t */\r\n\tsendData(rowId?: any) {\r\n\t\tif (this.$gantt.editStop) {\r\n\t\t\tthis.$gantt.editStop();\r\n\t\t}\r\n\r\n\t\tif (typeof rowId === \"undefined\" || this._tSend) {\r\n\r\n\t\t\tconst pendingUpdateModes = [];\r\n\t\t\tif(this.modes){\r\n\t\t\t\tconst knownModes = [\"task\", \"link\", \"assignment\"];\r\n\t\t\t\tknownModes.forEach((mode) => {\r\n\t\t\t\t\tif(this.modes[mode] && this.modes[mode].updatedRows.length){\r\n\t\t\t\t\t\tpendingUpdateModes.push(mode);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\tif (pendingUpdateModes.length){\r\n\t\t\t\tfor(let i = 0; i < pendingUpdateModes.length; i++){\r\n\t\t\t\t\tthis.setGanttMode(pendingUpdateModes[i]);\r\n\t\t\t\t\tthis.sendAllData();\r\n\t\t\t\t}\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\treturn this.sendAllData();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (this._in_progress[rowId]) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tif (!this.checkBeforeUpdate(rowId) && this.callEvent(\"onValidationError\", [rowId, this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t}\r\n\r\n\tserialize(data: any, id: any) {\r\n\t\tif (this._serializeAsJson) {\r\n\t\t\treturn this._serializeAsJSON(data);\r\n\t\t}\r\n\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\t\tif (typeof id !== \"undefined\") {\r\n\t\t\treturn this.serialize_one(data, \"\");\r\n\t\t} else {\r\n\t\t\tconst stack = [];\r\n\t\t\tconst keys = [];\r\n\t\t\tfor (const key in data) {\r\n\t\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\t\tstack.push(this.serialize_one(data[key], key + this._postDelim));\r\n\t\t\t\t\tkeys.push(key);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tstack.push(\"ids=\" + this.escape(keys.join(\",\")));\r\n\t\t\tif (this.$gantt.security_key) {\r\n\t\t\t\tstack.push(\"dhx_security=\" + this.$gantt.security_key);\r\n\t\t\t}\r\n\t\t\treturn stack.join(\"&\");\r\n\t\t}\r\n\t}\r\n\r\n\tserialize_one(data: any, pref: string) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\t\tconst stack = [];\r\n\t\tlet serialized = \"\";\r\n\t\tfor (const key in data)\r\n\t\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\t\tif ((key === \"id\" ||\r\n\t\t\t\t\tkey == this.action_param) && // tslint:disable-line\r\n\t\t\t\t\tthis._tMode === \"REST\") {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif (typeof data[key] === \"string\" || typeof data[key] === \"number\") {\r\n\t\t\t\t\tserialized = data[key];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tserialized = JSON.stringify(data[key]);\r\n\t\t\t\t}\r\n\t\t\t\tstack.push(this.escape((pref || \"\") + key) + \"=\" + this.escape(serialized));\r\n\t\t\t}\r\n\t\treturn stack.join(\"&\");\r\n\t}\r\n\r\n\tsendAllData() {\r\n\t\tif (!this.updatedRows.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.messages = [];\r\n\t\tlet valid: any = true;\r\n\r\n\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\tvalid = valid && this.checkBeforeUpdate(rowId);\r\n\t\t});\r\n\r\n\t\tif (!valid && !this.callEvent(\"onValidationError\", [\"\", this.messages])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (this._tSend) {\r\n\t\t\tthis._sendData(this._getAllData());\r\n\t\t} else {\r\n\t\t\t// this.updatedRows can be spliced from onBeforeUpdate via dp.setUpdated false\r\n\t\t\t// use an iterator instead of for(var i = 0; i < this.updatedRows; i++) then\r\n\t\t\tthis._forEachUpdatedRow(function(rowId) {\r\n\t\t\t\tif (!this._in_progress[rowId]) {\r\n\t\t\t\t\tif (this.is_invalid(rowId)) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis._beforeSendData(this._getRowData(rowId), rowId);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tfindRow(pattern: any) {\r\n\t\tlet i = 0;\r\n\t\tfor (i = 0; i < this.updatedRows.length; i++) {\r\n\t\t\tif (pattern == this.updatedRows[i]) { // tslint:disable-line\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn i;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: define custom actions\r\n\t * @param: name - name of action, same as value of action attribute\r\n\t * @param: handler - custom function, which receives a XMl response content for action\r\n\t * @type: private\r\n\t */\r\n\tdefineAction(name: string, handler: any) {\r\n\t\tif (!this._uActions) {\r\n\t\t\tthis._uActions = {};\r\n\t\t}\r\n\t\tthis._uActions[name] = handler;\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: used in combination with setOnBeforeUpdateHandler to create custom client-server transport system\r\n\t * @param: sid - id of item before update\r\n\t * @param: tid - id of item after up0ate\r\n\t * @param: action - action name\r\n\t * @type: public\r\n\t * @topic: 0\r\n\t */\r\n\tafterUpdateCallback(sid: number | string, tid: number | string, action: string, btag: any, ganttMode: string) {\r\n\t\tif(!this.$gantt){\r\n\t\t\t// destructor has been called before the callback\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.setGanttMode(ganttMode);\r\n\r\n\t\tconst marker = sid;\r\n\t\tconst correct = (action !== \"error\" && action !== \"invalid\");\r\n\t\tif (!correct) {\r\n\t\t\tthis.set_invalid(sid, action);\r\n\t\t}\r\n\t\tif ((this._uActions) && (this._uActions[action]) && (!this._uActions[action](btag))) {\r\n\t\t\treturn (delete this._in_progress[marker]);\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tthis.setUpdated(sid, false);\r\n\t\t}\r\n\r\n\t\tconst originalSid = sid;\r\n\r\n\t\tswitch (action) {\r\n\t\t\tcase \"inserted\":\r\n\t\t\tcase \"insert\":\r\n\t\t\t\tif (tid != sid) { // tslint:disable-line\r\n\t\t\t\t\tthis.setUpdated(sid, false);\r\n\t\t\t\t\tthis.$gantt[this._methods[2]](sid, tid);\r\n\t\t\t\t\tsid = tid;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delete\":\r\n\t\t\tcase \"deleted\":\r\n\t\t\t\tif(!this.deleteAfterConfirmation || this._ganttMode !== \"task\"){\r\n\t\t\t\t\tthis.$gantt.setUserData(sid, this.action_param, \"true_deleted\", this._ganttMode);\r\n\t\t\t\t\tthis.$gantt[this._methods[3]](sid);\r\n\t\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif (this._ganttMode === \"task\" && this.$gantt.isTaskExists(sid)) {\r\n\t\t\t\t\t\tthis.$gantt.setUserData(sid, this.action_param, \"true_deleted\", this._ganttMode);\r\n\t\t\t\t\t\tconst task = this.$gantt.getTask(sid);\r\n\t\t\t\t\t\tthis.$gantt.silent(() => {\r\n\t\t\t\t\t\t\tthis.$gantt.deleteTask(sid);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tthis.$gantt.callEvent(\"onAfterTaskDelete\", [sid, task]);\r\n\t\t\t\t\t\tthis.$gantt.render();\r\n\t\t\t\t\t\tdelete this._in_progress[marker];\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this.callEvent(\"onAfterUpdate\", [sid, action, tid, btag]);\r\n\t\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif (this._in_progress[marker] !== \"wait\") {\r\n\t\t\tif (correct) {\r\n\t\t\t\tthis.$gantt.setUserData(sid, this.action_param, \"\", this._ganttMode);\r\n\t\t\t}\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t} else {\r\n\t\t\tdelete this._in_progress[marker];\r\n\t\t\tthis.setUpdated(tid, true, this.$gantt.getUserData(sid, this.action_param, this._ganttMode));\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdate\", [originalSid, action, tid, btag]);\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: response from server\r\n\t * @param: xml - XMLLoader object with response XML\r\n\t * @type: private\r\n\t */\r\n\tafterUpdate(that: any, xml: any, id?:any) {\r\n\t\tlet _xml;\r\n\t\tif (arguments.length === 3) {\r\n\t\t\t_xml = arguments[1];\r\n\t\t} else {\r\n\t\t\t// old dataprocessor\r\n\t\t\t_xml = arguments[4];\r\n\t\t}\r\n\t\tlet mode = this.getGanttMode();\r\n\t\tconst reqUrl = _xml.filePath || _xml.url;\r\n\r\n\t\tif (this._tMode !== \"REST\" && this._tMode !== \"REST-JSON\") {\r\n\t\t\tif (reqUrl.indexOf(\"gantt_mode=links\") !== -1) {\r\n\t\t\t\tmode = \"link\";\r\n\t\t\t} else if (reqUrl.indexOf(\"gantt_mode=assignments\") !== -1) {\r\n\t\t\t\tmode = \"assignment\";\r\n\t\t\t} else {\r\n\t\t\t\tmode = \"task\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (reqUrl.indexOf(\"/link\") >= 0) {\r\n\t\t\t\tmode = \"link\";\r\n\t\t\t} else if(reqUrl.indexOf(\"/assignment\") >= 0){\r\n\t\t\t\tmode = \"assignment\";\r\n\t\t\t} else {\r\n\t\t\t\tmode = \"task\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.setGanttMode(mode);\r\n\r\n\t\tconst ajax = this.$gantt.ajax;\r\n\t\t// try to use json first\r\n\t\tlet tag;\r\n\r\n\t\ttry {\r\n\t\t\ttag = JSON.parse(xml.xmlDoc.responseText);\r\n\t\t} catch (e) {\r\n\r\n\t\t\t// empty response also can be processed by json handler\r\n\t\t\tif (!xml.xmlDoc.responseText.length) {\r\n\t\t\t\ttag = {};\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst processCallback = (itemId: any) => {\r\n\t\t\tconst action = tag.action || this.getState(itemId) || \"updated\";\r\n\t\t\tconst sid = tag.sid || itemId[0];\r\n\t\t\tconst tid = tag.tid || itemId[0];\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, tag, mode);\r\n\t\t};\r\n\t\tif (tag) {\r\n\t\t\t// GS-753. When multiple tasks are updated, unhighlight all of them\r\n\t\t\tif (Array.isArray(id) && id.length > 1) {\r\n\t\t\t\tid.forEach((taskId) => processCallback(taskId));\r\n\t\t\t} else {\r\n\t\t\t\tprocessCallback(id);\r\n\t\t\t}\r\n\t\t\tthat.finalizeUpdate();\r\n\t\t\tthis.setGanttMode(mode);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// xml response\r\n\t\tconst top = ajax.xmltop(\"data\", xml.xmlDoc); // fix incorrect content type in IE\r\n\t\tif (!top) {\r\n\t\t\treturn this.cleanUpdate(id);\r\n\t\t}\r\n\t\tconst atag = ajax.xpath(\"//data/action\", top);\r\n\t\tif (!atag.length) {\r\n\t\t\treturn this.cleanUpdate(id);\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < atag.length; i++) {\r\n\t\t\tconst btag = atag[i];\r\n\t\t\tconst action = btag.getAttribute(\"type\");\r\n\t\t\tconst sid = btag.getAttribute(\"sid\");\r\n\t\t\tconst tid = btag.getAttribute(\"tid\");\r\n\r\n\t\t\tthat.afterUpdateCallback(sid, tid, action, btag, mode);\r\n\t\t}\r\n\t\tthat.finalizeUpdate();\r\n\t}\r\n\r\n\tcleanUpdate(id: any[]) {\r\n\t\tif (id) {\r\n\t\t\tfor (let i = 0; i < id.length; i++) {\r\n\t\t\t\tdelete this._in_progress[id[i]];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfinalizeUpdate() {\r\n\t\tif (this._waitMode) {\r\n\t\t\tthis._waitMode--;\r\n\t\t}\r\n\r\n\t\tthis.callEvent(\"onAfterUpdateFinish\", []);\r\n\t\tif (!this.updatedRows.length) {\r\n\t\t\tthis.callEvent(\"onFullSync\", []);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * @desc: initializes data-processor\r\n\t * @param: gantt - dhtmlxGantt object to attach this data-processor to\r\n\t * @type: public\r\n\t */\r\n\tinit(gantt: any) {\r\n\t\tif (this._initialized) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.$gantt = gantt;\r\n\t\tif (this.$gantt._dp_init) {\r\n\t\t\tthis.$gantt._dp_init(this);\r\n\t\t}\r\n\r\n\t\tthis._setDefaultTransactionMode();\r\n\r\n\t\tthis.styles = {\r\n\t\t\tupdated:\"gantt_updated\",\r\n\t\t\torder:\"gantt_updated\",\r\n\t\t\tinserted:\"gantt_inserted\",\r\n\t\t\tdeleted:\"gantt_deleted\",\r\n\t\t\tdelete_confirmation:\"gantt_deleted\",\r\n\t\t\tinvalid:\"gantt_invalid\",\r\n\t\t\terror:\"gantt_error\",\r\n\t\t\tclear:\"\"\r\n\t\t};\r\n\r\n\t\tthis._methods=[\"_row_style\",\"setCellTextStyle\",\"_change_id\",\"_delete_task\"];\r\n\t\textendGantt(this.$gantt, this);\r\n\t\tconst dataProcessorEvents = new DataProcessorEvents(this.$gantt, this);\r\n\t\tdataProcessorEvents.attach();\r\n\t\tthis.attachEvent(\"onDestroy\", function() {\r\n\t\t\tdelete this.setGanttMode;\r\n\t\t\tdelete this._getRowData;\r\n\r\n\t\t\tdelete this.$gantt._dp;\r\n\t\t\tdelete this.$gantt._change_id;\r\n\t\t\tdelete this.$gantt._row_style;\r\n\t\t\tdelete this.$gantt._delete_task;\r\n\t\t\tdelete this.$gantt._sendTaskOrder;\r\n\t\t\tdelete this.$gantt;\r\n\r\n\t\t\tdataProcessorEvents.detach();\r\n\t\t});\r\n\t\tthis.$gantt.callEvent(\"onDataProcessorReady\", [this]);\r\n\t\tthis._initialized = true;\r\n\t}\r\n\r\n\tsetOnAfterUpdate(handler) {\r\n\t\tthis.attachEvent(\"onAfterUpdate\", handler);\r\n\t}\r\n\r\n\tsetOnBeforeUpdateHandler(handler) {\r\n\t\tthis.attachEvent(\"onBeforeDataSending\", handler);\r\n\t}\r\n\r\n\t/* starts autoupdate mode\r\n\t\t@param interval time interval for sending update requests\r\n\t*/\r\n\tsetAutoUpdate(interval, user) {\r\n\t\tinterval = interval || 2000;\r\n\r\n\t\tthis._user = user || (new Date()).valueOf();\r\n\t\tthis._needUpdate = false;\r\n\r\n\t\tthis._updateBusy = false;\r\n\r\n\t\tthis.attachEvent(\"onAfterUpdate\", this.afterAutoUpdate); // arguments sid, action, tid, xml_node;\r\n\r\n\t\tthis.attachEvent(\"onFullSync\", this.fullSync);\r\n\r\n\t\tsetInterval(() => {\r\n\t\t\tthis.loadUpdate();\r\n\t\t}, interval);\r\n\t}\r\n\r\n\t/* process updating request response\r\n\t\tif status == collision version is deprecated\r\n\t\tset flag for autoupdating immediately\r\n\t*/\r\n\tafterAutoUpdate(sid, action, tid, xml_node) { // tslint:disable-line\r\n\t\tif (action === \"collision\") {\r\n\t\t\tthis._needUpdate = true;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\r\n\t/* callback function for onFillSync event\r\n\t\tcall update function if it's need\r\n\t*/\r\n\tfullSync() {\r\n\t\tif (this._needUpdate) {\r\n\t\t\tthis._needUpdate = false;\r\n\t\t\tthis.loadUpdate();\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\r\n\t/* sends query to the server and call callback function\r\n\t*/\r\n\tgetUpdates(url, callback) {\r\n\t\tconst ajax = this.$gantt.ajax;\r\n\t\tif (this._updateBusy) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tthis._updateBusy = true;\r\n\t\t}\r\n\r\n\t\tajax.get(url, callback);\r\n\r\n\t}\r\n\r\n\t/* loads updates and processes them\r\n\t*/\r\n\tloadUpdate() {\r\n\t\tconst ajax = this.$gantt.ajax;\r\n\t\tconst version = this.$gantt.getUserData(0, \"version\", this._ganttMode);\r\n\t\tlet url = this.serverProcessor + ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, \"dhx_version=\" + version].join(\"&\");\r\n\t\turl = url.replace(\"editing=true&\", \"\");\r\n\t\tthis.getUpdates(url, (xml) => {\r\n\t\t\tconst vers = ajax.xpath(\"//userdata\", xml);\r\n\t\t\tthis.$gantt.setUserData(0, \"version\", this._getXmlNodeValue(vers[0]), this._ganttMode);\r\n\r\n\t\t\tconst updates = ajax.xpath(\"//update\", xml);\r\n\t\t\tif (updates.length) {\r\n\t\t\t\tthis._silent_mode = true;\r\n\r\n\t\t\t\tfor (let i = 0; i < updates.length; i++) {\r\n\t\t\t\t\tconst status = updates[i].getAttribute(\"status\");\r\n\t\t\t\t\tconst id = updates[i].getAttribute(\"id\");\r\n\t\t\t\t\tconst parent = updates[i].getAttribute(\"parent\");\r\n\t\t\t\t\tswitch (status) {\r\n\t\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"insertCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"updated\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"updateCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\t\tthis.callEvent(\"deleteCallback\", [updates[i], id, parent]);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._silent_mode = false;\r\n\t\t\t}\r\n\r\n\t\t\tthis._updateBusy = false;\r\n\t\t});\r\n\t}\r\n\r\n\tdestructor() {\r\n\t\tthis.callEvent(\"onDestroy\", []);\r\n\t\tthis.detachAllEvents();\r\n\r\n\t\tthis.updatedRows = [];\r\n\t\tthis._in_progress = {}; // ?\r\n\t\tthis._invalid = {};\r\n\t\tthis._storage.clear();\r\n\t\tthis._storage = null;\r\n\t\tthis._headers = null;\r\n\t\tthis._payload = null;\r\n\t\tdelete this._initialized;\r\n\t}\r\n\r\n\tsetGanttMode(mode) {\r\n\t\tif (mode === \"tasks\") {\r\n\t\t\tmode = \"task\";\r\n\t\t} else if (mode === \"links\") {\r\n\t\t\tmode = \"link\";\r\n\t\t}\r\n\r\n\t\tconst modes = this.modes || {};\r\n\t\tconst ganttMode = this.getGanttMode();\r\n\t\tif (ganttMode) {\r\n\t\t\tmodes[ganttMode] = {\r\n\t\t\t\t_in_progress : this._in_progress,\r\n\t\t\t\t_invalid: this._invalid,\r\n\t\t\t\t_storage: this._storage,\r\n\t\t\t\tupdatedRows : this.updatedRows\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tlet newState = modes[mode];\r\n\t\tif (!newState) {\r\n\t\t\tnewState = modes[mode] = {\r\n\t\t\t\t_in_progress : {},\r\n\t\t\t\t_invalid : {},\r\n\t\t\t\t_storage : SimpleStorage.create(),\r\n\t\t\t\tupdatedRows : []\r\n\t\t\t};\r\n\t\t}\r\n\t\tthis._in_progress = newState._in_progress;\r\n\t\tthis._invalid = newState._invalid;\r\n\t\tthis._storage = newState._storage;\r\n\t\tthis.updatedRows = newState.updatedRows;\r\n\t\tthis.modes = modes;\r\n\t\tthis._ganttMode = mode;\r\n\t}\r\n\tgetGanttMode():string {\r\n\t\treturn this._ganttMode;\r\n\t}\r\n\r\n\tstoreItem(item) {\r\n\t\tthis._storage.storeItem(item);\r\n\t}\r\n\r\n\turl(url: string) {\r\n\t\tthis.serverProcessor = this._serverProcessor = url;\r\n\t}\r\n\r\n\tprotected _beforeSendData(data: any, rowId: any) {\r\n\t\tif (!this.callEvent(\"onBeforeUpdate\", [rowId, this.getState(rowId), data])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tthis._sendData(data, rowId);\r\n\t}\r\n\r\n\tprotected _serializeAsJSON(data: any) {\r\n\t\tif (typeof data === \"string\") {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tconst copy = utils.copy(data);\r\n\t\tif (this._tMode === \"REST-JSON\") {\r\n\t\t\tdelete copy.id;\r\n\t\t\tdelete copy[this.action_param];\r\n\t\t}\r\n\r\n\t\treturn JSON.stringify(copy);\r\n\t}\r\n\r\n\tprotected _applyPayload(url: string) {\r\n\t\tconst ajax = this.$gantt.ajax;\r\n\t\tif (this._payload) {\r\n\t\t\tfor (const key in this._payload) {\r\n\t\t\t\turl = url + ajax.urlSeparator(url) + this.escape(key) + \"=\" + this.escape(this._payload[key]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn url;\r\n\t}\r\n\r\n\t// GET/POST/JSON modes of the dataProcessor didn't send the whole data items in 'delete' requests\r\n\t// clear extra info from the data in order not to change the request format\r\n\tprotected _cleanupArgumentsBeforeSend(dataToSend: any) {\r\n\t\tlet processedData;\r\n\t\tif(dataToSend[this.action_param] === undefined){// hash of updated items, and not an individual item\r\n\t\t\tprocessedData = {};\r\n\t\t\tfor(const i in dataToSend) {\r\n\t\t\t\tprocessedData[i] = this._cleanupArgumentsBeforeSend(dataToSend[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t}\r\n\t\treturn processedData;\r\n\t}\r\n\tprotected _cleanupItemBeforeSend(updatedItem: any) {\r\n\t\tlet output = null;\r\n\t\tif(updatedItem){\r\n\t\t\tif(updatedItem[this.action_param] === \"deleted\"){\r\n\t\t\t\toutput = {};\r\n\t\t\t\toutput.id = updatedItem.id;\r\n\t\t\t\toutput[this.action_param] = updatedItem[this.action_param];\r\n\t\t\t}else{\r\n\t\t\t\toutput = updatedItem;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn output;\r\n\t}\r\n\r\n\tprotected _sendData(dataToSend: any, rowId?: any) {\r\n\t\tif (!dataToSend) {\r\n\t\t\treturn; // nothing to send\r\n\t\t}\r\n\t\tif (!this.callEvent(\"onBeforeDataSending\", rowId ? [rowId, this.getState(rowId), dataToSend] : [null, null, dataToSend])) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (rowId) {\r\n\t\t\tthis._in_progress[rowId] = (new Date()).valueOf();\r\n\t\t}\r\n\r\n\t\tconst ajax = this.$gantt.ajax;\r\n\r\n\t\tif (this._tMode === \"CUSTOM\") {\r\n\t\t\tconst taskState = this.getState(rowId);\r\n\t\t\tconst taskAction = this.getActionByState(taskState);\r\n\t\t\tconst ganttMode = this.getGanttMode();\r\n\t\t\tconst _onResolvedCreateUpdate = (tag) => {\r\n\t\t\t\tlet action = taskState || \"updated\";\r\n\t\t\t\tlet sid = rowId;\r\n\t\t\t\tlet tid = rowId;\r\n\r\n\t\t\t\tif (tag) {\r\n\t\t\t\t\taction = tag.action || taskState;\r\n\t\t\t\t\tsid = tag.sid || sid;\r\n\t\t\t\t\ttid = tag.id || tag.tid || tid;\r\n\t\t\t\t}\r\n\t\t\t\tthis.afterUpdateCallback(sid, tid, action, tag, ganttMode);\r\n\t\t\t};\r\n\r\n\t\t\tlet actionPromise;\r\n\t\t\tif (this._router instanceof Function) {\r\n\t\t\t\tif(this._routerParametersFormat === \"object\"){\r\n\t\t\t\t\tconst obj = {\r\n\t\t\t\t\t\tentity: ganttMode,\r\n\t\t\t\t\t\taction: taskAction,\r\n\t\t\t\t\t\tdata: dataToSend,\r\n\t\t\t\t\t\tid: rowId\r\n\t\t\t\t\t};\r\n\t\t\t\t\tactionPromise = this._router(obj);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tactionPromise = this._router(ganttMode, taskAction, dataToSend, rowId);\r\n\t\t\t\t}\r\n\t\t\t} else if (this._router[ganttMode] instanceof Function) {\r\n\t\t\t\tactionPromise = this._router[ganttMode](taskAction, dataToSend, rowId);\r\n\t\t\t} else {\r\n\r\n\t\t\t\tconst errorMsgStart = \"Incorrect configuration of gantt.createDataProcessor\";\r\n\t\t\t\tconst errorMsgEnd = `\r\nYou need to either add missing properties to the dataProcessor router object or to use a router function.\r\nSee https://docs.dhtmlx.com/gantt/desktop__server_side.html#customrouting and https://docs.dhtmlx.com/gantt/api__gantt_createdataprocessor.html for details.`;\r\n\r\n\t\t\t\tif(!this._router[ganttMode]){\r\n\t\t\t\t\tthrow new Error(`${errorMsgStart}: router for the **${ganttMode}** entity is not defined. ${errorMsgEnd}`);\r\n\t\t\t\t}\r\n\t\t\t\tswitch (taskState) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tif(!this._router[ganttMode].create){\r\n\t\t\t\t\t\t\tthrow new Error(`${errorMsgStart}: **create** action for the **${ganttMode}** entity is not defined. ${errorMsgEnd}`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactionPromise = this._router[ganttMode].create(dataToSend);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tif(!this._router[ganttMode].delete){\r\n\t\t\t\t\t\t\tthrow new Error(`${errorMsgStart}: **delete** action for the **${ganttMode}** entity is not defined. ${errorMsgEnd}`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactionPromise = this._router[ganttMode].delete(rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tif(!this._router[ganttMode].update){\r\n\t\t\t\t\t\t\tthrow new Error(`${errorMsgStart}: **update**\" action for the **${ganttMode}** entity is not defined. ${errorMsgEnd}`);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactionPromise = this._router[ganttMode].update(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(actionPromise){\r\n\t\t\t\t// neither promise nor {tid: newId} response object\r\n\t\t\t\tif(!actionPromise.then &&\r\n\t\t\t\t\t(actionPromise.id === undefined && actionPromise.tid === undefined && actionPromise.action === undefined)){\r\n\t\t\t\t\tthrow new Error(\"Incorrect router return value. A Promise or a response object is expected\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(actionPromise.then){\r\n\t\t\t\t\tactionPromise.then(_onResolvedCreateUpdate).catch((error) => {\r\n\t\t\t\t\t\tif(error && error.action){\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate(error);\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t_onResolvedCreateUpdate({ action: \"error\", value: error});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// custom method may return a response object in case of sync action\r\n\t\t\t\t\t_onResolvedCreateUpdate(actionPromise);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t_onResolvedCreateUpdate(null);\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet queryParams: any;\r\n\t\tqueryParams = {\r\n\t\t\tcallback: (xml) => {\r\n\t\t\t\tconst ids = [];\r\n\r\n\t\t\t\tif (rowId) {\r\n\t\t\t\t\tids.push(rowId);\r\n\t\t\t\t} else if (dataToSend) {\r\n\t\t\t\t\tfor (const key in dataToSend) {\r\n\t\t\t\t\t\tids.push(key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn this.afterUpdate(this, xml, ids);\r\n\t\t\t},\r\n\t\t\theaders: this._headers\r\n\t\t};\r\n\r\n\t\tconst dhxVersion = \"dhx_version=\" + this.$gantt.getUserData(0, \"version\", this._ganttMode);\r\n\t\tconst urlParams = this.serverProcessor + (this._user ? (ajax.urlSeparator(this.serverProcessor) + [\"dhx_user=\" + this._user, dhxVersion].join(\"&\")) : \"\");\r\n\t\tlet url: any = this._applyPayload(urlParams);\r\n\t\tlet data;\r\n\r\n\t\tswitch (this._tMode) {\r\n\t\t\tcase \"GET\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url + ajax.urlSeparator(url) + this.serialize(data, rowId);\r\n\t\t\t\tqueryParams.method = \"GET\";\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"POST\":\r\n\t\t\t\tdata = this._cleanupArgumentsBeforeSend(dataToSend);\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = this.serialize(data, rowId);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"JSON\":\r\n\t\t\t\tdata = {};\r\n\t\t\t\tconst preprocessedData = this._cleanupItemBeforeSend(dataToSend);\r\n\t\t\t\tfor (const key in preprocessedData) {\r\n\t\t\t\t\tif (key === this.action_param || key === \"id\" || key === \"gr_id\") {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdata[key] = preprocessedData[key];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tqueryParams.url = url;\r\n\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\tqueryParams.data = JSON.stringify({\r\n\t\t\t\t\tid: rowId,\r\n\t\t\t\t\taction: dataToSend[this.action_param],\r\n\t\t\t\t\tdata\r\n\t\t\t\t});\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"REST\":\r\n\t\t\tcase \"REST-JSON\":\r\n\t\t\t\turl = urlParams.replace(/(&|\\?)editing=true/, \"\");\r\n\t\t\t\tdata = \"\";\r\n\r\n\t\t\t\tswitch (this.getState(rowId)) {\r\n\t\t\t\t\tcase \"inserted\":\r\n\t\t\t\t\t\tqueryParams.method = \"POST\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"deleted\":\r\n\t\t\t\t\t\tqueryParams.method = \"DELETE\";\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tqueryParams.method = \"PUT\";\r\n\t\t\t\t\t\tqueryParams.data = this.serialize(dataToSend, rowId);\r\n\t\t\t\t\t\turl = url + (url.slice(-1) === \"/\" ? \"\" : \"/\") + rowId;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tqueryParams.url = this._applyPayload(url);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tthis._waitMode++;\r\n\t\treturn ajax.query(queryParams);\r\n\t}\r\n\r\n\tprotected _forEachUpdatedRow(code: any) {\r\n\t\tconst updatedRows = this.updatedRows.slice();\r\n\t\tfor (let i = 0; i < updatedRows.length; i++) {\r\n\t\t\tconst rowId = updatedRows[i];\r\n\t\t\tif (this.$gantt.getUserData(rowId, this.action_param, this._ganttMode)) {\r\n\t\t\t\tcode.call(this, rowId);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tprotected _setDefaultTransactionMode() {\r\n\t\tif (this.serverProcessor) {\r\n\t\t\tthis.setTransactionMode(\"POST\", true);\r\n\t\t\tthis.serverProcessor += (this.serverProcessor.indexOf(\"?\") !== -1 ? \"&\" : \"?\") + \"editing=true\";\r\n\t\t\tthis._serverProcessor = this.serverProcessor;\r\n\t\t}\r\n\t}\r\n\r\n\t/* returns xml node value\r\n\t\t@param node\r\n\t\t\txml node\r\n\t*/\r\n\tprotected _getXmlNodeValue(node) {\r\n\t\tif (node.firstChild) {\r\n\t\t\treturn node.firstChild.nodeValue;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\tprotected _getAllData() {\r\n\t\tconst out = {};\r\n\t\tlet hasOne = false;\r\n\r\n\t\tthis._forEachUpdatedRow(function(id) {\r\n\t\t\tif (this._in_progress[id] || this.is_invalid(id)){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tconst row = this._getRowData(id);\r\n\t\t\tif (!this.callEvent(\"onBeforeUpdate\", [id, this.getState(id), row])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tout[id] = row;\r\n\t\t\thasOne = true;\r\n\t\t\tthis._in_progress[id] = (new Date()).valueOf();\r\n\t\t});\r\n\r\n\t\treturn hasOne ? out : null;\r\n\t}\r\n\r\n\tprotected _prepareDate(value: Date) : string {\r\n\t\treturn this.$gantt.defined(this.$gantt.templates.xml_format) ? this.$gantt.templates.xml_format(value) : this.$gantt.templates.format_date(value);\r\n\t}\r\n\r\n\tprotected _prepareArray(value: any[], traversedObjects: object[]) : any[] {\r\n\t\ttraversedObjects.push(value);\r\n\r\n\t\treturn value.map((item) => {\r\n\t\t\tif(helpers.isDate(item)){\r\n\t\t\t\treturn this._prepareDate(item);\r\n\t\t\t} else if (Array.isArray(item) && !helpers.arrayIncludes(traversedObjects, item)){\r\n\t\t\t\treturn this._prepareArray(item, traversedObjects);\r\n\t\t\t} else if (item && typeof item === \"object\" && !helpers.arrayIncludes(traversedObjects, item)) {\r\n\t\t\t\treturn this._prepareObject(item, traversedObjects);\r\n\t\t\t} else {\r\n\t\t\t\treturn item;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\tprotected _prepareObject(rawItem: any, traversedObjects: object[]) : any {\r\n\t\tconst processedItem = {};\r\n\t\ttraversedObjects.push(rawItem);\r\n\r\n\t\tfor (const key in rawItem) {\r\n\t\t\tif (key.substr(0, 1) === \"$\") {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tconst value = rawItem[key];\r\n\t\t\tif (helpers.isDate(value)) {\r\n\t\t\t\tprocessedItem[key] = this._prepareDate(value);\r\n\t\t\t} else if(value === null) {\r\n\t\t\t\tprocessedItem[key] = \"\";\r\n\t\t\t} else if (Array.isArray(value) && !helpers.arrayIncludes(traversedObjects, value)){\r\n\t\t\t\tprocessedItem[key] = this._prepareArray(value, traversedObjects);\r\n\t\t\t} else if (value && typeof value === \"object\" && !helpers.arrayIncludes(traversedObjects, value)) {\r\n\t\t\t\tprocessedItem[key] = this._prepareObject(value, traversedObjects);\r\n\t\t\t} else {\r\n\t\t\t\tprocessedItem[key] = value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn processedItem;\r\n\t}\r\n\r\n\tprotected _prepareDataItem(rawItem: any): any {\r\n\t\tconst processedItem = this._prepareObject(rawItem, []);\r\n\r\n\t\tprocessedItem[this.action_param] = this.$gantt.getUserData(rawItem.id, this.action_param, this._ganttMode);\r\n\t\treturn processedItem;\r\n\t}\r\n\r\n\tprotected getStoredItem(id){\r\n\t\treturn this._storage.getStoredItem(id);\r\n\t}\r\n\r\n\tprotected _getRowData(id) {\r\n\t\tlet dataItem;\r\n\t\tconst gantt = this.$gantt;\r\n\t\tif (this.getGanttMode() === \"task\") {\r\n\t\t\tif(gantt.isTaskExists(id)){\r\n\t\t\t\tdataItem =this.$gantt.getTask(id);\r\n\t\t\t}\r\n\t\t} else if (this.getGanttMode() === \"assignment\") {\r\n\t\t\tif(this.$gantt.$data.assignmentsStore.exists(id)){\r\n\t\t\t\tdataItem =this.$gantt.$data.assignmentsStore.getItem(id);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(gantt.isLinkExists(id)){\r\n\t\t\t\tdataItem =this.$gantt.getLink(id);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = this.getStoredItem(id);\r\n\t\t}\r\n\r\n\t\tif (!dataItem) {\r\n\t\t\tdataItem = { id };\r\n\t\t}\r\n\r\n\t\treturn this._prepareDataItem(dataItem);\r\n\t}\r\n}","var DataProcessor = require(\"./data_processor\");\n\nmodule.exports = {\n DEPRECATED_api: function DEPRECATED_api(server) {\n return new DataProcessor.DataProcessor(server);\n },\n createDataProcessor: DataProcessor.createDataProcessor,\n getDataProcessorModes: DataProcessor.getAvailableModes\n};","var isHeadless = require(\"../../utils/is_headless\");\n\nvar storeRenderCreator = function storeRenderCreator(name, gantt) {\n var store = gantt.getDatastore(name);\n var itemRepainter = {\n renderItem: function renderItem(id, renderer) {\n var renders = renderer.getLayers();\n var item = store.getItem(id);\n\n if (item && store.isVisible(id)) {\n for (var i = 0; i < renders.length; i++) {\n renders[i].render_item(item);\n }\n }\n },\n renderItems: function renderItems(renderer) {\n var renderers = renderer.getLayers();\n\n for (var i = 0; i < renderers.length; i++) {\n renderers[i].clear();\n }\n\n var allData = null;\n var loadedRanges = {};\n\n for (var _i = 0; _i < renderers.length; _i++) {\n var layer = renderers[_i];\n var layerData = void 0;\n\n if (layer.get_visible_range) {\n var range = layer.get_visible_range(store);\n\n if (range.start !== undefined && range.end !== undefined) {\n var key = range.start + \" - \" + range.end;\n\n if (loadedRanges[key]) {\n layerData = loadedRanges[key];\n } else {\n layerData = store.getIndexRange(range.start, range.end);\n loadedRanges[key] = layerData;\n }\n } else if (range.ids !== undefined) {\n layerData = range.ids.map(function (id) {\n return store.getItem(id);\n });\n } else {\n throw new Error(\"Invalid range returned from 'getVisibleRange' of the layer\");\n }\n } else {\n if (!allData) {\n allData = store.getVisibleItems();\n }\n\n layerData = allData;\n }\n\n if (layer.prepare_data) {\n // GS-1605. Highlight timeline cells below tasks and in an empty chart\n layer.prepare_data(layerData);\n }\n\n renderers[_i].render_items(layerData);\n }\n },\n updateItems: function updateItems(layer) {\n if (layer.update_items) {\n var data = [];\n\n if (layer.get_visible_range) {\n var range = layer.get_visible_range(store);\n\n if (range.start !== undefined && range.end !== undefined) {\n data = store.getIndexRange(range.start, range.end);\n }\n\n if (range.ids !== undefined) {\n var extraDataArr = range.ids.map(function (id) {\n return store.getItem(id);\n }); // GS-2502: range.ids might not exist in other datastores\n\n if (extraDataArr.length > 0) {\n extraDataArr = extraDataArr.filter(function (element) {\n return element !== undefined;\n });\n data = data.concat(extraDataArr);\n }\n }\n\n if ((range.start == undefined || range.end == undefined) && range.ids == undefined) {\n throw new Error(\"Invalid range returned from 'getVisibleRange' of the layer\");\n }\n } else {\n data = store.getVisibleItems();\n }\n\n if (layer.prepare_data) {\n // GS-1605. Highlight timeline cells below tasks and in an empty chart\n layer.prepare_data(data, layer);\n }\n\n layer.update_items(data);\n }\n }\n };\n store.attachEvent(\"onStoreUpdated\", function (id, item, action) {\n if (isHeadless(gantt)) {\n return true;\n }\n\n var renderer = gantt.$services.getService(\"layers\").getDataRender(name);\n\n if (renderer) {\n renderer.onUpdateRequest = function (layer) {\n itemRepainter.updateItems(layer);\n };\n }\n });\n\n function skipRepaint(gantt) {\n var state = gantt.$services.getService(\"state\");\n\n if (state.getState(\"batchUpdate\").batch_update) {\n return true;\n } else {\n return false;\n }\n }\n\n store.attachEvent(\"onStoreUpdated\", function (id, item, action) {\n if (skipRepaint(gantt)) {\n return;\n }\n\n if (!id || action == \"move\" || action == \"delete\") {\n store.callEvent(\"onBeforeRefreshAll\", []);\n store.callEvent(\"onAfterRefreshAll\", []);\n } else {\n store.callEvent(\"onBeforeRefreshItem\", [item.id]);\n store.callEvent(\"onAfterRefreshItem\", [item.id]);\n }\n });\n store.attachEvent(\"onAfterRefreshAll\", function () {\n if (isHeadless(gantt)) {\n return true;\n }\n\n var renderer = gantt.$services.getService(\"layers\").getDataRender(name);\n\n if (renderer && !skipRepaint(gantt)) {\n itemRepainter.renderItems(renderer);\n }\n });\n store.attachEvent(\"onAfterRefreshItem\", function (id) {\n if (isHeadless(gantt)) {\n return true;\n }\n\n var renderer = gantt.$services.getService(\"layers\").getDataRender(name);\n\n if (renderer) {\n itemRepainter.renderItem(id, renderer);\n }\n }); // TODO: probably can be done more in a more efficient way\n\n store.attachEvent(\"onItemOpen\", function () {\n if (isHeadless(gantt)) {\n return true;\n }\n\n gantt.render();\n });\n store.attachEvent(\"onItemClose\", function () {\n if (isHeadless(gantt)) {\n return true;\n }\n\n gantt.render();\n });\n\n function refreshId(renders, oldId, newId, item) {\n for (var i = 0; i < renders.length; i++) {\n renders[i].change_id(oldId, newId);\n }\n }\n\n store.attachEvent(\"onIdChange\", function (oldId, newId) {\n if (isHeadless(gantt)) {\n return true;\n } // in case of linked datastores (tasks <-> links), id change should recalculate something in linked datastore before any repaint\n // use onBeforeIdChange for this hook.\n // TODO: use something more reasonable instead\n\n\n store.callEvent(\"onBeforeIdChange\", [oldId, newId]);\n\n if (skipRepaint(gantt)) {\n return;\n }\n\n if (!store.isSilent()) {\n var renderer = gantt.$services.getService(\"layers\").getDataRender(name);\n\n if (renderer) {\n // missing check for renderer GS-1814\n refreshId(renderer.getLayers(), oldId, newId, store.getItem(newId));\n itemRepainter.renderItem(newId, renderer);\n } else {\n // GS-1814 repaint ui to apply new id when the datastore don't have own renderer\n gantt.render();\n }\n }\n });\n};\n\nmodule.exports = {\n bindDataStore: storeRenderCreator\n};","function createDataStoreSelectMixin(store) {\n var selectedId = null;\n var deleteItem = store._removeItemInner;\n\n function _unselect(id) {\n selectedId = null;\n this.callEvent(\"onAfterUnselect\", [id]);\n }\n\n store._removeItemInner = function (id) {\n if (selectedId == id) {\n _unselect.call(this, id);\n }\n\n if (selectedId && this.eachItem) {\n this.eachItem(function (subItem) {\n if (subItem.id == selectedId) {\n _unselect.call(this, subItem.id);\n }\n }, id);\n }\n\n return deleteItem.apply(this, arguments);\n };\n\n store.attachEvent(\"onIdChange\", function (oldId, newId) {\n if (store.getSelectedId() == oldId) {\n store.silent(function () {\n store.unselect(oldId);\n store.select(newId);\n });\n }\n });\n return {\n select: function select(id) {\n if (id) {\n if (selectedId == id) return selectedId;\n\n if (!this._skip_refresh) {\n if (!this.callEvent(\"onBeforeSelect\", [id])) {\n return false;\n }\n }\n\n this.unselect();\n selectedId = id;\n\n if (!this._skip_refresh) {\n this.refresh(id);\n this.callEvent(\"onAfterSelect\", [id]);\n }\n }\n\n return selectedId;\n },\n getSelectedId: function getSelectedId() {\n return selectedId;\n },\n isSelected: function isSelected(id) {\n return id == selectedId;\n },\n unselect: function unselect(id) {\n var id = id || selectedId;\n if (!id) return;\n selectedId = null;\n\n if (!this._skip_refresh) {\n this.refresh(id);\n\n _unselect.call(this, id);\n }\n }\n };\n}\n\nmodule.exports = createDataStoreSelectMixin;","var utils = require(\"../../utils/utils\");\n\nvar createLinksStoreFacade = function createLinksStoreFacade() {\n return {\n getLinkCount: function getLinkCount() {\n return this.$data.linksStore.count();\n },\n getLink: function getLink(id) {\n return this.$data.linksStore.getItem(id);\n },\n getLinks: function getLinks() {\n return this.$data.linksStore.getItems();\n },\n isLinkExists: function isLinkExists(id) {\n return this.$data.linksStore.exists(id);\n },\n addLink: function addLink(link) {\n var newLink = this.$data.linksStore.addItem(link); // GS-1222. Update fullOrder otherwise the link won't appear after render\n\n if (this.$data.linksStore.isSilent()) {\n this.$data.linksStore.fullOrder.push(newLink);\n }\n\n return newLink;\n },\n updateLink: function updateLink(id, data) {\n if (!utils.defined(data)) data = this.getLink(id);\n this.$data.linksStore.updateItem(id, data);\n },\n deleteLink: function deleteLink(id) {\n return this.$data.linksStore.removeItem(id);\n },\n changeLinkId: function changeLinkId(oldid, newid) {\n return this.$data.linksStore.changeId(oldid, newid);\n }\n };\n};\n\nmodule.exports = createLinksStoreFacade;","var utils = require(\"../../utils/utils\");\n\nvar _require = require(\"../../utils/helpers\"),\n replaceValidZeroId = _require.replaceValidZeroId;\n\nvar createTasksDatastoreFacade = function createTasksDatastoreFacade() {\n return {\n getTask: function getTask(id) {\n id = replaceValidZeroId(id, this.config.root_id);\n this.assert(id, \"Invalid argument for gantt.getTask\");\n var task = this.$data.tasksStore.getItem(id);\n this.assert(task, \"Task not found id=\" + id);\n return task;\n },\n getTaskByTime: function getTaskByTime(from, to) {\n var p = this.$data.tasksStore.getItems();\n var res = [];\n\n if (!(from || to)) {\n res = p;\n } else {\n from = +from || -Infinity;\n to = +to || Infinity;\n\n for (var t = 0; t < p.length; t++) {\n var task = p[t];\n if (+task.start_date < to && +task.end_date > from) res.push(task);\n }\n }\n\n return res;\n },\n isTaskExists: function isTaskExists(id) {\n if (!this.$data || !this.$data.tasksStore) {\n return false;\n }\n\n return this.$data.tasksStore.exists(id);\n },\n updateTask: function updateTask(id, item) {\n if (!utils.defined(item)) item = this.getTask(id);\n this.$data.tasksStore.updateItem(id, item);\n if (this.isTaskExists(id)) this.refreshTask(id);\n },\n addTask: function addTask(item, parent, index) {\n if (!utils.defined(item.id)) item.id = utils.uid(); //GS-761: assert unique ID\n\n if (this.isTaskExists(item.id)) {\n var task = this.getTask(item.id);\n\n if (task.$index != item.$index) {\n // Someone may try to mistakenly add a task with the same ID, and most likely\n // use the string format for the dates. Gantt shouldn't break in this scenario\n if (item.start_date && typeof item.start_date === \"string\") {\n item.start_date = this.date.parseDate(item.start_date, \"parse_date\");\n }\n\n if (item.end_date && typeof item.end_date === \"string\") {\n item.end_date = this.date.parseDate(item.end_date, \"parse_date\");\n }\n\n return this.$data.tasksStore.updateItem(item.id, item);\n }\n }\n\n if (!utils.defined(parent)) parent = this.getParent(item) || 0;\n if (!this.isTaskExists(parent)) parent = this.config.root_id;\n this.setParent(item, parent);\n return this.$data.tasksStore.addItem(item, index, parent);\n },\n deleteTask: function deleteTask(id) {\n id = replaceValidZeroId(id, this.config.root_id);\n return this.$data.tasksStore.removeItem(id);\n },\n getTaskCount: function getTaskCount() {\n return this.$data.tasksStore.count();\n },\n getVisibleTaskCount: function getVisibleTaskCount() {\n return this.$data.tasksStore.countVisible();\n },\n getTaskIndex: function getTaskIndex(id) {\n return this.$data.tasksStore.getBranchIndex(id);\n },\n getGlobalTaskIndex: function getGlobalTaskIndex(id) {\n id = replaceValidZeroId(id, this.config.root_id);\n this.assert(id, \"Invalid argument\");\n return this.$data.tasksStore.getIndexById(id);\n },\n eachTask: function eachTask(code, parent, master) {\n return this.$data.tasksStore.eachItem(utils.bind(code, master || this), parent);\n },\n eachParent: function eachParent(callback, startTask, master) {\n return this.$data.tasksStore.eachParent(utils.bind(callback, master || this), startTask);\n },\n changeTaskId: function changeTaskId(oldid, newid) {\n this.$data.tasksStore.changeId(oldid, newid);\n var task = this.$data.tasksStore.getItem(newid);\n var links = [];\n\n if (task.$source) {\n links = links.concat(task.$source);\n }\n\n if (task.$target) {\n links = links.concat(task.$target);\n }\n\n for (var i = 0; i < links.length; i++) {\n var link = this.getLink(links[i]);\n\n if (link.source == oldid) {\n link.source = newid;\n }\n\n if (link.target == oldid) {\n link.target = newid;\n }\n }\n },\n calculateTaskLevel: function calculateTaskLevel(item) {\n return this.$data.tasksStore.calculateItemLevel(item);\n },\n getNext: function getNext(id) {\n return this.$data.tasksStore.getNext(id);\n },\n getPrev: function getPrev(id) {\n return this.$data.tasksStore.getPrev(id);\n },\n getParent: function getParent(id) {\n return this.$data.tasksStore.getParent(id);\n },\n setParent: function setParent(task, new_pid, silent) {\n return this.$data.tasksStore.setParent(task, new_pid, silent);\n },\n getSiblings: function getSiblings(id) {\n return this.$data.tasksStore.getSiblings(id).slice();\n },\n getNextSibling: function getNextSibling(id) {\n return this.$data.tasksStore.getNextSibling(id);\n },\n getPrevSibling: function getPrevSibling(id) {\n return this.$data.tasksStore.getPrevSibling(id);\n },\n getTaskByIndex: function getTaskByIndex(index) {\n var id = this.$data.tasksStore.getIdByIndex(index);\n\n if (this.isTaskExists(id)) {\n return this.getTask(id);\n } else {\n return null;\n }\n },\n getChildren: function getChildren(id) {\n if (!this.hasChild(id)) {\n return [];\n } else {\n return this.$data.tasksStore.getChildren(id).slice();\n }\n },\n hasChild: function hasChild(id) {\n return this.$data.tasksStore.hasChild(id);\n },\n open: function open(id) {\n this.$data.tasksStore.open(id);\n },\n close: function close(id) {\n this.$data.tasksStore.close(id);\n },\n moveTask: function moveTask(sid, tindex, parent) {\n parent = replaceValidZeroId(parent, this.config.root_id);\n return this.$data.tasksStore.move.apply(this.$data.tasksStore, arguments);\n },\n sort: function sort(field, desc, parent, silent) {\n var render = !silent; //4th argument to cancel redraw after sorting\n\n this.$data.tasksStore.sort(field, desc, parent);\n this.callEvent(\"onAfterSort\", [field, desc, parent]);\n\n if (render) {\n this.render();\n }\n }\n };\n};\n\nmodule.exports = createTasksDatastoreFacade;","var utils = require(\"../../utils/utils\");\n\nvar createTasksFacade = require(\"./datastore_tasks\"),\n createLinksFacade = require(\"./datastore_links\"),\n DataStore = require(\"../datastore/datastore\"),\n TreeDataStore = require(\"../datastore/treedatastore\"),\n createDatastoreSelect = require(\"../datastore/select\");\n\nvar datastoreRender = require(\"../datastore/datastore_render\");\n\nvar isHeadless = require(\"../../utils/is_headless\");\n\nvar _require = require(\"../../utils/helpers\"),\n replaceValidZeroId = _require.replaceValidZeroId; // TODO: remove workaround for mixup with es5 and ts imports\n\n\nif (DataStore[\"default\"]) {\n DataStore = DataStore[\"default\"];\n}\n\nfunction getDatastores() {\n var storeNames = this.$services.getService(\"datastores\");\n var res = [];\n\n for (var i = 0; i < storeNames.length; i++) {\n var store = this.getDatastore(storeNames[i]);\n\n if (!store.$destroyed) {\n res.push(store);\n }\n }\n\n return res;\n}\n\nvar createDatastoreFacade = function createDatastoreFacade() {\n return {\n createDatastore: function createDatastore(config) {\n var $StoreType = (config.type || \"\").toLowerCase() == \"treedatastore\" ? TreeDataStore : DataStore;\n\n if (config) {\n var self = this;\n\n config.openInitially = function () {\n return self.config.open_tree_initially;\n };\n\n config.copyOnParse = function () {\n return self.config.deepcopy_on_parse;\n };\n }\n\n var store = new $StoreType(config);\n this.mixin(store, createDatastoreSelect(store));\n\n if (config.name) {\n var servicePrefix = \"datastore:\";\n var storeAccessName = servicePrefix + config.name;\n store.attachEvent(\"onDestroy\", function () {\n this.$services.dropService(storeAccessName);\n var storeList = this.$services.getService(\"datastores\");\n\n for (var i = 0; i < storeList.length; i++) {\n if (storeList[i] === config.name) {\n storeList.splice(i, 1);\n break;\n }\n }\n }.bind(this));\n this.$services.dropService(storeAccessName);\n this.$services.setService(storeAccessName, function () {\n return store;\n });\n var storeList = this.$services.getService(\"datastores\");\n\n if (!storeList) {\n storeList = [];\n this.$services.setService(\"datastores\", function () {\n return storeList;\n });\n storeList.push(config.name);\n } else if (storeList.indexOf(config.name) < 0) {\n storeList.push(config.name);\n }\n\n datastoreRender.bindDataStore(config.name, this);\n }\n\n return store;\n },\n getDatastore: function getDatastore(name) {\n return this.$services.getService(\"datastore:\" + name);\n },\n _getDatastores: getDatastores,\n refreshData: function refreshData() {\n var scrollState;\n\n if (!isHeadless(this)) {\n scrollState = this.getScrollState();\n }\n\n this.callEvent(\"onBeforeDataRender\", []);\n var stores = getDatastores.call(this);\n\n for (var i = 0; i < stores.length; i++) {\n stores[i].refresh();\n }\n\n if (this.config.preserve_scroll && !isHeadless(this) && (scrollState.x || scrollState.y)) {\n this.scrollTo(scrollState.x, scrollState.y);\n }\n\n this.callEvent(\"onDataRender\", []);\n },\n isChildOf: function isChildOf(childId, parentId) {\n return this.$data.tasksStore.isChildOf(childId, parentId);\n },\n refreshTask: function refreshTask(taskId, refresh_links) {\n var task = this.getTask(taskId);\n var self = this;\n\n function refreshLinks() {\n if (refresh_links !== undefined && !refresh_links) return;\n\n for (var i = 0; i < task.$source.length; i++) {\n self.refreshLink(task.$source[i]);\n }\n\n for (var i = 0; i < task.$target.length; i++) {\n self.refreshLink(task.$target[i]);\n }\n }\n\n if (task && this.isTaskVisible(taskId)) {\n this.$data.tasksStore.refresh(taskId, !!this.getState(\"tasksDnd\").drag_id || refresh_links === false); // do quick refresh during drag and drop\n\n refreshLinks();\n } else if (this.isTaskExists(taskId) && this.isTaskExists(this.getParent(taskId)) && !this._bulk_dnd) {\n this.refreshTask(this.getParent(taskId));\n var hasSplitParent = false;\n this.eachParent(function (parent) {\n if (hasSplitParent || this.isSplitTask(parent)) {\n hasSplitParent = true;\n }\n }, taskId);\n\n if (hasSplitParent) {\n refreshLinks();\n }\n }\n },\n refreshLink: function refreshLink(linkId) {\n this.$data.linksStore.refresh(linkId, !!this.getState(\"tasksDnd\").drag_id); // do quick refresh during drag and drop\n },\n silent: function silent(code) {\n var gantt = this;\n gantt.$data.tasksStore.silent(function () {\n gantt.$data.linksStore.silent(function () {\n code();\n });\n });\n },\n clearAll: function clearAll() {\n var stores = getDatastores.call(this); // clear all stores without invoking clearAll event\n // in order to prevent calling handlers when only some stores are cleared\n\n for (var i = 0; i < stores.length; i++) {\n stores[i].silent(function () {\n stores[i].clearAll();\n });\n } // run clearAll again to invoke events\n\n\n for (var i = 0; i < stores.length; i++) {\n stores[i].clearAll();\n }\n\n this._update_flags();\n\n this.userdata = {};\n this.callEvent(\"onClear\", []);\n this.render();\n },\n _clear_data: function _clear_data() {\n this.$data.tasksStore.clearAll();\n this.$data.linksStore.clearAll();\n\n this._update_flags();\n\n this.userdata = {};\n },\n selectTask: function selectTask(id) {\n var store = this.$data.tasksStore;\n if (!this.config.select_task) return false;\n id = replaceValidZeroId(id, this.config.root_id);\n\n if (id) {\n var oldSelectId = this.getSelectedId(); // Don't repaint the resource panel as the data didn't change\n\n store._skipResourceRepaint = true;\n store.select(id);\n store._skipResourceRepaint = false; // GS-730. Split task is not included in the tree, \n // so the datastore renderer will think that the task is not visible\n\n if (oldSelectId && store.pull[oldSelectId].$split_subtask && oldSelectId != id) {\n this.refreshTask(oldSelectId);\n }\n\n if (store.pull[id].$split_subtask && oldSelectId != id) {\n // GS-1850. Do not repaint split task after double click\n this.refreshTask(id);\n }\n }\n\n return store.getSelectedId();\n },\n unselectTask: function unselectTask(id) {\n var store = this.$data.tasksStore;\n store.unselect(id); // GS-730. Split task is not included in the tree, \n // so the datastore renderer will think that the task is not visible\n\n if (id && store.pull[id].$split_subtask) {\n this.refreshTask(id);\n }\n },\n isSelectedTask: function isSelectedTask(id) {\n return this.$data.tasksStore.isSelected(id);\n },\n getSelectedId: function getSelectedId() {\n return this.$data.tasksStore.getSelectedId();\n }\n };\n};\n\nfunction createFacade() {\n var res = utils.mixin({}, createDatastoreFacade());\n utils.mixin(res, createTasksFacade());\n utils.mixin(res, createLinksFacade());\n return res;\n}\n\nmodule.exports = {\n create: createFacade\n};","var utils = require(\"../../utils/utils\");\n\nvar facadeFactory = require(\"./../facades/datastore\");\n\nvar calculateScaleRange = require(\"../gantt_data_range\");\n\nvar isPlaceholderTask = require(\"../../utils/placeholder_task\");\n\nfunction initDataStores(gantt) {\n var facade = facadeFactory.create();\n utils.mixin(gantt, facade);\n var tasksStore = gantt.createDatastore({\n name: \"task\",\n type: \"treeDatastore\",\n rootId: function rootId() {\n return gantt.config.root_id;\n },\n initItem: utils.bind(_init_task, gantt),\n getConfig: function getConfig() {\n return gantt.config;\n }\n });\n var linksStore = gantt.createDatastore({\n name: \"link\",\n initItem: utils.bind(_init_link, gantt)\n });\n gantt.attachEvent(\"onDestroy\", function () {\n tasksStore.destructor();\n linksStore.destructor();\n });\n gantt.attachEvent(\"onLinkValidation\", function (link) {\n if (gantt.isLinkExists(link.id) || link.id === \"predecessor_generated\") {\n // link was already added into gantt\n return true;\n }\n\n var source = gantt.getTask(link.source);\n var taskLinks = source.$source;\n\n for (var i = 0; i < taskLinks.length; i++) {\n var existingLink = gantt.getLink(taskLinks[i]);\n var sourceMatch = link.source == existingLink.source;\n var targetMatch = link.target == existingLink.target;\n var typeMatch = link.type == existingLink.type; // prevent creating duplicated links from the UI\n\n if (sourceMatch && targetMatch && typeMatch) {\n return false;\n }\n }\n\n return true;\n });\n tasksStore.attachEvent(\"onBeforeRefreshAll\", function () {\n // GS-2170 do not recalculate indexes and dates as the event will be called later in the onStoreUpdate event\n if (tasksStore._skipTaskRecalculation) {\n return;\n }\n\n var order = tasksStore.getVisibleItems();\n\n for (var i = 0; i < order.length; i++) {\n var item = order[i];\n item.$index = i;\n item.$local_index = gantt.getTaskIndex(item.id);\n gantt.resetProjectDates(item);\n }\n });\n tasksStore.attachEvent(\"onFilterItem\", function (id, task) {\n if (gantt.config.show_tasks_outside_timescale) {\n return true;\n }\n\n var min = null,\n max = null;\n\n if (gantt.config.start_date && gantt.config.end_date) {\n if (gantt._isAllowedUnscheduledTask(task)) return true;\n min = gantt.config.start_date.valueOf();\n max = gantt.config.end_date.valueOf();\n if (+task.start_date > max || +task.end_date < +min) return false;\n }\n\n return true;\n });\n tasksStore.attachEvent(\"onIdChange\", function (oldId, newId) {\n gantt._update_flags(oldId, newId);\n\n var changedTask = gantt.getTask(newId);\n\n if (!tasksStore.isSilent()) {\n if (changedTask.$split_subtask || changedTask.rollup) {\n gantt.eachParent(function (parent) {\n gantt.refreshTask(parent.id);\n }, newId);\n }\n }\n });\n tasksStore.attachEvent(\"onAfterUpdate\", function (id) {\n gantt._update_parents(id);\n\n if (gantt.getState(\"batchUpdate\").batch_update) {\n return true;\n }\n\n var task = tasksStore.getItem(id);\n if (!task.$source) task.$source = [];\n\n for (var i = 0; i < task.$source.length; i++) {\n linksStore.refresh(task.$source[i]);\n }\n\n if (!task.$target) task.$target = [];\n\n for (var i = 0; i < task.$target.length; i++) {\n linksStore.refresh(task.$target[i]);\n }\n });\n tasksStore.attachEvent(\"onBeforeItemMove\", function (sid, parent, tindex) {\n // GS-125. Don't allow users to move the placeholder task\n if (isPlaceholderTask(sid, gantt, tasksStore)) {\n //eslint-disable-next-line\n console.log(\"The placeholder task cannot be moved to another position.\");\n return false;\n }\n\n return true;\n });\n tasksStore.attachEvent(\"onAfterItemMove\", function (sid, parent, tindex) {\n var source = gantt.getTask(sid);\n\n if (this.getNextSibling(sid) !== null) {\n source.$drop_target = this.getNextSibling(sid);\n } else if (this.getPrevSibling(sid) !== null) {\n source.$drop_target = \"next:\" + this.getPrevSibling(sid);\n } else {\n source.$drop_target = \"next:null\";\n }\n });\n tasksStore.attachEvent(\"onStoreUpdated\", function (id, item, action) {\n if (action == \"delete\") {\n gantt._update_flags(id, null);\n }\n\n var state = gantt.$services.getService(\"state\");\n\n if (state.getState(\"batchUpdate\").batch_update) {\n return;\n }\n\n if (gantt.config.fit_tasks && action !== \"paint\") {\n var oldState = gantt.getState();\n calculateScaleRange(gantt);\n var newState = gantt.getState(); //this._init_tasks_range();\n\n if (+oldState.min_date != +newState.min_date || +oldState.max_date != +newState.max_date) {\n gantt.render();\n gantt.callEvent(\"onScaleAdjusted\", []);\n return true;\n }\n }\n\n if (action == \"add\" || action == \"move\" || action == \"delete\") {\n if (gantt.$layout) {\n // GS-2170. Do not recalculate the indexes and dates of other tasks in the\n // onBeforeResize layout event, but do it later. If lightbox is opened, it will\n // trigger the refreshData, so the indexes and dates will be recalculated there\n if (this.$config.name == \"task\" && (action == \"add\" || action == \"delete\")) {\n if (this._skipTaskRecalculation != \"lightbox\") {\n this._skipTaskRecalculation = true;\n }\n }\n\n gantt.$layout.resize();\n }\n } else if (!id) {\n linksStore.refresh();\n }\n });\n linksStore.attachEvent(\"onAfterAdd\", function (id, link) {\n sync_link(link);\n });\n linksStore.attachEvent(\"onAfterUpdate\", function (id, link) {\n sync_links();\n });\n linksStore.attachEvent(\"onAfterDelete\", function (id, link) {\n sync_link_delete(link);\n });\n linksStore.attachEvent(\"onAfterSilentDelete\", function (id, link) {\n sync_link_delete(link);\n });\n linksStore.attachEvent(\"onBeforeIdChange\", function (oldId, newId) {\n sync_link_delete(gantt.mixin({\n id: oldId\n }, gantt.$data.linksStore.getItem(newId)));\n sync_link(gantt.$data.linksStore.getItem(newId));\n });\n\n function checkLinkedTaskVisibility(taskId) {\n var isVisible = gantt.isTaskVisible(taskId);\n\n if (!isVisible && gantt.isTaskExists(taskId)) {\n var parent = gantt.getParent(taskId);\n\n if (gantt.isTaskExists(parent) && gantt.isTaskVisible(parent)) {\n parent = gantt.getTask(parent);\n\n if (gantt.isSplitTask(parent)) {\n isVisible = true;\n }\n }\n }\n\n return isVisible;\n }\n\n linksStore.attachEvent(\"onFilterItem\", function (id, link) {\n if (!gantt.config.show_links) {\n return false;\n }\n\n var sourceVisible = checkLinkedTaskVisibility(link.source);\n var targetVisible = checkLinkedTaskVisibility(link.target);\n if (!(sourceVisible && targetVisible) || gantt._isAllowedUnscheduledTask(gantt.getTask(link.source)) || gantt._isAllowedUnscheduledTask(gantt.getTask(link.target))) return false;\n return gantt.callEvent(\"onBeforeLinkDisplay\", [id, link]);\n });\n\n (function () {\n // delete all connected links after task is deleted\n var treeHelper = require(\"../../utils/task_tree_helpers\");\n\n var deletedLinks = {};\n gantt.attachEvent(\"onBeforeTaskDelete\", function (id, item) {\n deletedLinks[id] = treeHelper.getSubtreeLinks(gantt, id);\n return true;\n });\n gantt.attachEvent(\"onAfterTaskDelete\", function (id, item) {\n if (deletedLinks[id]) {\n gantt.$data.linksStore.silent(function () {\n for (var i in deletedLinks[id]) {\n if (gantt.isLinkExists(i)) {\n gantt.$data.linksStore.removeItem(i);\n }\n\n sync_link_delete(deletedLinks[id][i]);\n }\n\n deletedLinks[id] = null;\n });\n }\n });\n })();\n\n gantt.attachEvent(\"onAfterLinkDelete\", function (id, link) {\n gantt.refreshTask(link.source);\n gantt.refreshTask(link.target);\n });\n gantt.attachEvent(\"onParse\", sync_links);\n mapEvents({\n source: linksStore,\n target: gantt,\n events: {\n \"onItemLoading\": \"onLinkLoading\",\n \"onBeforeAdd\": \"onBeforeLinkAdd\",\n \"onAfterAdd\": \"onAfterLinkAdd\",\n \"onBeforeUpdate\": \"onBeforeLinkUpdate\",\n \"onAfterUpdate\": \"onAfterLinkUpdate\",\n \"onBeforeDelete\": \"onBeforeLinkDelete\",\n \"onAfterDelete\": \"onAfterLinkDelete\",\n \"onIdChange\": \"onLinkIdChange\"\n }\n });\n mapEvents({\n source: tasksStore,\n target: gantt,\n events: {\n \"onItemLoading\": \"onTaskLoading\",\n \"onBeforeAdd\": \"onBeforeTaskAdd\",\n \"onAfterAdd\": \"onAfterTaskAdd\",\n \"onBeforeUpdate\": \"onBeforeTaskUpdate\",\n \"onAfterUpdate\": \"onAfterTaskUpdate\",\n \"onBeforeDelete\": \"onBeforeTaskDelete\",\n \"onAfterDelete\": \"onAfterTaskDelete\",\n \"onIdChange\": \"onTaskIdChange\",\n \"onBeforeItemMove\": \"onBeforeTaskMove\",\n \"onAfterItemMove\": \"onAfterTaskMove\",\n \"onFilterItem\": \"onBeforeTaskDisplay\",\n \"onItemOpen\": \"onTaskOpened\",\n \"onItemClose\": \"onTaskClosed\",\n \"onBeforeSelect\": \"onBeforeTaskSelected\",\n \"onAfterSelect\": \"onTaskSelected\",\n \"onAfterUnselect\": \"onTaskUnselected\"\n }\n });\n gantt.$data = {\n tasksStore: tasksStore,\n linksStore: linksStore\n };\n\n function sync_link(link) {\n if (gantt.isTaskExists(link.source)) {\n var sourceTask = gantt.getTask(link.source);\n sourceTask.$source = sourceTask.$source || [];\n sourceTask.$source.push(link.id);\n }\n\n if (gantt.isTaskExists(link.target)) {\n var targetTask = gantt.getTask(link.target);\n targetTask.$target = targetTask.$target || [];\n targetTask.$target.push(link.id);\n }\n }\n\n function sync_link_delete(link) {\n if (gantt.isTaskExists(link.source)) {\n var sourceTask = gantt.getTask(link.source);\n\n for (var i = 0; i < sourceTask.$source.length; i++) {\n if (sourceTask.$source[i] == link.id) {\n sourceTask.$source.splice(i, 1);\n break;\n }\n }\n }\n\n if (gantt.isTaskExists(link.target)) {\n var targetTask = gantt.getTask(link.target);\n\n for (var i = 0; i < targetTask.$target.length; i++) {\n if (targetTask.$target[i] == link.id) {\n targetTask.$target.splice(i, 1);\n break;\n }\n }\n }\n }\n\n function sync_links() {\n var task = null;\n var tasks = gantt.$data.tasksStore.getItems();\n\n for (var i = 0, len = tasks.length; i < len; i++) {\n task = tasks[i];\n task.$source = [];\n task.$target = [];\n }\n\n var links = gantt.$data.linksStore.getItems();\n\n for (var i = 0, len = links.length; i < len; i++) {\n var link = links[i];\n sync_link(link);\n }\n }\n\n function mapEvents(conf) {\n var mapFrom = conf.source;\n var mapTo = conf.target;\n\n for (var i in conf.events) {\n (function (sourceEvent, targetEvent) {\n mapFrom.attachEvent(sourceEvent, function () {\n return mapTo.callEvent(targetEvent, Array.prototype.slice.call(arguments));\n }, targetEvent);\n })(i, conf.events[i]);\n }\n }\n\n function _init_task(task) {\n if (!this.defined(task.id)) task.id = this.uid();\n if (task.start_date) task.start_date = gantt.date.parseDate(task.start_date, \"parse_date\");\n if (task.end_date) task.end_date = gantt.date.parseDate(task.end_date, \"parse_date\");\n var duration = null;\n\n if (task.duration || task.duration === 0) {\n task.duration = duration = task.duration * 1;\n }\n\n if (duration) {\n if (task.start_date && !task.end_date) {\n task.end_date = this.calculateEndDate(task);\n } else if (!task.start_date && task.end_date) {\n task.start_date = this.calculateEndDate({\n start_date: task.end_date,\n duration: -task.duration,\n task: task\n });\n } //task.$calculate_duration = false;\n\n }\n\n task.progress = Number(task.progress) || 0;\n\n if (this._isAllowedUnscheduledTask(task)) {\n this._set_default_task_timing(task);\n }\n\n this._init_task_timing(task);\n\n if (task.start_date && task.end_date) this.correctTaskWorkTime(task);\n task.$source = [];\n task.$target = [];\n var originalTask = this.$data.tasksStore.getItem(task.id);\n\n if (originalTask && !utils.defined(task.open)) {\n // if a task with the same id is already in the gantt and the new object doesn't specify the `open` state -\n // restore the `open` state we already have in the chart\n task.$open = originalTask.$open;\n }\n\n if (task.parent === undefined) {\n task.parent = this.config.root_id;\n }\n\n return task;\n }\n\n function _init_link(link) {\n if (!this.defined(link.id)) link.id = this.uid();\n return link;\n }\n}\n\nmodule.exports = initDataStores;","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/* @preserve\n * The MIT License (MIT)\n * \n * Copyright (c) 2013-2018 Petka Antonov\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n * \n */\n\n/**\n * bluebird build version 3.5.4\n * Features enabled: core, race, call_get, generators, map, nodeify, promisify, props, reduce, settle, some, using, timers, filter, any, each\n*/\n!function (e) {\n if (\"object\" == (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) && \"undefined\" != typeof module) module.exports = e();else if (\"function\" == typeof define && define.amd) define([], e);else {\n var f;\n \"undefined\" != typeof window ? f = window : \"undefined\" != typeof global ? f = global : \"undefined\" != typeof self && (f = self), f.Promise = e();\n }\n}(function () {\n var define, module, exports;\n return function e(t, n, r) {\n function s(o, u) {\n if (!n[o]) {\n if (!t[o]) {\n var a = typeof _dereq_ == \"function\" && _dereq_;\n if (!u && a) return a(o, !0);\n if (i) return i(o, !0);\n var f = new Error(\"Cannot find module '\" + o + \"'\");\n throw f.code = \"MODULE_NOT_FOUND\", f;\n }\n\n var l = n[o] = {\n exports: {}\n };\n t[o][0].call(l.exports, function (e) {\n var n = t[o][1][e];\n return s(n ? n : e);\n }, l, l.exports, e, t, n, r);\n }\n\n return n[o].exports;\n }\n\n var i = typeof _dereq_ == \"function\" && _dereq_;\n\n for (var o = 0; o < r.length; o++) {\n s(r[o]);\n }\n\n return s;\n }({\n 1: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise) {\n var SomePromiseArray = Promise._SomePromiseArray;\n\n function any(promises) {\n var ret = new SomePromiseArray(promises);\n var promise = ret.promise();\n ret.setHowMany(1);\n ret.setUnwrap();\n ret.init();\n return promise;\n }\n\n Promise.any = function (promises) {\n return any(promises);\n };\n\n Promise.prototype.any = function () {\n return any(this);\n };\n };\n }, {}],\n 2: [function (_dereq_, module, exports) {\n \"use strict\";\n\n var firstLineError;\n\n try {\n throw new Error();\n } catch (e) {\n firstLineError = e;\n }\n\n var schedule = _dereq_(\"./schedule\");\n\n var Queue = _dereq_(\"./queue\");\n\n var util = _dereq_(\"./util\");\n\n function Async() {\n this._customScheduler = false;\n this._isTickUsed = false;\n this._lateQueue = new Queue(16);\n this._normalQueue = new Queue(16);\n this._haveDrainedQueues = false;\n this._trampolineEnabled = true;\n var self = this;\n\n this.drainQueues = function () {\n self._drainQueues();\n };\n\n this._schedule = schedule;\n }\n\n Async.prototype.setScheduler = function (fn) {\n var prev = this._schedule;\n this._schedule = fn;\n this._customScheduler = true;\n return prev;\n };\n\n Async.prototype.hasCustomScheduler = function () {\n return this._customScheduler;\n };\n\n Async.prototype.enableTrampoline = function () {\n this._trampolineEnabled = true;\n };\n\n Async.prototype.disableTrampolineIfNecessary = function () {\n if (util.hasDevTools) {\n this._trampolineEnabled = false;\n }\n };\n\n Async.prototype.haveItemsQueued = function () {\n return this._isTickUsed || this._haveDrainedQueues;\n };\n\n Async.prototype.fatalError = function (e, isNode) {\n if (isNode) {\n process.stderr.write(\"Fatal \" + (e instanceof Error ? e.stack : e) + \"\\n\");\n process.exit(2);\n } else {\n this.throwLater(e);\n }\n };\n\n Async.prototype.throwLater = function (fn, arg) {\n if (arguments.length === 1) {\n arg = fn;\n\n fn = function fn() {\n throw arg;\n };\n }\n\n if (typeof setTimeout !== \"undefined\") {\n setTimeout(function () {\n fn(arg);\n }, 0);\n } else try {\n this._schedule(function () {\n fn(arg);\n });\n } catch (e) {\n throw new Error(\"No async scheduler available\\n\\n See http://goo.gl/MqrFmX\\n\");\n }\n };\n\n function AsyncInvokeLater(fn, receiver, arg) {\n this._lateQueue.push(fn, receiver, arg);\n\n this._queueTick();\n }\n\n function AsyncInvoke(fn, receiver, arg) {\n this._normalQueue.push(fn, receiver, arg);\n\n this._queueTick();\n }\n\n function AsyncSettlePromises(promise) {\n this._normalQueue._pushOne(promise);\n\n this._queueTick();\n }\n\n if (!util.hasDevTools) {\n Async.prototype.invokeLater = AsyncInvokeLater;\n Async.prototype.invoke = AsyncInvoke;\n Async.prototype.settlePromises = AsyncSettlePromises;\n } else {\n Async.prototype.invokeLater = function (fn, receiver, arg) {\n if (this._trampolineEnabled) {\n AsyncInvokeLater.call(this, fn, receiver, arg);\n } else {\n this._schedule(function () {\n setTimeout(function () {\n fn.call(receiver, arg);\n }, 100);\n });\n }\n };\n\n Async.prototype.invoke = function (fn, receiver, arg) {\n if (this._trampolineEnabled) {\n AsyncInvoke.call(this, fn, receiver, arg);\n } else {\n this._schedule(function () {\n fn.call(receiver, arg);\n });\n }\n };\n\n Async.prototype.settlePromises = function (promise) {\n if (this._trampolineEnabled) {\n AsyncSettlePromises.call(this, promise);\n } else {\n this._schedule(function () {\n promise._settlePromises();\n });\n }\n };\n }\n\n function _drainQueue(queue) {\n while (queue.length() > 0) {\n _drainQueueStep(queue);\n }\n }\n\n function _drainQueueStep(queue) {\n var fn = queue.shift();\n\n if (typeof fn !== \"function\") {\n fn._settlePromises();\n } else {\n var receiver = queue.shift();\n var arg = queue.shift();\n fn.call(receiver, arg);\n }\n }\n\n Async.prototype._drainQueues = function () {\n _drainQueue(this._normalQueue);\n\n this._reset();\n\n this._haveDrainedQueues = true;\n\n _drainQueue(this._lateQueue);\n };\n\n Async.prototype._queueTick = function () {\n if (!this._isTickUsed) {\n this._isTickUsed = true;\n\n this._schedule(this.drainQueues);\n }\n };\n\n Async.prototype._reset = function () {\n this._isTickUsed = false;\n };\n\n module.exports = Async;\n module.exports.firstLineError = firstLineError;\n }, {\n \"./queue\": 26,\n \"./schedule\": 29,\n \"./util\": 36\n }],\n 3: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, INTERNAL, tryConvertToPromise, debug) {\n var calledBind = false;\n\n var rejectThis = function rejectThis(_, e) {\n this._reject(e);\n };\n\n var targetRejected = function targetRejected(e, context) {\n context.promiseRejectionQueued = true;\n\n context.bindingPromise._then(rejectThis, rejectThis, null, this, e);\n };\n\n var bindingResolved = function bindingResolved(thisArg, context) {\n if ((this._bitField & 50397184) === 0) {\n this._resolveCallback(context.target);\n }\n };\n\n var bindingRejected = function bindingRejected(e, context) {\n if (!context.promiseRejectionQueued) this._reject(e);\n };\n\n Promise.prototype.bind = function (thisArg) {\n if (!calledBind) {\n calledBind = true;\n Promise.prototype._propagateFrom = debug.propagateFromFunction();\n Promise.prototype._boundValue = debug.boundValueFunction();\n }\n\n var maybePromise = tryConvertToPromise(thisArg);\n var ret = new Promise(INTERNAL);\n\n ret._propagateFrom(this, 1);\n\n var target = this._target();\n\n ret._setBoundTo(maybePromise);\n\n if (maybePromise instanceof Promise) {\n var context = {\n promiseRejectionQueued: false,\n promise: ret,\n target: target,\n bindingPromise: maybePromise\n };\n\n target._then(INTERNAL, targetRejected, undefined, ret, context);\n\n maybePromise._then(bindingResolved, bindingRejected, undefined, ret, context);\n\n ret._setOnCancel(maybePromise);\n } else {\n ret._resolveCallback(target);\n }\n\n return ret;\n };\n\n Promise.prototype._setBoundTo = function (obj) {\n if (obj !== undefined) {\n this._bitField = this._bitField | 2097152;\n this._boundTo = obj;\n } else {\n this._bitField = this._bitField & ~2097152;\n }\n };\n\n Promise.prototype._isBound = function () {\n return (this._bitField & 2097152) === 2097152;\n };\n\n Promise.bind = function (thisArg, value) {\n return Promise.resolve(value).bind(thisArg);\n };\n };\n }, {}],\n 4: [function (_dereq_, module, exports) {\n \"use strict\";\n\n var old;\n if (typeof Promise !== \"undefined\") old = Promise;\n\n function noConflict() {\n try {\n if (Promise === bluebird) Promise = old;\n } catch (e) {}\n\n return bluebird;\n }\n\n var bluebird = _dereq_(\"./promise\")();\n\n bluebird.noConflict = noConflict;\n module.exports = bluebird;\n }, {\n \"./promise\": 22\n }],\n 5: [function (_dereq_, module, exports) {\n \"use strict\";\n\n var cr = Object.create;\n\n if (cr) {\n var callerCache = cr(null);\n var getterCache = cr(null);\n callerCache[\" size\"] = getterCache[\" size\"] = 0;\n }\n\n module.exports = function (Promise) {\n var util = _dereq_(\"./util\");\n\n var canEvaluate = util.canEvaluate;\n var isIdentifier = util.isIdentifier;\n var getMethodCaller;\n var getGetter;\n\n if (!true) {\n var makeMethodCaller = function makeMethodCaller(methodName) {\n return new Function(\"ensureMethod\", \" \\n\\\n return function(obj) { \\n\\\n 'use strict' \\n\\\n var len = this.length; \\n\\\n ensureMethod(obj, 'methodName'); \\n\\\n switch(len) { \\n\\\n case 1: return obj.methodName(this[0]); \\n\\\n case 2: return obj.methodName(this[0], this[1]); \\n\\\n case 3: return obj.methodName(this[0], this[1], this[2]); \\n\\\n case 0: return obj.methodName(); \\n\\\n default: \\n\\\n return obj.methodName.apply(obj, this); \\n\\\n } \\n\\\n }; \\n\\\n \".replace(/methodName/g, methodName))(ensureMethod);\n };\n\n var makeGetter = function makeGetter(propertyName) {\n return new Function(\"obj\", \" \\n\\\n 'use strict'; \\n\\\n return obj.propertyName; \\n\\\n \".replace(\"propertyName\", propertyName));\n };\n\n var getCompiled = function getCompiled(name, compiler, cache) {\n var ret = cache[name];\n\n if (typeof ret !== \"function\") {\n if (!isIdentifier(name)) {\n return null;\n }\n\n ret = compiler(name);\n cache[name] = ret;\n cache[\" size\"]++;\n\n if (cache[\" size\"] > 512) {\n var keys = Object.keys(cache);\n\n for (var i = 0; i < 256; ++i) {\n delete cache[keys[i]];\n }\n\n cache[\" size\"] = keys.length - 256;\n }\n }\n\n return ret;\n };\n\n getMethodCaller = function getMethodCaller(name) {\n return getCompiled(name, makeMethodCaller, callerCache);\n };\n\n getGetter = function getGetter(name) {\n return getCompiled(name, makeGetter, getterCache);\n };\n }\n\n function ensureMethod(obj, methodName) {\n var fn;\n if (obj != null) fn = obj[methodName];\n\n if (typeof fn !== \"function\") {\n var message = \"Object \" + util.classString(obj) + \" has no method '\" + util.toString(methodName) + \"'\";\n throw new Promise.TypeError(message);\n }\n\n return fn;\n }\n\n function caller(obj) {\n var methodName = this.pop();\n var fn = ensureMethod(obj, methodName);\n return fn.apply(obj, this);\n }\n\n Promise.prototype.call = function (methodName) {\n var args = [].slice.call(arguments, 1);\n ;\n\n if (!true) {\n if (canEvaluate) {\n var maybeCaller = getMethodCaller(methodName);\n\n if (maybeCaller !== null) {\n return this._then(maybeCaller, undefined, undefined, args, undefined);\n }\n }\n }\n\n args.push(methodName);\n return this._then(caller, undefined, undefined, args, undefined);\n };\n\n function namedGetter(obj) {\n return obj[this];\n }\n\n function indexedGetter(obj) {\n var index = +this;\n if (index < 0) index = Math.max(0, index + obj.length);\n return obj[index];\n }\n\n Promise.prototype.get = function (propertyName) {\n var isIndex = typeof propertyName === \"number\";\n var getter;\n\n if (!isIndex) {\n if (canEvaluate) {\n var maybeGetter = getGetter(propertyName);\n getter = maybeGetter !== null ? maybeGetter : namedGetter;\n } else {\n getter = namedGetter;\n }\n } else {\n getter = indexedGetter;\n }\n\n return this._then(getter, undefined, undefined, propertyName, undefined);\n };\n };\n }, {\n \"./util\": 36\n }],\n 6: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, PromiseArray, apiRejection, debug) {\n var util = _dereq_(\"./util\");\n\n var tryCatch = util.tryCatch;\n var errorObj = util.errorObj;\n var async = Promise._async;\n\n Promise.prototype[\"break\"] = Promise.prototype.cancel = function () {\n if (!debug.cancellation()) return this._warn(\"cancellation is disabled\");\n var promise = this;\n var child = promise;\n\n while (promise._isCancellable()) {\n if (!promise._cancelBy(child)) {\n if (child._isFollowing()) {\n child._followee().cancel();\n } else {\n child._cancelBranched();\n }\n\n break;\n }\n\n var parent = promise._cancellationParent;\n\n if (parent == null || !parent._isCancellable()) {\n if (promise._isFollowing()) {\n promise._followee().cancel();\n } else {\n promise._cancelBranched();\n }\n\n break;\n } else {\n if (promise._isFollowing()) promise._followee().cancel();\n\n promise._setWillBeCancelled();\n\n child = promise;\n promise = parent;\n }\n }\n };\n\n Promise.prototype._branchHasCancelled = function () {\n this._branchesRemainingToCancel--;\n };\n\n Promise.prototype._enoughBranchesHaveCancelled = function () {\n return this._branchesRemainingToCancel === undefined || this._branchesRemainingToCancel <= 0;\n };\n\n Promise.prototype._cancelBy = function (canceller) {\n if (canceller === this) {\n this._branchesRemainingToCancel = 0;\n\n this._invokeOnCancel();\n\n return true;\n } else {\n this._branchHasCancelled();\n\n if (this._enoughBranchesHaveCancelled()) {\n this._invokeOnCancel();\n\n return true;\n }\n }\n\n return false;\n };\n\n Promise.prototype._cancelBranched = function () {\n if (this._enoughBranchesHaveCancelled()) {\n this._cancel();\n }\n };\n\n Promise.prototype._cancel = function () {\n if (!this._isCancellable()) return;\n\n this._setCancelled();\n\n async.invoke(this._cancelPromises, this, undefined);\n };\n\n Promise.prototype._cancelPromises = function () {\n if (this._length() > 0) this._settlePromises();\n };\n\n Promise.prototype._unsetOnCancel = function () {\n this._onCancelField = undefined;\n };\n\n Promise.prototype._isCancellable = function () {\n return this.isPending() && !this._isCancelled();\n };\n\n Promise.prototype.isCancellable = function () {\n return this.isPending() && !this.isCancelled();\n };\n\n Promise.prototype._doInvokeOnCancel = function (onCancelCallback, internalOnly) {\n if (util.isArray(onCancelCallback)) {\n for (var i = 0; i < onCancelCallback.length; ++i) {\n this._doInvokeOnCancel(onCancelCallback[i], internalOnly);\n }\n } else if (onCancelCallback !== undefined) {\n if (typeof onCancelCallback === \"function\") {\n if (!internalOnly) {\n var e = tryCatch(onCancelCallback).call(this._boundValue());\n\n if (e === errorObj) {\n this._attachExtraTrace(e.e);\n\n async.throwLater(e.e);\n }\n }\n } else {\n onCancelCallback._resultCancelled(this);\n }\n }\n };\n\n Promise.prototype._invokeOnCancel = function () {\n var onCancelCallback = this._onCancel();\n\n this._unsetOnCancel();\n\n async.invoke(this._doInvokeOnCancel, this, onCancelCallback);\n };\n\n Promise.prototype._invokeInternalOnCancel = function () {\n if (this._isCancellable()) {\n this._doInvokeOnCancel(this._onCancel(), true);\n\n this._unsetOnCancel();\n }\n };\n\n Promise.prototype._resultCancelled = function () {\n this.cancel();\n };\n };\n }, {\n \"./util\": 36\n }],\n 7: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (NEXT_FILTER) {\n var util = _dereq_(\"./util\");\n\n var getKeys = _dereq_(\"./es5\").keys;\n\n var tryCatch = util.tryCatch;\n var errorObj = util.errorObj;\n\n function catchFilter(instances, cb, promise) {\n return function (e) {\n var boundTo = promise._boundValue();\n\n predicateLoop: for (var i = 0; i < instances.length; ++i) {\n var item = instances[i];\n\n if (item === Error || item != null && item.prototype instanceof Error) {\n if (e instanceof item) {\n return tryCatch(cb).call(boundTo, e);\n }\n } else if (typeof item === \"function\") {\n var matchesPredicate = tryCatch(item).call(boundTo, e);\n\n if (matchesPredicate === errorObj) {\n return matchesPredicate;\n } else if (matchesPredicate) {\n return tryCatch(cb).call(boundTo, e);\n }\n } else if (util.isObject(e)) {\n var keys = getKeys(item);\n\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n\n if (item[key] != e[key]) {\n continue predicateLoop;\n }\n }\n\n return tryCatch(cb).call(boundTo, e);\n }\n }\n\n return NEXT_FILTER;\n };\n }\n\n return catchFilter;\n };\n }, {\n \"./es5\": 13,\n \"./util\": 36\n }],\n 8: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise) {\n var longStackTraces = false;\n var contextStack = [];\n\n Promise.prototype._promiseCreated = function () {};\n\n Promise.prototype._pushContext = function () {};\n\n Promise.prototype._popContext = function () {\n return null;\n };\n\n Promise._peekContext = Promise.prototype._peekContext = function () {};\n\n function Context() {\n this._trace = new Context.CapturedTrace(peekContext());\n }\n\n Context.prototype._pushContext = function () {\n if (this._trace !== undefined) {\n this._trace._promiseCreated = null;\n contextStack.push(this._trace);\n }\n };\n\n Context.prototype._popContext = function () {\n if (this._trace !== undefined) {\n var trace = contextStack.pop();\n var ret = trace._promiseCreated;\n trace._promiseCreated = null;\n return ret;\n }\n\n return null;\n };\n\n function createContext() {\n if (longStackTraces) return new Context();\n }\n\n function peekContext() {\n var lastIndex = contextStack.length - 1;\n\n if (lastIndex >= 0) {\n return contextStack[lastIndex];\n }\n\n return undefined;\n }\n\n Context.CapturedTrace = null;\n Context.create = createContext;\n\n Context.deactivateLongStackTraces = function () {};\n\n Context.activateLongStackTraces = function () {\n var Promise_pushContext = Promise.prototype._pushContext;\n var Promise_popContext = Promise.prototype._popContext;\n var Promise_PeekContext = Promise._peekContext;\n var Promise_peekContext = Promise.prototype._peekContext;\n var Promise_promiseCreated = Promise.prototype._promiseCreated;\n\n Context.deactivateLongStackTraces = function () {\n Promise.prototype._pushContext = Promise_pushContext;\n Promise.prototype._popContext = Promise_popContext;\n Promise._peekContext = Promise_PeekContext;\n Promise.prototype._peekContext = Promise_peekContext;\n Promise.prototype._promiseCreated = Promise_promiseCreated;\n longStackTraces = false;\n };\n\n longStackTraces = true;\n Promise.prototype._pushContext = Context.prototype._pushContext;\n Promise.prototype._popContext = Context.prototype._popContext;\n Promise._peekContext = Promise.prototype._peekContext = peekContext;\n\n Promise.prototype._promiseCreated = function () {\n var ctx = this._peekContext();\n\n if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this;\n };\n };\n\n return Context;\n };\n }, {}],\n 9: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, Context) {\n var getDomain = Promise._getDomain;\n var async = Promise._async;\n\n var Warning = _dereq_(\"./errors\").Warning;\n\n var util = _dereq_(\"./util\");\n\n var es5 = _dereq_(\"./es5\");\n\n var canAttachTrace = util.canAttachTrace;\n var unhandledRejectionHandled;\n var possiblyUnhandledRejection;\n var bluebirdFramePattern = /[\\\\\\/]bluebird[\\\\\\/]js[\\\\\\/](release|debug|instrumented)/;\n var nodeFramePattern = /\\((?:timers\\.js):\\d+:\\d+\\)/;\n var parseLinePattern = /[\\/<\\(](.+?):(\\d+):(\\d+)\\)?\\s*$/;\n var stackFramePattern = null;\n var formatStack = null;\n var indentStackFrames = false;\n var printWarning;\n var debugging = !!(util.env(\"BLUEBIRD_DEBUG\") != 0 && (true || util.env(\"BLUEBIRD_DEBUG\") || util.env(\"NODE_ENV\") === \"development\"));\n var warnings = !!(util.env(\"BLUEBIRD_WARNINGS\") != 0 && (debugging || util.env(\"BLUEBIRD_WARNINGS\")));\n var longStackTraces = !!(util.env(\"BLUEBIRD_LONG_STACK_TRACES\") != 0 && (debugging || util.env(\"BLUEBIRD_LONG_STACK_TRACES\")));\n var wForgottenReturn = util.env(\"BLUEBIRD_W_FORGOTTEN_RETURN\") != 0 && (warnings || !!util.env(\"BLUEBIRD_W_FORGOTTEN_RETURN\"));\n\n Promise.prototype.suppressUnhandledRejections = function () {\n var target = this._target();\n\n target._bitField = target._bitField & ~1048576 | 524288;\n };\n\n Promise.prototype._ensurePossibleRejectionHandled = function () {\n if ((this._bitField & 524288) !== 0) return;\n\n this._setRejectionIsUnhandled();\n\n var self = this;\n setTimeout(function () {\n self._notifyUnhandledRejection();\n }, 1);\n };\n\n Promise.prototype._notifyUnhandledRejectionIsHandled = function () {\n fireRejectionEvent(\"rejectionHandled\", unhandledRejectionHandled, undefined, this);\n };\n\n Promise.prototype._setReturnedNonUndefined = function () {\n this._bitField = this._bitField | 268435456;\n };\n\n Promise.prototype._returnedNonUndefined = function () {\n return (this._bitField & 268435456) !== 0;\n };\n\n Promise.prototype._notifyUnhandledRejection = function () {\n if (this._isRejectionUnhandled()) {\n var reason = this._settledValue();\n\n this._setUnhandledRejectionIsNotified();\n\n fireRejectionEvent(\"unhandledRejection\", possiblyUnhandledRejection, reason, this);\n }\n };\n\n Promise.prototype._setUnhandledRejectionIsNotified = function () {\n this._bitField = this._bitField | 262144;\n };\n\n Promise.prototype._unsetUnhandledRejectionIsNotified = function () {\n this._bitField = this._bitField & ~262144;\n };\n\n Promise.prototype._isUnhandledRejectionNotified = function () {\n return (this._bitField & 262144) > 0;\n };\n\n Promise.prototype._setRejectionIsUnhandled = function () {\n this._bitField = this._bitField | 1048576;\n };\n\n Promise.prototype._unsetRejectionIsUnhandled = function () {\n this._bitField = this._bitField & ~1048576;\n\n if (this._isUnhandledRejectionNotified()) {\n this._unsetUnhandledRejectionIsNotified();\n\n this._notifyUnhandledRejectionIsHandled();\n }\n };\n\n Promise.prototype._isRejectionUnhandled = function () {\n return (this._bitField & 1048576) > 0;\n };\n\n Promise.prototype._warn = function (message, shouldUseOwnTrace, promise) {\n return warn(message, shouldUseOwnTrace, promise || this);\n };\n\n Promise.onPossiblyUnhandledRejection = function (fn) {\n var domain = getDomain();\n possiblyUnhandledRejection = typeof fn === \"function\" ? domain === null ? fn : util.domainBind(domain, fn) : undefined;\n };\n\n Promise.onUnhandledRejectionHandled = function (fn) {\n var domain = getDomain();\n unhandledRejectionHandled = typeof fn === \"function\" ? domain === null ? fn : util.domainBind(domain, fn) : undefined;\n };\n\n var disableLongStackTraces = function disableLongStackTraces() {};\n\n Promise.longStackTraces = function () {\n if (async.haveItemsQueued() && !config.longStackTraces) {\n throw new Error(\"cannot enable long stack traces after promises have been created\\n\\n See http://goo.gl/MqrFmX\\n\");\n }\n\n if (!config.longStackTraces && longStackTracesIsSupported()) {\n var Promise_captureStackTrace = Promise.prototype._captureStackTrace;\n var Promise_attachExtraTrace = Promise.prototype._attachExtraTrace;\n var Promise_dereferenceTrace = Promise.prototype._dereferenceTrace;\n config.longStackTraces = true;\n\n disableLongStackTraces = function disableLongStackTraces() {\n if (async.haveItemsQueued() && !config.longStackTraces) {\n throw new Error(\"cannot enable long stack traces after promises have been created\\n\\n See http://goo.gl/MqrFmX\\n\");\n }\n\n Promise.prototype._captureStackTrace = Promise_captureStackTrace;\n Promise.prototype._attachExtraTrace = Promise_attachExtraTrace;\n Promise.prototype._dereferenceTrace = Promise_dereferenceTrace;\n Context.deactivateLongStackTraces();\n async.enableTrampoline();\n config.longStackTraces = false;\n };\n\n Promise.prototype._captureStackTrace = longStackTracesCaptureStackTrace;\n Promise.prototype._attachExtraTrace = longStackTracesAttachExtraTrace;\n Promise.prototype._dereferenceTrace = longStackTracesDereferenceTrace;\n Context.activateLongStackTraces();\n async.disableTrampolineIfNecessary();\n }\n };\n\n Promise.hasLongStackTraces = function () {\n return config.longStackTraces && longStackTracesIsSupported();\n };\n\n var fireDomEvent = function () {\n try {\n if (typeof CustomEvent === \"function\") {\n var event = new CustomEvent(\"CustomEvent\");\n util.global.dispatchEvent(event);\n return function (name, event) {\n var eventData = {\n detail: event,\n cancelable: true\n };\n es5.defineProperty(eventData, \"promise\", {\n value: event.promise\n });\n es5.defineProperty(eventData, \"reason\", {\n value: event.reason\n });\n var domEvent = new CustomEvent(name.toLowerCase(), eventData);\n return !util.global.dispatchEvent(domEvent);\n };\n } else if (typeof Event === \"function\") {\n var event = new Event(\"CustomEvent\");\n util.global.dispatchEvent(event);\n return function (name, event) {\n var domEvent = new Event(name.toLowerCase(), {\n cancelable: true\n });\n domEvent.detail = event;\n es5.defineProperty(domEvent, \"promise\", {\n value: event.promise\n });\n es5.defineProperty(domEvent, \"reason\", {\n value: event.reason\n });\n return !util.global.dispatchEvent(domEvent);\n };\n } else {\n var event = document.createEvent(\"CustomEvent\");\n event.initCustomEvent(\"testingtheevent\", false, true, {});\n util.global.dispatchEvent(event);\n return function (name, event) {\n var domEvent = document.createEvent(\"CustomEvent\");\n domEvent.initCustomEvent(name.toLowerCase(), false, true, event);\n return !util.global.dispatchEvent(domEvent);\n };\n }\n } catch (e) {}\n\n return function () {\n return false;\n };\n }();\n\n var fireGlobalEvent = function () {\n if (util.isNode) {\n return function () {\n return process.emit.apply(process, arguments);\n };\n } else {\n if (!util.global) {\n return function () {\n return false;\n };\n }\n\n return function (name) {\n var methodName = \"on\" + name.toLowerCase();\n var method = util.global[methodName];\n if (!method) return false;\n method.apply(util.global, [].slice.call(arguments, 1));\n return true;\n };\n }\n }();\n\n function generatePromiseLifecycleEventObject(name, promise) {\n return {\n promise: promise\n };\n }\n\n var eventToObjectGenerator = {\n promiseCreated: generatePromiseLifecycleEventObject,\n promiseFulfilled: generatePromiseLifecycleEventObject,\n promiseRejected: generatePromiseLifecycleEventObject,\n promiseResolved: generatePromiseLifecycleEventObject,\n promiseCancelled: generatePromiseLifecycleEventObject,\n promiseChained: function promiseChained(name, promise, child) {\n return {\n promise: promise,\n child: child\n };\n },\n warning: function warning(name, _warning) {\n return {\n warning: _warning\n };\n },\n unhandledRejection: function unhandledRejection(name, reason, promise) {\n return {\n reason: reason,\n promise: promise\n };\n },\n rejectionHandled: generatePromiseLifecycleEventObject\n };\n\n var activeFireEvent = function activeFireEvent(name) {\n var globalEventFired = false;\n\n try {\n globalEventFired = fireGlobalEvent.apply(null, arguments);\n } catch (e) {\n async.throwLater(e);\n globalEventFired = true;\n }\n\n var domEventFired = false;\n\n try {\n domEventFired = fireDomEvent(name, eventToObjectGenerator[name].apply(null, arguments));\n } catch (e) {\n async.throwLater(e);\n domEventFired = true;\n }\n\n return domEventFired || globalEventFired;\n };\n\n Promise.config = function (opts) {\n opts = Object(opts);\n\n if (\"longStackTraces\" in opts) {\n if (opts.longStackTraces) {\n Promise.longStackTraces();\n } else if (!opts.longStackTraces && Promise.hasLongStackTraces()) {\n disableLongStackTraces();\n }\n }\n\n if (\"warnings\" in opts) {\n var warningsOption = opts.warnings;\n config.warnings = !!warningsOption;\n wForgottenReturn = config.warnings;\n\n if (util.isObject(warningsOption)) {\n if (\"wForgottenReturn\" in warningsOption) {\n wForgottenReturn = !!warningsOption.wForgottenReturn;\n }\n }\n }\n\n if (\"cancellation\" in opts && opts.cancellation && !config.cancellation) {\n if (async.haveItemsQueued()) {\n throw new Error(\"cannot enable cancellation after promises are in use\");\n }\n\n Promise.prototype._clearCancellationData = cancellationClearCancellationData;\n Promise.prototype._propagateFrom = cancellationPropagateFrom;\n Promise.prototype._onCancel = cancellationOnCancel;\n Promise.prototype._setOnCancel = cancellationSetOnCancel;\n Promise.prototype._attachCancellationCallback = cancellationAttachCancellationCallback;\n Promise.prototype._execute = cancellationExecute;\n _propagateFromFunction = cancellationPropagateFrom;\n config.cancellation = true;\n }\n\n if (\"monitoring\" in opts) {\n if (opts.monitoring && !config.monitoring) {\n config.monitoring = true;\n Promise.prototype._fireEvent = activeFireEvent;\n } else if (!opts.monitoring && config.monitoring) {\n config.monitoring = false;\n Promise.prototype._fireEvent = defaultFireEvent;\n }\n }\n\n return Promise;\n };\n\n function defaultFireEvent() {\n return false;\n }\n\n Promise.prototype._fireEvent = defaultFireEvent;\n\n Promise.prototype._execute = function (executor, resolve, reject) {\n try {\n executor(resolve, reject);\n } catch (e) {\n return e;\n }\n };\n\n Promise.prototype._onCancel = function () {};\n\n Promise.prototype._setOnCancel = function (handler) {\n ;\n };\n\n Promise.prototype._attachCancellationCallback = function (onCancel) {\n ;\n };\n\n Promise.prototype._captureStackTrace = function () {};\n\n Promise.prototype._attachExtraTrace = function () {};\n\n Promise.prototype._dereferenceTrace = function () {};\n\n Promise.prototype._clearCancellationData = function () {};\n\n Promise.prototype._propagateFrom = function (parent, flags) {\n ;\n ;\n };\n\n function cancellationExecute(executor, resolve, reject) {\n var promise = this;\n\n try {\n executor(resolve, reject, function (onCancel) {\n if (typeof onCancel !== \"function\") {\n throw new TypeError(\"onCancel must be a function, got: \" + util.toString(onCancel));\n }\n\n promise._attachCancellationCallback(onCancel);\n });\n } catch (e) {\n return e;\n }\n }\n\n function cancellationAttachCancellationCallback(onCancel) {\n if (!this._isCancellable()) return this;\n\n var previousOnCancel = this._onCancel();\n\n if (previousOnCancel !== undefined) {\n if (util.isArray(previousOnCancel)) {\n previousOnCancel.push(onCancel);\n } else {\n this._setOnCancel([previousOnCancel, onCancel]);\n }\n } else {\n this._setOnCancel(onCancel);\n }\n }\n\n function cancellationOnCancel() {\n return this._onCancelField;\n }\n\n function cancellationSetOnCancel(onCancel) {\n this._onCancelField = onCancel;\n }\n\n function cancellationClearCancellationData() {\n this._cancellationParent = undefined;\n this._onCancelField = undefined;\n }\n\n function cancellationPropagateFrom(parent, flags) {\n if ((flags & 1) !== 0) {\n this._cancellationParent = parent;\n var branchesRemainingToCancel = parent._branchesRemainingToCancel;\n\n if (branchesRemainingToCancel === undefined) {\n branchesRemainingToCancel = 0;\n }\n\n parent._branchesRemainingToCancel = branchesRemainingToCancel + 1;\n }\n\n if ((flags & 2) !== 0 && parent._isBound()) {\n this._setBoundTo(parent._boundTo);\n }\n }\n\n function bindingPropagateFrom(parent, flags) {\n if ((flags & 2) !== 0 && parent._isBound()) {\n this._setBoundTo(parent._boundTo);\n }\n }\n\n var _propagateFromFunction = bindingPropagateFrom;\n\n function _boundValueFunction() {\n var ret = this._boundTo;\n\n if (ret !== undefined) {\n if (ret instanceof Promise) {\n if (ret.isFulfilled()) {\n return ret.value();\n } else {\n return undefined;\n }\n }\n }\n\n return ret;\n }\n\n function longStackTracesCaptureStackTrace() {\n this._trace = new CapturedTrace(this._peekContext());\n }\n\n function longStackTracesAttachExtraTrace(error, ignoreSelf) {\n if (canAttachTrace(error)) {\n var trace = this._trace;\n\n if (trace !== undefined) {\n if (ignoreSelf) trace = trace._parent;\n }\n\n if (trace !== undefined) {\n trace.attachExtraTrace(error);\n } else if (!error.__stackCleaned__) {\n var parsed = parseStackAndMessage(error);\n util.notEnumerableProp(error, \"stack\", parsed.message + \"\\n\" + parsed.stack.join(\"\\n\"));\n util.notEnumerableProp(error, \"__stackCleaned__\", true);\n }\n }\n }\n\n function longStackTracesDereferenceTrace() {\n this._trace = undefined;\n }\n\n function checkForgottenReturns(returnValue, promiseCreated, name, promise, parent) {\n if (returnValue === undefined && promiseCreated !== null && wForgottenReturn) {\n if (parent !== undefined && parent._returnedNonUndefined()) return;\n if ((promise._bitField & 65535) === 0) return;\n if (name) name = name + \" \";\n var handlerLine = \"\";\n var creatorLine = \"\";\n\n if (promiseCreated._trace) {\n var traceLines = promiseCreated._trace.stack.split(\"\\n\");\n\n var stack = cleanStack(traceLines);\n\n for (var i = stack.length - 1; i >= 0; --i) {\n var line = stack[i];\n\n if (!nodeFramePattern.test(line)) {\n var lineMatches = line.match(parseLinePattern);\n\n if (lineMatches) {\n handlerLine = \"at \" + lineMatches[1] + \":\" + lineMatches[2] + \":\" + lineMatches[3] + \" \";\n }\n\n break;\n }\n }\n\n if (stack.length > 0) {\n var firstUserLine = stack[0];\n\n for (var i = 0; i < traceLines.length; ++i) {\n if (traceLines[i] === firstUserLine) {\n if (i > 0) {\n creatorLine = \"\\n\" + traceLines[i - 1];\n }\n\n break;\n }\n }\n }\n }\n\n var msg = \"a promise was created in a \" + name + \"handler \" + handlerLine + \"but was not returned from it, \" + \"see http://goo.gl/rRqMUw\" + creatorLine;\n\n promise._warn(msg, true, promiseCreated);\n }\n }\n\n function deprecated(name, replacement) {\n var message = name + \" is deprecated and will be removed in a future version.\";\n if (replacement) message += \" Use \" + replacement + \" instead.\";\n return warn(message);\n }\n\n function warn(message, shouldUseOwnTrace, promise) {\n if (!config.warnings) return;\n var warning = new Warning(message);\n var ctx;\n\n if (shouldUseOwnTrace) {\n promise._attachExtraTrace(warning);\n } else if (config.longStackTraces && (ctx = Promise._peekContext())) {\n ctx.attachExtraTrace(warning);\n } else {\n var parsed = parseStackAndMessage(warning);\n warning.stack = parsed.message + \"\\n\" + parsed.stack.join(\"\\n\");\n }\n\n if (!activeFireEvent(\"warning\", warning)) {\n formatAndLogError(warning, \"\", true);\n }\n }\n\n function reconstructStack(message, stacks) {\n for (var i = 0; i < stacks.length - 1; ++i) {\n stacks[i].push(\"From previous event:\");\n stacks[i] = stacks[i].join(\"\\n\");\n }\n\n if (i < stacks.length) {\n stacks[i] = stacks[i].join(\"\\n\");\n }\n\n return message + \"\\n\" + stacks.join(\"\\n\");\n }\n\n function removeDuplicateOrEmptyJumps(stacks) {\n for (var i = 0; i < stacks.length; ++i) {\n if (stacks[i].length === 0 || i + 1 < stacks.length && stacks[i][0] === stacks[i + 1][0]) {\n stacks.splice(i, 1);\n i--;\n }\n }\n }\n\n function removeCommonRoots(stacks) {\n var current = stacks[0];\n\n for (var i = 1; i < stacks.length; ++i) {\n var prev = stacks[i];\n var currentLastIndex = current.length - 1;\n var currentLastLine = current[currentLastIndex];\n var commonRootMeetPoint = -1;\n\n for (var j = prev.length - 1; j >= 0; --j) {\n if (prev[j] === currentLastLine) {\n commonRootMeetPoint = j;\n break;\n }\n }\n\n for (var j = commonRootMeetPoint; j >= 0; --j) {\n var line = prev[j];\n\n if (current[currentLastIndex] === line) {\n current.pop();\n currentLastIndex--;\n } else {\n break;\n }\n }\n\n current = prev;\n }\n }\n\n function cleanStack(stack) {\n var ret = [];\n\n for (var i = 0; i < stack.length; ++i) {\n var line = stack[i];\n var isTraceLine = \" (No stack trace)\" === line || stackFramePattern.test(line);\n var isInternalFrame = isTraceLine && shouldIgnore(line);\n\n if (isTraceLine && !isInternalFrame) {\n if (indentStackFrames && line.charAt(0) !== \" \") {\n line = \" \" + line;\n }\n\n ret.push(line);\n }\n }\n\n return ret;\n }\n\n function stackFramesAsArray(error) {\n var stack = error.stack.replace(/\\s+$/g, \"\").split(\"\\n\");\n\n for (var i = 0; i < stack.length; ++i) {\n var line = stack[i];\n\n if (\" (No stack trace)\" === line || stackFramePattern.test(line)) {\n break;\n }\n }\n\n if (i > 0 && error.name != \"SyntaxError\") {\n stack = stack.slice(i);\n }\n\n return stack;\n }\n\n function parseStackAndMessage(error) {\n var stack = error.stack;\n var message = error.toString();\n stack = typeof stack === \"string\" && stack.length > 0 ? stackFramesAsArray(error) : [\" (No stack trace)\"];\n return {\n message: message,\n stack: error.name == \"SyntaxError\" ? stack : cleanStack(stack)\n };\n }\n\n function formatAndLogError(error, title, isSoft) {\n if (typeof console !== \"undefined\") {\n var message;\n\n if (util.isObject(error)) {\n var stack = error.stack;\n message = title + formatStack(stack, error);\n } else {\n message = title + String(error);\n }\n\n if (typeof printWarning === \"function\") {\n printWarning(message, isSoft);\n } else if (typeof console.log === \"function\" || _typeof(console.log) === \"object\") {\n console.log(message);\n }\n }\n }\n\n function fireRejectionEvent(name, localHandler, reason, promise) {\n var localEventFired = false;\n\n try {\n if (typeof localHandler === \"function\") {\n localEventFired = true;\n\n if (name === \"rejectionHandled\") {\n localHandler(promise);\n } else {\n localHandler(reason, promise);\n }\n }\n } catch (e) {\n async.throwLater(e);\n }\n\n if (name === \"unhandledRejection\") {\n if (!activeFireEvent(name, reason, promise) && !localEventFired) {\n formatAndLogError(reason, \"Unhandled rejection \");\n }\n } else {\n activeFireEvent(name, promise);\n }\n }\n\n function formatNonError(obj) {\n var str;\n\n if (typeof obj === \"function\") {\n str = \"[function \" + (obj.name || \"anonymous\") + \"]\";\n } else {\n str = obj && typeof obj.toString === \"function\" ? obj.toString() : util.toString(obj);\n var ruselessToString = /\\[object [a-zA-Z0-9$_]+\\]/;\n\n if (ruselessToString.test(str)) {\n try {\n var newStr = JSON.stringify(obj);\n str = newStr;\n } catch (e) {}\n }\n\n if (str.length === 0) {\n str = \"(empty array)\";\n }\n }\n\n return \"(<\" + snip(str) + \">, no stack trace)\";\n }\n\n function snip(str) {\n var maxChars = 41;\n\n if (str.length < maxChars) {\n return str;\n }\n\n return str.substr(0, maxChars - 3) + \"...\";\n }\n\n function longStackTracesIsSupported() {\n return typeof captureStackTrace === \"function\";\n }\n\n var shouldIgnore = function shouldIgnore() {\n return false;\n };\n\n var parseLineInfoRegex = /[\\/<\\(]([^:\\/]+):(\\d+):(?:\\d+)\\)?\\s*$/;\n\n function parseLineInfo(line) {\n var matches = line.match(parseLineInfoRegex);\n\n if (matches) {\n return {\n fileName: matches[1],\n line: parseInt(matches[2], 10)\n };\n }\n }\n\n function setBounds(firstLineError, lastLineError) {\n if (!longStackTracesIsSupported()) return;\n var firstStackLines = firstLineError.stack.split(\"\\n\");\n var lastStackLines = lastLineError.stack.split(\"\\n\");\n var firstIndex = -1;\n var lastIndex = -1;\n var firstFileName;\n var lastFileName;\n\n for (var i = 0; i < firstStackLines.length; ++i) {\n var result = parseLineInfo(firstStackLines[i]);\n\n if (result) {\n firstFileName = result.fileName;\n firstIndex = result.line;\n break;\n }\n }\n\n for (var i = 0; i < lastStackLines.length; ++i) {\n var result = parseLineInfo(lastStackLines[i]);\n\n if (result) {\n lastFileName = result.fileName;\n lastIndex = result.line;\n break;\n }\n }\n\n if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName || firstFileName !== lastFileName || firstIndex >= lastIndex) {\n return;\n }\n\n shouldIgnore = function shouldIgnore(line) {\n if (bluebirdFramePattern.test(line)) return true;\n var info = parseLineInfo(line);\n\n if (info) {\n if (info.fileName === firstFileName && firstIndex <= info.line && info.line <= lastIndex) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function CapturedTrace(parent) {\n this._parent = parent;\n this._promisesCreated = 0;\n var length = this._length = 1 + (parent === undefined ? 0 : parent._length);\n captureStackTrace(this, CapturedTrace);\n if (length > 32) this.uncycle();\n }\n\n util.inherits(CapturedTrace, Error);\n Context.CapturedTrace = CapturedTrace;\n\n CapturedTrace.prototype.uncycle = function () {\n var length = this._length;\n if (length < 2) return;\n var nodes = [];\n var stackToIndex = {};\n\n for (var i = 0, node = this; node !== undefined; ++i) {\n nodes.push(node);\n node = node._parent;\n }\n\n length = this._length = i;\n\n for (var i = length - 1; i >= 0; --i) {\n var stack = nodes[i].stack;\n\n if (stackToIndex[stack] === undefined) {\n stackToIndex[stack] = i;\n }\n }\n\n for (var i = 0; i < length; ++i) {\n var currentStack = nodes[i].stack;\n var index = stackToIndex[currentStack];\n\n if (index !== undefined && index !== i) {\n if (index > 0) {\n nodes[index - 1]._parent = undefined;\n nodes[index - 1]._length = 1;\n }\n\n nodes[i]._parent = undefined;\n nodes[i]._length = 1;\n var cycleEdgeNode = i > 0 ? nodes[i - 1] : this;\n\n if (index < length - 1) {\n cycleEdgeNode._parent = nodes[index + 1];\n\n cycleEdgeNode._parent.uncycle();\n\n cycleEdgeNode._length = cycleEdgeNode._parent._length + 1;\n } else {\n cycleEdgeNode._parent = undefined;\n cycleEdgeNode._length = 1;\n }\n\n var currentChildLength = cycleEdgeNode._length + 1;\n\n for (var j = i - 2; j >= 0; --j) {\n nodes[j]._length = currentChildLength;\n currentChildLength++;\n }\n\n return;\n }\n }\n };\n\n CapturedTrace.prototype.attachExtraTrace = function (error) {\n if (error.__stackCleaned__) return;\n this.uncycle();\n var parsed = parseStackAndMessage(error);\n var message = parsed.message;\n var stacks = [parsed.stack];\n var trace = this;\n\n while (trace !== undefined) {\n stacks.push(cleanStack(trace.stack.split(\"\\n\")));\n trace = trace._parent;\n }\n\n removeCommonRoots(stacks);\n removeDuplicateOrEmptyJumps(stacks);\n util.notEnumerableProp(error, \"stack\", reconstructStack(message, stacks));\n util.notEnumerableProp(error, \"__stackCleaned__\", true);\n };\n\n var captureStackTrace = function stackDetection() {\n var v8stackFramePattern = /^\\s*at\\s*/;\n\n var v8stackFormatter = function v8stackFormatter(stack, error) {\n if (typeof stack === \"string\") return stack;\n\n if (error.name !== undefined && error.message !== undefined) {\n return error.toString();\n }\n\n return formatNonError(error);\n };\n\n if (typeof Error.stackTraceLimit === \"number\" && typeof Error.captureStackTrace === \"function\") {\n Error.stackTraceLimit += 6;\n stackFramePattern = v8stackFramePattern;\n formatStack = v8stackFormatter;\n var captureStackTrace = Error.captureStackTrace;\n\n shouldIgnore = function shouldIgnore(line) {\n return bluebirdFramePattern.test(line);\n };\n\n return function (receiver, ignoreUntil) {\n Error.stackTraceLimit += 6;\n captureStackTrace(receiver, ignoreUntil);\n Error.stackTraceLimit -= 6;\n };\n }\n\n var err = new Error();\n\n if (typeof err.stack === \"string\" && err.stack.split(\"\\n\")[0].indexOf(\"stackDetection@\") >= 0) {\n stackFramePattern = /@/;\n formatStack = v8stackFormatter;\n indentStackFrames = true;\n return function captureStackTrace(o) {\n o.stack = new Error().stack;\n };\n }\n\n var hasStackAfterThrow;\n\n try {\n throw new Error();\n } catch (e) {\n hasStackAfterThrow = \"stack\" in e;\n }\n\n if (!(\"stack\" in err) && hasStackAfterThrow && typeof Error.stackTraceLimit === \"number\") {\n stackFramePattern = v8stackFramePattern;\n formatStack = v8stackFormatter;\n return function captureStackTrace(o) {\n Error.stackTraceLimit += 6;\n\n try {\n throw new Error();\n } catch (e) {\n o.stack = e.stack;\n }\n\n Error.stackTraceLimit -= 6;\n };\n }\n\n formatStack = function formatStack(stack, error) {\n if (typeof stack === \"string\") return stack;\n\n if ((_typeof(error) === \"object\" || typeof error === \"function\") && error.name !== undefined && error.message !== undefined) {\n return error.toString();\n }\n\n return formatNonError(error);\n };\n\n return null;\n }([]);\n\n if (typeof console !== \"undefined\" && typeof console.warn !== \"undefined\") {\n printWarning = function printWarning(message) {\n console.warn(message);\n };\n\n if (util.isNode && process.stderr.isTTY) {\n printWarning = function printWarning(message, isSoft) {\n var color = isSoft ? \"\\x1B[33m\" : \"\\x1B[31m\";\n console.warn(color + message + \"\\x1B[0m\\n\");\n };\n } else if (!util.isNode && typeof new Error().stack === \"string\") {\n printWarning = function printWarning(message, isSoft) {\n console.warn(\"%c\" + message, isSoft ? \"color: darkorange\" : \"color: red\");\n };\n }\n }\n\n var config = {\n warnings: warnings,\n longStackTraces: false,\n cancellation: false,\n monitoring: false\n };\n if (longStackTraces) Promise.longStackTraces();\n return {\n longStackTraces: function longStackTraces() {\n return config.longStackTraces;\n },\n warnings: function warnings() {\n return config.warnings;\n },\n cancellation: function cancellation() {\n return config.cancellation;\n },\n monitoring: function monitoring() {\n return config.monitoring;\n },\n propagateFromFunction: function propagateFromFunction() {\n return _propagateFromFunction;\n },\n boundValueFunction: function boundValueFunction() {\n return _boundValueFunction;\n },\n checkForgottenReturns: checkForgottenReturns,\n setBounds: setBounds,\n warn: warn,\n deprecated: deprecated,\n CapturedTrace: CapturedTrace,\n fireDomEvent: fireDomEvent,\n fireGlobalEvent: fireGlobalEvent\n };\n };\n }, {\n \"./errors\": 12,\n \"./es5\": 13,\n \"./util\": 36\n }],\n 10: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise) {\n function returner() {\n return this.value;\n }\n\n function thrower() {\n throw this.reason;\n }\n\n Promise.prototype[\"return\"] = Promise.prototype.thenReturn = function (value) {\n if (value instanceof Promise) value.suppressUnhandledRejections();\n return this._then(returner, undefined, undefined, {\n value: value\n }, undefined);\n };\n\n Promise.prototype[\"throw\"] = Promise.prototype.thenThrow = function (reason) {\n return this._then(thrower, undefined, undefined, {\n reason: reason\n }, undefined);\n };\n\n Promise.prototype.catchThrow = function (reason) {\n if (arguments.length <= 1) {\n return this._then(undefined, thrower, undefined, {\n reason: reason\n }, undefined);\n } else {\n var _reason = arguments[1];\n\n var handler = function handler() {\n throw _reason;\n };\n\n return this.caught(reason, handler);\n }\n };\n\n Promise.prototype.catchReturn = function (value) {\n if (arguments.length <= 1) {\n if (value instanceof Promise) value.suppressUnhandledRejections();\n return this._then(undefined, returner, undefined, {\n value: value\n }, undefined);\n } else {\n var _value = arguments[1];\n if (_value instanceof Promise) _value.suppressUnhandledRejections();\n\n var handler = function handler() {\n return _value;\n };\n\n return this.caught(value, handler);\n }\n };\n };\n }, {}],\n 11: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, INTERNAL) {\n var PromiseReduce = Promise.reduce;\n var PromiseAll = Promise.all;\n\n function promiseAllThis() {\n return PromiseAll(this);\n }\n\n function PromiseMapSeries(promises, fn) {\n return PromiseReduce(promises, fn, INTERNAL, INTERNAL);\n }\n\n Promise.prototype.each = function (fn) {\n return PromiseReduce(this, fn, INTERNAL, 0)._then(promiseAllThis, undefined, undefined, this, undefined);\n };\n\n Promise.prototype.mapSeries = function (fn) {\n return PromiseReduce(this, fn, INTERNAL, INTERNAL);\n };\n\n Promise.each = function (promises, fn) {\n return PromiseReduce(promises, fn, INTERNAL, 0)._then(promiseAllThis, undefined, undefined, promises, undefined);\n };\n\n Promise.mapSeries = PromiseMapSeries;\n };\n }, {}],\n 12: [function (_dereq_, module, exports) {\n \"use strict\";\n\n var es5 = _dereq_(\"./es5\");\n\n var Objectfreeze = es5.freeze;\n\n var util = _dereq_(\"./util\");\n\n var inherits = util.inherits;\n var notEnumerableProp = util.notEnumerableProp;\n\n function subError(nameProperty, defaultMessage) {\n function SubError(message) {\n if (!(this instanceof SubError)) return new SubError(message);\n notEnumerableProp(this, \"message\", typeof message === \"string\" ? message : defaultMessage);\n notEnumerableProp(this, \"name\", nameProperty);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n Error.call(this);\n }\n }\n\n inherits(SubError, Error);\n return SubError;\n }\n\n var _TypeError, _RangeError;\n\n var Warning = subError(\"Warning\", \"warning\");\n var CancellationError = subError(\"CancellationError\", \"cancellation error\");\n var TimeoutError = subError(\"TimeoutError\", \"timeout error\");\n var AggregateError = subError(\"AggregateError\", \"aggregate error\");\n\n try {\n _TypeError = TypeError;\n _RangeError = RangeError;\n } catch (e) {\n _TypeError = subError(\"TypeError\", \"type error\");\n _RangeError = subError(\"RangeError\", \"range error\");\n }\n\n var methods = (\"join pop push shift unshift slice filter forEach some \" + \"every map indexOf lastIndexOf reduce reduceRight sort reverse\").split(\" \");\n\n for (var i = 0; i < methods.length; ++i) {\n if (typeof Array.prototype[methods[i]] === \"function\") {\n AggregateError.prototype[methods[i]] = Array.prototype[methods[i]];\n }\n }\n\n es5.defineProperty(AggregateError.prototype, \"length\", {\n value: 0,\n configurable: false,\n writable: true,\n enumerable: true\n });\n AggregateError.prototype[\"isOperational\"] = true;\n var level = 0;\n\n AggregateError.prototype.toString = function () {\n var indent = Array(level * 4 + 1).join(\" \");\n var ret = \"\\n\" + indent + \"AggregateError of:\" + \"\\n\";\n level++;\n indent = Array(level * 4 + 1).join(\" \");\n\n for (var i = 0; i < this.length; ++i) {\n var str = this[i] === this ? \"[Circular AggregateError]\" : this[i] + \"\";\n var lines = str.split(\"\\n\");\n\n for (var j = 0; j < lines.length; ++j) {\n lines[j] = indent + lines[j];\n }\n\n str = lines.join(\"\\n\");\n ret += str + \"\\n\";\n }\n\n level--;\n return ret;\n };\n\n function OperationalError(message) {\n if (!(this instanceof OperationalError)) return new OperationalError(message);\n notEnumerableProp(this, \"name\", \"OperationalError\");\n notEnumerableProp(this, \"message\", message);\n this.cause = message;\n this[\"isOperational\"] = true;\n\n if (message instanceof Error) {\n notEnumerableProp(this, \"message\", message.message);\n notEnumerableProp(this, \"stack\", message.stack);\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n\n inherits(OperationalError, Error);\n var errorTypes = Error[\"__BluebirdErrorTypes__\"];\n\n if (!errorTypes) {\n errorTypes = Objectfreeze({\n CancellationError: CancellationError,\n TimeoutError: TimeoutError,\n OperationalError: OperationalError,\n RejectionError: OperationalError,\n AggregateError: AggregateError\n });\n es5.defineProperty(Error, \"__BluebirdErrorTypes__\", {\n value: errorTypes,\n writable: false,\n enumerable: false,\n configurable: false\n });\n }\n\n module.exports = {\n Error: Error,\n TypeError: _TypeError,\n RangeError: _RangeError,\n CancellationError: errorTypes.CancellationError,\n OperationalError: errorTypes.OperationalError,\n TimeoutError: errorTypes.TimeoutError,\n AggregateError: errorTypes.AggregateError,\n Warning: Warning\n };\n }, {\n \"./es5\": 13,\n \"./util\": 36\n }],\n 13: [function (_dereq_, module, exports) {\n var isES5 = function () {\n \"use strict\";\n\n return this === undefined;\n }();\n\n if (isES5) {\n module.exports = {\n freeze: Object.freeze,\n defineProperty: Object.defineProperty,\n getDescriptor: Object.getOwnPropertyDescriptor,\n keys: Object.keys,\n names: Object.getOwnPropertyNames,\n getPrototypeOf: Object.getPrototypeOf,\n isArray: Array.isArray,\n isES5: isES5,\n propertyIsWritable: function propertyIsWritable(obj, prop) {\n var descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n return !!(!descriptor || descriptor.writable || descriptor.set);\n }\n };\n } else {\n var has = {}.hasOwnProperty;\n var str = {}.toString;\n var proto = {}.constructor.prototype;\n\n var ObjectKeys = function ObjectKeys(o) {\n var ret = [];\n\n for (var key in o) {\n if (has.call(o, key)) {\n ret.push(key);\n }\n }\n\n return ret;\n };\n\n var ObjectGetDescriptor = function ObjectGetDescriptor(o, key) {\n return {\n value: o[key]\n };\n };\n\n var ObjectDefineProperty = function ObjectDefineProperty(o, key, desc) {\n o[key] = desc.value;\n return o;\n };\n\n var ObjectFreeze = function ObjectFreeze(obj) {\n return obj;\n };\n\n var ObjectGetPrototypeOf = function ObjectGetPrototypeOf(obj) {\n try {\n return Object(obj).constructor.prototype;\n } catch (e) {\n return proto;\n }\n };\n\n var ArrayIsArray = function ArrayIsArray(obj) {\n try {\n return str.call(obj) === \"[object Array]\";\n } catch (e) {\n return false;\n }\n };\n\n module.exports = {\n isArray: ArrayIsArray,\n keys: ObjectKeys,\n names: ObjectKeys,\n defineProperty: ObjectDefineProperty,\n getDescriptor: ObjectGetDescriptor,\n freeze: ObjectFreeze,\n getPrototypeOf: ObjectGetPrototypeOf,\n isES5: isES5,\n propertyIsWritable: function propertyIsWritable() {\n return true;\n }\n };\n }\n }, {}],\n 14: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, INTERNAL) {\n var PromiseMap = Promise.map;\n\n Promise.prototype.filter = function (fn, options) {\n return PromiseMap(this, fn, options, INTERNAL);\n };\n\n Promise.filter = function (promises, fn, options) {\n return PromiseMap(promises, fn, options, INTERNAL);\n };\n };\n }, {}],\n 15: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, tryConvertToPromise, NEXT_FILTER) {\n var util = _dereq_(\"./util\");\n\n var CancellationError = Promise.CancellationError;\n var errorObj = util.errorObj;\n\n var catchFilter = _dereq_(\"./catch_filter\")(NEXT_FILTER);\n\n function PassThroughHandlerContext(promise, type, handler) {\n this.promise = promise;\n this.type = type;\n this.handler = handler;\n this.called = false;\n this.cancelPromise = null;\n }\n\n PassThroughHandlerContext.prototype.isFinallyHandler = function () {\n return this.type === 0;\n };\n\n function FinallyHandlerCancelReaction(finallyHandler) {\n this.finallyHandler = finallyHandler;\n }\n\n FinallyHandlerCancelReaction.prototype._resultCancelled = function () {\n checkCancel(this.finallyHandler);\n };\n\n function checkCancel(ctx, reason) {\n if (ctx.cancelPromise != null) {\n if (arguments.length > 1) {\n ctx.cancelPromise._reject(reason);\n } else {\n ctx.cancelPromise._cancel();\n }\n\n ctx.cancelPromise = null;\n return true;\n }\n\n return false;\n }\n\n function succeed() {\n return finallyHandler.call(this, this.promise._target()._settledValue());\n }\n\n function fail(reason) {\n if (checkCancel(this, reason)) return;\n errorObj.e = reason;\n return errorObj;\n }\n\n function finallyHandler(reasonOrValue) {\n var promise = this.promise;\n var handler = this.handler;\n\n if (!this.called) {\n this.called = true;\n var ret = this.isFinallyHandler() ? handler.call(promise._boundValue()) : handler.call(promise._boundValue(), reasonOrValue);\n\n if (ret === NEXT_FILTER) {\n return ret;\n } else if (ret !== undefined) {\n promise._setReturnedNonUndefined();\n\n var maybePromise = tryConvertToPromise(ret, promise);\n\n if (maybePromise instanceof Promise) {\n if (this.cancelPromise != null) {\n if (maybePromise._isCancelled()) {\n var reason = new CancellationError(\"late cancellation observer\");\n\n promise._attachExtraTrace(reason);\n\n errorObj.e = reason;\n return errorObj;\n } else if (maybePromise.isPending()) {\n maybePromise._attachCancellationCallback(new FinallyHandlerCancelReaction(this));\n }\n }\n\n return maybePromise._then(succeed, fail, undefined, this, undefined);\n }\n }\n }\n\n if (promise.isRejected()) {\n checkCancel(this);\n errorObj.e = reasonOrValue;\n return errorObj;\n } else {\n checkCancel(this);\n return reasonOrValue;\n }\n }\n\n Promise.prototype._passThrough = function (handler, type, success, fail) {\n if (typeof handler !== \"function\") return this.then();\n return this._then(success, fail, undefined, new PassThroughHandlerContext(this, type, handler), undefined);\n };\n\n Promise.prototype.lastly = Promise.prototype[\"finally\"] = function (handler) {\n return this._passThrough(handler, 0, finallyHandler, finallyHandler);\n };\n\n Promise.prototype.tap = function (handler) {\n return this._passThrough(handler, 1, finallyHandler);\n };\n\n Promise.prototype.tapCatch = function (handlerOrPredicate) {\n var len = arguments.length;\n\n if (len === 1) {\n return this._passThrough(handlerOrPredicate, 1, undefined, finallyHandler);\n } else {\n var catchInstances = new Array(len - 1),\n j = 0,\n i;\n\n for (i = 0; i < len - 1; ++i) {\n var item = arguments[i];\n\n if (util.isObject(item)) {\n catchInstances[j++] = item;\n } else {\n return Promise.reject(new TypeError(\"tapCatch statement predicate: \" + \"expecting an object but got \" + util.classString(item)));\n }\n }\n\n catchInstances.length = j;\n var handler = arguments[i];\n return this._passThrough(catchFilter(catchInstances, handler, this), 1, undefined, finallyHandler);\n }\n };\n\n return PassThroughHandlerContext;\n };\n }, {\n \"./catch_filter\": 7,\n \"./util\": 36\n }],\n 16: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug) {\n var errors = _dereq_(\"./errors\");\n\n var TypeError = errors.TypeError;\n\n var util = _dereq_(\"./util\");\n\n var errorObj = util.errorObj;\n var tryCatch = util.tryCatch;\n var yieldHandlers = [];\n\n function promiseFromYieldHandler(value, yieldHandlers, traceParent) {\n for (var i = 0; i < yieldHandlers.length; ++i) {\n traceParent._pushContext();\n\n var result = tryCatch(yieldHandlers[i])(value);\n\n traceParent._popContext();\n\n if (result === errorObj) {\n traceParent._pushContext();\n\n var ret = Promise.reject(errorObj.e);\n\n traceParent._popContext();\n\n return ret;\n }\n\n var maybePromise = tryConvertToPromise(result, traceParent);\n if (maybePromise instanceof Promise) return maybePromise;\n }\n\n return null;\n }\n\n function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {\n if (debug.cancellation()) {\n var internal = new Promise(INTERNAL);\n\n var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);\n\n this._promise = internal.lastly(function () {\n return _finallyPromise;\n });\n\n internal._captureStackTrace();\n\n internal._setOnCancel(this);\n } else {\n var promise = this._promise = new Promise(INTERNAL);\n\n promise._captureStackTrace();\n }\n\n this._stack = stack;\n this._generatorFunction = generatorFunction;\n this._receiver = receiver;\n this._generator = undefined;\n this._yieldHandlers = typeof yieldHandler === \"function\" ? [yieldHandler].concat(yieldHandlers) : yieldHandlers;\n this._yieldedPromise = null;\n this._cancellationPhase = false;\n }\n\n util.inherits(PromiseSpawn, Proxyable);\n\n PromiseSpawn.prototype._isResolved = function () {\n return this._promise === null;\n };\n\n PromiseSpawn.prototype._cleanup = function () {\n this._promise = this._generator = null;\n\n if (debug.cancellation() && this._finallyPromise !== null) {\n this._finallyPromise._fulfill();\n\n this._finallyPromise = null;\n }\n };\n\n PromiseSpawn.prototype._promiseCancelled = function () {\n if (this._isResolved()) return;\n var implementsReturn = typeof this._generator[\"return\"] !== \"undefined\";\n var result;\n\n if (!implementsReturn) {\n var reason = new Promise.CancellationError(\"generator .return() sentinel\");\n Promise.coroutine.returnSentinel = reason;\n\n this._promise._attachExtraTrace(reason);\n\n this._promise._pushContext();\n\n result = tryCatch(this._generator[\"throw\"]).call(this._generator, reason);\n\n this._promise._popContext();\n } else {\n this._promise._pushContext();\n\n result = tryCatch(this._generator[\"return\"]).call(this._generator, undefined);\n\n this._promise._popContext();\n }\n\n this._cancellationPhase = true;\n this._yieldedPromise = null;\n\n this._continue(result);\n };\n\n PromiseSpawn.prototype._promiseFulfilled = function (value) {\n this._yieldedPromise = null;\n\n this._promise._pushContext();\n\n var result = tryCatch(this._generator.next).call(this._generator, value);\n\n this._promise._popContext();\n\n this._continue(result);\n };\n\n PromiseSpawn.prototype._promiseRejected = function (reason) {\n this._yieldedPromise = null;\n\n this._promise._attachExtraTrace(reason);\n\n this._promise._pushContext();\n\n var result = tryCatch(this._generator[\"throw\"]).call(this._generator, reason);\n\n this._promise._popContext();\n\n this._continue(result);\n };\n\n PromiseSpawn.prototype._resultCancelled = function () {\n if (this._yieldedPromise instanceof Promise) {\n var promise = this._yieldedPromise;\n this._yieldedPromise = null;\n promise.cancel();\n }\n };\n\n PromiseSpawn.prototype.promise = function () {\n return this._promise;\n };\n\n PromiseSpawn.prototype._run = function () {\n this._generator = this._generatorFunction.call(this._receiver);\n this._receiver = this._generatorFunction = undefined;\n\n this._promiseFulfilled(undefined);\n };\n\n PromiseSpawn.prototype._continue = function (result) {\n var promise = this._promise;\n\n if (result === errorObj) {\n this._cleanup();\n\n if (this._cancellationPhase) {\n return promise.cancel();\n } else {\n return promise._rejectCallback(result.e, false);\n }\n }\n\n var value = result.value;\n\n if (result.done === true) {\n this._cleanup();\n\n if (this._cancellationPhase) {\n return promise.cancel();\n } else {\n return promise._resolveCallback(value);\n }\n } else {\n var maybePromise = tryConvertToPromise(value, this._promise);\n\n if (!(maybePromise instanceof Promise)) {\n maybePromise = promiseFromYieldHandler(maybePromise, this._yieldHandlers, this._promise);\n\n if (maybePromise === null) {\n this._promiseRejected(new TypeError(\"A value %s was yielded that could not be treated as a promise\\n\\n See http://goo.gl/MqrFmX\\n\\n\".replace(\"%s\", String(value)) + \"From coroutine:\\n\" + this._stack.split(\"\\n\").slice(1, -7).join(\"\\n\")));\n\n return;\n }\n }\n\n maybePromise = maybePromise._target();\n var bitField = maybePromise._bitField;\n ;\n\n if ((bitField & 50397184) === 0) {\n this._yieldedPromise = maybePromise;\n\n maybePromise._proxy(this, null);\n } else if ((bitField & 33554432) !== 0) {\n Promise._async.invoke(this._promiseFulfilled, this, maybePromise._value());\n } else if ((bitField & 16777216) !== 0) {\n Promise._async.invoke(this._promiseRejected, this, maybePromise._reason());\n } else {\n this._promiseCancelled();\n }\n }\n };\n\n Promise.coroutine = function (generatorFunction, options) {\n if (typeof generatorFunction !== \"function\") {\n throw new TypeError(\"generatorFunction must be a function\\n\\n See http://goo.gl/MqrFmX\\n\");\n }\n\n var yieldHandler = Object(options).yieldHandler;\n var PromiseSpawn$ = PromiseSpawn;\n var stack = new Error().stack;\n return function () {\n var generator = generatorFunction.apply(this, arguments);\n var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler, stack);\n var ret = spawn.promise();\n spawn._generator = generator;\n\n spawn._promiseFulfilled(undefined);\n\n return ret;\n };\n };\n\n Promise.coroutine.addYieldHandler = function (fn) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"expecting a function but got \" + util.classString(fn));\n }\n\n yieldHandlers.push(fn);\n };\n\n Promise.spawn = function (generatorFunction) {\n debug.deprecated(\"Promise.spawn()\", \"Promise.coroutine()\");\n\n if (typeof generatorFunction !== \"function\") {\n return apiRejection(\"generatorFunction must be a function\\n\\n See http://goo.gl/MqrFmX\\n\");\n }\n\n var spawn = new PromiseSpawn(generatorFunction, this);\n var ret = spawn.promise();\n\n spawn._run(Promise.spawn);\n\n return ret;\n };\n };\n }, {\n \"./errors\": 12,\n \"./util\": 36\n }],\n 17: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain) {\n var util = _dereq_(\"./util\");\n\n var canEvaluate = util.canEvaluate;\n var tryCatch = util.tryCatch;\n var errorObj = util.errorObj;\n var reject;\n\n if (!true) {\n if (canEvaluate) {\n var thenCallback = function thenCallback(i) {\n return new Function(\"value\", \"holder\", \" \\n\\\n 'use strict'; \\n\\\n holder.pIndex = value; \\n\\\n holder.checkFulfillment(this); \\n\\\n \".replace(/Index/g, i));\n };\n\n var promiseSetter = function promiseSetter(i) {\n return new Function(\"promise\", \"holder\", \" \\n\\\n 'use strict'; \\n\\\n holder.pIndex = promise; \\n\\\n \".replace(/Index/g, i));\n };\n\n var generateHolderClass = function generateHolderClass(total) {\n var props = new Array(total);\n\n for (var i = 0; i < props.length; ++i) {\n props[i] = \"this.p\" + (i + 1);\n }\n\n var assignment = props.join(\" = \") + \" = null;\";\n var cancellationCode = \"var promise;\\n\" + props.map(function (prop) {\n return \" \\n\\\n promise = \" + prop + \"; \\n\\\n if (promise instanceof Promise) { \\n\\\n promise.cancel(); \\n\\\n } \\n\\\n \";\n }).join(\"\\n\");\n var passedArguments = props.join(\", \");\n var name = \"Holder$\" + total;\n var code = \"return function(tryCatch, errorObj, Promise, async) { \\n\\\n 'use strict'; \\n\\\n function [TheName](fn) { \\n\\\n [TheProperties] \\n\\\n this.fn = fn; \\n\\\n this.asyncNeeded = true; \\n\\\n this.now = 0; \\n\\\n } \\n\\\n \\n\\\n [TheName].prototype._callFunction = function(promise) { \\n\\\n promise._pushContext(); \\n\\\n var ret = tryCatch(this.fn)([ThePassedArguments]); \\n\\\n promise._popContext(); \\n\\\n if (ret === errorObj) { \\n\\\n promise._rejectCallback(ret.e, false); \\n\\\n } else { \\n\\\n promise._resolveCallback(ret); \\n\\\n } \\n\\\n }; \\n\\\n \\n\\\n [TheName].prototype.checkFulfillment = function(promise) { \\n\\\n var now = ++this.now; \\n\\\n if (now === [TheTotal]) { \\n\\\n if (this.asyncNeeded) { \\n\\\n async.invoke(this._callFunction, this, promise); \\n\\\n } else { \\n\\\n this._callFunction(promise); \\n\\\n } \\n\\\n \\n\\\n } \\n\\\n }; \\n\\\n \\n\\\n [TheName].prototype._resultCancelled = function() { \\n\\\n [CancellationCode] \\n\\\n }; \\n\\\n \\n\\\n return [TheName]; \\n\\\n }(tryCatch, errorObj, Promise, async); \\n\\\n \";\n code = code.replace(/\\[TheName\\]/g, name).replace(/\\[TheTotal\\]/g, total).replace(/\\[ThePassedArguments\\]/g, passedArguments).replace(/\\[TheProperties\\]/g, assignment).replace(/\\[CancellationCode\\]/g, cancellationCode);\n return new Function(\"tryCatch\", \"errorObj\", \"Promise\", \"async\", code)(tryCatch, errorObj, Promise, async);\n };\n\n var holderClasses = [];\n var thenCallbacks = [];\n var promiseSetters = [];\n\n for (var i = 0; i < 8; ++i) {\n holderClasses.push(generateHolderClass(i + 1));\n thenCallbacks.push(thenCallback(i + 1));\n promiseSetters.push(promiseSetter(i + 1));\n }\n\n reject = function reject(reason) {\n this._reject(reason);\n };\n }\n }\n\n Promise.join = function () {\n var last = arguments.length - 1;\n var fn;\n\n if (last > 0 && typeof arguments[last] === \"function\") {\n fn = arguments[last];\n\n if (!true) {\n if (last <= 8 && canEvaluate) {\n var ret = new Promise(INTERNAL);\n\n ret._captureStackTrace();\n\n var HolderClass = holderClasses[last - 1];\n var holder = new HolderClass(fn);\n var callbacks = thenCallbacks;\n\n for (var i = 0; i < last; ++i) {\n var maybePromise = tryConvertToPromise(arguments[i], ret);\n\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n var bitField = maybePromise._bitField;\n ;\n\n if ((bitField & 50397184) === 0) {\n maybePromise._then(callbacks[i], reject, undefined, ret, holder);\n\n promiseSetters[i](maybePromise, holder);\n holder.asyncNeeded = false;\n } else if ((bitField & 33554432) !== 0) {\n callbacks[i].call(ret, maybePromise._value(), holder);\n } else if ((bitField & 16777216) !== 0) {\n ret._reject(maybePromise._reason());\n } else {\n ret._cancel();\n }\n } else {\n callbacks[i].call(ret, maybePromise, holder);\n }\n }\n\n if (!ret._isFateSealed()) {\n if (holder.asyncNeeded) {\n var domain = getDomain();\n\n if (domain !== null) {\n holder.fn = util.domainBind(domain, holder.fn);\n }\n }\n\n ret._setAsyncGuaranteed();\n\n ret._setOnCancel(holder);\n }\n\n return ret;\n }\n }\n }\n\n var args = [].slice.call(arguments);\n ;\n if (fn) args.pop();\n var ret = new PromiseArray(args).promise();\n return fn !== undefined ? ret.spread(fn) : ret;\n };\n };\n }, {\n \"./util\": 36\n }],\n 18: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug) {\n var getDomain = Promise._getDomain;\n\n var util = _dereq_(\"./util\");\n\n var tryCatch = util.tryCatch;\n var errorObj = util.errorObj;\n var async = Promise._async;\n\n function MappingPromiseArray(promises, fn, limit, _filter) {\n this.constructor$(promises);\n\n this._promise._captureStackTrace();\n\n var domain = getDomain();\n this._callback = domain === null ? fn : util.domainBind(domain, fn);\n this._preservedValues = _filter === INTERNAL ? new Array(this.length()) : null;\n this._limit = limit;\n this._inFlight = 0;\n this._queue = [];\n async.invoke(this._asyncInit, this, undefined);\n }\n\n util.inherits(MappingPromiseArray, PromiseArray);\n\n MappingPromiseArray.prototype._asyncInit = function () {\n this._init$(undefined, -2);\n };\n\n MappingPromiseArray.prototype._init = function () {};\n\n MappingPromiseArray.prototype._promiseFulfilled = function (value, index) {\n var values = this._values;\n var length = this.length();\n var preservedValues = this._preservedValues;\n var limit = this._limit;\n\n if (index < 0) {\n index = index * -1 - 1;\n values[index] = value;\n\n if (limit >= 1) {\n this._inFlight--;\n\n this._drainQueue();\n\n if (this._isResolved()) return true;\n }\n } else {\n if (limit >= 1 && this._inFlight >= limit) {\n values[index] = value;\n\n this._queue.push(index);\n\n return false;\n }\n\n if (preservedValues !== null) preservedValues[index] = value;\n var promise = this._promise;\n var callback = this._callback;\n\n var receiver = promise._boundValue();\n\n promise._pushContext();\n\n var ret = tryCatch(callback).call(receiver, value, index, length);\n\n var promiseCreated = promise._popContext();\n\n debug.checkForgottenReturns(ret, promiseCreated, preservedValues !== null ? \"Promise.filter\" : \"Promise.map\", promise);\n\n if (ret === errorObj) {\n this._reject(ret.e);\n\n return true;\n }\n\n var maybePromise = tryConvertToPromise(ret, this._promise);\n\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n var bitField = maybePromise._bitField;\n ;\n\n if ((bitField & 50397184) === 0) {\n if (limit >= 1) this._inFlight++;\n values[index] = maybePromise;\n\n maybePromise._proxy(this, (index + 1) * -1);\n\n return false;\n } else if ((bitField & 33554432) !== 0) {\n ret = maybePromise._value();\n } else if ((bitField & 16777216) !== 0) {\n this._reject(maybePromise._reason());\n\n return true;\n } else {\n this._cancel();\n\n return true;\n }\n }\n\n values[index] = ret;\n }\n\n var totalResolved = ++this._totalResolved;\n\n if (totalResolved >= length) {\n if (preservedValues !== null) {\n this._filter(values, preservedValues);\n } else {\n this._resolve(values);\n }\n\n return true;\n }\n\n return false;\n };\n\n MappingPromiseArray.prototype._drainQueue = function () {\n var queue = this._queue;\n var limit = this._limit;\n var values = this._values;\n\n while (queue.length > 0 && this._inFlight < limit) {\n if (this._isResolved()) return;\n var index = queue.pop();\n\n this._promiseFulfilled(values[index], index);\n }\n };\n\n MappingPromiseArray.prototype._filter = function (booleans, values) {\n var len = values.length;\n var ret = new Array(len);\n var j = 0;\n\n for (var i = 0; i < len; ++i) {\n if (booleans[i]) ret[j++] = values[i];\n }\n\n ret.length = j;\n\n this._resolve(ret);\n };\n\n MappingPromiseArray.prototype.preservedValues = function () {\n return this._preservedValues;\n };\n\n function map(promises, fn, options, _filter) {\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n\n var limit = 0;\n\n if (options !== undefined) {\n if (_typeof(options) === \"object\" && options !== null) {\n if (typeof options.concurrency !== \"number\") {\n return Promise.reject(new TypeError(\"'concurrency' must be a number but it is \" + util.classString(options.concurrency)));\n }\n\n limit = options.concurrency;\n } else {\n return Promise.reject(new TypeError(\"options argument must be an object but it is \" + util.classString(options)));\n }\n }\n\n limit = typeof limit === \"number\" && isFinite(limit) && limit >= 1 ? limit : 0;\n return new MappingPromiseArray(promises, fn, limit, _filter).promise();\n }\n\n Promise.prototype.map = function (fn, options) {\n return map(this, fn, options, null);\n };\n\n Promise.map = function (promises, fn, options, _filter) {\n return map(promises, fn, options, _filter);\n };\n };\n }, {\n \"./util\": 36\n }],\n 19: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, INTERNAL, tryConvertToPromise, apiRejection, debug) {\n var util = _dereq_(\"./util\");\n\n var tryCatch = util.tryCatch;\n\n Promise.method = function (fn) {\n if (typeof fn !== \"function\") {\n throw new Promise.TypeError(\"expecting a function but got \" + util.classString(fn));\n }\n\n return function () {\n var ret = new Promise(INTERNAL);\n\n ret._captureStackTrace();\n\n ret._pushContext();\n\n var value = tryCatch(fn).apply(this, arguments);\n\n var promiseCreated = ret._popContext();\n\n debug.checkForgottenReturns(value, promiseCreated, \"Promise.method\", ret);\n\n ret._resolveFromSyncValue(value);\n\n return ret;\n };\n };\n\n Promise.attempt = Promise[\"try\"] = function (fn) {\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n\n var ret = new Promise(INTERNAL);\n\n ret._captureStackTrace();\n\n ret._pushContext();\n\n var value;\n\n if (arguments.length > 1) {\n debug.deprecated(\"calling Promise.try with more than 1 argument\");\n var arg = arguments[1];\n var ctx = arguments[2];\n value = util.isArray(arg) ? tryCatch(fn).apply(ctx, arg) : tryCatch(fn).call(ctx, arg);\n } else {\n value = tryCatch(fn)();\n }\n\n var promiseCreated = ret._popContext();\n\n debug.checkForgottenReturns(value, promiseCreated, \"Promise.try\", ret);\n\n ret._resolveFromSyncValue(value);\n\n return ret;\n };\n\n Promise.prototype._resolveFromSyncValue = function (value) {\n if (value === util.errorObj) {\n this._rejectCallback(value.e, false);\n } else {\n this._resolveCallback(value, true);\n }\n };\n };\n }, {\n \"./util\": 36\n }],\n 20: [function (_dereq_, module, exports) {\n \"use strict\";\n\n var util = _dereq_(\"./util\");\n\n var maybeWrapAsError = util.maybeWrapAsError;\n\n var errors = _dereq_(\"./errors\");\n\n var OperationalError = errors.OperationalError;\n\n var es5 = _dereq_(\"./es5\");\n\n function isUntypedError(obj) {\n return obj instanceof Error && es5.getPrototypeOf(obj) === Error.prototype;\n }\n\n var rErrorKey = /^(?:name|message|stack|cause)$/;\n\n function wrapAsOperationalError(obj) {\n var ret;\n\n if (isUntypedError(obj)) {\n ret = new OperationalError(obj);\n ret.name = obj.name;\n ret.message = obj.message;\n ret.stack = obj.stack;\n var keys = es5.keys(obj);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!rErrorKey.test(key)) {\n ret[key] = obj[key];\n }\n }\n\n return ret;\n }\n\n util.markAsOriginatingFromRejection(obj);\n return obj;\n }\n\n function nodebackForPromise(promise, multiArgs) {\n return function (err, value) {\n if (promise === null) return;\n\n if (err) {\n var wrapped = wrapAsOperationalError(maybeWrapAsError(err));\n\n promise._attachExtraTrace(wrapped);\n\n promise._reject(wrapped);\n } else if (!multiArgs) {\n promise._fulfill(value);\n } else {\n var args = [].slice.call(arguments, 1);\n ;\n\n promise._fulfill(args);\n }\n\n promise = null;\n };\n }\n\n module.exports = nodebackForPromise;\n }, {\n \"./errors\": 12,\n \"./es5\": 13,\n \"./util\": 36\n }],\n 21: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise) {\n var util = _dereq_(\"./util\");\n\n var async = Promise._async;\n var tryCatch = util.tryCatch;\n var errorObj = util.errorObj;\n\n function spreadAdapter(val, nodeback) {\n var promise = this;\n if (!util.isArray(val)) return successAdapter.call(promise, val, nodeback);\n var ret = tryCatch(nodeback).apply(promise._boundValue(), [null].concat(val));\n\n if (ret === errorObj) {\n async.throwLater(ret.e);\n }\n }\n\n function successAdapter(val, nodeback) {\n var promise = this;\n\n var receiver = promise._boundValue();\n\n var ret = val === undefined ? tryCatch(nodeback).call(receiver, null) : tryCatch(nodeback).call(receiver, null, val);\n\n if (ret === errorObj) {\n async.throwLater(ret.e);\n }\n }\n\n function errorAdapter(reason, nodeback) {\n var promise = this;\n\n if (!reason) {\n var newReason = new Error(reason + \"\");\n newReason.cause = reason;\n reason = newReason;\n }\n\n var ret = tryCatch(nodeback).call(promise._boundValue(), reason);\n\n if (ret === errorObj) {\n async.throwLater(ret.e);\n }\n }\n\n Promise.prototype.asCallback = Promise.prototype.nodeify = function (nodeback, options) {\n if (typeof nodeback == \"function\") {\n var adapter = successAdapter;\n\n if (options !== undefined && Object(options).spread) {\n adapter = spreadAdapter;\n }\n\n this._then(adapter, errorAdapter, undefined, this, nodeback);\n }\n\n return this;\n };\n };\n }, {\n \"./util\": 36\n }],\n 22: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function () {\n var makeSelfResolutionError = function makeSelfResolutionError() {\n return new TypeError(\"circular promise resolution chain\\n\\n See http://goo.gl/MqrFmX\\n\");\n };\n\n var reflectHandler = function reflectHandler() {\n return new Promise.PromiseInspection(this._target());\n };\n\n var apiRejection = function apiRejection(msg) {\n return Promise.reject(new TypeError(msg));\n };\n\n function Proxyable() {}\n\n var UNDEFINED_BINDING = {};\n\n var util = _dereq_(\"./util\");\n\n var getDomain;\n\n if (util.isNode) {\n getDomain = function getDomain() {\n var ret = process.domain;\n if (ret === undefined) ret = null;\n return ret;\n };\n } else {\n getDomain = function getDomain() {\n return null;\n };\n }\n\n util.notEnumerableProp(Promise, \"_getDomain\", getDomain);\n\n var es5 = _dereq_(\"./es5\");\n\n var Async = _dereq_(\"./async\");\n\n var async = new Async();\n es5.defineProperty(Promise, \"_async\", {\n value: async\n });\n\n var errors = _dereq_(\"./errors\");\n\n var TypeError = Promise.TypeError = errors.TypeError;\n Promise.RangeError = errors.RangeError;\n var CancellationError = Promise.CancellationError = errors.CancellationError;\n Promise.TimeoutError = errors.TimeoutError;\n Promise.OperationalError = errors.OperationalError;\n Promise.RejectionError = errors.OperationalError;\n Promise.AggregateError = errors.AggregateError;\n\n var INTERNAL = function INTERNAL() {};\n\n var APPLY = {};\n var NEXT_FILTER = {};\n\n var tryConvertToPromise = _dereq_(\"./thenables\")(Promise, INTERNAL);\n\n var PromiseArray = _dereq_(\"./promise_array\")(Promise, INTERNAL, tryConvertToPromise, apiRejection, Proxyable);\n\n var Context = _dereq_(\"./context\")(Promise);\n /*jshint unused:false*/\n\n\n var createContext = Context.create;\n\n var debug = _dereq_(\"./debuggability\")(Promise, Context);\n\n var CapturedTrace = debug.CapturedTrace;\n\n var PassThroughHandlerContext = _dereq_(\"./finally\")(Promise, tryConvertToPromise, NEXT_FILTER);\n\n var catchFilter = _dereq_(\"./catch_filter\")(NEXT_FILTER);\n\n var nodebackForPromise = _dereq_(\"./nodeback\");\n\n var errorObj = util.errorObj;\n var tryCatch = util.tryCatch;\n\n function check(self, executor) {\n if (self == null || self.constructor !== Promise) {\n throw new TypeError(\"the promise constructor cannot be invoked directly\\n\\n See http://goo.gl/MqrFmX\\n\");\n }\n\n if (typeof executor !== \"function\") {\n throw new TypeError(\"expecting a function but got \" + util.classString(executor));\n }\n }\n\n function Promise(executor) {\n if (executor !== INTERNAL) {\n check(this, executor);\n }\n\n this._bitField = 0;\n this._fulfillmentHandler0 = undefined;\n this._rejectionHandler0 = undefined;\n this._promise0 = undefined;\n this._receiver0 = undefined;\n\n this._resolveFromExecutor(executor);\n\n this._promiseCreated();\n\n this._fireEvent(\"promiseCreated\", this);\n }\n\n Promise.prototype.toString = function () {\n return \"[object Promise]\";\n };\n\n Promise.prototype.caught = Promise.prototype[\"catch\"] = function (fn) {\n var len = arguments.length;\n\n if (len > 1) {\n var catchInstances = new Array(len - 1),\n j = 0,\n i;\n\n for (i = 0; i < len - 1; ++i) {\n var item = arguments[i];\n\n if (util.isObject(item)) {\n catchInstances[j++] = item;\n } else {\n return apiRejection(\"Catch statement predicate: \" + \"expecting an object but got \" + util.classString(item));\n }\n }\n\n catchInstances.length = j;\n fn = arguments[i];\n return this.then(undefined, catchFilter(catchInstances, fn, this));\n }\n\n return this.then(undefined, fn);\n };\n\n Promise.prototype.reflect = function () {\n return this._then(reflectHandler, reflectHandler, undefined, this, undefined);\n };\n\n Promise.prototype.then = function (didFulfill, didReject) {\n if (debug.warnings() && arguments.length > 0 && typeof didFulfill !== \"function\" && typeof didReject !== \"function\") {\n var msg = \".then() only accepts functions but was passed: \" + util.classString(didFulfill);\n\n if (arguments.length > 1) {\n msg += \", \" + util.classString(didReject);\n }\n\n this._warn(msg);\n }\n\n return this._then(didFulfill, didReject, undefined, undefined, undefined);\n };\n\n Promise.prototype.done = function (didFulfill, didReject) {\n var promise = this._then(didFulfill, didReject, undefined, undefined, undefined);\n\n promise._setIsFinal();\n };\n\n Promise.prototype.spread = function (fn) {\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n\n return this.all()._then(fn, undefined, undefined, APPLY, undefined);\n };\n\n Promise.prototype.toJSON = function () {\n var ret = {\n isFulfilled: false,\n isRejected: false,\n fulfillmentValue: undefined,\n rejectionReason: undefined\n };\n\n if (this.isFulfilled()) {\n ret.fulfillmentValue = this.value();\n ret.isFulfilled = true;\n } else if (this.isRejected()) {\n ret.rejectionReason = this.reason();\n ret.isRejected = true;\n }\n\n return ret;\n };\n\n Promise.prototype.all = function () {\n if (arguments.length > 0) {\n this._warn(\".all() was passed arguments but it does not take any\");\n }\n\n return new PromiseArray(this).promise();\n };\n\n Promise.prototype.error = function (fn) {\n return this.caught(util.originatesFromRejection, fn);\n };\n\n Promise.getNewLibraryCopy = module.exports;\n\n Promise.is = function (val) {\n return val instanceof Promise;\n };\n\n Promise.fromNode = Promise.fromCallback = function (fn) {\n var ret = new Promise(INTERNAL);\n\n ret._captureStackTrace();\n\n var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs : false;\n var result = tryCatch(fn)(nodebackForPromise(ret, multiArgs));\n\n if (result === errorObj) {\n ret._rejectCallback(result.e, true);\n }\n\n if (!ret._isFateSealed()) ret._setAsyncGuaranteed();\n return ret;\n };\n\n Promise.all = function (promises) {\n return new PromiseArray(promises).promise();\n };\n\n Promise.cast = function (obj) {\n var ret = tryConvertToPromise(obj);\n\n if (!(ret instanceof Promise)) {\n ret = new Promise(INTERNAL);\n\n ret._captureStackTrace();\n\n ret._setFulfilled();\n\n ret._rejectionHandler0 = obj;\n }\n\n return ret;\n };\n\n Promise.resolve = Promise.fulfilled = Promise.cast;\n\n Promise.reject = Promise.rejected = function (reason) {\n var ret = new Promise(INTERNAL);\n\n ret._captureStackTrace();\n\n ret._rejectCallback(reason, true);\n\n return ret;\n };\n\n Promise.setScheduler = function (fn) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"expecting a function but got \" + util.classString(fn));\n }\n\n return async.setScheduler(fn);\n };\n\n Promise.prototype._then = function (didFulfill, didReject, _, receiver, internalData) {\n var haveInternalData = internalData !== undefined;\n var promise = haveInternalData ? internalData : new Promise(INTERNAL);\n\n var target = this._target();\n\n var bitField = target._bitField;\n\n if (!haveInternalData) {\n promise._propagateFrom(this, 3);\n\n promise._captureStackTrace();\n\n if (receiver === undefined && (this._bitField & 2097152) !== 0) {\n if (!((bitField & 50397184) === 0)) {\n receiver = this._boundValue();\n } else {\n receiver = target === this ? undefined : this._boundTo;\n }\n }\n\n this._fireEvent(\"promiseChained\", this, promise);\n }\n\n var domain = getDomain();\n\n if (!((bitField & 50397184) === 0)) {\n var handler,\n value,\n settler = target._settlePromiseCtx;\n\n if ((bitField & 33554432) !== 0) {\n value = target._rejectionHandler0;\n handler = didFulfill;\n } else if ((bitField & 16777216) !== 0) {\n value = target._fulfillmentHandler0;\n handler = didReject;\n\n target._unsetRejectionIsUnhandled();\n } else {\n settler = target._settlePromiseLateCancellationObserver;\n value = new CancellationError(\"late cancellation observer\");\n\n target._attachExtraTrace(value);\n\n handler = didReject;\n }\n\n async.invoke(settler, target, {\n handler: domain === null ? handler : typeof handler === \"function\" && util.domainBind(domain, handler),\n promise: promise,\n receiver: receiver,\n value: value\n });\n } else {\n target._addCallbacks(didFulfill, didReject, promise, receiver, domain);\n }\n\n return promise;\n };\n\n Promise.prototype._length = function () {\n return this._bitField & 65535;\n };\n\n Promise.prototype._isFateSealed = function () {\n return (this._bitField & 117506048) !== 0;\n };\n\n Promise.prototype._isFollowing = function () {\n return (this._bitField & 67108864) === 67108864;\n };\n\n Promise.prototype._setLength = function (len) {\n this._bitField = this._bitField & -65536 | len & 65535;\n };\n\n Promise.prototype._setFulfilled = function () {\n this._bitField = this._bitField | 33554432;\n\n this._fireEvent(\"promiseFulfilled\", this);\n };\n\n Promise.prototype._setRejected = function () {\n this._bitField = this._bitField | 16777216;\n\n this._fireEvent(\"promiseRejected\", this);\n };\n\n Promise.prototype._setFollowing = function () {\n this._bitField = this._bitField | 67108864;\n\n this._fireEvent(\"promiseResolved\", this);\n };\n\n Promise.prototype._setIsFinal = function () {\n this._bitField = this._bitField | 4194304;\n };\n\n Promise.prototype._isFinal = function () {\n return (this._bitField & 4194304) > 0;\n };\n\n Promise.prototype._unsetCancelled = function () {\n this._bitField = this._bitField & ~65536;\n };\n\n Promise.prototype._setCancelled = function () {\n this._bitField = this._bitField | 65536;\n\n this._fireEvent(\"promiseCancelled\", this);\n };\n\n Promise.prototype._setWillBeCancelled = function () {\n this._bitField = this._bitField | 8388608;\n };\n\n Promise.prototype._setAsyncGuaranteed = function () {\n if (async.hasCustomScheduler()) return;\n this._bitField = this._bitField | 134217728;\n };\n\n Promise.prototype._receiverAt = function (index) {\n var ret = index === 0 ? this._receiver0 : this[index * 4 - 4 + 3];\n\n if (ret === UNDEFINED_BINDING) {\n return undefined;\n } else if (ret === undefined && this._isBound()) {\n return this._boundValue();\n }\n\n return ret;\n };\n\n Promise.prototype._promiseAt = function (index) {\n return this[index * 4 - 4 + 2];\n };\n\n Promise.prototype._fulfillmentHandlerAt = function (index) {\n return this[index * 4 - 4 + 0];\n };\n\n Promise.prototype._rejectionHandlerAt = function (index) {\n return this[index * 4 - 4 + 1];\n };\n\n Promise.prototype._boundValue = function () {};\n\n Promise.prototype._migrateCallback0 = function (follower) {\n var bitField = follower._bitField;\n var fulfill = follower._fulfillmentHandler0;\n var reject = follower._rejectionHandler0;\n var promise = follower._promise0;\n\n var receiver = follower._receiverAt(0);\n\n if (receiver === undefined) receiver = UNDEFINED_BINDING;\n\n this._addCallbacks(fulfill, reject, promise, receiver, null);\n };\n\n Promise.prototype._migrateCallbackAt = function (follower, index) {\n var fulfill = follower._fulfillmentHandlerAt(index);\n\n var reject = follower._rejectionHandlerAt(index);\n\n var promise = follower._promiseAt(index);\n\n var receiver = follower._receiverAt(index);\n\n if (receiver === undefined) receiver = UNDEFINED_BINDING;\n\n this._addCallbacks(fulfill, reject, promise, receiver, null);\n };\n\n Promise.prototype._addCallbacks = function (fulfill, reject, promise, receiver, domain) {\n var index = this._length();\n\n if (index >= 65535 - 4) {\n index = 0;\n\n this._setLength(0);\n }\n\n if (index === 0) {\n this._promise0 = promise;\n this._receiver0 = receiver;\n\n if (typeof fulfill === \"function\") {\n this._fulfillmentHandler0 = domain === null ? fulfill : util.domainBind(domain, fulfill);\n }\n\n if (typeof reject === \"function\") {\n this._rejectionHandler0 = domain === null ? reject : util.domainBind(domain, reject);\n }\n } else {\n var base = index * 4 - 4;\n this[base + 2] = promise;\n this[base + 3] = receiver;\n\n if (typeof fulfill === \"function\") {\n this[base + 0] = domain === null ? fulfill : util.domainBind(domain, fulfill);\n }\n\n if (typeof reject === \"function\") {\n this[base + 1] = domain === null ? reject : util.domainBind(domain, reject);\n }\n }\n\n this._setLength(index + 1);\n\n return index;\n };\n\n Promise.prototype._proxy = function (proxyable, arg) {\n this._addCallbacks(undefined, undefined, arg, proxyable, null);\n };\n\n Promise.prototype._resolveCallback = function (value, shouldBind) {\n if ((this._bitField & 117506048) !== 0) return;\n if (value === this) return this._rejectCallback(makeSelfResolutionError(), false);\n var maybePromise = tryConvertToPromise(value, this);\n if (!(maybePromise instanceof Promise)) return this._fulfill(value);\n if (shouldBind) this._propagateFrom(maybePromise, 2);\n\n var promise = maybePromise._target();\n\n if (promise === this) {\n this._reject(makeSelfResolutionError());\n\n return;\n }\n\n var bitField = promise._bitField;\n\n if ((bitField & 50397184) === 0) {\n var len = this._length();\n\n if (len > 0) promise._migrateCallback0(this);\n\n for (var i = 1; i < len; ++i) {\n promise._migrateCallbackAt(this, i);\n }\n\n this._setFollowing();\n\n this._setLength(0);\n\n this._setFollowee(promise);\n } else if ((bitField & 33554432) !== 0) {\n this._fulfill(promise._value());\n } else if ((bitField & 16777216) !== 0) {\n this._reject(promise._reason());\n } else {\n var reason = new CancellationError(\"late cancellation observer\");\n\n promise._attachExtraTrace(reason);\n\n this._reject(reason);\n }\n };\n\n Promise.prototype._rejectCallback = function (reason, synchronous, ignoreNonErrorWarnings) {\n var trace = util.ensureErrorObject(reason);\n var hasStack = trace === reason;\n\n if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) {\n var message = \"a promise was rejected with a non-error: \" + util.classString(reason);\n\n this._warn(message, true);\n }\n\n this._attachExtraTrace(trace, synchronous ? hasStack : false);\n\n this._reject(reason);\n };\n\n Promise.prototype._resolveFromExecutor = function (executor) {\n if (executor === INTERNAL) return;\n var promise = this;\n\n this._captureStackTrace();\n\n this._pushContext();\n\n var synchronous = true;\n\n var r = this._execute(executor, function (value) {\n promise._resolveCallback(value);\n }, function (reason) {\n promise._rejectCallback(reason, synchronous);\n });\n\n synchronous = false;\n\n this._popContext();\n\n if (r !== undefined) {\n promise._rejectCallback(r, true);\n }\n };\n\n Promise.prototype._settlePromiseFromHandler = function (handler, receiver, value, promise) {\n var bitField = promise._bitField;\n if ((bitField & 65536) !== 0) return;\n\n promise._pushContext();\n\n var x;\n\n if (receiver === APPLY) {\n if (!value || typeof value.length !== \"number\") {\n x = errorObj;\n x.e = new TypeError(\"cannot .spread() a non-array: \" + util.classString(value));\n } else {\n x = tryCatch(handler).apply(this._boundValue(), value);\n }\n } else {\n x = tryCatch(handler).call(receiver, value);\n }\n\n var promiseCreated = promise._popContext();\n\n bitField = promise._bitField;\n if ((bitField & 65536) !== 0) return;\n\n if (x === NEXT_FILTER) {\n promise._reject(value);\n } else if (x === errorObj) {\n promise._rejectCallback(x.e, false);\n } else {\n debug.checkForgottenReturns(x, promiseCreated, \"\", promise, this);\n\n promise._resolveCallback(x);\n }\n };\n\n Promise.prototype._target = function () {\n var ret = this;\n\n while (ret._isFollowing()) {\n ret = ret._followee();\n }\n\n return ret;\n };\n\n Promise.prototype._followee = function () {\n return this._rejectionHandler0;\n };\n\n Promise.prototype._setFollowee = function (promise) {\n this._rejectionHandler0 = promise;\n };\n\n Promise.prototype._settlePromise = function (promise, handler, receiver, value) {\n var isPromise = promise instanceof Promise;\n var bitField = this._bitField;\n var asyncGuaranteed = (bitField & 134217728) !== 0;\n\n if ((bitField & 65536) !== 0) {\n if (isPromise) promise._invokeInternalOnCancel();\n\n if (receiver instanceof PassThroughHandlerContext && receiver.isFinallyHandler()) {\n receiver.cancelPromise = promise;\n\n if (tryCatch(handler).call(receiver, value) === errorObj) {\n promise._reject(errorObj.e);\n }\n } else if (handler === reflectHandler) {\n promise._fulfill(reflectHandler.call(receiver));\n } else if (receiver instanceof Proxyable) {\n receiver._promiseCancelled(promise);\n } else if (isPromise || promise instanceof PromiseArray) {\n promise._cancel();\n } else {\n receiver.cancel();\n }\n } else if (typeof handler === \"function\") {\n if (!isPromise) {\n handler.call(receiver, value, promise);\n } else {\n if (asyncGuaranteed) promise._setAsyncGuaranteed();\n\n this._settlePromiseFromHandler(handler, receiver, value, promise);\n }\n } else if (receiver instanceof Proxyable) {\n if (!receiver._isResolved()) {\n if ((bitField & 33554432) !== 0) {\n receiver._promiseFulfilled(value, promise);\n } else {\n receiver._promiseRejected(value, promise);\n }\n }\n } else if (isPromise) {\n if (asyncGuaranteed) promise._setAsyncGuaranteed();\n\n if ((bitField & 33554432) !== 0) {\n promise._fulfill(value);\n } else {\n promise._reject(value);\n }\n }\n };\n\n Promise.prototype._settlePromiseLateCancellationObserver = function (ctx) {\n var handler = ctx.handler;\n var promise = ctx.promise;\n var receiver = ctx.receiver;\n var value = ctx.value;\n\n if (typeof handler === \"function\") {\n if (!(promise instanceof Promise)) {\n handler.call(receiver, value, promise);\n } else {\n this._settlePromiseFromHandler(handler, receiver, value, promise);\n }\n } else if (promise instanceof Promise) {\n promise._reject(value);\n }\n };\n\n Promise.prototype._settlePromiseCtx = function (ctx) {\n this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value);\n };\n\n Promise.prototype._settlePromise0 = function (handler, value, bitField) {\n var promise = this._promise0;\n\n var receiver = this._receiverAt(0);\n\n this._promise0 = undefined;\n this._receiver0 = undefined;\n\n this._settlePromise(promise, handler, receiver, value);\n };\n\n Promise.prototype._clearCallbackDataAtIndex = function (index) {\n var base = index * 4 - 4;\n this[base + 2] = this[base + 3] = this[base + 0] = this[base + 1] = undefined;\n };\n\n Promise.prototype._fulfill = function (value) {\n var bitField = this._bitField;\n if ((bitField & 117506048) >>> 16) return;\n\n if (value === this) {\n var err = makeSelfResolutionError();\n\n this._attachExtraTrace(err);\n\n return this._reject(err);\n }\n\n this._setFulfilled();\n\n this._rejectionHandler0 = value;\n\n if ((bitField & 65535) > 0) {\n if ((bitField & 134217728) !== 0) {\n this._settlePromises();\n } else {\n async.settlePromises(this);\n }\n\n this._dereferenceTrace();\n }\n };\n\n Promise.prototype._reject = function (reason) {\n var bitField = this._bitField;\n if ((bitField & 117506048) >>> 16) return;\n\n this._setRejected();\n\n this._fulfillmentHandler0 = reason;\n\n if (this._isFinal()) {\n return async.fatalError(reason, util.isNode);\n }\n\n if ((bitField & 65535) > 0) {\n async.settlePromises(this);\n } else {\n this._ensurePossibleRejectionHandled();\n }\n };\n\n Promise.prototype._fulfillPromises = function (len, value) {\n for (var i = 1; i < len; i++) {\n var handler = this._fulfillmentHandlerAt(i);\n\n var promise = this._promiseAt(i);\n\n var receiver = this._receiverAt(i);\n\n this._clearCallbackDataAtIndex(i);\n\n this._settlePromise(promise, handler, receiver, value);\n }\n };\n\n Promise.prototype._rejectPromises = function (len, reason) {\n for (var i = 1; i < len; i++) {\n var handler = this._rejectionHandlerAt(i);\n\n var promise = this._promiseAt(i);\n\n var receiver = this._receiverAt(i);\n\n this._clearCallbackDataAtIndex(i);\n\n this._settlePromise(promise, handler, receiver, reason);\n }\n };\n\n Promise.prototype._settlePromises = function () {\n var bitField = this._bitField;\n var len = bitField & 65535;\n\n if (len > 0) {\n if ((bitField & 16842752) !== 0) {\n var reason = this._fulfillmentHandler0;\n\n this._settlePromise0(this._rejectionHandler0, reason, bitField);\n\n this._rejectPromises(len, reason);\n } else {\n var value = this._rejectionHandler0;\n\n this._settlePromise0(this._fulfillmentHandler0, value, bitField);\n\n this._fulfillPromises(len, value);\n }\n\n this._setLength(0);\n }\n\n this._clearCancellationData();\n };\n\n Promise.prototype._settledValue = function () {\n var bitField = this._bitField;\n\n if ((bitField & 33554432) !== 0) {\n return this._rejectionHandler0;\n } else if ((bitField & 16777216) !== 0) {\n return this._fulfillmentHandler0;\n }\n };\n\n function deferResolve(v) {\n this.promise._resolveCallback(v);\n }\n\n function deferReject(v) {\n this.promise._rejectCallback(v, false);\n }\n\n Promise.defer = Promise.pending = function () {\n debug.deprecated(\"Promise.defer\", \"new Promise\");\n var promise = new Promise(INTERNAL);\n return {\n promise: promise,\n resolve: deferResolve,\n reject: deferReject\n };\n };\n\n util.notEnumerableProp(Promise, \"_makeSelfResolutionError\", makeSelfResolutionError);\n\n _dereq_(\"./method\")(Promise, INTERNAL, tryConvertToPromise, apiRejection, debug);\n\n _dereq_(\"./bind\")(Promise, INTERNAL, tryConvertToPromise, debug);\n\n _dereq_(\"./cancel\")(Promise, PromiseArray, apiRejection, debug);\n\n _dereq_(\"./direct_resolve\")(Promise);\n\n _dereq_(\"./synchronous_inspection\")(Promise);\n\n _dereq_(\"./join\")(Promise, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain);\n\n Promise.Promise = Promise;\n Promise.version = \"3.5.4\";\n\n _dereq_('./map.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);\n\n _dereq_('./call_get.js')(Promise);\n\n _dereq_('./using.js')(Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug);\n\n _dereq_('./timers.js')(Promise, INTERNAL, debug);\n\n _dereq_('./generators.js')(Promise, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug);\n\n _dereq_('./nodeify.js')(Promise);\n\n _dereq_('./promisify.js')(Promise, INTERNAL);\n\n _dereq_('./props.js')(Promise, PromiseArray, tryConvertToPromise, apiRejection);\n\n _dereq_('./race.js')(Promise, INTERNAL, tryConvertToPromise, apiRejection);\n\n _dereq_('./reduce.js')(Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug);\n\n _dereq_('./settle.js')(Promise, PromiseArray, debug);\n\n _dereq_('./some.js')(Promise, PromiseArray, apiRejection);\n\n _dereq_('./filter.js')(Promise, INTERNAL);\n\n _dereq_('./each.js')(Promise, INTERNAL);\n\n _dereq_('./any.js')(Promise);\n\n util.toFastProperties(Promise);\n util.toFastProperties(Promise.prototype);\n\n function fillTypes(value) {\n var p = new Promise(INTERNAL);\n p._fulfillmentHandler0 = value;\n p._rejectionHandler0 = value;\n p._promise0 = value;\n p._receiver0 = value;\n } // Complete slack tracking, opt out of field-type tracking and \n // stabilize map \n\n\n fillTypes({\n a: 1\n });\n fillTypes({\n b: 2\n });\n fillTypes({\n c: 3\n });\n fillTypes(1);\n fillTypes(function () {});\n fillTypes(undefined);\n fillTypes(false);\n fillTypes(new Promise(INTERNAL));\n debug.setBounds(Async.firstLineError, util.lastLineError);\n return Promise;\n };\n }, {\n \"./any.js\": 1,\n \"./async\": 2,\n \"./bind\": 3,\n \"./call_get.js\": 5,\n \"./cancel\": 6,\n \"./catch_filter\": 7,\n \"./context\": 8,\n \"./debuggability\": 9,\n \"./direct_resolve\": 10,\n \"./each.js\": 11,\n \"./errors\": 12,\n \"./es5\": 13,\n \"./filter.js\": 14,\n \"./finally\": 15,\n \"./generators.js\": 16,\n \"./join\": 17,\n \"./map.js\": 18,\n \"./method\": 19,\n \"./nodeback\": 20,\n \"./nodeify.js\": 21,\n \"./promise_array\": 23,\n \"./promisify.js\": 24,\n \"./props.js\": 25,\n \"./race.js\": 27,\n \"./reduce.js\": 28,\n \"./settle.js\": 30,\n \"./some.js\": 31,\n \"./synchronous_inspection\": 32,\n \"./thenables\": 33,\n \"./timers.js\": 34,\n \"./using.js\": 35,\n \"./util\": 36\n }],\n 23: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, INTERNAL, tryConvertToPromise, apiRejection, Proxyable) {\n var util = _dereq_(\"./util\");\n\n var isArray = util.isArray;\n\n function toResolutionValue(val) {\n switch (val) {\n case -2:\n return [];\n\n case -3:\n return {};\n\n case -6:\n return new Map();\n }\n }\n\n function PromiseArray(values) {\n var promise = this._promise = new Promise(INTERNAL);\n\n if (values instanceof Promise) {\n promise._propagateFrom(values, 3);\n }\n\n promise._setOnCancel(this);\n\n this._values = values;\n this._length = 0;\n this._totalResolved = 0;\n\n this._init(undefined, -2);\n }\n\n util.inherits(PromiseArray, Proxyable);\n\n PromiseArray.prototype.length = function () {\n return this._length;\n };\n\n PromiseArray.prototype.promise = function () {\n return this._promise;\n };\n\n PromiseArray.prototype._init = function init(_, resolveValueIfEmpty) {\n var values = tryConvertToPromise(this._values, this._promise);\n\n if (values instanceof Promise) {\n values = values._target();\n var bitField = values._bitField;\n ;\n this._values = values;\n\n if ((bitField & 50397184) === 0) {\n this._promise._setAsyncGuaranteed();\n\n return values._then(init, this._reject, undefined, this, resolveValueIfEmpty);\n } else if ((bitField & 33554432) !== 0) {\n values = values._value();\n } else if ((bitField & 16777216) !== 0) {\n return this._reject(values._reason());\n } else {\n return this._cancel();\n }\n }\n\n values = util.asArray(values);\n\n if (values === null) {\n var err = apiRejection(\"expecting an array or an iterable object but got \" + util.classString(values)).reason();\n\n this._promise._rejectCallback(err, false);\n\n return;\n }\n\n if (values.length === 0) {\n if (resolveValueIfEmpty === -5) {\n this._resolveEmptyArray();\n } else {\n this._resolve(toResolutionValue(resolveValueIfEmpty));\n }\n\n return;\n }\n\n this._iterate(values);\n };\n\n PromiseArray.prototype._iterate = function (values) {\n var len = this.getActualLength(values.length);\n this._length = len;\n this._values = this.shouldCopyValues() ? new Array(len) : this._values;\n var result = this._promise;\n var isResolved = false;\n var bitField = null;\n\n for (var i = 0; i < len; ++i) {\n var maybePromise = tryConvertToPromise(values[i], result);\n\n if (maybePromise instanceof Promise) {\n maybePromise = maybePromise._target();\n bitField = maybePromise._bitField;\n } else {\n bitField = null;\n }\n\n if (isResolved) {\n if (bitField !== null) {\n maybePromise.suppressUnhandledRejections();\n }\n } else if (bitField !== null) {\n if ((bitField & 50397184) === 0) {\n maybePromise._proxy(this, i);\n\n this._values[i] = maybePromise;\n } else if ((bitField & 33554432) !== 0) {\n isResolved = this._promiseFulfilled(maybePromise._value(), i);\n } else if ((bitField & 16777216) !== 0) {\n isResolved = this._promiseRejected(maybePromise._reason(), i);\n } else {\n isResolved = this._promiseCancelled(i);\n }\n } else {\n isResolved = this._promiseFulfilled(maybePromise, i);\n }\n }\n\n if (!isResolved) result._setAsyncGuaranteed();\n };\n\n PromiseArray.prototype._isResolved = function () {\n return this._values === null;\n };\n\n PromiseArray.prototype._resolve = function (value) {\n this._values = null;\n\n this._promise._fulfill(value);\n };\n\n PromiseArray.prototype._cancel = function () {\n if (this._isResolved() || !this._promise._isCancellable()) return;\n this._values = null;\n\n this._promise._cancel();\n };\n\n PromiseArray.prototype._reject = function (reason) {\n this._values = null;\n\n this._promise._rejectCallback(reason, false);\n };\n\n PromiseArray.prototype._promiseFulfilled = function (value, index) {\n this._values[index] = value;\n var totalResolved = ++this._totalResolved;\n\n if (totalResolved >= this._length) {\n this._resolve(this._values);\n\n return true;\n }\n\n return false;\n };\n\n PromiseArray.prototype._promiseCancelled = function () {\n this._cancel();\n\n return true;\n };\n\n PromiseArray.prototype._promiseRejected = function (reason) {\n this._totalResolved++;\n\n this._reject(reason);\n\n return true;\n };\n\n PromiseArray.prototype._resultCancelled = function () {\n if (this._isResolved()) return;\n var values = this._values;\n\n this._cancel();\n\n if (values instanceof Promise) {\n values.cancel();\n } else {\n for (var i = 0; i < values.length; ++i) {\n if (values[i] instanceof Promise) {\n values[i].cancel();\n }\n }\n }\n };\n\n PromiseArray.prototype.shouldCopyValues = function () {\n return true;\n };\n\n PromiseArray.prototype.getActualLength = function (len) {\n return len;\n };\n\n return PromiseArray;\n };\n }, {\n \"./util\": 36\n }],\n 24: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, INTERNAL) {\n var THIS = {};\n\n var util = _dereq_(\"./util\");\n\n var nodebackForPromise = _dereq_(\"./nodeback\");\n\n var withAppended = util.withAppended;\n var maybeWrapAsError = util.maybeWrapAsError;\n var canEvaluate = util.canEvaluate;\n\n var TypeError = _dereq_(\"./errors\").TypeError;\n\n var defaultSuffix = \"Async\";\n var defaultPromisified = {\n __isPromisified__: true\n };\n var noCopyProps = [\"arity\", \"length\", \"name\", \"arguments\", \"caller\", \"callee\", \"prototype\", \"__isPromisified__\"];\n var noCopyPropsPattern = new RegExp(\"^(?:\" + noCopyProps.join(\"|\") + \")$\");\n\n var defaultFilter = function defaultFilter(name) {\n return util.isIdentifier(name) && name.charAt(0) !== \"_\" && name !== \"constructor\";\n };\n\n function propsFilter(key) {\n return !noCopyPropsPattern.test(key);\n }\n\n function isPromisified(fn) {\n try {\n return fn.__isPromisified__ === true;\n } catch (e) {\n return false;\n }\n }\n\n function hasPromisified(obj, key, suffix) {\n var val = util.getDataPropertyOrDefault(obj, key + suffix, defaultPromisified);\n return val ? isPromisified(val) : false;\n }\n\n function checkValid(ret, suffix, suffixRegexp) {\n for (var i = 0; i < ret.length; i += 2) {\n var key = ret[i];\n\n if (suffixRegexp.test(key)) {\n var keyWithoutAsyncSuffix = key.replace(suffixRegexp, \"\");\n\n for (var j = 0; j < ret.length; j += 2) {\n if (ret[j] === keyWithoutAsyncSuffix) {\n throw new TypeError(\"Cannot promisify an API that has normal methods with '%s'-suffix\\n\\n See http://goo.gl/MqrFmX\\n\".replace(\"%s\", suffix));\n }\n }\n }\n }\n }\n\n function promisifiableMethods(obj, suffix, suffixRegexp, filter) {\n var keys = util.inheritedDataKeys(obj);\n var ret = [];\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var value = obj[key];\n var passesDefaultFilter = filter === defaultFilter ? true : defaultFilter(key, value, obj);\n\n if (typeof value === \"function\" && !isPromisified(value) && !hasPromisified(obj, key, suffix) && filter(key, value, obj, passesDefaultFilter)) {\n ret.push(key, value);\n }\n }\n\n checkValid(ret, suffix, suffixRegexp);\n return ret;\n }\n\n var escapeIdentRegex = function escapeIdentRegex(str) {\n return str.replace(/([$])/, \"\\\\$\");\n };\n\n var makeNodePromisifiedEval;\n\n if (!true) {\n var switchCaseArgumentOrder = function switchCaseArgumentOrder(likelyArgumentCount) {\n var ret = [likelyArgumentCount];\n var min = Math.max(0, likelyArgumentCount - 1 - 3);\n\n for (var i = likelyArgumentCount - 1; i >= min; --i) {\n ret.push(i);\n }\n\n for (var i = likelyArgumentCount + 1; i <= 3; ++i) {\n ret.push(i);\n }\n\n return ret;\n };\n\n var argumentSequence = function argumentSequence(argumentCount) {\n return util.filledRange(argumentCount, \"_arg\", \"\");\n };\n\n var parameterDeclaration = function parameterDeclaration(parameterCount) {\n return util.filledRange(Math.max(parameterCount, 3), \"_arg\", \"\");\n };\n\n var parameterCount = function parameterCount(fn) {\n if (typeof fn.length === \"number\") {\n return Math.max(Math.min(fn.length, 1023 + 1), 0);\n }\n\n return 0;\n };\n\n makeNodePromisifiedEval = function makeNodePromisifiedEval(callback, receiver, originalName, fn, _, multiArgs) {\n var newParameterCount = Math.max(0, parameterCount(fn) - 1);\n var argumentOrder = switchCaseArgumentOrder(newParameterCount);\n var shouldProxyThis = typeof callback === \"string\" || receiver === THIS;\n\n function generateCallForArgumentCount(count) {\n var args = argumentSequence(count).join(\", \");\n var comma = count > 0 ? \", \" : \"\";\n var ret;\n\n if (shouldProxyThis) {\n ret = \"ret = callback.call(this, {{args}}, nodeback); break;\\n\";\n } else {\n ret = receiver === undefined ? \"ret = callback({{args}}, nodeback); break;\\n\" : \"ret = callback.call(receiver, {{args}}, nodeback); break;\\n\";\n }\n\n return ret.replace(\"{{args}}\", args).replace(\", \", comma);\n }\n\n function generateArgumentSwitchCase() {\n var ret = \"\";\n\n for (var i = 0; i < argumentOrder.length; ++i) {\n ret += \"case \" + argumentOrder[i] + \":\" + generateCallForArgumentCount(argumentOrder[i]);\n }\n\n ret += \" \\n\\\n default: \\n\\\n var args = new Array(len + 1); \\n\\\n var i = 0; \\n\\\n for (var i = 0; i < len; ++i) { \\n\\\n args[i] = arguments[i]; \\n\\\n } \\n\\\n args[i] = nodeback; \\n\\\n [CodeForCall] \\n\\\n break; \\n\\\n \".replace(\"[CodeForCall]\", shouldProxyThis ? \"ret = callback.apply(this, args);\\n\" : \"ret = callback.apply(receiver, args);\\n\");\n return ret;\n }\n\n var getFunctionCode = typeof callback === \"string\" ? \"this != null ? this['\" + callback + \"'] : fn\" : \"fn\";\n var body = \"'use strict'; \\n\\\n var ret = function (Parameters) { \\n\\\n 'use strict'; \\n\\\n var len = arguments.length; \\n\\\n var promise = new Promise(INTERNAL); \\n\\\n promise._captureStackTrace(); \\n\\\n var nodeback = nodebackForPromise(promise, \" + multiArgs + \"); \\n\\\n var ret; \\n\\\n var callback = tryCatch([GetFunctionCode]); \\n\\\n switch(len) { \\n\\\n [CodeForSwitchCase] \\n\\\n } \\n\\\n if (ret === errorObj) { \\n\\\n promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\\n\\\n } \\n\\\n if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \\n\\\n return promise; \\n\\\n }; \\n\\\n notEnumerableProp(ret, '__isPromisified__', true); \\n\\\n return ret; \\n\\\n \".replace(\"[CodeForSwitchCase]\", generateArgumentSwitchCase()).replace(\"[GetFunctionCode]\", getFunctionCode);\n body = body.replace(\"Parameters\", parameterDeclaration(newParameterCount));\n return new Function(\"Promise\", \"fn\", \"receiver\", \"withAppended\", \"maybeWrapAsError\", \"nodebackForPromise\", \"tryCatch\", \"errorObj\", \"notEnumerableProp\", \"INTERNAL\", body)(Promise, fn, receiver, withAppended, maybeWrapAsError, nodebackForPromise, util.tryCatch, util.errorObj, util.notEnumerableProp, INTERNAL);\n };\n }\n\n function makeNodePromisifiedClosure(callback, receiver, _, fn, __, multiArgs) {\n var defaultThis = function () {\n return this;\n }();\n\n var method = callback;\n\n if (typeof method === \"string\") {\n callback = fn;\n }\n\n function promisified() {\n var _receiver = receiver;\n if (receiver === THIS) _receiver = this;\n var promise = new Promise(INTERNAL);\n\n promise._captureStackTrace();\n\n var cb = typeof method === \"string\" && this !== defaultThis ? this[method] : callback;\n var fn = nodebackForPromise(promise, multiArgs);\n\n try {\n cb.apply(_receiver, withAppended(arguments, fn));\n } catch (e) {\n promise._rejectCallback(maybeWrapAsError(e), true, true);\n }\n\n if (!promise._isFateSealed()) promise._setAsyncGuaranteed();\n return promise;\n }\n\n util.notEnumerableProp(promisified, \"__isPromisified__\", true);\n return promisified;\n }\n\n var makeNodePromisified = canEvaluate ? makeNodePromisifiedEval : makeNodePromisifiedClosure;\n\n function promisifyAll(obj, suffix, filter, promisifier, multiArgs) {\n var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + \"$\");\n var methods = promisifiableMethods(obj, suffix, suffixRegexp, filter);\n\n for (var i = 0, len = methods.length; i < len; i += 2) {\n var key = methods[i];\n var fn = methods[i + 1];\n var promisifiedKey = key + suffix;\n\n if (promisifier === makeNodePromisified) {\n obj[promisifiedKey] = makeNodePromisified(key, THIS, key, fn, suffix, multiArgs);\n } else {\n var promisified = promisifier(fn, function () {\n return makeNodePromisified(key, THIS, key, fn, suffix, multiArgs);\n });\n util.notEnumerableProp(promisified, \"__isPromisified__\", true);\n obj[promisifiedKey] = promisified;\n }\n }\n\n util.toFastProperties(obj);\n return obj;\n }\n\n function promisify(callback, receiver, multiArgs) {\n return makeNodePromisified(callback, receiver, undefined, callback, null, multiArgs);\n }\n\n Promise.promisify = function (fn, options) {\n if (typeof fn !== \"function\") {\n throw new TypeError(\"expecting a function but got \" + util.classString(fn));\n }\n\n if (isPromisified(fn)) {\n return fn;\n }\n\n options = Object(options);\n var receiver = options.context === undefined ? THIS : options.context;\n var multiArgs = !!options.multiArgs;\n var ret = promisify(fn, receiver, multiArgs);\n util.copyDescriptors(fn, ret, propsFilter);\n return ret;\n };\n\n Promise.promisifyAll = function (target, options) {\n if (typeof target !== \"function\" && _typeof(target) !== \"object\") {\n throw new TypeError(\"the target of promisifyAll must be an object or a function\\n\\n See http://goo.gl/MqrFmX\\n\");\n }\n\n options = Object(options);\n var multiArgs = !!options.multiArgs;\n var suffix = options.suffix;\n if (typeof suffix !== \"string\") suffix = defaultSuffix;\n var filter = options.filter;\n if (typeof filter !== \"function\") filter = defaultFilter;\n var promisifier = options.promisifier;\n if (typeof promisifier !== \"function\") promisifier = makeNodePromisified;\n\n if (!util.isIdentifier(suffix)) {\n throw new RangeError(\"suffix must be a valid identifier\\n\\n See http://goo.gl/MqrFmX\\n\");\n }\n\n var keys = util.inheritedDataKeys(target);\n\n for (var i = 0; i < keys.length; ++i) {\n var value = target[keys[i]];\n\n if (keys[i] !== \"constructor\" && util.isClass(value)) {\n promisifyAll(value.prototype, suffix, filter, promisifier, multiArgs);\n promisifyAll(value, suffix, filter, promisifier, multiArgs);\n }\n }\n\n return promisifyAll(target, suffix, filter, promisifier, multiArgs);\n };\n };\n }, {\n \"./errors\": 12,\n \"./nodeback\": 20,\n \"./util\": 36\n }],\n 25: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, PromiseArray, tryConvertToPromise, apiRejection) {\n var util = _dereq_(\"./util\");\n\n var isObject = util.isObject;\n\n var es5 = _dereq_(\"./es5\");\n\n var Es6Map;\n if (typeof Map === \"function\") Es6Map = Map;\n\n var mapToEntries = function () {\n var index = 0;\n var size = 0;\n\n function extractEntry(value, key) {\n this[index] = value;\n this[index + size] = key;\n index++;\n }\n\n return function mapToEntries(map) {\n size = map.size;\n index = 0;\n var ret = new Array(map.size * 2);\n map.forEach(extractEntry, ret);\n return ret;\n };\n }();\n\n var entriesToMap = function entriesToMap(entries) {\n var ret = new Es6Map();\n var length = entries.length / 2 | 0;\n\n for (var i = 0; i < length; ++i) {\n var key = entries[length + i];\n var value = entries[i];\n ret.set(key, value);\n }\n\n return ret;\n };\n\n function PropertiesPromiseArray(obj) {\n var isMap = false;\n var entries;\n\n if (Es6Map !== undefined && obj instanceof Es6Map) {\n entries = mapToEntries(obj);\n isMap = true;\n } else {\n var keys = es5.keys(obj);\n var len = keys.length;\n entries = new Array(len * 2);\n\n for (var i = 0; i < len; ++i) {\n var key = keys[i];\n entries[i] = obj[key];\n entries[i + len] = key;\n }\n }\n\n this.constructor$(entries);\n this._isMap = isMap;\n\n this._init$(undefined, isMap ? -6 : -3);\n }\n\n util.inherits(PropertiesPromiseArray, PromiseArray);\n\n PropertiesPromiseArray.prototype._init = function () {};\n\n PropertiesPromiseArray.prototype._promiseFulfilled = function (value, index) {\n this._values[index] = value;\n var totalResolved = ++this._totalResolved;\n\n if (totalResolved >= this._length) {\n var val;\n\n if (this._isMap) {\n val = entriesToMap(this._values);\n } else {\n val = {};\n var keyOffset = this.length();\n\n for (var i = 0, len = this.length(); i < len; ++i) {\n val[this._values[i + keyOffset]] = this._values[i];\n }\n }\n\n this._resolve(val);\n\n return true;\n }\n\n return false;\n };\n\n PropertiesPromiseArray.prototype.shouldCopyValues = function () {\n return false;\n };\n\n PropertiesPromiseArray.prototype.getActualLength = function (len) {\n return len >> 1;\n };\n\n function props(promises) {\n var ret;\n var castValue = tryConvertToPromise(promises);\n\n if (!isObject(castValue)) {\n return apiRejection(\"cannot await properties of a non-object\\n\\n See http://goo.gl/MqrFmX\\n\");\n } else if (castValue instanceof Promise) {\n ret = castValue._then(Promise.props, undefined, undefined, undefined, undefined);\n } else {\n ret = new PropertiesPromiseArray(castValue).promise();\n }\n\n if (castValue instanceof Promise) {\n ret._propagateFrom(castValue, 2);\n }\n\n return ret;\n }\n\n Promise.prototype.props = function () {\n return props(this);\n };\n\n Promise.props = function (promises) {\n return props(promises);\n };\n };\n }, {\n \"./es5\": 13,\n \"./util\": 36\n }],\n 26: [function (_dereq_, module, exports) {\n \"use strict\";\n\n function arrayMove(src, srcIndex, dst, dstIndex, len) {\n for (var j = 0; j < len; ++j) {\n dst[j + dstIndex] = src[j + srcIndex];\n src[j + srcIndex] = void 0;\n }\n }\n\n function Queue(capacity) {\n this._capacity = capacity;\n this._length = 0;\n this._front = 0;\n }\n\n Queue.prototype._willBeOverCapacity = function (size) {\n return this._capacity < size;\n };\n\n Queue.prototype._pushOne = function (arg) {\n var length = this.length();\n\n this._checkCapacity(length + 1);\n\n var i = this._front + length & this._capacity - 1;\n this[i] = arg;\n this._length = length + 1;\n };\n\n Queue.prototype.push = function (fn, receiver, arg) {\n var length = this.length() + 3;\n\n if (this._willBeOverCapacity(length)) {\n this._pushOne(fn);\n\n this._pushOne(receiver);\n\n this._pushOne(arg);\n\n return;\n }\n\n var j = this._front + length - 3;\n\n this._checkCapacity(length);\n\n var wrapMask = this._capacity - 1;\n this[j + 0 & wrapMask] = fn;\n this[j + 1 & wrapMask] = receiver;\n this[j + 2 & wrapMask] = arg;\n this._length = length;\n };\n\n Queue.prototype.shift = function () {\n var front = this._front,\n ret = this[front];\n this[front] = undefined;\n this._front = front + 1 & this._capacity - 1;\n this._length--;\n return ret;\n };\n\n Queue.prototype.length = function () {\n return this._length;\n };\n\n Queue.prototype._checkCapacity = function (size) {\n if (this._capacity < size) {\n this._resizeTo(this._capacity << 1);\n }\n };\n\n Queue.prototype._resizeTo = function (capacity) {\n var oldCapacity = this._capacity;\n this._capacity = capacity;\n var front = this._front;\n var length = this._length;\n var moveItemsCount = front + length & oldCapacity - 1;\n arrayMove(this, 0, this, oldCapacity, moveItemsCount);\n };\n\n module.exports = Queue;\n }, {}],\n 27: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, INTERNAL, tryConvertToPromise, apiRejection) {\n var util = _dereq_(\"./util\");\n\n var raceLater = function raceLater(promise) {\n return promise.then(function (array) {\n return race(array, promise);\n });\n };\n\n function race(promises, parent) {\n var maybePromise = tryConvertToPromise(promises);\n\n if (maybePromise instanceof Promise) {\n return raceLater(maybePromise);\n } else {\n promises = util.asArray(promises);\n if (promises === null) return apiRejection(\"expecting an array or an iterable object but got \" + util.classString(promises));\n }\n\n var ret = new Promise(INTERNAL);\n\n if (parent !== undefined) {\n ret._propagateFrom(parent, 3);\n }\n\n var fulfill = ret._fulfill;\n var reject = ret._reject;\n\n for (var i = 0, len = promises.length; i < len; ++i) {\n var val = promises[i];\n\n if (val === undefined && !(i in promises)) {\n continue;\n }\n\n Promise.cast(val)._then(fulfill, reject, undefined, ret, null);\n }\n\n return ret;\n }\n\n Promise.race = function (promises) {\n return race(promises, undefined);\n };\n\n Promise.prototype.race = function () {\n return race(this, undefined);\n };\n };\n }, {\n \"./util\": 36\n }],\n 28: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug) {\n var getDomain = Promise._getDomain;\n\n var util = _dereq_(\"./util\");\n\n var tryCatch = util.tryCatch;\n\n function ReductionPromiseArray(promises, fn, initialValue, _each) {\n this.constructor$(promises);\n var domain = getDomain();\n this._fn = domain === null ? fn : util.domainBind(domain, fn);\n\n if (initialValue !== undefined) {\n initialValue = Promise.resolve(initialValue);\n\n initialValue._attachCancellationCallback(this);\n }\n\n this._initialValue = initialValue;\n this._currentCancellable = null;\n\n if (_each === INTERNAL) {\n this._eachValues = Array(this._length);\n } else if (_each === 0) {\n this._eachValues = null;\n } else {\n this._eachValues = undefined;\n }\n\n this._promise._captureStackTrace();\n\n this._init$(undefined, -5);\n }\n\n util.inherits(ReductionPromiseArray, PromiseArray);\n\n ReductionPromiseArray.prototype._gotAccum = function (accum) {\n if (this._eachValues !== undefined && this._eachValues !== null && accum !== INTERNAL) {\n this._eachValues.push(accum);\n }\n };\n\n ReductionPromiseArray.prototype._eachComplete = function (value) {\n if (this._eachValues !== null) {\n this._eachValues.push(value);\n }\n\n return this._eachValues;\n };\n\n ReductionPromiseArray.prototype._init = function () {};\n\n ReductionPromiseArray.prototype._resolveEmptyArray = function () {\n this._resolve(this._eachValues !== undefined ? this._eachValues : this._initialValue);\n };\n\n ReductionPromiseArray.prototype.shouldCopyValues = function () {\n return false;\n };\n\n ReductionPromiseArray.prototype._resolve = function (value) {\n this._promise._resolveCallback(value);\n\n this._values = null;\n };\n\n ReductionPromiseArray.prototype._resultCancelled = function (sender) {\n if (sender === this._initialValue) return this._cancel();\n if (this._isResolved()) return;\n\n this._resultCancelled$();\n\n if (this._currentCancellable instanceof Promise) {\n this._currentCancellable.cancel();\n }\n\n if (this._initialValue instanceof Promise) {\n this._initialValue.cancel();\n }\n };\n\n ReductionPromiseArray.prototype._iterate = function (values) {\n this._values = values;\n var value;\n var i;\n var length = values.length;\n\n if (this._initialValue !== undefined) {\n value = this._initialValue;\n i = 0;\n } else {\n value = Promise.resolve(values[0]);\n i = 1;\n }\n\n this._currentCancellable = value;\n\n if (!value.isRejected()) {\n for (; i < length; ++i) {\n var ctx = {\n accum: null,\n value: values[i],\n index: i,\n length: length,\n array: this\n };\n value = value._then(gotAccum, undefined, undefined, ctx, undefined);\n }\n }\n\n if (this._eachValues !== undefined) {\n value = value._then(this._eachComplete, undefined, undefined, this, undefined);\n }\n\n value._then(completed, completed, undefined, value, this);\n };\n\n Promise.prototype.reduce = function (fn, initialValue) {\n return reduce(this, fn, initialValue, null);\n };\n\n Promise.reduce = function (promises, fn, initialValue, _each) {\n return reduce(promises, fn, initialValue, _each);\n };\n\n function completed(valueOrReason, array) {\n if (this.isFulfilled()) {\n array._resolve(valueOrReason);\n } else {\n array._reject(valueOrReason);\n }\n }\n\n function reduce(promises, fn, initialValue, _each) {\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n\n var array = new ReductionPromiseArray(promises, fn, initialValue, _each);\n return array.promise();\n }\n\n function gotAccum(accum) {\n this.accum = accum;\n\n this.array._gotAccum(accum);\n\n var value = tryConvertToPromise(this.value, this.array._promise);\n\n if (value instanceof Promise) {\n this.array._currentCancellable = value;\n return value._then(gotValue, undefined, undefined, this, undefined);\n } else {\n return gotValue.call(this, value);\n }\n }\n\n function gotValue(value) {\n var array = this.array;\n var promise = array._promise;\n var fn = tryCatch(array._fn);\n\n promise._pushContext();\n\n var ret;\n\n if (array._eachValues !== undefined) {\n ret = fn.call(promise._boundValue(), value, this.index, this.length);\n } else {\n ret = fn.call(promise._boundValue(), this.accum, value, this.index, this.length);\n }\n\n if (ret instanceof Promise) {\n array._currentCancellable = ret;\n }\n\n var promiseCreated = promise._popContext();\n\n debug.checkForgottenReturns(ret, promiseCreated, array._eachValues !== undefined ? \"Promise.each\" : \"Promise.reduce\", promise);\n return ret;\n }\n };\n }, {\n \"./util\": 36\n }],\n 29: [function (_dereq_, module, exports) {\n \"use strict\";\n\n var util = _dereq_(\"./util\");\n\n var schedule;\n\n var noAsyncScheduler = function noAsyncScheduler() {\n throw new Error(\"No async scheduler available\\n\\n See http://goo.gl/MqrFmX\\n\");\n };\n\n var NativePromise = util.getNativePromise();\n\n if (util.isNode && typeof MutationObserver === \"undefined\") {\n var GlobalSetImmediate = global.setImmediate;\n var ProcessNextTick = process.nextTick;\n schedule = util.isRecentNode ? function (fn) {\n GlobalSetImmediate.call(global, fn);\n } : function (fn) {\n ProcessNextTick.call(process, fn);\n };\n } else if (typeof NativePromise === \"function\" && typeof NativePromise.resolve === \"function\") {\n var nativePromise = NativePromise.resolve();\n\n schedule = function schedule(fn) {\n nativePromise.then(fn);\n };\n } else if (typeof MutationObserver !== \"undefined\" && !(typeof window !== \"undefined\" && window.navigator && (window.navigator.standalone || window.cordova))) {\n schedule = function () {\n var div = document.createElement(\"div\");\n var opts = {\n attributes: true\n };\n var toggleScheduled = false;\n var div2 = document.createElement(\"div\");\n var o2 = new MutationObserver(function () {\n div.classList.toggle(\"foo\");\n toggleScheduled = false;\n });\n o2.observe(div2, opts);\n\n var scheduleToggle = function scheduleToggle() {\n if (toggleScheduled) return;\n toggleScheduled = true;\n div2.classList.toggle(\"foo\");\n };\n\n return function schedule(fn) {\n var o = new MutationObserver(function () {\n o.disconnect();\n fn();\n });\n o.observe(div, opts);\n scheduleToggle();\n };\n }();\n } else if (typeof setImmediate !== \"undefined\") {\n schedule = function schedule(fn) {\n setImmediate(fn);\n };\n } else if (typeof setTimeout !== \"undefined\") {\n schedule = function schedule(fn) {\n setTimeout(fn, 0);\n };\n } else {\n schedule = noAsyncScheduler;\n }\n\n module.exports = schedule;\n }, {\n \"./util\": 36\n }],\n 30: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, PromiseArray, debug) {\n var PromiseInspection = Promise.PromiseInspection;\n\n var util = _dereq_(\"./util\");\n\n function SettledPromiseArray(values) {\n this.constructor$(values);\n }\n\n util.inherits(SettledPromiseArray, PromiseArray);\n\n SettledPromiseArray.prototype._promiseResolved = function (index, inspection) {\n this._values[index] = inspection;\n var totalResolved = ++this._totalResolved;\n\n if (totalResolved >= this._length) {\n this._resolve(this._values);\n\n return true;\n }\n\n return false;\n };\n\n SettledPromiseArray.prototype._promiseFulfilled = function (value, index) {\n var ret = new PromiseInspection();\n ret._bitField = 33554432;\n ret._settledValueField = value;\n return this._promiseResolved(index, ret);\n };\n\n SettledPromiseArray.prototype._promiseRejected = function (reason, index) {\n var ret = new PromiseInspection();\n ret._bitField = 16777216;\n ret._settledValueField = reason;\n return this._promiseResolved(index, ret);\n };\n\n Promise.settle = function (promises) {\n debug.deprecated(\".settle()\", \".reflect()\");\n return new SettledPromiseArray(promises).promise();\n };\n\n Promise.prototype.settle = function () {\n return Promise.settle(this);\n };\n };\n }, {\n \"./util\": 36\n }],\n 31: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, PromiseArray, apiRejection) {\n var util = _dereq_(\"./util\");\n\n var RangeError = _dereq_(\"./errors\").RangeError;\n\n var AggregateError = _dereq_(\"./errors\").AggregateError;\n\n var isArray = util.isArray;\n var CANCELLATION = {};\n\n function SomePromiseArray(values) {\n this.constructor$(values);\n this._howMany = 0;\n this._unwrap = false;\n this._initialized = false;\n }\n\n util.inherits(SomePromiseArray, PromiseArray);\n\n SomePromiseArray.prototype._init = function () {\n if (!this._initialized) {\n return;\n }\n\n if (this._howMany === 0) {\n this._resolve([]);\n\n return;\n }\n\n this._init$(undefined, -5);\n\n var isArrayResolved = isArray(this._values);\n\n if (!this._isResolved() && isArrayResolved && this._howMany > this._canPossiblyFulfill()) {\n this._reject(this._getRangeError(this.length()));\n }\n };\n\n SomePromiseArray.prototype.init = function () {\n this._initialized = true;\n\n this._init();\n };\n\n SomePromiseArray.prototype.setUnwrap = function () {\n this._unwrap = true;\n };\n\n SomePromiseArray.prototype.howMany = function () {\n return this._howMany;\n };\n\n SomePromiseArray.prototype.setHowMany = function (count) {\n this._howMany = count;\n };\n\n SomePromiseArray.prototype._promiseFulfilled = function (value) {\n this._addFulfilled(value);\n\n if (this._fulfilled() === this.howMany()) {\n this._values.length = this.howMany();\n\n if (this.howMany() === 1 && this._unwrap) {\n this._resolve(this._values[0]);\n } else {\n this._resolve(this._values);\n }\n\n return true;\n }\n\n return false;\n };\n\n SomePromiseArray.prototype._promiseRejected = function (reason) {\n this._addRejected(reason);\n\n return this._checkOutcome();\n };\n\n SomePromiseArray.prototype._promiseCancelled = function () {\n if (this._values instanceof Promise || this._values == null) {\n return this._cancel();\n }\n\n this._addRejected(CANCELLATION);\n\n return this._checkOutcome();\n };\n\n SomePromiseArray.prototype._checkOutcome = function () {\n if (this.howMany() > this._canPossiblyFulfill()) {\n var e = new AggregateError();\n\n for (var i = this.length(); i < this._values.length; ++i) {\n if (this._values[i] !== CANCELLATION) {\n e.push(this._values[i]);\n }\n }\n\n if (e.length > 0) {\n this._reject(e);\n } else {\n this._cancel();\n }\n\n return true;\n }\n\n return false;\n };\n\n SomePromiseArray.prototype._fulfilled = function () {\n return this._totalResolved;\n };\n\n SomePromiseArray.prototype._rejected = function () {\n return this._values.length - this.length();\n };\n\n SomePromiseArray.prototype._addRejected = function (reason) {\n this._values.push(reason);\n };\n\n SomePromiseArray.prototype._addFulfilled = function (value) {\n this._values[this._totalResolved++] = value;\n };\n\n SomePromiseArray.prototype._canPossiblyFulfill = function () {\n return this.length() - this._rejected();\n };\n\n SomePromiseArray.prototype._getRangeError = function (count) {\n var message = \"Input array must contain at least \" + this._howMany + \" items but contains only \" + count + \" items\";\n return new RangeError(message);\n };\n\n SomePromiseArray.prototype._resolveEmptyArray = function () {\n this._reject(this._getRangeError(0));\n };\n\n function some(promises, howMany) {\n if ((howMany | 0) !== howMany || howMany < 0) {\n return apiRejection(\"expecting a positive integer\\n\\n See http://goo.gl/MqrFmX\\n\");\n }\n\n var ret = new SomePromiseArray(promises);\n var promise = ret.promise();\n ret.setHowMany(howMany);\n ret.init();\n return promise;\n }\n\n Promise.some = function (promises, howMany) {\n return some(promises, howMany);\n };\n\n Promise.prototype.some = function (howMany) {\n return some(this, howMany);\n };\n\n Promise._SomePromiseArray = SomePromiseArray;\n };\n }, {\n \"./errors\": 12,\n \"./util\": 36\n }],\n 32: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise) {\n function PromiseInspection(promise) {\n if (promise !== undefined) {\n promise = promise._target();\n this._bitField = promise._bitField;\n this._settledValueField = promise._isFateSealed() ? promise._settledValue() : undefined;\n } else {\n this._bitField = 0;\n this._settledValueField = undefined;\n }\n }\n\n PromiseInspection.prototype._settledValue = function () {\n return this._settledValueField;\n };\n\n var value = PromiseInspection.prototype.value = function () {\n if (!this.isFulfilled()) {\n throw new TypeError(\"cannot get fulfillment value of a non-fulfilled promise\\n\\n See http://goo.gl/MqrFmX\\n\");\n }\n\n return this._settledValue();\n };\n\n var reason = PromiseInspection.prototype.error = PromiseInspection.prototype.reason = function () {\n if (!this.isRejected()) {\n throw new TypeError(\"cannot get rejection reason of a non-rejected promise\\n\\n See http://goo.gl/MqrFmX\\n\");\n }\n\n return this._settledValue();\n };\n\n var isFulfilled = PromiseInspection.prototype.isFulfilled = function () {\n return (this._bitField & 33554432) !== 0;\n };\n\n var isRejected = PromiseInspection.prototype.isRejected = function () {\n return (this._bitField & 16777216) !== 0;\n };\n\n var isPending = PromiseInspection.prototype.isPending = function () {\n return (this._bitField & 50397184) === 0;\n };\n\n var isResolved = PromiseInspection.prototype.isResolved = function () {\n return (this._bitField & 50331648) !== 0;\n };\n\n PromiseInspection.prototype.isCancelled = function () {\n return (this._bitField & 8454144) !== 0;\n };\n\n Promise.prototype.__isCancelled = function () {\n return (this._bitField & 65536) === 65536;\n };\n\n Promise.prototype._isCancelled = function () {\n return this._target().__isCancelled();\n };\n\n Promise.prototype.isCancelled = function () {\n return (this._target()._bitField & 8454144) !== 0;\n };\n\n Promise.prototype.isPending = function () {\n return isPending.call(this._target());\n };\n\n Promise.prototype.isRejected = function () {\n return isRejected.call(this._target());\n };\n\n Promise.prototype.isFulfilled = function () {\n return isFulfilled.call(this._target());\n };\n\n Promise.prototype.isResolved = function () {\n return isResolved.call(this._target());\n };\n\n Promise.prototype.value = function () {\n return value.call(this._target());\n };\n\n Promise.prototype.reason = function () {\n var target = this._target();\n\n target._unsetRejectionIsUnhandled();\n\n return reason.call(target);\n };\n\n Promise.prototype._value = function () {\n return this._settledValue();\n };\n\n Promise.prototype._reason = function () {\n this._unsetRejectionIsUnhandled();\n\n return this._settledValue();\n };\n\n Promise.PromiseInspection = PromiseInspection;\n };\n }, {}],\n 33: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, INTERNAL) {\n var util = _dereq_(\"./util\");\n\n var errorObj = util.errorObj;\n var isObject = util.isObject;\n\n function tryConvertToPromise(obj, context) {\n if (isObject(obj)) {\n if (obj instanceof Promise) return obj;\n var then = getThen(obj);\n\n if (then === errorObj) {\n if (context) context._pushContext();\n var ret = Promise.reject(then.e);\n if (context) context._popContext();\n return ret;\n } else if (typeof then === \"function\") {\n if (isAnyBluebirdPromise(obj)) {\n var ret = new Promise(INTERNAL);\n\n obj._then(ret._fulfill, ret._reject, undefined, ret, null);\n\n return ret;\n }\n\n return doThenable(obj, then, context);\n }\n }\n\n return obj;\n }\n\n function doGetThen(obj) {\n return obj.then;\n }\n\n function getThen(obj) {\n try {\n return doGetThen(obj);\n } catch (e) {\n errorObj.e = e;\n return errorObj;\n }\n }\n\n var hasProp = {}.hasOwnProperty;\n\n function isAnyBluebirdPromise(obj) {\n try {\n return hasProp.call(obj, \"_promise0\");\n } catch (e) {\n return false;\n }\n }\n\n function doThenable(x, then, context) {\n var promise = new Promise(INTERNAL);\n var ret = promise;\n if (context) context._pushContext();\n\n promise._captureStackTrace();\n\n if (context) context._popContext();\n var synchronous = true;\n var result = util.tryCatch(then).call(x, resolve, reject);\n synchronous = false;\n\n if (promise && result === errorObj) {\n promise._rejectCallback(result.e, true, true);\n\n promise = null;\n }\n\n function resolve(value) {\n if (!promise) return;\n\n promise._resolveCallback(value);\n\n promise = null;\n }\n\n function reject(reason) {\n if (!promise) return;\n\n promise._rejectCallback(reason, synchronous, true);\n\n promise = null;\n }\n\n return ret;\n }\n\n return tryConvertToPromise;\n };\n }, {\n \"./util\": 36\n }],\n 34: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, INTERNAL, debug) {\n var util = _dereq_(\"./util\");\n\n var TimeoutError = Promise.TimeoutError;\n\n function HandleWrapper(handle) {\n this.handle = handle;\n }\n\n HandleWrapper.prototype._resultCancelled = function () {\n clearTimeout(this.handle);\n };\n\n var afterValue = function afterValue(value) {\n return delay(+this).thenReturn(value);\n };\n\n var delay = Promise.delay = function (ms, value) {\n var ret;\n var handle;\n\n if (value !== undefined) {\n ret = Promise.resolve(value)._then(afterValue, null, null, ms, undefined);\n\n if (debug.cancellation() && value instanceof Promise) {\n ret._setOnCancel(value);\n }\n } else {\n ret = new Promise(INTERNAL);\n handle = setTimeout(function () {\n ret._fulfill();\n }, +ms);\n\n if (debug.cancellation()) {\n ret._setOnCancel(new HandleWrapper(handle));\n }\n\n ret._captureStackTrace();\n }\n\n ret._setAsyncGuaranteed();\n\n return ret;\n };\n\n Promise.prototype.delay = function (ms) {\n return delay(ms, this);\n };\n\n var afterTimeout = function afterTimeout(promise, message, parent) {\n var err;\n\n if (typeof message !== \"string\") {\n if (message instanceof Error) {\n err = message;\n } else {\n err = new TimeoutError(\"operation timed out\");\n }\n } else {\n err = new TimeoutError(message);\n }\n\n util.markAsOriginatingFromRejection(err);\n\n promise._attachExtraTrace(err);\n\n promise._reject(err);\n\n if (parent != null) {\n parent.cancel();\n }\n };\n\n function successClear(value) {\n clearTimeout(this.handle);\n return value;\n }\n\n function failureClear(reason) {\n clearTimeout(this.handle);\n throw reason;\n }\n\n Promise.prototype.timeout = function (ms, message) {\n ms = +ms;\n var ret, parent;\n var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() {\n if (ret.isPending()) {\n afterTimeout(ret, message, parent);\n }\n }, ms));\n\n if (debug.cancellation()) {\n parent = this.then();\n ret = parent._then(successClear, failureClear, undefined, handleWrapper, undefined);\n\n ret._setOnCancel(handleWrapper);\n } else {\n ret = this._then(successClear, failureClear, undefined, handleWrapper, undefined);\n }\n\n return ret;\n };\n };\n }, {\n \"./util\": 36\n }],\n 35: [function (_dereq_, module, exports) {\n \"use strict\";\n\n module.exports = function (Promise, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug) {\n var util = _dereq_(\"./util\");\n\n var TypeError = _dereq_(\"./errors\").TypeError;\n\n var inherits = _dereq_(\"./util\").inherits;\n\n var errorObj = util.errorObj;\n var tryCatch = util.tryCatch;\n var NULL = {};\n\n function thrower(e) {\n setTimeout(function () {\n throw e;\n }, 0);\n }\n\n function castPreservingDisposable(thenable) {\n var maybePromise = tryConvertToPromise(thenable);\n\n if (maybePromise !== thenable && typeof thenable._isDisposable === \"function\" && typeof thenable._getDisposer === \"function\" && thenable._isDisposable()) {\n maybePromise._setDisposable(thenable._getDisposer());\n }\n\n return maybePromise;\n }\n\n function dispose(resources, inspection) {\n var i = 0;\n var len = resources.length;\n var ret = new Promise(INTERNAL);\n\n function iterator() {\n if (i >= len) return ret._fulfill();\n var maybePromise = castPreservingDisposable(resources[i++]);\n\n if (maybePromise instanceof Promise && maybePromise._isDisposable()) {\n try {\n maybePromise = tryConvertToPromise(maybePromise._getDisposer().tryDispose(inspection), resources.promise);\n } catch (e) {\n return thrower(e);\n }\n\n if (maybePromise instanceof Promise) {\n return maybePromise._then(iterator, thrower, null, null, null);\n }\n }\n\n iterator();\n }\n\n iterator();\n return ret;\n }\n\n function Disposer(data, promise, context) {\n this._data = data;\n this._promise = promise;\n this._context = context;\n }\n\n Disposer.prototype.data = function () {\n return this._data;\n };\n\n Disposer.prototype.promise = function () {\n return this._promise;\n };\n\n Disposer.prototype.resource = function () {\n if (this.promise().isFulfilled()) {\n return this.promise().value();\n }\n\n return NULL;\n };\n\n Disposer.prototype.tryDispose = function (inspection) {\n var resource = this.resource();\n var context = this._context;\n if (context !== undefined) context._pushContext();\n var ret = resource !== NULL ? this.doDispose(resource, inspection) : null;\n if (context !== undefined) context._popContext();\n\n this._promise._unsetDisposable();\n\n this._data = null;\n return ret;\n };\n\n Disposer.isDisposer = function (d) {\n return d != null && typeof d.resource === \"function\" && typeof d.tryDispose === \"function\";\n };\n\n function FunctionDisposer(fn, promise, context) {\n this.constructor$(fn, promise, context);\n }\n\n inherits(FunctionDisposer, Disposer);\n\n FunctionDisposer.prototype.doDispose = function (resource, inspection) {\n var fn = this.data();\n return fn.call(resource, resource, inspection);\n };\n\n function maybeUnwrapDisposer(value) {\n if (Disposer.isDisposer(value)) {\n this.resources[this.index]._setDisposable(value);\n\n return value.promise();\n }\n\n return value;\n }\n\n function ResourceList(length) {\n this.length = length;\n this.promise = null;\n this[length - 1] = null;\n }\n\n ResourceList.prototype._resultCancelled = function () {\n var len = this.length;\n\n for (var i = 0; i < len; ++i) {\n var item = this[i];\n\n if (item instanceof Promise) {\n item.cancel();\n }\n }\n };\n\n Promise.using = function () {\n var len = arguments.length;\n if (len < 2) return apiRejection(\"you must pass at least 2 arguments to Promise.using\");\n var fn = arguments[len - 1];\n\n if (typeof fn !== \"function\") {\n return apiRejection(\"expecting a function but got \" + util.classString(fn));\n }\n\n var input;\n var spreadArgs = true;\n\n if (len === 2 && Array.isArray(arguments[0])) {\n input = arguments[0];\n len = input.length;\n spreadArgs = false;\n } else {\n input = arguments;\n len--;\n }\n\n var resources = new ResourceList(len);\n\n for (var i = 0; i < len; ++i) {\n var resource = input[i];\n\n if (Disposer.isDisposer(resource)) {\n var disposer = resource;\n resource = resource.promise();\n\n resource._setDisposable(disposer);\n } else {\n var maybePromise = tryConvertToPromise(resource);\n\n if (maybePromise instanceof Promise) {\n resource = maybePromise._then(maybeUnwrapDisposer, null, null, {\n resources: resources,\n index: i\n }, undefined);\n }\n }\n\n resources[i] = resource;\n }\n\n var reflectedResources = new Array(resources.length);\n\n for (var i = 0; i < reflectedResources.length; ++i) {\n reflectedResources[i] = Promise.resolve(resources[i]).reflect();\n }\n\n var resultPromise = Promise.all(reflectedResources).then(function (inspections) {\n for (var i = 0; i < inspections.length; ++i) {\n var inspection = inspections[i];\n\n if (inspection.isRejected()) {\n errorObj.e = inspection.error();\n return errorObj;\n } else if (!inspection.isFulfilled()) {\n resultPromise.cancel();\n return;\n }\n\n inspections[i] = inspection.value();\n }\n\n promise._pushContext();\n\n fn = tryCatch(fn);\n var ret = spreadArgs ? fn.apply(undefined, inspections) : fn(inspections);\n\n var promiseCreated = promise._popContext();\n\n debug.checkForgottenReturns(ret, promiseCreated, \"Promise.using\", promise);\n return ret;\n });\n var promise = resultPromise.lastly(function () {\n var inspection = new Promise.PromiseInspection(resultPromise);\n return dispose(resources, inspection);\n });\n resources.promise = promise;\n\n promise._setOnCancel(resources);\n\n return promise;\n };\n\n Promise.prototype._setDisposable = function (disposer) {\n this._bitField = this._bitField | 131072;\n this._disposer = disposer;\n };\n\n Promise.prototype._isDisposable = function () {\n return (this._bitField & 131072) > 0;\n };\n\n Promise.prototype._getDisposer = function () {\n return this._disposer;\n };\n\n Promise.prototype._unsetDisposable = function () {\n this._bitField = this._bitField & ~131072;\n this._disposer = undefined;\n };\n\n Promise.prototype.disposer = function (fn) {\n if (typeof fn === \"function\") {\n return new FunctionDisposer(fn, this, createContext());\n }\n\n throw new TypeError();\n };\n };\n }, {\n \"./errors\": 12,\n \"./util\": 36\n }],\n 36: [function (_dereq_, module, exports) {\n \"use strict\";\n\n var es5 = _dereq_(\"./es5\");\n\n var canEvaluate = typeof navigator == \"undefined\";\n var errorObj = {\n e: {}\n };\n var tryCatchTarget;\n var globalObject = typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : this !== undefined ? this : null;\n\n function tryCatcher() {\n try {\n var target = tryCatchTarget;\n tryCatchTarget = null;\n return target.apply(this, arguments);\n } catch (e) {\n errorObj.e = e;\n return errorObj;\n }\n }\n\n function tryCatch(fn) {\n tryCatchTarget = fn;\n return tryCatcher;\n }\n\n var inherits = function inherits(Child, Parent) {\n var hasProp = {}.hasOwnProperty;\n\n function T() {\n this.constructor = Child;\n this.constructor$ = Parent;\n\n for (var propertyName in Parent.prototype) {\n if (hasProp.call(Parent.prototype, propertyName) && propertyName.charAt(propertyName.length - 1) !== \"$\") {\n this[propertyName + \"$\"] = Parent.prototype[propertyName];\n }\n }\n }\n\n T.prototype = Parent.prototype;\n Child.prototype = new T();\n return Child.prototype;\n };\n\n function isPrimitive(val) {\n return val == null || val === true || val === false || typeof val === \"string\" || typeof val === \"number\";\n }\n\n function isObject(value) {\n return typeof value === \"function\" || _typeof(value) === \"object\" && value !== null;\n }\n\n function maybeWrapAsError(maybeError) {\n if (!isPrimitive(maybeError)) return maybeError;\n return new Error(safeToString(maybeError));\n }\n\n function withAppended(target, appendee) {\n var len = target.length;\n var ret = new Array(len + 1);\n var i;\n\n for (i = 0; i < len; ++i) {\n ret[i] = target[i];\n }\n\n ret[i] = appendee;\n return ret;\n }\n\n function getDataPropertyOrDefault(obj, key, defaultValue) {\n if (es5.isES5) {\n var desc = Object.getOwnPropertyDescriptor(obj, key);\n\n if (desc != null) {\n return desc.get == null && desc.set == null ? desc.value : defaultValue;\n }\n } else {\n return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined;\n }\n }\n\n function notEnumerableProp(obj, name, value) {\n if (isPrimitive(obj)) return obj;\n var descriptor = {\n value: value,\n configurable: true,\n enumerable: false,\n writable: true\n };\n es5.defineProperty(obj, name, descriptor);\n return obj;\n }\n\n function thrower(r) {\n throw r;\n }\n\n var inheritedDataKeys = function () {\n var excludedPrototypes = [Array.prototype, Object.prototype, Function.prototype];\n\n var isExcludedProto = function isExcludedProto(val) {\n for (var i = 0; i < excludedPrototypes.length; ++i) {\n if (excludedPrototypes[i] === val) {\n return true;\n }\n }\n\n return false;\n };\n\n if (es5.isES5) {\n var getKeys = Object.getOwnPropertyNames;\n return function (obj) {\n var ret = [];\n var visitedKeys = Object.create(null);\n\n while (obj != null && !isExcludedProto(obj)) {\n var keys;\n\n try {\n keys = getKeys(obj);\n } catch (e) {\n return ret;\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (visitedKeys[key]) continue;\n visitedKeys[key] = true;\n var desc = Object.getOwnPropertyDescriptor(obj, key);\n\n if (desc != null && desc.get == null && desc.set == null) {\n ret.push(key);\n }\n }\n\n obj = es5.getPrototypeOf(obj);\n }\n\n return ret;\n };\n } else {\n var hasProp = {}.hasOwnProperty;\n return function (obj) {\n if (isExcludedProto(obj)) return [];\n var ret = [];\n /*jshint forin:false */\n\n enumeration: for (var key in obj) {\n if (hasProp.call(obj, key)) {\n ret.push(key);\n } else {\n for (var i = 0; i < excludedPrototypes.length; ++i) {\n if (hasProp.call(excludedPrototypes[i], key)) {\n continue enumeration;\n }\n }\n\n ret.push(key);\n }\n }\n\n return ret;\n };\n }\n }();\n\n var thisAssignmentPattern = /this\\s*\\.\\s*\\S+\\s*=/;\n\n function isClass(fn) {\n try {\n if (typeof fn === \"function\") {\n var keys = es5.names(fn.prototype);\n var hasMethods = es5.isES5 && keys.length > 1;\n var hasMethodsOtherThanConstructor = keys.length > 0 && !(keys.length === 1 && keys[0] === \"constructor\");\n var hasThisAssignmentAndStaticMethods = thisAssignmentPattern.test(fn + \"\") && es5.names(fn).length > 0;\n\n if (hasMethods || hasMethodsOtherThanConstructor || hasThisAssignmentAndStaticMethods) {\n return true;\n }\n }\n\n return false;\n } catch (e) {\n return false;\n }\n }\n\n function toFastProperties(obj) {\n /*jshint -W027,-W055,-W031*/\n function FakeConstructor() {}\n\n FakeConstructor.prototype = obj;\n var receiver = new FakeConstructor();\n\n function ic() {\n return _typeof(receiver.foo);\n }\n\n ic();\n ic();\n return obj;\n eval(obj);\n }\n\n var rident = /^[a-z$_][a-z$_0-9]*$/i;\n\n function isIdentifier(str) {\n return rident.test(str);\n }\n\n function filledRange(count, prefix, suffix) {\n var ret = new Array(count);\n\n for (var i = 0; i < count; ++i) {\n ret[i] = prefix + i + suffix;\n }\n\n return ret;\n }\n\n function safeToString(obj) {\n try {\n return obj + \"\";\n } catch (e) {\n return \"[no string representation]\";\n }\n }\n\n function isError(obj) {\n return obj instanceof Error || obj !== null && _typeof(obj) === \"object\" && typeof obj.message === \"string\" && typeof obj.name === \"string\";\n }\n\n function markAsOriginatingFromRejection(e) {\n try {\n notEnumerableProp(e, \"isOperational\", true);\n } catch (ignore) {}\n }\n\n function originatesFromRejection(e) {\n if (e == null) return false;\n return e instanceof Error[\"__BluebirdErrorTypes__\"].OperationalError || e[\"isOperational\"] === true;\n }\n\n function canAttachTrace(obj) {\n return isError(obj) && es5.propertyIsWritable(obj, \"stack\");\n }\n\n var ensureErrorObject = function () {\n if (!(\"stack\" in new Error())) {\n return function (value) {\n if (canAttachTrace(value)) return value;\n\n try {\n throw new Error(safeToString(value));\n } catch (err) {\n return err;\n }\n };\n } else {\n return function (value) {\n if (canAttachTrace(value)) return value;\n return new Error(safeToString(value));\n };\n }\n }();\n\n function classString(obj) {\n return {}.toString.call(obj);\n }\n\n function copyDescriptors(from, to, filter) {\n var keys = es5.names(from);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (filter(key)) {\n try {\n es5.defineProperty(to, key, es5.getDescriptor(from, key));\n } catch (ignore) {}\n }\n }\n }\n\n var asArray = function asArray(v) {\n if (es5.isArray(v)) {\n return v;\n }\n\n return null;\n };\n\n if (typeof Symbol !== \"undefined\" && Symbol.iterator) {\n var ArrayFrom = typeof Array.from === \"function\" ? function (v) {\n return Array.from(v);\n } : function (v) {\n var ret = [];\n var it = v[Symbol.iterator]();\n var itResult;\n\n while (!(itResult = it.next()).done) {\n ret.push(itResult.value);\n }\n\n return ret;\n };\n\n asArray = function asArray(v) {\n if (es5.isArray(v)) {\n return v;\n } else if (v != null && typeof v[Symbol.iterator] === \"function\") {\n return ArrayFrom(v);\n }\n\n return null;\n };\n }\n\n var isNode = typeof process !== \"undefined\" && classString(process).toLowerCase() === \"[object process]\";\n var hasEnvVariables = typeof process !== \"undefined\" && typeof process.env !== \"undefined\";\n\n function env(key) {\n return hasEnvVariables ? process.env[key] : undefined;\n }\n\n function getNativePromise() {\n if (typeof Promise === \"function\") {\n try {\n var promise = new Promise(function () {});\n\n if ({}.toString.call(promise) === \"[object Promise]\") {\n return Promise;\n }\n } catch (e) {}\n }\n }\n\n function domainBind(self, cb) {\n return self.bind(cb);\n }\n\n var ret = {\n isClass: isClass,\n isIdentifier: isIdentifier,\n inheritedDataKeys: inheritedDataKeys,\n getDataPropertyOrDefault: getDataPropertyOrDefault,\n thrower: thrower,\n isArray: es5.isArray,\n asArray: asArray,\n notEnumerableProp: notEnumerableProp,\n isPrimitive: isPrimitive,\n isObject: isObject,\n isError: isError,\n canEvaluate: canEvaluate,\n errorObj: errorObj,\n tryCatch: tryCatch,\n inherits: inherits,\n withAppended: withAppended,\n maybeWrapAsError: maybeWrapAsError,\n toFastProperties: toFastProperties,\n filledRange: filledRange,\n toString: safeToString,\n canAttachTrace: canAttachTrace,\n ensureErrorObject: ensureErrorObject,\n originatesFromRejection: originatesFromRejection,\n markAsOriginatingFromRejection: markAsOriginatingFromRejection,\n classString: classString,\n copyDescriptors: copyDescriptors,\n hasDevTools: typeof chrome !== \"undefined\" && chrome && typeof chrome.loadTimes === \"function\",\n isNode: isNode,\n hasEnvVariables: hasEnvVariables,\n env: env,\n global: globalObject,\n getNativePromise: getNativePromise,\n domainBind: domainBind\n };\n\n ret.isRecentNode = ret.isNode && function () {\n var version;\n\n if (process.versions && process.versions.node) {\n version = process.versions.node.split(\".\").map(Number);\n } else if (process.version) {\n version = process.version.split(\".\").map(Number);\n }\n\n return version[0] === 0 && version[1] > 10 || version[0] > 0;\n }();\n\n if (ret.isNode) ret.toFastProperties(process);\n\n try {\n throw new Error();\n } catch (e) {\n ret.lastLineError = e;\n }\n\n module.exports = ret;\n }, {\n \"./es5\": 13\n }]\n }, {}, [4])(4);\n});\n;\n\nif (typeof window !== 'undefined' && window !== null) {\n window.P = window.Promise;\n} else if (typeof self !== 'undefined' && self !== null) {\n self.P = self.Promise;\n}","module.exports = require(\"bluebird\");","var utils = require(\"../../utils/utils\");\n\nvar StateService = function StateService() {\n var stateProviders = {};\n\n function getState(name) {\n var provider = stateProviders[name];\n\n if (provider) {\n return stateProviders[name].method();\n } else {\n var res = {};\n\n for (var i in stateProviders) {\n if (!stateProviders[i].internal) utils.mixin(res, stateProviders[i].method(), true);\n }\n\n return res;\n }\n }\n\n function registerProvider(name, provider, internal) {\n stateProviders[name] = {\n method: provider,\n internal: internal\n };\n }\n\n function unregisterProvider(name) {\n delete stateProviders[name];\n }\n\n return {\n getState: getState,\n registerProvider: registerProvider,\n unregisterProvider: unregisterProvider\n };\n};\n\nmodule.exports = StateService;","module.exports = function (gantt) {\n var regTemplates = {};\n\n function initTemplate(name, initial, template_name) {\n template_name = template_name || name;\n var config = gantt.config,\n templates = gantt.templates;\n\n if (gantt.config[name] && regTemplates[template_name] != config[name]) {\n if (!(initial && templates[template_name])) {\n templates[template_name] = gantt.date.date_to_str(config[name]);\n regTemplates[template_name] = config[name];\n }\n }\n }\n\n function initTemplates() {\n var labels = gantt.locale.labels;\n labels.gantt_save_btn = labels.icon_save;\n labels.gantt_cancel_btn = labels.icon_cancel;\n labels.gantt_delete_btn = labels.icon_delete;\n var date = gantt.date; //build configuration based templates\n\n var d = date.date_to_str;\n var c = gantt.config;\n var format_date = d(c.xml_date || c.date_format, c.server_utc);\n var parse_date = date.str_to_date(c.xml_date || c.date_format, c.server_utc);\n initTemplate(\"date_scale\", true, undefined, gantt.config, gantt.templates);\n initTemplate(\"date_grid\", true, \"grid_date_format\", gantt.config, gantt.templates);\n initTemplate(\"task_date\", true, undefined, gantt.config, gantt.templates);\n gantt.mixin(gantt.templates, {\n xml_format: undefined,\n // deprecated\n format_date: format_date,\n xml_date: undefined,\n // deprecated\n parse_date: parse_date,\n progress_text: function progress_text(start, end, task) {\n return \"\";\n },\n grid_header_class: function grid_header_class(column, config) {\n return \"\";\n },\n task_text: function task_text(start, end, task) {\n return task.text;\n },\n task_class: function task_class(start, end, task) {\n return \"\";\n },\n task_end_date: function task_end_date(date) {\n return gantt.templates.task_date(date);\n },\n grid_row_class: function grid_row_class(start, end, task) {\n return \"\";\n },\n task_row_class: function task_row_class(start, end, task) {\n return \"\";\n },\n timeline_cell_class: function timeline_cell_class(item, date) {\n return \"\";\n },\n timeline_cell_content: function timeline_cell_content(item, date) {\n return \"\";\n },\n scale_cell_class: function scale_cell_class(date) {\n return \"\";\n },\n scale_row_class: function scale_row_class(date) {\n return \"\";\n },\n grid_indent: function grid_indent(item) {\n return \"
\";\n },\n grid_folder: function grid_folder(item) {\n return \"
\";\n },\n grid_file: function grid_file(item) {\n return \"
\";\n },\n grid_open: function grid_open(item) {\n return \"
\";\n },\n grid_blank: function grid_blank(item) {\n return \"
\";\n },\n date_grid: function date_grid(date, item, column) {\n if (item && gantt.isUnscheduledTask(item) && gantt.config.show_unscheduled) {\n return gantt.templates.task_unscheduled_time(item);\n } else {\n return gantt.templates.grid_date_format(date, column);\n }\n },\n task_time: function task_time(start, end, ev) {\n if (gantt.isUnscheduledTask(ev) && gantt.config.show_unscheduled) {\n return gantt.templates.task_unscheduled_time(ev);\n } else {\n return gantt.templates.task_date(start) + \" - \" + gantt.templates.task_end_date(end);\n }\n },\n task_unscheduled_time: function task_unscheduled_time(task) {\n return \"\";\n },\n time_picker: d(c.time_picker),\n link_class: function link_class(link) {\n return \"\";\n },\n link_description: function link_description(link) {\n var from = gantt.getTask(link.source),\n to = gantt.getTask(link.target);\n return \"\" + from.text + \"\" + to.text + \"\";\n },\n drag_link: function drag_link(from, from_start, to, to_start) {\n from = gantt.getTask(from);\n var labels = gantt.locale.labels;\n var text = \"\" + from.text + \" \" + (from_start ? labels.link_start : labels.link_end) + \"
\";\n\n if (to) {\n to = gantt.getTask(to);\n text += \" \" + to.text + \" \" + (to_start ? labels.link_start : labels.link_end) + \"
\";\n }\n\n return text;\n },\n drag_link_class: function drag_link_class(from, from_start, to, to_start) {\n var add = \"\";\n\n if (from && to) {\n var allowed = gantt.isLinkAllowed(from, to, from_start, to_start);\n add = \" \" + (allowed ? \"gantt_link_allow\" : \"gantt_link_deny\");\n }\n\n return \"gantt_link_tooltip\" + add;\n },\n\n /* used for aria-labels of bar elements and for tooltip.js */\n tooltip_date_format: date.date_to_str(\"%Y-%m-%d\"),\n tooltip_text: function tooltip_text(start, end, event) {\n return \"Task: \" + event.text + \"
Start date: \" + gantt.templates.tooltip_date_format(start) + \"
End date: \" + gantt.templates.tooltip_date_format(end);\n }\n });\n }\n\n return {\n initTemplates: initTemplates,\n initTemplate: initTemplate\n };\n};","var eventable = require(\"../../utils/eventable\");\n\nvar utils = require(\"../../utils/utils\");\n\nvar timeout = require(\"../../utils/timeout\");\n\nvar global = require(\"../../utils/global\");\n\nvar domHelpers = require(\"../ui/utils/dom_helpers\");\n\nmodule.exports = function (gantt) {\n function copyDomEvent(e) {\n return {\n target: e.target || e.srcElement,\n pageX: e.pageX,\n pageY: e.pageY,\n clientX: e.clientX,\n clientY: e.clientY,\n metaKey: e.metaKey,\n shiftKey: e.shiftKey,\n ctrlKey: e.ctrlKey,\n altKey: e.altKey\n };\n }\n\n function DnD(obj, config) {\n this._obj = obj;\n this._settings = config || {};\n eventable(this);\n var inputMethods = this.getInputMethods();\n this._drag_start_timer = null;\n gantt.attachEvent(\"onGanttScroll\", utils.bind(function (left, top) {\n this.clearDragTimer();\n }, this));\n var lastDown = 0;\n var eventParams = {\n passive: false\n };\n\n for (var i = 0; i < inputMethods.length; i++) {\n utils.bind(function (input) {\n gantt.event(obj, input.down, utils.bind(function (e) {\n if (!input.accessor(e)) {\n return;\n }\n\n if (config.preventDefault && config.selector && domHelpers.closest(e.target, config.selector)) {\n e.preventDefault();\n }\n\n if (gantt.config.touch && e.timeStamp && e.timeStamp - lastDown < 300) {\n return;\n }\n\n this._settings.original_target = copyDomEvent(e);\n\n if (gantt.config.touch) {\n this.clearDragTimer();\n this._drag_start_timer = setTimeout(utils.bind(function () {\n if (gantt.getState().lightbox) {\n return;\n }\n\n this.dragStart(obj, e, input);\n }, this), gantt.config.touch_drag);\n } else {\n this.dragStart(obj, e, input);\n }\n }, this), eventParams);\n var eventElement = document.body;\n gantt.event(eventElement, input.up, utils.bind(function (e) {\n if (!input.accessor(e)) {\n return;\n }\n\n this.clearDragTimer();\n }, this), eventParams);\n }, this)(inputMethods[i]);\n }\n }\n\n DnD.prototype = {\n traceDragEvents: function traceDragEvents(domElement, inputMethod) {\n var mousemove = utils.bind(function (e) {\n return this.dragMove(domElement, e, inputMethod.accessor);\n }, this);\n utils.bind(function (e) {\n return this.dragScroll(domElement, e);\n }, this);\n var limited_mousemove = utils.bind(function (e) {\n if (this.config.started && utils.defined(this.config.updates_per_second)) {\n if (!timeout(this, this.config.updates_per_second)) return;\n }\n\n var dndActive = mousemove(e);\n\n if (dndActive) {\n try {\n if (e && e.preventDefault && e.cancelable) {\n //e.cancelable condition - because navigator.vibrate is blocked by Chrome\n e.preventDefault(); //Cancel default action on DND\n } //Cancel default action on DND\n\n } catch (e) {// just suppress the exception, nothing needed to be done here\n } //e.cancelBubble = true;\n\n }\n\n return dndActive;\n }, this);\n var eventElement = domHelpers.getRootNode(gantt.$root);\n var mousemoveContainer = this.config.mousemoveContainer || domHelpers.getRootNode(gantt.$root);\n var eventParams = {\n passive: false\n };\n var mouseup = utils.bind(function (e) {\n gantt.eventRemove(mousemoveContainer, inputMethod.move, limited_mousemove);\n gantt.eventRemove(eventElement, inputMethod.up, mouseup, eventParams);\n return this.dragEnd(domElement);\n }, this);\n gantt.event(mousemoveContainer, inputMethod.move, limited_mousemove, eventParams);\n gantt.event(eventElement, inputMethod.up, mouseup, eventParams);\n },\n checkPositionChange: function checkPositionChange(pos) {\n var diff_x = pos.x - this.config.pos.x;\n var diff_y = pos.y - this.config.pos.y;\n var distance = Math.sqrt(Math.pow(Math.abs(diff_x), 2) + Math.pow(Math.abs(diff_y), 2));\n\n if (distance > this.config.sensitivity) {\n return true;\n } else {\n return false;\n }\n },\n initDnDMarker: function initDnDMarker() {\n // create dnd placeholder and put it in dom\n var marker = this.config.marker = document.createElement(\"div\");\n marker.className = \"gantt_drag_marker\"; // GS-1333: don't show any message when we resize grid columns\n\n marker.innerHTML = \"\";\n document.body.appendChild(marker);\n },\n backupEventTarget: function backupEventTarget(domEvent, getEvent) {\n if (!gantt.config.touch) {\n return;\n } // keep original event target in DOM in order to keep dnd on touchmove event\n\n\n var e = getEvent(domEvent);\n var el = e.target || e.srcElement;\n var copy = el.cloneNode(true); //this.config.target.target = copy;\n\n this.config.original_target = copyDomEvent(e);\n this.config.original_target.target = copy;\n this.config.backup_element = el;\n el.parentNode.appendChild(copy);\n el.style.display = \"none\";\n var mousemoveContainer = this.config.mousemoveContainer || document.body;\n mousemoveContainer.appendChild(el);\n },\n getInputMethods: function getInputMethods() {\n // bind actions to browser events\n var inputMethods = [];\n inputMethods.push({\n \"move\": \"mousemove\",\n \"down\": \"mousedown\",\n \"up\": \"mouseup\",\n \"accessor\": function accessor(e) {\n return e;\n }\n });\n\n if (gantt.config.touch) {\n var touchEventsSupported = true;\n\n try {\n document.createEvent(\"TouchEvent\");\n } catch (e) {\n touchEventsSupported = false;\n }\n\n if (touchEventsSupported) {\n inputMethods.push({\n \"move\": \"touchmove\",\n \"down\": \"touchstart\",\n \"up\": \"touchend\",\n \"accessor\": function accessor(ev) {\n if (ev.touches && ev.touches.length > 1) return null;\n if (ev.touches[0]) return {\n target: document.elementFromPoint(ev.touches[0].clientX, ev.touches[0].clientY),\n pageX: ev.touches[0].pageX,\n pageY: ev.touches[0].pageY,\n clientX: ev.touches[0].clientX,\n clientY: ev.touches[0].clientY\n };else return ev;\n }\n });\n } else if (global.navigator.pointerEnabled) {\n inputMethods.push({\n \"move\": \"pointermove\",\n \"down\": \"pointerdown\",\n \"up\": \"pointerup\",\n \"accessor\": function accessor(ev) {\n if (ev.pointerType == \"mouse\") return null;\n return ev;\n }\n });\n } else if (global.navigator.msPointerEnabled) {\n inputMethods.push({\n \"move\": \"MSPointerMove\",\n \"down\": \"MSPointerDown\",\n \"up\": \"MSPointerUp\",\n \"accessor\": function accessor(ev) {\n if (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) return null;\n return ev;\n }\n });\n }\n }\n\n return inputMethods;\n },\n clearDragTimer: function clearDragTimer() {\n if (this._drag_start_timer) {\n clearTimeout(this._drag_start_timer);\n this._drag_start_timer = null;\n }\n },\n dragStart: function dragStart(obj, e, inputMethod) {\n if (this.config && this.config.started) {\n return;\n }\n\n this.config = {\n obj: obj,\n marker: null,\n started: false,\n pos: this.getPosition(e),\n sensitivity: 4\n };\n if (this._settings) utils.mixin(this.config, this._settings, true);\n this.traceDragEvents(obj, inputMethod);\n gantt._prevent_touch_scroll = true;\n document.body.className += \" gantt_noselect\";\n\n if (gantt.config.touch) {\n this.dragMove(obj, e, inputMethod.accessor);\n }\n },\n dragMove: function dragMove(obj, e, getEvent) {\n var source = getEvent(e);\n if (!source) return false;\n\n if (!this.config.marker && !this.config.started) {\n var pos = this.getPosition(source);\n\n if (gantt.config.touch || this.checkPositionChange(pos)) {\n // real drag starts here,\n // when user moves mouse at first time after onmousedown\n this.config.started = true;\n this.config.ignore = false;\n gantt._touch_drag = true;\n\n if (this.callEvent(\"onBeforeDragStart\", [obj, this.config.original_target]) === false) {\n this.config.ignore = true;\n return false;\n }\n\n this.backupEventTarget(e, getEvent);\n this.initDnDMarker();\n\n gantt._touch_feedback();\n\n this.callEvent(\"onAfterDragStart\", [obj, this.config.original_target]);\n } else {\n this.config.ignore = true;\n }\n }\n\n if (!this.config.ignore) {\n // GS-1279 Gantt crashes on Mobile Firefox after starting to create a link and moving finger outisde the page.\n if (e.targetTouches && !source.target) return;\n source.pos = this.getPosition(source);\n this.config.marker.style.left = source.pos.x + \"px\";\n this.config.marker.style.top = source.pos.y + \"px\";\n this.callEvent(\"onDragMove\", [obj, source]);\n return true;\n }\n\n return false;\n },\n dragEnd: function dragEnd(obj) {\n var target = this.config.backup_element;\n\n if (target && target.parentNode) {\n target.parentNode.removeChild(target);\n }\n\n gantt._prevent_touch_scroll = false;\n\n if (this.config.marker) {\n this.config.marker.parentNode.removeChild(this.config.marker);\n this.config.marker = null;\n this.callEvent(\"onDragEnd\", []);\n }\n\n this.config.started = false;\n gantt._touch_drag = false;\n document.body.className = document.body.className.replace(\" gantt_noselect\", \"\");\n },\n getPosition: function getPosition(e) {\n var x = 0,\n y = 0;\n\n if (e.pageX || e.pageY) {\n x = e.pageX;\n y = e.pageY;\n } else if (e.clientX || e.clientY) {\n x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;\n y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;\n }\n\n return {\n x: x,\n y: y\n };\n }\n };\n return DnD;\n};","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar t = /*#__PURE__*/function () {\n function t(_t) {\n _classCallCheck(this, t);\n\n var e = _t.url,\n s = _t.token;\n this._url = e, this._token = s, this._mode = 1, this._seed = 1, this._queue = [], this.data = {}, this.api = {}, this._events = {};\n }\n\n _createClass(t, [{\n key: \"headers\",\n value: function headers() {\n return {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n \"Remote-Token\": this._token\n };\n }\n }, {\n key: \"fetch\",\n value: function (_fetch) {\n function fetch(_x, _x2) {\n return _fetch.apply(this, arguments);\n }\n\n fetch.toString = function () {\n return _fetch.toString();\n };\n\n return fetch;\n }(function (_t2, e) {\n var s = {\n credentials: \"include\",\n headers: this.headers()\n };\n return e && (s.method = \"POST\", s.body = e), fetch(_t2, s).then(function (_t3) {\n return _t3.json();\n });\n })\n }, {\n key: \"load\",\n value: function load(_t4) {\n var _this = this;\n\n return _t4 && (this._url = _t4), this.fetch(this._url).then(function (_t5) {\n return _this.parse(_t5);\n });\n }\n }, {\n key: \"parse\",\n value: function parse(_t6) {\n var e = _t6.key,\n s = _t6.websocket;\n e && (this._token = _t6.key);\n\n for (var _e in _t6.data) {\n this.data[_e] = _t6.data[_e];\n }\n\n for (var _e2 in _t6.api) {\n var _s = this.api[_e2] = {},\n i = _t6.api[_e2];\n\n for (var _t29 in i) {\n _s[_t29] = this._wrapper(_e2 + \".\" + _t29);\n }\n }\n\n return s && this.connect(), this;\n }\n }, {\n key: \"connect\",\n value: function connect() {\n var _this2 = this;\n\n var _t8 = this._socket;\n _t8 && (this._socket = null, _t8.onclose = function () {}, _t8.close()), this._mode = 2, this._socket = function (t, e, s, i) {\n var n = e;\n \"/\" === n[0] && (n = document.location.protocol + \"//\" + document.location.host + e);\n n = n.replace(/^http(s|):/, \"ws$1:\");\n var o = -1 != n.indexOf(\"?\") ? \"&\" : \"?\";\n n = \"\".concat(n).concat(o, \"token=\").concat(s, \"&ws=1\");\n var r = new WebSocket(n);\n return r.onclose = function () {\n return setTimeout(function () {\n return t.connect();\n }, 2e3);\n }, r.onmessage = function (e) {\n var s = JSON.parse(e.data);\n\n switch (s.action) {\n case \"result\":\n t.result(s.body, []);\n break;\n\n case \"event\":\n t.fire(s.body.name, s.body.value);\n break;\n\n case \"start\":\n i();\n break;\n\n default:\n t.onError(s.data);\n }\n }, r;\n }(this, this._url, this._token, function () {\n return _this2._mode = 3, _this2._send(), _this2._resubscribe(), _this2;\n });\n }\n }, {\n key: \"_wrapper\",\n value: function _wrapper(_t9) {\n return function () {\n var _this3 = this;\n\n var e = [].slice.call(arguments);\n var s = null;\n var i = new Promise(function (i, n) {\n s = {\n data: {\n id: _this3._uid(),\n name: _t9,\n args: e\n },\n status: 1,\n resolve: i,\n reject: n\n }, _this3._queue.push(s);\n });\n return this.onCall(s, i), 3 === this._mode ? this._send(s) : setTimeout(function () {\n return _this3._send();\n }, 1), i;\n }.bind(this);\n }\n }, {\n key: \"_uid\",\n value: function _uid() {\n return (this._seed++).toString();\n }\n }, {\n key: \"_send\",\n value: function _send(_t10) {\n var _this4 = this;\n\n if (2 == this._mode) return void setTimeout(function () {\n return _this4._send();\n }, 100);\n var e = _t10 ? [_t10] : this._queue.filter(function (_t11) {\n return 1 === _t11.status;\n });\n if (!e.length) return;\n var s = e.map(function (_t12) {\n return _t12.status = 2, _t12.data;\n });\n 3 !== this._mode ? this.fetch(this._url, JSON.stringify(s))[\"catch\"](function (_t13) {\n return _this4.onError(_t13);\n }).then(function (_t14) {\n return _this4.result(_t14, s);\n }) : this._socket.send(JSON.stringify({\n action: \"call\",\n body: s\n }));\n }\n }, {\n key: \"result\",\n value: function result(_t15, e) {\n var s = {};\n if (_t15) for (var _e3 = 0; _e3 < _t15.length; _e3++) {\n s[_t15[_e3].id] = _t15[_e3];\n } else for (var _t30 = 0; _t30 < e.length; _t30++) {\n s[e[_t30].id] = {\n id: e[_t30].id,\n error: \"Network Error\",\n data: null\n };\n }\n\n for (var _t31 = this._queue.length - 1; _t31 >= 0; _t31--) {\n var _e4 = this._queue[_t31],\n i = s[_e4.data.id];\n i && (this.onResponse(_e4, i), i.error ? _e4.reject(i.error) : _e4.resolve(i.data), this._queue.splice(_t31, 1));\n }\n }\n }, {\n key: \"on\",\n value: function on(_t18, e) {\n var s = this._uid();\n\n var i = this._events[_t18];\n var n = !!i;\n return n || (i = this._events[_t18] = []), i.push({\n id: s,\n handler: e\n }), n || 3 != this._mode || this._socket.send(JSON.stringify({\n action: \"subscribe\",\n name: _t18\n })), {\n name: _t18,\n id: s\n };\n }\n }, {\n key: \"_resubscribe\",\n value: function _resubscribe() {\n if (3 == this._mode) for (var _t32 in this._events) {\n this._socket.send(JSON.stringify({\n action: \"subscribe\",\n name: _t32\n }));\n }\n }\n }, {\n key: \"detach\",\n value: function detach(_t20) {\n if (!_t20) {\n if (3 == this._mode) for (var _t33 in this._events) {\n this._socket.send(JSON.stringify({\n action: \"unsubscribe\",\n key: _t33\n }));\n }\n return void (this._events = {});\n }\n\n var e = _t20.id,\n s = _t20.name,\n i = this._events[s];\n\n if (i) {\n var _t34 = i.filter(function (_t23) {\n return _t23.id != e;\n });\n\n _t34.length ? this._events[s] = _t34 : (delete this._events[s], 3 == this._mode && this._socket.send(JSON.stringify({\n action: \"unsubscribe\",\n name: s\n })));\n }\n }\n }, {\n key: \"fire\",\n value: function fire(_t24, e) {\n var s = this._events[_t24];\n if (s) for (var _t35 = 0; _t35 < s.length; _t35++) {\n s[_t35].handler(e);\n }\n }\n }, {\n key: \"onError\",\n value: function onError(_t26) {\n return null;\n }\n }, {\n key: \"onCall\",\n value: function onCall(_t27, e) {}\n }, {\n key: \"onResponse\",\n value: function onResponse(_t28, e) {}\n }]);\n\n return t;\n}();\n\nexport { t as Client };","var remote_client = require(\"remote-client\");\n\nmodule.exports = {\n remoteEvents: function remoteEvents(url, token) {\n var _this = this;\n\n var remote = new remote_client.Client({\n url: url,\n token: token\n }); // temporary patch, as we do not want credentials\n\n remote.fetch = function (url, body) {\n var req = {\n headers: this.headers()\n };\n\n if (body) {\n req.method = \"POST\";\n req.body = body;\n }\n\n return fetch(url, req).then(function (res) {\n return res.json();\n });\n };\n\n this._ready = remote.load().then(function (back) {\n return _this._remote = back;\n });\n\n function ready() {\n return this._ready;\n }\n\n function on(name, handler) {\n this.ready().then(function (back) {\n if (typeof name === \"string\") back.on(name, handler);else {\n for (var key in name) {\n back.on(key, name[key]);\n }\n }\n });\n }\n\n this.ready = ready;\n this.on = on;\n }\n};","const dateToStr = (format: string, utc: boolean, gantt) => {\r\n\treturn (date) => {\r\n\t\treturn format.replace(/%[a-zA-Z]/g, (a) => {\r\n\t\t\tswitch (a) {\r\n\t\t\t\tcase \"%d\": return utc ? gantt.date.to_fixed(date.getUTCDate()) : gantt.date.to_fixed(date.getDate());\r\n\t\t\t\tcase \"%m\": return utc ? gantt.date.to_fixed((date.getUTCMonth() + 1)) : gantt.date.to_fixed((date.getMonth() + 1));\r\n\t\t\t\tcase \"%j\": return utc ? date.getUTCDate() : date.getDate();\r\n\t\t\t\tcase \"%n\": return utc ? (date.getUTCMonth() + 1) : (date.getMonth() + 1);\r\n\t\t\t\tcase \"%y\": return utc ? gantt.date.to_fixed(date.getUTCFullYear() % 100) : gantt.date.to_fixed(date.getFullYear() % 100);\r\n\t\t\t\tcase \"%Y\": return utc ? date.getUTCFullYear() : date.getFullYear();\r\n\t\t\t\tcase \"%D\": return utc ? gantt.locale.date.day_short[date.getUTCDay()] : gantt.locale.date.day_short[date.getDay()];\r\n\t\t\t\tcase \"%l\": return utc ? gantt.locale.date.day_full[date.getUTCDay()] : gantt.locale.date.day_full[date.getDay()];\r\n\t\t\t\tcase \"%M\": return utc ? gantt.locale.date.month_short[date.getUTCMonth()] : gantt.locale.date.month_short[date.getMonth()];\r\n\t\t\t\tcase \"%F\": return utc ? gantt.locale.date.month_full[date.getUTCMonth()] : gantt.locale.date.month_full[date.getMonth()];\r\n\t\t\t\tcase \"%h\": return utc ? gantt.date.to_fixed((date.getUTCHours() + 11) % 12 + 1) : gantt.date.to_fixed((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%g\": return utc ? ((date.getUTCHours() + 11) % 12 + 1) : ((date.getHours() + 11) % 12 + 1);\r\n\t\t\t\tcase \"%G\": return utc ? date.getUTCHours() : date.getHours();\r\n\t\t\t\tcase \"%H\": return utc ? gantt.date.to_fixed(date.getUTCHours()) : gantt.date.to_fixed(date.getHours());\r\n\t\t\t\tcase \"%i\": return utc ? gantt.date.to_fixed(date.getUTCMinutes()) : gantt.date.to_fixed(date.getMinutes());\r\n\t\t\t\tcase \"%a\": return utc ? (date.getUTCHours() > 11 ? \"pm\" : \"am\") : (date.getHours() > 11 ? \"pm\" : \"am\");\r\n\t\t\t\tcase \"%A\": return utc ? (date.getUTCHours() > 11 ? \"PM\" : \"AM\") : (date.getHours() > 11 ? \"PM\" : \"AM\");\r\n\t\t\t\tcase \"%s\": return utc ? gantt.date.to_fixed(date.getUTCSeconds()) : gantt.date.to_fixed(date.getSeconds());\r\n\t\t\t\tcase \"%W\": return utc ? gantt.date.to_fixed(gantt.date.getUTCISOWeek(date)) : gantt.date.to_fixed(gantt.date.getISOWeek(date));\r\n\t\t\t\tdefault: return a;\r\n\t\t\t}\r\n\t\t});\r\n\t};\r\n};\r\nconst strToDate = (format: string, utc: boolean, gantt:any) => {\r\n\treturn (date: string) => {\r\n\t\tconst set: Array = [0, 0, 1, 0, 0, 0];\r\n\t\tconst temp = date.match(/[a-zA-Z]+|[0-9]+/g);\r\n\t\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\r\n\t\tfor (let i = 0; i < mask.length; i++) {\r\n\t\t\tswitch (mask[i]) {\r\n\t\t\t\tcase \"%j\":\r\n\t\t\t\tcase \"%d\":\r\n\t\t\t\t\tset[2] = temp[i] as unknown as number || 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%n\":\r\n\t\t\t\tcase \"%m\":\r\n\t\t\t\t\tset[1] = (temp[i] as unknown as number || 1) - 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%y\":\r\n\t\t\t\t\tset[0] = temp[i] as unknown as number * 1 + ((temp[i] as unknown as number) > 50 ? 1900 : 2000);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%g\":\r\n\t\t\t\tcase \"%G\":\r\n\t\t\t\tcase \"%h\":\r\n\t\t\t\tcase \"%H\":\r\n\t\t\t\t\tset[3] = temp[i] as unknown as number || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%i\":\r\n\t\t\t\t\tset[4] = temp[i] as unknown as number || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%Y\":\r\n\t\t\t\t\tset[0] = temp[i] as unknown as number || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%a\":\r\n\t\t\t\tcase \"%A\":\r\n\t\t\t\t\tset[3] = set[3] as number % 12 + ((temp[i] || \"\").toLowerCase() === \"am\" ? 0 : 12);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%s\":\r\n\t\t\t\t\tset[5] = temp[i] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%M\":\r\n\t\t\t\t\tset[1] = gantt.locale.date.month_short_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"%F\":\r\n\t\t\t\t\tset[1] = gantt.locale.date.month_full_hash[temp[i]] || 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (utc) {\r\n\t\t\treturn new Date(Date.UTC(\r\n\t\t\t\tset[0] as number,\r\n\t\t\t\tset[1] as number,\r\n\t\t\t\tset[2] as number,\r\n\t\t\t\tset[3] as number,\r\n\t\t\t\tset[4] as number,\r\n\t\t\t\tset[5] as number\r\n\t\t\t));\r\n\t\t}\r\n\t\treturn new Date(\r\n\t\t\tset[0] as number,\r\n\t\t\tset[1] as number,\r\n\t\t\tset[2] as number,\r\n\t\t\tset[3] as number,\r\n\t\t\tset[4] as number,\r\n\t\t\tset[5] as number\r\n\t\t);\r\n\t};\r\n\r\n};\r\n\r\n\r\nconst cspVersion = {\r\n\tdate_to_str: dateToStr,\r\n\tstr_to_date: strToDate\r\n};\r\n\r\nexport default cspVersion;","const dateToStr = (format: string, utc: boolean, gantt) => {\r\n\tformat = format.replace(/%[a-zA-Z]/g, (a) => {\r\n\t\tswitch (a) {\r\n\t\t\tcase \"%d\":\r\n\t\t\t\treturn `\"+to_fixed(date.get${utc?\"UTC\":\"\"}Date())+\"`;\r\n\t\t\tcase \"%m\":\r\n\t\t\t\treturn `\"+to_fixed((date.get${utc?\"UTC\":\"\"}Month()+1))+\"`;\r\n\t\t\tcase \"%j\":\r\n\t\t\t\treturn `\"+date.get${utc?\"UTC\":\"\"}Date()+\"`;\r\n\t\t\tcase \"%n\":\r\n\t\t\t\treturn `\"+(date.get${utc?\"UTC\":\"\"}Month()+1)+\"`;\r\n\t\t\tcase \"%y\":\r\n\t\t\t\treturn `\"+to_fixed(date.get${utc?\"UTC\":\"\"}FullYear()%100)+\"`;\r\n\t\t\tcase \"%Y\":\r\n\t\t\t\treturn `\"+date.get${utc?\"UTC\":\"\"}FullYear()+\"`;\r\n\t\t\tcase \"%D\":\r\n\t\t\t\treturn `\"+locale.date.day_short[date.get${utc?\"UTC\":\"\"}Day()]+\"`;\r\n\t\t\tcase \"%l\":\r\n\t\t\t\treturn `\"+locale.date.day_full[date.get${utc?\"UTC\":\"\"}Day()]+\"`;\r\n\t\t\tcase \"%M\":\r\n\t\t\t\treturn `\"+locale.date.month_short[date.get${utc?\"UTC\":\"\"}Month()]+\"`;\r\n\t\t\tcase \"%F\":\r\n\t\t\t\treturn `\"+locale.date.month_full[date.get${utc?\"UTC\":\"\"}Month()]+\"`;\r\n\t\t\tcase \"%h\":\r\n\t\t\t\treturn `\"+to_fixed((date.get${utc?\"UTC\":\"\"}Hours()+11)%12+1)+\"`;\r\n\t\t\tcase \"%g\":\r\n\t\t\t\treturn `\"+((date.get${utc?\"UTC\":\"\"}Hours()+11)%12+1)+\"`;\r\n\t\t\tcase \"%G\":\r\n\t\t\t\treturn `\"+date.get${utc?\"UTC\":\"\"}Hours()+\"`;\r\n\t\t\tcase \"%H\":\r\n\t\t\t\treturn `\"+to_fixed(date.get${utc?\"UTC\":\"\"}Hours())+\"`;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\treturn `\"+to_fixed(date.get${utc?\"UTC\":\"\"}Minutes())+\"`;\r\n\t\t\tcase \"%a\":\r\n\t\t\t\treturn `\"+(date.get${utc?\"UTC\":\"\"}Hours()>11?\"pm\":\"am\")+\"`;\r\n\t\t\tcase \"%A\":\r\n\t\t\t\treturn `\"+(date.get${utc?\"UTC\":\"\"}Hours()>11?\"PM\":\"AM\")+\"`;\r\n\t\t\tcase \"%s\":\r\n\t\t\t\treturn `\"+to_fixed(date.get${utc?\"UTC\":\"\"}Seconds())+\"`;\r\n\t\t\tcase \"%W\":\r\n\t\t\t\treturn `\"+to_fixed(getISOWeek(date))+\"`;\r\n\t\t\tcase \"%w\":\r\n\t\t\t\treturn `\"+to_fixed(getWeek(date))+\"`;\r\n\t\t\tdefault:\r\n\t\t\t\treturn a;\r\n\t\t}\r\n\t});\r\n\r\n\t// tslint:disable-next-line: function-constructor\r\n\tconst dateToStrFn = new Function(\"date\", \"to_fixed\", \"locale\", \"getISOWeek\", \"getWeek\", `return \"${format}\";`);\r\n\r\n\treturn (date: Date) => {\r\n\t\treturn dateToStrFn(date, gantt.date.to_fixed, gantt.locale, gantt.date.getISOWeek, gantt.date.getWeek);\r\n\t};\r\n};\r\n\r\n\r\nconst strToDate = (format: string, utc: boolean, gantt:any) => {\r\n\tlet splt = \"var temp=date.match(/[a-zA-Z]+|[0-9]+/g);\";\r\n\tconst mask = format.match(/%[a-zA-Z]/g);\r\n\tfor (let i = 0; i < mask.length; i++) {\r\n\t\tswitch (mask[i]) {\r\n\t\t\tcase \"%j\":\r\n\t\t\tcase \"%d\":\r\n\t\t\t\tsplt += `set[2]=temp[${i}]||1;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%n\":\r\n\t\t\tcase \"%m\":\r\n\t\t\t\tsplt += `set[1]=(temp[${i}]||1)-1;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%y\":\r\n\t\t\t\tsplt += `set[0]=temp[${i}]*1+(temp[${i}]>50?1900:2000);`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%g\":\r\n\t\t\tcase \"%G\":\r\n\t\t\tcase \"%h\":\r\n\t\t\tcase \"%H\":\r\n\t\t\t\tsplt += `set[3]=temp[${i}]||0;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%i\":\r\n\t\t\t\tsplt += `set[4]=temp[${i}]||0;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%Y\":\r\n\t\t\t\tsplt += `set[0]=temp[${i}]||0;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%a\":\r\n\t\t\tcase \"%A\":\r\n\t\t\t\tsplt += `set[3]=set[3]%12+((temp[${i}]||'').toLowerCase()=='am'?0:12);`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%s\":\r\n\t\t\t\tsplt += `set[5]=temp[${i}]||0;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%M\":\r\n\t\t\t\tsplt += `set[1]=locale.date.month_short_hash[temp[${i}]]||0;`;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"%F\":\r\n\t\t\t\tsplt += `set[1]=locale.date.month_full_hash[temp[${i}]]||0;`;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tlet code = \"set[0],set[1],set[2],set[3],set[4],set[5]\";\r\n\tif (utc) { code = ` Date.UTC(${code})`; }\r\n\t// tslint:disable-next-line: function-constructor\r\n\tconst strToDateFn = new Function(\"date\", \"locale\", `var set=[0,0,1,0,0,0]; ${splt} return new Date(${code});`);\r\n\r\n\treturn (dateString) => {\r\n\t\treturn strToDateFn(dateString, gantt.locale);\r\n\t};\r\n};\r\n\r\nconst fastVersion = {\r\n\tdate_to_str: dateToStr,\r\n\tstr_to_date: strToDate\r\n};\r\n\r\nexport default fastVersion;","/*\r\n %d - the day as a number with a leading zero ( 01 to 31 );\r\n %j - the day as a number without a leading zero ( 1 to 31 );\r\n %D - the day as an abbreviation ( Sun to Sat );\r\n %l - the day as a full name ( Sunday to Saturday );\r\n %W - the ISO-8601 week number of the year. Weeks start on Monday; 1)\r\n %m - the month as a number without a leading zero ( 1 to 12 );\r\n %n - the month as a number with a leading zero ( 01 to 12);\r\n %M - the month as an abbreviation ( Jan to Dec );\r\n %F - the month as a full name ( January to December );\r\n %y - the year as a two-digit number ( 00 to 99 );\r\n %Y - the year as a four-digit number ( 1900–9999 );\r\n %h - the hour based on the 12-hour clock ( 00 to 11 );\r\n %H - the hour based on the 24-hour clock ( 00 to 23 );\r\n %i - the minute as a number with a leading zero ( 00 to 59 );\r\n %s - the second as a number without a leading zero ( 00 to 59 ); 2)\r\n %a - displays am (for times from midnight until noon) and pm (for times from noon until midnight);\r\n %A - displays AM (for times from midnight until noon) and PM (for times from noon until midnight).\r\n*/\nvar fastVersion = require(\"./date_parsers/fast_version\")[\"default\"];\n\nvar cspCompliantVersion = require(\"./date_parsers/csp_compliant_version\")[\"default\"];\n\nmodule.exports = function (gantt) {\n var canUseCsp = null;\n\n function cspAutoCheck() {\n try {\n new Function(\"canUseCsp = false;\");\n } catch (e) {\n canUseCsp = true;\n }\n }\n\n function useCsp() {\n var result = false;\n\n if (gantt.config.csp === \"auto\") {\n if (canUseCsp === null) {\n cspAutoCheck();\n }\n\n result = canUseCsp;\n } else {\n result = gantt.config.csp;\n }\n\n return result;\n }\n\n var dateHelper = {\n init: function init() {\n var locale = gantt.locale;\n var s = locale.date.month_short;\n var t = locale.date.month_short_hash = {};\n\n for (var i = 0; i < s.length; i++) {\n t[s[i]] = i;\n }\n\n var s = locale.date.month_full;\n var t = locale.date.month_full_hash = {};\n\n for (var i = 0; i < s.length; i++) {\n t[s[i]] = i;\n }\n },\n date_part: function date_part(date) {\n var old = new Date(date);\n date.setHours(0);\n this.hour_start(date);\n if (date.getHours() && ( //shift to yesterday on dst\n date.getDate() < old.getDate() || date.getMonth() < old.getMonth() || date.getFullYear() < old.getFullYear())) date.setTime(date.getTime() + 60 * 60 * 1000 * (24 - date.getHours()));\n return date;\n },\n time_part: function time_part(date) {\n return (date.valueOf() / 1000 - date.getTimezoneOffset() * 60) % 86400;\n },\n week_start: function week_start(date) {\n var shift = date.getDay();\n\n if (gantt.config.start_on_monday) {\n if (shift === 0) shift = 6;else shift--;\n }\n\n return this.date_part(this.add(date, -1 * shift, \"day\"));\n },\n month_start: function month_start(date) {\n date.setDate(1);\n return this.date_part(date);\n },\n quarter_start: function quarter_start(date) {\n this.month_start(date);\n var m = date.getMonth(),\n res_month;\n\n if (m >= 9) {\n res_month = 9;\n } else if (m >= 6) {\n res_month = 6;\n } else if (m >= 3) {\n res_month = 3;\n } else {\n res_month = 0;\n }\n\n date.setMonth(res_month);\n return date;\n },\n year_start: function year_start(date) {\n date.setMonth(0);\n return this.month_start(date);\n },\n day_start: function day_start(date) {\n return this.date_part(date);\n },\n hour_start: function hour_start(date) {\n if (date.getMinutes()) date.setMinutes(0);\n this.minute_start(date);\n return date;\n },\n minute_start: function minute_start(date) {\n if (date.getSeconds()) date.setSeconds(0);\n if (date.getMilliseconds()) date.setMilliseconds(0);\n return date;\n },\n _add_days: function _add_days(modifiedDate, inc, originalDate) {\n modifiedDate.setDate(modifiedDate.getDate() + inc);\n var incCondition = inc >= 0;\n var getHoursCondition = !originalDate.getHours() && modifiedDate.getHours(); //shift to yesterday on dst\n\n var getDateCondition = modifiedDate.getDate() <= originalDate.getDate() || modifiedDate.getMonth() < originalDate.getMonth() || modifiedDate.getFullYear() < originalDate.getFullYear();\n\n if (incCondition && getHoursCondition && getDateCondition) {\n modifiedDate.setTime(modifiedDate.getTime() + 60 * 60 * 1000 * (24 - modifiedDate.getHours()));\n }\n\n var worktimeCalculation = inc > 1;\n\n if (worktimeCalculation && getHoursCondition) {\n // try to shift the modified Date to 00:00\n modifiedDate.setHours(0);\n }\n\n return modifiedDate;\n },\n add: function add(date, inc, mode) {\n /*jsl:ignore*/\n var ndate = new Date(date.valueOf());\n\n switch (mode) {\n case \"day\":\n ndate = this._add_days(ndate, inc, date);\n break;\n\n case \"week\":\n ndate = this._add_days(ndate, inc * 7, date);\n break;\n\n case \"month\":\n ndate.setMonth(ndate.getMonth() + inc);\n break;\n\n case \"year\":\n ndate.setYear(ndate.getFullYear() + inc);\n break;\n\n case \"hour\":\n /*\r\n \tadding hours/minutes via setHour(getHour() + inc) gives weird result when\r\n \tadding one hour to the time before switch to a Daylight Saving time\r\n \t\t\texample: //Sun Mar 30 2014 01:00:00 GMT+0100 (W. Europe Standard Time)\r\n \tnew Date(2014, 02, 30, 1).setHours(2)\r\n \t>>Sun Mar 30 2014 01:00:00 GMT+0100 (W. Europe Standard Time)\r\n \t\t\tsetTime seems working as expected\r\n */\n ndate.setTime(ndate.getTime() + inc * 60 * 60 * 1000);\n break;\n\n case \"minute\":\n ndate.setTime(ndate.getTime() + inc * 60 * 1000);\n break;\n\n default:\n return this[\"add_\" + mode](date, inc, mode);\n }\n\n return ndate;\n /*jsl:end*/\n },\n add_quarter: function add_quarter(date, inc) {\n return this.add(date, inc * 3, \"month\");\n },\n to_fixed: function to_fixed(num) {\n if (num < 10) return \"0\" + num;\n return num;\n },\n copy: function copy(date) {\n return new Date(date.valueOf());\n },\n date_to_str: function date_to_str(format, utc) {\n var result = fastVersion;\n\n if (useCsp()) {\n result = cspCompliantVersion;\n }\n\n return result.date_to_str(format, utc, gantt);\n },\n str_to_date: function str_to_date(format, utc) {\n var result = fastVersion;\n\n if (useCsp()) {\n result = cspCompliantVersion;\n }\n\n return result.str_to_date(format, utc, gantt);\n },\n getISOWeek: function getISOWeek(ndate) {\n return gantt.date._getWeekNumber(ndate, true);\n },\n _getWeekNumber: function _getWeekNumber(ndate, isoWeek) {\n if (!ndate) return false;\n var nday = ndate.getDay();\n\n if (isoWeek) {\n if (nday === 0) {\n nday = 7;\n }\n }\n\n var first_thursday = new Date(ndate.valueOf());\n first_thursday.setDate(ndate.getDate() + (4 - nday));\n var year_number = first_thursday.getFullYear(); // year of the first Thursday\n\n var ordinal_date = Math.round((first_thursday.getTime() - new Date(year_number, 0, 1).getTime()) / 86400000); //ordinal date of the first Thursday - 1 (so not really ordinal date)\n\n var week_number = 1 + Math.floor(ordinal_date / 7);\n return week_number;\n },\n getWeek: function getWeek(ndate) {\n return gantt.date._getWeekNumber(ndate, gantt.config.start_on_monday);\n },\n getUTCISOWeek: function getUTCISOWeek(ndate) {\n return gantt.date.getISOWeek(ndate);\n },\n convert_to_utc: function convert_to_utc(date) {\n return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds());\n },\n parseDate: function parseDate(date, format) {\n // raw date may be of type string, number (timestamp) or something else\n // do not check for instanceof Date explicitly, since we may swap native date with different date implementation at some point\n if (date && !date.getFullYear) {\n if (typeof format !== \"function\") {\n if (typeof format === \"string\") {\n if (format === \"parse_date\" || format === \"xml_date\") {\n format = gantt.defined(gantt.templates.xml_date) ? gantt.templates.xml_date : gantt.templates.parse_date;\n } else {\n format = gantt.defined(gantt.templates[format]) ? gantt.templates[format] : gantt.date.str_to_date(format);\n }\n } else {\n format = gantt.defined(gantt.templates.xml_date) ? gantt.templates.xml_date : gantt.templates.parse_date;\n }\n }\n\n if (date) {\n date = format(date);\n } else {\n date = null;\n }\n }\n\n return date;\n }\n };\n return dateHelper;\n};","export default function serialize(data: object | string) {\r\n\tif (typeof data === \"string\" || typeof data === \"number\") {\r\n\t\treturn data;\r\n\t}\r\n\r\n\tlet result = \"\";\r\n\r\n\tfor (const key in data) {\r\n\t\tlet serialized = \"\";\r\n\t\tif (data.hasOwnProperty(key)) {\r\n\t\t\tif (typeof data[key] === \"string\") {\r\n\t\t\t\tserialized = encodeURIComponent(data[key]);\r\n\t\t\t} else if (typeof data[key] === \"number\") {\r\n\t\t\t\tserialized = data[key];\r\n\t\t\t} else {\r\n\t\t\t\tserialized = encodeURIComponent(JSON.stringify(data[key]));\r\n\t\t\t}\r\n\t\t\tserialized = key + \"=\" + serialized;\r\n\r\n\t\t\tif (result.length) {\r\n\t\t\t\tserialized = \"&\" + serialized;\r\n\t\t\t}\r\n\t\t\tresult += serialized;\r\n\t\t}\r\n\t}\r\n\treturn result;\r\n}\r\n","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar env = require(\"../../utils/env\");\n\nvar global = require(\"../../utils/global\");\n\nvar serialize = require(\"./serialize\")[\"default\"];\n\nfunction createConfig(method, args) {\n var result = {\n method: method\n };\n\n if (args.length === 0) {\n throw new Error(\"Arguments list of query is wrong.\");\n }\n\n if (args.length === 1) {\n if (typeof args[0] === \"string\") {\n result.url = args[0];\n result.async = true;\n } else {\n result.url = args[0].url;\n result.async = args[0].async || true;\n result.callback = args[0].callback;\n result.headers = args[0].headers;\n }\n\n if (method === \"POST\" || \"PUT\") {\n if (args[0].data) {\n if (typeof args[0].data !== \"string\") {\n result.data = serialize(args[0].data);\n } else {\n result.data = args[0].data;\n }\n } else {\n result.data = \"\";\n }\n }\n\n return result;\n }\n\n result.url = args[0];\n\n switch (method) {\n case \"GET\":\n case \"DELETE\":\n result.callback = args[1];\n result.headers = args[2];\n break;\n\n case \"POST\":\n case \"PUT\":\n if (args[1]) {\n if (typeof args[1] !== \"string\") {\n result.data = serialize(args[1]);\n } else {\n result.data = args[1];\n }\n } else {\n result.data = \"\";\n }\n\n result.callback = args[2];\n result.headers = args[3];\n break;\n }\n\n return result;\n}\n\nmodule.exports = function (gantt) {\n return {\n // if false - dhxr param will added to prevent caching on client side (default),\n // if true - do not add extra params\n cache: true,\n // default method for load/loadStruct, post/get allowed\n // get - since 4.1.1, this should fix 412 error for macos safari\n method: \"get\",\n parse: function parse(data) {\n if (typeof data !== \"string\") return data;\n var obj;\n data = data.replace(/^[\\s]+/, \"\");\n\n if (typeof DOMParser !== \"undefined\" && !env.isIE) {\n // ff,ie9\n obj = new DOMParser().parseFromString(data, \"text/xml\");\n } else if (typeof global.ActiveXObject !== \"undefined\") {\n obj = new global.ActiveXObject(\"Microsoft.XMLDOM\");\n obj.async = \"false\";\n obj.loadXML(data);\n }\n\n return obj;\n },\n xmltop: function xmltop(tagname, xhr, obj) {\n if (typeof xhr.status == \"undefined\" || xhr.status < 400) {\n var xml = !xhr.responseXML ? this.parse(xhr.responseText || xhr) : xhr.responseXML || xhr;\n\n if (xml && xml.documentElement !== null && !xml.getElementsByTagName(\"parsererror\").length) {\n return xml.getElementsByTagName(tagname)[0];\n }\n }\n\n if (obj !== -1) gantt.callEvent(\"onLoadXMLError\", [\"Incorrect XML\", arguments[1], obj]);\n return document.createElement(\"DIV\");\n },\n xpath: function xpath(xpathExp, docObj) {\n if (!docObj.nodeName) docObj = docObj.responseXML || docObj;\n\n if (env.isIE) {\n return docObj.selectNodes(xpathExp) || [];\n } else {\n var rows = [];\n var first;\n var col = (docObj.ownerDocument || docObj).evaluate(xpathExp, docObj, null, XPathResult.ANY_TYPE, null);\n\n while (true) {\n first = col.iterateNext();\n\n if (first) {\n rows.push(first);\n } else {\n break;\n }\n }\n\n return rows;\n }\n },\n query: function query(config) {\n return this._call(config.method || \"GET\", config.url, config.data || \"\", config.async || true, config.callback, config.headers);\n },\n get: function get(url, onLoad, headers) {\n var config = createConfig(\"GET\", arguments);\n return this.query(config);\n },\n getSync: function getSync(url, headers) {\n var config = createConfig(\"GET\", arguments);\n config.async = false;\n return this.query(config);\n },\n put: function put(url, postData, onLoad, headers) {\n var config = createConfig(\"PUT\", arguments);\n return this.query(config);\n },\n del: function del(url, onLoad, headers) {\n /**\r\n * https://tools.ietf.org/html/rfc7231#section-4.3.5\r\n * A payload within a DELETE request message has no defined semantics;\r\n * sending a payload body on a DELETE request might cause some existing\r\n * implementations to reject the request.\r\n */\n var config = createConfig(\"DELETE\", arguments);\n return this.query(config);\n },\n post: function post(url, postData, onLoad, headers) {\n if (arguments.length == 1) {\n postData = \"\";\n } else if (arguments.length == 2 && typeof postData == \"function\") {\n onLoad = postData;\n postData = \"\";\n }\n\n var config = createConfig(\"POST\", arguments);\n return this.query(config);\n },\n postSync: function postSync(url, postData, headers) {\n postData = postData === null ? \"\" : String(postData);\n var config = createConfig(\"POST\", arguments);\n config.async = false;\n return this.query(config);\n },\n _call: function _call(method, url, postData, async, onLoad, headers) {\n return new gantt.Promise(function (resolve, reject) {\n var t = (typeof XMLHttpRequest === \"undefined\" ? \"undefined\" : _typeof(XMLHttpRequest)) !== undefined ? new XMLHttpRequest() : new global.ActiveXObject(\"Microsoft.XMLHTTP\");\n var isQt = navigator.userAgent.match(/AppleWebKit/) !== null && navigator.userAgent.match(/Qt/) !== null && navigator.userAgent.match(/Safari/) !== null;\n\n if (!!async) {\n t.onreadystatechange = function () {\n if (t.readyState == 4 || isQt && t.readyState == 3) {\n // what for long response and status 404?\n if (t.status != 200 || t.responseText === \"\") if (!gantt.callEvent(\"onAjaxError\", [t])) return;\n setTimeout(function () {\n if (typeof onLoad == \"function\") {\n onLoad.apply(global, [{\n xmlDoc: t,\n filePath: url\n }]); // dhtmlx-compat, response.xmlDoc.responseXML/responseText\n }\n\n resolve(t);\n\n if (typeof onLoad == \"function\") {\n onLoad = null;\n t = null;\n }\n }, 0);\n }\n };\n }\n\n var noCache = !this || !this.cache;\n\n if (method == \"GET\" && noCache) {\n url += (url.indexOf(\"?\") >= 0 ? \"&\" : \"?\") + \"dhxr\" + new Date().getTime() + \"=1\";\n }\n\n t.open(method, url, async);\n\n if (headers) {\n for (var key in headers) {\n t.setRequestHeader(key, headers[key]);\n }\n } else if (method.toUpperCase() == \"POST\" || method == \"PUT\" || method == \"DELETE\") {\n t.setRequestHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n } else if (method == \"GET\") {\n postData = null;\n }\n\n t.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n t.send(postData);\n if (!async) return {\n xmlDoc: t,\n filePath: url\n }; // dhtmlx-compat, response.xmlDoc.responseXML/responseText\n });\n },\n urlSeparator: function urlSeparator(str) {\n if (str.indexOf(\"?\") != -1) return \"&\";else return \"?\";\n }\n };\n};","type DurationUnits = \"minute\" | \"hour\" | \"day\" | \"week\" | \"month\" | \"year\";\r\ntype Align = \"left\" | \"center\" | \"right\";\r\ntype SectionType = \"textarea\"\r\n\t\t\t\t\t| \"time\"\r\n\t\t\t\t\t| \"duration\"\r\n\t\t\t\t\t| \"select\"\r\n\t\t\t\t\t| \"typeselect\"\r\n\t\t\t\t\t| \"parent\"\r\n\t\t\t\t\t| \"template\"\r\n\t\t\t\t\t| \"checkbox\"\r\n\t\t\t\t\t| \"radio\"\r\n\t\t\t\t\t| \"resources\"\r\n\t\t\t\t\t| \"constraint\";\r\n\r\ntype LightboxSection = Array;\r\n\r\ntype LayoutView = \"grid\"\r\n\t| \"timeline\"\r\n\t| \"resizer\"\r\n\t| \"scrollbar\"\r\n\t| \"resourceGrid\"\r\n\t| \"resourceTimeline\";\r\n\r\ninterface IColumnItem {\r\n\tname: string;\r\n\tlabel?: string;\r\n\ttree?: boolean;\r\n\talign?: Align;\r\n\thide?: boolean;\r\n\tmax_width?: number;\r\n\tmin_width?: number;\r\n\tresize?: boolean;\r\n\ttemplate?: (obj: any) => string;\r\n\twidth?: number | \"*\";\r\n}\r\n\r\nexport type TModifierKeys = \"metaKey\" | \"ctrlKey\" | \"altKey\" | \"shiftKey\" | false | undefined;\r\n\r\nexport interface IScale {\r\n\tcss?: () => string;\r\n\tdate?: string;\r\n\tstep: number;\r\n\ttemplate?: (date: Date) => string;\r\n\tunit: DurationUnits;\r\n}\r\n\r\ninterface ILightboxSection {\r\n\tname: string;\r\n\tmap_to: string;\r\n\ttype: SectionType;\r\n\theight?: number;\r\n\tfocus?: boolean;\r\n}\r\n\r\ninterface ILightboxTimeAndDurationSection extends ILightboxSection {\r\n\treadonly: boolean;\r\n\tyear_range: number[] | number;\r\n\tsingle_date: boolean;\r\n\ttime_format: string;\r\n}\r\n\r\ninterface ILightboxInputControl extends ILightboxSection {\r\n\tdefault_value?: any;\r\n\toptions?: Array<{key: string, label: string}>;\r\n}\r\n\r\ninterface ILightboxSelectControl extends ILightboxInputControl {\r\n\tonchange: () => boolean | undefined;\r\n}\r\n\r\ninterface ILightboxParentControl extends ILightboxSection {\r\n\tallow_root: boolean;\r\n\troot_label: string;\r\n\tsort?: (a: any, b: any) => -1 | 0 | 1;\r\n\tfilter?: (task: string | number | object) => boolean;\r\n\ttemplate?: (start: Date, end: Date, ev: object) => string;\r\n}\r\n\r\ninterface ILightboxTypeselectControl extends ILightboxSection {\r\n\tfilter?: (typeName: string) => boolean;\r\n}\r\n\r\n\r\ninterface ILayoutScrollbar {\r\n\tview: \"scrollbar\";\r\n\tscroll?: \"x\" | \"y\";\r\n\tid: string;\r\n\theight?: number;\r\n\twidth?: number;\r\n}\r\n\r\ninterface ILayoutView {\r\n\tview: LayoutView;\r\n\tid?: string;\r\n\tscrollX?: string;\r\n\tscrollY?: string;\r\n\tconfig?: object;\r\n}\r\n\r\ninterface ILayoutGrid extends ILayoutView {\r\n\tview: \"grid\";\r\n\tbind?: string;\r\n}\r\n\r\ninterface ILayoutTimeline extends ILayoutView {\r\n\tview: \"timeline\";\r\n\tbindLinks?: string;\r\n\tlayers?: any[];\r\n}\r\n\r\ninterface ILayoutResizer {\r\n\tview?: undefined;\r\n\tresizer: boolean;\r\n\twidth: number;\r\n}\r\n\r\ninterface ILayoutResourceGrid extends ILayoutView {\r\n\tview: \"resourceGrid\";\r\n\twidth: number;\r\n\tgroup: \"string\";\r\n}\r\n\r\ninterface ILayoutResourceTimeline extends ILayoutView {\r\n\tview: \"resourceTimeline\";\r\n\twidth: number;\r\n\tgroup: \"string\";\r\n}\r\n\r\ninterface ILayoutHtml {\r\n\thtml: string;\r\n\tcss: string;\r\n\twidth: number;\r\n}\r\n\r\ntype LayoutRow = ILayoutGrid\r\n\t| ILayoutTimeline\r\n\t| ILayoutResizer\r\n\t| ILayoutResourceGrid\r\n\t| ILayoutResourceTimeline\r\n\t| ILayoutHtml\r\n\t| ILayoutScrollbar\r\n\t| { cols: LayoutCol[] };\r\n\r\ntype LayoutCol = ILayoutGrid\r\n\t| ILayoutTimeline\r\n\t| ILayoutResizer\r\n\t| ILayoutResourceGrid\r\n\t| ILayoutResourceTimeline\r\n\t| ILayoutHtml\r\n\t| ILayoutScrollbar\r\n\t| { rows: LayoutRow[] };\r\n\r\ninterface ILayout {\r\n\tcss: string;\r\n\trows?: LayoutRow[];\r\n\tcols?: LayoutCol[];\r\n}\r\n\r\ntype TCsp = boolean | \"auto\";\r\n\r\ninterface IResourceConfig {\r\n\tdataprocessor_assignments?: boolean;\r\n\tdataprocessor_resources?: boolean;\r\n\teditable_resource_diagram?: boolean;\r\n\tresource_store?: {\r\n\t\ttype?: \"treeDataStore\"|\"dataStore\"|string;\r\n\t\tfetchTasks?: boolean;\r\n\t\tinitItem?: (item: any) => any;\r\n\t};\r\n\tlightbox_resources?: (resources: any[]) => any[];\r\n\r\n}\r\n\r\ninterface IGanttConfig {\r\n\tlayout: ILayout;\r\n\tlinks: {\r\n\t\tfinish_to_start: \"0\";\r\n\t\tstart_to_start: \"1\";\r\n\t\tfinish_to_finish: \"2\";\r\n\t\tstart_to_finish: \"3\";\r\n\t};\r\n\ttypes: {\r\n\t\ttask: string;\r\n\t\tproject: string;\r\n\t\tmilestone: string;\r\n\t};\r\n\tauto_types: boolean;\r\n\tduration_unit: DurationUnits;\r\n\twork_time: boolean;\r\n\tcorrect_work_time: boolean;\r\n\tskip_off_time: boolean;\r\n\tcascade_delete: boolean;\r\n\tautosize: boolean | string;\r\n\tautoscroll: boolean;\r\n\tshow_links: boolean;\r\n\tshow_task_cells: boolean;\r\n\tautosize_min_width: number;\r\n\tautoscroll_speed: number;\r\n\tdeepcopy_on_parse: boolean;\r\n\tstatic_background: boolean;\r\n\tstatic_background_cells: boolean;\r\n\tbranch_loading: boolean;\r\n\tbranch_loading_property: string;\r\n\tshow_loading: boolean;\r\n\tshow_chart: boolean;\r\n\tshow_grid: boolean;\r\n\tmin_duration: number;\r\n\tdate_format: string; // use instead xml_date\r\n\txml_date?: string; // deprecated\r\n\tstart_on_monday: boolean;\r\n\tserver_utc: boolean;\r\n\tshow_progress: boolean;\r\n\tfit_tasks: boolean;\r\n\tselect_task: boolean;\r\n\tscroll_on_click: boolean;\r\n\tsmart_rendering: boolean;\r\n\tpreserve_scroll: boolean;\r\n\treadonly: boolean;\r\n\tcontainer_resize_timeout: number;\r\n\r\n\t/*grid */\r\n\tdate_grid: string;\r\n\r\n\tdrag_links: boolean;\r\n\tdrag_progress: boolean;\r\n\tdrag_resize: boolean;\r\n\tdrag_project: boolean;\r\n\tdrag_move: boolean;\r\n\tdrag_mode: {\r\n\t\tresize: \"resize\",\r\n\t\tprogress: \"progress\",\r\n\t\tmove: \"move\",\r\n\t\tignore: \"ignore\"\r\n\t};\r\n\tround_dnd_dates: boolean;\r\n\tlink_wrapper_width: number;\r\n\troot_id: string | number;\r\n\r\n\tautofit: boolean;\r\n\tcolumns: IColumnItem[];\r\n\r\n\t/* scale*/\r\n\t/* it will be deprecated */\r\n\tdate_scale?: string;\r\n\tstep?: number;\r\n\tscale_unit?: DurationUnits;\r\n\tsubscales?: IScale[];\r\n\t/* it will be deprecated end */\r\n\r\n\tscales: IScale[];\r\n\r\n\tscale_offset_minimal: boolean;\r\n\r\n\tinherit_scale_class: boolean;\r\n\r\n\r\n\ttime_step: number;\r\n\tduration_step: number;\r\n\r\n\r\n\ttask_date: string;\r\n\ttime_picker: string;\r\n\ttask_attribute: string;\r\n\tlink_attribute: string;\r\n\tlayer_attribute: string;\r\n\tbuttons_left: string[];\r\n\t_migrate_buttons: {\r\n\t\tdhx_save_btn: \"gantt_save_btn\",\r\n\t\tdhx_cancel_btn: \"gantt_cancel_btn\",\r\n\t\tdhx_delete_btn: \"gantt_delete_btn\"\r\n\t};\r\n\r\n\tbuttons_right: string[];\r\n\r\n\r\n\tlightbox: {\r\n\t\tsections?: LightboxSection,\r\n\t\tproject_sections?: LightboxSection,\r\n\t\tmilestone_sections?: LightboxSection\r\n\t};\r\n\tdrag_lightbox: boolean;\r\n\tsort: boolean;\r\n\tdetails_on_create: boolean;\r\n\tdetails_on_dblclick: boolean;\r\n\tinitial_scroll: boolean;\r\n\ttask_scroll_offset: number;\r\n\r\n\torder_branch: boolean;\r\n\torder_branch_free: boolean;\r\n\r\n\t// task_height is deprecated, use 'bar_height` instead\r\n\ttask_height: number | \"full\";\r\n\tbar_height: number | \"full\";\r\n\tmin_column_width: number;\r\n\r\n\t// min width for grid column (when resizing)\r\n\tmin_grid_column_width: number;\r\n\t// name of the attribute with column index for resize element\r\n\tgrid_resizer_column_attribute: string;\r\n\t// name of the attribute with column index for resize element\r\n\t// grid_resizer_attribute: string; // usage of this parameter is not found\r\n\r\n\t// grid width can be increased after the column has been resized\r\n\tkeep_grid_width: boolean;\r\n\r\n\t// grid width can be adjusted\r\n\tgrid_resize: boolean;\r\n\tgrid_elastic_columns: boolean;\r\n\tshow_tasks_outside_timescale: boolean;\r\n\tshow_unscheduled: boolean;\r\n\treadonly_property: string;\r\n\teditable_property: string;\r\n\tcalendar_property: string;\r\n\tresource_calendars: object;\r\n\tdynamic_resource_calendars: boolean;\r\n\tinherit_calendar: boolean;\r\n\ttype_renderers: object;\r\n\r\n\tresize_rows: boolean;\r\n\t// name of the attribute with row index for resize element\r\n\ttask_grid_row_resizer_attribute: string;\r\n\t// min height for row (when resizing)\r\n\tmin_task_grid_row_height: number;\r\n\r\n\topen_tree_initially: boolean;\r\n\toptimize_render: boolean;\r\n\tprevent_default_scroll: boolean;\r\n\tshow_errors: boolean;\r\n\twai_aria_attributes: boolean;\r\n\tsmart_scales: boolean;\r\n\trtl: boolean;\r\n\tplaceholder_task: boolean | object;\r\n\thorizontal_scroll_key: TModifierKeys;\r\n\tdrag_timeline: {\r\n\t\tuseKey: TModifierKeys;\r\n\t\tignore: string;\r\n\t};\r\n\tdrag_multiple: boolean;\r\n\tcsp: TCsp;\r\n\r\n\tresources?: IResourceConfig;\r\n}\r\n\r\nmodule.exports = () => {\r\n\tconst result: IGanttConfig = {\r\n\t\tlayout: {\r\n\t\t\tcss: \"gantt_container\",\r\n\t\t\trows: [\r\n\t\t\t\t{\r\n\t\t\t\t\tcols: [\r\n\t\t\t\t\t\t{view: \"grid\", scrollX: \"scrollHor\", scrollY: \"scrollVer\"},\r\n\t\t\t\t\t\t{resizer: true, width: 1},\r\n\t\t\t\t\t\t{view: \"timeline\", scrollX: \"scrollHor\", scrollY: \"scrollVer\"},\r\n\t\t\t\t\t\t{view: \"scrollbar\", id: \"scrollVer\"}\r\n\t\t\t\t\t]\r\n\t\t\t\t},\r\n\t\t\t\t{view: \"scrollbar\", id: \"scrollHor\", height: 20}\r\n\t\t\t]\r\n\t\t},\r\n\t\tlinks: {\r\n\t\t\tfinish_to_start: \"0\",\r\n\t\t\tstart_to_start: \"1\",\r\n\t\t\tfinish_to_finish: \"2\",\r\n\t\t\tstart_to_finish: \"3\"\r\n\t\t},\r\n\t\ttypes: {\r\n\t\t\ttask: \"task\",\r\n\t\t\tproject: \"project\",\r\n\t\t\tmilestone: \"milestone\"\r\n\t\t},\r\n\t\tauto_types: false,\r\n\t\tduration_unit: \"day\",\r\n\t\twork_time: false,\r\n\t\tcorrect_work_time: false,\r\n\t\tskip_off_time: false,\r\n\r\n\t\tcascade_delete: true,\r\n\r\n\t\tautosize: false,\r\n\t\tautosize_min_width: 0,\r\n\t\tautoscroll: true,\r\n\t\tautoscroll_speed: 30,\r\n\t\tdeepcopy_on_parse: false,\r\n\t\tshow_links: true,\r\n\t\tshow_task_cells: true,\r\n\t\t// replace backgroung of the task area with a canvas img\r\n\t\tstatic_background: false,\r\n\t\tstatic_background_cells: true,\r\n\t\tbranch_loading: false,\r\n\t\tbranch_loading_property: \"$has_child\",\r\n\t\tshow_loading: false,\r\n\t\tshow_chart: true,\r\n\t\tshow_grid: true,\r\n\t\tmin_duration: 60 * 60 * 1000,\r\n\t\tdate_format: \"%d-%m-%Y %H:%i\", // use instead xml_date\r\n\t\txml_date: undefined, // \"%d-%m-%Y %H:%i\", // deprecated\r\n\t\tstart_on_monday: true,\r\n\t\tserver_utc: false,\r\n\t\tshow_progress: true,\r\n\t\tfit_tasks: false,\r\n\t\tselect_task: true,\r\n\t\tscroll_on_click: true,\r\n\t\tsmart_rendering: true,\r\n\t\tpreserve_scroll: true,\r\n\t\treadonly: false,\r\n\t\tcontainer_resize_timeout: 20,\r\n\r\n\t\t/*grid */\r\n\t\tdate_grid: \"%Y-%m-%d\",\r\n\r\n\t\tdrag_links: true,\r\n\t\tdrag_progress: true,\r\n\t\tdrag_resize: true,\r\n\t\tdrag_project: false,\r\n\t\tdrag_move: true,\r\n\t\tdrag_mode: {\r\n\t\t\tresize: \"resize\",\r\n\t\t\tprogress: \"progress\",\r\n\t\t\tmove: \"move\",\r\n\t\t\tignore: \"ignore\"\r\n\t\t},\r\n\t\tround_dnd_dates: true,\r\n\t\tlink_wrapper_width: 20,\r\n\t\troot_id: 0,\r\n\r\n\t\tautofit: false, // grid column automatic fit grid_width config\r\n\t\tcolumns: [\r\n\t\t\t{name: \"text\", tree: true, width: \"*\", resize: true},\r\n\t\t\t{name: \"start_date\", align: \"center\", resize: true},\r\n\t\t\t{name: \"duration\", align: \"center\"},\r\n\t\t\t{name: \"add\", width: 44}\r\n\t\t],\r\n\r\n\t\t/*scale*/\r\n\r\n\t\tscale_offset_minimal: true,\r\n\t\tinherit_scale_class: false,\r\n\r\n\t\tscales: [\r\n\t\t\t{\r\n\t\t\t\tunit: \"day\",\r\n\t\t\t\tstep: 1,\r\n\t\t\t\tdate: \"%d %M\"\r\n\t\t\t}\r\n\t\t],\r\n// \t\tdate_scale: \"%d %M\",\r\n\r\n\t\ttime_step: 60,\r\n\t\tduration_step: 1,\r\n\t\ttask_date: \"%d %F %Y\",\r\n\t\ttime_picker: \"%H:%i\",\r\n\t\ttask_attribute: \"data-task-id\",\r\n\t\tlink_attribute: \"data-link-id\",\r\n\t\tlayer_attribute: \"data-layer\",\r\n\t\tbuttons_left: [\r\n\t\t\t\"gantt_save_btn\",\r\n\t\t\t\"gantt_cancel_btn\"\r\n\t\t],\r\n\t\t_migrate_buttons: {\r\n\t\t\tdhx_save_btn: \"gantt_save_btn\",\r\n\t\t\tdhx_cancel_btn: \"gantt_cancel_btn\",\r\n\t\t\tdhx_delete_btn: \"gantt_delete_btn\"\r\n\t\t},\r\n\t\tbuttons_right: [\r\n\t\t\t\"gantt_delete_btn\"\r\n\t\t],\r\n\t\tlightbox: {\r\n\t\t\tsections: [\r\n\t\t\t\t{name: \"description\", height: 70, map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t\t{name: \"time\", type: \"duration\", map_to: \"auto\"}\r\n\t\t\t],\r\n\t\t\tproject_sections: [\r\n\t\t\t\t{name: \"description\", height: 70, map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t\t{name: \"type\", type: \"typeselect\", map_to: \"type\"},\r\n\t\t\t\t{name: \"time\", type: \"duration\", readonly: true, map_to: \"auto\"}\r\n\t\t\t],\r\n\t\t\tmilestone_sections: [\r\n\t\t\t\t{name: \"description\", height: 70, map_to: \"text\", type: \"textarea\", focus: true},\r\n\t\t\t\t{name: \"type\", type: \"typeselect\", map_to: \"type\"},\r\n\t\t\t\t{name: \"time\", type: \"duration\", single_date: true, map_to: \"auto\"}\r\n\t\t\t]\r\n\t\t},\r\n\t\tdrag_lightbox: true,\r\n\t\tsort: false,\r\n\t\tdetails_on_create: true,\r\n\t\tdetails_on_dblclick: true,\r\n\t\tinitial_scroll: true,\r\n\t\ttask_scroll_offset: 100,\r\n\r\n\t\torder_branch: false,\r\n\t\torder_branch_free: false,\r\n\r\n\t\t// task height is deprecated, use 'bar_height' instead\r\n\t\ttask_height: undefined,// number px of 'full' for row height\r\n\t\tbar_height: \"full\",\r\n\t\tmin_column_width: 70,\r\n\r\n\t\t// min width for grid column (when resizing)\r\n\t\tmin_grid_column_width: 70,\r\n\t\t// name of the attribute with column index for resize element\r\n\t\tgrid_resizer_column_attribute: \"data-column-index\",\r\n\t\t// name of the attribute with column index for resize element\r\n\t\t// grid_resizer_attribute: \"grid_resizer\", // - usage of this parameter is not found in code\r\n\r\n\t\t// grid width can be increased after the column has been resized\r\n\t\tkeep_grid_width: false,\r\n\r\n\t\t// grid width can be adjusted\r\n\t\tgrid_resize: false,\r\n\t\tgrid_elastic_columns: false,\r\n\t\tshow_tasks_outside_timescale: false,\r\n\t\tshow_unscheduled: true,\r\n\r\n\t\tresize_rows: false,\r\n\t\t// name of the attribute with row index for resize element\r\n\t\ttask_grid_row_resizer_attribute: \"data-row-index\",\r\n\t\t// min height for row (when resizing)\r\n\t\tmin_task_grid_row_height: 30,\r\n\r\n\t\t//\r\n\t\treadonly_property: \"readonly\",\r\n\t\teditable_property: \"editable\",\r\n\t\tcalendar_property: \"calendar_id\",\r\n\t\tresource_calendars: {},\r\n\t\tdynamic_resource_calendars: false,\r\n\t\tinherit_calendar: false,\r\n\t\ttype_renderers: {},\r\n\r\n\t\topen_tree_initially: false,\r\n\t\toptimize_render: true,\r\n\t\tprevent_default_scroll: false,\r\n\t\tshow_errors: true,\r\n\t\twai_aria_attributes: true,\r\n\t\tsmart_scales: true,\r\n\t\trtl:false,\r\n\t\tplaceholder_task: false,\r\n\t\thorizontal_scroll_key: \"shiftKey\",\r\n\t\tdrag_timeline: {\r\n\t\t\tuseKey: undefined,\r\n\t\t\tignore: \".gantt_task_line, .gantt_task_link\"\r\n\t\t},\r\n\t\tdrag_multiple: true,\r\n\t\tcsp: \"auto\"\r\n\t};\r\n\treturn result;\r\n};\r\n","module.exports = function () {\n var services = {};\n\n function register(name, getter) {\n services[name] = getter;\n }\n\n function getService(name) {\n if (!services[name]) {\n return null;\n }\n\n return services[name]();\n }\n\n function dropService(name) {\n if (services[name]) {\n delete services[name];\n }\n }\n\n var servicesEnum = {};\n return {\n services: servicesEnum,\n setService: register,\n getService: getService,\n dropService: dropService,\n destructor: function destructor() {\n for (var i in services) {\n if (services[i]) {\n var service = services[i];\n\n if (service && service.destructor) {\n service.destructor();\n }\n }\n }\n\n services = null;\n }\n };\n};","export default class ExtensionsManager{\r\n\tprivate _extensions:{[key:string]: GanttPlugin };\r\n\r\n\tconstructor(config: {[key:string]: GanttPlugin }){\r\n\t\tthis._extensions = {};\r\n\t\tfor(const i in config){\r\n\t\t\tthis._extensions[i] = config[i];\r\n\t\t}\r\n\t}\r\n\r\n\taddExtension = (name: string, ext: GanttPlugin) => {\r\n\t\tthis._extensions[name] = ext;\r\n\t}\r\n\r\n\tgetExtension = (name: string): GanttPlugin => {\r\n\t\treturn this._extensions[name];\r\n\t}\r\n}","module.exports = {\n KEY_CODES: {\n UP: 38,\n DOWN: 40,\n LEFT: 37,\n RIGHT: 39,\n SPACE: 32,\n ENTER: 13,\n DELETE: 46,\n ESC: 27,\n TAB: 9\n }\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction DHXGantt() {\n this.constants = require(\"../constants\");\n this.version = VERSION;\n this.license = LICENSE;\n this.templates = {};\n this.ext = {};\n this.keys = {\n edit_save: this.constants.KEY_CODES.ENTER,\n edit_cancel: this.constants.KEY_CODES.ESC\n };\n}\n\nmodule.exports = function (supportedExtensions) {\n // use a named constructor to make gantt instance discoverable in heap snapshots\n var gantt = new DHXGantt();\n\n var ExtensionManager = require(\"../ext/extension_manager\")[\"default\"];\n\n var extensionManager = new ExtensionManager(supportedExtensions);\n var activePlugins = {};\n\n gantt.plugins = function (config) {\n for (var i in config) {\n if (config[i] && !activePlugins[i]) {\n var plugin = extensionManager.getExtension(i);\n\n if (plugin) {\n plugin(gantt);\n activePlugins[i] = true;\n }\n }\n }\n\n return activePlugins;\n };\n\n gantt.$services = require(\"../core/common/services\")();\n gantt.config = require(\"../core/common/config\")();\n gantt.ajax = require(\"../core/common/ajax\")(gantt);\n gantt.date = require(\"../core/common/date\")(gantt);\n gantt.RemoteEvents = require(\"../core/remote/remote_events\").remoteEvents;\n\n var dnd = require(\"../core/common/dnd\")(gantt);\n\n gantt.$services.setService(\"dnd\", function () {\n return dnd;\n });\n\n var templatesLoader = require(\"../core/common/templates\")(gantt);\n\n gantt.$services.setService(\"templateLoader\", function () {\n return templatesLoader;\n });\n\n require(\"../utils/eventable\")(gantt);\n\n var StateService = require(\"../core/common/state\");\n\n var stateService = new StateService();\n stateService.registerProvider(\"global\", function () {\n var res = {\n min_date: gantt._min_date,\n max_date: gantt._max_date,\n selected_task: null\n }; // do not throw error if getState called from non-initialized gantt\n\n if (gantt.$data && gantt.$data.tasksStore) {\n res.selected_task = gantt.$data.tasksStore.getSelectedId();\n }\n\n return res;\n });\n gantt.getState = stateService.getState;\n gantt.$services.setService(\"state\", function () {\n return stateService;\n });\n\n var utils = require(\"../utils/utils\");\n\n utils.mixin(gantt, utils);\n gantt.Promise = require(\"../utils/promise\");\n gantt.env = require(\"../utils/env\");\n\n require(\"../core/datastore/datastore_hooks\")(gantt);\n\n var DataProcessor = require(\"../core/dataprocessor\");\n\n gantt.dataProcessor = DataProcessor.DEPRECATED_api;\n gantt.createDataProcessor = DataProcessor.createDataProcessor;\n\n require(\"../core/plugins\")(gantt);\n\n require(\"../core/grid_column_api\")(gantt);\n\n require(\"../core/tasks\")(gantt);\n\n require(\"../core/loading/parsing\")(gantt);\n\n require(\"../core/worktime/work_time\")(gantt);\n\n require(\"../core/data\")(gantt);\n\n require(\"../publish_helpers/void_script_second\")[\"default\"](gantt);\n\n require(\"../core/data_task_types\")(gantt);\n\n require(\"../core/cached_functions\")(gantt);\n\n require(\"../core/gantt_core\")(gantt);\n\n require(\"../core/destructor\")(gantt);\n\n require(\"../publish_helpers/void_script_third\")[\"default\"](gantt);\n\n var i18n = require(\"../locale\")[\"default\"]();\n\n gantt.i18n = {\n addLocale: i18n.addLocale,\n setLocale: function setLocale(locale) {\n if (typeof locale === \"string\") {\n var localeObject = i18n.getLocale(locale);\n\n if (!localeObject) {\n localeObject = i18n.getLocale(\"en\");\n }\n\n gantt.locale = localeObject;\n } else if (locale) {\n if (!gantt.locale) {\n gantt.locale = locale;\n } else {\n for (var i in locale) {\n if (locale[i] && _typeof(locale[i]) === \"object\") {\n if (!gantt.locale[i]) {\n gantt.locale[i] = {};\n }\n\n gantt.mixin(gantt.locale[i], locale[i], true);\n } else {\n gantt.locale[i] = locale[i];\n }\n }\n }\n }\n },\n getLocale: i18n.getLocale\n };\n gantt.i18n.setLocale(\"en\");\n return gantt;\n};","require(\"css/skins/terrace.less\");\n\nvar factory = require(\"./make_instance_common\");\n\nmodule.exports = function (supportedExtensions) {\n var gantt = factory(supportedExtensions);\n\n if (!gantt.env.isNode) {\n require(\"../core/ui_core\")(gantt);\n\n require(\"../core/loading/ajax_loading\")(gantt);\n\n require(\"../core/loading/dynamic_loading\")(gantt);\n }\n\n return gantt;\n};","import { IUndo, IUndoCommand, IUndoCommands, IUndoPropAction, IUndoPropCommand, TActionType, TEntityType, TUndoStack, TUndoValue } from \"./types\";\r\n\r\nconst MAX_UNDO_STEPS = 100;\r\n\r\nexport class Undo implements IUndo {\r\n\r\n\tmaxSteps = MAX_UNDO_STEPS;\r\n\tundoEnabled = true;\r\n\tredoEnabled = true;\r\n\taction: IUndoPropAction = {\r\n\t\tcreate: (commands?: IUndoCommand[]): IUndoCommands => {\r\n\t\t\treturn { commands: (commands ? commands.slice() : []) };\r\n\t\t},\r\n\t\tinvert: (action: IUndoCommands): IUndoCommands => {\r\n\t\t\tconst gantt = this._gantt;\r\n\t\t\tconst revert = gantt.copy(action);\r\n\t\t\tconst commands = this.command;\r\n\t\t\tfor (let i = 0; i < action.commands.length; i++) {\r\n\t\t\t\tconst command = revert.commands[i] = commands.invert(revert.commands[i]);\r\n\t\t\t\tif (command.type === commands.type.update || command.type === commands.type.move) {\r\n\t\t\t\t\t[command.value, command.oldValue] = [command.oldValue, command.value];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn revert as IUndoCommands;\r\n\t\t}\r\n\t};\r\n\tcommand: IUndoPropCommand = {\r\n\t\t// entities that require different processing for undoing-redoing changes (gantt.config.undo_types)\r\n\t\tentity: null,\r\n\r\n\t\t// types of traced actions (gantt.config.undo_actions)\r\n\t\ttype: null,\r\n\r\n\t\tcreate: (value: TUndoValue, oldValue: TUndoValue, type: TActionType, entity: TEntityType): IUndoCommand => {\r\n\t\t\tconst gantt = this._gantt;\r\n\t\t\treturn {\r\n\t\t\t\tentity,\r\n\t\t\t\ttype,\r\n\t\t\t\tvalue: gantt.copy(value),\r\n\t\t\t\toldValue: gantt.copy(oldValue || value)\r\n\t\t\t};\r\n\t\t},\r\n\t\tinvert: (command: IUndoCommand): IUndoCommand => {\r\n\t\t\tconst gantt = this._gantt;\r\n\t\t\tconst revert = gantt.copy(command);\r\n\t\t\trevert.type = this.command.inverseCommands(command.type);\r\n\t\t\treturn revert;\r\n\t\t},\r\n\t\tinverseCommands: (command: TActionType): TActionType => {\r\n\t\t\tconst gantt = this._gantt;\r\n\t\t\tconst types = this.command.type;\r\n\t\t\tswitch (command) {\r\n\t\t\t\tcase types.update:\r\n\t\t\t\t\treturn types.update;\r\n\t\t\t\tcase types.remove:\r\n\t\t\t\t\treturn types.add;\r\n\t\t\t\tcase types.add:\r\n\t\t\t\t\treturn types.remove;\r\n\t\t\t\tcase types.move:\r\n\t\t\t\t\treturn types.move;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tgantt.assert(false, \"Invalid command \"+ command);\r\n\t\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\tprivate _undoStack = [];\r\n\tprivate _redoStack = [];\r\n\tprivate _gantt: any;\r\n\r\n\tconstructor(gantt: any){\r\n\t\tthis._gantt = gantt;\r\n\t}\r\n\tgetUndoStack() {\r\n\t\treturn this._undoStack;\r\n\t}\r\n\tsetUndoStack(stack: []) {\r\n\t\tthis._undoStack = stack;\r\n\t}\r\n\r\n\tgetRedoStack() {\r\n\t\treturn this._redoStack;\r\n\t}\r\n\tsetRedoStack(stack: []) {\r\n\t\tthis._redoStack = stack;\r\n\t}\r\n\r\n\tclearUndoStack() {\r\n\t\tthis._undoStack = [];\r\n\t}\r\n\r\n\tclearRedoStack() {\r\n\t\tthis._redoStack = [];\r\n\t}\r\n\r\n\tupdateConfigs() {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis.maxSteps = gantt.config.undo_steps || MAX_UNDO_STEPS;\r\n\t\tthis.command.entity = gantt.config.undo_types;\r\n\t\tthis.command.type = gantt.config.undo_actions;\r\n\t\tthis.undoEnabled = !!gantt.config.undo;\r\n\t\tthis.redoEnabled = !!gantt.config.redo; // GS-873, Redo should work even when the `gantt.config.undo` is disabled.\r\n\t}\r\n\r\n\tundo() {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis.updateConfigs();\r\n\t\tif (!this.undoEnabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst action = this._pop(this._undoStack);\r\n\t\tif (action) {\r\n\t\t\tthis._reorderCommands(action);\r\n\t\t}\r\n\t\tif (gantt.callEvent(\"onBeforeUndo\", [action]) !== false) {\r\n\t\t\tif (action) {\r\n\t\t\t\tthis._applyAction(this.action.invert(action));\r\n\t\t\t\tthis._push(this._redoStack, gantt.copy(action));\r\n\t\t\t\tgantt.callEvent(\"onAfterUndo\", [action]);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgantt.callEvent(\"onAfterUndo\", [null]);\r\n\t}\r\n\r\n\tredo() {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis.updateConfigs();\r\n\t\tif (!this.redoEnabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst action = this._pop(this._redoStack);\r\n\t\tif (action) {\r\n\t\t\tthis._reorderCommands(action);\r\n\t\t}\r\n\r\n\t\tif (gantt.callEvent(\"onBeforeRedo\", [action]) !== false) {\r\n\t\t\tif (action) {\r\n\t\t\t\tthis._applyAction(action);\r\n\t\t\t\tthis._push(this._undoStack, gantt.copy(action));\r\n\t\t\t\tgantt.callEvent(\"onAfterRedo\", [action]);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tgantt.callEvent(\"onAfterRedo\", [null]);\r\n\t}\r\n\r\n\t// storeUndo:\r\n\tlogAction(action: IUndoCommands) {\r\n\t\tthis._push(this._undoStack, action);\r\n\t\tthis._redoStack = [];\r\n\t}\r\n\r\n\tprivate _push(stack: TUndoStack, action: IUndoCommands): IUndoCommands {\r\n\t\tconst gantt = this._gantt;\r\n\t\tif (!action.commands.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst event = stack === this._undoStack ? \"onBeforeUndoStack\" : \"onBeforeRedoStack\";\r\n\t\tif (gantt.callEvent(event, [action]) === false){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// commands can be removed from event handler\r\n\t\tif (!action.commands.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tstack.push(action);\r\n\t\twhile (stack.length > this.maxSteps) {\r\n\t\t\tstack.shift();\r\n\t\t}\r\n\t\treturn action;\r\n\t}\r\n\r\n\tprivate _pop(stack: TUndoStack): IUndoCommands {\r\n\t\treturn stack.pop();\r\n\t}\r\n\r\n\tprivate _reorderCommands(action) {\r\n\t\t// firstly process tasks and only then links\r\n\t\t// in order to ensure links are added not earlier than their tasks\r\n\t\t// firstly to 'move' actions and only then updates\r\n\t\tconst weights = { any: 0, link:1, task:2 };\r\n\t\tconst actionWeights = { move: 1, any:0 };\r\n\t\taction.commands.sort(function(a, b) {\r\n\t\t\tif (a.entity === \"task\" && b.entity === \"task\") {\r\n\t\t\t\tif (a.type !== b.type) {\r\n\t\t\t\t\treturn (actionWeights[b.type] || 0) - (actionWeights[a.type] || 0);\r\n\t\t\t\t} else if (a.type === \"move\" && a.oldValue && b.oldValue && b.oldValue.parent === a.oldValue.parent) {\r\n\t\t\t\t\treturn a.oldValue.$index - b.oldValue.$index;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tconst weightA = weights[a.entity] || weights.any;\r\n\t\t\t\tconst weightB = weights[b.entity] || weights.any;\r\n\t\t\t\treturn weightB - weightA;\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _applyAction(action: IUndoCommands) {\r\n\t\tlet command = null;\r\n\t\tconst entities = this.command.entity;\r\n\t\tconst actions = this.command.type;\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst methods = {};\r\n\t\tmethods[entities.task] = {\r\n\t\t\tadd: \"addTask\",\r\n\t\t\tget: \"getTask\",\r\n\t\t\tupdate: \"updateTask\",\r\n\t\t\tremove: \"deleteTask\",\r\n\t\t\tmove: \"moveTask\",\r\n\t\t\tisExists: \"isTaskExists\"\r\n\t\t};\r\n\t\tmethods[entities.link] = {\r\n\t\t\tadd: \"addLink\",\r\n\t\t\tget: \"getLink\",\r\n\t\t\tupdate: \"updateLink\",\r\n\t\t\tremove: \"deleteLink\",\r\n\t\t\tisExists: \"isLinkExists\"\r\n\t\t};\r\n\r\n\t\tgantt.batchUpdate(function() {\r\n\t\t\t// it is logical to undo actions from the last one to the first one\r\n\t\t\t// but we have to do it from the first one because the order\r\n\t\t\t// of tasks ($index and $local_index) depends on the existing tasks\r\n\t\t\tfor (let i = 0; i < action.commands.length; i++) {\r\n\t\t\t\tcommand = action.commands[i];\r\n\t\t\t\tconst method = methods[command.entity][command.type];\r\n\t\t\t\tconst getMethod = methods[command.entity].get;\r\n\t\t\t\tconst check = methods[command.entity].isExists;\r\n\r\n\t\t\t\tif (command.type === actions.add) {\r\n\t\t\t\t\tgantt[method](command.oldValue, command.oldValue.parent, command.oldValue.$local_index);\r\n\t\t\t\t} else if (command.type === actions.remove) {\r\n\t\t\t\t\tif (gantt[check](command.value.id)) {\r\n\t\t\t\t\t\tgantt[method](command.value.id);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (command.type === actions.update) {\r\n\t\t\t\t\tconst item = gantt[getMethod](command.value.id);\r\n\t\t\t\t\tfor(const prop in command.value){\r\n\t\t\t\t\t\tif(!prop.startsWith(\"$\") && !prop.startsWith(\"_\")){\r\n\t\t\t\t\t\t\titem[prop] = command.value[prop];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tgantt[method](command.value.id);\r\n\t\t\t\t} else if (command.type === actions.move) {\r\n\t\t\t\t\tgantt[method](command.value.id, command.value.$local_index, command.value.parent);\r\n\t\t\t\t\t// GS-680: We should send the changes to the server after we undo vertical reorder\r\n\t\t\t\t\tgantt.callEvent(\"onRowDragEnd\", [command.value.id]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}","import { IInlineEditState, IMonitor, IUndo, IUndoCommand, TActionType, TEntityType, TUndoValue } from \"./types\";\r\n\r\nconst noTrack = {\r\n\tonBeforeUndo: \"onAfterUndo\",\r\n\tonBeforeRedo: \"onAfterRedo\"\r\n};\r\n\r\nconst batchActions = [\r\n\t\"onTaskDragStart\",\r\n\t\"onAfterTaskUpdate\",\r\n\t\"onAfterTaskDelete\",\r\n\t\"onBeforeBatchUpdate\"\r\n];\r\n\r\nexport class Monitor implements IMonitor {\r\n\tprivate _batchAction = null;\r\n\tprivate _batchMode = false;\r\n\tprivate _ignore = false;\r\n\tprivate _ignoreMoveEvents = false;\r\n\tprivate _initialTasks = {};\r\n\tprivate _initialLinks = {};\r\n\tprivate _nestedTasks = {};\r\n\tprivate _nestedLinks = {};\r\n\tprivate _timeout;\r\n\tprivate _gantt: any;\r\n\tprivate _undo: IUndo;\r\n\r\n\tconstructor(undo: IUndo, gantt: any) {\r\n\t\tthis._undo = undo;\r\n\t\tthis._gantt = gantt;\r\n\t\tthis._attachEvents();\r\n\t}\r\n\r\n\tstore(id: TaskID | LinkID, type: TEntityType, overwrite: boolean = false) {\r\n\t\tif (type === this._gantt.config.undo_types.task) {\r\n\t\t\treturn this._storeTask(id, overwrite);\r\n\t\t}\r\n\t\tif (type === this._gantt.config.undo_types.link) {\r\n\t\t\treturn this._storeLink(id, overwrite);\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\tisMoveEventsIgnored() {\r\n\t\treturn this._ignoreMoveEvents;\r\n\t}\r\n\ttoggleIgnoreMoveEvents(newValue?: boolean) {\r\n\t\tthis._ignoreMoveEvents = newValue || false;\r\n\t}\r\n\tstartIgnore() {\r\n\t\tthis._ignore = true;\r\n\t}\r\n\tstopIgnore() {\r\n\t\tthis._ignore = false;\r\n\t}\r\n\tstartBatchAction() {\r\n\t\t// try catching updates made from event handlers using timeout\r\n\t\tif (!this._timeout){\r\n\t\t\tthis._timeout = setTimeout(() => {\r\n\t\t\t\tthis.stopBatchAction();\r\n\t\t\t\tthis._timeout = null;\r\n\t\t\t}, 10);\r\n\t\t}\r\n\r\n\r\n\t\tif (this._ignore || this._batchMode) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis._batchMode = true;\r\n\t\tthis._batchAction = this._undo.action.create();\r\n\t}\r\n\tstopBatchAction() {\r\n\t\tif (this._ignore) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst undo = this._undo;\r\n\t\tif (this._batchAction) {\r\n\t\t\tundo.logAction(this._batchAction);\r\n\t\t}\r\n\t\tthis._batchMode = false;\r\n\t\tthis._batchAction = null;\r\n\t}\r\n\tonTaskAdded(task: ITask) {\r\n\t\tif (!this._ignore) {\r\n\t\t\tthis._storeTaskCommand(task, this._undo.command.type.add);\r\n\t\t}\r\n\t}\r\n\tonTaskUpdated(task: ITask) {\r\n\t\tif (!this._ignore) {\r\n\t\t\tthis._storeTaskCommand(task, this._undo.command.type.update);\r\n\t\t}\r\n\t}\r\n\tonTaskMoved(task: ITask) {\r\n\t\tif (!this._ignore) {\r\n\t\t\t(task as any).$local_index = this._gantt.getTaskIndex(task.id);\r\n\t\t\tconst oldValue = this.getInitialTask(task.id);\r\n\t\t\tif((task as any).$local_index === oldValue.$local_index &&\r\n\t\t\t\tthis._gantt.getParent(task) === this._gantt.getParent(oldValue)){\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\tthis._storeEntityCommand(\r\n\t\t\t\ttask,\r\n\t\t\t\tthis.getInitialTask(task.id),\r\n\t\t\t\tthis._undo.command.type.move,\r\n\t\t\t\tthis._undo.command.entity.task\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\tonTaskDeleted(task: ITask) {\r\n\t\tif (!this._ignore) {\r\n\t\t\tthis._storeTaskCommand(task, this._undo.command.type.remove);\r\n\t\t\tif (this._nestedTasks[task.id]) {\r\n\t\t\t\tconst children = this._nestedTasks[task.id];\r\n\t\t\t\tfor (let i = 0; i < children.length; i++) {\r\n\t\t\t\t\tthis._storeTaskCommand(children[i], this._undo.command.type.remove);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (this._nestedLinks[task.id]) {\r\n\t\t\t\tconst childrenLinks = this._nestedLinks[task.id];\r\n\t\t\t\tfor (let i = 0; i < childrenLinks.length; i++) {\r\n\t\t\t\t\tthis._storeLinkCommand(childrenLinks[i], this._undo.command.type.remove);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tonLinkAdded(link: ILink) {\r\n\t\tif (!this._ignore) {\r\n\t\t\tthis._storeLinkCommand(link, this._undo.command.type.add);\r\n\t\t}\r\n\t}\r\n\tonLinkUpdated(link: ILink) {\r\n\t\tif (!this._ignore) {\r\n\t\t\tthis._storeLinkCommand(link, this._undo.command.type.update);\r\n\t\t}\r\n\t}\r\n\tonLinkDeleted(link: ILink) {\r\n\t\tif (!this._ignore) {\r\n\t\t\tthis._storeLinkCommand(link, this._undo.command.type.remove);\r\n\t\t}\r\n\t}\r\n\tsetNestedTasks(id: TaskID, taskIds: TaskID[]) {\r\n\t\tconst gantt = this._gantt;\r\n\t\tlet task = null;\r\n\t\tconst tasks = [];\r\n\t\tlet\tlinkIds = this._getLinks(gantt.getTask(id));\r\n\r\n\t\tfor (let i = 0; i < taskIds.length; i++) {\r\n\t\t\ttask = this.setInitialTask(taskIds[i]);\r\n\t\t\tlinkIds = linkIds.concat(this._getLinks(task));\r\n\t\t\ttasks.push(task);\r\n\t\t}\r\n\r\n\t\tconst uniqueLinks = {};\r\n\t\tfor (let i = 0; i < linkIds.length; i++) {\r\n\t\t\tuniqueLinks[linkIds[i]] = true;\r\n\t\t}\r\n\t\tconst links = [];\r\n\t\tfor (const i in uniqueLinks) {\r\n\t\t\tlinks.push(this.setInitialLink(i));\r\n\t\t}\r\n\t\tthis._nestedTasks[id] = tasks;\r\n\t\tthis._nestedLinks[id] = links;\r\n\t}\r\n\tsetInitialTask(id: TaskID, overwrite?: boolean) {\r\n\t\tconst gantt = this._gantt;\r\n\t\tif (overwrite || (!this._initialTasks[id] || !this._batchMode)) {\r\n\t\t\tconst task = gantt.copy(gantt.getTask(id));\r\n\t\t\ttask.$index = gantt.getGlobalTaskIndex(id);\r\n\t\t\ttask.$local_index = gantt.getTaskIndex(id);\r\n\t\t\tthis.setInitialTaskObject(id, task);\r\n\t\t}\r\n\t\treturn this._initialTasks[id];\r\n\t}\r\n\tgetInitialTask(id: TaskID) {\r\n\t\treturn this._initialTasks[id];\r\n\t}\r\n\tclearInitialTasks() {\r\n\t\tthis._initialTasks = {};\r\n\t}\r\n\tsetInitialTaskObject(id: TaskID, object: ITask) {\r\n\t\tthis._initialTasks[id] = object;\r\n\t}\r\n\tsetInitialLink(id: LinkID, overwrite?: boolean) {\r\n\t\tif (!this._initialLinks[id] || !this._batchMode) {\r\n\t\t\tthis._initialLinks[id] = this._gantt.copy(this._gantt.getLink(id));\r\n\t\t}\r\n\t\treturn this._initialLinks[id];\r\n\t}\r\n\tgetInitialLink(id: LinkID) {\r\n\t\treturn this._initialLinks[id];\r\n\t}\r\n\tclearInitialLinks() {\r\n\t\tthis._initialLinks = {};\r\n\t}\r\n\tprivate _attachEvents() {\r\n\t\tlet deleteCacheCooldown = null;\r\n\t\tconst gantt = this._gantt;\r\n\r\n\t\tconst saveInitialAll = () => {\r\n\t\t\tif (!deleteCacheCooldown) {\r\n\t\t\t\tdeleteCacheCooldown = setTimeout(() => {\r\n\t\t\t\t\tdeleteCacheCooldown = null;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.clearInitialTasks();\r\n\t\t\t\tgantt.eachTask((task: ITask) => {\r\n\t\t\t\t\tthis.setInitialTask(task.id);\r\n\t\t\t\t});\r\n\r\n\t\t\t\tthis.clearInitialLinks();\r\n\t\t\t\tgantt.getLinks().forEach((link: ILink) => {\r\n\t\t\t\t\tthis.setInitialLink(link.id);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t};\r\n\t\tconst getMoveObjectByTaskId = (id: TaskID) => {\r\n\t\t\treturn gantt.copy(gantt.getTask(id));\r\n\t\t};\r\n\r\n\t\tfor (const i in noTrack) {\r\n\t\t\tgantt.attachEvent(i, () => {\r\n\t\t\t\tthis.startIgnore();\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t\tgantt.attachEvent(noTrack[i], () => {\r\n\t\t\t\tthis.stopIgnore();\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfor (let i = 0; i < batchActions.length; i++) {\r\n\t\t\tgantt.attachEvent(batchActions[i], () => {\r\n\t\t\t\tthis.startBatchAction();\r\n\t\t\t\treturn true;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tgantt.attachEvent(\"onParse\", () => {\r\n\t\t\tthis._undo.clearUndoStack();\r\n\t\t\tthis._undo.clearRedoStack();\r\n\t\t\tsaveInitialAll();\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterTaskAdd\", (id: TaskID, task: ITask) => {\r\n\t\t\tthis.setInitialTask(id, true);\r\n\t\t\tthis.onTaskAdded(task);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterTaskUpdate\", (id: TaskID, task: ITask) => {\r\n\t\t\tthis.onTaskUpdated(task);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterTaskDelete\", (id: TaskID, task: ITask) => {\r\n\t\t\tthis.onTaskDeleted(task);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterLinkAdd\", (id: LinkID, link: ILink) => {\r\n\t\t\tthis.setInitialLink(id, true);\r\n\t\t\tthis.onLinkAdded(link);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterLinkUpdate\", (id: LinkID, link: ILink) => {\r\n\t\t\tthis.onLinkUpdated(link);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onAfterLinkDelete\", (id: LinkID, link: ILink) => {\r\n\t\t\tthis.onLinkDeleted(link);\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onRowDragEnd\", (id: TaskID, target: TaskID) => {\r\n\t\t\tthis.onTaskMoved(getMoveObjectByTaskId(id));\r\n\t\t\tthis.toggleIgnoreMoveEvents();\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tgantt.attachEvent(\"onBeforeTaskDelete\", (id: TaskID) => {\r\n\t\t\tthis.store(id, gantt.config.undo_types.task);\r\n\t\t\tconst nested = [];\r\n\r\n\t\t\t// remember task indexes in case their being deleted in a loop, so they could be restored in the correct order\r\n\t\t\tsaveInitialAll();\r\n\r\n\t\t\tgantt.eachTask((task: ITask) => {\r\n\t\t\t\tnested.push(task.id);\r\n\t\t\t}, id);\r\n\t\t\tthis.setNestedTasks(id, nested);\r\n\t\t\treturn true;\r\n\t\t});\r\n\t\tconst datastore = gantt.getDatastore(\"task\");\r\n\r\n\t\tdatastore.attachEvent(\"onBeforeItemMove\", (id: TaskID, parent: TaskID, tindex: number) => {\r\n\t\t\tif (!this.isMoveEventsIgnored()) {\r\n\t\t\t\tsaveInitialAll();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tdatastore.attachEvent(\"onAfterItemMove\", (id: TaskID, parent: TaskID, tindex: number) => {\r\n\t\t\tif (!this.isMoveEventsIgnored()) {\r\n\t\t\t\tthis.onTaskMoved(getMoveObjectByTaskId(id));\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tgantt.attachEvent(\"onRowDragStart\", (id: TaskID, target: TaskID, e: Event) => {\r\n\t\t\tthis.toggleIgnoreMoveEvents(true);\r\n\t\t\tsaveInitialAll();\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tlet dragId = null;\r\n\t\tlet projectDrag = false;\r\n\t\tgantt.attachEvent(\"onBeforeTaskDrag\", (taskId: TaskID) => {\r\n\t\t\tdragId = gantt.getState().drag_id;\r\n\t\t\tif (dragId === taskId){\r\n\t\t\t\tconst task = gantt.getTask(taskId);\r\n\t\t\t\tif (gantt.isSummaryTask(task) && gantt.config.drag_project){\r\n\t\t\t\t\tprojectDrag = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// GS-99. Store the initial task dates before multiple drag\r\n\t\t\tif (gantt.plugins().multiselect){\r\n\t\t\t\tconst selectedIds = gantt.getSelectedTasks();\r\n\t\t\t\tif (selectedIds.length > 1){\r\n\t\t\t\t\tselectedIds.forEach((id)=>{\r\n\t\t\t\t\t\tthis.store(id, gantt.config.undo_types.task, true);\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn this.store(taskId, gantt.config.undo_types.task);\r\n\t\t});\r\n\r\n\t\tgantt.attachEvent(\"onAfterTaskDrag\", (taskId: TaskID) => {\r\n\t\t\t// if we drag multiple tasks and other tasks move to another date after that,\r\n\t\t\t// auto-scheduling/correct work time should occur in anoher command.\r\n\t\t\t// otherwise, when we undo the changes, the task constraint is not restored correctly\r\n\t\t\tconst multipleDrag = projectDrag || (gantt.plugins().multiselect && gantt.getSelectedTasks().length > 1);\r\n\t\t\tif (multipleDrag && dragId === taskId){\r\n\t\t\t\tprojectDrag = false;\r\n\t\t\t\tdragId = null;\r\n\t\t\t\tthis.stopBatchAction();\r\n\t\t\t}\r\n\t\t\t// GS-99. When dragging multiple tasks, we need to store the initial tasks\r\n\t\t\tthis.store(taskId, gantt.config.undo_types.task, true);\r\n\t\t});\r\n\r\n\t\tgantt.attachEvent(\"onLightbox\", (taskId: TaskID) => this.store(taskId, gantt.config.undo_types.task));\r\n\r\n\t\tgantt.attachEvent(\"onBeforeTaskAutoSchedule\", (task: ITask) => {\r\n\t\t\tthis.store(task.id, gantt.config.undo_types.task, true);\r\n\t\t\treturn true;\r\n\t\t});\r\n\r\n\t\tif (gantt.ext.inlineEditors) {\r\n\t\t\t// remove the onGanttLayoutReady wrapper when GS-1288 is merged\r\n\t\t\tlet onBeforeEditStartId = null;\r\n\t\t\tlet onEditStart = null;\r\n\t\t\tgantt.attachEvent(\"onGanttLayoutReady\", () => {\r\n\t\t\t\tif (onBeforeEditStartId) {\r\n\t\t\t\t\tgantt.ext.inlineEditors.detachEvent(onBeforeEditStartId);\r\n\t\t\t\t}\r\n\t\t\t\tif (onEditStart) {\r\n\t\t\t\t\tgantt.ext.inlineEditors.detachEvent(onEditStart);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tonEditStart = gantt.ext.inlineEditors.attachEvent(\"onEditStart\", (state: IInlineEditState) => {\r\n\t\t\t\t\tthis.store(state.id, gantt.config.undo_types.task);\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// GS-99. If another inline editor is opened and we open a new inline editor,\r\n\t\t\t\t// we shouldn't use the batchAction\r\n\t\t\t\tonBeforeEditStartId = gantt.ext.inlineEditors.attachEvent(\"onBeforeEditStart\", (state: IInlineEditState) => {\r\n\t\t\t\t\tthis.stopBatchAction();\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _storeCommand(command: IUndoCommand) {\r\n\t\tconst undo = this._undo;\r\n\t\tundo.updateConfigs();\r\n\r\n\t\tif (!undo.undoEnabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (this._batchMode) {\r\n\t\t\tthis._batchAction.commands.push(command);\r\n\t\t} else {\r\n\t\t\tconst action = undo.action.create([command]);\r\n\t\t\tundo.logAction(action);\r\n\t\t}\r\n\t}\r\n\tprivate _storeEntityCommand(obj: TUndoValue, old: TUndoValue, actionType: TActionType, entityType: TEntityType) {\r\n\t\tconst undo = this._undo;\r\n\t\tconst command = undo.command.create(obj, old, actionType, entityType);\r\n\t\tthis._storeCommand(command);\r\n\t}\r\n\tprivate _storeTaskCommand(obj: ITask, type: TActionType) {\r\n\t\tif(this._gantt.isTaskExists(obj.id)){\r\n\t\t\t(obj as any).$local_index = this._gantt.getTaskIndex(obj.id);\r\n\t\t}\r\n\r\n\t\tthis._storeEntityCommand(obj, this.getInitialTask(obj.id), type, this._undo.command.entity.task);\r\n\t}\r\n\tprivate _storeLinkCommand(obj: ILink, type: TActionType) {\r\n\t\tthis._storeEntityCommand(obj, this.getInitialLink(obj.id), type, this._undo.command.entity.link);\r\n\t}\r\n\tprivate _getLinks(task: ITask) {\r\n\t\treturn task.$source.concat(task.$target);\r\n\t}\r\n\tprivate _storeTask(taskId: TaskID, overwrite: boolean = false) {\r\n\t\tconst gantt = this._gantt;\r\n\t\tthis.setInitialTask(taskId, overwrite);\r\n\t\tgantt.eachTask((child: ITask) => {\r\n\t\t\tthis.setInitialTask(child.id);\r\n\t\t}, taskId);\r\n\t\treturn true;\r\n\t}\r\n\tprivate _storeLink(linkId: LinkID, overwrite: boolean = false) {\r\n\t\tthis.setInitialLink(linkId, overwrite);\r\n\t\treturn true;\r\n\t}\r\n}","import { Monitor } from \"./monitor\";\r\nimport { IMonitor, IUndoCommand, TEntityType, TUndoStack } from \"./types\";\r\nimport { Undo } from \"./undo\";\r\n\r\nexport default function(gantt: any){\r\n\r\nconst _undo = new Undo(gantt);\r\nconst monitor: IMonitor = new Monitor(_undo, gantt);\r\n\r\ngantt.config.undo = true;\r\ngantt.config.redo = true;\r\n\r\n/**\r\n * entities that require different processing for undoing-redoing changes\r\n * @type {{link: string, task: string}}\r\n */\r\ngantt.config.undo_types = {\r\n\tlink: \"link\",\r\n\ttask: \"task\"\r\n};\r\n\r\n/**\r\n * types of traced actions\r\n * @type {{update: string, remove: string, add: string}}\r\n */\r\ngantt.config.undo_actions = {\r\n\tupdate: \"update\",\r\n\tremove: \"remove\", // remove item from datastore\r\n\tadd: \"add\",\r\n\tmove: \"move\" // move task in grid\r\n};\r\n\r\nif (!gantt.ext) {\r\n\tgantt.ext = {};\r\n}\r\n\r\ngantt.ext.undo = {\r\n\tundo: () => _undo.undo(),\r\n\tredo: () => _undo.redo(),\r\n\tgetUndoStack: () => _undo.getUndoStack(),\r\n\tsetUndoStack: (stack:[]) => _undo.setUndoStack(stack),\r\n\tgetRedoStack: () => _undo.getRedoStack(),\r\n\tsetRedoStack: (stack:[]) => _undo.setRedoStack(stack),\r\n\tclearUndoStack: () => _undo.clearUndoStack(),\r\n\tclearRedoStack: () => _undo.clearRedoStack(),\r\n\tsaveState: (id: TaskID | LinkID, type: TEntityType) => monitor.store(id, type, true),\r\n\tgetInitialState: (id: TaskID | LinkID, type: TEntityType) => {\r\n\t\tif(type === gantt.config.undo_types.link){\r\n\t\t\treturn monitor.getInitialLink(id);\r\n\t\t}else{\r\n\t\t\treturn monitor.getInitialTask(id);\r\n\t\t}\r\n\t}\r\n};\r\n\r\ngantt.undo = gantt.ext.undo.undo;\r\ngantt.redo = gantt.ext.undo.redo;\r\ngantt.getUndoStack = gantt.ext.undo.getUndoStack;\r\ngantt.getRedoStack = gantt.ext.undo.getRedoStack;\r\ngantt.clearUndoStack = gantt.ext.undo.clearUndoStack;\r\ngantt.clearRedoStack = gantt.ext.undo.clearRedoStack;\r\n\r\nfunction updTask(task: ITask, oldId: TaskID, newId: TaskID) {\r\n\tif (!task) { return; }\r\n\r\n\tif (task.id === oldId) {\r\n\t\ttask.id = newId;\r\n\t}\r\n\r\n\tif (task.parent === oldId) {\r\n\t\ttask.parent = newId;\r\n\t}\r\n}\r\n\r\nfunction changeTaskCommandId(command: IUndoCommand, oldId: TaskID, newId: TaskID) {\r\n\tupdTask(command.value, oldId, newId);\r\n\tupdTask(command.oldValue, oldId, newId);\r\n}\r\n\r\nfunction updLink(link: ILink, oldTaskId: TaskID, newTaskId: TaskID) {\r\n\tif (!link) { return; }\r\n\tif (link.source === oldTaskId) {\r\n\t\tlink.source = newTaskId;\r\n\t}\r\n\tif (link.target === oldTaskId) {\r\n\t\tlink.target = newTaskId;\r\n\t}\r\n}\r\n\r\nfunction changeLinkCommandId(command: IUndoCommand, oldId: LinkID, newId: LinkID) {\r\n\tupdLink(command.value, oldId, newId);\r\n\tupdLink(command.oldValue, oldId, newId);\r\n}\r\n\r\nfunction updateTasksIds(log: TUndoStack, oldId: TaskID, newId: TaskID) {\r\n\tconst undo = _undo;\r\n\r\n\tfor (let i = 0; i < log.length; i++) {\r\n\t\tconst entry = log[i];\r\n\t\tfor (let j = 0; j < entry.commands.length; j++) {\r\n\t\t\tif (entry.commands[j].entity === undo.command.entity.task) {\r\n\t\t\t\tchangeTaskCommandId(entry.commands[j], oldId, newId);\r\n\t\t\t} else if (entry.commands[j].entity === undo.command.entity.link) {\r\n\t\t\t\tchangeLinkCommandId(entry.commands[j], oldId, newId);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction updateLinksIds(log: TUndoStack, oldId: LinkID, newId: LinkID) {\r\n\tconst undo = _undo;\r\n\r\n\tfor (let i = 0; i < log.length; i++) {\r\n\t\tconst entry = log[i];\r\n\t\tfor (let j = 0; j < entry.commands.length; j++) {\r\n\t\t\tconst command = entry.commands[j];\r\n\t\t\tif (command.entity === undo.command.entity.link) {\r\n\t\t\t\tif (command.value && command.value.id === oldId) {\r\n\t\t\t\t\tcommand.value.id = newId;\r\n\t\t\t\t}\r\n\t\t\t\tif (command.oldValue && command.oldValue.id === oldId) {\r\n\t\t\t\t\tcommand.oldValue.id = newId;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\ngantt.attachEvent(\"onTaskIdChange\", (oldId: TaskID, newId: TaskID) => {\r\n\tconst undo = _undo;\r\n\tupdateTasksIds(undo.getUndoStack(), oldId, newId);\r\n\tupdateTasksIds(undo.getRedoStack(), oldId, newId);\r\n});\r\n\r\ngantt.attachEvent(\"onLinkIdChange\", (oldId: LinkID, newId: LinkID) => {\r\n\tconst undo = _undo;\r\n\tupdateLinksIds(undo.getUndoStack(), oldId, newId);\r\n\tupdateLinksIds(undo.getRedoStack(), oldId, newId);\r\n});\r\n\r\ngantt.attachEvent(\"onGanttReady\", () => {\r\n\t_undo.updateConfigs();\r\n});\r\n\r\n}","import * as domHelpers from \"../../core/ui/utils/dom_helpers\";\r\n\r\ninterface IViewPosition{\r\n\ttop: number;\r\n\tleft: number;\r\n}\r\n\r\ninterface IViewBox extends IViewPosition{\r\n\twidth: number;\r\n\theight: number;\r\n\tbottom: number;\r\n\tright: number;\r\n}\r\n\r\nexport class Tooltip {\r\n\tprivate _root: HTMLElement;\r\n\tprivate _tooltipNode: HTMLElement;\r\n\tprivate _gantt: any;\r\n\r\n\tconstructor(gantt: any){\r\n\t\tthis._gantt = gantt;\r\n\t}\r\n\r\n\tgetNode() : HTMLElement {\r\n\t\tconst gantt = this._gantt;\r\n\t\tif (!this._tooltipNode){\r\n\t\t\tthis._tooltipNode = document.createElement(\"div\");\r\n\t\t\tthis._tooltipNode.className = \"gantt_tooltip\";\r\n\t\t\tgantt._waiAria.tooltipAttr(this._tooltipNode);\r\n\t\t}\r\n\t\treturn this._tooltipNode;\r\n\t}\r\n\r\n\tsetViewport(node: HTMLElement):Tooltip{\r\n\t\tthis._root = node;\r\n\t\treturn this;\r\n\t}\r\n\r\n\tshow(left: number, top: number): Tooltip;\r\n\tshow(event: MouseEvent): Tooltip;\r\n\tshow(left: number | MouseEvent, top?: number): Tooltip {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst container = document.body;\r\n\t\tconst node = this.getNode();\r\n\r\n\t\tif(!domHelpers.isChildOf(node, container)){\r\n\t\t\tthis.hide();\r\n\t\t\t// GS-2463. Don't put the node beyond the body coordinates\r\n\t\t\t// as it may trigger the resize event\r\n\t\t\tnode.style.top = node.style.top || \"0px\";\r\n\t\t\tnode.style.left = node.style.left || \"0px\";\r\n\t\t\tcontainer.appendChild(node);\r\n\t\t}\r\n\r\n\t\tif (this._isLikeMouseEvent(left)) {\r\n\t\t\tconst position = this._calculateTooltipPosition(left as MouseEvent);\r\n\t\t\ttop = position.top;\r\n\t\t\tleft = position.left;\r\n\t\t}\r\n\r\n\t\tnode.style.top = top + \"px\";\r\n\t\tnode.style.left = left + \"px\";\r\n\r\n\t\tgantt._waiAria.tooltipVisibleAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\thide() : Tooltip{\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst node = this.getNode();\r\n\t\tif(node && node.parentNode){\r\n\t\t\tnode.parentNode.removeChild(node);\r\n\t\t}\r\n\t\tgantt._waiAria.tooltipHiddenAttr(node);\r\n\t\treturn this;\r\n\t}\r\n\r\n\tsetContent(html: string) : Tooltip{\r\n\t\tconst node = this.getNode();\r\n\t\tnode.innerHTML = html;\r\n\t\treturn this;\r\n\t}\r\n\r\n\t// it is for salesforce, because it proxies event to it own events\r\n\tprivate _isLikeMouseEvent(event: any): boolean {\r\n\t\tif (!event || typeof event !== \"object\") {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn \"clientX\" in event && \"clientY\" in event;\r\n\t}\r\n\r\n\tprivate _getViewPort() : HTMLElement {\r\n\t\treturn this._root || document.body;\r\n\t}\r\n\r\n\r\n\tprivate _calculateTooltipPosition(event: MouseEvent): IViewPosition{\r\n\t\tconst gantt = this._gantt;\r\n\t\t// top/left coordinates inside the viewport by mouse position\r\n\t\tconst viewport = this._getViewPortSize();\r\n\t\tconst tooltipNode = this.getNode();\r\n\t\tconst tooltip: IViewBox = {\r\n\t\t\ttop:0,\r\n\t\t\tleft: 0,\r\n\t\t\twidth: tooltipNode.offsetWidth,\r\n\t\t\theight: tooltipNode.offsetHeight,\r\n\t\t\tbottom: 0,\r\n\t\t\tright: 0\r\n\t\t};\r\n\r\n\t\tconst offsetX = gantt.config.tooltip_offset_x;\r\n\t\tconst offsetY = gantt.config.tooltip_offset_y;\r\n\r\n\t\tconst container = document.body;\r\n\t\tconst mouse = domHelpers.getRelativeEventPosition(event, container);\r\n\t\tconst containerPos = domHelpers.getNodePosition(container);\r\n\t\tmouse.y += containerPos.y; // to fix margin collapsing\r\n\r\n\t\ttooltip.top = mouse.y;\r\n\t\ttooltip.left = mouse.x;\r\n\t\ttooltip.top += offsetY;\r\n\t\ttooltip.left += offsetX;\r\n\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\r\n\t\tconst scrollTop = window.scrollY + container.scrollTop; // to fix margin collapsing\r\n\t\t// edge cases when the tooltip element can be partially hidden by edges of the viewport\r\n\t\tif(tooltip.top < viewport.top - scrollTop){\r\n\t\t\ttooltip.top = viewport.top;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}else if(tooltip.bottom > viewport.bottom){\r\n\t\t\ttooltip.bottom = viewport.bottom;\r\n\t\t\ttooltip.top = tooltip.bottom - tooltip.height;\r\n\t\t}\r\n\r\n\t\tif(tooltip.left < viewport.left){\r\n\t\t\ttooltip.left = viewport.left;\r\n\t\t\ttooltip.right = viewport.left + tooltip.width;\r\n\t\t}else if(tooltip.right > viewport.right){\r\n\t\t\ttooltip.right = viewport.right;\r\n\t\t\ttooltip.left = tooltip.right - tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.x >= tooltip.left && mouse.x <= tooltip.right) {\r\n\t\t\ttooltip.left = mouse.x - tooltip.width - offsetX;\r\n\t\t\ttooltip.right = tooltip.left + tooltip.width;\r\n\t\t}\r\n\r\n\t\tif(mouse.y >= tooltip.top && mouse.y <= tooltip.bottom) {\r\n\t\t\ttooltip.top = mouse.y - tooltip.height - offsetY;\r\n\t\t\ttooltip.bottom = tooltip.top + tooltip.height;\r\n\t\t}\r\n\r\n\t\treturn tooltip;\r\n\t}\r\n\r\n\tprivate _getViewPortSize() : IViewBox {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst container = this._getViewPort();\r\n\t\tlet viewport = container;\r\n\t\tlet scrollTop = window.scrollY + document.body.scrollTop;\r\n\t\tlet scrollLeft = window.scrollX + document.body.scrollLeft;\r\n\t\tlet pos;\r\n\t\t// support for the initial tooltip mode where the tooltip element was attached to the data area of gantt\r\n\t\tif(container === gantt.$task_data){\r\n\t\t\tviewport = gantt.$task;\r\n\t\t\tscrollTop = 0;\r\n\t\t\tscrollLeft = 0;\r\n\t\t\tpos = domHelpers.getNodePosition(gantt.$task);\r\n\t\t}else{\r\n\t\t\tpos = domHelpers.getNodePosition(viewport);\r\n\t\t}\r\n\t\treturn {\r\n\t\t\tleft:pos.x + scrollLeft,\r\n\t\t\ttop: pos.y + scrollTop,\r\n\t\t\twidth: pos.width,\r\n\t\t\theight: pos.height,\r\n\t\t\tbottom: pos.y + pos.height + scrollTop,\r\n\t\t\tright: pos.x + pos.width + scrollLeft\r\n\t\t};\r\n\t}\r\n}\r\n","import * as domEventsScope from \"../../core/ui/utils/dom_event_scope\";\r\nimport * as domHelpers from \"../../core/ui/utils/dom_helpers\";\r\nimport * as helpers from \"../../utils/helpers\";\r\nimport { Tooltip } from \"./tooltip\";\r\n\r\ninterface ITrackerTarget {\r\n\tselector: string;\r\n\tonmouseenter: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmousemove: (event: MouseEvent, node: HTMLElement) => void;\r\n\tonmouseleave: (event: MouseEvent, node: HTMLElement) => void;\r\n\tglobal: boolean;\r\n}\r\n\r\ninterface ITooltipConfig {\r\n\tselector: string;\r\n\thtml: (event: MouseEvent, node: HTMLElement) => string;\r\n\tglobal: boolean;\r\n}\r\n\r\nexport class TooltipManager{\r\n\ttooltip: Tooltip;\r\n\tprotected _domEvents: any;\r\n\tprivate _listeners: object = {};\r\n\tprivate _gantt: any;\r\n\tprivate delayShow: any;\r\n\tprivate delayHide: any;\r\n\r\n\tconstructor(gantt: any) {\r\n\t\tthis.tooltip = new Tooltip(gantt);\r\n\t\tthis._gantt = gantt;\r\n\t\tthis._domEvents = domEventsScope();\r\n\t\tthis._initDelayedFunctions();\r\n\t}\r\n\r\n\tdestructor(): void{\r\n\t\tthis.tooltip.hide();\r\n\t\tthis._domEvents.detachAll();\r\n\t}\r\n\thideTooltip(): void{\r\n\t\tthis.delayHide();\r\n\t}\r\n\tattach(config: ITrackerTarget): void {\r\n\t\tlet root = document.body;\r\n\t\tconst gantt = this._gantt;\r\n\t\tif(!config.global){\r\n\t\t\troot = gantt.$root;\r\n\t\t}\r\n\r\n\t\tlet watchableTarget = null;\r\n\t\tconst handler = (event) => {\r\n\t\t\tconst eventTarget = domHelpers.getTargetNode(event);\r\n\t\t\tconst targetNode = domHelpers.closest(eventTarget, config.selector);\r\n\t\t\tif(domHelpers.isChildOf(eventTarget, this.tooltip.getNode())){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst doOnMouseEnter = () => {\r\n\t\t\t\twatchableTarget = targetNode;\r\n\t\t\t\tconfig.onmouseenter(event, targetNode);\r\n\t\t\t};\r\n\r\n\t\t\tif(watchableTarget){\r\n\t\t\t\tif(targetNode && targetNode === watchableTarget){\r\n\t\t\t\t\tconfig.onmousemove(event, targetNode);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconfig.onmouseleave(event, watchableTarget);\r\n\t\t\t\t\twatchableTarget = null;\r\n\r\n\t\t\t\t\tif(targetNode && targetNode !== watchableTarget){\r\n\t\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(targetNode){\r\n\t\t\t\t\tdoOnMouseEnter();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tthis.detach(config.selector);\r\n\t\tthis._domEvents.attach(root, \"mousemove\", handler);\r\n\t\tthis._listeners[config.selector] = {\r\n\t\t\tnode: root,\r\n\t\t\thandler\r\n\t\t};\r\n\t}\r\n\r\n\tdetach(selector: string): void {\r\n\t\tconst listener = this._listeners[selector];\r\n\t\tif(listener){\r\n\t\t\tthis._domEvents.detach(listener.node, \"mousemove\", listener.handler);\r\n\t\t}\r\n\t}\r\n\r\n\ttooltipFor(config: ITooltipConfig): void {\r\n\t\tconst cloneDomEvent = (event: MouseEvent) => {\r\n\t\t\tlet clone = event;\r\n\t\t\t// making events survive timeout in ie\r\n\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\tif(document[\"createEventObject\"] && !document.createEvent){\r\n\t\t\t\t// tslint:disable-next-line no-string-literal\r\n\t\t\t\tclone = document[\"createEventObject\"](event);\r\n\t\t\t}\r\n\t\t\treturn clone;\r\n\t\t};\r\n\t\tthis._initDelayedFunctions();\r\n\t\tthis.attach({\r\n\t\t\tselector: config.selector,\r\n\t\t\tglobal: config.global,\r\n\t\t\tonmouseenter:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmousemove:(event: MouseEvent, node: HTMLElement) => {\r\n\t\t\t\tconst html = config.html(event, node);\r\n\t\t\t\tif(html){\r\n\t\t\t\t\tthis.delayShow(cloneDomEvent(event), html);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\t\tthis.delayHide();\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tonmouseleave:() => {\r\n\t\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\t\tthis.delayHide();\r\n\t\t\t},\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _initDelayedFunctions(){\r\n\t\tconst gantt = this._gantt;\r\n\t\t// reset delayed functions in order to apply current values of tooltip_timeout\r\n\t\tif(this.delayShow){\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t}\r\n\t\tif(this.delayHide){\r\n\t\t\tthis.delayHide.$cancelTimeout();\r\n\t\t}\r\n\t\tthis.tooltip.hide();\r\n\r\n\t\tthis.delayShow = helpers.delay((event: MouseEvent, html: string) => {\r\n\t\t\tif(gantt.callEvent(\"onBeforeTooltip\", [event]) === false) {\r\n\t\t\t\tthis.tooltip.hide();\r\n\t\t\t} else {\r\n\t\t\t\tthis.tooltip.setContent(html);\r\n\t\t\t\tthis.tooltip.show(event);\r\n\t\t\t}\r\n\t\t}, gantt.config.tooltip_timeout || 1);\r\n\r\n\t\tthis.delayHide = helpers.delay(() => {\r\n\t\t\tthis.delayShow.$cancelTimeout();\r\n\t\t\tthis.tooltip.hide();\r\n\t\t}, gantt.config.tooltip_hide_timeout || 1);\r\n\t}\r\n\r\n}","import {TooltipManager} from \"./tooltipManager\";\r\n\r\nexport default function(gantt: any){\r\n\r\ngantt.config.tooltip_timeout = 30;\r\ngantt.config.tooltip_offset_y = 20;\r\ngantt.config.tooltip_offset_x = 10;\r\ngantt.config.tooltip_hide_timeout = 30;\r\n\r\n\r\n\r\nconst tooltipManager = new TooltipManager(gantt);\r\n\r\ngantt.ext.tooltips = tooltipManager;\r\n\r\ngantt.attachEvent(\"onGanttReady\", function(){\r\n\r\n\ttooltipManager.tooltipFor({\r\n\t\tselector: \"[\"+gantt.config.task_attribute+\"]:not(.gantt_task_row)\",\r\n\t\thtml: (event: MouseEvent) => {\r\n\t\t\tif (gantt.config.touch && !gantt.config.touch_tooltip) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tconst targetTaskId = gantt.locate(event);\r\n\t\t\tif(gantt.isTaskExists(targetTaskId)){\r\n\t\t\t\tconst task = gantt.getTask(targetTaskId);\r\n\t\t\t\treturn gantt.templates.tooltip_text(task.start_date, task.end_date, task);\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tglobal: false\r\n\t});\r\n});\r\n\r\ngantt.attachEvent(\"onDestroy\", function() {\r\n\ttooltipManager.destructor();\r\n});\r\n\r\ngantt.attachEvent(\"onLightbox\", function() {\r\n\ttooltipManager.hideTooltip();\r\n});\r\nconst isLinkCreate = () => {\r\n\tconst state = gantt.getState();\r\n\treturn !!state.link_source_id;\r\n};\r\ngantt.attachEvent(\"onBeforeTooltip\", function() {\r\n\tif (isLinkCreate()){\r\n\t\treturn false;\r\n\t}\r\n});\r\n\r\ngantt.attachEvent(\"onGanttScroll\", function(){\r\n\ttooltipManager.hideTooltip();\r\n});\r\n\r\n}","\r\ninterface IQuickInfoContainer{\r\n\tparent: HTMLElement;\r\n\txViewport: HTMLElement;\r\n\tyViewport: HTMLElement;\r\n}\r\n\r\nexport class QuickInfo {\r\n\tprivate _quickInfoTask: TaskID;\r\n\tprivate _quickInfoBoxId: number | string;\r\n\tprivate _quickInfoBox: HTMLElement;\r\n\tprivate _quickInfoReadonly: boolean | null;\r\n\tprivate _container: HTMLElement;\r\n\tprivate _gantt: any;\r\n\r\n\tconstructor(gantt: any) {\r\n\t\tthis._gantt = gantt;\r\n\t}\r\n\r\n\t// show at coordinates:\r\n\t// show(x: number, y: number)\r\n\t// show for a task:\r\n\t// show(id: TaskID)\r\n\tshow : {\r\n\t\t(x: number, y: number) : void;\r\n\t\t(id: TaskID) : void;\r\n\t} = (id: TaskID | number, y? : number) : void => {\r\n\t\tif (y === undefined) {\r\n\t\t\tthis._showForTask(id);\r\n\t\t} else {\r\n\t\t\tthis._showAtCoordinates(id as number, y);\r\n\t\t}\r\n\t}\r\n\r\n\thide = (forced?: boolean) : any => {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst qi = this._quickInfoBox;\r\n\t\tthis._quickInfoBoxId = 0;\r\n\t\tconst taskId = this._quickInfoTask;\r\n\t\tthis._quickInfoTask = null;\r\n\r\n\t\tif (qi && qi.parentNode){\r\n\r\n\t\t\tif (gantt.config.quick_info_detached) {\r\n\t\t\t\tgantt.callEvent(\"onAfterQuickInfo\", [taskId]);\r\n\t\t\t\treturn qi.parentNode.removeChild(qi);\r\n\t\t\t}\r\n\r\n\t\t\tqi.className += \" gantt_qi_hidden\";\r\n\t\t\tif (qi.style.right === \"auto\"){\r\n\t\t\t\tqi.style.left = \"-350px\";\r\n\t\t\t} else {\r\n\t\t\t\tqi.style.right = \"-350px\";\r\n\t\t\t}\r\n\r\n\t\t\tif (forced) {\r\n\t\t\t\tqi.style.left = qi.style.right = \"\";\r\n\t\t\t\tqi.parentNode.removeChild(qi);\r\n\t\t\t}\r\n\t\t\tgantt.callEvent(\"onAfterQuickInfo\", [taskId]);\r\n\t\t}\r\n\t}\r\n\r\n\tgetNode = (): HTMLElement => {\r\n\t\tif(this._quickInfoBox) {\r\n\t\t\treturn this._quickInfoBox;\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tsetContainer = (container: string|HTMLElement): void => {\r\n\t\tif(container){\r\n\t\t\tthis._container = typeof container === \"string\" ? document.getElementById(container) : container;\r\n\t\t}\r\n\t}\r\n\r\n\tsetContent = (content?: IQuickInfoContent) => {\r\n\t\tconst gantt = this._gantt;\r\n\r\n\t\tconst defaultContent = {\r\n\t\t\ttaskId: null,\r\n\t\t\theader: {\r\n\t\t\t\ttitle: \"\",\r\n\t\t\t\tdate: \"\"\r\n\t\t\t},\r\n\t\t\tcontent: \"\",\r\n\t\t\tbuttons: gantt.config.quickinfo_buttons\r\n\t\t};\r\n\r\n\t\tif(!content){\r\n\t\t\tcontent = defaultContent;\r\n\t\t}\r\n\r\n\t\tif(!content.taskId){\r\n\t\t\tcontent.taskId = defaultContent.taskId;\r\n\t\t}\r\n\r\n\t\tif(!content.header){\r\n\t\t\tcontent.header = defaultContent.header;\r\n\t\t}\r\n\r\n\t\tif(!content.header.title){\r\n\t\t\tcontent.header.title = defaultContent.header.title;\r\n\t\t}\r\n\t\tif(!content.header.date){\r\n\t\t\tcontent.header.date = defaultContent.header.date;\r\n\t\t}\r\n\t\tif(!content.content){\r\n\t\t\tcontent.content = defaultContent.content;\r\n\t\t}\r\n\t\tif(!content.buttons){\r\n\t\t\tcontent.buttons = defaultContent.buttons;\r\n\t\t}\r\n\r\n\r\n\t\tlet qi = this.getNode();\r\n\t\tif(!qi){\r\n\t\t\tqi = this._createQuickInfoElement();\r\n\t\t}\r\n\r\n\t\tif(content.taskId){\r\n\t\t\tthis._quickInfoBoxId = content.taskId;\r\n\t\t}\r\n\r\n\t\tconst titleBox = qi.querySelector(\".gantt_cal_qi_title\") as HTMLElement;\r\n\t\tconst titleContent = titleBox.querySelector(\".gantt_cal_qi_tcontent\");\r\n\t\tconst titleDate = titleBox.querySelector(\".gantt_cal_qi_tdate\");\r\n\t\tconst main = qi.querySelector(\".gantt_cal_qi_content\");\r\n\t\tconst controls = qi.querySelector(\".gantt_cal_qi_controls\") as HTMLElement;\r\n\r\n\t\tgantt._waiAria.quickInfoHeader(qi, [content.header.title, content.header.date].join(\" \"));\r\n\r\n\t\ttitleContent.innerHTML = content.header.title;\r\n\t\ttitleDate.innerHTML = content.header.date;\r\n\r\n\t\tif(!content.header.title && !content.header.date){\r\n\t\t\ttitleBox.style.display = \"none\";\r\n\t\t}else{\r\n\t\t\ttitleBox.style.display = \"\";\r\n\t\t}\r\n\t\tmain.innerHTML = content.content;\r\n\r\n\t\tconst buttons = content.buttons;\r\n\t\tif(!buttons.length){\r\n\t\t\tcontrols.style.display = \"none\";\r\n\t\t}else{\r\n\t\t\tcontrols.style.display = \"\";\r\n\t\t}\r\n\t\tlet html = \"\";\r\n\t\tfor (let i = 0; i < buttons.length; i++){\r\n\r\n\t\t\tconst ariaAttr = gantt._waiAria.quickInfoButtonAttrString(gantt.locale.labels[buttons[i]]);\r\n\r\n\t\t\thtml += \"
\"+gantt.locale.labels[buttons[i]]+\"
\";\r\n\t\t}\r\n\t\tcontrols.innerHTML = html;\r\n\r\n\t\tgantt.eventRemove(qi, \"click\", this._qiButtonClickHandler);\r\n\t\tgantt.eventRemove(qi, \"keypress\", this._qiKeyPressHandler);\r\n\r\n\t\tgantt.event(qi, \"click\", this._qiButtonClickHandler);\r\n\t\tgantt.event(qi, \"keypress\", this._qiKeyPressHandler);\r\n\t}\r\n\r\n\tprivate _qiButtonClickHandler = (ev) => {\r\n\t\tev = ev || event;\r\n\t\tthis._qi_button_click(ev.target || ev.srcElement);\r\n\t}\r\n\r\n\tprivate _qiKeyPressHandler = (e) => {\r\n\t\te = e || event;\r\n\t\t// @ts-ignore\r\n\t\tconst code = e.which||event.keyCode;\r\n\t\tif (code === 13 || code === 32){\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthis._qi_button_click(e.target || e.srcElement);\r\n\t\t\t},1);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _showAtCoordinates(x: number, y: number) : void {\r\n\t\tthis.hide(true);\r\n\t\tthis._quickInfoBoxId = 0;\r\n\t\tthis._quickInfoTask = null;\r\n\t\tif(!this._quickInfoBox){\r\n\t\t\tthis._createQuickInfoElement();\r\n\t\t\tthis.setContent();\r\n\t\t}\r\n\r\n\t\tthis._appendAtCoordinates(x, y);\r\n\t\tthis._gantt.callEvent(\"onQuickInfo\", [null]);\r\n\t}\r\n\r\n\tprivate _showForTask(id: TaskID) : void {\r\n\t\tconst gantt = this._gantt;\r\n\t\tif ((\r\n\t\t\tid === this._quickInfoBoxId &&\r\n\t\t\tgantt.utils.dom.isChildOf(this._quickInfoBox, document.body)\r\n\t\t) || !gantt.config.show_quick_info) {\r\n\t\t\t// not show if the quick info is already displayed for this task, or if it shouldn't be displayed\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.hide(true);\r\n\t\tconst offset = 6; // offset TASK <> QI-BOX in 'px'\r\n\t\tconst container = this._getContainer();\r\n\t\tconst pos = this._get_event_counter_part(id, offset, container.xViewport, container.yViewport);\r\n\r\n\t\tif (pos){\r\n\t\t\tthis._quickInfoBox = this._init_quick_info(id);\r\n\t\t\tthis._quickInfoTask = id;\r\n\t\t\tthis._quickInfoBox.className = this._prepare_quick_info_classname(id);\r\n\r\n\t\t\tthis._fill_quick_data(id);\r\n\t\t\tthis._show_quick_info(pos, offset);\r\n\t\t\tgantt.callEvent(\"onQuickInfo\", [id]);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _get_event_counter_part(id: TaskID, offset: number, xViewport: HTMLElement, yViewport: HTMLElement) : any {\r\n\t\tconst gantt = this._gantt;\r\n\t\tlet domEv = gantt.getTaskNode(id);\r\n\t\tif (!domEv) {\r\n\t\t\tdomEv = gantt.getTaskRowNode(id);\r\n\t\t\tif (!domEv) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\tlet left = 0;\r\n\t\tconst top = offset + domEv.offsetTop + domEv.offsetHeight;\r\n\r\n\t\tlet node = domEv;\r\n\r\n\t\tif (gantt.utils.dom.isChildOf(node, xViewport)) {\r\n\t\t\twhile (node && node !== xViewport){\r\n\t\t\t\tleft += node.offsetLeft;\r\n\t\t\t\tnode = node.offsetParent;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst scroll = gantt.getScrollState();\r\n\r\n\t\tif(node){\r\n\t\t\tconst dx = (left + domEv.offsetWidth/2) - scroll.x > (xViewport.offsetWidth/2) ? 1 : 0;\r\n\t\t\tconst dy = (top + domEv.offsetHeight/2) - scroll.y > (yViewport.offsetHeight/2) ? 1 : 0;\r\n\r\n\t\t\treturn { left, top, dx, dy, width:domEv.offsetWidth, height:domEv.offsetHeight };\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\r\n\tprivate _createQuickInfoElement() : HTMLElement {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst qi = document.createElement(\"div\");\r\n\t\tqi.className += \"gantt_cal_quick_info\";\r\n\t\tgantt._waiAria.quickInfoAttr(qi);\r\n\r\n\t\t// title\r\n\t\tconst ariaAttr = gantt._waiAria.quickInfoHeaderAttrString();\r\n\t\tlet html = \"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\" +\r\n\t\t\t\"
\";\r\n\r\n\t\t// buttons\r\n\t\thtml += \"
\";\r\n\t\thtml += \"
\";\r\n\r\n\t\tqi.innerHTML = html;\r\n\r\n\r\n\t\tif (gantt.config.quick_info_detached) {\r\n\t\t\tconst container = this._getContainer();\r\n\t\t\tgantt.event(container.parent, \"scroll\", () => { this.hide(); });\r\n\t\t}\r\n\r\n\t\tthis._quickInfoBox = qi;\r\n\t\treturn qi;\r\n\t}\r\n\r\n\tprivate _init_quick_info(id: TaskID) : HTMLElement {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst task = gantt.getTask(id);\r\n\t\tif(typeof this._quickInfoReadonly === \"boolean\"){\r\n\t\t\tif(gantt.isReadonly(task) !== this._quickInfoReadonly){\r\n\t\t\t\tthis.hide(true);\r\n\t\t\t\tthis._quickInfoBox = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._quickInfoReadonly = gantt.isReadonly(task);\r\n\r\n\t\tif (!this._quickInfoBox){\r\n\t\t\tthis._quickInfoBox = this._createQuickInfoElement();\r\n\t\t}\r\n\r\n\t\treturn this._quickInfoBox;\r\n\t}\r\n\r\n\tprivate _prepare_quick_info_classname(id: TaskID) : string {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst task = gantt.getTask(id);\r\n\r\n\t\tlet css = \"gantt_cal_quick_info\";\r\n\t\tconst template = gantt.templates.quick_info_class(task.start_date, task.end_date, task);\r\n\r\n\t\tif(template){\r\n\t\t\tcss += \" \" + template;\r\n\t\t}\r\n\t\treturn css;\r\n\t}\r\n\r\n\tprivate _fill_quick_data(id: TaskID) : void {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst ev = gantt.getTask(id);\r\n\r\n\t\tthis._quickInfoBoxId = id;\r\n\r\n\t\tlet allowedButtons = [];\r\n\t\tif (this._quickInfoReadonly){\r\n\t\t\tconst buttons = gantt.config.quickinfo_buttons;\r\n\t\t\tconst isEditor = {icon_delete: true, icon_edit: true};\r\n\t\t\tfor (let i = 0; i < buttons.length; i++){\r\n\t\t\t\tif(this._quickInfoReadonly && isEditor[buttons[i]]){\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tallowedButtons.push(buttons[i]);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tallowedButtons = gantt.config.quickinfo_buttons;\r\n\t\t}\r\n\r\n\t\tthis.setContent({\r\n\t\t\theader: {\r\n\t\t\t\ttitle: gantt.templates.quick_info_title(ev.start_date, ev.end_date, ev),\r\n\t\t\t\tdate: gantt.templates.quick_info_date(ev.start_date, ev.end_date, ev)\r\n\t\t\t},\r\n\t\t\tcontent: gantt.templates.quick_info_content(ev.start_date, ev.end_date, ev),\r\n\t\t\tbuttons: allowedButtons\r\n\t\t});\r\n\t}\r\n\r\n\tprivate _appendAtCoordinates(x: number, y: number): void {\r\n\t\tconst qi = this._quickInfoBox;\r\n\t\tconst container = this._getContainer();\r\n\t\tif (!qi.parentNode ||\r\n\t\t\tqi.parentNode.nodeName.toLowerCase() === \"#document-fragment\"){ // IE8\r\n\t\t\tcontainer.parent.appendChild(qi);\r\n\t\t}\r\n\r\n\t\tqi.style.left = x + \"px\";\r\n\t\tqi.style.top = y + \"px\";\r\n\t}\r\n\r\n\tprivate _show_quick_info(pos: any, offset: number) : void {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst qi = this._quickInfoBox;\r\n\t\tif (gantt.config.quick_info_detached) {\r\n\t\t\tconst container = this._getContainer();\r\n\t\t\tif (!qi.parentNode ||\r\n\t\t\t\tqi.parentNode.nodeName.toLowerCase() === \"#document-fragment\"){ // IE8\r\n\t\t\t\tcontainer.parent.appendChild(qi);\r\n\t\t\t}\r\n\t\t\tconst width = qi.offsetWidth;\r\n\t\t\tconst popupHeight = qi.offsetHeight;\r\n\r\n\t\t\tconst scrolls = gantt.getScrollState();\r\n\t\t\tconst xViewport = container.xViewport;\r\n\t\t\tconst yViewport = container.yViewport;\r\n\t\t\tconst screenWidth = xViewport.offsetWidth + scrolls.x - width;\r\n\r\n\t\t\tconst relativePopupTop = pos.top - scrolls.y;\r\n\t\t\tconst relativePopupBottom = relativePopupTop + popupHeight;\r\n\r\n\t\t\tlet top = pos.top;\r\n\t\t\tif(relativePopupBottom > yViewport.offsetHeight / 2){\r\n\t\t\t\ttop = pos.top - (popupHeight + pos.height + 2*offset);\r\n\t\t\t\tif(top < scrolls.y && relativePopupBottom <= yViewport.offsetHeight){\r\n\t\t\t\t\ttop = pos.top;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (top < scrolls.y) {\r\n\t\t\t\ttop = scrolls.y;\r\n\t\t\t}\r\n\r\n\t\t\tconst x = Math.min(Math.max(scrolls.x, pos.left - pos.dx*(width - pos.width)), screenWidth);\r\n\t\t\tconst y = top;\r\n\r\n\t\t\tthis._appendAtCoordinates(x, y);\r\n\t\t} else {\r\n\t\t\tqi.style.top = 20 + \"px\";\r\n\t\t\tif (pos.dx === 1){\r\n\t\t\t\tqi.style.right = \"auto\";\r\n\t\t\t\tqi.style.left = \"-300px\";\r\n\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tqi.style.left = \"10px\";\r\n\t\t\t\t},1);\r\n\t\t\t} else {\r\n\t\t\t\tqi.style.left = \"auto\";\r\n\t\t\t\tqi.style.right = \"-300px\";\r\n\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tqi.style.right = \"10px\";\r\n\t\t\t\t},1);\r\n\t\t\t}\r\n\t\t\tqi.className += \" gantt_qi_\"+(pos.dx === 1 ? \"left\" : \"right\");\r\n\t\t\tgantt.$root.appendChild(qi);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _qi_button_click(node: any) : void {\r\n\t\tconst gantt = this._gantt;\r\n\t\tconst box = this._quickInfoBox;\r\n\t\tif (!node || node === box){\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst mask = node.className;\r\n\t\tif (mask.indexOf(\"_icon\") !== -1){\r\n\t\t\tconst id = this._quickInfoBoxId;\r\n\t\t\tgantt.$click.buttons[mask.split(\" \")[1].replace(\"icon_\",\"\")](id);\r\n\t\t} else {\r\n\t\t\tthis._qi_button_click(node.parentNode);\r\n\t\t}\r\n\t}\r\n\r\n\tprivate _getContainer(): IQuickInfoContainer{\r\n\t\tconst gantt = this._gantt;\r\n\t\tlet container = this._container ? this._container : gantt.$task_data;\r\n\t\tif (container && container.offsetHeight && container.offsetWidth) {\r\n\t\t\treturn {\r\n\t\t\t\tparent: container,\r\n\t\t\t\txViewport: gantt.$task,\r\n\t\t\t\tyViewport: gantt.$task_data\r\n\t\t\t};\r\n\t\t}\r\n\t\tcontainer = this._container ? this._container : gantt.$grid_data;\r\n\t\tif (container && container.offsetHeight && container.offsetWidth) {\r\n\t\t\treturn {\r\n\t\t\t\tparent: container,\r\n\t\t\t\txViewport: gantt.$grid,\r\n\t\t\t\tyViewport: gantt.$grid_data\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tparent: this._container ? this._container : gantt.$layout,\r\n\t\t\txViewport: gantt.$layout,\r\n\t\t\tyViewport: gantt.$layout\r\n\t\t};\r\n\t}\r\n}\r\n","import { QuickInfo } from \"./quickInfo\";\r\n\r\nexport default function(gantt: any){\r\n\r\nif (!gantt.ext) {\r\n\tgantt.ext = {};\r\n}\r\ngantt.ext.quickInfo = new QuickInfo(gantt);\r\n\r\ngantt.config.quickinfo_buttons = [\"icon_delete\",\"icon_edit\"];\r\ngantt.config.quick_info_detached = true;\r\ngantt.config.show_quick_info = true;\r\n\r\ngantt.templates.quick_info_title = function(start, end, ev){ return ev.text.substr(0,50); };\r\ngantt.templates.quick_info_content = function(start, end, ev){ return ev.details || ev.text; };\r\ngantt.templates.quick_info_date = function(start, end, ev){\r\n\treturn gantt.templates.task_time(start, end, ev);\r\n};\r\ngantt.templates.quick_info_class = function(start, end, task){ return \"\"; };\r\n\r\ngantt.attachEvent(\"onTaskClick\", function(id,e){\r\n\t// GS-1460 Don't show Quick Info when clicking on the \"+\" button\r\n\tif (!gantt.utils.dom.closest(e.target, \".gantt_add\")){\r\n\t\tsetTimeout(function() {\r\n\t\t\tgantt.ext.quickInfo.show(id);\r\n\t\t}, 0);\r\n\t}\r\n\r\n\treturn true;\r\n});\r\n\r\nconst events = [\"onViewChange\", \"onLightbox\", \"onBeforeTaskDelete\", \"onBeforeDrag\"];\r\nconst hidingFunction = function(){\r\n\tgantt.ext.quickInfo.hide();\r\n\treturn true;\r\n};\r\nfor (let i=0; i gantt.getGlobalTaskIndex(b) ? 1 : -1;\n });\n return res;\n },\n forSelected: function forSelected(callback) {\n var selected = this.getSelected();\n\n for (var i = 0; i < selected.length; i++) {\n callback(selected[i]);\n }\n },\n isSameLevel: function isSameLevel(id) {\n if (!this._one_level) return true;\n var last = this.getLastSelected();\n if (!last) return true;\n if (!(gantt.isTaskExists(last) && gantt.isTaskExists(id))) return true;\n return !!(gantt.calculateTaskLevel(gantt.getTask(last)) == gantt.calculateTaskLevel(gantt.getTask(id)));\n },\n afterSelect: function afterSelect(id) {\n if (gantt.isTaskExists(id)) {\n // FIXME: quick workaround to prevent re-filtering inside refresh on multiselect\n gantt._quickRefresh(function () {\n gantt.refreshTask(id);\n });\n }\n },\n doSelection: function doSelection(e) {\n if (!this.isActive()) return false; // deny selection when click on 'expand' or 'collapse' icons\n\n if (gantt._is_icon_open_click(e)) return false;\n var target_ev = gantt.locate(e);\n if (!target_ev) return false;\n if (!gantt.callEvent(\"onBeforeMultiSelect\", [e])) return false;\n var selected = this.getSelected();\n var defaultLast = this.getFirstSelected();\n var isLast = false;\n var last = this.getLastSelected();\n var multiSelect = gantt.config.multiselect;\n\n var singleSelection = function () {\n // GS-719: If the multiselect extension is added we still need a way\n // to open the inline editors after clicking on the cells in the grid\n var controller = gantt.ext.inlineEditors;\n var state = controller.getState();\n var cell = controller.locateCell(e.target);\n\n if (gantt.config.inline_editors_multiselect_open && cell && controller.getEditorConfig(cell.columnName)) {\n if (controller.isVisible() && state.id == cell.id && state.columnName == cell.columnName) {// do nothing if editor is already active in this cell\n } else {\n controller.startEdit(cell.id, cell.columnName);\n }\n }\n\n this.setFirstSelected(target_ev);\n\n if (!this.isSelected(target_ev)) {\n this.select(target_ev, e);\n }\n\n selected = this.getSelected();\n\n for (var i = 0; i < selected.length; i++) {\n if (selected[i] !== target_ev) {\n this.unselect(selected[i], e);\n }\n }\n }.bind(this);\n\n var blockSelection = function () {\n if (!last) last = target_ev;else if (target_ev) {\n var first_indx = gantt.getGlobalTaskIndex(this.getFirstSelected());\n var target_indx = gantt.getGlobalTaskIndex(target_ev);\n var last_indx = gantt.getGlobalTaskIndex(last); // clear prev selection\n\n var tmp = last;\n\n while (gantt.getGlobalTaskIndex(tmp) !== first_indx) {\n this.unselect(tmp, e);\n tmp = first_indx > last_indx ? gantt.getNext(tmp) : gantt.getPrev(tmp);\n }\n\n tmp = target_ev;\n\n while (gantt.getGlobalTaskIndex(tmp) !== first_indx) {\n if (this.select(tmp, e) && !isLast) {\n isLast = true;\n defaultLast = tmp;\n }\n\n tmp = first_indx > target_indx ? gantt.getNext(tmp) : gantt.getPrev(tmp);\n }\n }\n }.bind(this);\n\n if (multiSelect && (e.ctrlKey || e.metaKey)) {\n if (!this.isSelected(target_ev)) this.setFirstSelected(target_ev);\n\n if (target_ev) {\n this.toggle(target_ev, e);\n }\n } else if (multiSelect && e.shiftKey) {\n if (!gantt.isTaskExists(this.getFirstSelected()) || this.getFirstSelected() === null) {\n this.setFirstSelected(target_ev);\n }\n\n if (selected.length) {\n // select a group of tasks\n blockSelection();\n } else {\n // select a task when no task is selected and Shift is pressed\n singleSelection();\n }\n } else {\n // no key press or no multiple selection on the mouse click\n singleSelection();\n }\n\n if (this.isSelected(target_ev)) {\n this.setLastSelected(target_ev);\n } else if (defaultLast) {\n if (target_ev == last) this.setLastSelected(e.shiftKey ? defaultLast : this.getDefaultSelected());\n } else {\n this.setLastSelected(null);\n }\n\n if (!this.getSelected().length) this.setLastSelected(null);\n if (!this.getLastSelected() || !this.isSelected(this.getFirstSelected())) this.setFirstSelected(this.getLastSelected());\n return true;\n }\n };\n\n (function () {\n var old_selectTask = gantt.selectTask;\n\n gantt.selectTask = function (id) {\n id = replaceValidZeroId(id, this.config.root_id);\n if (!id) return false;\n var multiselect = gantt._multiselect;\n var res = id;\n\n if (multiselect.isActive()) {\n if (multiselect.select(id, null)) {\n multiselect.setLastSelected(id);\n }\n\n multiselect.setFirstSelected(multiselect.getLastSelected());\n } else {\n res = old_selectTask.call(this, id);\n }\n\n return res;\n };\n\n var old_unselectTask = gantt.unselectTask;\n\n gantt.unselectTask = function (id) {\n var multiselect = gantt._multiselect;\n var isActive = multiselect.isActive();\n id = id || multiselect.getLastSelected();\n\n if (id && isActive) {\n multiselect.unselect(id, null);\n if (id == multiselect.getLastSelected()) multiselect.setLastSelected(null);\n gantt.refreshTask(id);\n multiselect.setFirstSelected(multiselect.getLastSelected());\n }\n\n var res = id;\n if (!isActive) res = old_unselectTask.call(this, id);\n return res;\n };\n\n gantt.toggleTaskSelection = function (id) {\n var multiselect = gantt._multiselect;\n\n if (id && multiselect.isActive()) {\n multiselect.toggle(id);\n multiselect.setFirstSelected(multiselect.getLastSelected());\n }\n };\n\n gantt.getSelectedTasks = function () {\n var multiselect = gantt._multiselect;\n multiselect.isActive();\n return multiselect.getSelected();\n };\n\n gantt.eachSelectedTask = function (callback) {\n return this._multiselect.forSelected(callback);\n };\n\n gantt.isSelectedTask = function (id) {\n return this._multiselect.isSelected(id);\n };\n\n gantt.getLastSelectedTask = function () {\n return this._multiselect.getLastSelected();\n };\n\n gantt.attachEvent(\"onGanttReady\", function () {\n var old_isSelected = gantt.$data.tasksStore.isSelected;\n\n gantt.$data.tasksStore.isSelected = function (id) {\n if (gantt._multiselect.isActive()) {\n return gantt._multiselect.isSelected(id);\n }\n\n return old_isSelected.call(this, id);\n };\n });\n })();\n\n gantt.attachEvent(\"onTaskIdChange\", function (id, new_id) {\n var multiselect = gantt._multiselect;\n if (!multiselect.isActive()) return true;\n\n if (gantt.isSelectedTask(id)) {\n multiselect.unselect(id, null);\n multiselect.select(new_id, null);\n }\n });\n gantt.attachEvent(\"onAfterTaskDelete\", function (id, item) {\n var multiselect = gantt._multiselect;\n if (!multiselect.isActive()) return true;\n\n if (multiselect._selected[id]) {\n // GS-1057: don't unselect the task here because the task is already unselected \n // it was in the select.js file before it was deleted\n // multiselect.unselect(id, null);\n multiselect._selected[id] = false;\n multiselect.setLastSelected(multiselect.getDefaultSelected());\n }\n\n multiselect.forSelected(function (task_id) {\n if (!gantt.isTaskExists(task_id)) multiselect.unselect(task_id, null);\n });\n });\n gantt.attachEvent(\"onBeforeTaskMultiSelect\", function (id, state, e) {\n var multiselect = gantt._multiselect;\n\n if (state && multiselect.isActive()) {\n if (multiselect._one_level) {\n return multiselect.isSameLevel(id);\n }\n }\n\n return true;\n });\n gantt.attachEvent(\"onTaskClick\", function (id, e) {\n if (gantt._multiselect.doSelection(e)) gantt.callEvent(\"onMultiSelect\", [e]);\n return true;\n });\n};","module.exports = function (gantt) {\n if (!gantt._markers) {\n gantt._markers = gantt.createDatastore({\n name: \"marker\",\n initItem: function initItem(marker) {\n marker.id = marker.id || gantt.uid();\n return marker;\n }\n });\n }\n\n gantt.config.show_markers = true;\n\n function render_marker(marker) {\n if (!gantt.config.show_markers) return false;\n if (!marker.start_date) return false;\n var state = gantt.getState();\n if (+marker.start_date > +state.max_date) return;\n if ((!marker.end_date || +marker.end_date < +state.min_date) && +marker.start_date < +state.min_date) return;\n var div = document.createElement(\"div\");\n div.setAttribute(\"data-marker-id\", marker.id);\n var css = \"gantt_marker\";\n if (gantt.templates.marker_class) css += \" \" + gantt.templates.marker_class(marker);\n\n if (marker.css) {\n css += \" \" + marker.css;\n }\n\n if (marker.title) {\n div.title = marker.title;\n }\n\n div.className = css;\n var start = gantt.posFromDate(marker.start_date);\n div.style.left = start + \"px\";\n var markerHeight = Math.max(gantt.getRowTop(gantt.getVisibleTaskCount()), 0) + \"px\";\n\n if (gantt.config.timeline_placeholder && gantt.$task_data) {\n markerHeight = gantt.$task_data.scrollHeight + \"px\";\n }\n\n div.style.height = markerHeight;\n\n if (marker.end_date) {\n var end = gantt.posFromDate(marker.end_date);\n div.style.width = Math.max(end - start, 0) + \"px\";\n }\n\n if (marker.text) {\n div.innerHTML = \"
\" + marker.text + \"
\";\n }\n\n return div;\n }\n\n function initMarkerArea() {\n if (!gantt.$task_data) return;\n var markerArea = document.createElement(\"div\");\n markerArea.className = \"gantt_marker_area\";\n gantt.$task_data.appendChild(markerArea);\n gantt.$marker_area = markerArea;\n }\n\n gantt.attachEvent(\"onBeforeGanttRender\", function () {\n if (!gantt.$marker_area) initMarkerArea();\n });\n gantt.attachEvent(\"onDataRender\", function () {\n if (!gantt.$marker_area) {\n initMarkerArea();\n gantt.renderMarkers();\n }\n });\n gantt.attachEvent(\"onGanttLayoutReady\", function () {\n // GS-1304 - markers should attach when layout is initialized, both on gantt.init and gantt.resetLayout\n // wait for \"onBeforeGanttRender\", so all layout elements will be in DOM\n gantt.attachEvent(\"onBeforeGanttRender\", function () {\n initMarkerArea();\n var layers = gantt.$services.getService(\"layers\");\n var markerRenderer = layers.createDataRender({\n name: \"marker\",\n defaultContainer: function defaultContainer() {\n return gantt.$marker_area;\n }\n });\n markerRenderer.addLayer(render_marker);\n }, {\n once: true\n });\n });\n\n gantt.getMarker = function (id) {\n if (!this._markers) return null;\n return this._markers.getItem(id);\n };\n\n gantt.addMarker = function (marker) {\n return this._markers.addItem(marker);\n };\n\n gantt.deleteMarker = function (id) {\n if (!this._markers.exists(id)) return false;\n\n this._markers.removeItem(id);\n\n return true;\n };\n\n gantt.updateMarker = function (id) {\n this._markers.refresh(id);\n };\n\n gantt._getMarkers = function () {\n return this._markers.getItems();\n };\n\n gantt.renderMarkers = function () {\n this._markers.refresh();\n };\n};","module.exports = function (gantt) {\n gantt.$keyboardNavigation.dispatcher = {\n isActive: false,\n activeNode: null,\n globalNode: new gantt.$keyboardNavigation.GanttNode(),\n enable: function enable() {\n this.isActive = true;\n this.setActiveNode(this.getActiveNode());\n },\n disable: function disable() {\n this.isActive = false;\n },\n isEnabled: function isEnabled() {\n return !!this.isActive;\n },\n getDefaultNode: function getDefaultNode() {\n var node;\n\n if (gantt.config.keyboard_navigation_cells) {\n node = new gantt.$keyboardNavigation.TaskCell();\n } else {\n node = new gantt.$keyboardNavigation.TaskRow();\n }\n\n if (!node.isValid()) {\n node = node.fallback();\n }\n\n return node;\n },\n setDefaultNode: function setDefaultNode() {\n this.setActiveNode(this.getDefaultNode());\n },\n getActiveNode: function getActiveNode() {\n var node = this.activeNode;\n\n if (node && !node.isValid()) {\n node = node.fallback();\n }\n\n return node;\n },\n fromDomElement: function fromDomElement(e) {\n var inputs = [gantt.$keyboardNavigation.TaskRow, gantt.$keyboardNavigation.TaskCell, gantt.$keyboardNavigation.HeaderCell];\n\n for (var i = 0; i < inputs.length; i++) {\n if (inputs[i].prototype.fromDomElement) {\n var node = inputs[i].prototype.fromDomElement(e);\n if (node) return node;\n }\n }\n\n return null;\n },\n focusGlobalNode: function focusGlobalNode() {\n this.blurNode(this.globalNode);\n this.focusNode(this.globalNode);\n },\n setActiveNode: function setActiveNode(el) {\n //console.trace()\n var focusChanged = true;\n\n if (this.activeNode) {\n if (this.activeNode.compareTo(el)) {\n focusChanged = false;\n }\n }\n\n if (this.isEnabled()) {\n if (focusChanged) this.blurNode(this.activeNode);\n this.activeNode = el;\n this.focusNode(this.activeNode, !focusChanged);\n }\n },\n focusNode: function focusNode(el, keptFocus) {\n if (el && el.focus) {\n el.focus(keptFocus);\n }\n },\n blurNode: function blurNode(el) {\n if (el && el.blur) {\n el.blur();\n }\n },\n keyDownHandler: function keyDownHandler(e) {\n if (gantt.$keyboardNavigation.isModal()) return;\n if (!this.isEnabled()) return;\n\n if (e.defaultPrevented) {\n return;\n }\n\n var ganttNode = this.globalNode;\n var command = gantt.$keyboardNavigation.shortcuts.getCommandFromEvent(e);\n var activeElement = this.getActiveNode();\n var eventFacade = gantt.$keyboardNavigation.facade;\n\n if (eventFacade.callEvent(\"onKeyDown\", [command, e]) === false) {\n return;\n }\n\n if (!activeElement) {\n this.setDefaultNode();\n } else if (activeElement.findHandler(command)) {\n activeElement.doAction(command, e);\n } else if (ganttNode.findHandler(command)) {\n ganttNode.doAction(command, e);\n }\n },\n _timeout: null,\n awaitsFocus: function awaitsFocus() {\n return this._timeout !== null;\n },\n delay: function delay(callback, _delay) {\n clearTimeout(this._timeout);\n this._timeout = setTimeout(gantt.bind(function () {\n this._timeout = null;\n callback();\n }, this), _delay || 1);\n },\n clearDelay: function clearDelay() {\n clearTimeout(this._timeout);\n }\n };\n};","module.exports = function (gantt) {\n (function () {\n var modalsStack = [];\n\n function isModal() {\n return !!modalsStack.length;\n }\n\n function afterPopup(box) {\n setTimeout(function () {\n if (!isModal()) {\n if (!gantt.$destroyed) {\n gantt.focus();\n }\n }\n }, 1);\n }\n\n function startModal(box) {\n gantt.eventRemove(box, \"keydown\", trapFocus);\n gantt.event(box, \"keydown\", trapFocus);\n modalsStack.push(box); //gantt.$keyboardNavigation.dispatcher.disable();\n }\n\n function endModal() {\n var box = modalsStack.pop();\n\n if (box) {\n gantt.eventRemove(box, \"keydown\", trapFocus);\n }\n\n afterPopup(box);\n }\n\n function isTopModal(box) {\n return box == modalsStack[modalsStack.length - 1];\n }\n\n function trapFocus(event) {\n var target = event.currentTarget;\n if (!isTopModal(target)) return;\n gantt.$keyboardNavigation.trapFocus(target, event);\n }\n\n function traceLightbox() {\n startModal(gantt.getLightbox());\n }\n\n gantt.attachEvent(\"onLightbox\", traceLightbox);\n gantt.attachEvent(\"onAfterLightbox\", endModal);\n gantt.attachEvent(\"onLightboxChange\", function () {\n endModal();\n traceLightbox();\n });\n gantt.attachEvent(\"onAfterQuickInfo\", function () {\n afterPopup();\n });\n gantt.attachEvent(\"onMessagePopup\", function (box) {\n saveFocus();\n startModal(box);\n });\n gantt.attachEvent(\"onAfterMessagePopup\", function () {\n endModal();\n restoreFocus();\n });\n var focusElement = null;\n\n function saveFocus() {\n focusElement = gantt.utils.dom.getActiveElement();\n }\n\n function restoreFocus() {\n setTimeout(function () {\n if (focusElement) {\n focusElement.focus();\n focusElement = null;\n }\n }, 1);\n }\n\n gantt.$keyboardNavigation.isModal = isModal;\n })();\n};","module.exports = function (gantt) {\n var domHelpers = require(\"../../../core/ui/utils/dom_helpers\");\n\n var _require = require(\"../../../utils/helpers\"),\n replaceValidZeroId = _require.replaceValidZeroId;\n\n gantt.$keyboardNavigation.TaskCell = function (taskId, index) {\n taskId = replaceValidZeroId(taskId, gantt.config.root_id);\n\n if (!taskId) {\n var rootLevel = gantt.getChildren(gantt.config.root_id);\n\n if (rootLevel[0]) {\n taskId = rootLevel[0];\n }\n }\n\n this.taskId = taskId;\n this.columnIndex = index || 0; // provided task may not exist, in this case node will be detectes as invalid\n\n if (gantt.isTaskExists(this.taskId)) {\n this.index = gantt.getTaskIndex(this.taskId);\n this.globalIndex = gantt.getGlobalTaskIndex(this.taskId);\n }\n };\n\n gantt.$keyboardNavigation.TaskCell.prototype = gantt._compose(gantt.$keyboardNavigation.TaskRow, {\n _handlers: null,\n isValid: function isValid() {\n return gantt.$keyboardNavigation.TaskRow.prototype.isValid.call(this) && !!gantt.getGridColumns()[this.columnIndex];\n },\n fallback: function fallback() {\n var node = gantt.$keyboardNavigation.TaskRow.prototype.fallback.call(this);\n var result = node;\n\n if (node instanceof gantt.$keyboardNavigation.TaskRow) {\n var visibleColumns = gantt.getGridColumns();\n var index = this.columnIndex;\n\n while (index >= 0) {\n if (visibleColumns[index]) break;\n index--;\n }\n\n if (visibleColumns[index]) {\n result = new gantt.$keyboardNavigation.TaskCell(node.taskId, index);\n }\n }\n\n return result;\n },\n fromDomElement: function fromDomElement(el) {\n if (!gantt.config.keyboard_navigation_cells) {\n return null;\n }\n\n var taskId = gantt.locate(el);\n\n if (gantt.isTaskExists(taskId)) {\n var index = 0;\n var cellElement = domHelpers.locateAttribute(el, \"data-column-index\");\n\n if (cellElement) {\n index = cellElement.getAttribute(\"data-column-index\") * 1;\n }\n\n return new gantt.$keyboardNavigation.TaskCell(taskId, index);\n } else {\n return null;\n }\n },\n getNode: function getNode() {\n if (gantt.isTaskExists(this.taskId) && gantt.isTaskVisible(this.taskId)) {\n if (gantt.config.show_grid) {\n var row = gantt.$grid.querySelector(\".gantt_row[\" + gantt.config.task_attribute + \"='\" + this.taskId + \"']\");\n if (!row) return null;\n return row.querySelector(\"[data-column-index='\" + this.columnIndex + \"']\");\n } else {\n return gantt.getTaskNode(this.taskId);\n }\n }\n },\n keys: {\n \"up\": function up() {\n var nextElement = null;\n var prevTask = gantt.getPrev(this.taskId);\n\n if (!gantt.isTaskExists(prevTask)) {\n nextElement = new gantt.$keyboardNavigation.HeaderCell(this.columnIndex);\n } else {\n nextElement = new gantt.$keyboardNavigation.TaskCell(prevTask, this.columnIndex);\n }\n\n this.moveTo(nextElement);\n },\n \"down\": function down() {\n var nextTask = gantt.getNext(this.taskId);\n\n if (gantt.isTaskExists(nextTask)) {\n this.moveTo(new gantt.$keyboardNavigation.TaskCell(nextTask, this.columnIndex));\n }\n },\n \"left\": function left() {\n if (this.columnIndex > 0) {\n this.moveTo(new gantt.$keyboardNavigation.TaskCell(this.taskId, this.columnIndex - 1));\n }\n },\n \"right\": function right() {\n var columns = gantt.getGridColumns();\n\n if (this.columnIndex < columns.length - 1) {\n this.moveTo(new gantt.$keyboardNavigation.TaskCell(this.taskId, this.columnIndex + 1));\n }\n },\n \"end\": function end() {\n var columns = gantt.getGridColumns();\n this.moveTo(new gantt.$keyboardNavigation.TaskCell(this.taskId, columns.length - 1));\n },\n \"home\": function home() {\n this.moveTo(new gantt.$keyboardNavigation.TaskCell(this.taskId, 0));\n },\n \"pagedown\": function pagedown() {\n if (gantt.getVisibleTaskCount()) {\n this.moveTo(new gantt.$keyboardNavigation.TaskCell(gantt.getTaskByIndex(gantt.getVisibleTaskCount() - 1).id, this.columnIndex));\n }\n },\n \"pageup\": function pageup() {\n if (gantt.getVisibleTaskCount()) {\n this.moveTo(new gantt.$keyboardNavigation.TaskCell(gantt.getTaskByIndex(0).id, this.columnIndex));\n }\n }\n }\n });\n gantt.$keyboardNavigation.TaskCell.prototype.bindAll(gantt.$keyboardNavigation.TaskRow.prototype.keys);\n gantt.$keyboardNavigation.TaskCell.prototype.bindAll(gantt.$keyboardNavigation.TaskCell.prototype.keys);\n};","module.exports = function (gantt) {\n gantt.$keyboardNavigation.TaskRow = function (taskId) {\n if (!taskId) {\n var rootLevel = gantt.getChildren(gantt.config.root_id);\n\n if (rootLevel[0]) {\n taskId = rootLevel[0];\n }\n }\n\n this.taskId = taskId;\n\n if (gantt.isTaskExists(this.taskId)) {\n this.index = gantt.getTaskIndex(this.taskId);\n this.globalIndex = gantt.getGlobalTaskIndex(this.taskId);\n }\n };\n\n gantt.$keyboardNavigation.TaskRow.prototype = gantt._compose(gantt.$keyboardNavigation.KeyNavNode, {\n _handlers: null,\n isValid: function isValid() {\n return gantt.isTaskExists(this.taskId) && gantt.getTaskIndex(this.taskId) > -1;\n },\n fallback: function fallback() {\n if (!gantt.getVisibleTaskCount()) {\n var header = new gantt.$keyboardNavigation.HeaderCell();\n if (!header.isValid()) return null;else return header;\n } else {\n var nextIndex = -1; // GS-1393. When Gantt tries to restore the focus, it should rely on the global index\n\n if (gantt.getTaskByIndex(this.globalIndex - 1)) {\n nextIndex = this.globalIndex - 1;\n } else if (gantt.getTaskByIndex(this.globalIndex + 1)) {\n nextIndex = this.globalIndex + 1;\n } else {\n var globalIndex = this.globalIndex;\n\n while (globalIndex >= 0) {\n if (gantt.getTaskByIndex(globalIndex)) {\n nextIndex = globalIndex;\n break;\n }\n\n globalIndex--;\n }\n }\n\n if (nextIndex > -1) {\n return new gantt.$keyboardNavigation.TaskRow(gantt.getTaskByIndex(nextIndex).id);\n }\n }\n },\n fromDomElement: function fromDomElement(el) {\n if (gantt.config.keyboard_navigation_cells) {\n return null;\n }\n\n var taskId = gantt.locate(el);\n\n if (gantt.isTaskExists(taskId)) {\n return new gantt.$keyboardNavigation.TaskRow(taskId);\n } else {\n return null;\n }\n },\n getNode: function getNode() {\n if (gantt.isTaskExists(this.taskId) && gantt.isTaskVisible(this.taskId)) {\n if (gantt.config.show_grid) {\n return gantt.$grid.querySelector(\".gantt_row[\" + gantt.config.task_attribute + \"='\" + this.taskId + \"']\");\n } else {\n return gantt.getTaskNode(this.taskId);\n }\n }\n },\n focus: function focus(keptFocus) {\n if (!keptFocus) {\n var pos = gantt.getTaskPosition(gantt.getTask(this.taskId));\n var height = gantt.getTaskHeight(this.taskId);\n var scroll = gantt.getScrollState();\n var viewWidth;\n\n if (gantt.$task) {\n viewWidth = gantt.$task.offsetWidth;\n } else {\n viewWidth = scroll.inner_width;\n }\n\n var viewHeight;\n\n if (gantt.$grid_data || gantt.$task_data) {\n viewHeight = (gantt.$grid_data || gantt.$task_data).offsetHeight;\n } else {\n viewHeight = scroll.inner_height;\n }\n\n if (pos.top < scroll.y || pos.top + height > scroll.y + viewHeight) {\n // GS-2346: additional scrolling to be sure that the task will be in the required range\n gantt.scrollTo(null, pos.top - 20);\n } else if (gantt.config.scroll_on_click && gantt.config.show_chart) {\n // horizontal scroll activated\n if (pos.left > scroll.x + viewWidth) {\n // scroll forward to the start of the task\n gantt.scrollTo(pos.left - gantt.config.task_scroll_offset);\n } else if (pos.left + pos.width < scroll.x) {\n // scroll back to the end of the task\n gantt.scrollTo(pos.left + pos.width - gantt.config.task_scroll_offset);\n }\n }\n }\n\n gantt.$keyboardNavigation.KeyNavNode.prototype.focus.apply(this, [keptFocus]); // GS-152 if there are scrollbars with custom names, change their scroll position\n\n scrollGrid();\n\n function scrollGrid() {\n var grid = gantt.$ui.getView(\"grid\");\n var scrollPositionX = parseInt(grid.$grid.scrollLeft);\n var scrollPositionY = parseInt(grid.$grid_data.scrollTop);\n var attachedScrollbarHorizontal = grid.$config.scrollX;\n\n if (attachedScrollbarHorizontal && grid.$config.scrollable) {\n var scrollbarHorizontal = gantt.$ui.getView(attachedScrollbarHorizontal);\n\n if (scrollbarHorizontal) {\n scrollbarHorizontal.scrollTo(scrollPositionX, scrollPositionY);\n }\n }\n\n var attachedScrollbarVertical = grid.$config.scrollY;\n\n if (attachedScrollbarVertical) {\n var scrollbarVertical = gantt.$ui.getView(attachedScrollbarVertical);\n\n if (scrollbarVertical) {\n scrollbarVertical.scrollTo(scrollPositionX, scrollPositionY);\n }\n }\n }\n },\n keys: {\n \"pagedown\": function pagedown() {\n if (gantt.getVisibleTaskCount()) {\n this.moveTo(new gantt.$keyboardNavigation.TaskRow(gantt.getTaskByIndex(gantt.getVisibleTaskCount() - 1).id));\n }\n },\n \"pageup\": function pageup() {\n if (gantt.getVisibleTaskCount()) {\n this.moveTo(new gantt.$keyboardNavigation.TaskRow(gantt.getTaskByIndex(0).id));\n }\n },\n \"up\": function up() {\n var nextElement = null;\n var prevTask = gantt.getPrev(this.taskId);\n\n if (!gantt.isTaskExists(prevTask)) {\n nextElement = new gantt.$keyboardNavigation.HeaderCell();\n } else {\n nextElement = new gantt.$keyboardNavigation.TaskRow(prevTask);\n }\n\n this.moveTo(nextElement);\n },\n \"down\": function down() {\n var nextTask = gantt.getNext(this.taskId);\n\n if (gantt.isTaskExists(nextTask)) {\n this.moveTo(new gantt.$keyboardNavigation.TaskRow(nextTask));\n }\n },\n \"shift+down\": function shiftDown() {\n if (gantt.hasChild(this.taskId) && !gantt.getTask(this.taskId).$open) {\n gantt.open(this.taskId);\n }\n },\n \"shift+up\": function shiftUp() {\n if (gantt.hasChild(this.taskId) && gantt.getTask(this.taskId).$open) {\n gantt.close(this.taskId);\n }\n },\n \"shift+right\": function shiftRight() {\n if (gantt.isReadonly(this)) {\n return;\n }\n\n var prevId = gantt.getPrevSibling(this.taskId);\n\n if (gantt.isTaskExists(prevId) && !gantt.isChildOf(this.taskId, prevId)) {\n var parent = gantt.getTask(prevId);\n parent.$open = true;\n var result = gantt.moveTask(this.taskId, -1, prevId);\n if (result !== false) gantt.updateTask(this.taskId);\n }\n },\n \"shift+left\": function shiftLeft() {\n if (gantt.isReadonly(this)) {\n return;\n }\n\n var parent = gantt.getParent(this.taskId);\n\n if (gantt.isTaskExists(parent)) {\n var result = gantt.moveTask(this.taskId, gantt.getTaskIndex(parent) + 1, gantt.getParent(parent));\n if (result !== false) gantt.updateTask(this.taskId);\n }\n },\n // select\n \"space\": function space(e) {\n if (!gantt.isSelectedTask(this.taskId)) {\n gantt.selectTask(this.taskId);\n } else {\n gantt.unselectTask(this.taskId);\n }\n },\n // collapse\n \"ctrl+left\": function ctrlLeft(e) {\n gantt.close(this.taskId);\n },\n // expand\n \"ctrl+right\": function ctrlRight(e) {\n gantt.open(this.taskId);\n },\n // delete task\n \"delete\": function _delete(e) {\n if (gantt.isReadonly(this)) {\n return;\n }\n\n gantt.$click.buttons[\"delete\"](this.taskId);\n },\n // open lightbox\n \"enter\": function enter() {\n if (gantt.isReadonly(this)) {\n return;\n }\n\n gantt.showLightbox(this.taskId);\n },\n // add subtask\n \"ctrl+enter\": function ctrlEnter() {\n if (gantt.isReadonly(this)) {\n return;\n }\n\n gantt.createTask({}, this.taskId);\n }\n }\n });\n gantt.$keyboardNavigation.TaskRow.prototype.bindAll(gantt.$keyboardNavigation.TaskRow.prototype.keys);\n};","module.exports = function (gantt) {\n var domHelpers = require(\"../../../core/ui/utils/dom_helpers\");\n\n gantt.$keyboardNavigation.HeaderCell = function (index) {\n this.index = index || 0;\n };\n\n gantt.$keyboardNavigation.HeaderCell.prototype = gantt._compose(gantt.$keyboardNavigation.KeyNavNode, {\n _handlers: null,\n isValid: function isValid() {\n if (!gantt.config.show_grid) {\n if (gantt.getVisibleTaskCount()) return false;\n }\n\n return !!gantt.getGridColumns()[this.index] || !gantt.getVisibleTaskCount();\n },\n fallback: function fallback() {\n if (!gantt.config.show_grid) {\n if (gantt.getVisibleTaskCount()) {\n return new gantt.$keyboardNavigation.TaskRow();\n }\n\n return null;\n }\n\n var visibleColumns = gantt.getGridColumns();\n var index = this.index;\n\n while (index >= 0) {\n if (visibleColumns[index]) break;\n index--;\n }\n\n if (visibleColumns[index]) {\n return new gantt.$keyboardNavigation.HeaderCell(index);\n } else {\n return null;\n }\n },\n fromDomElement: function fromDomElement(el) {\n var cellElement = domHelpers.locateClassName(el, \"gantt_grid_head_cell\");\n\n if (cellElement) {\n var index = 0;\n\n while (cellElement && cellElement.previousSibling) {\n cellElement = cellElement.previousSibling;\n index += 1;\n }\n\n return new gantt.$keyboardNavigation.HeaderCell(index);\n } else {\n return null;\n }\n },\n getNode: function getNode() {\n var cells = gantt.$grid_scale.childNodes;\n return cells[this.index];\n },\n keys: {\n \"left\": function left() {\n if (this.index > 0) {\n this.moveTo(new gantt.$keyboardNavigation.HeaderCell(this.index - 1));\n }\n },\n \"right\": function right() {\n var columns = gantt.getGridColumns();\n\n if (this.index < columns.length - 1) {\n this.moveTo(new gantt.$keyboardNavigation.HeaderCell(this.index + 1));\n }\n },\n \"down\": function down() {\n var taskRow;\n var rootLevel = gantt.getChildren(gantt.config.root_id);\n\n if (gantt.isTaskExists(rootLevel[0])) {\n taskRow = rootLevel[0];\n }\n\n if (taskRow) {\n if (gantt.config.keyboard_navigation_cells) {\n this.moveTo(new gantt.$keyboardNavigation.TaskCell(taskRow, this.index));\n } else {\n this.moveTo(new gantt.$keyboardNavigation.TaskRow(taskRow));\n }\n }\n },\n \"end\": function end() {\n var columns = gantt.getGridColumns();\n this.moveTo(new gantt.$keyboardNavigation.HeaderCell(columns.length - 1));\n },\n \"home\": function home() {\n this.moveTo(new gantt.$keyboardNavigation.HeaderCell(0));\n },\n // press header button\n \"enter, space\": function enterSpace() {\n var node = domHelpers.getActiveElement();\n node.click();\n },\n // add new task\n \"ctrl+enter\": function ctrlEnter() {\n if (gantt.isReadonly(this)) {\n return;\n }\n\n gantt.createTask({}, this.taskId);\n }\n }\n });\n gantt.$keyboardNavigation.HeaderCell.prototype.bindAll(gantt.$keyboardNavigation.HeaderCell.prototype.keys);\n};","module.exports = function (gantt) {\n gantt.$keyboardNavigation.KeyNavNode = function () {};\n\n gantt.$keyboardNavigation.KeyNavNode.prototype = gantt._compose(gantt.$keyboardNavigation.EventHandler, {\n isValid: function isValid() {\n return true;\n },\n fallback: function fallback() {\n return null;\n },\n moveTo: function moveTo(element) {\n gantt.$keyboardNavigation.dispatcher.setActiveNode(element);\n },\n compareTo: function compareTo(b) {\n // good enough comparison of two random objects\n if (!b) return false;\n\n for (var i in this) {\n if (!!this[i] != !!b[i]) return false;\n var canStringifyThis = !!(this[i] && this[i].toString);\n var canStringifyThat = !!(b[i] && b[i].toString);\n if (canStringifyThat != canStringifyThis) return false;\n\n if (!(canStringifyThat && canStringifyThis)) {\n if (b[i] != this[i]) return false;\n } else {\n if (b[i].toString() != this[i].toString()) return false;\n }\n }\n\n return true;\n },\n getNode: function getNode() {},\n focus: function focus() {\n var node = this.getNode();\n if (!node) return;\n var eventFacade = gantt.$keyboardNavigation.facade;\n\n if (eventFacade.callEvent(\"onBeforeFocus\", [node]) === false) {\n return;\n }\n\n if (node) {\n node.setAttribute(\"tabindex\", \"-1\");\n\n if (!node.$eventAttached) {\n node.$eventAttached = true;\n gantt.event(node, \"focus\", function (e) {\n e.preventDefault();\n return false;\n }, false);\n } //node.className += \" gantt_focused\";\n\n\n if (gantt.utils.dom.isChildOf(document.activeElement, node)) {\n node = document.activeElement;\n }\n\n if (node.focus) node.focus();\n eventFacade.callEvent(\"onFocus\", [this.getNode()]);\n }\n },\n blur: function blur() {\n var node = this.getNode();\n\n if (node) {\n var eventFacade = gantt.$keyboardNavigation.facade;\n eventFacade.callEvent(\"onBlur\", [node]);\n node.setAttribute(\"tabindex\", \"-1\"); //node.className = (node.className || \"\").replace(/ ?gantt_focused/g, \"\");\n }\n }\n });\n};","module.exports = function (gantt) {\n gantt.$keyboardNavigation.GanttNode = function () {};\n\n gantt.$keyboardNavigation.GanttNode.prototype = gantt._compose(gantt.$keyboardNavigation.EventHandler, {\n focus: function focus() {\n gantt.focus();\n },\n blur: function blur() {},\n isEnabled: function isEnabled() {\n return gantt.$container.hasAttribute(\"tabindex\");\n },\n scrollHorizontal: function scrollHorizontal(dir) {\n var date = gantt.dateFromPos(gantt.getScrollState().x);\n var scale = gantt.getScale();\n var step = dir < 0 ? -scale.step : scale.step;\n date = gantt.date.add(date, step, scale.unit);\n gantt.scrollTo(gantt.posFromDate(date));\n },\n scrollVertical: function scrollVertical(dir) {\n var top = gantt.getScrollState().y;\n var step = gantt.config.row_height;\n gantt.scrollTo(null, top + (dir < 0 ? -1 : 1) * step);\n },\n keys: {\n \"alt+left\": function altLeft(e) {\n this.scrollHorizontal(-1);\n },\n \"alt+right\": function altRight(e) {\n this.scrollHorizontal(1);\n },\n \"alt+up\": function altUp(e) {\n this.scrollVertical(-1);\n },\n \"alt+down\": function altDown(e) {\n this.scrollVertical(1);\n },\n // undo\n \"ctrl+z\": function ctrlZ() {\n if (gantt.undo) gantt.undo();\n },\n // redo\n \"ctrl+r\": function ctrlR() {\n if (gantt.redo) gantt.redo();\n }\n }\n });\n gantt.$keyboardNavigation.GanttNode.prototype.bindAll(gantt.$keyboardNavigation.GanttNode.prototype.keys);\n};","module.exports = function (gantt) {\n (function () {\n var domHelpers = require(\"../../../core/ui/utils/dom_helpers\");\n\n gantt.$keyboardNavigation.getFocusableNodes = domHelpers.getFocusableNodes;\n\n gantt.$keyboardNavigation.trapFocus = function trapFocus(root, e) {\n if (e.keyCode != 9) return false;\n var focusable = gantt.$keyboardNavigation.getFocusableNodes(root);\n var currentFocus = domHelpers.getActiveElement();\n var currentIndex = -1;\n\n for (var i = 0; i < focusable.length; i++) {\n if (focusable[i] == currentFocus) {\n currentIndex = i;\n break;\n }\n }\n\n if (e.shiftKey) {\n // back tab\n if (currentIndex <= 0) {\n // go to the last element if we focused on the first\n var lastItem = focusable[focusable.length - 1];\n\n if (lastItem) {\n lastItem.focus();\n e.preventDefault();\n return true;\n }\n }\n } else {\n // forward tab\n if (currentIndex >= focusable.length - 1) {\n // forward tab from last element should go back to the first element\n var firstItem = focusable[0];\n\n if (firstItem) {\n firstItem.focus();\n e.preventDefault();\n return true;\n }\n }\n }\n\n return false;\n };\n })();\n};","module.exports = function (gantt) {\n gantt.$keyboardNavigation.EventHandler = {\n _handlers: null,\n findHandler: function findHandler(command) {\n if (!this._handlers) this._handlers = {};\n var shortcuts = gantt.$keyboardNavigation.shortcuts;\n var hash = shortcuts.getHash(command);\n return this._handlers[hash];\n },\n doAction: function doAction(command, e) {\n var handler = this.findHandler(command);\n\n if (handler) {\n var eventFacade = gantt.$keyboardNavigation.facade;\n\n if (eventFacade.callEvent(\"onBeforeAction\", [command, e]) === false) {\n return;\n }\n\n handler.call(this, e);\n if (e.preventDefault) e.preventDefault();else e.returnValue = false;\n }\n },\n bind: function bind(shortcut, handler) {\n if (!this._handlers) this._handlers = {};\n var shortcuts = gantt.$keyboardNavigation.shortcuts;\n var commands = shortcuts.parse(shortcut);\n\n for (var i = 0; i < commands.length; i++) {\n this._handlers[shortcuts.getHash(commands[i])] = handler;\n }\n },\n unbind: function unbind(shortcut) {\n var shortcuts = gantt.$keyboardNavigation.shortcuts;\n var commands = shortcuts.parse(shortcut);\n\n for (var i = 0; i < commands.length; i++) {\n if (this._handlers[shortcuts.getHash(commands[i])]) {\n delete this._handlers[shortcuts.getHash(commands[i])];\n }\n }\n },\n bindAll: function bindAll(map) {\n for (var i in map) {\n this.bind(i, map[i]);\n }\n },\n initKeys: function initKeys() {\n if (!this._handlers) this._handlers = {};\n\n if (this.keys) {\n this.bindAll(this.keys);\n }\n }\n };\n};","module.exports = function (gantt) {\n gantt.$keyboardNavigation.shortcuts = {\n createCommand: function createCommand() {\n return {\n modifiers: {\n \"shift\": false,\n \"alt\": false,\n \"ctrl\": false,\n \"meta\": false\n },\n keyCode: null\n };\n },\n parse: function parse(shortcut) {\n var commands = [];\n var expr = this.getExpressions(this.trim(shortcut));\n\n for (var i = 0; i < expr.length; i++) {\n var words = this.getWords(expr[i]);\n var command = this.createCommand();\n\n for (var j = 0; j < words.length; j++) {\n if (this.commandKeys[words[j]]) {\n command.modifiers[words[j]] = true;\n } else if (this.specialKeys[words[j]]) {\n command.keyCode = this.specialKeys[words[j]];\n } else {\n command.keyCode = words[j].charCodeAt(0);\n }\n }\n\n commands.push(command);\n }\n\n return commands;\n },\n getCommandFromEvent: function getCommandFromEvent(domEvent) {\n var command = this.createCommand();\n command.modifiers.shift = !!domEvent.shiftKey;\n command.modifiers.alt = !!domEvent.altKey;\n command.modifiers.ctrl = !!domEvent.ctrlKey;\n command.modifiers.meta = !!domEvent.metaKey;\n command.keyCode = domEvent.which || domEvent.keyCode;\n\n if (command.keyCode >= 96 && command.keyCode <= 105) {\n // numpad keys 96-105 -> 48-57\n command.keyCode -= 48; //convert numpad number code to regular number code\n }\n\n var printableKey = String.fromCharCode(command.keyCode);\n\n if (printableKey) {\n command.keyCode = printableKey.toLowerCase().charCodeAt(0);\n }\n\n return command;\n },\n getHashFromEvent: function getHashFromEvent(domEvent) {\n return this.getHash(this.getCommandFromEvent(domEvent));\n },\n getHash: function getHash(command) {\n var parts = [];\n\n for (var i in command.modifiers) {\n if (command.modifiers[i]) {\n parts.push(i);\n }\n }\n\n parts.push(command.keyCode);\n return parts.join(this.junctionChar);\n },\n getExpressions: function getExpressions(shortcut) {\n return shortcut.split(this.junctionChar);\n },\n getWords: function getWords(term) {\n return term.split(this.combinationChar);\n },\n trim: function trim(shortcut) {\n return shortcut.replace(/\\s/g, \"\");\n },\n junctionChar: \",\",\n combinationChar: \"+\",\n commandKeys: {\n \"shift\": 16,\n \"alt\": 18,\n \"ctrl\": 17,\n \"meta\": true\n },\n specialKeys: {\n \"backspace\": 8,\n \"tab\": 9,\n \"enter\": 13,\n \"esc\": 27,\n \"space\": 32,\n \"up\": 38,\n \"down\": 40,\n \"left\": 37,\n \"right\": 39,\n \"home\": 36,\n \"end\": 35,\n \"pageup\": 33,\n \"pagedown\": 34,\n \"delete\": 46,\n \"insert\": 45,\n \"plus\": 107,\n \"f1\": 112,\n \"f2\": 113,\n \"f3\": 114,\n \"f4\": 115,\n \"f5\": 116,\n \"f6\": 117,\n \"f7\": 118,\n \"f8\": 119,\n \"f9\": 120,\n \"f10\": 121,\n \"f11\": 122,\n \"f12\": 123\n }\n };\n};","module.exports = function (gantt) {\n var eventable = require(\"../utils/eventable\");\n\n function setupKeyNav(gantt) {\n gantt.config.keyboard_navigation = true;\n gantt.config.keyboard_navigation_cells = false;\n gantt.$keyboardNavigation = {};\n\n gantt._compose = function () {\n var parts = Array.prototype.slice.call(arguments, 0);\n var res = {};\n\n for (var i = 0; i < parts.length; i++) {\n var obj = parts[i];\n\n if (typeof obj == \"function\") {\n obj = new obj();\n }\n\n for (var p in obj) {\n res[p] = obj[p];\n }\n }\n\n return res;\n };\n\n require(\"./keyboard_navigation/common/keyboard_shortcuts\")(gantt);\n\n require(\"./keyboard_navigation/common/eventhandler\")(gantt);\n\n require(\"./keyboard_navigation/common/trap_modal_focus\")(gantt);\n\n require(\"./keyboard_navigation/elements/gantt_node\")(gantt);\n\n require(\"./keyboard_navigation/elements/nav_node\")(gantt);\n\n require(\"./keyboard_navigation/elements/header_cell\")(gantt);\n\n require(\"./keyboard_navigation/elements/task_row\")(gantt);\n\n require(\"./keyboard_navigation/elements/task_cell\")(gantt);\n\n require(\"./keyboard_navigation/modals\")(gantt);\n\n require(\"./keyboard_navigation/core\")(gantt);\n\n var domHelpers = require(\"../core/ui/utils/dom_helpers\");\n\n (function () {\n var dispatcher = gantt.$keyboardNavigation.dispatcher;\n\n dispatcher.isTaskFocused = function (id) {\n var node = dispatcher.activeNode;\n\n if (node instanceof gantt.$keyboardNavigation.TaskRow || node instanceof gantt.$keyboardNavigation.TaskCell) {\n if (node.taskId == id) {\n return true;\n }\n }\n\n return false;\n };\n\n var keyDownHandler = function keyDownHandler(e) {\n if (!gantt.config.keyboard_navigation) return; // GS-734 & GS-1078: we don't need keyboard navigation inside inline editors\n\n if (!gantt.config.keyboard_navigation_cells && isInlineEditorCell(e)) return;\n\n if (isNoKeyboardNavigationElement(e) || isLightboxElement(e)) {\n return;\n }\n\n return dispatcher.keyDownHandler(e);\n };\n\n var focusHandler = function focusHandler(e) {\n if (dispatcher.$preventDefault) {\n e.preventDefault();\n gantt.$container.blur();\n return false; // do nothing if key-nav focus is already planned\n } else if (!dispatcher.awaitsFocus()) {\n // otherwise - re-focus key-nav element on gantt focus\n dispatcher.focusGlobalNode();\n }\n };\n\n var reFocusActiveNode = function reFocusActiveNode() {\n if (!dispatcher.isEnabled()) return;\n var outsideGantt = !domHelpers.isChildOf(document.activeElement, gantt.$container) && document.activeElement.localName != \"body\";\n var activeNode = dispatcher.getActiveNode();\n if (!activeNode || outsideGantt) return;\n var domElement = activeNode.getNode();\n var top, left;\n\n if (domElement && domElement.parentNode) {\n top = domElement.parentNode.scrollTop;\n left = domElement.parentNode.scrollLeft;\n }\n\n activeNode.focus(true);\n\n if (domElement && domElement.parentNode) {\n domElement.parentNode.scrollTop = top;\n domElement.parentNode.scrollLeft = left;\n }\n };\n\n gantt.attachEvent(\"onDataRender\", function () {\n if (!gantt.config.keyboard_navigation) return;\n reFocusActiveNode();\n });\n gantt.attachEvent(\"onGanttRender\", function () {\n gantt.eventRemove(gantt.$root, \"keydown\", keyDownHandler);\n gantt.eventRemove(gantt.$container, \"focus\", focusHandler);\n gantt.eventRemove(gantt.$container, \"mousedown\", mousedownHandler);\n\n if (gantt.config.keyboard_navigation) {\n gantt.event(gantt.$root, \"keydown\", keyDownHandler);\n gantt.event(gantt.$container, \"focus\", focusHandler);\n gantt.event(gantt.$container, \"mousedown\", mousedownHandler);\n gantt.$container.setAttribute(\"tabindex\", \"0\");\n } else {\n gantt.$container.removeAttribute(\"tabindex\");\n }\n });\n\n function getTaskNodeConstructor() {\n if (gantt.config.keyboard_navigation_cells) {\n return gantt.$keyboardNavigation.TaskCell;\n } else {\n return gantt.$keyboardNavigation.TaskRow;\n }\n }\n\n function isInlineEditorCell(e) {\n return !!domHelpers.closest(e.target, \".gantt_grid_editor_placeholder\");\n } // GS-1445. Cancel keyboard navigation within custom elements\n\n\n function isNoKeyboardNavigationElement(e) {\n return !!domHelpers.closest(e.target, \".no_keyboard_navigation\");\n }\n\n function isLightboxElement(e) {\n return !!domHelpers.closest(e.target, \".gantt_cal_light\");\n }\n\n function mousedownHandler(e) {\n if (!gantt.config.keyboard_navigation) return true; // GS-734 & GS-1078: we don't need keyboard navigation inside inline editors\n\n if (!gantt.config.keyboard_navigation_cells && isInlineEditorCell(e)) return true;\n\n if (isNoKeyboardNavigationElement(e)) {\n return;\n }\n\n var focusNode;\n var locateTask = dispatcher.fromDomElement(e);\n\n if (locateTask) {\n //var node = getTaskNodeConstructor();\n if (dispatcher.activeNode instanceof gantt.$keyboardNavigation.TaskCell && domHelpers.isChildOf(e.target, gantt.$task)) {\n locateTask = new gantt.$keyboardNavigation.TaskCell(locateTask.taskId, dispatcher.activeNode.columnIndex);\n }\n\n focusNode = locateTask;\n }\n\n if (focusNode) {\n if (!dispatcher.isEnabled()) {\n dispatcher.activeNode = focusNode;\n } else {\n dispatcher.delay(function () {\n dispatcher.setActiveNode(focusNode);\n });\n }\n } else {\n // empty click should drop focus from gantt, insert of reselecting default node\n dispatcher.$preventDefault = true;\n setTimeout(function () {\n dispatcher.$preventDefault = false;\n }, 300);\n }\n }\n\n var onReady = gantt.attachEvent(\"onGanttReady\", function () {\n // restore focus on repainted tasks\n gantt.detachEvent(onReady);\n gantt.$data.tasksStore.attachEvent(\"onStoreUpdated\", function (id) {\n if (gantt.config.keyboard_navigation && dispatcher.isEnabled()) {\n var currentNode = dispatcher.getActiveNode();\n var grid = gantt.$ui.getView(\"grid\");\n var top = grid.getItemTop(id);\n var gridDataTopScroll = grid.$grid_data.scrollTop;\n var gridDataBottomScroll = gridDataTopScroll + grid.$grid_data.getBoundingClientRect().height;\n\n if (currentNode && currentNode.taskId == id) {\n // GS-2539: Don't refocus the node if it is selected and outside the visible range in the grid\n if (gridDataTopScroll <= top && gridDataBottomScroll >= top) {\n reFocusActiveNode();\n }\n }\n }\n });\n\n if (gantt._smart_render) {\n var updateRender = gantt._smart_render._redrawTasks;\n\n gantt._smart_render._redrawTasks = function (renderers, items) {\n if (gantt.config.keyboard_navigation && dispatcher.isEnabled()) {\n var currentNode = dispatcher.getActiveNode();\n\n if (currentNode && currentNode.taskId !== undefined) {\n var focusedItemVisible = false;\n\n for (var i = 0; i < items.length; i++) {\n if (items[i].id == currentNode.taskId && items[i].start_date) {\n focusedItemVisible = true;\n break;\n }\n }\n\n if (!focusedItemVisible) {\n items.push(gantt.getTask(currentNode.taskId));\n }\n }\n }\n\n var res = updateRender.apply(this, arguments);\n return res;\n };\n }\n });\n var createdTaskId = null;\n var keepFocusOnNewTask = false;\n gantt.attachEvent(\"onTaskCreated\", function (task) {\n createdTaskId = task.id;\n return true;\n });\n gantt.attachEvent(\"onAfterTaskAdd\", function (id, item) {\n if (!gantt.config.keyboard_navigation) return true;\n\n if (dispatcher.isEnabled()) {\n // GS-1394. After adding a new task, the focus shouldn't change to the placeholder task\n if (id == createdTaskId) {\n keepFocusOnNewTask = true;\n setTimeout(function () {\n keepFocusOnNewTask = false;\n createdTaskId = null;\n });\n }\n\n if (keepFocusOnNewTask && item.type == gantt.config.types.placeholder) {\n return;\n }\n\n var columnIndex = 0;\n var node = dispatcher.activeNode;\n\n if (node instanceof gantt.$keyboardNavigation.TaskCell) {\n columnIndex = node.columnIndex;\n }\n\n var nodeConstructor = getTaskNodeConstructor();\n\n if (item.type == gantt.config.types.placeholder && gantt.config.placeholder_task.focusOnCreate === false) {// do not focus on the placeholder task\n } else {\n dispatcher.setActiveNode(new nodeConstructor(id, columnIndex));\n }\n }\n });\n gantt.attachEvent(\"onTaskIdChange\", function (oldId, newId) {\n if (!gantt.config.keyboard_navigation) return true;\n var node = dispatcher.activeNode;\n\n if (dispatcher.isTaskFocused(oldId)) {\n node.taskId = newId;\n }\n\n return true;\n });\n var interval = setInterval(function () {\n if (!gantt.config.keyboard_navigation) return;\n\n if (!dispatcher.isEnabled()) {\n dispatcher.enable();\n }\n\n return;\n }, 500);\n gantt.attachEvent(\"onDestroy\", function () {\n clearInterval(interval);\n });\n\n function getScopeName(obj) {\n if (obj instanceof gantt.$keyboardNavigation.GanttNode) {\n return \"gantt\";\n } else if (obj instanceof gantt.$keyboardNavigation.HeaderCell) {\n return \"headerCell\";\n } else if (obj instanceof gantt.$keyboardNavigation.TaskRow) {\n return \"taskRow\";\n } else if (obj instanceof gantt.$keyboardNavigation.TaskCell) {\n return \"taskCell\";\n }\n\n return null;\n }\n\n function getScope(mode) {\n var scopes = {\n \"gantt\": gantt.$keyboardNavigation.GanttNode,\n \"headerCell\": gantt.$keyboardNavigation.HeaderCell,\n \"taskRow\": gantt.$keyboardNavigation.TaskRow,\n \"taskCell\": gantt.$keyboardNavigation.TaskCell\n };\n return scopes[mode] || scopes.gantt;\n }\n\n function findVisibleColumnIndex(columnName) {\n var columns = gantt.getGridColumns();\n\n for (var i = 0; i < columns.length; i++) {\n if (columns[i].name == columnName) {\n return i;\n }\n }\n\n return 0;\n }\n\n var keyNavFacade = {};\n eventable(keyNavFacade);\n gantt.mixin(keyNavFacade, {\n addShortcut: function addShortcut(shortcut, handler, scope) {\n var scopeObject = getScope(scope);\n\n if (scopeObject) {\n scopeObject.prototype.bind(shortcut, handler);\n }\n },\n getShortcutHandler: function getShortcutHandler(shortcut, scope) {\n var commands = gantt.$keyboardNavigation.shortcuts.parse(shortcut);\n\n if (commands.length) {\n return keyNavFacade.getCommandHandler(commands[0], scope);\n }\n },\n getCommandHandler: function getCommandHandler(command, scope) {\n var scopeObject = getScope(scope);\n\n if (scopeObject) {\n if (command) {\n return scopeObject.prototype.findHandler(command);\n }\n }\n },\n removeShortcut: function removeShortcut(shortcut, scope) {\n var scopeObject = getScope(scope);\n\n if (scopeObject) {\n scopeObject.prototype.unbind(shortcut);\n }\n },\n focus: function focus(config) {\n var type = config ? config.type : null;\n var constructor = getScope(type);\n var node;\n\n switch (type) {\n case \"taskCell\":\n node = new constructor(config.id, findVisibleColumnIndex(config.column));\n break;\n\n case \"taskRow\":\n node = new constructor(config.id);\n break;\n\n case \"headerCell\":\n node = new constructor(findVisibleColumnIndex(config.column));\n break;\n\n default:\n break;\n }\n\n dispatcher.delay(function () {\n if (node) {\n dispatcher.setActiveNode(node);\n } else {\n dispatcher.enable();\n\n if (!dispatcher.getActiveNode()) {\n dispatcher.setDefaultNode();\n } else {\n if (!dispatcher.awaitsFocus()) {\n dispatcher.enable();\n }\n }\n }\n });\n },\n getActiveNode: function getActiveNode() {\n if (dispatcher.isEnabled()) {\n var node = dispatcher.getActiveNode();\n var scope = getScopeName(node);\n var columns = gantt.getGridColumns();\n\n switch (scope) {\n case \"taskCell\":\n return {\n type: \"taskCell\",\n id: node.taskId,\n column: columns[node.columnIndex].name\n };\n\n case \"taskRow\":\n return {\n type: \"taskRow\",\n id: node.taskId\n };\n\n case \"headerCell\":\n return {\n type: \"headerCell\",\n column: columns[node.index].name\n };\n }\n }\n\n return null;\n }\n });\n gantt.$keyboardNavigation.facade = keyNavFacade;\n gantt.ext.keyboardNavigation = keyNavFacade;\n\n gantt.focus = function () {\n keyNavFacade.focus();\n };\n\n gantt.addShortcut = keyNavFacade.addShortcut;\n gantt.getShortcutHandler = keyNavFacade.getShortcutHandler;\n gantt.removeShortcut = keyNavFacade.removeShortcut;\n })();\n }\n\n setupKeyNav(gantt);\n};","export default function(gantt: any){\r\n\r\ninterface IBody extends HTMLElement {\r\n\tmsRequestFullscreen?: () => void;\r\n\tmozRequestFullScreen?: () => void;\r\n\twebkitRequestFullscreen?: (ALLOW_KEYBOARD_INPUT: any) => void;\r\n}\r\n\r\n\r\ninterface IConsole extends Console {\r\n\twarning?: (str: string) => void;\r\n}\r\n\r\ninterface IDocument extends Document {\r\n\tfullscreenElement: Element;\r\n\tmozFullScreenElement?: Element;\r\n\twebkitFullscreenElement?: Element;\r\n\tmsFullscreenElement?: Element;\r\n\twebkitFullscreenEnabled?: boolean;\r\n\tmozFullScreenEnabled?: boolean;\r\n\tmsFullscreenEnabled?: boolean;\r\n\tmsExitFullscreen?: () => void;\r\n\tmozCancelFullScreen?: () => void;\r\n\twebkitExitFullscreen?: () => void;\r\n}\r\n\r\ninterface IElement extends Element {\r\n\tALLOW_KEYBOARD_INPUT?: boolean;\r\n}\r\n\r\ninterface IElementSizes extends ISizes {\r\n\tmodified: boolean;\r\n}\r\n\r\ninterface ISizes {\r\n\twidth: null | string;\r\n\theight: null | string;\r\n\ttop: null | string;\r\n\tleft: null | string;\r\n\tposition: null | string;\r\n\tzIndex: null | number;\r\n}\r\n\r\nfunction isExpanded() {\r\n\tconst element = ((document as IDocument).fullscreenElement ||\r\n\t\t(document as IDocument).mozFullScreenElement ||\r\n\t\t(document as IDocument).webkitFullscreenElement ||\r\n\t\t(document as IDocument).msFullscreenElement);\r\n\treturn !!(element && element === document.body);\r\n}\r\n\r\nfunction isFullscreenAvailable() {\r\n\ttry {\r\n\t\treturn (document as IDocument).fullscreenEnabled ||\r\n\t\t\t(document as IDocument).webkitFullscreenEnabled ||\r\n\t\t\t(document as IDocument).mozFullScreenEnabled ||\r\n\t\t\t(document as IDocument).msFullscreenEnabled;\r\n\t} catch (e) {\r\n\t\tconsole.error(\"Fullscreen is not available:\", e); // tslint:disable-line:no-console\r\n\t}\r\n}\r\n\r\nconst state = gantt.$services.getService(\"state\");\r\nstate.registerProvider(\"fullscreen\", () => {\r\n\tif (isFullscreenAvailable()){\r\n\t\treturn { fullscreen: isExpanded() };\r\n\t} else {\r\n\t\treturn undefined;\r\n\t}\r\n});\r\n\r\nlet backupBodyPadding = {\r\n\toverflow: null,\r\n\tpadding: null,\r\n\tpaddingTop: null,\r\n\tpaddingRight: null,\r\n\tpaddingBottom: null,\r\n\tpaddingLeft: null\r\n};\r\n\r\nconst backupElementSizes: IElementSizes = {\r\n\twidth: null,\r\n\theight: null,\r\n\ttop: null,\r\n\tleft: null,\r\n\tposition: null,\r\n\tzIndex: null,\r\n\tmodified: false\r\n};\r\n\r\nlet backupPositioning = null;\r\nfunction resetParentPositioning(root){\r\n\tlet parent = root.parentNode;\r\n\tconst positions = [];\r\n\twhile(parent && parent.style){\r\n\t\tpositions.push({\r\n\t\t\telement: parent,\r\n\t\t\toriginalPositioning: parent.style.position\r\n\t\t});\r\n\t\tparent.style.position = \"static\";\r\n\t\tparent = parent.parentNode;\r\n\t}\r\n\treturn positions;\r\n}\r\n\r\nfunction restoreParentPositioning(positions: any[]){\r\n\tpositions.forEach(record => {\r\n\t\trecord.element.style.position = record.originalPositioning;\r\n\t});\r\n}\r\n\r\n// expand gantt root element to fullscreen automatically\r\nfunction setFullScreenSizes() {\r\n\tconst root = gantt.ext.fullscreen.getFullscreenElement();\r\n\tconst body = document.body;\r\n\tupdateSizes(root.style, backupElementSizes);\r\n\tbackupBodyPadding = {\r\n\t\toverflow: body.style.overflow,\r\n\t\tpadding: body.style.padding ? body.style.padding : null,\r\n\t\tpaddingTop: body.style.paddingTop ? body.style.paddingTop : null,\r\n\t\tpaddingRight: body.style.paddingRight ? body.style.paddingRight : null,\r\n\t\tpaddingBottom: body.style.paddingBottom ? body.style.paddingBottom : null,\r\n\t\tpaddingLeft: body.style.paddingLeft ? body.style.paddingLeft : null\r\n\t};\r\n\r\n\tif (body.style.padding) {\r\n\t\tbody.style.padding = \"0\";\r\n\t}\r\n\tif (body.style.paddingTop) {\r\n\t\tbody.style.paddingTop = \"0\";\r\n\t}\r\n\tif (body.style.paddingRight) {\r\n\t\tbody.style.paddingRight = \"0\";\r\n\t}\r\n\tif (body.style.paddingBottom) {\r\n\t\tbody.style.paddingBottom = \"0\";\r\n\t}\r\n\tif (body.style.paddingLeft) {\r\n\t\tbody.style.paddingLeft = \"0\";\r\n\t}\r\n\r\n\tbody.style.overflow = \"hidden\";\r\n\r\n\troot.style.width = \"100vw\";\r\n\troot.style.height = \"100vh\";\r\n\troot.style.top = \"0px\";\r\n\troot.style.left = \"0px\";\r\n\troot.style.position = \"absolute\";\r\n\troot.style.zIndex = 1;\r\n\tbackupElementSizes.modified = true;\r\n\tbackupPositioning = resetParentPositioning(root);\r\n}\r\n\r\nfunction restoreSizes() {\r\n\tconst root = gantt.ext.fullscreen.getFullscreenElement();\r\n\tconst body = document.body;\r\n\tif (backupElementSizes.modified) {\r\n\t\tif (backupBodyPadding.padding) {\r\n\t\t\tbody.style.padding = backupBodyPadding.padding;\r\n\t\t}\r\n\t\tif (backupBodyPadding.paddingTop) {\r\n\t\t\tbody.style.paddingTop = backupBodyPadding.paddingTop;\r\n\t\t}\r\n\t\tif (backupBodyPadding.paddingRight) {\r\n\t\t\tbody.style.paddingRight = backupBodyPadding.paddingRight;\r\n\t\t}\r\n\t\tif (backupBodyPadding.paddingBottom) {\r\n\t\t\tbody.style.paddingBottom = backupBodyPadding.paddingBottom;\r\n\t\t}\r\n\t\tif (backupBodyPadding.paddingLeft) {\r\n\t\t\tbody.style.paddingLeft = backupBodyPadding.paddingLeft;\r\n\t\t}\r\n\r\n\t\tbody.style.overflow = backupBodyPadding.overflow;\r\n\t\tbackupBodyPadding = {\r\n\t\t\toverflow: null,\r\n\t\t\tpadding: null,\r\n\t\t\tpaddingTop: null,\r\n\t\t\tpaddingRight: null,\r\n\t\t\tpaddingBottom: null,\r\n\t\t\tpaddingLeft: null\r\n\t\t};\r\n\t\tupdateSizes(backupElementSizes, root.style);\r\n\t\tbackupElementSizes.modified = false;\r\n\t}\r\n\trestoreParentPositioning(backupPositioning);\r\n\tbackupPositioning = null;\r\n}\r\n\r\nfunction updateSizes(source: ISizes, target: ISizes) {\r\n\ttarget.width = source.width;\r\n\ttarget.height = source.height;\r\n\ttarget.top = source.top;\r\n\ttarget.left = source.left;\r\n\ttarget.position = source.position;\r\n\ttarget.zIndex = source.zIndex;\r\n}\r\n\r\nfunction addDOMEvents() {\r\n\tgantt.event(document, \"webkitfullscreenchange\", onFullScreenChange);\r\n\tgantt.event(document, \"mozfullscreenchange\", onFullScreenChange);\r\n\tgantt.event(document, \"MSFullscreenChange\", onFullScreenChange);\r\n\t// For IE on Win 10\r\n\tgantt.event(document, \"fullscreenChange\", onFullScreenChange);\r\n\tgantt.event(document, \"fullscreenchange\", onFullScreenChange);\r\n}\r\n\r\nlet expandGantt = false;\r\nfunction onFullScreenChange() {\r\n\tif (!gantt.$container) {\r\n\t\t// do nothing if gantt is not yet initialized\r\n\t\treturn;\r\n\t}\r\n\tlet event: \"onExpand\" | \"onCollapse\";\r\n\tconst isBodyExpanded = isExpanded();\r\n\r\n\tif (isBodyExpanded) {\r\n\t\tif (expandGantt) {\r\n\t\t\tevent = \"onExpand\";\r\n\t\t\tsetFullScreenSizes();\r\n\t\t}\r\n\t} else if (expandGantt) {\r\n\t\texpandGantt = false;\r\n\t\tevent = \"onCollapse\";\r\n\t\trestoreSizes();\r\n\t}\r\n\tsetTimeout(() => {\r\n\t\tgantt.render();\r\n\t});\r\n\tsetTimeout(() => {\r\n\t\tgantt.callEvent(event, [gantt.ext.fullscreen.getFullscreenElement()]);\r\n\t});\r\n}\r\n\r\nfunction cantFullscreen() {\r\n\tif (!gantt.$container) { // check is gantt initialized or not\r\n\t\treturn true;\r\n\t}\r\n\tif (!gantt.ext.fullscreen.getFullscreenElement()) {\r\n\t\treturn true;\r\n\t}\r\n\tif (!isFullscreenAvailable()) {\r\n\t\t// tslint:disable-next-line: no-console\r\n\t\tconst method = (console as IConsole).warning || console.log;\r\n\t\tmethod(\"The `fullscreen` feature not being allowed, or full-screen mode not being supported\");\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\ngantt.ext.fullscreen = {\r\n\texpand(): void {\r\n\t\tif (cantFullscreen()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (isExpanded()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!gantt.callEvent(\"onBeforeExpand\", [this.getFullscreenElement()])) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\texpandGantt = true;\r\n\r\n\t\t// we switch body to fullscreen and then expand fullscreen element to viewport\r\n\t\t// we do it to correct display common elements: lightboxes, tooltip etc.\r\n\t\tconst element = document.body as IBody;\r\n\t\tconst requestArguments = element.webkitRequestFullscreen ?\r\n\t\t\t[(Element as unknown as IElement).ALLOW_KEYBOARD_INPUT] : [];\r\n\r\n\t\tconst requestFullscreen = element.msRequestFullscreen ||\r\n\t\t\telement.mozRequestFullScreen ||\r\n\t\t\telement.webkitRequestFullscreen ||\r\n\t\t\telement.requestFullscreen;\r\n\r\n\t\tif (requestFullscreen) {\r\n\t\t\trequestFullscreen.apply(element, requestArguments);\r\n\t\t}\r\n\t},\r\n\tcollapse(): void {\r\n\t\tif (cantFullscreen()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!isExpanded()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!gantt.callEvent(\"onBeforeCollapse\", [this.getFullscreenElement()])) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst requestExitFullscreen = (document as IDocument).msExitFullscreen ||\r\n\t\t\t(document as IDocument).mozCancelFullScreen ||\r\n\t\t\t(document as IDocument).webkitExitFullscreen ||\r\n\t\t\t(document as IDocument).exitFullscreen;\r\n\r\n\t\tif (requestExitFullscreen) {\r\n\t\t\trequestExitFullscreen.apply(document);\r\n\t\t}\r\n\t},\r\n\ttoggle(): void {\r\n\t\tif (cantFullscreen()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (!isExpanded()) {\r\n\t\t\tthis.expand();\r\n\t\t} else {\r\n\t\t\tthis.collapse();\r\n\t\t}\r\n\r\n\t},\r\n\tgetFullscreenElement(): HTMLElement {\r\n\t\treturn gantt.$root;\r\n\t},\r\n};\r\n\r\ngantt.expand = function() {\r\n\tgantt.ext.fullscreen.expand();\r\n};\r\n\r\ngantt.collapse = function(){\r\n\tgantt.ext.fullscreen.collapse();\r\n};\r\n\r\ngantt.attachEvent(\"onGanttReady\", addDOMEvents);\r\n\r\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar stringifyPrimitive = function stringifyPrimitive(v) {\n switch (_typeof(v)) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function (obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n\n if (obj === null) {\n obj = undefined;\n }\n\n if (_typeof(obj) === 'object') {\n return map(objectKeys(obj), function (k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n\n if (isArray(obj[k])) {\n return map(obj[k], function (v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq + encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map(xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n\n return res;\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict'; // If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function (qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n var maxKeys = 1000;\n\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length; // maxKeys <= 0 means that we should not limit keys count\n\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr,\n vstr,\n k,\n v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');","'use strict';\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nmodule.exports = {\n isString: function isString(arg) {\n return typeof arg === 'string';\n },\n isObject: function isObject(arg) {\n return _typeof(arg) === 'object' && arg !== null;\n },\n isNull: function isNull(arg) {\n return arg === null;\n },\n isNullOrUndefined: function isNullOrUndefined(arg) {\n return arg == null;\n }\n};","module.exports = function (module) {\n if (!module.webpackPolyfill) {\n module.deprecate = function () {};\n\n module.paths = []; // module.parent = undefined by default\n\n if (!module.children) module.children = [];\n Object.defineProperty(module, \"loaded\", {\n enumerable: true,\n get: function get() {\n return module.l;\n }\n });\n Object.defineProperty(module, \"id\", {\n enumerable: true,\n get: function get() {\n return module.i;\n }\n });\n module.webpackPolyfill = 1;\n }\n\n return module;\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*! https://mths.be/punycode v1.4.1 by @mathias */\n;\n\n(function (root) {\n /** Detect free variables */\n var freeExports = (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;\n var freeModule = (typeof module === \"undefined\" ? \"undefined\" : _typeof(module)) == 'object' && module && !module.nodeType && module;\n var freeGlobal = (typeof global === \"undefined\" ? \"undefined\" : _typeof(global)) == 'object' && global;\n\n if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) {\n root = freeGlobal;\n }\n /**\n * The `punycode` object.\n * @name punycode\n * @type Object\n */\n\n\n var punycode,\n\n /** Highest positive signed 32-bit float value */\n maxInt = 2147483647,\n // aka. 0x7FFFFFFF or 2^31-1\n\n /** Bootstring parameters */\n base = 36,\n tMin = 1,\n tMax = 26,\n skew = 38,\n damp = 700,\n initialBias = 72,\n initialN = 128,\n // 0x80\n delimiter = '-',\n // '\\x2D'\n\n /** Regular expressions */\n regexPunycode = /^xn--/,\n regexNonASCII = /[^\\x20-\\x7E]/,\n // unprintable ASCII chars + non-ASCII chars\n regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g,\n // RFC 3490 separators\n\n /** Error messages */\n errors = {\n 'overflow': 'Overflow: input needs wider integers to process',\n 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n 'invalid-input': 'Invalid input'\n },\n\n /** Convenience shortcuts */\n baseMinusTMin = base - tMin,\n floor = Math.floor,\n stringFromCharCode = String.fromCharCode,\n\n /** Temporary variable */\n key;\n /*--------------------------------------------------------------------------*/\n\n /**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\n\n function error(type) {\n throw new RangeError(errors[type]);\n }\n /**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\n\n\n function map(array, fn) {\n var length = array.length;\n var result = [];\n\n while (length--) {\n result[length] = fn(array[length]);\n }\n\n return result;\n }\n /**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\n\n\n function mapDomain(string, fn) {\n var parts = string.split('@');\n var result = '';\n\n if (parts.length > 1) {\n // In email addresses, only the domain name should be punycoded. Leave\n // the local part (i.e. everything up to `@`) intact.\n result = parts[0] + '@';\n string = parts[1];\n } // Avoid `split(regex)` for IE8 compatibility. See #17.\n\n\n string = string.replace(regexSeparators, '\\x2E');\n var labels = string.split('.');\n var encoded = map(labels, fn).join('.');\n return result + encoded;\n }\n /**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see \n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\n\n\n function ucs2decode(string) {\n var output = [],\n counter = 0,\n length = string.length,\n value,\n extra;\n\n while (counter < length) {\n value = string.charCodeAt(counter++);\n\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // high surrogate, and there is a next character\n extra = string.charCodeAt(counter++);\n\n if ((extra & 0xFC00) == 0xDC00) {\n // low surrogate\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // unmatched surrogate; only append this code unit, in case the next\n // code unit is the high surrogate of a surrogate pair\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n\n return output;\n }\n /**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\n\n\n function ucs2encode(array) {\n return map(array, function (value) {\n var output = '';\n\n if (value > 0xFFFF) {\n value -= 0x10000;\n output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n value = 0xDC00 | value & 0x3FF;\n }\n\n output += stringFromCharCode(value);\n return output;\n }).join('');\n }\n /**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\n\n\n function basicToDigit(codePoint) {\n if (codePoint - 48 < 10) {\n return codePoint - 22;\n }\n\n if (codePoint - 65 < 26) {\n return codePoint - 65;\n }\n\n if (codePoint - 97 < 26) {\n return codePoint - 97;\n }\n\n return base;\n }\n /**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\n\n\n function digitToBasic(digit, flag) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n }\n /**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\n\n\n function adapt(delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n\n for (;\n /* no initialization */\n delta > baseMinusTMin * tMax >> 1; k += base) {\n delta = floor(delta / baseMinusTMin);\n }\n\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n }\n /**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\n\n\n function decode(input) {\n // Don't use UCS-2\n var output = [],\n inputLength = input.length,\n out,\n i = 0,\n n = initialN,\n bias = initialBias,\n basic,\n j,\n index,\n oldi,\n w,\n k,\n digit,\n t,\n\n /** Cached calculation results */\n baseMinusT; // Handle the basic code points: let `basic` be the number of input code\n // points before the last delimiter, or `0` if there is none, then copy\n // the first basic code points to the output.\n\n basic = input.lastIndexOf(delimiter);\n\n if (basic < 0) {\n basic = 0;\n }\n\n for (j = 0; j < basic; ++j) {\n // if it's not a basic code point\n if (input.charCodeAt(j) >= 0x80) {\n error('not-basic');\n }\n\n output.push(input.charCodeAt(j));\n } // Main decoding loop: start just after the last delimiter if any basic code\n // points were copied; start at the beginning otherwise.\n\n\n for (index = basic > 0 ? basic + 1 : 0; index < inputLength;)\n /* no final expression */\n {\n // `index` is the index of the next character to be consumed.\n // Decode a generalized variable-length integer into `delta`,\n // which gets added to `i`. The overflow checking is easier\n // if we increase `i` as we go, then subtract off its starting\n // value at the end to obtain `delta`.\n for (oldi = i, w = 1, k = base;;\n /* no condition */\n k += base) {\n if (index >= inputLength) {\n error('invalid-input');\n }\n\n digit = basicToDigit(input.charCodeAt(index++));\n\n if (digit >= base || digit > floor((maxInt - i) / w)) {\n error('overflow');\n }\n\n i += digit * w;\n t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n\n if (digit < t) {\n break;\n }\n\n baseMinusT = base - t;\n\n if (w > floor(maxInt / baseMinusT)) {\n error('overflow');\n }\n\n w *= baseMinusT;\n }\n\n out = output.length + 1;\n bias = adapt(i - oldi, out, oldi == 0); // `i` was supposed to wrap around from `out` to `0`,\n // incrementing `n` each time, so we'll fix that now:\n\n if (floor(i / out) > maxInt - n) {\n error('overflow');\n }\n\n n += floor(i / out);\n i %= out; // Insert `n` at position `i` of the output\n\n output.splice(i++, 0, n);\n }\n\n return ucs2encode(output);\n }\n /**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\n\n\n function encode(input) {\n var n,\n delta,\n handledCPCount,\n basicLength,\n bias,\n j,\n m,\n q,\n k,\n t,\n currentValue,\n output = [],\n\n /** `inputLength` will hold the number of code points in `input`. */\n inputLength,\n\n /** Cached calculation results */\n handledCPCountPlusOne,\n baseMinusT,\n qMinusT; // Convert the input in UCS-2 to Unicode\n\n input = ucs2decode(input); // Cache the length\n\n inputLength = input.length; // Initialize the state\n\n n = initialN;\n delta = 0;\n bias = initialBias; // Handle the basic code points\n\n for (j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n\n if (currentValue < 0x80) {\n output.push(stringFromCharCode(currentValue));\n }\n }\n\n handledCPCount = basicLength = output.length; // `handledCPCount` is the number of code points that have been handled;\n // `basicLength` is the number of basic code points.\n // Finish the basic string - if it is not empty - with a delimiter\n\n if (basicLength) {\n output.push(delimiter);\n } // Main encoding loop:\n\n\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next\n // larger one:\n for (m = maxInt, j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n } // Increase `delta` enough to advance the decoder's state to ,\n // but guard against overflow\n\n\n handledCPCountPlusOne = handledCPCount + 1;\n\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n error('overflow');\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (j = 0; j < inputLength; ++j) {\n currentValue = input[j];\n\n if (currentValue < n && ++delta > maxInt) {\n error('overflow');\n }\n\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer\n for (q = delta, k = base;;\n /* no condition */\n k += base) {\n t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;\n\n if (q < t) {\n break;\n }\n\n qMinusT = q - t;\n baseMinusT = base - t;\n output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));\n q = floor(qMinusT / baseMinusT);\n }\n\n output.push(stringFromCharCode(digitToBasic(q, 0)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n ++handledCPCount;\n }\n }\n\n ++delta;\n ++n;\n }\n\n return output.join('');\n }\n /**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\n\n\n function toUnicode(input) {\n return mapDomain(input, function (string) {\n return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;\n });\n }\n /**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\n\n\n function toASCII(input) {\n return mapDomain(input, function (string) {\n return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;\n });\n }\n /*--------------------------------------------------------------------------*/\n\n /** Define the public API */\n\n\n punycode = {\n /**\n * A string representing the current Punycode.js version number.\n * @memberOf punycode\n * @type String\n */\n 'version': '1.4.1',\n\n /**\n * An object of methods to convert from JavaScript's internal character\n * representation (UCS-2) to Unicode code points, and back.\n * @see \n * @memberOf punycode\n * @type Object\n */\n 'ucs2': {\n 'decode': ucs2decode,\n 'encode': ucs2encode\n },\n 'decode': decode,\n 'encode': encode,\n 'toASCII': toASCII,\n 'toUnicode': toUnicode\n };\n /** Expose `punycode` */\n // Some AMD build optimizers, like r.js, check for specific condition patterns\n // like the following:\n\n if (typeof define == 'function' && _typeof(define.amd) == 'object' && define.amd) {\n define('punycode', function () {\n return punycode;\n });\n } else if (freeExports && freeModule) {\n if (module.exports == freeExports) {\n // in Node.js, io.js, or RingoJS v0.8.0+\n freeModule.exports = punycode;\n } else {\n // in Narwhal or RingoJS v0.7.0-\n for (key in punycode) {\n punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n }\n }\n } else {\n // in Rhino or a web browser\n root.punycode = punycode;\n }\n})(this);","module.exports = {\n \"100\": \"Continue\",\n \"101\": \"Switching Protocols\",\n \"102\": \"Processing\",\n \"200\": \"OK\",\n \"201\": \"Created\",\n \"202\": \"Accepted\",\n \"203\": \"Non-Authoritative Information\",\n \"204\": \"No Content\",\n \"205\": \"Reset Content\",\n \"206\": \"Partial Content\",\n \"207\": \"Multi-Status\",\n \"208\": \"Already Reported\",\n \"226\": \"IM Used\",\n \"300\": \"Multiple Choices\",\n \"301\": \"Moved Permanently\",\n \"302\": \"Found\",\n \"303\": \"See Other\",\n \"304\": \"Not Modified\",\n \"305\": \"Use Proxy\",\n \"307\": \"Temporary Redirect\",\n \"308\": \"Permanent Redirect\",\n \"400\": \"Bad Request\",\n \"401\": \"Unauthorized\",\n \"402\": \"Payment Required\",\n \"403\": \"Forbidden\",\n \"404\": \"Not Found\",\n \"405\": \"Method Not Allowed\",\n \"406\": \"Not Acceptable\",\n \"407\": \"Proxy Authentication Required\",\n \"408\": \"Request Timeout\",\n \"409\": \"Conflict\",\n \"410\": \"Gone\",\n \"411\": \"Length Required\",\n \"412\": \"Precondition Failed\",\n \"413\": \"Payload Too Large\",\n \"414\": \"URI Too Long\",\n \"415\": \"Unsupported Media Type\",\n \"416\": \"Range Not Satisfiable\",\n \"417\": \"Expectation Failed\",\n \"418\": \"I'm a teapot\",\n \"421\": \"Misdirected Request\",\n \"422\": \"Unprocessable Entity\",\n \"423\": \"Locked\",\n \"424\": \"Failed Dependency\",\n \"425\": \"Unordered Collection\",\n \"426\": \"Upgrade Required\",\n \"428\": \"Precondition Required\",\n \"429\": \"Too Many Requests\",\n \"431\": \"Request Header Fields Too Large\",\n \"451\": \"Unavailable For Legal Reasons\",\n \"500\": \"Internal Server Error\",\n \"501\": \"Not Implemented\",\n \"502\": \"Bad Gateway\",\n \"503\": \"Service Unavailable\",\n \"504\": \"Gateway Timeout\",\n \"505\": \"HTTP Version Not Supported\",\n \"506\": \"Variant Also Negotiates\",\n \"507\": \"Insufficient Storage\",\n \"508\": \"Loop Detected\",\n \"509\": \"Bandwidth Limit Exceeded\",\n \"510\": \"Not Extended\",\n \"511\": \"Network Authentication Required\"\n};","module.exports = extend;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction extend() {\n var target = {};\n\n for (var i = 0; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n}","var Buffer = require('buffer').Buffer;\n\nmodule.exports = function (buf) {\n // If the buffer is backed by a Uint8Array, a faster version will work\n if (buf instanceof Uint8Array) {\n // If the buffer isn't a subarray, return the underlying ArrayBuffer\n if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) {\n return buf.buffer;\n } else if (typeof buf.buffer.slice === 'function') {\n // Otherwise we need to get a proper copy\n return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n }\n }\n\n if (Buffer.isBuffer(buf)) {\n // This is the slow version that will work with any Buffer\n // implementation (even in old browsers)\n var arrayCopy = new Uint8Array(buf.length);\n var len = buf.length;\n\n for (var i = 0; i < len; i++) {\n arrayCopy[i] = buf[i];\n }\n\n return arrayCopy.buffer;\n } else {\n throw new Error('Argument must be a Buffer');\n }\n};","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n// a passthrough stream.\n// basically just the most minimal sort of Transform stream.\n// Every written chunk gets output as-is.\n'use strict';\n\nmodule.exports = PassThrough;\n\nvar Transform = require('./_stream_transform');\n/**/\n\n\nvar util = require('core-util-is');\n\nutil.inherits = require('inherits');\n/**/\n\nutil.inherits(PassThrough, Transform);\n\nfunction PassThrough(options) {\n if (!(this instanceof PassThrough)) return new PassThrough(options);\n Transform.call(this, options);\n}\n\nPassThrough.prototype._transform = function (chunk, encoding, cb) {\n cb(null, chunk);\n};","/**\n * Module exports.\n */\nmodule.exports = deprecate;\n/**\n * Mark that a method should not be used.\n * Returns a modified function which warns once by default.\n *\n * If `localStorage.noDeprecation = true` is set, then it is a no-op.\n *\n * If `localStorage.throwDeprecation = true` is set, then deprecated functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate(fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n\n function deprecated() {\n if (!warned) {\n if (config('throwDeprecation')) {\n throw new Error(msg);\n } else if (config('traceDeprecation')) {\n console.trace(msg);\n } else {\n console.warn(msg);\n }\n\n warned = true;\n }\n\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\n\nfunction config(name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}","(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n } // Copy function arguments\n\n\n var args = new Array(arguments.length - 1);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n } // Store and register the task\n\n\n var task = {\n callback: callback,\n args: args\n };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n\n switch (args.length) {\n case 0:\n callback();\n break;\n\n case 1:\n callback(args[0]);\n break;\n\n case 2:\n callback(args[0], args[1]);\n break;\n\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n\n if (task) {\n currentlyRunningATask = true;\n\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function registerImmediate(handle) {\n process.nextTick(function () {\n runIfPresent(handle);\n });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n\n global.onmessage = function () {\n postMessageIsAsynchronous = false;\n };\n\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n\n var onGlobalMessage = function onGlobalMessage(event) {\n if (event.source === global && typeof event.data === \"string\" && event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function registerImmediate(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n\n channel.port1.onmessage = function (event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function registerImmediate(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n\n registerImmediate = function registerImmediate(handle) {\n // Create a