{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\nimport View from \"../../../exports/View\";\nimport StyleSheet from \"../../../exports/StyleSheet\";\nimport { VirtualizedListCellContextProvider } from \"./VirtualizedListContext.js\";\nimport invariant from 'fbjs/lib/invariant';\nimport * as React from 'react';\nexport default class CellRenderer extends React.Component {\n  constructor() {\n    super(...arguments);\n    this.state = {\n      separatorProps: {\n        highlighted: false,\n        leadingItem: this.props.item\n      }\n    };\n    this._separators = {\n      highlight: () => {\n        var _this$props = this.props,\n          cellKey = _this$props.cellKey,\n          prevCellKey = _this$props.prevCellKey;\n        this.props.onUpdateSeparators([cellKey, prevCellKey], {\n          highlighted: true\n        });\n      },\n      unhighlight: () => {\n        var _this$props2 = this.props,\n          cellKey = _this$props2.cellKey,\n          prevCellKey = _this$props2.prevCellKey;\n        this.props.onUpdateSeparators([cellKey, prevCellKey], {\n          highlighted: false\n        });\n      },\n      updateProps: (select, newProps) => {\n        var _this$props3 = this.props,\n          cellKey = _this$props3.cellKey,\n          prevCellKey = _this$props3.prevCellKey;\n        this.props.onUpdateSeparators([select === 'leading' ? prevCellKey : cellKey], newProps);\n      }\n    };\n    this._onLayout = nativeEvent => {\n      this.props.onCellLayout && this.props.onCellLayout(nativeEvent, this.props.cellKey, this.props.index);\n    };\n  }\n  static getDerivedStateFromProps(props, prevState) {\n    return {\n      separatorProps: _objectSpread(_objectSpread({}, prevState.separatorProps), {}, {\n        leadingItem: props.item\n      })\n    };\n  }\n  updateSeparatorProps(newProps) {\n    this.setState(state => ({\n      separatorProps: _objectSpread(_objectSpread({}, state.separatorProps), newProps)\n    }));\n  }\n  componentWillUnmount() {\n    this.props.onUnmount(this.props.cellKey);\n  }\n  _renderElement(renderItem, ListItemComponent, item, index) {\n    if (renderItem && ListItemComponent) {\n      console.warn('VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take' + ' precedence over renderItem.');\n    }\n    if (ListItemComponent) {\n      return React.createElement(ListItemComponent, {\n        item,\n        index,\n        separators: this._separators\n      });\n    }\n    if (renderItem) {\n      return renderItem({\n        item,\n        index,\n        separators: this._separators\n      });\n    }\n    invariant(false, 'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.');\n  }\n  render() {\n    var _this$props4 = this.props,\n      CellRendererComponent = _this$props4.CellRendererComponent,\n      ItemSeparatorComponent = _this$props4.ItemSeparatorComponent,\n      ListItemComponent = _this$props4.ListItemComponent,\n      cellKey = _this$props4.cellKey,\n      horizontal = _this$props4.horizontal,\n      item = _this$props4.item,\n      index = _this$props4.index,\n      inversionStyle = _this$props4.inversionStyle,\n      onCellFocusCapture = _this$props4.onCellFocusCapture,\n      onCellLayout = _this$props4.onCellLayout,\n      renderItem = _this$props4.renderItem;\n    var element = this._renderElement(renderItem, ListItemComponent, item, index);\n    var itemSeparator = React.isValidElement(ItemSeparatorComponent) ? ItemSeparatorComponent : ItemSeparatorComponent && React.createElement(ItemSeparatorComponent, this.state.separatorProps);\n    var cellStyle = inversionStyle ? horizontal ? [styles.rowReverse, inversionStyle] : [styles.columnReverse, inversionStyle] : horizontal ? [styles.row, inversionStyle] : inversionStyle;\n    var result = !CellRendererComponent ? React.createElement(View, _extends({\n      style: cellStyle,\n      onFocusCapture: onCellFocusCapture\n    }, onCellLayout && {\n      onLayout: this._onLayout\n    }), element, itemSeparator) : React.createElement(CellRendererComponent, _extends({\n      cellKey: cellKey,\n      index: index,\n      item: item,\n      style: cellStyle,\n      onFocusCapture: onCellFocusCapture\n    }, onCellLayout && {\n      onLayout: this._onLayout\n    }), element, itemSeparator);\n    return React.createElement(VirtualizedListCellContextProvider, {\n      cellKey: this.props.cellKey\n    }, result);\n  }\n}\nvar styles = StyleSheet.create({\n  row: {\n    flexDirection: 'row'\n  },\n  rowReverse: {\n    flexDirection: 'row-reverse'\n  },\n  columnReverse: {\n    flexDirection: 'column-reverse'\n  }\n});","map":{"version":3,"names":["_extends","_objectSpread","View","StyleSheet","VirtualizedListCellContextProvider","invariant","React","CellRenderer","Component","constructor","arguments","state","separatorProps","highlighted","leadingItem","props","item","_separators","highlight","_this$props","cellKey","prevCellKey","onUpdateSeparators","unhighlight","_this$props2","updateProps","select","newProps","_this$props3","_onLayout","nativeEvent","onCellLayout","index","getDerivedStateFromProps","prevState","updateSeparatorProps","setState","componentWillUnmount","onUnmount","_renderElement","renderItem","ListItemComponent","console","warn","createElement","separators","render","_this$props4","CellRendererComponent","ItemSeparatorComponent","horizontal","inversionStyle","onCellFocusCapture","element","itemSeparator","isValidElement","cellStyle","styles","rowReverse","columnReverse","row","result","style","onFocusCapture","onLayout","create","flexDirection"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/VirtualizedListCellRenderer.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectSpread from \"@babel/runtime/helpers/objectSpread2\";\n/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n\nimport View from '../../../exports/View';\nimport StyleSheet from '../../../exports/StyleSheet';\nimport { VirtualizedListCellContextProvider } from './VirtualizedListContext.js';\nimport invariant from 'fbjs/lib/invariant';\nimport * as React from 'react';\nexport default class CellRenderer extends React.Component {\n  constructor() {\n    super(...arguments);\n    this.state = {\n      separatorProps: {\n        highlighted: false,\n        leadingItem: this.props.item\n      }\n    };\n    this._separators = {\n      highlight: () => {\n        var _this$props = this.props,\n          cellKey = _this$props.cellKey,\n          prevCellKey = _this$props.prevCellKey;\n        this.props.onUpdateSeparators([cellKey, prevCellKey], {\n          highlighted: true\n        });\n      },\n      unhighlight: () => {\n        var _this$props2 = this.props,\n          cellKey = _this$props2.cellKey,\n          prevCellKey = _this$props2.prevCellKey;\n        this.props.onUpdateSeparators([cellKey, prevCellKey], {\n          highlighted: false\n        });\n      },\n      updateProps: (select, newProps) => {\n        var _this$props3 = this.props,\n          cellKey = _this$props3.cellKey,\n          prevCellKey = _this$props3.prevCellKey;\n        this.props.onUpdateSeparators([select === 'leading' ? prevCellKey : cellKey], newProps);\n      }\n    };\n    this._onLayout = nativeEvent => {\n      this.props.onCellLayout && this.props.onCellLayout(nativeEvent, this.props.cellKey, this.props.index);\n    };\n  }\n  static getDerivedStateFromProps(props, prevState) {\n    return {\n      separatorProps: _objectSpread(_objectSpread({}, prevState.separatorProps), {}, {\n        leadingItem: props.item\n      })\n    };\n  }\n\n  // TODO: consider factoring separator stuff out of VirtualizedList into FlatList since it's not\n  // reused by SectionList and we can keep VirtualizedList simpler.\n  // $FlowFixMe[missing-local-annot]\n\n  updateSeparatorProps(newProps) {\n    this.setState(state => ({\n      separatorProps: _objectSpread(_objectSpread({}, state.separatorProps), newProps)\n    }));\n  }\n  componentWillUnmount() {\n    this.props.onUnmount(this.props.cellKey);\n  }\n  _renderElement(renderItem, ListItemComponent, item, index) {\n    if (renderItem && ListItemComponent) {\n      console.warn('VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take' + ' precedence over renderItem.');\n    }\n    if (ListItemComponent) {\n      /* $FlowFixMe[not-a-component] (>=0.108.0 site=react_native_fb) This\n       * comment suppresses an error found when Flow v0.108 was deployed. To\n       * see the error, delete this comment and run Flow. */\n      /* $FlowFixMe[incompatible-type-arg] (>=0.108.0 site=react_native_fb)\n       * This comment suppresses an error found when Flow v0.108 was deployed.\n       * To see the error, delete this comment and run Flow. */\n      return /*#__PURE__*/React.createElement(ListItemComponent, {\n        item,\n        index,\n        separators: this._separators\n      });\n    }\n    if (renderItem) {\n      return renderItem({\n        item,\n        index,\n        separators: this._separators\n      });\n    }\n    invariant(false, 'VirtualizedList: Either ListItemComponent or renderItem props are required but none were found.');\n  }\n  render() {\n    var _this$props4 = this.props,\n      CellRendererComponent = _this$props4.CellRendererComponent,\n      ItemSeparatorComponent = _this$props4.ItemSeparatorComponent,\n      ListItemComponent = _this$props4.ListItemComponent,\n      cellKey = _this$props4.cellKey,\n      horizontal = _this$props4.horizontal,\n      item = _this$props4.item,\n      index = _this$props4.index,\n      inversionStyle = _this$props4.inversionStyle,\n      onCellFocusCapture = _this$props4.onCellFocusCapture,\n      onCellLayout = _this$props4.onCellLayout,\n      renderItem = _this$props4.renderItem;\n    var element = this._renderElement(renderItem, ListItemComponent, item, index);\n\n    // NOTE: that when this is a sticky header, `onLayout` will get automatically extracted and\n    // called explicitly by `ScrollViewStickyHeader`.\n    var itemSeparator = /*#__PURE__*/React.isValidElement(ItemSeparatorComponent) ?\n    // $FlowFixMe[incompatible-type]\n    ItemSeparatorComponent :\n    // $FlowFixMe[incompatible-type]\n    ItemSeparatorComponent && /*#__PURE__*/React.createElement(ItemSeparatorComponent, this.state.separatorProps);\n    var cellStyle = inversionStyle ? horizontal ? [styles.rowReverse, inversionStyle] : [styles.columnReverse, inversionStyle] : horizontal ? [styles.row, inversionStyle] : inversionStyle;\n    var result = !CellRendererComponent ? /*#__PURE__*/React.createElement(View, _extends({\n      style: cellStyle,\n      onFocusCapture: onCellFocusCapture\n    }, onCellLayout && {\n      onLayout: this._onLayout\n    }), element, itemSeparator) : /*#__PURE__*/React.createElement(CellRendererComponent, _extends({\n      cellKey: cellKey,\n      index: index,\n      item: item,\n      style: cellStyle,\n      onFocusCapture: onCellFocusCapture\n    }, onCellLayout && {\n      onLayout: this._onLayout\n    }), element, itemSeparator);\n    return /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, {\n      cellKey: this.props.cellKey\n    }, result);\n  }\n}\nvar styles = StyleSheet.create({\n  row: {\n    flexDirection: 'row'\n  },\n  rowReverse: {\n    flexDirection: 'row-reverse'\n  },\n  columnReverse: {\n    flexDirection: 'column-reverse'\n  }\n});"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,gCAAgC;AACrD,OAAOC,aAAa,MAAM,sCAAsC;AAWhE,OAAOC,IAAI;AACX,OAAOC,UAAU;AACjB,SAASC,kCAAkC;AAC3C,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