{"version":3,"file":"taiga-ui-cdk-directives-font-size.mjs","sources":["../../../projects/cdk/directives/font-size/font-size.directive.ts","../../../projects/cdk/directives/font-size/taiga-ui-cdk-directives-font-size.ts"],"sourcesContent":["import {DOCUMENT, isPlatformBrowser} from '@angular/common';\nimport {DestroyRef, Directive, inject, InjectionToken, PLATFORM_ID} from '@angular/core';\nimport {EMPTY_FUNCTION} from '@taiga-ui/cdk/constants';\nimport {tuiFontSizeWatcher} from '@taiga-ui/font-watcher';\n\nexport const TUI_FONT_SIZE_HANDLER = new InjectionToken<(size: number) => void>(\n    ngDevMode ? 'TUI_FONT_SIZE_HANDLER' : '',\n);\n\n@Directive({\n    standalone: true,\n})\nexport class TuiFontSize {\n    private readonly handler = inject(TUI_FONT_SIZE_HANDLER, {optional: true});\n    private readonly enabled =\n        !inject(TuiFontSize, {optional: true, skipSelf: true}) &&\n        isPlatformBrowser(inject(PLATFORM_ID)) &&\n        typeof ResizeObserver !== 'undefined';\n\n    protected readonly nothing = inject(DestroyRef).onDestroy(\n        this.enabled && this.handler\n            ? tuiFontSizeWatcher(this.handler, inject(DOCUMENT).createElement('iframe'))\n            : EMPTY_FUNCTION,\n    );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAKa,MAAA,qBAAqB,GAAG,IAAI,cAAc,CACnD,SAAS,GAAG,uBAAuB,GAAG,EAAE,EAC1C;AAEF,MAGa,WAAW,CAAA;AAHxB,IAAA,WAAA,GAAA;QAIqB,IAAO,CAAA,OAAA,GAAG,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,CAAC;AAC1D,QAAA,IAAA,CAAA,OAAO,GACpB,CAAC,MAAM,CAAC,WAAW,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;AACtD,YAAA,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACtC,OAAO,cAAc,KAAK,WAAW,CAAC;AAEvB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,SAAS,CACrD,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO;AACxB,cAAE,kBAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;cAC1E,cAAc,CACvB,CAAC;AACL,KAAA;+GAZY,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;mGAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;4FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AACnB,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}