{"ast":null,"code":"\"use client\";\n\nimport classNames from 'classnames';\nimport React, { useContext } from 'react';\nimport { ConfigContext } from '../config-provider';\nimport useMessage from '../message/useMessage';\nimport useModal from '../modal/useModal';\nimport useNotification from '../notification/useNotification';\nimport AppContext, { AppConfigContext } from './context';\nimport useStyle from './style';\nconst useApp = () => React.useContext(AppContext);\nconst App = props => {\n  const {\n    prefixCls: customizePrefixCls,\n    children,\n    className,\n    rootClassName,\n    message,\n    notification,\n    style\n  } = props;\n  const {\n    getPrefixCls\n  } = useContext(ConfigContext);\n  const prefixCls = getPrefixCls('app', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const customClassName = classNames(hashId, prefixCls, className, rootClassName);\n  const appConfig = useContext(AppConfigContext);\n  const mergedAppConfig = React.useMemo(() => ({\n    message: Object.assign(Object.assign({}, appConfig.message), message),\n    notification: Object.assign(Object.assign({}, appConfig.notification), notification)\n  }), [message, notification, appConfig.message, appConfig.notification]);\n  const [messageApi, messageContextHolder] = useMessage(mergedAppConfig.message);\n  const [notificationApi, notificationContextHolder] = useNotification(mergedAppConfig.notification);\n  const [ModalApi, ModalContextHolder] = useModal();\n  const memoizedContextValue = React.useMemo(() => ({\n    message: messageApi,\n    notification: notificationApi,\n    modal: ModalApi\n  }), [messageApi, notificationApi, ModalApi]);\n  return wrapSSR( /*#__PURE__*/React.createElement(AppContext.Provider, {\n    value: memoizedContextValue\n  }, /*#__PURE__*/React.createElement(AppConfigContext.Provider, {\n    value: mergedAppConfig\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    className: customClassName,\n    style: style\n  }, ModalContextHolder, messageContextHolder, notificationContextHolder, children))));\n};\nif (process.env.NODE_ENV !== 'production') {\n  App.displayName = 'App';\n}\nApp.useApp = useApp;\nexport default App;","map":{"version":3,"names":["classNames","React","useContext","ConfigContext","useMessage","useModal","useNotification","AppContext","AppConfigContext","useStyle","useApp","App","props","prefixCls","customizePrefixCls","children","className","rootClassName","message","notification","style","getPrefixCls","wrapSSR","hashId","customClassName","appConfig","mergedAppConfig","useMemo","Object","assign","messageApi","messageContextHolder","notificationApi","notificationContextHolder","ModalApi","ModalContextHolder","memoizedContextValue","modal","createElement","Provider","value","process","env","NODE_ENV","displayName"],"sources":["/var/www/gavt/node_modules/antd/es/app/index.js"],"sourcesContent":["\"use client\";\n\nimport classNames from 'classnames';\nimport React, { useContext } from 'react';\nimport { ConfigContext } from '../config-provider';\nimport useMessage from '../message/useMessage';\nimport useModal from '../modal/useModal';\nimport useNotification from '../notification/useNotification';\nimport AppContext, { AppConfigContext } from './context';\nimport useStyle from './style';\nconst useApp = () => React.useContext(AppContext);\nconst App = props => {\n  const {\n    prefixCls: customizePrefixCls,\n    children,\n    className,\n    rootClassName,\n    message,\n    notification,\n    style\n  } = props;\n  const {\n    getPrefixCls\n  } = useContext(ConfigContext);\n  const prefixCls = getPrefixCls('app', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const customClassName = classNames(hashId, prefixCls, className, rootClassName);\n  const appConfig = useContext(AppConfigContext);\n  const mergedAppConfig = React.useMemo(() => ({\n    message: Object.assign(Object.assign({}, appConfig.message), message),\n    notification: Object.assign(Object.assign({}, appConfig.notification), notification)\n  }), [message, notification, appConfig.message, appConfig.notification]);\n  const [messageApi, messageContextHolder] = useMessage(mergedAppConfig.message);\n  const [notificationApi, notificationContextHolder] = useNotification(mergedAppConfig.notification);\n  const [ModalApi, ModalContextHolder] = useModal();\n  const memoizedContextValue = React.useMemo(() => ({\n    message: messageApi,\n    notification: notificationApi,\n    modal: ModalApi\n  }), [messageApi, notificationApi, ModalApi]);\n  return wrapSSR( /*#__PURE__*/React.createElement(AppContext.Provider, {\n    value: memoizedContextValue\n  }, /*#__PURE__*/React.createElement(AppConfigContext.Provider, {\n    value: mergedAppConfig\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    className: customClassName,\n    style: style\n  }, ModalContextHolder, messageContextHolder, notificationContextHolder, children))));\n};\nif (process.env.NODE_EN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