de3b0eacfe2489acedbeaf17bca608c0.json 8.11 KB
{"ast":null,"code":"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _normalizeValueWithProperty=_interopRequireDefault(require(\"./normalizeValueWithProperty\"));var _resolveShadowValue=_interopRequireDefault(require(\"./resolveShadowValue\"));function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}var defaultOffset={height:0,width:0};function boxShadowReducer(resolvedStyle,style){var boxShadow=style.boxShadow;var shadow=(0,_resolveShadowValue.default)(style);if(shadow!=null){resolvedStyle.boxShadow=boxShadow?boxShadow+\", \"+shadow:shadow;}}function textShadowReducer(resolvedStyle,style){var textShadowColor=style.textShadowColor,textShadowOffset=style.textShadowOffset,textShadowRadius=style.textShadowRadius;var _ref=textShadowOffset||defaultOffset,height=_ref.height,width=_ref.width;var radius=textShadowRadius||0;var offsetX=(0,_normalizeValueWithProperty.default)(width);var offsetY=(0,_normalizeValueWithProperty.default)(height);var blurRadius=(0,_normalizeValueWithProperty.default)(radius);var color=(0,_normalizeValueWithProperty.default)(textShadowColor,'textShadowColor');if(color&&(height!==0||width!==0||radius!==0)&&offsetX!=null&&offsetY!=null&&blurRadius!=null){resolvedStyle.textShadow=offsetX+\" \"+offsetY+\" \"+blurRadius+\" \"+color;}}var createCompileableStyle=function createCompileableStyle(styles){var shadowColor=styles.shadowColor,shadowOffset=styles.shadowOffset,shadowOpacity=styles.shadowOpacity,shadowRadius=styles.shadowRadius,textShadowColor=styles.textShadowColor,textShadowOffset=styles.textShadowOffset,textShadowRadius=styles.textShadowRadius,nextStyles=_objectWithoutPropertiesLoose(styles,[\"shadowColor\",\"shadowOffset\",\"shadowOpacity\",\"shadowRadius\",\"textShadowColor\",\"textShadowOffset\",\"textShadowRadius\"]);if(shadowColor!=null||shadowOffset!=null||shadowOpacity!=null||shadowRadius!=null){boxShadowReducer(nextStyles,styles);}if(textShadowColor!=null||textShadowOffset!=null||textShadowRadius!=null){textShadowReducer(nextStyles,styles);}return nextStyles;};var _default=createCompileableStyle;exports.default=_default;","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/react-native-web/dist/exports/StyleSheet/createCompileableStyle.js"],"names":["_objectWithoutPropertiesLoose","source","excluded","target","sourceKeys","Object","keys","key","i","length","indexOf","defaultOffset","height","width","boxShadowReducer","resolvedStyle","style","boxShadow","shadow","textShadowReducer","textShadowColor","textShadowOffset","textShadowRadius","_ref","radius","offsetX","offsetY","blurRadius","color","textShadow","createCompileableStyle","styles","shadowColor","shadowOffset","shadowOpacity","shadowRadius","nextStyles"],"mappings":"mKAUA,gGACA,gFAXA,QAASA,CAAAA,6BAAT,CAAuCC,MAAvC,CAA+CC,QAA/C,CAAyD,CAAE,GAAID,MAAM,EAAI,IAAd,CAAoB,MAAO,EAAP,CAAW,GAAIE,CAAAA,MAAM,CAAG,EAAb,CAAiB,GAAIC,CAAAA,UAAU,CAAGC,MAAM,CAACC,IAAP,CAAYL,MAAZ,CAAjB,CAAsC,GAAIM,CAAAA,GAAJ,CAASC,CAAT,CAAY,IAAKA,CAAC,CAAG,CAAT,CAAYA,CAAC,CAAGJ,UAAU,CAACK,MAA3B,CAAmCD,CAAC,EAApC,CAAwC,CAAED,GAAG,CAAGH,UAAU,CAACI,CAAD,CAAhB,CAAqB,GAAIN,QAAQ,CAACQ,OAAT,CAAiBH,GAAjB,GAAyB,CAA7B,CAAgC,SAAUJ,MAAM,CAACI,GAAD,CAAN,CAAcN,MAAM,CAACM,GAAD,CAApB,CAA4B,CAAC,MAAOJ,CAAAA,MAAP,CAAgB,CAYnT,GAAIQ,CAAAA,aAAa,CAAG,CAClBC,MAAM,CAAE,CADU,CAElBC,KAAK,CAAE,CAFW,CAApB,CAKA,QAASC,CAA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A6C,GAA7C,CAAmDC,KAA9E,CACD,CACF,CAED,GAAIE,CAAAA,sBAAsB,CAAG,QAASA,CAAAA,sBAAT,CAAgCC,MAAhC,CAAwC,CACnE,GAAIC,CAAAA,WAAW,CAAGD,MAAM,CAACC,WAAzB,CACIC,YAAY,CAAGF,MAAM,CAACE,YAD1B,CAEIC,aAAa,CAAGH,MAAM,CAACG,aAF3B,CAGIC,YAAY,CAAGJ,MAAM,CAACI,YAH1B,CAIIf,eAAe,CAAGW,MAAM,CAACX,eAJ7B,CAKIC,gBAAgB,CAAGU,MAAM,CAACV,gBAL9B,CAMIC,gBAAgB,CAAGS,MAAM,CAACT,gBAN9B,CAOIc,UAAU,CAAGpC,6BAA6B,CAAC+B,MAAD,CAAS,CAAC,aAAD,CAAgB,cAAhB,CAAgC,eAAhC,CAAiD,cAAjD,CAAiE,iBAAjE,CAAoF,kBAApF,CAAwG,kBAAxG,CAAT,CAP9C,CASA,GAAIC,WAAW,EAAI,IAAf,EAAuBC,YAAY,EAAI,IAAvC,EAA+CC,aAAa,EAAI,IAAhE,EAAwEC,YAAY,EAAI,IAA5F,CAAkG,CAChGrB,gBAAgB,CAACsB,UAAD,CAAaL,MAAb,CAAhB,CACD,CAED,GAAIX,eAAe,EAAI,IAAnB,EAA2BC,gBAAgB,EAAI,IAA/C,EAAuDC,gBAAgB,EAAI,IAA/E,CAAqF,CACnFH,iBAAiB,CAACiB,UAAD,CAAaL,MAAb,CAAjB,CACD,CAED,MAAOK,CAAAA,UAAP,CACD,CAnBD,C,aAqBeN,sB","sourcesContent":["function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\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 normalizeValueWithProperty from './normalizeValueWithProperty';\nimport resolveShadowValue from './resolveShadowValue';\nvar defaultOffset = {\n  height: 0,\n  width: 0\n};\n\nfunction boxShadowReducer(resolvedStyle, style) {\n  var boxShadow = style.boxShadow;\n  var shadow = resolveShadowValue(style);\n\n  if (shadow != null) {\n    resolvedStyle.boxShadow = boxShadow ? boxShadow + \", \" + shadow : shadow;\n  }\n}\n\nfunction textShadowReducer(resolvedStyle, style) {\n  var textShadowColor = style.textShadowColor,\n      textShadowOffset = style.textShadowOffset,\n      textShadowRadius = style.textShadowRadius;\n\n  var _ref = textShadowOffset || defaultOffset,\n      height = _ref.height,\n      width = _ref.width;\n\n  var radius = textShadowRadius || 0;\n  var offsetX = normalizeValueWithProperty(width);\n  var offsetY = normalizeValueWithProperty(height);\n  var blurRadius = normalizeValueWithProperty(radius);\n  var color = normalizeValueWithProperty(textShadowColor, 'textShadowColor');\n\n  if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {\n    resolvedStyle.textShadow = offsetX + \" \" + offsetY + \" \" + blurRadius + \" \" + color;\n  }\n}\n\nvar createCompileableStyle = function createCompileableStyle(styles) {\n  var shadowColor = styles.shadowColor,\n      shadowOffset = styles.shadowOffset,\n      shadowOpacity = styles.shadowOpacity,\n      shadowRadius = styles.shadowRadius,\n      textShadowColor = styles.textShadowColor,\n      textShadowOffset = styles.textShadowOffset,\n      textShadowRadius = styles.textShadowRadius,\n      nextStyles = _objectWithoutPropertiesLoose(styles, [\"shadowColor\", \"shadowOffset\", \"shadowOpacity\", \"shadowRadius\", \"textShadowColor\", \"textShadowOffset\", \"textShadowRadius\"]);\n\n  if (shadowColor != null || shadowOffset != null || shadowOpacity != null || shadowRadius != null) {\n    boxShadowReducer(nextStyles, styles);\n  }\n\n  if (textShadowColor != null || textShadowOffset != null || textShadowRadius != null) {\n    textShadowReducer(nextStyles, styles);\n  }\n\n  return nextStyles;\n};\n\nexport default createCompileableStyle;"]},"metadata":{},"sourceType":"script"}