{"version":3,"sources":["webpack:///./node_modules/lodash/_baseIsNaN.js","webpack:///./node_modules/memoize-one/dist/memoize-one.esm.js","webpack:///./node_modules/react-window/dist/index.esm.js","webpack:///./src/common/components/organisms/FundCentre/AutocompleteInput.tsx","webpack:///./src/common/components/organisms/FundCentre/SFDR.tsx","webpack:///./src/common/pages/SfdrPage.tsx","webpack:///./node_modules/lodash/_strictIndexOf.js","webpack:///./node_modules/lodash/_baseFindIndex.js","webpack:///./node_modules/lodash/_baseUniq.js","webpack:///./node_modules/lodash/_baseIndexOf.js","webpack:///./node_modules/lodash/_arrayIncludesWith.js","webpack:///./node_modules/@irishlife/ilgroupdesignsystem.atoms.tooltip/dist/tooltip.js","webpack:///./node_modules/lodash/_createSet.js","webpack:///./node_modules/lodash/_arrayIncludes.js","webpack:///./node_modules/@irishlife/ilgroupdesignsystem.atoms.tooltip/dist/index.js","webpack:///./node_modules/lodash/uniqBy.js","webpack:///./node_modules/lodash/noop.js"],"names":["module","exports","value","safeIsNaN","Number","isNaN","areInputsEqual","newInputs","lastInputs","length","i","first","second","resultFn","isEqual","lastThis","lastResult","lastArgs","calledOnce","newArgs","_i","arguments","this","apply","now","performance","Date","cancelTimeout","timeoutID","cancelAnimationFrame","id","requestTimeout","callback","delay","start","requestAnimationFrame","tick","call","size","getScrollbarSize","recalculate","div","document","createElement","style","width","height","overflow","body","appendChild","offsetWidth","clientWidth","removeChild","cachedRTLResult","getRTLOffsetType","outerDiv","outerStyle","direction","innerDiv","innerStyle","scrollLeft","defaultItemKey$1","index","data","createListComponent","_ref","_class","getItemOffset","getEstimatedTotalSize","getItemSize","getOffsetForIndexAndAlignment","getStartIndexForOffset","getStopIndexForStartIndex","initInstanceProps","shouldResetStyleCacheOnItemSizeChange","validateProps","_PureComponent","List","props","_this","_instanceProps","_outerRef","_resetIsScrollingTimeoutId","state","instance","isScrolling","scrollDirection","scrollOffset","initialScrollOffset","scrollUpdateWasRequested","_callOnItemsRendered","overscanStartIndex","overscanStopIndex","visibleStartIndex","visibleStopIndex","onItemsRendered","_callOnScroll","onScroll","_getItemStyle","_this$props","itemSize","layout","itemStyleCache","_getItemStyleCache","hasOwnProperty","_offset","isHorizontal","isRtl","offsetHorizontal","position","left","undefined","right","top","_","__","___","_onScrollHorizontal","event","_event$currentTarget","currentTarget","scrollWidth","setState","prevState","Math","max","min","_resetIsScrollingDebounced","_onScrollVertical","_event$currentTarget2","clientHeight","scrollHeight","scrollTop","_outerRefSetter","ref","outerRef","current","_resetIsScrolling","getDerivedStateFromProps","nextProps","validateSharedProps$1","_proto","prototype","scrollTo","scrollToItem","align","_this$props2","itemCount","scrollbarSize","componentDidMount","_this$props3","_callPropsCallbacks","componentDidUpdate","_this$props4","_this$state","componentWillUnmount","render","_this$props5","children","className","innerRef","innerElementType","innerTagName","itemData","_this$props5$itemKey","itemKey","outerElementType","outerTagName","useIsScrolling","_this$_getRangeToRend","_getRangeToRender","startIndex","stopIndex","items","_index","push","key","estimatedTotalSize","WebkitOverflowScrolling","willChange","pointerEvents","_this$_getRangeToRend2","_overscanStartIndex","_overscanStopIndex","_visibleStartIndex","_visibleStopIndex","_this$state2","_scrollDirection","_scrollOffset","_scrollUpdateWasRequested","_this$props6","overscanCount","_this$state3","overscanBackward","overscanForward","defaultProps","_ref2","_ref3","getItemMetadata$1","instanceProps","itemMetadataMap","lastMeasuredIndex","offset","itemMetadata","findNearestItemBinarySearch$1","high","low","middle","floor","currentOffset","findNearestItemExponentialSearch$1","interval","estimatedItemSize","totalSizeOfMeasuredItems","VariableSizeList","maxOffset","minOffset","round","findNearestItem$1","resetAfterIndex","shouldForceUpdate","forceUpdate","_ref5","renderRow","React","cloneElement","OuterElementContext","createContext","OuterElementType","forwardRef","outerProps","useContext","ListboxComponent","other","Children","toArray","theme","useTheme","smUp","useMediaQuery","breakpoints","up","noSsr","getChildSize","child","isValidElement","type","ListSubheader","gridRef","useRef","useEffect","useResetCache","Provider","map","reduce","a","b","useStyles","makeStyles","listbox","boxSizing","padding","margin","article8","borderLeft","borderRight","borderBottom","scale","article9","SFDR","jumbotron","desktop","useDesktop","funds","useSfdrProductsAndFunds","initialFilter","productName","fundName","queryString","window","parse","location","search","useState","toString","fundId","setFundId","filter","setFilter","sfdrFunds","setSfdrFunds","activeFund","setActiveFund","allFundNames","setAllFundNames","filteredFundNames","setFilteredFundNames","classes","sortSfdrFunds","localeCompare","getFunds","useCallback","singleFund","fund","flat","sort","results","item","getSfdrFundList","product","pop","getAllFundNames","queryResults","fundCode","singleResult","Layout","Jumbotron","Spacer","variant","Wrapper","Box","m","component","Text","label","box","mb","color","borderRadius","bgcolor","display","px","py","container","spacing","xs","md","flexDirection","mr","Select","onChange","target","placeholder","getOptions","MenuItem","Autocomplete","disableListWrap","options","renderInput","params","TextField","renderOption","option","Typography","noWrap","flex","marginTop","onClick","border","textTransform","backgroundColor","justifyContent","flexFlow","sx","flexGrow","fontSize","maxWidth","alignItems","sfdrArticleIndicator","placement","primaryFundName","flexBasis","downloadSFDRDocument","SfdrPage","pageContext","getSFDRData","getJumbotronData","getLayoutData","array","fromIndex","predicate","fromRight","SetCache","arrayIncludes","arrayIncludesWith","cacheHas","createSet","setToArray","iteratee","comparator","includes","isCommon","result","seen","set","outer","computed","seenIndex","baseFindIndex","baseIsNaN","strictIndexOf","__rest","s","e","t","p","Object","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__importDefault","mod","__esModule","defineProperty","Tooltip","react_1","react_2","rest","styles","default","useMemo","bg","assign","rounded","Set","noop","values","baseIndexOf","tooltip_1","enumerable","get","baseIteratee","baseUniq"],"mappings":"+EAWAA,EAAOC,QAJP,SAAmBC,GACjB,OAAOA,GAAUA,I,snBCRfC,EAAYC,OAAOC,OAAS,SAAkBH,GAChD,MAAwB,iBAAVA,GAAsBA,GAAUA,GAehD,SAASI,EAAeC,EAAWC,GACjC,GAAID,EAAUE,SAAWD,EAAWC,OAClC,OAAO,EAGT,IAAK,IAAIC,EAAI,EAAGA,EAAIH,EAAUE,OAAQC,IACpC,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,EAAc,EAAQ,QAgB1B3a,EAAOC,QALP,SAAuByX,EAAOxX,GAE5B,SADsB,MAATwX,EAAgB,EAAIA,EAAMjX,SACpBka,EAAYjD,EAAOxX,EAAO,IAAM,I,kCCXrDoZ,OAAOO,eAAe5Z,EAAS,aAAc,CAC3CC,OAAO,IAETD,EAAQ6Z,aAAU,EAElB,IAAIc,EAAY,EAAQ,QAExBtB,OAAOO,eAAe5Z,EAAS,UAAW,CACxC4a,YAAY,EACZC,IAAK,WACH,OAAOF,EAAUd,Y,qBCZrB,IAAIiB,EAAe,EAAQ,QACvBC,EAAW,EAAQ,QA6BvBhb,EAAOC,QAJP,SAAgByX,EAAOU,GACrB,OAAQV,GAASA,EAAMjX,OAAUua,EAAStD,EAAOqD,EAAa3C,EAAU,IAAM,K,qBCXhFpY,EAAOC,QAJP","file":"component---src-common-pages-sfdr-page-tsx-b9ce3377ae974c7b22d4.js","sourcesContent":["/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","var safeIsNaN = Number.isNaN || function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n};\n\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n\n return false;\n}\n\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) {\n isEqual = areInputsEqual;\n }\n\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n\n function memoized() {\n var newArgs = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n\n return memoized;\n}\n\nexport default memoizeOne;","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport memoizeOne from 'memoize-one';\nimport { createElement, PureComponent } from 'react';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose'; // Animation frame based implementation of setTimeout.\n// Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js\n\nvar hasNativePerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';\nvar now = hasNativePerformanceNow ? function () {\n return performance.now();\n} : function () {\n return Date.now();\n};\n\nfunction cancelTimeout(timeoutID) {\n cancelAnimationFrame(timeoutID.id);\n}\n\nfunction requestTimeout(callback, delay) {\n var start = now();\n\n function tick() {\n if (now() - start >= delay) {\n callback.call(null);\n } else {\n timeoutID.id = requestAnimationFrame(tick);\n }\n }\n\n var timeoutID = {\n id: requestAnimationFrame(tick)\n };\n return timeoutID;\n}\n\nvar size = -1; // This utility copied from \"dom-helpers\" package.\n\nfunction getScrollbarSize(recalculate) {\n if (recalculate === void 0) {\n recalculate = false;\n }\n\n if (size === -1 || recalculate) {\n var div = document.createElement('div');\n var style = div.style;\n style.width = '50px';\n style.height = '50px';\n style.overflow = 'scroll';\n document.body.appendChild(div);\n size = div.offsetWidth - div.clientWidth;\n document.body.removeChild(div);\n }\n\n return size;\n}\n\nvar cachedRTLResult = null; // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).\n// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.\n// The safest way to check this is to intentionally set a negative offset,\n// and then verify that the subsequent \"scroll\" event matches the negative offset.\n// If it does not match, then we can assume a non-standard RTL scroll implementation.\n\nfunction getRTLOffsetType(recalculate) {\n if (recalculate === void 0) {\n recalculate = false;\n }\n\n if (cachedRTLResult === null || recalculate) {\n var outerDiv = document.createElement('div');\n var outerStyle = outerDiv.style;\n outerStyle.width = '50px';\n outerStyle.height = '50px';\n outerStyle.overflow = 'scroll';\n outerStyle.direction = 'rtl';\n var innerDiv = document.createElement('div');\n var innerStyle = innerDiv.style;\n innerStyle.width = '100px';\n innerStyle.height = '100px';\n outerDiv.appendChild(innerDiv);\n document.body.appendChild(outerDiv);\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = 'positive-descending';\n } else {\n outerDiv.scrollLeft = 1;\n\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = 'negative';\n } else {\n cachedRTLResult = 'positive-ascending';\n }\n }\n\n document.body.removeChild(outerDiv);\n return cachedRTLResult;\n }\n\n return cachedRTLResult;\n}\n\nvar IS_SCROLLING_DEBOUNCE_INTERVAL = 150;\n\nvar defaultItemKey = function defaultItemKey(_ref) {\n var columnIndex = _ref.columnIndex,\n data = _ref.data,\n rowIndex = _ref.rowIndex;\n return rowIndex + \":\" + columnIndex;\n}; // In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\n\n\nvar devWarningsOverscanCount = null;\nvar devWarningsOverscanRowsColumnsCount = null;\nvar devWarningsTagName = null;\n\nif (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsOverscanCount = /*#__PURE__*/new WeakSet();\n devWarningsOverscanRowsColumnsCount = /*#__PURE__*/new WeakSet();\n devWarningsTagName = /*#__PURE__*/new WeakSet();\n }\n}\n\nfunction createGridComponent(_ref2) {\n var _class;\n\n var getColumnOffset = _ref2.getColumnOffset,\n getColumnStartIndexForOffset = _ref2.getColumnStartIndexForOffset,\n getColumnStopIndexForStartIndex = _ref2.getColumnStopIndexForStartIndex,\n getColumnWidth = _ref2.getColumnWidth,\n getEstimatedTotalHeight = _ref2.getEstimatedTotalHeight,\n getEstimatedTotalWidth = _ref2.getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment = _ref2.getOffsetForColumnAndAlignment,\n getOffsetForRowAndAlignment = _ref2.getOffsetForRowAndAlignment,\n getRowHeight = _ref2.getRowHeight,\n getRowOffset = _ref2.getRowOffset,\n getRowStartIndexForOffset = _ref2.getRowStartIndexForOffset,\n getRowStopIndexForStartIndex = _ref2.getRowStopIndexForStartIndex,\n initInstanceProps = _ref2.initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange = _ref2.shouldResetStyleCacheOnItemSizeChange,\n validateProps = _ref2.validateProps;\n return _class = /*#__PURE__*/function (_PureComponent) {\n _inheritsLoose(Grid, _PureComponent); // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n\n\n function Grid(props) {\n var _this;\n\n _this = _PureComponent.call(this, props) || this;\n _this._instanceProps = initInstanceProps(_this.props, _assertThisInitialized(_this));\n _this._resetIsScrollingTimeoutId = null;\n _this._outerRef = void 0;\n _this.state = {\n instance: _assertThisInitialized(_this),\n isScrolling: false,\n horizontalScrollDirection: 'forward',\n scrollLeft: typeof _this.props.initialScrollLeft === 'number' ? _this.props.initialScrollLeft : 0,\n scrollTop: typeof _this.props.initialScrollTop === 'number' ? _this.props.initialScrollTop : 0,\n scrollUpdateWasRequested: false,\n verticalScrollDirection: 'forward'\n };\n _this._callOnItemsRendered = void 0;\n _this._callOnItemsRendered = memoizeOne(function (overscanColumnStartIndex, overscanColumnStopIndex, overscanRowStartIndex, overscanRowStopIndex, visibleColumnStartIndex, visibleColumnStopIndex, visibleRowStartIndex, visibleRowStopIndex) {\n return _this.props.onItemsRendered({\n overscanColumnStartIndex: overscanColumnStartIndex,\n overscanColumnStopIndex: overscanColumnStopIndex,\n overscanRowStartIndex: overscanRowStartIndex,\n overscanRowStopIndex: overscanRowStopIndex,\n visibleColumnStartIndex: visibleColumnStartIndex,\n visibleColumnStopIndex: visibleColumnStopIndex,\n visibleRowStartIndex: visibleRowStartIndex,\n visibleRowStopIndex: visibleRowStopIndex\n });\n });\n _this._callOnScroll = void 0;\n _this._callOnScroll = memoizeOne(function (scrollLeft, scrollTop, horizontalScrollDirection, verticalScrollDirection, scrollUpdateWasRequested) {\n return _this.props.onScroll({\n horizontalScrollDirection: horizontalScrollDirection,\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n verticalScrollDirection: verticalScrollDirection,\n scrollUpdateWasRequested: scrollUpdateWasRequested\n });\n });\n _this._getItemStyle = void 0;\n\n _this._getItemStyle = function (rowIndex, columnIndex) {\n var _this$props = _this.props,\n columnWidth = _this$props.columnWidth,\n direction = _this$props.direction,\n rowHeight = _this$props.rowHeight;\n\n var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && columnWidth, shouldResetStyleCacheOnItemSizeChange && direction, shouldResetStyleCacheOnItemSizeChange && rowHeight);\n\n var key = rowIndex + \":\" + columnIndex;\n var style;\n\n if (itemStyleCache.hasOwnProperty(key)) {\n style = itemStyleCache[key];\n } else {\n var _offset = getColumnOffset(_this.props, columnIndex, _this._instanceProps);\n\n var isRtl = direction === 'rtl';\n itemStyleCache[key] = style = {\n position: 'absolute',\n left: isRtl ? undefined : _offset,\n right: isRtl ? _offset : undefined,\n top: getRowOffset(_this.props, rowIndex, _this._instanceProps),\n height: getRowHeight(_this.props, rowIndex, _this._instanceProps),\n width: getColumnWidth(_this.props, columnIndex, _this._instanceProps)\n };\n }\n\n return style;\n };\n\n _this._getItemStyleCache = void 0;\n _this._getItemStyleCache = memoizeOne(function (_, __, ___) {\n return {};\n });\n\n _this._onScroll = function (event) {\n var _event$currentTarget = event.currentTarget,\n clientHeight = _event$currentTarget.clientHeight,\n clientWidth = _event$currentTarget.clientWidth,\n scrollLeft = _event$currentTarget.scrollLeft,\n scrollTop = _event$currentTarget.scrollTop,\n scrollHeight = _event$currentTarget.scrollHeight,\n scrollWidth = _event$currentTarget.scrollWidth;\n\n _this.setState(function (prevState) {\n if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n var direction = _this.props.direction; // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n\n var calculatedScrollLeft = scrollLeft;\n\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n calculatedScrollLeft = -scrollLeft;\n break;\n\n case 'positive-descending':\n calculatedScrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n calculatedScrollLeft = Math.max(0, Math.min(calculatedScrollLeft, scrollWidth - clientWidth));\n var calculatedScrollTop = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));\n return {\n isScrolling: true,\n horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: calculatedScrollLeft,\n scrollTop: calculatedScrollTop,\n verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward',\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._outerRefSetter = function (ref) {\n var outerRef = _this.props.outerRef;\n _this._outerRef = ref;\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {\n outerRef.current = ref;\n }\n };\n\n _this._resetIsScrollingDebounced = function () {\n if (_this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(_this._resetIsScrollingTimeoutId);\n }\n\n _this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL);\n };\n\n _this._resetIsScrolling = function () {\n _this._resetIsScrollingTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n }, function () {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n _this._getItemStyleCache(-1);\n });\n };\n\n return _this;\n }\n\n Grid.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n validateSharedProps(nextProps, prevState);\n validateProps(nextProps);\n return null;\n };\n\n var _proto = Grid.prototype;\n\n _proto.scrollTo = function scrollTo(_ref3) {\n var scrollLeft = _ref3.scrollLeft,\n scrollTop = _ref3.scrollTop;\n\n if (scrollLeft !== undefined) {\n scrollLeft = Math.max(0, scrollLeft);\n }\n\n if (scrollTop !== undefined) {\n scrollTop = Math.max(0, scrollTop);\n }\n\n this.setState(function (prevState) {\n if (scrollLeft === undefined) {\n scrollLeft = prevState.scrollLeft;\n }\n\n if (scrollTop === undefined) {\n scrollTop = prevState.scrollTop;\n }\n\n if (prevState.scrollLeft === scrollLeft && prevState.scrollTop === scrollTop) {\n return null;\n }\n\n return {\n horizontalScrollDirection: prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollUpdateWasRequested: true,\n verticalScrollDirection: prevState.scrollTop < scrollTop ? 'forward' : 'backward'\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _proto.scrollToItem = function scrollToItem(_ref4) {\n var _ref4$align = _ref4.align,\n align = _ref4$align === void 0 ? 'auto' : _ref4$align,\n columnIndex = _ref4.columnIndex,\n rowIndex = _ref4.rowIndex;\n var _this$props2 = this.props,\n columnCount = _this$props2.columnCount,\n height = _this$props2.height,\n rowCount = _this$props2.rowCount,\n width = _this$props2.width;\n var _this$state = this.state,\n scrollLeft = _this$state.scrollLeft,\n scrollTop = _this$state.scrollTop;\n var scrollbarSize = getScrollbarSize();\n\n if (columnIndex !== undefined) {\n columnIndex = Math.max(0, Math.min(columnIndex, columnCount - 1));\n }\n\n if (rowIndex !== undefined) {\n rowIndex = Math.max(0, Math.min(rowIndex, rowCount - 1));\n }\n\n var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);\n var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps); // The scrollbar size should be considered when scrolling an item into view,\n // to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n\n var horizontalScrollbarSize = estimatedTotalWidth > width ? scrollbarSize : 0;\n var verticalScrollbarSize = estimatedTotalHeight > height ? scrollbarSize : 0;\n this.scrollTo({\n scrollLeft: columnIndex !== undefined ? getOffsetForColumnAndAlignment(this.props, columnIndex, align, scrollLeft, this._instanceProps, verticalScrollbarSize) : scrollLeft,\n scrollTop: rowIndex !== undefined ? getOffsetForRowAndAlignment(this.props, rowIndex, align, scrollTop, this._instanceProps, horizontalScrollbarSize) : scrollTop\n });\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props3 = this.props,\n initialScrollLeft = _this$props3.initialScrollLeft,\n initialScrollTop = _this$props3.initialScrollTop;\n\n if (this._outerRef != null) {\n var outerRef = this._outerRef;\n\n if (typeof initialScrollLeft === 'number') {\n outerRef.scrollLeft = initialScrollLeft;\n }\n\n if (typeof initialScrollTop === 'number') {\n outerRef.scrollTop = initialScrollTop;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var direction = this.props.direction;\n var _this$state2 = this.state,\n scrollLeft = _this$state2.scrollLeft,\n scrollTop = _this$state2.scrollTop,\n scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n var outerRef = this._outerRef;\n\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollLeft;\n break;\n\n case 'positive-ascending':\n outerRef.scrollLeft = scrollLeft;\n break;\n\n default:\n var clientWidth = outerRef.clientWidth,\n scrollWidth = outerRef.scrollWidth;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } else {\n outerRef.scrollLeft = Math.max(0, scrollLeft);\n }\n\n outerRef.scrollTop = Math.max(0, scrollTop);\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n };\n\n _proto.render = function render() {\n var _this$props4 = this.props,\n children = _this$props4.children,\n className = _this$props4.className,\n columnCount = _this$props4.columnCount,\n direction = _this$props4.direction,\n height = _this$props4.height,\n innerRef = _this$props4.innerRef,\n innerElementType = _this$props4.innerElementType,\n innerTagName = _this$props4.innerTagName,\n itemData = _this$props4.itemData,\n _this$props4$itemKey = _this$props4.itemKey,\n itemKey = _this$props4$itemKey === void 0 ? defaultItemKey : _this$props4$itemKey,\n outerElementType = _this$props4.outerElementType,\n outerTagName = _this$props4.outerTagName,\n rowCount = _this$props4.rowCount,\n style = _this$props4.style,\n useIsScrolling = _this$props4.useIsScrolling,\n width = _this$props4.width;\n var isScrolling = this.state.isScrolling;\n\n var _this$_getHorizontalR = this._getHorizontalRangeToRender(),\n columnStartIndex = _this$_getHorizontalR[0],\n columnStopIndex = _this$_getHorizontalR[1];\n\n var _this$_getVerticalRan = this._getVerticalRangeToRender(),\n rowStartIndex = _this$_getVerticalRan[0],\n rowStopIndex = _this$_getVerticalRan[1];\n\n var items = [];\n\n if (columnCount > 0 && rowCount) {\n for (var _rowIndex = rowStartIndex; _rowIndex <= rowStopIndex; _rowIndex++) {\n for (var _columnIndex = columnStartIndex; _columnIndex <= columnStopIndex; _columnIndex++) {\n items.push(createElement(children, {\n columnIndex: _columnIndex,\n data: itemData,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n key: itemKey({\n columnIndex: _columnIndex,\n data: itemData,\n rowIndex: _rowIndex\n }),\n rowIndex: _rowIndex,\n style: this._getItemStyle(_rowIndex, _columnIndex)\n }));\n }\n }\n } // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n\n\n var estimatedTotalHeight = getEstimatedTotalHeight(this.props, this._instanceProps);\n var estimatedTotalWidth = getEstimatedTotalWidth(this.props, this._instanceProps);\n return createElement(outerElementType || outerTagName || 'div', {\n className: className,\n onScroll: this._onScroll,\n ref: this._outerRefSetter,\n style: _extends({\n position: 'relative',\n height: height,\n width: width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction: direction\n }, style)\n }, createElement(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: estimatedTotalHeight,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: estimatedTotalWidth\n }\n }));\n };\n\n _proto._callPropsCallbacks = function _callPropsCallbacks() {\n var _this$props5 = this.props,\n columnCount = _this$props5.columnCount,\n onItemsRendered = _this$props5.onItemsRendered,\n onScroll = _this$props5.onScroll,\n rowCount = _this$props5.rowCount;\n\n if (typeof onItemsRendered === 'function') {\n if (columnCount > 0 && rowCount > 0) {\n var _this$_getHorizontalR2 = this._getHorizontalRangeToRender(),\n _overscanColumnStartIndex = _this$_getHorizontalR2[0],\n _overscanColumnStopIndex = _this$_getHorizontalR2[1],\n _visibleColumnStartIndex = _this$_getHorizontalR2[2],\n _visibleColumnStopIndex = _this$_getHorizontalR2[3];\n\n var _this$_getVerticalRan2 = this._getVerticalRangeToRender(),\n _overscanRowStartIndex = _this$_getVerticalRan2[0],\n _overscanRowStopIndex = _this$_getVerticalRan2[1],\n _visibleRowStartIndex = _this$_getVerticalRan2[2],\n _visibleRowStopIndex = _this$_getVerticalRan2[3];\n\n this._callOnItemsRendered(_overscanColumnStartIndex, _overscanColumnStopIndex, _overscanRowStartIndex, _overscanRowStopIndex, _visibleColumnStartIndex, _visibleColumnStopIndex, _visibleRowStartIndex, _visibleRowStopIndex);\n }\n }\n\n if (typeof onScroll === 'function') {\n var _this$state3 = this.state,\n _horizontalScrollDirection = _this$state3.horizontalScrollDirection,\n _scrollLeft = _this$state3.scrollLeft,\n _scrollTop = _this$state3.scrollTop,\n _scrollUpdateWasRequested = _this$state3.scrollUpdateWasRequested,\n _verticalScrollDirection = _this$state3.verticalScrollDirection;\n\n this._callOnScroll(_scrollLeft, _scrollTop, _horizontalScrollDirection, _verticalScrollDirection, _scrollUpdateWasRequested);\n }\n } // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n ;\n\n _proto._getHorizontalRangeToRender = function _getHorizontalRangeToRender() {\n var _this$props6 = this.props,\n columnCount = _this$props6.columnCount,\n overscanColumnCount = _this$props6.overscanColumnCount,\n overscanColumnsCount = _this$props6.overscanColumnsCount,\n overscanCount = _this$props6.overscanCount,\n rowCount = _this$props6.rowCount;\n var _this$state4 = this.state,\n horizontalScrollDirection = _this$state4.horizontalScrollDirection,\n isScrolling = _this$state4.isScrolling,\n scrollLeft = _this$state4.scrollLeft;\n var overscanCountResolved = overscanColumnCount || overscanColumnsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getColumnStartIndexForOffset(this.props, scrollLeft, this._instanceProps);\n var stopIndex = getColumnStopIndexForStartIndex(this.props, startIndex, scrollLeft, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || horizontalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;\n var overscanForward = !isScrolling || horizontalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(columnCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n _proto._getVerticalRangeToRender = function _getVerticalRangeToRender() {\n var _this$props7 = this.props,\n columnCount = _this$props7.columnCount,\n overscanCount = _this$props7.overscanCount,\n overscanRowCount = _this$props7.overscanRowCount,\n overscanRowsCount = _this$props7.overscanRowsCount,\n rowCount = _this$props7.rowCount;\n var _this$state5 = this.state,\n isScrolling = _this$state5.isScrolling,\n verticalScrollDirection = _this$state5.verticalScrollDirection,\n scrollTop = _this$state5.scrollTop;\n var overscanCountResolved = overscanRowCount || overscanRowsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getRowStartIndexForOffset(this.props, scrollTop, this._instanceProps);\n var stopIndex = getRowStopIndexForStartIndex(this.props, startIndex, scrollTop, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || verticalScrollDirection === 'backward' ? Math.max(1, overscanCountResolved) : 1;\n var overscanForward = !isScrolling || verticalScrollDirection === 'forward' ? Math.max(1, overscanCountResolved) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(rowCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n return Grid;\n }(PureComponent), _class.defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n useIsScrolling: false\n }, _class;\n}\n\nvar validateSharedProps = function validateSharedProps(_ref5, _ref6) {\n var children = _ref5.children,\n direction = _ref5.direction,\n height = _ref5.height,\n innerTagName = _ref5.innerTagName,\n outerTagName = _ref5.outerTagName,\n overscanColumnsCount = _ref5.overscanColumnsCount,\n overscanCount = _ref5.overscanCount,\n overscanRowsCount = _ref5.overscanRowsCount,\n width = _ref5.width;\n var instance = _ref6.instance;\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof overscanCount === 'number') {\n if (devWarningsOverscanCount && !devWarningsOverscanCount.has(instance)) {\n devWarningsOverscanCount.add(instance);\n console.warn('The overscanCount prop has been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');\n }\n }\n\n if (typeof overscanColumnsCount === 'number' || typeof overscanRowsCount === 'number') {\n if (devWarningsOverscanRowsColumnsCount && !devWarningsOverscanRowsColumnsCount.has(instance)) {\n devWarningsOverscanRowsColumnsCount.add(instance);\n console.warn('The overscanColumnsCount and overscanRowsCount props have been deprecated. ' + 'Please use the overscanColumnCount and overscanRowCount props instead.');\n }\n }\n\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance);\n console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');\n }\n }\n\n if (children == null) {\n throw Error('An invalid \"children\" prop has been specified. ' + 'Value should be a React component. ' + (\"\\\"\" + (children === null ? 'null' : typeof children) + \"\\\" was specified.\"));\n }\n\n switch (direction) {\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"direction\" prop has been specified. ' + 'Value should be either \"ltr\" or \"rtl\". ' + (\"\\\"\" + direction + \"\\\" was specified.\"));\n }\n\n if (typeof width !== 'number') {\n throw Error('An invalid \"width\" prop has been specified. ' + 'Grids must specify a number for width. ' + (\"\\\"\" + (width === null ? 'null' : typeof width) + \"\\\" was specified.\"));\n }\n\n if (typeof height !== 'number') {\n throw Error('An invalid \"height\" prop has been specified. ' + 'Grids must specify a number for height. ' + (\"\\\"\" + (height === null ? 'null' : typeof height) + \"\\\" was specified.\"));\n }\n }\n};\n\nvar DEFAULT_ESTIMATED_ITEM_SIZE = 50;\n\nvar getEstimatedTotalHeight = function getEstimatedTotalHeight(_ref, _ref2) {\n var rowCount = _ref.rowCount;\n var rowMetadataMap = _ref2.rowMetadataMap,\n estimatedRowHeight = _ref2.estimatedRowHeight,\n lastMeasuredRowIndex = _ref2.lastMeasuredRowIndex;\n var totalSizeOfMeasuredRows = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredRowIndex >= rowCount) {\n lastMeasuredRowIndex = rowCount - 1;\n }\n\n if (lastMeasuredRowIndex >= 0) {\n var itemMetadata = rowMetadataMap[lastMeasuredRowIndex];\n totalSizeOfMeasuredRows = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = rowCount - lastMeasuredRowIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedRowHeight;\n return totalSizeOfMeasuredRows + totalSizeOfUnmeasuredItems;\n};\n\nvar getEstimatedTotalWidth = function getEstimatedTotalWidth(_ref3, _ref4) {\n var columnCount = _ref3.columnCount;\n var columnMetadataMap = _ref4.columnMetadataMap,\n estimatedColumnWidth = _ref4.estimatedColumnWidth,\n lastMeasuredColumnIndex = _ref4.lastMeasuredColumnIndex;\n var totalSizeOfMeasuredRows = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredColumnIndex >= columnCount) {\n lastMeasuredColumnIndex = columnCount - 1;\n }\n\n if (lastMeasuredColumnIndex >= 0) {\n var itemMetadata = columnMetadataMap[lastMeasuredColumnIndex];\n totalSizeOfMeasuredRows = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = columnCount - lastMeasuredColumnIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedColumnWidth;\n return totalSizeOfMeasuredRows + totalSizeOfUnmeasuredItems;\n};\n\nvar getItemMetadata = function getItemMetadata(itemType, props, index, instanceProps) {\n var itemMetadataMap, itemSize, lastMeasuredIndex;\n\n if (itemType === 'column') {\n itemMetadataMap = instanceProps.columnMetadataMap;\n itemSize = props.columnWidth;\n lastMeasuredIndex = instanceProps.lastMeasuredColumnIndex;\n } else {\n itemMetadataMap = instanceProps.rowMetadataMap;\n itemSize = props.rowHeight;\n lastMeasuredIndex = instanceProps.lastMeasuredRowIndex;\n }\n\n if (index > lastMeasuredIndex) {\n var offset = 0;\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n offset = itemMetadata.offset + itemMetadata.size;\n }\n\n for (var i = lastMeasuredIndex + 1; i <= index; i++) {\n var size = itemSize(i);\n itemMetadataMap[i] = {\n offset: offset,\n size: size\n };\n offset += size;\n }\n\n if (itemType === 'column') {\n instanceProps.lastMeasuredColumnIndex = index;\n } else {\n instanceProps.lastMeasuredRowIndex = index;\n }\n }\n\n return itemMetadataMap[index];\n};\n\nvar findNearestItem = function findNearestItem(itemType, props, instanceProps, offset) {\n var itemMetadataMap, lastMeasuredIndex;\n\n if (itemType === 'column') {\n itemMetadataMap = instanceProps.columnMetadataMap;\n lastMeasuredIndex = instanceProps.lastMeasuredColumnIndex;\n } else {\n itemMetadataMap = instanceProps.rowMetadataMap;\n lastMeasuredIndex = instanceProps.lastMeasuredRowIndex;\n }\n\n var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;\n\n if (lastMeasuredItemOffset >= offset) {\n // If we've already measured items within this range just use a binary search as it's faster.\n return findNearestItemBinarySearch(itemType, props, instanceProps, lastMeasuredIndex, 0, offset);\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of items as a binary search would.\n // The overall complexity for this approach is O(log n).\n return findNearestItemExponentialSearch(itemType, props, instanceProps, Math.max(0, lastMeasuredIndex), offset);\n }\n};\n\nvar findNearestItemBinarySearch = function findNearestItemBinarySearch(itemType, props, instanceProps, high, low, offset) {\n while (low <= high) {\n var middle = low + Math.floor((high - low) / 2);\n var currentOffset = getItemMetadata(itemType, props, middle, instanceProps).offset;\n\n if (currentOffset === offset) {\n return middle;\n } else if (currentOffset < offset) {\n low = middle + 1;\n } else if (currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n};\n\nvar findNearestItemExponentialSearch = function findNearestItemExponentialSearch(itemType, props, instanceProps, index, offset) {\n var itemCount = itemType === 'column' ? props.columnCount : props.rowCount;\n var interval = 1;\n\n while (index < itemCount && getItemMetadata(itemType, props, index, instanceProps).offset < offset) {\n index += interval;\n interval *= 2;\n }\n\n return findNearestItemBinarySearch(itemType, props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset);\n};\n\nvar getOffsetForIndexAndAlignment = function getOffsetForIndexAndAlignment(itemType, props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n var size = itemType === 'column' ? props.width : props.height;\n var itemMetadata = getItemMetadata(itemType, props, index, instanceProps); // Get estimated total size after ItemMetadata is computed,\n // To ensure it reflects actual measurements instead of just estimates.\n\n var estimatedTotalSize = itemType === 'column' ? getEstimatedTotalWidth(props, instanceProps) : getEstimatedTotalHeight(props, instanceProps);\n var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, itemMetadata.offset));\n var minOffset = Math.max(0, itemMetadata.offset - size + scrollbarSize + itemMetadata.size);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n};\n\nvar VariableSizeGrid = /*#__PURE__*/createGridComponent({\n getColumnOffset: function getColumnOffset(props, index, instanceProps) {\n return getItemMetadata('column', props, index, instanceProps).offset;\n },\n getColumnStartIndexForOffset: function getColumnStartIndexForOffset(props, scrollLeft, instanceProps) {\n return findNearestItem('column', props, instanceProps, scrollLeft);\n },\n getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(props, startIndex, scrollLeft, instanceProps) {\n var columnCount = props.columnCount,\n width = props.width;\n var itemMetadata = getItemMetadata('column', props, startIndex, instanceProps);\n var maxOffset = scrollLeft + width;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < columnCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata('column', props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n getColumnWidth: function getColumnWidth(props, index, instanceProps) {\n return instanceProps.columnMetadataMap[index].size;\n },\n getEstimatedTotalHeight: getEstimatedTotalHeight,\n getEstimatedTotalWidth: getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n return getOffsetForIndexAndAlignment('column', props, index, align, scrollOffset, instanceProps, scrollbarSize);\n },\n getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n return getOffsetForIndexAndAlignment('row', props, index, align, scrollOffset, instanceProps, scrollbarSize);\n },\n getRowOffset: function getRowOffset(props, index, instanceProps) {\n return getItemMetadata('row', props, index, instanceProps).offset;\n },\n getRowHeight: function getRowHeight(props, index, instanceProps) {\n return instanceProps.rowMetadataMap[index].size;\n },\n getRowStartIndexForOffset: function getRowStartIndexForOffset(props, scrollTop, instanceProps) {\n return findNearestItem('row', props, instanceProps, scrollTop);\n },\n getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(props, startIndex, scrollTop, instanceProps) {\n var rowCount = props.rowCount,\n height = props.height;\n var itemMetadata = getItemMetadata('row', props, startIndex, instanceProps);\n var maxOffset = scrollTop + height;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < rowCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata('row', props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n initInstanceProps: function initInstanceProps(props, instance) {\n var _ref5 = props,\n estimatedColumnWidth = _ref5.estimatedColumnWidth,\n estimatedRowHeight = _ref5.estimatedRowHeight;\n var instanceProps = {\n columnMetadataMap: {},\n estimatedColumnWidth: estimatedColumnWidth || DEFAULT_ESTIMATED_ITEM_SIZE,\n estimatedRowHeight: estimatedRowHeight || DEFAULT_ESTIMATED_ITEM_SIZE,\n lastMeasuredColumnIndex: -1,\n lastMeasuredRowIndex: -1,\n rowMetadataMap: {}\n };\n\n instance.resetAfterColumnIndex = function (columnIndex, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instance.resetAfterIndices({\n columnIndex: columnIndex,\n shouldForceUpdate: shouldForceUpdate\n });\n };\n\n instance.resetAfterRowIndex = function (rowIndex, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instance.resetAfterIndices({\n rowIndex: rowIndex,\n shouldForceUpdate: shouldForceUpdate\n });\n };\n\n instance.resetAfterIndices = function (_ref6) {\n var columnIndex = _ref6.columnIndex,\n rowIndex = _ref6.rowIndex,\n _ref6$shouldForceUpda = _ref6.shouldForceUpdate,\n shouldForceUpdate = _ref6$shouldForceUpda === void 0 ? true : _ref6$shouldForceUpda;\n\n if (typeof columnIndex === 'number') {\n instanceProps.lastMeasuredColumnIndex = Math.min(instanceProps.lastMeasuredColumnIndex, columnIndex - 1);\n }\n\n if (typeof rowIndex === 'number') {\n instanceProps.lastMeasuredRowIndex = Math.min(instanceProps.lastMeasuredRowIndex, rowIndex - 1);\n } // We could potentially optimize further by only evicting styles after this index,\n // But since styles are only cached while scrolling is in progress-\n // It seems an unnecessary optimization.\n // It's unlikely that resetAfterIndex() will be called while a user is scrolling.\n\n\n instance._getItemStyleCache(-1);\n\n if (shouldForceUpdate) {\n instance.forceUpdate();\n }\n };\n\n return instanceProps;\n },\n shouldResetStyleCacheOnItemSizeChange: false,\n validateProps: function validateProps(_ref7) {\n var columnWidth = _ref7.columnWidth,\n rowHeight = _ref7.rowHeight;\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof columnWidth !== 'function') {\n throw Error('An invalid \"columnWidth\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (columnWidth === null ? 'null' : typeof columnWidth) + \"\\\" was specified.\"));\n } else if (typeof rowHeight !== 'function') {\n throw Error('An invalid \"rowHeight\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (rowHeight === null ? 'null' : typeof rowHeight) + \"\\\" was specified.\"));\n }\n }\n }\n});\nvar IS_SCROLLING_DEBOUNCE_INTERVAL$1 = 150;\n\nvar defaultItemKey$1 = function defaultItemKey(index, data) {\n return index;\n}; // In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\n\n\nvar devWarningsDirection = null;\nvar devWarningsTagName$1 = null;\n\nif (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsDirection = /*#__PURE__*/new WeakSet();\n devWarningsTagName$1 = /*#__PURE__*/new WeakSet();\n }\n}\n\nfunction createListComponent(_ref) {\n var _class;\n\n var getItemOffset = _ref.getItemOffset,\n getEstimatedTotalSize = _ref.getEstimatedTotalSize,\n getItemSize = _ref.getItemSize,\n getOffsetForIndexAndAlignment = _ref.getOffsetForIndexAndAlignment,\n getStartIndexForOffset = _ref.getStartIndexForOffset,\n getStopIndexForStartIndex = _ref.getStopIndexForStartIndex,\n initInstanceProps = _ref.initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange = _ref.shouldResetStyleCacheOnItemSizeChange,\n validateProps = _ref.validateProps;\n return _class = /*#__PURE__*/function (_PureComponent) {\n _inheritsLoose(List, _PureComponent); // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n\n\n function List(props) {\n var _this;\n\n _this = _PureComponent.call(this, props) || this;\n _this._instanceProps = initInstanceProps(_this.props, _assertThisInitialized(_this));\n _this._outerRef = void 0;\n _this._resetIsScrollingTimeoutId = null;\n _this.state = {\n instance: _assertThisInitialized(_this),\n isScrolling: false,\n scrollDirection: 'forward',\n scrollOffset: typeof _this.props.initialScrollOffset === 'number' ? _this.props.initialScrollOffset : 0,\n scrollUpdateWasRequested: false\n };\n _this._callOnItemsRendered = void 0;\n _this._callOnItemsRendered = memoizeOne(function (overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {\n return _this.props.onItemsRendered({\n overscanStartIndex: overscanStartIndex,\n overscanStopIndex: overscanStopIndex,\n visibleStartIndex: visibleStartIndex,\n visibleStopIndex: visibleStopIndex\n });\n });\n _this._callOnScroll = void 0;\n _this._callOnScroll = memoizeOne(function (scrollDirection, scrollOffset, scrollUpdateWasRequested) {\n return _this.props.onScroll({\n scrollDirection: scrollDirection,\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: scrollUpdateWasRequested\n });\n });\n _this._getItemStyle = void 0;\n\n _this._getItemStyle = function (index) {\n var _this$props = _this.props,\n direction = _this$props.direction,\n itemSize = _this$props.itemSize,\n layout = _this$props.layout;\n\n var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize, shouldResetStyleCacheOnItemSizeChange && layout, shouldResetStyleCacheOnItemSizeChange && direction);\n\n var style;\n\n if (itemStyleCache.hasOwnProperty(index)) {\n style = itemStyleCache[index];\n } else {\n var _offset = getItemOffset(_this.props, index, _this._instanceProps);\n\n var size = getItemSize(_this.props, index, _this._instanceProps); // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var isRtl = direction === 'rtl';\n var offsetHorizontal = isHorizontal ? _offset : 0;\n itemStyleCache[index] = style = {\n position: 'absolute',\n left: isRtl ? undefined : offsetHorizontal,\n right: isRtl ? offsetHorizontal : undefined,\n top: !isHorizontal ? _offset : 0,\n height: !isHorizontal ? size : '100%',\n width: isHorizontal ? size : '100%'\n };\n }\n\n return style;\n };\n\n _this._getItemStyleCache = void 0;\n _this._getItemStyleCache = memoizeOne(function (_, __, ___) {\n return {};\n });\n\n _this._onScrollHorizontal = function (event) {\n var _event$currentTarget = event.currentTarget,\n clientWidth = _event$currentTarget.clientWidth,\n scrollLeft = _event$currentTarget.scrollLeft,\n scrollWidth = _event$currentTarget.scrollWidth;\n\n _this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollLeft) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n var direction = _this.props.direction;\n var scrollOffset = scrollLeft;\n\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n switch (getRTLOffsetType()) {\n case 'negative':\n scrollOffset = -scrollLeft;\n break;\n\n case 'positive-descending':\n scrollOffset = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._onScrollVertical = function (event) {\n var _event$currentTarget2 = event.currentTarget,\n clientHeight = _event$currentTarget2.clientHeight,\n scrollHeight = _event$currentTarget2.scrollHeight,\n scrollTop = _event$currentTarget2.scrollTop;\n\n _this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n } // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n\n\n var scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));\n return {\n isScrolling: true,\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: false\n };\n }, _this._resetIsScrollingDebounced);\n };\n\n _this._outerRefSetter = function (ref) {\n var outerRef = _this.props.outerRef;\n _this._outerRef = ref;\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (outerRef != null && typeof outerRef === 'object' && outerRef.hasOwnProperty('current')) {\n outerRef.current = ref;\n }\n };\n\n _this._resetIsScrollingDebounced = function () {\n if (_this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(_this._resetIsScrollingTimeoutId);\n }\n\n _this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL$1);\n };\n\n _this._resetIsScrolling = function () {\n _this._resetIsScrollingTimeoutId = null;\n\n _this.setState({\n isScrolling: false\n }, function () {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n _this._getItemStyleCache(-1, null);\n });\n };\n\n return _this;\n }\n\n List.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n validateSharedProps$1(nextProps, prevState);\n validateProps(nextProps);\n return null;\n };\n\n var _proto = List.prototype;\n\n _proto.scrollTo = function scrollTo(scrollOffset) {\n scrollOffset = Math.max(0, scrollOffset);\n this.setState(function (prevState) {\n if (prevState.scrollOffset === scrollOffset) {\n return null;\n }\n\n return {\n scrollDirection: prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: true\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _proto.scrollToItem = function scrollToItem(index, align) {\n if (align === void 0) {\n align = 'auto';\n }\n\n var _this$props2 = this.props,\n itemCount = _this$props2.itemCount,\n layout = _this$props2.layout;\n var scrollOffset = this.state.scrollOffset;\n index = Math.max(0, Math.min(index, itemCount - 1)); // The scrollbar size should be considered when scrolling an item into view, to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n // This is an edge case for lists; normally they only scroll in the dominant direction.\n\n var scrollbarSize = 0;\n\n if (this._outerRef) {\n var outerRef = this._outerRef;\n\n if (layout === 'vertical') {\n scrollbarSize = outerRef.scrollWidth > outerRef.clientWidth ? getScrollbarSize() : 0;\n } else {\n scrollbarSize = outerRef.scrollHeight > outerRef.clientHeight ? getScrollbarSize() : 0;\n }\n }\n\n this.scrollTo(getOffsetForIndexAndAlignment(this.props, index, align, scrollOffset, this._instanceProps, scrollbarSize));\n };\n\n _proto.componentDidMount = function componentDidMount() {\n var _this$props3 = this.props,\n direction = _this$props3.direction,\n initialScrollOffset = _this$props3.initialScrollOffset,\n layout = _this$props3.layout;\n\n if (typeof initialScrollOffset === 'number' && this._outerRef != null) {\n var outerRef = this._outerRef; // TODO Deprecate direction \"horizontal\"\n\n if (direction === 'horizontal' || layout === 'horizontal') {\n outerRef.scrollLeft = initialScrollOffset;\n } else {\n outerRef.scrollTop = initialScrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var _this$props4 = this.props,\n direction = _this$props4.direction,\n layout = _this$props4.layout;\n var _this$state = this.state,\n scrollOffset = _this$state.scrollOffset,\n scrollUpdateWasRequested = _this$state.scrollUpdateWasRequested;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n var outerRef = this._outerRef; // TODO Deprecate direction \"horizontal\"\n\n if (direction === 'horizontal' || layout === 'horizontal') {\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollOffset;\n break;\n\n case 'positive-ascending':\n outerRef.scrollLeft = scrollOffset;\n break;\n\n default:\n var clientWidth = outerRef.clientWidth,\n scrollWidth = outerRef.scrollWidth;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;\n break;\n }\n } else {\n outerRef.scrollLeft = scrollOffset;\n }\n } else {\n outerRef.scrollTop = scrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n };\n\n _proto.render = function render() {\n var _this$props5 = this.props,\n children = _this$props5.children,\n className = _this$props5.className,\n direction = _this$props5.direction,\n height = _this$props5.height,\n innerRef = _this$props5.innerRef,\n innerElementType = _this$props5.innerElementType,\n innerTagName = _this$props5.innerTagName,\n itemCount = _this$props5.itemCount,\n itemData = _this$props5.itemData,\n _this$props5$itemKey = _this$props5.itemKey,\n itemKey = _this$props5$itemKey === void 0 ? defaultItemKey$1 : _this$props5$itemKey,\n layout = _this$props5.layout,\n outerElementType = _this$props5.outerElementType,\n outerTagName = _this$props5.outerTagName,\n style = _this$props5.style,\n useIsScrolling = _this$props5.useIsScrolling,\n width = _this$props5.width;\n var isScrolling = this.state.isScrolling; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var onScroll = isHorizontal ? this._onScrollHorizontal : this._onScrollVertical;\n\n var _this$_getRangeToRend = this._getRangeToRender(),\n startIndex = _this$_getRangeToRend[0],\n stopIndex = _this$_getRangeToRend[1];\n\n var items = [];\n\n if (itemCount > 0) {\n for (var _index = startIndex; _index <= stopIndex; _index++) {\n items.push(createElement(children, {\n data: itemData,\n key: itemKey(_index, itemData),\n index: _index,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n style: this._getItemStyle(_index)\n }));\n }\n } // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n\n\n var estimatedTotalSize = getEstimatedTotalSize(this.props, this._instanceProps);\n return createElement(outerElementType || outerTagName || 'div', {\n className: className,\n onScroll: onScroll,\n ref: this._outerRefSetter,\n style: _extends({\n position: 'relative',\n height: height,\n width: width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction: direction\n }, style)\n }, createElement(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: isHorizontal ? estimatedTotalSize : '100%'\n }\n }));\n };\n\n _proto._callPropsCallbacks = function _callPropsCallbacks() {\n if (typeof this.props.onItemsRendered === 'function') {\n var itemCount = this.props.itemCount;\n\n if (itemCount > 0) {\n var _this$_getRangeToRend2 = this._getRangeToRender(),\n _overscanStartIndex = _this$_getRangeToRend2[0],\n _overscanStopIndex = _this$_getRangeToRend2[1],\n _visibleStartIndex = _this$_getRangeToRend2[2],\n _visibleStopIndex = _this$_getRangeToRend2[3];\n\n this._callOnItemsRendered(_overscanStartIndex, _overscanStopIndex, _visibleStartIndex, _visibleStopIndex);\n }\n }\n\n if (typeof this.props.onScroll === 'function') {\n var _this$state2 = this.state,\n _scrollDirection = _this$state2.scrollDirection,\n _scrollOffset = _this$state2.scrollOffset,\n _scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;\n\n this._callOnScroll(_scrollDirection, _scrollOffset, _scrollUpdateWasRequested);\n }\n } // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n ;\n\n _proto._getRangeToRender = function _getRangeToRender() {\n var _this$props6 = this.props,\n itemCount = _this$props6.itemCount,\n overscanCount = _this$props6.overscanCount;\n var _this$state3 = this.state,\n isScrolling = _this$state3.isScrolling,\n scrollDirection = _this$state3.scrollDirection,\n scrollOffset = _this$state3.scrollOffset;\n\n if (itemCount === 0) {\n return [0, 0, 0, 0];\n }\n\n var startIndex = getStartIndexForOffset(this.props, scrollOffset, this._instanceProps);\n var stopIndex = getStopIndexForStartIndex(this.props, startIndex, scrollOffset, this._instanceProps); // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n\n var overscanBackward = !isScrolling || scrollDirection === 'backward' ? Math.max(1, overscanCount) : 1;\n var overscanForward = !isScrolling || scrollDirection === 'forward' ? Math.max(1, overscanCount) : 1;\n return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];\n };\n\n return List;\n }(PureComponent), _class.defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n layout: 'vertical',\n overscanCount: 2,\n useIsScrolling: false\n }, _class;\n} // NOTE: I considered further wrapping individual items with a pure ListItem component.\n// This would avoid ever calling the render function for the same index more than once,\n// But it would also add the overhead of a lot of components/fibers.\n// I assume people already do this (render function returning a class component),\n// So my doing it would just unnecessarily double the wrappers.\n\n\nvar validateSharedProps$1 = function validateSharedProps(_ref2, _ref3) {\n var children = _ref2.children,\n direction = _ref2.direction,\n height = _ref2.height,\n layout = _ref2.layout,\n innerTagName = _ref2.innerTagName,\n outerTagName = _ref2.outerTagName,\n width = _ref2.width;\n var instance = _ref3.instance;\n\n if (process.env.NODE_ENV !== 'production') {\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName$1 && !devWarningsTagName$1.has(instance)) {\n devWarningsTagName$1.add(instance);\n console.warn('The innerTagName and outerTagName props have been deprecated. ' + 'Please use the innerElementType and outerElementType props instead.');\n }\n } // TODO Deprecate direction \"horizontal\"\n\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n\n switch (direction) {\n case 'horizontal':\n case 'vertical':\n if (devWarningsDirection && !devWarningsDirection.has(instance)) {\n devWarningsDirection.add(instance);\n console.warn('The direction prop should be either \"ltr\" (default) or \"rtl\". ' + 'Please use the layout prop to specify \"vertical\" (default) or \"horizontal\" orientation.');\n }\n\n break;\n\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"direction\" prop has been specified. ' + 'Value should be either \"ltr\" or \"rtl\". ' + (\"\\\"\" + direction + \"\\\" was specified.\"));\n }\n\n switch (layout) {\n case 'horizontal':\n case 'vertical':\n // Valid values\n break;\n\n default:\n throw Error('An invalid \"layout\" prop has been specified. ' + 'Value should be either \"horizontal\" or \"vertical\". ' + (\"\\\"\" + layout + \"\\\" was specified.\"));\n }\n\n if (children == null) {\n throw Error('An invalid \"children\" prop has been specified. ' + 'Value should be a React component. ' + (\"\\\"\" + (children === null ? 'null' : typeof children) + \"\\\" was specified.\"));\n }\n\n if (isHorizontal && typeof width !== 'number') {\n throw Error('An invalid \"width\" prop has been specified. ' + 'Horizontal lists must specify a number for width. ' + (\"\\\"\" + (width === null ? 'null' : typeof width) + \"\\\" was specified.\"));\n } else if (!isHorizontal && typeof height !== 'number') {\n throw Error('An invalid \"height\" prop has been specified. ' + 'Vertical lists must specify a number for height. ' + (\"\\\"\" + (height === null ? 'null' : typeof height) + \"\\\" was specified.\"));\n }\n }\n};\n\nvar DEFAULT_ESTIMATED_ITEM_SIZE$1 = 50;\n\nvar getItemMetadata$1 = function getItemMetadata(props, index, instanceProps) {\n var _ref = props,\n itemSize = _ref.itemSize;\n var itemMetadataMap = instanceProps.itemMetadataMap,\n lastMeasuredIndex = instanceProps.lastMeasuredIndex;\n\n if (index > lastMeasuredIndex) {\n var offset = 0;\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n offset = itemMetadata.offset + itemMetadata.size;\n }\n\n for (var i = lastMeasuredIndex + 1; i <= index; i++) {\n var size = itemSize(i);\n itemMetadataMap[i] = {\n offset: offset,\n size: size\n };\n offset += size;\n }\n\n instanceProps.lastMeasuredIndex = index;\n }\n\n return itemMetadataMap[index];\n};\n\nvar findNearestItem$1 = function findNearestItem(props, instanceProps, offset) {\n var itemMetadataMap = instanceProps.itemMetadataMap,\n lastMeasuredIndex = instanceProps.lastMeasuredIndex;\n var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;\n\n if (lastMeasuredItemOffset >= offset) {\n // If we've already measured items within this range just use a binary search as it's faster.\n return findNearestItemBinarySearch$1(props, instanceProps, lastMeasuredIndex, 0, offset);\n } else {\n // If we haven't yet measured this high, fallback to an exponential search with an inner binary search.\n // The exponential search avoids pre-computing sizes for the full set of items as a binary search would.\n // The overall complexity for this approach is O(log n).\n return findNearestItemExponentialSearch$1(props, instanceProps, Math.max(0, lastMeasuredIndex), offset);\n }\n};\n\nvar findNearestItemBinarySearch$1 = function findNearestItemBinarySearch(props, instanceProps, high, low, offset) {\n while (low <= high) {\n var middle = low + Math.floor((high - low) / 2);\n var currentOffset = getItemMetadata$1(props, middle, instanceProps).offset;\n\n if (currentOffset === offset) {\n return middle;\n } else if (currentOffset < offset) {\n low = middle + 1;\n } else if (currentOffset > offset) {\n high = middle - 1;\n }\n }\n\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n};\n\nvar findNearestItemExponentialSearch$1 = function findNearestItemExponentialSearch(props, instanceProps, index, offset) {\n var itemCount = props.itemCount;\n var interval = 1;\n\n while (index < itemCount && getItemMetadata$1(props, index, instanceProps).offset < offset) {\n index += interval;\n interval *= 2;\n }\n\n return findNearestItemBinarySearch$1(props, instanceProps, Math.min(index, itemCount - 1), Math.floor(index / 2), offset);\n};\n\nvar getEstimatedTotalSize = function getEstimatedTotalSize(_ref2, _ref3) {\n var itemCount = _ref2.itemCount;\n var itemMetadataMap = _ref3.itemMetadataMap,\n estimatedItemSize = _ref3.estimatedItemSize,\n lastMeasuredIndex = _ref3.lastMeasuredIndex;\n var totalSizeOfMeasuredItems = 0; // Edge case check for when the number of items decreases while a scroll is in progress.\n // https://github.com/bvaughn/react-window/pull/138\n\n if (lastMeasuredIndex >= itemCount) {\n lastMeasuredIndex = itemCount - 1;\n }\n\n if (lastMeasuredIndex >= 0) {\n var itemMetadata = itemMetadataMap[lastMeasuredIndex];\n totalSizeOfMeasuredItems = itemMetadata.offset + itemMetadata.size;\n }\n\n var numUnmeasuredItems = itemCount - lastMeasuredIndex - 1;\n var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;\n return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;\n};\n\nvar VariableSizeList = /*#__PURE__*/createListComponent({\n getItemOffset: function getItemOffset(props, index, instanceProps) {\n return getItemMetadata$1(props, index, instanceProps).offset;\n },\n getItemSize: function getItemSize(props, index, instanceProps) {\n return instanceProps.itemMetadataMap[index].size;\n },\n getEstimatedTotalSize: getEstimatedTotalSize,\n getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(props, index, align, scrollOffset, instanceProps, scrollbarSize) {\n var direction = props.direction,\n height = props.height,\n layout = props.layout,\n width = props.width; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var itemMetadata = getItemMetadata$1(props, index, instanceProps); // Get estimated total size after ItemMetadata is computed,\n // To ensure it reflects actual measurements instead of just estimates.\n\n var estimatedTotalSize = getEstimatedTotalSize(props, instanceProps);\n var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size, itemMetadata.offset));\n var minOffset = Math.max(0, itemMetadata.offset - size + itemMetadata.size + scrollbarSize);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n return Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getStartIndexForOffset: function getStartIndexForOffset(props, offset, instanceProps) {\n return findNearestItem$1(props, instanceProps, offset);\n },\n getStopIndexForStartIndex: function getStopIndexForStartIndex(props, startIndex, scrollOffset, instanceProps) {\n var direction = props.direction,\n height = props.height,\n itemCount = props.itemCount,\n layout = props.layout,\n width = props.width; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var itemMetadata = getItemMetadata$1(props, startIndex, instanceProps);\n var maxOffset = scrollOffset + size;\n var offset = itemMetadata.offset + itemMetadata.size;\n var stopIndex = startIndex;\n\n while (stopIndex < itemCount - 1 && offset < maxOffset) {\n stopIndex++;\n offset += getItemMetadata$1(props, stopIndex, instanceProps).size;\n }\n\n return stopIndex;\n },\n initInstanceProps: function initInstanceProps(props, instance) {\n var _ref4 = props,\n estimatedItemSize = _ref4.estimatedItemSize;\n var instanceProps = {\n itemMetadataMap: {},\n estimatedItemSize: estimatedItemSize || DEFAULT_ESTIMATED_ITEM_SIZE$1,\n lastMeasuredIndex: -1\n };\n\n instance.resetAfterIndex = function (index, shouldForceUpdate) {\n if (shouldForceUpdate === void 0) {\n shouldForceUpdate = true;\n }\n\n instanceProps.lastMeasuredIndex = Math.min(instanceProps.lastMeasuredIndex, index - 1); // We could potentially optimize further by only evicting styles after this index,\n // But since styles are only cached while scrolling is in progress-\n // It seems an unnecessary optimization.\n // It's unlikely that resetAfterIndex() will be called while a user is scrolling.\n\n instance._getItemStyleCache(-1);\n\n if (shouldForceUpdate) {\n instance.forceUpdate();\n }\n };\n\n return instanceProps;\n },\n shouldResetStyleCacheOnItemSizeChange: false,\n validateProps: function validateProps(_ref5) {\n var itemSize = _ref5.itemSize;\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof itemSize !== 'function') {\n throw Error('An invalid \"itemSize\" prop has been specified. ' + 'Value should be a function. ' + (\"\\\"\" + (itemSize === null ? 'null' : typeof itemSize) + \"\\\" was specified.\"));\n }\n }\n }\n});\nvar FixedSizeGrid = /*#__PURE__*/createGridComponent({\n getColumnOffset: function getColumnOffset(_ref, index) {\n var columnWidth = _ref.columnWidth;\n return index * columnWidth;\n },\n getColumnWidth: function getColumnWidth(_ref2, index) {\n var columnWidth = _ref2.columnWidth;\n return columnWidth;\n },\n getRowOffset: function getRowOffset(_ref3, index) {\n var rowHeight = _ref3.rowHeight;\n return index * rowHeight;\n },\n getRowHeight: function getRowHeight(_ref4, index) {\n var rowHeight = _ref4.rowHeight;\n return rowHeight;\n },\n getEstimatedTotalHeight: function getEstimatedTotalHeight(_ref5) {\n var rowCount = _ref5.rowCount,\n rowHeight = _ref5.rowHeight;\n return rowHeight * rowCount;\n },\n getEstimatedTotalWidth: function getEstimatedTotalWidth(_ref6) {\n var columnCount = _ref6.columnCount,\n columnWidth = _ref6.columnWidth;\n return columnWidth * columnCount;\n },\n getOffsetForColumnAndAlignment: function getOffsetForColumnAndAlignment(_ref7, columnIndex, align, scrollLeft, instanceProps, scrollbarSize) {\n var columnCount = _ref7.columnCount,\n columnWidth = _ref7.columnWidth,\n width = _ref7.width;\n var lastColumnOffset = Math.max(0, columnCount * columnWidth - width);\n var maxOffset = Math.min(lastColumnOffset, columnIndex * columnWidth);\n var minOffset = Math.max(0, columnIndex * columnWidth - width + scrollbarSize + columnWidth);\n\n if (align === 'smart') {\n if (scrollLeft >= minOffset - width && scrollLeft <= maxOffset + width) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(width / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastColumnOffset + Math.floor(width / 2)) {\n return lastColumnOffset; // near the end\n } else {\n return middleOffset;\n }\n\n case 'auto':\n default:\n if (scrollLeft >= minOffset && scrollLeft <= maxOffset) {\n return scrollLeft;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollLeft < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getOffsetForRowAndAlignment: function getOffsetForRowAndAlignment(_ref8, rowIndex, align, scrollTop, instanceProps, scrollbarSize) {\n var rowHeight = _ref8.rowHeight,\n height = _ref8.height,\n rowCount = _ref8.rowCount;\n var lastRowOffset = Math.max(0, rowCount * rowHeight - height);\n var maxOffset = Math.min(lastRowOffset, rowIndex * rowHeight);\n var minOffset = Math.max(0, rowIndex * rowHeight - height + scrollbarSize + rowHeight);\n\n if (align === 'smart') {\n if (scrollTop >= minOffset - height && scrollTop <= maxOffset + height) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(height / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastRowOffset + Math.floor(height / 2)) {\n return lastRowOffset; // near the end\n } else {\n return middleOffset;\n }\n\n case 'auto':\n default:\n if (scrollTop >= minOffset && scrollTop <= maxOffset) {\n return scrollTop;\n } else if (minOffset > maxOffset) {\n // Because we only take into account the scrollbar size when calculating minOffset\n // this value can be larger than maxOffset when at the end of the list\n return minOffset;\n } else if (scrollTop < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getColumnStartIndexForOffset: function getColumnStartIndexForOffset(_ref9, scrollLeft) {\n var columnWidth = _ref9.columnWidth,\n columnCount = _ref9.columnCount;\n return Math.max(0, Math.min(columnCount - 1, Math.floor(scrollLeft / columnWidth)));\n },\n getColumnStopIndexForStartIndex: function getColumnStopIndexForStartIndex(_ref10, startIndex, scrollLeft) {\n var columnWidth = _ref10.columnWidth,\n columnCount = _ref10.columnCount,\n width = _ref10.width;\n var left = startIndex * columnWidth;\n var numVisibleColumns = Math.ceil((width + scrollLeft - left) / columnWidth);\n return Math.max(0, Math.min(columnCount - 1, startIndex + numVisibleColumns - 1 // -1 is because stop index is inclusive\n ));\n },\n getRowStartIndexForOffset: function getRowStartIndexForOffset(_ref11, scrollTop) {\n var rowHeight = _ref11.rowHeight,\n rowCount = _ref11.rowCount;\n return Math.max(0, Math.min(rowCount - 1, Math.floor(scrollTop / rowHeight)));\n },\n getRowStopIndexForStartIndex: function getRowStopIndexForStartIndex(_ref12, startIndex, scrollTop) {\n var rowHeight = _ref12.rowHeight,\n rowCount = _ref12.rowCount,\n height = _ref12.height;\n var top = startIndex * rowHeight;\n var numVisibleRows = Math.ceil((height + scrollTop - top) / rowHeight);\n return Math.max(0, Math.min(rowCount - 1, startIndex + numVisibleRows - 1 // -1 is because stop index is inclusive\n ));\n },\n initInstanceProps: function initInstanceProps(props) {// Noop\n },\n shouldResetStyleCacheOnItemSizeChange: true,\n validateProps: function validateProps(_ref13) {\n var columnWidth = _ref13.columnWidth,\n rowHeight = _ref13.rowHeight;\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof columnWidth !== 'number') {\n throw Error('An invalid \"columnWidth\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (columnWidth === null ? 'null' : typeof columnWidth) + \"\\\" was specified.\"));\n }\n\n if (typeof rowHeight !== 'number') {\n throw Error('An invalid \"rowHeight\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (rowHeight === null ? 'null' : typeof rowHeight) + \"\\\" was specified.\"));\n }\n }\n }\n});\nvar FixedSizeList = /*#__PURE__*/createListComponent({\n getItemOffset: function getItemOffset(_ref, index) {\n var itemSize = _ref.itemSize;\n return index * itemSize;\n },\n getItemSize: function getItemSize(_ref2, index) {\n var itemSize = _ref2.itemSize;\n return itemSize;\n },\n getEstimatedTotalSize: function getEstimatedTotalSize(_ref3) {\n var itemCount = _ref3.itemCount,\n itemSize = _ref3.itemSize;\n return itemSize * itemCount;\n },\n getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment(_ref4, index, align, scrollOffset, instanceProps, scrollbarSize) {\n var direction = _ref4.direction,\n height = _ref4.height,\n itemCount = _ref4.itemCount,\n itemSize = _ref4.itemSize,\n layout = _ref4.layout,\n width = _ref4.width; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var size = isHorizontal ? width : height;\n var lastItemOffset = Math.max(0, itemCount * itemSize - size);\n var maxOffset = Math.min(lastItemOffset, index * itemSize);\n var minOffset = Math.max(0, index * itemSize - size + itemSize + scrollbarSize);\n\n if (align === 'smart') {\n if (scrollOffset >= minOffset - size && scrollOffset <= maxOffset + size) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n\n case 'end':\n return minOffset;\n\n case 'center':\n {\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);\n\n if (middleOffset < Math.ceil(size / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {\n return lastItemOffset; // near the end\n } else {\n return middleOffset;\n }\n }\n\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n\n }\n },\n getStartIndexForOffset: function getStartIndexForOffset(_ref5, offset) {\n var itemCount = _ref5.itemCount,\n itemSize = _ref5.itemSize;\n return Math.max(0, Math.min(itemCount - 1, Math.floor(offset / itemSize)));\n },\n getStopIndexForStartIndex: function getStopIndexForStartIndex(_ref6, startIndex, scrollOffset) {\n var direction = _ref6.direction,\n height = _ref6.height,\n itemCount = _ref6.itemCount,\n itemSize = _ref6.itemSize,\n layout = _ref6.layout,\n width = _ref6.width; // TODO Deprecate direction \"horizontal\"\n\n var isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n var offset = startIndex * itemSize;\n var size = isHorizontal ? width : height;\n var numVisibleItems = Math.ceil((size + scrollOffset - offset) / itemSize);\n return Math.max(0, Math.min(itemCount - 1, startIndex + numVisibleItems - 1 // -1 is because stop index is inclusive\n ));\n },\n initInstanceProps: function initInstanceProps(props) {// Noop\n },\n shouldResetStyleCacheOnItemSizeChange: true,\n validateProps: function validateProps(_ref7) {\n var itemSize = _ref7.itemSize;\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof itemSize !== 'number') {\n throw Error('An invalid \"itemSize\" prop has been specified. ' + 'Value should be a number. ' + (\"\\\"\" + (itemSize === null ? 'null' : typeof itemSize) + \"\\\" was specified.\"));\n }\n }\n }\n}); // Pulled from react-compat\n// https://github.com/developit/preact-compat/blob/7c5de00e7c85e2ffd011bf3af02899b63f699d3a/src/index.js#L349\n\nfunction shallowDiffers(prev, next) {\n for (var attribute in prev) {\n if (!(attribute in next)) {\n return true;\n }\n }\n\n for (var _attribute in next) {\n if (prev[_attribute] !== next[_attribute]) {\n return true;\n }\n }\n\n return false;\n}\n\nvar _excluded = [\"style\"],\n _excluded2 = [\"style\"]; // It knows to compare individual style props and ignore the wrapper object.\n// See https://reactjs.org/docs/react-api.html#reactmemo\n\nfunction areEqual(prevProps, nextProps) {\n var prevStyle = prevProps.style,\n prevRest = _objectWithoutPropertiesLoose(prevProps, _excluded);\n\n var nextStyle = nextProps.style,\n nextRest = _objectWithoutPropertiesLoose(nextProps, _excluded2);\n\n return !shallowDiffers(prevStyle, nextStyle) && !shallowDiffers(prevRest, nextRest);\n} // It knows to compare individual style props and ignore the wrapper object.\n// See https://reactjs.org/docs/react-component.html#shouldcomponentupdate\n\n\nfunction shouldComponentUpdate(nextProps, nextState) {\n return !areEqual(this.props, nextProps) || shallowDiffers(this.state, nextState);\n}\n\nexport { FixedSizeGrid, FixedSizeList, VariableSizeGrid, VariableSizeList, areEqual, shouldComponentUpdate };","import { Typography } from '@material-ui/core'\nimport ListSubheader from '@material-ui/core/ListSubheader'\nimport TextField from '@material-ui/core/TextField'\nimport { makeStyles, useTheme } from '@material-ui/core/styles'\nimport useMediaQuery from '@material-ui/core/useMediaQuery'\nimport Autocomplete from '@material-ui/lab/Autocomplete'\nimport React from 'react'\nimport { ListChildComponentProps, VariableSizeList } from 'react-window'\n\nconst LISTBOX_PADDING = 8 // px\n\nfunction renderRow(props: ListChildComponentProps) {\n const { data, index, style } = props\n return React.cloneElement(data[index], {\n style: {\n ...style,\n top: (style.top as number) + LISTBOX_PADDING,\n },\n })\n}\n\nconst OuterElementContext = React.createContext({})\n\nconst OuterElementType = React.forwardRef((props, ref) => {\n const outerProps = React.useContext(OuterElementContext)\n return
\n})\n\nfunction useResetCache(data: any) {\n const ref = React.useRef(null)\n React.useEffect(() => {\n if (ref.current != null) {\n ref.current.resetAfterIndex(0, true)\n }\n }, [data])\n return ref\n}\n\n// Adapter for react-window\nexport const ListboxComponent = React.forwardRef(\n function ListboxComponent(props, ref) {\n const { children, ...other } = props\n const itemData = React.Children.toArray(children)\n const theme = useTheme()\n const smUp = useMediaQuery(theme.breakpoints.up('sm'), { noSsr: true })\n const itemCount = itemData.length\n const itemSize = smUp ? 36 : 48\n\n const getChildSize = (child: React.ReactNode) => {\n if (React.isValidElement(child) && child.type === ListSubheader) {\n return 48\n }\n\n return itemSize\n }\n\n const getHeight = () => {\n if (itemCount > 8) {\n return 8 * itemSize\n }\n return itemData.map(getChildSize).reduce((a, b) => a + b, 0)\n }\n\n const gridRef = useResetCache(itemCount)\n\n return (\n
\n \n getChildSize(itemData[index])}\n overscanCount={5}\n itemCount={itemCount}\n >\n {renderRow}\n \n \n
\n )\n }\n)\n\nconst useStyles = makeStyles({\n listbox: {\n boxSizing: 'border-box',\n '& ul': {\n padding: 0,\n margin: 0,\n },\n },\n})\n\nexport interface AutocompleteInputProps {\n data: any\n onChange: any\n value: any\n}\n\nexport const AutocompleteInput: React.FC = (props) => {\n const { data } = props\n\n const classes = useStyles()\n\n return (\n \n >\n }\n options={data.length > 0 ? data : ['']}\n renderInput={(params) => (\n \n )}\n renderOption={(option: string) => (\n {option}\n )}\n />\n )\n}\n","import { Flex, Stack } from '@chakra-ui/layout'\nimport { Button } from '@irishlife/ilgroupdesignsystem.atoms.button'\nimport { Tooltip } from '@irishlife/ilgroupdesignsystem.atoms.tooltip'\nimport {\n Box,\n Grid,\n MenuItem,\n Select,\n TextField,\n Typography,\n makeStyles,\n} from '@material-ui/core'\nimport Autocomplete from '@material-ui/lab/Autocomplete'\nimport { Spacer } from 'common/components/molecules/Spacer'\nimport { Text } from 'common/components/molecules/Text'\nimport { Text as TextDs} from '@irishlife/ilgroupdesignsystem.atoms.text'\nimport { Wrapper } from 'common/components/molecules/Wrapper'\nimport { Layout, LayoutProps } from 'common/components/organisms/Layout'\nimport { useDesktop } from 'common/hooks/useDesktop'\nimport { useSfdrProductsAndFunds } from 'common/hooks/useKidsDocuments'\nimport { downloadSFDRDocument } from 'common/utils/downloadKidsDocument'\nimport _ from 'lodash'\nimport { parse } from 'query-string'\nimport React, { useCallback, useEffect, useState } from 'react'\nimport { Jumbotron, JumbotronProps } from '../Jumbotron'\nimport { ListboxComponent } from './AutocompleteInput'\n\nexport interface KIDSProps {\n jumbotron: JumbotronProps\n layout: LayoutProps\n}\n\nexport interface SfdrFund {\n fundCode: string\n fundName: string\n sfdrArticleIndicator: string\n primaryFundName: string\n}\n\nexport interface Fund {\n productCode: string\n productName: string\n sfdrFunds: SfdrFund[]\n}\ntype FundFilter = {\n productName: string\n fundName: string\n}\nexport interface FundOptions {\n productName: string[]\n fundName: SfdrFund[]\n}\n\nconst useStyles = makeStyles({\n listbox: {\n boxSizing: 'border-box',\n '& ul': {\n padding: 0,\n margin: 0,\n },\n },\n article8: {\n width: 0,\n height: 0,\n borderLeft: '3px solid transparent',\n borderRight: '3px solid transparent',\n borderBottom: '5px solid limegreen',\n scale: 2.5,\n position: 'relative',\n top: '10px',\n },\n article9: {\n width: 0,\n height: 0,\n borderLeft: '3px solid transparent',\n borderRight: '3px solid transparent',\n borderBottom: '5px solid darkgreen',\n scale: 2.5,\n position: 'relative',\n top: '10px',\n },\n})\n\nexport const SFDR: React.FC = ({ jumbotron, layout }) => {\n const desktop = useDesktop()\n const funds: Fund[] = useSfdrProductsAndFunds()\n\n const initialFilter = {\n productName: '',\n fundName: '',\n }\n let queryString = {} as { id: string }\n\n if (typeof window !== 'undefined')\n queryString = parse(window?.location.search) as { id: '' }\n\n const [fundId, setFundId] = useState(\n queryString.id ? queryString.id.toString() : null\n )\n const [filter, setFilter] = useState(initialFilter)\n const [sfdrFunds, setSfdrFunds] = useState()\n const [activeFund, setActiveFund] = useState(null)\n const [allFundNames, setAllFundNames] = useState([])\n const [filteredFundNames, setFilteredFundNames] = useState([])\n\n const classes = useStyles()\n\n const sortSfdrFunds = (a: SfdrFund, b: SfdrFund) => {\n return a.fundName.localeCompare(b.fundName)\n }\n\n const getOptions = ({ productName, fundName }: FundFilter): FundOptions => {\n return {\n productName: _.uniq(\n funds\n .map((fund) => fund.productName)\n .sort((a, b) => {\n return a > b ? 1 : -1\n })\n ),\n fundName: productName\n ? _.uniq(\n _.filter(funds, {\n productName,\n }).map((fund) => fund.sfdrFunds)\n )\n .flat()\n .sort(sortSfdrFunds)\n : [],\n }\n }\n\n const getFunds = useCallback(() => {\n if (filter.productName !== '') {\n let singleFund = _.uniq(\n _.filter(funds, {\n productName: filter.productName,\n }).map((fund) => fund.sfdrFunds)\n )\n .flat()\n .sort(sortSfdrFunds)\n\n let results = _.uniqBy(\n singleFund.sort(sortSfdrFunds),\n (fund: SfdrFund) => {\n return fund.fundName\n }\n )\n setFilteredFundNames(results.map((item) => item.fundName))\n return results\n } else if (filter.productName === '') {\n let singleFund = _.uniq(\n funds.map((fund) => {\n return fund.sfdrFunds.filter(\n (item) => item.fundName === filter.fundName\n )\n })\n ).flat()\n if (singleFund.length > 0) {\n return [singleFund[0]]\n }\n } else return []\n }, [filter.productName, filter.fundName, funds])\n\n const getSfdrFundList = useCallback(() => {\n if (activeFund) {\n setSfdrFunds([activeFund])\n setActiveFund(null)\n }\n if (filter.fundName !== '') {\n let singleFund = _.filter(getFunds(), { fundName: filter.fundName })\n setSfdrFunds(singleFund)\n return singleFund\n }\n let product = _.filter(funds, { productName: filter.productName }).pop()\n if (\n _.isNull(product) ||\n _.isUndefined(product) ||\n product.productName === ''\n ) {\n return []\n } else {\n // Sort funds alphabetically by comparison on the fund name key, returning a unique list via _.uniqBy\n setSfdrFunds(\n _.uniqBy(\n product.sfdrFunds.sort(sortSfdrFunds),\n (fund: SfdrFund) => {\n return fund.fundName\n }\n )\n )\n setFilteredFundNames(\n product.sfdrFunds.map((fund) => {\n return fund.fundName\n })\n )\n }\n }, [filter, funds, getFunds, activeFund])\n\n const getAllFundNames = useCallback(() => {\n let results = []\n\n if (funds.length > 0) {\n results = funds.map((fund) => {\n return fund.sfdrFunds\n .map((child) => {\n return child.fundName\n })\n .flat()\n })\n setAllFundNames(_.uniq(results.flat().sort()))\n return\n }\n }, [funds])\n\n const handleProductFilterChange = (\n event: React.ChangeEvent<{ name?: string; value: unknown }>\n ) => {\n if (event.target.value) {\n setFilter({\n productName: event.target.value as string,\n fundName: '',\n })\n }\n }\n\n const handleFundFilterChange = (\n event: React.ChangeEvent<{}>,\n value: string | null\n ) => {\n if (value) {\n setFilter({\n productName: filter.productName,\n fundName: value as string,\n })\n return value\n }\n }\n\n const clearFilter = () => {\n queryString = {} as { id: string }\n setActiveFund(null)\n setFundId(null)\n setFilter(initialFilter)\n setSfdrFunds([])\n setFilteredFundNames([])\n }\n\n useEffect(() => {\n if (funds.length === 0) return\n if (_.isNull(fundId)) {\n return\n }\n let queryResults: Fund = _.filter(funds, {\n sfdrFunds: [{ fundCode: fundId }],\n })[0]\n let singleResult = _.filter(queryResults.sfdrFunds, {\n fundCode: fundId,\n })[0]\n setActiveFund(singleResult)\n }, [funds, setActiveFund, fundId])\n\n useEffect(() => {\n getSfdrFundList()\n }, [filter, getSfdrFundList])\n\n useEffect(() => {\n getAllFundNames()\n }, [funds, getAllFundNames])\n\n return (\n \n \n\n \n\n \n \n \n \n There are different variations of products with the same name and the funds available to you will depend on your version of that product. The funds available on your product may also change from time to time. For the correct most up to date list of funds available on your product version, please speak to your Financial Advisor or Broker or log in to your online account.
The name of the fund in your SFDR disclosure document may be different from the fund name you see in your other documents because our funds can have different names. Although the name may be different, this information applies to your fund.
For some fund managers other than Irish Life Investment Managers the pre-contractual disclosure document may be contained in the fund prospectus of the fund manager.\n
\n\n \n \n \n \n \n \n {getOptions(filter).productName.map(\n (productName) => (\n \n {productName}\n \n )\n )}\n \n
\n \n \n \n \n \n >\n }\n onChange={handleFundFilterChange}\n options={\n filter.productName === ''\n ? allFundNames\n : filteredFundNames\n }\n renderInput={(params) => (\n \n )}\n value={filter.fundName}\n renderOption={(option: string) => (\n \n {option}\n \n )}\n />\n \n \n\n \n \n \n Clear\n \n \n \n \n\n {sfdrFunds\n ? sfdrFunds.map((fund) => {\n return (\n \n \n \n
\n \n \n {fund.sfdrArticleIndicator ===\n '8' ? (\n \n
\n \n ) : fund.sfdrArticleIndicator ===\n '9' ? (\n \n
\n \n ) : (\n ''\n )}\n \n \n \n {fund.primaryFundName &&\n fund.primaryFundName !==\n fund.fundName ? (\n \n ) : (\n ''\n )}\n \n \n \n {\n downloadSFDRDocument(\n fund.fundCode,\n 2\n )\n }}\n >\n View Disclosure\n \n \n \n \n {\n downloadSFDRDocument(\n fund.fundCode,\n 1\n )\n }}\n >\n View Disclosure\n \n \n \n \n {\n downloadSFDRDocument(\n fund.fundCode,\n 0\n )\n }}\n >\n View Disclosure\n \n \n \n \n )\n })\n : ''}\n \n \n \n )\n}\n","import { RouteComponentProps } from '@reach/router'\nimport { SFDR } from 'common/components/organisms/FundCentre/SFDR'\nimport { getLayoutData } from 'common/utils/getLayoutData'\nimport { getJumbotronData } from 'common/components/organisms/Jumbotron'\nimport React from 'react'\n\nexport interface SfdrProps extends RouteComponentProps {\n pageContext: any\n}\n\nexport const SfdrPage: React.FC = ({ pageContext }) => {\n return \n}\n\nexport const getSFDRData = (data: any) => {\n return {\n jumbotron: getJumbotronData(data),\n layout: getLayoutData(data)\n }\n}\n\nexport default SfdrPage\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","\"use strict\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Tooltip = void 0;\n\nvar react_1 = __importDefault(require(\"react\"));\n\nvar react_2 = require(\"@chakra-ui/react\");\n\nfunction Tooltip(props) {\n var variant = props.variant,\n rest = __rest(props, [\"variant\"]);\n\n var styles = react_1.default.useMemo(function () {\n return {\n bg: variant === 'dark' ? 'monochrome.700' : 'white',\n color: variant === 'dark' ? 'white' : 'brand.900'\n };\n }, [variant]);\n return react_1.default.createElement(react_2.Tooltip, Object.assign({\n \"data-testid\": \"Tooltip\"\n }, rest, styles, {\n rounded: \"md\",\n py: 1\n }));\n}\n\nexports.Tooltip = Tooltip;","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Tooltip = void 0;\n\nvar tooltip_1 = require(\"./tooltip\");\n\nObject.defineProperty(exports, \"Tooltip\", {\n enumerable: true,\n get: function get() {\n return tooltip_1.Tooltip;\n }\n});","var baseIteratee = require('./_baseIteratee'),\n baseUniq = require('./_baseUniq');\n\n/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nfunction uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\n}\n\nmodule.exports = uniqBy;\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n"],"sourceRoot":""}