{"ast":null,"code":"\"use client\";\n\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 React, { useContext, useMemo } from 'react';\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport { devUseWarning } from '../_util/warning';\nimport Badge from '../badge';\nimport { ConfigContext } from '../config-provider';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport Tooltip from '../tooltip';\nimport FloatButtonGroupContext from './context';\nimport Content from './FloatButtonContent';\nimport useStyle from './style';\nexport const floatButtonPrefixCls = 'float-btn';\nconst InternalFloatButton = /*#__PURE__*/React.forwardRef((props, ref) => {\n  const {\n      prefixCls: customizePrefixCls,\n      className,\n      rootClassName,\n      type = 'default',\n      shape = 'circle',\n      icon,\n      description,\n      tooltip,\n      badge = {}\n    } = props,\n    restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"type\", \"shape\", \"icon\", \"description\", \"tooltip\", \"badge\"]);\n  const {\n    getPrefixCls,\n    direction\n  } = useContext(ConfigContext);\n  const groupShape = useContext(FloatButtonGroupContext);\n  const prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);\n  const rootCls = useCSSVarCls(prefixCls);\n  const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n  const mergedShape = groupShape || shape;\n  const classString = classNames(hashId, cssVarCls, rootCls, prefixCls, className, rootClassName, `${prefixCls}-${type}`, `${prefixCls}-${mergedShape}`, {\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  });\n  // 虽然在 ts 中已经 omit 过了，但是为了防止多余的属性被透传进来，这里再 omit 一遍，以防万一\n  const badgeProps = useMemo(() => omit(badge, ['title', 'children', 'status', 'text']), [badge]);\n  const contentProps = useMemo(() => ({\n    prefixCls,\n    description,\n    icon,\n    type\n  }), [prefixCls, description, icon, type]);\n  let buttonNode = /*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-body`\n  }, /*#__PURE__*/React.createElement(Content, Object.assign({}, contentProps)));\n  if ('badge' in props) {\n    buttonNode = /*#__PURE__*/React.createElement(Badge, Object.assign({}, badgeProps), buttonNode);\n  }\n  if ('tooltip' in props) {\n    buttonNode = /*#__PURE__*/React.createElement(Tooltip, {\n      title: tooltip,\n      placement: direction === 'rtl' ? 'right' : 'left'\n    }, buttonNode);\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    const warning = devUseWarning('FloatButton');\n    process.env.NODE_ENV !== \"production\" ? warning(!(shape === 'circle' && description), 'usage', 'supported only when `shape` is `square`. Due to narrow space for text, short sentence is recommended.') : void 0;\n  }\n  return wrapCSSVar(props.href ? ( /*#__PURE__*/React.createElement(\"a\", Object.assign({\n    ref: ref\n  }, restProps, {\n    className: classString\n  }), buttonNode)) : ( /*#__PURE__*/React.createElement(\"button\", Object.assign({\n    ref: ref\n  }, restProps, {\n    className: classString,\n    type: \"button\"\n  }), buttonNode)));\n});\nconst FloatButton = InternalFloatButton;\nif (process.env.NODE_ENV !== 'production') {\n  FloatButton.displayName = 'FloatButton';\n}\nexport default FloatButton;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","useContext","useMemo","classNames","omit","devUseWarning","Badge","ConfigContext","useCSSVarCls","Tooltip","FloatButtonGroupContext","Content","useStyle","floatButtonPrefixCls","InternalFloatButton","forwardRef","props","ref","prefixCls","customizePrefixCls","className","rootClassName","type","shape","icon","description","tooltip","badge","restProps","getPrefixCls","direction","groupShape","rootCls","wrapCSSVar","hashId","cssVarCls","mergedShape","classString","badgeProps","contentProps","buttonNode","createElement","assign","title","placement","process","env","NODE_ENV","warning","href","FloatButton","displayName"],"sources":["/var/www/gavt/node_modules/antd/es/float-button/FloatButton.js"],"sourcesContent":["\"use client\";\n\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 React, { useContext, useMemo } from 'react';\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport { devUseWarning } from '../_util/warning';\nimport Badge from '../badge';\nimport { ConfigContext } from '../config-provider';\nimport useCSSVarCls from '../config-provider/hooks/useCSSVarCls';\nimport Tooltip from '../tooltip';\nimport FloatButtonGroupContext from './context';\nimport Content from './FloatButtonContent';\nimport useStyle from './style';\nexport const floatButtonPrefixCls = 'float-btn';\nconst InternalFloatButton = /*#__PURE__*/React.forwardRef((props, ref) => {\n  const {\n      prefixCls: customizePrefixCls,\n      className,\n      rootClassName,\n      type = 'default',\n      shape = 'circle',\n      icon,\n      description,\n      tooltip,\n      badge = {}\n    } = props,\n    restProps = __rest(props, [\"prefixCls\", \"className\", \"rootClassName\", \"type\", \"shape\", \"icon\", \"description\", \"tooltip\", \"badge\"]);\n  const {\n    getPrefixCls,\n    direction\n  } = useContext(ConfigContext);\n  const groupShape = useContext(FloatButtonGroupContext);\n  const prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);\n  const rootCls = useCSSVarCls(prefixCls);\n  const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls, rootCls);\n  const mergedShape = groupShape || shape;\n  const classString = classNames(hashId, cssVarCls, rootCls, prefixCls, className, rootClassName, `${prefixCls}-${type}`, `${prefixCls}-${mergedShape}`, {\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  });\n  // 虽然在 ts 中已经 omit 过了，但是为了防止多余的属性被透传进来，这里再 omit 一遍，以防万一\n  const badgeProps = useMemo(() => omit(badge, ['title', 'children', 'status', 'text']), [badge]);\n  const contentProps = useMemo(() => ({\n    prefixCls,\n    description,\n    icon,\n    type\n  }), [prefixCls, description, icon, type]);\n  let buttonNode = /*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-body`\n  }, /*#__PURE__*/React.createElement(Content, Object.assign({}, contentProps)));\n  if ('badge' in props) {\n    buttonNode = /*#__PURE__*/React.createElement(Badge, Object.assign({}, badgeProps), buttonNode);\n  }\n  if ('tooltip' in props) {\n    buttonNode = /*#__PURE__*/React.createElement(Tooltip, {\n      title: tooltip,\n      placement: direction === 'rtl' ? 'right' : 'left'\n    }, buttonNode);\n  }\n  if (process.env.NODE_ENV !== 'production') {\n    const warning = devUseWarning('FloatButton');\n    process.env.NODE_ENV !== \"production\" ? warning(!(shape === 'circle' && description), 'usage', 'supported only when `shape` is `square`. Due to narrow space for text, short sentence is recommended.') : void 0;\n  }\n  return wrapCSSVar(props.href ? ( /*#__PURE__*/React.createElement(\"a\", Object.assign({\n    ref: ref\n  }, restProps, {\n    className: classString\n  }), buttonNode)) : ( /*#__PURE__*/React.createElement(\"button\", Object.assign({\n    ref: ref\n  }, restProps, {\n    className: classString,\n    type: \"button\"\n  }), buttonNode)));\n});\nconst FloatButton = InternalFloatButton;\nif (process.env.NODE_ENV !== 'production') {\n  FloatButton.displayName = 'FloatButton';\n}\nexport default FloatButton;"],"mappings":"AAAA,YAAY;;AAEZ,IAAIA,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,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