{"ast":null,"code":"import * as React from 'react';\nimport Dimensions from \"react-native-web/dist/exports/Dimensions\";\nimport Platform from \"react-native-web/dist/exports/Platform\";\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport { initialWindowMetrics, SafeAreaInsetsContext, SafeAreaProvider } from 'react-native-safe-area-context';\nconst {\n  width = 0,\n  height = 0\n} = Dimensions.get('window');\nconst initialMetrics = Platform.OS === 'web' || initialWindowMetrics == null ? {\n  frame: {\n    x: 0,\n    y: 0,\n    width,\n    height\n  },\n  insets: {\n    top: 0,\n    left: 0,\n    right: 0,\n    bottom: 0\n  }\n} : initialWindowMetrics;\nexport default function SafeAreaProviderCompat({\n  children,\n  style\n}) {\n  return React.createElement(SafeAreaInsetsContext.Consumer, null, insets => {\n    if (insets) {\n      return React.createElement(View, {\n        style: [styles.container, style]\n      }, children);\n    }\n    return React.createElement(SafeAreaProvider, {\n      initialMetrics: initialMetrics,\n      style: style\n    }, children);\n  });\n}\nSafeAreaProviderCompat.initialMetrics = initialMetrics;\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1\n  }\n});","map":{"version":3,"names":["React","Dimensions","Platform","StyleSheet","View","initialWindowMetrics","SafeAreaInsetsContext","SafeAreaProvider","width","height","get","initialMetrics","OS","frame","x","y","insets","top","left","right","bottom","SafeAreaProviderCompat","children","style","createElement","Consumer","styles","container","create","flex"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/core/SafeAreaProviderCompat.tsx"],"sourcesContent":["/**\n * Ported from @react-navigation https://github.com/react-navigation/react-navigation/blob/main/packages/elements/src/SafeAreaProviderCompat.tsx\n */\nimport * as React from 'react';\nimport {\n  Dimensions,\n  Platform,\n  StyleProp,\n  StyleSheet,\n  View,\n  ViewStyle,\n} from 'react-native';\n\nimport {\n  initialWindowMetrics,\n  SafeAreaInsetsContext,\n  SafeAreaProvider,\n} from 'react-native-safe-area-context';\n\ntype Props = {\n  children: React.ReactNode;\n  style?: StyleProp<ViewStyle>;\n};\n\nconst { width = 0, height = 0 } = Dimensions.get('window');\n\n// To support SSR on web, we need to have empty insets for initial values\n// Otherwise there can be mismatch between SSR and client output\n// We also need to specify empty values to support tests environments\nconst initialMetrics =\n  Platform.OS === 'web' || initialWindowMetrics == null\n    ? {\n        frame: { x: 0, y: 0, width, height },\n        insets: { top: 0, left: 0, right: 0, bottom: 0 },\n      }\n    : initialWindowMetrics;\n\nexport default function SafeAreaProviderCompat({ children, style }: Props) {\n  return (\n    <SafeAreaInsetsContext.Consumer>\n      {(insets) => {\n        if (insets) {\n          // If we already have insets, don't wrap the stack in another safe area provider\n          // This avoids an issue with updates at the cost of potentially incorrect values\n          // https://github.com/react-navigation/react-navigation/issues/174\n          return <View style={[styles.container, style]}>{children}</View>;\n        }\n\n        return (\n          <SafeAreaProvider initialMetrics={initialMetrics} style={style}>\n            {children}\n          </SafeAreaProvider>\n        );\n      }}\n    </SafeAreaInsetsContext.Consumer>\n  );\n}\n\nSafeAreaProviderCompat.initialMetrics = initialMetrics;\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n  },\n});\n"],"mappings":"AAGA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,UAAA;AAAA,OAAAC,QAAA;AAAA,OAAAC,UAAA;AAAA,OAAAC,IAAA;AAU9B,SACEC,oBAAoB,EACpBC,qBAAqB,EACrBC,gBAAgB,QACX,gCAAgC;AAOvC,MAAM;EAAEC,KAAK,GAAG,CAAC;EAAEC,MAAM,GAAG;AAAE,CAAC,GAAGR,UAAU,CAACS,GAAG,CAAC,QAAQ,CAAC;AAK1D,MAAMC,cAAc,GAClBT,QAAQ,CAACU,EAAE,KAAK,KAAK,IAAIP,oBAAoB,IAAI,IAAI,GACjD;EACEQ,KAAK,EAAE;IAAEC,CAAC,EAAE,CAAC;IAAEC,CAAC,EAAE,CAAC;IAAEP,KAAK;IAAEC;EAAO,CAAC;EACpCO,MAA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