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WAAa,GAEjB,CACT,CACA,SAAS,eAAe,EAAe,EAAS,CAAC,EAAG,EAAO,CAAC,GAC1D,MAAM,SAAE,EAAQ,gBAAE,EAAe,iBAAE,EAAkB,MAAO,GAAgB,GAAU,CAAC,EACjF,EAAgB,SAAS,GACzB,EAAQ,EAAc,IAAK,KAAkB,GAAgB,EAC7D,EAA4B,iBAAV,GAAoD,IAA9B,OAAO,KAAK,GAAO,OAC3D,EAAqB,MAAM,YAAW,CAAC,EAAgB,CAAC,EAAG,KAC/D,MAAM,EAAW,MAAM,SACrB,IAAM,uBACJ,CACE,QACA,WACA,mBACA,MAAO,EACP,kBACA,WACA,QAEF,CAAC,MAGL,OAAO,MAAM,cAAc,EAAe,IAAK,KAAkB,EAAU,OAAM,IAiBnF,OAfI,EAAc,oBAChB,EAAmB,kBAAqB,IACtC,MAAM,EAAW,uBAAuB,CACtC,QACA,WACA,mBACA,MAAO,EACP,kBACA,WACA,SAEF,OAAO,EAAc,kBAAkB,IAAK,KAAc,GAAW,GAGzE,EAAmB,YAAc,YAAY,EAAc,aAAe,EAAc,QACjF,CACT","file":"/npm/@heroui/system-rsc@2.3.21/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@heroui/system-rsc@2.3.21/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n  // If the importer is in node compatibility mode or this is not an ESM\n  // file that has been converted to a CommonJS file using a Babel-\n  // compatible transform (i.e. \"__esModule\" has not been set), then set\n  // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n  isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n  mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n  extendVariants: () => extendVariants,\n  forwardRef: () => forwardRef,\n  isHeroUIEl: () => isHeroUIEl,\n  mapPropsVariants: () => mapPropsVariants,\n  mapPropsVariantsWithCommon: () => mapPropsVariantsWithCommon,\n  toIterator: () => toIterator\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/utils.ts\nvar import_react = require(\"react\");\nfunction forwardRef(component) {\n  return (0, import_react.forwardRef)(component);\n}\nvar toIterator = (obj) => {\n  return {\n    ...obj,\n    [Symbol.iterator]: function() {\n      const keys = Object.keys(this);\n      let index = 0;\n      return {\n        next: () => {\n          if (index >= keys.length) {\n            return { done: true };\n          }\n          const key = keys[index];\n          const value = this[key];\n          index++;\n          return { value: { key, value }, done: false };\n        }\n      };\n    }\n  };\n};\nvar mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {\n  if (!variantKeys) {\n    return [props, {}];\n  }\n  const picked = variantKeys.reduce((acc, key) => {\n    if (key in props) {\n      return { ...acc, [key]: props[key] };\n    } else {\n      return acc;\n    }\n  }, {});\n  if (removeVariantProps) {\n    const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});\n    return [omitted, picked];\n  } else {\n    return [props, picked];\n  }\n};\nvar mapPropsVariantsWithCommon = (originalProps, variantKeys, commonKeys) => {\n  const props = Object.keys(originalProps).filter((key) => !variantKeys.includes(key) || (commonKeys == null ? void 0 : commonKeys.includes(key))).reduce((acc, key) => ({ ...acc, [key]: originalProps[key] }), {});\n  const variants = variantKeys.reduce(\n    (acc, key) => ({ ...acc, [key]: originalProps[key] }),\n    {}\n  );\n  return [props, variants];\n};\nvar isHeroUIEl = (component) => {\n  var _a, _b, _c;\n  return !!((_c = (_b = (_a = component.type) == null ? void 0 : _a.render) == null ? void 0 : _b.displayName) == null ? void 0 : _c.includes(\"HeroUI\"));\n};\n\n// src/extend-variants.js\nvar React = __toESM(require(\"react\"));\nvar import_theme = require(\"@heroui/theme\");\nfunction getSlots(variants) {\n  return variants ? Object.values(variants).flatMap(Object.values).reduce((acc, slot) => {\n    if (typeof slot === \"object\" && slot !== null && !(slot instanceof String)) {\n      Object.keys(slot).forEach((key) => {\n        if (!acc.hasOwnProperty(key)) {\n          acc[key] = \"\";\n        }\n      });\n    }\n    return acc;\n  }, {}) : {};\n}\nfunction getClassNamesWithProps({\n  props = {},\n  variants,\n  slots,\n  defaultVariants,\n  compoundVariants,\n  hasSlots,\n  opts\n}) {\n  var _a, _b, _c;\n  const keys = [];\n  if (defaultVariants && typeof defaultVariants === \"object\") {\n    for (const key in defaultVariants) {\n      const value = defaultVariants[key];\n      const propValue = props == null ? void 0 : props[key];\n      if (propValue && propValue !== value) {\n        keys.push(key);\n      }\n    }\n  }\n  const customTv = (0, import_theme.tv)(\n    {\n      variants,\n      defaultVariants: defaultVariants && typeof defaultVariants === \"object\" ? (\n        // Do not apply default variants when the props variant is different\n        Object.keys(defaultVariants).filter((k) => !keys.includes(k)).reduce((o, k) => {\n          o[k] = defaultVariants[k];\n          return o;\n        }, [])\n      ) : defaultVariants,\n      compoundVariants,\n      ...hasSlots && { slots }\n    },\n    {\n      twMerge: (_a = opts.twMerge) != null ? _a : true,\n      twMergeConfig: (_b = opts.twMergeConfig) != null ? _b : {}\n    }\n  );\n  const [baseProps, variantProps] = mapPropsVariants(props, customTv.variantKeys, false);\n  const newProps = {\n    ...defaultVariants,\n    ...baseProps,\n    className: (0, import_theme.cn)(defaultVariants == null ? void 0 : defaultVariants.className, baseProps.className)\n  };\n  let classNames = {};\n  const result = customTv(variantProps);\n  if (!hasSlots) {\n    newProps.className = (0, import_theme.cn)(result, newProps.className);\n  } else {\n    Object.entries(result).forEach(([key, value]) => {\n      const slotResult = value();\n      if (typeof slotResult === \"string\") {\n        classNames[key] = slotResult;\n      }\n    });\n    Object.entries((_c = props.classNames) != null ? _c : {}).forEach(([key, value]) => {\n      classNames[key] = (0, import_theme.cn)(classNames[key], value);\n    });\n  }\n  if (Object.keys(classNames).length !== 0) {\n    newProps.classNames = classNames;\n  }\n  return newProps;\n}\nfunction extendVariants(BaseComponent, styles = {}, opts = {}) {\n  const { variants, defaultVariants, compoundVariants, slots: directSlots } = styles || {};\n  const inferredSlots = getSlots(variants);\n  const slots = directSlots ? { ...inferredSlots, ...directSlots } : inferredSlots;\n  const hasSlots = typeof slots === \"object\" && Object.keys(slots).length !== 0;\n  const ForwardedComponent = React.forwardRef((originalProps = {}, ref) => {\n    const newProps = React.useMemo(\n      () => getClassNamesWithProps(\n        {\n          slots,\n          variants,\n          compoundVariants,\n          props: originalProps,\n          defaultVariants,\n          hasSlots,\n          opts\n        },\n        [originalProps]\n      )\n    );\n    return React.createElement(BaseComponent, { ...originalProps, ...newProps, ref });\n  });\n  if (BaseComponent.getCollectionNode) {\n    ForwardedComponent.getCollectionNode = (itemProps) => {\n      const newProps = getClassNamesWithProps({\n        slots,\n        variants,\n        compoundVariants,\n        props: itemProps,\n        defaultVariants,\n        hasSlots,\n        opts\n      });\n      return BaseComponent.getCollectionNode({ ...itemProps, ...newProps });\n    };\n  }\n  ForwardedComponent.displayName = `Extended(${BaseComponent.displayName || BaseComponent.name})`;\n  return ForwardedComponent;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  extendVariants,\n  forwardRef,\n  isHeroUIEl,\n  mapPropsVariants,\n  mapPropsVariantsWithCommon,\n  toIterator\n});\n"]}