c6f69747412f989294bb72900d1f2187.json 3.37 KB
{"ast":null,"code":"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _ReactNativePropRegistry=_interopRequireDefault(require(\"../../modules/ReactNativePropRegistry\"));var _invariant=_interopRequireDefault(require(\"fbjs/lib/invariant\"));function getStyle(style){if(typeof style==='number'){return _ReactNativePropRegistry.default.getByID(style);}return style;}function flattenStyle(style){if(!style){return undefined;}if(process.env.NODE_ENV!=='production'){(0,_invariant.default)(style!==true,'style may be false but not true');}if(!Array.isArray(style)){return getStyle(style);}var result={};for(var i=0,styleLength=style.length;i<styleLength;++i){var computedStyle=flattenStyle(style[i]);if(computedStyle){for(var key in computedStyle){var value=computedStyle[key];result[key]=value;}}}return result;}var _default=flattenStyle;exports.default=_default;","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/react-native-web/dist/exports/StyleSheet/flattenStyle.js"],"names":["getStyle","style","ReactNativePropRegistry","getByID","flattenStyle","undefined","process","env","NODE_ENV","Array","isArray","result","i","styleLength","length","computedStyle","key","value"],"mappings":"mKASA,sGACA,qEAEA,QAASA,CAAAA,QAAT,CAAkBC,KAAlB,CAAyB,CACvB,GAAI,MAAOA,CAAAA,KAAP,GAAiB,QAArB,CAA+B,CAC7B,MAAOC,kCAAwBC,OAAxB,CAAgCF,KAAhC,CAAP,CACD,CAED,MAAOA,CAAAA,KAAP,CACD,CAED,QAASG,CAAAA,YAAT,CAAsBH,KAAtB,CAA6B,CAC3B,GAAI,CAACA,KAAL,CAAY,CACV,MAAOI,CAAAA,SAAP,CACD,CAED,GAAIC,OAAO,CAACC,GAAR,CAAYC,QAAZ,GAAyB,YAA7B,CAA2C,CACzC,uBAAUP,KAAK,GAAK,IAApB,CAA0B,iCAA1B,EACD,CAED,GAAI,CAACQ,KAAK,CAACC,OAAN,CAAcT,KAAd,CAAL,CAA2B,CACzB,MAAOD,CAAAA,QAAQ,CAACC,KAAD,CAAf,CACD,CAED,GAAIU,CAAAA,MAAM,CAAG,EAAb,CAEA,IAAK,GAAIC,CAAAA,CAAC,CAAG,CAAR,CAAWC,WAAW,CAAGZ,KAAK,CAACa,MAApC,CAA4CF,CAAC,CAAGC,WAAhD,CAA6D,EAAED,CAA/D,CAAkE,CAChE,GAAIG,CAAAA,aAAa,CAAGX,YAAY,CAACH,KAAK,CAACW,CAAD,CAAN,CAAhC,CAEA,GAAIG,aAAJ,CAAmB,CACjB,IAAK,GAAIC,CAAAA,GAAT,GAAgBD,CAAAA,aAAhB,CAA+B,CAC7B,GAAIE,CAAAA,KAAK,CAAGF,aAAa,CAACC,GAAD,CAAzB,CACAL,MAAM,CAACK,GAAD,CAAN,CAAcC,KAAd,CACD,CACF,CACF,CAED,MAAON,CAAAA,MAAP,CACD,C,aAEcP,Y","sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport ReactNativePropRegistry from '../../modules/ReactNativePropRegistry';\nimport invariant from 'fbjs/lib/invariant';\n\nfunction getStyle(style) {\n  if (typeof style === 'number') {\n    return ReactNativePropRegistry.getByID(style);\n  }\n\n  return style;\n}\n\nfunction flattenStyle(style) {\n  if (!style) {\n    return undefined;\n  }\n\n  if (process.env.NODE_ENV !== 'production') {\n    invariant(style !== true, 'style may be false but not true');\n  }\n\n  if (!Array.isArray(style)) {\n    return getStyle(style);\n  }\n\n  var result = {};\n\n  for (var i = 0, styleLength = style.length; i < styleLength; ++i) {\n    var computedStyle = flattenStyle(style[i]);\n\n    if (computedStyle) {\n      for (var key in computedStyle) {\n        var value = computedStyle[key];\n        result[key] = value;\n      }\n    }\n  }\n\n  return result;\n}\n\nexport default flattenStyle;"]},"metadata":{},"sourceType":"script"}