{"ast":null,"code":"\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport { ConfigContext } from '../config-provider';\nimport { LayoutContext } from './context';\nimport useHasSider from './hooks/useHasSider';\nimport useStyle from './style';\nfunction generator(_ref) {\n let {\n suffixCls,\n tagName,\n displayName\n } = _ref;\n return BasicComponent => {\n const Adapter = /*#__PURE__*/React.forwardRef((props, ref) => ( /*#__PURE__*/React.createElement(BasicComponent, Object.assign({\n ref: ref,\n suffixCls: suffixCls,\n tagName: tagName\n }, props))));\n if (process.env.NODE_ENV !== 'production') {\n Adapter.displayName = displayName;\n }\n return Adapter;\n };\n}\nconst Basic = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n suffixCls,\n className,\n tagName: TagName\n } = props,\n others = __rest(props, [\"prefixCls\", \"suffixCls\", \"className\", \"tagName\"]);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('layout', customizePrefixCls);\n const [wrapSSR, hashId, cssVarCls] = useStyle(prefixCls);\n const prefixWithSuffixCls = suffixCls ? `${prefixCls}-${suffixCls}` : prefixCls;\n return wrapSSR( /*#__PURE__*/React.createElement(TagName, Object.assign({\n className: classNames(customizePrefixCls || prefixWithSuffixCls, className, hashId, cssVarCls),\n ref: ref\n }, others)));\n});\nconst BasicLayout = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n direction\n } = React.useContext(ConfigContext);\n const [siders, setSiders] = React.useState([]);\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n children,\n hasSider,\n tagName: Tag,\n style\n } = props,\n others = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"children\", \"hasSider\", \"tagName\", \"style\"]);\n const passedProps = omit(others, ['suffixCls']);\n const {\n getPrefixCls,\n layout\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('layout', customizePrefixCls);\n const mergedHasSider = useHasSider(siders, children, hasSider);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const classString = classNames(prefixCls, {\n [`${prefixCls}-has-sider`]: mergedHasSider,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, layout === null || layout === void 0 ? void 0 : layout.className, className, rootClassName, hashId, cssVarCls);\n const contextValue = React.useMemo(() => ({\n siderHook: {\n addSider: id => {\n setSiders(prev => [].concat(_toConsumableArray(prev), [id]));\n },\n removeSider: id => {\n setSiders(prev => prev.filter(currentId => currentId !== id));\n }\n }\n }), []);\n return wrapCSSVar( /*#__PURE__*/React.createElement(LayoutContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Tag, Object.assign({\n ref: ref,\n className: classString,\n style: Object.assign(Object.assign({}, layout === null || layout === void 0 ? void 0 : layout.style), style)\n }, passedProps), children)));\n});\nconst Layout = generator({\n tagName: 'div',\n displayName: 'Layout'\n})(BasicLayout);\nconst Header = generator({\n suffixCls: 'header',\n tagName: 'header',\n displayName: 'Header'\n})(Basic);\nconst Footer = generator({\n suffixCls: 'footer',\n tagName: 'footer',\n displayName: 'Footer'\n})(Basic);\nconst Content = generator({\n suffixCls: 'content',\n tagName: 'main',\n displayName: 'Content'\n})(Basic);\nexport { Content, Footer, Header };\nexport default Layout;","map":{"version":3,"names":["_toConsumableArray","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","omit","ConfigContext","LayoutContext","useHasSider","useStyle","generator","_ref","suffixCls","tagName","displayName","BasicComponent","Adapter","forwardRef","props","ref","createElement","assign","process","env","NODE_ENV","Basic","prefixCls","customizePrefixCls","className","TagName","others","getPrefixCls","useContext","wrapSSR","hashId","cssVarCls","prefixWithSuffixCls","BasicLayout","direction","siders","setSiders","useState","rootClassName","children","hasSider","Tag","style","passedProps","layout","mergedHasSider","wrapCSSVar","classString","contextValue","useMemo","siderHook","addSider","id","prev","concat","removeSider","filter","currentId","Provider","value","Layout","Header","Footer","Content"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/layout/layout.js"],"sourcesContent":["\"use client\";\n\nimport _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport { ConfigContext } from '../config-provider';\nimport { LayoutContext } from './context';\nimport useHasSider from './hooks/useHasSider';\nimport useStyle from './style';\nfunction generator(_ref) {\n let {\n suffixCls,\n tagName,\n displayName\n } = _ref;\n return BasicComponent => {\n const Adapter = /*#__PURE__*/React.forwardRef((props, ref) => ( /*#__PURE__*/React.createElement(BasicComponent, Object.assign({\n ref: ref,\n suffixCls: suffixCls,\n tagName: tagName\n }, props))));\n if (process.env.NODE_ENV !== 'production') {\n Adapter.displayName = displayName;\n }\n return Adapter;\n };\n}\nconst Basic = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n prefixCls: customizePrefixCls,\n suffixCls,\n className,\n tagName: TagName\n } = props,\n others = __rest(props, [\"prefixCls\", \"suffixCls\", \"className\", \"tagName\"]);\n const {\n getPrefixCls\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('layout', customizePrefixCls);\n const [wrapSSR, hashId, cssVarCls] = useStyle(prefixCls);\n const prefixWithSuffixCls = suffixCls ? `${prefixCls}-${suffixCls}` : prefixCls;\n return wrapSSR( /*#__PURE__*/React.createElement(TagName, Object.assign({\n className: classNames(customizePrefixCls || prefixWithSuffixCls, className, hashId, cssVarCls),\n ref: ref\n }, others)));\n});\nconst BasicLayout = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n direction\n } = React.useContext(ConfigContext);\n const [siders, setSiders] = React.useState([]);\n const {\n prefixCls: customizePrefixCls,\n className,\n rootClassName,\n children,\n hasSider,\n tagName: Tag,\n style\n } = props,\n others = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"children\", \"hasSider\", \"tagName\", \"style\"]);\n const passedProps = omit(others, ['suffixCls']);\n const {\n getPrefixCls,\n layout\n } = React.useContext(ConfigContext);\n const prefixCls = getPrefixCls('layout', customizePrefixCls);\n const mergedHasSider = useHasSider(siders, children, hasSider);\n const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n const classString = classNames(prefixCls, {\n [`${prefixCls}-has-sider`]: mergedHasSider,\n [`${prefixCls}-rtl`]: direction === 'rtl'\n }, layout === null || layout === void 0 ? void 0 : layout.className, className, rootClassName, hashId, cssVarCls);\n const contextValue = React.useMemo(() => ({\n siderHook: {\n addSider: id => {\n setSiders(prev => [].concat(_toConsumableArray(prev), [id]));\n },\n removeSider: id => {\n setSiders(prev => prev.filter(currentId => currentId !== id));\n }\n }\n }), []);\n return wrapCSSVar( /*#__PURE__*/React.createElement(LayoutContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Tag, Object.assign({\n ref: ref,\n className: classString,\n style: Object.assign(Object.assign({}, layout === null || layout === void 0 ? void 0 : layout.style), style)\n }, passedProps), children)));\n});\nconst Layout = generator({\n tagName: 'div',\n displayName: 'Layout'\n})(BasicLayout);\nconst Header = generator({\n suffixCls: 'header',\n tagName: 'header',\n displayName: 'Header'\n})(Basic);\nconst Footer = generator({\n suffixCls: 'footer',\n tagName: 'footer',\n displayName: 'Footer'\n})(Basic);\nconst Content = generator({\n suffixCls: 'content',\n tagName: 'main',\n displayName: 'Content'\n})(Basic);\nexport { Content, Footer, Header };\nexport default Layout;"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,kBAAkB,MAAM,8CAA8C;AAC7E,IAAIC,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC,EAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAChG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEP,CAAC,GAAGC,MAAM,CAACK,qBAAqB,CAACT,CAAC,CAAC,EAAEU,CAAC,GAAGP,CAAC,CAACQ,MAAM,EAAED,CAAC,EAAE,EAAE;IAC3I,IAAIT,CAAC,CAACO,OAAO,CAACL,CAAC,CAACO,CAAC,CAAC,CAAC,GAAG,CAAC,IAAIN,MAAM,CAACC,SAAS,CAACO,oBAAoB,CAACL,IAAI,CAACP,CAAC,EAAEG,CAAC,CAACO,CAAC,CAAC,CAAC,EAAER,CAAC,CAACC,CAAC,CAACO,CAAC,CAAC,CAAC,GAAGV,CAAC,CAACG,CAAC,CAACO,CAAC,CAAC,CAAC;EACnG;EACA,OAAOR,CAAC;AACV,CAAC;AACD,OAAO,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