{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "react-email/call-to-action",
  "title": "Call To Action",
  "description": "Call To Action email component",
  "dependencies": [
    "react-email"
  ],
  "registryDependencies": [
    "https://emailcn.run/r/react-email/default-fonts.json",
    "https://emailcn.run/r/react-email/theme-default.json"
  ],
  "files": [
    {
      "path": "registry/bases/react-email/components/marketing/cta/call-to-action.tsx",
      "content": "import { Fragment } from \"react\";\nimport {\n  Body,\n  Container,\n  Head as EmailHead,\n  Html,\n  Preview,\n  Tailwind,\n  Link,\n  Section,\n  Row,\n  Column,\n  Text,\n  Heading,\n  Img,\n} from \"react-email\";\n\nimport { DefaultFonts } from \"@/components/email/font-default\";\nimport { createEmailTailwindConfig } from \"@/components/email/email-theme\";\nimport type { EmailTheme } from \"@/components/email/email-theme\";\nimport { emailAsset } from \"@/components/email/email-assets\";\nimport { defaultTheme } from \"@/components/email/theme-default\";\n\nconst resolveDefaultProps = <Defaults extends object, Props extends object>(\n  defaults: Defaults,\n  props: Props\n) => {\n  const supplied = props as Record<string, unknown>;\n  const fallbackEntries = Object.entries(defaults).map(([key, value]) => [\n    key,\n    supplied[key] === undefined ? value : supplied[key],\n  ]);\n\n  return {\n    ...defaults,\n    ...props,\n    ...Object.fromEntries(fallbackEntries),\n  } as Defaults & Props;\n};\n\ntype CtaBundle_CTAWithTitleAndActionLeadVariant =\n  | \"title-and-lead\"\n  | \"secondary-button\"\n  | \"minimal\";\n\ninterface CtaBundle_CTAWithTitleAndActionLeadProps {\n  theme?: EmailTheme;\n  heading?: string;\n  subtext?: string;\n  ctaLabel?: string;\n  ctaHref?: string;\n  secondaryCtaLabel?: string;\n  secondaryCtaHref?: string;\n  signoff?: string;\n  pageBackgroundColor?: string;\n  backgroundColor?: string;\n  headingColor?: string;\n  textColor?: string;\n  primaryButtonBackgroundColor?: string;\n  primaryButtonTextColor?: string;\n  secondaryButtonBackgroundColor?: string;\n  secondaryButtonTextColor?: string;\n  secondaryButtonBorderColor?: string;\n  variant?: CtaBundle_CTAWithTitleAndActionLeadVariant;\n}\n\nconst CtaBundle_fontFamily =\n  'Inter, ui-sans-serif, system-ui, -apple-system, \"Segoe UI\", sans-serif';\n\nconst CtaBundle_arrowSrc = emailAsset(\"icon-arrow-right.png\");\n\nconst CtaBundle_responsiveStyles = `\n    @media only screen and (max-width: 430px) {\n      .cta-title-action-cell {\n        display: block !important;\n      }\n\n      .cta-title-action-gap {\n        line-height: 24px !important;\n      }\n    }\n\n    .cta-title-action-primary:hover {\n      background-color: #4338ca !important;\n    }\n\n    .cta-title-action-secondary:hover {\n      background-color: #f9fafb !important;\n    }\n  `;\n\ntype CtaBundle_SectionProps = Omit<\n  CtaBundle_CTAWithTitleAndActionLeadProps,\n  \"theme\"\n>;\n\nconst CtaBundle_defaultSectionProps: Omit<\n  Required<CtaBundle_SectionProps>,\n  \"ctaLabel\"\n> = {\n  backgroundColor: \"#fffffe\",\n  ctaHref: \"https://example.com/\",\n  heading: \"Confirm your email\",\n  headingColor: \"#030712\",\n  pageBackgroundColor: \"#f1f5f9\",\n  primaryButtonBackgroundColor: \"#4f46e5\",\n  primaryButtonTextColor: \"#f8fafc\",\n  secondaryButtonBackgroundColor: \"#fffffe\",\n  secondaryButtonBorderColor: \"#d1d5db\",\n  secondaryButtonTextColor: \"#4b5563\",\n  secondaryCtaHref: \"https://example.com/\",\n  secondaryCtaLabel: \"Learn more\",\n  signoff: \"Thank you, the emailcn Team\",\n  subtext:\n    \"We created a personal account for you. Please confirm your e-mail address and use our service to the maximum\",\n  textColor: \"#4b5563\",\n  variant: \"title-and-lead\",\n};\n\nconst CtaBundle_CTAWithTitleAndActionLeadSection = (\n  props: CtaBundle_SectionProps\n) => {\n  const {\n    backgroundColor,\n    ctaHref,\n    ctaLabel,\n    heading,\n    headingColor,\n    pageBackgroundColor,\n    primaryButtonBackgroundColor,\n    primaryButtonTextColor,\n    secondaryButtonBackgroundColor,\n    secondaryButtonBorderColor,\n    secondaryButtonTextColor,\n    secondaryCtaHref,\n    secondaryCtaLabel,\n    signoff,\n    subtext,\n    textColor,\n    variant,\n  } = resolveDefaultProps(CtaBundle_defaultSectionProps, props);\n  const resolvedCtaLabel =\n    ctaLabel ??\n    (variant === \"title-and-lead\" ? \"Activate account\" : \"Shop now\");\n  const primaryButton = (\n    <Link\n      className=\"cta-title-action-primary\"\n      href={ctaHref}\n      style={{\n        backgroundColor: primaryButtonBackgroundColor,\n        borderRadius: \"8px\",\n        color: primaryButtonTextColor,\n        display: \"inline-block\",\n        fontFamily: CtaBundle_fontFamily,\n        fontSize: \"16px\",\n        fontWeight: 500,\n        lineHeight: \"24px\",\n        padding: \"10px 22px\",\n        textAlign: \"center\",\n        textDecoration: \"none\",\n      }}\n    >\n      <span style={{ marginRight: variant === \"minimal\" ? \"8px\" : 0 }}>\n        {resolvedCtaLabel}\n      </span>\n      {variant === \"minimal\" ? (\n        <Img\n          alt=\"\"\n          src={CtaBundle_arrowSrc}\n          style={{\n            display: \"inline-block\",\n            maxWidth: \"100%\",\n            verticalAlign: \"baseline\",\n          }}\n          width=\"12\"\n        />\n      ) : null}\n    </Link>\n  );\n  return (\n    <Section style={{ backgroundColor: pageBackgroundColor }} width=\"100%\">\n      <Fragment>\n        <Row>\n          <Column>&zwj;</Column>\n          <Column\n            style={{\n              backgroundColor,\n              maxWidth: \"100%\",\n              paddingBottom: \"44px\",\n              width: \"600px\",\n            }}\n          >\n            <Section width=\"100%\">\n              <Fragment>\n                <Row>\n                  <Column style={{ padding: \"0 24px\", textAlign: \"center\" }}>\n                    <Section style={{ lineHeight: \"44px\" }}>&zwj;</Section>\n                    {(() => {\n                      if (variant === \"minimal\") {\n                        return (\n                          <>\n                            {primaryButton}\n                            <Section style={{ lineHeight: \"24px\" }}>\n                              &zwj;\n                            </Section>\n                            <Text\n                              style={{\n                                color: headingColor,\n                                fontFamily: CtaBundle_fontFamily,\n                                fontSize: \"14px\",\n                                fontWeight: 600,\n                                lineHeight: \"20px\",\n                                margin: 0,\n                              }}\n                            >\n                              {signoff}\n                            </Text>\n                          </>\n                        );\n                      }\n                      return (\n                        <>\n                          <Heading\n                            style={{\n                              color: headingColor,\n                              fontFamily: CtaBundle_fontFamily,\n                              fontSize: \"30px\",\n                              fontWeight: 500,\n                              lineHeight: \"36px\",\n                              margin: 0,\n                            }}\n                            as=\"h2\"\n                          >\n                            {heading}\n                          </Heading>\n                          <Section style={{ lineHeight: \"24px\" }}>\n                            &zwj;\n                          </Section>\n                          <Text\n                            style={{\n                              color: textColor,\n                              fontFamily: CtaBundle_fontFamily,\n                              fontSize: \"16px\",\n                              fontWeight: 300,\n                              lineHeight: \"24px\",\n                              margin: 0,\n                            }}\n                          >\n                            {subtext}\n                          </Text>\n                          <Section style={{ lineHeight: \"36px\" }}>\n                            &zwj;\n                          </Section>\n                          {variant === \"title-and-lead\" ? (\n                            primaryButton\n                          ) : (\n                            <Section align=\"center\" style={{ margin: \"auto\" }}>\n                              <Fragment>\n                                <Row>\n                                  <Column className=\"cta-title-action-cell\">\n                                    {primaryButton}\n                                  </Column>\n                                  <Column\n                                    className=\"cta-title-action-cell cta-title-action-gap\"\n                                    style={{ width: \"24px\" }}\n                                  >\n                                    &zwj;\n                                  </Column>\n                                  <Column className=\"cta-title-action-cell\">\n                                    <Link\n                                      className=\"cta-title-action-secondary\"\n                                      href={secondaryCtaHref}\n                                      style={{\n                                        backgroundColor:\n                                          secondaryButtonBackgroundColor,\n                                        border: `1px solid ${secondaryButtonBorderColor}`,\n                                        borderRadius: \"8px\",\n                                        color: secondaryButtonTextColor,\n                                        display: \"inline-block\",\n                                        fontFamily: CtaBundle_fontFamily,\n                                        fontSize: \"16px\",\n                                        fontWeight: 600,\n                                        lineHeight: \"24px\",\n                                        padding: \"10px 22px\",\n                                        textAlign: \"center\",\n                                        textDecoration: \"none\",\n                                      }}\n                                    >\n                                      {secondaryCtaLabel}\n                                    </Link>\n                                  </Column>\n                                </Row>\n                              </Fragment>\n                            </Section>\n                          )}\n                        </>\n                      );\n                    })()}\n                  </Column>\n                </Row>\n              </Fragment>\n            </Section>\n          </Column>\n          <Column>&zwj;</Column>\n        </Row>\n      </Fragment>\n    </Section>\n  );\n};\n\nconst CtaBundle_CTAWithTitleAndActionLead = ({\n  pageBackgroundColor = \"#f1f5f9\",\n  theme = defaultTheme,\n  variant = \"title-and-lead\",\n  ...props\n}: CtaBundle_CTAWithTitleAndActionLeadProps) => (\n  <Html>\n    <EmailHead>\n      <DefaultFonts />\n      <style dangerouslySetInnerHTML={{ __html: CtaBundle_responsiveStyles }} />\n    </EmailHead>\n    <Preview>\n      {variant === \"minimal\"\n        ? (props.signoff ?? \"Shop now\")\n        : (props.heading ?? \"Confirm your email\")}\n    </Preview>\n    <Tailwind config={createEmailTailwindConfig(theme)}>\n      <Body\n        style={{\n          backgroundColor: pageBackgroundColor,\n          fontFamily: CtaBundle_fontFamily,\n        }}\n        className=\"m-0\"\n      >\n        <Container className=\"mx-auto max-w-[600px] w-[600px]\">\n          <CtaBundle_CTAWithTitleAndActionLeadSection\n            {...props}\n            pageBackgroundColor={pageBackgroundColor}\n            variant={variant}\n          />\n        </Container>\n      </Body>\n    </Tailwind>\n  </Html>\n);\n\nCtaBundle_CTAWithTitleAndActionLead.PreviewProps = {\n  theme: defaultTheme,\n  variant: \"title-and-lead\",\n} satisfies CtaBundle_CTAWithTitleAndActionLeadProps;\n\nconst __CtaBundle = {\n  Component: CtaBundle_CTAWithTitleAndActionLead,\n  __CallToActionSection: CtaBundle_CTAWithTitleAndActionLeadSection,\n};\n\nconst __Cta = __CtaBundle.Component;\n\nconst { __CallToActionSection } = __CtaBundle;\n\nexport interface CallToActionProps {\n  theme?: Parameters<typeof __Cta>[0][\"theme\"];\n  heading?: string;\n  description?: string;\n  signoff?: string;\n  actions?: {\n    href: string;\n    label: string;\n  }[];\n}\n\nexport const CallToAction = ({\n  theme,\n  heading,\n  description,\n  signoff,\n  actions,\n}: CallToActionProps) => {\n  let variant: Parameters<typeof __Cta>[0][\"variant\"] = \"minimal\";\n  if (actions && actions.length > 1) {\n    variant = \"secondary-button\";\n  } else if (heading || description) {\n    variant = \"title-and-lead\";\n  }\n\n  return (\n    <__Cta\n      ctaHref={actions?.[0]?.href}\n      ctaLabel={actions?.[0]?.label}\n      heading={heading}\n      secondaryCtaHref={actions?.[1]?.href}\n      secondaryCtaLabel={actions?.[1]?.label}\n      signoff={signoff}\n      subtext={description}\n      theme={theme}\n      variant={variant}\n    />\n  );\n};\n\nexport const CallToActionSection = __CallToActionSection;\n\nCallToAction.PreviewProps = {} satisfies CallToActionProps;\n",
      "type": "registry:component",
      "target": "components/email/call-to-action.tsx"
    },
    {
      "path": "registry/email-assets.ts",
      "content": "const ASSET_ORIGIN = \"https://www.emailcn.run\";\nconst ICONS8_ORIGIN = \"https://img.icons8.com\";\nconst UNSPLASH_ORIGIN = \"https://images.unsplash.com\";\n\nconst portraitIds = [\n  \"photo-1500648767791-00dcc994a43e\",\n  \"photo-1507003211169-0a1dd7228f2d\",\n  \"photo-1494790108377-be9c29b29330\",\n  \"photo-1438761681033-6461ffad8d80\",\n  \"photo-1534528741775-53994a69daeb\",\n  \"photo-1506794778202-cad84cf45f1c\",\n] as const;\n\nconst productIds = [\n  \"photo-1521572163474-6864f9cf17ab\",\n  \"photo-1503341504253-dff4815485f1\",\n  \"photo-1576566588028-4147f3842f27\",\n  \"photo-1562157873-818bc0726f68\",\n] as const;\n\ntype Dimensions = readonly [width: number, height: number];\n\nconst dimensionRules = [\n  [/^bento-grids\\/1-bento-(?:1|4)\\./i, [336, 272]],\n  [/^bento-grids\\/1-bento-(?:2|3)\\./i, [720, 272]],\n  [/^bento-grids\\/2-bento-1\\./i, [336, 232]],\n  [/^bento-grids\\/2-bento-(?:2|7)\\./i, [720, 352]],\n  [/^bento-grids\\/2-bento-3\\./i, [720, 344]],\n  [/^bento-grids\\/2-bento-4\\./i, [336, 224]],\n  [/^bento-grids\\/2-bento-(?:5|6)\\./i, [336, 408]],\n  [/^bento-grids\\/3-bento-lg-\\d-pad\\./i, [304, 576]],\n  [/^bento-grids\\/3-bento-lg-\\d\\./i, [336, 576]],\n  [/^bento-grids\\/3-bento-sm-\\d\\./i, [336, 336]],\n  [/^bento-grids\\/4-bento-lg-(?:1|2)\\./i, [496, 440]],\n  [/^bento-grids\\/4-bento-lg-3\\./i, [688, 242]],\n  [/^bento-grids\\/4-bento-lg-4\\./i, [656, 242]],\n  [/^bento-grids\\/4-bento-sm-[1-4]\\./i, [456, 363]],\n  [/^bento-grids\\/4-bento-sm-5\\./i, [408, 363]],\n  [/^bento-grids\\/bento-1\\./i, [720, 376]],\n  [/^bento-grids\\/bento-[2-5]\\./i, [528, 376]],\n  [/^category-previews\\/landscape-/i, [508, 376]],\n  [/^category-previews\\/portrait-/i, [376, 377]],\n  [/^coupons\\/(?:bg-image-[1-3]|pattern)\\./i, [800, 500]],\n  [/^coupons\\/bg-image-[4-6]\\./i, [1200, 1200]],\n  [/^cta\\/cta-bg-1\\./i, [1200, 772]],\n  [/^cta\\/cta-bg-2\\./i, [1200, 760]],\n  [/^cta\\/cta-bg-3\\./i, [1104, 696]],\n  [/^cta\\/cta-bg-glow\\./i, [1200, 840]],\n  [/^cta\\/cta-collage-(?:1|4)\\./i, [248, 456]],\n  [/^cta\\/(?:cta-collage-(?:2|3)|cta-outwear-\\d)\\./i, [280, 456]],\n  [/^cta\\/cta-split-avatars-\\d\\./i, [280, 338]],\n  [/^cta\\/cta-with-image-\\d\\./i, [944, 606]],\n  [/^cta\\/strip-cut-\\d\\./i, [232, 163]],\n  [/^cta\\/strip-\\d\\./i, [232, 232]],\n  [/^feature\\/feature-1\\./i, [564, 564]],\n  [/^feature\\/feature-2-/i, [432, 432]],\n  [/^feature\\/feature-3-lg-/i, [646, 818]],\n  [/^feature\\/feature-3-sm-/i, [615, 615]],\n  [/^feature\\/stripes-bg-(?:1|2)\\./i, [1035, 1227]],\n  [/^feature\\/stripes-bg-3\\./i, [449, 1227]],\n  [/^feature\\/stripes-bg-(?:4|5)\\./i, [449, 840]],\n  [/^footers\\/bg-image-(?:1|2)\\./i, [1200, 881]],\n  [/^footers\\/bg-image-3\\./i, [1104, 881]],\n  [/^hero\\/aligned-overlay-bg-\\d\\./i, [702, 1200]],\n  [/^hero\\/block-overlay-bg\\./i, [2000, 3000]],\n  [/^hero\\/block-with-bleed-bg\\./i, [2000, 2922]],\n  [/^hero\\/mosaic-\\d\\./i, [240, 240]],\n  [/^hero\\/overlapped-content-bg-(?:1|3)\\./i, [1200, 1258]],\n  [/^hero\\/overlapped-content-bg-2\\./i, [1200, 1374]],\n  [/^hero\\/overlapped-content-bg-4\\./i, [1200, 1410]],\n  [/^hero\\/overlapped-image-\\d-bg\\./i, [2000, 3000]],\n  [/^hero\\/overlapped-image-bg\\./i, [2000, 2995]],\n  [/^hero\\/overlapped-image-2\\./i, [911, 610]],\n  [/^hero\\/overlapped-image-3\\./i, [911, 606]],\n  [/^hero\\/overlapped-image\\./i, [911, 657]],\n  [/^hero\\/(?:overlay-gradient-bg|overlayed-split-bg)\\./i, [2000, 3000]],\n  [/^hero\\/overlayed\\/hero-overlayed-bg\\./i, [1200, 1490]],\n  [/^hero\\/split-contained-bg\\./i, [488, 1104]],\n  [/^hero\\/split-contained-landscape-/i, [488, 376]],\n  [/^hero\\/split-contained-portrait-/i, [488, 680]],\n  [/^hero\\/split-contained-square-/i, [488, 550]],\n  [/^hero\\/split-full-bleed-bg\\./i, [2000, 2666]],\n  [/^hero\\/split-slanted-bg\\./i, [2002, 2534]],\n  [/^image-grids\\/2-col-landscape/i, [528, 372]],\n  [/^image-grids\\/2-col-portrait/i, [528, 792]],\n  [/^image-grids\\/2-col-square/i, [528, 528]],\n  [/^image-grids\\/3-col-masonry-stack/i, [503, 558]],\n  [/^image-grids\\/3-col-masonry/i, [720, 792]],\n  [/^image-grids\\/3-col-portrait/i, [504, 753]],\n  [/^image-grids\\/3-col-square/i, [504, 504]],\n  [/^image-grids\\/full-width\\./i, [1104, 720]],\n  [/^image-grids\\/full-width-\\d\\./i, [1104, 792]],\n  [/^product-detail\\/stacked-\\d\\./i, [508, 358]],\n  [/^product-detail\\/rating-below\\./i, [508, 508]],\n  [/^product-detail\\/single-landscape\\./i, [1104, 776]],\n  [/^product-detail\\/single-portrait\\./i, [508, 764]],\n  [/^product-detail\\/single-portrait-bleed\\./i, [532, 764]],\n  [/^product-detail\\/two-images-\\d\\./i, [528, 776]],\n  [/^product-detail\\/three-images-1\\./i, [528, 776]],\n  [/^product-detail\\/three-images-(?:2|3)\\./i, [528, 364]],\n  [/^product-detail\\/four-images-(?:1|4)\\./i, [528, 488]],\n  [/^product-detail\\/four-images-(?:2|3)\\./i, [528, 240]],\n  [/^stats\\/overlay-1\\./i, [1572, 2268]],\n  [/^stats\\/overlay-2\\./i, [1572, 2716]],\n  [/^stats\\/overlay-(?:3|4)\\./i, [1572, 3256]],\n  [/^stats\\/single-stat\\./i, [1035, 1032]],\n  [/^teams\\/hero\\./i, [1104, 776]],\n  [/^teams\\/member-\\d+-lg\\./i, [528, 376]],\n  [/^teams\\/member-\\d+-md\\./i, [328, 328]],\n  [/^teams\\/member-\\d+\\./i, [256, 256]],\n  [/^timelines\\/cards\\./i, [1072, 600]],\n  [/^testimonials\\/quote\\./i, [72, 62]],\n  [/^testimonials\\/user-\\d+\\./i, [256, 256]],\n  [/^feature\\/logo-north-face\\./i, [278, 128]],\n  [/^feature\\/logo-stripes-1\\./i, [390, 84]],\n  [/^feature\\/logo-stripes-2\\./i, [423, 72]],\n  [/^(?:reviews|testimonials)\\/logo-accentic(?:-light)?\\./i, [423, 72]],\n  [/^reviews\\/logo-amada\\./i, [411, 84]],\n  [/^(?:reviews|testimonials)\\/logo-monarch\\./i, [290, 64]],\n  [/^logos\\/logo-apple-pay\\./i, [180, 72]],\n  [/^logos\\/logo-google-pay\\./i, [177, 72]],\n  [/^logos\\/logo-klarna\\./i, [210, 48]],\n  [/^logos\\/logo-mastercard\\./i, [120, 72]],\n  [/^logos\\/logo-mock-1\\./i, [334, 72]],\n  [/^logos\\/logo-mock-2\\./i, [213, 36]],\n  [/^logos\\/logo-mock-3\\./i, [234, 48]],\n  [/^logos\\/logo-stripe\\./i, [171, 72]],\n  [/^logos\\/logo-visa\\./i, [150, 48]],\n  [/^order-summary\\/logo-fedex\\./i, [156, 48]],\n  [/^emailcn-logo(?:-light)?\\./i, [331, 48]],\n  [/^emailcn-insignia-mono(?:-light)?\\./i, [131, 96]],\n  [/^maizzle-insignia(?:-light)?-lg\\./i, [395, 289]],\n  [/^maizzle-insignia(?:-light)?\\./i, [176, 129]],\n] satisfies readonly (readonly [RegExp, Dimensions])[];\n\nconst socialIconSlugs = {\n  discord: \"discord-logo\",\n  facebook: \"facebook-new\",\n  github: \"github\",\n  instagram: \"instagram-new\",\n  linkedin: \"linkedin\",\n  slack: \"slack-new\",\n  x: \"twitterx--v1\",\n  youtube: \"youtube-play\",\n} as const;\n\nconst brandIconSlugs = [\n  [/(?:btc|bitcoin)/i, \"bitcoin--v1\"],\n  [/(?:eth|ethereum)/i, \"ethereum\"],\n] as const;\n\nconst hashString = (value: string) => {\n  let hash = 7;\n\n  for (const character of value) {\n    hash = (hash * 31 + (character.codePointAt(0) ?? 0)) % 2_147_483_647;\n  }\n\n  return hash;\n};\n\nconst getDimensions = (path: string) => {\n  const matchedRule = dimensionRules.find(([pattern]) => pattern.test(path));\n  if (matchedRule) {\n    return matchedRule[1];\n  }\n  if (/(?:avatar|user|headshot)/i.test(path)) {\n    return [160, 160] as const;\n  }\n  if (/(?:logo|insignia)/i.test(path)) {\n    return [320, 96] as const;\n  }\n  if (/(?:badge-app|badge-google)/i.test(path)) {\n    return [260, 80] as const;\n  }\n  if (/(?:icon|btc|eth)/i.test(path)) {\n    return [64, 64] as const;\n  }\n  if (/(?:portrait|member|team)/i.test(path)) {\n    return [600, 800] as const;\n  }\n  if (/(?:square|product|shopping-cart)/i.test(path)) {\n    return [700, 700] as const;\n  }\n  if (/(?:hero|footer|background|bg-|overlay|full-width)/i.test(path)) {\n    return [1200, 700] as const;\n  }\n  if (/(?:strip|landscape|bento|category-preview)/i.test(path)) {\n    return [800, 520] as const;\n  }\n\n  return [800, 600] as const;\n};\n\nconst getLabel = (path: string) => {\n  if (/insignia/i.test(path)) {\n    return \"EC\";\n  }\n  if (/(?:emailcn|maizzle)/i.test(path)) {\n    return \"emailcn\";\n  }\n\n  const fileName = path.split(\"/\").at(-1) ?? \"emailcn\";\n\n  return fileName\n    .replace(/\\.[^.]+$/, \"\")\n    .replace(/^(?:logo|badge|icon)-/, \"\")\n    .replaceAll(\"-\", \" \")\n    .replaceAll(/\\b\\w/g, (character) => character.toUpperCase());\n};\n\nconst getSeed = (path: string) =>\n  `emailcn-${path\n    .replace(/\\.[^.]+$/, \"\")\n    .replaceAll(/[^a-z0-9]+/gi, \"-\")\n    .replaceAll(/^-|-$/g, \"\")\n    .toLowerCase()}`;\n\nconst getIndexedAsset = (path: string, assets: readonly string[]) => {\n  const explicitIndex = path.match(\n    /(?:member|avatar|product-list|shopping-cart)-(\\d+)/i\n  )?.[1];\n  const index = explicitIndex\n    ? Number.parseInt(explicitIndex, 10) - 1\n    : hashString(path);\n\n  return assets[((index % assets.length) + assets.length) % assets.length];\n};\n\nconst getUnsplashAsset = (id: string, width: number, height: number) =>\n  `${UNSPLASH_ORIGIN}/${id}?auto=format&fit=crop&w=${width}&h=${height}&q=80`;\n\nconst getIcons8Asset = (\n  slug: string,\n  {\n    color,\n    style = \"ios-filled\",\n  }: {\n    color?: string;\n    style?: \"color\" | \"ios\" | \"ios-filled\";\n  } = {}\n) =>\n  color\n    ? `${ICONS8_ORIGIN}/${style}/50/${color}/${slug}.png`\n    : `${ICONS8_ORIGIN}/${style}/50/${slug}.png`;\n\nconst getStoreBadgeAsset = (path: string) => {\n  if (/badge-app-store/i.test(path)) {\n    return \"https://developer.apple.com/assets/elements/badges/download-on-the-app-store.svg\";\n  }\n  if (/badge-google-play/i.test(path)) {\n    return \"https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png\";\n  }\n};\n\nconst getSocialIconAsset = (path: string) => {\n  const isLight = /(?:-light|check-white)/i.test(path);\n  const foreground = isLight ? \"FFFFFF\" : \"111827\";\n\n  for (const [name, slug] of Object.entries(socialIconSlugs)) {\n    if (new RegExp(`(?:^|[-/])${name}(?:[-.]|$)`, \"i\").test(path)) {\n      return getIcons8Asset(slug, { color: foreground });\n    }\n  }\n};\n\nconst getUtilityIconAsset = (path: string) => {\n  const isLight = /(?:-light|check-white)/i.test(path);\n  const foreground = isLight ? \"FFFFFF\" : \"111827\";\n\n  if (/star-half/i.test(path)) {\n    return getIcons8Asset(\"star-half-empty\", { color: \"374151\" });\n  }\n  if (/star-solid/i.test(path)) {\n    return getIcons8Asset(\"star--v1\", { color: \"374151\" });\n  }\n  if (/edit/i.test(path)) {\n    return getIcons8Asset(\"edit--v1\", {\n      color: \"4F46E5\",\n      style: \"ios\",\n    });\n  }\n  if (/arrow-right/i.test(path)) {\n    const color = /(?:brand|indigo)/i.test(path) ? \"4F46E5\" : \"FFFFFF\";\n\n    return getIcons8Asset(\"long-arrow-right--v1\", {\n      color,\n      style: \"ios\",\n    });\n  }\n  if (/chevron-right/i.test(path)) {\n    return getIcons8Asset(\"chevron-right\", {\n      color: \"4F46E5\",\n      style: \"ios\",\n    });\n  }\n  if (/check/i.test(path)) {\n    return getIcons8Asset(\"checkmark--v1\", { color: foreground });\n  }\n};\n\nconst getBrandIconAsset = (path: string) => {\n  const match = brandIconSlugs.find(([pattern]) => pattern.test(path));\n\n  return match\n    ? getIcons8Asset(match[1], {\n        style: \"color\",\n      })\n    : undefined;\n};\n\nconst getWordmarkAsset = (path: string, [width, height]: Dimensions) => {\n  const isLight = /light/i.test(path);\n  const background = isLight ? \"030712\" : \"FFFFFF\";\n  const foreground = isLight ? \"FFFFFF\" : \"111827\";\n\n  return `https://placehold.co/${width}x${height}/${background}/${foreground}.png?text=${encodeURIComponent(\n    getLabel(path)\n  )}`;\n};\n\nconst getIconAsset = (path: string) =>\n  getStoreBadgeAsset(path) ??\n  getSocialIconAsset(path) ??\n  getUtilityIconAsset(path) ??\n  getBrandIconAsset(path);\n\nexport const emailAsset = (path: string) => {\n  const normalizedPath = path.replace(/^\\/+/, \"\");\n\n  if (\n    normalizedPath === \"bento-grids/trend.png\" ||\n    normalizedPath === \"bento-grids/trend-sm.png\"\n  ) {\n    return `${ASSET_ORIGIN}/email-assets/${normalizedPath}`;\n  }\n\n  const iconAsset = getIconAsset(normalizedPath);\n  if (iconAsset) {\n    return iconAsset;\n  }\n\n  const seed = getSeed(normalizedPath);\n  const [width, height] = getDimensions(normalizedPath);\n\n  if (/teams\\/hero/i.test(normalizedPath)) {\n    return getUnsplashAsset(\"photo-1521737711867-e3b97375f902\", width, height);\n  }\n\n  if (/(?:avatar|user|headshot|member|team)/i.test(normalizedPath)) {\n    return getUnsplashAsset(\n      getIndexedAsset(normalizedPath, portraitIds),\n      width,\n      height\n    );\n  }\n\n  if (/products\\/shoe/i.test(normalizedPath)) {\n    return getUnsplashAsset(\"photo-1542291026-7eec264c27ff\", width, height);\n  }\n\n  if (/products\\/phone/i.test(normalizedPath)) {\n    return getUnsplashAsset(\"photo-1511707171634-5f897ff02aa9\", width, height);\n  }\n\n  if (\n    /(?:category-previews|product-detail|product-lists|products\\/product|shopping-cart)/i.test(\n      normalizedPath\n    )\n  ) {\n    return getUnsplashAsset(\n      getIndexedAsset(normalizedPath, productIds),\n      width,\n      height\n    );\n  }\n\n  if (/(?:trend|chart)/i.test(normalizedPath)) {\n    return `${ASSET_ORIGIN}/email-assets/bento-grids/trend.png`;\n  }\n\n  if (/(?:emailcn|maizzle|logo|insignia)/i.test(normalizedPath)) {\n    return getWordmarkAsset(normalizedPath, [width, height]);\n  }\n\n  return `https://picsum.photos/seed/${encodeURIComponent(\n    seed\n  )}/${width}/${height}.jpg`;\n};\n",
      "type": "registry:file",
      "target": "components/email/email-assets.ts"
    }
  ],
  "categories": [
    "email-component"
  ],
  "type": "registry:component"
}