@pdftron/webviewer
Version:
[WebViewer](https://www.apryse.com/webviewer) is a powerful JavaScript Document SDK and UI Component Library that is a part of the [Apryse PDF SDK](https://www.apryse.com). It provides a slick, out-of-the-box responsive UI that interacts with the core lib
1 lines • 111 kB
JavaScript
(window.webpackJsonpWebViewerUI=window.webpackJsonpWebViewerUI||[]).push([[82],{1619:function(e,t,o){"use strict";(function(e){function i(t,o){var i,n,r,l=void 0!==(i=void 0!==o?o:"undefined"!=typeof window?window:"undefined"!=typeof self?self:e).document&&i.document.attachEvent;if(!l){var s=(r=i.requestAnimationFrame||i.mozRequestAnimationFrame||i.webkitRequestAnimationFrame||function(e){return i.setTimeout(e,20)},function(e){return r(e)}),a=(n=i.cancelAnimationFrame||i.mozCancelAnimationFrame||i.webkitCancelAnimationFrame||i.clearTimeout,function(e){return n(e)}),c=function(e){var t=e.__resizeTriggers__,o=t.firstElementChild,i=t.lastElementChild,n=o.firstElementChild;i.scrollLeft=i.scrollWidth,i.scrollTop=i.scrollHeight,n.style.width=o.offsetWidth+1+"px",n.style.height=o.offsetHeight+1+"px",o.scrollLeft=o.scrollWidth,o.scrollTop=o.scrollHeight},d=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;c(this),this.__resizeRAF__&&a(this.__resizeRAF__),this.__resizeRAF__=s((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(o){o.call(t,e)})))}))}},h=!1,u="",f="animationstart",p="Webkit Moz O ms".split(" "),g="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),v=i.document.createElement("fakeelement");if(void 0!==v.style.animationName&&(h=!0),!1===h)for(var _=0;_<p.length;_++)if(void 0!==v.style[p[_]+"AnimationName"]){u="-"+p[_].toLowerCase()+"-",f=g[_],h=!0;break}var m="resizeanim",S="@"+u+"keyframes "+m+" { from { opacity: 0; } to { opacity: 0; } } ",C=u+"animation: 1ms "+m+"; "}return{addResizeListener:function(e,o){if(l)e.attachEvent("onresize",o);else{if(!e.__resizeTriggers__){var n=e.ownerDocument,r=i.getComputedStyle(e);r&&"static"==r.position&&(e.style.position="relative"),function(e){if(!e.getElementById("detectElementResize")){var o=(S||"")+".resize-triggers { "+(C||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=e.head||e.getElementsByTagName("head")[0],n=e.createElement("style");n.id="detectElementResize",n.type="text/css",null!=t&&n.setAttribute("nonce",t),n.styleSheet?n.styleSheet.cssText=o:n.appendChild(e.createTextNode(o)),i.appendChild(n)}}(n),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=n.createElement("div")).className="resize-triggers";var s='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>';if(window.trustedTypes){var a=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return s}});e.__resizeTriggers__.innerHTML=a.createHTML("")}else e.__resizeTriggers__.innerHTML=s;e.appendChild(e.__resizeTriggers__),c(e),e.addEventListener("scroll",d,!0),f&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName==m&&c(e)},e.__resizeTriggers__.addEventListener(f,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(o)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",d,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(f,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}o.d(t,"a",(function(){return i}))}).call(this,o(124))},1646:function(e,t,o){"use strict";o.d(t,"a",(function(){return le})),o.d(t,"b",(function(){return se})),o.d(t,"c",(function(){return Te}));var i=o(471),n=o.n(i),r=o(472),l=o.n(r),s=o(1568),a=o.n(s),c=o(1567),d=o.n(c),h=o(1570),u=o.n(h),f=o(1566),p=o.n(f),g=o(229),v=o.n(g),_=o(0),m=o(1579),S=o(1573),C=o.n(S),w=o(625);function y(e){var t=e.cellCount,o=e.cellSize,i=e.computeMetadataCallback,n=e.computeMetadataCallbackProps,r=e.nextCellsCount,l=e.nextCellSize,s=e.nextScrollToIndex,a=e.scrollToIndex,c=e.updateScrollOffsetForScrollToIndex;t===r&&("number"!=typeof o&&"number"!=typeof l||o===l)||(i(n),a>=0&&a===s&&c())}var x=o(476),R=o.n(x),T=function(){function e(t){var o=t.cellCount,i=t.cellSizeGetter,r=t.estimatedCellSize;n()(this,e),v()(this,"_cellSizeAndPositionData",{}),v()(this,"_lastMeasuredIndex",-1),v()(this,"_lastBatchedIndex",-1),v()(this,"_cellCount",void 0),v()(this,"_cellSizeGetter",void 0),v()(this,"_estimatedCellSize",void 0),this._cellSizeGetter=i,this._cellCount=o,this._estimatedCellSize=r}return l()(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,o=e.estimatedCellSize,i=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=o,this._cellSizeGetter=i}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),o=t.offset+t.size,i=this._lastMeasuredIndex+1;i<=e;i++){var n=this._cellSizeGetter({index:i});if(void 0===n||isNaN(n))throw Error("Invalid size returned for cell ".concat(i," of value ").concat(n));null===n?(this._cellSizeAndPositionData[i]={offset:o,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[i]={offset:o,size:n},o+=n,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,o=void 0===t?"auto":t,i=e.containerSize,n=e.currentOffset,r=e.targetIndex;if(i<=0)return 0;var l,s=this.getSizeAndPositionOfCell(r),a=s.offset,c=a-i+s.size;switch(o){case"start":l=a;break;case"end":l=c;break;case"center":l=a-(i-s.size)/2;break;default:l=Math.max(c,Math.min(a,n))}var d=this.getTotalSize();return Math.max(0,Math.min(d-i,l))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,o=e.offset;if(0===this.getTotalSize())return{};var i=o+t,n=this._findNearestCell(o),r=this.getSizeAndPositionOfCell(n);o=r.offset+r.size;for(var l=n;o<i&&l<this._cellCount-1;)l++,o+=this.getSizeAndPositionOfCell(l).size;return{start:n,stop:l}}},{key:"resetCell",value:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)}},{key:"_binarySearch",value:function(e,t,o){for(;t<=e;){var i=t+Math.floor((e-t)/2),n=this.getSizeAndPositionOfCell(i).offset;if(n===o)return i;n<o?t=i+1:n>o&&(e=i-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var o=1;e<this._cellCount&&this.getSizeAndPositionOfCell(e).offset<t;)e+=o,o*=2;return this._binarySearch(Math.min(e,this._cellCount-1),Math.floor(e/2),t)}},{key:"_findNearestCell",value:function(e){if(isNaN(e))throw Error("Invalid offset ".concat(e," specified"));e=Math.max(0,e);var t=this.getSizeAndPositionOfLastMeasuredCell(),o=Math.max(0,this._lastMeasuredIndex);return t.offset>=e?this._binarySearch(o,0,e):this._exponentialSearch(o,e)}}]),e}(),z=function(){return"undefined"!=typeof window&&window.chrome?16777100:15e5},b=function(){function e(t){var o=t.maxScrollSize,i=void 0===o?z():o,r=R()(t,["maxScrollSize"]);n()(this,e),v()(this,"_cellSizeAndPositionManager",void 0),v()(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new T(r),this._maxScrollSize=i}return l()(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,o=e.offset,i=this._cellSizeAndPositionManager.getTotalSize(),n=this.getTotalSize(),r=this._getOffsetPercentage({containerSize:t,offset:o,totalSize:n});return Math.round(r*(n-i))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,o=void 0===t?"auto":t,i=e.containerSize,n=e.currentOffset,r=e.targetIndex;n=this._safeOffsetToOffset({containerSize:i,offset:n});var l=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:i,currentOffset:n,targetIndex:r});return this._offsetToSafeOffset({containerSize:i,offset:l})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,o=e.offset;return o=this._safeOffsetToOffset({containerSize:t,offset:o}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:o})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,o=e.offset,i=e.totalSize;return i<=t?0:o/(i-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,o=e.offset,i=this._cellSizeAndPositionManager.getTotalSize(),n=this.getTotalSize();if(i===n)return o;var r=this._getOffsetPercentage({containerSize:t,offset:o,totalSize:i});return Math.round(r*(n-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,o=e.offset,i=this._cellSizeAndPositionManager.getTotalSize(),n=this.getTotalSize();if(i===n)return o;var r=this._getOffsetPercentage({containerSize:t,offset:o,totalSize:n});return Math.round(r*(i-t))}}]),e}();function I(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(o){var i=o.callback,n=o.indices,r=Object.keys(n),l=!e||r.every((function(e){var t=n[e];return Array.isArray(t)?t.length>0:t>=0})),s=r.length!==Object.keys(t).length||r.some((function(e){var o=t[e],i=n[e];return Array.isArray(i)?o.join(",")!==i.join(","):o!==i}));t=n,l&&s&&i(n)}}function M(e){var t=e.cellSize,o=e.cellSizeAndPositionManager,i=e.previousCellsCount,n=e.previousCellSize,r=e.previousScrollToAlignment,l=e.previousScrollToIndex,s=e.previousSize,a=e.scrollOffset,c=e.scrollToAlignment,d=e.scrollToIndex,h=e.size,u=e.sizeJustIncreasedFromZero,f=e.updateScrollIndexCallback,p=o.getCellCount(),g=d>=0&&d<p;g&&(h!==s||u||!n||"number"==typeof t&&t!==n||c!==r||d!==l)?f(d):!g&&p>0&&(h<s||p<i)&&a>o.getTotalSize()-h&&f(p-1)}var k,P,O,L=o(1604),G=(k="undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).requestAnimationFrame||k.webkitRequestAnimationFrame||k.mozRequestAnimationFrame||k.oRequestAnimationFrame||k.msRequestAnimationFrame||function(e){return k.setTimeout(e,1e3/60)},H=k.cancelAnimationFrame||k.webkitCancelAnimationFrame||k.mozCancelAnimationFrame||k.oCancelAnimationFrame||k.msCancelAnimationFrame||function(e){k.clearTimeout(e)},A=G,W=H,E=function(e){return W(e.id)},D=function(e,t){var o;Promise.resolve().then((function(){o=Date.now()}));var i={id:A((function n(){Date.now()-o>=t?e.call():i.id=A(n)}))};return i};function F(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function j(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?F(o,!0).forEach((function(t){v()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):F(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var N="observed",U="requested",B=(O=P=function(e){function t(e){var o;n()(this,t),o=a()(this,d()(t).call(this,e)),v()(u()(o),"_onGridRenderedMemoizer",I()),v()(u()(o),"_onScrollMemoizer",I(!1)),v()(u()(o),"_deferredInvalidateColumnIndex",null),v()(u()(o),"_deferredInvalidateRowIndex",null),v()(u()(o),"_recomputeScrollLeftFlag",!1),v()(u()(o),"_recomputeScrollTopFlag",!1),v()(u()(o),"_horizontalScrollBarSize",0),v()(u()(o),"_verticalScrollBarSize",0),v()(u()(o),"_scrollbarPresenceChanged",!1),v()(u()(o),"_scrollingContainer",void 0),v()(u()(o),"_childrenToDisplay",void 0),v()(u()(o),"_columnStartIndex",void 0),v()(u()(o),"_columnStopIndex",void 0),v()(u()(o),"_rowStartIndex",void 0),v()(u()(o),"_rowStopIndex",void 0),v()(u()(o),"_renderedColumnStartIndex",0),v()(u()(o),"_renderedColumnStopIndex",0),v()(u()(o),"_renderedRowStartIndex",0),v()(u()(o),"_renderedRowStopIndex",0),v()(u()(o),"_initialScrollTop",void 0),v()(u()(o),"_initialScrollLeft",void 0),v()(u()(o),"_disablePointerEventsTimeoutId",void 0),v()(u()(o),"_styleCache",{}),v()(u()(o),"_cellCache",{}),v()(u()(o),"_debounceScrollEndedCallback",(function(){o._disablePointerEventsTimeoutId=null,o.setState({isScrolling:!1,needToResetStyleCache:!1})})),v()(u()(o),"_invokeOnGridRenderedHelper",(function(){var e=o.props.onSectionRendered;o._onGridRenderedMemoizer({callback:e,indices:{columnOverscanStartIndex:o._columnStartIndex,columnOverscanStopIndex:o._columnStopIndex,columnStartIndex:o._renderedColumnStartIndex,columnStopIndex:o._renderedColumnStopIndex,rowOverscanStartIndex:o._rowStartIndex,rowOverscanStopIndex:o._rowStopIndex,rowStartIndex:o._renderedRowStartIndex,rowStopIndex:o._renderedRowStopIndex}})})),v()(u()(o),"_setScrollingContainerRef",(function(e){o._scrollingContainer=e})),v()(u()(o),"_onScroll",(function(e){e.target===o._scrollingContainer&&o.handleScrollEvent(e.target)}));var i=new b({cellCount:e.columnCount,cellSizeGetter:function(o){return t._wrapSizeGetter(e.columnWidth)(o)},estimatedCellSize:t._getEstimatedColumnSize(e)}),r=new b({cellCount:e.rowCount,cellSizeGetter:function(o){return t._wrapSizeGetter(e.rowHeight)(o)},estimatedCellSize:t._getEstimatedRowSize(e)});return o.state={instanceProps:{columnSizeAndPositionManager:i,rowSizeAndPositionManager:r,prevColumnWidth:e.columnWidth,prevRowHeight:e.rowHeight,prevColumnCount:e.columnCount,prevRowCount:e.rowCount,prevIsScrolling:!0===e.isScrolling,prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow,scrollbarSize:0,scrollbarSizeMeasured:!1},isScrolling:!1,scrollDirectionHorizontal:1,scrollDirectionVertical:1,scrollLeft:0,scrollTop:0,scrollPositionChangeReason:null,needToResetStyleCache:!1},e.scrollToRow>0&&(o._initialScrollTop=o._getCalculatedScrollTop(e,o.state)),e.scrollToColumn>0&&(o._initialScrollLeft=o._getCalculatedScrollLeft(e,o.state)),o}return p()(t,e),l()(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,o=void 0===t?this.props.scrollToAlignment:t,i=e.columnIndex,n=void 0===i?this.props.scrollToColumn:i,r=e.rowIndex,l=void 0===r?this.props.scrollToRow:r,s=j({},this.props,{scrollToAlignment:o,scrollToColumn:n,scrollToRow:l});return{scrollLeft:this._getCalculatedScrollLeft(s),scrollTop:this._getCalculatedScrollTop(s)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,o=void 0===t?0:t,i=e.scrollTop,n=void 0===i?0:i;if(!(n<0)){this._debounceScrollEnded();var r=this.props,l=r.autoHeight,s=r.autoWidth,a=r.height,c=r.width,d=this.state.instanceProps,h=d.scrollbarSize,u=d.rowSizeAndPositionManager.getTotalSize(),f=d.columnSizeAndPositionManager.getTotalSize(),p=Math.min(Math.max(0,f-c+h),o),g=Math.min(Math.max(0,u-a+h),n);if(this.state.scrollLeft!==p||this.state.scrollTop!==g){var v={isScrolling:!0,scrollDirectionHorizontal:p!==this.state.scrollLeft?p>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:g!==this.state.scrollTop?g>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:N};l||(v.scrollTop=g),s||(v.scrollLeft=p),v.needToResetStyleCache=!1,this.setState(v)}this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:g,totalColumnsWidth:f,totalRowsHeight:u})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,o=e.rowCount,i=this.state.instanceProps;i.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),i.rowSizeAndPositionManager.getSizeAndPositionOfCell(o-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,i=e.rowIndex,n=void 0===i?0:i,r=this.props,l=r.scrollToColumn,s=r.scrollToRow,a=this.state.instanceProps;a.columnSizeAndPositionManager.resetCell(o),a.rowSizeAndPositionManager.resetCell(n),this._recomputeScrollLeftFlag=l>=0&&(1===this.state.scrollDirectionHorizontal?o<=l:o>=l),this._recomputeScrollTopFlag=s>=0&&(1===this.state.scrollDirectionVertical?n<=s:n>=s),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,o=e.rowIndex,i=this.props.columnCount,n=this.props;i>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(j({},n,{scrollToColumn:t})),void 0!==o&&this._updateScrollTopForScrollToRow(j({},n,{scrollToRow:o}))}},{key:"componentDidMount",value:function(){var e=this.props,o=e.getScrollbarSize,i=e.height,n=e.scrollLeft,r=e.scrollToColumn,l=e.scrollTop,s=e.scrollToRow,a=e.width,c=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),c.scrollbarSizeMeasured||this.setState((function(e){var t=j({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=o(),t.instanceProps.scrollbarSizeMeasured=!0,t})),"number"==typeof n&&n>=0||"number"==typeof l&&l>=0){var d=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:n,scrollTop:l});d&&(d.needToResetStyleCache=!1,this.setState(d))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var h=i>0&&a>0;r>=0&&h&&this._updateScrollLeftForScrollToColumn(),s>=0&&h&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:n||0,scrollTop:l||0,totalColumnsWidth:c.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:c.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var o=this,i=this.props,n=i.autoHeight,r=i.autoWidth,l=i.columnCount,s=i.height,a=i.rowCount,c=i.scrollToAlignment,d=i.scrollToColumn,h=i.scrollToRow,u=i.width,f=this.state,p=f.scrollLeft,g=f.scrollPositionChangeReason,v=f.scrollTop,_=f.instanceProps;this._handleInvalidatedGridSize();var m=l>0&&0===e.columnCount||a>0&&0===e.rowCount;g===U&&(!r&&p>=0&&(p!==this._scrollingContainer.scrollLeft||m)&&(this._scrollingContainer.scrollLeft=p),!n&&v>=0&&(v!==this._scrollingContainer.scrollTop||m)&&(this._scrollingContainer.scrollTop=v));var S=(0===e.width||0===e.height)&&s>0&&u>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):M({cellSizeAndPositionManager:_.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:p,scrollToAlignment:c,scrollToIndex:d,size:u,sizeJustIncreasedFromZero:S,updateScrollIndexCallback:function(){return o._updateScrollLeftForScrollToColumn(o.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):M({cellSizeAndPositionManager:_.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:v,scrollToAlignment:c,scrollToIndex:h,size:s,sizeJustIncreasedFromZero:S,updateScrollIndexCallback:function(){return o._updateScrollTopForScrollToRow(o.props)}}),this._invokeOnGridRenderedHelper(),p!==t.scrollLeft||v!==t.scrollTop){var C=_.rowSizeAndPositionManager.getTotalSize(),w=_.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:v,totalColumnsWidth:w,totalRowsHeight:C})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&E(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,o=e.autoHeight,i=e.autoWidth,n=e.className,r=e.containerProps,l=e.containerRole,s=e.containerStyle,a=e.height,c=e.id,d=e.noContentRenderer,h=e.role,u=e.style,f=e.tabIndex,p=e.width,g=this.state,v=g.instanceProps,m=g.needToResetStyleCache,S=this._isScrolling(),y={boxSizing:"border-box",direction:"ltr",height:o?"auto":a,position:"relative",width:i?"auto":p,WebkitOverflowScrolling:"touch",willChange:"transform"};m&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var x=v.columnSizeAndPositionManager.getTotalSize(),R=v.rowSizeAndPositionManager.getTotalSize(),T=R>a?v.scrollbarSize:0,z=x>p?v.scrollbarSize:0;z===this._horizontalScrollBarSize&&T===this._verticalScrollBarSize||(this._horizontalScrollBarSize=z,this._verticalScrollBarSize=T,this._scrollbarPresenceChanged=!0),y.overflowX=x+T<=p?"hidden":"auto",y.overflowY=R+z<=a?"hidden":"auto";var b=this._childrenToDisplay,I=0===b.length&&a>0&&p>0;return _.createElement("div",C()({ref:this._setScrollingContainerRef},r,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:Object(w.default)("ReactVirtualized__Grid",n),id:c,onScroll:this._onScroll,role:h,style:j({},y,{},u),tabIndex:f}),b.length>0&&_.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:l,style:j({width:t?"auto":x,height:R,maxWidth:x,maxHeight:R,overflow:"hidden",pointerEvents:S?"none":"",position:"relative"},s)},b),I&&d())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,o=e.cellRenderer,i=e.cellRangeRenderer,n=e.columnCount,r=e.deferredMeasurementCache,l=e.height,s=e.overscanColumnCount,a=e.overscanIndicesGetter,c=e.overscanRowCount,d=e.rowCount,h=e.width,u=e.isScrollingOptOut,f=t.scrollDirectionHorizontal,p=t.scrollDirectionVertical,g=t.instanceProps,v=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,_=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,m=this._isScrolling(e,t);if(this._childrenToDisplay=[],l>0&&h>0){var S=g.columnSizeAndPositionManager.getVisibleCellRange({containerSize:h,offset:_}),C=g.rowSizeAndPositionManager.getVisibleCellRange({containerSize:l,offset:v}),w=g.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:h,offset:_}),y=g.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:l,offset:v});this._renderedColumnStartIndex=S.start,this._renderedColumnStopIndex=S.stop,this._renderedRowStartIndex=C.start,this._renderedRowStopIndex=C.stop;var x=a({direction:"horizontal",cellCount:n,overscanCellsCount:s,scrollDirection:f,startIndex:"number"==typeof S.start?S.start:0,stopIndex:"number"==typeof S.stop?S.stop:-1}),R=a({direction:"vertical",cellCount:d,overscanCellsCount:c,scrollDirection:p,startIndex:"number"==typeof C.start?C.start:0,stopIndex:"number"==typeof C.stop?C.stop:-1}),T=x.overscanStartIndex,z=x.overscanStopIndex,b=R.overscanStartIndex,I=R.overscanStopIndex;if(r){if(!r.hasFixedHeight())for(var M=b;M<=I;M++)if(!r.has(M,0)){T=0,z=n-1;break}if(!r.hasFixedWidth())for(var k=T;k<=z;k++)if(!r.has(0,k)){b=0,I=d-1;break}}this._childrenToDisplay=i({cellCache:this._cellCache,cellRenderer:o,columnSizeAndPositionManager:g.columnSizeAndPositionManager,columnStartIndex:T,columnStopIndex:z,deferredMeasurementCache:r,horizontalOffsetAdjustment:w,isScrolling:m,isScrollingOptOut:u,parent:this,rowSizeAndPositionManager:g.rowSizeAndPositionManager,rowStartIndex:b,rowStopIndex:I,scrollLeft:_,scrollTop:v,styleCache:this._styleCache,verticalOffsetAdjustment:y,visibleColumnIndices:S,visibleRowIndices:C}),this._columnStartIndex=T,this._columnStopIndex=z,this._rowStartIndex=b,this._rowStopIndex=I}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&E(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=D(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex&&"number"==typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,o=e.scrollLeft,i=e.scrollTop,n=e.totalColumnsWidth,r=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var o=e.scrollLeft,i=e.scrollTop,l=t.props,s=l.height;(0,l.onScroll)({clientHeight:s,clientWidth:l.width,scrollHeight:r,scrollLeft:o,scrollTop:i,scrollWidth:n})},indices:{scrollLeft:o,scrollTop:i}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(t.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var o=e.scrollLeft,i=e.scrollTop,n=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:o,scrollTop:i});n&&(n.needToResetStyleCache=!1,this.setState(n))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,o)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,i=t._getScrollLeftForScrollToColumnStateUpdate(e,o);i&&(i.needToResetStyleCache=!1,this.setState(i))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,o)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,o=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var i=this._rowStartIndex;i<=this._rowStopIndex;i++)for(var n=this._columnStartIndex;n<=this._columnStopIndex;n++){var r="".concat(i,"-").concat(n);this._styleCache[r]=e[r],o&&(this._cellCache[r]=t[r])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,i=t._getScrollTopForScrollToRowStateUpdate(e,o);i&&(i.needToResetStyleCache=!1,this.setState(i))}}],[{key:"getDerivedStateFromProps",value:function(e,o){var i={};0===e.columnCount&&0!==o.scrollLeft||0===e.rowCount&&0!==o.scrollTop?(i.scrollLeft=0,i.scrollTop=0):(e.scrollLeft!==o.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==o.scrollTop&&e.scrollToRow<0)&&Object.assign(i,t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var n,r,l=o.instanceProps;return i.needToResetStyleCache=!1,e.columnWidth===l.prevColumnWidth&&e.rowHeight===l.prevRowHeight||(i.needToResetStyleCache=!0),l.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),l.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==l.prevColumnCount&&0!==l.prevRowCount||(l.prevColumnCount=0,l.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===l.prevIsScrolling&&Object.assign(i,{isScrolling:!1}),y({cellCount:l.prevColumnCount,cellSize:"number"==typeof l.prevColumnWidth?l.prevColumnWidth:null,computeMetadataCallback:function(){return l.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"==typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:l.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){n=t._getScrollLeftForScrollToColumnStateUpdate(e,o)}}),y({cellCount:l.prevRowCount,cellSize:"number"==typeof l.prevRowHeight?l.prevRowHeight:null,computeMetadataCallback:function(){return l.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"==typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:l.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){r=t._getScrollTopForScrollToRowStateUpdate(e,o)}}),l.prevColumnCount=e.columnCount,l.prevColumnWidth=e.columnWidth,l.prevIsScrolling=!0===e.isScrolling,l.prevRowCount=e.rowCount,l.prevRowHeight=e.rowHeight,l.prevScrollToColumn=e.scrollToColumn,l.prevScrollToRow=e.scrollToRow,l.scrollbarSize=e.getScrollbarSize(),void 0===l.scrollbarSize?(l.scrollbarSizeMeasured=!1,l.scrollbarSize=0):l.scrollbarSizeMeasured=!0,i.instanceProps=l,j({},i,{},n,{},r)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"==typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"==typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,o=e.scrollLeft,i=e.scrollTop,n={scrollPositionChangeReason:U};return"number"==typeof o&&o>=0&&(n.scrollDirectionHorizontal=o>t.scrollLeft?1:-1,n.scrollLeft=o),"number"==typeof i&&i>=0&&(n.scrollDirectionVertical=i>t.scrollTop?1:-1,n.scrollTop=i),"number"==typeof o&&o>=0&&o!==t.scrollLeft||"number"==typeof i&&i>=0&&i!==t.scrollTop?n:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"==typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var o=e.columnCount,i=e.height,n=e.scrollToAlignment,r=e.scrollToColumn,l=e.width,s=t.scrollLeft,a=t.instanceProps;if(o>0){var c=o-1,d=r<0?c:Math.min(c,r),h=a.rowSizeAndPositionManager.getTotalSize(),u=a.scrollbarSizeMeasured&&h>i?a.scrollbarSize:0;return a.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:l-u,currentOffset:s,targetIndex:d})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,o){var i=o.scrollLeft,n=t._getCalculatedScrollLeft(e,o);return"number"==typeof n&&n>=0&&i!==n?t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:n,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var o=e.height,i=e.rowCount,n=e.scrollToAlignment,r=e.scrollToRow,l=e.width,s=t.scrollTop,a=t.instanceProps;if(i>0){var c=i-1,d=r<0?c:Math.min(c,r),h=a.columnSizeAndPositionManager.getTotalSize(),u=a.scrollbarSizeMeasured&&h>l?a.scrollbarSize:0;return a.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:o-u,currentOffset:s,targetIndex:d})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,o){var i=o.scrollTop,n=t._getCalculatedScrollTop(e,o);return"number"==typeof n&&n>=0&&i!==n?t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:-1,scrollTop:n}):{}}}]),t}(_.PureComponent),v()(P,"propTypes",null),O);v()(B,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,o=e.cellRenderer,i=e.columnSizeAndPositionManager,n=e.columnStartIndex,r=e.columnStopIndex,l=e.deferredMeasurementCache,s=e.horizontalOffsetAdjustment,a=e.isScrolling,c=e.isScrollingOptOut,d=e.parent,h=e.rowSizeAndPositionManager,u=e.rowStartIndex,f=e.rowStopIndex,p=e.styleCache,g=e.verticalOffsetAdjustment,v=e.visibleColumnIndices,_=e.visibleRowIndices,m=[],S=i.areOffsetsAdjusted()||h.areOffsetsAdjusted(),C=!a&&!S,w=u;w<=f;w++)for(var y=h.getSizeAndPositionOfCell(w),x=n;x<=r;x++){var R=i.getSizeAndPositionOfCell(x),T=x>=v.start&&x<=v.stop&&w>=_.start&&w<=_.stop,z="".concat(w,"-").concat(x),b=void 0;C&&p[z]?b=p[z]:l&&!l.has(w,x)?b={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(b={height:y.size,left:R.offset+s,position:"absolute",top:y.offset+g,width:R.size},p[z]=b);var I={columnIndex:x,isScrolling:a,isVisible:T,key:z,parent:d,rowIndex:w,style:b},M=void 0;!c&&!a||s||g?M=o(I):(t[z]||(t[z]=o(I)),M=t[z]),null!=M&&!1!==M&&m.push(M)}return m},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:L.default,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,o=e.overscanCellsCount,i=e.scrollDirection,n=e.startIndex,r=e.stopIndex;return 1===i?{overscanStartIndex:Math.max(0,n),overscanStopIndex:Math.min(t-1,r+o)}:{overscanStartIndex:Math.max(0,n-o),overscanStopIndex:Math.min(t-1,r)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),Object(m.polyfill)(B);var V=B;function q(e){var t=e.cellCount,o=e.overscanCellsCount,i=e.scrollDirection,n=e.startIndex,r=e.stopIndex;return o=Math.max(1,o),1===i?{overscanStartIndex:Math.max(0,n-1),overscanStopIndex:Math.min(t-1,r+o)}:{overscanStartIndex:Math.max(0,n-o),overscanStopIndex:Math.min(t-1,r+1)}}var K,X;function Y(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}var J=(X=K=function(e){function t(){var e,o;n()(this,t);for(var i=arguments.length,r=new Array(i),l=0;l<i;l++)r[l]=arguments[l];return o=a()(this,(e=d()(t)).call.apply(e,[this].concat(r))),v()(u()(o),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),v()(u()(o),"_columnStartIndex",0),v()(u()(o),"_columnStopIndex",0),v()(u()(o),"_rowStartIndex",0),v()(u()(o),"_rowStopIndex",0),v()(u()(o),"_onKeyDown",(function(e){var t=o.props,i=t.columnCount,n=t.disabled,r=t.mode,l=t.rowCount;if(!n){var s=o._getScrollState(),a=s.scrollToColumn,c=s.scrollToRow,d=o._getScrollState(),h=d.scrollToColumn,u=d.scrollToRow;switch(e.key){case"ArrowDown":u="cells"===r?Math.min(u+1,l-1):Math.min(o._rowStopIndex+1,l-1);break;case"ArrowLeft":h="cells"===r?Math.max(h-1,0):Math.max(o._columnStartIndex-1,0);break;case"ArrowRight":h="cells"===r?Math.min(h+1,i-1):Math.min(o._columnStopIndex+1,i-1);break;case"ArrowUp":u="cells"===r?Math.max(u-1,0):Math.max(o._rowStartIndex-1,0)}h===a&&u===c||(e.preventDefault(),o._updateScrollState({scrollToColumn:h,scrollToRow:u}))}})),v()(u()(o),"_onSectionRendered",(function(e){var t=e.columnStartIndex,i=e.columnStopIndex,n=e.rowStartIndex,r=e.rowStopIndex;o._columnStartIndex=t,o._columnStopIndex=i,o._rowStartIndex=n,o._rowStopIndex=r})),o}return p()(t,e),l()(t,[{key:"setScrollIndexes",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow;this.setState({scrollToRow:o,scrollToColumn:t})}},{key:"render",value:function(){var e=this.props,t=e.className,o=e.children,i=this._getScrollState(),n=i.scrollToColumn,r=i.scrollToRow;return _.createElement("div",{className:t,onKeyDown:this._onKeyDown},o({onSectionRendered:this._onSectionRendered,scrollToColumn:n,scrollToRow:r}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow,i=this.props,n=i.isControlled,r=i.onScrollToChange;"function"==typeof r&&r({scrollToColumn:t,scrollToRow:o}),n||this.setState({scrollToColumn:t,scrollToRow:o})}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.isControlled?{}:e.scrollToColumn!==t.instanceProps.prevScrollToColumn||e.scrollToRow!==t.instanceProps.prevScrollToRow?function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Y(o,!0).forEach((function(t){v()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Y(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({},t,{scrollToColumn:e.scrollToColumn,scrollToRow:e.scrollToRow,instanceProps:{prevScrollToColumn:e.scrollToColumn,prevScrollToRow:e.scrollToRow}}):{}}}]),t}(_.PureComponent),v()(K,"propTypes",null),X);v()(J,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),Object(m.polyfill)(J);var Z,Q,$=o(1619);function ee(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function te(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ee(o,!0).forEach((function(t){v()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ee(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var oe=(Q=Z=function(e){function t(){var e,o;n()(this,t);for(var i=arguments.length,r=new Array(i),l=0;l<i;l++)r[l]=arguments[l];return o=a()(this,(e=d()(t)).call.apply(e,[this].concat(r))),v()(u()(o),"state",{height:o.props.defaultHeight||0,width:o.props.defaultWidth||0}),v()(u()(o),"_parentNode",void 0),v()(u()(o),"_autoSizer",void 0),v()(u()(o),"_window",void 0),v()(u()(o),"_detectElementResize",void 0),v()(u()(o),"_onResize",(function(){var e=o.props,t=e.disableHeight,i=e.disableWidth,n=e.onResize;if(o._parentNode){var r=o._parentNode.offsetHeight||0,l=o._parentNode.offsetWidth||0,s=(o._window||window).getComputedStyle(o._parentNode)||{},a=parseInt(s.paddingLeft,10)||0,c=parseInt(s.paddingRight,10)||0,d=parseInt(s.paddingTop,10)||0,h=parseInt(s.paddingBottom,10)||0,u=r-d-h,f=l-a-c;(!t&&o.state.height!==u||!i&&o.state.width!==f)&&(o.setState({height:r-d-h,width:l-a-c}),n({height:r,width:l}))}})),v()(u()(o),"_setRef",(function(e){o._autoSizer=e})),o}return p()(t,e),l()(t,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._window=this._autoSizer.parentNode.ownerDocument.defaultView,this._detectElementResize=Object($.a)(e,this._window),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.className,i=e.disableHeight,n=e.disableWidth,r=e.style,l=this.state,s=l.height,a=l.width,c={overflow:"visible"},d={};return i||(c.height=0,d.height=s),n||(c.width=0,d.width=a),_.createElement("div",{className:o,ref:this._setRef,style:te({},c,{},r)},t(d))}}]),t}(_.Component),v()(Z,"propTypes",null),Q);v()(oe,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var ie,ne,re=o(123),le=(ne=ie=function(e){function t(){var e,o;n()(this,t);for(var i=arguments.length,r=new Array(i),l=0;l<i;l++)r[l]=arguments[l];return o=a()(this,(e=d()(t)).call.apply(e,[this].concat(r))),v()(u()(o),"_child",void 0),v()(u()(o),"_measure",(function(){var e=o.props,t=e.cache,i=e.columnIndex,n=void 0===i?0:i,r=e.parent,l=e.rowIndex,s=void 0===l?o.props.index||0:l,a=o._getCellMeasurements(),c=a.height,d=a.width;c===t.getHeight(s,n)&&d===t.getWidth(s,n)||(t.set(s,n,d,c),r&&"function"==typeof r.recomputeGridSize&&r.recomputeGridSize({columnIndex:n,rowIndex:s}))})),v()(u()(o),"_registerChild",(function(e){!e||e instanceof Element||console.warn("CellMeasurer registerChild expects to be passed Element or null"),o._child=e,e&&o._maybeMeasureCell()})),o}return p()(t,e),l()(t,[{key:"componentDidMount",value:function(){this._maybeMeasureCell()}},{key:"componentDidUpdate",value:function(){this._maybeMeasureCell()}},{key:"render",value:function(){var e=this.props.children;return"function"==typeof e?e({measure:this._measure,registerChild:this._registerChild}):e}},{key:"_getCellMeasurements",value:function(){var e=this.props.cache,t=this._child||Object(re.findDOMNode)(this);if(t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){var o=t.style.width,i=t.style.height;e.hasFixedWidth()||(t.style.width="auto"),e.hasFixedHeight()||(t.style.height="auto");var n=Math.ceil(t.offsetHeight),r=Math.ceil(t.offsetWidth);return o&&(t.style.width=o),i&&(t.style.height=i),{height:n,width:r}}return{height:0,width:0}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,o=e.columnIndex,i=void 0===o?0:o,n=e.parent,r=e.rowIndex,l=void 0===r?this.props.index||0:r;if(!t.has(l,i)){var s=this._getCellMeasurements(),a=s.height,c=s.width;t.set(l,i,c,a),n&&"function"==typeof n.invalidateCellSizeAfterRender&&n.invalidateCellSizeAfterRender({columnIndex:i,rowIndex:l})}}}]),t}(_.PureComponent),v()(ie,"propTypes",null),ne);v()(le,"__internalCellMeasurerFlag",!1);var se=function(){function e(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n()(this,e),v()(this,"_cellHeightCache",{}),v()(this,"_cellWidthCache",{}),v()(this,"_columnWidthCache",{}),v()(this,"_rowHeightCache",{}),v()(this,"_defaultHeight",void 0),v()(this,"_defaultWidth",void 0),v()(this,"_minHeight",void 0),v()(this,"_minWidth",void 0),v()(this,"_keyMapper",void 0),v()(this,"_hasFixedHeight",void 0),v()(this,"_hasFixedWidth",void 0),v()(this,"_columnCount",0),v()(this,"_rowCount",0),v()(this,"columnWidth",(function(e){var o=e.index,i=t._keyMapper(0,o);return void 0!==t._columnWidthCache[i]?t._columnWidthCache[i]:t._defaultWidth})),v()(this,"rowHeight",(function(e){var o=e.index,i=t._keyMapper(o,0);return void 0!==t._rowHeightCache[i]?t._rowHeightCache[i]:t._defaultHeight}));var i=o.defaultHeight,r=o.defaultWidth,l=o.fixedHeight,s=o.fixedWidth,a=o.keyMapper,c=o.minHeight,d=o.minWidth;this._hasFixedHeight=!0===l,this._hasFixedWidth=!0===s,this._minHeight=c||0,this._minWidth=d||0,this._keyMapper=a||ae,this._defaultHeight=Math.max(this._minHeight,"number"==typeof i?i:30),this._defaultWidth=Math.max(this._minWidth,"number"==typeof r?r:100)}return l()(e,[{key:"clear",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this._keyMapper(e,t);delete this._cellHeightCache[o],delete this._cellWidthCache[o],this._updateCachedColumnAndRowSizes(e,t)}},{key:"clearAll",value:function(){this._cellHeightCache={},this._cellWidthCache={},this._columnWidthCache={},this._rowHeightCache={},this._rowCount=0,this._columnCount=0}},{key:"hasFixedHeight",value:function(){return this._hasFixedHeight}},{key:"hasFixedWidth",value:function(){return this._hasFixedWidth}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedHeight)return this._defaultHeight;var o=this._keyMapper(e,t);return void 0!==this._cellHeightCache[o]?Math.max(this._minHeight,this._cellHeightCache[o]):this._defaultHeight}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedWidth)return this._defaultWidth;var o=this._keyMapper(e,t);return void 0!==this._cellWidthCache[o]?Math.max(this._minWidth,this._cellWidthCache[o]):this._defaultWidth}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=this._keyMapper(e,t);return void 0!==this._cellHeightCache[o]}},{key:"set",value:function(e,t,o,i){var n=this._keyMapper(e,t);t>=this._columnCount&&(this._columnCount=t+1),e>=this._rowCount&&(this._rowCount=e+1),this._cellHeightCache[n]=i,this._cellWidthCache[n]=o,this._updateCachedColumnAndRowSizes(e,t)}},{key:"_updateCachedColumnAndRowSizes",value:function(e,t){if(!this._hasFixedWidth){for(var o=0,i=0;i<this._rowCount;i++)o=Math.max(o,this.getWidth(i,t));var n=this._keyMapper(0,t);this._columnWidthCache[n]=o}if(!this._hasFixedHeight){for(var r=0,l=0;l<this._columnCount;l++)r=Math.max(r,this.getHeight(e,l));var s=this._keyMapper(e,0);this._rowHeightCache[s]=r}}},{key:"defaultHeight",get:function(){return this._defaultHeight}},{key:"defaultWidth",get:function(){return this._defaultWidth}}]),e}();function ae(e,t){return"".concat(e,"-").concat(t)}function ce(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,i)}return o}function de(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ce(o,!0).forEach((function(t){v()(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):ce(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var he="observed",ue="requested",fe=function(e){function t(){var e,o;n()(this,t);for(var i=arguments.length,r=new Array(i),l=0;l<i;l++)r[l]=arguments[l];return o=a()(this,(e=d()(t)).call.apply(e,[this].concat(r))),v()(u()(o),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),v()(u()(o),"_calculateSizeAndPositionDataOnNextUpdate",!1),v()(u()(o),"_onSectionRenderedMemoizer",I()),v()(u()(o),"_onScrollMemoizer",I(!1)),v()(u()(o),"_invokeOnSectionRenderedHelper",(function(){var e=o.props,t=e.cellLayoutManager,i=e.onSectionRendered;o._onSectionRenderedMemoizer({callback:i,indices:{indices:t.getLastRenderedIndices()}})})),v()(u()(o),"_setScrollingContainerRef",(function(e){o._scrollingContainer=e})),v()(u()(o),"_updateScrollPositionForScrollToCell",(function(){var e=o.props,t=e.cellLayoutManager,i=e.height,n=e.scrollToAlignment,r=e.scrollToCell,l=e.width,s=o.state,a=s.scrollLeft,c=s.scrollTop;if(r>=0){var d=t.getScrollPositionForCell({align:n,cellIndex:r,height:i,scrollLeft:a,scrollTop:c,width:l});d.scrollLeft===a&&d.scrollTop===c||o._setScrollPosition(d)}})),v()(u()(o),"_onScroll",(function(e){if(e.target===o._scrollingContainer){o._enablePointerEventsAfterDelay();var t=o.props,i=t.cellLayoutManager,n=t.height,r=t.isScrollingChange,l=t.width,s=o._scrollbarSize,a=i.getTotalSize(),c=a.height,d=a.width,h=Math.max(0,Math.min(d-l+s,e.target.scrollLeft)),u=Math.max(0,Math.min(c-n+s,e.target.scrollTop));if(o.state.scrollLeft!==h||o.state.scrollTop!==u){var f=e.cancelable?he:ue;o.state.isScrolling||r(!0),o.setState({isScrolling:!0,scrollLeft:h,scrollPositionChangeReason:f,scrollTop:u})}o._invokeOnScrollMemoizer({scrollLeft:h,scrollTop:u,totalWidth:d,totalHeight:c})}})),o._scrollbarSize=Object(L.default)(),void 0===o._scrollbarSize?(o._scrollbarSizeMeasured=!1,o._scrollbarSize=0):o._scrollbarSizeMeasured=!0,o}return p()(t,e),l()(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,o=e.scrollLeft,i=e.scrollToCell,n=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=Object(L.default)(),this._scrollbarSizeMeasured=!0,this.setState({})),i>=0?this._updateScrollPositionForScrollToCell():(o>=0||n>=0)&&this._setScrollPosition({scrollLeft:o,scrollTop:n}),this._invokeOnSectionRenderedHelper();var r=t.getTotalSize(),