@gitkraken/gitkraken-components 13.0.0-vnext.34 → 13.0.0-vnext.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ The above lifecycles should be removed. Learn more about this warning here:
|
|
|
11
11
|
https://fb.me/react-async-component-lifecycle-hooks`);if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=eB,t.componentWillReceiveProps=eZ),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=eU;var n=t.componentDidUpdate;t.componentDidUpdate=function(e,t,o){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:o;n.call(this,e,t,r)}}return e}function eV(){return(eV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)({}).hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e}).apply(null,arguments)}eB.__suppressDeprecationWarning=!0,eZ.__suppressDeprecationWarning=!0,eU.__suppressDeprecationWarning=!0;let e$=function(){for(var e,t,o=0,r="";o<arguments.length;)(e=arguments[o++])&&(t=function e(t){var o,r,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(o=0;o<t.length;o++)t[o]&&(r=e(t[o]))&&(i&&(i+=" "),i+=r);else for(o in t)t[o]&&(i&&(i+=" "),i+=o);return i}(e))&&(r&&(r+=" "),r+=t);return r};function eY(e){var t=e.cellCount,o=e.cellSize,r=e.computeMetadataCallback,i=e.computeMetadataCallbackProps,n=e.nextCellsCount,s=e.nextCellSize,a=e.nextScrollToIndex,l=e.scrollToIndex,h=e.updateScrollOffsetForScrollToIndex;(t!==n||("number"==typeof o||"number"==typeof s)&&o!==s)&&(r(i),l>=0&&l===a&&h())}function eK(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;o[r]=e[r]}return o}function eq(e,t){if(null==e)return{};var o,r,i=eK(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],-1===t.indexOf(o)&&({}).propertyIsEnumerable.call(e,o)&&(i[o]=e[o])}return i}var eX=function(){function e(t){var o=t.cellCount,r=t.cellSizeGetter,i=t.estimatedCellSize;ex(this,e),eP(this,"_cellSizeAndPositionData",{}),eP(this,"_lastMeasuredIndex",-1),eP(this,"_lastBatchedIndex",-1),eP(this,"_cellCount",void 0),eP(this,"_cellSizeGetter",void 0),eP(this,"_estimatedCellSize",void 0),this._cellSizeGetter=r,this._cellCount=o,this._estimatedCellSize=i}return eG(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,o=e.estimatedCellSize,r=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=o,this._cellSizeGetter=r}},{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,r=this._lastMeasuredIndex+1;r<=e;r++){var i=this._cellSizeGetter({index:r});if(void 0===i||isNaN(i))throw Error("Invalid size returned for cell ".concat(r," of value ").concat(i));null===i?(this._cellSizeAndPositionData[r]={offset:o,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[r]={offset:o,size:i},o+=i,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,o=e.align,r=e.containerSize,i=e.currentOffset,n=e.targetIndex;if(r<=0)return 0;var s=this.getSizeAndPositionOfCell(n),a=s.offset,l=a-r+s.size;switch(void 0===o?"auto":o){case"start":t=a;break;case"end":t=l;break;case"center":t=a-(r-s.size)/2;break;default:t=Math.max(l,Math.min(a,i))}return Math.max(0,Math.min(this.getTotalSize()-r,t))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,o=e.offset;if(0===this.getTotalSize())return{};var r=o+t,i=this._findNearestCell(o),n=this.getSizeAndPositionOfCell(i);o=n.offset+n.size;for(var s=i;o<r&&s<this._cellCount-1;)s++,o+=this.getSizeAndPositionOfCell(s).size;return{start:i,stop:s}}},{key:"resetCell",value:function(e){this._lastMeasuredIndex=Math.min(this._lastMeasuredIndex,e-1)}},{key:"_binarySearch",value:function(e,t,o){for(;t<=e;){var r=t+Math.floor((e-t)/2),i=this.getSizeAndPositionOfCell(r).offset;if(i===o)return r;i<o?t=r+1:i>o&&(e=r-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}(),eQ=function(){function e(t){var o=t.maxScrollSize,r=void 0===o?"u">typeof window&&window.chrome?0xffff8c:15e5:o,i=eq(t,["maxScrollSize"]);ex(this,e),eP(this,"_cellSizeAndPositionManager",void 0),eP(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new eX(i),this._maxScrollSize=r}return eG(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,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();return Math.round(this._getOffsetPercentage({containerSize:t,offset:o,totalSize:i})*(i-r))}},{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=e.containerSize,r=e.currentOffset,i=e.targetIndex;r=this._safeOffsetToOffset({containerSize:o,offset:r});var n=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:void 0===t?"auto":t,containerSize:o,currentOffset:r,targetIndex:i});return this._offsetToSafeOffset({containerSize:o,offset:n})}},{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,r=e.totalSize;return r<=t?0:o/(r-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,o=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();return r===i?o:Math.round(this._getOffsetPercentage({containerSize:t,offset:o,totalSize:r})*(i-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,o=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();return r===i?o:Math.round(this._getOffsetPercentage({containerSize:t,offset:o,totalSize:i})*(r-t))}}]),e}();function eJ(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t={};return function(o){var r=o.callback,i=o.indices,n=Object.keys(i),s=!e||n.every(function(e){var t=i[e];return Array.isArray(t)?t.length>0:t>=0}),a=n.length!==Object.keys(t).length||n.some(function(e){var o=t[e],r=i[e];return Array.isArray(r)?o.join(",")!==r.join(","):o!==r});t=i,s&&a&&r(i)}}function e0(e){var t=e.cellSize,o=e.cellSizeAndPositionManager,r=e.previousCellsCount,i=e.previousCellSize,n=e.previousScrollToAlignment,s=e.previousScrollToIndex,a=e.previousSize,l=e.scrollOffset,h=e.scrollToAlignment,c=e.scrollToIndex,d=e.size,u=e.sizeJustIncreasedFromZero,p=e.updateScrollIndexCallback,f=o.getCellCount(),m=c>=0&&c<f;m&&(d!==a||u||!i||"number"==typeof t&&t!==i||h!==n||c!==s)?p(c):!m&&f>0&&(d<a||f<r)&&l>o.getTotalSize()-d&&p(f-1)}let e1=!!("u">typeof window&&window.document&&window.document.createElement);function e2(e){if((!f&&0!==f||e)&&e1){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),f=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return f}var e5=(m="u">typeof window?window:"u">typeof self?self:{}).requestAnimationFrame||m.webkitRequestAnimationFrame||m.mozRequestAnimationFrame||m.oRequestAnimationFrame||m.msRequestAnimationFrame||function(e){return m.setTimeout(e,1e3/60)},e3=m.cancelAnimationFrame||m.webkitCancelAnimationFrame||m.mozCancelAnimationFrame||m.oCancelAnimationFrame||m.msCancelAnimationFrame||function(e){m.clearTimeout(e)},e6=function(e){return e3(e.id)},e4=function(e,t){Promise.resolve().then(function(){o=Date.now()});var o,r={id:e5(function i(){Date.now()-o>=t?e.call():r.id=e5(i)})};return r};function e9(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function e7(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?e9(o,!0).forEach(function(t){eP(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):e9(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var e8="requested",te=(_=g=function(e){function t(e){var o;return ex(this,t),eP(ek(o=eW(this,ez(t).call(this,e))),"_onGridRenderedMemoizer",eJ()),eP(ek(o),"_onScrollMemoizer",eJ(!1)),eP(ek(o),"_deferredInvalidateColumnIndex",null),eP(ek(o),"_deferredInvalidateRowIndex",null),eP(ek(o),"_recomputeScrollLeftFlag",!1),eP(ek(o),"_recomputeScrollTopFlag",!1),eP(ek(o),"_horizontalScrollBarSize",0),eP(ek(o),"_verticalScrollBarSize",0),eP(ek(o),"_scrollbarPresenceChanged",!1),eP(ek(o),"_scrollingContainer",void 0),eP(ek(o),"_childrenToDisplay",void 0),eP(ek(o),"_columnStartIndex",void 0),eP(ek(o),"_columnStopIndex",void 0),eP(ek(o),"_rowStartIndex",void 0),eP(ek(o),"_rowStopIndex",void 0),eP(ek(o),"_renderedColumnStartIndex",0),eP(ek(o),"_renderedColumnStopIndex",0),eP(ek(o),"_renderedRowStartIndex",0),eP(ek(o),"_renderedRowStopIndex",0),eP(ek(o),"_initialScrollTop",void 0),eP(ek(o),"_initialScrollLeft",void 0),eP(ek(o),"_disablePointerEventsTimeoutId",void 0),eP(ek(o),"_styleCache",{}),eP(ek(o),"_cellCache",{}),eP(ek(o),"_debounceScrollEndedCallback",function(){o._disablePointerEventsTimeoutId=null,o.setState({isScrolling:!1,needToResetStyleCache:!1})}),eP(ek(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}})}),eP(ek(o),"_onWheel",function(e){var t=e.deltaX,r=e.deltaY;o.handleWheelEvent({deltaX:t,deltaY:r})}),eP(ek(o),"_setScrollingContainerRef",function(e){e&&(e.removeEventListener("wheel",o.preventDefault),e.addEventListener("wheel",o.preventDefault,{passive:!1})),o._scrollingContainer=e}),eP(ek(o),"_onScroll",function(e){e.target===o._scrollingContainer&&o.handleScrollEvent(e.target)}),o.state={instanceProps:{columnSizeAndPositionManager:new eQ({cellCount:e.columnCount,cellSizeGetter:function(o){return t._wrapSizeGetter(e.columnWidth)(o)},estimatedCellSize:t._getEstimatedColumnSize(e)}),rowSizeAndPositionManager:new eQ({cellCount:e.rowCount,cellSizeGetter:function(o){return t._wrapSizeGetter(e.rowHeight)(o)},estimatedCellSize:t._getEstimatedRowSize(e)}),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 eF(t,e),eG(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,r=e.columnIndex,i=void 0===r?this.props.scrollToColumn:r,n=e.rowIndex,s=void 0===n?this.props.scrollToRow:n,a=e7({},this.props,{scrollToAlignment:o,scrollToColumn:i,scrollToRow:s});return{scrollLeft:this._getCalculatedScrollLeft(a),scrollTop:this._getCalculatedScrollTop(a)}}},{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=e.scrollTop,r=void 0===o?0:o;if(!(r<0)){this._debounceScrollEnded();var i=this.props,n=i.autoHeight,s=i.autoWidth,a=i.height,l=i.width,h=this.state.instanceProps,c=h.scrollbarSize,d=h.rowSizeAndPositionManager.getTotalSize(),u=h.columnSizeAndPositionManager.getTotalSize(),p=Math.min(Math.max(0,u-l+c),void 0===t?0:t),f=Math.min(Math.max(0,d-a+c),r);if(this.state.scrollLeft!==p||this.state.scrollTop!==f){var m={isScrolling:!0,scrollDirectionHorizontal:p!==this.state.scrollLeft?p>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:f!==this.state.scrollTop?f>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:"observed"};n||(m.scrollTop=f),s||(m.scrollLeft=p),m.needToResetStyleCache=!1,this.setState(m)}this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:f,totalColumnsWidth:u,totalRowsHeight:d})}}},{key:"preventDefault",value:function(e){e.preventDefault()}},{key:"handleWheelEvent",value:function(e){var t=e.deltaX,o=e.deltaY;this._debounceScrollEnded();var r=this.props,i=r.autoHeight,n=r.autoWidth,s=r.height,a=r.width,l=this.state.instanceProps.scrollbarSize,h=this.state.instanceProps.rowSizeAndPositionManager.getTotalSize(),c=this.state.instanceProps.columnSizeAndPositionManager.getTotalSize(),d=Math.min(Math.max(0,c-a+l),Math.max(0,this._scrollingContainer.scrollLeft+t)),u=Math.min(Math.max(0,h-s+l),Math.max(0,this._scrollingContainer.scrollTop+o));if(this.state.scrollLeft!==d||this.state.scrollTop!==u){var p={isScrolling:!0,scrollDirectionHorizontal:d!==this.state.scrollLeft?d>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:u!==this.state.scrollTop?u>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:e8};i||(p.scrollTop=u),n||(p.scrollLeft=d),p.needToResetStyleCache=!1,this.setState(p)}this._invokeOnScrollMemoizer({scrollLeft:d,scrollTop:u,totalColumnsWidth:c,totalRowsHeight:h})}},{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,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),r.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,r=e.rowIndex,i=void 0===r?0:r,n=this.props,s=n.scrollToColumn,a=n.scrollToRow,l=this.state.instanceProps;l.columnSizeAndPositionManager.resetCell(o),l.rowSizeAndPositionManager.resetCell(i),this._recomputeScrollLeftFlag=s>=0&&(1===this.state.scrollDirectionHorizontal?o<=s:o>=s),this._recomputeScrollTopFlag=a>=0&&(1===this.state.scrollDirectionVertical?i<=a:i>=a),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,o=e.rowIndex,r=this.props,i=r.columnCount,n=r.onScrollToTargetCausedUpdate,s=this.state,a=s.scrollLeft,l=s.scrollTop,h=this.props,c=this.state,d=void 0,u=void 0;if(i>1&&void 0!==t){var p=this._updateScrollLeftForScrollToColumn(e7({},h,{scrollToColumn:t}),c,!0);p&&"number"==typeof p.scrollLeft&&p.scrollLeft>=0&&(d=p.scrollLeft)}if(void 0!==o){var f=this._updateScrollTopForScrollToRow(e7({},h,{scrollToRow:o}),c,!0);f&&"number"==typeof f.scrollTop&&f.scrollTop>=0&&(u=f.scrollTop)}if(n&&("number"==typeof d||"number"==typeof u)){var m="number"!=typeof d?d:a,g="number"!=typeof u?u:l;n({clientHeight:h.height,clientWidth:h.width,scrollHeight:this.getTotalRowsHeight(),scrollLeft:m,scrollTop:g,scrollWidth:this.getTotalColumnsWidth()})}}},{key:"componentDidMount",value:function(){var e=this.props,o=e.getScrollbarSize,r=e.height,i=e.scrollLeft,n=e.scrollToColumn,s=e.scrollTop,a=e.scrollToRow,l=e.width,h=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),h.scrollbarSizeMeasured||this.setState(function(e){var t=e7({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=o(),t.instanceProps.scrollbarSizeMeasured=!0,t}),"number"==typeof i&&i>=0||"number"==typeof s&&s>=0){var c=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:i,scrollTop:s});c&&(c.needToResetStyleCache=!1,this.setState(c))}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 d=r>0&&l>0;n>=0&&d&&this._updateScrollLeftForScrollToColumn(),a>=0&&d&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:i||0,scrollTop:s||0,totalColumnsWidth:h.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:h.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var o=this,r=this.props,i=r.autoHeight,n=r.autoWidth,s=r.columnCount,a=r.height,l=r.rowCount,h=r.scrollToAlignment,c=r.scrollToColumn,d=r.scrollToRow,u=r.width,p=this.state,f=p.scrollLeft,m=p.scrollPositionChangeReason,g=p.scrollTop,_=p.instanceProps;this._handleInvalidatedGridSize();var v=s>0&&0===e.columnCount||l>0&&0===e.rowCount;m===e8&&(!n&&f>=0&&(f!==this._scrollingContainer.scrollLeft||v)&&(this._scrollingContainer.scrollLeft=f),!i&&g>=0&&(g!==this._scrollingContainer.scrollTop||v)&&(this._scrollingContainer.scrollTop=g));var S=(0===e.width||0===e.height)&&a>0&&u>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):e0({cellSizeAndPositionManager:_.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:f,scrollToAlignment:h,scrollToIndex:c,size:u,sizeJustIncreasedFromZero:S,updateScrollIndexCallback:function(){return o._updateScrollLeftForScrollToColumn(o.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):e0({cellSizeAndPositionManager:_.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:g,scrollToAlignment:h,scrollToIndex:d,size:a,sizeJustIncreasedFromZero:S,updateScrollIndexCallback:function(){return o._updateScrollTopForScrollToRow(o.props)}}),this._invokeOnGridRenderedHelper(),f!==t.scrollLeft||g!==t.scrollTop){var R=_.rowSizeAndPositionManager.getTotalSize(),y=_.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:f,scrollTop:g,totalColumnsWidth:y,totalRowsHeight:R})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._scrollingContainer&&this._scrollingContainer.removeEventListener("wheel",this.preventDefault),this._disablePointerEventsTimeoutId&&e6(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,o=e.autoHeight,r=e.autoWidth,i=e.className,n=e.containerProps,s=e.containerRole,a=e.containerStyle,l=e.height,h=e.id,c=e.noContentRenderer,d=e.role,u=e.style,p=e.tabIndex,f=e.width,m=this.state,g=m.instanceProps,_=m.needToResetStyleCache,v=this._isScrolling(),S={boxSizing:"border-box",direction:"ltr",height:o?"auto":l,position:"relative",width:r?"auto":f,WebkitOverflowScrolling:"touch",willChange:"transform"};_&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var R=g.columnSizeAndPositionManager.getTotalSize(),y=g.rowSizeAndPositionManager.getTotalSize(),T=y>l?g.scrollbarSize:0,C=R>f?g.scrollbarSize:0;(C!==this._horizontalScrollBarSize||T!==this._verticalScrollBarSize)&&(this._horizontalScrollBarSize=C,this._verticalScrollBarSize=T,this._scrollbarPresenceChanged=!0),S.overflowX=R+T<=f?"hidden":"auto",S.overflowY=y+C<=l?"hidden":"auto";var w=this._childrenToDisplay,E=0===w.length&&l>0&&f>0;return A.createElement("div",eV({ref:this._setScrollingContainerRef},n,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:e$("ReactVirtualized__Grid",i),id:h,onScroll:this._onScroll,onWheel:this._onWheel,role:d,style:e7({},S,{},u),tabIndex:p}),w.length>0&&A.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:s,style:e7({width:t?"auto":R,height:y,maxWidth:R,maxHeight:y,overflow:"hidden",pointerEvents:v?"none":"",position:"relative"},a)},w),E&&c())}},{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,r=e.cellRangeRenderer,i=e.columnCount,n=e.deferredMeasurementCache,s=e.height,a=e.overscanColumnCount,l=e.overscanIndicesGetter,h=e.overscanRowCount,c=e.rowCount,d=e.width,u=e.isScrollingOptOut,p=t.scrollDirectionHorizontal,f=t.scrollDirectionVertical,m=t.instanceProps,g=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,_=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,v=this._isScrolling(e,t);if(this._childrenToDisplay=[],s>0&&d>0){var S=m.columnSizeAndPositionManager.getVisibleCellRange({containerSize:d,offset:_}),R=m.rowSizeAndPositionManager.getVisibleCellRange({containerSize:s,offset:g}),y=m.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:d,offset:_}),T=m.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:s,offset:g});this._renderedColumnStartIndex=S.start,this._renderedColumnStopIndex=S.stop,this._renderedRowStartIndex=R.start,this._renderedRowStopIndex=R.stop;var C=l({direction:"horizontal",cellCount:i,overscanCellsCount:a,scrollDirection:p,startIndex:"number"==typeof S.start?S.start:0,stopIndex:"number"==typeof S.stop?S.stop:-1}),w=l({direction:"vertical",cellCount:c,overscanCellsCount:h,scrollDirection:f,startIndex:"number"==typeof R.start?R.start:0,stopIndex:"number"==typeof R.stop?R.stop:-1}),E=C.overscanStartIndex,b=C.overscanStopIndex,I=w.overscanStartIndex,M=w.overscanStopIndex;if(n){if(!n.hasFixedHeight()){for(var O=I;O<=M;O++)if(!n.has(O,0)){E=0,b=i-1;break}}if(!n.hasFixedWidth()){for(var N=E;N<=b;N++)if(!n.has(0,N)){I=0,M=c-1;break}}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:o,columnSizeAndPositionManager:m.columnSizeAndPositionManager,columnStartIndex:E,columnStopIndex:b,deferredMeasurementCache:n,horizontalOffsetAdjustment:y,isScrolling:v,isScrollingOptOut:u,parent:this,rowSizeAndPositionManager:m.rowSizeAndPositionManager,rowStartIndex:I,rowStopIndex:M,scrollLeft:_,scrollTop:g,styleCache:this._styleCache,verticalOffsetAdjustment:T,visibleColumnIndices:S,visibleRowIndices:R}),this._columnStartIndex=E,this._columnStopIndex=b,this._rowStartIndex=I,this._rowStopIndex=M}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&e6(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=e4(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,r=e.scrollTop,i=e.totalColumnsWidth,n=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var o=e.scrollLeft,r=e.scrollTop,s=t.props,a=s.height;(0,s.onScroll)({clientHeight:a,clientWidth:s.width,scrollHeight:n,scrollLeft:o,scrollTop:r,scrollWidth:i})},indices:{scrollLeft:o,scrollTop:r}})}},{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")?!!e.isScrolling:!!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,r=e.scrollTop,i=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:o,scrollTop:r});i&&(i.needToResetStyleCache=!1,this.setState(i))}},{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,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t._getScrollLeftForScrollToColumnStateUpdate(e,o);if(i)return i.needToResetStyleCache=!1,this.setState(i),e.onScrollToTargetCausedUpdate&&!r&&e.onScrollToTargetCausedUpdate({clientHeight:e.height,clientWidth:e.width,scrollHeight:this.getTotalRowsHeight(),scrollLeft:i.scrollLeft,scrollTop:i.scrollTop,scrollWidth:this.getTotalColumnsWidth()}),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 r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var i=this._columnStartIndex;i<=this._columnStopIndex;i++){var n="".concat(r,"-").concat(i);this._styleCache[n]=e[n],o&&(this._cellCache[n]=t[n])}}},{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,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t._getScrollTopForScrollToRowStateUpdate(e,o);if(i)return i.needToResetStyleCache=!1,this.setState(i),e.onScrollToTargetCausedUpdate&&!r&&e.onScrollToTargetCausedUpdate({clientHeight:e.height,clientWidth:e.width,scrollHeight:this.getTotalRowsHeight(),scrollLeft:i.scrollLeft,scrollTop:i.scrollTop,scrollWidth:this.getTotalColumnsWidth()}),i}}],[{key:"getDerivedStateFromProps",value:function(e,o){var r,i,n={};0===e.columnCount&&0!==o.scrollLeft||0===e.rowCount&&0!==o.scrollTop?(n.scrollLeft=0,n.scrollTop=0):(e.scrollLeft!==o.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==o.scrollTop&&e.scrollToRow<0)&&Object.assign(n,t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var s=o.instanceProps;return n.needToResetStyleCache=!1,(e.columnWidth!==s.prevColumnWidth||e.rowHeight!==s.prevRowHeight)&&(n.needToResetStyleCache=!0),s.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),s.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),(0===s.prevColumnCount||0===s.prevRowCount)&&(s.prevColumnCount=0,s.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===s.prevIsScrolling&&Object.assign(n,{isScrolling:!1}),eY({cellCount:s.prevColumnCount,cellSize:"number"==typeof s.prevColumnWidth?s.prevColumnWidth:null,computeMetadataCallback:function(){return s.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"==typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:s.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){r=t._getScrollLeftForScrollToColumnStateUpdate(e,o)}}),eY({cellCount:s.prevRowCount,cellSize:"number"==typeof s.prevRowHeight?s.prevRowHeight:null,computeMetadataCallback:function(){return s.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"==typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:s.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollTopForScrollToRowStateUpdate(e,o)}}),s.prevColumnCount=e.columnCount,s.prevColumnWidth=e.columnWidth,s.prevIsScrolling=!0===e.isScrolling,s.prevRowCount=e.rowCount,s.prevRowHeight=e.rowHeight,s.prevScrollToColumn=e.scrollToColumn,s.prevScrollToRow=e.scrollToRow,s.scrollbarSize=e.getScrollbarSize(),void 0===s.scrollbarSize?(s.scrollbarSizeMeasured=!1,s.scrollbarSize=0):s.scrollbarSizeMeasured=!0,n.instanceProps=s,e7({},n,{},r,{},i)}},{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,r=e.scrollTop,i={scrollPositionChangeReason:e8};return("number"==typeof o&&o>=0&&(i.scrollDirectionHorizontal=o>t.scrollLeft?1:-1,i.scrollLeft=o),"number"==typeof r&&r>=0&&(i.scrollDirectionVertical=r>t.scrollTop?1:-1,i.scrollTop=r),"number"==typeof o&&o>=0&&o!==t.scrollLeft||"number"==typeof r&&r>=0&&r!==t.scrollTop)?i:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"==typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var o=e.columnCount,r=e.height,i=e.scrollToAlignment,n=e.scrollToColumn,s=e.width,a=t.scrollLeft,l=t.instanceProps;if(o>0){var h=o-1,c=n<0?h:Math.min(h,n),d=l.rowSizeAndPositionManager.getTotalSize(),u=l.scrollbarSizeMeasured&&d>r?l.scrollbarSize:0;return l.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:s-u,currentOffset:a,targetIndex:c})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,o){var r=o.scrollLeft,i=t._getCalculatedScrollLeft(e,o);return"number"==typeof i&&i>=0&&r!==i?t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:i,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var o=e.height,r=e.rowCount,i=e.scrollToAlignment,n=e.scrollToRow,s=e.width,a=t.scrollTop,l=t.instanceProps;if(r>0){var h=r-1,c=n<0?h:Math.min(h,n),d=l.columnSizeAndPositionManager.getTotalSize(),u=l.scrollbarSizeMeasured&&d>s?l.scrollbarSize:0;return l.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:o-u,currentOffset:a,targetIndex:c})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,o){var r=o.scrollTop,i=t._getCalculatedScrollTop(e,o);return"number"==typeof i&&i>=0&&r!==i?t._getScrollToPositionStateUpdate({prevState:o,scrollLeft:-1,scrollTop:i}):{}}}]),t}(A.PureComponent),eP(g,"propTypes",null),_);function tt(e){var t=e.cellCount,o=e.overscanCellsCount,r=e.scrollDirection,i=e.startIndex,n=e.stopIndex;return(o=Math.max(1,o),1===r)?{overscanStartIndex:Math.max(0,i-1),overscanStopIndex:Math.min(t-1,n+o)}:{overscanStartIndex:Math.max(0,i-o),overscanStopIndex:Math.min(t-1,n+1)}}function to(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}eP(te,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,o=e.cellRenderer,r=e.columnSizeAndPositionManager,i=e.columnStartIndex,n=e.columnStopIndex,s=e.deferredMeasurementCache,a=e.horizontalOffsetAdjustment,l=e.isScrolling,h=e.isScrollingOptOut,c=e.parent,d=e.rowSizeAndPositionManager,u=e.rowStartIndex,p=e.rowStopIndex,f=e.styleCache,m=e.verticalOffsetAdjustment,g=e.visibleColumnIndices,_=e.visibleRowIndices,v=[],S=r.areOffsetsAdjusted()||d.areOffsetsAdjusted(),R=!l&&!S,y=u;y<=p;y++)for(var T=d.getSizeAndPositionOfCell(y),C=i;C<=n;C++){var w=r.getSizeAndPositionOfCell(C),E=C>=g.start&&C<=g.stop&&y>=_.start&&y<=_.stop,b="".concat(y,"-").concat(C),I=void 0;R&&f[b]?I=f[b]:s&&!s.has(y,C)?I={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(I={height:T.size,left:w.offset+a,position:"absolute",top:T.offset+m,width:w.size},f[b]=I);var M={columnIndex:C,isScrolling:l,isVisible:E,key:b,parent:c,rowIndex:y,style:I},O=void 0;(h||l)&&!a&&!m?(t[b]||(t[b]=o(M)),O=t[b]):O=o(M),null!=O&&!1!==O&&v.push(O)}return v},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:e2,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,o=e.overscanCellsCount,r=e.scrollDirection,i=e.startIndex,n=e.stopIndex;return 1===r?{overscanStartIndex:Math.max(0,i),overscanStopIndex:Math.min(t-1,n+o)}:{overscanStartIndex:Math.max(0,i-o),overscanStopIndex:Math.min(t-1,n)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),ej(te);var tr=(S=v=function(e){function t(){ex(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return eP(ek(o=eW(this,(e=ez(t)).call.apply(e,[this].concat(i)))),"state",{scrollToColumn:0,scrollToRow:0,instanceProps:{prevScrollToColumn:0,prevScrollToRow:0}}),eP(ek(o),"_columnStartIndex",0),eP(ek(o),"_columnStopIndex",0),eP(ek(o),"_rowStartIndex",0),eP(ek(o),"_rowStopIndex",0),eP(ek(o),"_onKeyDown",function(e){var t=o.props,r=t.columnCount,i=t.disabled,n=t.mode,s=t.rowCount;if(!i){var a=o._getScrollState(),l=a.scrollToColumn,h=a.scrollToRow,c=o._getScrollState(),d=c.scrollToColumn,u=c.scrollToRow;switch(e.key){case"ArrowDown":u="cells"===n?Math.min(u+1,s-1):Math.min(o._rowStopIndex+1,s-1);break;case"ArrowLeft":d="cells"===n?Math.max(d-1,0):Math.max(o._columnStartIndex-1,0);break;case"ArrowRight":d="cells"===n?Math.min(d+1,r-1):Math.min(o._columnStopIndex+1,r-1);break;case"ArrowUp":u="cells"===n?Math.max(u-1,0):Math.max(o._rowStartIndex-1,0)}(d!==l||u!==h)&&(e.preventDefault(),o._updateScrollState({scrollToColumn:d,scrollToRow:u}))}}),eP(ek(o),"_onSectionRendered",function(e){var t=e.columnStartIndex,r=e.columnStopIndex,i=e.rowStartIndex,n=e.rowStopIndex;o._columnStartIndex=t,o._columnStopIndex=r,o._rowStartIndex=i,o._rowStopIndex=n}),o}return eF(t,e),eG(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,r=this._getScrollState(),i=r.scrollToColumn,n=r.scrollToRow;return A.createElement("div",{className:t,onKeyDown:this._onKeyDown},o({onSectionRendered:this._onSectionRendered,scrollToColumn:i,scrollToRow:n}))}},{key:"_getScrollState",value:function(){return this.props.isControlled?this.props:this.state}},{key:"_updateScrollState",value:function(e){var t=e.scrollToColumn,o=e.scrollToRow,r=this.props,i=r.isControlled,n=r.onScrollToChange;"function"==typeof n&&n({scrollToColumn:t,scrollToRow:o}),i||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?to(o,!0).forEach(function(t){eP(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):to(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}(A.PureComponent),eP(v,"propTypes",null),S);function ti(e,t){var o=void 0!==t?t:"u">typeof window?window:"u">typeof self?self:n.g,r=void 0!==o.document&&o.document.attachEvent;if(!r){var i,s,a=(i=o.requestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||function(e){return o.setTimeout(e,20)},function(e){return i(e)}),l=(s=o.cancelAnimationFrame||o.mozCancelAnimationFrame||o.webkitCancelAnimationFrame||o.clearTimeout,function(e){return s(e)}),h=function(e){var t=e.__resizeTriggers__,o=t.firstElementChild,r=t.lastElementChild,i=o.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=o.offsetWidth+1+"px",i.style.height=o.offsetHeight+1+"px",o.scrollLeft=o.scrollWidth,o.scrollTop=o.scrollHeight},c=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&0>e.target.className.indexOf("contract-trigger")&&0>e.target.className.indexOf("expand-trigger"))){var t=this;h(this),this.__resizeRAF__&&l(this.__resizeRAF__),this.__resizeRAF__=a(function(){(t.offsetWidth!=t.__resizeLast__.width||t.offsetHeight!=t.__resizeLast__.height)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(o){o.call(t,e)}))})}},d=!1,u="",p="animationstart",f="Webkit Moz O ms".split(" "),m="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),g=o.document.createElement("fakeelement");if(void 0!==g.style.animationName&&(d=!0),!1===d){for(var _=0;_<f.length;_++)if(void 0!==g.style[f[_]+"AnimationName"]){u="-"+f[_].toLowerCase()+"-",p=m[_],d=!0;break}}var v="resizeanim",S="@"+u+"keyframes "+v+" { from { opacity: 0; } to { opacity: 0; } } ",R=u+"animation: 1ms "+v+"; "}var y=function(t){if(!t.getElementById("detectElementResize")){var o=(S||"")+".resize-triggers { "+(R||"")+'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%; }',r=t.head||t.getElementsByTagName("head")[0],i=t.createElement("style");i.id="detectElementResize",i.type="text/css",null!=e&&i.setAttribute("nonce",e),i.styleSheet?i.styleSheet.cssText=o:i.appendChild(t.createTextNode(o)),r.appendChild(i)}};return{addResizeListener:function(e,t){if(r)e.attachEvent("onresize",t);else{if(!e.__resizeTriggers__){var i=e.ownerDocument,n=o.getComputedStyle(e);n&&"static"==n.position&&(e.style.position="relative"),y(i),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=i.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__),h(e),e.addEventListener("scroll",c,!0),p&&(e.__resizeTriggers__.__animationListener__=function(t){t.animationName==v&&h(e)},e.__resizeTriggers__.addEventListener(p,e.__resizeTriggers__.__animationListener__))}e.__resizeListeners__.push(t)}},removeResizeListener:function(e,t){if(r)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",c,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(p,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch{}}}}}function tn(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}eP(tr,"defaultProps",{disabled:!1,isControlled:!1,mode:"edges",scrollToColumn:0,scrollToRow:0}),ej(tr);var ts=(y=R=function(e){function t(){ex(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return eP(ek(o=eW(this,(e=ez(t)).call.apply(e,[this].concat(i)))),"state",{height:o.props.defaultHeight||0,width:o.props.defaultWidth||0}),eP(ek(o),"_parentNode",void 0),eP(ek(o),"_autoSizer",void 0),eP(ek(o),"_window",void 0),eP(ek(o),"_detectElementResize",void 0),eP(ek(o),"_onResize",function(){var e=o.props,t=e.disableHeight,r=e.disableWidth,i=e.onResize;if(o._parentNode){var n=o._parentNode.offsetHeight||0,s=o._parentNode.offsetWidth||0,a=(o._window||window).getComputedStyle(o._parentNode)||{},l=parseInt(a.paddingLeft,10)||0,h=parseInt(a.paddingRight,10)||0,c=parseInt(a.paddingTop,10)||0,d=parseInt(a.paddingBottom,10)||0,u=n-c-d,p=s-l-h;(t||o.state.height===u)&&(r||o.state.width===p)||(o.setState({height:n-c-d,width:s-l-h}),i({height:n,width:s}))}}),eP(ek(o),"_setRef",function(e){o._autoSizer=e}),o}return eF(t,e),eG(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=ti(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,r=e.disableHeight,i=e.disableWidth,n=e.style,s=this.state,a=s.height,l=s.width,h={overflow:"visible"},c={};return r||(h.height=0,c.height=a),i||(h.width=0,c.width=l),A.createElement("div",{className:o,ref:this._setRef,style:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?tn(o,!0).forEach(function(t){eP(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):tn(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},h,{},n)},t(c))}}]),t}(A.Component),eP(R,"propTypes",null),y);eP(ts,"defaultProps",{onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}});var ta=(C=T=function(e){function o(){ex(this,o);for(var e,t,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return eP(ek(t=eW(this,(e=ez(o)).call.apply(e,[this].concat(i)))),"_child",void 0),eP(ek(t),"_measure",function(){var e=t.props,o=e.cache,r=e.columnIndex,i=void 0===r?0:r,n=e.parent,s=e.rowIndex,a=void 0===s?t.props.index||0:s,l=t._getCellMeasurements(),h=l.height,c=l.width;(h!==o.getHeight(a,i)||c!==o.getWidth(a,i))&&(o.set(a,i,c,h),n&&"function"==typeof n.recomputeGridSize&&n.recomputeGridSize({columnIndex:i,rowIndex:a}))}),eP(ek(t),"_registerChild",function(e){e&&Element,t._child=e,e&&t._maybeMeasureCell()}),t}return eF(o,e),eG(o,[{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,o=this._child||t(this);if(!o||!o.ownerDocument||!o.ownerDocument.defaultView||!(o instanceof o.ownerDocument.defaultView.HTMLElement))return{height:0,width:0};var r=o.style.width,i=o.style.height;e.hasFixedWidth()||(o.style.width="auto"),e.hasFixedHeight()||(o.style.height="auto");var n=Math.ceil(o.offsetHeight),s=Math.ceil(o.offsetWidth);return r&&(o.style.width=r),i&&(o.style.height=i),{height:n,width:s}}},{key:"_maybeMeasureCell",value:function(){var e=this.props,t=e.cache,o=e.columnIndex,r=void 0===o?0:o,i=e.parent,n=e.rowIndex,s=void 0===n?this.props.index||0:n;if(!t.has(s,r)){var a=this._getCellMeasurements(),l=a.height,h=a.width;t.set(s,r,h,l),i&&"function"==typeof i.invalidateCellSizeAfterRender&&i.invalidateCellSizeAfterRender({columnIndex:r,rowIndex:s})}}}]),o}(A.PureComponent),eP(T,"propTypes",null),C);function tl(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}eP(ta,"__internalCellMeasurerFlag",!1);var th="requested",tc=function(e){function t(){ex(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return eP(ek(o=eW(this,(e=ez(t)).call.apply(e,[this].concat(i)))),"state",{isScrolling:!1,scrollLeft:0,scrollTop:0}),eP(ek(o),"_calculateSizeAndPositionDataOnNextUpdate",!1),eP(ek(o),"_onSectionRenderedMemoizer",eJ()),eP(ek(o),"_onScrollMemoizer",eJ(!1)),eP(ek(o),"_invokeOnSectionRenderedHelper",function(){var e=o.props,t=e.cellLayoutManager,r=e.onSectionRendered;o._onSectionRenderedMemoizer({callback:r,indices:{indices:t.getLastRenderedIndices()}})}),eP(ek(o),"_setScrollingContainerRef",function(e){o._scrollingContainer=e}),eP(ek(o),"_updateScrollPositionForScrollToCell",function(){var e=o.props,t=e.cellLayoutManager,r=e.height,i=e.scrollToAlignment,n=e.scrollToCell,s=e.width,a=o.state,l=a.scrollLeft,h=a.scrollTop;if(n>=0){var c=t.getScrollPositionForCell({align:i,cellIndex:n,height:r,scrollLeft:l,scrollTop:h,width:s});(c.scrollLeft!==l||c.scrollTop!==h)&&o._setScrollPosition(c)}}),eP(ek(o),"_onScroll",function(e){if(e.target===o._scrollingContainer){o._enablePointerEventsAfterDelay();var t=o.props,r=t.cellLayoutManager,i=t.height,n=t.isScrollingChange,s=t.width,a=o._scrollbarSize,l=r.getTotalSize(),h=l.height,c=l.width,d=Math.max(0,Math.min(c-s+a,e.target.scrollLeft)),u=Math.max(0,Math.min(h-i+a,e.target.scrollTop));if(o.state.scrollLeft!==d||o.state.scrollTop!==u){var p=e.cancelable?"observed":th;o.state.isScrolling||n(!0),o.setState({isScrolling:!0,scrollLeft:d,scrollPositionChangeReason:p,scrollTop:u})}o._invokeOnScrollMemoizer({scrollLeft:d,scrollTop:u,totalWidth:c,totalHeight:h})}}),o._scrollbarSize=e2(),void 0===o._scrollbarSize?(o._scrollbarSizeMeasured=!1,o._scrollbarSize=0):o._scrollbarSizeMeasured=!0,o}return eF(t,e),eG(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,o=e.scrollLeft,r=e.scrollToCell,i=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=e2(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(o>=0||i>=0)&&this._setScrollPosition({scrollLeft:o,scrollTop:i}),this._invokeOnSectionRenderedHelper();var n=t.getTotalSize(),s=n.height,a=n.width;this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:i||0,totalHeight:s,totalWidth:a})}},{key:"componentDidUpdate",value:function(e,t){var o=this.props,r=o.height,i=o.scrollToAlignment,n=o.scrollToCell,s=o.width,a=this.state,l=a.scrollLeft,h=a.scrollPositionChangeReason,c=a.scrollTop;h===th&&(l>=0&&l!==t.scrollLeft&&l!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=l),c>=0&&c!==t.scrollTop&&c!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=c)),(r!==e.height||i!==e.scrollToAlignment||n!==e.scrollToCell||s!==e.width)&&this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,o=e.cellCount,r=e.cellLayoutManager,i=e.className,n=e.height,s=e.horizontalOverscanSize,a=e.id,l=e.noContentRenderer,h=e.style,c=e.verticalOverscanSize,d=e.width,u=this.state,p=u.isScrolling,f=u.scrollLeft,m=u.scrollTop;(this._lastRenderedCellCount!==o||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=o,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var g=r.getTotalSize(),_=g.height,v=g.width,S=Math.max(0,f-s),R=Math.max(0,m-c),y=Math.min(v,f+d+s),T=Math.min(_,m+n+c),C=n>0&&d>0?r.cellRenderers({height:T-R,isScrolling:p,width:y-S,x:S,y:R}):[],w={boxSizing:"border-box",direction:"ltr",height:t?"auto":n,position:"relative",WebkitOverflowScrolling:"touch",width:d,willChange:"transform"},E=_>n?this._scrollbarSize:0,b=v>d?this._scrollbarSize:0;return w.overflowX=v+E<=d?"hidden":"auto",w.overflowY=_+b<=n?"hidden":"auto",A.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:e$("ReactVirtualized__Collection",i),id:a,onScroll:this._onScroll,role:"grid",style:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?tl(o,!0).forEach(function(t){eP(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):tl(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},w,{},h),tabIndex:0},o>0&&A.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:_,maxHeight:_,maxWidth:v,overflow:"hidden",pointerEvents:p?"none":"",width:v}},C),0===o&&l())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout(function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})},150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,o=e.scrollLeft,r=e.scrollTop,i=e.totalHeight,n=e.totalWidth;this._onScrollMemoizer({callback:function(e){var o=e.scrollLeft,r=e.scrollTop,s=t.props,a=s.height;(0,s.onScroll)({clientHeight:a,clientWidth:s.width,scrollHeight:i,scrollLeft:o,scrollTop:r,scrollWidth:n})},indices:{scrollLeft:o,scrollTop:r}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,o=e.scrollTop,r={scrollPositionChangeReason:th};t>=0&&(r.scrollLeft=t),o>=0&&(r.scrollTop=o),(t>=0&&t!==this.state.scrollLeft||o>=0&&o!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0===e.cellCount&&(0!==t.scrollLeft||0!==t.scrollTop)?{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:th}:e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop,scrollPositionChangeReason:th}:null}}]),t}(A.PureComponent);eP(tc,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),tc.propTypes={},ej(tc);var td=function(){function e(t){var o=t.height,r=t.width,i=t.x,n=t.y;ex(this,e),this.height=o,this.width=r,this.x=i,this.y=n,this._indexMap={},this._indices=[]}return eG(e,[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),e}(),tu=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;ex(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}}return eG(e,[{key:"getCellIndices",value:function(e){var t=e.height,o=e.width,r=e.x,i=e.y,n={};return this.getSections({height:t,width:o,x:r,y:i}).forEach(function(e){return e.getCellIndices().forEach(function(e){n[e]=e})}),Object.keys(n).map(function(e){return n[e]})}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,o=e.width,r=e.x,i=e.y,n=Math.floor(r/this._sectionSize),s=Math.floor((r+o-1)/this._sectionSize),a=Math.floor(i/this._sectionSize),l=Math.floor((i+t-1)/this._sectionSize),h=[],c=n;c<=s;c++)for(var d=a;d<=l;d++){var u="".concat(c,".").concat(d);this._sections[u]||(this._sections[u]=new td({height:this._sectionSize,width:this._sectionSize,x:c*this._sectionSize,y:d*this._sectionSize})),h.push(this._sections[u])}return h}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var e=this;return Object.keys(this._sections).map(function(t){return e._sections[t].toString()})}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,o=e.index;this._cellMetadata[o]=t,this.getSections(t).forEach(function(e){return e.addCellIndex({index:o})})}}]),e}();function tp(e){var t=e.align,o=e.cellOffset,r=e.cellSize,i=e.containerSize,n=e.currentOffset,s=o-i+r;switch(void 0===t?"auto":t){case"start":return o;case"end":return s;case"center":return o-(i-r)/2;default:return Math.max(s,Math.min(o,n))}}var tf=function(e){function t(e,o){var r;return ex(this,t),(r=eW(this,ez(t).call(this,e,o)))._cellMetadata=[],r._lastRenderedCellIndices=[],r._cellCache=[],r._isScrollingChange=r._isScrollingChange.bind(ek(r)),r._setCollectionViewRef=r._setCollectionViewRef.bind(ek(r)),r}return eF(t,e),eG(t,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=eV({},this.props);return A.createElement(tc,eV({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,o=e.cellSizeAndPositionGetter,r=e.sectionSize,i=[],n=new tu(r),s=0,a=0,l=0;l<t;l++){var h=o({index:l});if(null==h.height||isNaN(h.height)||null==h.width||isNaN(h.width)||null==h.x||isNaN(h.x)||null==h.y||isNaN(h.y))throw Error("Invalid metadata returned for cell ".concat(l,`:
|
|
12
12
|
x:`).concat(h.x,", y:").concat(h.y,", width:").concat(h.width,", height:").concat(h.height));s=Math.max(s,h.y+h.height),a=Math.max(a,h.x+h.width),i[l]=h,n.registerCell({cellMetadatum:h,index:l})}return{cellMetadata:i,height:s,sectionManager:n,width:a}}({cellCount:e.cellCount,cellSizeAndPositionGetter:e.cellSizeAndPositionGetter,sectionSize:e.sectionSize});this._cellMetadata=t.cellMetadata,this._sectionManager=t.sectionManager,this._height=t.height,this._width=t.width}},{key:"getLastRenderedIndices",value:function(){return this._lastRenderedCellIndices}},{key:"getScrollPositionForCell",value:function(e){var t=e.align,o=e.cellIndex,r=e.height,i=e.scrollLeft,n=e.scrollTop,s=e.width,a=this.props.cellCount;if(o>=0&&o<a){var l=this._cellMetadata[o];i=tp({align:t,cellOffset:l.x,cellSize:l.width,containerSize:s,currentOffset:i,targetIndex:o}),n=tp({align:t,cellOffset:l.y,cellSize:l.height,containerSize:r,currentOffset:n,targetIndex:o})}return{scrollLeft:i,scrollTop:n}}},{key:"getTotalSize",value:function(){return{height:this._height,width:this._width}}},{key:"cellRenderers",value:function(e){var t=this,o=e.height,r=e.isScrolling,i=e.width,n=e.x,s=e.y,a=this.props,l=a.cellGroupRenderer,h=a.cellRenderer;return this._lastRenderedCellIndices=this._sectionManager.getCellIndices({height:o,width:i,x:n,y:s}),l({cellCache:this._cellCache,cellRenderer:h,cellSizeAndPositionGetter:function(e){var o=e.index;return t._sectionManager.getCellMetadata({index:o})},indices:this._lastRenderedCellIndices,isScrolling:r})}},{key:"_isScrollingChange",value:function(e){e||(this._cellCache=[])}},{key:"_setCollectionViewRef",value:function(e){this._collectionView=e}}]),t}(A.PureComponent);function tm(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=Array(t);o<t;o++)r[o]=e[o];return r}function tg(e,t){if(e){if("string"==typeof e)return tm(e,t);var o=({}).toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?tm(e,t):void 0}}eP(tf,"defaultProps",{"aria-label":"grid",cellGroupRenderer:function(e){var t=e.cellCache,o=e.cellRenderer,r=e.cellSizeAndPositionGetter,i=e.indices,n=e.isScrolling;return i.map(function(e){var i=r({index:e}),s={index:e,isScrolling:n,key:e,style:{height:i.height,left:i.x,position:"absolute",top:i.y,width:i.width}};return n?(e in t||(t[e]=o(s)),t[e]):o(s)}).filter(function(e){return!!e})}}),tf.propTypes={},function(e){function t(e,o){var r;return ex(this,t),(r=eW(this,ez(t).call(this,e,o)))._registerChild=r._registerChild.bind(ek(r)),r}return eF(t,e),eG(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,o=t.columnMaxWidth,r=t.columnMinWidth,i=t.columnCount,n=t.width;(o!==e.columnMaxWidth||r!==e.columnMinWidth||i!==e.columnCount||n!==e.width)&&this._registeredChild&&this._registeredChild.recomputeGridSize()}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.columnMaxWidth,r=e.columnMinWidth,i=e.columnCount,n=e.width,s=o?Math.min(o,n):n,a=n/i;return t({adjustedWidth:Math.min(n,(a=Math.floor(a=Math.min(s,a=Math.max(r||1,a))))*i),columnWidth:a,getColumnWidth:function(){return a},registerChild:this._registerChild})}},{key:"_registerChild",value:function(e){if(e&&"function"!=typeof e.recomputeGridSize)throw Error("Unexpected child type registered; only Grid/MultiGrid children are supported.");this._registeredChild=e,this._registeredChild&&this._registeredChild.recomputeGridSize()}}]),t}(A.PureComponent).propTypes={};var t_=function(e){function t(e,o){var r;return ex(this,t),(r=eW(this,ez(t).call(this,e,o)))._loadMoreRowsMemoizer=eJ(),r._onRowsRendered=r._onRowsRendered.bind(ek(r)),r._registerChild=r._registerChild.bind(ek(r)),r}return eF(t,e),eG(t,[{key:"resetLoadMoreRowsCache",value:function(e){this._loadMoreRowsMemoizer=eJ(),e&&this._doStuff(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"render",value:function(){return(0,this.props.children)({onRowsRendered:this._onRowsRendered,registerChild:this._registerChild})}},{key:"_loadUnloadedRanges",value:function(e){var t=this,o=this.props.loadMoreRows;e.forEach(function(e){var r=o(e);r&&r.then(function(){var o,r,i,n,s;r=(o={lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:e.startIndex,stopIndex:e.stopIndex}).lastRenderedStartIndex,i=o.lastRenderedStopIndex,n=o.startIndex,s=o.stopIndex,!(n>i||s<r)&&t._registeredChild&&function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o="function"==typeof e.recomputeGridSize?e.recomputeGridSize:e.recomputeRowHeights;o?o.call(e,t):e.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)})})}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,o=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=o,this._doStuff(t,o)}},{key:"_doStuff",value:function(e,t){var o,r,i=this,n=this.props,s=n.isRowLoaded,a=n.minimumBatchSize,l=n.rowCount,h=n.threshold,c=function(e){for(var t=e.isRowLoaded,o=e.minimumBatchSize,r=e.rowCount,i=e.startIndex,n=e.stopIndex,s=[],a=null,l=null,h=i;h<=n;h++)t({index:h})?null!==l&&(s.push({startIndex:a,stopIndex:l}),a=l=null):(l=h,null===a&&(a=h));if(null!==l){for(var c=Math.min(Math.max(l,a+o-1),r-1),d=l+1;d<=c;d++)if(t({index:d}))break;else l=d;s.push({startIndex:a,stopIndex:l})}if(s.length)for(var u=s[0];u.stopIndex-u.startIndex+1<o&&u.startIndex>0;){var p=u.startIndex-1;if(t({index:p}))break;u.startIndex=p}return s}({isRowLoaded:s,minimumBatchSize:a,rowCount:l,startIndex:Math.max(0,e-h),stopIndex:Math.min(l-1,t+h)}),d=(r=[]).concat.apply(r,function(e){if(Array.isArray(e))return tm(e)}(o=c.map(function(e){return[e.startIndex,e.stopIndex]}))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||tg(o)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
13
13
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}());this._loadMoreRowsMemoizer({callback:function(){i._loadUnloadedRanges(c)},indices:{squashedUnloadedRanges:d}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),t}(A.PureComponent);eP(t_,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),t_.propTypes={};var tv=(E=w=function(e){function t(){ex(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return eP(ek(o=eW(this,(e=ez(t)).call.apply(e,[this].concat(i)))),"Grid",void 0),eP(ek(o),"_cellRenderer",function(e){var t=e.parent,r=e.rowIndex,i=e.style,n=e.isScrolling,s=e.isVisible,a=e.key,l=o.props.rowRenderer,h=Object.getOwnPropertyDescriptor(i,"width");return h&&h.writable&&(i.width="100%"),l({index:r,style:i,isScrolling:n,isVisible:s,key:a,parent:t})}),eP(ek(o),"_setRef",function(e){o.Grid=e}),eP(ek(o),"_onScroll",function(e){var t=e.clientHeight,r=e.scrollHeight,i=e.scrollTop;(0,o.props.onScroll)({clientHeight:t,scrollHeight:r,scrollTop:i})}),eP(ek(o),"_onScrollToRowCausedUpdate",function(e){var t=e.clientHeight,r=e.scrollHeight,i=e.scrollTop;(0,o.props.onScrollToRowCausedUpdate)({clientHeight:t,scrollHeight:r,scrollTop:i})}),eP(ek(o),"_onSectionRendered",function(e){var t=e.rowOverscanStartIndex,r=e.rowOverscanStopIndex,i=e.rowStartIndex,n=e.rowStopIndex;(0,o.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:r,startIndex:i,stopIndex:n})}),o}return eF(t,e),eG(t,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:o,columnIndex:0}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.recomputeGridSize({rowIndex:void 0===o?0:o,columnIndex:void 0===t?0:t})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,o=e.noRowsRenderer,r=e.scrollToIndex,i=e.width,n=e$("ReactVirtualized__List",t);return A.createElement(te,eV({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:n,columnWidth:i,columnCount:1,noContentRenderer:o,onScroll:this._onScroll,onScrollToTargetCausedUpdate:this._onScrollToRowCausedUpdate,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}]),t}(A.PureComponent),eP(w,"propTypes",null),E);eP(tv,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},onScrollToRowCausedUpdate:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:tt,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});let tS=function(e,t,o,r,i){return"function"==typeof o?function(e,t,o,r,i){for(var n=o+1;t<=o;){var s=t+o>>>1;i(e[s],r)>=0?(n=s,o=s-1):t=s+1}return n}(e,void 0===r?0:0|r,void 0===i?e.length-1:0|i,t,o):function(e,t,o,r){for(var i=o+1;t<=o;){var n=t+o>>>1;e[n]>=r?(i=n,o=n-1):t=n+1}return i}(e,void 0===o?0:0|o,void 0===r?e.length-1:0|r,t)};function tR(e,t,o,r,i){this.mid=e,this.left=t,this.right=o,this.leftPoints=r,this.rightPoints=i,this.count=(t?t.count:0)+(o?o.count:0)+r.length}var ty=tR.prototype;function tT(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function tC(e,t){var o=tA(t);e.mid=o.mid,e.left=o.left,e.right=o.right,e.leftPoints=o.leftPoints,e.rightPoints=o.rightPoints,e.count=o.count}function tw(e,t){var o=e.intervals([]);o.push(t),tC(e,o)}function tE(e,t){var o=e.intervals([]),r=o.indexOf(t);return r<0?0:(o.splice(r,1),tC(e,o),1)}function tb(e,t,o){for(var r=0;r<e.length&&e[r][0]<=t;++r){var i=o(e[r]);if(i)return i}}function tI(e,t,o){for(var r=e.length-1;r>=0&&e[r][1]>=t;--r){var i=o(e[r]);if(i)return i}}function tM(e,t){for(var o=0;o<e.length;++o){var r=t(e[o]);if(r)return r}}function tO(e,t){return e-t}function tN(e,t){var o=e[0]-t[0];return o||e[1]-t[1]}function tx(e,t){var o=e[1]-t[1];return o||e[0]-t[0]}function tA(e){if(0===e.length)return null;for(var t=[],o=0;o<e.length;++o)t.push(e[o][0],e[o][1]);t.sort(tO);for(var r=t[t.length>>1],i=[],n=[],s=[],o=0;o<e.length;++o){var a=e[o];a[1]<r?i.push(a):r<a[0]?n.push(a):s.push(a)}var l=s.slice();return s.sort(tN),l.sort(tx),new tR(r,tA(i),tA(n),s,l)}function tD(e){this.root=e}ty.intervals=function(e){return e.push.apply(e,this.leftPoints),this.left&&this.left.intervals(e),this.right&&this.right.intervals(e),e},ty.insert=function(e){var t=this.count-this.leftPoints.length;if(this.count+=1,e[1]<this.mid)this.left?4*(this.left.count+1)>3*(t+1)?tw(this,e):this.left.insert(e):this.left=tA([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?tw(this,e):this.right.insert(e):this.right=tA([e]);else{var o=tS(this.leftPoints,e,tN),r=tS(this.rightPoints,e,tx);this.leftPoints.splice(o,0,e),this.rightPoints.splice(r,0,e)}},ty.remove=function(e){var t=this.count-this.leftPoints;if(e[1]<this.mid){if(!this.left)return 0;if(4*(this.right?this.right.count:0)>3*(t-1))return tE(this,e);var o=this.left.remove(e);return 2===o?(this.left=null,this.count-=1,1):(1===o&&(this.count-=1),o)}if(e[0]>this.mid){if(!this.right)return 0;if(4*(this.left?this.left.count:0)>3*(t-1))return tE(this,e);var o=this.right.remove(e);return 2===o?(this.right=null,this.count-=1,1):(1===o&&(this.count-=1),o)}if(1===this.count)if(this.leftPoints[0]===e)return 2;else return 0;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var n=this.left,o=this.right;r.count-=i.count,r.right=i.left,i.left=n,i.right=o}tT(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?tT(this,this.left):tT(this,this.right);return 1}for(var n=tS(this.leftPoints,e,tN);n<this.leftPoints.length&&this.leftPoints[n][0]===e[0];++n)if(this.leftPoints[n]===e){this.count-=1,this.leftPoints.splice(n,1);for(var o=tS(this.rightPoints,e,tx);o<this.rightPoints.length;++o)if(this.rightPoints[o][1]!==e[1])break;else if(this.rightPoints[o]===e)return this.rightPoints.splice(o,1),1}return 0},ty.queryPoint=function(e,t){if(e<this.mid){if(this.left){var o=this.left.queryPoint(e,t);if(o)return o}return tb(this.leftPoints,e,t)}if(!(e>this.mid))return tM(this.leftPoints,t);if(this.right){var o=this.right.queryPoint(e,t);if(o)return o}return tI(this.rightPoints,e,t)},ty.queryInterval=function(e,t,o){if(e<this.mid&&this.left){var r=this.left.queryInterval(e,t,o);if(r)return r}if(t>this.mid&&this.right){var r=this.right.queryInterval(e,t,o);if(r)return r}return t<this.mid?tb(this.leftPoints,t,o):e>this.mid?tI(this.rightPoints,e,o):tM(this.leftPoints,o)};var tH=tD.prototype;tH.insert=function(e){this.root?this.root.insert(e):this.root=new tR(e[0],null,null,[e],[e])},tH.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},tH.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},tH.queryInterval=function(e,t,o){if(e<=t&&this.root)return this.root.queryInterval(e,t,o)},Object.defineProperty(tH,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(tH,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var tG=function(){function e(){ex(this,e),eP(this,"_columnSizeMap",{}),eP(this,"_intervalTree",new tD(null)),eP(this,"_leftMap",{})}return eG(e,[{key:"estimateTotalHeight",value:function(e,t,o){var r=e-this.count;return this.tallestColumnSize+Math.ceil(r/t)*o}},{key:"range",value:function(e,t,o){var r=this;this._intervalTree.queryInterval(e,e+t,function(e){var t=function(e){if(Array.isArray(e))return e}(e)||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var o,r,i,n,s=[],a=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(a=(o=i.call(t)).done)&&(s.push(o.value),3!==s.length);a=!0);}catch(e){l=!0,r=e}finally{try{if(!a&&null!=t.return&&(n=t.return(),Object(n)!==n))return}finally{if(l)throw r}}return s}}(e)||tg(e,3)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
14
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(),i=t[0],n=(t[1],t[2]);return o(n,r._leftMap[n],i)})}},{key:"setPosition",value:function(e,t,o,r){this._intervalTree.insert([o,o+r,e]),this._leftMap[e]=t;var i=this._columnSizeMap,n=i[t];void 0===n?i[t]=o+r:i[t]=Math.max(n,o+r)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var o in e){var r=e[o];t=0===t?r:Math.min(t,r)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var o in e)t=Math.max(t,e[o]);return t}}]),e}();function tk(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}var tW=(I=b=function(e){function t(){ex(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return eP(ek(o=eW(this,(e=ez(t)).call.apply(e,[this].concat(i)))),"state",{isScrolling:!1,scrollTop:0}),eP(ek(o),"_debounceResetIsScrollingId",void 0),eP(ek(o),"_invalidateOnUpdateStartIndex",null),eP(ek(o),"_invalidateOnUpdateStopIndex",null),eP(ek(o),"_positionCache",new tG),eP(ek(o),"_startIndex",null),eP(ek(o),"_startIndexMemoized",null),eP(ek(o),"_stopIndex",null),eP(ek(o),"_stopIndexMemoized",null),eP(ek(o),"_debounceResetIsScrollingCallback",function(){o.setState({isScrolling:!1})}),eP(ek(o),"_setScrollingContainerRef",function(e){o._scrollingContainer=e}),eP(ek(o),"_onScroll",function(e){var t=o.props.height,r=e.currentTarget.scrollTop,i=Math.min(Math.max(0,o._getEstimatedTotalHeight()-t),r);r===i&&(o._debounceResetIsScrolling(),o.state.scrollTop!==i&&o.setState({isScrolling:!0,scrollTop:i}))}),o}return eF(t,e),eG(t,[{key:"clearCellPositions",value:function(){this._positionCache=new tG,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;null===this._invalidateOnUpdateStartIndex?(this._invalidateOnUpdateStartIndex=t,this._invalidateOnUpdateStopIndex=t):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,t),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,t))}},{key:"recomputeCellPositions",value:function(){var e=this._positionCache.count-1;this._positionCache=new tG,this._populatePositionCache(0,e),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(e,t){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==e.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&e6(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e,t=this,o=this.props,r=o.autoHeight,i=o.cellCount,n=o.cellMeasurerCache,s=o.cellRenderer,a=o.className,l=o.height,h=o.id,c=o.keyMapper,d=o.overscanByPixels,u=o.role,p=o.style,f=o.tabIndex,m=o.width,g=o.rowDirection,_=this.state,v=_.isScrolling,S=_.scrollTop,R=[],y=this._getEstimatedTotalHeight(),T=this._positionCache.shortestColumnSize,C=this._positionCache.count,w=0;if(this._positionCache.range(Math.max(0,S-d),l+2*d,function(o,r,i){var a;void 0===e?(w=o,e=o):(w=Math.min(w,o),e=Math.max(e,o)),R.push(s({index:o,isScrolling:v,key:c(o),parent:t,style:(eP(a={height:n.getHeight(o)},"ltr"===g?"left":"right",r),eP(a,"position","absolute"),eP(a,"top",i),eP(a,"width",n.getWidth(o)),a)}))}),T<S+l+d&&C<i)for(var E=Math.min(i-C,Math.ceil((S+l+d-T)/n.defaultHeight*m/n.defaultWidth)),b=C;b<C+E;b++)e=b,R.push(s({index:b,isScrolling:v,key:c(b),parent:this,style:{width:n.getWidth(b)}}));return this._startIndex=w,this._stopIndex=e,A.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:e$("ReactVirtualized__Masonry",a),id:h,onScroll:this._onScroll,role:u,style:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?tk(o,!0).forEach(function(t){eP(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):tk(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({boxSizing:"border-box",direction:"ltr",height:r?"auto":l,overflowX:"hidden",overflowY:y<l?"hidden":"auto",position:"relative",width:m,WebkitOverflowScrolling:"touch",willChange:"transform"},p),tabIndex:f},A.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:y,maxWidth:"100%",maxHeight:y,overflow:"hidden",pointerEvents:v?"none":"",position:"relative"}},R))}},{key:"_checkInvalidateOnUpdate",value:function(){if("number"==typeof this._invalidateOnUpdateStartIndex){var e=this._invalidateOnUpdateStartIndex,t=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(e,t),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var e=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&e6(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=e4(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,o=e.cellMeasurerCache,r=Math.max(1,Math.floor(e.width/o.defaultWidth));return this._positionCache.estimateTotalHeight(t,r,o.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,o=e.onScroll,r=this.state.scrollTop;this._onScrollMemoized!==r&&(o({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:r}),this._onScrollMemoized=r)}},{key:"_invokeOnCellsRenderedCallback",value:function(){(this._startIndexMemoized!==this._startIndex||this._stopIndexMemoized!==this._stopIndex)&&((0,this.props.onCellsRendered)({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex)}},{key:"_populatePositionCache",value:function(e,t){for(var o=this.props,r=o.cellMeasurerCache,i=o.cellPositioner,n=e;n<=t;n++){var s=i(n),a=s.left,l=s.top;this._positionCache.setPosition(n,a,l,r.getHeight(n))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return void 0!==e.scrollTop&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}]),t}(A.PureComponent),eP(b,"propTypes",null),I);function tz(){}eP(tW,"defaultProps",{autoHeight:!1,keyMapper:function(e){return e},onCellsRendered:tz,onScroll:tz,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"}),ej(tW);var tL=function(){function e(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ex(this,e),eP(this,"_cellMeasurerCache",void 0),eP(this,"_columnIndexOffset",void 0),eP(this,"_rowIndexOffset",void 0),eP(this,"columnWidth",function(e){var o=e.index;t._cellMeasurerCache.columnWidth({index:o+t._columnIndexOffset})}),eP(this,"rowHeight",function(e){var o=e.index;t._cellMeasurerCache.rowHeight({index:o+t._rowIndexOffset})});var r=o.cellMeasurerCache,i=o.columnIndexOffset,n=o.rowIndexOffset;this._cellMeasurerCache=r,this._columnIndexOffset=void 0===i?0:i,this._rowIndexOffset=void 0===n?0:n}return eG(e,[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,o,r){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,o,r)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function tF(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function tP(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?tF(o,!0).forEach(function(t){eP(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):tF(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var tB=function(e){function t(e,o){ex(this,t),eP(ek(r=eW(this,ez(t).call(this,e,o))),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),eP(ek(r),"_deferredInvalidateColumnIndex",null),eP(ek(r),"_deferredInvalidateRowIndex",null),eP(ek(r),"_bottomLeftGridRef",function(e){r._bottomLeftGrid=e}),eP(ek(r),"_bottomRightGridRef",function(e){r._bottomRightGrid=e}),eP(ek(r),"_cellRendererBottomLeftGrid",function(e){var t=e.rowIndex,o=eq(e,["rowIndex"]),i=r.props,n=i.cellRenderer,s=i.fixedRowCount;return t===i.rowCount-s?A.createElement("div",{key:o.key,style:tP({},o.style,{height:20})}):n(tP({},o,{parent:ek(r),rowIndex:t+s}))}),eP(ek(r),"_cellRendererBottomRightGrid",function(e){var t=e.columnIndex,o=e.rowIndex,i=eq(e,["columnIndex","rowIndex"]),n=r.props,s=n.cellRenderer,a=n.fixedColumnCount,l=n.fixedRowCount;return s(tP({},i,{columnIndex:t+a,parent:ek(r),rowIndex:o+l}))}),eP(ek(r),"_cellRendererTopRightGrid",function(e){var t=e.columnIndex,o=eq(e,["columnIndex"]),i=r.props,n=i.cellRenderer,s=i.columnCount,a=i.fixedColumnCount;return t===s-a?A.createElement("div",{key:o.key,style:tP({},o.style,{width:20})}):n(tP({},o,{columnIndex:t+a,parent:ek(r)}))}),eP(ek(r),"_columnWidthRightGrid",function(e){var t=e.index,o=r.props,i=o.columnCount,n=o.fixedColumnCount,s=o.columnWidth,a=r.state,l=a.scrollbarSize;return a.showHorizontalScrollbar&&t===i-n?l:"function"==typeof s?s({index:t+n}):s}),eP(ek(r),"_onScroll",function(e){var t=e.scrollLeft,o=e.scrollTop;r.setState({scrollLeft:t,scrollTop:o});var i=r.props.onScroll;i&&i(e)}),eP(ek(r),"_onScrollbarPresenceChange",function(e){var t=e.horizontal,o=e.size,i=e.vertical,n=r.state,s=n.showHorizontalScrollbar,a=n.showVerticalScrollbar;if(t!==s||i!==a){r.setState({scrollbarSize:o,showHorizontalScrollbar:t,showVerticalScrollbar:i});var l=r.props.onScrollbarPresenceChange;"function"==typeof l&&l({horizontal:t,size:o,vertical:i})}}),eP(ek(r),"_onScrollLeft",function(e){var t=e.scrollLeft;r._onScroll({scrollLeft:t,scrollTop:r.state.scrollTop})}),eP(ek(r),"_onScrollTop",function(e){var t=e.scrollTop;r._onScroll({scrollTop:t,scrollLeft:r.state.scrollLeft})}),eP(ek(r),"_rowHeightBottomGrid",function(e){var t=e.index,o=r.props,i=o.fixedRowCount,n=o.rowCount,s=o.rowHeight,a=r.state,l=a.scrollbarSize;return a.showVerticalScrollbar&&t===n-i?l:"function"==typeof s?s({index:t+i}):s}),eP(ek(r),"_topLeftGridRef",function(e){r._topLeftGrid=e}),eP(ek(r),"_topRightGridRef",function(e){r._topRightGrid=e});var r,i=e.deferredMeasurementCache,n=e.fixedColumnCount,s=e.fixedRowCount;return r._maybeCalculateCachedStyles(!0),i&&(r._deferredMeasurementCacheBottomLeftGrid=s>0?new tL({cellMeasurerCache:i,columnIndexOffset:0,rowIndexOffset:s}):i,r._deferredMeasurementCacheBottomRightGrid=n>0||s>0?new tL({cellMeasurerCache:i,columnIndexOffset:n,rowIndexOffset:s}):i,r._deferredMeasurementCacheTopRightGrid=n>0?new tL({cellMeasurerCache:i,columnIndexOffset:n,rowIndexOffset:0}):i),r}return eF(t,e),eG(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,o):o,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,i):i}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r,n=this.props,s=n.fixedColumnCount,a=n.fixedRowCount,l=Math.max(0,o-s),h=Math.max(0,i-a);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:h}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:l,rowIndex:h}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:i}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:l,rowIndex:i}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,o=e.scrollTop;if(t>0||o>0){var r={};t>0&&(r.scrollLeft=t),o>0&&(r.scrollTop=o),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,o=e.onSectionRendered,r=(e.onScrollbarPresenceChange,e.scrollLeft,e.scrollToColumn),i=(e.scrollTop,e.scrollToRow),n=eq(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var s=this.state,a=s.scrollLeft,l=s.scrollTop;return A.createElement("div",{style:this._containerOuterStyle},A.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(n),this._renderTopRightGrid(tP({},n,{onScroll:t,scrollLeft:a}))),A.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(tP({},n,{onScroll:t,scrollTop:l})),this._renderBottomRightGrid(tP({},n,{onScroll:t,onSectionRendered:o,scrollLeft:a,scrollToColumn:r,scrollToRow:i,scrollTop:l}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,o=e.columnWidth;if(null==this._leftGridWidth)if("function"==typeof o){for(var r=0,i=0;i<t;i++)r+=o({index:i});this._leftGridWidth=r}else this._leftGridWidth=o*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){return e.width-this._getLeftGridWidth(e)}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,o=e.rowHeight;if(null==this._topGridHeight)if("function"==typeof o){for(var r=0,i=0;i<t;i++)r+=o({index:i});this._topGridHeight=r}else this._topGridHeight=o*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(e){var t=this.props,o=t.columnWidth,r=t.enableFixedColumnScroll,i=t.enableFixedRowScroll,n=t.height,s=t.fixedColumnCount,a=t.fixedRowCount,l=t.rowHeight,h=t.style,c=t.styleBottomLeftGrid,d=t.styleBottomRightGrid,u=t.styleTopLeftGrid,p=t.styleTopRightGrid,f=t.width,m=e||n!==this._lastRenderedHeight||f!==this._lastRenderedWidth,g=e||o!==this._lastRenderedColumnWidth||s!==this._lastRenderedFixedColumnCount,_=e||a!==this._lastRenderedFixedRowCount||l!==this._lastRenderedRowHeight;(e||m||h!==this._lastRenderedStyle)&&(this._containerOuterStyle=tP({height:n,overflow:"visible",width:f},h)),(e||m||_)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:f},this._containerBottomStyle={height:n-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:f}),(e||c!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=tP({left:0,overflowX:"hidden",overflowY:r?"auto":"hidden",position:"absolute"},c)),(e||g||d!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=tP({left:this._getLeftGridWidth(this.props),position:"absolute"},d)),(e||u!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=tP({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},u)),(e||g||p!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=tP({left:this._getLeftGridWidth(this.props),overflowX:i?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},p)),this._lastRenderedColumnWidth=o,this._lastRenderedFixedColumnCount=s,this._lastRenderedFixedRowCount=a,this._lastRenderedHeight=n,this._lastRenderedRowHeight=l,this._lastRenderedStyle=h,this._lastRenderedStyleBottomLeftGrid=c,this._lastRenderedStyleBottomRightGrid=d,this._lastRenderedStyleTopLeftGrid=u,this._lastRenderedStyleTopRightGrid=p,this._lastRenderedWidth=f}},{key:"_prepareForRender",value:function(){(this._lastRenderedColumnWidth!==this.props.columnWidth||this._lastRenderedFixedColumnCount!==this.props.fixedColumnCount)&&(this._leftGridWidth=null),(this._lastRenderedFixedRowCount!==this.props.fixedRowCount||this._lastRenderedRowHeight!==this.props.rowHeight)&&(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(e){var t=e.enableFixedColumnScroll,o=e.fixedColumnCount,r=e.fixedRowCount,i=e.rowCount,n=e.hideBottomLeftGridScrollbar,s=this.state.showVerticalScrollbar;if(!o)return null;var a=this._getBottomGridHeight(e),l=this._getLeftGridWidth(e),h=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,c=A.createElement(te,eV({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:o,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:a,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,i-r)+ +!!s,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:n?l+h:l}));return n?A.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:tP({},this._bottomLeftGridStyle,{height:a,width:l,overflowY:"hidden"})},c):c}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,o=e.fixedColumnCount,r=e.fixedRowCount,i=e.rowCount,n=e.scrollToColumn,s=e.scrollToRow;return A.createElement(te,eV({},e,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,t-o),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(e),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,i-r),rowHeight:this._rowHeightBottomGrid,scrollToColumn:n-o,scrollToRow:s-r,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,o=e.fixedRowCount;return t&&o?A.createElement(te,eV({},e,{className:this.props.classNameTopLeftGrid,columnCount:t,height:this._getTopGridHeight(e),ref:this._topLeftGridRef,rowCount:o,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(e)})):null}},{key:"_renderTopRightGrid",value:function(e){var t=e.columnCount,o=e.enableFixedRowScroll,r=e.fixedColumnCount,i=e.fixedRowCount,n=e.scrollLeft,s=e.hideTopRightGridScrollbar,a=this.state,l=a.showHorizontalScrollbar,h=a.scrollbarSize;if(!i)return null;var c=this._getTopGridHeight(e),d=this._getRightGridWidth(e),u=c,p=this._topRightGridStyle;s&&(u=c+(l?h:0),p=tP({},this._topRightGridStyle,{left:0}));var f=A.createElement(te,eV({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-r)+ +!!l,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:u,onScroll:o?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:i,scrollLeft:n,style:p,tabIndex:null,width:d}));return s?A.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:tP({},this._topRightGridStyle,{height:c,width:d,overflowX:"hidden"})},f):f}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),t}(A.PureComponent);function tZ(e){var t=e.className,o=e.columns,r=e.style;return A.createElement("div",{className:t,role:"row",style:r},o)}eP(tB,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),tB.propTypes={},ej(tB),function(e){function t(e,o){var r;return ex(this,t),(r=eW(this,ez(t).call(this,e,o))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},r._onScroll=r._onScroll.bind(ek(r)),r}return eF(t,e),eG(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.clientHeight,r=t.clientWidth,i=t.scrollHeight,n=t.scrollLeft,s=t.scrollTop,a=t.scrollWidth;return e({clientHeight:o,clientWidth:r,onScroll:this._onScroll,scrollHeight:i,scrollLeft:n,scrollTop:s,scrollWidth:a})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.clientWidth,r=e.scrollHeight,i=e.scrollLeft,n=e.scrollTop,s=e.scrollWidth;this.setState({clientHeight:t,clientWidth:o,scrollHeight:r,scrollLeft:i,scrollTop:n,scrollWidth:s})}}]),t}(A.PureComponent).propTypes={},tZ.propTypes=null;let tU="DESC";function tj(e){var t=e.sortDirection,o=e$("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":"ASC"===t,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===tU});return A.createElement("svg",{className:o,width:18,height:18,viewBox:"0 0 24 24"},"ASC"===t?A.createElement("path",{d:"M7 14l5-5 5 5z"}):A.createElement("path",{d:"M7 10l5 5 5-5z"}),A.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function tV(e){var t=e.dataKey,o=e.label,r=e.sortBy,i=e.sortDirection,n=[A.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"==typeof o?o:null},o)];return r===t&&n.push(A.createElement(tj,{key:"SortIndicator",sortDirection:i})),n}function t$(e){var t=e.className,o=e.columns,r=e.index,i=e.key,n=e.onRowClick,s=e.onRowDoubleClick,a=e.onRowMouseOut,l=e.onRowMouseOver,h=e.onRowRightClick,c=e.rowData,d=e.style,u={"aria-rowindex":r+1};return(n||s||a||l||h)&&(u["aria-label"]="row",u.tabIndex=0,n&&(u.onClick=function(e){return n({event:e,index:r,rowData:c})}),s&&(u.onDoubleClick=function(e){return s({event:e,index:r,rowData:c})}),a&&(u.onMouseOut=function(e){return a({event:e,index:r,rowData:c})}),l&&(u.onMouseOver=function(e){return l({event:e,index:r,rowData:c})}),h&&(u.onContextMenu=function(e){return h({event:e,index:r,rowData:c})})),A.createElement("div",eV({},u,{className:t,key:i,role:"row",style:d}),o)}tj.propTypes={},tV.propTypes=null,t$.propTypes=null;var tY=function(e){function t(){return ex(this,t),eW(this,ez(t).apply(this,arguments))}return eF(t,e),t}(A.Component);function tK(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function tq(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?tK(o,!0).forEach(function(t){eP(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):tK(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}eP(tY,"defaultProps",{cellDataGetter:function(e){var t=e.dataKey,o=e.rowData;return"function"==typeof o.get?o.get(t):o[t]},cellRenderer:function(e){var t=e.cellData;return null==t?"":String(t)},defaultSortDirection:"ASC",flexGrow:0,flexShrink:1,headerRenderer:tV,style:{}}),tY.propTypes={};var tX=function(e){function o(e){var t;return ex(this,o),(t=eW(this,ez(o).call(this,e))).state={scrollbarWidth:0},t._createColumn=t._createColumn.bind(ek(t)),t._createRow=t._createRow.bind(ek(t)),t._onScroll=t._onScroll.bind(ek(t)),t._onSectionRendered=t._onSectionRendered.bind(ek(t)),t._setRef=t._setRef.bind(ek(t)),t}return eF(o,e),eG(o,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:o}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.recomputeGridSize({rowIndex:void 0===o?0:o,columnIndex:void 0===t?0:t})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=t(this.Grid),o=e.clientWidth||0;return(e.offsetWidth||0)-o}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,o=t.children,r=t.className,i=t.disableHeader,n=t.gridClassName,s=t.gridStyle,a=t.headerHeight,l=t.headerRowRenderer,h=t.height,c=t.id,d=t.noRowsRenderer,u=t.rowClassName,p=t.rowStyle,f=t.scrollToIndex,m=t.style,g=t.width,_=this.state.scrollbarWidth,v="function"==typeof u?u({index:-1}):u,S="function"==typeof p?p({index:-1}):p;return this._cachedColumnStyles=[],A.Children.toArray(o).forEach(function(t,o){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[o]=tq({overflow:"hidden"},r)}),A.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":A.Children.toArray(o).length,"aria-rowcount":this.props.rowCount,className:e$("ReactVirtualized__Table",r),id:c,role:"grid",style:m},!i&&l({className:e$("ReactVirtualized__Table__headerRow",v),columns:this._getHeaderColumns(),style:tq({height:a,overflow:"hidden",paddingRight:_,width:g},S)}),A.createElement(te,eV({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:e$("ReactVirtualized__Table__Grid",n),cellRenderer:this._createRow,columnWidth:g,columnCount:1,height:i?h:h-a,id:void 0,noContentRenderer:d,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:_,scrollToRow:f,style:tq({},s,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,o=e.columnIndex,r=e.isScrolling,i=e.parent,n=e.rowData,s=e.rowIndex,a=this.props.onColumnClick,l=t.props,h=l.cellDataGetter,c=l.cellRenderer,d=l.className,u=l.columnData,p=l.dataKey,f=l.id,m=c({cellData:h({columnData:u,dataKey:p,rowData:n}),columnData:u,columnIndex:o,dataKey:p,isScrolling:r,parent:i,rowData:n,rowIndex:s}),g=this._cachedColumnStyles[o],_="string"==typeof m?m:null;return A.createElement("div",{"aria-colindex":o+1,"aria-describedby":f,className:e$("ReactVirtualized__Table__rowColumn",d),key:"Row"+s+"-Col"+o,onClick:function(e){a&&a({columnData:u,dataKey:p,event:e})},role:"gridcell",style:g,title:_},m)}},{key:"_createHeader",value:function(e){var t,o,r,i,n,s=e.column,a=e.index,l=this.props,h=l.headerClassName,c=l.headerStyle,d=l.onHeaderClick,u=l.sort,p=l.sortBy,f=l.sortDirection,m=s.props,g=m.columnData,_=m.dataKey,v=m.defaultSortDirection,S=m.disableSort,R=m.headerRenderer,y=m.id,T=m.label,C=!S&&u,w=e$("ReactVirtualized__Table__headerColumn",h,s.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:C}),E=this._getFlexStyleForColumn(s,tq({},c,{},s.props.headerStyle)),b=R({columnData:g,dataKey:_,disableSort:S,label:T,sortBy:p,sortDirection:f});if(C||d){var I=p!==_?v:f===tU?"ASC":tU,M=function(e){C&&u({defaultSortDirection:v,event:e,sortBy:_,sortDirection:I}),d&&d({columnData:g,dataKey:_,event:e})};n=s.props["aria-label"]||T||_,i="none",r=0,t=M,o=function(e){("Enter"===e.key||" "===e.key)&&M(e)}}return p===_&&(i="ASC"===f?"ascending":"descending"),A.createElement("div",{"aria-label":n,"aria-sort":i,className:w,id:y,key:"Header-Col"+a,onClick:t,onKeyDown:o,role:"columnheader",style:E,tabIndex:r},b)}},{key:"_createRow",value:function(e){var t=this,o=e.rowIndex,r=e.isScrolling,i=e.key,n=e.parent,s=e.style,a=this.props,l=a.children,h=a.onRowClick,c=a.onRowDoubleClick,d=a.onRowRightClick,u=a.onRowMouseOver,p=a.onRowMouseOut,f=a.rowClassName,m=a.rowGetter,g=a.rowRenderer,_=a.rowStyle,v=this.state.scrollbarWidth,S="function"==typeof f?f({index:o}):f,R="function"==typeof _?_({index:o}):_,y=m({index:o}),T=A.Children.toArray(l).map(function(e,i){return t._createColumn({column:e,columnIndex:i,isScrolling:r,parent:n,rowData:y,rowIndex:o,scrollbarWidth:v})}),C=e$("ReactVirtualized__Table__row",S),w=tq({},s,{height:this._getRowHeight(o),overflow:"hidden",paddingRight:v},R);return g({className:C,columns:T,index:o,isScrolling:r,key:i,onRowClick:h,onRowDoubleClick:c,onRowRightClick:d,onRowMouseOver:u,onRowMouseOut:p,rowData:y,style:w})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=tq({},t,{flex:o,msFlex:o,WebkitFlex:o});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,o=t.children;return(t.disableHeader?[]:A.Children.toArray(o)).map(function(t,o){return e._createHeader({column:t,index:o})})}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"==typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:o,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,o=e.rowOverscanStopIndex,r=e.rowStartIndex,i=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:o,startIndex:r,stopIndex:i})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),o}(A.PureComponent);eP(tX,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:tt,overscanRowCount:10,rowRenderer:t$,headerRowRenderer:tZ,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),tX.propTypes={};var tQ=[],tJ=null,t0=null;function t1(){t0&&(t0=null,document.body&&null!=tJ&&(document.body.style.pointerEvents=tJ),tJ=null)}function t2(){t1(),tQ.forEach(function(e){return e.__resetIsScrolling()})}function t5(e){var t;e.currentTarget===window&&null==tJ&&document.body&&(tJ=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),t0&&e6(t0),t=0,tQ.forEach(function(e){t=Math.max(t,e.props.scrollingResetTimeInterval)}),t0=e4(t2,t),tQ.forEach(function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()})}function t3(e,t){tQ.some(function(e){return e.props.scrollElement===t})||t.addEventListener("scroll",t5),tQ.push(e)}function t6(e,t){!(tQ=tQ.filter(function(t){return t!==e})).length&&(t.removeEventListener("scroll",t5),t0&&(e6(t0),t1()))}var t4=function(e){return e===window},t9=function(e){return e.getBoundingClientRect()};function t7(e,t){if(!e)return{height:t.serverHeight,width:t.serverWidth};if(!t4(e))return t9(e);var o=window,r=o.innerHeight,i=o.innerWidth;return{height:"number"==typeof r?r:0,width:"number"==typeof i?i:0}}function t8(e){return t4(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function oe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}var ot=function(){return"u">typeof window?window:void 0},oo=(O=M=function(e){function o(){ex(this,o);for(var e,t,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return eP(ek(t=eW(this,(e=ez(o)).call.apply(e,[this].concat(i)))),"_window",ot()),eP(ek(t),"_isMounted",!1),eP(ek(t),"_positionFromTop",0),eP(ek(t),"_positionFromLeft",0),eP(ek(t),"_detectElementResize",void 0),eP(ek(t),"_child",void 0),eP(ek(t),"state",function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?oe(o,!0).forEach(function(t){eP(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):oe(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},t7(t.props.scrollElement,t.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),eP(ek(t),"_registerChild",function(e){e&&Element,t._child=e,t.updatePosition()}),eP(ek(t),"_onChildScroll",function(e){var o=e.scrollTop;if(t.state.scrollTop!==o){var r=t.props.scrollElement;r&&("function"==typeof r.scrollTo?r.scrollTo(0,o+t._positionFromTop):r.scrollTop=o+t._positionFromTop)}}),eP(ek(t),"_registerResizeListener",function(e){e===window?window.addEventListener("resize",t._onResize,!1):t._detectElementResize.addResizeListener(e,t._onResize)}),eP(ek(t),"_unregisterResizeListener",function(e){e===window?window.removeEventListener("resize",t._onResize,!1):e&&t._detectElementResize.removeResizeListener(e,t._onResize)}),eP(ek(t),"_onResize",function(){t.updatePosition()}),eP(ek(t),"__handleWindowScrollEvent",function(){if(t._isMounted){var e=t.props.onScroll,o=t.props.scrollElement;if(o){var r=t8(o),i=Math.max(0,r.left-t._positionFromLeft),n=Math.max(0,r.top-t._positionFromTop);t.setState({isScrolling:!0,scrollLeft:i,scrollTop:n}),e({scrollLeft:i,scrollTop:n})}}}),eP(ek(t),"__resetIsScrolling",function(){t.setState({isScrolling:!1})}),t}return eF(o,e),eG(o,[{key:"updatePosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,o=this.props.onResize,r=this.state,i=r.height,n=r.width,s=this._child||t(this);if(s instanceof Element&&e){var a=function(e,t){if(t4(t)&&document.documentElement){var o=document.documentElement,r=t9(e),i=t9(o);return{top:r.top-i.top,left:r.left-i.left}}var n=t8(t),s=t9(e),a=t9(t);return{top:s.top+n.top-a.top,left:s.left+n.left-a.left}}(s,e);this._positionFromTop=a.top,this._positionFromLeft=a.left}var l=t7(e,this.props);(i!==l.height||n!==l.width)&&(this.setState({height:l.height,width:l.width}),o({height:l.height,width:l.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=ti(),this.updatePosition(e),e&&(t3(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var o=this.props.scrollElement,r=e.scrollElement;r!==o&&null!=r&&null!=o&&(this.updatePosition(o),t6(this,r),t3(this,o),this._unregisterResizeListener(r),this._registerResizeListener(o))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(t6(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.isScrolling,r=t.scrollTop,i=t.scrollLeft,n=t.height,s=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:n,isScrolling:o,scrollLeft:i,scrollTop:r,width:s})}}]),o}(A.PureComponent),eP(M,"propTypes",null),O);eP(oo,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:ot(),serverHeight:0,serverWidth:0});var or=n(615),oi=function(){return(oi=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},on={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},os={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},oa={width:"20px",height:"20px",position:"absolute",zIndex:1},ol={top:oi(oi({},on),{top:"-5px"}),right:oi(oi({},os),{left:void 0,right:"-5px"}),bottom:oi(oi({},on),{top:void 0,bottom:"-5px"}),left:oi(oi({},os),{left:"-5px"}),topRight:oi(oi({},oa),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:oi(oi({},oa),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:oi(oi({},oa),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:oi(oi({},oa),{left:"-10px",top:"-10px",cursor:"nw-resize"})},oh=(0,A.memo)(function(e){var t=e.onResizeStart,o=e.direction,r=e.children,i=e.replaceStyles,n=e.className,s=(0,A.useCallback)(function(e){t(e,o)},[t,o]),a=(0,A.useCallback)(function(e){t(e,o)},[t,o]),l=(0,A.useMemo)(function(){return oi(oi({position:"absolute",userSelect:"none"},ol[o]),null!=i?i:{})},[i,o]);return(0,or.jsx)("div",{className:n||void 0,style:l,onMouseDown:s,onTouchStart:a,children:r})}),oc=(l=function(e,t){return(l=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),od=function(){return(od=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},ou={width:"auto",height:"auto"},op=function(e,t,o){return Math.max(Math.min(e,o),t)},of=function(e,t,o){var r=Math.round(e/t);return r*t+o*(r-1)},om=function(e,t){return RegExp(e,"i").test(t)},og=function(e){return!!(e.touches&&e.touches.length)},o_=function(e,t,o){void 0===o&&(o=0);var r=t.reduce(function(o,r,i){return Math.abs(r-e)<Math.abs(t[o]-e)?i:o},0),i=Math.abs(t[r]-e);return 0===o||i<o?t[r]:e},ov=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},oS=function(e,t,o,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return o*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return r*i}}return e},oR=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],oy="__resizable_base__",oT=function(e){function t(t){var o,r,i,n,s=e.call(this,t)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var e=s.parentNode;if(!e)return null;var t=s.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(oy):t.className+=oy,e.appendChild(t),t},s.removeBase=function(e){var t=s.parentNode;t&&t.removeChild(e)},s.state={isResizing:!1,width:null!=(r=null==(o=s.propsSize)?void 0:o.width)?r:"auto",height:null!=(n=null==(i=s.propsSize)?void 0:i.height)?n:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return oc(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ou},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){var o;if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&(null==(o=e.propsSize[t])?void 0:o.toString().endsWith("%"))){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var r=e.getParentSize(),i=Number(e.state[t].toString().replace("px",""))/r[t]*100;return"".concat(i,"%")}return ov(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?ov(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?ov(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"===this.state[t]&&this.state.original[t]===e&&(void 0===o||"auto"===o)?"auto":e},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,r,i=this.props.boundsByDirection,n=this.state.direction,s=i&&om("left",n),a=i&&om("top",n);if("parent"===this.props.bounds){var l=this.parentNode;l&&(o=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o,r=this.props.scale||1,i=Array.isArray(o=this.props.resizeRatio||1)?o:[o,o],n=i[0],s=i[1],a=this.state,l=a.direction,h=a.original,c=this.props,d=c.lockAspectRatio,u=c.lockAspectRatioExtraHeight,p=c.lockAspectRatioExtraWidth,f=h.width,m=h.height,g=u||0,_=p||0;return om("right",l)&&(f=h.width+(e-h.x)*n/r,d&&(m=(f-_)/this.ratio+g)),om("left",l)&&(f=h.width-(e-h.x)*n/r,d&&(m=(f-_)/this.ratio+g)),om("bottom",l)&&(m=h.height+(t-h.y)*s/r,d&&(f=(m-g)*this.ratio+_)),om("top",l)&&(m=h.height-(t-h.y)*s/r,d&&(f=(m-g)*this.ratio+_)),{newWidth:f,newHeight:m}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,r){var i=this.props,n=i.lockAspectRatio,s=i.lockAspectRatioExtraHeight,a=i.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,h=void 0===o.width||o.width<0?e:o.width,c=void 0===r.height?10:r.height,d=void 0===o.height||o.height<0?t:o.height,u=s||0,p=a||0;if(n){var f=(c-u)*this.ratio+p,m=(d-u)*this.ratio+p,g=(l-p)/this.ratio+u,_=(h-p)/this.ratio+u,v=Math.max(c,g),S=Math.min(d,_);e=op(e,Math.max(l,f),Math.min(h,m)),t=op(t,v,S)}else e=op(e,l,h),t=op(t,c,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if("parent"===this.props.bounds){var t=this.parentNode;if(t){var o=t.getBoundingClientRect();this.parentLeft=o.left*e,this.parentTop=o.top*e}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var r=this.props.bounds.getBoundingClientRect();this.targetLeft=r.left*e,this.targetTop=r.top*e}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,s=i.top,a=i.right,l=i.bottom;this.resizableLeft=n*e,this.resizableRight=a*e,this.resizableTop=s*e,this.resizableBottom=l*e}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,r,i=0,n=0;if(e.nativeEvent&&((o=e.nativeEvent).clientX||0===o.clientX)&&(o.clientY||0===o.clientY)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&og(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),!this.props.onResizeStart||!this.resizable||!1!==this.props.onResizeStart(e,t,this.resizable)){this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var s=this.window.getComputedStyle(this.resizable);if("auto"!==s.flexBasis){var a=this.parentNode;if(a){var l=this.window.getComputedStyle(a).flexDirection;this.flexDir=l.startsWith("row")?"row":"column",r=s.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var h={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:od(od({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:r};this.setState(h)}}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&og(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var r,i,n,s,a,l,h=this.props,c=h.maxWidth,d=h.maxHeight,u=h.minWidth,p=h.minHeight,f=og(e)?e.touches[0].clientX:e.clientX,m=og(e)?e.touches[0].clientY:e.clientY,g=this.state,_=g.direction,v=g.original,S=g.width,R=g.height,y=this.getParentSize(),T=(r=this.window.innerWidth,i=this.window.innerHeight,n=c,s=d,a=u,l=p,n=oS(n,y.width,r,i),s=oS(s,y.height,r,i),a=oS(a,y.width,r,i),l=oS(l,y.height,r,i),{maxWidth:void 0===n?void 0:Number(n),maxHeight:void 0===s?void 0:Number(s),minWidth:void 0===a?void 0:Number(a),minHeight:void 0===l?void 0:Number(l)});c=T.maxWidth,d=T.maxHeight,u=T.minWidth,p=T.minHeight;var C=this.calculateNewSizeFromDirection(f,m),w=C.newHeight,E=C.newWidth,b=this.calculateNewMaxFromBoundary(c,d);this.props.snap&&this.props.snap.x&&(E=o_(E,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(w=o_(w,this.props.snap.y,this.props.snapGap));var I=this.calculateNewSizeFromAspectRatio(E,w,{width:b.maxWidth,height:b.maxHeight},{width:u,height:p});if(E=I.newWidth,w=I.newHeight,this.props.grid){var M=of(E,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),O=of(w,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),N=this.props.snapGap||0,x=0===N||Math.abs(M-E)<=N?M:E,A=0===N||Math.abs(O-w)<=N?O:w;E=x,w=A}var D={width:E-v.width,height:w-v.height};if(this.delta=D,S&&"string"==typeof S){if(S.endsWith("%")){var H=E/y.width*100;E="".concat(H,"%")}else if(S.endsWith("vw")){var G=E/this.window.innerWidth*100;E="".concat(G,"vw")}else if(S.endsWith("vh")){var k=E/this.window.innerHeight*100;E="".concat(k,"vh")}}if(R&&"string"==typeof R){if(R.endsWith("%")){var H=w/y.height*100;w="".concat(H,"%")}else if(R.endsWith("vw")){var G=w/this.window.innerWidth*100;w="".concat(G,"vw")}else if(R.endsWith("vh")){var k=w/this.window.innerHeight*100;w="".concat(k,"vh")}}var W={width:this.createSizeForCssProperty(E,"width"),height:this.createSizeForCssProperty(w,"height")};"row"===this.flexDir?W.flexBasis=W.width:"column"===this.flexDir&&(W.flexBasis=W.height);var z=this.state.width!==W.width,L=this.state.height!==W.height,F=this.state.flexBasis!==W.flexBasis,P=z||L||F;P&&o(function(){t.setState(W)}),this.props.onResize&&P&&this.props.onResize(e,_,this.resizable,D)}},t.prototype.onMouseUp=function(e){var t,o,r=this.state,i=r.isResizing,n=r.direction;r.original,i&&this.resizable&&(this.props.onResizeStop&&this.props.onResizeStop(e,n,this.resizable,this.delta),this.props.size&&this.setState({width:null!=(t=this.props.size.width)?t:"auto",height:null!=(o=this.props.size.height)?o:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:od(od({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(e){var t,o;this.setState({width:null!=(t=e.width)?t:"auto",height:null!=(o=e.height)?o:"auto"})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,r=t.handleStyles,i=t.handleClasses,n=t.handleWrapperStyle,s=t.handleWrapperClass,a=t.handleComponent;if(!o)return null;var l=Object.keys(o).map(function(t){return!1!==o[t]?(0,or.jsx)(oh,{direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:i&&i[t],children:a&&a[t]?a[t]:null},t):null});return(0,or.jsx)("div",{className:s,style:n,children:l})},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce(function(t,o){return -1!==oR.indexOf(o)||(t[o]=e.props[o]),t},{}),o=od(od(od({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return(0,or.jsxs)(r,od({style:o,className:this.props.className},t,{ref:function(t){t&&(e.resizable=t)},children:[this.state.isResizing&&(0,or.jsx)("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(A.PureComponent);let oC={top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},ow={min:0,max:1/0},oE=({height:e,heightConstraints:t,width:o,widthConstraints:r})=>({height:(0,eS.q)(e,t.min,t.max),width:(0,eS.q)(o,r.min,r.max)}),ob=({enable:e,height:t,heightConstraints:o,resizeEdge:r,width:i,widthConstraints:n})=>({...oE({height:t,widthConstraints:n,heightConstraints:o,width:i??0}),enable:void 0===e||e,horizontal:"left"===r||"right"===r,initialHeight:t,initialWidth:i??0,resizing:!1,vertical:"top"===r||"bottom"===r});class oI extends A.PureComponent{static defaultProps={className:"",enable:!0,heightConstraints:ow,resizeContentClassName:"",resizeHandleClassName:"",style:{},wrapperStyle:{},translate:()=>"",wrapChildrenInDivContainer:!0,widthConstraints:ow};constructor(e){super(e),this.state=ob(e)}static getDerivedStateFromProps(e,t){return t.resizing?t:ob(e)}componentDidUpdate(e){let{onResizeFromPropChange:t}=this.props,{height:o,resizing:r,width:i}=this.state,{onResizeFromPropChange:n}=e;if(r)return;let{height:s,width:a}=this.state,l=n||t;l&&(s!==o||a!==i)&&l({height:s,width:a,originalHeight:o,originalWidth:i})}_onResize=(e,t,o,{height:r,width:i})=>{let{onResize:n}=this.props,{height:s,horizontal:a,vertical:l,width:h}=this.state,{height:c,width:d}=(({deltaWidth:e,deltaHeight:t},{heightConstraints:o,widthConstraints:r},{initialHeight:i,initialWidth:n})=>oE({height:i+t,heightConstraints:o,width:n+e,widthConstraints:r}))({deltaWidth:i,deltaHeight:r},this.props,this.state),u=a&&d!==h,p=l&&c!==s;(u||p)&&(this.setState({height:p?c:s,width:u?d:h}),n&&n({height:p?c:void 0,width:u?d:void 0}))};_onResizeStart=e=>{e.preventDefault(),e.stopPropagation();let{onResizeStart:t}=this.props,{height:o,horizontal:r,vertical:i,width:n}=this.state;this.setState({resizing:!0}),t&&t({height:i?o:void 0,width:r?n:void 0})};_onResizeEnd=()=>{let{onResizeEnd:e}=this.props,{height:t,horizontal:o,vertical:r,width:i,initialWidth:n,initialHeight:s}=this.state;this.setState({initialWidth:i,initialHeight:t,resizing:!1}),(n!==i||s!==t)&&e&&e({width:o?i:void 0,height:r?t:void 0})};render(){let{children:e,className:t,handleStyles:o,id:r,resizeContentClassName:i,resizeEdge:n,resizeHandleClassName:s,style:a,translate:l,heightConstraints:h,wrapChildrenInDivContainer:c,widthConstraints:d}=this.props,{enable:u,height:p,horizontal:f,resizing:m,vertical:g,width:_}=this.state,{display:v,...S}=a,{min:R,max:y}=d,{min:T,max:C}=h,w={...this.props.wrapperStyle};f&&(w.width=_,w.minWidth=_),g&&(w.height=p,w.minHeight=p);let E=x()("resizable",t,{resizing:m}),b=x()("contents",i,`resize-edge-${n}`,{horizontal:f,vertical:g}),I=x()(n,s,"resizable-handle",{horizontal:f,vertical:g}),M=A.createElement("span",{title:l("ResizePanel")});return A.createElement("div",{"data-testid":`resizable-${r||""}`,style:{...w,display:v}},A.createElement(oT,{className:E,"data-testid":`resizable-core-${r||""}`,enable:{...oC,[n]:u},handleClasses:{[n]:I},handleComponent:{[n]:M},handleStyles:o,maxHeight:g?C:void 0,maxWidth:f?y:void 0,minHeight:g?T:void 0,minWidth:f?R:void 0,onResize:this._onResize,onResizeStart:this._onResizeStart,onResizeStop:this._onResizeEnd,size:{height:g?p:"100%",width:f?_:"100%"},style:S},c?A.createElement("div",{className:b,style:{userSelect:"none"}},e):e))}}var oM=n(385),oO=n(999);let oN=x()("absolute","top-0","right-0","bottom-0","left-0","time-line"),ox=x()(oN,"z2");var oA=function({z2:e}){return A.createElement("div",{className:e?ox:oN,style:{height:2}})};function oD({message:e}){return A.default.createElement("span",{className:"time-line-message-container"},A.default.createElement("span",{className:"time-line-message"},e))}let oH=x()("graph-row-wrapper","grow-3","height-100","graph-zone-column","min-width-0","pb3","pointer","pt3","relative"),oG=x()("graph-row","height-100-percent","flex");function ok(e){let t,o,r,i=(0,oO.c)(16),{processedRows:n,scrollTop:s,translate:a}=e;if(i[0]!==n){t=[];for(let e=0;e<n.length;e++){let o=n[e];o.timeLineEntry&&t.push({row:o,index:e,position:e*V.yB})}i[0]=n,i[1]=t}else t=i[1];let l=t;e:{let e,t,r;if(!l.length){o=null;break e}if(i[2]!==s||i[3]!==l){for(let o of l)if(o.position<=s)e=o.row;else{t=o;break}i[2]=s,i[3]=l,i[4]=e,i[5]=t}else e=i[4],t=i[5];if(t&&t.position-s<=V.yB/2&&(e=t.row),!e){o=null;break e}let{label:n,value:h}=e.timeLineEntry;i[6]!==n||i[7]!==a||i[8]!==h?(r=a(n,h),i[6]=n,i[7]=a,i[8]=h,i[9]=r):r=i[9],o=r}let h=o;if(null==h||s<V.yB)return null;if(i[10]!==h){let e,t,o,n;i[12]===Symbol.for("react.memo_cache_sentinel")?(e={className:"sticky-timeline-container"},i[12]=e):e=i[12],i[13]===Symbol.for("react.memo_cache_sentinel")?(t={className:oH},o=A.default.createElement(oA,null),i[13]=t,i[14]=o):(t=i[13],o=i[14]),i[15]===Symbol.for("react.memo_cache_sentinel")?(n={className:oG},i[15]=n):n=i[15],r=A.default.createElement("div",e,A.default.createElement("div",t,o,A.default.createElement("div",n,A.default.createElement(oD,{message:h})))),i[10]=h,i[11]=r}else r=i[11];return r}let oW={head:"head",localBranches:"branch",remoteBranches:"remote",tags:"tag",stashes:"stash",pullRequests:"pull-request",upstream:"upstream-ahead",wip:"worktree"},oz={head:8,tags:7,localBranches:6,remoteBranches:5,pullRequests:4,stashes:3,upstream:2,wip:1};function oL(e){return e.slice().sort((e,t)=>(oz[t.type]??0)-(oz[e.type]??0))}function oF(e,t,o){let r=t*V.yB,{shape:i}=V.wx[e],n=V.j[i];if(!n)return{height:0,offset:0};let{baseHeight:s,minHeight:a,maxHeight:l}=n,h=o/r*s;void 0!==a&&h<a&&(h=a),void 0!==l&&h>l&&(h=l);let c=V.yB*(o/r),d=h>=c?0:(c-h)/2;return{height:h,offset:d}}function oP(e,t,o){let r=o*V.yB;return e*V.yB/r*t}function oB(e,t,o){let r=o*V.yB;if(r<=t||t<=0)return null;let i=Math.max(12,t/r*t),n=r-t,s=t-i,a=n>0?Math.max(0,Math.min(s,e/n*s)):0;return{top:a,bottom:a+i}}class oZ extends A.PureComponent{canvas;state={hovered:null};memoMarkersByRow={};componentDidMount(){this.updateCanvas()}componentDidUpdate(e){if((e.branchUpstreamRowIndices!==this.props.branchUpstreamRowIndices||e.markerRowIndices!==this.props.markerRowIndices||e.totalRows!==this.props.totalRows||e.viewportHeight!==this.props.viewportHeight||e.viewportWidth!==this.props.viewportWidth||e.markerColors!==this.props.markerColors||e.enabledScrollMarkerTypes!==this.props.enabledScrollMarkerTypes||e.scrollWidth!==this.props.scrollWidth||e.scrollTop!==this.props.scrollTop)&&this.updateCanvas(),(e.interactiveMarkers!==this.props.interactiveMarkers||e.enabledScrollMarkerTypes!==this.props.enabledScrollMarkerTypes||e.branchUpstreamRowIndices!==this.props.branchUpstreamRowIndices)&&null!=this.state.hovered){let{markersByRow:e}=this.getMarkersByRowMemo();e.has(this.state.hovered.rowIndex)||this.setState({hovered:null})}if((e.scrollTop!==this.props.scrollTop||e.viewportHeight!==this.props.viewportHeight||e.totalRows!==this.props.totalRows)&&null!=this.state.hovered){let e=oB(this.props.scrollTop,this.props.viewportHeight,this.props.totalRows);null!=e&&this.state.hovered.tooltipTop>=e.top&&this.state.hovered.tooltipTop<=e.bottom&&this.setState({hovered:null})}}updateCanvas(e){let{branchUpstreamRowIndices:t,enabledScrollMarkerTypes:o,viewportHeight:r,markerRowIndices:i,markerColors:n,scrollTop:s,scrollWidth:a,totalRows:l}=e||this.props;if(null==this.canvas)return;let h=this.canvas.getContext("2d");h.canvas.width=a,h.canvas.height=r;let c=a/V.Yx,d=oB(s,r,l);for(let[e,s]of(h.clearRect(0,0,h.canvas.width,h.canvas.height),Object.entries(V.wx))){if(!o.includes(e)&&!("remoteBranches"===e&&o.includes("localBranches")))continue;let a="remoteBranches"!==e||o.includes("remoteBranches")?i[e]||[]:t,u=n[e],p=s.lanes;if(!u||!a.length||!p.length)continue;let{height:f,offset:m}=oF(e,l,r);if(f<=0)continue;let g=p[0]*c,_=c*p.length;h.fillStyle=u;let v=-1/0;for(let e of a){let t=oP(e,r,l)+m,o=t-.5*f;o<v||(h.globalAlpha=null!=d&&t>=d.top&&t<=d.bottom?.35:1,h.fillRect(g,o,_,f),v=o+f)}}h.globalAlpha=1}setHoveredRow(e,t){let o=this.state.hovered;if(o?.rowIndex===e)return;let{totalRows:r,viewportHeight:i}=this.props,n=oL(t),s=function(e,t,o,r){let{offset:i}=oF(e[0].type,r,o);return oP(t,o,r)+i}(n,e,i,r),a=this.pickRowColor(n);this.setState({hovered:{rowIndex:e,markers:n,tooltipTop:s,color:a}})}pickRowColor(e){let t=e[0].type;return this.props.markerColors[t]??"var(--text-normal, #ccc)"}clearHoveredIfRow(e){this.state.hovered?.rowIndex===e&&this.setState({hovered:null})}onRowHitMove=(e,t)=>{this.setHoveredRow(e,t)};onRowHitClick=(e,t)=>{let o=oL(t)[0];this.props.onMarkerClick?.(o.sha,e,o.type)};getMarkersByRowMemo(){let{interactiveMarkers:e,enabledScrollMarkerTypes:t,branchUpstreamRowIndices:o}=this.props,r=this.memoMarkersByRow;if(r.interactiveMarkers===e&&r.enabledScrollMarkerTypes===t&&r.branchUpstreamRowIndices===o&&null!=r.result&&null!=r.upstreamSet)return{upstreamSet:r.upstreamSet,markersByRow:r.result};let i=new Set(o),n=new Map;if(null!=e)for(let o of e){if(!(t.includes(o.type)||"remoteBranches"===o.type&&t.includes("localBranches")&&i.has(o.rowIndex)))continue;let e=n.get(o.rowIndex);null!=e?e.push(o):n.set(o.rowIndex,[o])}return r.interactiveMarkers=e,r.enabledScrollMarkerTypes=t,r.branchUpstreamRowIndices=o,r.upstreamSet=i,r.result=n,{upstreamSet:i,markersByRow:n}}render(){let{interactiveMarkers:e,scrollWidth:t,totalRows:o,viewportHeight:r}=this.props,{hovered:i}=this.state,n=(e?.length??0)>0&&null!=this.props.onMarkerClick,s=t??0,a=s>0?s/V.Yx:0,{markersByRow:l}=this.getMarkersByRowMemo(),h=null!=i&&l.has(i.rowIndex),c=null;if(null!=i&&h&&s>0&&o>0&&r>0){let e=o*V.yB,t=V.yB*(r/e),n=Math.max(t,4),a=oP(i.rowIndex,r,o)+t/2;c=A.createElement("div",{className:"graph-scroll-marker-hover",style:{top:a-n/2,height:n,left:-3,width:s+3,background:i.color}})}let d=oB(this.props.scrollTop,r,o),u=null;if(n&&o>0&&r>0&&a>0){let e=new Map,t=t=>{let i=e.get(t);return null==i&&(i=oF(t,o,r),e.set(t,i)),i};for(let[e,i]of(u=[],l)){let n=oP(e,r,o),a=1/0,l=-1/0;for(let e of i){let{height:o,offset:r}=t(e.type);if(0===o)continue;let i=n+r;i-o/2<a&&(a=i-o/2),i+o/2>l&&(l=i+o/2)}if(a===1/0)continue;let h=a-3,c=l-a+6,p=h+c;null!=d&&p>=d.top&&h<=d.bottom||u.push(A.createElement("div",{className:"graph-scroll-marker-hit",key:`row-${e}`,onClick:()=>this.onRowHitClick(e,i),onMouseLeave:()=>this.clearHoveredIfRow(e),onMouseMove:()=>this.onRowHitMove(e,i),style:{top:h,height:c,left:0,width:s}}))}}return A.createElement("div",{className:"graph-scroll-markers-root",style:{width:t,height:r}},A.createElement("canvas",{className:"graph-scroll-markers",ref:e=>{this.canvas=e}}),c,u,null!=i&&h&&A.createElement("div",{className:"graph-scroll-marker-tooltip",style:{top:i.tooltipTop}},i.markers.map((e,t)=>{let o=oW[e.type],r=null!=o?this.props.getExternalIcon?.(o):null;return A.createElement("div",{className:"graph-scroll-marker-tooltip__row",key:`${e.type}-${t}`},null!=r&&A.createElement("span",{className:"graph-scroll-marker-tooltip__icon"},r),A.createElement("span",{className:"graph-scroll-marker-tooltip__label"},e.label))})))}}var oU=function({children:t,className:o,height:r,heightAdjustment:i,graphZoneType:n,scrollTop:s,style:a}){let l=V.W[n].listId,h=document.getElementById(l),c=h?.scrollHeight||0,d=r-28;void 0!==s&&(d=Number(a.top)-s,h&&c-r-s<0&&(d=r-i-28));let u={top:d,zIndex:2},p=A.createElement("span",{className:"absolute",style:u},t);return A.createElement("div",{className:o,style:a},h?e.createPortal(p,document.getElementById("graph-container")):p)};function oj({inline:e,getExternalIcon:t,message:o,size:r=100,useSimpleSpinner:i}){let n=x()("loading-spinner",{"inline-block":e,ml2:e,"shrink-0":e}),s=x()("spinner","mr1",{"inline-block":e}),a={height:r,width:r},l=x()("message",{"inline-block":e,mx2:e}),h=i?A.createElement("span",{className:s,style:a},t("loading")):A.createElement("div",{className:s,style:a},A.createElement("img",{className:"ring outer",src:"../../../images/spinner-outer-ring.svg",style:a}),A.createElement("img",{className:"ring inner",src:"../../../images/spinner-inner-ring.svg",style:a}),A.createElement("img",{className:"bg-img",src:"../../../images/spinner-kraken.svg",style:a}));return A.createElement("div",{className:n},h,o&&A.createElement("div",{className:l},o))}class oV extends A.Component{render(){let{currentCommits:e,customFooterRow:t,graphZoneType:o,hasMoreCommits:r,height:i,horizontalScrollHeight:n,getExternalIcon:s,isLoadingRows:a,scrollTop:l,style:h,translate:c}=this.props,d=A.createElement(oj,{className:"loading-spinner",getExternalIcon:s,size:20,useSimpleSpinner:!0}),u=A.createElement("div",{className:"flex items-center"},A.createElement("span",{style:{paddingRight:"5px"}},d)),p=0!==(e>0?e:0)||r?t:A.createElement(A.Fragment,null,c("Graph-NoCommits")),f=A.createElement("div",{className:"graph-adjust-commit-count p1"},a?u:p);return A.createElement(oU,{graphZoneType:o,height:i,heightAdjustment:n,scrollTop:l,style:h},f)}}function o$({branchUpstreamRowIndices:e,rowCount:t,cellRenderersByIds:o,columnIndex:r,customFooterRow:i,enabledScrollMarkerTypes:n,enableResizer:s,getExternalIcon:a,getKeyForCell:l,graphHeight:h,graphWidth:c,graphZoneType:d,graphZones:u,hasMoreCommits:p,horizontalScrollHeight:f,isFilteredSearch:m,isLoadingRows:g,markerColors:_,markerRowIndices:v,interactiveScrollMarkers:S,onScrollMarkerClicked:R,onResize:y,onResizeEnd:T,onResizeFromPropChange:C,onScroll:w,onScrollToRowCausedUpdate:E,onZoneEnter:b,processedRows:I,scrollLeft:M,scrollToAlignment:O,scrollToIndex:N,scrollTop:D,smartCellRangeRenderer:H,stickyTimeline:G,translate:k,verticalScrollWidth:W}){let z=(0,A.useRef)(null),L=(0,ea.Et)(d,u);if(!L)return null;let F=(0,ea.z)(d,u),P=(0,ea.Yy)(t,p,g),B=(0,ea.yJ)(t,p,g),Z=(0,ea.U0)(L,t),U=(0,ea.Ve)(t,p,g),j=W>0,$=!m&&n.length>0,Y=x()("graph-panel","react-virtualized-list","pad-for-horizontal-scrollbar",d===V.ui?"z3":null,{"pad-for-vertical-scrollbar":j}),K=d===V.md?{...!F&&{position:"static"},...F&&{width:L.currentWidth>Z?L.currentWidth:Z,maxWidth:"none"}}:void 0,q=(e,t)=>{if(e<=t)return!1;let o=(()=>{let e=z.current;if(e?.isConnected)return e;let t=document.getElementById(L.listId);return z.current=t,t})();return null!=o&&(0,ea.br)(o)},X=(e,n,s,u,m,_,v,S)=>A.createElement(te,{autoContainerWidth:!0,cellRangeRenderer:H,cellRenderer:n=>((e,n)=>{let s;if(n.rowIndex>t-1)return P&&0===r?A.createElement(oV,{currentCommits:t-1,customFooterRow:i,getExternalIcon:a,graphZoneType:d,hasMoreCommits:p,height:h,horizontalScrollHeight:f,isLoadingRows:g,key:l(n.rowIndex),scrollTop:D,style:n.style,translate:k}):void 0;let c={...n,style:{...n.style}};V.OU===e&&(c.style.top=Number(n.style.top)-D);let u=o[e];return u?(s=u(c),A.createElement("span",{"data-column-name":e,"data-row-idx":n.rowIndex,key:`gk-row-${n.key}`,style:{top:n.style.top}},s)):void 0})(e,n),className:s,columnCount:1,columnWidth:S,containerStyle:u,height:v,id:n,key:n,onScrollToTargetCausedUpdate:E?e=>E(d,e,c,h,p):void 0,overscanRowCount:0,rowCount:B,rowHeight:V.yB,scrollLeft:M,scrollToAlignment:O,scrollTop:D,scrollToRow:N,style:m,tabIndex:null,width:_}),Q=X(L.type,L.listId,Y,K??{},{position:"absolute"},L.currentWidth,h,Z),J=F?A.createElement("div",{className:"timeline-column-container",onWheelCapture:e=>{let t;q(t=(t=D+e.deltaY)>=0?t:0,D)||w(d,{clientHeight:U,clientWidth:Z,scrollHeight:f,scrollLeft:0,scrollTop:t,scrollWidth:W},c,h,p)}},G&&I&&A.createElement(ok,{processedRows:I,scrollTop:D,translate:k}),X(V.OU,"timeline-column","graph-panel react-virtualized-list timeline-column",{overflow:"visible",zIndex:3,maxHeight:U},{position:"absolute",right:0,zIndex:3,maxHeight:h},1,h,1)):void 0,ee=Q&&A.createElement(A.Fragment,null,J,$&&F?A.createElement(oZ,{branchUpstreamRowIndices:e,enabledScrollMarkerTypes:n,getExternalIcon:a,interactiveMarkers:S,markerColors:_,markerRowIndices:v,onMarkerClick:R,scrollTop:D,scrollWidth:W,totalRows:B,viewportHeight:h<U?h:U,viewportWidth:L.currentWidth}):null,A.createElement(oM.A,{contentHeight:U,contentWidth:Z,displayHorizontalScrollbar:L.type===V.md,displayVerticalScrollbar:F,forceOnVerticalWheel:!F,forceVerticalScrollbar:F&&$,height:h,onScroll:e=>{!q(e.scrollTop,D)&&w(d,e,c,h,p)},scrollLeft:M,scrollTop:D,width:L.currentWidth},Q)),et=A.createElement("div",{onMouseEnter:b},ee);return F?et:A.createElement(oI,{enable:s,height:h,id:`${d}Column`,key:`${d}Column`,onResize:y?e=>y(L,e):void 0,onResizeEnd:T?e=>T(L,e):void 0,onResizeFromPropChange:C?e=>C(L,e):void 0,resizeContentClassName:"z1",resizeEdge:"right",resizeHandleClassName:"z1",width:L.currentWidth,widthConstraints:(0,ea.qC)(d,u,c)},et)}var oY=n(175),oK=n.n(oY);let oq="dnd-container";class oX extends A.PureComponent{dndDrake;childReactElementsById={};constructor(e){super(e),this.loadChildrenReactElements(this.props.children)}componentDidMount(){this.dndDrake&&this.dndDrake.on("drop",this.onDrop)}componentDidUpdate(e){this.props.children!==e.children&&this.loadChildrenReactElements(e.children)}componentWillUnmount(){this.dndDrake&&this.dndDrake.destroy()}onDrop=(e,t,o,r)=>{if(this.props.onDrop&&e.id){let t=this.sanitizeId(e.id),o=r?.id?this.sanitizeId(r.id):null,i=this.childReactElementsById[t],n=o?this.childReactElementsById[o]:null;i&&this.props.onDrop(i,n)}};isContainerCallback=e=>e?.classList.contains(oq)??!1;movesCallback=e=>!!e?.id&&this.isDraggable(e.id);acceptsCallback=(e,t,o,r)=>!!e?.id&&this.isDroppable(e.id,r?.id);invalidCallBack=()=>!1;dndDecorator=e=>{if(e){let t={isContainer:this.isContainerCallback,mirrorContainer:this.props.mirrorContainer,moves:this.movesCallback,accepts:this.acceptsCallback,invalid:this.invalidCallBack,direction:this.props.direction||"horizontal",copy:!1,copySortSource:!1,revertOnSpill:!1,removeOnSpill:!1,ignoreInputTextSelection:!0};this.dndDrake=oK()([e],t)}};loadChildrenReactElements(e){this.childReactElementsById={},e&&(e instanceof Array?e.forEach(e=>{A.isValidElement(e)&&this.addChildReactElement(e)}):A.isValidElement(e)&&this.addChildReactElement(e))}addChildReactElement(e){let t=e.props.id;t&&(this.childReactElementsById[this.sanitizeId(t)]=e)}sanitizeId(e){return e.trim().toLowerCase().replace(/-/g,"").replace(/_/g,"")}isDraggable(e){if(this.props.isDraggable){let t=this.sanitizeId(e),o=this.childReactElementsById[t];return null!=o&&this.props.isDraggable(o)}return!1}isDroppable(e,t){if(this.props.isDroppable){let o=this.sanitizeId(e),r=t?this.sanitizeId(t):null,i=this.childReactElementsById[o],n=r?this.childReactElementsById[r]:null;if(i)return this.props.isDroppable(i,n)}return!1}render(){let{children:e,className:t}=this.props,o=x()(oq,t);return A.createElement("div",{className:o,ref:this.dndDecorator},e)}}function oQ(){return(0,A.useState)(null)}let oJ=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,o0=function(e,t){return(0,A.useMemo)(()=>{let o,r;return o=oJ(e),r=oJ(t),e=>{o&&o(e),r&&r(e)}},[e,t])};var o1=Object.prototype.hasOwnProperty;function o2(e,t,o){for(o of e.keys())if(o5(o,t))return o}function o5(e,t){var o,r,i;if(e===t)return!0;if(e&&t&&(o=e.constructor)===t.constructor){if(o===Date)return e.getTime()===t.getTime();if(o===RegExp)return e.toString()===t.toString();if(o===Array){if((r=e.length)===t.length)for(;r--&&o5(e[r],t[r]););return -1===r}if(o===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&"object"==typeof i&&!(i=o2(t,i))||!t.has(i))return!1;return!0}if(o===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&"object"==typeof i&&!(i=o2(t,i))||!o5(r[1],t.get(i)))return!1;return!0}if(o===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(o===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return -1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return -1===r}if(!o||"object"==typeof e){for(o in r=0,e)if(o1.call(e,o)&&++r&&!o1.call(t,o)||!(o in t)||!o5(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}let o3=function(e){let t,o,r=(t=(0,A.useRef)(!0),o=(0,A.useRef)(()=>t.current),(0,A.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[]),o.current);return[e[0],(0,A.useCallback)(t=>{if(r())return e[1](t)},[r,e[1]])]};function o6(e){return e.split("-")[0]}function o4(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function o9(e){var t=o4(e).Element;return e instanceof t||e instanceof Element}function o7(e){var t=o4(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function o8(e){if("u"<typeof ShadowRoot)return!1;var t=o4(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var re=Math.max,rt=Math.min,ro=Math.round;function rr(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ri(){return!/^((?!chrome|android).)*safari/i.test(rr())}function rn(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1);var r=e.getBoundingClientRect(),i=1,n=1;t&&o7(e)&&(i=e.offsetWidth>0&&ro(r.width)/e.offsetWidth||1,n=e.offsetHeight>0&&ro(r.height)/e.offsetHeight||1);var s=(o9(e)?o4(e):window).visualViewport,a=!ri()&&o,l=(r.left+(a&&s?s.offsetLeft:0))/i,h=(r.top+(a&&s?s.offsetTop:0))/n,c=r.width/i,d=r.height/n;return{width:c,height:d,top:h,right:l+c,bottom:h+d,left:l,x:l,y:h}}function rs(e){var t=rn(e),o=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-o)&&(o=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:r}}function ra(e,t){var o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(o&&o8(o)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function rl(e){return e?(e.nodeName||"").toLowerCase():null}function rh(e){return o4(e).getComputedStyle(e)}function rc(e){return((o9(e)?e.ownerDocument:e.document)||window.document).documentElement}function rd(e){return"html"===rl(e)?e:e.assignedSlot||e.parentNode||(o8(e)?e.host:null)||rc(e)}function ru(e){return o7(e)&&"fixed"!==rh(e).position?e.offsetParent:null}function rp(e){for(var t=o4(e),o=ru(e);o&&["table","td","th"].indexOf(rl(o))>=0&&"static"===rh(o).position;)o=ru(o);return o&&("html"===rl(o)||"body"===rl(o)&&"static"===rh(o).position)?t:o||function(e){var t=/firefox/i.test(rr());if(/Trident/i.test(rr())&&o7(e)&&"fixed"===rh(e).position)return null;var o=rd(e);for(o8(o)&&(o=o.host);o7(o)&&0>["html","body"].indexOf(rl(o));){var r=rh(o);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return o;o=o.parentNode}return null}(e)||t}function rf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function rm(e,t,o){return re(e,rt(t,o))}function rg(){return{top:0,right:0,bottom:0,left:0}}function r_(e){return Object.assign({},rg(),e)}function rv(e,t){return t.reduce(function(t,o){return t[o]=e,t},{})}var rS="bottom",rR="right",ry="left",rT="auto",rC=["top",rS,rR,ry],rw="start",rE="viewport",rb="popper",rI=rC.reduce(function(e,t){return e.concat([t+"-"+rw,t+"-end"])},[]),rM=[].concat(rC,[rT]).reduce(function(e,t){return e.concat([t,t+"-"+rw,t+"-end"])},[]),rO=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function rN(e){return e.split("-")[1]}var rx={top:"auto",right:"auto",bottom:"auto",left:"auto"};function rA(e){var t,o,r,i,n,s,a,l=e.popper,h=e.popperRect,c=e.placement,d=e.variation,u=e.offsets,p=e.position,f=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,_=e.isFixed,v=u.x,S=void 0===v?0:v,R=u.y,y=void 0===R?0:R,T="function"==typeof g?g({x:S,y:y}):{x:S,y:y};S=T.x,y=T.y;var C=u.hasOwnProperty("x"),w=u.hasOwnProperty("y"),E=ry,b="top",I=window;if(m){var M=rp(l),O="clientHeight",N="clientWidth";M===o4(l)&&"static"!==rh(M=rc(l)).position&&"absolute"===p&&(O="scrollHeight",N="scrollWidth"),("top"===c||(c===ry||c===rR)&&"end"===d)&&(b=rS,y-=(_&&M===I&&I.visualViewport?I.visualViewport.height:M[O])-h.height,y*=f?1:-1),(c===ry||("top"===c||c===rS)&&"end"===d)&&(E=rR,S-=(_&&M===I&&I.visualViewport?I.visualViewport.width:M[N])-h.width,S*=f?1:-1)}var x=Object.assign({position:p},m&&rx),A=!0===g?(t={x:S,y:y},o=o4(l),r=t.x,i=t.y,{x:ro(r*(n=o.devicePixelRatio||1))/n||0,y:ro(i*n)/n||0}):{x:S,y:y};return(S=A.x,y=A.y,f)?Object.assign({},x,((a={})[b]=w?"0":"",a[E]=C?"0":"",a.transform=1>=(I.devicePixelRatio||1)?"translate("+S+"px, "+y+"px)":"translate3d("+S+"px, "+y+"px, 0)",a)):Object.assign({},x,((s={})[b]=w?y+"px":"",s[E]=C?S+"px":"",s.transform="",s))}var rD={passive:!0},rH={left:"right",right:"left",bottom:"top",top:"bottom"};function rG(e){return e.replace(/left|right|bottom|top/g,function(e){return rH[e]})}var rk={start:"end",end:"start"};function rW(e){return e.replace(/start|end/g,function(e){return rk[e]})}function rz(e){var t=o4(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function rL(e){return rn(rc(e)).left+rz(e).scrollLeft}function rF(e){var t=rh(e),o=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+i+r)}function rP(e,t){void 0===t&&(t=[]);var o,r=function e(t){return["html","body","#document"].indexOf(rl(t))>=0?t.ownerDocument.body:o7(t)&&rF(t)?t:e(rd(t))}(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),n=o4(r),s=i?[n].concat(n.visualViewport||[],rF(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(rP(rd(s)))}function rB(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function rZ(e,t,o){var r,i,n,s,a,l,h,c,d,u;return t===rE?rB(function(e,t){var o=o4(e),r=rc(e),i=o.visualViewport,n=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){n=i.width,s=i.height;var h=ri();(h||!h&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:n,height:s,x:a+rL(e),y:l}}(e,o)):o9(t)?((r=rn(t,!1,"fixed"===o)).top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r):rB((i=rc(e),s=rc(i),a=rz(i),l=null==(n=i.ownerDocument)?void 0:n.body,h=re(s.scrollWidth,s.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),c=re(s.scrollHeight,s.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),d=-a.scrollLeft+rL(i),u=-a.scrollTop,"rtl"===rh(l||s).direction&&(d+=re(s.clientWidth,l?l.clientWidth:0)-h),{width:h,height:c,x:d,y:u}))}function rU(e){var t,o=e.reference,r=e.element,i=e.placement,n=i?o6(i):null,s=i?rN(i):null,a=o.x+o.width/2-r.width/2,l=o.y+o.height/2-r.height/2;switch(n){case"top":t={x:a,y:o.y-r.height};break;case rS:t={x:a,y:o.y+o.height};break;case rR:t={x:o.x+o.width,y:l};break;case ry:t={x:o.x-r.width,y:l};break;default:t={x:o.x,y:o.y}}var h=n?rf(n):null;if(null!=h){var c="y"===h?"height":"width";switch(s){case rw:t[h]=t[h]-(o[c]/2-r[c]/2);break;case"end":t[h]=t[h]+(o[c]/2-r[c]/2)}}return t}function rj(e,t){void 0===t&&(t={});var o,r,i,n,s,a,l,h,c=t,d=c.placement,u=void 0===d?e.placement:d,p=c.strategy,f=void 0===p?e.strategy:p,m=c.boundary,g=c.rootBoundary,_=c.elementContext,v=void 0===_?rb:_,S=c.altBoundary,R=c.padding,y=void 0===R?0:R,T=r_("number"!=typeof y?y:rv(y,rC)),C=e.rects.popper,w=e.elements[void 0!==S&&S?v===rb?"reference":rb:v],E=(o=o9(w)?w:w.contextElement||rc(e.elements.popper),r=void 0===m?"clippingParents":m,i=void 0===g?rE:g,l=(a=[].concat("clippingParents"===r?(n=rP(rd(o)),!o9(s=["absolute","fixed"].indexOf(rh(o).position)>=0&&o7(o)?rp(o):o)?[]:n.filter(function(e){return o9(e)&&ra(e,s)&&"body"!==rl(e)})):[].concat(r),[i]))[0],(h=a.reduce(function(e,t){var r=rZ(o,t,f);return e.top=re(r.top,e.top),e.right=rt(r.right,e.right),e.bottom=rt(r.bottom,e.bottom),e.left=re(r.left,e.left),e},rZ(o,l,f))).width=h.right-h.left,h.height=h.bottom-h.top,h.x=h.left,h.y=h.top,h),b=rn(e.elements.reference),I=rU({reference:b,element:C,strategy:"absolute",placement:u}),M=rB(Object.assign({},C,I)),O=v===rb?M:b,N={top:E.top-O.top+T.top,bottom:O.bottom-E.bottom+T.bottom,left:E.left-O.left+T.left,right:O.right-E.right+T.right},x=e.modifiersData.offset;if(v===rb&&x){var A=x[u];Object.keys(N).forEach(function(e){var t=[rR,rS].indexOf(e)>=0?1:-1,o=["top",rS].indexOf(e)>=0?"y":"x";N[e]+=A[o]*t})}return N}function rV(e,t,o){return void 0===o&&(o={x:0,y:0}),{top:e.top-t.height-o.y,right:e.right-t.width+o.x,bottom:e.bottom-t.height+o.y,left:e.left-t.width-o.x}}function r$(e){return["top",rR,rS,ry].some(function(t){return e[t]>=0})}var rY={placement:"bottom",modifiers:[],strategy:"absolute"};function rK(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}let rq=(d=void 0===(c=(h={defaultModifiers:[{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,o=e.name,r=t.rects.reference,i=t.rects.popper,n=t.modifiersData.preventOverflow,s=rj(t,{elementContext:"reference"}),a=rj(t,{altBoundary:!0}),l=rV(s,r),h=rV(a,i,n),c=r$(l),d=r$(h);t.modifiersData[o]={referenceClippingOffsets:l,popperEscapeOffsets:h,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,o=e.name;t.modifiersData[o]=rU({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,o=e.options,r=o.gpuAcceleration,i=o.adaptive,n=o.roundOffsets,s=void 0===n||n,a={placement:o6(t.placement),variation:rN(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,rA(Object.assign({},a,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,rA(Object.assign({},a,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,r=e.options,i=r.scroll,n=void 0===i||i,s=r.resize,a=void 0===s||s,l=o4(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return n&&h.forEach(function(e){e.addEventListener("scroll",o.update,rD)}),a&&l.addEventListener("resize",o.update,rD),function(){n&&h.forEach(function(e){e.removeEventListener("scroll",o.update,rD)}),a&&l.removeEventListener("resize",o.update,rD)}},data:{}},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,o=e.options,r=e.name,i=o.offset,n=void 0===i?[0,0]:i,s=rM.reduce(function(e,o){var r,i,s,a,l,h;return e[o]=(r=t.rects,s=[ry,"top"].indexOf(i=o6(o))>=0?-1:1,l=(a="function"==typeof n?n(Object.assign({},r,{placement:o})):n)[0],h=a[1],l=l||0,h=(h||0)*s,[ry,rR].indexOf(i)>=0?{x:h,y:l}:{x:l,y:h}),e},{}),a=s[t.placement],l=a.x,h=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=h),t.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,o=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=o.mainAxis,n=void 0===i||i,s=o.altAxis,a=void 0===s||s,l=o.fallbackPlacements,h=o.padding,c=o.boundary,d=o.rootBoundary,u=o.altBoundary,p=o.flipVariations,f=void 0===p||p,m=o.allowedAutoPlacements,g=t.options.placement,_=o6(g)===g,v=l||(_||!f?[rG(g)]:function(e){if(o6(e)===rT)return[];var t=rG(e);return[rW(e),t,rW(t)]}(g)),S=[g].concat(v).reduce(function(e,o){var r,i,n,s,a,l,u,p,g,_,v,S;return e.concat(o6(o)===rT?(i=(r={placement:o,boundary:c,rootBoundary:d,padding:h,flipVariations:f,allowedAutoPlacements:m}).placement,n=r.boundary,s=r.rootBoundary,a=r.padding,l=r.flipVariations,p=void 0===(u=r.allowedAutoPlacements)?rM:u,0===(v=(_=(g=rN(i))?l?rI:rI.filter(function(e){return rN(e)===g}):rC).filter(function(e){return p.indexOf(e)>=0})).length&&(v=_),Object.keys(S=v.reduce(function(e,o){return e[o]=rj(t,{placement:o,boundary:n,rootBoundary:s,padding:a})[o6(o)],e},{})).sort(function(e,t){return S[e]-S[t]})):o)},[]),R=t.rects.reference,y=t.rects.popper,T=new Map,C=!0,w=S[0],E=0;E<S.length;E++){var b=S[E],I=o6(b),M=rN(b)===rw,O=["top",rS].indexOf(I)>=0,N=O?"width":"height",x=rj(t,{placement:b,boundary:c,rootBoundary:d,altBoundary:u,padding:h}),A=O?M?rR:ry:M?rS:"top";R[N]>y[N]&&(A=rG(A));var D=rG(A),H=[];if(n&&H.push(x[I]<=0),a&&H.push(x[A]<=0,x[D]<=0),H.every(function(e){return e})){w=b,C=!1;break}T.set(b,H)}if(C)for(var G=f?3:1,k=function(e){var t=S.find(function(t){var o=T.get(t);if(o)return o.slice(0,e).every(function(e){return e})});if(t)return w=t,"break"},W=G;W>0&&"break"!==k(W);W--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,o=e.options,r=e.name,i=o.mainAxis,n=o.altAxis,s=o.boundary,a=o.rootBoundary,l=o.altBoundary,h=o.padding,c=o.tether,d=void 0===c||c,u=o.tetherOffset,p=void 0===u?0:u,f=rj(t,{boundary:s,rootBoundary:a,padding:h,altBoundary:l}),m=o6(t.placement),g=rN(t.placement),_=!g,v=rf(m),S="x"===v?"y":"x",R=t.modifiersData.popperOffsets,y=t.rects.reference,T=t.rects.popper,C="function"==typeof p?p(Object.assign({},t.rects,{placement:t.placement})):p,w="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,b={x:0,y:0};if(R){if(void 0===i||i){var I,M="y"===v?"top":ry,O="y"===v?rS:rR,N="y"===v?"height":"width",x=R[v],A=x+f[M],D=x-f[O],H=d?-T[N]/2:0,G=g===rw?y[N]:T[N],k=g===rw?-T[N]:-y[N],W=t.elements.arrow,z=d&&W?rs(W):{width:0,height:0},L=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:rg(),F=L[M],P=L[O],B=rm(0,y[N],z[N]),Z=_?y[N]/2-H-B-F-w.mainAxis:G-B-F-w.mainAxis,U=_?-y[N]/2+H+B+P+w.mainAxis:k+B+P+w.mainAxis,j=t.elements.arrow&&rp(t.elements.arrow),V=j?"y"===v?j.clientTop||0:j.clientLeft||0:0,$=null!=(I=null==E?void 0:E[v])?I:0,Y=rm(d?rt(A,x+Z-$-V):A,x,d?re(D,x+U-$):D);R[v]=Y,b[v]=Y-x}if(void 0!==n&&n){var K,q,X="x"===v?"top":ry,Q="x"===v?rS:rR,J=R[S],ee="y"===S?"height":"width",et=J+f[X],eo=J-f[Q],er=-1!==["top",ry].indexOf(m),ei=null!=(q=null==E?void 0:E[S])?q:0,en=er?et:J-y[ee]-T[ee]-ei+w.altAxis,es=er?J+y[ee]+T[ee]-ei-w.altAxis:eo,ea=d&&er?(K=rm(en,J,es))>es?es:K:rm(d?en:et,J,d?es:eo);R[S]=ea,b[S]=ea-J}t.modifiersData[r]=b}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,o=e.state,r=e.name,i=e.options,n=o.elements.arrow,s=o.modifiersData.popperOffsets,a=o6(o.placement),l=rf(a),h=[ry,rR].indexOf(a)>=0?"height":"width";if(n&&s){var c,d=(c=i.padding,r_("number"!=typeof(c="function"==typeof c?c(Object.assign({},o.rects,{placement:o.placement})):c)?c:rv(c,rC))),u=rs(n),p="y"===l?"top":ry,f="y"===l?rS:rR,m=o.rects.reference[h]+o.rects.reference[l]-s[l]-o.rects.popper[h],g=s[l]-o.rects.reference[l],_=rp(n),v=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,S=d[p],R=v-u[h]-d[f],y=v/2-u[h]/2+(m/2-g/2),T=rm(S,y,R);o.modifiersData[r]=((t={})[l]=T,t.centerOffset=T-y,t)}},effect:function(e){var t=e.state,o=e.options.element,r=void 0===o?"[data-popper-arrow]":o;null==r||("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ra(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}]}).defaultModifiers)?[]:c,p=void 0===(u=h.defaultOptions)?rY:u,function(e,t,o){void 0===o&&(o=p);var r,i,n={placement:"bottom",orderedModifiers:[],options:Object.assign({},rY,p),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],a=!1,l={state:n,setOptions:function(o){var r,i,a,c,u,f,m="function"==typeof o?o(n.options):o;h(),n.options=Object.assign({},p,n.options,m),n.scrollParents={reference:o9(e)?rP(e):e.contextElement?rP(e.contextElement):[],popper:rP(t)};var g=(i=Object.keys(r=[].concat(d,n.options.modifiers).reduce(function(e,t){var o=e[t.name];return e[t.name]=o?Object.assign({},o,t,{options:Object.assign({},o.options,t.options),data:Object.assign({},o.data,t.data)}):t,e},{})).map(function(e){return r[e]}),a=new Map,c=new Set,u=[],i.forEach(function(e){a.set(e.name,e)}),i.forEach(function(e){c.has(e.name)||function e(t){c.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!c.has(t)){var o=a.get(t);o&&e(o)}}),u.push(t)}(e)}),f=u,rO.reduce(function(e,t){return e.concat(f.filter(function(e){return e.phase===t}))},[]));return n.orderedModifiers=g.filter(function(e){return e.enabled}),n.orderedModifiers.forEach(function(e){var t=e.name,o=e.options,r=e.effect;if("function"==typeof r){var i=r({state:n,name:t,instance:l,options:void 0===o?{}:o});s.push(i||function(){})}}),l.update()},forceUpdate:function(){if(!a){var e=n.elements,t=e.reference,o=e.popper;if(rK(t,o)){n.rects={reference:(r=rp(o),i="fixed"===n.options.strategy,s=o7(r),u=o7(r)&&(c=ro((h=r.getBoundingClientRect()).width)/r.offsetWidth||1,d=ro(h.height)/r.offsetHeight||1,1!==c||1!==d),p=rc(r),f=rn(t,u,i),m={scrollLeft:0,scrollTop:0},g={x:0,y:0},(s||!s&&!i)&&(("body"!==rl(r)||rF(p))&&(m=function(e){return e!==o4(e)&&o7(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:rz(e)}(r)),o7(r)?(g=rn(r,!0),g.x+=r.clientLeft,g.y+=r.clientTop):p&&(g.x=rL(p))),{x:f.left+m.scrollLeft-g.x,y:f.top+m.scrollTop-g.y,width:f.width,height:f.height}),popper:rs(o)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach(function(e){return n.modifiersData[e.name]=Object.assign({},e.data)});for(var r,i,s,h,c,d,u,p,f,m,g,_=0;_<n.orderedModifiers.length;_++){if(!0===n.reset){n.reset=!1,_=-1;continue}var v=n.orderedModifiers[_],S=v.fn,R=v.options,y=void 0===R?{}:R,T=v.name;"function"==typeof S&&(n=S({state:n,options:y,name:T,instance:l})||n)}}}},update:(r=function(){return new Promise(function(e){l.forceUpdate(),e(n)})},function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(r())})})),i}),destroy:function(){h(),a=!0}};if(!rK(e,t))return l;function h(){s.forEach(function(e){return e()}),s=[]}return l.setOptions(o).then(function(e){!a&&o.onFirstUpdate&&o.onFirstUpdate(e)}),l}),rX=["enabled","placement","strategy","modifiers"],rQ={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>void 0},rJ={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{let{reference:t,popper:o}=e.elements;if("removeAttribute"in t){let e=(t.getAttribute("aria-describedby")||"").split(",").filter(e=>e.trim()!==o.id);e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;let{popper:o,reference:r}=e.elements,i=null==(t=o.getAttribute("role"))?void 0:t.toLowerCase();if(o.id&&"tooltip"===i&&"setAttribute"in r){let e=r.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(o.id))return;r.setAttribute("aria-describedby",e?`${e},${o.id}`:o.id)}}},r0=[],r1=function(e,t,o={}){let{enabled:r=!0,placement:i="bottom",strategy:n="absolute",modifiers:s=r0}=o,a=function(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(o,rX),l=(0,A.useRef)(s),h=(0,A.useRef)(),c=(0,A.useCallback)(()=>{var e;null==(e=h.current)||e.update()},[]),d=(0,A.useCallback)(()=>{var e;null==(e=h.current)||e.forceUpdate()},[]),[u,p]=o3((0,A.useState)({placement:i,update:c,forceUpdate:d,attributes:{},styles:{popper:{},arrow:{}}})),f=(0,A.useMemo)(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{let t={},o={};Object.keys(e.elements).forEach(r=>{t[r]=e.styles[r],o[r]=e.attributes[r]}),p({state:e,styles:t,attributes:o,update:c,forceUpdate:d,placement:e.placement})}}),[c,d,p]),m=(0,A.useMemo)(()=>(o5(l.current,s)||(l.current=s),l.current),[s]);return(0,A.useEffect)(()=>{h.current&&r&&h.current.setOptions({placement:i,strategy:n,modifiers:[...m,f,rQ]})},[n,i,f,r,m]),(0,A.useEffect)(()=>{if(r&&null!=e&&null!=t)return h.current=rq(e,t,Object.assign({},a,{placement:i,strategy:n,modifiers:[...m,rJ,f]})),()=>{null!=h.current&&(h.current.destroy(),h.current=void 0,p(e=>Object.assign({},e,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),u};var r2=!1,r5=!1;try{var r3={get passive(){return r2=!0},get once(){return r5=r2=!0}};e1&&(window.addEventListener("test",r3,r3),window.removeEventListener("test",r3,!0))}catch{}let r6=function(e,t,o,r){if(r&&"boolean"!=typeof r&&!r5){var i=r.once,n=r.capture,s=o;!r5&&i&&(s=o.__once||function e(r){this.removeEventListener(t,e,n),o.call(this,r)},o.__once=s),e.addEventListener(t,s,r2?r:n)}e.addEventListener(t,o,r)},r4=function(e,t,o,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,o,i),o.__once&&e.removeEventListener(t,o.__once,i)},r9=function(e,t,o,r){return r6(e,t,o,r),function(){r4(e,t,o,r)}};function r7(e){return e&&e.ownerDocument||document}let r8=function(e){let t=(0,A.useRef)(e);return(0,A.useEffect)(()=>{t.current=e},[e]),t};function ie(e){let t=r8(e);return(0,A.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}function it(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}var io=n(730),ir=n.n(io);let ii=()=>{},is=e=>e&&("current"in e?e.current:e),ia={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"},il=function(e,t=ii,{disabled:o,clickTrigger:r="click"}={}){let i=(0,A.useRef)(!1),n=(0,A.useRef)(!1),s=(0,A.useCallback)(t=>{let o=is(e);ir()(!!o,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!o||!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)||0!==t.button||!!it(o,t.target)||n.current,n.current=!1},[e]),a=ie(t=>{let o=is(e);o&&it(o,t.target)?n.current=!0:n.current=!1}),l=ie(e=>{i.current||t(e)});(0,A.useEffect)(()=>{var t,i;if(o||null==e)return;let n=r7(is(e)),h=n.defaultView||window,c=null!=(t=h.event)?t:null==(i=h.parent)?void 0:i.event,d=null;ia[r]&&(d=r9(n,ia[r],a,!0));let u=r9(n,r,s,!0),p=r9(n,r,e=>{if(e===c){c=void 0;return}l(e)}),f=[];return"ontouchstart"in n.documentElement&&(f=[].slice.call(n.body.children).map(e=>r9(e,"mousemove",ii))),()=>{null==d||d(),u(),p(),f.forEach(e=>e())}},[e,o,r,s,a,l])};function ih(e){let t;if(!e||"function"==typeof e)return null;let{major:o}={major:+(t=A.version.split("."))[0],minor:+t[1],patch:+t[2]};return o>=19?e.props.ref:e.ref}let ic=()=>{},id=function(e,t,{disabled:o,clickTrigger:r}={}){let i=t||ic;il(e,i,{disabled:o,clickTrigger:r});let n=ie(e=>{("Escape"===e.code||27===e.keyCode)&&i(e)});(0,A.useEffect)(()=>{if(o||null==e)return;let t=r7(is(e)),r=(t.defaultView||window).event,i=r9(t,"keyup",e=>{if(e===r){r=void 0;return}n(e)});return()=>{i()}},[e,o,n])},iu=(0,A.createContext)(e1?window:void 0);iu.Provider;let ip=(e,t)=>e1?null==e?(t||r7()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect))?e:null:null;function im(e,t){let o=(0,A.useContext)(iu),[r,i]=(0,A.useState)(()=>ip(e,null==o?void 0:o.document));if(!r){let t=ip(e);t&&i(t)}return(0,A.useEffect)(()=>{t&&r&&t(r)},[t,r]),(0,A.useEffect)(()=>{let t=ip(e);t!==r&&i(t)},[e,r]),r}let ig=void 0!==n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,i_="u">typeof document||ig?A.useLayoutEffect:A.useEffect,iv=function({children:e,in:t,onExited:o,mountOnEnter:r,unmountOnExit:i}){let n=(0,A.useRef)(null),s=(0,A.useRef)(t),a=ie(o);(0,A.useEffect)(()=>{t?s.current=!0:a(n.current)},[t,a]);let l=o0(n,ih(e)),h=(0,A.cloneElement)(e,{ref:l});return t?h:i||!s.current&&r?null:h},iS=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"],iR=["component"],iy=A.forwardRef((e,t)=>{let{component:o}=e,r=function(e){let{onEnter:t,onEntering:o,onEntered:r,onExit:i,onExiting:n,onExited:s,addEndListener:a,children:l}=e,h=function(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(e,iS),c=(0,A.useRef)(null),d=o0(c,ih(l)),u=e=>t=>{e&&c.current&&e(c.current,t)},p=(0,A.useCallback)(u(t),[t]),f=(0,A.useCallback)(u(o),[o]),m=(0,A.useCallback)(u(r),[r]),g=(0,A.useCallback)(u(i),[i]),_=(0,A.useCallback)(u(n),[n]),v=(0,A.useCallback)(u(s),[s]),S=(0,A.useCallback)(u(a),[a]);return Object.assign({},h,{nodeRef:c},t&&{onEnter:p},o&&{onEntering:f},r&&{onEntered:m},i&&{onExit:g},n&&{onExiting:_},s&&{onExited:v},a&&{addEndListener:S},{children:"function"==typeof l?(e,t)=>l(e,Object.assign({},t,{ref:d})):(0,A.cloneElement)(l,{ref:d})})}(function(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(e,iR));return(0,or.jsx)(o,Object.assign({ref:t},r))});function iT({children:e,in:t,onExited:o,onEntered:r,transition:i}){let[n,s]=(0,A.useState)(!t);t&&n&&s(!1);let a=o0(function({in:e,onTransition:t}){let o=(0,A.useRef)(null),r=(0,A.useRef)(!0),i=ie(t);return i_(()=>{if(!o.current)return;let t=!1;return i({in:e,element:o.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,i]),i_(()=>(r.current=!1,()=>{r.current=!0}),[]),o}({in:!!t,onTransition:e=>{Promise.resolve(i(e)).then(()=>{e.isStale()||(e.in?null==r||r(e.element,e.initial):(s(!0),null==o||o(e.element)))},t=>{throw e.in||s(!0),t})}}),ih(e));return n&&!t?null:(0,A.cloneElement)(e,{ref:a})}let iC=A.forwardRef((t,o)=>{var r;let{flip:i,offset:n,placement:s,containerPadding:a,popperConfig:l={},transition:h,runTransition:c}=t,[d,u]=oQ(),[p,f]=oQ(),m=o0(u,o),g=im(t.container),_=im(t.target),[v,S]=(0,A.useState)(!t.show),R=r1(_,d,function({enabled:e,enableEvents:t,placement:o,flip:r,offset:i,fixed:n,containerPadding:s,arrowElement:a,popperConfig:l={}}){var h,c,d,u,p,f;let m,g=(f=l.modifiers,m={},Array.isArray(f)?(null==f||f.forEach(e=>{m[e.name]=e}),m):f||m);return Object.assign({},l,{placement:o,enabled:e,strategy:n?"fixed":l.strategy,modifiers:function(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}(Object.assign({},g,{eventListeners:{enabled:t,options:null==(h=g.eventListeners)?void 0:h.options},preventOverflow:Object.assign({},g.preventOverflow,{options:s?Object.assign({padding:s},null==(c=g.preventOverflow)?void 0:c.options):null==(d=g.preventOverflow)?void 0:d.options}),offset:{options:Object.assign({offset:i},null==(u=g.offset)?void 0:u.options)},arrow:Object.assign({},g.arrow,{enabled:!!a,options:Object.assign({},null==(p=g.arrow)?void 0:p.options,{element:a})}),flip:Object.assign({enabled:!!r},g.flip)}))})}({placement:s,enableEvents:!!t.show,containerPadding:a||5,flip:i,offset:n,arrowElement:p,popperConfig:l}));t.show&&v&&S(!1);let y=t.show||!v;if(id(d,t.onHide,{disabled:!t.rootClose||t.rootCloseDisabled,clickTrigger:t.rootCloseEvent}),!y)return null;let{onExit:T,onExiting:C,onEnter:w,onEntering:E,onEntered:b}=t,I=t.children(Object.assign({},R.attributes.popper,{style:R.styles.popper,ref:m}),{popper:R,placement:s,show:!!t.show,arrowProps:Object.assign({},R.attributes.arrow,{style:R.styles.arrow,ref:f})});return r={in:!!t.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:I,onExit:T,onExiting:C,onExited:(...e)=>{S(!0),t.onExited&&t.onExited(...e)},onEnter:w,onEntering:E,onEntered:b},I=h?(0,or.jsx)(iy,Object.assign({},r,{component:h})):c?(0,or.jsx)(iT,Object.assign({},r,{transition:c})):(0,or.jsx)(iv,Object.assign({},r)),g?e.createPortal(I,g):null});iC.displayName="Overlay";let iw=function(e){let t=(0,A.useRef)(e);return(0,A.useEffect)(()=>{t.current=e},[e]),t},iE=void 0!==n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,ib="u">typeof document||iE?A.useLayoutEffect:A.useEffect,iI=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,iM=function(e,t){return(0,A.useMemo)(()=>{let o,r;return o=iI(e),r=iI(t),e=>{o&&o(e),r&&r(e)}},[e,t])};function iO(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}let iN=A.createContext({prefixes:{},breakpoints:["xxl","xl","lg","md","sm","xs"],minBreakpoint:"xs"}),{Consumer:ix,Provider:iA}=iN;function iD(e,t){let{prefixes:o}=(0,A.useContext)(iN);return e||o[t]||t}function iH(){let{dir:e}=(0,A.useContext)(iN);return"rtl"===e}let iG=A.forwardRef(({className:e,bsPrefix:t,as:o="div",...r},i)=>(t=iD(t,"popover-header"),(0,or.jsx)(o,{ref:i,className:x()(e,t),...r})));iG.displayName="PopoverHeader";let ik=A.forwardRef(({className:e,bsPrefix:t,as:o="div",...r},i)=>(t=iD(t,"popover-body"),(0,or.jsx)(o,{ref:i,className:x()(e,t),...r})));function iW(e,t){let o=e;return"left"===e?o=t?"end":"start":"right"===e&&(o=t?"start":"end"),o}function iz(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}ik.displayName="PopoverBody",A.Component;let iL=A.forwardRef(({bsPrefix:e,placement:t="right",className:o,style:r,children:i,body:n,arrowProps:s,hasDoneInitialMeasure:a,popper:l,show:h,...c},d)=>{let u=iD(e,"popover"),p=iH(),[f]=(null==t?void 0:t.split("-"))||[],m=iW(f,p),g=r;return h&&!a&&(g={...r,...iz(null==l?void 0:l.strategy)}),(0,or.jsxs)("div",{ref:d,role:"tooltip",style:g,"x-placement":f,className:x()(o,u,f&&`bs-popover-${m}`),...c,children:[(0,or.jsx)("div",{className:"popover-arrow",...s}),n?(0,or.jsx)(ik,{children:i}):i]})});iL.displayName="Popover";let iF=Object.assign(iL,{Header:iG,Body:ik,POPPER_OFFSET:[0,8]}),iP=A.forwardRef(({bsPrefix:e,placement:t="right",className:o,style:r,children:i,arrowProps:n,hasDoneInitialMeasure:s,popper:a,show:l,...h},c)=>{e=iD(e,"tooltip");let d=iH(),[u]=(null==t?void 0:t.split("-"))||[],p=iW(u,d),f=r;return l&&!s&&(f={...r,...iz(null==a?void 0:a.strategy)}),(0,or.jsxs)("div",{ref:c,style:f,role:"tooltip","x-placement":u,className:x()(o,e,`bs-tooltip-${p}`),...h,children:[(0,or.jsx)("div",{className:"tooltip-arrow",...n}),(0,or.jsx)("div",{className:`${e}-inner`,children:i})]})});iP.displayName="Tooltip";let iB=Object.assign(iP,{TOOLTIP_OFFSET:[0,6]}),iZ=A.default.createContext(null);var iU="unmounted",ij="exited",iV="entering",i$="entered",iY="exiting",iK=function(t){function o(e,o){var r,i=t.call(this,e,o)||this,n=o&&!o.isMounting?e.enter:e.appear;return i.appearStatus=null,e.in?n?(r=ij,i.appearStatus=iV):r=i$:r=e.unmountOnExit||e.mountOnEnter?iU:ij,i.state={status:r},i.nextCallback=null,i}o.prototype=Object.create(t.prototype),o.prototype.constructor=o,eL(o,t),o.getDerivedStateFromProps=function(e,t){return e.in&&t.status===iU?{status:ij}:null};var r=o.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var o=this.state.status;this.props.in?o!==iV&&o!==i$&&(t=iV):(o===iV||o===i$)&&(t=iY)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e,t,o,r=this.props.timeout;return e=t=o=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,o=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:o}},r.updateStatus=function(t,o){if(void 0===t&&(t=!1),null!==o)if(this.cancelNextCallback(),o===iV){if(this.props.unmountOnExit||this.props.mountOnEnter){var r=this.props.nodeRef?this.props.nodeRef.current:e.findDOMNode(this);r&&r.scrollTop}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ij&&this.setState({status:iU})},r.performEnter=function(t){var o=this,r=this.props.enter,i=this.context?this.context.isMounting:t,n=this.props.nodeRef?[i]:[e.findDOMNode(this),i],s=n[0],a=n[1],l=this.getTimeouts(),h=i?l.appear:l.enter;(t||r)&&1?(this.props.onEnter(s,a),this.safeSetState({status:iV},function(){o.props.onEntering(s,a),o.onTransitionEnd(h,function(){o.safeSetState({status:i$},function(){o.props.onEntered(s,a)})})})):this.safeSetState({status:i$},function(){o.props.onEntered(s)})},r.performExit=function(){var t=this,o=this.props.exit,r=this.getTimeouts(),i=this.props.nodeRef?void 0:e.findDOMNode(this);o?(this.props.onExit(i),this.safeSetState({status:iY},function(){t.props.onExiting(i),t.onTransitionEnd(r.exit,function(){t.safeSetState({status:ij},function(){t.props.onExited(i)})})})):this.safeSetState({status:ij},function(){t.props.onExited(i)})},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.setNextCallback=function(e){var t=this,o=!0;return this.nextCallback=function(r){o&&(o=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(t,o){this.setNextCallback(o);var r=this.props.nodeRef?this.props.nodeRef.current:e.findDOMNode(this),i=null==t&&!this.props.addEndListener;if(!r||i)return void setTimeout(this.nextCallback,0);if(this.props.addEndListener){var n=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],s=n[0],a=n[1];this.props.addEndListener(s,a)}null!=t&&setTimeout(this.nextCallback,t)},r.render=function(){var e=this.state.status;if(e===iU)return null;var t=this.props,o=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,eK(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return A.default.createElement(iZ.Provider,{value:null},"function"==typeof o?o(e,r):A.default.cloneElement(A.default.Children.only(o),r))},o}(A.default.Component);function iq(){}iK.contextType=iZ,iK.propTypes={},iK.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:iq,onEntering:iq,onEntered:iq,onExit:iq,onExiting:iq,onExited:iq},iK.UNMOUNTED=iU,iK.EXITED=ij,iK.ENTERING=iV,iK.ENTERED=i$,iK.EXITING=iY;var iX=/([A-Z])/g,iQ=/^ms-/;function iJ(e){return e.replace(iX,"-$1").toLowerCase().replace(iQ,"-ms-")}var i0=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;let i1=function(e,t){var o,r,i="",n="";if("string"==typeof t){return e.style.getPropertyValue(iJ(t))||((r=r7(o=e))&&r.defaultView||window).getComputedStyle(o,void 0).getPropertyValue(iJ(t))}Object.keys(t).forEach(function(o){var r=t[o];r||0===r?o&&i0.test(o)?n+=o+"("+r+") ":i+=iJ(o)+": "+r+";":e.style.removeProperty(iJ(o))}),n&&(i+="transform: "+n+";"),e.style.cssText+=";"+i};function i2(e,t){let o=i1(e,t)||"",r=-1===o.indexOf("ms")?1e3:1;return parseFloat(o)*r}function i5(e,t){let o=i2(e,"transitionDuration"),r=i2(e,"transitionDelay"),i=function(e,t,o){null==o&&(i=-1===(r=i1(e,"transitionDuration")||"").indexOf("ms")?1e3:1,o=parseFloat(r)*i||0);var r,i,n,s,a,l=(n=!1,s=setTimeout(function(){n||function(e,t,o,r){if(void 0===o&&(o=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,o,r),e.dispatchEvent(i)}}(e,"transitionend",!0)},o+5),a=r9(e,"transitionend",function(){n=!0},{once:!0}),function(){clearTimeout(s),a()}),h=r9(e,"transitionend",t);return function(){l(),h()}}(e,o=>{o.target===e&&(i(),t(o))},o+r)}function i3(t){return t&&"setState"in t?e.findDOMNode(t):null!=t?t:null}let i6=A.default.forwardRef(({onEnter:e,onEntering:t,onEntered:o,onExit:r,onExiting:i,onExited:n,addEndListener:s,children:a,childRef:l,...h},c)=>{let d=(0,A.useRef)(null),u=iM(d,l),p=e=>{u(i3(e))},f=e=>t=>{e&&d.current&&e(d.current,t)},m=(0,A.useCallback)(f(e),[e]),g=(0,A.useCallback)(f(t),[t]),_=(0,A.useCallback)(f(o),[o]),v=(0,A.useCallback)(f(r),[r]),S=(0,A.useCallback)(f(i),[i]),R=(0,A.useCallback)(f(n),[n]),y=(0,A.useCallback)(f(s),[s]);return(0,or.jsx)(iK,{ref:c,...h,onEnter:m,onEntered:_,onEntering:g,onExit:v,onExited:R,onExiting:S,addEndListener:y,nodeRef:d,children:"function"==typeof a?(e,t)=>a(e,{...t,ref:p}):A.default.cloneElement(a,{ref:p})})});i6.displayName="TransitionWrapper";let i4={[iV]:"show",[i$]:"show"},i9=A.forwardRef(({className:e,children:t,transitionClasses:o={},onEnter:r,...i},n)=>{let s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},a=(0,A.useCallback)((e,t)=>{e.offsetHeight,null==r||r(e,t)},[r]);return(0,or.jsx)(i6,{ref:n,addEndListener:i5,...s,onEnter:a,childRef:ih(t),children:(r,i)=>A.cloneElement(t,{...i,className:x()("fade",e,t.props.className,i4[r],o[r])})})});i9.displayName="Fade";let i7=i9,i8=A.forwardRef(({children:e,transition:t=i7,popperConfig:o={},rootClose:r=!1,placement:i="top",show:n=!1,...s},a)=>{var l;let h,c,d,u,p,f=(0,A.useRef)({}),[m,g]=(0,A.useState)(null),[_,v]=(l=s.offset,h=(0,A.useRef)(null),c=iD(void 0,"popover"),d=iD(void 0,"tooltip"),u=(0,A.useMemo)(()=>({name:"offset",options:{offset:()=>{if(l)return l;if(h.current){if(iO(h.current,c))return iF.POPPER_OFFSET;if(iO(h.current,d))return iB.TOOLTIP_OFFSET}return[0,0]}}}),[l,c,d]),[h,[u]]),S=iM(a,_),R=!0===t?i7:t||void 0,y=(p=iw(e=>{g(e),null==o||null==o.onFirstUpdate||o.onFirstUpdate(e)}),(0,A.useCallback)(function(...e){return p.current&&p.current(...e)},[p]));return ib(()=>{m&&s.target&&(null==f.current.scheduleUpdate||f.current.scheduleUpdate())},[m,s.target]),(0,A.useEffect)(()=>{n||g(null)},[n]),(0,or.jsx)(iC,{...s,ref:S,popperConfig:{...o,modifiers:v.concat(o.modifiers||[]),onFirstUpdate:y},transition:R,rootClose:r,placement:i,show:n,children:(r,{arrowProps:i,popper:n,show:s})=>{var a;!function(e,t){let{ref:o}=e,{ref:r}=t;e.ref=o.__wrapped||(o.__wrapped=e=>o(i3(e))),t.ref=r.__wrapped||(r.__wrapped=e=>r(i3(e)))}(r,i);let l=null==n?void 0:n.placement,h=Object.assign(f.current,{state:null==n?void 0:n.state,scheduleUpdate:null==n?void 0:n.update,placement:l,outOfBoundaries:(null==n||null==(a=n.state)||null==(a=a.modifiersData.hide)?void 0:a.isReferenceHidden)||!1,strategy:o.strategy}),c=!!m;return"function"==typeof e?e({...r,placement:l,show:s,...!t&&s&&{className:"show"},popper:h,arrowProps:i,hasDoneInitialMeasure:c}):A.cloneElement(e,{...r,placement:l,arrowProps:i,popper:h,hasDoneInitialMeasure:c,className:x()(e.props.className,!t&&s&&"show"),style:{...e.props.style,...r.style}})}})});i8.displayName="Overlay";var ne=n(736),nt=n.n(ne);let no=0x80000000-1;function nr(e,t,o){let[r]=t,i=r.currentTarget,n=r.relatedTarget||r.nativeEvent[o];n&&n===i||it(i,n)||e(...t)}n(597),nt().oneOf(["click","hover","focus"]);let ni=({trigger:e=["hover","focus"],overlay:t,children:o,popperConfig:r={},show:i,defaultShow:n=!1,onToggle:s,delay:a,placement:l,flip:h=l&&-1!==l.indexOf("auto"),...c})=>{var d,u,p,f,m,g,_;let v,S,R,y,T,C,w=(0,A.useRef)(null),E=iM(w,ih(o)),b=(T=(v=(0,A.useRef)(!0),S=(0,A.useRef)(()=>v.current),(0,A.useEffect)(()=>(v.current=!0,()=>{v.current=!1}),[]),S.current),C=(0,A.useRef)(),_=()=>clearTimeout(C.current),(R=(0,A.useRef)(_)).current=_,y=R,(0,A.useEffect)(()=>()=>y.current(),[]),(0,A.useMemo)(()=>{let e=()=>clearTimeout(C.current);return{set:function(t,o=0){T()&&(e(),o<=no?C.current=setTimeout(t,o):function e(t,o,r){let i=r-Date.now();t.current=i<=no?setTimeout(o,i):setTimeout(()=>e(t,o,r),no)}(C,t,Date.now()+o))},clear:e,handleRef:C}},[])),I=(0,A.useRef)(""),[M,O]=(d=(0,A.useRef)(void 0!==i),p=(u=(0,A.useState)(n))[0],f=u[1],m=void 0!==i,g=d.current,d.current=m,!m&&g&&p!==n&&f(n),[m?i:p,(0,A.useCallback)(function(e){for(var t=arguments.length,o=Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];s&&s.apply(void 0,[e].concat(o)),f(e)},[s])]),N=a&&"object"==typeof a?a:{show:a,hide:a},{onFocus:x,onBlur:D,onClick:H}="function"!=typeof o?A.Children.only(o).props:{},G=(0,A.useCallback)(()=>{(b.clear(),I.current="show",N.show)?b.set(()=>{"show"===I.current&&O(!0)},N.show):O(!0)},[N.show,O,b]),k=(0,A.useCallback)(()=>{(b.clear(),I.current="hide",N.hide)?b.set(()=>{"hide"===I.current&&O(!1)},N.hide):O(!1)},[N.hide,O,b]),W=(0,A.useCallback)((...e)=>{G(),null==x||x(...e)},[G,x]),z=(0,A.useCallback)((...e)=>{k(),null==D||D(...e)},[k,D]),L=(0,A.useCallback)((...e)=>{O(!M),null==H||H(...e)},[H,O,M]),F=(0,A.useCallback)((...e)=>{nr(G,e,"fromElement")},[G]),P=(0,A.useCallback)((...e)=>{nr(k,e,"toElement")},[k]),B=null==e?[]:[].concat(e),Z={ref:e=>{E(i3(e))}};return -1!==B.indexOf("click")&&(Z.onClick=L),-1!==B.indexOf("focus")&&(Z.onFocus=W,Z.onBlur=z),-1!==B.indexOf("hover")&&(Z.onMouseOver=F,Z.onMouseOut=P),(0,or.jsxs)(or.Fragment,{children:["function"==typeof o?o(Z):(0,A.cloneElement)(o,Z),(0,or.jsx)(i8,{...c,show:M,onHide:k,flip:h,placement:l,popperConfig:r,target:w.current,children:t})]})},nn={},ns=document.createElement("canvas");ns.id="gk-graph-avatar-canvas";class na extends A.Component{image;constructor(e){super(e),this.image=new Image,this.image.crossOrigin="anonymous",this.image.onload=()=>this.refreshImage(),this.state={dataURL:void 0}}static getDerivedStateFromProps(e,t){return{dataURL:!e.url&&t.dataURL?void 0:t.dataURL}}componentDidMount(){let{url:e}=this.props;e&&this.startImgLoading(e)}componentDidUpdate(e){let{url:t}=this.props;t&&e.url!==t&&this.startImgLoading(t)}componentWillUnmount(){this.image=void 0}refreshImage(){let e;if(this.image){if(this.image.complete){let t=this.image.height,o=this.image.width,r=ns.getContext("2d");r.canvas.width=o,r.canvas.height=t,r.drawImage(this.image,0,0,o,t),e=ns.toDataURL(),nn[this.image.src]=e}this.setState({dataURL:e})}}startImgLoading(e){if(!this.image)return;let t=nn[e];t?this.setState({dataURL:t}):this.image.src=e}render(){let{avatarClassName:e,avatarStyle:t,children:o,className:r,context:i,enableTransparentBackground:n,style:s,height:a,hint:l,size:h,width:c}=this.props,{dataURL:d}=this.state,u=!d,p=u?s:{...s,...t,background:`url(${d}) center / cover no-repeat ${n?"":"var(--app__bg0, #1c1e23)"} padding-box`,height:a||h,width:c||h},f=x()(r,u?"":e,!u&&{avatar:!0}),m=u?A.createElement(A.Fragment,null,o):void 0;return A.createElement("div",{className:f,"data-test-class":d?"avatar":"local-avatar","data-vscode-context":(0,ea.DO)(i),style:p,title:l},m)}}function nl({icon:e,tooltipClassName:t,tooltipId:o,tooltipText:r}){return r&&o?A.createElement(ni,{delay:400,overlay:A.createElement(iB,{className:x()("gk-graph","bs-tooltip",t),id:o},r),placement:"top",trigger:["hover","focus"]},e||A.createElement("span",null)):A.createElement(A.Fragment,null," ",e||A.createElement("span",null)," ")}function nh({id:e,toolTipText:t,getExternalIcon:o,issueTrackerType:r}){return A.createElement(nl,{icon:o(`issue-${r}`),tooltipClassName:"wide pull-left",tooltipId:`issue-tooltip-${e}`,tooltipText:t?t.trim():""})}function nc({hostingServiceType:e,icon:t,id:o,toolTipText:r}){return A.createElement(nl,{icon:t,tooltipClassName:"wide pull-left",tooltipId:`pr-tooltip-${e}-${o}`,tooltipText:r?r.trim():""})}function nd({icon:e,type:t,upstream:o,tooltipText:r}){return A.createElement(nl,{icon:e,tooltipClassName:"wide pull-left",tooltipId:`upstream-indicator-tooltip-${t}-${o}`,tooltipText:r})}function nu({avatarClassName:e,avatarUrl:t,context:o,icon:r,tooltipText:i}){return A.createElement(nl,{icon:A.createElement("span",{className:"ref-avatar"},A.createElement(na,{avatarClassName:e??void 0,context:o,enableTransparentBackground:!0,size:14,url:t??void 0},r)),tooltipId:`remote-icon-${i||"tooltipText"}`,tooltipText:i})}var np=n(599),nf=n(366),nm=function({className:e,name:t}){return A.createElement("span",{className:x()("ref-name","truncate",e),style:{height:V.F0}},t)};let ng=A.default.forwardRef(({children:e,className:t,isRefGhost:o,isRefHidden:r,isRefActive:i,isRefPinned:n,...s},a)=>{let l=x()(t,"relative",{"display-none":!e}),h=x()("absolute top-0 bottom-0 left-0 right-0 pointer-events-none"),c=!r&&!o;return A.default.createElement("div",{...s,className:l,ref:a},c&&i&&A.default.createElement("div",{className:h,id:V.ax}),c&&n&&A.default.createElement("div",{className:h,id:V.MQ}),e)});function n_(e,t,o,r=0){let i,n,s,{annotated:a,refType:l,message:h,name:c}=t;switch(l){case ev.z.REMOTE:{n=t.hostingServiceType?`${ev.z.REMOTE}-${t.hostingServiceType}`:ev.z.REMOTE,i=t.avatarUrl;let e=`${c} (${o("Ref-Remote")})`;s=t.owner?`${t.owner} -> ${e}`:e;break}case ev.z.TAG:n=ev.z.TAG,s=`${a&&h?h:c} (${o("Ref-Tag")})`;break;case ev.z.HEAD:default:{let e=null!=t.worktreeId;n=e?ev.z.WORKTREE:ev.z.HEAD,s=`${c} (${o(e?"Ref-Worktree":"Ref-Local")})`}}let d=t.context||void 0,u=A.createElement("span",{"data-vscode-context":(0,ea.DO)(d)},e(n));return A.createElement(nu,{avatarUrl:i||"",context:d??null,icon:u,key:`ref-icon-${r}-${l}-${c}`,tooltipText:s})}ng.displayName="RefNodeAnnotationTarget";class nv extends A.PureComponent{getContextForRefGroupIfExists(e,t,o){let r,i=!1,n=!1,s=!1;for(let a of e){if(a.refType===ev.z.HEAD)return o?a.contextGroup||t:a.context;a.refType===ev.z.REMOTE&&("origin"===a.owner?(i=!0,r=o?a.contextGroup||t:a.context):i||"upstream"!==a.owner?i||n||(s=!0,r=o?a.contextGroup||t:a.context):(n=!0,r=o?a.contextGroup||t:a.context)),i||n||s||(r=o?a.contextGroup||t:a.context)}return r}getDecoratedRefIcon(e,t,o,r,i){return A.createElement("div",{className:i,"data-vscode-context":(0,ea.DO)(r),key:e,onClick:e=>this.onClickMetadata(e,o),onDoubleClick:e=>this.onDoubleClickMetadata(e,o)},t)}getPullRequestIconsAndTooltipsForRef(e,t,o){let r,{fallbackRefMetadata:i,getExternalIcon:n,onMissingRefMetadata:s,translate:a}=this.props;if(!(r=t.refType===ev.z.HEAD?t.upstream?e?.[t.upstream.id]?.[el.ki]:null:(0,ea.yb)(t,e,s,el.ki,i))||0===r.length)return null;let l=[];for(let e of r){let{context:r,hostingServiceType:i,id:s,title:h}=e;if(o.has(s))continue;o.add(s);let c={refId:t.id,type:el.ki,data:e},d=`pr-icon-${t.refType}-${t.name}-${s}`,u=this.getDecoratedRefIcon(d,n("pull-request"),c,r,x()("ref-pull-request"));l.push(A.createElement(nc,{hostingServiceType:i,icon:u,id:s,key:d,toolTipText:h&&""!==h.trim()?a("PullRequestIcon-Tooltip",s,h,(0,np.T)(i)):""}))}return l}getUpstreamIndicatorIconsAndTooltipsForRef(e,t){let{fallbackRefMetadata:o,getExternalIcon:r,onMissingRefMetadata:i,translate:n}=this.props,s=(0,ea.yb)(t,e,i,el.RA,o);if(!s||0===s.ahead&&0===s.behind)return null;let a={refId:t.id,type:el.RA,data:s},l=s.ahead>0,h=s.behind>0,c=s.context;if(l||h){let e,o,i=l?`${s.ahead>99?"99+":s.ahead}`:"",d=h?`${s.behind>99?"99+":s.behind}`:"",u=`${s.owner}/${s.name}`;h&&l?(e=n("UpstreamIndicatorIcon-BehindAndAheadTooltip",d,i,u),o="ahead-behind"):h?(e=n("UpstreamIndicatorIcon-BehindTooltip",d,u),o="behind"):(e=n("UpstreamIndicatorIcon-AheadTooltip",i,u),o="ahead");let p=A.createElement(A.Fragment,null,h?A.createElement(A.Fragment,null,A.createElement("span",{className:"ref-upstream-behind"},d),r("upstream-behind")):null,l?A.createElement(A.Fragment,null,A.createElement("span",{className:"ref-upstream-ahead"},i),r("upstream-ahead")):null);return A.createElement(nd,{icon:this.getDecoratedRefIcon(`ref-upstream-${t.id}`,p,a,c,"ref-upstream"),tooltipText:e,type:o,upstream:u})}return null}getIssueIconsAndTooltipsForRef(e,t,o){let{fallbackRefMetadata:r,getExternalIcon:i,onMissingRefMetadata:n,translate:s}=this.props,a=(0,ea.yb)(t,e,n,el.fd,r);if(!a||0===a.length)return null;let l=[];for(let e of a){if(o.has(e.id))continue;let r={refId:t.id,type:el.fd,data:e};o.add(e.id);let n=A.createElement(nh,{getExternalIcon:i,id:e.id,issueTrackerType:e.issueTrackerType,key:`issue-icon-${e.id}`,toolTipText:e.title&&""!==e.title.trim()?s("IssueIcon-Tooltip",e.displayId,e.title):""}),a=e.context||void 0;l.push(this.getDecoratedRefIcon(`ref-issue-${e.id}`,n,r,a,x()("ref-issue")))}return l}onContextMenu=e=>{let{onContextMenu:t,refGroup:o,sha:r}=this.props;t(e,o,r)};onClick=e=>{let{onClick:t,refGroup:o,sha:r}=this.props;t(e,o,r)};onClickMetadata=(e,t)=>{e.stopPropagation();let{onClick:o,refGroup:r,sha:i}=this.props;o(e,r,i,t)};onDoubleClick=e=>{let{onDoubleClick:t,refGroup:o,sha:r}=this.props;t(e,o,r)};onDoubleClickMetadata=(e,t)=>{e.stopPropagation();let{onDoubleClick:o,refGroup:r,sha:i}=this.props;o(e,r,i,t)};render(){let{className:e,enableShowHideRefsOptions:t,hasActive:o,hasRefs:r,isHidden:i,isActive:n,isGhostRef:s,isPinned:a,getExternalIcon:l,groupIsHovered:h,isInUnsupportedRebase:c,onRefBeginDrag:d,onRefDragEnter:u,onRefDragLeave:p,onRefDrop:f,onRefCanDrag:m,onRefCanDrop:g,onRefEndDrag:_,isRefGroupIncluded:v,refGroup:S,refGroupContext:R,refIconsPosition:y,refMetadata:T,onHovered:C,onHideRefClick:w,sha:E,showRemoteNamesOnRefs:b,enabledRefMetadataTypes:I,translate:M,type:O,useColumnHeaderIcons:N}=this.props,D=t&&!o&&h&&!v,H=y===ev.E.LEFT,G=y===ev.E.RIGHT,k=x()("ref-node-wrapper","flex"),W={minWidth:0,marginLeft:3,height:V.$0},z=x()("ref-node","flex","items-center","p1",{"has-active":o,"dim-ref":!r&&h,"is-active":n}),L="";S.length>0&&(L=b&&S[0].fullName||S[0].name);let F=x()({"display-none":N&&!h&&G,mr1:G}),P=A.createElement(nm,{className:F,name:L}),B=[],Z=[],U=[],j=null,$=new Set,Y=new Set;S.forEach((e,t)=>{if(B.push(n_(l,e,M,t)),I.includes(el.fd)&&(e.refType===ev.z.HEAD||e.refType===ev.z.REMOTE)){let t=this.getIssueIconsAndTooltipsForRef(T,e,Y);t&&U.push(...t)}if(I.includes(el.ki)&&e.refType===ev.z.REMOTE){let t=this.getPullRequestIconsAndTooltipsForRef(T,e,$);t&&Z.push(...t)}I.includes(el.RA)&&e.refType===ev.z.HEAD&&(j=this.getUpstreamIndicatorIconsAndTooltipsForRef(T,e))});let K=A.createElement("span",{className:x()("flex","items-center","ref-icons",{"is-active":n,"is-left-position":H})},[...B,...Z,...U]),q=n?A.createElement(nl,{icon:A.createElement("span",{className:"ref-icon-current"},l("check")),tooltipId:"ref-icon-current",tooltipText:M("Ref-Current")}):a?A.createElement(nl,{icon:A.createElement("span",{className:"ref-icon-pinned"},l("pin")),tooltipId:"ref-icon-pinned",tooltipText:M("Ref-Pinned")}):null,X=this.getContextForRefGroupIfExists(S,R),Q=this.getContextForRefGroupIfExists(S,R,!0),J=D?A.createElement("span",{className:"flex ml-auto"},A.createElement(nl,{icon:A.createElement("span",{className:x()("mr1","button"),onClick:e=>w(e,S,E)},l("hide")),tooltipId:`ref-node-toggle-visibility-btn-${L}`,tooltipText:M("Hide")})):null;return A.createElement("div",{className:x()(e,{hidden:i})},A.createElement(nf.A,{canDrag:e=>m(e),canDrop:(e,t,o)=>g(e,t,o),className:k,"data-vscode-context":(0,ea.DO)(Q),dndData:{commitType:O,isGhostRef:s,isInUnsupportedRebase:c,refGroup:S,sha:E},dndId:`DndRefNode_${S[0].id}`,onBeginDrag:(e,t)=>d(e,t),onDragEnter:(e,t,o)=>u(e,t,o),onDragLeave:(e,t,o)=>p(e,t,o),onDrop:(e,t,o)=>f(e,t,o),onEndDrag:(e,t,o)=>_(e,t,o),style:W},A.createElement("span",{className:z,"data-test-class":"ref-node-span","data-vscode-context":(0,ea.DO)(X),onContextMenu:c?void 0:this.onContextMenu,onDoubleClick:c?void 0:this.onDoubleClick,onMouseDown:this.onClick,onMouseEnter:e=>C(e,S,E),style:{minWidth:"100%"}},A.createElement(ng,{className:"ref-icon",isRefActive:n,isRefGhost:s,isRefHidden:i??!1,isRefPinned:a},q),H&&K,P,G&&K,j,J)))}}class nS extends A.Component{headIconsRef=A.createRef();containerRef=A.createRef();popoverMenuTargetRef=A.createRef();constructor(e){super(e),this.state={showPopoverMenu:!1}}onHiddenRefsClick=e=>{let{showPopoverMenu:t}=this.state;e.stopPropagation(),this.setState({showPopoverMenu:!t})};onShowRefNodes=(e,t,o)=>{this.props.onToggleRefNodesShown(e,t,o),(0,ed.xV)(this.props.excludeRefsById)||this.setState({showPopoverMenu:!0})};compareGraphRefOpts(e,t){let o=e.name.localeCompare(t.name);return 0===o&&e.type===ev.z.REMOTE?-1:o}render(){let{columnSetting:e,enableResizer:t,enableShowHideRefsOptions:o,getExternalIcon:r,graphWidth:i,graphZones:n,graphZoneType:s,excludeRefsById:a,headerZoneAction:l,includeOnlyRefsById:h,isDraggable:c,onFilterColumnClick:d,onHover:u,onResize:p,onResizeEnd:f,onResizeFromPropChange:m,onResizeStart:g,onUnhover:_,onSettingsClick:v,rowsStatsLoading:S,settingsContext:R,showRemoteNamesOnRefs:y,translate:T}=this.props,{showPopoverMenu:C}=this.state,w=(0,ea.Et)(s,n);if(!w)return null;let E=(0,ea.z)(s,n),b=w.currentWidth-V.WQ,I=`${s}-header`,M=(0,ea.uQ)(w),O=e?.isFilterable||!1,N=M&&(O||o),D=x()("columns-btn",{"small-btn":N}),H=null,G=null;if(s===V.ui){let e=Object.entries(a),t=Object.values(h),i=t.length>0,n=i&&t.some(e=>e.type===ev.z.TAG),s=e.filter(e=>e[1].type===ev.z.TAG&&(!i||!n)||!h[e[0]]);s.length>0&&(G=s.sort((e,t)=>this.compareGraphRefOpts(e[1],t[1])).map((e,t)=>{let o=e[0],i=e[1];a[o].id=o;let n={name:i.name,refType:i.type,owner:i.owner,avatarUrl:i.avatarUrl},s=(y||"*"===n.name)&&n.refType===ev.z.REMOTE?`${n.owner}/${n.name}`:n.name;return A.createElement("li",{id:o,key:o,onClick:e=>this.onShowRefNodes(e,[a[o]],!0)},n_(r,n,T,t),A.createElement("span",{className:"ml1 text-ellipsis"},s))}),H=o?A.createElement("div",{className:x()(D,"right","text-normal","button",C?"active":null),ref:this.popoverMenuTargetRef},A.createElement(nl,{icon:A.createElement("span",{onClick:this.onHiddenRefsClick},r("hide")),tooltipId:"header-ref-node-hidden-refs-btn",tooltipText:T("GraphHeader-HiddenRefs-btn")})):null)}let k=O?A.createElement("div",{className:x()(D,"columns-filter","right","fs-1",{filtering:e?.isFilterActive||!1})},A.createElement(nl,{icon:A.createElement("span",{className:"columns-filter-icon text-disabled hover-icon",id:`${s}-header-filter`,onClick:e=>d(e,s),style:{height:V.bo,marginBottom:V.Qb}},r("filter")),tooltipId:"header-columns-filter",tooltipText:T("GraphHeader-Filter")})):null,W=!M&&s===V.Sq&&S?A.createElement("span",{className:x()(D,"spinner")},r("loading")):null,z=A.createElement(i8,{container:this.containerRef.current,onHide:C?()=>{this.setState({showPopoverMenu:!1})}:void 0,placement:"bottom",rootClose:C,show:C,target:this.popoverMenuTargetRef.current},e=>A.createElement(iF,{className:x()({"is-last-header":E}),id:"opts-popover",...e},A.createElement("ul",null,G))),L=E&&v?A.createElement("div",{className:x()("columns-btn","columns-settings","right","fs-1"),"data-vscode-context":(0,ea.DO)(R)},A.createElement(nl,{icon:A.createElement("span",{className:"columns-settings-icon text-disabled hover-icon",onClick:e=>v(e,i)},r("settings")),tooltipId:"header-columns-settings",tooltipText:T("GraphHeader-EditColumns")})):null,F=this.headIconsRef?.current?.clientWidth??0,P=A.createElement("div",{className:"header-columns-icons",ref:this.headIconsRef},l,L,W,k,H),B=M?A.createElement(A.Fragment,null,A.createElement("div",{className:x()(D,"justify-start",{ml1:!N}),style:{width:b-F},title:T(w.headerLabelUntranslated)},r((0,ea.n0)(s))),P):A.createElement(A.Fragment,null,A.createElement("div",{className:"text-disabled text-ellipsis",style:{height:V.bo,overflow:"hidden",width:b-F}},A.createElement("span",{className:"fs-1 ml1 font-monospace"},T(w.headerLabelUntranslated))),P),Z=A.createElement("div",{onMouseEnter:u,onMouseLeave:_},z,B),U=x()("panel-bg0","graph-header",{"is-draggable":c,"is-last-header":E});return A.createElement("div",{className:U,id:I,key:I,ref:this.containerRef,style:{zIndex:2,transform:"translate3d(0, 0, 0)",...E?{minWidth:b}:{display:"flex",minWidth:w.currentWidth,width:w.currentWidth}}},E?Z:A.createElement(oI,{className:U,enable:t,handleStyles:{right:{right:0}},height:V.bo,id:`${s}HeaderColumn`,onResize:p?e=>p(w,e):void 0,onResizeEnd:f?e=>f(w,e):void 0,onResizeFromPropChange:m?e=>m(w,e):void 0,onResizeStart:g?e=>g(w,e):void 0,resizeContentClassName:"z1",resizeEdge:"right",resizeHandleClassName:"z2 border-right",style:{display:"flex"},translate:T,width:w.currentWidth,widthConstraints:(0,ea.qC)(s,n,i)},Z))}}class nR extends A.PureComponent{canDrag=!1;isDraggable=e=>this.canDrag&&e.props.isDraggable;isDroppable=(e,t)=>e.props.graphZoneType!==t?.props?.graphZoneType&&(!t||t.props.isDroppable);onDrop=(e,t)=>{this.props.onColumnReOrdered&&this.props.onColumnReOrdered(e.props.graphZoneType,t?t.props.graphZoneType:null)};onZoneHover=()=>{this.canDrag=!0};onZoneUnHover=()=>{this.canDrag=!1};render(){let{columnsSettings:e,dragAppendToContainer:t,enableResizer:o,enableShowHideRefsOptions:r,getExternalIcon:i,excludeRefsById:n,headerContext:s,headerZoneActions:a,includeOnlyRefsById:l,onFilterColumnClick:h,onPopupGraphHeaderContextMenu:c,onGraphZoneResize:d,onGraphZoneResizeEnd:u,onGraphZoneResizeFromPropChange:p,onSettingsClick:f,onToggleRefNodesShown:m,graphZones:g,repoPath:_,rowsStatsLoading:v,showRemoteNamesOnRefs:S,translate:R,width:y,height:T,settingsContext:C}=this.props,w=A.createElement("div",{className:"panel-bg0",style:{height:V.bo,marginBottom:V.Qb,marginLeft:-V.xY,minWidth:V.xY+V.WQ}});return A.createElement("div",{className:"graph-header flex","data-vscode-context":(0,ea.DO)(s),onContextMenu:c?e=>c(e,y):void 0,onMouseDownCapture:this.props.onMouseDownCapture,onMouseMoveCapture:this.props.onMouseMoveCapture,onMouseUpCapture:this.props.onMouseUpCapture,onWheelCapture:this.props.onWheel,style:{height:V.bo,marginBottom:V.Qb}},w,A.createElement(oX,{className:"flex",direction:"horizontal",isDraggable:this.isDraggable,isDroppable:this.isDroppable,mirrorContainer:t,onDrop:this.onDrop},g.map(t=>A.createElement(nS,{columnSetting:e[t.type],enableResizer:o,enableShowHideRefsOptions:r,excludeRefsById:n,getExternalIcon:i,graphHeight:T,graphWidth:y,graphZones:g,graphZoneType:t.type,headerZoneAction:a?.[t.type],id:`${t.type}Header`,includeOnlyRefsById:l,isDraggable:t.isCustomizable,isDroppable:t.isCustomizable,key:`${t.type}Header`,onFilterColumnClick:h,onHover:this.onZoneHover,onResize:d,onResizeEnd:u,onResizeFromPropChange:p,onSettingsClick:f,onToggleRefNodesShown:m,onUnhover:this.onZoneUnHover,repoPath:_,rowsStatsLoading:v,settingsContext:C,showRemoteNamesOnRefs:S,translate:R}))))}}var ny=n(484);let nT=/[^a-zA-Z0-9_\--]/g,nC=new Map,nw=new Map;function nE(e){return e.replace(nT,e=>`\\${e}`)}function nb(e){let t=nC.get(e);if(null!=t)return t;let o=`--row-${nE(e)}`;return nC.set(e,o),o}function nI(e){let t=nw.get(e);if(null!=t)return t;let o=`--row-adornment-${nE(e)}`;return nw.set(e,o),o}var nM=function({sha:e,content:t,isHovered:o,isSelected:r}){if(null==t)return null;let i=x()("row-adornment-overlay",{"is-selected":r,"is-hovered":!r&&o}),n={positionAnchor:nb(e),anchorName:nI(e)};return A.createElement("div",{className:i,"data-sha":e,style:n},t)};class nO extends A.Component{adornments=new Map;pendingResolves=new Map;provideAbortController;resolveIdCounter=0;state={cacheVersion:0};componentDidMount(){this.setupProvider()}componentDidUpdate(e){if(e.provider!==this.props.provider&&(this.teardownProvider(e.provider),this.setupProvider()),this.adornments.size){let e=this.props.getVisibleRows();this.evictDistantAdornments(e)}}componentWillUnmount(){this.teardownProvider(this.props.provider)}setupProvider(){this.props.provider.invalidate?.addEventListener(ny.e.type,this.onInvalidate)}teardownProvider(e){this.provideAbortController?.abort(),this.provideAbortController=void 0,this.pendingResolves.clear(),this.adornments.clear(),e.invalidate?.removeEventListener(ny.e.type,this.onInvalidate)}onInvalidate=e=>{let{shas:t,type:o}=e.detail;if("all"===o)if(t)for(let e of t)this.adornments.delete(e);else this.adornments.clear();else if(t)for(let e of t){let t=this.adornments.get(e);t&&(t.content=void 0)}else for(let e of this.adornments.values())e.content=void 0;this.setState(e=>({cacheVersion:e.cacheVersion+1}))};provideForVisibleRows(e){let{provider:t}=this.props,o=e.filter(e=>!this.adornments.has(e.sha));if(!o.length)return;this.provideAbortController?.abort(),this.provideAbortController=new AbortController;let r=this.provideAbortController.signal,i=t.provideAdornments(o,r);i instanceof Promise?i.then(e=>{r.aborted||(this.applyProvideResults(e),this.setState(e=>({cacheVersion:e.cacheVersion+1})))}).catch(()=>{}):this.applyProvideResults(i)}applyProvideResults(e){for(let[t,o]of Object.entries(e))this.adornments.set(t,{visibility:o.visibility??!0,dynamic:o.dynamic??!1,context:o.context,content:void 0})}evictDistantAdornments(e,t=100){let{allRows:o}=this.props;if(0===e.length||0===this.adornments.size)return;let r=e.map(e=>e.rowIndex??-1).filter(e=>e>=0);if(0===r.length)return;let i=Math.min(...r),n=Math.max(...r),s=new Set,a=Math.max(0,i-t),l=Math.min(o.length-1,n+t);for(let e=a;e<=l;e++){let t=o[e];t&&s.add(t.sha)}for(let e of this.adornments.keys())s.has(e)||(this.adornments.delete(e),this.pendingResolves.delete(e))}shouldShowAdornment(e,t){if(!0===e)return!0;for(let o of e)if("hover"===o&&t.isHovered||"focus"===o&&t.isFocused||"selected"===o&&t.isSelected)return!0;return!1}getOrResolveContent(e){let{provider:t}=this.props,o=this.adornments.get(e.sha);if(!o)return;if(void 0!==o.content&&!o.dynamic)return o.content;let r=t.resolveAdornment(e,o.context);if(r instanceof Promise){let t=++this.resolveIdCounter;this.pendingResolves.set(e.sha,t),r.then(r=>{this.pendingResolves.get(e.sha)===t&&(this.pendingResolves.delete(e.sha),o.dynamic||(o.content=r),this.setState(e=>({cacheVersion:e.cacheVersion+1})))}).catch(()=>{this.pendingResolves.delete(e.sha)});return}return o.dynamic||(o.content=r),r}render(){let{getVisibleRows:e,selectedShas:t,hoveredSha:o,focusedSha:r}=this.props,i=e();this.provideForVisibleRows(i);let n=[];for(let e of i){let i=this.adornments.get(e.sha);if(!i)continue;let s={isHovered:o===e.sha,isFocused:r===e.sha,isSelected:t.has(e.sha)};if(!this.shouldShowAdornment(i.visibility,s))continue;let a=this.getOrResolveContent(e);null!=a&&n.push(A.createElement(nM,{content:a,isHovered:s.isHovered,isSelected:s.isSelected,key:e.sha,sha:e.sha}))}if(!n.length)return null;let{hasVerticalScrollbar:s}=this.props;return A.createElement("div",{className:s?"row-adornment-overlay-container has-scrollbar":"row-adornment-overlay-container"},n)}}var nN=n(83);class nx extends A.Component{render(){let{fileDiffType:e,getExternalIcon:t,translate:o,noMargin:r}=this.props;if(!e)return null;let i=(e=>{switch(e){case nN.g.ADDED:return"added";case nN.g.MODIFIED:return"modified";case nN.g.DELETED:return"deleted";case nN.g.RENAMED:return"renamed";default:return null}})(e),n=(e=>{switch(e){case nN.g.ADDED:return"color-green";case nN.g.MODIFIED:return"color-orange";case nN.g.DELETED:return"color-red";case nN.g.RENAMED:return"color-blue";default:return null}})(e),s=(e=>{switch(e){case nN.g.ADDED:return"CommitDiffSection-FileAdded";case nN.g.MODIFIED:return"CommitDiffSection-FileModified";case nN.g.DELETED:return"CommitDiffSection-FileDeleted";case nN.g.RENAMED:return"CommitDiffSection-FileRenamed";default:return null}})(e),a=x()("fs-1",n,{mr1:!r});return A.createElement("span",{className:a,title:o(s)},i&&t(i))}}var nA=function({workDirStats:e,getExternalIcon:t,translate:o}){let{added:r,deleted:i,modified:n}=e,{g:s}=nN;if(!r&&!i&&!n){let e=o("WipStatsPill-NoChanges");return A.createElement("span",{"aria-label":e,className:"wip-stats-pill wip-stats-pill--clean",title:e},A.createElement("span",{"aria-hidden":"true",className:"wip-stats-pill__check"},"✓"))}return A.createElement("span",{className:"wip-stats-pill"},r>0&&A.createElement("span",{className:"wip-stats-pill__item wip-stats-pill__item--added"},A.createElement(nx,{fileDiffType:s.ADDED,getExternalIcon:t,noMargin:!0,style:{},translate:o}),A.createElement("span",{className:"wip-stats-pill__count"},r)),n>0&&A.createElement("span",{className:"wip-stats-pill__item wip-stats-pill__item--modified"},A.createElement(nx,{fileDiffType:s.MODIFIED,getExternalIcon:t,noMargin:!0,style:{},translate:o}),A.createElement("span",{className:"wip-stats-pill__count"},n)),i>0&&A.createElement("span",{className:"wip-stats-pill__item wip-stats-pill__item--deleted"},A.createElement(nx,{fileDiffType:s.DELETED,getExternalIcon:t,noMargin:!0,style:{},translate:o}),A.createElement("span",{className:"wip-stats-pill__count"},i)))},nD=function({sha:e,workDirStats:t,getExternalIcon:o,translate:r,isHovered:i,isSelected:n}){let s=x()("wip-stats-pill-overlay",{"is-selected":n,"is-hovered":!n&&i}),a={positionAnchor:nb(e),right:`anchor(${nI(e)} left, var(--wip-stats-pill-overlay-fallback-right))`};return A.createElement("div",{className:s,"data-sha":e,style:a},A.createElement(nA,{getExternalIcon:o,translate:r,workDirStats:t}))},nH=function({getVisibleRows:e,selectedShas:t,hoveredSha:o,hasVerticalScrollbar:r,workDirStats:i,wipNodeMetadataBySha:n,wipMessageEditable:s,getExternalIcon:a,translate:l}){let h=e(),c=[];for(let e of h){if(e.type!==L.bY)continue;let{effectiveWorkDirStats:r,isWipEditable:h,customWipContent:d}=eu(e.sha,e.type,i,n,s);h||d||!r||c.push(A.createElement(nD,{getExternalIcon:a,isHovered:o===e.sha,isSelected:t.has(e.sha),key:e.sha,sha:e.sha,translate:l,workDirStats:r}))}return c.length?A.createElement("div",{className:x()("wip-stats-pill-overlay-container",{"has-scrollbar":r})},c):null};function nG(e){let{constraints:{max:t,min:o},stats:{files:r,additions:i,deletions:n},getExternalIcon:s,isLastColumn:a,isRowSelected:l,verticalScrollWidth:h,zoneWidth:c}=e,d=i+n,u=Math.max(o,Math.min(t,d)),p=a?h+V.KA:V.KA;d<=u&&(p+=V.KA);let f=Math.max(V.MT,u/t*(c-52-p));return A.createElement("div",{className:x()("changes-zone",l?"selected":null)},A.createElement("span",{className:"changes-files",style:{width:52}},A.createElement("span",{className:"mr1"},s("files")),A.createElement("span",{className:"mr1"},r>999?"999+":r)),A.createElement("span",{className:"changes-bar",style:{width:f}},i?A.createElement("div",{className:"changes-sub-bar added",style:{width:i/d*f}}):null,n?A.createElement("div",{className:"changes-sub-bar deleted",style:{width:n/d*f}}):null))}let nk=A.createElement("div",{className:"color-strip height-100",style:{width:2}}),nW={},nz={};class nL extends A.PureComponent{render(){let e,t,{clearCurrentlyHoveredGraphCommit:o,children:r,column:i,columnForColoring:n,context:s,currentlyHoveredCommitSha:a,dimRowsOfSelectedCommit:l,getExternalIcon:h,graphZoneType:c,hasActive:d,hasAvatars:u,highlightRowsOnRefHover:p,isDimmedMergeCommitRow:f,isHighlighted:m,isHovering:g,isLastColumn:_,isInUnsupportedRebase:v,isMissingHoveredRefGroup:S,isSelected:R,numGraphColumns:y,onContextMenu:T,onClickCommit:C,onDoubleClickCommit:w,rowContext:E,scopeBoundaryKind:b,sha:I,showColorStrip:M,showConflictIcon:O,showTimeline:N,setAsCurrentlyHoveredGraphCommit:D,style:H,title:G,type:k,verticalScrollWidth:W,zoneWidth:z}=this.props,L=((t=nW[e=k+g.toString()])||(t=x()("graph-row-wrapper","grow-3","height-100","graph-zone-column","min-width-0","pb3","pointer","pt3","relative",k,{"is-hovering":g}),nW[e]=t),t),F=function(e,t,o,r,i,n=!1,s=!1,a=!1,l=!1,h,c=!1){let d=`${e}${t}${r}${o}${n}${s}${a}${l}${i}${h??""}${c}`,u=nz[d];return u||(u=x()(`column-${t%i+1}`,"graph-row","height-100-percent","flex",e,{"is-selected":r},{"is-highlighted":o},{"dimmed-row":l&&!o||n&&(s||a)},{"scope-fork-point":"forkPoint"===h,"scope-merge-target":"mergeTarget"===h},{"has-active":c}),nz[d]=u),u}(k,n??i,m,R,y,S,p,l,f,b,d),P=N?A.createElement(oA,null):null,B=_?{anchorName:nb(I)}:void 0;return A.createElement("div",{className:L,"data-vscode-context":(0,ea.DO)(E),onContextMenu:v?void 0:e=>T(e,c,I),onDoubleClick:e=>w(e,c,I),onMouseDown:e=>C(e,c,I),onMouseEnter:e=>D(e,c,I,a??void 0),onMouseLeave:e=>o(e,c,I,a??void 0),style:{...H,...B}},P,A.createElement("div",{className:F,"data-vscode-context":(0,ea.DO)(s)},M?nk:null,O?A.createElement("span",{className:x()("ml2")},h("warning")):null,A.createElement("span",{className:x()("graph-zone","width-100","flex-1"),style:{lineHeight:`${V.$0}px`,..._&&{width:z-W},...u&&{marginLeft:5}},title:G??void 0},r)))}}function nF(e){let t=(e||"").trim().toUpperCase();if(0===t.length)return"?";let o=t.split(" ");return 1===o.length?o[0][0]:o.length>1?o[0][0]+o[o.length-1][0]:"?"}function nP(e,t){return e&&t?`${e} <${t}>`:e||t||""}class nB extends A.Component{constructor(e){super(e),this.state={tooltipText:""}}getDefaultAvatar=(e,t,o)=>{var r;let{authorInitials:i,column:n,context:s,cssVariables:a,style:l,fontSize:h,minWidth:c,size:d,title:u=""}=this.props,p=void 0!==n&&a[(0,P.$6)(n)]||V.BP,f=("hsla"===(r=z(p.trim())).type&&(r=k(r)),(299*r.r+587*r.g+114*r.b)/1e3<128)?"#FFFFFF":"#000000",m={alignItems:"center",backgroundColor:p,backgroundSize:d,color:f,display:"flex",fontSize:`${h}px`,fontWeight:"bold",height:e,justifyContent:"center",minWidth:c,top:o,width:t,...l};return A.createElement("div",{className:this.getAvatarClassName(),"data-vscode-context":(0,ea.DO)(s),style:m,title:u},i?i.toUpperCase():"")};ensureTooltipText=()=>{let{tooltip:e}=this.props;this.setState({tooltipText:"function"==typeof e?e():e})};getAvatarClassName(){return x()("avatar","gravatar","rad2",this.props.className)}render(){let{tooltipText:e}=this.state,{avatarUrl:t,context:o,style:r,height:i,minWidth:n,size:s,title:a="",tooltip:l,top:h,useAuthorInitialsForAvatars:c,width:d}=this.props,u=i||s,p=d||s,f=h||V.lH/2-u/2,m={top:f,minWidth:n,...r},g=this.getDefaultAvatar(u,p,f),_=c?g:A.createElement("span",null,A.createElement(na,{avatarClassName:this.getAvatarClassName(),avatarStyle:m,context:o,height:u,hint:a,size:s,url:t??void 0,width:p},this.getDefaultAvatar(u,p,f)));return l?A.createElement(ni,{delay:250,onEnter:this.ensureTooltipText,overlay:A.createElement(iB,{className:"gk-graph",id:"graph-gravatar-tooltip"},e),placement:"top",trigger:["hover","focus"]},_):_}}let nZ={type:nt().string,tooltip:nt().bool,as:nt().elementType},nU=A.forwardRef(({as:e="div",className:t,type:o="valid",tooltip:r=!1,...i},n)=>(0,or.jsx)(e,{...i,ref:n,className:x()(t,`${o}-${r?"tooltip":"feedback"}`)}));nU.displayName="Feedback",nU.propTypes=nZ;let nj=A.createContext({}),nV=A.forwardRef(({bsPrefix:e,type:t,size:o,htmlSize:r,id:i,className:n,isValid:s=!1,isInvalid:a=!1,plaintext:l,readOnly:h,as:c="input",...d},u)=>{let{controlId:p}=(0,A.useContext)(nj);return e=iD(e,"form-control"),(0,or.jsx)(c,{...d,type:t,size:r,ref:u,readOnly:h,id:i||p,className:x()(n,l?`${e}-plaintext`:e,o&&`${e}-${o}`,"color"===t&&`${e}-color`,s&&"is-valid",a&&"is-invalid")})});nV.displayName="FormControl";let n$=Object.assign(nV,{Feedback:nU});class nY extends A.Component{textWidthRef=A.createRef();wrapperRef=A.createRef();static defaultProps={style:{},value:""};componentDidMount(){this.wrapperRef?.current&&(this.wrapperRef.current.style.width="0px")}componentDidUpdate(){this.textWidthRef?.current&&this.wrapperRef?.current&&(this.wrapperRef.current.style.width=`${Number(this.textWidthRef.current.offsetWidth)+35}px`)}componentWillUnmount(){this.props.onBlur&&this.props.onBlur()}onWipKeyDown(e){e.stopPropagation()}render(){let{clearCurrentlyHoveredGraphCommit:e,currentlyHoveredCommitSha:t,getExternalIcon:o,graphZoneType:r,isCommitting:i,isHovering:n,isSelected:s,onBlur:a,onClickCommit:l,onContextMenu:h,onFocus:c,onMessageChange:d,setAsCurrentlyHoveredGraphCommit:u,sha:p,style:f,translate:m,value:g,workDirStats:_}=this.props,v=x()("graph-zone-column","pt3","pb3","pointer","height-100-percent","grow-3","graph-row-wrapper",L.bY,{"is-hovering":n}),S=x()("column-1","graph-row","flex",{"is-selected":s}),R=A.createElement(nA,{getExternalIcon:o,translate:m,workDirStats:_}),y=A.createElement("div",{className:"work-dir-input",ref:this.wrapperRef},A.createElement(n$,{"data-test-class":"work-dir-input-field",disabled:i,onBlur:e=>a(e),onChange:e=>d(e.target.value),onContextMenu:e=>h(e,r,p),onFocus:e=>c(e),onKeyDown:e=>this.onWipKeyDown(e),placeholder:m("WorkDirMessageInput-WIPPlaceholder"),type:"text",value:g}),A.createElement("div",{className:"text-width","data-test-class":"work-dir-input-message",ref:this.textWidthRef},g));return A.createElement("div",{className:v,onMouseEnter:e=>u(e,r,p,t??void 0),onMouseLeave:o=>e(o,r,p,t??void 0),style:f},A.createElement("div",{className:S,"data-test-class":"work-dir-message-row-div",onMouseDown:e=>l(e,r,p),style:{position:"relative",width:"100%"}},y,R))}}function nK({hasRefs:e,isActiveSha:t,left:o,type:r,width:i}){let n=x()("ref-line","z4",{"is-active":t});return e&&[L.oB,L.t$,L.l2].includes(r)?A.createElement("hr",{className:n,style:{left:o,width:i}}):null}function nq({graphZoneModeConstants:{RADIUS_DIFF_MERGE_NODE_COMMIT_NODE:e},hasRefs:t,isActiveSha:o,nodeOffset:r,type:i}){return A.createElement(nK,{hasRefs:t,isActiveSha:o,left:0,type:i,width:r+(i===L.t$?e:0)})}function nX({className:e,marginLeft:t}){return A.createElement("div",{className:x()("app-bg0","absolute","left-0","right-0","bottom-0","top-0","pt3","pb3",e),style:{marginLeft:t}},A.createElement("div",{className:"commit-bg-color height-100-percent width-100-percent"}))}function nQ({column:e,graphZoneModeConstants:{COMMIT_COLUMN_WIDTH:t,COMMIT_NODE_DIAMETER:o,COMMIT_ZONE_GUTTER_WIDTH:r}}){return A.createElement(nX,{className:"z1",marginLeft:r+t*e+o/2})}function nJ(){return A.createElement(nX,{marginLeft:0})}let n0=(e,t,o,r,i,n,s=!1)=>{let a={height:n.COMMIT_MERGE_NODE_DIAMETER,left:o+n.COMMIT_MERGE_NODE_LEFT_OFFSET,marginTop:n.COMMIT_MERGE_NODE_TOP_OFFSET,opacity:r,width:n.COMMIT_MERGE_NODE_DIAMETER},l=x()("node",i,"z6"),h=A.createElement(iB,{className:"gk-graph",id:"graph-merge-node-tooltip"},nP(t,e)),c=A.createElement("div",{className:l,"data-test-class":"tree-row-commit-node",style:a});return s?c:A.createElement(ni,{delay:250,overlay:h,placement:"top",trigger:["hover","focus"]},c)};class n1 extends A.PureComponent{render(){let{authorEmail:e,authorName:t,getExternalIcon:o,graphZoneModeConstants:r,left:i,opacity:n,suppressNonRefRowTooltips:s,translate:a,type:l}=this.props;return(t||e)&&l===L.oB?r.IS_COMPACT?n0(e,t,i,n,L.t$,r,s):(({authorEmail:e,authorInitials:t,authorName:o,avatarUrl:r,column:i,context:n,cssVariables:s,graphZoneModeConstants:a,left:l,message:h,opacity:c,suppressNonRefRowTooltips:d,type:u,useAuthorInitialsForAvatars:p})=>A.createElement(nB,{authorInitials:t,avatarUrl:r,className:x()("node",u,"z6"),column:i,context:n,cssVariables:s,fontSize:10,height:a.COMMIT_NODE_DIAMETER,size:a.COMMIT_ZONE_AVATAR_DIAMETER,style:{left:l,opacity:c},tooltip:d?void 0:()=>{let t=o&&""!==o.trim()&&"Unknown"!==o?nP(o,e):e,r=X(K(h||"")),i="";if(0===r.length)i=t;else{r.unshift({email:e,name:o});for(let e=0;e<r.length;e+=1){let t=r[e];i+=nP(t.name,t.email),e<r.length-1&&(i+=", ")}}return i},top:a.COMMIT_NODE_TOP_OFFSET,useAuthorInitialsForAvatars:p,width:a.COMMIT_NODE_DIAMETER}))(this.props):l===L.t$||l===L.l2||l===L.gL?n0(e,t,i,n,l,r,s):((e,t,o,r,i,n,s,a=!1,l,h=!1)=>{let c,d={height:l.COMMIT_NODE_DIAMETER,left:r,marginTop:l.COMMIT_NODE_TOP_OFFSET,opacity:i,width:l.COMMIT_NODE_DIAMETER};a&&(d.borderWidth=1);let u=x()("gk-graph","node",s,"z6",{compact:a});c=s===L.OZ?n("Stash"):s===L.bY?n("Graph-WorkInProgress"):nP(o,t);let p=A.createElement("div",{className:u,"data-test-class":"tree-row-commit-node",style:d},s!==L.OZ||a?null:A.createElement("span",null,e("stash"))),f=A.createElement(iB,{className:"gk-graph",id:"graph-other-node-tooltip"},c);return h?p:A.createElement(ni,{delay:250,overlay:f,placement:"top",trigger:["hover","focus"]},p)})(o,e,t,i,n,a,l,r.IS_COMPACT,r,s)}}class n2 extends A.Component{render(){let{columnColorByColumn:e,edgeColumnMax:t,edges:o,nodeColumn:r,graphZoneModeConstants:{COMMIT_COLUMN_WIDTH:i,COMMIT_ZONE_GUTTER_WIDTH:n,COMMIT_ZONE_LINE_WIDTH:s,IS_COMPACT:a}}=this.props,l=function(e,t,o,r,i,n,s,a){let l=function(e,t,o,r){let i="";for(let n=0;n<=t;n++){let{passThrough:t,starting:s,ending:a}=e[n]??{};i=`${i}_${ei(n,o,s?.type,r)}_${ei(n,o,a?.type,r)}_${en(n,t?.type,r)}`}return i}(e,t,o,a),h=eN[l];if(h)return h;let c="";for(let l=0;l<=t;l+=1){let t=e[l];if(!t)continue;let{passThrough:h,starting:d,ending:u}=t;c+=d?function(e,t,o,r,i,n,s,a){var l,h;let c,d,u,p,f,m,g=ei(e,t,o,a),_=eO[g];return _?_:(_=t===e?(l=r[e],c=er(o,l,s,a),c.x1=d=J(t,i,n,a),c.x2=d,c.y1=c.strokeDasharray?V.kU/2+V.kj:V.kU/2,c.y2=V.kU,eo(c)):(h=r[e],u=er(o,h,s,a),p=t<e?-V.nf:V.nf,(f={...u}).x1=J(e,i,n,a),f.x2=J(e,i,n,a),f.y1=V.kU-V.kj,f.y2=V.kU,(m={...u}).x1=J(e,i,n,a)+p,m.x2=J(t,i,n,a),m.y1=V.kU/2,m.y2=V.kU/2,`<g>${eb(h,t<e?180:270,270*(t<e),o,J(e,i,n,a)+p,V.kU-V.kj,s,a)}${eo(f)}${eo(m)}</g>`),eO[g]=_,_)}(l,o,d.type,r,i,n,s,a):"",c+=h?function(e,t,o,r,i,n,s){let a=en(e,t,s),l=eM[a];if(l)return l;let h=J(e,r,i,s),c=er(t,o[e],n,s);return c.x1=h,c.x2=h,c.y1=0,c.y2=V.kU,l=eo(c),eM[a]=l,l}(l,h.type,r,i,n,s,a):"",c+=u?function(e,t,o,r,i,n,s,a){var l,h;let c,d,u,p,f,m,g=ei(e,t,o,a),_=eI[g];return _?_:(_=t===e?(l=r[e],c=er(o,l,s,a),c.x1=d=J(t,i,n,a),c.x2=d,c.y1=0,c.y2=c.strokeDasharray?V.kU/2-V._b:V.kU/2,eo(c)):(h=r[e],u=er(o,h,s,a),p=t<e?-V.nf:V.nf,(f={...u}).x1=J(e,i,n,a),f.x2=J(e,i,n,a),f.y1=0,f.y2=V._b,(m={...u}).x1=J(e,i,n,a)+p,m.x2=J(t,i,n,a),m.y1=V.kU/2,m.y2=V.kU/2,`<g>${eo(f)}${eb(h,t>e?0:90,t>e?90:180,o,J(e,i,n,a)+p,V._b,s,a)}${eo(m)}</g>`),eI[g]=_,_)}(l,o,u.type,r,i,n,s,a):""}let d=`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g>${c}</g></svg>`.replace(/%/g,"%25");return h=`url('data:image/svg+xml;charset=UTF-8,${d}')`,eN[l]=h,h}(o,t,r,e,i,n,s,a);return A.createElement("div",{className:"absolute top-0 right-0 bottom-0 left-0 z2",style:{background:l}})}}function n5({boxShadowAlpha:e,boxShadowLeft:t,children:o,className:r="",left:i,width:n}){return A.createElement("div",{className:x()("absolute","top-0","bottom-0","z3",r),style:{boxShadow:`${t}px 5px 10px rgba(0, 0, 0, ${e})`,left:i,width:n}},o)}function n3({boxShadowAlpha:e,hasTimeline:t,scrollLeft:o,width:r}){return A.createElement(n5,{boxShadowAlpha:e,boxShadowLeft:5,className:"app-bg0 left-0",left:o,width:r},t?A.createElement(oA,{z2:!0}):null)}function n6({boxShadowAlpha:e,commitZoneWidth:t,hasTimeline:o,scrollLeft:r,width:i}){return A.createElement(n5,{boxShadowAlpha:e,boxShadowLeft:-5,left:r+t-i,width:i},o?A.createElement(oA,{z2:!0}):null,A.createElement(nJ,null))}class n4 extends A.PureComponent{render(){let{authorEmail:e,authorName:t,avatarContext:o,avatarUrl:r,clearCurrentlyHoveredGraphCommit:i,column:n,columnColorByColumn:s,columnForColoring:a,commitZoneWidth:l,cssVariables:h,currentlyHoveredCommitSha:c,edgeColumnMax:d,edges:u,hasRefs:p,hasTimeline:f,getExternalIcon:m,graphZoneModeConstants:g,isActiveSha:_,isInUnsupportedRebase:v,isLastColumn:S,isSelected:R,leftGutterBoxShadowAlpha:y,leftGutterWidth:T,message:C,nodeOffset:w,nodeOpacity:E,numGraphColumns:b,onContextMenu:I,onClickCommit:M,onDoubleClickCommit:O,rightGutterBoxShadowAlpha:N,rightGutterWidth:D,rowContext:H,scopeBoundaryKind:G,scrollLeft:k,setAsCurrentlyHoveredGraphCommit:W,sha:z,shouldShowRefLine:L,suppressNonRefRowTooltips:F,style:P,translate:B,type:Z,useAuthorInitialsForAvatars:U,zoneContext:j}=this.props,$=(a??n)%b+1,Y=x()("relative","commit-zone","height-100-percent","pt3",Z,`column-${$}`,{"is-selected":R,"has-active":_,"scope-fork-point":"forkPoint"===G,"scope-merge-target":"mergeTarget"===G}),K=f?A.createElement(oA,{z2:!0}):null,q=A.createElement("div",{className:Y,"data-vscode-context":(0,ea.DO)(j),onContextMenu:v?void 0:e=>I(e,V.md,z),onDoubleClick:e=>O(e,V.md,z),onMouseDown:e=>M(e,V.md,z),onMouseEnter:e=>W(e,V.md,z,c),onMouseLeave:e=>i(e,V.md,z,c),style:{...P,...S&&{width:"100%"}}},K,A.createElement(n3,{boxShadowAlpha:y,hasTimeline:f,scrollLeft:k,width:T}),L?A.createElement(nq,{graphZoneModeConstants:g,hasRefs:p,isActiveSha:_,nodeOffset:w,type:Z}):null,A.createElement(n1,{authorEmail:e,authorInitials:nF(t),authorName:t,avatarUrl:r,column:n,context:o,cssVariables:h,getExternalIcon:m,graphZoneModeConstants:g,left:w,message:C,opacity:E,suppressNonRefRowTooltips:F,translate:B,type:Z,useAuthorInitialsForAvatars:U}),A.createElement(nQ,{column:n,graphZoneModeConstants:g}),A.createElement(n2,{columnColorByColumn:s,edgeColumnMax:d,edges:u,graphZoneModeConstants:g,nodeColumn:n}),A.createElement(n6,{boxShadowAlpha:N,commitZoneWidth:l,hasTimeline:f,scrollLeft:k,width:D}));return H?A.createElement("div",{"data-vscode-context":(0,ea.DO)(H)},q):q}}var n9=function(e,t){let{avatarUrlByEmail:o,onMissingAvatar:r,clearCurrentlyHoveredGraphCommit:i,columnColorByColumn:n,cssVariables:s,currentlyHoveredCommitSha:a,processedRows:l,wipNodeMetadataBySha:h,getExternalIcon:c,graphZoneModeConstants:d,isInUnsupportedRebase:u,leftGutterBoxShadowAlpha:p,leftGutterWidth:f,onCommitContextMenu:m,onClickCommit:g,onDoubleClickCommit:_,nodeOffsetByColumn:v,nodeOpacityByColumn:S,numGraphColumns:R,rightGutterBoxShadowAlpha:y,rightGutterWidth:T,setAsCurrentlyHoveredGraphCommit:C,scrollLeft:w,shouldShowRefLine:E,suppressNonRefRowTooltips:b,translate:I,useAuthorInitialsForAvatars:M}=e,O=new ea.n$(e);return({rowIndex:e,style:N})=>{let x,D=t(e),H=l[e],G=V.md,k=O.getZoneWidth(G),{email:W,author:z,contexts:F,message:P,sha:B,type:Z}=H,U=H.column,j=F?.graph||void 0,$=F?.avatar||void 0,Y=F?.row||void 0;!M&&((x=o[W])||r(W,B));let K=Z===L.bY?h?.[B]:void 0;K?.nodeAvatarUrl&&(x=K.nodeAvatarUrl);let q=O.isLastColumn(G);return A.createElement(n4,{authorEmail:W,authorName:z,avatarContext:$,avatarUrl:x,clearCurrentlyHoveredGraphCommit:i,column:U,columnColorByColumn:n,columnForColoring:H.columnForColoring,commitZoneWidth:k,cssVariables:s,currentlyHoveredCommitSha:a,edgeColumnMax:H.edgeColumnMaxes,edges:H.edges,getExternalIcon:c,graphZoneModeConstants:d,hasRefs:H.hasRefs||!1,hasTimeline:O.hasTimeline(e),isActiveSha:O.rowContainsCurrentHeadRef(H),isInUnsupportedRebase:u,isLastColumn:q,isSelected:O.isSelected(e),key:D,leftGutterBoxShadowAlpha:p,leftGutterWidth:f,message:P,nodeOffset:v[U],nodeOpacity:S[U],numGraphColumns:R,onClickCommit:g,onContextMenu:m,onDoubleClickCommit:_,rightGutterBoxShadowAlpha:y,rightGutterWidth:T,rowContext:Y,scopeBoundaryKind:H.scopeBoundaryKind,scrollLeft:w,setAsCurrentlyHoveredGraphCommit:C,sha:B,shouldShowRefLine:E,style:N,suppressNonRefRowTooltips:b,translate:I,type:Z,useAuthorInitialsForAvatars:M,zoneContext:j})}};let n7=A.forwardRef(({controlId:e,as:t="div",...o},r)=>{let i=(0,A.useMemo)(()=>({controlId:e}),[e]);return(0,or.jsx)(nj.Provider,{value:i,children:(0,or.jsx)(t,{...o,ref:r})})});n7.displayName="FormGroup";class n8 extends A.PureComponent{handleClickOutside(){let{sha:e,shorthand:t,type:o,data:r}=this.props.createRefFormData;this.props.onCancel(t,e,o,r)}constructor(e){super(e);let{createRefFormData:t,formatRefShorthand:o}=this.props,{sha:r,shorthand:i,type:n,data:s}=t;this.state={currentShorthand:o(i,r,n,s),initShorthand:i}}static getDerivedStateFromProps(e,t){let{createRefFormData:o,formatRefShorthand:r}=e,{currentShorthand:i,initShorthand:n}=t,{sha:s,shorthand:a,type:l,data:h}=o,c=a!==n;return c&&r(a,s,l,h)!==i?{currentShorthand:r(a,s,l,h),initShorthand:a}:c?{currentShorthand:i,initShorthand:a}:null}onInputChange(e){let t=e||"";if(e){let{sha:e,type:o,data:r}=this.props.createRefFormData;t=this.props.formatRefShorthand(t,e,o,r)}this.setState({currentShorthand:t}),this.props.onRefShorthandChange?.(t)}render(){let{createRefFormData:e,isRefShorthandValid:t,onCancel:o,onContextMenu:r,onRefCreate:i,refZoneWidth:n,style:s,translate:a}=this.props,{currentShorthand:l}=this.state,{data:h,sha:c,type:d}=e,u=a(d===ev.z.TAG?"RefZone-EnterTagName":"RefZone-EnterBranchName");return A.createElement("div",{className:"create-ref","data-testid":"create-ref",style:{...s,minWidth:n,width:n}},A.createElement(n7,null,A.createElement(n$,{autoFocus:!0,"data-testid":"create-ref-form-control",isInvalid:l.length>0&&!t(l,c,d,h),onChange:e=>this.onInputChange(e.target?.value),onContextMenu:e=>r(e,l,c,d,h),onKeyDown:e=>{(e.stopPropagation(),"Escape"===e.key)?o(l,c,d,h):c&&"Enter"===e.key&&i(l,c,d,h)},placeholder:u,type:"text",value:l})))}}var se=function({hasActive:e,overflowCount:t}){return A.createElement("span",{className:x()("overflow-count ml1",{"is-active":e}),"data-test-class":"overflow-count"},"+",t)},st=function({style:e,children:t,column:o,numGraphColumns:r,onMouseEnter:i,onMouseLeave:n,ref:s,...a}){return A.createElement("div",{...a,className:x()("gk-graph","ref-zone","ref-popover",`column-${o%r+1}`),ref:s},A.createElement("ul",{onMouseEnter:i,onMouseLeave:n,style:{...e,listStyle:"none",padding:0,zIndex:6}},t))},so=function({enabledRefMetadataTypes:e,column:t,columnForColoring:o,context:r,enableShowHideRefsOptions:i,targetRef:n,hasActive:s,hasRefs:a,getExternalIcon:l,includeOnlyRefsById:h,includeOnlyRemotesByName:c,isGhostRef:d,isHovered:u,isInUnsupportedRebase:p,numGraphColumns:f,onMissingRefMetadata:m,pinnedBranchFullName:g,refGroupContexts:_,refGroupsByName:v,refIconsPosition:S,refMetadata:R,fallbackRefMetadata:y,refNodeHovered:T,sha:C,showRemoteNamesOnRefs:w,showContextMenuForGroupedRef:E,onClickRef:b,onDoubleClickRef:I,onToggleRefNodesShown:M,onRefBeginDrag:O,onRefCanDrag:N,onRefCanDrop:x,onRefDragEnter:D,onRefDragLeave:H,onRefDrop:G,onRefEndDrag:k,translate:W,type:z,useColumnHeaderIcons:L}){let F=`ref-overlay-container-${(0,A.useId)()}`,P=(0,A.useCallback)((e,t,o)=>{M(e,t.map(e=>({id:(0,ea.$V)(e),name:e.name,type:e.refType,owner:e.owner,avatarUrl:e.avatarUrl})),!1,o)},[M]),B=(0,A.useMemo)(()=>v&&v.length>V.gi?v.slice(0,V.gi):v,[v]),Z=B.length>0?B[0]:null,U=(0,A.useMemo)(()=>u?B:Z?[Z]:[],[Z,u,B]),j=(0,A.useMemo)(()=>{let e=V.lE+(Z?.length||0)*V.RJ+(s?V.RJ:0);return u?{height:100,position:"relative"}:{minWidth:e}},[Z,s,u]),$=(0,A.useMemo)(()=>(0,ed.D7)(h,e=>e.type===ev.z.TAG),[h]),Y=(0,A.useMemo)(()=>({enabledRefMetadataTypes:e,enableShowHideRefsOptions:i,getExternalIcon:l,groupIsHovered:u,hasActive:s,hasRefs:a,isGhostRef:d,isInUnsupportedRebase:p,onClick:b,onContextMenu:E,onDoubleClick:I,onHideRefClick:P,onHovered:T,onMissingRefMetadata:m,onRefBeginDrag:O,onRefCanDrag:N,onRefCanDrop:x,onRefDragEnter:D,onRefDragLeave:H,onRefDrop:G,onRefEndDrag:k,refIconsPosition:S,refMetadata:R,fallbackRefMetadata:y,sha:C,showRemoteNamesOnRefs:w,translate:W,type:z,useColumnHeaderIcons:L}),[i,e,y,l,s,a,d,u,p,b,I,P,m,O,N,x,D,H,G,k,S,R,T,C,E,w,W,z,L]),K=(0,A.useMemo)(()=>U.map(e=>{let t=e[0],o=_?.[t.name]||void 0,r=e.some(e=>{let t=(0,ea.$V)(e);switch(e.refType){case ev.z.TAG:return $&&!!h[t];case ev.z.REMOTE:return!!h[t]||e.owner&&c[e.owner];default:return!!h[t]}}),i=!!g&&e.some(e=>e.id===g);return{...Y,isActive:t.isCurrentHead??!1,isPinned:i,isRefGroupIncluded:r,key:`ref-node-${t.fullName||t.name}`,refGroup:e,refGroupContext:o}}),[Y,$,h,c,g,_,U]);return A.default.createElement("span",{className:"ref-nodes","data-vscode-context":(0,ea.DO)(r),style:j},K.map(e=>A.default.createElement(nv,{...e,className:"inline",isHidden:u,key:e.key})),A.default.createElement(i8,{key:F,placement:"right-start",show:u,target:()=>n.current},A.default.createElement(st,{column:o??t,numGraphColumns:f},K.map(e=>A.default.createElement("li",{key:e.key},A.default.createElement(nv,{...e,isHidden:!u}))))))};let sr={};class si extends A.default.PureComponent{popoverTargetRef=(0,A.createRef)();static defaultProps={style:{}};componentDidUpdate(e){!this.props.hasRefs&&this.props.isSingleSelected&&!e.isSingleSelected&&this.props.hoveredRefZoneSha===this.props.sha&&(this.props.refZoneUnhovered(),this.props.hoveredRefGroup&&this.props.refNodeUnhovered(null,this.props.hoveredRefGroup,this.props.sha))}onCustomToggleRefNodesShown=(e,t,o,r)=>{this.props.onToggleRefNodesShown(e,t,o,r),this.props.refZoneUnhovered()};render(){var e;let t,o,{enabledRefMetadataTypes:r,column:i,columnForColoring:n,context:s,enableShowHideRefsOptions:a,showGhostRefsOnRowHover:l,hasActive:h,hasRefs:c,hasTimeline:d,hoveredRefGroup:u,hoveredRefZoneSha:p,getExternalIcon:f,includeOnlyRefsById:m,includeOnlyRemotesByName:g,isInUnsupportedRebase:_,scopeBoundaryKind:v,numGraphColumns:S,onClickRef:R,onDoubleClickRef:y,onMissingRefMetadata:T,onRefBeginDrag:C,onRefCanDrag:w,onRefCanDrop:E,onRefDragEnter:b,onRefDragLeave:I,onRefDrop:M,onRefEndDrag:O,pinnedBranchFullName:N,refGroupContexts:D,refGroupsByName:H,refIconsPosition:G,refMetadata:k,fallbackRefMetadata:W,refNodeHovered:z,refNodeUnhovered:L,refZoneHovered:F,refZoneUnhovered:P,sha:B,shouldShowRefLine:Z,showColorStrip:U,showContextMenuForGroupedRef:j,showRemoteNamesOnRefs:$,style:Y,translate:K,type:q,useColumnHeaderIcons:X,width:Q,clearCurrentlyHoveredGraphCommit:J,currentlyHoveredCommitSha:ee}=this.props,et=p===B,eo={minWidth:Q,width:Q},er={...Y,...eo},ei=d?A.default.createElement(oA,null):null,en=H.length,es=e=>{F(B),en?z(e,H[0],B):u&&L(e,u,B)},el=e=>{P(),u&&L(e,u,B),J(e,V.ui,B,ee??void 0)},eh=(0,ea.xJ)((e,t)=>{el(e),C(e,t)}),ec=en>0&&!c&&l,ed=(e=n??i,(o=sr[t=`${q}${e}${et}${h}${S}${ec}${v??""}`])||(o=x()(`column-${e%S+1}`,"flex","pb3","pt3","ref-zone","relative",q,{"dim-ref":ec,"has-active":h,z6:et,z1:!et,"scope-fork-point":"forkPoint"===v,"scope-merge-target":"mergeTarget"===v}),sr[t]=o),o),eu=A.default.createElement("div",{className:"color-strip height-100",style:{width:2}}),ep="forkPoint"===v,ef="mergeTarget"===v,em=ep?A.default.createElement(ni,{delay:400,overlay:A.default.createElement(iB,{className:"gk-graph bs-tooltip",id:`merge-base-tooltip-${B}`},"Merge base — where this branch diverged from its merge target."),placement:"top",trigger:["hover","focus"]},A.default.createElement("div",{className:"merge-base-ref-node"},"BASE")):ef?A.default.createElement(ni,{delay:400,overlay:A.default.createElement(iB,{className:"gk-graph bs-tooltip",id:`merge-target-tooltip-${B}`},"Merge target — the tip of the branch this scope is being compared against."),placement:"top",trigger:["hover","focus"]},A.default.createElement("div",{className:"merge-target-ref-node"},"TARGET")):null;if(!en)return A.default.createElement("div",{className:ed,onMouseEnter:es,onMouseLeave:el,onWheel:el,style:er},U?eu:null,ei,em);let eg={minWidth:0,overflow:"hidden",width:Q-V.Zk},e_=en-1,ev=e_>0&&!et?A.default.createElement(se,{hasActive:h,overflowCount:e_}):null;return A.default.createElement("div",{className:ed,onMouseEnter:es,onMouseLeave:el,onWheel:el,style:er},U?eu:null,ei,A.default.createElement("div",{className:"flex",style:eg},em,A.default.createElement("div",{ref:this.popoverTargetRef}),A.default.createElement(so,{column:i,columnForColoring:n,context:s,enabledRefMetadataTypes:r,enableShowHideRefsOptions:a,fallbackRefMetadata:W,getExternalIcon:f,hasActive:h,hasRefs:c,includeOnlyRefsById:m,includeOnlyRemotesByName:g,isGhostRef:ec,isHovered:et,isInUnsupportedRebase:_,numGraphColumns:S,onClickRef:R,onDoubleClickRef:y,onMissingRefMetadata:T,onRefBeginDrag:eh,onRefCanDrag:w,onRefCanDrop:E,onRefDragEnter:(e,t,o)=>{et||o?.sha!==B||es(e),b(e,t,o)},onRefDragLeave:I,onRefDrop:M,onRefEndDrag:O,onToggleRefNodesShown:this.onCustomToggleRefNodesShown,pinnedBranchFullName:N,refGroupContexts:D,refGroupsByName:H,refIconsPosition:G,refMetadata:k,refNodeHovered:z,sha:B,showContextMenuForGroupedRef:j,showRemoteNamesOnRefs:$,targetRef:this.popoverTargetRef,translate:K,type:q,useColumnHeaderIcons:X}),ev),(c||ep||ef)&&Z?A.default.createElement("div",{className:"absolute left-0 flex z1",style:eo},A.default.createElement(nK,{hasRefs:!0,isActiveSha:h,left:V.mE,type:q,width:"100%"})):null)}}class sn extends A.Component{static getDerivedStateFromProps(e,t){let o={},r=!1;return e.themeOpacityFactor!==t.themeOpacityFactor&&(o.themeOpacityFactor=e.themeOpacityFactor||V.K3.dark,r=!0),e.dimMergeCommits!==t.dimMergeCommits&&(o.dimMergeCommits=e.dimMergeCommits||!1,r=!0),e.onlyFirstParent!==t.onlyFirstParent&&(o.onlyFirstParent=e.onlyFirstParent||!1,r=!0),e.highlightRowsOnRefHover!==t.highlightRowsOnRefHover&&(o.highlightRowsOnRefHover=e.highlightRowsOnRefHover||!1,r=!0),e.showGhostRefsOnRowHover!==t.showGhostRefsOnRowHover&&(o.showGhostRefsOnRowHover=e.showGhostRefsOnRowHover||!1,r=!0),e.showRemoteNamesOnRefs!==t.showRemoteNamesOnRefs&&(o.showRemoteNamesOnRefs=e.showRemoteNamesOnRefs||!1,r=!0),e.enabledRefMetadataTypes!==t.enabledRefMetadataTypes&&(o.enabledRefMetadataTypes=e.enabledRefMetadataTypes||[],r=!0),e.enabledScrollMarkerTypes!==t.enabledScrollMarkerTypes&&(o.enabledScrollMarkerTypes=e.enabledScrollMarkerTypes||[],r=!0),e.graphCommitDescDisplayMode!==t.graphCommitDescDisplayMode&&(o.graphCommitDescDisplayMode=e.graphCommitDescDisplayMode||V.FQ.ALWAYS,r=!0),e.useAuthorInitialsForAvatars!==t.useAuthorInitialsForAvatars&&(o.useAuthorInitialsForAvatars=e.useAuthorInitialsForAvatars||!1,r=!0),e.shaLength!==t.shaLength&&(o.shaLength=e.shaLength,r=!0),e.hasMoreCommits!==t.hasMoreCommits&&(o.hasMoreCommits=e.hasMoreCommits||!1,r=!0),e.isLoadingRows!==t.isLoadingRows&&(o.isLoadingRows=e.isLoadingRows||!1,r=!0),e.rowsStatsLoading!==t.rowsStatsLoading&&(o.rowsStatsLoading=e.rowsStatsLoading||!1,r=!0),e.avatarUrlByEmail!==t.avatarUrlByEmail&&(o.avatarUrlByEmail=e.avatarUrlByEmail||{},r=!0),e.refMetadataById!==t.refMetadataById&&(o.refMetadataById=e.refMetadataById,r=!0),e.contexts!==t.contexts&&(o.contexts=e.contexts,r=!0),e.pendingCommitMessageSummary!==t.pendingCommitMessageSummary&&(o.pendingCommitMessageSummary=e.pendingCommitMessageSummary||"",r=!0),e.enableShowHideRefsOptions!==t.enableShowHideRefsOptions&&(o.enableShowHideRefsOptions=e.enableShowHideRefsOptions||!1,r=!0),e.createRefFormData!==t.createRefFormData&&(o.createRefFormData=e.createRefFormData,r=!0),e.highlightedShas!==t.highlightedShas&&(o.highlightedShas=e.highlightedShas,r=!0),e.workDirStats!==t.workDirStats&&(o.workDirStats=e.workDirStats||V.pi,r=!0),e.rowsStats!==t.rowsStats&&(o.rowsStats=e.rowsStats,r=!0),r?o:null}graphComponentRef=A.createRef();graphContainerRef=A.createRef();resizeObserver;lastNavSha=null;currentSha=null;isRefContextMenuShown=!1;isMounted=!1;selectedShas=new Set;selectionAnchorSha;selectionFocusSha;processedGraphRowBySha={};shaByRefId={};childrenBySha={};scrollToSha;headSha;headUpstreamSha;lastLazyLoadHeight=0;lastTopVisibleRowIndex=-1;lastBottomVisibleRowIndex=-1;maxColumns=0;orderedGraphRows=[];rowStatsConstraints={min:0,max:0};shouldFireShowMoreCommits=!0;columnsToFreeWhenFound={};hasMergeNodeChildBySha={};_autoLoadTimer;reserverInfoBySha={};columnsUsed={};pinnedBranchShas=new Set;scopeVisibility=null;syntheticEdgeChildShas=new Set;_lastReportedUnreachable=null;rowsStats;workDirStats=V.pi;_markerColorsCache=null;excludeByType={};excludeRefsById={};includeOnlyRefsById={};excludeRemotesByName={};includeOnlyRemotesByName={};highlightedShas={};searchMode="normal";scrollLeft=0;scrollTop=0;graphHeight=585;graphWidth=804;graphZoneModeConstants=(0,ea.jz)();graphZonesByType={};graphZoneOrdering=[V.ui,V.md,V.d4,V.fx,V.Sq,V.$A,V.AR];clientHeight=0;missingAvatarsTimer;pendingMissingAvatars={};requestedMissingAvatars={};missingRefsMetadataTimer;pendingMissingRefsMetadata={};requestedMissingRefsMetadata={};previousRefMetadataById=null;requestedMissingWipStats={};visibleWipShasTimer;lastFiredVisibleWipShas=void 0;branchUpstreamRowIndices=[];interactiveScrollMarkersFromRows=[];downstreamsByUpstream={};timelinesInterval;constructor(e){for(let[t,o]of(super(e),this.resizeObserver=new ResizeObserver(e=>e.forEach(e=>this.onGraphResized(e.contentRect.width,e.contentRect.height))),Object.entries(e.isSelectedBySha||{})))o&&(this.selectedShas.add(t),this.selectionAnchorSha=t,this.selectionFocusSha=t);this.excludeByType=this.props.excludeByType||{},this.excludeRefsById=this.props.excludeRefsById||{},this.excludeRemotesByName=this.getExcludeRemotesByName(),this.includeOnlyRemotesByName=this.getIncludeOnlyRemotesByName(),this.includeOnlyRefsById=this.props.includeOnlyRefsById||{},this.downstreamsByUpstream=this.props.downstreamsByUpstream||{},this.highlightedShas=this.props.highlightedShas||{},this.searchMode=this.props.searchMode||"normal",this.rowsStats=this.props.rowsStats||this.rowsStats,this.workDirStats=this.props.workDirStats||this.workDirStats,this.processRows(this.props.graphRows),this.cleanupSelections(),this.updateMarkerRowIndices(["selection","highlights"]);let t=(0,P.yr)(this.props.cssVariables);this.graphZoneModeConstants=(0,ea.jz)(this.props.columnsSettings?.[V.md]?.mode),this.maybeSortGraphZoneOrderingFromSettings(this.props.columnsSettings),this.state={avatarUrlByEmail:this.props.avatarUrlByEmail||{},contexts:this.props.contexts,createRefFormData:this.props.createRefFormData,cssVariablesWithDefaults:t,columnColorByColumn:this.getColumnColorByColumn(t),currentlyHoveredCommitSha:void 0,dimMergeCommits:this.props.dimMergeCommits||!1,onlyFirstParent:this.props.onlyFirstParent||!1,dimRowsOfSelectedCommit:!1,enableShowHideRefsOptions:this.props.enableShowHideRefsOptions||!1,highlightRowsOnRefHover:this.props.highlightRowsOnRefHover||!1,showGhostRefsOnRowHover:this.props.showGhostRefsOnRowHover||!1,showRemoteNamesOnRefs:this.props.showRemoteNamesOnRefs||!1,enabledRefMetadataTypes:this.props.enabledRefMetadataTypes||[],enabledScrollMarkerTypes:this.props.enabledScrollMarkerTypes||[],graphCommitDescDisplayMode:this.props.graphCommitDescDisplayMode||V.FQ.ALWAYS,graphZones:this.initializeGraphZones(this.props.columnsSettings,this.graphZoneOrdering,580),hasMoreCommits:this.props.hasMoreCommits||!1,height:this.graphHeight,highlightedShas:this.props.highlightedShas,hoveredRefGroup:void 0,hoveredRefZoneSha:void 0,isLoadingRows:this.props.isLoadingRows||!1,numGraphColumns:this.getNumGraphColumns(t),markerRowIndices:{},interactiveScrollMarkers:this.computeInteractiveScrollMarkers(),pendingCommitMessageSummary:this.props.pendingCommitMessageSummary||"",processedRows:[...this.orderedGraphRows],refIconsPosition:this.getRefIconsPositionOrDefault(this.props.refIconsPosition),refMetadataById:this.props.refMetadataById,rowsStats:this.rowsStats,rowsStatsLoading:this.props.rowsStatsLoading||!1,useAuthorInitialsForAvatars:this.props.useAuthorInitialsForAvatars||!1,scrollLeft:this.getScrollLeft(),scrollToAlignment:this.getScrollToAlignment(),scrollToIndex:this.getScrollToIndex(),scrollTop:this.getScrollTop(),shaLength:this.props.shaLength,themeOpacityFactor:this.props.themeOpacityFactor||V.K3.dark,width:this.graphWidth,workDirStats:this.workDirStats}}componentDidMount(){this.isMounted=!0,this.resizeObserver.observe(this.graphComponentRef.current),window.addEventListener("keydown",this.onWindowKeyDown),window.addEventListener("keyup",this.onWindowKeyUp),window.addEventListener("blur",this.onWindowBlur),window.addEventListener("mousedown",this.onWindowMouseDown),this.selectedShas.size&&this.selectCommitsCore([...this.selectedShas],{ensureVisible:!0})}componentDidUpdate(e,t){let o=!1,r=!1,i={},n=!1;e.searchMode!==this.props.searchMode&&(this.searchMode=this.props.searchMode||"normal",r=!0,i.highlights=!0),e.highlightedShas!==this.props.highlightedShas&&(this.highlightedShas=this.props.highlightedShas||{},"filter"===this.searchMode&&(r=!0),i.highlights=!0),e.excludeByType!==this.props.excludeByType&&(this.excludeByType=this.props.excludeByType||{},this.props.graphRows?.length&&(r=!0)),e.excludeRefsById!==this.props.excludeRefsById&&(this.excludeRefsById=this.props.excludeRefsById||{},this.excludeRemotesByName=this.getExcludeRemotesByName(),this.props.graphRows?.length&&(r=!0)),e.includeOnlyRefsById!==this.props.includeOnlyRefsById&&(this.includeOnlyRefsById=this.props.includeOnlyRefsById||{},this.includeOnlyRemotesByName=this.getIncludeOnlyRemotesByName(),this.props.graphRows?.length&&(r=!0)),e.downstreamsByUpstream!==this.props.downstreamsByUpstream&&(this.downstreamsByUpstream=this.props.downstreamsByUpstream||{},this.props.graphRows?.length&&(r=!0)),e.searchMode!==this.props.searchMode&&(n=!0);let s=!this.areSelectedByShaEqual(e.isSelectedBySha,this.props.isSelectedBySha),a=null!=this.props.isSelectedBySha&&(0,ed.xV)(this.props.isSelectedBySha),l=this.orderedGraphRows.length>0;if(this.processedGraphRowBySha&&l&&(s||0===this.selectedShas.size&&a)){let e=this.props.isSelectedBySha?Object.keys(this.props.isSelectedBySha):[];this.selectCommitsCore(e,{ensureVisible:!0}),s&&e.length>0?this.selectionAnchorSha=e[e.length-1]:s&&0===e.length&&(this.selectionAnchorSha=void 0)}if(e.isContainerWindowFocused!==this.props.isContainerWindowFocused&&this.dimRowsOfSelectedCommit(!1),e.graphRows!==this.props.graphRows||e.cssVariables!==this.props.cssVariables||r){this.cleanEdgeCaches(),this._markerColorsCache=null;let t=(0,P.yr)(this.props.cssVariables);n=!0,this.setState({columnColorByColumn:this.getColumnColorByColumn(t),cssVariablesWithDefaults:t,numGraphColumns:this.getNumGraphColumns(t)}),o=!0,(this.props.graphRows?.length<e.graphRows?.length||r)&&(this.lastLazyLoadHeight=0)}if(e.workDirStats!==this.props.workDirStats&&(this.workDirStats=this.props.workDirStats||V.pi),(e.workDirStats!==this.props.workDirStats||e.wipVisibility!==this.props.wipVisibility)&&(0,ea.dF)(e.workDirStats,e.wipVisibility)!==(0,ea.dF)(this.props.workDirStats,this.props.wipVisibility)&&(n=!0),e.avatarUrlByEmail!==this.props.avatarUrlByEmail&&(this.requestedMissingAvatars={}),e.wipNodeMetadataBySha!==this.props.wipNodeMetadataBySha&&(this.requestedMissingWipStats={},this.scheduleVisibleWipShasUpdate()),e.refIconsPosition!==this.props.refIconsPosition){let e=this.getRefIconsPositionOrDefault(this.props.refIconsPosition);this.state.refIconsPosition!==e&&this.setState({refIconsPosition:e})}if(e.refMetadataById!==this.props.refMetadataById&&(e.refMetadataById&&(0,ed.xV)(e.refMetadataById)&&(this.previousRefMetadataById=e.refMetadataById),this.requestedMissingRefsMetadata={},i.pullRequests=!0),e.rowsStats!==this.props.rowsStats&&(this.rowsStats=this.props.rowsStats,this.updateRowStatsConstraints()),e.columnsSettings!==this.props.columnsSettings){if(this.props.columnsSettings?.[V.md]?.mode!==e.columnsSettings?.[V.md]?.mode){this.cleanEdgeCaches(),this.graphZoneModeConstants=(0,ea.jz)(this.props.columnsSettings?.[V.md]?.mode),this.updateCommitZoneContentWidthFromChange();let e=this.graphZonesByType[V.md];e.currentWidth=e.contentWidth,e.preferredWidth=e.contentWidth,e.minimumWidth=this.graphZoneModeConstants.COMMIT_ZONE_VIEWPORT_WIDTH_MIN,e.showIconWidth=this.graphZoneModeConstants.COMMIT_ZONE_SHOW_ICON_WIDTH,this.loadEdgesBySha(),o=!0}this.props.columnsSettings&&(this.updateZonesFromSettings(this.props.columnsSettings),o=!0)}if(e.createRefFormData!==this.props.createRefFormData&&this.props.createRefFormData?.sha&&(this.selectCommitsCore([this.props.createRefFormData?.sha],{ensureVisible:!0}),this.selectionAnchorSha=this.props.createRefFormData.sha),e.pinnedBranchFullName!==this.props.pinnedBranchFullName&&(n=!0),e.stashesAnchorCommits!==this.props.stashesAnchorCommits&&(n=!0),e.scope!==this.props.scope&&(n=!0,i.highlights=!0,i.pullRequests=!0),e.onlyFirstParent!==this.props.onlyFirstParent&&(n=!0,i.highlights=!0,i.pullRequests=!0),(e.hasMoreCommits!==this.props.hasMoreCommits||e.onShowMoreCommits!==this.props.onShowMoreCommits)&&this.loadMoreCommitsIfNecessary(this.graphHeight,this.state.hasMoreCommits),n){let e=Array.from(this.selectedShas),t=this.selectionFocusSha;this.processRows(this.props.graphRows,this.props.pinnedBranchFullName);let o=(0,P.yr)(this.props.cssVariables);if(e.length>0){this.cleanupSelections();let o=[];for(let t of e){let e=this.processedGraphRowBySha[t];e?.hidden===!1&&(o.push(e),this.selectedShas.add(t))}if(o.length){if(t){let e=this.processedGraphRowBySha[t];e?.hidden===!1?this.selectionFocusSha=t:(this.selectionFocusSha=o[o.length-1].sha,this._selectionVersion++)}if(this.selectionAnchorSha&&this.selectionAnchorSha!==this.selectionFocusSha){let e=this.processedGraphRowBySha[this.selectionAnchorSha];(null==e||e.hidden)&&(this.selectionAnchorSha=this.selectionFocusSha)}let e=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]:void 0,r={isContiguous:this.areRowsContiguous(o),isTopological:!1};this.props.onSelectGraphRows?.(o,e,r),this.updateMarkerRowIndices(["selection"])}else this.selectedShas.clear(),this.selectionFocusSha=void 0,this.selectionAnchorSha=void 0,this._selectionVersion++,this.props.onSelectGraphRows?.([],void 0,{isContiguous:!0,isTopological:!1}),this.updateMarkerRowIndices(["selection"])}else if(a){let e=this.props.isSelectedBySha?Object.keys(this.props.isSelectedBySha):[];this.selectCommitsCore(e,{ensureVisible:!0}),e.length>0&&(this.selectionAnchorSha=e[e.length-1])}this.setState({processedRows:[...this.orderedGraphRows],columnColorByColumn:this.getColumnColorByColumn(o)})}if(o){this.updateCommitZoneContentWidthFromChange();let e=this.getOrderedActiveGraphZones();this.expandLastZoneMinWidthForScrollbar(e),this.ensureZoneWidthsMatchGraphWidth(e,this.graphWidth),this.setState({graphZones:e})}let h=Object.keys(i);h.length&&this.updateMarkerRowIndices(h);let c=this.props.graphRows?.length!==e.graphRows?.length,d=this.state.hasMoreCommits!==t.hasMoreCommits,u=this.state.height!==t.height;(c||d||u||o)&&this.autoLoadToFillViewport(),c&&this.loadMoreCommitsIfNecessary(this.graphHeight,this.state.hasMoreCommits)}componentWillUnmount(){this.isMounted=!1,this.clearTimelinesInterval(),null!=this._pendingScrollUpdate&&(cancelAnimationFrame(this._pendingScrollUpdate),this._pendingScrollUpdate=void 0),null!=this._pendingRowsUpdate&&(cancelAnimationFrame(this._pendingRowsUpdate),this._pendingRowsUpdate=void 0),this._autoLoadTimer&&(clearTimeout(this._autoLoadTimer),this._autoLoadTimer=void 0),this._headerHoverRestoreTimer&&(clearTimeout(this._headerHoverRestoreTimer),this._headerHoverRestoreTimer=void 0),this.missingAvatarsTimer&&(clearTimeout(this.missingAvatarsTimer),this.missingAvatarsTimer=void 0),this.missingRefsMetadataTimer&&(clearTimeout(this.missingRefsMetadataTimer),this.missingRefsMetadataTimer=void 0),this.visibleWipShasTimer&&(clearTimeout(this.visibleWipShasTimer),this.visibleWipShasTimer=void 0),window.removeEventListener("keydown",this.onWindowKeyDown),window.removeEventListener("keyup",this.onWindowKeyUp),window.removeEventListener("blur",this.onWindowBlur),window.removeEventListener("mousedown",this.onWindowMouseDown),this.resizeObserver.disconnect()}focus(){this.graphContainerRef?.current?.focus({preventScroll:!0})}getRefIconsPositionOrDefault(e){return e||ev.E.LEFT}onGraphVisibleRowsUpdatedThrottled=(0,ea.nF)(()=>this.onGraphVisibleRowsUpdated(),250,20);onBlurWipNodeInput=e=>{this.props.onBlurWipNodeInput?.(e)};onDoubleClickRef=(e,t,o,r)=>{this.props.onDoubleClickGraphRef?.(e,t,this.processedGraphRowBySha[o],r)};onFocusWipNodeInput=e=>{this.props.onFocusWipNodeInput?.(e)};onFilterColumnClick=(e,t)=>{this.props.onFilterColumnClick?.(e,t)};onCurrentlyHoveredGraphCommit=(e,t,o,r)=>{r!==o&&(this.props.onGraphRowHovered?.(e,t,this.processedGraphRowBySha[o]),this.setState({currentlyHoveredCommitSha:o}))};onClearCurrentlyHoveredGraphCommit=(e,t,o,r)=>{if(!r)return;let i=e.relatedTarget;if(i instanceof HTMLElement){let e=i.closest(".resizable-handle.horizontal");if(null!=e&&!e.closest(`#${V.ui}-header`))return}if((i=e.currentTarget)instanceof HTMLElement){let t=i.getBoundingClientRect();if(e.clientY>=t.top&&e.clientY<=t.bottom)return}this.props.onGraphRowUnhovered?.(e,t,this.processedGraphRowBySha[o]),this.setState({currentlyHoveredCommitSha:void 0})};onGraphColumnReOrdered=(e,t)=>{let o=this.graphZoneOrdering.indexOf(e),r=t?this.graphZoneOrdering.indexOf(t):this.graphZoneOrdering.length-1;t&&o<r&&(r-=1),this.graphZoneOrdering.splice(o,1),this.graphZoneOrdering.splice(r,0,e);let i={};this.graphZoneOrdering.forEach((e,t)=>{this.graphZonesByType[e].order=t,i[e]=this.getGraphColumnSettingFromZoneType(this.graphZonesByType[e])}),this.setState({graphZones:this.initializeGraphZones(i,this.graphZoneOrdering,this.graphWidth)}),this.props.onGraphColumnsReOrdered&&this.props.onGraphColumnsReOrdered(i)};onGraphZoneResize=(0,ea.xJ)((e,t)=>{if(t?.width){let o=this.getOrderedActiveGraphZones();this.adjustResizedGraphZone(o,e,t,!1),this.setState({graphZones:o})}});onGraphZoneResizeEnd=(0,ea.xJ)((e,t)=>{if(t?.width){let o=this.getOrderedActiveGraphZones();this.adjustResizedGraphZone(o,e,t,!0),this.setState({graphZones:o})}this.props.onColumnResized&&this.props.onColumnResized(e.type,this.getGraphColumnSettingFromZoneType(this.graphZonesByType[e.type]))});onPopupGraphHeaderContextMenu=(e,t)=>{this.props.onPopupGraphHeaderContextMenu&&this.props.onPopupGraphHeaderContextMenu(e,t)};onSettingsClick=(e,t)=>{this.props.onSettingsClick&&(e.stopPropagation(),this.props.onSettingsClick(e,t))};onMessageChange=e=>{this.setState({pendingCommitMessageSummary:e}),this.props.onMessageChange&&this.props.onMessageChange(e)};onRefBeginDrag=(e,t)=>{this.props.onRefBeginDrag&&this.props.onRefBeginDrag(e,t)};onRefCanDrag=e=>!!this.props.onRefCanDrag&&this.props.onRefCanDrag(e);onRefCanDrop=(e,t,o)=>!!this.props.onRefCanDrop&&this.props.onRefCanDrop(e,t,o);onRefCreate=(e,t,o,r)=>{this.props.onRefCreate&&this.props.onRefCreate(e,t,o,r)};onRefCreateCancel=(e,t,o,r)=>{this.props.onRefCreateCancel&&this.props.onRefCreateCancel(e,t,o,r)};onRefCreateContextMenu=(e,t,o,r,i)=>{this.props.onRefCreateContextMenu&&this.props.onRefCreateContextMenu(e,t,o,r,i)};onRefDragEnter=(e,t,o)=>{this.props.onRefDragEnter&&this.props.onRefDragEnter(e,t,o)};onRefDragLeave=(e,t,o)=>{this.props.onRefDragLeave&&this.props.onRefDragLeave(e,t,o)};onRefDrop=(e,t,o)=>{this.props.onRefDrop&&this.props.onRefDrop(e,t,o)};onRefEndDrag=(e,t,o)=>{this.props.onRefEndDrag&&this.props.onRefEndDrag(e,t,o)};performRangeSelection(e,t,o){if(this.selectionAnchorSha??=this.selectionFocusSha,!this.selectionAnchorSha)return this.selectionAnchorSha=e,this.selectCommitsCore([e],{ensureVisible:!0,isKeyboardNav:o}),!0;let r=this.isFilteredSearch()?"simple":t,i=this.getShiftSelectRange(e,r);if(i?.length){let t="topological"===r;return this.selectCommitsCore(i,{ensureVisible:!0,focusSha:e,isTopological:t,isContiguous:!!t||void 0,isKeyboardNav:o}),!0}return!1}onZoneRowClick(e,t,o){if(0!==e.button)return;let{enableMultiSelection:r,shiftSelectMode:i}=this.props,n=this.isMacOSPlatform(),s=r&&(!n&&e.ctrlKey||n&&e.metaKey),a=r&&e.shiftKey;s?this.handleToggleSelection(o,i):a&&this.performRangeSelection(o,i,!1)||(this.selectionFocusSha=o,this.selectionAnchorSha=o,this.selectCommitsCore([o],{isKeyboardNav:!1}))}handleToggleSelection(e,t){if("topological"===t&&!this.isFilteredSearch()&&this.selectedShas.size>0&&!this.selectedShas.has(e))if(1===this.selectedShas.size);else{let t;if(2===this.selectedShas.size){let[o,r]=Array.from(this.selectedShas),i=this.processedGraphRowBySha[o],n=this.processedGraphRowBySha[r];if(i&&n&&null!=i.rowIndex&&null!=n.rowIndex){let s=i.rowIndex<=n.rowIndex?o:r,a=i.rowIndex<=n.rowIndex?r:o,l=this.getDirectTopologicalPathBetween(s,a);t=null!=l&&l.length>1&&this.canExtendTopologicalSelection(e)}else t=!1}else t=this.canExtendTopologicalSelection(e);if(!t){this.selectionFocusSha=e,this.selectionAnchorSha=e,this.selectCommitsCore([e],{isKeyboardNav:!1});return}}this.selectionAnchorSha=e;let o="topological"===t&&!this.isFilteredSearch();this.selectCommitsCore([e],{toggle:!0,isTopological:o,isKeyboardNav:!1})}getShiftSelectRange(e,t){let o;if(!this.selectionAnchorSha)return[e];let r=this.processedGraphRowBySha[this.selectionAnchorSha],i=this.processedGraphRowBySha[e];if(!r||!i)return[e];if("simple"===t){let e=r.rowIndex,t=i.rowIndex;o=[];let n=Math.min(e,t),s=Math.max(e,t);for(let e=n;e<=s;e++)this.orderedGraphRows[e]&&o.push(this.orderedGraphRows[e].sha)}else o=this.getTopologicalPathBetween(this.selectionAnchorSha,e);return o&&o.length>1&&o.sort((e,t)=>(this.processedGraphRowBySha[e]?.rowIndex??0)-(this.processedGraphRowBySha[t]?.rowIndex??0)),o}canExtendTopologicalSelection(e){let t,o;if(0===this.selectedShas.size)return!0;let r=1/0,i=-1;for(let e of this.selectedShas){let n=this.processedGraphRowBySha[e];n&&(n.rowIndex<r&&(r=n.rowIndex,t=e),n.rowIndex>i&&(i=n.rowIndex,o=e))}if(!t||!o)return!0;let n=this.processedGraphRowBySha[e];if(!n)return!1;let s=n.rowIndex;if(s<r){let o=this.getDirectTopologicalPathBetween(e,t);return null!=o&&o.length>1}if(s>i){let t=this.getDirectTopologicalPathBetween(o,e);return null!=t&&t.length>1}let a=this.getDirectTopologicalPathBetween(t,e),l=this.getDirectTopologicalPathBetween(e,o);return null!=a&&a.length>1&&null!=l&&l.length>1}getTopologicalPathBetween(e,t){if(e===t)return[e];let o=this.getDirectTopologicalPathBetween(e,t);if(o&&o.length>1)return o;let r=this.findNearestTopologicallyReachableCommit(e,t);if(r)return this.getDirectTopologicalPathBetween(e,r)}getDirectTopologicalPathBetween(e,t){if(e===t)return[e];let o=new Set,r=new Map,i=[e],n=0;for(o.add(e);n<i.length;){let s=i[n++];if(s===t){let o=[],i=t;for(;void 0!==i;)o.push(i),i=r.get(i);if(o.reverse(),this.hasOnlyTwoEndpoints(o,e,t))return o;break}let a=this.processedGraphRowBySha[s];if(a){for(let e of a.parents||[])o.has(e)||(o.add(e),r.set(e,s),i.push(e));for(let e of this.childrenBySha[s]||[])o.has(e)||(o.add(e),r.set(e,s),i.push(e))}}}findNearestTopologicallyReachableCommit(e,t){let o=this.processedGraphRowBySha[e]?.rowIndex,r=this.processedGraphRowBySha[t]?.rowIndex;if(void 0===o||void 0===r)return;let i=o>r,n=Math.min(o,r),s=Math.max(o,r),a=new Set,l=[e],h=0,c=new Set([e]);for(;h<l.length;){let e=l[h++];a.add(e);let t=this.processedGraphRowBySha[e];if(t){for(let o of i?this.childrenBySha[e]||[]:t.parents||[])if(!c.has(o)){let e=this.processedGraphRowBySha[o];e&&e.rowIndex>=n&&e.rowIndex<=s&&(c.add(o),l.push(o))}}}if(i)for(let e=r+1;e<o;e++){let t=this.orderedGraphRows[e]?.sha;if(t&&a.has(t))return t}else for(let e=r-1;e>o;e--){let t=this.orderedGraphRows[e]?.sha;if(t&&a.has(t))return t}}hasOnlyTwoEndpoints(e,t,o){if(e.length<=2)return!0;let r=new Set(e),i=0;for(let n of e){let e=n===t||n===o,s=this.processedGraphRowBySha[n];if(!s)continue;let a=s.parents||[],l=this.childrenBySha[n]||[],h=a.filter(e=>r.has(e)).length,c=l.filter(e=>r.has(e)).length;if((0===h||0===c)&&(i++,!e))return!1}return 2===i}areRowsContiguous(e){if(e.length<=1)return!0;let t=new Set(e.map(e=>e.sha)),o=new Set,r=[e[0].sha],i=0;for(o.add(e[0].sha);i<r.length;){let e=r[i++],n=this.processedGraphRowBySha[e];if(!n)continue;for(let e of n.parents??[])t.has(e)&&!o.has(e)&&(o.add(e),r.push(e));let s=this.childrenBySha[e];if(s)for(let e of s)t.has(e)&&!o.has(e)&&(o.add(e),r.push(e))}return o.size===e.length}onClickRef=(e,t,o,r)=>{this.onZoneRowClick(e,V.ui,o),this.props.onClickGraphRef&&this.props.onClickGraphRef(e,t,this.processedGraphRowBySha[o],r),this.currentSha=o,this.loadSelectedGraphRow(this.currentSha),this.lastNavSha=null};onClickCommit=(e,t,o)=>{if(this.onZoneRowClick(e,t,o),this.props.onClickGraphRow){let r=this.processedGraphRowBySha[o];this.props.onClickGraphRow(e,t,r)}this.currentSha=o,this.loadSelectedGraphRow(this.currentSha),this.lastNavSha=null};onDoubleClickCommit=(e,t,o)=>{if(this.props.onDoubleClickGraphRow){let r=this.processedGraphRowBySha[o];this.props.onDoubleClickGraphRow(e,t,r)}};onWindowBlur=e=>{let{hoveredRefGroup:t,hoveredRefZoneSha:o}=this.state;t&&o&&this.onRefNodeUnhovered(e,t,o),this.onRefZoneUnhovered(),this.dimRowsOfSelectedCommit(!1)};onWindowKeyUp=()=>{this.dimRowsOfSelectedCommit(!1)};onWindowKeyDown=e=>{let t=this.isMacOSPlatform();this.dimRowsOfSelectedCommit(!t&&e.key===es.e.controlKey||t&&e.key===es.e.metaKey)};onWindowMouseDown=()=>{this.dimRowsOfSelectedCommit(!1)};isKeyboardNavigating=!1;onKeyUp=e=>{this.isKeyboardNavigating=!1,this.lastNavSha&&this.isNavigationKey(e.key)&&this.currentSha!==this.lastNavSha&&(this.loadSelectedGraphRow(this.currentSha),this.lastNavSha=null)};onKeyDown=e=>{this.isKeyboardNavigating=!0,null===this.lastNavSha&&this.isNavigationKey(e.key)&&(this.lastNavSha=this.currentSha);let t=this.isMacOSPlatform()?e.metaKey:e.ctrlKey,{shiftSelectMode:o}=this.props,r=this.isFilteredSearch()?"simple":o;switch(e.key){case es.e.arrowUpKey:e.altKey?this.selectPreviousBranchingPoint():this.selectPrevious(e.shiftKey,t,r);break;case es.e.arrowDownKey:e.altKey?this.selectNextBranchingPoint():this.selectNext(e.shiftKey,t,r);break;case es.e.arrowRightKey:this.selectPrevious(e.shiftKey,!1,r);break;case es.e.arrowLeftKey:this.selectNext(e.shiftKey,!1,r);break;case es.e.homeKey:this.selectFirst(e.shiftKey,r);break;case es.e.endKey:this.selectLast(e.shiftKey,r);break;case es.e.pageUpKey:e.altKey?this.selectPreviousRef():this.selectPageUp(e.shiftKey,r);break;case es.e.pageDownKey:e.altKey?this.selectNextRef():this.selectPageDown(e.shiftKey,r);break;case"H":case"h":this.selectHead(e.shiftKey)}};isNavigationKey(e){return[es.e.arrowUpKey,es.e.arrowDownKey,es.e.arrowLeftKey,es.e.arrowRightKey,es.e.homeKey,es.e.endKey,es.e.pageUpKey,es.e.pageDownKey].some(t=>t===e)}loadSelectedGraphRow(e){let t=this.processedGraphRowBySha[e];t&&this.props.onLoadSelectedGraphRow&&this.props.onLoadSelectedGraphRow(t)}onRefNodeHovered=(e,t,o)=>{(!this.props.showGhostRefsOnRowHover||(0,ea.SY)(this.selectedShas,o)||this.processedGraphRowBySha[o]?.hasRefs)&&(this.props.onGraphRefNodeHovered&&this.props.onGraphRefNodeHovered(e,t,this.processedGraphRowBySha[o]),this.setState({hoveredRefGroup:[...t]}))};onRefNodeUnhovered=(e,t,o)=>{this.isRefContextMenuShown||(this.props.onGraphRefNodeUnhovered&&this.props.onGraphRefNodeUnhovered(e,t,this.processedGraphRowBySha[o]),this.setState({hoveredRefGroup:void 0}))};onRefShorthandChange=e=>{let{createRefFormData:t}=this.state;this.setState({createRefFormData:{...t,shorthand:e}})};onRefZoneHovered=e=>{this.setState({hoveredRefZoneSha:e})};onRefZoneUnhovered=()=>{this.isRefContextMenuShown||this.setState({hoveredRefZoneSha:void 0})};onShowMoreCommits=()=>{this.props.onShowMoreCommits&&this.shouldFireShowMoreCommits&&(this.props.onShowMoreCommits(),this.shouldFireShowMoreCommits=!1,setTimeout(()=>{this.shouldFireShowMoreCommits=!0},250))};onScrollForZone=(e,t,o,r,i)=>{this.setScroll(e,t),this.props.onScrollForZone&&this.props.onScrollForZone(e,t),this.loadMoreCommitsIfNecessary(r,i)};hasUnfoundHighlightedCommits(){if(this.props.hasMoreSearchResults)return!0;for(let e in this.highlightedShas)if(e!==V.cJ&&null==this.processedGraphRowBySha[e])return!0;return!1}loadMoreCommitsIfNecessary(e,t){if(!this.props.onShowMoreCommits||!t||!e||e<0||!this.scrollTop||this.scrollTop<0||!this.orderedGraphRows?.length||this.scopeVisibility?.isBounded)return;let o=this.scrollTop+e,r=this.orderedGraphRows.length*V.yB,i=this.isFilteredSearch(),n=i?.8*r:r-V.By;this.lastLazyLoadHeight>0&&o>=this.lastLazyLoadHeight&&this.lastLazyLoadHeight<n&&(this.lastLazyLoadHeight=0),o>n&&o>this.lastLazyLoadHeight&&(this.lastLazyLoadHeight=Math.min(o,r-1),(!i||this.hasUnfoundHighlightedCommits())&&this.onShowMoreCommits())}shouldAutoLoadToFillViewport(){return!(!this.isFilteredSearch()||!this.props.onShowMoreCommits||!this.state.hasMoreCommits||this.state.isLoadingRows||!this.orderedGraphRows?.length||!this.graphHeight||this.graphHeight<=0||this.scopeVisibility?.isBounded)&&!!this.hasUnfoundHighlightedCommits()&&this.orderedGraphRows.length*V.yB<=1.2*(this.graphHeight-V.q4)}autoLoadToFillViewport(){if(this.shouldAutoLoadToFillViewport()){if(!this.shouldFireShowMoreCommits){this._autoLoadTimer&&clearTimeout(this._autoLoadTimer),this._autoLoadTimer=setTimeout(()=>{this._autoLoadTimer=void 0,this.autoLoadToFillViewport()},300);return}this._autoLoadTimer&&clearTimeout(this._autoLoadTimer),this._autoLoadTimer=setTimeout(()=>{this.shouldAutoLoadToFillViewport()&&this.shouldFireShowMoreCommits&&this.onShowMoreCommits(),this._autoLoadTimer=void 0},100)}}onScrollToRowCausedUpdateForFirstColumn=(e,t)=>{let o={...t};if(e===V.md&&t.scrollTop){let t=this.getHorizontalScrollHeight(e,this.state.cssVariablesWithDefaults);o.scrollTop-=t+V.ar}this.setScroll(e,o),this.props.onScrollToRowCausedUpdateForFirstColumn?.(e,o)};onCommitContextMenu=(e,t,o)=>{if(this.props.onRowContextMenu){let r=this.processedGraphRowBySha[o];this.props.onRowContextMenu(e,t,r)}};onRefContextMenu=(e,t,o)=>{if(this.props.onRefContextMenu){this.isRefContextMenuShown=!0,this.onRefZoneHovered(o);let r=this.processedGraphRowBySha[o];this.props.onRefContextMenu(e,t,r),setTimeout(()=>{this.isRefContextMenuShown=!1},250)}};areSelectedByShaEqual(e,t){if(null==e&&null==t)return!0;if(null==e||null==t)return!1;let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(let r of o)if(!(r in t)||e[r]!==t[r])return!1;return!0}_pendingRowsUpdate;_selectionVersion=0;_cachedSmartCellRangeRenderer=null;_cachedScrollLeftForRenderer=-1;_cachedForceCache;getOrCreateSmartCellRangeRenderer(e,t){if(null==this._cachedSmartCellRangeRenderer||this._cachedScrollLeftForRenderer!==e||this._cachedForceCache!==t){let o=e=>{let t=this.state.processedRows[e];if(!t)return"SHOW_MORE_COMMITS";let o=t.sha;return this.selectedShas.has(o)?`${o}_${this._selectionVersion}`:o};this._cachedSmartCellRangeRenderer=({cellCache:r,cellRenderer:i,columnSizeAndPositionManager:n,columnStartIndex:s,columnStopIndex:a,deferredMeasurementCache:l,horizontalOffsetAdjustment:h,isScrolling:c,parent:d,rowSizeAndPositionManager:u,rowStartIndex:p,rowStopIndex:f,styleCache:m,verticalOffsetAdjustment:g,visibleColumnIndices:_,visibleRowIndices:v})=>{let S=[],R=r.__prevScrollLeft!==e;R&&(r.__prevScrollLeft=e);let y=n.areOffsetsAdjusted()||u.areOffsetsAdjusted(),T=!c&&!y;for(let e=p;e<=f;e+=1){let p=u.getSizeAndPositionOfCell(e);for(let u=s;u<=a;u+=1){let s,a,f=n.getSizeAndPositionOfCell(u),y=u>=_.start&&u<=_.stop&&e>=v.start&&e<=v.stop,w=`${e}-${u}`;T&&m[w]?s=m[w]:l&&!l.has(e,u)?s={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(s={height:p.size,left:f.offset+h,position:"absolute",top:p.offset+g,width:f.size},m[w]=s);let E={columnIndex:u,isScrolling:c,isVisible:y,key:w,parent:d,rowIndex:e,style:s};if(!c&&!t||h||g||R)a=i(E);else{let t=o(e,u);r[w]?.realKeyForCell!==t&&(r[w]={realKeyForCell:t,cell:i(E)}),a=r[w].cell}if(null!=a){var C;globalThis.process?.env?.NODE_ENV!=="production"&&(C=a,(0,A.isValidElement)(C)&&(C.type&&C.type.__internalCellMeasurerFlag&&(C=C.props.children),(0,A.isValidElement)(C)&&C?.props?.style===void 0&&!0!==d.__warnedAboutMissingStyle&&(d.__warnedAboutMissingStyle=!0))),S.push(a)}}}return S},this._cachedScrollLeftForRenderer=e,this._cachedForceCache=t}return this._cachedSmartCellRangeRenderer}getCommits(e){let t=[];for(let o of e){let e=this.processedGraphRowBySha[o];null!=e&&t.push(e)}return t}selectCommits(e,t){return this.selectCommitsCore(e,{toggle:t?.toggle,ensureVisible:t?.ensureVisible})}selectCommitsCore(e,t){let{toggle:o=!1,ensureVisible:r=!1,isKeyboardNav:i=this.isKeyboardNavigating,isTopological:n,isContiguous:s,focusSha:a}=t??{},l=[];if(o){for(let t of e)this.selectedShas.has(t)?this.selectedShas.delete(t):null!=this.processedGraphRowBySha[t]&&this.selectedShas.add(t);for(let e of this.selectedShas){let t=this.processedGraphRowBySha[e];null!=t&&l.push(t)}}else if(1===e.length){let[t]=e,o=this.processedGraphRowBySha[t];null!=o?(this.selectedShas.clear(),this.selectedShas.add(t),l.push(o)):this.selectedShas.clear()}else for(let t of(this.selectedShas.clear(),e)){let e=this.processedGraphRowBySha[t];null!=e&&(this.selectedShas.add(t),l.push(e))}l.length>1&&l.sort((e,t)=>(e.rowIndex??0)-(t.rowIndex??0)),this._selectionVersion++,a&&this.selectedShas.has(a)?this.selectionFocusSha=a:this.selectionFocusSha=e.length&&this.selectedShas.has(e[e.length-1])?e[e.length-1]:(0,ea.HV)(this.selectedShas),this.selectionFocusSha&&(r||i)&&this.selectSha(this.selectionFocusSha,i);let h=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]:void 0;return this.props.onSelectGraphRows?.(l,h,{isContiguous:s??(l.length<=1||this.areRowsContiguous(l)),isTopological:n??l.length<=1}),null!=this._pendingRowsUpdate&&cancelAnimationFrame(this._pendingRowsUpdate),this._pendingRowsUpdate=requestAnimationFrame(()=>{this._pendingRowsUpdate=void 0;let e={...this.state.markerRowIndices};for(let t of(e.selection=[],this.selectedShas)){let o=this.processedGraphRowBySha[t]?.rowIndex;null!=o&&e.selection.push(o)}if(i){let t=this.getScrollToIndex(),o=this.getScrollToAlignment(),r=this.predictScrollTop(t,o);null!=r&&(this.scrollTop=r),this.setState({markerRowIndices:e,scrollToAlignment:o,scrollToIndex:t,...null!=r&&{scrollTop:r}},this.clearScrollToIndex)}else this.setState({markerRowIndices:e})}),l}predictScrollTop(e,t){let o;if(e<0)return;let r=e*V.yB,i=this.getClientHeight(),n=this.scrollTop;if("start"===t)o=r;else if("end"===t)o=r-i+V.yB;else if("center"===t)o=r-i/2+V.yB/2;else{let e=r+V.yB;r<n?o=r:e>n+i&&(o=e-i)}return null!=o&&(o=Math.max(0,Math.min(o,Math.max(0,(this.orderedGraphRows?.length??0)*V.yB-i)))),o}getCommitZoneContentWidthBetweenGutters(){return this.getCurrentWidthByZone(V.md)-this.getLeftGutterWidth()-this.getRightGutterWidth()}getExcludeRemotesByName(){let e={};return Object.values(this.excludeRefsById).forEach(t=>{t.type===ev.z.REMOTE&&t.owner&&"*"===t.name&&(e[t.owner]=!0)}),e}getIncludeOnlyRemotesByName(){let e={};return Object.values(this.includeOnlyRefsById).forEach(t=>{t.type===ev.z.REMOTE&&t.owner&&"*"===t.name&&(e[t.owner]=!0)}),e}clearScrollToIndex=(0,ea.xJ)(()=>{this.isMounted&&this.setState({scrollToIndex:void 0})});getVisibleRows=()=>{let{top:e,bottom:t}=this.getTopAndBottomVisibleRowIndex();return e>=0&&t>=0?this.state.processedRows.slice(e,t+1):[]};getTopAndBottomVisibleRowIndex(){let{graphHeight:e,orderedGraphRows:t,scrollTop:o}=this,r=e||0;if(!r||!t?.length)return{top:-1,bottom:-1};let i=(r-V.q4)/V.yB,n=o/V.yB;return{top:Math.max(Math.floor(n),0),bottom:Math.min(Math.ceil(n+(i-1)),t.length-1)}}getOffsetSha(e,t,o,r){this._scrollToAlignmentOverride=void 0;let i=this.props.scrollRowPadding||0;if(!i||"none"===t||!this.graphHeight||!this.orderedGraphRows.length)return e;let n=this.processedGraphRowBySha[e]?.rowIndex??-1;if(-1===n)return e;let{top:s,bottom:a}=this.getTopAndBottomVisibleRowIndex();if(-1===s||-1===a||n>=s&&n<=a&&!r)return e;let l=Math.floor(Math.floor((this.graphHeight-V.q4)/V.yB)/2);if(l<1)return e;let h=Math.min(i,l);return void 0===o||t!==o?e:"up"===t&&n<=s+h?(this._scrollToAlignmentOverride="start",this.orderedGraphRows[Math.max(n-h,0)].sha||e):"down"===t&&n>=a-h?(this._scrollToAlignmentOverride="end",this.orderedGraphRows[Math.min(n+h,this.orderedGraphRows.length-1)].sha||e):e}_pendingScrollUpdate;_lastSelectedRowIndex;_lastScrollDirection="none";_scrollToAlignmentOverride;selectSha(e,t=!1){let o=this.processedGraphRowBySha[e]?.column||0,r=this.getScrollLeft(),i=this.getCommitZoneContentWidthBetweenGutters(),n=this.getCurrentWidthByZone(V.md),s=this.getCommitZoneContentWidth(),a=o*this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,l=r-this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH/3<=a,h=Math.max(0,s-n),c=l&&a<=r+i?r:(0,eS.q)(a-i/2,0,h),d=this.processedGraphRowBySha[e]?.rowIndex,u=void 0!==d&&void 0!==this._lastSelectedRowIndex?d>this._lastSelectedRowIndex?"down":d<this._lastSelectedRowIndex?"up":"none":"none",p=t?this.getOffsetSha(e,u,this._lastScrollDirection,t):e;this.setScrollToSha(p,c),t?(this._lastScrollDirection=u,void 0!==d&&(this._lastSelectedRowIndex=d)):(this._lastScrollDirection="none",this._lastSelectedRowIndex=void 0,this._scrollToAlignmentOverride=void 0),t&&this.props.hasMoreCommits&&void 0!==d&&this.orderedGraphRows.length-d<=V.By/V.yB&&this.loadMoreCommitsIfNecessary(this.graphHeight,this.props.hasMoreCommits),t||(null!=this._pendingScrollUpdate&&cancelAnimationFrame(this._pendingScrollUpdate),this._pendingScrollUpdate=requestAnimationFrame(()=>{this._pendingScrollUpdate=void 0,this.setState({scrollToAlignment:this.getScrollToAlignment(),scrollToIndex:this.getScrollToIndex()},this.clearScrollToIndex)}))}updateWidthByZone(e,t,o){let r=this.getOrderedActiveGraphZones(),i=this.graphZonesByType[t],n=(0,ea.jY)(i,r,e);if(i.currentWidth=n,t===V.md){let e=Math.max(0,this.getCommitZoneContentWidth()-i.currentWidth);this.getScrollLeft()>e&&this.setScrollLeft(e)}o&&(i.preferredWidth=n)}updateCommitZoneContentWidthFromChange(){let e=this.graphZonesByType[V.md];if(!e.isHidden){let t=this.getOrderedActiveGraphZones(),o=this.getCommitZoneContentWidth();e.contentWidth=o,e.maximumWidth=o,e.currentWidth>o&&(e.currentWidth=(0,ea.jY)(e,t,o)),this.setState({graphZones:t})}}getCurrentWidthByZone(e,t=!0){let o=t?this.getVerticalScrollWidth(V.md,this.props.cssVariables,!0):0,r=this.graphZonesByType[e];return r&&!r.isHidden?r.currentWidth-o:0}getCommitZoneContentWidth(){return(this.maxColumns||1)*this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH+2*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+2*this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT}getCommitZoneWidth(e=!0){let t=e?this.getVerticalScrollWidth(V.md,this.props.cssVariables,!0):0;if(this.graphZonesByType[V.md])return this.graphZonesByType[V.md].currentWidth-t;let{columnsSettings:o}=this.props;return o?.[V.md]?o[V.md].width-t:V.W[V.md].minimumWidth-t}getSingleColumnModeFactor(){let e=this.maxColumns,t=this.getCurrentWidthByZone(V.md);return 1===e?0:(0,eS.q)(1-(t-2*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH-this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT)/this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,0,1)}setClientHeight(e){this.clientHeight=e}getClientHeight(){return this.clientHeight}setScroll(e,t){this.setClientHeight(t.clientHeight),null!=t.scrollTop&&this.setScrollTop(t.scrollTop),e===V.md&&null!=t.scrollLeft&&this.setScrollLeft(t.scrollLeft)}getNonAdjustedScrollLeft(){return this.scrollLeft}setScrollLeft(e){this.scrollLeft!==e&&(this.scrollLeft=e,this.setState({scrollLeft:e}))}getScrollLeft(){let e=this.getNonAdjustedScrollLeft();return this.getCommitZoneContentWidth()!==this.getCommitZoneWidth()?e:0}setScrollTop(e){this.scrollTop!==e&&(this.scrollTop=e,this.setState({scrollTop:e}),this.onGraphVisibleRowsUpdatedThrottled())}getScrollTop(){return this.scrollTop}getScrollToSha(){return this.scrollToSha}setScrollToSha(e,t){this.scrollToSha=e,this.setScrollLeft(t),this.onGraphVisibleRowsUpdated()}getScrollToIndex(){let e=this.getScrollToSha();if(e){let t=this.processedGraphRowBySha[e]?.rowIndex;return void 0===t?this.orderedGraphRows.findIndex(t=>t.sha===e):t}return -1}getScrollToAlignment(){if(void 0!==this._scrollToAlignmentOverride)return this._scrollToAlignmentOverride;let e=this.getClientHeight(),t=this.getScrollTop(),o=this.getScrollToIndex();if("none"!==this._lastScrollDirection&&o>=0){let r=o*V.yB,i=r+V.yB,n=t+e;if(!(r>=t&&i<=n))return"down"===this._lastScrollDirection?"end":"start"}return(0,ea.Mz)(V.yB,e,t,o)}getMinNodeOffset(){let e=this.getScrollLeft(),t=this.getSingleColumnModeFactor();return(1-t)*(e+2*this.graphZoneModeConstants.COMMIT_ZONE_PADDING_LEFT)+t*(e+this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH)}getHorizontalScrollHeight(e,t,o){return this.graphZonesByType[e]?(0,ea.xy)(e,this.getOrderedActiveGraphZones(),this.orderedGraphRows,t,o):0}getVerticalScrollWidth(e,t,o){return this.graphZonesByType[e]?(0,ea.K8)(e,this.getOrderedActiveGraphZones(),this.props.hasMoreCommits,this.props.isLoadingRows,this.graphHeight,this.orderedGraphRows,(this.props.enabledScrollMarkerTypes?.length??0)>0,t,o):0}getMaxNodeOffset(){let e=this.getCurrentWidthByZone(V.md),t=this.getScrollLeft(),o=this.getSingleColumnModeFactor();return(1-o)*(e+t+(this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT-this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH))+o*(t+this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH)}getAbsoluteNodeLeftByColumn(){let e={};for(let t=0;t<=this.maxColumns;t+=1)e[t]=this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH*t;return e}getNodeOffsetByColumn(){let e=this.getMinNodeOffset(),t=this.getMaxNodeOffset(),o=this.getAbsoluteNodeLeftByColumn(),r={};return Object.keys(o).forEach(i=>{let n=o[i];r[i]=(0,eS.q)(n,e,t)}),r}getMaxNodeLeft(){return this.getScrollLeft()+(this.getCurrentWidthByZone(V.md)-this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH-this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT)}getMinNodeLeft(){let e=this.getScrollLeft(),t=this.getSingleColumnModeFactor();return e+this.graphZoneModeConstants.COMMIT_ZONE_PADDING_LEFT+t*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH}getRightGutterSlideOutFactor(){let e=this.getCurrentWidthByZone(V.md),t=this.getCommitZoneContentWidth(),o=this.getSingleColumnModeFactor();return(0,eS.q)((e-(t-(this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT)))/this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,0,1)+o/2}getNodeOpacityByColumn(){let e=this.getMinNodeLeft(),t=this.getMaxNodeLeft(),o=this.getAbsoluteNodeLeftByColumn(),r=this.getRightGutterSlideOutFactor(),i=this.getSingleColumnModeFactor(),n={};return Object.keys(o).forEach(s=>{let a=o[s],l=Math.min(a-(e-i*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH),t+this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH-(a+this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH*(1-r)));n[s]=V.Td+(1-V.Td)*Math.max(l/(this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH/2),i)}),n}getLeftGutterWidth(){let e=this.getSingleColumnModeFactor();return this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+e*(this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH/2)}getRightGutterWidth(){return(1-this.getRightGutterSlideOutFactor())*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH}getBoxShadowAlphaForGutter(e,t){return .4*(1-Math.max(e,t))}getLeftGutterBoxShadowAlpha(e){let t=this.getScrollLeft(),o=this.getSingleColumnModeFactor();return e*this.getBoxShadowAlphaForGutter(o,(0,eS.q)(1-t/this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,0,1))}getRightGutterBoxShadowAlpha(e){let t=this.getSingleColumnModeFactor(),o=this.getRightGutterSlideOutFactor();return e*this.getBoxShadowAlphaForGutter(t,o)}updateMarkerRowIndices(e,t){this.isMounted&&this.setState(({markerRowIndices:o})=>{if(e.forEach(e=>o[e]=[]),e.includes("selection"))for(let e of this.selectedShas){let t=this.processedGraphRowBySha[e]?.rowIndex;void 0!==t&&o.selection.push(t)}let r=t?.searchMode??this.props.searchMode;if(e.includes("highlights")&&"filter"!==r)for(let e of Object.keys(t?.highlightedShas||this.state?.highlightedShas||this.props.highlightedShas||{})){let t=this.processedGraphRowBySha[e]?.rowIndex;void 0!==t&&o.highlights.push(t)}if(e.includes("pullRequests")){let e=t?.refMetadataById||this.state?.refMetadataById||this.props.refMetadataById||{};for(let t of Object.keys(e))if(e[t]?.[el.ki]?.length){let e=this.shaByRefId[t];if(null==e)continue;let r=this.processedGraphRowBySha[e]?.rowIndex;void 0!==r&&o.pullRequests.push(r)}o.pullRequests.sort((e,t)=>e-t)}let i={markerRowIndices:o,interactiveScrollMarkers:this.state.interactiveScrollMarkers};return e.includes("pullRequests")&&(i.interactiveScrollMarkers=this.computeInteractiveScrollMarkers(t)),i})}computeInteractiveScrollMarkers(e){let t=e?.refMetadataById||this.state?.refMetadataById||this.props.refMetadataById||{},o=[];for(let e of Object.keys(t)){let r=t[e]?.[el.ki];if(!r?.length)continue;let i=this.shaByRefId[e];if(null==i)continue;let n=this.processedGraphRowBySha[i]?.rowIndex;if(null==n)continue;let s=r[0];o.push({type:"pullRequests",rowIndex:n,sha:i,label:s.title?`#${s.id} ${s.title}`:`#${s.id}`})}return this.interactiveScrollMarkersFromRows.concat(o)}onScrollMarkerClicked=e=>{this.selectCommitsCore([e],{ensureVisible:!0,isKeyboardNav:!1})};getHeadPillDirection(){if(!this.headSha||!this.orderedGraphRows.length)return null;let e=this.processedGraphRowBySha[this.headSha]?.rowIndex;if(null==e||e<0)return null;let{top:t,bottom:o}=this.getTopAndBottomVisibleRowIndex();return t<0||o<0?null:e<t-1?"up":e>o+1?"down":null}onHeadPillClick=()=>{this.headSha&&this.selectCommitsCore([this.headSha],{ensureVisible:!0,isKeyboardNav:!1})};getMarkerColors(){if(this._markerColorsCache)return this._markerColorsCache;let e=getComputedStyle(this.graphComponentRef?.current||document.querySelector(".gk-graph")||document.documentElement),t={};for(let o of Object.values(V.wx)){let r=e.getPropertyValue(o.colorCssKey).trim();r&&(t[o.type]=r)}return this._markerColorsCache=t,t}initializeGraphZones(e,t,o){this.graphZonesByType={};let r=[],i=0;t.forEach((t,o)=>{let n=e?e[t]:void 0,s=V.W[t],a=n?.width?n.width:s.minimumWidth,l={...s,type:t,currentWidth:a,preferredWidth:a,isHidden:n?.isHidden||!1,mode:n?.mode,order:s.isCustomizable&&n?.order!==void 0?n?.order:o};n?.isHidden||(i+=l.currentWidth),t===V.md&&(l.contentWidth=this.getCommitZoneContentWidth(),l.minimumWidth=this.graphZoneModeConstants.COMMIT_ZONE_VIEWPORT_WIDTH_MIN,l.showIconWidth=this.graphZoneModeConstants.COMMIT_ZONE_SHOW_ICON_WIDTH,this.maxColumns>0&&(l.maximumWidth=l.contentWidth)),this.graphZonesByType[t]=l,l?.isHidden||r.push(l)});let n=r[r.length-1];if(n){let e=(0,ea.eQ)(this.props.cssVariables,!0),t=n.minimumWidth+e;(null==n.maximumWidth||n.maximumWidth>=t)&&(n.minimumWidth=t,null!=n.showIconWidth&&(n.showIconWidth+=e),r[r.length-1]=n)}for(r.forEach(e=>{let t=(0,ea.jY)(e,r,e.currentWidth);t!==e.currentWidth&&(i-=e.currentWidth,e.currentWidth=t,i+=t)});i>o;){let e=(0,ea.Q9)(r);if(!e)break;let t=e.currentWidth,n=i-o,s=Math.max(e.minimumWidth,t-n),a=t-s;this.graphZonesByType[e.type].currentWidth=s,i-=a}if(i<o){let e=t[t.length-1],i=o-(0,ea.al)(r,e);this.graphZonesByType[e].currentWidth=i}return r}maybeSortGraphZoneOrderingFromSettings(e){this.graphZoneOrdering.every(t=>e?.[t]?.order!==void 0)&&this.graphZoneOrdering.sort((t,o)=>e[t].order<e[o].order?-1:+(e[t].order>e[o].order))}updateZonesFromSettings(e){let t=!1;this.graphZoneOrdering.forEach((o,r)=>{let i=this.graphZonesByType[o],n=e?.[i.type];n&&(n.isHidden!==i.isHidden&&(t=!0,i.type!==V.Sq||n.isHidden||this.updateRowStatsConstraints()),i.isHidden=n.isHidden,i.order=i.isCustomizable&&n?.order!==void 0?n?.order:r,i.mode=n.mode,i.preferredWidth=n.width??i.preferredWidth,i.currentWidth=i.preferredWidth)}),t&&this.graphZoneOrdering.forEach(e=>{let t=this.graphZonesByType[e];t.currentWidth=t.minimumWidth})}loadEdgesBySha(){if(this.maxColumns=0,this.isFilteredSearch())return;let e=e=>this.processedGraphRowBySha[e]?.column;this.orderedGraphRows.forEach((t,o)=>{let r=this.orderedGraphRows[o-1],i=function(e,t,o,r){var i;let n,s,a,l,h,c=(i=e.sha,h={},Object.keys(t).forEach(e=>{s=(n=t[e]).passThrough,a=n.starting,(l=s&&!$(s.type)?s:a&&!$(a.type)?a:s||a||void 0)&&(l.parentSha===i?h[e]={ending:l}:h[e]={passThrough:l})}),h),d=function(e,t,o){let r={},i=e.parents;if(i.length>0){let n=o.has(e.sha)?"synthetic-edge":e.type,s=t(e.sha);void 0!==s&&(r[s]={parentSha:i[0],type:n});for(let e=1;e<i.length;e+=1){let o=i[e],s=t(o);void 0!==s&&(r[s]={parentSha:o,type:n})}}return r}(e,o,r);return Object.keys(d).forEach(e=>{c[e]||(c[e]={ending:void 0,passThrough:void 0,starting:void 0}),c[e].starting=d[e]}),c}(t,r&&this.processedGraphRowBySha[r.sha]?.edges?this.processedGraphRowBySha[r.sha].edges:{},e,this.syntheticEdgeChildShas);this.processedGraphRowBySha[t.sha].edges=i;let n=function(e){if(null==e)return 0;let t=0;return Object.keys(e).forEach(e=>{let o=parseInt(e,10);o>t&&(t=o)}),t}(i);this.processedGraphRowBySha[t.sha].edgeColumnMaxes=n,n>this.maxColumns&&(this.maxColumns=n)})}processRows(e,t){this.loadRowsbySha(e||[],t),this.loadEdgesBySha()}formatCommitDateTimeCallback=(e,t)=>this.props.formatCommitDateTime?this.props.formatCommitDateTime(e,t):function(e,t,o=!0){t=t??void 0;let r=`${(void 0)??""}:${t}`,i=U.get(r);if(null==i){let e=function(e){if(null==e)return{localeMatcher:"best fit",dateStyle:"full",timeStyle:"short"};let t=Z.exec(e);if(t?.groups!=null){let{dateStyle:e,timeStyle:o}=t.groups;return{localeMatcher:"best fit",dateStyle:e||"full",timeStyle:o||void 0}}let o={localeMatcher:"best fit"};for(let{groups:t}of e.matchAll(B))if(null!=t)for(let e in t){let r=t[e];if(null!=r)switch(e){case"year":o.year=4===r.length?"numeric":"2-digit";break;case"month":switch(r.length){case 4:o.month="long";break;case 3:o.month="short";break;case 2:o.month="2-digit";break;case 1:o.month="numeric"}break;case"day":"DD"===r?o.day="2-digit":o.day="numeric";break;case"weekday":switch(r.length){case 4:o.weekday="long";break;case 3:o.weekday="short";break;case 2:o.weekday="narrow"}break;case"hour":o.hour=2===r.length?"2-digit":"numeric",o.hour12="hh"===r||"h"===r;break;case"minute":o.minute=2===r.length?"2-digit":"numeric";break;case"second":o.second=2===r.length?"2-digit":"numeric";break;case"fractionalSecond":o.fractionalSecondDigits=3;break;case"dayPeriod":o.dayPeriod="narrow",o.hour12=!0,o.hourCycle="h12";break;case"timeZoneName":o.timeZoneName=2===r.length?"long":"short"}}return o}(t);i=new Intl.DateTimeFormat(s,e),o&&U.set(r,i)}if(null==t||Z.test(t))return i.format(e);let n=i.formatToParts(e);return t.replace(B,(t,r,i,a,l,h,c,d,u,p,f,m,g,_,v)=>{if(null!=r)return r.substring(1,r.length-1);for(let t in v){let r=v[t];if(null==r)continue;let i=n.find(e=>e.type===t);if("Do"===r&&i?.type==="day")return function(e){let t=e%100;return`${e}${j[(t-20)%10]??j[t]??j[0]}`}(Number(i.value));if("a"===r&&i?.type==="dayPeriod"){let t=(function(e){let t=`${(void 0)??""}:time:${e}`,r=U.get(t);null==r&&(r=new Intl.DateTimeFormat(s,{localeMatcher:"best fit",timeStyle:e}),o&&U.set(t,r));return r})("short").formatToParts(e).find(e=>"dayPeriod"===e.type);return` ${(t??i)?.value??""}`}return i?.value??""}return""})}(e,V.qO);formatCommitMessageCallback=e=>this.props.formatCommitMessage?.(e)??{summary:e};formatRefShorthandCallback=(e,t,o,r)=>this.props.formatRefShorthand?this.props.formatRefShorthand(e,t,o,r):e.replace(/\s/g,"");isRefShorthandValidCallback=(e,t,o,r)=>!this.props.isRefShorthandValid||this.props.isRefShorthandValid(e,t,o,r);get pinnedBranchFullName(){return this.props.pinnedBranchFullName??null}translateCallback=(e,...t)=>this.props.translate?this.props.translate(e,...t):e_.H[e]?function(e,t){if(0===t.length)return e;let o=e;return t.forEach((e,t)=>{let r=RegExp(`\\{${t}\\}`,"g");o=o.replace(r,e)}),o}(e_.H[e],t):e;getIconCallback=e=>{let t=this.props.getExternalIcon?.(e);return t||A.createElement("span",null)};onMissingAvatar=(e,t)=>{this.props.onEmailsMissingAvatarUrls&&!this.requestedMissingAvatars[e]&&(this.pendingMissingAvatars[e]=t,this.missingAvatarsTimer&&(clearTimeout(this.missingAvatarsTimer),this.missingAvatarsTimer=void 0),this.missingAvatarsTimer=setTimeout(()=>{if(!this.isMounted)return;let e={...this.pendingMissingAvatars};this.pendingMissingAvatars={};let t=Object.keys(e);if(t.length){for(let e of t)this.requestedMissingAvatars[e]=!0;this.props.onEmailsMissingAvatarUrls?.(e)}},100))};onMissingRefMetadata=(e,t)=>{if(!this.props.onRefsMissingMetadata||this.requestedMissingRefsMetadata[e])return;let o=this.pendingMissingRefsMetadata[e]||[],r=t.filter(e=>!o.includes(e));this.pendingMissingRefsMetadata[e]=[...o,...r],this.missingRefsMetadataTimer&&(clearTimeout(this.missingRefsMetadataTimer),this.missingRefsMetadataTimer=void 0),this.missingRefsMetadataTimer=setTimeout(()=>{if(!this.isMounted)return;let e={...this.pendingMissingRefsMetadata};this.pendingMissingRefsMetadata={};let t=Object.keys(e);if(t.length){for(let e of t)this.requestedMissingRefsMetadata[e]=!0;this.props.onRefsMissingMetadata?.(e)}},100)};scheduleVisibleWipShasUpdate=()=>{let{onVisibleWipShasChanged:e,onWipShasMissingStats:t}=this.props;if(!e&&!t)return;this.visibleWipShasTimer&&clearTimeout(this.visibleWipShasTimer);let o=this.props.wipShasSettleDelayMs??100;this.visibleWipShasTimer=setTimeout(()=>{if(this.visibleWipShasTimer=void 0,!this.isMounted)return;let o={},{top:r,bottom:i}=this.getTopAndBottomVisibleRowIndex();if(r>=0&&i>=0)for(let e=r;e<=i;e++){let t=this.orderedGraphRows[e];null!=t&&ep(t)&&(o[t.sha]=!0)}let{missing:n,prunedRequestedDedup:s}=function(e,t,o){let r={};for(let o of Object.keys(t))e[o]&&(r[o]=!0);let i={};for(let t of Object.keys(e)){if(r[t])continue;let e=o?.[t];e?.customContent==null&&(e?.workDirStats===void 0||e?.workDirStatsStale===!0)&&(i[t]=!0)}return{missing:i,prunedRequestedDedup:r}}(o,this.requestedMissingWipStats,this.props.wipNodeMetadataBySha);this.requestedMissingWipStats=s,null!=e&&(void 0===this.lastFiredVisibleWipShas||!function(e,t){let o=Object.keys(e);if(o.length!==Object.keys(t).length)return!1;for(let e of o)if(!t[e])return!1;return!0}(o,this.lastFiredVisibleWipShas))&&(this.lastFiredVisibleWipShas=o,e(o));let a=Object.keys(n);if(null!=t&&a.length>0){for(let e of a)this.requestedMissingWipStats[e]=!0;t(n)}},o)};selectNext(e,t,o){this.selectInDirection("down",e,t,o)}selectPrevious(e,t,o){this.selectInDirection("up",e,t,o)}selectInDirection(e,t,o,r){let i=o&&!this.isFilteredSearch(),n=t?r??"simple":void 0,s=this.getNextShaInDirection(e,t,i,n);s&&(this.currentSha=s,t&&n?this.performRangeSelection(s,n,!0):t||(this.selectCommitsCore([s],{ensureVisible:!0,isTopological:i}),this.selectionAnchorSha=s))}getNextShaInDirection(e,t,o,r){if(t&&"topological"===r&&this.selectionFocusSha){let t=this.selectionAnchorSha??this.selectionFocusSha;return this.findNextReachableFromAnchor(e,this.selectionFocusSha,t,o)}if(o&&!t&&this.selectionFocusSha)return"down"===e?this.getNextTopologicalSha(this.selectionFocusSha):this.getPreviousTopologicalSha(this.selectionFocusSha);let i=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1,n="down"===e?Math.min(i+1,this.orderedGraphRows.length-1):Math.max(0,i-1);return this.orderedGraphRows[n]?.sha}getNextTopologicalSha(e){return this.getSameColumnParent(e)}getPreviousTopologicalSha(e){return this.getSameColumnChild(e)}findNextReachableFromAnchor(e,t,o,r){let i,n=this.processedGraphRowBySha[t];if(!n)return;let s=n.rowIndex,a="down"===e;if(r){let r="down"===e?this.getNextTopologicalSha(t):this.getPreviousTopologicalSha(t);if(r&&this.isReachableFrom(o,r))return r}let l=a?s+1:s-1;if(l>=0&&l<this.orderedGraphRows.length){let e=this.orderedGraphRows[l]?.sha;if(e&&this.isReachableFrom(o,e))return e}let h=this.processedGraphRowBySha[o];if(!h)return;let c=h.rowIndex,d=s===c?a:s>c,u=new Set,p=[o],f=0,m=a?1/0:-1/0;for(;f<p.length&&f<1e3;){let e=p[f++];if(u.has(e))continue;u.add(e);let t=this.processedGraphRowBySha[e];if(!t)continue;(a?t.rowIndex>s&&t.rowIndex<m:t.rowIndex<s&&t.rowIndex>m)&&(i=e,m=t.rowIndex);let o=d?t.parents:this.childrenBySha[e];if(o)for(let e of o)u.has(e)||p.push(e)}return i}isReachableFrom(e,t){if(e===t)return!0;let o=this.processedGraphRowBySha[e],r=this.processedGraphRowBySha[t];if(!o||!r)return!1;let i=r.rowIndex>o.rowIndex,n=new Set,s=[e],a=0;for(;a<s.length&&a<500;){let e=s[a++];if(e===t)return!0;if(n.has(e))continue;n.add(e);let o=i?this.processedGraphRowBySha[e]?.parents:this.childrenBySha[e];if(o)for(let e of o)n.has(e)||s.push(e)}return!1}getSameColumnChild(e){let t=this.childrenBySha[e];if(!t?.length)return;let o=this.processedGraphRowBySha[e],r=o?.column;if(void 0!==r)for(let e of t){let t=this.processedGraphRowBySha[e];if(t&&!t.hidden&&t.column===r)return e}for(let o of t){let t=this.processedGraphRowBySha[o];if(t&&!t.hidden&&t.parents?.[0]===e)return o}}selectPreviousBranchingPoint(){if(!this.selectionFocusSha||this.isFilteredSearch())return;let e=this.selectionFocusSha,t=this.orderedGraphRows.length;for(let o=0;o<t;o++){let t=this.getSameColumnChild(e);if(!t||(e=t,this.isBranchingPoint(e)))break}e!==this.selectionFocusSha&&(this.currentSha=e,this.selectCommitsCore([e],{ensureVisible:!0}),this.selectionAnchorSha=e)}isBranchingPoint(e){let t=this.childrenBySha[e];if(!t?.length)return!1;let o=this.processedGraphRowBySha[e]?.column;if(void 0===o)return!1;for(let e of t){let t=this.processedGraphRowBySha[e];if(t&&!t.hidden&&t.column!==o)return!0}return!1}getSameColumnParent(e){let t=this.processedGraphRowBySha[e];if(!t?.parents?.length)return;let o=t.column;if(void 0!==o){for(let e of t.parents){let t=this.processedGraphRowBySha[e];if(t&&!t.hidden&&t.column===o)return e}for(let e of t.parents){let t=this.processedGraphRowBySha[e];if(t&&!t.hidden)return e}}}selectNextBranchingPoint(){if(!this.selectionFocusSha||this.isFilteredSearch())return;let e=this.selectionFocusSha,t=this.orderedGraphRows.length;for(let o=0;o<t;o++){let t=this.getSameColumnParent(e);if(!t||(e=t,this.isBranchingPoint(e)))break}e!==this.selectionFocusSha&&(this.currentSha=e,this.selectCommitsCore([e],{ensureVisible:!0}),this.selectionAnchorSha=e)}selectNextRef(){let e=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1;for(let t=e+1;t<this.orderedGraphRows.length;t++){let e=this.orderedGraphRows[t];if(e?.hasRefs){this.currentSha=e.sha,this.selectCommitsCore([e.sha],{ensureVisible:!0}),this.selectionAnchorSha=e.sha;return}}}selectPreviousRef(){let e=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:this.orderedGraphRows.length;for(let t=e-1;t>=0;t--){let e=this.orderedGraphRows[t];if(e?.hasRefs){this.currentSha=e.sha,this.selectCommitsCore([e.sha],{ensureVisible:!0}),this.selectionAnchorSha=e.sha;return}}}selectHead(e){let t=null;e&&this.headUpstreamSha?t=this.headUpstreamSha:this.headSha&&(t=this.headSha),this.currentSha=t||null,t&&(this.selectCommitsCore([t],{ensureVisible:!0}),this.selectionAnchorSha=t)}selectFirst(e,t){if(!this.orderedGraphRows.length)return;let o=this.orderedGraphRows[0]?.sha;if(o)if(this.currentSha=o,e){this.selectionAnchorSha??=this.selectionFocusSha??o;let e=t??"simple",r=this.getShiftSelectRange(o,e);if(r?.length){let t="topological"===e;this.selectCommitsCore(r,{ensureVisible:!0,focusSha:o,isKeyboardNav:!0,isTopological:t,isContiguous:!!t||void 0})}}else this.selectCommitsCore([o],{ensureVisible:!0}),this.selectionAnchorSha=o}selectLast(e,t){if(!this.orderedGraphRows.length)return;let o=this.orderedGraphRows.length-1,r=this.orderedGraphRows[o]?.sha;if(r)if(this.currentSha=r,e){this.selectionAnchorSha??=this.selectionFocusSha??r;let e=t??"simple",o=this.getShiftSelectRange(r,e);if(o?.length){let t="topological"===e;this.selectCommitsCore(o,{ensureVisible:!0,focusSha:r,isKeyboardNav:!0,isTopological:t,isContiguous:!!t||void 0})}}else this.selectCommitsCore([r],{ensureVisible:!0}),this.selectionAnchorSha=r}selectPageUp(e,t){if(!this.orderedGraphRows.length)return;let o=Math.max(1,Math.floor(this.getClientHeight()/V.yB)-1),r=Math.max(0,(this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1)-o),i=this.orderedGraphRows[r]?.sha;if(i)if(this.currentSha=i,e){this.selectionAnchorSha??=this.selectionFocusSha??i;let e=t??"simple",o=this.getShiftSelectRange(i,e);if(o?.length){let t="topological"===e;this.selectCommitsCore(o,{ensureVisible:!0,focusSha:i,isKeyboardNav:!0,isTopological:t,isContiguous:!!t||void 0})}}else this.selectCommitsCore([i],{ensureVisible:!0}),this.selectionAnchorSha=i}selectPageDown(e,t){if(!this.orderedGraphRows.length)return;let o=Math.max(1,Math.floor(this.getClientHeight()/V.yB)-1),r=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1,i=Math.min(this.orderedGraphRows.length-1,r+o),n=this.orderedGraphRows[i]?.sha;if(n)if(this.currentSha=n,e){this.selectionAnchorSha??=this.selectionFocusSha??n;let e=t??"simple",o=this.getShiftSelectRange(n,e);if(o?.length){let t="topological"===e;this.selectCommitsCore(o,{ensureVisible:!0,focusSha:n,isKeyboardNav:!0,isTopological:t,isContiguous:!!t||void 0})}}else this.selectCommitsCore([n],{ensureVisible:!0}),this.selectionAnchorSha=n}getColumns(e,t){let o;this.hasMergeNodeChildBySha[e.sha]&&delete this.hasMergeNodeChildBySha[e.sha];let r=t??e.parents??[],i=this.pinnedBranchShas.has(e.sha),n=this.pinnedBranchShas.size>0,s=this.columnsToFreeWhenFound[e.sha];if(void 0!==s)for(let e=0;e<s.length;e+=1)delete this.columnsUsed[s[e]];let a=this.reserverInfoBySha[e.sha];i?(o=0,this.columnsUsed[0]=!0,delete this.reserverInfoBySha[e.sha]):a?.column!==void 0?(o=a.column,delete this.reserverInfoBySha[e.sha]):o=eh(this.columnsUsed,n);for(let t=0;t<r.length;t+=1){let i=r[t];e.type===L.t$&&(this.hasMergeNodeChildBySha[i]=!0);let s=this.reserverInfoBySha[i];if(0===t&&s?.column!==void 0&&s?.column!==o){let t=this.columnsToFreeWhenFound[i]||[],r=s?.type===L.OZ&&e.type!==L.OZ&&a?.newestDate>s?.newestDate;(s?.column>o||r)&&!this.hasMergeNodeChildBySha[i]?(this.reserverInfoBySha[i]={type:e.type,newestDate:a?.newestDate,column:o},t.push(s.column)):t.push(o),this.columnsToFreeWhenFound[i]=t}else if(s?.column===void 0){var l,h,c;let r=this.pinnedBranchShas.has(i);this.reserverInfoBySha[i]={type:e.type,newestDate:a?.column===o?a?.newestDate:e.date,column:(l=this.columnsUsed,h=t,c=o,r?0:0===h?c:eh(l,n))}}}return o}getFilteredHeadsForGraphRow(e,t){return e.heads.filter(e=>e.isCurrentHead||(t?void 0!==this.includeOnlyRefsById[(0,ea.mH)(ev.z.HEAD,e)]:!this.excludeByType.heads&&void 0===this.excludeRefsById[(0,ea.mH)(ev.z.HEAD,e)]))}getFilteredRemotesForGraphRow(e,t){return e.remotes.filter(e=>t?void 0!==this.includeOnlyRefsById[(0,ea.mH)(ev.z.REMOTE,e)]||!e.owner||void 0!==this.includeOnlyRemotesByName[e.owner]:(!this.excludeByType.remotes||e.owner&&this.downstreamsByUpstream[`${e.owner}/${e.name}`]?.length>0)&&void 0===this.excludeRefsById[(0,ea.mH)(ev.z.REMOTE,e)]&&(!e.owner||void 0===this.excludeRemotesByName[e.owner]))}getBaseFilteredTagsForGraphRow(e,t){return e.tags.filter(e=>t?void 0!==this.includeOnlyRefsById[(0,ea.mH)(ev.z.TAG,e)]:!this.excludeByType.tags&&void 0===this.excludeRefsById[(0,ea.mH)(ev.z.TAG,e)])}loadRowsbySha(e,t){var o;this.orderedGraphRows=[],this.processedGraphRowBySha={};let r=this.isFilteredSearch();this.childrenBySha={},this.shaByRefId={},this.reserverInfoBySha={},this.columnsToFreeWhenFound={},this.columnsUsed={};let i=void 0!==t?t:this.props.pinnedBranchFullName;this.pinnedBranchShas=function(e,t){let o,r=new Set;if(!t)return r;for(let i of e){if(!o){if(!(i.heads?.some(e=>e.id===t)||i.remotes?.some(e=>e.id===t)))continue;o=i.sha}if(i.sha===o&&(r.add(i.sha),!(o=i.parents?.[0])))break}return r}(e,i),this.scopeVisibility=null!=this.props.scope?function(e,t,o=!1){let r,i=eg.get(e);null==i&&(i=new Map,eg.set(e,i));let n=(r=null!=t.additionalBranchRefs&&t.additionalBranchRefs.length>0?[...t.additionalBranchRefs].sort().join(","):"",`${t.branchRef}\0${t.upstreamRef??""}\0${t.mergeTargetTipSha??""}\0${t.mergeBase?.sha??""}\0${t.collapseStyle??""}\0${r}\0${o?"1":"0"}`),s=i.get(n);if(null!=s)return s;let a=function(e,t,o){let r,i=new Set,n=new Set,s=new Set,a=new Set,l=new Map,h=new Set,c=!1,d=function(e,t){let o=new Map,r=new Map,i=new Set;for(let n of e){if(i.add(n.sha),null!=n.parents&&n.parents.length>0&&o.set(n.sha,t?[n.parents[0]]:n.parents),null!=n.heads)for(let e of n.heads)null!=e.id&&r.set(e.id,n.sha);if(null!=n.remotes)for(let e of n.remotes)null!=e.id&&r.set(e.id,n.sha)}return{parentsBySha:o,shaByRefId:r,loadedShas:i}}(e,o),u=t.mergeBase?.sha,p=!1;if(null!=u)if(null!=t.mergeTargetTipSha){for(let e of(r=new Set,em(t.mergeTargetTipSha,d.parentsBySha,r),r))if(!d.loadedShas.has(e)){p=!0;break}r.add(u)}else r=new Set([u]);else if(null!=t.mergeTargetTipSha){for(let e of(r=new Set,em(t.mergeTargetTipSha,d.parentsBySha,r),r))if(!d.loadedShas.has(e)){p=!0;break}}else{let o=new Set;if(o.add(t.branchRef),null!=t.upstreamRef&&o.add(t.upstreamRef),null!=t.additionalBranchRefs)for(let e of t.additionalBranchRefs)o.add(e);let i=function(e,t){let o=new Set;for(let r of e){let e=!1,i=!1;if(null!=r.heads)for(let o of r.heads)null!=o.id&&(t.has(o.id)?e=!0:i=!0);if(null!=r.remotes)for(let o of r.remotes)null!=o.id&&(t.has(o.id)?e=!0:i=!0);i&&!e&&o.add(r.sha)}return o}(e,o);i.size>0&&(r=i)}function f(e){if(n.add(e),null==r)return void em(e,d.parentsBySha,i);if(!function(e,t,o,r){if(o.add(e),r.has(e))return;let i=[e];for(;i.length>0;){let e=i.pop(),n=t.get(e);if(null!=n)for(let e of n)o.has(e)||r.has(e)||(o.add(e),i.push(e))}}(e,d.parentsBySha,i,r),null!=u)d.loadedShas.has(u)?(i.add(u),s.add(u),c=!0):h.add(e);else{let t=function(e,t,o){let r=e,i=new Set;for(;null!=r;){if(o.has(r))return r;if(i.has(r))break;i.add(r);let e=t.get(r);r=null!=e&&e.length>0?e[0]:void 0}}(e,d.parentsBySha,r);null!=t&&(i.add(t),s.add(t),c=!0)}}let m=d.shaByRefId.get(t.branchRef);if(null!=m&&f(m),null!=t.upstreamRef){let e=d.shaByRefId.get(t.upstreamRef);null!=e&&f(e)}if(null!=t.additionalBranchRefs)for(let e of t.additionalBranchRefs){let t=d.shaByRefId.get(e);null!=t&&f(t)}if(null!=t.mergeTargetTipSha&&(i.add(t.mergeTargetTipSha),n.add(t.mergeTargetTipSha),a.add(t.mergeTargetTipSha)),"gap"!==t.collapseStyle){let e=new Set;for(let t of i){let o=d.parentsBySha.get(t);if(null!=o)for(let t of o)i.has(t)&&e.add(t)}for(let t of n){if(e.has(t)||s.has(t))continue;let o=d.parentsBySha.get(t);if(null==o||0===o.length)continue;let r=!1;for(let e of o)if(i.has(e)){r=!0;break}let c=a.has(t);if(r&&!c)continue;let u=function(e,t,o){let r=t.get(e);if(null==r||0===r.length)return[];let i=[],n=new Set,s=[...r],a=0;for(;a<s.length;){let e=s[a];if(a+=1,n.has(e))continue;if(n.add(e),o.has(e)){i.push(e);continue}let r=t.get(e);if(null!=r)for(let e of r)n.has(e)||s.push(e)}return i}(t,d.parentsBySha,i);if(u.length>0){l.set(t,u);continue}if(c&&p){let e=function(e,t,o){let r=[];for(let i of e){if(o.has(i))continue;let n=t.get(i),s=null!=n&&n.length>0?n[0]:void 0;null!=s&&e.has(s)||r.push(i)}return r}(i,d.parentsBySha,n);e.length>0&&l.set(t,e)}r||h.add(t)}}return{visibleShas:i,anchorShas:n,forkPointShas:s,mergeTargetShas:a,syntheticParentsBySha:l,unreachableAnchors:h,isBounded:c&&0===h.size}}(e,t,o);return i.set(n,a),a}(e,this.props.scope,this.props.onlyFirstParent??!1):null,this.syntheticEdgeChildShas=new Set;let n=new Map,s={},a={},l=[],h=[];this.branchUpstreamRowIndices=[],this.interactiveScrollMarkersFromRows=[];let c=[],d=[],u=[],p=[],f=[],m={};if((0,ea.dF)(this.workDirStats,this.props.wipVisibility)&&e.length>0&&!(0,ea.l7)(e[0].type)){let t=(0,ea.pg)(e),r={sha:L.bY,parents:t?[t]:[],author:"",email:"",date:new Date().getTime(),message:this.translateCallback(null==(o=this.workDirStats)?"Graph-WorkInProgress":(0,ed.D7)(o,e=>"number"==typeof e&&e>0)?"Graph-WorkInProgress-Changes":"Graph-WorkInProgress-Clean"),type:L.bY,heads:[],remotes:[],tags:[]};this.workDirStats.context&&(r.contexts={row:this.workDirStats.context}),e.unshift(r)}else!(0,ea.dF)(this.workDirStats,this.props.wipVisibility)&&e.length>0&&(0,ea.l7)(e[0].type)&&e.shift();let g=(0,ed.xV)(this.includeOnlyRefsById),_=g&&(0,ed.D7)(this.includeOnlyRefsById,e=>e.type===ev.z.TAG),v=g&&!_,S=this.props.stashesAnchorCommits??!0,R=[],y=[],T=[],C=[];if(!S)for(let t=0;t<e.length;t+=1){let o=e[t],r=(o.heads?.length??0)>0?this.getFilteredHeadsForGraphRow(o,g):[],i=(o.remotes?.length??0)>0?this.getFilteredRemotesForGraphRow(o,g):[],n=r.length>0||i.length>0,s=(o.tags?.length??0)>0?this.getBaseFilteredTagsForGraphRow(o,_):[];R[t]=r,y[t]=i,T[t]=s,C[t]={hasBaseFilteredTags:s.length>0,hasFilteredBranches:n}}let w=S?void 0:(0,ea.ci)(e,C,v,this.props.onlyFirstParent??!1);for(let t=0;t<e.length;t+=1){let o,i,C=e[t],E=this.childrenBySha[C.sha]?.length>0;null!=this.scopeVisibility&&((0,ea.l7)(C.type)?function(e,t){if(null==t||!ef.has(e.type))return!1;let o=e.parents;if(null==o||0===o.length)return ep(e);if(ep(e)){for(let e of o)if(t.anchorShas.has(e)&&!t.mergeTargetShas.has(e))return!1;return!0}for(let e of o)if(t.visibleShas.has(e))return!1;return!0}(C,this.scopeVisibility)&&(s[C.sha]=!0):this.scopeVisibility.visibleShas.has(C.sha)||(s[C.sha]=!0));let b=this.scopeVisibility?.anchorShas.has(C.sha),I=b?C.heads??[]:S?(C.heads?.length??0)>0?this.getFilteredHeadsForGraphRow(C,g):[]:R[t],M=b?C.remotes??[]:S?(C.remotes?.length??0)>0?this.getFilteredRemotesForGraphRow(C,g):[]:y[t],O=I.length>0||M.length>0,N=b?C.tags??[]:S?(C.tags?.length??0)>0?this.getBaseFilteredTagsForGraphRow(C,_):[]:T[t],x=m[C.sha]||E,A=N.length>0&&(!v||O||x)?N:[];if(null!=this.scopeVisibility){let e=this.scopeVisibility.syntheticParentsBySha.get(C.sha);null!=e&&e.length>0?(o=e,this.syntheticEdgeChildShas.add(C.sha)):o=C.parents?.length>0?C.parents.filter(e=>this.scopeVisibility.visibleShas.has(e)):[]}else o=C.parents?.length>0?C.parents.filter(e=>!s[e]):[];this.props.onlyFirstParent&&o.length>1&&(o=o.slice(0,1));let D=I.length>0||M.length>0||A.length>0,H=I.length>0||M.length>0;if(S||C.type!==L.OZ||o.some(e=>w?.has(e))||(s[C.sha]=!0),C.type!==L.oB&&C.type!==L.t$||m[C.sha]){if(C.type===L.OZ&&this.excludeByType.stashes&&(s[C.sha]=!0),!s[C.sha]&&o.length>0){let e;for(e of o)m[e]=!0}}else C.type!==L.oB&&C.type!==L.t$||m[C.sha]||D||E||(s[C.sha]=!0);let G=s[C.sha],k=G?0:null!=this.scopeVisibility||this.props.onlyFirstParent?this.getColumns(C,o):this.getColumns(C);r&&(i=k,k=0);let W=new ec.Y(this,{...C,heads:I,remotes:M,tags:A,parents:o},k,void 0,void 0,void 0,void 0,i);if(null!=this.scopeVisibility&&(this.scopeVisibility.mergeTargetShas.has(C.sha)?W.scopeBoundaryKind="mergeTarget":this.scopeVisibility.forkPointShas.has(C.sha)&&(W.scopeBoundaryKind="forkPoint")),!G){let e,i=n.get(C.sha);i?.length&&(i.sort((e,t)=>{if(e.parentIndexScore<t.parentIndexScore)return -1;if(e.parentIndexScore>t.parentIndexScore)return 1;if(e.parentIndexScore===t.parentIndexScore){if(e.rowEntered<t.rowEntered)return -1;if(e.rowEntered>t.rowEntered)return 1}return 0}),e=i[0],W.childRefs={heads:[...e?.heads||[]],remotes:[...e?.remotes||[]],tags:[...e?.tags||[]]},n.delete(C.sha));for(let r=0;r<o.length;r+=1){let i=o[r];if(this.childrenBySha[i]||(this.childrenBySha[i]=[]),this.childrenBySha[i].push(C.sha),b)continue;let s=n.get(i);(H||e)&&void 0===s&&(s=[],n.set(i,s)),H?s?.unshift({sha:C.sha,parentIndexScore:r,rowEntered:t,heads:I,remotes:M,tags:A}):e&&s?.unshift({...e,parentIndexScore:r,rowEntered:t})}if(!r||this.highlightedShas[C.sha]){let e=this.orderedGraphRows.length;W.rowIndex=e,this.orderedGraphRows.push(W);let t=(t,o)=>{this.interactiveScrollMarkersFromRows.push({type:t,rowIndex:e,sha:W.sha,label:o})};if(I.length){c.push(e);let o=I.find(e=>e.isCurrentHead);for(let r of(null!=o&&(this.headSha=W.sha,l.push(e),t("head",o.name?`HEAD \u2192 ${o.name}`:"HEAD")),I))r.isCurrentHead||t("localBranches",r.name)}if(M.length)for(let o of(d.push(e),M)){let r=o.owner?`${o.owner}/${o.name}`:o.name;o.current?(h.push(e),this.headUpstreamSha=W.sha,t("upstream",r)):t("remoteBranches",r),this.downstreamsByUpstream[`${o.owner}/${o.name}`]?.length&&this.branchUpstreamRowIndices.push(e)}if(A.length)for(let o of(u.push(e),A))t("tags",o.name);C.type===L.OZ&&(p.push(e),t("stashes",C.message?`Stash: ${C.message}`:"Stash")),(0,ea.l7)(C.type)&&(f.push(e),t("wip",C.message||"WIP"))}if(I.length)for(let e of I)this.shaByRefId[(0,ea.mH)(ev.z.HEAD,e)]=W.sha;if(M.length)for(let e of M)this.shaByRefId[(0,ea.mH)(ev.z.REMOTE,e)]=W.sha;if(A.length)for(let e of A)this.shaByRefId[(0,ea.mH)(ev.z.TAG,e)]=W.sha}this.processedGraphRowBySha[C.sha]=W,a[C.sha]=k}this.props.onColumnsCalculated?.(a);let E=this.props.onScopeAnchorsUnreachable,b=this.scopeVisibility?.unreachableAnchors;if(null!=E&&null!=b&&b.size>0){let e=this._lastReportedUnreachable,t=e?.size!==b.size;if(!t&&null!=e){for(let o of b)if(!e.has(o)){t=!0;break}}t&&(this._lastReportedUnreachable=new Set(b),E(b))}else null!=this._lastReportedUnreachable&&(null==b||0===b.size)&&(this._lastReportedUnreachable=null);this.isMounted?this.setState(e=>({markerRowIndices:{...e.markerRowIndices,head:l,upstream:h,localBranches:c,remoteBranches:d,tags:u,stashes:p,wip:f},interactiveScrollMarkers:this.computeInteractiveScrollMarkers()})):this.state={...this.state,markerRowIndices:{...this.state?.markerRowIndices,head:l,upstream:h,localBranches:c,remoteBranches:d,tags:u,stashes:p,wip:f},interactiveScrollMarkers:this.computeInteractiveScrollMarkers()},this.clearTimelinesInterval(),this.updateTimelines(),this.timelinesInterval=setInterval(this.onTimelinesRefreshInterval,9e5),this.onGraphVisibleRowsUpdated()}updateRowStatsConstraints(){this.rowStatsConstraints=(0,ea.S6)(null!=this.rowsStats?Object.values(this.rowsStats).map(e=>e.additions+e.deletions):[])}updateTimelines(){let e=(0,ea.ug)();(0,ea.Vs)(this.orderedGraphRows,e)}clearTimelines(){for(let e of Object.values(this.processedGraphRowBySha))e.timeLineEntry=void 0}clearTimelinesInterval(){this.timelinesInterval&&(clearInterval(this.timelinesInterval),this.timelinesInterval=void 0)}onTimelinesRefreshInterval=()=>{this.isMounted&&(this.clearTimelines(),this.updateTimelines(),this.setState({processedRows:[...this.orderedGraphRows]}))};cleanupSelections(){for(let e of this.selectedShas)this.processedGraphRowBySha[e]||(this.selectedShas.delete(e),this.selectionFocusSha===e&&(this.selectionFocusSha=void 0));this.selectionAnchorSha&&!this.processedGraphRowBySha[this.selectionAnchorSha]&&(this.selectionAnchorSha=void 0)}getColumnColorByColumn(e){let t=this.getNumGraphColumns(e),o=this.maxColumns>t?this.maxColumns:t,r={};for(let n=0;n<=o;n+=1)if(n<t){var i;let t=e[(0,P.$6)(n)];r[n]="rgba"===(i=z(t)).type?`rgba(${i.r}, ${i.g}, ${i.b}, ${Number(i.a.toFixed(2))})`:`hsla(${i.h}, ${(100*i.s).toFixed(2)}%, ${(100*i.l).toFixed(2)}%, ${Number(i.a.toFixed(2))})`}else{let e=r[n%t];r[n]=e}return r}getNumGraphColumns(e){let t=Number.parseInt(e[F.u],V.Dl);return Number.isNaN(t)?V.Dl:t}expandLastZoneMinWidthForScrollbar(e){let t=e[e.length-1]?.type;if(!t)return;let o=(0,ea.eQ)(this.props.cssVariables,!0),r=V.W[t].minimumWidth+o,i=this.graphZonesByType[t];if(!i||null!=i.maximumWidth&&r>i.maximumWidth)return;i.minimumWidth=r;let n=V.W[t].showIconWidth;null!=n&&(i.showIconWidth=n+o),i.currentWidth<i.minimumWidth&&(i.currentWidth=i.minimumWidth),i.preferredWidth<i.minimumWidth&&(i.preferredWidth=i.minimumWidth)}ensureZoneWidthsMatchGraphWidth(e,t){let o=(0,ea.al)(e);o>t&&this.shrinkZoneWidthsToFitWidth(e,t),o<t&&this.expandZoneWidthsToFitWidth(e,t)}shrinkZoneWidthsToFitWidth(e,t,o){let r=(0,ea.al)(e);for(;r>t;){let i=(0,ea.Q9)(e,o);if(!i)break;let n=(0,ea.al)(e,i.type);if(n+i.currentWidth>t){let o=(0,ea.jY)(i,e,t-n);this.updateWidthByZone(o,i.type)}r=(0,ea.al)(e)}}getOrderedActiveGraphZones(){return this.graphZoneOrdering.sort((e,t)=>this.graphZonesByType[e].order-this.graphZonesByType[t].order).filter(e=>!this.graphZonesByType[e].isHidden).map(e=>this.graphZonesByType[e])}expandZoneWidthsToFitWidth(e,t,o){let r=(0,ea.al)(e);for(;r<t;){let i=(0,ea.fW)(e,o);if(!i)break;let n=(0,ea.al)(e,i.type),s=i.maximumWidth?Math.min(i.maximumWidth,i.preferredWidth||1/0):i.preferredWidth||0;if(n+i.currentWidth<t){let o=t-n;!(0,ea.z)(i.type,e)&&o>s&&(o=s),o=(0,ea.jY)(i,e,o),this.updateWidthByZone(o,i.type)}r=(0,ea.al)(e)}}onGraphHeaderRowMouseDown=e=>{1===e.button&&e.preventDefault()};onToggleRefNodesShown=(e,t,o,r)=>{t.forEach(e=>{o&&this.excludeRefsById[e.id]?delete this.excludeRefsById[e.id]:o||(this.excludeRefsById[e.id]=e)}),this.excludeRemotesByName=this.getExcludeRemotesByName(),this.props.onToggleRefsVisibilityClick?.(e,t,o,r?this.processedGraphRowBySha[r]:void 0),this.processRows(this.props.graphRows),this.setState({processedRows:[...this.orderedGraphRows]})};cleanEdgeCaches(){eN={},eO={},eM={},eI={},Q={}}onZoneEnter=(e,t,o,r)=>{t!==V.ui&&(o&&r&&this.onRefNodeUnhovered(e,o,r),this.onRefZoneUnhovered())};adjustResizedGraphZone(e,t,o,r){if(o?.width){let i=t.currentWidth;this.updateWidthByZone(o.width,t.type,r);let n=(0,ea.kU)(t.type,e),s=this.graphZonesByType[t.type];i>s.currentWidth&&this.expandZoneWidthsToFitWidth(e,this.graphWidth,n+1),i<s.currentWidth&&this.shrinkZoneWidthsToFitWidth(e,this.graphWidth,n-1)}}dimRowsOfSelectedCommit(e){this.state.dimRowsOfSelectedCommit!==e&&this.setState({dimRowsOfSelectedCommit:e})}onGraphContainerBlurred=(e,t,o)=>{setTimeout(()=>{this.isMounted&&(t&&o&&this.onRefNodeUnhovered(e,t,o),this.onRefZoneUnhovered())},250)};onGraphContainerMouseEnter=e=>{this.props.onGraphMouseEnter?.(e)};onGraphContainerMouseLeave=e=>{let t=e.relatedTarget;if(t instanceof HTMLElement&&t.closest(".ref-popover"))return void this.props.onGraphMouseLeave?.(e);let{currentlyHoveredCommitSha:o}=this.state;if(null!=o){let t=this.processedGraphRowBySha[o];null!=t&&this.props.onGraphRowUnhovered?.(e,V.md,t),this.setState({currentlyHoveredCommitSha:void 0})}this.props.onGraphMouseLeave?.(e)};_headerHoverRestoreTimer;onGraphHeaderMouseDown=()=>{let{currentlyHoveredCommitSha:e}=this.state;if(null!=e){if(this.props.onGraphRowUnhovered){let t=this.processedGraphRowBySha[e];null!=t&&this.props.onGraphRowUnhovered({nativeEvent:{relatedTarget:null},relatedTarget:null},V.md,t)}this.setState({currentlyHoveredCommitSha:void 0})}};onGraphHeaderMouseUp=e=>{this.hoverRowForHeaderEvent(e.clientX,e.clientY,e.target)};onGraphHeaderWheel=e=>{let{currentlyHoveredCommitSha:t}=this.state;if(null!=t){if(this.props.onGraphRowUnhovered){let e=this.processedGraphRowBySha[t];null!=e&&this.props.onGraphRowUnhovered({nativeEvent:{relatedTarget:null},relatedTarget:null},V.md,e)}this.setState({currentlyHoveredCommitSha:void 0})}let o=this.orderedGraphRows?.length??0;if(!o)return;let{hasMoreCommits:r,scrollLeft:i,scrollTop:n}=this.state,s=this.graphWidth||this.state.width||0,a=(this.graphHeight||this.state.height||0)-V.q4;if(s<=0||a<=0)return;let l=o*V.yB,h=Math.max(0,l-a),c=n+e.deltaY;if((c=(0,eS.q)(c,0,h))===n)return;let d={clientHeight:a,clientWidth:s,scrollHeight:l,scrollLeft:i,scrollTop:c,scrollWidth:s},u=this.getOrderedActiveGraphZones(),p=u.length>0?u[u.length-1].type:V.md;this.onScrollForZone(p,d,s,a,r);let f=e.target;if(f){this._headerHoverRestoreTimer&&clearTimeout(this._headerHoverRestoreTimer);let t=e.clientX,o=e.clientY;this._headerHoverRestoreTimer=setTimeout(()=>{this._headerHoverRestoreTimer=void 0,this.hoverRowForHeaderEvent(t,o,f)},200)}e.preventDefault()};onGraphHeaderMouseMove=e=>{0===e.buttons&&this.hoverRowForHeaderEvent(e.clientX,e.clientY,e.target)};hoverRowForHeaderEvent(e,t,o){if(!(o instanceof HTMLElement))return;let r=o.closest(".resizable-handle.horizontal");if(null==r||r.closest(`#${V.ui}-header`))return;let i=this.graphContainerRef?.current;if(null==i)return;let n=this.orderedGraphRows?.length??0;if(!n)return;let s=i.getBoundingClientRect(),a=t-s.top;if(a<0)return;let l=this.state.scrollTop??0,{currentlyHoveredCommitSha:h}=this.state,c=Math.floor((a+l)/V.yB);if(c<0||c>=n)return;let d=this.orderedGraphRows[c];if(!d)return;let u=s.top+c*V.yB-l,p=V.yB,f={getBoundingClientRect:()=>({top:u,left:e,right:e+60,bottom:u+p,x:e,y:u,width:60,height:p})};this.onCurrentlyHoveredGraphCommit({clientX:e,currentTarget:f,nativeEvent:{clientX:e,currentTarget:f,target:f}},V.md,d.sha,h)}onGraphResized=(0,ea.xJ)((e,t)=>{if(!this.isMounted)return;let o=Math.floor(t),r=Math.floor(e);if(0===r||0===o)return;let i=o!==this.graphHeight,n=r!==this.graphWidth,s={};if(i&&(this.graphHeight=o,s.height=o),n){this.graphWidth=r;let e=this.getOrderedActiveGraphZones();this.ensureZoneWidthsMatchGraphWidth(e,this.graphWidth),s.width=this.graphWidth,s.graphZones=e}(i||n)&&(this.setState(s),i&&this.onGraphVisibleRowsUpdatedThrottled(),this.props.onGraphResized&&this.props.onGraphResized(this.graphWidth,this.graphHeight))});onGraphVisibleRowsUpdated(){if(this.scheduleVisibleWipShasUpdate(),!this.isMounted||!this.props.onGraphVisibleRowsChanged||!this.orderedGraphRows?.length)return;let{top:e,bottom:t}=this.getTopAndBottomVisibleRowIndex();-1===e||-1===t||e>=this.orderedGraphRows.length||t>=this.orderedGraphRows.length||e===this.lastTopVisibleRowIndex&&t===this.lastBottomVisibleRowIndex||(this.lastTopVisibleRowIndex=e,this.lastBottomVisibleRowIndex=t,this.props.onGraphVisibleRowsChanged&&this.props.onGraphVisibleRowsChanged(this.orderedGraphRows[e],this.orderedGraphRows[t]))}getCurrentPlatform(){return this.props.platform||"darwin"}isMacOSPlatform(){return"darwin"===this.getCurrentPlatform()}isFilteredSearch(){return"filter"===this.searchMode&&(0,ed.Hk)(this.highlightedShas)}getGraphColumnSettingFromZoneType(e){return{width:e.preferredWidth||0,isHidden:e.isHidden,mode:e.mode,order:e.order}}decorateWithHelmet=(e,t,o)=>{let r=(0,P.JQ)(t);return A.createElement(A.Fragment,null,A.createElement("style",{nonce:o},r),A.createElement("div",{className:"gk-graph"},e))};render(){let{columnsSettings:e,customFooterRow:t,headerZoneActions:o,isInUnsupportedRebase:r,isCommitting:i,repoPath:n,nonce:s,pinnedBranchFullName:a,rowAdornmentProvider:l,suppressNonRefRowTooltips:h,wipMessageEditable:c}=this.props,{avatarUrlByEmail:d,columnColorByColumn:u,contexts:p,createRefFormData:f,cssVariablesWithDefaults:m,currentlyHoveredCommitSha:g,dimMergeCommits:_,dimRowsOfSelectedCommit:v,enableShowHideRefsOptions:S,highlightRowsOnRefHover:R,showGhostRefsOnRowHover:y,showRemoteNamesOnRefs:T,enabledRefMetadataTypes:C,enabledScrollMarkerTypes:w,graphCommitDescDisplayMode:E,graphZones:b,hasMoreCommits:I,height:M,highlightedShas:O,hoveredRefGroup:N,hoveredRefZoneSha:D,themeOpacityFactor:H,isLoadingRows:G,rowsStatsLoading:k,numGraphColumns:W,pendingCommitMessageSummary:z,processedRows:F,refIconsPosition:P,refMetadataById:B,useAuthorInitialsForAvatars:Z,scrollToAlignment:U,scrollToIndex:j,scrollTop:$,scrollLeft:Y,shaLength:q,width:Q,workDirStats:J}=this.state,ee=x()("flex","graph-container"),et=(0,ea.xd)(F),eo=this.getOrCreateSmartCellRangeRenderer(Y,this.isKeyboardNavigating),er=this.getLeftGutterWidth(),ei=this.getRightGutterWidth(),en=this.getRightGutterBoxShadowAlpha(H),es=this.getLeftGutterBoxShadowAlpha(H),el=this.getNodeOffsetByColumn(),eh=this.getNodeOpacityByColumn(),ec=(0,ea.kU)(V.ui,b),ep=(0,ea.kU)(V.md,b),ef=!N,em={alwaysShowTimelines:this.isFilteredSearch(),avatarUrlByEmail:d,createRefFormData:f??void 0,dimMergeCommits:_,dimRowsOfSelectedCommit:v,enableShowHideRefsOptions:S,highlightRowsOnRefHover:R,showGhostRefsOnRowHover:y,showRemoteNamesOnRefs:T,enabledRefMetadataTypes:C,enabledScrollMarkerTypes:w,isInUnsupportedRebase:r||!1,isCommitting:i||!1,pendingCommitMessageSummary:z,workDirStats:J,wipNodeMetadataBySha:this.props.wipNodeMetadataBySha,repoPath:n,columnColorByColumn:u,currentlyHoveredCommitSha:g,cssVariables:m,graphCommitDescDisplayMode:E,graphZoneModeConstants:this.graphZoneModeConstants,graphZones:b,hasMoreCommits:I,height:M,highlightedShas:O,hoveredRefGroup:N,hoveredRefZoneSha:D,includeOnlyRefsById:this.includeOnlyRefsById,includeOnlyRemotesByName:this.includeOnlyRemotesByName,isLoadingRows:G,selectedShas:this.selectedShas,leftGutterBoxShadowAlpha:es,leftGutterWidth:er,nodeOffsetByColumn:el,nodeOpacityByColumn:eh,nonce:s,numGraphColumns:W,pinnedBranchFullName:a,processedRows:F,processedGraphRowBySha:this.processedGraphRowBySha,refIconsPosition:P,refMetadataById:B,fallbackRefMetadataById:this.previousRefMetadataById,rightGutterBoxShadowAlpha:en,rightGutterWidth:ei,rowStatsConstraints:this.rowStatsConstraints,rowsStats:this.rowsStats,suppressNonRefRowTooltips:h,useAuthorInitialsForAvatars:Z,scrollToAlignment:U,scrollLeft:Y,scrollTop:$,shaLength:q,shouldShowRefLine:-1!==ec&&-1!==ep&&ep-ec==1,width:Q,wipMessageEditable:c||!1,onMissingAvatar:this.onMissingAvatar,onMissingRefMetadata:this.onMissingRefMetadata,clearCurrentlyHoveredGraphCommit:this.onClearCurrentlyHoveredGraphCommit,setAsCurrentlyHoveredGraphCommit:this.onCurrentlyHoveredGraphCommit,onClickRef:this.onClickRef,onClickCommit:this.onClickCommit,onDoubleClickCommit:this.onDoubleClickCommit,onBlurWipNodeInput:this.onBlurWipNodeInput,onFocusWipNodeInput:this.onFocusWipNodeInput,onDoubleClickRef:this.onDoubleClickRef,onMessageChange:this.onMessageChange,onRefBeginDrag:this.onRefBeginDrag,onRefCanDrag:this.onRefCanDrag,onRefCanDrop:this.onRefCanDrop,onRefCreate:this.onRefCreate,onRefCreateCancel:this.onRefCreateCancel,onRefCreateContextMenu:this.onRefCreateContextMenu,onRefDragEnter:this.onRefDragEnter,onRefDragLeave:this.onRefDragLeave,onRefDrop:this.onRefDrop,onRefEndDrag:this.onRefEndDrag,onRefNodeHovered:this.onRefNodeHovered,onRefNodeUnhovered:this.onRefNodeUnhovered,onRefShorthandChange:this.onRefShorthandChange,onRefZoneHovered:this.onRefZoneHovered,onRefZoneUnhovered:this.onRefZoneUnhovered,onToggleRefNodesShown:this.onToggleRefNodesShown,onCommitContextMenu:this.onCommitContextMenu,onShowContextMenuForGroupedRef:this.onRefContextMenu,getExternalIcon:this.getIconCallback,formatCommitDateTime:this.formatCommitDateTimeCallback,formatRefShorthand:this.formatRefShorthandCallback,isRefShorthandValid:this.isRefShorthandValidCallback,translate:this.translateCallback},eg={[V.ui]:((e,t)=>{let{createRefFormData:o,formatRefShorthand:r,enableShowHideRefsOptions:i,enabledRefMetadataTypes:n,isRefShorthandValid:s,showGhostRefsOnRowHover:a,showRemoteNamesOnRefs:l,onDoubleClickRef:h,processedRows:c,includeOnlyRefsById:d,includeOnlyRemotesByName:u,isInUnsupportedRebase:p,getExternalIcon:f,hoveredRefGroup:m,hoveredRefZoneSha:g,numGraphColumns:_,onClickRef:v,onMissingRefMetadata:S,onShowContextMenuForGroupedRef:R,onRefBeginDrag:y,onRefCanDrag:T,onRefCanDrop:C,onRefCreate:w,onRefCreateCancel:E,onRefCreateContextMenu:b,onRefDragEnter:I,onRefDragLeave:M,onRefDrop:O,onRefEndDrag:N,onRefNodeHovered:x,onRefNodeUnhovered:D,onRefShorthandChange:H,onRefZoneHovered:G,onRefZoneUnhovered:k,onToggleRefNodesShown:W,pinnedBranchFullName:z,refIconsPosition:L,refMetadataById:F,fallbackRefMetadataById:P,shouldShowRefLine:B,translate:Z,clearCurrentlyHoveredGraphCommit:U,currentlyHoveredCommitSha:j}=e,$=new ea.n$(e);return({rowIndex:e,style:Y})=>{let K=t(e),q=c[e],X=V.ui,Q=$.getZoneWidth(X),J=$.isHovering(e),{sha:ee,type:et,hasRefs:eo,contexts:er}=q,ei=er?.ref||null,en=er?.refGroups||null,es=$.isSingleSelected(e),ea=(a||eo)&&(eo||J||es)?$.getGraphRefGroupsByNameForRow(e):[],el=$.isColumnFollowingGraphColumn(X),eh=$.shouldUseColumnHeaderIcons(X);return o?.sha===ee?A.createElement(n8,{createRefFormData:o,formatRefShorthand:r,isRefShorthandValid:s,key:K,onCancel:E,onContextMenu:b,onRefCreate:w,onRefShorthandChange:H,refZoneWidth:Q,style:Y,translate:Z}):A.createElement(si,{clearCurrentlyHoveredGraphCommit:U,column:q.column,columnForColoring:q.columnForColoring,context:ei,currentlyHoveredCommitSha:j??null,enabledRefMetadataTypes:n,enableShowHideRefsOptions:i,fallbackRefMetadata:P,getExternalIcon:f,hasActive:$.rowContainsCurrentHeadRef(q),hasRefs:eo||!1,hasTimeline:$.hasTimeline(e),hoveredRefGroup:m??null,hoveredRefZoneSha:g,includeOnlyRefsById:d,includeOnlyRemotesByName:u,isInUnsupportedRebase:p,isSingleSelected:es,key:K,numGraphColumns:_,onClickRef:v,onDoubleClickRef:h,onMissingRefMetadata:S,onRefBeginDrag:y,onRefCanDrag:T,onRefCanDrop:C,onRefDragEnter:I,onRefDragLeave:M,onRefDrop:O,onRefEndDrag:N,onToggleRefNodesShown:W,pinnedBranchFullName:z,refGroupContexts:en,refGroupsByName:ea,refIconsPosition:L,refMetadata:F,refNodeHovered:x,refNodeUnhovered:D,refZoneHovered:G,refZoneUnhovered:k,scopeBoundaryKind:q.scopeBoundaryKind,sha:ee,shouldShowRefLine:B,showColorStrip:el,showContextMenuForGroupedRef:R,showGhostRefsOnRowHover:a,showRemoteNamesOnRefs:l,style:Y,translate:Z,type:et,useColumnHeaderIcons:eh,width:Q})}})(em,et),[V.md]:n9(em,et),[V.d4]:((e,t)=>{let{dimMergeCommits:o,dimRowsOfSelectedCommit:r,processedRows:i,translate:n,getExternalIcon:s,graphCommitDescDisplayMode:a,highlightRowsOnRefHover:l,isInUnsupportedRebase:h,numGraphColumns:c,isCommitting:d,pendingCommitMessageSummary:u,workDirStats:p,wipNodeMetadataBySha:f,onBlurWipNodeInput:m,onFocusWipNodeInput:g,onMessageChange:_,clearCurrentlyHoveredGraphCommit:v,currentlyHoveredCommitSha:S,onCommitContextMenu:R,onClickCommit:y,onDoubleClickCommit:T,setAsCurrentlyHoveredGraphCommit:C,suppressNonRefRowTooltips:w,wipMessageEditable:E}=e,b=new ea.n$(e);return({rowIndex:e,style:I})=>{let M=t(e),O=i[e],{displaySummary:N,displayBody:x,sha:D,type:H,contexts:G,message:k}=O,W=G?.message||void 0,z=G?.row||void 0,F=V.d4,P=b.isColumnFollowingGraphColumn(F),B=b.isLastColumn(F),Z=b.getZoneWidth(F),U=b.getVerticalScrollWidth(F),j=b.isHovering(e),{hasWorkDirChanges:$,isWipEditable:Y,customWipContent:K}=eu(D,H,p,f,E),q=a===V.FQ.ALWAYS||a===V.FQ.ON_HOVER&&j,X=H!==L.bY||Y?A.createElement(A.Fragment,null,A.createElement("span",{className:"message-zone--summary"},N),q&&x?A.createElement("span",{className:"message-zone--body"},x):null):A.createElement("span",{className:"message-zone--wip-row"},A.createElement("span",{className:"message-zone--wip-text"},q?N:null),K);return $&&Y?A.createElement(nY,{clearCurrentlyHoveredGraphCommit:v,currentlyHoveredCommitSha:S??null,getExternalIcon:s,graphZoneType:F,isCommitting:d,isHovering:b.isHovering(e),isSelected:b.isSelected(e),key:M,onBlur:m,onClickCommit:y,onContextMenu:R,onFocus:g,onMessageChange:_,setAsCurrentlyHoveredGraphCommit:C,sha:D,style:I,translate:n,value:u,workDirStats:p}):A.createElement(nL,{clearCurrentlyHoveredGraphCommit:v,column:O.column,columnForColoring:O.columnForColoring,context:W,currentlyHoveredCommitSha:S??null,dimRowsOfSelectedCommit:r,getExternalIcon:s,graphZoneType:F,hasActive:b.rowIsActiveHead(O),highlightRowsOnRefHover:l,isDimmedMergeCommitRow:H===L.t$&&o,isHighlighted:b.isHighlighted(e),isHovering:j,isInUnsupportedRebase:h,isLastColumn:B,isMissingHoveredRefGroup:b.isMissingHoveredRefGroup(e),isSelected:b.isSelected(e),key:M,numGraphColumns:c,onClickCommit:y,onContextMenu:R,onDoubleClickCommit:T,rowContext:z,scopeBoundaryKind:O.scopeBoundaryKind,setAsCurrentlyHoveredGraphCommit:C,sha:D,showColorStrip:P,showConflictIcon:H===L.l2||H===L.gL,showTimeline:b.hasTimeline(e),style:I,title:w?void 0:k,type:H,verticalScrollWidth:U,zoneWidth:Z},X)}})(em,et),[V.fx]:((e,t)=>{let{avatarUrlByEmail:o,clearCurrentlyHoveredGraphCommit:r,cssVariables:i,currentlyHoveredCommitSha:n,dimMergeCommits:s,dimRowsOfSelectedCommit:a,getExternalIcon:l,highlightRowsOnRefHover:h,processedRows:c,isInUnsupportedRebase:d,onCommitContextMenu:u,onClickCommit:p,onDoubleClickCommit:f,numGraphColumns:m,setAsCurrentlyHoveredGraphCommit:g,suppressNonRefRowTooltips:_,useAuthorInitialsForAvatars:v}=e,S=new ea.n$(e);return({rowIndex:e,style:R})=>{let y=t(e),T=c[e],{author:C,email:w,message:E,sha:b,type:I,contexts:M}=T,O=V.fx,N=S.getActiveGraphZone(O),D=I!==L.bY?C:null,H=I!==L.bY?nP(C,w):void 0,G=M?.author||void 0,k=M?.row||void 0,W=S.isColumnFollowingGraphColumn(O),z=S.isLastColumn(O),F=S.getZoneWidth(O),P=(F<=N.minimumWidth||N?.mode===V.eB.Rich)&&I!==L.bY;if(P){let e=v?void 0:o[w];D=A.createElement(nB,{authorInitials:nF(C),avatarUrl:e,className:x()("node",L.oB,"z6"),column:T.column,context:M?.avatar||void 0,cssVariables:i,fontSize:10,height:V.n0,size:V.CF,tooltip:_?void 0:()=>{let e=C&&""!==C.trim()&&"Unknown"!==C?nP(C,w):w,t=X(K(E||"")),o="";if(0===t.length)o=e;else{t.unshift({email:w,name:C});for(let e=0;e<t.length;e+=1){let r=t[e];o+=nP(r.name,r.email),e<t.length-1&&(o+=", ")}}return o},useAuthorInitialsForAvatars:v,width:V.n0})}return A.createElement(nL,{clearCurrentlyHoveredGraphCommit:r,column:T.column,columnForColoring:T.columnForColoring,context:G,currentlyHoveredCommitSha:n??null,dimRowsOfSelectedCommit:a,getExternalIcon:l,graphZoneType:O,hasAvatars:P,highlightRowsOnRefHover:h,isDimmedMergeCommitRow:I===L.t$&&s,isHighlighted:S.isHighlighted(e),isHovering:S.isHovering(e),isInUnsupportedRebase:d,isLastColumn:z,isMissingHoveredRefGroup:S.isMissingHoveredRefGroup(e),isSelected:S.isSelected(e),key:y,numGraphColumns:m,onClickCommit:p,onContextMenu:u,onDoubleClickCommit:f,rowContext:k,scopeBoundaryKind:T.scopeBoundaryKind,setAsCurrentlyHoveredGraphCommit:g,sha:b,showColorStrip:W,showTimeline:S.hasTimeline(e),style:R,title:_?void 0:H,type:I,verticalScrollWidth:S.getVerticalScrollWidth(O),zoneWidth:F},D)}})(em,et),[V.$A]:((e,t)=>{let{processedRows:o,getExternalIcon:r,highlightRowsOnRefHover:i,isInUnsupportedRebase:n,numGraphColumns:s,formatCommitDateTime:a,clearCurrentlyHoveredGraphCommit:l,dimMergeCommits:h,dimRowsOfSelectedCommit:c,currentlyHoveredCommitSha:d,onCommitContextMenu:u,onClickCommit:p,onDoubleClickCommit:f,setAsCurrentlyHoveredGraphCommit:m,suppressNonRefRowTooltips:g}=e,_=new ea.n$(e);return({rowIndex:e,style:v})=>{let S=t(e),R=o[e],{date:y,sha:T,type:C,contexts:w}=R,E=y&&C!==L.bY?a(y,L.N.RowEntry):null,b=y&&C!==L.bY?a(y,L.N.Tooltip):void 0,I=w?.date||void 0,M=w?.row||void 0,O=V.$A,N=_.isColumnFollowingGraphColumn(O),x=_.isLastColumn(O),D=_.getZoneWidth(O),H=_.getVerticalScrollWidth(O);return A.createElement(nL,{clearCurrentlyHoveredGraphCommit:l,column:R.column,columnForColoring:R.columnForColoring,context:I,currentlyHoveredCommitSha:d??null,dimRowsOfSelectedCommit:c,getExternalIcon:r,graphZoneType:O,highlightRowsOnRefHover:i,isDimmedMergeCommitRow:C===L.t$&&h,isHighlighted:_.isHighlighted(e),isHovering:_.isHovering(e),isInUnsupportedRebase:n,isLastColumn:x,isMissingHoveredRefGroup:_.isMissingHoveredRefGroup(e),isSelected:_.isSelected(e),key:S,numGraphColumns:s,onClickCommit:p,onContextMenu:u,onDoubleClickCommit:f,rowContext:M,scopeBoundaryKind:R.scopeBoundaryKind,setAsCurrentlyHoveredGraphCommit:m,sha:T,showColorStrip:N,showTimeline:!1,style:v,title:g?void 0:b,type:C,verticalScrollWidth:H,zoneWidth:D},E)}})(em,et),[V.AR]:((e,t)=>{let{processedRows:o,getExternalIcon:r,highlightRowsOnRefHover:i,isInUnsupportedRebase:n,numGraphColumns:s,clearCurrentlyHoveredGraphCommit:a,currentlyHoveredCommitSha:l,dimMergeCommits:h,dimRowsOfSelectedCommit:c,onCommitContextMenu:d,onClickCommit:u,onDoubleClickCommit:p,setAsCurrentlyHoveredGraphCommit:f,shaLength:m,suppressNonRefRowTooltips:g}=e,_=new ea.n$(e);return({rowIndex:e,style:v})=>{let S=t(e),R=o[e],{sha:y,type:T,contexts:C}=R,w=((e,t=V.wT)=>e?e.substring(0,t):"")(y,m??void 0),E=C?.sha||void 0,b=C?.row||void 0,I=V.AR,M=_.isColumnFollowingGraphColumn(I),O=_.isLastColumn(I),N=_.getZoneWidth(I),x=_.getVerticalScrollWidth(I);return A.createElement(nL,{clearCurrentlyHoveredGraphCommit:a,column:R.column,columnForColoring:R.columnForColoring,context:E,currentlyHoveredCommitSha:l??null,dimRowsOfSelectedCommit:c,getExternalIcon:r,graphZoneType:I,highlightRowsOnRefHover:i,isDimmedMergeCommitRow:T===L.t$&&h,isHighlighted:_.isHighlighted(e),isHovering:_.isHovering(e),isInUnsupportedRebase:n,isLastColumn:O,isMissingHoveredRefGroup:_.isMissingHoveredRefGroup(e),isSelected:_.isSelected(e),key:S,numGraphColumns:s,onClickCommit:u,onContextMenu:d,onDoubleClickCommit:p,rowContext:b,scopeBoundaryKind:R.scopeBoundaryKind,setAsCurrentlyHoveredGraphCommit:f,sha:y,showColorStrip:M,showTimeline:_.hasTimeline(e),style:v,type:T,verticalScrollWidth:x,zoneWidth:N},T!==L.bY?A.createElement("span",{className:"font-monospace pointer",title:g?void 0:w},w):null)}})(em,et),[V.Sq]:((e,t)=>{let{processedRows:o,rowStatsConstraints:r,getExternalIcon:i,highlightRowsOnRefHover:n,isInUnsupportedRebase:s,numGraphColumns:a,clearCurrentlyHoveredGraphCommit:l,currentlyHoveredCommitSha:h,dimMergeCommits:c,dimRowsOfSelectedCommit:d,onCommitContextMenu:u,onClickCommit:p,onDoubleClickCommit:f,rowsStats:m,setAsCurrentlyHoveredGraphCommit:g,suppressNonRefRowTooltips:_}=e,v=new ea.n$(e);return({rowIndex:e,style:S})=>{let R=t(e),y=o[e],{sha:T,type:C,contexts:w}=y,E=w?.stats||void 0,b=w?.row||void 0,I=m?.[T],M=[I?.files?`${I.files} files changed`:"",I?.additions?`${I.additions} lines added`:"",I?.deletions?`${I.deletions} lines deleted`:""].filter(Boolean).join(", ");M=C!==L.bY?M:"";let O=V.Sq,N=v.isColumnFollowingGraphColumn(O),x=v.isLastColumn(O),D=v.getZoneWidth(O),H=v.getVerticalScrollWidth(O);return A.createElement(nL,{clearCurrentlyHoveredGraphCommit:l,column:y.column,columnForColoring:y.columnForColoring,context:E,currentlyHoveredCommitSha:h??null,dimRowsOfSelectedCommit:d,getExternalIcon:i,graphZoneType:O,highlightRowsOnRefHover:n,isDimmedMergeCommitRow:C===L.t$&&c,isHighlighted:v.isHighlighted(e),isHovering:v.isHovering(e),isInUnsupportedRebase:s,isLastColumn:x,isMissingHoveredRefGroup:v.isMissingHoveredRefGroup(e),isSelected:v.isSelected(e),key:R,numGraphColumns:a,onClickCommit:p,onContextMenu:u,onDoubleClickCommit:f,rowContext:b,scopeBoundaryKind:y.scopeBoundaryKind,setAsCurrentlyHoveredGraphCommit:g,sha:T,showColorStrip:N,showTimeline:v.hasTimeline(e),style:S,title:_?void 0:M,type:C,verticalScrollWidth:H,zoneWidth:D},I&&C!==L.bY?A.createElement(nG,{constraints:r,getExternalIcon:i,isLastColumn:x,isRowSelected:v.isSelected(e),stats:I,verticalScrollWidth:H,zoneWidth:D}):null)}})(em,et),[V.OU]:((e,t)=>{let{translate:o,processedRows:r}=e,i=x()("graph-row-wrapper","grow-3","height-100","graph-zone-column","min-width-0","pb3","pointer","pt3","relative"),n=new ea.n$(e);return({rowIndex:e,style:s})=>{let a=t(e),l=x()("graph-row","height-100-percent","flex"),h=n.hasTimeline(e),c=r[e],d=c.contexts?.row||void 0,u=c.timeLineEntry?.label||"",p=c.timeLineEntry?.value||0,f=h?A.createElement(oA,null):null,m=h?A.createElement(oD,{message:o(u,p)}):null;return A.createElement("div",{className:i,"data-vscode-context":(0,ea.DO)(d),key:a,style:s},f,A.createElement("div",{className:l,"data-vscode-context":(0,ea.DO)(d)},m))}})(em,et)},e_=b.map((e,o)=>{let r=0===o;return A.createElement(o$,{branchUpstreamRowIndices:this.branchUpstreamRowIndices,cellRenderersByIds:eg,columnIndex:o,customFooterRow:t,enabledScrollMarkerTypes:w,enableResizer:ef,getExternalIcon:this.getIconCallback,getKeyForCell:et,graphHeight:M-V.q4,graphWidth:Q,graphZones:b,graphZoneType:e.type,hasMoreCommits:I,horizontalScrollHeight:this.getHorizontalScrollHeight(e.type,m),interactiveScrollMarkers:this.state.interactiveScrollMarkers,isFilteredSearch:this.isFilteredSearch(),isLoadingRows:G,key:`${e.type}ColumnContainer`,markerColors:this.getMarkerColors(),markerRowIndices:this.state.markerRowIndices,onResize:this.onGraphZoneResize,onResizeEnd:this.onGraphZoneResizeEnd,onScroll:this.onScrollForZone,onScrollMarkerClicked:this.onScrollMarkerClicked,onScrollToRowCausedUpdate:r?this.onScrollToRowCausedUpdateForFirstColumn:void 0,onZoneEnter:t=>this.onZoneEnter(t,e.type,N,D),processedRows:F,rowCount:F.length,scrollLeft:Y,scrollToAlignment:r?U:void 0,scrollToIndex:r?j:void 0,scrollTop:$,smartCellRangeRenderer:eo,stickyTimeline:this.props.stickyTimeline,translate:this.translateCallback,verticalScrollWidth:this.getVerticalScrollWidth(e.type,m)})}),ev=this.graphComponentRef?.current&&A.createElement(nR,{columnsSettings:e,dragAppendToContainer:this.graphComponentRef?.current,enableResizer:ef,enableShowHideRefsOptions:S,excludeRefsById:this.excludeRefsById,getExternalIcon:this.getIconCallback,graphZones:b,headerContext:p?.header,headerZoneActions:o,height:M,includeOnlyRefsById:this.includeOnlyRefsById,onColumnReOrdered:this.onGraphColumnReOrdered,onFilterColumnClick:this.onFilterColumnClick,onGraphZoneResize:this.onGraphZoneResize,onGraphZoneResizeEnd:this.onGraphZoneResizeEnd,onMouseDownCapture:this.onGraphHeaderMouseDown,onMouseMoveCapture:this.onGraphHeaderMouseMove,onMouseUpCapture:this.onGraphHeaderMouseUp,onPopupGraphHeaderContextMenu:this.onPopupGraphHeaderContextMenu,onSettingsClick:this.onSettingsClick,onToggleRefNodesShown:this.onToggleRefNodesShown,onWheel:this.onGraphHeaderWheel,repoPath:n,rowsStatsLoading:k,settingsContext:p?.settings,showRemoteNamesOnRefs:T,translate:this.translateCallback,width:Q}),eS=this.getHeadPillDirection(),eR=null!=this.headSha?this.processedGraphRowBySha[this.headSha]:void 0,ey=eR?.columnForColoring??eR?.column,eT=null!=ey?u[ey]:void 0,eC=b.length>0&&this.getVerticalScrollWidth(b[b.length-1].type,m)>0,ew=A.createElement("div",{className:"graph-component","data-vscode-context":(0,ea.DO)(p?.graph),onBlur:e=>this.onGraphContainerBlurred(e,N,D),onMouseEnter:this.onGraphContainerMouseEnter,onMouseLeave:this.onGraphContainerMouseLeave,ref:this.graphComponentRef,style:{height:"100%",width:"100%",position:"absolute"},tabIndex:-1},ev,A.createElement("div",{className:(0,ed.xV)(O)?x()(ee,"graph-highlighted"):ee,id:"graph-container",onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onMouseDown:this.onGraphHeaderRowMouseDown,ref:this.graphContainerRef,style:{height:M,width:Q},tabIndex:-1},e_,l&&A.createElement(nO,{allRows:F,getVisibleRows:this.getVisibleRows,hasVerticalScrollbar:eC,hoveredSha:g,provider:l,selectedShas:this.selectedShas}),A.createElement(nH,{getExternalIcon:this.getIconCallback,getVisibleRows:this.getVisibleRows,hasVerticalScrollbar:eC,hoveredSha:g,selectedShas:this.selectedShas,translate:this.translateCallback,wipMessageEditable:c??!1,wipNodeMetadataBySha:this.props.wipNodeMetadataBySha,workDirStats:J})),null!=eS&&A.createElement("button",{"aria-label":"Scroll to HEAD",className:`graph-head-pill graph-head-pill--${eS}`,onClick:this.onHeadPillClick,style:null!=eT?{"--head-pill-color":eT}:void 0,title:"Scroll to HEAD",type:"button"},A.createElement("svg",{"aria-hidden":"true",fill:"none",height:"10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.2",viewBox:"0 0 16 16",width:"10"},"up"===eS?A.createElement("path",{d:"M8 13V3M3 8l5-5 5 5"}):A.createElement("path",{d:"M8 3v10M3 8l5 5 5-5"})),"HEAD"));return this.decorateWithHelmet(ew,m,s)}}var ss=sn},385(e,t,o){o.d(t,{A:()=>s});var r=o(641),i=o(895);class n extends r.PureComponent{resizeObserver;scrollbarContainerRef=r.createRef();horizontalScrollRef=r.createRef();scrollabbleContentRef=r.createRef();verticalScrollRef=r.createRef();outerHorizontalScrollRef=r.createRef();constructor(e){super(e),this.resizeObserver=new ResizeObserver(e=>e.forEach(e=>this.onContainerResized(e.contentRect.width,e.contentRect.height)))}updateScrollbarValues(e,t){this.horizontalScrollRef?.current&&(this.horizontalScrollRef.current.scrollLeft=e||0),this.verticalScrollRef?.current&&(this.verticalScrollRef.current.scrollTop=t||0)}componentDidUpdate(e){let{scrollLeft:t,scrollTop:o}=this.props;(e.scrollLeft!==t||e.scrollTop!==o)&&this.updateScrollbarValues(t,o)}onHorizontalScroll(e){this.props.onScroll&&this.props.onScroll({clientHeight:this.props.height||0,clientWidth:e.target.clientWidth,scrollHeight:this.getAdjustedContentHeight(),scrollLeft:e.target.scrollLeft,scrollTop:this.props.scrollTop||0,scrollWidth:e.target.scrollWidth})}onVerticalScroll(e){let t=1>Math.abs(e.target.scrollTop-(this.props.scrollTop??0));this.props.onScroll&&!t&&this.props.onScroll({clientHeight:e.target.clientHeight,clientWidth:this.props.width||0,scrollHeight:e.target.scrollHeight,scrollLeft:this.props.scrollLeft||0,scrollTop:e.target.scrollTop,scrollWidth:this.props.contentWidth||0})}onWheel(e){if(!this.props.onScroll||!this.verticalScrollRef.current&&!this.props.forceOnVerticalWheel&&!this.horizontalScrollRef.current&&!this.props.forceOnHorizontalWheel)return;let t=this.props.scrollLeft||0,o=t;(this.horizontalScrollRef.current||this.props.forceOnHorizontalWheel)&&(o+=e.deltaX,(o=o>=0?o:0)>t&&this.horizontalScrollRef?.current&&(0,i.y6)(this.horizontalScrollRef.current)&&(o=t));let r=this.props.scrollTop||0,n=r;(this.verticalScrollRef.current||this.props.forceOnVerticalWheel)&&(n+=e.deltaY,(n=n>=0?n:0)>r&&this.verticalScrollRef?.current&&(0,i.br)(this.verticalScrollRef.current)&&(n=r)),(n!==r||o!==t)&&this.props.onScroll({clientHeight:this.props.height||0,clientWidth:this.props.width||0,scrollHeight:this.getAdjustedContentHeight(),scrollLeft:o>=0?o:0,scrollTop:n>=0?n:0,scrollWidth:this.props.contentWidth||0})}componentDidMount(){this.updateScrollbarValues(this.props.scrollLeft,this.props.scrollTop),this.resizeObserver.observe(this.scrollbarContainerRef.current)}componentWillUnmount(){this.resizeObserver.disconnect()}onContainerResized=(0,i.xJ)((e,t)=>{let o=this.props.contentHeight||0,r=this.props.contentWidth||0,i=this.props.scrollTop||0,n=this.props.scrollLeft||0,s=t<o?i:0,a=e<r?n:0;(i!==s||n!==a)&&(this.updateScrollbarValues(a,s),this.props.onScroll?.({clientHeight:t,clientWidth:e,scrollHeight:o,scrollLeft:a,scrollTop:s,scrollWidth:r}))});hasHorizontalScroll(){let{contentWidth:e,displayHorizontalScrollbar:t,forceHorizontalScrollbar:o,width:r}=this.props;return!!o||!!t&&(r??0)<e}hasVerticalScroll(){let{displayVerticalScrollbar:e,forceVerticalScrollbar:t,height:o}=this.props;return!!t||!!e&&(o??0)<this.getAdjustedContentHeight()}getHorizontalScrollbarTickness(){return parseInt(this.outerHorizontalScrollRef.current?.clientHeight,10)||0}getAdjustedContentHeight(){return this.props.contentHeight+this.getHorizontalScrollbarTickness()}adjustScrollWhileDragging(e){let t,o=this.getAdjustedContentHeight();if(!this.scrollabbleContentRef.current||(this.props.height??0)>=o||!this.props.onScroll)return;let r=this.scrollabbleContentRef.current.getBoundingClientRect(),i=e.clientY-r.top,n=Math.abs(o-(this.props.height??0));if((this.props.scrollTop??0)>0&&i<=20){let e=(this.props.scrollTop??0)-20;t={clientHeight:r.height,clientWidth:r.width,scrollHeight:n,scrollLeft:this.props.scrollLeft||0,scrollTop:e>0?e:0,scrollWidth:this.props.contentWidth||0}}if((this.props.scrollTop??0)<n&&i>=(this.props.height??0)-20){let e=(this.props.scrollTop??0)+20;t={clientHeight:r.height,clientWidth:r.width,scrollHeight:n,scrollLeft:this.props.scrollLeft||0,scrollTop:e<n?e:n,scrollWidth:this.props.contentWidth||0}}t&&this.props.onScroll(t)}render(){let{children:e,contentHeight:t,contentWidth:o,forceHorizontalScrollbar:i,forceVerticalScrollbar:n,height:s,width:a}=this.props,l=this.hasVerticalScroll(),h=this.hasHorizontalScroll(),c=h&&r.createElement("div",{className:"scrollbar-outer horizontal",ref:this.outerHorizontalScrollRef,style:{top:`calc(${s}px - var(--scrollable-scrollbar-thickness))`,width:a}},r.createElement("div",{className:"scrollbar-inner horizontal_scrollbar",onScroll:e=>this.onHorizontalScroll(e),ref:this.horizontalScrollRef,style:{overflowX:i?"scroll":"auto",width:l?`calc(${a}px - var(--scrollable-scrollbar-thickness))`:a}},r.createElement("div",{style:{height:"1px",width:o}}))),d=l&&r.createElement("div",{className:"scrollbar-outer vertical",style:{height:s}},r.createElement("div",{className:"scrollbar-inner vertical_scrollbar",onScroll:e=>this.onVerticalScroll(e),ref:this.verticalScrollRef,style:{overflowY:n?"scroll":"auto",height:h?`calc(${s}px - var(--scrollable-scrollbar-thickness))`:s}},r.createElement("div",{style:{height:`calc(${t}px + var(--scrollable-scrollbar-thickness))`,width:"1px"}})));return r.createElement("div",{className:"scrollbar-container",onWheelCapture:e=>this.onWheel(e),ref:this.scrollbarContainerRef,style:{height:s,width:a}},r.createElement("div",{className:"scrollable-content",onDragOverCapture:e=>this.adjustScrollWhileDragging(e),ref:this.scrollabbleContentRef,style:{height:s,width:a}},e),c,d)}}var s=n},823(e,t,o){o.d(t,{N:()=>c,OZ:()=>a,bY:()=>l,gL:()=>s,l2:()=>i,oB:()=>r,t$:()=>n});let r="commit-node",i="merge-conflict-node",n="merge-node",s="unsupported-rebase-warning-node",a="stash-node",l="work-dir-changes";var h,c=((h=c||{}).RowEntry="rowEntry",h.Tooltip="tooltip",h)},95(){},555(e,t,o){o.d(t,{Y:()=>i,u:()=>r});let r="--num-columns-supported",i={"--graph-row-height":"22px","--font-default":"'Open Sans', Arial, sans-serif !important","--font-monospace":"'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace","--font-size":"62.5%","--fs-1":"1rem","--fs-2":"1.2rem","--fs-3":"1.4rem","--fs-4":"1.6rem","--fs-5":"1.8rem","--fs-6":"2rem","--fs-7":"2.4rem","--button-xs-padding-y":".15rem","--button-xs-padding-x":".25rem","--button-small-padding-y":".25rem","--button-small-padding-x":".5rem","--button-medium-padding-y":".5rem","--button-medium-padding-x":".75rem","--button-large-padding-y":"1rem","--button-large-padding-x":"1.25rem","--button-radius":".2rem","--input-radius":"3px","--about-modal-bg-color":"#e2e4e9","--about-modal-width":"650px","--label__purple-color-f25":"rgba(197,23,182,0.25)","--registration-modal-width":"400px","--file-history-header-height":"35px","--shop-modal-width":"95vw","--shop-modal-height":"95vh","--scrollable-scrollbar-thickness":"14px","--mini-commit-col-left-width":"30px","--mini-commit-col-middle-padding":"6px","--mini-commit-col-right-width":"56px","--fuzzy-finder-repo-color":"rgba(46,206,157,0.1)","--fuzzy-finder-checkout-color":"rgba(6,105,247,0.1)","--fuzzy-finder-history-color":"rgba(197,23,182,0.1)","--handle-width":"7px","--shadow-color":"rgba(0,0,0,0.4)","--graph-color-5-f10":"rgba(205,1,1,0.1)","--graph-color-6-f10":"rgba(242,93,46,0.1)","--graph-color-7-f10":"rgba(242,202,51,0.1)","--graph-color-8-f10":"rgba(123,217,56,0.1)","--graph-color-9-f10":"rgba(46,206,157,0.1)","--graph-color-0-f10":"rgba(21,160,191,0.1)","--graph-color-1-f10":"rgba(6,105,247,0.1)","--graph-color-2-f10":"rgba(142,0,194,0.1)","--graph-color-3-f10":"rgba(197,23,182,0.1)","--graph-color-4-f10":"rgba(217,1,113,0.1)","--graph-color-5-f50":"rgba(205,1,1,0.5)","--graph-color-6-f50":"rgba(242,93,46,0.5)","--graph-color-7-f50":"rgba(242,202,51,0.5)","--graph-color-8-f50":"rgba(123,217,56,0.5)","--graph-color-9-f50":"rgba(46,206,157,0.5)","--graph-color-0-f50":"rgba(21,160,191,0.5)","--graph-color-1-f50":"rgba(6,105,247,0.5)","--graph-color-2-f50":"rgba(142,0,194,0.5)","--graph-color-3-f50":"rgba(197,23,182,0.5)","--graph-color-4-f50":"rgba(217,1,113,0.5)","--axo-orange":"#e75225","--axo-ink":"#141422","--axo-cream":"#f9efc1","--axo-yellow":"#d8c13a","--info-bar-height":"26px","--left-panel-header-height":"60px","--toolbar-height":"48px","--toolbar-border":"1px","--toolbar-item-height":"calc(var(--toolbar-height, 0px) - var(--toolbar-border, 1px))","--expand-detail-panel-transition":"flex-grow 250ms ease-in-out","--conflict-left-color":"rgba(21,160,191,0.25)","--conflict-right-color":"rgba(242,202,51,0.25)","--conflict-output-color":"rgba(197,23,182,0.25)","--graph-color-5-bg50":"#751012","--graph-color-6-bg50":"#873e29","--graph-color-7-bg50":"#87742b","--graph-color-8-bg50":"#4c7c2e","--graph-color-9-bg50":"#257660","--graph-color-0-bg50":"#195f71","--graph-color-1-bg50":"#11448d","--graph-color-2-bg50":"#550f73","--graph-color-3-bg50":"#711b6d","--graph-color-4-bg50":"#7b104a","--graph-color-5-bg45":"#6c1114","--graph-color-6-bg45":"#7c3a28","--graph-color-7-bg45":"#7c6b2a","--graph-color-8-bg45":"#47722c","--graph-color-9-bg45":"#246d5a","--graph-color-0-bg45":"#195969","--graph-color-1-bg45":"#124082","--graph-color-2-bg45":"#4f116b","--graph-color-3-bg45":"#681b65","--graph-color-4-bg45":"#711146","--graph-color-5-bg25":"#48171b","--graph-color-6-bg25":"#522e26","--graph-color-7-bg25":"#524927","--graph-color-8-bg25":"#344d28","--graph-color-9-bg25":"#214a42","--graph-color-0-bg25":"#1a3f4a","--graph-color-1-bg25":"#173158","--graph-color-2-bg25":"#39174b","--graph-color-3-bg25":"#461c48","--graph-color-4-bg25":"#4b1737","--graph-color-5-bg15":"#371a1e","--graph-color-6-bg15":"#3c2725","--graph-color-7-bg15":"#3c3825","--graph-color-8-bg15":"#2a3a26","--graph-color-9-bg15":"#1f3835","--graph-color-0-bg15":"#1b323a","--graph-color-1-bg15":"#192943","--graph-color-2-bg15":"#2d1a3b","--graph-color-3-bg15":"#351d39","--graph-color-4-bg15":"#381a2f","--semi-bold":"500","--bold":"600","--num-columns-supported":"10","--column-0-color":"#15a0bf","--column-1-color":"#0669f7","--column-2-color":"#8e00c2","--column-3-color":"#c517b6","--column-4-color":"#d90171","--column-5-color":"#cd0101","--column-6-color":"#f25d2e","--column-7-color":"#f2ca33","--column-8-color":"#7bd938","--column-9-color":"#2ece9d","--red":"#D9413D","--orange":"#DE9B43","--yellow":"#ECB91C","--green":"#5CB85C","--blue":"#4D88FF","--ltblue":"#5bc0de","--app__bg0":"#1C1E23","--toolbar__bg0":"rgb(42,45,52)","--toolbar__bg1":"rgb(51,55,63)","--toolbar__bg2":"rgb(65,70,80)","--panel__bg0":"rgb(39,42,49)","--panel__bg1":"rgb(50,54,63)","--panel__bg2":"rgb(61,66,77)","--input__bg":"rgba(0,0,0,0.2)","--input-bg-warn-color":"rgba(222,155,67,0.6)","--panel-border":"rgb(19,20,24)","--section-border":"rgba(255,255,255,0.08)","--subtle-border":"rgba(255,255,255,0.04)","--modal-overlay-color":"rgba(0,0,0,.5)","--graph-color-0":"#15a0bf","--graph-color-1":"#0669f7","--graph-color-2":"#8e00c2","--graph-color-3":"#c517b6","--graph-color-4":"#d90171","--graph-color-5":"#cd0101","--graph-color-6":"#f25d2e","--graph-color-7":"#f2ca33","--graph-color-8":"#7bd938","--graph-color-9":"#2ece9d","--text-selected":"#FFFFFF","--text-selected-row":"#FFFFFF","--text-dimmed":"rgba(255,255,255,0.2)","--text-dimmed-selected":"rgba(255,255,255,0.5)","--text-normal":"rgba(255,255,255,0.75)","--text-secondary":"rgba(255,255,255,0.6)","--text-disabled":"rgba(255,255,255,0.4)","--text-accent":"#93A9EC","--text-inverse":"#222222","--text-bright":"#FFFFFF","--btn-text":"rgba(255,255,255,0.75)","--btn-text-hover":"#FFFFFF","--default-border":"rgba(255,255,255,0.75)","--default-bg":"transparent","--default-hover":"transparent","--default-border-hover":"#FFFFFF","--primary-border":"#4D88FF","--primary-bg":"rgba(77,136,255,0.2)","--primary-hover":"rgba(77,136,255,0.6)","--success-border":"#5CB85C","--success-bg":"rgba(92,184,92,0.2)","--success-hover":"rgba(92,184,92,0.6)","--warning-border":"#DE9B43","--warning-bg":"rgba(222,155,67,0.2)","--warning-hover":"rgba(222,155,67,0.6)","--danger-border":"#D9413D","--danger-bg":"rgba(217,65,61,0.2)","--danger-hover":"rgba(217,65,61,0.6)","--hover-row":"rgba(77,136,255,0.1)","--hover-row-border":"none","--danger-row":"rgba(217,65,61,0.6)","--selected-row":"rgba(77,136,255,0.2)","--selected-row-border":"none","--warning-row":"rgba(222,155,67,0.6)","--droppable":"rgba(236,185,28,0.3)","--drop-target":"rgba(92,184,92,0.5)","--input--disabled":"rgba(0,0,0,0.1)","--link-color":"#40c5ec","--link-color-bright":"#40c5ec","--form-control-focus":"#4D88FF","--scroll-thumb-border":"#1C1E23","--scroll-thumb-bg":"rgb(65,70,80)","--scroll-thumb-bg-light":"rgb(111,119,136)","--wip-status":"rgba(77,136,255,0.4)","--card__bg":"rgb(61,66,77)","--card-shadow":"rgba(0,0,0,.2)","--statusbar__warning-bg":"#87742b","--label__yellow-color":"#f2ca33","--label__light-blue-color":"#15a0bf","--label__purple-color":"#c517b6","--filtering":"rgba(77,136,255,0.5)","--soloing":"rgba(222,155,67,0.5)","--checked-out":"rgba(92,184,92,0.3)","--soloed":"rgba(222,155,67,0.3)","--filter-match":"rgba(77,136,255,0.5)","--clone__progress":"rgba(77,136,255,0.7)","--toolbar__prompt":"rgba(77,136,255,0.2)","--verified":"rgba(92,184,92,0.3)","--unverified":"rgba(255,255,255,0.1)","--drop-sort-border":"#5CB85C","--terminal__repo-name-color":"turquoise","--terminal__repo-branch-color":"violet","--terminal__repo-tag-color":"lightcoral","--terminal__repo-upstream-color":"yellowgreen","--terminal__background":"#000000","--terminal__cursor":"#FFFFFF","--terminal__cursorAccent":"#000000","--terminal__foreground":"#FFFFFF","--terminal__selection":"#304676","--terminal__black":"#000000","--terminal__red":"#F24A4A","--terminal__green":"#0DBC79","--terminal__yellow":"#E5E510","--terminal__blue":"#4A98EE","--terminal__magenta":"#E063E0","--terminal__cyan":"#11A8CD","--terminal__white":"#E5E5E5","--terminal__brightBlack":"#686868","--terminal__brightRed":"#FF5656","--terminal__brightGreen":"#23D18B","--terminal__brightYellow":"#F5F543","--terminal__brightBlue":"#51A4FF","--terminal__brightMagenta":"#D670D6","--terminal__brightCyan":"#29B8DB","--terminal__brightWhite":"#E5E5E5","--code-bg":"#1C1E23","--code-foreground":"rgba(255,255,255,0.75)","--code-blame-color-0":"#15a0bf","--code-blame-color-1":"#0669f7","--code-blame-color-2":"#8e00c2","--code-blame-color-3":"#c517b6","--code-blame-color-4":"#d90171","--code-blame-color-5":"#cd0101","--code-blame-color-6":"#f25d2e","--code-blame-color-7":"#f2ca33","--code-blame-color-8":"#7bd938","--code-blame-color-9":"#2ece9d","--added-line":"rgba(92,184,92,0.2)","--deleted-line":"rgba(217,65,61,0.2)","--modified-line":"rgba(0,0,0,0.25)","--conflict-info-color":"#15a0bf","--conflict-left-border-color":"#15a0bf","--conflict-right-border-color":"#f2ca33","--conflict-output-border-color":"#c517b6","--scroll-marker-head-color":"#16c216","--scroll-marker-highlights-color":"#e6e62b","--scroll-marker-local-branches-color":"#ffa500","--scroll-marker-pull-requests-color":"#ff8f18","--scroll-marker-remote-branches-color":"#ffd68b","--scroll-marker-selection-color":"#0821ff","--scroll-marker-stashes-color":"#fb94ff","--scroll-marker-tags-color":"#affcff","--scroll-marker-upstream-color":"#9bff9b","--stats-added-color":"#347d39","--stats-deleted-color":"#c93c37","--stats-files-color":"#e2c08d","--stats-bar-border-radius":"3px","--stats-bar-height":"40%"}},435(e,t,o){o.d(t,{$6:()=>i,JQ:()=>s,yr:()=>n});var r=o(555);function i(e){return`--column-${e}-color`}function n(e={}){let t={},o=Object.entries(e),i=[];for(let[e,r]of o)r?.includes("var(")?i.push([e,r]):t[e]=r;if(i.length>0){let e=document.querySelector(".gk-graph")||document.documentElement,r=document.createElement("div");for(let[e,t]of(r.style.display="none",o))e.startsWith("--")&&r.style.setProperty(e,t);e.appendChild(r);try{let e=getComputedStyle(r);for(let[o,n]of i){r.style.setProperty("--temp-resolve",n);let i=e.getPropertyValue("--temp-resolve").trim();t[o]=i||n}}finally{e.removeChild(r)}}return function(e={}){return{...r.Y,...e}}(t)}function s(e){let t=e||r.Y,o="";for(let e of(o+=`.gk-graph {
|
|
14
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(),i=t[0],n=(t[1],t[2]);return o(n,r._leftMap[n],i)})}},{key:"setPosition",value:function(e,t,o,r){this._intervalTree.insert([o,o+r,e]),this._leftMap[e]=t;var i=this._columnSizeMap,n=i[t];void 0===n?i[t]=o+r:i[t]=Math.max(n,o+r)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var o in e){var r=e[o];t=0===t?r:Math.min(t,r)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var o in e)t=Math.max(t,e[o]);return t}}]),e}();function tk(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}var tW=(I=b=function(e){function t(){ex(this,t);for(var e,o,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return eP(ek(o=eW(this,(e=ez(t)).call.apply(e,[this].concat(i)))),"state",{isScrolling:!1,scrollTop:0}),eP(ek(o),"_debounceResetIsScrollingId",void 0),eP(ek(o),"_invalidateOnUpdateStartIndex",null),eP(ek(o),"_invalidateOnUpdateStopIndex",null),eP(ek(o),"_positionCache",new tG),eP(ek(o),"_startIndex",null),eP(ek(o),"_startIndexMemoized",null),eP(ek(o),"_stopIndex",null),eP(ek(o),"_stopIndexMemoized",null),eP(ek(o),"_debounceResetIsScrollingCallback",function(){o.setState({isScrolling:!1})}),eP(ek(o),"_setScrollingContainerRef",function(e){o._scrollingContainer=e}),eP(ek(o),"_onScroll",function(e){var t=o.props.height,r=e.currentTarget.scrollTop,i=Math.min(Math.max(0,o._getEstimatedTotalHeight()-t),r);r===i&&(o._debounceResetIsScrolling(),o.state.scrollTop!==i&&o.setState({isScrolling:!0,scrollTop:i}))}),o}return eF(t,e),eG(t,[{key:"clearCellPositions",value:function(){this._positionCache=new tG,this.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.rowIndex;null===this._invalidateOnUpdateStartIndex?(this._invalidateOnUpdateStartIndex=t,this._invalidateOnUpdateStopIndex=t):(this._invalidateOnUpdateStartIndex=Math.min(this._invalidateOnUpdateStartIndex,t),this._invalidateOnUpdateStopIndex=Math.max(this._invalidateOnUpdateStopIndex,t))}},{key:"recomputeCellPositions",value:function(){var e=this._positionCache.count-1;this._positionCache=new tG,this._populatePositionCache(0,e),this.forceUpdate()}},{key:"componentDidMount",value:function(){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback()}},{key:"componentDidUpdate",value:function(e,t){this._checkInvalidateOnUpdate(),this._invokeOnScrollCallback(),this._invokeOnCellsRenderedCallback(),this.props.scrollTop!==e.scrollTop&&this._debounceResetIsScrolling()}},{key:"componentWillUnmount",value:function(){this._debounceResetIsScrollingId&&e6(this._debounceResetIsScrollingId)}},{key:"render",value:function(){var e,t=this,o=this.props,r=o.autoHeight,i=o.cellCount,n=o.cellMeasurerCache,s=o.cellRenderer,a=o.className,l=o.height,h=o.id,c=o.keyMapper,d=o.overscanByPixels,u=o.role,p=o.style,f=o.tabIndex,m=o.width,g=o.rowDirection,_=this.state,v=_.isScrolling,S=_.scrollTop,R=[],y=this._getEstimatedTotalHeight(),T=this._positionCache.shortestColumnSize,C=this._positionCache.count,w=0;if(this._positionCache.range(Math.max(0,S-d),l+2*d,function(o,r,i){var a;void 0===e?(w=o,e=o):(w=Math.min(w,o),e=Math.max(e,o)),R.push(s({index:o,isScrolling:v,key:c(o),parent:t,style:(eP(a={height:n.getHeight(o)},"ltr"===g?"left":"right",r),eP(a,"position","absolute"),eP(a,"top",i),eP(a,"width",n.getWidth(o)),a)}))}),T<S+l+d&&C<i)for(var E=Math.min(i-C,Math.ceil((S+l+d-T)/n.defaultHeight*m/n.defaultWidth)),b=C;b<C+E;b++)e=b,R.push(s({index:b,isScrolling:v,key:c(b),parent:this,style:{width:n.getWidth(b)}}));return this._startIndex=w,this._stopIndex=e,A.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:e$("ReactVirtualized__Masonry",a),id:h,onScroll:this._onScroll,role:u,style:function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?tk(o,!0).forEach(function(t){eP(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):tk(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({boxSizing:"border-box",direction:"ltr",height:r?"auto":l,overflowX:"hidden",overflowY:y<l?"hidden":"auto",position:"relative",width:m,WebkitOverflowScrolling:"touch",willChange:"transform"},p),tabIndex:f},A.createElement("div",{className:"ReactVirtualized__Masonry__innerScrollContainer",style:{width:"100%",height:y,maxWidth:"100%",maxHeight:y,overflow:"hidden",pointerEvents:v?"none":"",position:"relative"}},R))}},{key:"_checkInvalidateOnUpdate",value:function(){if("number"==typeof this._invalidateOnUpdateStartIndex){var e=this._invalidateOnUpdateStartIndex,t=this._invalidateOnUpdateStopIndex;this._invalidateOnUpdateStartIndex=null,this._invalidateOnUpdateStopIndex=null,this._populatePositionCache(e,t),this.forceUpdate()}}},{key:"_debounceResetIsScrolling",value:function(){var e=this.props.scrollingResetTimeInterval;this._debounceResetIsScrollingId&&e6(this._debounceResetIsScrollingId),this._debounceResetIsScrollingId=e4(this._debounceResetIsScrollingCallback,e)}},{key:"_getEstimatedTotalHeight",value:function(){var e=this.props,t=e.cellCount,o=e.cellMeasurerCache,r=Math.max(1,Math.floor(e.width/o.defaultWidth));return this._positionCache.estimateTotalHeight(t,r,o.defaultHeight)}},{key:"_invokeOnScrollCallback",value:function(){var e=this.props,t=e.height,o=e.onScroll,r=this.state.scrollTop;this._onScrollMemoized!==r&&(o({clientHeight:t,scrollHeight:this._getEstimatedTotalHeight(),scrollTop:r}),this._onScrollMemoized=r)}},{key:"_invokeOnCellsRenderedCallback",value:function(){(this._startIndexMemoized!==this._startIndex||this._stopIndexMemoized!==this._stopIndex)&&((0,this.props.onCellsRendered)({startIndex:this._startIndex,stopIndex:this._stopIndex}),this._startIndexMemoized=this._startIndex,this._stopIndexMemoized=this._stopIndex)}},{key:"_populatePositionCache",value:function(e,t){for(var o=this.props,r=o.cellMeasurerCache,i=o.cellPositioner,n=e;n<=t;n++){var s=i(n),a=s.left,l=s.top;this._positionCache.setPosition(n,a,l,r.getHeight(n))}}}],[{key:"getDerivedStateFromProps",value:function(e,t){return void 0!==e.scrollTop&&t.scrollTop!==e.scrollTop?{isScrolling:!0,scrollTop:e.scrollTop}:null}}]),t}(A.PureComponent),eP(b,"propTypes",null),I);function tz(){}eP(tW,"defaultProps",{autoHeight:!1,keyMapper:function(e){return e},onCellsRendered:tz,onScroll:tz,overscanByPixels:20,role:"grid",scrollingResetTimeInterval:150,style:{},tabIndex:0,rowDirection:"ltr"}),ej(tW);var tL=function(){function e(){var t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ex(this,e),eP(this,"_cellMeasurerCache",void 0),eP(this,"_columnIndexOffset",void 0),eP(this,"_rowIndexOffset",void 0),eP(this,"columnWidth",function(e){var o=e.index;t._cellMeasurerCache.columnWidth({index:o+t._columnIndexOffset})}),eP(this,"rowHeight",function(e){var o=e.index;t._cellMeasurerCache.rowHeight({index:o+t._rowIndexOffset})});var r=o.cellMeasurerCache,i=o.columnIndexOffset,n=o.rowIndexOffset;this._cellMeasurerCache=r,this._columnIndexOffset=void 0===i?0:i,this._rowIndexOffset=void 0===n?0:n}return eG(e,[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,o,r){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,o,r)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function tF(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function tP(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?tF(o,!0).forEach(function(t){eP(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):tF(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}var tB=function(e){function t(e,o){ex(this,t),eP(ek(r=eW(this,ez(t).call(this,e,o))),"state",{scrollLeft:0,scrollTop:0,scrollbarSize:0,showHorizontalScrollbar:!1,showVerticalScrollbar:!1}),eP(ek(r),"_deferredInvalidateColumnIndex",null),eP(ek(r),"_deferredInvalidateRowIndex",null),eP(ek(r),"_bottomLeftGridRef",function(e){r._bottomLeftGrid=e}),eP(ek(r),"_bottomRightGridRef",function(e){r._bottomRightGrid=e}),eP(ek(r),"_cellRendererBottomLeftGrid",function(e){var t=e.rowIndex,o=eq(e,["rowIndex"]),i=r.props,n=i.cellRenderer,s=i.fixedRowCount;return t===i.rowCount-s?A.createElement("div",{key:o.key,style:tP({},o.style,{height:20})}):n(tP({},o,{parent:ek(r),rowIndex:t+s}))}),eP(ek(r),"_cellRendererBottomRightGrid",function(e){var t=e.columnIndex,o=e.rowIndex,i=eq(e,["columnIndex","rowIndex"]),n=r.props,s=n.cellRenderer,a=n.fixedColumnCount,l=n.fixedRowCount;return s(tP({},i,{columnIndex:t+a,parent:ek(r),rowIndex:o+l}))}),eP(ek(r),"_cellRendererTopRightGrid",function(e){var t=e.columnIndex,o=eq(e,["columnIndex"]),i=r.props,n=i.cellRenderer,s=i.columnCount,a=i.fixedColumnCount;return t===s-a?A.createElement("div",{key:o.key,style:tP({},o.style,{width:20})}):n(tP({},o,{columnIndex:t+a,parent:ek(r)}))}),eP(ek(r),"_columnWidthRightGrid",function(e){var t=e.index,o=r.props,i=o.columnCount,n=o.fixedColumnCount,s=o.columnWidth,a=r.state,l=a.scrollbarSize;return a.showHorizontalScrollbar&&t===i-n?l:"function"==typeof s?s({index:t+n}):s}),eP(ek(r),"_onScroll",function(e){var t=e.scrollLeft,o=e.scrollTop;r.setState({scrollLeft:t,scrollTop:o});var i=r.props.onScroll;i&&i(e)}),eP(ek(r),"_onScrollbarPresenceChange",function(e){var t=e.horizontal,o=e.size,i=e.vertical,n=r.state,s=n.showHorizontalScrollbar,a=n.showVerticalScrollbar;if(t!==s||i!==a){r.setState({scrollbarSize:o,showHorizontalScrollbar:t,showVerticalScrollbar:i});var l=r.props.onScrollbarPresenceChange;"function"==typeof l&&l({horizontal:t,size:o,vertical:i})}}),eP(ek(r),"_onScrollLeft",function(e){var t=e.scrollLeft;r._onScroll({scrollLeft:t,scrollTop:r.state.scrollTop})}),eP(ek(r),"_onScrollTop",function(e){var t=e.scrollTop;r._onScroll({scrollTop:t,scrollLeft:r.state.scrollLeft})}),eP(ek(r),"_rowHeightBottomGrid",function(e){var t=e.index,o=r.props,i=o.fixedRowCount,n=o.rowCount,s=o.rowHeight,a=r.state,l=a.scrollbarSize;return a.showVerticalScrollbar&&t===n-i?l:"function"==typeof s?s({index:t+i}):s}),eP(ek(r),"_topLeftGridRef",function(e){r._topLeftGrid=e}),eP(ek(r),"_topRightGridRef",function(e){r._topRightGrid=e});var r,i=e.deferredMeasurementCache,n=e.fixedColumnCount,s=e.fixedRowCount;return r._maybeCalculateCachedStyles(!0),i&&(r._deferredMeasurementCacheBottomLeftGrid=s>0?new tL({cellMeasurerCache:i,columnIndexOffset:0,rowIndexOffset:s}):i,r._deferredMeasurementCacheBottomRightGrid=n>0||s>0?new tL({cellMeasurerCache:i,columnIndexOffset:n,rowIndexOffset:s}):i,r._deferredMeasurementCacheTopRightGrid=n>0?new tL({cellMeasurerCache:i,columnIndexOffset:n,rowIndexOffset:0}):i),r}return eF(t,e),eG(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r;this._deferredInvalidateColumnIndex="number"==typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,o):o,this._deferredInvalidateRowIndex="number"==typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,i):i}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=void 0===t?0:t,r=e.rowIndex,i=void 0===r?0:r,n=this.props,s=n.fixedColumnCount,a=n.fixedRowCount,l=Math.max(0,o-s),h=Math.max(0,i-a);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:h}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:l,rowIndex:h}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:o,rowIndex:i}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:l,rowIndex:i}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,o=e.scrollTop;if(t>0||o>0){var r={};t>0&&(r.scrollLeft=t),o>0&&(r.scrollTop=o),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,o=e.onSectionRendered,r=(e.onScrollbarPresenceChange,e.scrollLeft,e.scrollToColumn),i=(e.scrollTop,e.scrollToRow),n=eq(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var s=this.state,a=s.scrollLeft,l=s.scrollTop;return A.createElement("div",{style:this._containerOuterStyle},A.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(n),this._renderTopRightGrid(tP({},n,{onScroll:t,scrollLeft:a}))),A.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(tP({},n,{onScroll:t,scrollTop:l})),this._renderBottomRightGrid(tP({},n,{onScroll:t,onSectionRendered:o,scrollLeft:a,scrollToColumn:r,scrollToRow:i,scrollTop:l}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,o=e.columnWidth;if(null==this._leftGridWidth)if("function"==typeof o){for(var r=0,i=0;i<t;i++)r+=o({index:i});this._leftGridWidth=r}else this._leftGridWidth=o*t;return this._leftGridWidth}},{key:"_getRightGridWidth",value:function(e){return e.width-this._getLeftGridWidth(e)}},{key:"_getTopGridHeight",value:function(e){var t=e.fixedRowCount,o=e.rowHeight;if(null==this._topGridHeight)if("function"==typeof o){for(var r=0,i=0;i<t;i++)r+=o({index:i});this._topGridHeight=r}else this._topGridHeight=o*t;return this._topGridHeight}},{key:"_handleInvalidatedGridSize",value:function(){if("number"==typeof this._deferredInvalidateColumnIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t}),this.forceUpdate()}}},{key:"_maybeCalculateCachedStyles",value:function(e){var t=this.props,o=t.columnWidth,r=t.enableFixedColumnScroll,i=t.enableFixedRowScroll,n=t.height,s=t.fixedColumnCount,a=t.fixedRowCount,l=t.rowHeight,h=t.style,c=t.styleBottomLeftGrid,d=t.styleBottomRightGrid,u=t.styleTopLeftGrid,p=t.styleTopRightGrid,f=t.width,m=e||n!==this._lastRenderedHeight||f!==this._lastRenderedWidth,g=e||o!==this._lastRenderedColumnWidth||s!==this._lastRenderedFixedColumnCount,_=e||a!==this._lastRenderedFixedRowCount||l!==this._lastRenderedRowHeight;(e||m||h!==this._lastRenderedStyle)&&(this._containerOuterStyle=tP({height:n,overflow:"visible",width:f},h)),(e||m||_)&&(this._containerTopStyle={height:this._getTopGridHeight(this.props),position:"relative",width:f},this._containerBottomStyle={height:n-this._getTopGridHeight(this.props),overflow:"visible",position:"relative",width:f}),(e||c!==this._lastRenderedStyleBottomLeftGrid)&&(this._bottomLeftGridStyle=tP({left:0,overflowX:"hidden",overflowY:r?"auto":"hidden",position:"absolute"},c)),(e||g||d!==this._lastRenderedStyleBottomRightGrid)&&(this._bottomRightGridStyle=tP({left:this._getLeftGridWidth(this.props),position:"absolute"},d)),(e||u!==this._lastRenderedStyleTopLeftGrid)&&(this._topLeftGridStyle=tP({left:0,overflowX:"hidden",overflowY:"hidden",position:"absolute",top:0},u)),(e||g||p!==this._lastRenderedStyleTopRightGrid)&&(this._topRightGridStyle=tP({left:this._getLeftGridWidth(this.props),overflowX:i?"auto":"hidden",overflowY:"hidden",position:"absolute",top:0},p)),this._lastRenderedColumnWidth=o,this._lastRenderedFixedColumnCount=s,this._lastRenderedFixedRowCount=a,this._lastRenderedHeight=n,this._lastRenderedRowHeight=l,this._lastRenderedStyle=h,this._lastRenderedStyleBottomLeftGrid=c,this._lastRenderedStyleBottomRightGrid=d,this._lastRenderedStyleTopLeftGrid=u,this._lastRenderedStyleTopRightGrid=p,this._lastRenderedWidth=f}},{key:"_prepareForRender",value:function(){(this._lastRenderedColumnWidth!==this.props.columnWidth||this._lastRenderedFixedColumnCount!==this.props.fixedColumnCount)&&(this._leftGridWidth=null),(this._lastRenderedFixedRowCount!==this.props.fixedRowCount||this._lastRenderedRowHeight!==this.props.rowHeight)&&(this._topGridHeight=null),this._maybeCalculateCachedStyles(),this._lastRenderedColumnWidth=this.props.columnWidth,this._lastRenderedFixedColumnCount=this.props.fixedColumnCount,this._lastRenderedFixedRowCount=this.props.fixedRowCount,this._lastRenderedRowHeight=this.props.rowHeight}},{key:"_renderBottomLeftGrid",value:function(e){var t=e.enableFixedColumnScroll,o=e.fixedColumnCount,r=e.fixedRowCount,i=e.rowCount,n=e.hideBottomLeftGridScrollbar,s=this.state.showVerticalScrollbar;if(!o)return null;var a=this._getBottomGridHeight(e),l=this._getLeftGridWidth(e),h=this.state.showVerticalScrollbar?this.state.scrollbarSize:0,c=A.createElement(te,eV({},e,{cellRenderer:this._cellRendererBottomLeftGrid,className:this.props.classNameBottomLeftGrid,columnCount:o,deferredMeasurementCache:this._deferredMeasurementCacheBottomLeftGrid,height:a,onScroll:t?this._onScrollTop:void 0,ref:this._bottomLeftGridRef,rowCount:Math.max(0,i-r)+ +!!s,rowHeight:this._rowHeightBottomGrid,style:this._bottomLeftGridStyle,tabIndex:null,width:n?l+h:l}));return n?A.createElement("div",{className:"BottomLeftGrid_ScrollWrapper",style:tP({},this._bottomLeftGridStyle,{height:a,width:l,overflowY:"hidden"})},c):c}},{key:"_renderBottomRightGrid",value:function(e){var t=e.columnCount,o=e.fixedColumnCount,r=e.fixedRowCount,i=e.rowCount,n=e.scrollToColumn,s=e.scrollToRow;return A.createElement(te,eV({},e,{cellRenderer:this._cellRendererBottomRightGrid,className:this.props.classNameBottomRightGrid,columnCount:Math.max(0,t-o),columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheBottomRightGrid,height:this._getBottomGridHeight(e),onScroll:this._onScroll,onScrollbarPresenceChange:this._onScrollbarPresenceChange,ref:this._bottomRightGridRef,rowCount:Math.max(0,i-r),rowHeight:this._rowHeightBottomGrid,scrollToColumn:n-o,scrollToRow:s-r,style:this._bottomRightGridStyle,width:this._getRightGridWidth(e)}))}},{key:"_renderTopLeftGrid",value:function(e){var t=e.fixedColumnCount,o=e.fixedRowCount;return t&&o?A.createElement(te,eV({},e,{className:this.props.classNameTopLeftGrid,columnCount:t,height:this._getTopGridHeight(e),ref:this._topLeftGridRef,rowCount:o,style:this._topLeftGridStyle,tabIndex:null,width:this._getLeftGridWidth(e)})):null}},{key:"_renderTopRightGrid",value:function(e){var t=e.columnCount,o=e.enableFixedRowScroll,r=e.fixedColumnCount,i=e.fixedRowCount,n=e.scrollLeft,s=e.hideTopRightGridScrollbar,a=this.state,l=a.showHorizontalScrollbar,h=a.scrollbarSize;if(!i)return null;var c=this._getTopGridHeight(e),d=this._getRightGridWidth(e),u=c,p=this._topRightGridStyle;s&&(u=c+(l?h:0),p=tP({},this._topRightGridStyle,{left:0}));var f=A.createElement(te,eV({},e,{cellRenderer:this._cellRendererTopRightGrid,className:this.props.classNameTopRightGrid,columnCount:Math.max(0,t-r)+ +!!l,columnWidth:this._columnWidthRightGrid,deferredMeasurementCache:this._deferredMeasurementCacheTopRightGrid,height:u,onScroll:o?this._onScrollLeft:void 0,ref:this._topRightGridRef,rowCount:i,scrollLeft:n,style:p,tabIndex:null,width:d}));return s?A.createElement("div",{className:"TopRightGrid_ScrollWrapper",style:tP({},this._topRightGridStyle,{height:c,width:d,overflowX:"hidden"})},f):f}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft&&e.scrollLeft>=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),t}(A.PureComponent);function tZ(e){var t=e.className,o=e.columns,r=e.style;return A.createElement("div",{className:t,role:"row",style:r},o)}eP(tB,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),tB.propTypes={},ej(tB),function(e){function t(e,o){var r;return ex(this,t),(r=eW(this,ez(t).call(this,e,o))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},r._onScroll=r._onScroll.bind(ek(r)),r}return eF(t,e),eG(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.clientHeight,r=t.clientWidth,i=t.scrollHeight,n=t.scrollLeft,s=t.scrollTop,a=t.scrollWidth;return e({clientHeight:o,clientWidth:r,onScroll:this._onScroll,scrollHeight:i,scrollLeft:n,scrollTop:s,scrollWidth:a})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.clientWidth,r=e.scrollHeight,i=e.scrollLeft,n=e.scrollTop,s=e.scrollWidth;this.setState({clientHeight:t,clientWidth:o,scrollHeight:r,scrollLeft:i,scrollTop:n,scrollWidth:s})}}]),t}(A.PureComponent).propTypes={},tZ.propTypes=null;let tU="DESC";function tj(e){var t=e.sortDirection,o=e$("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":"ASC"===t,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===tU});return A.createElement("svg",{className:o,width:18,height:18,viewBox:"0 0 24 24"},"ASC"===t?A.createElement("path",{d:"M7 14l5-5 5 5z"}):A.createElement("path",{d:"M7 10l5 5 5-5z"}),A.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function tV(e){var t=e.dataKey,o=e.label,r=e.sortBy,i=e.sortDirection,n=[A.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"==typeof o?o:null},o)];return r===t&&n.push(A.createElement(tj,{key:"SortIndicator",sortDirection:i})),n}function t$(e){var t=e.className,o=e.columns,r=e.index,i=e.key,n=e.onRowClick,s=e.onRowDoubleClick,a=e.onRowMouseOut,l=e.onRowMouseOver,h=e.onRowRightClick,c=e.rowData,d=e.style,u={"aria-rowindex":r+1};return(n||s||a||l||h)&&(u["aria-label"]="row",u.tabIndex=0,n&&(u.onClick=function(e){return n({event:e,index:r,rowData:c})}),s&&(u.onDoubleClick=function(e){return s({event:e,index:r,rowData:c})}),a&&(u.onMouseOut=function(e){return a({event:e,index:r,rowData:c})}),l&&(u.onMouseOver=function(e){return l({event:e,index:r,rowData:c})}),h&&(u.onContextMenu=function(e){return h({event:e,index:r,rowData:c})})),A.createElement("div",eV({},u,{className:t,key:i,role:"row",style:d}),o)}tj.propTypes={},tV.propTypes=null,t$.propTypes=null;var tY=function(e){function t(){return ex(this,t),eW(this,ez(t).apply(this,arguments))}return eF(t,e),t}(A.Component);function tK(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function tq(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?tK(o,!0).forEach(function(t){eP(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):tK(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}eP(tY,"defaultProps",{cellDataGetter:function(e){var t=e.dataKey,o=e.rowData;return"function"==typeof o.get?o.get(t):o[t]},cellRenderer:function(e){var t=e.cellData;return null==t?"":String(t)},defaultSortDirection:"ASC",flexGrow:0,flexShrink:1,headerRenderer:tV,style:{}}),tY.propTypes={};var tX=function(e){function o(e){var t;return ex(this,o),(t=eW(this,ez(o).call(this,e))).state={scrollbarWidth:0},t._createColumn=t._createColumn.bind(ek(t)),t._createRow=t._createRow.bind(ek(t)),t._onScroll=t._onScroll.bind(ek(t)),t._onSectionRendered=t._onSectionRendered.bind(ek(t)),t._setRef=t._setRef.bind(ek(t)),t}return eF(o,e),eG(o,[{key:"forceUpdateGrid",value:function(){this.Grid&&this.Grid.forceUpdate()}},{key:"getOffsetForRow",value:function(e){var t=e.alignment,o=e.index;return this.Grid?this.Grid.getOffsetForCell({alignment:t,rowIndex:o}).scrollTop:0}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.invalidateCellSizeAfterRender({rowIndex:o,columnIndex:t})}},{key:"measureAllRows",value:function(){this.Grid&&this.Grid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,o=e.rowIndex;this.Grid&&this.Grid.recomputeGridSize({rowIndex:void 0===o?0:o,columnIndex:void 0===t?0:t})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=t(this.Grid),o=e.clientWidth||0;return(e.offsetWidth||0)-o}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,o=t.children,r=t.className,i=t.disableHeader,n=t.gridClassName,s=t.gridStyle,a=t.headerHeight,l=t.headerRowRenderer,h=t.height,c=t.id,d=t.noRowsRenderer,u=t.rowClassName,p=t.rowStyle,f=t.scrollToIndex,m=t.style,g=t.width,_=this.state.scrollbarWidth,v="function"==typeof u?u({index:-1}):u,S="function"==typeof p?p({index:-1}):p;return this._cachedColumnStyles=[],A.Children.toArray(o).forEach(function(t,o){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[o]=tq({overflow:"hidden"},r)}),A.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":A.Children.toArray(o).length,"aria-rowcount":this.props.rowCount,className:e$("ReactVirtualized__Table",r),id:c,role:"grid",style:m},!i&&l({className:e$("ReactVirtualized__Table__headerRow",v),columns:this._getHeaderColumns(),style:tq({height:a,overflow:"hidden",paddingRight:_,width:g},S)}),A.createElement(te,eV({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:e$("ReactVirtualized__Table__Grid",n),cellRenderer:this._createRow,columnWidth:g,columnCount:1,height:i?h:h-a,id:void 0,noContentRenderer:d,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:_,scrollToRow:f,style:tq({},s,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,o=e.columnIndex,r=e.isScrolling,i=e.parent,n=e.rowData,s=e.rowIndex,a=this.props.onColumnClick,l=t.props,h=l.cellDataGetter,c=l.cellRenderer,d=l.className,u=l.columnData,p=l.dataKey,f=l.id,m=c({cellData:h({columnData:u,dataKey:p,rowData:n}),columnData:u,columnIndex:o,dataKey:p,isScrolling:r,parent:i,rowData:n,rowIndex:s}),g=this._cachedColumnStyles[o],_="string"==typeof m?m:null;return A.createElement("div",{"aria-colindex":o+1,"aria-describedby":f,className:e$("ReactVirtualized__Table__rowColumn",d),key:"Row"+s+"-Col"+o,onClick:function(e){a&&a({columnData:u,dataKey:p,event:e})},role:"gridcell",style:g,title:_},m)}},{key:"_createHeader",value:function(e){var t,o,r,i,n,s=e.column,a=e.index,l=this.props,h=l.headerClassName,c=l.headerStyle,d=l.onHeaderClick,u=l.sort,p=l.sortBy,f=l.sortDirection,m=s.props,g=m.columnData,_=m.dataKey,v=m.defaultSortDirection,S=m.disableSort,R=m.headerRenderer,y=m.id,T=m.label,C=!S&&u,w=e$("ReactVirtualized__Table__headerColumn",h,s.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:C}),E=this._getFlexStyleForColumn(s,tq({},c,{},s.props.headerStyle)),b=R({columnData:g,dataKey:_,disableSort:S,label:T,sortBy:p,sortDirection:f});if(C||d){var I=p!==_?v:f===tU?"ASC":tU,M=function(e){C&&u({defaultSortDirection:v,event:e,sortBy:_,sortDirection:I}),d&&d({columnData:g,dataKey:_,event:e})};n=s.props["aria-label"]||T||_,i="none",r=0,t=M,o=function(e){("Enter"===e.key||" "===e.key)&&M(e)}}return p===_&&(i="ASC"===f?"ascending":"descending"),A.createElement("div",{"aria-label":n,"aria-sort":i,className:w,id:y,key:"Header-Col"+a,onClick:t,onKeyDown:o,role:"columnheader",style:E,tabIndex:r},b)}},{key:"_createRow",value:function(e){var t=this,o=e.rowIndex,r=e.isScrolling,i=e.key,n=e.parent,s=e.style,a=this.props,l=a.children,h=a.onRowClick,c=a.onRowDoubleClick,d=a.onRowRightClick,u=a.onRowMouseOver,p=a.onRowMouseOut,f=a.rowClassName,m=a.rowGetter,g=a.rowRenderer,_=a.rowStyle,v=this.state.scrollbarWidth,S="function"==typeof f?f({index:o}):f,R="function"==typeof _?_({index:o}):_,y=m({index:o}),T=A.Children.toArray(l).map(function(e,i){return t._createColumn({column:e,columnIndex:i,isScrolling:r,parent:n,rowData:y,rowIndex:o,scrollbarWidth:v})}),C=e$("ReactVirtualized__Table__row",S),w=tq({},s,{height:this._getRowHeight(o),overflow:"hidden",paddingRight:v},R);return g({className:C,columns:T,index:o,isScrolling:r,key:i,onRowClick:h,onRowDoubleClick:c,onRowRightClick:d,onRowMouseOver:u,onRowMouseOut:p,rowData:y,style:w})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=tq({},t,{flex:o,msFlex:o,WebkitFlex:o});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,o=t.children;return(t.disableHeader?[]:A.Children.toArray(o)).map(function(t,o){return e._createHeader({column:t,index:o})})}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"==typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,o=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:o,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,o=e.rowOverscanStopIndex,r=e.rowStartIndex,i=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:o,startIndex:r,stopIndex:i})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),o}(A.PureComponent);eP(tX,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:tt,overscanRowCount:10,rowRenderer:t$,headerRowRenderer:tZ,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),tX.propTypes={};var tQ=[],tJ=null,t0=null;function t1(){t0&&(t0=null,document.body&&null!=tJ&&(document.body.style.pointerEvents=tJ),tJ=null)}function t2(){t1(),tQ.forEach(function(e){return e.__resetIsScrolling()})}function t5(e){var t;e.currentTarget===window&&null==tJ&&document.body&&(tJ=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),t0&&e6(t0),t=0,tQ.forEach(function(e){t=Math.max(t,e.props.scrollingResetTimeInterval)}),t0=e4(t2,t),tQ.forEach(function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()})}function t3(e,t){tQ.some(function(e){return e.props.scrollElement===t})||t.addEventListener("scroll",t5),tQ.push(e)}function t6(e,t){!(tQ=tQ.filter(function(t){return t!==e})).length&&(t.removeEventListener("scroll",t5),t0&&(e6(t0),t1()))}var t4=function(e){return e===window},t9=function(e){return e.getBoundingClientRect()};function t7(e,t){if(!e)return{height:t.serverHeight,width:t.serverWidth};if(!t4(e))return t9(e);var o=window,r=o.innerHeight,i=o.innerWidth;return{height:"number"==typeof r?r:0,width:"number"==typeof i?i:0}}function t8(e){return t4(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function oe(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}var ot=function(){return"u">typeof window?window:void 0},oo=(O=M=function(e){function o(){ex(this,o);for(var e,t,r=arguments.length,i=Array(r),n=0;n<r;n++)i[n]=arguments[n];return eP(ek(t=eW(this,(e=ez(o)).call.apply(e,[this].concat(i)))),"_window",ot()),eP(ek(t),"_isMounted",!1),eP(ek(t),"_positionFromTop",0),eP(ek(t),"_positionFromLeft",0),eP(ek(t),"_detectElementResize",void 0),eP(ek(t),"_child",void 0),eP(ek(t),"state",function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?oe(o,!0).forEach(function(t){eP(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):oe(o).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}({},t7(t.props.scrollElement,t.props),{isScrolling:!1,scrollLeft:0,scrollTop:0})),eP(ek(t),"_registerChild",function(e){e&&Element,t._child=e,t.updatePosition()}),eP(ek(t),"_onChildScroll",function(e){var o=e.scrollTop;if(t.state.scrollTop!==o){var r=t.props.scrollElement;r&&("function"==typeof r.scrollTo?r.scrollTo(0,o+t._positionFromTop):r.scrollTop=o+t._positionFromTop)}}),eP(ek(t),"_registerResizeListener",function(e){e===window?window.addEventListener("resize",t._onResize,!1):t._detectElementResize.addResizeListener(e,t._onResize)}),eP(ek(t),"_unregisterResizeListener",function(e){e===window?window.removeEventListener("resize",t._onResize,!1):e&&t._detectElementResize.removeResizeListener(e,t._onResize)}),eP(ek(t),"_onResize",function(){t.updatePosition()}),eP(ek(t),"__handleWindowScrollEvent",function(){if(t._isMounted){var e=t.props.onScroll,o=t.props.scrollElement;if(o){var r=t8(o),i=Math.max(0,r.left-t._positionFromLeft),n=Math.max(0,r.top-t._positionFromTop);t.setState({isScrolling:!0,scrollLeft:i,scrollTop:n}),e({scrollLeft:i,scrollTop:n})}}}),eP(ek(t),"__resetIsScrolling",function(){t.setState({isScrolling:!1})}),t}return eF(o,e),eG(o,[{key:"updatePosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,o=this.props.onResize,r=this.state,i=r.height,n=r.width,s=this._child||t(this);if(s instanceof Element&&e){var a=function(e,t){if(t4(t)&&document.documentElement){var o=document.documentElement,r=t9(e),i=t9(o);return{top:r.top-i.top,left:r.left-i.left}}var n=t8(t),s=t9(e),a=t9(t);return{top:s.top+n.top-a.top,left:s.left+n.left-a.left}}(s,e);this._positionFromTop=a.top,this._positionFromLeft=a.left}var l=t7(e,this.props);(i!==l.height||n!==l.width)&&(this.setState({height:l.height,width:l.width}),o({height:l.height,width:l.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=ti(),this.updatePosition(e),e&&(t3(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var o=this.props.scrollElement,r=e.scrollElement;r!==o&&null!=r&&null!=o&&(this.updatePosition(o),t6(this,r),t3(this,o),this._unregisterResizeListener(r),this._registerResizeListener(o))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(t6(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,o=t.isScrolling,r=t.scrollTop,i=t.scrollLeft,n=t.height,s=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:n,isScrolling:o,scrollLeft:i,scrollTop:r,width:s})}}]),o}(A.PureComponent),eP(M,"propTypes",null),O);eP(oo,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:ot(),serverHeight:0,serverWidth:0});var or=n(615),oi=function(){return(oi=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},on={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},os={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},oa={width:"20px",height:"20px",position:"absolute",zIndex:1},ol={top:oi(oi({},on),{top:"-5px"}),right:oi(oi({},os),{left:void 0,right:"-5px"}),bottom:oi(oi({},on),{top:void 0,bottom:"-5px"}),left:oi(oi({},os),{left:"-5px"}),topRight:oi(oi({},oa),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:oi(oi({},oa),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:oi(oi({},oa),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:oi(oi({},oa),{left:"-10px",top:"-10px",cursor:"nw-resize"})},oh=(0,A.memo)(function(e){var t=e.onResizeStart,o=e.direction,r=e.children,i=e.replaceStyles,n=e.className,s=(0,A.useCallback)(function(e){t(e,o)},[t,o]),a=(0,A.useCallback)(function(e){t(e,o)},[t,o]),l=(0,A.useMemo)(function(){return oi(oi({position:"absolute",userSelect:"none"},ol[o]),null!=i?i:{})},[i,o]);return(0,or.jsx)("div",{className:n||void 0,style:l,onMouseDown:s,onTouchStart:a,children:r})}),oc=(l=function(e,t){return(l=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),od=function(){return(od=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var i in t=arguments[o])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},ou={width:"auto",height:"auto"},op=function(e,t,o){return Math.max(Math.min(e,o),t)},of=function(e,t,o){var r=Math.round(e/t);return r*t+o*(r-1)},om=function(e,t){return RegExp(e,"i").test(t)},og=function(e){return!!(e.touches&&e.touches.length)},o_=function(e,t,o){void 0===o&&(o=0);var r=t.reduce(function(o,r,i){return Math.abs(r-e)<Math.abs(t[o]-e)?i:o},0),i=Math.abs(t[r]-e);return 0===o||i<o?t[r]:e},ov=function(e){return"auto"===(e=e.toString())||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},oS=function(e,t,o,r){if(e&&"string"==typeof e){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var i=Number(e.replace("%",""))/100;return t*i}if(e.endsWith("vw")){var i=Number(e.replace("vw",""))/100;return o*i}if(e.endsWith("vh")){var i=Number(e.replace("vh",""))/100;return r*i}}return e},oR=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],oy="__resizable_base__",oT=function(e){function t(t){var o,r,i,n,s=e.call(this,t)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var e=s.parentNode;if(!e)return null;var t=s.window.document.createElement("div");return t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.transform="scale(0, 0)",t.style.left="0",t.style.flex="0 0 100%",t.classList?t.classList.add(oy):t.className+=oy,e.appendChild(t),t},s.removeBase=function(e){var t=s.parentNode;t&&t.removeChild(e)},s.state={isResizing:!1,width:null!=(r=null==(o=s.propsSize)?void 0:o.width)?r:"auto",height:null!=(n=null==(i=s.propsSize)?void 0:i.height)?n:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return oc(t,e),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||ou},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var e=0,t=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,r=this.resizable.offsetHeight,i=this.resizable.style.position;"relative"!==i&&(this.resizable.style.position="relative"),e="auto"!==this.resizable.style.width?this.resizable.offsetWidth:o,t="auto"!==this.resizable.style.height?this.resizable.offsetHeight:r,this.resizable.style.position=i}return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var e=this,t=this.props.size,o=function(t){var o;if(void 0===e.state[t]||"auto"===e.state[t])return"auto";if(e.propsSize&&e.propsSize[t]&&(null==(o=e.propsSize[t])?void 0:o.toString().endsWith("%"))){if(e.state[t].toString().endsWith("%"))return e.state[t].toString();var r=e.getParentSize(),i=Number(e.state[t].toString().replace("px",""))/r[t]*100;return"".concat(i,"%")}return ov(e.state[t])};return{width:t&&void 0!==t.width&&!this.state.isResizing?ov(t.width):o("width"),height:t&&void 0!==t.height&&!this.state.isResizing?ov(t.height):o("height")}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var e=this.appendBase();if(!e)return{width:0,height:0};var t=!1,o=this.parentNode.style.flexWrap;"wrap"!==o&&(t=!0,this.parentNode.style.flexWrap="wrap"),e.style.position="relative",e.style.minWidth="100%",e.style.minHeight="100%";var r={width:e.offsetWidth,height:e.offsetHeight};return t&&(this.parentNode.style.flexWrap=o),this.removeBase(e),r},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(this.resizable&&this.window){var e=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==e.flexBasis?e.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(e,t){var o=this.propsSize&&this.propsSize[t];return"auto"===this.state[t]&&this.state.original[t]===e&&(void 0===o||"auto"===o)?"auto":e},t.prototype.calculateNewMaxFromBoundary=function(e,t){var o,r,i=this.props.boundsByDirection,n=this.state.direction,s=i&&om("left",n),a=i&&om("top",n);if("parent"===this.props.bounds){var l=this.parentNode;l&&(o=s?this.resizableRight-this.parentLeft:l.offsetWidth+(this.parentLeft-this.resizableLeft),r=a?this.resizableBottom-this.parentTop:l.offsetHeight+(this.parentTop-this.resizableTop))}else"window"===this.props.bounds?this.window&&(o=s?this.resizableRight:this.window.innerWidth-this.resizableLeft,r=a?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(o=s?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),r=a?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return o&&Number.isFinite(o)&&(e=e&&e<o?e:o),r&&Number.isFinite(r)&&(t=t&&t<r?t:r),{maxWidth:e,maxHeight:t}},t.prototype.calculateNewSizeFromDirection=function(e,t){var o,r=this.props.scale||1,i=Array.isArray(o=this.props.resizeRatio||1)?o:[o,o],n=i[0],s=i[1],a=this.state,l=a.direction,h=a.original,c=this.props,d=c.lockAspectRatio,u=c.lockAspectRatioExtraHeight,p=c.lockAspectRatioExtraWidth,f=h.width,m=h.height,g=u||0,_=p||0;return om("right",l)&&(f=h.width+(e-h.x)*n/r,d&&(m=(f-_)/this.ratio+g)),om("left",l)&&(f=h.width-(e-h.x)*n/r,d&&(m=(f-_)/this.ratio+g)),om("bottom",l)&&(m=h.height+(t-h.y)*s/r,d&&(f=(m-g)*this.ratio+_)),om("top",l)&&(m=h.height-(t-h.y)*s/r,d&&(f=(m-g)*this.ratio+_)),{newWidth:f,newHeight:m}},t.prototype.calculateNewSizeFromAspectRatio=function(e,t,o,r){var i=this.props,n=i.lockAspectRatio,s=i.lockAspectRatioExtraHeight,a=i.lockAspectRatioExtraWidth,l=void 0===r.width?10:r.width,h=void 0===o.width||o.width<0?e:o.width,c=void 0===r.height?10:r.height,d=void 0===o.height||o.height<0?t:o.height,u=s||0,p=a||0;if(n){var f=(c-u)*this.ratio+p,m=(d-u)*this.ratio+p,g=(l-p)/this.ratio+u,_=(h-p)/this.ratio+u,v=Math.max(c,g),S=Math.min(d,_);e=op(e,Math.max(l,f),Math.min(h,m)),t=op(t,v,S)}else e=op(e,l,h),t=op(t,c,d);return{newWidth:e,newHeight:t}},t.prototype.setBoundingClientRect=function(){var e=1/(this.props.scale||1);if("parent"===this.props.bounds){var t=this.parentNode;if(t){var o=t.getBoundingClientRect();this.parentLeft=o.left*e,this.parentTop=o.top*e}}if(this.props.bounds&&"string"!=typeof this.props.bounds){var r=this.props.bounds.getBoundingClientRect();this.targetLeft=r.left*e,this.targetTop=r.top*e}if(this.resizable){var i=this.resizable.getBoundingClientRect(),n=i.left,s=i.top,a=i.right,l=i.bottom;this.resizableLeft=n*e,this.resizableRight=a*e,this.resizableTop=s*e,this.resizableBottom=l*e}},t.prototype.onResizeStart=function(e,t){if(this.resizable&&this.window){var o,r,i=0,n=0;if(e.nativeEvent&&((o=e.nativeEvent).clientX||0===o.clientX)&&(o.clientY||0===o.clientY)?(i=e.nativeEvent.clientX,n=e.nativeEvent.clientY):e.nativeEvent&&og(e.nativeEvent)&&(i=e.nativeEvent.touches[0].clientX,n=e.nativeEvent.touches[0].clientY),!this.props.onResizeStart||!this.resizable||!1!==this.props.onResizeStart(e,t,this.resizable)){this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height;var s=this.window.getComputedStyle(this.resizable);if("auto"!==s.flexBasis){var a=this.parentNode;if(a){var l=this.window.getComputedStyle(a).flexDirection;this.flexDir=l.startsWith("row")?"row":"column",r=s.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var h={original:{x:i,y:n,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:od(od({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(e.target).cursor||"auto"}),direction:t,flexBasis:r};this.setState(h)}}},t.prototype.onMouseMove=function(e){var t=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&og(e))try{e.preventDefault(),e.stopPropagation()}catch(e){}var r,i,n,s,a,l,h=this.props,c=h.maxWidth,d=h.maxHeight,u=h.minWidth,p=h.minHeight,f=og(e)?e.touches[0].clientX:e.clientX,m=og(e)?e.touches[0].clientY:e.clientY,g=this.state,_=g.direction,v=g.original,S=g.width,R=g.height,y=this.getParentSize(),T=(r=this.window.innerWidth,i=this.window.innerHeight,n=c,s=d,a=u,l=p,n=oS(n,y.width,r,i),s=oS(s,y.height,r,i),a=oS(a,y.width,r,i),l=oS(l,y.height,r,i),{maxWidth:void 0===n?void 0:Number(n),maxHeight:void 0===s?void 0:Number(s),minWidth:void 0===a?void 0:Number(a),minHeight:void 0===l?void 0:Number(l)});c=T.maxWidth,d=T.maxHeight,u=T.minWidth,p=T.minHeight;var C=this.calculateNewSizeFromDirection(f,m),w=C.newHeight,E=C.newWidth,b=this.calculateNewMaxFromBoundary(c,d);this.props.snap&&this.props.snap.x&&(E=o_(E,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(w=o_(w,this.props.snap.y,this.props.snapGap));var I=this.calculateNewSizeFromAspectRatio(E,w,{width:b.maxWidth,height:b.maxHeight},{width:u,height:p});if(E=I.newWidth,w=I.newHeight,this.props.grid){var M=of(E,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),O=of(w,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),N=this.props.snapGap||0,x=0===N||Math.abs(M-E)<=N?M:E,A=0===N||Math.abs(O-w)<=N?O:w;E=x,w=A}var D={width:E-v.width,height:w-v.height};if(this.delta=D,S&&"string"==typeof S){if(S.endsWith("%")){var H=E/y.width*100;E="".concat(H,"%")}else if(S.endsWith("vw")){var G=E/this.window.innerWidth*100;E="".concat(G,"vw")}else if(S.endsWith("vh")){var k=E/this.window.innerHeight*100;E="".concat(k,"vh")}}if(R&&"string"==typeof R){if(R.endsWith("%")){var H=w/y.height*100;w="".concat(H,"%")}else if(R.endsWith("vw")){var G=w/this.window.innerWidth*100;w="".concat(G,"vw")}else if(R.endsWith("vh")){var k=w/this.window.innerHeight*100;w="".concat(k,"vh")}}var W={width:this.createSizeForCssProperty(E,"width"),height:this.createSizeForCssProperty(w,"height")};"row"===this.flexDir?W.flexBasis=W.width:"column"===this.flexDir&&(W.flexBasis=W.height);var z=this.state.width!==W.width,L=this.state.height!==W.height,F=this.state.flexBasis!==W.flexBasis,P=z||L||F;P&&o(function(){t.setState(W)}),this.props.onResize&&P&&this.props.onResize(e,_,this.resizable,D)}},t.prototype.onMouseUp=function(e){var t,o,r=this.state,i=r.isResizing,n=r.direction;r.original,i&&this.resizable&&(this.props.onResizeStop&&this.props.onResizeStop(e,n,this.resizable,this.delta),this.props.size&&this.setState({width:null!=(t=this.props.size.width)?t:"auto",height:null!=(o=this.props.size.height)?o:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:od(od({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(e){var t,o;this.setState({width:null!=(t=e.width)?t:"auto",height:null!=(o=e.height)?o:"auto"})},t.prototype.renderResizer=function(){var e=this,t=this.props,o=t.enable,r=t.handleStyles,i=t.handleClasses,n=t.handleWrapperStyle,s=t.handleWrapperClass,a=t.handleComponent;if(!o)return null;var l=Object.keys(o).map(function(t){return!1!==o[t]?(0,or.jsx)(oh,{direction:t,onResizeStart:e.onResizeStart,replaceStyles:r&&r[t],className:i&&i[t],children:a&&a[t]?a[t]:null},t):null});return(0,or.jsx)("div",{className:s,style:n,children:l})},t.prototype.render=function(){var e=this,t=Object.keys(this.props).reduce(function(t,o){return -1!==oR.indexOf(o)||(t[o]=e.props[o]),t},{}),o=od(od(od({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var r=this.props.as||"div";return(0,or.jsxs)(r,od({style:o,className:this.props.className},t,{ref:function(t){t&&(e.resizable=t)},children:[this.state.isResizing&&(0,or.jsx)("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(A.PureComponent);let oC={top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1},ow={min:0,max:1/0},oE=({height:e,heightConstraints:t,width:o,widthConstraints:r})=>({height:(0,eS.q)(e,t.min,t.max),width:(0,eS.q)(o,r.min,r.max)}),ob=({enable:e,height:t,heightConstraints:o,resizeEdge:r,width:i,widthConstraints:n})=>({...oE({height:t,widthConstraints:n,heightConstraints:o,width:i??0}),enable:void 0===e||e,horizontal:"left"===r||"right"===r,initialHeight:t,initialWidth:i??0,resizing:!1,vertical:"top"===r||"bottom"===r});class oI extends A.PureComponent{static defaultProps={className:"",enable:!0,heightConstraints:ow,resizeContentClassName:"",resizeHandleClassName:"",style:{},wrapperStyle:{},translate:()=>"",wrapChildrenInDivContainer:!0,widthConstraints:ow};constructor(e){super(e),this.state=ob(e)}static getDerivedStateFromProps(e,t){return t.resizing?t:ob(e)}componentDidUpdate(e){let{onResizeFromPropChange:t}=this.props,{height:o,resizing:r,width:i}=this.state,{onResizeFromPropChange:n}=e;if(r)return;let{height:s,width:a}=this.state,l=n||t;l&&(s!==o||a!==i)&&l({height:s,width:a,originalHeight:o,originalWidth:i})}_onResize=(e,t,o,{height:r,width:i})=>{let{onResize:n}=this.props,{height:s,horizontal:a,vertical:l,width:h}=this.state,{height:c,width:d}=(({deltaWidth:e,deltaHeight:t},{heightConstraints:o,widthConstraints:r},{initialHeight:i,initialWidth:n})=>oE({height:i+t,heightConstraints:o,width:n+e,widthConstraints:r}))({deltaWidth:i,deltaHeight:r},this.props,this.state),u=a&&d!==h,p=l&&c!==s;(u||p)&&(this.setState({height:p?c:s,width:u?d:h}),n&&n({height:p?c:void 0,width:u?d:void 0}))};_onResizeStart=e=>{e.preventDefault(),e.stopPropagation();let{onResizeStart:t}=this.props,{height:o,horizontal:r,vertical:i,width:n}=this.state;this.setState({resizing:!0}),t&&t({height:i?o:void 0,width:r?n:void 0})};_onResizeEnd=()=>{let{onResizeEnd:e}=this.props,{height:t,horizontal:o,vertical:r,width:i,initialWidth:n,initialHeight:s}=this.state;this.setState({initialWidth:i,initialHeight:t,resizing:!1}),(n!==i||s!==t)&&e&&e({width:o?i:void 0,height:r?t:void 0})};render(){let{children:e,className:t,handleStyles:o,id:r,resizeContentClassName:i,resizeEdge:n,resizeHandleClassName:s,style:a,translate:l,heightConstraints:h,wrapChildrenInDivContainer:c,widthConstraints:d}=this.props,{enable:u,height:p,horizontal:f,resizing:m,vertical:g,width:_}=this.state,{display:v,...S}=a,{min:R,max:y}=d,{min:T,max:C}=h,w={...this.props.wrapperStyle};f&&(w.width=_,w.minWidth=_),g&&(w.height=p,w.minHeight=p);let E=x()("resizable",t,{resizing:m}),b=x()("contents",i,`resize-edge-${n}`,{horizontal:f,vertical:g}),I=x()(n,s,"resizable-handle",{horizontal:f,vertical:g}),M=A.createElement("span",{title:l("ResizePanel")});return A.createElement("div",{"data-testid":`resizable-${r||""}`,style:{...w,display:v}},A.createElement(oT,{className:E,"data-testid":`resizable-core-${r||""}`,enable:{...oC,[n]:u},handleClasses:{[n]:I},handleComponent:{[n]:M},handleStyles:o,maxHeight:g?C:void 0,maxWidth:f?y:void 0,minHeight:g?T:void 0,minWidth:f?R:void 0,onResize:this._onResize,onResizeStart:this._onResizeStart,onResizeStop:this._onResizeEnd,size:{height:g?p:"100%",width:f?_:"100%"},style:S},c?A.createElement("div",{className:b,style:{userSelect:"none"}},e):e))}}var oM=n(385),oO=n(999);let oN=x()("absolute","top-0","right-0","bottom-0","left-0","time-line"),ox=x()(oN,"z2");var oA=function({z2:e}){return A.createElement("div",{className:e?ox:oN,style:{height:2}})};function oD({message:e}){return A.default.createElement("span",{className:"time-line-message-container"},A.default.createElement("span",{className:"time-line-message"},e))}let oH=x()("graph-row-wrapper","grow-3","height-100","graph-zone-column","min-width-0","pb3","pointer","pt3","relative"),oG=x()("graph-row","height-100-percent","flex");function ok(e){let t,o,r,i=(0,oO.c)(16),{processedRows:n,scrollTop:s,translate:a}=e;if(i[0]!==n){t=[];for(let e=0;e<n.length;e++){let o=n[e];o.timeLineEntry&&t.push({row:o,index:e,position:e*V.yB})}i[0]=n,i[1]=t}else t=i[1];let l=t;e:{let e,t,r;if(!l.length){o=null;break e}if(i[2]!==s||i[3]!==l){for(let o of l)if(o.position<=s)e=o.row;else{t=o;break}i[2]=s,i[3]=l,i[4]=e,i[5]=t}else e=i[4],t=i[5];if(t&&t.position-s<=V.yB/2&&(e=t.row),!e){o=null;break e}let{label:n,value:h}=e.timeLineEntry;i[6]!==n||i[7]!==a||i[8]!==h?(r=a(n,h),i[6]=n,i[7]=a,i[8]=h,i[9]=r):r=i[9],o=r}let h=o;if(null==h||s<V.yB)return null;if(i[10]!==h){let e,t,o,n;i[12]===Symbol.for("react.memo_cache_sentinel")?(e={className:"sticky-timeline-container"},i[12]=e):e=i[12],i[13]===Symbol.for("react.memo_cache_sentinel")?(t={className:oH},o=A.default.createElement(oA,null),i[13]=t,i[14]=o):(t=i[13],o=i[14]),i[15]===Symbol.for("react.memo_cache_sentinel")?(n={className:oG},i[15]=n):n=i[15],r=A.default.createElement("div",e,A.default.createElement("div",t,o,A.default.createElement("div",n,A.default.createElement(oD,{message:h})))),i[10]=h,i[11]=r}else r=i[11];return r}let oW={head:"head",localBranches:"branch",remoteBranches:"remote",tags:"tag",stashes:"stash",pullRequests:"pull-request",upstream:"upstream-ahead",wip:"worktree"},oz={head:8,tags:7,localBranches:6,remoteBranches:5,pullRequests:4,stashes:3,upstream:2,wip:1};function oL(e){return e.slice().sort((e,t)=>(oz[t.type]??0)-(oz[e.type]??0))}function oF(e,t,o){let r=t*V.yB,{shape:i}=V.wx[e],n=V.j[i];if(!n)return{height:0,offset:0};let{baseHeight:s,minHeight:a,maxHeight:l}=n,h=o/r*s;void 0!==a&&h<a&&(h=a),void 0!==l&&h>l&&(h=l);let c=V.yB*(o/r),d=h>=c?0:(c-h)/2;return{height:h,offset:d}}function oP(e,t,o){let r=o*V.yB;return e*V.yB/r*t}function oB(e,t,o){let r=o*V.yB;if(r<=t||t<=0)return null;let i=Math.max(12,t/r*t),n=r-t,s=t-i,a=n>0?Math.max(0,Math.min(s,e/n*s)):0;return{top:a,bottom:a+i}}class oZ extends A.PureComponent{canvas;state={hovered:null};memoMarkersByRow={};componentDidMount(){this.updateCanvas()}componentDidUpdate(e){if((e.branchUpstreamRowIndices!==this.props.branchUpstreamRowIndices||e.markerRowIndices!==this.props.markerRowIndices||e.totalRows!==this.props.totalRows||e.viewportHeight!==this.props.viewportHeight||e.viewportWidth!==this.props.viewportWidth||e.markerColors!==this.props.markerColors||e.enabledScrollMarkerTypes!==this.props.enabledScrollMarkerTypes||e.scrollWidth!==this.props.scrollWidth||e.scrollTop!==this.props.scrollTop)&&this.updateCanvas(),(e.interactiveMarkers!==this.props.interactiveMarkers||e.enabledScrollMarkerTypes!==this.props.enabledScrollMarkerTypes||e.branchUpstreamRowIndices!==this.props.branchUpstreamRowIndices)&&null!=this.state.hovered){let{markersByRow:e}=this.getMarkersByRowMemo();e.has(this.state.hovered.rowIndex)||this.setState({hovered:null})}if((e.scrollTop!==this.props.scrollTop||e.viewportHeight!==this.props.viewportHeight||e.totalRows!==this.props.totalRows)&&null!=this.state.hovered){let e=oB(this.props.scrollTop,this.props.viewportHeight,this.props.totalRows);null!=e&&this.state.hovered.tooltipTop>=e.top&&this.state.hovered.tooltipTop<=e.bottom&&this.setState({hovered:null})}}updateCanvas(e){let{branchUpstreamRowIndices:t,enabledScrollMarkerTypes:o,viewportHeight:r,markerRowIndices:i,markerColors:n,scrollTop:s,scrollWidth:a,totalRows:l}=e||this.props;if(null==this.canvas)return;let h=this.canvas.getContext("2d");h.canvas.width=a,h.canvas.height=r;let c=a/V.Yx,d=oB(s,r,l);for(let[e,s]of(h.clearRect(0,0,h.canvas.width,h.canvas.height),Object.entries(V.wx))){if(!o.includes(e)&&!("remoteBranches"===e&&o.includes("localBranches")))continue;let a="remoteBranches"!==e||o.includes("remoteBranches")?i[e]||[]:t,u=n[e],p=s.lanes;if(!u||!a.length||!p.length)continue;let{height:f,offset:m}=oF(e,l,r);if(f<=0)continue;let g=p[0]*c,_=c*p.length;h.fillStyle=u;let v=-1/0;for(let e of a){let t=oP(e,r,l)+m,o=t-.5*f;o<v||(h.globalAlpha=null!=d&&t>=d.top&&t<=d.bottom?.35:1,h.fillRect(g,o,_,f),v=o+f)}}h.globalAlpha=1}setHoveredRow(e,t){let o=this.state.hovered;if(o?.rowIndex===e)return;let{totalRows:r,viewportHeight:i}=this.props,n=oL(t),s=function(e,t,o,r){let{offset:i}=oF(e[0].type,r,o);return oP(t,o,r)+i}(n,e,i,r),a=this.pickRowColor(n);this.setState({hovered:{rowIndex:e,markers:n,tooltipTop:s,color:a}})}pickRowColor(e){let t=e[0].type;return this.props.markerColors[t]??"var(--text-normal, #ccc)"}clearHoveredIfRow(e){this.state.hovered?.rowIndex===e&&this.setState({hovered:null})}onRowHitMove=(e,t)=>{this.setHoveredRow(e,t)};onRowHitClick=(e,t)=>{let o=oL(t)[0];this.props.onMarkerClick?.(o.sha,e,o.type)};getMarkersByRowMemo(){let{interactiveMarkers:e,enabledScrollMarkerTypes:t,branchUpstreamRowIndices:o}=this.props,r=this.memoMarkersByRow;if(r.interactiveMarkers===e&&r.enabledScrollMarkerTypes===t&&r.branchUpstreamRowIndices===o&&null!=r.result&&null!=r.upstreamSet)return{upstreamSet:r.upstreamSet,markersByRow:r.result};let i=new Set(o),n=new Map;if(null!=e)for(let o of e){if(!(t.includes(o.type)||"remoteBranches"===o.type&&t.includes("localBranches")&&i.has(o.rowIndex)))continue;let e=n.get(o.rowIndex);null!=e?e.push(o):n.set(o.rowIndex,[o])}return r.interactiveMarkers=e,r.enabledScrollMarkerTypes=t,r.branchUpstreamRowIndices=o,r.upstreamSet=i,r.result=n,{upstreamSet:i,markersByRow:n}}render(){let{interactiveMarkers:t,scrollWidth:o,totalRows:r,viewportHeight:i}=this.props,{hovered:n}=this.state,s=(t?.length??0)>0&&null!=this.props.onMarkerClick,a=o??0,l=a>0?a/V.Yx:0,{markersByRow:h}=this.getMarkersByRowMemo(),c=null!=n&&h.has(n.rowIndex),d=null;if(null!=n&&c&&a>0&&r>0&&i>0){let e=r*V.yB,t=V.yB*(i/e),o=Math.max(t,4),s=oP(n.rowIndex,i,r)+t/2;d=A.createElement("div",{className:"graph-scroll-marker-hover",style:{top:s-o/2,height:o,left:-3,width:a+3,background:n.color}})}let u=oB(this.props.scrollTop,i,r),p=null;if(s&&r>0&&i>0&&l>0){let e=new Map,t=t=>{let o=e.get(t);return null==o&&(o=oF(t,r,i),e.set(t,o)),o};for(let[e,o]of(p=[],h)){let n=oP(e,i,r),s=1/0,l=-1/0;for(let e of o){let{height:o,offset:r}=t(e.type);if(0===o)continue;let i=n+r;i-o/2<s&&(s=i-o/2),i+o/2>l&&(l=i+o/2)}if(s===1/0)continue;let h=s-3,c=l-s+6,d=h+c;null!=u&&d>=u.top&&h<=u.bottom||p.push(A.createElement("div",{className:"graph-scroll-marker-hit",key:`row-${e}`,onClick:()=>this.onRowHitClick(e,o),onMouseLeave:()=>this.clearHoveredIfRow(e),onMouseMove:()=>this.onRowHitMove(e,o),style:{top:h,height:c,left:0,width:a}}))}}let f=null!=n&&c?document.getElementById("graph-container"):null,m=null!=n&&c?A.createElement("div",{className:null!=f?"graph-scroll-marker-tooltip is-portaled":"graph-scroll-marker-tooltip",style:{top:n.tooltipTop}},n.markers.map((e,t)=>{let o=oW[e.type],r=null!=o?this.props.getExternalIcon?.(o):null;return A.createElement("div",{className:"graph-scroll-marker-tooltip__row",key:`${e.type}-${t}`},null!=r&&A.createElement("span",{className:"graph-scroll-marker-tooltip__icon"},r),A.createElement("span",{className:"graph-scroll-marker-tooltip__label"},e.label))})):null;return A.createElement("div",{className:"graph-scroll-markers-root",style:{width:o,height:i}},A.createElement("canvas",{className:"graph-scroll-markers",ref:e=>{this.canvas=e}}),d,p,null!=f&&null!=m?e.createPortal(m,f):m)}}var oU=function({children:t,className:o,height:r,heightAdjustment:i,graphZoneType:n,scrollTop:s,style:a}){let l=V.W[n].listId,h=document.getElementById(l),c=h?.scrollHeight||0,d=r-28;void 0!==s&&(d=Number(a.top)-s,h&&c-r-s<0&&(d=r-i-28));let u={top:d,zIndex:2},p=A.createElement("span",{className:"absolute",style:u},t);return A.createElement("div",{className:o,style:a},h?e.createPortal(p,document.getElementById("graph-container")):p)};function oj({inline:e,getExternalIcon:t,message:o,size:r=100,useSimpleSpinner:i}){let n=x()("loading-spinner",{"inline-block":e,ml2:e,"shrink-0":e}),s=x()("spinner","mr1",{"inline-block":e}),a={height:r,width:r},l=x()("message",{"inline-block":e,mx2:e}),h=i?A.createElement("span",{className:s,style:a},t("loading")):A.createElement("div",{className:s,style:a},A.createElement("img",{className:"ring outer",src:"../../../images/spinner-outer-ring.svg",style:a}),A.createElement("img",{className:"ring inner",src:"../../../images/spinner-inner-ring.svg",style:a}),A.createElement("img",{className:"bg-img",src:"../../../images/spinner-kraken.svg",style:a}));return A.createElement("div",{className:n},h,o&&A.createElement("div",{className:l},o))}class oV extends A.Component{render(){let{currentCommits:e,customFooterRow:t,graphZoneType:o,hasMoreCommits:r,height:i,horizontalScrollHeight:n,getExternalIcon:s,isLoadingRows:a,scrollTop:l,style:h,translate:c}=this.props,d=A.createElement(oj,{className:"loading-spinner",getExternalIcon:s,size:20,useSimpleSpinner:!0}),u=A.createElement("div",{className:"flex items-center"},A.createElement("span",{style:{paddingRight:"5px"}},d)),p=0!==(e>0?e:0)||r?t:A.createElement(A.Fragment,null,c("Graph-NoCommits")),f=A.createElement("div",{className:"graph-adjust-commit-count p1"},a?u:p);return A.createElement(oU,{graphZoneType:o,height:i,heightAdjustment:n,scrollTop:l,style:h},f)}}function o$({branchUpstreamRowIndices:e,rowCount:t,cellRenderersByIds:o,columnIndex:r,customFooterRow:i,enabledScrollMarkerTypes:n,enableResizer:s,getExternalIcon:a,getKeyForCell:l,graphHeight:h,graphWidth:c,graphZoneType:d,graphZones:u,hasMoreCommits:p,horizontalScrollHeight:f,isFilteredSearch:m,isLoadingRows:g,markerColors:_,markerRowIndices:v,interactiveScrollMarkers:S,onScrollMarkerClicked:R,onResize:y,onResizeEnd:T,onResizeFromPropChange:C,onScroll:w,onScrollToRowCausedUpdate:E,onZoneEnter:b,processedRows:I,scrollLeft:M,scrollToAlignment:O,scrollToIndex:N,scrollTop:D,smartCellRangeRenderer:H,stickyTimeline:G,translate:k,verticalScrollWidth:W}){let z=(0,A.useRef)(null),L=(0,ea.Et)(d,u);if(!L)return null;let F=(0,ea.z)(d,u),P=(0,ea.Yy)(t,p,g),B=(0,ea.yJ)(t,p,g),Z=(0,ea.U0)(L,t),U=(0,ea.Ve)(t,p,g),j=W>0,$=!m&&n.length>0,Y=x()("graph-panel","react-virtualized-list","pad-for-horizontal-scrollbar",d===V.ui?"z3":null,{"pad-for-vertical-scrollbar":j}),K=d===V.md?{...!F&&{position:"static"},...F&&{width:L.currentWidth>Z?L.currentWidth:Z,maxWidth:"none"}}:void 0,q=(e,t)=>{if(e<=t)return!1;let o=(()=>{let e=z.current;if(e?.isConnected)return e;let t=document.getElementById(L.listId);return z.current=t,t})();return null!=o&&(0,ea.br)(o)},X=(e,n,s,u,m,_,v,S)=>A.createElement(te,{autoContainerWidth:!0,cellRangeRenderer:H,cellRenderer:n=>((e,n)=>{let s;if(n.rowIndex>t-1)return P&&0===r?A.createElement(oV,{currentCommits:t-1,customFooterRow:i,getExternalIcon:a,graphZoneType:d,hasMoreCommits:p,height:h,horizontalScrollHeight:f,isLoadingRows:g,key:l(n.rowIndex),scrollTop:D,style:n.style,translate:k}):void 0;let c={...n,style:{...n.style}};V.OU===e&&(c.style.top=Number(n.style.top)-D);let u=o[e];return u?(s=u(c),A.createElement("span",{"data-column-name":e,"data-row-idx":n.rowIndex,key:`gk-row-${n.key}`,style:{top:n.style.top}},s)):void 0})(e,n),className:s,columnCount:1,columnWidth:S,containerStyle:u,height:v,id:n,key:n,onScrollToTargetCausedUpdate:E?e=>E(d,e,c,h,p):void 0,overscanRowCount:0,rowCount:B,rowHeight:V.yB,scrollLeft:M,scrollToAlignment:O,scrollTop:D,scrollToRow:N,style:m,tabIndex:null,width:_}),Q=X(L.type,L.listId,Y,K??{},{position:"absolute"},L.currentWidth,h,Z),J=F?A.createElement("div",{className:"timeline-column-container",onWheelCapture:e=>{let t;q(t=(t=D+e.deltaY)>=0?t:0,D)||w(d,{clientHeight:U,clientWidth:Z,scrollHeight:f,scrollLeft:0,scrollTop:t,scrollWidth:W},c,h,p)}},G&&I&&A.createElement(ok,{processedRows:I,scrollTop:D,translate:k}),X(V.OU,"timeline-column","graph-panel react-virtualized-list timeline-column",{overflow:"visible",zIndex:3,maxHeight:U},{position:"absolute",right:0,zIndex:3,maxHeight:h},1,h,1)):void 0,ee=Q&&A.createElement(A.Fragment,null,J,$&&F?A.createElement(oZ,{branchUpstreamRowIndices:e,enabledScrollMarkerTypes:n,getExternalIcon:a,interactiveMarkers:S,markerColors:_,markerRowIndices:v,onMarkerClick:R,scrollTop:D,scrollWidth:W,totalRows:B,viewportHeight:h<U?h:U,viewportWidth:L.currentWidth}):null,A.createElement(oM.A,{contentHeight:U,contentWidth:Z,displayHorizontalScrollbar:L.type===V.md,displayVerticalScrollbar:F,forceOnVerticalWheel:!F,forceVerticalScrollbar:F&&$,height:h,onScroll:e=>{!q(e.scrollTop,D)&&w(d,e,c,h,p)},scrollLeft:M,scrollTop:D,width:L.currentWidth},Q)),et=A.createElement("div",{onMouseEnter:b},ee);return F?et:A.createElement(oI,{enable:s,height:h,id:`${d}Column`,key:`${d}Column`,onResize:y?e=>y(L,e):void 0,onResizeEnd:T?e=>T(L,e):void 0,onResizeFromPropChange:C?e=>C(L,e):void 0,resizeContentClassName:"z1",resizeEdge:"right",resizeHandleClassName:"z1",width:L.currentWidth,widthConstraints:(0,ea.qC)(d,u,c)},et)}var oY=n(175),oK=n.n(oY);let oq="dnd-container";class oX extends A.PureComponent{dndDrake;childReactElementsById={};constructor(e){super(e),this.loadChildrenReactElements(this.props.children)}componentDidMount(){this.dndDrake&&this.dndDrake.on("drop",this.onDrop)}componentDidUpdate(e){this.props.children!==e.children&&this.loadChildrenReactElements(e.children)}componentWillUnmount(){this.dndDrake&&this.dndDrake.destroy()}onDrop=(e,t,o,r)=>{if(this.props.onDrop&&e.id){let t=this.sanitizeId(e.id),o=r?.id?this.sanitizeId(r.id):null,i=this.childReactElementsById[t],n=o?this.childReactElementsById[o]:null;i&&this.props.onDrop(i,n)}};isContainerCallback=e=>e?.classList.contains(oq)??!1;movesCallback=e=>!!e?.id&&this.isDraggable(e.id);acceptsCallback=(e,t,o,r)=>!!e?.id&&this.isDroppable(e.id,r?.id);invalidCallBack=()=>!1;dndDecorator=e=>{if(e){let t={isContainer:this.isContainerCallback,mirrorContainer:this.props.mirrorContainer,moves:this.movesCallback,accepts:this.acceptsCallback,invalid:this.invalidCallBack,direction:this.props.direction||"horizontal",copy:!1,copySortSource:!1,revertOnSpill:!1,removeOnSpill:!1,ignoreInputTextSelection:!0};this.dndDrake=oK()([e],t)}};loadChildrenReactElements(e){this.childReactElementsById={},e&&(e instanceof Array?e.forEach(e=>{A.isValidElement(e)&&this.addChildReactElement(e)}):A.isValidElement(e)&&this.addChildReactElement(e))}addChildReactElement(e){let t=e.props.id;t&&(this.childReactElementsById[this.sanitizeId(t)]=e)}sanitizeId(e){return e.trim().toLowerCase().replace(/-/g,"").replace(/_/g,"")}isDraggable(e){if(this.props.isDraggable){let t=this.sanitizeId(e),o=this.childReactElementsById[t];return null!=o&&this.props.isDraggable(o)}return!1}isDroppable(e,t){if(this.props.isDroppable){let o=this.sanitizeId(e),r=t?this.sanitizeId(t):null,i=this.childReactElementsById[o],n=r?this.childReactElementsById[r]:null;if(i)return this.props.isDroppable(i,n)}return!1}render(){let{children:e,className:t}=this.props,o=x()(oq,t);return A.createElement("div",{className:o,ref:this.dndDecorator},e)}}function oQ(){return(0,A.useState)(null)}let oJ=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,o0=function(e,t){return(0,A.useMemo)(()=>{let o,r;return o=oJ(e),r=oJ(t),e=>{o&&o(e),r&&r(e)}},[e,t])};var o1=Object.prototype.hasOwnProperty;function o2(e,t,o){for(o of e.keys())if(o5(o,t))return o}function o5(e,t){var o,r,i;if(e===t)return!0;if(e&&t&&(o=e.constructor)===t.constructor){if(o===Date)return e.getTime()===t.getTime();if(o===RegExp)return e.toString()===t.toString();if(o===Array){if((r=e.length)===t.length)for(;r--&&o5(e[r],t[r]););return -1===r}if(o===Set){if(e.size!==t.size)return!1;for(r of e)if((i=r)&&"object"==typeof i&&!(i=o2(t,i))||!t.has(i))return!1;return!0}if(o===Map){if(e.size!==t.size)return!1;for(r of e)if((i=r[0])&&"object"==typeof i&&!(i=o2(t,i))||!o5(r[1],t.get(i)))return!1;return!0}if(o===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(o===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return -1===r}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return -1===r}if(!o||"object"==typeof e){for(o in r=0,e)if(o1.call(e,o)&&++r&&!o1.call(t,o)||!(o in t)||!o5(e[o],t[o]))return!1;return Object.keys(t).length===r}}return e!=e&&t!=t}let o3=function(e){let t,o,r=(t=(0,A.useRef)(!0),o=(0,A.useRef)(()=>t.current),(0,A.useEffect)(()=>(t.current=!0,()=>{t.current=!1}),[]),o.current);return[e[0],(0,A.useCallback)(t=>{if(r())return e[1](t)},[r,e[1]])]};function o6(e){return e.split("-")[0]}function o4(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function o9(e){var t=o4(e).Element;return e instanceof t||e instanceof Element}function o7(e){var t=o4(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function o8(e){if("u"<typeof ShadowRoot)return!1;var t=o4(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var re=Math.max,rt=Math.min,ro=Math.round;function rr(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function ri(){return!/^((?!chrome|android).)*safari/i.test(rr())}function rn(e,t,o){void 0===t&&(t=!1),void 0===o&&(o=!1);var r=e.getBoundingClientRect(),i=1,n=1;t&&o7(e)&&(i=e.offsetWidth>0&&ro(r.width)/e.offsetWidth||1,n=e.offsetHeight>0&&ro(r.height)/e.offsetHeight||1);var s=(o9(e)?o4(e):window).visualViewport,a=!ri()&&o,l=(r.left+(a&&s?s.offsetLeft:0))/i,h=(r.top+(a&&s?s.offsetTop:0))/n,c=r.width/i,d=r.height/n;return{width:c,height:d,top:h,right:l+c,bottom:h+d,left:l,x:l,y:h}}function rs(e){var t=rn(e),o=e.offsetWidth,r=e.offsetHeight;return 1>=Math.abs(t.width-o)&&(o=t.width),1>=Math.abs(t.height-r)&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:r}}function ra(e,t){var o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(o&&o8(o)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function rl(e){return e?(e.nodeName||"").toLowerCase():null}function rh(e){return o4(e).getComputedStyle(e)}function rc(e){return((o9(e)?e.ownerDocument:e.document)||window.document).documentElement}function rd(e){return"html"===rl(e)?e:e.assignedSlot||e.parentNode||(o8(e)?e.host:null)||rc(e)}function ru(e){return o7(e)&&"fixed"!==rh(e).position?e.offsetParent:null}function rp(e){for(var t=o4(e),o=ru(e);o&&["table","td","th"].indexOf(rl(o))>=0&&"static"===rh(o).position;)o=ru(o);return o&&("html"===rl(o)||"body"===rl(o)&&"static"===rh(o).position)?t:o||function(e){var t=/firefox/i.test(rr());if(/Trident/i.test(rr())&&o7(e)&&"fixed"===rh(e).position)return null;var o=rd(e);for(o8(o)&&(o=o.host);o7(o)&&0>["html","body"].indexOf(rl(o));){var r=rh(o);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return o;o=o.parentNode}return null}(e)||t}function rf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function rm(e,t,o){return re(e,rt(t,o))}function rg(){return{top:0,right:0,bottom:0,left:0}}function r_(e){return Object.assign({},rg(),e)}function rv(e,t){return t.reduce(function(t,o){return t[o]=e,t},{})}var rS="bottom",rR="right",ry="left",rT="auto",rC=["top",rS,rR,ry],rw="start",rE="viewport",rb="popper",rI=rC.reduce(function(e,t){return e.concat([t+"-"+rw,t+"-end"])},[]),rM=[].concat(rC,[rT]).reduce(function(e,t){return e.concat([t,t+"-"+rw,t+"-end"])},[]),rO=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function rN(e){return e.split("-")[1]}var rx={top:"auto",right:"auto",bottom:"auto",left:"auto"};function rA(e){var t,o,r,i,n,s,a,l=e.popper,h=e.popperRect,c=e.placement,d=e.variation,u=e.offsets,p=e.position,f=e.gpuAcceleration,m=e.adaptive,g=e.roundOffsets,_=e.isFixed,v=u.x,S=void 0===v?0:v,R=u.y,y=void 0===R?0:R,T="function"==typeof g?g({x:S,y:y}):{x:S,y:y};S=T.x,y=T.y;var C=u.hasOwnProperty("x"),w=u.hasOwnProperty("y"),E=ry,b="top",I=window;if(m){var M=rp(l),O="clientHeight",N="clientWidth";M===o4(l)&&"static"!==rh(M=rc(l)).position&&"absolute"===p&&(O="scrollHeight",N="scrollWidth"),("top"===c||(c===ry||c===rR)&&"end"===d)&&(b=rS,y-=(_&&M===I&&I.visualViewport?I.visualViewport.height:M[O])-h.height,y*=f?1:-1),(c===ry||("top"===c||c===rS)&&"end"===d)&&(E=rR,S-=(_&&M===I&&I.visualViewport?I.visualViewport.width:M[N])-h.width,S*=f?1:-1)}var x=Object.assign({position:p},m&&rx),A=!0===g?(t={x:S,y:y},o=o4(l),r=t.x,i=t.y,{x:ro(r*(n=o.devicePixelRatio||1))/n||0,y:ro(i*n)/n||0}):{x:S,y:y};return(S=A.x,y=A.y,f)?Object.assign({},x,((a={})[b]=w?"0":"",a[E]=C?"0":"",a.transform=1>=(I.devicePixelRatio||1)?"translate("+S+"px, "+y+"px)":"translate3d("+S+"px, "+y+"px, 0)",a)):Object.assign({},x,((s={})[b]=w?y+"px":"",s[E]=C?S+"px":"",s.transform="",s))}var rD={passive:!0},rH={left:"right",right:"left",bottom:"top",top:"bottom"};function rG(e){return e.replace(/left|right|bottom|top/g,function(e){return rH[e]})}var rk={start:"end",end:"start"};function rW(e){return e.replace(/start|end/g,function(e){return rk[e]})}function rz(e){var t=o4(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function rL(e){return rn(rc(e)).left+rz(e).scrollLeft}function rF(e){var t=rh(e),o=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+i+r)}function rP(e,t){void 0===t&&(t=[]);var o,r=function e(t){return["html","body","#document"].indexOf(rl(t))>=0?t.ownerDocument.body:o7(t)&&rF(t)?t:e(rd(t))}(e),i=r===(null==(o=e.ownerDocument)?void 0:o.body),n=o4(r),s=i?[n].concat(n.visualViewport||[],rF(r)?r:[]):r,a=t.concat(s);return i?a:a.concat(rP(rd(s)))}function rB(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function rZ(e,t,o){var r,i,n,s,a,l,h,c,d,u;return t===rE?rB(function(e,t){var o=o4(e),r=rc(e),i=o.visualViewport,n=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){n=i.width,s=i.height;var h=ri();(h||!h&&"fixed"===t)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:n,height:s,x:a+rL(e),y:l}}(e,o)):o9(t)?((r=rn(t,!1,"fixed"===o)).top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r):rB((i=rc(e),s=rc(i),a=rz(i),l=null==(n=i.ownerDocument)?void 0:n.body,h=re(s.scrollWidth,s.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),c=re(s.scrollHeight,s.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),d=-a.scrollLeft+rL(i),u=-a.scrollTop,"rtl"===rh(l||s).direction&&(d+=re(s.clientWidth,l?l.clientWidth:0)-h),{width:h,height:c,x:d,y:u}))}function rU(e){var t,o=e.reference,r=e.element,i=e.placement,n=i?o6(i):null,s=i?rN(i):null,a=o.x+o.width/2-r.width/2,l=o.y+o.height/2-r.height/2;switch(n){case"top":t={x:a,y:o.y-r.height};break;case rS:t={x:a,y:o.y+o.height};break;case rR:t={x:o.x+o.width,y:l};break;case ry:t={x:o.x-r.width,y:l};break;default:t={x:o.x,y:o.y}}var h=n?rf(n):null;if(null!=h){var c="y"===h?"height":"width";switch(s){case rw:t[h]=t[h]-(o[c]/2-r[c]/2);break;case"end":t[h]=t[h]+(o[c]/2-r[c]/2)}}return t}function rj(e,t){void 0===t&&(t={});var o,r,i,n,s,a,l,h,c=t,d=c.placement,u=void 0===d?e.placement:d,p=c.strategy,f=void 0===p?e.strategy:p,m=c.boundary,g=c.rootBoundary,_=c.elementContext,v=void 0===_?rb:_,S=c.altBoundary,R=c.padding,y=void 0===R?0:R,T=r_("number"!=typeof y?y:rv(y,rC)),C=e.rects.popper,w=e.elements[void 0!==S&&S?v===rb?"reference":rb:v],E=(o=o9(w)?w:w.contextElement||rc(e.elements.popper),r=void 0===m?"clippingParents":m,i=void 0===g?rE:g,l=(a=[].concat("clippingParents"===r?(n=rP(rd(o)),!o9(s=["absolute","fixed"].indexOf(rh(o).position)>=0&&o7(o)?rp(o):o)?[]:n.filter(function(e){return o9(e)&&ra(e,s)&&"body"!==rl(e)})):[].concat(r),[i]))[0],(h=a.reduce(function(e,t){var r=rZ(o,t,f);return e.top=re(r.top,e.top),e.right=rt(r.right,e.right),e.bottom=rt(r.bottom,e.bottom),e.left=re(r.left,e.left),e},rZ(o,l,f))).width=h.right-h.left,h.height=h.bottom-h.top,h.x=h.left,h.y=h.top,h),b=rn(e.elements.reference),I=rU({reference:b,element:C,strategy:"absolute",placement:u}),M=rB(Object.assign({},C,I)),O=v===rb?M:b,N={top:E.top-O.top+T.top,bottom:O.bottom-E.bottom+T.bottom,left:E.left-O.left+T.left,right:O.right-E.right+T.right},x=e.modifiersData.offset;if(v===rb&&x){var A=x[u];Object.keys(N).forEach(function(e){var t=[rR,rS].indexOf(e)>=0?1:-1,o=["top",rS].indexOf(e)>=0?"y":"x";N[e]+=A[o]*t})}return N}function rV(e,t,o){return void 0===o&&(o={x:0,y:0}),{top:e.top-t.height-o.y,right:e.right-t.width+o.x,bottom:e.bottom-t.height+o.y,left:e.left-t.width-o.x}}function r$(e){return["top",rR,rS,ry].some(function(t){return e[t]>=0})}var rY={placement:"bottom",modifiers:[],strategy:"absolute"};function rK(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}let rq=(d=void 0===(c=(h={defaultModifiers:[{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,o=e.name,r=t.rects.reference,i=t.rects.popper,n=t.modifiersData.preventOverflow,s=rj(t,{elementContext:"reference"}),a=rj(t,{altBoundary:!0}),l=rV(s,r),h=rV(a,i,n),c=r$(l),d=r$(h);t.modifiersData[o]={referenceClippingOffsets:l,popperEscapeOffsets:h,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,o=e.name;t.modifiersData[o]=rU({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,o=e.options,r=o.gpuAcceleration,i=o.adaptive,n=o.roundOffsets,s=void 0===n||n,a={placement:o6(t.placement),variation:rN(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:void 0===r||r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,rA(Object.assign({},a,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:void 0===i||i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,rA(Object.assign({},a,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,o=e.instance,r=e.options,i=r.scroll,n=void 0===i||i,s=r.resize,a=void 0===s||s,l=o4(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return n&&h.forEach(function(e){e.addEventListener("scroll",o.update,rD)}),a&&l.addEventListener("resize",o.update,rD),function(){n&&h.forEach(function(e){e.removeEventListener("scroll",o.update,rD)}),a&&l.removeEventListener("resize",o.update,rD)}},data:{}},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,o=e.options,r=e.name,i=o.offset,n=void 0===i?[0,0]:i,s=rM.reduce(function(e,o){var r,i,s,a,l,h;return e[o]=(r=t.rects,s=[ry,"top"].indexOf(i=o6(o))>=0?-1:1,l=(a="function"==typeof n?n(Object.assign({},r,{placement:o})):n)[0],h=a[1],l=l||0,h=(h||0)*s,[ry,rR].indexOf(i)>=0?{x:h,y:l}:{x:l,y:h}),e},{}),a=s[t.placement],l=a.x,h=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=h),t.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,o=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=o.mainAxis,n=void 0===i||i,s=o.altAxis,a=void 0===s||s,l=o.fallbackPlacements,h=o.padding,c=o.boundary,d=o.rootBoundary,u=o.altBoundary,p=o.flipVariations,f=void 0===p||p,m=o.allowedAutoPlacements,g=t.options.placement,_=o6(g)===g,v=l||(_||!f?[rG(g)]:function(e){if(o6(e)===rT)return[];var t=rG(e);return[rW(e),t,rW(t)]}(g)),S=[g].concat(v).reduce(function(e,o){var r,i,n,s,a,l,u,p,g,_,v,S;return e.concat(o6(o)===rT?(i=(r={placement:o,boundary:c,rootBoundary:d,padding:h,flipVariations:f,allowedAutoPlacements:m}).placement,n=r.boundary,s=r.rootBoundary,a=r.padding,l=r.flipVariations,p=void 0===(u=r.allowedAutoPlacements)?rM:u,0===(v=(_=(g=rN(i))?l?rI:rI.filter(function(e){return rN(e)===g}):rC).filter(function(e){return p.indexOf(e)>=0})).length&&(v=_),Object.keys(S=v.reduce(function(e,o){return e[o]=rj(t,{placement:o,boundary:n,rootBoundary:s,padding:a})[o6(o)],e},{})).sort(function(e,t){return S[e]-S[t]})):o)},[]),R=t.rects.reference,y=t.rects.popper,T=new Map,C=!0,w=S[0],E=0;E<S.length;E++){var b=S[E],I=o6(b),M=rN(b)===rw,O=["top",rS].indexOf(I)>=0,N=O?"width":"height",x=rj(t,{placement:b,boundary:c,rootBoundary:d,altBoundary:u,padding:h}),A=O?M?rR:ry:M?rS:"top";R[N]>y[N]&&(A=rG(A));var D=rG(A),H=[];if(n&&H.push(x[I]<=0),a&&H.push(x[A]<=0,x[D]<=0),H.every(function(e){return e})){w=b,C=!1;break}T.set(b,H)}if(C)for(var G=f?3:1,k=function(e){var t=S.find(function(t){var o=T.get(t);if(o)return o.slice(0,e).every(function(e){return e})});if(t)return w=t,"break"},W=G;W>0&&"break"!==k(W);W--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,o=e.options,r=e.name,i=o.mainAxis,n=o.altAxis,s=o.boundary,a=o.rootBoundary,l=o.altBoundary,h=o.padding,c=o.tether,d=void 0===c||c,u=o.tetherOffset,p=void 0===u?0:u,f=rj(t,{boundary:s,rootBoundary:a,padding:h,altBoundary:l}),m=o6(t.placement),g=rN(t.placement),_=!g,v=rf(m),S="x"===v?"y":"x",R=t.modifiersData.popperOffsets,y=t.rects.reference,T=t.rects.popper,C="function"==typeof p?p(Object.assign({},t.rects,{placement:t.placement})):p,w="number"==typeof C?{mainAxis:C,altAxis:C}:Object.assign({mainAxis:0,altAxis:0},C),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,b={x:0,y:0};if(R){if(void 0===i||i){var I,M="y"===v?"top":ry,O="y"===v?rS:rR,N="y"===v?"height":"width",x=R[v],A=x+f[M],D=x-f[O],H=d?-T[N]/2:0,G=g===rw?y[N]:T[N],k=g===rw?-T[N]:-y[N],W=t.elements.arrow,z=d&&W?rs(W):{width:0,height:0},L=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:rg(),F=L[M],P=L[O],B=rm(0,y[N],z[N]),Z=_?y[N]/2-H-B-F-w.mainAxis:G-B-F-w.mainAxis,U=_?-y[N]/2+H+B+P+w.mainAxis:k+B+P+w.mainAxis,j=t.elements.arrow&&rp(t.elements.arrow),V=j?"y"===v?j.clientTop||0:j.clientLeft||0:0,$=null!=(I=null==E?void 0:E[v])?I:0,Y=rm(d?rt(A,x+Z-$-V):A,x,d?re(D,x+U-$):D);R[v]=Y,b[v]=Y-x}if(void 0!==n&&n){var K,q,X="x"===v?"top":ry,Q="x"===v?rS:rR,J=R[S],ee="y"===S?"height":"width",et=J+f[X],eo=J-f[Q],er=-1!==["top",ry].indexOf(m),ei=null!=(q=null==E?void 0:E[S])?q:0,en=er?et:J-y[ee]-T[ee]-ei+w.altAxis,es=er?J+y[ee]+T[ee]-ei-w.altAxis:eo,ea=d&&er?(K=rm(en,J,es))>es?es:K:rm(d?en:et,J,d?es:eo);R[S]=ea,b[S]=ea-J}t.modifiersData[r]=b}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,o=e.state,r=e.name,i=e.options,n=o.elements.arrow,s=o.modifiersData.popperOffsets,a=o6(o.placement),l=rf(a),h=[ry,rR].indexOf(a)>=0?"height":"width";if(n&&s){var c,d=(c=i.padding,r_("number"!=typeof(c="function"==typeof c?c(Object.assign({},o.rects,{placement:o.placement})):c)?c:rv(c,rC))),u=rs(n),p="y"===l?"top":ry,f="y"===l?rS:rR,m=o.rects.reference[h]+o.rects.reference[l]-s[l]-o.rects.popper[h],g=s[l]-o.rects.reference[l],_=rp(n),v=_?"y"===l?_.clientHeight||0:_.clientWidth||0:0,S=d[p],R=v-u[h]-d[f],y=v/2-u[h]/2+(m/2-g/2),T=rm(S,y,R);o.modifiersData[r]=((t={})[l]=T,t.centerOffset=T-y,t)}},effect:function(e){var t=e.state,o=e.options.element,r=void 0===o?"[data-popper-arrow]":o;null==r||("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&ra(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}]}).defaultModifiers)?[]:c,p=void 0===(u=h.defaultOptions)?rY:u,function(e,t,o){void 0===o&&(o=p);var r,i,n={placement:"bottom",orderedModifiers:[],options:Object.assign({},rY,p),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],a=!1,l={state:n,setOptions:function(o){var r,i,a,c,u,f,m="function"==typeof o?o(n.options):o;h(),n.options=Object.assign({},p,n.options,m),n.scrollParents={reference:o9(e)?rP(e):e.contextElement?rP(e.contextElement):[],popper:rP(t)};var g=(i=Object.keys(r=[].concat(d,n.options.modifiers).reduce(function(e,t){var o=e[t.name];return e[t.name]=o?Object.assign({},o,t,{options:Object.assign({},o.options,t.options),data:Object.assign({},o.data,t.data)}):t,e},{})).map(function(e){return r[e]}),a=new Map,c=new Set,u=[],i.forEach(function(e){a.set(e.name,e)}),i.forEach(function(e){c.has(e.name)||function e(t){c.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!c.has(t)){var o=a.get(t);o&&e(o)}}),u.push(t)}(e)}),f=u,rO.reduce(function(e,t){return e.concat(f.filter(function(e){return e.phase===t}))},[]));return n.orderedModifiers=g.filter(function(e){return e.enabled}),n.orderedModifiers.forEach(function(e){var t=e.name,o=e.options,r=e.effect;if("function"==typeof r){var i=r({state:n,name:t,instance:l,options:void 0===o?{}:o});s.push(i||function(){})}}),l.update()},forceUpdate:function(){if(!a){var e=n.elements,t=e.reference,o=e.popper;if(rK(t,o)){n.rects={reference:(r=rp(o),i="fixed"===n.options.strategy,s=o7(r),u=o7(r)&&(c=ro((h=r.getBoundingClientRect()).width)/r.offsetWidth||1,d=ro(h.height)/r.offsetHeight||1,1!==c||1!==d),p=rc(r),f=rn(t,u,i),m={scrollLeft:0,scrollTop:0},g={x:0,y:0},(s||!s&&!i)&&(("body"!==rl(r)||rF(p))&&(m=function(e){return e!==o4(e)&&o7(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:rz(e)}(r)),o7(r)?(g=rn(r,!0),g.x+=r.clientLeft,g.y+=r.clientTop):p&&(g.x=rL(p))),{x:f.left+m.scrollLeft-g.x,y:f.top+m.scrollTop-g.y,width:f.width,height:f.height}),popper:rs(o)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach(function(e){return n.modifiersData[e.name]=Object.assign({},e.data)});for(var r,i,s,h,c,d,u,p,f,m,g,_=0;_<n.orderedModifiers.length;_++){if(!0===n.reset){n.reset=!1,_=-1;continue}var v=n.orderedModifiers[_],S=v.fn,R=v.options,y=void 0===R?{}:R,T=v.name;"function"==typeof S&&(n=S({state:n,options:y,name:T,instance:l})||n)}}}},update:(r=function(){return new Promise(function(e){l.forceUpdate(),e(n)})},function(){return i||(i=new Promise(function(e){Promise.resolve().then(function(){i=void 0,e(r())})})),i}),destroy:function(){h(),a=!0}};if(!rK(e,t))return l;function h(){s.forEach(function(e){return e()}),s=[]}return l.setOptions(o).then(function(e){!a&&o.onFirstUpdate&&o.onFirstUpdate(e)}),l}),rX=["enabled","placement","strategy","modifiers"],rQ={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>void 0},rJ={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{let{reference:t,popper:o}=e.elements;if("removeAttribute"in t){let e=(t.getAttribute("aria-describedby")||"").split(",").filter(e=>e.trim()!==o.id);e.length?t.setAttribute("aria-describedby",e.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;let{popper:o,reference:r}=e.elements,i=null==(t=o.getAttribute("role"))?void 0:t.toLowerCase();if(o.id&&"tooltip"===i&&"setAttribute"in r){let e=r.getAttribute("aria-describedby");if(e&&-1!==e.split(",").indexOf(o.id))return;r.setAttribute("aria-describedby",e?`${e},${o.id}`:o.id)}}},r0=[],r1=function(e,t,o={}){let{enabled:r=!0,placement:i="bottom",strategy:n="absolute",modifiers:s=r0}=o,a=function(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(o,rX),l=(0,A.useRef)(s),h=(0,A.useRef)(),c=(0,A.useCallback)(()=>{var e;null==(e=h.current)||e.update()},[]),d=(0,A.useCallback)(()=>{var e;null==(e=h.current)||e.forceUpdate()},[]),[u,p]=o3((0,A.useState)({placement:i,update:c,forceUpdate:d,attributes:{},styles:{popper:{},arrow:{}}})),f=(0,A.useMemo)(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:e})=>{let t={},o={};Object.keys(e.elements).forEach(r=>{t[r]=e.styles[r],o[r]=e.attributes[r]}),p({state:e,styles:t,attributes:o,update:c,forceUpdate:d,placement:e.placement})}}),[c,d,p]),m=(0,A.useMemo)(()=>(o5(l.current,s)||(l.current=s),l.current),[s]);return(0,A.useEffect)(()=>{h.current&&r&&h.current.setOptions({placement:i,strategy:n,modifiers:[...m,f,rQ]})},[n,i,f,r,m]),(0,A.useEffect)(()=>{if(r&&null!=e&&null!=t)return h.current=rq(e,t,Object.assign({},a,{placement:i,strategy:n,modifiers:[...m,rJ,f]})),()=>{null!=h.current&&(h.current.destroy(),h.current=void 0,p(e=>Object.assign({},e,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),u};var r2=!1,r5=!1;try{var r3={get passive(){return r2=!0},get once(){return r5=r2=!0}};e1&&(window.addEventListener("test",r3,r3),window.removeEventListener("test",r3,!0))}catch{}let r6=function(e,t,o,r){if(r&&"boolean"!=typeof r&&!r5){var i=r.once,n=r.capture,s=o;!r5&&i&&(s=o.__once||function e(r){this.removeEventListener(t,e,n),o.call(this,r)},o.__once=s),e.addEventListener(t,s,r2?r:n)}e.addEventListener(t,o,r)},r4=function(e,t,o,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,o,i),o.__once&&e.removeEventListener(t,o.__once,i)},r9=function(e,t,o,r){return r6(e,t,o,r),function(){r4(e,t,o,r)}};function r7(e){return e&&e.ownerDocument||document}let r8=function(e){let t=(0,A.useRef)(e);return(0,A.useEffect)(()=>{t.current=e},[e]),t};function ie(e){let t=r8(e);return(0,A.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}function it(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}var io=n(730),ir=n.n(io);let ii=()=>{},is=e=>e&&("current"in e?e.current:e),ia={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"},il=function(e,t=ii,{disabled:o,clickTrigger:r="click"}={}){let i=(0,A.useRef)(!1),n=(0,A.useRef)(!1),s=(0,A.useCallback)(t=>{let o=is(e);ir()(!!o,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),i.current=!o||!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)||0!==t.button||!!it(o,t.target)||n.current,n.current=!1},[e]),a=ie(t=>{let o=is(e);o&&it(o,t.target)?n.current=!0:n.current=!1}),l=ie(e=>{i.current||t(e)});(0,A.useEffect)(()=>{var t,i;if(o||null==e)return;let n=r7(is(e)),h=n.defaultView||window,c=null!=(t=h.event)?t:null==(i=h.parent)?void 0:i.event,d=null;ia[r]&&(d=r9(n,ia[r],a,!0));let u=r9(n,r,s,!0),p=r9(n,r,e=>{if(e===c){c=void 0;return}l(e)}),f=[];return"ontouchstart"in n.documentElement&&(f=[].slice.call(n.body.children).map(e=>r9(e,"mousemove",ii))),()=>{null==d||d(),u(),p(),f.forEach(e=>e())}},[e,o,r,s,a,l])};function ih(e){let t;if(!e||"function"==typeof e)return null;let{major:o}={major:+(t=A.version.split("."))[0],minor:+t[1],patch:+t[2]};return o>=19?e.props.ref:e.ref}let ic=()=>{},id=function(e,t,{disabled:o,clickTrigger:r}={}){let i=t||ic;il(e,i,{disabled:o,clickTrigger:r});let n=ie(e=>{("Escape"===e.code||27===e.keyCode)&&i(e)});(0,A.useEffect)(()=>{if(o||null==e)return;let t=r7(is(e)),r=(t.defaultView||window).event,i=r9(t,"keyup",e=>{if(e===r){r=void 0;return}n(e)});return()=>{i()}},[e,o,n])},iu=(0,A.createContext)(e1?window:void 0);iu.Provider;let ip=(e,t)=>e1?null==e?(t||r7()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect))?e:null:null;function im(e,t){let o=(0,A.useContext)(iu),[r,i]=(0,A.useState)(()=>ip(e,null==o?void 0:o.document));if(!r){let t=ip(e);t&&i(t)}return(0,A.useEffect)(()=>{t&&r&&t(r)},[t,r]),(0,A.useEffect)(()=>{let t=ip(e);t!==r&&i(t)},[e,r]),r}let ig=void 0!==n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,i_="u">typeof document||ig?A.useLayoutEffect:A.useEffect,iv=function({children:e,in:t,onExited:o,mountOnEnter:r,unmountOnExit:i}){let n=(0,A.useRef)(null),s=(0,A.useRef)(t),a=ie(o);(0,A.useEffect)(()=>{t?s.current=!0:a(n.current)},[t,a]);let l=o0(n,ih(e)),h=(0,A.cloneElement)(e,{ref:l});return t?h:i||!s.current&&r?null:h},iS=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"],iR=["component"],iy=A.forwardRef((e,t)=>{let{component:o}=e,r=function(e){let{onEnter:t,onEntering:o,onEntered:r,onExit:i,onExiting:n,onExited:s,addEndListener:a,children:l}=e,h=function(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(e,iS),c=(0,A.useRef)(null),d=o0(c,ih(l)),u=e=>t=>{e&&c.current&&e(c.current,t)},p=(0,A.useCallback)(u(t),[t]),f=(0,A.useCallback)(u(o),[o]),m=(0,A.useCallback)(u(r),[r]),g=(0,A.useCallback)(u(i),[i]),_=(0,A.useCallback)(u(n),[n]),v=(0,A.useCallback)(u(s),[s]),S=(0,A.useCallback)(u(a),[a]);return Object.assign({},h,{nodeRef:c},t&&{onEnter:p},o&&{onEntering:f},r&&{onEntered:m},i&&{onExit:g},n&&{onExiting:_},s&&{onExited:v},a&&{addEndListener:S},{children:"function"==typeof l?(e,t)=>l(e,Object.assign({},t,{ref:d})):(0,A.cloneElement)(l,{ref:d})})}(function(e,t){if(null==e)return{};var o={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;o[r]=e[r]}return o}(e,iR));return(0,or.jsx)(o,Object.assign({ref:t},r))});function iT({children:e,in:t,onExited:o,onEntered:r,transition:i}){let[n,s]=(0,A.useState)(!t);t&&n&&s(!1);let a=o0(function({in:e,onTransition:t}){let o=(0,A.useRef)(null),r=(0,A.useRef)(!0),i=ie(t);return i_(()=>{if(!o.current)return;let t=!1;return i({in:e,element:o.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,i]),i_(()=>(r.current=!1,()=>{r.current=!0}),[]),o}({in:!!t,onTransition:e=>{Promise.resolve(i(e)).then(()=>{e.isStale()||(e.in?null==r||r(e.element,e.initial):(s(!0),null==o||o(e.element)))},t=>{throw e.in||s(!0),t})}}),ih(e));return n&&!t?null:(0,A.cloneElement)(e,{ref:a})}let iC=A.forwardRef((t,o)=>{var r;let{flip:i,offset:n,placement:s,containerPadding:a,popperConfig:l={},transition:h,runTransition:c}=t,[d,u]=oQ(),[p,f]=oQ(),m=o0(u,o),g=im(t.container),_=im(t.target),[v,S]=(0,A.useState)(!t.show),R=r1(_,d,function({enabled:e,enableEvents:t,placement:o,flip:r,offset:i,fixed:n,containerPadding:s,arrowElement:a,popperConfig:l={}}){var h,c,d,u,p,f;let m,g=(f=l.modifiers,m={},Array.isArray(f)?(null==f||f.forEach(e=>{m[e.name]=e}),m):f||m);return Object.assign({},l,{placement:o,enabled:e,strategy:n?"fixed":l.strategy,modifiers:function(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}(Object.assign({},g,{eventListeners:{enabled:t,options:null==(h=g.eventListeners)?void 0:h.options},preventOverflow:Object.assign({},g.preventOverflow,{options:s?Object.assign({padding:s},null==(c=g.preventOverflow)?void 0:c.options):null==(d=g.preventOverflow)?void 0:d.options}),offset:{options:Object.assign({offset:i},null==(u=g.offset)?void 0:u.options)},arrow:Object.assign({},g.arrow,{enabled:!!a,options:Object.assign({},null==(p=g.arrow)?void 0:p.options,{element:a})}),flip:Object.assign({enabled:!!r},g.flip)}))})}({placement:s,enableEvents:!!t.show,containerPadding:a||5,flip:i,offset:n,arrowElement:p,popperConfig:l}));t.show&&v&&S(!1);let y=t.show||!v;if(id(d,t.onHide,{disabled:!t.rootClose||t.rootCloseDisabled,clickTrigger:t.rootCloseEvent}),!y)return null;let{onExit:T,onExiting:C,onEnter:w,onEntering:E,onEntered:b}=t,I=t.children(Object.assign({},R.attributes.popper,{style:R.styles.popper,ref:m}),{popper:R,placement:s,show:!!t.show,arrowProps:Object.assign({},R.attributes.arrow,{style:R.styles.arrow,ref:f})});return r={in:!!t.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:I,onExit:T,onExiting:C,onExited:(...e)=>{S(!0),t.onExited&&t.onExited(...e)},onEnter:w,onEntering:E,onEntered:b},I=h?(0,or.jsx)(iy,Object.assign({},r,{component:h})):c?(0,or.jsx)(iT,Object.assign({},r,{transition:c})):(0,or.jsx)(iv,Object.assign({},r)),g?e.createPortal(I,g):null});iC.displayName="Overlay";let iw=function(e){let t=(0,A.useRef)(e);return(0,A.useEffect)(()=>{t.current=e},[e]),t},iE=void 0!==n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,ib="u">typeof document||iE?A.useLayoutEffect:A.useEffect,iI=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,iM=function(e,t){return(0,A.useMemo)(()=>{let o,r;return o=iI(e),r=iI(t),e=>{o&&o(e),r&&r(e)}},[e,t])};function iO(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}let iN=A.createContext({prefixes:{},breakpoints:["xxl","xl","lg","md","sm","xs"],minBreakpoint:"xs"}),{Consumer:ix,Provider:iA}=iN;function iD(e,t){let{prefixes:o}=(0,A.useContext)(iN);return e||o[t]||t}function iH(){let{dir:e}=(0,A.useContext)(iN);return"rtl"===e}let iG=A.forwardRef(({className:e,bsPrefix:t,as:o="div",...r},i)=>(t=iD(t,"popover-header"),(0,or.jsx)(o,{ref:i,className:x()(e,t),...r})));iG.displayName="PopoverHeader";let ik=A.forwardRef(({className:e,bsPrefix:t,as:o="div",...r},i)=>(t=iD(t,"popover-body"),(0,or.jsx)(o,{ref:i,className:x()(e,t),...r})));function iW(e,t){let o=e;return"left"===e?o=t?"end":"start":"right"===e&&(o=t?"start":"end"),o}function iz(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}ik.displayName="PopoverBody",A.Component;let iL=A.forwardRef(({bsPrefix:e,placement:t="right",className:o,style:r,children:i,body:n,arrowProps:s,hasDoneInitialMeasure:a,popper:l,show:h,...c},d)=>{let u=iD(e,"popover"),p=iH(),[f]=(null==t?void 0:t.split("-"))||[],m=iW(f,p),g=r;return h&&!a&&(g={...r,...iz(null==l?void 0:l.strategy)}),(0,or.jsxs)("div",{ref:d,role:"tooltip",style:g,"x-placement":f,className:x()(o,u,f&&`bs-popover-${m}`),...c,children:[(0,or.jsx)("div",{className:"popover-arrow",...s}),n?(0,or.jsx)(ik,{children:i}):i]})});iL.displayName="Popover";let iF=Object.assign(iL,{Header:iG,Body:ik,POPPER_OFFSET:[0,8]}),iP=A.forwardRef(({bsPrefix:e,placement:t="right",className:o,style:r,children:i,arrowProps:n,hasDoneInitialMeasure:s,popper:a,show:l,...h},c)=>{e=iD(e,"tooltip");let d=iH(),[u]=(null==t?void 0:t.split("-"))||[],p=iW(u,d),f=r;return l&&!s&&(f={...r,...iz(null==a?void 0:a.strategy)}),(0,or.jsxs)("div",{ref:c,style:f,role:"tooltip","x-placement":u,className:x()(o,e,`bs-tooltip-${p}`),...h,children:[(0,or.jsx)("div",{className:"tooltip-arrow",...n}),(0,or.jsx)("div",{className:`${e}-inner`,children:i})]})});iP.displayName="Tooltip";let iB=Object.assign(iP,{TOOLTIP_OFFSET:[0,6]}),iZ=A.default.createContext(null);var iU="unmounted",ij="exited",iV="entering",i$="entered",iY="exiting",iK=function(t){function o(e,o){var r,i=t.call(this,e,o)||this,n=o&&!o.isMounting?e.enter:e.appear;return i.appearStatus=null,e.in?n?(r=ij,i.appearStatus=iV):r=i$:r=e.unmountOnExit||e.mountOnEnter?iU:ij,i.state={status:r},i.nextCallback=null,i}o.prototype=Object.create(t.prototype),o.prototype.constructor=o,eL(o,t),o.getDerivedStateFromProps=function(e,t){return e.in&&t.status===iU?{status:ij}:null};var r=o.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var o=this.state.status;this.props.in?o!==iV&&o!==i$&&(t=iV):(o===iV||o===i$)&&(t=iY)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e,t,o,r=this.props.timeout;return e=t=o=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,o=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:o}},r.updateStatus=function(t,o){if(void 0===t&&(t=!1),null!==o)if(this.cancelNextCallback(),o===iV){if(this.props.unmountOnExit||this.props.mountOnEnter){var r=this.props.nodeRef?this.props.nodeRef.current:e.findDOMNode(this);r&&r.scrollTop}this.performEnter(t)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ij&&this.setState({status:iU})},r.performEnter=function(t){var o=this,r=this.props.enter,i=this.context?this.context.isMounting:t,n=this.props.nodeRef?[i]:[e.findDOMNode(this),i],s=n[0],a=n[1],l=this.getTimeouts(),h=i?l.appear:l.enter;(t||r)&&1?(this.props.onEnter(s,a),this.safeSetState({status:iV},function(){o.props.onEntering(s,a),o.onTransitionEnd(h,function(){o.safeSetState({status:i$},function(){o.props.onEntered(s,a)})})})):this.safeSetState({status:i$},function(){o.props.onEntered(s)})},r.performExit=function(){var t=this,o=this.props.exit,r=this.getTimeouts(),i=this.props.nodeRef?void 0:e.findDOMNode(this);o?(this.props.onExit(i),this.safeSetState({status:iY},function(){t.props.onExiting(i),t.onTransitionEnd(r.exit,function(){t.safeSetState({status:ij},function(){t.props.onExited(i)})})})):this.safeSetState({status:ij},function(){t.props.onExited(i)})},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.setNextCallback=function(e){var t=this,o=!0;return this.nextCallback=function(r){o&&(o=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(t,o){this.setNextCallback(o);var r=this.props.nodeRef?this.props.nodeRef.current:e.findDOMNode(this),i=null==t&&!this.props.addEndListener;if(!r||i)return void setTimeout(this.nextCallback,0);if(this.props.addEndListener){var n=this.props.nodeRef?[this.nextCallback]:[r,this.nextCallback],s=n[0],a=n[1];this.props.addEndListener(s,a)}null!=t&&setTimeout(this.nextCallback,t)},r.render=function(){var e=this.state.status;if(e===iU)return null;var t=this.props,o=t.children,r=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,eK(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return A.default.createElement(iZ.Provider,{value:null},"function"==typeof o?o(e,r):A.default.cloneElement(A.default.Children.only(o),r))},o}(A.default.Component);function iq(){}iK.contextType=iZ,iK.propTypes={},iK.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:iq,onEntering:iq,onEntered:iq,onExit:iq,onExiting:iq,onExited:iq},iK.UNMOUNTED=iU,iK.EXITED=ij,iK.ENTERING=iV,iK.ENTERED=i$,iK.EXITING=iY;var iX=/([A-Z])/g,iQ=/^ms-/;function iJ(e){return e.replace(iX,"-$1").toLowerCase().replace(iQ,"-ms-")}var i0=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;let i1=function(e,t){var o,r,i="",n="";if("string"==typeof t){return e.style.getPropertyValue(iJ(t))||((r=r7(o=e))&&r.defaultView||window).getComputedStyle(o,void 0).getPropertyValue(iJ(t))}Object.keys(t).forEach(function(o){var r=t[o];r||0===r?o&&i0.test(o)?n+=o+"("+r+") ":i+=iJ(o)+": "+r+";":e.style.removeProperty(iJ(o))}),n&&(i+="transform: "+n+";"),e.style.cssText+=";"+i};function i2(e,t){let o=i1(e,t)||"",r=-1===o.indexOf("ms")?1e3:1;return parseFloat(o)*r}function i5(e,t){let o=i2(e,"transitionDuration"),r=i2(e,"transitionDelay"),i=function(e,t,o){null==o&&(i=-1===(r=i1(e,"transitionDuration")||"").indexOf("ms")?1e3:1,o=parseFloat(r)*i||0);var r,i,n,s,a,l=(n=!1,s=setTimeout(function(){n||function(e,t,o,r){if(void 0===o&&(o=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,o,r),e.dispatchEvent(i)}}(e,"transitionend",!0)},o+5),a=r9(e,"transitionend",function(){n=!0},{once:!0}),function(){clearTimeout(s),a()}),h=r9(e,"transitionend",t);return function(){l(),h()}}(e,o=>{o.target===e&&(i(),t(o))},o+r)}function i3(t){return t&&"setState"in t?e.findDOMNode(t):null!=t?t:null}let i6=A.default.forwardRef(({onEnter:e,onEntering:t,onEntered:o,onExit:r,onExiting:i,onExited:n,addEndListener:s,children:a,childRef:l,...h},c)=>{let d=(0,A.useRef)(null),u=iM(d,l),p=e=>{u(i3(e))},f=e=>t=>{e&&d.current&&e(d.current,t)},m=(0,A.useCallback)(f(e),[e]),g=(0,A.useCallback)(f(t),[t]),_=(0,A.useCallback)(f(o),[o]),v=(0,A.useCallback)(f(r),[r]),S=(0,A.useCallback)(f(i),[i]),R=(0,A.useCallback)(f(n),[n]),y=(0,A.useCallback)(f(s),[s]);return(0,or.jsx)(iK,{ref:c,...h,onEnter:m,onEntered:_,onEntering:g,onExit:v,onExited:R,onExiting:S,addEndListener:y,nodeRef:d,children:"function"==typeof a?(e,t)=>a(e,{...t,ref:p}):A.default.cloneElement(a,{ref:p})})});i6.displayName="TransitionWrapper";let i4={[iV]:"show",[i$]:"show"},i9=A.forwardRef(({className:e,children:t,transitionClasses:o={},onEnter:r,...i},n)=>{let s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},a=(0,A.useCallback)((e,t)=>{e.offsetHeight,null==r||r(e,t)},[r]);return(0,or.jsx)(i6,{ref:n,addEndListener:i5,...s,onEnter:a,childRef:ih(t),children:(r,i)=>A.cloneElement(t,{...i,className:x()("fade",e,t.props.className,i4[r],o[r])})})});i9.displayName="Fade";let i7=i9,i8=A.forwardRef(({children:e,transition:t=i7,popperConfig:o={},rootClose:r=!1,placement:i="top",show:n=!1,...s},a)=>{var l;let h,c,d,u,p,f=(0,A.useRef)({}),[m,g]=(0,A.useState)(null),[_,v]=(l=s.offset,h=(0,A.useRef)(null),c=iD(void 0,"popover"),d=iD(void 0,"tooltip"),u=(0,A.useMemo)(()=>({name:"offset",options:{offset:()=>{if(l)return l;if(h.current){if(iO(h.current,c))return iF.POPPER_OFFSET;if(iO(h.current,d))return iB.TOOLTIP_OFFSET}return[0,0]}}}),[l,c,d]),[h,[u]]),S=iM(a,_),R=!0===t?i7:t||void 0,y=(p=iw(e=>{g(e),null==o||null==o.onFirstUpdate||o.onFirstUpdate(e)}),(0,A.useCallback)(function(...e){return p.current&&p.current(...e)},[p]));return ib(()=>{m&&s.target&&(null==f.current.scheduleUpdate||f.current.scheduleUpdate())},[m,s.target]),(0,A.useEffect)(()=>{n||g(null)},[n]),(0,or.jsx)(iC,{...s,ref:S,popperConfig:{...o,modifiers:v.concat(o.modifiers||[]),onFirstUpdate:y},transition:R,rootClose:r,placement:i,show:n,children:(r,{arrowProps:i,popper:n,show:s})=>{var a;!function(e,t){let{ref:o}=e,{ref:r}=t;e.ref=o.__wrapped||(o.__wrapped=e=>o(i3(e))),t.ref=r.__wrapped||(r.__wrapped=e=>r(i3(e)))}(r,i);let l=null==n?void 0:n.placement,h=Object.assign(f.current,{state:null==n?void 0:n.state,scheduleUpdate:null==n?void 0:n.update,placement:l,outOfBoundaries:(null==n||null==(a=n.state)||null==(a=a.modifiersData.hide)?void 0:a.isReferenceHidden)||!1,strategy:o.strategy}),c=!!m;return"function"==typeof e?e({...r,placement:l,show:s,...!t&&s&&{className:"show"},popper:h,arrowProps:i,hasDoneInitialMeasure:c}):A.cloneElement(e,{...r,placement:l,arrowProps:i,popper:h,hasDoneInitialMeasure:c,className:x()(e.props.className,!t&&s&&"show"),style:{...e.props.style,...r.style}})}})});i8.displayName="Overlay";var ne=n(736),nt=n.n(ne);let no=0x80000000-1;function nr(e,t,o){let[r]=t,i=r.currentTarget,n=r.relatedTarget||r.nativeEvent[o];n&&n===i||it(i,n)||e(...t)}n(597),nt().oneOf(["click","hover","focus"]);let ni=({trigger:e=["hover","focus"],overlay:t,children:o,popperConfig:r={},show:i,defaultShow:n=!1,onToggle:s,delay:a,placement:l,flip:h=l&&-1!==l.indexOf("auto"),...c})=>{var d,u,p,f,m,g,_;let v,S,R,y,T,C,w=(0,A.useRef)(null),E=iM(w,ih(o)),b=(T=(v=(0,A.useRef)(!0),S=(0,A.useRef)(()=>v.current),(0,A.useEffect)(()=>(v.current=!0,()=>{v.current=!1}),[]),S.current),C=(0,A.useRef)(),_=()=>clearTimeout(C.current),(R=(0,A.useRef)(_)).current=_,y=R,(0,A.useEffect)(()=>()=>y.current(),[]),(0,A.useMemo)(()=>{let e=()=>clearTimeout(C.current);return{set:function(t,o=0){T()&&(e(),o<=no?C.current=setTimeout(t,o):function e(t,o,r){let i=r-Date.now();t.current=i<=no?setTimeout(o,i):setTimeout(()=>e(t,o,r),no)}(C,t,Date.now()+o))},clear:e,handleRef:C}},[])),I=(0,A.useRef)(""),[M,O]=(d=(0,A.useRef)(void 0!==i),p=(u=(0,A.useState)(n))[0],f=u[1],m=void 0!==i,g=d.current,d.current=m,!m&&g&&p!==n&&f(n),[m?i:p,(0,A.useCallback)(function(e){for(var t=arguments.length,o=Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];s&&s.apply(void 0,[e].concat(o)),f(e)},[s])]),N=a&&"object"==typeof a?a:{show:a,hide:a},{onFocus:x,onBlur:D,onClick:H}="function"!=typeof o?A.Children.only(o).props:{},G=(0,A.useCallback)(()=>{(b.clear(),I.current="show",N.show)?b.set(()=>{"show"===I.current&&O(!0)},N.show):O(!0)},[N.show,O,b]),k=(0,A.useCallback)(()=>{(b.clear(),I.current="hide",N.hide)?b.set(()=>{"hide"===I.current&&O(!1)},N.hide):O(!1)},[N.hide,O,b]),W=(0,A.useCallback)((...e)=>{G(),null==x||x(...e)},[G,x]),z=(0,A.useCallback)((...e)=>{k(),null==D||D(...e)},[k,D]),L=(0,A.useCallback)((...e)=>{O(!M),null==H||H(...e)},[H,O,M]),F=(0,A.useCallback)((...e)=>{nr(G,e,"fromElement")},[G]),P=(0,A.useCallback)((...e)=>{nr(k,e,"toElement")},[k]),B=null==e?[]:[].concat(e),Z={ref:e=>{E(i3(e))}};return -1!==B.indexOf("click")&&(Z.onClick=L),-1!==B.indexOf("focus")&&(Z.onFocus=W,Z.onBlur=z),-1!==B.indexOf("hover")&&(Z.onMouseOver=F,Z.onMouseOut=P),(0,or.jsxs)(or.Fragment,{children:["function"==typeof o?o(Z):(0,A.cloneElement)(o,Z),(0,or.jsx)(i8,{...c,show:M,onHide:k,flip:h,placement:l,popperConfig:r,target:w.current,children:t})]})},nn={},ns=document.createElement("canvas");ns.id="gk-graph-avatar-canvas";class na extends A.Component{image;constructor(e){super(e),this.image=new Image,this.image.crossOrigin="anonymous",this.image.onload=()=>this.refreshImage(),this.state={dataURL:void 0}}static getDerivedStateFromProps(e,t){return{dataURL:!e.url&&t.dataURL?void 0:t.dataURL}}componentDidMount(){let{url:e}=this.props;e&&this.startImgLoading(e)}componentDidUpdate(e){let{url:t}=this.props;t&&e.url!==t&&this.startImgLoading(t)}componentWillUnmount(){this.image=void 0}refreshImage(){let e;if(this.image){if(this.image.complete){let t=this.image.height,o=this.image.width,r=ns.getContext("2d");r.canvas.width=o,r.canvas.height=t,r.drawImage(this.image,0,0,o,t),e=ns.toDataURL(),nn[this.image.src]=e}this.setState({dataURL:e})}}startImgLoading(e){if(!this.image)return;let t=nn[e];t?this.setState({dataURL:t}):this.image.src=e}render(){let{avatarClassName:e,avatarStyle:t,children:o,className:r,context:i,enableTransparentBackground:n,style:s,height:a,hint:l,size:h,width:c}=this.props,{dataURL:d}=this.state,u=!d,p=u?s:{...s,...t,background:`url(${d}) center / cover no-repeat ${n?"":"var(--app__bg0, #1c1e23)"} padding-box`,height:a||h,width:c||h},f=x()(r,u?"":e,!u&&{avatar:!0}),m=u?A.createElement(A.Fragment,null,o):void 0;return A.createElement("div",{className:f,"data-test-class":d?"avatar":"local-avatar","data-vscode-context":(0,ea.DO)(i),style:p,title:l},m)}}function nl({icon:e,tooltipClassName:t,tooltipId:o,tooltipText:r}){return r&&o?A.createElement(ni,{delay:400,overlay:A.createElement(iB,{className:x()("gk-graph","bs-tooltip",t),id:o},r),placement:"top",trigger:["hover","focus"]},e||A.createElement("span",null)):A.createElement(A.Fragment,null," ",e||A.createElement("span",null)," ")}function nh({id:e,toolTipText:t,getExternalIcon:o,issueTrackerType:r}){return A.createElement(nl,{icon:o(`issue-${r}`),tooltipClassName:"wide pull-left",tooltipId:`issue-tooltip-${e}`,tooltipText:t?t.trim():""})}function nc({hostingServiceType:e,icon:t,id:o,toolTipText:r}){return A.createElement(nl,{icon:t,tooltipClassName:"wide pull-left",tooltipId:`pr-tooltip-${e}-${o}`,tooltipText:r?r.trim():""})}function nd({icon:e,type:t,upstream:o,tooltipText:r}){return A.createElement(nl,{icon:e,tooltipClassName:"wide pull-left",tooltipId:`upstream-indicator-tooltip-${t}-${o}`,tooltipText:r})}function nu({avatarClassName:e,avatarUrl:t,context:o,icon:r,tooltipText:i}){return A.createElement(nl,{icon:A.createElement("span",{className:"ref-avatar"},A.createElement(na,{avatarClassName:e??void 0,context:o,enableTransparentBackground:!0,size:14,url:t??void 0},r)),tooltipId:`remote-icon-${i||"tooltipText"}`,tooltipText:i})}var np=n(599),nf=n(366),nm=function({className:e,name:t}){return A.createElement("span",{className:x()("ref-name","truncate",e),style:{height:V.F0}},t)};let ng=A.default.forwardRef(({children:e,className:t,isRefGhost:o,isRefHidden:r,isRefActive:i,isRefPinned:n,...s},a)=>{let l=x()(t,"relative",{"display-none":!e}),h=x()("absolute top-0 bottom-0 left-0 right-0 pointer-events-none"),c=!r&&!o;return A.default.createElement("div",{...s,className:l,ref:a},c&&i&&A.default.createElement("div",{className:h,id:V.ax}),c&&n&&A.default.createElement("div",{className:h,id:V.MQ}),e)});function n_(e,t,o,r=0){let i,n,s,{annotated:a,refType:l,message:h,name:c}=t;switch(l){case ev.z.REMOTE:{n=t.hostingServiceType?`${ev.z.REMOTE}-${t.hostingServiceType}`:ev.z.REMOTE,i=t.avatarUrl;let e=`${c} (${o("Ref-Remote")})`;s=t.owner?`${t.owner} -> ${e}`:e;break}case ev.z.TAG:n=ev.z.TAG,s=`${a&&h?h:c} (${o("Ref-Tag")})`;break;case ev.z.HEAD:default:{let e=null!=t.worktreeId;n=e?ev.z.WORKTREE:ev.z.HEAD,s=`${c} (${o(e?"Ref-Worktree":"Ref-Local")})`}}let d=t.context||void 0,u=A.createElement("span",{"data-vscode-context":(0,ea.DO)(d)},e(n));return A.createElement(nu,{avatarUrl:i||"",context:d??null,icon:u,key:`ref-icon-${r}-${l}-${c}`,tooltipText:s})}ng.displayName="RefNodeAnnotationTarget";class nv extends A.PureComponent{getContextForRefGroupIfExists(e,t,o){let r,i=!1,n=!1,s=!1;for(let a of e){if(a.refType===ev.z.HEAD)return o?a.contextGroup||t:a.context;a.refType===ev.z.REMOTE&&("origin"===a.owner?(i=!0,r=o?a.contextGroup||t:a.context):i||"upstream"!==a.owner?i||n||(s=!0,r=o?a.contextGroup||t:a.context):(n=!0,r=o?a.contextGroup||t:a.context)),i||n||s||(r=o?a.contextGroup||t:a.context)}return r}getDecoratedRefIcon(e,t,o,r,i){return A.createElement("div",{className:i,"data-vscode-context":(0,ea.DO)(r),key:e,onClick:e=>this.onClickMetadata(e,o),onDoubleClick:e=>this.onDoubleClickMetadata(e,o)},t)}getPullRequestIconsAndTooltipsForRef(e,t,o){let r,{fallbackRefMetadata:i,getExternalIcon:n,onMissingRefMetadata:s,translate:a}=this.props;if(!(r=t.refType===ev.z.HEAD?t.upstream?e?.[t.upstream.id]?.[el.ki]:null:(0,ea.yb)(t,e,s,el.ki,i))||0===r.length)return null;let l=[];for(let e of r){let{context:r,hostingServiceType:i,id:s,title:h}=e;if(o.has(s))continue;o.add(s);let c={refId:t.id,type:el.ki,data:e},d=`pr-icon-${t.refType}-${t.name}-${s}`,u=this.getDecoratedRefIcon(d,n("pull-request"),c,r,x()("ref-pull-request"));l.push(A.createElement(nc,{hostingServiceType:i,icon:u,id:s,key:d,toolTipText:h&&""!==h.trim()?a("PullRequestIcon-Tooltip",s,h,(0,np.T)(i)):""}))}return l}getUpstreamIndicatorIconsAndTooltipsForRef(e,t){let{fallbackRefMetadata:o,getExternalIcon:r,onMissingRefMetadata:i,translate:n}=this.props,s=(0,ea.yb)(t,e,i,el.RA,o);if(!s||0===s.ahead&&0===s.behind)return null;let a={refId:t.id,type:el.RA,data:s},l=s.ahead>0,h=s.behind>0,c=s.context;if(l||h){let e,o,i=l?`${s.ahead>99?"99+":s.ahead}`:"",d=h?`${s.behind>99?"99+":s.behind}`:"",u=`${s.owner}/${s.name}`;h&&l?(e=n("UpstreamIndicatorIcon-BehindAndAheadTooltip",d,i,u),o="ahead-behind"):h?(e=n("UpstreamIndicatorIcon-BehindTooltip",d,u),o="behind"):(e=n("UpstreamIndicatorIcon-AheadTooltip",i,u),o="ahead");let p=A.createElement(A.Fragment,null,h?A.createElement(A.Fragment,null,A.createElement("span",{className:"ref-upstream-behind"},d),r("upstream-behind")):null,l?A.createElement(A.Fragment,null,A.createElement("span",{className:"ref-upstream-ahead"},i),r("upstream-ahead")):null);return A.createElement(nd,{icon:this.getDecoratedRefIcon(`ref-upstream-${t.id}`,p,a,c,"ref-upstream"),tooltipText:e,type:o,upstream:u})}return null}getIssueIconsAndTooltipsForRef(e,t,o){let{fallbackRefMetadata:r,getExternalIcon:i,onMissingRefMetadata:n,translate:s}=this.props,a=(0,ea.yb)(t,e,n,el.fd,r);if(!a||0===a.length)return null;let l=[];for(let e of a){if(o.has(e.id))continue;let r={refId:t.id,type:el.fd,data:e};o.add(e.id);let n=A.createElement(nh,{getExternalIcon:i,id:e.id,issueTrackerType:e.issueTrackerType,key:`issue-icon-${e.id}`,toolTipText:e.title&&""!==e.title.trim()?s("IssueIcon-Tooltip",e.displayId,e.title):""}),a=e.context||void 0;l.push(this.getDecoratedRefIcon(`ref-issue-${e.id}`,n,r,a,x()("ref-issue")))}return l}onContextMenu=e=>{let{onContextMenu:t,refGroup:o,sha:r}=this.props;t(e,o,r)};onClick=e=>{let{onClick:t,refGroup:o,sha:r}=this.props;t(e,o,r)};onClickMetadata=(e,t)=>{e.stopPropagation();let{onClick:o,refGroup:r,sha:i}=this.props;o(e,r,i,t)};onDoubleClick=e=>{let{onDoubleClick:t,refGroup:o,sha:r}=this.props;t(e,o,r)};onDoubleClickMetadata=(e,t)=>{e.stopPropagation();let{onDoubleClick:o,refGroup:r,sha:i}=this.props;o(e,r,i,t)};render(){let{className:e,enableShowHideRefsOptions:t,hasActive:o,hasRefs:r,isHidden:i,isActive:n,isGhostRef:s,isPinned:a,getExternalIcon:l,groupIsHovered:h,isInUnsupportedRebase:c,onRefBeginDrag:d,onRefDragEnter:u,onRefDragLeave:p,onRefDrop:f,onRefCanDrag:m,onRefCanDrop:g,onRefEndDrag:_,isRefGroupIncluded:v,refGroup:S,refGroupContext:R,refIconsPosition:y,refMetadata:T,onHovered:C,onHideRefClick:w,sha:E,showRemoteNamesOnRefs:b,enabledRefMetadataTypes:I,translate:M,type:O,useColumnHeaderIcons:N}=this.props,D=t&&!o&&h&&!v,H=y===ev.E.LEFT,G=y===ev.E.RIGHT,k=x()("ref-node-wrapper","flex"),W={minWidth:0,marginLeft:3,height:V.$0},z=x()("ref-node","flex","items-center","p1",{"has-active":o,"dim-ref":!r&&h,"is-active":n}),L="";S.length>0&&(L=b&&S[0].fullName||S[0].name);let F=x()({"display-none":N&&!h&&G,mr1:G}),P=A.createElement(nm,{className:F,name:L}),B=[],Z=[],U=[],j=null,$=new Set,Y=new Set;S.forEach((e,t)=>{if(B.push(n_(l,e,M,t)),I.includes(el.fd)&&(e.refType===ev.z.HEAD||e.refType===ev.z.REMOTE)){let t=this.getIssueIconsAndTooltipsForRef(T,e,Y);t&&U.push(...t)}if(I.includes(el.ki)&&e.refType===ev.z.REMOTE){let t=this.getPullRequestIconsAndTooltipsForRef(T,e,$);t&&Z.push(...t)}I.includes(el.RA)&&e.refType===ev.z.HEAD&&(j=this.getUpstreamIndicatorIconsAndTooltipsForRef(T,e))});let K=A.createElement("span",{className:x()("flex","items-center","ref-icons",{"is-active":n,"is-left-position":H})},[...B,...Z,...U]),q=n?A.createElement(nl,{icon:A.createElement("span",{className:"ref-icon-current"},l("check")),tooltipId:"ref-icon-current",tooltipText:M("Ref-Current")}):a?A.createElement(nl,{icon:A.createElement("span",{className:"ref-icon-pinned"},l("pin")),tooltipId:"ref-icon-pinned",tooltipText:M("Ref-Pinned")}):null,X=this.getContextForRefGroupIfExists(S,R),Q=this.getContextForRefGroupIfExists(S,R,!0),J=D?A.createElement("span",{className:"flex ml-auto"},A.createElement(nl,{icon:A.createElement("span",{className:x()("mr1","button"),onClick:e=>w(e,S,E)},l("hide")),tooltipId:`ref-node-toggle-visibility-btn-${L}`,tooltipText:M("Hide")})):null;return A.createElement("div",{className:x()(e,{hidden:i})},A.createElement(nf.A,{canDrag:e=>m(e),canDrop:(e,t,o)=>g(e,t,o),className:k,"data-vscode-context":(0,ea.DO)(Q),dndData:{commitType:O,isGhostRef:s,isInUnsupportedRebase:c,refGroup:S,sha:E},dndId:`DndRefNode_${S[0].id}`,onBeginDrag:(e,t)=>d(e,t),onDragEnter:(e,t,o)=>u(e,t,o),onDragLeave:(e,t,o)=>p(e,t,o),onDrop:(e,t,o)=>f(e,t,o),onEndDrag:(e,t,o)=>_(e,t,o),style:W},A.createElement("span",{className:z,"data-test-class":"ref-node-span","data-vscode-context":(0,ea.DO)(X),onContextMenu:c?void 0:this.onContextMenu,onDoubleClick:c?void 0:this.onDoubleClick,onMouseDown:this.onClick,onMouseEnter:e=>C(e,S,E),style:{minWidth:"100%"}},A.createElement(ng,{className:"ref-icon",isRefActive:n,isRefGhost:s,isRefHidden:i??!1,isRefPinned:a},q),H&&K,P,G&&K,j,J)))}}class nS extends A.Component{headIconsRef=A.createRef();containerRef=A.createRef();popoverMenuTargetRef=A.createRef();constructor(e){super(e),this.state={showPopoverMenu:!1}}onHiddenRefsClick=e=>{let{showPopoverMenu:t}=this.state;e.stopPropagation(),this.setState({showPopoverMenu:!t})};onShowRefNodes=(e,t,o)=>{this.props.onToggleRefNodesShown(e,t,o),(0,ed.xV)(this.props.excludeRefsById)||this.setState({showPopoverMenu:!0})};compareGraphRefOpts(e,t){let o=e.name.localeCompare(t.name);return 0===o&&e.type===ev.z.REMOTE?-1:o}render(){let{columnSetting:e,enableResizer:t,enableShowHideRefsOptions:o,getExternalIcon:r,graphWidth:i,graphZones:n,graphZoneType:s,excludeRefsById:a,headerZoneAction:l,includeOnlyRefsById:h,isDraggable:c,onFilterColumnClick:d,onHover:u,onResize:p,onResizeEnd:f,onResizeFromPropChange:m,onResizeStart:g,onUnhover:_,onSettingsClick:v,rowsStatsLoading:S,settingsContext:R,showRemoteNamesOnRefs:y,translate:T}=this.props,{showPopoverMenu:C}=this.state,w=(0,ea.Et)(s,n);if(!w)return null;let E=(0,ea.z)(s,n),b=w.currentWidth-V.WQ,I=`${s}-header`,M=(0,ea.uQ)(w),O=e?.isFilterable||!1,N=M&&(O||o),D=x()("columns-btn",{"small-btn":N}),H=null,G=null;if(s===V.ui){let e=Object.entries(a),t=Object.values(h),i=t.length>0,n=i&&t.some(e=>e.type===ev.z.TAG),s=e.filter(e=>e[1].type===ev.z.TAG&&(!i||!n)||!h[e[0]]);s.length>0&&(G=s.sort((e,t)=>this.compareGraphRefOpts(e[1],t[1])).map((e,t)=>{let o=e[0],i=e[1];a[o].id=o;let n={name:i.name,refType:i.type,owner:i.owner,avatarUrl:i.avatarUrl},s=(y||"*"===n.name)&&n.refType===ev.z.REMOTE?`${n.owner}/${n.name}`:n.name;return A.createElement("li",{id:o,key:o,onClick:e=>this.onShowRefNodes(e,[a[o]],!0)},n_(r,n,T,t),A.createElement("span",{className:"ml1 text-ellipsis"},s))}),H=o?A.createElement("div",{className:x()(D,"right","text-normal","button",C?"active":null),ref:this.popoverMenuTargetRef},A.createElement(nl,{icon:A.createElement("span",{onClick:this.onHiddenRefsClick},r("hide")),tooltipId:"header-ref-node-hidden-refs-btn",tooltipText:T("GraphHeader-HiddenRefs-btn")})):null)}let k=O?A.createElement("div",{className:x()(D,"columns-filter","right","fs-1",{filtering:e?.isFilterActive||!1})},A.createElement(nl,{icon:A.createElement("span",{className:"columns-filter-icon text-disabled hover-icon",id:`${s}-header-filter`,onClick:e=>d(e,s),style:{height:V.bo,marginBottom:V.Qb}},r("filter")),tooltipId:"header-columns-filter",tooltipText:T("GraphHeader-Filter")})):null,W=!M&&s===V.Sq&&S?A.createElement("span",{className:x()(D,"spinner")},r("loading")):null,z=A.createElement(i8,{container:this.containerRef.current,onHide:C?()=>{this.setState({showPopoverMenu:!1})}:void 0,placement:"bottom",rootClose:C,show:C,target:this.popoverMenuTargetRef.current},e=>A.createElement(iF,{className:x()({"is-last-header":E}),id:"opts-popover",...e},A.createElement("ul",null,G))),L=E&&v?A.createElement("div",{className:x()("columns-btn","columns-settings","right","fs-1"),"data-vscode-context":(0,ea.DO)(R)},A.createElement(nl,{icon:A.createElement("span",{className:"columns-settings-icon text-disabled hover-icon",onClick:e=>v(e,i)},r("settings")),tooltipId:"header-columns-settings",tooltipText:T("GraphHeader-EditColumns")})):null,F=this.headIconsRef?.current?.clientWidth??0,P=A.createElement("div",{className:"header-columns-icons",ref:this.headIconsRef},l,L,W,k,H),B=M?A.createElement(A.Fragment,null,A.createElement("div",{className:x()(D,"justify-start",{ml1:!N}),style:{width:b-F},title:T(w.headerLabelUntranslated)},r((0,ea.n0)(s))),P):A.createElement(A.Fragment,null,A.createElement("div",{className:"text-disabled text-ellipsis",style:{height:V.bo,overflow:"hidden",width:b-F}},A.createElement("span",{className:"fs-1 ml1 font-monospace"},T(w.headerLabelUntranslated))),P),Z=A.createElement("div",{onMouseEnter:u,onMouseLeave:_},z,B),U=x()("panel-bg0","graph-header",{"is-draggable":c,"is-last-header":E});return A.createElement("div",{className:U,id:I,key:I,ref:this.containerRef,style:{zIndex:2,transform:"translate3d(0, 0, 0)",...E?{minWidth:b}:{display:"flex",minWidth:w.currentWidth,width:w.currentWidth}}},E?Z:A.createElement(oI,{className:U,enable:t,handleStyles:{right:{right:0}},height:V.bo,id:`${s}HeaderColumn`,onResize:p?e=>p(w,e):void 0,onResizeEnd:f?e=>f(w,e):void 0,onResizeFromPropChange:m?e=>m(w,e):void 0,onResizeStart:g?e=>g(w,e):void 0,resizeContentClassName:"z1",resizeEdge:"right",resizeHandleClassName:"z2 border-right",style:{display:"flex"},translate:T,width:w.currentWidth,widthConstraints:(0,ea.qC)(s,n,i)},Z))}}class nR extends A.PureComponent{canDrag=!1;isDraggable=e=>this.canDrag&&e.props.isDraggable;isDroppable=(e,t)=>e.props.graphZoneType!==t?.props?.graphZoneType&&(!t||t.props.isDroppable);onDrop=(e,t)=>{this.props.onColumnReOrdered&&this.props.onColumnReOrdered(e.props.graphZoneType,t?t.props.graphZoneType:null)};onZoneHover=()=>{this.canDrag=!0};onZoneUnHover=()=>{this.canDrag=!1};render(){let{columnsSettings:e,dragAppendToContainer:t,enableResizer:o,enableShowHideRefsOptions:r,getExternalIcon:i,excludeRefsById:n,headerContext:s,headerZoneActions:a,includeOnlyRefsById:l,onFilterColumnClick:h,onPopupGraphHeaderContextMenu:c,onGraphZoneResize:d,onGraphZoneResizeEnd:u,onGraphZoneResizeFromPropChange:p,onSettingsClick:f,onToggleRefNodesShown:m,graphZones:g,repoPath:_,rowsStatsLoading:v,showRemoteNamesOnRefs:S,translate:R,width:y,height:T,settingsContext:C}=this.props,w=A.createElement("div",{className:"panel-bg0",style:{height:V.bo,marginBottom:V.Qb,marginLeft:-V.xY,minWidth:V.xY+V.WQ}});return A.createElement("div",{className:"graph-header flex","data-vscode-context":(0,ea.DO)(s),onContextMenu:c?e=>c(e,y):void 0,onMouseDownCapture:this.props.onMouseDownCapture,onMouseMoveCapture:this.props.onMouseMoveCapture,onMouseUpCapture:this.props.onMouseUpCapture,onWheelCapture:this.props.onWheel,style:{height:V.bo,marginBottom:V.Qb}},w,A.createElement(oX,{className:"flex",direction:"horizontal",isDraggable:this.isDraggable,isDroppable:this.isDroppable,mirrorContainer:t,onDrop:this.onDrop},g.map(t=>A.createElement(nS,{columnSetting:e[t.type],enableResizer:o,enableShowHideRefsOptions:r,excludeRefsById:n,getExternalIcon:i,graphHeight:T,graphWidth:y,graphZones:g,graphZoneType:t.type,headerZoneAction:a?.[t.type],id:`${t.type}Header`,includeOnlyRefsById:l,isDraggable:t.isCustomizable,isDroppable:t.isCustomizable,key:`${t.type}Header`,onFilterColumnClick:h,onHover:this.onZoneHover,onResize:d,onResizeEnd:u,onResizeFromPropChange:p,onSettingsClick:f,onToggleRefNodesShown:m,onUnhover:this.onZoneUnHover,repoPath:_,rowsStatsLoading:v,settingsContext:C,showRemoteNamesOnRefs:S,translate:R}))))}}var ny=n(484);let nT=/[^a-zA-Z0-9_\--]/g,nC=new Map,nw=new Map;function nE(e){return e.replace(nT,e=>`\\${e}`)}function nb(e){let t=nC.get(e);if(null!=t)return t;let o=`--row-${nE(e)}`;return nC.set(e,o),o}function nI(e){let t=nw.get(e);if(null!=t)return t;let o=`--row-adornment-${nE(e)}`;return nw.set(e,o),o}var nM=function({sha:e,content:t,isHovered:o,isSelected:r}){if(null==t)return null;let i=x()("row-adornment-overlay",{"is-selected":r,"is-hovered":!r&&o}),n={positionAnchor:nb(e),anchorName:nI(e)};return A.createElement("div",{className:i,"data-sha":e,style:n},t)};class nO extends A.Component{adornments=new Map;pendingResolves=new Map;provideAbortController;resolveIdCounter=0;state={cacheVersion:0};componentDidMount(){this.setupProvider()}componentDidUpdate(e){if(e.provider!==this.props.provider&&(this.teardownProvider(e.provider),this.setupProvider()),this.adornments.size){let e=this.props.getVisibleRows();this.evictDistantAdornments(e)}}componentWillUnmount(){this.teardownProvider(this.props.provider)}setupProvider(){this.props.provider.invalidate?.addEventListener(ny.e.type,this.onInvalidate)}teardownProvider(e){this.provideAbortController?.abort(),this.provideAbortController=void 0,this.pendingResolves.clear(),this.adornments.clear(),e.invalidate?.removeEventListener(ny.e.type,this.onInvalidate)}onInvalidate=e=>{let{shas:t,type:o}=e.detail;if("all"===o)if(t)for(let e of t)this.adornments.delete(e);else this.adornments.clear();else if(t)for(let e of t){let t=this.adornments.get(e);t&&(t.content=void 0)}else for(let e of this.adornments.values())e.content=void 0;this.setState(e=>({cacheVersion:e.cacheVersion+1}))};provideForVisibleRows(e){let{provider:t}=this.props,o=e.filter(e=>!this.adornments.has(e.sha));if(!o.length)return;this.provideAbortController?.abort(),this.provideAbortController=new AbortController;let r=this.provideAbortController.signal,i=t.provideAdornments(o,r);i instanceof Promise?i.then(e=>{r.aborted||(this.applyProvideResults(e),this.setState(e=>({cacheVersion:e.cacheVersion+1})))}).catch(()=>{}):this.applyProvideResults(i)}applyProvideResults(e){for(let[t,o]of Object.entries(e))this.adornments.set(t,{visibility:o.visibility??!0,dynamic:o.dynamic??!1,context:o.context,content:void 0,contentStateKey:void 0})}evictDistantAdornments(e,t=100){let{allRows:o}=this.props;if(0===e.length||0===this.adornments.size)return;let r=e.map(e=>e.rowIndex??-1).filter(e=>e>=0);if(0===r.length)return;let i=Math.min(...r),n=Math.max(...r),s=new Set,a=Math.max(0,i-t),l=Math.min(o.length-1,n+t);for(let e=a;e<=l;e++){let t=o[e];t&&s.add(t.sha)}for(let e of this.adornments.keys())s.has(e)||(this.adornments.delete(e),this.pendingResolves.delete(e))}shouldShowAdornment(e,t){if(!0===e)return!0;for(let o of e)if("hover"===o&&t.isHovered||"focus"===o&&t.isFocused||"selected"===o&&t.isSelected)return!0;return!1}stateKey(e){return`${e.isHovered?"h":""}${e.isFocused?"f":""}${e.isSelected?"s":""}`}getOrResolveContent(e,t){let{provider:o}=this.props,r=this.adornments.get(e.sha);if(!r)return;let i="interaction"===r.dynamic?this.stateKey(t):"";if(void 0!==r.content&&!0!==r.dynamic&&r.contentStateKey===i)return r.content;let n=o.resolveAdornment(e,r.context,t);if(n instanceof Promise){let t=++this.resolveIdCounter;return this.pendingResolves.set(e.sha,t),n.then(o=>{this.pendingResolves.get(e.sha)===t&&(this.pendingResolves.delete(e.sha),!0!==r.dynamic&&(r.content=o,r.contentStateKey=i),this.setState(e=>({cacheVersion:e.cacheVersion+1})))}).catch(()=>{this.pendingResolves.delete(e.sha)}),r.content??void 0}return!0!==r.dynamic&&(r.content=n,r.contentStateKey=i),n}render(){let{getVisibleRows:e,selectedShas:t,hoveredSha:o,focusedSha:r}=this.props,i=e();this.provideForVisibleRows(i);let n=[];for(let e of i){let i=this.adornments.get(e.sha);if(!i)continue;let s={isHovered:o===e.sha,isFocused:r===e.sha,isSelected:t.has(e.sha)};if(!this.shouldShowAdornment(i.visibility,s))continue;let a=this.getOrResolveContent(e,s);null!=a&&n.push(A.createElement(nM,{content:a,isHovered:s.isHovered,isSelected:s.isSelected,key:e.sha,sha:e.sha}))}if(!n.length)return null;let{hasVerticalScrollbar:s}=this.props;return A.createElement("div",{className:s?"row-adornment-overlay-container has-scrollbar":"row-adornment-overlay-container"},n)}}var nN=n(83);class nx extends A.Component{render(){let{fileDiffType:e,getExternalIcon:t,translate:o,noMargin:r}=this.props;if(!e)return null;let i=(e=>{switch(e){case nN.g.ADDED:return"added";case nN.g.MODIFIED:return"modified";case nN.g.DELETED:return"deleted";case nN.g.RENAMED:return"renamed";default:return null}})(e),n=(e=>{switch(e){case nN.g.ADDED:return"color-green";case nN.g.MODIFIED:return"color-orange";case nN.g.DELETED:return"color-red";case nN.g.RENAMED:return"color-blue";default:return null}})(e),s=(e=>{switch(e){case nN.g.ADDED:return"CommitDiffSection-FileAdded";case nN.g.MODIFIED:return"CommitDiffSection-FileModified";case nN.g.DELETED:return"CommitDiffSection-FileDeleted";case nN.g.RENAMED:return"CommitDiffSection-FileRenamed";default:return null}})(e),a=x()("fs-1",n,{mr1:!r});return A.createElement("span",{className:a,title:o(s)},i&&t(i))}}var nA=function({workDirStats:e,getExternalIcon:t,translate:o}){let{added:r,deleted:i,modified:n}=e,{g:s}=nN;if(!r&&!i&&!n){let e=o("WipStatsPill-NoChanges");return A.createElement("span",{"aria-label":e,className:"wip-stats-pill wip-stats-pill--clean",title:e},A.createElement("span",{"aria-hidden":"true",className:"wip-stats-pill__check"},"✓"))}return A.createElement("span",{className:"wip-stats-pill"},r>0&&A.createElement("span",{className:"wip-stats-pill__item wip-stats-pill__item--added"},A.createElement(nx,{fileDiffType:s.ADDED,getExternalIcon:t,noMargin:!0,style:{},translate:o}),A.createElement("span",{className:"wip-stats-pill__count"},r)),n>0&&A.createElement("span",{className:"wip-stats-pill__item wip-stats-pill__item--modified"},A.createElement(nx,{fileDiffType:s.MODIFIED,getExternalIcon:t,noMargin:!0,style:{},translate:o}),A.createElement("span",{className:"wip-stats-pill__count"},n)),i>0&&A.createElement("span",{className:"wip-stats-pill__item wip-stats-pill__item--deleted"},A.createElement(nx,{fileDiffType:s.DELETED,getExternalIcon:t,noMargin:!0,style:{},translate:o}),A.createElement("span",{className:"wip-stats-pill__count"},i)))},nD=function({sha:e,workDirStats:t,getExternalIcon:o,translate:r,isHovered:i,isSelected:n}){let s=x()("wip-stats-pill-overlay",{"is-selected":n,"is-hovered":!n&&i}),a={positionAnchor:nb(e),right:`anchor(${nI(e)} left, var(--wip-stats-pill-overlay-fallback-right))`};return A.createElement("div",{className:s,"data-sha":e,style:a},A.createElement(nA,{getExternalIcon:o,translate:r,workDirStats:t}))},nH=function({getVisibleRows:e,selectedShas:t,hoveredSha:o,hasVerticalScrollbar:r,workDirStats:i,wipNodeMetadataBySha:n,wipMessageEditable:s,getExternalIcon:a,translate:l}){let h=e(),c=[];for(let e of h){if(e.type!==L.bY)continue;let{effectiveWorkDirStats:r,isWipEditable:h,customWipContent:d}=eu(e.sha,e.type,i,n,s);h||d||!r||c.push(A.createElement(nD,{getExternalIcon:a,isHovered:o===e.sha,isSelected:t.has(e.sha),key:e.sha,sha:e.sha,translate:l,workDirStats:r}))}return c.length?A.createElement("div",{className:x()("wip-stats-pill-overlay-container",{"has-scrollbar":r})},c):null};function nG(e){let{constraints:{max:t,min:o},stats:{files:r,additions:i,deletions:n},getExternalIcon:s,isLastColumn:a,isRowSelected:l,verticalScrollWidth:h,zoneWidth:c}=e,d=i+n,u=Math.max(o,Math.min(t,d)),p=a?h+V.KA:V.KA;d<=u&&(p+=V.KA);let f=Math.max(V.MT,u/t*(c-52-p));return A.createElement("div",{className:x()("changes-zone",l?"selected":null)},A.createElement("span",{className:"changes-files",style:{width:52}},A.createElement("span",{className:"mr1"},s("files")),A.createElement("span",{className:"mr1"},r>999?"999+":r)),A.createElement("span",{className:"changes-bar",style:{width:f}},i?A.createElement("div",{className:"changes-sub-bar added",style:{width:i/d*f}}):null,n?A.createElement("div",{className:"changes-sub-bar deleted",style:{width:n/d*f}}):null))}let nk=A.createElement("div",{className:"color-strip height-100",style:{width:2}}),nW={},nz={};class nL extends A.PureComponent{render(){let e,t,{clearCurrentlyHoveredGraphCommit:o,children:r,column:i,columnForColoring:n,context:s,currentlyHoveredCommitSha:a,dimRowsOfSelectedCommit:l,getExternalIcon:h,graphZoneType:c,hasActive:d,hasAvatars:u,highlightRowsOnRefHover:p,isDimmedMergeCommitRow:f,isHighlighted:m,isHovering:g,isLastColumn:_,isInUnsupportedRebase:v,isMissingHoveredRefGroup:S,isSelected:R,numGraphColumns:y,onContextMenu:T,onClickCommit:C,onDoubleClickCommit:w,rowContext:E,scopeBoundaryKind:b,sha:I,showColorStrip:M,showConflictIcon:O,showTimeline:N,setAsCurrentlyHoveredGraphCommit:D,style:H,title:G,type:k,verticalScrollWidth:W,zoneWidth:z}=this.props,L=((t=nW[e=k+g.toString()])||(t=x()("graph-row-wrapper","grow-3","height-100","graph-zone-column","min-width-0","pb3","pointer","pt3","relative",k,{"is-hovering":g}),nW[e]=t),t),F=function(e,t,o,r,i,n=!1,s=!1,a=!1,l=!1,h,c=!1){let d=`${e}${t}${r}${o}${n}${s}${a}${l}${i}${h??""}${c}`,u=nz[d];return u||(u=x()(`column-${t%i+1}`,"graph-row","height-100-percent","flex",e,{"is-selected":r},{"is-highlighted":o},{"dimmed-row":l&&!o||n&&(s||a)},{"scope-fork-point":"forkPoint"===h,"scope-merge-target":"mergeTarget"===h},{"has-active":c}),nz[d]=u),u}(k,n??i,m,R,y,S,p,l,f,b,d),P=N?A.createElement(oA,null):null,B=_?{anchorName:nb(I)}:void 0;return A.createElement("div",{className:L,"data-vscode-context":(0,ea.DO)(E),onContextMenu:v?void 0:e=>T(e,c,I),onDoubleClick:e=>w(e,c,I),onMouseDown:e=>C(e,c,I),onMouseEnter:e=>D(e,c,I,a??void 0),onMouseLeave:e=>o(e,c,I,a??void 0),style:{...H,...B}},P,A.createElement("div",{className:F,"data-vscode-context":(0,ea.DO)(s)},M?nk:null,O?A.createElement("span",{className:x()("ml2")},h("warning")):null,A.createElement("span",{className:x()("graph-zone","width-100","flex-1"),style:{lineHeight:`${V.$0}px`,..._&&{width:z-W},...u&&{marginLeft:5}},title:G??void 0},r)))}}function nF(e){let t=(e||"").trim().toUpperCase();if(0===t.length)return"?";let o=t.split(" ");return 1===o.length?o[0][0]:o.length>1?o[0][0]+o[o.length-1][0]:"?"}function nP(e,t){return e&&t?`${e} <${t}>`:e||t||""}class nB extends A.Component{constructor(e){super(e),this.state={tooltipText:""}}getDefaultAvatar=(e,t,o)=>{var r;let{authorInitials:i,column:n,context:s,cssVariables:a,style:l,fontSize:h,minWidth:c,size:d,title:u=""}=this.props,p=void 0!==n&&a[(0,P.$6)(n)]||V.BP,f=("hsla"===(r=z(p.trim())).type&&(r=k(r)),(299*r.r+587*r.g+114*r.b)/1e3<128)?"#FFFFFF":"#000000",m={alignItems:"center",backgroundColor:p,backgroundSize:d,color:f,display:"flex",fontSize:`${h}px`,fontWeight:"bold",height:e,justifyContent:"center",minWidth:c,top:o,width:t,...l};return A.createElement("div",{className:this.getAvatarClassName(),"data-vscode-context":(0,ea.DO)(s),style:m,title:u},i?i.toUpperCase():"")};ensureTooltipText=()=>{let{tooltip:e}=this.props;this.setState({tooltipText:"function"==typeof e?e():e})};getAvatarClassName(){return x()("avatar","gravatar","rad2",this.props.className)}render(){let{tooltipText:e}=this.state,{avatarUrl:t,context:o,style:r,height:i,minWidth:n,size:s,title:a="",tooltip:l,top:h,useAuthorInitialsForAvatars:c,width:d}=this.props,u=i||s,p=d||s,f=h||V.lH/2-u/2,m={top:f,minWidth:n,...r},g=this.getDefaultAvatar(u,p,f),_=c?g:A.createElement("span",null,A.createElement(na,{avatarClassName:this.getAvatarClassName(),avatarStyle:m,context:o,height:u,hint:a,size:s,url:t??void 0,width:p},this.getDefaultAvatar(u,p,f)));return l?A.createElement(ni,{delay:250,onEnter:this.ensureTooltipText,overlay:A.createElement(iB,{className:"gk-graph",id:"graph-gravatar-tooltip"},e),placement:"top",trigger:["hover","focus"]},_):_}}let nZ={type:nt().string,tooltip:nt().bool,as:nt().elementType},nU=A.forwardRef(({as:e="div",className:t,type:o="valid",tooltip:r=!1,...i},n)=>(0,or.jsx)(e,{...i,ref:n,className:x()(t,`${o}-${r?"tooltip":"feedback"}`)}));nU.displayName="Feedback",nU.propTypes=nZ;let nj=A.createContext({}),nV=A.forwardRef(({bsPrefix:e,type:t,size:o,htmlSize:r,id:i,className:n,isValid:s=!1,isInvalid:a=!1,plaintext:l,readOnly:h,as:c="input",...d},u)=>{let{controlId:p}=(0,A.useContext)(nj);return e=iD(e,"form-control"),(0,or.jsx)(c,{...d,type:t,size:r,ref:u,readOnly:h,id:i||p,className:x()(n,l?`${e}-plaintext`:e,o&&`${e}-${o}`,"color"===t&&`${e}-color`,s&&"is-valid",a&&"is-invalid")})});nV.displayName="FormControl";let n$=Object.assign(nV,{Feedback:nU});class nY extends A.Component{textWidthRef=A.createRef();wrapperRef=A.createRef();static defaultProps={style:{},value:""};componentDidMount(){this.wrapperRef?.current&&(this.wrapperRef.current.style.width="0px")}componentDidUpdate(){this.textWidthRef?.current&&this.wrapperRef?.current&&(this.wrapperRef.current.style.width=`${Number(this.textWidthRef.current.offsetWidth)+35}px`)}componentWillUnmount(){this.props.onBlur&&this.props.onBlur()}onWipKeyDown(e){e.stopPropagation()}render(){let{clearCurrentlyHoveredGraphCommit:e,currentlyHoveredCommitSha:t,getExternalIcon:o,graphZoneType:r,isCommitting:i,isHovering:n,isSelected:s,onBlur:a,onClickCommit:l,onContextMenu:h,onFocus:c,onMessageChange:d,setAsCurrentlyHoveredGraphCommit:u,sha:p,style:f,translate:m,value:g,workDirStats:_}=this.props,v=x()("graph-zone-column","pt3","pb3","pointer","height-100-percent","grow-3","graph-row-wrapper",L.bY,{"is-hovering":n}),S=x()("column-1","graph-row","flex",{"is-selected":s}),R=A.createElement(nA,{getExternalIcon:o,translate:m,workDirStats:_}),y=A.createElement("div",{className:"work-dir-input",ref:this.wrapperRef},A.createElement(n$,{"data-test-class":"work-dir-input-field",disabled:i,onBlur:e=>a(e),onChange:e=>d(e.target.value),onContextMenu:e=>h(e,r,p),onFocus:e=>c(e),onKeyDown:e=>this.onWipKeyDown(e),placeholder:m("WorkDirMessageInput-WIPPlaceholder"),type:"text",value:g}),A.createElement("div",{className:"text-width","data-test-class":"work-dir-input-message",ref:this.textWidthRef},g));return A.createElement("div",{className:v,onMouseEnter:e=>u(e,r,p,t??void 0),onMouseLeave:o=>e(o,r,p,t??void 0),style:f},A.createElement("div",{className:S,"data-test-class":"work-dir-message-row-div",onMouseDown:e=>l(e,r,p),style:{position:"relative",width:"100%"}},y,R))}}function nK({hasRefs:e,isActiveSha:t,left:o,type:r,width:i}){let n=x()("ref-line","z4",{"is-active":t});return e&&[L.oB,L.t$,L.l2].includes(r)?A.createElement("hr",{className:n,style:{left:o,width:i}}):null}function nq({graphZoneModeConstants:{RADIUS_DIFF_MERGE_NODE_COMMIT_NODE:e},hasRefs:t,isActiveSha:o,nodeOffset:r,type:i}){return A.createElement(nK,{hasRefs:t,isActiveSha:o,left:0,type:i,width:r+(i===L.t$?e:0)})}function nX({className:e,marginLeft:t}){return A.createElement("div",{className:x()("app-bg0","absolute","left-0","right-0","bottom-0","top-0","pt3","pb3",e),style:{marginLeft:t}},A.createElement("div",{className:"commit-bg-color height-100-percent width-100-percent"}))}function nQ({column:e,graphZoneModeConstants:{COMMIT_COLUMN_WIDTH:t,COMMIT_NODE_DIAMETER:o,COMMIT_ZONE_GUTTER_WIDTH:r}}){return A.createElement(nX,{className:"z1",marginLeft:r+t*e+o/2})}function nJ(){return A.createElement(nX,{marginLeft:0})}let n0=(e,t,o,r,i,n,s=!1)=>{let a={height:n.COMMIT_MERGE_NODE_DIAMETER,left:o+n.COMMIT_MERGE_NODE_LEFT_OFFSET,marginTop:n.COMMIT_MERGE_NODE_TOP_OFFSET,opacity:r,width:n.COMMIT_MERGE_NODE_DIAMETER},l=x()("node",i,"z6"),h=A.createElement(iB,{className:"gk-graph",id:"graph-merge-node-tooltip"},nP(t,e)),c=A.createElement("div",{className:l,"data-test-class":"tree-row-commit-node",style:a});return s?c:A.createElement(ni,{delay:250,overlay:h,placement:"top",trigger:["hover","focus"]},c)};class n1 extends A.PureComponent{render(){let{authorEmail:e,authorName:t,getExternalIcon:o,graphZoneModeConstants:r,left:i,opacity:n,suppressNonRefRowTooltips:s,translate:a,type:l}=this.props;return(t||e)&&l===L.oB?r.IS_COMPACT?n0(e,t,i,n,L.t$,r,s):(({authorEmail:e,authorInitials:t,authorName:o,avatarUrl:r,column:i,context:n,cssVariables:s,graphZoneModeConstants:a,left:l,message:h,opacity:c,suppressNonRefRowTooltips:d,type:u,useAuthorInitialsForAvatars:p})=>A.createElement(nB,{authorInitials:t,avatarUrl:r,className:x()("node",u,"z6"),column:i,context:n,cssVariables:s,fontSize:10,height:a.COMMIT_NODE_DIAMETER,size:a.COMMIT_ZONE_AVATAR_DIAMETER,style:{left:l,opacity:c},tooltip:d?void 0:()=>{let t=o&&""!==o.trim()&&"Unknown"!==o?nP(o,e):e,r=X(K(h||"")),i="";if(0===r.length)i=t;else{r.unshift({email:e,name:o});for(let e=0;e<r.length;e+=1){let t=r[e];i+=nP(t.name,t.email),e<r.length-1&&(i+=", ")}}return i},top:a.COMMIT_NODE_TOP_OFFSET,useAuthorInitialsForAvatars:p,width:a.COMMIT_NODE_DIAMETER}))(this.props):l===L.t$||l===L.l2||l===L.gL?n0(e,t,i,n,l,r,s):((e,t,o,r,i,n,s,a=!1,l,h=!1)=>{let c,d={height:l.COMMIT_NODE_DIAMETER,left:r,marginTop:l.COMMIT_NODE_TOP_OFFSET,opacity:i,width:l.COMMIT_NODE_DIAMETER};a&&(d.borderWidth=1);let u=x()("gk-graph","node",s,"z6",{compact:a});c=s===L.OZ?n("Stash"):s===L.bY?n("Graph-WorkInProgress"):nP(o,t);let p=A.createElement("div",{className:u,"data-test-class":"tree-row-commit-node",style:d},s!==L.OZ||a?null:A.createElement("span",null,e("stash"))),f=A.createElement(iB,{className:"gk-graph",id:"graph-other-node-tooltip"},c);return h?p:A.createElement(ni,{delay:250,overlay:f,placement:"top",trigger:["hover","focus"]},p)})(o,e,t,i,n,a,l,r.IS_COMPACT,r,s)}}class n2 extends A.Component{render(){let{columnColorByColumn:e,edgeColumnMax:t,edges:o,nodeColumn:r,graphZoneModeConstants:{COMMIT_COLUMN_WIDTH:i,COMMIT_ZONE_GUTTER_WIDTH:n,COMMIT_ZONE_LINE_WIDTH:s,IS_COMPACT:a}}=this.props,l=function(e,t,o,r,i,n,s,a){let l=function(e,t,o,r){let i="";for(let n=0;n<=t;n++){let{passThrough:t,starting:s,ending:a}=e[n]??{};i=`${i}_${ei(n,o,s?.type,r)}_${ei(n,o,a?.type,r)}_${en(n,t?.type,r)}`}return i}(e,t,o,a),h=eN[l];if(h)return h;let c="";for(let l=0;l<=t;l+=1){let t=e[l];if(!t)continue;let{passThrough:h,starting:d,ending:u}=t;c+=d?function(e,t,o,r,i,n,s,a){var l,h;let c,d,u,p,f,m,g=ei(e,t,o,a),_=eO[g];return _?_:(_=t===e?(l=r[e],c=er(o,l,s,a),c.x1=d=J(t,i,n,a),c.x2=d,c.y1=c.strokeDasharray?V.kU/2+V.kj:V.kU/2,c.y2=V.kU,eo(c)):(h=r[e],u=er(o,h,s,a),p=t<e?-V.nf:V.nf,(f={...u}).x1=J(e,i,n,a),f.x2=J(e,i,n,a),f.y1=V.kU-V.kj,f.y2=V.kU,(m={...u}).x1=J(e,i,n,a)+p,m.x2=J(t,i,n,a),m.y1=V.kU/2,m.y2=V.kU/2,`<g>${eb(h,t<e?180:270,270*(t<e),o,J(e,i,n,a)+p,V.kU-V.kj,s,a)}${eo(f)}${eo(m)}</g>`),eO[g]=_,_)}(l,o,d.type,r,i,n,s,a):"",c+=h?function(e,t,o,r,i,n,s){let a=en(e,t,s),l=eM[a];if(l)return l;let h=J(e,r,i,s),c=er(t,o[e],n,s);return c.x1=h,c.x2=h,c.y1=0,c.y2=V.kU,l=eo(c),eM[a]=l,l}(l,h.type,r,i,n,s,a):"",c+=u?function(e,t,o,r,i,n,s,a){var l,h;let c,d,u,p,f,m,g=ei(e,t,o,a),_=eI[g];return _?_:(_=t===e?(l=r[e],c=er(o,l,s,a),c.x1=d=J(t,i,n,a),c.x2=d,c.y1=0,c.y2=c.strokeDasharray?V.kU/2-V._b:V.kU/2,eo(c)):(h=r[e],u=er(o,h,s,a),p=t<e?-V.nf:V.nf,(f={...u}).x1=J(e,i,n,a),f.x2=J(e,i,n,a),f.y1=0,f.y2=V._b,(m={...u}).x1=J(e,i,n,a)+p,m.x2=J(t,i,n,a),m.y1=V.kU/2,m.y2=V.kU/2,`<g>${eo(f)}${eb(h,t>e?0:90,t>e?90:180,o,J(e,i,n,a)+p,V._b,s,a)}${eo(m)}</g>`),eI[g]=_,_)}(l,o,u.type,r,i,n,s,a):""}let d=`<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><g>${c}</g></svg>`.replace(/%/g,"%25");return h=`url('data:image/svg+xml;charset=UTF-8,${d}')`,eN[l]=h,h}(o,t,r,e,i,n,s,a);return A.createElement("div",{className:"absolute top-0 right-0 bottom-0 left-0 z2",style:{background:l}})}}function n5({boxShadowAlpha:e,boxShadowLeft:t,children:o,className:r="",left:i,width:n}){return A.createElement("div",{className:x()("absolute","top-0","bottom-0","z3",r),style:{boxShadow:`${t}px 5px 10px rgba(0, 0, 0, ${e})`,left:i,width:n}},o)}function n3({boxShadowAlpha:e,hasTimeline:t,scrollLeft:o,width:r}){return A.createElement(n5,{boxShadowAlpha:e,boxShadowLeft:5,className:"app-bg0 left-0",left:o,width:r},t?A.createElement(oA,{z2:!0}):null)}function n6({boxShadowAlpha:e,commitZoneWidth:t,hasTimeline:o,scrollLeft:r,width:i}){return A.createElement(n5,{boxShadowAlpha:e,boxShadowLeft:-5,left:r+t-i,width:i},o?A.createElement(oA,{z2:!0}):null,A.createElement(nJ,null))}class n4 extends A.PureComponent{render(){let{authorEmail:e,authorName:t,avatarContext:o,avatarUrl:r,clearCurrentlyHoveredGraphCommit:i,column:n,columnColorByColumn:s,columnForColoring:a,commitZoneWidth:l,cssVariables:h,currentlyHoveredCommitSha:c,edgeColumnMax:d,edges:u,hasRefs:p,hasTimeline:f,getExternalIcon:m,graphZoneModeConstants:g,isActiveSha:_,isInUnsupportedRebase:v,isLastColumn:S,isSelected:R,leftGutterBoxShadowAlpha:y,leftGutterWidth:T,message:C,nodeOffset:w,nodeOpacity:E,numGraphColumns:b,onContextMenu:I,onClickCommit:M,onDoubleClickCommit:O,rightGutterBoxShadowAlpha:N,rightGutterWidth:D,rowContext:H,scopeBoundaryKind:G,scrollLeft:k,setAsCurrentlyHoveredGraphCommit:W,sha:z,shouldShowRefLine:L,suppressNonRefRowTooltips:F,style:P,translate:B,type:Z,useAuthorInitialsForAvatars:U,zoneContext:j}=this.props,$=(a??n)%b+1,Y=x()("relative","commit-zone","height-100-percent","pt3",Z,`column-${$}`,{"is-selected":R,"has-active":_,"scope-fork-point":"forkPoint"===G,"scope-merge-target":"mergeTarget"===G}),K=f?A.createElement(oA,{z2:!0}):null,q=A.createElement("div",{className:Y,"data-vscode-context":(0,ea.DO)(j),onContextMenu:v?void 0:e=>I(e,V.md,z),onDoubleClick:e=>O(e,V.md,z),onMouseDown:e=>M(e,V.md,z),onMouseEnter:e=>W(e,V.md,z,c),onMouseLeave:e=>i(e,V.md,z,c),style:{...P,...S&&{width:"100%"}}},K,A.createElement(n3,{boxShadowAlpha:y,hasTimeline:f,scrollLeft:k,width:T}),L?A.createElement(nq,{graphZoneModeConstants:g,hasRefs:p,isActiveSha:_,nodeOffset:w,type:Z}):null,A.createElement(n1,{authorEmail:e,authorInitials:nF(t),authorName:t,avatarUrl:r,column:n,context:o,cssVariables:h,getExternalIcon:m,graphZoneModeConstants:g,left:w,message:C,opacity:E,suppressNonRefRowTooltips:F,translate:B,type:Z,useAuthorInitialsForAvatars:U}),A.createElement(nQ,{column:n,graphZoneModeConstants:g}),A.createElement(n2,{columnColorByColumn:s,edgeColumnMax:d,edges:u,graphZoneModeConstants:g,nodeColumn:n}),A.createElement(n6,{boxShadowAlpha:N,commitZoneWidth:l,hasTimeline:f,scrollLeft:k,width:D}));return H?A.createElement("div",{"data-vscode-context":(0,ea.DO)(H)},q):q}}var n9=function(e,t){let{avatarUrlByEmail:o,onMissingAvatar:r,clearCurrentlyHoveredGraphCommit:i,columnColorByColumn:n,cssVariables:s,currentlyHoveredCommitSha:a,processedRows:l,wipNodeMetadataBySha:h,getExternalIcon:c,graphZoneModeConstants:d,isInUnsupportedRebase:u,leftGutterBoxShadowAlpha:p,leftGutterWidth:f,onCommitContextMenu:m,onClickCommit:g,onDoubleClickCommit:_,nodeOffsetByColumn:v,nodeOpacityByColumn:S,numGraphColumns:R,rightGutterBoxShadowAlpha:y,rightGutterWidth:T,setAsCurrentlyHoveredGraphCommit:C,scrollLeft:w,shouldShowRefLine:E,suppressNonRefRowTooltips:b,translate:I,useAuthorInitialsForAvatars:M}=e,O=new ea.n$(e);return({rowIndex:e,style:N})=>{let x,D=t(e),H=l[e],G=V.md,k=O.getZoneWidth(G),{email:W,author:z,contexts:F,message:P,sha:B,type:Z}=H,U=H.column,j=F?.graph||void 0,$=F?.avatar||void 0,Y=F?.row||void 0;!M&&((x=o[W])||r(W,B));let K=Z===L.bY?h?.[B]:void 0;K?.nodeAvatarUrl&&(x=K.nodeAvatarUrl);let q=O.isLastColumn(G);return A.createElement(n4,{authorEmail:W,authorName:z,avatarContext:$,avatarUrl:x,clearCurrentlyHoveredGraphCommit:i,column:U,columnColorByColumn:n,columnForColoring:H.columnForColoring,commitZoneWidth:k,cssVariables:s,currentlyHoveredCommitSha:a,edgeColumnMax:H.edgeColumnMaxes,edges:H.edges,getExternalIcon:c,graphZoneModeConstants:d,hasRefs:H.hasRefs||!1,hasTimeline:O.hasTimeline(e),isActiveSha:O.rowContainsCurrentHeadRef(H),isInUnsupportedRebase:u,isLastColumn:q,isSelected:O.isSelected(e),key:D,leftGutterBoxShadowAlpha:p,leftGutterWidth:f,message:P,nodeOffset:v[U],nodeOpacity:S[U],numGraphColumns:R,onClickCommit:g,onContextMenu:m,onDoubleClickCommit:_,rightGutterBoxShadowAlpha:y,rightGutterWidth:T,rowContext:Y,scopeBoundaryKind:H.scopeBoundaryKind,scrollLeft:w,setAsCurrentlyHoveredGraphCommit:C,sha:B,shouldShowRefLine:E,style:N,suppressNonRefRowTooltips:b,translate:I,type:Z,useAuthorInitialsForAvatars:M,zoneContext:j})}};let n7=A.forwardRef(({controlId:e,as:t="div",...o},r)=>{let i=(0,A.useMemo)(()=>({controlId:e}),[e]);return(0,or.jsx)(nj.Provider,{value:i,children:(0,or.jsx)(t,{...o,ref:r})})});n7.displayName="FormGroup";class n8 extends A.PureComponent{handleClickOutside(){let{sha:e,shorthand:t,type:o,data:r}=this.props.createRefFormData;this.props.onCancel(t,e,o,r)}constructor(e){super(e);let{createRefFormData:t,formatRefShorthand:o}=this.props,{sha:r,shorthand:i,type:n,data:s}=t;this.state={currentShorthand:o(i,r,n,s),initShorthand:i}}static getDerivedStateFromProps(e,t){let{createRefFormData:o,formatRefShorthand:r}=e,{currentShorthand:i,initShorthand:n}=t,{sha:s,shorthand:a,type:l,data:h}=o,c=a!==n;return c&&r(a,s,l,h)!==i?{currentShorthand:r(a,s,l,h),initShorthand:a}:c?{currentShorthand:i,initShorthand:a}:null}onInputChange(e){let t=e||"";if(e){let{sha:e,type:o,data:r}=this.props.createRefFormData;t=this.props.formatRefShorthand(t,e,o,r)}this.setState({currentShorthand:t}),this.props.onRefShorthandChange?.(t)}render(){let{createRefFormData:e,isRefShorthandValid:t,onCancel:o,onContextMenu:r,onRefCreate:i,refZoneWidth:n,style:s,translate:a}=this.props,{currentShorthand:l}=this.state,{data:h,sha:c,type:d}=e,u=a(d===ev.z.TAG?"RefZone-EnterTagName":"RefZone-EnterBranchName");return A.createElement("div",{className:"create-ref","data-testid":"create-ref",style:{...s,minWidth:n,width:n}},A.createElement(n7,null,A.createElement(n$,{autoFocus:!0,"data-testid":"create-ref-form-control",isInvalid:l.length>0&&!t(l,c,d,h),onChange:e=>this.onInputChange(e.target?.value),onContextMenu:e=>r(e,l,c,d,h),onKeyDown:e=>{(e.stopPropagation(),"Escape"===e.key)?o(l,c,d,h):c&&"Enter"===e.key&&i(l,c,d,h)},placeholder:u,type:"text",value:l})))}}var se=function({hasActive:e,overflowCount:t}){return A.createElement("span",{className:x()("overflow-count ml1",{"is-active":e}),"data-test-class":"overflow-count"},"+",t)},st=function({style:e,children:t,column:o,numGraphColumns:r,onMouseEnter:i,onMouseLeave:n,ref:s,...a}){return A.createElement("div",{...a,className:x()("gk-graph","ref-zone","ref-popover",`column-${o%r+1}`),ref:s},A.createElement("ul",{onMouseEnter:i,onMouseLeave:n,style:{...e,listStyle:"none",padding:0,zIndex:6}},t))},so=function({enabledRefMetadataTypes:e,column:t,columnForColoring:o,context:r,enableShowHideRefsOptions:i,targetRef:n,hasActive:s,hasRefs:a,getExternalIcon:l,includeOnlyRefsById:h,includeOnlyRemotesByName:c,isGhostRef:d,isHovered:u,isInUnsupportedRebase:p,numGraphColumns:f,onMissingRefMetadata:m,pinnedBranchFullName:g,refGroupContexts:_,refGroupsByName:v,refIconsPosition:S,refMetadata:R,fallbackRefMetadata:y,refNodeHovered:T,sha:C,showRemoteNamesOnRefs:w,showContextMenuForGroupedRef:E,onClickRef:b,onDoubleClickRef:I,onToggleRefNodesShown:M,onRefBeginDrag:O,onRefCanDrag:N,onRefCanDrop:x,onRefDragEnter:D,onRefDragLeave:H,onRefDrop:G,onRefEndDrag:k,translate:W,type:z,useColumnHeaderIcons:L}){let F=`ref-overlay-container-${(0,A.useId)()}`,P=(0,A.useCallback)((e,t,o)=>{M(e,t.map(e=>({id:(0,ea.$V)(e),name:e.name,type:e.refType,owner:e.owner,avatarUrl:e.avatarUrl})),!1,o)},[M]),B=(0,A.useMemo)(()=>v&&v.length>V.gi?v.slice(0,V.gi):v,[v]),Z=B.length>0?B[0]:null,U=(0,A.useMemo)(()=>u?B:Z?[Z]:[],[Z,u,B]),j=(0,A.useMemo)(()=>{let e=V.lE+(Z?.length||0)*V.RJ+(s?V.RJ:0);return u?{height:100,position:"relative"}:{minWidth:e}},[Z,s,u]),$=(0,A.useMemo)(()=>(0,ed.D7)(h,e=>e.type===ev.z.TAG),[h]),Y=(0,A.useMemo)(()=>({enabledRefMetadataTypes:e,enableShowHideRefsOptions:i,getExternalIcon:l,groupIsHovered:u,hasActive:s,hasRefs:a,isGhostRef:d,isInUnsupportedRebase:p,onClick:b,onContextMenu:E,onDoubleClick:I,onHideRefClick:P,onHovered:T,onMissingRefMetadata:m,onRefBeginDrag:O,onRefCanDrag:N,onRefCanDrop:x,onRefDragEnter:D,onRefDragLeave:H,onRefDrop:G,onRefEndDrag:k,refIconsPosition:S,refMetadata:R,fallbackRefMetadata:y,sha:C,showRemoteNamesOnRefs:w,translate:W,type:z,useColumnHeaderIcons:L}),[i,e,y,l,s,a,d,u,p,b,I,P,m,O,N,x,D,H,G,k,S,R,T,C,E,w,W,z,L]),K=(0,A.useMemo)(()=>U.map(e=>{let t=e[0],o=_?.[t.name]||void 0,r=e.some(e=>{let t=(0,ea.$V)(e);switch(e.refType){case ev.z.TAG:return $&&!!h[t];case ev.z.REMOTE:return!!h[t]||e.owner&&c[e.owner];default:return!!h[t]}}),i=!!g&&e.some(e=>e.id===g);return{...Y,isActive:t.isCurrentHead??!1,isPinned:i,isRefGroupIncluded:r,key:`ref-node-${t.fullName||t.name}`,refGroup:e,refGroupContext:o}}),[Y,$,h,c,g,_,U]);return A.default.createElement("span",{className:"ref-nodes","data-vscode-context":(0,ea.DO)(r),style:j},K.map(e=>A.default.createElement(nv,{...e,className:"inline",isHidden:u,key:e.key})),A.default.createElement(i8,{key:F,placement:"right-start",show:u,target:()=>n.current},A.default.createElement(st,{column:o??t,numGraphColumns:f},K.map(e=>A.default.createElement("li",{key:e.key},A.default.createElement(nv,{...e,isHidden:!u}))))))};let sr={};class si extends A.default.PureComponent{popoverTargetRef=(0,A.createRef)();static defaultProps={style:{}};componentDidUpdate(e){!this.props.hasRefs&&this.props.isSingleSelected&&!e.isSingleSelected&&this.props.hoveredRefZoneSha===this.props.sha&&(this.props.refZoneUnhovered(),this.props.hoveredRefGroup&&this.props.refNodeUnhovered(null,this.props.hoveredRefGroup,this.props.sha))}onCustomToggleRefNodesShown=(e,t,o,r)=>{this.props.onToggleRefNodesShown(e,t,o,r),this.props.refZoneUnhovered()};render(){var e;let t,o,{enabledRefMetadataTypes:r,column:i,columnForColoring:n,context:s,enableShowHideRefsOptions:a,showGhostRefsOnRowHover:l,hasActive:h,hasRefs:c,hasTimeline:d,hoveredRefGroup:u,hoveredRefZoneSha:p,getExternalIcon:f,includeOnlyRefsById:m,includeOnlyRemotesByName:g,isInUnsupportedRebase:_,scopeBoundaryKind:v,numGraphColumns:S,onClickRef:R,onDoubleClickRef:y,onMissingRefMetadata:T,onRefBeginDrag:C,onRefCanDrag:w,onRefCanDrop:E,onRefDragEnter:b,onRefDragLeave:I,onRefDrop:M,onRefEndDrag:O,pinnedBranchFullName:N,refGroupContexts:D,refGroupsByName:H,refIconsPosition:G,refMetadata:k,fallbackRefMetadata:W,refNodeHovered:z,refNodeUnhovered:L,refZoneHovered:F,refZoneUnhovered:P,sha:B,shouldShowRefLine:Z,showColorStrip:U,showContextMenuForGroupedRef:j,showRemoteNamesOnRefs:$,style:Y,translate:K,type:q,useColumnHeaderIcons:X,width:Q,clearCurrentlyHoveredGraphCommit:J,currentlyHoveredCommitSha:ee}=this.props,et=p===B,eo={minWidth:Q,width:Q},er={...Y,...eo},ei=d?A.default.createElement(oA,null):null,en=H.length,es=e=>{F(B),en?z(e,H[0],B):u&&L(e,u,B)},el=e=>{P(),u&&L(e,u,B),J(e,V.ui,B,ee??void 0)},eh=(0,ea.xJ)((e,t)=>{el(e),C(e,t)}),ec=en>0&&!c&&l,ed=(e=n??i,(o=sr[t=`${q}${e}${et}${h}${S}${ec}${v??""}`])||(o=x()(`column-${e%S+1}`,"flex","pb3","pt3","ref-zone","relative",q,{"dim-ref":ec,"has-active":h,z6:et,z1:!et,"scope-fork-point":"forkPoint"===v,"scope-merge-target":"mergeTarget"===v}),sr[t]=o),o),eu=A.default.createElement("div",{className:"color-strip height-100",style:{width:2}}),ep="forkPoint"===v,ef="mergeTarget"===v,em=ep?A.default.createElement(ni,{delay:400,overlay:A.default.createElement(iB,{className:"gk-graph bs-tooltip",id:`merge-base-tooltip-${B}`},"Merge base — where this branch diverged from its merge target."),placement:"top",trigger:["hover","focus"]},A.default.createElement("div",{className:"merge-base-ref-node"},"BASE")):ef?A.default.createElement(ni,{delay:400,overlay:A.default.createElement(iB,{className:"gk-graph bs-tooltip",id:`merge-target-tooltip-${B}`},"Merge target — the tip of the branch this scope is being compared against."),placement:"top",trigger:["hover","focus"]},A.default.createElement("div",{className:"merge-target-ref-node"},"TARGET")):null;if(!en)return A.default.createElement("div",{className:ed,onMouseEnter:es,onMouseLeave:el,onWheel:el,style:er},U?eu:null,ei,em);let eg={minWidth:0,overflow:"hidden",width:Q-V.Zk},e_=en-1,ev=e_>0&&!et?A.default.createElement(se,{hasActive:h,overflowCount:e_}):null;return A.default.createElement("div",{className:ed,onMouseEnter:es,onMouseLeave:el,onWheel:el,style:er},U?eu:null,ei,A.default.createElement("div",{className:"flex",style:eg},em,A.default.createElement("div",{ref:this.popoverTargetRef}),A.default.createElement(so,{column:i,columnForColoring:n,context:s,enabledRefMetadataTypes:r,enableShowHideRefsOptions:a,fallbackRefMetadata:W,getExternalIcon:f,hasActive:h,hasRefs:c,includeOnlyRefsById:m,includeOnlyRemotesByName:g,isGhostRef:ec,isHovered:et,isInUnsupportedRebase:_,numGraphColumns:S,onClickRef:R,onDoubleClickRef:y,onMissingRefMetadata:T,onRefBeginDrag:eh,onRefCanDrag:w,onRefCanDrop:E,onRefDragEnter:(e,t,o)=>{et||o?.sha!==B||es(e),b(e,t,o)},onRefDragLeave:I,onRefDrop:M,onRefEndDrag:O,onToggleRefNodesShown:this.onCustomToggleRefNodesShown,pinnedBranchFullName:N,refGroupContexts:D,refGroupsByName:H,refIconsPosition:G,refMetadata:k,refNodeHovered:z,sha:B,showContextMenuForGroupedRef:j,showRemoteNamesOnRefs:$,targetRef:this.popoverTargetRef,translate:K,type:q,useColumnHeaderIcons:X}),ev),(c||ep||ef)&&Z?A.default.createElement("div",{className:"absolute left-0 flex z1",style:eo},A.default.createElement(nK,{hasRefs:!0,isActiveSha:h,left:V.mE,type:q,width:"100%"})):null)}}class sn extends A.Component{static getDerivedStateFromProps(e,t){let o={},r=!1;return e.themeOpacityFactor!==t.themeOpacityFactor&&(o.themeOpacityFactor=e.themeOpacityFactor||V.K3.dark,r=!0),e.dimMergeCommits!==t.dimMergeCommits&&(o.dimMergeCommits=e.dimMergeCommits||!1,r=!0),e.onlyFirstParent!==t.onlyFirstParent&&(o.onlyFirstParent=e.onlyFirstParent||!1,r=!0),e.highlightRowsOnRefHover!==t.highlightRowsOnRefHover&&(o.highlightRowsOnRefHover=e.highlightRowsOnRefHover||!1,r=!0),e.showGhostRefsOnRowHover!==t.showGhostRefsOnRowHover&&(o.showGhostRefsOnRowHover=e.showGhostRefsOnRowHover||!1,r=!0),e.showRemoteNamesOnRefs!==t.showRemoteNamesOnRefs&&(o.showRemoteNamesOnRefs=e.showRemoteNamesOnRefs||!1,r=!0),e.enabledRefMetadataTypes!==t.enabledRefMetadataTypes&&(o.enabledRefMetadataTypes=e.enabledRefMetadataTypes||[],r=!0),e.enabledScrollMarkerTypes!==t.enabledScrollMarkerTypes&&(o.enabledScrollMarkerTypes=e.enabledScrollMarkerTypes||[],r=!0),e.graphCommitDescDisplayMode!==t.graphCommitDescDisplayMode&&(o.graphCommitDescDisplayMode=e.graphCommitDescDisplayMode||V.FQ.ALWAYS,r=!0),e.useAuthorInitialsForAvatars!==t.useAuthorInitialsForAvatars&&(o.useAuthorInitialsForAvatars=e.useAuthorInitialsForAvatars||!1,r=!0),e.shaLength!==t.shaLength&&(o.shaLength=e.shaLength,r=!0),e.hasMoreCommits!==t.hasMoreCommits&&(o.hasMoreCommits=e.hasMoreCommits||!1,r=!0),e.isLoadingRows!==t.isLoadingRows&&(o.isLoadingRows=e.isLoadingRows||!1,r=!0),e.rowsStatsLoading!==t.rowsStatsLoading&&(o.rowsStatsLoading=e.rowsStatsLoading||!1,r=!0),e.avatarUrlByEmail!==t.avatarUrlByEmail&&(o.avatarUrlByEmail=e.avatarUrlByEmail||{},r=!0),e.refMetadataById!==t.refMetadataById&&(o.refMetadataById=e.refMetadataById,r=!0),e.contexts!==t.contexts&&(o.contexts=e.contexts,r=!0),e.pendingCommitMessageSummary!==t.pendingCommitMessageSummary&&(o.pendingCommitMessageSummary=e.pendingCommitMessageSummary||"",r=!0),e.enableShowHideRefsOptions!==t.enableShowHideRefsOptions&&(o.enableShowHideRefsOptions=e.enableShowHideRefsOptions||!1,r=!0),e.createRefFormData!==t.createRefFormData&&(o.createRefFormData=e.createRefFormData,r=!0),e.highlightedShas!==t.highlightedShas&&(o.highlightedShas=e.highlightedShas,r=!0),e.workDirStats!==t.workDirStats&&(o.workDirStats=e.workDirStats||V.pi,r=!0),e.rowsStats!==t.rowsStats&&(o.rowsStats=e.rowsStats,r=!0),r?o:null}graphComponentRef=A.createRef();graphContainerRef=A.createRef();resizeObserver;lastNavSha=null;currentSha=null;isRefContextMenuShown=!1;isMounted=!1;selectedShas=new Set;selectionAnchorSha;selectionFocusSha;processedGraphRowBySha={};shaByRefId={};childrenBySha={};scrollToSha;headSha;headUpstreamSha;lastLazyLoadHeight=0;lastTopVisibleRowIndex=-1;lastBottomVisibleRowIndex=-1;maxColumns=0;orderedGraphRows=[];rowStatsConstraints={min:0,max:0};shouldFireShowMoreCommits=!0;columnsToFreeWhenFound={};hasMergeNodeChildBySha={};_autoLoadTimer;reserverInfoBySha={};columnsUsed={};pinnedBranchShas=new Set;scopeVisibility=null;syntheticEdgeChildShas=new Set;_lastReportedUnreachable=null;rowsStats;workDirStats=V.pi;_markerColorsCache=null;excludeByType={};excludeRefsById={};includeOnlyRefsById={};excludeRemotesByName={};includeOnlyRemotesByName={};highlightedShas={};searchMode="normal";scrollLeft=0;scrollTop=0;graphHeight=585;graphWidth=804;graphZoneModeConstants=(0,ea.jz)();graphZonesByType={};graphZoneOrdering=[V.ui,V.md,V.d4,V.fx,V.Sq,V.$A,V.AR];clientHeight=0;missingAvatarsTimer;pendingMissingAvatars={};requestedMissingAvatars={};missingRefsMetadataTimer;pendingMissingRefsMetadata={};requestedMissingRefsMetadata={};previousRefMetadataById=null;requestedMissingWipStats={};visibleWipShasTimer;lastFiredVisibleWipShas=void 0;branchUpstreamRowIndices=[];interactiveScrollMarkersFromRows=[];downstreamsByUpstream={};timelinesInterval;constructor(e){for(let[t,o]of(super(e),this.resizeObserver=new ResizeObserver(e=>e.forEach(e=>this.onGraphResized(e.contentRect.width,e.contentRect.height))),Object.entries(e.isSelectedBySha||{})))o&&(this.selectedShas.add(t),this.selectionAnchorSha=t,this.selectionFocusSha=t);this.excludeByType=this.props.excludeByType||{},this.excludeRefsById=this.props.excludeRefsById||{},this.excludeRemotesByName=this.getExcludeRemotesByName(),this.includeOnlyRemotesByName=this.getIncludeOnlyRemotesByName(),this.includeOnlyRefsById=this.props.includeOnlyRefsById||{},this.downstreamsByUpstream=this.props.downstreamsByUpstream||{},this.highlightedShas=this.props.highlightedShas||{},this.searchMode=this.props.searchMode||"normal",this.rowsStats=this.props.rowsStats||this.rowsStats,this.workDirStats=this.props.workDirStats||this.workDirStats,this.processRows(this.props.graphRows),this.cleanupSelections(),this.updateMarkerRowIndices(["selection","highlights"]);let t=(0,P.yr)(this.props.cssVariables);this.graphZoneModeConstants=(0,ea.jz)(this.props.columnsSettings?.[V.md]?.mode),this.maybeSortGraphZoneOrderingFromSettings(this.props.columnsSettings),this.state={avatarUrlByEmail:this.props.avatarUrlByEmail||{},contexts:this.props.contexts,createRefFormData:this.props.createRefFormData,cssVariablesWithDefaults:t,columnColorByColumn:this.getColumnColorByColumn(t),currentlyHoveredCommitSha:void 0,dimMergeCommits:this.props.dimMergeCommits||!1,onlyFirstParent:this.props.onlyFirstParent||!1,dimRowsOfSelectedCommit:!1,enableShowHideRefsOptions:this.props.enableShowHideRefsOptions||!1,highlightRowsOnRefHover:this.props.highlightRowsOnRefHover||!1,showGhostRefsOnRowHover:this.props.showGhostRefsOnRowHover||!1,showRemoteNamesOnRefs:this.props.showRemoteNamesOnRefs||!1,enabledRefMetadataTypes:this.props.enabledRefMetadataTypes||[],enabledScrollMarkerTypes:this.props.enabledScrollMarkerTypes||[],graphCommitDescDisplayMode:this.props.graphCommitDescDisplayMode||V.FQ.ALWAYS,graphZones:this.initializeGraphZones(this.props.columnsSettings,this.graphZoneOrdering,580),hasMoreCommits:this.props.hasMoreCommits||!1,height:this.graphHeight,highlightedShas:this.props.highlightedShas,hoveredRefGroup:void 0,hoveredRefZoneSha:void 0,isLoadingRows:this.props.isLoadingRows||!1,numGraphColumns:this.getNumGraphColumns(t),markerRowIndices:{},interactiveScrollMarkers:this.computeInteractiveScrollMarkers(),pendingCommitMessageSummary:this.props.pendingCommitMessageSummary||"",processedRows:[...this.orderedGraphRows],refIconsPosition:this.getRefIconsPositionOrDefault(this.props.refIconsPosition),refMetadataById:this.props.refMetadataById,rowsStats:this.rowsStats,rowsStatsLoading:this.props.rowsStatsLoading||!1,useAuthorInitialsForAvatars:this.props.useAuthorInitialsForAvatars||!1,scrollLeft:this.getScrollLeft(),scrollToAlignment:this.getScrollToAlignment(),scrollToIndex:this.getScrollToIndex(),scrollTop:this.getScrollTop(),shaLength:this.props.shaLength,themeOpacityFactor:this.props.themeOpacityFactor||V.K3.dark,width:this.graphWidth,workDirStats:this.workDirStats}}componentDidMount(){this.isMounted=!0,this.resizeObserver.observe(this.graphComponentRef.current),window.addEventListener("keydown",this.onWindowKeyDown),window.addEventListener("keyup",this.onWindowKeyUp),window.addEventListener("blur",this.onWindowBlur),window.addEventListener("mousedown",this.onWindowMouseDown),this.selectedShas.size&&this.selectCommitsCore([...this.selectedShas],{ensureVisible:!0})}componentDidUpdate(e,t){let o=!1,r=!1,i={},n=!1;e.searchMode!==this.props.searchMode&&(this.searchMode=this.props.searchMode||"normal",r=!0,i.highlights=!0),e.highlightedShas!==this.props.highlightedShas&&(this.highlightedShas=this.props.highlightedShas||{},"filter"===this.searchMode&&(r=!0),i.highlights=!0),e.excludeByType!==this.props.excludeByType&&(this.excludeByType=this.props.excludeByType||{},this.props.graphRows?.length&&(r=!0)),e.excludeRefsById!==this.props.excludeRefsById&&(this.excludeRefsById=this.props.excludeRefsById||{},this.excludeRemotesByName=this.getExcludeRemotesByName(),this.props.graphRows?.length&&(r=!0)),e.includeOnlyRefsById!==this.props.includeOnlyRefsById&&(this.includeOnlyRefsById=this.props.includeOnlyRefsById||{},this.includeOnlyRemotesByName=this.getIncludeOnlyRemotesByName(),this.props.graphRows?.length&&(r=!0)),e.downstreamsByUpstream!==this.props.downstreamsByUpstream&&(this.downstreamsByUpstream=this.props.downstreamsByUpstream||{},this.props.graphRows?.length&&(r=!0)),e.searchMode!==this.props.searchMode&&(n=!0);let s=!this.areSelectedByShaEqual(e.isSelectedBySha,this.props.isSelectedBySha),a=null!=this.props.isSelectedBySha&&(0,ed.xV)(this.props.isSelectedBySha),l=this.orderedGraphRows.length>0;if(this.processedGraphRowBySha&&l&&(s||0===this.selectedShas.size&&a)){let e=this.props.isSelectedBySha?Object.keys(this.props.isSelectedBySha):[];this.selectCommitsCore(e,{ensureVisible:!0}),s&&e.length>0?this.selectionAnchorSha=e[e.length-1]:s&&0===e.length&&(this.selectionAnchorSha=void 0)}if(e.isContainerWindowFocused!==this.props.isContainerWindowFocused&&this.dimRowsOfSelectedCommit(!1),e.graphRows!==this.props.graphRows||e.cssVariables!==this.props.cssVariables||r){this.cleanEdgeCaches(),this._markerColorsCache=null;let t=(0,P.yr)(this.props.cssVariables);n=!0,this.setState({columnColorByColumn:this.getColumnColorByColumn(t),cssVariablesWithDefaults:t,numGraphColumns:this.getNumGraphColumns(t)}),o=!0,(this.props.graphRows?.length<e.graphRows?.length||r)&&(this.lastLazyLoadHeight=0)}if(e.workDirStats!==this.props.workDirStats&&(this.workDirStats=this.props.workDirStats||V.pi),(e.workDirStats!==this.props.workDirStats||e.wipVisibility!==this.props.wipVisibility)&&(0,ea.dF)(e.workDirStats,e.wipVisibility)!==(0,ea.dF)(this.props.workDirStats,this.props.wipVisibility)&&(n=!0),e.avatarUrlByEmail!==this.props.avatarUrlByEmail&&(this.requestedMissingAvatars={}),e.wipNodeMetadataBySha!==this.props.wipNodeMetadataBySha&&(this.requestedMissingWipStats={},this.scheduleVisibleWipShasUpdate()),e.refIconsPosition!==this.props.refIconsPosition){let e=this.getRefIconsPositionOrDefault(this.props.refIconsPosition);this.state.refIconsPosition!==e&&this.setState({refIconsPosition:e})}if(e.refMetadataById!==this.props.refMetadataById&&(e.refMetadataById&&(0,ed.xV)(e.refMetadataById)&&(this.previousRefMetadataById=e.refMetadataById),this.requestedMissingRefsMetadata={},i.pullRequests=!0),e.rowsStats!==this.props.rowsStats&&(this.rowsStats=this.props.rowsStats,this.updateRowStatsConstraints()),e.columnsSettings!==this.props.columnsSettings){if(this.props.columnsSettings?.[V.md]?.mode!==e.columnsSettings?.[V.md]?.mode){this.cleanEdgeCaches(),this.graphZoneModeConstants=(0,ea.jz)(this.props.columnsSettings?.[V.md]?.mode),this.updateCommitZoneContentWidthFromChange();let e=this.graphZonesByType[V.md];e.currentWidth=e.contentWidth,e.preferredWidth=e.contentWidth,e.minimumWidth=this.graphZoneModeConstants.COMMIT_ZONE_VIEWPORT_WIDTH_MIN,e.showIconWidth=this.graphZoneModeConstants.COMMIT_ZONE_SHOW_ICON_WIDTH,this.loadEdgesBySha(),o=!0}this.props.columnsSettings&&(this.updateZonesFromSettings(this.props.columnsSettings),o=!0)}if(e.createRefFormData!==this.props.createRefFormData&&this.props.createRefFormData?.sha&&(this.selectCommitsCore([this.props.createRefFormData?.sha],{ensureVisible:!0}),this.selectionAnchorSha=this.props.createRefFormData.sha),e.pinnedBranchFullName!==this.props.pinnedBranchFullName&&(n=!0),e.stashesAnchorCommits!==this.props.stashesAnchorCommits&&(n=!0),e.scope!==this.props.scope&&(n=!0,i.highlights=!0,i.pullRequests=!0),e.onlyFirstParent!==this.props.onlyFirstParent&&(n=!0,i.highlights=!0,i.pullRequests=!0),(e.hasMoreCommits!==this.props.hasMoreCommits||e.onShowMoreCommits!==this.props.onShowMoreCommits)&&this.loadMoreCommitsIfNecessary(this.graphHeight,this.state.hasMoreCommits),n){let e=Array.from(this.selectedShas),t=this.selectionFocusSha;this.processRows(this.props.graphRows,this.props.pinnedBranchFullName);let o=(0,P.yr)(this.props.cssVariables);if(e.length>0){this.cleanupSelections();let o=[];for(let t of e){let e=this.processedGraphRowBySha[t];e?.hidden===!1&&(o.push(e),this.selectedShas.add(t))}if(o.length){if(t){let e=this.processedGraphRowBySha[t];e?.hidden===!1?this.selectionFocusSha=t:(this.selectionFocusSha=o[o.length-1].sha,this._selectionVersion++)}if(this.selectionAnchorSha&&this.selectionAnchorSha!==this.selectionFocusSha){let e=this.processedGraphRowBySha[this.selectionAnchorSha];(null==e||e.hidden)&&(this.selectionAnchorSha=this.selectionFocusSha)}let e=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]:void 0,r={isContiguous:this.areRowsContiguous(o),isTopological:!1};this.props.onSelectGraphRows?.(o,e,r),this.updateMarkerRowIndices(["selection"])}else this.selectedShas.clear(),this.selectionFocusSha=void 0,this.selectionAnchorSha=void 0,this._selectionVersion++,this.props.onSelectGraphRows?.([],void 0,{isContiguous:!0,isTopological:!1}),this.updateMarkerRowIndices(["selection"])}else if(a){let e=this.props.isSelectedBySha?Object.keys(this.props.isSelectedBySha):[];this.selectCommitsCore(e,{ensureVisible:!0}),e.length>0&&(this.selectionAnchorSha=e[e.length-1])}this.setState({processedRows:[...this.orderedGraphRows],columnColorByColumn:this.getColumnColorByColumn(o)})}if(o){this.updateCommitZoneContentWidthFromChange();let e=this.getOrderedActiveGraphZones();this.expandLastZoneMinWidthForScrollbar(e),this.ensureZoneWidthsMatchGraphWidth(e,this.graphWidth),this.setState({graphZones:e})}let h=Object.keys(i);h.length&&this.updateMarkerRowIndices(h);let c=this.props.graphRows?.length!==e.graphRows?.length,d=this.state.hasMoreCommits!==t.hasMoreCommits,u=this.state.height!==t.height;(c||d||u||o)&&this.autoLoadToFillViewport(),c&&this.loadMoreCommitsIfNecessary(this.graphHeight,this.state.hasMoreCommits)}componentWillUnmount(){this.isMounted=!1,this.clearTimelinesInterval(),null!=this._pendingScrollUpdate&&(cancelAnimationFrame(this._pendingScrollUpdate),this._pendingScrollUpdate=void 0),null!=this._pendingRowsUpdate&&(cancelAnimationFrame(this._pendingRowsUpdate),this._pendingRowsUpdate=void 0),this._autoLoadTimer&&(clearTimeout(this._autoLoadTimer),this._autoLoadTimer=void 0),this._headerHoverRestoreTimer&&(clearTimeout(this._headerHoverRestoreTimer),this._headerHoverRestoreTimer=void 0),this.missingAvatarsTimer&&(clearTimeout(this.missingAvatarsTimer),this.missingAvatarsTimer=void 0),this.missingRefsMetadataTimer&&(clearTimeout(this.missingRefsMetadataTimer),this.missingRefsMetadataTimer=void 0),this.visibleWipShasTimer&&(clearTimeout(this.visibleWipShasTimer),this.visibleWipShasTimer=void 0),window.removeEventListener("keydown",this.onWindowKeyDown),window.removeEventListener("keyup",this.onWindowKeyUp),window.removeEventListener("blur",this.onWindowBlur),window.removeEventListener("mousedown",this.onWindowMouseDown),this.resizeObserver.disconnect()}focus(){this.graphContainerRef?.current?.focus({preventScroll:!0})}getRefIconsPositionOrDefault(e){return e||ev.E.LEFT}onGraphVisibleRowsUpdatedThrottled=(0,ea.nF)(()=>this.onGraphVisibleRowsUpdated(),250,20);onBlurWipNodeInput=e=>{this.props.onBlurWipNodeInput?.(e)};onDoubleClickRef=(e,t,o,r)=>{this.props.onDoubleClickGraphRef?.(e,t,this.processedGraphRowBySha[o],r)};onFocusWipNodeInput=e=>{this.props.onFocusWipNodeInput?.(e)};onFilterColumnClick=(e,t)=>{this.props.onFilterColumnClick?.(e,t)};onCurrentlyHoveredGraphCommit=(e,t,o,r)=>{r!==o&&(this.props.onGraphRowHovered?.(e,t,this.processedGraphRowBySha[o]),this.setState({currentlyHoveredCommitSha:o}))};onClearCurrentlyHoveredGraphCommit=(e,t,o,r)=>{if(!r)return;let i=e.relatedTarget;if(i instanceof HTMLElement){let e=i.closest(".resizable-handle.horizontal");if(null!=e&&!e.closest(`#${V.ui}-header`))return}if((i=e.currentTarget)instanceof HTMLElement){let t=i.getBoundingClientRect();if(e.clientY>=t.top&&e.clientY<=t.bottom)return}this.props.onGraphRowUnhovered?.(e,t,this.processedGraphRowBySha[o]),this.setState({currentlyHoveredCommitSha:void 0})};onGraphColumnReOrdered=(e,t)=>{let o=this.graphZoneOrdering.indexOf(e),r=t?this.graphZoneOrdering.indexOf(t):this.graphZoneOrdering.length-1;t&&o<r&&(r-=1),this.graphZoneOrdering.splice(o,1),this.graphZoneOrdering.splice(r,0,e);let i={};this.graphZoneOrdering.forEach((e,t)=>{this.graphZonesByType[e].order=t,i[e]=this.getGraphColumnSettingFromZoneType(this.graphZonesByType[e])}),this.setState({graphZones:this.initializeGraphZones(i,this.graphZoneOrdering,this.graphWidth)}),this.props.onGraphColumnsReOrdered&&this.props.onGraphColumnsReOrdered(i)};onGraphZoneResize=(0,ea.xJ)((e,t)=>{if(t?.width){let o=this.getOrderedActiveGraphZones();this.adjustResizedGraphZone(o,e,t,!1),this.setState({graphZones:o})}});onGraphZoneResizeEnd=(0,ea.xJ)((e,t)=>{if(t?.width){let o=this.getOrderedActiveGraphZones();this.adjustResizedGraphZone(o,e,t,!0),this.setState({graphZones:o})}this.props.onColumnResized&&this.props.onColumnResized(e.type,this.getGraphColumnSettingFromZoneType(this.graphZonesByType[e.type]))});onPopupGraphHeaderContextMenu=(e,t)=>{this.props.onPopupGraphHeaderContextMenu&&this.props.onPopupGraphHeaderContextMenu(e,t)};onSettingsClick=(e,t)=>{this.props.onSettingsClick&&(e.stopPropagation(),this.props.onSettingsClick(e,t))};onMessageChange=e=>{this.setState({pendingCommitMessageSummary:e}),this.props.onMessageChange&&this.props.onMessageChange(e)};onRefBeginDrag=(e,t)=>{this.props.onRefBeginDrag&&this.props.onRefBeginDrag(e,t)};onRefCanDrag=e=>!!this.props.onRefCanDrag&&this.props.onRefCanDrag(e);onRefCanDrop=(e,t,o)=>!!this.props.onRefCanDrop&&this.props.onRefCanDrop(e,t,o);onRefCreate=(e,t,o,r)=>{this.props.onRefCreate&&this.props.onRefCreate(e,t,o,r)};onRefCreateCancel=(e,t,o,r)=>{this.props.onRefCreateCancel&&this.props.onRefCreateCancel(e,t,o,r)};onRefCreateContextMenu=(e,t,o,r,i)=>{this.props.onRefCreateContextMenu&&this.props.onRefCreateContextMenu(e,t,o,r,i)};onRefDragEnter=(e,t,o)=>{this.props.onRefDragEnter&&this.props.onRefDragEnter(e,t,o)};onRefDragLeave=(e,t,o)=>{this.props.onRefDragLeave&&this.props.onRefDragLeave(e,t,o)};onRefDrop=(e,t,o)=>{this.props.onRefDrop&&this.props.onRefDrop(e,t,o)};onRefEndDrag=(e,t,o)=>{this.props.onRefEndDrag&&this.props.onRefEndDrag(e,t,o)};performRangeSelection(e,t,o){if(this.selectionAnchorSha??=this.selectionFocusSha,!this.selectionAnchorSha)return this.selectionAnchorSha=e,this.selectCommitsCore([e],{ensureVisible:!0,isKeyboardNav:o}),!0;let r=this.isFilteredSearch()?"simple":t,i=this.getShiftSelectRange(e,r);if(i?.length){let t="topological"===r;return this.selectCommitsCore(i,{ensureVisible:!0,focusSha:e,isTopological:t,isContiguous:!!t||void 0,isKeyboardNav:o}),!0}return!1}onZoneRowClick(e,t,o){if(0!==e.button)return;let{enableMultiSelection:r,shiftSelectMode:i}=this.props,n=this.isMacOSPlatform(),s=r&&(!n&&e.ctrlKey||n&&e.metaKey),a=r&&e.shiftKey;s?this.handleToggleSelection(o,i):a&&this.performRangeSelection(o,i,!1)||(this.selectionFocusSha=o,this.selectionAnchorSha=o,this.selectCommitsCore([o],{isKeyboardNav:!1}))}handleToggleSelection(e,t){if("topological"===t&&!this.isFilteredSearch()&&this.selectedShas.size>0&&!this.selectedShas.has(e))if(1===this.selectedShas.size);else{let t;if(2===this.selectedShas.size){let[o,r]=Array.from(this.selectedShas),i=this.processedGraphRowBySha[o],n=this.processedGraphRowBySha[r];if(i&&n&&null!=i.rowIndex&&null!=n.rowIndex){let s=i.rowIndex<=n.rowIndex?o:r,a=i.rowIndex<=n.rowIndex?r:o,l=this.getDirectTopologicalPathBetween(s,a);t=null!=l&&l.length>1&&this.canExtendTopologicalSelection(e)}else t=!1}else t=this.canExtendTopologicalSelection(e);if(!t){this.selectionFocusSha=e,this.selectionAnchorSha=e,this.selectCommitsCore([e],{isKeyboardNav:!1});return}}this.selectionAnchorSha=e;let o="topological"===t&&!this.isFilteredSearch();this.selectCommitsCore([e],{toggle:!0,isTopological:o,isKeyboardNav:!1})}getShiftSelectRange(e,t){let o;if(!this.selectionAnchorSha)return[e];let r=this.processedGraphRowBySha[this.selectionAnchorSha],i=this.processedGraphRowBySha[e];if(!r||!i)return[e];if("simple"===t){let e=r.rowIndex,t=i.rowIndex;o=[];let n=Math.min(e,t),s=Math.max(e,t);for(let e=n;e<=s;e++)this.orderedGraphRows[e]&&o.push(this.orderedGraphRows[e].sha)}else o=this.getTopologicalPathBetween(this.selectionAnchorSha,e);return o&&o.length>1&&o.sort((e,t)=>(this.processedGraphRowBySha[e]?.rowIndex??0)-(this.processedGraphRowBySha[t]?.rowIndex??0)),o}canExtendTopologicalSelection(e){let t,o;if(0===this.selectedShas.size)return!0;let r=1/0,i=-1;for(let e of this.selectedShas){let n=this.processedGraphRowBySha[e];n&&(n.rowIndex<r&&(r=n.rowIndex,t=e),n.rowIndex>i&&(i=n.rowIndex,o=e))}if(!t||!o)return!0;let n=this.processedGraphRowBySha[e];if(!n)return!1;let s=n.rowIndex;if(s<r){let o=this.getDirectTopologicalPathBetween(e,t);return null!=o&&o.length>1}if(s>i){let t=this.getDirectTopologicalPathBetween(o,e);return null!=t&&t.length>1}let a=this.getDirectTopologicalPathBetween(t,e),l=this.getDirectTopologicalPathBetween(e,o);return null!=a&&a.length>1&&null!=l&&l.length>1}getTopologicalPathBetween(e,t){if(e===t)return[e];let o=this.getDirectTopologicalPathBetween(e,t);if(o&&o.length>1)return o;let r=this.findNearestTopologicallyReachableCommit(e,t);if(r)return this.getDirectTopologicalPathBetween(e,r)}getDirectTopologicalPathBetween(e,t){if(e===t)return[e];let o=new Set,r=new Map,i=[e],n=0;for(o.add(e);n<i.length;){let s=i[n++];if(s===t){let o=[],i=t;for(;void 0!==i;)o.push(i),i=r.get(i);if(o.reverse(),this.hasOnlyTwoEndpoints(o,e,t))return o;break}let a=this.processedGraphRowBySha[s];if(a){for(let e of a.parents||[])o.has(e)||(o.add(e),r.set(e,s),i.push(e));for(let e of this.childrenBySha[s]||[])o.has(e)||(o.add(e),r.set(e,s),i.push(e))}}}findNearestTopologicallyReachableCommit(e,t){let o=this.processedGraphRowBySha[e]?.rowIndex,r=this.processedGraphRowBySha[t]?.rowIndex;if(void 0===o||void 0===r)return;let i=o>r,n=Math.min(o,r),s=Math.max(o,r),a=new Set,l=[e],h=0,c=new Set([e]);for(;h<l.length;){let e=l[h++];a.add(e);let t=this.processedGraphRowBySha[e];if(t){for(let o of i?this.childrenBySha[e]||[]:t.parents||[])if(!c.has(o)){let e=this.processedGraphRowBySha[o];e&&e.rowIndex>=n&&e.rowIndex<=s&&(c.add(o),l.push(o))}}}if(i)for(let e=r+1;e<o;e++){let t=this.orderedGraphRows[e]?.sha;if(t&&a.has(t))return t}else for(let e=r-1;e>o;e--){let t=this.orderedGraphRows[e]?.sha;if(t&&a.has(t))return t}}hasOnlyTwoEndpoints(e,t,o){if(e.length<=2)return!0;let r=new Set(e),i=0;for(let n of e){let e=n===t||n===o,s=this.processedGraphRowBySha[n];if(!s)continue;let a=s.parents||[],l=this.childrenBySha[n]||[],h=a.filter(e=>r.has(e)).length,c=l.filter(e=>r.has(e)).length;if((0===h||0===c)&&(i++,!e))return!1}return 2===i}areRowsContiguous(e){if(e.length<=1)return!0;let t=new Set(e.map(e=>e.sha)),o=new Set,r=[e[0].sha],i=0;for(o.add(e[0].sha);i<r.length;){let e=r[i++],n=this.processedGraphRowBySha[e];if(!n)continue;for(let e of n.parents??[])t.has(e)&&!o.has(e)&&(o.add(e),r.push(e));let s=this.childrenBySha[e];if(s)for(let e of s)t.has(e)&&!o.has(e)&&(o.add(e),r.push(e))}return o.size===e.length}onClickRef=(e,t,o,r)=>{this.onZoneRowClick(e,V.ui,o),this.props.onClickGraphRef&&this.props.onClickGraphRef(e,t,this.processedGraphRowBySha[o],r),this.currentSha=o,this.loadSelectedGraphRow(this.currentSha),this.lastNavSha=null};onClickCommit=(e,t,o)=>{if(this.onZoneRowClick(e,t,o),this.props.onClickGraphRow){let r=this.processedGraphRowBySha[o];this.props.onClickGraphRow(e,t,r)}this.currentSha=o,this.loadSelectedGraphRow(this.currentSha),this.lastNavSha=null};onDoubleClickCommit=(e,t,o)=>{if(this.props.onDoubleClickGraphRow){let r=this.processedGraphRowBySha[o];this.props.onDoubleClickGraphRow(e,t,r)}};onWindowBlur=e=>{let{hoveredRefGroup:t,hoveredRefZoneSha:o}=this.state;t&&o&&this.onRefNodeUnhovered(e,t,o),this.onRefZoneUnhovered(),this.dimRowsOfSelectedCommit(!1)};onWindowKeyUp=()=>{this.dimRowsOfSelectedCommit(!1)};onWindowKeyDown=e=>{let t=this.isMacOSPlatform();this.dimRowsOfSelectedCommit(!t&&e.key===es.e.controlKey||t&&e.key===es.e.metaKey)};onWindowMouseDown=()=>{this.dimRowsOfSelectedCommit(!1)};isKeyboardNavigating=!1;onKeyUp=e=>{this.isKeyboardNavigating=!1,this.lastNavSha&&this.isNavigationKey(e.key)&&this.currentSha!==this.lastNavSha&&(this.loadSelectedGraphRow(this.currentSha),this.lastNavSha=null)};onKeyDown=e=>{this.isKeyboardNavigating=!0,null===this.lastNavSha&&this.isNavigationKey(e.key)&&(this.lastNavSha=this.currentSha);let t=this.isMacOSPlatform()?e.metaKey:e.ctrlKey,{shiftSelectMode:o}=this.props,r=this.isFilteredSearch()?"simple":o;switch(e.key){case es.e.arrowUpKey:e.altKey?this.selectPreviousBranchingPoint():this.selectPrevious(e.shiftKey,t,r);break;case es.e.arrowDownKey:e.altKey?this.selectNextBranchingPoint():this.selectNext(e.shiftKey,t,r);break;case es.e.arrowRightKey:this.selectPrevious(e.shiftKey,!1,r);break;case es.e.arrowLeftKey:this.selectNext(e.shiftKey,!1,r);break;case es.e.homeKey:this.selectFirst(e.shiftKey,r);break;case es.e.endKey:this.selectLast(e.shiftKey,r);break;case es.e.pageUpKey:e.altKey?this.selectPreviousRef():this.selectPageUp(e.shiftKey,r);break;case es.e.pageDownKey:e.altKey?this.selectNextRef():this.selectPageDown(e.shiftKey,r);break;case"H":case"h":this.selectHead(e.shiftKey)}};isNavigationKey(e){return[es.e.arrowUpKey,es.e.arrowDownKey,es.e.arrowLeftKey,es.e.arrowRightKey,es.e.homeKey,es.e.endKey,es.e.pageUpKey,es.e.pageDownKey].some(t=>t===e)}loadSelectedGraphRow(e){let t=this.processedGraphRowBySha[e];t&&this.props.onLoadSelectedGraphRow&&this.props.onLoadSelectedGraphRow(t)}onRefNodeHovered=(e,t,o)=>{(!this.props.showGhostRefsOnRowHover||(0,ea.SY)(this.selectedShas,o)||this.processedGraphRowBySha[o]?.hasRefs)&&(this.props.onGraphRefNodeHovered&&this.props.onGraphRefNodeHovered(e,t,this.processedGraphRowBySha[o]),this.setState({hoveredRefGroup:[...t]}))};onRefNodeUnhovered=(e,t,o)=>{this.isRefContextMenuShown||(this.props.onGraphRefNodeUnhovered&&this.props.onGraphRefNodeUnhovered(e,t,this.processedGraphRowBySha[o]),this.setState({hoveredRefGroup:void 0}))};onRefShorthandChange=e=>{let{createRefFormData:t}=this.state;this.setState({createRefFormData:{...t,shorthand:e}})};onRefZoneHovered=e=>{this.setState({hoveredRefZoneSha:e})};onRefZoneUnhovered=()=>{this.isRefContextMenuShown||this.setState({hoveredRefZoneSha:void 0})};onShowMoreCommits=()=>{this.props.onShowMoreCommits&&this.shouldFireShowMoreCommits&&(this.props.onShowMoreCommits(),this.shouldFireShowMoreCommits=!1,setTimeout(()=>{this.shouldFireShowMoreCommits=!0},250))};onScrollForZone=(e,t,o,r,i)=>{this.setScroll(e,t),this.props.onScrollForZone&&this.props.onScrollForZone(e,t),this.loadMoreCommitsIfNecessary(r,i)};hasUnfoundHighlightedCommits(){if(this.props.hasMoreSearchResults)return!0;for(let e in this.highlightedShas)if(e!==V.cJ&&null==this.processedGraphRowBySha[e])return!0;return!1}loadMoreCommitsIfNecessary(e,t){if(!this.props.onShowMoreCommits||!t||!e||e<0||!this.scrollTop||this.scrollTop<0||!this.orderedGraphRows?.length||this.scopeVisibility?.isBounded)return;let o=this.scrollTop+e,r=this.orderedGraphRows.length*V.yB,i=this.isFilteredSearch(),n=i?.8*r:r-V.By;this.lastLazyLoadHeight>0&&o>=this.lastLazyLoadHeight&&this.lastLazyLoadHeight<n&&(this.lastLazyLoadHeight=0),o>n&&o>this.lastLazyLoadHeight&&(this.lastLazyLoadHeight=Math.min(o,r-1),(!i||this.hasUnfoundHighlightedCommits())&&this.onShowMoreCommits())}shouldAutoLoadToFillViewport(){return!(!this.isFilteredSearch()||!this.props.onShowMoreCommits||!this.state.hasMoreCommits||this.state.isLoadingRows||!this.orderedGraphRows?.length||!this.graphHeight||this.graphHeight<=0||this.scopeVisibility?.isBounded)&&!!this.hasUnfoundHighlightedCommits()&&this.orderedGraphRows.length*V.yB<=1.2*(this.graphHeight-V.q4)}autoLoadToFillViewport(){if(this.shouldAutoLoadToFillViewport()){if(!this.shouldFireShowMoreCommits){this._autoLoadTimer&&clearTimeout(this._autoLoadTimer),this._autoLoadTimer=setTimeout(()=>{this._autoLoadTimer=void 0,this.autoLoadToFillViewport()},300);return}this._autoLoadTimer&&clearTimeout(this._autoLoadTimer),this._autoLoadTimer=setTimeout(()=>{this.shouldAutoLoadToFillViewport()&&this.shouldFireShowMoreCommits&&this.onShowMoreCommits(),this._autoLoadTimer=void 0},100)}}onScrollToRowCausedUpdateForFirstColumn=(e,t)=>{let o={...t};if(e===V.md&&t.scrollTop){let t=this.getHorizontalScrollHeight(e,this.state.cssVariablesWithDefaults);o.scrollTop-=t+V.ar}this.setScroll(e,o),this.props.onScrollToRowCausedUpdateForFirstColumn?.(e,o)};onCommitContextMenu=(e,t,o)=>{if(this.props.onRowContextMenu){let r=this.processedGraphRowBySha[o];this.props.onRowContextMenu(e,t,r)}};onRefContextMenu=(e,t,o)=>{if(this.props.onRefContextMenu){this.isRefContextMenuShown=!0,this.onRefZoneHovered(o);let r=this.processedGraphRowBySha[o];this.props.onRefContextMenu(e,t,r),setTimeout(()=>{this.isRefContextMenuShown=!1},250)}};areSelectedByShaEqual(e,t){if(null==e&&null==t)return!0;if(null==e||null==t)return!1;let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(let r of o)if(!(r in t)||e[r]!==t[r])return!1;return!0}_pendingRowsUpdate;_selectionVersion=0;_cachedSmartCellRangeRenderer=null;_cachedScrollLeftForRenderer=-1;_cachedForceCache;getOrCreateSmartCellRangeRenderer(e,t){if(null==this._cachedSmartCellRangeRenderer||this._cachedScrollLeftForRenderer!==e||this._cachedForceCache!==t){let o=e=>{let t=this.state.processedRows[e];if(!t)return"SHOW_MORE_COMMITS";let o=t.sha;return this.selectedShas.has(o)?`${o}_${this._selectionVersion}`:o};this._cachedSmartCellRangeRenderer=({cellCache:r,cellRenderer:i,columnSizeAndPositionManager:n,columnStartIndex:s,columnStopIndex:a,deferredMeasurementCache:l,horizontalOffsetAdjustment:h,isScrolling:c,parent:d,rowSizeAndPositionManager:u,rowStartIndex:p,rowStopIndex:f,styleCache:m,verticalOffsetAdjustment:g,visibleColumnIndices:_,visibleRowIndices:v})=>{let S=[],R=r.__prevScrollLeft!==e;R&&(r.__prevScrollLeft=e);let y=n.areOffsetsAdjusted()||u.areOffsetsAdjusted(),T=!c&&!y;for(let e=p;e<=f;e+=1){let p=u.getSizeAndPositionOfCell(e);for(let u=s;u<=a;u+=1){let s,a,f=n.getSizeAndPositionOfCell(u),y=u>=_.start&&u<=_.stop&&e>=v.start&&e<=v.stop,w=`${e}-${u}`;T&&m[w]?s=m[w]:l&&!l.has(e,u)?s={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(s={height:p.size,left:f.offset+h,position:"absolute",top:p.offset+g,width:f.size},m[w]=s);let E={columnIndex:u,isScrolling:c,isVisible:y,key:w,parent:d,rowIndex:e,style:s};if(!c&&!t||h||g||R)a=i(E);else{let t=o(e,u);r[w]?.realKeyForCell!==t&&(r[w]={realKeyForCell:t,cell:i(E)}),a=r[w].cell}if(null!=a){var C;globalThis.process?.env?.NODE_ENV!=="production"&&(C=a,(0,A.isValidElement)(C)&&(C.type&&C.type.__internalCellMeasurerFlag&&(C=C.props.children),(0,A.isValidElement)(C)&&C?.props?.style===void 0&&!0!==d.__warnedAboutMissingStyle&&(d.__warnedAboutMissingStyle=!0))),S.push(a)}}}return S},this._cachedScrollLeftForRenderer=e,this._cachedForceCache=t}return this._cachedSmartCellRangeRenderer}getCommits(e){let t=[];for(let o of e){let e=this.processedGraphRowBySha[o];null!=e&&t.push(e)}return t}selectCommits(e,t){return this.selectCommitsCore(e,{toggle:t?.toggle,ensureVisible:t?.ensureVisible})}selectCommitsCore(e,t){let{toggle:o=!1,ensureVisible:r=!1,isKeyboardNav:i=this.isKeyboardNavigating,isTopological:n,isContiguous:s,focusSha:a}=t??{},l=[];if(o){for(let t of e)this.selectedShas.has(t)?this.selectedShas.delete(t):null!=this.processedGraphRowBySha[t]&&this.selectedShas.add(t);for(let e of this.selectedShas){let t=this.processedGraphRowBySha[e];null!=t&&l.push(t)}}else if(1===e.length){let[t]=e,o=this.processedGraphRowBySha[t];null!=o?(this.selectedShas.clear(),this.selectedShas.add(t),l.push(o)):this.selectedShas.clear()}else for(let t of(this.selectedShas.clear(),e)){let e=this.processedGraphRowBySha[t];null!=e&&(this.selectedShas.add(t),l.push(e))}l.length>1&&l.sort((e,t)=>(e.rowIndex??0)-(t.rowIndex??0)),this._selectionVersion++,a&&this.selectedShas.has(a)?this.selectionFocusSha=a:this.selectionFocusSha=e.length&&this.selectedShas.has(e[e.length-1])?e[e.length-1]:(0,ea.HV)(this.selectedShas),this.selectionFocusSha&&(r||i)&&this.selectSha(this.selectionFocusSha,i);let h=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]:void 0;return this.props.onSelectGraphRows?.(l,h,{isContiguous:s??(l.length<=1||this.areRowsContiguous(l)),isTopological:n??l.length<=1}),null!=this._pendingRowsUpdate&&cancelAnimationFrame(this._pendingRowsUpdate),this._pendingRowsUpdate=requestAnimationFrame(()=>{this._pendingRowsUpdate=void 0;let e={...this.state.markerRowIndices};for(let t of(e.selection=[],this.selectedShas)){let o=this.processedGraphRowBySha[t]?.rowIndex;null!=o&&e.selection.push(o)}if(i){let t=this.getScrollToIndex(),o=this.getScrollToAlignment(),r=this.predictScrollTop(t,o);null!=r&&(this.scrollTop=r),this.setState({markerRowIndices:e,scrollToAlignment:o,scrollToIndex:t,...null!=r&&{scrollTop:r}},this.clearScrollToIndex)}else this.setState({markerRowIndices:e})}),l}predictScrollTop(e,t){let o;if(e<0)return;let r=e*V.yB,i=this.getClientHeight(),n=this.scrollTop;if("start"===t)o=r;else if("end"===t)o=r-i+V.yB;else if("center"===t)o=r-i/2+V.yB/2;else{let e=r+V.yB;r<n?o=r:e>n+i&&(o=e-i)}return null!=o&&(o=Math.max(0,Math.min(o,Math.max(0,(this.orderedGraphRows?.length??0)*V.yB-i)))),o}getCommitZoneContentWidthBetweenGutters(){return this.getCurrentWidthByZone(V.md)-this.getLeftGutterWidth()-this.getRightGutterWidth()}getExcludeRemotesByName(){let e={};return Object.values(this.excludeRefsById).forEach(t=>{t.type===ev.z.REMOTE&&t.owner&&"*"===t.name&&(e[t.owner]=!0)}),e}getIncludeOnlyRemotesByName(){let e={};return Object.values(this.includeOnlyRefsById).forEach(t=>{t.type===ev.z.REMOTE&&t.owner&&"*"===t.name&&(e[t.owner]=!0)}),e}clearScrollToIndex=(0,ea.xJ)(()=>{this.isMounted&&this.setState({scrollToIndex:void 0})});getVisibleRows=()=>{let{top:e,bottom:t}=this.getTopAndBottomVisibleRowIndex();return e>=0&&t>=0?this.state.processedRows.slice(e,t+1):[]};getTopAndBottomVisibleRowIndex(){let{graphHeight:e,orderedGraphRows:t,scrollTop:o}=this,r=e||0;if(!r||!t?.length)return{top:-1,bottom:-1};let i=(r-V.q4)/V.yB,n=o/V.yB;return{top:Math.max(Math.floor(n),0),bottom:Math.min(Math.ceil(n+(i-1)),t.length-1)}}getOffsetSha(e,t,o,r){this._scrollToAlignmentOverride=void 0;let i=this.props.scrollRowPadding||0;if(!i||"none"===t||!this.graphHeight||!this.orderedGraphRows.length)return e;let n=this.processedGraphRowBySha[e]?.rowIndex??-1;if(-1===n)return e;let{top:s,bottom:a}=this.getTopAndBottomVisibleRowIndex();if(-1===s||-1===a||n>=s&&n<=a&&!r)return e;let l=Math.floor(Math.floor((this.graphHeight-V.q4)/V.yB)/2);if(l<1)return e;let h=Math.min(i,l);return void 0===o||t!==o?e:"up"===t&&n<=s+h?(this._scrollToAlignmentOverride="start",this.orderedGraphRows[Math.max(n-h,0)].sha||e):"down"===t&&n>=a-h?(this._scrollToAlignmentOverride="end",this.orderedGraphRows[Math.min(n+h,this.orderedGraphRows.length-1)].sha||e):e}_pendingScrollUpdate;_lastSelectedRowIndex;_lastScrollDirection="none";_scrollToAlignmentOverride;selectSha(e,t=!1){let o=this.processedGraphRowBySha[e]?.column||0,r=this.getScrollLeft(),i=this.getCommitZoneContentWidthBetweenGutters(),n=this.getCurrentWidthByZone(V.md),s=this.getCommitZoneContentWidth(),a=o*this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,l=r-this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH/3<=a,h=Math.max(0,s-n),c=l&&a<=r+i?r:(0,eS.q)(a-i/2,0,h),d=this.processedGraphRowBySha[e]?.rowIndex,u=void 0!==d&&void 0!==this._lastSelectedRowIndex?d>this._lastSelectedRowIndex?"down":d<this._lastSelectedRowIndex?"up":"none":"none",p=t?this.getOffsetSha(e,u,this._lastScrollDirection,t):e;this.setScrollToSha(p,c),t?(this._lastScrollDirection=u,void 0!==d&&(this._lastSelectedRowIndex=d)):(this._lastScrollDirection="none",this._lastSelectedRowIndex=void 0,this._scrollToAlignmentOverride=void 0),t&&this.props.hasMoreCommits&&void 0!==d&&this.orderedGraphRows.length-d<=V.By/V.yB&&this.loadMoreCommitsIfNecessary(this.graphHeight,this.props.hasMoreCommits),t||(null!=this._pendingScrollUpdate&&cancelAnimationFrame(this._pendingScrollUpdate),this._pendingScrollUpdate=requestAnimationFrame(()=>{this._pendingScrollUpdate=void 0,this.setState({scrollToAlignment:this.getScrollToAlignment(),scrollToIndex:this.getScrollToIndex()},this.clearScrollToIndex)}))}updateWidthByZone(e,t,o){let r=this.getOrderedActiveGraphZones(),i=this.graphZonesByType[t],n=(0,ea.jY)(i,r,e);if(i.currentWidth=n,t===V.md){let e=Math.max(0,this.getCommitZoneContentWidth()-i.currentWidth);this.getScrollLeft()>e&&this.setScrollLeft(e)}o&&(i.preferredWidth=n)}updateCommitZoneContentWidthFromChange(){let e=this.graphZonesByType[V.md];if(!e.isHidden){let t=this.getOrderedActiveGraphZones(),o=this.getCommitZoneContentWidth();e.contentWidth=o,e.maximumWidth=o,e.currentWidth>o&&(e.currentWidth=(0,ea.jY)(e,t,o)),this.setState({graphZones:t})}}getCurrentWidthByZone(e,t=!0){let o=t?this.getVerticalScrollWidth(V.md,this.props.cssVariables,!0):0,r=this.graphZonesByType[e];return r&&!r.isHidden?r.currentWidth-o:0}getCommitZoneContentWidth(){return(this.maxColumns||1)*this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH+2*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+2*this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT}getCommitZoneWidth(e=!0){let t=e?this.getVerticalScrollWidth(V.md,this.props.cssVariables,!0):0;if(this.graphZonesByType[V.md])return this.graphZonesByType[V.md].currentWidth-t;let{columnsSettings:o}=this.props;return o?.[V.md]?o[V.md].width-t:V.W[V.md].minimumWidth-t}getSingleColumnModeFactor(){let e=this.maxColumns,t=this.getCurrentWidthByZone(V.md);return 1===e?0:(0,eS.q)(1-(t-2*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH-this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT)/this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,0,1)}setClientHeight(e){this.clientHeight=e}getClientHeight(){return this.clientHeight}setScroll(e,t){this.setClientHeight(t.clientHeight),null!=t.scrollTop&&this.setScrollTop(t.scrollTop),e===V.md&&null!=t.scrollLeft&&this.setScrollLeft(t.scrollLeft)}getNonAdjustedScrollLeft(){return this.scrollLeft}setScrollLeft(e){this.scrollLeft!==e&&(this.scrollLeft=e,this.setState({scrollLeft:e}))}getScrollLeft(){let e=this.getNonAdjustedScrollLeft();return this.getCommitZoneContentWidth()!==this.getCommitZoneWidth()?e:0}setScrollTop(e){this.scrollTop!==e&&(this.scrollTop=e,this.setState({scrollTop:e}),this.onGraphVisibleRowsUpdatedThrottled())}getScrollTop(){return this.scrollTop}getScrollToSha(){return this.scrollToSha}setScrollToSha(e,t){this.scrollToSha=e,this.setScrollLeft(t),this.onGraphVisibleRowsUpdated()}getScrollToIndex(){let e=this.getScrollToSha();if(e){let t=this.processedGraphRowBySha[e]?.rowIndex;return void 0===t?this.orderedGraphRows.findIndex(t=>t.sha===e):t}return -1}getScrollToAlignment(){if(void 0!==this._scrollToAlignmentOverride)return this._scrollToAlignmentOverride;let e=this.getClientHeight(),t=this.getScrollTop(),o=this.getScrollToIndex();if("none"!==this._lastScrollDirection&&o>=0){let r=o*V.yB,i=r+V.yB,n=t+e;if(!(r>=t&&i<=n))return"down"===this._lastScrollDirection?"end":"start"}return(0,ea.Mz)(V.yB,e,t,o)}getMinNodeOffset(){let e=this.getScrollLeft(),t=this.getSingleColumnModeFactor();return(1-t)*(e+2*this.graphZoneModeConstants.COMMIT_ZONE_PADDING_LEFT)+t*(e+this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH)}getHorizontalScrollHeight(e,t,o){return this.graphZonesByType[e]?(0,ea.xy)(e,this.getOrderedActiveGraphZones(),this.orderedGraphRows,t,o):0}getVerticalScrollWidth(e,t,o){return this.graphZonesByType[e]?(0,ea.K8)(e,this.getOrderedActiveGraphZones(),this.props.hasMoreCommits,this.props.isLoadingRows,this.graphHeight,this.orderedGraphRows,(this.props.enabledScrollMarkerTypes?.length??0)>0,t,o):0}getMaxNodeOffset(){let e=this.getCurrentWidthByZone(V.md),t=this.getScrollLeft(),o=this.getSingleColumnModeFactor();return(1-o)*(e+t+(this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT-this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH))+o*(t+this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH)}getAbsoluteNodeLeftByColumn(){let e={};for(let t=0;t<=this.maxColumns;t+=1)e[t]=this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH*t;return e}getNodeOffsetByColumn(){let e=this.getMinNodeOffset(),t=this.getMaxNodeOffset(),o=this.getAbsoluteNodeLeftByColumn(),r={};return Object.keys(o).forEach(i=>{let n=o[i];r[i]=(0,eS.q)(n,e,t)}),r}getMaxNodeLeft(){return this.getScrollLeft()+(this.getCurrentWidthByZone(V.md)-this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH-this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT)}getMinNodeLeft(){let e=this.getScrollLeft(),t=this.getSingleColumnModeFactor();return e+this.graphZoneModeConstants.COMMIT_ZONE_PADDING_LEFT+t*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH}getRightGutterSlideOutFactor(){let e=this.getCurrentWidthByZone(V.md),t=this.getCommitZoneContentWidth(),o=this.getSingleColumnModeFactor();return(0,eS.q)((e-(t-(this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+this.graphZoneModeConstants.COMMIT_ZONE_PADDING_RIGHT)))/this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,0,1)+o/2}getNodeOpacityByColumn(){let e=this.getMinNodeLeft(),t=this.getMaxNodeLeft(),o=this.getAbsoluteNodeLeftByColumn(),r=this.getRightGutterSlideOutFactor(),i=this.getSingleColumnModeFactor(),n={};return Object.keys(o).forEach(s=>{let a=o[s],l=Math.min(a-(e-i*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH),t+this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH-(a+this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH*(1-r)));n[s]=V.Td+(1-V.Td)*Math.max(l/(this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH/2),i)}),n}getLeftGutterWidth(){let e=this.getSingleColumnModeFactor();return this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH+e*(this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH/2)}getRightGutterWidth(){return(1-this.getRightGutterSlideOutFactor())*this.graphZoneModeConstants.COMMIT_ZONE_GUTTER_WIDTH}getBoxShadowAlphaForGutter(e,t){return .4*(1-Math.max(e,t))}getLeftGutterBoxShadowAlpha(e){let t=this.getScrollLeft(),o=this.getSingleColumnModeFactor();return e*this.getBoxShadowAlphaForGutter(o,(0,eS.q)(1-t/this.graphZoneModeConstants.COMMIT_COLUMN_WIDTH,0,1))}getRightGutterBoxShadowAlpha(e){let t=this.getSingleColumnModeFactor(),o=this.getRightGutterSlideOutFactor();return e*this.getBoxShadowAlphaForGutter(t,o)}updateMarkerRowIndices(e,t){this.isMounted&&this.setState(({markerRowIndices:o})=>{if(e.forEach(e=>o[e]=[]),e.includes("selection"))for(let e of this.selectedShas){let t=this.processedGraphRowBySha[e]?.rowIndex;void 0!==t&&o.selection.push(t)}let r=t?.searchMode??this.props.searchMode;if(e.includes("highlights")&&"filter"!==r)for(let e of Object.keys(t?.highlightedShas||this.state?.highlightedShas||this.props.highlightedShas||{})){let t=this.processedGraphRowBySha[e]?.rowIndex;void 0!==t&&o.highlights.push(t)}if(e.includes("pullRequests")){let e=t?.refMetadataById||this.state?.refMetadataById||this.props.refMetadataById||{};for(let t of Object.keys(e))if(e[t]?.[el.ki]?.length){let e=this.shaByRefId[t];if(null==e)continue;let r=this.processedGraphRowBySha[e]?.rowIndex;void 0!==r&&o.pullRequests.push(r)}o.pullRequests.sort((e,t)=>e-t)}let i={markerRowIndices:o,interactiveScrollMarkers:this.state.interactiveScrollMarkers};return e.includes("pullRequests")&&(i.interactiveScrollMarkers=this.computeInteractiveScrollMarkers(t)),i})}computeInteractiveScrollMarkers(e){let t=e?.refMetadataById||this.state?.refMetadataById||this.props.refMetadataById||{},o=[];for(let e of Object.keys(t)){let r=t[e]?.[el.ki];if(!r?.length)continue;let i=this.shaByRefId[e];if(null==i)continue;let n=this.processedGraphRowBySha[i]?.rowIndex;if(null==n)continue;let s=r[0];o.push({type:"pullRequests",rowIndex:n,sha:i,label:s.title?`#${s.id} ${s.title}`:`#${s.id}`})}return this.interactiveScrollMarkersFromRows.concat(o)}onScrollMarkerClicked=e=>{this.selectCommitsCore([e],{ensureVisible:!0,isKeyboardNav:!1})};getHeadPillDirection(){if(!this.headSha||!this.orderedGraphRows.length)return null;let e=this.processedGraphRowBySha[this.headSha]?.rowIndex;if(null==e||e<0)return null;let{top:t,bottom:o}=this.getTopAndBottomVisibleRowIndex();return t<0||o<0?null:e<t-1?"up":e>o+1?"down":null}onHeadPillClick=()=>{this.headSha&&this.selectCommitsCore([this.headSha],{ensureVisible:!0,isKeyboardNav:!1})};getMarkerColors(){if(this._markerColorsCache)return this._markerColorsCache;let e=getComputedStyle(this.graphComponentRef?.current||document.querySelector(".gk-graph")||document.documentElement),t={};for(let o of Object.values(V.wx)){let r=e.getPropertyValue(o.colorCssKey).trim();r&&(t[o.type]=r)}return this._markerColorsCache=t,t}initializeGraphZones(e,t,o){this.graphZonesByType={};let r=[],i=0;t.forEach((t,o)=>{let n=e?e[t]:void 0,s=V.W[t],a=n?.width?n.width:s.minimumWidth,l={...s,type:t,currentWidth:a,preferredWidth:a,isHidden:n?.isHidden||!1,mode:n?.mode,order:s.isCustomizable&&n?.order!==void 0?n?.order:o};n?.isHidden||(i+=l.currentWidth),t===V.md&&(l.contentWidth=this.getCommitZoneContentWidth(),l.minimumWidth=this.graphZoneModeConstants.COMMIT_ZONE_VIEWPORT_WIDTH_MIN,l.showIconWidth=this.graphZoneModeConstants.COMMIT_ZONE_SHOW_ICON_WIDTH,this.maxColumns>0&&(l.maximumWidth=l.contentWidth)),this.graphZonesByType[t]=l,l?.isHidden||r.push(l)});let n=r[r.length-1];if(n){let e=(0,ea.eQ)(this.props.cssVariables,!0),t=n.minimumWidth+e;(null==n.maximumWidth||n.maximumWidth>=t)&&(n.minimumWidth=t,null!=n.showIconWidth&&(n.showIconWidth+=e),r[r.length-1]=n)}for(r.forEach(e=>{let t=(0,ea.jY)(e,r,e.currentWidth);t!==e.currentWidth&&(i-=e.currentWidth,e.currentWidth=t,i+=t)});i>o;){let e=(0,ea.Q9)(r);if(!e)break;let t=e.currentWidth,n=i-o,s=Math.max(e.minimumWidth,t-n),a=t-s;this.graphZonesByType[e.type].currentWidth=s,i-=a}if(i<o){let e=t[t.length-1],i=o-(0,ea.al)(r,e);this.graphZonesByType[e].currentWidth=i}return r}maybeSortGraphZoneOrderingFromSettings(e){this.graphZoneOrdering.every(t=>e?.[t]?.order!==void 0)&&this.graphZoneOrdering.sort((t,o)=>e[t].order<e[o].order?-1:+(e[t].order>e[o].order))}updateZonesFromSettings(e){let t=!1;this.graphZoneOrdering.forEach((o,r)=>{let i=this.graphZonesByType[o],n=e?.[i.type];n&&(n.isHidden!==i.isHidden&&(t=!0,i.type!==V.Sq||n.isHidden||this.updateRowStatsConstraints()),i.isHidden=n.isHidden,i.order=i.isCustomizable&&n?.order!==void 0?n?.order:r,i.mode=n.mode,i.preferredWidth=n.width??i.preferredWidth,i.currentWidth=i.preferredWidth)}),t&&this.graphZoneOrdering.forEach(e=>{let t=this.graphZonesByType[e];t.currentWidth=t.minimumWidth})}loadEdgesBySha(){if(this.maxColumns=0,this.isFilteredSearch())return;let e=e=>this.processedGraphRowBySha[e]?.column;this.orderedGraphRows.forEach((t,o)=>{let r=this.orderedGraphRows[o-1],i=function(e,t,o,r){var i;let n,s,a,l,h,c=(i=e.sha,h={},Object.keys(t).forEach(e=>{s=(n=t[e]).passThrough,a=n.starting,(l=s&&!$(s.type)?s:a&&!$(a.type)?a:s||a||void 0)&&(l.parentSha===i?h[e]={ending:l}:h[e]={passThrough:l})}),h),d=function(e,t,o){let r={},i=e.parents;if(i.length>0){let n=o.has(e.sha)?"synthetic-edge":e.type,s=t(e.sha);void 0!==s&&(r[s]={parentSha:i[0],type:n});for(let e=1;e<i.length;e+=1){let o=i[e],s=t(o);void 0!==s&&(r[s]={parentSha:o,type:n})}}return r}(e,o,r);return Object.keys(d).forEach(e=>{c[e]||(c[e]={ending:void 0,passThrough:void 0,starting:void 0}),c[e].starting=d[e]}),c}(t,r&&this.processedGraphRowBySha[r.sha]?.edges?this.processedGraphRowBySha[r.sha].edges:{},e,this.syntheticEdgeChildShas);this.processedGraphRowBySha[t.sha].edges=i;let n=function(e){if(null==e)return 0;let t=0;return Object.keys(e).forEach(e=>{let o=parseInt(e,10);o>t&&(t=o)}),t}(i);this.processedGraphRowBySha[t.sha].edgeColumnMaxes=n,n>this.maxColumns&&(this.maxColumns=n)})}processRows(e,t){this.loadRowsbySha(e||[],t),this.loadEdgesBySha()}formatCommitDateTimeCallback=(e,t)=>this.props.formatCommitDateTime?this.props.formatCommitDateTime(e,t):function(e,t,o=!0){t=t??void 0;let r=`${(void 0)??""}:${t}`,i=U.get(r);if(null==i){let e=function(e){if(null==e)return{localeMatcher:"best fit",dateStyle:"full",timeStyle:"short"};let t=Z.exec(e);if(t?.groups!=null){let{dateStyle:e,timeStyle:o}=t.groups;return{localeMatcher:"best fit",dateStyle:e||"full",timeStyle:o||void 0}}let o={localeMatcher:"best fit"};for(let{groups:t}of e.matchAll(B))if(null!=t)for(let e in t){let r=t[e];if(null!=r)switch(e){case"year":o.year=4===r.length?"numeric":"2-digit";break;case"month":switch(r.length){case 4:o.month="long";break;case 3:o.month="short";break;case 2:o.month="2-digit";break;case 1:o.month="numeric"}break;case"day":"DD"===r?o.day="2-digit":o.day="numeric";break;case"weekday":switch(r.length){case 4:o.weekday="long";break;case 3:o.weekday="short";break;case 2:o.weekday="narrow"}break;case"hour":o.hour=2===r.length?"2-digit":"numeric",o.hour12="hh"===r||"h"===r;break;case"minute":o.minute=2===r.length?"2-digit":"numeric";break;case"second":o.second=2===r.length?"2-digit":"numeric";break;case"fractionalSecond":o.fractionalSecondDigits=3;break;case"dayPeriod":o.dayPeriod="narrow",o.hour12=!0,o.hourCycle="h12";break;case"timeZoneName":o.timeZoneName=2===r.length?"long":"short"}}return o}(t);i=new Intl.DateTimeFormat(s,e),o&&U.set(r,i)}if(null==t||Z.test(t))return i.format(e);let n=i.formatToParts(e);return t.replace(B,(t,r,i,a,l,h,c,d,u,p,f,m,g,_,v)=>{if(null!=r)return r.substring(1,r.length-1);for(let t in v){let r=v[t];if(null==r)continue;let i=n.find(e=>e.type===t);if("Do"===r&&i?.type==="day")return function(e){let t=e%100;return`${e}${j[(t-20)%10]??j[t]??j[0]}`}(Number(i.value));if("a"===r&&i?.type==="dayPeriod"){let t=(function(e){let t=`${(void 0)??""}:time:${e}`,r=U.get(t);null==r&&(r=new Intl.DateTimeFormat(s,{localeMatcher:"best fit",timeStyle:e}),o&&U.set(t,r));return r})("short").formatToParts(e).find(e=>"dayPeriod"===e.type);return` ${(t??i)?.value??""}`}return i?.value??""}return""})}(e,V.qO);formatCommitMessageCallback=e=>this.props.formatCommitMessage?.(e)??{summary:e};formatRefShorthandCallback=(e,t,o,r)=>this.props.formatRefShorthand?this.props.formatRefShorthand(e,t,o,r):e.replace(/\s/g,"");isRefShorthandValidCallback=(e,t,o,r)=>!this.props.isRefShorthandValid||this.props.isRefShorthandValid(e,t,o,r);get pinnedBranchFullName(){return this.props.pinnedBranchFullName??null}translateCallback=(e,...t)=>this.props.translate?this.props.translate(e,...t):e_.H[e]?function(e,t){if(0===t.length)return e;let o=e;return t.forEach((e,t)=>{let r=RegExp(`\\{${t}\\}`,"g");o=o.replace(r,e)}),o}(e_.H[e],t):e;getIconCallback=e=>{let t=this.props.getExternalIcon?.(e);return t||A.createElement("span",null)};onMissingAvatar=(e,t)=>{this.props.onEmailsMissingAvatarUrls&&!this.requestedMissingAvatars[e]&&(this.pendingMissingAvatars[e]=t,this.missingAvatarsTimer&&(clearTimeout(this.missingAvatarsTimer),this.missingAvatarsTimer=void 0),this.missingAvatarsTimer=setTimeout(()=>{if(!this.isMounted)return;let e={...this.pendingMissingAvatars};this.pendingMissingAvatars={};let t=Object.keys(e);if(t.length){for(let e of t)this.requestedMissingAvatars[e]=!0;this.props.onEmailsMissingAvatarUrls?.(e)}},100))};onMissingRefMetadata=(e,t)=>{if(!this.props.onRefsMissingMetadata||this.requestedMissingRefsMetadata[e])return;let o=this.pendingMissingRefsMetadata[e]||[],r=t.filter(e=>!o.includes(e));this.pendingMissingRefsMetadata[e]=[...o,...r],this.missingRefsMetadataTimer&&(clearTimeout(this.missingRefsMetadataTimer),this.missingRefsMetadataTimer=void 0),this.missingRefsMetadataTimer=setTimeout(()=>{if(!this.isMounted)return;let e={...this.pendingMissingRefsMetadata};this.pendingMissingRefsMetadata={};let t=Object.keys(e);if(t.length){for(let e of t)this.requestedMissingRefsMetadata[e]=!0;this.props.onRefsMissingMetadata?.(e)}},100)};scheduleVisibleWipShasUpdate=()=>{let{onVisibleWipShasChanged:e,onWipShasMissingStats:t}=this.props;if(!e&&!t)return;this.visibleWipShasTimer&&clearTimeout(this.visibleWipShasTimer);let o=this.props.wipShasSettleDelayMs??100;this.visibleWipShasTimer=setTimeout(()=>{if(this.visibleWipShasTimer=void 0,!this.isMounted)return;let o={},{top:r,bottom:i}=this.getTopAndBottomVisibleRowIndex();if(r>=0&&i>=0)for(let e=r;e<=i;e++){let t=this.orderedGraphRows[e];null!=t&&ep(t)&&(o[t.sha]=!0)}let{missing:n,prunedRequestedDedup:s}=function(e,t,o){let r={};for(let o of Object.keys(t))e[o]&&(r[o]=!0);let i={};for(let t of Object.keys(e)){if(r[t])continue;let e=o?.[t];e?.customContent==null&&(e?.workDirStats===void 0||e?.workDirStatsStale===!0)&&(i[t]=!0)}return{missing:i,prunedRequestedDedup:r}}(o,this.requestedMissingWipStats,this.props.wipNodeMetadataBySha);this.requestedMissingWipStats=s,null!=e&&(void 0===this.lastFiredVisibleWipShas||!function(e,t){let o=Object.keys(e);if(o.length!==Object.keys(t).length)return!1;for(let e of o)if(!t[e])return!1;return!0}(o,this.lastFiredVisibleWipShas))&&(this.lastFiredVisibleWipShas=o,e(o));let a=Object.keys(n);if(null!=t&&a.length>0){for(let e of a)this.requestedMissingWipStats[e]=!0;t(n)}},o)};selectNext(e,t,o){this.selectInDirection("down",e,t,o)}selectPrevious(e,t,o){this.selectInDirection("up",e,t,o)}selectInDirection(e,t,o,r){let i=o&&!this.isFilteredSearch(),n=t?r??"simple":void 0,s=this.getNextShaInDirection(e,t,i,n);s&&(this.currentSha=s,t&&n?this.performRangeSelection(s,n,!0):t||(this.selectCommitsCore([s],{ensureVisible:!0,isTopological:i}),this.selectionAnchorSha=s))}getNextShaInDirection(e,t,o,r){if(t&&"topological"===r&&this.selectionFocusSha){let t=this.selectionAnchorSha??this.selectionFocusSha;return this.findNextReachableFromAnchor(e,this.selectionFocusSha,t,o)}if(o&&!t&&this.selectionFocusSha)return"down"===e?this.getNextTopologicalSha(this.selectionFocusSha):this.getPreviousTopologicalSha(this.selectionFocusSha);let i=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1,n="down"===e?Math.min(i+1,this.orderedGraphRows.length-1):Math.max(0,i-1);return this.orderedGraphRows[n]?.sha}getNextTopologicalSha(e){return this.getSameColumnParent(e)}getPreviousTopologicalSha(e){return this.getSameColumnChild(e)}findNextReachableFromAnchor(e,t,o,r){let i,n=this.processedGraphRowBySha[t];if(!n)return;let s=n.rowIndex,a="down"===e;if(r){let r="down"===e?this.getNextTopologicalSha(t):this.getPreviousTopologicalSha(t);if(r&&this.isReachableFrom(o,r))return r}let l=a?s+1:s-1;if(l>=0&&l<this.orderedGraphRows.length){let e=this.orderedGraphRows[l]?.sha;if(e&&this.isReachableFrom(o,e))return e}let h=this.processedGraphRowBySha[o];if(!h)return;let c=h.rowIndex,d=s===c?a:s>c,u=new Set,p=[o],f=0,m=a?1/0:-1/0;for(;f<p.length&&f<1e3;){let e=p[f++];if(u.has(e))continue;u.add(e);let t=this.processedGraphRowBySha[e];if(!t)continue;(a?t.rowIndex>s&&t.rowIndex<m:t.rowIndex<s&&t.rowIndex>m)&&(i=e,m=t.rowIndex);let o=d?t.parents:this.childrenBySha[e];if(o)for(let e of o)u.has(e)||p.push(e)}return i}isReachableFrom(e,t){if(e===t)return!0;let o=this.processedGraphRowBySha[e],r=this.processedGraphRowBySha[t];if(!o||!r)return!1;let i=r.rowIndex>o.rowIndex,n=new Set,s=[e],a=0;for(;a<s.length&&a<500;){let e=s[a++];if(e===t)return!0;if(n.has(e))continue;n.add(e);let o=i?this.processedGraphRowBySha[e]?.parents:this.childrenBySha[e];if(o)for(let e of o)n.has(e)||s.push(e)}return!1}getSameColumnChild(e){let t=this.childrenBySha[e];if(!t?.length)return;let o=this.processedGraphRowBySha[e],r=o?.column;if(void 0!==r)for(let e of t){let t=this.processedGraphRowBySha[e];if(t&&!t.hidden&&t.column===r)return e}for(let o of t){let t=this.processedGraphRowBySha[o];if(t&&!t.hidden&&t.parents?.[0]===e)return o}}selectPreviousBranchingPoint(){if(!this.selectionFocusSha||this.isFilteredSearch())return;let e=this.selectionFocusSha,t=this.orderedGraphRows.length;for(let o=0;o<t;o++){let t=this.getSameColumnChild(e);if(!t||(e=t,this.isBranchingPoint(e)))break}e!==this.selectionFocusSha&&(this.currentSha=e,this.selectCommitsCore([e],{ensureVisible:!0}),this.selectionAnchorSha=e)}isBranchingPoint(e){let t=this.childrenBySha[e];if(!t?.length)return!1;let o=this.processedGraphRowBySha[e]?.column;if(void 0===o)return!1;for(let e of t){let t=this.processedGraphRowBySha[e];if(t&&!t.hidden&&t.column!==o)return!0}return!1}getSameColumnParent(e){let t=this.processedGraphRowBySha[e];if(!t?.parents?.length)return;let o=t.column;if(void 0!==o){for(let e of t.parents){let t=this.processedGraphRowBySha[e];if(t&&!t.hidden&&t.column===o)return e}for(let e of t.parents){let t=this.processedGraphRowBySha[e];if(t&&!t.hidden)return e}}}selectNextBranchingPoint(){if(!this.selectionFocusSha||this.isFilteredSearch())return;let e=this.selectionFocusSha,t=this.orderedGraphRows.length;for(let o=0;o<t;o++){let t=this.getSameColumnParent(e);if(!t||(e=t,this.isBranchingPoint(e)))break}e!==this.selectionFocusSha&&(this.currentSha=e,this.selectCommitsCore([e],{ensureVisible:!0}),this.selectionAnchorSha=e)}selectNextRef(){let e=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1;for(let t=e+1;t<this.orderedGraphRows.length;t++){let e=this.orderedGraphRows[t];if(e?.hasRefs){this.currentSha=e.sha,this.selectCommitsCore([e.sha],{ensureVisible:!0}),this.selectionAnchorSha=e.sha;return}}}selectPreviousRef(){let e=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:this.orderedGraphRows.length;for(let t=e-1;t>=0;t--){let e=this.orderedGraphRows[t];if(e?.hasRefs){this.currentSha=e.sha,this.selectCommitsCore([e.sha],{ensureVisible:!0}),this.selectionAnchorSha=e.sha;return}}}selectHead(e){let t=null;e&&this.headUpstreamSha?t=this.headUpstreamSha:this.headSha&&(t=this.headSha),this.currentSha=t||null,t&&(this.selectCommitsCore([t],{ensureVisible:!0}),this.selectionAnchorSha=t)}selectFirst(e,t){if(!this.orderedGraphRows.length)return;let o=this.orderedGraphRows[0]?.sha;if(o)if(this.currentSha=o,e){this.selectionAnchorSha??=this.selectionFocusSha??o;let e=t??"simple",r=this.getShiftSelectRange(o,e);if(r?.length){let t="topological"===e;this.selectCommitsCore(r,{ensureVisible:!0,focusSha:o,isKeyboardNav:!0,isTopological:t,isContiguous:!!t||void 0})}}else this.selectCommitsCore([o],{ensureVisible:!0}),this.selectionAnchorSha=o}selectLast(e,t){if(!this.orderedGraphRows.length)return;let o=this.orderedGraphRows.length-1,r=this.orderedGraphRows[o]?.sha;if(r)if(this.currentSha=r,e){this.selectionAnchorSha??=this.selectionFocusSha??r;let e=t??"simple",o=this.getShiftSelectRange(r,e);if(o?.length){let t="topological"===e;this.selectCommitsCore(o,{ensureVisible:!0,focusSha:r,isKeyboardNav:!0,isTopological:t,isContiguous:!!t||void 0})}}else this.selectCommitsCore([r],{ensureVisible:!0}),this.selectionAnchorSha=r}selectPageUp(e,t){if(!this.orderedGraphRows.length)return;let o=Math.max(1,Math.floor(this.getClientHeight()/V.yB)-1),r=Math.max(0,(this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1)-o),i=this.orderedGraphRows[r]?.sha;if(i)if(this.currentSha=i,e){this.selectionAnchorSha??=this.selectionFocusSha??i;let e=t??"simple",o=this.getShiftSelectRange(i,e);if(o?.length){let t="topological"===e;this.selectCommitsCore(o,{ensureVisible:!0,focusSha:i,isKeyboardNav:!0,isTopological:t,isContiguous:!!t||void 0})}}else this.selectCommitsCore([i],{ensureVisible:!0}),this.selectionAnchorSha=i}selectPageDown(e,t){if(!this.orderedGraphRows.length)return;let o=Math.max(1,Math.floor(this.getClientHeight()/V.yB)-1),r=this.selectionFocusSha?this.processedGraphRowBySha[this.selectionFocusSha]?.rowIndex??-1:-1,i=Math.min(this.orderedGraphRows.length-1,r+o),n=this.orderedGraphRows[i]?.sha;if(n)if(this.currentSha=n,e){this.selectionAnchorSha??=this.selectionFocusSha??n;let e=t??"simple",o=this.getShiftSelectRange(n,e);if(o?.length){let t="topological"===e;this.selectCommitsCore(o,{ensureVisible:!0,focusSha:n,isKeyboardNav:!0,isTopological:t,isContiguous:!!t||void 0})}}else this.selectCommitsCore([n],{ensureVisible:!0}),this.selectionAnchorSha=n}getColumns(e,t){let o;this.hasMergeNodeChildBySha[e.sha]&&delete this.hasMergeNodeChildBySha[e.sha];let r=t??e.parents??[],i=this.pinnedBranchShas.has(e.sha),n=this.pinnedBranchShas.size>0,s=this.columnsToFreeWhenFound[e.sha];if(void 0!==s)for(let e=0;e<s.length;e+=1)delete this.columnsUsed[s[e]];let a=this.reserverInfoBySha[e.sha];i?(o=0,this.columnsUsed[0]=!0,delete this.reserverInfoBySha[e.sha]):a?.column!==void 0?(o=a.column,delete this.reserverInfoBySha[e.sha]):o=eh(this.columnsUsed,n);for(let t=0;t<r.length;t+=1){let i=r[t];e.type===L.t$&&(this.hasMergeNodeChildBySha[i]=!0);let s=this.reserverInfoBySha[i];if(0===t&&s?.column!==void 0&&s?.column!==o){let t=this.columnsToFreeWhenFound[i]||[],r=s?.type===L.OZ&&e.type!==L.OZ&&a?.newestDate>s?.newestDate;(s?.column>o||r)&&!this.hasMergeNodeChildBySha[i]?(this.reserverInfoBySha[i]={type:e.type,newestDate:a?.newestDate,column:o},t.push(s.column)):t.push(o),this.columnsToFreeWhenFound[i]=t}else if(s?.column===void 0){var l,h,c;let r=this.pinnedBranchShas.has(i);this.reserverInfoBySha[i]={type:e.type,newestDate:a?.column===o?a?.newestDate:e.date,column:(l=this.columnsUsed,h=t,c=o,r?0:0===h?c:eh(l,n))}}}return o}getFilteredHeadsForGraphRow(e,t){return e.heads.filter(e=>e.isCurrentHead||(t?void 0!==this.includeOnlyRefsById[(0,ea.mH)(ev.z.HEAD,e)]:!this.excludeByType.heads&&void 0===this.excludeRefsById[(0,ea.mH)(ev.z.HEAD,e)]))}getFilteredRemotesForGraphRow(e,t){return e.remotes.filter(e=>t?void 0!==this.includeOnlyRefsById[(0,ea.mH)(ev.z.REMOTE,e)]||!e.owner||void 0!==this.includeOnlyRemotesByName[e.owner]:(!this.excludeByType.remotes||e.owner&&this.downstreamsByUpstream[`${e.owner}/${e.name}`]?.length>0)&&void 0===this.excludeRefsById[(0,ea.mH)(ev.z.REMOTE,e)]&&(!e.owner||void 0===this.excludeRemotesByName[e.owner]))}getBaseFilteredTagsForGraphRow(e,t){return e.tags.filter(e=>t?void 0!==this.includeOnlyRefsById[(0,ea.mH)(ev.z.TAG,e)]:!this.excludeByType.tags&&void 0===this.excludeRefsById[(0,ea.mH)(ev.z.TAG,e)])}loadRowsbySha(e,t){var o;this.orderedGraphRows=[],this.processedGraphRowBySha={};let r=this.isFilteredSearch();this.childrenBySha={},this.shaByRefId={},this.reserverInfoBySha={},this.columnsToFreeWhenFound={},this.columnsUsed={};let i=void 0!==t?t:this.props.pinnedBranchFullName;this.pinnedBranchShas=function(e,t){let o,r=new Set;if(!t)return r;for(let i of e){if(!o){if(!(i.heads?.some(e=>e.id===t)||i.remotes?.some(e=>e.id===t)))continue;o=i.sha}if(i.sha===o&&(r.add(i.sha),!(o=i.parents?.[0])))break}return r}(e,i),this.scopeVisibility=null!=this.props.scope?function(e,t,o=!1){let r,i=eg.get(e);null==i&&(i=new Map,eg.set(e,i));let n=(r=null!=t.additionalBranchRefs&&t.additionalBranchRefs.length>0?[...t.additionalBranchRefs].sort().join(","):"",`${t.branchRef}\0${t.upstreamRef??""}\0${t.mergeTargetTipSha??""}\0${t.mergeBase?.sha??""}\0${t.collapseStyle??""}\0${r}\0${o?"1":"0"}`),s=i.get(n);if(null!=s)return s;let a=function(e,t,o){let r,i=new Set,n=new Set,s=new Set,a=new Set,l=new Map,h=new Set,c=!1,d=function(e,t){let o=new Map,r=new Map,i=new Set;for(let n of e){if(i.add(n.sha),null!=n.parents&&n.parents.length>0&&o.set(n.sha,t?[n.parents[0]]:n.parents),null!=n.heads)for(let e of n.heads)null!=e.id&&r.set(e.id,n.sha);if(null!=n.remotes)for(let e of n.remotes)null!=e.id&&r.set(e.id,n.sha)}return{parentsBySha:o,shaByRefId:r,loadedShas:i}}(e,o),u=t.mergeBase?.sha,p=!1;if(null!=u)if(null!=t.mergeTargetTipSha){for(let e of(r=new Set,em(t.mergeTargetTipSha,d.parentsBySha,r),r))if(!d.loadedShas.has(e)){p=!0;break}r.add(u)}else r=new Set([u]);else if(null!=t.mergeTargetTipSha){for(let e of(r=new Set,em(t.mergeTargetTipSha,d.parentsBySha,r),r))if(!d.loadedShas.has(e)){p=!0;break}}else{let o=new Set;if(o.add(t.branchRef),null!=t.upstreamRef&&o.add(t.upstreamRef),null!=t.additionalBranchRefs)for(let e of t.additionalBranchRefs)o.add(e);let i=function(e,t){let o=new Set;for(let r of e){let e=!1,i=!1;if(null!=r.heads)for(let o of r.heads)null!=o.id&&(t.has(o.id)?e=!0:i=!0);if(null!=r.remotes)for(let o of r.remotes)null!=o.id&&(t.has(o.id)?e=!0:i=!0);i&&!e&&o.add(r.sha)}return o}(e,o);i.size>0&&(r=i)}function f(e){if(n.add(e),null==r)return void em(e,d.parentsBySha,i);if(!function(e,t,o,r){if(o.add(e),r.has(e))return;let i=[e];for(;i.length>0;){let e=i.pop(),n=t.get(e);if(null!=n)for(let e of n)o.has(e)||r.has(e)||(o.add(e),i.push(e))}}(e,d.parentsBySha,i,r),null!=u)d.loadedShas.has(u)?(i.add(u),s.add(u),c=!0):h.add(e);else{let t=function(e,t,o){let r=e,i=new Set;for(;null!=r;){if(o.has(r))return r;if(i.has(r))break;i.add(r);let e=t.get(r);r=null!=e&&e.length>0?e[0]:void 0}}(e,d.parentsBySha,r);null!=t&&(i.add(t),s.add(t),c=!0)}}let m=d.shaByRefId.get(t.branchRef);if(null!=m&&f(m),null!=t.upstreamRef){let e=d.shaByRefId.get(t.upstreamRef);null!=e&&f(e)}if(null!=t.additionalBranchRefs)for(let e of t.additionalBranchRefs){let t=d.shaByRefId.get(e);null!=t&&f(t)}if(null!=t.mergeTargetTipSha&&(i.add(t.mergeTargetTipSha),n.add(t.mergeTargetTipSha),a.add(t.mergeTargetTipSha)),"gap"!==t.collapseStyle){let e=new Set;for(let t of i){let o=d.parentsBySha.get(t);if(null!=o)for(let t of o)i.has(t)&&e.add(t)}for(let t of n){if(e.has(t)||s.has(t))continue;let o=d.parentsBySha.get(t);if(null==o||0===o.length)continue;let r=!1;for(let e of o)if(i.has(e)){r=!0;break}let c=a.has(t);if(r&&!c)continue;let u=function(e,t,o){let r=t.get(e);if(null==r||0===r.length)return[];let i=[],n=new Set,s=[...r],a=0;for(;a<s.length;){let e=s[a];if(a+=1,n.has(e))continue;if(n.add(e),o.has(e)){i.push(e);continue}let r=t.get(e);if(null!=r)for(let e of r)n.has(e)||s.push(e)}return i}(t,d.parentsBySha,i);if(u.length>0){l.set(t,u);continue}if(c&&p){let e=function(e,t,o){let r=[];for(let i of e){if(o.has(i))continue;let n=t.get(i),s=null!=n&&n.length>0?n[0]:void 0;null!=s&&e.has(s)||r.push(i)}return r}(i,d.parentsBySha,n);e.length>0&&l.set(t,e)}r||h.add(t)}}return{visibleShas:i,anchorShas:n,forkPointShas:s,mergeTargetShas:a,syntheticParentsBySha:l,unreachableAnchors:h,isBounded:c&&0===h.size}}(e,t,o);return i.set(n,a),a}(e,this.props.scope,this.props.onlyFirstParent??!1):null,this.syntheticEdgeChildShas=new Set;let n=new Map,s={},a={},l=[],h=[];this.branchUpstreamRowIndices=[],this.interactiveScrollMarkersFromRows=[];let c=[],d=[],u=[],p=[],f=[],m={};if((0,ea.dF)(this.workDirStats,this.props.wipVisibility)&&e.length>0&&!(0,ea.l7)(e[0].type)){let t=(0,ea.pg)(e),r={sha:L.bY,parents:t?[t]:[],author:"",email:"",date:new Date().getTime(),message:this.translateCallback(null==(o=this.workDirStats)?"Graph-WorkInProgress":(0,ed.D7)(o,e=>"number"==typeof e&&e>0)?"Graph-WorkInProgress-Changes":"Graph-WorkInProgress-Clean"),type:L.bY,heads:[],remotes:[],tags:[]};this.workDirStats.context&&(r.contexts={row:this.workDirStats.context}),e.unshift(r)}else!(0,ea.dF)(this.workDirStats,this.props.wipVisibility)&&e.length>0&&(0,ea.l7)(e[0].type)&&e.shift();let g=(0,ed.xV)(this.includeOnlyRefsById),_=g&&(0,ed.D7)(this.includeOnlyRefsById,e=>e.type===ev.z.TAG),v=g&&!_,S=this.props.stashesAnchorCommits??!0,R=[],y=[],T=[],C=[];if(!S)for(let t=0;t<e.length;t+=1){let o=e[t],r=(o.heads?.length??0)>0?this.getFilteredHeadsForGraphRow(o,g):[],i=(o.remotes?.length??0)>0?this.getFilteredRemotesForGraphRow(o,g):[],n=r.length>0||i.length>0,s=(o.tags?.length??0)>0?this.getBaseFilteredTagsForGraphRow(o,_):[];R[t]=r,y[t]=i,T[t]=s,C[t]={hasBaseFilteredTags:s.length>0,hasFilteredBranches:n}}let w=S?void 0:(0,ea.ci)(e,C,v,this.props.onlyFirstParent??!1);for(let t=0;t<e.length;t+=1){let o,i,C=e[t],E=this.childrenBySha[C.sha]?.length>0;null!=this.scopeVisibility&&((0,ea.l7)(C.type)?function(e,t){if(null==t||!ef.has(e.type))return!1;let o=e.parents;if(null==o||0===o.length)return ep(e);if(ep(e)){for(let e of o)if(t.anchorShas.has(e)&&!t.mergeTargetShas.has(e))return!1;return!0}for(let e of o)if(t.visibleShas.has(e))return!1;return!0}(C,this.scopeVisibility)&&(s[C.sha]=!0):this.scopeVisibility.visibleShas.has(C.sha)||(s[C.sha]=!0));let b=this.scopeVisibility?.anchorShas.has(C.sha),I=b?C.heads??[]:S?(C.heads?.length??0)>0?this.getFilteredHeadsForGraphRow(C,g):[]:R[t],M=b?C.remotes??[]:S?(C.remotes?.length??0)>0?this.getFilteredRemotesForGraphRow(C,g):[]:y[t],O=I.length>0||M.length>0,N=b?C.tags??[]:S?(C.tags?.length??0)>0?this.getBaseFilteredTagsForGraphRow(C,_):[]:T[t],x=m[C.sha]||E,A=N.length>0&&(!v||O||x)?N:[];if(null!=this.scopeVisibility){let e=this.scopeVisibility.syntheticParentsBySha.get(C.sha);null!=e&&e.length>0?(o=e,this.syntheticEdgeChildShas.add(C.sha)):o=C.parents?.length>0?C.parents.filter(e=>this.scopeVisibility.visibleShas.has(e)):[]}else o=C.parents?.length>0?C.parents.filter(e=>!s[e]):[];this.props.onlyFirstParent&&o.length>1&&(o=o.slice(0,1));let D=I.length>0||M.length>0||A.length>0,H=I.length>0||M.length>0;if(S||C.type!==L.OZ||o.some(e=>w?.has(e))||(s[C.sha]=!0),C.type!==L.oB&&C.type!==L.t$||m[C.sha]){if(C.type===L.OZ&&this.excludeByType.stashes&&(s[C.sha]=!0),!s[C.sha]&&o.length>0){let e;for(e of o)m[e]=!0}}else C.type!==L.oB&&C.type!==L.t$||m[C.sha]||D||E||(s[C.sha]=!0);let G=s[C.sha],k=G?0:null!=this.scopeVisibility||this.props.onlyFirstParent?this.getColumns(C,o):this.getColumns(C);r&&(i=k,k=0);let W=new ec.Y(this,{...C,heads:I,remotes:M,tags:A,parents:o},k,void 0,void 0,void 0,void 0,i);if(null!=this.scopeVisibility&&(this.scopeVisibility.mergeTargetShas.has(C.sha)?W.scopeBoundaryKind="mergeTarget":this.scopeVisibility.forkPointShas.has(C.sha)&&(W.scopeBoundaryKind="forkPoint")),!G){let e,i=n.get(C.sha);i?.length&&(i.sort((e,t)=>{if(e.parentIndexScore<t.parentIndexScore)return -1;if(e.parentIndexScore>t.parentIndexScore)return 1;if(e.parentIndexScore===t.parentIndexScore){if(e.rowEntered<t.rowEntered)return -1;if(e.rowEntered>t.rowEntered)return 1}return 0}),e=i[0],W.childRefs={heads:[...e?.heads||[]],remotes:[...e?.remotes||[]],tags:[...e?.tags||[]]},n.delete(C.sha));for(let r=0;r<o.length;r+=1){let i=o[r];if(this.childrenBySha[i]||(this.childrenBySha[i]=[]),this.childrenBySha[i].push(C.sha),b)continue;let s=n.get(i);(H||e)&&void 0===s&&(s=[],n.set(i,s)),H?s?.unshift({sha:C.sha,parentIndexScore:r,rowEntered:t,heads:I,remotes:M,tags:A}):e&&s?.unshift({...e,parentIndexScore:r,rowEntered:t})}if(!r||this.highlightedShas[C.sha]){let e=this.orderedGraphRows.length;W.rowIndex=e,this.orderedGraphRows.push(W);let t=(t,o)=>{this.interactiveScrollMarkersFromRows.push({type:t,rowIndex:e,sha:W.sha,label:o})};if(I.length){c.push(e);let o=I.find(e=>e.isCurrentHead);for(let r of(null!=o&&(this.headSha=W.sha,l.push(e),t("head",o.name?`HEAD \u2192 ${o.name}`:"HEAD")),I))r.isCurrentHead||t("localBranches",r.name)}if(M.length)for(let o of(d.push(e),M)){let r=o.owner?`${o.owner}/${o.name}`:o.name;o.current?(h.push(e),this.headUpstreamSha=W.sha,t("upstream",r)):t("remoteBranches",r),this.downstreamsByUpstream[`${o.owner}/${o.name}`]?.length&&this.branchUpstreamRowIndices.push(e)}if(A.length)for(let o of(u.push(e),A))t("tags",o.name);C.type===L.OZ&&(p.push(e),t("stashes",C.message?`Stash: ${C.message}`:"Stash")),(0,ea.l7)(C.type)&&(f.push(e),t("wip",C.message||"WIP"))}if(I.length)for(let e of I)this.shaByRefId[(0,ea.mH)(ev.z.HEAD,e)]=W.sha;if(M.length)for(let e of M)this.shaByRefId[(0,ea.mH)(ev.z.REMOTE,e)]=W.sha;if(A.length)for(let e of A)this.shaByRefId[(0,ea.mH)(ev.z.TAG,e)]=W.sha}this.processedGraphRowBySha[C.sha]=W,a[C.sha]=k}this.props.onColumnsCalculated?.(a);let E=this.props.onScopeAnchorsUnreachable,b=this.scopeVisibility?.unreachableAnchors;if(null!=E&&null!=b&&b.size>0){let e=this._lastReportedUnreachable,t=e?.size!==b.size;if(!t&&null!=e){for(let o of b)if(!e.has(o)){t=!0;break}}t&&(this._lastReportedUnreachable=new Set(b),E(b))}else null!=this._lastReportedUnreachable&&(null==b||0===b.size)&&(this._lastReportedUnreachable=null);this.isMounted?this.setState(e=>({markerRowIndices:{...e.markerRowIndices,head:l,upstream:h,localBranches:c,remoteBranches:d,tags:u,stashes:p,wip:f},interactiveScrollMarkers:this.computeInteractiveScrollMarkers()})):this.state={...this.state,markerRowIndices:{...this.state?.markerRowIndices,head:l,upstream:h,localBranches:c,remoteBranches:d,tags:u,stashes:p,wip:f},interactiveScrollMarkers:this.computeInteractiveScrollMarkers()},this.clearTimelinesInterval(),this.updateTimelines(),this.timelinesInterval=setInterval(this.onTimelinesRefreshInterval,9e5),this.onGraphVisibleRowsUpdated()}updateRowStatsConstraints(){this.rowStatsConstraints=(0,ea.S6)(null!=this.rowsStats?Object.values(this.rowsStats).map(e=>e.additions+e.deletions):[])}updateTimelines(){let e=(0,ea.ug)();(0,ea.Vs)(this.orderedGraphRows,e)}clearTimelines(){for(let e of Object.values(this.processedGraphRowBySha))e.timeLineEntry=void 0}clearTimelinesInterval(){this.timelinesInterval&&(clearInterval(this.timelinesInterval),this.timelinesInterval=void 0)}onTimelinesRefreshInterval=()=>{this.isMounted&&(this.clearTimelines(),this.updateTimelines(),this.setState({processedRows:[...this.orderedGraphRows]}))};cleanupSelections(){for(let e of this.selectedShas)this.processedGraphRowBySha[e]||(this.selectedShas.delete(e),this.selectionFocusSha===e&&(this.selectionFocusSha=void 0));this.selectionAnchorSha&&!this.processedGraphRowBySha[this.selectionAnchorSha]&&(this.selectionAnchorSha=void 0)}getColumnColorByColumn(e){let t=this.getNumGraphColumns(e),o=this.maxColumns>t?this.maxColumns:t,r={};for(let n=0;n<=o;n+=1)if(n<t){var i;let t=e[(0,P.$6)(n)];r[n]="rgba"===(i=z(t)).type?`rgba(${i.r}, ${i.g}, ${i.b}, ${Number(i.a.toFixed(2))})`:`hsla(${i.h}, ${(100*i.s).toFixed(2)}%, ${(100*i.l).toFixed(2)}%, ${Number(i.a.toFixed(2))})`}else{let e=r[n%t];r[n]=e}return r}getNumGraphColumns(e){let t=Number.parseInt(e[F.u],V.Dl);return Number.isNaN(t)?V.Dl:t}expandLastZoneMinWidthForScrollbar(e){let t=e[e.length-1]?.type;if(!t)return;let o=(0,ea.eQ)(this.props.cssVariables,!0),r=V.W[t].minimumWidth+o,i=this.graphZonesByType[t];if(!i||null!=i.maximumWidth&&r>i.maximumWidth)return;i.minimumWidth=r;let n=V.W[t].showIconWidth;null!=n&&(i.showIconWidth=n+o),i.currentWidth<i.minimumWidth&&(i.currentWidth=i.minimumWidth),i.preferredWidth<i.minimumWidth&&(i.preferredWidth=i.minimumWidth)}ensureZoneWidthsMatchGraphWidth(e,t){let o=(0,ea.al)(e);o>t&&this.shrinkZoneWidthsToFitWidth(e,t),o<t&&this.expandZoneWidthsToFitWidth(e,t)}shrinkZoneWidthsToFitWidth(e,t,o){let r=(0,ea.al)(e);for(;r>t;){let i=(0,ea.Q9)(e,o);if(!i)break;let n=(0,ea.al)(e,i.type);if(n+i.currentWidth>t){let o=(0,ea.jY)(i,e,t-n);this.updateWidthByZone(o,i.type)}r=(0,ea.al)(e)}}getOrderedActiveGraphZones(){return this.graphZoneOrdering.sort((e,t)=>this.graphZonesByType[e].order-this.graphZonesByType[t].order).filter(e=>!this.graphZonesByType[e].isHidden).map(e=>this.graphZonesByType[e])}expandZoneWidthsToFitWidth(e,t,o){let r=(0,ea.al)(e);for(;r<t;){let i=(0,ea.fW)(e,o);if(!i)break;let n=(0,ea.al)(e,i.type),s=i.maximumWidth?Math.min(i.maximumWidth,i.preferredWidth||1/0):i.preferredWidth||0;if(n+i.currentWidth<t){let o=t-n;!(0,ea.z)(i.type,e)&&o>s&&(o=s),o=(0,ea.jY)(i,e,o),this.updateWidthByZone(o,i.type)}r=(0,ea.al)(e)}}onGraphHeaderRowMouseDown=e=>{1===e.button&&e.preventDefault()};onToggleRefNodesShown=(e,t,o,r)=>{t.forEach(e=>{o&&this.excludeRefsById[e.id]?delete this.excludeRefsById[e.id]:o||(this.excludeRefsById[e.id]=e)}),this.excludeRemotesByName=this.getExcludeRemotesByName(),this.props.onToggleRefsVisibilityClick?.(e,t,o,r?this.processedGraphRowBySha[r]:void 0),this.processRows(this.props.graphRows),this.setState({processedRows:[...this.orderedGraphRows]})};cleanEdgeCaches(){eN={},eO={},eM={},eI={},Q={}}onZoneEnter=(e,t,o,r)=>{t!==V.ui&&(o&&r&&this.onRefNodeUnhovered(e,o,r),this.onRefZoneUnhovered())};adjustResizedGraphZone(e,t,o,r){if(o?.width){let i=t.currentWidth;this.updateWidthByZone(o.width,t.type,r);let n=(0,ea.kU)(t.type,e),s=this.graphZonesByType[t.type];i>s.currentWidth&&this.expandZoneWidthsToFitWidth(e,this.graphWidth,n+1),i<s.currentWidth&&this.shrinkZoneWidthsToFitWidth(e,this.graphWidth,n-1)}}dimRowsOfSelectedCommit(e){this.state.dimRowsOfSelectedCommit!==e&&this.setState({dimRowsOfSelectedCommit:e})}onGraphContainerBlurred=(e,t,o)=>{setTimeout(()=>{this.isMounted&&(t&&o&&this.onRefNodeUnhovered(e,t,o),this.onRefZoneUnhovered())},250)};onGraphContainerMouseEnter=e=>{this.props.onGraphMouseEnter?.(e)};onGraphContainerMouseLeave=e=>{let t=e.relatedTarget;if(t instanceof HTMLElement&&t.closest(".ref-popover"))return void this.props.onGraphMouseLeave?.(e);let{currentlyHoveredCommitSha:o}=this.state;if(null!=o){let t=this.processedGraphRowBySha[o];null!=t&&this.props.onGraphRowUnhovered?.(e,V.md,t),this.setState({currentlyHoveredCommitSha:void 0})}this.props.onGraphMouseLeave?.(e)};_headerHoverRestoreTimer;onGraphHeaderMouseDown=()=>{let{currentlyHoveredCommitSha:e}=this.state;if(null!=e){if(this.props.onGraphRowUnhovered){let t=this.processedGraphRowBySha[e];null!=t&&this.props.onGraphRowUnhovered({nativeEvent:{relatedTarget:null},relatedTarget:null},V.md,t)}this.setState({currentlyHoveredCommitSha:void 0})}};onGraphHeaderMouseUp=e=>{this.hoverRowForHeaderEvent(e.clientX,e.clientY,e.target)};onGraphHeaderWheel=e=>{let{currentlyHoveredCommitSha:t}=this.state;if(null!=t){if(this.props.onGraphRowUnhovered){let e=this.processedGraphRowBySha[t];null!=e&&this.props.onGraphRowUnhovered({nativeEvent:{relatedTarget:null},relatedTarget:null},V.md,e)}this.setState({currentlyHoveredCommitSha:void 0})}let o=this.orderedGraphRows?.length??0;if(!o)return;let{hasMoreCommits:r,scrollLeft:i,scrollTop:n}=this.state,s=this.graphWidth||this.state.width||0,a=(this.graphHeight||this.state.height||0)-V.q4;if(s<=0||a<=0)return;let l=o*V.yB,h=Math.max(0,l-a),c=n+e.deltaY;if((c=(0,eS.q)(c,0,h))===n)return;let d={clientHeight:a,clientWidth:s,scrollHeight:l,scrollLeft:i,scrollTop:c,scrollWidth:s},u=this.getOrderedActiveGraphZones(),p=u.length>0?u[u.length-1].type:V.md;this.onScrollForZone(p,d,s,a,r);let f=e.target;if(f){this._headerHoverRestoreTimer&&clearTimeout(this._headerHoverRestoreTimer);let t=e.clientX,o=e.clientY;this._headerHoverRestoreTimer=setTimeout(()=>{this._headerHoverRestoreTimer=void 0,this.hoverRowForHeaderEvent(t,o,f)},200)}e.preventDefault()};onGraphHeaderMouseMove=e=>{0===e.buttons&&this.hoverRowForHeaderEvent(e.clientX,e.clientY,e.target)};hoverRowForHeaderEvent(e,t,o){if(!(o instanceof HTMLElement))return;let r=o.closest(".resizable-handle.horizontal");if(null==r||r.closest(`#${V.ui}-header`))return;let i=this.graphContainerRef?.current;if(null==i)return;let n=this.orderedGraphRows?.length??0;if(!n)return;let s=i.getBoundingClientRect(),a=t-s.top;if(a<0)return;let l=this.state.scrollTop??0,{currentlyHoveredCommitSha:h}=this.state,c=Math.floor((a+l)/V.yB);if(c<0||c>=n)return;let d=this.orderedGraphRows[c];if(!d)return;let u=s.top+c*V.yB-l,p=V.yB,f={getBoundingClientRect:()=>({top:u,left:e,right:e+60,bottom:u+p,x:e,y:u,width:60,height:p})};this.onCurrentlyHoveredGraphCommit({clientX:e,currentTarget:f,nativeEvent:{clientX:e,currentTarget:f,target:f}},V.md,d.sha,h)}onGraphResized=(0,ea.xJ)((e,t)=>{if(!this.isMounted)return;let o=Math.floor(t),r=Math.floor(e);if(0===r||0===o)return;let i=o!==this.graphHeight,n=r!==this.graphWidth,s={};if(i&&(this.graphHeight=o,s.height=o),n){this.graphWidth=r;let e=this.getOrderedActiveGraphZones();this.ensureZoneWidthsMatchGraphWidth(e,this.graphWidth),s.width=this.graphWidth,s.graphZones=e}(i||n)&&(this.setState(s),i&&this.onGraphVisibleRowsUpdatedThrottled(),this.props.onGraphResized&&this.props.onGraphResized(this.graphWidth,this.graphHeight))});onGraphVisibleRowsUpdated(){if(this.scheduleVisibleWipShasUpdate(),!this.isMounted||!this.props.onGraphVisibleRowsChanged||!this.orderedGraphRows?.length)return;let{top:e,bottom:t}=this.getTopAndBottomVisibleRowIndex();-1===e||-1===t||e>=this.orderedGraphRows.length||t>=this.orderedGraphRows.length||e===this.lastTopVisibleRowIndex&&t===this.lastBottomVisibleRowIndex||(this.lastTopVisibleRowIndex=e,this.lastBottomVisibleRowIndex=t,this.props.onGraphVisibleRowsChanged&&this.props.onGraphVisibleRowsChanged(this.orderedGraphRows[e],this.orderedGraphRows[t]))}getCurrentPlatform(){return this.props.platform||"darwin"}isMacOSPlatform(){return"darwin"===this.getCurrentPlatform()}isFilteredSearch(){return"filter"===this.searchMode&&(0,ed.Hk)(this.highlightedShas)}getGraphColumnSettingFromZoneType(e){return{width:e.preferredWidth||0,isHidden:e.isHidden,mode:e.mode,order:e.order}}decorateWithHelmet=(e,t,o)=>{let r=(0,P.JQ)(t);return A.createElement(A.Fragment,null,A.createElement("style",{nonce:o},r),A.createElement("div",{className:"gk-graph"},e))};render(){let{columnsSettings:e,customFooterRow:t,headerZoneActions:o,isInUnsupportedRebase:r,isCommitting:i,repoPath:n,nonce:s,pinnedBranchFullName:a,rowAdornmentProvider:l,suppressNonRefRowTooltips:h,wipMessageEditable:c}=this.props,{avatarUrlByEmail:d,columnColorByColumn:u,contexts:p,createRefFormData:f,cssVariablesWithDefaults:m,currentlyHoveredCommitSha:g,dimMergeCommits:_,dimRowsOfSelectedCommit:v,enableShowHideRefsOptions:S,highlightRowsOnRefHover:R,showGhostRefsOnRowHover:y,showRemoteNamesOnRefs:T,enabledRefMetadataTypes:C,enabledScrollMarkerTypes:w,graphCommitDescDisplayMode:E,graphZones:b,hasMoreCommits:I,height:M,highlightedShas:O,hoveredRefGroup:N,hoveredRefZoneSha:D,themeOpacityFactor:H,isLoadingRows:G,rowsStatsLoading:k,numGraphColumns:W,pendingCommitMessageSummary:z,processedRows:F,refIconsPosition:P,refMetadataById:B,useAuthorInitialsForAvatars:Z,scrollToAlignment:U,scrollToIndex:j,scrollTop:$,scrollLeft:Y,shaLength:q,width:Q,workDirStats:J}=this.state,ee=x()("flex","graph-container"),et=(0,ea.xd)(F),eo=this.getOrCreateSmartCellRangeRenderer(Y,this.isKeyboardNavigating),er=this.getLeftGutterWidth(),ei=this.getRightGutterWidth(),en=this.getRightGutterBoxShadowAlpha(H),es=this.getLeftGutterBoxShadowAlpha(H),el=this.getNodeOffsetByColumn(),eh=this.getNodeOpacityByColumn(),ec=(0,ea.kU)(V.ui,b),ep=(0,ea.kU)(V.md,b),ef=!N,em={alwaysShowTimelines:this.isFilteredSearch(),avatarUrlByEmail:d,createRefFormData:f??void 0,dimMergeCommits:_,dimRowsOfSelectedCommit:v,enableShowHideRefsOptions:S,highlightRowsOnRefHover:R,showGhostRefsOnRowHover:y,showRemoteNamesOnRefs:T,enabledRefMetadataTypes:C,enabledScrollMarkerTypes:w,isInUnsupportedRebase:r||!1,isCommitting:i||!1,pendingCommitMessageSummary:z,workDirStats:J,wipNodeMetadataBySha:this.props.wipNodeMetadataBySha,repoPath:n,columnColorByColumn:u,currentlyHoveredCommitSha:g,cssVariables:m,graphCommitDescDisplayMode:E,graphZoneModeConstants:this.graphZoneModeConstants,graphZones:b,hasMoreCommits:I,height:M,highlightedShas:O,hoveredRefGroup:N,hoveredRefZoneSha:D,includeOnlyRefsById:this.includeOnlyRefsById,includeOnlyRemotesByName:this.includeOnlyRemotesByName,isLoadingRows:G,selectedShas:this.selectedShas,leftGutterBoxShadowAlpha:es,leftGutterWidth:er,nodeOffsetByColumn:el,nodeOpacityByColumn:eh,nonce:s,numGraphColumns:W,pinnedBranchFullName:a,processedRows:F,processedGraphRowBySha:this.processedGraphRowBySha,refIconsPosition:P,refMetadataById:B,fallbackRefMetadataById:this.previousRefMetadataById,rightGutterBoxShadowAlpha:en,rightGutterWidth:ei,rowStatsConstraints:this.rowStatsConstraints,rowsStats:this.rowsStats,suppressNonRefRowTooltips:h,useAuthorInitialsForAvatars:Z,scrollToAlignment:U,scrollLeft:Y,scrollTop:$,shaLength:q,shouldShowRefLine:-1!==ec&&-1!==ep&&ep-ec==1,width:Q,wipMessageEditable:c||!1,onMissingAvatar:this.onMissingAvatar,onMissingRefMetadata:this.onMissingRefMetadata,clearCurrentlyHoveredGraphCommit:this.onClearCurrentlyHoveredGraphCommit,setAsCurrentlyHoveredGraphCommit:this.onCurrentlyHoveredGraphCommit,onClickRef:this.onClickRef,onClickCommit:this.onClickCommit,onDoubleClickCommit:this.onDoubleClickCommit,onBlurWipNodeInput:this.onBlurWipNodeInput,onFocusWipNodeInput:this.onFocusWipNodeInput,onDoubleClickRef:this.onDoubleClickRef,onMessageChange:this.onMessageChange,onRefBeginDrag:this.onRefBeginDrag,onRefCanDrag:this.onRefCanDrag,onRefCanDrop:this.onRefCanDrop,onRefCreate:this.onRefCreate,onRefCreateCancel:this.onRefCreateCancel,onRefCreateContextMenu:this.onRefCreateContextMenu,onRefDragEnter:this.onRefDragEnter,onRefDragLeave:this.onRefDragLeave,onRefDrop:this.onRefDrop,onRefEndDrag:this.onRefEndDrag,onRefNodeHovered:this.onRefNodeHovered,onRefNodeUnhovered:this.onRefNodeUnhovered,onRefShorthandChange:this.onRefShorthandChange,onRefZoneHovered:this.onRefZoneHovered,onRefZoneUnhovered:this.onRefZoneUnhovered,onToggleRefNodesShown:this.onToggleRefNodesShown,onCommitContextMenu:this.onCommitContextMenu,onShowContextMenuForGroupedRef:this.onRefContextMenu,getExternalIcon:this.getIconCallback,formatCommitDateTime:this.formatCommitDateTimeCallback,formatRefShorthand:this.formatRefShorthandCallback,isRefShorthandValid:this.isRefShorthandValidCallback,translate:this.translateCallback},eg={[V.ui]:((e,t)=>{let{createRefFormData:o,formatRefShorthand:r,enableShowHideRefsOptions:i,enabledRefMetadataTypes:n,isRefShorthandValid:s,showGhostRefsOnRowHover:a,showRemoteNamesOnRefs:l,onDoubleClickRef:h,processedRows:c,includeOnlyRefsById:d,includeOnlyRemotesByName:u,isInUnsupportedRebase:p,getExternalIcon:f,hoveredRefGroup:m,hoveredRefZoneSha:g,numGraphColumns:_,onClickRef:v,onMissingRefMetadata:S,onShowContextMenuForGroupedRef:R,onRefBeginDrag:y,onRefCanDrag:T,onRefCanDrop:C,onRefCreate:w,onRefCreateCancel:E,onRefCreateContextMenu:b,onRefDragEnter:I,onRefDragLeave:M,onRefDrop:O,onRefEndDrag:N,onRefNodeHovered:x,onRefNodeUnhovered:D,onRefShorthandChange:H,onRefZoneHovered:G,onRefZoneUnhovered:k,onToggleRefNodesShown:W,pinnedBranchFullName:z,refIconsPosition:L,refMetadataById:F,fallbackRefMetadataById:P,shouldShowRefLine:B,translate:Z,clearCurrentlyHoveredGraphCommit:U,currentlyHoveredCommitSha:j}=e,$=new ea.n$(e);return({rowIndex:e,style:Y})=>{let K=t(e),q=c[e],X=V.ui,Q=$.getZoneWidth(X),J=$.isHovering(e),{sha:ee,type:et,hasRefs:eo,contexts:er}=q,ei=er?.ref||null,en=er?.refGroups||null,es=$.isSingleSelected(e),ea=(a||eo)&&(eo||J||es)?$.getGraphRefGroupsByNameForRow(e):[],el=$.isColumnFollowingGraphColumn(X),eh=$.shouldUseColumnHeaderIcons(X);return o?.sha===ee?A.createElement(n8,{createRefFormData:o,formatRefShorthand:r,isRefShorthandValid:s,key:K,onCancel:E,onContextMenu:b,onRefCreate:w,onRefShorthandChange:H,refZoneWidth:Q,style:Y,translate:Z}):A.createElement(si,{clearCurrentlyHoveredGraphCommit:U,column:q.column,columnForColoring:q.columnForColoring,context:ei,currentlyHoveredCommitSha:j??null,enabledRefMetadataTypes:n,enableShowHideRefsOptions:i,fallbackRefMetadata:P,getExternalIcon:f,hasActive:$.rowContainsCurrentHeadRef(q),hasRefs:eo||!1,hasTimeline:$.hasTimeline(e),hoveredRefGroup:m??null,hoveredRefZoneSha:g,includeOnlyRefsById:d,includeOnlyRemotesByName:u,isInUnsupportedRebase:p,isSingleSelected:es,key:K,numGraphColumns:_,onClickRef:v,onDoubleClickRef:h,onMissingRefMetadata:S,onRefBeginDrag:y,onRefCanDrag:T,onRefCanDrop:C,onRefDragEnter:I,onRefDragLeave:M,onRefDrop:O,onRefEndDrag:N,onToggleRefNodesShown:W,pinnedBranchFullName:z,refGroupContexts:en,refGroupsByName:ea,refIconsPosition:L,refMetadata:F,refNodeHovered:x,refNodeUnhovered:D,refZoneHovered:G,refZoneUnhovered:k,scopeBoundaryKind:q.scopeBoundaryKind,sha:ee,shouldShowRefLine:B,showColorStrip:el,showContextMenuForGroupedRef:R,showGhostRefsOnRowHover:a,showRemoteNamesOnRefs:l,style:Y,translate:Z,type:et,useColumnHeaderIcons:eh,width:Q})}})(em,et),[V.md]:n9(em,et),[V.d4]:((e,t)=>{let{dimMergeCommits:o,dimRowsOfSelectedCommit:r,processedRows:i,translate:n,getExternalIcon:s,graphCommitDescDisplayMode:a,highlightRowsOnRefHover:l,isInUnsupportedRebase:h,numGraphColumns:c,isCommitting:d,pendingCommitMessageSummary:u,workDirStats:p,wipNodeMetadataBySha:f,onBlurWipNodeInput:m,onFocusWipNodeInput:g,onMessageChange:_,clearCurrentlyHoveredGraphCommit:v,currentlyHoveredCommitSha:S,onCommitContextMenu:R,onClickCommit:y,onDoubleClickCommit:T,setAsCurrentlyHoveredGraphCommit:C,suppressNonRefRowTooltips:w,wipMessageEditable:E}=e,b=new ea.n$(e);return({rowIndex:e,style:I})=>{let M=t(e),O=i[e],{displaySummary:N,displayBody:x,sha:D,type:H,contexts:G,message:k}=O,W=G?.message||void 0,z=G?.row||void 0,F=V.d4,P=b.isColumnFollowingGraphColumn(F),B=b.isLastColumn(F),Z=b.getZoneWidth(F),U=b.getVerticalScrollWidth(F),j=b.isHovering(e),{hasWorkDirChanges:$,isWipEditable:Y,customWipContent:K}=eu(D,H,p,f,E),q=a===V.FQ.ALWAYS||a===V.FQ.ON_HOVER&&j,X=H!==L.bY||Y?A.createElement(A.Fragment,null,A.createElement("span",{className:"message-zone--summary"},N),q&&x?A.createElement("span",{className:"message-zone--body"},x):null):A.createElement("span",{className:"message-zone--wip-row"},A.createElement("span",{className:"message-zone--wip-text"},q?N:null),K);return $&&Y?A.createElement(nY,{clearCurrentlyHoveredGraphCommit:v,currentlyHoveredCommitSha:S??null,getExternalIcon:s,graphZoneType:F,isCommitting:d,isHovering:b.isHovering(e),isSelected:b.isSelected(e),key:M,onBlur:m,onClickCommit:y,onContextMenu:R,onFocus:g,onMessageChange:_,setAsCurrentlyHoveredGraphCommit:C,sha:D,style:I,translate:n,value:u,workDirStats:p}):A.createElement(nL,{clearCurrentlyHoveredGraphCommit:v,column:O.column,columnForColoring:O.columnForColoring,context:W,currentlyHoveredCommitSha:S??null,dimRowsOfSelectedCommit:r,getExternalIcon:s,graphZoneType:F,hasActive:b.rowIsActiveHead(O),highlightRowsOnRefHover:l,isDimmedMergeCommitRow:H===L.t$&&o,isHighlighted:b.isHighlighted(e),isHovering:j,isInUnsupportedRebase:h,isLastColumn:B,isMissingHoveredRefGroup:b.isMissingHoveredRefGroup(e),isSelected:b.isSelected(e),key:M,numGraphColumns:c,onClickCommit:y,onContextMenu:R,onDoubleClickCommit:T,rowContext:z,scopeBoundaryKind:O.scopeBoundaryKind,setAsCurrentlyHoveredGraphCommit:C,sha:D,showColorStrip:P,showConflictIcon:H===L.l2||H===L.gL,showTimeline:b.hasTimeline(e),style:I,title:w?void 0:k,type:H,verticalScrollWidth:U,zoneWidth:Z},X)}})(em,et),[V.fx]:((e,t)=>{let{avatarUrlByEmail:o,clearCurrentlyHoveredGraphCommit:r,cssVariables:i,currentlyHoveredCommitSha:n,dimMergeCommits:s,dimRowsOfSelectedCommit:a,getExternalIcon:l,highlightRowsOnRefHover:h,processedRows:c,isInUnsupportedRebase:d,onCommitContextMenu:u,onClickCommit:p,onDoubleClickCommit:f,numGraphColumns:m,setAsCurrentlyHoveredGraphCommit:g,suppressNonRefRowTooltips:_,useAuthorInitialsForAvatars:v}=e,S=new ea.n$(e);return({rowIndex:e,style:R})=>{let y=t(e),T=c[e],{author:C,email:w,message:E,sha:b,type:I,contexts:M}=T,O=V.fx,N=S.getActiveGraphZone(O),D=I!==L.bY?C:null,H=I!==L.bY?nP(C,w):void 0,G=M?.author||void 0,k=M?.row||void 0,W=S.isColumnFollowingGraphColumn(O),z=S.isLastColumn(O),F=S.getZoneWidth(O),P=(F<=N.minimumWidth||N?.mode===V.eB.Rich)&&I!==L.bY;if(P){let e=v?void 0:o[w];D=A.createElement(nB,{authorInitials:nF(C),avatarUrl:e,className:x()("node",L.oB,"z6"),column:T.column,context:M?.avatar||void 0,cssVariables:i,fontSize:10,height:V.n0,size:V.CF,tooltip:_?void 0:()=>{let e=C&&""!==C.trim()&&"Unknown"!==C?nP(C,w):w,t=X(K(E||"")),o="";if(0===t.length)o=e;else{t.unshift({email:w,name:C});for(let e=0;e<t.length;e+=1){let r=t[e];o+=nP(r.name,r.email),e<t.length-1&&(o+=", ")}}return o},useAuthorInitialsForAvatars:v,width:V.n0})}return A.createElement(nL,{clearCurrentlyHoveredGraphCommit:r,column:T.column,columnForColoring:T.columnForColoring,context:G,currentlyHoveredCommitSha:n??null,dimRowsOfSelectedCommit:a,getExternalIcon:l,graphZoneType:O,hasAvatars:P,highlightRowsOnRefHover:h,isDimmedMergeCommitRow:I===L.t$&&s,isHighlighted:S.isHighlighted(e),isHovering:S.isHovering(e),isInUnsupportedRebase:d,isLastColumn:z,isMissingHoveredRefGroup:S.isMissingHoveredRefGroup(e),isSelected:S.isSelected(e),key:y,numGraphColumns:m,onClickCommit:p,onContextMenu:u,onDoubleClickCommit:f,rowContext:k,scopeBoundaryKind:T.scopeBoundaryKind,setAsCurrentlyHoveredGraphCommit:g,sha:b,showColorStrip:W,showTimeline:S.hasTimeline(e),style:R,title:_?void 0:H,type:I,verticalScrollWidth:S.getVerticalScrollWidth(O),zoneWidth:F},D)}})(em,et),[V.$A]:((e,t)=>{let{processedRows:o,getExternalIcon:r,highlightRowsOnRefHover:i,isInUnsupportedRebase:n,numGraphColumns:s,formatCommitDateTime:a,clearCurrentlyHoveredGraphCommit:l,dimMergeCommits:h,dimRowsOfSelectedCommit:c,currentlyHoveredCommitSha:d,onCommitContextMenu:u,onClickCommit:p,onDoubleClickCommit:f,setAsCurrentlyHoveredGraphCommit:m,suppressNonRefRowTooltips:g}=e,_=new ea.n$(e);return({rowIndex:e,style:v})=>{let S=t(e),R=o[e],{date:y,sha:T,type:C,contexts:w}=R,E=y&&C!==L.bY?a(y,L.N.RowEntry):null,b=y&&C!==L.bY?a(y,L.N.Tooltip):void 0,I=w?.date||void 0,M=w?.row||void 0,O=V.$A,N=_.isColumnFollowingGraphColumn(O),x=_.isLastColumn(O),D=_.getZoneWidth(O),H=_.getVerticalScrollWidth(O);return A.createElement(nL,{clearCurrentlyHoveredGraphCommit:l,column:R.column,columnForColoring:R.columnForColoring,context:I,currentlyHoveredCommitSha:d??null,dimRowsOfSelectedCommit:c,getExternalIcon:r,graphZoneType:O,highlightRowsOnRefHover:i,isDimmedMergeCommitRow:C===L.t$&&h,isHighlighted:_.isHighlighted(e),isHovering:_.isHovering(e),isInUnsupportedRebase:n,isLastColumn:x,isMissingHoveredRefGroup:_.isMissingHoveredRefGroup(e),isSelected:_.isSelected(e),key:S,numGraphColumns:s,onClickCommit:p,onContextMenu:u,onDoubleClickCommit:f,rowContext:M,scopeBoundaryKind:R.scopeBoundaryKind,setAsCurrentlyHoveredGraphCommit:m,sha:T,showColorStrip:N,showTimeline:!1,style:v,title:g?void 0:b,type:C,verticalScrollWidth:H,zoneWidth:D},E)}})(em,et),[V.AR]:((e,t)=>{let{processedRows:o,getExternalIcon:r,highlightRowsOnRefHover:i,isInUnsupportedRebase:n,numGraphColumns:s,clearCurrentlyHoveredGraphCommit:a,currentlyHoveredCommitSha:l,dimMergeCommits:h,dimRowsOfSelectedCommit:c,onCommitContextMenu:d,onClickCommit:u,onDoubleClickCommit:p,setAsCurrentlyHoveredGraphCommit:f,shaLength:m,suppressNonRefRowTooltips:g}=e,_=new ea.n$(e);return({rowIndex:e,style:v})=>{let S=t(e),R=o[e],{sha:y,type:T,contexts:C}=R,w=((e,t=V.wT)=>e?e.substring(0,t):"")(y,m??void 0),E=C?.sha||void 0,b=C?.row||void 0,I=V.AR,M=_.isColumnFollowingGraphColumn(I),O=_.isLastColumn(I),N=_.getZoneWidth(I),x=_.getVerticalScrollWidth(I);return A.createElement(nL,{clearCurrentlyHoveredGraphCommit:a,column:R.column,columnForColoring:R.columnForColoring,context:E,currentlyHoveredCommitSha:l??null,dimRowsOfSelectedCommit:c,getExternalIcon:r,graphZoneType:I,highlightRowsOnRefHover:i,isDimmedMergeCommitRow:T===L.t$&&h,isHighlighted:_.isHighlighted(e),isHovering:_.isHovering(e),isInUnsupportedRebase:n,isLastColumn:O,isMissingHoveredRefGroup:_.isMissingHoveredRefGroup(e),isSelected:_.isSelected(e),key:S,numGraphColumns:s,onClickCommit:u,onContextMenu:d,onDoubleClickCommit:p,rowContext:b,scopeBoundaryKind:R.scopeBoundaryKind,setAsCurrentlyHoveredGraphCommit:f,sha:y,showColorStrip:M,showTimeline:_.hasTimeline(e),style:v,type:T,verticalScrollWidth:x,zoneWidth:N},T!==L.bY?A.createElement("span",{className:"font-monospace pointer",title:g?void 0:w},w):null)}})(em,et),[V.Sq]:((e,t)=>{let{processedRows:o,rowStatsConstraints:r,getExternalIcon:i,highlightRowsOnRefHover:n,isInUnsupportedRebase:s,numGraphColumns:a,clearCurrentlyHoveredGraphCommit:l,currentlyHoveredCommitSha:h,dimMergeCommits:c,dimRowsOfSelectedCommit:d,onCommitContextMenu:u,onClickCommit:p,onDoubleClickCommit:f,rowsStats:m,setAsCurrentlyHoveredGraphCommit:g,suppressNonRefRowTooltips:_}=e,v=new ea.n$(e);return({rowIndex:e,style:S})=>{let R=t(e),y=o[e],{sha:T,type:C,contexts:w}=y,E=w?.stats||void 0,b=w?.row||void 0,I=m?.[T],M=[I?.files?`${I.files} files changed`:"",I?.additions?`${I.additions} lines added`:"",I?.deletions?`${I.deletions} lines deleted`:""].filter(Boolean).join(", ");M=C!==L.bY?M:"";let O=V.Sq,N=v.isColumnFollowingGraphColumn(O),x=v.isLastColumn(O),D=v.getZoneWidth(O),H=v.getVerticalScrollWidth(O);return A.createElement(nL,{clearCurrentlyHoveredGraphCommit:l,column:y.column,columnForColoring:y.columnForColoring,context:E,currentlyHoveredCommitSha:h??null,dimRowsOfSelectedCommit:d,getExternalIcon:i,graphZoneType:O,highlightRowsOnRefHover:n,isDimmedMergeCommitRow:C===L.t$&&c,isHighlighted:v.isHighlighted(e),isHovering:v.isHovering(e),isInUnsupportedRebase:s,isLastColumn:x,isMissingHoveredRefGroup:v.isMissingHoveredRefGroup(e),isSelected:v.isSelected(e),key:R,numGraphColumns:a,onClickCommit:p,onContextMenu:u,onDoubleClickCommit:f,rowContext:b,scopeBoundaryKind:y.scopeBoundaryKind,setAsCurrentlyHoveredGraphCommit:g,sha:T,showColorStrip:N,showTimeline:v.hasTimeline(e),style:S,title:_?void 0:M,type:C,verticalScrollWidth:H,zoneWidth:D},I&&C!==L.bY?A.createElement(nG,{constraints:r,getExternalIcon:i,isLastColumn:x,isRowSelected:v.isSelected(e),stats:I,verticalScrollWidth:H,zoneWidth:D}):null)}})(em,et),[V.OU]:((e,t)=>{let{translate:o,processedRows:r}=e,i=x()("graph-row-wrapper","grow-3","height-100","graph-zone-column","min-width-0","pb3","pointer","pt3","relative"),n=new ea.n$(e);return({rowIndex:e,style:s})=>{let a=t(e),l=x()("graph-row","height-100-percent","flex"),h=n.hasTimeline(e),c=r[e],d=c.contexts?.row||void 0,u=c.timeLineEntry?.label||"",p=c.timeLineEntry?.value||0,f=h?A.createElement(oA,null):null,m=h?A.createElement(oD,{message:o(u,p)}):null;return A.createElement("div",{className:i,"data-vscode-context":(0,ea.DO)(d),key:a,style:s},f,A.createElement("div",{className:l,"data-vscode-context":(0,ea.DO)(d)},m))}})(em,et)},e_=b.map((e,o)=>{let r=0===o;return A.createElement(o$,{branchUpstreamRowIndices:this.branchUpstreamRowIndices,cellRenderersByIds:eg,columnIndex:o,customFooterRow:t,enabledScrollMarkerTypes:w,enableResizer:ef,getExternalIcon:this.getIconCallback,getKeyForCell:et,graphHeight:M-V.q4,graphWidth:Q,graphZones:b,graphZoneType:e.type,hasMoreCommits:I,horizontalScrollHeight:this.getHorizontalScrollHeight(e.type,m),interactiveScrollMarkers:this.state.interactiveScrollMarkers,isFilteredSearch:this.isFilteredSearch(),isLoadingRows:G,key:`${e.type}ColumnContainer`,markerColors:this.getMarkerColors(),markerRowIndices:this.state.markerRowIndices,onResize:this.onGraphZoneResize,onResizeEnd:this.onGraphZoneResizeEnd,onScroll:this.onScrollForZone,onScrollMarkerClicked:this.onScrollMarkerClicked,onScrollToRowCausedUpdate:r?this.onScrollToRowCausedUpdateForFirstColumn:void 0,onZoneEnter:t=>this.onZoneEnter(t,e.type,N,D),processedRows:F,rowCount:F.length,scrollLeft:Y,scrollToAlignment:r?U:void 0,scrollToIndex:r?j:void 0,scrollTop:$,smartCellRangeRenderer:eo,stickyTimeline:this.props.stickyTimeline,translate:this.translateCallback,verticalScrollWidth:this.getVerticalScrollWidth(e.type,m)})}),ev=this.graphComponentRef?.current&&A.createElement(nR,{columnsSettings:e,dragAppendToContainer:this.graphComponentRef?.current,enableResizer:ef,enableShowHideRefsOptions:S,excludeRefsById:this.excludeRefsById,getExternalIcon:this.getIconCallback,graphZones:b,headerContext:p?.header,headerZoneActions:o,height:M,includeOnlyRefsById:this.includeOnlyRefsById,onColumnReOrdered:this.onGraphColumnReOrdered,onFilterColumnClick:this.onFilterColumnClick,onGraphZoneResize:this.onGraphZoneResize,onGraphZoneResizeEnd:this.onGraphZoneResizeEnd,onMouseDownCapture:this.onGraphHeaderMouseDown,onMouseMoveCapture:this.onGraphHeaderMouseMove,onMouseUpCapture:this.onGraphHeaderMouseUp,onPopupGraphHeaderContextMenu:this.onPopupGraphHeaderContextMenu,onSettingsClick:this.onSettingsClick,onToggleRefNodesShown:this.onToggleRefNodesShown,onWheel:this.onGraphHeaderWheel,repoPath:n,rowsStatsLoading:k,settingsContext:p?.settings,showRemoteNamesOnRefs:T,translate:this.translateCallback,width:Q}),eS=this.getHeadPillDirection(),eR=null!=this.headSha?this.processedGraphRowBySha[this.headSha]:void 0,ey=eR?.columnForColoring??eR?.column,eT=null!=ey?u[ey]:void 0,eC=b.length>0&&this.getVerticalScrollWidth(b[b.length-1].type,m)>0,ew=A.createElement("div",{className:"graph-component","data-vscode-context":(0,ea.DO)(p?.graph),onBlur:e=>this.onGraphContainerBlurred(e,N,D),onMouseEnter:this.onGraphContainerMouseEnter,onMouseLeave:this.onGraphContainerMouseLeave,ref:this.graphComponentRef,style:{height:"100%",width:"100%",position:"absolute"},tabIndex:-1},ev,A.createElement("div",{className:(0,ed.xV)(O)?x()(ee,"graph-highlighted"):ee,id:"graph-container",onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onMouseDown:this.onGraphHeaderRowMouseDown,ref:this.graphContainerRef,style:{height:M,width:Q},tabIndex:-1},e_,l&&A.createElement(nO,{allRows:F,focusedSha:this.selectionFocusSha,getVisibleRows:this.getVisibleRows,hasVerticalScrollbar:eC,hoveredSha:g,provider:l,selectedShas:this.selectedShas}),A.createElement(nH,{getExternalIcon:this.getIconCallback,getVisibleRows:this.getVisibleRows,hasVerticalScrollbar:eC,hoveredSha:g,selectedShas:this.selectedShas,translate:this.translateCallback,wipMessageEditable:c??!1,wipNodeMetadataBySha:this.props.wipNodeMetadataBySha,workDirStats:J})),null!=eS&&A.createElement("button",{"aria-label":"Scroll to HEAD",className:`graph-head-pill graph-head-pill--${eS}`,onClick:this.onHeadPillClick,style:null!=eT?{"--head-pill-color":eT}:void 0,title:"Scroll to HEAD",type:"button"},A.createElement("svg",{"aria-hidden":"true",fill:"none",height:"10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2.2",viewBox:"0 0 16 16",width:"10"},"up"===eS?A.createElement("path",{d:"M8 13V3M3 8l5-5 5 5"}):A.createElement("path",{d:"M8 3v10M3 8l5 5 5-5"})),"HEAD"));return this.decorateWithHelmet(ew,m,s)}}var ss=sn},385(e,t,o){o.d(t,{A:()=>s});var r=o(641),i=o(895);class n extends r.PureComponent{resizeObserver;scrollbarContainerRef=r.createRef();horizontalScrollRef=r.createRef();scrollabbleContentRef=r.createRef();verticalScrollRef=r.createRef();outerHorizontalScrollRef=r.createRef();constructor(e){super(e),this.resizeObserver=new ResizeObserver(e=>e.forEach(e=>this.onContainerResized(e.contentRect.width,e.contentRect.height)))}updateScrollbarValues(e,t){this.horizontalScrollRef?.current&&(this.horizontalScrollRef.current.scrollLeft=e||0),this.verticalScrollRef?.current&&(this.verticalScrollRef.current.scrollTop=t||0)}componentDidUpdate(e){let{scrollLeft:t,scrollTop:o}=this.props;(e.scrollLeft!==t||e.scrollTop!==o)&&this.updateScrollbarValues(t,o)}onHorizontalScroll(e){this.props.onScroll&&this.props.onScroll({clientHeight:this.props.height||0,clientWidth:e.target.clientWidth,scrollHeight:this.getAdjustedContentHeight(),scrollLeft:e.target.scrollLeft,scrollTop:this.props.scrollTop||0,scrollWidth:e.target.scrollWidth})}onVerticalScroll(e){let t=1>Math.abs(e.target.scrollTop-(this.props.scrollTop??0));this.props.onScroll&&!t&&this.props.onScroll({clientHeight:e.target.clientHeight,clientWidth:this.props.width||0,scrollHeight:e.target.scrollHeight,scrollLeft:this.props.scrollLeft||0,scrollTop:e.target.scrollTop,scrollWidth:this.props.contentWidth||0})}onWheel(e){if(!this.props.onScroll||!this.verticalScrollRef.current&&!this.props.forceOnVerticalWheel&&!this.horizontalScrollRef.current&&!this.props.forceOnHorizontalWheel)return;let t=this.props.scrollLeft||0,o=t;(this.horizontalScrollRef.current||this.props.forceOnHorizontalWheel)&&(o+=e.deltaX,(o=o>=0?o:0)>t&&this.horizontalScrollRef?.current&&(0,i.y6)(this.horizontalScrollRef.current)&&(o=t));let r=this.props.scrollTop||0,n=r;(this.verticalScrollRef.current||this.props.forceOnVerticalWheel)&&(n+=e.deltaY,(n=n>=0?n:0)>r&&this.verticalScrollRef?.current&&(0,i.br)(this.verticalScrollRef.current)&&(n=r)),(n!==r||o!==t)&&this.props.onScroll({clientHeight:this.props.height||0,clientWidth:this.props.width||0,scrollHeight:this.getAdjustedContentHeight(),scrollLeft:o>=0?o:0,scrollTop:n>=0?n:0,scrollWidth:this.props.contentWidth||0})}componentDidMount(){this.updateScrollbarValues(this.props.scrollLeft,this.props.scrollTop),this.resizeObserver.observe(this.scrollbarContainerRef.current)}componentWillUnmount(){this.resizeObserver.disconnect()}onContainerResized=(0,i.xJ)((e,t)=>{let o=this.props.contentHeight||0,r=this.props.contentWidth||0,i=this.props.scrollTop||0,n=this.props.scrollLeft||0,s=t<o?i:0,a=e<r?n:0;(i!==s||n!==a)&&(this.updateScrollbarValues(a,s),this.props.onScroll?.({clientHeight:t,clientWidth:e,scrollHeight:o,scrollLeft:a,scrollTop:s,scrollWidth:r}))});hasHorizontalScroll(){let{contentWidth:e,displayHorizontalScrollbar:t,forceHorizontalScrollbar:o,width:r}=this.props;return!!o||!!t&&(r??0)<e}hasVerticalScroll(){let{displayVerticalScrollbar:e,forceVerticalScrollbar:t,height:o}=this.props;return!!t||!!e&&(o??0)<this.getAdjustedContentHeight()}getHorizontalScrollbarTickness(){return parseInt(this.outerHorizontalScrollRef.current?.clientHeight,10)||0}getAdjustedContentHeight(){return this.props.contentHeight+this.getHorizontalScrollbarTickness()}adjustScrollWhileDragging(e){let t,o=this.getAdjustedContentHeight();if(!this.scrollabbleContentRef.current||(this.props.height??0)>=o||!this.props.onScroll)return;let r=this.scrollabbleContentRef.current.getBoundingClientRect(),i=e.clientY-r.top,n=Math.abs(o-(this.props.height??0));if((this.props.scrollTop??0)>0&&i<=20){let e=(this.props.scrollTop??0)-20;t={clientHeight:r.height,clientWidth:r.width,scrollHeight:n,scrollLeft:this.props.scrollLeft||0,scrollTop:e>0?e:0,scrollWidth:this.props.contentWidth||0}}if((this.props.scrollTop??0)<n&&i>=(this.props.height??0)-20){let e=(this.props.scrollTop??0)+20;t={clientHeight:r.height,clientWidth:r.width,scrollHeight:n,scrollLeft:this.props.scrollLeft||0,scrollTop:e<n?e:n,scrollWidth:this.props.contentWidth||0}}t&&this.props.onScroll(t)}render(){let{children:e,contentHeight:t,contentWidth:o,forceHorizontalScrollbar:i,forceVerticalScrollbar:n,height:s,width:a}=this.props,l=this.hasVerticalScroll(),h=this.hasHorizontalScroll(),c=h&&r.createElement("div",{className:"scrollbar-outer horizontal",ref:this.outerHorizontalScrollRef,style:{top:`calc(${s}px - var(--scrollable-scrollbar-thickness))`,width:a}},r.createElement("div",{className:"scrollbar-inner horizontal_scrollbar",onScroll:e=>this.onHorizontalScroll(e),ref:this.horizontalScrollRef,style:{overflowX:i?"scroll":"auto",width:l?`calc(${a}px - var(--scrollable-scrollbar-thickness))`:a}},r.createElement("div",{style:{height:"1px",width:o}}))),d=l&&r.createElement("div",{className:"scrollbar-outer vertical",style:{height:s}},r.createElement("div",{className:"scrollbar-inner vertical_scrollbar",onScroll:e=>this.onVerticalScroll(e),ref:this.verticalScrollRef,style:{overflowY:n?"scroll":"auto",height:h?`calc(${s}px - var(--scrollable-scrollbar-thickness))`:s}},r.createElement("div",{style:{height:`calc(${t}px + var(--scrollable-scrollbar-thickness))`,width:"1px"}})));return r.createElement("div",{className:"scrollbar-container",onWheelCapture:e=>this.onWheel(e),ref:this.scrollbarContainerRef,style:{height:s,width:a}},r.createElement("div",{className:"scrollable-content",onDragOverCapture:e=>this.adjustScrollWhileDragging(e),ref:this.scrollabbleContentRef,style:{height:s,width:a}},e),c,d)}}var s=n},823(e,t,o){o.d(t,{N:()=>c,OZ:()=>a,bY:()=>l,gL:()=>s,l2:()=>i,oB:()=>r,t$:()=>n});let r="commit-node",i="merge-conflict-node",n="merge-node",s="unsupported-rebase-warning-node",a="stash-node",l="work-dir-changes";var h,c=((h=c||{}).RowEntry="rowEntry",h.Tooltip="tooltip",h)},95(){},555(e,t,o){o.d(t,{Y:()=>i,u:()=>r});let r="--num-columns-supported",i={"--graph-row-height":"22px","--font-default":"'Open Sans', Arial, sans-serif !important","--font-monospace":"'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace","--font-size":"62.5%","--fs-1":"1rem","--fs-2":"1.2rem","--fs-3":"1.4rem","--fs-4":"1.6rem","--fs-5":"1.8rem","--fs-6":"2rem","--fs-7":"2.4rem","--button-xs-padding-y":".15rem","--button-xs-padding-x":".25rem","--button-small-padding-y":".25rem","--button-small-padding-x":".5rem","--button-medium-padding-y":".5rem","--button-medium-padding-x":".75rem","--button-large-padding-y":"1rem","--button-large-padding-x":"1.25rem","--button-radius":".2rem","--input-radius":"3px","--about-modal-bg-color":"#e2e4e9","--about-modal-width":"650px","--label__purple-color-f25":"rgba(197,23,182,0.25)","--registration-modal-width":"400px","--file-history-header-height":"35px","--shop-modal-width":"95vw","--shop-modal-height":"95vh","--scrollable-scrollbar-thickness":"14px","--mini-commit-col-left-width":"30px","--mini-commit-col-middle-padding":"6px","--mini-commit-col-right-width":"56px","--fuzzy-finder-repo-color":"rgba(46,206,157,0.1)","--fuzzy-finder-checkout-color":"rgba(6,105,247,0.1)","--fuzzy-finder-history-color":"rgba(197,23,182,0.1)","--handle-width":"7px","--shadow-color":"rgba(0,0,0,0.4)","--graph-color-5-f10":"rgba(205,1,1,0.1)","--graph-color-6-f10":"rgba(242,93,46,0.1)","--graph-color-7-f10":"rgba(242,202,51,0.1)","--graph-color-8-f10":"rgba(123,217,56,0.1)","--graph-color-9-f10":"rgba(46,206,157,0.1)","--graph-color-0-f10":"rgba(21,160,191,0.1)","--graph-color-1-f10":"rgba(6,105,247,0.1)","--graph-color-2-f10":"rgba(142,0,194,0.1)","--graph-color-3-f10":"rgba(197,23,182,0.1)","--graph-color-4-f10":"rgba(217,1,113,0.1)","--graph-color-5-f50":"rgba(205,1,1,0.5)","--graph-color-6-f50":"rgba(242,93,46,0.5)","--graph-color-7-f50":"rgba(242,202,51,0.5)","--graph-color-8-f50":"rgba(123,217,56,0.5)","--graph-color-9-f50":"rgba(46,206,157,0.5)","--graph-color-0-f50":"rgba(21,160,191,0.5)","--graph-color-1-f50":"rgba(6,105,247,0.5)","--graph-color-2-f50":"rgba(142,0,194,0.5)","--graph-color-3-f50":"rgba(197,23,182,0.5)","--graph-color-4-f50":"rgba(217,1,113,0.5)","--axo-orange":"#e75225","--axo-ink":"#141422","--axo-cream":"#f9efc1","--axo-yellow":"#d8c13a","--info-bar-height":"26px","--left-panel-header-height":"60px","--toolbar-height":"48px","--toolbar-border":"1px","--toolbar-item-height":"calc(var(--toolbar-height, 0px) - var(--toolbar-border, 1px))","--expand-detail-panel-transition":"flex-grow 250ms ease-in-out","--conflict-left-color":"rgba(21,160,191,0.25)","--conflict-right-color":"rgba(242,202,51,0.25)","--conflict-output-color":"rgba(197,23,182,0.25)","--graph-color-5-bg50":"#751012","--graph-color-6-bg50":"#873e29","--graph-color-7-bg50":"#87742b","--graph-color-8-bg50":"#4c7c2e","--graph-color-9-bg50":"#257660","--graph-color-0-bg50":"#195f71","--graph-color-1-bg50":"#11448d","--graph-color-2-bg50":"#550f73","--graph-color-3-bg50":"#711b6d","--graph-color-4-bg50":"#7b104a","--graph-color-5-bg45":"#6c1114","--graph-color-6-bg45":"#7c3a28","--graph-color-7-bg45":"#7c6b2a","--graph-color-8-bg45":"#47722c","--graph-color-9-bg45":"#246d5a","--graph-color-0-bg45":"#195969","--graph-color-1-bg45":"#124082","--graph-color-2-bg45":"#4f116b","--graph-color-3-bg45":"#681b65","--graph-color-4-bg45":"#711146","--graph-color-5-bg25":"#48171b","--graph-color-6-bg25":"#522e26","--graph-color-7-bg25":"#524927","--graph-color-8-bg25":"#344d28","--graph-color-9-bg25":"#214a42","--graph-color-0-bg25":"#1a3f4a","--graph-color-1-bg25":"#173158","--graph-color-2-bg25":"#39174b","--graph-color-3-bg25":"#461c48","--graph-color-4-bg25":"#4b1737","--graph-color-5-bg15":"#371a1e","--graph-color-6-bg15":"#3c2725","--graph-color-7-bg15":"#3c3825","--graph-color-8-bg15":"#2a3a26","--graph-color-9-bg15":"#1f3835","--graph-color-0-bg15":"#1b323a","--graph-color-1-bg15":"#192943","--graph-color-2-bg15":"#2d1a3b","--graph-color-3-bg15":"#351d39","--graph-color-4-bg15":"#381a2f","--semi-bold":"500","--bold":"600","--num-columns-supported":"10","--column-0-color":"#15a0bf","--column-1-color":"#0669f7","--column-2-color":"#8e00c2","--column-3-color":"#c517b6","--column-4-color":"#d90171","--column-5-color":"#cd0101","--column-6-color":"#f25d2e","--column-7-color":"#f2ca33","--column-8-color":"#7bd938","--column-9-color":"#2ece9d","--red":"#D9413D","--orange":"#DE9B43","--yellow":"#ECB91C","--green":"#5CB85C","--blue":"#4D88FF","--ltblue":"#5bc0de","--app__bg0":"#1C1E23","--toolbar__bg0":"rgb(42,45,52)","--toolbar__bg1":"rgb(51,55,63)","--toolbar__bg2":"rgb(65,70,80)","--panel__bg0":"rgb(39,42,49)","--panel__bg1":"rgb(50,54,63)","--panel__bg2":"rgb(61,66,77)","--input__bg":"rgba(0,0,0,0.2)","--input-bg-warn-color":"rgba(222,155,67,0.6)","--panel-border":"rgb(19,20,24)","--section-border":"rgba(255,255,255,0.08)","--subtle-border":"rgba(255,255,255,0.04)","--modal-overlay-color":"rgba(0,0,0,.5)","--graph-color-0":"#15a0bf","--graph-color-1":"#0669f7","--graph-color-2":"#8e00c2","--graph-color-3":"#c517b6","--graph-color-4":"#d90171","--graph-color-5":"#cd0101","--graph-color-6":"#f25d2e","--graph-color-7":"#f2ca33","--graph-color-8":"#7bd938","--graph-color-9":"#2ece9d","--text-selected":"#FFFFFF","--text-selected-row":"#FFFFFF","--text-dimmed":"rgba(255,255,255,0.2)","--text-dimmed-selected":"rgba(255,255,255,0.5)","--text-normal":"rgba(255,255,255,0.75)","--text-secondary":"rgba(255,255,255,0.6)","--text-disabled":"rgba(255,255,255,0.4)","--text-accent":"#93A9EC","--text-inverse":"#222222","--text-bright":"#FFFFFF","--btn-text":"rgba(255,255,255,0.75)","--btn-text-hover":"#FFFFFF","--default-border":"rgba(255,255,255,0.75)","--default-bg":"transparent","--default-hover":"transparent","--default-border-hover":"#FFFFFF","--primary-border":"#4D88FF","--primary-bg":"rgba(77,136,255,0.2)","--primary-hover":"rgba(77,136,255,0.6)","--success-border":"#5CB85C","--success-bg":"rgba(92,184,92,0.2)","--success-hover":"rgba(92,184,92,0.6)","--warning-border":"#DE9B43","--warning-bg":"rgba(222,155,67,0.2)","--warning-hover":"rgba(222,155,67,0.6)","--danger-border":"#D9413D","--danger-bg":"rgba(217,65,61,0.2)","--danger-hover":"rgba(217,65,61,0.6)","--hover-row":"rgba(77,136,255,0.1)","--hover-row-border":"none","--danger-row":"rgba(217,65,61,0.6)","--selected-row":"rgba(77,136,255,0.2)","--selected-row-border":"none","--warning-row":"rgba(222,155,67,0.6)","--droppable":"rgba(236,185,28,0.3)","--drop-target":"rgba(92,184,92,0.5)","--input--disabled":"rgba(0,0,0,0.1)","--link-color":"#40c5ec","--link-color-bright":"#40c5ec","--form-control-focus":"#4D88FF","--scroll-thumb-border":"#1C1E23","--scroll-thumb-bg":"rgb(65,70,80)","--scroll-thumb-bg-light":"rgb(111,119,136)","--wip-status":"rgba(77,136,255,0.4)","--card__bg":"rgb(61,66,77)","--card-shadow":"rgba(0,0,0,.2)","--statusbar__warning-bg":"#87742b","--label__yellow-color":"#f2ca33","--label__light-blue-color":"#15a0bf","--label__purple-color":"#c517b6","--filtering":"rgba(77,136,255,0.5)","--soloing":"rgba(222,155,67,0.5)","--checked-out":"rgba(92,184,92,0.3)","--soloed":"rgba(222,155,67,0.3)","--filter-match":"rgba(77,136,255,0.5)","--clone__progress":"rgba(77,136,255,0.7)","--toolbar__prompt":"rgba(77,136,255,0.2)","--verified":"rgba(92,184,92,0.3)","--unverified":"rgba(255,255,255,0.1)","--drop-sort-border":"#5CB85C","--terminal__repo-name-color":"turquoise","--terminal__repo-branch-color":"violet","--terminal__repo-tag-color":"lightcoral","--terminal__repo-upstream-color":"yellowgreen","--terminal__background":"#000000","--terminal__cursor":"#FFFFFF","--terminal__cursorAccent":"#000000","--terminal__foreground":"#FFFFFF","--terminal__selection":"#304676","--terminal__black":"#000000","--terminal__red":"#F24A4A","--terminal__green":"#0DBC79","--terminal__yellow":"#E5E510","--terminal__blue":"#4A98EE","--terminal__magenta":"#E063E0","--terminal__cyan":"#11A8CD","--terminal__white":"#E5E5E5","--terminal__brightBlack":"#686868","--terminal__brightRed":"#FF5656","--terminal__brightGreen":"#23D18B","--terminal__brightYellow":"#F5F543","--terminal__brightBlue":"#51A4FF","--terminal__brightMagenta":"#D670D6","--terminal__brightCyan":"#29B8DB","--terminal__brightWhite":"#E5E5E5","--code-bg":"#1C1E23","--code-foreground":"rgba(255,255,255,0.75)","--code-blame-color-0":"#15a0bf","--code-blame-color-1":"#0669f7","--code-blame-color-2":"#8e00c2","--code-blame-color-3":"#c517b6","--code-blame-color-4":"#d90171","--code-blame-color-5":"#cd0101","--code-blame-color-6":"#f25d2e","--code-blame-color-7":"#f2ca33","--code-blame-color-8":"#7bd938","--code-blame-color-9":"#2ece9d","--added-line":"rgba(92,184,92,0.2)","--deleted-line":"rgba(217,65,61,0.2)","--modified-line":"rgba(0,0,0,0.25)","--conflict-info-color":"#15a0bf","--conflict-left-border-color":"#15a0bf","--conflict-right-border-color":"#f2ca33","--conflict-output-border-color":"#c517b6","--scroll-marker-head-color":"#16c216","--scroll-marker-highlights-color":"#e6e62b","--scroll-marker-local-branches-color":"#ffa500","--scroll-marker-pull-requests-color":"#ff8f18","--scroll-marker-remote-branches-color":"#ffd68b","--scroll-marker-selection-color":"#0821ff","--scroll-marker-stashes-color":"#fb94ff","--scroll-marker-tags-color":"#affcff","--scroll-marker-upstream-color":"#9bff9b","--stats-added-color":"#347d39","--stats-deleted-color":"#c93c37","--stats-files-color":"#e2c08d","--stats-bar-border-radius":"3px","--stats-bar-height":"40%"}},435(e,t,o){o.d(t,{$6:()=>i,JQ:()=>s,yr:()=>n});var r=o(555);function i(e){return`--column-${e}-color`}function n(e={}){let t={},o=Object.entries(e),i=[];for(let[e,r]of o)r?.includes("var(")?i.push([e,r]):t[e]=r;if(i.length>0){let e=document.querySelector(".gk-graph")||document.documentElement,r=document.createElement("div");for(let[e,t]of(r.style.display="none",o))e.startsWith("--")&&r.style.setProperty(e,t);e.appendChild(r);try{let e=getComputedStyle(r);for(let[o,n]of i){r.style.setProperty("--temp-resolve",n);let i=e.getPropertyValue("--temp-resolve").trim();t[o]=i||n}}finally{e.removeChild(r)}}return function(e={}){return{...r.Y,...e}}(t)}function s(e){let t=e||r.Y,o="";for(let e of(o+=`.gk-graph {
|
|
15
15
|
`,Object.keys(t)))o+=`${e}: ${t[e]};
|
|
16
16
|
`;return o+`}
|
|
17
17
|
`}},83(e,t,o){o.d(t,{g:()=>r});let r={ADDED:"added",DELETED:"deleted",MODIFIED:"modified",RENAMED:"renamed"}},451(){},739(e,t,o){o.d(t,{e:()=>i});var r,i=((r=i||{}).arrowDownKey="ArrowDown",r.arrowLeftKey="ArrowLeft",r.arrowRightKey="ArrowRight",r.arrowUpKey="ArrowUp",r.controlKey="Control",r.endKey="End",r.homeKey="Home",r.metaKey="Meta",r.pageDownKey="PageDown",r.pageUpKey="PageUp",r.shiftKey="Shift",r)},7(e,t,o){o.d(t,{$0:()=>a,$A:()=>eh,AR:()=>ec,BP:()=>r,By:()=>l,CF:()=>y,CY:()=>ee,Dl:()=>eR,E5:()=>O,EB:()=>v,F0:()=>N,FQ:()=>eE,G3:()=>H,Gu:()=>q,H6:()=>I,Hm:()=>M,K3:()=>Y,KA:()=>U,KV:()=>F,MQ:()=>W,MT:()=>Z,OU:()=>ei,Oe:()=>m,Qb:()=>$,Ql:()=>X,RJ:()=>z,Sb:()=>e_,Sq:()=>ed,Td:()=>c,W:()=>eT,WC:()=>eC,WQ:()=>er,Yx:()=>i,Zk:()=>D,_b:()=>u,ar:()=>h,ax:()=>k,bo:()=>V,cD:()=>b,cJ:()=>eu,d4:()=>ea,di:()=>x,eB:()=>eg,fx:()=>el,gK:()=>T,gi:()=>P,iX:()=>C,io:()=>G,j:()=>ev,jp:()=>E,kU:()=>p,kj:()=>d,lE:()=>L,lH:()=>f,mE:()=>A,mP:()=>et,md:()=>es,n0:()=>R,n9:()=>B,nf:()=>g,oC:()=>j,pi:()=>ew,q4:()=>n,qO:()=>w,ro:()=>J,tl:()=>Q,ui:()=>en,wF:()=>_,wT:()=>ey,wx:()=>eS,xY:()=>eo,yB:()=>s,yX:()=>K,z$:()=>S});let r="#199489",i=3,n=26,s=28,a=22,l=1400,h=6,c=.5,d=3,u=3,p=28,f=22,m=3,g=11,_=56,v=56,S=32,R=22,y=18,T=55,C=50,w="short+short",E=55,b=50,I=50,M=50,O=55,N=18,x=32,A=2,D=6,H=14,G=5,k="gk-graph-ref-active",W="gk-graph-ref-pinned",z=19,L=10,F=55,P=100,B=50,Z=10,U=25,j=58,V=22,$=2,Y={dark:1,light:.5},K=10,q=12,X=6,Q=3,J=12,ee="auto",et="center",eo=7,er=4,ei="timelineMessage",en="ref",es="graph",ea="message",el="author",eh="datetime",ec="sha",ed="changes",eu="gk.empty-set-marker";var ep,ef,em,eg=((ep=eg||{}).Compact="compact",ep.Rich="rich",ep.Text="text",ep),e_=((ef=e_||{}).Block="block",ef.FullLine="fullLine",ef.ThinLine="thinLine",ef);let ev={block:{type:"block",baseHeight:+s,minHeight:5,maxHeight:20},fullLine:{type:"fullLine",baseHeight:.5*s,minHeight:2,maxHeight:4},thinLine:{type:"thinLine",baseHeight:.25*s,minHeight:1,maxHeight:2}},eS={tags:{type:"tags",colorCssKey:"--scroll-marker-tags-color",lanes:[2],shape:"block"},remoteBranches:{type:"remoteBranches",colorCssKey:"--scroll-marker-remote-branches-color",lanes:[2],shape:"block"},stashes:{type:"stashes",colorCssKey:"--scroll-marker-stashes-color",lanes:[0],shape:"block"},pullRequests:{type:"pullRequests",colorCssKey:"--scroll-marker-pull-requests-color",lanes:[2],shape:"block"},localBranches:{type:"localBranches",colorCssKey:"--scroll-marker-local-branches-color",lanes:[0],shape:"block"},upstream:{type:"upstream",colorCssKey:"--scroll-marker-upstream-color",lanes:[1,2],shape:"block"},wip:{type:"wip",colorCssKey:"--scroll-marker-wip-color",lanes:[0],shape:"block"},head:{type:"head",colorCssKey:"--scroll-marker-head-color",lanes:[0,1],shape:"block"},highlights:{type:"highlights",colorCssKey:"--scroll-marker-highlights-color",lanes:[1],shape:"block"},selection:{type:"selection",colorCssKey:"--scroll-marker-selection-color",lanes:[0,1,2],shape:"fullLine"}},eR=10,ey=6,eT={[el]:{headerLabelUntranslated:"GraphHeader-CommitAuthor",isCustomizable:!0,listId:"commit-author-zone",minimumWidth:S,showIconWidth:T},[eh]:{headerLabelUntranslated:"GraphHeader-CommitDateTime",isCustomizable:!0,listId:"commit-date-time-zone",minimumWidth:C,showIconWidth:E},[ea]:{headerLabelUntranslated:"GraphHeader-CommitMessage",isCustomizable:!0,listId:"commit-message-zone",minimumWidth:M,showIconWidth:O},[ec]:{headerLabelUntranslated:"GraphHeader-CommitSha",isCustomizable:!0,listId:"commit-sha-zone",minimumWidth:b,showIconWidth:I},[es]:{headerLabelUntranslated:"GraphHeader-CommitGraph",isCustomizable:!0,listId:"commit-zone",minimumWidth:_,showIconWidth:v},[en]:{headerLabelUntranslated:"GraphHeader-BranchTag",isCustomizable:!0,listId:"ref-zone",minimumWidth:x,showIconWidth:F},[ed]:{headerLabelUntranslated:"GraphHeader-Changes",isCustomizable:!0,listId:"changes-zone",minimumWidth:B,showIconWidth:j}},eC={hour:24,day:7,week:4,month:12,year:10},ew={added:0,deleted:0,modified:0};var eE=((em=eE||{}).ALWAYS="ALWAYS",em.ON_HOVER="ON_HOVER",em.NEVER="NEVER",em)},895(e,t,o){o.d(t,{$V:()=>C,DO:()=>g,Et:()=>k,HV:()=>Q,K8:()=>H,Mz:()=>$,Q9:()=>w,S6:()=>_,SY:()=>V,U0:()=>A,Ve:()=>x,Vs:()=>y,Yy:()=>O,a5:()=>q,al:()=>I,br:()=>f,ci:()=>d,dF:()=>j,eQ:()=>b,fW:()=>E,jY:()=>G,jz:()=>F,kU:()=>z,l7:()=>U,mH:()=>T,n$:()=>X,n0:()=>Y,nF:()=>p,pg:()=>Z,qC:()=>L,uQ:()=>W,ug:()=>R,xJ:()=>u,xd:()=>P,xy:()=>D,y6:()=>m,yJ:()=>N,yb:()=>v,z:()=>M});var r=o(603),i=o(456),n=o(823),s=o(435),a=o(931),l=o(7),h=o(695),c=o(982);function d(e,t,o,r=!1){let i=new Set,s={};for(let a=0;a<e.length;a+=1){let l=e[a],h=t[a];if(l.type===n.OZ)continue;let c=s[l.sha]||!1,d=h.hasBaseFilteredTags&&(!o||h.hasFilteredBranches||c),u=h.hasFilteredBranches||d;if(l.type!==n.oB&&l.type!==n.t$||u||c)for(let e of(i.add(l.sha),r&&null!=l.parents&&l.parents.length>0?l.parents.slice(0,1):l.parents??[]))s[e]=!0}return i}let u=e=>{let t;return(...o)=>{t&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{e(...o)})}},p=(e,t,o)=>{let r,i,n,s=!1,a=t;return(...l)=>{void 0!==o&&(i=new Date().getTime(),a=!r||i-r>a+o?o:t),n&&(clearTimeout(n),n=null),s?n=setTimeout(()=>{e(...l)},a):(e(...l),r=new Date().getTime(),s=!0,setTimeout(()=>{s=!1},a))}};function f(e){return 1>Math.abs(e.scrollHeight-e.scrollTop-e.clientHeight)}function m(e){return 1>Math.abs(e.scrollWidth-e.scrollLeft-e.clientWidth)}function g(e){return e?"string"==typeof e?e:JSON.stringify(e):null}function _(e){let{length:t}=e;if(0===t)return{min:0,max:0};if(1===t)return{min:0,max:e[0]};e.sort((e,t)=>e-t);let o=e[0],r=e[Math.floor(.25*t)],i=e[Math.floor(.5*t)],n=e[Math.floor(.75*t)],s=e[t-1],a=n-r;return{min:Math.max(o,i-1.5*a),max:Math.min(s,i+1.5*a)}}function v(e,t,o,r,i){let{id:n}=e;if(!n||null===t||t?.[n]===null||r&&t?.[n]?.[r]===null)return null;let s=()=>{if(!i||!(n in i))return null;let e=i[n];return e?r?e[r]:e:null};return t&&n in t?r&&!t[n]?.[r]?(o(n,[r]),s()):r?t?.[n]?.[r]:t?.[n]:(o(n,h.ej),s())}function S(e){let t=Math.floor(e/36e5);if(t<24){if(0===t)return{label:"Timeline-Now",value:0};if(1===t)return{label:"Timeline-1HourAgo",value:1};if(t>0)return{label:"Timeline-NHoursAgo",value:t}}let o=Math.floor(e/864e5);if(o<7){if(1===o)return{label:"Timeline-Yesterday",value:1};if(o>0)return{label:"Timeline-NDaysAgo",value:o}}let r=Math.floor(e/6048e5);if(r<5){if(1===r)return{label:"Timeline-1WeekAgo",value:1};if(r>0)return{label:"Timeline-NWeeksAgo",value:r}}let i=new Date,n=new Date(i.getTime()-e),s=(i.getFullYear()-n.getFullYear())*12+(i.getMonth()-n.getMonth());if(s<12){if(1===s)return{label:"Timeline-1MonthAgo",value:1};if(s>0)return{label:"Timeline-NMonthsAgo",value:s}}let a=i.getFullYear()-n.getFullYear();return 1===a?{label:"Timeline-1YearAgo",value:1}:a>0?{label:"Timeline-NYearsAgo",value:a}:{label:"Timeline-Now",value:0}}function R(){let e,t=new Date,o=t.getTime(),r=[];for(e=1;e<l.WC.hour;e+=1){let t=36e5*e,{label:i,value:n}=S(t);r.push({date:o-t,label:i,timeUnit:"hour",value:n})}for(e=1;e<l.WC.day;e+=1){let t=864e5*e,{label:i,value:n}=S(t);r.push({date:o-t,label:i,timeUnit:"day",value:n})}for(e=1;e<=l.WC.week;e+=1){let t=6048e5*e,{label:i,value:n}=S(t);r.push({date:o-t,label:i,timeUnit:"week",value:n})}for(e=1;e<l.WC.month;e+=1){let i=new Date;i.setMonth(t.getMonth()-e),i.setHours(0,0,0,0);let{label:n,value:s}=S(o-i.getTime());r.push({date:i.getTime(),label:n,timeUnit:"month",value:s})}for(e=1;e<=l.WC.year;e+=1){let o,i=new Date;switch(i.setFullYear(t.getFullYear()-e),i.setHours(0,0,0,0),e){case 1:o="Timeline-1YearAgo";break;case l.WC.year:o="Timeline-NPlusYearsAgo";break;default:o="Timeline-NYearsAgo"}r.push({date:i.getTime(),label:o,timeUnit:"year",value:e})}return r}function y(e,t){let o=0;for(let r of e){for(;o+1<t.length&&r.date<=t[o+1].date;)o++;let e=t[o];o<t.length&&r.date<=e.date&&(r.timeLineEntry=e,o++)}}function T(e,t){if(t.id)return t.id;let o=t.owner||"";return e===a.z.REMOTE?`${e}/${o}/${t.name}`:`${e}/${t.name}`}function C(e){return T(e.refType,e)}function w(e,t=0){for(let o=e.length-1;o>=t;o-=1){let t=e[o];if(t.currentWidth>t.minimumWidth)return t}}function E(e,t=0){if(e.length){for(let o=t;o<e.length;o+=1){let t=e[o],r=t.maximumWidth?Math.min(t.maximumWidth,t.preferredWidth||1/0):t.preferredWidth;if(r&&t.currentWidth<r)return t}return e[e.length-1]}}function b(e,t=!1){let o="--scrollable-scrollbar-thickness",r=t||!e[o]?(0,s.yr)(e):e,i=r[o]?parseInt(r[o],10):0;return Number.isNaN(i)?0:i}function I(e,t){let o=0;for(let r of e)t&&r.type===t||(o+=r.currentWidth);return o}let M=(e,t)=>e===t[t.length-1].type;function O(e,t,o){return t||o||0===e}function N(e,t,o){let r=O(e,t,o);return e+ +!!r}function x(e,t,o){let r=N(e,t,o);return l.yB*r}function A(e,t){return e.type===l.md&&t>0?e.contentWidth||0:e.currentWidth}function D(e,t,o,r,i){var n;let s=k(e,t);return s?(n=o.length,s.currentWidth<A(s,n))?b(r,i):0:0}function H(e,t,o,r,i,n,s,a,l){var h;let c,d=k(e,t);return d?(h=n.length,c=x(h,o,r),M(d.type,t)&&(i<c||s))?b(a,l):0:0}function G(e,t,o){return(0,r.q)(o,e.minimumWidth||0,e.maximumWidth&&!M(e.type,t)?e.maximumWidth||0:Number.MAX_VALUE)}function k(e,t){return t.find(({type:t})=>t===e)}function W(e){return!!e&&e.currentWidth<=e.showIconWidth}function z(e,t){return t.findIndex(({type:t})=>t===e)}function L(e,t,o){let r=0,i=0,n=z(e,t);if(n>-1){let e=function(e,t=0){let o=0;for(let r=t;r<e.length;r+=1)o+=e[r].minimumWidth;return o}(t,n+1),s=function(e,t=e.length-1){let o=0;for(let r=0;r<=t;r+=1)o+=e[r].currentWidth;return o}(t,n-1),a=Math.min(t[n].maximumWidth||Number.MAX_VALUE,o-e-s);r=t[n].minimumWidth,i=a}return{min:r,max:i}}function F(e){let t=!!e&&e===l.eB.Compact,o=t?1:2,r=t?10:28,i=t?1:3,n=t?1:3,s=t?10:22,a=t?s:l.lH,h=t?s:s/2+1;return{COMMIT_ZONE_LINE_WIDTH:o,COMMIT_ZONE_GUTTER_WIDTH:r,COMMIT_ZONE_PADDING_LEFT:i,COMMIT_ZONE_PADDING_RIGHT:n,COMMIT_COLUMN_WIDTH:s,COMMIT_NODE_DIAMETER:a,COMMIT_MERGE_NODE_DIAMETER:h,COMMIT_NODE_TOP_OFFSET:.5*l.lH-.5*a,COMMIT_MERGE_NODE_LEFT_OFFSET:s/2-h/2,COMMIT_MERGE_NODE_TOP_OFFSET:.5*l.lH-.5*h,COMMIT_ZONE_AVATAR_DIAMETER:a-2*o,COMMIT_ZONE_VIEWPORT_WIDTH_MIN:a+i+n+r,COMMIT_ZONE_SHOW_ICON_WIDTH:t?45:56,IS_COMPACT:t,RADIUS_DIFF_MERGE_NODE_COMMIT_NODE:a/2-h/2}}let P=e=>t=>t===e.length?"SHOW_MORE_COMMITS":e[t].sha;function B(e){return e instanceof c.Y?!!e.refsData?.activeGraphRef:!!e?.heads&&e.heads.some(e=>K(e))}function Z(e){let t=e.find(B);return t?.sha||void 0}function U(e){return[n.l2,n.gL,n.bY].includes(e)}function j(e,t){return"always"===t||!!e&&(0,i.D7)(e,e=>"number"==typeof e&&e>0)}function V(e,t){return e.has(t)&&1===e.size}function $(e,t,o,r){if(r<0)return l.CY;let i=e+2,n=r*e;return n>=o-i&&n<o+t+i?l.CY:l.mP}function Y(e){switch(e){case l.md:return"graph";case l.ui:return"branch";case l.d4:return"message";case l.fx:return"author";case l.$A:return"datetime";case l.AR:return"commit";case l.Sq:return"changes";default:return}}function K(e){return e.isCurrentHead??!1}function q(e){return e.refType===a.z.HEAD&&K(e)}class X{props;constructor(e){this.props=e}getActiveGraphZone(e){let t=k(e,this.props.graphZones);return!t||t.isHidden?void 0:t}getGraphRefGroupsByNameForRow(e){let t=this.getRow(e);return t&&t.refsData?.orderedRefGroups||[]}getRow(e){if(!(e<0)&&!(e>this.props.processedRows.length-1))return this.props.processedRows[e]}getZoneWidth(e,t=!0){var o;let r=t?this.getVerticalScrollWidth(e):0;return o=this.props.graphZones,(k(e,o)?.currentWidth||l.W[e].minimumWidth)-r}isDateTimeZoneActive(){return!!this.getActiveGraphZone(l.$A)}shouldShowTimelines(){return this.props.alwaysShowTimelines||!this.isDateTimeZoneActive()}isFirstRow(e){return 0===e}isColumnFollowingGraphColumn(e){var t;let o,r;return o=z(e,t=this.props.graphZones),r=z(l.md,t),-1!==o&&-1!==r&&o-r==1}isHighlighted(e){if(this.props.processedRows[e]&&this.props.highlightedShas){let t=this.props.processedRows[e]?.sha;return this.props.highlightedShas[t]||!1}return!1}isHovering(e){return!!this.props.processedRows[e]&&this.props.currentlyHoveredCommitSha===this.props.processedRows[e]?.sha}isLastColumn(e){return M(e,this.props.graphZones)}getSelectedRefGroupByName(){if(1===this.props.selectedShas.size){let e=this.props.selectedShas[Symbol.iterator]().next().value;if(e){let t=this.props.processedGraphRowBySha[e];if(t)return t.refsData?.orderedRefGroups||[]}}return[]}getHorizontalScrollHeight(e){return D(e,this.props.graphZones,this.props.processedRows,this.props.cssVariables)}getVerticalScrollWidth(e){return H(e,this.props.graphZones,this.props.hasMoreCommits,this.props.isLoadingRows,this.props.height,this.props.processedRows,this.props.enabledScrollMarkerTypes.length>0,this.props.cssVariables)}shouldUseColumnHeaderIcons(e){let t=k(e,this.props.graphZones);return!!t&&W(t)}isMissingHoveredRefGroup(e){if(this.props.highlightedShas)return!1;let t=this.getRow(e);if(!t)return!1;let o=[];if(this.props.dimRowsOfSelectedCommit){let e=this.getSelectedRefGroupByName();if(!e.length)return!1;o=e[0]}else{let{hoveredRefGroup:e}=this.props;if(!e?.length)return!1;o=e}let{name:r,refType:i}=o[0],n=i===a.z.TAG,s=t.tags.length>0&&!t.heads.length&&!t.remotes.length,{heads:l,tags:h,remotes:c}=t.hasRefs&&(!s||n)?{heads:t.heads,tags:t.tags,remotes:t.remotes}:t.childRefs;return!l.length&&!c.length&&!h.length||!l.some(e=>e.name===r&&o.some(e=>e.refType===a.z.HEAD))&&!c.some(e=>e.name===r&&o.some(t=>t.refType===a.z.REMOTE&&t.owner===e.owner))&&!h.some(e=>e.name===r&&o.some(e=>e.refType===a.z.TAG))}isSelected(e){let t=this.getRow(e)?.sha;return!!t&&this.props.selectedShas.has(t)}isSingleSelected(e){let t=this.getRow(e)?.sha;return!!t&&V(this.props.selectedShas,t)}hasTimeline(e){if(!this.shouldShowTimelines())return!1;let t=this.props.processedRows[e];return!!t?.timeLineEntry&&!(e*l.yB-this.props.scrollTop<l.yB)}rowContainsCurrentHeadRef(e){return B(e)}rowIsActiveHead(e){return e?.heads?.some(e=>K(e))??!1}}function Q(e){let t;for(t of e);return t}},695(e,t,o){o.d(t,{RA:()=>i,ej:()=>s,fd:()=>n,ki:()=>r});let r="pullRequest",i="upstream",n="issue",s=[r,i,n]},982(e,t,o){o.d(t,{Y:()=>s});var r=o(931),i=o(895);let n={[r.z.WORKTREE]:3,[r.z.HEAD]:2,[r.z.REMOTE]:1,[r.z.TAG]:0};class s{_graph;_message;_heads;_remotes;_tags;_activeGraphRef;_activeGraphRefGroup;_refGroupsByName;_orderedRefGroups;sha;parents;author;email;date;type;contexts;rowIndex;column;columnForColoring;edgeColumnMaxes;edges;childRefs;timeLineEntry;scopeBoundaryKind;summary;body;displaySummary;displayBody;set message(e){if(this._message!==e){this._message=e;let t=this._graph.formatCommitMessageCallback(e);this.displaySummary=t.summary,this.displayBody=t.body}}get message(){return this._message}get heads(){return this._heads}set heads(e){this._heads!==e&&(this._heads=e,this.initializeRefGroups())}set remotes(e){this._remotes!==e&&(this._remotes=e,this.initializeRefGroups())}get remotes(){return this._remotes}set tags(e){this._tags!==e&&(this._tags=e,this.initializeRefGroups())}get tags(){return this._tags}get hasRefs(){return this.heads.length>0||this.remotes.length>0||this.tags.length>0}get hasChildRefs(){return this.childRefs.heads.length>0||this.childRefs.remotes.length>0||this.childRefs.tags.length>0}get hidden(){return null==this.rowIndex}get refsData(){if(this.hasRefs||this.hasChildRefs)return 0===this._orderedRefGroups.length&&this.loadGraphRefGroupsData(),{activeGraphRef:this._activeGraphRef,activeGraphRefGroup:this._activeGraphRefGroup,orderedRefGroups:this._orderedRefGroups,refGroupsByName:this._refGroupsByName}}constructor(e,t,o,r,i,n,s,a){this._graph=e,this._heads=t.heads||[],this._remotes=t.remotes||[],this._tags=t.tags||[],this.message=t.message,this.sha=t.sha,this.parents=t.parents,this.author=t.author,this.email=t.email,this.date=t.date,this.type=t.type,this.contexts=t.contexts,this.column=o||0,this.columnForColoring=a,this.edgeColumnMaxes=r||0,this.edges=i||{},this.childRefs=n||{heads:[],tags:[],remotes:[]},this.timeLineEntry=s,this.initializeRefGroups()}initializeRefGroups(){this._activeGraphRefGroup=void 0,this._activeGraphRef=void 0,this._refGroupsByName={},this._orderedRefGroups=[]}addRefToRefGroup(e){let t=e.name;this._refGroupsByName[t]||(this._refGroupsByName[t]=[]),this._refGroupsByName[t].push(e)}loadGraphRefGroupsData(){this.initializeRefGroups();let e=[],{heads:t,tags:o,remotes:s}=this.hasRefs?this:this.childRefs;for(let o of t){let t={...o,refType:r.z.HEAD};this.addRefToRefGroup(t),(0,i.a5)(t)?(this._activeGraphRefGroup=this._refGroupsByName[t.name],this._activeGraphRef=t,e.unshift(this._refGroupsByName[t.name])):e.push(this._refGroupsByName[t.name])}for(let t of s){let o={...t,fullName:t.owner?`${t.owner}/${t.name}`:t.name,refType:r.z.REMOTE},i=this._refGroupsByName[o.name];this.addRefToRefGroup(o),i||e.push(this._refGroupsByName[o.name])}for(let t of o){let o={...t,refType:r.z.TAG};this.addRefToRefGroup(o),e.push(this._refGroupsByName[o.name])}let a=this._graph.pinnedBranchFullName,l=a?e.find(e=>e.some(e=>e.id===a)):void 0;this._orderedRefGroups=e.sort((e,t)=>{if(e===this._activeGraphRefGroup)return -1;if(t===this._activeGraphRefGroup)return 1;if(null!=l){if(e===l)return -1;if(t===l)return 1}return n[e[0].refType]>n[t[0].refType]?-1:n[e[0].refType]<n[t[0].refType]?1:e.length>t.length?-1:e.length<t.length?1:e[0].name.localeCompare(t[0].name)})}}},484(e,t,o){o.d(t,{e:()=>r});class r extends CustomEvent{static type="invalidate";constructor(e,t){super(r.type,{detail:{shas:t?new Set(t):void 0,type:e}})}}},599(e,t,o){o.d(t,{T:()=>r});function r(e){switch(e){case"github":return"GitHub";case"githubEnterprise":return"GitHub Enterprise";case"gitlab":return"GitLab";case"gitlabSelfHosted":return"GitLab Self-Hosted";case"azureDevops":return"Azure DevOps";case"bitbucket":return"Bitbucket";case"bitbucketServer":return"Bitbucket Server";default:return e}}},553(e,t,o){o.d(t,{H:()=>r});let r={"CommitDiffSection-FileAdded":"added","CommitDiffSection-FileDeleted":"deleted","CommitDiffSection-FileModified":"modified","CommitDiffSection-FileRenamed":"renamed","CommitDiffSection-NFilesAdded":"{0} added","CommitDiffSection-NFilesDeleted":"{0} deleted","CommitDiffSection-NFilesModified":"{0} modified","CommitDiffSection-NFilesRenamed":"{0} renamed","Graph-IsLoadingRows":"Loading...","Graph-NoCommits":"No commits","Graph-WorkInProgress":"Work in progress","Graph-WorkInProgress-Changes":"Working Changes","Graph-WorkInProgress-Clean":"Working Tree","WipStatsPill-NoChanges":"No changes","GraphHeader-BranchTag":"BRANCH / TAG","GraphHeader-Changes":"CHANGES","GraphHeader-CommitAuthor":"AUTHOR","GraphHeader-CommitDateTime":"COMMIT DATE / TIME","GraphHeader-CommitGraph":"GRAPH","GraphHeader-CommitMessage":"COMMIT MESSAGE","GraphHeader-CommitSha":"SHA","GraphHeader-EditColumns":"Columns settings","GraphHeader-Filter":"Filter","GraphHeader-HiddenRefs-btn":"Hidden Branches / Tags","OptionalGraphZone-CommitAuthor":"Author","OptionalGraphZone-CommitDateTime":"Date / Time","OptionalGraphZone-CommitSha":"Sha","IssueIcon-Tooltip":"{0}: {1}","PullRequestIcon-Tooltip":`#{0}: {1}
|