You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
5.6 KiB

{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport Constants, { ExecutionEnvironment } from 'expo-constants';\nimport * as React from 'react';\nimport Platform from \"react-native-web/dist/exports/Platform\";\nimport DevLoadingView from \"../environment/DevLoadingView\";\nexport function withDevTools(AppRootComponent) {\n var useOptionalKeepAwake = function () {\n if (Platform.OS !== 'web') {\n try {\n var _require = require('expo-keep-awake'),\n useKeepAwake = _require.useKeepAwake,\n ExpoKeepAwakeTag = _require.ExpoKeepAwakeTag;\n return function () {\n return useKeepAwake(ExpoKeepAwakeTag, {\n suppressDeactivateWarnings: true\n });\n };\n } catch (_unused) {}\n }\n return function () {};\n }();\n var shouldUseExpoFastRefreshView = Platform.select({\n web: true,\n ios: Constants.executionEnvironment !== ExecutionEnvironment.Bare,\n default: false\n });\n function WithDevTools(props) {\n useOptionalKeepAwake();\n if (shouldUseExpoFastRefreshView) {\n return React.createElement(React.Fragment, null, React.createElement(AppRootComponent, _objectSpread({}, props)), React.createElement(DevLoadingView, null));\n }\n return React.createElement(AppRootComponent, _objectSpread({}, props));\n }\n var name = AppRootComponent.displayName || AppRootComponent.name || 'Anonymous';\n WithDevTools.displayName = \"withDevTools(\" + name + \")\";\n return WithDevTools;\n}","map":{"version":3,"mappings":";;;AAAA,OAAOA,SAAS,IAAIC,oBAAoB,QAAQ,gBAAgB;AAChE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAAC;AAG/B,OAAOC,cAAc;AAMrB,OAAM,SAAUC,YAAY,CAC1BC,gBAA4B;EAI5B,IAAMC,oBAAoB,GAA4B,YAAK;IACzD,IAAIC,QAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;MACzB,IAAI;QAEF,eAA2CC,OAAO,CAAC,iBAAiB,CAAC;UAA7DC,YAAY,YAAZA,YAAY;UAAEC,gBAAgB,YAAhBA,gBAAgB;QACtC,OAAO;UAAA,OAAMD,YAAY,CAACC,gBAAgB,EAAE;YAAEC,0BAA0B,EAAE;UAAI,CAAE,CAAC;QAAA;OAClF,CAAC,gBAAM;;IAGV,OAAO,YAAK,CAAE,CAAC;EACjB,CAAC,EAAG;EAEJ,IAAMC,4BAA4B,GAAGN,QAAQ,CAACO,MAAM,CAAC;IACnDC,GAAG,EAAE,IAAI;IACTC,GAAG,EAAEhB,SAAS,CAACiB,oBAAoB,KAAKhB,oBAAoB,CAACiB,IAAI;IACjEC,OAAO,EAAE;GACV,CAAC;EAEF,SAASC,YAAY,CAACC,KAAuC;IAC3Df,oBAAoB,EAAE;IAEtB,IAAIO,4BAA4B,EAAE;MAChC,OACEX,0CACEA,oBAACG,gBAAgB,oBAAKgB,KAAK,EAAI,EAC/BnB,oBAACC,cAAc,OAAG,CACjB;;IAIP,OAAOD,oBAACG,gBAAgB,oBAAKgB,KAAK,EAAI;EACxC;EAEA,IAAMC,IAAI,GAAGjB,gBAAgB,CAACkB,WAAW,IAAIlB,gBAAgB,CAACiB,IAAI,IAAI,WAAW;EACjFF,YAAY,CAACG,WAAW,qBAAmBD,IAAI,MAAG;EAElD,OAAOF,YAAY;AACrB","names":["Constants","ExecutionEnvironment","React","DevLoadingView","withDevTools","AppRootComponent","useOptionalKeepAwake","Platform","OS","require","useKeepAwake","ExpoKeepAwakeTag","suppressDeactivateWarnings","shouldUseExpoFastRefreshView","select","web","ios","executionEnvironment","Bare","default","WithDevTools","props","name","displayName"],"sources":["/Users/mathildejean/Documents/BUT/LaSuperMeteo/LaSuperMeteo/iut-expo-starter/node_modules/expo/src/launch/withDevTools.tsx"],"sourcesContent":["import Constants, { ExecutionEnvironment } from 'expo-constants';\nimport * as React from 'react';\nimport { Platform } from 'react-native';\n\nimport DevLoadingView from '../environment/DevLoadingView';\n\n/**\n * Append the Expo Fast Refresh view and optionally\n * keep the screen awake if `expo-keep-awake` is installed.\n */\nexport function withDevTools<TComponent extends React.ComponentType<any>>(\n AppRootComponent: TComponent\n): React.ComponentType<React.ComponentProps<TComponent>> {\n // This hook can be optionally imported because __DEV__ never changes during runtime.\n // Using __DEV__ like this enables tree shaking to remove the hook in production.\n const useOptionalKeepAwake: (tag?: string) => void = (() => {\n if (Platform.OS !== 'web') {\n try {\n // Optionally import expo-keep-awake\n const { useKeepAwake, ExpoKeepAwakeTag } = require('expo-keep-awake');\n return () => useKeepAwake(ExpoKeepAwakeTag, { suppressDeactivateWarnings: true });\n } catch {}\n }\n\n return () => {};\n })();\n\n const shouldUseExpoFastRefreshView = Platform.select({\n web: true,\n ios: Constants.executionEnvironment !== ExecutionEnvironment.Bare,\n default: false,\n });\n\n function WithDevTools(props: React.ComponentProps<TComponent>) {\n useOptionalKeepAwake();\n\n if (shouldUseExpoFastRefreshView) {\n return (\n <>\n <AppRootComponent {...props} />\n <DevLoadingView />\n </>\n );\n }\n\n return <AppRootComponent {...props} />;\n }\n\n const name = AppRootComponent.displayName || AppRootComponent.name || 'Anonymous';\n WithDevTools.displayName = `withDevTools(${name})`;\n\n return WithDevTools;\n}\n"]},"metadata":{},"sourceType":"module","externalDependencies":[]}