{"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 QuestionCircleOutlined from \"@ant-design/icons/es/icons/QuestionCircleOutlined\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Col from '../grid/col';\nimport defaultLocale from '../locale/en_US';\nimport { useLocale } from '../locale';\nimport Tooltip from '../tooltip';\nimport { FormContext } from './context';\nfunction toTooltipProps(tooltip) {\n  if (!tooltip) {\n    return null;\n  }\n  if (typeof tooltip === 'object' && ! /*#__PURE__*/React.isValidElement(tooltip)) {\n    return tooltip;\n  }\n  return {\n    title: tooltip\n  };\n}\nconst FormItemLabel = _ref => {\n  let {\n    prefixCls,\n    label,\n    htmlFor,\n    labelCol,\n    labelAlign,\n    colon,\n    required,\n    requiredMark,\n    tooltip\n  } = _ref;\n  var _a;\n  const [formLocale] = useLocale('Form');\n  const {\n    vertical,\n    labelAlign: contextLabelAlign,\n    labelCol: contextLabelCol,\n    labelWrap,\n    colon: contextColon\n  } = React.useContext(FormContext);\n  if (!label) {\n    return null;\n  }\n  const mergedLabelCol = labelCol || contextLabelCol || {};\n  const mergedLabelAlign = labelAlign || contextLabelAlign;\n  const labelClsBasic = `${prefixCls}-item-label`;\n  const labelColClassName = classNames(labelClsBasic, mergedLabelAlign === 'left' && `${labelClsBasic}-left`, mergedLabelCol.className, {\n    [`${labelClsBasic}-wrap`]: !!labelWrap\n  });\n  let labelChildren = label;\n  // Keep label is original where there should have no colon\n  const computedColon = colon === true || contextColon !== false && colon !== false;\n  const haveColon = computedColon && !vertical;\n  // Remove duplicated user input colon\n  if (haveColon && typeof label === 'string' && label.trim() !== '') {\n    labelChildren = label.replace(/[:|：]\\s*$/, '');\n  }\n  // Tooltip\n  const tooltipProps = toTooltipProps(tooltip);\n  if (tooltipProps) {\n    const {\n        icon = /*#__PURE__*/React.createElement(QuestionCircleOutlined, null)\n      } = tooltipProps,\n      restTooltipProps = __rest(tooltipProps, [\"icon\"]);\n    const tooltipNode = /*#__PURE__*/React.createElement(Tooltip, Object.assign({}, restTooltipProps), /*#__PURE__*/React.cloneElement(icon, {\n      className: `${prefixCls}-item-tooltip`,\n      title: ''\n    }));\n    labelChildren = /*#__PURE__*/React.createElement(React.Fragment, null, labelChildren, tooltipNode);\n  }\n  // Required Mark\n  const isOptionalMark = requiredMark === 'optional';\n  const isRenderMark = typeof requiredMark === 'function';\n  if (isRenderMark) {\n    labelChildren = requiredMark(labelChildren, {\n      required: !!required\n    });\n  } else if (isOptionalMark && !required) {\n    labelChildren = /*#__PURE__*/React.createElement(React.Fragment, null, labelChildren, /*#__PURE__*/React.createElement(\"span\", {\n      className: `${prefixCls}-item-optional`,\n      title: \"\"\n    }, (formLocale === null || formLocale === void 0 ? void 0 : formLocale.optional) || ((_a = defaultLocale.Form) === null || _a === void 0 ? void 0 : _a.optional)));\n  }\n  const labelClassName = classNames({\n    [`${prefixCls}-item-required`]: required,\n    [`${prefixCls}-item-required-mark-optional`]: isOptionalMark || isRenderMark,\n    [`${prefixCls}-item-no-colon`]: !computedColon\n  });\n  return /*#__PURE__*/React.createElement(Col, Object.assign({}, mergedLabelCol, {\n    className: labelColClassName\n  }), /*#__PURE__*/React.createElement(\"label\", {\n    htmlFor: htmlFor,\n    className: labelClassName,\n    title: typeof label === 'string' ? label : ''\n  }, labelChildren));\n};\nexport default FormItemLabel;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","QuestionCircleOutlined","classNames","React","Col","defaultLocale","useLocale","Tooltip","FormContext","toTooltipProps","tooltip","isValidElement","title","FormItemLabel","_ref","prefixCls","label","htmlFor","labelCol","labelAlign","colon","required","requiredMark","_a","formLocale","vertical","contextLabelAlign","contextLabelCol","labelWrap","contextColon","useContext","mergedLabelCol","mergedLabelAlign","labelClsBasic","labelColClassName","className","labelChildren","computedColon","haveColon","trim","replace","tooltipProps","icon","createElement","restTooltipProps","tooltipNode","assign","cloneElement","Fragment","isOptionalMark","isRenderMark","optional","Form","labelClassName"],"sources":["/var/www/gavt/node_modules/antd/es/form/FormItemLabel.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 QuestionCircleOutlined from \"@ant-design/icons/es/icons/QuestionCircleOutlined\";\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport Col from '../grid/col';\nimport defaultLocale from '../locale/en_US';\nimport { useLocale } from '../locale';\nimport Tooltip from '../tooltip';\nimport { FormContext } from './context';\nfunction toTooltipProps(tooltip) {\n  if (!tooltip) {\n    return null;\n  }\n  if (typeof tooltip === 'object' && ! /*#__PURE__*/React.isValidElement(tooltip)) {\n    return tooltip;\n  }\n  return {\n    title: tooltip\n  };\n}\nconst FormItemLabel = _ref => {\n  let {\n    prefixCls,\n    label,\n    htmlFor,\n    labelCol,\n    labelAlign,\n    colon,\n    required,\n    requiredMark,\n    tooltip\n  } = _ref;\n  var _a;\n  const [formLocale] = useLocale('Form');\n  const {\n    vertical,\n    labelAlign: contextLabelAlign,\n    labelCol: contextLabelCol,\n    labelWrap,\n    colon: contextColon\n  } = React.useContext(FormContext);\n  if (!label) {\n    return null;\n  }\n  const mergedLabelCol = labelCol || contextLabelCol || {};\n  const mergedLabelAlign = labelAlign || contextLabelAlign;\n  const labelClsBasic = `${prefixCls}-item-label`;\n  const labelColClassName = classNames(labelClsBasic, mergedLabelAlign === 'left' && `${labelClsBasic}-left`, mergedLabelCol.className, {\n    [`${labelClsBasic}-wrap`]: !!labelWrap\n  });\n  let labelChildren = label;\n  // Keep label is original where there should have no colon\n  const computedColon = colon === true || contextColon !== false && colon !== false;\n  const haveColon = computedColon && !vertical;\n  // Remove duplicated user input colon\n  if (haveColon && typeof label === 'string' && label.trim() !== '') {\n    labelChildren = label.replace(/[:|：]\\s*$/, '');\n  }\n  // Tooltip\n  const tooltipProps = toTooltipProps(tooltip);\n  if (tooltipProps) {\n    const {\n        icon = /*#__PURE__*/React.createElement(QuestionCircleOutlined, null)\n      } = tooltipProps,\n      restTooltipProps = __rest(tooltipProps, [\"icon\"]);\n    const tooltipNode = /*#__PURE__*/React.createElement(Tooltip, Object.assign({}, restTooltipProps), /*#__PURE__*/React.cloneElement(icon, {\n      className: `${prefixCls}-item-tooltip`,\n      title: ''\n    }));\n    labelChildren = /*#__PURE__*/React.createElement(React.Fragment, null, labelChildren, tooltipNode);\n  }\n  // Required Mark\n  const isOptionalMark = requiredMark === 'optional';\n  const isRenderMark = typeof requiredMark === 'function';\n  if (isRenderMark) {\n    labelChildren = requiredMark(labelChildren, {\n      required: !!required\n    });\n  } else if (isOptionalMark && !required) {\n    labelChildren = /*#__PURE__*/React.createElement(React.Fragment, null, labelChildren, /*#__PURE__*/React.createElement(\"span\", {\n      className: `${prefixCls}-item-optional`,\n      title: \"\"\n    }, (formLocale === null || formLocale === void 0 ? void 0 : formLocale.optional) || ((_a = defaultLocale.Form) === null || _a === void 0 ? void 0 : _a.optional)));\n  }\n  const labelClassName = classNames({\n    [`${prefixCls}-item-required`]: required,\n    [`${prefixCls}-item-required-mark-optional`]: isOptionalMark || isRenderMark,\n    [`${prefixCls}-item-no-colon`]: !computedColon\n  });\n  return /*#__PURE__*/React.createElement(Col, Object.assign({}, mergedLabelCol, {\n    className: labelColClassName\n  }), /*#__PURE__*/React.createElement(\"label\", {\n    htmlFor: htmlFor,\n    className: labelClassName,\n    title: typeof label === 'string' ? label : ''\n  }, labelChildren));\n};\nexport default FormItemLabel;"],"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,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,OAAOW,sBAAsB,MAAM,mDAAmD;AACtF,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,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