{"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 } from 'react';\nimport { QRCodeCanvas, QRCodeSVG } from '@rc-component/qrcode';\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport pickAttrs from \"rc-util/es/pickAttrs\";\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport { useLocale } from '../locale';\nimport { useToken } from '../theme/internal';\nimport QRcodeStatus from './QrcodeStatus';\nimport useStyle from './style/index';\nconst QRCode = props => {\n  var _a, _b, _c, _d;\n  const [, token] = useToken();\n  const {\n      value,\n      type = 'canvas',\n      icon = '',\n      size = 160,\n      iconSize,\n      color = token.colorText,\n      errorLevel = 'M',\n      status = 'active',\n      bordered = true,\n      onRefresh,\n      style,\n      className,\n      rootClassName,\n      prefixCls: customizePrefixCls,\n      bgColor = 'transparent',\n      statusRender,\n      boostLevel /* 👈 5.28.0+ */\n    } = props,\n    rest = __rest(props, [\"value\", \"type\", \"icon\", \"size\", \"iconSize\", \"color\", \"errorLevel\", \"status\", \"bordered\", \"onRefresh\", \"style\", \"className\", \"rootClassName\", \"prefixCls\", \"bgColor\", \"statusRender\", \"boostLevel\"]);\n  const {\n    getPrefixCls\n  } = useContext(ConfigContext);\n  const prefixCls = getPrefixCls('qrcode', customizePrefixCls);\n  const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n  const imageSettings = {\n    src: icon,\n    x: undefined,\n    y: undefined,\n    height: typeof iconSize === 'number' ? iconSize : (_a = iconSize === null || iconSize === void 0 ? void 0 : iconSize.height) !== null && _a !== void 0 ? _a : 40,\n    width: typeof iconSize === 'number' ? iconSize : (_b = iconSize === null || iconSize === void 0 ? void 0 : iconSize.width) !== null && _b !== void 0 ? _b : 40,\n    excavate: true,\n    crossOrigin: 'anonymous'\n  };\n  const a11yProps = pickAttrs(rest, true);\n  const restProps = omit(rest, Object.keys(a11yProps));\n  const qrCodeProps = Object.assign({\n    value,\n    size,\n    level: errorLevel,\n    bgColor,\n    fgColor: color,\n    style: {\n      width: style === null || style === void 0 ? void 0 : style.width,\n      height: style === null || style === void 0 ? void 0 : style.height\n    },\n    imageSettings: icon ? imageSettings : undefined,\n    boostLevel\n  }, a11yProps);\n  const [locale] = useLocale('QRCode');\n  if (process.env.NODE_ENV !== 'production') {\n    const warning = devUseWarning('QRCode');\n    process.env.NODE_ENV !== \"production\" ? warning(!!value, 'usage', 'need to receive `value` props') : void 0;\n    process.env.NODE_ENV !== \"production\" ? warning(!(icon && errorLevel === 'L'), 'usage', 'ErrorLevel `L` is not recommended to be used with `icon`, for scanning result would be affected by low level.') : void 0;\n  }\n  if (!value) {\n    return null;\n  }\n  const mergedCls = classNames(prefixCls, className, rootClassName, hashId, cssVarCls, {\n    [`${prefixCls}-borderless`]: !bordered\n  });\n  const mergedStyle = Object.assign(Object.assign({\n    backgroundColor: bgColor\n  }, style), {\n    width: (_c = style === null || style === void 0 ? void 0 : style.width) !== null && _c !== void 0 ? _c : size,\n    height: (_d = style === null || style === void 0 ? void 0 : style.height) !== null && _d !== void 0 ? _d : size\n  });\n  return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({}, restProps, {\n    className: mergedCls,\n    style: mergedStyle\n  }), status !== 'active' && (/*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-mask`\n  }, /*#__PURE__*/React.createElement(QRcodeStatus, {\n    prefixCls: prefixCls,\n    locale: locale,\n    status: status,\n    onRefresh: onRefresh,\n    statusRender: statusRender\n  }))), type === 'canvas' ? /*#__PURE__*/React.createElement(QRCodeCanvas, Object.assign({}, qrCodeProps)) : /*#__PURE__*/React.createElement(QRCodeSVG, Object.assign({}, qrCodeProps))));\n};\nif (process.env.NODE_ENV !== 'production') {\n  QRCode.displayName = 'QRCode';\n}\nexport default QRCode;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","useContext","QRCodeCanvas","QRCodeSVG","classNames","omit","pickAttrs","devUseWarning","ConfigContext","useLocale","useToken","QRcodeStatus","useStyle","QRCode","props","_a","_b","_c","_d","token","value","type","icon","size","iconSize","color","colorText","errorLevel","status","bordered","onRefresh","style","className","rootClassName","prefixCls","customizePrefixCls","bgColor","statusRender","boostLevel","rest","getPrefixCls","wrapCSSVar","hashId","cssVarCls","imageSettings","src","x","undefined","y","height","width","excavate","crossOrigin","a11yProps","restProps","keys","qrCodeProps","assign","level","fgColor","locale","process","env","NODE_ENV","warning","mergedCls","mergedStyle","backgroundColor","createElement","displayName"],"sources":["/Users/nili/Documents/trae_projects/client/node_modules/antd/es/qr-code/index.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 } from 'react';\nimport { QRCodeCanvas, QRCodeSVG } from '@rc-component/qrcode';\nimport classNames from 'classnames';\nimport omit from \"rc-util/es/omit\";\nimport pickAttrs from \"rc-util/es/pickAttrs\";\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport { useLocale } from '../locale';\nimport { useToken } from '../theme/internal';\nimport QRcodeStatus from './QrcodeStatus';\nimport useStyle from './style/index';\nconst QRCode = props => {\n  var _a, _b, _c, _d;\n  const [, token] = useToken();\n  const {\n      value,\n      type = 'canvas',\n      icon = '',\n      size = 160,\n      iconSize,\n      color = token.colorText,\n      errorLevel = 'M',\n      status = 'active',\n      bordered = true,\n      onRefresh,\n      style,\n      className,\n      rootClassName,\n      prefixCls: customizePrefixCls,\n      bgColor = 'transparent',\n      statusRender,\n      boostLevel /* 👈 5.28.0+ */\n    } = props,\n    rest = __rest(props, [\"value\", \"type\", \"icon\", \"size\", \"iconSize\", \"color\", \"errorLevel\", \"status\", \"bordered\", \"onRefresh\", \"style\", \"className\", \"rootClassName\", \"prefixCls\", \"bgColor\", \"statusRender\", \"boostLevel\"]);\n  const {\n    getPrefixCls\n  } = useContext(ConfigContext);\n  const prefixCls = getPrefixCls('qrcode', customizePrefixCls);\n  const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls);\n  const imageSettings = {\n    src: icon,\n    x: undefined,\n    y: undefined,\n    height: typeof iconSize === 'number' ? iconSize : (_a = iconSize === null || iconSize === void 0 ? void 0 : iconSize.height) !== null && _a !== void 0 ? _a : 40,\n    width: typeof iconSize === 'number' ? iconSize : (_b = iconSize === null || iconSize === void 0 ? void 0 : iconSize.width) !== null && _b !== void 0 ? _b : 40,\n    excavate: true,\n    crossOrigin: 'anonymous'\n  };\n  const a11yProps = pickAttrs(rest, true);\n  const restProps = omit(rest, Object.keys(a11yProps));\n  const qrCodeProps = Object.assign({\n    value,\n    size,\n    level: errorLevel,\n    bgColor,\n    fgColor: color,\n    style: {\n      width: style === null || style === void 0 ? void 0 : style.width,\n      height: style === null || style === void 0 ? void 0 : style.height\n    },\n    imageSettings: icon ? imageSettings : undefined,\n    boostLevel\n  }, a11yProps);\n  const [locale] = useLocale('QRCode');\n  if (process.env.NODE_ENV !== 'production') {\n    const warning = devUseWarning('QRCode');\n    process.env.NODE_ENV !== \"production\" ? warning(!!value, 'usage', 'need to receive `value` props') : void 0;\n    process.env.NODE_ENV !== \"production\" ? warning(!(icon && errorLevel === 'L'), 'usage', 'ErrorLevel `L` is not recommended to be used with `icon`, for scanning result would be affected by low level.') : void 0;\n  }\n  if (!value) {\n    return null;\n  }\n  const mergedCls = classNames(prefixCls, className, rootClassName, hashId, cssVarCls, {\n    [`${prefixCls}-borderless`]: !bordered\n  });\n  const mergedStyle = Object.assign(Object.assign({\n    backgroundColor: bgColor\n  }, style), {\n    width: (_c = style === null || style === void 0 ? void 0 : style.width) !== null && _c !== void 0 ? _c : size,\n    height: (_d = style === null || style === void 0 ? void 0 : style.height) !== null && _d !== void 0 ? _d : size\n  });\n  return wrapCSSVar(/*#__PURE__*/React.createElement(\"div\", Object.assign({}, restProps, {\n    className: mergedCls,\n    style: mergedStyle\n  }), status !== 'active' && (/*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-mask`\n  }, /*#__PURE__*/React.createElement(QRcodeStatus, {\n    prefixCls: prefixCls,\n    locale: locale,\n    status: status,\n    onRefresh: onRefresh,\n    statusRender: statusRender\n  }))), type === 'canvas' ? /*#__PURE__*/React.createElement(QRCodeCanvas, Object.assign({}, qrCodeProps)) : /*#__PURE__*/React.createElement(QRCodeSVG, Object.assign({}, qrCodeProps))));\n};\nif (process.env.NODE_ENV !== 'production') {\n  QRCode.displayName = 'QRCode';\n}\nexport default QRCode;"],"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;EACh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