1 line
51 KiB
JSON
1 line
51 KiB
JSON
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport hash from '@emotion/hash';\nimport { removeCSS, updateCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport * as React from 'react';\n// @ts-ignore\nimport unitless from '@emotion/unitless';\nimport { compile, serialize, stringify } from 'stylis';\nimport { contentQuotesLinter, hashedAnimationLinter } from \"../linters\";\nimport StyleContext, { ATTR_CACHE_PATH, ATTR_MARK, ATTR_TOKEN, CSS_IN_JS_INSTANCE } from \"../StyleContext\";\nimport { isClientSide, toStyleStr } from \"../util\";\nimport { CSS_FILE_STYLE, existPath, getStyleAndHash } from \"../util/cacheMapUtil\";\nimport useGlobalCache from \"./useGlobalCache\";\nvar SKIP_CHECK = '_skip_check_';\nvar MULTI_VALUE = '_multi_value_';\n// ============================================================================\n// == Parser ==\n// ============================================================================\n// Preprocessor style content to browser support one\nexport function normalizeStyle(styleStr) {\n var serialized = serialize(compile(styleStr), stringify);\n return serialized.replace(/\\{%%%\\:[^;];}/g, ';');\n}\nfunction isCompoundCSSProperty(value) {\n return _typeof(value) === 'object' && value && (SKIP_CHECK in value || MULTI_VALUE in value);\n}\n\n// 注入 hash 值\nfunction injectSelectorHash(key, hashId, hashPriority) {\n if (!hashId) {\n return key;\n }\n var hashClassName = \".\".concat(hashId);\n var hashSelector = hashPriority === 'low' ? \":where(\".concat(hashClassName, \")\") : hashClassName;\n\n // 注入 hashId\n var keys = key.split(',').map(function (k) {\n var _firstPath$match;\n var fullPath = k.trim().split(/\\s+/);\n\n // 如果 Selector 第一个是 HTML Element,那我们就插到它的后面。反之,就插到最前面。\n var firstPath = fullPath[0] || '';\n var htmlElement = ((_firstPath$match = firstPath.match(/^\\w+/)) === null || _firstPath$match === void 0 ? void 0 : _firstPath$match[0]) || '';\n firstPath = \"\".concat(htmlElement).concat(hashSelector).concat(firstPath.slice(htmlElement.length));\n return [firstPath].concat(_toConsumableArray(fullPath.slice(1))).join(' ');\n });\n return keys.join(',');\n}\n// Parse CSSObject to style content\nexport var parseStyle = function parseStyle(interpolation) {\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n root: true,\n parentSelectors: []\n },\n root = _ref.root,\n injectHash = _ref.injectHash,\n parentSelectors = _ref.parentSelectors;\n var hashId = config.hashId,\n layer = config.layer,\n path = config.path,\n hashPriority = config.hashPriority,\n _config$transformers = config.transformers,\n transformers = _config$transformers === void 0 ? [] : _config$transformers,\n _config$linters = config.linters,\n linters = _config$linters === void 0 ? [] : _config$linters;\n var styleStr = '';\n var effectStyle = {};\n function parseKeyframes(keyframes) {\n var animationName = keyframes.getName(hashId);\n if (!effectStyle[animationName]) {\n var _parseStyle = parseStyle(keyframes.style, config, {\n root: false,\n parentSelectors: parentSelectors\n }),\n _parseStyle2 = _slicedToArray(_parseStyle, 1),\n _parsedStr = _parseStyle2[0];\n effectStyle[animationName] = \"@keyframes \".concat(keyframes.getName(hashId)).concat(_parsedStr);\n }\n }\n function flattenList(list) {\n var fullList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n list.forEach(function (item) {\n if (Array.isArray(item)) {\n flattenList(item, fullList);\n } else if (item) {\n fullList.push(item);\n }\n });\n return fullList;\n }\n var flattenStyleList = flattenList(Array.isArray(interpolation) ? interpolation : [interpolation]);\n flattenStyleList.forEach(function (originStyle) {\n // Only root level can use raw string\n var style = typeof originStyle === 'string' && !root ? {} : originStyle;\n if (typeof style === 'string') {\n styleStr += \"\".concat(style, \"\\n\");\n } else if (style._keyframe) {\n // Keyframe\n parseKeyframes(style);\n } else {\n var mergedStyle = transformers.reduce(function (prev, trans) {\n var _trans$visit;\n return (trans === null || trans === void 0 || (_trans$visit = trans.visit) === null || _trans$visit === void 0 ? void 0 : _trans$visit.call(trans, prev)) || prev;\n }, style);\n\n // Normal CSSObject\n Object.keys(mergedStyle).forEach(function (key) {\n var value = mergedStyle[key];\n if (_typeof(value) === 'object' && value && (key !== 'animationName' || !value._keyframe) && !isCompoundCSSProperty(value)) {\n var subInjectHash = false;\n\n // 当成嵌套对象来处理\n var mergedKey = key.trim();\n // Whether treat child as root. In most case it is false.\n var nextRoot = false;\n\n // 拆分多个选择器\n if ((root || injectHash) && hashId) {\n if (mergedKey.startsWith('@')) {\n // 略过媒体查询,交给子节点继续插入 hashId\n subInjectHash = true;\n } else {\n // 注入 hashId\n mergedKey = injectSelectorHash(key, hashId, hashPriority);\n }\n } else if (root && !hashId && (mergedKey === '&' || mergedKey === '')) {\n // In case of `{ '&': { a: { color: 'red' } } }` or `{ '': { a: { color: 'red' } } }` without hashId,\n // we will get `&{a:{color:red;}}` or `{a:{color:red;}}` string for stylis to compile.\n // But it does not conform to stylis syntax,\n // and finally we will get `{color:red;}` as css, which is wrong.\n // So we need to remove key in root, and treat child `{ a: { color: 'red' } }` as root.\n mergedKey = '';\n nextRoot = true;\n }\n var _parseStyle3 = parseStyle(value, config, {\n root: nextRoot,\n injectHash: subInjectHash,\n parentSelectors: [].concat(_toConsumableArray(parentSelectors), [mergedKey])\n }),\n _parseStyle4 = _slicedToArray(_parseStyle3, 2),\n _parsedStr2 = _parseStyle4[0],\n childEffectStyle = _parseStyle4[1];\n effectStyle = _objectSpread(_objectSpread({}, effectStyle), childEffectStyle);\n styleStr += \"\".concat(mergedKey).concat(_parsedStr2);\n } else {\n var _value;\n function appendStyle(cssKey, cssValue) {\n if (process.env.NODE_ENV !== 'production' && (_typeof(value) !== 'object' || !(value !== null && value !== void 0 && value[SKIP_CHECK]))) {\n [contentQuotesLinter, hashedAnimationLinter].concat(_toConsumableArray(linters)).forEach(function (linter) {\n return linter(cssKey, cssValue, {\n path: path,\n hashId: hashId,\n parentSelectors: parentSelectors\n });\n });\n }\n\n // 如果是样式则直接插入\n var styleName = cssKey.replace(/[A-Z]/g, function (match) {\n return \"-\".concat(match.toLowerCase());\n });\n\n // Auto suffix with px\n var formatValue = cssValue;\n if (!unitless[cssKey] && typeof formatValue === 'number' && formatValue !== 0) {\n formatValue = \"\".concat(formatValue, \"px\");\n }\n\n // handle animationName & Keyframe value\n if (cssKey === 'animationName' && cssValue !== null && cssValue !== void 0 && cssValue._keyframe) {\n parseKeyframes(cssValue);\n formatValue = cssValue.getName(hashId);\n }\n styleStr += \"\".concat(styleName, \":\").concat(formatValue, \";\");\n }\n var actualValue = (_value = value === null || value === void 0 ? void 0 : value.value) !== null && _value !== void 0 ? _value : value;\n if (_typeof(value) === 'object' && value !== null && value !== void 0 && value[MULTI_VALUE] && Array.isArray(actualValue)) {\n actualValue.forEach(function (item) {\n appendStyle(key, item);\n });\n } else {\n appendStyle(key, actualValue);\n }\n }\n });\n }\n });\n if (!root) {\n styleStr = \"{\".concat(styleStr, \"}\");\n } else if (layer) {\n styleStr = \"@layer \".concat(layer.name, \" {\").concat(styleStr, \"}\");\n if (layer.dependencies) {\n effectStyle[\"@layer \".concat(layer.name)] = layer.dependencies.map(function (deps) {\n return \"@layer \".concat(deps, \", \").concat(layer.name, \";\");\n }).join('\\n');\n }\n }\n return [styleStr, effectStyle];\n};\n\n// ============================================================================\n// == Register ==\n// ============================================================================\nexport function uniqueHash(path, styleStr) {\n return hash(\"\".concat(path.join('%')).concat(styleStr));\n}\nfunction Empty() {\n return null;\n}\nexport var STYLE_PREFIX = 'style';\n/**\n * Register a style to the global style sheet.\n */\nexport default function useStyleRegister(info, styleFn) {\n var token = info.token,\n path = info.path,\n hashId = info.hashId,\n layer = info.layer,\n nonce = info.nonce,\n clientOnly = info.clientOnly,\n _info$order = info.order,\n order = _info$order === void 0 ? 0 : _info$order;\n var _React$useContext = React.useContext(StyleContext),\n autoClear = _React$useContext.autoClear,\n mock = _React$useContext.mock,\n defaultCache = _React$useContext.defaultCache,\n hashPriority = _React$useContext.hashPriority,\n container = _React$useContext.container,\n ssrInline = _React$useContext.ssrInline,\n transformers = _React$useContext.transformers,\n linters = _React$useContext.linters,\n cache = _React$useContext.cache,\n enableLayer = _React$useContext.layer;\n var tokenKey = token._tokenKey;\n var fullPath = [tokenKey];\n if (enableLayer) {\n fullPath.push('layer');\n }\n fullPath.push.apply(fullPath, _toConsumableArray(path));\n\n // Check if need insert style\n var isMergedClientSide = isClientSide;\n if (process.env.NODE_ENV !== 'production' && mock !== undefined) {\n isMergedClientSide = mock === 'client';\n }\n var _useGlobalCache = useGlobalCache(STYLE_PREFIX, fullPath,\n // Create cache if needed\n function () {\n var cachePath = fullPath.join('|');\n\n // Get style from SSR inline style directly\n if (existPath(cachePath)) {\n var _getStyleAndHash = getStyleAndHash(cachePath),\n _getStyleAndHash2 = _slicedToArray(_getStyleAndHash, 2),\n inlineCacheStyleStr = _getStyleAndHash2[0],\n styleHash = _getStyleAndHash2[1];\n if (inlineCacheStyleStr) {\n return [inlineCacheStyleStr, tokenKey, styleHash, {}, clientOnly, order];\n }\n }\n\n // Generate style\n var styleObj = styleFn();\n var _parseStyle5 = parseStyle(styleObj, {\n hashId: hashId,\n hashPriority: hashPriority,\n layer: enableLayer ? layer : undefined,\n path: path.join('-'),\n transformers: transformers,\n linters: linters\n }),\n _parseStyle6 = _slicedToArray(_parseStyle5, 2),\n parsedStyle = _parseStyle6[0],\n effectStyle = _parseStyle6[1];\n var styleStr = normalizeStyle(parsedStyle);\n var styleId = uniqueHash(fullPath, styleStr);\n return [styleStr, tokenKey, styleId, effectStyle, clientOnly, order];\n },\n // Remove cache if no need\n function (_ref2, fromHMR) {\n var _ref3 = _slicedToArray(_ref2, 3),\n styleId = _ref3[2];\n if ((fromHMR || autoClear) && isClientSide) {\n removeCSS(styleId, {\n mark: ATTR_MARK\n });\n }\n },\n // Effect: Inject style here\n function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 4),\n styleStr = _ref5[0],\n _ = _ref5[1],\n styleId = _ref5[2],\n effectStyle = _ref5[3];\n if (isMergedClientSide && styleStr !== CSS_FILE_STYLE) {\n var mergedCSSConfig = {\n mark: ATTR_MARK,\n prepend: enableLayer ? false : 'queue',\n attachTo: container,\n priority: order\n };\n var nonceStr = typeof nonce === 'function' ? nonce() : nonce;\n if (nonceStr) {\n mergedCSSConfig.csp = {\n nonce: nonceStr\n };\n }\n\n // ================= Split Effect Style =================\n // We will split effectStyle here since @layer should be at the top level\n var effectLayerKeys = [];\n var effectRestKeys = [];\n Object.keys(effectStyle).forEach(function (key) {\n if (key.startsWith('@layer')) {\n effectLayerKeys.push(key);\n } else {\n effectRestKeys.push(key);\n }\n });\n\n // ================= Inject Layer Style =================\n // Inject layer style\n effectLayerKeys.forEach(function (effectKey) {\n updateCSS(normalizeStyle(effectStyle[effectKey]), \"_layer-\".concat(effectKey), _objectSpread(_objectSpread({}, mergedCSSConfig), {}, {\n prepend: true\n }));\n });\n\n // ==================== Inject Style ====================\n // Inject style\n var style = updateCSS(styleStr, styleId, mergedCSSConfig);\n style[CSS_IN_JS_INSTANCE] = cache.instanceId;\n\n // Used for `useCacheToken` to remove on batch when token removed\n style.setAttribute(ATTR_TOKEN, tokenKey);\n\n // Debug usage. Dev only\n if (process.env.NODE_ENV !== 'production') {\n style.setAttribute(ATTR_CACHE_PATH, fullPath.join('|'));\n }\n\n // ================ Inject Effect Style =================\n // Inject client side effect style\n effectRestKeys.forEach(function (effectKey) {\n updateCSS(normalizeStyle(effectStyle[effectKey]), \"_effect-\".concat(effectKey), mergedCSSConfig);\n });\n }\n }),\n _useGlobalCache2 = _slicedToArray(_useGlobalCache, 3),\n cachedStyleStr = _useGlobalCache2[0],\n cachedTokenKey = _useGlobalCache2[1],\n cachedStyleId = _useGlobalCache2[2];\n return function (node) {\n var styleNode;\n if (!ssrInline || isMergedClientSide || !defaultCache) {\n styleNode = /*#__PURE__*/React.createElement(Empty, null);\n } else {\n styleNode = /*#__PURE__*/React.createElement(\"style\", _extends({}, _defineProperty(_defineProperty({}, ATTR_TOKEN, cachedTokenKey), ATTR_MARK, cachedStyleId), {\n dangerouslySetInnerHTML: {\n __html: cachedStyleStr\n }\n }));\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, styleNode, node);\n };\n}\nexport var extract = function extract(cache, effectStyles, options) {\n var _cache = _slicedToArray(cache, 6),\n styleStr = _cache[0],\n tokenKey = _cache[1],\n styleId = _cache[2],\n effectStyle = _cache[3],\n clientOnly = _cache[4],\n order = _cache[5];\n var _ref7 = options || {},\n plain = _ref7.plain;\n\n // Skip client only style\n if (clientOnly) {\n return null;\n }\n var keyStyleText = styleStr;\n\n // ====================== Share ======================\n // Used for rc-util\n var sharedAttrs = {\n 'data-rc-order': 'prependQueue',\n 'data-rc-priority': \"\".concat(order)\n };\n\n // ====================== Style ======================\n keyStyleText = toStyleStr(styleStr, tokenKey, styleId, sharedAttrs, plain);\n\n // =============== Create effect style ===============\n if (effectStyle) {\n Object.keys(effectStyle).forEach(function (effectKey) {\n // Effect style can be reused\n if (!effectStyles[effectKey]) {\n effectStyles[effectKey] = true;\n var effectStyleStr = normalizeStyle(effectStyle[effectKey]);\n var effectStyleHTML = toStyleStr(effectStyleStr, tokenKey, \"_effect-\".concat(effectKey), sharedAttrs, plain);\n if (effectKey.startsWith('@layer')) {\n keyStyleText = effectStyleHTML + keyStyleText;\n } else {\n keyStyleText += effectStyleHTML;\n }\n }\n });\n }\n return [order, styleId, keyStyleText];\n};","map":{"version":3,"names":["_extends","_defineProperty","_objectSpread","_slicedToArray","_toConsumableArray","_typeof","hash","removeCSS","updateCSS","React","unitless","compile","serialize","stringify","contentQuotesLinter","hashedAnimationLinter","StyleContext","ATTR_CACHE_PATH","ATTR_MARK","ATTR_TOKEN","CSS_IN_JS_INSTANCE","isClientSide","toStyleStr","CSS_FILE_STYLE","existPath","getStyleAndHash","useGlobalCache","SKIP_CHECK","MULTI_VALUE","normalizeStyle","styleStr","serialized","replace","isCompoundCSSProperty","value","injectSelectorHash","key","hashId","hashPriority","hashClassName","concat","hashSelector","keys","split","map","k","_firstPath$match","fullPath","trim","firstPath","htmlElement","match","slice","length","join","parseStyle","interpolation","config","arguments","undefined","_ref","root","parentSelectors","injectHash","layer","path","_config$transformers","transformers","_config$linters","linters","effectStyle","parseKeyframes","keyframes","animationName","getName","_parseStyle","style","_parseStyle2","_parsedStr","flattenList","list","fullList","forEach","item","Array","isArray","push","flattenStyleList","originStyle","_keyframe","mergedStyle","reduce","prev","trans","_trans$visit","visit","call","Object","subInjectHash","mergedKey","nextRoot","startsWith","_parseStyle3","_parseStyle4","_parsedStr2","childEffectStyle","_value","appendStyle","cssKey","cssValue","process","env","NODE_ENV","linter","styleName","toLowerCase","formatValue","actualValue","name","dependencies","deps","uniqueHash","Empty","STYLE_PREFIX","useStyleRegister","info","styleFn","token","nonce","clientOnly","_info$order","order","_React$useContext","useContext","autoClear","mock","defaultCache","container","ssrInline","cache","enableLayer","tokenKey","_tokenKey","apply","isMergedClientSide","_useGlobalCache","cachePath","_getStyleAndHash","_getStyleAndHash2","inlineCacheStyleStr","styleHash","styleObj","_parseStyle5","_parseStyle6","parsedStyle","styleId","_ref2","fromHMR","_ref3","mark","_ref4","_ref5","_","mergedCSSConfig","prepend","attachTo","priority","nonceStr","csp","effectLayerKeys","effectRestKeys","effectKey","instanceId","setAttribute","_useGlobalCache2","cachedStyleStr","cachedTokenKey","cachedStyleId","node","styleNode","createElement","dangerouslySetInnerHTML","__html","Fragment","extract","effectStyles","options","_cache","_ref7","plain","keyStyleText","sharedAttrs","effectStyleStr","effectStyleHTML"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/@ant-design/cssinjs/es/hooks/useStyleRegister.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport hash from '@emotion/hash';\nimport { removeCSS, updateCSS } from \"rc-util/es/Dom/dynamicCSS\";\nimport * as React from 'react';\n// @ts-ignore\nimport unitless from '@emotion/unitless';\nimport { compile, serialize, stringify } from 'stylis';\nimport { contentQuotesLinter, hashedAnimationLinter } from \"../linters\";\nimport StyleContext, { ATTR_CACHE_PATH, ATTR_MARK, ATTR_TOKEN, CSS_IN_JS_INSTANCE } from \"../StyleContext\";\nimport { isClientSide, toStyleStr } from \"../util\";\nimport { CSS_FILE_STYLE, existPath, getStyleAndHash } from \"../util/cacheMapUtil\";\nimport useGlobalCache from \"./useGlobalCache\";\nvar SKIP_CHECK = '_skip_check_';\nvar MULTI_VALUE = '_multi_value_';\n// ============================================================================\n// == Parser ==\n// ============================================================================\n// Preprocessor style content to browser support one\nexport function normalizeStyle(styleStr) {\n var serialized = serialize(compile(styleStr), stringify);\n return serialized.replace(/\\{%%%\\:[^;];}/g, ';');\n}\nfunction isCompoundCSSProperty(value) {\n return _typeof(value) === 'object' && value && (SKIP_CHECK in value || MULTI_VALUE in value);\n}\n\n// 注入 hash 值\nfunction injectSelectorHash(key, hashId, hashPriority) {\n if (!hashId) {\n return key;\n }\n var hashClassName = \".\".concat(hashId);\n var hashSelector = hashPriority === 'low' ? \":where(\".concat(hashClassName, \")\") : hashClassName;\n\n // 注入 hashId\n var keys = key.split(',').map(function (k) {\n var _firstPath$match;\n var fullPath = k.trim().split(/\\s+/);\n\n // 如果 Selector 第一个是 HTML Element,那我们就插到它的后面。反之,就插到最前面。\n var firstPath = fullPath[0] || '';\n var htmlElement = ((_firstPath$match = firstPath.match(/^\\w+/)) === null || _firstPath$match === void 0 ? void 0 : _firstPath$match[0]) || '';\n firstPath = \"\".concat(htmlElement).concat(hashSelector).concat(firstPath.slice(htmlElement.length));\n return [firstPath].concat(_toConsumableArray(fullPath.slice(1))).join(' ');\n });\n return keys.join(',');\n}\n// Parse CSSObject to style content\nexport var parseStyle = function parseStyle(interpolation) {\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n root: true,\n parentSelectors: []\n },\n root = _ref.root,\n injectHash = _ref.injectHash,\n parentSelectors = _ref.parentSelectors;\n var hashId = config.hashId,\n layer = config.layer,\n path = config.path,\n hashPriority = config.hashPriority,\n _config$transformers = config.transformers,\n transformers = _config$transformers === void 0 ? [] : _config$transformers,\n _config$linters = config.linters,\n linters = _config$linters === void 0 ? [] : _config$linters;\n var styleStr = '';\n var effectStyle = {};\n function parseKeyframes(keyframes) {\n var animationName = keyframes.getName(hashId);\n if (!effectStyle[animationName]) {\n var _parseStyle = parseStyle(keyframes.style, config, {\n root: false,\n parentSelectors: parentSelectors\n }),\n _parseStyle2 = _slicedToArray(_parseStyle, 1),\n _parsedStr = _parseStyle2[0];\n effectStyle[animationName] = \"@keyframes \".concat(keyframes.getName(hashId)).concat(_parsedStr);\n }\n }\n function flattenList(list) {\n var fullList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n list.forEach(function (item) {\n if (Array.isArray(item)) {\n flattenList(item, fullList);\n } else if (item) {\n fullList.push(item);\n }\n });\n return fullList;\n }\n var flattenStyleList = flattenList(Array.isArray(interpolation) ? interpolation : [interpolation]);\n flattenStyleList.forEach(function (originStyle) {\n // Only root level can use raw string\n var style = typeof originStyle === 'string' && !root ? {} : originStyle;\n if (typeof style === 'string') {\n styleStr += \"\".concat(style, \"\\n\");\n } else if (style._keyframe) {\n // Keyframe\n parseKeyframes(style);\n } else {\n var mergedStyle = transformers.reduce(function (prev, trans) {\n var _trans$visit;\n return (trans === null || trans === void 0 || (_trans$visit = trans.visit) === null || _trans$visit === void 0 ? void 0 : _trans$visit.call(trans, prev)) || prev;\n }, style);\n\n // Normal CSSObject\n Object.keys(mergedStyle).forEach(function (key) {\n var value = mergedStyle[key];\n if (_typeof(value) === 'object' && value && (key !== 'animationName' || !value._keyframe) && !isCompoundCSSProperty(value)) {\n var subInjectHash = false;\n\n // 当成嵌套对象来处理\n var mergedKey = key.trim();\n // Whether treat child as root. In most case it is false.\n var nextRoot = false;\n\n // 拆分多个选择器\n if ((root || injectHash) && hashId) {\n if (mergedKey.startsWith('@')) {\n // 略过媒体查询,交给子节点继续插入 hashId\n subInjectHash = true;\n } else {\n // 注入 hashId\n mergedKey = injectSelectorHash(key, hashId, hashPriority);\n }\n } else if (root && !hashId && (mergedKey === '&' || mergedKey === '')) {\n // In case of `{ '&': { a: { color: 'red' } } }` or `{ '': { a: { color: 'red' } } }` without hashId,\n // we will get `&{a:{color:red;}}` or `{a:{color:red;}}` string for stylis to compile.\n // But it does not conform to stylis syntax,\n // and finally we will get `{color:red;}` as css, which is wrong.\n // So we need to remove key in root, and treat child `{ a: { color: 'red' } }` as root.\n mergedKey = '';\n nextRoot = true;\n }\n var _parseStyle3 = parseStyle(value, config, {\n root: nextRoot,\n injectHash: subInjectHash,\n parentSelectors: [].concat(_toConsumableArray(parentSelectors), [mergedKey])\n }),\n _parseStyle4 = _slicedToArray(_parseStyle3, 2),\n _parsedStr2 = _parseStyle4[0],\n childEffectStyle = _parseStyle4[1];\n effectStyle = _objectSpread(_objectSpread({}, effectStyle), childEffectStyle);\n styleStr += \"\".concat(mergedKey).concat(_parsedStr2);\n } else {\n var _value;\n function appendStyle(cssKey, cssValue) {\n if (process.env.NODE_ENV !== 'production' && (_typeof(value) !== 'object' || !(value !== null && value !== void 0 && value[SKIP_CHECK]))) {\n [contentQuotesLinter, hashedAnimationLinter].concat(_toConsumableArray(linters)).forEach(function (linter) {\n return linter(cssKey, cssValue, {\n path: path,\n hashId: hashId,\n parentSelectors: parentSelectors\n });\n });\n }\n\n // 如果是样式则直接插入\n var styleName = cssKey.replace(/[A-Z]/g, function (match) {\n return \"-\".concat(match.toLowerCase());\n });\n\n // Auto suffix with px\n var formatValue = cssValue;\n if (!unitless[cssKey] && typeof formatValue === 'number' && formatValue !== 0) {\n formatValue = \"\".concat(formatValue, \"px\");\n }\n\n // handle animationName & Keyframe value\n if (cssKey === 'animationName' && cssValue !== null && cssValue !== void 0 && cssValue._keyframe) {\n parseKeyframes(cssValue);\n formatValue = cssValue.getName(hashId);\n }\n styleStr += \"\".concat(styleName, \":\").concat(formatValue, \";\");\n }\n var actualValue = (_value = value === null || value === void 0 ? void 0 : value.value) !== null && _value !== void 0 ? _value : value;\n if (_typeof(value) === 'object' && value !== null && value !== void 0 && value[MULTI_VALUE] && Array.isArray(actualValue)) {\n actualValue.forEach(function (item) {\n appendStyle(key, item);\n });\n } else {\n appendStyle(key, actualValue);\n }\n }\n });\n }\n });\n if (!root) {\n styleStr = \"{\".concat(styleStr, \"}\");\n } else if (layer) {\n styleStr = \"@layer \".concat(layer.name, \" {\").concat(styleStr, \"}\");\n if (layer.dependencies) {\n effectStyle[\"@layer \".concat(layer.name)] = layer.dependencies.map(function (deps) {\n return \"@layer \".concat(deps, \", \").concat(layer.name, \";\");\n }).join('\\n');\n }\n }\n return [styleStr, effectStyle];\n};\n\n// ============================================================================\n// == Register ==\n// ============================================================================\nexport function uniqueHash(path, styleStr) {\n return hash(\"\".concat(path.join('%')).concat(styleStr));\n}\nfunction Empty() {\n return null;\n}\nexport var STYLE_PREFIX = 'style';\n/**\n * Register a style to the global style sheet.\n */\nexport default function useStyleRegister(info, styleFn) {\n var token = info.token,\n path = info.path,\n hashId = info.hashId,\n layer = info.layer,\n nonce = info.nonce,\n clientOnly = info.clientOnly,\n _info$order = info.order,\n order = _info$order === void 0 ? 0 : _info$order;\n var _React$useContext = React.useContext(StyleContext),\n autoClear = _React$useContext.autoClear,\n mock = _React$useContext.mock,\n defaultCache = _React$useContext.defaultCache,\n hashPriority = _React$useContext.hashPriority,\n container = _React$useContext.container,\n ssrInline = _React$useContext.ssrInline,\n transformers = _React$useContext.transformers,\n linters = _React$useContext.linters,\n cache = _React$useContext.cache,\n enableLayer = _React$useContext.layer;\n var tokenKey = token._tokenKey;\n var fullPath = [tokenKey];\n if (enableLayer) {\n fullPath.push('layer');\n }\n fullPath.push.apply(fullPath, _toConsumableArray(path));\n\n // Check if need insert style\n var isMergedClientSide = isClientSide;\n if (process.env.NODE_ENV !== 'production' && mock !== undefined) {\n isMergedClientSide = mock === 'client';\n }\n var _useGlobalCache = useGlobalCache(STYLE_PREFIX, fullPath,\n // Create cache if needed\n function () {\n var cachePath = fullPath.join('|');\n\n // Get style from SSR inline style directly\n if (existPath(cachePath)) {\n var _getStyleAndHash = getStyleAndHash(cachePath),\n _getStyleAndHash2 = _slicedToArray(_getStyleAndHash, 2),\n inlineCacheStyleStr = _getStyleAndHash2[0],\n styleHash = _getStyleAndHash2[1];\n if (inlineCacheStyleStr) {\n return [inlineCacheStyleStr, tokenKey, styleHash, {}, clientOnly, order];\n }\n }\n\n // Generate style\n var styleObj = styleFn();\n var _parseStyle5 = parseStyle(styleObj, {\n hashId: hashId,\n hashPriority: hashPriority,\n layer: enableLayer ? layer : undefined,\n path: path.join('-'),\n transformers: transformers,\n linters: linters\n }),\n _parseStyle6 = _slicedToArray(_parseStyle5, 2),\n parsedStyle = _parseStyle6[0],\n effectStyle = _parseStyle6[1];\n var styleStr = normalizeStyle(parsedStyle);\n var styleId = uniqueHash(fullPath, styleStr);\n return [styleStr, tokenKey, styleId, effectStyle, clientOnly, order];\n },\n // Remove cache if no need\n function (_ref2, fromHMR) {\n var _ref3 = _slicedToArray(_ref2, 3),\n styleId = _ref3[2];\n if ((fromHMR || autoClear) && isClientSide) {\n removeCSS(styleId, {\n mark: ATTR_MARK\n });\n }\n },\n // Effect: Inject style here\n function (_ref4) {\n var _ref5 = _slicedToArray(_ref4, 4),\n styleStr = _ref5[0],\n _ = _ref5[1],\n styleId = _ref5[2],\n effectStyle = _ref5[3];\n if (isMergedClientSide && styleStr !== CSS_FILE_STYLE) {\n var mergedCSSConfig = {\n mark: ATTR_MARK,\n prepend: enableLayer ? false : 'queue',\n attachTo: container,\n priority: order\n };\n var nonceStr = typeof nonce === 'function' ? nonce() : nonce;\n if (nonceStr) {\n mergedCSSConfig.csp = {\n nonce: nonceStr\n };\n }\n\n // ================= Split Effect Style =================\n // We will split effectStyle here since @layer should be at the top level\n var effectLayerKeys = [];\n var effectRestKeys = [];\n Object.keys(effectStyle).forEach(function (key) {\n if (key.startsWith('@layer')) {\n effectLayerKeys.push(key);\n } else {\n effectRestKeys.push(key);\n }\n });\n\n // ================= Inject Layer Style =================\n // Inject layer style\n effectLayerKeys.forEach(function (effectKey) {\n updateCSS(normalizeStyle(effectStyle[effectKey]), \"_layer-\".concat(effectKey), _objectSpread(_objectSpread({}, mergedCSSConfig), {}, {\n prepend: true\n }));\n });\n\n // ==================== Inject Style ====================\n // Inject style\n var style = updateCSS(styleStr, styleId, mergedCSSConfig);\n style[CSS_IN_JS_INSTANCE] = cache.instanceId;\n\n // Used for `useCacheToken` to remove on batch when token removed\n style.setAttribute(ATTR_TOKEN, tokenKey);\n\n // Debug usage. Dev only\n if (process.env.NODE_ENV !== 'production') {\n style.setAttribute(ATTR_CACHE_PATH, fullPath.join('|'));\n }\n\n // ================ Inject Effect Style =================\n // Inject client side effect style\n effectRestKeys.forEach(function (effectKey) {\n updateCSS(normalizeStyle(effectStyle[effectKey]), \"_effect-\".concat(effectKey), mergedCSSConfig);\n });\n }\n }),\n _useGlobalCache2 = _slicedToArray(_useGlobalCache, 3),\n cachedStyleStr = _useGlobalCache2[0],\n cachedTokenKey = _useGlobalCache2[1],\n cachedStyleId = _useGlobalCache2[2];\n return function (node) {\n var styleNode;\n if (!ssrInline || isMergedClientSide || !defaultCache) {\n styleNode = /*#__PURE__*/React.createElement(Empty, null);\n } else {\n styleNode = /*#__PURE__*/React.createElement(\"style\", _extends({}, _defineProperty(_defineProperty({}, ATTR_TOKEN, cachedTokenKey), ATTR_MARK, cachedStyleId), {\n dangerouslySetInnerHTML: {\n __html: cachedStyleStr\n }\n }));\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, styleNode, node);\n };\n}\nexport var extract = function extract(cache, effectStyles, options) {\n var _cache = _slicedToArray(cache, 6),\n styleStr = _cache[0],\n tokenKey = _cache[1],\n styleId = _cache[2],\n effectStyle = _cache[3],\n clientOnly = _cache[4],\n order = _cache[5];\n var _ref7 = options || {},\n plain = _ref7.plain;\n\n // Skip client only style\n if (clientOnly) {\n return null;\n }\n var keyStyleText = styleStr;\n\n // ====================== Share ======================\n // Used for rc-util\n var sharedAttrs = {\n 'data-rc-order': 'prependQueue',\n 'data-rc-priority': \"\".concat(order)\n };\n\n // ====================== Style ======================\n keyStyleText = toStyleStr(styleStr, tokenKey, styleId, sharedAttrs, plain);\n\n // =============== Create effect style ===============\n if (effectStyle) {\n Object.keys(effectStyle).forEach(function (effectKey) {\n // Effect style can be reused\n if (!effectStyles[effectKey]) {\n effectStyles[effectKey] = true;\n var effectStyleStr = normalizeStyle(effectStyle[effectKey]);\n var effectStyleHTML = toStyleStr(effectStyleStr, tokenKey, \"_effect-\".concat(effectKey), sharedAttrs, plain);\n if (effectKey.startsWith('@layer')) {\n keyStyleText = effectStyleHTML + keyStyleText;\n } else {\n keyStyleText += effectStyleHTML;\n }\n }\n });\n }\n return [order, styleId, keyStyleText];\n};"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,eAAe,MAAM,2CAA2C;AACvE,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC,cAAc,MAAM,0CAA0C;AACrE,OAAOC,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,OAAO,MAAM,mCAAmC;AACvD,OAAOC,IAAI,MAAM,eAAe;AAChC,SAASC,SAAS,EAAEC,SAAS,QAAQ,2BAA2B;AAChE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B;AACA,OAAOC,QAAQ,MAAM,mBAAmB;A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