{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"value\", \"size\", \"level\", \"bgColor\", \"fgColor\", \"includeMargin\", \"minVersion\", \"title\", \"marginSize\", \"imageSettings\", \"boostLevel\"];\nimport React from 'react';\nimport { DEFAULT_BACKGROUND_COLOR, DEFAULT_FRONT_COLOR, DEFAULT_NEED_MARGIN, DEFAULT_LEVEL, DEFAULT_MINVERSION, DEFAULT_SIZE, excavateModules, generatePath } from \"./utils\";\nimport { useQRCode } from \"./hooks/useQRCode\";\nvar QRCodeSVG = /*#__PURE__*/React.forwardRef(function (props, ref) {\n  var value = props.value,\n    _props$size = props.size,\n    size = _props$size === void 0 ? DEFAULT_SIZE : _props$size,\n    _props$level = props.level,\n    level = _props$level === void 0 ? DEFAULT_LEVEL : _props$level,\n    _props$bgColor = props.bgColor,\n    bgColor = _props$bgColor === void 0 ? DEFAULT_BACKGROUND_COLOR : _props$bgColor,\n    _props$fgColor = props.fgColor,\n    fgColor = _props$fgColor === void 0 ? DEFAULT_FRONT_COLOR : _props$fgColor,\n    _props$includeMargin = props.includeMargin,\n    includeMargin = _props$includeMargin === void 0 ? DEFAULT_NEED_MARGIN : _props$includeMargin,\n    _props$minVersion = props.minVersion,\n    minVersion = _props$minVersion === void 0 ? DEFAULT_MINVERSION : _props$minVersion,\n    title = props.title,\n    marginSize = props.marginSize,\n    imageSettings = props.imageSettings,\n    boostLevel = props.boostLevel,\n    otherProps = _objectWithoutProperties(props, _excluded);\n  var _useQRCode = useQRCode({\n      value: value,\n      level: level,\n      minVersion: minVersion,\n      includeMargin: includeMargin,\n      marginSize: marginSize,\n      imageSettings: imageSettings,\n      size: size,\n      boostLevel: boostLevel\n    }),\n    margin = _useQRCode.margin,\n    cells = _useQRCode.cells,\n    numCells = _useQRCode.numCells,\n    calculatedImageSettings = _useQRCode.calculatedImageSettings;\n  var cellsToDraw = cells;\n  var image = null;\n  if (imageSettings != null && calculatedImageSettings != null) {\n    if (calculatedImageSettings.excavation != null) {\n      cellsToDraw = excavateModules(cells, calculatedImageSettings.excavation);\n    }\n    image = /*#__PURE__*/React.createElement(\"image\", {\n      href: imageSettings.src,\n      height: calculatedImageSettings.h,\n      width: calculatedImageSettings.w,\n      x: calculatedImageSettings.x + margin,\n      y: calculatedImageSettings.y + margin,\n      preserveAspectRatio: \"none\",\n      opacity: calculatedImageSettings.opacity\n      // when crossOrigin is not set, the image will be tainted\n      // and the canvas cannot be exported to an image\n      ,\n\n      crossOrigin: calculatedImageSettings.crossOrigin\n    });\n  }\n  var fgPath = generatePath(cellsToDraw, margin);\n  return /*#__PURE__*/React.createElement(\"svg\", _extends({\n    height: size,\n    width: size,\n    viewBox: \"0 0 \".concat(numCells, \" \").concat(numCells),\n    ref: ref,\n    role: \"img\"\n  }, otherProps), !!title && /*#__PURE__*/React.createElement(\"title\", null, title), /*#__PURE__*/React.createElement(\"path\", {\n    fill: bgColor,\n    d: \"M0,0 h\".concat(numCells, \"v\").concat(numCells, \"H0z\"),\n    shapeRendering: \"crispEdges\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    fill: fgColor,\n    d: fgPath,\n    shapeRendering: \"crispEdges\"\n  }), image);\n});\nif (process.env.NODE_ENV !== 'production') {\n  QRCodeSVG.displayName = 'QRCodeSVG';\n}\nexport { QRCodeSVG };","map":{"version":3,"names":["_extends","_objectWithoutProperties","_excluded","React","DEFAULT_BACKGROUND_COLOR","DEFAULT_FRONT_COLOR","DEFAULT_NEED_MARGIN","DEFAULT_LEVEL","DEFAULT_MINVERSION","DEFAULT_SIZE","excavateModules","generatePath","useQRCode","QRCodeSVG","forwardRef","props","ref","value","_props$size","size","_props$level","level","_props$bgColor","bgColor","_props$fgColor","fgColor","_props$includeMargin","includeMargin","_props$minVersion","minVersion","title","marginSize","imageSettings","boostLevel","otherProps","_useQRCode","margin","cells","numCells","calculatedImageSettings","cellsToDraw","image","excavation","createElement","href","src","height","h","width","w","x","y","preserveAspectRatio","opacity","crossOrigin","fgPath","viewBox","concat","role","fill","d","shapeRendering","process","env","NODE_ENV","displayName"],"sources":["/Users/nili/Documents/trae_projects/client/node_modules/@rc-component/qrcode/es/QRCodeSVG.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"value\", \"size\", \"level\", \"bgColor\", \"fgColor\", \"includeMargin\", \"minVersion\", \"title\", \"marginSize\", \"imageSettings\", \"boostLevel\"];\nimport React from 'react';\nimport { DEFAULT_BACKGROUND_COLOR, DEFAULT_FRONT_COLOR, DEFAULT_NEED_MARGIN, DEFAULT_LEVEL, DEFAULT_MINVERSION, DEFAULT_SIZE, excavateModules, generatePath } from \"./utils\";\nimport { useQRCode } from \"./hooks/useQRCode\";\nvar QRCodeSVG = /*#__PURE__*/React.forwardRef(function (props, ref) {\n  var value = props.value,\n    _props$size = props.size,\n    size = _props$size === void 0 ? DEFAULT_SIZE : _props$size,\n    _props$level = props.level,\n    level = _props$level === void 0 ? DEFAULT_LEVEL : _props$level,\n    _props$bgColor = props.bgColor,\n    bgColor = _props$bgColor === void 0 ? DEFAULT_BACKGROUND_COLOR : _props$bgColor,\n    _props$fgColor = props.fgColor,\n    fgColor = _props$fgColor === void 0 ? DEFAULT_FRONT_COLOR : _props$fgColor,\n    _props$includeMargin = props.includeMargin,\n    includeMargin = _props$includeMargin === void 0 ? DEFAULT_NEED_MARGIN : _props$includeMargin,\n    _props$minVersion = props.minVersion,\n    minVersion = _props$minVersion === void 0 ? DEFAULT_MINVERSION : _props$minVersion,\n    title = props.title,\n    marginSize = props.marginSize,\n    imageSettings = props.imageSettings,\n    boostLevel = props.boostLevel,\n    otherProps = _objectWithoutProperties(props, _excluded);\n  var _useQRCode = useQRCode({\n      value: value,\n      level: level,\n      minVersion: minVersion,\n      includeMargin: includeMargin,\n      marginSize: marginSize,\n      imageSettings: imageSettings,\n      size: size,\n      boostLevel: boostLevel\n    }),\n    margin = _useQRCode.margin,\n    cells = _useQRCode.cells,\n    numCells = _useQRCode.numCells,\n    calculatedImageSettings = _useQRCode.calculatedImageSettings;\n  var cellsToDraw = cells;\n  var image = null;\n  if (imageSettings != null && calculatedImageSettings != null) {\n    if (calculatedImageSettings.excavation != null) {\n      cellsToDraw = excavateModules(cells, calculatedImageSettings.excavation);\n    }\n    image = /*#__PURE__*/React.createElement(\"image\", {\n      href: imageSettings.src,\n      height: calculatedImageSettings.h,\n      width: calculatedImageSettings.w,\n      x: calculatedImageSettings.x + margin,\n      y: calculatedImageSettings.y + margin,\n      preserveAspectRatio: \"none\",\n      opacity: calculatedImageSettings.opacity\n      // when crossOrigin is not set, the image will be tainted\n      // and the canvas cannot be exported to an image\n      ,\n      crossOrigin: calculatedImageSettings.crossOrigin\n    });\n  }\n  var fgPath = generatePath(cellsToDraw, margin);\n  return /*#__PURE__*/React.createElement(\"svg\", _extends({\n    height: size,\n    width: size,\n    viewBox: \"0 0 \".concat(numCells, \" \").concat(numCells),\n    ref: ref,\n    role: \"img\"\n  }, otherProps), !!title && /*#__PURE__*/React.createElement(\"title\", null, title), /*#__PURE__*/React.createElement(\"path\", {\n    fill: bgColor,\n    d: \"M0,0 h\".concat(numCells, \"v\").concat(numCells, \"H0z\"),\n    shapeRendering: \"crispEdges\"\n  }), /*#__PURE__*/React.createElement(\"path\", {\n    fill: fgColor,\n    d: fgPath,\n    shapeRendering: \"crispEdges\"\n  }), image);\n});\nif (process.env.NODE_ENV !== 'production') {\n  QRCodeSVG.displayName = 'QRCodeSVG';\n}\nexport { QRCodeSVG };"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,wBAAwB,MAAM,oDAAoD;AACzF,IAAIC,SAAS,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,YAAY,EAAE,OAAO,EAA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