{"ast":null,"code":"'use strict';\nfunction deepFreezeAndThrowOnMutationInDev(object) {\n  if (__DEV__) {\n    if (typeof object !== 'object' || object === null || Object.isFrozen(object) || Object.isSealed(object)) {\n      return object;\n    }\n    var keys = Object.keys(object);\n    var _hasOwnProperty = Object.prototype.hasOwnProperty;\n    for (var i = 0; i < keys.length; i++) {\n      var key = keys[i];\n      if (_hasOwnProperty.call(object, key)) {\n        Object.defineProperty(object, key, {\n          get: identity.bind(null, object[key])\n        });\n        Object.defineProperty(object, key, {\n          set: throwOnImmutableMutation.bind(null, key)\n        });\n      }\n    }\n    Object.freeze(object);\n    Object.seal(object);\n    for (var _i = 0; _i < keys.length; _i++) {\n      var _key = keys[_i];\n      if (_hasOwnProperty.call(object, _key)) {\n        deepFreezeAndThrowOnMutationInDev(object[_key]);\n      }\n    }\n  }\n  return object;\n}\nfunction throwOnImmutableMutation(key, value) {\n  throw Error('You attempted to set the key `' + key + '` with the value `' + JSON.stringify(value) + '` on an object that is meant to be immutable ' + 'and has been frozen.');\n}\nfunction identity(value) {\n  return value;\n}\nmodule.exports = deepFreezeAndThrowOnMutationInDev;","map":{"version":3,"names":["deepFreezeAndThrowOnMutationInDev","object","__DEV__","Object","isFrozen","isSealed","keys","hasOwnProperty","prototype","i","length","key","call","defineProperty","get","identity","bind","set","throwOnImmutableMutation","freeze","seal","value","Error","JSON","stringify","module","exports"],"sources":["/Users/Daniel.Antelo/Workspaces/expo-template-reactrouter-nativebase/node_modules/react-native/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @format\n * @flow strict\n */\n\n'use strict';\n\n/**\n * If your application is accepting different values for the same field over\n * time and is doing a diff on them, you can either (1) create a copy or\n * (2) ensure that those values are not mutated behind two passes.\n * This function helps you with (2) by freezing the object and throwing if\n * the user subsequently modifies the value.\n *\n * There are two caveats with this function:\n *   - If the call site is not in strict mode, it will only throw when\n *     mutating existing fields, adding a new one\n *     will unfortunately fail silently :(\n *   - If the object is already frozen or sealed, it will not continue the\n *     deep traversal and will leave leaf nodes unfrozen.\n *\n * Freezing the object and adding the throw mechanism is expensive and will\n * only be used in DEV.\n */\nfunction deepFreezeAndThrowOnMutationInDev<T: {...} | Array<mixed>>(\n  object: T,\n): T {\n  if (__DEV__) {\n    if (\n      typeof object !== 'object' ||\n      object === null ||\n      Object.isFrozen(object) ||\n      Object.isSealed(object)\n    ) {\n      return object;\n    }\n\n    // $FlowFixMe[not-an-object] `object` can be an array, but Object.keys works with arrays too\n    const keys = Object.keys((object: {...} | Array<mixed>));\n    // $FlowFixMe[method-unbinding] added when improving typing for this parameters\n    const hasOwnProperty = Object.prototype.hasOwnProperty;\n\n    for (let i = 0; i < keys.length; i++) {\n      const key = keys[i];\n      if (hasOwnProperty.call(object, key)) {\n        Object.defineProperty(object, key, {\n          get: identity.bind(null, object[key]),\n        });\n        Object.defineProperty(object, key, {\n          set: throwOnImmutableMutation.bind(null, key),\n        });\n      }\n    }\n\n    Object.freeze(object);\n    Object.seal(object);\n\n    for (let i = 0; i < keys.length; i++) {\n      const key = keys[i];\n      if (hasOwnProperty.call(object, key)) {\n        deepFreezeAndThrowOnMutationInDev(object[key]);\n      }\n    }\n  }\n  return object;\n}\n\n/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's\n * LTI update could not be added via codemod */\nfunction throwOnImmutableMutation(key: empty, value) {\n  throw Error(\n    'You attempted to set the key `' +\n      key +\n      '` with the value `' +\n      JSON.stringify(value) +\n      '` on an object that is meant to be immutable ' +\n      'and has been frozen.',\n  );\n}\n\nfunction identity(value: mixed) {\n  return value;\n}\n\nmodule.exports = deepFreezeAndThrowOnMutationInDev;\n"],"mappings":"AAUA,YAAY;AAmBZ,SAASA,iCAAiCA,CACxCC,MAAS,EACN;EACH,IAAIC,OAAO,EAAE;IACX,IACE,OAAOD,MAAM,KAAK,QA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