expo-dev-launcher 3.6.0 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/android/build.gradle +3 -4
- package/android/src/debug/assets/expo_dev_launcher_android.bundle +2 -2
- package/android/src/debug/java/expo/modules/devlauncher/DevLauncherController.kt +13 -2
- package/android/src/debug/java/expo/modules/devlauncher/launcher/DevLauncherClientHost.kt +1 -1
- package/android/src/debug/java/expo/modules/devlauncher/launcher/loaders/DevLauncherAppLoader.kt +1 -1
- package/android/src/debug/java/expo/modules/devlauncher/modules/DevLauncherInternalModule.kt +2 -2
- package/android/src/debug/java/expo/modules/devlauncher/react/DevLauncherDevSupportManagerSwapper.kt +1 -1
- package/android/src/expo-45/expo/modules/devlauncher/DevLauncherPackageDelegate.kt +1 -1
- package/android/src/main/java/expo/modules/devlauncher/helpers/DevLauncherColorsHelper.kt +3 -1
- package/android/src/main/java/expo/modules/devlauncher/helpers/DevLauncherUpdatesHelper.kt +3 -2
- package/android/src/main/java/expo/modules/devlauncher/launcher/DevLauncherControllerInterface.kt +3 -1
- package/android/src/main/java/expo/modules/devlauncher/splashscreen/DevLauncherSplashScreen.kt +2 -2
- package/android/src/main/java/expo/modules/devlauncher/splashscreen/DevLauncherSplashScreenProvider.kt +1 -1
- package/android/src/react-native-69/expo/modules/devlauncher/rncompatibility/DevLauncherDevSupportManager.kt +21 -10
- package/android/src/react-native-72/expo/modules/devlauncher/rncompatibility/DevLauncherDevSupportManager.kt +18 -10
- package/android/src/release/java/expo/modules/devlauncher/DevLauncherController.kt +6 -1
- package/android/src/with-updates/expo/modules/devlauncher/DevLauncherUpdatesInterfaceDelegate.kt +1 -1
- package/ios/EXDevLauncherBridgeDelegate.mm +5 -0
- package/ios/EXDevLauncherController.h +1 -1
- package/ios/EXDevLauncherController.m +8 -2
- package/ios/ReactDelegateHandler/ExpoDevLauncherReactDelegateHandler.swift +1 -0
- package/ios/ReactNative/EXDevLauncherRCTBridge.m +1 -1
- package/ios/main.jsbundle +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,30 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 3.6.2 — 2024-01-10
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fix launcher bridge not filtering native modules. ([#26332](https://github.com/expo/expo/pull/26332) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
18
|
+
|
|
19
|
+
### 💡 Others
|
|
20
|
+
|
|
21
|
+
- Replace deprecated `com.facebook.react:react-native:+` Android dependency with `com.facebook.react:react-android`. ([#26237](https://github.com/expo/expo/pull/26237) by [@kudo](https://github.com/kudo))
|
|
22
|
+
|
|
23
|
+
### 📚 3rd party library updates
|
|
24
|
+
|
|
25
|
+
- Update react-native to 0.73.2. ([#26308](https://github.com/expo/expo/pull/26308) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
26
|
+
|
|
27
|
+
## 3.6.1 — 2023-12-19
|
|
28
|
+
|
|
29
|
+
### 🎉 New features
|
|
30
|
+
|
|
31
|
+
- Added support for React Native 0.73.1. ([#25998](https://github.com/expo/expo/pull/25998) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
32
|
+
|
|
33
|
+
### 🐛 Bug fixes
|
|
34
|
+
|
|
35
|
+
- [expo-updates] Add relaunch to disabled and dev client controllers. ([#25973](https://github.com/expo/expo/pull/25973) by [@wschurman](https://github.com/wschurman))
|
|
36
|
+
|
|
13
37
|
## 3.6.0 — 2023-12-15
|
|
14
38
|
|
|
15
39
|
### 🐛 Bug fixes
|
package/android/build.gradle
CHANGED
|
@@ -38,7 +38,7 @@ android {
|
|
|
38
38
|
// Remove this if and it's contents, when support for SDK49 is dropped
|
|
39
39
|
if (!safeExtGet("expoProvidesDefaultConfig", false)) {
|
|
40
40
|
compileSdkVersion safeExtGet("compileSdkVersion", 34)
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
defaultConfig {
|
|
43
43
|
minSdkVersion safeExtGet("minSdkVersion", 23)
|
|
44
44
|
targetSdkVersion safeExtGet("targetSdkVersion", 34)
|
|
@@ -53,7 +53,7 @@ android {
|
|
|
53
53
|
minSdkVersion safeExtGet('minSdkVersion', 21)
|
|
54
54
|
targetSdkVersion safeExtGet("targetSdkVersion", 34)
|
|
55
55
|
versionCode 9
|
|
56
|
-
versionName "3.6.
|
|
56
|
+
versionName "3.6.2"
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
|
|
@@ -140,8 +140,7 @@ dependencies {
|
|
|
140
140
|
implementation project(":expo-updates")
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
implementation 'com.facebook.react:react-native:+' // From node_modules
|
|
143
|
+
implementation 'com.facebook.react:react-android'
|
|
145
144
|
|
|
146
145
|
implementation 'commons-io:commons-io:2.6'
|
|
147
146
|
|
|
@@ -370,7 +370,7 @@ __d((function(g,r,_i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule"
|
|
|
370
370
|
__d((function(g,r,_i,a,m,_e,d){var e=r(d[0]),t=e(r(d[1])),n=e(r(d[2])),i=e(r(d[3])),o=e(r(d[4])),l=e(r(d[5])),s=e(r(d[6])),u=e(r(d[7])),c=r(d[8]),f=e(r(d[9])),p=r(d[10]),h=["numColumns","columnWrapperStyle","removeClippedSubviews","strictMode"];function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function C(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var b=r(d[11]),w=r(d[12]),_=r(d[13]),I=(r(d[14]),r(d[15])),k=r(d[16]);function R(e){return null!=e?e:1}function P(e){return'number'==typeof Object(e).length}var x=(function(e){(0,l.default)(V,e);var n,v,x=(n=V,v=C(),function(){var e,t=(0,u.default)(n);if(v){var i=(0,u.default)(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return(0,s.default)(this,e)});function V(e){var t;return(0,i.default)(this,V),(t=x.call(this,e))._virtualizedListPairs=[],t._captureRef=function(e){t._listRef=e},t._getItem=function(e,n){var i=R(t.props.numColumns);if(i>1){for(var o=[],l=0;l<i;l++){var s=n*i+l;if(s<e.length){var u=e[s];o.push(u)}}return o}return e[n]},t._getItemCount=function(e){if(null!=e&&P(e)){var n=R(t.props.numColumns);return n>1?Math.ceil(e.length/n):e.length}return 0},t._keyExtractor=function(e,n){var i,o=R(t.props.numColumns),l=null!=(i=t.props.keyExtractor)?i:c.keyExtractor;return o>1?(I(Array.isArray(e),"FlatList: Encountered internal consistency error, expected each item to consist of an array with 1-%s columns; instead, received a single item.",o),e.map((function(e,t){return l(e,n*o+t)})).join(':')):l(e,n)},t._renderer=function(e,t,n,i,o){var l=R(i),s=function(n){return e?(0,p.jsx)(e,y({},n)):t?t(n):null},u=function(e){if(l>1){var t=e.item,i=e.index;return I(Array.isArray(t),'Expected array of items with numColumns > 1'),(0,p.jsx)(b,{style:w.compose(O.row,n),children:t.map((function(t,n){var o=s({item:t,index:i*l+n,separators:e.separators});return null!=o?(0,p.jsx)(k.Fragment,{children:o},n):null}))})}return s(e)};return e?{ListItemComponent:u}:{renderItem:u}},t._memoizedRenderer=(0,f.default)(t._renderer),t._checkProps(t.props),t.props.viewabilityConfigCallbackPairs?t._virtualizedListPairs=t.props.viewabilityConfigCallbackPairs.map((function(e){return{viewabilityConfig:e.viewabilityConfig,onViewableItemsChanged:t._createOnViewableItemsChanged(e.onViewableItemsChanged)}})):t.props.onViewableItemsChanged&&t._virtualizedListPairs.push({viewabilityConfig:t.props.viewabilityConfig,onViewableItemsChanged:t._createOnViewableItemsChanged((function(){var e;return I(t.props.onViewableItemsChanged,"Changing the nullability of onViewableItemsChanged is not supported. Once a function or null is supplied that cannot be changed."),(e=t.props).onViewableItemsChanged.apply(e,arguments)}))}),t}return(0,o.default)(V,[{key:"scrollToEnd",value:function(e){this._listRef&&this._listRef.scrollToEnd(e)}},{key:"scrollToIndex",value:function(e){this._listRef&&this._listRef.scrollToIndex(e)}},{key:"scrollToItem",value:function(e){this._listRef&&this._listRef.scrollToItem(e)}},{key:"scrollToOffset",value:function(e){this._listRef&&this._listRef.scrollToOffset(e)}},{key:"recordInteraction",value:function(){this._listRef&&this._listRef.recordInteraction()}},{key:"flashScrollIndicators",value:function(){this._listRef&&this._listRef.flashScrollIndicators()}},{key:"getScrollResponder",value:function(){if(this._listRef)return this._listRef.getScrollResponder()}},{key:"getNativeScrollRef",value:function(){if(this._listRef)return this._listRef.getScrollRef()}},{key:"getScrollableNode",value:function(){if(this._listRef)return this._listRef.getScrollableNode()}},{key:"setNativeProps",value:function(e){this._listRef&&this._listRef.setNativeProps(e)}},{key:"componentDidUpdate",value:function(e){I(e.numColumns===this.props.numColumns,"Changing numColumns on the fly is not supported. Change the key prop on FlatList when changing the number of columns to force a fresh render of the component."),I(null==e.onViewableItemsChanged==(null==this.props.onViewableItemsChanged),'Changing onViewableItemsChanged nullability on the fly is not supported'),I(!_(e.viewabilityConfig,this.props.viewabilityConfig),'Changing viewabilityConfig on the fly is not supported'),I(e.viewabilityConfigCallbackPairs===this.props.viewabilityConfigCallbackPairs,'Changing viewabilityConfigCallbackPairs on the fly is not supported'),this._checkProps(this.props)}},{key:"_checkProps",value:function(e){var t=e.getItem,n=e.getItemCount,i=e.horizontal,o=e.columnWrapperStyle,l=e.onViewableItemsChanged,s=e.viewabilityConfigCallbackPairs,u=R(this.props.numColumns);I(!t&&!n,'FlatList does not support custom data formats.'),u>1?I(!i,'numColumns does not support horizontal.'):I(!o,'columnWrapperStyle not supported for single column lists'),I(!(l&&s),"FlatList does not support setting both onViewableItemsChanged and viewabilityConfigCallbackPairs.")}},{key:"_pushMultiColumnViewable",value:function(e,t){var n,i=R(this.props.numColumns),o=null!=(n=this.props.keyExtractor)?n:c.keyExtractor;t.item.forEach((function(n,l){I(null!=t.index,'Missing index!');var s=t.index*i+l;e.push(y(y({},t),{},{item:n,key:o(n,s),index:s}))}))}},{key:"_createOnViewableItemsChanged",value:function(e){var t=this;return function(n){var i=R(t.props.numColumns);if(e)if(i>1){var o=[],l=[];n.viewableItems.forEach((function(e){return t._pushMultiColumnViewable(l,e)})),n.changed.forEach((function(e){return t._pushMultiColumnViewable(o,e)})),e({viewableItems:l,changed:o})}else e(n)}}},{key:"render",value:function(){var e,n=this.props,i=n.numColumns,o=n.columnWrapperStyle,l=n.removeClippedSubviews,s=n.strictMode,u=void 0!==s&&s,f=(0,t.default)(n,h),v=u?this._memoizedRenderer:this._renderer;return(0,p.jsx)(c.VirtualizedList,y(y({},f),{},{getItem:this._getItem,getItemCount:this._getItemCount,keyExtractor:this._keyExtractor,ref:this._captureRef,viewabilityConfigCallbackPairs:this._virtualizedListPairs,removeClippedSubviews:(e=l,null==e||e)},v(this.props.ListItemComponent,this.props.renderItem,o,i,this.props.extraData)))}}]),V})(k.PureComponent),O=w.create({row:{flexDirection:'row'}});m.exports=x}),321,[6,180,40,8,9,16,18,15,322,338,219,216,221,106,56,3,101]);
|
|
371
371
|
__d((function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);m.exports={keyExtractor:t.keyExtractor,get VirtualizedList(){return r(d[1])},get VirtualizedSectionList(){return r(d[2])},get VirtualizedListContextResetter(){return r(d[3]).VirtualizedListContextResetter},get ViewabilityHelper(){return r(d[4])},get FillRateHelper(){return r(d[5])}}}),322,[323,324,337,335,333,330]);
|
|
372
372
|
__d((function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.computeWindowedRenderLimits=function(t,o,s,u,v,c){var h=t.getItemCount(t.data);if(0===h)return{first:0,last:-1};var M=c.offset,x=c.velocity,b=c.visibleLength,p=c.zoomScale,y=void 0===p?1:p,w=Math.max(0,M),C=w+b,k=(s-1)*b,O=x>1?'after':x<-1?'before':'none',_=Math.max(0,w-.5*k),j=Math.max(0,C+.5*k);if(v.getCellMetricsApprox(h-1,t).offset*y<_)return{first:Math.max(0,h-1-o),last:h-1};var L=f([_,w,C,j],t,v,y),S=(0,n.default)(L,4),A=S[0],E=S[1],I=S[2],R=S[3];A=null==A?0:A,E=null==E?Math.max(0,A):E,R=null==R?h-1:R,I=null==I?Math.min(R,E+o-1):I;var z={first:E,last:I},B=l(u,z);for(;!(E<=A&&I>=R);){var F=B>=o,J=E<=u.first||E>u.last,N=E>A&&(!F||!J),P=I>=u.last||I<u.first,T=I<R&&(!F||!P);if(F&&!N&&!T)break;!N||'after'===O&&T&&P||(J&&B++,E--),!T||'before'===O&&N&&J||(P&&B++,I++)}if(!(I>=E&&E>=0&&I<h&&E>=A&&I<=R&&E<=z.first&&I>=z.last))throw new Error('Bad window calculation '+JSON.stringify({first:E,last:I,itemCount:h,overscanFirst:A,overscanLast:R,visible:z}));return{first:E,last:I}},e.elementsThatOverlapOffsets=f,e.keyExtractor=function(t,n){if('object'==typeof t&&null!=(null==t?void 0:t.key))return t.key;if('object'==typeof t&&null!=(null==t?void 0:t.id))return t.id;return String(n)},e.newRangeCount=l;var n=t(r(d[1]));function f(t,n,f){for(var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=n.getItemCount(n.data),s=[],u=0;u<t.length;u++)for(var v=t[u],c=0,h=o-1;c<=h;){var M=c+Math.floor((h-c)/2),x=f.getCellMetricsApprox(M,n),b=x.offset*l,p=(x.offset+x.length)*l;if(0===M&&v<b||0!==M&&v<=b)h=M-1;else{if(!(v>p)){s[u]=M;break}c=M+1}}return s}function l(t,n){return n.last-n.first+1-Math.max(0,1+Math.min(n.last,t.last)-Math.max(n.first,t.first))}}),323,[6,51]);
|
|
373
|
-
__d((function(g,_r,_i2,a,m,_e,d){var e=_r(d[0]),t=e(_r(d[1])),r=e(_r(d[2])),i=e(_r(d[3])),n=e(_r(d[4])),o=e(_r(d[5])),s=e(_r(d[6])),l=e(_r(d[7])),c=e(_r(d[8])),u=_r(d[9]),h=e(_r(d[10])),f=e(_r(d[11])),p=e(_r(d[12])),_=_r(d[13]),v=e(_r(d[14])),y=e(_r(d[15])),C=e(_r(d[16])),S=e(_r(d[17])),L=e(_r(d[18])),b=e(_r(d[19])),M=_r(d[20]),I=_r(d[21]),w=e(_r(d[22])),R=e(_r(d[23])),x=(function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=T(t);if(r&&r.has(e))return r.get(e);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=n?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}i.default=e,r&&r.set(e,i);return i})(_r(d[24])),k=_r(d[25]),O=_r(d[26]);function T(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(T=function(e){return e?r:t})(e)}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function E(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?V(Object(i),!0).forEach((function(t){(0,r.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):V(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function P(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var z=!1,F='';function A(e,t){for(var r=e.length-1;r>=0;r--)if(t(e[r]))return e[r];return null}function D(e,t){return e*t/2}var j=(function(e){(0,s.default)(j,e);var S,T,V=(S=j,T=P(),function(){var e,t=(0,c.default)(S);if(T){var r=(0,c.default)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,l.default)(this,e)});function j(e){var t,r,n,s;if((0,i.default)(this,j),(s=V.call(this,e))._getScrollMetrics=function(){return s._scrollMetrics},s._getOutermostParentListRef=function(){return s._isNestedWithSameOrientation()?s.context.getOutermostParentListRef():(0,o.default)(s)},s._registerAsNestedChild=function(e){s._nestedChildLists.add(e.ref,e.cellKey),s._hasInteracted&&e.ref.recordInteraction()},s._unregisterAsNestedChild=function(e){s._nestedChildLists.remove(e.ref)},s._onUpdateSeparators=function(e,t){e.forEach((function(e){var r=null!=e&&s._cellRefs[e];r&&r.updateSeparatorProps(t)}))},s._getSpacerKey=function(e){return e?'height':'width'},s._cellRefs={},s._listMetrics=new C.default,s._footerLength=0,s._hasTriggeredInitialScrollToIndex=!1,s._hasInteracted=!1,s._hasMore=!1,s._hasWarned={},s._headerLength=0,s._hiPriInProgress=!1,s._indicesToKeys=new Map,s._lastFocusedCellKey=null,s._nestedChildLists=new v.default,s._offsetFromParentVirtualizedList=0,s._pendingViewabilityUpdate=!1,s._prevParentOffset=0,s._scrollMetrics={dOffset:0,dt:10,offset:0,timestamp:0,velocity:0,visibleLength:0,zoomScale:1},s._scrollRef=null,s._sentStartForContentLength=0,s._sentEndForContentLength=0,s._viewabilityTuples=[],s._captureScrollRef=function(e){s._scrollRef=e},s._defaultRenderScrollComponent=function(e){var t,r=e.onRefresh;return s._isNestedWithSameOrientation()?(0,O.jsx)(u.View,E({},e)):r?((0,w.default)('boolean'==typeof e.refreshing,'`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `'+JSON.stringify(null!=(t=e.refreshing)?t:'undefined')+'`'),(0,O.jsx)(u.ScrollView,E(E({},e),{},{refreshControl:null==e.refreshControl?(0,O.jsx)(u.RefreshControl,{refreshing:e.refreshing,onRefresh:r,progressViewOffset:e.progressViewOffset}):e.refreshControl}))):(0,O.jsx)(u.ScrollView,E({},e))},s._onCellLayout=function(e,t,r){s._listMetrics.notifyCellLayout({cellIndex:r,cellKey:t,layout:e.nativeEvent.layout,orientation:s._orientation()})&&s._scheduleCellsToRenderUpdate(),s._triggerRemeasureForChildListsInCell(t),s._computeBlankness(),s._updateViewableItems(s.props,s.state.cellsAroundViewport)},s._onCellUnmount=function(e){delete s._cellRefs[e],s._listMetrics.notifyCellUnmounted(e)},s._onLayout=function(e){s._isNestedWithSameOrientation()?s.measureLayoutRelativeToContainingList():s._scrollMetrics.visibleLength=s._selectLength(e.nativeEvent.layout),s.props.onLayout&&s.props.onLayout(e),s._scheduleCellsToRenderUpdate(),s._maybeCallOnEdgeReached()},s._onLayoutEmpty=function(e){s.props.onLayout&&s.props.onLayout(e)},s._onLayoutFooter=function(e){s._triggerRemeasureForChildListsInCell(s._getFooterCellKey()),s._footerLength=s._selectLength(e.nativeEvent.layout)},s._onLayoutHeader=function(e){s._headerLength=s._selectLength(e.nativeEvent.layout)},s._onContentSizeChange=function(e,t){s._listMetrics.notifyListContentLayout({layout:{width:e,height:t},orientation:s._orientation()}),s._maybeScrollToInitialScrollIndex(e,t),s.props.onContentSizeChange&&s.props.onContentSizeChange(e,t),s._scheduleCellsToRenderUpdate(),s._maybeCallOnEdgeReached()},s._convertParentScrollMetrics=function(e){var t=e.offset-s._offsetFromParentVirtualizedList,r=e.visibleLength,i=t-s._scrollMetrics.offset;return{visibleLength:r,contentLength:s._listMetrics.getContentLength(),offset:t,dOffset:i}},s._onScroll=function(e){s._nestedChildLists.forEach((function(t){t._onScroll(e)})),s.props.onScroll&&s.props.onScroll(e);var t=e.timeStamp,r=s._selectLength(e.nativeEvent.layoutMeasurement),i=s._selectLength(e.nativeEvent.contentSize),n=s._offsetFromScrollEvent(e),o=n-s._scrollMetrics.offset;if(s._isNestedWithSameOrientation()){if(0===s._listMetrics.getContentLength())return;var l=s._convertParentScrollMetrics({visibleLength:r,offset:n});r=l.visibleLength,i=l.contentLength,n=l.offset,o=l.dOffset}var c=s._scrollMetrics.timestamp?Math.max(1,t-s._scrollMetrics.timestamp):1,u=o/c;c>500&&s._scrollMetrics.dt>500&&i>5*r&&!s._hasWarned.perf&&((0,p.default)("VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc.",{dt:c,prevDt:s._scrollMetrics.dt,contentLength:i}),s._hasWarned.perf=!0);var h=e.nativeEvent.zoomScale<0?1:e.nativeEvent.zoomScale;s._scrollMetrics={dt:c,dOffset:o,offset:n,timestamp:t,velocity:u,visibleLength:r,zoomScale:h},s.state.pendingScrollUpdateCount>0&&s.setState((function(e){return{pendingScrollUpdateCount:e.pendingScrollUpdateCount-1}})),s._updateViewableItems(s.props,s.state.cellsAroundViewport),s.props&&(s._maybeCallOnEdgeReached(),0!==u&&s._fillRateHelper.activate(),s._computeBlankness(),s._scheduleCellsToRenderUpdate())},s._onScrollBeginDrag=function(e){s._nestedChildLists.forEach((function(t){t._onScrollBeginDrag(e)})),s._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),s._hasInteracted=!0,s.props.onScrollBeginDrag&&s.props.onScrollBeginDrag(e)},s._onScrollEndDrag=function(e){s._nestedChildLists.forEach((function(t){t._onScrollEndDrag(e)}));var t=e.nativeEvent.velocity;t&&(s._scrollMetrics.velocity=s._selectOffset(t)),s._computeBlankness(),s.props.onScrollEndDrag&&s.props.onScrollEndDrag(e)},s._onMomentumScrollBegin=function(e){s._nestedChildLists.forEach((function(t){t._onMomentumScrollBegin(e)})),s.props.onMomentumScrollBegin&&s.props.onMomentumScrollBegin(e)},s._onMomentumScrollEnd=function(e){s._nestedChildLists.forEach((function(t){t._onMomentumScrollEnd(e)})),s._scrollMetrics.velocity=0,s._computeBlankness(),s.props.onMomentumScrollEnd&&s.props.onMomentumScrollEnd(e)},s._updateCellsToRender=function(){s._updateViewableItems(s.props,s.state.cellsAroundViewport),s.setState((function(e,t){var r=s._adjustCellsAroundViewport(t,e.cellsAroundViewport,e.pendingScrollUpdateCount),i=j._createRenderMask(t,r,s._getNonViewportRenderRegions(t));return r.first===e.cellsAroundViewport.first&&r.last===e.cellsAroundViewport.last&&i.equals(e.renderMask)?null:{cellsAroundViewport:r,renderMask:i}}))},s._createViewToken=function(e,t,r){var i=r.data,n=(0,r.getItem)(i,e);return{index:e,item:n,key:j._keyExtractor(n,e,r),isViewable:t}},s._getNonViewportRenderRegions=function(e){if(!s._lastFocusedCellKey||!s._cellRefs[s._lastFocusedCellKey])return[];var t=s._cellRefs[s._lastFocusedCellKey].props.index,r=e.getItemCount(e.data);if(t>=r||j._getItemKey(e,t)!==s._lastFocusedCellKey)return[];for(var i=t,n=0,o=i-1;o>=0&&n<s._scrollMetrics.visibleLength;o--)i--,n+=s._listMetrics.getCellMetricsApprox(o,e).length;for(var l=t,c=0,u=l+1;u<r&&c<s._scrollMetrics.visibleLength;u++)l++,c+=s._listMetrics.getCellMetricsApprox(u,e).length;return[{first:i,last:l}]},s._checkProps(e),s._fillRateHelper=new y.default(s._listMetrics),s._updateCellsToRenderBatcher=new h.default(s._updateCellsToRender,null!=(t=s.props.updateCellsBatchingPeriod)?t:50),s.props.viewabilityConfigCallbackPairs)s._viewabilityTuples=s.props.viewabilityConfigCallbackPairs.map((function(e){return{viewabilityHelper:new L.default(e.viewabilityConfig),onViewableItemsChanged:e.onViewableItemsChanged}}));else{var l=s.props,c=l.onViewableItemsChanged,f=l.viewabilityConfig;c&&s._viewabilityTuples.push({viewabilityHelper:new L.default(f),onViewableItemsChanged:c})}var _=j._initialRenderRegion(e),S=null!=(r=null==(n=s.props.maintainVisibleContentPosition)?void 0:n.minIndexForVisible)?r:0;return s.state={cellsAroundViewport:_,renderMask:j._createRenderMask(e,_),firstVisibleItemKey:s.props.getItemCount(s.props.data)>S?j._getItemKey(s.props,S):null,pendingScrollUpdateCount:null!=s.props.initialScrollIndex&&s.props.initialScrollIndex>0?1:0},s}return(0,n.default)(j,[{key:"scrollToEnd",value:function(e){var t=!e||e.animated,r=this.props.getItemCount(this.props.data)-1;if(!(r<0)){var i=this._listMetrics.getCellMetricsApprox(r,this.props),n=Math.max(0,i.offset+i.length+this._footerLength-this._scrollMetrics.visibleLength);this.scrollToOffset({animated:t,offset:n})}}},{key:"scrollToIndex",value:function(e){var t=this.props,r=t.data,i=t.getItemCount,n=t.getItemLayout,o=t.onScrollToIndexFailed,s=e.animated,l=e.index,c=e.viewOffset,u=e.viewPosition;if((0,w.default)(l>=0,`scrollToIndex out of range: requested index ${l} but minimum is 0`),(0,w.default)(i(r)>=1,`scrollToIndex out of range: item length ${i(r)} but minimum is 1`),(0,w.default)(l<i(r),`scrollToIndex out of range: requested index ${l} is out of 0 to ${i(r)-1}`),!n&&l>this._listMetrics.getHighestMeasuredCellIndex())return(0,w.default)(!!o,"scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, otherwise there is no way to know the location of offscreen indices or handle failures."),void o({averageItemLength:this._listMetrics.getAverageCellLength(),highestMeasuredFrameIndex:this._listMetrics.getHighestMeasuredCellIndex(),index:l});var h=this._listMetrics.getCellMetricsApprox(Math.floor(l),this.props),f=Math.max(0,this._listMetrics.getCellOffsetApprox(l,this.props)-(u||0)*(this._scrollMetrics.visibleLength-h.length))-(c||0);this.scrollToOffset({offset:f,animated:s})}},{key:"scrollToItem",value:function(e){for(var t=e.item,r=this.props,i=r.data,n=r.getItem,o=(0,r.getItemCount)(i),s=0;s<o;s++)if(n(i,s)===t){this.scrollToIndex(E(E({},e),{},{index:s}));break}}},{key:"scrollToOffset",value:function(e){var t=e.animated,r=e.offset,i=this._scrollRef;if(null!=i)if(null!=i.scrollTo){var n=this._orientation(),o=n.horizontal,s=n.rtl;o&&s&&!this._listMetrics.hasContentLength()?console.warn('scrollToOffset may not be called in RTL before content is laid out'):i.scrollTo(E({animated:t},this._scrollToParamsFromOffset(r)))}else console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo.")}},{key:"_scrollToParamsFromOffset",value:function(e){var t=this._orientation(),r=t.horizontal,i=t.rtl;if(r&&i){var n=this._listMetrics.cartesianOffset(e+this._scrollMetrics.visibleLength);return r?{x:n}:{y:n}}return r?{x:e}:{y:e}}},{key:"recordInteraction",value:function(){this._nestedChildLists.forEach((function(e){e.recordInteraction()})),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),this._updateViewableItems(this.props,this.state.cellsAroundViewport)}},{key:"flashScrollIndicators",value:function(){null!=this._scrollRef&&this._scrollRef.flashScrollIndicators()}},{key:"getScrollResponder",value:function(){if(this._scrollRef&&this._scrollRef.getScrollResponder)return this._scrollRef.getScrollResponder()}},{key:"getScrollableNode",value:function(){return this._scrollRef&&this._scrollRef.getScrollableNode?this._scrollRef.getScrollableNode():(0,u.findNodeHandle)(this._scrollRef)}},{key:"getScrollRef",value:function(){return this._scrollRef&&this._scrollRef.getScrollRef?this._scrollRef.getScrollRef():this._scrollRef}},{key:"setNativeProps",value:function(e){this._scrollRef&&this._scrollRef.setNativeProps(e)}},{key:"_getCellKey",value:function(){var e;return(null==(e=this.context)?void 0:e.cellKey)||'rootList'}},{key:"hasMore",value:function(){return this._hasMore}},{key:"_checkProps",value:function(e){var t=e.onScroll,r=e.windowSize,i=e.getItemCount,n=e.data,o=e.initialScrollIndex;(0,w.default)(!t||!t.__isNative,"Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent to support native onScroll events with useNativeDriver"),(0,w.default)((0,k.windowSizeOrDefault)(r)>0,'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.'),(0,w.default)(i,'VirtualizedList: The "getItemCount" prop must be provided');var s=i(n);null==o||this._hasTriggeredInitialScrollToIndex||!(o<0||s>0&&o>=s)||this._hasWarned.initialScrollIndex||(console.warn(`initialScrollIndex "${o}" is not valid (list has ${s} items)`),this._hasWarned.initialScrollIndex=!0)}},{key:"_adjustCellsAroundViewport",value:function(e,t,r){var i,n=e.data,o=e.getItemCount,s=(0,k.onEndReachedThresholdOrDefault)(e.onEndReachedThreshold),l=this._scrollMetrics,c=l.offset,u=l.visibleLength,h=this._listMetrics.getContentLength(),f=h-u-c;if(u<=0||h<=0)return t.last>=o(n)?j._constrainToItemCount(t,e):t;if(e.disableVirtualization){var p=f<s*u?(0,k.maxToRenderPerBatchOrDefault)(e.maxToRenderPerBatch):0;i={first:0,last:Math.min(t.last+p,o(n)-1)}}else{if(r>0)return t.last>=o(n)?j._constrainToItemCount(t,e):t;i=(0,I.computeWindowedRenderLimits)(e,(0,k.maxToRenderPerBatchOrDefault)(e.maxToRenderPerBatch),(0,k.windowSizeOrDefault)(e.windowSize),t,this._listMetrics,this._scrollMetrics),(0,w.default)(i.last<o(n),'computeWindowedRenderLimits() should return range in-bounds')}if(this._nestedChildLists.size()>0){var _=this._findFirstChildWithMore(i.first,i.last);i.last=null!=_?_:i.last}return i}},{key:"_findFirstChildWithMore",value:function(e,t){for(var r=e;r<=t;r++){var i=this._indicesToKeys.get(r);if(null!=i&&this._nestedChildLists.anyInCell(i,(function(e){return e.hasMore()})))return r}return null}},{key:"componentDidMount",value:function(){this._isNestedWithSameOrientation()&&this.context.registerAsNestedChild({ref:this,cellKey:this.context.cellKey})}},{key:"componentWillUnmount",value:function(){this._isNestedWithSameOrientation()&&this.context.unregisterAsNestedChild({ref:this}),this._updateCellsToRenderBatcher.dispose({abort:!0}),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.dispose()})),this._fillRateHelper.deactivateAndFlush()}},{key:"_pushCells",value:function(e,t,r,i,n,o){var s,l=this,c=this.props,u=c.CellRendererComponent,h=c.ItemSeparatorComponent,f=c.ListHeaderComponent,p=c.ListItemComponent,_=c.data,v=c.debug,y=c.getItem,C=c.getItemCount,S=c.getItemLayout,L=c.horizontal,M=c.renderItem,I=f?1:0,w=C(_)-1;n=Math.min(w,n);for(var R=function(){var i=y(_,x),n=j._keyExtractor(i,x,l.props);l._indicesToKeys.set(x,n),r.has(x+I)&&t.push(e.length);var c=null==S||v||l._fillRateHelper.enabled();e.push((0,O.jsx)(b.default,E({CellRendererComponent:u,ItemSeparatorComponent:x<w?h:void 0,ListItemComponent:p,cellKey:n,horizontal:L,index:x,inversionStyle:o,item:i,prevCellKey:s,onUpdateSeparators:l._onUpdateSeparators,onCellFocusCapture:function(e){return l._onCellFocusCapture(n)},onUnmount:l._onCellUnmount,ref:function(e){l._cellRefs[n]=e},renderItem:M},c&&{onCellLayout:l._onCellLayout}),n)),s=n},x=i;x<=n;x++)R()}},{key:"_isNestedWithSameOrientation",value:function(){var e=this.context;return!(!e||!!e.horizontal!==(0,k.horizontalOrDefault)(this.props.horizontal))}},{key:"render",value:function(){var e,t=this;this._checkProps(this.props);var i=this.props,n=i.ListEmptyComponent,o=i.ListFooterComponent,s=i.ListHeaderComponent,l=this.props,c=l.data,h=l.horizontal,p=this.props.inverted?(0,k.horizontalOrDefault)(this.props.horizontal)?K.horizontallyInverted:K.verticallyInverted:null,_=[],v=new Set(this.props.stickyHeaderIndices),y=[];if(s){v.has(0)&&y.push(0);var C=x.isValidElement(s)?s:(0,O.jsx)(s,{});_.push((0,O.jsx)(M.VirtualizedListCellContextProvider,{cellKey:this._getCellKey()+'-header',children:(0,O.jsx)(u.View,{collapsable:!1,onLayout:this._onLayoutHeader,style:u.StyleSheet.compose(p,this.props.ListHeaderComponentStyle),children:C})},"$header"))}var S=this.props.getItemCount(c);if(0===S&&n){var L=x.isValidElement(n)?n:(0,O.jsx)(n,{});_.push((0,O.jsx)(M.VirtualizedListCellContextProvider,{cellKey:this._getCellKey()+'-empty',children:x.cloneElement(L,{onLayout:function(e){t._onLayoutEmpty(e),L.props.onLayout&&L.props.onLayout(e)},style:u.StyleSheet.compose(p,L.props.style)})},"$empty"))}if(S>0){z=!1,F='';var b=this._getSpacerKey(!h),I=this.state.renderMask.enumerateRegions(),w=A(I,(function(e){return e.isSpacer}));for(var R of I)if(R.isSpacer){if(this.props.disableVirtualization)continue;var T=R===w&&!this.props.getItemLayout?(0,f.default)(R.first-1,R.last,this._listMetrics.getHighestMeasuredCellIndex()):R.last,V=this._listMetrics.getCellMetricsApprox(R.first,this.props),P=this._listMetrics.getCellMetricsApprox(T,this.props),D=P.offset+P.length-V.offset;_.push((0,O.jsx)(u.View,{style:(0,r.default)({},b,D)},`$spacer-${R.first}`))}else this._pushCells(_,y,v,R.first,R.last,p);!this._hasWarned.keys&&z&&(console.warn("VirtualizedList: missing keys for items, make sure to specify a key or id property on each item or provide a custom keyExtractor.",F),this._hasWarned.keys=!0)}if(o){var j=x.isValidElement(o)?o:(0,O.jsx)(o,{});_.push((0,O.jsx)(M.VirtualizedListCellContextProvider,{cellKey:this._getFooterCellKey(),children:(0,O.jsx)(u.View,{onLayout:this._onLayoutFooter,style:u.StyleSheet.compose(p,this.props.ListFooterComponentStyle),children:j})},"$footer"))}var B=E(E({},this.props),{},{onContentSizeChange:this._onContentSizeChange,onLayout:this._onLayout,onScroll:this._onScroll,onScrollBeginDrag:this._onScrollBeginDrag,onScrollEndDrag:this._onScrollEndDrag,onMomentumScrollBegin:this._onMomentumScrollBegin,onMomentumScrollEnd:this._onMomentumScrollEnd,scrollEventThrottle:null!=(e=this.props.scrollEventThrottle)?e:1e-4,invertStickyHeaders:void 0!==this.props.invertStickyHeaders?this.props.invertStickyHeaders:this.props.inverted,stickyHeaderIndices:y,style:p?[p,this.props.style]:this.props.style,isInvertedVirtualizedList:this.props.inverted,maintainVisibleContentPosition:null!=this.props.maintainVisibleContentPosition?E(E({},this.props.maintainVisibleContentPosition),{},{minIndexForVisible:this.props.maintainVisibleContentPosition.minIndexForVisible+(this.props.ListHeaderComponent?1:0)}):void 0});this._hasMore=this.state.cellsAroundViewport.last<S-1;var H=(0,O.jsx)(M.VirtualizedListContextProvider,{value:{cellKey:null,getScrollMetrics:this._getScrollMetrics,horizontal:(0,k.horizontalOrDefault)(this.props.horizontal),getOutermostParentListRef:this._getOutermostParentListRef,registerAsNestedChild:this._registerAsNestedChild,unregisterAsNestedChild:this._unregisterAsNestedChild},children:x.cloneElement((this.props.renderScrollComponent||this._defaultRenderScrollComponent)(B),{ref:this._captureScrollRef},_)});return this.props.debug?(0,O.jsxs)(u.View,{style:K.debug,children:[H,this._renderDebugOverlay()]}):H}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.data,i=t.extraData;r===e.data&&i===e.extraData||this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.resetViewableIndices()}));var n=this._hiPriInProgress;this._scheduleCellsToRenderUpdate(),n&&(this._hiPriInProgress=!1)}},{key:"_computeBlankness",value:function(){this._fillRateHelper.computeBlankness(this.props,this.state.cellsAroundViewport,this._scrollMetrics)}},{key:"_onCellFocusCapture",value:function(e){this._lastFocusedCellKey=e,this._updateCellsToRender()}},{key:"_triggerRemeasureForChildListsInCell",value:function(e){this._nestedChildLists.forEachInCell(e,(function(e){e.measureLayoutRelativeToContainingList()}))}},{key:"measureLayoutRelativeToContainingList",value:function(){var e=this;try{if(!this._scrollRef)return;this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(),(function(t,r,i,n){e._offsetFromParentVirtualizedList=e._selectOffset({x:t,y:r}),e._listMetrics.notifyListContentLayout({layout:{width:i,height:n},orientation:e._orientation()});var o=e._convertParentScrollMetrics(e.context.getScrollMetrics());(e._scrollMetrics.visibleLength!==o.visibleLength||e._scrollMetrics.offset!==o.offset)&&(e._scrollMetrics.visibleLength=o.visibleLength,e._scrollMetrics.offset=o.offset,e._nestedChildLists.forEach((function(e){e.measureLayoutRelativeToContainingList()})))}),(function(e){console.warn("VirtualizedList: Encountered an error while measuring a list's offset from its containing VirtualizedList.")}))}catch(e){console.warn('measureLayoutRelativeToContainingList threw an error',e.stack)}}},{key:"_getFooterCellKey",value:function(){return this._getCellKey()+'-footer'}},{key:"_renderDebugOverlay",value:function(){for(var e=this._scrollMetrics.visibleLength/(this._listMetrics.getContentLength()||1),t=[],r=this.props.getItemCount(this.props.data),i=0;i<r;i++){var n=this._listMetrics.getCellMetricsApprox(i,this.props);n.isMounted&&t.push(n)}var o=this._listMetrics.getCellMetricsApprox(this.state.cellsAroundViewport.first,this.props).offset,s=this._listMetrics.getCellMetricsApprox(this.state.cellsAroundViewport.last,this.props),l=s.offset+s.length-o,c=this._scrollMetrics.offset,h=this._scrollMetrics.visibleLength;return(0,O.jsxs)(u.View,{style:[K.debugOverlayBase,K.debugOverlay],children:[t.map((function(t,r){return(0,O.jsx)(u.View,{style:[K.debugOverlayBase,K.debugOverlayFrame,{top:t.offset*e,height:t.length*e}]},'f'+r)})),(0,O.jsx)(u.View,{style:[K.debugOverlayBase,K.debugOverlayFrameLast,{top:o*e,height:l*e}]}),(0,O.jsx)(u.View,{style:[K.debugOverlayBase,K.debugOverlayFrameVis,{top:c*e,height:h*e}]})]})}},{key:"_selectLength",value:function(e){return(0,k.horizontalOrDefault)(this.props.horizontal)?e.width:e.height}},{key:"_selectOffset",value:function(e){var t=e.x,r=e.y;return this._orientation().horizontal?t:r}},{key:"_orientation",value:function(){return{horizontal:(0,k.horizontalOrDefault)(this.props.horizontal),rtl:u.I18nManager.isRTL}}},{key:"_maybeCallOnEdgeReached",value:function(){var e=this.props,t=e.data,r=e.getItemCount,i=e.onStartReached,n=e.onStartReachedThreshold,o=e.onEndReached,s=e.onEndReachedThreshold;if(!(this.state.pendingScrollUpdateCount>0)){var l=this._scrollMetrics,c=l.visibleLength,u=l.offset,h=u,f=this._listMetrics.getContentLength()-c-u;h<.001&&(h=0),f<.001&&(f=0);var p=h<=(null!=n?n*c:2),_=f<=(null!=s?s*c:2);o&&this.state.cellsAroundViewport.last===r(t)-1&&_&&this._listMetrics.getContentLength()!==this._sentEndForContentLength?(this._sentEndForContentLength=this._listMetrics.getContentLength(),o({distanceFromEnd:f})):null!=i&&0===this.state.cellsAroundViewport.first&&p&&this._listMetrics.getContentLength()!==this._sentStartForContentLength?(this._sentStartForContentLength=this._listMetrics.getContentLength(),i({distanceFromStart:h})):(this._sentStartForContentLength=p?this._sentStartForContentLength:0,this._sentEndForContentLength=_?this._sentEndForContentLength:0)}}},{key:"_maybeScrollToInitialScrollIndex",value:function(e,t){e>0&&t>0&&null!=this.props.initialScrollIndex&&this.props.initialScrollIndex>0&&!this._hasTriggeredInitialScrollToIndex&&(null==this.props.contentOffset&&(this.props.initialScrollIndex<this.props.getItemCount(this.props.data)?this.scrollToIndex({animated:!1,index:(0,R.default)(this.props.initialScrollIndex)}):this.scrollToEnd({animated:!1})),this._hasTriggeredInitialScrollToIndex=!0)}},{key:"_offsetFromScrollEvent",value:function(e){var t=e.nativeEvent,r=t.contentOffset,i=t.contentSize,n=t.layoutMeasurement,o=this._orientation(),s=o.horizontal,l=o.rtl;return s&&l?this._selectLength(i)-(this._selectOffset(r)+this._selectLength(n)):this._selectOffset(r)}},{key:"_scheduleCellsToRenderUpdate",value:function(){if((this._listMetrics.getAverageCellLength()>0||null!=this.props.getItemLayout)&&this._shouldRenderWithPriority()&&!this._hiPriInProgress)return this._hiPriInProgress=!0,this._updateCellsToRenderBatcher.dispose({abort:!0}),void this._updateCellsToRender();this._updateCellsToRenderBatcher.schedule()}},{key:"_shouldRenderWithPriority",value:function(){var e=this.state.cellsAroundViewport,t=e.first,r=e.last,i=this._scrollMetrics,n=i.offset,o=i.visibleLength,s=i.velocity,l=this.props.getItemCount(this.props.data),c=!1,u=(0,k.onStartReachedThresholdOrDefault)(this.props.onStartReachedThreshold),h=(0,k.onEndReachedThresholdOrDefault)(this.props.onEndReachedThreshold);if(t>0){var f=n-this._listMetrics.getCellMetricsApprox(t,this.props).offset;c=f<0||s<-2&&f<D(u,o)}if(!c&&r>=0&&r<l-1){var p=this._listMetrics.getCellMetricsApprox(r,this.props).offset-(n+o);c=p<0||s>2&&p<D(h,o)}return c}},{key:"__getListMetrics",value:function(){return this._listMetrics}},{key:"_updateViewableItems",value:function(e,t){var r=this;this.state.pendingScrollUpdateCount>0||this._viewabilityTuples.forEach((function(i){i.viewabilityHelper.onUpdate(e,r._scrollMetrics.offset,r._scrollMetrics.visibleLength,r._listMetrics,r._createViewToken,i.onViewableItemsChanged,t)}))}}],[{key:"_findItemIndexWithKey",value:function(e,t,r){var i=e.getItemCount(e.data);if(null!=r&&r>=0&&r<i&&j._getItemKey(e,r)===t)return r;for(var n=0;n<i;n++){if(j._getItemKey(e,n)===t)return n}return null}},{key:"_getItemKey",value:function(e,t){var r=e.getItem(e.data,t);return j._keyExtractor(r,t,e)}},{key:"_createRenderMask",value:function(e,r,i){var n=e.getItemCount(e.data);(0,w.default)(r.first>=0&&r.last>=r.first-1&&r.last<n,`Invalid cells around viewport "[${r.first}, ${r.last}]" was passed to VirtualizedList._createRenderMask`);var o=new _.CellRenderMask(n);if(n>0){var s=[r].concat((0,t.default)(null!=i?i:[]));for(var l of s)o.addCells(l);if(null==e.initialScrollIndex||e.initialScrollIndex<=0){var c=j._initialRenderRegion(e);o.addCells(c)}var u=new Set(e.stickyHeaderIndices);j._ensureClosestStickyHeader(e,u,o,r.first)}return o}},{key:"_initialRenderRegion",value:function(e){var t,r=e.getItemCount(e.data),i=Math.max(0,Math.min(r-1,Math.floor(null!=(t=e.initialScrollIndex)?t:0)));return{first:i,last:Math.min(r,i+(0,k.initialNumToRenderOrDefault)(e.initialNumToRender))-1}}},{key:"_ensureClosestStickyHeader",value:function(e,t,r,i){for(var n=e.ListHeaderComponent?1:0,o=i-1;o>=0;o--)if(t.has(o+n)){r.addCells({first:o,last:o});break}}},{key:"getDerivedStateFromProps",value:function(e,t){var r,i,n=e.getItemCount(e.data);if(n===t.renderMask.numCells())return t;var o=null,s=t.firstVisibleItemKey,l=null!=(r=null==(i=e.maintainVisibleContentPosition)?void 0:i.minIndexForVisible)?r:0,c=e.getItemCount(e.data)>l?j._getItemKey(e,l):null;if(null!=e.maintainVisibleContentPosition&&null!=s&&null!=c)if(c!==s){var u=n-t.renderMask.numCells()+l,h=j._findItemIndexWithKey(e,s,u);o=null!=h?h-l:null}else o=null;var f=j._constrainToItemCount(null!=o?{first:t.cellsAroundViewport.first+o,last:t.cellsAroundViewport.last+o}:t.cellsAroundViewport,e);return{cellsAroundViewport:f,renderMask:j._createRenderMask(e,f),firstVisibleItemKey:c,pendingScrollUpdateCount:null!=o?t.pendingScrollUpdateCount+1:t.pendingScrollUpdateCount}}},{key:"_constrainToItemCount",value:function(e,t){var r=t.getItemCount(t.data)-1,i=(0,k.maxToRenderPerBatchOrDefault)(t.maxToRenderPerBatch),n=Math.max(0,r-i);return{first:(0,f.default)(0,e.first,n),last:Math.min(r,e.last)}}},{key:"_keyExtractor",value:function(e,t,r){if(null!=r.keyExtractor)return r.keyExtractor(e,t);var i=(0,I.keyExtractor)(e,t);return i===String(t)&&(z=!0,e.type&&e.type.displayName&&(F=e.type.displayName)),i}}]),j})(S.default);j.contextType=M.VirtualizedListContext;var K=u.StyleSheet.create({verticallyInverted:{transform:[{scale:-1}]},horizontallyInverted:{transform:[{scaleX:-1}]},debug:{flex:1},debugOverlayBase:{position:'absolute',top:0,right:0},debugOverlay:{bottom:0,width:20,borderColor:'blue',borderWidth:1},debugOverlayFrame:{left:0,backgroundColor:'orange'},debugOverlayFrameLast:{left:0,borderColor:'green',borderWidth:2},debugOverlayFrameVis:{left:0,borderColor:'red',borderWidth:2}});m.exports=j}),324,[6,30,40,8,9,19,16,18,15,2,325,326,327,328,329,330,331,332,333,334,335,323,3,89,101,336,219]);
|
|
373
|
+
__d((function(g,r,_i2,a,m,_e,d){var e=r(d[0]),t=e(r(d[1])),i=e(r(d[2])),n=e(r(d[3])),o=e(r(d[4])),s=e(r(d[5])),l=e(r(d[6])),c=e(r(d[7])),u=e(r(d[8])),h=r(d[9]),f=e(r(d[10])),p=e(r(d[11])),_=e(r(d[12])),v=r(d[13]),y=e(r(d[14])),C=e(r(d[15])),S=e(r(d[16])),L=e(r(d[17])),b=e(r(d[18])),M=e(r(d[19])),I=r(d[20]),w=r(d[21]),R=e(r(d[22])),x=e(r(d[23])),k=(function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=V(t);if(i&&i.has(e))return i.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=o?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(n,s,l):n[s]=e[s]}n.default=e,i&&i.set(e,n);return n})(r(d[24])),O=r(d[25]),T=r(d[26]);function V(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(V=function(e){return e?i:t})(e)}function E(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var F=!1,A='';function D(e,t){return e*t/2}var j=(function(e){(0,l.default)(j,e);var L,V,E=(L=j,V=z(),function(){var e,t=(0,u.default)(L);if(V){var i=(0,u.default)(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return(0,c.default)(this,e)});function j(e){var t,i,o,l;if((0,n.default)(this,j),(l=E.call(this,e))._getScrollMetrics=function(){return l._scrollMetrics},l._getOutermostParentListRef=function(){return l._isNestedWithSameOrientation()?l.context.getOutermostParentListRef():(0,s.default)(l)},l._registerAsNestedChild=function(e){l._nestedChildLists.add(e.ref,e.cellKey),l._hasInteracted&&e.ref.recordInteraction()},l._unregisterAsNestedChild=function(e){l._nestedChildLists.remove(e.ref)},l._onUpdateSeparators=function(e,t){e.forEach((function(e){var i=null!=e&&l._cellRefs[e];i&&i.updateSeparatorProps(t)}))},l._getSpacerKey=function(e){return e?'height':'width'},l._cellRefs={},l._listMetrics=new S.default,l._footerLength=0,l._hasTriggeredInitialScrollToIndex=!1,l._hasInteracted=!1,l._hasMore=!1,l._hasWarned={},l._headerLength=0,l._hiPriInProgress=!1,l._indicesToKeys=new Map,l._lastFocusedCellKey=null,l._nestedChildLists=new y.default,l._offsetFromParentVirtualizedList=0,l._pendingViewabilityUpdate=!1,l._prevParentOffset=0,l._scrollMetrics={dOffset:0,dt:10,offset:0,timestamp:0,velocity:0,visibleLength:0,zoomScale:1},l._scrollRef=null,l._sentStartForContentLength=0,l._sentEndForContentLength=0,l._viewabilityTuples=[],l._captureScrollRef=function(e){l._scrollRef=e},l._defaultRenderScrollComponent=function(e){var t,i=e.onRefresh;return l._isNestedWithSameOrientation()?(0,T.jsx)(h.View,P({},e)):i?((0,R.default)('boolean'==typeof e.refreshing,'`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `'+JSON.stringify(null!=(t=e.refreshing)?t:'undefined')+'`'),(0,T.jsx)(h.ScrollView,P(P({},e),{},{refreshControl:null==e.refreshControl?(0,T.jsx)(h.RefreshControl,{refreshing:e.refreshing,onRefresh:i,progressViewOffset:e.progressViewOffset}):e.refreshControl}))):(0,T.jsx)(h.ScrollView,P({},e))},l._onCellLayout=function(e,t,i){l._listMetrics.notifyCellLayout({cellIndex:i,cellKey:t,layout:e.nativeEvent.layout,orientation:l._orientation()})&&l._scheduleCellsToRenderUpdate(),l._triggerRemeasureForChildListsInCell(t),l._computeBlankness(),l._updateViewableItems(l.props,l.state.cellsAroundViewport)},l._onCellUnmount=function(e){delete l._cellRefs[e],l._listMetrics.notifyCellUnmounted(e)},l._onLayout=function(e){l._isNestedWithSameOrientation()?l.measureLayoutRelativeToContainingList():l._scrollMetrics.visibleLength=l._selectLength(e.nativeEvent.layout),l.props.onLayout&&l.props.onLayout(e),l._scheduleCellsToRenderUpdate(),l._maybeCallOnEdgeReached()},l._onLayoutEmpty=function(e){l.props.onLayout&&l.props.onLayout(e)},l._onLayoutFooter=function(e){l._triggerRemeasureForChildListsInCell(l._getFooterCellKey()),l._footerLength=l._selectLength(e.nativeEvent.layout)},l._onLayoutHeader=function(e){l._headerLength=l._selectLength(e.nativeEvent.layout)},l._onContentSizeChange=function(e,t){l._listMetrics.notifyListContentLayout({layout:{width:e,height:t},orientation:l._orientation()}),l._maybeScrollToInitialScrollIndex(e,t),l.props.onContentSizeChange&&l.props.onContentSizeChange(e,t),l._scheduleCellsToRenderUpdate(),l._maybeCallOnEdgeReached()},l._convertParentScrollMetrics=function(e){var t=e.offset-l._offsetFromParentVirtualizedList,i=e.visibleLength,n=t-l._scrollMetrics.offset;return{visibleLength:i,contentLength:l._listMetrics.getContentLength(),offset:t,dOffset:n}},l._onScroll=function(e){l._nestedChildLists.forEach((function(t){t._onScroll(e)})),l.props.onScroll&&l.props.onScroll(e);var t=e.timeStamp,i=l._selectLength(e.nativeEvent.layoutMeasurement),n=l._selectLength(e.nativeEvent.contentSize),o=l._offsetFromScrollEvent(e),s=o-l._scrollMetrics.offset;if(l._isNestedWithSameOrientation()){if(0===l._listMetrics.getContentLength())return;var c=l._convertParentScrollMetrics({visibleLength:i,offset:o});i=c.visibleLength,n=c.contentLength,o=c.offset,s=c.dOffset}var u=l._scrollMetrics.timestamp?Math.max(1,t-l._scrollMetrics.timestamp):1,h=s/u;u>500&&l._scrollMetrics.dt>500&&n>5*i&&!l._hasWarned.perf&&((0,_.default)("VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc.",{dt:u,prevDt:l._scrollMetrics.dt,contentLength:n}),l._hasWarned.perf=!0);var f=e.nativeEvent.zoomScale<0?1:e.nativeEvent.zoomScale;l._scrollMetrics={dt:u,dOffset:s,offset:o,timestamp:t,velocity:h,visibleLength:i,zoomScale:f},l.state.pendingScrollUpdateCount>0&&l.setState((function(e){return{pendingScrollUpdateCount:e.pendingScrollUpdateCount-1}})),l._updateViewableItems(l.props,l.state.cellsAroundViewport),l.props&&(l._maybeCallOnEdgeReached(),0!==h&&l._fillRateHelper.activate(),l._computeBlankness(),l._scheduleCellsToRenderUpdate())},l._onScrollBeginDrag=function(e){l._nestedChildLists.forEach((function(t){t._onScrollBeginDrag(e)})),l._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),l._hasInteracted=!0,l.props.onScrollBeginDrag&&l.props.onScrollBeginDrag(e)},l._onScrollEndDrag=function(e){l._nestedChildLists.forEach((function(t){t._onScrollEndDrag(e)}));var t=e.nativeEvent.velocity;t&&(l._scrollMetrics.velocity=l._selectOffset(t)),l._computeBlankness(),l.props.onScrollEndDrag&&l.props.onScrollEndDrag(e)},l._onMomentumScrollBegin=function(e){l._nestedChildLists.forEach((function(t){t._onMomentumScrollBegin(e)})),l.props.onMomentumScrollBegin&&l.props.onMomentumScrollBegin(e)},l._onMomentumScrollEnd=function(e){l._nestedChildLists.forEach((function(t){t._onMomentumScrollEnd(e)})),l._scrollMetrics.velocity=0,l._computeBlankness(),l.props.onMomentumScrollEnd&&l.props.onMomentumScrollEnd(e)},l._updateCellsToRender=function(){l._updateViewableItems(l.props,l.state.cellsAroundViewport),l.setState((function(e,t){var i=l._adjustCellsAroundViewport(t,e.cellsAroundViewport,e.pendingScrollUpdateCount),n=j._createRenderMask(t,i,l._getNonViewportRenderRegions(t));return i.first===e.cellsAroundViewport.first&&i.last===e.cellsAroundViewport.last&&n.equals(e.renderMask)?null:{cellsAroundViewport:i,renderMask:n}}))},l._createViewToken=function(e,t,i){var n=i.data,o=(0,i.getItem)(n,e);return{index:e,item:o,key:j._keyExtractor(o,e,i),isViewable:t}},l._getNonViewportRenderRegions=function(e){if(!l._lastFocusedCellKey||!l._cellRefs[l._lastFocusedCellKey])return[];var t=l._cellRefs[l._lastFocusedCellKey].props.index,i=e.getItemCount(e.data);if(t>=i||j._getItemKey(e,t)!==l._lastFocusedCellKey)return[];for(var n=t,o=0,s=n-1;s>=0&&o<l._scrollMetrics.visibleLength;s--)n--,o+=l._listMetrics.getCellMetricsApprox(s,e).length;for(var c=t,u=0,h=c+1;h<i&&u<l._scrollMetrics.visibleLength;h++)c++,u+=l._listMetrics.getCellMetricsApprox(h,e).length;return[{first:n,last:c}]},l._checkProps(e),l._fillRateHelper=new C.default(l._listMetrics),l._updateCellsToRenderBatcher=new f.default(l._updateCellsToRender,null!=(t=l.props.updateCellsBatchingPeriod)?t:50),l.props.viewabilityConfigCallbackPairs)l._viewabilityTuples=l.props.viewabilityConfigCallbackPairs.map((function(e){return{viewabilityHelper:new b.default(e.viewabilityConfig),onViewableItemsChanged:e.onViewableItemsChanged}}));else{var c=l.props,u=c.onViewableItemsChanged,p=c.viewabilityConfig;u&&l._viewabilityTuples.push({viewabilityHelper:new b.default(p),onViewableItemsChanged:u})}var v=j._initialRenderRegion(e),L=null!=(i=null==(o=l.props.maintainVisibleContentPosition)?void 0:o.minIndexForVisible)?i:0;return l.state={cellsAroundViewport:v,renderMask:j._createRenderMask(e,v),firstVisibleItemKey:l.props.getItemCount(l.props.data)>L?j._getItemKey(l.props,L):null,pendingScrollUpdateCount:null!=l.props.initialScrollIndex&&l.props.initialScrollIndex>0?1:0},l}return(0,o.default)(j,[{key:"scrollToEnd",value:function(e){var t=!e||e.animated,i=this.props.getItemCount(this.props.data)-1;if(!(i<0)){var n=this._listMetrics.getCellMetricsApprox(i,this.props),o=Math.max(0,n.offset+n.length+this._footerLength-this._scrollMetrics.visibleLength);this.scrollToOffset({animated:t,offset:o})}}},{key:"scrollToIndex",value:function(e){var t=this.props,i=t.data,n=t.getItemCount,o=t.getItemLayout,s=t.onScrollToIndexFailed,l=e.animated,c=e.index,u=e.viewOffset,h=e.viewPosition;if((0,R.default)(c>=0,`scrollToIndex out of range: requested index ${c} but minimum is 0`),(0,R.default)(n(i)>=1,`scrollToIndex out of range: item length ${n(i)} but minimum is 1`),(0,R.default)(c<n(i),`scrollToIndex out of range: requested index ${c} is out of 0 to ${n(i)-1}`),!o&&c>this._listMetrics.getHighestMeasuredCellIndex())return(0,R.default)(!!s,"scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, otherwise there is no way to know the location of offscreen indices or handle failures."),void s({averageItemLength:this._listMetrics.getAverageCellLength(),highestMeasuredFrameIndex:this._listMetrics.getHighestMeasuredCellIndex(),index:c});var f=this._listMetrics.getCellMetricsApprox(Math.floor(c),this.props),p=Math.max(0,this._listMetrics.getCellOffsetApprox(c,this.props)-(h||0)*(this._scrollMetrics.visibleLength-f.length))-(u||0);this.scrollToOffset({offset:p,animated:l})}},{key:"scrollToItem",value:function(e){for(var t=e.item,i=this.props,n=i.data,o=i.getItem,s=(0,i.getItemCount)(n),l=0;l<s;l++)if(o(n,l)===t){this.scrollToIndex(P(P({},e),{},{index:l}));break}}},{key:"scrollToOffset",value:function(e){var t=e.animated,i=e.offset,n=this._scrollRef;if(null!=n)if(null!=n.scrollTo){var o=this._orientation(),s=o.horizontal,l=o.rtl;s&&l&&!this._listMetrics.hasContentLength()?console.warn('scrollToOffset may not be called in RTL before content is laid out'):n.scrollTo(P({animated:t},this._scrollToParamsFromOffset(i)))}else console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo.")}},{key:"_scrollToParamsFromOffset",value:function(e){var t=this._orientation(),i=t.horizontal,n=t.rtl;if(i&&n){var o=this._listMetrics.cartesianOffset(e+this._scrollMetrics.visibleLength);return i?{x:o}:{y:o}}return i?{x:e}:{y:e}}},{key:"recordInteraction",value:function(){this._nestedChildLists.forEach((function(e){e.recordInteraction()})),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),this._updateViewableItems(this.props,this.state.cellsAroundViewport)}},{key:"flashScrollIndicators",value:function(){null!=this._scrollRef&&this._scrollRef.flashScrollIndicators()}},{key:"getScrollResponder",value:function(){if(this._scrollRef&&this._scrollRef.getScrollResponder)return this._scrollRef.getScrollResponder()}},{key:"getScrollableNode",value:function(){return this._scrollRef&&this._scrollRef.getScrollableNode?this._scrollRef.getScrollableNode():(0,h.findNodeHandle)(this._scrollRef)}},{key:"getScrollRef",value:function(){return this._scrollRef&&this._scrollRef.getScrollRef?this._scrollRef.getScrollRef():this._scrollRef}},{key:"setNativeProps",value:function(e){this._scrollRef&&this._scrollRef.setNativeProps(e)}},{key:"_getCellKey",value:function(){var e;return(null==(e=this.context)?void 0:e.cellKey)||'rootList'}},{key:"hasMore",value:function(){return this._hasMore}},{key:"_checkProps",value:function(e){var t=e.onScroll,i=e.windowSize,n=e.getItemCount,o=e.data,s=e.initialScrollIndex;(0,R.default)(!t||!t.__isNative,"Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent to support native onScroll events with useNativeDriver"),(0,R.default)((0,O.windowSizeOrDefault)(i)>0,'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.'),(0,R.default)(n,'VirtualizedList: The "getItemCount" prop must be provided');var l=n(o);null==s||this._hasTriggeredInitialScrollToIndex||!(s<0||l>0&&s>=l)||this._hasWarned.initialScrollIndex||(console.warn(`initialScrollIndex "${s}" is not valid (list has ${l} items)`),this._hasWarned.initialScrollIndex=!0)}},{key:"_adjustCellsAroundViewport",value:function(e,t,i){var n,o=e.data,s=e.getItemCount,l=(0,O.onEndReachedThresholdOrDefault)(e.onEndReachedThreshold),c=this._scrollMetrics,u=c.offset,h=c.visibleLength,f=this._listMetrics.getContentLength(),p=f-h-u;if(h<=0||f<=0)return t.last>=s(o)?j._constrainToItemCount(t,e):t;if(e.disableVirtualization){var _=p<l*h?(0,O.maxToRenderPerBatchOrDefault)(e.maxToRenderPerBatch):0;n={first:0,last:Math.min(t.last+_,s(o)-1)}}else{if(i>0)return t.last>=s(o)?j._constrainToItemCount(t,e):t;n=(0,w.computeWindowedRenderLimits)(e,(0,O.maxToRenderPerBatchOrDefault)(e.maxToRenderPerBatch),(0,O.windowSizeOrDefault)(e.windowSize),t,this._listMetrics,this._scrollMetrics),(0,R.default)(n.last<s(o),'computeWindowedRenderLimits() should return range in-bounds')}if(this._nestedChildLists.size()>0){var v=this._findFirstChildWithMore(n.first,n.last);n.last=null!=v?v:n.last}return n}},{key:"_findFirstChildWithMore",value:function(e,t){for(var i=e;i<=t;i++){var n=this._indicesToKeys.get(i);if(null!=n&&this._nestedChildLists.anyInCell(n,(function(e){return e.hasMore()})))return i}return null}},{key:"componentDidMount",value:function(){this._isNestedWithSameOrientation()&&this.context.registerAsNestedChild({ref:this,cellKey:this.context.cellKey})}},{key:"componentWillUnmount",value:function(){this._isNestedWithSameOrientation()&&this.context.unregisterAsNestedChild({ref:this}),this._updateCellsToRenderBatcher.dispose({abort:!0}),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.dispose()})),this._fillRateHelper.deactivateAndFlush()}},{key:"_pushCells",value:function(e,t,i,n,o,s){var l,c=this,u=this.props,h=u.CellRendererComponent,f=u.ItemSeparatorComponent,p=u.ListHeaderComponent,_=u.ListItemComponent,v=u.data,y=u.debug,C=u.getItem,S=u.getItemCount,L=u.getItemLayout,b=u.horizontal,I=u.renderItem,w=p?1:0,R=S(v)-1;o=Math.min(R,o);for(var x=function(){var n=C(v,k),o=j._keyExtractor(n,k,c.props);c._indicesToKeys.set(k,o),i.has(k+w)&&t.push(e.length);var u=null==L||y||c._fillRateHelper.enabled();e.push((0,T.jsx)(M.default,P({CellRendererComponent:h,ItemSeparatorComponent:k<R?f:void 0,ListItemComponent:_,cellKey:o,horizontal:b,index:k,inversionStyle:s,item:n,prevCellKey:l,onUpdateSeparators:c._onUpdateSeparators,onCellFocusCapture:function(e){return c._onCellFocusCapture(o)},onUnmount:c._onCellUnmount,ref:function(e){c._cellRefs[o]=e},renderItem:I},u&&{onCellLayout:c._onCellLayout}),o)),l=o},k=n;k<=o;k++)x()}},{key:"_isNestedWithSameOrientation",value:function(){var e=this.context;return!(!e||!!e.horizontal!==(0,O.horizontalOrDefault)(this.props.horizontal))}},{key:"render",value:function(){var e,t=this;this._checkProps(this.props);var n=this.props,o=n.ListEmptyComponent,s=n.ListFooterComponent,l=n.ListHeaderComponent,c=this.props,u=c.data,f=c.horizontal,_=this.props.inverted?(0,O.horizontalOrDefault)(this.props.horizontal)?K.horizontallyInverted:K.verticallyInverted:null,v=[],y=new Set(this.props.stickyHeaderIndices),C=[];if(l){y.has(0)&&C.push(0);var S=k.isValidElement(l)?l:(0,T.jsx)(l,{});v.push((0,T.jsx)(I.VirtualizedListCellContextProvider,{cellKey:this._getCellKey()+'-header',children:(0,T.jsx)(h.View,{collapsable:!1,onLayout:this._onLayoutHeader,style:h.StyleSheet.compose(_,this.props.ListHeaderComponentStyle),children:S})},"$header"))}var L=this.props.getItemCount(u);if(0===L&&o){var b=k.isValidElement(o)?o:(0,T.jsx)(o,{});v.push((0,T.jsx)(I.VirtualizedListCellContextProvider,{cellKey:this._getCellKey()+'-empty',children:k.cloneElement(b,{onLayout:function(e){t._onLayoutEmpty(e),b.props.onLayout&&b.props.onLayout(e)},style:h.StyleSheet.compose(_,b.props.style)})},"$empty"))}if(L>0){F=!1,A='';var M=this._getSpacerKey(!f),w=this.state.renderMask.enumerateRegions(),R=w[w.length-1],x=null!=R&&R.isSpacer?R:null;for(var V of w)if(V.isSpacer){if(this.props.disableVirtualization)continue;var E=V===x&&!this.props.getItemLayout?(0,p.default)(V.first-1,V.last,this._listMetrics.getHighestMeasuredCellIndex()):V.last,z=this._listMetrics.getCellMetricsApprox(V.first,this.props),D=this._listMetrics.getCellMetricsApprox(E,this.props),j=D.offset+D.length-z.offset;v.push((0,T.jsx)(h.View,{style:(0,i.default)({},M,j)},`$spacer-${V.first}`))}else this._pushCells(v,C,y,V.first,V.last,_);!this._hasWarned.keys&&F&&(console.warn("VirtualizedList: missing keys for items, make sure to specify a key or id property on each item or provide a custom keyExtractor.",A),this._hasWarned.keys=!0)}if(s){var B=k.isValidElement(s)?s:(0,T.jsx)(s,{});v.push((0,T.jsx)(I.VirtualizedListCellContextProvider,{cellKey:this._getFooterCellKey(),children:(0,T.jsx)(h.View,{onLayout:this._onLayoutFooter,style:h.StyleSheet.compose(_,this.props.ListFooterComponentStyle),children:B})},"$footer"))}var H=P(P({},this.props),{},{onContentSizeChange:this._onContentSizeChange,onLayout:this._onLayout,onScroll:this._onScroll,onScrollBeginDrag:this._onScrollBeginDrag,onScrollEndDrag:this._onScrollEndDrag,onMomentumScrollBegin:this._onMomentumScrollBegin,onMomentumScrollEnd:this._onMomentumScrollEnd,scrollEventThrottle:null!=(e=this.props.scrollEventThrottle)?e:1e-4,invertStickyHeaders:void 0!==this.props.invertStickyHeaders?this.props.invertStickyHeaders:this.props.inverted,stickyHeaderIndices:C,style:_?[_,this.props.style]:this.props.style,isInvertedVirtualizedList:this.props.inverted,maintainVisibleContentPosition:null!=this.props.maintainVisibleContentPosition?P(P({},this.props.maintainVisibleContentPosition),{},{minIndexForVisible:this.props.maintainVisibleContentPosition.minIndexForVisible+(this.props.ListHeaderComponent?1:0)}):void 0});this._hasMore=this.state.cellsAroundViewport.last<L-1;var N=(0,T.jsx)(I.VirtualizedListContextProvider,{value:{cellKey:null,getScrollMetrics:this._getScrollMetrics,horizontal:(0,O.horizontalOrDefault)(this.props.horizontal),getOutermostParentListRef:this._getOutermostParentListRef,registerAsNestedChild:this._registerAsNestedChild,unregisterAsNestedChild:this._unregisterAsNestedChild},children:k.cloneElement((this.props.renderScrollComponent||this._defaultRenderScrollComponent)(H),{ref:this._captureScrollRef},v)});return this.props.debug?(0,T.jsxs)(h.View,{style:K.debug,children:[N,this._renderDebugOverlay()]}):N}},{key:"componentDidUpdate",value:function(e){var t=this.props,i=t.data,n=t.extraData;i===e.data&&n===e.extraData||this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.resetViewableIndices()}));var o=this._hiPriInProgress;this._scheduleCellsToRenderUpdate(),o&&(this._hiPriInProgress=!1)}},{key:"_computeBlankness",value:function(){this._fillRateHelper.computeBlankness(this.props,this.state.cellsAroundViewport,this._scrollMetrics)}},{key:"_onCellFocusCapture",value:function(e){this._lastFocusedCellKey=e,this._updateCellsToRender()}},{key:"_triggerRemeasureForChildListsInCell",value:function(e){this._nestedChildLists.forEachInCell(e,(function(e){e.measureLayoutRelativeToContainingList()}))}},{key:"measureLayoutRelativeToContainingList",value:function(){var e=this;try{if(!this._scrollRef)return;this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(),(function(t,i,n,o){e._offsetFromParentVirtualizedList=e._selectOffset({x:t,y:i}),e._listMetrics.notifyListContentLayout({layout:{width:n,height:o},orientation:e._orientation()});var s=e._convertParentScrollMetrics(e.context.getScrollMetrics());(e._scrollMetrics.visibleLength!==s.visibleLength||e._scrollMetrics.offset!==s.offset)&&(e._scrollMetrics.visibleLength=s.visibleLength,e._scrollMetrics.offset=s.offset,e._nestedChildLists.forEach((function(e){e.measureLayoutRelativeToContainingList()})))}),(function(e){console.warn("VirtualizedList: Encountered an error while measuring a list's offset from its containing VirtualizedList.")}))}catch(e){console.warn('measureLayoutRelativeToContainingList threw an error',e.stack)}}},{key:"_getFooterCellKey",value:function(){return this._getCellKey()+'-footer'}},{key:"_renderDebugOverlay",value:function(){for(var e=this._scrollMetrics.visibleLength/(this._listMetrics.getContentLength()||1),t=[],i=this.props.getItemCount(this.props.data),n=0;n<i;n++){var o=this._listMetrics.getCellMetricsApprox(n,this.props);o.isMounted&&t.push(o)}var s=this._listMetrics.getCellMetricsApprox(this.state.cellsAroundViewport.first,this.props).offset,l=this._listMetrics.getCellMetricsApprox(this.state.cellsAroundViewport.last,this.props),c=l.offset+l.length-s,u=this._scrollMetrics.offset,f=this._scrollMetrics.visibleLength;return(0,T.jsxs)(h.View,{style:[K.debugOverlayBase,K.debugOverlay],children:[t.map((function(t,i){return(0,T.jsx)(h.View,{style:[K.debugOverlayBase,K.debugOverlayFrame,{top:t.offset*e,height:t.length*e}]},'f'+i)})),(0,T.jsx)(h.View,{style:[K.debugOverlayBase,K.debugOverlayFrameLast,{top:s*e,height:c*e}]}),(0,T.jsx)(h.View,{style:[K.debugOverlayBase,K.debugOverlayFrameVis,{top:u*e,height:f*e}]})]})}},{key:"_selectLength",value:function(e){return(0,O.horizontalOrDefault)(this.props.horizontal)?e.width:e.height}},{key:"_selectOffset",value:function(e){var t=e.x,i=e.y;return this._orientation().horizontal?t:i}},{key:"_orientation",value:function(){return{horizontal:(0,O.horizontalOrDefault)(this.props.horizontal),rtl:h.I18nManager.isRTL}}},{key:"_maybeCallOnEdgeReached",value:function(){var e=this.props,t=e.data,i=e.getItemCount,n=e.onStartReached,o=e.onStartReachedThreshold,s=e.onEndReached,l=e.onEndReachedThreshold;if(!(this.state.pendingScrollUpdateCount>0)){var c=this._scrollMetrics,u=c.visibleLength,h=c.offset,f=h,p=this._listMetrics.getContentLength()-u-h;f<.001&&(f=0),p<.001&&(p=0);var _=f<=(null!=o?o*u:2),v=p<=(null!=l?l*u:2);s&&this.state.cellsAroundViewport.last===i(t)-1&&v&&this._listMetrics.getContentLength()!==this._sentEndForContentLength?(this._sentEndForContentLength=this._listMetrics.getContentLength(),s({distanceFromEnd:p})):null!=n&&0===this.state.cellsAroundViewport.first&&_&&this._listMetrics.getContentLength()!==this._sentStartForContentLength?(this._sentStartForContentLength=this._listMetrics.getContentLength(),n({distanceFromStart:f})):(this._sentStartForContentLength=_?this._sentStartForContentLength:0,this._sentEndForContentLength=v?this._sentEndForContentLength:0)}}},{key:"_maybeScrollToInitialScrollIndex",value:function(e,t){e>0&&t>0&&null!=this.props.initialScrollIndex&&this.props.initialScrollIndex>0&&!this._hasTriggeredInitialScrollToIndex&&(null==this.props.contentOffset&&(this.props.initialScrollIndex<this.props.getItemCount(this.props.data)?this.scrollToIndex({animated:!1,index:(0,x.default)(this.props.initialScrollIndex)}):this.scrollToEnd({animated:!1})),this._hasTriggeredInitialScrollToIndex=!0)}},{key:"_offsetFromScrollEvent",value:function(e){var t=e.nativeEvent,i=t.contentOffset,n=t.contentSize,o=t.layoutMeasurement,s=this._orientation(),l=s.horizontal,c=s.rtl;return l&&c?this._selectLength(n)-(this._selectOffset(i)+this._selectLength(o)):this._selectOffset(i)}},{key:"_scheduleCellsToRenderUpdate",value:function(){if((this._listMetrics.getAverageCellLength()>0||null!=this.props.getItemLayout)&&this._shouldRenderWithPriority()&&!this._hiPriInProgress)return this._hiPriInProgress=!0,this._updateCellsToRenderBatcher.dispose({abort:!0}),void this._updateCellsToRender();this._updateCellsToRenderBatcher.schedule()}},{key:"_shouldRenderWithPriority",value:function(){var e=this.state.cellsAroundViewport,t=e.first,i=e.last,n=this._scrollMetrics,o=n.offset,s=n.visibleLength,l=n.velocity,c=this.props.getItemCount(this.props.data),u=!1,h=(0,O.onStartReachedThresholdOrDefault)(this.props.onStartReachedThreshold),f=(0,O.onEndReachedThresholdOrDefault)(this.props.onEndReachedThreshold);if(t>0){var p=o-this._listMetrics.getCellMetricsApprox(t,this.props).offset;u=p<0||l<-2&&p<D(h,s)}if(!u&&i>=0&&i<c-1){var _=this._listMetrics.getCellMetricsApprox(i,this.props).offset-(o+s);u=_<0||l>2&&_<D(f,s)}return u}},{key:"__getListMetrics",value:function(){return this._listMetrics}},{key:"_updateViewableItems",value:function(e,t){var i=this;this.state.pendingScrollUpdateCount>0||this._viewabilityTuples.forEach((function(n){n.viewabilityHelper.onUpdate(e,i._scrollMetrics.offset,i._scrollMetrics.visibleLength,i._listMetrics,i._createViewToken,n.onViewableItemsChanged,t)}))}}],[{key:"_findItemIndexWithKey",value:function(e,t,i){var n=e.getItemCount(e.data);if(null!=i&&i>=0&&i<n&&j._getItemKey(e,i)===t)return i;for(var o=0;o<n;o++){if(j._getItemKey(e,o)===t)return o}return null}},{key:"_getItemKey",value:function(e,t){var i=e.getItem(e.data,t);return j._keyExtractor(i,t,e)}},{key:"_createRenderMask",value:function(e,i,n){var o=e.getItemCount(e.data);(0,R.default)(i.first>=0&&i.last>=i.first-1&&i.last<o,`Invalid cells around viewport "[${i.first}, ${i.last}]" was passed to VirtualizedList._createRenderMask`);var s=new v.CellRenderMask(o);if(o>0){var l=[i].concat((0,t.default)(null!=n?n:[]));for(var c of l)s.addCells(c);if(null==e.initialScrollIndex||e.initialScrollIndex<=0){var u=j._initialRenderRegion(e);s.addCells(u)}var h=new Set(e.stickyHeaderIndices);j._ensureClosestStickyHeader(e,h,s,i.first)}return s}},{key:"_initialRenderRegion",value:function(e){var t,i=e.getItemCount(e.data),n=Math.max(0,Math.min(i-1,Math.floor(null!=(t=e.initialScrollIndex)?t:0)));return{first:n,last:Math.min(i,n+(0,O.initialNumToRenderOrDefault)(e.initialNumToRender))-1}}},{key:"_ensureClosestStickyHeader",value:function(e,t,i,n){for(var o=e.ListHeaderComponent?1:0,s=n-1;s>=0;s--)if(t.has(s+o)){i.addCells({first:s,last:s});break}}},{key:"getDerivedStateFromProps",value:function(e,t){var i,n,o=e.getItemCount(e.data);if(o===t.renderMask.numCells())return t;var s=null,l=t.firstVisibleItemKey,c=null!=(i=null==(n=e.maintainVisibleContentPosition)?void 0:n.minIndexForVisible)?i:0,u=e.getItemCount(e.data)>c?j._getItemKey(e,c):null;if(null!=e.maintainVisibleContentPosition&&null!=l&&null!=u)if(u!==l){var h=o-t.renderMask.numCells()+c,f=j._findItemIndexWithKey(e,l,h);s=null!=f?f-c:null}else s=null;var p=j._constrainToItemCount(null!=s?{first:t.cellsAroundViewport.first+s,last:t.cellsAroundViewport.last+s}:t.cellsAroundViewport,e);return{cellsAroundViewport:p,renderMask:j._createRenderMask(e,p),firstVisibleItemKey:u,pendingScrollUpdateCount:null!=s?t.pendingScrollUpdateCount+1:t.pendingScrollUpdateCount}}},{key:"_constrainToItemCount",value:function(e,t){var i=t.getItemCount(t.data)-1,n=(0,O.maxToRenderPerBatchOrDefault)(t.maxToRenderPerBatch),o=Math.max(0,i-n);return{first:(0,p.default)(0,e.first,o),last:Math.min(i,e.last)}}},{key:"_keyExtractor",value:function(e,t,i){if(null!=i.keyExtractor)return i.keyExtractor(e,t);var n=(0,w.keyExtractor)(e,t);return n===String(t)&&(F=!0,e.type&&e.type.displayName&&(A=e.type.displayName)),n}}]),j})(L.default);j.contextType=I.VirtualizedListContext;var K=h.StyleSheet.create({verticallyInverted:{transform:[{scale:-1}]},horizontallyInverted:{transform:[{scaleX:-1}]},debug:{flex:1},debugOverlayBase:{position:'absolute',top:0,right:0},debugOverlay:{bottom:0,width:20,borderColor:'blue',borderWidth:1},debugOverlayFrame:{left:0,backgroundColor:'orange'},debugOverlayFrameLast:{left:0,borderColor:'green',borderWidth:2},debugOverlayFrameVis:{left:0,borderColor:'red',borderWidth:2}});m.exports=j}),324,[6,30,40,8,9,19,16,18,15,2,325,326,327,328,329,330,331,332,333,334,335,323,3,89,101,336,219]);
|
|
374
374
|
__d((function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),l=r(d[2]).InteractionManager,s=(function(){function s(n,l){t(this,s),this._delay=l,this._callback=n}return n(s,[{key:"dispose",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{abort:!1};this._taskHandle&&(this._taskHandle.cancel(),t.abort||this._callback(),this._taskHandle=null)}},{key:"schedule",value:function(){var t=this;if(!this._taskHandle){var n=setTimeout((function(){t._taskHandle=l.runAfterInteractions((function(){t._taskHandle=null,t._callback()}))}),this._delay);this._taskHandle={cancel:function(){return clearTimeout(n)}}}}}]),s})();m.exports=s}),325,[8,9,2]);
|
|
375
375
|
__d((function(g,r,i,a,m,e,d){'use strict';m.exports=function(t,n,u){return n<t?t:n>u?u:n}}),326,[]);
|
|
376
376
|
__d((function(g,r,i,a,m,e,d){'use strict';m.exports=function(){var n;return(n=console).log.apply(n,arguments)}}),327,[]);
|
|
@@ -485,7 +485,7 @@ __d((function(g,r,i,a,m,_e,d){'use strict';var t=r(d[0]),n=r(d[1]),e=r(d[2]),u=r
|
|
|
485
485
|
__d((function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicColorIOS=void 0;e.DynamicColorIOS=function(o){throw new Error('DynamicColorIOS is not available on this platform.')}}),436,[]);
|
|
486
486
|
__d((function(g,r,_i,a,m,_e,d){var e=r(d[0]),t=e(r(d[1])),n=e(r(d[2])),i=e(r(d[3])),o=e(r(d[4])),c=e(r(d[5])),l=e(r(d[6])),u=e(r(d[7])),s=e(r(d[8])),v=e(r(d[9])),f=r(d[10]),h=r(d[11]),S=r(d[12]),p=e(r(d[13])),y=e(r(d[14])),b=r(d[15]),w=r(d[16]),C=["children"],N=["enabled","freezeOnBlur"],k=["active","activityState","children","isNativeStack","gestureResponseDistance","onGestureCancel"],x=["active","activityState","style","onComponentRef"],B=["enabled","hasTwoStates"];function j(e){var t=R();return function(){var n,i=(0,c.default)(e);if(t){var l=(0,c.default)(this).constructor;n=Reflect.construct(i,arguments,l)}else n=i.apply(this,arguments);return(0,o.default)(this,n)}}function R(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,l.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A=!0,H=A;var D=!1;var V,F,T,I,z,W,E,M,_,G;var U={get NativeScreen(){return V=V||r(d[17]).default},get NativeScreenContainer(){return F=F||r(d[18]).default},get NativeScreenNavigationContainer(){return T=T||this.NativeScreenContainer},get NativeScreenStack(){return I=I||r(d[19]).default},get NativeScreenStackHeaderConfig(){return z=z||r(d[20]).default},get NativeScreenStackHeaderSubview(){return W=W||r(d[21]).default},get NativeSearchBar(){return M=M||r(d[22]).default},get NativeSearchBarCommands(){return _=_||r(d[22]).Commands},get NativeFullWindowOverlay(){return G=G||r(d[23]).default}};function L(e){var t=e.freeze,n=e.children,i=v.default.useState(!1),o=(0,s.default)(i,2),c=o[0],l=o[1];return t!==c&&setImmediate((function(){l(t)})),(0,w.jsx)(h.Freeze,{freeze:!!t&&c,children:n})}var q=(function(e){(0,i.default)(c,e);var o=j(c);function c(){var e;(0,t.default)(this,c);for(var n=arguments.length,i=new Array(n),l=0;l<n;l++)i[l]=arguments[l];return(e=o.call.apply(o,[this].concat(i))).ref=null,e.closing=new f.Animated.Value(0),e.progress=new f.Animated.Value(0),e.goingForward=new f.Animated.Value(0),e.setRef=function(t){e.ref=t,null==e.props.onComponentRef||e.props.onComponentRef(t)},e}return(0,n.default)(c,[{key:"setNativeProps",value:function(e){var t;null==(t=this.ref)||t.setNativeProps(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.enabled,i=void 0===n?H:n,o=t.freezeOnBlur,c=void 0===o?D:o,l=(0,u.default)(t,N),s=l.sheetAllowedDetents,v=void 0===s?'large':s,h=l.sheetLargestUndimmedDetent,S=void 0===h?'all':h,y=l.sheetGrabberVisible,b=void 0!==y&&y,C=l.sheetCornerRadius,B=void 0===C?-1:C,j=l.sheetExpandsWhenScrolledToEdge,R=void 0===j||j;if(i){var O,A,V,F;E=E||f.Animated.createAnimatedComponent(U.NativeScreen);var T=l.active,I=l.activityState,z=l.children,W=l.isNativeStack,M=l.gestureResponseDistance,_=l.onGestureCancel,G=(0,u.default)(l,k);void 0!==T&&void 0===I&&(console.warn('It appears that you are using old version of react-navigation library. Please update @react-navigation/bottom-tabs, @react-navigation/stack and @react-navigation/drawer to version 5.10.0 or above to take full advantage of new functionality added to react-native-screens'),I=0!==T?2:0);return(0,w.jsx)(L,{freeze:c&&0===I,children:(0,w.jsx)(E,P(P({},G),{},{activityState:I,sheetAllowedDetents:v,sheetLargestUndimmedDetent:S,sheetGrabberVisible:b,sheetCornerRadius:B,sheetExpandsWhenScrolledToEdge:R,gestureResponseDistance:{start:null!=(O=null==M?void 0:M.start)?O:-1,end:null!=(A=null==M?void 0:M.end)?A:-1,top:null!=(V=null==M?void 0:M.top)?V:-1,bottom:null!=(F=null==M?void 0:M.bottom)?F:-1},ref:function(t){var n,i;null!=t&&null!=(n=t.viewConfig)&&null!=(i=n.validAttributes)&&i.style&&(t.viewConfig.validAttributes.style=P(P({},t.viewConfig.validAttributes.style),{},{display:!1}),e.setRef(t))},onTransitionProgress:W?f.Animated.event([{nativeEvent:{progress:this.progress,closing:this.closing,goingForward:this.goingForward}}],{useNativeDriver:!0}):void 0,onGestureCancel:null!=_?_:function(){},children:W?(0,w.jsx)(p.default.Provider,{value:{progress:this.progress,closing:this.closing,goingForward:this.goingForward},children:z}):z}))})}var q=l.active,J=l.activityState,K=l.style,Q=(l.onComponentRef,(0,u.default)(l,x));return void 0!==q&&void 0===J&&(J=0!==q?2:0),(0,w.jsx)(f.Animated.View,P({style:[K,{display:0!==J?'flex':'none'}],ref:this.setRef},Q))}}]),c})(v.default.Component);var J=f.StyleSheet.create({headerSubview:{position:'absolute',top:0,right:0,flexDirection:'row',alignItems:'center',justifyContent:'center'}}),K=(function(e){(0,i.default)(c,e);var o=j(c);function c(e){var n;return(0,t.default)(this,c),(n=o.call(this,e)).nativeSearchBarRef=v.default.createRef(),n}return(0,n.default)(c,[{key:"_callMethodWithRef",value:function(e){var t=this.nativeSearchBarRef.current;t?e(t):console.warn('Reference to native search bar component has not been updated yet')}},{key:"blur",value:function(){this._callMethodWithRef((function(e){return U.NativeSearchBarCommands.blur(e)}))}},{key:"focus",value:function(){this._callMethodWithRef((function(e){return U.NativeSearchBarCommands.focus(e)}))}},{key:"toggleCancelButton",value:function(e){this._callMethodWithRef((function(t){return U.NativeSearchBarCommands.toggleCancelButton(t,e)}))}},{key:"clearText",value:function(){this._callMethodWithRef((function(e){return U.NativeSearchBarCommands.clearText(e)}))}},{key:"setText",value:function(e){this._callMethodWithRef((function(t){return U.NativeSearchBarCommands.setText(t,e)}))}},{key:"render",value:function(){return b.isSearchBarAvailableForCurrentPlatform?(0,w.jsx)(U.NativeSearchBar,P(P({},this.props),{},{ref:this.nativeSearchBarRef})):(console.warn('Importing SearchBar is only valid on iOS and Android devices.'),f.View)}}]),c})(v.default.Component),Q=v.default.createContext(q),X=(function(e){(0,i.default)(c,e);var o=j(c);function c(){return(0,t.default)(this,c),o.apply(this,arguments)}return(0,n.default)(c,[{key:"render",value:function(){var e=this.context||q;return(0,w.jsx)(e,P({},this.props))}}]),c})(v.default.Component);X.contextType=Q,m.exports={Screen:X,ScreenContainer:function(e){var t=e.enabled,n=void 0===t?H:t,i=e.hasTwoStates,o=(0,u.default)(e,B);return n?i?(0,w.jsx)(U.NativeScreenNavigationContainer,P({},o)):(0,w.jsx)(U.NativeScreenContainer,P({},o)):(0,w.jsx)(f.View,P({},o))},ScreenContext:Q,ScreenStack:function(e){var t=e.children,n=(0,u.default)(e,C),i=v.default.Children.count(t),o=v.default.Children.map(t,(function(e,t){var n,o,c,l,u=e.props,s=e.key,v=null!=(n=null==u?void 0:u.descriptor)?n:null==u||null==(o=u.descriptors)?void 0:o[s],f=null!=(c=null==v||null==(l=v.options)?void 0:l.freezeOnBlur)?c:D;return(0,w.jsx)(L,{freeze:f&&i-t>1,children:e})}));return(0,w.jsx)(U.NativeScreenStack,P(P({},n),{},{children:o}))},InnerScreen:q,SearchBar:K,FullWindowOverlay:function(e){return console.warn('Importing FullWindowOverlay is only valid on iOS devices.'),(0,w.jsx)(f.View,P({},e))},get NativeScreen(){return U.NativeScreen},get NativeScreenContainer(){return U.NativeScreenContainer},get NativeScreenNavigationContainer(){return U.NativeScreenNavigationContainer},get ScreenStackHeaderConfig(){return U.NativeScreenStackHeaderConfig},get ScreenStackHeaderSubview(){return U.NativeScreenStackHeaderSubview},get SearchBarCommands(){return U.NativeSearchBarCommands},ScreenStackHeaderBackButtonImage:function(e){return(0,w.jsx)(U.NativeScreenStackHeaderSubview,{type:"back",style:J.headerSubview,children:(0,w.jsx)(f.Image,P({resizeMode:"center",fadeDuration:0},e))})},ScreenStackHeaderRightView:function(e){return(0,w.jsx)(U.NativeScreenStackHeaderSubview,P(P({},e),{},{type:"right",style:J.headerSubview}))},ScreenStackHeaderLeftView:function(e){return(0,w.jsx)(U.NativeScreenStackHeaderSubview,P(P({},e),{},{type:"left",style:J.headerSubview}))},ScreenStackHeaderCenterView:function(e){return(0,w.jsx)(U.NativeScreenStackHeaderSubview,P(P({},e),{},{type:"center",style:J.headerSubview}))},ScreenStackHeaderSearchBarView:function(e){return(0,w.jsx)(U.NativeScreenStackHeaderSubview,P(P({},e),{},{type:"searchBar",style:J.headerSubview}))},enableScreens:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];(H=e)&&!f.UIManager.getViewManagerConfig('RNSScreen')&&console.error("Screen native module hasn't been linked. Please check the react-native-screens README for more details")},enableFreeze:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=parseInt(S.version.split('.')[1]);0===t||t>=64||!e||console.warn('react-freeze library requires at least react-native 0.64. Please upgrade your react-native version in order to use this feature.'),D=e},screensEnabled:function(){return H},shouldUseActivityState:!0,useTransitionProgress:y.default,isSearchBarAvailableForCurrentPlatform:b.isSearchBarAvailableForCurrentPlatform,isNewBackTitleImplementation:b.isNewBackTitleImplementation,executeNativeBackPress:b.executeNativeBackPress}}),437,[6,8,9,16,18,15,40,180,51,101,2,438,439,440,441,442,219,443,444,445,446,447,448,449]);
|
|
487
487
|
__d((function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.Freeze=function(o){var u=o.freeze,c=o.children,l=o.placeholder,p=void 0===l?null:l;return(0,n.jsx)(t.Suspense,{fallback:p,children:(0,n.jsx)(f,{freeze:u,children:c})})};var t=(function(t,n){if(!n&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var f=o(n);if(f&&f.has(t))return f.get(t);var u={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in t)if("default"!==l&&Object.prototype.hasOwnProperty.call(t,l)){var p=c?Object.getOwnPropertyDescriptor(t,l):null;p&&(p.get||p.set)?Object.defineProperty(u,l,p):u[l]=t[l]}u.default=t,f&&f.set(t,u);return u})(r(d[0])),n=r(d[1]);function o(t){if("function"!=typeof WeakMap)return null;var n=new WeakMap,f=new WeakMap;return(o=function(t){return t?f:n})(t)}function f(o){var f=o.freeze,u=o.children,c=(0,t.useRef)({}).current;if(f&&!c.promise)throw c.promise=new Promise((function(t){c.resolve=t})),c.promise;if(f)throw c.promise;return c.promise&&(c.resolve(),c.promise=void 0),(0,n.jsx)(t.Fragment,{children:u})}}),438,[101,219]);
|
|
488
|
-
__d((function(e,s,t,r,i,a,c){i.exports={name:"react-native",version:"0.73.
|
|
488
|
+
__d((function(e,s,t,r,i,a,c){i.exports={name:"react-native",version:"0.73.2",description:"A framework for building native apps using React",license:"MIT",repository:{type:"git",url:"https://github.com/facebook/react-native.git",directory:"packages/react-native"},homepage:"https://reactnative.dev/",keywords:["react","react-native","android","ios","mobile","cross-platform","app-framework","mobile-development"],bugs:"https://github.com/facebook/react-native/issues",engines:{node:">=18"},bin:"./cli.js",types:"types","jest-junit":{outputDirectory:"reports/junit",outputName:"js-test-results.xml"},files:["android","build.gradle.kts","cli.js","flow","gradle.properties","gradle/libs.versions.toml","index.js","interface.js","jest-preset.js","jest","Libraries","LICENSE","local-cli","React-Core.podspec","react-native.config.js","React.podspec","React","ReactAndroid","ReactCommon","README.md","rn-get-polyfills.js","scripts/compose-source-maps.js","scripts/find-node-for-xcode.sh","scripts/generate-codegen-artifacts.js","scripts/generate-provider-cli.js","scripts/generate-specs-cli.js","scripts/codegen","!scripts/codegen/__tests__","!scripts/codegen/__test_fixtures__","scripts/hermes/hermes-utils.js","scripts/hermes/prepare-hermes-for-build.js","scripts/ios-configure-glog.sh","scripts/xcode/with-environment.sh","scripts/native_modules.rb","scripts/node-binary.sh","scripts/packager.sh","scripts/packager-reporter.js","scripts/react_native_pods_utils/script_phases.rb","scripts/react_native_pods_utils/script_phases.sh","scripts/react_native_pods.rb","scripts/cocoapods","!scripts/cocoapods/__tests__","scripts/react-native-xcode.sh","sdks/.hermesversion","sdks/hermes-engine","sdks/hermesc","settings.gradle.kts","template.config.js","template","!template/node_modules","!template/package-lock.json","!template/yarn.lock","third-party-podspecs","types"],scripts:{prepack:"cp ../../README.md ."},peerDependencies:{react:"18.2.0"},dependencies:{"@jest/create-cache-key-function":"^29.6.3","@react-native-community/cli":"12.3.0","@react-native-community/cli-platform-android":"12.3.0","@react-native-community/cli-platform-ios":"12.3.0","@react-native/assets-registry":"0.73.1","@react-native/community-cli-plugin":"0.73.12","@react-native/codegen":"0.73.2","@react-native/gradle-plugin":"0.73.4","@react-native/js-polyfills":"0.73.1","@react-native/normalize-colors":"0.73.2","@react-native/virtualized-lists":"0.73.4","abort-controller":"^3.0.0",anser:"^1.4.9","ansi-regex":"^5.0.0","base64-js":"^1.5.1","deprecated-react-native-prop-types":"^5.0.0","event-target-shim":"^5.0.1","flow-enums-runtime":"^0.0.6",invariant:"^2.2.4","jest-environment-node":"^29.6.3","jsc-android":"^250231.0.0","memoize-one":"^5.0.0","metro-runtime":"^0.80.3","metro-source-map":"^0.80.3",mkdirp:"^0.5.1",nullthrows:"^1.1.1","pretty-format":"^26.5.2",promise:"^8.3.0","react-devtools-core":"^4.27.7","react-refresh":"^0.14.0","react-shallow-renderer":"^16.15.0","regenerator-runtime":"^0.13.2",scheduler:"0.24.0-canary-efb381bbf-20230505","stacktrace-parser":"^0.1.10","whatwg-fetch":"^3.0.0",ws:"^6.2.2",yargs:"^17.6.2"},codegenConfig:{libraries:[{name:"FBReactNativeSpec",type:"modules",ios:{},android:{},jsSrcsDir:"Libraries"},{name:"rncore",type:"components",ios:{},android:{},jsSrcsDir:"Libraries"}]}}}),439,[]);
|
|
489
489
|
__d((function(g,r,i,a,m,e,d){function t(n){if("function"!=typeof WeakMap)return null;var o=new WeakMap,u=new WeakMap;return(t=function(t){return t?u:o})(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=(function(n,o){if(!o&&n&&n.__esModule)return n;if(null===n||"object"!=typeof n&&"function"!=typeof n)return{default:n};var u=t(o);if(u&&u.has(n))return u.get(n);var f={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in n)if("default"!==l&&Object.prototype.hasOwnProperty.call(n,l)){var p=c?Object.getOwnPropertyDescriptor(n,l):null;p&&(p.get||p.set)?Object.defineProperty(f,l,p):f[l]=n[l]}f.default=n,u&&u.set(n,f);return f})(r(d[0])).createContext(void 0);e.default=n}),440,[101]);
|
|
490
490
|
__d((function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=n.useContext(o.default);if(void 0===t)throw new Error("Couldn't find values for transition progress. Are you inside a screen in Native Stack?");return t};var n=(function(t,n){if(!n&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var o=u(n);if(o&&o.has(t))return o.get(t);var f={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in t)if("default"!==l&&Object.prototype.hasOwnProperty.call(t,l)){var p=c?Object.getOwnPropertyDescriptor(t,l):null;p&&(p.get||p.set)?Object.defineProperty(f,l,p):f[l]=t[l]}f.default=t,o&&o.set(t,f);return f})(r(d[1])),o=t(r(d[2]));function u(t){if("function"!=typeof WeakMap)return null;var n=new WeakMap,o=new WeakMap;return(u=function(t){return t?o:n})(t)}}),441,[6,101,440]);
|
|
491
491
|
__d((function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.executeNativeBackPress=function(){return t.BackHandler.exitApp(),!0},e.isSearchBarAvailableForCurrentPlatform=e.isNewBackTitleImplementation=void 0;var t=r(d[0]),n=['ios','android'].includes("android");e.isSearchBarAvailableForCurrentPlatform=n;e.isNewBackTitleImplementation=!0}),442,[2]);
|
|
@@ -79,7 +79,8 @@ class DevLauncherController private constructor() :
|
|
|
79
79
|
var canLaunchDevMenuOnStart = false
|
|
80
80
|
|
|
81
81
|
enum class Mode {
|
|
82
|
-
LAUNCHER,
|
|
82
|
+
LAUNCHER,
|
|
83
|
+
APP
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
override var mode = Mode.LAUNCHER
|
|
@@ -93,6 +94,16 @@ class DevLauncherController private constructor() :
|
|
|
93
94
|
return url.host.equals("u.expo.dev") || url.host.equals("staging-u.expo.dev")
|
|
94
95
|
}
|
|
95
96
|
|
|
97
|
+
override fun onRequestRelaunch() {
|
|
98
|
+
val latestLoadedApp = latestLoadedApp ?: return
|
|
99
|
+
coroutineScope.launch {
|
|
100
|
+
loadApp(
|
|
101
|
+
latestLoadedApp,
|
|
102
|
+
appHost.reactInstanceManager.currentReactContext?.currentActivity as? ReactActivity?
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
96
107
|
override suspend fun loadApp(url: Uri, projectUrl: Uri?, mainActivity: ReactActivity?) {
|
|
97
108
|
synchronized(this) {
|
|
98
109
|
if (appIsLoading) {
|
|
@@ -232,7 +243,7 @@ class DevLauncherController private constructor() :
|
|
|
232
243
|
navigateToLauncher()
|
|
233
244
|
}
|
|
234
245
|
}
|
|
235
|
-
return true
|
|
246
|
+
return true
|
|
236
247
|
}
|
|
237
248
|
return handleExternalIntent(it)
|
|
238
249
|
}
|
package/android/src/debug/java/expo/modules/devlauncher/launcher/loaders/DevLauncherAppLoader.kt
CHANGED
|
@@ -109,7 +109,7 @@ abstract class DevLauncherAppLoader(
|
|
|
109
109
|
/*
|
|
110
110
|
We use reflection here to pick up the class that initializes Flipper,
|
|
111
111
|
since Flipper library is not available in release mode
|
|
112
|
-
|
|
112
|
+
*/
|
|
113
113
|
val packageName = appContext.packageName
|
|
114
114
|
val aClass = Class.forName("$packageName.ReactNativeFlipper")
|
|
115
115
|
aClass
|
package/android/src/debug/java/expo/modules/devlauncher/modules/DevLauncherInternalModule.kt
CHANGED
|
@@ -53,7 +53,7 @@ class DevLauncherInternalModule(reactContext: ReactApplicationContext?) :
|
|
|
53
53
|
return mapOf(
|
|
54
54
|
"installationID" to installationIDHelper.getOrCreateInstallationID(reactApplicationContext),
|
|
55
55
|
"isDevice" to !isRunningOnEmulator,
|
|
56
|
-
"updatesConfig" to getUpdatesConfig()
|
|
56
|
+
"updatesConfig" to getUpdatesConfig()
|
|
57
57
|
)
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -87,7 +87,7 @@ class DevLauncherInternalModule(reactContext: ReactApplicationContext?) :
|
|
|
87
87
|
private fun sanitizeUrlString(url: String): Uri {
|
|
88
88
|
var sanitizedUrl = url.trim()
|
|
89
89
|
// If the url does contain a scheme use "http://"
|
|
90
|
-
if(!sanitizedUrl.contains("://")) {
|
|
90
|
+
if (!sanitizedUrl.contains("://")) {
|
|
91
91
|
sanitizedUrl = "http://" + sanitizedUrl
|
|
92
92
|
}
|
|
93
93
|
|
package/android/src/debug/java/expo/modules/devlauncher/react/DevLauncherDevSupportManagerSwapper.kt
CHANGED
|
@@ -104,7 +104,7 @@ class DevLauncherDevSupportManagerSwapper : DevLauncherKoinComponent {
|
|
|
104
104
|
val shakeDetector: ShakeDetector =
|
|
105
105
|
DevSupportManagerBase::class.java.getProtectedFieldValue(
|
|
106
106
|
currentDevSupportManager,
|
|
107
|
-
"mShakeDetector"
|
|
107
|
+
"mShakeDetector"
|
|
108
108
|
)
|
|
109
109
|
shakeDetector.stop()
|
|
110
110
|
} catch (e: Exception) {
|
|
@@ -40,7 +40,7 @@ object DevLauncherPackageDelegate {
|
|
|
40
40
|
DevLauncherModule(reactContext),
|
|
41
41
|
DevLauncherInternalModule(reactContext),
|
|
42
42
|
DevLauncherDevMenuExtension(reactContext),
|
|
43
|
-
DevLauncherAuth(reactContext)
|
|
43
|
+
DevLauncherAuth(reactContext)
|
|
44
44
|
)
|
|
45
45
|
|
|
46
46
|
fun createApplicationLifecycleListeners(context: Context?): List<ApplicationLifecycleListener> =
|
|
@@ -18,7 +18,8 @@ suspend fun UpdatesInterface.loadUpdate(
|
|
|
18
18
|
): UpdatesInterface.Update =
|
|
19
19
|
suspendCoroutine { cont ->
|
|
20
20
|
this.fetchUpdateWithConfiguration(
|
|
21
|
-
configuration,
|
|
21
|
+
configuration,
|
|
22
|
+
context,
|
|
22
23
|
object : UpdatesInterface.UpdateCallback {
|
|
23
24
|
override fun onSuccess(update: UpdatesInterface.Update?) {
|
|
24
25
|
// if the update is null, we previously aborted the fetch, so we've already resumed
|
|
@@ -60,6 +61,6 @@ fun createUpdatesConfigurationWithUrl(url: Uri, projectUrl: Uri, installationID:
|
|
|
60
61
|
"checkOnLaunch" to "ALWAYS",
|
|
61
62
|
"enabled" to true,
|
|
62
63
|
"requestHeaders" to requestHeaders,
|
|
63
|
-
"expectsSignedManifest" to false
|
|
64
|
+
"expectsSignedManifest" to false
|
|
64
65
|
)
|
|
65
66
|
}
|
package/android/src/main/java/expo/modules/devlauncher/launcher/DevLauncherControllerInterface.kt
CHANGED
|
@@ -8,10 +8,12 @@ import com.facebook.react.ReactNativeHost
|
|
|
8
8
|
import com.facebook.react.bridge.ReactContext
|
|
9
9
|
import expo.modules.devlauncher.DevLauncherController
|
|
10
10
|
import expo.modules.manifests.core.Manifest
|
|
11
|
+
import expo.modules.updatesinterface.UpdatesInterfaceCallbacks
|
|
11
12
|
import expo.modules.updatesinterface.UpdatesInterface
|
|
12
13
|
import kotlinx.coroutines.CoroutineScope
|
|
13
14
|
|
|
14
|
-
interface DevLauncherControllerInterface
|
|
15
|
+
interface DevLauncherControllerInterface :
|
|
16
|
+
UpdatesInterfaceCallbacks {
|
|
15
17
|
suspend fun loadApp(url: Uri, mainActivity: ReactActivity? = null)
|
|
16
18
|
suspend fun loadApp(url: Uri, projectUrl: Uri?, mainActivity: ReactActivity? = null)
|
|
17
19
|
fun onAppLoaded(context: ReactContext)
|
package/android/src/main/java/expo/modules/devlauncher/splashscreen/DevLauncherSplashScreen.kt
CHANGED
|
@@ -11,7 +11,7 @@ import expo.modules.devlauncher.R
|
|
|
11
11
|
|
|
12
12
|
@SuppressLint("ViewConstructor")
|
|
13
13
|
class DevLauncherSplashScreen(
|
|
14
|
-
context: Context
|
|
14
|
+
context: Context
|
|
15
15
|
) : RelativeLayout(context) {
|
|
16
16
|
init {
|
|
17
17
|
setBackgroundColor(Color.WHITE)
|
|
@@ -27,7 +27,7 @@ class DevLauncherSplashScreen(
|
|
|
27
27
|
imageView.setImageResource(R.drawable._expodevclientcomponents_assets_logoicon)
|
|
28
28
|
imageView.layoutParams = LayoutParams(
|
|
29
29
|
imageWidthPixels.toInt(),
|
|
30
|
-
LinearLayout.LayoutParams.WRAP_CONTENT
|
|
30
|
+
LinearLayout.LayoutParams.WRAP_CONTENT
|
|
31
31
|
).apply {
|
|
32
32
|
addRule(CENTER_IN_PARENT, TRUE)
|
|
33
33
|
}
|
|
@@ -44,7 +44,7 @@ class DevLauncherDevSupportManager(
|
|
|
44
44
|
redBoxHandler: RedBoxHandler?,
|
|
45
45
|
devBundleDownloadListener: DevBundleDownloadListener?,
|
|
46
46
|
minNumShakes: Int,
|
|
47
|
-
customPackagerCommandHandlers: MutableMap<String, RequestHandler
|
|
47
|
+
customPackagerCommandHandlers: MutableMap<String, RequestHandler>?
|
|
48
48
|
) : DevSupportManagerBase(
|
|
49
49
|
applicationContext,
|
|
50
50
|
reactInstanceManagerHelper,
|
|
@@ -58,6 +58,7 @@ class DevLauncherDevSupportManager(
|
|
|
58
58
|
),
|
|
59
59
|
DevLauncherKoinComponent {
|
|
60
60
|
private val controller: DevLauncherControllerInterface by inject()
|
|
61
|
+
|
|
61
62
|
// copied from https://github.com/facebook/react-native/blob/aa4da248c12e3ba41ecc9f1c547b21c208d9a15f/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java#L65
|
|
62
63
|
private var mIsSamplingProfilerEnabled = false
|
|
63
64
|
|
|
@@ -78,18 +79,25 @@ class DevLauncherDevSupportManager(
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
addCustomDevOption(
|
|
81
|
-
if (mIsSamplingProfilerEnabled)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
if (mIsSamplingProfilerEnabled) {
|
|
83
|
+
applicationContext!!.getString(
|
|
84
|
+
R.string.catalyst_sample_profiler_disable
|
|
85
|
+
)
|
|
86
|
+
} else {
|
|
87
|
+
applicationContext!!.getString(
|
|
88
|
+
R.string.catalyst_sample_profiler_enable
|
|
89
|
+
)
|
|
90
|
+
}
|
|
86
91
|
) { toggleJSSamplingProfiler() }
|
|
87
92
|
if (!devSettings.isDeviceDebugEnabled) {
|
|
88
93
|
// For remote debugging, we open up Chrome running the app in a web worker.
|
|
89
94
|
// Note that this requires async communication, which will not work for Turbo Modules.
|
|
90
95
|
addCustomDevOption(
|
|
91
|
-
if (devSettings.isRemoteJSDebugEnabled)
|
|
92
|
-
|
|
96
|
+
if (devSettings.isRemoteJSDebugEnabled) {
|
|
97
|
+
applicationContext.getString(R.string.catalyst_debug_stop)
|
|
98
|
+
} else {
|
|
99
|
+
applicationContext.getString(R.string.catalyst_debug)
|
|
100
|
+
}
|
|
93
101
|
) {
|
|
94
102
|
devSettings.isRemoteJSDebugEnabled = !devSettings.isRemoteJSDebugEnabled
|
|
95
103
|
handleReloadJS()
|
|
@@ -183,7 +191,8 @@ class DevLauncherDevSupportManager(
|
|
|
183
191
|
val executor = WebsocketJavaScriptExecutor()
|
|
184
192
|
val future = SimpleSettableFuture<Boolean>()
|
|
185
193
|
executor.connect(
|
|
186
|
-
devServerHelper.websocketProxyURL,
|
|
194
|
+
devServerHelper.websocketProxyURL,
|
|
195
|
+
getExecutorConnectCallback(future)
|
|
187
196
|
)
|
|
188
197
|
// TODO(t9349129) Don't use timeout
|
|
189
198
|
try {
|
|
@@ -246,7 +255,9 @@ class DevLauncherDevSupportManager(
|
|
|
246
255
|
} else {
|
|
247
256
|
try {
|
|
248
257
|
val outputPath: String = File.createTempFile(
|
|
249
|
-
"sampling-profiler-trace",
|
|
258
|
+
"sampling-profiler-trace",
|
|
259
|
+
".cpuprofile",
|
|
260
|
+
applicationContext.cacheDir
|
|
250
261
|
)
|
|
251
262
|
.path
|
|
252
263
|
javaScriptExecutorFactory.stopSamplingProfiler(outputPath)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
package expo.modules.devlauncher.rncompatibility
|
|
2
2
|
|
|
3
3
|
import android.content.Context
|
|
4
|
-
import android.os.Handler
|
|
5
|
-
import android.os.Looper
|
|
4
|
+
import android.os.Handler
|
|
5
|
+
import android.os.Looper
|
|
6
6
|
import android.util.Log
|
|
7
7
|
import android.widget.Toast
|
|
8
8
|
import com.facebook.common.logging.FLog
|
|
@@ -48,7 +48,7 @@ class DevLauncherDevSupportManager(
|
|
|
48
48
|
redBoxHandler: RedBoxHandler?,
|
|
49
49
|
devBundleDownloadListener: DevBundleDownloadListener?,
|
|
50
50
|
minNumShakes: Int,
|
|
51
|
-
customPackagerCommandHandlers: MutableMap<String, RequestHandler
|
|
51
|
+
customPackagerCommandHandlers: MutableMap<String, RequestHandler>?
|
|
52
52
|
) : DevSupportManagerBase(
|
|
53
53
|
applicationContext,
|
|
54
54
|
reactInstanceManagerHelper,
|
|
@@ -63,6 +63,7 @@ class DevLauncherDevSupportManager(
|
|
|
63
63
|
),
|
|
64
64
|
DevLauncherKoinComponent {
|
|
65
65
|
private val controller: DevLauncherControllerInterface? by optInject()
|
|
66
|
+
|
|
66
67
|
// copied from https://github.com/facebook/react-native/blob/aa4da248c12e3ba41ecc9f1c547b21c208d9a15f/ReactAndroid/src/main/java/com/facebook/react/devsupport/BridgeDevSupportManager.java#L65
|
|
67
68
|
private var mIsSamplingProfilerEnabled = false
|
|
68
69
|
private val devSettings: DevLauncherInternalSettingsWrapper = DevLauncherInternalSettingsWrapper(getDevSettings())
|
|
@@ -84,11 +85,15 @@ class DevLauncherDevSupportManager(
|
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
addCustomDevOption(
|
|
87
|
-
if (mIsSamplingProfilerEnabled)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
if (mIsSamplingProfilerEnabled) {
|
|
89
|
+
applicationContext!!.getString(
|
|
90
|
+
R.string.catalyst_sample_profiler_disable
|
|
91
|
+
)
|
|
92
|
+
} else {
|
|
93
|
+
applicationContext!!.getString(
|
|
94
|
+
R.string.catalyst_sample_profiler_enable
|
|
95
|
+
)
|
|
96
|
+
}
|
|
92
97
|
) { toggleJSSamplingProfiler() }
|
|
93
98
|
}
|
|
94
99
|
|
|
@@ -179,7 +184,8 @@ class DevLauncherDevSupportManager(
|
|
|
179
184
|
val executor = WebsocketJavaScriptExecutor()
|
|
180
185
|
val future = SimpleSettableFuture<Boolean>()
|
|
181
186
|
executor.connect(
|
|
182
|
-
devServerHelper.websocketProxyURL,
|
|
187
|
+
devServerHelper.websocketProxyURL,
|
|
188
|
+
getExecutorConnectCallback(future)
|
|
183
189
|
)
|
|
184
190
|
// TODO(t9349129) Don't use timeout
|
|
185
191
|
try {
|
|
@@ -247,7 +253,9 @@ class DevLauncherDevSupportManager(
|
|
|
247
253
|
} else {
|
|
248
254
|
try {
|
|
249
255
|
val outputPath: String = File.createTempFile(
|
|
250
|
-
"sampling-profiler-trace",
|
|
256
|
+
"sampling-profiler-trace",
|
|
257
|
+
".cpuprofile",
|
|
258
|
+
applicationContext.cacheDir
|
|
251
259
|
).path
|
|
252
260
|
javaScriptExecutorFactory.stopSamplingProfiler(outputPath)
|
|
253
261
|
handler.post {
|
|
@@ -20,7 +20,8 @@ const val DEV_LAUNCHER_IS_NOT_AVAILABLE = "DevLauncher isn't available in releas
|
|
|
20
20
|
|
|
21
21
|
class DevLauncherController private constructor() : DevLauncherControllerInterface {
|
|
22
22
|
enum class Mode {
|
|
23
|
-
LAUNCHER,
|
|
23
|
+
LAUNCHER,
|
|
24
|
+
APP
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
override val latestLoadedApp: Uri? = null
|
|
@@ -44,6 +45,10 @@ class DevLauncherController private constructor() : DevLauncherControllerInterfa
|
|
|
44
45
|
get() = throw IllegalStateException(DEV_LAUNCHER_IS_NOT_AVAILABLE)
|
|
45
46
|
set(_) {}
|
|
46
47
|
|
|
48
|
+
override fun onRequestRelaunch() {
|
|
49
|
+
throw IllegalStateException(DEV_LAUNCHER_IS_NOT_AVAILABLE)
|
|
50
|
+
}
|
|
51
|
+
|
|
47
52
|
override val coroutineScope: CoroutineScope
|
|
48
53
|
get() = throw IllegalStateException(DEV_LAUNCHER_IS_NOT_AVAILABLE)
|
|
49
54
|
|
package/android/src/with-updates/expo/modules/devlauncher/DevLauncherUpdatesInterfaceDelegate.kt
CHANGED
|
@@ -5,6 +5,6 @@ import expo.modules.updates.UpdatesController
|
|
|
5
5
|
|
|
6
6
|
object DevLauncherUpdatesInterfaceDelegate {
|
|
7
7
|
fun initializeUpdatesInterface(context: Context) {
|
|
8
|
-
DevLauncherController.instance.updatesInterface = UpdatesController.initializeAsDevLauncherWithoutStarting(context)
|
|
8
|
+
DevLauncherController.instance.updatesInterface = UpdatesController.initializeAsDevLauncherWithoutStarting(context, DevLauncherController.instance)
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#import <EXDevLauncher/EXDevLauncherBridgeDelegate.h>
|
|
2
2
|
#import <EXDevLauncher/EXDevLauncherController.h>
|
|
3
|
+
#import <EXDevLauncher/EXDevLauncherRCTBridge.h>
|
|
3
4
|
|
|
4
5
|
#import <React/RCTBundleURLProvider.h>
|
|
5
6
|
#if __has_include(<React_RCTAppDelegate/RCTAppSetupUtils.h>)
|
|
@@ -21,6 +22,10 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
|
|
|
21
22
|
return [[EXDevLauncherController sharedInstance] sourceURLForBridge:bridge];
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
- (RCTBridge *)createBridgeWithDelegate:(id<RCTBridgeDelegate>)delegate launchOptions:(NSDictionary *)launchOptions {
|
|
26
|
+
return [[EXDevLauncherRCTBridge alloc] initWithDelegate:delegate launchOptions:launchOptions];
|
|
27
|
+
}
|
|
28
|
+
|
|
24
29
|
- (RCTRootView *)createRootViewWithModuleName:(NSString *)moduleName launchOptions:(NSDictionary * _Nullable)launchOptions application:(UIApplication *)application{
|
|
25
30
|
BOOL enableTM = NO;
|
|
26
31
|
#if RCT_NEW_ARCH_ENABLED
|
|
@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
31
31
|
|
|
32
32
|
@end
|
|
33
33
|
|
|
34
|
-
@interface EXDevLauncherController : NSObject <RCTBridgeDelegate>
|
|
34
|
+
@interface EXDevLauncherController : NSObject <RCTBridgeDelegate, EXUpdatesExternalInterfaceDelegate>
|
|
35
35
|
|
|
36
36
|
@property (nonatomic, weak) RCTBridge * _Nullable appBridge;
|
|
37
37
|
@property (nonatomic, strong) RCTBridge *launcherBridge;
|
|
@@ -313,8 +313,6 @@
|
|
|
313
313
|
UIView *rootView = [_bridgeDelegate createRootViewWithModuleName:@"main" launchOptions:_launchOptions application:UIApplication.sharedApplication];
|
|
314
314
|
_launcherBridge = _bridgeDelegate.bridge;
|
|
315
315
|
|
|
316
|
-
[self _ensureUserInterfaceStyleIsInSyncWithTraitEnv:rootView];
|
|
317
|
-
|
|
318
316
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
319
317
|
selector:@selector(onAppContentDidAppear)
|
|
320
318
|
name:RCTContentDidAppearNotification
|
|
@@ -801,4 +799,12 @@
|
|
|
801
799
|
[userDefaults setObject:existingSettings forKey:kRCTDevSettingsUserDefaultsKey];
|
|
802
800
|
}
|
|
803
801
|
|
|
802
|
+
- (void)updatesExternalInterfaceDidRequestRelaunch:(id<EXUpdatesExternalInterface> _Nonnull)updatesExternalInterface {
|
|
803
|
+
NSURL * _Nullable appUrl = self.appManifestURLWithFallback;
|
|
804
|
+
if (!appUrl) {
|
|
805
|
+
return;
|
|
806
|
+
}
|
|
807
|
+
[self loadApp:appUrl onSuccess:nil onError:nil];
|
|
808
|
+
}
|
|
809
|
+
|
|
804
810
|
@end
|
|
@@ -48,6 +48,7 @@ public class ExpoDevLauncherReactDelegateHandler: ExpoReactDelegateHandler, RCTB
|
|
|
48
48
|
if let sharedController = UpdatesControllerRegistry.sharedInstance.controller {
|
|
49
49
|
// for some reason the swift compiler and bridge are having issues here
|
|
50
50
|
EXDevLauncherController.sharedInstance().updatesInterface = sharedController
|
|
51
|
+
sharedController.updatesExternalInterfaceDelegate = EXDevLauncherController.sharedInstance()
|
|
51
52
|
}
|
|
52
53
|
return EXDevLauncherDeferredRCTBridge(delegate: self.bridgeDelegateHandler, launchOptions: launchOptions)
|
|
53
54
|
}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
@"ExpoBridgeModule",
|
|
49
49
|
@"EXNativeModulesProxy",
|
|
50
50
|
@"ViewManagerAdapter_",
|
|
51
|
-
@"ExpoModulesCore"
|
|
51
|
+
@"ExpoModulesCore",
|
|
52
52
|
@"EXReactNativeEventEmitter"
|
|
53
53
|
];
|
|
54
54
|
NSArray<Class> *filteredModuleList = [modules filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id _Nullable clazz, NSDictionary<NSString *,id> * _Nullable bindings) {
|
package/ios/main.jsbundle
CHANGED
|
@@ -369,7 +369,7 @@ __d((function(g,r,_i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule"
|
|
|
369
369
|
__d((function(g,r,_i,a,m,_e,d){var e=r(d[0]),t=e(r(d[1])),n=e(r(d[2])),i=e(r(d[3])),o=e(r(d[4])),l=e(r(d[5])),s=e(r(d[6])),u=e(r(d[7])),c=r(d[8]),f=e(r(d[9])),p=r(d[10]),h=["numColumns","columnWrapperStyle","removeClippedSubviews","strictMode"];function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function C(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var b=r(d[11]),w=r(d[12]),_=r(d[13]),I=(r(d[14]),r(d[15])),k=r(d[16]);function R(e){return null!=e?e:1}function P(e){return'number'==typeof Object(e).length}var x=(function(e){(0,l.default)(V,e);var n,v,x=(n=V,v=C(),function(){var e,t=(0,u.default)(n);if(v){var i=(0,u.default)(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return(0,s.default)(this,e)});function V(e){var t;return(0,i.default)(this,V),(t=x.call(this,e))._virtualizedListPairs=[],t._captureRef=function(e){t._listRef=e},t._getItem=function(e,n){var i=R(t.props.numColumns);if(i>1){for(var o=[],l=0;l<i;l++){var s=n*i+l;if(s<e.length){var u=e[s];o.push(u)}}return o}return e[n]},t._getItemCount=function(e){if(null!=e&&P(e)){var n=R(t.props.numColumns);return n>1?Math.ceil(e.length/n):e.length}return 0},t._keyExtractor=function(e,n){var i,o=R(t.props.numColumns),l=null!=(i=t.props.keyExtractor)?i:c.keyExtractor;return o>1?(I(Array.isArray(e),"FlatList: Encountered internal consistency error, expected each item to consist of an array with 1-%s columns; instead, received a single item.",o),e.map((function(e,t){return l(e,n*o+t)})).join(':')):l(e,n)},t._renderer=function(e,t,n,i,o){var l=R(i),s=function(n){return e?(0,p.jsx)(e,y({},n)):t?t(n):null},u=function(e){if(l>1){var t=e.item,i=e.index;return I(Array.isArray(t),'Expected array of items with numColumns > 1'),(0,p.jsx)(b,{style:w.compose(O.row,n),children:t.map((function(t,n){var o=s({item:t,index:i*l+n,separators:e.separators});return null!=o?(0,p.jsx)(k.Fragment,{children:o},n):null}))})}return s(e)};return e?{ListItemComponent:u}:{renderItem:u}},t._memoizedRenderer=(0,f.default)(t._renderer),t._checkProps(t.props),t.props.viewabilityConfigCallbackPairs?t._virtualizedListPairs=t.props.viewabilityConfigCallbackPairs.map((function(e){return{viewabilityConfig:e.viewabilityConfig,onViewableItemsChanged:t._createOnViewableItemsChanged(e.onViewableItemsChanged)}})):t.props.onViewableItemsChanged&&t._virtualizedListPairs.push({viewabilityConfig:t.props.viewabilityConfig,onViewableItemsChanged:t._createOnViewableItemsChanged((function(){var e;return I(t.props.onViewableItemsChanged,"Changing the nullability of onViewableItemsChanged is not supported. Once a function or null is supplied that cannot be changed."),(e=t.props).onViewableItemsChanged.apply(e,arguments)}))}),t}return(0,o.default)(V,[{key:"scrollToEnd",value:function(e){this._listRef&&this._listRef.scrollToEnd(e)}},{key:"scrollToIndex",value:function(e){this._listRef&&this._listRef.scrollToIndex(e)}},{key:"scrollToItem",value:function(e){this._listRef&&this._listRef.scrollToItem(e)}},{key:"scrollToOffset",value:function(e){this._listRef&&this._listRef.scrollToOffset(e)}},{key:"recordInteraction",value:function(){this._listRef&&this._listRef.recordInteraction()}},{key:"flashScrollIndicators",value:function(){this._listRef&&this._listRef.flashScrollIndicators()}},{key:"getScrollResponder",value:function(){if(this._listRef)return this._listRef.getScrollResponder()}},{key:"getNativeScrollRef",value:function(){if(this._listRef)return this._listRef.getScrollRef()}},{key:"getScrollableNode",value:function(){if(this._listRef)return this._listRef.getScrollableNode()}},{key:"setNativeProps",value:function(e){this._listRef&&this._listRef.setNativeProps(e)}},{key:"componentDidUpdate",value:function(e){I(e.numColumns===this.props.numColumns,"Changing numColumns on the fly is not supported. Change the key prop on FlatList when changing the number of columns to force a fresh render of the component."),I(null==e.onViewableItemsChanged==(null==this.props.onViewableItemsChanged),'Changing onViewableItemsChanged nullability on the fly is not supported'),I(!_(e.viewabilityConfig,this.props.viewabilityConfig),'Changing viewabilityConfig on the fly is not supported'),I(e.viewabilityConfigCallbackPairs===this.props.viewabilityConfigCallbackPairs,'Changing viewabilityConfigCallbackPairs on the fly is not supported'),this._checkProps(this.props)}},{key:"_checkProps",value:function(e){var t=e.getItem,n=e.getItemCount,i=e.horizontal,o=e.columnWrapperStyle,l=e.onViewableItemsChanged,s=e.viewabilityConfigCallbackPairs,u=R(this.props.numColumns);I(!t&&!n,'FlatList does not support custom data formats.'),u>1?I(!i,'numColumns does not support horizontal.'):I(!o,'columnWrapperStyle not supported for single column lists'),I(!(l&&s),"FlatList does not support setting both onViewableItemsChanged and viewabilityConfigCallbackPairs.")}},{key:"_pushMultiColumnViewable",value:function(e,t){var n,i=R(this.props.numColumns),o=null!=(n=this.props.keyExtractor)?n:c.keyExtractor;t.item.forEach((function(n,l){I(null!=t.index,'Missing index!');var s=t.index*i+l;e.push(y(y({},t),{},{item:n,key:o(n,s),index:s}))}))}},{key:"_createOnViewableItemsChanged",value:function(e){var t=this;return function(n){var i=R(t.props.numColumns);if(e)if(i>1){var o=[],l=[];n.viewableItems.forEach((function(e){return t._pushMultiColumnViewable(l,e)})),n.changed.forEach((function(e){return t._pushMultiColumnViewable(o,e)})),e({viewableItems:l,changed:o})}else e(n)}}},{key:"render",value:function(){var e,n=this.props,i=n.numColumns,o=n.columnWrapperStyle,l=n.removeClippedSubviews,s=n.strictMode,u=void 0!==s&&s,f=(0,t.default)(n,h),v=u?this._memoizedRenderer:this._renderer;return(0,p.jsx)(c.VirtualizedList,y(y({},f),{},{getItem:this._getItem,getItemCount:this._getItemCount,keyExtractor:this._keyExtractor,ref:this._captureRef,viewabilityConfigCallbackPairs:this._virtualizedListPairs,removeClippedSubviews:(e=l,null!=e&&e)},v(this.props.ListItemComponent,this.props.renderItem,o,i,this.props.extraData)))}}]),V})(k.PureComponent),O=w.create({row:{flexDirection:'row'}});m.exports=x}),320,[6,180,40,8,9,16,18,15,321,337,220,217,222,106,56,3,101]);
|
|
370
370
|
__d((function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);m.exports={keyExtractor:t.keyExtractor,get VirtualizedList(){return r(d[1])},get VirtualizedSectionList(){return r(d[2])},get VirtualizedListContextResetter(){return r(d[3]).VirtualizedListContextResetter},get ViewabilityHelper(){return r(d[4])},get FillRateHelper(){return r(d[5])}}}),321,[322,323,336,334,332,329]);
|
|
371
371
|
__d((function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.computeWindowedRenderLimits=function(t,o,s,u,v,c){var h=t.getItemCount(t.data);if(0===h)return{first:0,last:-1};var M=c.offset,x=c.velocity,b=c.visibleLength,p=c.zoomScale,y=void 0===p?1:p,w=Math.max(0,M),C=w+b,k=(s-1)*b,O=x>1?'after':x<-1?'before':'none',_=Math.max(0,w-.5*k),j=Math.max(0,C+.5*k);if(v.getCellMetricsApprox(h-1,t).offset*y<_)return{first:Math.max(0,h-1-o),last:h-1};var L=f([_,w,C,j],t,v,y),S=(0,n.default)(L,4),A=S[0],E=S[1],I=S[2],R=S[3];A=null==A?0:A,E=null==E?Math.max(0,A):E,R=null==R?h-1:R,I=null==I?Math.min(R,E+o-1):I;var z={first:E,last:I},B=l(u,z);for(;!(E<=A&&I>=R);){var F=B>=o,J=E<=u.first||E>u.last,N=E>A&&(!F||!J),P=I>=u.last||I<u.first,T=I<R&&(!F||!P);if(F&&!N&&!T)break;!N||'after'===O&&T&&P||(J&&B++,E--),!T||'before'===O&&N&&J||(P&&B++,I++)}if(!(I>=E&&E>=0&&I<h&&E>=A&&I<=R&&E<=z.first&&I>=z.last))throw new Error('Bad window calculation '+JSON.stringify({first:E,last:I,itemCount:h,overscanFirst:A,overscanLast:R,visible:z}));return{first:E,last:I}},e.elementsThatOverlapOffsets=f,e.keyExtractor=function(t,n){if('object'==typeof t&&null!=(null==t?void 0:t.key))return t.key;if('object'==typeof t&&null!=(null==t?void 0:t.id))return t.id;return String(n)},e.newRangeCount=l;var n=t(r(d[1]));function f(t,n,f){for(var l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=n.getItemCount(n.data),s=[],u=0;u<t.length;u++)for(var v=t[u],c=0,h=o-1;c<=h;){var M=c+Math.floor((h-c)/2),x=f.getCellMetricsApprox(M,n),b=x.offset*l,p=(x.offset+x.length)*l;if(0===M&&v<b||0!==M&&v<=b)h=M-1;else{if(!(v>p)){s[u]=M;break}c=M+1}}return s}function l(t,n){return n.last-n.first+1-Math.max(0,1+Math.min(n.last,t.last)-Math.max(n.first,t.first))}}),322,[6,51]);
|
|
372
|
-
__d((function(g,_r,_i2,a,m,_e,d){var e=_r(d[0]),t=e(_r(d[1])),r=e(_r(d[2])),i=e(_r(d[3])),n=e(_r(d[4])),o=e(_r(d[5])),s=e(_r(d[6])),l=e(_r(d[7])),c=e(_r(d[8])),u=_r(d[9]),h=e(_r(d[10])),f=e(_r(d[11])),p=e(_r(d[12])),_=_r(d[13]),v=e(_r(d[14])),y=e(_r(d[15])),C=e(_r(d[16])),S=e(_r(d[17])),L=e(_r(d[18])),b=e(_r(d[19])),M=_r(d[20]),I=_r(d[21]),w=e(_r(d[22])),R=e(_r(d[23])),x=(function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=T(t);if(r&&r.has(e))return r.get(e);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=n?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}i.default=e,r&&r.set(e,i);return i})(_r(d[24])),k=_r(d[25]),O=_r(d[26]);function T(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(T=function(e){return e?r:t})(e)}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function E(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?V(Object(i),!0).forEach((function(t){(0,r.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):V(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function P(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var z=!1,F='';function A(e,t){for(var r=e.length-1;r>=0;r--)if(t(e[r]))return e[r];return null}function D(e,t){return e*t/2}var j=(function(e){(0,s.default)(j,e);var S,T,V=(S=j,T=P(),function(){var e,t=(0,c.default)(S);if(T){var r=(0,c.default)(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return(0,l.default)(this,e)});function j(e){var t,r,n,s;if((0,i.default)(this,j),(s=V.call(this,e))._getScrollMetrics=function(){return s._scrollMetrics},s._getOutermostParentListRef=function(){return s._isNestedWithSameOrientation()?s.context.getOutermostParentListRef():(0,o.default)(s)},s._registerAsNestedChild=function(e){s._nestedChildLists.add(e.ref,e.cellKey),s._hasInteracted&&e.ref.recordInteraction()},s._unregisterAsNestedChild=function(e){s._nestedChildLists.remove(e.ref)},s._onUpdateSeparators=function(e,t){e.forEach((function(e){var r=null!=e&&s._cellRefs[e];r&&r.updateSeparatorProps(t)}))},s._getSpacerKey=function(e){return e?'height':'width'},s._cellRefs={},s._listMetrics=new C.default,s._footerLength=0,s._hasTriggeredInitialScrollToIndex=!1,s._hasInteracted=!1,s._hasMore=!1,s._hasWarned={},s._headerLength=0,s._hiPriInProgress=!1,s._indicesToKeys=new Map,s._lastFocusedCellKey=null,s._nestedChildLists=new v.default,s._offsetFromParentVirtualizedList=0,s._pendingViewabilityUpdate=!1,s._prevParentOffset=0,s._scrollMetrics={dOffset:0,dt:10,offset:0,timestamp:0,velocity:0,visibleLength:0,zoomScale:1},s._scrollRef=null,s._sentStartForContentLength=0,s._sentEndForContentLength=0,s._viewabilityTuples=[],s._captureScrollRef=function(e){s._scrollRef=e},s._defaultRenderScrollComponent=function(e){var t,r=e.onRefresh;return s._isNestedWithSameOrientation()?(0,O.jsx)(u.View,E({},e)):r?((0,w.default)('boolean'==typeof e.refreshing,'`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `'+JSON.stringify(null!=(t=e.refreshing)?t:'undefined')+'`'),(0,O.jsx)(u.ScrollView,E(E({},e),{},{refreshControl:null==e.refreshControl?(0,O.jsx)(u.RefreshControl,{refreshing:e.refreshing,onRefresh:r,progressViewOffset:e.progressViewOffset}):e.refreshControl}))):(0,O.jsx)(u.ScrollView,E({},e))},s._onCellLayout=function(e,t,r){s._listMetrics.notifyCellLayout({cellIndex:r,cellKey:t,layout:e.nativeEvent.layout,orientation:s._orientation()})&&s._scheduleCellsToRenderUpdate(),s._triggerRemeasureForChildListsInCell(t),s._computeBlankness(),s._updateViewableItems(s.props,s.state.cellsAroundViewport)},s._onCellUnmount=function(e){delete s._cellRefs[e],s._listMetrics.notifyCellUnmounted(e)},s._onLayout=function(e){s._isNestedWithSameOrientation()?s.measureLayoutRelativeToContainingList():s._scrollMetrics.visibleLength=s._selectLength(e.nativeEvent.layout),s.props.onLayout&&s.props.onLayout(e),s._scheduleCellsToRenderUpdate(),s._maybeCallOnEdgeReached()},s._onLayoutEmpty=function(e){s.props.onLayout&&s.props.onLayout(e)},s._onLayoutFooter=function(e){s._triggerRemeasureForChildListsInCell(s._getFooterCellKey()),s._footerLength=s._selectLength(e.nativeEvent.layout)},s._onLayoutHeader=function(e){s._headerLength=s._selectLength(e.nativeEvent.layout)},s._onContentSizeChange=function(e,t){s._listMetrics.notifyListContentLayout({layout:{width:e,height:t},orientation:s._orientation()}),s._maybeScrollToInitialScrollIndex(e,t),s.props.onContentSizeChange&&s.props.onContentSizeChange(e,t),s._scheduleCellsToRenderUpdate(),s._maybeCallOnEdgeReached()},s._convertParentScrollMetrics=function(e){var t=e.offset-s._offsetFromParentVirtualizedList,r=e.visibleLength,i=t-s._scrollMetrics.offset;return{visibleLength:r,contentLength:s._listMetrics.getContentLength(),offset:t,dOffset:i}},s._onScroll=function(e){s._nestedChildLists.forEach((function(t){t._onScroll(e)})),s.props.onScroll&&s.props.onScroll(e);var t=e.timeStamp,r=s._selectLength(e.nativeEvent.layoutMeasurement),i=s._selectLength(e.nativeEvent.contentSize),n=s._offsetFromScrollEvent(e),o=n-s._scrollMetrics.offset;if(s._isNestedWithSameOrientation()){if(0===s._listMetrics.getContentLength())return;var l=s._convertParentScrollMetrics({visibleLength:r,offset:n});r=l.visibleLength,i=l.contentLength,n=l.offset,o=l.dOffset}var c=s._scrollMetrics.timestamp?Math.max(1,t-s._scrollMetrics.timestamp):1,u=o/c;c>500&&s._scrollMetrics.dt>500&&i>5*r&&!s._hasWarned.perf&&((0,p.default)("VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc.",{dt:c,prevDt:s._scrollMetrics.dt,contentLength:i}),s._hasWarned.perf=!0);var h=e.nativeEvent.zoomScale<0?1:e.nativeEvent.zoomScale;s._scrollMetrics={dt:c,dOffset:o,offset:n,timestamp:t,velocity:u,visibleLength:r,zoomScale:h},s.state.pendingScrollUpdateCount>0&&s.setState((function(e){return{pendingScrollUpdateCount:e.pendingScrollUpdateCount-1}})),s._updateViewableItems(s.props,s.state.cellsAroundViewport),s.props&&(s._maybeCallOnEdgeReached(),0!==u&&s._fillRateHelper.activate(),s._computeBlankness(),s._scheduleCellsToRenderUpdate())},s._onScrollBeginDrag=function(e){s._nestedChildLists.forEach((function(t){t._onScrollBeginDrag(e)})),s._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),s._hasInteracted=!0,s.props.onScrollBeginDrag&&s.props.onScrollBeginDrag(e)},s._onScrollEndDrag=function(e){s._nestedChildLists.forEach((function(t){t._onScrollEndDrag(e)}));var t=e.nativeEvent.velocity;t&&(s._scrollMetrics.velocity=s._selectOffset(t)),s._computeBlankness(),s.props.onScrollEndDrag&&s.props.onScrollEndDrag(e)},s._onMomentumScrollBegin=function(e){s._nestedChildLists.forEach((function(t){t._onMomentumScrollBegin(e)})),s.props.onMomentumScrollBegin&&s.props.onMomentumScrollBegin(e)},s._onMomentumScrollEnd=function(e){s._nestedChildLists.forEach((function(t){t._onMomentumScrollEnd(e)})),s._scrollMetrics.velocity=0,s._computeBlankness(),s.props.onMomentumScrollEnd&&s.props.onMomentumScrollEnd(e)},s._updateCellsToRender=function(){s._updateViewableItems(s.props,s.state.cellsAroundViewport),s.setState((function(e,t){var r=s._adjustCellsAroundViewport(t,e.cellsAroundViewport,e.pendingScrollUpdateCount),i=j._createRenderMask(t,r,s._getNonViewportRenderRegions(t));return r.first===e.cellsAroundViewport.first&&r.last===e.cellsAroundViewport.last&&i.equals(e.renderMask)?null:{cellsAroundViewport:r,renderMask:i}}))},s._createViewToken=function(e,t,r){var i=r.data,n=(0,r.getItem)(i,e);return{index:e,item:n,key:j._keyExtractor(n,e,r),isViewable:t}},s._getNonViewportRenderRegions=function(e){if(!s._lastFocusedCellKey||!s._cellRefs[s._lastFocusedCellKey])return[];var t=s._cellRefs[s._lastFocusedCellKey].props.index,r=e.getItemCount(e.data);if(t>=r||j._getItemKey(e,t)!==s._lastFocusedCellKey)return[];for(var i=t,n=0,o=i-1;o>=0&&n<s._scrollMetrics.visibleLength;o--)i--,n+=s._listMetrics.getCellMetricsApprox(o,e).length;for(var l=t,c=0,u=l+1;u<r&&c<s._scrollMetrics.visibleLength;u++)l++,c+=s._listMetrics.getCellMetricsApprox(u,e).length;return[{first:i,last:l}]},s._checkProps(e),s._fillRateHelper=new y.default(s._listMetrics),s._updateCellsToRenderBatcher=new h.default(s._updateCellsToRender,null!=(t=s.props.updateCellsBatchingPeriod)?t:50),s.props.viewabilityConfigCallbackPairs)s._viewabilityTuples=s.props.viewabilityConfigCallbackPairs.map((function(e){return{viewabilityHelper:new L.default(e.viewabilityConfig),onViewableItemsChanged:e.onViewableItemsChanged}}));else{var l=s.props,c=l.onViewableItemsChanged,f=l.viewabilityConfig;c&&s._viewabilityTuples.push({viewabilityHelper:new L.default(f),onViewableItemsChanged:c})}var _=j._initialRenderRegion(e),S=null!=(r=null==(n=s.props.maintainVisibleContentPosition)?void 0:n.minIndexForVisible)?r:0;return s.state={cellsAroundViewport:_,renderMask:j._createRenderMask(e,_),firstVisibleItemKey:s.props.getItemCount(s.props.data)>S?j._getItemKey(s.props,S):null,pendingScrollUpdateCount:null!=s.props.initialScrollIndex&&s.props.initialScrollIndex>0?1:0},s}return(0,n.default)(j,[{key:"scrollToEnd",value:function(e){var t=!e||e.animated,r=this.props.getItemCount(this.props.data)-1;if(!(r<0)){var i=this._listMetrics.getCellMetricsApprox(r,this.props),n=Math.max(0,i.offset+i.length+this._footerLength-this._scrollMetrics.visibleLength);this.scrollToOffset({animated:t,offset:n})}}},{key:"scrollToIndex",value:function(e){var t=this.props,r=t.data,i=t.getItemCount,n=t.getItemLayout,o=t.onScrollToIndexFailed,s=e.animated,l=e.index,c=e.viewOffset,u=e.viewPosition;if((0,w.default)(l>=0,`scrollToIndex out of range: requested index ${l} but minimum is 0`),(0,w.default)(i(r)>=1,`scrollToIndex out of range: item length ${i(r)} but minimum is 1`),(0,w.default)(l<i(r),`scrollToIndex out of range: requested index ${l} is out of 0 to ${i(r)-1}`),!n&&l>this._listMetrics.getHighestMeasuredCellIndex())return(0,w.default)(!!o,"scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, otherwise there is no way to know the location of offscreen indices or handle failures."),void o({averageItemLength:this._listMetrics.getAverageCellLength(),highestMeasuredFrameIndex:this._listMetrics.getHighestMeasuredCellIndex(),index:l});var h=this._listMetrics.getCellMetricsApprox(Math.floor(l),this.props),f=Math.max(0,this._listMetrics.getCellOffsetApprox(l,this.props)-(u||0)*(this._scrollMetrics.visibleLength-h.length))-(c||0);this.scrollToOffset({offset:f,animated:s})}},{key:"scrollToItem",value:function(e){for(var t=e.item,r=this.props,i=r.data,n=r.getItem,o=(0,r.getItemCount)(i),s=0;s<o;s++)if(n(i,s)===t){this.scrollToIndex(E(E({},e),{},{index:s}));break}}},{key:"scrollToOffset",value:function(e){var t=e.animated,r=e.offset,i=this._scrollRef;if(null!=i)if(null!=i.scrollTo){var n=this._orientation(),o=n.horizontal,s=n.rtl;o&&s&&!this._listMetrics.hasContentLength()?console.warn('scrollToOffset may not be called in RTL before content is laid out'):i.scrollTo(E({animated:t},this._scrollToParamsFromOffset(r)))}else console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo.")}},{key:"_scrollToParamsFromOffset",value:function(e){var t=this._orientation(),r=t.horizontal,i=t.rtl;if(r&&i){var n=this._listMetrics.cartesianOffset(e+this._scrollMetrics.visibleLength);return r?{x:n}:{y:n}}return r?{x:e}:{y:e}}},{key:"recordInteraction",value:function(){this._nestedChildLists.forEach((function(e){e.recordInteraction()})),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),this._updateViewableItems(this.props,this.state.cellsAroundViewport)}},{key:"flashScrollIndicators",value:function(){null!=this._scrollRef&&this._scrollRef.flashScrollIndicators()}},{key:"getScrollResponder",value:function(){if(this._scrollRef&&this._scrollRef.getScrollResponder)return this._scrollRef.getScrollResponder()}},{key:"getScrollableNode",value:function(){return this._scrollRef&&this._scrollRef.getScrollableNode?this._scrollRef.getScrollableNode():(0,u.findNodeHandle)(this._scrollRef)}},{key:"getScrollRef",value:function(){return this._scrollRef&&this._scrollRef.getScrollRef?this._scrollRef.getScrollRef():this._scrollRef}},{key:"setNativeProps",value:function(e){this._scrollRef&&this._scrollRef.setNativeProps(e)}},{key:"_getCellKey",value:function(){var e;return(null==(e=this.context)?void 0:e.cellKey)||'rootList'}},{key:"hasMore",value:function(){return this._hasMore}},{key:"_checkProps",value:function(e){var t=e.onScroll,r=e.windowSize,i=e.getItemCount,n=e.data,o=e.initialScrollIndex;(0,w.default)(!t||!t.__isNative,"Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent to support native onScroll events with useNativeDriver"),(0,w.default)((0,k.windowSizeOrDefault)(r)>0,'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.'),(0,w.default)(i,'VirtualizedList: The "getItemCount" prop must be provided');var s=i(n);null==o||this._hasTriggeredInitialScrollToIndex||!(o<0||s>0&&o>=s)||this._hasWarned.initialScrollIndex||(console.warn(`initialScrollIndex "${o}" is not valid (list has ${s} items)`),this._hasWarned.initialScrollIndex=!0)}},{key:"_adjustCellsAroundViewport",value:function(e,t,r){var i,n=e.data,o=e.getItemCount,s=(0,k.onEndReachedThresholdOrDefault)(e.onEndReachedThreshold),l=this._scrollMetrics,c=l.offset,u=l.visibleLength,h=this._listMetrics.getContentLength(),f=h-u-c;if(u<=0||h<=0)return t.last>=o(n)?j._constrainToItemCount(t,e):t;if(e.disableVirtualization){var p=f<s*u?(0,k.maxToRenderPerBatchOrDefault)(e.maxToRenderPerBatch):0;i={first:0,last:Math.min(t.last+p,o(n)-1)}}else{if(r>0)return t.last>=o(n)?j._constrainToItemCount(t,e):t;i=(0,I.computeWindowedRenderLimits)(e,(0,k.maxToRenderPerBatchOrDefault)(e.maxToRenderPerBatch),(0,k.windowSizeOrDefault)(e.windowSize),t,this._listMetrics,this._scrollMetrics),(0,w.default)(i.last<o(n),'computeWindowedRenderLimits() should return range in-bounds')}if(this._nestedChildLists.size()>0){var _=this._findFirstChildWithMore(i.first,i.last);i.last=null!=_?_:i.last}return i}},{key:"_findFirstChildWithMore",value:function(e,t){for(var r=e;r<=t;r++){var i=this._indicesToKeys.get(r);if(null!=i&&this._nestedChildLists.anyInCell(i,(function(e){return e.hasMore()})))return r}return null}},{key:"componentDidMount",value:function(){this._isNestedWithSameOrientation()&&this.context.registerAsNestedChild({ref:this,cellKey:this.context.cellKey})}},{key:"componentWillUnmount",value:function(){this._isNestedWithSameOrientation()&&this.context.unregisterAsNestedChild({ref:this}),this._updateCellsToRenderBatcher.dispose({abort:!0}),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.dispose()})),this._fillRateHelper.deactivateAndFlush()}},{key:"_pushCells",value:function(e,t,r,i,n,o){var s,l=this,c=this.props,u=c.CellRendererComponent,h=c.ItemSeparatorComponent,f=c.ListHeaderComponent,p=c.ListItemComponent,_=c.data,v=c.debug,y=c.getItem,C=c.getItemCount,S=c.getItemLayout,L=c.horizontal,M=c.renderItem,I=f?1:0,w=C(_)-1;n=Math.min(w,n);for(var R=function(){var i=y(_,x),n=j._keyExtractor(i,x,l.props);l._indicesToKeys.set(x,n),r.has(x+I)&&t.push(e.length);var c=null==S||v||l._fillRateHelper.enabled();e.push((0,O.jsx)(b.default,E({CellRendererComponent:u,ItemSeparatorComponent:x<w?h:void 0,ListItemComponent:p,cellKey:n,horizontal:L,index:x,inversionStyle:o,item:i,prevCellKey:s,onUpdateSeparators:l._onUpdateSeparators,onCellFocusCapture:function(e){return l._onCellFocusCapture(n)},onUnmount:l._onCellUnmount,ref:function(e){l._cellRefs[n]=e},renderItem:M},c&&{onCellLayout:l._onCellLayout}),n)),s=n},x=i;x<=n;x++)R()}},{key:"_isNestedWithSameOrientation",value:function(){var e=this.context;return!(!e||!!e.horizontal!==(0,k.horizontalOrDefault)(this.props.horizontal))}},{key:"render",value:function(){var e,t=this;this._checkProps(this.props);var i=this.props,n=i.ListEmptyComponent,o=i.ListFooterComponent,s=i.ListHeaderComponent,l=this.props,c=l.data,h=l.horizontal,p=this.props.inverted?(0,k.horizontalOrDefault)(this.props.horizontal)?K.horizontallyInverted:K.verticallyInverted:null,_=[],v=new Set(this.props.stickyHeaderIndices),y=[];if(s){v.has(0)&&y.push(0);var C=x.isValidElement(s)?s:(0,O.jsx)(s,{});_.push((0,O.jsx)(M.VirtualizedListCellContextProvider,{cellKey:this._getCellKey()+'-header',children:(0,O.jsx)(u.View,{collapsable:!1,onLayout:this._onLayoutHeader,style:u.StyleSheet.compose(p,this.props.ListHeaderComponentStyle),children:C})},"$header"))}var S=this.props.getItemCount(c);if(0===S&&n){var L=x.isValidElement(n)?n:(0,O.jsx)(n,{});_.push((0,O.jsx)(M.VirtualizedListCellContextProvider,{cellKey:this._getCellKey()+'-empty',children:x.cloneElement(L,{onLayout:function(e){t._onLayoutEmpty(e),L.props.onLayout&&L.props.onLayout(e)},style:u.StyleSheet.compose(p,L.props.style)})},"$empty"))}if(S>0){z=!1,F='';var b=this._getSpacerKey(!h),I=this.state.renderMask.enumerateRegions(),w=A(I,(function(e){return e.isSpacer}));for(var R of I)if(R.isSpacer){if(this.props.disableVirtualization)continue;var T=R===w&&!this.props.getItemLayout?(0,f.default)(R.first-1,R.last,this._listMetrics.getHighestMeasuredCellIndex()):R.last,V=this._listMetrics.getCellMetricsApprox(R.first,this.props),P=this._listMetrics.getCellMetricsApprox(T,this.props),D=P.offset+P.length-V.offset;_.push((0,O.jsx)(u.View,{style:(0,r.default)({},b,D)},`$spacer-${R.first}`))}else this._pushCells(_,y,v,R.first,R.last,p);!this._hasWarned.keys&&z&&(console.warn("VirtualizedList: missing keys for items, make sure to specify a key or id property on each item or provide a custom keyExtractor.",F),this._hasWarned.keys=!0)}if(o){var j=x.isValidElement(o)?o:(0,O.jsx)(o,{});_.push((0,O.jsx)(M.VirtualizedListCellContextProvider,{cellKey:this._getFooterCellKey(),children:(0,O.jsx)(u.View,{onLayout:this._onLayoutFooter,style:u.StyleSheet.compose(p,this.props.ListFooterComponentStyle),children:j})},"$footer"))}var B=E(E({},this.props),{},{onContentSizeChange:this._onContentSizeChange,onLayout:this._onLayout,onScroll:this._onScroll,onScrollBeginDrag:this._onScrollBeginDrag,onScrollEndDrag:this._onScrollEndDrag,onMomentumScrollBegin:this._onMomentumScrollBegin,onMomentumScrollEnd:this._onMomentumScrollEnd,scrollEventThrottle:null!=(e=this.props.scrollEventThrottle)?e:1e-4,invertStickyHeaders:void 0!==this.props.invertStickyHeaders?this.props.invertStickyHeaders:this.props.inverted,stickyHeaderIndices:y,style:p?[p,this.props.style]:this.props.style,isInvertedVirtualizedList:this.props.inverted,maintainVisibleContentPosition:null!=this.props.maintainVisibleContentPosition?E(E({},this.props.maintainVisibleContentPosition),{},{minIndexForVisible:this.props.maintainVisibleContentPosition.minIndexForVisible+(this.props.ListHeaderComponent?1:0)}):void 0});this._hasMore=this.state.cellsAroundViewport.last<S-1;var H=(0,O.jsx)(M.VirtualizedListContextProvider,{value:{cellKey:null,getScrollMetrics:this._getScrollMetrics,horizontal:(0,k.horizontalOrDefault)(this.props.horizontal),getOutermostParentListRef:this._getOutermostParentListRef,registerAsNestedChild:this._registerAsNestedChild,unregisterAsNestedChild:this._unregisterAsNestedChild},children:x.cloneElement((this.props.renderScrollComponent||this._defaultRenderScrollComponent)(B),{ref:this._captureScrollRef},_)});return this.props.debug?(0,O.jsxs)(u.View,{style:K.debug,children:[H,this._renderDebugOverlay()]}):H}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.data,i=t.extraData;r===e.data&&i===e.extraData||this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.resetViewableIndices()}));var n=this._hiPriInProgress;this._scheduleCellsToRenderUpdate(),n&&(this._hiPriInProgress=!1)}},{key:"_computeBlankness",value:function(){this._fillRateHelper.computeBlankness(this.props,this.state.cellsAroundViewport,this._scrollMetrics)}},{key:"_onCellFocusCapture",value:function(e){this._lastFocusedCellKey=e,this._updateCellsToRender()}},{key:"_triggerRemeasureForChildListsInCell",value:function(e){this._nestedChildLists.forEachInCell(e,(function(e){e.measureLayoutRelativeToContainingList()}))}},{key:"measureLayoutRelativeToContainingList",value:function(){var e=this;try{if(!this._scrollRef)return;this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(),(function(t,r,i,n){e._offsetFromParentVirtualizedList=e._selectOffset({x:t,y:r}),e._listMetrics.notifyListContentLayout({layout:{width:i,height:n},orientation:e._orientation()});var o=e._convertParentScrollMetrics(e.context.getScrollMetrics());(e._scrollMetrics.visibleLength!==o.visibleLength||e._scrollMetrics.offset!==o.offset)&&(e._scrollMetrics.visibleLength=o.visibleLength,e._scrollMetrics.offset=o.offset,e._nestedChildLists.forEach((function(e){e.measureLayoutRelativeToContainingList()})))}),(function(e){console.warn("VirtualizedList: Encountered an error while measuring a list's offset from its containing VirtualizedList.")}))}catch(e){console.warn('measureLayoutRelativeToContainingList threw an error',e.stack)}}},{key:"_getFooterCellKey",value:function(){return this._getCellKey()+'-footer'}},{key:"_renderDebugOverlay",value:function(){for(var e=this._scrollMetrics.visibleLength/(this._listMetrics.getContentLength()||1),t=[],r=this.props.getItemCount(this.props.data),i=0;i<r;i++){var n=this._listMetrics.getCellMetricsApprox(i,this.props);n.isMounted&&t.push(n)}var o=this._listMetrics.getCellMetricsApprox(this.state.cellsAroundViewport.first,this.props).offset,s=this._listMetrics.getCellMetricsApprox(this.state.cellsAroundViewport.last,this.props),l=s.offset+s.length-o,c=this._scrollMetrics.offset,h=this._scrollMetrics.visibleLength;return(0,O.jsxs)(u.View,{style:[K.debugOverlayBase,K.debugOverlay],children:[t.map((function(t,r){return(0,O.jsx)(u.View,{style:[K.debugOverlayBase,K.debugOverlayFrame,{top:t.offset*e,height:t.length*e}]},'f'+r)})),(0,O.jsx)(u.View,{style:[K.debugOverlayBase,K.debugOverlayFrameLast,{top:o*e,height:l*e}]}),(0,O.jsx)(u.View,{style:[K.debugOverlayBase,K.debugOverlayFrameVis,{top:c*e,height:h*e}]})]})}},{key:"_selectLength",value:function(e){return(0,k.horizontalOrDefault)(this.props.horizontal)?e.width:e.height}},{key:"_selectOffset",value:function(e){var t=e.x,r=e.y;return this._orientation().horizontal?t:r}},{key:"_orientation",value:function(){return{horizontal:(0,k.horizontalOrDefault)(this.props.horizontal),rtl:u.I18nManager.isRTL}}},{key:"_maybeCallOnEdgeReached",value:function(){var e=this.props,t=e.data,r=e.getItemCount,i=e.onStartReached,n=e.onStartReachedThreshold,o=e.onEndReached,s=e.onEndReachedThreshold;if(!(this.state.pendingScrollUpdateCount>0)){var l=this._scrollMetrics,c=l.visibleLength,u=l.offset,h=u,f=this._listMetrics.getContentLength()-c-u;h<.001&&(h=0),f<.001&&(f=0);var p=h<=(null!=n?n*c:2),_=f<=(null!=s?s*c:2);o&&this.state.cellsAroundViewport.last===r(t)-1&&_&&this._listMetrics.getContentLength()!==this._sentEndForContentLength?(this._sentEndForContentLength=this._listMetrics.getContentLength(),o({distanceFromEnd:f})):null!=i&&0===this.state.cellsAroundViewport.first&&p&&this._listMetrics.getContentLength()!==this._sentStartForContentLength?(this._sentStartForContentLength=this._listMetrics.getContentLength(),i({distanceFromStart:h})):(this._sentStartForContentLength=p?this._sentStartForContentLength:0,this._sentEndForContentLength=_?this._sentEndForContentLength:0)}}},{key:"_maybeScrollToInitialScrollIndex",value:function(e,t){e>0&&t>0&&null!=this.props.initialScrollIndex&&this.props.initialScrollIndex>0&&!this._hasTriggeredInitialScrollToIndex&&(null==this.props.contentOffset&&(this.props.initialScrollIndex<this.props.getItemCount(this.props.data)?this.scrollToIndex({animated:!1,index:(0,R.default)(this.props.initialScrollIndex)}):this.scrollToEnd({animated:!1})),this._hasTriggeredInitialScrollToIndex=!0)}},{key:"_offsetFromScrollEvent",value:function(e){var t=e.nativeEvent,r=t.contentOffset,i=t.contentSize,n=t.layoutMeasurement,o=this._orientation(),s=o.horizontal,l=o.rtl;return s&&l?this._selectLength(i)-(this._selectOffset(r)+this._selectLength(n)):this._selectOffset(r)}},{key:"_scheduleCellsToRenderUpdate",value:function(){if((this._listMetrics.getAverageCellLength()>0||null!=this.props.getItemLayout)&&this._shouldRenderWithPriority()&&!this._hiPriInProgress)return this._hiPriInProgress=!0,this._updateCellsToRenderBatcher.dispose({abort:!0}),void this._updateCellsToRender();this._updateCellsToRenderBatcher.schedule()}},{key:"_shouldRenderWithPriority",value:function(){var e=this.state.cellsAroundViewport,t=e.first,r=e.last,i=this._scrollMetrics,n=i.offset,o=i.visibleLength,s=i.velocity,l=this.props.getItemCount(this.props.data),c=!1,u=(0,k.onStartReachedThresholdOrDefault)(this.props.onStartReachedThreshold),h=(0,k.onEndReachedThresholdOrDefault)(this.props.onEndReachedThreshold);if(t>0){var f=n-this._listMetrics.getCellMetricsApprox(t,this.props).offset;c=f<0||s<-2&&f<D(u,o)}if(!c&&r>=0&&r<l-1){var p=this._listMetrics.getCellMetricsApprox(r,this.props).offset-(n+o);c=p<0||s>2&&p<D(h,o)}return c}},{key:"__getListMetrics",value:function(){return this._listMetrics}},{key:"_updateViewableItems",value:function(e,t){var r=this;this.state.pendingScrollUpdateCount>0||this._viewabilityTuples.forEach((function(i){i.viewabilityHelper.onUpdate(e,r._scrollMetrics.offset,r._scrollMetrics.visibleLength,r._listMetrics,r._createViewToken,i.onViewableItemsChanged,t)}))}}],[{key:"_findItemIndexWithKey",value:function(e,t,r){var i=e.getItemCount(e.data);if(null!=r&&r>=0&&r<i&&j._getItemKey(e,r)===t)return r;for(var n=0;n<i;n++){if(j._getItemKey(e,n)===t)return n}return null}},{key:"_getItemKey",value:function(e,t){var r=e.getItem(e.data,t);return j._keyExtractor(r,t,e)}},{key:"_createRenderMask",value:function(e,r,i){var n=e.getItemCount(e.data);(0,w.default)(r.first>=0&&r.last>=r.first-1&&r.last<n,`Invalid cells around viewport "[${r.first}, ${r.last}]" was passed to VirtualizedList._createRenderMask`);var o=new _.CellRenderMask(n);if(n>0){var s=[r].concat((0,t.default)(null!=i?i:[]));for(var l of s)o.addCells(l);if(null==e.initialScrollIndex||e.initialScrollIndex<=0){var c=j._initialRenderRegion(e);o.addCells(c)}var u=new Set(e.stickyHeaderIndices);j._ensureClosestStickyHeader(e,u,o,r.first)}return o}},{key:"_initialRenderRegion",value:function(e){var t,r=e.getItemCount(e.data),i=Math.max(0,Math.min(r-1,Math.floor(null!=(t=e.initialScrollIndex)?t:0)));return{first:i,last:Math.min(r,i+(0,k.initialNumToRenderOrDefault)(e.initialNumToRender))-1}}},{key:"_ensureClosestStickyHeader",value:function(e,t,r,i){for(var n=e.ListHeaderComponent?1:0,o=i-1;o>=0;o--)if(t.has(o+n)){r.addCells({first:o,last:o});break}}},{key:"getDerivedStateFromProps",value:function(e,t){var r,i,n=e.getItemCount(e.data);if(n===t.renderMask.numCells())return t;var o=null,s=t.firstVisibleItemKey,l=null!=(r=null==(i=e.maintainVisibleContentPosition)?void 0:i.minIndexForVisible)?r:0,c=e.getItemCount(e.data)>l?j._getItemKey(e,l):null;if(null!=e.maintainVisibleContentPosition&&null!=s&&null!=c)if(c!==s){var u=n-t.renderMask.numCells()+l,h=j._findItemIndexWithKey(e,s,u);o=null!=h?h-l:null}else o=null;var f=j._constrainToItemCount(null!=o?{first:t.cellsAroundViewport.first+o,last:t.cellsAroundViewport.last+o}:t.cellsAroundViewport,e);return{cellsAroundViewport:f,renderMask:j._createRenderMask(e,f),firstVisibleItemKey:c,pendingScrollUpdateCount:null!=o?t.pendingScrollUpdateCount+1:t.pendingScrollUpdateCount}}},{key:"_constrainToItemCount",value:function(e,t){var r=t.getItemCount(t.data)-1,i=(0,k.maxToRenderPerBatchOrDefault)(t.maxToRenderPerBatch),n=Math.max(0,r-i);return{first:(0,f.default)(0,e.first,n),last:Math.min(r,e.last)}}},{key:"_keyExtractor",value:function(e,t,r){if(null!=r.keyExtractor)return r.keyExtractor(e,t);var i=(0,I.keyExtractor)(e,t);return i===String(t)&&(z=!0,e.type&&e.type.displayName&&(F=e.type.displayName)),i}}]),j})(S.default);j.contextType=M.VirtualizedListContext;var K=u.StyleSheet.create({verticallyInverted:{transform:[{scaleY:-1}]},horizontallyInverted:{transform:[{scaleX:-1}]},debug:{flex:1},debugOverlayBase:{position:'absolute',top:0,right:0},debugOverlay:{bottom:0,width:20,borderColor:'blue',borderWidth:1},debugOverlayFrame:{left:0,backgroundColor:'orange'},debugOverlayFrameLast:{left:0,borderColor:'green',borderWidth:2},debugOverlayFrameVis:{left:0,borderColor:'red',borderWidth:2}});m.exports=j}),323,[6,30,40,8,9,19,16,18,15,2,324,325,326,327,328,329,330,331,332,333,334,322,3,89,101,335,220]);
|
|
372
|
+
__d((function(g,r,_i2,a,m,_e,d){var e=r(d[0]),t=e(r(d[1])),i=e(r(d[2])),n=e(r(d[3])),o=e(r(d[4])),s=e(r(d[5])),l=e(r(d[6])),c=e(r(d[7])),u=e(r(d[8])),h=r(d[9]),f=e(r(d[10])),p=e(r(d[11])),_=e(r(d[12])),v=r(d[13]),y=e(r(d[14])),C=e(r(d[15])),S=e(r(d[16])),L=e(r(d[17])),b=e(r(d[18])),M=e(r(d[19])),I=r(d[20]),w=r(d[21]),R=e(r(d[22])),x=e(r(d[23])),k=(function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=V(t);if(i&&i.has(e))return i.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=o?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(n,s,l):n[s]=e[s]}n.default=e,i&&i.set(e,n);return n})(r(d[24])),O=r(d[25]),T=r(d[26]);function V(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(V=function(e){return e?i:t})(e)}function E(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var F=!1,A='';function D(e,t){return e*t/2}var j=(function(e){(0,l.default)(j,e);var L,V,E=(L=j,V=z(),function(){var e,t=(0,u.default)(L);if(V){var i=(0,u.default)(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return(0,c.default)(this,e)});function j(e){var t,i,o,l;if((0,n.default)(this,j),(l=E.call(this,e))._getScrollMetrics=function(){return l._scrollMetrics},l._getOutermostParentListRef=function(){return l._isNestedWithSameOrientation()?l.context.getOutermostParentListRef():(0,s.default)(l)},l._registerAsNestedChild=function(e){l._nestedChildLists.add(e.ref,e.cellKey),l._hasInteracted&&e.ref.recordInteraction()},l._unregisterAsNestedChild=function(e){l._nestedChildLists.remove(e.ref)},l._onUpdateSeparators=function(e,t){e.forEach((function(e){var i=null!=e&&l._cellRefs[e];i&&i.updateSeparatorProps(t)}))},l._getSpacerKey=function(e){return e?'height':'width'},l._cellRefs={},l._listMetrics=new S.default,l._footerLength=0,l._hasTriggeredInitialScrollToIndex=!1,l._hasInteracted=!1,l._hasMore=!1,l._hasWarned={},l._headerLength=0,l._hiPriInProgress=!1,l._indicesToKeys=new Map,l._lastFocusedCellKey=null,l._nestedChildLists=new y.default,l._offsetFromParentVirtualizedList=0,l._pendingViewabilityUpdate=!1,l._prevParentOffset=0,l._scrollMetrics={dOffset:0,dt:10,offset:0,timestamp:0,velocity:0,visibleLength:0,zoomScale:1},l._scrollRef=null,l._sentStartForContentLength=0,l._sentEndForContentLength=0,l._viewabilityTuples=[],l._captureScrollRef=function(e){l._scrollRef=e},l._defaultRenderScrollComponent=function(e){var t,i=e.onRefresh;return l._isNestedWithSameOrientation()?(0,T.jsx)(h.View,P({},e)):i?((0,R.default)('boolean'==typeof e.refreshing,'`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `'+JSON.stringify(null!=(t=e.refreshing)?t:'undefined')+'`'),(0,T.jsx)(h.ScrollView,P(P({},e),{},{refreshControl:null==e.refreshControl?(0,T.jsx)(h.RefreshControl,{refreshing:e.refreshing,onRefresh:i,progressViewOffset:e.progressViewOffset}):e.refreshControl}))):(0,T.jsx)(h.ScrollView,P({},e))},l._onCellLayout=function(e,t,i){l._listMetrics.notifyCellLayout({cellIndex:i,cellKey:t,layout:e.nativeEvent.layout,orientation:l._orientation()})&&l._scheduleCellsToRenderUpdate(),l._triggerRemeasureForChildListsInCell(t),l._computeBlankness(),l._updateViewableItems(l.props,l.state.cellsAroundViewport)},l._onCellUnmount=function(e){delete l._cellRefs[e],l._listMetrics.notifyCellUnmounted(e)},l._onLayout=function(e){l._isNestedWithSameOrientation()?l.measureLayoutRelativeToContainingList():l._scrollMetrics.visibleLength=l._selectLength(e.nativeEvent.layout),l.props.onLayout&&l.props.onLayout(e),l._scheduleCellsToRenderUpdate(),l._maybeCallOnEdgeReached()},l._onLayoutEmpty=function(e){l.props.onLayout&&l.props.onLayout(e)},l._onLayoutFooter=function(e){l._triggerRemeasureForChildListsInCell(l._getFooterCellKey()),l._footerLength=l._selectLength(e.nativeEvent.layout)},l._onLayoutHeader=function(e){l._headerLength=l._selectLength(e.nativeEvent.layout)},l._onContentSizeChange=function(e,t){l._listMetrics.notifyListContentLayout({layout:{width:e,height:t},orientation:l._orientation()}),l._maybeScrollToInitialScrollIndex(e,t),l.props.onContentSizeChange&&l.props.onContentSizeChange(e,t),l._scheduleCellsToRenderUpdate(),l._maybeCallOnEdgeReached()},l._convertParentScrollMetrics=function(e){var t=e.offset-l._offsetFromParentVirtualizedList,i=e.visibleLength,n=t-l._scrollMetrics.offset;return{visibleLength:i,contentLength:l._listMetrics.getContentLength(),offset:t,dOffset:n}},l._onScroll=function(e){l._nestedChildLists.forEach((function(t){t._onScroll(e)})),l.props.onScroll&&l.props.onScroll(e);var t=e.timeStamp,i=l._selectLength(e.nativeEvent.layoutMeasurement),n=l._selectLength(e.nativeEvent.contentSize),o=l._offsetFromScrollEvent(e),s=o-l._scrollMetrics.offset;if(l._isNestedWithSameOrientation()){if(0===l._listMetrics.getContentLength())return;var c=l._convertParentScrollMetrics({visibleLength:i,offset:o});i=c.visibleLength,n=c.contentLength,o=c.offset,s=c.dOffset}var u=l._scrollMetrics.timestamp?Math.max(1,t-l._scrollMetrics.timestamp):1,h=s/u;u>500&&l._scrollMetrics.dt>500&&n>5*i&&!l._hasWarned.perf&&((0,_.default)("VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders components that follow React performance best practices like PureComponent, shouldComponentUpdate, etc.",{dt:u,prevDt:l._scrollMetrics.dt,contentLength:n}),l._hasWarned.perf=!0);var f=e.nativeEvent.zoomScale<0?1:e.nativeEvent.zoomScale;l._scrollMetrics={dt:u,dOffset:s,offset:o,timestamp:t,velocity:h,visibleLength:i,zoomScale:f},l.state.pendingScrollUpdateCount>0&&l.setState((function(e){return{pendingScrollUpdateCount:e.pendingScrollUpdateCount-1}})),l._updateViewableItems(l.props,l.state.cellsAroundViewport),l.props&&(l._maybeCallOnEdgeReached(),0!==h&&l._fillRateHelper.activate(),l._computeBlankness(),l._scheduleCellsToRenderUpdate())},l._onScrollBeginDrag=function(e){l._nestedChildLists.forEach((function(t){t._onScrollBeginDrag(e)})),l._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),l._hasInteracted=!0,l.props.onScrollBeginDrag&&l.props.onScrollBeginDrag(e)},l._onScrollEndDrag=function(e){l._nestedChildLists.forEach((function(t){t._onScrollEndDrag(e)}));var t=e.nativeEvent.velocity;t&&(l._scrollMetrics.velocity=l._selectOffset(t)),l._computeBlankness(),l.props.onScrollEndDrag&&l.props.onScrollEndDrag(e)},l._onMomentumScrollBegin=function(e){l._nestedChildLists.forEach((function(t){t._onMomentumScrollBegin(e)})),l.props.onMomentumScrollBegin&&l.props.onMomentumScrollBegin(e)},l._onMomentumScrollEnd=function(e){l._nestedChildLists.forEach((function(t){t._onMomentumScrollEnd(e)})),l._scrollMetrics.velocity=0,l._computeBlankness(),l.props.onMomentumScrollEnd&&l.props.onMomentumScrollEnd(e)},l._updateCellsToRender=function(){l._updateViewableItems(l.props,l.state.cellsAroundViewport),l.setState((function(e,t){var i=l._adjustCellsAroundViewport(t,e.cellsAroundViewport,e.pendingScrollUpdateCount),n=j._createRenderMask(t,i,l._getNonViewportRenderRegions(t));return i.first===e.cellsAroundViewport.first&&i.last===e.cellsAroundViewport.last&&n.equals(e.renderMask)?null:{cellsAroundViewport:i,renderMask:n}}))},l._createViewToken=function(e,t,i){var n=i.data,o=(0,i.getItem)(n,e);return{index:e,item:o,key:j._keyExtractor(o,e,i),isViewable:t}},l._getNonViewportRenderRegions=function(e){if(!l._lastFocusedCellKey||!l._cellRefs[l._lastFocusedCellKey])return[];var t=l._cellRefs[l._lastFocusedCellKey].props.index,i=e.getItemCount(e.data);if(t>=i||j._getItemKey(e,t)!==l._lastFocusedCellKey)return[];for(var n=t,o=0,s=n-1;s>=0&&o<l._scrollMetrics.visibleLength;s--)n--,o+=l._listMetrics.getCellMetricsApprox(s,e).length;for(var c=t,u=0,h=c+1;h<i&&u<l._scrollMetrics.visibleLength;h++)c++,u+=l._listMetrics.getCellMetricsApprox(h,e).length;return[{first:n,last:c}]},l._checkProps(e),l._fillRateHelper=new C.default(l._listMetrics),l._updateCellsToRenderBatcher=new f.default(l._updateCellsToRender,null!=(t=l.props.updateCellsBatchingPeriod)?t:50),l.props.viewabilityConfigCallbackPairs)l._viewabilityTuples=l.props.viewabilityConfigCallbackPairs.map((function(e){return{viewabilityHelper:new b.default(e.viewabilityConfig),onViewableItemsChanged:e.onViewableItemsChanged}}));else{var c=l.props,u=c.onViewableItemsChanged,p=c.viewabilityConfig;u&&l._viewabilityTuples.push({viewabilityHelper:new b.default(p),onViewableItemsChanged:u})}var v=j._initialRenderRegion(e),L=null!=(i=null==(o=l.props.maintainVisibleContentPosition)?void 0:o.minIndexForVisible)?i:0;return l.state={cellsAroundViewport:v,renderMask:j._createRenderMask(e,v),firstVisibleItemKey:l.props.getItemCount(l.props.data)>L?j._getItemKey(l.props,L):null,pendingScrollUpdateCount:null!=l.props.initialScrollIndex&&l.props.initialScrollIndex>0?1:0},l}return(0,o.default)(j,[{key:"scrollToEnd",value:function(e){var t=!e||e.animated,i=this.props.getItemCount(this.props.data)-1;if(!(i<0)){var n=this._listMetrics.getCellMetricsApprox(i,this.props),o=Math.max(0,n.offset+n.length+this._footerLength-this._scrollMetrics.visibleLength);this.scrollToOffset({animated:t,offset:o})}}},{key:"scrollToIndex",value:function(e){var t=this.props,i=t.data,n=t.getItemCount,o=t.getItemLayout,s=t.onScrollToIndexFailed,l=e.animated,c=e.index,u=e.viewOffset,h=e.viewPosition;if((0,R.default)(c>=0,`scrollToIndex out of range: requested index ${c} but minimum is 0`),(0,R.default)(n(i)>=1,`scrollToIndex out of range: item length ${n(i)} but minimum is 1`),(0,R.default)(c<n(i),`scrollToIndex out of range: requested index ${c} is out of 0 to ${n(i)-1}`),!o&&c>this._listMetrics.getHighestMeasuredCellIndex())return(0,R.default)(!!s,"scrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed, otherwise there is no way to know the location of offscreen indices or handle failures."),void s({averageItemLength:this._listMetrics.getAverageCellLength(),highestMeasuredFrameIndex:this._listMetrics.getHighestMeasuredCellIndex(),index:c});var f=this._listMetrics.getCellMetricsApprox(Math.floor(c),this.props),p=Math.max(0,this._listMetrics.getCellOffsetApprox(c,this.props)-(h||0)*(this._scrollMetrics.visibleLength-f.length))-(u||0);this.scrollToOffset({offset:p,animated:l})}},{key:"scrollToItem",value:function(e){for(var t=e.item,i=this.props,n=i.data,o=i.getItem,s=(0,i.getItemCount)(n),l=0;l<s;l++)if(o(n,l)===t){this.scrollToIndex(P(P({},e),{},{index:l}));break}}},{key:"scrollToOffset",value:function(e){var t=e.animated,i=e.offset,n=this._scrollRef;if(null!=n)if(null!=n.scrollTo){var o=this._orientation(),s=o.horizontal,l=o.rtl;s&&l&&!this._listMetrics.hasContentLength()?console.warn('scrollToOffset may not be called in RTL before content is laid out'):n.scrollTo(P({animated:t},this._scrollToParamsFromOffset(i)))}else console.warn("No scrollTo method provided. This may be because you have two nested VirtualizedLists with the same orientation, or because you are using a custom component that does not implement scrollTo.")}},{key:"_scrollToParamsFromOffset",value:function(e){var t=this._orientation(),i=t.horizontal,n=t.rtl;if(i&&n){var o=this._listMetrics.cartesianOffset(e+this._scrollMetrics.visibleLength);return i?{x:o}:{y:o}}return i?{x:e}:{y:e}}},{key:"recordInteraction",value:function(){this._nestedChildLists.forEach((function(e){e.recordInteraction()})),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.recordInteraction()})),this._updateViewableItems(this.props,this.state.cellsAroundViewport)}},{key:"flashScrollIndicators",value:function(){null!=this._scrollRef&&this._scrollRef.flashScrollIndicators()}},{key:"getScrollResponder",value:function(){if(this._scrollRef&&this._scrollRef.getScrollResponder)return this._scrollRef.getScrollResponder()}},{key:"getScrollableNode",value:function(){return this._scrollRef&&this._scrollRef.getScrollableNode?this._scrollRef.getScrollableNode():(0,h.findNodeHandle)(this._scrollRef)}},{key:"getScrollRef",value:function(){return this._scrollRef&&this._scrollRef.getScrollRef?this._scrollRef.getScrollRef():this._scrollRef}},{key:"setNativeProps",value:function(e){this._scrollRef&&this._scrollRef.setNativeProps(e)}},{key:"_getCellKey",value:function(){var e;return(null==(e=this.context)?void 0:e.cellKey)||'rootList'}},{key:"hasMore",value:function(){return this._hasMore}},{key:"_checkProps",value:function(e){var t=e.onScroll,i=e.windowSize,n=e.getItemCount,o=e.data,s=e.initialScrollIndex;(0,R.default)(!t||!t.__isNative,"Components based on VirtualizedList must be wrapped with Animated.createAnimatedComponent to support native onScroll events with useNativeDriver"),(0,R.default)((0,O.windowSizeOrDefault)(i)>0,'VirtualizedList: The windowSize prop must be present and set to a value greater than 0.'),(0,R.default)(n,'VirtualizedList: The "getItemCount" prop must be provided');var l=n(o);null==s||this._hasTriggeredInitialScrollToIndex||!(s<0||l>0&&s>=l)||this._hasWarned.initialScrollIndex||(console.warn(`initialScrollIndex "${s}" is not valid (list has ${l} items)`),this._hasWarned.initialScrollIndex=!0)}},{key:"_adjustCellsAroundViewport",value:function(e,t,i){var n,o=e.data,s=e.getItemCount,l=(0,O.onEndReachedThresholdOrDefault)(e.onEndReachedThreshold),c=this._scrollMetrics,u=c.offset,h=c.visibleLength,f=this._listMetrics.getContentLength(),p=f-h-u;if(h<=0||f<=0)return t.last>=s(o)?j._constrainToItemCount(t,e):t;if(e.disableVirtualization){var _=p<l*h?(0,O.maxToRenderPerBatchOrDefault)(e.maxToRenderPerBatch):0;n={first:0,last:Math.min(t.last+_,s(o)-1)}}else{if(i>0)return t.last>=s(o)?j._constrainToItemCount(t,e):t;n=(0,w.computeWindowedRenderLimits)(e,(0,O.maxToRenderPerBatchOrDefault)(e.maxToRenderPerBatch),(0,O.windowSizeOrDefault)(e.windowSize),t,this._listMetrics,this._scrollMetrics),(0,R.default)(n.last<s(o),'computeWindowedRenderLimits() should return range in-bounds')}if(this._nestedChildLists.size()>0){var v=this._findFirstChildWithMore(n.first,n.last);n.last=null!=v?v:n.last}return n}},{key:"_findFirstChildWithMore",value:function(e,t){for(var i=e;i<=t;i++){var n=this._indicesToKeys.get(i);if(null!=n&&this._nestedChildLists.anyInCell(n,(function(e){return e.hasMore()})))return i}return null}},{key:"componentDidMount",value:function(){this._isNestedWithSameOrientation()&&this.context.registerAsNestedChild({ref:this,cellKey:this.context.cellKey})}},{key:"componentWillUnmount",value:function(){this._isNestedWithSameOrientation()&&this.context.unregisterAsNestedChild({ref:this}),this._updateCellsToRenderBatcher.dispose({abort:!0}),this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.dispose()})),this._fillRateHelper.deactivateAndFlush()}},{key:"_pushCells",value:function(e,t,i,n,o,s){var l,c=this,u=this.props,h=u.CellRendererComponent,f=u.ItemSeparatorComponent,p=u.ListHeaderComponent,_=u.ListItemComponent,v=u.data,y=u.debug,C=u.getItem,S=u.getItemCount,L=u.getItemLayout,b=u.horizontal,I=u.renderItem,w=p?1:0,R=S(v)-1;o=Math.min(R,o);for(var x=function(){var n=C(v,k),o=j._keyExtractor(n,k,c.props);c._indicesToKeys.set(k,o),i.has(k+w)&&t.push(e.length);var u=null==L||y||c._fillRateHelper.enabled();e.push((0,T.jsx)(M.default,P({CellRendererComponent:h,ItemSeparatorComponent:k<R?f:void 0,ListItemComponent:_,cellKey:o,horizontal:b,index:k,inversionStyle:s,item:n,prevCellKey:l,onUpdateSeparators:c._onUpdateSeparators,onCellFocusCapture:function(e){return c._onCellFocusCapture(o)},onUnmount:c._onCellUnmount,ref:function(e){c._cellRefs[o]=e},renderItem:I},u&&{onCellLayout:c._onCellLayout}),o)),l=o},k=n;k<=o;k++)x()}},{key:"_isNestedWithSameOrientation",value:function(){var e=this.context;return!(!e||!!e.horizontal!==(0,O.horizontalOrDefault)(this.props.horizontal))}},{key:"render",value:function(){var e,t=this;this._checkProps(this.props);var n=this.props,o=n.ListEmptyComponent,s=n.ListFooterComponent,l=n.ListHeaderComponent,c=this.props,u=c.data,f=c.horizontal,_=this.props.inverted?(0,O.horizontalOrDefault)(this.props.horizontal)?K.horizontallyInverted:K.verticallyInverted:null,v=[],y=new Set(this.props.stickyHeaderIndices),C=[];if(l){y.has(0)&&C.push(0);var S=k.isValidElement(l)?l:(0,T.jsx)(l,{});v.push((0,T.jsx)(I.VirtualizedListCellContextProvider,{cellKey:this._getCellKey()+'-header',children:(0,T.jsx)(h.View,{collapsable:!1,onLayout:this._onLayoutHeader,style:h.StyleSheet.compose(_,this.props.ListHeaderComponentStyle),children:S})},"$header"))}var L=this.props.getItemCount(u);if(0===L&&o){var b=k.isValidElement(o)?o:(0,T.jsx)(o,{});v.push((0,T.jsx)(I.VirtualizedListCellContextProvider,{cellKey:this._getCellKey()+'-empty',children:k.cloneElement(b,{onLayout:function(e){t._onLayoutEmpty(e),b.props.onLayout&&b.props.onLayout(e)},style:h.StyleSheet.compose(_,b.props.style)})},"$empty"))}if(L>0){F=!1,A='';var M=this._getSpacerKey(!f),w=this.state.renderMask.enumerateRegions(),R=w[w.length-1],x=null!=R&&R.isSpacer?R:null;for(var V of w)if(V.isSpacer){if(this.props.disableVirtualization)continue;var E=V===x&&!this.props.getItemLayout?(0,p.default)(V.first-1,V.last,this._listMetrics.getHighestMeasuredCellIndex()):V.last,z=this._listMetrics.getCellMetricsApprox(V.first,this.props),D=this._listMetrics.getCellMetricsApprox(E,this.props),j=D.offset+D.length-z.offset;v.push((0,T.jsx)(h.View,{style:(0,i.default)({},M,j)},`$spacer-${V.first}`))}else this._pushCells(v,C,y,V.first,V.last,_);!this._hasWarned.keys&&F&&(console.warn("VirtualizedList: missing keys for items, make sure to specify a key or id property on each item or provide a custom keyExtractor.",A),this._hasWarned.keys=!0)}if(s){var B=k.isValidElement(s)?s:(0,T.jsx)(s,{});v.push((0,T.jsx)(I.VirtualizedListCellContextProvider,{cellKey:this._getFooterCellKey(),children:(0,T.jsx)(h.View,{onLayout:this._onLayoutFooter,style:h.StyleSheet.compose(_,this.props.ListFooterComponentStyle),children:B})},"$footer"))}var H=P(P({},this.props),{},{onContentSizeChange:this._onContentSizeChange,onLayout:this._onLayout,onScroll:this._onScroll,onScrollBeginDrag:this._onScrollBeginDrag,onScrollEndDrag:this._onScrollEndDrag,onMomentumScrollBegin:this._onMomentumScrollBegin,onMomentumScrollEnd:this._onMomentumScrollEnd,scrollEventThrottle:null!=(e=this.props.scrollEventThrottle)?e:1e-4,invertStickyHeaders:void 0!==this.props.invertStickyHeaders?this.props.invertStickyHeaders:this.props.inverted,stickyHeaderIndices:C,style:_?[_,this.props.style]:this.props.style,isInvertedVirtualizedList:this.props.inverted,maintainVisibleContentPosition:null!=this.props.maintainVisibleContentPosition?P(P({},this.props.maintainVisibleContentPosition),{},{minIndexForVisible:this.props.maintainVisibleContentPosition.minIndexForVisible+(this.props.ListHeaderComponent?1:0)}):void 0});this._hasMore=this.state.cellsAroundViewport.last<L-1;var N=(0,T.jsx)(I.VirtualizedListContextProvider,{value:{cellKey:null,getScrollMetrics:this._getScrollMetrics,horizontal:(0,O.horizontalOrDefault)(this.props.horizontal),getOutermostParentListRef:this._getOutermostParentListRef,registerAsNestedChild:this._registerAsNestedChild,unregisterAsNestedChild:this._unregisterAsNestedChild},children:k.cloneElement((this.props.renderScrollComponent||this._defaultRenderScrollComponent)(H),{ref:this._captureScrollRef},v)});return this.props.debug?(0,T.jsxs)(h.View,{style:K.debug,children:[N,this._renderDebugOverlay()]}):N}},{key:"componentDidUpdate",value:function(e){var t=this.props,i=t.data,n=t.extraData;i===e.data&&n===e.extraData||this._viewabilityTuples.forEach((function(e){e.viewabilityHelper.resetViewableIndices()}));var o=this._hiPriInProgress;this._scheduleCellsToRenderUpdate(),o&&(this._hiPriInProgress=!1)}},{key:"_computeBlankness",value:function(){this._fillRateHelper.computeBlankness(this.props,this.state.cellsAroundViewport,this._scrollMetrics)}},{key:"_onCellFocusCapture",value:function(e){this._lastFocusedCellKey=e,this._updateCellsToRender()}},{key:"_triggerRemeasureForChildListsInCell",value:function(e){this._nestedChildLists.forEachInCell(e,(function(e){e.measureLayoutRelativeToContainingList()}))}},{key:"measureLayoutRelativeToContainingList",value:function(){var e=this;try{if(!this._scrollRef)return;this._scrollRef.measureLayout(this.context.getOutermostParentListRef().getScrollRef(),(function(t,i,n,o){e._offsetFromParentVirtualizedList=e._selectOffset({x:t,y:i}),e._listMetrics.notifyListContentLayout({layout:{width:n,height:o},orientation:e._orientation()});var s=e._convertParentScrollMetrics(e.context.getScrollMetrics());(e._scrollMetrics.visibleLength!==s.visibleLength||e._scrollMetrics.offset!==s.offset)&&(e._scrollMetrics.visibleLength=s.visibleLength,e._scrollMetrics.offset=s.offset,e._nestedChildLists.forEach((function(e){e.measureLayoutRelativeToContainingList()})))}),(function(e){console.warn("VirtualizedList: Encountered an error while measuring a list's offset from its containing VirtualizedList.")}))}catch(e){console.warn('measureLayoutRelativeToContainingList threw an error',e.stack)}}},{key:"_getFooterCellKey",value:function(){return this._getCellKey()+'-footer'}},{key:"_renderDebugOverlay",value:function(){for(var e=this._scrollMetrics.visibleLength/(this._listMetrics.getContentLength()||1),t=[],i=this.props.getItemCount(this.props.data),n=0;n<i;n++){var o=this._listMetrics.getCellMetricsApprox(n,this.props);o.isMounted&&t.push(o)}var s=this._listMetrics.getCellMetricsApprox(this.state.cellsAroundViewport.first,this.props).offset,l=this._listMetrics.getCellMetricsApprox(this.state.cellsAroundViewport.last,this.props),c=l.offset+l.length-s,u=this._scrollMetrics.offset,f=this._scrollMetrics.visibleLength;return(0,T.jsxs)(h.View,{style:[K.debugOverlayBase,K.debugOverlay],children:[t.map((function(t,i){return(0,T.jsx)(h.View,{style:[K.debugOverlayBase,K.debugOverlayFrame,{top:t.offset*e,height:t.length*e}]},'f'+i)})),(0,T.jsx)(h.View,{style:[K.debugOverlayBase,K.debugOverlayFrameLast,{top:s*e,height:c*e}]}),(0,T.jsx)(h.View,{style:[K.debugOverlayBase,K.debugOverlayFrameVis,{top:u*e,height:f*e}]})]})}},{key:"_selectLength",value:function(e){return(0,O.horizontalOrDefault)(this.props.horizontal)?e.width:e.height}},{key:"_selectOffset",value:function(e){var t=e.x,i=e.y;return this._orientation().horizontal?t:i}},{key:"_orientation",value:function(){return{horizontal:(0,O.horizontalOrDefault)(this.props.horizontal),rtl:h.I18nManager.isRTL}}},{key:"_maybeCallOnEdgeReached",value:function(){var e=this.props,t=e.data,i=e.getItemCount,n=e.onStartReached,o=e.onStartReachedThreshold,s=e.onEndReached,l=e.onEndReachedThreshold;if(!(this.state.pendingScrollUpdateCount>0)){var c=this._scrollMetrics,u=c.visibleLength,h=c.offset,f=h,p=this._listMetrics.getContentLength()-u-h;f<.001&&(f=0),p<.001&&(p=0);var _=f<=(null!=o?o*u:2),v=p<=(null!=l?l*u:2);s&&this.state.cellsAroundViewport.last===i(t)-1&&v&&this._listMetrics.getContentLength()!==this._sentEndForContentLength?(this._sentEndForContentLength=this._listMetrics.getContentLength(),s({distanceFromEnd:p})):null!=n&&0===this.state.cellsAroundViewport.first&&_&&this._listMetrics.getContentLength()!==this._sentStartForContentLength?(this._sentStartForContentLength=this._listMetrics.getContentLength(),n({distanceFromStart:f})):(this._sentStartForContentLength=_?this._sentStartForContentLength:0,this._sentEndForContentLength=v?this._sentEndForContentLength:0)}}},{key:"_maybeScrollToInitialScrollIndex",value:function(e,t){e>0&&t>0&&null!=this.props.initialScrollIndex&&this.props.initialScrollIndex>0&&!this._hasTriggeredInitialScrollToIndex&&(null==this.props.contentOffset&&(this.props.initialScrollIndex<this.props.getItemCount(this.props.data)?this.scrollToIndex({animated:!1,index:(0,x.default)(this.props.initialScrollIndex)}):this.scrollToEnd({animated:!1})),this._hasTriggeredInitialScrollToIndex=!0)}},{key:"_offsetFromScrollEvent",value:function(e){var t=e.nativeEvent,i=t.contentOffset,n=t.contentSize,o=t.layoutMeasurement,s=this._orientation(),l=s.horizontal,c=s.rtl;return l&&c?this._selectLength(n)-(this._selectOffset(i)+this._selectLength(o)):this._selectOffset(i)}},{key:"_scheduleCellsToRenderUpdate",value:function(){if((this._listMetrics.getAverageCellLength()>0||null!=this.props.getItemLayout)&&this._shouldRenderWithPriority()&&!this._hiPriInProgress)return this._hiPriInProgress=!0,this._updateCellsToRenderBatcher.dispose({abort:!0}),void this._updateCellsToRender();this._updateCellsToRenderBatcher.schedule()}},{key:"_shouldRenderWithPriority",value:function(){var e=this.state.cellsAroundViewport,t=e.first,i=e.last,n=this._scrollMetrics,o=n.offset,s=n.visibleLength,l=n.velocity,c=this.props.getItemCount(this.props.data),u=!1,h=(0,O.onStartReachedThresholdOrDefault)(this.props.onStartReachedThreshold),f=(0,O.onEndReachedThresholdOrDefault)(this.props.onEndReachedThreshold);if(t>0){var p=o-this._listMetrics.getCellMetricsApprox(t,this.props).offset;u=p<0||l<-2&&p<D(h,s)}if(!u&&i>=0&&i<c-1){var _=this._listMetrics.getCellMetricsApprox(i,this.props).offset-(o+s);u=_<0||l>2&&_<D(f,s)}return u}},{key:"__getListMetrics",value:function(){return this._listMetrics}},{key:"_updateViewableItems",value:function(e,t){var i=this;this.state.pendingScrollUpdateCount>0||this._viewabilityTuples.forEach((function(n){n.viewabilityHelper.onUpdate(e,i._scrollMetrics.offset,i._scrollMetrics.visibleLength,i._listMetrics,i._createViewToken,n.onViewableItemsChanged,t)}))}}],[{key:"_findItemIndexWithKey",value:function(e,t,i){var n=e.getItemCount(e.data);if(null!=i&&i>=0&&i<n&&j._getItemKey(e,i)===t)return i;for(var o=0;o<n;o++){if(j._getItemKey(e,o)===t)return o}return null}},{key:"_getItemKey",value:function(e,t){var i=e.getItem(e.data,t);return j._keyExtractor(i,t,e)}},{key:"_createRenderMask",value:function(e,i,n){var o=e.getItemCount(e.data);(0,R.default)(i.first>=0&&i.last>=i.first-1&&i.last<o,`Invalid cells around viewport "[${i.first}, ${i.last}]" was passed to VirtualizedList._createRenderMask`);var s=new v.CellRenderMask(o);if(o>0){var l=[i].concat((0,t.default)(null!=n?n:[]));for(var c of l)s.addCells(c);if(null==e.initialScrollIndex||e.initialScrollIndex<=0){var u=j._initialRenderRegion(e);s.addCells(u)}var h=new Set(e.stickyHeaderIndices);j._ensureClosestStickyHeader(e,h,s,i.first)}return s}},{key:"_initialRenderRegion",value:function(e){var t,i=e.getItemCount(e.data),n=Math.max(0,Math.min(i-1,Math.floor(null!=(t=e.initialScrollIndex)?t:0)));return{first:n,last:Math.min(i,n+(0,O.initialNumToRenderOrDefault)(e.initialNumToRender))-1}}},{key:"_ensureClosestStickyHeader",value:function(e,t,i,n){for(var o=e.ListHeaderComponent?1:0,s=n-1;s>=0;s--)if(t.has(s+o)){i.addCells({first:s,last:s});break}}},{key:"getDerivedStateFromProps",value:function(e,t){var i,n,o=e.getItemCount(e.data);if(o===t.renderMask.numCells())return t;var s=null,l=t.firstVisibleItemKey,c=null!=(i=null==(n=e.maintainVisibleContentPosition)?void 0:n.minIndexForVisible)?i:0,u=e.getItemCount(e.data)>c?j._getItemKey(e,c):null;if(null!=e.maintainVisibleContentPosition&&null!=l&&null!=u)if(u!==l){var h=o-t.renderMask.numCells()+c,f=j._findItemIndexWithKey(e,l,h);s=null!=f?f-c:null}else s=null;var p=j._constrainToItemCount(null!=s?{first:t.cellsAroundViewport.first+s,last:t.cellsAroundViewport.last+s}:t.cellsAroundViewport,e);return{cellsAroundViewport:p,renderMask:j._createRenderMask(e,p),firstVisibleItemKey:u,pendingScrollUpdateCount:null!=s?t.pendingScrollUpdateCount+1:t.pendingScrollUpdateCount}}},{key:"_constrainToItemCount",value:function(e,t){var i=t.getItemCount(t.data)-1,n=(0,O.maxToRenderPerBatchOrDefault)(t.maxToRenderPerBatch),o=Math.max(0,i-n);return{first:(0,p.default)(0,e.first,o),last:Math.min(i,e.last)}}},{key:"_keyExtractor",value:function(e,t,i){if(null!=i.keyExtractor)return i.keyExtractor(e,t);var n=(0,w.keyExtractor)(e,t);return n===String(t)&&(F=!0,e.type&&e.type.displayName&&(A=e.type.displayName)),n}}]),j})(L.default);j.contextType=I.VirtualizedListContext;var K=h.StyleSheet.create({verticallyInverted:{transform:[{scaleY:-1}]},horizontallyInverted:{transform:[{scaleX:-1}]},debug:{flex:1},debugOverlayBase:{position:'absolute',top:0,right:0},debugOverlay:{bottom:0,width:20,borderColor:'blue',borderWidth:1},debugOverlayFrame:{left:0,backgroundColor:'orange'},debugOverlayFrameLast:{left:0,borderColor:'green',borderWidth:2},debugOverlayFrameVis:{left:0,borderColor:'red',borderWidth:2}});m.exports=j}),323,[6,30,40,8,9,19,16,18,15,2,324,325,326,327,328,329,330,331,332,333,334,322,3,89,101,335,220]);
|
|
373
373
|
__d((function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=r(d[1]),l=r(d[2]).InteractionManager,s=(function(){function s(n,l){t(this,s),this._delay=l,this._callback=n}return n(s,[{key:"dispose",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{abort:!1};this._taskHandle&&(this._taskHandle.cancel(),t.abort||this._callback(),this._taskHandle=null)}},{key:"schedule",value:function(){var t=this;if(!this._taskHandle){var n=setTimeout((function(){t._taskHandle=l.runAfterInteractions((function(){t._taskHandle=null,t._callback()}))}),this._delay);this._taskHandle={cancel:function(){return clearTimeout(n)}}}}}]),s})();m.exports=s}),324,[8,9,2]);
|
|
374
374
|
__d((function(g,r,i,a,m,e,d){'use strict';m.exports=function(t,n,u){return n<t?t:n>u?u:n}}),325,[]);
|
|
375
375
|
__d((function(g,r,i,a,m,e,d){'use strict';m.exports=function(){var n;return(n=console).log.apply(n,arguments)}}),326,[]);
|
|
@@ -485,7 +485,7 @@ __d((function(g,r,i,a,m,_e,d){'use strict';var t=r(d[0]),n=r(d[1]),e=r(d[2]),u=r
|
|
|
485
485
|
__d((function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicColorIOS=void 0;var t=r(d[0]);e.DynamicColorIOS=function(o){return(0,t.DynamicColorIOSPrivate)({light:o.light,dark:o.dark,highContrastLight:o.highContrastLight,highContrastDark:o.highContrastDark})}}),436,[69]);
|
|
486
486
|
__d((function(g,r,_i,a,m,_e,d){var e=r(d[0]),t=e(r(d[1])),n=e(r(d[2])),i=e(r(d[3])),o=e(r(d[4])),c=e(r(d[5])),l=e(r(d[6])),u=e(r(d[7])),s=e(r(d[8])),v=e(r(d[9])),f=r(d[10]),h=r(d[11]),S=r(d[12]),p=e(r(d[13])),y=e(r(d[14])),b=r(d[15]),w=r(d[16]),C=["children"],N=["enabled","freezeOnBlur"],k=["active","activityState","children","isNativeStack","gestureResponseDistance","onGestureCancel"],x=["active","activityState","style","onComponentRef"],B=["enabled","hasTwoStates"];function j(e){var t=R();return function(){var n,i=(0,c.default)(e);if(t){var l=(0,c.default)(this).constructor;n=Reflect.construct(i,arguments,l)}else n=i.apply(this,arguments);return(0,o.default)(this,n)}}function R(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){(0,l.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A=!0,H=A;var D=!1;var F,T,V,z,I,W,E,M,_,G;var U={get NativeScreen(){return F=F||r(d[17]).default},get NativeScreenContainer(){return T=T||r(d[18]).default},get NativeScreenNavigationContainer(){return V=V||r(d[19]).default},get NativeScreenStack(){return z=z||r(d[20]).default},get NativeScreenStackHeaderConfig(){return I=I||r(d[21]).default},get NativeScreenStackHeaderSubview(){return W=W||r(d[22]).default},get NativeSearchBar(){return M=M||r(d[23]).default},get NativeSearchBarCommands(){return _=_||r(d[23]).Commands},get NativeFullWindowOverlay(){return G=G||r(d[24]).default}};function L(e){var t=e.freeze,n=e.children,i=v.default.useState(!1),o=(0,s.default)(i,2),c=o[0],l=o[1];return t!==c&&setImmediate((function(){l(t)})),(0,w.jsx)(h.Freeze,{freeze:!!t&&c,children:n})}var q=(function(e){(0,i.default)(c,e);var o=j(c);function c(){var e;(0,t.default)(this,c);for(var n=arguments.length,i=new Array(n),l=0;l<n;l++)i[l]=arguments[l];return(e=o.call.apply(o,[this].concat(i))).ref=null,e.closing=new f.Animated.Value(0),e.progress=new f.Animated.Value(0),e.goingForward=new f.Animated.Value(0),e.setRef=function(t){e.ref=t,null==e.props.onComponentRef||e.props.onComponentRef(t)},e}return(0,n.default)(c,[{key:"setNativeProps",value:function(e){var t;null==(t=this.ref)||t.setNativeProps(e)}},{key:"render",value:function(){var e=this,t=this.props,n=t.enabled,i=void 0===n?H:n,o=t.freezeOnBlur,c=void 0===o?D:o,l=(0,u.default)(t,N),s=l.sheetAllowedDetents,v=void 0===s?'large':s,h=l.sheetLargestUndimmedDetent,S=void 0===h?'all':h,y=l.sheetGrabberVisible,b=void 0!==y&&y,C=l.sheetCornerRadius,B=void 0===C?-1:C,j=l.sheetExpandsWhenScrolledToEdge,R=void 0===j||j;if(i){var O,A,F,T;E=E||f.Animated.createAnimatedComponent(U.NativeScreen);var V=l.active,z=l.activityState,I=l.children,W=l.isNativeStack,M=l.gestureResponseDistance,_=l.onGestureCancel,G=(0,u.default)(l,k);void 0!==V&&void 0===z&&(console.warn('It appears that you are using old version of react-navigation library. Please update @react-navigation/bottom-tabs, @react-navigation/stack and @react-navigation/drawer to version 5.10.0 or above to take full advantage of new functionality added to react-native-screens'),z=0!==V?2:0);return(0,w.jsx)(L,{freeze:c&&0===z,children:(0,w.jsx)(E,P(P({},G),{},{activityState:z,sheetAllowedDetents:v,sheetLargestUndimmedDetent:S,sheetGrabberVisible:b,sheetCornerRadius:B,sheetExpandsWhenScrolledToEdge:R,gestureResponseDistance:{start:null!=(O=null==M?void 0:M.start)?O:-1,end:null!=(A=null==M?void 0:M.end)?A:-1,top:null!=(F=null==M?void 0:M.top)?F:-1,bottom:null!=(T=null==M?void 0:M.bottom)?T:-1},ref:function(t){var n,i;null!=t&&null!=(n=t.viewConfig)&&null!=(i=n.validAttributes)&&i.style&&(t.viewConfig.validAttributes.style=P(P({},t.viewConfig.validAttributes.style),{},{display:!1}),e.setRef(t))},onTransitionProgress:W?f.Animated.event([{nativeEvent:{progress:this.progress,closing:this.closing,goingForward:this.goingForward}}],{useNativeDriver:!0}):void 0,onGestureCancel:null!=_?_:function(){},children:W?(0,w.jsx)(p.default.Provider,{value:{progress:this.progress,closing:this.closing,goingForward:this.goingForward},children:I}):I}))})}var q=l.active,J=l.activityState,K=l.style,Q=(l.onComponentRef,(0,u.default)(l,x));return void 0!==q&&void 0===J&&(J=0!==q?2:0),(0,w.jsx)(f.Animated.View,P({style:[K,{display:0!==J?'flex':'none'}],ref:this.setRef},Q))}}]),c})(v.default.Component);var J=f.StyleSheet.create({headerSubview:{position:'absolute',top:0,right:0,flexDirection:'row',alignItems:'center',justifyContent:'center'}}),K=(function(e){(0,i.default)(c,e);var o=j(c);function c(e){var n;return(0,t.default)(this,c),(n=o.call(this,e)).nativeSearchBarRef=v.default.createRef(),n}return(0,n.default)(c,[{key:"_callMethodWithRef",value:function(e){var t=this.nativeSearchBarRef.current;t?e(t):console.warn('Reference to native search bar component has not been updated yet')}},{key:"blur",value:function(){this._callMethodWithRef((function(e){return U.NativeSearchBarCommands.blur(e)}))}},{key:"focus",value:function(){this._callMethodWithRef((function(e){return U.NativeSearchBarCommands.focus(e)}))}},{key:"toggleCancelButton",value:function(e){this._callMethodWithRef((function(t){return U.NativeSearchBarCommands.toggleCancelButton(t,e)}))}},{key:"clearText",value:function(){this._callMethodWithRef((function(e){return U.NativeSearchBarCommands.clearText(e)}))}},{key:"setText",value:function(e){this._callMethodWithRef((function(t){return U.NativeSearchBarCommands.setText(t,e)}))}},{key:"render",value:function(){return b.isSearchBarAvailableForCurrentPlatform?(0,w.jsx)(U.NativeSearchBar,P(P({},this.props),{},{ref:this.nativeSearchBarRef})):(console.warn('Importing SearchBar is only valid on iOS and Android devices.'),f.View)}}]),c})(v.default.Component),Q=v.default.createContext(q),X=(function(e){(0,i.default)(c,e);var o=j(c);function c(){return(0,t.default)(this,c),o.apply(this,arguments)}return(0,n.default)(c,[{key:"render",value:function(){var e=this.context||q;return(0,w.jsx)(e,P({},this.props))}}]),c})(v.default.Component);X.contextType=Q,m.exports={Screen:X,ScreenContainer:function(e){var t=e.enabled,n=void 0===t?H:t,i=e.hasTwoStates,o=(0,u.default)(e,B);return n?i?(0,w.jsx)(U.NativeScreenNavigationContainer,P({},o)):(0,w.jsx)(U.NativeScreenContainer,P({},o)):(0,w.jsx)(f.View,P({},o))},ScreenContext:Q,ScreenStack:function(e){var t=e.children,n=(0,u.default)(e,C),i=v.default.Children.count(t),o=v.default.Children.map(t,(function(e,t){var n,o,c,l,u=e.props,s=e.key,v=null!=(n=null==u?void 0:u.descriptor)?n:null==u||null==(o=u.descriptors)?void 0:o[s],f=null!=(c=null==v||null==(l=v.options)?void 0:l.freezeOnBlur)?c:D;return(0,w.jsx)(L,{freeze:f&&i-t>1,children:e})}));return(0,w.jsx)(U.NativeScreenStack,P(P({},n),{},{children:o}))},InnerScreen:q,SearchBar:K,FullWindowOverlay:function(e){return(0,w.jsx)(U.NativeFullWindowOverlay,{style:{position:'absolute',width:'100%',height:'100%'},children:e.children})},get NativeScreen(){return U.NativeScreen},get NativeScreenContainer(){return U.NativeScreenContainer},get NativeScreenNavigationContainer(){return U.NativeScreenNavigationContainer},get ScreenStackHeaderConfig(){return U.NativeScreenStackHeaderConfig},get ScreenStackHeaderSubview(){return U.NativeScreenStackHeaderSubview},get SearchBarCommands(){return U.NativeSearchBarCommands},ScreenStackHeaderBackButtonImage:function(e){return(0,w.jsx)(U.NativeScreenStackHeaderSubview,{type:"back",style:J.headerSubview,children:(0,w.jsx)(f.Image,P({resizeMode:"center",fadeDuration:0},e))})},ScreenStackHeaderRightView:function(e){return(0,w.jsx)(U.NativeScreenStackHeaderSubview,P(P({},e),{},{type:"right",style:J.headerSubview}))},ScreenStackHeaderLeftView:function(e){return(0,w.jsx)(U.NativeScreenStackHeaderSubview,P(P({},e),{},{type:"left",style:J.headerSubview}))},ScreenStackHeaderCenterView:function(e){return(0,w.jsx)(U.NativeScreenStackHeaderSubview,P(P({},e),{},{type:"center",style:J.headerSubview}))},ScreenStackHeaderSearchBarView:function(e){return(0,w.jsx)(U.NativeScreenStackHeaderSubview,P(P({},e),{},{type:"searchBar",style:J.headerSubview}))},enableScreens:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];(H=e)&&!f.UIManager.getViewManagerConfig('RNSScreen')&&console.error("Screen native module hasn't been linked. Please check the react-native-screens README for more details")},enableFreeze:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=parseInt(S.version.split('.')[1]);0===t||t>=64||!e||console.warn('react-freeze library requires at least react-native 0.64. Please upgrade your react-native version in order to use this feature.'),D=e},screensEnabled:function(){return H},shouldUseActivityState:!0,useTransitionProgress:y.default,isSearchBarAvailableForCurrentPlatform:b.isSearchBarAvailableForCurrentPlatform,isNewBackTitleImplementation:b.isNewBackTitleImplementation,executeNativeBackPress:b.executeNativeBackPress}}),437,[6,8,9,16,18,15,40,180,51,101,2,438,439,440,441,442,220,443,444,445,446,447,448,449,450]);
|
|
487
487
|
__d((function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.Freeze=function(o){var u=o.freeze,c=o.children,l=o.placeholder,p=void 0===l?null:l;return(0,n.jsx)(t.Suspense,{fallback:p,children:(0,n.jsx)(f,{freeze:u,children:c})})};var t=(function(t,n){if(!n&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var f=o(n);if(f&&f.has(t))return f.get(t);var u={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in t)if("default"!==l&&Object.prototype.hasOwnProperty.call(t,l)){var p=c?Object.getOwnPropertyDescriptor(t,l):null;p&&(p.get||p.set)?Object.defineProperty(u,l,p):u[l]=t[l]}u.default=t,f&&f.set(t,u);return u})(r(d[0])),n=r(d[1]);function o(t){if("function"!=typeof WeakMap)return null;var n=new WeakMap,f=new WeakMap;return(o=function(t){return t?f:n})(t)}function f(o){var f=o.freeze,u=o.children,c=(0,t.useRef)({}).current;if(f&&!c.promise)throw c.promise=new Promise((function(t){c.resolve=t})),c.promise;if(f)throw c.promise;return c.promise&&(c.resolve(),c.promise=void 0),(0,n.jsx)(t.Fragment,{children:u})}}),438,[101,220]);
|
|
488
|
-
__d((function(e,s,t,r,i,a,c){i.exports={name:"react-native",version:"0.73.
|
|
488
|
+
__d((function(e,s,t,r,i,a,c){i.exports={name:"react-native",version:"0.73.2",description:"A framework for building native apps using React",license:"MIT",repository:{type:"git",url:"https://github.com/facebook/react-native.git",directory:"packages/react-native"},homepage:"https://reactnative.dev/",keywords:["react","react-native","android","ios","mobile","cross-platform","app-framework","mobile-development"],bugs:"https://github.com/facebook/react-native/issues",engines:{node:">=18"},bin:"./cli.js",types:"types","jest-junit":{outputDirectory:"reports/junit",outputName:"js-test-results.xml"},files:["android","build.gradle.kts","cli.js","flow","gradle.properties","gradle/libs.versions.toml","index.js","interface.js","jest-preset.js","jest","Libraries","LICENSE","local-cli","React-Core.podspec","react-native.config.js","React.podspec","React","ReactAndroid","ReactCommon","README.md","rn-get-polyfills.js","scripts/compose-source-maps.js","scripts/find-node-for-xcode.sh","scripts/generate-codegen-artifacts.js","scripts/generate-provider-cli.js","scripts/generate-specs-cli.js","scripts/codegen","!scripts/codegen/__tests__","!scripts/codegen/__test_fixtures__","scripts/hermes/hermes-utils.js","scripts/hermes/prepare-hermes-for-build.js","scripts/ios-configure-glog.sh","scripts/xcode/with-environment.sh","scripts/native_modules.rb","scripts/node-binary.sh","scripts/packager.sh","scripts/packager-reporter.js","scripts/react_native_pods_utils/script_phases.rb","scripts/react_native_pods_utils/script_phases.sh","scripts/react_native_pods.rb","scripts/cocoapods","!scripts/cocoapods/__tests__","scripts/react-native-xcode.sh","sdks/.hermesversion","sdks/hermes-engine","sdks/hermesc","settings.gradle.kts","template.config.js","template","!template/node_modules","!template/package-lock.json","!template/yarn.lock","third-party-podspecs","types"],scripts:{prepack:"cp ../../README.md ."},peerDependencies:{react:"18.2.0"},dependencies:{"@jest/create-cache-key-function":"^29.6.3","@react-native-community/cli":"12.3.0","@react-native-community/cli-platform-android":"12.3.0","@react-native-community/cli-platform-ios":"12.3.0","@react-native/assets-registry":"0.73.1","@react-native/community-cli-plugin":"0.73.12","@react-native/codegen":"0.73.2","@react-native/gradle-plugin":"0.73.4","@react-native/js-polyfills":"0.73.1","@react-native/normalize-colors":"0.73.2","@react-native/virtualized-lists":"0.73.4","abort-controller":"^3.0.0",anser:"^1.4.9","ansi-regex":"^5.0.0","base64-js":"^1.5.1","deprecated-react-native-prop-types":"^5.0.0","event-target-shim":"^5.0.1","flow-enums-runtime":"^0.0.6",invariant:"^2.2.4","jest-environment-node":"^29.6.3","jsc-android":"^250231.0.0","memoize-one":"^5.0.0","metro-runtime":"^0.80.3","metro-source-map":"^0.80.3",mkdirp:"^0.5.1",nullthrows:"^1.1.1","pretty-format":"^26.5.2",promise:"^8.3.0","react-devtools-core":"^4.27.7","react-refresh":"^0.14.0","react-shallow-renderer":"^16.15.0","regenerator-runtime":"^0.13.2",scheduler:"0.24.0-canary-efb381bbf-20230505","stacktrace-parser":"^0.1.10","whatwg-fetch":"^3.0.0",ws:"^6.2.2",yargs:"^17.6.2"},codegenConfig:{libraries:[{name:"FBReactNativeSpec",type:"modules",ios:{},android:{},jsSrcsDir:"Libraries"},{name:"rncore",type:"components",ios:{},android:{},jsSrcsDir:"Libraries"}]}}}),439,[]);
|
|
489
489
|
__d((function(g,r,i,a,m,e,d){function t(n){if("function"!=typeof WeakMap)return null;var o=new WeakMap,u=new WeakMap;return(t=function(t){return t?u:o})(n)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=(function(n,o){if(!o&&n&&n.__esModule)return n;if(null===n||"object"!=typeof n&&"function"!=typeof n)return{default:n};var u=t(o);if(u&&u.has(n))return u.get(n);var f={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in n)if("default"!==l&&Object.prototype.hasOwnProperty.call(n,l)){var p=c?Object.getOwnPropertyDescriptor(n,l):null;p&&(p.get||p.set)?Object.defineProperty(f,l,p):f[l]=n[l]}f.default=n,u&&u.set(n,f);return f})(r(d[0])).createContext(void 0);e.default=n}),440,[101]);
|
|
490
490
|
__d((function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=n.useContext(o.default);if(void 0===t)throw new Error("Couldn't find values for transition progress. Are you inside a screen in Native Stack?");return t};var n=(function(t,n){if(!n&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var o=u(n);if(o&&o.has(t))return o.get(t);var f={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in t)if("default"!==l&&Object.prototype.hasOwnProperty.call(t,l)){var p=c?Object.getOwnPropertyDescriptor(t,l):null;p&&(p.get||p.set)?Object.defineProperty(f,l,p):f[l]=t[l]}f.default=t,o&&o.set(t,f);return f})(r(d[1])),o=t(r(d[2]));function u(t){if("function"!=typeof WeakMap)return null;var n=new WeakMap,o=new WeakMap;return(u=function(t){return t?o:n})(t)}}),441,[6,101,440]);
|
|
491
491
|
__d((function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.executeNativeBackPress=function(){return t.BackHandler.exitApp(),!0},e.isSearchBarAvailableForCurrentPlatform=e.isNewBackTitleImplementation=void 0;var t=r(d[0]),n=['ios','android'].includes("ios");e.isSearchBarAvailableForCurrentPlatform=n;e.isNewBackTitleImplementation=!0}),442,[2]);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-dev-launcher",
|
|
3
3
|
"title": "Expo Development Launcher",
|
|
4
|
-
"version": "3.6.
|
|
4
|
+
"version": "3.6.2",
|
|
5
5
|
"description": "Pre-release version of the Expo development launcher package for testing.",
|
|
6
6
|
"main": "build/DevLauncher.js",
|
|
7
7
|
"types": "build/DevLauncher.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"homepage": "https://docs.expo.dev",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"ajv": "8.11.0",
|
|
34
|
-
"expo-dev-menu": "4.5.
|
|
34
|
+
"expo-dev-menu": "4.5.3",
|
|
35
35
|
"expo-manifests": "~0.13.0",
|
|
36
36
|
"resolve-from": "^5.0.0",
|
|
37
37
|
"semver": "^7.5.3"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"graphql": "^16.0.1",
|
|
53
53
|
"graphql-request": "^3.6.1",
|
|
54
54
|
"react": "18.2.0",
|
|
55
|
-
"react-native": "0.73.
|
|
55
|
+
"react-native": "0.73.2",
|
|
56
56
|
"react-query": "^3.34.16",
|
|
57
57
|
"url": "^0.11.0"
|
|
58
58
|
},
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"./setupTests.ts"
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "ca014bf2516c7644ef303f4c21fdd68de4d99f76"
|
|
70
70
|
}
|