{"version":3,"file":"flowbite-angular-icon.mjs","sources":["../../../../libs/flowbite-angular/icon/src/icon/theme.ts","../../../../libs/flowbite-angular/icon/src/config/icon-config.ts","../../../../libs/flowbite-angular/icon/src/icon/icon-state.ts","../../../../libs/flowbite-angular/icon/src/icon/icon.component.ts","../../../../libs/flowbite-angular/icon/src/index.ts","../../../../libs/flowbite-angular/icon/src/flowbite-angular-icon.ts"],"sourcesContent":["import type { ColorToTheme, FlowbiteColors } from 'flowbite-angular';\r\nimport { createTheme } from 'flowbite-angular';\r\n\r\nexport interface FlowbiteIconColors extends FlowbiteColors {\r\n  [key: string]: ColorToTheme;\r\n}\r\n\r\nexport interface FlowbiteIconTheme {\r\n  host: FlowbiteIconHostTheme;\r\n}\r\n\r\nexport interface FlowbiteIconHostTheme {\r\n  base: string;\r\n  transition: string;\r\n  color: FlowbiteIconColors;\r\n}\r\n\r\nexport const flowbiteIconTheme: FlowbiteIconTheme = createTheme({\r\n  host: {\r\n    base: 'self-center overflow-hidden',\r\n    transition: '',\r\n    color: {\r\n      default: {\r\n        light: '',\r\n        dark: '',\r\n      },\r\n      info: {\r\n        light: 'text-blue-500',\r\n        dark: 'dark:text-blue-500',\r\n      },\r\n      failure: {\r\n        light: 'text-red-500',\r\n        dark: 'dark:text-red-500',\r\n      },\r\n      success: {\r\n        light: 'text-green-500',\r\n        dark: 'dark:text-green-500',\r\n      },\r\n      warning: {\r\n        light: 'text-yellow-500',\r\n        dark: 'dark:text-yellow-500',\r\n      },\r\n      primary: {\r\n        light: 'text-primary-500',\r\n        dark: 'dark:text-primary-500',\r\n      },\r\n      dark: {\r\n        light: 'text-gray-700',\r\n        dark: 'dark:text-gray-700',\r\n      },\r\n      light: {\r\n        light: 'text-gray-300',\r\n        dark: 'dark:text-gray-300',\r\n      },\r\n      blue: {\r\n        light: 'text-blue-500',\r\n        dark: 'dark:text-blue-500',\r\n      },\r\n      cyan: {\r\n        light: 'text-cyan-500',\r\n        dark: 'dark:text-cyan-500',\r\n      },\r\n      gray: {\r\n        light: 'text-gray-500',\r\n        dark: 'dark:text-gray-500',\r\n      },\r\n      green: {\r\n        light: 'text-green-500',\r\n        dark: 'dark:text-green-500',\r\n      },\r\n      indigo: {\r\n        light: 'text-indigo-500',\r\n        dark: 'dark:text-indigo-500',\r\n      },\r\n      lime: {\r\n        light: 'text-lime-500',\r\n        dark: 'dark:text-lime-500',\r\n      },\r\n      pink: {\r\n        light: 'text-pink-500',\r\n        dark: 'dark:text-pink-500',\r\n      },\r\n      purple: {\r\n        light: 'text-purple-500',\r\n        dark: 'dark:text-purple-500',\r\n      },\r\n      red: {\r\n        light: 'text-red-500',\r\n        dark: 'dark:text-red-500',\r\n      },\r\n      teal: {\r\n        light: 'text-teal-500',\r\n        dark: 'dark:text-teal-500',\r\n      },\r\n      yellow: {\r\n        light: 'text-yellow-500',\r\n        dark: 'dark:text-yellow-500',\r\n      },\r\n    },\r\n  },\r\n});\r\n","import type { FlowbiteIconColors } from '../icon/theme';\r\nimport { flowbiteIconTheme, type FlowbiteIconTheme } from '../icon/theme';\r\n\r\nimport type { DeepPartial } from 'flowbite-angular';\r\n\r\nimport type { Provider } from '@angular/core';\r\nimport { inject, InjectionToken } from '@angular/core';\r\n\r\nexport interface FlowbiteIconConfig {\r\n  /**\r\n   * The default theme of icon\r\n   */\r\n  baseTheme: FlowbiteIconTheme;\r\n  /**\r\n   * The default color of icon\r\n   */\r\n  color: keyof FlowbiteIconColors;\r\n  /**\r\n   * The custom theme of icon\r\n   */\r\n  customTheme: DeepPartial<FlowbiteIconTheme>;\r\n}\r\n\r\nexport const defaultFlowbiteIconConfig: FlowbiteIconConfig = {\r\n  baseTheme: flowbiteIconTheme,\r\n  color: 'default',\r\n  customTheme: {},\r\n};\r\n\r\nexport const FlowbiteIconConfigToken = new InjectionToken<FlowbiteIconConfig>(\r\n  'FlowbiteIconConfigToken'\r\n);\r\n\r\n/**\r\n * Provide the default Icon configuration\r\n * @param config The Icon configuration\r\n * @returns The provider\r\n */\r\nexport const provideFlowbiteIconConfig = (config: Partial<FlowbiteIconConfig>): Provider[] => [\r\n  {\r\n    provide: FlowbiteIconConfigToken,\r\n    useValue: { ...defaultFlowbiteIconConfig, ...config },\r\n  },\r\n];\r\n\r\n/**\r\n * Inject the Icon configuration\r\n * @see {@link defaultFlowbiteIconConfig}\r\n * @returns The configuration\r\n */\r\nexport const injectFlowbiteIconConfig = (): FlowbiteIconConfig =>\r\n  inject(FlowbiteIconConfigToken, { optional: true }) ?? defaultFlowbiteIconConfig;\r\n","import type { Icon } from './icon.component';\r\n\r\nimport { inject, InjectionToken } from '@angular/core';\r\nimport {\r\n  createState,\r\n  createStateInjector,\r\n  createStateProvider,\r\n  createStateToken,\r\n} from 'ng-primitives/state';\r\n\r\nexport const FlowbiteIconStateToken = createStateToken<Icon>('Flowbite Icon');\r\nexport const provideFlowbiteIconState = createStateProvider(FlowbiteIconStateToken);\r\nexport const injectFlowbiteIconState = createStateInjector(FlowbiteIconStateToken);\r\nexport const flowbiteIconState = createState(FlowbiteIconStateToken);\r\n\r\n/* https://github.com/ng-icons/ng-icons/blob/main/packages/core/src/lib/providers/features/csp.ts */\r\nexport type NgIconPreProcessor = (icon: string) => string;\r\nexport type NgIconPostProcessor = (element: HTMLElement | SVGElement) => void;\r\n\r\nexport const NgIconPreProcessorToken = new InjectionToken<NgIconPreProcessor>(\r\n  'Ng Icon Pre Processor'\r\n);\r\n\r\nexport const NgIconPostProcessorToken = new InjectionToken<NgIconPostProcessor>(\r\n  'Ng Icon Post Processor'\r\n);\r\n\r\nexport function injectNgIconPreProcessor(): NgIconPreProcessor {\r\n  return inject(NgIconPreProcessorToken, { optional: true }) ?? ((icon) => icon);\r\n}\r\n\r\nexport function injectNgIconPostProcessor(): NgIconPostProcessor {\r\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\r\n  return inject(NgIconPostProcessorToken, { optional: true }) ?? (() => {});\r\n}\r\n","/* https://github.com/ng-icons/ng-icons/blob/main/packages/core/src/lib/components/icon/icon.component.ts */\r\n\r\nimport { injectFlowbiteIconConfig } from '../config/icon-config';\r\nimport {\r\n  flowbiteIconState,\r\n  injectNgIconPostProcessor,\r\n  injectNgIconPreProcessor,\r\n  provideFlowbiteIconState,\r\n} from './icon-state';\r\n\r\nimport { colorToTheme, mergeDeep } from 'flowbite-angular';\r\n\r\nimport { isPlatformServer } from '@angular/common';\r\nimport type { OnDestroy } from '@angular/core';\r\nimport {\r\n  ChangeDetectionStrategy,\r\n  Component,\r\n  computed,\r\n  effect,\r\n  ElementRef,\r\n  HostAttributeToken,\r\n  inject,\r\n  Injector,\r\n  input,\r\n  PLATFORM_ID,\r\n  Renderer2,\r\n  runInInjectionContext,\r\n  ViewEncapsulation,\r\n} from '@angular/core';\r\nimport type { IconType } from '@ng-icons/core';\r\nimport { injectNgIconLoader, injectNgIconLoaderCache, injectNgIcons } from '@ng-icons/core';\r\nimport type { Observable } from 'rxjs';\r\nimport { firstValueFrom, isObservable } from 'rxjs';\r\nimport { twMerge } from 'tailwind-merge';\r\n\r\nlet uniqueId = 0;\r\n\r\n@Component({\r\n  standalone: true,\r\n  selector: `flowbite-icon`,\r\n  exportAs: 'flowbiteIcon',\r\n  hostDirectives: [],\r\n  imports: [],\r\n  providers: [provideFlowbiteIconState()],\r\n  host: {\r\n    '[class]': `theme().host.root`,\r\n    role: 'img',\r\n  },\r\n  template: ``,\r\n  styles: [\r\n    `\r\n      :host {\r\n        display: inline-block;\r\n        line-height: initial;\r\n        vertical-align: initial;\r\n        overflow: hidden;\r\n      }\r\n    `,\r\n    `\r\n      :host ::ng-deep svg {\r\n        width: inherit;\r\n        height: inherit;\r\n        vertical-align: inherit;\r\n      }\r\n    `,\r\n  ],\r\n  encapsulation: ViewEncapsulation.None,\r\n  changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class Icon implements OnDestroy {\r\n  readonly config = injectFlowbiteIconConfig();\r\n\r\n  /** Access the icons */\r\n  private readonly icons = injectNgIcons();\r\n\r\n  /** Access the icon loader if defined */\r\n  private readonly loader = injectNgIconLoader();\r\n\r\n  /** Access the icon cache if defined */\r\n  private readonly cache = injectNgIconLoaderCache();\r\n\r\n  /** Access the pre-processor */\r\n  private readonly preProcessor = injectNgIconPreProcessor();\r\n\r\n  /** Access the post-processor */\r\n  private readonly postProcessor = injectNgIconPostProcessor();\r\n\r\n  /** Access the injector */\r\n  private readonly injector = inject(Injector);\r\n\r\n  /** Access the renderer */\r\n  private readonly renderer = inject(Renderer2);\r\n\r\n  /** Determine the platform we are rendering on */\r\n  private readonly platform = inject(PLATFORM_ID);\r\n\r\n  /** Access the element ref */\r\n  private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n  /** A unique id for this instance */\r\n  private readonly uniqueId = uniqueId++;\r\n\r\n  /** Define the name of the icon to display */\r\n  readonly name = input<IconType>();\r\n\r\n  /** Define the svg of the icon to display */\r\n  readonly svg = input<string>();\r\n\r\n  /**\r\n   * @see {@link injectFlowbiteIconConfig}\r\n   */\r\n  readonly color = input(this.config.color);\r\n  /**\r\n   * @see {@link injectFlowbiteIconConfig}\r\n   */\r\n  readonly customTheme = input(this.config.customTheme);\r\n\r\n  /** Store the inserted SVG */\r\n  private svgElement?: SVGElement;\r\n\r\n  readonly theme = computed(() => {\r\n    const mergedTheme = mergeDeep(this.config.baseTheme, this.state.customTheme());\r\n\r\n    return {\r\n      host: {\r\n        root: twMerge(\r\n          mergedTheme.host.base,\r\n          mergedTheme.host.transition,\r\n          this.state.color() && colorToTheme(mergedTheme.host.color, this.state.color()!)\r\n        ),\r\n      },\r\n    };\r\n  });\r\n\r\n  protected readonly state = flowbiteIconState<Icon>(this);\r\n\r\n  constructor() {\r\n    // update the icon anytime the name or svg changes\r\n    effect(() => this.updateIcon());\r\n\r\n    const ariaHidden = inject(new HostAttributeToken('aria-hidden'), {\r\n      optional: true,\r\n    });\r\n    // If the user has not explicitly set aria-hidden, mark the icon as hidden, as this is\r\n    // the right thing to do for the majority of icon use-cases.\r\n    if (!ariaHidden) {\r\n      this.elementRef.nativeElement.setAttribute('aria-hidden', 'true');\r\n    }\r\n  }\r\n\r\n  ngOnDestroy(): void {\r\n    this.svgElement = undefined;\r\n  }\r\n\r\n  private async updateIcon(): Promise<void> {\r\n    const toPropertyName = (str: string) =>\r\n      str\r\n        .replace(/([^a-zA-Z0-9])+(.)?/g, (_, __, chr) => (chr ? chr.toUpperCase() : ''))\r\n        .replace(/[^a-zA-Z\\d]/g, '')\r\n        .replace(/^([A-Z])/, (m) => m.toLowerCase());\r\n\r\n    const name = this.name();\r\n    const svg = this.svg();\r\n\r\n    // if the svg is defined, insert it into the template\r\n    if (svg !== undefined) {\r\n      this.setSvg(svg);\r\n      return;\r\n    }\r\n\r\n    if (name === undefined) {\r\n      return;\r\n    }\r\n\r\n    const propertyName = toPropertyName(name);\r\n\r\n    for (const icons of [...this.icons].reverse()) {\r\n      if (icons[propertyName]) {\r\n        // insert the SVG into the template\r\n        this.setSvg(icons[propertyName]);\r\n        return;\r\n      }\r\n    }\r\n\r\n    // if there is a loader defined, use it to load the icon\r\n    if (this.loader) {\r\n      const result = await this.requestIconFromLoader(name);\r\n\r\n      // if the result is a string, insert the SVG into the template\r\n      if (result !== null) {\r\n        this.setSvg(result);\r\n        return;\r\n      }\r\n    }\r\n\r\n    // if there is no icon with this name warn the user as they probably forgot to import it\r\n    console.warn(\r\n      `No icon named ${name} was found. You may need to import it using the withIcons function.`\r\n    );\r\n  }\r\n\r\n  private setSvg(svg: string): void {\r\n    // if we are on the server, simply innerHTML the svg as we don't have the\r\n    // level of control over the DOM that we do on the client, in otherwords\r\n    // the approach we take to insert the svg on the client will not work on the server\r\n    if (isPlatformServer(this.platform)) {\r\n      this.elementRef.nativeElement.innerHTML = svg;\r\n      // mark this component as server side rendered\r\n      this.elementRef.nativeElement.setAttribute('data-ng-icon-ssr', '');\r\n      return;\r\n    }\r\n\r\n    // if this was previously server side rendered, we should check if the svg is the same\r\n    // if it is, we don't need to do anything\r\n    if (this.elementRef.nativeElement.hasAttribute('data-ng-icon-ssr')) {\r\n      // if it is different, we need to remove the server side rendered flag\r\n      this.elementRef.nativeElement.removeAttribute('data-ng-icon-ssr');\r\n\r\n      // retrieve the svg element\r\n      this.svgElement = this.elementRef.nativeElement.querySelector<SVGElement>('svg') ?? undefined;\r\n\r\n      if (this.elementRef.nativeElement.innerHTML === svg) {\r\n        return;\r\n      }\r\n    }\r\n\r\n    // remove the old element\r\n    if (this.svgElement) {\r\n      this.renderer.removeChild(this.elementRef.nativeElement, this.svgElement);\r\n    }\r\n\r\n    // if the svg is empty, don't insert anything\r\n    if (svg === '') {\r\n      return;\r\n    }\r\n\r\n    const template: HTMLTemplateElement = this.renderer.createElement('template');\r\n\r\n    svg = this.replaceIds(svg);\r\n\r\n    this.renderer.setProperty(template, 'innerHTML', this.preProcessor(svg));\r\n\r\n    this.svgElement = template.content.firstElementChild as SVGElement;\r\n    this.postProcessor(this.svgElement);\r\n\r\n    // insert the element into the dom\r\n    this.renderer.appendChild(this.elementRef.nativeElement, this.svgElement);\r\n  }\r\n\r\n  private replaceIds(svg: string): string {\r\n    // ids are defined like ID_PLACEHOLDER_0, ID_PLACEHOLDER_1, etc.\r\n    // we need to replace these with the actual ids e.g. ng-icon-0-0, ng-icon-0-1, etc.\r\n    // if there are no ids, we don't need to do anything\r\n    if (!svg.includes('ID_PLACEHOLDER_')) {\r\n      return svg;\r\n    }\r\n\r\n    // we can just retain the trailing number as the prefix is always the same\r\n    const regex = /ID_PLACEHOLDER_(\\d+)/g;\r\n\r\n    // we need to keep track of the ids we have replaced\r\n    const idMap = new Map<string, string>();\r\n\r\n    // find all the matches\r\n    const matches = new Set(svg.match(regex));\r\n\r\n    if (matches === null) {\r\n      return svg;\r\n    }\r\n\r\n    // replace the ids\r\n    for (const match of matches) {\r\n      const id = match.replace('ID_PLACEHOLDER_', '');\r\n      const placeholder = `ng-icon-${this.uniqueId}-${idMap.size}`;\r\n      idMap.set(id, placeholder);\r\n      svg = svg.replace(new RegExp(match, 'g'), placeholder);\r\n    }\r\n\r\n    return svg;\r\n  }\r\n\r\n  /**\r\n   * Request the icon from the loader.\r\n   * @param name The name of the icon to load.\r\n   * @returns The SVG content for a given icon name.\r\n   */\r\n  private requestIconFromLoader(name: string): Promise<string> {\r\n    const coerceLoaderResult = (\r\n      result: Promise<string> | Observable<string> | string\r\n    ): Promise<string> => {\r\n      if (typeof result === 'string') {\r\n        return Promise.resolve(result);\r\n      }\r\n\r\n      if (isObservable(result)) {\r\n        // toPromise is deprecated, but we can't use lastValueFrom because it's not available in RxJS 6\r\n        // so for now we'll just use toPromise\r\n        return firstValueFrom(result) as Promise<string>;\r\n      }\r\n\r\n      return result;\r\n    };\r\n\r\n    return new Promise((resolve) => {\r\n      runInInjectionContext(this.injector, async () => {\r\n        // if we have a cache, check if the icon is already loaded (i.e, it is a string)\r\n        if (this.cache) {\r\n          const cachedResult = this.cache.get(name);\r\n\r\n          if (typeof cachedResult === 'string') {\r\n            resolve(cachedResult);\r\n            return;\r\n          }\r\n\r\n          // it may be a promise, so we need to await it\r\n          if (cachedResult instanceof Promise) {\r\n            const result = await cachedResult;\r\n            resolve(result);\r\n            return;\r\n          }\r\n        }\r\n\r\n        const promise = coerceLoaderResult(this.loader!(name));\r\n\r\n        // store the promise in the cache so if we get repeated calls (e.g. in a loop) before the loader has resolved\r\n        // then don't call the loader function multiple times\r\n        this.cache?.set(name, promise);\r\n\r\n        // await the result of the promise\r\n        const result = await promise;\r\n\r\n        // if we have a cache, store the result\r\n        this.cache?.set(name, result);\r\n\r\n        resolve(result);\r\n      });\r\n    });\r\n  }\r\n}\r\n","/* Icon */\r\nexport * from './icon/icon.component';\r\nexport * from './icon/icon-state';\r\nexport * from './icon/theme';\r\n/* Config */\r\nexport * from './config/icon-config';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAiBO,MAAM,iBAAiB,GAAsB,WAAW,CAAC;AAC9D,IAAA,IAAI,EA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