text: function module(e,t,i){"use strict";var n,o=S(e("../../core/renderer")),s,r=S(e("../../core/dom_adapter")),a,l=S(e("../../events/core/events_engine")),d,u=S(e("../../core/utils/callbacks")),c,h=S(e("../../core/utils/type")),g=e("../../core/utils/iterator"),m=e("../../core/utils/extend"),f=e("../../events/utils"),_,p=S(e("../../events/pointer")),w,C=S(e("../../events/drag")),b,v=S(e("./ui.grid_core.modules")),V,x=S(e("./ui.grid_core.utils")),R,H=S(e("../../animation/fx")),P=e("../widget/swatch_container");function S(e){return e&&e.__esModule?e:{default:e}}var y="columns-separator",z="columns-separator-transparent",I="drag-header",k="text-content",B="drag-action",E="tracker",T="drop-highlight",O="dx-block-separator",W="dx-header-row",D="dx-widget",N="dx-drag-command-cell",L="dxDataGridResizingReordering",F=10,A=5,X=.5,M=function(e){return e.option("allowColumnResizing")||e.getController("columns").isColumnOptionUsed("allowResizing")},Y=function(e){return e.option("allowColumnReordering")||e.getController("columns").isColumnOptionUsed("allowReordering")},$=v.default.View.inherit({_renderCore:function(){this.callBase(),this.element().addClass(this.addWidgetPrefix("tracker")),this.hide()},_unsubscribeFromCallback:function(){this._positionChanged&&this._tablePositionController.positionChanged.remove(this._positionChanged)},_subscribeToCallback:function(){var e=this;e._positionChanged=function(t){var i=e.element();i&&i.hasClass(e.addWidgetPrefix("tracker"))&&(i.css({top:t.top}),i.height(t.height))},this._tablePositionController.positionChanged.add(e._positionChanged)},optionChanged:function(e){"allowColumnResizing"===e.name&&(this._unsubscribeFromCallback(),e.value&&(this._subscribeToCallback(),this._invalidate())),this.callBase(e)},init:function(){this.callBase(),this._tablePositionController=this.getController("tablePosition"),this._subscribeToCallback()},isVisible:function(){return M(this)},show:function(){this.element().show()},hide:function(){this.element()&&this.element().hide()},setHeight:function(e){this.element().height(e)},dispose:function(){this._unsubscribeFromCallback(),this.callBase()}}),U=v.default.View.inherit({_renderSeparator:function(){},_renderCore:function(e){this.callBase(e),this._isShown=!0,this._renderSeparator(),this.hide()},show:function(){this._isShown=!0},hide:function(){this._isShown=!1},height:function(e){var t=this.element();if(t){if(!h.default.isDefined(e))return t.height();t.height(e)}},width:function(e){var t=this.element();if(t){if(!h.default.isDefined(e))return t.width();t.width(e)}}}),j=U.inherit({_renderSeparator:function(){var e;this.callBase(),this.element().addClass(this.addWidgetPrefix("columns-separator"))},_subscribeToCallback:function(){var e,t=this;t._positionChanged=function(i){(e=t.element())&&(e.css({top:i.top}),e.height(i.height))},t._tablePositionController.positionChanged.add(t._positionChanged)},_unsubscribeFromCallback:function(){this._positionChanged&&this._tablePositionController.positionChanged.remove(this._positionChanged)},_init:function(){this._isTransparent=M(this),this.isVisible()&&this._subscribeToCallback()},isVisible:function(){return this.option("showColumnHeaders")&&(Y(this)||M(this))},optionChanged:function(e){"allowColumnResizing"===e.name&&(e.value?(this._init(),this._invalidate(),this.hide(!0)):(this._unsubscribeFromCallback(),this._isTransparent=M(this),this.hide(!0))),this.callBase(e)},init:function(){this.callBase(),this._tablePositionController=this.getController("tablePosition"),this._init()},show:function(){var e=this,t=this.element();t&&!this._isShown&&(this._isTransparent?t.removeClass(this.addWidgetPrefix(z)):t.show()),this.callBase()},hide:function(e){var t=this.element(),i=this.addWidgetPrefix(z);t&&(this._isShown||e)&&(this._isTransparent?(t.addClass(i),t.css("left",""),t.show()):(t.hasClass(i)&&t.removeClass(i),t.hide())),this.callBase()},moveByX:function(e){var t=this.element();t&&t.css("left",e-this._parentElement().offset().left)},changeCursor:function(e){e=h.default.isDefined(e)?e:"";var t=this.element();t&&t.css("cursor",e)},dispose:function(){this._unsubscribeFromCallback(),this.callBase()}}),q=U.inherit({init:function(){var e=this;this.callBase(),this.getController("data").loadingChanged.add((function(t){t||e.hide()}))},_renderSeparator:function(){this.callBase(),this.element().addClass("dx-block-separator").html("&nbsp;")},hide:function(){var e=this,t=this._parentElement(),i=this.element();i&&this._isShown&&i.css("display","none"),t&&!t.children(".dx-block-separator").length&&t.prepend(this.element()),this.callBase()},isVisible:function(){var e=this.option("groupPanel"),t=this.option("columnChooser");return e&&e.visible||t&&t.enabled},show:function(e){var t=this,i=this.element(),n=function(e){H.default.stop(i,!0),H.default.animate(i,{type:"slide",from:{width:0,display:e.display},to:e,duration:300,easing:"swing"})};if(i&&!this._isShown)switch(e){case"group":n({width:"50px",display:"inline-block"});break;case"columnChooser":n({width:"100%",display:"block"});break;default:i.css("display","")}this.callBase()}}),G=v.default.View.inherit({_isDragging:!1,_getDraggingPanelByPos:function(e){var t,i=this;return(0,g.each)(this._dragOptions.draggingPanels,(function(i,n){if(n){var o=n.getBoundingRect();if(o&&(void 0===o.bottom||e.y<o.bottom)&&(void 0===o.top||e.y>o.top)&&(void 0===o.left||e.x>o.left)&&(void 0===o.right||e.x<o.right))return t=n,!1}})),t},_renderCore:function(){this.element().addClass(this.addWidgetPrefix("drag-header")+" "+this.addWidgetPrefix("text-content")+" dx-widget").hide()},_resetTargetColumnOptions:function(){var e=this._dropOptions;e.targetColumnIndex=-1,delete e.targetColumnElement,delete e.isLast,delete e.posX,delete e.posY},_getVisibleIndexObject:function(e,t){return h.default.isDefined(e)?{columnIndex:t,rowIndex:e}:t},dispose:function(){var e=this.element();this._dragOptions=null,e&&e.parent().find("."+this.addWidgetPrefix("drag-header")).remove()},isVisible:function(){var e,t=this.getController("columns").getCommonSettings();return this.option("showColumnHeaders")&&(Y(this)||t.allowGrouping||t.allowHiding)},init:function(){var e=this;this.callBase(),this._controller=this.getController("draggingHeader"),this._columnsResizerViewController=this.getController("columnsResizer"),this.getController("data").loadingChanged.add((function(t){var i=e.element();!t&&i&&i.hide()}))},dragHeader:function(e){var t=this,i=e.columnElement,n=!!e.sourceColumn.type;this._isDragging=!0,this._dragOptions=e,this._dropOptions={sourceIndex:e.index,sourceColumnIndex:this._getVisibleIndexObject(e.rowIndex,e.columnIndex),sourceColumnElement:e.columnElement,sourceLocation:e.sourceLocation};var o=r.default.getDocument();this._onSelectStart=o.onselectstart,o.onselectstart=function(){return!1},this._controller.drag(this._dropOptions),this.element().css({textAlign:i&&i.css("textAlign"),height:i&&(n&&i.get(0).clientHeight||i.height()),width:i&&(n&&i.get(0).clientWidth||i.width()),whiteSpace:i&&i.css("whiteSpace")}).addClass(this.addWidgetPrefix("drag-action")).toggleClass("dx-drag-command-cell",n).text(n?"":e.sourceColumn.caption),this.element().appendTo((0,P.getSwatchContainer)(i))},moveHeader:function(e){var t,i,n,o,s=e.event,r=s.data.that,a=(0,f.eventData)(s),l=!!r._columnsResizerViewController&&r._columnsResizerViewController.isResizing(),d=r._dragOptions;if(r._isDragging&&!l){var u=r.element();n=Math.abs(a.x-d.columnElement.offset().left-d.deltaX),o=Math.abs(a.y-d.columnElement.offset().top-d.deltaY),(u.is(":visible")||n>5||o>5)&&(u.show(),t=a.x-d.deltaX,i=a.y-d.deltaY,u.css({left:t,top:i}),r.dockHeader(a)),s.preventDefault()}},dockHeader:function(e){var t,i,n=this,s=this._getDraggingPanelByPos(e),r=this._controller,a=this._dropOptions,l=this._dragOptions;if(s){var d=this.option("rtlEnabled"),u="columnChooser"===s.getName(),c=u?"y":"x",h=s.getName(),g="headers"===h?l.rowIndex:void 0,f=l.sourceColumn,_=s.getColumnElements(g,f&&f.ownerBand)||[],p=l.pointsByTarget=l.pointsByTarget||{},w="columnChooser"===h?[]:p[h]||r._generatePointsByColumns((0,m.extend)({},l,{targetDraggingPanel:s,columns:s.getColumns(g),columnElements:_,isVerticalOrientation:u,startColumnIndex:"headers"===h&&(0,o.default)(_[0]).index()}));if(p[h]=w,a.targetLocation=h,w.length>0){for(t=0;t<w.length;t++)if(void 0===(i=w[t+1]&&(w[t][c]+w[t+1][c])/2)||(d&&"x"===c?e[c]>i:e[c]<i)){a.targetColumnIndex=this._getVisibleIndexObject(g,w[t].columnIndex),_[t]?(a.targetColumnElement=_.eq(t),a.isLast=!1):(a.targetColumnElement=_.last(),a.isLast=!0),a.posX=w[t].x,a.posY=w[t].y,r.dock(a);break}}else this._resetTargetColumnOptions(),r.dock(a)}},dropHeader:function(e){var t,i=e.event.data.that,n=i._controller;i.element().hide(),n&&i._isDragging&&n.drop(i._dropOptions),i.element().appendTo(i._parentElement()),i._dragOptions=null,i._dropOptions=null,i._isDragging=!1,r.default.getDocument().onselectstart=i._onSelectStart||null}}),J=function(e){return"widget"!==e.option("columnResizingMode")},K=v.default.ViewController.inherit({_isHeadersRowArea:function(e){if(this._columnHeadersView){var t,i,n=this._columnHeadersView.element();if(n)return i=n.offset().top,t=this._columnHeadersView.getHeadersRowHeight(),e>=i&&e<=i+t}return!1},_pointCreated:function(e,t,i){var n,o,s=J(this),r=this.option("rtlEnabled"),a=!s&&r?0:1;return!(e.index>=a&&e.index<t+(s||r?0:1))||(e.columnIndex-=a,n=i[e.columnIndex]||{},o=i[e.columnIndex+1]||{},!(s?n.allowResizing&&o.allowResizing:n.allowResizing))},_getTargetPoint:function(e,t,i){if(e)for(var n=0;n<e.length;n++)if((e[n].x!==e[0].x||!e[n+1]||e[n].x!==e[n+1].x)&&e[n].x-i<=t&&t<=e[n].x+i)return e[n];return null},_moveSeparator:function(e){var t=e.event,i=t.data,n=i._columnsSeparatorView.width(),o=J(i),s=n/2,r=i._$parentContainer.offset(),a=r.left,l=(0,f.eventData)(t);if(i._isResizing&&i._resizingInfo){if(a<=l.x&&(!o||l.x<=a+i._$parentContainer.width())&&i._updateColumnsWidthIfNeeded(l.x)){var d=i._columnHeadersView.getColumnElements().eq(i._resizingInfo.currentColumnIndex);i._columnsSeparatorView.moveByX(d.offset().left+(o&&i.option("rtlEnabled")?0:d.outerWidth())),i._tablePositionController.update(i._targetPoint.y),t.preventDefault()}}else i._isHeadersRowArea(l.y)?(i._previousParentOffset&&(i._previousParentOffset.left===r.left&&i._previousParentOffset.top===r.top||i.pointsByColumns(null)),i._targetPoint=i._getTargetPoint(i.pointsByColumns(),l.x,n),i._previousParentOffset=r,i._isReadyResizing=!1,i._targetPoint?(i._columnsSeparatorView.changeCursor("col-resize"),i._columnsSeparatorView.moveByX(i._targetPoint.x-s),i._tablePositionController.update(i._targetPoint.y),i._isReadyResizing=!0,t.preventDefault()):i._columnsSeparatorView.changeCursor()):(i.pointsByColumns(null),i._isReadyResizing=!1,i._columnsSeparatorView.changeCursor())},_endResizing:function(e){var t,i=e.event.data;if(i._isResizing){if(i.pointsByColumns(null),i._resizingInfo=null,i._columnsSeparatorView.hide(),i._columnsSeparatorView.changeCursor(),i._trackerView.hide(),!J(i)){var n=i.component.pageIndex();i.component.updateDimensions(),i.option("wordWrapEnabled")&&"virtual"===i.option("scrolling.mode")&&i.component.refresh().done((function(){i._rowsView.scrollToPage(n)}))}i._isReadyResizing=!1,i._isResizing=!1}},_getNextColumnIndex:function(e){return e+1},_setupResizingInfo:function(e){var t=this,i=this._targetPoint.columnIndex,n=this._getNextColumnIndex(i),o=this._columnHeadersView.getHeaderElement(i),s=this._columnHeadersView.getHeaderElement(n);this._resizingInfo={startPosX:e,currentColumnIndex:i,currentColumnWidth:o&&o.length>0?o[0].getBoundingClientRect().width:0,nextColumnIndex:n,nextColumnWidth:s&&s.length>0?s[0].getBoundingClientRect().width:0}},_startResizing:function(e){var t=e.event,i=t.data,n=(0,f.eventData)(t),o=i.getController("editing"),s=i.option("editing.mode"),r=o.isEditing()&&("batch"===s||"cell"===s);(0,f.isTouchEvent)(t)&&(i._isHeadersRowArea(n.y)?(i._targetPoint=i._getTargetPoint(i.pointsByColumns(),n.x,10),i._targetPoint&&(i._columnsSeparatorView.moveByX(i._targetPoint.x-i._columnsSeparatorView.width()/2),i._isReadyResizing=!0)):i._isReadyResizing=!1),i._isReadyResizing&&!r&&(i._setupResizingInfo(n.x),i._tablePositionController.update(i._targetPoint.y),i._columnsSeparatorView.show(),i._trackerView.show(),i._isResizing=!0,t.preventDefault(),t.stopPropagation())},_generatePointsByColumns:function(){var e=this,t=e._columnsController?e._columnsController.getVisibleColumns():[],i=e._columnHeadersView.getColumnElements(),n=[];i&&i.length>0&&(n=x.default.getPointsByColumns(i,(function(n){return e._pointCreated(n,i.length,t)}))),e._pointsByColumns=n},_unsubscribeFromEvents:function(){this._moveSeparatorHandler&&l.default.off(r.default.getDocument(),(0,f.addNamespace)(p.default.move,L),this._moveSeparatorHandler),this._startResizingHandler&&l.default.off(this._$parentContainer,(0,f.addNamespace)(p.default.down,L),this._startResizingHandler),this._endResizingHandler&&(l.default.off(this._columnsSeparatorView.element(),(0,f.addNamespace)(p.default.up,L),this._endResizingHandler),l.default.off(r.default.getDocument(),(0,f.addNamespace)(p.default.up,L),this._endResizingHandler))},_subscribeToEvents:function(){this._moveSeparatorHandler=this.createAction(this._moveSeparator),this._startResizingHandler=this.createAction(this._startResizing),this._endResizingHandler=this.createAction(this._endResizing),l.default.on(r.default.getDocument(),(0,f.addNamespace)(p.default.move,L),this,this._moveSeparatorHandler),l.default.on(this._$parentContainer,(0,f.addNamespace)(p.default.down,L),this,this._startResizingHandler),l.default.on(this._columnsSeparatorView.element(),(0,f.addNamespace)(p.default.up,L),this,this._endResizingHandler),l.default.on(r.default.getDocument(),(0,f.addNamespace)(p.default.up,L),this,this._endResizingHandler)},_updateColumnsWidthIfNeeded:function(e){var t,i,n,o,s,r,a=!1,l=this._resizingInfo,d=this._columnsController,u=d.getVisibleColumns(),c=this._columnsSeparatorView.width(),g=this._rowsView.contentWidth(),m=J(this),f=m&&this.option("adaptColumnWidthByRatio")&&!this.option("columnAutoWidth");function _(e){return h.default.isString(e)&&"%"===e.slice(-1)}function p(e,t,i,n){if(e){var o=e.width;o&&(n=_(o)),n?(e&&d.columnOption(e.index,"visibleWidth",t),e&&d.columnOption(e.index,"width",(t/i*100).toFixed(3)+"%")):(e&&d.columnOption(e.index,"visibleWidth",null),e&&d.columnOption(e.index,"width",t))}}function w(e,t){var i,n;return t.every((function(e){return e.width}))&&(i=t.reduce((function(e,t){return _(t.width)&&(e+=parseFloat(t.width)),e}),0))>100&&(e=e/i*100),e}if(t=e-l.startPosX,m&&this.option("rtlEnabled")&&(t=-t),a=(r=l.currentColumnWidth+t)>=(o=(n=u[l.currentColumnIndex])&&n.minWidth||c),m&&(i=l.nextColumnWidth-t,o=(s=u[l.nextColumnIndex])&&s.minWidth||c,a=a&&i>=o),a){if(d.beginUpdate(),p(n,r=Math.floor(r),g=w(g,u),f),m)p(s,i=Math.floor(i),g,f);else{var C=this._columnHeadersView.getColumnWidths(),b;if(C[l.currentColumnIndex]=r,!(C.reduce((function(e,t){return e+t}),0)>this._rowsView.contentWidth())){var v=x.default.getLastResizableColumnIndex(u);v>=0&&d.columnOption(u[v].index,"visibleWidth","auto")}for(var V=0;V<C.length;V++)u[V]&&u[V]!==n&&void 0===u[V].width&&d.columnOption(u[V].index,"width",C[V])}d.endUpdate()}return a},_subscribeToCallback:function(e,t){e.add(t),this._subscribesToCallbacks.push({callback:e,handler:t})},_unsubscribeFromCallbacks:function(){var e,t;for(e=0;e<this._subscribesToCallbacks.length;e++)(t=this._subscribesToCallbacks[e]).callback.remove(t.handler);this._subscribesToCallbacks=[]},_unsubscribes:function(){this._unsubscribeFromEvents(),this._unsubscribeFromCallbacks()},_init:function(){var e=this,t=function(){e._isResizing||e.pointsByColumns(null)},i=function(t){e._scrollLeft!==t.left&&(e._scrollLeft=t.left,e.pointsByColumns(null))};e._columnsSeparatorView=e.getView("columnsSeparatorView"),e._columnHeadersView=e.getView("columnHeadersView"),e._trackerView=e.getView("trackerView"),e._rowsView=e.getView("rowsView"),e._columnsController=e.getController("columns"),e._tablePositionController=e.getController("tablePosition"),e._$parentContainer=e._columnsSeparatorView.component.$element(),e._subscribeToCallback(e._columnHeadersView.renderCompleted,t),e._subscribeToCallback(e._columnHeadersView.resizeCompleted,t),e._subscribeToCallback(e._columnsSeparatorView.renderCompleted,(function(){e._unsubscribeFromEvents(),e._subscribeToEvents()})),e._subscribeToCallback(e._rowsView.renderCompleted,(function(){e._rowsView.scrollChanged.remove(i),e._rowsView.scrollChanged.add(i)}));var n=0!==e._rowsView.getScrollbarWidth(),o=0;e._subscribeToCallback(e.getController("tablePosition").positionChanged,(function(t){if(e._isResizing&&!e._rowsView.isResizing){var i=0!==e._rowsView.getScrollbarWidth();n!==i||o&&o!==t.height?(n=i,o=t.height,e.component.updateDimensions()):e._rowsView.updateFreeSpaceRowHeight()}o=t.height}))},optionChanged:function(e){this.callBase(e),"allowColumnResizing"===e.name&&(e.value?(this._init(),this._subscribeToEvents()):this._unsubscribes())},isResizing:function(){return this._isResizing},init:function(){this._subscribesToCallbacks=[],M(this)&&this._init()},pointsByColumns:function(e){if(void 0===e)return this._pointsByColumns||this._generatePointsByColumns(),this._pointsByColumns;this._pointsByColumns=e},dispose:function(){this._unsubscribes(),this.callBase()}}),Q=v.default.ViewController.inherit({update:function(e){var t=this,i={},n=this._columnHeadersView.element(),o=n&&n.offset(),s=o&&o.top||0,r=h.default.isDefined(e)?Math.abs(e-s):0,a=this._columnHeadersView?this._columnHeadersView.getHeight():0,l=this._rowsView?this._rowsView.height()-this._rowsView.getScrollbarWidth(!0):0;i.height=a+l-r,null!==e&&n&&n.length&&(i.top=n[0].offsetTop+r),this.positionChanged.fire(i)},init:function(){var e=this;e.callBase(),e._columnHeadersView=this.getView("columnHeadersView"),e._rowsView=this.getView("rowsView"),e._pagerView=this.getView("pagerView"),e._rowsView.resizeCompleted.add((function(){e.option("allowColumnResizing")&&e.update(null)}))},ctor:function(e){this.callBase(e),this.positionChanged=(0,u.default)()}}),Z=v.default.ViewController.inherit({_generatePointsByColumns:function(e){var t=this;return x.default.getPointsByColumns(e.columnElements,(function(i){return t._pointCreated(i,e.columns,e.targetDraggingPanel.getName(),e.sourceColumn)}),e.isVerticalOrientation,e.startColumnIndex)},_pointCreated:function(e,t,i,n){var o=t[e.columnIndex],s=t[e.columnIndex-1];switch(i){case"columnChooser":return!0;case"headers":return n&&!n.allowReordering||(!o||!o.allowReordering)&&(!s||!s.allowReordering);default:return 0===t.length}},_subscribeToEvents:function(e,t){var i=this;(0,g.each)(t,(function(n,s){if(s){var r,a,d,u=s.getRowCount?s.getRowCount():1,c=s.getName(),h=function(n,r){if(r){var d=(0,o.default)(r),u=a[n];s.allowDragging(u,c,t)&&(d.addClass(i.addWidgetPrefix("drag-action")),l.default.on(d,(0,f.addNamespace)(C.default.start,L),i.createAction((function(s){var r=s.event,a=(0,f.eventData)(r);e.dragHeader({deltaX:a.x-(0,o.default)(r.currentTarget).offset().left,deltaY:a.y-(0,o.default)(r.currentTarget).offset().top,sourceColumn:u,index:u.index,columnIndex:n,columnElement:d,sourceLocation:c,draggingPanels:t,rowIndex:i._columnsController.getRowIndex(u.index,!0)})}))),l.default.on(d,(0,f.addNamespace)(C.default.move,L),{that:e},i.createAction(e.moveHeader)),l.default.on(d,(0,f.addNamespace)(C.default.end,L),{that:e},i.createAction(e.dropHeader)))}};for(r=0;r<u;r++)(d=s.getColumnElements(r)||[]).length&&(a=s.getColumns(r)||[],(0,g.each)(d,h))}}))},_unsubscribeFromEvents:function(e,t){var i=this;(0,g.each)(t,(function(e,t){if(t){var n=t.getColumnElements()||[];(0,g.each)(n,(function(e,t){var n=(0,o.default)(t);l.default.off(n,(0,f.addNamespace)(C.default.start,L)),l.default.off(n,(0,f.addNamespace)(C.default.move,L)),l.default.off(n,(0,f.addNamespace)(C.default.end,L)),n.removeClass(i.addWidgetPrefix("drag-action"))}))}}))},_getSeparator:function(e){return"headers"===e?this._columnsSeparatorView:this._blockSeparatorView},hideSeparators:function(e){var t=this._blockSeparatorView,i=this._columnsSeparatorView;this._animationColumnIndex=null,t&&t.hide(),"block"!==e&&i&&i.hide()},init:function(){var e,t=this;t.callBase(),t._columnsController=t.getController("columns"),t._columnHeadersView=t.getView("columnHeadersView"),t._columnsSeparatorView=t.getView("columnsSeparatorView"),t._draggingHeaderView=t.getView("draggingHeaderView"),t._rowsView=t.getView("rowsView"),t._blockSeparatorView=t.getView("blockSeparatorView"),t._headerPanelView=t.getView("headerPanel"),t._columnChooserView=t.getView("columnChooserView"),e=function(){if(t._draggingHeaderView){var e=[t._columnChooserView,t._columnHeadersView,t._headerPanelView];t._unsubscribeFromEvents(t._draggingHeaderView,e),t._subscribeToEvents(t._draggingHeaderView,e)}},t._columnHeadersView.renderCompleted.add(e),t._headerPanelView&&t._headerPanelView.renderCompleted.add(e),t._columnChooserView&&t._columnChooserView.renderCompleted.add(e)},allowDrop:function(e){return this._columnsController.allowMoveColumn(e.sourceColumnIndex,e.targetColumnIndex,e.sourceLocation,e.targetLocation)},drag:function(e){var t=e.sourceIndex,i=e.sourceLocation,n=e.sourceColumnElement,o=this._columnHeadersView,s=this._rowsView;n&&(n.css({opacity:.5}),"headers"===i&&(o&&o.setRowsOpacity(t,.5),s&&s.setRowsOpacity(t,.5)))},dock:function(e){var t=this,i=h.default.isObject(e.targetColumnIndex)?e.targetColumnIndex.columnIndex:e.targetColumnIndex,n=e.sourceLocation,o=e.targetLocation,s=t._getSeparator(o),r=i>=0,a=function(){t._animationColumnIndex!==i&&(t.hideSeparators(),s.element()[e.isLast?"insertAfter":"insertBefore"](e.targetColumnElement),t._animationColumnIndex=i,s.show(o))};t._columnHeadersView.element().find(".dx-header-row").toggleClass(t.addWidgetPrefix("drop-highlight"),"headers"!==n&&"headers"===o&&!r),s&&(t.allowDrop(e)&&r?"group"===o||"columnChooser"===o?a():(t.hideSeparators("block"),t.getController("tablePosition").update(e.posY),s.moveByX(e.posX-s.width()),s.show()):t.hideSeparators())},drop:function(e){var t=e.sourceColumnElement;if(t&&(t.css({opacity:""}),this._columnHeadersView.setRowsOpacity(e.sourceIndex,""),this._rowsView.setRowsOpacity(e.sourceIndex,""),this._columnHeadersView.element().find(".dx-header-row").removeClass(this.addWidgetPrefix("drop-highlight"))),this.allowDrop(e)){var i=this._getSeparator(e.targetLocation);i&&i.hide(),this._columnsController.moveColumn(e.sourceColumnIndex,e.targetColumnIndex,e.sourceLocation,e.targetLocation)}},dispose:function(){this._draggingHeaderView&&this._unsubscribeFromEvents(this._draggingHeaderView,[this._columnChooserView,this._columnHeadersView,this._headerPanelView])}});i.exports={views:{columnsSeparatorView:j,blockSeparatorView:q,draggingHeaderView:G,trackerView:$},controllers:{draggingHeader:Z,tablePosition:Q,columnsResizer:K},extenders:{views:{rowsView:{_needUpdateRowHeight:function(e){var t=this.option("wordWrapEnabled"),i=this.getController("columnsResizer"),n=i.isResizing();return this.callBase.apply(this,arguments)||e>0&&t&&n}}}}}}
  
  