{"version":3,"file":"ng-icons-core.mjs","sources":["../../../../packages/core/src/lib/providers/glyph-config.provider.ts","../../../../packages/core/src/lib/providers/glyph.provider.ts","../../../../packages/core/src/lib/utils/coercion.ts","../../../../packages/core/src/lib/components/glyph/glyph.component.ts","../../../../packages/core/src/lib/providers/features/features.ts","../../../../packages/core/src/lib/providers/features/csp.ts","../../../../packages/core/src/lib/providers/features/logger.ts","../../../../packages/core/src/lib/providers/icon-config.provider.ts","../../../../packages/core/src/lib/providers/icon-loader.provider.ts","../../../../packages/core/src/lib/providers/icon.provider.ts","../../../../packages/core/src/lib/utils/async.ts","../../../../packages/core/src/lib/utils/format.ts","../../../../packages/core/src/lib/components/icon/icon.component.ts","../../../../packages/core/src/lib/icon.module.ts","../../../../packages/core/src/lib/components/icon-stack/icon-stack.component.ts","../../../../packages/core/src/ng-icons-core.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\n\nexport interface NgGlyphConfig {\n  /** Define the default size of glyph */\n  size: string | number;\n  /** Define the optical size of the glyph */\n  opticalSize?: number;\n  /** Define the default color of glyph */\n  color?: string;\n  /** Define the default weight of glyph */\n  weight?: number;\n  /** Define the default grade of glyph */\n  grade?: number;\n  /** Define the default fill of glyph */\n  fill?: boolean;\n}\n\nexport const NgGlyphConfigToken = new InjectionToken<Required<NgGlyphConfig>>(\n  'Ng Glyph Config',\n);\n\nconst defaultConfig: NgGlyphConfig = {\n  size: '1em',\n  opticalSize: 20,\n  weight: 400,\n  grade: 0,\n  fill: false,\n};\n\n/**\n * Provide the configuration for the glyph\n * @param config The configuration to use\n */\nexport function provideNgGlyphsConfig(\n  config: Partial<NgGlyphConfig>,\n): Provider {\n  return {\n    provide: NgGlyphConfigToken,\n    useValue: { ...defaultConfig, ...config },\n  };\n}\n\n/**\n * Inject the configuration for the glyphs\n * @returns The configuration to use\n * @internal\n */\nexport function injectNgGlyphsConfig(): Required<NgGlyphConfig> {\n  return (inject(NgGlyphConfigToken, { optional: true }) ??\n    defaultConfig) as Required<NgGlyphConfig>;\n}\n","import { InjectionToken, ValueProvider, inject } from '@angular/core';\n\nexport const NgGlyphsToken = new InjectionToken<NgGlyphs>('NgGlyphsToken');\n\nexport function provideNgGlyphs(...glyphsets: NgGlyphset[]): ValueProvider[] {\n  // if there are no glyphsets, throw an error\n  if (!glyphsets.length) {\n    throw new Error('Please provide at least one glyphset.');\n  }\n\n  // the default glyphset is the first one\n  const defaultGlyphset = glyphsets[0].name;\n\n  return [{ provide: NgGlyphsToken, useValue: { defaultGlyphset, glyphsets } }];\n}\n\nexport function injectNgGlyphs(): NgGlyphs {\n  const glyphs = inject(NgGlyphsToken, { optional: true });\n\n  if (!glyphs) {\n    throw new Error(\n      'Please provide the glyphs using the provideNgGlyphs() function.',\n    );\n  }\n\n  return glyphs;\n}\n\nexport interface NgGlyphset {\n  name: string;\n  baseClass: string;\n}\n\nexport interface NgGlyphs {\n  defaultGlyphset: string;\n  glyphsets: NgGlyphset[];\n}\n","export function coerceCssPixelValue(value: string): string {\n  return value == null ? '' : /^\\d+$/.test(value) ? `${value}px` : value;\n}\n","import {\n  ChangeDetectionStrategy,\n  Component,\n  booleanAttribute,\n  computed,\n  input,\n  numberAttribute,\n} from '@angular/core';\nimport { injectNgGlyphsConfig } from '../../providers/glyph-config.provider';\nimport { injectNgGlyphs } from '../../providers/glyph.provider';\nimport { coerceCssPixelValue } from '../../utils/coercion';\n\n@Component({\n  selector: 'ng-glyph',\n  standalone: true,\n  template: ``,\n  styleUrl: './glyph.component.scss',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  host: {\n    '[class]': 'glyphsetClass()',\n    '[textContent]': 'name()',\n    '[style.--ng-glyph__size]': 'size()',\n    '[style.color]': 'color()',\n    '[style.font-variation-settings]': 'fontVariationSettings()',\n  },\n})\nexport class NgGlyph {\n  /**\n   * Access the available glyphsets\n   */\n  private readonly glyphsets = injectNgGlyphs();\n\n  /**\n   * Access the default configuration\n   */\n  private readonly config = injectNgGlyphsConfig();\n\n  /**\n   * Define the name of the glyph to display\n   */\n  readonly name = input.required<string>();\n\n  /**\n   * Define the glyphset to use\n   */\n  readonly glyphset = input(this.glyphsets.defaultGlyphset);\n\n  /**\n   * Define the optical size of the glyph\n   */\n  readonly opticalSize = input(this.config.opticalSize, {\n    transform: numberAttribute,\n  });\n\n  /**\n   * Define the weight of the glyph\n   */\n  readonly weight = input(this.config.weight, { transform: numberAttribute });\n\n  /**\n   * Define the grade of the glyph\n   */\n  readonly grade = input(this.config.grade, { transform: numberAttribute });\n\n  /**\n   * Define the fill of the glyph\n   */\n  readonly fill = input(this.config.fill, { transform: booleanAttribute });\n\n  /**\n   * Define the size of the glyph\n   */\n  readonly size = input(this.config.size, { transform: coerceCssPixelValue });\n\n  /**\n   * Define the color of the glyph\n   */\n  readonly color = input(this.config.color);\n\n  /**\n   * Derive the glyphset class from the glyphset name\n   */\n  protected readonly glyphsetClass = computed(() => {\n    const glyphset = this.glyphsets.glyphsets.find(\n      glyphset => glyphset.name === this.glyphset(),\n    );\n\n    if (!glyphset) {\n      throw new Error(\n        `The glyphset \"${this.glyphset()}\" does not exist. Please provide a valid glyphset.`,\n      );\n    }\n\n    return glyphset.baseClass;\n  });\n\n  /**\n   * Define the font variation settings of the glyph\n   */\n  protected readonly fontVariationSettings = computed(() => {\n    return `'FILL' ${\n      this.fill() ? 1 : 0\n    }, 'wght' ${this.weight()}, 'GRAD' ${this.grade()}, 'opsz' ${this.opticalSize()}`;\n  });\n}\n","import { Provider } from '@angular/core';\n\nexport type ContentSecurityPolicyFeature =\n  NgIconFeature<NgIconFeatureKind.ContentSecurityPolicyFeature>;\n\nexport type ExceptionLoggerFeature =\n  NgIconFeature<NgIconFeatureKind.ExceptionLoggerFeature>;\n\nexport type NgIconFeatures =\n  | ContentSecurityPolicyFeature\n  | ExceptionLoggerFeature;\n\n/**\n * The list of features as an enum to uniquely type each feature.\n */\nexport const enum NgIconFeatureKind {\n  ContentSecurityPolicyFeature,\n  ExceptionLoggerFeature,\n}\n\n/**\n * Helper type to represent a feature.\n */\nexport interface NgIconFeature<FeatureKind extends NgIconFeatureKind> {\n  ɵkind: FeatureKind;\n  ɵproviders: Provider[];\n}\n\n/**\n * Helper function to create an object that represents a feature.\n */\nexport function createFeature<FeatureKind extends NgIconFeatureKind>(\n  kind: FeatureKind,\n  providers: Provider[],\n): NgIconFeature<FeatureKind> {\n  return { ɵkind: kind, ɵproviders: providers };\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport {\n  ContentSecurityPolicyFeature,\n  NgIconFeatureKind,\n  createFeature,\n} from './features';\n\nexport type NgIconPreProcessor = (icon: string) => string;\nexport type NgIconPostProcessor = (element: HTMLElement | SVGElement) => void;\n\nexport const NgIconPreProcessorToken = new InjectionToken<NgIconPreProcessor>(\n  'Ng Icon Pre Processor',\n);\n\nexport const NgIconPostProcessorToken = new InjectionToken<NgIconPostProcessor>(\n  'Ng Icon Post Processor',\n);\n\nexport function injectNgIconPreProcessor(): NgIconPreProcessor {\n  return inject(NgIconPreProcessorToken, { optional: true }) ?? (icon => icon);\n}\n\nexport function injectNgIconPostProcessor(): NgIconPostProcessor {\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  return inject(NgIconPostProcessorToken, { optional: true }) ?? (() => {});\n}\n\nfunction preprocessIcon(icon: string): string {\n  // rename all style attributes to data-style to avoid being blocked by the CSP\n  return icon.replace(/style\\s*=/g, 'data-style=');\n}\n\nfunction postprocessIcon(element: HTMLElement | SVGElement): void {\n  // find all elements with a data-style attribute and get the styles from it\n  // and apply them to the element using the style property and remove the data-style attribute\n  const elements = element.querySelectorAll<HTMLElement | SVGElement>(\n    '[data-style]',\n  );\n\n  for (const element of Array.from(elements)) {\n    const styles = element.getAttribute('data-style');\n\n    styles?.split(';').forEach(style => {\n      const [property, value] = style.split(':');\n      // eslint-disable-next-line @typescript-eslint/no-explicit-any\n      element.style[property.trim() as any] = value.trim();\n    });\n\n    element.removeAttribute('data-style');\n  }\n}\n\n/**\n * Process icons in a way that is compliant with the content security policy\n */\nexport function withContentSecurityPolicy(): ContentSecurityPolicyFeature {\n  return createFeature(NgIconFeatureKind.ContentSecurityPolicyFeature, [\n    { provide: NgIconPreProcessorToken, useValue: preprocessIcon },\n    { provide: NgIconPostProcessorToken, useValue: postprocessIcon },\n  ]);\n}\n","import { InjectionToken, inject } from '@angular/core';\nimport {\n  ExceptionLoggerFeature,\n  NgIconFeatureKind,\n  createFeature,\n} from './features';\n\ninterface Logger {\n  log(message: string): void;\n  warn(message: string): void;\n  error(message: string): void;\n}\n\nexport const LoggerToken = new InjectionToken<Logger>('Ng Icon Logger');\n\n/**\n * The default logger implementation that logs to the console\n */\nexport class DefaultLogger implements Logger {\n  log(message: string): void {\n    console.log(message);\n  }\n  warn(message: string): void {\n    console.warn(message);\n  }\n  error(message: string): void {\n    console.error(message);\n  }\n}\n\n/**\n * A logger implementation that throws an error on warnings and errors\n */\nexport class ExceptionLogger implements Logger {\n  log(message: string): void {\n    console.log(message);\n  }\n\n  warn(message: string): void {\n    throw new Error(message);\n  }\n\n  error(message: string): void {\n    throw new Error(message);\n  }\n}\n\nexport function injectLogger(): Logger {\n  return inject(LoggerToken, { optional: true }) ?? new DefaultLogger();\n}\n\n/**\n * Throw exceptions on warnings and errors\n */\nexport function withExceptionLogger(): ExceptionLoggerFeature {\n  return createFeature(NgIconFeatureKind.ExceptionLoggerFeature, [\n    { provide: LoggerToken, useClass: ExceptionLogger },\n  ]);\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgIconFeatures } from './features/features';\n\nexport interface NgIconConfig {\n  /** Define the default size of icons */\n  size?: string;\n  /** Define the default color of icons */\n  color?: string;\n  /** Define the default stroke width of icons */\n  strokeWidth?: string | number;\n}\n\nexport const NgIconConfigToken = new InjectionToken<NgIconConfig>(\n  'Ng Icon Config',\n);\n\n/**\n * Provide the configuration for the icons\n * @param config The configuration to use\n */\nexport function provideNgIconsConfig(\n  config: Partial<NgIconConfig>,\n  ...features: NgIconFeatures[]\n): Provider[] {\n  return [\n    {\n      provide: NgIconConfigToken,\n      useValue: config,\n    },\n    features.map(feature => feature.ɵproviders),\n  ];\n}\n\n/**\n * Inject the configuration for the icons\n * @returns The configuration to use\n * @internal\n */\nexport function injectNgIconConfig(): NgIconConfig {\n  return inject(NgIconConfigToken, { optional: true }) ?? {};\n}\n","import { inject, InjectionToken, Provider } from '@angular/core';\nimport type { Observable } from 'rxjs';\n\nexport type NgIconLoader = (\n  name: string,\n) => Promise<string> | Observable<string> | string;\n\nexport const NgIconLoaderToken = new InjectionToken<NgIconLoader>(\n  'Ng Icon Loader Token',\n);\n\n/**\n * The list of features as an enum to uniquely type each feature.\n */\nconst enum NgIconLoaderFeatureKind {\n  CachingFeature,\n}\n\ninterface NgIconLoaderFeature<FeatureKind extends NgIconLoaderFeatureKind> {\n  kind: FeatureKind;\n  providers: Provider[];\n}\n\n/**\n * Helper function to create an object that represents a Loader feature.\n */\nfunction loaderFeature<FeatureKind extends NgIconLoaderFeatureKind>(\n  kind: FeatureKind,\n  providers: Provider[],\n): NgIconLoaderFeature<FeatureKind> {\n  return { kind: kind, providers: providers };\n}\n\ntype CachingFeature =\n  NgIconLoaderFeature<NgIconLoaderFeatureKind.CachingFeature>;\n\ntype NgIconLoaderFeatures = CachingFeature;\n\nexport type NgIconLoaderCache = Map<string, string | Promise<string>>;\n\nexport const NgIconCacheToken = new InjectionToken<NgIconLoaderCache>(\n  'Ng Icon Cache Token',\n);\n\n/**\n * Add caching to the loader. This will prevent the loader from being called multiple times for the same icon name.\n */\nexport function withCaching(): CachingFeature {\n  return loaderFeature(NgIconLoaderFeatureKind.CachingFeature, [\n    { provide: NgIconCacheToken, useValue: new Map<string, string>() },\n  ]);\n}\n\n/**\n * Provide a function that will return the SVG content for a given icon name.\n * @param loader The function that will return the SVG content for a given icon name.\n * @param features The list of features to apply to the loader.\n * @returns The SVG content for a given icon name.\n */\nexport function provideNgIconLoader(\n  loader: NgIconLoader,\n  ...features: NgIconLoaderFeatures[]\n) {\n  return [\n    { provide: NgIconLoaderToken, useValue: loader },\n    features.map(feature => feature.providers),\n  ];\n}\n\n/**\n * Inject the function that will return the SVG content for a given icon name.\n */\nexport function injectNgIconLoader(): NgIconLoader | null {\n  return inject(NgIconLoaderToken, { optional: true });\n}\n\n/**\n * Inject the cache that will store the SVG content for a given icon name.\n */\nexport function injectNgIconLoaderCache(): NgIconLoaderCache | null {\n  return inject(NgIconCacheToken, { optional: true });\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\n\n/**\n * Define the icons to use\n * @param icons The icons to provide\n */\nexport function provideIcons(icons: Record<string, string>): Provider[] {\n  return [\n    {\n      provide: NgIconsToken,\n      useFactory: (\n        parentIcons = inject<Record<string, string>[]>(NgIconsToken, {\n          optional: true,\n          skipSelf: true,\n        }),\n      ) => ({\n        ...parentIcons?.reduce((acc, icons) => ({ ...acc, ...icons }), {}),\n        ...icons,\n      }),\n      multi: true,\n    },\n  ];\n}\n\nexport const NgIconsToken = new InjectionToken<Record<string, string>[]>(\n  'Icons Token',\n);\n\n/**\n * Inject the icons to use\n * @returns The icons to use\n * @internal\n */\nexport function injectNgIcons(): Record<string, string>[] {\n  return inject(NgIconsToken, { optional: true }) ?? [];\n}\n","import { Observable, isObservable } from 'rxjs';\n\n/**\n * A loader may return a promise, an observable or a string. This function will coerce the result into a promise.\n * @returns\n */\nexport function coerceLoaderResult(\n  result: Promise<string> | Observable<string> | string,\n): Promise<string> {\n  if (typeof result === 'string') {\n    return Promise.resolve(result);\n  }\n\n  if (isObservable(result)) {\n    // toPromise is deprecated, but we can't use lastValueFrom because it's not available in RxJS 6\n    // so for now we'll just use toPromise\n    return result.toPromise() as Promise<string>;\n  }\n\n  return result;\n}\n","/**\n * Hyphenated to lowerCamelCase\n */\nexport function toPropertyName(str: string): string {\n  return str\n    .replace(/([^a-zA-Z0-9])+(.)?/g, (_, __, chr) =>\n      chr ? chr.toUpperCase() : '',\n    )\n    .replace(/[^a-zA-Z\\d]/g, '')\n    .replace(/^([A-Z])/, m => m.toLowerCase());\n}\n","import { isPlatformServer } from '@angular/common';\nimport {\n  ChangeDetectionStrategy,\n  Component,\n  effect,\n  ElementRef,\n  HostAttributeToken,\n  inject,\n  Injector,\n  input,\n  OnDestroy,\n  PLATFORM_ID,\n  Renderer2,\n  runInInjectionContext,\n} from '@angular/core';\nimport type { IconName } from '../../components/icon/icon-name';\nimport {\n  injectNgIconPostProcessor,\n  injectNgIconPreProcessor,\n} from '../../providers/features/csp';\nimport { injectLogger } from '../../providers/features/logger';\nimport { injectNgIconConfig } from '../../providers/icon-config.provider';\nimport {\n  injectNgIconLoader,\n  injectNgIconLoaderCache,\n} from '../../providers/icon-loader.provider';\nimport { injectNgIcons } from '../../providers/icon.provider';\nimport { coerceLoaderResult } from '../../utils/async';\nimport { coerceCssPixelValue } from '../../utils/coercion';\nimport { toPropertyName } from '../../utils/format';\n\n// This is a typescript type to prevent inference from collapsing the union type to a string to improve type safety\nexport type IconType = IconName | (string & {});\n\nlet uniqueId = 0;\n\n@Component({\n  selector: 'ng-icon',\n  template: '',\n  standalone: true,\n  styleUrls: ['./icon.component.scss'],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  host: {\n    role: 'img',\n    '[style.--ng-icon__stroke-width]': 'strokeWidth()',\n    '[style.--ng-icon__size]': 'size()',\n    '[style.--ng-icon__color]': 'color()',\n  },\n})\nexport class NgIcon implements OnDestroy {\n  /** Access the global icon config */\n  private readonly config = injectNgIconConfig();\n\n  /** Access the icons */\n  private readonly icons = injectNgIcons();\n\n  /** Access the icon loader if defined */\n  private readonly loader = injectNgIconLoader();\n\n  /** Access the icon cache if defined */\n  private readonly cache = injectNgIconLoaderCache();\n\n  /** Access the pre-processor */\n  private readonly preProcessor = injectNgIconPreProcessor();\n\n  /** Access the post-processor */\n  private readonly postProcessor = injectNgIconPostProcessor();\n\n  /** Access the injector */\n  private readonly injector = inject(Injector);\n\n  /** Access the renderer */\n  private readonly renderer = inject(Renderer2);\n\n  /** Determine the platform we are rendering on */\n  private readonly platform = inject(PLATFORM_ID);\n\n  /** Access the element ref */\n  private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n  /** A unique id for this instance */\n  private readonly uniqueId = uniqueId++;\n\n  /** Access the logger */\n  private readonly logger = injectLogger();\n\n  /** Define the name of the icon to display */\n  readonly name = input<IconType>();\n\n  /** Define the svg of the icon to display */\n  readonly svg = input<string>();\n\n  /** Define the size of the icon */\n  readonly size = input(this.config.size, { transform: coerceCssPixelValue });\n\n  /** Define the stroke-width of the icon */\n  readonly strokeWidth = input<string | number | undefined>(\n    this.config.strokeWidth,\n  );\n\n  /** Define the color of the icon */\n  readonly color = input(this.config.color);\n\n  /** Store the inserted SVG */\n  private svgElement?: SVGElement;\n\n  constructor() {\n    // update the icon anytime the name or svg changes\n    effect(() => this.updateIcon());\n\n    const ariaHidden = inject(new HostAttributeToken('aria-hidden'), {\n      optional: true,\n    });\n    // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is\n    // the right thing to do for the majority of icon use-cases.\n    if (!ariaHidden) {\n      this.elementRef.nativeElement.setAttribute('aria-hidden', 'true');\n    }\n  }\n\n  ngOnDestroy(): void {\n    this.svgElement = undefined;\n  }\n\n  private async updateIcon(): Promise<void> {\n    const name = this.name();\n    const svg = this.svg();\n\n    // if the svg is defined, insert it into the template\n    if (svg !== undefined) {\n      this.setSvg(svg);\n      return;\n    }\n\n    if (name === undefined) {\n      return;\n    }\n\n    const propertyName = toPropertyName(name);\n\n    for (const icons of [...this.icons].reverse()) {\n      if (icons[propertyName]) {\n        // insert the SVG into the template\n        this.setSvg(icons[propertyName]);\n        return;\n      }\n    }\n\n    // if there is a loader defined, use it to load the icon\n    if (this.loader) {\n      const result = await this.requestIconFromLoader(name);\n\n      // if the result is a string, insert the SVG into the template\n      if (result !== null) {\n        this.setSvg(result);\n        return;\n      }\n    }\n\n    // if there is no icon with this name warn the user as they probably forgot to import it\n    this.logger.warn(\n      `No icon named ${name} was found. You may need to import it using the withIcons function.`,\n    );\n  }\n\n  private setSvg(svg: string): void {\n    // if we are on the server, simply innerHTML the svg as we don't have the\n    // level of control over the DOM that we do on the client, in otherwords\n    // the approach we take to insert the svg on the client will not work on the server\n    if (isPlatformServer(this.platform)) {\n      this.elementRef.nativeElement.innerHTML = svg;\n      // mark this component as server side rendered\n      this.elementRef.nativeElement.setAttribute('data-ng-icon-ssr', '');\n      return;\n    }\n\n    // if this was previously server side rendered, we should check if the svg is the same\n    // if it is, we don't need to do anything\n    if (this.elementRef.nativeElement.hasAttribute('data-ng-icon-ssr')) {\n      // if it is different, we need to remove the server side rendered flag\n      this.elementRef.nativeElement.removeAttribute('data-ng-icon-ssr');\n\n      // retrieve the svg element\n      this.svgElement =\n        this.elementRef.nativeElement.querySelector<SVGElement>('svg') ??\n        undefined;\n\n      if (this.elementRef.nativeElement.innerHTML === svg) {\n        return;\n      }\n    }\n\n    // remove the old element\n    if (this.svgElement) {\n      this.renderer.removeChild(this.elementRef.nativeElement, this.svgElement);\n    }\n\n    // if the svg is empty, don't insert anything\n    if (svg === '') {\n      return;\n    }\n\n    const template: HTMLTemplateElement =\n      this.renderer.createElement('template');\n\n    svg = this.replaceIds(svg);\n\n    this.renderer.setProperty(template, 'innerHTML', this.preProcessor(svg));\n\n    this.svgElement = template.content.firstElementChild as SVGElement;\n    this.postProcessor(this.svgElement);\n\n    // insert the element into the dom\n    this.renderer.appendChild(this.elementRef.nativeElement, this.svgElement);\n  }\n\n  private replaceIds(svg: string): string {\n    // ids are defined like ID_PLACEHOLDER_0, ID_PLACEHOLDER_1, etc.\n    // we need to replace these with the actual ids e.g. ng-icon-0-0, ng-icon-0-1, etc.\n    // if there are no ids, we don't need to do anything\n    if (!svg.includes('ID_PLACEHOLDER_')) {\n      return svg;\n    }\n\n    // we can just retain the trailing number as the prefix is always the same\n    const regex = /ID_PLACEHOLDER_(\\d+)/g;\n\n    // we need to keep track of the ids we have replaced\n    const idMap = new Map<string, string>();\n\n    // find all the matches\n    const matches = new Set(svg.match(regex));\n\n    if (matches === null) {\n      return svg;\n    }\n\n    // replace the ids\n    for (const match of matches) {\n      const id = match.replace('ID_PLACEHOLDER_', '');\n      const placeholder = `ng-icon-${this.uniqueId}-${idMap.size}`;\n      idMap.set(id, placeholder);\n      svg = svg.replace(new RegExp(match, 'g'), placeholder);\n    }\n\n    return svg;\n  }\n\n  /**\n   * Request the icon from the loader.\n   * @param name The name of the icon to load.\n   * @returns The SVG content for a given icon name.\n   */\n  private requestIconFromLoader(name: string): Promise<string> {\n    return new Promise(resolve => {\n      runInInjectionContext(this.injector, async () => {\n        // if we have a cache, check if the icon is already loaded (i.e, it is a string)\n        if (this.cache) {\n          const cachedResult = this.cache.get(name);\n\n          if (typeof cachedResult === 'string') {\n            resolve(cachedResult);\n            return;\n          }\n\n          // it may be a promise, so we need to await it\n          if (cachedResult instanceof Promise) {\n            const result = await cachedResult;\n            resolve(result);\n            return;\n          }\n        }\n\n        const promise = coerceLoaderResult(this.loader!(name));\n\n        // store the promise in the cache so if we get repeated calls (e.g. in a loop) before the loader has resolved\n        // then don't call the loader function multiple times\n        this.cache?.set(name, promise);\n\n        // await the result of the promise\n        const result = await promise;\n\n        // if we have a cache, store the result\n        this.cache?.set(name, result);\n\n        resolve(result);\n      });\n    });\n  }\n}\n","import { Inject, ModuleWithProviders, NgModule } from '@angular/core';\nimport { NgIcon } from './components/icon/icon.component';\nimport { NgIconsToken, provideIcons } from './providers/icon.provider';\n\n@NgModule({\n  imports: [NgIcon],\n  exports: [NgIcon],\n})\nexport class NgIconsModule {\n  constructor(@Inject(NgIconsToken) icons: Record<string, string>) {\n    if (Object.keys(icons).length === 0) {\n      throw new Error(\n        'No icons have been provided. Ensure to include some icons by importing them using NgIconsModule.withIcons({ ... }).',\n      );\n    }\n  }\n\n  /**\n   * Define the icons that will be included in the application. This allows unused icons to\n   * be tree-shaken away to reduce bundle size\n   * @param icons The object containing the required icons\n   */\n  static withIcons(\n    icons: Record<string, string>,\n  ): ModuleWithProviders<NgIconsModule> {\n    return { ngModule: NgIconsModule, providers: provideIcons(icons) };\n  }\n}\n\nexport const NG_ICON_DIRECTIVES = [NgIcon] as const;\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n  selector: 'ng-icon-stack',\n  standalone: true,\n  template: '<ng-content />',\n  styleUrl: './icon-stack.component.scss',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  host: {\n    '[style.--ng-icon__size]': 'size()',\n  },\n})\nexport class NgIconStack {\n  /** The size of the child icons */\n  readonly size = input.required<string>();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAiBa,kBAAkB,GAAG,IAAI,cAAc,CAClD,iBAAiB;AAGnB,MAAM,aAAa,GAAkB;AACnC,IAAA,IAAI,EAAE,KAAK;AACX,IAAA,WAAW,EAAE,EAAE;AACf,IAAA,MAAM,EAAE,GAAG;AACX,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,IAAI,EAAE,KAAK;CACZ;AAED;;;AAGG;AACG,SAAU,qBAAqB,CACnC,MAA8B,EAAA;IAE9B,OAAO;AACL,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,QAAQ,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAAE;KAC1C;AACH;AAEA;;;;AAIG;SACa,oBAAoB,GAAA;IAClC,QAAQ,MAAM,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACpD,QAAA,aAAa;AACjB;;AChDO,MAAM,aAAa,GAAG,IAAI,cAAc,CAAW,eAAe,CAAC;AAEpE,SAAU,eAAe,CAAC,GAAG,SAAuB,EAAA;;AAExD,IAAA,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;AACrB,QAAA,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC;IAC1D;;IAGA,MAAM,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI;AAEzC,IAAA,OAAO,CA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