{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport useMemo from \"rc-util/es/hooks/useMemo\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport * as React from 'react';\nimport CacheEntity from \"./Cache\";\nexport var ATTR_TOKEN = 'data-token-hash';\nexport var ATTR_MARK = 'data-css-hash';\nexport var ATTR_CACHE_PATH = 'data-cache-path';\n\n// Mark css-in-js instance in style element\nexport var CSS_IN_JS_INSTANCE = '__cssinjs_instance__';\nexport function createCache() {\n var cssinjsInstanceId = Math.random().toString(12).slice(2);\n\n // Tricky SSR: Move all inline style to the head.\n // PS: We do not recommend tricky mode.\n if (typeof document !== 'undefined' && document.head && document.body) {\n var styles = document.body.querySelectorAll(\"style[\".concat(ATTR_MARK, \"]\")) || [];\n var firstChild = document.head.firstChild;\n Array.from(styles).forEach(function (style) {\n style[CSS_IN_JS_INSTANCE] = style[CSS_IN_JS_INSTANCE] || cssinjsInstanceId;\n\n // Not force move if no head\n if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {\n document.head.insertBefore(style, firstChild);\n }\n });\n\n // Deduplicate of moved styles\n var styleHash = {};\n Array.from(document.querySelectorAll(\"style[\".concat(ATTR_MARK, \"]\"))).forEach(function (style) {\n var hash = style.getAttribute(ATTR_MARK);\n if (styleHash[hash]) {\n if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {\n var _style$parentNode;\n (_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 || _style$parentNode.removeChild(style);\n }\n } else {\n styleHash[hash] = true;\n }\n });\n }\n return new CacheEntity(cssinjsInstanceId);\n}\nvar StyleContext = /*#__PURE__*/React.createContext({\n hashPriority: 'low',\n cache: createCache(),\n defaultCache: true\n});\nexport var StyleProvider = function StyleProvider(props) {\n var children = props.children,\n restProps = _objectWithoutProperties(props, _excluded);\n var parentContext = React.useContext(StyleContext);\n var context = useMemo(function () {\n var mergedContext = _objectSpread({}, parentContext);\n Object.keys(restProps).forEach(function (key) {\n var value = restProps[key];\n if (restProps[key] !== undefined) {\n mergedContext[key] = value;\n }\n });\n var cache = restProps.cache;\n mergedContext.cache = mergedContext.cache || createCache();\n mergedContext.defaultCache = !cache && parentContext.defaultCache;\n return mergedContext;\n }, [parentContext, restProps], function (prev, next) {\n return !isEqual(prev[0], next[0], true) || !isEqual(prev[1], next[1], true);\n });\n return /*#__PURE__*/React.createElement(StyleContext.Provider, {\n value: context\n }, children);\n};\nexport default StyleContext;","map":{"version":3,"names":["_objectSpread","_objectWithoutProperties","_excluded","useMemo","isEqual","React","CacheEntity","ATTR_TOKEN","ATTR_MARK","ATTR_CACHE_PATH","CSS_IN_JS_INSTANCE","createCache","cssinjsInstanceId","Math","random","toString","slice","document","head","body","styles","querySelectorAll","concat","firstChild","Array","from","forEach","style","insertBefore","styleHash","hash","getAttribute","_style$parentNode","parentNode","removeChild","StyleContext","createContext","hashPriority","cache","defaultCache","StyleProvider","props","children","restProps","parentContext","useContext","context","mergedContext","Object","keys","key","value","undefined","prev","next","createElement","Provider"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/@ant-design/cssinjs/es/StyleContext.js"],"sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport useMemo from \"rc-util/es/hooks/useMemo\";\nimport isEqual from \"rc-util/es/isEqual\";\nimport * as React from 'react';\nimport CacheEntity from \"./Cache\";\nexport var ATTR_TOKEN = 'data-token-hash';\nexport var ATTR_MARK = 'data-css-hash';\nexport var ATTR_CACHE_PATH = 'data-cache-path';\n\n// Mark css-in-js instance in style element\nexport var CSS_IN_JS_INSTANCE = '__cssinjs_instance__';\nexport function createCache() {\n var cssinjsInstanceId = Math.random().toString(12).slice(2);\n\n // Tricky SSR: Move all inline style to the head.\n // PS: We do not recommend tricky mode.\n if (typeof document !== 'undefined' && document.head && document.body) {\n var styles = document.body.querySelectorAll(\"style[\".concat(ATTR_MARK, \"]\")) || [];\n var firstChild = document.head.firstChild;\n Array.from(styles).forEach(function (style) {\n style[CSS_IN_JS_INSTANCE] = style[CSS_IN_JS_INSTANCE] || cssinjsInstanceId;\n\n // Not force move if no head\n if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {\n document.head.insertBefore(style, firstChild);\n }\n });\n\n // Deduplicate of moved styles\n var styleHash = {};\n Array.from(document.querySelectorAll(\"style[\".concat(ATTR_MARK, \"]\"))).forEach(function (style) {\n var hash = style.getAttribute(ATTR_MARK);\n if (styleHash[hash]) {\n if (style[CSS_IN_JS_INSTANCE] === cssinjsInstanceId) {\n var _style$parentNode;\n (_style$parentNode = style.parentNode) === null || _style$parentNode === void 0 || _style$parentNode.removeChild(style);\n }\n } else {\n styleHash[hash] = true;\n }\n });\n }\n return new CacheEntity(cssinjsInstanceId);\n}\nvar StyleContext = /*#__PURE__*/React.createContext({\n hashPriority: 'low',\n cache: createCache(),\n defaultCache: true\n});\nexport var StyleProvider = function StyleProvider(props) {\n var children = props.children,\n restProps = _objectWithoutProperties(props, _excluded);\n var parentContext = React.useContext(StyleContext);\n var context = useMemo(function () {\n var mergedContext = _objectSpread({}, parentContext);\n Object.keys(restProps).forEach(function (key) {\n var value = restProps[key];\n if (restProps[key] !== undefined) {\n mergedContext[key] = value;\n }\n });\n var cache = restProps.cache;\n mergedContext.cache = mergedContext.cache || createCache();\n mergedContext.defaultCache = !cache && parentContext.defaultCache;\n return mergedContext;\n }, [parentContext, restProps], function (prev, next) {\n return !isEqual(prev[0], next[0], true) || !isEqual(prev[1], next[1], true);\n });\n return /*#__PURE__*/React.createElement(StyleContext.Provider, {\n value: context\n }, children);\n};\nexport default StyleContext;"],"mappings":"AAAA,OAAOA,aAAa,MAAM,0CAA0C;AACpE,OAAOC,wBAAwB,MAAM,oDAAoD;AACzF,IAAIC,SAA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