{"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 * as React from 'react';\nimport QuestionCircleOutlined from \"@ant-design/icons/es/icons/QuestionCircleOutlined\";\nimport classNames from 'classnames';\nimport convertToTooltipProps from '../_util/convertToTooltipProps';\nimport Col from '../grid/col';\nimport { useLocale } from '../locale';\nimport defaultLocale from '../locale/en_US';\nimport Tooltip from '../tooltip';\nimport { FormContext } from './context';\nconst FormItemLabel = _ref => {\n  let {\n    prefixCls,\n    label,\n    htmlFor,\n    labelCol,\n    labelAlign,\n    colon,\n    required,\n    requiredMark,\n    tooltip,\n    vertical\n  } = _ref;\n  var _a;\n  const [formLocale] = useLocale('Form');\n  const {\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 = convertToTooltipProps(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      onClick: e => {\n        // Prevent label behavior in tooltip icon\n        // https://github.com/ant-design/ant-design/issues/46154\n        e.preventDefault();\n      },\n      tabIndex: null\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  const hideRequiredMark = requiredMark === false;\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  // https://github.com/ant-design/ant-design/pull/52950#discussion_r1980880316\n  let markType;\n  if (hideRequiredMark) {\n    markType = 'hidden';\n  } else if (isOptionalMark || isRenderMark) {\n    markType = 'optional';\n  }\n  const labelClassName = classNames({\n    [`${prefixCls}-item-required`]: required,\n    [`${prefixCls}-item-required-mark-${markType}`]: markType,\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","React","QuestionCircleOutlined","classNames","convertToTooltipProps","Col","useLocale","defaultLocale","Tooltip","FormContext","FormItemLabel","_ref","prefixCls","label","htmlFor","labelCol","labelAlign","colon","required","requiredMark","tooltip","vertical","_a","formLocale","contextLabelAlign","contextLabelCol","labelWrap","contextColon","useContext","mergedLabelCol","mergedLabelAlign","labelClsBasic","labelColClassName","className","labelChildren","computedColon","haveColon","trim","replace","tooltipProps","icon","createElement","restTooltipProps","tooltipNode","assign","cloneElement","title","onClick","preventDefault","tabIndex","Fragment","isOptionalMark","isRenderMark","hideRequiredMark","optional","Form","markType","labelClassName"],"sources":["/Users/nili/Documents/trae_projects/client/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 * as React from 'react';\nimport QuestionCircleOutlined from \"@ant-design/icons/es/icons/QuestionCircleOutlined\";\nimport classNames from 'classnames';\nimport convertToTooltipProps from '../_util/convertToTooltipProps';\nimport Col from '../grid/col';\nimport { useLocale } from '../locale';\nimport defaultLocale from '../locale/en_US';\nimport Tooltip from '../tooltip';\nimport { FormContext } from './context';\nconst FormItemLabel = ({\n  prefixCls,\n  label,\n  htmlFor,\n  labelCol,\n  labelAlign,\n  colon,\n  required,\n  requiredMark,\n  tooltip,\n  vertical\n}) => {\n  var _a;\n  const [formLocale] = useLocale('Form');\n  const {\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 = convertToTooltipProps(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      onClick: e => {\n        // Prevent label behavior in tooltip icon\n        // https://github.com/ant-design/ant-design/issues/46154\n        e.preventDefault();\n      },\n      tabIndex: null\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  const hideRequiredMark = requiredMark === false;\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  // https://github.com/ant-design/ant-design/pull/52950#discussion_r1980880316\n  let markType;\n  if (hideRequiredMark) {\n    markType = 'hidden';\n  } else if (isOptionalMark || isRenderMark) {\n    markType = 'optional';\n  }\n  const labelClassName = classNames({\n    [`${prefixCls}-item-required`]: required,\n    [`${prefixCls}-item-required-mark-${markType}`]: markType,\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,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