diff --git a/core-web/apps/dotcdn/src/app/dotcdn.component.store.ts b/core-web/apps/dotcdn/src/app/dotcdn.component.store.ts index 358f7d8d50ff..2bcb3dbc61d3 100644 --- a/core-web/apps/dotcdn/src/app/dotcdn.component.store.ts +++ b/core-web/apps/dotcdn/src/app/dotcdn.component.store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { Observable, of } from 'rxjs'; import { Injectable } from '@angular/core'; diff --git a/core-web/apps/dotcms-ui/proxy-dev.conf.mjs b/core-web/apps/dotcms-ui/proxy-dev.conf.mjs index bda865f0d935..80986c25ae66 100644 --- a/core-web/apps/dotcms-ui/proxy-dev.conf.mjs +++ b/core-web/apps/dotcms-ui/proxy-dev.conf.mjs @@ -24,6 +24,8 @@ export default [ pathRewrite: { '^/assets/manifest.json': '/dotAdmin/assets/manifest.json', '^/assets/monaco-editor/min': '/dotAdmin/assets/monaco-editor/min', + '^/assets/edit-ema': '/dotAdmin/assets/edit-ema', + '^/assets/seo': '/dotAdmin/assets/seo', '^/assets': '/dotAdmin', '^/tinymce': '/dotAdmin/tinymce' } diff --git a/core-web/apps/dotcms-ui/src/app/portlets/dot-pages/dot-pages-store/dot-pages.store.ts b/core-web/apps/dotcms-ui/src/app/portlets/dot-pages/dot-pages-store/dot-pages.store.ts index da6cc0c611ae..0e6cf5c7db78 100644 --- a/core-web/apps/dotcms-ui/src/app/portlets/dot-pages/dot-pages-store/dot-pages.store.ts +++ b/core-web/apps/dotcms-ui/src/app/portlets/dot-pages/dot-pages-store/dot-pages.store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { forkJoin, Observable, of } from 'rxjs'; import { HttpErrorResponse } from '@angular/common/http'; diff --git a/core-web/apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/store/dot-template.store.ts b/core-web/apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/store/dot-template.store.ts index 1cf906afc0c0..3f3c9f811917 100644 --- a/core-web/apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/store/dot-template.store.ts +++ b/core-web/apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/store/dot-template.store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { Observable, of, zip } from 'rxjs'; import { HttpErrorResponse } from '@angular/common/http'; diff --git a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/store/ai-content-prompt.store.ts b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/store/ai-content-prompt.store.ts index 3ccd7455fc53..943e960e346e 100644 --- a/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/store/ai-content-prompt.store.ts +++ b/core-web/libs/block-editor/src/lib/extensions/ai-content-prompt/store/ai-content-prompt.store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { Observable } from 'rxjs'; import { Injectable } from '@angular/core'; diff --git a/core-web/libs/block-editor/src/lib/extensions/asset-form/asset-form.extension.ts b/core-web/libs/block-editor/src/lib/extensions/asset-form/asset-form.extension.ts index 433bfe3510d2..92312f3b4ed5 100644 --- a/core-web/libs/block-editor/src/lib/extensions/asset-form/asset-form.extension.ts +++ b/core-web/libs/block-editor/src/lib/extensions/asset-form/asset-form.extension.ts @@ -143,7 +143,11 @@ export const BubbleAssetFormExtension = (viewContainerRef: ViewContainerRef) => ({ chain }) => { return chain() .command(({ tr }) => { + preventClose = true; tr.setMeta(BUBBLE_ASSET_FORM_PLUGIN_KEY, { open: true, type }); + setTimeout(() => { + preventClose = false; + }, 0); return true; }) diff --git a/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/bubble-link-form.component.ts b/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/bubble-link-form.component.ts index 4f6c1ffdd714..715844886f1c 100644 --- a/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/bubble-link-form.component.ts +++ b/core-web/libs/block-editor/src/lib/extensions/bubble-link-form/bubble-link-form.component.ts @@ -245,15 +245,22 @@ export class BubbleLinkFormComponent implements OnInit { const { languageId } = contentlet; contentlet.language = this.getContentletLanguage(languageId); + // The URLs for urlContentMaps have this format: /content. + // So we need to replace it with the actual URL which is stored in urlMap + const cleanedContentlet = { + ...contentlet, + url: contentlet.URL_MAP_FOR_CONTENT ? contentlet.urlMap : contentlet.url + }; + return { label: contentlet.title, icon: 'contentlet/image', data: { - contentlet: contentlet + contentlet: cleanedContentlet }, command: () => { this.onSelection({ - payload: contentlet, + payload: cleanedContentlet, type: { name: 'dotContent' } diff --git a/core-web/libs/data-access/src/lib/dot-experiments/dot-experiments.service.spec.ts b/core-web/libs/data-access/src/lib/dot-experiments/dot-experiments.service.spec.ts index 11fcb9a04c08..2eb73d05154f 100644 --- a/core-web/libs/data-access/src/lib/dot-experiments/dot-experiments.service.spec.ts +++ b/core-web/libs/data-access/src/lib/dot-experiments/dot-experiments.service.spec.ts @@ -170,4 +170,11 @@ describe('DotExperimentsService', () => { expect(req.request.body['trafficProportion']).toEqual(newValue); }); + + it('should return an Observable of undefined when experimentId is undefined', (done) => { + spectator.service.getById(undefined).subscribe((result) => { + expect(result).toBeUndefined(); + done(); + }); + }); }); diff --git a/core-web/libs/data-access/src/lib/dot-experiments/dot-experiments.service.ts b/core-web/libs/data-access/src/lib/dot-experiments/dot-experiments.service.ts index f5aecff2b32f..ef1cdc503e49 100644 --- a/core-web/libs/data-access/src/lib/dot-experiments/dot-experiments.service.ts +++ b/core-web/libs/data-access/src/lib/dot-experiments/dot-experiments.service.ts @@ -1,9 +1,9 @@ -import { Observable } from 'rxjs'; +import { Observable, of } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import { pluck } from 'rxjs/operators'; +import { catchError, pluck } from 'rxjs/operators'; import { DotCMSResponse } from '@dotcms/dotcms-js'; import { @@ -83,13 +83,18 @@ export class DotExperimentsService { /** * Get details of an experiment * @param {string} experimentId - * @returns Observable + * @returns Observable * @memberof DotExperimentsService */ - getById(experimentId: string): Observable { + getById(experimentId: string | undefined): Observable { + if (!experimentId) { + return of(undefined); + } + return this.http .get>(`${API_ENDPOINT}/${experimentId}`) - .pipe(pluck('entity')); + .pipe(pluck('entity')) + .pipe(catchError(() => of(undefined))); } /** diff --git a/core-web/libs/edit-content/src/lib/components/dot-edit-content-form/dot-edit-content-form.component.spec.ts b/core-web/libs/edit-content/src/lib/components/dot-edit-content-form/dot-edit-content-form.component.spec.ts index e7c6cb202f23..783d5aab2e55 100644 --- a/core-web/libs/edit-content/src/lib/components/dot-edit-content-form/dot-edit-content-form.component.spec.ts +++ b/core-web/libs/edit-content/src/lib/components/dot-edit-content-form/dot-edit-content-form.component.spec.ts @@ -5,7 +5,6 @@ import { Spectator, SpyObject } from '@ngneat/spectator/jest'; -import { patchState } from '@ngrx/signals'; import { of } from 'rxjs'; import { Validators } from '@angular/forms'; @@ -23,7 +22,6 @@ import { DotWorkflowsActionsService, DotWorkflowService } from '@dotcms/data-access'; -import { ComponentStatus } from '@dotcms/dotcms-models'; import { DotWorkflowActionsComponent } from '@dotcms/ui'; import { DotFormatDateServiceMock } from '@dotcms/utils-testing'; @@ -129,21 +127,6 @@ describe('DotFormComponent', () => { expect(component.form.get('modUserName')).toBeFalsy(); expect(component.form.get('publishDate')).toBeFalsy(); }); - - it('should disable the form when loading and enable it when not loading', () => { - spectator.detectChanges(); - - // // Initially, the form should be enabled - expect(component.form.enabled).toBe(true); - - patchState(store, { - state: ComponentStatus.SAVING - }); - - spectator.flushEffects(); - - expect(component.form.enabled).toBe(false); - }); }); describe('New Content', () => { diff --git a/core-web/libs/edit-content/src/lib/feature/edit-content/store/edit-content.store.ts b/core-web/libs/edit-content/src/lib/feature/edit-content/store/edit-content.store.ts index 07333a12a52e..a618983ffcd3 100644 --- a/core-web/libs/edit-content/src/lib/feature/edit-content/store/edit-content.store.ts +++ b/core-web/libs/edit-content/src/lib/feature/edit-content/store/edit-content.store.ts @@ -1,4 +1,4 @@ -import { tapResponse } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { patchState, signalStore, @@ -18,18 +18,18 @@ import { MessageService } from 'primeng/api'; import { switchMap, tap } from 'rxjs/operators'; -import { DotCMSContentlet } from '@dotcms/angular'; import { DotContentTypeService, DotFireActionOptions, DotHttpErrorManagerService, + DotMessageService, DotRenderMode, DotWorkflowActionsFireService, - DotWorkflowsActionsService, - DotMessageService + DotWorkflowsActionsService } from '@dotcms/data-access'; import { ComponentStatus, + DotCMSContentlet, DotCMSContentType, DotCMSWorkflowAction, FeaturedFlags @@ -65,7 +65,7 @@ const initialState: EditContentState = { * related to content editing and workflow actions. */ export const DotEditContentStore = signalStore( - withState(initialState), + withState(initialState), withComputed((store) => ({ /** * Computed property that determines if the new content editor feature is enabled. @@ -77,9 +77,13 @@ export const DotEditContentStore = signalStore( */ isEnabledNewContentEditor: computed(() => { const contentType = store.contentType(); - const metadata = contentType?.metadata; + if (!contentType?.metadata) { + return false; + } - return metadata?.[FeaturedFlags.FEATURE_FLAG_CONTENT_EDITOR2_ENABLED] === true; + return ( + contentType.metadata[FeaturedFlags.FEATURE_FLAG_CONTENT_EDITOR2_ENABLED] === true + ); }), /** diff --git a/core-web/libs/edit-content/src/lib/feature/edit-content/store/features/information.feature.ts b/core-web/libs/edit-content/src/lib/feature/edit-content/store/features/information.feature.ts index f2c7efdcf2e2..a52e08fdc6b4 100644 --- a/core-web/libs/edit-content/src/lib/feature/edit-content/store/features/information.feature.ts +++ b/core-web/libs/edit-content/src/lib/feature/edit-content/store/features/information.feature.ts @@ -1,4 +1,4 @@ -import { tapResponse } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { patchState, signalStoreFeature, diff --git a/core-web/libs/edit-content/src/lib/feature/edit-content/store/features/workflow.feature.ts b/core-web/libs/edit-content/src/lib/feature/edit-content/store/features/workflow.feature.ts index d885800f6ec7..f24a6a25c9da 100644 --- a/core-web/libs/edit-content/src/lib/feature/edit-content/store/features/workflow.feature.ts +++ b/core-web/libs/edit-content/src/lib/feature/edit-content/store/features/workflow.feature.ts @@ -1,4 +1,4 @@ -import { tapResponse } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { patchState, signalStoreFeature, diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-binary-field/components/dot-binary-field-url-mode/store/dot-binary-field-url-mode.store.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-binary-field/components/dot-binary-field-url-mode/store/dot-binary-field-url-mode.store.ts index 91348cc15a9a..e5a9646dffd7 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-binary-field/components/dot-binary-field-url-mode/store/dot-binary-field-url-mode.store.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-binary-field/components/dot-binary-field-url-mode/store/dot-binary-field-url-mode.store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { Observable, from } from 'rxjs'; import { Injectable } from '@angular/core'; diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-binary-field/store/binary-field.store.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-binary-field/store/binary-field.store.ts index 654121c912c2..b28dc82fdf7a 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-binary-field/store/binary-field.store.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-binary-field/store/binary-field.store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { from, Observable, of } from 'rxjs'; import { HttpClient } from '@angular/common/http'; diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-category-field/store/content-category-field.store.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-category-field/store/content-category-field.store.ts index 03e417b81635..cdc645aa44f6 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-category-field/store/content-category-field.store.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-category-field/store/content-category-field.store.ts @@ -1,4 +1,4 @@ -import { tapResponse } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { patchState, signalStore, withComputed, withMethods, withState } from '@ngrx/signals'; import { rxMethod } from '@ngrx/signals/rxjs-interop'; import { pipe } from 'rxjs'; diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-form-import-url/store/form-import-url.store.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-form-import-url/store/form-import-url.store.ts index 7648d15dcbdc..c25802c5bafc 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-form-import-url/store/form-import-url.store.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-form-import-url/store/form-import-url.store.ts @@ -9,7 +9,7 @@ import { switchMap, tap } from 'rxjs/operators'; import { ComponentStatus, DotHttpErrorResponse } from '@dotcms/dotcms-models'; -import { UploadedFile, UPLOAD_TYPE } from '../../../../../models/dot-edit-content-file.model'; +import { UPLOAD_TYPE, UploadedFile } from '../../../../../models/dot-edit-content-file.model'; import { DotFileFieldUploadService } from '../../../services/upload-file/upload-file.service'; export interface FormImportUrlState { @@ -29,6 +29,7 @@ const initialState: FormImportUrlState = { }; export const FormImportUrlStore = signalStore( + { protectedState: false }, // TODO: remove when the unit tests are fixed withState(initialState), withComputed((state) => ({ isLoading: computed(() => state.status() === ComponentStatus.LOADING), diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-select-existing-file/store/select-existing-file.store.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-select-existing-file/store/select-existing-file.store.ts index e6fc13147bf5..c1f109be0121 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-select-existing-file/store/select-existing-file.store.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-select-existing-file/store/select-existing-file.store.ts @@ -1,4 +1,4 @@ -import { tapResponse } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { patchState, signalStore, withComputed, withMethods, withState } from '@ngrx/signals'; import { rxMethod } from '@ngrx/signals/rxjs-interop'; import { pipe } from 'rxjs'; diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/store/file-field.store.ts b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/store/file-field.store.ts index d31d091f2f19..8cdbea469e07 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/store/file-field.store.ts +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/store/file-field.store.ts @@ -55,6 +55,7 @@ const initialState: FileFieldState = { }; export const FileFieldStore = signalStore( + { protectedState: false }, // TODO: remove when the unit tests are fixed withState(initialState), withComputed(({ fileStatus }) => ({ isInit: computed(() => { diff --git a/core-web/libs/portlets/dot-analytics-search/portlet/src/lib/store/dot-analytics-search.store.ts b/core-web/libs/portlets/dot-analytics-search/portlet/src/lib/store/dot-analytics-search.store.ts index 6ca2d9a85a94..c8aa027eef73 100644 --- a/core-web/libs/portlets/dot-analytics-search/portlet/src/lib/store/dot-analytics-search.store.ts +++ b/core-web/libs/portlets/dot-analytics-search/portlet/src/lib/store/dot-analytics-search.store.ts @@ -1,5 +1,5 @@ import { JsonObject } from '@angular-devkit/core'; -import { tapResponse } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { patchState, signalStore, withHooks, withMethods, withState } from '@ngrx/signals'; import { rxMethod } from '@ngrx/signals/rxjs-interop'; import { pipe } from 'rxjs'; diff --git a/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-configuration/store/dot-experiments-configuration-store.ts b/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-configuration/store/dot-experiments-configuration-store.ts index 4d264956a749..2ac021f71b79 100644 --- a/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-configuration/store/dot-experiments-configuration-store.ts +++ b/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-configuration/store/dot-experiments-configuration-store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { Observable, throwError } from 'rxjs'; import { HttpErrorResponse } from '@angular/common/http'; diff --git a/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-list/store/dot-experiments-list-store.ts b/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-list/store/dot-experiments-list-store.ts index 57fca270a5ec..066ac65314e3 100644 --- a/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-list/store/dot-experiments-list-store.ts +++ b/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-list/store/dot-experiments-list-store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, OnStateInit, tapResponse } from '@ngrx/component-store'; +import { ComponentStore, OnStateInit } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { EMPTY, Observable, throwError } from 'rxjs'; import { HttpErrorResponse } from '@angular/common/http'; diff --git a/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-reports/store/dot-experiments-reports-store.ts b/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-reports/store/dot-experiments-reports-store.ts index da5b7aaaf983..3a848bfd7980 100644 --- a/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-reports/store/dot-experiments-reports-store.ts +++ b/core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-reports/store/dot-experiments-reports-store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { ChartData } from 'chart.js'; import { forkJoin, Observable, of } from 'rxjs'; diff --git a/core-web/libs/portlets/dot-locales/portlet/src/lib/dot-locales-list/store/dot-locales-list.store.ts b/core-web/libs/portlets/dot-locales/portlet/src/lib/dot-locales-list/store/dot-locales-list.store.ts index 60dbb61bc511..3056ce78b708 100644 --- a/core-web/libs/portlets/dot-locales/portlet/src/lib/dot-locales-list/store/dot-locales-list.store.ts +++ b/core-web/libs/portlets/dot-locales/portlet/src/lib/dot-locales-list/store/dot-locales-list.store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { forkJoin } from 'rxjs'; import { HttpErrorResponse } from '@angular/common/http'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-block-editor-sidebar/dot-block-editor-sidebar.component.html b/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-block-editor-sidebar/dot-block-editor-sidebar.component.html index e51d051f7b26..cf79e5a9cbc1 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-block-editor-sidebar/dot-block-editor-sidebar.component.html +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-block-editor-sidebar/dot-block-editor-sidebar.component.html @@ -11,7 +11,7 @@ } diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-block-editor-sidebar/dot-block-editor-sidebar.component.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-block-editor-sidebar/dot-block-editor-sidebar.component.spec.ts index 8ac0a7efb7b0..d9ff02d6fecf 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-block-editor-sidebar/dot-block-editor-sidebar.component.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-block-editor-sidebar/dot-block-editor-sidebar.component.spec.ts @@ -74,9 +74,12 @@ const messageServiceMock = new MockDotMessageService({ const EVENT_DATA = { fieldName: 'testName', contentType: 'Blog', - language: '2', + language: 2, inode: 'testInode', - blockEditorContent: '{"field":"field value"}' + content: { + conent: [], + type: 'doc' + } }; const contentTypeMock: DotCMSContentType = { @@ -135,8 +138,8 @@ describe('DotBlockEditorSidebarComponent', () => { const blockEditor = spectator.query(DotBlockEditorComponent); expect(blockEditor.field).toEqual(BLOCK_EDITOR_FIELD); - expect(blockEditor.languageId).toBe(parseInt(EVENT_DATA.language)); - expect(blockEditor.value).toEqual(JSON.parse(EVENT_DATA.blockEditorContent)); + expect(blockEditor.languageId).toBe(EVENT_DATA.language); + expect(blockEditor.value).toEqual(EVENT_DATA.content); expect(dotContentTypeService.getContentType).toHaveBeenCalledWith('Blog'); }); diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-block-editor-sidebar/dot-block-editor-sidebar.component.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-block-editor-sidebar/dot-block-editor-sidebar.component.ts index f549980f2682..ac5846f925c4 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-block-editor-sidebar/dot-block-editor-sidebar.component.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-block-editor-sidebar/dot-block-editor-sidebar.component.ts @@ -14,6 +14,7 @@ import { map, take } from 'rxjs/operators'; import { JSONContent } from '@tiptap/core'; import { BlockEditorModule } from '@dotcms/block-editor'; +import { InlineEditorData } from '@dotcms/client'; import { DotAlertConfirmService, DotContentTypeService, @@ -24,19 +25,11 @@ import { DotCMSContentTypeField } from '@dotcms/dotcms-models'; import { DotMessagePipe } from '@dotcms/ui'; export interface BlockEditorData { - content: { [key: string]: string }; - field: DotCMSContentTypeField; - fieldName: string; inode: string; - languageId: number; -} - -export interface BlockEditorPayload { fieldName: string; - contentType: string; - inode: string; - language: string; - blockEditorContent: string; + language: number; + content: JSONContent; + field: DotCMSContentTypeField; } export const INLINE_EDIT_BLOCK_EDITOR_EVENT = 'edit-block-editor'; @@ -83,24 +76,18 @@ export class DotBlockEditorSidebarComponent { /** * Open the sidebar with the block editor content * - * @param {BlockEditorPayload} { fieldName, contentType, inode, language, blockEditorContent } + * @param {InlineEditorData} { fieldName, contentType, inode, language, blockEditorContent } * @memberof DotBlockEditorSidebarComponent */ - open({ - fieldName, - contentType, - inode, - language, - blockEditorContent - }: BlockEditorPayload): void { + open({ inode, content, language, fieldName, contentType }: InlineEditorData): void { this.#getEditorField({ fieldName, contentType }).subscribe({ next: (field) => this.contentlet.set({ inode, field, - fieldName, - languageId: parseInt(language), - content: this.#getJsonContent(blockEditorContent) + content, + language, + fieldName }), error: (err) => console.error('Error getting contentlet ', err) }); @@ -173,21 +160,4 @@ export class DotBlockEditorSidebarComponent { .getContentType(contentType) .pipe(map(({ fields }) => fields.find(({ variable }) => variable === fieldName))); } - - /** - * Parse the content to JSON - * - * @param {string} content - * @return {*} {JSONContent} - * @memberof DotBlockEditorSidebarComponent - */ - #getJsonContent(content: string): JSONContent { - try { - return JSON.parse(content); - } catch (e) { - console.error('Error parsing JSON content ', e); - - return {}; - } - } } diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-ema-dialog/store/dot-ema-dialog.store.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-ema-dialog/store/dot-ema-dialog.store.ts index 5b16147c6590..9f70d1dfd113 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-ema-dialog/store/dot-ema-dialog.store.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/components/dot-ema-dialog/store/dot-ema-dialog.store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { Observable } from 'rxjs'; import { Injectable, inject } from '@angular/core'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/edit-ema-palette/store/edit-ema-palette.store.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/edit-ema-palette/store/edit-ema-palette.store.ts index 4d6232327cf6..5196b2f6696f 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/edit-ema-palette/store/edit-ema-palette.store.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/components/edit-ema-palette/store/edit-ema-palette.store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { EMPTY, Observable, forkJoin } from 'rxjs'; import { Injectable, inject } from '@angular/core'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.spec.ts index 4afc04e9c771..1f4fb109124f 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.spec.ts @@ -696,8 +696,11 @@ describe('EditEmaEditorComponent', () => { new MessageEvent('message', { origin: HOST, data: { - action: CLIENT_ACTIONS.INIT_BLOCK_EDITOR_INLINE_EDITING, - payload: {} + action: CLIENT_ACTIONS.INIT_INLINE_EDITING, + payload: { + type: 'BLOCK_EDITOR', + data: {} + } } }) ); @@ -727,7 +730,7 @@ describe('EditEmaEditorComponent', () => { new MessageEvent('message', { origin: HOST, data: { - action: CLIENT_ACTIONS.INIT_BLOCK_EDITOR_INLINE_EDITING, + action: CLIENT_ACTIONS.INIT_INLINE_EDITING, payload: {} } }) diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts index a4b3e59db21e..0e8453de09f8 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/edit-ema-editor/edit-ema-editor.component.ts @@ -25,7 +25,12 @@ import { ProgressBarModule } from 'primeng/progressbar'; import { takeUntil, catchError, filter, map, switchMap, tap, take } from 'rxjs/operators'; -import { CLIENT_ACTIONS, NOTIFY_CLIENT } from '@dotcms/client'; +import { + CLIENT_ACTIONS, + NOTIFY_CLIENT, + INLINE_EDITING_EVENT_KEY, + InlineEditEventData +} from '@dotcms/client'; import { DotMessageService, DotCopyContentService, @@ -868,12 +873,6 @@ export class EditEmaEditorComponent implements OnInit, OnDestroy { [CLIENT_ACTIONS.IFRAME_SCROLL_END]: () => { this.uveStore.updateEditorOnScrollEnd(); }, - [CLIENT_ACTIONS.INIT_INLINE_EDITING]: () => { - // The iframe says that the editor is ready to start inline editing - // The dataset of the inline-editing contentlet is ready inside the service. - this.inlineEditingService.initEditor(); - this.uveStore.setEditorState(EDITOR_STATE.INLINE_EDITING); - }, [CLIENT_ACTIONS.COPY_CONTENTLET_INLINE_EDITING]: (payload: { dataset: InlineEditingContentletDataset; }) => { @@ -1013,22 +1012,10 @@ export class EditEmaEditorComponent implements OnInit, OnDestroy { this.dotMessageService.get('editpage.content.contentlet.menu.reorder.title') ); }, + [CLIENT_ACTIONS.INIT_INLINE_EDITING]: (payload) => + this.#handleInlineEditingEvent(payload), [CLIENT_ACTIONS.NOOP]: () => { /* Do Nothing because is not the origin we are expecting */ - }, - [CLIENT_ACTIONS.INIT_BLOCK_EDITOR_INLINE_EDITING]: (payload) => { - if (!this.uveStore.isEnterprise()) { - this.#dotAlertConfirmService.alert({ - header: this.dotMessageService.get( - 'dot.common.license.enterprise.only.error' - ), - message: this.dotMessageService.get('editpage.not.lincese.error') - }); - - return; - } - - this.blockSidebar?.open(payload); } }; const actionToExecute = CLIENT_ACTIONS_FUNC_MAP[action]; @@ -1377,4 +1364,44 @@ export class EditEmaEditorComponent implements OnInit, OnDestroy { this.placeItem(payload, dragItem); }); } + + /** + * Handle the inline editing event + * + * @param {*} { type, data } + * @return {*} + * @memberof EditEmaEditorComponent + */ + #handleInlineEditingEvent({ + type, + data + }: { + type: INLINE_EDITING_EVENT_KEY; + data?: InlineEditEventData; + }) { + if (!this.uveStore.isEnterprise()) { + this.#dotAlertConfirmService.alert({ + header: this.dotMessageService.get('dot.common.license.enterprise.only.error'), + message: this.dotMessageService.get('editpage.not.lincese.error') + }); + + return; + } + + switch (type) { + case 'BLOCK_EDITOR': + this.blockSidebar?.open(data); + break; + + case 'WYSIWYG': + this.inlineEditingService.initEditor(); + this.uveStore.setEditorState(EDITOR_STATE.INLINE_EDITING); + break; + + default: + console.warn('Unknown block editor type', type); + + break; + } + } } diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/services/inline-edit/inline-edit.service.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/services/inline-edit/inline-edit.service.ts index dcb0c43caf63..d2371044b962 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/services/inline-edit/inline-edit.service.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/services/inline-edit/inline-edit.service.ts @@ -1,5 +1,7 @@ import { ElementRef, Injectable, signal } from '@angular/core'; +import { CLIENT_ACTIONS } from '@dotcms/client'; + import { InlineEditingContentletDataset } from '../../edit-ema-editor/components/ema-page-dropzone/types'; declare global { @@ -137,8 +139,10 @@ export class InlineEditService { window.parent.postMessage( { - action: 'init-inline-editing', - payload: {} + action: CLIENT_ACTIONS.INIT_INLINE_EDITING, + payload: { + type: 'WYSIWYG' + } }, '*' ); diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.ts index be75b88eef5d..ff51cc8631f8 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/dot-uve.store.ts @@ -28,6 +28,7 @@ const initialState: UVEState = { }; export const UVEStore = signalStore( + { protectedState: false }, // TODO: remove when the unit tests are fixed withState(initialState), withComputed( ({ diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/save/withSave.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/save/withSave.ts index e21a8df6d9d7..af0f35637af2 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/save/withSave.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/save/withSave.ts @@ -1,4 +1,4 @@ -import { tapResponse } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { patchState, signalStoreFeature, type, withMethods } from '@ngrx/signals'; import { rxMethod } from '@ngrx/signals/rxjs-interop'; import { EMPTY, pipe } from 'rxjs'; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.spec.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.spec.ts index c5422e2b50a4..a56151ad5636 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.spec.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/editor/withEditor.spec.ts @@ -1,7 +1,7 @@ import { describe, expect } from '@jest/globals'; import { SpyObject } from '@ngneat/spectator'; import { createServiceFactory, mockProvider, SpectatorService } from '@ngneat/spectator/jest'; -import { signalStore, withState, patchState } from '@ngrx/signals'; +import { patchState, signalStore, withState } from '@ngrx/signals'; import { of } from 'rxjs'; import { ActivatedRoute, Router } from '@angular/router'; @@ -68,7 +68,11 @@ const initialState: UVEState = { pageIsLocked: true }; -export const uveStoreMock = signalStore(withState(initialState), withEditor()); +export const uveStoreMock = signalStore( + { protectedState: false }, + withState(initialState), + withEditor() +); describe('withEditor', () => { let spectator: SpectatorService>; diff --git a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/load/withLoad.ts b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/load/withLoad.ts index 3c65cdaf5ed6..5a427ca546ef 100644 --- a/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/load/withLoad.ts +++ b/core-web/libs/portlets/edit-ema/portlet/src/lib/store/features/load/withLoad.ts @@ -1,19 +1,19 @@ -import { tapResponse } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { patchState, signalStoreFeature, type, withMethods } from '@ngrx/signals'; import { rxMethod } from '@ngrx/signals/rxjs-interop'; -import { pipe, forkJoin, of, EMPTY } from 'rxjs'; +import { EMPTY, forkJoin, of, pipe } from 'rxjs'; import { HttpErrorResponse } from '@angular/common/http'; import { inject } from '@angular/core'; -import { Router, ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; -import { switchMap, shareReplay, catchError, tap, take, map } from 'rxjs/operators'; +import { map, shareReplay, switchMap, take, tap } from 'rxjs/operators'; -import { DotLanguagesService, DotLicenseService, DotExperimentsService } from '@dotcms/data-access'; +import { DotExperimentsService, DotLanguagesService, DotLicenseService } from '@dotcms/data-access'; import { LoginService } from '@dotcms/dotcms-js'; import { DEFAULT_VARIANT_ID } from '@dotcms/dotcms-models'; -import { DotPageApiService, DotPageApiParams } from '../../../services/dot-page-api.service'; +import { DotPageApiParams, DotPageApiService } from '../../../services/dot-page-api.service'; import { UVE_STATUS } from '../../../shared/enums'; import { computeCanEditPage, computePageIsLocked, isForwardOrPage } from '../../../utils'; import { UVEState } from '../../models'; @@ -109,13 +109,9 @@ export function withLoad() { }), switchMap(({ pageAPIResponse, isEnterprise, currentUser }) => forkJoin({ - experiment: dotExperimentsService - .getById(params.experimentId) - .pipe( - // If there is an error, we return undefined - // This is to avoid blocking the page if there is an error with the experiment - catchError(() => of(undefined)) - ), + experiment: dotExperimentsService.getById( + params.experimentId + ), languages: dotLanguagesService.getLanguagesUsedPage( pageAPIResponse.page.identifier ) diff --git a/core-web/libs/portlets/edit-ema/ui/src/lib/dot-favorite-page/store/dot-favorite-page.store.ts b/core-web/libs/portlets/edit-ema/ui/src/lib/dot-favorite-page/store/dot-favorite-page.store.ts index 72af27602195..a3993097cf69 100644 --- a/core-web/libs/portlets/edit-ema/ui/src/lib/dot-favorite-page/store/dot-favorite-page.store.ts +++ b/core-web/libs/portlets/edit-ema/ui/src/lib/dot-favorite-page/store/dot-favorite-page.store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { Observable, throwError, of } from 'rxjs'; import { HttpErrorResponse } from '@angular/common/http'; diff --git a/core-web/libs/portlets/edit-ema/ui/src/lib/dot-page-tools-seo/dot-page-tools-seo.component.scss b/core-web/libs/portlets/edit-ema/ui/src/lib/dot-page-tools-seo/dot-page-tools-seo.component.scss index d013494815f2..dc112d89f76b 100644 --- a/core-web/libs/portlets/edit-ema/ui/src/lib/dot-page-tools-seo/dot-page-tools-seo.component.scss +++ b/core-web/libs/portlets/edit-ema/ui/src/lib/dot-page-tools-seo/dot-page-tools-seo.component.scss @@ -53,6 +53,7 @@ .page-tools-list__description { margin: 0; line-height: $line-height; + word-break: normal; } .page-tools-external-link { diff --git a/core-web/libs/portlets/edit-ema/ui/src/lib/dot-page-tools-seo/store/dot-page-tools-seo.store.ts b/core-web/libs/portlets/edit-ema/ui/src/lib/dot-page-tools-seo/store/dot-page-tools-seo.store.ts index 52028bb9ff4f..dc2dea83ba8b 100644 --- a/core-web/libs/portlets/edit-ema/ui/src/lib/dot-page-tools-seo/store/dot-page-tools-seo.store.ts +++ b/core-web/libs/portlets/edit-ema/ui/src/lib/dot-page-tools-seo/store/dot-page-tools-seo.store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { Observable } from 'rxjs'; import { HttpErrorResponse } from '@angular/common/http'; diff --git a/core-web/libs/sdk/client/README.md b/core-web/libs/sdk/client/README.md index 48fb155e2b33..6db7074d748b 100644 --- a/core-web/libs/sdk/client/README.md +++ b/core-web/libs/sdk/client/README.md @@ -1,6 +1,6 @@ -# @dotcms/client +# DotCMS API Client - `@dotcms/client` -`@dotcms/client` is the official dotCMS JavaScript library designed to simplify interactions with the DotCMS REST APIs. +The `@dotcms/client` is a JavaScript/TypeScript library for interacting with a DotCMS instance. It allows you to easily fetch pages, content, and navigation information in JSON format, as well as to make complex queries on content collections. This client library provides a streamlined, promise-based interface to fetch pages and navigation API. @@ -10,9 +10,11 @@ This client library provides a streamlined, promise-based interface to fetch pag - Support for custom actions to communicate with the DotCMS page editor. - Comprehensive TypeScript typings for better development experience. +# DotCMS API Client + ## Installation -Install the package via npm: +To get started, install the client via npm or yarn: ```bash npm install @dotcms/client @@ -52,7 +54,7 @@ const client = DotCmsClient.init({ ### Fetching a Page -Retrieve the elements of any page in your DotCMS system in JSON format. +You can retrieve the elements of any page in your DotCMS system in JSON format using the client.page.get() method. ```javascript const pageData = await client.page.get({ @@ -60,13 +62,11 @@ const pageData = await client.page.get({ language_id: 1, personaId: 'optional-persona-id' }); - -console.log(pageData); ``` ### Fetching Navigation -Retrieve information about the DotCMS file and folder tree. +Retrieve the DotCMS file and folder tree to get information about the navigation structure. ```javascript const navData = await client.nav.get({ @@ -74,8 +74,130 @@ const navData = await client.nav.get({ depth: 2, languageId: 1 }); +``` + +### Fetching a Collection of Content + +The `getCollection` method allows you to fetch a collection of content items using a builder pattern for complex queries. + +#### Basic Usage + +Here’s a simple example to fetch content from a collection: + +```typescript +import { DotCmsClient } from '@dotcms/client'; + +const client = DotCmsClient.init({ + dotcmsUrl: 'https://your-dotcms-instance.com', + authToken: 'your-auth-token' +}); + +const collectionResponse = await client.content + .getCollection('Blog') // Collection name + .limit(10) // Limit results to 10 items + .page(1) // Fetch the first page + .fetch(); // Execute the query + +console.log(collectionResponse.contentlets); +``` + +#### Sorting Content + +You can sort the content by any field in ascending or descending order: + +```typescript +const sortedResponse = await client.content + .getCollection('Blog') + .sortBy([{ field: 'title', order: 'asc' }]) // Sort by title in ascending order + .fetch(); +``` + +#### Filtering by Language + +If you need to filter content by language, you can specify the `language` parameter: + +```typescript +const languageFilteredResponse = await client.content + .getCollection('Blog') + .language(2) // Filter by language ID (e.g., 2) + .fetch(); +``` + +#### Using Complex Queries + +You can build more complex queries using the query builder. For example, filter by author and `title`: -console.log(navData); +```typescript +const complexQueryResponse = await client.content + .getCollection('Blog') + .query((qb) => qb.field('author').equals('John Doe').and().field('title').equals('Hello World')) + .fetch(); +``` + +#### Fetching Draft Content + +To only fetch draft content, use the `draft()` method: + +```typescript +const draftContentResponse = await client.content + .getCollection('Blog') + .draft() // Fetch only drafts content + .fetch(); +``` + +#### Setting Depth for Relationships + +To fetch content with a specific relationship depth, use the `depth()` method: + +```typescript +const depthResponse = await client.content + .getCollection('Blog') + .depth(2) // Fetch related content up to depth 2 + .fetch(); +``` + +#### Combining Multiple Methods + +You can combine multiple methods to build more complex queries. For example, limit results, sort them, and filter by author: + +```typescript +const combinedResponse = await client.content + .getCollection('Blog') + .limit(5) + .page(2) + .sortBy([{ field: 'title', order: 'asc' }]) + .query((qb) => qb.field('author').equals('John Doe')) + .depth(1) + .fetch(); +``` + +## Error Handling Example + +To handle errors gracefully, you can use a `try-catch` block around your API calls. Here’s an example: + +```typescript +try { + const pageData = await client.page.get({ + path: '/your-page-path', + languageId: 1 + }); +} catch (error) { + console.error('Failed to fetch page data:', error); +} +``` + +This ensures that any errors that occur during the fetch (e.g., network issues, invalid paths, etc.) are caught and logged properly. + +## Pagination + +When fetching large collections of content, pagination is key to managing the number of results returned: + +```typescript +const paginatedResponse = await client.content + .getCollection('Blog') + .limit(10) // Limit to 10 items per page + .page(2) // Get the second page of results + .fetch(); ``` ## API Reference @@ -94,6 +216,17 @@ Retrieves the specified page's elements from your DotCMS system in JSON format. Retrieves information about the DotCMS file and folder tree. +### `DotCmsClient.content.getCollection(contentType: string): CollectionBuilder` +Creates a builder to filter and fetch a collection of content items for a specific content type. + +#### Parameters + +contentType (string): The content type to retrieve. + +#### Returns + +CollectionBuilder: A builder instance for chaining filters and executing the query. + ## Contributing GitHub pull requests are the preferred method to contribute code to dotCMS. Before any pull requests can be accepted, an automated tool will ask you to agree to the [dotCMS Contributor's Agreement](https://gist.github.com/wezell/85ef45298c48494b90d92755b583acb3). diff --git a/core-web/libs/sdk/client/src/index.ts b/core-web/libs/sdk/client/src/index.ts index a9a64c13fb60..ede6358c0df3 100644 --- a/core-web/libs/sdk/client/src/index.ts +++ b/core-web/libs/sdk/client/src/index.ts @@ -5,6 +5,11 @@ import { DotCMSPageEditorConfig, EditorConfig } from './lib/editor/models/editor.model'; +import { + InlineEditorData, + INLINE_EDITING_EVENT_KEY, + InlineEditEventData +} from './lib/editor/models/inline-event.model'; import { NOTIFY_CLIENT } from './lib/editor/models/listeners.model'; import { destroyEditor, @@ -12,7 +17,8 @@ import { reorderMenu, initEditor, isInsideEditor, - updateNavigation + updateNavigation, + initInlineEditing } from './lib/editor/sdk-editor'; import { getPageRequestParams, graphqlToPageEntity } from './lib/utils'; @@ -32,5 +38,9 @@ export { initEditor, updateNavigation, destroyEditor, - ClientConfig + ClientConfig, + initInlineEditing, + InlineEditEventData, + InlineEditorData, + INLINE_EDITING_EVENT_KEY }; diff --git a/core-web/libs/sdk/client/src/lib/editor/models/client.model.ts b/core-web/libs/sdk/client/src/lib/editor/models/client.model.ts index 85955e290dfd..32773b9bfc71 100644 --- a/core-web/libs/sdk/client/src/lib/editor/models/client.model.ts +++ b/core-web/libs/sdk/client/src/lib/editor/models/client.model.ts @@ -1,4 +1,4 @@ -import { editContentlet, reorderMenu } from '../sdk-editor'; +import { editContentlet, initInlineEditing, reorderMenu } from '../sdk-editor'; declare global { interface Window { dotUVE: DotUVE; @@ -7,6 +7,7 @@ declare global { export const INITIAL_DOT_UVE: DotUVE = { editContentlet, + initInlineEditing, reorderMenu, lastScrollYPosition: 0 }; @@ -71,10 +72,6 @@ export enum CLIENT_ACTIONS { * Tell the editor to edit a contentlet */ EDIT_CONTENTLET = 'edit-contentlet', - /** - * Tell the editor to open the block editor sidebar - */ - INIT_BLOCK_EDITOR_INLINE_EDITING = 'init-editor-inline-editing', /** * Tell the editor to do nothing */ @@ -106,6 +103,7 @@ export function postMessageToEditor(message: PostMessageProps) { export interface DotUVE { editContentlet: typeof editContentlet; + initInlineEditing: typeof initInlineEditing; reorderMenu: typeof reorderMenu; lastScrollYPosition: number; } diff --git a/core-web/libs/sdk/client/src/lib/editor/models/inline-event.model.ts b/core-web/libs/sdk/client/src/lib/editor/models/inline-event.model.ts new file mode 100644 index 000000000000..1e76fe8b6fda --- /dev/null +++ b/core-web/libs/sdk/client/src/lib/editor/models/inline-event.model.ts @@ -0,0 +1,11 @@ +export type INLINE_EDITING_EVENT_KEY = 'BLOCK_EDITOR' | 'WYSIWYG'; + +export interface InlineEditorData { + inode: string; + language: number; + contentType: string; + fieldName: string; + content: Record; +} + +export type InlineEditEventData = InlineEditorData; diff --git a/core-web/libs/sdk/client/src/lib/editor/sdk-editor.spec.ts b/core-web/libs/sdk/client/src/lib/editor/sdk-editor.spec.ts index 82ae089e8b99..1edbe2ec6965 100644 --- a/core-web/libs/sdk/client/src/lib/editor/sdk-editor.spec.ts +++ b/core-web/libs/sdk/client/src/lib/editor/sdk-editor.spec.ts @@ -8,6 +8,7 @@ import { postMessageToEditor, CLIENT_ACTIONS } from './models/client.model'; import { addClassToEmptyContentlets, initEditor, + initInlineEditing, isInsideEditor, updateNavigation } from './sdk-editor'; @@ -126,4 +127,41 @@ describe('DotCMSPageEditor', () => { expect(contentlet.classList.contains('empty-contentlet')).toBe(false); }); }); + + describe('initInlineEditing', () => { + it('should send the correct message to the editor to edit `block-editor`', () => { + const type = 'BLOCK_EDITOR'; + const data = { + inode: '123', + language: 1, + contentType: 'text', + fieldName: 'body', + content: {} + }; + + initInlineEditing(type, data); + + expect(postMessageToEditor).toHaveBeenCalledWith({ + action: CLIENT_ACTIONS.INIT_INLINE_EDITING, + payload: { + type, + data + } + }); + }); + + it('should send the correct message to the editor to edit `WYSIWYG`', () => { + const type = 'WYSIWYG'; + + initInlineEditing(type); + + expect(postMessageToEditor).toHaveBeenCalledWith({ + action: CLIENT_ACTIONS.INIT_INLINE_EDITING, + payload: { + type, + data: undefined + } + }); + }); + }); }); diff --git a/core-web/libs/sdk/client/src/lib/editor/sdk-editor.ts b/core-web/libs/sdk/client/src/lib/editor/sdk-editor.ts index 7c648c15c462..43638f1f6c64 100644 --- a/core-web/libs/sdk/client/src/lib/editor/sdk-editor.ts +++ b/core-web/libs/sdk/client/src/lib/editor/sdk-editor.ts @@ -7,6 +7,7 @@ import { } from './listeners/listeners'; import { CLIENT_ACTIONS, INITIAL_DOT_UVE, postMessageToEditor } from './models/client.model'; import { DotCMSPageEditorConfig, ReorderMenuConfig } from './models/editor.model'; +import { INLINE_EDITING_EVENT_KEY, InlineEditEventData } from './models/inline-event.model'; import { Contentlet } from '../client/content/shared/types'; @@ -44,6 +45,34 @@ export function editContentlet(contentlet: Contentlet) { } /** + * Initializes the inline editing in the editor. + * + * @export + * @param {INLINE_EDITING_EVENT_KEY} type + * @param {InlineEditEventData} eventData + * @return {*} + * + * * @example + * ```html + *
+ * ${My Content} + *
+ * ``` + */ +export function initInlineEditing( + type: INLINE_EDITING_EVENT_KEY, + data?: InlineEditEventData +): void { + postMessageToEditor({ + action: CLIENT_ACTIONS.INIT_INLINE_EDITING, + payload: { + type, + data + } + }); +} + +/* * Reorders the menu based on the provided configuration. * * @param {ReorderMenuConfig} [config] - Optional configuration for reordering the menu. diff --git a/core-web/libs/sdk/client/src/lib/editor/utils/traditional-vtl.utils.spec.ts b/core-web/libs/sdk/client/src/lib/editor/utils/traditional-vtl.utils.spec.ts index 553f131d5168..0983c7ed4f51 100644 --- a/core-web/libs/sdk/client/src/lib/editor/utils/traditional-vtl.utils.spec.ts +++ b/core-web/libs/sdk/client/src/lib/editor/utils/traditional-vtl.utils.spec.ts @@ -1,6 +1,6 @@ import { listenBlockEditorInlineEvent } from './traditional-vtl.utils'; -import { CLIENT_ACTIONS } from '../models/client.model'; +import * as client from '../sdk-editor'; describe('Traditional VTL utils', () => { describe('listenBlockEditorInlineEvent', () => { @@ -11,30 +11,34 @@ describe('Traditional VTL utils', () => { it('should add event listeners to nodes with data-block-editor-content attribute', () => { document.body.innerHTML = ` -
-
+
+
`; - const postMessageMock = jest.fn(); - window.parent.postMessage = postMessageMock; + const spy = jest.spyOn(client, 'initInlineEditing'); listenBlockEditorInlineEvent(); - const nodes = document.querySelectorAll('[data-block-editor-content]'); + const nodes: NodeListOf = document.querySelectorAll( + '[data-block-editor-content]' + ); nodes.forEach((node) => { expect(node.classList.contains('dotcms__inline-edit-field')).toBe(true); node.dispatchEvent(new Event('click')); }); - expect(postMessageMock).toHaveBeenCalledTimes(nodes.length); - nodes.forEach((node) => { - expect(postMessageMock).toHaveBeenCalledWith( - { - payload: Object.assign({}, (node as HTMLElement).dataset), - action: CLIENT_ACTIONS.INIT_BLOCK_EDITOR_INLINE_EDITING - }, - '*' - ); + expect(spy).toHaveBeenCalledTimes(nodes.length); + nodes.forEach(({ dataset }) => { + const { inode, language, contentType, fieldName, blockEditorContent } = dataset; + const content = JSON.parse(blockEditorContent || ''); + + expect(spy).toHaveBeenCalledWith('BLOCK_EDITOR', { + inode, + content, + language: parseInt(language as string), + fieldName, + contentType + }); }); }); diff --git a/core-web/libs/sdk/client/src/lib/editor/utils/traditional-vtl.utils.ts b/core-web/libs/sdk/client/src/lib/editor/utils/traditional-vtl.utils.ts index 3fb2fca6b189..3a44ea37c355 100644 --- a/core-web/libs/sdk/client/src/lib/editor/utils/traditional-vtl.utils.ts +++ b/core-web/libs/sdk/client/src/lib/editor/utils/traditional-vtl.utils.ts @@ -1,35 +1,48 @@ -import { CLIENT_ACTIONS } from '../models/client.model'; +import { initInlineEditing } from '../sdk-editor'; /** * Listen for block editor inline event. - * */ -export const listenBlockEditorInlineEvent = () => { - const listenBlockEditorClick = () => { - const editBlockEditorNodes = document.querySelectorAll('[data-block-editor-content]'); - if (!editBlockEditorNodes.length) { +export const listenBlockEditorInlineEvent = (): void => { + if (document.readyState === 'complete') { + // The page is fully loaded or interactive + listenBlockEditorClick(); + + return; + } + + window.addEventListener('load', () => listenBlockEditorClick()); +}; + +const listenBlockEditorClick = (): void => { + const editBlockEditorNodes: NodeListOf = document.querySelectorAll( + '[data-block-editor-content]' + ); + + if (!editBlockEditorNodes.length) { + return; + } + + editBlockEditorNodes.forEach((node: HTMLElement) => { + const { inode, language = '1', contentType, fieldName, blockEditorContent } = node.dataset; + const content = JSON.parse(blockEditorContent || ''); + + if (!inode || !language || !contentType || !fieldName) { + console.error('Missing data attributes for block editor inline editing.'); + console.warn('inode, language, contentType and fieldName are required.'); + return; } - editBlockEditorNodes.forEach((node) => { - node.classList.add('dotcms__inline-edit-field'); - node.addEventListener('click', () => { - const payload = { ...(node as HTMLElement).dataset }; - window.parent.postMessage( - { - payload, - action: CLIENT_ACTIONS.INIT_BLOCK_EDITOR_INLINE_EDITING - }, - '*' - ); + node.classList.add('dotcms__inline-edit-field'); + node.addEventListener('click', () => { + initInlineEditing('BLOCK_EDITOR', { + inode, + content, + language: parseInt(language), + fieldName, + contentType }); }); - }; - - if (document.readyState === 'complete') { - // The page is fully loaded - listenBlockEditorClick(); - } else { - window.addEventListener('load', () => listenBlockEditorClick()); - } + }); }; diff --git a/core-web/libs/sdk/react/src/lib/components/BlockEditorRenderer/BlockEditorRenderer.spec.tsx b/core-web/libs/sdk/react/src/lib/components/BlockEditorRenderer/BlockEditorRenderer.spec.tsx index 645089ba337a..5e18e561329b 100644 --- a/core-web/libs/sdk/react/src/lib/components/BlockEditorRenderer/BlockEditorRenderer.spec.tsx +++ b/core-web/libs/sdk/react/src/lib/components/BlockEditorRenderer/BlockEditorRenderer.spec.tsx @@ -1,8 +1,11 @@ import '@testing-library/jest-dom'; import { render } from '@testing-library/react'; +import * as client from '@dotcms/client'; + import { BlockEditorRenderer } from './BlockEditorRenderer'; +import { dotcmsContentletMock } from '../../mocks/mockPageContext'; import { Block } from '../../models/blocks.interface'; describe('BlockEditorRenderer', () => { @@ -48,4 +51,45 @@ describe('BlockEditorRenderer', () => { expect(container.firstChild).toHaveClass('test-class'); expect(container.firstChild).toHaveStyle('color: red'); }); + + describe('when the editable prop is true', () => { + beforeEach(() => { + jest.spyOn(client, 'isInsideEditor').mockImplementation(() => true); + }); + + it("should receive the 'editable' prop and render the BlockEditorBlock component", () => { + const { getByText } = render( + + ); + expect(getByText('Hello, World!')).toBeInTheDocument(); + }); + + it('should call `initInlineEditing` when the component is clicked', () => { + const spy = jest.spyOn(client, 'initInlineEditing'); + const { inode, languageId: language, contentType } = dotcmsContentletMock; + const { getByTestId } = render( + + ); + const blockEditorContainer = getByTestId('dot-block-editor-container'); + blockEditorContainer.click(); + expect(blockEditorContainer).toHaveTextContent('Hello, World!'); + expect(spy).toHaveBeenCalledWith('BLOCK_EDITOR', { + inode, + language, + contentType, + content: blocks, + fieldName: 'fieldName' + }); + }); + }); }); diff --git a/core-web/libs/sdk/react/src/lib/components/BlockEditorRenderer/BlockEditorRenderer.tsx b/core-web/libs/sdk/react/src/lib/components/BlockEditorRenderer/BlockEditorRenderer.tsx index 200a34b1eb51..d295eeafe63c 100644 --- a/core-web/libs/sdk/react/src/lib/components/BlockEditorRenderer/BlockEditorRenderer.tsx +++ b/core-web/libs/sdk/react/src/lib/components/BlockEditorRenderer/BlockEditorRenderer.tsx @@ -1,15 +1,34 @@ +import { useEffect, useRef } from 'react'; + +import { initInlineEditing, isInsideEditor } from '@dotcms/client'; + import { BlockEditorBlock } from './item/BlockEditorBlock'; +import { DotCMSContentlet } from '../../models'; import { Block } from '../../models/blocks.interface'; import { CustomRenderer } from '../../models/content-node.interface'; -export interface BlockEditorRendererProps { +interface BaseProps { blocks: Block; customRenderers?: CustomRenderer; className?: string; style?: React.CSSProperties; } +interface EditableProps extends BaseProps { + editable: true; + contentlet: DotCMSContentlet; + fieldName: string; +} + +interface NonEditableProps extends BaseProps { + editable?: false; + contentlet?: never; + fieldName?: never; +} + +type BlockEditorRendererProps = EditableProps | NonEditableProps; + /** * BlockEditorRenderer component for rendering block editor field. * @@ -19,16 +38,57 @@ export interface BlockEditorRendererProps { * @param {CustomRenderer} [props.customRenderers] - Optional custom renderers for specific block types. * @param {string} [props.className] - Optional CSS class name for the container div. * @param {React.CSSProperties} [props.style] - Optional inline styles for the container div. + * @param {boolean} props.editable - Flag to enable inline editing. When true, `contentlet` and `fieldName` are required. Note: Enterprise only feature. + * @param {DotCMSContentlet} [props.contentlet] - Contentlet object for inline editing. Required when `editable` is true. + * @param {string} [props.fieldName] - Field name for inline editing. Required when `editable` is true. * @returns {JSX.Element} A div containing the rendered blocks of content. */ export const BlockEditorRenderer = ({ + style, blocks, - customRenderers, + editable, + fieldName, className, - style + contentlet, + customRenderers }: BlockEditorRendererProps) => { + const ref = useRef(null); + + useEffect(() => { + if (!editable || !ref.current || !isInsideEditor()) { + return; + } + + // TypeScript will throw an error if contentlet or fieldName are not provided when editable is true, + // but we need to check them again to avoid runtime errors in Pure JavaScript + if (!contentlet || !fieldName) { + console.error('contentlet and fieldName are required to enable inline editing'); + + return; + } + + const { inode, languageId: language, contentType } = contentlet; + // `ContentNode` lives on `@dotcms/react` that's why we can use it in `@dotcms/client` + // We need to move interfaces to external lib + const content = blocks as unknown as Record; + const element = ref.current; + const handleClickEvent = () => { + initInlineEditing('BLOCK_EDITOR', { + inode, + content, + language, + fieldName, + contentType + }); + }; + + element.addEventListener('click', handleClickEvent); + + return () => element.removeEventListener('click', handleClickEvent); + }, [editable, contentlet, blocks, fieldName]); + return ( -
+
); diff --git a/core-web/libs/ui/src/lib/components/dot-ai-image-prompt/ai-image-prompt.store.ts b/core-web/libs/ui/src/lib/components/dot-ai-image-prompt/ai-image-prompt.store.ts new file mode 100644 index 000000000000..2d84872bb999 --- /dev/null +++ b/core-web/libs/ui/src/lib/components/dot-ai-image-prompt/ai-image-prompt.store.ts @@ -0,0 +1,207 @@ +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; +import { Observable, of } from 'rxjs'; + +import { Injectable } from '@angular/core'; + +import { switchMap, withLatestFrom } from 'rxjs/operators'; + +import { DotAiService } from '@dotcms/data-access'; +import { + ComponentStatus, + AIImagePrompt, + DotAIImageContent, + DotAIImageOrientation, + DotGeneratedAIImage, + PromptType +} from '@dotcms/dotcms-models'; + +const DEFAULT_INPUT_PROMPT = PromptType.INPUT; + +export interface DotAiImagePromptComponentState { + showDialog: boolean; + editorContent: string | null; + images: DotGeneratedAIImage[]; + status: ComponentStatus; + selectedImage: DotGeneratedAIImage | null; + galleryActiveIndex: number; + formValue: AIImagePrompt; +} + +export interface VmAiImagePrompt { + showDialog: boolean; + status: ComponentStatus; + images: DotGeneratedAIImage[]; + galleryActiveIndex: number; + isLoading: boolean; + formValue: AIImagePrompt; + hasEditorContent: boolean; +} + +const initialState: DotAiImagePromptComponentState = { + showDialog: false, + status: ComponentStatus.INIT, + images: [], + editorContent: null, + selectedImage: null, + galleryActiveIndex: 0, + formValue: { + text: '', + type: DEFAULT_INPUT_PROMPT, + size: DotAIImageOrientation.HORIZONTAL + } +}; + +@Injectable({ providedIn: 'root' }) +export class DotAiImagePromptStore extends ComponentStore { + //Selectors + readonly isOpenDialog$ = this.select(this.state$, ({ showDialog }) => showDialog); + readonly isLoading$ = this.select( + this.state$, + ({ status }) => status === ComponentStatus.LOADING + ); + + readonly selectedImage$ = this.select(this.state$, ({ selectedImage }) => selectedImage); + + //Updaters + + readonly showDialog = this.updater((state, editorContent: string) => { + return { + ...state, + showDialog: true, + selectedPromptType: DEFAULT_INPUT_PROMPT, + editorContent + }; + }); + + readonly cleanError = this.updater((state) => ({ + ...state, + error: '' + })); + + readonly setFormValue = this.updater( + (state: DotAiImagePromptComponentState, formValue: AIImagePrompt) => ({ + ...state, + formValue + }) + ); + + readonly setSelectedImage = this.updater( + (state: DotAiImagePromptComponentState, selectedImage: DotGeneratedAIImage) => ({ + ...state, + selectedImage + }) + ); + + readonly setGalleryActiveIndex = this.updater( + (state: DotAiImagePromptComponentState, galleryActiveIndex: number) => ({ + ...state, + galleryActiveIndex + }) + ); + + readonly hideDialog = this.updater(() => ({ + ...initialState + })); + + readonly vm$: Observable = this.select( + this.state$, + this.isLoading$, + ( + { showDialog, status, images, galleryActiveIndex, formValue, editorContent }, + isLoading + ) => ({ + showDialog, + status, + images, + galleryActiveIndex, + formValue, + isLoading, + hasEditorContent: !!editorContent + }) + ); + + // Effects + + /** + * The `generateImage` variable is a function that generates an image based on a given prompt. + * + * @param {Observable} prompt$ - An observable representing the prompt. + * @returns {Observable} - An observable that emits the generated image. + */ + readonly generateImage = this.effect((trigger$: Observable) => { + return trigger$.pipe( + withLatestFrom(this.state$), + switchMap(([_, { editorContent, formValue, images, galleryActiveIndex }]) => { + const isImageWithError = !!images[galleryActiveIndex]?.error; + const imagesArray = [...images]; + const cleanPrompt = formValue.text?.trim() ?? ''; + const finalPrompt = + formValue.type === PromptType.AUTO && editorContent + ? `illustrate the following content: ${editorContent}` + : cleanPrompt; + + this.patchState({ + status: ComponentStatus.LOADING + }); + + return this.dotAiService.generateAndPublishImage(finalPrompt, formValue.size).pipe( + tapResponse( + (response) => { + this.updateImageState( + response, + formValue, + isImageWithError, + imagesArray, + galleryActiveIndex + ); + }, + (error: string) => { + this.updateImageState( + null, + formValue, + isImageWithError, + imagesArray, + galleryActiveIndex, + error + ); + + return of(null); + } + ) + ); + }) + ); + }); + + private updateImageState( + response: DotAIImageContent, + formValue: AIImagePrompt, + isImageWithError: boolean, + imagesArray: DotGeneratedAIImage[], + galleryActiveIndex: number, + error?: string + ) { + const newImage: DotGeneratedAIImage = { + request: formValue, + response: response, + error: error + }; + + if (isImageWithError) { + imagesArray[galleryActiveIndex] = newImage; + } else { + imagesArray.push(newImage); + } + + this.patchState({ + status: ComponentStatus.IDLE, + images: imagesArray, + galleryActiveIndex: isImageWithError ? galleryActiveIndex : imagesArray.length - 1 + }); + } + + constructor(private dotAiService: DotAiService) { + super(initialState); + } +} diff --git a/core-web/libs/ui/src/lib/components/dot-ai-image-prompt/store/ai-image-prompt.store.ts b/core-web/libs/ui/src/lib/components/dot-ai-image-prompt/store/ai-image-prompt.store.ts index 06f4fb59e0f2..bea4cb0dfcef 100644 --- a/core-web/libs/ui/src/lib/components/dot-ai-image-prompt/store/ai-image-prompt.store.ts +++ b/core-web/libs/ui/src/lib/components/dot-ai-image-prompt/store/ai-image-prompt.store.ts @@ -39,6 +39,7 @@ const initialState: AiImagePromptdState = { }; export const DotAiImagePromptStore = signalStore( + { protectedState: false }, // TODO: remove when the unit tests are fixed withState(initialState), withComputed(({ status, context, images, galleryActiveIndex }) => ({ isLoading: computed(() => { diff --git a/core-web/libs/ui/src/lib/components/dot-asset-search/store/dot-asset-search.store.ts b/core-web/libs/ui/src/lib/components/dot-asset-search/store/dot-asset-search.store.ts index 4c6cf60c368a..6ed3bad3d4a6 100644 --- a/core-web/libs/ui/src/lib/components/dot-asset-search/store/dot-asset-search.store.ts +++ b/core-web/libs/ui/src/lib/components/dot-asset-search/store/dot-asset-search.store.ts @@ -1,4 +1,5 @@ -import { ComponentStore, tapResponse } from '@ngrx/component-store'; +import { ComponentStore } from '@ngrx/component-store'; +import { tapResponse } from '@ngrx/operators'; import { Injectable } from '@angular/core'; diff --git a/core-web/package.json b/core-web/package.json index 7872f940db08..cac97fd70c9f 100644 --- a/core-web/package.json +++ b/core-web/package.json @@ -68,9 +68,9 @@ "@material/mwc-formfield": "^0.20.0", "@material/mwc-icon-button": "^0.20.0", "@material/mwc-menu": "^0.20.0", - "@ngrx/component-store": "17.0.1", - "@ngrx/operators": "^17.2.0", - "@ngrx/signals": "^17.2.0", + "@ngrx/component-store": "^18.0.2", + "@ngrx/operators": "^18.0.2", + "@ngrx/signals": "^18.0.2", "@nx/angular": "19.6.5", "@storybook/addon-interactions": "^8.2.8", "@tarekraafat/autocomplete.js": "^10.2.6", @@ -230,7 +230,7 @@ "jest-fetch-mock": "^3.0.3", "jest-html-reporters": "^3.1.5", "jest-junit": "^16.0.0", - "jest-preset-angular": "14.0.4", + "jest-preset-angular": "14.2.4", "jsonc-eslint-parser": "^2.4.0", "karma": "6.4.0", "karma-chrome-launcher": "^3.1.0", diff --git a/core-web/yarn.lock b/core-web/yarn.lock index 5a303d59070f..966bdeb48c5f 100644 --- a/core-web/yarn.lock +++ b/core-web/yarn.lock @@ -3443,32 +3443,32 @@ replace-in-file "6.2.0" tslib "^2.6.2" -"@ngrx/component-store@17.0.1": - version "17.0.1" - resolved "https://registry.yarnpkg.com/@ngrx/component-store/-/component-store-17.0.1.tgz#de84dab7c3595329378ca46b2b82595d6406e87e" - integrity sha512-6A7IXzZHAdFadcCILbljNQzrVMwOlx1opdCV/91h3S3ttY7HrPuatyZJyjau8dSf1ANjnAm1kcoof8lZfwhaHg== +"@ngrx/component-store@^18.0.2": + version "18.0.2" + resolved "https://registry.npmjs.org/@ngrx/component-store/-/component-store-18.0.2.tgz#fcbdc27439267cdcb6f1fbdb89a495d353c8d1ad" + integrity sha512-IB7ZKFqjDt4duQbfYqXxAOKf9Si9O1HFodqbNCSgi7gnovK/frf/H429a+lYOyItPcpno3ECom6/1k8pE8fWlg== dependencies: - "@ngrx/operators" "17.0.0-beta.0" + "@ngrx/operators" "18.0.1" tslib "^2.0.0" -"@ngrx/operators@17.0.0-beta.0": - version "17.0.0-beta.0" - resolved "https://registry.yarnpkg.com/@ngrx/operators/-/operators-17.0.0-beta.0.tgz#030486f3a610fa919d2b155aad3bc7b4c708550d" - integrity sha512-EbO8AONuQ6zo2v/mPyBOi4y0CTAp1x4Z+bx7ZF+Pd8BL5ma53BTCL1TmzaeK5zPUe0yApudLk9/ZbHXPnVox5A== +"@ngrx/operators@18.0.1": + version "18.0.1" + resolved "https://registry.npmjs.org/@ngrx/operators/-/operators-18.0.1.tgz#fd127dce1bccb27824b77149fbb4f8b56d2ad8a9" + integrity sha512-M+QMrHNKgcuiLaRGZxJ4aQi5/OCRfKC4+T/63dsHyLFZ53/FFpF6a/ytSO1Q+tzOplZ5o99S+i8FVaZqNQ3LmQ== dependencies: tslib "^2.3.0" -"@ngrx/operators@^17.2.0": - version "17.2.0" - resolved "https://registry.yarnpkg.com/@ngrx/operators/-/operators-17.2.0.tgz#aa449cbd8565b50353715c568ba38488d4495069" - integrity sha512-W7SrGK4VQSJlCtMrkxNChVBDgJGSCdZ4yLBi80xoE9CmhTMMhu9J+8BbDDhZ+PPbTHylKJobkwHq+tJ8mkf4eQ== +"@ngrx/operators@^18.0.2": + version "18.0.2" + resolved "https://registry.npmjs.org/@ngrx/operators/-/operators-18.0.2.tgz#d56532ed750901418ad6e55c0719bfb11a55fa27" + integrity sha512-4dyNkVKBw9ZqECMJu6bT2t21p3ANaMC+ZkcfiBfv5OUEFtB9HhN5uCem9tcgYeNBK8XQFA7/1tzd1T3KaiBY8A== dependencies: tslib "^2.3.0" -"@ngrx/signals@^17.2.0": - version "17.2.0" - resolved "https://registry.yarnpkg.com/@ngrx/signals/-/signals-17.2.0.tgz#30d2e75cf3786111356115bf3cdb10e81517ac23" - integrity sha512-tkkxifeOVPOhpTqbHyK1WOx4qz49HLR/h0vhaa/MRGRIZoOR/6gR4KB3hbC8FD3FdnuNqOgOZ2lGsTfWPB/6BQ== +"@ngrx/signals@^18.0.2": + version "18.0.2" + resolved "https://registry.npmjs.org/@ngrx/signals/-/signals-18.0.2.tgz#9684da0f3ba6db656c281b0d71dc5e15e5d78098" + integrity sha512-FXmcY2cmkbhZtg9k8Ntq69SyelGmmb6fWtdButH4T8GGFH0o3f1FZTR829j4ynphy8SzuDhD/pzrnpWcV481oQ== dependencies: tslib "^2.3.0" @@ -13598,10 +13598,10 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== -jest-preset-angular@14.0.4: - version "14.0.4" - resolved "https://registry.yarnpkg.com/jest-preset-angular/-/jest-preset-angular-14.0.4.tgz#4745033c58c86ad3d8dd16450d67563703285bd5" - integrity sha512-O4WhVRdfiN9TtJMbJbuVJxD3zn6fyOF2Pqvu12fvEVR6FxCN1S1POfR2nU1fRdP+rQZv7iiW+ttxsy+qkE8iCw== +jest-preset-angular@14.2.4: + version "14.2.4" + resolved "https://registry.npmjs.org/jest-preset-angular/-/jest-preset-angular-14.2.4.tgz#bb932b4a73f0204a20a4bf8d477224f57918a1a3" + integrity sha512-xyhkaiBdn3keBgxxkcbqZu/my3ADU9NcDrz6DaMuGRaxz/bf6ZC1qxZ1eQuz5V1WuA3/rD64VA3Kke8P6E9qNg== dependencies: bs-logger "^0.2.6" esbuild-wasm ">=0.15.13" diff --git a/dotCMS/src/main/java/com/dotcms/ai/app/AIModels.java b/dotCMS/src/main/java/com/dotcms/ai/app/AIModels.java index 5e51779b1136..6047cd63ba44 100644 --- a/dotCMS/src/main/java/com/dotcms/ai/app/AIModels.java +++ b/dotCMS/src/main/java/com/dotcms/ai/app/AIModels.java @@ -39,9 +39,7 @@ public class AIModels { private static final String SUPPORTED_MODELS_KEY = "supportedModels"; private static final String AI_MODELS_FETCH_ATTEMPTS_KEY = "ai.models.fetch.attempts"; - private static final int AI_MODELS_FETCH_ATTEMPTS = Config.getIntProperty(AI_MODELS_FETCH_ATTEMPTS_KEY, 3); private static final String AI_MODELS_FETCH_TIMEOUT_KEY = "ai.models.fetch.timeout"; - private static final int AI_MODELS_FETCH_TIMEOUT = Config.getIntProperty(AI_MODELS_FETCH_TIMEOUT_KEY, 4000); private static final String AI_MODELS_API_URL_KEY = "AI_MODELS_API_URL"; private static final String AI_MODELS_API_URL_DEFAULT = "https://api.openai.com/v1/models"; private static final String AI_MODELS_API_URL = Config.getStringProperty( @@ -60,11 +58,12 @@ public static AIModels get() { } private static CircuitBreakerUrl.Response fetchOpenAIModels(final AppConfig appConfig) { + final String aiModelsApiUrl = Config.getStringProperty(AI_MODELS_API_URL_KEY, AI_MODELS_API_URL_DEFAULT); final CircuitBreakerUrl.Response response = CircuitBreakerUrl.builder() .setMethod(CircuitBreakerUrl.Method.GET) - .setUrl(AI_MODELS_API_URL) - .setTimeout(AI_MODELS_FETCH_TIMEOUT) - .setTryAgainAttempts(AI_MODELS_FETCH_ATTEMPTS) + .setUrl(aiModelsApiUrl) + .setTimeout(Config.getIntProperty(AI_MODELS_FETCH_TIMEOUT_KEY, 4000)) + .setTryAgainAttempts(Config.getIntProperty(AI_MODELS_FETCH_ATTEMPTS_KEY, 3)) .setHeaders(CircuitBreakerUrl.authHeaders("Bearer " + appConfig.getApiKey())) .setThrowWhenNot2xx(true) .build() @@ -75,7 +74,7 @@ private static CircuitBreakerUrl.Response fetchOpenAIModels(final AIModels.class, () -> String.format( "Error fetching OpenAI supported models from [%s] (status code: [%d])", - AI_MODELS_API_URL, + aiModelsApiUrl, response.getStatusCode())); throw new DotRuntimeException("Error fetching OpenAI supported models"); } diff --git a/dotCMS/src/main/java/com/dotcms/ai/db/PgVectorDataSource.java b/dotCMS/src/main/java/com/dotcms/ai/db/PgVectorDataSource.java index 67620d510c66..e23a923ab1ee 100644 --- a/dotCMS/src/main/java/com/dotcms/ai/db/PgVectorDataSource.java +++ b/dotCMS/src/main/java/com/dotcms/ai/db/PgVectorDataSource.java @@ -14,18 +14,26 @@ */ class PgVectorDataSource { + private static final String AI_DB_BASE_URL_KEY = "AI_DB_BASE_URL"; + private static final String AI_DB_USERNAME_KEY = "AI_DB_USERNAME"; + private static final String AI_DB_PASSWORD_KEY = "AI_DB_PASSWORD"; + private static final String AI_DB_MAX_TOTAL_KEY = "AI_DB_MAX_TOTAL"; + /** * returns the configured datasource */ public static final Lazy datasource = Lazy.of(PgVectorDataSource::resolveDataSource); + private PgVectorDataSource() { + } + /** * Checks if a specific AI datasource is provided, if not, returns the standard dotCMS datasource * * @return */ private static DataSource resolveDataSource() { - if (UtilMethods.isEmpty(Config.getStringProperty("AI_DB_BASE_URL", null))) { + if (UtilMethods.isEmpty(Config.getStringProperty(AI_DB_BASE_URL_KEY, null))) { return DbConnectionFactory.getDataSource(); } @@ -38,10 +46,10 @@ private static DataSource resolveDataSource() { * @return */ private static DataSource internalDatasource() { - final String userName = Config.getStringProperty("AI_DB_USERNAME"); - final String password = Config.getStringProperty("AI_DB_PASSWORD"); - final String dbUrl = Config.getStringProperty("AI_DB_BASE_URL"); - final int maxConnections = Config.getIntProperty("AI_DB_MAX_TOTAL", 50); + final String userName = Config.getStringProperty(AI_DB_USERNAME_KEY, null); + final String password = Config.getStringProperty(AI_DB_PASSWORD_KEY, null); + final String dbUrl = Config.getStringProperty(AI_DB_BASE_URL_KEY, null); + final int maxConnections = Config.getIntProperty(AI_DB_MAX_TOTAL_KEY, 50); final HikariConfig config = new HikariConfig(); config.setUsername(userName); diff --git a/dotCMS/src/main/java/com/dotcms/analytics/AnalyticsAPI.java b/dotCMS/src/main/java/com/dotcms/analytics/AnalyticsAPI.java index a9e5646d1144..f2f9c7c9ebc8 100644 --- a/dotCMS/src/main/java/com/dotcms/analytics/AnalyticsAPI.java +++ b/dotCMS/src/main/java/com/dotcms/analytics/AnalyticsAPI.java @@ -7,10 +7,8 @@ import com.dotcms.analytics.model.TokenStatus; import com.dotcms.exception.AnalyticsException; import com.dotmarketing.beans.Host; -import com.dotmarketing.util.Config; import java.time.Instant; -import java.util.concurrent.TimeUnit; /** * Analytics functionality interface. @@ -19,30 +17,15 @@ */ public interface AnalyticsAPI { - String ANALYTICS_USE_DUMMY_TOKEN_KEY = "analytics.use.dummy.token"; String ANALYTICS_IDP_URL_KEY = "analytics.idp.url"; + String ANALYTICS_USE_DUMMY_TOKEN_KEY = "analytics.use.dummy.token"; String ANALYTICS_ACCESS_TOKEN_KEY_PREFIX = "ANALYTICS_ACCESS_TOKEN"; - String ANALYTICS_ACCESS_TOKEN_TTL_KEY = "analytics.accesstoken.ttl"; - int ANALYTICS_ACCESS_TOKEN_TTL = Config.getIntProperty( - ANALYTICS_ACCESS_TOKEN_TTL_KEY, - (int) TimeUnit.HOURS.toSeconds(1)); - String ANALYTICS_ACCESS_TOKEN_TTL_WINDOW_KEY = "analytics.accesstoken.ttlwindow"; - int ANALYTICS_ACCESS_TOKEN_TTL_WINDOW = Config.getIntProperty( - ANALYTICS_ACCESS_TOKEN_TTL_WINDOW_KEY, - (int) TimeUnit.MINUTES.toSeconds(1)); - String ANALYTICS_ACCESS_TOKEN_RENEW_ATTEMPTS_KEY = "analytics.accesstoken.renewattempts"; - int ANALYTICS_ACCESS_TOKEN_RENEW_ATTEMPTS = Config.getIntProperty(ANALYTICS_ACCESS_TOKEN_RENEW_ATTEMPTS_KEY, 3); String ANALYTICS_ACCESS_TOKEN_RENEW_TIMEOUT_KEY = "analytics.accesstoken.renewtimeout"; - int ANALYTICS_ACCESS_TOKEN_RENEW_TIMEOUT = Config.getIntProperty(ANALYTICS_ACCESS_TOKEN_RENEW_TIMEOUT_KEY, 4000); - String ANALYTICS_KEY_RENEW_ATTEMPTS_KEY = "analytics.key.renewattempts"; - int ANALYTICS_KEY_RENEW_ATTEMPTS = Config.getIntProperty(ANALYTICS_KEY_RENEW_ATTEMPTS_KEY, 3); String ANALYTICS_KEY_RENEW_TIMEOUT_KEY = "analytics.key.renewtimeout"; - int ANALYTICS_KEY_RENEW_TIMEOUT = Config.getIntProperty(ANALYTICS_KEY_RENEW_TIMEOUT_KEY, 4000); - String ANALYTICS_ACCESS_TOKEN_THREAD_NAME = "access-token-renew"; AccessToken DUMMY_TOKEN = AccessToken.builder() diff --git a/dotCMS/src/main/java/com/dotcms/analytics/AnalyticsAPIImpl.java b/dotCMS/src/main/java/com/dotcms/analytics/AnalyticsAPIImpl.java index 62cbdc3f5f99..54f03457cfef 100644 --- a/dotCMS/src/main/java/com/dotcms/analytics/AnalyticsAPIImpl.java +++ b/dotCMS/src/main/java/com/dotcms/analytics/AnalyticsAPIImpl.java @@ -40,16 +40,10 @@ */ public class AnalyticsAPIImpl implements AnalyticsAPI { - private final String analyticsIdpUrl; private final boolean useDummyToken; - public AnalyticsAPIImpl(final String analyticsIdpUrl) { - this.analyticsIdpUrl = analyticsIdpUrl; - useDummyToken = Config.getBooleanProperty(ANALYTICS_USE_DUMMY_TOKEN_KEY, false); - } - public AnalyticsAPIImpl() { - this(Config.getStringProperty(ANALYTICS_IDP_URL_KEY, null)); + useDummyToken = Config.getBooleanProperty(ANALYTICS_USE_DUMMY_TOKEN_KEY, false); } /** @@ -125,6 +119,7 @@ public AccessToken refreshAccessToken(final AnalyticsApp analyticsApp) throws An throw new UnrecoverableAnalyticsException(e.getMessage(), e); } + final String analyticsIdpUrl = Config.getStringProperty(ANALYTICS_IDP_URL_KEY, null); try { final CircuitBreakerUrl.Response response = requestAccessToken(analyticsApp); @@ -241,7 +236,7 @@ private AccessToken resolveAccessToken(final AnalyticsApp analyticsApp, throw new AnalyticsException(String.format( "ACCESS_TOKEN could not be fetched for clientId %s from %s", analyticsApp.getAnalyticsProperties().clientId(), - analyticsIdpUrl)); + Config.getStringProperty(ANALYTICS_IDP_URL_KEY, null))); } final TokenStatus tokenStatus = AnalyticsHelper.get().resolveTokenStatus(accessToken); @@ -256,7 +251,10 @@ private AccessToken resolveAccessToken(final AnalyticsApp analyticsApp, * Validates by evaluating that analytics IDP url is not empty, otherwise throw an exception. */ private void validateAnalytics() { - Preconditions.checkNotEmpty(analyticsIdpUrl, DotStateException.class, "Analytics IDP url is missing"); + Preconditions.checkNotEmpty( + Config.getStringProperty(ANALYTICS_IDP_URL_KEY, null), + DotStateException.class, + "Analytics IDP url is missing"); } /** @@ -288,7 +286,7 @@ private void logTokenResponse(final CircuitBreakerUrl.Response resp String.format( "Error requesting ACCESS_TOKEN with clientId %s from IDP server %s (response: %s)", analyticsApp.getAnalyticsProperties().clientId(), - analyticsIdpUrl, + Config.getStringProperty(ANALYTICS_IDP_URL_KEY, null), response.getStatusCode())); } @@ -312,9 +310,9 @@ private Map accessTokenHeaders() { private CircuitBreakerUrl.Response requestAccessToken(final AnalyticsApp analyticsApp) { final CircuitBreakerUrl.Response response = CircuitBreakerUrl.builder() .setMethod(CircuitBreakerUrl.Method.POST) - .setUrl(analyticsIdpUrl) - .setTimeout(ANALYTICS_ACCESS_TOKEN_RENEW_TIMEOUT) - .setTryAgainAttempts(ANALYTICS_ACCESS_TOKEN_RENEW_ATTEMPTS) + .setUrl(Config.getStringProperty(ANALYTICS_IDP_URL_KEY, null)) + .setTimeout(Config.getLongProperty(ANALYTICS_ACCESS_TOKEN_RENEW_TIMEOUT_KEY, 4000L)) + .setTryAgainAttempts(Config.getIntProperty(ANALYTICS_ACCESS_TOKEN_RENEW_ATTEMPTS_KEY, 3)) .setHeaders(accessTokenHeaders()) .setRawData(prepareRequestData(analyticsApp)) .setThrowWhenNot2xx(false) @@ -365,8 +363,8 @@ private CircuitBreakerUrl.Response requestAnalyticsKey(final Analy final CircuitBreakerUrl.Response response = CircuitBreakerUrl.builder() .setMethod(CircuitBreakerUrl.Method.GET) .setUrl(analyticsApp.getAnalyticsProperties().analyticsConfigUrl()) - .setTimeout(ANALYTICS_KEY_RENEW_TIMEOUT) - .setTryAgainAttempts(ANALYTICS_KEY_RENEW_ATTEMPTS) + .setTimeout(Config.getLongProperty(ANALYTICS_KEY_RENEW_TIMEOUT_KEY, 4000L)) + .setTryAgainAttempts(Config.getIntProperty(ANALYTICS_KEY_RENEW_ATTEMPTS_KEY, 3)) .setHeaders(analyticsKeyHeaders(accessToken)) .setThrowWhenNot2xx(false) .build() diff --git a/dotCMS/src/main/java/com/dotcms/analytics/bayesian/BayesianAPIImpl.java b/dotCMS/src/main/java/com/dotcms/analytics/bayesian/BayesianAPIImpl.java index 825beafc6d4b..afde56aded96 100644 --- a/dotCMS/src/main/java/com/dotcms/analytics/bayesian/BayesianAPIImpl.java +++ b/dotCMS/src/main/java/com/dotcms/analytics/bayesian/BayesianAPIImpl.java @@ -8,7 +8,6 @@ import com.dotmarketing.util.Logger; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import io.vavr.Lazy; import org.apache.commons.math3.distribution.BetaDistribution; import org.apache.commons.math3.stat.descriptive.SummaryStatistics; @@ -27,9 +26,6 @@ */ public class BayesianAPIImpl implements BayesianAPI { - private final Lazy betaDistSamples = - Lazy.of(() -> Config.getIntProperty("BETA_DISTRIBUTION_SAMPLE_SIZE", 1000)); - /** * {@inheritDoc} */ @@ -705,7 +701,7 @@ private boolean includeBetaSamples() { * @return sample size */ private int resolveSampleSize() { - return betaDistSamples.get(); + return Config.getIntProperty("BETA_DISTRIBUTION_SAMPLE_SIZE", 1000); } /** diff --git a/dotCMS/src/main/java/com/dotcms/analytics/helper/AnalyticsHelper.java b/dotCMS/src/main/java/com/dotcms/analytics/helper/AnalyticsHelper.java index c62d3add78e4..1cc974af3b6a 100644 --- a/dotCMS/src/main/java/com/dotcms/analytics/helper/AnalyticsHelper.java +++ b/dotCMS/src/main/java/com/dotcms/analytics/helper/AnalyticsHelper.java @@ -16,6 +16,7 @@ import com.dotmarketing.business.web.WebAPILocator; import com.dotmarketing.exception.DotDataException; import com.dotmarketing.exception.DotSecurityException; +import com.dotmarketing.util.Config; import com.dotmarketing.util.Logger; import com.liferay.portal.language.LanguageUtil; import com.liferay.portal.model.User; @@ -32,6 +33,7 @@ import java.util.List; import java.util.Objects; import java.util.Optional; +import java.util.concurrent.TimeUnit; import java.util.function.BiPredicate; /** @@ -82,7 +84,10 @@ private boolean filterIssueDate(final AccessToken accessToken, final BiPredicate return Optional.ofNullable(accessToken.issueDate()) .map(issuedAt -> { final Instant now = Instant.now(); - final Instant expireDate = issuedAt.plusSeconds(AnalyticsAPI.ANALYTICS_ACCESS_TOKEN_TTL); + final int accessTokenTtl = Config.getIntProperty( + AnalyticsAPI.ANALYTICS_ACCESS_TOKEN_TTL_KEY, + (int) TimeUnit.HOURS.toSeconds(1)); + final Instant expireDate = issuedAt.plusSeconds(accessTokenTtl); return now.isBefore(expireDate) && (filter == null || filter.test(now, expireDate)); }) .orElseGet(() -> { @@ -110,7 +115,11 @@ public boolean hasTokenExpired(final AccessToken accessToken) { public boolean isTokenInWindow(final AccessToken accessToken) { return filterIssueDate( accessToken, - (now, expireDate) -> now.isAfter(expireDate.minusSeconds(AnalyticsAPI.ANALYTICS_ACCESS_TOKEN_TTL_WINDOW))); + (now, expireDate) -> now.isAfter( + expireDate.minusSeconds( + Config.getLongProperty( + AnalyticsAPI.ANALYTICS_ACCESS_TOKEN_TTL_WINDOW_KEY, + TimeUnit.MINUTES.toSeconds(1))))); } /** diff --git a/dotCMS/src/main/java/com/dotcms/analytics/track/AnalyticsTrackWebInterceptor.java b/dotCMS/src/main/java/com/dotcms/analytics/track/AnalyticsTrackWebInterceptor.java index e6e6af6559fa..607da53204e8 100644 --- a/dotCMS/src/main/java/com/dotcms/analytics/track/AnalyticsTrackWebInterceptor.java +++ b/dotCMS/src/main/java/com/dotcms/analytics/track/AnalyticsTrackWebInterceptor.java @@ -59,7 +59,7 @@ public AnalyticsTrackWebInterceptor() { .addBlackPatterns(CollectionsUtils.concat(Config.getStringArrayProperty( // except this "ANALYTICS_BLACKLISTED_KEYS", new String[]{}), DEFAULT_BLACKLISTED_PROPS)).build(), new AtomicBoolean(Config.getBooleanProperty(ANALYTICS_TURNED_ON_KEY, true)), - ()->APILocator.systemUser(), + APILocator::systemUser, new PagesAndUrlMapsRequestMatcher(), new FilesRequestMatcher(), // new RulesRedirectsRequestMatcher(), diff --git a/dotCMS/src/main/java/com/dotcms/visitor/domain/Visitor.java b/dotCMS/src/main/java/com/dotcms/visitor/domain/Visitor.java index a7a26f99357d..839c8965b98e 100644 --- a/dotCMS/src/main/java/com/dotcms/visitor/domain/Visitor.java +++ b/dotCMS/src/main/java/com/dotcms/visitor/domain/Visitor.java @@ -364,7 +364,8 @@ public String toString() { ", ipAddress=" + ipAddress + ", selectedLanguage=" + selectedLanguage + ", locale=" + locale + - ", persona=" + possiblePersonas + + ", persona=" + lastPersona + + ", possiblePersonas=" + possiblePersonas + ", accruedTags=" + _accruedTags + ", userAgent=" + userAgent + ", device=" + getDevice() + diff --git a/dotCMS/src/main/webapp/html/dotcms-block-editor.js b/dotCMS/src/main/webapp/html/dotcms-block-editor.js new file mode 100644 index 000000000000..7ae23baf0529 --- /dev/null +++ b/dotCMS/src/main/webapp/html/dotcms-block-editor.js @@ -0,0 +1,345 @@ +var runtime=function(c){"use strict";var M=Object.prototype,p=M.hasOwnProperty,w=Object.defineProperty||function(r,t,e){r[t]=e.value},l,O=typeof Symbol=="function"?Symbol:{},L=O.iterator||"@@iterator",z=O.asyncIterator||"@@asyncIterator",_=O.toStringTag||"@@toStringTag";function v(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{v({},"")}catch{v=function(t,e,o){return t[e]=o}}function R(r,t,e,o){var n=t&&t.prototype instanceof j?t:j,i=Object.create(n.prototype),a=new I(o||[]);return w(i,"_invoke",{value:H(r,e,a)}),i}c.wrap=R;function k(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(o){return{type:"throw",arg:o}}}var Y="suspendedStart",B="suspendedYield",q="executing",b="completed",s={};function j(){}function S(){}function d(){}var N={};v(N,L,function(){return this});var T=Object.getPrototypeOf,E=T&&T(T(A([])));E&&E!==M&&p.call(E,L)&&(N=E);var g=d.prototype=j.prototype=Object.create(N);S.prototype=d,w(g,"constructor",{value:d,configurable:!0}),w(d,"constructor",{value:S,configurable:!0}),S.displayName=v(d,_,"GeneratorFunction");function D(r){["next","throw","return"].forEach(function(t){v(r,t,function(e){return this._invoke(t,e)})})}c.isGeneratorFunction=function(r){var t=typeof r=="function"&&r.constructor;return t?t===S||(t.displayName||t.name)==="GeneratorFunction":!1},c.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,d):(r.__proto__=d,v(r,_,"GeneratorFunction")),r.prototype=Object.create(g),r},c.awrap=function(r){return{__await:r}};function G(r,t){function e(i,a,u,h){var f=k(r[i],r,a);if(f.type==="throw")h(f.arg);else{var C=f.arg,m=C.value;return m&&typeof m=="object"&&p.call(m,"__await")?t.resolve(m.__await).then(function(y){e("next",y,u,h)},function(y){e("throw",y,u,h)}):t.resolve(m).then(function(y){C.value=y,u(C)},function(y){return e("throw",y,u,h)})}}var o;function n(i,a){function u(){return new t(function(h,f){e(i,a,h,f)})}return o=o?o.then(u,u):u()}w(this,"_invoke",{value:n})}D(G.prototype),v(G.prototype,z,function(){return this}),c.AsyncIterator=G,c.async=function(r,t,e,o,n){n===void 0&&(n=Promise);var i=new G(R(r,t,e,o),n);return c.isGeneratorFunction(t)?i:i.next().then(function(a){return a.done?a.value:i.next()})};function H(r,t,e){var o=Y;return function(i,a){if(o===q)throw new Error("Generator is already running");if(o===b){if(i==="throw")throw a;return $()}for(e.method=i,e.arg=a;;){var u=e.delegate;if(u){var h=W(u,e);if(h){if(h===s)continue;return h}}if(e.method==="next")e.sent=e._sent=e.arg;else if(e.method==="throw"){if(o===Y)throw o=b,e.arg;e.dispatchException(e.arg)}else e.method==="return"&&e.abrupt("return",e.arg);o=q;var f=k(r,t,e);if(f.type==="normal"){if(o=e.done?b:B,f.arg===s)continue;return{value:f.arg,done:e.done}}else f.type==="throw"&&(o=b,e.method="throw",e.arg=f.arg)}}}function W(r,t){var e=t.method,o=r.iterator[e];if(o===l)return t.delegate=null,e==="throw"&&r.iterator.return&&(t.method="return",t.arg=l,W(r,t),t.method==="throw")||e!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+e+"' method")),s;var n=k(o,r.iterator,t.arg);if(n.type==="throw")return t.method="throw",t.arg=n.arg,t.delegate=null,s;var i=n.arg;if(!i)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s;if(i.done)t[r.resultName]=i.value,t.next=r.nextLoc,t.method!=="return"&&(t.method="next",t.arg=l);else return i;return t.delegate=null,s}D(g),v(g,_,"Generator"),v(g,L,function(){return this}),v(g,"toString",function(){return"[object Generator]"});function J(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function P(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(J,this),this.reset(!0)}c.keys=function(r){var t=Object(r),e=[];for(var o in t)e.push(o);return e.reverse(),function n(){for(;e.length;){var i=e.pop();if(i in t)return n.value=i,n.done=!1,n}return n.done=!0,n}};function A(r){if(r){var t=r[L];if(t)return t.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var e=-1,o=function n(){for(;++e=0;--o){var n=this.tryEntries[o],i=n.completion;if(n.tryLoc==="root")return e("end");if(n.tryLoc<=this.prev){var a=p.call(n,"catchLoc"),u=p.call(n,"finallyLoc");if(a&&u){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&p.call(o,"finallyLoc")&&this.prev=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===r)return this.complete(e.completion,e.afterLoc),P(e),s}},catch:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===r){var o=e.completion;if(o.type==="throw"){var n=o.arg;P(e)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,e){return this.delegate={iterator:A(r),resultName:t,nextLoc:e},this.method==="next"&&(this.arg=l),s}},c}(typeof module=="object"?module.exports:{});try{regeneratorRuntime=runtime}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)} +(function(e){let r=e.performance;function c(G){r&&r.mark&&r.mark(G)}function s(G,g){r&&r.measure&&r.measure(G,g)}c("Zone");let l=e.__Zone_symbol_prefix||"__zone_symbol__";function d(G){return l+G}let v=e[d("forceDuplicateZoneCheck")]===!0;if(e.Zone){if(v||typeof e.Zone.__symbol__!="function")throw new Error("Zone already loaded.");return e.Zone}let k=(()=>{let g=class g{static assertZonePatched(){if(e.Promise!==_e.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let t=g.current;for(;t.parent;)t=t.parent;return t}static get current(){return te.zone}static get currentTask(){return Te}static __load_patch(t,_,C=!1){if(_e.hasOwnProperty(t)){if(!C&&v)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){let I="Zone:"+t;c(I),_e[t]=_(e,g,ne),s(I,I)}}get parent(){return this._parent}get name(){return this._name}constructor(t,_){this._parent=t,this._name=_?_.name||"unnamed":"",this._properties=_&&_.properties||{},this._zoneDelegate=new H(this,this._parent&&this._parent._zoneDelegate,_)}get(t){let _=this.getZoneWith(t);if(_)return _._properties[t]}getZoneWith(t){let _=this;for(;_;){if(_._properties.hasOwnProperty(t))return _;_=_._parent}return null}fork(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}wrap(t,_){if(typeof t!="function")throw new Error("Expecting function got: "+t);let C=this._zoneDelegate.intercept(this,t,_),I=this;return function(){return I.runGuarded(C,this,arguments,_)}}run(t,_,C,I){te={parent:te,zone:this};try{return this._zoneDelegate.invoke(this,t,_,C,I)}finally{te=te.parent}}runGuarded(t,_=null,C,I){te={parent:te,zone:this};try{try{return this._zoneDelegate.invoke(this,t,_,C,I)}catch(f){if(this._zoneDelegate.handleError(this,f))throw f}}finally{te=te.parent}}runTask(t,_,C){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||ae).name+"; Execution: "+this.name+")");if(t.state===z&&(t.type===le||t.type===D))return;let I=t.state!=m;I&&t._transitionTo(m,W),t.runCount++;let f=Te;Te=t,te={parent:te,zone:this};try{t.type==D&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,_,C)}catch(T){if(this._zoneDelegate.handleError(this,T))throw T}}finally{t.state!==z&&t.state!==y&&(t.type==le||t.data&&t.data.isPeriodic?I&&t._transitionTo(W,m):(t.runCount=0,this._updateTaskCount(t,-1),I&&t._transitionTo(z,m,z))),te=te.parent,Te=f}}scheduleTask(t){if(t.zone&&t.zone!==this){let C=this;for(;C;){if(C===t.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${t.zone.name}`);C=C.parent}}t._transitionTo(re,z);let _=[];t._zoneDelegates=_,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(C){throw t._transitionTo(y,re,z),this._zoneDelegate.handleError(this,C),C}return t._zoneDelegates===_&&this._updateTaskCount(t,1),t.state==re&&t._transitionTo(W,re),t}scheduleMicroTask(t,_,C,I){return this.scheduleTask(new L(x,t,_,C,I,void 0))}scheduleMacroTask(t,_,C,I,f){return this.scheduleTask(new L(D,t,_,C,I,f))}scheduleEventTask(t,_,C,I,f){return this.scheduleTask(new L(le,t,_,C,I,f))}cancelTask(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||ae).name+"; Execution: "+this.name+")");if(!(t.state!==W&&t.state!==m)){t._transitionTo(V,W,m);try{this._zoneDelegate.cancelTask(this,t)}catch(_){throw t._transitionTo(y,V),this._zoneDelegate.handleError(this,_),_}return this._updateTaskCount(t,-1),t._transitionTo(z,V),t.runCount=0,t}}_updateTaskCount(t,_){let C=t._zoneDelegates;_==-1&&(t._zoneDelegates=null);for(let I=0;IG.hasTask(a,t),onScheduleTask:(G,g,a,t)=>G.scheduleTask(a,t),onInvokeTask:(G,g,a,t,_,C)=>G.invokeTask(a,t,_,C),onCancelTask:(G,g,a,t)=>G.cancelTask(a,t)};class H{constructor(g,a,t){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=g,this._parentDelegate=a,this._forkZS=t&&(t&&t.onFork?t:a._forkZS),this._forkDlgt=t&&(t.onFork?a:a._forkDlgt),this._forkCurrZone=t&&(t.onFork?this.zone:a._forkCurrZone),this._interceptZS=t&&(t.onIntercept?t:a._interceptZS),this._interceptDlgt=t&&(t.onIntercept?a:a._interceptDlgt),this._interceptCurrZone=t&&(t.onIntercept?this.zone:a._interceptCurrZone),this._invokeZS=t&&(t.onInvoke?t:a._invokeZS),this._invokeDlgt=t&&(t.onInvoke?a:a._invokeDlgt),this._invokeCurrZone=t&&(t.onInvoke?this.zone:a._invokeCurrZone),this._handleErrorZS=t&&(t.onHandleError?t:a._handleErrorZS),this._handleErrorDlgt=t&&(t.onHandleError?a:a._handleErrorDlgt),this._handleErrorCurrZone=t&&(t.onHandleError?this.zone:a._handleErrorCurrZone),this._scheduleTaskZS=t&&(t.onScheduleTask?t:a._scheduleTaskZS),this._scheduleTaskDlgt=t&&(t.onScheduleTask?a:a._scheduleTaskDlgt),this._scheduleTaskCurrZone=t&&(t.onScheduleTask?this.zone:a._scheduleTaskCurrZone),this._invokeTaskZS=t&&(t.onInvokeTask?t:a._invokeTaskZS),this._invokeTaskDlgt=t&&(t.onInvokeTask?a:a._invokeTaskDlgt),this._invokeTaskCurrZone=t&&(t.onInvokeTask?this.zone:a._invokeTaskCurrZone),this._cancelTaskZS=t&&(t.onCancelTask?t:a._cancelTaskZS),this._cancelTaskDlgt=t&&(t.onCancelTask?a:a._cancelTaskDlgt),this._cancelTaskCurrZone=t&&(t.onCancelTask?this.zone:a._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let _=t&&t.onHasTask,C=a&&a._hasTaskZS;(_||C)&&(this._hasTaskZS=_?t:R,this._hasTaskDlgt=a,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=g,t.onScheduleTask||(this._scheduleTaskZS=R,this._scheduleTaskDlgt=a,this._scheduleTaskCurrZone=this.zone),t.onInvokeTask||(this._invokeTaskZS=R,this._invokeTaskDlgt=a,this._invokeTaskCurrZone=this.zone),t.onCancelTask||(this._cancelTaskZS=R,this._cancelTaskDlgt=a,this._cancelTaskCurrZone=this.zone))}fork(g,a){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,g,a):new k(g,a)}intercept(g,a,t){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,g,a,t):a}invoke(g,a,t,_,C){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,g,a,t,_,C):a.apply(t,_)}handleError(g,a){return this._handleErrorZS?this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,g,a):!0}scheduleTask(g,a){let t=a;if(this._scheduleTaskZS)this._hasTaskZS&&t._zoneDelegates.push(this._hasTaskDlgtOwner),t=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,g,a),t||(t=a);else if(a.scheduleFn)a.scheduleFn(a);else if(a.type==x)Z(a);else throw new Error("Task is missing scheduleFn.");return t}invokeTask(g,a,t,_){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,g,a,t,_):a.callback.apply(t,_)}cancelTask(g,a){let t;if(this._cancelTaskZS)t=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,g,a);else{if(!a.cancelFn)throw Error("Task is not cancelable");t=a.cancelFn(a)}return t}hasTask(g,a){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,g,a)}catch(t){this.handleError(g,t)}}_updateTaskCount(g,a){let t=this._taskCounts,_=t[g],C=t[g]=_+a;if(C<0)throw new Error("More tasks executed then were scheduled.");if(_==0||C==0){let I={microTask:t.microTask>0,macroTask:t.macroTask>0,eventTask:t.eventTask>0,change:g};this.hasTask(this.zone,I)}}}class L{constructor(g,a,t,_,C,I){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=g,this.source=a,this.data=_,this.scheduleFn=C,this.cancelFn=I,!t)throw new Error("callback is not defined");this.callback=t;let f=this;g===le&&_&&_.useG?this.invoke=L.invokeTask:this.invoke=function(){return L.invokeTask.call(e,f,this,arguments)}}static invokeTask(g,a,t){g||(g=this),ue++;try{return g.runCount++,g.zone.runTask(g,a,t)}finally{ue==1&&b(),ue--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(z,re)}_transitionTo(g,a,t){if(this._state===a||this._state===t)this._state=g,g==z&&(this._zoneDelegates=null);else throw new Error(`${this.type} '${this.source}': can not transition to '${g}', expecting state '${a}'${t?" or '"+t+"'":""}, was '${this._state}'.`)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let B=d("setTimeout"),F=d("Promise"),U=d("then"),Q=[],X=!1,ce;function ee(G){if(ce||e[F]&&(ce=e[F].resolve(0)),ce){let g=ce[U];g||(g=ce.then),g.call(ce,G)}else e[B](G,0)}function Z(G){ue===0&&Q.length===0&&ee(b),G&&Q.push(G)}function b(){if(!X){for(X=!0;Q.length;){let G=Q;Q=[];for(let g=0;gte,onUnhandledError:Y,microtaskDrainDone:Y,scheduleMicroTask:Z,showUncaughtError:()=>!k[d("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:Y,patchMethod:()=>Y,bindArguments:()=>[],patchThen:()=>Y,patchMacroTask:()=>Y,patchEventPrototype:()=>Y,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>Y,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>Y,wrapWithCurrentZone:()=>Y,filterProperties:()=>[],attachOriginToPatched:()=>Y,_redefineProperty:()=>Y,patchCallbacks:()=>Y,nativeScheduleMicroTask:ee},te={parent:null,zone:new k(null,null)},Te=null,ue=0;function Y(){}return s("Zone","Zone"),e.Zone=k})(globalThis);var Ye=Object.getOwnPropertyDescriptor,kt=Object.defineProperty,bt=Object.getPrototypeOf,Tn=Object.create,En=Array.prototype.slice,Lt="addEventListener",Mt="removeEventListener",_t=Zone.__symbol__(Lt),gt=Zone.__symbol__(Mt),Ne="true",De="false",$e=Zone.__symbol__("");function wt(e,r){return Zone.current.wrap(e,r)}function Ct(e,r,c,s,l){return Zone.current.scheduleMacroTask(e,r,c,s,l)}var K=Zone.__symbol__,ft=typeof window<"u",Ge=ft?window:void 0,he=ft&&Ge||globalThis,pn="removeAttribute";function Pt(e,r){for(let c=e.length-1;c>=0;c--)typeof e[c]=="function"&&(e[c]=wt(e[c],r+"_"+c));return e}function _n(e,r){let c=e.constructor.name;for(let s=0;s{let R=function(){return k.apply(this,Pt(arguments,c+"."+l))};return Re(R,k),R})(d)}}}function Xt(e){return e?e.writable===!1?!1:!(typeof e.get=="function"&&typeof e.set>"u"):!0}var zt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,ht=!("nw"in he)&&typeof he.process<"u"&&{}.toString.call(he.process)==="[object process]",Ht=!ht&&!zt&&!!(ft&&Ge.HTMLElement),Yt=typeof he.process<"u"&&{}.toString.call(he.process)==="[object process]"&&!zt&&!!(ft&&Ge.HTMLElement),ut={},Gt=function(e){if(e=e||he.event,!e)return;let r=ut[e.type];r||(r=ut[e.type]=K("ON_PROPERTY"+e.type));let c=this||e.target||he,s=c[r],l;if(Ht&&c===Ge&&e.type==="error"){let d=e;l=s&&s.call(this,d.message,d.filename,d.lineno,d.colno,d.error),l===!0&&e.preventDefault()}else l=s&&s.apply(this,arguments),l!=null&&!l&&e.preventDefault();return l};function Bt(e,r,c){let s=Ye(e,r);if(!s&&c&&Ye(c,r)&&(s={enumerable:!0,configurable:!0}),!s||!s.configurable)return;let l=K("on"+r+"patched");if(e.hasOwnProperty(l)&&e[l])return;delete s.writable,delete s.value;let d=s.get,v=s.set,k=r.slice(2),R=ut[k];R||(R=ut[k]=K("ON_PROPERTY"+k)),s.set=function(H){let L=this;if(!L&&e===he&&(L=he),!L)return;typeof L[R]=="function"&&L.removeEventListener(k,Gt),v&&v.call(L,null),L[R]=H,typeof H=="function"&&L.addEventListener(k,Gt,!1)},s.get=function(){let H=this;if(!H&&e===he&&(H=he),!H)return null;let L=H[R];if(L)return L;if(d){let B=d.call(this);if(B)return s.set.call(this,B),typeof H[pn]=="function"&&H.removeAttribute(r),B}return null},kt(e,r,s),e[l]=!0}function $t(e,r,c){if(r)for(let s=0;sfunction(v,k){let R=c(v,k);return R.cbIdx>=0&&typeof k[R.cbIdx]=="function"?Ct(R.name,k[R.cbIdx],R,l):d.apply(v,k)})}function Re(e,r){e[K("OriginalDelegate")]=r}var qt=!1,yt=!1;function yn(){try{let e=Ge.navigator.userAgent;if(e.indexOf("MSIE ")!==-1||e.indexOf("Trident/")!==-1)return!0}catch{}return!1}function vn(){if(qt)return yt;qt=!0;try{let e=Ge.navigator.userAgent;(e.indexOf("MSIE ")!==-1||e.indexOf("Trident/")!==-1||e.indexOf("Edge/")!==-1)&&(yt=!0)}catch{}return yt}Zone.__load_patch("ZoneAwarePromise",(e,r,c)=>{let s=Object.getOwnPropertyDescriptor,l=Object.defineProperty;function d(f){if(f&&f.toString===Object.prototype.toString){let T=f.constructor&&f.constructor.name;return(T||"")+": "+JSON.stringify(f)}return f?f.toString():Object.prototype.toString.call(f)}let v=c.symbol,k=[],R=e[v("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")]!==!1,H=v("Promise"),L=v("then"),B="__creationTrace__";c.onUnhandledError=f=>{if(c.showUncaughtError()){let T=f&&f.rejection;T?console.error("Unhandled Promise rejection:",T instanceof Error?T.message:T,"; Zone:",f.zone.name,"; Task:",f.task&&f.task.source,"; Value:",T,T instanceof Error?T.stack:void 0):console.error(f)}},c.microtaskDrainDone=()=>{for(;k.length;){let f=k.shift();try{f.zone.runGuarded(()=>{throw f.throwOriginal?f.rejection:f})}catch(T){U(T)}}};let F=v("unhandledPromiseRejectionHandler");function U(f){c.onUnhandledError(f);try{let T=r[F];typeof T=="function"&&T.call(this,f)}catch{}}function Q(f){return f&&f.then}function X(f){return f}function ce(f){return a.reject(f)}let ee=v("state"),Z=v("value"),b=v("finally"),ae=v("parentPromiseValue"),z=v("parentPromiseState"),re="Promise.then",W=null,m=!0,V=!1,y=0;function x(f,T){return i=>{try{ne(f,T,i)}catch(E){ne(f,!1,E)}}}let D=function(){let f=!1;return function(i){return function(){f||(f=!0,i.apply(null,arguments))}}},le="Promise resolved with itself",_e=v("currentTaskTrace");function ne(f,T,i){let E=D();if(f===i)throw new TypeError(le);if(f[ee]===W){let w=null;try{(typeof i=="object"||typeof i=="function")&&(w=i&&i.then)}catch(O){return E(()=>{ne(f,!1,O)})(),f}if(T!==V&&i instanceof a&&i.hasOwnProperty(ee)&&i.hasOwnProperty(Z)&&i[ee]!==W)Te(i),ne(f,i[ee],i[Z]);else if(T!==V&&typeof w=="function")try{w.call(i,E(x(f,T)),E(x(f,!1)))}catch(O){E(()=>{ne(f,!1,O)})()}else{f[ee]=T;let O=f[Z];if(f[Z]=i,f[b]===b&&T===m&&(f[ee]=f[z],f[Z]=f[ae]),T===V&&i instanceof Error){let M=r.currentTask&&r.currentTask.data&&r.currentTask.data[B];M&&l(i,_e,{configurable:!0,enumerable:!1,writable:!0,value:M})}for(let M=0;M{try{let A=f[Z],j=!!i&&b===i[b];j&&(i[ae]=A,i[z]=O);let S=T.run(M,void 0,j&&M!==ce&&M!==X?[]:[A]);ne(i,!0,S)}catch(A){ne(i,!1,A)}},i)}let Y="function ZoneAwarePromise() { [native code] }",G=function(){},g=e.AggregateError;class a{static toString(){return Y}static resolve(T){return ne(new this(null),m,T)}static reject(T){return ne(new this(null),V,T)}static any(T){if(!T||typeof T[Symbol.iterator]!="function")return Promise.reject(new g([],"All promises were rejected"));let i=[],E=0;try{for(let M of T)E++,i.push(a.resolve(M))}catch{return Promise.reject(new g([],"All promises were rejected"))}if(E===0)return Promise.reject(new g([],"All promises were rejected"));let w=!1,O=[];return new a((M,A)=>{for(let j=0;j{w||(w=!0,M(S))},S=>{O.push(S),E--,E===0&&(w=!0,A(new g(O,"All promises were rejected")))})})}static race(T){let i,E,w=new this((A,j)=>{i=A,E=j});function O(A){i(A)}function M(A){E(A)}for(let A of T)Q(A)||(A=this.resolve(A)),A.then(O,M);return w}static all(T){return a.allWithCallback(T)}static allSettled(T){return(this&&this.prototype instanceof a?this:a).allWithCallback(T,{thenCallback:E=>({status:"fulfilled",value:E}),errorCallback:E=>({status:"rejected",reason:E})})}static allWithCallback(T,i){let E,w,O=new this((S,$)=>{E=S,w=$}),M=2,A=0,j=[];for(let S of T){Q(S)||(S=this.resolve(S));let $=A;try{S.then(J=>{j[$]=i?i.thenCallback(J):J,M--,M===0&&E(j)},J=>{i?(j[$]=i.errorCallback(J),M--,M===0&&E(j)):w(J)})}catch(J){w(J)}M++,A++}return M-=2,M===0&&E(j),O}constructor(T){let i=this;if(!(i instanceof a))throw new Error("Must be an instanceof Promise.");i[ee]=W,i[Z]=[];try{let E=D();T&&T(E(x(i,m)),E(x(i,V)))}catch(E){ne(i,!1,E)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return a}then(T,i){let E=this.constructor?.[Symbol.species];(!E||typeof E!="function")&&(E=this.constructor||a);let w=new E(G),O=r.current;return this[ee]==W?this[Z].push(O,w,T,i):ue(this,O,w,T,i),w}catch(T){return this.then(null,T)}finally(T){let i=this.constructor?.[Symbol.species];(!i||typeof i!="function")&&(i=a);let E=new i(G);E[b]=b;let w=r.current;return this[ee]==W?this[Z].push(w,E,T,T):ue(this,w,E,T,T),E}}a.resolve=a.resolve,a.reject=a.reject,a.race=a.race,a.all=a.all;let t=e[H]=e.Promise;e.Promise=a;let _=v("thenPatched");function C(f){let T=f.prototype,i=s(T,"then");if(i&&(i.writable===!1||!i.configurable))return;let E=T.then;T[L]=E,f.prototype.then=function(w,O){return new a((A,j)=>{E.call(this,A,j)}).then(w,O)},f[_]=!0}c.patchThen=C;function I(f){return function(T,i){let E=f.apply(T,i);if(E instanceof a)return E;let w=E.constructor;return w[_]||C(w),E}}return t&&(C(t),Se(e,"fetch",f=>I(f))),Promise[r.__symbol__("uncaughtPromiseErrors")]=k,a});Zone.__load_patch("toString",e=>{let r=Function.prototype.toString,c=K("OriginalDelegate"),s=K("Promise"),l=K("Error"),d=function(){if(typeof this=="function"){let H=this[c];if(H)return typeof H=="function"?r.call(H):Object.prototype.toString.call(H);if(this===Promise){let L=e[s];if(L)return r.call(L)}if(this===Error){let L=e[l];if(L)return r.call(L)}}return r.call(this)};d[c]=r,Function.prototype.toString=d;let v=Object.prototype.toString,k="[object Promise]";Object.prototype.toString=function(){return typeof Promise=="function"&&this instanceof Promise?k:v.call(this)}});var xe=!1;if(typeof window<"u")try{let e=Object.defineProperty({},"passive",{get:function(){xe=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{xe=!1}var kn={useG:!0},Me={},Kt={},Jt=new RegExp("^"+$e+"(\\w+)(true|false)$"),Qt=K("propagationStopped");function en(e,r){let c=(r?r(e):e)+De,s=(r?r(e):e)+Ne,l=$e+c,d=$e+s;Me[e]={},Me[e][De]=l,Me[e][Ne]=d}function bn(e,r,c,s){let l=s&&s.add||Lt,d=s&&s.rm||Mt,v=s&&s.listeners||"eventListeners",k=s&&s.rmAll||"removeAllListeners",R=K(l),H="."+l+":",L="prependListener",B="."+L+":",F=function(Z,b,ae){if(Z.isRemoved)return;let z=Z.callback;typeof z=="object"&&z.handleEvent&&(Z.callback=m=>z.handleEvent(m),Z.originalDelegate=z);let re;try{Z.invoke(Z,b,[ae])}catch(m){re=m}let W=Z.options;if(W&&typeof W=="object"&&W.once){let m=Z.originalDelegate?Z.originalDelegate:Z.callback;b[d].call(b,ae.type,m,W)}return re};function U(Z,b,ae){if(b=b||e.event,!b)return;let z=Z||b.target||e,re=z[Me[b.type][ae?Ne:De]];if(re){let W=[];if(re.length===1){let m=F(re[0],z,b);m&&W.push(m)}else{let m=re.slice();for(let V=0;V{throw V})}}}let Q=function(Z){return U(this,Z,!1)},X=function(Z){return U(this,Z,!0)};function ce(Z,b){if(!Z)return!1;let ae=!0;b&&b.useG!==void 0&&(ae=b.useG);let z=b&&b.vh,re=!0;b&&b.chkDup!==void 0&&(re=b.chkDup);let W=!1;b&&b.rt!==void 0&&(W=b.rt);let m=Z;for(;m&&!m.hasOwnProperty(l);)m=bt(m);if(!m&&Z[l]&&(m=Z),!m||m[R])return!1;let V=b&&b.eventNameToString,y={},x=m[R]=m[l],D=m[K(d)]=m[d],le=m[K(v)]=m[v],_e=m[K(k)]=m[k],ne;b&&b.prepend&&(ne=m[K(b.prepend)]=m[b.prepend]);function te(i,E){return!xe&&typeof i=="object"&&i?!!i.capture:!xe||!E?i:typeof i=="boolean"?{capture:i,passive:!0}:i?typeof i=="object"&&i.passive!==!1?{...i,passive:!0}:i:{passive:!0}}let Te=function(i){if(!y.isExisting)return x.call(y.target,y.eventName,y.capture?X:Q,y.options)},ue=function(i){if(!i.isRemoved){let E=Me[i.eventName],w;E&&(w=E[i.capture?Ne:De]);let O=w&&i.target[w];if(O){for(let M=0;Mfunction(l,d){l[Qt]=!0,s&&s.apply(l,d)})}function Mn(e,r,c,s,l){let d=Zone.__symbol__(s);if(r[d])return;let v=r[d]=r[s];r[s]=function(k,R,H){return R&&R.prototype&&l.forEach(function(L){let B=`${c}.${s}::`+L,F=R.prototype;try{if(F.hasOwnProperty(L)){let U=e.ObjectGetOwnPropertyDescriptor(F,L);U&&U.value?(U.value=e.wrapWithCurrentZone(U.value,B),e._redefineProperty(R.prototype,L,U)):F[L]&&(F[L]=e.wrapWithCurrentZone(F[L],B))}else F[L]&&(F[L]=e.wrapWithCurrentZone(F[L],B))}catch{}}),v.call(r,k,R,H)},e.attachOriginToPatched(r[s],v)}function nn(e,r,c){if(!c||c.length===0)return r;let s=c.filter(d=>d.target===e);if(!s||s.length===0)return r;let l=s[0].ignoreProperties;return r.filter(d=>l.indexOf(d)===-1)}function Wt(e,r,c,s){if(!e)return;let l=nn(e,r,c);$t(e,l,s)}function vt(e){return Object.getOwnPropertyNames(e).filter(r=>r.startsWith("on")&&r.length>2).map(r=>r.substring(2))}function wn(e,r){if(ht&&!Yt||Zone[e.symbol("patchEvents")])return;let c=r.__Zone_ignore_on_properties,s=[];if(Ht){let l=window;s=s.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);let d=yn()?[{target:l,ignoreProperties:["error"]}]:[];Wt(l,vt(l),c&&c.concat(d),bt(l))}s=s.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let l=0;l{let s=vt(e);c.patchOnProperties=$t,c.patchMethod=Se,c.bindArguments=Pt,c.patchMacroTask=gn;let l=r.__symbol__("BLACK_LISTED_EVENTS"),d=r.__symbol__("UNPATCHED_EVENTS");e[d]&&(e[l]=e[d]),e[l]&&(r[l]=r[d]=e[l]),c.patchEventPrototype=Ln,c.patchEventTarget=bn,c.isIEOrEdge=vn,c.ObjectDefineProperty=kt,c.ObjectGetOwnPropertyDescriptor=Ye,c.ObjectCreate=Tn,c.ArraySlice=En,c.patchClass=Ke,c.wrapWithCurrentZone=wt,c.filterProperties=nn,c.attachOriginToPatched=Re,c._redefineProperty=Object.defineProperty,c.patchCallbacks=Mn,c.getGlobalObjects=()=>({globalSources:Kt,zoneSymbolEventNames:Me,eventNames:s,isBrowser:Ht,isMix:Yt,isNode:ht,TRUE_STR:Ne,FALSE_STR:De,ZONE_SYMBOL_PREFIX:$e,ADD_EVENT_LISTENER_STR:Lt,REMOVE_EVENT_LISTENER_STR:Mt})});function Cn(e,r){r.patchMethod(e,"queueMicrotask",c=>function(s,l){Zone.current.scheduleMicroTask("queueMicrotask",l[0])})}var lt=K("zoneTask");function Ue(e,r,c,s){let l=null,d=null;r+=s,c+=s;let v={};function k(H){let L=H.data;return L.args[0]=function(){return H.invoke.apply(this,arguments)},L.handleId=l.apply(e,L.args),H}function R(H){return d.call(e,H.data.handleId)}l=Se(e,r,H=>function(L,B){if(typeof B[0]=="function"){let F={isPeriodic:s==="Interval",delay:s==="Timeout"||s==="Interval"?B[1]||0:void 0,args:B},U=B[0];B[0]=function(){try{return U.apply(this,arguments)}finally{F.isPeriodic||(typeof F.handleId=="number"?delete v[F.handleId]:F.handleId&&(F.handleId[lt]=null))}};let Q=Ct(r,B[0],F,k,R);if(!Q)return Q;let X=Q.data.handleId;return typeof X=="number"?v[X]=Q:X&&(X[lt]=Q),X&&X.ref&&X.unref&&typeof X.ref=="function"&&typeof X.unref=="function"&&(Q.ref=X.ref.bind(X),Q.unref=X.unref.bind(X)),typeof X=="number"||X?X:Q}else return H.apply(e,B)}),d=Se(e,c,H=>function(L,B){let F=B[0],U;typeof F=="number"?U=v[F]:(U=F&&F[lt],U||(U=F)),U&&typeof U.type=="string"?U.state!=="notScheduled"&&(U.cancelFn&&U.data.isPeriodic||U.runCount===0)&&(typeof F=="number"?delete v[F]:F&&(F[lt]=null),U.zone.cancelTask(U)):H.apply(e,B)})}function Pn(e,r){let{isBrowser:c,isMix:s}=r.getGlobalObjects();if(!c&&!s||!e.customElements||!("customElements"in e))return;let l=["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"];r.patchCallbacks(r,e.customElements,"customElements","define",l)}function Hn(e,r){if(Zone[r.symbol("patchEventTarget")])return;let{eventNames:c,zoneSymbolEventNames:s,TRUE_STR:l,FALSE_STR:d,ZONE_SYMBOL_PREFIX:v}=r.getGlobalObjects();for(let R=0;R{let r=e[Zone.__symbol__("legacyPatch")];r&&r()});Zone.__load_patch("timers",e=>{let r="set",c="clear";Ue(e,r,c,"Timeout"),Ue(e,r,c,"Interval"),Ue(e,r,c,"Immediate")});Zone.__load_patch("requestAnimationFrame",e=>{Ue(e,"request","cancel","AnimationFrame"),Ue(e,"mozRequest","mozCancel","AnimationFrame"),Ue(e,"webkitRequest","webkitCancel","AnimationFrame")});Zone.__load_patch("blocking",(e,r)=>{let c=["alert","prompt","confirm"];for(let s=0;sfunction(R,H){return r.current.run(d,e,H,k)})}});Zone.__load_patch("EventTarget",(e,r,c)=>{On(e,c),Hn(e,c);let s=e.XMLHttpRequestEventTarget;s&&s.prototype&&c.patchEventTarget(e,c,[s.prototype])});Zone.__load_patch("MutationObserver",(e,r,c)=>{Ke("MutationObserver"),Ke("WebKitMutationObserver")});Zone.__load_patch("IntersectionObserver",(e,r,c)=>{Ke("IntersectionObserver")});Zone.__load_patch("FileReader",(e,r,c)=>{Ke("FileReader")});Zone.__load_patch("on_property",(e,r,c)=>{wn(c,e)});Zone.__load_patch("customElements",(e,r,c)=>{Pn(e,c)});Zone.__load_patch("XHR",(e,r)=>{R(e);let c=K("xhrTask"),s=K("xhrSync"),l=K("xhrListener"),d=K("xhrScheduled"),v=K("xhrURL"),k=K("xhrErrorBeforeScheduled");function R(H){let L=H.XMLHttpRequest;if(!L)return;let B=L.prototype;function F(y){return y[c]}let U=B[_t],Q=B[gt];if(!U){let y=H.XMLHttpRequestEventTarget;if(y){let x=y.prototype;U=x[_t],Q=x[gt]}}let X="readystatechange",ce="scheduled";function ee(y){let x=y.data,D=x.target;D[d]=!1,D[k]=!1;let le=D[l];U||(U=D[_t],Q=D[gt]),le&&Q.call(D,X,le);let _e=D[l]=()=>{if(D.readyState===D.DONE)if(!x.aborted&&D[d]&&y.state===ce){let te=D[r.__symbol__("loadfalse")];if(D.status!==0&&te&&te.length>0){let Te=y.invoke;y.invoke=function(){let ue=D[r.__symbol__("loadfalse")];for(let Y=0;Yfunction(y,x){return y[s]=x[2]==!1,y[v]=x[1],ae.apply(y,x)}),z="XMLHttpRequest.send",re=K("fetchTaskAborting"),W=K("fetchTaskScheduling"),m=Se(B,"send",()=>function(y,x){if(r.current[W]===!0||y[s])return m.apply(y,x);{let D={target:y,url:y[v],isPeriodic:!1,args:x,aborted:!1},le=Ct(z,Z,D,ee,b);y&&y[k]===!0&&!D.aborted&&le.state===ce&&le.invoke()}}),V=Se(B,"abort",()=>function(y,x){let D=F(y);if(D&&typeof D.type=="string"){if(D.cancelFn==null||D.data&&D.data.aborted)return;D.zone.cancelTask(D)}else if(r.current[re]===!0)return V.apply(y,x)})}});Zone.__load_patch("geolocation",e=>{e.navigator&&e.navigator.geolocation&&_n(e.navigator.geolocation,["getCurrentPosition","watchPosition"])});Zone.__load_patch("PromiseRejectionEvent",(e,r)=>{function c(s){return function(l){tn(e,s).forEach(v=>{let k=e.PromiseRejectionEvent;if(k){let R=new k(s,{promise:l.promise,reason:l.rejection});v.invoke(R)}})}}e.PromiseRejectionEvent&&(r[K("unhandledPromiseRejectionHandler")]=c("unhandledrejection"),r[K("rejectionHandledHandler")]=c("rejectionhandled"))});Zone.__load_patch("queueMicrotask",(e,r,c)=>{Cn(e,c)});(function(e,r){"use strict";function c(){var n=x.splice(0,x.length);for(st=0;n.length;)n.shift().call(null,n.shift())}function s(n,o){for(var u=0,h=n.length;u1)&&z(this)}}}),nt(P,T,{value:function(q){-1>0,a="__"+G+g,t="addEventListener",_="attached",C="Callback",I="detached",f="extends",T="attributeChanged"+C,i=_+C,E="connected"+C,w="disconnected"+C,O="created"+C,M=I+C,A="ADDITION",j="REMOVAL",S="DOMAttrModified",$="DOMContentLoaded",J="DOMSubtreeModified",ge="<",Ee="=",Be=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,Je=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],Pe=[],He=[],pe="",ye=m.documentElement,ve=Pe.indexOf||function(n){for(var o=this.length;o--&&this[o]!==n;);return o},Ze=V.prototype,je=Ze.hasOwnProperty,Ae=Ze.isPrototypeOf,ke=V.defineProperty,be=[],Le=V.getOwnPropertyDescriptor,Ot=V.getOwnPropertyNames,rn=V.getPrototypeOf,Nt=V.setPrototypeOf,Dt=!!V.__proto__,on=!1,qe="__dreCEv1",Oe=e.customElements,We=!/^force/.test(r.type)&&!!(Oe&&Oe.define&&Oe.get&&Oe.whenDefined),Rt=V.create||V,sn=e.Map||function(){var n,o=[],u=[];return{get:function(h){return u[ve.call(o,h)]},set:function(h,p){n=ve.call(o,h),n<0?u[o.push(h)-1]=p:u[n]=p}}},St=e.Promise||function(n){function o(P){for(h=!0;u.length;)u.shift()(P)}var u=[],h=!1,p={catch:function(){return p},then:function(P){return u.push(P),h&&setTimeout(o,1),p}};return n(o),p},Qe=!1,Xe=Rt(null),Fe=Rt(null),et=new sn,tt=function(n){return n.toLowerCase()},dt=V.create||function n(o){return o?(n.prototype=o,new n):this},cn=Nt||(Dt?function(n,o){return n.__proto__=o,n}:Ot&&Le?function(){function n(o,u){for(var h,p=Ot(u),P=0,N=p.length;P
",new Ie(function(n,o){if(n[0]&&n[0].type=="childList"&&!n[0].removedNodes[0].childNodes.length){Y=Le(de,"innerHTML");var u=Y&&Y.set;u&&ke(de,"innerHTML",{set:function(h){for(;this.lastChild;)this.removeChild(this.lastChild);u.call(this,h)}})}o.disconnect(),Y=null}).observe(Y,{childList:!0,subtree:!0}),Y.innerHTML=""),Vt||(Nt||Dt?(Te=function(n,o){Ae.call(o,n)||U(n,o)},ue=U):(Te=function(n,o){n[a]||(n[a]=V(!0),U(n,o))},ue=Te),Ve?(it=!1,function(){var n=Le(de,t),o=n.value,u=function(P){var N=new CustomEvent(S,{bubbles:!0});N.attrName=P,N.prevValue=rt.call(this,P),N.newValue=null,N[j]=N.attrChange=2,fn.call(this,P),mt.call(this,N)},h=function(P,N){var se=un.call(this,P),q=se&&rt.call(this,P),oe=new CustomEvent(S,{bubbles:!0});jt.call(this,P,N),oe.attrName=P,oe.prevValue=se?q:null,oe.newValue=N,se?oe.MODIFICATION=oe.attrChange=1:oe[A]=oe.attrChange=0,mt.call(this,oe)},p=function(P){var N,se=P.currentTarget,q=se[a],oe=P.propertyName;q.hasOwnProperty(oe)&&(q=q[oe],N=new CustomEvent(S,{bubbles:!0}),N.attrName=q.name,N.prevValue=q.value||null,N.newValue=q.value=se[oe]||null,N.prevValue==null?N[A]=N.attrChange=0:N.MODIFICATION=N.attrChange=1,mt.call(se,N))};n.value=function(P,N,se){P===S&&this[T]&&this.setAttribute!==h&&(this[a]={className:{name:"class",value:this.className}},this.setAttribute=h,this.removeAttribute=u,o.call(this,"propertychange",p)),o.call(this,P,N,se)},ke(de,t,n)}()):Ie||(ye[t](S,Ft),ye.setAttribute(a,1),ye.removeAttribute(a),it&&(D=function(n){var o,u,h,p=this;if(p===n.target){o=p[a],p[a]=u=_e(p);for(h in u){if(!(h in o))return le(0,p,h,o[h],u[h],A);if(u[h]!==o[h])return le(1,p,h,o[h],u[h],"MODIFICATION")}for(h in o)if(!(h in u))return le(2,p,h,o[h],u[h],j)}},le=function(n,o,u,h,p,P){var N={attrChange:n,currentTarget:o,attrName:u,prevValue:h,newValue:p};N[P]=n,R(N)},_e=function(n){for(var o,u,h={},p=n.attributes,P=0,N=p.length;P$");if(o[f]="a",n.prototype=dt(Zt.prototype),n.prototype.constructor=n,e.customElements.define(u,n,o),!h.test(m.createElement("a",{is:u}).outerHTML)||!h.test(new n().outerHTML))throw o})(function n(){return Reflect.construct(Zt,[],n)},{},"document-register-element-a"+g)}catch{W()}if(!r.noBuiltIn)try{if(ot.call(m,"a","a").outerHTML.indexOf("is")<0)throw{}}catch{tt=function(o){return{is:o.toLowerCase()}}}})(window); +/*! Bundled license information: + +zone.js/fesm2015/zone.js: + (** + * @license Angular v + * (c) 2010-2022 Google LLC. https://angular.io/ + * License: MIT + *) + +document-register-element/build/document-register-element.js: + (*! (C) Andrea Giammarchi - @WebReflection - ISC Style License *) +*/ +import{a as I,b as R,c as ca,d as Z8,e as J8,f as Kt,g as zn,h as io,i as ji}from"./chunk-RKLIRILV.js";var rP=Z8((lUe,iP)=>{iP.exports=function(n){var e={};function t(i){if(e[i])return e[i].exports;var r=e[i]={i,l:!1,exports:{}};return n[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=n,t.c=e,t.d=function(i,r,o){t.o(i,r)||Object.defineProperty(i,r,{configurable:!1,enumerable:!0,get:o})},t.r=function(i){Object.defineProperty(i,"__esModule",{value:!0})},t.n=function(i){var r=i&&i.__esModule?function(){return i.default}:function(){return i};return t.d(r,"a",r),r},t.o=function(i,r){return Object.prototype.hasOwnProperty.call(i,r)},t.p="/dist/",t(t.s=1)}([function(n,e,t){"use strict";t.r(e);var i={equal:0,delete:1,insert:2,none:3,replace:4};class r{constructor(Ve,z,U){this.startInOld=Ve,this.startInNew=z,this.size=U}get endInOld(){return this.startInOld+this.size}get endInNew(){return this.startInNew+this.size}}class o{constructor(){this.blockSize=0,this.repeatingWordsAccuracy=0,this.ignoreWhitespaceDifferences=!1}}let s=/^\s*<\/?[^>]+>\s*$/,a=/<[^\s>]+/,l=/^(\s| )+$/,c=/[\w\#@]+/,u=["ve!==null&&ve.startsWith(Ve))&&s.test(ve)}function p(ve,Ve,z){return["<",Ve,' class="',z,'">',ve,""].join("")}function h(ve){return ve==="<"}function g(ve){return ve==="&"}function _(ve){return ve===";"}function v(ve){return l.test(ve)}function w(ve){return d(ve)?function(Ve){return Ve=a.exec(Ve)[0]+(Ve.endsWith("/>")?"/>":">")}(ve):ve}function S(ve){return c.test(ve)}function L(ve,Ve,z){return ve.push(Ve),ve.length>z&&ve.shift(),ve.length!==z?null:ve.join("")}class T{constructor(Ve,z,U,H,Q,de,te){this.oldWords=Ve,this.newWords=z,this.startInOld=U,this.endInOld=H,this.startInNew=Q,this.endInNew=de,this.options=te}indexNewWords(){this.wordIndices=new Map;let Ve=[];for(let z=this.startInNew;zU&&(Ve=te-dt-Q+2,z=Ut-dt-Q+2,U=dt)}H=it}else H=it}return U!==0?new r(Ve,z,U+Q-1):null}removeRepeatingWords(){let Ve=this.newWords.length+this.options.repeatingWordsAccuracy,z=Array.from(this.wordIndices.entries()).filter(U=>U[1].length>Ve).map(U=>U[0]);for(let U of z)this.wordIndices.delete(U)}}class q{constructor(Ve,z,U,H,Q){this.action=Ve,this.startInOld=z,this.endInOld=U,this.startInNew=H,this.endInNew=Q}}var N={character:0,tag:1,whitespace:2,entity:3};function ee(ve,Ve){let z={mode:N.character,currentWord:[],words:[]},U=function(lt,it){let Ut=new Map;if(it===null)return Ut;for(let dt of it){let Bn;for(;(Bn=dt.exec(lt))!==null;){if(Ut.has(Bn.index))throw new Error("One or more block expressions result in a text sequence that overlaps. Current expression: "+dt.toString());Ut.set(Bn.index,Bn.index+Bn[0].length)}}return Ut}(ve,Ve),H=!!U.size,Q=!1,de=-1;for(let lt=0;lt"?(z.currentWord.push(te),z.words.push(z.currentWord.join("")),z.currentWord=[],z.mode=v(te)?N.whitespace:N.character):z.currentWord.push(te);break;case N.whitespace:h(te)?ge(z,te,N.tag):g(te)?ge(z,te,N.entity):v(te)?z.currentWord.push(te):ge(z,te,N.character);break;case N.entity:if(h(te))ge(z,te,N.tag);else if(v(te))ge(z,te,N.whitespace);else if(_(te)){let it=!0;if(z.currentWord.length!==0&&(z.currentWord.push(te),z.words.push(z.currentWord.join("")),z.words.length>2&&v(z.words[z.words.length-2])&&v(z.words[z.words.length-1]))){let Ut=z.words[z.words.length-2],dt=z.words[z.words.length-1];z.words.splice(z.words.length-2,2),z.currentWord=[(Ut+dt).split()],z.mode=N.whitespace,it=!1}it&&(z.currentWord=[],z.mode=N.character)}else S(te)?z.currentWord.push(te):ge(z,te,N.character)}}return z.currentWord.length!==0&&z.words.push(z.currentWord.join("")),z.words}function ge(ve,Ve,z){ve.currentWord.length!==0&&ve.words.push(ve.currentWord.join("")),ve.currentWord=[Ve],ve.mode=z}let ce=4,ze=new Map([["",0],["",0],["",0],["",0],["",0],["",0],["",0],["",0],["",0],["",0]]),Ot=/<((strong)|(b)|(i)|(em)|(big)|(small)|(u)|(sub)|(sup)|(strike)|(s))[\>\s]+/gi,It=(()=>{class ve{constructor(z,U){this.content=[],this.newText=U,this.oldText=z,this.specialTagDiffStack=[],this.newWords=[],this.oldWords=[],this.matchGranularity=0,this.blockExpressions=[],this.repeatingWordsAccuracy=1,this.ignoreWhiteSpaceDifferences=!1,this.orphanMatchThreshold=0}build(){if(this.oldText===this.newText)return this.newText;this.splitInputsIntoWords(),this.matchGranularity=Math.min(ce,this.oldWords.length,this.newWords.length);let z=this.operations();for(let U of z)this.performOperation(U);return this.content.join("")}addBlockExpression(z){this.blockExpressions.push(z)}splitInputsIntoWords(){this.oldWords=ee(this.oldText,this.blockExpressions),this.oldText=null,this.newWords=ee(this.newText,this.blockExpressions),this.newText=null}performOperation(z){switch(z.action){case i.equal:this.processEqualOperation(z);break;case i.delete:this.processDeleteOperation(z,"diffdel");break;case i.insert:this.processInsertOperation(z,"diffins");break;case i.none:break;case i.replace:this.processReplaceOperation(z)}}processReplaceOperation(z){this.processDeleteOperation(z,"diffmod"),this.processInsertOperation(z,"diffmod")}processInsertOperation(z,U){let H=this.newWords.filter((Q,de)=>de>=z.startInNew&&dede>=z.startInOld&&deQ>=z.startInNew&&Q!d(lt)),de="",te=!1;if(Q.length!==0){let lt=p(Q.join(""),z,U);this.content.push(lt)}else{if(Ot.test(H[0])){if(this.specialTagDiffStack.push(H[0]),de='',z==="del")for(H.shift();H.length>0&&Ot.test(H[0]);)H.shift()}else if(ze.has(H[0])){let lt=this.specialTagDiffStack.length===0?null:this.specialTagDiffStack.pop();if(lt!==null&<===H[0].replace(/\//g,"")&&(de="",te=!0),z==="del")for(H.shift();H.length>0&&ze.has(H[0]);)H.shift()}if(H.length===0&&de.length===0)break;te?this.content.push(de+this.extractConsecutiveWords(H,d).join("")):this.content.push(this.extractConsecutiveWords(H,d).join("")+de)}}}extractConsecutiveWords(z,U){let H=null;for(let Q=0;Qte>=0&&te0&&z.splice(0,H),Q}{let Q=z.filter((de,te)=>te>=0&&teit+Ut.length,te=this.oldWords.slice(U.endInOld,Q.startInOld).reduce(de,0),lt=this.newWords.slice(U.endInNew,Q.startInNew).reduce(de,0);this.newWords.slice(H.startInNew,H.endInNew).reduce(de,0)>Math.max(te,lt)*this.orphanMatchThreshold&&(yield H),U=H,H=Q}yield H}matchingBlocks(){let z=[];return this.findMatchingBlocks(0,this.oldWords.length,0,this.newWords.length,z),z}findMatchingBlocks(z,U,H,Q,de){let te=this.findMatch(z,U,H,Q);te!==null&&(z0;de--){let te=new o;te.blockSize=de,te.repeatingWordsAccuracy=this.repeatingWordsAccuracy,te.ignoreWhitespaceDifferences=this.ignoreWhiteSpaceDifferences;let lt=new T(this.oldWords,this.newWords,z,U,H,Q,te).findMatch();if(lt!==null)return lt}return null}}return ve.execute=function(Ve,z){return new ve(Ve,z).build()},ve})();e.default=It},function(n,e,t){n.exports=t(0)}])});function eD(n,e){return Object.is(n,e)}var Yn=null,ep=!1,Xf=1,ro=Symbol("SIGNAL");function kt(n){let e=Yn;return Yn=n,e}function tD(){return Yn}function X8(){return ep}var Bc={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function tm(n){if(ep)throw new Error("");if(Yn===null)return;Yn.consumerOnSignalRead(n);let e=Yn.nextProducerIndex++;if(sm(Yn),en.nextProducerIndex;)n.producerNode.pop(),n.producerLastReadVersion.pop(),n.producerIndexOfThis.pop()}}function im(n){sm(n);for(let e=0;e0}function sm(n){n.producerNode??=[],n.producerIndexOfThis??=[],n.producerLastReadVersion??=[]}function aD(n){n.liveConsumerNode??=[],n.liveConsumerIndexOfThis??=[]}function lD(n){return n.producerNode!==void 0}function cD(n){let e=Object.create(tV);e.computation=n;let t=()=>{if(nD(e),tm(e),e.value===em)throw e.error;return e.value};return t[ro]=e,t}var Jv=Symbol("UNSET"),Xv=Symbol("COMPUTING"),em=Symbol("ERRORED"),tV=R(I({},Bc),{value:Jv,dirty:!0,error:null,equal:eD,producerMustRecompute(n){return n.value===Jv||n.value===Xv},producerRecomputeValue(n){if(n.value===Xv)throw new Error("Detected cycle in computations.");let e=n.value;n.value=Xv;let t=np(n),i;try{i=n.computation()}catch(r){i=em,n.error=r}finally{nm(n,t)}if(e!==Jv&&e!==em&&i!==em&&n.equal(e,i)){n.value=e;return}n.value=i,n.version++}});function nV(){throw new Error}var uD=nV;function dD(){uD()}function pD(n){uD=n}var iV=null;function hD(n){let e=Object.create(tb);e.value=n;let t=()=>(tm(e),e.value);return t[ro]=e,t}function am(n,e){rD()||dD(),n.equal(n.value,e)||(n.value=e,rV(n))}function fD(n,e){rD()||dD(),am(n,e(n.value))}var tb=R(I({},Bc),{equal:eD,value:void 0});function rV(n){n.version++,eV(),iD(n),iV?.()}function mD(n,e,t){let i=Object.create(oV);t&&(i.consumerAllowSignalWrites=!0),i.fn=n,i.schedule=e;let r=l=>{i.cleanupFn=l};function o(l){return l.fn===null&&l.schedule===null}function s(l){o(l)||(rm(l),l.cleanupFn(),l.fn=null,l.schedule=null,l.cleanupFn=eb)}let a=()=>{if(i.fn===null)return;if(X8())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(i.dirty=!1,i.hasRun&&!im(i))return;i.hasRun=!0;let l=np(i);try{i.cleanupFn(),i.cleanupFn=eb,i.fn(r)}finally{nm(i,l)}};return i.ref={notify:()=>oD(i),run:a,cleanup:()=>i.cleanupFn(),destroy:()=>s(i),[ro]:i},i.ref}var eb=()=>{},oV=R(I({},Bc),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:n=>{n.schedule!==null&&n.schedule(n.ref)},hasRun:!1,cleanupFn:eb});function Cs(n){return typeof n=="function"}var nb=!1,Ji={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){let e=new Error;console.warn(`DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: +`+e.stack)}else nb&&console.log("RxJS: Back to a better error behavior. Thank you. <3");nb=n},get useDeprecatedSynchronousErrorHandling(){return nb}};function ws(n){setTimeout(()=>{throw n},0)}var zc={closed:!0,next(n){},error(n){if(Ji.useDeprecatedSynchronousErrorHandling)throw n;ws(n)},complete(){}};var oo=Array.isArray||(n=>n&&typeof n.length=="number");function Uc(n){return n!==null&&typeof n=="object"}var sV=(()=>{function n(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription: +${e.map((t,i)=>`${i+1}) ${t.toString()}`).join(` + `)}`:"",this.name="UnsubscriptionError",this.errors=e,this}return n.prototype=Object.create(Error.prototype),n})(),ip=sV;var et=class n{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:t,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof n)t.remove(this);else if(t!==null)for(let s=0;se.concat(t instanceof ip?t.errors:t),[])}var Cl=typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();var Ze=class n extends et{constructor(e,t,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=zc;break;case 1:if(!e){this.destination=zc;break}if(typeof e=="object"){e instanceof n?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new lm(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new lm(this,e,t,i);break}}[Cl](){return this}static create(e,t,i){let r=new n(e,t,i);return r.syncErrorThrowable=!1,r}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){let{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}},lm=class extends Ze{constructor(e,t,i,r){super(),this._parentSubscriber=e;let o,s=this;Cs(t)?o=t:t&&(o=t.next,i=t.error,r=t.complete,t!==zc&&(s=Object.create(t),Cs(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(e){if(!this.isStopped&&this._next){let{_parentSubscriber:t}=this;!Ji.useDeprecatedSynchronousErrorHandling||!t.syncErrorThrowable?this.__tryOrUnsub(this._next,e):this.__tryOrSetError(t,this._next,e)&&this.unsubscribe()}}error(e){if(!this.isStopped){let{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:i}=Ji;if(this._error)!i||!t.syncErrorThrowable?(this.__tryOrUnsub(this._error,e),this.unsubscribe()):(this.__tryOrSetError(t,this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)i?(t.syncErrorValue=e,t.syncErrorThrown=!0):ws(e),this.unsubscribe();else{if(this.unsubscribe(),i)throw e;ws(e)}}}complete(){if(!this.isStopped){let{_parentSubscriber:e}=this;if(this._complete){let t=()=>this._complete.call(this._context);!Ji.useDeprecatedSynchronousErrorHandling||!e.syncErrorThrowable?(this.__tryOrUnsub(t),this.unsubscribe()):(this.__tryOrSetError(e,t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(i){if(this.unsubscribe(),Ji.useDeprecatedSynchronousErrorHandling)throw i;ws(i)}}__tryOrSetError(e,t,i){if(!Ji.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,i)}catch(r){return Ji.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=r,e.syncErrorThrown=!0,!0):(ws(r),!0)}return!1}_unsubscribe(){let{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}};function yD(n){for(;n;){let{closed:e,destination:t,isStopped:i}=n;if(e||i)return!1;t&&t instanceof Ze?n=t:n=null}return!0}function _D(n,e,t){if(n){if(n instanceof Ze)return n;if(n[Cl])return n[Cl]()}return!n&&!e&&!t?new Ze(zc):new Ze(n,e,t)}var Mo=typeof Symbol=="function"&&Symbol.observable||"@@observable";function ua(n){return n}function rp(...n){return ib(n)}function ib(n){return n.length===0?ua:n.length===1?n[0]:function(t){return n.reduce((i,r)=>r(i),t)}}var Qe=(()=>{class n{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(t){let i=new n;return i.source=this,i.operator=t,i}subscribe(t,i,r){let{operator:o}=this,s=_D(t,i,r);if(o?s.add(o.call(s,this.source)):s.add(this.source||Ji.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),Ji.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(t){try{return this._subscribe(t)}catch(i){Ji.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=i),yD(t)?t.error(i):console.warn(i)}}forEach(t,i){return i=vD(i),new i((r,o)=>{let s;s=this.subscribe(a=>{try{t(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(t){let{source:i}=this;return i&&i.subscribe(t)}[Mo](){return this}pipe(...t){return t.length===0?this:ib(t)(this)}toPromise(t){return t=vD(t),new t((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=e=>new n(e),n})();function vD(n){if(n||(n=Ji.Promise||Promise),!n)throw new Error("no Promise impl found");return n}var aV=(()=>{function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n})(),Do=aV;var Hc=class extends et{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;let e=this.subject,t=e.observers;if(this.subject=null,!t||t.length===0||e.isStopped||e.closed)return;let i=t.indexOf(this.subscriber);i!==-1&&t.splice(i,1)}};var op=class extends Ze{constructor(e){super(e),this.destination=e}},pe=(()=>{class n extends Qe{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[Cl](){return new op(this)}lift(t){let i=new cm(this,this);return i.operator=t,i}next(t){if(this.closed)throw new Do;if(!this.isStopped){let{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew cm(e,t),n})(),cm=class extends pe{constructor(e,t){super(),this.destination=e,this.source=t}next(e){let{destination:t}=this;t&&t.next&&t.next(e)}error(e){let{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){let{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){let{source:t}=this;return t?this.source.subscribe(e):et.EMPTY}};function $c(){return function(e){return e.lift(new rb(e))}}var rb=class{constructor(e){this.connectable=e}call(e,t){let{connectable:i}=this;i._refCount++;let r=new ob(e,i),o=t.subscribe(r);return r.closed||(r.connection=i.connect()),o}},ob=class extends Ze{constructor(e,t){super(e),this.connectable=t}_unsubscribe(){let{connectable:e}=this;if(!e){this.connection=null;return}this.connectable=null;let t=e._refCount;if(t<=0){this.connection=null;return}if(e._refCount=t-1,t>1){this.connection=null;return}let{connection:i}=this,r=e._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}};var wl=class extends Qe{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,e=this._connection=new et,e.add(this.source.subscribe(new sb(this.getSubject(),this))),e.closed&&(this._connection=null,e=et.EMPTY)),e}refCount(){return $c()(this)}},R_e=(()=>{let n=wl.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:n._subscribe},_isComplete:{value:n._isComplete,writable:!0},getSubject:{value:n.getSubject},connect:{value:n.connect},refCount:{value:n.refCount}}})(),sb=class extends op{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){let e=this.connectable;if(e){this.connectable=null;let t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}};var Fn=class extends pe{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let t=super._subscribe(e);return t&&!t.closed&&e.next(this._value),t}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Do;return this._value}next(e){super.next(this._value=e)}};var um=class extends et{constructor(e,t){super()}schedule(e,t=0){return this}};var Oo=class extends um{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;let i=this.id,r=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(r,i,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this}requestAsyncId(e,t,i=0){return setInterval(e.flush.bind(e,this),i)}recycleAsyncId(e,t,i=0){if(i!==null&&this.delay===i&&this.pending===!1)return t;clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let i=this._execute(e,t);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let i=!1,r;try{this.work(e)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){let e=this.id,t=this.scheduler,i=t.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,r!==-1&&i.splice(r,1),e!=null&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}};var dm=class extends Oo{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}schedule(e,t=0){return t>0?super.schedule(e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}execute(e,t){return t>0||this.closed?super.execute(e,t):this._execute(e,t)}requestAsyncId(e,t,i=0){return i!==null&&i>0||i===null&&this.delay>0?super.requestAsyncId(e,t,i):e.flush(this)}};var ab=(()=>{class n{constructor(t,i=n.now){this.SchedulerAction=t,this.now=i}schedule(t,i=0,r){return new this.SchedulerAction(this,t).schedule(r,i)}}return n.now=()=>Date.now(),n})();var Ao=class n extends ab{constructor(e,t=ab.now){super(e,()=>n.delegate&&n.delegate!==this?n.delegate.now():t()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,t=0,i){return n.delegate&&n.delegate!==this?n.delegate.schedule(e,t,i):super.schedule(e,t,i)}flush(e){let{actions:t}=this;if(this.active){t.push(e);return}let i;this.active=!0;do if(i=e.execute(e.state,e.delay))break;while(e=t.shift());if(this.active=!1,i){for(;e=t.shift();)e.unsubscribe();throw i}}};var pm=class extends Ao{};var sp=new pm(dm),lb=sp;var vi=new Qe(n=>n.complete());function da(n){return n?lV(n):vi}function lV(n){return new Qe(e=>n.schedule(()=>e.complete()))}function so(n){return n&&typeof n.schedule=="function"}var hm=n=>e=>{for(let t=0,i=n.length;t{let i=new et,r=0;return i.add(e.schedule(function(){if(r===n.length){t.complete();return}t.next(n[r++]),t.closed||i.add(this.schedule())})),i})}function Gc(n,e){return e?Wc(n,e):new Qe(hm(n))}function ke(...n){let e=n[n.length-1];return so(e)?(n.pop(),Wc(n,e)):Gc(n)}function Zn(n,e){return e?new Qe(t=>e.schedule(cV,0,{error:n,subscriber:t})):new Qe(t=>t.error(n))}function cV({error:n,subscriber:e}){e.error(n)}var lr=class n{constructor(e,t,i){this.kind=e,this.value=t,this.error=i,this.hasValue=e==="N"}observe(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}do(e,t,i){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return i&&i()}}accept(e,t,i){return e&&typeof e.next=="function"?this.observe(e):this.do(e,t,i)}toObservable(){switch(this.kind){case"N":return ke(this.value);case"E":return Zn(this.error);case"C":return da()}throw new Error("unexpected notification kind value")}static createNext(e){return typeof e<"u"?new n("N",e):n.undefinedValueNotification}static createError(e){return new n("E",void 0,e)}static createComplete(){return n.completeNotification}};lr.completeNotification=new lr("C");lr.undefinedValueNotification=new lr("N",void 0);function db(n,e=0){return function(i){return i.lift(new cb(n,e))}}var cb=class{constructor(e,t=0){this.scheduler=e,this.delay=t}call(e,t){return t.subscribe(new ap(e,this.scheduler,this.delay))}},ap=class n extends Ze{constructor(e,t,i=0){super(e),this.scheduler=t,this.delay=i}static dispatch(e){let{notification:t,destination:i}=e;t.observe(i),this.unsubscribe()}scheduleMessage(e){this.destination.add(this.scheduler.schedule(n.dispatch,this.delay,new ub(e,this.destination)))}_next(e){this.scheduleMessage(lr.createNext(e))}_error(e){this.scheduleMessage(lr.createError(e)),this.unsubscribe()}_complete(){this.scheduleMessage(lr.createComplete()),this.unsubscribe()}},ub=class{constructor(e,t){this.notification=e,this.destination=t}};var ao=class extends pe{constructor(e=Number.POSITIVE_INFINITY,t=Number.POSITIVE_INFINITY,i){super(),this.scheduler=i,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=e<1?1:e,this._windowTime=t<1?1:t,t===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(e){if(!this.isStopped){let t=this._events;t.push(e),t.length>this._bufferSize&&t.shift()}super.next(e)}nextTimeWindow(e){this.isStopped||(this._events.push(new pb(this._getNow(),e)),this._trimBufferThenGetEvents()),super.next(e)}_subscribe(e){let t=this._infiniteTimeWindow,i=t?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length,s;if(this.closed)throw new Do;if(this.isStopped||this.hasError?s=et.EMPTY:(this.observers.push(e),s=new Hc(this,e)),r&&e.add(e=new ap(e,r)),t)for(let a=0;at&&(s=Math.max(s,o-t)),s>0&&r.splice(0,s),r}},pb=class{constructor(e,t){this.time=e,this.value=t}};var uV=1,dV=Promise.resolve(),hb={};function bD(n){return n in hb?(delete hb[n],!0):!1}var fb={setImmediate(n){let e=uV++;return hb[e]=!0,dV.then(()=>bD(e)&&n()),e},clearImmediate(n){bD(n)}};var fm=class extends Oo{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,i=0){return i!==null&&i>0?super.requestAsyncId(e,t,i):(e.actions.push(this),e.scheduled||(e.scheduled=fb.setImmediate(e.flush.bind(e,null))))}recycleAsyncId(e,t,i=0){if(i!==null&&i>0||i===null&&this.delay>0)return super.recycleAsyncId(e,t,i);e.actions.length===0&&(fb.clearImmediate(t),e.scheduled=void 0)}};var mm=class extends Ao{flush(e){this.active=!0,this.scheduled=void 0;let{actions:t}=this,i,r=-1,o=t.length;e=e||t.shift();do if(i=e.execute(e.state,e.delay))break;while(++r0?super.requestAsyncId(e,t,i):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(()=>e.flush(null))))}recycleAsyncId(e,t,i=0){if(i!==null&&i>0||i===null&&this.delay>0)return super.recycleAsyncId(e,t,i);e.actions.length===0&&(cancelAnimationFrame(t),e.scheduled=void 0)}};var ym=class extends Ao{flush(e){this.active=!0,this.scheduled=void 0;let{actions:t}=this,i,r=-1,o=t.length;e=e||t.shift();do if(i=e.execute(e.state,e.delay))break;while(++r{function n(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return n.prototype=Object.create(Error.prototype),n})(),vm=hV;var fV=(()=>{function n(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return n.prototype=Object.create(Error.prototype),n})(),Is=fV;function Ie(n,e){return function(i){if(typeof n!="function")throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new mb(n,e))}}var mb=class{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new gb(e,this.project,this.thisArg))}},gb=class extends Ze{constructor(e,t,i){super(e),this.project=t,this.count=0,this.thisArg=i||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(i){this.destination.error(i);return}this.destination.next(t)}};var qc=class extends Ze{notifyNext(e,t,i,r,o){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}};var bm=class extends Ze{constructor(e,t,i){super(),this.parent=e,this.outerValue=t,this.outerIndex=i,this.index=0}_next(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}_error(e){this.parent.notifyError(e,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}};var CD=n=>e=>(n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,ws),e);function mV(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var pa=mV();var wD=n=>e=>{let t=n[pa]();do{let i;try{i=t.next()}catch(r){return e.error(r),e}if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}while(!0);return typeof t.return=="function"&&e.add(()=>{t.return&&t.return()}),e};var ID=n=>e=>{let t=n[Mo]();if(typeof t.subscribe!="function")throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};var Cm=n=>n&&typeof n.length=="number"&&typeof n!="function";function wm(n){return!!n&&typeof n.subscribe!="function"&&typeof n.then=="function"}var Qc=n=>{if(n&&typeof n[Mo]=="function")return ID(n);if(Cm(n))return hm(n);if(wm(n))return CD(n);if(n&&typeof n[pa]=="function")return wD(n);{let t=`You provided ${Uc(n)?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(t)}};function Im(n,e,t,i,r=new bm(n,t,i)){if(!r.closed)return e instanceof Qe?e.subscribe(r):Qc(e)(r)}var xD={};function xs(...n){let e,t;return so(n[n.length-1])&&(t=n.pop()),typeof n[n.length-1]=="function"&&(e=n.pop()),n.length===1&&oo(n[0])&&(n=n[0]),Gc(n,t).lift(new yb(e))}var yb=class{constructor(e){this.resultSelector=e}call(e,t){return t.subscribe(new _b(e,this.resultSelector))}},_b=class extends qc{constructor(e,t){super(e),this.resultSelector=t,this.active=0,this.values=[],this.observables=[]}_next(e){this.values.push(xD),this.observables.push(e)}_complete(){let e=this.observables,t=e.length;if(t===0)this.destination.complete();else{this.active=t,this.toRespond=t;for(let i=0;i{let i=new et;return i.add(e.schedule(()=>{let r=n[Mo]();i.add(r.subscribe({next(o){i.add(e.schedule(()=>t.next(o)))},error(o){i.add(e.schedule(()=>t.error(o)))},complete(){i.add(e.schedule(()=>t.complete()))}}))})),i})}function ED(n,e){return new Qe(t=>{let i=new et;return i.add(e.schedule(()=>n.then(r=>{i.add(e.schedule(()=>{t.next(r),i.add(e.schedule(()=>t.complete()))}))},r=>{i.add(e.schedule(()=>t.error(r)))}))),i})}function SD(n,e){if(!n)throw new Error("Iterable cannot be null");return new Qe(t=>{let i=new et,r;return i.add(()=>{r&&typeof r.return=="function"&&r.return()}),i.add(e.schedule(()=>{r=n[pa](),i.add(e.schedule(function(){if(t.closed)return;let o,s;try{let a=r.next();o=a.value,s=a.done}catch(a){t.error(a);return}s?t.complete():(t.next(o),this.schedule())}))})),i})}function MD(n){return n&&typeof n[Mo]=="function"}function DD(n){return n&&typeof n[pa]=="function"}function cp(n,e){if(n!=null){if(MD(n))return TD(n,e);if(wm(n))return ED(n,e);if(Cm(n))return Wc(n,e);if(DD(n)||typeof n=="string")return SD(n,e)}throw new TypeError((n!==null&&typeof n||n)+" is not observable")}function Yt(n,e){return e?cp(n,e):n instanceof Qe?n:new Qe(Qc(n))}var Ir=class extends Ze{constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}};var xr=class extends Ze{notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}};function No(n,e){if(e.closed)return;if(n instanceof Qe)return n.subscribe(e);let t;try{t=Qc(n)(e)}catch(i){e.error(i)}return t}function Jn(n,e,t=Number.POSITIVE_INFINITY){return typeof e=="function"?i=>i.pipe(Jn((r,o)=>Yt(n(r,o)).pipe(Ie((s,a)=>e(r,s,o,a))),t)):(typeof e=="number"&&(t=e),i=>i.lift(new vb(n,t)))}var vb=class{constructor(e,t=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=t}call(e,t){return t.subscribe(new bb(e,this.project,this.concurrent))}},bb=class extends xr{constructor(e,t,i=Number.POSITIVE_INFINITY){super(e),this.project=t,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active0?this._next(e.shift()):this.active===0&&this.hasCompleted&&this.destination.complete()}};function ha(n=Number.POSITIVE_INFINITY){return Jn(ua,n)}function OD(){return ha(1)}function Kc(...n){return OD()(ke(...n))}function xm(n){return new Qe(e=>{let t;try{t=n()}catch(r){e.error(r);return}return(t?Yt(t):da()).subscribe(e)})}function Cb(...n){if(n.length===1){let e=n[0];if(oo(e))return Tm(e,null);if(Uc(e)&&Object.getPrototypeOf(e)===Object.prototype){let t=Object.keys(e);return Tm(t.map(i=>e[i]),t)}}if(typeof n[n.length-1]=="function"){let e=n.pop();return n=n.length===1&&oo(n[0])?n[0]:n,Tm(n,null).pipe(Ie(t=>e(...t)))}return Tm(n,null)}function Tm(n,e){return new Qe(t=>{let i=n.length;if(i===0){t.complete();return}let r=new Array(i),o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>t.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&t.next(e?e.reduce((u,d,p)=>(u[d]=r[p],u),{}):r),t.complete())}}))}})}function Il(n,e,t,i){return Cs(t)&&(i=t,t=void 0),i?Il(n,e,t).pipe(Ie(r=>oo(r)?i(...r):i(r))):new Qe(r=>{function o(s){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(s)}AD(n,e,o,r,t)})}function AD(n,e,t,i,r){let o;if(_V(n)){let s=n;n.addEventListener(e,t,r),o=()=>s.removeEventListener(e,t,r)}else if(yV(n)){let s=n;n.on(e,t),o=()=>s.off(e,t)}else if(gV(n)){let s=n;n.addListener(e,t),o=()=>s.removeListener(e,t)}else if(n&&n.length)for(let s=0,a=n.length;s=0}function wb(n=0,e=cr){return(!up(n)||n<0)&&(n=0),(!e||typeof e.schedule!="function")&&(e=cr),new Qe(t=>(t.add(e.schedule(vV,n,{subscriber:t,counter:0,period:n})),t))}function vV(n){let{subscriber:e,counter:t,period:i}=n;e.next(t),this.schedule({subscriber:e,counter:t+1,period:i},i)}function dp(...n){let e=Number.POSITIVE_INFINITY,t=null,i=n[n.length-1];return so(i)?(t=n.pop(),n.length>1&&typeof n[n.length-1]=="number"&&(e=n.pop())):typeof i=="number"&&(e=n.pop()),t===null&&n.length===1&&n[0]instanceof Qe?n[0]:ha(e)(Gc(n,t))}function rn(n,e){return function(i){return i.lift(new Ib(n,e))}}var Ib=class{constructor(e,t){this.predicate=e,this.thisArg=t}call(e,t){return t.subscribe(new xb(e,this.predicate,this.thisArg))}},xb=class extends Ze{constructor(e,t,i){super(e),this.predicate=t,this.thisArg=i,this.count=0}_next(e){let t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(i){this.destination.error(i);return}t&&this.destination.next(e)}};function pp(n=0,e,t){let i=-1;return up(e)?i=Number(e)<1&&1||Number(e):so(e)&&(t=e),so(t)||(t=cr),new Qe(r=>{let o=up(n)?n:+n-t.now();return t.schedule(bV,o,{index:0,period:i,subscriber:r})})}function bV(n){let{index:e,period:t,subscriber:i}=n;if(i.next(e),!i.closed){if(t===-1)return i.complete();n.index=e+1,this.schedule(n,t)}}function kD(n){return function(t){return t.lift(new Tb(n))}}var Tb=class{constructor(e){this.durationSelector=e}call(e,t){return t.subscribe(new Eb(e,this.durationSelector))}},Eb=class extends xr{constructor(e,t){super(e),this.durationSelector=t,this.hasValue=!1}_next(e){if(this.value=e,this.hasValue=!0,!this.throttled){let t;try{let{durationSelector:r}=this;t=r(e)}catch(r){return this.destination.error(r)}let i=No(t,new Ir(this));!i||i.closed?this.clearThrottle():this.add(this.throttled=i)}}clearThrottle(){let{value:e,hasValue:t,throttled:i}=this;i&&(this.remove(i),this.throttled=void 0,i.unsubscribe()),t&&(this.value=void 0,this.hasValue=!1,this.destination.next(e))}notifyNext(){this.clearThrottle()}notifyComplete(){this.clearThrottle()}};function Sb(n,e=cr){return kD(()=>pp(n,e))}function Nn(n){return function(t){let i=new Mb(n),r=t.lift(i);return i.caught=r}}var Mb=class{constructor(e){this.selector=e}call(e,t){return t.subscribe(new Db(e,this.selector,this.caught))}},Db=class extends xr{constructor(e,t,i){super(e),this.selector=t,this.caught=i}error(e){if(!this.isStopped){let t;try{t=this.selector(e,this.caught)}catch(o){super.error(o);return}this._unsubscribeAndRecycle();let i=new Ir(this);this.add(i);let r=No(t,i);r!==i&&this.add(r)}}};function lo(n,e){return Jn(n,e,1)}function Ts(n,e=cr){return t=>t.lift(new Ob(n,e))}var Ob=class{constructor(e,t){this.dueTime=e,this.scheduler=t}call(e,t){return t.subscribe(new Ab(e,this.dueTime,this.scheduler))}},Ab=class extends Ze{constructor(e,t,i){super(e),this.dueTime=t,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(CV,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){let{lastValue:e}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}clearDebounce(){let e=this.debouncedSubscription;e!==null&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}};function CV(n){n.debouncedNext()}function fa(n=null){return e=>e.lift(new kb(n))}var kb=class{constructor(e){this.defaultValue=e}call(e,t){return t.subscribe(new Nb(e,this.defaultValue))}},Nb=class extends Ze{constructor(e,t){super(e),this.defaultValue=t,this.isEmpty=!0}_next(e){this.isEmpty=!1,this.destination.next(e)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}};function ND(n){return n instanceof Date&&!isNaN(+n)}function Fb(n,e=cr){let i=ND(n)?+n-e.now():Math.abs(n);return r=>r.lift(new Lb(i,e))}var Lb=class{constructor(e,t){this.delay=e,this.scheduler=t}call(e,t){return t.subscribe(new Pb(e,this.delay,this.scheduler))}},Pb=class n extends Ze{constructor(e,t,i){super(e),this.delay=t,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(e){let t=e.source,i=t.queue,r=e.scheduler,o=e.destination;for(;i.length>0&&i[0].time-r.now()<=0;)i.shift().notification.observe(o);if(i.length>0){let s=Math.max(0,i[0].time-r.now());this.schedule(e,s)}else this.unsubscribe(),t.active=!1}_schedule(e){this.active=!0,this.destination.add(e.schedule(n.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))}scheduleNotification(e){if(this.errored===!0)return;let t=this.scheduler,i=new Rb(t.now()+this.delay,e);this.queue.push(i),this.active===!1&&this._schedule(t)}_next(e){this.scheduleNotification(lr.createNext(e))}_error(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()}_complete(){this.scheduleNotification(lr.createComplete()),this.unsubscribe()}},Rb=class{constructor(e,t){this.time=e,this.notification=t}};function hp(n,e){return t=>t.lift(new jb(n,e))}var jb=class{constructor(e,t){this.compare=e,this.keySelector=t}call(e,t){return t.subscribe(new Vb(e,this.compare,this.keySelector))}},Vb=class extends Ze{constructor(e,t,i){super(e),this.keySelector=i,this.hasKey=!1,typeof t=="function"&&(this.compare=t)}compare(e,t){return e===t}_next(e){let t;try{let{keySelector:r}=this;t=r?r(e):e}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{let{compare:r}=this;i=r(this.key,t)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=t,this.destination.next(e))}};function Em(n=wV){return e=>e.lift(new Bb(n))}var Bb=class{constructor(e){this.errorFactory=e}call(e,t){return t.subscribe(new zb(e,this.errorFactory))}},zb=class extends Ze{constructor(e,t){super(e),this.errorFactory=t,this.hasValue=!1}_next(e){this.hasValue=!0,this.destination.next(e)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}};function wV(){return new Is}function xt(n){return e=>n===0?da():e.lift(new Ub(n))}var Ub=class{constructor(e){if(this.total=e,this.total<0)throw new vm}call(e,t){return t.subscribe(new Hb(e,this.total))}},Hb=class extends Ze{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){let t=this.total,i=++this.count;i<=t&&(this.destination.next(e),i===t&&(this.destination.complete(),this.unsubscribe()))}};function Tr(n){return e=>e.lift(new $b(n))}var $b=class{constructor(e){this.callback=e}call(e,t){return t.subscribe(new Wb(e,this.callback))}},Wb=class extends Ze{constructor(e,t){super(e),this.add(new et(t))}};function Lo(n,e){let t=arguments.length>=2;return i=>i.pipe(n?rn((r,o)=>n(r,o,i)):ua,xt(1),t?fa(e):Em(()=>new Is))}function Yc(n){return function(t){return n===0?da():t.lift(new Gb(n))}}var Gb=class{constructor(e){if(this.total=e,this.total<0)throw new vm}call(e,t){return t.subscribe(new qb(e,this.total))}},qb=class extends Ze{constructor(e,t){super(e),this.total=t,this.ring=new Array,this.count=0}_next(e){let t=this.ring,i=this.total,r=this.count++;if(t.length0){let i=this.count>=this.total?this.total:this.count,r=this.ring;for(let o=0;o=2;return i=>i.pipe(n?rn((r,o)=>n(r,o,i)):ua,Yc(1),t?fa(e):Em(()=>new Is))}function Zb(n){return e=>e.lift(new Kb(n))}var Kb=class{constructor(e){this.value=e}call(e,t){return t.subscribe(new Yb(e,this.value))}},Yb=class extends Ze{constructor(e,t){super(e),this.value=t}_next(e){this.destination.next(this.value)}};function e1(n,e){let t=!1;return arguments.length>=2&&(t=!0),function(r){return r.lift(new Jb(n,e,t))}}var Jb=class{constructor(e,t,i=!1){this.accumulator=e,this.seed=t,this.hasSeed=i}call(e,t){return t.subscribe(new Xb(e,this.accumulator,this.seed,this.hasSeed))}},Xb=class extends Ze{constructor(e,t,i,r){super(e),this.accumulator=t,this._seed=i,this.hasSeed=r,this.index=0}get seed(){return this._seed}set seed(e){this.hasSeed=!0,this._seed=e}_next(e){if(!this.hasSeed)this.seed=e,this.destination.next(e);else return this._tryNext(e)}_tryNext(e){let t=this.index++,i;try{i=this.accumulator(this.seed,e,t)}catch(r){this.destination.error(r)}this.seed=i,this.destination.next(i)}};function Wt(...n){let e=n.length;if(e===0)throw new Error("list of properties cannot be empty.");return t=>Ie(IV(n,e))(t)}function IV(n,e){return i=>{let r=i;for(let o=0;or.lift(xV(i))}function xV({bufferSize:n=Number.POSITIVE_INFINITY,windowTime:e=Number.POSITIVE_INFINITY,refCount:t,scheduler:i}){let r,o=0,s,a=!1,l=!1;return function(u){o++;let d;!r||a?(a=!1,r=new ao(n,e,i),d=r.subscribe(this),s=u.subscribe({next(p){r.next(p)},error(p){a=!0,r.error(p)},complete(){l=!0,s=void 0,r.complete()}}),l&&(s=void 0)):d=r.subscribe(this),this.add(()=>{o--,d.unsubscribe(),d=void 0,s&&!l&&t&&o===0&&(s.unsubscribe(),s=void 0,r=void 0)})}}function xl(n){return e=>e.lift(new t1(n))}var t1=class{constructor(e){this.total=e}call(e,t){return t.subscribe(new n1(e,this.total))}},n1=class extends Ze{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){++this.count>this.total&&this.destination.next(e)}};function fp(...n){let e=n[n.length-1];return so(e)?(n.pop(),t=>Kc(n,t,e)):t=>Kc(n,t)}function Zt(n,e){return typeof e=="function"?t=>t.pipe(Zt((i,r)=>Yt(n(i,r)).pipe(Ie((o,s)=>e(i,o,r,s))))):t=>t.lift(new i1(n))}var i1=class{constructor(e){this.project=e}call(e,t){return t.subscribe(new r1(e,this.project))}},r1=class extends xr{constructor(e,t){super(e),this.project=t,this.index=0}_next(e){let t,i=this.index++;try{t=this.project(e,i)}catch(r){this.destination.error(r);return}this._innerSub(t)}_innerSub(e){let t=this.innerSubscription;t&&t.unsubscribe();let i=new Ir(this),r=this.destination;r.add(i),this.innerSubscription=No(e,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){let{innerSubscription:e}=this;(!e||e.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(e){this.destination.next(e)}};function Ft(n){return e=>e.lift(new o1(n))}var o1=class{constructor(e){this.notifier=e}call(e,t){let i=new s1(e),r=No(this.notifier,new Ir(i));return r&&!i.seenValue?(i.add(r),t.subscribe(i)):i}},s1=class extends xr{constructor(e){super(e),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}};function jt(n,e,t){return function(r){return r.lift(new a1(n,e,t))}}var a1=class{constructor(e,t,i){this.nextOrObserver=e,this.error=t,this.complete=i}call(e,t){return t.subscribe(new l1(e,this.nextOrObserver,this.error,this.complete))}},l1=class extends Ze{constructor(e,t,i,r){super(e),this._tapNext=wr,this._tapError=wr,this._tapComplete=wr,this._tapError=i||wr,this._tapComplete=r||wr,Cs(t)?(this._context=this,this._tapNext=t):t&&(this._context=t,this._tapNext=t.next||wr,this._tapError=t.error||wr,this._tapComplete=t.complete||wr)}_next(e){try{this._tapNext.call(this._context,e)}catch(t){this.destination.error(t);return}this.destination.next(e)}_error(e){try{this._tapError.call(this._context,e)}catch(t){this.destination.error(t);return}this.destination.error(e)}_complete(){try{this._tapComplete.call(this._context)}catch(e){this.destination.error(e);return}return this.destination.complete()}};var LD={leading:!0,trailing:!1};function d1(n,e=cr,t=LD){return i=>i.lift(new c1(n,e,t.leading,t.trailing))}var c1=class{constructor(e,t,i,r){this.duration=e,this.scheduler=t,this.leading=i,this.trailing=r}call(e,t){return t.subscribe(new u1(e,this.duration,this.scheduler,this.leading,this.trailing))}},u1=class extends Ze{constructor(e,t,i,r,o){super(e),this.duration=t,this.scheduler=i,this.leading=r,this.trailing=o,this._hasTrailingValue=!1,this._trailingValue=null}_next(e){this.throttled?this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(TV,this.duration,{subscriber:this})),this.leading?this.destination.next(e):this.trailing&&(this._trailingValue=e,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){let e=this.throttled;e&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),e.unsubscribe(),this.remove(e),this.throttled=null)}};function TV(n){let{subscriber:e}=n;e.clearThrottle()}function Tl(...n){return e=>{let t;typeof n[n.length-1]=="function"&&(t=n.pop());let i=n;return e.lift(new p1(i,t))}}var p1=class{constructor(e,t){this.observables=e,this.project=t}call(e,t){return t.subscribe(new h1(e,this.observables,this.project))}},h1=class extends qc{constructor(e,t,i){super(e),this.observables=t,this.project=i,this.toRespond=[];let r=t.length;this.values=new Array(r);for(let o=0;o0){let o=r.indexOf(i);o!==-1&&r.splice(o,1)}}notifyComplete(){}_next(e){if(this.toRespond.length===0){let t=[e,...this.values];this.project?this._tryProject(t):this.destination.next(t)}}_tryProject(e){let t;try{t=this.project.apply(this,e)}catch(i){this.destination.error(i);return}this.destination.next(t)}};var T2="https://g.co/ng/security#xss",ie=class extends Error{constructor(e,t){super(_g(e,t)),this.code=e}};function _g(n,e){return`${`NG0${Math.abs(n)}`}${e?": "+e:""}`}var E2=Symbol("InputSignalNode#UNSET"),EV=R(I({},tb),{transformFn:void 0,applyValueToInputSignal(n,e){am(n,e)}});function S2(n,e){let t=Object.create(EV);t.value=n,t.transformFn=e?.transform;function i(){if(tm(t),t.value===E2)throw new ie(-950,!1);return t.value}return i[ro]=t,i}function Mp(n){return{toString:n}.toString()}var Mm="__parameters__";function SV(n){return function(...t){if(n){let i=n(...t);for(let r in i)this[r]=i[r]}}}function FC(n,e,t){return Mp(()=>{let i=SV(e);function r(...o){if(this instanceof r)return i.apply(this,o),this;let s=new r(...o);return a.annotation=s,a;function a(l,c,u){let d=l.hasOwnProperty(Mm)?l[Mm]:Object.defineProperty(l,Mm,{value:[]})[Mm];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}var ur=globalThis;function un(n){for(let e in n)if(n[e]===un)return e;throw Error("Could not find renamed property on target object.")}function MV(n,e){for(let t in e)e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&(n[t]=e[t])}function Bi(n){if(typeof n=="string")return n;if(Array.isArray(n))return"["+n.map(Bi).join(", ")+"]";if(n==null)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;let e=n.toString();if(e==null)return""+e;let t=e.indexOf(` +`);return t===-1?e:e.substring(0,t)}function S1(n,e){return n==null||n===""?e===null?"":e:e==null||e===""?n:n+" "+e}var DV=un({__forward_ref__:un});function dn(n){return n.__forward_ref__=dn,n.toString=function(){return Bi(this())},n}function Vi(n){return M2(n)?n():n}function M2(n){return typeof n=="function"&&n.hasOwnProperty(DV)&&n.__forward_ref__===dn}function K(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function ae(n){return{providers:n.providers||[],imports:n.imports||[]}}function vg(n){return PD(n,O2)||PD(n,A2)}function D2(n){return vg(n)!==null}function PD(n,e){return n.hasOwnProperty(e)?n[e]:null}function OV(n){let e=n&&(n[O2]||n[A2]);return e||null}function RD(n){return n&&(n.hasOwnProperty(FD)||n.hasOwnProperty(AV))?n[FD]:null}var O2=un({\u0275prov:un}),FD=un({\u0275inj:un}),A2=un({ngInjectableDef:un}),AV=un({ngInjectorDef:un}),be=class{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=K({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function k2(n){return n&&!!n.\u0275providers}var kV=un({\u0275cmp:un}),NV=un({\u0275dir:un}),LV=un({\u0275pipe:un}),PV=un({\u0275mod:un}),Um=un({\u0275fac:un}),gp=un({__NG_ELEMENT_ID__:un}),jD=un({__NG_ENV_ID__:un});function Fo(n){return typeof n=="string"?n:n==null?"":String(n)}function RV(n){return typeof n=="function"?n.name||n.toString():typeof n=="object"&&n!=null&&typeof n.type=="function"?n.type.name||n.type.toString():Fo(n)}function FV(n,e){let t=e?`. Dependency path: ${e.join(" > ")} > ${n}`:"";throw new ie(-200,n)}function jC(n,e){throw new ie(-201,!1)}var Et=function(n){return n[n.Default=0]="Default",n[n.Host=1]="Host",n[n.Self=2]="Self",n[n.SkipSelf=4]="SkipSelf",n[n.Optional=8]="Optional",n}(Et||{}),M1;function N2(){return M1}function Xi(n){let e=M1;return M1=n,e}function L2(n,e,t){let i=vg(n);if(i&&i.providedIn=="root")return i.value===void 0?i.value=i.factory():i.value;if(t&Et.Optional)return null;if(e!==void 0)return e;jC(n,"Injector")}var jV={},_p=jV,D1="__NG_DI_FLAG__",Hm="ngTempTokenPath",VV="ngTokenPath",BV=/\n/gm,zV="\u0275",VD="__source",tu;function UV(){return tu}function ma(n){let e=tu;return tu=n,e}function HV(n,e=Et.Default){if(tu===void 0)throw new ie(-203,!1);return tu===null?L2(n,void 0,e):tu.get(n,e&Et.Optional?null:void 0,e)}function re(n,e=Et.Default){return(N2()||HV)(Vi(n),e)}function B(n,e=Et.Default){return re(n,bg(e))}function bg(n){return typeof n>"u"||typeof n=="number"?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function O1(n){let e=[];for(let t=0;t ");else if(typeof e=="object"){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):Bi(a)))}r=`{${o.join(", ")}}`}return`${t}${i?"("+i+")":""}[${r}]: ${n.replace(BV,` + `)}`}var P2=VC(FC("Inject",n=>({token:n})),-1),Dp=VC(FC("Optional"),8);var Cg=VC(FC("SkipSelf"),4);function Dl(n,e){let t=n.hasOwnProperty(Um);return t?n[Um]:null}function qV(n,e,t){if(n.length!==e.length)return!1;for(let i=0;iArray.isArray(t)?BC(t,e):e(t))}function R2(n,e,t){e>=n.length?n.push(t):n.splice(e,0,t)}function $m(n,e){return e>=n.length-1?n.pop():n.splice(e,1)[0]}function KV(n,e){let t=[];for(let i=0;ie;){let o=r-2;n[r]=n[o],r--}n[e]=t,n[e+1]=i}}function wg(n,e,t){let i=Op(n,e);return i>=0?n[i|1]=t:(i=~i,YV(n,i,e,t)),i}function f1(n,e){let t=Op(n,e);if(t>=0)return n[t|1]}function Op(n,e){return ZV(n,e,1)}function ZV(n,e,t){let i=0,r=n.length>>t;for(;r!==i;){let o=i+(r-i>>1),s=n[o<e?r=o:i=o+1}return~(r<e){s=o-1;break}}}for(;o-1){let o;for(;++ro?d="":d=r[u+1].toLowerCase(),i&2&&c!==d){if(co(i))return!1;s=!0}}}}return co(i)||s}function co(n){return(n&1)===0}function r9(n,e,t,i){if(e===null)return-1;let r=0;if(i||!t){let o=!1;for(;r-1)for(t++;t0?'="'+a+'"':"")+"]"}else i&8?r+="."+s:i&4&&(r+=" "+s);else r!==""&&!co(s)&&(e+=zD(o,r),r=""),i=s,o=o||!co(i);t++}return r!==""&&(e+=zD(o,r)),e}function u9(n){return n.map(c9).join(",")}function d9(n){let e=[],t=[],i=1,r=2;for(;i{let e=G2(n),t=R(I({},e),{decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===V2.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&n.dependencies||null,getStandaloneInjector:null,signals:n.signals??!1,data:n.data||{},encapsulation:n.encapsulation||jo.Emulated,styles:n.styles||er,_:null,schemas:n.schemas||null,tView:null,id:""});q2(t);let i=n.dependencies;return t.directiveDefs=Gm(i,!1),t.pipeDefs=Gm(i,!0),t.id=f9(t),t})}function p9(n){return Es(n)||U2(n)}function h9(n){return n!==null}function le(n){return Mp(()=>({type:n.type,bootstrap:n.bootstrap||er,declarations:n.declarations||er,imports:n.imports||er,exports:n.exports||er,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function UD(n,e){if(n==null)return iu;let t={};for(let i in n)if(n.hasOwnProperty(i)){let r=n[i],o,s,a=_a.None;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o):(o=r,s=r),e?(t[o]=a!==_a.None?[i,a]:i,e[o]=s):t[o]=i}return t}function gt(n){return Mp(()=>{let e=G2(n);return q2(e),e})}function As(n){return{type:n.type,name:n.name,factory:null,pure:n.pure!==!1,standalone:n.standalone===!0,onDestroy:n.type.prototype.ngOnDestroy||null}}function Es(n){return n[kV]||null}function U2(n){return n[NV]||null}function H2(n){return n[LV]||null}function $2(n){let e=Es(n)||U2(n)||H2(n);return e!==null?e.standalone:!1}function W2(n,e){let t=n[PV]||null;if(!t&&e===!0)throw new Error(`Type ${Bi(n)} does not have '\u0275mod' property.`);return t}function G2(n){let e={};return{type:n.type,providersResolver:null,factory:null,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:e,inputTransforms:null,inputConfig:n.inputs||iu,exportAs:n.exportAs||null,standalone:n.standalone===!0,signals:n.signals===!0,selectors:n.selectors||er,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:UD(n.inputs,e),outputs:UD(n.outputs),debugInfo:null}}function q2(n){n.features?.forEach(e=>e(n))}function Gm(n,e){if(!n)return null;let t=e?H2:p9;return()=>(typeof n=="function"?n():n).map(i=>t(i)).filter(h9)}function f9(n){let e=0,t=[n.selectors,n.ngContentSelectors,n.hostVars,n.hostAttrs,n.consts,n.vars,n.decls,n.encapsulation,n.standalone,n.signals,n.exportAs,JSON.stringify(n.inputs),JSON.stringify(n.outputs),Object.getOwnPropertyNames(n.type.prototype),!!n.contentQueries,!!n.viewQuery].join("|");for(let r of t)e=Math.imul(31,e)+r.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function Ig(n){return{\u0275providers:n}}function m9(...n){return{\u0275providers:Q2(!0,n),\u0275fromNgModule:!0}}function Q2(n,...e){let t=[],i=new Set,r,o=s=>{t.push(s)};return BC(e,s=>{let a=s;k1(a,o,[],i)&&(r||=[],r.push(a))}),r!==void 0&&K2(r,o),t}function K2(n,e){for(let t=0;t{e(o,i)})}}function k1(n,e,t,i){if(n=Vi(n),!n)return!1;let r=null,o=RD(n),s=!o&&Es(n);if(!o&&!s){let l=n.ngModule;if(o=RD(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=n}let a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)k1(c,e,t,i)}}else if(o){if(o.imports!=null&&!a){i.add(r);let c;try{BC(o.imports,u=>{k1(u,e,t,i)&&(c||=[],c.push(u))})}finally{}c!==void 0&&K2(c,e)}if(!a){let c=Dl(r)||(()=>new r);e({provide:r,useFactory:c,deps:er},r),e({provide:j2,useValue:r,multi:!0},r),e({provide:ru,useValue:()=>re(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=n;UC(l,u=>{e(u,c)})}}else return!1;return r!==n&&n.providers!==void 0}function UC(n,e){for(let t of n)k2(t)&&(t=t.\u0275providers),Array.isArray(t)?UC(t,e):e(t)}var g9=un({provide:String,useValue:un});function Y2(n){return n!==null&&typeof n=="object"&&g9 in n}function y9(n){return!!(n&&n.useExisting)}function _9(n){return!!(n&&n.useFactory)}function ou(n){return typeof n=="function"}function v9(n){return!!n.useClass}var xg=new be(""),Rm={},b9={},m1;function Tg(){return m1===void 0&&(m1=new Wm),m1}var pi=class{},bp=class extends pi{get destroyed(){return this._destroyed}constructor(e,t,i,r){super(),this.parent=t,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,L1(e,s=>this.processProvider(s)),this.records.set(F2,Zc(void 0,this)),r.has("environment")&&this.records.set(pi,Zc(void 0,this));let o=this.records.get(xg);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(j2,er,Et.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;let e=kt(null);try{for(let i of this._ngOnDestroyHooks)i.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let i of t)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),kt(e)}}onDestroy(e){return this.assertNotDestroyed(),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){this.assertNotDestroyed();let t=ma(this),i=Xi(void 0),r;try{return e()}finally{ma(t),Xi(i)}}get(e,t=_p,i=Et.Default){if(this.assertNotDestroyed(),e.hasOwnProperty(jD))return e[jD](this);i=bg(i);let r,o=ma(this),s=Xi(void 0);try{if(!(i&Et.SkipSelf)){let l=this.records.get(e);if(l===void 0){let c=T9(e)&&vg(e);c&&this.injectableDefInScope(c)?l=Zc(N1(e),Rm):l=null,this.records.set(e,l)}if(l!=null)return this.hydrate(e,l)}let a=i&Et.Self?Tg():this.parent;return t=i&Et.Optional&&t===_p?null:t,a.get(e,t)}catch(a){if(a.name==="NullInjectorError"){if((a[Hm]=a[Hm]||[]).unshift(Bi(e)),o)throw a;return WV(a,e,"R3InjectorError",this.source)}else throw a}finally{Xi(s),ma(o)}}resolveInjectorInitializers(){let e=kt(null),t=ma(this),i=Xi(void 0),r;try{let o=this.get(ru,er,Et.Self);for(let s of o)s()}finally{ma(t),Xi(i),kt(e)}}toString(){let e=[],t=this.records;for(let i of t.keys())e.push(Bi(i));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new ie(205,!1)}processProvider(e){e=Vi(e);let t=ou(e)?e:Vi(e&&e.provide),i=w9(e);if(!ou(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Zc(void 0,Rm,!0),r.factory=()=>O1(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,i)}hydrate(e,t){let i=kt(null);try{return t.value===Rm&&(t.value=b9,t.value=t.factory()),typeof t.value=="object"&&t.value&&x9(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{kt(i)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Vi(e.providedIn);return typeof t=="string"?t==="any"||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(e){let t=this._onDestroyHooks.indexOf(e);t!==-1&&this._onDestroyHooks.splice(t,1)}};function N1(n){let e=vg(n),t=e!==null?e.factory:Dl(n);if(t!==null)return t;if(n instanceof be)throw new ie(204,!1);if(n instanceof Function)return C9(n);throw new ie(204,!1)}function C9(n){if(n.length>0)throw new ie(204,!1);let t=OV(n);return t!==null?()=>t.factory(n):()=>new n}function w9(n){if(Y2(n))return Zc(void 0,n.useValue);{let e=Z2(n);return Zc(e,Rm)}}function Z2(n,e,t){let i;if(ou(n)){let r=Vi(n);return Dl(r)||N1(r)}else if(Y2(n))i=()=>Vi(n.useValue);else if(_9(n))i=()=>n.useFactory(...O1(n.deps||[]));else if(y9(n))i=()=>re(Vi(n.useExisting));else{let r=Vi(n&&(n.useClass||n.provide));if(I9(n))i=()=>new r(...O1(n.deps));else return Dl(r)||N1(r)}return i}function Zc(n,e,t=!1){return{factory:n,value:e,multi:t?[]:void 0}}function I9(n){return!!n.deps}function x9(n){return n!==null&&typeof n=="object"&&typeof n.ngOnDestroy=="function"}function T9(n){return typeof n=="function"||typeof n=="object"&&n instanceof be}function L1(n,e){for(let t of n)Array.isArray(t)?L1(t,e):t&&k2(t)?L1(t.\u0275providers,e):e(t)}function Sr(n,e){n instanceof bp&&n.assertNotDestroyed();let t,i=ma(n),r=Xi(void 0);try{return e()}finally{ma(i),Xi(r)}}function J2(){return N2()!==void 0||UV()!=null}function Vl(n){if(!J2())throw new ie(-203,!1)}function E9(n){let e=ur.ng;if(e&&e.\u0275compilerFacade)return e.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}function S9(n){return typeof n=="function"}var ks=0,ct=1,tt=2,wi=3,uo=4,nr=5,su=6,qm=7,bi=8,au=9,Vo=10,xn=11,Cp=12,HD=13,mu=14,dr=15,Ol=16,Jc=17,Ss=18,Eg=19,X2=20,ga=21,Fm=22,Er=23,hi=25,eO=1;var Al=7,Qm=8,lu=9,Ci=10,Km=function(n){return n[n.None=0]="None",n[n.HasTransplantedViews=2]="HasTransplantedViews",n}(Km||{});function ya(n){return Array.isArray(n)&&typeof n[eO]=="object"}function Ns(n){return Array.isArray(n)&&n[eO]===!0}function HC(n){return(n.flags&4)!==0}function Sg(n){return n.componentOffset>-1}function Mg(n){return(n.flags&1)===1}function va(n){return!!n.template}function P1(n){return(n[tt]&512)!==0}var wp=class{constructor(e,t,i){this.previousValue=e,this.currentValue=t,this.firstChange=i}isFirstChange(){return this.firstChange}};function tO(n,e,t,i){e!==null?e.applyValueToInputSignal(e,i):n[t]=i}function Jt(){return nO}function nO(n){return n.type.prototype.ngOnChanges&&(n.setInput=D9),M9}Jt.ngInherit=!0;function M9(){let n=rO(this),e=n?.current;if(e){let t=n.previous;if(t===iu)n.previous=e;else for(let i in e)t[i]=e[i];n.current=null,this.ngOnChanges(e)}}function D9(n,e,t,i,r){let o=this.declaredInputs[i],s=rO(n)||O9(n,{previous:iu,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new wp(c&&c.currentValue,t,l===iu),tO(n,e,r,t)}var iO="__ngSimpleChanges__";function rO(n){return n[iO]||null}function O9(n,e){return n[iO]=e}var $D=null;var Po=function(n,e,t){$D?.(n,e,t)},oO="svg",A9="math";function Bo(n){for(;Array.isArray(n);)n=n[ks];return n}function sO(n,e){return Bo(e[n])}function Mr(n,e){return Bo(e[n.index])}function $C(n,e){return n.data[e]}function aO(n,e){return n[e]}function Ia(n,e){let t=e[n];return ya(t)?t:t[ks]}function k9(n){return(n[tt]&4)===4}function WC(n){return(n[tt]&128)===128}function N9(n){return Ns(n[wi])}function ba(n,e){return e==null?null:n[e]}function lO(n){n[Jc]=0}function cO(n){n[tt]&1024||(n[tt]|=1024,WC(n)&&Og(n))}function L9(n,e){for(;n>0;)e=e[mu],n--;return e}function Dg(n){return!!(n[tt]&9216||n[Er]?.dirty)}function R1(n){n[Vo].changeDetectionScheduler?.notify(8),n[tt]&64&&(n[tt]|=1024),Dg(n)&&Og(n)}function Og(n){n[Vo].changeDetectionScheduler?.notify(0);let e=kl(n);for(;e!==null&&!(e[tt]&8192||(e[tt]|=8192,!WC(e)));)e=kl(e)}function uO(n,e){if((n[tt]&256)===256)throw new ie(911,!1);n[ga]===null&&(n[ga]=[]),n[ga].push(e)}function P9(n,e){if(n[ga]===null)return;let t=n[ga].indexOf(e);t!==-1&&n[ga].splice(t,1)}function kl(n){let e=n[wi];return Ns(e)?e[wi]:e}var bt={lFrame:bO(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var dO=!1;function R9(){return bt.lFrame.elementDepthCount}function F9(){bt.lFrame.elementDepthCount++}function j9(){bt.lFrame.elementDepthCount--}function pO(){return bt.bindingsEnabled}function hO(){return bt.skipHydrationRootTNode!==null}function V9(n){return bt.skipHydrationRootTNode===n}function B9(){bt.skipHydrationRootTNode=null}function Xe(){return bt.lFrame.lView}function Tn(){return bt.lFrame.tView}function M(n){return bt.lFrame.contextLView=n,n[bi]}function D(n){return bt.lFrame.contextLView=null,n}function Ii(){let n=fO();for(;n!==null&&n.type===64;)n=n.parent;return n}function fO(){return bt.lFrame.currentTNode}function z9(){let n=bt.lFrame,e=n.currentTNode;return n.isParent?e:e.parent}function Bl(n,e){let t=bt.lFrame;t.currentTNode=n,t.isParent=e}function GC(){return bt.lFrame.isParent}function qC(){bt.lFrame.isParent=!1}function U9(){return bt.lFrame.contextLView}function mO(){return dO}function WD(n){dO=n}function Ls(){let n=bt.lFrame,e=n.bindingRootIndex;return e===-1&&(e=n.bindingRootIndex=n.tView.bindingStartIndex),e}function gO(){return bt.lFrame.bindingIndex}function H9(n){return bt.lFrame.bindingIndex=n}function gu(){return bt.lFrame.bindingIndex++}function Ag(n){let e=bt.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+n,t}function $9(){return bt.lFrame.inI18n}function W9(n,e){let t=bt.lFrame;t.bindingIndex=t.bindingRootIndex=n,F1(e)}function G9(){return bt.lFrame.currentDirectiveIndex}function F1(n){bt.lFrame.currentDirectiveIndex=n}function q9(n){let e=bt.lFrame.currentDirectiveIndex;return e===-1?null:n[e]}function yO(){return bt.lFrame.currentQueryIndex}function QC(n){bt.lFrame.currentQueryIndex=n}function Q9(n){let e=n[ct];return e.type===2?e.declTNode:e.type===1?n[nr]:null}function _O(n,e,t){if(t&Et.SkipSelf){let r=e,o=n;for(;r=r.parent,r===null&&!(t&Et.Host);)if(r=Q9(o),r===null||(o=o[mu],r.type&10))break;if(r===null)return!1;e=r,n=o}let i=bt.lFrame=vO();return i.currentTNode=e,i.lView=n,!0}function KC(n){let e=vO(),t=n[ct];bt.lFrame=e,e.currentTNode=t.firstChild,e.lView=n,e.tView=t,e.contextLView=n,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function vO(){let n=bt.lFrame,e=n===null?null:n.child;return e===null?bO(n):e}function bO(n){let e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return n!==null&&(n.child=e),e}function CO(){let n=bt.lFrame;return bt.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var wO=CO;function YC(){let n=CO();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function K9(n){return(bt.lFrame.contextLView=L9(n,bt.lFrame.contextLView))[bi]}function Ho(){return bt.lFrame.selectedIndex}function Nl(n){bt.lFrame.selectedIndex=n}function kg(){let n=bt.lFrame;return $C(n.tView,n.selectedIndex)}function Ne(){bt.lFrame.currentNamespace=oO}function Y9(){return bt.lFrame.currentNamespace}var IO=!0;function Ng(){return IO}function Lg(n){IO=n}function Z9(n,e,t){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(i){let s=nO(e);(t.preOrderHooks??=[]).push(n,s),(t.preOrderCheckHooks??=[]).push(n,s)}r&&(t.preOrderHooks??=[]).push(0-n,r),o&&((t.preOrderHooks??=[]).push(n,o),(t.preOrderCheckHooks??=[]).push(n,o))}function Pg(n,e){for(let t=e.directiveStart,i=e.directiveEnd;t=i)break}else e[l]<0&&(n[Jc]+=65536),(a>14>16&&(n[tt]&3)===e&&(n[tt]+=16384,GD(a,o)):GD(a,o)}var nu=-1,Ll=class{constructor(e,t,i){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=i}};function X9(n){return n instanceof Ll}function e7(n){return(n.flags&8)!==0}function t7(n){return(n.flags&16)!==0}var y1={},j1=class{constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,i){i=bg(i);let r=this.injector.get(e,y1,i);return r!==y1||t===y1?r:this.parentInjector.get(e,t,i)}};function TO(n){return n!==nu}function Ym(n){return n&32767}function n7(n){return n>>16}function Zm(n,e){let t=n7(n),i=e;for(;t>0;)i=i[mu],t--;return i}var V1=!0;function Jm(n){let e=V1;return V1=n,e}var i7=256,EO=i7-1,SO=5,r7=0,Ro={};function o7(n,e,t){let i;typeof t=="string"?i=t.charCodeAt(0)||0:t.hasOwnProperty(gp)&&(i=t[gp]),i==null&&(i=t[gp]=r7++);let r=i&EO,o=1<>SO)]|=o}function Xm(n,e){let t=MO(n,e);if(t!==-1)return t;let i=e[ct];i.firstCreatePass&&(n.injectorIndex=e.length,_1(i.data,n),_1(e,null),_1(i.blueprint,null));let r=ZC(n,e),o=n.injectorIndex;if(TO(r)){let s=Ym(r),a=Zm(r,e),l=a[ct].data;for(let c=0;c<8;c++)e[o+c]=a[s+c]|l[s+c]}return e[o+8]=r,o}function _1(n,e){n.push(0,0,0,0,0,0,0,0,e)}function MO(n,e){return n.injectorIndex===-1||n.parent&&n.parent.injectorIndex===n.injectorIndex||e[n.injectorIndex+8]===null?-1:n.injectorIndex}function ZC(n,e){if(n.parent&&n.parent.injectorIndex!==-1)return n.parent.injectorIndex;let t=0,i=null,r=e;for(;r!==null;){if(i=NO(r),i===null)return nu;if(t++,r=r[mu],i.injectorIndex!==-1)return i.injectorIndex|t<<16}return nu}function B1(n,e,t){o7(n,e,t)}function DO(n,e,t){if(t&Et.Optional||n!==void 0)return n;jC(e,"NodeInjector")}function OO(n,e,t,i){if(t&Et.Optional&&i===void 0&&(i=null),!(t&(Et.Self|Et.Host))){let r=n[au],o=Xi(void 0);try{return r?r.get(e,i,t&Et.Optional):L2(e,i,t&Et.Optional)}finally{Xi(o)}}return DO(i,e,t)}function AO(n,e,t,i=Et.Default,r){if(n!==null){if(e[tt]&2048&&!(i&Et.Self)){let s=c7(n,e,t,i,Ro);if(s!==Ro)return s}let o=kO(n,e,t,i,Ro);if(o!==Ro)return o}return OO(e,t,i,r)}function kO(n,e,t,i,r){let o=a7(t);if(typeof o=="function"){if(!_O(e,n,i))return i&Et.Host?DO(r,t,i):OO(e,t,i,r);try{let s;if(s=o(i),s==null&&!(i&Et.Optional))jC(t);else return s}finally{wO()}}else if(typeof o=="number"){let s=null,a=MO(n,e),l=nu,c=i&Et.Host?e[dr][nr]:null;for((a===-1||i&Et.SkipSelf)&&(l=a===-1?ZC(n,e):e[a+8],l===nu||!QD(i,!1)?a=-1:(s=e[ct],a=Ym(l),e=Zm(l,e)));a!==-1;){let u=e[ct];if(qD(o,a,u.data)){let d=s7(a,e,t,s,i,c);if(d!==Ro)return d}l=e[a+8],l!==nu&&QD(i,e[ct].data[a+8]===c)&&qD(o,a,e)?(s=u,a=Ym(l),e=Zm(l,e)):a=-1}}return r}function s7(n,e,t,i,r,o){let s=e[ct],a=s.data[n+8],l=i==null?Sg(a)&&V1:i!=s&&(a.type&3)!==0,c=r&Et.Host&&o===a,u=Bm(a,s,t,l,c);return u!==null?Pl(e,s,u,a):Ro}function Bm(n,e,t,i,r){let o=n.providerIndexes,s=e.data,a=o&1048575,l=n.directiveStart,c=n.directiveEnd,u=o>>20,d=i?a:a+u,p=r?a+u:c;for(let h=d;h=l&&g.type===t)return h}if(r){let h=s[l];if(h&&va(h)&&h.type===t)return l}return null}function Pl(n,e,t,i){let r=n[t],o=e.data;if(X9(r)){let s=r;s.resolving&&FV(RV(o[t]));let a=Jm(s.canSeeViewProviders);s.resolving=!0;let l,c=s.injectImpl?Xi(s.injectImpl):null,u=_O(n,i,Et.Default);try{r=n[t]=s.factory(void 0,o,n,i),e.firstCreatePass&&t>=i.directiveStart&&Z9(t,o[t],e)}finally{c!==null&&Xi(c),Jm(a),s.resolving=!1,wO()}}return r}function a7(n){if(typeof n=="string")return n.charCodeAt(0)||0;let e=n.hasOwnProperty(gp)?n[gp]:void 0;return typeof e=="number"?e>=0?e&EO:l7:e}function qD(n,e,t){let i=1<>SO)]&i)}function QD(n,e){return!(n&Et.Self)&&!(n&Et.Host&&e)}var Ml=class{constructor(e,t){this._tNode=e,this._lView=t}get(e,t,i){return AO(this._tNode,this._lView,e,bg(i),t)}};function l7(){return new Ml(Ii(),Xe())}function Oe(n){return Mp(()=>{let e=n.prototype.constructor,t=e[Um]||z1(e),i=Object.prototype,r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){let o=r[Um]||z1(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function z1(n){return M2(n)?()=>{let e=z1(Vi(n));return e&&e()}:Dl(n)}function c7(n,e,t,i,r){let o=n,s=e;for(;o!==null&&s!==null&&s[tt]&2048&&!(s[tt]&512);){let a=kO(o,s,t,i|Et.Self,Ro);if(a!==Ro)return a;let l=o.parent;if(!l){let c=s[X2];if(c){let u=c.get(t,Ro,i);if(u!==Ro)return u}l=NO(s),s=s[mu]}o=l}return r}function NO(n){let e=n[ct],t=e.type;return t===2?e.declTNode:t===1?n[nr]:null}function KD(n,e=null,t=null,i){let r=LO(n,e,t,i);return r.resolveInjectorInitializers(),r}function LO(n,e=null,t=null,i,r=new Set){let o=[t||er,m9(n)];return i=i||(typeof n=="object"?void 0:Bi(n)),new bp(o,e||Tg(),i||null,r)}var El=class El{static create(e,t){if(Array.isArray(e))return KD({name:""},t,e,"");{let i=e.name??"";return KD({name:i},e.parent,e.providers,i)}}};El.THROW_IF_NOT_FOUND=_p,El.NULL=new Wm,El.\u0275prov=K({token:El,providedIn:"any",factory:()=>re(F2)}),El.__NG_ELEMENT_ID__=-1;var $t=El;var u7=new be("");u7.__NG_ELEMENT_ID__=n=>{let e=Ii();if(e===null)throw new ie(204,!1);if(e.type&2)return e.value;if(n&Et.Optional)return null;throw new ie(204,!1)};var d7="ngOriginalError";function v1(n){return n[d7]}var PO=!0,ri=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=p7,e.__NG_ENV_ID__=i=>i;let n=e;return n})(),U1=class extends ri{constructor(e){super(),this._lView=e}onDestroy(e){return uO(this._lView,e),()=>P9(this._lView,e)}};function p7(){return new U1(Xe())}var $o=(()=>{let e=class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Fn(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let i=this.taskId++;return this.pendingTasks.add(i),i}remove(i){this.pendingTasks.delete(i),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}};e.\u0275prov=K({token:e,providedIn:"root",factory:()=>new e});let n=e;return n})();var H1=class extends pe{constructor(e=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=e,J2()&&(this.destroyRef=B(ri,{optional:!0})??void 0,this.pendingTasks=B($o,{optional:!0})??void 0)}emit(e){let t=kt(null);try{super.next(e)}finally{kt(t)}}subscribe(e,t,i){let r=e,o=t||(()=>null),s=i;if(e&&typeof e=="object"){let l=e;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:r,error:o,complete:s});return e instanceof et&&e.add(a),a}wrapInTimeout(e){return t=>{let i=this.pendingTasks?.add();setTimeout(()=>{e(t),i!==void 0&&this.pendingTasks?.remove(i)})}}},j=H1;function eg(...n){}function RO(n){let e,t;function i(){n=eg;try{t!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(t),e!==void 0&&clearTimeout(e)}catch{}}return e=setTimeout(()=>{n(),i()}),typeof requestAnimationFrame=="function"&&(t=requestAnimationFrame(()=>{n(),i()})),()=>i()}function YD(n){return queueMicrotask(()=>n()),()=>{n=eg}}var JC="isAngularZone",tg=JC+"_ID",h7=0,He=class n{constructor(e){this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new j(!1),this.onMicrotaskEmpty=new j(!1),this.onStable=new j(!1),this.onError=new j(!1);let{enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=PO}=e;if(typeof Zone>"u")throw new ie(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&i,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,g7(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(JC)===!0}static assertInAngularZone(){if(!n.isInAngularZone())throw new ie(909,!1)}static assertNotInAngularZone(){if(n.isInAngularZone())throw new ie(909,!1)}run(e,t,i){return this._inner.run(e,t,i)}runTask(e,t,i,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,f7,eg,eg);try{return o.runTask(s,t,i)}finally{o.cancelTask(s)}}runGuarded(e,t,i){return this._inner.runGuarded(e,t,i)}runOutsideAngular(e){return this._outer.run(e)}},f7={};function XC(n){if(n._nesting==0&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function m7(n){if(n.isCheckStableRunning||n.callbackScheduled)return;n.callbackScheduled=!0;function e(){RO(()=>{n.callbackScheduled=!1,$1(n),n.isCheckStableRunning=!0,XC(n),n.isCheckStableRunning=!1})}n.scheduleInRootZone?Zone.root.run(()=>{e()}):n._outer.run(()=>{e()}),$1(n)}function g7(n){let e=()=>{m7(n)},t=h7++;n._inner=n._inner.fork({name:"angular",properties:{[JC]:!0,[tg]:t,[tg+t]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(y7(l))return i.invokeTask(o,s,a,l);try{return ZD(n),i.invokeTask(o,s,a,l)}finally{(n.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||n.shouldCoalesceRunChangeDetection)&&e(),JD(n)}},onInvoke:(i,r,o,s,a,l,c)=>{try{return ZD(n),i.invoke(o,s,a,l,c)}finally{n.shouldCoalesceRunChangeDetection&&!n.callbackScheduled&&!_7(l)&&e(),JD(n)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&(s.change=="microTask"?(n._hasPendingMicrotasks=s.microTask,$1(n),XC(n)):s.change=="macroTask"&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(i,r,o,s)=>(i.handleError(o,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}function $1(n){n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&n.callbackScheduled===!0?n.hasPendingMicrotasks=!0:n.hasPendingMicrotasks=!1}function ZD(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function JD(n){n._nesting--,XC(n)}var ng=class{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new j,this.onMicrotaskEmpty=new j,this.onStable=new j,this.onError=new j}run(e,t,i){return e.apply(t,i)}runGuarded(e,t,i){return e.apply(t,i)}runOutsideAngular(e){return e()}runTask(e,t,i,r){return e.apply(t,i)}};function y7(n){return FO(n,"__ignore_ng_zone__")}function _7(n){return FO(n,"__scheduler_tick__")}function FO(n,e){return!Array.isArray(n)||n.length!==1?!1:n[0]?.data?.[e]===!0}function v7(n="zone.js",e){return n==="noop"?new ng:n==="zone.js"?new He(e):n}var zo=class{constructor(){this._console=console}handleError(e){let t=this._findOriginalError(e);this._console.error("ERROR",e),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&v1(e);for(;t&&v1(t);)t=v1(t);return t||null}},b7=new be("",{providedIn:"root",factory:()=>{let n=B(He),e=B(zo);return t=>n.runOutsideAngular(()=>e.handleError(t))}});function XD(n,e){return S2(n,e)}function C7(n){return S2(E2,n)}var Ap=(XD.required=C7,XD);function w7(){return yu(Ii(),Xe())}function yu(n,e){return new Ce(Mr(n,e))}var Ce=(()=>{let e=class e{constructor(i){this.nativeElement=i}};e.__NG_ELEMENT_ID__=w7;let n=e;return n})();function I7(n){return n instanceof Ce?n.nativeElement:n}function x7(){return this._results[Symbol.iterator]()}var cu=class n{get changes(){return this._changes??=new j}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;let t=n.prototype;t[Symbol.iterator]||(t[Symbol.iterator]=x7)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,t){this.dirty=!1;let i=QV(e);(this._changesDetected=!qV(this._results,i,t))&&(this._results=i,this.length=i.length,this.last=i[this.length-1],this.first=i[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}};function jO(n){return(n.flags&128)===128}var VO=new Map,T7=0;function E7(){return T7++}function S7(n){VO.set(n[Eg],n)}function W1(n){VO.delete(n[Eg])}var e2="__ngContext__";function Ca(n,e){ya(e)?(n[e2]=e[Eg],S7(e)):n[e2]=e}function BO(n){return UO(n[Cp])}function zO(n){return UO(n[uo])}function UO(n){for(;n!==null&&!Ns(n);)n=n[uo];return n}var G1;function HO(n){G1=n}function $O(){if(G1!==void 0)return G1;if(typeof document<"u")return document;throw new ie(210,!1)}var kp=new be("",{providedIn:"root",factory:()=>M7}),M7="ng",ew=new be(""),Nt=new be("",{providedIn:"platform",factory:()=>"unknown"});var tw=new be(""),nw=new be("",{providedIn:"root",factory:()=>$O().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var D7="h",O7="b";var A7=()=>null;function iw(n,e,t=!1){return A7(n,e,t)}var WO=!1,k7=new be("",{providedIn:"root",factory:()=>WO});var Dm;function N7(){if(Dm===void 0&&(Dm=null,ur.trustedTypes))try{Dm=ur.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Dm}function Rg(n){return N7()?.createHTML(n)||n}var Om;function L7(){if(Om===void 0&&(Om=null,ur.trustedTypes))try{Om=ur.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Om}function t2(n){return L7()?.createHTML(n)||n}var Ms=class{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${T2})`}},q1=class extends Ms{getTypeName(){return"HTML"}},Q1=class extends Ms{getTypeName(){return"Style"}},K1=class extends Ms{getTypeName(){return"Script"}},Y1=class extends Ms{getTypeName(){return"URL"}},Z1=class extends Ms{getTypeName(){return"ResourceURL"}};function Dr(n){return n instanceof Ms?n.changingThisBreaksApplicationSecurity:n}function xa(n,e){let t=P7(n);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${T2})`)}return t===e}function P7(n){return n instanceof Ms&&n.getTypeName()||null}function GO(n){return new q1(n)}function qO(n){return new Q1(n)}function QO(n){return new K1(n)}function KO(n){return new Y1(n)}function YO(n){return new Z1(n)}function R7(n){let e=new X1(n);return F7()?new J1(e):e}var J1=class{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{let t=new window.DOMParser().parseFromString(Rg(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.firstChild?.remove(),t)}catch{return null}}},X1=class{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=Rg(e),t}};function F7(){try{return!!new window.DOMParser().parseFromString(Rg(""),"text/html")}catch{return!1}}var j7=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Fg(n){return n=String(n),n.match(j7)?n:"unsafe:"+n}function Ps(n){let e={};for(let t of n.split(","))e[t]=!0;return e}function Np(...n){let e={};for(let t of n)for(let i in t)t.hasOwnProperty(i)&&(e[i]=!0);return e}var ZO=Ps("area,br,col,hr,img,wbr"),JO=Ps("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),XO=Ps("rp,rt"),V7=Np(XO,JO),B7=Np(JO,Ps("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),z7=Np(XO,Ps("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),n2=Np(ZO,B7,z7,V7),eA=Ps("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),U7=Ps("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),H7=Ps("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),$7=Np(eA,U7,H7),W7=Ps("script,style,template"),eC=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,i=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?i=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,i&&t.firstChild){r.push(t),t=Q7(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=q7(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=i2(e).toLowerCase();if(!n2.hasOwnProperty(t))return this.sanitizedSomething=!0,!W7.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let i=e.attributes;for(let r=0;r"),!0}endElement(e){let t=i2(e).toLowerCase();n2.hasOwnProperty(t)&&!ZO.hasOwnProperty(t)&&(this.buf.push(""))}chars(e){this.buf.push(r2(e))}};function G7(n,e){return(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function q7(n){let e=n.nextSibling;if(e&&n!==e.previousSibling)throw tA(e);return e}function Q7(n){let e=n.firstChild;if(e&&G7(n,e))throw tA(e);return e}function i2(n){let e=n.nodeName;return typeof e=="string"?e:"FORM"}function tA(n){return new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`)}var K7=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Y7=/([^\#-~ |!])/g;function r2(n){return n.replace(/&/g,"&").replace(K7,function(e){let t=e.charCodeAt(0),i=e.charCodeAt(1);return"&#"+((t-55296)*1024+(i-56320)+65536)+";"}).replace(Y7,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}var Am;function rw(n,e){let t=null;try{Am=Am||R7(n);let i=e?String(e):"";t=Am.getInertBodyElement(i);let r=5,o=i;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=t.innerHTML,t=Am.getInertBodyElement(i)}while(i!==o);let a=new eC().sanitizeChildren(o2(t)||t);return Rg(a)}finally{if(t){let i=o2(t)||t;for(;i.firstChild;)i.firstChild.remove()}}}function o2(n){return"content"in n&&Z7(n)?n.content:null}function Z7(n){return n.nodeType===Node.ELEMENT_NODE&&n.nodeName==="TEMPLATE"}var Wo=function(n){return n[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL",n}(Wo||{});function Go(n){let e=nA();return e?t2(e.sanitize(Wo.HTML,n)||""):xa(n,"HTML")?t2(Dr(n)):rw($O(),Fo(n))}function zi(n){let e=nA();return e?e.sanitize(Wo.URL,n)||"":xa(n,"URL")?Dr(n):Fg(Fo(n))}function nA(){let n=Xe();return n&&n[Vo].sanitizer}var J7=/^>|^->||--!>|)/g,eB="\u200B$1\u200B";function tB(n){return n.replace(J7,e=>e.replace(X7,eB))}function iA(n){return n.ownerDocument.defaultView}function _u(n){return n.ownerDocument}function rA(n){return n instanceof Function?n():n}function nB(n){return(n??B($t)).get(Nt)==="browser"}var Uo=function(n){return n[n.Important=1]="Important",n[n.DashCase=2]="DashCase",n}(Uo||{}),iB;function ow(n,e){return iB(n,e)}function Xc(n,e,t,i,r){if(i!=null){let o,s=!1;Ns(i)?o=i:ya(i)&&(s=!0,i=i[ks]);let a=Bo(i);n===0&&t!==null?r==null?cA(e,t,a):ig(e,t,a,r||null,!0):n===1&&t!==null?ig(e,t,a,r||null,!0):n===2?yB(e,a,s):n===3&&e.destroyNode(a),o!=null&&vB(e,n,o,t,r)}}function rB(n,e){return n.createText(e)}function oB(n,e,t){n.setValue(e,t)}function sB(n,e){return n.createComment(tB(e))}function oA(n,e,t){return n.createElement(e,t)}function aB(n,e){sA(n,e),e[ks]=null,e[nr]=null}function lB(n,e,t,i,r,o){i[ks]=r,i[nr]=e,Bg(n,i,t,1,r,o)}function sA(n,e){e[Vo].changeDetectionScheduler?.notify(9),Bg(n,e,e[xn],2,null,null)}function cB(n){let e=n[Cp];if(!e)return b1(n[ct],n);for(;e;){let t=null;if(ya(e))t=e[Cp];else{let i=e[Ci];i&&(t=i)}if(!t){for(;e&&!e[uo]&&e!==n;)ya(e)&&b1(e[ct],e),e=e[wi];e===null&&(e=n),ya(e)&&b1(e[ct],e),t=e&&e[uo]}e=t}}function uB(n,e,t,i){let r=Ci+i,o=t.length;i>0&&(t[r-1][uo]=e),i0&&(n[t-1][uo]=i[uo]);let o=$m(n,Ci+e);aB(i[ct],i);let s=o[Ss];s!==null&&s.detachView(o[ct]),i[wi]=null,i[uo]=null,i[tt]&=-129}return i}function jg(n,e){if(!(e[tt]&256)){let t=e[xn];t.destroyNode&&Bg(n,e,t,3,null,null),cB(e)}}function b1(n,e){if(e[tt]&256)return;let t=kt(null);try{e[tt]&=-129,e[tt]|=256,e[Er]&&rm(e[Er]),pB(n,e),dB(n,e),e[ct].type===1&&e[xn].destroy();let i=e[Ol];if(i!==null&&Ns(e[wi])){i!==e[wi]&&sw(i,e);let r=e[Ss];r!==null&&r.detachView(n)}W1(e)}finally{kt(t)}}function dB(n,e){let t=n.cleanup,i=e[qm];if(t!==null)for(let o=0;o=0?i[s]():i[-s].unsubscribe(),o+=2}else{let s=i[t[o+1]];t[o].call(s)}i!==null&&(e[qm]=null);let r=e[ga];if(r!==null){e[ga]=null;for(let o=0;o-1){let{encapsulation:o}=n.data[i.directiveStart+r];if(o===jo.None||o===jo.Emulated)return null}return Mr(i,t)}}function ig(n,e,t,i,r){n.insertBefore(e,t,i,r)}function cA(n,e,t){n.appendChild(e,t)}function s2(n,e,t,i,r){i!==null?ig(n,e,t,i,r):cA(n,e,t)}function uA(n,e){return n.parentNode(e)}function fB(n,e){return n.nextSibling(e)}function dA(n,e,t){return gB(n,e,t)}function mB(n,e,t){return n.type&40?Mr(n,t):null}var gB=mB,a2;function Vg(n,e,t,i){let r=lA(n,i,e),o=e[xn],s=i.parent||e[nr],a=dA(s,i,e);if(r!=null)if(Array.isArray(t))for(let l=0;lhi&&gA(n,e,hi,!1),Po(s?2:0,r),t(i,r)}finally{Nl(o),Po(s?3:1,r)}}function lw(n,e,t){if(HC(e)){let i=kt(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;snull;function MB(n,e,t,i){let r=EA(e);r.push(t),n.firstCreatePass&&SA(n).push(i,r.length-1)}function DB(n,e,t,i,r,o){let s=e?e.injectorIndex:-1,a=0;return hO()&&(a|=128),{type:t,index:i,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function l2(n,e,t,i,r){for(let o in e){if(!e.hasOwnProperty(o))continue;let s=e[o];if(s===void 0)continue;i??={};let a,l=_a.None;Array.isArray(s)?(a=s[0],l=s[1]):a=s;let c=o;if(r!==null){if(!r.hasOwnProperty(o))continue;c=r[o]}n===0?c2(i,t,c,a,l):c2(i,t,c,a)}return i}function c2(n,e,t,i,r){let o;n.hasOwnProperty(t)?(o=n[t]).push(e,i):o=n[t]=[e,i],r!==void 0&&o.push(r)}function OB(n,e,t){let i=e.directiveStart,r=e.directiveEnd,o=n.data,s=e.attrs,a=[],l=null,c=null;for(let u=i;u0;){let t=n[--e];if(typeof t=="number"&&t<0)return t}return 0}function PB(n,e,t,i){let r=t.directiveStart,o=t.directiveEnd;Sg(t)&&UB(e,t,n.data[r+t.componentOffset]),n.firstCreatePass||Xm(t,e),Ca(i,e);let s=t.initialInputs;for(let a=r;a{Og(n.lView)},consumerOnSignalRead(){this.lView[Er]=this}});function tz(n){let e=n[Er]??Object.create(nz);return e.lView=n,e}var nz=R(I({},Bc),{consumerIsAlwaysLive:!0,consumerMarkedDirty:n=>{let e=kl(n.lView);for(;e&&!kA(e[ct]);)e=kl(e);e&&cO(e)},consumerOnSignalRead(){this.lView[Er]=this}});function kA(n){return n.type!==2}var iz=100;function NA(n,e=!0,t=0){let i=n[Vo],r=i.rendererFactory,o=!1;o||r.begin?.();try{rz(n,t)}catch(s){throw e&&MA(n,s),s}finally{o||(r.end?.(),i.inlineEffectRunner?.flush())}}function rz(n,e){let t=mO();try{WD(!0),rC(n,e);let i=0;for(;Dg(n);){if(i===iz)throw new ie(103,!1);i++,rC(n,1)}}finally{WD(t)}}function oz(n,e,t,i){let r=e[tt];if((r&256)===256)return;let o=!1,s=!1;!o&&e[Vo].inlineEffectRunner?.flush(),KC(e);let a=!0,l=null,c=null;o||(kA(n)?(c=ZB(e),l=np(c)):tD()===null?(a=!1,c=tz(e),l=np(c)):e[Er]&&(rm(e[Er]),e[Er]=null));try{lO(e),H9(n.bindingStartIndex),t!==null&&bA(n,e,t,2,i);let u=(r&3)===3;if(!o)if(u){let h=n.preOrderCheckHooks;h!==null&&jm(e,h,null)}else{let h=n.preOrderHooks;h!==null&&Vm(e,h,0,null),g1(e,0)}if(s||sz(e),LA(e,0),n.contentQueries!==null&&TA(n,e),!o)if(u){let h=n.contentCheckHooks;h!==null&&jm(e,h)}else{let h=n.contentHooks;h!==null&&Vm(e,h,1),g1(e,1)}wB(n,e);let d=n.components;d!==null&&RA(e,d,0);let p=n.viewQuery;if(p!==null&&iC(2,p,i),!o)if(u){let h=n.viewCheckHooks;h!==null&&jm(e,h)}else{let h=n.viewHooks;h!==null&&Vm(e,h,2),g1(e,2)}if(n.firstUpdatePass===!0&&(n.firstUpdatePass=!1),e[Fm]){for(let h of e[Fm])h();e[Fm]=null}o||(e[tt]&=-73)}catch(u){throw o||Og(e),u}finally{c!==null&&(nm(c,l),a&&XB(c)),YC()}}function LA(n,e){for(let t=BO(n);t!==null;t=zO(t))for(let i=Ci;i-1&&(Ip(e,i),$m(t,i))}this._attachedToViewContainer=!1}jg(this._lView[ct],this._lView)}onDestroy(e){uO(this._lView,e)}markForCheck(){yw(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[tt]&=-129}reattach(){R1(this._lView),this._lView[tt]|=128}detectChanges(){this._lView[tt]|=1024,NA(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new ie(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=P1(this._lView),t=this._lView[Ol];t!==null&&!e&&sw(t,this._lView),sA(this._lView[ct],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new ie(902,!1);this._appRef=e;let t=P1(this._lView),i=this._lView[Ol];i!==null&&!t&&aA(i,this._lView),R1(this._lView)}},pr=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=uz;let n=e;return n})(),lz=pr,cz=class extends lz{constructor(e,t,i){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=i}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,i){let r=Lp(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:i});return new Rl(r)}};function uz(){return Hg(Ii(),Xe())}function Hg(n,e){return n.type&4?new cz(e,n,yu(n,e)):null}var $Ie=new RegExp(`^(\\d+)*(${O7}|${D7})*(.*)`);var dz=()=>null;function du(n,e){return dz(n,e)}var pu=class{},FA=new be("",{providedIn:"root",factory:()=>!1});var jA=new be(""),VA=new be(""),oC=class{},og=class{};function pz(n){let e=Error(`No component factory found for ${Bi(n)}.`);return e[hz]=n,e}var hz="ngComponent";var sC=class{resolveComponentFactory(e){throw pz(e)}},Mw=class Mw{};Mw.NULL=new sC;var Ds=Mw,wa=class{},At=(()=>{let e=class e{constructor(){this.destroyNode=null}};e.__NG_ELEMENT_ID__=()=>fz();let n=e;return n})();function fz(){let n=Xe(),e=Ii(),t=Ia(e.index,n);return(ya(t)?t:n)[xn]}var mz=(()=>{let e=class e{};e.\u0275prov=K({token:e,providedIn:"root",factory:()=>null});let n=e;return n})();function sg(n,e,t){let i=t?n.styles:null,r=t?n.classes:null,o=0;if(e!==null)for(let s=0;s0&&fA(n,t,o.join(" "))}}function wz(n,e,t){let i=n.projection=[];for(let r=0;r{let e=class e{};e.__NG_ELEMENT_ID__=xz;let n=e;return n})();function xz(){let n=Ii();return zA(n,Xe())}var Tz=Un,BA=class extends Tz{constructor(e,t,i){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=i}get element(){return yu(this._hostTNode,this._hostLView)}get injector(){return new Ml(this._hostTNode,this._hostLView)}get parentInjector(){let e=ZC(this._hostTNode,this._hostLView);if(TO(e)){let t=Zm(e,this._hostLView),i=Ym(e),r=t[ct].data[i+8];return new Ml(r,t)}else return new Ml(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=d2(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-Ci}createEmbeddedView(e,t,i){let r,o;typeof i=="number"?r=i:i!=null&&(r=i.index,o=i.injector);let s=du(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,uu(this._hostTNode,s)),a}createComponent(e,t,i,r,o){let s=e&&!S9(e),a;if(s)a=t;else{let g=t||{};a=g.index,i=g.injector,r=g.projectableNodes,o=g.environmentInjector||g.ngModuleRef}let l=s?e:new Fl(Es(e)),c=i||this.parentInjector;if(!o&&l.ngModule==null){let _=(s?c:this.parentInjector).get(pi,null);_&&(o=_)}let u=Es(l.componentType??{}),d=du(this._lContainer,u?.id??null),p=d?.firstChild??null,h=l.create(c,r,p,o);return this.insertImpl(h.hostView,a,uu(this._hostTNode,d)),h}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,i){let r=e._lView;if(N9(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let l=r[wi],c=new BA(l,l[nr],l[wi]);c.detach(c.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return Pp(s,r,o,i),e.attachToViewContainerRef(),R2(C1(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=d2(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),i=Ip(this._lContainer,t);i&&($m(C1(this._lContainer),t),jg(i[ct],i))}detach(e){let t=this._adjustIndex(e,-1),i=Ip(this._lContainer,t);return i&&$m(C1(this._lContainer),t)!=null?new Rl(i):null}_adjustIndex(e,t=0){return e??this.length+t}};function d2(n){return n[Qm]}function C1(n){return n[Qm]||(n[Qm]=[])}function zA(n,e){let t,i=e[n.index];return Ns(i)?t=i:(t=xA(i,e,null,n),e[n.index]=t,Ug(e,t)),Sz(t,e,n,i),new BA(t,n,e)}function Ez(n,e){let t=n[xn],i=t.createComment(""),r=Mr(e,n),o=uA(t,r);return ig(t,o,i,fB(t,r),!1),i}var Sz=Oz,Mz=()=>!1;function Dz(n,e,t){return Mz(n,e,t)}function Oz(n,e,t,i){if(n[Al])return;let r;t.type&8?r=Bo(i):r=Ez(e,t),n[Al]=r}var lC=class n{constructor(e){this.queryList=e,this.matches=null}clone(){return new n(this.queryList)}setDirty(){this.queryList.setDirty()}},cC=class n{constructor(e=[]){this.queries=e}createEmbeddedView(e){let t=e.queries;if(t!==null){let i=e.contentQueries!==null?e.contentQueries[0]:t.length,r=[];for(let o=0;o0)i.push(s[a/2]);else{let c=o[a+1],u=e[-l];for(let d=Ci;de.trim())}function $A(n,e,t){n.queries===null&&(n.queries=new uC),n.queries.track(new dC(e,t))}function Vz(n,e){let t=n.contentQueries||(n.contentQueries=[]),i=t.length?t[t.length-1]:-1;e!==i&&t.push(n.queries.length-1,e)}function _w(n,e){return n.queries.getByIndex(e)}function Bz(n,e){let t=n[ct],i=_w(t,e);return i.crossesNgTemplate?pC(t,n,e,[]):UA(t,n,i,e)}var p2=new Set;function qo(n){p2.has(n)||(p2.add(n),performance?.mark?.("mark_feature_usage",{detail:{feature:n}}))}function Ta(n){return typeof n=="function"&&n[ro]!==void 0}function Lt(n,e){qo("NgSignals");let t=hD(n),i=t[ro];return e?.equal&&(i.equal=e.equal),t.set=r=>am(i,r),t.update=r=>fD(i,r),t.asReadonly=zz.bind(t),t}function zz(){let n=this[ro];if(n.readonlyFn===void 0){let e=()=>this();e[ro]=n,n.readonlyFn=e}return n.readonlyFn}function WA(n){return Ta(n)&&typeof n.set=="function"}function Uz(n){let e=[],t=new Map;function i(r){let o=t.get(r);if(!o){let s=n(r);t.set(r,o=s.then(Gz))}return o}return cg.forEach((r,o)=>{let s=[];r.templateUrl&&s.push(i(r.templateUrl).then(c=>{r.template=c}));let a=typeof r.styles=="string"?[r.styles]:r.styles||[];if(r.styles=a,r.styleUrl&&r.styleUrls?.length)throw new Error("@Component cannot define both `styleUrl` and `styleUrls`. Use `styleUrl` if the component has one stylesheet, or `styleUrls` if it has multiple");if(r.styleUrls?.length){let c=r.styles.length,u=r.styleUrls;r.styleUrls.forEach((d,p)=>{a.push(""),s.push(i(d).then(h=>{a[c+p]=h,u.splice(u.indexOf(d),1),u.length==0&&(r.styleUrls=void 0)}))})}else r.styleUrl&&s.push(i(r.styleUrl).then(c=>{a.push(c),r.styleUrl=void 0}));let l=Promise.all(s).then(()=>qz(o));e.push(l)}),$z(),Promise.all(e).then(()=>{})}var cg=new Map,Hz=new Set;function $z(){let n=cg;return cg=new Map,n}function Wz(){return cg.size===0}function Gz(n){return typeof n=="string"?n:n.text()}function qz(n){Hz.delete(n)}function Qz(n){return Object.getPrototypeOf(n.prototype).constructor}function xe(n){let e=Qz(n.type),t=!0,i=[n];for(;e;){let r;if(va(n))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new ie(903,!1);r=e.\u0275dir}if(r){if(t){i.push(r);let s=n;s.inputs=km(n.inputs),s.inputTransforms=km(n.inputTransforms),s.declaredInputs=km(n.declaredInputs),s.outputs=km(n.outputs);let a=r.hostBindings;a&&Xz(n,a);let l=r.viewQuery,c=r.contentQueries;if(l&&Zz(n,l),c&&Jz(n,c),Kz(n,r),MV(n.outputs,r.outputs),va(r)&&r.data.animation){let u=n.data;u.animation=(u.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s=0;i--){let r=n[i];r.hostVars=e+=r.hostVars,r.hostAttrs=vp(r.hostAttrs,t=vp(t,r.hostAttrs))}}function km(n){return n===iu?{}:n===er?[]:n}function Zz(n,e){let t=n.viewQuery;t?n.viewQuery=(i,r)=>{e(i,r),t(i,r)}:n.viewQuery=e}function Jz(n,e){let t=n.contentQueries;t?n.contentQueries=(i,r,o)=>{e(i,r,o),t(i,r,o)}:n.contentQueries=e}function Xz(n,e){let t=n.hostBindings;t?n.hostBindings=(i,r)=>{e(i,r),t(i,r)}:n.hostBindings=e}function $e(n){let e=n.inputConfig,t={};for(let i in e)if(e.hasOwnProperty(i)){let r=e[i];Array.isArray(r)&&r[3]&&(t[i]=r[3])}n.inputTransforms=t}var Os=class{},xp=class{};function GA(n,e){return new Tp(n,e??null,[])}var Tp=class extends Os{constructor(e,t,i,r=!0){super(),this.ngModuleType=e,this._parent=t,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new ag(this);let o=W2(e);this._bootstrapComponents=rA(o.bootstrap),this._r3Injector=LO(e,t,[{provide:Os,useValue:this},{provide:Ds,useValue:this.componentFactoryResolver},...i],Bi(e),new Set(["environment"])),r&&this.resolveInjectorInitializers()}resolveInjectorInitializers(){this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(this.ngModuleType)}get injector(){return this._r3Injector}destroy(){let e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}},ug=class extends xp{constructor(e){super(),this.moduleType=e}create(e){return new Tp(this.moduleType,e,[])}};function eU(n,e,t){return new Tp(n,e,t,!1)}var hC=class extends Os{constructor(e){super(),this.componentFactoryResolver=new ag(this),this.instance=null;let t=new bp([...e.providers,{provide:Os,useValue:this},{provide:Ds,useValue:this.componentFactoryResolver}],e.parent||Tg(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function $g(n,e,t=null){return new hC({providers:n,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}function qA(n){return vw(n)?Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n:!1}function tU(n,e){if(Array.isArray(n))for(let t=0;t{let e=class e{constructor(){this.impl=null}execute(){this.impl?.execute()}};e.\u0275prov=K({token:e,providedIn:"root",factory:()=>new e});let n=e;return n})(),Sl=class Sl{constructor(){this.ngZone=B(He),this.scheduler=B(pu),this.errorHandler=B(zo,{optional:!0}),this.sequences=new Set,this.deferredRegistrations=new Set,this.executing=!1}execute(){this.executing=!0;for(let e of Sl.PHASES)for(let t of this.sequences)if(!(t.erroredOrDestroyed||!t.hooks[e]))try{t.pipelinedValue=this.ngZone.runOutsideAngular(()=>t.hooks[e](t.pipelinedValue))}catch(i){t.erroredOrDestroyed=!0,this.errorHandler?.handleError(i)}this.executing=!1;for(let e of this.sequences)e.afterRun(),e.once&&this.sequences.delete(e);for(let e of this.deferredRegistrations)this.sequences.add(e);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear()}register(e){this.executing?this.deferredRegistrations.add(e):(this.sequences.add(e),this.scheduler.notify(6))}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}};Sl.PHASES=[eu.EarlyRead,eu.Write,eu.MixedReadWrite,eu.Read],Sl.\u0275prov=K({token:Sl,providedIn:"root",factory:()=>new Sl});var fC=Sl,mC=class{constructor(e,t,i,r){this.impl=e,this.hooks=t,this.once=i,this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.unregisterOnDestroy=r.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0}destroy(){this.impl.unregister(this),this.unregisterOnDestroy()}};function Rp(n,e){!e?.injector&&Vl(Rp);let t=e?.injector??B($t);return nB(t)?(qo("NgAfterNextRender"),aU(n,t,e,!0)):lU}function sU(n,e){if(n instanceof Function){let t=[void 0,void 0,void 0,void 0];return t[e]=n,t}else return[n.earlyRead,n.write,n.mixedReadWrite,n.read]}function aU(n,e,t,i){let r=e.get(KA);r.impl??=e.get(fC);let o=t?.phase??eu.MixedReadWrite,s=new mC(r.impl,sU(n,o),i,e.get(ri));return r.impl.register(s),s}var lU={destroy(){}};function O(n,e,t,i){let r=Xe(),o=gu();if(tr(r,o,e)){let s=Tn(),a=kg();HB(a,r,n,e,t,i)}return O}function YA(n,e,t,i){return tr(n,gu(),t)?e+Fo(t)+i:xi}function cU(n,e,t,i,r,o){let s=gO(),a=Ep(n,s,t,r);return Ag(2),a?e+Fo(t)+i+Fo(r)+o:xi}function uU(n,e,t,i,r,o,s,a){let l=gO(),c=QA(n,l,t,r,s);return Ag(3),c?e+Fo(t)+i+Fo(r)+o+Fo(s)+a:xi}function Nm(n,e){return n<<17|e<<2}function jl(n){return n>>17&32767}function dU(n){return(n&2)==2}function pU(n,e){return n&131071|e<<17}function gC(n){return n|2}function hu(n){return(n&131068)>>2}function w1(n,e){return n&-131069|e<<2}function hU(n){return(n&1)===1}function yC(n){return n|1}function fU(n,e,t,i,r,o){let s=o?e.classBindings:e.styleBindings,a=jl(s),l=hu(s);n[i]=t;let c=!1,u;if(Array.isArray(t)){let d=t;u=d[1],(u===null||Op(d,u)>0)&&(c=!0)}else u=t;if(r)if(l!==0){let p=jl(n[a+1]);n[i+1]=Nm(p,a),p!==0&&(n[p+1]=w1(n[p+1],i)),n[a+1]=pU(n[a+1],i)}else n[i+1]=Nm(a,0),a!==0&&(n[a+1]=w1(n[a+1],i)),a=i;else n[i+1]=Nm(l,0),a===0?a=i:n[l+1]=w1(n[l+1],i),l=i;c&&(n[i+1]=gC(n[i+1])),h2(n,u,i,!0),h2(n,u,i,!1),mU(e,u,n,i,o),s=Nm(a,l),o?e.classBindings=s:e.styleBindings=s}function mU(n,e,t,i,r){let o=r?n.residualClasses:n.residualStyles;o!=null&&typeof e=="string"&&Op(o,e)>=0&&(t[i+1]=yC(t[i+1]))}function h2(n,e,t,i){let r=n[t+1],o=e===null,s=i?jl(r):hu(r),a=!1;for(;s!==0&&(a===!1||o);){let l=n[s],c=n[s+1];gU(l,e)&&(a=!0,n[s+1]=i?yC(c):gC(c)),s=i?jl(c):hu(c)}a&&(n[t+1]=i?gC(r):yC(r))}function gU(n,e){return n===null||e==null||(Array.isArray(n)?n[1]:n)===e?!0:Array.isArray(n)&&typeof e=="string"?Op(n,e)>=0:!1}var Xn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function ZA(n){return n.substring(Xn.key,Xn.keyEnd)}function yU(n){return n.substring(Xn.value,Xn.valueEnd)}function _U(n){return ek(n),JA(n,fu(n,0,Xn.textEnd))}function JA(n,e){let t=Xn.textEnd;return t===e?-1:(e=Xn.keyEnd=bU(n,Xn.key=e,t),fu(n,e,t))}function vU(n){return ek(n),XA(n,fu(n,0,Xn.textEnd))}function XA(n,e){let t=Xn.textEnd,i=Xn.key=fu(n,e,t);return t===i?-1:(i=Xn.keyEnd=CU(n,i,t),i=f2(n,i,t,58),i=Xn.value=fu(n,i,t),i=Xn.valueEnd=wU(n,i,t),f2(n,i,t,59))}function ek(n){Xn.key=0,Xn.keyEnd=0,Xn.value=0,Xn.valueEnd=0,Xn.textEnd=n.length}function fu(n,e,t){for(;e32;)e++;return e}function CU(n,e,t){let i;for(;e=65&&(i&-33)<=90||i>=48&&i<=57);)e++;return e}function f2(n,e,t,i){return e=fu(n,e,t),e32&&(a=s),o=r,r=i,i=l&-33}return a}function m2(n,e,t,i){let r=-1,o=t;for(;o=0;t=XA(e,t))ok(n,ZA(e),yU(e))}function W(n){nk(OU,xU,n,!0)}function xU(n,e){for(let t=_U(e);t>=0;t=JA(e,t))wg(n,ZA(e),!0)}function tk(n,e,t,i){let r=Xe(),o=Tn(),s=Ag(2);if(o.firstUpdatePass&&rk(o,n,s,i),e!==xi&&tr(r,s,e)){let a=o.data[Ho()];sk(o,a,r,r[xn],n,r[s+1]=kU(e,t),i,s)}}function nk(n,e,t,i){let r=Tn(),o=Ag(2);r.firstUpdatePass&&rk(r,null,o,i);let s=Xe();if(t!==xi&&tr(s,o,t)){let a=r.data[Ho()];if(ak(a,i)&&!ik(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(t=S1(l,t||"")),_C(r,a,s,t,i)}else AU(r,a,s,s[xn],s[o+1],s[o+1]=DU(n,e,t),i,o)}}function ik(n,e){return e>=n.expandoStartIndex}function rk(n,e,t,i){let r=n.data;if(r[t+1]===null){let o=r[Ho()],s=ik(n,t);ak(o,i)&&e===null&&!s&&(e=!1),e=TU(r,o,e,i),fU(r,o,e,t,s,i)}}function TU(n,e,t,i){let r=q9(n),o=i?e.residualClasses:e.residualStyles;if(r===null)(i?e.classBindings:e.styleBindings)===0&&(t=I1(null,n,e,t,i),t=Sp(t,e.attrs,i),o=null);else{let s=e.directiveStylingLast;if(s===-1||n[s]!==r)if(t=I1(r,n,e,t,i),o===null){let l=EU(n,e,i);l!==void 0&&Array.isArray(l)&&(l=I1(null,n,e,l[1],i),l=Sp(l,e.attrs,i),SU(n,e,i,l))}else o=MU(n,e,i)}return o!==void 0&&(i?e.residualClasses=o:e.residualStyles=o),t}function EU(n,e,t){let i=t?e.classBindings:e.styleBindings;if(hu(i)!==0)return n[jl(i)]}function SU(n,e,t,i){let r=t?e.classBindings:e.styleBindings;n[jl(r)]=i}function MU(n,e,t){let i,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o0;){let l=n[r],c=Array.isArray(l),u=c?l[1]:l,d=u===null,p=t[r+1];p===xi&&(p=d?er:void 0);let h=d?f1(p,i):u===i?p:void 0;if(c&&!hg(h)&&(h=f1(l,i)),hg(h)&&(a=h,s))return a;let g=n[r+1];r=s?jl(g):hu(g)}if(e!==null){let l=o?e.residualClasses:e.residualStyles;l!=null&&(a=f1(l,i))}return a}function hg(n){return n!==void 0}function kU(n,e){return n==null||n===""||(typeof e=="string"?n=n+e:typeof n=="object"&&(n=Bi(Dr(n)))),n}function ak(n,e){return(n.flags&(e?8:16))!==0}var vC=class{destroy(e){}updateValue(e,t){}swap(e,t){let i=Math.min(e,t),r=Math.max(e,t),o=this.detach(r);if(r-i>1){let s=this.detach(i);this.attach(i,o),this.attach(r,s)}else this.attach(i,o)}move(e,t){this.attach(t,this.detach(e))}};function x1(n,e,t,i,r){return n===t&&Object.is(e,i)?1:Object.is(r(n,e),r(t,i))?-1:0}function NU(n,e,t){let i,r,o=0,s=n.length-1,a=void 0;if(Array.isArray(e)){let l=e.length-1;for(;o<=s&&o<=l;){let c=n.at(o),u=e[o],d=x1(o,c,o,u,t);if(d!==0){d<0&&n.updateValue(o,u),o++;continue}let p=n.at(s),h=e[l],g=x1(s,p,l,h,t);if(g!==0){g<0&&n.updateValue(s,h),s--,l--;continue}let _=t(o,c),v=t(s,p),w=t(o,u);if(Object.is(w,v)){let S=t(l,h);Object.is(S,_)?(n.swap(o,s),n.updateValue(s,h),l--,s--):n.move(s,o),n.updateValue(o,u),o++;continue}if(i??=new fg,r??=_2(n,o,s,t),bC(n,i,o,w))n.updateValue(o,u),o++,s++;else if(r.has(w))i.set(_,n.detach(o)),s--;else{let S=n.create(o,e[o]);n.attach(o,S),o++,s++}}for(;o<=l;)y2(n,i,t,o,e[o]),o++}else if(e!=null){let l=e[Symbol.iterator](),c=l.next();for(;!c.done&&o<=s;){let u=n.at(o),d=c.value,p=x1(o,u,o,d,t);if(p!==0)p<0&&n.updateValue(o,d),o++,c=l.next();else{i??=new fg,r??=_2(n,o,s,t);let h=t(o,d);if(bC(n,i,o,h))n.updateValue(o,d),o++,s++,c=l.next();else if(!r.has(h))n.attach(o,n.create(o,d)),o++,s++,c=l.next();else{let g=t(o,u);i.set(g,n.detach(o)),s--}}}for(;!c.done;)y2(n,i,t,n.length,c.value),c=l.next()}for(;o<=s;)n.destroy(n.detach(s--));i?.forEach(l=>{n.destroy(l)})}function bC(n,e,t,i){return e!==void 0&&e.has(i)?(n.attach(t,e.get(i)),e.delete(i),!0):!1}function y2(n,e,t,i,r){if(bC(n,e,i,t(i,r)))n.updateValue(i,r);else{let o=n.create(i,r);n.attach(i,o)}}function _2(n,e,t,i){let r=new Set;for(let o=e;o<=t;o++)r.add(i(o,n.at(o)));return r}var fg=class{constructor(){this.kvMap=new Map,this._vMap=void 0}has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let t=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(t)?(this.kvMap.set(e,this._vMap.get(t)),this._vMap.delete(t)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,t){if(this.kvMap.has(e)){let i=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(i);)i=r.get(i);r.set(i,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,i]of this.kvMap)if(e(i,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(i);)i=r.get(i),e(i,t)}}};function we(n,e){qo("NgControlFlow");let t=Xe(),i=gu(),r=t[i]!==xi?t[i]:-1,o=r!==-1?mg(t,hi+r):void 0,s=0;if(tr(t,i,n)){let a=kt(null);try{if(o!==void 0&&OA(o,s),n!==-1){let l=hi+n,c=mg(t,l),u=xC(t[ct],l),d=du(c,u.tView.ssrId),p=Lp(t,u,e,{dehydratedView:d});Pp(c,p,s,uu(u,d))}}finally{kt(a)}}else if(o!==void 0){let a=DA(o,s);a!==void 0&&(a[bi]=e)}}var CC=class{constructor(e,t,i){this.lContainer=e,this.$implicit=t,this.$index=i}get $count(){return this.lContainer.length-Ci}};function Wg(n){return n}function Sa(n,e){return e}var wC=class{constructor(e,t,i){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=i}};function Or(n,e,t,i,r,o,s,a,l,c,u,d,p){qo("NgControlFlow");let h=Xe(),g=Tn(),_=l!==void 0,v=Xe(),w=a?s.bind(v[dr][bi]):s,S=new wC(_,w);v[hi+n]=S,pg(h,g,n+1,e,t,i,r,ba(g.consts,o)),_&&pg(h,g,n+2,l,c,u,d,ba(g.consts,p))}var IC=class extends vC{constructor(e,t,i){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=i,this.operationsCounter=void 0,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-Ci}at(e){return this.getLView(e)[bi].$implicit}attach(e,t){let i=t[su];this.needsIndexUpdate||=e!==this.length,Pp(this.lContainer,t,e,uu(this.templateTNode,i))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,LU(this.lContainer,e)}create(e,t){let i=du(this.lContainer,this.templateTNode.tView.ssrId),r=Lp(this.hostLView,this.templateTNode,new CC(this.lContainer,t,e),{dehydratedView:i});return this.operationsCounter?.recordCreate(),r}destroy(e){jg(e[ct],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[bi].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e(Lg(!0),oA(i,r,Y9()));function jU(n,e,t,i,r){let o=e.consts,s=ba(o,i),a=vu(e,n,8,"ng-container",s);s!==null&&sg(a,s,!0);let l=ba(o,r);return hw(e,t,a,l),e.queries!==null&&e.queries.elementStart(e,a),a}function oe(n,e,t){let i=Xe(),r=Tn(),o=n+hi,s=r.firstCreatePass?jU(o,r,i,e,t):r.data[o];Bl(s,!0);let a=VU(r,i,s,n);return i[o]=a,Ng()&&Vg(r,i,a,s),Ca(a,i),Mg(s)&&(cw(r,i,s),lw(r,s,i)),t!=null&&uw(i,s),oe}function se(){let n=Ii(),e=Tn();return GC()?qC():(n=n.parent,Bl(n,!1)),e.firstCreatePass&&(Pg(e,n),HC(n)&&e.queries.elementEnd(n)),se}function ye(n,e,t){return oe(n,e,t),se(),ye}var VU=(n,e,t,i)=>(Lg(!0),sB(e[xn],""));function $(){return Xe()}var gg="en-US";var BU=gg;function zU(n){typeof n=="string"&&(BU=n.toLowerCase().replace(/_/g,"-"))}var UU=(n,e,t)=>{};function P(n,e,t,i){let r=Xe(),o=Tn(),s=Ii();return lk(o,r,r[xn],s,n,e,i),P}function HU(n,e,t,i){let r=n.cleanup;if(r!=null)for(let o=0;ol?a[l]:null}typeof s=="string"&&(o+=2)}return null}function lk(n,e,t,i,r,o,s){let a=Mg(i),c=n.firstCreatePass&&SA(n),u=e[bi],d=EA(e),p=!0;if(i.type&3||s){let _=Mr(i,e),v=s?s(_):_,w=d.length,S=s?T=>s(Bo(T[i.index])):i.index,L=null;if(!s&&a&&(L=HU(n,e,r,i.index)),L!==null){let T=L.__ngLastListenerFn__||L;T.__ngNextListenerFn__=o,L.__ngLastListenerFn__=o,p=!1}else{o=b2(i,e,u,o),UU(_,r,o);let T=t.listen(v,r,o);d.push(o,T),c&&c.push(r,S,w,w+1)}}else o=b2(i,e,u,o);let h=i.outputs,g;if(p&&h!==null&&(g=h[r])){let _=g.length;if(_)for(let v=0;v<_;v+=2){let w=g[v],S=g[v+1],q=e[w][S].subscribe(o),N=d.length;d.push(o,q),c&&c.push(r,i.index,N,-(N+1))}}}function v2(n,e,t,i){let r=kt(null);try{return Po(6,e,t),t(i)!==!1}catch(o){return MA(n,o),!1}finally{Po(7,e,t),kt(r)}}function b2(n,e,t,i){return function r(o){if(o===Function)return i;let s=n.componentOffset>-1?Ia(n.index,e):e;yw(s,5);let a=v2(e,t,i,o),l=r.__ngNextListenerFn__;for(;l;)a=v2(e,t,l,o)&&a,l=l.__ngNextListenerFn__;return a}}function y(n=1){return K9(n)}function $U(n,e){let t=null,i=o9(n);for(let r=0;r=n.data.length&&(n.data[t]=null,n.blueprint[t]=null),e[t]=i}function pt(n){let e=U9();return aO(e,hi+n)}function Z(n,e=""){let t=Xe(),i=Tn(),r=n+hi,o=i.firstCreatePass?vu(i,r,1,e,null):i.data[r],s=qU(i,t,o,e,n);t[r]=s,Ng()&&Vg(i,t,s,o),Bl(o,!1)}var qU=(n,e,t,i,r)=>(Lg(!0),rB(e[xn],i));function Pe(n){return yt("",n,""),Pe}function yt(n,e,t){let i=Xe(),r=YA(i,n,e,t);return r!==xi&&mw(i,Ho(),r),yt}function Fp(n,e,t,i,r){let o=Xe(),s=cU(o,n,e,t,i,r);return s!==xi&&mw(o,Ho(),s),Fp}function jp(n,e,t,i,r,o,s){let a=Xe(),l=uU(a,n,e,t,i,r,o,s);return l!==xi&&mw(a,Ho(),l),jp}function bu(n,e,t){WA(e)&&(e=e());let i=Xe(),r=gu();if(tr(i,r,e)){let o=Tn(),s=kg();pw(o,s,i,n,e,i[xn],t,!1)}return bu}function Vp(n,e){let t=WA(n);return t&&n.set(e),t}function Cu(n,e){let t=Xe(),i=Tn(),r=Ii();return lk(i,t,t[xn],r,n,e),Cu}function QU(n,e,t){let i=Tn();if(i.firstCreatePass){let r=va(n);TC(t,i.data,i.blueprint,r,!0),TC(e,i.data,i.blueprint,r,!1)}}function TC(n,e,t,i,r){if(n=Vi(n),Array.isArray(n))for(let o=0;o>20;if(ou(n)||!n.multi){let h=new Ll(c,r,k),g=E1(l,e,r?u:u+p,d);g===-1?(B1(Xm(a,s),o,l),T1(o,n,e.length),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(h),s.push(h)):(t[g]=h,s[g]=h)}else{let h=E1(l,e,u+p,d),g=E1(l,e,u,u+p),_=h>=0&&t[h],v=g>=0&&t[g];if(r&&!v||!r&&!_){B1(Xm(a,s),o,l);let w=ZU(r?YU:KU,t.length,r,i,c);!r&&v&&(t[g].providerFactory=w),T1(o,n,e.length,0),e.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(w),s.push(w)}else{let w=uk(t[r?g:h],c,!r&&i);T1(o,n,h>-1?h:g,w)}!r&&i&&v&&t[g].componentProviders++}}}function T1(n,e,t,i){let r=ou(e),o=v9(e);if(r||o){let l=(o?Vi(e.useClass):e).prototype.ngOnDestroy;if(l){let c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&e.multi){let u=c.indexOf(t);u===-1?c.push(t,[i,l]):c[u+1].push(i,l)}else c.push(t,l)}}}function uk(n,e,t){return t&&n.componentProviders++,n.multi.push(e)-1}function E1(n,e,t,i){for(let r=t;r{t.providersResolver=(i,r)=>QU(i,r?r(n):n,e)}}var JU=(()=>{let e=class e{constructor(i){this._injector=i,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(i){if(!i.standalone)return null;if(!this.cachedInjectors.has(i)){let r=Q2(!1,i.type),o=r.length>0?$g([r],this._injector,`Standalone[${i.type.name}]`):null;this.cachedInjectors.set(i,o)}return this.cachedInjectors.get(i)}ngOnDestroy(){try{for(let i of this.cachedInjectors.values())i!==null&&i.destroy()}finally{this.cachedInjectors.clear()}}};e.\u0275prov=K({token:e,providedIn:"environment",factory:()=>new e(re(pi))});let n=e;return n})();function ue(n){qo("NgStandalone"),n.getStandaloneInjector=e=>e.get(JU).getOrCreateStandaloneInjector(n)}function wu(n,e,t){let i=n.\u0275cmp;i.directiveDefs=Gm(e,!1),i.pipeDefs=Gm(t,!0)}function St(n,e,t){let i=Ls()+n,r=Xe();return r[i]===xi?Ea(r,i,t?e.call(t):e()):bw(r,i)}function _e(n,e,t,i){return hk(Xe(),Ls(),n,e,t,i)}function _t(n,e,t,i,r){return XU(Xe(),Ls(),n,e,t,i,r)}function Sn(n,e,t,i,r,o){return eH(Xe(),Ls(),n,e,t,i,r,o)}function kr(n,e,t,i,r,o,s){return tH(Xe(),Ls(),n,e,t,i,r,o,s)}function dk(n,e,t,i,r,o,s,a){let l=Ls()+n,c=Xe(),u=dg(c,l,t,i,r,o);return tr(c,l+4,s)||u?Ea(c,l+5,a?e.call(a,t,i,r,o,s):e(t,i,r,o,s)):bw(c,l+5)}function pk(n,e,t,i,r,o,s,a,l,c,u){let d=Ls()+n,p=Xe(),h=dg(p,d,t,i,r,o);return dg(p,d+4,s,a,l,c)||h?Ea(p,d+8,u?e.call(u,t,i,r,o,s,a,l,c):e(t,i,r,o,s,a,l,c)):bw(p,d+8)}function Iu(n,e,t,i){return nH(Xe(),Ls(),n,e,t,i)}function Bp(n,e){let t=n[e];return t===xi?void 0:t}function hk(n,e,t,i,r,o){let s=e+t;return tr(n,s,r)?Ea(n,s+1,o?i.call(o,r):i(r)):Bp(n,s+1)}function XU(n,e,t,i,r,o,s){let a=e+t;return Ep(n,a,r,o)?Ea(n,a+2,s?i.call(s,r,o):i(r,o)):Bp(n,a+2)}function eH(n,e,t,i,r,o,s,a){let l=e+t;return QA(n,l,r,o,s)?Ea(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):Bp(n,l+3)}function tH(n,e,t,i,r,o,s,a,l){let c=e+t;return dg(n,c,r,o,s,a)?Ea(n,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):Bp(n,c+4)}function nH(n,e,t,i,r,o){let s=e+t,a=!1;for(let l=0;l=0;t--){let i=e[t];if(n===i.name)return i}}function ft(n,e,t){let i=n+hi,r=Xe(),o=aO(r,i);return rH(r,i)?hk(r,Ls(),e,o.transform,t,o):o.transform(t)}function rH(n,e){return n[ct].data[e].pure}function Bt(n,e){return Hg(n,e)}var Lm=null;function oH(n){Lm!==null&&(n.defaultEncapsulation!==Lm.defaultEncapsulation||n.preserveWhitespaces!==Lm.preserveWhitespaces)||(Lm=n)}var Gg=(()=>{let e=class e{log(i){console.log(i)}warn(i){console.warn(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"platform"});let n=e;return n})();var ww=new be(""),zp=new be(""),qg=(()=>{let e=class e{constructor(i,r,o){this._ngZone=i,this.registry=r,this._isZoneStable=!0,this._callbacks=[],this.taskTrackingZone=null,Iw||(sH(o),o.addToWindow(r)),this._watchAngularEvents(),i.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{He.assertNotInAngularZone(),queueMicrotask(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}isStable(){return this._isZoneStable&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())queueMicrotask(()=>{for(;this._callbacks.length!==0;){let i=this._callbacks.pop();clearTimeout(i.timeoutId),i.doneCb()}});else{let i=this.getPendingTasks();this._callbacks=this._callbacks.filter(r=>r.updateCb&&r.updateCb(i)?(clearTimeout(r.timeoutId),!1):!0)}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(i=>({source:i.source,creationLocation:i.creationLocation,data:i.data})):[]}addCallback(i,r,o){let s=-1;r&&r>0&&(s=setTimeout(()=>{this._callbacks=this._callbacks.filter(a=>a.timeoutId!==s),i()},r)),this._callbacks.push({doneCb:i,timeoutId:s,updateCb:o})}whenStable(i,r,o){if(o&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(i,r,o),this._runCallbacksIfReady()}registerApplication(i){this.registry.registerApplication(i,this)}unregisterApplication(i){this.registry.unregisterApplication(i)}findProviders(i,r,o){return[]}};e.\u0275fac=function(r){return new(r||e)(re(He),re(Qg),re(zp))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})(),Qg=(()=>{let e=class e{constructor(){this._applications=new Map}registerApplication(i,r){this._applications.set(i,r)}unregisterApplication(i){this._applications.delete(i)}unregisterAllApplications(){this._applications.clear()}getTestability(i){return this._applications.get(i)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(i,r=!0){return Iw?.findTestabilityInTree(this,i,r)??null}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"platform"});let n=e;return n})();function sH(n){Iw=n}var Iw;function Ma(n){return!!n&&typeof n.then=="function"}function xw(n){return!!n&&typeof n.subscribe=="function"}var xu=new be(""),fk=(()=>{let e=class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r}),this.appInits=B(xu,{optional:!0})??[]}runInitializers(){if(this.initialized)return;let i=[];for(let o of this.appInits){let s=o();if(Ma(s))i.push(s);else if(xw(s)){let a=new Promise((l,c)=>{s.subscribe({complete:l,error:c})});i.push(a)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(i).then(()=>{r()}).catch(o=>{this.reject(o)}),i.length===0&&r(),this.initialized=!0}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})(),Kg=new be("");function aH(){pD(()=>{throw new ie(600,!1)})}function lH(n){return n.isBoundToModule}var cH=10;function uH(n,e,t){try{let i=t();return Ma(i)?i.catch(r=>{throw e.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw e.runOutsideAngular(()=>n.handleError(i)),i}}function mk(n,e){return Array.isArray(e)?e.reduce(mk,n):I(I({},n),e)}var fi=(()=>{let e=class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=B(b7),this.afterRenderManager=B(KA),this.zonelessEnabled=B(FA),this.dirtyFlags=0,this.deferredDirtyFlags=0,this.externalTestViews=new Set,this.beforeRender=new pe,this.afterTick=new pe,this.componentTypes=[],this.components=[],this.isStable=B($o).hasPendingTasks.pipe(Ie(i=>!i)),this._injector=B(pi)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}whenStable(){let i;return new Promise(r=>{i=this.isStable.subscribe({next:o=>{o&&r()}})}).finally(()=>{i.unsubscribe()})}get injector(){return this._injector}bootstrap(i,r){let o=i instanceof og;if(!this._injector.get(fk).done){let h=!o&&$2(i),g=!1;throw new ie(405,g)}let a;o?a=i:a=this._injector.get(Ds).resolveComponentFactory(i),this.componentTypes.push(a.componentType);let l=lH(a)?void 0:this._injector.get(Os),c=r||a.selector,u=a.create($t.NULL,[],c,l),d=u.location.nativeElement,p=u.injector.get(ww,null);return p?.registerApplication(d),u.onDestroy(()=>{this.detachView(u.hostView),zm(this.components,u),p?.unregisterApplication(d)}),this._loadComponent(u),u}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){if(this._runningTick)throw new ie(101,!1);let i=kt(null);try{this._runningTick=!0,this.synchronize()}catch(r){this.internalErrorHandler(r)}finally{this._runningTick=!1,kt(i),this.afterTick.next()}}synchronize(){let i=null;this._injector.destroyed||(i=this._injector.get(wa,null,{optional:!0})),this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0;let r=0;for(;this.dirtyFlags!==0&&r++Dg(i))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(i){let r=i;this._views.push(r),r.attachToAppRef(this)}detachView(i){let r=i;zm(this._views,r),r.detachFromAppRef()}_loadComponent(i){this.attachView(i.hostView),this.tick(),this.components.push(i);let r=this._injector.get(Kg,[]);[...this._bootstrapListeners,...r].forEach(o=>o(i))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(i=>i()),this._views.slice().forEach(i=>i.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(i){return this._destroyListeners.push(i),()=>zm(this._destroyListeners,i)}destroy(){if(this._destroyed)throw new ie(406,!1);let i=this._injector;i.destroy&&!i.destroyed&&i.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();function zm(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function dH(n,e,t,i){if(!t&&!Dg(n))return;NA(n,e,t&&!i?0:1)}var SC=class{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}},Yg=(()=>{let e=class e{compileModuleSync(i){return new ug(i)}compileModuleAsync(i){return Promise.resolve(this.compileModuleSync(i))}compileModuleAndAllComponentsSync(i){let r=this.compileModuleSync(i),o=W2(i),s=rA(o.declarations).reduce((a,l)=>{let c=Es(l);return c&&a.push(new Fl(c)),a},[]);return new SC(r,s)}compileModuleAndAllComponentsAsync(i){return Promise.resolve(this.compileModuleAndAllComponentsSync(i))}clearCache(){}clearCacheFor(i){}getModuleId(i){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})(),pH=new be("");function hH(n,e,t){let i=new ug(t);return Promise.resolve(i)}function C2(n){for(let e=n.length-1;e>=0;e--)if(n[e]!==void 0)return n[e]}var fH=(()=>{let e=class e{constructor(){this.zone=B(He),this.changeDetectionScheduler=B(pu),this.applicationRef=B(fi)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();function mH({ngZoneFactory:n,ignoreChangesOutsideZone:e,scheduleInRootZone:t}){return n??=()=>new He(R(I({},gk()),{scheduleInRootZone:t})),[{provide:He,useFactory:n},{provide:ru,multi:!0,useFactory:()=>{let i=B(fH,{optional:!0});return()=>i.initialize()}},{provide:ru,multi:!0,useFactory:()=>{let i=B(gH);return()=>{i.initialize()}}},e===!0?{provide:jA,useValue:!0}:[],{provide:VA,useValue:t??PO}]}function gk(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:n?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:n?.runCoalescing??!1}}var gH=(()=>{let e=class e{constructor(){this.subscription=new et,this.initialized=!1,this.zone=B(He),this.pendingTasks=B($o)}initialize(){if(this.initialized)return;this.initialized=!0;let i=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(i=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{He.assertNotInAngularZone(),queueMicrotask(()=>{i!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(i),i=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{He.assertInAngularZone(),i??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var yH=(()=>{let e=class e{constructor(){this.appRef=B(fi),this.taskService=B($o),this.ngZone=B(He),this.zonelessEnabled=B(FA),this.disableScheduling=B(jA,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new et,this.angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(tg):null,this.scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(B(VA,{optional:!0})??!1),this.cancelScheduledCallback=null,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof ng||!this.zoneIsDefined)}notify(i){if(!this.zonelessEnabled&&i===5)return;switch(i){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 7:{this.appRef.deferredDirtyFlags|=8;break}case 9:case 8:case 6:case 10:default:this.appRef.dirtyFlags|=8}if(!this.shouldScheduleTick())return;let r=this.useMicrotaskScheduler?YD:RO;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(){return!(this.disableScheduling||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(tg+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let i=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(r){throw this.taskService.remove(i),r}finally{this.cleanup()}this.useMicrotaskScheduler=!0,YD(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(i)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let i=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(i)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();function _H(){return typeof $localize<"u"&&$localize.locale||gg}var Tw=new be("",{providedIn:"root",factory:()=>B(Tw,Et.Optional|Et.SkipSelf)||_H()});var Ew=new be("");function Pm(n){return!!n.platformInjector}function vH(n){let e=Pm(n)?n.r3Injector:n.moduleRef.injector,t=e.get(He);return t.run(()=>{Pm(n)?n.r3Injector.resolveInjectorInitializers():n.moduleRef.resolveInjectorInitializers();let i=e.get(zo,null),r;if(t.runOutsideAngular(()=>{r=t.onError.subscribe({next:o=>{i.handleError(o)}})}),Pm(n)){let o=()=>e.destroy(),s=n.platformInjector.get(Ew);s.add(o),e.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else n.moduleRef.onDestroy(()=>{zm(n.allPlatformModules,n.moduleRef),r.unsubscribe()});return uH(i,t,()=>{let o=e.get(fk);return o.runInitializers(),o.donePromise.then(()=>{let s=e.get(Tw,gg);if(zU(s||gg),Pm(n)){let a=e.get(fi);return n.rootComponent!==void 0&&a.bootstrap(n.rootComponent),a}else return bH(n.moduleRef,n.allPlatformModules),n.moduleRef})})})}function bH(n,e){let t=n.injector.get(fi);if(n._bootstrapComponents.length>0)n._bootstrapComponents.forEach(i=>t.bootstrap(i));else if(n.instance.ngDoBootstrap)n.instance.ngDoBootstrap(t);else throw new ie(-403,!1);e.push(n)}var yk=(()=>{let e=class e{constructor(i){this._injector=i,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(i,r){let o=r?.scheduleInRootZone,s=()=>v7(r?.ngZone,R(I({},gk({eventCoalescing:r?.ngZoneEventCoalescing,runCoalescing:r?.ngZoneRunCoalescing})),{scheduleInRootZone:o})),a=r?.ignoreChangesOutsideZone,l=[mH({ngZoneFactory:s,ignoreChangesOutsideZone:a}),{provide:pu,useExisting:yH}],c=eU(i.moduleType,this.injector,l);return vH({moduleRef:c,allPlatformModules:this._modules})}bootstrapModule(i,r=[]){let o=mk({},r);return hH(this.injector,o,i).then(s=>this.bootstrapModuleFactory(s,o))}onDestroy(i){this._destroyListeners.push(i)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new ie(404,!1);this._modules.slice().forEach(r=>r.destroy()),this._destroyListeners.forEach(r=>r());let i=this._injector.get(Ew,null);i&&(i.forEach(r=>r()),i.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}};e.\u0275fac=function(r){return new(r||e)(re($t))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"platform"});let n=e;return n})(),yp=null,_k=new be("");function CH(n){if(yp&&!yp.get(_k,!1))throw new ie(400,!1);aH(),yp=n;let e=n.get(yk);return xH(n),e}function Sw(n,e,t=[]){let i=`Platform: ${e}`,r=new be(i);return(o=[])=>{let s=vk();if(!s||s.injector.get(_k,!1)){let a=[...t,...o,{provide:r,useValue:!0}];n?n(a):CH(wH(a,i))}return IH(r)}}function wH(n=[],e){return $t.create({name:e,providers:[{provide:xg,useValue:"platform"},{provide:Ew,useValue:new Set([()=>yp=null])},...n]})}function IH(n){let e=vk();if(!e)throw new ie(401,!1);return e}function vk(){return yp?.get(yk)??null}function xH(n){n.get(ew,null)?.forEach(t=>t())}function bk(){return!1}var De=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=TH;let n=e;return n})();function TH(n){return EH(Ii(),Xe(),(n&16)===16)}function EH(n,e,t){if(Sg(n)&&!t){let i=Ia(n.index,e);return new Rl(i,i)}else if(n.type&175){let i=e[dr];return new Rl(i,e)}return null}var MC=class{constructor(){}supports(e){return qA(e)}create(e){return new DC(e)}},SH=(n,e)=>e,DC=class{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||SH}forEachItem(e){let t;for(t=this._itHead;t!==null;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,i=this._removalsHead,r=0,o=null;for(;t||i;){let s=!i||t&&t.currentIndex{s=this._trackByFn(r,a),t===null||!Object.is(t.trackById,s)?(t=this._mismatch(t,a,s,r),i=!0):(i&&(t=this._verifyReinsertion(t,a,s,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;e!==null;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;e!==null;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,i,r){let o;return e===null?o=this._itTail:(o=e._prev,this._remove(e)),e=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,o,r)):(e=this._linkedRecords===null?null:this._linkedRecords.get(i,r),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,o,r)):e=this._addAfter(new OC(t,i),o,r)),e}_verifyReinsertion(e,t,i,r){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null);return o!==null?e=this._reinsertAfter(o,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;e!==null;){let t=e._next;this._addToRemovals(this._unlink(e)),e=t}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,i){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(e);let r=e._prevRemoved,o=e._nextRemoved;return r===null?this._removalsHead=o:r._nextRemoved=o,o===null?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(e,t,i),this._addToMoves(e,i),e}_moveAfter(e,t,i){return this._unlink(e),this._insertAfter(e,t,i),this._addToMoves(e,i),e}_addAfter(e,t,i){return this._insertAfter(e,t,i),this._additionsTail===null?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,t,i){let r=t===null?this._itHead:t._next;return e._next=r,e._prev=t,r===null?this._itTail=e:r._prev=e,t===null?this._itHead=e:t._next=e,this._linkedRecords===null&&(this._linkedRecords=new yg),this._linkedRecords.put(e),e.currentIndex=i,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){this._linkedRecords!==null&&this._linkedRecords.remove(e);let t=e._prev,i=e._next;return t===null?this._itHead=i:t._next=i,i===null?this._itTail=t:i._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail===null?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return this._unlinkedRecords===null&&(this._unlinkedRecords=new yg),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}},OC=class{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},AC=class{constructor(){this._head=null,this._tail=null}add(e){this._head===null?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let i;for(i=this._head;i!==null;i=i._nextDup)if((t===null||t<=i.currentIndex)&&Object.is(i.trackById,e))return i;return null}remove(e){let t=e._prevDup,i=e._nextDup;return t===null?this._head=i:t._nextDup=i,i===null?this._tail=t:i._prevDup=t,this._head===null}},yg=class{constructor(){this.map=new Map}put(e){let t=e.trackById,i=this.map.get(t);i||(i=new AC,this.map.set(t,i)),i.add(e)}get(e,t){let i=e,r=this.map.get(i);return r?r.get(e,t):null}remove(e){let t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function w2(n,e,t){let i=n.previousIndex;if(i===null)return i;let r=0;return t&&i{if(t&&t.key===r)this._maybeAddToChanges(t,i),this._appendAfter=t,t=t._next;else{let o=this._getOrCreateRecordForKey(r,i);t=this._insertBeforeOrAppend(t,o)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let i=t;i!==null;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){let i=e._prev;return t._next=e,t._prev=i,e._prev=t,i&&(i._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){let r=this._records.get(e);this._maybeAddToChanges(r,t);let o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}let i=new LC(e);return this._records.set(e,i),i.currentValue=t,this._addToAdditions(i),i}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(i=>t(e[i],i))}},LC=class{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}};function I2(){return new Zg([new MC])}var Zg=(()=>{let e=class e{constructor(i){this.factories=i}static create(i,r){if(r!=null){let o=r.factories.slice();i=i.concat(o)}return new e(i)}static extend(i){return{provide:e,useFactory:r=>e.create(i,r||I2()),deps:[[e,new Cg,new Dp]]}}find(i){let r=this.factories.find(o=>o.supports(i));if(r!=null)return r;throw new ie(901,!1)}};e.\u0275prov=K({token:e,providedIn:"root",factory:I2});let n=e;return n})();function x2(){return new Up([new kC])}var Up=(()=>{let e=class e{constructor(i){this.factories=i}static create(i,r){if(r){let o=r.factories.slice();i=i.concat(o)}return new e(i)}static extend(i){return{provide:e,useFactory:r=>e.create(i,r||x2()),deps:[[e,new Cg,new Dp]]}}find(i){let r=this.factories.find(o=>o.supports(i));if(r)return r;throw new ie(901,!1)}};e.\u0275prov=K({token:e,providedIn:"root",factory:x2});let n=e;return n})();var Ck=Sw(null,"core",[]),wk=(()=>{let e=class e{constructor(i){}};e.\u0275fac=function(r){return new(r||e)(re(fi))},e.\u0275mod=le({type:e}),e.\u0275inj=ae({});let n=e;return n})();var Ik=new be("");function V(n){return typeof n=="boolean"?n:n!=null&&n!=="false"}function Ke(n,e=NaN){return!isNaN(parseFloat(n))&&!isNaN(Number(n))?Number(n):e}function cn(n,e){qo("NgSignals");let t=cD(n);return e?.equal&&(t[ro].equal=e.equal),t}function Ti(n){let e=kt(null);try{return n()}finally{kt(e)}}var MH=new be("",{providedIn:"root",factory:()=>B(DH)}),DH=(()=>{let e=class e{};e.\u0275prov=K({token:e,providedIn:"root",factory:()=>new PC});let n=e;return n})(),PC=class{constructor(){this.queuedEffectCount=0,this.queues=new Map,this.pendingTasks=B($o),this.taskId=null}scheduleEffect(e){if(this.enqueue(e),this.taskId===null){let t=this.taskId=this.pendingTasks.add();queueMicrotask(()=>{this.flush(),this.pendingTasks.remove(t),this.taskId=null})}}enqueue(e){let t=e.creationZone;this.queues.has(t)||this.queues.set(t,new Set);let i=this.queues.get(t);i.has(e)||(this.queuedEffectCount++,i.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}},RC=class{constructor(e,t,i,r,o,s){this.scheduler=e,this.effectFn=t,this.creationZone=i,this.injector=o,this.watcher=mD(a=>this.runEffect(a),()=>this.schedule(),s),this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}runEffect(e){try{this.effectFn(e)}catch(t){this.injector.get(zo,null,{optional:!0})?.handleError(t)}}run(){this.watcher.run()}schedule(){this.scheduler.scheduleEffect(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}};function Da(n,e){qo("NgSignals"),!e?.injector&&Vl(Da);let t=e?.injector??B($t),i=e?.manualCleanup!==!0?t.get(ri):null,r=new RC(t.get(MH),n,typeof Zone>"u"?null:Zone.current,i,t,e?.allowSignalWrites??!1),o=t.get(De,null,{optional:!0});return!o||!(o._lView[tt]&8)?r.watcher.notify():(o._lView[Fm]??=[]).push(r.watcher.notify),r}function Tu(n,e){let t=Es(n),i=e.elementInjector||Tg();return new Fl(t).create(i,e.projectableNodes,e.hostElement,e.environmentInjector)}function xk(n){let e=Es(n);if(!e)return null;let t=new Fl(e);return{get selector(){return t.selector},get type(){return t.componentType},get inputs(){return t.inputs},get outputs(){return t.outputs},get ngContentSelectors(){return t.ngContentSelectors},get isStandalone(){return e.standalone},get isSignal(){return e.signals}}}var Ak=null;function Qo(){return Ak}function kk(n){Ak??=n}var Jg=class{};var We=new be(""),Rw=(()=>{let e=class e{historyGo(i){throw new Error("")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:()=>B(kH),providedIn:"platform"});let n=e;return n})(),Nk=new be(""),kH=(()=>{let e=class e extends Rw{constructor(){super(),this._doc=B(We),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Qo().getBaseHref(this._doc)}onPopState(i){let r=Qo().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",i,!1),()=>r.removeEventListener("popstate",i)}onHashChange(i){let r=Qo().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",i,!1),()=>r.removeEventListener("hashchange",i)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(i){this._location.pathname=i}pushState(i,r,o){this._history.pushState(i,r,o)}replaceState(i,r,o){this._history.replaceState(i,r,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(i=0){this._history.go(i)}getState(){return this._history.state}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:()=>new e,providedIn:"platform"});let n=e;return n})();function Fw(n,e){if(n.length==0)return e;if(e.length==0)return n;let t=0;return n.endsWith("/")&&t++,e.startsWith("/")&&t++,t==2?n+e.substring(1):t==1?n+e:n+"/"+e}function Tk(n){let e=n.match(/#|\?|$/),t=e&&e.index||n.length,i=t-(n[t-1]==="/"?1:0);return n.slice(0,i)+n.slice(t)}function Fs(n){return n&&n[0]!=="?"?"?"+n:n}var zl=(()=>{let e=class e{historyGo(i){throw new Error("")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:()=>B(jw),providedIn:"root"});let n=e;return n})(),Lk=new be(""),jw=(()=>{let e=class e extends zl{constructor(i,r){super(),this._platformLocation=i,this._removeListenerFns=[],this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??B(We).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(i){this._removeListenerFns.push(this._platformLocation.onPopState(i),this._platformLocation.onHashChange(i))}getBaseHref(){return this._baseHref}prepareExternalUrl(i){return Fw(this._baseHref,i)}path(i=!1){let r=this._platformLocation.pathname+Fs(this._platformLocation.search),o=this._platformLocation.hash;return o&&i?`${r}${o}`:r}pushState(i,r,o,s){let a=this.prepareExternalUrl(o+Fs(s));this._platformLocation.pushState(i,r,a)}replaceState(i,r,o,s){let a=this.prepareExternalUrl(o+Fs(s));this._platformLocation.replaceState(i,r,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(i=0){this._platformLocation.historyGo?.(i)}};e.\u0275fac=function(r){return new(r||e)(re(Rw),re(Lk,8))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})(),Pk=(()=>{let e=class e extends zl{constructor(i,r){super(),this._platformLocation=i,this._baseHref="",this._removeListenerFns=[],r!=null&&(this._baseHref=r)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(i){this._removeListenerFns.push(this._platformLocation.onPopState(i),this._platformLocation.onHashChange(i))}getBaseHref(){return this._baseHref}path(i=!1){let r=this._platformLocation.hash??"#";return r.length>0?r.substring(1):r}prepareExternalUrl(i){let r=Fw(this._baseHref,i);return r.length>0?"#"+r:r}pushState(i,r,o,s){let a=this.prepareExternalUrl(o+Fs(s));a.length==0&&(a=this._platformLocation.pathname),this._platformLocation.pushState(i,r,a)}replaceState(i,r,o,s){let a=this.prepareExternalUrl(o+Fs(s));a.length==0&&(a=this._platformLocation.pathname),this._platformLocation.replaceState(i,r,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(i=0){this._platformLocation.historyGo?.(i)}};e.\u0275fac=function(r){return new(r||e)(re(Rw),re(Lk,8))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})(),Su=(()=>{let e=class e{constructor(i){this._subject=new j,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=i;let r=this._locationStrategy.getBaseHref();this._basePath=PH(Tk(Ek(r))),this._locationStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(i=!1){return this.normalize(this._locationStrategy.path(i))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(i,r=""){return this.path()==this.normalize(i+Fs(r))}normalize(i){return e.stripTrailingSlash(LH(this._basePath,Ek(i)))}prepareExternalUrl(i){return i&&i[0]!=="/"&&(i="/"+i),this._locationStrategy.prepareExternalUrl(i)}go(i,r="",o=null){this._locationStrategy.pushState(o,"",i,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(i+Fs(r)),o)}replaceState(i,r="",o=null){this._locationStrategy.replaceState(o,"",i,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(i+Fs(r)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(i=0){this._locationStrategy.historyGo?.(i)}onUrlChange(i){return this._urlChangeListeners.push(i),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(i);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(i="",r){this._urlChangeListeners.forEach(o=>o(i,r))}subscribe(i,r,o){return this._subject.subscribe({next:i,error:r,complete:o})}};e.normalizeQueryParams=Fs,e.joinWithSlash=Fw,e.stripTrailingSlash=Tk,e.\u0275fac=function(r){return new(r||e)(re(zl))},e.\u0275prov=K({token:e,factory:()=>NH(),providedIn:"root"});let n=e;return n})();function NH(){return new Su(re(zl))}function LH(n,e){if(!n||!e.startsWith(n))return e;let t=e.substring(n.length);return t===""||["/",";","?","#"].includes(t[0])?t:e}function Ek(n){return n.replace(/\/index.html$/,"")}function PH(n){if(new RegExp("^(https?:)?//").test(n)){let[,t]=n.split(/\/\/[^\/]+/);return t}return n}function e0(n,e){e=encodeURIComponent(e);for(let t of n.split(";")){let i=t.indexOf("="),[r,o]=i==-1?[t,""]:[t.slice(0,i),t.slice(i+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}var Dw=/\s+/,Sk=[],Ye=(()=>{let e=class e{constructor(i,r){this._ngEl=i,this._renderer=r,this.initialClasses=Sk,this.stateMap=new Map}set klass(i){this.initialClasses=i!=null?i.trim().split(Dw):Sk}set ngClass(i){this.rawClass=typeof i=="string"?i.trim().split(Dw):i}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let i=this.rawClass;if(Array.isArray(i)||i instanceof Set)for(let r of i)this._updateState(r,!0);else if(i!=null)for(let r of Object.keys(i))this._updateState(r,!!i[r]);this._applyStateDiff()}_updateState(i,r){let o=this.stateMap.get(i);o!==void 0?(o.enabled!==r&&(o.changed=!0,o.enabled=r),o.touched=!0):this.stateMap.set(i,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let i of this.stateMap){let r=i[0],o=i[1];o.changed?(this._toggleClass(r,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),o.touched=!1}}_toggleClass(i,r){i=i.trim(),i.length>0&&i.split(Dw).forEach(o=>{r?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}};e.\u0275fac=function(r){return new(r||e)(k(Ce),k(At))},e.\u0275dir=gt({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0});let n=e;return n})(),Rk=(()=>{let e=class e{constructor(i){this._viewContainerRef=i,this.ngComponentOutlet=null,this._inputsUsed=new Map}_needToReCreateNgModuleInstance(i){return i.ngComponentOutletNgModule!==void 0||i.ngComponentOutletNgModuleFactory!==void 0}_needToReCreateComponentInstance(i){return i.ngComponentOutlet!==void 0||i.ngComponentOutletContent!==void 0||i.ngComponentOutletInjector!==void 0||this._needToReCreateNgModuleInstance(i)}ngOnChanges(i){if(this._needToReCreateComponentInstance(i)&&(this._viewContainerRef.clear(),this._inputsUsed.clear(),this._componentRef=void 0,this.ngComponentOutlet)){let r=this.ngComponentOutletInjector||this._viewContainerRef.parentInjector;this._needToReCreateNgModuleInstance(i)&&(this._moduleRef?.destroy(),this.ngComponentOutletNgModule?this._moduleRef=GA(this.ngComponentOutletNgModule,Mk(r)):this.ngComponentOutletNgModuleFactory?this._moduleRef=this.ngComponentOutletNgModuleFactory.create(Mk(r)):this._moduleRef=void 0),this._componentRef=this._viewContainerRef.createComponent(this.ngComponentOutlet,{injector:r,ngModuleRef:this._moduleRef,projectableNodes:this.ngComponentOutletContent})}}ngDoCheck(){if(this._componentRef){if(this.ngComponentOutletInputs)for(let i of Object.keys(this.ngComponentOutletInputs))this._inputsUsed.set(i,!0);this._applyInputStateDiff(this._componentRef)}}ngOnDestroy(){this._moduleRef?.destroy()}_applyInputStateDiff(i){for(let[r,o]of this._inputsUsed)o?(i.setInput(r,this.ngComponentOutletInputs[r]),this._inputsUsed.set(r,!1)):(i.setInput(r,void 0),this._inputsUsed.delete(r))}};e.\u0275fac=function(r){return new(r||e)(k(Un))},e.\u0275dir=gt({type:e,selectors:[["","ngComponentOutlet",""]],inputs:{ngComponentOutlet:"ngComponentOutlet",ngComponentOutletInputs:"ngComponentOutletInputs",ngComponentOutletInjector:"ngComponentOutletInjector",ngComponentOutletContent:"ngComponentOutletContent",ngComponentOutletNgModule:"ngComponentOutletNgModule",ngComponentOutletNgModuleFactory:"ngComponentOutletNgModuleFactory"},standalone:!0,features:[Jt]});let n=e;return n})();function Mk(n){return n.get(Os).injector}var Ow=class{constructor(e,t,i,r){this.$implicit=e,this.ngForOf=t,this.index=i,this.count=r}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Ui=(()=>{let e=class e{set ngForOf(i){this._ngForOf=i,this._ngForOfDirty=!0}set ngForTrackBy(i){this._trackByFn=i}get ngForTrackBy(){return this._trackByFn}constructor(i,r,o){this._viewContainer=i,this._template=r,this._differs=o,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(i){i&&(this._template=i)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let i=this._ngForOf;if(!this._differ&&i)if(0)try{}catch{}else this._differ=this._differs.find(i).create(this.ngForTrackBy)}if(this._differ){let i=this._differ.diff(this._ngForOf);i&&this._applyChanges(i)}}_applyChanges(i){let r=this._viewContainer;i.forEachOperation((o,s,a)=>{if(o.previousIndex==null)r.createEmbeddedView(this._template,new Ow(o.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)r.remove(s===null?void 0:s);else if(s!==null){let l=r.get(s);r.move(l,a),Dk(l,o)}});for(let o=0,s=r.length;o{let s=r.get(o.currentIndex);Dk(s,o)})}static ngTemplateContextGuard(i,r){return!0}};e.\u0275fac=function(r){return new(r||e)(k(Un),k(pr),k(Zg))},e.\u0275dir=gt({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let n=e;return n})();function Dk(n,e){n.context.$implicit=e.item}var ot=(()=>{let e=class e{constructor(i,r){this._viewContainer=i,this._context=new Aw,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(i){this._context.$implicit=this._context.ngIf=i,this._updateView()}set ngIfThen(i){Ok("ngIfThen",i),this._thenTemplateRef=i,this._thenViewRef=null,this._updateView()}set ngIfElse(i){Ok("ngIfElse",i),this._elseTemplateRef=i,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(i,r){return!0}};e.\u0275fac=function(r){return new(r||e)(k(Un),k(pr))},e.\u0275dir=gt({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let n=e;return n})(),Aw=class{constructor(){this.$implicit=null,this.ngIf=null}};function Ok(n,e){if(!!!(!e||e.createEmbeddedView))throw new Error(`${n} must be a TemplateRef, but received '${Bi(e)}'.`)}var st=(()=>{let e=class e{constructor(i,r,o){this._ngEl=i,this._differs=r,this._renderer=o,this._ngStyle=null,this._differ=null}set ngStyle(i){this._ngStyle=i,!this._differ&&i&&(this._differ=this._differs.find(i).create())}ngDoCheck(){if(this._differ){let i=this._differ.diff(this._ngStyle);i&&this._applyChanges(i)}}_setStyle(i,r){let[o,s]=i.split("."),a=o.indexOf("-")===-1?void 0:Uo.DashCase;r!=null?this._renderer.setStyle(this._ngEl.nativeElement,o,s?`${r}${s}`:r,a):this._renderer.removeStyle(this._ngEl.nativeElement,o,a)}_applyChanges(i){i.forEachRemovedItem(r=>this._setStyle(r.key,null)),i.forEachAddedItem(r=>this._setStyle(r.key,r.currentValue)),i.forEachChangedItem(r=>this._setStyle(r.key,r.currentValue))}};e.\u0275fac=function(r){return new(r||e)(k(Ce),k(Up),k(At))},e.\u0275dir=gt({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});let n=e;return n})(),Mt=(()=>{let e=class e{constructor(i){this._viewContainerRef=i,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(i){if(this._shouldRecreateView(i)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(i){return!!i.ngTemplateOutlet||!!i.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(i,r,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,o):!1,get:(i,r,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,o)}})}};e.\u0275fac=function(r){return new(r||e)(k(Un))},e.\u0275dir=gt({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Jt]});let n=e;return n})();function Vw(n,e){return new ie(2100,!1)}var kw=class{createSubscription(e,t){return Ti(()=>e.subscribe({next:t,error:i=>{throw i}}))}dispose(e){Ti(()=>e.unsubscribe())}},Nw=class{createSubscription(e,t){return e.then(t,i=>{throw i})}dispose(e){}},RH=new Nw,FH=new kw,t0=(()=>{let e=class e{constructor(i){this._latestValue=null,this.markForCheckOnValueUpdate=!0,this._subscription=null,this._obj=null,this._strategy=null,this._ref=i}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(i){if(!this._obj){if(i)try{this.markForCheckOnValueUpdate=!1,this._subscribe(i)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return i!==this._obj?(this._dispose(),this.transform(i)):this._latestValue}_subscribe(i){this._obj=i,this._strategy=this._selectStrategy(i),this._subscription=this._strategy.createSubscription(i,r=>this._updateLatestValue(i,r))}_selectStrategy(i){if(Ma(i))return RH;if(xw(i))return FH;throw Vw(e,i)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(i,r){i===this._obj&&(this._latestValue=r,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}};e.\u0275fac=function(r){return new(r||e)(k(De,16))},e.\u0275pipe=As({name:"async",type:e,pure:!1,standalone:!0});let n=e;return n})(),n0=(()=>{let e=class e{transform(i){if(i==null)return null;if(typeof i!="string")throw Vw(e,i);return i.toLowerCase()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=As({name:"lowercase",type:e,pure:!0,standalone:!0});let n=e;return n})(),jH=/(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])\S*/g,Fk=(()=>{let e=class e{transform(i){if(i==null)return null;if(typeof i!="string")throw Vw(e,i);return i.replace(jH,r=>r[0].toUpperCase()+r.slice(1).toLowerCase())}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=As({name:"titlecase",type:e,pure:!0,standalone:!0});let n=e;return n})();var Te=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({});let n=e;return n})(),Bw="browser",VH="server";function Dt(n){return n===Bw}function i0(n){return n===VH}var jk=(()=>{let e=class e{};e.\u0275prov=K({token:e,providedIn:"root",factory:()=>Dt(B(Nt))?new Lw(B(We),window):new Pw});let n=e;return n})(),Lw=class{constructor(e,t){this.document=e,this.window=t,this.offset=()=>[0,0]}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(e){this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){let t=BH(this.document,e);t&&(this.scrollToElement(t),t.focus())}setHistoryScrollRestoration(e){this.window.history.scrollRestoration=e}scrollToElement(e){let t=e.getBoundingClientRect(),i=t.left+this.window.pageXOffset,r=t.top+this.window.pageYOffset,o=this.offset();this.window.scrollTo(i-o[0],r-o[1])}};function BH(n,e){let t=n.getElementById(e)||n.getElementsByName(e)[0];if(t)return t;if(typeof n.createTreeWalker=="function"&&n.body&&typeof n.body.attachShadow=="function"){let i=n.createTreeWalker(n.body,NodeFilter.SHOW_ELEMENT),r=i.currentNode;for(;r;){let o=r.shadowRoot;if(o){let s=o.getElementById(e)||o.querySelector(`[name="${e}"]`);if(s)return s}r=i.nextNode()}}return null}var Pw=class{setOffset(e){}getScrollPosition(){return[0,0]}scrollToPosition(e){}scrollToAnchor(e){}setHistoryScrollRestoration(e){}},Eu=class{};var $p=class{},o0=class{},Ei=class n{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(` +`).forEach(t=>{let i=t.indexOf(":");if(i>0){let r=t.slice(0,i),o=r.toLowerCase(),s=t.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,i)=>{this.setHeaderEntries(i,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,i])=>{this.setHeaderEntries(t,i)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new n;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let i=e.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...i),this.headers.set(t,r);break;case"d":let o=e.value;if(!o)this.headers.delete(t),this.normalizedNames.delete(t);else{let s=this.headers.get(t);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,s)}break}}setHeaderEntries(e,t){let i=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(e,r)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var Uw=class{encodeKey(e){return Vk(e)}encodeValue(e){return Vk(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function zH(n,e){let t=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[e.decodeKey(r),""]:[e.decodeKey(r.slice(0,o)),e.decodeValue(r.slice(o+1))],l=t.get(s)||[];l.push(a),t.set(s,l)}),t}var UH=/%(\d[a-f0-9])/gi,HH={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Vk(n){return encodeURIComponent(n).replace(UH,(e,t)=>HH[t]??e)}function r0(n){return`${n}`}var Oa=class n{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new Uw,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=zH(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let i=e.fromObject[t],r=Array.isArray(i)?i.map(r0):[r0(i)];this.map.set(t,r)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(i=>{let r=e[i];Array.isArray(r)?r.forEach(o=>{t.push({param:i,value:o,op:"a"})}):t.push({param:i,value:r,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(i=>t+"="+this.encoder.encodeValue(i)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new n({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(r0(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let i=this.map.get(e.param)||[],r=i.indexOf(r0(e.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(e.param,i):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var Hw=class{constructor(){this.map=new Map}set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function $H(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Bk(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function zk(n){return typeof Blob<"u"&&n instanceof Blob}function Uk(n){return typeof FormData<"u"&&n instanceof FormData}function WH(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var Hp=class n{constructor(e,t,i,r){this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let o;if($H(this.method)||r?(this.body=i!==void 0?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new Ei,this.context??=new Hw,!this.params)this.params=new Oa,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),l=a===-1?"?":ap.set(h,e.setHeaders[h]),c)),e.setParams&&(u=Object.keys(e.setParams).reduce((p,h)=>p.set(h,e.setParams[h]),u)),new n(t,i,s,{params:u,headers:c,context:d,reportProgress:l,responseType:r,withCredentials:a,transferCache:o})}},Nr=function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n}(Nr||{}),Wp=class{constructor(e,t=200,i="OK"){this.headers=e.headers||new Ei,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||i,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},s0=class n extends Wp{constructor(e={}){super(e),this.type=Nr.ResponseHeader}clone(e={}){return new n({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Gp=class n extends Wp{constructor(e={}){super(e),this.type=Nr.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new n({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Ko=class extends Wp{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},qk=200,GH=204;function zw(n,e){return{body:e,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,transferCache:n.transferCache}}var ei=(()=>{let e=class e{constructor(i){this.handler=i}request(i,r,o={}){let s;if(i instanceof Hp)s=i;else{let c;o.headers instanceof Ei?c=o.headers:c=new Ei(o.headers);let u;o.params&&(o.params instanceof Oa?u=o.params:u=new Oa({fromObject:o.params})),s=new Hp(i,r,o.body!==void 0?o.body:null,{headers:c,context:o.context,params:u,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let a=ke(s).pipe(lo(c=>this.handler.handle(c)));if(i instanceof Hp||o.observe==="events")return a;let l=a.pipe(rn(c=>c instanceof Gp));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return l.pipe(Ie(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return c.body}));case"blob":return l.pipe(Ie(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new Error("Response is not a Blob.");return c.body}));case"text":return l.pipe(Ie(c=>{if(c.body!==null&&typeof c.body!="string")throw new Error("Response is not a string.");return c.body}));case"json":default:return l.pipe(Ie(c=>c.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${o.observe}}`)}}delete(i,r={}){return this.request("DELETE",i,r)}get(i,r={}){return this.request("GET",i,r)}head(i,r={}){return this.request("HEAD",i,r)}jsonp(i,r){return this.request("JSONP",i,{params:new Oa().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(i,r={}){return this.request("OPTIONS",i,r)}patch(i,r,o={}){return this.request("PATCH",i,zw(o,r))}post(i,r,o={}){return this.request("POST",i,zw(o,r))}put(i,r,o={}){return this.request("PUT",i,zw(o,r))}};e.\u0275fac=function(r){return new(r||e)(re($p))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})(),qH=/^\)\]\}',?\n/,QH="X-Request-URL";function Hk(n){if(n.url)return n.url;let e=QH.toLocaleLowerCase();return n.headers.get(e)}var KH=(()=>{let e=class e{constructor(){this.fetchImpl=B($w,{optional:!0})?.fetch??((...i)=>globalThis.fetch(...i)),this.ngZone=B(He)}handle(i){return new Qe(r=>{let o=new AbortController;return this.doRequest(i,o.signal,r).then(Ww,s=>r.error(new Ko({error:s}))),()=>o.abort()})}doRequest(i,r,o){return ji(this,null,function*(){let s=this.createRequestInit(i),a;try{let g=this.ngZone.runOutsideAngular(()=>this.fetchImpl(i.urlWithParams,I({signal:r},s)));YH(g),o.next({type:Nr.Sent}),a=yield g}catch(g){o.error(new Ko({error:g,status:g.status??0,statusText:g.statusText,url:i.urlWithParams,headers:g.headers}));return}let l=new Ei(a.headers),c=a.statusText,u=Hk(a)??i.urlWithParams,d=a.status,p=null;if(i.reportProgress&&o.next(new s0({headers:l,status:d,statusText:c,url:u})),a.body){let g=a.headers.get("content-length"),_=[],v=a.body.getReader(),w=0,S,L,T=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular(()=>ji(this,null,function*(){for(;;){let{done:N,value:ee}=yield v.read();if(N)break;if(_.push(ee),w+=ee.length,i.reportProgress){L=i.responseType==="text"?(L??"")+(S??=new TextDecoder).decode(ee,{stream:!0}):void 0;let ge=()=>o.next({type:Nr.DownloadProgress,total:g?+g:void 0,loaded:w,partialText:L});T?T.run(ge):ge()}}}));let q=this.concatChunks(_,w);try{let N=a.headers.get("Content-Type")??"";p=this.parseBody(i,q,N)}catch(N){o.error(new Ko({error:N,headers:new Ei(a.headers),status:a.status,statusText:a.statusText,url:Hk(a)??i.urlWithParams}));return}}d===0&&(d=p?qk:0),d>=200&&d<300?(o.next(new Gp({body:p,headers:l,status:d,statusText:c,url:u})),o.complete()):o.error(new Ko({error:p,headers:l,status:d,statusText:c,url:u}))})}parseBody(i,r,o){switch(i.responseType){case"json":let s=new TextDecoder().decode(r).replace(qH,"");return s===""?null:JSON.parse(s);case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(i){let r={},o=i.withCredentials?"include":void 0;if(i.headers.forEach((s,a)=>r[s]=a.join(",")),i.headers.has("Accept")||(r.Accept="application/json, text/plain, */*"),!i.headers.has("Content-Type")){let s=i.detectContentTypeHeader();s!==null&&(r["Content-Type"]=s)}return{body:i.serializeBody(),method:i.method,headers:r,credentials:o}}concatChunks(i,r){let o=new Uint8Array(r),s=0;for(let a of i)o.set(a,s),s+=a.length;return o}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})(),$w=class{};function Ww(){}function YH(n){n.then(Ww,Ww)}function Qk(n,e){return e(n)}function ZH(n,e){return(t,i)=>e.intercept(t,{handle:r=>n(r,i)})}function JH(n,e,t){return(i,r)=>Sr(t,()=>e(i,o=>n(o,r)))}var XH=new be(""),Gw=new be(""),e$=new be(""),Kk=new be("",{providedIn:"root",factory:()=>!0});function t$(){let n=null;return(e,t)=>{n===null&&(n=(B(XH,{optional:!0})??[]).reduceRight(ZH,Qk));let i=B($o);if(B(Kk)){let o=i.add();return n(e,t).pipe(Tr(()=>i.remove(o)))}else return n(e,t)}}var $k=(()=>{let e=class e extends $p{constructor(i,r){super(),this.backend=i,this.injector=r,this.chain=null,this.pendingTasks=B($o),this.contributeToStability=B(Kk)}handle(i){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(Gw),...this.injector.get(e$,[])]));this.chain=r.reduceRight((o,s)=>JH(o,s,this.injector),Qk)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(i,o=>this.backend.handle(o)).pipe(Tr(()=>this.pendingTasks.remove(r)))}else return this.chain(i,r=>this.backend.handle(r))}};e.\u0275fac=function(r){return new(r||e)(re(o0),re(pi))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();var n$=/^\)\]\}',?\n/;function i$(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}var Wk=(()=>{let e=class e{constructor(i){this.xhrFactory=i}handle(i){if(i.method==="JSONP")throw new ie(-2800,!1);let r=this.xhrFactory;return(r.\u0275loadImpl?Yt(r.\u0275loadImpl()):ke(null)).pipe(Zt(()=>new Qe(s=>{let a=r.build();if(a.open(i.method,i.urlWithParams),i.withCredentials&&(a.withCredentials=!0),i.headers.forEach((v,w)=>a.setRequestHeader(v,w.join(","))),i.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!i.headers.has("Content-Type")){let v=i.detectContentTypeHeader();v!==null&&a.setRequestHeader("Content-Type",v)}if(i.responseType){let v=i.responseType.toLowerCase();a.responseType=v!=="json"?v:"text"}let l=i.serializeBody(),c=null,u=()=>{if(c!==null)return c;let v=a.statusText||"OK",w=new Ei(a.getAllResponseHeaders()),S=i$(a)||i.url;return c=new s0({headers:w,status:a.status,statusText:v,url:S}),c},d=()=>{let{headers:v,status:w,statusText:S,url:L}=u(),T=null;w!==GH&&(T=typeof a.response>"u"?a.responseText:a.response),w===0&&(w=T?qk:0);let q=w>=200&&w<300;if(i.responseType==="json"&&typeof T=="string"){let N=T;T=T.replace(n$,"");try{T=T!==""?JSON.parse(T):null}catch(ee){T=N,q&&(q=!1,T={error:ee,text:T})}}q?(s.next(new Gp({body:T,headers:v,status:w,statusText:S,url:L||void 0})),s.complete()):s.error(new Ko({error:T,headers:v,status:w,statusText:S,url:L||void 0}))},p=v=>{let{url:w}=u(),S=new Ko({error:v,status:a.status||0,statusText:a.statusText||"Unknown Error",url:w||void 0});s.error(S)},h=!1,g=v=>{h||(s.next(u()),h=!0);let w={type:Nr.DownloadProgress,loaded:v.loaded};v.lengthComputable&&(w.total=v.total),i.responseType==="text"&&a.responseText&&(w.partialText=a.responseText),s.next(w)},_=v=>{let w={type:Nr.UploadProgress,loaded:v.loaded};v.lengthComputable&&(w.total=v.total),s.next(w)};return a.addEventListener("load",d),a.addEventListener("error",p),a.addEventListener("timeout",p),a.addEventListener("abort",p),i.reportProgress&&(a.addEventListener("progress",g),l!==null&&a.upload&&a.upload.addEventListener("progress",_)),a.send(l),s.next({type:Nr.Sent}),()=>{a.removeEventListener("error",p),a.removeEventListener("abort",p),a.removeEventListener("load",d),a.removeEventListener("timeout",p),i.reportProgress&&(a.removeEventListener("progress",g),l!==null&&a.upload&&a.upload.removeEventListener("progress",_)),a.readyState!==a.DONE&&a.abort()}})))}};e.\u0275fac=function(r){return new(r||e)(re(Eu))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})(),Yk=new be(""),r$="XSRF-TOKEN",o$=new be("",{providedIn:"root",factory:()=>r$}),s$="X-XSRF-TOKEN",a$=new be("",{providedIn:"root",factory:()=>s$}),a0=class{},l$=(()=>{let e=class e{constructor(i,r,o){this.doc=i,this.platform=r,this.cookieName=o,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let i=this.doc.cookie||"";return i!==this.lastCookieString&&(this.parseCount++,this.lastToken=e0(i,this.cookieName),this.lastCookieString=i),this.lastToken}};e.\u0275fac=function(r){return new(r||e)(re(We),re(Nt),re(o$))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();function c$(n,e){let t=n.url.toLowerCase();if(!B(Yk)||n.method==="GET"||n.method==="HEAD"||t.startsWith("http://")||t.startsWith("https://"))return e(n);let i=B(a0).getToken(),r=B(a$);return i!=null&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),e(n)}var Zk=function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n}(Zk||{});function u$(n,e){return{\u0275kind:n,\u0275providers:e}}function d$(...n){let e=[ei,Wk,$k,{provide:$p,useExisting:$k},{provide:o0,useFactory:()=>B(KH,{optional:!0})??B(Wk)},{provide:Gw,useValue:c$,multi:!0},{provide:Yk,useValue:!0},{provide:a0,useClass:l$}];for(let t of n)e.push(...t.\u0275providers);return Ig(e)}var Gk=new be("");function p$(){return u$(Zk.LegacyInterceptors,[{provide:Gk,useFactory:t$},{provide:Gw,useExisting:Gk,multi:!0}])}var qp=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({providers:[d$(p$())]});let n=e;return n})();var Kw=class extends Jg{constructor(){super(...arguments),this.supportsDOMEvents=!0}},Yw=class n extends Kw{static makeCurrent(){kk(new n)}onAndCancel(e,t,i){return e.addEventListener(t,i),()=>{e.removeEventListener(t,i)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.remove()}createElement(e,t){return t=t||this.getDefaultDocument(),t.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return t==="window"?window:t==="document"?e:t==="body"?e.body:null}getBaseHref(e){let t=h$();return t==null?null:f$(t)}resetBaseElement(){Kp=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return e0(document.cookie,e)}},Kp=null;function h$(){return Kp=Kp||document.querySelector("base"),Kp?Kp.getAttribute("href"):null}function f$(n){return new URL(n,document.baseURI).pathname}var Zw=class{addToWindow(e){ur.getAngularTestability=(i,r=!0)=>{let o=e.findTestabilityInTree(i,r);if(o==null)throw new ie(5103,!1);return o},ur.getAllAngularTestabilities=()=>e.getAllTestabilities(),ur.getAllAngularRootElements=()=>e.getAllRootElements();let t=i=>{let r=ur.getAllAngularTestabilities(),o=r.length,s=function(){o--,o==0&&i()};r.forEach(a=>{a.whenStable(s)})};ur.frameworkStabilizers||(ur.frameworkStabilizers=[]),ur.frameworkStabilizers.push(t)}findTestabilityInTree(e,t,i){if(t==null)return null;let r=e.getTestability(t);return r??(i?Qo().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null)}},m$=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})(),l0=new be(""),eN=(()=>{let e=class e{constructor(i,r){this._zone=r,this._eventNameToPlugin=new Map,i.forEach(o=>{o.manager=this}),this._plugins=i.slice().reverse()}addEventListener(i,r,o){return this._findPluginFor(r).addEventListener(i,r,o)}getZone(){return this._zone}_findPluginFor(i){let r=this._eventNameToPlugin.get(i);if(r)return r;if(r=this._plugins.find(s=>s.supports(i)),!r)throw new ie(5101,!1);return this._eventNameToPlugin.set(i,r),r}};e.\u0275fac=function(r){return new(r||e)(re(l0),re(He))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})(),Yp=class{constructor(e){this._doc=e}},qw="ng-app-id",tN=(()=>{let e=class e{constructor(i,r,o,s={}){this.doc=i,this.appId=r,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=i0(s),this.resetHostNodes()}addStyles(i){for(let r of i)this.changeUsageCount(r,1)===1&&this.onStyleAdded(r)}removeStyles(i){for(let r of i)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){let i=this.styleNodesInDOM;i&&(i.forEach(r=>r.remove()),i.clear());for(let r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(i){this.hostNodes.add(i);for(let r of this.getAllStyles())this.addStyleToHost(i,r)}removeHost(i){this.hostNodes.delete(i)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(i){for(let r of this.hostNodes)this.addStyleToHost(r,i)}onStyleRemoved(i){let r=this.styleRef;r.get(i)?.elements?.forEach(o=>o.remove()),r.delete(i)}collectServerRenderedStyles(){let i=this.doc.head?.querySelectorAll(`style[${qw}="${this.appId}"]`);if(i?.length){let r=new Map;return i.forEach(o=>{o.textContent!=null&&r.set(o.textContent,o)}),r}return null}changeUsageCount(i,r){let o=this.styleRef;if(o.has(i)){let s=o.get(i);return s.usage+=r,s.usage}return o.set(i,{usage:r,elements:[]}),r}getStyleElement(i,r){let o=this.styleNodesInDOM,s=o?.get(r);if(s?.parentNode===i)return o.delete(r),s.removeAttribute(qw),s;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=r,this.platformIsServer&&a.setAttribute(qw,this.appId),i.appendChild(a),a}}addStyleToHost(i,r){let o=this.getStyleElement(i,r),s=this.styleRef,a=s.get(r)?.elements;a?a.push(o):s.set(r,{elements:[o],usage:1})}resetHostNodes(){let i=this.hostNodes;i.clear(),i.add(this.doc.head)}};e.\u0275fac=function(r){return new(r||e)(re(We),re(kp),re(nw,8),re(Nt))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})(),Qw={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Xw=/%COMP%/g,nN="%COMP%",g$=`_nghost-${nN}`,y$=`_ngcontent-${nN}`,_$=!0,v$=new be("",{providedIn:"root",factory:()=>_$});function b$(n){return y$.replace(Xw,n)}function C$(n){return g$.replace(Xw,n)}function iN(n,e){return e.map(t=>t.replace(Xw,n))}var c0=(()=>{let e=class e{constructor(i,r,o,s,a,l,c,u=null){this.eventManager=i,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=l,this.ngZone=c,this.nonce=u,this.rendererByCompId=new Map,this.platformIsServer=i0(l),this.defaultRenderer=new Zp(i,a,c,this.platformIsServer)}createRenderer(i,r){if(!i||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===jo.ShadowDom&&(r=R(I({},r),{encapsulation:jo.Emulated}));let o=this.getOrCreateRenderer(i,r);return o instanceof u0?o.applyToHost(i):o instanceof Jp&&o.applyStyles(),o}getOrCreateRenderer(i,r){let o=this.rendererByCompId,s=o.get(r.id);if(!s){let a=this.doc,l=this.ngZone,c=this.eventManager,u=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,p=this.platformIsServer;switch(r.encapsulation){case jo.Emulated:s=new u0(c,u,r,this.appId,d,a,l,p);break;case jo.ShadowDom:return new Jw(c,u,i,r,a,l,this.nonce,p);default:s=new Jp(c,u,r,d,a,l,p);break}o.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(r){return new(r||e)(re(eN),re(tN),re(kp),re(v$),re(We),re(Nt),re(He),re(nw))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})(),Zp=class{constructor(e,t,i,r){this.eventManager=e,this.doc=t,this.ngZone=i,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,t){return t?this.doc.createElementNS(Qw[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(Jk(e)?e.content:e).appendChild(t)}insertBefore(e,t,i){e&&(Jk(e)?e.content:e).insertBefore(t,i)}removeChild(e,t){t.remove()}selectRootElement(e,t){let i=typeof e=="string"?this.doc.querySelector(e):e;if(!i)throw new ie(-5104,!1);return t||(i.textContent=""),i}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,i,r){if(r){t=r+":"+t;let o=Qw[r];o?e.setAttributeNS(o,t,i):e.setAttribute(t,i)}else e.setAttribute(t,i)}removeAttribute(e,t,i){if(i){let r=Qw[i];r?e.removeAttributeNS(r,t):e.removeAttribute(`${i}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,i,r){r&(Uo.DashCase|Uo.Important)?e.style.setProperty(t,i,r&Uo.Important?"important":""):e.style[t]=i}removeStyle(e,t,i){i&Uo.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,i){e!=null&&(e[t]=i)}setValue(e,t){e.nodeValue=t}listen(e,t,i){if(typeof e=="string"&&(e=Qo().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);return this.eventManager.addEventListener(e,t,this.decoratePreventDefault(i))}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function Jk(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var Jw=class extends Zp{constructor(e,t,i,r,o,s,a,l){super(e,o,s,l),this.sharedStylesHost=t,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=iN(r.id,r.styles);for(let u of c){let d=document.createElement("style");a&&d.setAttribute("nonce",a),d.textContent=u,this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,i){return super.insertBefore(this.nodeOrShadowRoot(e),t,i)}removeChild(e,t){return super.removeChild(null,t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Jp=class extends Zp{constructor(e,t,i,r,o,s,a,l){super(e,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r,this.styles=l?iN(l,i.styles):i.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},u0=class extends Jp{constructor(e,t,i,r,o,s,a,l){let c=r+"-"+i.id;super(e,t,i,o,s,a,l,c),this.contentAttr=b$(c),this.hostAttr=C$(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let i=super.createElement(e,t);return super.setAttribute(i,this.contentAttr,""),i}},w$=(()=>{let e=class e extends Yp{constructor(i){super(i)}supports(i){return!0}addEventListener(i,r,o){return i.addEventListener(r,o,!1),()=>this.removeEventListener(i,r,o)}removeEventListener(i,r,o){return i.removeEventListener(r,o)}};e.\u0275fac=function(r){return new(r||e)(re(We))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})(),I$=(()=>{let e=class e extends Yp{constructor(i){super(i),this.delegate=B(Ik,{optional:!0})}supports(i){return this.delegate?this.delegate.supports(i):!1}addEventListener(i,r,o){return this.delegate.addEventListener(i,r,o)}removeEventListener(i,r,o){return this.delegate.removeEventListener(i,r,o)}};e.\u0275fac=function(r){return new(r||e)(re(We))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})(),Xk=["alt","control","meta","shift"],x$={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},T$={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},E$=(()=>{let e=class e extends Yp{constructor(i){super(i)}supports(i){return e.parseEventName(i)!=null}addEventListener(i,r,o){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Qo().onAndCancel(i,s.domEventName,a))}static parseEventName(i){let r=i.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let s=e._normalizeKey(r.pop()),a="",l=r.indexOf("code");if(l>-1&&(r.splice(l,1),a="code."),Xk.forEach(u=>{let d=r.indexOf(u);d>-1&&(r.splice(d,1),a+=u+".")}),a+=s,r.length!=0||s.length===0)return null;let c={};return c.domEventName=o,c.fullKey=a,c}static matchEventFullKeyCode(i,r){let o=x$[i.key]||i.key,s="";return r.indexOf("code.")>-1&&(o=i.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),Xk.forEach(a=>{if(a!==o){let l=T$[a];l(i)&&(s+=a+".")}}),s+=o,s===r)}static eventCallback(i,r,o){return s=>{e.matchEventFullKeyCode(s,i)&&o.runGuarded(()=>r(s))}}static _normalizeKey(i){return i==="esc"?"escape":i}};e.\u0275fac=function(r){return new(r||e)(re(We))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();function S$(){Yw.makeCurrent()}function M$(){return new zo}function D$(){return HO(document),document}var O$=[{provide:Nt,useValue:Bw},{provide:ew,useValue:S$,multi:!0},{provide:We,useFactory:D$,deps:[]}],rN=Sw(Ck,"browser",O$),A$=new be(""),k$=[{provide:zp,useClass:Zw,deps:[]},{provide:ww,useClass:qg,deps:[He,Qg,zp]},{provide:qg,useClass:qg,deps:[He,Qg,zp]}],N$=[{provide:xg,useValue:"root"},{provide:zo,useFactory:M$,deps:[]},{provide:l0,useClass:w$,multi:!0,deps:[We,He,Nt]},{provide:l0,useClass:E$,multi:!0,deps:[We]},{provide:l0,useClass:I$,multi:!0},c0,tN,eN,{provide:wa,useExisting:c0},{provide:Eu,useClass:m$,deps:[]},[]],d0=(()=>{let e=class e{constructor(i){}static withServerTransition(i){return{ngModule:e,providers:[{provide:kp,useValue:i.appId}]}}};e.\u0275fac=function(r){return new(r||e)(re(A$,12))},e.\u0275mod=le({type:e}),e.\u0275inj=ae({providers:[...N$,...k$],imports:[Te,wk]});let n=e;return n})();var oN=(()=>{let e=class e{constructor(i){this._doc=i}getTitle(){return this._doc.title}setTitle(i){this._doc.title=i||""}};e.\u0275fac=function(r){return new(r||e)(re(We))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var Ul=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=re(eI),o},providedIn:"root"});let n=e;return n})(),eI=(()=>{let e=class e extends Ul{constructor(i){super(),this._doc=i}sanitize(i,r){if(r==null)return null;switch(i){case Wo.NONE:return r;case Wo.HTML:return xa(r,"HTML")?Dr(r):rw(this._doc,String(r)).toString();case Wo.STYLE:return xa(r,"Style")?Dr(r):r;case Wo.SCRIPT:if(xa(r,"Script"))return Dr(r);throw new ie(5200,!1);case Wo.URL:return xa(r,"URL")?Dr(r):Fg(String(r));case Wo.RESOURCE_URL:if(xa(r,"ResourceURL"))return Dr(r);throw new ie(5201,!1);default:throw new ie(5202,!1)}}bypassSecurityTrustHtml(i){return GO(i)}bypassSecurityTrustStyle(i){return qO(i)}bypassSecurityTrustScript(i){return QO(i)}bypassSecurityTrustUrl(i){return KO(i)}bypassSecurityTrustResourceUrl(i){return YO(i)}};e.\u0275fac=function(r){return new(r||e)(re(We))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var h0={schedule(n,e){let t=setTimeout(n,e);return()=>clearTimeout(t)},scheduleBeforeRender(n){if(typeof window>"u")return h0.schedule(n,0);if(typeof window.requestAnimationFrame>"u")return h0.schedule(n,16);let e=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(e)}};function L$(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function P$(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}function R$(n){return typeof n=="function"}var tI;function F$(n,e){if(!tI){let t=Element.prototype;tI=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE?tI.call(n,e):!1}function j$(n,e){return n===e||n!==n&&e!==e}function V$(n){let e={};return n.forEach(({propName:t,templateName:i,transform:r})=>{e[L$(i)]=[t,r]}),e}function B$(n,e){return e.get(Ds).resolveComponentFactory(n).inputs}function z$(n,e){let t=n.childNodes,i=e.map(()=>[]),r=-1;e.some((o,s)=>o==="*"?(r=s,!0):!1);for(let o=0,s=t.length;or!=="*"&&F$(n,r)?(i=o,!0):!1),i}var H$=10,nI=class{constructor(e,t){this.componentFactory=t.get(Ds).resolveComponentFactory(e)}create(e){return new iI(this.componentFactory,e)}},iI=class{constructor(e,t){this.componentFactory=e,this.injector=t,this.eventEmitters=new ao(1),this.events=this.eventEmitters.pipe(Zt(i=>dp(...i))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:i})=>i)),this.ngZone=this.injector.get(He),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(e){this.runInZone(()=>{if(this.scheduledDestroyFn!==null){this.scheduledDestroyFn(),this.scheduledDestroyFn=null;return}this.componentRef===null&&this.initializeComponent(e)})}disconnect(){this.runInZone(()=>{this.componentRef===null||this.scheduledDestroyFn!==null||(this.scheduledDestroyFn=h0.schedule(()=>{this.componentRef!==null&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},H$))})}getInputValue(e){return this.runInZone(()=>this.componentRef===null?this.initialInputValues.get(e):this.componentRef.instance[e])}setInputValue(e,t,i){this.runInZone(()=>{if(i&&(t=i.call(this.componentRef?.instance,t)),this.componentRef===null){this.initialInputValues.set(e,t);return}j$(t,this.getInputValue(e))&&!(t===void 0&&this.unchangedInputs.has(e))||(this.recordInputChange(e,t),this.unchangedInputs.delete(e),this.hasInputChanges=!0,this.componentRef.instance[e]=t,this.scheduleDetectChanges())})}initializeComponent(e){let t=$t.create({providers:[],parent:this.injector}),i=z$(e,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,i,e),this.viewChangeDetectorRef=this.componentRef.injector.get(De),this.implementsOnChanges=R$(this.componentRef.instance.ngOnChanges),this.initializeInputs(),this.initializeOutputs(this.componentRef),this.detectChanges(),this.injector.get(fi).attachView(this.componentRef.hostView)}initializeInputs(){this.componentFactory.inputs.forEach(({propName:e,transform:t})=>{this.initialInputValues.has(e)&&this.setInputValue(e,this.initialInputValues.get(e),t)}),this.initialInputValues.clear()}initializeOutputs(e){let t=this.componentFactory.outputs.map(({propName:i,templateName:r})=>e.instance[i].pipe(Ie(s=>({name:r,value:s}))));this.eventEmitters.next(t)}callNgOnChanges(e){if(!this.implementsOnChanges||this.inputChanges===null)return;let t=this.inputChanges;this.inputChanges=null,e.instance.ngOnChanges(t)}markViewForCheck(e){this.hasInputChanges&&(this.hasInputChanges=!1,e.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=h0.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(e,t){if(!this.implementsOnChanges)return;this.inputChanges===null&&(this.inputChanges={});let i=this.inputChanges[e];if(i){i.currentValue=t;return}let r=this.unchangedInputs.has(e),o=r?void 0:this.getInputValue(e);this.inputChanges[e]=new wp(o,t,r)}detectChanges(){this.componentRef!==null&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(e){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(e):e()}},rI=class extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}};function sN(n,e){let t=B$(n,e.injector),i=e.strategyFactory||new nI(n,e.injector),r=V$(t),s=class s extends rI{get ngElementStrategy(){if(!this._ngElementStrategy){let l=this._ngElementStrategy=i.create(this.injector||e.injector);t.forEach(({propName:c,transform:u})=>{if(!this.hasOwnProperty(c))return;let d=this[c];delete this[c],l.setInputValue(c,d,u)})}return this._ngElementStrategy}constructor(l){super(),this.injector=l}attributeChangedCallback(l,c,u,d){let[p,h]=r[l];this.ngElementStrategy.setInputValue(p,u,h)}connectedCallback(){let l=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),l=!0),this.ngElementStrategy.connect(this),l||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(l=>{let c=new CustomEvent(l.name,{detail:l.value});this.dispatchEvent(c)})}};s.observedAttributes=Object.keys(r);let o=s;return t.forEach(({propName:a,transform:l})=>{Object.defineProperty(o.prototype,a,{get(){return this.ngElementStrategy.getInputValue(a)},set(c){this.ngElementStrategy.setInputValue(a,c,l)},configurable:!0,enumerable:!0})}),o}var mN=(()=>{let e=class e{constructor(i,r){this._renderer=i,this._elementRef=r,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(i,r){this._renderer.setProperty(this._elementRef.nativeElement,i,r)}registerOnTouched(i){this.onTouched=i}registerOnChange(i){this.onChange=i}setDisabledState(i){this.setProperty("disabled",i)}};e.\u0275fac=function(r){return new(r||e)(k(At),k(Ce))},e.\u0275dir=gt({type:e});let n=e;return n})(),$$=(()=>{let e=class e extends mN{};e.\u0275fac=(()=>{let i;return function(o){return(i||(i=Oe(e)))(o||e)}})(),e.\u0275dir=gt({type:e,features:[xe]});let n=e;return n})(),ti=new be("");var W$={provide:ti,useExisting:dn(()=>Pr),multi:!0};function G$(){let n=Qo()?Qo().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var q$=new be(""),Pr=(()=>{let e=class e extends mN{constructor(i,r,o){super(i,r),this._compositionMode=o,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!G$())}writeValue(i){let r=i??"";this.setProperty("value",r)}_handleInput(i){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(i)}_compositionStart(){this._composing=!0}_compositionEnd(i){this._composing=!1,this._compositionMode&&this.onChange(i)}};e.\u0275fac=function(r){return new(r||e)(k(At),k(Ce),k(q$,8))},e.\u0275dir=gt({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,o){r&1&&P("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},features:[on([W$]),xe]});let n=e;return n})();function Aa(n){return n==null||(typeof n=="string"||Array.isArray(n))&&n.length===0}function gN(n){return n!=null&&typeof n.length=="number"}var dI=new be(""),pI=new be(""),Q$=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Si=class{static min(e){return K$(e)}static max(e){return Y$(e)}static required(e){return Z$(e)}static requiredTrue(e){return J$(e)}static email(e){return X$(e)}static minLength(e){return eW(e)}static maxLength(e){return tW(e)}static pattern(e){return nW(e)}static nullValidator(e){return yN(e)}static compose(e){return IN(e)}static composeAsync(e){return TN(e)}};function K$(n){return e=>{if(Aa(e.value)||Aa(n))return null;let t=parseFloat(e.value);return!isNaN(t)&&t{if(Aa(e.value)||Aa(n))return null;let t=parseFloat(e.value);return!isNaN(t)&&t>n?{max:{max:n,actual:e.value}}:null}}function Z$(n){return Aa(n.value)?{required:!0}:null}function J$(n){return n.value===!0?null:{required:!0}}function X$(n){return Aa(n.value)||Q$.test(n.value)?null:{email:!0}}function eW(n){return e=>Aa(e.value)||!gN(e.value)?null:e.value.lengthgN(e.value)&&e.value.length>n?{maxlength:{requiredLength:n,actualLength:e.value.length}}:null}function nW(n){if(!n)return yN;let e,t;return typeof n=="string"?(t="",n.charAt(0)!=="^"&&(t+="^"),t+=n,n.charAt(n.length-1)!=="$"&&(t+="$"),e=new RegExp(t)):(t=n.toString(),e=n),i=>{if(Aa(i.value))return null;let r=i.value;return e.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}function yN(n){return null}function _N(n){return n!=null}function vN(n){return Ma(n)?Yt(n):n}function bN(n){let e={};return n.forEach(t=>{e=t!=null?I(I({},e),t):e}),Object.keys(e).length===0?null:e}function CN(n,e){return e.map(t=>t(n))}function iW(n){return!n.validate}function wN(n){return n.map(e=>iW(e)?e:t=>e.validate(t))}function IN(n){if(!n)return null;let e=n.filter(_N);return e.length==0?null:function(t){return bN(CN(t,e))}}function xN(n){return n!=null?IN(wN(n)):null}function TN(n){if(!n)return null;let e=n.filter(_N);return e.length==0?null:function(t){let i=CN(t,e).map(vN);return Cb(i).pipe(Ie(bN))}}function EN(n){return n!=null?TN(wN(n)):null}function aN(n,e){return n===null?[e]:Array.isArray(n)?[...n,e]:[n,e]}function SN(n){return n._rawValidators}function MN(n){return n._rawAsyncValidators}function oI(n){return n?Array.isArray(n)?n:[n]:[]}function m0(n,e){return Array.isArray(n)?n.includes(e):n===e}function lN(n,e){let t=oI(e);return oI(n).forEach(r=>{m0(t,r)||t.push(r)}),t}function cN(n,e){return oI(e).filter(t=>!m0(n,t))}var g0=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=xN(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=EN(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},Hl=class extends g0{get formDirective(){return null}get path(){return null}},Hi=class extends g0{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},y0=class{constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},rW={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},iTe=R(I({},rW),{"[class.ng-submitted]":"isSubmitted"}),Rr=(()=>{let e=class e extends y0{constructor(i){super(i)}};e.\u0275fac=function(r){return new(r||e)(k(Hi,2))},e.\u0275dir=gt({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){r&2&&Gt("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},features:[xe]});let n=e;return n})(),Yo=(()=>{let e=class e extends y0{constructor(i){super(i)}};e.\u0275fac=function(r){return new(r||e)(k(Hl,10))},e.\u0275dir=gt({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,o){r&2&&Gt("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},features:[xe]});let n=e;return n})();var Xp="VALID",f0="INVALID",Mu="PENDING",eh="DISABLED",ka=class{},_0=class extends ka{constructor(e,t){super(),this.value=e,this.source=t}},th=class extends ka{constructor(e,t){super(),this.pristine=e,this.source=t}},nh=class extends ka{constructor(e,t){super(),this.touched=e,this.source=t}},Du=class extends ka{constructor(e,t){super(),this.status=e,this.source=t}},sI=class extends ka{constructor(e){super(),this.source=e}},aI=class extends ka{constructor(e){super(),this.source=e}};function hI(n){return(C0(n)?n.validators:n)||null}function oW(n){return Array.isArray(n)?xN(n):n||null}function fI(n,e){return(C0(e)?e.asyncValidators:n)||null}function sW(n){return Array.isArray(n)?EN(n):n||null}function C0(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function DN(n,e,t){let i=n.controls;if(!(e?Object.keys(i):i).length)throw new ie(1e3,"");if(!i[t])throw new ie(1001,"")}function ON(n,e,t){n._forEachChild((i,r)=>{if(t[r]===void 0)throw new ie(1002,"")})}var Ou=class{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=cn(()=>this.statusReactive()),this.statusReactive=Lt(void 0),this._pristine=cn(()=>this.pristineReactive()),this.pristineReactive=Lt(!0),this._touched=cn(()=>this.touchedReactive()),this.touchedReactive=Lt(!1),this._events=new pe,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return Ti(this.statusReactive)}set status(e){Ti(()=>this.statusReactive.set(e))}get valid(){return this.status===Xp}get invalid(){return this.status===f0}get pending(){return this.status==Mu}get disabled(){return this.status===eh}get enabled(){return this.status!==eh}get pristine(){return Ti(this.pristineReactive)}set pristine(e){Ti(()=>this.pristineReactive.set(e))}get dirty(){return!this.pristine}get touched(){return Ti(this.touchedReactive)}set touched(e){Ti(()=>this.touchedReactive.set(e))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(lN(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(lN(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(cN(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(cN(e,this._rawAsyncValidators))}hasValidator(e){return m0(this._rawValidators,e)}hasAsyncValidator(e){return m0(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(R(I({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new nh(!0,i))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i),t&&e.emitEvent!==!1&&this._events.next(new nh(!1,i))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(R(I({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new th(!1,i))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),t&&e.emitEvent!==!1&&this._events.next(new th(!0,i))}markAsPending(e={}){this.status=Mu;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Du(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(R(I({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=eh,this.errors=null,this._forEachChild(r=>{r.disable(R(I({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new _0(this.value,i)),this._events.next(new Du(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(R(I({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Xp,this._forEachChild(i=>{i.enable(R(I({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(R(I({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e,t){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Xp||this.status===Mu)&&this._runAsyncValidator(i,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new _0(this.value,t)),this._events.next(new Du(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(R(I({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?eh:Xp}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Mu,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1};let i=vN(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(e,t){let i=t?this.get(t):this;return i&&i.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new Du(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,i)}_initObservables(){this.valueChanges=new j,this.statusChanges=new j}_calculateStatus(){return this._allControlsDisabled()?eh:this.errors?f0:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Mu)?Mu:this._anyControlsHaveStatus(f0)?f0:Xp}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,t),r&&this._events.next(new th(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new nh(this.touched,t)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,t)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){C0(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let t=this._parent&&this._parent.dirty;return!e&&!!t&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=oW(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=sW(this._rawAsyncValidators)}},Na=class extends Ou{constructor(e,t,i){super(hI(t),fI(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,i={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,i={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){ON(this,!0,e),Object.keys(e).forEach(i=>{DN(this,!0,i),this.controls[i].setValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e!=null&&(Object.keys(e).forEach(i=>{let r=this.controls[i];r&&r.patchValue(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((i,r)=>{i.reset(e?e[r]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,i)=>(e[i]=t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,i)=>i._syncPendingControls()?!0:t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{let i=this.controls[t];i&&e(i,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[t,i]of Object.entries(this.controls))if(this.contains(t)&&e(i))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(t,i,r)=>((i.enabled||this.disabled)&&(t[r]=i.value),t))}_reduceChildren(e,t){let i=e;return this._forEachChild((r,o)=>{i=t(i,r,o)}),i}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var lI=class extends Na{};var w0=new be("CallSetDisabledState",{providedIn:"root",factory:()=>I0}),I0="always";function AN(n,e){return[...e.path,n]}function cI(n,e,t=I0){mI(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(n.disabled),lW(n,e),uW(n,e),cW(n,e),aW(n,e)}function uN(n,e,t=!0){let i=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(i),e.valueAccessor.registerOnTouched(i)),b0(n,e),n&&(e._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function v0(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function aW(n,e){if(e.valueAccessor.setDisabledState){let t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}function mI(n,e){let t=SN(n);e.validator!==null?n.setValidators(aN(t,e.validator)):typeof t=="function"&&n.setValidators([t]);let i=MN(n);e.asyncValidator!==null?n.setAsyncValidators(aN(i,e.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();v0(e._rawValidators,r),v0(e._rawAsyncValidators,r)}function b0(n,e){let t=!1;if(n!==null){if(e.validator!==null){let r=SN(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==e.validator);o.length!==r.length&&(t=!0,n.setValidators(o))}}if(e.asyncValidator!==null){let r=MN(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==e.asyncValidator);o.length!==r.length&&(t=!0,n.setAsyncValidators(o))}}}let i=()=>{};return v0(e._rawValidators,i),v0(e._rawAsyncValidators,i),t}function lW(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&kN(n,e)})}function cW(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&kN(n,e),n.updateOn!=="submit"&&n.markAsTouched()})}function kN(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function uW(n,e){let t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}function dW(n,e){n==null,mI(n,e)}function pW(n,e){return b0(n,e)}function NN(n,e){if(!n.hasOwnProperty("model"))return!1;let t=n.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function hW(n){return Object.getPrototypeOf(n.constructor)===$$}function fW(n,e){n._syncPendingControls(),e.forEach(t=>{let i=t.control;i.updateOn==="submit"&&i._pendingChange&&(t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function LN(n,e){if(!e)return null;Array.isArray(e);let t,i,r;return e.forEach(o=>{o.constructor===Pr?t=o:hW(o)?i=o:r=o}),r||i||t||null}function mW(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function dN(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function pN(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var Lr=class extends Ou{constructor(e=null,t,i){super(hI(t),fI(i,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),C0(t)&&(t.nonNullable||t.initialValueIsDefault)&&(pN(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){dN(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){dN(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){pN(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var gW=n=>n instanceof Lr;var yW={provide:Hi,useExisting:dn(()=>$l)},hN=Promise.resolve(),$l=(()=>{let e=class e extends Hi{constructor(i,r,o,s,a,l){super(),this._changeDetectorRef=a,this.callSetDisabledState=l,this.control=new Lr,this._registered=!1,this.name="",this.update=new j,this._parent=i,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=LN(this,s)}ngOnChanges(i){if(this._checkForErrors(),!this._registered||"name"in i){if(this._registered&&(this._checkName(),this.formDirective)){let r=i.name.previousValue;this.formDirective.removeControl({name:r,path:this._getPath(r)})}this._setUpControl()}"isDisabled"in i&&this._updateDisabled(i),NN(i,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(i){this.viewModel=i,this.update.emit(i)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){cI(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(i){hN.then(()=>{this.control.setValue(i,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(i){let r=i.isDisabled.currentValue,o=r!==0&&V(r);hN.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(i){return this._parent?AN(i,this._parent):[i]}};e.\u0275fac=function(r){return new(r||e)(k(Hl,9),k(dI,10),k(pI,10),k(ti,10),k(De,8),k(w0,8))},e.\u0275dir=gt({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[on([yW]),xe,Jt]});let n=e;return n})(),Zo=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=gt({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let n=e;return n})();var PN=new be("");var _W={provide:Hl,useExisting:dn(()=>$i)},$i=(()=>{let e=class e extends Hl{get submitted(){return Ti(this._submittedReactive)}set submitted(i){this._submittedReactive.set(i)}constructor(i,r,o){super(),this.callSetDisabledState=o,this._submitted=cn(()=>this._submittedReactive()),this._submittedReactive=Lt(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new j,this._setValidators(i),this._setAsyncValidators(r)}ngOnChanges(i){this._checkFormPresent(),i.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(b0(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(i){let r=this.form.get(i.path);return cI(r,i,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(i),r}getControl(i){return this.form.get(i.path)}removeControl(i){uN(i.control||null,i,!1),mW(this.directives,i)}addFormGroup(i){this._setUpFormContainer(i)}removeFormGroup(i){this._cleanUpFormContainer(i)}getFormGroup(i){return this.form.get(i.path)}addFormArray(i){this._setUpFormContainer(i)}removeFormArray(i){this._cleanUpFormContainer(i)}getFormArray(i){return this.form.get(i.path)}updateModel(i,r){this.form.get(i.path).setValue(r)}onSubmit(i){return this._submittedReactive.set(!0),fW(this.form,this.directives),this.ngSubmit.emit(i),this.form._events.next(new sI(this.control)),i?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(i=void 0){this.form.reset(i),this._submittedReactive.set(!1),this.form._events.next(new aI(this.form))}_updateDomValue(){this.directives.forEach(i=>{let r=i.control,o=this.form.get(i.path);r!==o&&(uN(r||null,i),gW(o)&&(cI(o,i,this.callSetDisabledState),i.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(i){let r=this.form.get(i.path);dW(r,i),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(i){if(this.form){let r=this.form.get(i.path);r&&pW(r,i)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){mI(this.form,this),this._oldForm&&b0(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(r){return new(r||e)(k(dI,10),k(pI,10),k(w0,8))},e.\u0275dir=gt({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,o){r&1&&P("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[on([_W]),xe,Jt]});let n=e;return n})();var vW={provide:Hi,useExisting:dn(()=>po)},po=(()=>{let e=class e extends Hi{set isDisabled(i){}constructor(i,r,o,s,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new j,this._ngModelWarningSent=!1,this._parent=i,this._setValidators(r),this._setAsyncValidators(o),this.valueAccessor=LN(this,s)}ngOnChanges(i){this._added||this._setUpControl(),NN(i,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(i){this.viewModel=i,this.update.emit(i)}get path(){return AN(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}};e._ngModelWarningSentOnce=!1,e.\u0275fac=function(r){return new(r||e)(k(Hl,13),k(dI,10),k(pI,10),k(ti,10),k(PN,8))},e.\u0275dir=gt({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[on([vW]),xe,Jt]});let n=e;return n})();var RN=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({});let n=e;return n})(),uI=class extends Ou{constructor(e,t,i){super(hI(t),fI(i,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,t={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,i={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(e,t={}){let i=this._adjustIndex(e);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,i={}){let r=this._adjustIndex(e);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),t&&(this.controls.splice(r,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){ON(this,!1,e),e.forEach((i,r)=>{DN(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e!=null&&(e.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((i,r)=>{i.reset(e[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((t,i)=>i._syncPendingControls()?!0:t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((t,i)=>{e(t,i)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(let e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}};function fN(n){return!!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var Au=(()=>{let e=class e{constructor(){this.useNonNullable=!1}get nonNullable(){let i=new e;return i.useNonNullable=!0,i}group(i,r=null){let o=this._reduceControls(i),s={};return fN(r)?s=r:r!==null&&(s.validators=r.validator,s.asyncValidators=r.asyncValidator),new Na(o,s)}record(i,r=null){let o=this._reduceControls(i);return new lI(o,r)}control(i,r,o){let s={};return this.useNonNullable?(fN(r)?s=r:(s.validators=r,s.asyncValidators=o),new Lr(i,R(I({},s),{nonNullable:!0}))):new Lr(i,r,o)}array(i,r,o){let s=i.map(a=>this._createControl(a));return new uI(s,r,o)}_reduceControls(i){let r={};return Object.keys(i).forEach(o=>{r[o]=this._createControl(i[o])}),r}_createControl(i){if(i instanceof Lr)return i;if(i instanceof Ou)return i;if(Array.isArray(i)){let r=i[0],o=i.length>1?i[1]:null,s=i.length>2?i[2]:null;return this.control(r,o,s)}else return this.control(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var hr=(()=>{let e=class e{static withConfig(i){return{ngModule:e,providers:[{provide:w0,useValue:i.callSetDisabledState??I0}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({imports:[RN]});let n=e;return n})(),ho=(()=>{let e=class e{static withConfig(i){return{ngModule:e,providers:[{provide:PN,useValue:i.warnOnNgModelWithFormControl??"always"},{provide:w0,useValue:i.callSetDisabledState??I0}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({imports:[RN]});let n=e;return n})();var ut=function(n){return n[n.State=0]="State",n[n.Transition=1]="Transition",n[n.Sequence=2]="Sequence",n[n.Group=3]="Group",n[n.Animate=4]="Animate",n[n.Keyframes=5]="Keyframes",n[n.Style=6]="Style",n[n.Trigger=7]="Trigger",n[n.Reference=8]="Reference",n[n.AnimateChild=9]="AnimateChild",n[n.AnimateRef=10]="AnimateRef",n[n.Query=11]="Query",n[n.Stagger=12]="Stagger",n}(ut||{}),Xo="*";function oi(n,e){return{type:ut.Trigger,name:n,definitions:e,options:{}}}function fn(n,e=null){return{type:ut.Animate,styles:e,timings:n}}function FN(n,e=null){return{type:ut.Sequence,steps:n,options:e}}function Ct(n){return{type:ut.Style,styles:n,offset:null}}function ku(n,e,t){return{type:ut.State,name:n,styles:e,options:t}}function jN(n){return{type:ut.Keyframes,steps:n}}function mn(n,e,t=null){return{type:ut.Transition,expr:n,animation:e,options:t}}function Fr(n,e=null){return{type:ut.Reference,animation:n,options:e}}function jr(n,e=null){return{type:ut.AnimateRef,animation:n,options:e}}var La=class{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},ih=class{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,i=0,r=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++t==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let t=e*this.totalTime;this.players.forEach(i=>{let r=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(r)})}getPosition(){let e=this.players.reduce((t,i)=>t===null||i.totalTime>t.totalTime?i:t,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},x0="!";function VN(n){return new ie(3e3,!1)}function bW(){return new ie(3100,!1)}function CW(){return new ie(3101,!1)}function wW(n){return new ie(3001,!1)}function IW(n){return new ie(3003,!1)}function xW(n){return new ie(3004,!1)}function TW(n,e){return new ie(3005,!1)}function EW(){return new ie(3006,!1)}function SW(){return new ie(3007,!1)}function MW(n,e){return new ie(3008,!1)}function DW(n){return new ie(3002,!1)}function OW(n,e,t,i,r){return new ie(3010,!1)}function AW(){return new ie(3011,!1)}function kW(){return new ie(3012,!1)}function NW(){return new ie(3200,!1)}function LW(){return new ie(3202,!1)}function PW(){return new ie(3013,!1)}function RW(n){return new ie(3014,!1)}function FW(n){return new ie(3015,!1)}function jW(n){return new ie(3016,!1)}function VW(n,e){return new ie(3404,!1)}function BW(n){return new ie(3502,!1)}function zW(n){return new ie(3503,!1)}function UW(){return new ie(3300,!1)}function HW(n){return new ie(3504,!1)}function $W(n){return new ie(3301,!1)}function WW(n,e){return new ie(3302,!1)}function GW(n){return new ie(3303,!1)}function qW(n,e){return new ie(3400,!1)}function QW(n){return new ie(3401,!1)}function KW(n){return new ie(3402,!1)}function YW(n,e){return new ie(3505,!1)}function Pa(n){switch(n.length){case 0:return new La;case 1:return n[0];default:return new ih(n)}}function XN(n,e,t=new Map,i=new Map){let r=[],o=[],s=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),u=c==s,d=u&&a||new Map;l.forEach((p,h)=>{let g=h,_=p;if(h!=="offset")switch(g=n.normalizePropertyName(g,r),_){case x0:_=t.get(h);break;case Xo:_=i.get(h);break;default:_=n.normalizeStyleValue(h,g,_,r);break}d.set(g,_)}),u||o.push(d),a=d,s=c}),r.length)throw BW(r);return o}function jI(n,e,t,i){switch(e){case"start":n.onStart(()=>i(t&&gI(t,"start",n)));break;case"done":n.onDone(()=>i(t&&gI(t,"done",n)));break;case"destroy":n.onDestroy(()=>i(t&&gI(t,"destroy",n)));break}}function gI(n,e,t){let i=t.totalTime,r=!!t.disabled,o=VI(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,i??n.totalTime,r),s=n._data;return s!=null&&(o._data=s),o}function VI(n,e,t,i,r="",o=0,s){return{element:n,triggerName:e,fromState:t,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function mr(n,e,t){let i=n.get(e);return i||n.set(e,i=t),i}function BN(n){let e=n.indexOf(":"),t=n.substring(1,e),i=n.slice(e+1);return[t,i]}var ZW=typeof document>"u"?null:document.documentElement;function BI(n){let e=n.parentNode||n.host||null;return e===ZW?null:e}function JW(n){return n.substring(1,6)=="ebkit"}var Wl=null,zN=!1;function XW(n){Wl||(Wl=eG()||{},zN=Wl.style?"WebkitAppearance"in Wl.style:!1);let e=!0;return Wl.style&&!JW(n)&&(e=n in Wl.style,!e&&zN&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in Wl.style)),e}function eG(){return typeof document<"u"?document.body:null}function e3(n,e){for(;e;){if(e===n)return!0;e=BI(e)}return!1}function t3(n,e,t){if(t)return Array.from(n.querySelectorAll(e));let i=n.querySelector(e);return i?[i]:[]}var zI=(()=>{let e=class e{validateStyleProperty(i){return XW(i)}containsElement(i,r){return e3(i,r)}getParentElement(i){return BI(i)}query(i,r,o){return t3(i,r,o)}computeStyle(i,r,o){return o||""}animate(i,r,o,s,a,l=[],c){return new La(o,s)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})(),WI=class WI{};WI.NOOP=new zI;var Ql=WI,Kl=class{};var tG=1e3,n3="{{",nG="}}",i3="ng-enter",wI="ng-leave",T0="ng-trigger",O0=".ng-trigger",UN="ng-animating",II=".ng-animating";function js(n){if(typeof n=="number")return n;let e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:xI(parseFloat(e[1]),e[2])}function xI(n,e){switch(e){case"s":return n*tG;default:return n}}function A0(n,e,t){return n.hasOwnProperty("duration")?n:iG(n,e,t)}function iG(n,e,t){let i=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,r,o=0,s="";if(typeof n=="string"){let a=n.match(i);if(a===null)return e.push(VN(n)),{duration:0,delay:0,easing:""};r=xI(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(o=xI(parseFloat(l),a[4]));let c=a[5];c&&(s=c)}else r=n;if(!t){let a=!1,l=e.length;r<0&&(e.push(bW()),a=!0),o<0&&(e.push(CW()),a=!0),a&&e.splice(l,0,VN(n))}return{duration:r,delay:o,easing:s}}function rG(n){return n.length?n[0]instanceof Map?n:n.map(e=>new Map(Object.entries(e))):[]}function es(n,e,t){e.forEach((i,r)=>{let o=UI(r);t&&!t.has(r)&&t.set(r,n.style[o]),n.style[o]=i})}function ql(n,e){e.forEach((t,i)=>{let r=UI(i);n.style[r]=""})}function rh(n){return Array.isArray(n)?n.length==1?n[0]:FN(n):n}function oG(n,e,t){let i=e.params||{},r=r3(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||t.push(wW(o))})}var TI=new RegExp(`${n3}\\s*(.+?)\\s*${nG}`,"g");function r3(n){let e=[];if(typeof n=="string"){let t;for(;t=TI.exec(n);)e.push(t[1]);TI.lastIndex=0}return e}function sh(n,e,t){let i=`${n}`,r=i.replace(TI,(o,s)=>{let a=e[s];return a==null&&(t.push(IW(s)),a=""),a.toString()});return r==i?n:r}var sG=/-+([a-z0-9])/g;function UI(n){return n.replace(sG,(...e)=>e[1].toUpperCase())}function aG(n,e){return n===0||e===0}function lG(n,e,t){if(t.size&&e.length){let i=e[0],r=[];if(t.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,HI(n,a)))}}return e}function fr(n,e,t){switch(e.type){case ut.Trigger:return n.visitTrigger(e,t);case ut.State:return n.visitState(e,t);case ut.Transition:return n.visitTransition(e,t);case ut.Sequence:return n.visitSequence(e,t);case ut.Group:return n.visitGroup(e,t);case ut.Animate:return n.visitAnimate(e,t);case ut.Keyframes:return n.visitKeyframes(e,t);case ut.Style:return n.visitStyle(e,t);case ut.Reference:return n.visitReference(e,t);case ut.AnimateChild:return n.visitAnimateChild(e,t);case ut.AnimateRef:return n.visitAnimateRef(e,t);case ut.Query:return n.visitQuery(e,t);case ut.Stagger:return n.visitStagger(e,t);default:throw xW(e.type)}}function HI(n,e){return window.getComputedStyle(n)[e]}var cG=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),k0=class extends Kl{normalizePropertyName(e,t){return UI(e)}normalizeStyleValue(e,t,i,r){let o="",s=i.toString().trim();if(cG.has(t)&&i!==0&&i!=="0")if(typeof i=="number")o="px";else{let a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&r.push(TW(e,i))}return s+o}};var N0="*";function uG(n,e){let t=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(i=>dG(i,t,e)):t.push(n),t}function dG(n,e,t){if(n[0]==":"){let l=pG(n,t);if(typeof l=="function"){e.push(l);return}n=l}let i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(i==null||i.length<4)return t.push(FW(n)),e;let r=i[1],o=i[2],s=i[3];e.push(HN(r,s));let a=r==N0&&s==N0;o[0]=="<"&&!a&&e.push(HN(s,r))}function pG(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,i)=>parseFloat(i)>parseFloat(t);case":decrement":return(t,i)=>parseFloat(i) *"}}var E0=new Set(["true","1"]),S0=new Set(["false","0"]);function HN(n,e){let t=E0.has(n)||S0.has(n),i=E0.has(e)||S0.has(e);return(r,o)=>{let s=n==N0||n==r,a=e==N0||e==o;return!s&&t&&typeof r=="boolean"&&(s=r?E0.has(n):S0.has(n)),!a&&i&&typeof o=="boolean"&&(a=o?E0.has(e):S0.has(e)),s&&a}}var o3=":self",hG=new RegExp(`s*${o3}s*,?`,"g");function s3(n,e,t,i){return new EI(n).build(e,t,i)}var $N="",EI=class{constructor(e){this._driver=e}build(e,t,i){let r=new SI(t);return this._resetContextStyleTimingState(r),fr(this,rh(e),r)}_resetContextStyleTimingState(e){e.currentQuerySelector=$N,e.collectedStyles=new Map,e.collectedStyles.set($N,new Map),e.currentTime=0}visitTrigger(e,t){let i=t.queryCount=0,r=t.depCount=0,o=[],s=[];return e.name.charAt(0)=="@"&&t.errors.push(EW()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==ut.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,t))}),l.name=c}else if(a.type==ut.Transition){let l=this.visitTransition(a,t);i+=l.queryCount,r+=l.depCount,s.push(l)}else t.errors.push(SW())}),{type:ut.Trigger,name:e.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(e,t){let i=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(i.containsDynamicStyles){let o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{r3(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&t.errors.push(MW(e.name,[...o.values()]))}return{type:ut.State,name:e.name,style:i,options:r?{params:r}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let i=fr(this,rh(e.animation),t),r=uG(e.expr,t.errors);return{type:ut.Transition,matchers:r,animation:i,queryCount:t.queryCount,depCount:t.depCount,options:Gl(e.options)}}visitSequence(e,t){return{type:ut.Sequence,steps:e.steps.map(i=>fr(this,i,t)),options:Gl(e.options)}}visitGroup(e,t){let i=t.currentTime,r=0,o=e.steps.map(s=>{t.currentTime=i;let a=fr(this,s,t);return r=Math.max(r,t.currentTime),a});return t.currentTime=r,{type:ut.Group,steps:o,options:Gl(e.options)}}visitAnimate(e,t){let i=yG(e.timings,t.errors);t.currentAnimateTimings=i;let r,o=e.styles?e.styles:Ct({});if(o.type==ut.Keyframes)r=this.visitKeyframes(o,t);else{let s=e.styles,a=!1;if(!s){a=!0;let c={};i.easing&&(c.easing=i.easing),s=Ct(c)}t.currentTime+=i.duration+i.delay;let l=this.visitStyle(s,t);l.isEmptyStep=a,r=l}return t.currentAnimateTimings=null,{type:ut.Animate,timings:i,style:r,options:null}}visitStyle(e,t){let i=this._makeStyleAst(e,t);return this._validateStyleAst(i,t),i}_makeStyleAst(e,t){let i=[],r=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of r)typeof a=="string"?a===Xo?i.push(a):t.errors.push(DW(a)):i.push(new Map(Object.entries(a)));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o)){for(let l of a.values())if(l.toString().indexOf(n3)>=0){o=!0;break}}}),{type:ut.Style,styles:i,easing:s,offset:e.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(e,t){let i=t.currentAnimateTimings,r=t.currentTime,o=t.currentTime;i&&o>0&&(o-=i.duration+i.delay),e.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),u=c.get(l),d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(t.errors.push(OW(l,u.startTime,u.endTime,o,r)),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),t.options&&oG(a,t.options,t.errors)})})}visitKeyframes(e,t){let i={type:ut.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(AW()),i;let r=1,o=0,s=[],a=!1,l=!1,c=0,u=e.steps.map(w=>{let S=this._makeStyleAst(w,t),L=S.offset!=null?S.offset:gG(S.styles),T=0;return L!=null&&(o++,T=S.offset=L),l=l||T<0||T>1,a=a||T0&&o{let L=p>0?S==h?1:p*S:s[S],T=L*v;t.currentTime=g+_.delay+T,_.duration=T,this._validateStyleAst(w,t),w.offset=L,i.styles.push(w)}),i}visitReference(e,t){return{type:ut.Reference,animation:fr(this,rh(e.animation),t),options:Gl(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:ut.AnimateChild,options:Gl(e.options)}}visitAnimateRef(e,t){return{type:ut.AnimateRef,animation:this.visitReference(e.animation,t),options:Gl(e.options)}}visitQuery(e,t){let i=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;let[o,s]=fG(e.selector);t.currentQuerySelector=i.length?i+" "+o:o,mr(t.collectedStyles,t.currentQuerySelector,new Map);let a=fr(this,rh(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=i,{type:ut.Query,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:e.selector,options:Gl(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(PW());let i=e.timings==="full"?{duration:0,delay:0,easing:"full"}:A0(e.timings,t.errors,!0);return{type:ut.Stagger,animation:fr(this,rh(e.animation),t),timings:i,options:null}}};function fG(n){let e=!!n.split(/\s*,\s*/).find(t=>t==o3);return e&&(n=n.replace(hG,"")),n=n.replace(/@\*/g,O0).replace(/@\w+/g,t=>O0+"-"+t.slice(1)).replace(/:animating/g,II),[n,e]}function mG(n){return n?I({},n):null}var SI=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function gG(n){if(typeof n=="string")return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(t instanceof Map&&t.has("offset")){let i=t;e=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let t=n;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function yG(n,e){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let o=A0(n,e).duration;return yI(o,0,"")}let t=n;if(t.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=yI(0,0,"");return o.dynamic=!0,o.strValue=t,o}let r=A0(t,e);return yI(r.duration,r.delay,r.easing)}function Gl(n){return n?(n=I({},n),n.params&&(n.params=mG(n.params))):n={},n}function yI(n,e,t){return{duration:n,delay:e,easing:t}}function $I(n,e,t,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}var ah=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let i=this._map.get(e);i||this._map.set(e,i=[]),i.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},_G=1,vG=":enter",bG=new RegExp(vG,"g"),CG=":leave",wG=new RegExp(CG,"g");function a3(n,e,t,i,r,o=new Map,s=new Map,a,l,c=[]){return new MI().buildKeyframes(n,e,t,i,r,o,s,a,l,c)}var MI=class{buildKeyframes(e,t,i,r,o,s,a,l,c,u=[]){c=c||new ah;let d=new DI(e,t,c,r,o,u,[]);d.options=l;let p=l.delay?js(l.delay):0;d.currentTimeline.delayNextStep(p),d.currentTimeline.setStyles([s],null,d.errors,l),fr(this,i,d);let h=d.timelines.filter(g=>g.containsAnimation());if(h.length&&a.size){let g;for(let _=h.length-1;_>=0;_--){let v=h[_];if(v.element===t){g=v;break}}g&&!g.allowOnlyTimelineStyles()&&g.setStyles([a],null,d.errors,l)}return h.length?h.map(g=>g.buildKeyframes()):[$I(t,[],[],[],0,p,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let i=t.subInstructions.get(t.element);if(i){let r=t.createSubContext(e.options),o=t.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&t.transformIntoNewTimeline(s)}t.previousNode=e}visitAnimateRef(e,t){let i=t.createSubContext(e.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,i),this.visitReference(e.animation,i),t.transformIntoNewTimeline(i.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,i){for(let r of e){let o=r?.delay;if(o){let s=typeof o=="number"?o:js(sh(o,r?.params??{},t.errors));i.delayNextStep(s)}}}_visitSubInstructions(e,t,i){let o=t.currentTimeline.currentTime,s=i.duration!=null?js(i.duration):null,a=i.delay!=null?js(i.delay):null;return s!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(e,t){t.updateOptions(e.options,!0),fr(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let i=t.subContextCount,r=t,o=e.options;if(o&&(o.params||o.delay)&&(r=t.createSubContext(o),r.transformIntoNewTimeline(),o.delay!=null)){r.previousNode.type==ut.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=L0);let s=js(o.delay);r.delayNextStep(s)}e.steps.length&&(e.steps.forEach(s=>fr(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let i=[],r=t.currentTimeline.currentTime,o=e.options&&e.options.delay?js(e.options.delay):0;e.steps.forEach(s=>{let a=t.createSubContext(e.options);o&&a.delayNextStep(o),fr(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>t.currentTimeline.mergeTimelineCollectedStyles(s)),t.transformIntoNewTimeline(r),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let i=e.strValue,r=t.params?sh(i,t.params,t.errors):i;return A0(r,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let i=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;i.delay&&(t.incrementTime(i.delay),r.snapshotCurrentStyles());let o=e.style;o.type==ut.Keyframes?this.visitKeyframes(o,t):(t.incrementTime(i.duration),this.visitStyle(o,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let i=t.currentTimeline,r=t.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();let o=r&&r.easing||e.easing;e.isEmptyStep?i.applyEmptyStep(o):i.setStyles(e.styles,o,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let i=t.currentAnimateTimings,r=t.currentTimeline.duration,o=i.duration,a=t.createSubContext().currentTimeline;a.easing=i.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*o),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(r+o),t.previousNode=e}visitQuery(e,t){let i=t.currentTimeline.currentTime,r=e.options||{},o=r.delay?js(r.delay):0;o&&(t.previousNode.type===ut.Style||i==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=L0);let s=i,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{t.currentQueryIndex=u;let d=t.createSubContext(e.options,c);o&&d.delayNextStep(o),c===t.element&&(l=d.currentTimeline),fr(this,e.animation,d),d.currentTimeline.applyStylesToKeyframe();let p=d.currentTimeline.currentTime;s=Math.max(s,p)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(s),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let i=t.parentContext,r=t.currentTimeline,o=e.timings,s=Math.abs(o.duration),a=s*(t.currentQueryTotal-1),l=s*t.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime;break}let u=t.currentTimeline;l&&u.delayNextStep(l);let d=u.currentTime;fr(this,e.animation,t),t.previousNode=e,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}},L0={},DI=class n{constructor(e,t,i,r,o,s,a,l){this._driver=e,this.element=t,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=L0,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new P0(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let i=e,r=this.options;i.duration!=null&&(r.duration=js(i.duration)),i.delay!=null&&(r.delay=js(i.delay));let o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!t||!s.hasOwnProperty(a))&&(s[a]=sh(o[a],s,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let i=e.params={};Object.keys(t).forEach(r=>{i[r]=t[r]})}}return e}createSubContext(e=null,t,i){let r=t||this.element,o=new n(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(e){return this.previousNode=L0,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,i){let r={duration:t??e.duration,delay:this.currentTimeline.currentTime+(i??0)+e.delay,easing:""},o=new OI(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,i,r,o,s){let a=[];if(r&&a.push(this.element),e.length>0){e=e.replace(bG,"."+this._enterClassName),e=e.replace(wG,"."+this._leaveClassName);let l=i!=1,c=this._driver.query(this.element,e,l);i!==0&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&a.length==0&&s.push(RW(t)),a}},P0=class n{constructor(e,t,i,r){this._driver=e,this.element=t,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new n(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=_G,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,i]of this._globalTimelineStyles)this._backFill.set(t,i||Xo),this._currentKeyframe.set(t,Xo);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,i,r){t&&this._previousKeyframe.set("easing",t);let o=r&&r.params||{},s=IG(e,this._globalTimelineStyles);for(let[a,l]of s){let c=sh(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Xo),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,i)=>{let r=this._styleSummary.get(i);(!r||t.time>r.time)&&this._updateStyle(i,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,i=this._keyframes.size===1&&this.duration===0,r=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((u,d)=>{u===x0?e.add(d):u===Xo&&t.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});let o=[...e.values()],s=[...t.values()];if(i){let a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return $I(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}},OI=class extends P0{constructor(e,t,i,r,o,s,a=!1){super(e,t,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){let o=[],s=i+t,a=t/s,l=new Map(e[0]);l.set("offset",0),o.push(l);let c=new Map(e[0]);c.set("offset",WN(a)),o.push(c);let u=e.length-1;for(let d=1;d<=u;d++){let p=new Map(e[d]),h=p.get("offset"),g=t+h*i;p.set("offset",WN(g/s)),o.push(p)}i=s,t=0,r="",e=o}return $I(this.element,e,this.preStyleProps,this.postStyleProps,i,t,r,!0)}};function WN(n,e=3){let t=Math.pow(10,e-1);return Math.round(n*t)/t}function IG(n,e){let t=new Map,i;return n.forEach(r=>{if(r==="*"){i??=e.keys();for(let o of i)t.set(o,Xo)}else for(let[o,s]of r)t.set(o,s)}),t}function GN(n,e,t,i,r,o,s,a,l,c,u,d,p){return{type:0,element:n,triggerName:e,isRemovalTransition:r,fromState:t,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:p}}var _I={},R0=class{constructor(e,t,i){this._triggerName=e,this.ast=t,this._stateStyles=i}match(e,t,i,r){return xG(this.ast.matchers,e,t,i,r)}buildStyles(e,t,i){let r=this._stateStyles.get("*");return e!==void 0&&(r=this._stateStyles.get(e?.toString())||r),r?r.buildStyles(t,i):new Map}build(e,t,i,r,o,s,a,l,c,u){let d=[],p=this.ast.options&&this.ast.options.params||_I,h=a&&a.params||_I,g=this.buildStyles(i,h,d),_=l&&l.params||_I,v=this.buildStyles(r,_,d),w=new Set,S=new Map,L=new Map,T=r==="void",q={params:l3(_,p),delay:this.ast.options?.delay},N=u?[]:a3(e,t,this.ast.animation,o,s,g,v,q,c,d),ee=0;return N.forEach(ge=>{ee=Math.max(ge.duration+ge.delay,ee)}),d.length?GN(t,this._triggerName,i,r,T,g,v,[],[],S,L,ee,d):(N.forEach(ge=>{let ce=ge.element,ze=mr(S,ce,new Set);ge.preStyleProps.forEach(It=>ze.add(It));let Ot=mr(L,ce,new Set);ge.postStyleProps.forEach(It=>Ot.add(It)),ce!==t&&w.add(ce)}),GN(t,this._triggerName,i,r,T,g,v,N,[...w.values()],S,L,ee))}};function xG(n,e,t,i,r){return n.some(o=>o(e,t,i,r))}function l3(n,e){let t=I({},e);return Object.entries(n).forEach(([i,r])=>{r!=null&&(t[i]=r)}),t}var AI=class{constructor(e,t,i){this.styles=e,this.defaultParams=t,this.normalizer=i}buildStyles(e,t){let i=new Map,r=l3(e,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((s,a)=>{s&&(s=sh(s,r,t));let l=this.normalizer.normalizePropertyName(a,t);s=this.normalizer.normalizeStyleValue(a,l,s,t),i.set(a,s)})}),i}};function TG(n,e,t){return new kI(n,e,t)}var kI=class{constructor(e,t,i){this.name=e,this.ast=t,this._normalizer=i,this.transitionFactories=[],this.states=new Map,t.states.forEach(r=>{let o=r.options&&r.options.params||{};this.states.set(r.name,new AI(r.style,o,i))}),qN(this.states,"true","1"),qN(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new R0(e,r,this.states))}),this.fallbackTransition=EG(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,i,r){return this.transitionFactories.find(s=>s.match(e,t,i,r))||null}matchStyles(e,t,i){return this.fallbackTransition.buildStyles(e,t,i)}};function EG(n,e,t){let i=[(s,a)=>!0],r={type:ut.Sequence,steps:[],options:null},o={type:ut.Transition,animation:r,matchers:i,options:null,queryCount:0,depCount:0};return new R0(n,o,e)}function qN(n,e,t){n.has(e)?n.has(t)||n.set(t,n.get(e)):n.has(t)&&n.set(e,n.get(t))}var SG=new ah,NI=class{constructor(e,t,i){this.bodyNode=e,this._driver=t,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,t){let i=[],r=[],o=s3(this._driver,t,i,r);if(i.length)throw zW(i);r.length&&void 0,this._animations.set(e,o)}_buildPlayer(e,t,i){let r=e.element,o=XN(this._normalizer,e.keyframes,t,i);return this._driver.animate(r,o,e.duration,e.delay,e.easing,[],!0)}create(e,t,i={}){let r=[],o=this._animations.get(e),s,a=new Map;if(o?(s=a3(this._driver,t,o,i3,wI,new Map,new Map,i,SG,r),s.forEach(u=>{let d=mr(a,u.element,new Map);u.postStyleProps.forEach(p=>d.set(p,null))})):(r.push(UW()),s=[]),r.length)throw HW(r);a.forEach((u,d)=>{u.forEach((p,h)=>{u.set(h,this._driver.computeStyle(d,h,Xo))})});let l=s.map(u=>{let d=a.get(u.element);return this._buildPlayer(u,new Map,d)}),c=Pa(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let i=this.players.indexOf(t);i>=0&&this.players.splice(i,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw $W(e);return t}listen(e,t,i,r){let o=VI(t,"","","");return jI(this._getPlayer(e),i,o,r),()=>{}}command(e,t,i,r){if(i=="register"){this.register(e,r[0]);return}if(i=="create"){let s=r[0]||{};this.create(e,t,s);return}let o=this._getPlayer(e);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e);break}}},QN="ng-animate-queued",MG=".ng-animate-queued",vI="ng-animate-disabled",DG=".ng-animate-disabled",OG="ng-star-inserted",AG=".ng-star-inserted",kG=[],c3={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},NG={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},fo="__ng_removed",lh=class{get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let i=e&&e.hasOwnProperty("value"),r=i?e.value:e;if(this.value=PG(r),i){let o=e,{value:s}=o,a=ca(o,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let i=this.options.params;Object.keys(t).forEach(r=>{i[r]==null&&(i[r]=t[r])})}}},oh="void",bI=new lh(oh),LI=class{constructor(e,t,i){this.id=e,this.hostElement=t,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Vr(t,this._hostClassName)}listen(e,t,i,r){if(!this._triggers.has(t))throw WW(i,t);if(i==null||i.length==0)throw GW(t);if(!RG(i))throw qW(i,t);let o=mr(this._elementListeners,e,[]),s={name:t,phase:i,callback:r};o.push(s);let a=mr(this._engine.statesByElement,e,new Map);return a.has(t)||(Vr(e,T0),Vr(e,T0+"-"+t),a.set(t,bI)),()=>{this._engine.afterFlush(()=>{let l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw QW(e);return t}trigger(e,t,i,r=!0){let o=this._getTrigger(t),s=new ch(this.id,t,e),a=this._engine.statesByElement.get(e);a||(Vr(e,T0),Vr(e,T0+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new lh(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=bI),!(c.value===oh)&&l.value===c.value){if(!VG(l.params,c.params)){let _=[],v=o.matchStyles(l.value,l.params,_),w=o.matchStyles(c.value,c.params,_);_.length?this._engine.reportError(_):this._engine.afterFlush(()=>{ql(e,v),es(e,w)})}return}let p=mr(this._engine.playersByElement,e,[]);p.forEach(_=>{_.namespaceId==this.id&&_.triggerName==t&&_.queued&&_.destroy()});let h=o.matchTransition(l.value,c.value,e,c.params),g=!1;if(!h){if(!r)return;h=o.fallbackTransition,g=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:h,fromState:l,toState:c,player:s,isFallbackTransition:g}),g||(Vr(e,QN),s.onStart(()=>{Nu(e,QN)})),s.onDone(()=>{let _=this.players.indexOf(s);_>=0&&this.players.splice(_,1);let v=this._engine.playersByElement.get(e);if(v){let w=v.indexOf(s);w>=0&&v.splice(w,1)}}),this.players.push(s),p.push(s),s}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,i)=>{this._elementListeners.set(i,t.filter(r=>r.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(i=>i.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let i=this._engine.driver.query(e,O0,!0);i.forEach(r=>{if(r[fo])return;let o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(e,t,i,r){let o=this._engine.statesByElement.get(e),s=new Map;if(o){let a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){let u=this.trigger(e,c,oh,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,s),i&&Pa(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),i=this._engine.statesByElement.get(e);if(t&&i){let r=new Set;t.forEach(o=>{let s=o.name;if(r.has(s))return;r.add(s);let l=this._triggers.get(s).fallbackTransition,c=i.get(s)||bI,u=new lh(oh),d=new ch(this.id,s,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(e,t){let i=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let r=!1;if(i.totalAnimations){let o=i.players.length?i.playersByQueriedElement.get(e):[];if(o&&o.length)r=!0;else{let s=e;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(e),r)i.markElementAsRemoved(this.id,e,!1,t);else{let o=e[fo];(!o||o===c3)&&(i.afterFlush(()=>this.clearElementCache(e)),i.destroyInnerAnimations(e),i._onRemovalComplete(e,t))}}insertNode(e,t){Vr(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(i=>{let r=i.player;if(r.destroyed)return;let o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){let l=VI(o,i.triggerName,i.fromState.value,i.toState.value);l._data=e,jI(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(i)}),this._queue=[],t.sort((i,r)=>{let o=i.transition.ast.depCount,s=r.transition.ast.depCount;return o==0||s==0?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},PI=class{_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,i){this.bodyNode=e,this.driver=t,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(i=>{i.queued&&e.push(i)})}),e}createNamespace(e,t){let i=new LI(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(i,t):(this.newHostElements.set(t,i),this.collectEnterElement(t)),this._namespaceLookup[e]=i}_balanceNamespaceList(e,t){let i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(t);for(;a;){let l=r.get(a);if(l){let c=i.indexOf(l);i.splice(c+1,0,e),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(e)}else i.push(e);return r.set(t,e),e}register(e,t){let i=this._namespaceLookup[e];return i||(i=this.createNamespace(e,t)),i}registerTrigger(e,t,i){let r=this._namespaceLookup[e];r&&r.register(t,i)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let i=this._fetchNamespace(e);this.namespacesByHostElement.delete(i.hostElement);let r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1),i.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,i=this.statesByElement.get(e);if(i){for(let r of i.values())if(r.namespaceId){let o=this._fetchNamespace(r.namespaceId);o&&t.add(o)}}return t}trigger(e,t,i,r){if(M0(t)){let o=this._fetchNamespace(e);if(o)return o.trigger(t,i,r),!0}return!1}insertNode(e,t,i,r){if(!M0(t))return;let o=t[fo];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let s=this.collectedLeaveElements.indexOf(t);s>=0&&this.collectedLeaveElements.splice(s,1)}if(e){let s=this._fetchNamespace(e);s&&s.insertNode(t,i)}r&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Vr(e,vI)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Nu(e,vI))}removeNode(e,t,i){if(M0(t)){let r=e?this._fetchNamespace(e):null;r?r.removeNode(t,i):this.markElementAsRemoved(e,t,!1,i);let o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,i)}else this._onRemovalComplete(t,i)}markElementAsRemoved(e,t,i,r,o){this.collectedLeaveElements.push(t),t[fo]={namespaceId:e,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(e,t,i,r,o){return M0(t)?this._fetchNamespace(e).listen(t,i,r,o):()=>{}}_buildInstruction(e,t,i,r,o){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,i,r,e.fromState.options,e.toState.options,t,o)}destroyInnerAnimations(e){let t=this.driver.query(e,O0,!0);t.forEach(i=>this.destroyActiveAnimationsForElement(i)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,II,!0),t.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return Pa(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[fo];if(t&&t.setForRemoval){if(e[fo]=c3,t.namespaceId){this.destroyInnerAnimations(e);let i=this._fetchNamespace(t.namespaceId);i&&i.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(vI)&&this.markElementAsDisabled(e,!1),this.driver.query(e,DG,!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){let i=this._whenQuietFns;this._whenQuietFns=[],t.length?Pa(t).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(e){throw KW(e)}_flushAnimations(e,t){let i=new ah,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(U=>{u.add(U);let H=this.driver.query(U,MG,!0);for(let Q=0;Q{let Q=i3+_++;g.set(H,Q),U.forEach(de=>Vr(de,Q))});let v=[],w=new Set,S=new Set;for(let U=0;Uw.add(de)):S.add(H))}let L=new Map,T=ZN(p,Array.from(w));T.forEach((U,H)=>{let Q=wI+_++;L.set(H,Q),U.forEach(de=>Vr(de,Q))}),e.push(()=>{h.forEach((U,H)=>{let Q=g.get(H);U.forEach(de=>Nu(de,Q))}),T.forEach((U,H)=>{let Q=L.get(H);U.forEach(de=>Nu(de,Q))}),v.forEach(U=>{this.processLeaveNode(U)})});let q=[],N=[];for(let U=this._namespaceList.length-1;U>=0;U--)this._namespaceList[U].drainQueuedTransitions(t).forEach(Q=>{let de=Q.player,te=Q.element;if(q.push(de),this.collectedEnterElements.length){let In=te[fo];if(In&&In.setForMove){if(In.previousTriggersValues&&In.previousTriggersValues.has(Q.triggerName)){let di=In.previousTriggersValues.get(Q.triggerName),Kn=this.statesByElement.get(Q.element);if(Kn&&Kn.has(Q.triggerName)){let ar=Kn.get(Q.triggerName);ar.value=di,Kn.set(Q.triggerName,ar)}}de.destroy();return}}let lt=!d||!this.driver.containsElement(d,te),it=L.get(te),Ut=g.get(te),dt=this._buildInstruction(Q,i,Ut,it,lt);if(dt.errors&&dt.errors.length){N.push(dt);return}if(lt){de.onStart(()=>ql(te,dt.fromStyles)),de.onDestroy(()=>es(te,dt.toStyles)),r.push(de);return}if(Q.isFallbackTransition){de.onStart(()=>ql(te,dt.fromStyles)),de.onDestroy(()=>es(te,dt.toStyles)),r.push(de);return}let Bn=[];dt.timelines.forEach(In=>{In.stretchStartingKeyframe=!0,this.disabledNodes.has(In.element)||Bn.push(In)}),dt.timelines=Bn,i.append(te,dt.timelines);let no={instruction:dt,player:de,element:te};s.push(no),dt.queriedElements.forEach(In=>mr(a,In,[]).push(de)),dt.preStyleProps.forEach((In,di)=>{if(In.size){let Kn=l.get(di);Kn||l.set(di,Kn=new Set),In.forEach((ar,So)=>Kn.add(So))}}),dt.postStyleProps.forEach((In,di)=>{let Kn=c.get(di);Kn||c.set(di,Kn=new Set),In.forEach((ar,So)=>Kn.add(So))})});if(N.length){let U=[];N.forEach(H=>{U.push(YW(H.triggerName,H.errors))}),q.forEach(H=>H.destroy()),this.reportError(U)}let ee=new Map,ge=new Map;s.forEach(U=>{let H=U.element;i.has(H)&&(ge.set(H,H),this._beforeAnimationBuild(U.player.namespaceId,U.instruction,ee))}),r.forEach(U=>{let H=U.element;this._getPreviousPlayers(H,!1,U.namespaceId,U.triggerName,null).forEach(de=>{mr(ee,H,[]).push(de),de.destroy()})});let ce=v.filter(U=>JN(U,l,c)),ze=new Map;YN(ze,this.driver,S,c,Xo).forEach(U=>{JN(U,l,c)&&ce.push(U)});let It=new Map;h.forEach((U,H)=>{YN(It,this.driver,new Set(U),l,x0)}),ce.forEach(U=>{let H=ze.get(U),Q=It.get(U);ze.set(U,new Map([...H?.entries()??[],...Q?.entries()??[]]))});let ve=[],Ve=[],z={};s.forEach(U=>{let{element:H,player:Q,instruction:de}=U;if(i.has(H)){if(u.has(H)){Q.onDestroy(()=>es(H,de.toStyles)),Q.disabled=!0,Q.overrideTotalTime(de.totalTime),r.push(Q);return}let te=z;if(ge.size>1){let it=H,Ut=[];for(;it=it.parentNode;){let dt=ge.get(it);if(dt){te=dt;break}Ut.push(it)}Ut.forEach(dt=>ge.set(dt,te))}let lt=this._buildAnimation(Q.namespaceId,de,ee,o,It,ze);if(Q.setRealPlayer(lt),te===z)ve.push(Q);else{let it=this.playersByElement.get(te);it&&it.length&&(Q.parentPlayer=Pa(it)),r.push(Q)}}else ql(H,de.fromStyles),Q.onDestroy(()=>es(H,de.toStyles)),Ve.push(Q),u.has(H)&&r.push(Q)}),Ve.forEach(U=>{let H=o.get(U.element);if(H&&H.length){let Q=Pa(H);U.setRealPlayer(Q)}}),r.forEach(U=>{U.parentPlayer?U.syncPlayerEvents(U.parentPlayer):U.destroy()});for(let U=0;U!lt.destroyed);te.length?FG(this,H,te):this.processLeaveNode(H)}return v.length=0,ve.forEach(U=>{this.players.push(U),U.onDone(()=>{U.destroy();let H=this.players.indexOf(U);this.players.splice(H,1)}),U.play()}),ve}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,i,r,o){let s=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(s=a)}else{let a=this.playersByElement.get(e);if(a){let l=!o||o==oh;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(e,t,i){let r=t.triggerName,o=t.element,s=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:r;for(let l of t.timelines){let c=l.element,u=c!==o,d=mr(i,c,[]);this._getPreviousPlayers(c,u,s,a,t.toState).forEach(h=>{let g=h.getRealPlayer();g.beforeDestroy&&g.beforeDestroy(),h.destroy(),d.push(h)})}ql(o,t.fromStyles)}_buildAnimation(e,t,i,r,o,s){let a=t.triggerName,l=t.element,c=[],u=new Set,d=new Set,p=t.timelines.map(g=>{let _=g.element;u.add(_);let v=_[fo];if(v&&v.removedBeforeQueried)return new La(g.duration,g.delay);let w=_!==l,S=jG((i.get(_)||kG).map(ee=>ee.getRealPlayer())).filter(ee=>{let ge=ee;return ge.element?ge.element===_:!1}),L=o.get(_),T=s.get(_),q=XN(this._normalizer,g.keyframes,L,T),N=this._buildPlayer(g,q,S);if(g.subTimeline&&r&&d.add(_),w){let ee=new ch(e,a,_);ee.setRealPlayer(N),c.push(ee)}return N});c.forEach(g=>{mr(this.playersByQueriedElement,g.element,[]).push(g),g.onDone(()=>LG(this.playersByQueriedElement,g.element,g))}),u.forEach(g=>Vr(g,UN));let h=Pa(p);return h.onDestroy(()=>{u.forEach(g=>Nu(g,UN)),es(l,t.toStyles)}),d.forEach(g=>{mr(r,g,[]).push(h)}),h}_buildPlayer(e,t,i){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,i):new La(e.duration,e.delay)}},ch=class{constructor(e,t,i){this.namespaceId=e,this.triggerName=t,this.element=i,this._player=new La,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,i)=>{t.forEach(r=>jI(e,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){mr(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function LG(n,e,t){let i=n.get(e);if(i){if(i.length){let r=i.indexOf(t);i.splice(r,1)}i.length==0&&n.delete(e)}return i}function PG(n){return n??null}function M0(n){return n&&n.nodeType===1}function RG(n){return n=="start"||n=="done"}function KN(n,e){let t=n.style.display;return n.style.display=e??"none",t}function YN(n,e,t,i,r){let o=[];t.forEach(l=>o.push(KN(l)));let s=[];i.forEach((l,c)=>{let u=new Map;l.forEach(d=>{let p=e.computeStyle(c,d,r);u.set(d,p),(!p||p.length==0)&&(c[fo]=NG,s.push(c))}),n.set(c,u)});let a=0;return t.forEach(l=>KN(l,o[a++])),s}function ZN(n,e){let t=new Map;if(n.forEach(a=>t.set(a,[])),e.length==0)return t;let i=1,r=new Set(e),o=new Map;function s(a){if(!a)return i;let l=o.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:r.has(c)?l=i:l=s(c),o.set(a,l),l}return e.forEach(a=>{let l=s(a);l!==i&&t.get(l).push(a)}),t}function Vr(n,e){n.classList?.add(e)}function Nu(n,e){n.classList?.remove(e)}function FG(n,e,t){Pa(t).onDone(()=>n.processLeaveNode(e))}function jG(n){let e=[];return u3(n,e),e}function u3(n,e){for(let t=0;tr.add(o)):e.set(n,i),t.delete(n),!0}var Pu=class{constructor(e,t,i){this._driver=t,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new PI(e.body,t,i),this._timelineEngine=new NI(e.body,t,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(e,t,i,r,o){let s=e+"-"+r,a=this._triggerCache[s];if(!a){let l=[],c=[],u=s3(this._driver,o,l,c);if(l.length)throw VW(r,l);c.length&&void 0,a=TG(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(t,r,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,i,r){this._transitionEngine.insertNode(e,t,i,r)}onRemove(e,t,i){this._transitionEngine.removeNode(e,t,i)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,i,r){if(i.charAt(0)=="@"){let[o,s]=BN(i),a=r;this._timelineEngine.command(o,t,s,a)}else this._transitionEngine.trigger(e,t,i,r)}listen(e,t,i,r,o){if(i.charAt(0)=="@"){let[s,a]=BN(i);return this._timelineEngine.listen(s,t,a,o)}return this._transitionEngine.listen(e,t,i,r,o)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function BG(n,e){let t=null,i=null;return Array.isArray(e)&&e.length?(t=CI(e[0]),e.length>1&&(i=CI(e[e.length-1]))):e instanceof Map&&(t=CI(e)),t||i?new RI(n,t,i):null}var Lu=class Lu{constructor(e,t,i){this._element=e,this._startStyles=t,this._endStyles=i,this._state=0;let r=Lu.initialStylesByElement.get(e);r||Lu.initialStylesByElement.set(e,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&es(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(es(this._element,this._initialStyles),this._endStyles&&(es(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(Lu.initialStylesByElement.delete(this._element),this._startStyles&&(ql(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ql(this._element,this._endStyles),this._endStyles=null),es(this._element,this._initialStyles),this._state=3)}};Lu.initialStylesByElement=new WeakMap;var RI=Lu;function CI(n){let e=null;return n.forEach((t,i)=>{zG(i)&&(e=e||new Map,e.set(i,t))}),e}function zG(n){return n==="display"||n==="position"}var F0=class{constructor(e,t,i,r){this.element=e,this.keyframes=t,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(i=>{t.push(Object.fromEntries(i))}),t}_triggerWebAnimation(e,t,i){return e.animate(this._convertKeyframesToObject(t),i)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{r!=="offset"&&e.set(r,this._finished?i:HI(this.element,r))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},j0=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return e3(e,t)}getParentElement(e){return BI(e)}query(e,t,i){return t3(e,t,i)}computeStyle(e,t,i){return HI(e,t)}animate(e,t,i,r,o,s=[]){let a=r==0?"both":"forwards",l={duration:i,delay:r,fill:a};o&&(l.easing=o);let c=new Map,u=s.filter(h=>h instanceof F0);aG(i,r)&&u.forEach(h=>{h.currentSnapshot.forEach((g,_)=>c.set(_,g))});let d=rG(t).map(h=>new Map(h));d=lG(e,d,c);let p=BG(e,d);return new F0(e,d,l,p)}};var D0="@",d3="@.disabled",V0=class{constructor(e,t,i,r){this.namespaceId=e,this.delegate=t,this.engine=i,this._onDestroy=r,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,i,r=!0){this.delegate.insertBefore(e,t,i),this.engine.onInsert(this.namespaceId,t,e,r)}removeChild(e,t,i){this.parentNode(t)&&this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,i,r){this.delegate.setAttribute(e,t,i,r)}removeAttribute(e,t,i){this.delegate.removeAttribute(e,t,i)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,i,r){this.delegate.setStyle(e,t,i,r)}removeStyle(e,t,i){this.delegate.removeStyle(e,t,i)}setProperty(e,t,i){t.charAt(0)==D0&&t==d3?this.disableAnimations(e,!!i):this.delegate.setProperty(e,t,i)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,i){return this.delegate.listen(e,t,i)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},FI=class extends V0{constructor(e,t,i,r,o){super(t,i,r,o),this.factory=e,this.namespaceId=t}setProperty(e,t,i){t.charAt(0)==D0?t.charAt(1)=="."&&t==d3?(i=i===void 0?!0:!!i,this.disableAnimations(e,i)):this.engine.process(this.namespaceId,e,t.slice(1),i):this.delegate.setProperty(e,t,i)}listen(e,t,i){if(t.charAt(0)==D0){let r=UG(e),o=t.slice(1),s="";return o.charAt(0)!=D0&&([o,s]=HG(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{let l=a._data||-1;this.factory.scheduleListenerCallback(l,i,a)})}return this.delegate.listen(e,t,i)}};function UG(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function HG(n){let e=n.indexOf("."),t=n.substring(0,e),i=n.slice(e+1);return[t,i]}var B0=class{constructor(e,t,i){this.delegate=e,this.engine=t,this._zone=i,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(r,o)=>{o?.removeChild(null,r)}}createRenderer(e,t){let i="",r=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,u=c.get(r);if(!u){let d=()=>c.delete(r);u=new V0(i,r,this.engine,d),c.set(r,u)}return u}let o=t.id,s=t.id+"-"+this._currentId;this._currentId++,this.engine.register(s,e);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(o,s,e,c.name,c)};return t.data.animation.forEach(a),new FI(this,s,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,i){if(e>=0&&et(i));return}let r=this._animationCallbacksBuffer;r.length==0&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(o=>{let[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),r.push([t,i])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var WG=(()=>{let e=class e extends Pu{constructor(i,r,o){super(i,r,o)}ngOnDestroy(){this.flush()}};e.\u0275fac=function(r){return new(r||e)(re(We),re(Ql),re(Kl))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();function GG(){return new k0}function qG(n,e,t){return new B0(n,e,t)}var h3=[{provide:Kl,useFactory:GG},{provide:Pu,useClass:WG},{provide:wa,useFactory:qG,deps:[c0,Pu,He]}],p3=[{provide:Ql,useFactory:()=>new j0},{provide:tw,useValue:"BrowserAnimations"},...h3],QG=[{provide:Ql,useClass:zI},{provide:tw,useValue:"NoopAnimations"},...h3],f3=(()=>{let e=class e{static withConfig(i){return{ngModule:e,providers:i.disableAnimations?QG:p3}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({providers:p3,imports:[d0]});let n=e;return n})();var Ee=class n{static isArray(e,t=!0){return Array.isArray(e)&&(t||e.length!==0)}static isObject(e,t=!0){return typeof e=="object"&&!Array.isArray(e)&&e!=null&&(t||Object.keys(e).length!==0)}static equals(e,t,i){return i?this.resolveFieldData(e,i)===this.resolveFieldData(t,i):this.equalsByValue(e,t)}static equalsByValue(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var i=Array.isArray(e),r=Array.isArray(t),o,s,a;if(i&&r){if(s=e.length,s!=t.length)return!1;for(o=s;o--!==0;)if(!this.equalsByValue(e[o],t[o]))return!1;return!0}if(i!=r)return!1;var l=this.isDate(e),c=this.isDate(t);if(l!=c)return!1;if(l&&c)return e.getTime()==t.getTime();var u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var p=Object.keys(e);if(s=p.length,s!==Object.keys(t).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,p[o]))return!1;for(o=s;o--!==0;)if(a=p[o],!this.equalsByValue(e[a],t[a]))return!1;return!0}return e!==e&&t!==t}static resolveFieldData(e,t){if(e&&t){if(this.isFunction(t))return t(e);if(t.indexOf(".")==-1)return e[t];{let i=t.split("."),r=e;for(let o=0,s=i.length;o=e.length&&(i%=e.length,t%=e.length),e.splice(i,0,e.splice(t,1)[0]))}static insertIntoOrderedArray(e,t,i,r){if(i.length>0){let o=!1;for(let s=0;st){i.splice(s,0,e),o=!0;break}o||i.push(e)}else i.push(e)}static findIndexInList(e,t){let i=-1;if(t){for(let r=0;rt?1:0,o}static sort(e,t,i=1,r,o=1){let s=n.compare(e,t,r,i),a=i;return(n.isEmpty(e)||n.isEmpty(t))&&(a=o===1?i:o),a*s}static merge(e,t){if(!(e==null&&t==null)){{if((e==null||typeof e=="object")&&(t==null||typeof t=="object"))return I(I({},e||{}),t||{});if((e==null||typeof e=="string")&&(t==null||typeof t=="string"))return[e||"",t||""].join(" ")}return t||e}}static isPrintableCharacter(e=""){return this.isNotEmpty(e)&&e.length===1&&e.match(/\S| /)}static getItemValue(e,...t){return this.isFunction(e)?e(...t):e}static findLastIndex(e,t){let i=-1;if(this.isNotEmpty(e))try{i=e.findLastIndex(t)}catch{i=e.lastIndexOf([...e].reverse().find(t))}return i}static findLast(e,t){let i;if(this.isNotEmpty(e))try{i=e.findLast(t)}catch{i=[...e].reverse().find(t)}return i}static deepEquals(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var i=Array.isArray(e),r=Array.isArray(t),o,s,a;if(i&&r){if(s=e.length,s!=t.length)return!1;for(o=s;o--!==0;)if(!this.deepEquals(e[o],t[o]))return!1;return!0}if(i!=r)return!1;var l=e instanceof Date,c=t instanceof Date;if(l!=c)return!1;if(l&&c)return e.getTime()==t.getTime();var u=e instanceof RegExp,d=t instanceof RegExp;if(u!=d)return!1;if(u&&d)return e.toString()==t.toString();var p=Object.keys(e);if(s=p.length,s!==Object.keys(t).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(t,p[o]))return!1;for(o=s;o--!==0;)if(a=p[o],!this.deepEquals(e[a],t[a]))return!1;return!0}return e!==e&&t!==t}},m3=0;function nt(n="pn_id_"){return m3++,`${n}${m3}`}function KG(){let n=[],e=(o,s)=>{let a=n.length>0?n[n.length-1]:{key:o,value:s},l=a.value+(a.key===o?0:s)+2;return n.push({key:o,value:l}),l},t=o=>{n=n.filter(s=>s.value!==o)},i=()=>n.length>0?n[n.length-1].value:0,r=o=>o&&parseInt(o.style.zIndex,10)||0;return{get:r,set:(o,s,a)=>{s&&(s.style.zIndex=String(e(o,a)))},clear:o=>{o&&(t(r(o)),o.style.zIndex="")},getCurrent:()=>i()}}var _n=KG();var g3=["*"],Yl=function(n){return n[n.ACCEPT=0]="ACCEPT",n[n.REJECT=1]="REJECT",n[n.CANCEL=2]="CANCEL",n}(Yl||{}),Vs=(()=>{class n{requireConfirmationSource=new pe;acceptConfirmationSource=new pe;requireConfirmation$=this.requireConfirmationSource.asObservable();accept=this.acceptConfirmationSource.asObservable();confirm(t){return this.requireConfirmationSource.next(t),this}close(){return this.requireConfirmationSource.next(null),this}onAccept(){this.acceptConfirmationSource.next(null)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=K({token:n,factory:n.\u0275fac})}return n})();var Mi=(()=>{class n{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static IN="in";static LESS_THAN="lt";static LESS_THAN_OR_EQUAL_TO="lte";static GREATER_THAN="gt";static GREATER_THAN_OR_EQUAL_TO="gte";static BETWEEN="between";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static DATE_IS="dateIs";static DATE_IS_NOT="dateIsNot";static DATE_BEFORE="dateBefore";static DATE_AFTER="dateAfter"}return n})();var z0=(()=>{class n{filter(t,i,r,o,s){let a=[];if(t)for(let l of t)for(let c of i){let u=Ee.resolveFieldData(l,c);if(this.filters[o](u,r,s)){a.push(l);break}}return a}filters={startsWith:(t,i,r)=>{if(i==null||i.trim()==="")return!0;if(t==null)return!1;let o=Ee.removeAccents(i.toString()).toLocaleLowerCase(r);return Ee.removeAccents(t.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(t,i,r)=>{if(i==null||typeof i=="string"&&i.trim()==="")return!0;if(t==null)return!1;let o=Ee.removeAccents(i.toString()).toLocaleLowerCase(r);return Ee.removeAccents(t.toString()).toLocaleLowerCase(r).indexOf(o)!==-1},notContains:(t,i,r)=>{if(i==null||typeof i=="string"&&i.trim()==="")return!0;if(t==null)return!1;let o=Ee.removeAccents(i.toString()).toLocaleLowerCase(r);return Ee.removeAccents(t.toString()).toLocaleLowerCase(r).indexOf(o)===-1},endsWith:(t,i,r)=>{if(i==null||i.trim()==="")return!0;if(t==null)return!1;let o=Ee.removeAccents(i.toString()).toLocaleLowerCase(r),s=Ee.removeAccents(t.toString()).toLocaleLowerCase(r);return s.indexOf(o,s.length-o.length)!==-1},equals:(t,i,r)=>i==null||typeof i=="string"&&i.trim()===""?!0:t==null?!1:t.getTime&&i.getTime?t.getTime()===i.getTime():t==i?!0:Ee.removeAccents(t.toString()).toLocaleLowerCase(r)==Ee.removeAccents(i.toString()).toLocaleLowerCase(r),notEquals:(t,i,r)=>i==null||typeof i=="string"&&i.trim()===""?!1:t==null?!0:t.getTime&&i.getTime?t.getTime()!==i.getTime():t==i?!1:Ee.removeAccents(t.toString()).toLocaleLowerCase(r)!=Ee.removeAccents(i.toString()).toLocaleLowerCase(r),in:(t,i)=>{if(i==null||i.length===0)return!0;for(let r=0;ri==null||i[0]==null||i[1]==null?!0:t==null?!1:t.getTime?i[0].getTime()<=t.getTime()&&t.getTime()<=i[1].getTime():i[0]<=t&&t<=i[1],lt:(t,i,r)=>i==null?!0:t==null?!1:t.getTime&&i.getTime?t.getTime()i==null?!0:t==null?!1:t.getTime&&i.getTime?t.getTime()<=i.getTime():t<=i,gt:(t,i,r)=>i==null?!0:t==null?!1:t.getTime&&i.getTime?t.getTime()>i.getTime():t>i,gte:(t,i,r)=>i==null?!0:t==null?!1:t.getTime&&i.getTime?t.getTime()>=i.getTime():t>=i,is:(t,i,r)=>this.filters.equals(t,i,r),isNot:(t,i,r)=>this.filters.notEquals(t,i,r),before:(t,i,r)=>this.filters.lt(t,i,r),after:(t,i,r)=>this.filters.gt(t,i,r),dateIs:(t,i)=>i==null?!0:t==null?!1:t.toDateString()===i.toDateString(),dateIsNot:(t,i)=>i==null?!0:t==null?!1:t.toDateString()!==i.toDateString(),dateBefore:(t,i)=>i==null?!0:t==null?!1:t.getTime(){if(i==null)return!0;if(t==null)return!1;let r=new Date(t);return r.setHours(0,0,0,0),r.getTime()>i.getTime()}};register(t,i){this.filters[t]=i}static \u0275fac=function(i){return new(i||n)};static \u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),y3=(()=>{class n{messageSource=new pe;clearSource=new pe;messageObserver=this.messageSource.asObservable();clearObserver=this.clearSource.asObservable();add(t){t&&this.messageSource.next(t)}addAll(t){t&&t.length&&this.messageSource.next(t)}clear(t){this.clearSource.next(t||null)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=K({token:n,factory:n.\u0275fac})}return n})(),_3=(()=>{class n{clickSource=new pe;clickObservable=this.clickSource.asObservable();add(t){t&&this.clickSource.next(t)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Pt=(()=>{class n{ripple=!1;inputStyle=Lt("outlined");overlayOptions={};csp=Lt({nonce:void 0});filterMatchModeOptions={text:[Mi.STARTS_WITH,Mi.CONTAINS,Mi.NOT_CONTAINS,Mi.ENDS_WITH,Mi.EQUALS,Mi.NOT_EQUALS],numeric:[Mi.EQUALS,Mi.NOT_EQUALS,Mi.LESS_THAN,Mi.LESS_THAN_OR_EQUAL_TO,Mi.GREATER_THAN,Mi.GREATER_THAN_OR_EQUAL_TO],date:[Mi.DATE_IS,Mi.DATE_IS_NOT,Mi.DATE_BEFORE,Mi.DATE_AFTER]};translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",pending:"Pending",fileSizeTypes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],chooseYear:"Choose Year",chooseMonth:"Choose Month",chooseDate:"Choose Date",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",prevHour:"Previous Hour",nextHour:"Next Hour",prevMinute:"Previous Minute",nextMinute:"Next Minute",prevSecond:"Previous Second",nextSecond:"Next Second",am:"am",pm:"pm",dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",searchMessage:"{0} results are available",selectionMessage:"{0} items selected",emptySelectionMessage:"No selected item",emptySearchMessage:"No results found",emptyFilterMessage:"No results found",aria:{trueLabel:"True",falseLabel:"False",nullLabel:"Not Selected",star:"1 star",stars:"{star} stars",selectAll:"All items selected",unselectAll:"All items unselected",close:"Close",previous:"Previous",next:"Next",navigation:"Navigation",scrollTop:"Scroll Top",moveTop:"Move Top",moveUp:"Move Up",moveDown:"Move Down",moveBottom:"Move Bottom",moveToTarget:"Move to Target",moveToSource:"Move to Source",moveAllToTarget:"Move All to Target",moveAllToSource:"Move All to Source",pageLabel:"{page}",firstPageLabel:"First Page",lastPageLabel:"Last Page",nextPageLabel:"Next Page",prevPageLabel:"Previous Page",rowsPerPageLabel:"Rows per page",previousPageLabel:"Previous Page",jumpToPageDropdownLabel:"Jump to Page Dropdown",jumpToPageInputLabel:"Jump to Page Input",selectRow:"Row Selected",unselectRow:"Row Unselected",expandRow:"Row Expanded",collapseRow:"Row Collapsed",showFilterMenu:"Show Filter Menu",hideFilterMenu:"Hide Filter Menu",filterOperator:"Filter Operator",filterConstraint:"Filter Constraint",editRow:"Row Edit",saveEdit:"Save Edit",cancelEdit:"Cancel Edit",listView:"List View",gridView:"Grid View",slide:"Slide",slideNumber:"{slideNumber}",zoomImage:"Zoom Image",zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateRight:"Rotate Right",rotateLeft:"Rotate Left",listLabel:"Option List",selectColor:"Select a color",removeLabel:"Remove",browseFiles:"Browse Files",maximizeLabel:"Maximize"}};zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100};translationSource=new pe;translationObserver=this.translationSource.asObservable();getTranslation(t){return this.translation[t]}setTranslation(t){this.translation=I(I({},this.translation),t),this.translationSource.next(this.translation)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Ra=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=F({type:n,selectors:[["p-header"]],standalone:!0,features:[ue],ngContentSelectors:g3,decls:1,vars:0,template:function(i,r){i&1&&(ln(),Vt(0))},encapsulation:2})}return n})(),Fa=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275cmp=F({type:n,selectors:[["p-footer"]],standalone:!0,features:[ue],ngContentSelectors:g3,decls:1,vars:0,template:function(i,r){i&1&&(ln(),Vt(0))},encapsulation:2})}return n})(),qe=(()=>{class n{template;type;name;constructor(t){this.template=t}getType(){return this.name}static \u0275fac=function(i){return new(i||n)(k(pr))};static \u0275dir=gt({type:n,selectors:[["","pTemplate",""]],inputs:{type:"type",name:[0,"pTemplate","name"]},standalone:!0})}return n})(),Ge=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({})}return n})(),si=(()=>{class n{static STARTS_WITH="startsWith";static CONTAINS="contains";static NOT_CONTAINS="notContains";static ENDS_WITH="endsWith";static EQUALS="equals";static NOT_EQUALS="notEquals";static NO_FILTER="noFilter";static LT="lt";static LTE="lte";static GT="gt";static GTE="gte";static IS="is";static IS_NOT="isNot";static BEFORE="before";static AFTER="after";static CLEAR="clear";static APPLY="apply";static MATCH_ALL="matchAll";static MATCH_ANY="matchAny";static ADD_RULE="addRule";static REMOVE_RULE="removeRule";static ACCEPT="accept";static REJECT="reject";static CHOOSE="choose";static UPLOAD="upload";static CANCEL="cancel";static PENDING="pending";static FILE_SIZE_TYPES="fileSizeTypes";static DAY_NAMES="dayNames";static DAY_NAMES_SHORT="dayNamesShort";static DAY_NAMES_MIN="dayNamesMin";static MONTH_NAMES="monthNames";static MONTH_NAMES_SHORT="monthNamesShort";static FIRST_DAY_OF_WEEK="firstDayOfWeek";static TODAY="today";static WEEK_HEADER="weekHeader";static WEAK="weak";static MEDIUM="medium";static STRONG="strong";static PASSWORD_PROMPT="passwordPrompt";static EMPTY_MESSAGE="emptyMessage";static EMPTY_FILTER_MESSAGE="emptyFilterMessage";static SHOW_FILTER_MENU="showFilterMenu";static HIDE_FILTER_MENU="hideFilterMenu";static SELECTION_MESSAGE="selectionMessage";static ARIA="aria";static SELECT_COLOR="selectColor";static BROWSE_FILES="browseFiles"}return n})();var A=(()=>{class n{static zindex=1e3;static calculatedScrollbarWidth=null;static calculatedScrollbarHeight=null;static browser;static addClass(t,i){t&&i&&(t.classList?t.classList.add(i):t.className+=" "+i)}static addMultipleClasses(t,i){if(t&&i)if(t.classList){let r=i.trim().split(" ");for(let o=0;or.split(" ").forEach(o=>this.removeClass(t,o)))}static hasClass(t,i){return t&&i?t.classList?t.classList.contains(i):new RegExp("(^| )"+i+"( |$)","gi").test(t.className):!1}static siblings(t){return Array.prototype.filter.call(t.parentNode.children,function(i){return i!==t})}static find(t,i){return Array.from(t.querySelectorAll(i))}static findSingle(t,i){return this.isElement(t)?t.querySelector(i):null}static index(t){let i=t.parentNode.childNodes,r=0;for(var o=0;o{if(S)return getComputedStyle(S).getPropertyValue("position")==="relative"?S:o(S.parentElement)},s=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),a=i.offsetHeight??i.getBoundingClientRect().height,l=i.getBoundingClientRect(),c=this.getWindowScrollTop(),u=this.getWindowScrollLeft(),d=this.getViewport(),h=o(t)?.getBoundingClientRect()||{top:-1*c,left:-1*u},g,_;l.top+a+s.height>d.height?(g=l.top-h.top-s.height,t.style.transformOrigin="bottom",l.top+g<0&&(g=-1*l.top)):(g=a+l.top-h.top,t.style.transformOrigin="top");let v=l.left+s.width-d.width,w=l.left-h.left;s.width>d.width?_=(l.left-h.left)*-1:v>0?_=w-v:_=l.left-h.left,t.style.top=g+"px",t.style.left=_+"px",r&&(t.style.marginTop=origin==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}static absolutePosition(t,i,r=!0){let o=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:this.getHiddenElementDimensions(t),s=o.height,a=o.width,l=i.offsetHeight??i.getBoundingClientRect().height,c=i.offsetWidth??i.getBoundingClientRect().width,u=i.getBoundingClientRect(),d=this.getWindowScrollTop(),p=this.getWindowScrollLeft(),h=this.getViewport(),g,_;u.top+l+s>h.height?(g=u.top+d-s,t.style.transformOrigin="bottom",g<0&&(g=d)):(g=l+u.top+d,t.style.transformOrigin="top"),u.left+a>h.width?_=Math.max(0,u.left+p+c-a):_=u.left+p,t.style.top=g+"px",t.style.left=_+"px",r&&(t.style.marginTop=origin==="bottom"?"calc(var(--p-anchor-gutter) * -1)":"calc(var(--p-anchor-gutter))")}static getParents(t,i=[]){return t.parentNode===null?i:this.getParents(t.parentNode,i.concat([t.parentNode]))}static getScrollableParents(t){let i=[];if(t){let r=this.getParents(t),o=/(auto|scroll)/,s=a=>{let l=window.getComputedStyle(a,null);return o.test(l.getPropertyValue("overflow"))||o.test(l.getPropertyValue("overflowX"))||o.test(l.getPropertyValue("overflowY"))};for(let a of r){let l=a.nodeType===1&&a.dataset.scrollselectors;if(l){let c=l.split(",");for(let u of c){let d=this.findSingle(a,u);d&&s(d)&&i.push(d)}}a.nodeType!==9&&s(a)&&i.push(a)}}return i}static getHiddenElementOuterHeight(t){t.style.visibility="hidden",t.style.display="block";let i=t.offsetHeight;return t.style.display="none",t.style.visibility="visible",i}static getHiddenElementOuterWidth(t){t.style.visibility="hidden",t.style.display="block";let i=t.offsetWidth;return t.style.display="none",t.style.visibility="visible",i}static getHiddenElementDimensions(t){let i={};return t.style.visibility="hidden",t.style.display="block",i.width=t.offsetWidth,i.height=t.offsetHeight,t.style.display="none",t.style.visibility="visible",i}static scrollInView(t,i){let r=getComputedStyle(t).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,s=getComputedStyle(t).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=t.getBoundingClientRect(),u=i.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=t.scrollTop,p=t.clientHeight,h=this.getOuterHeight(i);u<0?t.scrollTop=d+u:u+h>p&&(t.scrollTop=d+u-p+h)}static fadeIn(t,i){t.style.opacity=0;let r=+new Date,o=0,s=function(){o=+t.style.opacity.replace(",",".")+(new Date().getTime()-r)/i,t.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(t,i){var r=1,o=50,s=i,a=o/s;let l=setInterval(()=>{r=r-a,r<=0&&(r=0,clearInterval(l)),t.style.opacity=r},o)}static getWindowScrollTop(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}static getWindowScrollLeft(){let t=document.documentElement;return(window.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}static matches(t,i){var r=Element.prototype,o=r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(s){return[].indexOf.call(document.querySelectorAll(s),this)!==-1};return o.call(t,i)}static getOuterWidth(t,i){let r=t.offsetWidth;if(i){let o=getComputedStyle(t);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(t){let i=getComputedStyle(t);return parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}static getHorizontalMargin(t){let i=getComputedStyle(t);return parseFloat(i.marginLeft)+parseFloat(i.marginRight)}static innerWidth(t){let i=t.offsetWidth,r=getComputedStyle(t);return i+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static width(t){let i=t.offsetWidth,r=getComputedStyle(t);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static getInnerHeight(t){let i=t.offsetHeight,r=getComputedStyle(t);return i+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),i}static getOuterHeight(t,i){let r=t.offsetHeight;if(i){let o=getComputedStyle(t);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(t){let i=t.offsetHeight,r=getComputedStyle(t);return i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),i}static getWidth(t){let i=t.offsetWidth,r=getComputedStyle(t);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),i}static getViewport(){let t=window,i=document,r=i.documentElement,o=i.getElementsByTagName("body")[0],s=t.innerWidth||r.clientWidth||o.clientWidth,a=t.innerHeight||r.clientHeight||o.clientHeight;return{width:s,height:a}}static getOffset(t){var i=t.getBoundingClientRect();return{top:i.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:i.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(t,i){let r=t.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(i,t)}static getUserAgent(){if(navigator&&this.isClient())return navigator.userAgent}static isIE(){var t=window.navigator.userAgent,i=t.indexOf("MSIE ");if(i>0)return!0;var r=t.indexOf("Trident/");if(r>0){var o=t.indexOf("rv:");return!0}var s=t.indexOf("Edge/");return s>0}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(t,i){if(this.isElement(i))i.appendChild(t);else if(i&&i.el&&i.el.nativeElement)i.el.nativeElement.appendChild(t);else throw"Cannot append "+i+" to "+t}static removeChild(t,i){if(this.isElement(i))i.removeChild(t);else if(i.el&&i.el.nativeElement)i.el.nativeElement.removeChild(t);else throw"Cannot remove "+t+" from "+i}static removeElement(t){"remove"in Element.prototype?t.remove():t.parentNode.removeChild(t)}static isElement(t){return typeof HTMLElement=="object"?t instanceof HTMLElement:t&&typeof t=="object"&&t!==null&&t.nodeType===1&&typeof t.nodeName=="string"}static calculateScrollbarWidth(t){if(t){let i=getComputedStyle(t);return t.offsetWidth-t.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}else{if(this.calculatedScrollbarWidth!==null)return this.calculatedScrollbarWidth;let i=document.createElement("div");i.className="p-scrollbar-measure",document.body.appendChild(i);let r=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),this.calculatedScrollbarWidth=r,r}}static calculateScrollbarHeight(){if(this.calculatedScrollbarHeight!==null)return this.calculatedScrollbarHeight;let t=document.createElement("div");t.className="p-scrollbar-measure",document.body.appendChild(t);let i=t.offsetHeight-t.clientHeight;return document.body.removeChild(t),this.calculatedScrollbarWidth=i,i}static invokeElementMethod(t,i,r){t[i].apply(t,r)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let t=this.resolveUserAgent();this.browser={},t.browser&&(this.browser[t.browser]=!0,this.browser.version=t.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:i[1]||"",version:i[2]||"0"}}static isInteger(t){return Number.isInteger?Number.isInteger(t):typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}static isHidden(t){return!t||t.offsetParent===null}static isVisible(t){return t&&t.offsetParent!=null}static isExist(t){return t!==null&&typeof t<"u"&&t.nodeName&&t.parentNode}static focus(t,i){t&&document.activeElement!==t&&t.focus(i)}static getFocusableSelectorString(t=""){return`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, + [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, + input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, + select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, + textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, + [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, + [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, + .p-inputtext:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}, + .p-button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`}static getFocusableElements(t,i=""){let r=this.find(t,this.getFocusableSelectorString(i)),o=[];for(let s of r){let a=getComputedStyle(s);this.isVisible(s)&&a.display!="none"&&a.visibility!="hidden"&&o.push(s)}return o}static getFocusableElement(t,i=""){let r=this.findSingle(t,this.getFocusableSelectorString(i));if(r){let o=getComputedStyle(r);if(this.isVisible(r)&&o.display!="none"&&o.visibility!="hidden")return r}return null}static getFirstFocusableElement(t,i=""){let r=this.getFocusableElements(t,i);return r.length>0?r[0]:null}static getLastFocusableElement(t,i){let r=this.getFocusableElements(t,i);return r.length>0?r[r.length-1]:null}static getNextFocusableElement(t,i=!1){let r=n.getFocusableElements(t),o=0;if(r&&r.length>0){let s=r.indexOf(r[0].ownerDocument.activeElement);i?s==-1||s===0?o=r.length-1:o=s-1:s!=-1&&s!==r.length-1&&(o=s+1)}return r[o]}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}static getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null}static getTargetElement(t,i){if(!t)return null;switch(t){case"document":return document;case"window":return window;case"@next":return i?.nextElementSibling;case"@prev":return i?.previousElementSibling;case"@parent":return i?.parentElement;case"@grandparent":return i?.parentElement.parentElement;default:let r=typeof t;if(r==="string")return document.querySelector(t);if(r==="object"&&t.hasOwnProperty("nativeElement"))return this.isExist(t.nativeElement)?t.nativeElement:void 0;let s=(a=>!!(a&&a.constructor&&a.call&&a.apply))(t)?t():t;return s&&s.nodeType===9||this.isExist(s)?s:null}}static isClient(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}static getAttribute(t,i){if(t){let r=t.getAttribute(i);return isNaN(r)?r==="true"||r==="false"?r==="true":r:+r}}static calculateBodyScrollbarWidth(){return window.innerWidth-document.documentElement.offsetWidth}static blockBodyScroll(t="p-overflow-hidden"){document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,t)}static unblockBodyScroll(t="p-overflow-hidden"){document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,t)}static createElement(t,i={},...r){if(t){let o=document.createElement(t);return this.setAttributes(o,i),o.append(...r),o}}static setAttribute(t,i="",r){this.isElement(t)&&r!==null&&r!==void 0&&t.setAttribute(i,r)}static setAttributes(t,i={}){if(this.isElement(t)){let r=(o,s)=>{let a=t?.$attrs?.[o]?[t?.$attrs?.[o]]:[];return[s].flat().reduce((l,c)=>{if(c!=null){let u=typeof c;if(u==="string"||u==="number")l.push(c);else if(u==="object"){let d=Array.isArray(c)?r(o,c):Object.entries(c).map(([p,h])=>o==="style"&&(h||h===0)?`${p.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${h}`:h?p:void 0);l=d.length?l.concat(d.filter(p=>!!p)):l}}return l},a)};Object.entries(i).forEach(([o,s])=>{if(s!=null){let a=o.match(/^on(.+)/);a?t.addEventListener(a[1].toLowerCase(),s):o==="pBind"?this.setAttributes(t,s):(s=o==="class"?[...new Set(r("class",s))].join(" ").trim():o==="style"?r("style",s).join(";").trim():s,(t.$attrs=t.$attrs||{})&&(t.$attrs[o]=s),t.setAttribute(o,s))}})}}static isFocusableElement(t,i=""){return this.isElement(t)?t.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, + [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, + input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, + select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, + textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, + [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}, + [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${i}`):!1}}return n})(),Ru=class{element;listener;scrollableParents;constructor(e,t=()=>{}){this.element=e,this.listener=t}bindScrollListener(){this.scrollableParents=A.getScrollableParents(this.element);for(let e=0;e{class n{document;platformId;renderer;el;zone;config;constructor(t,i,r,o,s,a){this.document=t,this.platformId=i,this.renderer=r,this.el=o,this.zone=s,this.config=a}animationListener;mouseDownListener;timeout;ngAfterViewInit(){Dt(this.platformId)&&this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.renderer.listen(this.el.nativeElement,"mousedown",this.onMouseDown.bind(this))})}onMouseDown(t){let i=this.getInk();if(!i||this.document.defaultView?.getComputedStyle(i,null).display==="none")return;if(A.removeClass(i,"p-ink-active"),!A.getHeight(i)&&!A.getWidth(i)){let a=Math.max(A.getOuterWidth(this.el.nativeElement),A.getOuterHeight(this.el.nativeElement));i.style.height=a+"px",i.style.width=a+"px"}let r=A.getOffset(this.el.nativeElement),o=t.pageX-r.left+this.document.body.scrollTop-A.getWidth(i)/2,s=t.pageY-r.top+this.document.body.scrollLeft-A.getHeight(i)/2;this.renderer.setStyle(i,"top",s+"px"),this.renderer.setStyle(i,"left",o+"px"),A.addClass(i,"p-ink-active"),this.timeout=setTimeout(()=>{let a=this.getInk();a&&A.removeClass(a,"p-ink-active")},401)}getInk(){let t=this.el.nativeElement.children;for(let i=0;i{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({})}return n})();var YG=["*"],Ue=(()=>{class n{label;spin=!1;styleClass;role;ariaLabel;ariaHidden;ngOnInit(){this.getAttributes()}getAttributes(){let t=Ee.isEmpty(this.label);this.role=t?void 0:"img",this.ariaLabel=t?void 0:this.label,this.ariaHidden=t}getClassNames(){return`p-icon ${this.styleClass?this.styleClass+" ":""}${this.spin?"p-icon-spin":""}`}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=F({type:n,selectors:[["ng-component"]],hostAttrs:[1,"p-element","p-icon-wrapper"],inputs:{label:"label",spin:[2,"spin","spin",V],styleClass:"styleClass"},standalone:!0,features:[$e,ue],ngContentSelectors:YG,decls:1,vars:0,template:function(i,r){i&1&&(ln(),Vt(0))},encapsulation:2,changeDetection:0})}return n})();var Va=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["SearchIcon"]],standalone:!0,features:[xe,ue],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67602 11.0265C3.6661 11.688 4.83011 12.0411 6.02086 12.0411C6.81149 12.0411 7.59438 11.8854 8.32483 11.5828C8.87005 11.357 9.37808 11.0526 9.83317 10.6803L12.9769 13.8241C13.0323 13.8801 13.0983 13.9245 13.171 13.9548C13.2438 13.985 13.3219 14.0003 13.4007 14C13.4795 14.0003 13.5575 13.985 13.6303 13.9548C13.7031 13.9245 13.7691 13.8801 13.8244 13.8241C13.9367 13.7116 13.9998 13.5592 13.9998 13.4003C13.9998 13.2414 13.9367 13.089 13.8244 12.9765L10.6807 9.8328C11.053 9.37773 11.3573 8.86972 11.5831 8.32452C11.8857 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0268 2.67572C10.3652 1.68564 9.42494 0.913972 8.32483 0.45829C7.22472 0.00260857 6.01418 -0.116618 4.84631 0.115686C3.67844 0.34799 2.60568 0.921393 1.76369 1.76338C0.921698 2.60537 0.348296 3.67813 0.115991 4.84601C-0.116313 6.01388 0.00291375 7.22441 0.458595 8.32452C0.914277 9.42464 1.68595 10.3649 2.67602 11.0265ZM3.35565 2.0158C4.14456 1.48867 5.07206 1.20731 6.02086 1.20731C7.29317 1.20731 8.51338 1.71274 9.41304 2.6124C10.3127 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5368 7.88088 10.0096 8.66978C9.48251 9.45868 8.73328 10.0736 7.85669 10.4367C6.98011 10.7997 6.01554 10.8947 5.08496 10.7096C4.15439 10.5245 3.2996 10.0676 2.62869 9.39674C1.95778 8.72583 1.50089 7.87104 1.31579 6.94046C1.13068 6.00989 1.22568 5.04532 1.58878 4.16874C1.95187 3.29215 2.56675 2.54292 3.35565 2.0158Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1),C(),b(3,"defs")(4,"clipPath",2),E(5,"rect",3),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(3),f("id",r.pathId))},encapsulation:2})}return n})();var Wi=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["CheckIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.86199 11.5948C4.78717 11.5923 4.71366 11.5745 4.64596 11.5426C4.57826 11.5107 4.51779 11.4652 4.46827 11.4091L0.753985 7.69483C0.683167 7.64891 0.623706 7.58751 0.580092 7.51525C0.536478 7.44299 0.509851 7.36177 0.502221 7.27771C0.49459 7.19366 0.506156 7.10897 0.536046 7.03004C0.565935 6.95111 0.613367 6.88 0.674759 6.82208C0.736151 6.76416 0.8099 6.72095 0.890436 6.69571C0.970973 6.67046 1.05619 6.66385 1.13966 6.67635C1.22313 6.68886 1.30266 6.72017 1.37226 6.76792C1.44186 6.81567 1.4997 6.8786 1.54141 6.95197L4.86199 10.2503L12.6397 2.49483C12.7444 2.42694 12.8689 2.39617 12.9932 2.40745C13.1174 2.41873 13.2343 2.47141 13.3251 2.55705C13.4159 2.64268 13.4753 2.75632 13.4938 2.87973C13.5123 3.00315 13.4888 3.1292 13.4271 3.23768L5.2557 11.4091C5.20618 11.4652 5.14571 11.5107 5.07801 11.5426C5.01031 11.5745 4.9368 11.5923 4.86199 11.5948Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var uh=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["SpinnerIcon"]],standalone:!0,features:[xe,ue],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1),C(),b(3,"defs")(4,"clipPath",2),E(5,"rect",3),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(3),f("id",r.pathId))},encapsulation:2})}return n})();var ZG=["element"],JG=["content"],XG=["*"],eq=(n,e,t)=>({"p-scroller":!0,"p-scroller-inline":n,"p-both-scroll":e,"p-horizontal-scroll":t}),GI=(n,e)=>({$implicit:n,options:e}),tq=n=>({"p-scroller-loading":n}),nq=n=>({"p-component-overlay":n}),iq=n=>({numCols:n}),v3=n=>({options:n}),rq=()=>({styleClass:"p-scroller-loading-icon"}),oq=(n,e)=>({rows:n,columns:e});function sq(n,e){n&1&&ye(0)}function aq(n,e){if(n&1&&(oe(0),x(1,sq,1,0,"ng-container",10),se()),n&2){let t=y(2);m(),f("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",_t(2,GI,t.loadedItems,t.getContentOptions()))}}function lq(n,e){n&1&&ye(0)}function cq(n,e){if(n&1&&(oe(0),x(1,lq,1,0,"ng-container",10),se()),n&2){let t=e.$implicit,i=e.index,r=y(3);m(),f("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",_t(2,GI,t,r.getOptions(i)))}}function uq(n,e){if(n&1&&(b(0,"div",11,3),x(2,cq,2,5,"ng-container",12),C()),n&2){let t=y(2);f("ngClass",_e(5,tq,t.d_loading))("ngStyle",t.contentStyle),O("data-pc-section","content"),m(2),f("ngForOf",t.loadedItems)("ngForTrackBy",t._trackBy||t.index)}}function dq(n,e){if(n&1&&E(0,"div",13),n&2){let t=y(2);f("ngStyle",t.spacerStyle),O("data-pc-section","spacer")}}function pq(n,e){n&1&&ye(0)}function hq(n,e){if(n&1&&(oe(0),x(1,pq,1,0,"ng-container",10),se()),n&2){let t=e.index,i=y(4);m(),f("ngTemplateOutlet",i.loaderTemplate)("ngTemplateOutletContext",_e(4,v3,i.getLoaderOptions(t,i.both&&_e(2,iq,i._numItemsInViewport.cols))))}}function fq(n,e){if(n&1&&(oe(0),x(1,hq,2,6,"ng-container",15),se()),n&2){let t=y(3);m(),f("ngForOf",t.loaderArr)}}function mq(n,e){n&1&&ye(0)}function gq(n,e){if(n&1&&(oe(0),x(1,mq,1,0,"ng-container",10),se()),n&2){let t=y(4);m(),f("ngTemplateOutlet",t.loaderIconTemplate)("ngTemplateOutletContext",_e(3,v3,St(2,rq)))}}function yq(n,e){n&1&&E(0,"SpinnerIcon",16),n&2&&(f("styleClass","p-scroller-loading-icon pi-spin"),O("data-pc-section","loadingIcon"))}function _q(n,e){if(n&1&&x(0,gq,2,5,"ng-container",6)(1,yq,1,2,"ng-template",null,5,Bt),n&2){let t=pt(2),i=y(3);f("ngIf",i.loaderIconTemplate)("ngIfElse",t)}}function vq(n,e){if(n&1&&(b(0,"div",14),x(1,fq,2,1,"ng-container",6)(2,_q,3,2,"ng-template",null,4,Bt),C()),n&2){let t=pt(3),i=y(2);f("ngClass",_e(4,nq,!i.loaderTemplate)),O("data-pc-section","loader"),m(),f("ngIf",i.loaderTemplate)("ngIfElse",t)}}function bq(n,e){if(n&1){let t=$();oe(0),b(1,"div",7,1),P("scroll",function(r){M(t);let o=y();return D(o.onContainerScroll(r))}),x(3,aq,2,5,"ng-container",6)(4,uq,3,7,"ng-template",null,2,Bt)(6,dq,1,2,"div",8)(7,vq,4,6,"div",9),C(),se()}if(n&2){let t=pt(5),i=y();m(),W(i._styleClass),f("ngStyle",i._style)("ngClass",Sn(12,eq,i.inline,i.both,i.horizontal)),O("id",i._id)("tabindex",i.tabindex)("data-pc-name","scroller")("data-pc-section","root"),m(2),f("ngIf",i.contentTemplate)("ngIfElse",t),m(3),f("ngIf",i._showSpacer),m(),f("ngIf",!i.loaderDisabled&&i._showLoader&&i.d_loading)}}function Cq(n,e){n&1&&ye(0)}function wq(n,e){if(n&1&&(oe(0),x(1,Cq,1,0,"ng-container",10),se()),n&2){let t=y(2);m(),f("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",_t(5,GI,t.items,_t(2,oq,t._items,t.loadedColumns)))}}function Iq(n,e){if(n&1&&(Vt(0),x(1,wq,2,8,"ng-container",17)),n&2){let t=y();m(),f("ngIf",t.contentTemplate)}}var Fu=(()=>{class n{document;platformId;renderer;cd;zone;get id(){return this._id}set id(t){this._id=t}get style(){return this._style}set style(t){this._style=t}get styleClass(){return this._styleClass}set styleClass(t){this._styleClass=t}get tabindex(){return this._tabindex}set tabindex(t){this._tabindex=t}get items(){return this._items}set items(t){this._items=t}get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=t}get scrollHeight(){return this._scrollHeight}set scrollHeight(t){this._scrollHeight=t}get scrollWidth(){return this._scrollWidth}set scrollWidth(t){this._scrollWidth=t}get orientation(){return this._orientation}set orientation(t){this._orientation=t}get step(){return this._step}set step(t){this._step=t}get delay(){return this._delay}set delay(t){this._delay=t}get resizeDelay(){return this._resizeDelay}set resizeDelay(t){this._resizeDelay=t}get appendOnly(){return this._appendOnly}set appendOnly(t){this._appendOnly=t}get inline(){return this._inline}set inline(t){this._inline=t}get lazy(){return this._lazy}set lazy(t){this._lazy=t}get disabled(){return this._disabled}set disabled(t){this._disabled=t}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(t){this._loaderDisabled=t}get columns(){return this._columns}set columns(t){this._columns=t}get showSpacer(){return this._showSpacer}set showSpacer(t){this._showSpacer=t}get showLoader(){return this._showLoader}set showLoader(t){this._showLoader=t}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(t){this._numToleratedItems=t}get loading(){return this._loading}set loading(t){this._loading=t}get autoSize(){return this._autoSize}set autoSize(t){this._autoSize=t}get trackBy(){return this._trackBy}set trackBy(t){this._trackBy=t}get options(){return this._options}set options(t){this._options=t,t&&typeof t=="object"&&Object.entries(t).forEach(([i,r])=>this[`_${i}`]!==r&&(this[`_${i}`]=r))}onLazyLoad=new j;onScroll=new j;onScrollIndexChange=new j;elementViewChild;contentViewChild;templates;_id;_style;_styleClass;_tabindex=0;_items;_itemSize=0;_scrollHeight;_scrollWidth;_orientation="vertical";_step=0;_delay=0;_resizeDelay=10;_appendOnly=!1;_inline=!1;_lazy=!1;_disabled=!1;_loaderDisabled=!1;_columns;_showSpacer=!0;_showLoader=!1;_numToleratedItems;_loading;_autoSize=!1;_trackBy;_options;d_loading=!1;d_numToleratedItems;contentEl;contentTemplate;itemTemplate;loaderTemplate;loaderIconTemplate;first=0;last=0;page=0;isRangeChanged=!1;numItemsInViewport=0;lastScrollPos=0;lazyLoadState={};loaderArr=[];spacerStyle={};contentStyle={};scrollTimeout;resizeTimeout;initialized=!1;resizeObserver;defaultWidth;defaultHeight;defaultContentWidth;defaultContentHeight;get vertical(){return this._orientation==="vertical"}get horizontal(){return this._orientation==="horizontal"}get both(){return this._orientation==="both"}get loadedItems(){return this._items&&!this.d_loading?this.both?this._items.slice(this._appendOnly?0:this.first.rows,this.last.rows).map(t=>this._columns?t:t.slice(this._appendOnly?0:this.first.cols,this.last.cols)):this.horizontal&&this._columns?this._items:this._items.slice(this._appendOnly?0:this.first,this.last):[]}get loadedRows(){return this.d_loading?this._loaderDisabled?this.loaderArr:[]:this.loadedItems}get loadedColumns(){return this._columns&&(this.both||this.horizontal)?this.d_loading&&this._loaderDisabled?this.both?this.loaderArr[0]:this.loaderArr:this._columns.slice(this.both?this.first.cols:this.first,this.both?this.last.cols:this.last):this._columns}constructor(t,i,r,o,s){this.document=t,this.platformId=i,this.renderer=r,this.cd=o,this.zone=s}ngOnInit(){this.setInitialState()}ngOnChanges(t){let i=!1;if(t.loading){let{previousValue:r,currentValue:o}=t.loading;this.lazy&&r!==o&&o!==this.d_loading&&(this.d_loading=o,i=!0)}if(t.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),t.numToleratedItems){let{previousValue:r,currentValue:o}=t.numToleratedItems;r!==o&&o!==this.d_numToleratedItems&&(this.d_numToleratedItems=o)}if(t.options){let{previousValue:r,currentValue:o}=t.options;this.lazy&&r?.loading!==o?.loading&&o?.loading!==this.d_loading&&(this.d_loading=o.loading,i=!0),r?.numToleratedItems!==o?.numToleratedItems&&o?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=o.numToleratedItems)}this.initialized&&!i&&(t.items?.previousValue?.length!==t.items?.currentValue?.length||t.itemSize||t.scrollHeight||t.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"content":this.contentTemplate=t.template;break;case"item":this.itemTemplate=t.template;break;case"loader":this.loaderTemplate=t.template;break;case"loadericon":this.loaderIconTemplate=t.template;break;default:this.itemTemplate=t.template;break}})}ngAfterViewInit(){Promise.resolve().then(()=>{this.viewInit()})}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1}viewInit(){Dt(this.platformId)&&!this.initialized&&A.isVisible(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.calculateAutoSize(),this.defaultWidth=A.getWidth(this.elementViewChild?.nativeElement),this.defaultHeight=A.getHeight(this.elementViewChild?.nativeElement),this.defaultContentWidth=A.getWidth(this.contentEl),this.defaultContentHeight=A.getHeight(this.contentEl),this.resizeObserver=new ResizeObserver(()=>this.onResize()),this.resizeObserver.observe(this.elementViewChild?.nativeElement),this.initialized=!0)}init(){this._disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize(),this.cd.detectChanges())}setContentEl(t){this.contentEl=t||this.contentViewChild?.nativeElement||A.findSingle(this.elementViewChild?.nativeElement,".p-scroller-content")}setInitialState(){this.first=this.both?{rows:0,cols:0}:0,this.last=this.both?{rows:0,cols:0}:0,this.numItemsInViewport=this.both?{rows:0,cols:0}:0,this.lastScrollPos=this.both?{top:0,left:0}:0,this.d_loading=this._loading||!1,this.d_numToleratedItems=this._numToleratedItems,this.loaderArr=[],this.spacerStyle={},this.contentStyle={}}getElementRef(){return this.elementViewChild}getPageByFirst(t){return Math.floor(((t??this.first)+this.d_numToleratedItems*4)/(this._step||1))}isPageChanged(t){return this._step?this.page!==this.getPageByFirst(t??this.first):!0}scrollTo(t){this.elementViewChild?.nativeElement?.scrollTo(t)}scrollToIndex(t,i="auto"){if(this.both?t.every(o=>o>-1):t>-1){let o=this.first,{scrollTop:s=0,scrollLeft:a=0}=this.elementViewChild?.nativeElement,{numToleratedItems:l}=this.calculateNumItems(),c=this.getContentPosition(),u=this.itemSize,d=(w=0,S)=>w<=S?0:w,p=(w,S,L)=>w*S+L,h=(w=0,S=0)=>this.scrollTo({left:w,top:S,behavior:i}),g=this.both?{rows:0,cols:0}:0,_=!1,v=!1;this.both?(g={rows:d(t[0],l[0]),cols:d(t[1],l[1])},h(p(g.cols,u[1],c.left),p(g.rows,u[0],c.top)),v=this.lastScrollPos.top!==s||this.lastScrollPos.left!==a,_=g.rows!==o.rows||g.cols!==o.cols):(g=d(t,l),this.horizontal?h(p(g,u,c.left),s):h(a,p(g,u,c.top)),v=this.lastScrollPos!==(this.horizontal?a:s),_=g!==o),this.isRangeChanged=_,v&&(this.first=g)}}scrollInView(t,i,r="auto"){if(i){let{first:o,viewport:s}=this.getRenderedRange(),a=(u=0,d=0)=>this.scrollTo({left:u,top:d,behavior:r}),l=i==="to-start",c=i==="to-end";if(l){if(this.both)s.first.rows-o.rows>t[0]?a(s.first.cols*this._itemSize[1],(s.first.rows-1)*this._itemSize[0]):s.first.cols-o.cols>t[1]&&a((s.first.cols-1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.first-o>t){let u=(s.first-1)*this._itemSize;this.horizontal?a(u,0):a(0,u)}}else if(c){if(this.both)s.last.rows-o.rows<=t[0]+1?a(s.first.cols*this._itemSize[1],(s.first.rows+1)*this._itemSize[0]):s.last.cols-o.cols<=t[1]+1&&a((s.first.cols+1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.last-o<=t+1){let u=(s.first+1)*this._itemSize;this.horizontal?a(u,0):a(0,u)}}}else this.scrollToIndex(t,r)}getRenderedRange(){let t=(o,s)=>s||o?Math.floor(o/(s||o)):0,i=this.first,r=0;if(this.elementViewChild?.nativeElement){let{scrollTop:o,scrollLeft:s}=this.elementViewChild.nativeElement;if(this.both)i={rows:t(o,this._itemSize[0]),cols:t(s,this._itemSize[1])},r={rows:i.rows+this.numItemsInViewport.rows,cols:i.cols+this.numItemsInViewport.cols};else{let a=this.horizontal?s:o;i=t(a,this._itemSize),r=i+this.numItemsInViewport}}return{first:this.first,last:this.last,viewport:{first:i,last:r}}}calculateNumItems(){let t=this.getContentPosition(),i=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-t.left:0)||0,r=(this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-t.top:0)||0,o=(c,u)=>u||c?Math.ceil(c/(u||c)):0,s=c=>Math.ceil(c/2),a=this.both?{rows:o(r,this._itemSize[0]),cols:o(i,this._itemSize[1])}:o(this.horizontal?i:r,this._itemSize),l=this.d_numToleratedItems||(this.both?[s(a.rows),s(a.cols)]:s(a));return{numItemsInViewport:a,numToleratedItems:l}}calculateOptions(){let{numItemsInViewport:t,numToleratedItems:i}=this.calculateNumItems(),r=(a,l,c,u=!1)=>this.getLast(a+l+(aArray.from({length:t.cols})):Array.from({length:t})),this._lazy&&Promise.resolve().then(()=>{this.lazyLoadState={first:this._step?this.both?{rows:0,cols:o.cols}:0:o,last:Math.min(this._step?this._step:this.last,this.items.length)},this.handleEvents("onLazyLoad",this.lazyLoadState)})}calculateAutoSize(){this._autoSize&&!this.d_loading&&Promise.resolve().then(()=>{if(this.contentEl){this.contentEl.style.minHeight=this.contentEl.style.minWidth="auto",this.contentEl.style.position="relative",this.elementViewChild.nativeElement.style.contain="none";let[t,i]=[A.getWidth(this.contentEl),A.getHeight(this.contentEl)];t!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),i!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");let[r,o]=[A.getWidth(this.elementViewChild.nativeElement),A.getHeight(this.elementViewChild.nativeElement)];(this.both||this.horizontal)&&(this.elementViewChild.nativeElement.style.width=rthis.elementViewChild.nativeElement.style[s]=a;this.both||this.horizontal?(o("height",r),o("width",i)):o("height",r)}}setSpacerSize(){if(this._items){let t=(r,o,s)=>this.spacerStyle=R(I({},this.spacerStyle),{[`${r}`]:o*s+"px"}),i=this._items.length;this.both?(t("height",i,this._itemSize[0]),t("width",this._columns?.length||this._items[1]?.length,this._itemSize[1])):this.horizontal?t("width",this._columns.length||this._items.length,this._itemSize):t("height",i,this._itemSize)}}setContentPosition(t){if(this.contentEl&&!this._appendOnly){let i=t?t.first:this.first,r=(s,a)=>s*a,o=(s=0,a=0)=>this.contentStyle=R(I({},this.contentStyle),{transform:`translate3d(${s}px, ${a}px, 0)`});if(this.both)o(r(i.cols,this._itemSize[1]),r(i.rows,this._itemSize[0]));else{let s=r(i,this._itemSize);this.horizontal?o(s,0):o(0,s)}}}onScrollPositionChange(t){let i=t.target,r=this.getContentPosition(),o=(v,w)=>v?v>w?v-w:v:0,s=(v,w)=>w||v?Math.floor(v/(w||v)):0,a=(v,w,S,L,T,q)=>v<=T?T:q?S-L-T:w+T-1,l=(v,w,S,L,T,q,N)=>v<=q?0:Math.max(0,N?vw?S:v-2*q),c=(v,w,S,L,T,q=!1)=>{let N=w+L+2*T;return v>=T&&(N+=T+1),this.getLast(N,q)},u=o(i.scrollTop,r.top),d=o(i.scrollLeft,r.left),p=this.both?{rows:0,cols:0}:0,h=this.last,g=!1,_=this.lastScrollPos;if(this.both){let v=this.lastScrollPos.top<=u,w=this.lastScrollPos.left<=d;if(!this._appendOnly||this._appendOnly&&(v||w)){let S={rows:s(u,this._itemSize[0]),cols:s(d,this._itemSize[1])},L={rows:a(S.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],v),cols:a(S.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],w)};p={rows:l(S.rows,L.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],v),cols:l(S.cols,L.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],w)},h={rows:c(S.rows,p.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(S.cols,p.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},g=p.rows!==this.first.rows||h.rows!==this.last.rows||p.cols!==this.first.cols||h.cols!==this.last.cols||this.isRangeChanged,_={top:u,left:d}}}else{let v=this.horizontal?d:u,w=this.lastScrollPos<=v;if(!this._appendOnly||this._appendOnly&&w){let S=s(v,this._itemSize),L=a(S,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,w);p=l(S,L,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,w),h=c(S,p,this.last,this.numItemsInViewport,this.d_numToleratedItems),g=p!==this.first||h!==this.last||this.isRangeChanged,_=v}}return{first:p,last:h,isRangeChanged:g,scrollPos:_}}onScrollChange(t){let{first:i,last:r,isRangeChanged:o,scrollPos:s}=this.onScrollPositionChange(t);if(o){let a={first:i,last:r};if(this.setContentPosition(a),this.first=i,this.last=r,this.lastScrollPos=s,this.handleEvents("onScrollIndexChange",a),this._lazy&&this.isPageChanged(i)){let l={first:this._step?Math.min(this.getPageByFirst(i)*this._step,this.items.length-this._step):i,last:Math.min(this._step?(this.getPageByFirst(i)+1)*this._step:r,this.items.length)};(this.lazyLoadState.first!==l.first||this.lazyLoadState.last!==l.last)&&this.handleEvents("onLazyLoad",l),this.lazyLoadState=l}}}onContainerScroll(t){if(this.handleEvents("onScroll",{originalEvent:t}),this._delay&&this.isPageChanged()){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){let{isRangeChanged:i}=this.onScrollPositionChange(t);(i||(this._step?this.isPageChanged():!1))&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(t),this.d_loading&&this.showLoader&&(!this._lazy||this._loading===void 0)&&(this.d_loading=!1,this.page=this.getPageByFirst(),this.cd.detectChanges())},this._delay)}else!this.d_loading&&this.onScrollChange(t)}unbindResizeListener(){this.resizeObserver&&(this.resizeObserver.unobserve(this.elementViewChild?.nativeElement),this.resizeObserver=null)}onResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(A.isVisible(this.elementViewChild?.nativeElement)){let[t,i]=[A.getWidth(this.elementViewChild?.nativeElement),A.getHeight(this.elementViewChild?.nativeElement)],[r,o]=[t!==this.defaultWidth,i!==this.defaultHeight];(this.both?r||o:this.horizontal?r:this.vertical?o:!1)&&this.zone.run(()=>{this.d_numToleratedItems=this._numToleratedItems,this.defaultWidth=t,this.defaultHeight=i,this.defaultContentWidth=A.getWidth(this.contentEl),this.defaultContentHeight=A.getHeight(this.contentEl),this.init(),this.calculateAutoSize()})}},this._resizeDelay)}handleEvents(t,i){return this.options&&this.options[t]?this.options[t](i):this[t].emit(i)}getContentOptions(){return{contentStyleClass:`p-scroller-content ${this.d_loading?"p-scroller-loading":""}`,items:this.loadedItems,getItemOptions:t=>this.getOptions(t),loading:this.d_loading,getLoaderOptions:(t,i)=>this.getLoaderOptions(t,i),itemSize:this._itemSize,rows:this.loadedRows,columns:this.loadedColumns,spacerStyle:this.spacerStyle,contentStyle:this.contentStyle,vertical:this.vertical,horizontal:this.horizontal,both:this.both}}getOptions(t){let i=(this._items||[]).length,r=this.both?this.first.rows+t:this.first+t;return{index:r,count:i,first:r===0,last:r===i-1,even:r%2===0,odd:r%2!==0}}getLoaderOptions(t,i){let r=this.loaderArr.length;return I({index:t,count:r,first:t===0,last:t===r-1,even:t%2===0,odd:t%2!==0},i)}static \u0275fac=function(i){return new(i||n)(k(We),k(Nt),k(At),k(De),k(He))};static \u0275cmp=F({type:n,selectors:[["p-scroller"]],contentQueries:function(i,r,o){if(i&1&&Je(o,qe,4),i&2){let s;J(s=X())&&(r.templates=s)}},viewQuery:function(i,r){if(i&1&&(fe(ZG,5),fe(JG,5)),i&2){let o;J(o=X())&&(r.elementViewChild=o.first),J(o=X())&&(r.contentViewChild=o.first)}},hostAttrs:[1,"p-scroller-viewport","p-element"],inputs:{id:"id",style:"style",styleClass:"styleClass",tabindex:"tabindex",items:"items",itemSize:"itemSize",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",orientation:"orientation",step:"step",delay:"delay",resizeDelay:"resizeDelay",appendOnly:"appendOnly",inline:"inline",lazy:"lazy",disabled:"disabled",loaderDisabled:"loaderDisabled",columns:"columns",showSpacer:"showSpacer",showLoader:"showLoader",numToleratedItems:"numToleratedItems",loading:"loading",autoSize:"autoSize",trackBy:"trackBy",options:"options"},outputs:{onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange"},features:[Jt],ngContentSelectors:XG,decls:3,vars:2,consts:[["disabledContainer",""],["element",""],["buildInContent",""],["content",""],["buildInLoader",""],["buildInLoaderIcon",""],[4,"ngIf","ngIfElse"],[3,"scroll","ngStyle","ngClass"],["class","p-scroller-spacer",3,"ngStyle",4,"ngIf"],["class","p-scroller-loader",3,"ngClass",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-scroller-content",3,"ngClass","ngStyle"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"p-scroller-spacer",3,"ngStyle"],[1,"p-scroller-loader",3,"ngClass"],[4,"ngFor","ngForOf"],[3,"styleClass"],[4,"ngIf"]],template:function(i,r){if(i&1&&(ln(),x(0,bq,8,16,"ng-container",6)(1,Iq,2,1,"ng-template",null,0,Bt)),i&2){let o=pt(2);f("ngIf",!r._disabled)("ngIfElse",o)}},dependencies:()=>[Ye,Ui,ot,Mt,st,uh],styles:[`@layer primeng{p-scroller{flex:1;outline:0 none}.p-scroller{position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;outline:0 none}.p-scroller-content{position:absolute;top:0;left:0;min-height:100%;min-width:100%;will-change:transform}.p-scroller-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0;pointer-events:none}.p-scroller-loader{position:sticky;top:0;left:0;width:100%;height:100%}.p-scroller-loader.p-component-overlay{display:flex;align-items:center;justify-content:center}.p-scroller-loading-icon{scale:2}.p-scroller-inline .p-scroller-content{position:static}} +`],encapsulation:2})}return n})(),mo=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Ge,uh,Ge]})}return n})();var xq=["headerchkbox"],Tq=["filter"],Eq=["lastHiddenFocusableElement"],Sq=["firstHiddenFocusableElement"],Mq=["scroller"],Dq=["list"],Oq=["wrapper"],Aq=[[["p-header"]],[["p-footer"]]],kq=["p-header","p-footer"],U0=(n,e)=>({$implicit:n,options:e}),b3=n=>({"p-checkbox-disabled":n}),Nq=(n,e,t)=>({"p-highlight":n,"p-focus":e,"p-disabled":t}),C3=n=>({options:n}),QI=n=>({height:n}),Lq=()=>({}),Pq=n=>({$implicit:n}),Rq=(n,e,t)=>({"p-listbox-item":!0,"p-highlight":n,"p-focus":e,"p-disabled":t}),Fq=(n,e)=>({$implicit:n,index:e}),jq=n=>({"p-highlight":n});function Vq(n,e){n&1&&ye(0)}function Bq(n,e){if(n&1&&(b(0,"div",20),Vt(1),x(2,Vq,1,0,"ng-container",21),C()),n&2){let t=y();m(2),f("ngTemplateOutlet",t.headerTemplate)("ngTemplateOutletContext",_t(2,U0,t.modelValue(),t.visibleOptions()))}}function zq(n,e){n&1&&E(0,"CheckIcon",30),n&2&&(f("styleClass","p-checkbox-icon"),O("aria-hidden",!0))}function Uq(n,e){}function Hq(n,e){n&1&&x(0,Uq,0,0,"ng-template")}function $q(n,e){if(n&1&&(b(0,"span",31),x(1,Hq,1,0,null,32),C()),n&2){let t=y(4);O("aria-hidden",!0),m(),f("ngTemplateOutlet",t.checkIconTemplate)}}function Wq(n,e){if(n&1&&(oe(0),x(1,zq,1,2,"CheckIcon",28)(2,$q,2,2,"span",29),se()),n&2){let t=y(3);m(),f("ngIf",!t.checkIconTemplate),m(),f("ngIf",t.checkIconTemplate)}}function Gq(n,e){if(n&1){let t=$();b(0,"div",24),P("click",function(r){M(t);let o=y(2);return D(o.onToggleAll(r))})("keydown",function(r){M(t);let o=y(2);return D(o.onHeaderCheckboxKeyDown(r))}),b(1,"div",25)(2,"input",26,5),P("focus",function(r){M(t);let o=y(2);return D(o.onHeaderCheckboxFocus(r))})("blur",function(r){M(t);let o=y(2);return D(o.onHeaderCheckboxBlur(r))}),C()(),b(4,"div",27),x(5,Wq,3,2,"ng-container",16),C()()}if(n&2){let t=y(2);f("ngClass",_e(8,b3,t.disabled||t.toggleAllDisabled)),m(),O("data-p-hidden-accessible",!0),m(),f("disabled",t.disabled||t.toggleAllDisabled),O("checked",t.allSelected())("aria-label",t.toggleAllAriaLabel),m(2),f("ngClass",Sn(10,Nq,t.allSelected(),t.headerCheckboxFocus,t.disabled||t.toggleAllDisabled)),O("aria-checked",t.allSelected()),m(),f("ngIf",t.allSelected())}}function qq(n,e){n&1&&ye(0)}function Qq(n,e){if(n&1&&(oe(0),x(1,qq,1,0,"ng-container",21),se()),n&2){let t=y(2);m(),f("ngTemplateOutlet",t.filterTemplate)("ngTemplateOutletContext",_e(2,C3,t.filterOptions))}}function Kq(n,e){n&1&&E(0,"SearchIcon",30),n&2&&(f("styleClass","p-listbox-filter-icon"),O("aria-hidden",!0))}function Yq(n,e){}function Zq(n,e){n&1&&x(0,Yq,0,0,"ng-template")}function Jq(n,e){if(n&1&&(b(0,"span",38),x(1,Zq,1,0,null,32),C()),n&2){let t=y(4);O("aria-hidden",!0),m(),f("ngTemplateOutlet",t.filterIconTemplate)}}function Xq(n,e){if(n&1){let t=$();b(0,"div",35)(1,"input",36,6),P("input",function(r){M(t);let o=y(3);return D(o.onFilterChange(r))})("keydown",function(r){M(t);let o=y(3);return D(o.onFilterKeyDown(r))})("focus",function(r){M(t);let o=y(3);return D(o.onFilterFocus(r))})("blur",function(r){M(t);let o=y(3);return D(o.onFilterBlur(r))}),C(),x(3,Kq,1,2,"SearchIcon",28)(4,Jq,2,2,"span",37),C()}if(n&2){let t=y(3);m(),f("value",t._filterValue()||"")("disabled",t.disabled)("tabindex",!t.disabled&&!t.focused?t.tabindex:-1),O("aria-owns",t.id+"_list")("aria-activedescendant",t.focusedOptionId)("placeholder",t.filterPlaceHolder)("aria-label",t.ariaFilterLabel),m(2),f("ngIf",!t.filterIconTemplate),m(),f("ngIf",t.filterIconTemplate)}}function eQ(n,e){if(n&1&&(x(0,Xq,5,9,"div",33),b(1,"span",34),Z(2),C()),n&2){let t=y(2);f("ngIf",t.filter),m(),O("data-p-hidden-accessible",!0),m(),yt(" ",t.filterResultMessageText," ")}}function tQ(n,e){if(n&1&&(b(0,"div",20),x(1,Gq,6,14,"div",22)(2,Qq,2,4,"ng-container",23)(3,eQ,3,3,"ng-template",null,4,Bt),C()),n&2){let t=pt(4),i=y();m(),f("ngIf",i.checkbox&&i.multiple&&i.showToggleAll),m(),f("ngIf",i.filterTemplate)("ngIfElse",t)}}function nQ(n,e){n&1&&ye(0)}function iQ(n,e){if(n&1&&x(0,nQ,1,0,"ng-container",21),n&2){let t=e.$implicit,i=e.options;y(2);let r=pt(10);f("ngTemplateOutlet",r)("ngTemplateOutletContext",_t(2,U0,t,i))}}function rQ(n,e){n&1&&ye(0)}function oQ(n,e){if(n&1&&x(0,rQ,1,0,"ng-container",21),n&2){let t=e.options,i=y(3);f("ngTemplateOutlet",i.loaderTemplate)("ngTemplateOutletContext",_e(2,C3,t))}}function sQ(n,e){n&1&&(oe(0),x(1,oQ,1,4,"ng-template",41),se())}function aQ(n,e){if(n&1){let t=$();b(0,"p-scroller",39,7),P("onLazyLoad",function(r){M(t);let o=y();return D(o.onLazyLoad.emit(r))}),x(2,iQ,1,5,"ng-template",40)(3,sQ,2,0,"ng-container",16),C()}if(n&2){let t=y();En(_e(9,QI,t.scrollHeight)),f("items",t.visibleOptions())("itemSize",t.virtualScrollItemSize)("autoSize",!0)("lazy",t.lazy)("options",t.virtualScrollOptions)("tabindex",t.scrollerTabIndex),m(3),f("ngIf",t.loaderTemplate)}}function lQ(n,e){n&1&&ye(0)}function cQ(n,e){if(n&1&&(oe(0),x(1,lQ,1,0,"ng-container",21),se()),n&2){let t=y(),i=pt(10);m(),f("ngTemplateOutlet",i)("ngTemplateOutletContext",_t(3,U0,t.visibleOptions(),St(2,Lq)))}}function uQ(n,e){if(n&1&&(b(0,"span"),Z(1),C()),n&2){let t=y(2).$implicit,i=y(2);m(),Pe(i.getOptionGroupLabel(t.optionGroup))}}function dQ(n,e){n&1&&ye(0)}function pQ(n,e){if(n&1&&(oe(0),b(1,"li",45),x(2,uQ,2,1,"span",16)(3,dQ,1,0,"ng-container",21),C(),se()),n&2){let t=y(),i=t.$implicit,r=t.index,o=y().options,s=y();m(),f("ngStyle",_e(5,QI,o.itemSize+"px")),O("id",s.id+"_"+s.getOptionIndex(r,o)),m(),f("ngIf",!s.groupTemplate),m(),f("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",_e(7,Pq,i.optionGroup))}}function hQ(n,e){n&1&&E(0,"CheckIcon",30),n&2&&(f("styleClass","p-checkbox-icon"),O("aria-hidden",!0))}function fQ(n,e){}function mQ(n,e){n&1&&x(0,fQ,0,0,"ng-template")}function gQ(n,e){if(n&1&&(b(0,"span",31),x(1,mQ,1,0,null,32),C()),n&2){let t=y(6);O("aria-hidden",!0),m(),f("ngTemplateOutlet",t.checkIconTemplate)}}function yQ(n,e){if(n&1&&(oe(0),x(1,hQ,1,2,"CheckIcon",28)(2,gQ,2,2,"span",29),se()),n&2){let t=y(5);m(),f("ngIf",!t.checkIconTemplate),m(),f("ngIf",t.checkIconTemplate)}}function _Q(n,e){if(n&1&&(b(0,"div",48)(1,"div",49),x(2,yQ,3,2,"ng-container",16),C()()),n&2){let t=y(2).$implicit,i=y(2);f("ngClass",_e(3,b3,i.disabled||i.isOptionDisabled(t))),m(),f("ngClass",_e(5,jq,i.isSelected(t))),m(),f("ngIf",i.isSelected(t))}}function vQ(n,e){if(n&1&&(b(0,"span"),Z(1),C()),n&2){let t=y(2).$implicit,i=y(2);m(),Pe(i.getOptionLabel(t))}}function bQ(n,e){n&1&&ye(0)}function CQ(n,e){if(n&1){let t=$();oe(0),b(1,"li",46),P("click",function(r){M(t);let o=y(),s=o.$implicit,a=o.index,l=y().options,c=y();return D(c.onOptionSelect(r,s,c.getOptionIndex(a,l)))})("dblclick",function(r){M(t);let o=y().$implicit,s=y(2);return D(s.onOptionDoubleClick(r,o))})("mousedown",function(r){M(t);let o=y().index,s=y().options,a=y();return D(a.onOptionMouseDown(r,a.getOptionIndex(o,s)))})("mouseenter",function(r){M(t);let o=y().index,s=y().options,a=y();return D(a.onOptionMouseEnter(r,a.getOptionIndex(o,s)))})("touchend",function(){M(t);let r=y(3);return D(r.onOptionTouchEnd())}),x(2,_Q,3,7,"div",47)(3,vQ,2,1,"span",16)(4,bQ,1,0,"ng-container",21),C(),se()}if(n&2){let t=y(),i=t.$implicit,r=t.index,o=y().options,s=y();m(),f("ngStyle",_e(12,QI,o.itemSize+"px"))("ngClass",Sn(14,Rq,s.isSelected(i),s.focusedOptionIndex()===s.getOptionIndex(r,o),s.isOptionDisabled(i))),O("id",s.id+"_"+s.getOptionIndex(r,o))("aria-label",s.getOptionLabel(i))("aria-selected",s.isSelected(i))("aria-disabled",s.isOptionDisabled(i))("aria-setsize",s.ariaSetSize)("ariaPosInset",s.getAriaPosInset(s.getOptionIndex(r,o))),m(),f("ngIf",s.checkbox&&s.multiple),m(),f("ngIf",!s.itemTemplate),m(),f("ngTemplateOutlet",s.itemTemplate)("ngTemplateOutletContext",_t(18,Fq,i,s.getOptionIndex(r,o)))}}function wQ(n,e){if(n&1&&x(0,pQ,4,9,"ng-container",16)(1,CQ,5,21,"ng-container",16),n&2){let t=e.$implicit,i=y(2);f("ngIf",i.isOptionGroup(t)),m(),f("ngIf",!i.isOptionGroup(t))}}function IQ(n,e){if(n&1&&(oe(0),Z(1),se()),n&2){let t=y(3);m(),yt(" ",t.emptyFilterMessageText," ")}}function xQ(n,e){n&1&&ye(0,null,9)}function TQ(n,e){if(n&1&&(b(0,"li",50),x(1,IQ,2,1,"ng-container",23)(2,xQ,2,0,"ng-container",32),C()),n&2){let t=y(2);m(),f("ngIf",!t.emptyFilterTemplate&&!t.emptyTemplate)("ngIfElse",t.emptyFilter),m(),f("ngTemplateOutlet",t.emptyFilterTemplate||t.emptyTemplate)}}function EQ(n,e){if(n&1&&(oe(0),Z(1),se()),n&2){let t=y(3);m(),yt(" ",t.emptyMessage," ")}}function SQ(n,e){n&1&&ye(0,null,10)}function MQ(n,e){if(n&1&&(b(0,"li",50),x(1,EQ,2,1,"ng-container",23)(2,SQ,2,0,"ng-container",32),C()),n&2){let t=y(2);m(),f("ngIf",!t.emptyTemplate)("ngIfElse",t.empty),m(),f("ngTemplateOutlet",t.emptyTemplate)}}function DQ(n,e){if(n&1){let t=$();b(0,"ul",42,8),P("focus",function(r){M(t);let o=y();return D(o.onListFocus(r))})("blur",function(r){M(t);let o=y();return D(o.onListBlur(r))})("keydown",function(r){M(t);let o=y();return D(o.onListKeyDown(r))}),x(2,wQ,2,2,"ng-template",43)(3,TQ,3,3,"li",44)(4,MQ,3,3,"li",44),C()}if(n&2){let t=e.$implicit,i=e.options,r=y();f("tabindex",-1)("ngClass",i.contentStyleClass)("ngStyle",i.contentStyle),O("aria-multiselectable",!0)("aria-activedescendant",r.focused?r.focusedOptionId:void 0)("aria-label",r.ariaLabel)("aria-multiselectable",r.multiple)("aria-disabled",r.disabled),m(2),f("ngForOf",t),m(),f("ngIf",r.hasFilter()&&r.isEmpty()),m(),f("ngIf",!r.hasFilter()&&r.isEmpty())}}function OQ(n,e){n&1&&ye(0)}function AQ(n,e){if(n&1&&(b(0,"div",51),Vt(1,1),x(2,OQ,1,0,"ng-container",21),C()),n&2){let t=y();m(2),f("ngTemplateOutlet",t.footerTemplate)("ngTemplateOutletContext",_t(2,U0,t.modelValue(),t.visibleOptions()))}}function kQ(n,e){if(n&1&&(b(0,"span",19),Z(1),C()),n&2){let t=y();m(),yt(" ",t.emptyMessage," ")}}var NQ={provide:ti,useExisting:dn(()=>LQ),multi:!0},LQ=(()=>{class n{el;cd;filterService;config;renderer;id;searchMessage;emptySelectionMessage;selectionMessage;autoOptionFocus=!0;ariaLabel;selectOnFocus;searchLocale;focusOnHover;filterMessage;filterFields;lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;scrollHeight="200px";tabindex=0;multiple;style;styleClass;listStyle;listStyleClass;readonly;disabled;checkbox=!1;filter=!1;filterBy;filterMatchMode="contains";filterLocale;metaKeySelection=!1;dataKey;showToggleAll=!0;optionLabel;optionValue;optionGroupChildren="items";optionGroupLabel="label";optionDisabled;ariaFilterLabel;filterPlaceHolder;emptyFilterMessage;emptyMessage;group;get options(){return this._options()}set options(t){this._options.set(t)}get filterValue(){return this._filterValue()}set filterValue(t){this._filterValue.set(t)}get selectAll(){return this._selectAll}set selectAll(t){this._selectAll=t}onChange=new j;onClick=new j;onDblClick=new j;onFilter=new j;onFocus=new j;onBlur=new j;onSelectAllChange=new j;headerCheckboxViewChild;filterViewChild;lastHiddenFocusableElement;firstHiddenFocusableElement;scroller;listViewChild;wrapperViewChild;headerFacet;footerFacet;templates;itemTemplate;groupTemplate;headerTemplate;filterTemplate;footerTemplate;emptyFilterTemplate;emptyTemplate;filterIconTemplate;checkIconTemplate;_filterValue=Lt(null);_filteredOptions;filterOptions;filtered;value;onModelChange=()=>{};onModelTouched=()=>{};optionTouched;focus;headerCheckboxFocus;translationSubscription;focused;scrollerTabIndex="0";get containerClass(){return{"p-listbox p-component":!0,"p-disabled":this.disabled}}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}get filterResultMessageText(){return Ee.isNotEmpty(this.visibleOptions())?this.filterMessageText.replaceAll("{0}",this.visibleOptions().length):this.emptyFilterMessageText}get filterMessageText(){return this.filterMessage||this.config.translation.searchMessage||""}get searchMessageText(){return this.searchMessage||this.config.translation.searchMessage||""}get emptyFilterMessageText(){return this.emptyFilterMessage||this.config.translation.emptySearchMessage||this.config.translation.emptyFilterMessage||""}get selectionMessageText(){return this.selectionMessage||this.config.translation.selectionMessage||""}get emptySelectionMessageText(){return this.emptySelectionMessage||this.config.translation.emptySelectionMessage||""}get selectedMessageText(){return this.hasSelectedOption()?this.selectionMessageText.replaceAll("{0}",this.multiple?this.modelValue().length:"1"):this.emptySelectionMessageText}get ariaSetSize(){return this.visibleOptions().filter(t=>!this.isOptionGroup(t)).length}get virtualScrollerDisabled(){return!this.virtualScroll}get searchFields(){return this.filterFields||[this.optionLabel]}get toggleAllAriaLabel(){return this.config.translation.aria?this.config.translation.aria[this.allSelected()?"selectAll":"unselectAll"]:void 0}searchValue;searchTimeout;_selectAll=null;_options=Lt(null);startRangeIndex=Lt(-1);focusedOptionIndex=Lt(-1);modelValue=Lt(null);visibleOptions=cn(()=>{let t=this.group?this.flatOptions(this._options()):this._options()||[],i=this._filterValue();return this.searchFields[0]===void 0?i?t.filter(r=>r.toString().toLocaleLowerCase(this.filterLocale).indexOf(i.toLocaleLowerCase(this.filterLocale).trim())!==-1):t:i?this.filterService.filter(t,this.searchFields,i,this.filterMatchMode,this.filterLocale):t});constructor(t,i,r,o,s){this.el=t,this.cd=i,this.filterService=r,this.config=o,this.renderer=s}ngOnInit(){this.id=this.id||nt(),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()}),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:t=>this.onFilterChange(t),reset:()=>this.resetFilter()})}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"item":this.itemTemplate=t.template;break;case"group":this.groupTemplate=t.template;break;case"header":this.headerTemplate=t.template;break;case"filter":this.filterTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;case"empty":this.emptyTemplate=t.template;break;case"emptyfilter":this.emptyFilterTemplate=t.template;break;case"filtericon":this.filterIconTemplate=t.template;break;case"checkicon":this.checkIconTemplate=t.template;break;default:this.itemTemplate=t.template;break}})}writeValue(t){this.value=t,this.modelValue.set(this.value),this.cd.markForCheck()}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}flatOptions(t){return(t||[]).reduce((i,r,o)=>{i.push({optionGroup:r,group:!0,index:o});let s=this.getOptionGroupChildren(r);return s&&s.forEach(a=>i.push(a)),i},[])}autoUpdateModel(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()&&!this.multiple){let t=this.findFirstFocusedOptionIndex();this.focusedOptionIndex.set(t),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()])}}updateModel(t,i){this.value=t,this.modelValue.set(t),this.onModelChange(t),this.onChange.emit({originalEvent:i,value:this.value})}removeOption(t){return this.modelValue().filter(i=>!Ee.equals(i,this.getOptionValue(t),this.equalityKey()))}onOptionSelect(t,i,r=-1){this.disabled||this.isOptionDisabled(i)||this.readonly||(t&&this.onClick.emit({originalEvent:t,option:i,value:this.value}),this.multiple?this.onOptionSelectMultiple(t,i):this.onOptionSelectSingle(t,i),this.optionTouched=!1,r!==-1&&this.focusedOptionIndex.set(r))}onOptionSelectMultiple(t,i){let r=this.isSelected(i),o=null;if(this.optionTouched?!1:this.metaKeySelection){let a=t.metaKey||t.ctrlKey;r?o=a?this.removeOption(i):[this.getOptionValue(i)]:(o=a?this.modelValue()||[]:[],o=[...o,this.getOptionValue(i)])}else o=r?this.removeOption(i):[...this.modelValue()||[],this.getOptionValue(i)];this.updateModel(o,t)}onOptionSelectSingle(t,i){let r=this.isSelected(i),o=!1,s=null;if(this.optionTouched?!1:this.metaKeySelection){let l=t.metaKey||t.ctrlKey;r?l&&(s=null,o=!0):(s=this.getOptionValue(i),o=!0)}else s=r?null:this.getOptionValue(i),o=!0;o&&this.updateModel(s,t)}onOptionSelectRange(t,i=-1,r=-1){if(i===-1&&(i=this.findNearestSelectedOptionIndex(r,!0)),r===-1&&(r=this.findNearestSelectedOptionIndex(i)),i!==-1&&r!==-1){let o=Math.min(i,r),s=Math.max(i,r),a=this.visibleOptions().slice(o,s+1).filter(l=>this.isValidOption(l)).map(l=>this.getOptionValue(l));this.updateModel(a,t)}}onToggleAll(t){if(!(this.disabled||this.readonly)){if(A.focus(this.headerCheckboxViewChild.nativeElement),this.selectAll!==null)this.onSelectAllChange.emit({originalEvent:t,checked:!this.allSelected()});else{let i=this.allSelected()?[]:this.visibleOptions().filter(r=>this.isValidOption(r)).map(r=>this.getOptionValue(r));this.updateModel(i,t)}t.preventDefault()}}allSelected(){return this.selectAll!==null?this.selectAll:Ee.isNotEmpty(this.visibleOptions())&&this.visibleOptions().every(t=>this.isOptionGroup(t)||this.isOptionDisabled(t)||this.isSelected(t))}onOptionTouchEnd(){this.disabled||(this.optionTouched=!0)}onOptionMouseDown(t,i){this.changeFocusedOptionIndex(t,i)}onOptionMouseEnter(t,i){this.focusOnHover&&this.changeFocusedOptionIndex(t,i)}onOptionDoubleClick(t,i){this.disabled||this.isOptionDisabled(i)||this.readonly||this.onDblClick.emit({originalEvent:t,option:i,value:this.value})}onFirstHiddenFocus(t){A.focus(this.listViewChild.nativeElement);let i=A.getFirstFocusableElement(this.el.nativeElement,':not([data-p-hidden-focusable="true"])');this.lastHiddenFocusableElement.nativeElement.tabIndex=Ee.isEmpty(i)?"-1":void 0,this.firstHiddenFocusableElement.nativeElement.tabIndex=-1}onLastHiddenFocus(t){if(t.relatedTarget===this.listViewChild.nativeElement){let r=A.getFirstFocusableElement(this.el.nativeElement,":not(.p-hidden-focusable)");A.focus(r),this.firstHiddenFocusableElement.nativeElement.tabIndex=void 0}else A.focus(this.firstHiddenFocusableElement.nativeElement);this.lastHiddenFocusableElement.nativeElement.tabIndex=-1}onFocusout(t){!this.el.nativeElement.contains(t.relatedTarget)&&this.lastHiddenFocusableElement&&this.firstHiddenFocusableElement&&(this.firstHiddenFocusableElement.nativeElement.tabIndex=this.lastHiddenFocusableElement.nativeElement.tabIndex=void 0,this.wrapperViewChild.nativeElement.tabIndex="0",this.scrollerTabIndex="0")}onListFocus(t){this.focused=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(i),this.onFocus.emit(t),this.wrapperViewChild.nativeElement.tabIndex="-1",this.scrollerTabIndex="-1"}onListBlur(t){this.focused=!1,this.focusedOptionIndex.set(-1),this.startRangeIndex.set(-1),this.searchValue=""}onHeaderCheckboxFocus(t){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}onHeaderCheckboxKeyDown(t){if(this.disabled){t.preventDefault();return}switch(t.code){case"Space":this.onToggleAll(t);break;case"Enter":this.onToggleAll(t);break;case"Tab":this.onHeaderCheckboxTabKeyDown(t);break;default:break}}onHeaderCheckboxTabKeyDown(t){A.focus(this.listViewChild.nativeElement),t.preventDefault()}onFilterChange(t){let i=t.target.value?.trim();this._filterValue.set(i),this.focusedOptionIndex.set(-1),this.startRangeIndex.set(-1),this.onFilter.emit({originalEvent:t,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0)}onFilterFocus(t){this.wrapperViewChild.nativeElement.tabIndex="-1"}onFilterBlur(t){this.focusedOptionIndex.set(-1),this.startRangeIndex.set(-1)}onListKeyDown(t){let i=t.metaKey||t.ctrlKey;switch(t.code){case"ArrowDown":this.onArrowDownKey(t);break;case"ArrowUp":this.onArrowUpKey(t);break;case"Home":this.onHomeKey(t);break;case"End":this.onEndKey(t);break;case"PageDown":this.onPageDownKey(t);break;case"PageUp":this.onPageUpKey(t);break;case"Enter":case"Space":case"NumpadEnter":this.onSpaceKey(t);break;case"Tab":break;case"ShiftLeft":case"ShiftRight":this.onShiftKey();break;default:if(this.multiple&&t.code==="KeyA"&&i){let r=this.visibleOptions().filter(o=>this.isValidOption(o)).map(o=>this.getOptionValue(o));this.updateModel(r,t),t.preventDefault();break}!i&&Ee.isPrintableCharacter(t.key)&&(this.searchOptions(t,t.key),t.preventDefault());break}}onFilterKeyDown(t){switch(t.code){case"ArrowDown":this.onArrowDownKey(t);break;case"ArrowUp":this.onArrowUpKey(t);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(t,!0);break;case"Home":this.onHomeKey(t,!0);break;case"End":this.onEndKey(t,!0);break;case"Enter":this.onEnterKey(t);break;case"ShiftLeft":case"ShiftRight":this.onShiftKey();break;default:break}}onArrowDownKey(t){let i=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.findFirstFocusedOptionIndex();this.multiple&&t.shiftKey&&this.onOptionSelectRange(t,this.startRangeIndex(),i),this.changeFocusedOptionIndex(t,i),t.preventDefault()}onArrowUpKey(t){let i=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.findLastFocusedOptionIndex();this.multiple&&t.shiftKey&&this.onOptionSelectRange(t,i,this.startRangeIndex()),this.changeFocusedOptionIndex(t,i),t.preventDefault()}onArrowLeftKey(t,i=!1){i&&this.focusedOptionIndex.set(-1)}onHomeKey(t,i=!1){if(i)t.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex.set(-1);else{let r=t.metaKey||t.ctrlKey,o=this.findFirstOptionIndex();this.multiple&&t.shiftKey&&r&&this.onOptionSelectRange(t,o,this.startRangeIndex()),this.changeFocusedOptionIndex(t,o)}t.preventDefault()}onEndKey(t,i=!1){if(i){let r=t.currentTarget,o=r.value.length;r.setSelectionRange(o,o),this.focusedOptionIndex.set(-1)}else{let r=t.metaKey||t.ctrlKey,o=this.findLastOptionIndex();this.multiple&&t.shiftKey&&r&&this.onOptionSelectRange(t,this.startRangeIndex(),o),this.changeFocusedOptionIndex(t,o)}t.preventDefault()}onPageDownKey(t){this.scrollInView(0),t.preventDefault()}onPageUpKey(t){this.scrollInView(this.visibleOptions().length-1),t.preventDefault()}onEnterKey(t){this.focusedOptionIndex()!==-1&&(this.multiple&&t.shiftKey?this.onOptionSelectRange(t,this.focusedOptionIndex()):this.onOptionSelect(t,this.visibleOptions()[this.focusedOptionIndex()])),t.preventDefault()}onSpaceKey(t){this.onEnterKey(t)}onShiftKey(){let t=this.focusedOptionIndex();this.startRangeIndex.set(t)}getOptionGroupChildren(t){return this.optionGroupChildren?Ee.resolveFieldData(t,this.optionGroupChildren):t.items}getOptionGroupLabel(t){return this.optionGroupLabel?Ee.resolveFieldData(t,this.optionGroupLabel):t&&t.label!==void 0?t.label:t}getOptionLabel(t){return this.optionLabel?Ee.resolveFieldData(t,this.optionLabel):t.label!=null?t.label:t}getOptionIndex(t,i){return this.virtualScrollerDisabled?t:i&&i.getItemOptions(t).index}getOptionValue(t){return this.optionValue?Ee.resolveFieldData(t,this.optionValue):!this.optionLabel&&t&&t.value!==void 0?t.value:t}getAriaPosInset(t){return(this.optionGroupLabel?t-this.visibleOptions().slice(0,t).filter(i=>this.isOptionGroup(i)).length:t)+1}hasSelectedOption(){return Ee.isNotEmpty(this.modelValue())}isOptionGroup(t){return this.optionGroupLabel&&t.optionGroup&&t.group}changeFocusedOptionIndex(t,i){this.focusedOptionIndex()!==i&&(this.focusedOptionIndex.set(i),this.scrollInView(),this.selectOnFocus&&!this.multiple&&this.onOptionSelect(t,this.visibleOptions()[i]))}searchOptions(t,i){this.searchValue=(this.searchValue||"")+i;let r=-1,o=!1;return this.focusedOptionIndex()!==-1?(r=this.visibleOptions().slice(this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)),r=r===-1?this.visibleOptions().slice(0,this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)):r+this.focusedOptionIndex()):r=this.visibleOptions().findIndex(s=>this.isOptionMatched(s)),r!==-1&&(o=!0),r===-1&&this.focusedOptionIndex()===-1&&(r=this.findFirstFocusedOptionIndex()),r!==-1&&this.changeFocusedOptionIndex(t,r),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}isOptionMatched(t){return this.isValidOption(t)&&this.getOptionLabel(t).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}scrollInView(t=-1){let i=t!==-1?`${this.id}_${t}`:this.focusedOptionId,r=A.findSingle(this.listViewChild.nativeElement,`li[id="${i}"]`);r?r.scrollIntoView&&r.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||this.virtualScroll&&this.scroller.scrollToIndex(t!==-1?t:this.focusedOptionIndex())}findFirstOptionIndex(){return this.visibleOptions().findIndex(t=>this.isValidOption(t))}findLastOptionIndex(){return Ee.findLastIndex(this.visibleOptions(),t=>this.isValidOption(t))}findFirstFocusedOptionIndex(){let t=this.findFirstSelectedOptionIndex();return t<0?this.findFirstOptionIndex():t}findLastFocusedOptionIndex(){let t=this.findLastSelectedOptionIndex();return t<0?this.findLastOptionIndex():t}findLastSelectedOptionIndex(){return this.hasSelectedOption()?Ee.findLastIndex(this.visibleOptions(),t=>this.isValidSelectedOption(t)):-1}findNextOptionIndex(t){let i=tthis.isValidOption(r)):-1;return i>-1?i+t+1:t}findNextSelectedOptionIndex(t){let i=this.hasSelectedOption()&&tthis.isValidSelectedOption(r)):-1;return i>-1?i+t+1:-1}findPrevSelectedOptionIndex(t){let i=this.hasSelectedOption()&&t>0?Ee.findLastIndex(this.visibleOptions().slice(0,t),r=>this.isValidSelectedOption(r)):-1;return i>-1?i:-1}findFirstSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(t=>this.isValidSelectedOption(t)):-1}findPrevOptionIndex(t){let i=t>0?Ee.findLastIndex(this.visibleOptions().slice(0,t),r=>this.isValidOption(r)):-1;return i>-1?i:t}findNearestSelectedOptionIndex(t,i=!1){let r=-1;return this.hasSelectedOption()&&(i?(r=this.findPrevSelectedOptionIndex(t),r=r===-1?this.findNextSelectedOptionIndex(t):r):(r=this.findNextSelectedOptionIndex(t),r=r===-1?this.findPrevSelectedOptionIndex(t):r)),r>-1?r:t}equalityKey(){return this.optionValue?null:this.dataKey}isValidSelectedOption(t){return this.isValidOption(t)&&this.isSelected(t)}isOptionDisabled(t){return this.optionDisabled?Ee.resolveFieldData(t,this.optionDisabled):!1}isSelected(t){let i=this.getOptionValue(t);return this.multiple?(this.modelValue()||[]).some(r=>Ee.equals(r,i,this.equalityKey())):Ee.equals(this.modelValue(),i,this.equalityKey())}isValidOption(t){return t&&!(this.isOptionDisabled(t)||this.isOptionGroup(t))}isEmpty(){return!this._options()?.length||!this.visibleOptions()?.length}hasFilter(){return this._filterValue()&&this._filterValue().trim().length>0}resetFilter(){this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this._filterValue.set(null)}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}static \u0275fac=function(i){return new(i||n)(k(Ce),k(De),k(z0),k(Pt),k(At))};static \u0275cmp=F({type:n,selectors:[["p-listbox"]],contentQueries:function(i,r,o){if(i&1&&(Je(o,Ra,5),Je(o,Fa,5),Je(o,qe,4)),i&2){let s;J(s=X())&&(r.headerFacet=s.first),J(s=X())&&(r.footerFacet=s.first),J(s=X())&&(r.templates=s)}},viewQuery:function(i,r){if(i&1&&(fe(xq,5),fe(Tq,5),fe(Eq,5),fe(Sq,5),fe(Mq,5),fe(Dq,5),fe(Oq,5)),i&2){let o;J(o=X())&&(r.headerCheckboxViewChild=o.first),J(o=X())&&(r.filterViewChild=o.first),J(o=X())&&(r.lastHiddenFocusableElement=o.first),J(o=X())&&(r.firstHiddenFocusableElement=o.first),J(o=X())&&(r.scroller=o.first),J(o=X())&&(r.listViewChild=o.first),J(o=X())&&(r.wrapperViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{id:"id",searchMessage:"searchMessage",emptySelectionMessage:"emptySelectionMessage",selectionMessage:"selectionMessage",autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",V],ariaLabel:"ariaLabel",selectOnFocus:[2,"selectOnFocus","selectOnFocus",V],searchLocale:[2,"searchLocale","searchLocale",V],focusOnHover:[2,"focusOnHover","focusOnHover",V],filterMessage:"filterMessage",filterFields:"filterFields",lazy:[2,"lazy","lazy",V],virtualScroll:[2,"virtualScroll","virtualScroll",V],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",Ke],virtualScrollOptions:"virtualScrollOptions",scrollHeight:"scrollHeight",tabindex:[2,"tabindex","tabindex",Ke],multiple:[2,"multiple","multiple",V],style:"style",styleClass:"styleClass",listStyle:"listStyle",listStyleClass:"listStyleClass",readonly:[2,"readonly","readonly",V],disabled:[2,"disabled","disabled",V],checkbox:[2,"checkbox","checkbox",V],filter:[2,"filter","filter",V],filterBy:"filterBy",filterMatchMode:"filterMatchMode",filterLocale:"filterLocale",metaKeySelection:[2,"metaKeySelection","metaKeySelection",V],dataKey:"dataKey",showToggleAll:[2,"showToggleAll","showToggleAll",V],optionLabel:"optionLabel",optionValue:"optionValue",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",optionDisabled:"optionDisabled",ariaFilterLabel:"ariaFilterLabel",filterPlaceHolder:"filterPlaceHolder",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",group:[2,"group","group",V],options:"options",filterValue:"filterValue",selectAll:"selectAll"},outputs:{onChange:"onChange",onClick:"onClick",onDblClick:"onDblClick",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onSelectAllChange:"onSelectAllChange"},features:[on([NQ]),$e],ngContentSelectors:kq,decls:17,vars:23,consts:[["firstHiddenFocusableElement",""],["wrapper",""],["buildInItems",""],["lastHiddenFocusableElement",""],["builtInFilterElement",""],["headerchkbox",""],["filterInput",""],["scroller",""],["list",""],["emptyFilter",""],["empty",""],[3,"focusout","ngClass","ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus","tabindex"],["class","p-listbox-header",4,"ngIf"],[3,"ngClass","ngStyle"],[3,"items","style","itemSize","autoSize","lazy","options","tabindex","onLazyLoad",4,"ngIf"],[4,"ngIf"],["class","p-listbox-footer",4,"ngIf"],["role","status","aria-live","polite","class","p-hidden-accessible",4,"ngIf"],["role","status","aria-live","polite",1,"p-hidden-accessible"],[1,"p-listbox-header"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-checkbox p-component",3,"ngClass","click","keydown",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"p-checkbox","p-component",3,"click","keydown","ngClass"],[1,"p-hidden-accessible"],["type","checkbox","readonly","readonly",3,"focus","blur","disabled"],["role","checkbox",1,"p-checkbox-box",3,"ngClass"],[3,"styleClass",4,"ngIf"],["class","p-checkbox-icon",4,"ngIf"],[3,"styleClass"],[1,"p-checkbox-icon"],[4,"ngTemplateOutlet"],["class","p-listbox-filter-container",4,"ngIf"],["role","status","attr.aria-live","polite",1,"p-hidden-accessible"],[1,"p-listbox-filter-container"],["type","text","role","searchbox",1,"p-listbox-filter","p-inputtext","p-component",3,"input","keydown","focus","blur","value","disabled","tabindex"],["class","p-listbox-filter-icon",4,"ngIf"],[1,"p-listbox-filter-icon"],[3,"onLazyLoad","items","itemSize","autoSize","lazy","options","tabindex"],["pTemplate","content"],["pTemplate","loader"],["role","listbox",1,"p-listbox-list",3,"focus","blur","keydown","tabindex","ngClass","ngStyle"],["ngFor","",3,"ngForOf"],["class","p-listbox-empty-message","role","option",4,"ngIf"],["role","option",1,"p-listbox-item-group",3,"ngStyle"],["pRipple","","role","option",1,"p-listbox-item",3,"click","dblclick","mousedown","mouseenter","touchend","ngStyle","ngClass"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],[1,"p-checkbox","p-component",3,"ngClass"],[1,"p-checkbox-box",3,"ngClass"],["role","option",1,"p-listbox-empty-message"],[1,"p-listbox-footer"]],template:function(i,r){if(i&1){let o=$();ln(Aq),b(0,"div",11),P("focusout",function(a){return M(o),D(r.onFocusout(a))}),b(1,"span",12,0),P("focus",function(a){return M(o),D(r.onFirstHiddenFocus(a))}),C(),x(3,Bq,3,5,"div",13)(4,tQ,5,3,"div",13),b(5,"div",14,1),x(7,aQ,4,11,"p-scroller",15)(8,cQ,2,6,"ng-container",16)(9,DQ,5,11,"ng-template",null,2,Bt),C(),x(11,AQ,3,5,"div",17)(12,kQ,2,1,"span",18),b(13,"span",19),Z(14),C(),b(15,"span",12,3),P("focus",function(a){return M(o),D(r.onLastHiddenFocus(a))}),C()()}i&2&&(W(r.styleClass),f("ngClass",r.containerClass)("ngStyle",r.style),O("id",r.id),m(),f("tabindex",r.disabled?-1:r.tabindex),O("data-p-hidden-focusable",!0),m(2),f("ngIf",r.headerFacet||r.headerTemplate),m(),f("ngIf",r.checkbox&&r.multiple&&r.showToggleAll||r.filter),m(),W(r.listStyleClass),Rs("max-height",r.virtualScroll?"auto":r.scrollHeight||"auto"),f("ngClass","p-listbox-list-wrapper")("ngStyle",r.listStyle),O("tabindex",!r.disabled&&"0"),m(2),f("ngIf",r.virtualScroll),m(),f("ngIf",!r.virtualScroll),m(3),f("ngIf",r.footerFacet||r.footerTemplate),m(),f("ngIf",r.isEmpty()),m(2),yt(" ",r.selectedMessageText," "),m(),f("tabindex",r.disabled?-1:r.tabindex),O("data-p-hidden-focusable",!0))},dependencies:()=>[Ye,Ui,ot,Mt,st,qe,Hn,Fu,Va,Wi],styles:[`@layer primeng{.p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}} +`],encapsulation:2,changeDetection:0})}return n})(),dh=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Ge,Ln,mo,Va,Wi,Ge,mo]})}return n})();function Zl(n){return n instanceof Ce?n.nativeElement:n}var YI;try{YI=typeof Intl<"u"&&Intl.v8BreakIterator}catch{YI=!1}var w3=(()=>{let e=class e{constructor(i){this._platformId=i,this.isBrowser=this._platformId?Dt(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||YI)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}};e.\u0275fac=function(r){return new(r||e)(re(Nt))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var ph;function PQ(){if(ph==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>ph=!0}))}finally{ph=ph||!1}return ph}function hh(n){return PQ()?n:!!n.capture}var KI;function RQ(){if(KI==null){let n=typeof document<"u"?document.head:null;KI=!!(n&&(n.createShadowRoot||n.attachShadow))}return KI}function H0(n){if(RQ()){let e=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function fh(n){return n.composedPath?n.composedPath()[0]:n.target}var jQ=20,I3=(()=>{let e=class e{constructor(i,r,o){this._platform=i,this._change=new pe,this._changeListener=s=>{this._change.next(s)},this._document=o,r.runOutsideAngular(()=>{if(i.isBrowser){let s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let i=this._getWindow();i.removeEventListener("resize",this._changeListener),i.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let i={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),i}getViewportRect(){let i=this.getViewportScrollPosition(),{width:r,height:o}=this.getViewportSize();return{top:i.top,left:i.left,bottom:i.top+o,right:i.left+r,height:o,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let i=this._document,r=this._getWindow(),o=i.documentElement,s=o.getBoundingClientRect(),a=-s.top||i.body.scrollTop||r.scrollY||o.scrollTop||0,l=-s.left||i.body.scrollLeft||r.scrollX||o.scrollLeft||0;return{top:a,left:l}}change(i=jQ){return i>0?this._change.pipe(Sb(i)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let i=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:i.innerWidth,height:i.innerHeight}:{width:0,height:0}}};e.\u0275fac=function(r){return new(r||e)(re(w3),re(He),re(We,8))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var x3=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({});let n=e;return n})();function T3(n,...e){return e.length?e.some(t=>n[t]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}var XQ=200,ZI=class{constructor(e,t){this._letterKeyStream=new pe,this._items=[],this._selectedItemIndex=-1,this._pressedLetters=[],this._selectedItem=new pe,this.selectedItem=this._selectedItem;let i=typeof t?.debounceInterval=="number"?t.debounceInterval:XQ;t?.skipPredicate&&(this._skipPredicateFn=t.skipPredicate),this.setItems(e),this._setupKeyHandler(i)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(e){this._selectedItemIndex=e}setItems(e){this._items=e}handleKey(e){let t=e.keyCode;e.key&&e.key.length===1?this._letterKeyStream.next(e.key.toLocaleUpperCase()):(t>=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(e){this._letterKeyStream.pipe(jt(t=>this._pressedLetters.push(t)),Ts(e),rn(()=>this._pressedLetters.length>0),Ie(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(t=>{for(let i=1;ii.disabled,this.tabOut=new pe,this.change=new pe,e instanceof cu?this._itemChangesSubscription=e.changes.subscribe(i=>this._itemsChanged(i.toArray())):Ta(e)&&(this._effectRef=Da(()=>this._itemsChanged(e()),{injector:t}))}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){this._typeaheadSubscription.unsubscribe();let t=this._getItemsArray();return this._typeahead=new ZI(t,{debounceInterval:typeof e=="number"?e:void 0,skipPredicate:i=>this._skipPredicateFn(i)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(i=>{this.setActiveItem(i)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(e=!0){return this._homeAndEnd=e,this}withPageUpDown(e=!0,t=10){return this._pageUpAndDown={enabled:e,delta:t},this}setActiveItem(e){let t=this._activeItem;this.updateActiveItem(e),this._activeItem!==t&&this.change.next(this._activeItemIndex)}onKeydown(e){let t=e.keyCode,r=["altKey","ctrlKey","metaKey","shiftKey"].every(o=>!e[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(t){case 9:this.tabOut.next();return;case 40:if(this._vertical&&r){this.setNextItemActive();break}else return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&r){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&r){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(o-1&&t!==this._activeItemIndex&&(this._activeItemIndex=t,this._typeahead?.setCurrentSelectedItemIndex(t))}}};var mh=class extends JI{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}};function E3(n){return n.buttons===0||n.detail===0}function S3(n){let e=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}function H3(n){let e=n.cloneNode(!0),t=e.querySelectorAll("[id]"),i=n.nodeName.toLowerCase();e.removeAttribute("id");for(let r=0;r=i&&t<=r&&e>=o&&e<=s}function yh(n,e,t){n.top+=e,n.bottom=n.top+n.height,n.left+=t,n.right=n.left+n.width}function A3(n,e,t,i){let{top:r,right:o,bottom:s,left:a,width:l,height:c}=n,u=l*e,d=c*e;return i>r-d&&ia-u&&t{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:ox(t)})})}handleScroll(e){let t=fh(e),i=this.positions.get(t);if(!i)return null;let r=i.scrollPosition,o,s;if(t===this._document){let c=this.getViewportScrollPosition();o=c.top,s=c.left}else o=t.scrollTop,s=t.scrollLeft;let a=r.top-o,l=r.left-s;return this.positions.forEach((c,u)=>{c.clientRect&&t!==u&&t.contains(u)&&yh(c.clientRect,a,l)}),r.top=o,r.left=s,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function $3(n,e){let t=n.rootNodes;if(t.length===1&&t[0].nodeType===e.ELEMENT_NODE)return t[0];let i=e.createElement("div");return t.forEach(r=>i.appendChild(r)),i}function sx(n,e,t){for(let i in e)if(e.hasOwnProperty(i)){let r=e[i];r?n.setProperty(i,r,t?.has(i)?"important":""):n.removeProperty(i)}return n}function ju(n,e){let t=e?"":"none";sx(n.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function k3(n,e,t){sx(n.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function Q0(n,e){return e&&e!="none"?n+" "+e:n}function N3(n,e){n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n.style.transform=K0(e.left,e.top)}function K0(n,e){return`translate3d(${Math.round(n)}px, ${Math.round(e)}px, 0)`}function L3(n){let e=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*e}function tK(n){let e=getComputedStyle(n),t=XI(e,"transition-property"),i=t.find(a=>a==="transform"||a==="all");if(!i)return 0;let r=t.indexOf(i),o=XI(e,"transition-duration"),s=XI(e,"transition-delay");return L3(o[r])+L3(s[r])}function XI(n,e){return n.getPropertyValue(e).split(",").map(i=>i.trim())}var nK=new Set(["position"]),tx=class{get element(){return this._preview}constructor(e,t,i,r,o,s,a,l,c){this._document=e,this._rootElement=t,this._direction=i,this._initialDomRect=r,this._previewTemplate=o,this._previewClass=s,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=c}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),P3(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return tK(this._preview)}addEventListener(e,t){this._preview.addEventListener(e,t)}removeEventListener(e,t){this._preview.removeEventListener(e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,i=e?e.template:null,r;if(i&&e){let o=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(i,e.context);s.detectChanges(),r=$3(s,this._document),this._previewEmbeddedView=s,e.matchSize?N3(r,o):r.style.transform=K0(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=H3(this._rootElement),N3(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return sx(r.style,{"pointer-events":"none",margin:P3(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},nK),ju(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(o=>r.classList.add(o)):r.classList.add(t)),r}};function P3(n){return"showPopover"in n}var R3=hh({passive:!0}),$0=hh({passive:!1}),F3=hh({passive:!1,capture:!0}),iK=800,j3=new Set(["position"]),nx=class{get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>ju(t,e)))}constructor(e,t,i,r,o,s){this._config=t,this._document=i,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=Lt(!1),this._moveEvents=new pe,this._pointerMoveSubscription=et.EMPTY,this._pointerUpSubscription=et.EMPTY,this._scrollSubscription=et.EMPTY,this._resizeSubscription=et.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this.scale=1,this._disabled=!1,this.beforeStarted=new pe,this.started=new pe,this.released=new pe,this.ended=new pe,this.entered=new pe,this.exited=new pe,this.dropped=new pe,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){let l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{let l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging()){let u=Math.abs(l.x-this._pickupPositionOnPage.x),d=Math.abs(l.y-this._pickupPositionOnPage.y);if(u+d>=this._config.dragStartThreshold){let h=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),g=this._dropContainer;if(!h){this._endDragSequence(a);return}(!g||!g.isDragging()&&!g.isReceiving())&&(a.cancelable&&a.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(a)))}return}a.cancelable&&a.preventDefault();let c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{let u=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,d=this._activeTransform;d.x=c.x-u.x+this._passiveTransform.x,d.y=c.y-u.y+this._passiveTransform.y,this._applyRootElementTransform(d.x,d.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){let l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new q0(i),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(i=>Zl(i)),this._handles.forEach(i=>ju(i,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(i=>{this._handles.indexOf(i)>-1&&t.add(i)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=Zl(e);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,$0),t.addEventListener("touchstart",this._pointerDown,R3),t.addEventListener("dragstart",this._nativeDragStart,$0)}),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?Zl(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),ju(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),ju(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._getShadowRoot()?.removeEventListener("selectstart",B3,F3)}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){gh(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),i=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{t.addEventListener("selectstart",B3,F3)}),i){let r=this._rootElement,o=r.parentNode,s=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");o.insertBefore(a,r),this._initialTransform=r.style.transform||"",this._preview=new tx(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3),this._preview.attach(this._getPreviewInsertionPoint(o,t)),k3(r,!1,j3),this._document.body.appendChild(o.replaceChild(s,r)),this.started.next({source:this,event:e}),i.start(),this._initialContainer=i,this._initialIndex=i.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(i?i.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let i=this.isDragging(),r=gh(t),o=!r&&t.button!==0,s=this._rootElement,a=fh(t),l=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+iK>Date.now(),c=r?S3(t):E3(t);if(a&&a.draggable&&t.type==="mousedown"&&t.preventDefault(),i||o||l||c)return;if(this._handles.length){let p=s.style;this._rootElementTapHighlight=p.webkitTapHighlightColor||"",p.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(p=>this._updateOnScroll(p)),this._boundaryElement&&(this._boundaryRect=ox(this._boundaryElement));let u=this._previewTemplate;this._pickupPositionInElement=u&&u.template&&!u.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let d=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:d.x,y:d.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){k3(this._rootElement,!0,j3),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,i=t.getItemIndex(this),r=this._getPointerPositionOnPage(e),o=this._getDragDistance(r),s=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:o,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:i,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:r,event:e}),t.drop(this,i,this._initialIndex,this._initialContainer,s,o,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:i,y:r}){let o=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,e,t,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(i,r),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(i=>{let r=s=>{(!s||this._preview&&fh(s)===this._preview.element&&s.propertyName==="transform")&&(this._preview?.removeEventListener("transitionend",r),i(),clearTimeout(o))},o=setTimeout(r,t*1.5);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,i;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),i=$3(this._placeholderRef,this._document)):i=H3(this._rootElement),i.style.pointerEvents="none",i.classList.add("cdk-drag-placeholder"),i}_getPointerPositionInElement(e,t,i){let r=t===this._rootElement?null:t,o=r?r.getBoundingClientRect():e,s=gh(i)?i.targetTouches[0]:i,a=this._getViewportScrollPosition(),l=s.pageX-o.left-a.left,c=s.pageY-o.top-a.top;return{x:o.left-e.left+l,y:o.top-e.top+c}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),i=gh(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=i.pageX-t.left,o=i.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=o,a.matrixTransform(s.inverse())}}return{x:r,y:o}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:i,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(i=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:o,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),u=a.top+s,d=a.bottom-(c-s),p=a.left+o,h=a.right-(l-o);i=V3(i,p,h),r=V3(r,u,d)}return{x:i,y:r}}_updatePointerDirectionDelta(e){let{x:t,y:i}=e,r=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-o.x),a=Math.abs(i-o.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=t>o.x?1:-1,o.x=t),a>this._config.pointerDirectionChangeThreshold&&(r.y=i>o.y?1:-1,o.y=i),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,ju(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,$0),e.removeEventListener("touchstart",this._pointerDown,R3),e.removeEventListener("dragstart",this._nativeDragStart,$0)}_applyRootElementTransform(e,t){let i=1/this.scale,r=K0(e*i,t*i),o=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=o.transform&&o.transform!="none"?o.transform:""),o.transform=Q0(r,this._initialTransform)}_applyPreviewTransform(e,t){let i=this._previewTemplate?.template?void 0:this._initialTransform,r=K0(e,t);this._preview.setTransform(Q0(r,i))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let i=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||i.width===0&&i.height===0)return;let o=r.left-i.left,s=i.right-r.right,a=r.top-i.top,l=i.bottom-r.bottom;r.width>i.width?(o>0&&(e+=o),s>0&&(e-=s)):e=0,r.height>i.height?(a>0&&(t+=a),l>0&&(t-=l)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:gh(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let i=fh(e);this._boundaryRect&&i!==this._boundaryElement&&i.contains(this._boundaryElement)&&yh(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=H0(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let i=this._previewContainer||"global";if(i==="parent")return e;if(i==="global"){let r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return Zl(i)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function V3(n,e,t){return Math.max(e,Math.min(t,n))}function gh(n){return n.type[0]==="t"}function B3(n){n.preventDefault()}function ax(n,e,t){let i=z3(e,n.length-1),r=z3(t,n.length-1);if(i===r)return;let o=n[i],s=r0)return null;let a=this.orientation==="horizontal",l=o.findIndex(v=>v.drag===e),c=o[s],u=o[l].clientRect,d=c.clientRect,p=l>s?1:-1,h=this._getItemOffsetPx(u,d,p),g=this._getSiblingOffsetPx(l,o,p),_=o.slice();return ax(o,l,s),o.forEach((v,w)=>{if(_[w]===v)return;let S=v.drag===e,L=S?h:g,T=S?e.getPlaceholderElement():v.drag.getRootElement();v.offset+=L;let q=Math.round(v.offset*(1/v.drag.scale));a?(T.style.transform=Q0(`translate3d(${q}px, 0, 0)`,v.initialTransform),yh(v.clientRect,0,L)):(T.style.transform=Q0(`translate3d(0, ${q}px, 0)`,v.initialTransform),yh(v.clientRect,L,0))}),this._previousSwap.overlaps=ex(d,t,i),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:l,currentIndex:s}}enter(e,t,i,r){let o=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,i):r,s=this._activeDraggables,a=s.indexOf(e),l=e.getPlaceholderElement(),c=s[o];if(c===e&&(c=s[o+1]),!c&&(o==null||o===-1||o-1&&s.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){let u=c.getRootElement();u.parentElement.insertBefore(l,u),s.splice(o,0,e)}else this._element.appendChild(l),s.push(e);l.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let i=this._itemPositions.find(r=>r.drag===e)?.initialTransform;t.style.transform=i||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(i=>i.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:i})=>{yh(i,e,t)}),this._itemPositions.forEach(({drag:i})=>{this._dragDropRegistry.isDragging(i)&&i._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let i=t.getVisibleElement();return{drag:t,offset:0,initialTransform:i.style.transform||"",clientRect:ox(i)}}).sort((t,i)=>e?t.clientRect.left-i.clientRect.left:t.clientRect.top-i.clientRect.top)}_getItemOffsetPx(e,t,i){let r=this.orientation==="horizontal",o=r?t.left-e.left:t.top-e.top;return i===-1&&(o+=r?t.width-e.width:t.height-e.height),o}_getSiblingOffsetPx(e,t,i){let r=this.orientation==="horizontal",o=t[e].clientRect,s=t[e+i*-1],a=o[r?"width":"height"]*i;if(s){let l=r?"left":"top",c=r?"right":"bottom";i===-1?a-=s.clientRect[l]-o[c]:a+=o[l]-s.clientRect[c]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let i=this._itemPositions,r=this.orientation==="horizontal";if(i[0].drag!==this._activeDraggables[0]){let s=i[i.length-1].clientRect;return r?e>=s.right:t>=s.bottom}else{let s=i[0].clientRect;return r?e<=s.left:t<=s.top}}_getItemIndexFromPointerPosition(e,t,i,r){let o=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===e)return!1;if(r){let c=o?r.x:r.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return o?t>=Math.floor(l.left)&&t=Math.floor(l.top)&&il?u.after(c):u.before(c),ax(this._activeItems,l,o);let d=this._getRootNode().elementFromPoint(t,i);return s.deltaX=r.x,s.deltaY=r.y,s.drag=a,s.overlaps=u===d||u.contains(d),{previousIndex:l,currentIndex:o}}enter(e,t,i,r){let o=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,i):r;o===-1&&(o=this._getClosestItemIndexToPointer(e,t,i));let s=this._activeItems[o],a=this._activeItems.indexOf(e);a>-1&&this._activeItems.splice(a,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(o,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let i=this._relatedNodes.length-1;i>-1;i--){let[r,o]=this._relatedNodes[i];r.parentNode===e&&r.nextSibling!==o&&(o===null?e.appendChild(r):o.parentNode===e&&e.insertBefore(r,o))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,i){let r=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(i)),o=r?this._activeItems.findIndex(s=>{let a=s.getRootElement();return r===a||a.contains(r)}):-1;return o===-1||!this._sortPredicate(o,e)?-1:o}_getRootNode(){return this._rootNode||(this._rootNode=H0(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,i){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,o=-1;for(let s=0;s!0,this.sortPredicate=()=>!0,this.beforeStarted=new pe,this.entered=new pe,this.exited=new pe,this.dropped=new pe,this.sorted=new pe,this.receivingStarted=new pe,this.receivingStopped=new pe,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=et.EMPTY,this._verticalScrollDirection=Br.NONE,this._horizontalScrollDirection=Gi.NONE,this._stopScrollTimers=new pe,this._cachedShadowRoot=null,this._scrollableElements=[],this._direction="ltr",this._startScrollInterval=()=>{this._stopScrolling(),wb(0,_m).pipe(Ft(this._stopScrollTimers)).subscribe(()=>{let a=this._scrollNode,l=this.autoScrollStep;this._verticalScrollDirection===Br.UP?a.scrollBy(0,-l):this._verticalScrollDirection===Br.DOWN&&a.scrollBy(0,l),this._horizontalScrollDirection===Gi.LEFT?a.scrollBy(-l,0):this._horizontalScrollDirection===Gi.RIGHT&&a.scrollBy(l,0)})};let s=this.element=Zl(e);this._document=i,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new q0(i)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,i,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,i,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,i,r,o,s,a,l={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:i,container:this,previousContainer:r,isPointerOverContainer:o,distance:s,dropPoint:a,event:l})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(i=>i._withDropContainer(this)),this.isDragging()&&(t.filter(r=>r.isDragging()).every(r=>e.indexOf(r)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof Y0&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new ix(this._document,this._dragDropRegistry);else{let t=new Y0(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,i)=>this.sortPredicate(t,i,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=Zl(this.element),i=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(e);return i>-1&&this._scrollableElements.splice(i,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,i,r){if(this.sortingDisabled||!this._domRect||!A3(this._domRect,U3,t,i))return;let o=this._sortStrategy.sort(e,t,i,r);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let i,r=Br.NONE,o=Gi.NONE;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||i||A3(s.clientRect,U3,e,t)&&([r,o]=rK(a,s.clientRect,this._direction,e,t),(r||o)&&(i=a))}),!r&&!o){let{width:s,height:a}=this._viewportRuler.getViewportSize(),l={width:s,height:a,top:0,right:s,bottom:a,left:0};r=G3(l,t),o=q3(l,e),i=window}i&&(r!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||i!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=o,this._scrollNode=i,(r||o)&&i?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(e,t){return this._domRect!=null&&ex(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,i){return this._siblings.find(r=>r._canReceive(e,t,i))}_canReceive(e,t,i){if(!this._domRect||!ex(this._domRect,t,i)||!this.enterPredicate(e,this))return!1;let r=this._getShadowRoot().elementFromPoint(t,i);return r?r===this._container||this._container.contains(r):!1}_startReceiving(e,t){let i=this._activeSiblings;!i.has(e)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(i.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=H0(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function G3(n,e){let{top:t,bottom:i,height:r}=n,o=r*W3;return e>=t-o&&e<=t+o?Br.UP:e>=i-o&&e<=i+o?Br.DOWN:Br.NONE}function q3(n,e){let{left:t,right:i,width:r}=n,o=r*W3;return e>=t-o&&e<=t+o?Gi.LEFT:e>=i-o&&e<=i+o?Gi.RIGHT:Gi.NONE}function rK(n,e,t,i,r){let o=G3(e,r),s=q3(e,i),a=Br.NONE,l=Gi.NONE;if(o){let c=n.scrollTop;o===Br.UP?c>0&&(a=Br.UP):n.scrollHeight-c>n.clientHeight&&(a=Br.DOWN)}if(s){let c=n.scrollLeft;t==="rtl"?s===Gi.RIGHT?c<0&&(l=Gi.RIGHT):n.scrollWidth+c>n.clientWidth&&(l=Gi.LEFT):s===Gi.LEFT?c>0&&(l=Gi.LEFT):n.scrollWidth-c>n.clientWidth&&(l=Gi.RIGHT)}return[a,l]}var W0=hh({passive:!1,capture:!0}),G0=new Set,oK=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],standalone:!0,features:[ue],decls:0,vars:0,template:function(r,o){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"],encapsulation:2,changeDetection:0});let n=e;return n})(),sK=(()=>{let e=class e{constructor(i,r){this._ngZone=i,this._appRef=B(fi),this._environmentInjector=B(pi),this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=Lt([]),this._globalListeners=new Map,this._draggingPredicate=o=>o.isDragging(),this.pointerMove=new pe,this.pointerUp=new pe,this.scroll=new pe,this._preventDefaultWhileDragging=o=>{this._activeDragInstances().length>0&&o.preventDefault()},this._persistentTouchmoveListener=o=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&o.preventDefault(),this.pointerMove.next(o))},this._document=r}registerDropContainer(i){this._dropInstances.has(i)||this._dropInstances.add(i)}registerDragItem(i){this._dragInstances.add(i),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,W0)})}removeDropContainer(i){this._dropInstances.delete(i)}removeDragItem(i){this._dragInstances.delete(i),this.stopDragging(i),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,W0)}startDragging(i,r){if(!(this._activeDragInstances().indexOf(i)>-1)&&(this._loadResets(),this._activeDragInstances.update(o=>[...o,i]),this._activeDragInstances().length===1)){let o=r.type.startsWith("touch");this._globalListeners.set(o?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:W0}),o||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:W0}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,a)=>{this._document.addEventListener(a,s.handler,s.options)})})}}stopDragging(i){this._activeDragInstances.update(r=>{let o=r.indexOf(i);return o>-1?(r.splice(o,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(i){return this._activeDragInstances().indexOf(i)>-1}scrolled(i){let r=[this.scroll];return i&&i!==this._document&&r.push(new Qe(o=>this._ngZone.runOutsideAngular(()=>{let a=l=>{this._activeDragInstances().length&&o.next(l)};return i.addEventListener("scroll",a,!0),()=>{i.removeEventListener("scroll",a,!0)}}))),dp(...r)}ngOnDestroy(){this._dragInstances.forEach(i=>this.removeDragItem(i)),this._dropInstances.forEach(i=>this.removeDropContainer(i)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((i,r)=>{this._document.removeEventListener(r,i.handler,i.options)}),this._globalListeners.clear()}_loadResets(){if(!G0.has(this._appRef)){G0.add(this._appRef);let i=Tu(oK,{environmentInjector:this._environmentInjector});this._appRef.onDestroy(()=>{G0.delete(this._appRef),G0.size===0&&i.destroy()})}}};e.\u0275fac=function(r){return new(r||e)(re(He),re(We))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})(),aK={dragStartThreshold:5,pointerDirectionChangeThreshold:5},lK=(()=>{let e=class e{constructor(i,r,o,s){this._document=i,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s}createDrag(i,r=aK){return new nx(i,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(i){return new rx(i,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}};e.\u0275fac=function(r){return new(r||e)(re(We),re(He),re(I3),re(sK))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var lx=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({providers:[lK],imports:[x3]});let n=e;return n})();var ts=(()=>{class n{autofocus=!1;focused=!1;platformId=B(Nt);document=B(We);host=B(Ce);ngAfterContentChecked(){this.autofocus===!1?this.host.nativeElement.removeAttribute("autofocus"):this.host.nativeElement.setAttribute("autofocus",!0),this.focused||this.autoFocus()}ngAfterViewChecked(){this.focused||this.autoFocus()}autoFocus(){Dt(this.platformId)&&this.autofocus&&setTimeout(()=>{let t=A.getFocusableElements(this.host?.nativeElement);t.length===0&&this.host.nativeElement.focus(),t.length>0&&t[0].focus(),this.focused=!0})}static \u0275fac=function(i){return new(i||n)};static \u0275dir=gt({type:n,selectors:[["","pAutoFocus",""]],hostAttrs:[1,"p-element"],inputs:{autofocus:[2,"autofocus","autofocus",V]},standalone:!0,features:[$e]})}return n})(),Ba=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({})}return n})();var cK=["*"],Q3=n=>({class:n});function uK(n,e){n&1&&ye(0)}function dK(n,e){if(n&1&&E(0,"span",8),n&2){let t=y(3);f("ngClass",t.iconClass()),O("aria-hidden",!0)("data-pc-section","loadingicon")}}function pK(n,e){if(n&1&&E(0,"SpinnerIcon",9),n&2){let t=y(3);f("styleClass",t.spinnerIconClass())("spin",!0),O("aria-hidden",!0)("data-pc-section","loadingicon")}}function hK(n,e){if(n&1&&(oe(0),x(1,dK,1,3,"span",6)(2,pK,1,4,"SpinnerIcon",7),se()),n&2){let t=y(2);m(),f("ngIf",t.loadingIcon),m(),f("ngIf",!t.loadingIcon)}}function fK(n,e){}function mK(n,e){if(n&1&&x(0,fK,0,0,"ng-template",10),n&2){let t=y(2);f("ngIf",t.loadingIconTemplate)}}function gK(n,e){if(n&1&&(oe(0),x(1,hK,3,2,"ng-container",2)(2,mK,1,1,null,5),se()),n&2){let t=y();m(),f("ngIf",!t.loadingIconTemplate),m(),f("ngTemplateOutlet",t.loadingIconTemplate)("ngTemplateOutletContext",_e(3,Q3,t.iconClass()))}}function yK(n,e){if(n&1&&E(0,"span",8),n&2){let t=y(2);f("ngClass",t.iconClass()),O("data-pc-section","icon")}}function _K(n,e){}function vK(n,e){if(n&1&&x(0,_K,0,0,"ng-template",10),n&2){let t=y(2);f("ngIf",!t.icon&&t.iconTemplate)}}function bK(n,e){if(n&1&&(oe(0),x(1,yK,1,2,"span",6)(2,vK,1,1,null,5),se()),n&2){let t=y();m(),f("ngIf",t.icon&&!t.iconTemplate),m(),f("ngTemplateOutlet",t.iconTemplate)("ngTemplateOutletContext",_e(3,Q3,t.iconClass()))}}function CK(n,e){if(n&1&&(b(0,"span",11),Z(1),C()),n&2){let t=y();O("aria-hidden",t.icon&&!t.label)("data-pc-section","label"),m(),Pe(t.label)}}function wK(n,e){if(n&1&&(b(0,"span",8),Z(1),C()),n&2){let t=y();W(t.badgeClass),f("ngClass",t.badgeStyleClass()),O("data-pc-section","badge"),m(),Pe(t.badge)}}var za={button:"p-button",component:"p-component",iconOnly:"p-button-icon-only",disabled:"p-disabled",loading:"p-button-loading",labelOnly:"p-button-loading-label-only"},zt=(()=>{class n{el;document;iconPos="left";loadingIcon;get label(){return this._label}set label(t){this._label=t,this.initialized&&(this.updateLabel(),this.updateIcon(),this.setStyleClass())}get icon(){return this._icon}set icon(t){this._icon=t,this.initialized&&(this.updateIcon(),this.setStyleClass())}get loading(){return this._loading}set loading(t){this._loading=t,this.initialized&&(this.updateIcon(),this.setStyleClass())}severity;raised=!1;rounded=!1;text=!1;outlined=!1;size=null;plain=!1;_label;_icon;_loading=!1;initialized;get htmlElement(){return this.el.nativeElement}_internalClasses=Object.values(za);constructor(t,i){this.el=t,this.document=i}ngAfterViewInit(){A.addMultipleClasses(this.htmlElement,this.getStyleClass().join(" ")),this.createIcon(),this.createLabel(),this.initialized=!0}getStyleClass(){let t=[za.button,za.component];return this.icon&&!this.label&&Ee.isEmpty(this.htmlElement.textContent)&&t.push(za.iconOnly),this.loading&&(t.push(za.disabled,za.loading),!this.icon&&this.label&&t.push(za.labelOnly),this.icon&&!this.label&&!Ee.isEmpty(this.htmlElement.textContent)&&t.push(za.iconOnly)),this.text&&t.push("p-button-text"),this.severity&&t.push(`p-button-${this.severity}`),this.plain&&t.push("p-button-plain"),this.raised&&t.push("p-button-raised"),this.size&&t.push(`p-button-${this.size}`),this.outlined&&t.push("p-button-outlined"),this.rounded&&t.push("p-button-rounded"),this.size==="small"&&t.push("p-button-sm"),this.size==="large"&&t.push("p-button-lg"),t}setStyleClass(){let t=this.getStyleClass();this.htmlElement.classList.remove(...this._internalClasses),this.htmlElement.classList.add(...t)}createLabel(){if(!A.findSingle(this.htmlElement,".p-button-label")&&this.label){let i=this.document.createElement("span");this.icon&&!this.label&&i.setAttribute("aria-hidden","true"),i.className="p-button-label",i.appendChild(this.document.createTextNode(this.label)),this.htmlElement.appendChild(i)}}createIcon(){if(!A.findSingle(this.htmlElement,".p-button-icon")&&(this.icon||this.loading)){let i=this.document.createElement("span");i.className="p-button-icon",i.setAttribute("aria-hidden","true");let r=this.label?"p-button-icon-"+this.iconPos:null;r&&A.addClass(i,r);let o=this.getIconClass();o&&A.addMultipleClasses(i,o),this.htmlElement.insertBefore(i,this.htmlElement.firstChild)}}updateLabel(){let t=A.findSingle(this.htmlElement,".p-button-label");if(!this.label){t&&this.htmlElement.removeChild(t);return}t?t.textContent=this.label:this.createLabel()}updateIcon(){let t=A.findSingle(this.htmlElement,".p-button-icon"),i=A.findSingle(this.htmlElement,".p-button-label");t?this.iconPos?t.className="p-button-icon "+(i?"p-button-icon-"+this.iconPos:"")+" "+this.getIconClass():t.className="p-button-icon "+this.getIconClass():this.createIcon()}getIconClass(){return this.loading?"p-button-loading-icon pi-spin "+(this.loadingIcon??"pi pi-spinner"):this.icon||"p-hidden"}ngOnDestroy(){this.initialized=!1}static \u0275fac=function(i){return new(i||n)(k(Ce),k(We))};static \u0275dir=gt({type:n,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading",severity:"severity",raised:[2,"raised","raised",V],rounded:[2,"rounded","rounded",V],text:[2,"text","text",V],outlined:[2,"outlined","outlined",V],size:"size",plain:[2,"plain","plain",V]},standalone:!0,features:[$e]})}return n})(),cx=(()=>{class n{el;type="button";iconPos="left";icon;badge;label;disabled;loading=!1;loadingIcon;raised=!1;rounded=!1;text=!1;plain=!1;severity;outlined=!1;link=!1;tabindex;size;style;styleClass;badgeClass;ariaLabel;autofocus;onClick=new j;onFocus=new j;onBlur=new j;contentTemplate;loadingIconTemplate;iconTemplate;templates;constructor(t){this.el=t}spinnerIconClass(){return Object.entries(this.iconClass()).filter(([,t])=>!!t).reduce((t,[i])=>t+` ${i}`,"p-button-loading-icon")}iconClass(){let t={"p-button-icon":!0,"p-button-icon-left":this.iconPos==="left"&&this.label,"p-button-icon-right":this.iconPos==="right"&&this.label,"p-button-icon-top":this.iconPos==="top"&&this.label,"p-button-icon-bottom":this.iconPos==="bottom"&&this.label};return this.loading?t[`p-button-loading-icon pi-spin ${this.loadingIcon??""}`]=!0:this.icon&&(t[this.icon]=!0),t}get buttonClass(){return{"p-button p-component":!0,"p-button-icon-only":(this.icon||this.iconTemplate||this.loadingIcon||this.loadingIconTemplate)&&!this.label,"p-button-vertical":(this.iconPos==="top"||this.iconPos==="bottom")&&this.label,"p-button-loading":this.loading,"p-button-loading-label-only":this.loading&&!this.icon&&this.label&&!this.loadingIcon&&this.iconPos==="left","p-button-link":this.link,[`p-button-${this.severity}`]:this.severity,"p-button-raised":this.raised,"p-button-rounded":this.rounded,"p-button-text":this.text,"p-button-outlined":this.outlined,"p-button-sm":this.size==="small","p-button-lg":this.size==="large","p-button-plain":this.plain,[`${this.styleClass}`]:this.styleClass}}ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"content":this.contentTemplate=t.template;break;case"icon":this.iconTemplate=t.template;break;case"loadingicon":this.loadingIconTemplate=t.template;break;default:this.contentTemplate=t.template;break}})}badgeStyleClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.badge&&String(this.badge).length===1}}focus(){this.el.nativeElement.firstChild.focus()}static \u0275fac=function(i){return new(i||n)(k(Ce))};static \u0275cmp=F({type:n,selectors:[["p-button"]],contentQueries:function(i,r,o){if(i&1&&Je(o,qe,4),i&2){let s;J(s=X())&&(r.templates=s)}},hostAttrs:[1,"p-element"],hostVars:2,hostBindings:function(i,r){i&2&&Gt("p-disabled",r.disabled)},inputs:{type:"type",iconPos:"iconPos",icon:"icon",badge:"badge",label:"label",disabled:[2,"disabled","disabled",V],loading:[2,"loading","loading",V],loadingIcon:"loadingIcon",raised:[2,"raised","raised",V],rounded:[2,"rounded","rounded",V],text:[2,"text","text",V],plain:[2,"plain","plain",V],severity:"severity",outlined:[2,"outlined","outlined",V],link:[2,"link","link",V],tabindex:[2,"tabindex","tabindex",Ke],size:"size",style:"style",styleClass:"styleClass",badgeClass:"badgeClass",ariaLabel:"ariaLabel",autofocus:[2,"autofocus","autofocus",V]},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},standalone:!0,features:[$e,ue],ngContentSelectors:cK,decls:7,vars:14,consts:[["pRipple","","pAutoFocus","",3,"click","focus","blur","ngStyle","disabled","ngClass","autofocus"],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-button-label",4,"ngIf"],[3,"ngClass","class",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass",4,"ngIf"],[3,"styleClass","spin",4,"ngIf"],[3,"ngClass"],[3,"styleClass","spin"],[3,"ngIf"],[1,"p-button-label"]],template:function(i,r){i&1&&(ln(),b(0,"button",0),P("click",function(s){return r.onClick.emit(s)})("focus",function(s){return r.onFocus.emit(s)})("blur",function(s){return r.onBlur.emit(s)}),Vt(1),x(2,uK,1,0,"ng-container",1)(3,gK,3,5,"ng-container",2)(4,bK,3,5,"ng-container",2)(5,CK,2,3,"span",3)(6,wK,2,5,"span",4),C()),i&2&&(f("ngStyle",r.style)("disabled",r.disabled||r.loading)("ngClass",r.buttonClass)("autofocus",r.autofocus),O("type",r.type)("aria-label",r.ariaLabel)("data-pc-name","button")("data-pc-section","root")("tabindex",r.tabindex),m(2),f("ngTemplateOutlet",r.contentTemplate),m(),f("ngIf",r.loading),m(),f("ngIf",!r.loading),m(),f("ngIf",!r.contentTemplate&&r.label),m(),f("ngIf",!r.contentTemplate&&r.badge))},dependencies:[ot,Mt,st,Ye,Hn,ts,uh],encapsulation:2,changeDetection:0})}return n})(),an=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[cx,Ge]})}return n})();var K3=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["AngleDoubleDownIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.70786 6.59831C6.80043 6.63674 6.89974 6.65629 6.99997 6.65581C7.19621 6.64081 7.37877 6.54953 7.50853 6.40153L11.0685 2.8416C11.1364 2.69925 11.1586 2.53932 11.132 2.38384C11.1053 2.22837 11.0311 2.08498 10.9195 1.97343C10.808 1.86188 10.6646 1.78766 10.5091 1.76099C10.3536 1.73431 10.1937 1.75649 10.0513 1.82448L6.99997 4.87585L3.9486 1.82448C3.80625 1.75649 3.64632 1.73431 3.49084 1.76099C3.33536 1.78766 3.19197 1.86188 3.08043 1.97343C2.96888 2.08498 2.89466 2.22837 2.86798 2.38384C2.84131 2.53932 2.86349 2.69925 2.93147 2.8416L6.46089 6.43205C6.53132 6.50336 6.61528 6.55989 6.70786 6.59831ZM6.70786 12.1925C6.80043 12.2309 6.89974 12.2505 6.99997 12.25C7.10241 12.2465 7.20306 12.2222 7.29575 12.1785C7.38845 12.1348 7.47124 12.0726 7.53905 11.9957L11.0685 8.46629C11.1614 8.32292 11.2036 8.15249 11.1881 7.98233C11.1727 7.81216 11.1005 7.6521 10.9833 7.52781C10.866 7.40353 10.7104 7.3222 10.5415 7.29688C10.3725 7.27155 10.1999 7.30369 10.0513 7.38814L6.99997 10.4395L3.9486 7.38814C3.80006 7.30369 3.62747 7.27155 3.45849 7.29688C3.28951 7.3222 3.13393 7.40353 3.01667 7.52781C2.89942 7.6521 2.82729 7.81216 2.81184 7.98233C2.79639 8.15249 2.83852 8.32292 2.93148 8.46629L6.4609 12.0262C6.53133 12.0975 6.61529 12.1541 6.70786 12.1925Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var Y3=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["AngleDoubleUpIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M10.1504 6.67719C10.2417 6.71508 10.3396 6.73436 10.4385 6.73389C10.6338 6.74289 10.8249 6.67441 10.97 6.54334C11.1109 6.4023 11.19 6.21112 11.19 6.01178C11.19 5.81245 11.1109 5.62127 10.97 5.48023L7.45977 1.96998C7.31873 1.82912 7.12755 1.75 6.92821 1.75C6.72888 1.75 6.5377 1.82912 6.39666 1.96998L2.9165 5.45014C2.83353 5.58905 2.79755 5.751 2.81392 5.91196C2.83028 6.07293 2.89811 6.22433 3.00734 6.34369C3.11656 6.46306 3.26137 6.54402 3.42025 6.57456C3.57914 6.60511 3.74364 6.5836 3.88934 6.51325L6.89813 3.50446L9.90691 6.51325C9.97636 6.58357 10.0592 6.6393 10.1504 6.67719ZM9.93702 11.9993C10.065 12.1452 10.245 12.2352 10.4385 12.25C10.632 12.2352 10.812 12.1452 10.9399 11.9993C11.0633 11.8614 11.1315 11.6828 11.1315 11.4978C11.1315 11.3128 11.0633 11.1342 10.9399 10.9963L7.48987 7.48609C7.34883 7.34523 7.15765 7.26611 6.95832 7.26611C6.75899 7.26611 6.5678 7.34523 6.42677 7.48609L2.91652 10.9963C2.84948 11.1367 2.82761 11.2944 2.85391 11.4477C2.88022 11.601 2.9534 11.7424 3.06339 11.8524C3.17338 11.9624 3.31477 12.0356 3.46808 12.0619C3.62139 12.0882 3.77908 12.0663 3.91945 11.9993L6.92823 8.99048L9.93702 11.9993Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var _h=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["AngleDownIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M3.58659 4.5007C3.68513 4.50023 3.78277 4.51945 3.87379 4.55723C3.9648 4.59501 4.04735 4.65058 4.11659 4.7207L7.11659 7.7207L10.1166 4.7207C10.2619 4.65055 10.4259 4.62911 10.5843 4.65956C10.7427 4.69002 10.8871 4.77074 10.996 4.88976C11.1049 5.00877 11.1726 5.15973 11.1889 5.32022C11.2052 5.48072 11.1693 5.6422 11.0866 5.7807L7.58659 9.2807C7.44597 9.42115 7.25534 9.50004 7.05659 9.50004C6.85784 9.50004 6.66722 9.42115 6.52659 9.2807L3.02659 5.7807C2.88614 5.64007 2.80725 5.44945 2.80725 5.2507C2.80725 5.05195 2.88614 4.86132 3.02659 4.7207C3.09932 4.64685 3.18675 4.58911 3.28322 4.55121C3.37969 4.51331 3.48305 4.4961 3.58659 4.5007Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var vh=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["AngleUpIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M10.4134 9.49931C10.3148 9.49977 10.2172 9.48055 10.1262 9.44278C10.0352 9.405 9.95263 9.34942 9.88338 9.27931L6.88338 6.27931L3.88338 9.27931C3.73811 9.34946 3.57409 9.3709 3.41567 9.34044C3.25724 9.30999 3.11286 9.22926 3.00395 9.11025C2.89504 8.99124 2.82741 8.84028 2.8111 8.67978C2.79478 8.51928 2.83065 8.35781 2.91338 8.21931L6.41338 4.71931C6.55401 4.57886 6.74463 4.49997 6.94338 4.49997C7.14213 4.49997 7.33276 4.57886 7.47338 4.71931L10.9734 8.21931C11.1138 8.35994 11.1927 8.55056 11.1927 8.74931C11.1927 8.94806 11.1138 9.13868 10.9734 9.27931C10.9007 9.35315 10.8132 9.41089 10.7168 9.44879C10.6203 9.48669 10.5169 9.5039 10.4134 9.49931Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var bh=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,an,Ge,Ln,lx,K3,Y3,vh,_h,Va,Ge,lx]})}return n})();var Z3=["data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNjMyODEgMjJWMjEuMDE1Nkw3LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw2LjYzMjgxIDExLjYxNzJWMTAuNjI1SDEwLjcxODhWMTEuNjE3Mkw5LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxNC44ODI4VjExLjgzNTlMMTMuNjA5NCAxMS42MTcyVjEwLjYyNUgxNy42OTUzVjExLjYxNzJMMTYuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTcuNjk1MyAyMS4wMTU2VjIySDEzLjYwOTRWMjEuMDE1NkwxNC44ODI4IDIwLjc5NjlWMTYuOTc2Nkg5LjQ0NTMxVjIwLjc5NjlMMTAuNzE4OCAyMS4wMTU2VjIySDYuNjMyODFaTTE5LjI3MzQgMjJWMjEuMDE1NkwyMS4wMzEyIDIwLjc5NjlWMTIuMjczNEwxOS4yNDIyIDEyLjMwNDdWMTEuMzQzOEwyMi41NzAzIDEwLjYyNVYyMC43OTY5TDI0LjMyMDMgMjEuMDE1NlYyMkgxOS4yNzM0WiIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTE4LjA4NTkgMjJWMjAuOTQ1M0wyMS44MTI1IDE2LjgwNDdDMjIuMjU1MiAxNi4zMDk5IDIyLjYwMTYgMTUuODg4IDIyLjg1MTYgMTUuNTM5MUMyMy4xMDE2IDE1LjE4NDkgMjMuMjc2IDE0Ljg2NDYgMjMuMzc1IDE0LjU3ODFDMjMuNDc0IDE0LjI5MTcgMjMuNTIzNCAxMy45OTQ4IDIzLjUyMzQgMTMuNjg3NUMyMy41MjM0IDEzLjExOTggMjMuMzUxNiAxMi42NDMyIDIzLjAwNzggMTIuMjU3OEMyMi42NjQxIDExLjg2NzIgMjIuMTcxOSAxMS42NzE5IDIxLjUzMTIgMTEuNjcxOUMyMC44NjQ2IDExLjY3MTkgMjAuMzQzOCAxMS44NzI0IDE5Ljk2ODggMTIuMjczNEMxOS41OTkgMTIuNjc0NSAxOS40MTQxIDEzLjI0MjIgMTkuNDE0MSAxMy45NzY2SDE3LjkzNzVMMTcuOTIxOSAxMy45Mjk3QzE3LjkwNjIgMTMuMjczNCAxOC4wNDQzIDEyLjY4NDkgMTguMzM1OSAxMi4xNjQxQzE4LjYyNzYgMTEuNjM4IDE5LjA0OTUgMTEuMjI0IDE5LjYwMTYgMTAuOTIxOUMyMC4xNTg5IDEwLjYxNDYgMjAuODIwMyAxMC40NjA5IDIxLjU4NTkgMTAuNDYwOUMyMi4zMDQ3IDEwLjQ2MDkgMjIuOTIxOSAxMC41OTkgMjMuNDM3NSAxMC44NzVDMjMuOTU4MyAxMS4xNDU4IDI0LjM1OTQgMTEuNTE4MiAyNC42NDA2IDExLjk5MjJDMjQuOTIxOSAxMi40NjYxIDI1LjA2MjUgMTMuMDEwNCAyNS4wNjI1IDEzLjYyNUMyNS4wNjI1IDE0LjI1IDI0Ljg3NzYgMTQuODcyNCAyNC41MDc4IDE1LjQ5MjJDMjQuMTQzMiAxNi4xMTIgMjMuNjI3NiAxNi43ODEyIDIyLjk2MDkgMTcuNUwxOS45Njg4IDIwLjc1NzhMMTkuOTg0NCAyMC43OTY5SDI0LjAyMzRMMjQuMTQ4NCAxOS40OTIySDI1LjQ1MzFWMjJIMTguMDg1OVoiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg==","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTUuNjMyODEgMjJWMjEuMDE1Nkw2LjkwNjI1IDIwLjc5NjlWMTEuODM1OUw1LjYzMjgxIDExLjYxNzJWMTAuNjI1SDkuNzE4NzVWMTEuNjE3Mkw4LjQ0NTMxIDExLjgzNTlWMTUuNzY1NkgxMy44ODI4VjExLjgzNTlMMTIuNjA5NCAxMS42MTcyVjEwLjYyNUgxNi42OTUzVjExLjYxNzJMMTUuNDIxOSAxMS44MzU5VjIwLjc5NjlMMTYuNjk1MyAyMS4wMTU2VjIySDEyLjYwOTRWMjEuMDE1NkwxMy44ODI4IDIwLjc5NjlWMTYuOTc2Nkg4LjQ0NTMxVjIwLjc5NjlMOS43MTg3NSAyMS4wMTU2VjIySDUuNjMyODFaTTIxLjQ2ODggMjIuMTY0MUMyMC43NzYgMjIuMTY0MSAyMC4xNTg5IDIyLjAzOTEgMTkuNjE3MiAyMS43ODkxQzE5LjA3NTUgMjEuNTMzOSAxOC42NTEgMjEuMTc0NSAxOC4zNDM4IDIwLjcxMDlDMTguMDQxNyAyMC4yNDIyIDE3Ljg5ODQgMTkuNjg3NSAxNy45MTQxIDE5LjA0NjlMMTcuOTM3NSAxOUgxOS40MDYyQzE5LjQwNjIgMTkuNTk5IDE5LjU4ODUgMjAuMDc1NSAxOS45NTMxIDIwLjQyOTdDMjAuMzIyOSAyMC43ODM5IDIwLjgyODEgMjAuOTYwOSAyMS40Njg4IDIwLjk2MDlDMjIuMTE5OCAyMC45NjA5IDIyLjYzMDIgMjAuNzgzOSAyMyAyMC40Mjk3QzIzLjM2OTggMjAuMDc1NSAyMy41NTQ3IDE5LjU1MjEgMjMuNTU0NyAxOC44NTk0QzIzLjU1NDcgMTguMTU2MiAyMy4zOTA2IDE3LjYzOCAyMy4wNjI1IDE3LjMwNDdDMjIuNzM0NCAxNi45NzE0IDIyLjIxNjEgMTYuODA0NyAyMS41MDc4IDE2LjgwNDdIMjAuMTY0MVYxNS42MDE2SDIxLjUwNzhDMjIuMTkwMSAxNS42MDE2IDIyLjY3MTkgMTUuNDMyMyAyMi45NTMxIDE1LjA5MzhDMjMuMjM5NiAxNC43NSAyMy4zODI4IDE0LjI3MzQgMjMuMzgyOCAxMy42NjQxQzIzLjM4MjggMTIuMzM1OSAyMi43NDQ4IDExLjY3MTkgMjEuNDY4OCAxMS42NzE5QzIwLjg2OTggMTEuNjcxOSAyMC4zODggMTEuODQ5IDIwLjAyMzQgMTIuMjAzMUMxOS42NjQxIDEyLjU1MjEgMTkuNDg0NCAxMy4wMTgyIDE5LjQ4NDQgMTMuNjAxNkgxOC4wMDc4TDE3Ljk5MjIgMTMuNTU0N0MxNy45NzY2IDEyLjk4MTggMTguMTEyIDEyLjQ2MDkgMTguMzk4NCAxMS45OTIyQzE4LjY5MDEgMTEuNTIzNCAxOS4wOTkgMTEuMTUxIDE5LjYyNSAxMC44NzVDMjAuMTU2MiAxMC41OTkgMjAuNzcwOCAxMC40NjA5IDIxLjQ2ODggMTAuNDYwOUMyMi41MjA4IDEwLjQ2MDkgMjMuMzU5NCAxMC43NDIyIDIzLjk4NDQgMTEuMzA0N0MyNC42MDk0IDExLjg2MiAyNC45MjE5IDEyLjY1ODkgMjQuOTIxOSAxMy42OTUzQzI0LjkyMTkgMTQuMTY0MSAyNC43Nzg2IDE0LjYzMjggMjQuNDkyMiAxNS4xMDE2QzI0LjIxMDkgMTUuNTY1MSAyMy43ODY1IDE1LjkxOTMgMjMuMjE4OCAxNi4xNjQxQzIzLjkwMSAxNi4zODggMjQuMzgyOCAxNi43Mzk2IDI0LjY2NDEgMTcuMjE4OEMyNC45NTA1IDE3LjY5NzkgMjUuMDkzOCAxOC4yMzQ0IDI1LjA5MzggMTguODI4MUMyNS4wOTM4IDE5LjUyMDggMjQuOTM3NSAyMC4xMTcyIDI0LjYyNSAyMC42MTcyQzI0LjMxNzcgMjEuMTEyIDIzLjg5MDYgMjEuNDk0OCAyMy4zNDM4IDIxLjc2NTZDMjIuNzk2OSAyMi4wMzEyIDIyLjE3MTkgMjIuMTY0MSAyMS40Njg4IDIyLjE2NDFaIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo=","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMiAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNjMyODEyIDE2VjE1LjAxNTZMMS45MDYyNSAxNC43OTY5VjUuODM1OTRMMC42MzI4MTIgNS42MTcxOVY0LjYyNUg0LjcxODc1VjUuNjE3MTlMMy40NDUzMSA1LjgzNTk0VjkuNzY1NjJIOC44ODI4MVY1LjgzNTk0TDcuNjA5MzggNS42MTcxOVY0LjYyNUgxMS42OTUzVjUuNjE3MTlMMTAuNDIxOSA1LjgzNTk0VjE0Ljc5NjlMMTEuNjk1MyAxNS4wMTU2VjE2SDcuNjA5MzhWMTUuMDE1Nkw4Ljg4MjgxIDE0Ljc5NjlWMTAuOTc2NkgzLjQ0NTMxVjE0Ljc5NjlMNC43MTg3NSAxNS4wMTU2VjE2SDAuNjMyODEyWiIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE2LjY1NjIgMTZWMTUuMDE1NkwxNy45Mjk3IDE0Ljc5NjlWMTMuMzc1SDEyLjgyMDNWMTIuNTA3OEwxNy44MzU5IDQuNjI1SDE5LjQ2MDlWMTIuMTcxOUgyMS4wMzEyVjEzLjM3NUgxOS40NjA5VjE0Ljc5NjlMMjAuNzM0NCAxNS4wMTU2VjE2SDE2LjY1NjJaTTE0LjQ2MDkgMTIuMTcxOUgxNy45Mjk3VjYuODIwMzFMMTcuODgyOCA2LjgwNDY5TDE3LjcyNjYgNy4yMTg3NUwxNC40NjA5IDEyLjE3MTlaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNjMyODEyIDE2VjE1LjAxNTZMMS45MDYyNSAxNC43OTY5VjUuODM1OTRMMC42MzI4MTIgNS42MTcxOVY0LjYyNUg0LjcxODc1VjUuNjE3MTlMMy40NDUzMSA1LjgzNTk0VjkuNzY1NjJIOC44ODI4MVY1LjgzNTk0TDcuNjA5MzggNS42MTcxOVY0LjYyNUgxMS42OTUzVjUuNjE3MTlMMTAuNDIxOSA1LjgzNTk0VjE0Ljc5NjlMMTEuNjk1MyAxNS4wMTU2VjE2SDcuNjA5MzhWMTUuMDE1Nkw4Ljg4MjgxIDE0Ljc5NjlWMTAuOTc2NkgzLjQ0NTMxVjE0Ljc5NjlMNC43MTg3NSAxNS4wMTU2VjE2SDAuNjMyODEyWiIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE2LjQwNjIgMTYuMTY0MUMxNS43NjU2IDE2LjE2NDEgMTUuMTkwMSAxNi4wNDY5IDE0LjY3OTcgMTUuODEyNUMxNC4xNzQ1IDE1LjU3ODEgMTMuNzc4NiAxNS4yMzE4IDEzLjQ5MjIgMTQuNzczNEMxMy4yMDU3IDE0LjMwOTkgMTMuMDcwMyAxMy43MzcgMTMuMDg1OSAxMy4wNTQ3TDEzLjEwMTYgMTMuMDA3OEgxNC40OTIyQzE0LjQ5MjIgMTMuNjIyNCAxNC42NjkzIDE0LjEwMTYgMTUuMDIzNCAxNC40NDUzQzE1LjM4MjggMTQuNzg5MSAxNS44NDM4IDE0Ljk2MDkgMTYuNDA2MiAxNC45NjA5QzE3LjA1NzMgMTQuOTYwOSAxNy41NjI1IDE0LjczMTggMTcuOTIxOSAxNC4yNzM0QzE4LjI4MTIgMTMuODE1MSAxOC40NjA5IDEzLjE4NzUgMTguNDYwOSAxMi4zOTA2QzE4LjQ2MDkgMTEuNjU2MiAxOC4yNzg2IDExLjA1NzMgMTcuOTE0MSAxMC41OTM4QzE3LjU1NDcgMTAuMTI1IDE3LjA1NDcgOS44OTA2MiAxNi40MTQxIDkuODkwNjJDMTUuODA5OSA5Ljg5MDYyIDE1LjM2OTggOS45ODE3NyAxNS4wOTM4IDEwLjE2NDFDMTQuODIyOSAxMC4zNDY0IDE0LjYyNSAxMC42MjUgMTQuNSAxMUwxMy4yMTg4IDEwLjg2NzJMMTMuODc1IDQuNjI1SDE5Ljg4MjhWNi44NzVIMTguNzI2NkwxOC41NzgxIDUuOTkyMTlIMTUuMTc5N0wxNC44MTI1IDkuMTg3NUMxNC45Njg4IDkuMDY3NzEgMTUuMTM4IDguOTYzNTQgMTUuMzIwMyA4Ljg3NUMxNS41MDI2IDguNzgxMjUgMTUuNzAwNSA4LjcwNTczIDE1LjkxNDEgOC42NDg0NEMxNi4xMzI4IDguNTkxMTUgMTYuMzY5OCA4LjU1OTkgMTYuNjI1IDguNTU0NjlDMTcuMzIyOSA4LjU0OTQ4IDE3LjkyNDUgOC43MDMxMiAxOC40Mjk3IDkuMDE1NjJDMTguOTM0OSA5LjMyMjkyIDE5LjMyMjkgOS43NjU2MiAxOS41OTM4IDEwLjM0MzhDMTkuODY0NiAxMC45MTY3IDIwIDExLjU5MzggMjAgMTIuMzc1QzIwIDEzLjEzNTQgMTkuODYyIDEzLjc5OTUgMTkuNTg1OSAxNC4zNjcyQzE5LjMxNTEgMTQuOTM0OSAxOC45MTE1IDE1LjM3NzYgMTguMzc1IDE1LjY5NTNDMTcuODQzOCAxNi4wMDc4IDE3LjE4NzUgMTYuMTY0MSAxNi40MDYyIDE2LjE2NDFaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K","data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMSAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuNjMyODEyIDE2VjE1LjAxNTZMMS45MDYyNSAxNC43OTY5VjUuODM1OTRMMC42MzI4MTIgNS42MTcxOVY0LjYyNUg0LjcxODc1VjUuNjE3MTlMMy40NDUzMSA1LjgzNTk0VjkuNzY1NjJIOC44ODI4MVY1LjgzNTk0TDcuNjA5MzggNS42MTcxOVY0LjYyNUgxMS42OTUzVjUuNjE3MTlMMTAuNDIxOSA1LjgzNTk0VjE0Ljc5NjlMMTEuNjk1MyAxNS4wMTU2VjE2SDcuNjA5MzhWMTUuMDE1Nkw4Ljg4MjgxIDE0Ljc5NjlWMTAuOTc2NkgzLjQ0NTMxVjE0Ljc5NjlMNC43MTg3NSAxNS4wMTU2VjE2SDAuNjMyODEyWiIgZmlsbD0iYmxhY2siLz4KPHBhdGggZD0iTTE3LjEyNSAxNi4xNjQxQzE2LjM4NTQgMTYuMTY0MSAxNS43MjQgMTUuOTg0NCAxNS4xNDA2IDE1LjYyNUMxNC41NjI1IDE1LjI2MDQgMTQuMTA2OCAxNC43MzE4IDEzLjc3MzQgMTQuMDM5MUMxMy40NDAxIDEzLjM0NjQgMTMuMjczNCAxMi41MDc4IDEzLjI3MzQgMTEuNTIzNFY5Ljk5MjE5QzEzLjI3MzQgOC43ODkwNiAxMy40NTMxIDcuNzc4NjUgMTMuODEyNSA2Ljk2MDk0QzE0LjE3NzEgNi4xMzgwMiAxNC42NzcxIDUuNTE1NjIgMTUuMzEyNSA1LjA5Mzc1QzE1Ljk1MzEgNC42NzE4OCAxNi42ODc1IDQuNDYwOTQgMTcuNTE1NiA0LjQ2MDk0QzE3LjkwMSA0LjQ2MDk0IDE4LjI4MzkgNC41MDUyMSAxOC42NjQxIDQuNTkzNzVDMTkuMDQ5NSA0LjY4MjI5IDE5LjM2NzIgNC43OTQyNyAxOS42MTcyIDQuOTI5NjlMMTkuMzIwMyA2LjA3ODEyQzE5LjA3NTUgNS45NTgzMyAxOC44MDczIDUuODYxOTggMTguNTE1NiA1Ljc4OTA2QzE4LjIyNCA1LjcxMDk0IDE3Ljg5MDYgNS42NzE4OCAxNy41MTU2IDUuNjcxODhDMTYuNzE4OCA1LjY3MTg4IDE2LjA4MzMgNS45NzM5NiAxNS42MDk0IDYuNTc4MTJDMTUuMTQwNiA3LjE3NzA4IDE0Ljg5MDYgOC4wODMzMyAxNC44NTk0IDkuMjk2ODhMMTQuODkwNiA5LjMyODEyQzE1LjE4MjMgOS4wNTcyOSAxNS41MzkxIDguODQzNzUgMTUuOTYwOSA4LjY4NzVDMTYuMzgyOCA4LjUyNjA0IDE2LjgzODUgOC40NDUzMSAxNy4zMjgxIDguNDQ1MzFDMTguMDA1MiA4LjQ0NTMxIDE4LjU5MzggOC42MDY3NyAxOS4wOTM4IDguOTI5NjlDMTkuNTkzOCA5LjI0NzQgMTkuOTc5MiA5LjY4NzUgMjAuMjUgMTAuMjVDMjAuNTI2IDEwLjgxMjUgMjAuNjY0MSAxMS40NTMxIDIwLjY2NDEgMTIuMTcxOUMyMC42NjQxIDEyLjk1ODMgMjAuNTE4MiAxMy42NTEgMjAuMjI2NiAxNC4yNUMxOS45MzQ5IDE0Ljg0OSAxOS41MjM0IDE1LjMxNzcgMTguOTkyMiAxNS42NTYyQzE4LjQ2MDkgMTUuOTk0OCAxNy44Mzg1IDE2LjE2NDEgMTcuMTI1IDE2LjE2NDFaTTE3LjEyNSAxNC45NjA5QzE3LjU0NjkgMTQuOTYwOSAxNy45MDYyIDE0LjgzODUgMTguMjAzMSAxNC41OTM4QzE4LjUgMTQuMzQ5IDE4LjcyNjYgMTQuMDE1NiAxOC44ODI4IDEzLjU5MzhDMTkuMDQ0MyAxMy4xNzE5IDE5LjEyNSAxMi42OTc5IDE5LjEyNSAxMi4xNzE5QzE5LjEyNSAxMS40MjE5IDE4LjkzNDkgMTAuODA0NyAxOC41NTQ3IDEwLjMyMDNDMTguMTc5NyA5LjgzNTk0IDE3LjY1ODkgOS41OTM3NSAxNi45OTIyIDkuNTkzNzVDMTYuNjQzMiA5LjU5Mzc1IDE2LjMyNTUgOS42NDMyMyAxNi4wMzkxIDkuNzQyMTlDMTUuNzU3OCA5LjgzNTk0IDE1LjUxMyA5Ljk3MTM1IDE1LjMwNDcgMTAuMTQ4NEMxNS4xMDE2IDEwLjMyMDMgMTQuOTM0OSAxMC41MjM0IDE0LjgwNDcgMTAuNzU3OFYxMS42NzE5QzE0LjgwNDcgMTIuNzI5MiAxNS4wMjM0IDEzLjU0MTcgMTUuNDYwOSAxNC4xMDk0QzE1LjkwMzYgMTQuNjc3MSAxNi40NTgzIDE0Ljk2MDkgMTcuMTI1IDE0Ljk2MDlaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"],J3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNzA4OTggMjAuNTMxMlYxOS43OTNMOC4wMjczNCAxOS42Mjg5VjEzLjIzNjNMNi42ODU1NSAxMy4yNTk4VjEyLjUzOTFMOS4xODE2NCAxMlYxOS42Mjg5TDEwLjQ5NDEgMTkuNzkzVjIwLjUzMTJINi43MDg5OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTExLjc5NDkgMjAuNTMxMlYxOS4zNDc3SDEyLjk0OTJWMjAuNTMxMkgxMS43OTQ5WiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTMiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE1IiB5PSIxNiIgd2lkdGg9IjExIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE5IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K",X3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMTQiIHk9IjEyIiB3aWR0aD0iMTIiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNCIgeT0iMTUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPGNpcmNsZSBjeD0iOC41IiBjeT0iMTUuNSIgcj0iMi41IiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo=",eL="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNDc0NjEgMTZWMTUuMjYxN0w3LjQyOTY5IDE1LjA5NzdWOC4zNzY5NUw2LjQ3NDYxIDguMjEyODlWNy40Njg3NUgxMC4zOTQ1QzExLjMwNDcgNy40Njg3NSAxMi4wMTE3IDcuNzAzMTIgMTIuNTE1NiA4LjE3MTg4QzEzLjAyMzQgOC42NDA2MiAxMy4yNzczIDkuMjU3ODEgMTMuMjc3MyAxMC4wMjM0QzEzLjI3NzMgMTAuNzk2OSAxMy4wMjM0IDExLjQxNiAxMi41MTU2IDExLjg4MDlDMTIuMDExNyAxMi4zNDU3IDExLjMwNDcgMTIuNTc4MSAxMC4zOTQ1IDEyLjU3ODFIOC41ODM5OFYxNS4wOTc3TDkuNTM5MDYgMTUuMjYxN1YxNkg2LjQ3NDYxWk04LjU4Mzk4IDExLjY3NThIMTAuMzk0NUMxMC45NzI3IDExLjY3NTggMTEuNDA0MyAxMS41MjE1IDExLjY4OTUgMTEuMjEyOUMxMS45Nzg1IDEwLjkwMDQgMTIuMTIzIDEwLjUwNzggMTIuMTIzIDEwLjAzNTJDMTIuMTIzIDkuNTYyNSAxMS45Nzg1IDkuMTY3OTcgMTEuNjg5NSA4Ljg1MTU2QzExLjQwNDMgOC41MzUxNiAxMC45NzI3IDguMzc2OTUgMTAuMzk0NSA4LjM3Njk1SDguNTgzOThWMTEuNjc1OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE0IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIxOCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iNiIgeT0iMjIiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo=",tL="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNjI1IDEzQzcuMTI1IDEzIDYuNzI1IDEyLjg1IDYuNDI1IDEyLjU1QzYuMTQxNjcgMTIuMjMzMyA2IDExLjggNiAxMS4yNUM2IDEwLjAzMzMgNi4zNzUgOC45NjY2NyA3LjEyNSA4LjA1QzcuNDU4MzMgNy42MTY2NyA3LjgzMzMzIDcuMjY2NjcgOC4yNSA3TDkgNy44NzVDOC43NjY2NyA4LjA0MTY3IDguNTMzMzMgOC4yNTgzMyA4LjMgOC41MjVDNy44NSA5LjAwODMzIDcuNjI1IDkuNSA3LjYyNSAxMEM4LjAwODMzIDEwIDguMzMzMzMgMTAuMTQxNyA4LjYgMTAuNDI1QzguODY2NjcgMTAuNzA4MyA5IDExLjA2NjcgOSAxMS41QzkgMTEuOTMzMyA4Ljg2NjY3IDEyLjI5MTcgOC42IDEyLjU3NUM4LjMzMzMzIDEyLjg1ODMgOC4wMDgzMyAxMyA3LjYyNSAxM1pNMTEuNjI1IDEzQzExLjEyNSAxMyAxMC43MjUgMTIuODUgMTAuNDI1IDEyLjU1QzEwLjE0MTcgMTIuMjMzMyAxMCAxMS44IDEwIDExLjI1QzEwIDEwLjAzMzMgMTAuMzc1IDguOTY2NjcgMTEuMTI1IDguMDVDMTEuNDU4MyA3LjYxNjY3IDExLjgzMzMgNy4yNjY2NyAxMi4yNSA3TDEzIDcuODc1QzEyLjc2NjcgOC4wNDE2NyAxMi41MzMzIDguMjU4MzMgMTIuMyA4LjUyNUMxMS44NSA5LjAwODMzIDExLjYyNSA5LjUgMTEuNjI1IDEwQzEyLjAwODMgMTAgMTIuMzMzMyAxMC4xNDE3IDEyLjYgMTAuNDI1QzEyLjg2NjcgMTAuNzA4MyAxMyAxMS4wNjY3IDEzIDExLjVDMTMgMTEuOTMzMyAxMi44NjY3IDEyLjI5MTcgMTIuNiAxMi41NzVDMTIuMzMzMyAxMi44NTgzIDEyLjAwODMgMTMgMTEuNjI1IDEzWiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTQiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjYiIHk9IjE4IiB3aWR0aD0iMjAiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIyMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg==",nL="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQgMjAuNkw4LjggMTZMMTMuNCAxMS40TDEyIDEwTDYgMTZMMTIgMjJMMTMuNCAyMC42Wk0xOC42IDIwLjZMMjMuMiAxNkwxOC42IDExLjRMMjAgMTBMMjYgMTZMMjAgMjJMMTguNiAyMC42WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg==",iL="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNiIgeT0iMTUiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K";var rL="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjA4NDEgOC43MjQ5M0wxMi41MjIgOS41MDc0MkMxMi40NTU2IDkuNTI3NjggMTIuMzk3MiA5LjU2OTczIDEyLjM1NTcgOS42MjcyOEMxMi4zMTQyIDkuNjg0ODMgMTIuMjkxOCA5Ljc1NDc4IDEyLjI5MTggOS44MjY2NkMxMi4yOTE4IDkuODk4NTQgMTIuMzE0MiA5Ljk2ODQ5IDEyLjM1NTcgMTAuMDI2QzEyLjM5NzIgMTAuMDgzNiAxMi40NTU2IDEwLjEyNTYgMTIuNTIyIDEwLjE0NTlMMTUuMDg0MSAxMC45Mjg0TDE1LjgzODEgMTMuNTg3M0MxNS44NTc3IDEzLjY1NjIgMTUuODk4MiAxMy43MTY4IDE1Ljk1MzYgMTMuNzU5OEMxNi4wMDkxIDEzLjgwMjkgMTYuMDc2NSAxMy44MjYyIDE2LjE0NTcgMTMuODI2MkMxNi4yMTUgMTMuODI2MiAxNi4yODI0IDEzLjgwMjkgMTYuMzM3OCAxMy43NTk4QzE2LjM5MzMgMTMuNzE2OCAxNi40MzM4IDEzLjY1NjIgMTYuNDUzMyAxMy41ODczTDE3LjIwNzcgMTAuOTI4NEwxOS43Njk3IDEwLjE0NTlDMTkuODM2MiAxMC4xMjU2IDE5Ljg5NDYgMTAuMDgzNiAxOS45MzYxIDEwLjAyNkMxOS45Nzc2IDkuOTY4NDkgMjAgOS44OTg1NCAyMCA5LjgyNjY2QzIwIDkuNzU0NzggMTkuOTc3NiA5LjY4NDgzIDE5LjkzNjEgOS42MjcyOEMxOS44OTQ2IDkuNTY5NzMgMTkuODM2MiA5LjUyNzY4IDE5Ljc2OTcgOS41MDc0MkwxNy4yMDc3IDguNzI0OTNMMTYuNDUzMyA2LjA2NjA0QzE2LjQzMzggNS45OTcwNyAxNi4zOTMzIDUuOTM2NTIgMTYuMzM3OCA1Ljg5MzQ1QzE2LjI4MjQgNS44NTAzNyAxNi4yMTUgNS44MjcwOSAxNi4xNDU3IDUuODI3MDlDMTYuMDc2NSA1LjgyNzA5IDE2LjAwOTEgNS44NTAzNyAxNS45NTM2IDUuODkzNDVDMTUuODk4MiA1LjkzNjUyIDE1Ljg1NzYgNS45OTcwNyAxNS44MzgxIDYuMDY2MDRMMTUuMDg0MSA4LjcyNDkzWiIgZmlsbD0iIzhEOTJBNSIvPgo8cGF0aCBkPSJNMTguMjE4NSAzLjk1MjMzTDE5LjYwODQgMy41Mjc0M0MxOS42NzQ5IDMuNTA3MTYgMTkuNzMzMiAzLjQ2NTExIDE5Ljc3NDcgMy40MDc1N0MxOS44MTYyIDMuMzUwMDIgMTkuODM4NiAzLjI4MDA4IDE5LjgzODYgMy4yMDgyQzE5LjgzODYgMy4xMzYzMyAxOS44MTYyIDMuMDY2MzggMTkuNzc0NyAzLjAwODg0QzE5LjczMzIgMi45NTEyOSAxOS42NzQ5IDIuOTA5MjQgMTkuNjA4NCAyLjg4ODk4TDE4LjIxODUgMi40NjQ0MUwxNy44MDkxIDEuMDIxNjdDMTcuNzg5NiAwLjk1MjY5OCAxNy43NDkxIDAuODkyMTQ0IDE3LjY5MzYgMC44NDkwNjlDMTcuNjM4MiAwLjgwNTk5NSAxNy41NzA3IDAuNzgyNzE1IDE3LjUwMTUgMC43ODI3MTVDMTcuNDMyMiAwLjc4MjcxNSAxNy4zNjQ4IDAuODA1OTk1IDE3LjMwOTQgMC44NDkwNjlDMTcuMjUzOSAwLjg5MjE0NCAxNy4yMTM0IDAuOTUyNjk4IDE3LjE5MzkgMS4wMjE2N0wxNi43ODQ4IDIuNDY0NDFMMTUuMzk0NiAyLjg4ODk4QzE1LjMyODEgMi45MDkyMyAxNS4yNjk4IDIuOTUxMjggMTUuMjI4MyAzLjAwODgzQzE1LjE4NjcgMy4wNjYzNyAxNS4xNjQzIDMuMTM2MzIgMTUuMTY0MyAzLjIwODJDMTUuMTY0MyAzLjI4MDA4IDE1LjE4NjcgMy4zNTAwMyAxNS4yMjgzIDMuNDA3NThDMTUuMjY5OCAzLjQ2NTEyIDE1LjMyODEgMy41MDcxNyAxNS4zOTQ2IDMuNTI3NDNMMTYuNzg0OCAzLjk1MjMzTDE3LjE5MzkgNS4zOTQ3NEMxNy4yMTM0IDUuNDYzNzEgMTcuMjUzOSA1LjUyNDI2IDE3LjMwOTQgNS41NjczM0MxNy4zNjQ4IDUuNjEwNDEgMTcuNDMyMiA1LjYzMzY5IDE3LjUwMTUgNS42MzM2OUMxNy41NzA3IDUuNjMzNjkgMTcuNjM4MiA1LjYxMDQxIDE3LjY5MzYgNS41NjczM0MxNy43NDkxIDUuNTI0MjYgMTcuNzg5NiA1LjQ2MzcxIDE3LjgwOTEgNS4zOTQ3NEwxOC4yMTg1IDMuOTUyMzNaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xMS4xNjcyIDQuNTU2MzVMOS43NjQ3OCA1LjE0OTk2QzkuNzA1NzggNS4xNzQ5NCA5LjY1NTI5IDUuMjE3NiA5LjYxOTc0IDUuMjcyNDlDOS41ODQyIDUuMzI3MzcgOS41NjUyMiA1LjM5MjAxIDkuNTY1MjIgNS40NTgxNEM5LjU2NTIyIDUuNTI0MjYgOS41ODQyIDUuNTg4OSA5LjYxOTc0IDUuNjQzNzhDOS42NTUyOSA1LjY5ODY3IDkuNzA1NzggNS43NDEzMyA5Ljc2NDc4IDUuNzY2MzFMMTEuMTY3MiA2LjM1OTkyTDExLjczOTIgNy44MTUzNEMxMS43NjMzIDcuODc2NTcgMTEuODA0NCA3LjkyODk3IDExLjg1NzMgNy45NjU4NUMxMS45MTAyIDguMDAyNzQgMTEuOTcyNCA4LjAyMjQzIDEyLjAzNjIgOC4wMjI0M0MxMi4wOTk5IDguMDIyNDMgMTIuMTYyMiA4LjAwMjc0IDEyLjIxNSA3Ljk2NTg1QzEyLjI2NzkgNy45Mjg5NyAxMi4zMDkgNy44NzY1NyAxMi4zMzMxIDcuODE1MzRMMTIuOTA1MSA2LjM1OTkyTDE0LjMwNzIgNS43NjYzMUMxNC4zNjYyIDUuNzQxMzIgMTQuNDE2NyA1LjY5ODY3IDE0LjQ1MjMgNS42NDM3OEMxNC40ODc4IDUuNTg4ODkgMTQuNTA2OCA1LjUyNDI2IDE0LjUwNjggNS40NTgxNEMxNC41MDY4IDUuMzkyMDEgMTQuNDg3OCA1LjMyNzM4IDE0LjQ1MjMgNS4yNzI0OUMxNC40MTY3IDUuMjE3NiAxNC4zNjYyIDUuMTc0OTUgMTQuMzA3MiA1LjE0OTk2TDEyLjkwNTEgNC41NTYzNUwxMi4zMzMxIDMuMTAxMjZDMTIuMzA5IDMuMDQwMDMgMTIuMjY3OSAyLjk4NzY0IDEyLjIxNSAyLjk1MDc1QzEyLjE2MjIgMi45MTM4NyAxMi4wOTk5IDIuODk0MTcgMTIuMDM2MiAyLjg5NDE3QzExLjk3MjQgMi44OTQxNyAxMS45MTAyIDIuOTEzODcgMTEuODU3MyAyLjk1MDc1QzExLjgwNDQgMi45ODc2NCAxMS43NjMzIDMuMDQwMDMgMTEuNzM5MiAzLjEwMTI2TDExLjE2NzIgNC41NTYzNVoiIGZpbGw9IiM4RDkyQTUiLz4KPHJlY3QgeT0iNC4yNjEyMyIgd2lkdGg9IjguNjk1NjUiIGhlaWdodD0iMS41NjUyMiIgcng9IjAuNzgyNjA5IiBmaWxsPSIjOEQ5MkE1Ii8+CjxyZWN0IHk9IjguOTU3MDMiIHdpZHRoPSIxMS4zMDQzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8cmVjdCB5PSIxMy42NTIzIiB3aWR0aD0iMTMuOTEzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8L3N2Zz4K",oL="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjUxNDI5IDUuNUMxLjg0NzQ2IDUuNSAxLjIwNzk0IDUuNzYxNjkgMC43MzY0MTcgNi4yMjc1MUMwLjI2NDg5NyA2LjY5MzMyIDAgNy4zMjUxMSAwIDcuOTgzODdWMTcuMDE2MUMwIDE3LjY3NDkgMC4yNjQ4OTcgMTguMzA2NyAwLjczNjQxNyAxOC43NzI1QzEuMjA3OTQgMTkuMjM4MyAxLjg0NzQ2IDE5LjUgMi41MTQyOSAxOS41SDEzLjQ4NTdDMTQuMTUyNSAxOS41IDE0Ljc5MjEgMTkuMjM4MyAxNS4yNjM2IDE4Ljc3MjVDMTUuNzM1MSAxOC4zMDY3IDE2IDE3LjY3NDkgMTYgMTcuMDE2MVYxN0wxNiAxNi43TDE0LjYyODYgMTUuMzgxM0wxMi4xNDE3IDEyLjkyNDVDMTIuMDc2NyAxMi44NTU5IDExLjk5NyAxMi44MDI0IDExLjkwODQgMTIuNzY4QzExLjgxOTkgMTIuNzMzNyAxMS43MjQ2IDEyLjcxOTIgMTEuNjI5NyAxMi43MjU4QzExLjUzMzcgMTIuNzMxMyAxMS40Mzk3IDEyLjc1NTcgMTEuMzUzNCAxMi43OTc2QzExLjI2NyAxMi44Mzk1IDExLjE5IDEyLjg5OCAxMS4xMjY5IDEyLjk2OTdMOS45NDc0MyAxNC4zNjk3TDUuNzQxNzEgMTAuMjE0OEM1LjY3OTc0IDEwLjE0OTggNS42MDQ1MSAxMC4wOTg0IDUuNTIwOTkgMTAuMDY0MkM1LjQzNzQ2IDEwLjAyOTkgNS4zNDc1NCAxMC4wMTM1IDUuMjU3MTQgMTAuMDE2MUM1LjE2MTExIDEwLjAyMTYgNS4wNjcxNiAxMC4wNDYxIDQuOTgwODEgMTAuMDg3OUM0Ljg5NDQ2IDEwLjEyOTggNC44MTc0NCAxMC4xODgzIDQuNzU0MjkgMTAuMjZMMS4zNzE0MyAxNC4yNDMyVjcuOTgzODdDMS4zNzE0MyA3LjY4NDQzIDEuNDkxODQgNy4zOTcyNiAxLjcwNjE2IDcuMTg1NTJDMS45MjA0OSA2Ljk3Mzc5IDIuMjExMTggNi44NTQ4NCAyLjUxNDI5IDYuODU0ODRINy4xMDk2OVY2LjE3NzQyVjUuNUgyLjUxNDI5Wk0xLjM3MTQgMTcuMDE2VjE2LjM1NjdMNS4zMDI4MyAxMS42OTZMOS4wNjk2OCAxNS40MTczTDYuNzY1NjkgMTguMTI3SDIuNTE0MjZDMi4yMTQyOSAxOC4xMjcxIDEuOTI2MzQgMTguMDEwNiAxLjcxMjUzIDE3LjgwMjdDMS40OTg3MiAxNy41OTQ5IDEuMzc2MiAxNy4zMTIzIDEuMzcxNCAxNy4wMTZaTTguNTQ4NTQgMTguMTQ1MUwxMS43MDI4IDE0LjQwNTdMMTQuNTgyOCAxNy4yNTA5QzE0LjUzMjMgMTcuNTAyIDE0LjM5NTQgMTcuNzI4MiAxNC4xOTU1IDE3Ljg5MTFDMTMuOTk1NiAxOC4wNTQgMTMuNzQ0OSAxOC4xNDM4IDEzLjQ4NTcgMTguMTQ1MUgxMS4wMTcxSDguNTQ4NTRaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xNC4zNDY3IDkuNjMzNTVMMTEuNDAwMyAxMC41MzM0QzExLjMyMzkgMTAuNTU2NyAxMS4yNTY4IDEwLjYwNTEgMTEuMjA5MSAxMC42NzEyQzExLjE2MTMgMTAuNzM3NCAxMS4xMzU1IDEwLjgxNzkgMTEuMTM1NSAxMC45MDA1QzExLjEzNTUgMTAuOTgzMiAxMS4xNjEzIDExLjA2MzYgMTEuMjA5MSAxMS4xMjk4QzExLjI1NjggMTEuMTk2IDExLjMyMzkgMTEuMjQ0NCAxMS40MDAzIDExLjI2NzdMMTQuMzQ2NyAxMi4xNjc1TDE1LjIxMzggMTUuMjI1M0MxNS4yMzYzIDE1LjMwNDYgMTUuMjgyOSAxNS4zNzQyIDE1LjM0NjcgMTUuNDIzN0MxNS40MTA0IDE1LjQ3MzIgMTUuNDg3OSAxNS41IDE1LjU2NzYgMTUuNUMxNS42NDcyIDE1LjUgMTUuNzI0NyAxNS40NzMyIDE1Ljc4ODUgMTUuNDIzN0MxNS44NTIzIDE1LjM3NDIgMTUuODk4OSAxNS4zMDQ2IDE1LjkyMTMgMTUuMjI1M0wxNi43ODg4IDEyLjE2NzVMMTkuNzM1MiAxMS4yNjc3QzE5LjgxMTYgMTEuMjQ0NCAxOS44Nzg3IDExLjE5NiAxOS45MjY1IDExLjEyOThDMTkuODc4NyAxMC42MDUxIDE5LjgxMTYgMTAuNTU2NyAxOS43MzUyIDEwLjUzMzRMMTYuNzg4OCA5LjYzMzU1TDE1LjkyMTMgNi41NzU4M0MxNS44OTg5IDYuNDk2NTEgMTUuODUyMyA2LjQyNjg4IDE1Ljc4ODUgNi4zNzczNEMxNS43MjQ4IDYuMzI3ODEgMTUuNjQ3MiA2LjMwMTA0IDE1LjU2NzYgNi4zMDEwNEMxNS40ODc5IDYuMzAxMDQgMTUuNDEwNCA2LjMyNzgxIDE1LjM0NjcgNi4zNzczNEMxNS4yODI5IDYuNDI2ODggMTUuMjM2MyA2LjQ5NjUxIDE1LjIxMzggNi41NzU4M0wxNC4zNDY3IDkuNjMzNTVaIiBmaWxsPSIjOEQ5MkE1Ii8+Cjwvc3ZnPg==";var IK=new eI(document),sL=[...Array(6).keys()].map(n=>{let e=n+1;return{label:`Heading ${e}`,icon:Bs(Z3[n]||""),id:`heading${e}`,attributes:{level:e}}});var xK=[{label:"Image",icon:"image",id:"image"},{label:"Video",icon:"movie",id:"video"}],TK=[{label:"Table",icon:"table_view",id:"table"}],aL={label:"Paragraph",icon:Bs(eL),id:"paragraph"},lL=[{label:"List Ordered",icon:Bs(J3),id:"orderedList"},{label:"List Unordered",icon:Bs(X3),id:"bulletList"}],EK=[{label:"AI Content",icon:Bs(rL),id:"aiContentPrompt"},{label:"AI Image",icon:Bs(oL),id:"aiImagePrompt"},{label:"Blockquote",icon:Bs(tL),id:"blockquote"},{label:"Code Block",icon:Bs(nL),id:"codeBlock"},{label:"Horizontal Line",icon:Bs(iL),id:"horizontalRule"}];function Bs(n){return IK.bypassSecurityTrustUrl(n)}var J0=[...xK,...sL,...TK,...lL,...EK,aL],cL=[...sL,aL,...lL],uL=[{name:"flip",options:{fallbackPlacements:["top"]}},{name:"preventOverflow",options:{altAxis:!1,tether:!1}}],dL="dotContent",SK={horizontalRule:!0,table:!0,image:!0,video:!0},pL=[...J0.filter(n=>!SK[n.id])],ux=function({type:n,editor:e,range:t,suggestionKey:i,ItemsType:r}){let o={to:t.to+i.getState(e.view.state).query?.length,from:n===r.BLOCK?t.from:t.from+1};e.chain().deleteRange(o).run()},X0={duration:[250,0],interactive:!0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}};var Xt=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["TimesIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var MK=["content"],DK=[[["p-footer"]]],OK=["p-footer"],AK=n=>({"p-dialog p-confirm-dialog p-component":!0,"p-dialog-rtl":n}),kK=(n,e)=>({transform:n,transition:e}),NK=n=>({value:"visible",params:n}),hL=n=>({$implicit:n}),LK=()=>({"p-dialog-header-icon p-dialog-header-close p-link":!0});function PK(n,e){n&1&&ye(0)}function RK(n,e){if(n&1&&(oe(0),x(1,PK,1,0,"ng-container",7),se()),n&2){let t=y(3);m(),f("ngTemplateOutlet",t.headlessTemplate)("ngTemplateOutletContext",_e(2,hL,t.confirmation))}}function FK(n,e){n&1&&ye(0)}function jK(n,e){if(n&1&&(b(0,"div",14),x(1,FK,1,0,"ng-container",15),C()),n&2){let t=y(4);m(),f("ngTemplateOutlet",t.headerTemplate)}}function VK(n,e){if(n&1&&(b(0,"span",19),Z(1),C()),n&2){let t=y(5);f("id",t.ariaLabelledBy),m(),Pe(t.option("header"))}}function BK(n,e){if(n&1){let t=$();b(0,"button",20),P("click",function(r){M(t);let o=y(5);return D(o.close(r))})("keydown.enter",function(r){M(t);let o=y(5);return D(o.close(r))}),E(1,"TimesIcon"),C()}if(n&2){let t=y(5);f("ngClass",St(2,LK)),O("aria-label",t.closeAriaLabel)}}function zK(n,e){if(n&1&&(b(0,"div",14),x(1,VK,2,2,"span",16),b(2,"div",17),x(3,BK,2,3,"button",18),C()()),n&2){let t=y(4);m(),f("ngIf",t.option("header")),m(2),f("ngIf",t.closable)}}function UK(n,e){if(n&1&&E(0,"i",3),n&2){let t=y(4);W(t.option("icon")),f("ngClass","p-confirm-dialog-icon")}}function HK(n,e){}function $K(n,e){n&1&&x(0,HK,0,0,"ng-template")}function WK(n,e){if(n&1&&(oe(0),x(1,$K,1,0,null,15),se()),n&2){let t=y(4);m(),f("ngTemplateOutlet",t.iconTemplate)}}function GK(n,e){if(n&1&&E(0,"span",21),n&2){let t=y(4);f("innerHTML",t.option("message"),Go)}}function qK(n,e){}function QK(n,e){n&1&&x(0,qK,0,0,"ng-template")}function KK(n,e){if(n&1&&(oe(0),x(1,QK,1,0,null,7),se()),n&2){let t=y(4);m(),f("ngTemplateOutlet",t.messageTemplate)("ngTemplateOutletContext",_e(2,hL,t.confirmation))}}function YK(n,e){n&1&&ye(0)}function ZK(n,e){if(n&1&&(b(0,"div",22),Vt(1),x(2,YK,1,0,"ng-container",15),C()),n&2){let t=y(4);m(2),f("ngTemplateOutlet",t.footerTemplate)}}function JK(n,e){if(n&1&&E(0,"i"),n&2){let t=y(7);W(t.option("rejectIcon"))}}function XK(n,e){n&1&&E(0,"TimesIcon",28),n&2&&f("styleClass","p-button-icon-left")}function eY(n,e){if(n&1&&(oe(0),x(1,JK,1,2,"i",26)(2,XK,1,1,"TimesIcon",27),se()),n&2){let t=y(6);m(),f("ngIf",t.option("rejectIcon")),m(),f("ngIf",!t.option("rejectIcon"))}}function tY(n,e){}function nY(n,e){n&1&&x(0,tY,0,0,"ng-template")}function iY(n,e){if(n&1&&(b(0,"span",29),x(1,nY,1,0,null,15),C()),n&2){let t=y(6);m(),f("ngTemplateOutlet",t.rejectIconTemplate)}}function rY(n,e){if(n&1){let t=$();b(0,"button",24),P("click",function(){M(t);let r=y(5);return D(r.reject())}),x(1,eY,3,2,"ng-container",11)(2,iY,2,1,"span",25),C()}if(n&2){let t=y(5);W(t.option("rejectButtonStyleClass")),f("label",t.rejectButtonLabel)("ngClass","p-confirm-dialog-reject"),O("aria-label",t.rejectAriaLabel),m(),f("ngIf",!t.rejectIconTemplate),m(),f("ngIf",t.rejectIconTemplate)}}function oY(n,e){if(n&1&&E(0,"i"),n&2){let t=y(7);W(t.option("acceptIcon"))}}function sY(n,e){n&1&&E(0,"CheckIcon",28),n&2&&f("styleClass","p-button-icon-left")}function aY(n,e){if(n&1&&(oe(0),x(1,oY,1,2,"i",26)(2,sY,1,1,"CheckIcon",27),se()),n&2){let t=y(6);m(),f("ngIf",t.option("acceptIcon")),m(),f("ngIf",!t.option("acceptIcon"))}}function lY(n,e){}function cY(n,e){n&1&&x(0,lY,0,0,"ng-template")}function uY(n,e){if(n&1&&(b(0,"span",29),x(1,cY,1,0,null,15),C()),n&2){let t=y(6);m(),f("ngTemplateOutlet",t.acceptIconTemplate)}}function dY(n,e){if(n&1){let t=$();b(0,"button",24),P("click",function(){M(t);let r=y(5);return D(r.accept())}),x(1,aY,3,2,"ng-container",11)(2,uY,2,1,"span",25),C()}if(n&2){let t=y(5);W(t.option("acceptButtonStyleClass")),f("label",t.acceptButtonLabel)("ngClass","p-confirm-dialog-accept"),O("aria-label",t.acceptAriaLabel),m(),f("ngIf",!t.acceptIconTemplate),m(),f("ngIf",t.acceptIconTemplate)}}function pY(n,e){if(n&1&&(b(0,"div",22),x(1,rY,3,7,"button",23)(2,dY,3,7,"button",23),C()),n&2){let t=y(4);m(),f("ngIf",t.option("rejectVisible")),m(),f("ngIf",t.option("acceptVisible"))}}function hY(n,e){if(n&1&&(x(0,jK,2,1,"div",8)(1,zK,4,2,"div",8),b(2,"div",9,1),x(4,UK,1,3,"i",10)(5,WK,2,1,"ng-container",11)(6,GK,1,1,"span",12)(7,KK,2,4,"ng-container",11),C(),x(8,ZK,3,1,"div",13)(9,pY,3,2,"div",13)),n&2){let t=y(3);f("ngIf",t.headerTemplate),m(),f("ngIf",!t.headerTemplate),m(3),f("ngIf",!t.iconTemplate&&t.option("icon")),m(),f("ngIf",t.iconTemplate),m(),f("ngIf",!t.messageTemplate),m(),f("ngIf",t.messageTemplate),m(),f("ngIf",t.footer||t.footerTemplate),m(),f("ngIf",!t.footer&&!t.footerTemplate)}}function fY(n,e){if(n&1){let t=$();b(0,"div",5),P("@animation.start",function(r){M(t);let o=y(2);return D(o.onAnimationStart(r))})("@animation.done",function(r){M(t);let o=y(2);return D(o.onAnimationEnd(r))}),x(1,RK,2,4,"ng-container",6)(2,hY,10,8,"ng-template",null,0,Bt),C()}if(n&2){let t=pt(3),i=y(2);W(i.styleClass),f("ngClass",_e(9,AK,i.rtl))("ngStyle",i.style)("@animation",_e(14,NK,_t(11,kK,i.transformOptions,i.transitionOptions))),O("aria-labelledby",i.ariaLabelledBy)("aria-modal",!0),m(),f("ngIf",i.headlessTemplate)("ngIfElse",t)}}function mY(n,e){if(n&1&&(b(0,"div",3),x(1,fY,4,16,"div",4),C()),n&2){let t=y();W(t.maskStyleClass),f("ngClass",t.getMaskClass()),m(),f("ngIf",t.visible)}}var gY=Fr([Ct({transform:"{{transform}}",opacity:0}),fn("{{transition}}",Ct({transform:"none",opacity:1}))]),yY=Fr([fn("{{transition}}",Ct({transform:"{{transform}}",opacity:0}))]),ey=(()=>{class n{el;renderer;confirmationService;zone;cd;config;document;header;icon;message;get style(){return this._style}set style(t){this._style=t,this.cd.markForCheck()}styleClass;maskStyleClass;acceptIcon;acceptLabel;closeAriaLabel;acceptAriaLabel;acceptVisible=!0;rejectIcon;rejectLabel;rejectAriaLabel;rejectVisible=!0;acceptButtonStyleClass;rejectButtonStyleClass;closeOnEscape=!0;dismissableMask;blockScroll=!0;rtl=!1;closable=!0;appendTo;key;autoZIndex=!0;baseZIndex=0;transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)";focusTrap=!0;defaultFocus="accept";breakpoints;get visible(){return this._visible}set visible(t){this._visible=t,this._visible&&!this.maskVisible&&(this.maskVisible=!0),this.cd.markForCheck()}get position(){return this._position}set position(t){switch(this._position=t,t){case"top-left":case"bottom-left":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"top-right":case"bottom-right":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)";break}}onHide=new j;footer;contentViewChild;templates;ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"header":this.headerTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;case"message":this.messageTemplate=t.template;break;case"icon":this.iconTemplate=t.template;break;case"rejecticon":this.rejectIconTemplate=t.template;break;case"accepticon":this.acceptIconTemplate=t.template;break;case"headless":this.headlessTemplate=t.template;break}})}headerTemplate;footerTemplate;rejectIconTemplate;acceptIconTemplate;messageTemplate;iconTemplate;headlessTemplate;confirmation;_visible;_style;maskVisible;documentEscapeListener;container;wrapper;contentContainer;subscription;maskClickListener;preWidth;_position="center";transformOptions="scale(0.7)";styleElement;id=nt();ariaLabelledBy=this.getAriaLabelledBy();confirmationOptions;translationSubscription;constructor(t,i,r,o,s,a,l){this.el=t,this.renderer=i,this.confirmationService=r,this.zone=o,this.cd=s,this.config=a,this.document=l,this.subscription=this.confirmationService.requireConfirmation$.subscribe(c=>{if(!c){this.hide();return}c.key===this.key&&(this.confirmation=c,this.confirmationOptions={message:this.confirmation.message||this.message,icon:this.confirmation.icon||this.icon,header:this.confirmation.header||this.header,rejectVisible:this.confirmation.rejectVisible==null?this.rejectVisible:this.confirmation.rejectVisible,acceptVisible:this.confirmation.acceptVisible==null?this.acceptVisible:this.confirmation.acceptVisible,acceptLabel:this.confirmation.acceptLabel||this.acceptLabel,rejectLabel:this.confirmation.rejectLabel||this.rejectLabel,acceptIcon:this.confirmation.acceptIcon||this.acceptIcon,rejectIcon:this.confirmation.rejectIcon||this.rejectIcon,acceptButtonStyleClass:this.confirmation.acceptButtonStyleClass||this.acceptButtonStyleClass,rejectButtonStyleClass:this.confirmation.rejectButtonStyleClass||this.rejectButtonStyleClass,defaultFocus:this.confirmation.defaultFocus||this.defaultFocus,blockScroll:this.confirmation.blockScroll===!1||this.confirmation.blockScroll===!0?this.confirmation.blockScroll:this.blockScroll,closeOnEscape:this.confirmation.closeOnEscape===!1||this.confirmation.closeOnEscape===!0?this.confirmation.closeOnEscape:this.closeOnEscape,dismissableMask:this.confirmation.dismissableMask===!1||this.confirmation.dismissableMask===!0?this.confirmation.dismissableMask:this.dismissableMask},this.confirmation.accept&&(this.confirmation.acceptEvent=new j,this.confirmation.acceptEvent.subscribe(this.confirmation.accept)),this.confirmation.reject&&(this.confirmation.rejectEvent=new j,this.confirmation.rejectEvent.subscribe(this.confirmation.reject)),this.visible=!0)})}ngOnInit(){this.breakpoints&&this.createStyle(),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.visible&&this.cd.markForCheck()})}getAriaLabelledBy(){return this.header!==null?nt()+"_header":null}option(t){let i=this.confirmationOptions||this;if(i.hasOwnProperty(t))return i[t]}onAnimationStart(t){switch(t.toState){case"visible":this.container=t.element,this.wrapper=this.container?.parentElement,this.contentContainer=A.findSingle(this.container,".p-dialog-content"),this.container?.setAttribute(this.id,""),this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.enableModality();let i=this.getElementToFocus();i&&i.focus();break}}onAnimationEnd(t){switch(t.toState){case"void":this.onOverlayHide();break}}getElementToFocus(){switch(this.option("defaultFocus")){case"accept":return A.findSingle(this.container,".p-confirm-dialog-accept");case"reject":return A.findSingle(this.container,".p-confirm-dialog-reject");case"close":return A.findSingle(this.container,".p-dialog-header-close");case"none":return null;default:return A.findSingle(this.container,".p-confirm-dialog-accept")}}appendContainer(){this.appendTo&&(this.appendTo==="body"?this.document.body.appendChild(this.wrapper):A.appendChild(this.wrapper,this.appendTo))}restoreAppend(){this.wrapper&&this.appendTo&&this.el.nativeElement.appendChild(this.wrapper)}enableModality(){this.option("blockScroll")&&A.addClass(this.document.body,"p-overflow-hidden"),this.option("dismissableMask")&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",t=>{this.wrapper&&this.wrapper.isSameNode(t.target)&&this.close(t)}))}disableModality(){this.maskVisible=!1,this.option("blockScroll")&&A.removeClass(this.document.body,"p-overflow-hidden"),this.dismissableMask&&this.unbindMaskClickListener(),this.container&&!this.cd.destroyed&&this.cd.detectChanges()}createStyle(){if(!this.styleElement){this.styleElement=this.document.createElement("style"),this.styleElement.type="text/css",A.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce),this.document.head.appendChild(this.styleElement);let t="";for(let i in this.breakpoints)t+=` + @media screen and (max-width: ${i}) { + .p-dialog[${this.id}] { + width: ${this.breakpoints[i]} !important; + } + } + `;this.styleElement.innerHTML=t}}close(t){this.confirmation?.rejectEvent&&this.confirmation.rejectEvent.emit(Yl.CANCEL),this.hide(Yl.CANCEL),t.preventDefault()}hide(t){this.onHide.emit(t),this.visible=!1,this.confirmation=null,this.confirmationOptions=null}moveOnTop(){this.autoZIndex&&(_n.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}getMaskClass(){let t={"p-dialog-mask p-component-overlay":!0,"p-dialog-mask-scrollblocker":this.blockScroll};return t[this.getPositionClass().toString()]=!0,t}getPositionClass(){let i=["left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"].find(r=>r===this.position);return i?`p-dialog-${i}`:""}bindGlobalListeners(){if(this.option("closeOnEscape")&&this.closable||this.focusTrap&&!this.documentEscapeListener){let t=this.el?this.el.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(t,"keydown",i=>{if(i.which==27&&this.option("closeOnEscape")&&this.closable&&parseInt(this.container.style.zIndex)===_n.get(this.container)&&this.visible&&this.close(i),i.which===9&&this.focusTrap){i.preventDefault();let r=A.getFocusableElements(this.container);if(r&&r.length>0)if(!r[0].ownerDocument.activeElement)r[0].focus();else{let o=r.indexOf(r[0].ownerDocument.activeElement);i.shiftKey?o==-1||o===0?r[r.length-1].focus():r[o-1].focus():o==-1||o===r.length-1?r[0].focus():r[o+1].focus()}}})}}unbindGlobalListeners(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}onOverlayHide(){this.container&&this.autoZIndex&&_n.clear(this.container),this.disableModality(),this.unbindGlobalListeners(),this.container=null}destroyStyle(){this.styleElement&&(this.document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.restoreAppend(),this.onOverlayHide(),this.subscription.unsubscribe(),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.destroyStyle()}accept(){this.confirmation&&this.confirmation.acceptEvent&&this.confirmation.acceptEvent.emit(),this.hide(Yl.ACCEPT)}reject(){this.confirmation&&this.confirmation.rejectEvent&&this.confirmation.rejectEvent.emit(Yl.REJECT),this.hide(Yl.REJECT)}get acceptButtonLabel(){return this.option("acceptLabel")||this.config.getTranslation(si.ACCEPT)}get rejectButtonLabel(){return this.option("rejectLabel")||this.config.getTranslation(si.REJECT)}static \u0275fac=function(i){return new(i||n)(k(Ce),k(At),k(Vs),k(He),k(De),k(Pt),k(We))};static \u0275cmp=F({type:n,selectors:[["p-confirmDialog"]],contentQueries:function(i,r,o){if(i&1&&(Je(o,Fa,5),Je(o,qe,4)),i&2){let s;J(s=X())&&(r.footer=s.first),J(s=X())&&(r.templates=s)}},viewQuery:function(i,r){if(i&1&&fe(MK,5),i&2){let o;J(o=X())&&(r.contentViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{header:"header",icon:"icon",message:"message",style:"style",styleClass:"styleClass",maskStyleClass:"maskStyleClass",acceptIcon:"acceptIcon",acceptLabel:"acceptLabel",closeAriaLabel:"closeAriaLabel",acceptAriaLabel:"acceptAriaLabel",acceptVisible:[2,"acceptVisible","acceptVisible",V],rejectIcon:"rejectIcon",rejectLabel:"rejectLabel",rejectAriaLabel:"rejectAriaLabel",rejectVisible:[2,"rejectVisible","rejectVisible",V],acceptButtonStyleClass:"acceptButtonStyleClass",rejectButtonStyleClass:"rejectButtonStyleClass",closeOnEscape:[2,"closeOnEscape","closeOnEscape",V],dismissableMask:[2,"dismissableMask","dismissableMask",V],blockScroll:[2,"blockScroll","blockScroll",V],rtl:[2,"rtl","rtl",V],closable:[2,"closable","closable",V],appendTo:"appendTo",key:"key",autoZIndex:[2,"autoZIndex","autoZIndex",V],baseZIndex:[2,"baseZIndex","baseZIndex",Ke],transitionOptions:"transitionOptions",focusTrap:[2,"focusTrap","focusTrap",V],defaultFocus:"defaultFocus",breakpoints:"breakpoints",visible:"visible",position:"position"},outputs:{onHide:"onHide"},features:[$e],ngContentSelectors:OK,decls:1,vars:1,consts:[["notHeadless",""],["content",""],[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],["role","alertdialog",3,"ngClass","ngStyle","class",4,"ngIf"],["role","alertdialog",3,"ngClass","ngStyle"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-dialog-header",4,"ngIf"],[1,"p-dialog-content"],[3,"ngClass","class",4,"ngIf"],[4,"ngIf"],["class","p-confirm-dialog-message",3,"innerHTML",4,"ngIf"],["class","p-dialog-footer",4,"ngIf"],[1,"p-dialog-header"],[4,"ngTemplateOutlet"],["class","p-dialog-title",3,"id",4,"ngIf"],[1,"p-dialog-header-icons"],["type","button","role","button",3,"ngClass","click","keydown.enter",4,"ngIf"],[1,"p-dialog-title",3,"id"],["type","button","role","button",3,"click","keydown.enter","ngClass"],[1,"p-confirm-dialog-message",3,"innerHTML"],[1,"p-dialog-footer"],["type","button","pRipple","","pButton","",3,"label","ngClass","class","click",4,"ngIf"],["type","button","pRipple","","pButton","",3,"click","label","ngClass"],["class","p-button-icon-left",4,"ngIf"],[3,"class",4,"ngIf"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],[1,"p-button-icon-left"]],template:function(i,r){i&1&&(ln(DK),x(0,mY,2,4,"div",2)),i&2&&f("ngIf",r.maskVisible)},dependencies:()=>[Ye,ot,Mt,st,zt,Hn,Xt,Wi],styles:[`@layer primeng{.p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{-webkit-transition:none;transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}} +`],encapsulation:2,data:{animation:[oi("animation",[mn("void => visible",[jr(gY)]),mn("visible => void",[jr(yY)])])]},changeDetection:0})}return n})(),Vu=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,an,Ln,Xt,Wi,an,Ge]})}return n})();var Ua=(()=>{class n{pFocusTrapDisabled=!1;platformId=B(Nt);host=B(Ce);document=B(We);firstHiddenFocusableElement;lastHiddenFocusableElement;ngOnInit(){Dt(this.platformId)&&!this.pFocusTrapDisabled&&!this.firstHiddenFocusableElement&&!this.lastHiddenFocusableElement&&this.createHiddenFocusableElements()}ngOnChanges(t){t.pFocusTrapDisabled&&Dt(this.platformId)&&(t.pFocusTrapDisabled.currentValue?this.removeHiddenFocusableElements():this.createHiddenFocusableElements())}removeHiddenFocusableElements(){this.firstHiddenFocusableElement&&this.firstHiddenFocusableElement.parentNode&&this.firstHiddenFocusableElement.parentNode.removeChild(this.firstHiddenFocusableElement),this.lastHiddenFocusableElement&&this.lastHiddenFocusableElement.parentNode&&this.lastHiddenFocusableElement.parentNode.removeChild(this.lastHiddenFocusableElement)}getComputedSelector(t){return`:not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])${t??""}`}createHiddenFocusableElements(){let t="0",i=r=>A.createElement("span",{class:"p-hidden-accessible p-hidden-focusable",tabindex:t,role:"presentation","data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:r?.bind(this)});this.firstHiddenFocusableElement=i(this.onFirstHiddenElementFocus),this.lastHiddenFocusableElement=i(this.onLastHiddenElementFocus),this.firstHiddenFocusableElement.setAttribute("data-pc-section","firstfocusableelement"),this.lastHiddenFocusableElement.setAttribute("data-pc-section","lastfocusableelement"),this.host.nativeElement.prepend(this.firstHiddenFocusableElement),this.host.nativeElement.append(this.lastHiddenFocusableElement)}onFirstHiddenElementFocus(t){let{currentTarget:i,relatedTarget:r}=t,o=r===this.lastHiddenFocusableElement||!this.host.nativeElement?.contains(r)?A.getFirstFocusableElement(i.parentElement,":not(.p-hidden-focusable)"):this.lastHiddenFocusableElement;A.focus(o)}onLastHiddenElementFocus(t){let{currentTarget:i,relatedTarget:r}=t,o=r===this.firstHiddenFocusableElement||!this.host.nativeElement?.contains(r)?A.getLastFocusableElement(i.parentElement,":not(.p-hidden-focusable)"):this.firstHiddenFocusableElement;A.focus(o)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=gt({type:n,selectors:[["","pFocusTrap",""]],hostAttrs:[1,"p-element"],inputs:{pFocusTrapDisabled:[2,"pFocusTrapDisabled","pFocusTrapDisabled",V]},features:[$e,Jt]})}return n})(),Ha=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te]})}return n})();var $a=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["WindowMaximizeIcon"]],standalone:!0,features:[xe,ue],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14ZM9.77805 7.42192C9.89013 7.534 10.0415 7.59788 10.2 7.59995C10.3585 7.59788 10.5099 7.534 10.622 7.42192C10.7341 7.30985 10.798 7.15844 10.8 6.99995V3.94242C10.8066 3.90505 10.8096 3.86689 10.8089 3.82843C10.8079 3.77159 10.7988 3.7157 10.7824 3.6623C10.756 3.55552 10.701 3.45698 10.622 3.37798C10.5099 3.2659 10.3585 3.20202 10.2 3.19995H7.00002C6.84089 3.19995 6.68828 3.26317 6.57576 3.37569C6.46324 3.48821 6.40002 3.64082 6.40002 3.79995C6.40002 3.95908 6.46324 4.11169 6.57576 4.22422C6.68828 4.33674 6.84089 4.39995 7.00002 4.39995H8.80006L6.19997 7.00005C6.10158 7.11005 6.04718 7.25246 6.04718 7.40005C6.04718 7.54763 6.10158 7.69004 6.19997 7.80005C6.30202 7.91645 6.44561 7.98824 6.59997 8.00005C6.75432 7.98824 6.89791 7.91645 6.99997 7.80005L9.60002 5.26841V6.99995C9.6021 7.15844 9.66598 7.30985 9.77805 7.42192ZM1.4 14H3.8C4.17066 13.9979 4.52553 13.8498 4.78763 13.5877C5.04973 13.3256 5.1979 12.9707 5.2 12.6V10.2C5.1979 9.82939 5.04973 9.47452 4.78763 9.21242C4.52553 8.95032 4.17066 8.80215 3.8 8.80005H1.4C1.02934 8.80215 0.674468 8.95032 0.412371 9.21242C0.150274 9.47452 0.00210008 9.82939 0 10.2V12.6C0.00210008 12.9707 0.150274 13.3256 0.412371 13.5877C0.674468 13.8498 1.02934 13.9979 1.4 14ZM1.25858 10.0586C1.29609 10.0211 1.34696 10 1.4 10H3.8C3.85304 10 3.90391 10.0211 3.94142 10.0586C3.97893 10.0961 4 10.147 4 10.2V12.6C4 12.6531 3.97893 12.704 3.94142 12.7415C3.90391 12.779 3.85304 12.8 3.8 12.8H1.4C1.34696 12.8 1.29609 12.779 1.25858 12.7415C1.22107 12.704 1.2 12.6531 1.2 12.6V10.2C1.2 10.147 1.22107 10.0961 1.25858 10.0586Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1),C(),b(3,"defs")(4,"clipPath",2),E(5,"rect",3),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(3),f("id",r.pathId))},encapsulation:2})}return n})();var Wa=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["WindowMinimizeIcon"]],standalone:!0,features:[xe,ue],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M11.8 0H2.2C1.61652 0 1.05694 0.231785 0.644365 0.644365C0.231785 1.05694 0 1.61652 0 2.2V7C0 7.15913 0.063214 7.31174 0.175736 7.42426C0.288258 7.53679 0.44087 7.6 0.6 7.6C0.75913 7.6 0.911742 7.53679 1.02426 7.42426C1.13679 7.31174 1.2 7.15913 1.2 7V2.2C1.2 1.93478 1.30536 1.68043 1.49289 1.49289C1.68043 1.30536 1.93478 1.2 2.2 1.2H11.8C12.0652 1.2 12.3196 1.30536 12.5071 1.49289C12.6946 1.68043 12.8 1.93478 12.8 2.2V11.8C12.8 12.0652 12.6946 12.3196 12.5071 12.5071C12.3196 12.6946 12.0652 12.8 11.8 12.8H7C6.84087 12.8 6.68826 12.8632 6.57574 12.9757C6.46321 13.0883 6.4 13.2409 6.4 13.4C6.4 13.5591 6.46321 13.7117 6.57574 13.8243C6.68826 13.9368 6.84087 14 7 14H11.8C12.3835 14 12.9431 13.7682 13.3556 13.3556C13.7682 12.9431 14 12.3835 14 11.8V2.2C14 1.61652 13.7682 1.05694 13.3556 0.644365C12.9431 0.231785 12.3835 0 11.8 0ZM6.368 7.952C6.44137 7.98326 6.52025 7.99958 6.6 8H9.8C9.95913 8 10.1117 7.93678 10.2243 7.82426C10.3368 7.71174 10.4 7.55913 10.4 7.4C10.4 7.24087 10.3368 7.08826 10.2243 6.97574C10.1117 6.86321 9.95913 6.8 9.8 6.8H8.048L10.624 4.224C10.73 4.11026 10.7877 3.95982 10.7849 3.80438C10.7822 3.64894 10.7192 3.50063 10.6093 3.3907C10.4994 3.28077 10.3511 3.2178 10.1956 3.21506C10.0402 3.21232 9.88974 3.27002 9.776 3.376L7.2 5.952V4.2C7.2 4.04087 7.13679 3.88826 7.02426 3.77574C6.91174 3.66321 6.75913 3.6 6.6 3.6C6.44087 3.6 6.28826 3.66321 6.17574 3.77574C6.06321 3.88826 6 4.04087 6 4.2V7.4C6.00042 7.47975 6.01674 7.55862 6.048 7.632C6.07656 7.70442 6.11971 7.7702 6.17475 7.82524C6.2298 7.88029 6.29558 7.92344 6.368 7.952ZM1.4 8.80005H3.8C4.17066 8.80215 4.52553 8.95032 4.78763 9.21242C5.04973 9.47452 5.1979 9.82939 5.2 10.2V12.6C5.1979 12.9707 5.04973 13.3256 4.78763 13.5877C4.52553 13.8498 4.17066 13.9979 3.8 14H1.4C1.02934 13.9979 0.674468 13.8498 0.412371 13.5877C0.150274 13.3256 0.00210008 12.9707 0 12.6V10.2C0.00210008 9.82939 0.150274 9.47452 0.412371 9.21242C0.674468 8.95032 1.02934 8.80215 1.4 8.80005ZM3.94142 12.7415C3.97893 12.704 4 12.6531 4 12.6V10.2C4 10.147 3.97893 10.0961 3.94142 10.0586C3.90391 10.0211 3.85304 10 3.8 10H1.4C1.34696 10 1.29609 10.0211 1.25858 10.0586C1.22107 10.0961 1.2 10.147 1.2 10.2V12.6C1.2 12.6531 1.22107 12.704 1.25858 12.7415C1.29609 12.779 1.34696 12.8 1.4 12.8H3.8C3.85304 12.8 3.90391 12.779 3.94142 12.7415Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1),C(),b(3,"defs")(4,"clipPath",2),E(5,"rect",3),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(3),f("id",r.pathId))},encapsulation:2})}return n})();var _Y=["titlebar"],vY=["content"],bY=["footer"],CY=["*",[["p-header"]],[["p-footer"]]],wY=["*","p-header","p-footer"],IY=(n,e,t,i,r,o,s,a,l,c)=>({"p-dialog-mask":!0,"p-component-overlay p-component-overlay-enter":n,"p-dialog-mask-scrollblocker":e,"p-dialog-left":t,"p-dialog-right":i,"p-dialog-top":r,"p-dialog-top-left":o,"p-dialog-top-right":s,"p-dialog-bottom":a,"p-dialog-bottom-left":l,"p-dialog-bottom-right":c}),xY=(n,e,t,i)=>({"p-dialog p-component":!0,"p-dialog-rtl":n,"p-dialog-draggable":e,"p-dialog-resizable":t,"p-dialog-maximized":i}),TY=(n,e)=>({transform:n,transition:e}),EY=n=>({value:"visible",params:n}),SY=()=>({"p-dialog-header-icon p-dialog-header-maximize p-link":!0}),MY=()=>({"p-dialog-header-icon p-dialog-header-close p-link":!0}),DY=()=>({"min-width":0});function OY(n,e){n&1&&ye(0)}function AY(n,e){if(n&1&&(oe(0),x(1,OY,1,0,"ng-container",10),se()),n&2){let t=y(3);m(),f("ngTemplateOutlet",t.headlessTemplate)}}function kY(n,e){if(n&1){let t=$();b(0,"div",15),P("mousedown",function(r){M(t);let o=y(4);return D(o.initResize(r))}),C()}}function NY(n,e){if(n&1&&(b(0,"span",21),Z(1),C()),n&2){let t=y(5);f("id",t.ariaLabelledBy),m(),Pe(t.header)}}function LY(n,e){if(n&1&&(b(0,"span",21),Vt(1,1),C()),n&2){let t=y(5);f("id",t.ariaLabelledBy)}}function PY(n,e){n&1&&ye(0)}function RY(n,e){if(n&1&&E(0,"span",25),n&2){let t=y(6);f("ngClass",t.maximized?t.minimizeIcon:t.maximizeIcon)}}function FY(n,e){n&1&&E(0,"WindowMaximizeIcon",27),n&2&&f("styleClass","p-dialog-header-maximize-icon")}function jY(n,e){n&1&&E(0,"WindowMinimizeIcon",27),n&2&&f("styleClass","p-dialog-header-maximize-icon")}function VY(n,e){if(n&1&&(oe(0),x(1,FY,1,1,"WindowMaximizeIcon",26)(2,jY,1,1,"WindowMinimizeIcon",26),se()),n&2){let t=y(6);m(),f("ngIf",!t.maximized&&!t.maximizeIconTemplate),m(),f("ngIf",t.maximized&&!t.minimizeIconTemplate)}}function BY(n,e){}function zY(n,e){n&1&&x(0,BY,0,0,"ng-template")}function UY(n,e){if(n&1&&(oe(0),x(1,zY,1,0,null,10),se()),n&2){let t=y(6);m(),f("ngTemplateOutlet",t.maximizeIconTemplate)}}function HY(n,e){}function $Y(n,e){n&1&&x(0,HY,0,0,"ng-template")}function WY(n,e){if(n&1&&(oe(0),x(1,$Y,1,0,null,10),se()),n&2){let t=y(6);m(),f("ngTemplateOutlet",t.minimizeIconTemplate)}}function GY(n,e){if(n&1){let t=$();b(0,"button",22),P("click",function(){M(t);let r=y(5);return D(r.maximize())})("keydown.enter",function(){M(t);let r=y(5);return D(r.maximize())}),x(1,RY,1,1,"span",23)(2,VY,3,2,"ng-container",24)(3,UY,2,1,"ng-container",24)(4,WY,2,1,"ng-container",24),C()}if(n&2){let t=y(5);f("ngClass",St(7,SY)),O("tabindex",t.maximizable?"0":"-1")("aria-label",t.maximizeLabel),m(),f("ngIf",t.maximizeIcon&&!t.maximizeIconTemplate&&!t.minimizeIconTemplate),m(),f("ngIf",!t.maximizeIcon),m(),f("ngIf",!t.maximized),m(),f("ngIf",t.maximized)}}function qY(n,e){if(n&1&&E(0,"span",30),n&2){let t=y(7);f("ngClass",t.closeIcon)}}function QY(n,e){n&1&&E(0,"TimesIcon",27),n&2&&f("styleClass","p-dialog-header-close-icon")}function KY(n,e){if(n&1&&(oe(0),x(1,qY,1,1,"span",29)(2,QY,1,1,"TimesIcon",26),se()),n&2){let t=y(6);m(),f("ngIf",t.closeIcon),m(),f("ngIf",!t.closeIcon)}}function YY(n,e){}function ZY(n,e){n&1&&x(0,YY,0,0,"ng-template")}function JY(n,e){if(n&1&&(b(0,"span"),x(1,ZY,1,0,null,10),C()),n&2){let t=y(6);m(),f("ngTemplateOutlet",t.closeIconTemplate)}}function XY(n,e){if(n&1){let t=$();b(0,"button",28),P("click",function(r){M(t);let o=y(5);return D(o.close(r))})("keydown.enter",function(r){M(t);let o=y(5);return D(o.close(r))}),x(1,KY,3,2,"ng-container",24)(2,JY,2,1,"span",24),C()}if(n&2){let t=y(5);f("ngClass",St(6,MY))("ngStyle",St(7,DY)),O("aria-label",t.closeAriaLabel)("tabindex",t.closeTabindex),m(),f("ngIf",!t.closeIconTemplate),m(),f("ngIf",t.closeIconTemplate)}}function eZ(n,e){if(n&1){let t=$();b(0,"div",16,3),P("mousedown",function(r){M(t);let o=y(4);return D(o.initDrag(r))}),x(2,NY,2,2,"span",17)(3,LY,2,1,"span",17)(4,PY,1,0,"ng-container",10),b(5,"div",18),x(6,GY,5,8,"button",19)(7,XY,3,8,"button",20),C()()}if(n&2){let t=y(4);m(2),f("ngIf",!t.headerFacet&&!t.headerTemplate),m(),f("ngIf",t.headerFacet),m(),f("ngTemplateOutlet",t.headerTemplate),m(2),f("ngIf",t.maximizable),m(),f("ngIf",t.closable)}}function tZ(n,e){n&1&&ye(0)}function nZ(n,e){n&1&&ye(0)}function iZ(n,e){if(n&1&&(b(0,"div",31,4),Vt(2,2),x(3,nZ,1,0,"ng-container",10),C()),n&2){let t=y(4);m(3),f("ngTemplateOutlet",t.footerTemplate)}}function rZ(n,e){if(n&1&&(x(0,kY,1,0,"div",11)(1,eZ,8,5,"div",12),b(2,"div",13,2),Vt(4),x(5,tZ,1,0,"ng-container",10),C(),x(6,iZ,4,1,"div",14)),n&2){let t=y(3);f("ngIf",t.resizable),m(),f("ngIf",t.showHeader),m(),W(t.contentStyleClass),f("ngClass","p-dialog-content")("ngStyle",t.contentStyle),m(3),f("ngTemplateOutlet",t.contentTemplate),m(),f("ngIf",t.footerFacet||t.footerTemplate)}}function oZ(n,e){if(n&1){let t=$();b(0,"div",8,0),P("@animation.start",function(r){M(t);let o=y(2);return D(o.onAnimationStart(r))})("@animation.done",function(r){M(t);let o=y(2);return D(o.onAnimationEnd(r))}),x(2,AY,2,1,"ng-container",9)(3,rZ,7,8,"ng-template",null,1,Bt),C()}if(n&2){let t=pt(4),i=y(2);W(i.styleClass),f("ngClass",kr(10,xY,i.rtl,i.draggable,i.resizable,i.maximized))("ngStyle",i.style)("pFocusTrapDisabled",i.focusTrap===!1)("@animation",_e(18,EY,_t(15,TY,i.transformOptions,i.transitionOptions))),O("aria-labelledby",i.ariaLabelledBy)("aria-modal",!0),m(2),f("ngIf",i.headlessTemplate)("ngIfElse",t)}}function sZ(n,e){if(n&1&&(b(0,"div",6),x(1,oZ,5,20,"div",7),C()),n&2){let t=y();W(t.maskStyleClass),f("ngStyle",t.maskStyle)("ngClass",Iu(5,IY,[t.modal,t.modal||t.blockScroll,t.position==="left",t.position==="right",t.position==="top",t.position==="topleft"||t.position==="top-left",t.position==="topright"||t.position==="top-right",t.position==="bottom",t.position==="bottomleft"||t.position==="bottom-left",t.position==="bottomright"||t.position==="bottom-right"])),m(),f("ngIf",t.visible)}}var aZ=Fr([Ct({transform:"{{transform}}",opacity:0}),fn("{{transition}}")]),lZ=Fr([fn("{{transition}}",Ct({transform:"{{transform}}",opacity:0}))]),mL=(()=>{class n{document;platformId;el;renderer;zone;cd;config;header;draggable=!0;resizable=!0;get positionLeft(){return 0}set positionLeft(t){console.log("positionLeft property is deprecated.")}get positionTop(){return 0}set positionTop(t){console.log("positionTop property is deprecated.")}contentStyle;contentStyleClass;modal=!1;closeOnEscape=!0;dismissableMask=!1;rtl=!1;closable=!0;get responsive(){return!1}set responsive(t){console.log("Responsive property is deprecated.")}appendTo;breakpoints;styleClass;maskStyleClass;maskStyle;showHeader=!0;get breakpoint(){return 649}set breakpoint(t){console.log("Breakpoint property is not utilized and deprecated, use breakpoints or CSS media queries instead.")}blockScroll=!1;autoZIndex=!0;baseZIndex=0;minX=0;minY=0;focusOnShow=!0;maximizable=!1;keepInViewport=!0;focusTrap=!0;transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)";closeIcon;closeAriaLabel;closeTabindex="0";minimizeIcon;maximizeIcon;get visible(){return this._visible}set visible(t){this._visible=t,this._visible&&!this.maskVisible&&(this.maskVisible=!0)}get style(){return this._style}set style(t){t&&(this._style=I({},t),this.originalStyle=t)}get position(){return this._position}set position(t){switch(this._position=t,t){case"topleft":case"bottomleft":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"topright":case"bottomright":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)";break}}onShow=new j;onHide=new j;visibleChange=new j;onResizeInit=new j;onResizeEnd=new j;onDragEnd=new j;onMaximize=new j;headerFacet;footerFacet;templates;headerViewChild;contentViewChild;footerViewChild;headerTemplate;contentTemplate;footerTemplate;maximizeIconTemplate;closeIconTemplate;minimizeIconTemplate;headlessTemplate;_visible=!1;maskVisible;container;wrapper;dragging;ariaLabelledBy=this.getAriaLabelledBy();documentDragListener;documentDragEndListener;resizing;documentResizeListener;documentResizeEndListener;documentEscapeListener;maskClickListener;lastPageX;lastPageY;preventVisibleChangePropagation;maximized;preMaximizeContentHeight;preMaximizeContainerWidth;preMaximizeContainerHeight;preMaximizePageX;preMaximizePageY;id=nt();_style={};_position="center";originalStyle;transformOptions="scale(0.7)";styleElement;window;get maximizeLabel(){return this.config.getTranslation(si.ARIA).maximizeLabel}constructor(t,i,r,o,s,a,l){this.document=t,this.platformId=i,this.el=r,this.renderer=o,this.zone=s,this.cd=a,this.config=l,this.window=this.document.defaultView}ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"header":this.headerTemplate=t.template;break;case"content":this.contentTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;case"closeicon":this.closeIconTemplate=t.template;break;case"maximizeicon":this.maximizeIconTemplate=t.template;break;case"minimizeicon":this.minimizeIconTemplate=t.template;break;case"headless":this.headlessTemplate=t.template;break;default:this.contentTemplate=t.template;break}})}ngOnInit(){this.breakpoints&&this.createStyle()}getAriaLabelledBy(){return this.header!==null?nt()+"_header":null}parseDurationToMilliseconds(t){let i=/([\d\.]+)(ms|s)\b/g,r=0,o;for(;(o=i.exec(t))!==null;){let s=parseFloat(o[1]),a=o[2];a==="ms"?r+=s:a==="s"&&(r+=s*1e3)}if(r!==0)return r}focus(t=this.contentViewChild?.nativeElement){let i=this.parseDurationToMilliseconds(this.transitionOptions),r=A.getFocusableElement(t,"[autofocus]");if(r){this.zone.runOutsideAngular(()=>{setTimeout(()=>r.focus(),i||5)});return}let o=A.getFocusableElement(t);o?this.zone.runOutsideAngular(()=>{setTimeout(()=>o.focus(),i||5)}):this.footerViewChild&&t!==this.footerViewChild.nativeElement&&this.focus(this.footerViewChild.nativeElement)}close(t){this.visibleChange.emit(!1),t.preventDefault()}enableModality(){this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",t=>{this.wrapper&&this.wrapper.isSameNode(t.target)&&this.close(t)})),this.modal&&A.blockBodyScroll()}disableModality(){if(this.wrapper){this.dismissableMask&&this.unbindMaskClickListener();let t=document.querySelectorAll(".p-dialog-mask-scrollblocker");this.modal&&t&&t.length==1&&A.unblockBodyScroll(),this.cd.destroyed||this.cd.detectChanges()}}maximize(){this.maximized=!this.maximized,!this.modal&&!this.blockScroll&&(this.maximized?A.blockBodyScroll():A.unblockBodyScroll()),this.onMaximize.emit({maximized:this.maximized})}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}moveOnTop(){this.autoZIndex&&(_n.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}createStyle(){if(Dt(this.platformId)&&!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",A.setAttribute(this.styleElement,"nonce",this.config?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement);let t="";for(let i in this.breakpoints)t+=` + @media screen and (max-width: ${i}) { + .p-dialog[${this.id}]:not(.p-dialog-maximized) { + width: ${this.breakpoints[i]} !important; + } + } + `;this.renderer.setProperty(this.styleElement,"innerHTML",t)}}initDrag(t){A.hasClass(t.target,"p-dialog-header-icon")||A.hasClass(t.target,"p-dialog-header-close-icon")||A.hasClass(t.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=t.pageX,this.lastPageY=t.pageY,this.container.style.margin="0",A.addClass(this.document.body,"p-unselectable-text"))}onDrag(t){if(this.dragging){let i=A.getOuterWidth(this.container),r=A.getOuterHeight(this.container),o=t.pageX-this.lastPageX,s=t.pageY-this.lastPageY,a=this.container.getBoundingClientRect(),l=getComputedStyle(this.container),c=parseFloat(l.marginLeft),u=parseFloat(l.marginTop),d=a.left+o-c,p=a.top+s-u,h=A.getViewport();this.container.style.position="fixed",this.keepInViewport?(d>=this.minX&&d+i=this.minY&&p+rparseInt(u))&&p.left+lparseInt(d))&&p.top+c{this.documentDragListener=this.renderer.listen(this.window,"mousemove",this.onDrag.bind(this))})}unbindDocumentDragListener(){this.documentDragListener&&(this.documentDragListener(),this.documentDragListener=null)}bindDocumentDragEndListener(){this.documentDragEndListener||this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.renderer.listen(this.window,"mouseup",this.endDrag.bind(this))})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(this.documentDragEndListener(),this.documentDragEndListener=null)}bindDocumentResizeListeners(){!this.documentResizeListener&&!this.documentResizeEndListener&&this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.renderer.listen(this.window,"mousemove",this.onResize.bind(this)),this.documentResizeEndListener=this.renderer.listen(this.window,"mouseup",this.resizeEnd.bind(this))})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(this.documentResizeListener(),this.documentResizeEndListener(),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindDocumentEscapeListener(){let t=this.el?this.el.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(t,"keydown",i=>{i.key=="Escape"&&this.close(i)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}appendContainer(){this.appendTo&&(this.appendTo==="body"?this.renderer.appendChild(this.document.body,this.wrapper):A.appendChild(this.wrapper,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.renderer.appendChild(this.el.nativeElement,this.wrapper)}onAnimationStart(t){switch(t.toState){case"visible":this.container=t.element,this.wrapper=this.container?.parentElement,this.moveOnTop(),this.appendContainer(),this.bindGlobalListeners(),this.container?.setAttribute(this.id,""),this.modal&&this.enableModality(),!this.modal&&this.blockScroll&&A.addClass(this.document.body,"p-overflow-hidden"),this.focusOnShow&&this.focus();break;case"void":this.wrapper&&this.modal&&A.addClass(this.wrapper,"p-component-overlay-leave");break}}onAnimationEnd(t){switch(t.toState){case"void":this.onContainerDestroy(),this.onHide.emit({}),this.cd.markForCheck();break;case"visible":this.onShow.emit({});break}}onContainerDestroy(){this.unbindGlobalListeners(),this.dragging=!1,this.maskVisible=!1,this.maximized&&(A.removeClass(this.document.body,"p-overflow-hidden"),this.document.body.style.removeProperty("--scrollbar-width"),this.maximized=!1),this.modal&&this.disableModality(),this.blockScroll&&A.removeClass(this.document.body,"p-overflow-hidden"),this.container&&this.autoZIndex&&_n.clear(this.container),this.container=null,this.wrapper=null,this._style=this.originalStyle?I({},this.originalStyle):{}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngOnDestroy(){this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.destroyStyle()}static \u0275fac=function(i){return new(i||n)(k(We),k(Nt),k(Ce),k(At),k(He),k(De),k(Pt))};static \u0275cmp=F({type:n,selectors:[["p-dialog"]],contentQueries:function(i,r,o){if(i&1&&(Je(o,Ra,5),Je(o,Fa,5),Je(o,qe,4)),i&2){let s;J(s=X())&&(r.headerFacet=s.first),J(s=X())&&(r.footerFacet=s.first),J(s=X())&&(r.templates=s)}},viewQuery:function(i,r){if(i&1&&(fe(_Y,5),fe(vY,5),fe(bY,5)),i&2){let o;J(o=X())&&(r.headerViewChild=o.first),J(o=X())&&(r.contentViewChild=o.first),J(o=X())&&(r.footerViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{header:"header",draggable:[2,"draggable","draggable",V],resizable:[2,"resizable","resizable",V],positionLeft:"positionLeft",positionTop:"positionTop",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",modal:[2,"modal","modal",V],closeOnEscape:[2,"closeOnEscape","closeOnEscape",V],dismissableMask:[2,"dismissableMask","dismissableMask",V],rtl:[2,"rtl","rtl",V],closable:[2,"closable","closable",V],responsive:"responsive",appendTo:"appendTo",breakpoints:"breakpoints",styleClass:"styleClass",maskStyleClass:"maskStyleClass",maskStyle:"maskStyle",showHeader:[2,"showHeader","showHeader",V],breakpoint:"breakpoint",blockScroll:[2,"blockScroll","blockScroll",V],autoZIndex:[2,"autoZIndex","autoZIndex",V],baseZIndex:[2,"baseZIndex","baseZIndex",Ke],minX:[2,"minX","minX",Ke],minY:[2,"minY","minY",Ke],focusOnShow:[2,"focusOnShow","focusOnShow",V],maximizable:[2,"maximizable","maximizable",V],keepInViewport:[2,"keepInViewport","keepInViewport",V],focusTrap:[2,"focusTrap","focusTrap",V],transitionOptions:"transitionOptions",closeIcon:"closeIcon",closeAriaLabel:"closeAriaLabel",closeTabindex:"closeTabindex",minimizeIcon:"minimizeIcon",maximizeIcon:"maximizeIcon",visible:"visible",style:"style",position:"position"},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange",onResizeInit:"onResizeInit",onResizeEnd:"onResizeEnd",onDragEnd:"onDragEnd",onMaximize:"onMaximize"},features:[$e],ngContentSelectors:wY,decls:1,vars:1,consts:[["container",""],["notHeadless",""],["content",""],["titlebar",""],["footer",""],[3,"class","ngStyle","ngClass",4,"ngIf"],[3,"ngStyle","ngClass"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","class","pFocusTrapDisabled",4,"ngIf"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","pFocusTrapDisabled"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["class","p-resizable-handle",3,"mousedown",4,"ngIf"],["class","p-dialog-header",3,"mousedown",4,"ngIf"],[3,"ngClass","ngStyle"],["class","p-dialog-footer",4,"ngIf"],[1,"p-resizable-handle",3,"mousedown"],[1,"p-dialog-header",3,"mousedown"],["class","p-dialog-title",3,"id",4,"ngIf"],[1,"p-dialog-header-icons"],["role","button","type","button","pRipple","","pButton","",3,"ngClass","click","keydown.enter",4,"ngIf"],["type","button","pRipple","","pButton","",3,"ngClass","ngStyle","click","keydown.enter",4,"ngIf"],[1,"p-dialog-title",3,"id"],["role","button","type","button","pRipple","","pButton","",3,"click","keydown.enter","ngClass"],["class","p-dialog-header-maximize-icon",3,"ngClass",4,"ngIf"],[4,"ngIf"],[1,"p-dialog-header-maximize-icon",3,"ngClass"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],["type","button","pRipple","","pButton","",3,"click","keydown.enter","ngClass","ngStyle"],["class","p-dialog-header-close-icon",3,"ngClass",4,"ngIf"],[1,"p-dialog-header-close-icon",3,"ngClass"],[1,"p-dialog-footer"]],template:function(i,r){i&1&&(ln(CY),x(0,sZ,2,16,"div",5)),i&2&&f("ngIf",r.maskVisible)},dependencies:()=>[Ye,ot,Mt,st,Ua,zt,Hn,Xt,$a,Wa],styles:[`@layer primeng{.p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{-webkit-transition:none;transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}} +`],encapsulation:2,data:{animation:[oi("animation",[mn("void => visible",[jr(aZ)]),mn("visible => void",[jr(lZ)])])]},changeDetection:0})}return n})(),Bu=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Ha,an,Ln,Xt,$a,Wa,Ge]})}return n})();var uZ=["mask"],dZ=["content"],pZ=["footer"],hZ=["titlebar"],fZ=(n,e,t,i,r,o,s,a,l)=>({"p-dialog-mask":!0,"p-component-overlay p-component-overlay-enter p-dialog-mask-scrollblocker":n,"p-dialog-left":e,"p-dialog-right":t,"p-dialog-top":i,"p-dialog-bottom":r,"p-dialog-top-left":o,"p-dialog-top-right":s,"p-dialog-bottom-left":a,"p-dialog-bottom-right":l}),mZ=(n,e,t,i)=>({"p-dialog p-dynamic-dialog p-component":!0,"p-dialog-rtl":n,"p-dialog-resizable":e,"p-dialog-draggable":t,"p-dialog-maximized":i}),gZ=(n,e)=>({transform:n,transition:e}),yZ=n=>({value:"visible",params:n}),_Z=()=>({"p-dialog-header-icon p-dialog-header-maximize p-link":!0});function vZ(n,e){if(n&1){let t=$();b(0,"div",14),P("mousedown",function(r){M(t);let o=y(2);return D(o.initResize(r))}),C()}}function bZ(n,e){n&1&&ye(0)}function CZ(n,e){if(n&1&&E(0,"span",23),n&2){let t=y(5);f("ngClass",t.maximized?t.minimizeIcon:t.maximizeIcon)}}function wZ(n,e){n&1&&E(0,"WindowMaximizeIcon",24),n&2&&f("styleClass","p-dialog-header-maximize-icon")}function IZ(n,e){n&1&&E(0,"WindowMinimizeIcon",24),n&2&&f("styleClass","p-dialog-header-maximize-icon")}function xZ(n,e){n&1&&ye(0)}function TZ(n,e){n&1&&ye(0)}function EZ(n,e){if(n&1){let t=$();b(0,"button",20),P("click",function(){M(t);let r=y(4);return D(r.maximize())})("keydown.enter",function(){M(t);let r=y(4);return D(r.maximize())}),x(1,CZ,1,1,"span",21)(2,wZ,1,1,"WindowMaximizeIcon",22)(3,IZ,1,1,"WindowMinimizeIcon",22)(4,xZ,1,0,"ng-container",12)(5,TZ,1,0,"ng-container",12),C()}if(n&2){let t=y(4);f("ngClass",St(6,_Z)),m(),f("ngIf",!t.maximizeIconTemplate||!t.minimizeIconTemplate),m(),f("ngIf",!t.maximized&&!t.maximizeIcon&&!t.maximizeIconTemplate),m(),f("ngIf",t.maximized&&!t.minimizeIcon&&!t.minimizeIconTemplate),m(),f("ngComponentOutlet",t.maximizeIconTemplate),m(),f("ngComponentOutlet",t.minimizeIconTemplate)}}function SZ(n,e){n&1&&E(0,"TimesIcon",24),n&2&&f("styleClass","p-dialog-header-close-icon")}function MZ(n,e){n&1&&ye(0)}function DZ(n,e){if(n&1){let t=$();b(0,"button",25),P("click",function(){M(t);let r=y(4);return D(r.hide())})("keydown.enter",function(){M(t);let r=y(4);return D(r.hide())}),x(1,SZ,1,1,"TimesIcon",22)(2,MZ,1,0,"ng-container",12),C()}if(n&2){let t=y(4);f("ngClass","p-dialog-header-icon p-dialog-header-maximize p-link"),O("aria-label",t.closeAriaLabel),m(),f("ngIf",!t.closeIconTemplate),m(),f("ngComponentOutlet",t.closeIconTemplate)}}function OZ(n,e){if(n&1&&(oe(0),b(1,"span",16),Z(2),C(),b(3,"div",17),x(4,EZ,6,7,"button",18)(5,DZ,3,4,"button",19),C(),se()),n&2){let t=y(3);m(),f("id",t.ariaLabelledBy),m(),Pe(t.config.header),m(2),f("ngIf",t.config.maximizable),m(),f("ngIf",t.config.closable!==!1)}}function AZ(n,e){if(n&1){let t=$();b(0,"div",15,3),P("mousedown",function(r){M(t);let o=y(2);return D(o.initDrag(r))}),x(2,bZ,1,0,"ng-container",12)(3,OZ,6,4,"ng-container",11),C()}if(n&2){let t=y(2);m(2),f("ngComponentOutlet",t.headerTemplate),m(),f("ngIf",!t.headerTemplate)}}function kZ(n,e){}function NZ(n,e){n&1&&x(0,kZ,0,0,"ng-template",26)}function LZ(n,e){n&1&&ye(0)}function PZ(n,e){if(n&1&&(oe(0),Z(1),se()),n&2){let t=y(3);m(),yt(" ",t.config.footer," ")}}function RZ(n,e){n&1&&ye(0)}function FZ(n,e){if(n&1&&(b(0,"div",27,4),x(2,PZ,2,1,"ng-container",11)(3,RZ,1,0,"ng-container",12),C()),n&2){let t=y(2);m(2),f("ngIf",!t.footerTemplate),m(),f("ngComponentOutlet",t.footerTemplate)}}function jZ(n,e){if(n&1){let t=$();b(0,"div",7,1),P("@animation.start",function(r){M(t);let o=y();return D(o.onAnimationStart(r))})("@animation.done",function(r){M(t);let o=y();return D(o.onAnimationEnd(r))}),x(2,vZ,1,0,"div",8)(3,AZ,4,2,"div",9),b(4,"div",10,2),x(6,NZ,1,0,null,11)(7,LZ,1,0,"ng-container",12),C(),x(8,FZ,4,2,"div",13),C()}if(n&2){let t=y();W(t.config.styleClass),f("ngClass",kr(14,mZ,t.config.rtl,t.config.resizable,t.config.draggable,t.maximized))("ngStyle",t.containerStyle)("@animation",_e(22,yZ,_t(19,gZ,t.transformOptions,t.config.transitionOptions||"150ms cubic-bezier(0, 0, 0.2, 1)")))("pFocusTrapDisabled",t.config.focusTrap===!1),O("aria-labelledby",t.ariaLabelledBy)("aria-modal",!0),m(2),f("ngIf",t.config.resizable),m(),f("ngIf",t.config.showHeader!==!1),m(),f("ngStyle",t.config.contentStyle),m(2),f("ngIf",!t.contentTemplate),m(),f("ngComponentOutlet",t.contentTemplate),m(),f("ngIf",t.config.footer||t.footerTemplate)}}var gL=(()=>{class n{viewContainerRef;constructor(t){this.viewContainerRef=t}static \u0275fac=function(i){return new(i||n)(k(Un))};static \u0275dir=gt({type:n,selectors:[["","pDynamicDialogContent",""]],hostAttrs:[1,"p-element"]})}return n})(),zu=class{data;header;ariaLabelledBy;footer;width;height;closeOnEscape;focusOnShow=!0;focusOnClose=!0;focusTrap=!0;baseZIndex;autoZIndex;dismissableMask;rtl;style;contentStyle;styleClass;transitionOptions;closable;showHeader;modal;maskStyleClass;resizable;draggable;keepInViewport;minX;minY;maximizable;maximizeIcon;minimizeIcon;position;closeAriaLabel;appendTo;duplicate;breakpoints;templates},Jl=class{constructor(){}close(e){this._onClose.next(e),setTimeout(()=>{this._onClose.complete()},1e3)}destroy(){this._onDestroy.next(null)}dragStart(e){this._onDragStart.next(e)}dragEnd(e){this._onDragEnd.next(e)}resizeInit(e){this._onResizeInit.next(e)}resizeEnd(e){this._onResizeEnd.next(e)}maximize(e){this._onMaximize.next(e)}_onClose=new pe;onClose=this._onClose.asObservable();_onDestroy=new pe;onDestroy=this._onDestroy.asObservable();_onDragStart=new pe;onDragStart=this._onDragStart.asObservable();_onDragEnd=new pe;onDragEnd=this._onDragEnd.asObservable();_onResizeInit=new pe;onResizeInit=this._onResizeInit.asObservable();_onResizeEnd=new pe;onResizeEnd=this._onResizeEnd.asObservable();_onMaximize=new pe;onMaximize=this._onMaximize.asObservable();onChildComponentLoaded=new pe},VZ=Fr([Ct({transform:"{{transform}}",opacity:0}),fn("{{transition}}",Ct({transform:"none",opacity:1}))]),BZ=Fr([fn("{{transition}}",Ct({transform:"{{transform}}",opacity:0}))]),zZ=(()=>{class n{document;platformId;cd;renderer;config;dialogRef;zone;primeNGConfig;parentDialog;visible=!0;componentRef;mask;resizing;dragging;maximized;_style={};originalStyle;lastPageX;lastPageY;ariaLabelledBy;id=nt();styleElement;insertionPoint;maskViewChild;contentViewChild;footerViewChild;headerViewChild;childComponentType;container;wrapper;documentKeydownListener;documentEscapeListener;maskClickListener;transformOptions="scale(0.7)";documentResizeListener;documentResizeEndListener;documentDragListener;documentDragEndListener;get minX(){return this.config.minX?this.config.minX:0}get minY(){return this.config.minY?this.config.minY:0}get keepInViewport(){return this.config.keepInViewport}get maximizable(){return this.config.maximizable}get maximizeIcon(){return this.config.maximizeIcon}get minimizeIcon(){return this.config.minimizeIcon}get style(){return this._style}get position(){return this.config.position}get closeAriaLabel(){return this.primeNGConfig.getTranslation(si.ARIA).close}set style(t){t&&(this._style=I({},t),this.originalStyle=t)}get parent(){let t=Array.from(this.document.getElementsByClassName("p-dialog"));if(t.length>1)return t.pop()}get parentContent(){let t=Array.from(this.document.getElementsByClassName("p-dialog"));if(t.length>0){let i=t[t.length-1].querySelector(".p-dialog-content");if(i)return Array.isArray(i)?i[0]:i}}get header(){return this.config.header}get data(){return this.config.data}get breakpoints(){return this.config.breakpoints}get footerTemplate(){return this.config?.templates?.footer}get headerTemplate(){return this.config?.templates?.header}get contentTemplate(){return this.config?.templates?.content}get minimizeIconTemplate(){return this.config?.templates?.minimizeicon}get maximizeIconTemplate(){return this.config?.templates?.maximizeicon}get closeIconTemplate(){return this.config?.templates?.closeicon}get dynamicDialogCount(){return this.document.querySelectorAll("p-dynamicdialog")?.length}get containerStyle(){return R(I({},this.config.style),{width:this.config.width,height:this.config.height})}constructor(t,i,r,o,s,a,l,c,u){this.document=t,this.platformId=i,this.cd=r,this.renderer=o,this.config=s,this.dialogRef=a,this.zone=l,this.primeNGConfig=c,this.parentDialog=u}ngOnInit(){this.breakpoints&&this.createStyle()}createStyle(){if(Dt(this.platformId)&&!this.styleElement){this.styleElement=this.renderer.createElement("style"),this.styleElement.type="text/css",A.setAttribute(this.styleElement,"nonce",this.primeNGConfig?.csp()?.nonce),this.renderer.appendChild(this.document.head,this.styleElement);let t="";for(let i in this.breakpoints)t+=` + @media screen and (max-width: ${i}) { + .p-dialog[${this.id}]:not(.p-dialog-maximized) { + width: ${this.breakpoints[i]} !important; + } + } + `;this.renderer.setProperty(this.styleElement,"innerHTML",t)}}destroyStyle(){this.styleElement&&(this.renderer.removeChild(this.document.head,this.styleElement),this.styleElement=null)}ngAfterViewInit(){this.loadChildComponent(this.childComponentType),this.ariaLabelledBy=this.getAriaLabelledBy(),this.cd.detectChanges()}getAriaLabelledBy(){return this.header!==null?nt()+"_header":null}loadChildComponent(t){let i=this.insertionPoint?.viewContainerRef;i?.clear(),this.componentRef=i?.createComponent(t),this.dialogRef.onChildComponentLoaded.next(this.componentRef.instance)}moveOnTop(){this.config.autoZIndex!==!1&&(_n.set("modal",this.container,(this.config.baseZIndex||0)+this.primeNGConfig.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}onAnimationStart(t){switch(t.toState){case"visible":this.container=t.element,this.wrapper=this.container.parentElement,this.moveOnTop(),this.parent&&this.unbindGlobalListeners(),this.bindGlobalListeners(),this.container?.setAttribute(this.id,""),this.config.modal!==!1&&this.enableModality(),this.config.focusOnShow!==!1&&this.focus();break;case"void":this.wrapper&&this.config.modal!==!1&&A.addClass(this.wrapper,"p-component-overlay-leave");break}}onAnimationEnd(t){t.toState==="void"&&(this.parentContent&&this.config.focusOnClose!==!1&&this.focus(this.parentContent),this.onContainerDestroy(),this.dialogRef.destroy())}onContainerDestroy(){this.unbindGlobalListeners(),this.container&&this.config.autoZIndex!==!1&&_n.clear(this.container),this.config.modal!==!1&&this.disableModality(),this.container=null}close(){this.visible=!1,this.cd.markForCheck()}hide(){this.dialogRef&&this.dialogRef.close()}enableModality(){this.config.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",t=>{this.wrapper&&this.wrapper.isSameNode(t.target)&&this.hide()})),this.dynamicDialogCount===1&&A.addClass(this.document.body,"p-overflow-hidden")}disableModality(){this.wrapper&&(this.config.dismissableMask&&this.unbindMaskClickListener(),this.dynamicDialogCount===1&&A.removeClass(this.document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())}focus(t=this.contentViewChild.nativeElement){if(!A.getFocusableElements(t).length)return;let r=A.getFocusableElement(t,"[autofocus]");if(r){this.zone.runOutsideAngular(()=>{setTimeout(()=>r.focus(),5)});return}let o=A.getFocusableElement(t);o?this.zone.runOutsideAngular(()=>{setTimeout(()=>o.focus(),5)}):this.footerViewChild?this.focus(this.footerViewChild.nativeElement):!o&&this.headerViewChild&&this.focus(this.headerViewChild.nativeElement)}maximize(){this.maximized=!this.maximized,this.maximized?A.addClass(this.document.body,"p-overflow-hidden"):A.removeClass(this.document.body,"p-overflow-hidden"),this.dialogRef.maximize({maximized:this.maximized})}initResize(t){this.config.resizable&&(this.documentResizeListener||this.bindDocumentResizeListeners(),this.resizing=!0,this.lastPageX=t.pageX,this.lastPageY=t.pageY,A.addClass(this.document.body,"p-unselectable-text"),this.dialogRef.resizeInit(t))}onResize(t){if(this.resizing){let i=t.pageX-this.lastPageX,r=t.pageY-this.lastPageY,o=A.getOuterWidth(this.container),s=A.getOuterHeight(this.container),a=A.getOuterHeight(this.contentViewChild.nativeElement),l=o+i,c=s+r,u=this.container.style.minWidth,d=this.container.style.minHeight,p=this.container.getBoundingClientRect(),h=A.getViewport();(!parseInt(this.container.style.top)||!parseInt(this.container.style.left))&&(l+=i,c+=r),(!u||l>parseInt(u))&&p.left+lparseInt(d))&&p.top+c=this.minX&&l+i=this.minY&&c+r{this.documentDragListener=this.renderer.listen(this.document,"mousemove",this.onDrag.bind(this))})}bindDocumentDragEndListener(){Dt(this.platformId)&&this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.renderer.listen(this.document,"mouseup",this.endDrag.bind(this))})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(this.documentDragEndListener(),this.documentDragListener=null)}unbindDocumentDragListener(){this.documentDragListener&&(this.documentDragListener(),this.documentDragListener=null)}bindDocumentResizeListeners(){Dt(this.platformId)&&this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.renderer.listen(this.document,"mousemove",this.onResize.bind(this)),this.documentResizeEndListener=this.renderer.listen(this.document,"mouseup",this.resizeEnd.bind(this))})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(this.documentResizeListener(),this.documentResizeEndListener(),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindGlobalListeners(){this.config.closeOnEscape!==!1&&this.bindDocumentEscapeListener(),this.config.resizable&&this.bindDocumentResizeListeners(),this.config.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener())}unbindGlobalListeners(){this.unbindDocumentEscapeListener(),this.unbindDocumentResizeListeners(),this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener()}bindDocumentEscapeListener(){let t=this.maskViewChild?this.maskViewChild.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(t,"keydown",i=>{i.which==27&&parseInt(this.container.style.zIndex)==_n.getCurrent()&&this.hide()})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}ngOnDestroy(){this.onContainerDestroy(),this.componentRef&&this.componentRef.destroy(),this.destroyStyle()}static \u0275fac=function(i){return new(i||n)(k(We),k(Nt),k(De),k(At),k(zu),k(Jl),k(He),k(Pt),k(n,12))};static \u0275cmp=F({type:n,selectors:[["p-dynamicDialog"]],viewQuery:function(i,r){if(i&1&&(fe(gL,5),fe(uZ,5),fe(dZ,5),fe(pZ,5),fe(hZ,5)),i&2){let o;J(o=X())&&(r.insertionPoint=o.first),J(o=X())&&(r.maskViewChild=o.first),J(o=X())&&(r.contentViewChild=o.first),J(o=X())&&(r.footerViewChild=o.first),J(o=X())&&(r.headerViewChild=o.first)}},hostAttrs:[1,"p-element"],decls:3,vars:14,consts:[["mask",""],["container",""],["content",""],["titlebar",""],["footer",""],[3,"ngClass"],["role","dialog","pFocusTrap","",3,"ngClass","ngStyle","class","pFocusTrapDisabled",4,"ngIf"],["role","dialog","pFocusTrap","",3,"ngClass","ngStyle","pFocusTrapDisabled"],["class","p-resizable-handle",3,"mousedown",4,"ngIf"],["class","p-dialog-header",3,"mousedown",4,"ngIf"],[1,"p-dialog-content",3,"ngStyle"],[4,"ngIf"],[4,"ngComponentOutlet"],["class","p-dialog-footer",4,"ngIf"],[1,"p-resizable-handle",3,"mousedown"],[1,"p-dialog-header",3,"mousedown"],[1,"p-dialog-title",3,"id"],[1,"p-dialog-header-icons"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],["type","button","role","button",3,"ngClass","click","keydown.enter",4,"ngIf"],["type","button","tabindex","-1","pRipple","",3,"click","keydown.enter","ngClass"],["class","p-dialog-header-maximize-icon",3,"ngClass",4,"ngIf"],[3,"styleClass",4,"ngIf"],[1,"p-dialog-header-maximize-icon",3,"ngClass"],[3,"styleClass"],["type","button","role","button",3,"click","keydown.enter","ngClass"],["pDynamicDialogContent",""],[1,"p-dialog-footer"]],template:function(i,r){i&1&&(b(0,"div",5,0),x(2,jZ,9,24,"div",6),C()),i&2&&(W(r.config.maskStyleClass),f("ngClass",Iu(4,fZ,[r.config.modal!==!1,r.position==="left",r.position==="right",r.position==="top",r.position==="bottom",r.position==="topleft"||r.position==="top-left",r.position==="topright"||r.position==="top-right",r.position==="bottomleft"||r.position==="bottom-left",r.position==="bottomright"||r.position==="bottom-right"])),m(2),f("ngIf",r.visible))},dependencies:()=>[Ye,Rk,ot,st,$a,Wa,Xt,Ua,gL],styles:[`@layer primeng{.p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{-webkit-transition:none;transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}} +`],encapsulation:2,data:{animation:[oi("animation",[mn("void => visible",[jr(VZ)]),mn("visible => void",[jr(BZ)])])]}})}return n})(),yL=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,$a,Wa,Xt,Ge,Ha,Ge]})}return n})(),dx=class{_parentInjector;_additionalTokens;constructor(e,t){this._parentInjector=e,this._additionalTokens=t}get(e,t,i){let r=this._additionalTokens.get(e);return r||this._parentInjector.get(e,t)}},px=(()=>{class n{appRef;injector;document;dialogComponentRefMap=new Map;constructor(t,i,r){this.appRef=t,this.injector=i,this.document=r}open(t,i){if(!this.duplicationPermission(t,i))return null;let r=this.appendDialogComponentToBody(i,t);return this.dialogComponentRefMap.get(r).instance.childComponentType=t,r}getInstance(t){return this.dialogComponentRefMap.get(t).instance}appendDialogComponentToBody(t,i){let r=new WeakMap;r.set(zu,t);let o=new Jl;r.set(Jl,o);let s=o.onClose.subscribe(()=>{this.dialogComponentRefMap.get(o).instance.close()}),a=o.onDestroy.subscribe(()=>{this.removeDialogComponentFromBody(o),a.unsubscribe(),s.unsubscribe()}),l=Tu(zZ,{environmentInjector:this.appRef.injector,elementInjector:new dx(this.injector,r)});this.appRef.attachView(l.hostView);let c=l.hostView.rootNodes[0];return!t.appendTo||t.appendTo==="body"?this.document.body.appendChild(c):A.appendChild(c,t.appendTo),this.dialogComponentRefMap.set(o,l),o}removeDialogComponentFromBody(t){if(!t||!this.dialogComponentRefMap.has(t))return;let i=this.dialogComponentRefMap.get(t);this.appRef.detachView(i.hostView),i.destroy(),this.dialogComponentRefMap.delete(t)}duplicationPermission(t,i){if(i.duplicate)return!0;let r=!0;for(let[o,s]of this.dialogComponentRefMap)if(s.instance.childComponentType===t){r=!1;break}return r}static \u0275fac=function(i){return new(i||n)(re(fi),re($t),re(We))};static \u0275prov=K({token:n,factory:n.\u0275fac})}return n})();var ny=(()=>{class n{el;ngModel;control;cd;config;autoResize;variant="outlined";onResize=new j;filled;cachedScrollHeight;ngModelSubscription;ngControlSubscription;constructor(t,i,r,o,s){this.el=t,this.ngModel=i,this.control=r,this.cd=o,this.config=s}ngOnInit(){this.ngModel&&(this.ngModelSubscription=this.ngModel.valueChanges.subscribe(()=>{this.updateState()})),this.control&&(this.ngControlSubscription=this.control.valueChanges.subscribe(()=>{this.updateState()}))}ngAfterViewInit(){this.autoResize&&this.resize(),this.updateFilledState(),this.cd.detectChanges()}onInput(t){this.updateState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length}resize(t){this.el.nativeElement.style.height="auto",this.el.nativeElement.style.height=this.el.nativeElement.scrollHeight+"px",parseFloat(this.el.nativeElement.style.height)>=parseFloat(this.el.nativeElement.style.maxHeight)?(this.el.nativeElement.style.overflowY="scroll",this.el.nativeElement.style.height=this.el.nativeElement.style.maxHeight):this.el.nativeElement.style.overflow="hidden",this.onResize.emit(t||{})}updateState(){this.updateFilledState(),this.autoResize&&this.resize()}ngOnDestroy(){this.ngModelSubscription&&this.ngModelSubscription.unsubscribe(),this.ngControlSubscription&&this.ngControlSubscription.unsubscribe()}static \u0275fac=function(i){return new(i||n)(k(Ce),k($l,8),k(Hi,8),k(De),k(Pt))};static \u0275dir=gt({type:n,selectors:[["","pInputTextarea",""]],hostAttrs:[1,"p-inputtextarea","p-inputtext","p-component","p-element"],hostVars:6,hostBindings:function(i,r){i&1&&P("input",function(s){return r.onInput(s)}),i&2&&Gt("p-filled",r.filled)("p-inputtextarea-resizable",r.autoResize)("p-variant-filled",r.variant==="filled"||r.config.inputStyle()==="filled")},inputs:{autoResize:[2,"autoResize","autoResize",V],variant:"variant"},outputs:{onResize:"onResize"},features:[$e]})}return n})(),Uu=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te]})}return n})();var UZ=["overlay"],HZ=["content"],$Z=["*"],WZ=(n,e,t,i,r,o,s,a,l,c,u,d,p,h)=>({"p-overlay p-component":!0,"p-overlay-modal p-component-overlay p-component-overlay-enter":n,"p-overlay-center":e,"p-overlay-top":t,"p-overlay-top-start":i,"p-overlay-top-end":r,"p-overlay-bottom":o,"p-overlay-bottom-start":s,"p-overlay-bottom-end":a,"p-overlay-left":l,"p-overlay-left-start":c,"p-overlay-left-end":u,"p-overlay-right":d,"p-overlay-right-start":p,"p-overlay-right-end":h}),GZ=(n,e,t)=>({showTransitionParams:n,hideTransitionParams:e,transform:t}),qZ=n=>({value:"visible",params:n}),QZ=n=>({mode:n}),KZ=n=>({$implicit:n});function YZ(n,e){n&1&&ye(0)}function ZZ(n,e){if(n&1){let t=$();b(0,"div",3,1),P("click",function(r){M(t);let o=y(2);return D(o.onOverlayContentClick(r))})("@overlayContentAnimation.start",function(r){M(t);let o=y(2);return D(o.onOverlayContentAnimationStart(r))})("@overlayContentAnimation.done",function(r){M(t);let o=y(2);return D(o.onOverlayContentAnimationDone(r))}),Vt(2),x(3,YZ,1,0,"ng-container",4),C()}if(n&2){let t=y(2);W(t.contentStyleClass),f("ngStyle",t.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",_e(11,qZ,Sn(7,GZ,t.showTransitionOptions,t.hideTransitionOptions,t.transformOptions[t.modal?t.overlayResponsiveDirection:"default"]))),m(3),f("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",_e(15,KZ,_e(13,QZ,t.overlayMode)))}}function JZ(n,e){if(n&1){let t=$();b(0,"div",3,0),P("click",function(){M(t);let r=y();return D(r.onOverlayClick())}),x(2,ZZ,4,17,"div",2),C()}if(n&2){let t=y();W(t.styleClass),f("ngStyle",t.style)("ngClass",Iu(5,WZ,[t.modal,t.modal&&t.overlayResponsiveDirection==="center",t.modal&&t.overlayResponsiveDirection==="top",t.modal&&t.overlayResponsiveDirection==="top-start",t.modal&&t.overlayResponsiveDirection==="top-end",t.modal&&t.overlayResponsiveDirection==="bottom",t.modal&&t.overlayResponsiveDirection==="bottom-start",t.modal&&t.overlayResponsiveDirection==="bottom-end",t.modal&&t.overlayResponsiveDirection==="left",t.modal&&t.overlayResponsiveDirection==="left-start",t.modal&&t.overlayResponsiveDirection==="left-end",t.modal&&t.overlayResponsiveDirection==="right",t.modal&&t.overlayResponsiveDirection==="right-start",t.modal&&t.overlayResponsiveDirection==="right-end"])),m(2),f("ngIf",t.visible)}}var XZ={provide:ti,useExisting:dn(()=>hx),multi:!0},eJ=Fr([Ct({transform:"{{transform}}",opacity:0}),fn("{{showTransitionParams}}")]),tJ=Fr([fn("{{hideTransitionParams}}",Ct({transform:"{{transform}}",opacity:0}))]),hx=(()=>{class n{document;platformId;el;renderer;config;overlayService;cd;zone;get visible(){return this._visible}set visible(t){this._visible=t,this._visible&&!this.modalVisible&&(this.modalVisible=!0)}get mode(){return this._mode||this.overlayOptions?.mode}set mode(t){this._mode=t}get style(){return Ee.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(t){this._style=t}get styleClass(){return Ee.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(t){this._styleClass=t}get contentStyle(){return Ee.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(t){this._contentStyle=t}get contentStyleClass(){return Ee.merge(this._contentStyleClass,this.modal?this.overlayResponsiveOptions?.contentStyleClass:this.overlayOptions?.contentStyleClass)}set contentStyleClass(t){this._contentStyleClass=t}get target(){let t=this._target||this.overlayOptions?.target;return t===void 0?"@prev":t}set target(t){this._target=t}get appendTo(){return this._appendTo||this.overlayOptions?.appendTo}set appendTo(t){this._appendTo=t}get autoZIndex(){let t=this._autoZIndex||this.overlayOptions?.autoZIndex;return t===void 0?!0:t}set autoZIndex(t){this._autoZIndex=t}get baseZIndex(){let t=this._baseZIndex||this.overlayOptions?.baseZIndex;return t===void 0?0:t}set baseZIndex(t){this._baseZIndex=t}get showTransitionOptions(){let t=this._showTransitionOptions||this.overlayOptions?.showTransitionOptions;return t===void 0?".12s cubic-bezier(0, 0, 0.2, 1)":t}set showTransitionOptions(t){this._showTransitionOptions=t}get hideTransitionOptions(){let t=this._hideTransitionOptions||this.overlayOptions?.hideTransitionOptions;return t===void 0?".1s linear":t}set hideTransitionOptions(t){this._hideTransitionOptions=t}get listener(){return this._listener||this.overlayOptions?.listener}set listener(t){this._listener=t}get responsive(){return this._responsive||this.overlayOptions?.responsive}set responsive(t){this._responsive=t}get options(){return this._options}set options(t){this._options=t}visibleChange=new j;onBeforeShow=new j;onShow=new j;onBeforeHide=new j;onHide=new j;onAnimationStart=new j;onAnimationDone=new j;templates;overlayViewChild;contentViewChild;contentTemplate;_visible=!1;_mode;_style;_styleClass;_contentStyle;_contentStyleClass;_target;_appendTo;_autoZIndex;_baseZIndex;_showTransitionOptions;_hideTransitionOptions;_listener;_responsive;_options;modalVisible=!1;isOverlayClicked=!1;isOverlayContentClicked=!1;scrollHandler;documentClickListener;documentResizeListener;documentKeyboardListener;window;transformOptions={default:"scaleY(0.8)",center:"scale(0.7)",top:"translate3d(0px, -100%, 0px)","top-start":"translate3d(0px, -100%, 0px)","top-end":"translate3d(0px, -100%, 0px)",bottom:"translate3d(0px, 100%, 0px)","bottom-start":"translate3d(0px, 100%, 0px)","bottom-end":"translate3d(0px, 100%, 0px)",left:"translate3d(-100%, 0px, 0px)","left-start":"translate3d(-100%, 0px, 0px)","left-end":"translate3d(-100%, 0px, 0px)",right:"translate3d(100%, 0px, 0px)","right-start":"translate3d(100%, 0px, 0px)","right-end":"translate3d(100%, 0px, 0px)"};get modal(){if(Dt(this.platformId))return this.mode==="modal"||this.overlayResponsiveOptions&&this.window?.matchMedia(this.overlayResponsiveOptions.media?.replace("@media","")||`(max-width: ${this.overlayResponsiveOptions.breakpoint})`).matches}get overlayMode(){return this.mode||(this.modal?"modal":"overlay")}get overlayOptions(){return I(I({},this.config?.overlayOptions),this.options)}get overlayResponsiveOptions(){return I(I({},this.overlayOptions?.responsive),this.responsive)}get overlayResponsiveDirection(){return this.overlayResponsiveOptions?.direction||"center"}get overlayEl(){return this.overlayViewChild?.nativeElement}get contentEl(){return this.contentViewChild?.nativeElement}get targetEl(){return A.getTargetElement(this.target,this.el?.nativeElement)}constructor(t,i,r,o,s,a,l,c){this.document=t,this.platformId=i,this.el=r,this.renderer=o,this.config=s,this.overlayService=a,this.cd=l,this.zone=c,this.window=this.document.defaultView}ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"content":this.contentTemplate=t.template;break;default:this.contentTemplate=t.template;break}})}show(t,i=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:t||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&A.focus(this.targetEl),this.modal&&A.addClass(this.document?.body,"p-overflow-hidden")}hide(t,i=!1){if(this.visible)this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:t||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&A.focus(this.targetEl),this.modal&&A.removeClass(this.document?.body,"p-overflow-hidden");else return}alignOverlay(){!this.modal&&A.alignOverlay(this.overlayEl,this.targetEl,this.appendTo)}onVisibleChange(t){this._visible=t,this.visibleChange.emit(t)}onOverlayClick(){this.isOverlayClicked=!0}onOverlayContentClick(t){this.overlayService.add({originalEvent:t,target:this.targetEl}),this.isOverlayContentClicked=!0}onOverlayContentAnimationStart(t){switch(t.toState){case"visible":this.handleEvents("onBeforeShow",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.autoZIndex&&_n.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),A.appendOverlay(this.overlayEl,this.appendTo==="body"?this.document.body:this.appendTo,this.appendTo),this.alignOverlay();break;case"void":this.handleEvents("onBeforeHide",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.modal&&A.addClass(this.overlayEl,"p-component-overlay-leave");break}this.handleEvents("onAnimationStart",t)}onOverlayContentAnimationDone(t){let i=this.overlayEl||t.element.parentElement;switch(t.toState){case"visible":this.visible&&this.show(i,!0),this.bindListeners();break;case"void":if(!this.visible){this.hide(i,!0),this.modalVisible=!1,this.unbindListeners(),A.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),_n.clear(i),this.cd.markForCheck();break}}this.handleEvents("onAnimationDone",t)}handleEvents(t,i){this[t].emit(i),this.options&&this.options[t]&&this.options[t](i),this.config?.overlayOptions&&(this.config?.overlayOptions)[t]&&(this.config?.overlayOptions)[t](i)}bindListeners(){this.unbindListeners(),this.bindScrollListener(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindDocumentKeyboardListener()}unbindListeners(){this.unbindScrollListener(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindDocumentKeyboardListener()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Ru(this.targetEl,t=>{(this.listener?this.listener(t,{type:"scroll",mode:this.overlayMode,valid:!0}):!0)&&this.hide(t,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",t=>{let r=!(this.targetEl&&(this.targetEl.isSameNode(t.target)||!this.isOverlayClicked&&this.targetEl.contains(t.target)))&&!this.isOverlayContentClicked;(this.listener?this.listener(t,{type:"outside",mode:this.overlayMode,valid:t.which!==3&&r}):r)&&this.hide(t),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.window,"resize",t=>{(this.listener?this.listener(t,{type:"resize",mode:this.overlayMode,valid:!A.isTouchDevice()}):!A.isTouchDevice())&&this.hide(t,!0)}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindDocumentKeyboardListener(){this.documentKeyboardListener||this.zone.runOutsideAngular(()=>{this.documentKeyboardListener=this.renderer.listen(this.window,"keydown",t=>{if(this.overlayOptions.hideOnEscape===!1||t.code!=="Escape")return;(this.listener?this.listener(t,{type:"keydown",mode:this.overlayMode,valid:!A.isTouchDevice()}):!A.isTouchDevice())&&this.zone.run(()=>{this.hide(t,!0)})})})}unbindDocumentKeyboardListener(){this.documentKeyboardListener&&(this.documentKeyboardListener(),this.documentKeyboardListener=null)}ngOnDestroy(){this.hide(this.overlayEl,!0),this.overlayEl&&(A.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),_n.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners()}static \u0275fac=function(i){return new(i||n)(k(We),k(Nt),k(Ce),k(At),k(Pt),k(_3),k(De),k(He))};static \u0275cmp=F({type:n,selectors:[["p-overlay"]],contentQueries:function(i,r,o){if(i&1&&Je(o,qe,4),i&2){let s;J(s=X())&&(r.templates=s)}},viewQuery:function(i,r){if(i&1&&(fe(UZ,5),fe(HZ,5)),i&2){let o;J(o=X())&&(r.overlayViewChild=o.first),J(o=X())&&(r.contentViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{visible:"visible",mode:"mode",style:"style",styleClass:"styleClass",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",target:"target",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",listener:"listener",responsive:"responsive",options:"options"},outputs:{visibleChange:"visibleChange",onBeforeShow:"onBeforeShow",onShow:"onShow",onBeforeHide:"onBeforeHide",onHide:"onHide",onAnimationStart:"onAnimationStart",onAnimationDone:"onAnimationDone"},features:[on([XZ])],ngContentSelectors:$Z,decls:1,vars:1,consts:[["overlay",""],["content",""],[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"click","ngStyle","ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,r){i&1&&(ln(),x(0,JZ,3,20,"div",2)),i&2&&f("ngIf",r.modalVisible)},dependencies:[Ye,ot,Mt,st],styles:[`@layer primeng{.p-overlay{position:absolute;top:0;left:0}.p-overlay-modal{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%}.p-overlay-content{transform-origin:inherit}.p-overlay-modal>.p-overlay-content{z-index:1;width:90%}.p-overlay-top{align-items:flex-start}.p-overlay-top-start{align-items:flex-start;justify-content:flex-start}.p-overlay-top-end{align-items:flex-start;justify-content:flex-end}.p-overlay-bottom{align-items:flex-end}.p-overlay-bottom-start{align-items:flex-end;justify-content:flex-start}.p-overlay-bottom-end{align-items:flex-end;justify-content:flex-end}.p-overlay-left{justify-content:flex-start}.p-overlay-left-start{justify-content:flex-start;align-items:flex-start}.p-overlay-left-end{justify-content:flex-start;align-items:flex-end}.p-overlay-right{justify-content:flex-end}.p-overlay-right-start{justify-content:flex-end;align-items:flex-start}.p-overlay-right-end{justify-content:flex-end;align-items:flex-end}} +`],encapsulation:2,data:{animation:[oi("overlayContentAnimation",[mn(":enter",[jr(eJ)]),mn(":leave",[jr(tJ)])])]},changeDetection:0})}return n})(),fx=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Ge,Ge]})}return n})();var Hu=(()=>{class n{platformId;el;zone;config;renderer;viewContainer;tooltipPosition;tooltipEvent="hover";appendTo;positionStyle;tooltipStyleClass;tooltipZIndex;escape=!0;showDelay;hideDelay;life;positionTop;positionLeft;autoHide=!0;fitContent=!0;hideOnEscape=!0;content;get disabled(){return this._disabled}set disabled(t){this._disabled=t,this.deactivate()}tooltipOptions;_tooltipOptions={tooltipLabel:null,tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",positionStyle:null,tooltipStyleClass:null,tooltipZIndex:"auto",escape:!0,disabled:null,showDelay:null,hideDelay:null,positionTop:null,positionLeft:null,life:null,autoHide:!0,hideOnEscape:!0,id:nt()+"_tooltip"};_disabled;container;styleClass;tooltipText;showTimeout;hideTimeout;active;mouseEnterListener;mouseLeaveListener;containerMouseleaveListener;clickListener;focusListener;blurListener;scrollHandler;resizeListener;interactionInProgress=!1;constructor(t,i,r,o,s,a){this.platformId=t,this.el=i,this.zone=r,this.config=o,this.renderer=s,this.viewContainer=a}ngAfterViewInit(){Dt(this.platformId)&&this.zone.runOutsideAngular(()=>{let t=this.getOption("tooltipEvent");if((t==="hover"||t==="both")&&(this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onInputClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("click",this.clickListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener)),t==="focus"||t==="both"){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let i=this.el.nativeElement.querySelector(".p-component");i||(i=this.getTarget(this.el.nativeElement)),i.addEventListener("focus",this.focusListener),i.addEventListener("blur",this.blurListener)}})}ngOnChanges(t){t.tooltipPosition&&this.setOption({tooltipPosition:t.tooltipPosition.currentValue}),t.tooltipEvent&&this.setOption({tooltipEvent:t.tooltipEvent.currentValue}),t.appendTo&&this.setOption({appendTo:t.appendTo.currentValue}),t.positionStyle&&this.setOption({positionStyle:t.positionStyle.currentValue}),t.tooltipStyleClass&&this.setOption({tooltipStyleClass:t.tooltipStyleClass.currentValue}),t.tooltipZIndex&&this.setOption({tooltipZIndex:t.tooltipZIndex.currentValue}),t.escape&&this.setOption({escape:t.escape.currentValue}),t.showDelay&&this.setOption({showDelay:t.showDelay.currentValue}),t.hideDelay&&this.setOption({hideDelay:t.hideDelay.currentValue}),t.life&&this.setOption({life:t.life.currentValue}),t.positionTop&&this.setOption({positionTop:t.positionTop.currentValue}),t.positionLeft&&this.setOption({positionLeft:t.positionLeft.currentValue}),t.disabled&&this.setOption({disabled:t.disabled.currentValue}),t.content&&(this.setOption({tooltipLabel:t.content.currentValue}),this.active&&(t.content.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),t.autoHide&&this.setOption({autoHide:t.autoHide.currentValue}),t.id&&this.setOption({id:t.id.currentValue}),t.tooltipOptions&&(this._tooltipOptions=I(I({},this._tooltipOptions),t.tooltipOptions.currentValue),this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}isAutoHide(){return this.getOption("autoHide")}onMouseEnter(t){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(t){this.isAutoHide()?this.deactivate():!(A.hasClass(t.relatedTarget,"p-tooltip")||A.hasClass(t.relatedTarget,"p-tooltip-text")||A.hasClass(t.relatedTarget,"p-tooltip-arrow"))&&this.deactivate()}onFocus(t){this.activate()}onBlur(t){this.deactivate()}onInputClick(t){this.deactivate()}onPressEscape(){this.hideOnEscape&&this.deactivate()}activate(){if(!this.interactionInProgress&&(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life"))){let t=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},t)}this.interactionInProgress=!0}deactivate(){this.interactionInProgress=!1,this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div"),this.container.setAttribute("id",this.getOption("id")),this.container.setAttribute("role","tooltip");let t=document.createElement("div");t.className="p-tooltip-arrow",this.container.appendChild(t),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),this.getOption("appendTo")==="body"?document.body.appendChild(this.container):this.getOption("appendTo")==="target"?A.appendChild(this.container,this.el.nativeElement):A.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block",this.fitContent&&(this.container.style.width="fit-content"),this.isAutoHide()?this.container.style.pointerEvents="none":(this.container.style.pointerEvents="unset",this.bindContainerMouseleaveListener())}bindContainerMouseleaveListener(){if(!this.containerMouseleaveListener){let t=this.container??this.container.nativeElement;this.containerMouseleaveListener=this.renderer.listen(t,"mouseleave",i=>{this.deactivate()})}}unbindContainerMouseleaveListener(){this.containerMouseleaveListener&&(this.bindContainerMouseleaveListener(),this.containerMouseleaveListener=null)}show(){if(!this.getOption("tooltipLabel")||this.getOption("disabled"))return;this.create(),this.el.nativeElement.closest("p-dialog")?setTimeout(()=>{this.container&&this.align()},100):this.align(),A.fadeIn(this.container,250),this.getOption("tooltipZIndex")==="auto"?_n.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener()}hide(){this.getOption("tooltipZIndex")==="auto"&&_n.clear(this.container),this.remove()}updateText(){let t=this.getOption("tooltipLabel");if(t instanceof pr){let i=this.viewContainer.createEmbeddedView(t);i.detectChanges(),i.rootNodes.forEach(r=>this.tooltipText.appendChild(r))}else this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(t))):this.tooltipText.innerHTML=t}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break}}getHostOffset(){if(this.getOption("appendTo")==="body"||this.getOption("appendTo")==="target"){let t=this.el.nativeElement.getBoundingClientRect(),i=t.left+A.getWindowScrollLeft(),r=t.top+A.getWindowScrollTop();return{left:i,top:r}}else return{left:0,top:0}}alignRight(){this.preAlign("right");let t=this.activeElement,i=this.getHostOffset(),r=i.left+A.getOuterWidth(t),o=i.top+(A.getOuterHeight(t)-A.getOuterHeight(this.container))/2;this.container.style.left=r+this.getOption("positionLeft")+"px",this.container.style.top=o+this.getOption("positionTop")+"px"}get activeElement(){return this.el.nativeElement.nodeName.includes("P-")?A.findSingle(this.el.nativeElement,".p-component")||this.el.nativeElement:this.el.nativeElement}alignLeft(){this.preAlign("left");let t=this.getHostOffset(),i=t.left-A.getOuterWidth(this.container),r=t.top+(A.getOuterHeight(this.el.nativeElement)-A.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let t=this.getHostOffset(),i=t.left+(A.getOuterWidth(this.el.nativeElement)-A.getOuterWidth(this.container))/2,r=t.top-A.getOuterHeight(this.container);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let t=this.getHostOffset(),i=t.left+(A.getOuterWidth(this.el.nativeElement)-A.getOuterWidth(this.container))/2,r=t.top+A.getOuterHeight(this.el.nativeElement);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}setOption(t){this._tooltipOptions=I(I({},this._tooltipOptions),t)}getOption(t){return this._tooltipOptions[t]}getTarget(t){return A.hasClass(t,"p-inputwrapper")?A.findSingle(t,"input"):t}preAlign(t){this.container.style.left="-999px",this.container.style.top="-999px";let i="p-tooltip p-component p-tooltip-"+t;this.container.className=this.getOption("tooltipStyleClass")?i+" "+this.getOption("tooltipStyleClass"):i}isOutOfBounds(){let t=this.container.getBoundingClientRect(),i=t.top,r=t.left,o=A.getOuterWidth(this.container),s=A.getOuterHeight(this.container),a=A.getViewport();return r+o>a.width||r<0||i<0||i+s>a.height}onWindowResize(t){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new Ru(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){let t=this.getOption("tooltipEvent");if((t==="hover"||t==="both")&&(this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener)),t==="focus"||t==="both"){let i=this.el.nativeElement.querySelector(".p-component");i||(i=this.getTarget(this.el.nativeElement))}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&(this.getOption("appendTo")==="body"?document.body.removeChild(this.container):this.getOption("appendTo")==="target"?this.el.nativeElement.removeChild(this.container):A.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.unbindContainerMouseleaveListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&&_n.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}static \u0275fac=function(i){return new(i||n)(k(Nt),k(Ce),k(He),k(Pt),k(At),k(Un))};static \u0275dir=gt({type:n,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],hostBindings:function(i,r){i&1&&P("keydown.escape",function(s){return r.onPressEscape(s)},!1,_u)},inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:[2,"escape","escape",V],showDelay:[2,"showDelay","showDelay",Ke],hideDelay:[2,"hideDelay","hideDelay",Ke],life:[2,"life","life",Ke],positionTop:[2,"positionTop","positionTop",Ke],positionLeft:[2,"positionLeft","positionLeft",Ke],autoHide:[2,"autoHide","autoHide",V],fitContent:[2,"fitContent","fitContent",V],hideOnEscape:[2,"hideOnEscape","hideOnEscape",V],content:[0,"pTooltip","content"],disabled:[0,"tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[$e,Jt]})}return n})(),gr=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te]})}return n})();var gx=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["BlankIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:0,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg","v-bind","pti()"],["width","1","height","1","fill","currentColor","fill-opacity","0"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"rect",1),C())},encapsulation:2})}return n})();var $u=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["ChevronDownIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var Ch=n=>({height:n}),iJ=(n,e,t)=>({"p-dropdown-item":!0,"p-highlight":n,"p-disabled":e,"p-focus":t}),yx=n=>({$implicit:n});function rJ(n,e){n&1&&E(0,"CheckIcon",4),n&2&&f("styleClass","p-dropdown-check-icon")}function oJ(n,e){n&1&&E(0,"BlankIcon",4),n&2&&f("styleClass","p-dropdown-blank-icon")}function sJ(n,e){if(n&1&&(oe(0),x(1,rJ,1,1,"CheckIcon",3)(2,oJ,1,1,"BlankIcon",3),se()),n&2){let t=y();m(),f("ngIf",t.selected),m(),f("ngIf",!t.selected)}}function aJ(n,e){if(n&1&&(b(0,"span"),Z(1),C()),n&2){let t,i=y();m(),Pe((t=i.label)!==null&&t!==void 0?t:"empty")}}function lJ(n,e){n&1&&ye(0)}var cJ=["container"],uJ=["filter"],dJ=["focusInput"],pJ=["editableInput"],hJ=["items"],fJ=["scroller"],mJ=["overlay"],gJ=["firstHiddenFocusableEl"],yJ=["lastHiddenFocusableEl"],_J=n=>({"max-height":n}),vL=n=>({options:n}),vJ=n=>({"p-variant-filled":n}),bL=(n,e)=>({$implicit:n,options:e}),bJ=()=>({});function CJ(n,e){if(n&1&&(oe(0),Z(1),se()),n&2){let t=y(2);m(),Pe(t.label()==="p-emptylabel"?"\xA0":t.label())}}function wJ(n,e){if(n&1&&ye(0,25),n&2){let t=y(2);f("ngTemplateOutlet",t.selectedItemTemplate)("ngTemplateOutletContext",_e(2,yx,t.selectedOption))}}function IJ(n,e){if(n&1&&(b(0,"span"),Z(1),C()),n&2){let t=y(3);m(),Pe(t.label()==="p-emptylabel"?"\xA0":t.label())}}function xJ(n,e){if(n&1&&x(0,IJ,2,1,"span",18),n&2){let t=y(2);f("ngIf",t.isSelectedOptionEmpty())}}function TJ(n,e){if(n&1){let t=$();b(0,"span",23,3),P("focus",function(r){M(t);let o=y();return D(o.onInputFocus(r))})("blur",function(r){M(t);let o=y();return D(o.onInputBlur(r))})("keydown",function(r){M(t);let o=y();return D(o.onKeyDown(r))}),x(2,CJ,2,1,"ng-container",20)(3,wJ,1,4,"ng-container",24)(4,xJ,1,1,"ng-template",null,4,Bt),C()}if(n&2){let t,i=pt(5),r=y();f("ngClass",r.inputClass)("pTooltip",r.tooltip)("tooltipPosition",r.tooltipPosition)("positionStyle",r.tooltipPositionStyle)("tooltipStyleClass",r.tooltipStyleClass)("autofocus",r.autofocus),O("aria-disabled",r.disabled)("id",r.inputId)("aria-label",r.ariaLabel||(r.label()==="p-emptylabel"?void 0:r.label()))("aria-labelledby",r.ariaLabelledBy)("aria-haspopup","listbox")("aria-expanded",(t=r.overlayVisible)!==null&&t!==void 0?t:!1)("aria-controls",r.overlayVisible?r.id+"_list":null)("tabindex",r.disabled?-1:r.tabindex)("aria-activedescendant",r.focused?r.focusedOptionId:void 0)("aria-required",r.required)("required",r.required),m(2),f("ngIf",!r.selectedItemTemplate)("ngIfElse",i),m(),f("ngIf",r.selectedItemTemplate&&!r.isSelectedOptionEmpty())}}function EJ(n,e){if(n&1){let t=$();b(0,"input",26,5),P("input",function(r){M(t);let o=y();return D(o.onEditableInput(r))})("keydown",function(r){M(t);let o=y();return D(o.onKeyDown(r))})("focus",function(r){M(t);let o=y();return D(o.onInputFocus(r))})("blur",function(r){M(t);let o=y();return D(o.onInputBlur(r))}),C()}if(n&2){let t=y();f("ngClass",t.inputClass)("disabled",t.disabled)("autofocus",t.autofocus),O("id",t.inputId)("maxlength",t.maxlength)("placeholder",t.modelValue()===void 0||t.modelValue()===null?t.placeholder():void 0)("aria-label",t.ariaLabel||(t.label()==="p-emptylabel"?void 0:t.label()))("aria-activedescendant",t.focused?t.focusedOptionId:void 0)}}function SJ(n,e){if(n&1){let t=$();b(0,"TimesIcon",29),P("click",function(r){M(t);let o=y(2);return D(o.clear(r))}),C()}n&2&&(f("styleClass","p-dropdown-clear-icon"),O("data-pc-section","clearicon"))}function MJ(n,e){}function DJ(n,e){n&1&&x(0,MJ,0,0,"ng-template")}function OJ(n,e){if(n&1){let t=$();b(0,"span",30),P("click",function(r){M(t);let o=y(2);return D(o.clear(r))}),x(1,DJ,1,0,null,31),C()}if(n&2){let t=y(2);O("data-pc-section","clearicon"),m(),f("ngTemplateOutlet",t.clearIconTemplate)}}function AJ(n,e){if(n&1&&(oe(0),x(1,SJ,1,2,"TimesIcon",27)(2,OJ,2,2,"span",28),se()),n&2){let t=y();m(),f("ngIf",!t.clearIconTemplate),m(),f("ngIf",t.clearIconTemplate)}}function kJ(n,e){n&1&&ye(0)}function NJ(n,e){if(n&1&&(oe(0),x(1,kJ,1,0,"ng-container",31),se()),n&2){let t=y(2);m(),f("ngTemplateOutlet",t.loadingIconTemplate)}}function LJ(n,e){if(n&1&&E(0,"span",34),n&2){let t=y(3);f("ngClass","p-dropdown-trigger-icon pi-spin "+t.loadingIcon)}}function PJ(n,e){n&1&&E(0,"span",35),n&2&&W("p-dropdown-trigger-icon pi pi-spinner pi-spin")}function RJ(n,e){if(n&1&&(oe(0),x(1,LJ,1,1,"span",32)(2,PJ,1,2,"span",33),se()),n&2){let t=y(2);m(),f("ngIf",t.loadingIcon),m(),f("ngIf",!t.loadingIcon)}}function FJ(n,e){if(n&1&&(oe(0),x(1,NJ,2,1,"ng-container",18)(2,RJ,3,2,"ng-container",18),se()),n&2){let t=y();m(),f("ngIf",t.loadingIconTemplate),m(),f("ngIf",!t.loadingIconTemplate)}}function jJ(n,e){if(n&1&&E(0,"span",39),n&2){let t=y(3);f("ngClass",t.dropdownIcon)}}function VJ(n,e){n&1&&E(0,"ChevronDownIcon",40),n&2&&f("styleClass","p-dropdown-trigger-icon")}function BJ(n,e){if(n&1&&(oe(0),x(1,jJ,1,1,"span",37)(2,VJ,1,1,"ChevronDownIcon",38),se()),n&2){let t=y(2);m(),f("ngIf",t.dropdownIcon),m(),f("ngIf",!t.dropdownIcon)}}function zJ(n,e){}function UJ(n,e){n&1&&x(0,zJ,0,0,"ng-template")}function HJ(n,e){if(n&1&&(b(0,"span",41),x(1,UJ,1,0,null,31),C()),n&2){let t=y(2);m(),f("ngTemplateOutlet",t.dropdownIconTemplate)}}function $J(n,e){if(n&1&&x(0,BJ,3,2,"ng-container",18)(1,HJ,2,1,"span",36),n&2){let t=y();f("ngIf",!t.dropdownIconTemplate),m(),f("ngIf",t.dropdownIconTemplate)}}function WJ(n,e){n&1&&ye(0)}function GJ(n,e){n&1&&ye(0)}function qJ(n,e){if(n&1&&(oe(0),x(1,GJ,1,0,"ng-container",48),se()),n&2){let t=y(3);m(),f("ngTemplateOutlet",t.filterTemplate)("ngTemplateOutletContext",_e(2,vL,t.filterOptions))}}function QJ(n,e){n&1&&E(0,"SearchIcon",40),n&2&&f("styleClass","p-dropdown-filter-icon")}function KJ(n,e){}function YJ(n,e){n&1&&x(0,KJ,0,0,"ng-template")}function ZJ(n,e){if(n&1&&(b(0,"span",52),x(1,YJ,1,0,null,31),C()),n&2){let t=y(4);m(),f("ngTemplateOutlet",t.filterIconTemplate)}}function JJ(n,e){if(n&1){let t=$();b(0,"div",49)(1,"input",50,10),P("input",function(r){M(t);let o=y(3);return D(o.onFilterInputChange(r))})("keydown",function(r){M(t);let o=y(3);return D(o.onFilterKeyDown(r))})("blur",function(r){M(t);let o=y(3);return D(o.onFilterBlur(r))}),C(),x(3,QJ,1,1,"SearchIcon",38)(4,ZJ,2,1,"span",51),C()}if(n&2){let t=y(3);m(),f("value",t._filterValue()||"")("ngClass",_e(8,vJ,t.variant==="filled"||t.config.inputStyle()==="filled")),O("placeholder",t.filterPlaceholder)("aria-owns",t.id+"_list")("aria-label",t.ariaFilterLabel)("aria-activedescendant",t.focusedOptionId),m(2),f("ngIf",!t.filterIconTemplate),m(),f("ngIf",t.filterIconTemplate)}}function XJ(n,e){if(n&1){let t=$();b(0,"div",47),P("click",function(r){return M(t),D(r.stopPropagation())}),x(1,qJ,2,4,"ng-container",20)(2,JJ,5,10,"ng-template",null,9,Bt),C()}if(n&2){let t=pt(3),i=y(2);m(),f("ngIf",i.filterTemplate)("ngIfElse",t)}}function eX(n,e){n&1&&ye(0)}function tX(n,e){if(n&1&&x(0,eX,1,0,"ng-container",48),n&2){let t=e.$implicit,i=e.options;y(2);let r=pt(9);f("ngTemplateOutlet",r)("ngTemplateOutletContext",_t(2,bL,t,i))}}function nX(n,e){n&1&&ye(0)}function iX(n,e){if(n&1&&x(0,nX,1,0,"ng-container",48),n&2){let t=e.options,i=y(4);f("ngTemplateOutlet",i.loaderTemplate)("ngTemplateOutletContext",_e(2,vL,t))}}function rX(n,e){n&1&&(oe(0),x(1,iX,1,4,"ng-template",54),se())}function oX(n,e){if(n&1){let t=$();b(0,"p-scroller",53,11),P("onLazyLoad",function(r){M(t);let o=y(2);return D(o.onLazyLoad.emit(r))}),x(2,tX,1,5,"ng-template",22)(3,rX,2,0,"ng-container",18),C()}if(n&2){let t=y(2);En(_e(8,Ch,t.scrollHeight)),f("items",t.visibleOptions())("itemSize",t.virtualScrollItemSize||t._itemSize)("autoSize",!0)("lazy",t.lazy)("options",t.virtualScrollOptions),m(3),f("ngIf",t.loaderTemplate)}}function sX(n,e){n&1&&ye(0)}function aX(n,e){if(n&1&&(oe(0),x(1,sX,1,0,"ng-container",48),se()),n&2){y();let t=pt(9),i=y();m(),f("ngTemplateOutlet",t)("ngTemplateOutletContext",_t(3,bL,i.visibleOptions(),St(2,bJ)))}}function lX(n,e){if(n&1&&(b(0,"span"),Z(1),C()),n&2){let t=y(2).$implicit,i=y(3);m(),Pe(i.getOptionGroupLabel(t.optionGroup))}}function cX(n,e){n&1&&ye(0)}function uX(n,e){if(n&1&&(oe(0),b(1,"li",58),x(2,lX,2,1,"span",18)(3,cX,1,0,"ng-container",48),C(),se()),n&2){let t=y(),i=t.$implicit,r=t.index,o=y().options,s=y(2);m(),f("ngStyle",_e(5,Ch,o.itemSize+"px")),O("id",s.id+"_"+s.getOptionIndex(r,o)),m(),f("ngIf",!s.groupTemplate),m(),f("ngTemplateOutlet",s.groupTemplate)("ngTemplateOutletContext",_e(7,yx,i.optionGroup))}}function dX(n,e){if(n&1){let t=$();oe(0),b(1,"p-dropdownItem",59),P("onClick",function(r){M(t);let o=y().$implicit,s=y(3);return D(s.onOptionSelect(r,o))})("onMouseEnter",function(r){M(t);let o=y().index,s=y().options,a=y(2);return D(a.onOptionMouseEnter(r,a.getOptionIndex(o,s)))}),C(),se()}if(n&2){let t=y(),i=t.$implicit,r=t.index,o=y().options,s=y(2);m(),f("id",s.id+"_"+s.getOptionIndex(r,o))("option",i)("checkmark",s.checkmark)("selected",s.isSelected(i))("label",s.getOptionLabel(i))("disabled",s.isOptionDisabled(i))("template",s.itemTemplate)("focused",s.focusedOptionIndex()===s.getOptionIndex(r,o))("ariaPosInset",s.getAriaPosInset(s.getOptionIndex(r,o)))("ariaSetSize",s.ariaSetSize)}}function pX(n,e){if(n&1&&x(0,uX,4,9,"ng-container",18)(1,dX,2,10,"ng-container",18),n&2){let t=e.$implicit,i=y(3);f("ngIf",i.isOptionGroup(t)),m(),f("ngIf",!i.isOptionGroup(t))}}function hX(n,e){if(n&1&&(oe(0),Z(1),se()),n&2){let t=y(4);m(),yt(" ",t.emptyFilterMessageLabel," ")}}function fX(n,e){n&1&&ye(0,null,13)}function mX(n,e){if(n&1&&(b(0,"li",60),x(1,hX,2,1,"ng-container",20)(2,fX,2,0,"ng-container",31),C()),n&2){let t=y().options,i=y(2);f("ngStyle",_e(4,Ch,t.itemSize+"px")),m(),f("ngIf",!i.emptyFilterTemplate&&!i.emptyTemplate)("ngIfElse",i.emptyFilter),m(),f("ngTemplateOutlet",i.emptyFilterTemplate||i.emptyTemplate)}}function gX(n,e){if(n&1&&(oe(0),Z(1),se()),n&2){let t=y(4);m(),yt(" ",t.emptyMessageLabel," ")}}function yX(n,e){n&1&&ye(0,null,14)}function _X(n,e){if(n&1&&(b(0,"li",60),x(1,gX,2,1,"ng-container",20)(2,yX,2,0,"ng-container",31),C()),n&2){let t=y().options,i=y(2);f("ngStyle",_e(4,Ch,t.itemSize+"px")),m(),f("ngIf",!i.emptyTemplate)("ngIfElse",i.empty),m(),f("ngTemplateOutlet",i.emptyTemplate)}}function vX(n,e){if(n&1&&(b(0,"ul",55,12),x(2,pX,2,2,"ng-template",56)(3,mX,3,6,"li",57)(4,_X,3,6,"li",57),C()),n&2){let t=e.$implicit,i=e.options,r=y(2);f("ngClass",i.contentStyleClass)("ngStyle",i.contentStyle),O("id",r.id+"_list")("aria-label",r.listLabel),m(2),f("ngForOf",t),m(),f("ngIf",r.filterValue&&r.isEmpty()),m(),f("ngIf",!r.filterValue&&r.isEmpty())}}function bX(n,e){n&1&&ye(0)}function CX(n,e){if(n&1){let t=$();b(0,"div",42)(1,"span",43,6),P("focus",function(r){M(t);let o=y();return D(o.onFirstHiddenFocus(r))}),C(),x(3,WJ,1,0,"ng-container",31)(4,XJ,4,2,"div",44),b(5,"div",45),x(6,oX,4,10,"p-scroller",46)(7,aX,2,6,"ng-container",18)(8,vX,5,7,"ng-template",null,7,Bt),C(),x(10,bX,1,0,"ng-container",31),b(11,"span",43,8),P("focus",function(r){M(t);let o=y();return D(o.onLastHiddenFocus(r))}),C()()}if(n&2){let t=y();W(t.panelStyleClass),f("ngClass","p-dropdown-panel p-component")("ngStyle",t.panelStyle),m(),O("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0),m(2),f("ngTemplateOutlet",t.headerTemplate),m(),f("ngIf",t.filter),m(),f("ngStyle",_e(16,_J,t.virtualScroll?"auto":t.scrollHeight||"auto")),m(),f("ngIf",t.virtualScroll),m(),f("ngIf",!t.virtualScroll),m(3),f("ngTemplateOutlet",t.footerTemplate),m(),O("tabindex",0)("data-p-hidden-accessible",!0)("data-p-hidden-focusable",!0)}}var wX={provide:ti,useExisting:dn(()=>_x),multi:!0},IX=(()=>{class n{id;option;selected;focused;label;disabled;visible;itemSize;ariaPosInset;ariaSetSize;template;checkmark;onClick=new j;onMouseEnter=new j;ngOnInit(){}onOptionClick(t){this.onClick.emit(t)}onOptionMouseEnter(t){this.onMouseEnter.emit(t)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=F({type:n,selectors:[["p-dropdownItem"]],hostAttrs:[1,"p-element"],inputs:{id:"id",option:"option",selected:[2,"selected","selected",V],focused:[2,"focused","focused",V],label:"label",disabled:[2,"disabled","disabled",V],visible:[2,"visible","visible",V],itemSize:[2,"itemSize","itemSize",Ke],ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",template:"template",checkmark:[2,"checkmark","checkmark",V]},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},features:[$e],decls:4,vars:22,consts:[["role","option","pRipple","",3,"click","mouseenter","id","ngStyle","ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"styleClass",4,"ngIf"],[3,"styleClass"]],template:function(i,r){i&1&&(b(0,"li",0),P("click",function(s){return r.onOptionClick(s)})("mouseenter",function(s){return r.onOptionMouseEnter(s)}),x(1,sJ,3,2,"ng-container",1)(2,aJ,2,1,"span",1)(3,lJ,1,0,"ng-container",2),C()),i&2&&(f("id",r.id)("ngStyle",_e(14,Ch,r.itemSize+"px"))("ngClass",Sn(16,iJ,r.selected,r.disabled,r.focused)),O("aria-label",r.label)("aria-setsize",r.ariaSetSize)("aria-posinset",r.ariaPosInset)("aria-selected",r.selected)("data-p-focused",r.focused)("data-p-highlight",r.selected)("data-p-disabled",r.disabled),m(),f("ngIf",r.checkmark),m(),f("ngIf",!r.template),m(),f("ngTemplateOutlet",r.template)("ngTemplateOutletContext",_e(20,yx,r.option)))},dependencies:()=>[Ye,ot,Mt,st,Hn,gx,Wi],encapsulation:2})}return n})(),_x=(()=>{class n{el;renderer;cd;zone;filterService;config;id;scrollHeight="200px";filter;name;style;panelStyle;styleClass;panelStyleClass;readonly;required;editable;appendTo;tabindex=0;set placeholder(t){this._placeholder.set(t)}get placeholder(){return this._placeholder.asReadonly()}loadingIcon;filterPlaceholder;filterLocale;variant="outlined";inputId;dataKey;filterBy;filterFields;autofocus;resetFilterOnHide=!1;checkmark=!1;dropdownIcon;loading=!1;optionLabel;optionValue;optionDisabled;optionGroupLabel="label";optionGroupChildren="items";autoDisplayFirst=!0;group;showClear;emptyFilterMessage="";emptyMessage="";lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;overlayOptions;ariaFilterLabel;ariaLabel;ariaLabelledBy;filterMatchMode="contains";maxlength;tooltip="";tooltipPosition="right";tooltipPositionStyle="absolute";tooltipStyleClass;focusOnHover=!1;selectOnFocus=!1;autoOptionFocus=!0;autofocusFilter=!0;get disabled(){return this._disabled}set disabled(t){t&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=t,this.cd.destroyed||this.cd.detectChanges()}get itemSize(){return this._itemSize}set itemSize(t){this._itemSize=t,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}_itemSize;get autoZIndex(){return this._autoZIndex}set autoZIndex(t){this._autoZIndex=t,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}_autoZIndex;get baseZIndex(){return this._baseZIndex}set baseZIndex(t){this._baseZIndex=t,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}_baseZIndex;get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(t){this._showTransitionOptions=t,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}_showTransitionOptions;get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(t){this._hideTransitionOptions=t,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}_hideTransitionOptions;get filterValue(){return this._filterValue()}set filterValue(t){setTimeout(()=>{this._filterValue.set(t)})}get options(){return this._options()}set options(t){Ee.deepEquals(t,this._options())||this._options.set(t)}onChange=new j;onFilter=new j;onFocus=new j;onBlur=new j;onClick=new j;onShow=new j;onHide=new j;onClear=new j;onLazyLoad=new j;containerViewChild;filterViewChild;focusInputViewChild;editableInputViewChild;itemsViewChild;scroller;overlayViewChild;firstHiddenFocusableElementOnOverlay;lastHiddenFocusableElementOnOverlay;templates;_disabled;itemsWrapper;itemTemplate;groupTemplate;loaderTemplate;selectedItemTemplate;headerTemplate;filterTemplate;footerTemplate;emptyFilterTemplate;emptyTemplate;dropdownIconTemplate;loadingIconTemplate;clearIconTemplate;filterIconTemplate;filterOptions;_options=Lt(null);_placeholder=Lt(void 0);modelValue=Lt(null);value;onModelChange=()=>{};onModelTouched=()=>{};hover;focused;overlayVisible;optionsChanged;panel;dimensionsUpdated;hoveredItem;selectedOptionUpdated;_filterValue=Lt(null);searchValue;searchIndex;searchTimeout;previousSearchChar;currentSearchChar;preventModelTouched;focusedOptionIndex=Lt(-1);labelId;listId;clicked=Lt(!1);get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(si.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(si.EMPTY_FILTER_MESSAGE)}get isVisibleClearIcon(){return this.modelValue()!=null&&this.hasSelectedOption()&&this.showClear&&!this.disabled}get listLabel(){return this.config.getTranslation(si.ARIA).listLabel}get containerClass(){return{"p-dropdown p-component p-inputwrapper":!0,"p-disabled":this.disabled,"p-dropdown-clearable":this.showClear&&!this.disabled,"p-focus":this.focused,"p-inputwrapper-filled":this.modelValue()!==void 0&&this.modelValue()!==null&&!this.modelValue().length,"p-inputwrapper-focus":this.focused||this.overlayVisible,"p-variant-filled":this.variant==="filled"||this.config.inputStyle()==="filled","p-dropdown-open":this.overlayVisible}}get inputClass(){let t=this.label();return{"p-dropdown-label p-inputtext":!0,"p-placeholder":this.placeholder()&&t===this.placeholder(),"p-dropdown-label-empty":!this.editable&&!this.selectedItemTemplate&&(t==null||t==="p-emptylabel"||t.length===0)}}get panelClass(){return{"p-dropdown-panel p-component":!0,"p-input-filled":this.config.inputStyle()==="filled","p-ripple-disabled":this.config.ripple===!1}}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}visibleOptions=cn(()=>{let t=this.getAllVisibleAndNonVisibleOptions();if(this._filterValue()){let r=!(this.filterBy||this.optionLabel)&&!this.filterFields&&!this.optionValue?this.options.filter(o=>o.label?o.label.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim())!==-1:o.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim())!==-1):this.filterService.filter(t,this.searchFields(),this._filterValue().trim(),this.filterMatchMode,this.filterLocale);if(this.group){let o=this.options||[],s=[];return o.forEach(a=>{let c=this.getOptionGroupChildren(a).filter(u=>r.includes(u));c.length>0&&s.push(R(I({},a),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...c]}))}),this.flatOptions(s)}return r}return t});label=cn(()=>{let t=this.getAllVisibleAndNonVisibleOptions(),i=t.findIndex(r=>this.isOptionValueEqualsModelValue(r));return i!==-1?this.getOptionLabel(t[i]):this.placeholder()||"p-emptylabel"});filled=cn(()=>typeof this.modelValue()=="string"?!!this.modelValue():this.label()!=="p-emptylabel"&&this.modelValue()!==void 0&&this.modelValue()!==null);selectedOption;editableInputValue=cn(()=>this.getOptionLabel(this.selectedOption)||this.modelValue()||"");constructor(t,i,r,o,s,a){this.el=t,this.renderer=i,this.cd=r,this.zone=o,this.filterService=s,this.config=a,Da(()=>{let l=this.modelValue(),c=this.visibleOptions();if(c&&Ee.isNotEmpty(c)){let u=this.findSelectedOptionIndex();(u!==-1||l===void 0||typeof l=="string"&&l.length===0||this.isModelValueNotSet()||this.editable)&&(this.selectedOption=c[u])}Ee.isEmpty(c)&&(l===void 0||this.isModelValueNotSet())&&Ee.isNotEmpty(this.selectedOption)&&(this.selectedOption=null),l!==void 0&&this.editable&&this.updateEditableLabel(),this.cd.markForCheck()})}isModelValueNotSet(){return this.modelValue()===null&&!this.isOptionValueEqualsModelValue(this.selectedOption)}getAllVisibleAndNonVisibleOptions(){return this.group?this.flatOptions(this.options):this.options||[]}ngOnInit(){this.id=this.id||nt(),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:t=>this.onFilterInputChange(t),reset:()=>this.resetFilter()})}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){let t=A.findSingle(this.overlayViewChild?.overlayViewChild?.nativeElement,"li.p-highlight");t&&A.scrollInView(this.itemsWrapper,t),this.selectedOptionUpdated=!1}}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"item":this.itemTemplate=t.template;break;case"selectedItem":this.selectedItemTemplate=t.template;break;case"header":this.headerTemplate=t.template;break;case"filter":this.filterTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;case"emptyfilter":this.emptyFilterTemplate=t.template;break;case"empty":this.emptyTemplate=t.template;break;case"group":this.groupTemplate=t.template;break;case"loader":this.loaderTemplate=t.template;break;case"dropdownicon":this.dropdownIconTemplate=t.template;break;case"loadingicon":this.loadingIconTemplate=t.template;break;case"clearicon":this.clearIconTemplate=t.template;break;case"filtericon":this.filterIconTemplate=t.template;break;default:this.itemTemplate=t.template;break}})}flatOptions(t){return(t||[]).reduce((i,r,o)=>{i.push({optionGroup:r,group:!0,index:o});let s=this.getOptionGroupChildren(r);return s&&s.forEach(a=>i.push(a)),i},[])}autoUpdateModel(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()&&(this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex()),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()],!1)),this.autoDisplayFirst&&(this.modelValue()===null||this.modelValue()===void 0)&&!this.placeholder()){let t=this.findFirstOptionIndex();this.onOptionSelect(null,this.visibleOptions()[t],!1,!0)}}onOptionSelect(t,i,r=!0,o=!1){if(!this.isSelected(i)){let s=this.getOptionValue(i);this.updateModel(s,t),this.focusedOptionIndex.set(this.findSelectedOptionIndex()),o===!1&&this.onChange.emit({originalEvent:t,value:s})}r&&this.hide(!0)}onOptionMouseEnter(t,i){this.focusOnHover&&this.changeFocusedOptionIndex(t,i)}updateModel(t,i){this.value=t,this.onModelChange(t),this.modelValue.set(t),this.selectedOptionUpdated=!0}writeValue(t){this.filter&&this.resetFilter(),this.value=t,this.allowModelChange()&&this.onModelChange(t),this.modelValue.set(this.value),this.updateEditableLabel(),this.cd.markForCheck()}allowModelChange(){return this.autoDisplayFirst&&!this.placeholder()&&(this.modelValue()===void 0||this.modelValue()===null)&&!this.editable&&this.options&&this.options.length}isSelectedOptionEmpty(){return Ee.isEmpty(this.selectedOption)}isSelected(t){return this.isValidOption(t)&&this.isOptionValueEqualsModelValue(t)}isOptionValueEqualsModelValue(t){return Ee.equals(this.modelValue(),this.getOptionValue(t),this.equalityKey())}ngAfterViewInit(){this.editable&&this.updateEditableLabel(),this.updatePlaceHolderForFloatingLabel()}updatePlaceHolderForFloatingLabel(){if(this._placeholder()!==null&&this._placeholder()!==void 0)return;let t=this.el.nativeElement.parentElement,i=t?.classList.contains("p-float-label");if(t&&i&&!this.selectedOption){let r=t.querySelector("label");r&&this._placeholder.set(r.textContent)}}updateEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value=this.getOptionLabel(this.selectedOption)||this.modelValue()||"")}clearEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value="")}getOptionIndex(t,i){return this.virtualScrollerDisabled?t:i&&i.getItemOptions(t).index}getOptionLabel(t){return this.optionLabel!==void 0&&this.optionLabel!==null?Ee.resolveFieldData(t,this.optionLabel):t&&t.label!==void 0?t.label:t}getOptionValue(t){return this.optionValue&&this.optionValue!==null?Ee.resolveFieldData(t,this.optionValue):!this.optionLabel&&t&&t.value!==void 0?t.value:t}isOptionDisabled(t){return this.getOptionValue(this.modelValue())===this.getOptionValue(t)||this.getOptionLabel(this.modelValue()===this.getOptionLabel(t))&&t.disabled===!1?!1:this.optionDisabled?Ee.resolveFieldData(t,this.optionDisabled):t&&t.disabled!==void 0?t.disabled:!1}getOptionGroupLabel(t){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null?Ee.resolveFieldData(t,this.optionGroupLabel):t&&t.label!==void 0?t.label:t}getOptionGroupChildren(t){return this.optionGroupChildren!==void 0&&this.optionGroupChildren!==null?Ee.resolveFieldData(t,this.optionGroupChildren):t.items}getAriaPosInset(t){return(this.optionGroupLabel?t-this.visibleOptions().slice(0,t).filter(i=>this.isOptionGroup(i)).length:t)+1}get ariaSetSize(){return this.visibleOptions().filter(t=>!this.isOptionGroup(t)).length}resetFilter(){this._filterValue.set(null),this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value="")}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}onContainerClick(t){this.disabled||this.readonly||this.loading||(this.focusInputViewChild?.nativeElement.focus({preventScroll:!0}),!(t.target.tagName==="INPUT"||t.target.getAttribute("data-pc-section")==="clearicon"||t.target.closest('[data-pc-section="clearicon"]'))&&((!this.overlayViewChild||!this.overlayViewChild.el.nativeElement.contains(t.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.onClick.emit(t),this.clicked.set(!0),this.cd.detectChanges()))}isEmpty(){return!this._options()||this.visibleOptions()&&this.visibleOptions().length===0}onEditableInput(t){let i=t.target.value;this.searchValue="",!this.searchOptions(t,i)&&this.focusedOptionIndex.set(-1),this.onModelChange(i),this.updateModel(i,t),setTimeout(()=>{this.onChange.emit({originalEvent:t,value:i})},1),!this.overlayVisible&&Ee.isNotEmpty(i)&&this.show()}show(t){this.overlayVisible=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex();this.focusedOptionIndex.set(i),t&&A.focus(this.focusInputViewChild?.nativeElement),this.cd.markForCheck()}onOverlayAnimationStart(t){if(t.toState==="visible"){if(this.itemsWrapper=A.findSingle(this.overlayViewChild?.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-dropdown-items-wrapper"),this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this.options&&this.options.length)if(this.virtualScroll){let i=this.modelValue()?this.focusedOptionIndex():-1;i!==-1&&this.scroller?.scrollToIndex(i)}else{let i=A.findSingle(this.itemsWrapper,".p-dropdown-item.p-highlight");i&&i.scrollIntoView({block:"nearest",inline:"nearest"})}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&!this.editable&&this.filterViewChild.nativeElement.focus()),this.onShow.emit(t)}t.toState==="void"&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(t))}hide(t){this.overlayVisible=!1,this.focusedOptionIndex.set(-1),this.clicked.set(!1),this.searchValue="",this.overlayOptions?.mode==="modal"&&A.unblockBodyScroll(),this.filter&&this.resetFilterOnHide&&this.resetFilter(),t&&(this.focusInputViewChild&&setTimeout(()=>{A.focus(this.focusInputViewChild?.nativeElement)}),this.editable&&this.editableInputViewChild&&setTimeout(()=>{A.focus(this.editableInputViewChild?.nativeElement)})),this.cd.markForCheck()}onInputFocus(t){if(this.disabled)return;this.focused=!0;let i=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(i),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit(t)}onInputBlur(t){this.focused=!1,this.onBlur.emit(t),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onMouseDown(t){t.preventDefault()}onKeyDown(t,i){if(!(this.disabled||this.readonly||this.loading)){switch(t.code){case"ArrowDown":this.onArrowDownKey(t);break;case"ArrowUp":this.onArrowUpKey(t,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(t,this.editable);break;case"Delete":this.onDeleteKey(t);break;case"Home":this.onHomeKey(t,this.editable);break;case"End":this.onEndKey(t,this.editable);break;case"PageDown":this.onPageDownKey(t);break;case"PageUp":this.onPageUpKey(t);break;case"Space":this.onSpaceKey(t,i);break;case"Enter":case"NumpadEnter":this.onEnterKey(t);break;case"Escape":this.onEscapeKey(t);break;case"Tab":this.onTabKey(t);break;case"Backspace":this.onBackspaceKey(t,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!t.metaKey&&Ee.isPrintableCharacter(t.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(t,t.key));break}this.clicked.set(!1)}}onFilterKeyDown(t){switch(t.code){case"ArrowDown":this.onArrowDownKey(t);break;case"ArrowUp":this.onArrowUpKey(t,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(t,!0);break;case"Home":this.onHomeKey(t,!0);break;case"End":this.onEndKey(t,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(t,!0);break;case"Escape":this.onEscapeKey(t);break;case"Tab":this.onTabKey(t,!0);break;default:break}}onFilterBlur(t){this.focusedOptionIndex.set(-1)}onArrowDownKey(t){if(!this.overlayVisible)this.show(),this.editable&&this.changeFocusedOptionIndex(t,this.findSelectedOptionIndex());else{let i=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.clicked()?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(t,i)}t.preventDefault(),t.stopPropagation()}changeFocusedOptionIndex(t,i){if(this.focusedOptionIndex()!==i&&(this.focusedOptionIndex.set(i),this.scrollInView(),this.selectOnFocus)){let r=this.visibleOptions()[i];this.onOptionSelect(t,r,!1)}}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(t=-1){let i=t!==-1?`${this.id}_${t}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let r=A.findSingle(this.itemsViewChild.nativeElement,`li[id="${i}"]`);r?r.scrollIntoView&&r.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(t!==-1?t:this.focusedOptionIndex())},0)}}hasSelectedOption(){return this.modelValue()!==void 0}isValidSelectedOption(t){return this.isValidOption(t)&&this.isSelected(t)}equalityKey(){return this.optionValue?null:this.dataKey}findFirstFocusedOptionIndex(){let t=this.findSelectedOptionIndex();return t<0?this.findFirstOptionIndex():t}findFirstOptionIndex(){return this.visibleOptions().findIndex(t=>this.isValidOption(t))}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(t=>this.isValidSelectedOption(t)):-1}findNextOptionIndex(t){let i=tthis.isValidOption(r)):-1;return i>-1?i+t+1:t}findPrevOptionIndex(t){let i=t>0?Ee.findLastIndex(this.visibleOptions().slice(0,t),r=>this.isValidOption(r)):-1;return i>-1?i:t}findLastOptionIndex(){return Ee.findLastIndex(this.visibleOptions(),t=>this.isValidOption(t))}findLastFocusedOptionIndex(){let t=this.findSelectedOptionIndex();return t<0?this.findLastOptionIndex():t}isValidOption(t){return t!=null&&!(this.isOptionDisabled(t)||this.isOptionGroup(t))}isOptionGroup(t){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null&&t.optionGroup!==void 0&&t.optionGroup!==null&&t.group}onArrowUpKey(t,i=!1){if(t.altKey&&!i){if(this.focusedOptionIndex()!==-1){let r=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(t,r)}this.overlayVisible&&this.hide()}else{let r=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.clicked()?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(t,r),!this.overlayVisible&&this.show()}t.preventDefault(),t.stopPropagation()}onArrowLeftKey(t,i=!1){i&&this.focusedOptionIndex.set(-1)}onDeleteKey(t){this.showClear&&(this.clear(t),t.preventDefault())}onHomeKey(t,i=!1){if(i){let r=t.currentTarget;t.shiftKey?r.setSelectionRange(0,r.value.length):(r.setSelectionRange(0,0),this.focusedOptionIndex.set(-1))}else this.changeFocusedOptionIndex(t,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();t.preventDefault()}onEndKey(t,i=!1){if(i){let r=t.currentTarget;if(t.shiftKey)r.setSelectionRange(0,r.value.length);else{let o=r.value.length;r.setSelectionRange(o,o),this.focusedOptionIndex.set(-1)}}else this.changeFocusedOptionIndex(t,this.findLastOptionIndex()),!this.overlayVisible&&this.show();t.preventDefault()}onPageDownKey(t){this.scrollInView(this.visibleOptions().length-1),t.preventDefault()}onPageUpKey(t){this.scrollInView(0),t.preventDefault()}onSpaceKey(t,i=!1){!this.editable&&!i&&this.onEnterKey(t)}onEnterKey(t,i=!1){if(!this.overlayVisible)this.focusedOptionIndex.set(-1),this.onArrowDownKey(t);else{if(this.focusedOptionIndex()!==-1){let r=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(t,r)}!i&&this.hide()}t.preventDefault()}onEscapeKey(t){this.overlayVisible&&this.hide(!0),t.preventDefault()}onTabKey(t,i=!1){if(!i)if(this.overlayVisible&&this.hasFocusableElements())A.focus(t.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),t.preventDefault();else{if(this.focusedOptionIndex()!==-1&&this.overlayVisible){let r=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(t,r)}this.overlayVisible&&this.hide(this.filter)}t.stopPropagation()}onFirstHiddenFocus(t){let i=t.relatedTarget===this.focusInputViewChild?.nativeElement?A.getFirstFocusableElement(this.overlayViewChild.el?.nativeElement,":not(.p-hidden-focusable)"):this.focusInputViewChild?.nativeElement;A.focus(i)}onLastHiddenFocus(t){let i=t.relatedTarget===this.focusInputViewChild?.nativeElement?A.getLastFocusableElement(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;A.focus(i)}hasFocusableElements(){return A.getFocusableElements(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"]):not([class="p-dropdown-items-wrapper"])').length>0}onBackspaceKey(t,i=!1){i&&!this.overlayVisible&&this.show()}searchFields(){return this.filterBy?.split(",")||this.filterFields||[this.optionLabel]}searchOptions(t,i){this.searchValue=(this.searchValue||"")+i;let r=-1,o=!1;return this.focusedOptionIndex()!==-1?(r=this.visibleOptions().slice(this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)),r=r===-1?this.visibleOptions().slice(0,this.focusedOptionIndex()).findIndex(s=>this.isOptionMatched(s)):r+this.focusedOptionIndex()):r=this.visibleOptions().findIndex(s=>this.isOptionMatched(s)),r!==-1&&(o=!0),r===-1&&this.focusedOptionIndex()===-1&&(r=this.findFirstFocusedOptionIndex()),r!==-1&&this.changeFocusedOptionIndex(t,r),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}isOptionMatched(t){return this.isValidOption(t)&&this.getOptionLabel(t).toString().toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}onFilterInputChange(t){let i=t.target.value;this._filterValue.set(i),this.focusedOptionIndex.set(-1),this.onFilter.emit({originalEvent:t,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0),setTimeout(()=>{this.overlayViewChild.alignOverlay()}),this.cd.markForCheck()}applyFocus(){this.editable?A.findSingle(this.el.nativeElement,".p-dropdown-label.p-inputtext").focus():A.focus(this.focusInputViewChild?.nativeElement)}focus(){this.applyFocus()}clear(t){this.updateModel(null,t),this.clearEditableLabel(),this.onModelTouched(),this.onChange.emit({originalEvent:t,value:this.value}),this.onClear.emit(t),this.resetFilter()}static \u0275fac=function(i){return new(i||n)(k(Ce),k(At),k(De),k(He),k(z0),k(Pt))};static \u0275cmp=F({type:n,selectors:[["p-dropdown"]],contentQueries:function(i,r,o){if(i&1&&Je(o,qe,4),i&2){let s;J(s=X())&&(r.templates=s)}},viewQuery:function(i,r){if(i&1&&(fe(cJ,5),fe(uJ,5),fe(dJ,5),fe(pJ,5),fe(hJ,5),fe(fJ,5),fe(mJ,5),fe(gJ,5),fe(yJ,5)),i&2){let o;J(o=X())&&(r.containerViewChild=o.first),J(o=X())&&(r.filterViewChild=o.first),J(o=X())&&(r.focusInputViewChild=o.first),J(o=X())&&(r.editableInputViewChild=o.first),J(o=X())&&(r.itemsViewChild=o.first),J(o=X())&&(r.scroller=o.first),J(o=X())&&(r.overlayViewChild=o.first),J(o=X())&&(r.firstHiddenFocusableElementOnOverlay=o.first),J(o=X())&&(r.lastHiddenFocusableElementOnOverlay=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:4,hostBindings:function(i,r){i&2&&Gt("p-inputwrapper-filled",r.filled())("p-inputwrapper-focus",r.focused||r.overlayVisible)},inputs:{id:"id",scrollHeight:"scrollHeight",filter:[2,"filter","filter",V],name:"name",style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",readonly:[2,"readonly","readonly",V],required:[2,"required","required",V],editable:[2,"editable","editable",V],appendTo:"appendTo",tabindex:[2,"tabindex","tabindex",Ke],placeholder:"placeholder",loadingIcon:"loadingIcon",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",variant:"variant",inputId:"inputId",dataKey:"dataKey",filterBy:"filterBy",filterFields:"filterFields",autofocus:[2,"autofocus","autofocus",V],resetFilterOnHide:[2,"resetFilterOnHide","resetFilterOnHide",V],checkmark:[2,"checkmark","checkmark",V],dropdownIcon:"dropdownIcon",loading:[2,"loading","loading",V],optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",autoDisplayFirst:[2,"autoDisplayFirst","autoDisplayFirst",V],group:[2,"group","group",V],showClear:[2,"showClear","showClear",V],emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",lazy:[2,"lazy","lazy",V],virtualScroll:[2,"virtualScroll","virtualScroll",V],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",Ke],virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",filterMatchMode:"filterMatchMode",maxlength:[2,"maxlength","maxlength",Ke],tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",focusOnHover:[2,"focusOnHover","focusOnHover",V],selectOnFocus:[2,"selectOnFocus","selectOnFocus",V],autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",V],autofocusFilter:[2,"autofocusFilter","autofocusFilter",V],disabled:"disabled",itemSize:"itemSize",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",filterValue:"filterValue",options:"options"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onShow:"onShow",onHide:"onHide",onClear:"onClear",onLazyLoad:"onLazyLoad"},features:[on([wX]),$e],decls:12,vars:20,consts:[["container",""],["elseBlock",""],["overlay",""],["focusInput",""],["defaultPlaceholder",""],["editableInput",""],["firstHiddenFocusableEl",""],["buildInItems",""],["lastHiddenFocusableEl",""],["builtInFilterElement",""],["filter",""],["scroller",""],["items",""],["emptyFilter",""],["empty",""],[3,"click","ngClass","ngStyle"],["role","combobox","pAutoFocus","",3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","autofocus","focus","blur","keydown",4,"ngIf"],["type","text","aria-haspopup","listbox","pAutoFocus","",3,"ngClass","disabled","autofocus","input","keydown","focus","blur",4,"ngIf"],[4,"ngIf"],["role","button","aria-label","dropdown trigger","aria-haspopup","listbox",1,"p-dropdown-trigger",3,"mousedown"],[4,"ngIf","ngIfElse"],[3,"visibleChange","onAnimationStart","onHide","visible","options","target","appendTo","autoZIndex","baseZIndex","showTransitionOptions","hideTransitionOptions"],["pTemplate","content"],["role","combobox","pAutoFocus","",3,"focus","blur","keydown","ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","autofocus"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text","aria-haspopup","listbox","pAutoFocus","",3,"input","keydown","focus","blur","ngClass","disabled","autofocus"],[3,"styleClass","click",4,"ngIf"],["class","p-dropdown-clear-icon",3,"click",4,"ngIf"],[3,"click","styleClass"],[1,"p-dropdown-clear-icon",3,"click"],[4,"ngTemplateOutlet"],["aria-hidden","true",3,"ngClass",4,"ngIf"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true",3,"ngClass"],["aria-hidden","true"],["class","p-dropdown-trigger-icon",4,"ngIf"],["class","p-dropdown-trigger-icon",3,"ngClass",4,"ngIf"],[3,"styleClass",4,"ngIf"],[1,"p-dropdown-trigger-icon",3,"ngClass"],[3,"styleClass"],[1,"p-dropdown-trigger-icon"],[3,"ngClass","ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],["class","p-dropdown-header",3,"click",4,"ngIf"],["tabindex","0",1,"p-dropdown-items-wrapper",3,"ngStyle"],[3,"items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],[1,"p-dropdown-header",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-dropdown-filter-container"],["type","text","role","searchbox","autocomplete","off",1,"p-dropdown-filter","p-inputtext","p-component",3,"input","keydown","blur","value","ngClass"],["class","p-dropdown-filter-icon",4,"ngIf"],[1,"p-dropdown-filter-icon"],[3,"onLazyLoad","items","itemSize","autoSize","lazy","options"],["pTemplate","loader"],["role","listbox",1,"p-dropdown-items",3,"ngClass","ngStyle"],["ngFor","",3,"ngForOf"],["class","p-dropdown-empty-message","role","option",3,"ngStyle",4,"ngIf"],["role","option",1,"p-dropdown-item-group",3,"ngStyle"],[3,"onClick","onMouseEnter","id","option","checkmark","selected","label","disabled","template","focused","ariaPosInset","ariaSetSize"],["role","option",1,"p-dropdown-empty-message",3,"ngStyle"]],template:function(i,r){if(i&1){let o=$();b(0,"div",15,0),P("click",function(a){return M(o),D(r.onContainerClick(a))}),x(2,TJ,6,20,"span",16)(3,EJ,2,8,"input",17)(4,AJ,3,2,"ng-container",18),b(5,"div",19),P("mousedown",function(a){return M(o),D(r.onMouseDown(a))}),x(6,FJ,3,2,"ng-container",20)(7,$J,2,2,"ng-template",null,1,Bt),C(),b(9,"p-overlay",21,2),Cu("visibleChange",function(a){return M(o),Vp(r.overlayVisible,a)||(r.overlayVisible=a),D(a)}),P("onAnimationStart",function(a){return M(o),D(r.onOverlayAnimationStart(a))})("onHide",function(){return M(o),D(r.hide())}),x(11,CX,13,18,"ng-template",22),C()()}if(i&2){let o,s=pt(8);W(r.styleClass),f("ngClass",r.containerClass)("ngStyle",r.style),O("id",r.id),m(2),f("ngIf",!r.editable),m(),f("ngIf",r.editable),m(),f("ngIf",r.isVisibleClearIcon),m(),O("aria-expanded",(o=r.overlayVisible)!==null&&o!==void 0?o:!1)("data-pc-section","trigger"),m(),f("ngIf",r.loading)("ngIfElse",s),m(3),bu("visible",r.overlayVisible),f("options",r.overlayOptions)("target","@parent")("appendTo",r.appendTo)("autoZIndex",r.autoZIndex)("baseZIndex",r.baseZIndex)("showTransitionOptions",r.showTransitionOptions)("hideTransitionOptions",r.hideTransitionOptions)}},dependencies:()=>[Ye,Ui,ot,Mt,st,hx,qe,Hu,Fu,ts,Xt,$u,Va,IX],styles:[`@layer primeng{.p-dropdown{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-dropdown-clear-icon{position:absolute;top:50%;margin-top:-.5rem}.p-dropdown-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-dropdown-label{display:block;white-space:nowrap;overflow:hidden;flex:1 1 auto;width:1%;text-overflow:ellipsis;cursor:pointer}.p-dropdown-label-empty{overflow:hidden;opacity:0}input.p-dropdown-label{cursor:default}.p-dropdown .p-dropdown-panel{min-width:100%}.p-dropdown-items-wrapper{overflow:auto}.p-dropdown-item{cursor:pointer;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-dropdown-item-group{cursor:auto}.p-dropdown-items{margin:0;padding:0;list-style-type:none}.p-dropdown-filter{width:100%}.p-dropdown-filter-container{position:relative}.p-dropdown-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-fluid .p-dropdown{display:flex}.p-fluid .p-dropdown .p-dropdown-label{width:1%}.p-float-label .p-dropdown .p-placeholder{opacity:0}} +`],encapsulation:2,changeDetection:0})}return n})(),wh=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,fx,Ge,gr,Ln,mo,Ba,Xt,$u,Va,gx,Wi,fx,Ge,mo]})}return n})();var CL=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["AngleDoubleLeftIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.71602 11.164C5.80782 11.2021 5.9063 11.2215 6.00569 11.221C6.20216 11.2301 6.39427 11.1612 6.54025 11.0294C6.68191 10.8875 6.76148 10.6953 6.76148 10.4948C6.76148 10.2943 6.68191 10.1021 6.54025 9.96024L3.51441 6.9344L6.54025 3.90855C6.624 3.76126 6.65587 3.59011 6.63076 3.42254C6.60564 3.25498 6.525 3.10069 6.40175 2.98442C6.2785 2.86815 6.11978 2.79662 5.95104 2.7813C5.78229 2.76598 5.61329 2.80776 5.47112 2.89994L1.97123 6.39983C1.82957 6.54167 1.75 6.73393 1.75 6.9344C1.75 7.13486 1.82957 7.32712 1.97123 7.46896L5.47112 10.9991C5.54096 11.0698 5.62422 11.1259 5.71602 11.164ZM11.0488 10.9689C11.1775 11.1156 11.3585 11.2061 11.5531 11.221C11.7477 11.2061 11.9288 11.1156 12.0574 10.9689C12.1815 10.8302 12.25 10.6506 12.25 10.4645C12.25 10.2785 12.1815 10.0989 12.0574 9.96024L9.03158 6.93439L12.0574 3.90855C12.1248 3.76739 12.1468 3.60881 12.1204 3.45463C12.0939 3.30045 12.0203 3.15826 11.9097 3.04765C11.7991 2.93703 11.6569 2.86343 11.5027 2.83698C11.3486 2.81053 11.19 2.83252 11.0488 2.89994L7.51865 6.36957C7.37699 6.51141 7.29742 6.70367 7.29742 6.90414C7.29742 7.1046 7.37699 7.29686 7.51865 7.4387L11.0488 10.9689Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var wL=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["AngleDoubleRightIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M7.68757 11.1451C7.7791 11.1831 7.8773 11.2024 7.9764 11.2019C8.07769 11.1985 8.17721 11.1745 8.26886 11.1312C8.36052 11.088 8.44238 11.0265 8.50943 10.9505L12.0294 7.49085C12.1707 7.34942 12.25 7.15771 12.25 6.95782C12.25 6.75794 12.1707 6.56622 12.0294 6.42479L8.50943 2.90479C8.37014 2.82159 8.20774 2.78551 8.04633 2.80192C7.88491 2.81833 7.73309 2.88635 7.6134 2.99588C7.4937 3.10541 7.41252 3.25061 7.38189 3.40994C7.35126 3.56927 7.37282 3.73423 7.44337 3.88033L10.4605 6.89748L7.44337 9.91463C7.30212 10.0561 7.22278 10.2478 7.22278 10.4477C7.22278 10.6475 7.30212 10.8393 7.44337 10.9807C7.51301 11.0512 7.59603 11.1071 7.68757 11.1451ZM1.94207 10.9505C2.07037 11.0968 2.25089 11.1871 2.44493 11.2019C2.63898 11.1871 2.81949 11.0968 2.94779 10.9505L6.46779 7.49085C6.60905 7.34942 6.68839 7.15771 6.68839 6.95782C6.68839 6.75793 6.60905 6.56622 6.46779 6.42479L2.94779 2.90479C2.80704 2.83757 2.6489 2.81563 2.49517 2.84201C2.34143 2.86839 2.19965 2.94178 2.08936 3.05207C1.97906 3.16237 1.90567 3.30415 1.8793 3.45788C1.85292 3.61162 1.87485 3.76975 1.94207 3.9105L4.95922 6.92765L1.94207 9.9448C1.81838 10.0831 1.75 10.2621 1.75 10.4477C1.75 10.6332 1.81838 10.8122 1.94207 10.9505Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var IL=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["AngleLeftIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8.75 11.185C8.65146 11.1854 8.55381 11.1662 8.4628 11.1284C8.37179 11.0906 8.28924 11.0351 8.22 10.965L4.72 7.46496C4.57955 7.32433 4.50066 7.13371 4.50066 6.93496C4.50066 6.73621 4.57955 6.54558 4.72 6.40496L8.22 2.93496C8.36095 2.84357 8.52851 2.80215 8.69582 2.81733C8.86312 2.83252 9.02048 2.90344 9.14268 3.01872C9.26487 3.134 9.34483 3.28696 9.36973 3.4531C9.39463 3.61924 9.36303 3.78892 9.28 3.93496L6.28 6.93496L9.28 9.93496C9.42045 10.0756 9.49934 10.2662 9.49934 10.465C9.49934 10.6637 9.42045 10.8543 9.28 10.995C9.13526 11.1257 8.9448 11.1939 8.75 11.185Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var xL=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["AngleRightIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.25 11.1728C5.14929 11.1694 5.05033 11.1455 4.9592 11.1025C4.86806 11.0595 4.78666 10.9984 4.72 10.9228C4.57955 10.7822 4.50066 10.5916 4.50066 10.3928C4.50066 10.1941 4.57955 10.0035 4.72 9.86283L7.72 6.86283L4.72 3.86283C4.66067 3.71882 4.64765 3.55991 4.68275 3.40816C4.71785 3.25642 4.79932 3.11936 4.91585 3.01602C5.03238 2.91268 5.17819 2.84819 5.33305 2.83149C5.4879 2.81479 5.64411 2.84671 5.78 2.92283L9.28 6.42283C9.42045 6.56346 9.49934 6.75408 9.49934 6.95283C9.49934 7.15158 9.42045 7.34221 9.28 7.48283L5.78 10.9228C5.71333 10.9984 5.63193 11.0595 5.5408 11.1025C5.44966 11.1455 5.35071 11.1694 5.25 11.1728Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var ns=(()=>{class n{el;ngModel;cd;config;variant="outlined";filled;constructor(t,i,r,o){this.el=t,this.ngModel=i,this.cd=r,this.config=o}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}static \u0275fac=function(i){return new(i||n)(k(Ce),k($l,8),k(De),k(Pt))};static \u0275dir=gt({type:n,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:4,hostBindings:function(i,r){i&1&&P("input",function(s){return r.onInput(s)}),i&2&&Gt("p-filled",r.filled)("p-variant-filled",r.variant==="filled"||r.config.inputStyle()==="filled")},inputs:{variant:"variant"}})}return n})(),Xl=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te]})}return n})();var TX=["input"],EX=(n,e,t)=>({"p-inputnumber p-component":!0,"p-inputnumber-buttons-stacked":n,"p-inputnumber-buttons-horizontal":e,"p-inputnumber-buttons-vertical":t}),TL=()=>({"p-inputnumber-button p-inputnumber-button-up":!0}),EL=()=>({"p-inputnumber-button p-inputnumber-button-down":!0});function SX(n,e){if(n&1){let t=$();b(0,"TimesIcon",8),P("click",function(){M(t);let r=y(2);return D(r.clear())}),C()}n&2&&(f("ngClass","p-inputnumber-clear-icon"),O("data-pc-section","clearIcon"))}function MX(n,e){}function DX(n,e){n&1&&x(0,MX,0,0,"ng-template")}function OX(n,e){if(n&1){let t=$();b(0,"span",9),P("click",function(){M(t);let r=y(2);return D(r.clear())}),x(1,DX,1,0,null,10),C()}if(n&2){let t=y(2);O("data-pc-section","clearIcon"),m(),f("ngTemplateOutlet",t.clearIconTemplate)}}function AX(n,e){if(n&1&&(oe(0),x(1,SX,1,2,"TimesIcon",6)(2,OX,2,2,"span",7),se()),n&2){let t=y();m(),f("ngIf",!t.clearIconTemplate),m(),f("ngIf",t.clearIconTemplate)}}function kX(n,e){if(n&1&&E(0,"span",14),n&2){let t=y(2);f("ngClass",t.incrementButtonIcon),O("data-pc-section","incrementbuttonicon")}}function NX(n,e){n&1&&E(0,"AngleUpIcon"),n&2&&O("data-pc-section","incrementbuttonicon")}function LX(n,e){}function PX(n,e){n&1&&x(0,LX,0,0,"ng-template")}function RX(n,e){if(n&1&&(oe(0),x(1,NX,1,1,"AngleUpIcon",3)(2,PX,1,0,null,10),se()),n&2){let t=y(2);m(),f("ngIf",!t.incrementButtonIconTemplate),m(),f("ngTemplateOutlet",t.incrementButtonIconTemplate)}}function FX(n,e){if(n&1&&E(0,"span",14),n&2){let t=y(2);f("ngClass",t.decrementButtonIcon),O("data-pc-section","decrementbuttonicon")}}function jX(n,e){n&1&&E(0,"AngleDownIcon"),n&2&&O("data-pc-section","decrementbuttonicon")}function VX(n,e){}function BX(n,e){n&1&&x(0,VX,0,0,"ng-template")}function zX(n,e){if(n&1&&(oe(0),x(1,jX,1,1,"AngleDownIcon",3)(2,BX,1,0,null,10),se()),n&2){let t=y(2);m(),f("ngIf",!t.decrementButtonIconTemplate),m(),f("ngTemplateOutlet",t.decrementButtonIconTemplate)}}function UX(n,e){if(n&1){let t=$();b(0,"span",11)(1,"button",12),P("mousedown",function(r){M(t);let o=y();return D(o.onUpButtonMouseDown(r))})("mouseup",function(){M(t);let r=y();return D(r.onUpButtonMouseUp())})("mouseleave",function(){M(t);let r=y();return D(r.onUpButtonMouseLeave())})("keydown",function(r){M(t);let o=y();return D(o.onUpButtonKeyDown(r))})("keyup",function(){M(t);let r=y();return D(r.onUpButtonKeyUp())}),x(2,kX,1,2,"span",13)(3,RX,3,2,"ng-container",3),C(),b(4,"button",12),P("mousedown",function(r){M(t);let o=y();return D(o.onDownButtonMouseDown(r))})("mouseup",function(){M(t);let r=y();return D(r.onDownButtonMouseUp())})("mouseleave",function(){M(t);let r=y();return D(r.onDownButtonMouseLeave())})("keydown",function(r){M(t);let o=y();return D(o.onDownButtonKeyDown(r))})("keyup",function(){M(t);let r=y();return D(r.onDownButtonKeyUp())}),x(5,FX,1,2,"span",13)(6,zX,3,2,"ng-container",3),C()()}if(n&2){let t=y();O("data-pc-section","buttonGroup"),m(),W(t.incrementButtonClass),f("ngClass",St(17,TL))("disabled",t.disabled),O("aria-hidden",!0)("data-pc-section","incrementbutton"),m(),f("ngIf",t.incrementButtonIcon),m(),f("ngIf",!t.incrementButtonIcon),m(),W(t.decrementButtonClass),f("ngClass",St(18,EL))("disabled",t.disabled),O("aria-hidden",!0)("data-pc-section",t.decrementbutton),m(),f("ngIf",t.decrementButtonIcon),m(),f("ngIf",!t.decrementButtonIcon)}}function HX(n,e){if(n&1&&E(0,"span",14),n&2){let t=y(2);f("ngClass",t.incrementButtonIcon),O("data-pc-section","incrementbuttonicon")}}function $X(n,e){n&1&&E(0,"AngleUpIcon"),n&2&&O("data-pc-section","incrementbuttonicon")}function WX(n,e){}function GX(n,e){n&1&&x(0,WX,0,0,"ng-template")}function qX(n,e){if(n&1&&(oe(0),x(1,$X,1,1,"AngleUpIcon",3)(2,GX,1,0,null,10),se()),n&2){let t=y(2);m(),f("ngIf",!t.incrementButtonIconTemplate),m(),f("ngTemplateOutlet",t.incrementButtonIconTemplate)}}function QX(n,e){if(n&1){let t=$();b(0,"button",12),P("mousedown",function(r){M(t);let o=y();return D(o.onUpButtonMouseDown(r))})("mouseup",function(){M(t);let r=y();return D(r.onUpButtonMouseUp())})("mouseleave",function(){M(t);let r=y();return D(r.onUpButtonMouseLeave())})("keydown",function(r){M(t);let o=y();return D(o.onUpButtonKeyDown(r))})("keyup",function(){M(t);let r=y();return D(r.onUpButtonKeyUp())}),x(1,HX,1,2,"span",13)(2,qX,3,2,"ng-container",3),C()}if(n&2){let t=y();W(t.incrementButtonClass),f("ngClass",St(8,TL))("disabled",t.disabled),O("aria-hidden",!0)("data-pc-section","incrementbutton"),m(),f("ngIf",t.incrementButtonIcon),m(),f("ngIf",!t.incrementButtonIcon)}}function KX(n,e){if(n&1&&E(0,"span",14),n&2){let t=y(2);f("ngClass",t.decrementButtonIcon),O("data-pc-section","decrementbuttonicon")}}function YX(n,e){n&1&&E(0,"AngleDownIcon"),n&2&&O("data-pc-section","decrementbuttonicon")}function ZX(n,e){}function JX(n,e){n&1&&x(0,ZX,0,0,"ng-template")}function XX(n,e){if(n&1&&(oe(0),x(1,YX,1,1,"AngleDownIcon",3)(2,JX,1,0,null,10),se()),n&2){let t=y(2);m(),f("ngIf",!t.decrementButtonIconTemplate),m(),f("ngTemplateOutlet",t.decrementButtonIconTemplate)}}function eee(n,e){if(n&1){let t=$();b(0,"button",12),P("mousedown",function(r){M(t);let o=y();return D(o.onDownButtonMouseDown(r))})("mouseup",function(){M(t);let r=y();return D(r.onDownButtonMouseUp())})("mouseleave",function(){M(t);let r=y();return D(r.onDownButtonMouseLeave())})("keydown",function(r){M(t);let o=y();return D(o.onDownButtonKeyDown(r))})("keyup",function(){M(t);let r=y();return D(r.onDownButtonKeyUp())}),x(1,KX,1,2,"span",13)(2,XX,3,2,"ng-container",3),C()}if(n&2){let t=y();W(t.decrementButtonClass),f("ngClass",St(8,EL))("disabled",t.disabled),O("aria-hidden",!0)("data-pc-section","decrementbutton"),m(),f("ngIf",t.decrementButtonIcon),m(),f("ngIf",!t.decrementButtonIcon)}}var tee={provide:ti,useExisting:dn(()=>nee),multi:!0},nee=(()=>{class n{document;el;cd;injector;config;showButtons=!1;format=!0;buttonLayout="stacked";inputId;styleClass;style;placeholder;size;maxlength;tabindex;title;ariaLabelledBy;ariaLabel;ariaRequired;name;required;autocomplete;min;max;incrementButtonClass;decrementButtonClass;incrementButtonIcon;decrementButtonIcon;readonly=!1;step=1;allowEmpty=!0;locale;localeMatcher;mode="decimal";currency;currencyDisplay;useGrouping=!0;variant="outlined";minFractionDigits;maxFractionDigits;prefix;suffix;inputStyle;inputStyleClass;showClear=!1;autofocus;get disabled(){return this._disabled}set disabled(t){t&&(this.focused=!1),this._disabled=t,this.timer&&this.clearTimer()}onInput=new j;onFocus=new j;onBlur=new j;onKeyDown=new j;onClear=new j;input;templates;clearIconTemplate;incrementButtonIconTemplate;decrementButtonIconTemplate;value;onModelChange=()=>{};onModelTouched=()=>{};focused;initialized;groupChar="";prefixChar="";suffixChar="";isSpecialChar;timer;lastValue;_numeral;numberFormat;_decimal;_decimalChar;_group;_minusSign;_currency;_prefix;_suffix;_index;_disabled;ngControl=null;constructor(t,i,r,o,s){this.document=t,this.el=i,this.cd=r,this.injector=o,this.config=s}ngOnChanges(t){["locale","localeMatcher","mode","currency","currencyDisplay","useGrouping","minFractionDigits","maxFractionDigits","prefix","suffix"].some(r=>!!t[r])&&this.updateConstructParser()}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"clearicon":this.clearIconTemplate=t.template;break;case"incrementbuttonicon":this.incrementButtonIconTemplate=t.template;break;case"decrementbuttonicon":this.decrementButtonIconTemplate=t.template;break}})}ngOnInit(){this.ngControl=this.injector.get(Hi,null,{optional:!0}),this.constructParser(),this.initialized=!0}getOptions(){return{localeMatcher:this.localeMatcher,style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,useGrouping:this.useGrouping,minimumFractionDigits:this.minFractionDigits??void 0,maximumFractionDigits:this.maxFractionDigits??void 0}}constructParser(){this.numberFormat=new Intl.NumberFormat(this.locale,this.getOptions());let t=[...new Intl.NumberFormat(this.locale,{useGrouping:!1}).format(9876543210)].reverse(),i=new Map(t.map((r,o)=>[r,o]));this._numeral=new RegExp(`[${t.join("")}]`,"g"),this._group=this.getGroupingExpression(),this._minusSign=this.getMinusSignExpression(),this._currency=this.getCurrencyExpression(),this._decimal=this.getDecimalExpression(),this._decimalChar=this.getDecimalChar(),this._suffix=this.getSuffixExpression(),this._prefix=this.getPrefixExpression(),this._index=r=>i.get(r)}updateConstructParser(){this.initialized&&this.constructParser()}escapeRegExp(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}getDecimalExpression(){let t=this.getDecimalChar();return new RegExp(`[${t}]`,"g")}getDecimalChar(){return new Intl.NumberFormat(this.locale,R(I({},this.getOptions()),{useGrouping:!1})).format(1.1).replace(this._currency,"").trim().replace(this._numeral,"")}getGroupingExpression(){let t=new Intl.NumberFormat(this.locale,{useGrouping:!0});return this.groupChar=t.format(1e6).trim().replace(this._numeral,"").charAt(0),new RegExp(`[${this.groupChar}]`,"g")}getMinusSignExpression(){let t=new Intl.NumberFormat(this.locale,{useGrouping:!1});return new RegExp(`[${t.format(-1).trim().replace(this._numeral,"")}]`,"g")}getCurrencyExpression(){if(this.currency){let t=new Intl.NumberFormat(this.locale,{style:"currency",currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});return new RegExp(`[${t.format(1).replace(/\s/g,"").replace(this._numeral,"").replace(this._group,"")}]`,"g")}return new RegExp("[]","g")}getPrefixExpression(){if(this.prefix)this.prefixChar=this.prefix;else{let t=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay});this.prefixChar=t.format(1).split("1")[0]}return new RegExp(`${this.escapeRegExp(this.prefixChar||"")}`,"g")}getSuffixExpression(){if(this.suffix)this.suffixChar=this.suffix;else{let t=new Intl.NumberFormat(this.locale,{style:this.mode,currency:this.currency,currencyDisplay:this.currencyDisplay,minimumFractionDigits:0,maximumFractionDigits:0});this.suffixChar=t.format(1).split("1")[1]}return new RegExp(`${this.escapeRegExp(this.suffixChar||"")}`,"g")}get isBlurUpdateOnMode(){return this.ngControl?.control?.updateOn==="blur"}formatValue(t){if(t!=null){if(t==="-")return t;if(this.format){let r=new Intl.NumberFormat(this.locale,this.getOptions()).format(t);return this.prefix&&t!=this.prefix&&(r=this.prefix+r),this.suffix&&t!=this.suffix&&(r=r+this.suffix),r}return t.toString()}return""}parseValue(t){let i=new RegExp(this._suffix,""),r=new RegExp(this._prefix,""),o=new RegExp(this._currency,""),s=t.replace(i,"").replace(r,"").trim().replace(/\s/g,"").replace(o,"").replace(this._group,"").replace(this._minusSign,"-").replace(this._decimal,".").replace(this._numeral,this._index);if(s){if(s==="-")return s;let a=+s;return isNaN(a)?null:a}return null}repeat(t,i,r){if(this.readonly)return;let o=i||500;this.clearTimer(),this.timer=setTimeout(()=>{this.repeat(t,40,r)},o),this.spin(t,r)}spin(t,i){let r=this.step*i,o=this.parseValue(this.input?.nativeElement.value)||0,s=this.validateValue(o+r);this.maxlength&&this.maxlength=0;a--)if(this.isNumeralChar(o.charAt(a))){this.input.nativeElement.setSelectionRange(a,a);break}break;case"Tab":case"Enter":s=this.validateValue(this.parseValue(this.input.nativeElement.value)),this.input.nativeElement.value=this.formatValue(s),this.input.nativeElement.setAttribute("aria-valuenow",s),this.updateModel(t,s);break;case"Backspace":{if(t.preventDefault(),i===r){if(i==1&&this.prefix||i==o.length&&this.suffix)break;let a=o.charAt(i-1),{decimalCharIndex:l,decimalCharIndexWithoutPrefix:c}=this.getDecimalCharIndexes(o);if(this.isNumeralChar(a)){let u=this.getDecimalLength(o);if(this._group.test(a))this._group.lastIndex=0,s=o.slice(0,i-2)+o.slice(i-1);else if(this._decimal.test(a))this._decimal.lastIndex=0,u?this.input?.nativeElement.setSelectionRange(i-1,i-1):s=o.slice(0,i-1)+o.slice(i);else if(l>0&&i>l){let d=this.isDecimalMode()&&(this.minFractionDigits||0)0?s:""):s=o.slice(0,i-1)+o.slice(i)}else this.mode==="currency"&&a.search(this._currency)!=-1&&(s=o.slice(1));this.updateValue(t,s,null,"delete-single")}else s=this.deleteRange(o,i,r),this.updateValue(t,s,null,"delete-range");break}case"Delete":if(t.preventDefault(),i===r){if(i==0&&this.prefix||i==o.length-1&&this.suffix)break;let a=o.charAt(i),{decimalCharIndex:l,decimalCharIndexWithoutPrefix:c}=this.getDecimalCharIndexes(o);if(this.isNumeralChar(a)){let u=this.getDecimalLength(o);if(this._group.test(a))this._group.lastIndex=0,s=o.slice(0,i)+o.slice(i+2);else if(this._decimal.test(a))this._decimal.lastIndex=0,u?this.input?.nativeElement.setSelectionRange(i+1,i+1):s=o.slice(0,i)+o.slice(i+1);else if(l>0&&i>l){let d=this.isDecimalMode()&&(this.minFractionDigits||0)0?s:""):s=o.slice(0,i)+o.slice(i+1)}this.updateValue(t,s,null,"delete-back-single")}else s=this.deleteRange(o,i,r),this.updateValue(t,s,null,"delete-range");break;case"Home":this.min&&(this.updateModel(t,this.min),t.preventDefault());break;case"End":this.max&&(this.updateModel(t,this.max),t.preventDefault());break;default:break}this.onKeyDown.emit(t)}onInputKeyPress(t){if(this.readonly)return;let i=t.which||t.keyCode,r=String.fromCharCode(i),o=this.isDecimalSign(r),s=this.isMinusSign(r);i!=13&&t.preventDefault(),!o&&t.code==="NumpadDecimal"&&(o=!0,r=this._decimalChar,i=r.charCodeAt(0));let a=this.parseValue(this.input.nativeElement.value+r),l=a!=null?a.toString():"";if(this.maxlength&&this.getSelectedText()?.length==this.maxlength){this.insert(t,r,{isDecimalSign:o,isMinusSign:s});return}this.maxlength&&l.length>this.maxlength||(48<=i&&i<=57||s||o)&&this.insert(t,r,{isDecimalSign:o,isMinusSign:s})}getSelectedText(){return window?.getSelection()?.toString().replaceAll(/[^0-9']/g,"")||""}onPaste(t){if(!this.disabled&&!this.readonly){t.preventDefault();let i=(t.clipboardData||this.document.defaultView.clipboardData).getData("Text");if(i){this.maxlength&&(i=i.toString().substring(0,this.maxlength));let r=this.parseValue(i);r!=null&&this.insert(t,r.toString())}}}allowMinusSign(){return this.min==null||this.min<0}isMinusSign(t){return this._minusSign.test(t)||t==="-"?(this._minusSign.lastIndex=0,!0):!1}isDecimalSign(t){return this._decimal.test(t)?(this._decimal.lastIndex=0,!0):!1}isDecimalMode(){return this.mode==="decimal"}getDecimalCharIndexes(t){let i=t.search(this._decimal);this._decimal.lastIndex=0;let o=t.replace(this._prefix,"").trim().replace(/\s/g,"").replace(this._currency,"").search(this._decimal);return this._decimal.lastIndex=0,{decimalCharIndex:i,decimalCharIndexWithoutPrefix:o}}getCharIndexes(t){let i=t.search(this._decimal);this._decimal.lastIndex=0;let r=t.search(this._minusSign);this._minusSign.lastIndex=0;let o=t.search(this._suffix);this._suffix.lastIndex=0;let s=t.search(this._currency);return this._currency.lastIndex=0,{decimalCharIndex:i,minusCharIndex:r,suffixCharIndex:o,currencyCharIndex:s}}insert(t,i,r={isDecimalSign:!1,isMinusSign:!1}){let o=i.search(this._minusSign);if(this._minusSign.lastIndex=0,!this.allowMinusSign()&&o!==-1)return;let s=this.input?.nativeElement.selectionStart,a=this.input?.nativeElement.selectionEnd,l=this.input?.nativeElement.value.trim(),{decimalCharIndex:c,minusCharIndex:u,suffixCharIndex:d,currencyCharIndex:p}=this.getCharIndexes(l),h;if(r.isMinusSign)s===0&&(h=l,(u===-1||a!==0)&&(h=this.insertText(l,i,0,a)),this.updateValue(t,h,i,"insert"));else if(r.isDecimalSign)c>0&&s===c?this.updateValue(t,l,i,"insert"):c>s&&c0&&s>c){if(s+i.length-(c+1)<=g){let v=p>=s?p-1:d>=s?d:l.length;h=l.slice(0,s)+i+l.slice(s+i.length,v)+l.slice(v),this.updateValue(t,h,i,_)}}else h=this.insertText(l,i,s,a),this.updateValue(t,h,i,_)}}insertText(t,i,r,o){if((i==="."?i:i.split(".")).length===2){let a=t.slice(r,o).search(this._decimal);return this._decimal.lastIndex=0,a>0?t.slice(0,r)+this.formatValue(i)+t.slice(o):t||this.formatValue(i)}else return o-r===t.length?this.formatValue(i):r===0?i+t.slice(o):o===t.length?t.slice(0,r)+i:t.slice(0,r)+i+t.slice(o)}deleteRange(t,i,r){let o;return r-i===t.length?o="":i===0?o=t.slice(r):r===t.length?o=t.slice(0,i):o=t.slice(0,i)+t.slice(r),o}initCursor(){let t=this.input?.nativeElement.selectionStart,i=this.input?.nativeElement.selectionEnd,r=this.input?.nativeElement.value,o=r.length,s=null,a=(this.prefixChar||"").length;r=r.replace(this._prefix,""),(t===i||t!==0||i=0;)if(l=r.charAt(c),this.isNumeralChar(l)){s=c+a;break}else c--;if(s!==null)this.input?.nativeElement.setSelectionRange(s+1,s+1);else{for(c=t;cthis.max?this.max:t}updateInput(t,i,r,o){i=i||"";let s=this.input?.nativeElement.value,a=this.formatValue(t),l=s.length;if(a!==o&&(a=this.concatValues(a,o)),l===0){this.input.nativeElement.value=a,this.input.nativeElement.setSelectionRange(0,0);let u=this.initCursor()+i.length;this.input.nativeElement.setSelectionRange(u,u)}else{let c=this.input.nativeElement.selectionStart,u=this.input.nativeElement.selectionEnd;if(this.maxlength&&a.length>this.maxlength&&(a=a.slice(0,this.maxlength),c=Math.min(c,this.maxlength),u=Math.min(u,this.maxlength)),this.maxlength&&this.maxlength0}clearTimer(){this.timer&&clearInterval(this.timer)}static \u0275fac=function(i){return new(i||n)(k(We),k(Ce),k(De),k($t),k(Pt))};static \u0275cmp=F({type:n,selectors:[["p-inputNumber"]],contentQueries:function(i,r,o){if(i&1&&Je(o,qe,4),i&2){let s;J(s=X())&&(r.templates=s)}},viewQuery:function(i,r){if(i&1&&fe(TX,5),i&2){let o;J(o=X())&&(r.input=o.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(i,r){i&2&&Gt("p-inputwrapper-filled",r.filled)("p-inputwrapper-focus",r.focused)("p-inputnumber-clearable",r.showClear&&r.buttonLayout!="vertical")},inputs:{showButtons:[2,"showButtons","showButtons",V],format:[2,"format","format",V],buttonLayout:"buttonLayout",inputId:"inputId",styleClass:"styleClass",style:"style",placeholder:"placeholder",size:[2,"size","size",Ke],maxlength:[2,"maxlength","maxlength",Ke],tabindex:[2,"tabindex","tabindex",Ke],title:"title",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",ariaRequired:[2,"ariaRequired","ariaRequired",V],name:"name",required:[2,"required","required",V],autocomplete:"autocomplete",min:[2,"min","min",Ke],max:[2,"max","max",Ke],incrementButtonClass:"incrementButtonClass",decrementButtonClass:"decrementButtonClass",incrementButtonIcon:"incrementButtonIcon",decrementButtonIcon:"decrementButtonIcon",readonly:[2,"readonly","readonly",V],step:[2,"step","step",Ke],allowEmpty:[2,"allowEmpty","allowEmpty",V],locale:"locale",localeMatcher:"localeMatcher",mode:"mode",currency:"currency",currencyDisplay:"currencyDisplay",useGrouping:[2,"useGrouping","useGrouping",V],variant:"variant",minFractionDigits:[2,"minFractionDigits","minFractionDigits",t=>Ke(t,null)],maxFractionDigits:[2,"maxFractionDigits","maxFractionDigits",t=>Ke(t,null)],prefix:"prefix",suffix:"suffix",inputStyle:"inputStyle",inputStyleClass:"inputStyleClass",showClear:[2,"showClear","showClear",V],autofocus:[2,"autofocus","autofocus",V],disabled:"disabled"},outputs:{onInput:"onInput",onFocus:"onFocus",onBlur:"onBlur",onKeyDown:"onKeyDown",onClear:"onClear"},features:[on([tee]),$e,Jt],decls:7,vars:43,consts:[["input",""],[3,"ngClass","ngStyle"],["pInputText","","role","spinbutton","inputmode","decimal","pAutoFocus","",3,"input","keydown","keypress","paste","click","focus","blur","ngClass","ngStyle","value","disabled","readonly","autofocus"],[4,"ngIf"],["class","p-inputnumber-button-group",4,"ngIf"],["type","button","pButton","","class","p-button-icon-only","tabindex","-1",3,"ngClass","class","disabled","mousedown","mouseup","mouseleave","keydown","keyup",4,"ngIf"],[3,"ngClass","click",4,"ngIf"],["class","p-inputnumber-clear-icon",3,"click",4,"ngIf"],[3,"click","ngClass"],[1,"p-inputnumber-clear-icon",3,"click"],[4,"ngTemplateOutlet"],[1,"p-inputnumber-button-group"],["type","button","pButton","","tabindex","-1",1,"p-button-icon-only",3,"mousedown","mouseup","mouseleave","keydown","keyup","ngClass","disabled"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(i,r){if(i&1){let o=$();b(0,"span",1)(1,"input",2,0),P("input",function(a){return M(o),D(r.onUserInput(a))})("keydown",function(a){return M(o),D(r.onInputKeyDown(a))})("keypress",function(a){return M(o),D(r.onInputKeyPress(a))})("paste",function(a){return M(o),D(r.onPaste(a))})("click",function(){return M(o),D(r.onInputClick())})("focus",function(a){return M(o),D(r.onInputFocus(a))})("blur",function(a){return M(o),D(r.onInputBlur(a))}),C(),x(3,AX,3,2,"ng-container",3)(4,UX,7,19,"span",4)(5,QX,3,9,"button",5)(6,eee,3,9,"button",5),C()}i&2&&(W(r.styleClass),f("ngClass",Sn(39,EX,r.showButtons&&r.buttonLayout==="stacked",r.showButtons&&r.buttonLayout==="horizontal",r.showButtons&&r.buttonLayout==="vertical"))("ngStyle",r.style),O("data-pc-name","inputnumber")("data-pc-section","root"),m(),W(r.inputStyleClass),Gt("p-variant-filled",r.variant==="filled"||r.config.inputStyle()==="filled"),f("ngClass","p-inputnumber-input")("ngStyle",r.inputStyle)("value",r.formattedValue())("disabled",r.disabled)("readonly",r.readonly)("autofocus",r.autofocus),O("id",r.inputId)("variant",r.variant)("aria-valuemin",r.min)("aria-valuemax",r.max)("aria-valuenow",r.value)("placeholder",r.placeholder)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledBy)("title",r.title)("size",r.size)("name",r.name)("autocomplete",r.autocomplete)("maxlength",r.maxlength)("tabindex",r.tabindex)("aria-required",r.ariaRequired)("required",r.required)("min",r.min)("max",r.max)("data-pc-section","input"),m(2),f("ngIf",r.buttonLayout!="vertical"&&r.showClear&&r.value),m(),f("ngIf",r.showButtons&&r.buttonLayout==="stacked"),m(),f("ngIf",r.showButtons&&r.buttonLayout!=="stacked"),m(),f("ngIf",r.showButtons&&r.buttonLayout!=="stacked"))},dependencies:()=>[Ye,ot,Mt,st,ns,zt,ts,Xt,vh,_h],styles:[`@layer primeng{p-inputnumber,.p-inputnumber{display:inline-flex}.p-inputnumber-button{display:flex;align-items:center;justify-content:center;flex:0 0 auto}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button .p-button-label,.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button .p-button-label{display:none}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-up{border-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-input{border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-stacked .p-button.p-inputnumber-button-down{border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0;padding:0}.p-inputnumber-buttons-stacked .p-inputnumber-button-group{display:flex;flex-direction:column}.p-inputnumber-buttons-stacked .p-inputnumber-button-group .p-button.p-inputnumber-button{flex:1 1 auto}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-up{order:3;border-top-left-radius:0;border-bottom-left-radius:0}.p-inputnumber-buttons-horizontal .p-inputnumber-input{order:2;border-radius:0}.p-inputnumber-buttons-horizontal .p-button.p-inputnumber-button-down{order:1;border-top-right-radius:0;border-bottom-right-radius:0}.p-inputnumber-buttons-vertical{flex-direction:column}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-up{order:1;border-bottom-left-radius:0;border-bottom-right-radius:0;width:100%}.p-inputnumber-buttons-vertical .p-inputnumber-input{order:2;border-radius:0;text-align:center}.p-inputnumber-buttons-vertical .p-button.p-inputnumber-button-down{order:3;border-top-left-radius:0;border-top-right-radius:0;width:100%}.p-inputnumber-input{flex:1 1 auto}.p-fluid p-inputnumber,.p-fluid .p-inputnumber{width:100%}.p-fluid .p-inputnumber .p-inputnumber-input{width:1%}.p-fluid .p-inputnumber-buttons-vertical .p-inputnumber-input{width:100%}.p-inputnumber-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-inputnumber-clearable{position:relative}} +`],encapsulation:2,changeDetection:0})}return n})(),vx=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Xl,an,Ba,Xt,vh,_h,Ge]})}return n})();var SL=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,wh,vx,hr,Ge,Ln,CL,wL,IL,xL,wh,vx,hr,Ge]})}return n})();var iy=(()=>{let e=class e{getLine(i,r){let o=null;if(i){let s=i.split(` +`);o=s&&s.length>r?s[r]:null}return o}camelize(i){return i.replace(/(?:^\w|[A-Z]|\b\w)/g,(r,o)=>o===0?r.toLowerCase():r.toUpperCase()).replace(/\s+/g,"")}titleCase(i){return`${i.charAt(0).toLocaleUpperCase()}${i.slice(1)}`}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();var ry=class{getQueryParams(){let e=window.location.search.substring(1).split("&"),t=new Map;return e.forEach(i=>{let r=i.split("=");t.set(r[0],r[1])}),t}getQueryStringParam(e){let t=null,r=new RegExp("[?&]"+e.replace(/[\[\]]/g,"\\$&")+"(=([^&#]*)|&|#|$)").exec(window.location.href);return r&&r[2]&&(t=decodeURIComponent(r[2].replace(/\+/g," "))),t}};var ML={production:!1};var ree="devMode",is=(()=>{let e=class e{constructor(i){this.stringUtils=i,this.showLogs=!0,this.httpRequestUtils=new ry,this.showLogs=this.shouldShowLogs(),this.showLogs&&console.info("Setting the logger --> Developer mode logger on")}info(i,...r){r&&r.length>0?console.info(this.wrapMessage(i),r):console.info(this.wrapMessage(i))}error(i,...r){r&&r.length>0?console.error(this.wrapMessage(i),r):console.error(this.wrapMessage(i))}warn(i,...r){r&&r.length>0?console.warn(this.wrapMessage(i),r):console.warn(this.wrapMessage(i))}debug(i,...r){r&&r.length>0?console.debug(this.wrapMessage(i),r):console.debug(this.wrapMessage(i))}shouldShowLogs(){let i=this.httpRequestUtils.getQueryStringParam(ree);return!ML.production||i==="on"}wrapMessage(i){return this.showLogs?i:this.getCaller()+">> "+i}getCaller(){let i="unknown";try{throw new Error}catch(r){i=this.cleanCaller(this.stringUtils.getLine(r.stack,4))}return i}cleanCaller(i){return i?i.trim().substr(3):"unknown"}};e.\u0275fac=function(r){return new(r||e)(re(iy))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();var wt="primary",jh=Symbol("RouteTitle"),xx=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}};function Yu(n){return new xx(n)}function see(n,e,t){let i=t.path.split("/");if(i.length>n.length||t.pathMatch==="full"&&(e.hasChildren()||i.lengthi[o]===r)}else return n===e}function BL(n){return n.length>0?n[n.length-1]:null}function qa(n){return ko(n)?n:Ma(n)?Yt(Promise.resolve(n)):ke(n)}var lee={exact:UL,subset:HL},zL={exact:cee,subset:uee,ignored:()=>!0};function DL(n,e,t){return lee[t.paths](n.root,e.root,t.matrixParams)&&zL[t.queryParams](n.queryParams,e.queryParams)&&!(t.fragment==="exact"&&n.fragment!==e.fragment)}function cee(n,e){return rs(n,e)}function UL(n,e,t){if(!nc(n.segments,e.segments)||!ay(n.segments,e.segments,t)||n.numberOfChildren!==e.numberOfChildren)return!1;for(let i in e.children)if(!n.children[i]||!UL(n.children[i],e.children[i],t))return!1;return!0}function uee(n,e){return Object.keys(e).length<=Object.keys(n).length&&Object.keys(e).every(t=>VL(n[t],e[t]))}function HL(n,e,t){return $L(n,e,e.segments,t)}function $L(n,e,t,i){if(n.segments.length>t.length){let r=n.segments.slice(0,t.length);return!(!nc(r,t)||e.hasChildren()||!ay(r,t,i))}else if(n.segments.length===t.length){if(!nc(n.segments,t)||!ay(n.segments,t,i))return!1;for(let r in e.children)if(!n.children[r]||!HL(n.children[r],e.children[r],i))return!1;return!0}else{let r=t.slice(0,n.segments.length),o=t.slice(n.segments.length);return!nc(n.segments,r)||!ay(n.segments,r,i)||!n.children[wt]?!1:$L(n.children[wt],e,o,i)}}function ay(n,e,t){return e.every((i,r)=>zL[t](n[r].parameters,i.parameters))}var Us=class{constructor(e=new en([],{}),t={},i=null){this.root=e,this.queryParams=t,this.fragment=i}get queryParamMap(){return this._queryParamMap??=Yu(this.queryParams),this._queryParamMap}toString(){return hee.serialize(this)}},en=class{constructor(e,t){this.segments=e,this.children=t,this.parent=null,Object.values(t).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return ly(this)}},tc=class{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap??=Yu(this.parameters),this._parameterMap}toString(){return GL(this)}};function dee(n,e){return nc(n,e)&&n.every((t,i)=>rs(t.parameters,e[i].parameters))}function nc(n,e){return n.length!==e.length?!1:n.every((t,i)=>t.path===e[i].path)}function pee(n,e){let t=[];return Object.entries(n.children).forEach(([i,r])=>{i===wt&&(t=t.concat(e(r,i)))}),Object.entries(n.children).forEach(([i,r])=>{i!==wt&&(t=t.concat(e(r,i)))}),t}var Vh=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:()=>new Zu,providedIn:"root"});let n=e;return n})(),Zu=class{parse(e){let t=new Sx(e);return new Us(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){let t=`/${xh(e.root,!0)}`,i=gee(e.queryParams),r=typeof e.fragment=="string"?`#${fee(e.fragment)}`:"";return`${t}${i}${r}`}},hee=new Zu;function ly(n){return n.segments.map(e=>GL(e)).join("/")}function xh(n,e){if(!n.hasChildren())return ly(n);if(e){let t=n.children[wt]?xh(n.children[wt],!1):"",i=[];return Object.entries(n.children).forEach(([r,o])=>{r!==wt&&i.push(`${r}:${xh(o,!1)}`)}),i.length>0?`${t}(${i.join("//")})`:t}else{let t=pee(n,(i,r)=>r===wt?[xh(n.children[wt],!1)]:[`${r}:${xh(i,!1)}`]);return Object.keys(n.children).length===1&&n.children[wt]!=null?`${ly(n)}/${t[0]}`:`${ly(n)}/(${t.join("//")})`}}function WL(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function oy(n){return WL(n).replace(/%3B/gi,";")}function fee(n){return encodeURI(n)}function Ex(n){return WL(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function cy(n){return decodeURIComponent(n)}function OL(n){return cy(n.replace(/\+/g,"%20"))}function GL(n){return`${Ex(n.path)}${mee(n.parameters)}`}function mee(n){return Object.entries(n).map(([e,t])=>`;${Ex(e)}=${Ex(t)}`).join("")}function gee(n){let e=Object.entries(n).map(([t,i])=>Array.isArray(i)?i.map(r=>`${oy(t)}=${oy(r)}`).join("&"):`${oy(t)}=${oy(i)}`).filter(t=>t);return e.length?`?${e.join("&")}`:""}var yee=/^[^\/()?;#]+/;function bx(n){let e=n.match(yee);return e?e[0]:""}var _ee=/^[^\/()?;=#]+/;function vee(n){let e=n.match(_ee);return e?e[0]:""}var bee=/^[^=?&#]+/;function Cee(n){let e=n.match(bee);return e?e[0]:""}var wee=/^[^&#]+/;function Iee(n){let e=n.match(wee);return e?e[0]:""}var Sx=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new en([],{}):new en([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(i[wt]=new en(e,t)),i}parseSegment(){let e=bx(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new ie(4009,!1);return this.capture(e),new tc(cy(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let t=vee(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){let r=bx(this.remaining);r&&(i=r,this.capture(i))}e[cy(t)]=cy(i)}parseQueryParam(e){let t=Cee(this.remaining);if(!t)return;this.capture(t);let i="";if(this.consumeOptional("=")){let s=Iee(this.remaining);s&&(i=s,this.capture(i))}let r=OL(t),o=OL(i);if(e.hasOwnProperty(r)){let s=e[r];Array.isArray(s)||(s=[s],e[r]=s),s.push(o)}else e[r]=o}parseParens(e){let t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=bx(this.remaining),r=this.remaining[i.length];if(r!=="/"&&r!==")"&&r!==";")throw new ie(4010,!1);let o;i.indexOf(":")>-1?(o=i.slice(0,i.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=wt);let s=this.parseChildren();t[o]=Object.keys(s).length===1?s[wt]:new en([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new ie(4011,!1)}};function qL(n){return n.segments.length>0?new en([],{[wt]:n}):n}function QL(n){let e={};for(let[i,r]of Object.entries(n.children)){let o=QL(r);if(i===wt&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))e[s]=a;else(o.segments.length>0||o.hasChildren())&&(e[i]=o)}let t=new en(n.segments,e);return xee(t)}function xee(n){if(n.numberOfChildren===1&&n.children[wt]){let e=n.children[wt];return new en(n.segments.concat(e.segments),e.children)}return n}function Oh(n){return n instanceof Us}function Tee(n,e,t=null,i=null){let r=KL(n);return YL(r,e,t,i)}function KL(n){let e;function t(o){let s={};for(let l of o.children){let c=t(l);s[l.outlet]=c}let a=new en(o.url,s);return o===n&&(e=a),a}let i=t(n.root),r=qL(i);return e??r}function YL(n,e,t,i){let r=n;for(;r.parent;)r=r.parent;if(e.length===0)return Cx(r,r,r,t,i);let o=Eee(e);if(o.toRoot())return Cx(r,r,new en([],{}),t,i);let s=See(o,r,n),a=s.processChildren?Sh(s.segmentGroup,s.index,o.commands):JL(s.segmentGroup,s.index,o.commands);return Cx(r,s.segmentGroup,a,t,i)}function uy(n){return typeof n=="object"&&n!=null&&!n.outlets&&!n.segmentPath}function Ah(n){return typeof n=="object"&&n!=null&&n.outlets}function Cx(n,e,t,i,r){let o={};i&&Object.entries(i).forEach(([l,c])=>{o[l]=Array.isArray(c)?c.map(u=>`${u}`):`${c}`});let s;n===e?s=t:s=ZL(n,e,t);let a=qL(QL(s));return new Us(a,o,r)}function ZL(n,e,t){let i={};return Object.entries(n.children).forEach(([r,o])=>{o===e?i[r]=t:i[r]=ZL(o,e,t)}),new en(n.segments,i)}var dy=class{constructor(e,t,i){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=i,e&&i.length>0&&uy(i[0]))throw new ie(4003,!1);let r=i.find(Ah);if(r&&r!==BL(i))throw new ie(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Eee(n){if(typeof n[0]=="string"&&n.length===1&&n[0]==="/")return new dy(!0,0,n);let e=0,t=!1,i=n.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([l,c])=>{a[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?t=!0:a===".."?e++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new dy(t,e,i)}var qu=class{constructor(e,t,i){this.segmentGroup=e,this.processChildren=t,this.index=i}};function See(n,e,t){if(n.isAbsolute)return new qu(e,!0,0);if(!t)return new qu(e,!1,NaN);if(t.parent===null)return new qu(t,!0,0);let i=uy(n.commands[0])?0:1,r=t.segments.length-1+i;return Mee(t,r,n.numberOfDoubleDots)}function Mee(n,e,t){let i=n,r=e,o=t;for(;o>r;){if(o-=r,i=i.parent,!i)throw new ie(4005,!1);r=i.segments.length}return new qu(i,!1,r-o)}function Dee(n){return Ah(n[0])?n[0].outlets:{[wt]:n}}function JL(n,e,t){if(n??=new en([],{}),n.segments.length===0&&n.hasChildren())return Sh(n,e,t);let i=Oee(n,e,t),r=t.slice(i.commandIndex);if(i.match&&i.pathIndexo!==wt)&&n.children[wt]&&n.numberOfChildren===1&&n.children[wt].segments.length===0){let o=Sh(n.children[wt],e,t);return new en(n.segments,o.children)}return Object.entries(i).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=JL(n.children[o],e,s))}),Object.entries(n.children).forEach(([o,s])=>{i[o]===void 0&&(r[o]=s)}),new en(n.segments,r)}}function Oee(n,e,t){let i=0,r=e,o={match:!1,pathIndex:0,commandIndex:0};for(;r=t.length)return o;let s=n.segments[r],a=t[i];if(Ah(a))break;let l=`${a}`,c=i0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!kL(l,c,s))return o;i+=2}else{if(!kL(l,{},s))return o;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}function Mx(n,e,t){let i=n.segments.slice(0,e),r=0;for(;r{typeof i=="string"&&(i=[i]),i!==null&&(e[t]=Mx(new en([],{}),0,i))}),e}function AL(n){let e={};return Object.entries(n).forEach(([t,i])=>e[t]=`${i}`),e}function kL(n,e,t){return n==t.path&&rs(e,t.parameters)}var Mh="imperative",ai=function(n){return n[n.NavigationStart=0]="NavigationStart",n[n.NavigationEnd=1]="NavigationEnd",n[n.NavigationCancel=2]="NavigationCancel",n[n.NavigationError=3]="NavigationError",n[n.RoutesRecognized=4]="RoutesRecognized",n[n.ResolveStart=5]="ResolveStart",n[n.ResolveEnd=6]="ResolveEnd",n[n.GuardsCheckStart=7]="GuardsCheckStart",n[n.GuardsCheckEnd=8]="GuardsCheckEnd",n[n.RouteConfigLoadStart=9]="RouteConfigLoadStart",n[n.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",n[n.ChildActivationStart=11]="ChildActivationStart",n[n.ChildActivationEnd=12]="ChildActivationEnd",n[n.ActivationStart=13]="ActivationStart",n[n.ActivationEnd=14]="ActivationEnd",n[n.Scroll=15]="Scroll",n[n.NavigationSkipped=16]="NavigationSkipped",n}(ai||{}),zr=class{constructor(e,t){this.id=e,this.url=t}},Ju=class extends zr{constructor(e,t,i="imperative",r=null){super(e,t),this.type=ai.NavigationStart,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Hs=class extends zr{constructor(e,t,i){super(e,t),this.urlAfterRedirects=i,this.type=ai.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},_r=function(n){return n[n.Redirect=0]="Redirect",n[n.SupersededByNewNavigation=1]="SupersededByNewNavigation",n[n.NoDataFromResolver=2]="NoDataFromResolver",n[n.GuardRejected=3]="GuardRejected",n}(_r||{}),py=function(n){return n[n.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",n[n.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",n}(py||{}),zs=class extends zr{constructor(e,t,i,r){super(e,t),this.reason=i,this.code=r,this.type=ai.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},Ga=class extends zr{constructor(e,t,i,r){super(e,t),this.reason=i,this.code=r,this.type=ai.NavigationSkipped}},kh=class extends zr{constructor(e,t,i,r){super(e,t),this.error=i,this.target=r,this.type=ai.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},hy=class extends zr{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=ai.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Dx=class extends zr{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=ai.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ox=class extends zr{constructor(e,t,i,r,o){super(e,t),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=o,this.type=ai.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Ax=class extends zr{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=ai.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},kx=class extends zr{constructor(e,t,i,r){super(e,t),this.urlAfterRedirects=i,this.state=r,this.type=ai.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Nx=class{constructor(e){this.route=e,this.type=ai.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},Lx=class{constructor(e){this.route=e,this.type=ai.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Px=class{constructor(e){this.snapshot=e,this.type=ai.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Rx=class{constructor(e){this.snapshot=e,this.type=ai.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Fx=class{constructor(e){this.snapshot=e,this.type=ai.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},jx=class{constructor(e){this.snapshot=e,this.type=ai.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},fy=class{constructor(e,t,i){this.routerEvent=e,this.position=t,this.anchor=i,this.type=ai.Scroll}toString(){let e=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${e}')`}},Nh=class{},Xu=class{constructor(e,t){this.url=e,this.navigationBehaviorOptions=t}};function kee(n,e){return n.providers&&!n._injector&&(n._injector=$g(n.providers,e,`Route: ${n.path}`)),n._injector??e}function go(n){return n.outlet||wt}function Nee(n,e){let t=n.filter(i=>go(i)===e);return t.push(...n.filter(i=>go(i)!==e)),t}function Bh(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let e=n.parent;e;e=e.parent){let t=e.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}var Vx=class{get injector(){return Bh(this.route?.snapshot)??this.rootInjector}set injector(e){}constructor(e){this.rootInjector=e,this.outlet=null,this.route=null,this.children=new zh(this.rootInjector),this.attachRef=null}},zh=(()=>{let e=class e{constructor(i){this.rootInjector=i,this.contexts=new Map}onChildOutletCreated(i,r){let o=this.getOrCreateContext(i);o.outlet=r,this.contexts.set(i,o)}onChildOutletDestroyed(i){let r=this.getContext(i);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let i=this.contexts;return this.contexts=new Map,i}onOutletReAttached(i){this.contexts=i}getOrCreateContext(i){let r=this.getContext(i);return r||(r=new Vx(this.rootInjector),this.contexts.set(i,r)),r}getContext(i){return this.contexts.get(i)||null}};e.\u0275fac=function(r){return new(r||e)(re(pi))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})(),my=class{constructor(e){this._root=e}get root(){return this._root.value}parent(e){let t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){let t=Bx(e,this._root);return t?t.children.map(i=>i.value):[]}firstChild(e){let t=Bx(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){let t=zx(e,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return zx(e,this._root).map(t=>t.value)}};function Bx(n,e){if(n===e.value)return e;for(let t of e.children){let i=Bx(n,t);if(i)return i}return null}function zx(n,e){if(n===e.value)return[e];for(let t of e.children){let i=zx(n,t);if(i.length)return i.unshift(e),i}return[]}var yr=class{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}};function Gu(n){let e={};return n&&n.children.forEach(t=>e[t.value.outlet]=t),e}var gy=class extends my{constructor(e,t){super(e),this.snapshot=t,Yx(this,e)}toString(){return this.snapshot.toString()}};function XL(n){let e=Lee(n),t=new Fn([new tc("",{})]),i=new Fn({}),r=new Fn({}),o=new Fn({}),s=new Fn(""),a=new ed(t,i,o,s,r,wt,n,e.root);return a.snapshot=e.root,new gy(new yr(a,[]),e)}function Lee(n){let e={},t={},i={},r="",o=new Qu([],e,i,r,t,wt,n,null,{});return new _y("",new yr(o,[]))}var ed=class{constructor(e,t,i,r,o,s,a,l){this.urlSubject=e,this.paramsSubject=t,this.queryParamsSubject=i,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(Ie(c=>c[jh]))??ke(void 0),this.url=e,this.params=t,this.queryParams=i,this.fragment=r,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Ie(e=>Yu(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Ie(e=>Yu(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function yy(n,e,t="emptyOnly"){let i,{routeConfig:r}=n;return e!==null&&(t==="always"||r?.path===""||!e.component&&!e.routeConfig?.loadComponent)?i={params:I(I({},e.params),n.params),data:I(I({},e.data),n.data),resolve:I(I(I(I({},n.data),e.data),r?.data),n._resolvedData)}:i={params:I({},n.params),data:I({},n.data),resolve:I(I({},n.data),n._resolvedData??{})},r&&t4(r)&&(i.resolve[jh]=r.title),i}var Qu=class{get title(){return this.data?.[jh]}constructor(e,t,i,r,o,s,a,l,c){this.url=e,this.params=t,this.queryParams=i,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Yu(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Yu(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(i=>i.toString()).join("/"),t=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${t}')`}},_y=class extends my{constructor(e,t){super(t),this.url=e,Yx(this,t)}toString(){return e4(this._root)}};function Yx(n,e){e.value._routerState=n,e.children.forEach(t=>Yx(n,t))}function e4(n){let e=n.children.length>0?` { ${n.children.map(e4).join(", ")} } `:"";return`${n.value}${e}`}function wx(n){if(n.snapshot){let e=n.snapshot,t=n._futureSnapshot;n.snapshot=t,rs(e.queryParams,t.queryParams)||n.queryParamsSubject.next(t.queryParams),e.fragment!==t.fragment&&n.fragmentSubject.next(t.fragment),rs(e.params,t.params)||n.paramsSubject.next(t.params),aee(e.url,t.url)||n.urlSubject.next(t.url),rs(e.data,t.data)||n.dataSubject.next(t.data)}else n.snapshot=n._futureSnapshot,n.dataSubject.next(n._futureSnapshot.data)}function Ux(n,e){let t=rs(n.params,e.params)&&dee(n.url,e.url),i=!n.parent!=!e.parent;return t&&!i&&(!n.parent||Ux(n.parent,e.parent))}function t4(n){return typeof n.title=="string"||n.title===null}var Pee=(()=>{let e=class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=wt,this.activateEvents=new j,this.deactivateEvents=new j,this.attachEvents=new j,this.detachEvents=new j,this.parentContexts=B(zh),this.location=B(Un),this.changeDetector=B(De),this.inputBinder=B(Iy,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(i){if(i.name){let{firstChange:r,previousValue:o}=i.name;if(r)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(i){return this.parentContexts.getContext(i)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let i=this.parentContexts.getContext(this.name);i?.route&&(i.attachRef?this.attach(i.attachRef,i.route):this.activateWith(i.route,i.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new ie(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new ie(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new ie(4012,!1);this.location.detach();let i=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(i.instance),i}attach(i,r){this.activated=i,this._activatedRoute=r,this.location.insert(i.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(i.instance)}deactivate(){if(this.activated){let i=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(i)}}activateWith(i,r){if(this.isActivated)throw new ie(4013,!1);this._activatedRoute=i;let o=this.location,a=i.snapshot.component,l=this.parentContexts.getOrCreateContext(this.name).children,c=new Hx(i,l,o.injector);this.activated=o.createComponent(a,{index:o.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=gt({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[Jt]});let n=e;return n})(),Hx=class n{__ngOutletInjector(e){return new n(this.route,this.childContexts,e)}constructor(e,t,i){this.route=e,this.childContexts=t,this.parent=i}get(e,t){return e===ed?this.route:e===zh?this.childContexts:this.parent.get(e,t)}},Iy=new be(""),NL=(()=>{let e=class e{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(i){this.unsubscribeFromRouteData(i),this.subscribeToRouteData(i)}unsubscribeFromRouteData(i){this.outletDataSubscriptions.get(i)?.unsubscribe(),this.outletDataSubscriptions.delete(i)}subscribeToRouteData(i){let{activatedRoute:r}=i,o=xs([r.queryParams,r.params,r.data]).pipe(Zt(([s,a,l],c)=>(l=I(I(I({},s),a),l),c===0?ke(l):Promise.resolve(l)))).subscribe(s=>{if(!i.isActivated||!i.activatedComponentRef||i.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(i);return}let a=xk(r.component);if(!a){this.unsubscribeFromRouteData(i);return}for(let{templateName:l}of a.inputs)i.activatedComponentRef.setInput(l,s[l])});this.outletDataSubscriptions.set(i,o)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();function Ree(n,e,t){let i=Lh(n,e._root,t?t._root:void 0);return new gy(i,e)}function Lh(n,e,t){if(t&&n.shouldReuseRoute(e.value,t.value.snapshot)){let i=t.value;i._futureSnapshot=e.value;let r=Fee(n,e,t);return new yr(i,r)}else{if(n.shouldAttach(e.value)){let o=n.retrieve(e.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>Lh(n,a)),s}}let i=jee(e.value),r=e.children.map(o=>Lh(n,o));return new yr(i,r)}}function Fee(n,e,t){return e.children.map(i=>{for(let r of t.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Lh(n,i,r);return Lh(n,i)})}function jee(n){return new ed(new Fn(n.url),new Fn(n.params),new Fn(n.queryParams),new Fn(n.fragment),new Fn(n.data),n.outlet,n.component,n)}var Ph=class{constructor(e,t){this.redirectTo=e,this.navigationBehaviorOptions=t}},n4="ngNavigationCancelingError";function vy(n,e){let{redirectTo:t,navigationBehaviorOptions:i}=Oh(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=i4(!1,_r.Redirect);return r.url=t,r.navigationBehaviorOptions=i,r}function i4(n,e){let t=new Error(`NavigationCancelingError: ${n||""}`);return t[n4]=!0,t.cancellationCode=e,t}function Vee(n){return r4(n)&&Oh(n.url)}function r4(n){return!!n&&n[n4]}var Bee=(n,e,t,i)=>Ie(r=>(new $x(e,r.targetRouterState,r.currentRouterState,t,i).activate(n),r)),$x=class{constructor(e,t,i,r,o){this.routeReuseStrategy=e,this.futureState=t,this.currState=i,this.forwardEvent=r,this.inputBindingEnabled=o}activate(e){let t=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,i,e),wx(this.futureState.root),this.activateChildRoutes(t,i,e)}deactivateChildRoutes(e,t,i){let r=Gu(t);e.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],i),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,i)})}deactivateRoutes(e,t,i){let r=e.value,o=t?t.value:null;if(r===o)if(r.component){let s=i.getContext(r.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,i);else o&&this.deactivateRouteAndItsChildren(t,i)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){let i=t.getContext(e.value.outlet),r=i&&e.value.component?i.children:t,o=Gu(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(i&&i.outlet){let s=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){let i=t.getContext(e.value.outlet),r=i&&e.value.component?i.children:t,o=Gu(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(e,t,i){let r=Gu(t);e.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],i),this.forwardEvent(new jx(o.value.snapshot))}),e.children.length&&this.forwardEvent(new Rx(e.value.snapshot))}activateRoutes(e,t,i){let r=e.value,o=t?t.value:null;if(wx(r),r===o)if(r.component){let s=i.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,i);else if(r.component){let s=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),wx(a.route.value),this.activateChildRoutes(e,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(e,null,s.children)}else this.activateChildRoutes(e,null,i)}},by=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},Ku=class{constructor(e,t){this.component=e,this.route=t}};function zee(n,e,t){let i=n._root,r=e?e._root:null;return Th(i,r,t,[i.value])}function Uee(n){let e=n.routeConfig?n.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:n,guards:e}}function nd(n,e){let t=Symbol(),i=e.get(n,t);return i===t?typeof n=="function"&&!D2(n)?n:e.get(n):i}function Th(n,e,t,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=Gu(e);return n.children.forEach(s=>{Hee(s,o[s.value.outlet],t,i.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Dh(a,t.getContext(s),r)),r}function Hee(n,e,t,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=n.value,s=e?e.value:null,a=t?t.getContext(n.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let l=$ee(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new by(i)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?Th(n,e,a?a.children:null,i,r):Th(n,e,t,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Ku(a.outlet.component,s))}else s&&Dh(e,a,r),r.canActivateChecks.push(new by(i)),o.component?Th(n,null,a?a.children:null,i,r):Th(n,null,t,i,r);return r}function $ee(n,e,t){if(typeof t=="function")return t(n,e);switch(t){case"pathParamsChange":return!nc(n.url,e.url);case"pathParamsOrQueryParamsChange":return!nc(n.url,e.url)||!rs(n.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Ux(n,e)||!rs(n.queryParams,e.queryParams);case"paramsChange":default:return!Ux(n,e)}}function Dh(n,e,t){let i=Gu(n),r=n.value;Object.entries(i).forEach(([o,s])=>{r.component?e?Dh(s,e.children.getContext(o),t):Dh(s,null,t):Dh(s,e,t)}),r.component?e&&e.outlet&&e.outlet.isActivated?t.canDeactivateChecks.push(new Ku(e.outlet.component,r)):t.canDeactivateChecks.push(new Ku(null,r)):t.canDeactivateChecks.push(new Ku(null,r))}function Uh(n){return typeof n=="function"}function Wee(n){return typeof n=="boolean"}function Gee(n){return n&&Uh(n.canLoad)}function qee(n){return n&&Uh(n.canActivate)}function Qee(n){return n&&Uh(n.canActivateChild)}function Kee(n){return n&&Uh(n.canDeactivate)}function Yee(n){return n&&Uh(n.canMatch)}function o4(n){return n instanceof Is||n?.name==="EmptyError"}var sy=Symbol("INITIAL_VALUE");function td(){return Zt(n=>xs(n.map(e=>e.pipe(xt(1),fp(sy)))).pipe(Ie(e=>{for(let t of e)if(t!==!0){if(t===sy)return sy;if(t===!1||Zee(t))return t}return!0}),rn(e=>e!==sy),xt(1)))}function Zee(n){return Oh(n)||n instanceof Ph}function Jee(n,e){return Jn(t=>{let{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=t;return s.length===0&&o.length===0?ke(R(I({},t),{guardsResult:!0})):Xee(s,i,r,n).pipe(Jn(a=>a&&Wee(a)?ete(i,o,n,e):ke(a)),Ie(a=>R(I({},t),{guardsResult:a})))})}function Xee(n,e,t,i){return Yt(n).pipe(Jn(r=>ote(r.component,r.route,t,e,i)),Lo(r=>r!==!0,!0))}function ete(n,e,t,i){return Yt(e).pipe(lo(r=>Kc(nte(r.route.parent,i),tte(r.route,i),rte(n,r.path,t),ite(n,r.route,t))),Lo(r=>r!==!0,!0))}function tte(n,e){return n!==null&&e&&e(new Fx(n)),ke(!0)}function nte(n,e){return n!==null&&e&&e(new Px(n)),ke(!0)}function ite(n,e,t){let i=e.routeConfig?e.routeConfig.canActivate:null;if(!i||i.length===0)return ke(!0);let r=i.map(o=>xm(()=>{let s=Bh(e)??t,a=nd(o,s),l=qee(a)?a.canActivate(e,n):Sr(s,()=>a(e,n));return qa(l).pipe(Lo())}));return ke(r).pipe(td())}function rte(n,e,t){let i=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>Uee(s)).filter(s=>s!==null).map(s=>xm(()=>{let a=s.guards.map(l=>{let c=Bh(s.node)??t,u=nd(l,c),d=Qee(u)?u.canActivateChild(i,n):Sr(c,()=>u(i,n));return qa(d).pipe(Lo())});return ke(a).pipe(td())}));return ke(o).pipe(td())}function ote(n,e,t,i,r){let o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||o.length===0)return ke(!0);let s=o.map(a=>{let l=Bh(e)??r,c=nd(a,l),u=Kee(c)?c.canDeactivate(n,e,t,i):Sr(l,()=>c(n,e,t,i));return qa(u).pipe(Lo())});return ke(s).pipe(td())}function ste(n,e,t,i){let r=e.canLoad;if(r===void 0||r.length===0)return ke(!0);let o=r.map(s=>{let a=nd(s,n),l=Gee(a)?a.canLoad(e,t):Sr(n,()=>a(e,t));return qa(l)});return ke(o).pipe(td(),s4(i))}function s4(n){return rp(jt(e=>{if(typeof e!="boolean")throw vy(n,e)}),Ie(e=>e===!0))}function ate(n,e,t,i){let r=e.canMatch;if(!r||r.length===0)return ke(!0);let o=r.map(s=>{let a=nd(s,n),l=Yee(a)?a.canMatch(e,t):Sr(n,()=>a(e,t));return qa(l)});return ke(o).pipe(td(),s4(i))}var Rh=class{constructor(e){this.segmentGroup=e||null}},Fh=class extends Error{constructor(e){super(),this.urlTree=e}};function Wu(n){return Zn(new Rh(n))}function lte(n){return Zn(new ie(4e3,!1))}function cte(n){return Zn(i4(!1,_r.GuardRejected))}var Wx=class{constructor(e,t){this.urlSerializer=e,this.urlTree=t}lineralizeSegments(e,t){let i=[],r=t.root;for(;;){if(i=i.concat(r.segments),r.numberOfChildren===0)return ke(i);if(r.numberOfChildren>1||!r.children[wt])return lte(`${e.redirectTo}`);r=r.children[wt]}}applyRedirectCommands(e,t,i,r,o){if(typeof t!="string"){let a=t,{queryParams:l,fragment:c,routeConfig:u,url:d,outlet:p,params:h,data:g,title:_}=r,v=Sr(o,()=>a({params:h,data:g,queryParams:l,fragment:c,routeConfig:u,url:d,outlet:p,title:_}));if(v instanceof Us)throw new Fh(v);t=v}let s=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),e,i);if(t[0]==="/")throw new Fh(s);return s}applyRedirectCreateUrlTree(e,t,i,r){let o=this.createSegmentGroup(e,t.root,i,r);return new Us(o,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){let i={};return Object.entries(e).forEach(([r,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);i[r]=t[a]}else i[r]=o}),i}createSegmentGroup(e,t,i,r){let o=this.createSegments(e,t.segments,i,r),s={};return Object.entries(t.children).forEach(([a,l])=>{s[a]=this.createSegmentGroup(e,l,i,r)}),new en(o,s)}createSegments(e,t,i,r){return t.map(o=>o.path[0]===":"?this.findPosParam(e,o,r):this.findOrReturn(o,i))}findPosParam(e,t,i){let r=i[t.path.substring(1)];if(!r)throw new ie(4001,!1);return r}findOrReturn(e,t){let i=0;for(let r of t){if(r.path===e.path)return t.splice(i),r;i++}return e}},Gx={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function ute(n,e,t,i,r){let o=a4(n,e,t);return o.matched?(i=kee(e,i),ate(i,e,t,r).pipe(Ie(s=>s===!0?o:I({},Gx)))):ke(o)}function a4(n,e,t){if(e.path==="**")return dte(t);if(e.path==="")return e.pathMatch==="full"&&(n.hasChildren()||t.length>0)?I({},Gx):{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};let r=(e.matcher||see)(t,n,e);if(!r)return I({},Gx);let o={};Object.entries(r.posParams??{}).forEach(([a,l])=>{o[a]=l.path});let s=r.consumed.length>0?I(I({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function dte(n){return{matched:!0,parameters:n.length>0?BL(n).parameters:{},consumedSegments:n,remainingSegments:[],positionalParamSegments:{}}}function LL(n,e,t,i){return t.length>0&&fte(n,t,i)?{segmentGroup:new en(e,hte(i,new en(t,n.children))),slicedSegments:[]}:t.length===0&&mte(n,t,i)?{segmentGroup:new en(n.segments,pte(n,t,i,n.children)),slicedSegments:t}:{segmentGroup:new en(n.segments,n.children),slicedSegments:t}}function pte(n,e,t,i){let r={};for(let o of t)if(xy(n,e,o)&&!i[go(o)]){let s=new en([],{});r[go(o)]=s}return I(I({},i),r)}function hte(n,e){let t={};t[wt]=e;for(let i of n)if(i.path===""&&go(i)!==wt){let r=new en([],{});t[go(i)]=r}return t}function fte(n,e,t){return t.some(i=>xy(n,e,i)&&go(i)!==wt)}function mte(n,e,t){return t.some(i=>xy(n,e,i))}function xy(n,e,t){return(n.hasChildren()||e.length>0)&&t.pathMatch==="full"?!1:t.path===""}function gte(n,e,t){return e.length===0&&!n.children[t]}var qx=class{};function yte(n,e,t,i,r,o,s="emptyOnly"){return new Qx(n,e,t,i,r,s,o).recognize()}var _te=31,Qx=class{constructor(e,t,i,r,o,s,a){this.injector=e,this.configLoader=t,this.rootComponentType=i,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Wx(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new ie(4002,`'${e.segmentGroup}'`)}recognize(){let e=LL(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(Ie(({children:t,rootSnapshot:i})=>{let r=new yr(i,t),o=new _y("",r),s=Tee(i,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(e){let t=new Qu([],Object.freeze({}),Object.freeze(I({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),wt,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,wt,t).pipe(Ie(i=>({children:i,rootSnapshot:t})),Nn(i=>{if(i instanceof Fh)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof Rh?this.noMatchError(i):i}))}processSegmentGroup(e,t,i,r,o){return i.segments.length===0&&i.hasChildren()?this.processChildren(e,t,i,o):this.processSegment(e,t,i,i.segments,r,!0,o).pipe(Ie(s=>s instanceof yr?[s]:[]))}processChildren(e,t,i,r){let o=[];for(let s of Object.keys(i.children))s==="primary"?o.unshift(s):o.push(s);return Yt(o).pipe(lo(s=>{let a=i.children[s],l=Nee(t,s);return this.processSegmentGroup(e,l,a,s,r)}),e1((s,a)=>(s.push(...a),s)),fa(null),Qb(),Jn(s=>{if(s===null)return Wu(i);let a=l4(s);return vte(a),ke(a)}))}processSegment(e,t,i,r,o,s,a){return Yt(t).pipe(lo(l=>this.processSegmentAgainstRoute(l._injector??e,t,l,i,r,o,s,a).pipe(Nn(c=>{if(c instanceof Rh)return ke(null);throw c}))),Lo(l=>!!l),Nn(l=>{if(o4(l))return gte(i,r,o)?ke(new qx):Wu(i);throw l}))}processSegmentAgainstRoute(e,t,i,r,o,s,a,l){return go(i)!==s&&(s===wt||!xy(r,o,i))?Wu(r):i.redirectTo===void 0?this.matchSegmentAgainstRoute(e,r,i,o,s,l):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,r,t,i,o,s,l):Wu(r)}expandSegmentAgainstRouteUsingRedirect(e,t,i,r,o,s,a){let{matched:l,parameters:c,consumedSegments:u,positionalParamSegments:d,remainingSegments:p}=a4(t,r,o);if(!l)return Wu(t);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>_te&&(this.allowRedirects=!1));let h=new Qu(o,c,Object.freeze(I({},this.urlTree.queryParams)),this.urlTree.fragment,PL(r),go(r),r.component??r._loadedComponent??null,r,RL(r)),g=yy(h,a,this.paramsInheritanceStrategy);h.params=Object.freeze(g.params),h.data=Object.freeze(g.data);let _=this.applyRedirects.applyRedirectCommands(u,r.redirectTo,d,h,e);return this.applyRedirects.lineralizeSegments(r,_).pipe(Jn(v=>this.processSegment(e,i,t,v.concat(p),s,!1,a)))}matchSegmentAgainstRoute(e,t,i,r,o,s){let a=ute(t,i,r,e,this.urlSerializer);return i.path==="**"&&(t.children={}),a.pipe(Zt(l=>l.matched?(e=i._injector??e,this.getChildConfig(e,i,r).pipe(Zt(({routes:c})=>{let u=i._loadedInjector??e,{parameters:d,consumedSegments:p,remainingSegments:h}=l,g=new Qu(p,d,Object.freeze(I({},this.urlTree.queryParams)),this.urlTree.fragment,PL(i),go(i),i.component??i._loadedComponent??null,i,RL(i)),_=yy(g,s,this.paramsInheritanceStrategy);g.params=Object.freeze(_.params),g.data=Object.freeze(_.data);let{segmentGroup:v,slicedSegments:w}=LL(t,p,h,c);if(w.length===0&&v.hasChildren())return this.processChildren(u,c,v,g).pipe(Ie(L=>new yr(g,L)));if(c.length===0&&w.length===0)return ke(new yr(g,[]));let S=go(i)===o;return this.processSegment(u,c,v,w,S?wt:o,!0,g).pipe(Ie(L=>new yr(g,L instanceof yr?[L]:[])))}))):Wu(t)))}getChildConfig(e,t,i){return t.children?ke({routes:t.children,injector:e}):t.loadChildren?t._loadedRoutes!==void 0?ke({routes:t._loadedRoutes,injector:t._loadedInjector}):ste(e,t,i,this.urlSerializer).pipe(Jn(r=>r?this.configLoader.loadChildren(e,t).pipe(jt(o=>{t._loadedRoutes=o.routes,t._loadedInjector=o.injector})):cte(t))):ke({routes:[],injector:e})}};function vte(n){n.sort((e,t)=>e.value.outlet===wt?-1:t.value.outlet===wt?1:e.value.outlet.localeCompare(t.value.outlet))}function bte(n){let e=n.value.routeConfig;return e&&e.path===""}function l4(n){let e=[],t=new Set;for(let i of n){if(!bte(i)){e.push(i);continue}let r=e.find(o=>i.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...i.children),t.add(r)):e.push(i)}for(let i of t){let r=l4(i.children);e.push(new yr(i.value,r))}return e.filter(i=>!t.has(i))}function PL(n){return n.data||{}}function RL(n){return n.resolve||{}}function Cte(n,e,t,i,r,o){return Jn(s=>yte(n,e,t,i,s.extractedUrl,r,o).pipe(Ie(({state:a,tree:l})=>R(I({},s),{targetSnapshot:a,urlAfterRedirects:l}))))}function wte(n,e){return Jn(t=>{let{targetSnapshot:i,guards:{canActivateChecks:r}}=t;if(!r.length)return ke(t);let o=new Set(r.map(l=>l.route)),s=new Set;for(let l of o)if(!s.has(l))for(let c of c4(l))s.add(c);let a=0;return Yt(s).pipe(lo(l=>o.has(l)?Ite(l,i,n,e):(l.data=yy(l,l.parent,n).resolve,ke(void 0))),jt(()=>a++),Yc(1),Jn(l=>a===s.size?ke(t):vi))})}function c4(n){let e=n.children.map(t=>c4(t)).flat();return[n,...e]}function Ite(n,e,t,i){let r=n.routeConfig,o=n._resolve;return r?.title!==void 0&&!t4(r)&&(o[jh]=r.title),xte(o,n,e,i).pipe(Ie(s=>(n._resolvedData=s,n.data=yy(n,n.parent,t).resolve,null)))}function xte(n,e,t,i){let r=Tx(n);if(r.length===0)return ke({});let o={};return Yt(r).pipe(Jn(s=>Tte(n[s],e,t,i).pipe(Lo(),jt(a=>{if(a instanceof Ph)throw vy(new Zu,a);o[s]=a}))),Yc(1),Zb(o),Nn(s=>o4(s)?vi:Zn(s)))}function Tte(n,e,t,i){let r=Bh(e)??i,o=nd(n,r),s=o.resolve?o.resolve(e,t):Sr(r,()=>o(e,t));return qa(s)}function Ix(n){return Zt(e=>{let t=n(e);return t?Yt(t).pipe(Ie(()=>e)):ke(e)})}var u4=(()=>{let e=class e{buildTitle(i){let r,o=i.root;for(;o!==void 0;)r=this.getResolvedTitleForRoute(o)??r,o=o.children.find(s=>s.outlet===wt);return r}getResolvedTitleForRoute(i){return i.data[jh]}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:()=>B(Ete),providedIn:"root"});let n=e;return n})(),Ete=(()=>{let e=class e extends u4{constructor(i){super(),this.title=i}updateTitle(i){let r=this.buildTitle(i);r!==void 0&&this.title.setTitle(r)}};e.\u0275fac=function(r){return new(r||e)(re(oN))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})(),Hh=new be("",{providedIn:"root",factory:()=>({})}),Ste=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["ng-component"]],standalone:!0,features:[ue],decls:1,vars:0,template:function(r,o){r&1&&E(0,"router-outlet")},dependencies:[Pee],encapsulation:2});let n=e;return n})();function Zx(n){let e=n.children&&n.children.map(Zx),t=e?R(I({},n),{children:e}):I({},n);return!t.component&&!t.loadComponent&&(e||t.loadChildren)&&t.outlet&&t.outlet!==wt&&(t.component=Ste),t}var Cy=new be(""),Jx=(()=>{let e=class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=B(Yg)}loadComponent(i){if(this.componentLoaders.get(i))return this.componentLoaders.get(i);if(i._loadedComponent)return ke(i._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(i);let r=qa(i.loadComponent()).pipe(Ie(d4),jt(s=>{this.onLoadEndListener&&this.onLoadEndListener(i),i._loadedComponent=s}),Tr(()=>{this.componentLoaders.delete(i)})),o=new wl(r,()=>new pe).pipe($c());return this.componentLoaders.set(i,o),o}loadChildren(i,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return ke({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let s=Mte(r,this.compiler,i,this.onLoadEndListener).pipe(Tr(()=>{this.childrenLoaders.delete(r)})),a=new wl(s,()=>new pe).pipe($c());return this.childrenLoaders.set(r,a),a}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();function Mte(n,e,t,i){return qa(n.loadChildren()).pipe(Ie(d4),Jn(r=>r instanceof xp||Array.isArray(r)?ke(r):Yt(e.compileModuleAsync(r))),Ie(r=>{i&&i(n);let o,s,a=!1;return Array.isArray(r)?(s=r,a=!0):(o=r.create(t).injector,s=o.get(Cy,[],{optional:!0,self:!0}).flat()),{routes:s.map(Zx),injector:o}}))}function Dte(n){return n&&typeof n=="object"&&"default"in n}function d4(n){return Dte(n)?n.default:n}var Xx=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:()=>B(Ote),providedIn:"root"});let n=e;return n})(),Ote=(()=>{let e=class e{shouldProcessUrl(i){return!0}extract(i){return i}merge(i,r){return i}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})(),p4=new be(""),h4=new be("");function Ate(n,e,t){let i=n.get(h4),r=n.get(We);return n.get(He).runOutsideAngular(()=>{if(!r.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(c=>setTimeout(c));let o,s=new Promise(c=>{o=c}),a=r.startViewTransition(()=>(o(),kte(n))),{onViewTransitionCreated:l}=i;return l&&Sr(n,()=>l({transition:a,from:e,to:t})),s})}function kte(n){return new Promise(e=>{Rp({read:()=>setTimeout(e)},{injector:n})})}var Nte=new be(""),eT=(()=>{let e=class e{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new pe,this.transitionAbortSubject=new pe,this.configLoader=B(Jx),this.environmentInjector=B(pi),this.urlSerializer=B(Vh),this.rootContexts=B(zh),this.location=B(Su),this.inputBindingEnabled=B(Iy,{optional:!0})!==null,this.titleStrategy=B(u4),this.options=B(Hh,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=B(Xx),this.createViewTransition=B(p4,{optional:!0}),this.navigationErrorHandler=B(Nte,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>ke(void 0),this.rootComponentType=null;let i=o=>this.events.next(new Nx(o)),r=o=>this.events.next(new Lx(o));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=i}complete(){this.transitions?.complete()}handleNavigationRequest(i){let r=++this.navigationId;this.transitions?.next(R(I(I({},this.transitions.value),i),{id:r}))}setupNavigations(i,r,o){return this.transitions=new Fn({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:Mh,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(rn(s=>s.id!==0),Ie(s=>R(I({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),Zt(s=>{let a=!1,l=!1;return ke(s).pipe(Zt(c=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",_r.SupersededByNewNavigation),vi;this.currentTransition=s,this.currentNavigation={id:c.id,initialUrl:c.rawUrl,extractedUrl:c.extractedUrl,targetBrowserUrl:typeof c.extras.browserUrl=="string"?this.urlSerializer.parse(c.extras.browserUrl):c.extras.browserUrl,trigger:c.source,extras:c.extras,previousNavigation:this.lastSuccessfulNavigation?R(I({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let u=!i.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=c.extras.onSameUrlNavigation??i.onSameUrlNavigation;if(!u&&d!=="reload"){let p="";return this.events.next(new Ga(c.id,this.urlSerializer.serialize(c.rawUrl),p,py.IgnoredSameUrlNavigation)),c.resolve(!1),vi}if(this.urlHandlingStrategy.shouldProcessUrl(c.rawUrl))return ke(c).pipe(Zt(p=>{let h=this.transitions?.getValue();return this.events.next(new Ju(p.id,this.urlSerializer.serialize(p.extractedUrl),p.source,p.restoredState)),h!==this.transitions?.getValue()?vi:Promise.resolve(p)}),Cte(this.environmentInjector,this.configLoader,this.rootComponentType,i.config,this.urlSerializer,this.paramsInheritanceStrategy),jt(p=>{s.targetSnapshot=p.targetSnapshot,s.urlAfterRedirects=p.urlAfterRedirects,this.currentNavigation=R(I({},this.currentNavigation),{finalUrl:p.urlAfterRedirects});let h=new hy(p.id,this.urlSerializer.serialize(p.extractedUrl),this.urlSerializer.serialize(p.urlAfterRedirects),p.targetSnapshot);this.events.next(h)}));if(u&&this.urlHandlingStrategy.shouldProcessUrl(c.currentRawUrl)){let{id:p,extractedUrl:h,source:g,restoredState:_,extras:v}=c,w=new Ju(p,this.urlSerializer.serialize(h),g,_);this.events.next(w);let S=XL(this.rootComponentType).snapshot;return this.currentTransition=s=R(I({},c),{targetSnapshot:S,urlAfterRedirects:h,extras:R(I({},v),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=h,ke(s)}else{let p="";return this.events.next(new Ga(c.id,this.urlSerializer.serialize(c.extractedUrl),p,py.IgnoredByUrlHandlingStrategy)),c.resolve(!1),vi}}),jt(c=>{let u=new Dx(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(u)}),Ie(c=>(this.currentTransition=s=R(I({},c),{guards:zee(c.targetSnapshot,c.currentSnapshot,this.rootContexts)}),s)),Jee(this.environmentInjector,c=>this.events.next(c)),jt(c=>{if(s.guardsResult=c.guardsResult,c.guardsResult&&typeof c.guardsResult!="boolean")throw vy(this.urlSerializer,c.guardsResult);let u=new Ox(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot,!!c.guardsResult);this.events.next(u)}),rn(c=>c.guardsResult?!0:(this.cancelNavigationTransition(c,"",_r.GuardRejected),!1)),Ix(c=>{if(c.guards.canActivateChecks.length)return ke(c).pipe(jt(u=>{let d=new Ax(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}),Zt(u=>{let d=!1;return ke(u).pipe(wte(this.paramsInheritanceStrategy,this.environmentInjector),jt({next:()=>d=!0,complete:()=>{d||this.cancelNavigationTransition(u,"",_r.NoDataFromResolver)}}))}),jt(u=>{let d=new kx(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(d)}))}),Ix(c=>{let u=d=>{let p=[];d.routeConfig?.loadComponent&&!d.routeConfig._loadedComponent&&p.push(this.configLoader.loadComponent(d.routeConfig).pipe(jt(h=>{d.component=h}),Ie(()=>{})));for(let h of d.children)p.push(...u(h));return p};return xs(u(c.targetSnapshot.root)).pipe(fa(null),xt(1))}),Ix(()=>this.afterPreactivation()),Zt(()=>{let{currentSnapshot:c,targetSnapshot:u}=s,d=this.createViewTransition?.(this.environmentInjector,c.root,u.root);return d?Yt(d).pipe(Ie(()=>s)):ke(s)}),Ie(c=>{let u=Ree(i.routeReuseStrategy,c.targetSnapshot,c.currentRouterState);return this.currentTransition=s=R(I({},c),{targetRouterState:u}),this.currentNavigation.targetRouterState=u,s}),jt(()=>{this.events.next(new Nh)}),Bee(this.rootContexts,i.routeReuseStrategy,c=>this.events.next(c),this.inputBindingEnabled),xt(1),jt({next:c=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Hs(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects))),this.titleStrategy?.updateTitle(c.targetRouterState.snapshot),c.resolve(!0)},complete:()=>{a=!0}}),Ft(this.transitionAbortSubject.pipe(jt(c=>{throw c}))),Tr(()=>{!a&&!l&&this.cancelNavigationTransition(s,"",_r.SupersededByNewNavigation),this.currentTransition?.id===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),Nn(c=>{if(l=!0,r4(c))this.events.next(new zs(s.id,this.urlSerializer.serialize(s.extractedUrl),c.message,c.cancellationCode)),Vee(c)?this.events.next(new Xu(c.url,c.navigationBehaviorOptions)):s.resolve(!1);else{let u=new kh(s.id,this.urlSerializer.serialize(s.extractedUrl),c,s.targetSnapshot??void 0);try{let d=Sr(this.environmentInjector,()=>this.navigationErrorHandler?.(u));if(d instanceof Ph){let{message:p,cancellationCode:h}=vy(this.urlSerializer,d);this.events.next(new zs(s.id,this.urlSerializer.serialize(s.extractedUrl),p,h)),this.events.next(new Xu(d.redirectTo,d.navigationBehaviorOptions))}else{this.events.next(u);let p=i.errorHandler(c);s.resolve(!!p)}}catch(d){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(d)}}return vi}))}))}cancelNavigationTransition(i,r,o){let s=new zs(i.id,this.urlSerializer.serialize(i.extractedUrl),r,o);this.events.next(s),i.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let i=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return i.toString()!==r?.toString()&&!this.currentNavigation?.extras.skipLocationChange}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();function Lte(n){return n!==Mh}var Pte=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:()=>B(Rte),providedIn:"root"});let n=e;return n})(),Kx=class{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}},Rte=(()=>{let e=class e extends Kx{};e.\u0275fac=(()=>{let i;return function(o){return(i||(i=Oe(e)))(o||e)}})(),e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})(),f4=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:()=>B(Fte),providedIn:"root"});let n=e;return n})(),Fte=(()=>{let e=class e extends f4{constructor(){super(...arguments),this.location=B(Su),this.urlSerializer=B(Vh),this.options=B(Hh,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=B(Xx),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Us,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=XL(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(i){return this.location.subscribe(r=>{r.type==="popstate"&&i(r.url,r.state)})}handleRouterEvent(i,r){if(i instanceof Ju)this.stateMemento=this.createStateMemento();else if(i instanceof Ga)this.rawUrlTree=r.initialUrl;else if(i instanceof hy){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(r.targetBrowserUrl??o,r)}}else i instanceof Nh?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(r.targetBrowserUrl??this.rawUrlTree,r)):i instanceof zs&&(i.code===_r.GuardRejected||i.code===_r.NoDataFromResolver)?this.restoreHistory(r):i instanceof kh?this.restoreHistory(r,!0):i instanceof Hs&&(this.lastSuccessfulId=i.id,this.currentPageId=this.browserPageId)}setBrowserUrl(i,r){let o=i instanceof Us?this.urlSerializer.serialize(i):i;if(this.location.isCurrentPathEqualTo(o)||r.extras.replaceUrl){let s=this.browserPageId,a=I(I({},r.extras.state),this.generateNgRouterState(r.id,s));this.location.replaceState(o,"",a)}else{let s=I(I({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(o,"",s)}}restoreHistory(i,r=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,s=this.currentPageId-o;s!==0?this.location.historyGo(s):this.currentUrlTree===i.finalUrl&&s===0&&(this.resetState(i),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetState(i),this.resetUrlToCurrentUrlTree())}resetState(i){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,i.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(i,r){return this.canceledNavigationResolution==="computed"?{navigationId:i,\u0275routerPageId:r}:{navigationId:i}}};e.\u0275fac=(()=>{let i;return function(o){return(i||(i=Oe(e)))(o||e)}})(),e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})(),Eh=function(n){return n[n.COMPLETE=0]="COMPLETE",n[n.FAILED=1]="FAILED",n[n.REDIRECTING=2]="REDIRECTING",n}(Eh||{});function m4(n,e){n.events.pipe(rn(t=>t instanceof Hs||t instanceof zs||t instanceof kh||t instanceof Ga),Ie(t=>t instanceof Hs||t instanceof Ga?Eh.COMPLETE:(t instanceof zs?t.code===_r.Redirect||t.code===_r.SupersededByNewNavigation:!1)?Eh.REDIRECTING:Eh.FAILED),rn(t=>t!==Eh.REDIRECTING),xt(1)).subscribe(()=>{e()})}function jte(n){throw n}var Vte={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},Bte={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},ic=(()=>{let e=class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=B(Gg),this.stateManager=B(f4),this.options=B(Hh,{optional:!0})||{},this.pendingTasks=B($o),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=B(eT),this.urlSerializer=B(Vh),this.location=B(Su),this.urlHandlingStrategy=B(Xx),this._events=new pe,this.errorHandler=this.options.errorHandler||jte,this.navigated=!1,this.routeReuseStrategy=B(Pte),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=B(Cy,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!B(Iy,{optional:!0}),this.eventsSubscription=new et,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:i=>{this.console.warn(i)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let i=this.navigationTransitions.events.subscribe(r=>{try{let o=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(o!==null&&s!==null){if(this.stateManager.handleRouterEvent(r,s),r instanceof zs&&r.code!==_r.Redirect&&r.code!==_r.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof Hs)this.navigated=!0;else if(r instanceof Xu){let a=r.navigationBehaviorOptions,l=this.urlHandlingStrategy.merge(r.url,o.currentRawUrl),c=I({browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Lte(o.source)},a);this.scheduleNavigation(l,Mh,null,c,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}Ute(r)&&this._events.next(r)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});this.eventsSubscription.add(i)}resetRootComponentType(i){this.routerState.root.component=i,this.navigationTransitions.rootComponentType=i}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Mh,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((i,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(i,"popstate",r)},0)})}navigateToSyncWithBrowser(i,r,o){let s={replaceUrl:!0},a=o?.navigationId?o:null;if(o){let c=I({},o);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(s.state=c)}let l=this.parseUrl(i);this.scheduleNavigation(l,r,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(i){this.config=i.map(Zx),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(i,r={}){let{relativeTo:o,queryParams:s,fragment:a,queryParamsHandling:l,preserveFragment:c}=r,u=c?this.currentUrlTree.fragment:a,d=null;switch(l??this.options.defaultQueryParamsHandling){case"merge":d=I(I({},this.currentUrlTree.queryParams),s);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}d!==null&&(d=this.removeEmptyProps(d));let p;try{let h=o?o.snapshot:this.routerState.snapshot.root;p=KL(h)}catch{(typeof i[0]!="string"||i[0][0]!=="/")&&(i=[]),p=this.currentUrlTree.root}return YL(p,i,d,u??null)}navigateByUrl(i,r={skipLocationChange:!1}){let o=Oh(i)?i:this.parseUrl(i),s=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(s,Mh,null,r)}navigate(i,r={skipLocationChange:!1}){return zte(i),this.navigateByUrl(this.createUrlTree(i,r),r)}serializeUrl(i){return this.urlSerializer.serialize(i)}parseUrl(i){try{return this.urlSerializer.parse(i)}catch{return this.urlSerializer.parse("/")}}isActive(i,r){let o;if(r===!0?o=I({},Vte):r===!1?o=I({},Bte):o=r,Oh(i))return DL(this.currentUrlTree,i,o);let s=this.parseUrl(i);return DL(this.currentUrlTree,s,o)}removeEmptyProps(i){return Object.entries(i).reduce((r,[o,s])=>(s!=null&&(r[o]=s),r),{})}scheduleNavigation(i,r,o,s,a){if(this.disposed)return Promise.resolve(!1);let l,c,u;a?(l=a.resolve,c=a.reject,u=a.promise):u=new Promise((p,h)=>{l=p,c=h});let d=this.pendingTasks.add();return m4(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:i,extras:s,resolve:l,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(p=>Promise.reject(p))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();function zte(n){for(let e=0;e{let e=class e{constructor(i,r,o,s,a){this.router=i,this.injector=o,this.preloadingStrategy=s,this.loader=a}setUpPreloading(){this.subscription=this.router.events.pipe(rn(i=>i instanceof Hs),lo(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(i,r){let o=[];for(let s of r){s.providers&&!s._injector&&(s._injector=$g(s.providers,i,`Route: ${s.path}`));let a=s._injector??i,l=s._loadedInjector??a;(s.loadChildren&&!s._loadedRoutes&&s.canLoad===void 0||s.loadComponent&&!s._loadedComponent)&&o.push(this.preloadConfig(a,s)),(s.children||s._loadedRoutes)&&o.push(this.processRoutes(l,s.children??s._loadedRoutes))}return Yt(o).pipe(ha())}preloadConfig(i,r){return this.preloadingStrategy.preload(r,()=>{let o;r.loadChildren&&r.canLoad===void 0?o=this.loader.loadChildren(i,r):o=ke(null);let s=o.pipe(Jn(a=>a===null?ke(void 0):(r._loadedRoutes=a.routes,r._loadedInjector=a.injector,this.processRoutes(a.injector??i,a.routes))));if(r.loadComponent&&!r._loadedComponent){let a=this.loader.loadComponent(r);return Yt([s,a]).pipe(ha())}else return s})}};e.\u0275fac=function(r){return new(r||e)(re(ic),re(Yg),re(pi),re(wy),re(Jx))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})(),g4=new be(""),$te=(()=>{let e=class e{constructor(i,r,o,s,a={}){this.urlSerializer=i,this.transitions=r,this.viewportScroller=o,this.zone=s,this.options=a,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},a.scrollPositionRestoration||="disabled",a.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(i=>{i instanceof Ju?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=i.navigationTrigger,this.restoredId=i.restoredState?i.restoredState.navigationId:0):i instanceof Hs?(this.lastId=i.id,this.scheduleScrollEvent(i,this.urlSerializer.parse(i.urlAfterRedirects).fragment)):i instanceof Ga&&i.code===py.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(i,this.urlSerializer.parse(i.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(i=>{i instanceof fy&&(i.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(i.position):i.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(i.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(i,r){this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.zone.run(()=>{this.transitions.events.next(new fy(i,this.lastSource==="popstate"?this.store[this.restoredId]:null,r))})},0)})}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}};e.\u0275fac=function(r){yA()},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();function Wte(n){return n.routerState.root}function $h(n,e){return{\u0275kind:n,\u0275providers:e}}function Gte(){let n=B($t);return e=>{let t=n.get(fi);if(e!==t.components[0])return;let i=n.get(ic),r=n.get(y4);n.get(tT)===1&&i.initialNavigation(),n.get(_4,null,Et.Optional)?.setUpPreloading(),n.get(g4,null,Et.Optional)?.init(),i.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var y4=new be("",{factory:()=>new pe}),tT=new be("",{providedIn:"root",factory:()=>1});function qte(){return $h(2,[{provide:tT,useValue:0},{provide:xu,multi:!0,deps:[$t],useFactory:e=>{let t=e.get(Nk,Promise.resolve());return()=>t.then(()=>new Promise(i=>{let r=e.get(ic),o=e.get(y4);m4(r,()=>{i(!0)}),e.get(eT).afterPreactivation=()=>(i(!0),o.closed?ke(void 0):o),r.initialNavigation()}))}}])}function Qte(){return $h(3,[{provide:xu,multi:!0,useFactory:()=>{let e=B(ic);return()=>{e.setUpLocationChangeListener()}}},{provide:tT,useValue:2}])}var _4=new be("");function Kte(n){return $h(0,[{provide:_4,useExisting:Hte},{provide:wy,useExisting:n}])}function Yte(){return $h(8,[NL,{provide:Iy,useExisting:NL}])}function Zte(n){let e=[{provide:p4,useValue:Ate},{provide:h4,useValue:I({skipNextTransition:!!n?.skipInitialTransition},n)}];return $h(9,e)}var FL=new be("ROUTER_FORROOT_GUARD"),Jte=[Su,{provide:Vh,useClass:Zu},ic,zh,{provide:ed,useFactory:Wte,deps:[ic]},Jx,[]],nT=(()=>{let e=class e{constructor(i){}static forRoot(i,r){return{ngModule:e,providers:[Jte,[],{provide:Cy,multi:!0,useValue:i},{provide:FL,useFactory:nne,deps:[[ic,new Dp,new Cg]]},{provide:Hh,useValue:r||{}},r?.useHash?ene():tne(),Xte(),r?.preloadingStrategy?Kte(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?ine(r):[],r?.bindToComponentInputs?Yte().\u0275providers:[],r?.enableViewTransitions?Zte().\u0275providers:[],rne()]}}static forChild(i){return{ngModule:e,providers:[{provide:Cy,multi:!0,useValue:i}]}}};e.\u0275fac=function(r){return new(r||e)(re(FL,8))},e.\u0275mod=le({type:e}),e.\u0275inj=ae({});let n=e;return n})();function Xte(){return{provide:g4,useFactory:()=>{let n=B(jk),e=B(He),t=B(Hh),i=B(eT),r=B(Vh);return t.scrollOffset&&n.setOffset(t.scrollOffset),new $te(r,i,n,e,t)}}}function ene(){return{provide:zl,useClass:Pk}}function tne(){return{provide:zl,useClass:jw}}function nne(n){return"guarded"}function ine(n){return[n.initialNavigation==="disabled"?Qte().\u0275providers:[],n.initialNavigation==="enabledBlocking"?qte().\u0275providers:[]]}var jL=new be("");function rne(){return[{provide:jL,useFactory:Gte},{provide:Kg,multi:!0,useExisting:jL}]}var Ty=function(n){return n.SHOW_VIDEO_THUMBNAIL="SHOW_VIDEO_THUMBNAIL",n}(Ty||{}),Ey=function(n){return n.FULFILLED="fulfilled",n.REJECTED="rejected",n}(Ey||{});var ir=function(n){return n.REACH_PAGE="REACH_PAGE",n.BOUNCE_RATE="BOUNCE_RATE",n.CLICK_ON_ELEMENT="CLICK_ON_ELEMENT",n.URL_PARAMETER="URL_PARAMETER",n.EXIT_RATE="EXIT_RATE",n}(ir||{}),Qa=function(n){return n.EQUALS="EQUALS",n.CONTAINS="CONTAINS",n.EXISTS="EXISTS",n}(Qa||{}),id=function(n){return n.URL="url",n.REFERER="referer",n.QUERY_PARAM="queryParam",n}(id||{}),Oke={[ir.REACH_PAGE]:id.URL,[ir.URL_PARAMETER]:"queryParameter"},vr={black:"#14151a",white:"#FFFFFF",accentTurquoise:"rgb(66,194,240)",accentTurquoiseOp40:"rgba(66,194,240,0.40)",accentFuchsia:"rgb(195,54,229)",accentFuchsiaOp40:"rgba(195,54,229,0.40)",accentYellow:"rgb(255, 180, 68)",accentYellowOp40:"rgba(255, 180, 68,0.40)",colorPaletteBlackOp20:getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-20"),colorPaletteBlackOp30:getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-30"),colorPaletteBlackOp50:getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-50"),colorPaletteBlackOp70:getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-70")},$s={original:{line:vr.accentTurquoise,fill:vr.accentTurquoiseOp40},variant_1:{line:vr.accentFuchsia,fill:vr.accentFuchsiaOp40},variant_2:{line:vr.accentYellow,fill:vr.accentYellowOp40},xAxis:{border:vr.colorPaletteBlackOp20,gridLine:vr.colorPaletteBlackOp30},yAxis:{border:vr.colorPaletteBlackOp20,gridLine:vr.colorPaletteBlackOp50},ticks:{color:vr.colorPaletteBlackOp70},white:vr.white,black:vr.black},Ake=[{borderColor:$s.original.line,pointBackgroundColor:$s.original.line,backgroundColor:$s.original.fill},{borderColor:$s.variant_1.line,pointBackgroundColor:$s.variant_1.line,backgroundColor:$s.variant_1.fill},{borderColor:$s.variant_2.line,pointBackgroundColor:$s.variant_2.line,backgroundColor:$s.variant_2.fill}],hne={type:"line",pointRadius:4,pointHoverRadius:6,fill:!0,cubicInterpolationMode:"monotone",borderWidth:2},kke=R(I({},hne),{pointRadius:0,pointHoverRadius:2.5});var Rt=function(n){return n.RUNNING="RUNNING",n.SCHEDULED="SCHEDULED",n.DRAFT="DRAFT",n.ENDED="ENDED",n.ARCHIVED="ARCHIVED",n}(Rt||{}),Rke={[Rt.DRAFT]:"pi pi-pencil",[Rt.SCHEDULED]:"pi pi-calendar",[Rt.RUNNING]:"pi pi-play",[Rt.ENDED]:"pi pi-check",[Rt.ARCHIVED]:"pi pi-inbox"},Fke=[{label:"draft",value:Rt.DRAFT},{label:"scheduled",value:Rt.SCHEDULED},{label:"running",value:Rt.RUNNING},{label:"ended",value:Rt.ENDED},{label:"archived",value:Rt.ARCHIVED}],jke={[ir.URL_PARAMETER]:[{label:"experiments.goal.conditions.params.query_param.label",value:id.QUERY_PARAM,inactive:!1}],[ir.REACH_PAGE]:[{label:"experiments.goal.conditions.params.url.label",value:id.URL,inactive:!1}]},Vke={[ir.URL_PARAMETER]:[{label:"experiments.goal.conditions.operators.contains.label",value:Qa.CONTAINS,inactive:!1},{label:"experiments.goal.conditions.operators.equals.label",value:Qa.EQUALS,inactive:!1},{label:"experiments.goal.conditions.operators.exists.label",value:Qa.EXISTS,inactive:!1}],[ir.REACH_PAGE]:[{label:"experiments.goal.conditions.operators.contains.label",value:Qa.CONTAINS,inactive:!1},{label:"experiments.goal.conditions.operators.equals.label",value:Qa.EQUALS,inactive:!1}]};var Bke={primary:{name:"default",type:ir.REACH_PAGE,conditions:[{parameter:id.URL,operator:Qa.EQUALS,value:"to-define"}]}},zke={[ir.REACH_PAGE]:{label:"experiments.goal.reach_page.name",description:"experiments.goal.reach_page.description",icon:"pi-file-excel"},[ir.BOUNCE_RATE]:{label:"experiments.goal.bounce_rate.name",description:"experiments.goal.bounce_rate.description",icon:"pi-chart-pie"},[ir.CLICK_ON_ELEMENT]:{label:"experiments.goal.click_on_element.name",description:"experiments.goal.click_on_element.description",icon:"pi-check-square"},[ir.URL_PARAMETER]:{label:"experiments.goal.url_parameter.name",description:"experiments.goal.url_parameter.description",icon:"pi-paperclip"},[ir.EXIT_RATE]:{label:"experiments.goal.exit_rate.name",description:"experiments.goal.exit_rate.description",icon:"pi-sign-out"}};var Uke={delete:[Rt.DRAFT,Rt.SCHEDULED],abort:[Rt.RUNNING],configuration:[Rt.RUNNING,Rt.ENDED,Rt.ARCHIVED,Rt.SCHEDULED,Rt.DRAFT],archive:[Rt.ENDED],end:[Rt.RUNNING],addToBundle:[Rt.DRAFT,Rt.RUNNING,Rt.ENDED,Rt.ARCHIVED,Rt.SCHEDULED],pushPublish:[Rt.DRAFT,Rt.RUNNING,Rt.ENDED,Rt.ARCHIVED,Rt.SCHEDULED],cancelSchedule:[Rt.SCHEDULED],results:[Rt.RUNNING,Rt.ENDED]};var Di=function(n){return n.INIT="INIT",n.LOADING="LOADING",n.LOADED="LOADED",n.SAVING="SAVING",n.IDLE="IDLE",n.ERROR="ERROR",n}(Di||{}),v4="NOT_FOUND";var qt=function(n){return n.FAVICON="favicon",n.TITLE="title",n.DESCRIPTION="description",n.OG_DESCRIPTION="og:description",n.OG_TITLE="og:title",n.OG_IMAGE="og:image",n.TWITTER_CARD="twitter:card",n.TWITTER_TITLE="twitter:title",n.TWITTER_DESCRIPTION="twitter:description",n.TWITTER_IMAGE="twitter:image",n}(qt||{});var b4={facebook:[qt.OG_DESCRIPTION,qt.OG_IMAGE,qt.OG_TITLE],google:[qt.DESCRIPTION,qt.FAVICON,qt.TITLE],twitter:[qt.TWITTER_CARD,qt.TWITTER_TITLE,qt.TWITTER_DESCRIPTION,qt.TWITTER_IMAGE],linkedin:[qt.OG_DESCRIPTION,qt.OG_IMAGE,qt.OG_TITLE],all:[qt.DESCRIPTION,qt.OG_IMAGE,qt.OG_TITLE,qt.FAVICON,qt.TITLE,qt.OG_DESCRIPTION,qt.TWITTER_CARD,qt.TWITTER_TITLE,qt.TWITTER_DESCRIPTION,qt.TWITTER_IMAGE]},ss=function(n){return n.GOOGLE="Google",n.TWITTER="Twitter",n.LINKEDIN="LinkedIn",n.FACEBOOK="Facebook",n}(ss||{}),fne=[qt.OG_DESCRIPTION,qt.OG_TITLE,qt.OG_IMAGE,qt.TWITTER_CARD,qt.TWITTER_TITLE,qt.TWITTER_DESCRIPTION,qt.TWITTER_IMAGE],Kke={[ss.FACEBOOK]:{label:"Facebook",value:ss.FACEBOOK,icon:"pi pi-facebook",description:"seo.rules.media.preview.tile"},[ss.TWITTER]:{label:"X (Formerly Twitter)",value:ss.TWITTER,icon:"pi pi-twitter",description:"seo.rules.media.preview.tile"},[ss.LINKEDIN]:{label:"Linkedin",value:ss.LINKEDIN,icon:"pi pi-linkedin",description:"seo.rules.media.preview.tile"},[ss.GOOGLE]:{label:"Google",value:ss.GOOGLE,icon:"pi pi-google",description:"seo.rules.media.search.engine"}};var w4=(()=>{let e=class e{constructor(){this.iconPath="./src/assets/images/icons",this.dotCMSURLKey="siteURLJWT"}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();function I4(n,e,t,i){var r=arguments.length,o=r<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(n,e,t,i);else for(var a=n.length-1;a>=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(e,t,o):s(e,t))||o);return r>3&&o&&Object.defineProperty(e,t,o),o}function x4(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)}var Ka,T4=(Ka=class{constructor(e){this.iconPath=e.iconPath}displayErrorMessage(e){this.displayMessage("Error",e,"error")}displaySuccessMessage(e){this.displayMessage("Success",e,"success")}displayInfoMessage(e){this.displayMessage("Info",e,"info")}displayMessage(e,t,i){let r;return r=new Notification(i,{body:t,icon:this.iconPath+"/"+i+".png"}),r}},Ka.\u0275prov=K({token:Ka,factory:Ka.\u0275fac}),Ka);T4=I4([P2("config"),x4("design:paramtypes",[w4])],T4);function oT(n,e){return n.replace(/{(\d+)}/g,(t,i)=>typeof e[i]<"u"?e[i]:t)}var KLe=new be("WindowToken");function My(n,e){if(n===e)return!0;if((n===void 0||e===void 0||n===null||e===null)&&(n||e))return!1;let t=n?.constructor.name,i=e?.constructor.name;if(t!==i)return!1;if(t==="Array"){if(n.length!==e.length)return!1;let r=!0;for(let o=0;o{let e=parseInt(n,0);if(e)return e;try{return JSON.parse(n)}catch{return n}},M4=(()=>{let e=class e{setItem(i,r){let o;typeof r=="object"?o=JSON.stringify(r):o=r,localStorage.setItem(i,o)}getItem(i){let r=localStorage.getItem(i);return S4(r)}removeItem(i){localStorage.removeItem(i)}clear(){localStorage.clear()}listen(i){return Il(window,"storage").pipe(rn(({key:r})=>r===i),Ie(r=>S4(r.newValue)))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var D4="default",O4="dotMessagesKeys-lang",sT="dotMessagesKeys",A4="buildDate",Qt=(()=>{let e=class e{constructor(i,r){this.http=i,this.dotLocalstorageService=r,this.messageMap={}}init(i){let r=i?.language||D4,o=i?.buildDate||null;this.getAll(r,o)}get(i,...r){return this.messageMap[i]?r.length?oT(this.messageMap[i],r):this.messageMap[i]:i}getAll(i=D4,r=null){this.shouldReloadMessages(i,r)?this.http.get(this.geti18nURL(i)).pipe(xt(1),Wt("entity")).subscribe(o=>{this.messageMap=o,this.dotLocalstorageService.setItem(sT,this.messageMap),this.dotLocalstorageService.setItem(O4,i),this.dotLocalstorageService.setItem(A4,r)}):this.messageMap=this.dotLocalstorageService.getItem(sT)}geti18nURL(i){return`/api/v2/languages/${i||"default"}/keys`}shouldReloadMessages(i,r){let o=this.dotLocalstorageService.getItem(A4),s=this.dotLocalstorageService.getItem(O4);return!this.dotLocalstorageService.getItem(sT)||i!==s||r&&r!==o}};e.\u0275fac=function(r){return new(r||e)(re(ei),re(M4))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var aT=function(n){return n.ASC="ASC",n.DESC="DESC",n}(aT||{}),Ya=(()=>{let e=class e{constructor(i){this.http=i}get({query:i,limit:r=0,offset:o=0}){return this.http.post("/api/content/_search",{query:i,sort:"score,modDate desc",limit:r,offset:o}).pipe(Wt("entity"))}};e.\u0275fac=function(r){return new(r||e)(re(ei))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var Za="/api/v2/languages",k4="/api/v2/languages?countLangVars=true",Ur=(()=>{let e=class e{constructor(){this.httpClient=B(ei)}get(i){let r=i?`${k4}&contentInode=${i}`:k4;return this.httpClient.get(r).pipe(Wt("entity"))}getLanguagesUsedPage(i){return this.httpClient.get(`/api/v1/page/${i}/languages`).pipe(Wt("entity"))}add(i){return this.httpClient.post(Za,i).pipe(Wt("entity"))}getById(i){return this.httpClient.get(`${Za}/id/${i}`).pipe(Wt("entity"))}getByISOCode(i){return this.httpClient.get(`${Za}/${i}`).pipe(Wt("entity"))}update(i){let{id:r,languageCode:o,language:s,countryCode:a,country:l}=i;return this.httpClient.put(`${Za}/${r}`,{languageCode:o,language:s,countryCode:a,country:l}).pipe(Wt("entity"))}delete(i){return this.httpClient.delete(`${Za}/${i}`).pipe(Wt("entity"))}makeDefault(i){return this.httpClient.put(`${Za}/${i}/_makedefault`,{}).pipe(Wt("entity"))}getISO(){return this.httpClient.get(`${Za}/iso`).pipe(Wt("entity"))}getLanguageVariables(){return this.httpClient.get(`${Za}/variables`).pipe(Wt("entity","variables"))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();var rd=(()=>{let e=class e{constructor(i){this.http=i}getKey(i){return this.http.get("/api/v1/configuration/config",{params:{keys:i}}).pipe(xt(1),Wt("entity",i))}getKeys(i){return this.http.get("/api/v1/configuration/config",{params:{keys:i.join()}}).pipe(xt(1),Wt("entity"))}getKeyAsList(i){return this.http.get("/api/v1/configuration/config",{params:{keys:`list:${i}`}}).pipe(xt(1),Wt("entity",i))}getFeatureFlag(i){return this.getKey(i).pipe(Ie(r=>r===v4?!0:r==="true"))}getFeatureFlags(i){return this.getKeys(i).pipe(Ie(r=>Object.entries(r).reduce((o,[s,a])=>(o[s]=a==="true"?!0:a==="false"?!1:a,o),{})))}};e.\u0275fac=function(r){return new(r||e)(re(ei))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var Ine={500:"500 Internal Server Error",400:"400 Bad Request",401:"401 Unauthorized Error"},lT=(()=>{let e=class e{uploadFile({file:i,maxSize:r,signal:o}){return typeof i=="string"?this.uploadFileByURL(i,o):this.uploadBinaryFile({file:i,maxSize:r,signal:o})}uploadFileByURL(i,r){return fetch("/api/v1/temp/byUrl",{method:"POST",signal:r,headers:{"Content-Type":"application/json",Origin:window.location.hostname},body:JSON.stringify({remoteUrl:i})}).then(s=>ji(this,null,function*(){if(s.status===200)return(yield s.json()).tempFiles[0];throw{message:(yield s.json()).message,status:s.status}})).catch(s=>{let{message:a,response:l}=s,c=typeof l=="string"?JSON.parse(l):l;throw this.errorHandler(c||{message:a},s.status)})}uploadBinaryFile({file:i,maxSize:r,signal:o}){let s="/api/v1/temp";s+=r?`?maxFileLength=${r}`:"";let a=new FormData;return a.append("file",i),fetch(s,{method:"POST",signal:o,headers:{Origin:window.location.hostname},body:a}).then(l=>ji(this,null,function*(){if(l.status===200)return(yield l.json()).tempFiles[0];throw{message:(yield l.json()).message,status:l.status}})).catch(l=>{throw this.errorHandler(JSON.parse(l.response),l.status)})}errorHandler(i,r){let o="";try{o=i.message||i.errors[0].message}catch{o=Ine[r||500]}return{message:o,status:r|500}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var Ja=function(n){return n.DOWNLOAD="DOWNLOADING",n.IMPORT="IMPORTING",n.COMPLETED="COMPLETED",n.ERROR="ERROR",n}(Ja||{}),as=(()=>{var e,t,i,r;let o=class o{constructor(){zn(this,e,"/api/v1/workflow/actions/default");zn(this,t,B(ei));zn(this,i,B(lT));zn(this,r,B(Qh))}publishContent({data:a,maxSize:l,statusCallback:c=d=>{},signal:u}){return c(Ja.DOWNLOAD),this.setTempResource({data:a,maxSize:l,signal:u}).pipe(Zt(d=>{let p=Array.isArray(d)?d:[d],h=[];return p.forEach(g=>{h.push({baseType:"dotAsset",asset:g.id,hostFolder:"",indexPolicy:"WAIT_FOR"})}),c(Ja.IMPORT),Kt(this,t).post(`${Kt(this,e)}/fire/PUBLISH`,JSON.stringify({contentlets:h}),{headers:{Origin:window.location.hostname,"Content-Type":"application/json;charset=UTF-8"}}).pipe(Wt("entity","results"))}),Nn(d=>Zn(d)))}setTempResource({data:a,maxSize:l,signal:c}){return Yt(Kt(this,i).uploadFile({file:a,maxSize:l,signal:c}))}uploadDotAsset(a){if(a instanceof File){let l=new FormData;return l.append("file",a),Kt(this,r).newContentlet("dotAsset",{file:a.name},l)}return Kt(this,r).newContentlet("dotAsset",{asset:a})}};e=new WeakMap,t=new WeakMap,i=new WeakMap,r=new WeakMap,o.\u0275fac=function(l){return new(l||o)},o.\u0275prov=K({token:o,factory:o.\u0275fac});let n=o;return n})();var Kh=function(n){return n.NEW="NEW",n.DESTROY="DESTROY",n.PUBLISH="PUBLISH",n.EDIT="EDIT",n}(Kh||{}),Qh=(()=>{let e=class e{constructor(){this.BASE_URL="/api/v1/workflow",this.httpClient=B(ei),this.defaultHeaders=new Ei().set("Accept","*/*").set("Content-Type","application/json")}fireTo(i){let{actionId:r,inode:o,data:s}=i,a=o?`inode=${o}&`:"";return this.httpClient.put(`${this.BASE_URL}/actions/${r}/fire?${a}indexPolicy=WAIT_FOR`,s,{headers:this.defaultHeaders}).pipe(Wt("entity"))}bulkFire(i){return this.httpClient.put(`${this.BASE_URL}/contentlet/actions/bulk/fire`,i,{headers:this.defaultHeaders}).pipe(Wt("entity"))}newContentlet(i,r,o){return this.request({contentType:i,data:r,action:Kh.NEW,formData:o})}publishContentlet(i,r,o){return this.request({contentType:i,data:r,action:Kh.PUBLISH,individualPermissions:o})}saveContentlet(i){return this.request({data:i,action:Kh.EDIT})}deleteContentlet(i){return this.request({data:i,action:Kh.DESTROY})}publishContentletAndWaitForIndex(i,r,o){return this.publishContentlet(i,R(I({},r),{indexPolicy:"WAIT_FOR"}),o)}request({contentType:i,data:r,action:o,individualPermissions:s,formData:a}){let l=`${this.BASE_URL}/actions/default/fire/${o}`,c=i?I({contentType:i},r):r,u=s?{contentlet:c,individualPermissions:s}:{contentlet:c},d=new URLSearchParams({});return c.inode&&(d.append("inode",c.inode),delete c.inode),c.indexPolicy&&(d.append("indexPolicy",c.indexPolicy),delete c.indexPolicy),d.toString()&&(l=`${l}?${d.toString()}`),a&&a.append("json",JSON.stringify(u)),this.httpClient.put(l,a||u,{headers:a?new Ei:this.defaultHeaders}).pipe(xt(1),Wt("entity"))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();var Nne={NOT_SET:"NOT SET"},fT="/api/v1/ai",Lne="/api/v1/workflow/actions/default/fire/PUBLISH",mT=new Ei({"Content-Type":"application/json"}),Xa=(()=>{var e;let t=class t{constructor(){zn(this,e,B(ei))}generateContent(r){return Kt(this,e).post(`${fT}/text/generate`,JSON.stringify({prompt:r}),{headers:mT,observe:"response"}).pipe(Ie(o=>{if(o?.body?.error)throw new Error(o.body.error.message);let s=o?.body?.choices;if(!s||s.length===0)throw new Error("block-editor.extension.ai-image.api-error.no-choice-returned");return s[0].message.content}),Nn(o=>o instanceof Ko?Zn(o.statusText):Zn(o)))}generateAndPublishImage(r,o="1792x1024"){return Kt(this,e).post(`${fT}/image/generate`,JSON.stringify({prompt:r,size:o}),{headers:mT}).pipe(Nn(()=>Zn("block-editor.extension.ai-image.api-error.missing-token")),Zt(s=>this.createAndPublishContentlet(s)))}checkPluginInstallation(){return Kt(this,e).get(`${fT}/completions/config`,{observe:"response"}).pipe(Ie(r=>r.status===200&&r?.body?.apiKey!==Nne.NOT_SET),Nn(()=>ke(!1)))}createAndPublishContentlet(r){let{response:o,tempFileName:s}=r,a=[{baseType:"dotAsset",asset:o,title:s,hostFolder:"",indexPolicy:"WAIT_FOR"}];return Kt(this,e).post(`${Lne}`,JSON.stringify({contentlets:a}),{headers:mT}).pipe(Wt("entity","results"),Ie(l=>{if(l.length===0)throw new Error("contentlets is empty.");let c=l[0],u=Object.values(c),d=I({},u[0]);if(d?.errorMessage)throw new Error("Could not publish the image.");return I({contentlet:d},r)}),Nn(()=>Zn("block-editor.extension.ai-image.api-error.error-publishing-ai-image")))}};e=new WeakMap,t.\u0275fac=function(o){return new(o||t)},t.\u0275prov=K({token:t,factory:t.\u0275fac});let n=t;return n})();var Pne=(n,e,t)=>({"border-width":n,width:e,height:t}),od=(()=>{let e=class e{constructor(){this.borderSize="",this.size=""}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-spinner"]],inputs:{borderSize:"borderSize",size:"size"},decls:1,vars:5,consts:[[3,"ngStyle"]],template:function(r,o){r&1&&E(0,"div",0),r&2&&f("ngStyle",Sn(1,Pne,o.borderSize,o.size,o.size))},dependencies:[st],styles:["div[_ngcontent-%COMP%]{border-radius:50%;width:2.5rem;height:2.5rem;display:inline-block;vertical-align:middle;font-size:.625rem;position:relative;text-indent:-9999em;border:.5rem solid var(--color-palette-primary-op-20);border-left-color:var(--color-palette-primary-500);transform:translateZ(0);animation:_ngcontent-%COMP%_load8 1.1s infinite linear;overflow:hidden}.edit-page-variant-mode [_nghost-%COMP%] div[_ngcontent-%COMP%]{border:.5rem solid var(--color-palette-white-op-20);border-left-color:var(--color-palette-white-op-90)}@-webkit-keyframes _ngcontent-%COMP%_load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}"]});let n=e;return n})();var rc=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({imports:[Te]});let n=e;return n})();function Hr(n){n||(Vl(Hr),n=B(ri));let e=new Qe(t=>n.onDestroy(t.next.bind(t)));return t=>t.pipe(Ft(e))}function yT(n,e){let t=!e?.manualCleanup;t&&!e?.injector&&Vl(yT);let i=t?e?.injector?.get(ri)??B(ri):null,r=Fne(e?.equal),o;e?.requireSync?o=Lt({kind:0},{equal:r}):o=Lt({kind:1,value:e?.initialValue},{equal:r});let s=n.subscribe({next:a=>o.set({kind:1,value:a}),error:a=>{if(e?.rejectErrors)throw a;o.set({kind:2,error:a})}});if(e?.requireSync&&o().kind===0)throw new ie(601,!1);return i?.onDestroy(s.unsubscribe.bind(s)),cn(()=>{let a=o();switch(a.kind){case 1:return a.value;case 2:throw a.error;case 0:throw new ie(601,!1)}},{equal:e?.equal})}function Fne(n=Object.is){return(e,t)=>e.kind===1&&t.kind===1&&n(e.value,t.value)}var jne=["*",[["p-header"]],[["p-footer"]]],Vne=["*","p-header","p-footer"];function Bne(n,e){n&1&&ye(0)}function zne(n,e){if(n&1&&(b(0,"div",8),Vt(1,1),x(2,Bne,1,0,"ng-container",6),C()),n&2){let t=y();m(2),f("ngTemplateOutlet",t.headerTemplate)}}function Une(n,e){n&1&&ye(0)}function Hne(n,e){if(n&1&&(b(0,"div",9),Z(1),x(2,Une,1,0,"ng-container",6),C()),n&2){let t=y();m(),yt(" ",t.header," "),m(),f("ngTemplateOutlet",t.titleTemplate)}}function $ne(n,e){n&1&&ye(0)}function Wne(n,e){if(n&1&&(b(0,"div",10),Z(1),x(2,$ne,1,0,"ng-container",6),C()),n&2){let t=y();m(),yt(" ",t.subheader," "),m(),f("ngTemplateOutlet",t.subtitleTemplate)}}function Gne(n,e){n&1&&ye(0)}function qne(n,e){n&1&&ye(0)}function Qne(n,e){if(n&1&&(b(0,"div",11),Vt(1,2),x(2,qne,1,0,"ng-container",6),C()),n&2){let t=y();m(2),f("ngTemplateOutlet",t.footerTemplate)}}var sd=(()=>{class n{el;header;subheader;set style(t){Ee.equals(this._style(),t)||this._style.set(t)}styleClass;headerFacet;footerFacet;templates;headerTemplate;titleTemplate;subtitleTemplate;contentTemplate;footerTemplate;_style=Lt(null);constructor(t){this.el=t}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this.headerTemplate=t.template;break;case"title":this.titleTemplate=t.template;break;case"subtitle":this.subtitleTemplate=t.template;break;case"content":this.contentTemplate=t.template;break;case"footer":this.footerTemplate=t.template;break;default:this.contentTemplate=t.template;break}})}getBlockableElement(){return this.el.nativeElement.children[0]}static \u0275fac=function(i){return new(i||n)(k(Ce))};static \u0275cmp=F({type:n,selectors:[["p-card"]],contentQueries:function(i,r,o){if(i&1&&(Je(o,Ra,5),Je(o,Fa,5),Je(o,qe,4)),i&2){let s;J(s=X())&&(r.headerFacet=s.first),J(s=X())&&(r.footerFacet=s.first),J(s=X())&&(r.templates=s)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:Vne,decls:9,vars:10,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(i,r){i&1&&(ln(jne),b(0,"div",0),x(1,zne,3,1,"div",1),b(2,"div",2),x(3,Hne,3,2,"div",3)(4,Wne,3,2,"div",4),b(5,"div",5),Vt(6),x(7,Gne,1,0,"ng-container",6),C(),x(8,Qne,3,1,"div",7),C()()),i&2&&(W(r.styleClass),f("ngClass","p-card p-component")("ngStyle",r._style()),O("data-pc-name","card"),m(),f("ngIf",r.headerFacet||r.headerTemplate),m(2),f("ngIf",r.header||r.titleTemplate),m(),f("ngIf",r.subheader||r.subtitleTemplate),m(3),f("ngTemplateOutlet",r.contentTemplate),m(),f("ngIf",r.footerFacet||r.footerTemplate))},dependencies:[Ye,ot,Mt,st],styles:[`@layer primeng{.p-card-header img{width:100%}} +`],encapsulation:2,changeDetection:0})}return n})(),oc=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Ge]})}return n})();function Kne(n,e){if(n&1&&(b(0,"div",3),E(1,"dot-contentlet-thumbnail",4),C()),n&2){let t=y();m(),f("contentlet",t.contentlet)("iconSize","72px")("showVideoThumbnail",!0)}}function Yne(n,e){if(n&1&&(b(0,"h2",5),Z(1),C()),n&2){let t=y();m(),yt(" ",(t.contentlet==null?null:t.contentlet.fileName)||(t.contentlet==null?null:t.contentlet.title)," ")}}function Zne(n,e){if(n&1&&(b(0,"div",6)(1,"span",7),Z(2),C(),E(3,"dot-state-icon",8),C()),n&2){let t=y();m(2),Pe(t.contentlet==null?null:t.contentlet.language),m(),f("state",t.contentlet)}}var R4=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-asset-card"]],inputs:{contentlet:"contentlet"},standalone:!0,features:[ue],decls:4,vars:1,consts:[["pTemplate","header"],["class","title","data-testId","dot-card-title",4,"pTemplate"],["pTemplate","footer"],[1,"thumbnail-container"],["data-testId","dot-contentlet-thumbnail",3,"contentlet","iconSize","showVideoThumbnail"],["data-testId","dot-card-title",1,"title"],[1,"state"],["data-testId","dot-card-language",1,"badge"],["size","16px",3,"state"]],template:function(r,o){r&1&&(b(0,"p-card"),x(1,Kne,2,3,"ng-template",0)(2,Yne,2,1,"h2",1)(3,Zne,4,2,"ng-template",2),C()),r&2&&(m(2),f("pTemplate","title"))},dependencies:[oc,sd,qe],styles:["[_nghost-%COMP%] .p-card{border:none;box-shadow:0 2px 8px #14151a05;cursor:pointer;display:flex;gap:1rem;height:94px}[_nghost-%COMP%] .p-card .p-card-header{padding:0;height:94px;width:94px;min-height:94px;min-width:94px;border-radius:.25rem 0 0 .25rem}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container{padding:10px;width:100%;height:100%;background:#f3f3f4}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container dot-contentlet-thumbnail{width:100%;height:100%}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container dot-contentlet-thumbnail img{object-fit:contain;width:100%;height:100%}[_nghost-%COMP%] .p-card .p-card-body{flex-grow:1;display:flex;flex-direction:column;overflow:hidden;padding:.75rem .75rem .75rem 0}[_nghost-%COMP%] .p-card .p-card-body .p-card-title{flex-grow:1}[_nghost-%COMP%] .p-card .p-card-body .p-card-title h2{font-size:.875rem;line-height:140%;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%] .state{align-items:center;display:flex;gap:.5rem}[_nghost-%COMP%] .badge{background:var(--color-palette-primary-100);border-radius:.125rem;color:#14151a;font-size:12px;line-height:140%;padding:.2rem .5rem;display:flex;align-items:center}"],changeDetection:0});let n=e;return n})();var ad=(()=>{class n{styleClass;style;shape="rectangle";animation="wave";borderRadius;size;width="100%";height="1rem";containerClass(){return{"p-skeleton p-component":!0,"p-skeleton-circle":this.shape==="circle","p-skeleton-none":this.animation==="none"}}get containerStyle(){return this.size?R(I({},this.style),{width:this.size,height:this.size,borderRadius:this.borderRadius}):I({width:this.width,height:this.height,borderRadius:this.borderRadius},this.style)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=F({type:n,selectors:[["p-skeleton"]],hostAttrs:[1,"p-element"],inputs:{styleClass:"styleClass",style:"style",shape:"shape",animation:"animation",borderRadius:"borderRadius",size:"size",width:"width",height:"height"},decls:1,vars:7,consts:[[3,"ngClass","ngStyle"]],template:function(i,r){i&1&&E(0,"div",0),i&2&&(W(r.styleClass),f("ngClass",r.containerClass())("ngStyle",r.containerStyle),O("data-pc-name","skeleton")("aria-hidden",!0)("data-pc-section","root"))},dependencies:[Ye,st],styles:[`@layer primeng{.p-skeleton{position:relative;overflow:hidden}.p-skeleton:after{content:"";animation:p-skeleton-animation 1.2s infinite;height:100%;left:0;position:absolute;right:0;top:0;transform:translate(-100%);z-index:1}.p-skeleton.p-skeleton-circle{border-radius:50%}.p-skeleton-none:after{animation:none}}@keyframes p-skeleton-animation{0%{transform:translate(-100%)}to{transform:translate(100%)}} +`],encapsulation:2,changeDetection:0})}return n})(),Ws=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te]})}return n})();function Jne(n,e){n&1&&E(0,"p-skeleton",3)}function Xne(n,e){n&1&&(b(0,"div",4),E(1,"p-skeleton",5)(2,"p-skeleton",6),C())}var F4=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-asset-card-skeleton"]],standalone:!0,features:[ue],decls:4,vars:0,consts:[["pTemplate","header"],["data-testId","p-skeleton-body","height","1rem"],["pTemplate","footer"],["data-testId","p-skeleton-header","shape","square","size","94px"],[1,"state"],["data-testId","p-skeleton-state-1","width","2rem","height","1rem"],["data-testId","p-skeleton-state-2","shape","circle","size","16px"]],template:function(r,o){r&1&&(b(0,"p-card"),x(1,Jne,1,0,"ng-template",0),E(2,"p-skeleton",1),x(3,Xne,3,0,"ng-template",2),C())},dependencies:[oc,sd,qe,Ws,ad],styles:["[_nghost-%COMP%]{width:100%}[_nghost-%COMP%] .p-card{border:none;box-shadow:0 2px 8px #14151a05;cursor:pointer;display:flex;gap:.5rem;height:94px}[_nghost-%COMP%] .p-card .p-card-header{padding:0}[_nghost-%COMP%] .p-card .p-card-body{flex:1;overflow:hidden;padding:.75rem .5rem .75rem 0;display:flex;flex-direction:column}[_nghost-%COMP%] .p-card .p-card-body .p-card-content{flex-grow:1}[_nghost-%COMP%] .state{align-items:center;display:flex;gap:.5rem}"],changeDetection:0});let n=e;return n})();function eie(n,e){if(n&1){let t=$();b(0,"dot-asset-card",8),P("click",function(){M(t);let r=y().$implicit,o=y(2);return D(o.selectedItem.emit(r[0]))}),C()}if(n&2){let t=y().$implicit;f("contentlet",t[0])}}function tie(n,e){if(n&1){let t=$();b(0,"dot-asset-card",8),P("click",function(){M(t);let r=y().$implicit,o=y(2);return D(o.selectedItem.emit(r[1]))}),C()}if(n&2){let t=y().$implicit;f("contentlet",t[1])}}function nie(n,e){if(n&1&&(b(0,"div",6),x(1,eie,1,1,"dot-asset-card",7)(2,tie,1,1,"dot-asset-card",7),C()),n&2){let t=e.$implicit;m(),we(t[0]?1:-1),m(),we(t[1]?2:-1)}}function iie(n,e){if(n&1){let t=$();b(0,"p-scroller",4),P("onScrollIndexChange",function(r){M(t);let o=y();return D(o.onScrollIndexChange(r))}),x(1,nie,3,2,"ng-template",5),C()}if(n&2){let t=y();f("itemSize",110)("items",t.rows)("lazy",!0)}}function rie(n,e){}function oie(n,e){if(n&1&&x(0,rie,0,0,"ng-template",3),n&2){let t=y(),i=pt(3),r=pt(5);f("ngTemplateOutlet",t.loading?i:r)}}function sie(n,e){n&1&&(b(0,"div",6),E(1,"dot-asset-card-skeleton")(2,"dot-asset-card-skeleton"),C())}function aie(n,e){if(n&1&&(b(0,"div",9),Or(1,sie,3,0,"div",6,Sa),C()),n&2){let t=y();m(),Ar(t.loadingItems)}}function lie(n,e){if(n&1&&(b(0,"div",10),E(1,"img",11),b(2,"p"),Z(3,"No results found, try searching again"),C()()),n&2){let t=y();m(),f("src",t.icon,zi)}}var cie="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDEiIHZpZXdCb3g9IjAgMCA0MCA0MSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuMDc2MTcgOC41NTcxMkgwLjA5NTIxNDhWMzYuNDIzOEMwLjA5NTIxNDggMzguNjEzMyAxLjg4NjY0IDQwLjQwNDcgNC4wNzYxNyA0MC40MDQ3SDMxLjk0MjhWMzYuNDIzOEg0LjA3NjE3VjguNTU3MTJaTTM1LjkyMzggMC41OTUyMTVIMTIuMDM4MUM5Ljg0ODU1IDAuNTk1MjE1IDguMDU3MTIgMi4zODY2NCA4LjA1NzEyIDQuNTc2MTdWMjguNDYxOUM4LjA1NzEyIDMwLjY1MTQgOS44NDg1NSAzMi40NDI4IDEyLjAzODEgMzIuNDQyOEgzNS45MjM4QzM4LjExMzMgMzIuNDQyOCAzOS45MDQ3IDMwLjY1MTQgMzkuOTA0NyAyOC40NjE5VjQuNTc2MTdDMzkuOTA0NyAyLjM4NjY0IDM4LjExMzMgMC41OTUyMTUgMzUuOTIzOCAwLjU5NTIxNVpNMzUuOTIzOCAyOC40NjE5SDEyLjAzODFWNC41NzYxN0gzNS45MjM4VjI4LjQ2MTlaTTIxLjk5MDUgMjQuNDgwOUgyNS45NzE0VjE4LjUwOTVIMzEuOTQyOFYxNC41Mjg1SDI1Ljk3MTRWOC41NTcxMkgyMS45OTA1VjE0LjUyODVIMTYuMDE5VjE4LjUwOTVIMjEuOTkwNVYyNC40ODA5WiIgZmlsbD0iIzU3NkJFOCIvPgo8L3N2Zz4K",j4=(()=>{let e=class e{constructor(){this.nextBatch=new j,this.selectedItem=new j,this.done=!1,this.loading=!0,this.contentlets=[],this.domSanitizer=B(Ul),this.loadingItems=[null,null,null],this.icon=this.domSanitizer.bypassSecurityTrustResourceUrl(cie),this._itemRows=[],this._offset=0}get rows(){return[...this._itemRows]}ngOnChanges(i){i.contentlets&&(this._offset=this.contentlets?.length||0,this._itemRows=this.createRowItem(this.contentlets))}onScrollIndexChange(i){if(this.done)return;let r=i.last,o=this.rows.length;r===o&&this.nextBatch.emit(this._offset)}createRowItem(i=[]){let r=[];return i.forEach(o=>{let s=r.length-1;r[s]?.length<2?r[s].push(o):r.push([o])}),r}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-asset-card-list"]],inputs:{done:"done",loading:"loading",contentlets:"contentlets"},outputs:{nextBatch:"nextBatch",selectedItem:"selectedItem"},standalone:!0,features:[Jt,ue],decls:6,vars:1,consts:[["loadingBlock",""],["emptyBlock",""],["scrollHeight","20rem",3,"itemSize","items","lazy"],[3,"ngTemplateOutlet"],["scrollHeight","20rem",3,"onScrollIndexChange","itemSize","items","lazy"],["pTemplate","item"],[1,"card-list-row"],[3,"contentlet"],[3,"click","contentlet"],[1,"wrapper","justify-start"],[1,"wrapper"],["width","42px","alt","No results found",3,"src"]],template:function(r,o){r&1&&x(0,iie,2,3,"p-scroller",2)(1,oie,1,1,null,3)(2,aie,3,0,"ng-template",null,0,Bt)(4,lie,4,1,"ng-template",null,1,Bt),r&2&&we(o.rows!=null&&o.rows.length&&!o.loading?0:1)},dependencies:[mo,Fu,qe,R4,F4],styles:["[_nghost-%COMP%]{display:flex;width:100%;height:20rem;flex-direction:column}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%]{padding:0 2rem;display:flex;align-items:center;justify-content:center;flex-direction:column;flex-grow:1;height:250px;gap:0 1rem;overflow:hidden}[_nghost-%COMP%] .justify-start[_ngcontent-%COMP%]{justify-content:flex-start}[_nghost-%COMP%] p[_ngcontent-%COMP%]{margin:1rem 0;font-size:18px}[_nghost-%COMP%] dot-asset-card, [_nghost-%COMP%] dot-asset-card-skeleton{width:calc(50% - .5rem)}[_nghost-%COMP%] .p-scroller-content{padding:0 2rem;max-width:100%}[_nghost-%COMP%] .card-list-row{display:flex;justify-content:space-between;width:100%;min-height:110px;gap:1rem}"],changeDetection:0});let n=e;return n})();function ld(n,e,t){let i=typeof n=="function"?{next:n,error:e,complete:t}:n;return r=>r.pipe(jt({next:i.next,complete:i.complete}),Nn(o=>(i.error(o),vi)),i.finalize?Tr(i.finalize):o=>o)}function uie(){return n=>new Qe(e=>{let t,i,r=new et;return r.add(n.subscribe({complete:()=>{t&&e.next(i),e.complete()},error:o=>{e.error(o)},next:o=>{i=o,t||(t=lp.schedule(()=>{e.next(i),t=void 0}),r.add(t))}})),r})}function V4(n){return typeof n.ngrxOnStoreInit=="function"}function B4(n){return typeof n.ngrxOnStateInit=="function"}var die=new be("@ngrx/component-store Initial State"),Ay=(()=>{let e=class e{constructor(i){this.destroySubject$=new ao(1),this.destroy$=this.destroySubject$.asObservable(),this.stateSubject$=new ao(1),this.isInitialized=!1,this.state$=this.select(r=>r),this.state=yT(this.stateSubject$.pipe(Ft(this.destroy$)),{requireSync:!1,manualCleanup:!0}),this.\u0275hasProvider=!1,i&&this.initState(i),this.checkProviderForHooks()}ngOnDestroy(){this.stateSubject$.complete(),this.destroySubject$.next()}updater(i){return r=>{let o=!0,s,l=(ko(r)?r:ke(r)).pipe(db(sp),jt(()=>this.assertStateIsInitialized()),Tl(this.stateSubject$),Ie(([c,u])=>i(u,c)),jt(c=>this.stateSubject$.next(c)),Nn(c=>o?(s=c,vi):Zn(c)),Ft(this.destroy$)).subscribe();if(s)throw s;return o=!1,l}}initState(i){cp([i],sp).subscribe(r=>{this.isInitialized=!0,this.stateSubject$.next(r)})}setState(i){typeof i!="function"?this.initState(i):this.updater(i)()}patchState(i){let r=typeof i=="function"?i(this.get()):i;this.updater((o,s)=>I(I({},o),s))(r)}get(i){this.assertStateIsInitialized();let r;return this.stateSubject$.pipe(xt(1)).subscribe(o=>{r=i?i(o):o}),r}select(...i){let{observablesOrSelectorsObject:r,projector:o,config:s}=pie(i);return(fie(r,o)?this.stateSubject$:xs(r)).pipe(s.debounce?uie():z4(),o?Ie(l=>r.length>0&&Array.isArray(l)?o(...l):o(l)):z4(),hp(s.equal),Sm({refCount:!0,bufferSize:1}),Ft(this.destroy$))}selectSignal(...i){let r=[...i],o=typeof r[i.length-1]=="object"?r.pop():{},s=r.pop(),a=r,l=a.length===0?()=>s(this.state()):()=>{let c=a.map(u=>u());return s(...c)};return cn(l,o)}effect(i){let r=new pe;return i(r).pipe(Ft(this.destroy$)).subscribe(),o=>(ko(o)?o:ke(o)).pipe(Ft(this.destroy$)).subscribe(a=>{r.next(a)})}checkProviderForHooks(){lp.schedule(()=>{if(bk()&&(V4(this)||B4(this))&&!this.\u0275hasProvider){let i=[V4(this)?"OnStoreInit":"",B4(this)?"OnStateInit":""].filter(r=>r);console.warn(`@ngrx/component-store: ${this.constructor.name} has the ${i.join(" and ")} lifecycle hook(s) implemented without being provided using the provideComponentStore(${this.constructor.name}) function. To resolve this, provide the component store via provideComponentStore(${this.constructor.name})`)}})}assertStateIsInitialized(){if(!this.isInitialized)throw new Error(`${this.constructor.name} has not been initialized yet. Please make sure it is initialized before updating/getting.`)}};e.\u0275fac=function(r){return new(r||e)(re(die,8))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();function pie(n){let e=Array.from(n),i={debounce:!1,equal:(s,a)=>s===a};if(hie(e[e.length-1])&&(i=I(I({},i),e.pop())),e.length===1&&typeof e[0]!="function")return{observablesOrSelectorsObject:e[0],projector:void 0,config:i};let r=e.pop();return{observablesOrSelectorsObject:e,projector:r,config:i}}function hie(n){let e=n;return typeof e.debounce<"u"||typeof e.equal<"u"}function fie(n,e){return Array.isArray(n)&&n.length===0&&e}function z4(){return n=>n}var mie={loading:!0,preventScroll:!1,contentlets:[]},bT=(()=>{let e=class e extends Ay{constructor(i,r){super(mie),this.dotContentSearchService=i,this.dotLanguagesService=r,this.vm$=this.select(o=>o),this.updateContentlets=this.updater((o,s)=>({contentlets:s,preventScroll:!s?.length,loading:!1})),this.mergeContentlets=this.updater((o,s)=>({contentlets:[...o.contentlets,...s],preventScroll:!s?.length,loading:!1})),this.updateLoading=this.updater((o,s)=>R(I({},o),{loading:s})),this.languages={},this.searchContentlet=this.effect(o=>o.pipe(jt(()=>this.updateLoading(!0)),Zt(s=>this.searchContentletsRequest(s).pipe(ld(a=>this.updateContentlets(a),a=>{}))))),this.nextBatch=this.effect(o=>o.pipe(Zt(s=>this.searchContentletsRequest(s).pipe(ld(a=>this.mergeContentlets(a),a=>{}))))),this.dotLanguagesService.get().subscribe(o=>{o.forEach(s=>{this.languages[s.id]=s})})}searchContentletsRequest(i){let r=this.queryParams(i);return this.dotContentSearchService.get(r).pipe(Ie(({jsonObjectView:{contentlets:o}})=>this.setContentletLanguage(o)))}queryParams(i){let{search:r,assetType:o,offset:s=0,languageId:a=""}=i;return{query:`+catchall:${r.includes("-")?r:`${r}*`} title:'${r}'^15 +languageId:${a} +baseType:(4 OR 9) +metadata.contenttype:${o||""}/* +deleted:false +working:true`,sortOrder:aT.ASC,limit:20,offset:s}}setContentletLanguage(i){return i.map(r=>R(I({},r),{language:this.getLanguageBadge(r.languageId)}))}getLanguageBadge(i){let{languageCode:r,countryCode:o}=this.languages[i]||{};return!r||!o?"":`${r}-${o}`}};e.\u0275fac=function(r){return new(r||e)(re(Ya),re(Ur))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();var gie=["input"];function yie(n,e){if(n&1){let t=$();b(0,"dot-asset-card-list",6),P("selectedItem",function(r){M(t);let o=y();return D(o.addAsset.emit(r))})("nextBatch",function(r){M(t);let o=y();return D(o.offset$.next(r))}),C()}if(n&2){let t=e;f("contentlets",t.contentlets)("done",t.preventScroll)("loading",t.loading)}}var Gs=(()=>{let e=class e{constructor(){this.addAsset=new j,this.languageId="*",this.currentSearch="",this.store=B(bT),this.destroyRef=B(ri),this.offset$=new Fn(0),this.vm$=this.store.vm$}ngOnInit(){this.store.searchContentlet(R(I({},this.searchParams()),{search:"",offset:0})),this.offset$.pipe(Hr(this.destroyRef),xl(1),d1(450)).subscribe(i=>this.store.nextBatch(R(I({},this.searchParams()),{offset:i}))),requestAnimationFrame(()=>this.input.nativeElement.focus())}ngAfterViewInit(){Il(this.input.nativeElement,"input").pipe(Hr(this.destroyRef),Ts(450)).subscribe(({target:i})=>{let r=i.value;this.currentSearch=r,this.store.searchContentlet(R(I({},this.searchParams()),{search:r}))})}searchParams(){return{languageId:this.languageId||"",search:this.currentSearch,assetType:this.type,offset:this.offset$.value||0}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-asset-search"]],viewQuery:function(r,o){if(r&1&&fe(gie,5),r&2){let s;J(s=X())&&(o.input=s.first)}},inputs:{languageId:"languageId",type:"type"},outputs:{addAsset:"addAsset"},standalone:!0,features:[on([bT,Ya,Ur]),ue],decls:8,vars:3,consts:[["input",""],[1,"search-box"],[1,"p-input-icon-right"],["data-testId","input-search","autofocus","","type","text","pInputText","","placeholder","Search",1,"search"],[1,"pi","pi-search"],[3,"contentlets","done","loading"],[3,"selectedItem","nextBatch","contentlets","done","loading"]],template:function(r,o){if(r&1&&(oe(0),b(1,"div",1)(2,"span",2),E(3,"input",3,0)(5,"i",4),C()(),se(),x(6,yie,1,3,"dot-asset-card-list",5),ht(7,"async")),r&2){let s;m(6),we((s=ft(7,1,o.vm$))?6:-1,s)}},dependencies:[j4,Xl,ns,Te,t0],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.search-box[_ngcontent-%COMP%]{padding:0 2rem;flex-grow:1;display:flex;align-items:center}.search-box[_ngcontent-%COMP%], .search-box[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .search-box[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{width:100%}"],changeDetection:0});let n=e;return n})();var Dn=(()=>{let e=class e{constructor(i){this.dotMessageService=i}transform(i,r=[]){return i?this.dotMessageService.get(i,...r):""}};e.\u0275fac=function(r){return new(r||e)(k(Qt,16))},e.\u0275pipe=As({name:"dm",type:e,pure:!0,standalone:!0});let n=e;return n})();function vie(n,e){if(n&1&&E(0,"i",6),n&2){let t=y();W("message__icon pi "+t.configuration.icon)}}function bie(n,e){if(n&1&&(b(0,"h2",4),Z(1),C()),n&2){let t=y();m(),yt(" ",t.configuration.subtitle," ")}}function Cie(n,e){if(n&1){let t=$();b(0,"button",9),P("click",function(){M(t);let r=y(2);return D(r.buttonAction.emit())}),C()}if(n&2){let t=y(2);Gt("p-button-outlined",t.secondaryButton),f("label",t.buttonLabel)}}function wie(n,e){n&1&&(b(0,"span"),Z(1),ht(2,"dm"),C()),n&2&&(m(),Pe(ft(2,1,"dot.common.or.text")))}function Iie(n,e){if(n&1&&(x(0,wie,3,3,"span"),b(1,"a",8),Z(2),ht(3,"dm"),C()),n&2){let t=y(2);we(t.buttonLabel?0:-1),m(2),yt(" ",ft(3,2,"Contact-Us-for-more-Information")," ")}}function xie(n,e){if(n&1&&(b(0,"div",5),x(1,Cie,1,3,"button",7)(2,Iie,4,4,"a",8),C()),n&2){let t=y();m(),we(t.buttonLabel?1:-1),m(),we(t.hideContactUsLink?-1:2)}}var ky=(()=>{let e=class e{constructor(){this.secondaryButton=!1,this.hideContactUsLink=!1,this.buttonAction=new j}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-empty-container"]],inputs:{configuration:"configuration",buttonLabel:"buttonLabel",secondaryButton:"secondaryButton",hideContactUsLink:"hideContactUsLink"},outputs:{buttonAction:"buttonAction"},standalone:!0,features:[ue],decls:7,vars:4,consts:[[1,"message__wrapper","flex","gap-4","flex-column","w-30rem"],["data-testid","message-principal",1,"message__principal-wrapper","flex","align-items-center","flex-column","gap-2"],["data-testid","message-icon",3,"class"],["data-testid","message-title",1,"message__title"],["data-testid","message-subtitle",1,"message__subtitle"],["data-testid","message-extra",1,"message__extra-wrapper","flex","align-items-center","flex-column","gap-2"],["data-testid","message-icon"],["pButton","","data-testid","message-button",3,"label","p-button-outlined"],["data-testid","message-contact-link","href","https://dotcms.com/contact-us/","target","_blank",1,"message__external-link"],["pButton","","data-testid","message-button",3,"click","label"]],template:function(r,o){r&1&&(b(0,"div",0)(1,"div",1),x(2,vie,1,2,"i",2),b(3,"h1",3),Z(4),C(),x(5,bie,2,1,"h2",4),C(),x(6,xie,3,2,"div",5),C()),r&2&&(m(2),we(o.configuration.icon?2:-1),m(2),Pe(o.configuration.title),m(),we(o.configuration.subtitle?5:-1),m(),we(!o.hideContactUsLink||o.buttonLabel?6:-1))},dependencies:[an,zt,Dn],styles:["[_nghost-%COMP%]{height:100%;display:flex;justify-content:center;align-content:center;flex-wrap:wrap}.message__title[_ngcontent-%COMP%], .message__subtitle[_ngcontent-%COMP%]{margin:0;text-align:center;line-height:140%}.message__title[_ngcontent-%COMP%]{font-size:1rem;font-weight:500;color:#14151a}.message__subtitle[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:#6c7389}.message__icon[_ngcontent-%COMP%]{font-size:48px;padding:.75rem;color:#6c7389}.message__external-link[_ngcontent-%COMP%]{color:#14151a;text-align:center;font-size:.875rem;font-weight:500}.message__principal-wrapper[_ngcontent-%COMP%]{word-break:break-word}"],changeDetection:0});let n=e;return n})();var CT=(()=>{let e=class e{copy(i){let r=document.createElement("textarea");r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.opacity="0",r.value=i,document.body.appendChild(r),r.select();let o;return new Promise((s,a)=>{try{o=document.execCommand("copy"),s(o)}catch{a(o)}document.body.removeChild(r)})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();var Ny=(()=>{let e=class e{constructor(){this.copy=Ap.required(),this.label=Ap(""),this.originalTooltipText=Ap("",{alias:"tooltipText"}),this.customClass=Ap(""),this.$clazz=cn(()=>`p-button-sm p-button-text ${this.customClass()}`),this.dotClipboardUtil=B(CT),this.dotMessageService=B(Qt),this.$tempTooltipText=Lt(""),this.$tooltipText=cn(()=>this.$tempTooltipText()?this.$tempTooltipText():this.originalTooltipText()||this.dotMessageService.get("Copy"))}copyUrlToClipboard(i){i.stopPropagation(),this.dotClipboardUtil.copy(this.copy()).then(()=>{this.$tempTooltipText.set(this.dotMessageService.get("Copied")),setTimeout(()=>{this.$tempTooltipText.set("")},1e3)}).catch(()=>{this.$tempTooltipText.set("Error")})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-copy-button"]],inputs:{copy:[1,"copy"],label:[1,"label"],originalTooltipText:[1,"tooltipText","originalTooltipText"],customClass:[1,"customClass"]},standalone:!0,features:[on([CT]),ue],decls:1,vars:4,consts:[["appendTo","body","hideDelay","800","icon","pi pi-copy","pButton","","tooltipPosition","bottom","data-testid","copy-to-clipboard","type","button",3,"click","label","pTooltip"]],template:function(r,o){r&1&&(b(0,"button",0),P("click",function(a){return o.copyUrlToClipboard(a)}),C()),r&2&&(W(o.$clazz()),f("label",o.label())("pTooltip",o.$tooltipText()))},dependencies:[gr,Hu,an,zt],changeDetection:0});let n=e;return n})();var sc=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["ChevronLeftIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M9.61296 13C9.50997 13.0005 9.40792 12.9804 9.3128 12.9409C9.21767 12.9014 9.13139 12.8433 9.05902 12.7701L3.83313 7.54416C3.68634 7.39718 3.60388 7.19795 3.60388 6.99022C3.60388 6.78249 3.68634 6.58325 3.83313 6.43628L9.05902 1.21039C9.20762 1.07192 9.40416 0.996539 9.60724 1.00012C9.81032 1.00371 10.0041 1.08597 10.1477 1.22959C10.2913 1.37322 10.3736 1.56698 10.3772 1.77005C10.3808 1.97313 10.3054 2.16968 10.1669 2.31827L5.49496 6.99022L10.1669 11.6622C10.3137 11.8091 10.3962 12.0084 10.3962 12.2161C10.3962 12.4238 10.3137 12.6231 10.1669 12.7701C10.0945 12.8433 10.0083 12.9014 9.91313 12.9409C9.81801 12.9804 9.71596 13.0005 9.61296 13Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var ls=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["ChevronRightIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var wT=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["PlusIcon"]],standalone:!0,features:[xe,ue],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.67742 6.32258V0.677419C7.67742 0.497757 7.60605 0.325452 7.47901 0.198411C7.35197 0.0713707 7.17966 0 7 0C6.82034 0 6.64803 0.0713707 6.52099 0.198411C6.39395 0.325452 6.32258 0.497757 6.32258 0.677419V6.32258H0.677419C0.497757 6.32258 0.325452 6.39395 0.198411 6.52099C0.0713707 6.64803 0 6.82034 0 7C0 7.17966 0.0713707 7.35197 0.198411 7.47901C0.325452 7.60605 0.497757 7.67742 0.677419 7.67742H6.32258V13.3226C6.32492 13.5015 6.39704 13.6725 6.52358 13.799C6.65012 13.9255 6.82106 13.9977 7 14C7.17966 14 7.35197 13.9286 7.47901 13.8016C7.60605 13.6745 7.67742 13.5022 7.67742 13.3226V7.67742H13.3226C13.5022 7.67742 13.6745 7.60605 13.8016 7.47901C13.9286 7.35197 14 7.17966 14 7C13.9977 6.82106 13.9255 6.65012 13.799 6.52358C13.6725 6.39704 13.5015 6.32492 13.3226 6.32258H7.67742Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1),C(),b(3,"defs")(4,"clipPath",2),E(5,"rect",3),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(3),f("id",r.pathId))},encapsulation:2})}return n})();var IT=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,nT,Ln,gr,Ge,nT,gr,Ge]})}return n})();var Tie=["*",[["p-header"]]],Eie=["*","p-header"],Sie=n=>({$implicit:n}),U4=n=>({transitionParams:n}),Mie=n=>({value:"visible",params:n}),Die=n=>({value:"hidden",params:n});function Oie(n,e){if(n&1&&E(0,"span",11),n&2){let t=y(3);W(t.accordion.collapseIcon),f("ngClass",t.iconClass),O("aria-hidden",!0)}}function Aie(n,e){if(n&1&&E(0,"ChevronDownIcon",11),n&2){let t=y(3);f("ngClass",t.iconClass),O("aria-hidden",!0)}}function kie(n,e){if(n&1&&(oe(0),x(1,Oie,1,4,"span",9)(2,Aie,1,2,"ChevronDownIcon",10),se()),n&2){let t=y(2);m(),f("ngIf",t.accordion.collapseIcon),m(),f("ngIf",!t.accordion.collapseIcon)}}function Nie(n,e){if(n&1&&E(0,"span",11),n&2){let t=y(3);W(t.accordion.expandIcon),f("ngClass",t.iconClass),O("aria-hidden",!0)}}function Lie(n,e){if(n&1&&E(0,"ChevronRightIcon",11),n&2){let t=y(3);f("ngClass",t.iconClass),O("aria-hidden",!0)}}function Pie(n,e){if(n&1&&(oe(0),x(1,Nie,1,4,"span",9)(2,Lie,1,2,"ChevronRightIcon",10),se()),n&2){let t=y(2);m(),f("ngIf",t.accordion.expandIcon),m(),f("ngIf",!t.accordion.expandIcon)}}function Rie(n,e){if(n&1&&(oe(0),x(1,kie,3,2,"ng-container",3)(2,Pie,3,2,"ng-container",3),se()),n&2){let t=y();m(),f("ngIf",t.selected),m(),f("ngIf",!t.selected)}}function Fie(n,e){}function jie(n,e){n&1&&x(0,Fie,0,0,"ng-template")}function Vie(n,e){if(n&1&&(b(0,"span",12),Z(1),C()),n&2){let t=y();m(),yt(" ",t.header," ")}}function Bie(n,e){n&1&&ye(0)}function zie(n,e){n&1&&Vt(0,1,["*ngIf","hasHeaderFacet"])}function Uie(n,e){n&1&&ye(0)}function Hie(n,e){if(n&1&&(oe(0),x(1,Uie,1,0,"ng-container",6),se()),n&2){let t=y();m(),f("ngTemplateOutlet",t.contentTemplate)}}var $ie=["*"],xT=(()=>{class n{el;changeDetector;id;header;headerStyle;tabStyle;contentStyle;tabStyleClass;headerStyleClass;contentStyleClass;disabled;cache=!0;transitionOptions="400ms cubic-bezier(0.86, 0, 0.07, 1)";iconPos="start";get selected(){return this._selected}set selected(t){this._selected=t,this.loaded||(this._selected&&this.cache&&(this.loaded=!0),this.changeDetector.detectChanges())}headerAriaLevel=2;selectedChange=new j;headerFacet;templates;_selected=!1;get iconClass(){return this.iconPos==="end"?"p-accordion-toggle-icon-end":"p-accordion-toggle-icon"}contentTemplate;headerTemplate;iconTemplate;loaded=!1;accordion;constructor(t,i,r){this.el=i,this.changeDetector=r,this.accordion=t,this.id=nt()}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"content":this.contentTemplate=t.template;break;case"header":this.headerTemplate=t.template;break;case"icon":this.iconTemplate=t.template;break;default:this.contentTemplate=t.template;break}})}toggle(t){if(this.disabled)return!1;let i=this.findTabIndex();if(this.selected)this.selected=!1,this.accordion.onClose.emit({originalEvent:t,index:i});else{if(!this.accordion.multiple)for(var r=0;r0}onKeydown(t){switch(t.code){case"Enter":case"Space":this.toggle(t),t.preventDefault();break;default:break}}getTabHeaderActionId(t){return`${t}_header_action`}getTabContentId(t){return`${t}_content`}ngOnDestroy(){this.accordion.tabs.splice(this.findTabIndex(),1)}static \u0275fac=function(i){return new(i||n)(k(dn(()=>TT)),k(Ce),k(De))};static \u0275cmp=F({type:n,selectors:[["p-accordionTab"]],contentQueries:function(i,r,o){if(i&1&&(Je(o,Ra,4),Je(o,qe,4)),i&2){let s;J(s=X())&&(r.headerFacet=s),J(s=X())&&(r.templates=s)}},hostAttrs:[1,"p-element"],inputs:{id:"id",header:"header",headerStyle:"headerStyle",tabStyle:"tabStyle",contentStyle:"contentStyle",tabStyleClass:"tabStyleClass",headerStyleClass:"headerStyleClass",contentStyleClass:"contentStyleClass",disabled:[2,"disabled","disabled",V],cache:[2,"cache","cache",V],transitionOptions:"transitionOptions",iconPos:"iconPos",selected:"selected",headerAriaLevel:[2,"headerAriaLevel","headerAriaLevel",Ke]},outputs:{selectedChange:"selectedChange"},features:[$e],ngContentSelectors:Eie,decls:12,vars:44,consts:[[1,"p-accordion-tab",3,"ngClass","ngStyle"],["role","heading",1,"p-accordion-header"],["role","button",1,"p-accordion-header-link",3,"click","keydown","ngClass","ngStyle"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-accordion-header-text",4,"ngIf"],[4,"ngTemplateOutlet"],["role","region",1,"p-toggleable-content"],[1,"p-accordion-content",3,"ngClass","ngStyle"],[3,"class","ngClass",4,"ngIf"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[1,"p-accordion-header-text"]],template:function(i,r){i&1&&(ln(Tie),b(0,"div",0)(1,"div",1)(2,"a",2),P("click",function(s){return r.toggle(s)})("keydown",function(s){return r.onKeydown(s)}),x(3,Rie,3,2,"ng-container",3)(4,jie,1,0,null,4)(5,Vie,2,1,"span",5)(6,Bie,1,0,"ng-container",6)(7,zie,1,0,"ng-content",3),C()(),b(8,"div",7)(9,"div",8),Vt(10),x(11,Hie,2,1,"ng-container",3),C()()()),i&2&&(Gt("p-accordion-tab-active",r.selected),f("ngClass",r.tabStyleClass)("ngStyle",r.tabStyle),O("data-pc-name","accordiontab"),m(),Gt("p-highlight",r.selected)("p-disabled",r.disabled),O("aria-level",r.headerAriaLevel)("data-p-disabled",r.disabled)("data-pc-section","header"),m(),f("ngClass",r.headerStyleClass)("ngStyle",r.headerStyle),O("tabindex",r.disabled?null:0)("id",r.getTabHeaderActionId(r.id))("aria-controls",r.getTabContentId(r.id))("aria-expanded",r.selected)("aria-disabled",r.disabled)("data-pc-section","headeraction"),m(),f("ngIf",!r.iconTemplate),m(),f("ngTemplateOutlet",r.iconTemplate)("ngTemplateOutletContext",_e(34,Sie,r.selected)),m(),f("ngIf",!r.hasHeaderFacet),m(),f("ngTemplateOutlet",r.headerTemplate),m(),f("ngIf",r.hasHeaderFacet),m(),f("@tabContent",r.selected?_e(38,Mie,_e(36,U4,r.transitionOptions)):_e(42,Die,_e(40,U4,r.transitionOptions))),O("id",r.getTabContentId(r.id))("aria-hidden",!r.selected)("aria-labelledby",r.getTabHeaderActionId(r.id))("data-pc-section","toggleablecontent"),m(),f("ngClass",r.contentStyleClass)("ngStyle",r.contentStyle),m(2),f("ngIf",r.contentTemplate&&(r.cache?r.loaded:r.selected)))},dependencies:()=>[Ye,ot,Mt,st,ls,$u],styles:[`@layer primeng{.p-accordion-header-link{cursor:pointer;display:flex;align-items:center;-webkit-user-select:none;user-select:none;position:relative;text-decoration:none}.p-accordion-header-link:focus{z-index:1}.p-accordion-header-text{line-height:1}.p-accordion .p-toggleable-content{overflow:hidden}.p-accordion .p-accordion-tab-active>.p-toggleable-content:not(.ng-animating){overflow:inherit}.p-accordion-toggle-icon-end{order:1;margin-left:auto}.p-accordion-toggle-icon{order:0}} +`],encapsulation:2,data:{animation:[oi("tabContent",[ku("hidden",Ct({height:"0",visibility:"hidden"})),ku("visible",Ct({height:"*",visibility:"visible"})),mn("visible <=> hidden",[fn("{{transitionParams}}")]),mn("void => *",fn(0))])]},changeDetection:0})}return n})(),TT=(()=>{class n{el;changeDetector;multiple=!1;style;styleClass;expandIcon;collapseIcon;get activeIndex(){return this._activeIndex}set activeIndex(t){if(this._activeIndex=t,this.preventActiveIndexPropagation){this.preventActiveIndexPropagation=!1;return}this.updateSelectionState()}selectOnFocus=!1;get headerAriaLevel(){return this._headerAriaLevel}set headerAriaLevel(t){typeof t=="number"&&t>0?this._headerAriaLevel=t:this._headerAriaLevel!==2&&(this._headerAriaLevel=2)}onClose=new j;onOpen=new j;activeIndexChange=new j;tabList;tabListSubscription=null;_activeIndex;_headerAriaLevel=2;preventActiveIndexPropagation=!1;tabs=[];constructor(t,i){this.el=t,this.changeDetector=i}onKeydown(t){switch(t.code){case"ArrowDown":this.onTabArrowDownKey(t);break;case"ArrowUp":this.onTabArrowUpKey(t);break;case"Home":t.shiftKey||this.onTabHomeKey(t);break;case"End":t.shiftKey||this.onTabEndKey(t);break}}focusedElementIsAccordionHeader(){return document.activeElement.tagName.toLowerCase()==="a"&&document.activeElement.classList.contains("p-accordion-header-link")}onTabArrowDownKey(t){if(this.focusedElementIsAccordionHeader()){let i=this.findNextHeaderAction(t.target.parentElement.parentElement.parentElement);i?this.changeFocusedTab(i):this.onTabHomeKey(t),t.preventDefault()}}onTabArrowUpKey(t){if(this.focusedElementIsAccordionHeader()){let i=this.findPrevHeaderAction(t.target.parentElement.parentElement.parentElement);i?this.changeFocusedTab(i):this.onTabEndKey(t),t.preventDefault()}}onTabHomeKey(t){let i=this.findFirstHeaderAction();this.changeFocusedTab(i),t.preventDefault()}changeFocusedTab(t){t&&(A.focus(t),this.selectOnFocus&&this.tabs.forEach((i,r)=>{let o=this.multiple?this._activeIndex.includes(r):r===this._activeIndex;this.multiple?(this._activeIndex||(this._activeIndex=[]),i.id==t.id&&(i.selected=!i.selected,this._activeIndex.includes(r)?this._activeIndex=this._activeIndex.filter(s=>s!==r):this._activeIndex.push(r))):i.id==t.id?(i.selected=!i.selected,this._activeIndex=r):i.selected=!1,i.selectedChange.emit(o),this.activeIndexChange.emit(this._activeIndex),i.changeDetector.markForCheck()}))}findNextHeaderAction(t,i=!1){let r=i?t:t.nextElementSibling,o=A.findSingle(r,'[data-pc-section="header"]');return o?A.getAttribute(o,"data-p-disabled")?this.findNextHeaderAction(o.parentElement.parentElement):A.findSingle(o,'[data-pc-section="headeraction"]'):null}findPrevHeaderAction(t,i=!1){let r=i?t:t.previousElementSibling,o=A.findSingle(r,'[data-pc-section="header"]');return o?A.getAttribute(o,"data-p-disabled")?this.findPrevHeaderAction(o.parentElement.parentElement):A.findSingle(o,'[data-pc-section="headeraction"]'):null}findFirstHeaderAction(){let t=this.el.nativeElement.firstElementChild.childNodes[0];return this.findNextHeaderAction(t,!0)}findLastHeaderAction(){let t=this.el.nativeElement.firstElementChild.childNodes,i=t[t.length-1];return this.findPrevHeaderAction(i,!0)}onTabEndKey(t){let i=this.findLastHeaderAction();this.changeFocusedTab(i),t.preventDefault()}ngAfterContentInit(){this.initTabs(),this.tabListSubscription=this.tabList.changes.subscribe(t=>{this.initTabs()})}initTabs(){this.tabs=this.tabList.toArray(),this.tabs.forEach(t=>{t.headerAriaLevel=this._headerAriaLevel}),this.updateSelectionState(),this.changeDetector.markForCheck()}getBlockableElement(){return this.el.nativeElement.children[0]}updateSelectionState(){if(this.tabs&&this.tabs.length&&this._activeIndex!=null)for(let t=0;t{if(i.selected)if(this.multiple)t.push(r);else{t=r;return}}),this.preventActiveIndexPropagation=!0,this._activeIndex=t,this.activeIndexChange.emit(t)}ngOnDestroy(){this.tabListSubscription&&this.tabListSubscription.unsubscribe()}static \u0275fac=function(i){return new(i||n)(k(Ce),k(De))};static \u0275cmp=F({type:n,selectors:[["p-accordion"]],contentQueries:function(i,r,o){if(i&1&&Je(o,xT,5),i&2){let s;J(s=X())&&(r.tabList=s)}},hostAttrs:[1,"p-element"],hostBindings:function(i,r){i&1&&P("keydown",function(s){return r.onKeydown(s)})},inputs:{multiple:[2,"multiple","multiple",V],style:"style",styleClass:"styleClass",expandIcon:"expandIcon",collapseIcon:"collapseIcon",activeIndex:"activeIndex",selectOnFocus:[2,"selectOnFocus","selectOnFocus",V],headerAriaLevel:"headerAriaLevel"},outputs:{onClose:"onClose",onOpen:"onOpen",activeIndexChange:"activeIndexChange"},features:[$e],ngContentSelectors:$ie,decls:2,vars:4,consts:[[3,"ngClass","ngStyle"]],template:function(i,r){i&1&&(ln(),b(0,"div",0),Vt(1),C()),i&2&&(W(r.styleClass),f("ngClass","p-accordion p-component")("ngStyle",r.style))},dependencies:[Ye,st],encapsulation:2,changeDetection:0})}return n})(),H4=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,ls,$u,Ge]})}return n})();var Gie=["input"],qie=(n,e,t,i)=>({"p-radiobutton p-component":!0,"p-radiobutton-checked":n,"p-radiobutton-disabled":e,"p-radiobutton-focused":t,"p-variant-filled":i}),Qie=(n,e,t)=>({"p-radiobutton-box":!0,"p-highlight":n,"p-disabled":e,"p-focus":t}),Kie=(n,e,t)=>({"p-radiobutton-label":!0,"p-radiobutton-label-active":n,"p-disabled":e,"p-radiobutton-label-focus":t});function Yie(n,e){if(n&1){let t=$();b(0,"label",7),P("click",function(r){M(t);let o=y();return D(o.select(r))}),Z(1),C()}if(n&2){let t=y(),i=pt(3);W(t.labelStyleClass),f("ngClass",Sn(6,Kie,i.checked,t.disabled,t.focused)),O("for",t.inputId)("data-pc-section","label"),m(),Pe(t.label)}}var Zie={provide:ti,useExisting:dn(()=>ET),multi:!0},Jie=(()=>{class n{accessors=[];add(t,i){this.accessors.push([t,i])}remove(t){this.accessors=this.accessors.filter(i=>i[1]!==t)}select(t){this.accessors.forEach(i=>{this.isSameGroup(i,t)&&i[1]!==t&&i[1].writeValue(t.value)})}isSameGroup(t,i){return t[0].control?t[0].control.root===i.control.control.root&&t[1].name===i.name:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),ET=(()=>{class n{cd;injector;registry;config;value;formControlName;name;disabled;label;variant="outlined";tabindex;inputId;ariaLabelledBy;ariaLabel;style;styleClass;labelStyleClass;autofocus;onClick=new j;onFocus=new j;onBlur=new j;inputViewChild;onModelChange=()=>{};onModelTouched=()=>{};checked;focused;control;constructor(t,i,r,o){this.cd=t,this.injector=i,this.registry=r,this.config=o}ngOnInit(){this.control=this.injector.get(Hi),this.checkName(),this.registry.add(this.control,this)}handleClick(t,i,r){t.preventDefault(),!this.disabled&&(this.select(t),r&&i.focus())}select(t){this.disabled||(this.inputViewChild.nativeElement.checked=!0,this.checked=!0,this.onModelChange(this.value),this.registry.select(this),this.onClick.emit({originalEvent:t,value:this.value}))}writeValue(t){this.checked=t==this.value,this.inputViewChild&&this.inputViewChild.nativeElement&&(this.inputViewChild.nativeElement.checked=this.checked),this.cd.markForCheck()}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){this.disabled=t,this.cd.markForCheck()}onInputFocus(t){this.focused=!0,this.onFocus.emit(t)}onInputBlur(t){this.focused=!1,this.onModelTouched(),this.onBlur.emit(t)}focus(){this.inputViewChild.nativeElement.focus()}ngOnDestroy(){this.registry.remove(this)}checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this.throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}throwNameError(){throw new Error(` + If you define both a name and a formControlName attribute on your radio button, their values + must match. Ex: + `)}static \u0275fac=function(i){return new(i||n)(k(De),k($t),k(Jie),k(Pt))};static \u0275cmp=F({type:n,selectors:[["p-radioButton"]],viewQuery:function(i,r){if(i&1&&fe(Gie,5),i&2){let o;J(o=X())&&(r.inputViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",formControlName:"formControlName",name:"name",disabled:[2,"disabled","disabled",V],label:"label",variant:"variant",tabindex:[2,"tabindex","tabindex",Ke],inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass",autofocus:[2,"autofocus","autofocus",V]},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[on([Zie]),$e],decls:7,vars:31,consts:[["input",""],[3,"click","ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","radio","pAutoFocus","",3,"focus","blur","checked","disabled","value","autofocus"],[3,"ngClass"],[1,"p-radiobutton-icon"],[3,"class","ngClass","click",4,"ngIf"],[3,"click","ngClass"]],template:function(i,r){if(i&1){let o=$();b(0,"div",1),P("click",function(a){M(o);let l=pt(3);return D(r.handleClick(a,l,!0))}),b(1,"div",2)(2,"input",3,0),P("focus",function(a){return M(o),D(r.onInputFocus(a))})("blur",function(a){return M(o),D(r.onInputBlur(a))}),C()(),b(4,"div",4),E(5,"span",5),C()(),x(6,Yie,2,10,"label",6)}i&2&&(W(r.styleClass),f("ngStyle",r.style)("ngClass",kr(22,qie,r.checked,r.disabled,r.focused,r.variant==="filled"||r.config.inputStyle()==="filled")),O("data-pc-name","radiobutton")("data-pc-section","root"),m(),O("data-pc-section","hiddenInputWrapper"),m(),f("checked",r.checked)("disabled",r.disabled)("value",r.value)("autofocus",r.autofocus),O("id",r.inputId)("name",r.name)("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("tabindex",r.tabindex)("aria-checked",r.checked)("data-pc-section","hiddenInput"),m(2),f("ngClass",Sn(27,Qie,r.checked,r.disabled,r.focused)),O("data-pc-section","input"),m(),O("data-pc-section","icon"),m(),f("ngIf",r.label))},dependencies:[Ye,ot,st,ts],encapsulation:2,changeDetection:0})}return n})(),$4=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Ba]})}return n})();var Ly=(()=>{let e=class e{constructor(i,r,o){this.el=i,this.renderer=r,this.formGroupDirective=o,r.addClass(this.el.nativeElement,"p-label-input-required")}set checkIsRequiredControl(i){this.isRequiredControl(i)||this.renderer.removeClass(this.el.nativeElement,"p-label-input-required")}isRequiredControl(i){let r=this.formGroupDirective.control?.get(i);return!!(r&&r.hasValidator(Si.required))}};e.\u0275fac=function(r){return new(r||e)(k(Ce),k(At),k($i))},e.\u0275dir=gt({type:e,selectors:[["","dotFieldRequired",""]],inputs:{checkIsRequiredControl:"checkIsRequiredControl"},standalone:!0});let n=e;return n})();var tre=/^[a-zA-Z0-9\-_]+$/,nre=/^[a-zA-Z0-9_]*$/,ire=/^(ftp|http|https):\/\/[^ "]+$/,Py={alphaNumericErrorMsg:{alphaNumeric:"contenttypes.form.field.validation.alphanumeric"},validQueryParamNameErrorMsg:{validQueryParamName:"dot.common.form.field.validation.validQueryParamName"},whiteSpaceOnlyMgs:{whiteSpaceOnly:"dot.common.form.field.validation.noWhitespace"},urlMsg:{invalidUrl:"dot.common.form.field.validation.url"}},cd=class{static alphaNumeric(e){return nre.test(e.value)?null:Py.alphaNumericErrorMsg}static validQueryParamName(e){return tre.test(e.value)?null:Py.validQueryParamNameErrorMsg}static noWhitespace(e){return/^(?!\s+$).*/.test(e.value)?null:Py.whiteSpaceOnlyMgs}static url(e){return ire.test(e.value)?null:Py.urlMsg}};function rre(n,e){n&1&&(b(0,"div",18),E(1,"p-radioButton",19),b(2,"label",20),Z(3),ht(4,"dm"),C()(),b(5,"span"),Z(6),ht(7,"dm"),C()),n&2&&(m(3),yt(" ",ft(4,2,"block-editor.extension.ai-image.existing.content")," "),m(3),Pe(ft(7,4,"block-editor.extension.ai-image.existing.content.desc")))}function ore(n,e){if(n&1&&(b(0,"label",12),Z(1),ht(2,"dm"),C()),n&2){let t=y();m(),yt(" ",ft(2,1,t.promptLabel)," ")}}function sre(n,e){if(n&1&&(b(0,"label",13),Z(1),ht(2,"dm"),C()),n&2){let t=y();m(),yt(" ",ft(2,1,t.promptLabel)," ")}}function are(n,e){if(n&1&&(b(0,"div",11)(1,"label",21),Z(2),ht(3,"dm"),C(),b(4,"div",22),E(5,"textarea",23)(6,"dot-copy-button",24),C()()),n&2){let t=y();m(2),yt(" ",ft(3,3,"block-editor.extension.ai-image.rewritten")," "),m(3),f("value",t.aiProcessedPrompt),m(),f("copy",t.aiProcessedPrompt)}}function lre(n,e){n&1&&(Ne(),b(0,"svg",16),E(1,"path",25)(2,"path",26)(3,"path",27),C())}function cre(n,e){n&1&&E(0,"i",17)}var W4=(()=>{let e=class e{constructor(){this.isLoading=!1,this.hasEditorContent=!0,this.valueChange=new j,this.generate=new j,this.dotMessageService=B(Qt),this.promptTextAreaPlaceholder="block-editor.extension.ai-image.custom.placeholder",this.promptLabel="block-editor.extension.ai-image.prompt",this.submitButtonLabel="block-editor.extension.ai-image.generate",this.requiredPrompt=!0,this.tooltipText=null,this.orientationOptions=[{value:"1792x1024",label:this.dotMessageService.get("block-editor.extension.ai-image.orientation.horizontal")},{value:"1024x1024",label:this.dotMessageService.get("block-editor.extension.ai-image.orientation.square")},{value:"1024x1792",label:this.dotMessageService.get("block-editor.extension.ai-image.orientation.vertical")}],this.isUpdatingValidators=!1,this.destroyRef=B(ri),this.initForm()}ngOnChanges(i){let{value:r,isLoading:o}=i;this.updatedFormValues(r,o?.currentValue),this.setSubmitButtonLabel(o?.currentValue),this.toggleFormState(o?.currentValue&&!o.firstChange)}initForm(){this.form=new Na({text:new Lr("",[Si.required,cd.noWhitespace]),type:new Lr("input",Si.required),size:new Lr("1792x1024",Si.required)});let i=this.form.get("type");this.form.valueChanges.pipe(Hr(this.destroyRef),rn(()=>!this.isUpdatingValidators)).subscribe(r=>this.valueChange.emit(r)),i.valueChanges.pipe(Hr(this.destroyRef)).subscribe(r=>this.updatePromptControl(r))}updatePromptControl(i){this.isUpdatingValidators=!0;let r=this.form.get("text"),o=i==="input";r.setValidators(o?Si.required:null),r.updateValueAndValidity(),this.setPromptLabels(o),this.isUpdatingValidators=!1,this.requiredPrompt=o}setPromptLabels(i){i?(this.promptLabel="block-editor.extension.ai-image.prompt",this.promptTextAreaPlaceholder="block-editor.extension.ai-image.custom.placeholder"):(this.promptLabel="block-editor.extension.ai-image.custom.props",this.promptTextAreaPlaceholder="block-editor.extension.ai-image.placeholder")}toggleFormState(i){i?this.form?.disable():this.form?.enable()}updatedFormValues(i,r){if(i?.currentValue&&!i.firstChange&&!r){let o=i.currentValue;this.form.patchValue(o.request),this.form.clearValidators(),this.form.updateValueAndValidity(),this.aiProcessedPrompt=o.response?.revised_prompt}}setSubmitButtonLabel(i){this.submitButtonLabel=i?"block-editor.extension.ai-image.generating":this.aiProcessedPrompt||this.value?.error?"block-editor.extension.ai-image.regenerate":"block-editor.extension.ai-image.generate"}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-ai-image-prompt-form"]],inputs:{value:"value",isLoading:"isLoading",hasEditorContent:"hasEditorContent"},outputs:{valueChange:"valueChange",generate:"generate"},standalone:!0,features:[Jt,ue],decls:35,vars:37,consts:[[3,"ngSubmit","formGroup"],["collapseIcon","pi pi-angle-up","expandIcon","pi pi-angle-down",3,"multiple","activeIndex"],["iconPos","end",3,"disabled","header"],[1,"field","ai-image-prompt__input"],["dotFieldRequired",""],["formControlName","type","inputId","optionOne","value","input"],["for","optionOne",1,"ml-2"],[1,"field","ai-image-prompt__orientation"],["dotFieldRequired","","for","orientation"],["formControlName","size","inputId","orientation","styleClass","w-full",3,"options"],[1,"ai-image-prompt__text"],[1,"field"],["data-testid","prompt-label","dotFieldRequired","","for","prompt"],["data-testid","prompt-label","for","prompt"],["id","prompt","cols","30","formControlName","text","pInputTextarea","","rows","11",1,"w-full","ai-image-prompt__textarea",3,"placeholder"],["pButton","","type","submit",1,"align-self-end","p-button-outlined",3,"disabled","label"],["fill","none","height","22","viewBox","0 0 18 22","width","18","xmlns","http://www.w3.org/2000/svg"],[1,"pi","pi-spin","pi-spinner"],["data-testid","ai-existing-content"],["formControlName","type","inputId","option2","value","auto"],["for","option2",1,"ml-2"],["for","prompt-rewritten",1,"ai-image-prompt__rewritten-label"],[1,"ai-image-prompt__text-wrapper"],["id","prompt-rewritten","cols","30","pInputTextarea","","readonly","","rows","10",1,"w-full","ai-image-prompt__rewritten-textarea",3,"value"],["customClass","p-button-rounded",3,"copy"],["d","M9.48043 13.2597L5.40457 14.5046C5.29885 14.5368 5.20602 14.6037 5.13999 14.6952C5.07396 14.7868 5.03828 14.8981 5.03828 15.0124C5.03828 15.1268 5.07396 15.238 5.13999 15.3296C5.20602 15.4211 5.29885 15.488 5.40457 15.5203L9.48043 16.7651L10.6799 20.9949C10.711 21.1046 10.7755 21.2009 10.8637 21.2695C10.9519 21.338 11.0591 21.375 11.1693 21.375C11.2795 21.375 11.3867 21.338 11.4749 21.2695C11.5631 21.2009 11.6276 21.1046 11.6586 20.9949L12.8586 16.7651L16.9345 15.5203C17.0402 15.488 17.133 15.4211 17.1991 15.3296C17.2651 15.238 17.3008 15.1268 17.3008 15.0124C17.3008 14.8981 17.2651 14.7868 17.1991 14.6952C17.133 14.6037 17.0402 14.5368 16.9345 14.5046L12.8586 13.2597L11.6586 9.02989C11.6276 8.92018 11.5631 8.82385 11.4749 8.75533C11.3867 8.6868 11.2795 8.64977 11.1693 8.64977C11.0591 8.64977 10.9519 8.6868 10.8637 8.75533C10.7754 8.82385 10.711 8.92018 10.6799 9.02989L9.48043 13.2597Z","fill","#426BF0"],["d","M14.4668 5.66732L16.6779 4.99138C16.7836 4.95914 16.8764 4.89224 16.9424 4.8007C17.0084 4.70916 17.0441 4.59789 17.0441 4.48355C17.0441 4.3692 17.0084 4.25794 16.9424 4.16639C16.8764 4.07485 16.7836 4.00795 16.6779 3.97571L14.4668 3.3003L13.8154 1.00513C13.7844 0.895414 13.7199 0.799084 13.6317 0.730559C13.5435 0.662034 13.4362 0.625 13.3261 0.625C13.2159 0.625 13.1086 0.662034 13.0204 0.730559C12.9322 0.799084 12.8677 0.895414 12.8367 1.00513L12.1859 3.3003L9.9743 3.97571C9.86858 4.00794 9.77575 4.07483 9.70972 4.16638C9.6437 4.25792 9.60801 4.3692 9.60801 4.48355C9.60801 4.5979 9.6437 4.70917 9.70972 4.80072C9.77575 4.89226 9.86858 4.95915 9.9743 4.99138L12.1859 5.66732L12.8367 7.96196C12.8677 8.07168 12.9322 8.16801 13.0204 8.23653C13.1086 8.30506 13.2159 8.34209 13.3261 8.34209C13.4362 8.34209 13.5435 8.30506 13.6317 8.23653C13.7199 8.16801 13.7844 8.07168 13.8154 7.96196L14.4668 5.66732Z","fill","#426BF0"],["d","M3.24925 6.62823L1.01825 7.57256C0.924385 7.61231 0.844063 7.68016 0.787521 7.76748C0.730978 7.8548 0.700781 7.95761 0.700781 8.06282C0.700781 8.16802 0.730978 8.27083 0.787521 8.35815C0.844063 8.44547 0.924385 8.51333 1.01825 8.55307L3.24925 9.4974L4.1592 11.8127C4.19751 11.9101 4.2629 11.9935 4.34704 12.0522C4.43118 12.1109 4.53026 12.1422 4.63163 12.1422C4.733 12.1422 4.83208 12.1109 4.91622 12.0522C5.00036 11.9935 5.06576 11.9101 5.10406 11.8127L6.01402 9.4974L8.24456 8.55307C8.33841 8.51332 8.41873 8.44546 8.47527 8.35815C8.53181 8.27083 8.56201 8.16801 8.56201 8.06282C8.56201 7.95762 8.53181 7.8548 8.47527 7.76749C8.41873 7.68017 8.33841 7.61231 8.24456 7.57256L6.01402 6.62823L5.10406 4.31342C5.06576 4.21602 5.00036 4.13266 4.91622 4.07399C4.83208 4.01531 4.733 3.98397 4.63163 3.98397C4.53026 3.98397 4.43118 4.01531 4.34704 4.07399C4.2629 4.13266 4.19751 4.21602 4.1592 4.31342L3.24925 6.62823Z","fill","#426BF0"]],template:function(r,o){r&1&&(b(0,"form",0),P("ngSubmit",function(){return o.generate.emit()}),b(1,"p-accordion",1)(2,"p-accordionTab",2),ht(3,"dm"),b(4,"div",3)(5,"label",4),Z(6),ht(7,"dm"),C(),b(8,"div"),E(9,"p-radioButton",5),b(10,"label",6),Z(11),ht(12,"dm"),C()(),b(13,"span"),Z(14),ht(15,"dm"),C(),x(16,rre,8,6),C(),b(17,"div",7)(18,"label",8),Z(19),ht(20,"dm"),C(),E(21,"p-dropdown",9),C()(),b(22,"p-accordionTab",2),ht(23,"dm"),b(24,"div",10)(25,"div",11),x(26,ore,3,3,"label",12)(27,sre,3,3,"label",13),E(28,"textarea",14),ht(29,"dm"),C(),x(30,are,7,5,"div",11),C()()(),b(31,"button",15),ht(32,"dm"),x(33,lre,4,0,":svg:svg",16)(34,cre,1,0,"i",17),C()()),r&2&&(f("formGroup",o.form),m(),f("multiple",!1)("activeIndex",0),m(),f("disabled",o.isLoading)("header",ft(3,21,"block-editor.extension.ai-image.settings")),m(4),Pe(ft(7,23,"block-editor.extension.ai-image.input")),m(5),yt(" ",ft(12,25,"block-editor.extension.ai-image.custom.prompt")," "),m(3),Pe(ft(15,27,"block-editor.extension.ai-image.custom.prompt.desc")),m(2),we(o.hasEditorContent?16:-1),m(3),yt(" ",ft(20,29,"block-editor.extension.ai-image.orientation")," "),m(2),f("options",o.orientationOptions),m(),f("disabled",o.isLoading)("header",ft(23,31,"block-editor.extension.ai-image.prompt")),m(2),Gt("ai-image-prompt__text--generated",o.aiProcessedPrompt&&!o.isLoading),m(2),we(o.requiredPrompt?26:27),m(2),f("placeholder",ft(29,33,o.promptTextAreaPlaceholder)),m(2),we(o.aiProcessedPrompt&&!o.isLoading?30:-1),m(),f("disabled",o.form.invalid||o.isLoading)("label",ft(32,35,o.submitButtonLabel)),m(2),we(o.isLoading?34:33))},dependencies:[an,zt,H4,TT,xT,gr,$4,ET,ho,Zo,Pr,Rr,Yo,$i,po,hr,wh,_x,Uu,ny,Ly,Dn,Ny],styles:["[_nghost-%COMP%] .p-accordion-tab:not(.p-accordion-tab-active) .p-toggleable-content{height:0;overflow:hidden}[_nghost-%COMP%] .p-accordion-tab.p-accordion-tab-active .p-toggleable-content{height:auto;overflow:auto}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;justify-content:center}.ai-image-prompt__input[_ngcontent-%COMP%]{display:flex;flex-direction:column}.ai-image-prompt__input[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:center}.ai-image-prompt__input[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;margin:.25rem 0 .5rem 2rem;font-size:.75rem;color:#6c7389;word-break:break-word}.ai-image-prompt__text[_ngcontent-%COMP%] .field[_ngcontent-%COMP%]:last-child{margin-bottom:0}.ai-image-prompt__text[_ngcontent-%COMP%] .ai-image-prompt__textarea[_ngcontent-%COMP%]{height:23rem}.ai-image-prompt__text.ai-image-prompt__text--generated[_ngcontent-%COMP%] .ai-image-prompt__textarea[_ngcontent-%COMP%]{height:6rem}.ai-image-prompt__text.ai-image-prompt__text--generated[_ngcontent-%COMP%] .ai-image-prompt__rewritten-textarea[_ngcontent-%COMP%]{height:14rem}.ai-image-prompt__text-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative}.ai-image-prompt__text-wrapper[_ngcontent-%COMP%] .p-inputtext.p-inputtextarea[_ngcontent-%COMP%]{padding:.5rem 2rem .5rem 1.5rem;min-height:4rem}.ai-image-prompt__text-wrapper[_ngcontent-%COMP%] dot-copy-button[_ngcontent-%COMP%]{position:absolute;right:1rem;bottom:.25rem}.ai-image-prompt__orientation[_ngcontent-%COMP%]{margin-bottom:9rem}.ai-image-prompt__rewritten-label[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}p-accordion[_ngcontent-%COMP%]{min-height:37rem}"],changeDetection:0});let n=e;return n})();var ure=["mask"],dre=["container"],pre=n=>({"p-galleria-mask p-component-overlay p-component-overlay-enter":!0,"p-galleria-visible":n}),hre=(n,e)=>({showTransitionParams:n,hideTransitionParams:e}),fre=n=>({value:"visible",params:n});function mre(n,e){if(n&1){let t=$();b(0,"p-galleriaContent",7),P("@animation.start",function(r){M(t);let o=y(3);return D(o.onAnimationStart(r))})("@animation.done",function(r){M(t);let o=y(3);return D(o.onAnimationEnd(r))})("maskHide",function(){M(t);let r=y(3);return D(r.onMaskHide())})("activeItemChange",function(r){M(t);let o=y(3);return D(o.onActiveItemChange(r))}),C()}if(n&2){let t=y(3);f("@animation",_e(9,fre,_t(6,hre,t.showTransitionOptions,t.hideTransitionOptions)))("value",t.value)("activeIndex",t.activeIndex)("numVisible",t.numVisibleLimit||t.numVisible)("ngStyle",t.containerStyle)("fullScreen",t.fullScreen)}}function gre(n,e){if(n&1&&(b(0,"div",5,2),x(2,mre,1,11,"p-galleriaContent",6),C()),n&2){let t=y(2);W(t.maskClass),f("ngClass",_e(6,pre,t.visible)),O("role",t.fullScreen?"dialog":"region")("aria-modal",t.fullScreen?"true":void 0),m(2),f("ngIf",t.visible)}}function yre(n,e){if(n&1&&(b(0,"div",null,1),x(2,gre,3,8,"div",4),C()),n&2){let t=y();m(2),f("ngIf",t.maskVisible)}}function _re(n,e){if(n&1){let t=$();b(0,"p-galleriaContent",8),P("activeItemChange",function(r){M(t);let o=y();return D(o.onActiveItemChange(r))}),C()}if(n&2){let t=y();f("value",t.value)("activeIndex",t.activeIndex)("numVisible",t.numVisibleLimit||t.numVisible)}}var vre=["closeButton"],bre=(n,e,t)=>({"p-galleria p-component":!0,"p-galleria-fullscreen":n,"p-galleria-indicator-onitem":e,"p-galleria-item-nav-onhover":t}),Cre=()=>({});function wre(n,e){n&1&&E(0,"TimesIcon",11),n&2&&f("styleClass","p-galleria-close-icon")}function Ire(n,e){}function xre(n,e){n&1&&x(0,Ire,0,0,"ng-template")}function Tre(n,e){if(n&1){let t=$();b(0,"button",8),P("click",function(){M(t);let r=y(2);return D(r.maskHide.emit())}),x(1,wre,1,1,"TimesIcon",9)(2,xre,1,0,null,10),C()}if(n&2){let t=y(2);O("aria-label",t.closeAriaLabel())("data-pc-section","closebutton"),m(),f("ngIf",!t.galleria.closeIconTemplate),m(),f("ngTemplateOutlet",t.galleria.closeIconTemplate)}}function Ere(n,e){if(n&1&&(b(0,"div",12),E(1,"p-galleriaItemSlot",13),C()),n&2){let t=y(2);m(),f("templates",t.galleria.templates)}}function Sre(n,e){if(n&1){let t=$();b(0,"p-galleriaThumbnails",14),P("onActiveIndexChange",function(r){M(t);let o=y(2);return D(o.onActiveIndexChange(r))})("stopSlideShow",function(){M(t);let r=y(2);return D(r.stopSlideShow())}),C()}if(n&2){let t=y(2);f("containerId",t.id)("value",t.value)("activeIndex",t.activeIndex)("templates",t.galleria.templates)("numVisible",t.numVisible)("responsiveOptions",t.galleria.responsiveOptions)("circular",t.galleria.circular)("isVertical",t.isVertical())("contentHeight",t.galleria.verticalThumbnailViewPortHeight)("showThumbnailNavigators",t.galleria.showThumbnailNavigators)("slideShowActive",t.slideShowActive)}}function Mre(n,e){if(n&1&&(b(0,"div",15),E(1,"p-galleriaItemSlot",16),C()),n&2){let t=y(2);m(),f("templates",t.galleria.templates)}}function Dre(n,e){if(n&1){let t=$();b(0,"div",1),x(1,Tre,3,4,"button",2)(2,Ere,2,1,"div",3),b(3,"div",4)(4,"p-galleriaItem",5),P("onActiveIndexChange",function(r){M(t);let o=y();return D(o.onActiveIndexChange(r))})("startSlideShow",function(){M(t);let r=y();return D(r.startSlideShow())})("stopSlideShow",function(){M(t);let r=y();return D(r.stopSlideShow())}),C(),x(5,Sre,1,11,"p-galleriaThumbnails",6),C(),x(6,Mre,2,1,"div",7),C()}if(n&2){let t=y();W(t.galleriaClass()),f("ngClass",Sn(24,bre,t.galleria.fullScreen,t.galleria.showIndicatorsOnItem,t.galleria.showItemNavigatorsOnHover&&!t.galleria.fullScreen))("ngStyle",t.galleria.fullScreen?St(28,Cre):t.galleria.containerStyle)("pFocusTrapDisabled",!t.fullScreen),O("id",t.id)("role","region"),m(),f("ngIf",t.galleria.fullScreen),m(),f("ngIf",t.galleria.templates&&t.galleria.headerFacet),m(),O("aria-live",t.galleria.autoPlay?"polite":"off"),m(),f("id",t.id)("value",t.value)("activeIndex",t.activeIndex)("circular",t.galleria.circular)("templates",t.galleria.templates)("showIndicators",t.galleria.showIndicators)("changeItemOnIndicatorHover",t.galleria.changeItemOnIndicatorHover)("indicatorFacet",t.galleria.indicatorFacet)("captionFacet",t.galleria.captionFacet)("showItemNavigators",t.galleria.showItemNavigators)("autoPlay",t.galleria.autoPlay)("slideShowActive",t.slideShowActive),m(),f("ngIf",t.galleria.showThumbnails),m(),f("ngIf",t.galleria.templates&&t.galleria.footerFacet)}}function Ore(n,e){n&1&&ye(0)}function Are(n,e){if(n&1&&(oe(0),x(1,Ore,1,0,"ng-container",1),se()),n&2){let t=y();m(),f("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",t.context)}}var kre=(n,e)=>({"p-galleria-item-prev p-galleria-item-nav p-link":!0,"p-galleria-item-nav-focused":n,"p-disabled":e}),Nre=(n,e)=>({"p-galleria-item-next p-galleria-item-nav p-link":!0,"p-galleria-item-nav-focused":n,"p-disabled":e}),Lre=n=>({"p-galleria-indicator":!0,"p-highlight":n});function Pre(n,e){n&1&&E(0,"ChevronLeftIcon",11),n&2&&f("styleClass","p-galleria-item-prev-icon")}function Rre(n,e){}function Fre(n,e){n&1&&x(0,Rre,0,0,"ng-template")}function jre(n,e){if(n&1){let t=$();b(0,"button",8),P("click",function(r){M(t);let o=y();return D(o.navBackward(r))})("focus",function(){M(t);let r=y();return D(r.onButtonFocus("left"))})("blur",function(){M(t);let r=y();return D(r.onButtonBlur("left"))}),x(1,Pre,1,1,"ChevronLeftIcon",9)(2,Fre,1,0,null,10),C()}if(n&2){let t=y();f("ngClass",_t(4,kre,t.leftButtonFocused,t.isNavBackwardDisabled()))("disabled",t.isNavBackwardDisabled()),m(),f("ngIf",!t.galleria.itemPreviousIconTemplate),m(),f("ngTemplateOutlet",t.galleria.itemPreviousIconTemplate)}}function Vre(n,e){n&1&&E(0,"ChevronRightIcon",11),n&2&&f("styleClass","p-galleria-item-next-icon")}function Bre(n,e){}function zre(n,e){n&1&&x(0,Bre,0,0,"ng-template")}function Ure(n,e){if(n&1){let t=$();b(0,"button",12),P("click",function(r){M(t);let o=y();return D(o.navForward(r))})("focus",function(){M(t);let r=y();return D(r.onButtonFocus("right"))})("blur",function(){M(t);let r=y();return D(r.onButtonBlur("right"))}),x(1,Vre,1,1,"ChevronRightIcon",9)(2,zre,1,0,null,10),C()}if(n&2){let t=y();f("ngClass",_t(4,Nre,t.rightButtonFocused,t.isNavForwardDisabled()))("disabled",t.isNavForwardDisabled()),m(),f("ngIf",!t.galleria.itemNextIconTemplate),m(),f("ngTemplateOutlet",t.galleria.itemNextIconTemplate)}}function Hre(n,e){if(n&1&&(b(0,"div",13),E(1,"p-galleriaItemSlot",14),C()),n&2){let t=y();m(),f("item",t.activeItem)("templates",t.templates)}}function $re(n,e){n&1&&E(0,"button",20)}function Wre(n,e){if(n&1){let t=$();b(0,"li",17),P("click",function(){let r=M(t).index,o=y(2);return D(o.onIndicatorClick(r))})("mouseenter",function(){let r=M(t).index,o=y(2);return D(o.onIndicatorMouseEnter(r))})("keydown",function(r){let o=M(t).index,s=y(2);return D(s.onIndicatorKeyDown(r,o))}),x(1,$re,1,0,"button",18),E(2,"p-galleriaItemSlot",19),C()}if(n&2){let t=e.index,i=y(2);f("ngClass",_e(7,Lre,i.isIndicatorItemActive(t))),O("aria-label",i.ariaPageLabel(t+1))("aria-selected",i.activeIndex===t)("aria-controls",i.id+"_item_"+t),m(),f("ngIf",!i.indicatorFacet),m(),f("index",t)("templates",i.templates)}}function Gre(n,e){if(n&1&&(b(0,"ul",15),x(1,Wre,3,9,"li",16),C()),n&2){let t=y();m(),f("ngForOf",t.value)}}var qre=["itemsContainer"],Qre=n=>({height:n}),Kre=n=>({"p-galleria-thumbnail-prev p-link":!0,"p-disabled":n}),Yre=(n,e,t,i)=>({"p-galleria-thumbnail-item":!0,"p-galleria-thumbnail-item-current":n,"p-galleria-thumbnail-item-active":e,"p-galleria-thumbnail-item-start":t,"p-galleria-thumbnail-item-end":i}),Zre=n=>({"p-galleria-thumbnail-next p-link":!0,"p-disabled":n});function Jre(n,e){n&1&&E(0,"ChevronLeftIcon",11),n&2&&f("styleClass","p-galleria-thumbnail-prev-icon")}function Xre(n,e){n&1&&E(0,"ChevronUpIcon",11),n&2&&f("styleClass","p-galleria-thumbnail-prev-icon")}function eoe(n,e){if(n&1&&(oe(0),x(1,Jre,1,1,"ChevronLeftIcon",10)(2,Xre,1,1,"ChevronUpIcon",10),se()),n&2){let t=y(2);m(),f("ngIf",!t.isVertical),m(),f("ngIf",t.isVertical)}}function toe(n,e){}function noe(n,e){n&1&&x(0,toe,0,0,"ng-template")}function ioe(n,e){if(n&1){let t=$();b(0,"button",7),P("click",function(r){M(t);let o=y();return D(o.navBackward(r))}),x(1,eoe,3,2,"ng-container",8)(2,noe,1,0,null,9),C()}if(n&2){let t=y();f("ngClass",_e(5,Kre,t.isNavBackwardDisabled()))("disabled",t.isNavBackwardDisabled()),O("aria-label",t.ariaPrevButtonLabel()),m(),f("ngIf",!t.galleria.previousThumbnailIconTemplate),m(),f("ngTemplateOutlet",t.galleria.previousThumbnailIconTemplate)}}function roe(n,e){if(n&1){let t=$();b(0,"div",12),P("keydown",function(r){let o=M(t).index,s=y();return D(s.onThumbnailKeydown(r,o))}),b(1,"div",13),P("click",function(){let r=M(t).index,o=y();return D(o.onItemClick(r))})("touchend",function(){let r=M(t).index,o=y();return D(o.onItemClick(r))})("keydown.enter",function(){let r=M(t).index,o=y();return D(o.onItemClick(r))}),E(2,"p-galleriaItemSlot",14),C()()}if(n&2){let t=e.$implicit,i=e.index,r=y();f("ngClass",kr(10,Yre,r.activeIndex===i,r.isItemActive(i),r.firstItemAciveIndex()===i,r.lastItemActiveIndex()===i)),O("aria-selected",r.activeIndex===i)("aria-controls",r.containerId+"_item_"+i)("data-pc-section","thumbnailitem")("data-p-active",r.activeIndex===i),m(),O("tabindex",r.activeIndex===i?0:-1)("aria-current",r.activeIndex===i?"page":void 0)("aria-label",r.ariaPageLabel(i+1)),m(),f("item",t)("templates",r.templates)}}function ooe(n,e){n&1&&E(0,"ChevronRightIcon",16),n&2&&f("ngClass","p-galleria-thumbnail-next-icon")}function soe(n,e){n&1&&E(0,"ChevronDownIcon",16),n&2&&f("ngClass","p-galleria-thumbnail-next-icon")}function aoe(n,e){if(n&1&&(oe(0),x(1,ooe,1,1,"ChevronRightIcon",15)(2,soe,1,1,"ChevronDownIcon",15),se()),n&2){let t=y(2);m(),f("ngIf",!t.isVertical),m(),f("ngIf",t.isVertical)}}function loe(n,e){}function coe(n,e){n&1&&x(0,loe,0,0,"ng-template")}function uoe(n,e){if(n&1){let t=$();b(0,"button",7),P("click",function(r){M(t);let o=y();return D(o.navForward(r))}),x(1,aoe,3,2,"ng-container",8)(2,coe,1,0,null,9),C()}if(n&2){let t=y();f("ngClass",_e(5,Zre,t.isNavForwardDisabled()))("disabled",t.isNavForwardDisabled()),O("aria-label",t.ariaNextButtonLabel()),m(),f("ngIf",!t.galleria.nextThumbnailIconTemplate),m(),f("ngTemplateOutlet",t.galleria.nextThumbnailIconTemplate)}}var Zh=(()=>{class n{document;platformId;element;cd;config;get activeIndex(){return this._activeIndex}set activeIndex(t){this._activeIndex=t}fullScreen=!1;id;value;numVisible=3;responsiveOptions;showItemNavigators=!1;showThumbnailNavigators=!0;showItemNavigatorsOnHover=!1;changeItemOnIndicatorHover=!1;circular=!1;autoPlay=!1;shouldStopAutoplayByClick=!0;transitionInterval=4e3;showThumbnails=!0;thumbnailsPosition="bottom";verticalThumbnailViewPortHeight="300px";showIndicators=!1;showIndicatorsOnItem=!1;indicatorsPosition="bottom";baseZIndex=0;maskClass;containerClass;containerStyle;showTransitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)";get visible(){return this._visible}set visible(t){this._visible=t,this._visible&&!this.maskVisible&&(this.maskVisible=!0)}activeIndexChange=new j;visibleChange=new j;mask;container;templates;_visible=!1;_activeIndex=0;headerFacet;footerFacet;indicatorFacet;captionFacet;closeIconTemplate;previousThumbnailIconTemplate;nextThumbnailIconTemplate;itemPreviousIconTemplate;itemNextIconTemplate;maskVisible=!1;numVisibleLimit=0;constructor(t,i,r,o,s){this.document=t,this.platformId=i,this.element=r,this.cd=o,this.config=s}ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"header":this.headerFacet=t.template;break;case"footer":this.footerFacet=t.template;break;case"indicator":this.indicatorFacet=t.template;break;case"closeicon":this.closeIconTemplate=t.template;break;case"itemnexticon":this.itemNextIconTemplate=t.template;break;case"itempreviousicon":this.itemPreviousIconTemplate=t.template;break;case"previousthumbnailicon":this.previousThumbnailIconTemplate=t.template;break;case"nextthumbnailicon":this.nextThumbnailIconTemplate=t.template;break;case"caption":this.captionFacet=t.template;break}})}ngOnChanges(t){t.value&&t.value.currentValue?.length{A.focus(A.findSingle(this.container.nativeElement,'[data-pc-section="closebutton"]'))},25);break;case"void":A.addClass(this.mask?.nativeElement,"p-component-overlay-leave");break}}onAnimationEnd(t){switch(t.toState){case"void":this.disableModality();break}}enableModality(){A.blockBodyScroll(),this.cd.markForCheck(),this.mask&&_n.set("modal",this.mask.nativeElement,this.baseZIndex||this.config.zIndex.modal)}disableModality(){A.unblockBodyScroll(),this.maskVisible=!1,this.cd.markForCheck(),this.mask&&_n.clear(this.mask.nativeElement)}ngOnDestroy(){this.fullScreen&&A.removeClass(this.document.body,"p-overflow-hidden"),this.mask&&this.disableModality()}static \u0275fac=function(i){return new(i||n)(k(We),k(Nt),k(Ce),k(De),k(Pt))};static \u0275cmp=F({type:n,selectors:[["p-galleria"]],contentQueries:function(i,r,o){if(i&1&&Je(o,qe,4),i&2){let s;J(s=X())&&(r.templates=s)}},viewQuery:function(i,r){if(i&1&&(fe(ure,5),fe(dre,5)),i&2){let o;J(o=X())&&(r.mask=o.first),J(o=X())&&(r.container=o.first)}},hostAttrs:[1,"p-element"],inputs:{activeIndex:"activeIndex",fullScreen:[2,"fullScreen","fullScreen",V],id:"id",value:"value",numVisible:[2,"numVisible","numVisible",Ke],responsiveOptions:"responsiveOptions",showItemNavigators:[2,"showItemNavigators","showItemNavigators",V],showThumbnailNavigators:[2,"showThumbnailNavigators","showThumbnailNavigators",V],showItemNavigatorsOnHover:[2,"showItemNavigatorsOnHover","showItemNavigatorsOnHover",V],changeItemOnIndicatorHover:[2,"changeItemOnIndicatorHover","changeItemOnIndicatorHover",V],circular:[2,"circular","circular",V],autoPlay:[2,"autoPlay","autoPlay",V],shouldStopAutoplayByClick:[2,"shouldStopAutoplayByClick","shouldStopAutoplayByClick",V],transitionInterval:[2,"transitionInterval","transitionInterval",Ke],showThumbnails:[2,"showThumbnails","showThumbnails",V],thumbnailsPosition:"thumbnailsPosition",verticalThumbnailViewPortHeight:"verticalThumbnailViewPortHeight",showIndicators:[2,"showIndicators","showIndicators",V],showIndicatorsOnItem:[2,"showIndicatorsOnItem","showIndicatorsOnItem",V],indicatorsPosition:"indicatorsPosition",baseZIndex:[2,"baseZIndex","baseZIndex",Ke],maskClass:"maskClass",containerClass:"containerClass",containerStyle:"containerStyle",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",visible:"visible"},outputs:{activeIndexChange:"activeIndexChange",visibleChange:"visibleChange"},features:[$e,Jt],decls:3,vars:2,consts:[["windowed",""],["container",""],["mask",""],[4,"ngIf","ngIfElse"],[3,"ngClass","class",4,"ngIf"],[3,"ngClass"],[3,"value","activeIndex","numVisible","ngStyle","fullScreen","maskHide","activeItemChange",4,"ngIf"],[3,"maskHide","activeItemChange","value","activeIndex","numVisible","ngStyle","fullScreen"],[3,"activeItemChange","value","activeIndex","numVisible"]],template:function(i,r){if(i&1&&x(0,yre,3,1,"div",3)(1,_re,1,3,"ng-template",null,0,Bt),i&2){let o=pt(2);f("ngIf",r.fullScreen)("ngIfElse",o)}},dependencies:()=>[Ye,ot,st,doe],styles:[`@layer primeng{.p-galleria-content{display:flex;flex-direction:column}.p-galleria-item-wrapper{display:flex;flex-direction:column;position:relative}.p-galleria-item-container{position:relative;display:flex;height:100%}.p-galleria-item-nav{position:absolute;top:50%;margin-top:-.5rem;display:inline-flex;justify-content:center;align-items:center;overflow:hidden}.p-galleria-item-prev{left:0;border-top-left-radius:0;border-bottom-left-radius:0}.p-galleria-item-next{right:0;border-top-right-radius:0;border-bottom-right-radius:0}.p-galleria-item{display:flex;justify-content:center;align-items:center;height:100%;width:100%}.p-galleria-item-nav-onhover .p-galleria-item-nav{pointer-events:none;opacity:0;transition:opacity .2s ease-in-out}.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav,.p-galleria-item-nav-onhover .p-galleria-item-nav-focused{pointer-events:all;opacity:1}.p-galleria-item-nav-onhover .p-galleria-item-wrapper:hover .p-galleria-item-nav.p-disabled{pointer-events:none}.p-galleria-caption{position:absolute;bottom:0;left:0;width:100%}.p-galleria-thumbnail-wrapper{display:flex;flex-direction:column;overflow:auto;flex-shrink:0}.p-galleria-thumbnail-prev,.p-galleria-thumbnail-next{align-self:center;flex:0 0 auto;display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-galleria-thumbnail-prev span,.p-galleria-thumbnail-next span{display:flex;justify-content:center;align-items:center}.p-galleria-thumbnail-container{display:flex;flex-direction:row}.p-galleria-thumbnail-items-container{overflow:hidden;width:100%}.p-galleria-thumbnail-items{display:flex}.p-galleria-thumbnail-item{overflow:auto;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.5}.p-galleria-thumbnail-item:hover{opacity:1;transition:opacity .3s}.p-galleria-thumbnail-item-current{opacity:1}.p-galleria-thumbnails-left .p-galleria-content,.p-galleria-thumbnails-right .p-galleria-content,.p-galleria-thumbnails-left .p-galleria-item-wrapper,.p-galleria-thumbnails-right .p-galleria-item-wrapper{flex-direction:row}.p-galleria-thumbnails-left p-galleriaitem,.p-galleria-thumbnails-top p-galleriaitem{order:2}.p-galleria-thumbnails-left p-galleriathumbnails,.p-galleria-thumbnails-top p-galleriathumbnails{order:1}.p-galleria-thumbnails-left .p-galleria-thumbnail-container,.p-galleria-thumbnails-right .p-galleria-thumbnail-container{flex-direction:column;flex-grow:1}.p-galleria-thumbnails-left .p-galleria-thumbnail-items,.p-galleria-thumbnails-right .p-galleria-thumbnail-items{flex-direction:column;height:100%}.p-galleria-thumbnails-left .p-galleria-thumbnail-wrapper,.p-galleria-thumbnails-right .p-galleria-thumbnail-wrapper{height:100%}.p-galleria-indicators{display:flex;align-items:center;justify-content:center}.p-galleria-indicator>button{display:inline-flex;align-items:center}.p-galleria-indicators-left .p-galleria-item-wrapper,.p-galleria-indicators-right .p-galleria-item-wrapper{flex-direction:row;align-items:center}.p-galleria-indicators-left .p-galleria-item-container,.p-galleria-indicators-top .p-galleria-item-container{order:2}.p-galleria-indicators-left .p-galleria-indicators,.p-galleria-indicators-top .p-galleria-indicators{order:1}.p-galleria-indicators-left .p-galleria-indicators,.p-galleria-indicators-right .p-galleria-indicators{flex-direction:column}.p-galleria-indicator-onitem .p-galleria-indicators{position:absolute;display:flex;z-index:1}.p-galleria-indicator-onitem.p-galleria-indicators-top .p-galleria-indicators{top:0;left:0;width:100%;align-items:flex-start}.p-galleria-indicator-onitem.p-galleria-indicators-right .p-galleria-indicators{right:0;top:0;height:100%;align-items:flex-end}.p-galleria-indicator-onitem.p-galleria-indicators-bottom .p-galleria-indicators{bottom:0;left:0;width:100%;align-items:flex-end}.p-galleria-indicator-onitem.p-galleria-indicators-left .p-galleria-indicators{left:0;top:0;height:100%;align-items:flex-start}.p-galleria-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:transparent;transition-property:background-color}.p-galleria-close{position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:center;overflow:hidden}.p-galleria-mask .p-galleria-item-nav{position:fixed;top:50%;margin-top:-.5rem}.p-galleria-mask.p-galleria-mask-leave{background-color:transparent}.p-items-hidden .p-galleria-thumbnail-item{visibility:hidden}.p-items-hidden .p-galleria-thumbnail-item.p-galleria-thumbnail-item-active{visibility:visible}} +`],encapsulation:2,data:{animation:[oi("animation",[mn("void => visible",[Ct({transform:"scale(0.7)",opacity:0}),fn("{{showTransitionParams}}")]),mn("visible => void",[fn("{{hideTransitionParams}}",Ct({transform:"scale(0.7)",opacity:0}))])])]},changeDetection:0})}return n})(),doe=(()=>{class n{galleria;cd;differs;config;elementRef;get activeIndex(){return this._activeIndex}set activeIndex(t){this._activeIndex=t}value=[];numVisible;fullScreen;maskHide=new j;activeItemChange=new j;closeButton;id;_activeIndex=0;slideShowActive=!0;interval;styleClass;differ;constructor(t,i,r,o,s){this.galleria=t,this.cd=i,this.differs=r,this.config=o,this.elementRef=s,this.id=this.galleria.id||nt(),this.differ=this.differs.find(this.galleria).create()}handleFullscreenChange(t){document?.fullscreenElement===this.elementRef.nativeElement?.children[0]?this.fullScreen=!0:this.fullScreen=!1}ngDoCheck(){if(Dt(this.galleria.platformId)){let t=this.differ.diff(this.galleria);t&&t.forEachItem.length>0&&this.cd.markForCheck()}}galleriaClass(){let t=this.galleria.showThumbnails&&this.getPositionClass("p-galleria-thumbnails",this.galleria.thumbnailsPosition),i=this.galleria.showIndicators&&this.getPositionClass("p-galleria-indicators",this.galleria.indicatorsPosition);return(this.galleria.containerClass?this.galleria.containerClass+" ":"")+(t?t+" ":"")+(i?i+" ":"")}startSlideShow(){Dt(this.galleria.platformId)&&(this.interval=setInterval(()=>{let t=this.galleria.circular&&this.value.length-1===this.activeIndex?0:this.activeIndex+1;this.onActiveIndexChange(t),this.activeIndex=t},this.galleria.transitionInterval),this.slideShowActive=!0)}stopSlideShow(){this.galleria.autoPlay&&!this.galleria.shouldStopAutoplayByClick||(this.interval&&clearInterval(this.interval),this.slideShowActive=!1)}getPositionClass(t,i){let o=["top","left","bottom","right"].find(s=>s===i);return o?`${t}-${o}`:""}isVertical(){return this.galleria.thumbnailsPosition==="left"||this.galleria.thumbnailsPosition==="right"}onActiveIndexChange(t){this.activeIndex!==t&&(this.activeIndex=t,this.activeItemChange.emit(this.activeIndex))}closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}static \u0275fac=function(i){return new(i||n)(k(Zh),k(De),k(Up),k(Pt),k(Ce))};static \u0275cmp=F({type:n,selectors:[["p-galleriaContent"]],viewQuery:function(i,r){if(i&1&&fe(vre,5),i&2){let o;J(o=X())&&(r.closeButton=o.first)}},hostBindings:function(i,r){i&1&&P("fullscreenchange",function(s){return r.handleFullscreenChange(s)},!1,_u)},inputs:{activeIndex:"activeIndex",value:"value",numVisible:[2,"numVisible","numVisible",Ke],fullScreen:[2,"fullScreen","fullScreen",V]},outputs:{maskHide:"maskHide",activeItemChange:"activeItemChange"},features:[$e],decls:1,vars:1,consts:[["pFocusTrap","",3,"ngClass","ngStyle","class","pFocusTrapDisabled",4,"ngIf"],["pFocusTrap","",3,"ngClass","ngStyle","pFocusTrapDisabled"],["type","button","class","p-galleria-close p-link","pRipple","",3,"click",4,"ngIf"],["class","p-galleria-header",4,"ngIf"],[1,"p-galleria-content"],[3,"onActiveIndexChange","startSlideShow","stopSlideShow","id","value","activeIndex","circular","templates","showIndicators","changeItemOnIndicatorHover","indicatorFacet","captionFacet","showItemNavigators","autoPlay","slideShowActive"],[3,"containerId","value","activeIndex","templates","numVisible","responsiveOptions","circular","isVertical","contentHeight","showThumbnailNavigators","slideShowActive","onActiveIndexChange","stopSlideShow",4,"ngIf"],["class","p-galleria-footer",4,"ngIf"],["type","button","pRipple","",1,"p-galleria-close","p-link",3,"click"],[3,"styleClass",4,"ngIf"],[4,"ngTemplateOutlet"],[3,"styleClass"],[1,"p-galleria-header"],["type","header",3,"templates"],[3,"onActiveIndexChange","stopSlideShow","containerId","value","activeIndex","templates","numVisible","responsiveOptions","circular","isVertical","contentHeight","showThumbnailNavigators","slideShowActive"],[1,"p-galleria-footer"],["type","footer",3,"templates"]],template:function(i,r){i&1&&x(0,Dre,7,29,"div",0),i&2&&f("ngIf",r.value&&r.value.length>0)},dependencies:()=>[Ye,ot,Mt,st,Hn,Xt,Ua,ST,poe,hoe],encapsulation:2,changeDetection:0})}return n})(),ST=(()=>{class n{templates;index;get item(){return this._item}set item(t){this._item=t,this.templates&&this.templates.forEach(i=>{if(i.getType()===this.type)switch(this.type){case"item":case"caption":case"thumbnail":this.context={$implicit:this.item},this.contentTemplate=i.template;break}})}type;contentTemplate;context;_item;ngAfterContentInit(){this.templates?.forEach(t=>{if(t.getType()===this.type)switch(this.type){case"item":case"caption":case"thumbnail":this.context={$implicit:this.item},this.contentTemplate=t.template;break;case"indicator":this.context={$implicit:this.index},this.contentTemplate=t.template;break;default:this.context={},this.contentTemplate=t.template;break}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=F({type:n,selectors:[["p-galleriaItemSlot"]],inputs:{templates:"templates",index:[2,"index","index",Ke],item:"item",type:"type"},features:[$e],decls:1,vars:1,consts:[[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,r){i&1&&x(0,Are,2,2,"ng-container",0),i&2&&f("ngIf",r.contentTemplate)},dependencies:[ot,Mt],encapsulation:2,changeDetection:0})}return n})(),poe=(()=>{class n{galleria;id;circular=!1;value;showItemNavigators=!1;showIndicators=!0;slideShowActive=!0;changeItemOnIndicatorHover=!0;autoPlay=!1;templates;indicatorFacet;captionFacet;startSlideShow=new j;stopSlideShow=new j;onActiveIndexChange=new j;get activeIndex(){return this._activeIndex}set activeIndex(t){this._activeIndex=t}get activeItem(){return this.value&&this.value[this._activeIndex]}_activeIndex=0;leftButtonFocused=!1;rightButtonFocused=!1;constructor(t){this.galleria=t}ngOnChanges({autoPlay:t}){t?.currentValue&&this.startSlideShow.emit(),t&&t.currentValue===!1&&this.stopTheSlideShow()}next(){let t=this.activeIndex+1,i=this.circular&&this.value.length-1===this.activeIndex?0:t;this.onActiveIndexChange.emit(i)}prev(){let t=this.activeIndex!==0?this.activeIndex-1:0,i=this.circular&&this.activeIndex===0?this.value.length-1:t;this.onActiveIndexChange.emit(i)}onButtonFocus(t){t==="left"?this.leftButtonFocused=!0:this.rightButtonFocused=!0}onButtonBlur(t){t==="left"?this.leftButtonFocused=!1:this.rightButtonFocused=!1}stopTheSlideShow(){this.slideShowActive&&this.stopSlideShow&&this.stopSlideShow.emit()}navForward(t){this.stopTheSlideShow(),this.next(),t&&t.cancelable&&t.preventDefault()}navBackward(t){this.stopTheSlideShow(),this.prev(),t&&t.cancelable&&t.preventDefault()}onIndicatorClick(t){this.stopTheSlideShow(),this.onActiveIndexChange.emit(t)}onIndicatorMouseEnter(t){this.changeItemOnIndicatorHover&&(this.stopTheSlideShow(),this.onActiveIndexChange.emit(t))}onIndicatorKeyDown(t,i){switch(t.code){case"Enter":case"Space":this.stopTheSlideShow(),this.onActiveIndexChange.emit(i),t.preventDefault();break;case"ArrowDown":case"ArrowUp":t.preventDefault();break;default:break}}isNavForwardDisabled(){return!this.circular&&this.activeIndex===this.value.length-1}isNavBackwardDisabled(){return!this.circular&&this.activeIndex===0}isIndicatorItemActive(t){return this.activeIndex===t}ariaSlideLabel(){return this.galleria.config.translation.aria?this.galleria.config.translation.aria.slide:void 0}ariaSlideNumber(t){return this.galleria.config.translation.aria?this.galleria.config.translation.aria.slideNumber.replace(/{slideNumber}/g,t):void 0}ariaPageLabel(t){return this.galleria.config.translation.aria?this.galleria.config.translation.aria.pageLabel.replace(/{page}/g,t):void 0}static \u0275fac=function(i){return new(i||n)(k(Zh))};static \u0275cmp=F({type:n,selectors:[["p-galleriaItem"]],inputs:{id:"id",circular:[2,"circular","circular",V],value:"value",showItemNavigators:[2,"showItemNavigators","showItemNavigators",V],showIndicators:[2,"showIndicators","showIndicators",V],slideShowActive:[2,"slideShowActive","slideShowActive",V],changeItemOnIndicatorHover:[2,"changeItemOnIndicatorHover","changeItemOnIndicatorHover",V],autoPlay:[2,"autoPlay","autoPlay",V],templates:"templates",indicatorFacet:"indicatorFacet",captionFacet:"captionFacet",activeIndex:"activeIndex"},outputs:{startSlideShow:"startSlideShow",stopSlideShow:"stopSlideShow",onActiveIndexChange:"onActiveIndexChange"},features:[$e,Jt],decls:8,vars:11,consts:[[1,"p-galleria-item-wrapper"],[1,"p-galleria-item-container"],["type","button","role","navigation","pRipple","",3,"ngClass","disabled","click","focus","blur",4,"ngIf"],["role","group",3,"id"],["type","item",1,"p-galleria-item",3,"item","templates"],["type","button","pRipple","","role","navigation",3,"ngClass","disabled","click","focus","blur",4,"ngIf"],["class","p-galleria-caption",4,"ngIf"],["class","p-galleria-indicators p-reset",4,"ngIf"],["type","button","role","navigation","pRipple","",3,"click","focus","blur","ngClass","disabled"],[3,"styleClass",4,"ngIf"],[4,"ngTemplateOutlet"],[3,"styleClass"],["type","button","pRipple","","role","navigation",3,"click","focus","blur","ngClass","disabled"],[1,"p-galleria-caption"],["type","caption",3,"item","templates"],[1,"p-galleria-indicators","p-reset"],["tabindex","0",3,"ngClass","click","mouseenter","keydown",4,"ngFor","ngForOf"],["tabindex","0",3,"click","mouseenter","keydown","ngClass"],["type","button","tabIndex","-1","class","p-link",4,"ngIf"],["type","indicator",3,"index","templates"],["type","button","tabIndex","-1",1,"p-link"]],template:function(i,r){i&1&&(b(0,"div",0)(1,"div",1),x(2,jre,3,7,"button",2),b(3,"div",3),E(4,"p-galleriaItemSlot",4),C(),x(5,Ure,3,7,"button",5)(6,Hre,2,2,"div",6),C(),x(7,Gre,2,1,"ul",7),C()),i&2&&(m(2),f("ngIf",r.showItemNavigators),m(),Rs("width","100%"),f("id",r.id+"_item_"+r.activeIndex),O("aria-label",r.ariaSlideNumber(r.activeIndex+1))("aria-roledescription",r.ariaSlideLabel()),m(),f("item",r.activeItem)("templates",r.templates),m(),f("ngIf",r.showItemNavigators),m(),f("ngIf",r.captionFacet),m(),f("ngIf",r.showIndicators))},dependencies:()=>[Ye,Ui,ot,Mt,Hn,ls,sc,ST],encapsulation:2,changeDetection:0})}return n})(),hoe=(()=>{class n{galleria;document;platformId;renderer;cd;containerId;value;isVertical=!1;slideShowActive=!1;circular=!1;responsiveOptions;contentHeight="300px";showThumbnailNavigators=!0;templates;onActiveIndexChange=new j;stopSlideShow=new j;itemsContainer;get numVisible(){return this._numVisible}set numVisible(t){this._numVisible=t,this._oldNumVisible=this.d_numVisible,this.d_numVisible=t}get activeIndex(){return this._activeIndex}set activeIndex(t){this._oldactiveIndex=this._activeIndex,this._activeIndex=t}index;startPos=null;thumbnailsStyle=null;sortedResponsiveOptions=null;totalShiftedItems=0;page=0;documentResizeListener;_numVisible=0;d_numVisible=0;_oldNumVisible=0;_activeIndex=0;_oldactiveIndex=0;constructor(t,i,r,o,s){this.galleria=t,this.document=i,this.platformId=r,this.renderer=o,this.cd=s}ngOnInit(){Dt(this.platformId)&&(this.createStyle(),this.responsiveOptions&&this.bindDocumentListeners())}ngAfterContentChecked(){let t=this.totalShiftedItems;(this._oldNumVisible!==this.d_numVisible||this._oldactiveIndex!==this._activeIndex)&&this.itemsContainer&&(this._activeIndex<=this.getMedianItemIndex()?t=0:this.value.length-this.d_numVisible+this.getMedianItemIndex(){let o=i.breakpoint,s=r.breakpoint,a=null;return o==null&&s!=null?a=-1:o!=null&&s==null?a=1:o==null&&s==null?a=0:typeof o=="string"&&typeof s=="string"?a=o.localeCompare(s,void 0,{numeric:!0}):a=os?1:0,-1*a});for(let i=0;i=t&&(i=o)}this.d_numVisible!==i.numVisible&&(this.d_numVisible=i.numVisible,this.cd.markForCheck())}}getTabIndex(t){return this.isItemActive(t)?0:null}navForward(t){this.stopTheSlideShow();let i=this._activeIndex+1;i+this.totalShiftedItems>this.getMedianItemIndex()&&(-1*this.totalShiftedItemsthis.getMedianItemIndex()&&(-1*this.totalShiftedItems!==0||this.circular)&&this.step(1);let o=this.circular&&this._activeIndex===0?this.value.length-1:i;this.onActiveIndexChange.emit(o),t.cancelable&&t.preventDefault()}onItemClick(t){this.stopTheSlideShow();let i=t;if(i!==this._activeIndex){let r=i+this.totalShiftedItems,o=0;i0&&-1*this.totalShiftedItems!==0&&this.step(o)):(o=this.getMedianItemIndex()-r,o<0&&-1*this.totalShiftedItemsA.getAttribute(s,"data-p-active")===!0),r=A.findSingle(this.itemsContainer.nativeElement,'[tabindex="0"]'),o=t.findIndex(s=>s===r.parentElement);t[o].children[0].tabIndex="-1",t[i].children[0].tabIndex="0"}findFocusedIndicatorIndex(){let t=[...A.find(this.itemsContainer.nativeElement,'[data-pc-section="thumbnailitem"]')],i=A.findSingle(this.itemsContainer.nativeElement,'[data-pc-section="thumbnailitem"] > [tabindex="0"]');return t.findIndex(r=>r===i.parentElement)}changedFocusedIndicator(t,i){let r=A.find(this.itemsContainer.nativeElement,'[data-pc-section="thumbnailitem"]');r[t].children[0].tabIndex="-1",r[i].children[0].tabIndex="0",r[i].children[0].focus()}step(t){let i=this.totalShiftedItems+t;t<0&&-1*i+this.d_numVisible>this.value.length-1?i=this.d_numVisible-this.value.length:t>0&&i>0&&(i=0),this.circular&&(t<0&&this.value.length-1===this._activeIndex?i=0:t>0&&this._activeIndex===0&&(i=this.d_numVisible-this.value.length)),this.itemsContainer&&(A.removeClass(this.itemsContainer.nativeElement,"p-items-hidden"),this.itemsContainer.nativeElement.style.transform=this.isVertical?`translate3d(0, ${i*(100/this.d_numVisible)}%, 0)`:`translate3d(${i*(100/this.d_numVisible)}%, 0, 0)`,this.itemsContainer.nativeElement.style.transition="transform 500ms ease 0s"),this.totalShiftedItems=i}stopTheSlideShow(){this.slideShowActive&&this.stopSlideShow&&this.stopSlideShow.emit()}changePageOnTouch(t,i){i<0?this.navForward(t):this.navBackward(t)}getTotalPageNumber(){return this.value.length>this.d_numVisible?this.value.length-this.d_numVisible+1:0}getMedianItemIndex(){let t=Math.floor(this.d_numVisible/2);return this.d_numVisible%2?t:t-1}onTransitionEnd(){this.itemsContainer&&this.itemsContainer.nativeElement&&(A.addClass(this.itemsContainer.nativeElement,"p-items-hidden"),this.itemsContainer.nativeElement.style.transition="")}onTouchEnd(t){let i=t.changedTouches[0];this.isVertical?this.changePageOnTouch(t,i.pageY-this.startPos.y):this.changePageOnTouch(t,i.pageX-this.startPos.x)}onTouchMove(t){t.cancelable&&t.preventDefault()}onTouchStart(t){let i=t.changedTouches[0];this.startPos={x:i.pageX,y:i.pageY}}isNavBackwardDisabled(){return!this.circular&&this._activeIndex===0||this.value.length<=this.d_numVisible}isNavForwardDisabled(){return!this.circular&&this._activeIndex===this.value.length-1||this.value.length<=this.d_numVisible}firstItemAciveIndex(){return this.totalShiftedItems*-1}lastItemActiveIndex(){return this.firstItemAciveIndex()+this.d_numVisible-1}isItemActive(t){return this.firstItemAciveIndex()<=t&&this.lastItemActiveIndex()>=t}bindDocumentListeners(){if(Dt(this.platformId)){let t=this.document.defaultView||"window";this.documentResizeListener=this.renderer.listen(t,"resize",()=>{this.calculatePosition()})}}unbindDocumentListeners(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}ngOnDestroy(){this.responsiveOptions&&this.unbindDocumentListeners(),this.thumbnailsStyle&&this.thumbnailsStyle.parentNode?.removeChild(this.thumbnailsStyle)}ariaPrevButtonLabel(){return this.galleria.config.translation.aria?this.galleria.config.translation.aria.prevPageLabel:void 0}ariaNextButtonLabel(){return this.galleria.config.translation.aria?this.galleria.config.translation.aria.nextPageLabel:void 0}ariaPageLabel(t){return this.galleria.config.translation.aria?this.galleria.config.translation.aria.pageLabel.replace(/{page}/g,t):void 0}static \u0275fac=function(i){return new(i||n)(k(Zh),k(We),k(Nt),k(At),k(De))};static \u0275cmp=F({type:n,selectors:[["p-galleriaThumbnails"]],viewQuery:function(i,r){if(i&1&&fe(qre,5),i&2){let o;J(o=X())&&(r.itemsContainer=o.first)}},inputs:{containerId:"containerId",value:"value",isVertical:[2,"isVertical","isVertical",V],slideShowActive:[2,"slideShowActive","slideShowActive",V],circular:[2,"circular","circular",V],responsiveOptions:"responsiveOptions",contentHeight:"contentHeight",showThumbnailNavigators:"showThumbnailNavigators",templates:"templates",numVisible:"numVisible",activeIndex:"activeIndex"},outputs:{onActiveIndexChange:"onActiveIndexChange",stopSlideShow:"stopSlideShow"},features:[$e],decls:8,vars:6,consts:[["itemsContainer",""],[1,"p-galleria-thumbnail-wrapper"],[1,"p-galleria-thumbnail-container"],["type","button","pRipple","",3,"ngClass","disabled","click",4,"ngIf"],[1,"p-galleria-thumbnail-items-container",3,"ngStyle"],["role","tablist",1,"p-galleria-thumbnail-items",3,"transitionend","touchstart","touchmove"],[3,"ngClass","keydown",4,"ngFor","ngForOf"],["type","button","pRipple","",3,"click","ngClass","disabled"],[4,"ngIf"],[4,"ngTemplateOutlet"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],[3,"keydown","ngClass"],[1,"p-galleria-thumbnail-item-content",3,"click","touchend","keydown.enter"],["type","thumbnail",3,"item","templates"],[3,"ngClass",4,"ngIf"],[3,"ngClass"]],template:function(i,r){if(i&1){let o=$();b(0,"div",1)(1,"div",2),x(2,ioe,3,7,"button",3),b(3,"div",4)(4,"div",5,0),P("transitionend",function(){return M(o),D(r.onTransitionEnd())})("touchstart",function(a){return M(o),D(r.onTouchStart(a))})("touchmove",function(a){return M(o),D(r.onTouchMove(a))}),x(6,roe,3,15,"div",6),C()(),x(7,uoe,3,7,"button",3),C()()}i&2&&(m(2),f("ngIf",r.showThumbnailNavigators),m(),f("ngStyle",_e(4,Qre,r.isVertical?r.contentHeight:"")),m(3),f("ngForOf",r.value),m(),f("ngIf",r.showThumbnailNavigators))},dependencies:()=>[Ye,Ui,ot,Mt,st,Hn,ls,sc,ST],encapsulation:2,changeDetection:0})}return n})(),G4=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Ge,Ln,Xt,ls,sc,$a,Wa,Ha,Te,Ge]})}return n})();var MT=(()=>{class n extends Ue{static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["EyeIcon"]],standalone:!0,features:[xe,ue],decls:2,vars:5,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M0.0535499 7.25213C0.208567 7.59162 2.40413 12.4 7 12.4C11.5959 12.4 13.7914 7.59162 13.9465 7.25213C13.9487 7.2471 13.9506 7.24304 13.952 7.24001C13.9837 7.16396 14 7.08239 14 7.00001C14 6.91762 13.9837 6.83605 13.952 6.76001C13.9506 6.75697 13.9487 6.75292 13.9465 6.74788C13.7914 6.4084 11.5959 1.60001 7 1.60001C2.40413 1.60001 0.208567 6.40839 0.0535499 6.74788C0.0512519 6.75292 0.0494023 6.75697 0.048 6.76001C0.0163137 6.83605 0 6.91762 0 7.00001C0 7.08239 0.0163137 7.16396 0.048 7.24001C0.0494023 7.24304 0.0512519 7.2471 0.0535499 7.25213ZM7 11.2C3.664 11.2 1.736 7.92001 1.264 7.00001C1.736 6.08001 3.664 2.80001 7 2.80001C10.336 2.80001 12.264 6.08001 12.736 7.00001C12.264 7.92001 10.336 11.2 7 11.2ZM5.55551 9.16182C5.98308 9.44751 6.48576 9.6 7 9.6C7.68891 9.59789 8.349 9.32328 8.83614 8.83614C9.32328 8.349 9.59789 7.68891 9.59999 7C9.59999 6.48576 9.44751 5.98308 9.16182 5.55551C8.87612 5.12794 8.47006 4.7947 7.99497 4.59791C7.51988 4.40112 6.99711 4.34963 6.49276 4.44995C5.98841 4.55027 5.52513 4.7979 5.16152 5.16152C4.7979 5.52513 4.55027 5.98841 4.44995 6.49276C4.34963 6.99711 4.40112 7.51988 4.59791 7.99497C4.7947 8.47006 5.12794 8.87612 5.55551 9.16182ZM6.2222 5.83594C6.45243 5.6821 6.7231 5.6 7 5.6C7.37065 5.6021 7.72553 5.75027 7.98762 6.01237C8.24972 6.27446 8.39789 6.62934 8.4 7C8.4 7.27689 8.31789 7.54756 8.16405 7.77779C8.01022 8.00802 7.79157 8.18746 7.53575 8.29343C7.27994 8.39939 6.99844 8.42711 6.72687 8.37309C6.4553 8.31908 6.20584 8.18574 6.01005 7.98994C5.81425 7.79415 5.68091 7.54469 5.6269 7.27312C5.57288 7.00155 5.6006 6.72006 5.70656 6.46424C5.81253 6.20842 5.99197 5.98977 6.2222 5.83594Z","fill","currentColor"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0),E(1,"path",1),C()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role))},encapsulation:2})}return n})();var DT=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["RefreshIcon"]],standalone:!0,features:[xe,ue],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.77051 5.96336C6.84324 5.99355 6.92127 6.00891 7.00002 6.00854C7.07877 6.00891 7.1568 5.99355 7.22953 5.96336C7.30226 5.93317 7.36823 5.88876 7.42357 5.83273L9.82101 3.43529C9.93325 3.32291 9.99629 3.17058 9.99629 3.01175C9.99629 2.85292 9.93325 2.70058 9.82101 2.5882L7.42357 0.190763C7.3687 0.131876 7.30253 0.0846451 7.22901 0.0518865C7.15549 0.019128 7.07612 0.00151319 6.99564 9.32772e-05C6.91517 -0.00132663 6.83523 0.0134773 6.7606 0.0436218C6.68597 0.0737664 6.61817 0.118634 6.56126 0.175548C6.50435 0.232462 6.45948 0.300257 6.42933 0.374888C6.39919 0.449519 6.38439 0.529456 6.38581 0.609933C6.38722 0.690409 6.40484 0.769775 6.4376 0.843296C6.47036 0.916817 6.51759 0.982986 6.57647 1.03786L7.95103 2.41241H6.99998C5.46337 2.41241 3.98969 3.02283 2.90314 4.10938C1.81659 5.19593 1.20618 6.66961 1.20618 8.20622C1.20618 9.74283 1.81659 11.2165 2.90314 12.3031C3.98969 13.3896 5.46337 14 6.99998 14C8.53595 13.9979 10.0084 13.3868 11.0945 12.3007C12.1806 11.2146 12.7917 9.74218 12.7938 8.20622C12.7938 8.04726 12.7306 7.89481 12.6182 7.78241C12.5058 7.67001 12.3534 7.60686 12.1944 7.60686C12.0355 7.60686 11.883 7.67001 11.7706 7.78241C11.6582 7.89481 11.5951 8.04726 11.5951 8.20622C11.5951 9.11504 11.3256 10.0035 10.8207 10.7591C10.3157 11.5148 9.59809 12.1037 8.75845 12.4515C7.9188 12.7993 6.99489 12.8903 6.10353 12.713C5.21217 12.5357 4.3934 12.0981 3.75077 11.4554C3.10813 10.8128 2.67049 9.99404 2.49319 9.10268C2.31589 8.21132 2.40688 7.2874 2.75468 6.44776C3.10247 5.60811 3.69143 4.89046 4.44709 4.38554C5.20275 3.88063 6.09116 3.61113 6.99998 3.61113H7.95098L6.57647 4.98564C6.46423 5.09802 6.40119 5.25035 6.40119 5.40918C6.40119 5.56801 6.46423 5.72035 6.57647 5.83273C6.63181 5.88876 6.69778 5.93317 6.77051 5.96336Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1),C(),b(3,"defs")(4,"clipPath",2),E(5,"rect",3),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(3),f("id",r.pathId))},encapsulation:2})}return n})();var OT=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["SearchMinusIcon"]],standalone:!0,features:[xe,ue],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.0208 12.0411C4.83005 12.0411 3.66604 11.688 2.67596 11.0265C1.68589 10.3649 0.914216 9.42464 0.458534 8.32452C0.00285271 7.22441 -0.116374 6.01388 0.11593 4.84601C0.348235 3.67813 0.921637 2.60537 1.76363 1.76338C2.60562 0.921393 3.67838 0.34799 4.84625 0.115686C6.01412 -0.116618 7.22466 0.00260857 8.32477 0.45829C9.42488 0.913972 10.3652 1.68564 11.0267 2.67572C11.6883 3.66579 12.0414 4.8298 12.0414 6.02056C12.0395 7.41563 11.5542 8.76029 10.6783 9.8305L13.8244 12.9765C13.9367 13.089 13.9997 13.2414 13.9997 13.4003C13.9997 13.5592 13.9367 13.7116 13.8244 13.8241C13.769 13.8801 13.703 13.9245 13.6302 13.9548C13.5575 13.985 13.4794 14.0003 13.4006 14C13.3218 14.0003 13.2437 13.985 13.171 13.9548C13.0982 13.9245 13.0322 13.8801 12.9768 13.8241L9.83082 10.678C8.76059 11.5539 7.4159 12.0393 6.0208 12.0411ZM6.0208 1.20731C5.07199 1.20731 4.14449 1.48867 3.35559 2.0158C2.56669 2.54292 1.95181 3.29215 1.58872 4.16874C1.22562 5.04532 1.13062 6.00989 1.31572 6.94046C1.50083 7.87104 1.95772 8.72583 2.62863 9.39674C3.29954 10.0676 4.15433 10.5245 5.0849 10.7096C6.01548 10.8947 6.98005 10.7997 7.85663 10.4367C8.73322 10.0736 9.48244 9.45868 10.0096 8.66978C10.5367 7.88088 10.8181 6.95337 10.8181 6.00457C10.8181 4.73226 10.3126 3.51206 9.41297 2.6124C8.51331 1.71274 7.29311 1.20731 6.0208 1.20731ZM4.00591 6.60422H8.00362C8.16266 6.60422 8.31518 6.54104 8.42764 6.42859C8.5401 6.31613 8.60328 6.1636 8.60328 6.00456C8.60328 5.84553 8.5401 5.693 8.42764 5.58054C8.31518 5.46809 8.16266 5.40491 8.00362 5.40491H4.00591C3.84687 5.40491 3.69434 5.46809 3.58189 5.58054C3.46943 5.693 3.40625 5.84553 3.40625 6.00456C3.40625 6.1636 3.46943 6.31613 3.58189 6.42859C3.69434 6.54104 3.84687 6.60422 4.00591 6.60422Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1),C(),b(3,"defs")(4,"clipPath",2),E(5,"rect",3),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(3),f("id",r.pathId))},encapsulation:2})}return n})();var AT=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["SearchPlusIcon"]],standalone:!0,features:[xe,ue],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.67596 11.0265C3.66604 11.688 4.83005 12.0411 6.0208 12.0411C6.81143 12.0411 7.59432 11.8854 8.32477 11.5828C8.86999 11.357 9.37802 11.0526 9.83311 10.6803L12.9768 13.8241C13.0322 13.8801 13.0982 13.9245 13.171 13.9548C13.2437 13.985 13.3218 14.0003 13.4006 14C13.4794 14.0003 13.5575 13.985 13.6302 13.9548C13.703 13.9245 13.769 13.8801 13.8244 13.8241C13.9367 13.7116 13.9997 13.5592 13.9997 13.4003C13.9997 13.2414 13.9367 13.089 13.8244 12.9765L10.6806 9.8328C11.0529 9.37773 11.3572 8.86972 11.5831 8.32452C11.8856 7.59408 12.0414 6.81119 12.0414 6.02056C12.0414 4.8298 11.6883 3.66579 11.0267 2.67572C10.3652 1.68564 9.42488 0.913972 8.32477 0.45829C7.22466 0.00260857 6.01412 -0.116618 4.84625 0.115686C3.67838 0.34799 2.60562 0.921393 1.76363 1.76338C0.921637 2.60537 0.348235 3.67813 0.11593 4.84601C-0.116374 6.01388 0.00285271 7.22441 0.458534 8.32452C0.914216 9.42464 1.68589 10.3649 2.67596 11.0265ZM3.35559 2.0158C4.14449 1.48867 5.07199 1.20731 6.0208 1.20731C7.29311 1.20731 8.51331 1.71274 9.41297 2.6124C10.3126 3.51206 10.8181 4.73226 10.8181 6.00457C10.8181 6.95337 10.5367 7.88088 10.0096 8.66978C9.48244 9.45868 8.73322 10.0736 7.85663 10.4367C6.98005 10.7997 6.01548 10.8947 5.0849 10.7096C4.15433 10.5245 3.29954 10.0676 2.62863 9.39674C1.95772 8.72583 1.50083 7.87104 1.31572 6.94046C1.13062 6.00989 1.22562 5.04532 1.58872 4.16874C1.95181 3.29215 2.56669 2.54292 3.35559 2.0158ZM6.00481 8.60309C5.84641 8.60102 5.69509 8.53718 5.58308 8.42517C5.47107 8.31316 5.40722 8.16183 5.40515 8.00344V6.60422H4.00591C3.84687 6.60422 3.69434 6.54104 3.58189 6.42859C3.46943 6.31613 3.40625 6.1636 3.40625 6.00456C3.40625 5.84553 3.46943 5.693 3.58189 5.58054C3.69434 5.46809 3.84687 5.40491 4.00591 5.40491H5.40515V4.00572C5.40515 3.84668 5.46833 3.69416 5.58079 3.5817C5.69324 3.46924 5.84577 3.40607 6.00481 3.40607C6.16385 3.40607 6.31637 3.46924 6.42883 3.5817C6.54129 3.69416 6.60447 3.84668 6.60447 4.00572V5.40491H8.00362C8.16266 5.40491 8.31518 5.46809 8.42764 5.58054C8.5401 5.693 8.60328 5.84553 8.60328 6.00456C8.60328 6.1636 8.5401 6.31613 8.42764 6.42859C8.31518 6.54104 8.16266 6.60422 8.00362 6.60422H6.60447V8.00344C6.60239 8.16183 6.53855 8.31316 6.42654 8.42517C6.31453 8.53718 6.1632 8.60102 6.00481 8.60309Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1),C(),b(3,"defs")(4,"clipPath",2),E(5,"rect",3),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(3),f("id",r.pathId))},encapsulation:2})}return n})();var kT=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["UndoIcon"]],standalone:!0,features:[xe,ue],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.77042 5.96336C6.84315 5.99355 6.92118 6.00891 6.99993 6.00854C7.07868 6.00891 7.15671 5.99355 7.22944 5.96336C7.30217 5.93317 7.36814 5.88876 7.42348 5.83273C7.53572 5.72035 7.59876 5.56801 7.59876 5.40918C7.59876 5.25035 7.53572 5.09802 7.42348 4.98564L6.04897 3.61113H6.99998C7.9088 3.61113 8.79722 3.88063 9.55288 4.38554C10.3085 4.89046 10.8975 5.60811 11.2453 6.44776C11.5931 7.2874 11.6841 8.21132 11.5068 9.10268C11.3295 9.99404 10.8918 10.8128 10.2492 11.4554C9.60657 12.0981 8.7878 12.5357 7.89644 12.713C7.00508 12.8903 6.08116 12.7993 5.24152 12.4515C4.40188 12.1037 3.68422 11.5148 3.17931 10.7591C2.67439 10.0035 2.4049 9.11504 2.4049 8.20622C2.4049 8.04726 2.34175 7.89481 2.22935 7.78241C2.11695 7.67001 1.9645 7.60686 1.80554 7.60686C1.64658 7.60686 1.49413 7.67001 1.38172 7.78241C1.26932 7.89481 1.20618 8.04726 1.20618 8.20622C1.20829 9.74218 1.81939 11.2146 2.90548 12.3007C3.99157 13.3868 5.46402 13.9979 6.99998 14C8.5366 14 10.0103 13.3896 11.0968 12.3031C12.1834 11.2165 12.7938 9.74283 12.7938 8.20622C12.7938 6.66961 12.1834 5.19593 11.0968 4.10938C10.0103 3.02283 8.5366 2.41241 6.99998 2.41241H6.04892L7.42348 1.03786C7.48236 0.982986 7.5296 0.916817 7.56235 0.843296C7.59511 0.769775 7.61273 0.690409 7.61415 0.609933C7.61557 0.529456 7.60076 0.449519 7.57062 0.374888C7.54047 0.300257 7.49561 0.232462 7.43869 0.175548C7.38178 0.118634 7.31398 0.0737664 7.23935 0.0436218C7.16472 0.0134773 7.08478 -0.00132663 7.00431 9.32772e-05C6.92383 0.00151319 6.84447 0.019128 6.77095 0.0518865C6.69742 0.0846451 6.63126 0.131876 6.57638 0.190763L4.17895 2.5882C4.06671 2.70058 4.00366 2.85292 4.00366 3.01175C4.00366 3.17058 4.06671 3.32291 4.17895 3.43529L6.57638 5.83273C6.63172 5.88876 6.69769 5.93317 6.77042 5.96336Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1),C(),b(3,"defs")(4,"clipPath",2),E(5,"rect",3),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(3),f("id",r.pathId))},encapsulation:2})}return n})();var moe=["mask"],goe=["previewButton"],yoe=["closeButton"],_oe=(n,e)=>({height:n,width:e,border:"none"}),voe=(n,e)=>({showTransitionParams:n,hideTransitionParams:e}),boe=n=>({value:"visible",params:n});function Coe(n,e){n&1&&ye(0)}function woe(n,e){if(n&1&&(oe(0),x(1,Coe,1,0,"ng-container",10),se()),n&2){let t=y(2);m(),f("ngTemplateOutlet",t.indicatorTemplate)}}function Ioe(n,e){n&1&&E(0,"EyeIcon",11),n&2&&f("styleClass","p-image-preview-icon")}function xoe(n,e){if(n&1){let t=$();b(0,"button",8,0),P("click",function(){M(t);let r=y();return D(r.onImageClick())}),x(2,woe,2,1,"ng-container",9)(3,Ioe,1,1,"ng-template",null,1,Bt),C()}if(n&2){let t=pt(4),i=y();f("ngStyle",_t(4,_oe,i.height+"px",i.width+"px")),O("aria-label",i.zoomImageAriaLabel),m(2),f("ngIf",i.indicatorTemplate)("ngIfElse",t)}}function Toe(n,e){n&1&&E(0,"RefreshIcon")}function Eoe(n,e){}function Soe(n,e){n&1&&x(0,Eoe,0,0,"ng-template")}function Moe(n,e){n&1&&E(0,"UndoIcon")}function Doe(n,e){}function Ooe(n,e){n&1&&x(0,Doe,0,0,"ng-template")}function Aoe(n,e){n&1&&E(0,"SearchMinusIcon")}function koe(n,e){}function Noe(n,e){n&1&&x(0,koe,0,0,"ng-template")}function Loe(n,e){n&1&&E(0,"SearchPlusIcon")}function Poe(n,e){}function Roe(n,e){n&1&&x(0,Poe,0,0,"ng-template")}function Foe(n,e){n&1&&E(0,"TimesIcon")}function joe(n,e){}function Voe(n,e){n&1&&x(0,joe,0,0,"ng-template")}function Boe(n,e){if(n&1){let t=$();b(0,"div"),P("@animation.start",function(r){M(t);let o=y(2);return D(o.onAnimationStart(r))})("@animation.done",function(r){M(t);let o=y(2);return D(o.onAnimationEnd(r))}),b(1,"img",17),P("click",function(){M(t);let r=y(2);return D(r.onPreviewImageClick())}),C()()}if(n&2){let t=y(2);f("@animation",_e(8,boe,_t(5,voe,t.showTransitionOptions,t.hideTransitionOptions))),m(),f("ngStyle",t.imagePreviewStyle()),O("src",t.previewImageSrc?t.previewImageSrc:t.src,zi)("srcset",t.previewImageSrcSet)("sizes",t.previewImageSizes)}}function zoe(n,e){if(n&1){let t=$();b(0,"div",12,2),P("click",function(){M(t);let r=y();return D(r.onMaskClick())})("keydown",function(r){M(t);let o=y();return D(o.onMaskKeydown(r))}),b(2,"div",13),P("click",function(r){M(t);let o=y();return D(o.handleToolbarClick(r))}),b(3,"button",14),P("click",function(){M(t);let r=y();return D(r.rotateRight())}),x(4,Toe,1,0,"RefreshIcon",15)(5,Soe,1,0,null,10),C(),b(6,"button",14),P("click",function(){M(t);let r=y();return D(r.rotateLeft())}),x(7,Moe,1,0,"UndoIcon",15)(8,Ooe,1,0,null,10),C(),b(9,"button",16),P("click",function(){M(t);let r=y();return D(r.zoomOut())}),x(10,Aoe,1,0,"SearchMinusIcon",15)(11,Noe,1,0,null,10),C(),b(12,"button",16),P("click",function(){M(t);let r=y();return D(r.zoomIn())}),x(13,Loe,1,0,"SearchPlusIcon",15)(14,Roe,1,0,null,10),C(),b(15,"button",14,3),P("click",function(){M(t);let r=y();return D(r.closePreview())}),x(17,Foe,1,0,"TimesIcon",15)(18,Voe,1,0,null,10),C()(),x(19,Boe,2,10,"div",15),C()}if(n&2){let t=y();O("aria-modal",t.maskVisible),m(3),O("aria-label",t.rightAriaLabel()),m(),f("ngIf",!t.rotateRightIconTemplate),m(),f("ngTemplateOutlet",t.rotateRightIconTemplate),m(),O("aria-label",t.leftAriaLabel()),m(),f("ngIf",!t.rotateLeftIconTemplate),m(),f("ngTemplateOutlet",t.rotateLeftIconTemplate),m(),f("disabled",t.isZoomOutDisabled),O("aria-label",t.zoomOutAriaLabel()),m(),f("ngIf",!t.zoomOutIconTemplate),m(),f("ngTemplateOutlet",t.zoomOutIconTemplate),m(),f("disabled",t.isZoomInDisabled),O("aria-label",t.zoomInAriaLabel()),m(),f("ngIf",!t.zoomInIconTemplate),m(),f("ngTemplateOutlet",t.zoomInIconTemplate),m(),O("aria-label",t.closeAriaLabel()),m(2),f("ngIf",!t.closeIconTemplate),m(),f("ngTemplateOutlet",t.closeIconTemplate),m(),f("ngIf",t.previewVisible)}}var q4=(()=>{class n{document;config;cd;el;imageClass;imageStyle;styleClass;style;src;srcSet;sizes;previewImageSrc;previewImageSrcSet;previewImageSizes;alt;width;height;loading;appendTo;preview=!1;showTransitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)";hideTransitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)";onShow=new j;onHide=new j;onImageError=new j;mask;previewButton;closeButton;templates;indicatorTemplate;rotateRightIconTemplate;rotateLeftIconTemplate;zoomOutIconTemplate;zoomInIconTemplate;closeIconTemplate;maskVisible=!1;previewVisible=!1;rotate=0;scale=1;previewClick=!1;container;wrapper;get isZoomOutDisabled(){return this.scale-this.zoomSettings.step<=this.zoomSettings.min}get isZoomInDisabled(){return this.scale+this.zoomSettings.step>=this.zoomSettings.max}zoomSettings={default:1,step:.1,max:1.5,min:.5};constructor(t,i,r,o){this.document=t,this.config=i,this.cd=r,this.el=o}ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"indicator":this.indicatorTemplate=t.template;break;case"rotaterighticon":this.rotateRightIconTemplate=t.template;break;case"rotatelefticon":this.rotateLeftIconTemplate=t.template;break;case"zoomouticon":this.zoomOutIconTemplate=t.template;break;case"zoominicon":this.zoomInIconTemplate=t.template;break;case"closeicon":this.closeIconTemplate=t.template;break;default:this.indicatorTemplate=t.template;break}})}onImageClick(){this.preview&&(this.maskVisible=!0,this.previewVisible=!0,A.blockBodyScroll())}onMaskClick(){this.previewClick||this.closePreview(),this.previewClick=!1}onMaskKeydown(t){switch(t.code){case"Escape":this.onMaskClick(),setTimeout(()=>{A.focus(this.previewButton.nativeElement)},25),t.preventDefault();break;default:break}}onPreviewImageClick(){this.previewClick=!0}rotateRight(){this.rotate+=90,this.previewClick=!0}rotateLeft(){this.rotate-=90,this.previewClick=!0}zoomIn(){this.scale=this.scale+this.zoomSettings.step,this.previewClick=!0}zoomOut(){this.scale=this.scale-this.zoomSettings.step,this.previewClick=!0}onAnimationStart(t){switch(t.toState){case"visible":this.container=t.element,this.wrapper=this.container?.parentElement,this.appendContainer(),this.moveOnTop(),setTimeout(()=>{A.focus(this.closeButton.nativeElement)},25);break;case"void":A.addClass(this.wrapper,"p-component-overlay-leave");break}}onAnimationEnd(t){switch(t.toState){case"void":_n.clear(this.wrapper),this.maskVisible=!1,this.container=null,this.wrapper=null,this.cd.markForCheck(),this.onHide.emit({});break;case"visible":this.onShow.emit({});break}}moveOnTop(){_n.set("modal",this.wrapper,this.config.zIndex.modal)}appendContainer(){this.appendTo&&(this.appendTo==="body"?this.document.body.appendChild(this.wrapper):A.appendChild(this.wrapper,this.appendTo))}imagePreviewStyle(){return{transform:"rotate("+this.rotate+"deg) scale("+this.scale+")"}}get zoomImageAriaLabel(){return this.config.translation.aria?this.config.translation.aria.zoomImage:void 0}containerClass(){return{"p-image p-component":!0,"p-image-preview-container":this.preview}}handleToolbarClick(t){t.stopPropagation()}closePreview(){this.previewVisible=!1,this.rotate=0,this.scale=this.zoomSettings.default,A.unblockBodyScroll()}imageError(t){this.onImageError.emit(t)}rightAriaLabel(){return this.config.translation.aria?this.config.translation.aria.rotateRight:void 0}leftAriaLabel(){return this.config.translation.aria?this.config.translation.aria.rotateLeft:void 0}zoomInAriaLabel(){return this.config.translation.aria?this.config.translation.aria.zoomIn:void 0}zoomOutAriaLabel(){return this.config.translation.aria?this.config.translation.aria.zoomOut:void 0}closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}onKeydownHandler(t){this.previewVisible&&this.closePreview()}static \u0275fac=function(i){return new(i||n)(k(We),k(Pt),k(De),k(Ce))};static \u0275cmp=F({type:n,selectors:[["p-image"]],contentQueries:function(i,r,o){if(i&1&&Je(o,qe,4),i&2){let s;J(s=X())&&(r.templates=s)}},viewQuery:function(i,r){if(i&1&&(fe(moe,5),fe(goe,5),fe(yoe,5)),i&2){let o;J(o=X())&&(r.mask=o.first),J(o=X())&&(r.previewButton=o.first),J(o=X())&&(r.closeButton=o.first)}},hostAttrs:[1,"p-element"],hostBindings:function(i,r){i&1&&P("keydown.escape",function(s){return r.onKeydownHandler(s)},!1,_u)},inputs:{imageClass:"imageClass",imageStyle:"imageStyle",styleClass:"styleClass",style:"style",src:"src",srcSet:"srcSet",sizes:"sizes",previewImageSrc:"previewImageSrc",previewImageSrcSet:"previewImageSrcSet",previewImageSizes:"previewImageSizes",alt:"alt",width:"width",height:"height",loading:"loading",appendTo:"appendTo",preview:[2,"preview","preview",V],showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onShow:"onShow",onHide:"onHide",onImageError:"onImageError"},features:[$e],decls:4,vars:16,consts:[["previewButton",""],["defaultTemplate",""],["mask",""],["closeButton",""],[3,"ngClass","ngStyle"],[3,"error","ngStyle"],["type","button","class","p-image-preview-indicator",3,"ngStyle","click",4,"ngIf"],["class","p-image-mask p-component-overlay p-component-overlay-enter","role","dialog","pFocusTrap","",3,"click","keydown",4,"ngIf"],["type","button",1,"p-image-preview-indicator",3,"click","ngStyle"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],[3,"styleClass"],["role","dialog","pFocusTrap","",1,"p-image-mask","p-component-overlay","p-component-overlay-enter",3,"click","keydown"],[1,"p-image-toolbar",3,"click"],["type","button",1,"p-image-action","p-link",3,"click"],[4,"ngIf"],["type","button",1,"p-image-action","p-link",3,"click","disabled"],[1,"p-image-preview",3,"click","ngStyle"]],template:function(i,r){i&1&&(b(0,"span",4)(1,"img",5),P("error",function(s){return r.imageError(s)}),C(),x(2,xoe,5,7,"button",6)(3,zoe,20,19,"div",7),C()),i&2&&(W(r.styleClass),f("ngClass",r.containerClass())("ngStyle",r.style),m(),W(r.imageClass),f("ngStyle",r.imageStyle),O("src",r.src,zi)("srcset",r.srcSet)("sizes",r.sizes)("alt",r.alt)("width",r.width)("height",r.height)("loading",r.loading),m(),f("ngIf",r.preview),m(),f("ngIf",r.maskVisible))},dependencies:()=>[Ye,ot,Mt,st,DT,MT,kT,OT,AT,Xt,Ua],styles:[`@layer primeng{.p-image-mask{display:flex;align-items:center;justify-content:center}.p-image-preview-container{position:relative;display:inline-block;line-height:0}.p-image-preview-indicator{position:absolute;left:0;top:0;width:100%;height:100%;outline:none;border:none;padding:0;display:flex;align-items:center;justify-content:center;opacity:0;transition:opacity .3s}.p-image-preview-icon.pi{font-size:1.5rem}.p-image-preview-icon.p-icon{scale:1.5}.p-image-preview-container:hover>.p-image-preview-indicator{opacity:1;cursor:pointer}.p-image-preview-container>img{cursor:pointer}.p-image-toolbar{position:absolute;top:0;right:0;display:flex;z-index:1}.p-image-action.p-link{display:flex;justify-content:center;align-items:center}.p-image-action.p-link[disabled]{opacity:.5}.p-image-preview{transition:transform .15s;max-width:100vw;max-height:100vh}} +`],encapsulation:2,data:{animation:[oi("animation",[mn("void => visible",[Ct({transform:"scale(0.7)",opacity:0}),fn("{{showTransitionParams}}")]),mn("visible => void",[fn("{{hideTransitionParams}}",Ct({transform:"scale(0.7)",opacity:0}))])])]},changeDetection:0})}return n})(),Q4=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Ge,DT,MT,kT,OT,AT,Xt,Ha,Ge]})}return n})();function Hoe(n,e){if(n&1&&(b(0,"div",0),Ne(),b(1,"svg",3),E(2,"path",4)(3,"path",5)(4,"path",6)(5,"path",7),C()()),n&2){let t=y();f("className","s"+t.orientation+" ai-image-gallery__placeholder")}}function $oe(n,e){n&1&&E(0,"p-skeleton",8)(1,"p-skeleton",9)}function Woe(n,e){n&1&&E(0,"i",15)}function Goe(n,e){if(n&1&&(b(0,"p-image",12),x(1,Woe,1,0,"ng-template",14),C()),n&2){let t=y().$implicit;f("src",t.response.contentlet.assetVersion)("preview",!0)("alt",t.response.contentlet.assetMetaData==null?null:t.response.contentlet.assetMetaData.title)}}function qoe(n,e){if(n&1){let t=$();b(0,"dot-empty-container",16),ht(1,"dm"),P("buttonAction",function(r){M(t);let o=y(3);return D(o.regenerate.emit(r))}),C()}if(n&2){let t=y(3);f("hideContactUsLink",!0)("buttonLabel",ft(1,4,"try-again"))("secondaryButton",!0)("configuration",t.emptyConfiguration)}}function Qoe(n,e){if(n&1&&x(0,Goe,2,3,"p-image",12)(1,qoe,2,6,"dot-empty-container",13),n&2){let t=e.$implicit;we(t.response?0:1)}}function Koe(n,e){if(n&1){let t=$();b(0,"p-galleria",10),P("activeIndexChange",function(r){M(t);let o=y();return D(o.activeIndexChange.emit(r))}),x(1,Qoe,2,1,"ng-template",11),C()}if(n&2){let t=y();f("activeIndex",t.activeImageIndex)("circular",!0)("showItemNavigators",(t.images==null?null:t.images.length)>1)("showThumbnails",!1)("value",t.images)}}function Yoe(n,e){if(n&1&&(b(0,"span",2),Z(1),ht(2,"dm"),C()),n&2){let t=y();m(),jp(" ",t.activeImageIndex+1," ",ft(2,3,"of")," ",t.images.length," ")}}var K4=(()=>{let e=class e{constructor(){this.isLoading=!1,this.images=[],this.activeImageIndex=0,this.orientation="1792x1024",this.activeIndexChange=new j,this.regenerate=new j,this.dotMessageService=B(Qt),this.emptyConfiguration={title:this.dotMessageService.get("block-editor.extension.ai-image.error"),icon:"pi-exclamation-triangle"}}ngOnChanges(i){let r=i.images?.currentValue?.[this.activeImageIndex]?.error;r&&(this.emptyConfiguration.title=this.dotMessageService.get(r))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-ai-image-prompt-gallery"]],inputs:{isLoading:"isLoading",images:"images",activeImageIndex:"activeImageIndex",orientation:"orientation"},outputs:{activeIndexChange:"activeIndexChange",regenerate:"regenerate"},standalone:!0,features:[Jt,ue],decls:4,vars:4,consts:[["data-testid","ai-image-gallery__placeholder",3,"className"],["visible","true",3,"activeIndex","circular","showItemNavigators","showThumbnails","value"],[1,"ai-image-gallery__count","align-self-center"],["xmlns","http://www.w3.org/2000/svg","width","54","height","52","viewBox","0 0 54 52","fill","none"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.78857 13.8503C4.98813 13.8503 3.26143 14.5569 1.98833 15.8146C0.715222 17.0723 0 18.7781 0 20.5568V44.9439C0 46.7225 0.715222 48.4284 1.98833 49.6861C3.26143 50.9438 4.98813 51.6503 6.78857 51.6503H36.4114C38.2119 51.6503 39.9386 50.9438 41.2117 49.6861C42.4848 48.4284 43.2 46.7225 43.2 44.9439V44.9003L43.2 44.0903L39.4971 40.5298L32.7826 33.8965C32.6071 33.7112 32.3919 33.5669 32.1528 33.4741C31.9136 33.3813 31.6565 33.3423 31.4002 33.36C31.1409 33.3749 30.8873 33.4408 30.6541 33.5539C30.421 33.667 30.213 33.8249 30.0425 34.0185L26.8581 37.7985L15.5026 26.5804C15.3353 26.4047 15.1322 26.2661 14.9067 26.1736C14.6812 26.0811 14.4384 26.0369 14.1943 26.0439C13.935 26.0588 13.6813 26.1247 13.4482 26.2378C13.215 26.3509 13.0071 26.5088 12.8366 26.7023L3.70286 37.4571V20.5568C3.70286 19.7483 4.02796 18.9729 4.60664 18.4013C5.18533 17.8296 5.97019 17.5084 6.78857 17.5084H19.1962V15.6794V13.8503H6.78857ZM3.70327 44.9439V43.1637L14.3181 30.5799L24.4886 40.6274L18.2678 47.9435H6.78899C5.97909 47.9436 5.20161 47.6292 4.62433 47.068C4.04704 46.5068 3.71623 45.7439 3.70327 44.9439ZM23.0816 47.9923L31.5981 37.8961L39.3741 45.578C39.2376 46.256 38.8682 46.8666 38.3284 47.3066C37.7886 47.7465 37.1116 47.9887 36.4118 47.9923H29.7467H23.0816Z","fill","#7042F0"],["d","M38.7362 25.0102L30.7809 27.4398C30.5745 27.5027 30.3934 27.6333 30.2645 27.812C30.1356 27.9907 30.066 28.2079 30.066 28.4311C30.066 28.6543 30.1356 28.8715 30.2645 29.0501C30.3934 29.2288 30.5745 29.3594 30.7809 29.4223L38.7362 31.8519L41.0774 40.1078C41.138 40.3219 41.2638 40.5099 41.436 40.6436C41.6082 40.7773 41.8174 40.8496 42.0325 40.8496C42.2475 40.8496 42.4568 40.7773 42.629 40.6436C42.8011 40.5099 42.927 40.3219 42.9876 40.1078L45.3298 31.8519L53.2851 29.4223C53.4914 29.3594 53.6726 29.2288 53.8015 29.0501C53.9303 28.8715 54 28.6543 54 28.4311C54 28.2079 53.9303 27.9907 53.8015 27.812C53.6726 27.6333 53.4914 27.5027 53.2851 27.4398L45.3298 25.0102L42.9876 16.7543C42.927 16.5402 42.8012 16.3522 42.629 16.2184C42.4568 16.0847 42.2475 16.0124 42.0325 16.0124C41.8174 16.0124 41.6081 16.0847 41.436 16.2184C41.2638 16.3522 41.138 16.5402 41.0774 16.7543L38.7362 25.0102Z","fill","#7042F0"],["d","M48.4685 10.1913L52.7842 8.87194C52.9905 8.80901 53.1716 8.67845 53.3005 8.49977C53.4294 8.3211 53.499 8.10392 53.499 7.88075C53.499 7.65757 53.4294 7.4404 53.3005 7.26172C53.1716 7.08305 52.9905 6.95248 52.7842 6.88955L48.4685 5.57127L47.1973 1.09156C47.1366 0.877406 47.0108 0.689388 46.8386 0.555641C46.6665 0.421893 46.4572 0.349609 46.2421 0.349609C46.027 0.349609 45.8177 0.421893 45.6456 0.555641C45.4734 0.689388 45.3476 0.877406 45.2869 1.09156L44.0167 5.57127L39.7001 6.88955C39.4938 6.95245 39.3126 7.08301 39.1837 7.26169C39.0548 7.44037 38.9852 7.65756 38.9852 7.88075C38.9852 8.10394 39.0548 8.32112 39.1837 8.4998C39.3126 8.67848 39.4938 8.80904 39.7001 8.87194L44.0167 10.1913L45.2869 14.6699C45.3476 14.8841 45.4734 15.0721 45.6456 15.2059C45.8177 15.3396 46.027 15.4119 46.2421 15.4119C46.4572 15.4119 46.6665 15.3396 46.8386 15.2059C47.0108 15.0721 47.1366 14.8841 47.1973 14.6699L48.4685 10.1913Z","fill","#7042F0"],["d","M26.5741 12.0668L22.2196 13.9099C22.0364 13.9875 21.8797 14.1199 21.7693 14.2904C21.6589 14.4608 21.6 14.6615 21.6 14.8668C21.6 15.0721 21.6589 15.2728 21.7693 15.4432C21.8797 15.6137 22.0364 15.7461 22.2196 15.8237L26.5741 17.6668L28.3502 22.1859C28.4249 22.376 28.5526 22.5387 28.7168 22.6532C28.881 22.7678 29.0744 22.8289 29.2723 22.8289C29.4701 22.8289 29.6635 22.7678 29.8277 22.6532C29.992 22.5387 30.1196 22.376 30.1944 22.1859L31.9704 17.6668L36.324 15.8237C36.5072 15.7461 36.664 15.6136 36.7743 15.4432C36.8847 15.2728 36.9436 15.0721 36.9436 14.8668C36.9436 14.6615 36.8847 14.4608 36.7743 14.2904C36.664 14.1199 36.5072 13.9875 36.324 13.9099L31.9704 12.0668L30.1944 7.5487C30.1196 7.35858 29.992 7.19589 29.8277 7.08136C29.6635 6.96684 29.4701 6.90568 29.2723 6.90568C29.0744 6.90568 28.881 6.96684 28.7168 7.08136C28.5526 7.19589 28.4249 7.35858 28.3502 7.5487L26.5741 12.0668Z","fill","#7042F0"],["width","100%","height","34rem","styleClass","ai-image-gallery_skeleton","data-testid","ai-image-gallery_skeleton"],["data-testid","ai-image-gallery__count-skeleton","width","30px","height","20px",1,"ai-image-gallery__count-skeleton"],["visible","true",3,"activeIndexChange","activeIndex","circular","showItemNavigators","showThumbnails","value"],["pTemplate","item"],["imageClass","ai-image-gallery__img",3,"src","preview","alt"],[3,"hideContactUsLink","buttonLabel","secondaryButton","configuration"],["pTemplate","indicator"],[1,"pi","pi-window-maximize"],[3,"buttonAction","hideContactUsLink","buttonLabel","secondaryButton","configuration"]],template:function(r,o){r&1&&x(0,Hoe,6,1,"div",0)(1,$oe,2,0)(2,Koe,2,5,"p-galleria",1)(3,Yoe,3,5,"span",2),r&2&&(we(!o.isLoading&&!(o.images!=null&&o.images.length)?0:-1),m(),we(o.isLoading?1:-1),m(),we(!o.isLoading&&(o.images!=null&&o.images.length)?2:-1),m(),we(!o.isLoading&&(o.images!=null&&o.images.length)?3:-1))},dependencies:[G4,Zh,qe,Q4,q4,Ge,Ws,ad,Dn,ky],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}.ai-image-gallery__placeholder[_ngcontent-%COMP%]{background-color:#f3f3f4;width:calc(100% - 3rem);display:flex;justify-content:center;align-items:center;border-radius:.375rem;align-self:center}.ai-image-gallery__placeholder.s1024x1792[_ngcontent-%COMP%]{aspect-ratio:1/1.25}.ai-image-gallery__placeholder.s1792x1024[_ngcontent-%COMP%]{aspect-ratio:1/.5}.ai-image-gallery__placeholder.s1024x1024[_ngcontent-%COMP%]{aspect-ratio:1/1}p-galleria[_ngcontent-%COMP%]{height:34rem;display:flex;align-items:center;padding:1rem;border-radius:.375rem;background-color:#fafafb}.ai-image-gallery__count[_ngcontent-%COMP%]{margin-top:.5rem}[_nghost-%COMP%] .ai-image-gallery__img{width:100%;max-height:32rem;border-radius:.375rem}[_nghost-%COMP%] p-galleriacontent{width:100%}[_nghost-%COMP%] dot-empty-container .message__icon{color:#d82b2e}[_nghost-%COMP%] .message__principal-wrapper{padding:0 4.5rem}[_nghost-%COMP%] .p-image-preview{max-width:100%;max-height:48rem}[_nghost-%COMP%] .p-image-toolbar button:not(:last-child){display:none}.ai-image-gallery_skeleton[_ngcontent-%COMP%]{width:100%;height:28.75rem;display:flex}.ai-image-gallery__count-skeleton[_ngcontent-%COMP%]{margin-top:.5rem;align-self:center}"]});let n=e;return n})();function Y4(n,e,t){let i=typeof n=="function"?{next:n,error:e,complete:t}:n;return r=>r.pipe(jt({next:i.next,complete:i.complete}),Nn(o=>(i.error(o),vi)),i.finalize?Tr(i.finalize):o=>o)}var el=Symbol("STATE_SIGNAL");function ac(n,...e){n[el].update(t=>e.reduce((i,r)=>I(I({},i),typeof r=="function"?r(i):r),t))}function Z4(n){let e=Ti(()=>n());return Zoe(e)?new Proxy(n,{get(t,i){return i in e?(Ta(t[i])||Object.defineProperty(t,i,{value:cn(()=>t()[i]),configurable:!0}),Z4(t[i])):t[i]}}):n}function Zoe(n){return n?.constructor===Object}function J4(...n){let e=[...n],t="providedIn"in e[0]?e.shift():{},i=e;return(()=>{class o{constructor(){let a=i.reduce((_,v)=>v(_),Joe()),{slices:l,signals:c,methods:u,hooks:d}=a,p=I(I(I({},l),c),u);this[el]=a[el];for(let _ in p)this[_]=p[_];let{onInit:h,onDestroy:g}=d;h&&h(),g&&B(ri).onDestroy(g)}static \u0275fac=function(l){return new(l||o)};static \u0275prov=K({token:o,factory:o.\u0275fac,providedIn:t.providedIn||null})}return o})()}function Joe(){return{[el]:Lt({}),slices:{},signals:{},methods:{},hooks:{}}}function ud(n,e){return Object.keys(n).reduce((t,i)=>(e.includes(i)||(t[i]=n[i]),t),{})}function X4(n){return e=>{let t=n(I(I({},e.slices),e.signals)),i=Object.keys(t),r=ud(e.slices,i),o=ud(e.methods,i);return R(I({},e),{slices:r,signals:I(I({},e.signals),t),methods:o})}}function eP(n){return e=>{let t=n(I(I(I({[el]:e[el]},e.slices),e.signals),e.methods)),i=Object.keys(t),r=ud(e.slices,i),o=ud(e.signals,i);return R(I({},e),{slices:r,signals:o,methods:I(I({},e.methods),t)})}}function tP(n){return e=>{let t=typeof n=="function"?n():n,i=Object.keys(t);e[el].update(a=>I(I({},a),t));let r=i.reduce((a,l)=>{let c=cn(()=>e[el]()[l]);return R(I({},a),{[l]:Z4(c)})},{}),o=ud(e.signals,i),s=ud(e.methods,i);return R(I({},e),{slices:I(I({},e.slices),r),signals:o,methods:s})}}function NT(n,e){e?.injector||Vl(NT);let t=e?.injector??B($t),i=t.get(ri),r=new pe,o=n(r).subscribe();i.onDestroy(()=>o.unsubscribe());let s=a=>{if(Ta(a)){let l=Da(()=>{let u=a();Ti(()=>r.next(u))},{injector:t}),c={unsubscribe:()=>l.destroy()};return o.add(c),c}if(ko(a)){let l=a.subscribe(c=>r.next(c));return o.add(l),l}return r.next(a),{unsubscribe:wr}};return s.unsubscribe=o.unsubscribe.bind(o),s}var Xoe={status:Di.INIT,images:[],context:null,galleryActiveIndex:0,error:null,formValue:{text:"",type:"input",size:"1792x1024"}},LT=J4(tP(Xoe),X4(({status:n,context:e,images:t,galleryActiveIndex:i})=>({isLoading:cn(()=>n()===Di.LOADING),hasContext:cn(()=>!!e()),currentImage:cn(()=>{let r=t(),o=i();return r[o]}),hasImages:cn(()=>t().length>0),currentImageHasError:cn(()=>{let r=t(),o=i();return r[o]?.error})})),eP(n=>{let e=B(Xa);return{setGalleryActiveIndex:t=>{ac(n,{galleryActiveIndex:t})},setContext:t=>{ac(n,{context:t})},setFormValue:t=>{ac(n,{formValue:t})},generateImage:NT(rp(jt(()=>{ac(n,{status:Di.LOADING})}),Zt(()=>{let t=n.images(),i=n.galleryActiveIndex(),r=n.formValue(),o=n.context(),s=!!t[i]?.error,a=[...t],l=r.text?.trim()??"",c=r.type==="auto"&&o?`illustrate the following content: ${o}`:l;return e.generateAndPublishImage(c,r.size).pipe(Y4(u=>{let d={request:r,response:u,error:null};s?a[i]=d:a.push(d),ac(n,{status:Di.IDLE,images:a,galleryActiveIndex:s?i:a.length-1})},u=>{ac(n,{status:Di.ERROR,error:u})}))})))}}));var ese=()=>({width:"500px"});function tse(n,e){if(n&1){let t=$();b(0,"div",3)(1,"button",5),ht(2,"dm"),P("click",function(){M(t);let r=y();return D(r.closeDialog())}),C(),b(3,"button",6),ht(4,"dm"),P("click",function(){M(t);let r=y();return D(r.insertImage())}),C()()}if(n&2){let t=y();m(),f("label",ft(2,3,"Cancel")),m(2),f("disabled",t.store.isLoading()||t.store.currentImageHasError())("label",ft(4,5,"block-editor.extension.ai-image.insert"))}}var nP=(()=>{var e,t,i,r;let o=class o{constructor(){zn(this,e);zn(this,t);zn(this,i);zn(this,r);io(this,e,B(Qt)),io(this,t,B(Vs)),this.store=B(LT),io(this,i,B(Jl)),io(this,r,B(zu))}ngOnInit(){let a=Kt(this,r)?.data?.context||"";this.store.setContext(a)}closeDialog(){Kt(this,t).confirm({key:"ai-image-prompt",header:Kt(this,e).get("block-editor.extension.ai.confirmation.header"),message:Kt(this,e).get("block-editor.extension.ai.confirmation.message"),icon:"pi pi-exclamation-triangle",acceptLabel:Kt(this,e).get("Discard"),rejectLabel:Kt(this,e).get("Cancel"),accept:()=>{Kt(this,i).close()}})}insertImage(){let a=this.store.currentImage();Kt(this,i).close(a)}};e=new WeakMap,t=new WeakMap,i=new WeakMap,r=new WeakMap,o.\u0275fac=function(l){return new(l||o)},o.\u0275cmp=F({type:o,selectors:[["dot-ai-image-prompt"]],standalone:!0,features:[on([$i,Vs,LT]),ue],decls:6,vars:13,consts:[[1,"dialog-prompt__wrapper"],[3,"valueChange","generate","value","isLoading","hasEditorContent"],[3,"activeIndexChange","regenerate","isLoading","images","activeImageIndex","orientation"],[1,"dot-ai-image__buttons"],["key","ai-image-prompt","rejectButtonStyleClass","p-button-outlined","acceptIcon","null","rejectIcon","null"],["data-testid","close-btn","type","button","pButton","",1,"p-button-text",3,"click","label"],["data-testid","submit-btn","pButton","","type","submit","icon","pi pi-check",1,"align-self-end",3,"click","disabled","label"]],template:function(l,c){if(l&1&&(b(0,"div",0)(1,"dot-ai-image-prompt-form",1),P("valueChange",function(d){return c.store.setFormValue(d)})("generate",function(){return c.store.generateImage()}),C(),b(2,"div")(3,"dot-ai-image-prompt-gallery",2),P("activeIndexChange",function(d){return c.store.setGalleryActiveIndex(d)})("regenerate",function(){return c.store.generateImage()}),C(),x(4,tse,5,7,"div",3),C(),E(5,"p-confirmDialog",4),C()),l&2){let u;m(),f("value",c.store.currentImage())("isLoading",c.store.isLoading())("hasEditorContent",c.store.hasContext()),m(),Gt("dialog-prompt_gallery",c.store.isLoading()||c.store.hasImages()),m(),f("isLoading",c.store.isLoading())("images",c.store.images())("activeImageIndex",c.store.galleryActiveIndex())("orientation",(u=c.store.formValue())==null?null:u.size),m(),we(c.store.isLoading()||c.store.hasImages()?4:-1),m(),En(St(12,ese))}},dependencies:[Bu,Dn,an,zt,Vu,ey,W4,K4],styles:[".dialog-prompt__wrapper[_ngcontent-%COMP%]{gap:2rem;display:grid;grid-template-columns:minmax(0,max-content) minmax(50%,1fr)}.dialog-prompt__wrapper[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center}.dialog-prompt_gallery[_ngcontent-%COMP%]{justify-content:normal}dot-ai-image-prompt-gallery[_ngcontent-%COMP%]{margin-bottom:1rem}.dot-ai-image__buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}"],changeDetection:0});let n=o;return n})();var PT=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["TimesCircleIcon"]],standalone:!0,features:[xe,ue],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 14C5.61553 14 4.26215 13.5895 3.11101 12.8203C1.95987 12.0511 1.06266 10.9579 0.532846 9.67879C0.00303296 8.3997 -0.13559 6.99224 0.134506 5.63437C0.404603 4.2765 1.07129 3.02922 2.05026 2.05026C3.02922 1.07129 4.2765 0.404603 5.63437 0.134506C6.99224 -0.13559 8.3997 0.00303296 9.67879 0.532846C10.9579 1.06266 12.0511 1.95987 12.8203 3.11101C13.5895 4.26215 14 5.61553 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM7 1.16667C5.84628 1.16667 4.71846 1.50879 3.75918 2.14976C2.79989 2.79074 2.05222 3.70178 1.61071 4.76768C1.16919 5.83358 1.05367 7.00647 1.27876 8.13803C1.50384 9.26958 2.05941 10.309 2.87521 11.1248C3.69102 11.9406 4.73042 12.4962 5.86198 12.7212C6.99353 12.9463 8.16642 12.8308 9.23232 12.3893C10.2982 11.9478 11.2093 11.2001 11.8502 10.2408C12.4912 9.28154 12.8333 8.15373 12.8333 7C12.8333 5.45291 12.2188 3.96918 11.1248 2.87521C10.0308 1.78125 8.5471 1.16667 7 1.16667ZM4.66662 9.91668C4.58998 9.91704 4.51404 9.90209 4.44325 9.87271C4.37246 9.84333 4.30826 9.8001 4.2544 9.74557C4.14516 9.6362 4.0838 9.48793 4.0838 9.33335C4.0838 9.17876 4.14516 9.0305 4.2544 8.92113L6.17553 7L4.25443 5.07891C4.15139 4.96832 4.09529 4.82207 4.09796 4.67094C4.10063 4.51982 4.16185 4.37563 4.26872 4.26876C4.3756 4.16188 4.51979 4.10066 4.67091 4.09799C4.82204 4.09532 4.96829 4.15142 5.07887 4.25446L6.99997 6.17556L8.92106 4.25446C9.03164 4.15142 9.1779 4.09532 9.32903 4.09799C9.48015 4.10066 9.62434 4.16188 9.73121 4.26876C9.83809 4.37563 9.89931 4.51982 9.90198 4.67094C9.90464 4.82207 9.84855 4.96832 9.74551 5.07891L7.82441 7L9.74554 8.92113C9.85478 9.0305 9.91614 9.17876 9.91614 9.33335C9.91614 9.48793 9.85478 9.6362 9.74554 9.74557C9.69168 9.8001 9.62748 9.84333 9.55669 9.87271C9.4859 9.90209 9.40996 9.91704 9.33332 9.91668C9.25668 9.91704 9.18073 9.90209 9.10995 9.87271C9.03916 9.84333 8.97495 9.8001 8.9211 9.74557L6.99997 7.82444L5.07884 9.74557C5.02499 9.8001 4.96078 9.84333 4.88999 9.87271C4.81921 9.90209 4.74326 9.91704 4.66662 9.91668Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1),C(),b(3,"defs")(4,"clipPath",2),E(5,"rect",3),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(3),f("id",r.pathId))},encapsulation:2})}return n})();var nse=J8(rP());var RT=class extends TypeError{constructor(e,t){let i,c=e,{message:r,explanation:o}=c,s=ca(c,["message","explanation"]),{path:a}=e,l=a.length===0?r:`At path: ${a.join(".")} -- ${r}`;super(o??l),o!=null&&(this.cause=l),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>i??(i=[e,...t()])}};function ise(n){return lc(n)&&typeof n[Symbol.iterator]=="function"}function lc(n){return typeof n=="object"&&n!=null}function Ry(n){return typeof n=="symbol"?n.toString():typeof n=="string"?JSON.stringify(n):`${n}`}function rse(n){let{done:e,value:t}=n.next();return e?void 0:t}function ose(n,e,t,i){if(n===!0)return;n===!1?n={}:typeof n=="string"&&(n={message:n});let{path:r,branch:o}=e,{type:s}=t,{refinement:a,message:l=`Expected a value of type \`${s}\`${a?` with refinement \`${a}\``:""}, but received: \`${Ry(i)}\``}=n;return R(I({value:i,type:s,refinement:a,key:r[r.length-1],path:r,branch:o},n),{message:l})}function*oP(n,e,t,i){ise(n)||(n=[n]);for(let r of n){let o=ose(r,e,t,i);o&&(yield o)}}function*sP(n,e,t={}){let{path:i=[],branch:r=[n],coerce:o=!1,mask:s=!1}=t,a={path:i,branch:r};if(o&&(n=e.coercer(n,a),s&&e.type!=="type"&&lc(e.schema)&&lc(n)&&!Array.isArray(n)))for(let c in n)e.schema[c]===void 0&&delete n[c];let l="valid";for(let c of e.validator(n,a))c.explanation=t.message,l="not_valid",yield[c,void 0];for(let[c,u,d]of e.entries(n,a)){let p=sP(u,d,{path:c===void 0?i:[...i,c],branch:c===void 0?r:[...r,u],coerce:o,mask:s,message:t.message});for(let h of p)h[0]?(l=h[0].refinement!=null?"not_refined":"not_valid",yield[h[0],void 0]):o&&(u=h[1],c===void 0?n=u:n instanceof Map?n.set(c,u):n instanceof Set?n.add(u):lc(n)&&(u!==void 0||c in n)&&(n[c]=u))}if(l!=="not_valid")for(let c of e.refiner(n,a))c.explanation=t.message,l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,n])}var dd=class{constructor(e){let{type:t,schema:i,validator:r,refiner:o,coercer:s=l=>l,entries:a=function*(){}}=e;this.type=t,this.schema=i,this.entries=a,this.coercer=s,r?this.validator=(l,c)=>{let u=r(l,c);return oP(u,c,this,l)}:this.validator=()=>[],o?this.refiner=(l,c)=>{let u=o(l,c);return oP(u,c,this,l)}:this.refiner=()=>[]}assert(e,t){return FT(e,this,t)}create(e,t){return sse(e,this,t)}is(e){return lse(e,this)}mask(e,t){return ase(e,this,t)}validate(e,t={}){return Jh(e,this,t)}};function FT(n,e,t){let i=Jh(n,e,{message:t});if(i[0])throw i[0]}function sse(n,e,t){let i=Jh(n,e,{coerce:!0,message:t});if(i[0])throw i[0];return i[1]}function ase(n,e,t){let i=Jh(n,e,{coerce:!0,mask:!0,message:t});if(i[0])throw i[0];return i[1]}function lse(n,e){return!Jh(n,e)[0]}function Jh(n,e,t={}){let i=sP(n,e,t),r=rse(i);return r[0]?[new RT(r[0],function*(){for(let s of i)s[0]&&(yield s[0])}),void 0]:[void 0,r[1]]}function aP(n,e){return new dd({type:n,schema:null,validator:e})}function jT(n){return new dd({type:"array",schema:n,*entries(e){if(n&&Array.isArray(e))for(let[t,i]of e.entries())yield[t,i,n]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${Ry(e)}`}})}function cse(){return aP("never",()=>!1)}function Fy(n){let e=n?Object.keys(n):[],t=cse();return new dd({type:"object",schema:n||null,*entries(i){if(n&&lc(i)){let r=new Set(Object.keys(i));for(let o of e)r.delete(o),yield[o,i[o],n[o]];for(let o of r)yield[o,i[o],t]}},validator(i){return lc(i)||`Expected an object, but received: ${Ry(i)}`},coercer(i){return lc(i)?I({},i):i}})}function lP(n){return new dd(R(I({},n),{validator:(e,t)=>e===void 0||n.validator(e,t),refiner:(e,t)=>e===void 0||n.refiner(e,t)}))}function Xh(){return aP("string",n=>typeof n=="string"||`Expected a string, but received: ${Ry(n)}`)}function Oi(n){this.content=n}Oi.prototype={constructor:Oi,find:function(n){for(var e=0;e>1}};Oi.from=function(n){if(n instanceof Oi)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new Oi(e)};var VT=Oi;function yP(n,e,t){for(let i=0;;i++){if(i==n.childCount||i==e.childCount)return n.childCount==e.childCount?null:t;let r=n.child(i),o=e.child(i);if(r==o){t+=r.nodeSize;continue}if(!r.sameMarkup(o))return t;if(r.isText&&r.text!=o.text){for(let s=0;r.text[s]==o.text[s];s++)t++;return t}if(r.content.size||o.content.size){let s=yP(r.content,o.content,t+1);if(s!=null)return s}t+=r.nodeSize}}function _P(n,e,t,i){for(let r=n.childCount,o=e.childCount;;){if(r==0||o==0)return r==o?null:{a:t,b:i};let s=n.child(--r),a=e.child(--o),l=s.nodeSize;if(s==a){t-=l,i-=l;continue}if(!s.sameMarkup(a))return{a:t,b:i};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;ce&&i(l,r+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,t-u),i,r+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,i,r){let o="",s=!0;return this.nodesBetween(e,t,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,t-l):a.isLeaf?r?typeof r=="function"?r(a):r:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&i&&(s?s=!1:o+=i),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,i=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(i)&&(r[r.length-1]=t.withText(t.text+i.text),o=1);oe)for(let o=0,s=0;se&&((st)&&(a.isText?a=a.cut(Math.max(0,e-s),Math.min(a.text.length,t-s)):a=a.cut(Math.max(0,e-s-1),Math.min(a.content.size,t-s-1))),i.push(a),r+=a.nodeSize),s=l}return new n(i,r)}cutByIndex(e,t){return e==t?n.empty:e==0&&t==this.content.length?this:new n(this.content.slice(e,t))}replaceChild(e,t){let i=this.content[e];if(i==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-i.nodeSize;return r[e]=t,new n(r,o)}addToStart(e){return new n([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new n(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;tthis.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let i=0,r=0;;i++){let o=this.child(i),s=r+o.nodeSize;if(s>=e)return s==e||t>0?jy(i+1,s):jy(i,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return n.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new n(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return n.empty;let t,i=0;for(let r=0;r{class n{constructor(t,i){this.type=t,this.attrs=i}addToSet(t){let i,r=!1;for(let o=0;othis.type.rank&&(i||(i=t.slice(0,o)),i.push(this),r=!0),i&&i.push(s)}}return i||(i=t.slice()),r||i.push(this),i}removeFromSet(t){for(let i=0;ir.type.rank-o.type.rank),i}}return n.none=[],n})(),dc=class extends Error{},he=class n{constructor(e,t,i){this.content=e,this.openStart=t,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let i=bP(this.content,e+this.openStart,t);return i&&new n(i,this.openStart,this.openEnd)}removeBetween(e,t){return new n(vP(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return n.empty;let i=t.openStart||0,r=t.openEnd||0;if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new n(ne.fromJSON(e,t.content),i,r)}static maxOpen(e,t=!0){let i=0,r=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)r++;return new n(e,i,r)}};he.empty=new he(ne.empty,0,0);function vP(n,e,t){let{index:i,offset:r}=n.findIndex(e),o=n.maybeChild(i),{index:s,offset:a}=n.findIndex(t);if(r==e||o.isText){if(a!=t&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(i!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(i,o.copy(vP(o.content,e-r-1,t-r-1)))}function bP(n,e,t,i){let{index:r,offset:o}=n.findIndex(e),s=n.maybeChild(r);if(o==e||s.isText)return i&&!i.canReplace(r,r,t)?null:n.cut(0,e).append(t).append(n.cut(e));let a=bP(s.content,e-o-1,t);return a&&n.replaceChild(r,s.copy(a))}function use(n,e,t){if(t.openStart>n.depth)throw new dc("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new dc("Inconsistent open depths");return CP(n,e,t,0)}function CP(n,e,t,i){let r=n.index(i),o=n.node(i);if(r==e.index(i)&&i=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function ef(n,e,t,i){let r=(e||n).node(t),o=0,s=e?e.index(t):r.childCount;n&&(o=n.index(t),n.depth>t?o++:n.textOffset&&(cc(n.nodeAfter,i),o++));for(let a=o;ar&&UT(n,e,r+1),s=i.depth>r&&UT(t,i,r+1),a=[];return ef(null,n,r,a),o&&s&&e.index(r)==t.index(r)?(wP(o,s),cc(uc(o,IP(n,e,t,i,r+1)),a)):(o&&cc(uc(o,zy(n,e,r+1)),a),ef(e,t,r,a),s&&cc(uc(s,zy(t,i,r+1)),a)),ef(i,null,r,a),new ne(a)}function zy(n,e,t){let i=[];if(ef(null,n,t,i),n.depth>t){let r=UT(n,e,t+1);cc(uc(r,zy(n,e,t+1)),i)}return ef(e,null,t,i),new ne(i)}function dse(n,e){let t=e.depth-n.openStart,r=e.node(t).copy(n.content);for(let o=t-1;o>=0;o--)r=e.node(o).copy(ne.from(r));return{start:r.resolveNoCache(n.openStart+t),end:r.resolveNoCache(r.content.size-n.openEnd-t)}}var Uy=class n{constructor(e,t,i){this.pos=e,this.path=t,this.parentOffset=i,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=e.child(t);return i?e.child(t).cut(i):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let i=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let o=0;o0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos=0;i--)if(e.pos<=this.end(i)&&(!t||t(this.node(i))))return new pc(this,e,i);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let i=[],r=0,o=t;for(let s=e;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(i.push(s,a,r+l),!c||(s=s.child(a),s.isText))break;o=c-1,r+=l+1}return new n(t,i,o)}static resolveCached(e,t){let i=cP.get(e);if(i)for(let o=0;oe&&this.nodesBetween(e,t,o=>(i.isInSet(o.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),xP(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,i=ne.empty,r=0,o=i.childCount){let s=this.contentMatchAt(e).matchFragment(i,r,o),a=s&&s.matchFragment(this.content,t);if(!a||!a.validEnd)return!1;for(let l=r;lt.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let i;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,i)}let r=ne.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,r,i);return o.type.checkAttrs(o.attrs),o}};yo.prototype.text=void 0;var $T=class n extends yo{constructor(e,t,i,r){if(super(e,t,null,r),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):xP(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new n(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new n(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function xP(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}var hc=class n{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let i=new WT(e,t);if(i.next==null)return n.empty;let r=TP(i);i.next&&i.err("Unexpected trailing text");let o=bse(vse(r));return Cse(o,i),o}matchType(e){for(let t=0;tc.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(i){e.push(i);for(let r=0;r{let o=r+(i.validEnd?"*":" ")+" ";for(let s=0;s"+e.indexOf(i.next[s].next);return o}).join(` +`)}};hc.empty=new hc(!0);var WT=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};function TP(n){let e=[];do e.push(fse(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function fse(n){let e=[];do e.push(mse(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function mse(n){let e=_se(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=gse(n,e);else break;return e}function uP(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function gse(n,e){let t=uP(n),i=t;return n.eat(",")&&(n.next!="}"?i=uP(n):i=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:i,expr:e}}function yse(n,e){let t=n.nodeTypes,i=t[e];if(i)return[i];let r=[];for(let o in t){let s=t[o];s.groups.indexOf(e)>-1&&r.push(s)}return r.length==0&&n.err("No node type or group '"+e+"' found"),r}function _se(n){if(n.eat("(")){let e=TP(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=yse(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function vse(n){let e=[[]];return r(o(n,0),t()),e;function t(){return e.push([])-1}function i(s,a,l){let c={term:l,to:a};return e[s].push(c),c}function r(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=o(s.exprs[l],a);if(l==s.exprs.length-1)return c;r(c,a=t())}else if(s.type=="star"){let l=t();return i(a,l),r(o(s.expr,l),l),[i(l)]}else if(s.type=="plus"){let l=t();return r(o(s.expr,a),l),r(o(s.expr,l),l),[i(l)]}else{if(s.type=="opt")return[i(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c{n[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||r.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[i.join(",")]=new hc(i.indexOf(n.length-1)>-1);for(let s=0;s-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;ti[o]=new n(o,t,s));let r=t.spec.topNode||"doc";if(!i[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};function wse(n,e,t){let i=t.split("|");return r=>{let o=r===null?"null":typeof r;if(i.indexOf(o)<0)throw new RangeError(`Expected value of type ${i} for attribute ${e} on type ${n}, got ${o}`)}}var GT=class{constructor(e,t,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?wse(e,t,i.validate):i.validate}get isRequired(){return!this.hasDefault}},nf=class n{constructor(e,t,i,r){this.name=e,this.rank=t,this.schema=i,this.spec=r,this.attrs=OP(e,r.attrs),this.excluded=null;let o=SP(this.attrs);this.instance=o?new tn(this,o):null}create(e=null){return!e&&this.instance?this.instance:new tn(this,MP(this.attrs,e))}static compile(e,t){let i=Object.create(null),r=0;return e.forEach((o,s)=>i[o]=new n(o,r++,t,s)),i}removeFromSet(e){for(var t=0;t-1}},rf=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=VT.from(e.nodes),t.marks=VT.from(e.marks||{}),this.nodes=Hy.compile(this.spec.nodes,this),this.marks=nf.compile(this.spec.marks,this);let i=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let o=this.nodes[r],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=i[s]||(i[s]=hc.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?pP(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let r in this.marks){let o=this.marks[r],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:pP(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,i,r){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Hy){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,i,r)}text(e,t){let i=this.nodes.text;return new $T(i,i.defaultAttrs,e,tn.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return yo.fromJSON(this,e)}markFromJSON(e){return tn.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}};function pP(n,e){let t=[];for(let i=0;i-1)&&t.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[i]+"'")}return t}function Ise(n){return n.tag!=null}function xse(n){return n.style!=null}var qs=class n{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let i=this.matchedStyles=[];t.forEach(r=>{if(Ise(r))this.tags.push(r);else if(xse(r)){let o=/[^=]*/.exec(r.style)[0];i.indexOf(o)<0&&i.push(o),this.styles.push(r)}}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=e.nodes[r.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let i=new Gy(this,t,!1);return i.addAll(e,t.from,t.to),i.finish()}parseSlice(e,t={}){let i=new Gy(this,t,!0);return i.addAll(e,t.from,t.to),he.maxOpen(i.finish())}matchTag(e,t,i){for(let r=i?this.tags.indexOf(i)+1:0;re.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(s.getAttrs){let l=s.getAttrs(t);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let t=[];function i(r){let o=r.priority==null?50:r.priority,s=0;for(;s{i(s=fP(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in e.nodes){let o=e.nodes[r].spec.parseDOM;o&&o.forEach(s=>{i(s=fP(s)),s.node||s.ignore||s.mark||(s.node=r)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new n(e,n.schemaRules(e)))}},AP={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Tse={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},kP={ol:!0,ul:!0},$y=1,Wy=2,tf=4;function hP(n,e,t){return e!=null?(e?$y:0)|(e==="full"?Wy:0):n&&n.whitespace=="pre"?$y|Wy:t&~tf}var pd=class{constructor(e,t,i,r,o,s,a){this.type=e,this.attrs=t,this.marks=i,this.pendingMarks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=tn.none,this.stashMarks=[],this.match=s||(a&tf?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(ne.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let i=this.type.contentMatch,r;return(r=i.findWrapping(e.type))?(this.match=i,r):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&$y)){let i=this.content[this.content.length-1],r;if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let t=ne.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(ne.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,i=this.pendingMarks;tthis.addAll(e)),s&&this.sync(a),this.needsBlock=l}else this.withStyleRules(e,()=>{this.addElementByRule(e,o,o.consuming===!1?r:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` +`))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=tn.none,i=tn.none;if(e.length)for(let r=0;r{l.clearMark(c)&&(i=c.addToSet(i))}):t=this.parser.schema.marks[l.mark].create(l.attrs).addToSet(t),l.consuming===!1)a=l;else break}}return[t,i]}addElementByRule(e,t,i){let r,o,s;t.node?(o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace)):(s=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(s));let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,i);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l)}r&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(e,t,i){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,s=i==null?null:e.childNodes[i];o!=s;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,i;for(let r=this.open;r>=0;r--){let o=this.nodes[r],s=o.findWrapping(e);if(s&&(!t||t.length>s.length)&&(t=s,i=o,!s.length)||o.solid)break}if(!t)return!1;this.sync(i);for(let r=0;rthis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let i=this.nodes[t].content;for(let r=i.length-1;r>=0;r--)e+=i[r].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let i=0;i-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),i=this.options.context,r=!this.isOpen&&(!i||i.parent.type==this.nodes[0].type),o=-(i?i.depth+1:0)+(r?0:1),s=(a,l)=>{for(;a>=0;a--){let c=t[a];if(c==""){if(a==t.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let u=l>0||l==0&&r?this.nodes[l].type:i&&l>=o?i.node(l-o).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;l--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let i=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let t in this.parser.schema.nodes){let i=this.parser.schema.nodes[t];if(i.isTextblock&&i.defaultAttrs)return i}}addPendingMark(e){let t=Dse(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let i=this.open;i>=0;i--){let r=this.nodes[i];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let s=r.popFromStashMark(e);s&&r.type&&r.type.allowsMarkType(s.type)&&(r.activeMarks=s.addToSet(r.activeMarks))}if(r==t)break}}};function Ese(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let i=e.nodeType==1?e.nodeName.toLowerCase():null;i&&kP.hasOwnProperty(i)&&t?(t.appendChild(e),e=t):i=="li"?t=e:i&&(t=null)}}function Sse(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function fP(n){let e={};for(let t in n)e[t]=n[t];return e}function Mse(n,e){let t=e.schema.nodes;for(let i in t){let r=t[i];if(!r.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let l=0;l{if(o.length||s.marks.length){let a=0,l=0;for(;a=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(e,t,i={}){let r=this.marks[e.type.name];return r&&Vy(zT(i),r(e,t),null,e.attrs)}static renderSpec(e,t,i=null,r){return Vy(e,t,i,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new n(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=mP(e.nodes);return t.text||(t.text=i=>i.text),t}static marksFromSchema(e){return mP(e.marks)}};function mP(n){let e={};for(let t in n){let i=n[t].spec.toDOM;i&&(e[t]=i)}return e}function zT(n){return n.document||window.document}var gP=new WeakMap;function Ose(n){let e=gP.get(n);return e===void 0&&gP.set(n,e=Ase(n)),e}function Ase(n){let e=null;function t(i){if(i&&typeof i=="object")if(Array.isArray(i))if(typeof i[0]=="string")e||(e=[]),e.push(i);else for(let r=0;r-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=r.indexOf(" ");s>0&&(t=r.slice(0,s),r=r.slice(s+1));let a,l=t?n.createElementNS(t,r):n.createElement(r),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let p=d.indexOf(" ");p>0?l.setAttributeNS(d.slice(0,p),d.slice(p+1),c[d]):l.setAttribute(d,c[d])}}for(let d=u;du)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:g}=Vy(n,p,t,i);if(l.appendChild(h),g){if(a)throw new RangeError("Multiple content holes");a=g}}}return{dom:l,contentDOM:a}}var PP=65535,RP=Math.pow(2,16);function kse(n,e){return n+e*RP}function NP(n){return n&PP}function Nse(n){return(n-(n&PP))/RP}var FP=1,jP=2,qy=4,VP=8,af=class{constructor(e,t,i){this.pos=e,this.delInfo=t,this.recover=i}get deleted(){return(this.delInfo&VP)>0}get deletedBefore(){return(this.delInfo&(FP|qy))>0}get deletedAfter(){return(this.delInfo&(jP|qy))>0}get deletedAcross(){return(this.delInfo&qy)>0}},Qs=class n{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&n.empty)return n.empty}recover(e){let t=0,i=NP(e);if(!this.inverted)for(let r=0;re)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(e<=d){let p=c?e==l?-1:e==d?1:t:t,h=l+r+(p<0?0:u);if(i)return h;let g=e==(t<0?l:d)?null:kse(a/3,e-l),_=e==l?jP:e==d?FP:qy;return(t<0?e!=l:e!=d)&&(_|=VP),new af(h,_,g)}r+=u-c}return i?e+r:new af(e+r,0,null)}touches(e,t){let i=0,r=NP(t),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;ae)break;let c=this.ranges[a+o],u=l+c;if(e<=u&&a==r*3)return!0;i+=this.ranges[a+s]-c}return!1}forEach(e){let t=this.inverted?2:1,i=this.inverted?1:2;for(let r=0,o=0;r=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),r!=null&&r>t?i-r-1:void 0)}}invert(){let e=new n;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let i=this.from;io&&l!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),r),t.openStart,t.openEnd);return $n.fromReplace(e,this.from,this.to,o)}invert(){return new fc(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return t.deleted&&i.deleted||t.pos>=i.pos?null:new n(t.pos,i.pos,this.mark)}merge(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}};On.jsonID("addMark",cf);var fc=class n extends On{constructor(e,t,i){super(),this.from=e,this.to=t,this.mark=i}apply(e){let t=e.slice(this.from,this.to),i=new he(JT(t.content,r=>r.mark(this.mark.removeFromSet(r.marks)),e),t.openStart,t.openEnd);return $n.fromReplace(e,this.from,this.to,i)}invert(){return new cf(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return t.deleted&&i.deleted||t.pos>=i.pos?null:new n(t.pos,i.pos,this.mark)}merge(e){return e instanceof n&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new n(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new n(t.from,t.to,e.markFromJSON(t.mark))}};On.jsonID("removeMark",fc);var uf=class n extends On{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $n.fail("No node at mark step's position");let i=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return $n.fromReplace(e,this.pos,this.pos+1,new he(ne.from(i),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let i=this.mark.addToSet(t.marks);if(i.length==t.marks.length){for(let r=0;ri.pos?null:new n(t.pos,i.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new n(t.from,t.to,t.gapFrom,t.gapTo,he.fromJSON(e,t.slice),t.insert,!!t.structure)}};On.jsonID("replaceAround",Wn);function YT(n,e,t){let i=n.resolve(e),r=t-e,o=i.depth;for(;r>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,r--;if(r>0){let s=i.node(o).maybeChild(i.indexAfter(o));for(;r>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,r--}}return!1}function Lse(n,e,t,i){let r=[],o=[],s,a;n.doc.nodesBetween(e,t,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!i.isInSet(d)&&u.type.allowsMarkType(i.type)){let p=Math.max(c,e),h=Math.min(c+l.nodeSize,t),g=i.addToSet(d);for(let _=0;_n.step(l)),o.forEach(l=>n.step(l))}function Pse(n,e,t,i){let r=[],o=0;n.doc.nodesBetween(e,t,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(i instanceof nf){let c=s.marks,u;for(;u=i.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else i?i.isInSet(s.marks)&&(l=[i]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,t);for(let u=0;un.step(new fc(s.from,s.to,s.style)))}function BP(n,e,t,i=t.contentMatch,r=!0){let o=n.doc.nodeAt(e),s=[],a=e+1;for(let l=0;l=0;l--)n.step(s[l])}function Rse(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Ks(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let i=n.depth;;--i){let r=n.$from.node(i),o=n.$from.index(i),s=n.$to.indexAfter(i);if(it;g--)_||i.index(g)>0?(_=!0,u=ne.from(i.node(g).copy(u)),d++):l--;let p=ne.empty,h=0;for(let g=o,_=!1;g>t;g--)_||r.after(g+1)=0;s--){if(i.size){let a=t[s].type.contentMatch.matchFragment(i);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=ne.from(t[s].type.create(t[s].attrs,i))}let r=e.start,o=e.end;n.step(new Wn(r,o,r,o,new he(i,0,0),t.length,!0))}function zse(n,e,t,i,r){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(e,t,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(i,r)&&$se(n.doc,n.mapping.slice(o).map(a),i)){let l=null;if(i.schema.linebreakReplacement){let p=i.whitespace=="pre",h=!!i.contentMatch.matchType(i.schema.linebreakReplacement);p&&!h?l=!1:!p&&h&&(l=!0)}l===!1&&Hse(n,s,a,o),BP(n,n.mapping.slice(o).map(a,1),i,void 0,l===null);let c=n.mapping.slice(o),u=c.map(a,1),d=c.map(a+s.nodeSize,1);return n.step(new Wn(u,d,u+1,d-1,new he(ne.from(i.create(r,null,s.marks)),0,0),1,!0)),l===!0&&Use(n,s,a,o),!1}})}function Use(n,e,t,i){e.forEach((r,o)=>{if(r.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(r.text);){let l=n.mapping.slice(i).map(t+1+o+s.index);n.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Hse(n,e,t,i){e.forEach((r,o)=>{if(r.type==r.type.schema.linebreakReplacement){let s=n.mapping.slice(i).map(t+1+o);n.replaceWith(s,s+1,e.type.schema.text(` +`))}})}function $se(n,e,t){let i=n.resolve(e),r=i.index();return i.parent.canReplaceWith(r,r+1,t)}function Wse(n,e,t,i,r){let o=n.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");t||(t=o.type);let s=t.create(i,null,r||o.marks);if(o.isLeaf)return n.replaceWith(e,e+o.nodeSize,s);if(!t.validContent(o.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new Wn(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new he(ne.from(s),0,0),1,!0))}function $r(n,e,t=1,i){let r=n.resolve(e),o=r.depth-t,s=i&&i[i.length-1]||r.parent;if(o<0||r.parent.type.spec.isolating||!r.parent.canReplace(r.index(),r.parent.childCount)||!s.type.validContent(r.parent.content.cutByIndex(r.index(),r.parent.childCount)))return!1;for(let c=r.depth-1,u=t-2;c>o;c--,u--){let d=r.node(c),p=r.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(p,d.childCount),g=i&&i[u+1];g&&(h=h.replaceChild(0,g.type.create(g.attrs)));let _=i&&i[u]||d;if(!d.canReplace(p+1,d.childCount)||!_.type.validContent(h))return!1}let a=r.indexAfter(o),l=i&&i[0];return r.node(o).canReplaceWith(a,a,l?l.type:r.node(o+1).type)}function Gse(n,e,t=1,i){let r=n.doc.resolve(e),o=ne.empty,s=ne.empty;for(let a=r.depth,l=r.depth-t,c=t-1;a>l;a--,c--){o=ne.from(r.node(a).copy(o));let u=i&&i[c];s=ne.from(u?u.type.create(u.attrs,s):r.node(a).copy(s))}n.step(new Ai(e,e,new he(o.append(s),t,t),!0))}function vo(n,e){let t=n.resolve(e),i=t.index();return zP(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(i,i+1)}function zP(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function md(n,e,t=-1){let i=n.resolve(e);for(let r=i.depth;;r--){let o,s,a=i.index(r);if(r==i.depth?(o=i.nodeBefore,s=i.nodeAfter):t>0?(o=i.node(r+1),a++,s=i.node(r).maybeChild(a)):(o=i.node(r).maybeChild(a-1),s=i.node(r+1)),o&&!o.isTextblock&&zP(o,s)&&i.node(r).canReplace(a,a+1))return e;if(r==0)break;e=t<0?i.before(r):i.after(r)}}function qse(n,e,t){let i=new Ai(e-t,e+t,he.empty,!0);n.step(i)}function Qse(n,e,t){let i=n.resolve(e);if(i.parent.canReplaceWith(i.index(),i.index(),t))return e;if(i.parentOffset==0)for(let r=i.depth-1;r>=0;r--){let o=i.index(r);if(i.node(r).canReplaceWith(o,o,t))return i.before(r+1);if(o>0)return null}if(i.parentOffset==i.parent.content.size)for(let r=i.depth-1;r>=0;r--){let o=i.indexAfter(r);if(i.node(r).canReplaceWith(o,o,t))return i.after(r+1);if(o=0;s--){let a=s==i.depth?0:i.pos<=(i.start(s+1)+i.end(s+1))/2?-1:1,l=i.index(s)+(a>0?1:0),c=i.node(s),u=!1;if(o==1)u=c.canReplace(l,l,r);else{let d=c.contentMatchAt(l).findWrapping(r.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return a==0?i.pos:a<0?i.before(s+1):i.after(s+1)}return null}function pf(n,e,t=e,i=he.empty){if(e==t&&!i.size)return null;let r=n.resolve(e),o=n.resolve(t);return UP(r,o,i)?new Ai(e,t,i):new ZT(r,o,i).fit()}function UP(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}var ZT=class{constructor(e,t,i){this.$from=e,this.$to=t,this.unplaced=i,this.frontier=[],this.placed=ne.empty;for(let r=0;r<=e.depth;r++){let o=e.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(r))})}for(let r=e.depth;r>0;r--)this.placed=ne.from(e.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,i=this.$from,r=this.close(e<0?this.$to:i.doc.resolve(e));if(!r)return null;let o=this.placed,s=i.depth,a=r.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new he(o,s,a);return e>-1?new Wn(i.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||i.pos!=this.$to.pos?new Ai(i.pos,r.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,i=0,r=this.unplaced.openEnd;i1&&(r=0),o.type.spec.isolating&&r<=i){e=i;break}t=o.content}for(let t=1;t<=2;t++)for(let i=t==1?e:this.unplaced.openStart;i>=0;i--){let r,o=null;i?(o=QT(this.unplaced.content,i-1).firstChild,r=o.content):r=this.unplaced.content;let s=r.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,d=null;if(t==1&&(s?c.matchType(s.type)||(d=c.fillBefore(ne.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(t==2&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:i,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:t,openEnd:i}=this.unplaced,r=QT(e,t);return!r.childCount||r.firstChild.isLeaf?!1:(this.unplaced=new he(e,t+1,Math.max(i,r.size+t>=e.size-i?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:i}=this.unplaced,r=QT(e,t);if(r.childCount<=1&&t>0){let o=e.size-t<=t+r.size;this.unplaced=new he(of(e,t-1,1),t-1,o?t-1:i)}else this.unplaced=new he(of(e,t,1),t,i)}placeNodes({sliceDepth:e,frontierDepth:t,parent:i,inject:r,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let _=0;_1||l==0||_.content.size)&&(d=v,u.push(HP(_.mark(p.allowedMarks(_.marks)),c==1?l:0,c==a.childCount?h:-1)))}let g=c==a.childCount;g||(h=-1),this.placed=sf(this.placed,t,ne.from(u)),this.frontier[t].match=d,g&&h<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let _=0,v=a;_1&&r==this.$to.end(--i);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:i,type:r}=this.frontier[t],o=t=0;a--){let{match:l,type:c}=this.frontier[a],u=KT(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:t,fit:s,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=sf(this.placed,t.depth,t.fit)),e=t.move;for(let i=t.depth+1;i<=e.depth;i++){let r=e.node(i),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(i));this.openFrontierNode(r.type,r.attrs,o)}return e}openFrontierNode(e,t=null,i){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=sf(this.placed,this.depth,ne.from(e.create(t,i))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(ne.empty,!0);t.childCount&&(this.placed=sf(this.placed,this.frontier.length,t))}};function of(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(of(n.firstChild.content,e-1,t)))}function sf(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(sf(n.lastChild.content,e-1,t)))}function QT(n,e){for(let t=0;t1&&(i=i.replaceChild(0,HP(i.firstChild,e-1,i.childCount==1?t-1:0))),e>0&&(i=n.type.contentMatch.fillBefore(i).append(i),t<=0&&(i=i.append(n.type.contentMatch.matchFragment(i).fillBefore(ne.empty,!0)))),n.copy(i)}function KT(n,e,t,i,r){let o=n.node(e),s=r?n.indexAfter(e):n.index(e);if(s==o.childCount&&!t.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,s);return a&&!Kse(t,o.content,s)?a:null}function Kse(n,e,t){for(let i=t;i0;p--,h--){let g=r.node(p).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;s.indexOf(p)>-1?a=p:r.before(p)==h&&s.splice(1,0,-p)}let l=s.indexOf(a),c=[],u=i.openStart;for(let p=i.content,h=0;;h++){let g=p.firstChild;if(c.push(g),h==i.openStart)break;p=g.content}for(let p=u-1;p>=0;p--){let h=c[p],g=Yse(h.type);if(g&&!h.sameMarkup(r.node(Math.abs(a)-1)))u=p;else if(g||!h.type.isTextblock)break}for(let p=i.openStart;p>=0;p--){let h=(p+u+1)%(i.openStart+1),g=c[h];if(g)for(let _=0;_=0&&(n.replace(e,t,i),!(n.steps.length>d));p--){let h=s[p];h<0||(e=r.before(h),t=o.after(h))}}function $P(n,e,t,i,r){if(ei){let o=r.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(ne.empty,!0))}return n}function Jse(n,e,t,i){if(!i.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let r=Qse(n.doc,e,i.type);r!=null&&(e=t=r)}n.replaceRange(e,t,new he(ne.from(i),0,0))}function Xse(n,e,t){let i=n.doc.resolve(e),r=n.doc.resolve(t),o=WP(i,r);for(let s=0;s0&&(l||i.node(a-1).canReplace(i.index(a-1),r.indexAfter(a-1))))return n.delete(i.before(a),r.after(a))}for(let s=1;s<=i.depth&&s<=r.depth;s++)if(e-i.start(s)==i.depth-s&&t>i.end(s)&&r.end(s)-t!=r.depth-s)return n.delete(i.before(s),t);n.delete(e,t)}function WP(n,e){let t=[],i=Math.min(n.depth,e.depth);for(let r=i;r>=0;r--){let o=n.start(r);if(oe.pos+(e.depth-r)||n.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(o==e.start(r)||r==n.depth&&r==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==o-1)&&t.push(r)}return t}var Qy=class n extends On{constructor(e,t,i){super(),this.pos=e,this.attr=t,this.value=i}apply(e){let t=e.nodeAt(this.pos);if(!t)return $n.fail("No node at attribute step's position");let i=Object.create(null);for(let o in t.attrs)i[o]=t.attrs[o];i[this.attr]=this.value;let r=t.type.create(i,null,t.marks);return $n.fromReplace(e,this.pos,this.pos+1,new he(ne.from(r),0,t.isLeaf?0:1))}getMap(){return Qs.empty}invert(e){return new n(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new n(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new n(t.pos,t.attr,t.value)}};On.jsonID("attr",Qy);var Ky=class n extends On{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let r in e.attrs)t[r]=e.attrs[r];t[this.attr]=this.value;let i=e.type.create(t,e.content,e.marks);return $n.ok(i)}getMap(){return Qs.empty}invert(e){return new n(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new n(t.attr,t.value)}};On.jsonID("docAttr",Ky);var hd=class extends Error{};hd=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};hd.prototype=Object.create(Error.prototype);hd.prototype.constructor=hd;hd.prototype.name="TransformError";var tl=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new lf}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new hd(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,i=he.empty){let r=pf(this.doc,e,t,i);return r&&this.step(r),this}replaceWith(e,t,i){return this.replace(e,t,new he(ne.from(i),0,0))}delete(e,t){return this.replace(e,t,he.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,i){return Zse(this,e,t,i),this}replaceRangeWith(e,t,i){return Jse(this,e,t,i),this}deleteRange(e,t){return Xse(this,e,t),this}lift(e,t){return Fse(this,e,t),this}join(e,t=1){return qse(this,e,t),this}wrap(e,t){return Bse(this,e,t),this}setBlockType(e,t=e,i,r=null){return zse(this,e,t,i,r),this}setNodeMarkup(e,t,i=null,r){return Wse(this,e,t,i,r),this}setNodeAttribute(e,t,i){return this.step(new Qy(e,t,i)),this}setDocAttribute(e,t){return this.step(new Ky(e,t)),this}addNodeMark(e,t){return this.step(new uf(e,t)),this}removeNodeMark(e,t){if(!(t instanceof tn)){let i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at position "+e);if(t=t.isInSet(i.marks),!t)return this}return this.step(new df(e,t)),this}split(e,t=1,i){return Gse(this,e,t,i),this}addMark(e,t,i){return Lse(this,e,t,i),this}removeMark(e,t,i){return Pse(this,e,t,i),this}clearIncompatible(e,t,i){return BP(this,e,t,i),this}};var XT=Object.create(null),je=class{constructor(e,t,i){this.$anchor=e,this.$head=t,this.ranges=i||[new yd(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t=0;o--){let s=t<0?gd(e.node(0),e.node(o),e.before(o+1),e.index(o),t,i):gd(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,i);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new br(e.node(0))}static atStart(e){return gd(e,e,0,0,1)||new br(e)}static atEnd(e){return gd(e,e,e.content.size,e.childCount,-1)||new br(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=XT[t.type];if(!i)throw new RangeError(`No selection type ${t.type} defined`);return i.fromJSON(e,t)}static jsonID(e,t){if(e in XT)throw new RangeError("Duplicate use of selection JSON ID "+e);return XT[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Re.between(this.$anchor,this.$head).getBookmark()}};je.prototype.visible=!0;var yd=class{constructor(e,t){this.$from=e,this.$to=t}},GP=!1;function qP(n){!GP&&!n.parent.inlineContent&&(GP=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}var Re=class n extends je{constructor(e,t=e){qP(e),qP(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let i=e.resolve(t.map(this.head));if(!i.parent.inlineContent)return je.near(i);let r=e.resolve(t.map(this.anchor));return new n(r.parent.inlineContent?r:i,i)}replace(e,t=he.empty){if(super.replace(e,t),t==he.empty){let i=this.$from.marksAcross(this.$to);i&&e.ensureMarks(i)}}eq(e){return e instanceof n&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Jy(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new n(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,i=t){let r=e.resolve(t);return new this(r,i==t?r:e.resolve(i))}static between(e,t,i){let r=e.pos-t.pos;if((!i||r)&&(i=r>=0?1:-1),!t.parent.inlineContent){let o=je.findFrom(t,i,!0)||je.findFrom(t,-i,!0);if(o)t=o.$head;else return je.near(t,i)}return e.parent.inlineContent||(r==0?e=t:(e=(je.findFrom(e,-i,!0)||je.findFrom(e,i,!0)).$anchor,e.pos0?0:1);r>0?s=0;s+=r){let a=e.child(s);if(a.isAtom){if(!o&&Se.isSelectable(a))return Se.create(n,t-(r<0?a.nodeSize:0))}else{let l=gd(n,a,t+r,r<0?a.childCount:0,r,o);if(l)return l}t+=a.nodeSize*r}return null}function QP(n,e,t){let i=n.steps.length-1;if(i{s==null&&(s=u)}),n.setSelection(je.near(n.doc.resolve(s),t))}var KP=1,Zy=2,YP=4,nE=class extends tl{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Zy,this}ensureMarks(e){return tn.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Zy)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Zy,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let i=this.selection;return t&&(e=e.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||tn.none))),i.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,i){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(i==null&&(i=t),i=i??t,!e)return this.deleteRange(t,i);let o=this.storedMarks;if(!o){let s=this.doc.resolve(t);o=i==t?s.marks():s.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(t,i,r.text(e,o)),this.selection.empty||this.setSelection(je.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=YP,this}get scrolledIntoView(){return(this.updated&YP)>0}};function ZP(n,e){return!e||!n?n:n.bind(e)}var mc=class{constructor(e,t,i){this.name=e,this.init=ZP(t.init,i),this.apply=ZP(t.apply,i)}},tae=[new mc("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new mc("selection",{init(n,e){return n.selection||je.atStart(e.doc)},apply(n){return n.selection}}),new mc("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,i){return i.selection.$cursor?n.storedMarks:null}}),new mc("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})],hf=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=tae.slice(),t&&t.forEach(i=>{if(this.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");this.plugins.push(i),this.pluginsByKey[i.key]=i,i.spec.state&&this.fields.push(new mc(i.key,i.spec.state,i))})}},Xy=class n{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let i=0;ii.toJSON())),e&&typeof e=="object")for(let i in e){if(i=="doc"||i=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[i],o=r.spec.state;o&&o.toJSON&&(t[i]=o.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,i){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new hf(e.schema,e.plugins),o=new n(r);return r.fields.forEach(s=>{if(s.name=="doc")o.doc=yo.fromJSON(e.schema,t.doc);else if(s.name=="selection")o.selection=je.fromJSON(o.doc,t.selection);else if(s.name=="storedMarks")t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(i)for(let a in i){let l=i[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,a)){o[s.name]=c.fromJSON.call(l,e,t[a],o);return}}o[s.name]=s.init(e,o)}}),o}};function JP(n,e,t){for(let i in n){let r=n[i];r instanceof Function?r=r.bind(e):i=="handleDOMEvents"&&(r=JP(r,e,{})),t[i]=r}return t}var Le=class{constructor(e){this.spec=e,this.props={},e.props&&JP(e.props,this,this.props),this.key=e.key?e.key.key:XP("plugin")}getState(e){return e[this.key]}},eE=Object.create(null);function XP(n){return n in eE?n+"$"+ ++eE[n]:(eE[n]=0,n+"$")}var Be=class{constructor(e="key"){this.key=XP(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}};var gi=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},yf=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e},aE=null,Zs=function(n,e,t){let i=aE||(aE=document.createRange());return i.setEnd(n,t??n.nodeValue.length),i.setStart(n,e||0),i},nae=function(){aE=null},wc=function(n,e,t,i){return t&&(eR(n,e,t,i,-1)||eR(n,e,t,i,1))},iae=/^(img|br|input|textarea|hr)$/i;function eR(n,e,t,i,r){for(;;){if(n==t&&e==i)return!0;if(e==(r<0?0:cs(n))){let o=n.parentNode;if(!o||o.nodeType!=1||Cf(n)||iae.test(n.nodeName)||n.contentEditable=="false")return!1;e=gi(n)+(r<0?0:1),n=o}else if(n.nodeType==1){if(n=n.childNodes[e+(r<0?-1:0)],n.contentEditable=="false")return!1;e=r<0?cs(n):0}else return!1}}function cs(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function rae(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=cs(n)}else if(n.parentNode&&!Cf(n))e=gi(n),n=n.parentNode;else return null}}function oae(n,e){for(;;){if(n.nodeType==3&&e2),Wr=wd||(us?/Mac/.test(us.platform):!1),cae=us?/Win/.test(us.platform):!1,bo=/Android \d/.test(al),wf=!!tR&&"webkitFontSmoothing"in tR.documentElement.style,uae=wf?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function dae(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Ys(n,e){return typeof n=="number"?n:n[e]}function pae(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,i=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*i}}function nR(n,e,t){let i=n.someProp("scrollThreshold")||0,r=n.someProp("scrollMargin")||5,o=n.dom.ownerDocument;for(let s=t||n.dom;s;s=yf(s)){if(s.nodeType!=1)continue;let a=s,l=a==o.body,c=l?dae(o):pae(a),u=0,d=0;if(e.topc.bottom-Ys(i,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+Ys(r,"top")-c.top:e.bottom-c.bottom+Ys(r,"bottom")),e.leftc.right-Ys(i,"right")&&(u=e.right-c.right+Ys(r,"right")),u||d)if(l)o.defaultView.scrollBy(u,d);else{let p=a.scrollLeft,h=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let g=a.scrollLeft-p,_=a.scrollTop-h;e={left:e.left-g,top:e.top-_,right:e.right-g,bottom:e.bottom-_}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(s).position))break}}function hae(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),i,r;for(let o=(e.left+e.right)/2,s=t+1;s=t-20){i=a,r=l.top;break}}return{refDOM:i,refTop:r,stack:PR(n.dom)}}function PR(n){let e=[],t=n.ownerDocument;for(let i=n;i&&(e.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),n!=t);i=yf(i));return e}function fae({refDOM:n,refTop:e,stack:t}){let i=n?n.getBoundingClientRect().top:0;RR(t,i==0?0:i-e)}function RR(n,e){for(let t=0;t=a){s=Math.max(g.bottom,s),a=Math.min(g.top,a);let _=g.left>e.left?g.left-e.left:g.right=(g.left+g.right)/2?1:0));continue}}else g.top>e.top&&!l&&g.left<=e.left&&g.right>=e.left&&(l=u,c={left:Math.max(g.left,Math.min(g.right,e.left)),top:g.top});!t&&(e.left>=g.right&&e.top>=g.top||e.left>=g.left&&e.top>=g.bottom)&&(o=d+1)}}return!t&&l&&(t=l,r=c,i=0),t&&t.nodeType==3?gae(t,r):!t||i&&t.nodeType==1?{node:n,offset:o}:FR(t,r)}function gae(n,e){let t=n.nodeValue.length,i=document.createRange();for(let r=0;r=(o.left+o.right)/2?1:0)}}return{node:n,offset:0}}function EE(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function yae(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left(s.left+s.right)/2?1:-1}return n.docView.posFromDOM(i,r,o)}function vae(n,e,t,i){let r=-1;for(let o=e,s=!1;o!=n.dom;){let a=n.docView.nearestDesc(o,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&(!s&&l.left>i.left||l.top>i.top?r=a.posBefore:(!s&&l.right-1?r:n.docView.posFromDOM(e,t,-1)}function jR(n,e,t){let i=n.childNodes.length;if(i&&t.tope.top&&r++}let c;wf&&r&&i.nodeType==1&&(c=i.childNodes[r-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&r--,i==n.dom&&r==i.childNodes.length-1&&i.lastChild.nodeType==1&&e.top>i.lastChild.getBoundingClientRect().bottom?a=n.state.doc.content.size:(r==0||i.nodeType!=1||i.childNodes[r-1].nodeName!="BR")&&(a=vae(n,i,r,e))}a==null&&(a=_ae(n,s,e));let l=n.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function iR(n){return n.top=0&&r==i.nodeValue.length?(l--,u=1):t<0?l--:c++,ff(nl(Zs(i,l,c),u),u<0)}if(!n.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&r&&(t<0||r==cs(i))){let l=i.childNodes[r-1];if(l.nodeType==1)return iE(l.getBoundingClientRect(),!1)}if(o==null&&r=0)}if(o==null&&r&&(t<0||r==cs(i))){let l=i.childNodes[r-1],c=l.nodeType==3?Zs(l,cs(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return ff(nl(c,1),!1)}if(o==null&&r=0)}function ff(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function iE(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function BR(n,e,t){let i=n.state,r=n.root.activeElement;i!=e&&n.updateState(e),r!=n.dom&&n.focus();try{return t()}finally{i!=e&&n.updateState(i),r!=n.dom&&r&&r.focus()}}function wae(n,e,t){let i=e.selection,r=t=="up"?i.$from:i.$to;return BR(n,e,()=>{let{node:o}=n.docView.domFromPos(r.pos,t=="up"?-1:1);for(;;){let a=n.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=VR(n,r.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Zs(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;cu.top+1&&(t=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}var Iae=/[\u0590-\u08ac]/;function xae(n,e,t){let{$head:i}=e.selection;if(!i.parent.isTextblock)return!1;let r=i.parentOffset,o=!r,s=r==i.parent.content.size,a=n.domSelection();return!Iae.test(i.parent.textContent)||!a.modify?t=="left"||t=="backward"?o:s:BR(n,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),p=a.caretBidiLevel;a.modify("move",t,"character");let h=i.depth?n.docView.domAfterPos(i.before()):n.dom,{focusNode:g,focusOffset:_}=n.domSelectionRange(),v=g&&!h.contains(g.nodeType==1?g:g.parentNode)||l==g&&c==_;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return p!=null&&(a.caretBidiLevel=p),v})}var rR=null,oR=null,sR=!1;function Tae(n,e,t){return rR==e&&oR==t?sR:(rR=e,oR=t,sR=t=="up"||t=="down"?wae(n,e,t):xae(n,e,t))}var Gr=0,aR=1,yc=2,ds=3,Ic=class{constructor(e,t,i,r){this.parent=e,this.children=t,this.dom=i,this.contentDOM=r,this.dirty=Gr,i.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,i){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;tgi(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let o=e;;o=o.parentNode){if(o==this.dom){r=!1;break}if(o.previousSibling)break}if(r==null&&t==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){r=!0;break}if(o.nextSibling)break}}return r??i>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let i=!0,r=e;r;r=r.parentNode){let o=this.getDesc(r),s;if(o&&(!t||o.node))if(i&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))i=!1;else return o}}getDesc(e){let t=e.pmViewDesc;for(let i=t;i;i=i.parent)if(i==this)return t}posFromDOM(e,t,i){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,i)}return-1}descAt(e){for(let t=0,i=0;te||s instanceof n_){r=e-o;break}o=a}if(r)return this.children[i].domFromPos(r-this.children[i].border,t);for(let o;i&&!(o=this.children[i-1]).size&&o instanceof e_&&o.side>=0;i--);if(t<=0){let o,s=!0;for(;o=i?this.children[i-1]:null,!(!o||o.dom.parentNode==this.contentDOM);i--,s=!1);return o&&t&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,t):{node:this.contentDOM,offset:o?gi(o.dom)+1:0}}else{let o,s=!0;for(;o=i=u&&t<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,u);e=s;for(let d=a;d>0;d--){let p=this.children[d-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){r=gi(p.dom)+1;break}e-=p.size}r==-1&&(r=0)}if(r>-1&&(c>t||a==this.children.length-1)){t=c;for(let u=a+1;uh&&s<_)return g.setSelection(e-h-g.border,t-h-g.border,i,r);h=_}let a=this.domFromPos(e,e?-1:1),l=t==e?a:this.domFromPos(t,t?-1:1),c=i.getSelection(),u=!1;if((Co||qi)&&e==t){let{node:p,offset:h}=a;if(p.nodeType==3){if(u=!!(h&&p.nodeValue[h-1]==` +`),u&&h==p.nodeValue.length)for(let g=p,_;g;g=g.parentNode){if(_=g.nextSibling){_.nodeName=="BR"&&(a=l={node:_.parentNode,offset:gi(_)+1});break}let v=g.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let g=p.childNodes[h-1];u=g&&(g.nodeName=="BR"||g.contentEditable=="false")}}if(Co&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let p=c.focusNode.childNodes[c.focusOffset];p&&p.contentEditable=="false"&&(r=!0)}if(!(r||u&&qi)&&wc(a.node,a.offset,c.anchorNode,c.anchorOffset)&&wc(l.node,l.offset,c.focusNode,c.focusOffset))return;let d=!1;if((c.extend||e==t)&&!u){c.collapse(a.node,a.offset);try{e!=t&&c.extend(l.node,l.offset),d=!0}catch{}}if(!d){if(e>t){let h=a;a=l,l=h}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let i=0,r=0;r=i:ei){let a=i+o.border,l=s-o.border;if(e>=a&&t<=l){this.dirty=e==i||t==s?yc:aR,e==a&&t==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=ds:o.markDirty(e-a,t-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?yc:ds}i=s}this.dirty=yc}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let i=e==1?yc:aR;t.dirty{if(!o)return r;if(o.parent)return o.parent.posBeforeChild(o)})),!t.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return this.dirty==Gr&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}},dE=class extends Ic{constructor(e,t,i,r){super(e,[],t,null),this.textDOM=i,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}},Id=class n extends Ic{constructor(e,t,i,r){super(e,[],i,r),this.mark=t}static create(e,t,i,r){let o=r.nodeViews[t.type.name],s=o&&o(t,r,i);return(!s||!s.dom)&&(s=_o.renderSpec(document,t.type.spec.toDOM(t,i),null,t.attrs)),new n(e,t,s.dom,s.contentDOM||s.dom)}parseRule(){return this.dirty&ds||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ds&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=Gr){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty0&&(o=gE(o,0,e,i));for(let a=0;a{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},i,r),u=c&&c.dom,d=c&&c.contentDOM;if(t.isText){if(!u)u=document.createTextNode(t.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=_o.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!d&&!t.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),t.type.spec.draggable&&(u.draggable=!0));let p=u;return u=HR(u,i,t),c?l=new pE(e,t,i,r,u,d||null,p,c,o,s+1):t.isText?new t_(e,t,i,r,u,p,o):new n(e,t,i,r,u,d||null,p,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let i=this.children[t];if(this.dom.contains(i.dom.parentNode)){e.contentElement=i.dom.parentNode;break}}e.contentElement||(e.getContent=()=>ne.empty)}return e}matchesNode(e,t,i){return this.dirty==Gr&&e.eq(this.node)&&fE(t,this.outerDeco)&&i.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let i=this.node.inlineContent,r=t,o=e.composing?this.localCompositionInfo(e,t):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new mE(this,s&&s.node,e);Dae(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,i,e):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?tn.none:this.node.child(u).marks,i,e),l.placeWidget(c,e,r)},(c,u,d,p)=>{l.syncToMarks(c.marks,i,e);let h;l.findNodeMatch(c,u,d,p)||a&&e.state.selection.from>r&&e.state.selection.to-1&&l.updateNodeAt(c,u,d,h,e)||l.updateNextNode(c,u,d,e,p,r)||l.addNode(c,u,d,e,r),r+=c.nodeSize}),l.syncToMarks([],i,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==yc)&&(s&&this.protectLocalComposition(e,s),zR(this.contentDOM,this.children,e),wd&&Oae(this.dom))}localCompositionInfo(e,t){let{from:i,to:r}=e.state.selection;if(!(e.state.selection instanceof Re)||it+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=Aae(this.node.content,s,i-t,r-t);return a<0?null:{node:o,pos:a,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:i,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new dE(this,o,t,r);e.input.compositionNodes.push(s),this.children=gE(this.children,i,i+r.length,e,s)}update(e,t,i,r){return this.dirty==ds||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,i,r),!0)}updateInner(e,t,i,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=i,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=Gr}updateOuterDeco(e){if(fE(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,i=this.dom;this.dom=UR(this.dom,this.nodeDOM,hE(this.outerDeco,this.node,t),hE(e,this.node,t)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}};function lR(n,e,t,i,r){HR(i,e,n);let o=new sl(void 0,n,e,t,i,i,i,r,0);return o.contentDOM&&o.updateChildren(r,0),o}var t_=class n extends sl{constructor(e,t,i,r,o,s,a){super(e,t,i,r,o,null,s,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,i,r){return this.dirty==ds||this.dirty!=Gr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=Gr||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=Gr,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,i){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,i)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,i){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new n(this.parent,r,this.outerDeco,this.innerDeco,o,o,i)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=ds)}get domAtom(){return!1}isText(e){return this.node.text==e}},n_=class extends Ic{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Gr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}},pE=class extends sl{constructor(e,t,i,r,o,s,a,l,c,u){super(e,t,i,r,o,s,a,c,u),this.spec=l}update(e,t,i,r){if(this.dirty==ds)return!1;if(this.spec.update){let o=this.spec.update(e,t,i);return o&&this.updateInner(e,t,i,r),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,i,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,i,r){this.spec.setSelection?this.spec.setSelection(e,t,i):super.setSelection(e,t,i,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function zR(n,e,t){let i=n.firstChild,r=!1;for(let o=0;o>1,s=Math.min(o,e.length);for(;r-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=Id.create(this.top,e[o],t,i);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,i,r){let o=-1,s;if(r>=this.preMatch.index&&(s=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,i))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a0;){let a;for(;;)if(i){let c=t.children[i-1];if(c instanceof Id)t=c,i=c.children.length;else{a=c,i--;break}}else{if(t==e)break e;i=t.parent.children.indexOf(t),t=t.parent}let l=a.node;if(l){if(l!=n.child(r-1))break;--r,o.set(a,r),s.push(a)}}return{index:r,matched:o,matches:s.reverse()}}function Mae(n,e){return n.type.side-e.type.side}function Dae(n,e,t,i){let r=e.locals(n),o=0;if(r.length==0){for(let c=0;co;)a.push(r[s++]);let g=o+p.nodeSize;if(p.isText){let v=g;s!v.inline):a.slice();i(p,_,e.forChild(o,p),h),o=g}}function Oae(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function Aae(n,e,t,i){for(let r=0,o=0;r=t){if(o>=i&&l.slice(i-e.length-a,i-a)==e)return i-e.length;let c=a=0&&c+e.length+a>=t)return a+c;if(t==i&&l.length>=i+e.length-a&&l.slice(i-a,i-a+e.length)==e)return i}}return-1}function gE(n,e,t,i,r){let o=[];for(let s=0,a=0;s=t||u<=e?o.push(l):(ct&&o.push(l.slice(t-c,l.size,i)))}return o}function SE(n,e=null){let t=n.domSelectionRange(),i=n.state.doc;if(!t.focusNode)return null;let r=n.docView.nearestDesc(t.focusNode),o=r&&r.size==0,s=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let a=i.resolve(s),l,c;if(u_(t)){for(l=a;r&&!r.node;)r=r.parent;let u=r.node;if(r&&u.isAtom&&Se.isSelectable(u)&&r.parent&&!(u.isInline&&sae(t.focusNode,t.focusOffset,r.dom))){let d=r.posBefore;c=new Se(s==d?a:i.resolve(d))}}else{let u=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(u<0)return null;l=i.resolve(u)}if(!c){let u=e=="pointer"||n.state.selection.head{(t.anchorNode!=i||t.anchorOffset!=r)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!$R(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function Nae(n){let e=n.domSelection(),t=document.createRange(),i=n.cursorWrapper.dom,r=i.nodeName=="IMG";r?t.setEnd(i.parentNode,gi(i)+1):t.setEnd(i,0),t.collapse(!1),e.removeAllRanges(),e.addRange(t),!r&&!n.state.selection.visible&&rr&&ol<=11&&(i.disabled=!0,i.disabled=!1)}function WR(n,e){if(e instanceof Se){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(hR(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else hR(n)}function hR(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function ME(n,e,t,i){return n.someProp("createSelectionBetween",r=>r(n,e,t))||Re.between(e,t,i)}function fR(n){return n.editable&&!n.hasFocus()?!1:GR(n)}function GR(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function Lae(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return wc(e.node,e.offset,t.anchorNode,t.anchorOffset)}function yE(n,e){let{$anchor:t,$head:i}=n.selection,r=e>0?t.max(i):t.min(i),o=r.parent.inlineContent?r.depth?n.doc.resolve(e>0?r.after():r.before()):null:r;return o&&je.findFrom(o,e)}function il(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function mR(n,e,t){let i=n.state.selection;if(i instanceof Re)if(t.indexOf("s")>-1){let{$head:r}=i,o=r.textOffset?null:e<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=n.state.doc.resolve(r.pos+o.nodeSize*(e<0?-1:1));return il(n,new Re(i.$anchor,s))}else if(i.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let r=yE(n.state,e);return r&&r instanceof Se?il(n,r):!1}else if(!(Wr&&t.indexOf("m")>-1)){let r=i.$head,o=r.textOffset?null:e<0?r.nodeBefore:r.nodeAfter,s;if(!o||o.isText)return!1;let a=e<0?r.pos-o.nodeSize:r.pos;return o.isAtom||(s=n.docView.descAt(a))&&!s.contentDOM?Se.isSelectable(o)?il(n,new Se(e<0?n.state.doc.resolve(r.pos-o.nodeSize):r)):wf?il(n,new Re(n.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(i instanceof Se&&i.node.isInline)return il(n,new Re(e>0?i.$to:i.$from));{let r=yE(n.state,e);return r?il(n,r):!1}}}function i_(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function gf(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function vd(n,e){return e<0?Pae(n):Rae(n)}function Pae(n){let e=n.domSelectionRange(),t=e.focusNode,i=e.focusOffset;if(!t)return;let r,o,s=!1;for(Co&&t.nodeType==1&&i0){if(t.nodeType!=1)break;{let a=t.childNodes[i-1];if(gf(a,-1))r=t,o=--i;else if(a.nodeType==3)t=a,i=t.nodeValue.length;else break}}else{if(qR(t))break;{let a=t.previousSibling;for(;a&&gf(a,-1);)r=t.parentNode,o=gi(a),a=a.previousSibling;if(a)t=a,i=i_(t);else{if(t=t.parentNode,t==n.dom)break;i=0}}}s?_E(n,t,i):r&&_E(n,r,o)}function Rae(n){let e=n.domSelectionRange(),t=e.focusNode,i=e.focusOffset;if(!t)return;let r=i_(t),o,s;for(;;)if(i{n.state==r&&Js(n)},50)}function gR(n,e){let t=n.state.doc.resolve(e);if(!(Ni||cae)&&t.parent.inlineContent){let r=n.coordsAtPos(e);if(e>t.start()){let o=n.coordsAtPos(e-1),s=(o.top+o.bottom)/2;if(s>r.top&&s1)return o.leftr.top&&s1)return o.left>r.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function yR(n,e,t){let i=n.state.selection;if(i instanceof Re&&!i.empty||t.indexOf("s")>-1||Wr&&t.indexOf("m")>-1)return!1;let{$from:r,$to:o}=i;if(!r.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let s=yE(n.state,e);if(s&&s instanceof Se)return il(n,s)}if(!r.parent.inlineContent){let s=e<0?r:o,a=i instanceof br?je.near(s,e):je.findFrom(s,e);return a?il(n,a):!1}return!1}function _R(n,e){if(!(n.state.selection instanceof Re))return!0;let{$head:t,$anchor:i,empty:r}=n.state.selection;if(!t.sameParent(i))return!0;if(!r)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return e<0?s.delete(t.pos-o.nodeSize,t.pos):s.delete(t.pos,t.pos+o.nodeSize),n.dispatch(s),!0}return!1}function vR(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function Vae(n){if(!qi||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let i=e.firstChild;vR(n,i,"true"),setTimeout(()=>vR(n,i,"false"),20)}return!1}function Bae(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function zae(n,e){let t=e.keyCode,i=Bae(e);if(t==8||Wr&&t==72&&i=="c")return _R(n,-1)||vd(n,-1);if(t==46&&!e.shiftKey||Wr&&t==68&&i=="c")return _R(n,1)||vd(n,1);if(t==13||t==27)return!0;if(t==37||Wr&&t==66&&i=="c"){let r=t==37?gR(n,n.state.selection.from)=="ltr"?-1:1:-1;return mR(n,r,i)||vd(n,r)}else if(t==39||Wr&&t==70&&i=="c"){let r=t==39?gR(n,n.state.selection.from)=="ltr"?1:-1:1;return mR(n,r,i)||vd(n,r)}else{if(t==38||Wr&&t==80&&i=="c")return yR(n,-1,i)||vd(n,-1);if(t==40||Wr&&t==78&&i=="c")return Vae(n)||yR(n,1,i)||vd(n,1);if(i==(Wr?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function QR(n,e){n.someProp("transformCopied",h=>{e=h(e,n)});let t=[],{content:i,openStart:r,openEnd:o}=e;for(;r>1&&o>1&&i.childCount==1&&i.firstChild.childCount==1;){r--,o--;let h=i.firstChild;t.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),i=h.content}let s=n.someProp("clipboardSerializer")||_o.fromSchema(n.state.schema),a=eF(),l=a.createElement("div");l.appendChild(s.serializeFragment(i,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=XR[c.nodeName.toLowerCase()]);){for(let h=u.length-1;h>=0;h--){let g=a.createElement(u[h]);for(;l.firstChild;)g.appendChild(l.firstChild);l.appendChild(g),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${r} ${o}${d?` -${d}`:""} ${JSON.stringify(t)}`);let p=n.someProp("clipboardTextSerializer",h=>h(e,n))||e.content.textBetween(0,e.content.size,` + +`);return{dom:l,text:p,slice:e}}function KR(n,e,t,i,r){let o=r.parent.type.spec.code,s,a;if(!t&&!e)return null;let l=e&&(i||o||!t);if(l){if(n.someProp("transformPastedText",p=>{e=p(e,o||i,n)}),o)return e?new he(ne.from(n.state.schema.text(e.replace(/\r\n?/g,` +`))),0,0):he.empty;let d=n.someProp("clipboardTextParser",p=>p(e,r,i,n));if(d)a=d;else{let p=r.marks(),{schema:h}=n.state,g=_o.fromSchema(h);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(_=>{let v=s.appendChild(document.createElement("p"));_&&v.appendChild(g.serializeNode(h.text(_,p)))})}}else n.someProp("transformPastedHTML",d=>{t=d(t,n)}),s=$ae(t),wf&&Wae(s);let c=s&&s.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let p=s.firstChild;for(;p&&p.nodeType!=1;)p=p.nextSibling;if(!p)break;s=p}if(a||(a=(n.someProp("clipboardParser")||n.someProp("domParser")||qs.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||u),context:r,ruleFromNode(p){return p.nodeName=="BR"&&!p.nextSibling&&p.parentNode&&!Uae.test(p.parentNode.nodeName)?{ignore:!0}:null}})),u)a=Gae(bR(a,+u[1],+u[2]),u[4]);else if(a=he.maxOpen(Hae(a.content,r),!0),a.openStart||a.openEnd){let d=0,p=0;for(let h=a.content.firstChild;d{a=d(a,n)}),a}var Uae=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Hae(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.index(t)),o,s=[];if(n.forEach(a=>{if(!s)return;let l=r.findWrapping(a.type),c;if(!l)return s=null;if(c=s.length&&o.length&&ZR(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=JR(s[s.length-1],o.length));let u=YR(a,l);s.push(u),r=r.matchType(u.type),o=l}}),s)return ne.from(s)}return n}function YR(n,e,t=0){for(let i=e.length-1;i>=t;i--)n=e[i].create(null,ne.from(n));return n}function ZR(n,e,t,i,r){if(r1&&(o=0),r=t&&(a=e<0?s.contentMatchAt(0).fillBefore(a,o<=r).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(ne.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,s.copy(a))}function bR(n,e,t){return e]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=eF().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(n),r;if((r=i&&XR[i[1].toLowerCase()])&&(n=r.map(o=>"<"+o+">").join("")+n+r.map(o=>"").reverse().join("")),t.innerHTML=n,r)for(let o=0;o=0;a-=2){let l=t.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;r=ne.from(l.create(i[a+1],r)),o++,s++}return new he(r,o,s)}var Qi={},Ki={},qae={touchstart:!0,touchmove:!0},bE=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function Qae(n){for(let e in Qi){let t=Qi[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=i=>{Yae(n,i)&&!DE(n,i)&&(n.editable||!(i.type in Ki))&&t(n,i)},qae[e]?{passive:!0}:void 0)}qi&&n.dom.addEventListener("input",()=>null),CE(n)}function rl(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function Kae(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function CE(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=i=>DE(n,i))})}function DE(n,e){return n.someProp("handleDOMEvents",t=>{let i=t[e.type];return i?i(n,e)||e.defaultPrevented:!1})}function Yae(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function Zae(n,e){!DE(n,e)&&Qi[e.type]&&(n.editable||!(e.type in Ki))&&Qi[e.type](n,e)}Ki.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!nF(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(bo&&Ni&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),wd&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let i=Date.now();n.input.lastIOSEnter=i,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==i&&(n.someProp("handleKeyDown",r=>r(n,gc(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",i=>i(n,t))||zae(n,t)?t.preventDefault():rl(n,"key")};Ki.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};Ki.keypress=(n,e)=>{let t=e;if(nF(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||Wr&&t.metaKey)return;if(n.someProp("handleKeyPress",r=>r(n,t))){t.preventDefault();return}let i=n.state.selection;if(!(i instanceof Re)||!i.$from.sameParent(i.$to)){let r=String.fromCharCode(t.charCode);!/[\r\n]/.test(r)&&!n.someProp("handleTextInput",o=>o(n,i.$from.pos,i.$to.pos,r))&&n.dispatch(n.state.tr.insertText(r).scrollIntoView()),t.preventDefault()}};function d_(n){return{left:n.clientX,top:n.clientY}}function Jae(n,e){let t=e.x-n.clientX,i=e.y-n.clientY;return t*t+i*i<100}function OE(n,e,t,i,r){if(i==-1)return!1;let o=n.state.doc.resolve(i);for(let s=o.depth+1;s>0;s--)if(n.someProp(e,a=>s>o.depth?a(n,t,o.nodeAfter,o.before(s),r,!0):a(n,t,o.node(s),o.before(s),r,!1)))return!0;return!1}function Cd(n,e,t){n.focused||n.focus();let i=n.state.tr.setSelection(e);t=="pointer"&&i.setMeta("pointer",!0),n.dispatch(i)}function Xae(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),i=t.nodeAfter;return i&&i.isAtom&&Se.isSelectable(i)?(Cd(n,new Se(t),"pointer"),!0):!1}function ele(n,e){if(e==-1)return!1;let t=n.state.selection,i,r;t instanceof Se&&(i=t.node);let o=n.state.doc.resolve(e);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(Se.isSelectable(a)){i&&t.$from.depth>0&&s>=t.$from.depth&&o.before(t.$from.depth+1)==t.$from.pos?r=o.before(t.$from.depth):r=o.before(s);break}}return r!=null?(Cd(n,Se.create(n.state.doc,r),"pointer"),!0):!1}function tle(n,e,t,i,r){return OE(n,"handleClickOn",e,t,i)||n.someProp("handleClick",o=>o(n,e,i))||(r?ele(n,t):Xae(n,t))}function nle(n,e,t,i){return OE(n,"handleDoubleClickOn",e,t,i)||n.someProp("handleDoubleClick",r=>r(n,e,i))}function ile(n,e,t,i){return OE(n,"handleTripleClickOn",e,t,i)||n.someProp("handleTripleClick",r=>r(n,e,i))||rle(n,t,i)}function rle(n,e,t){if(t.button!=0)return!1;let i=n.state.doc;if(e==-1)return i.inlineContent?(Cd(n,Re.create(i,0,i.content.size),"pointer"),!0):!1;let r=i.resolve(e);for(let o=r.depth+1;o>0;o--){let s=o>r.depth?r.nodeAfter:r.node(o),a=r.before(o);if(s.inlineContent)Cd(n,Re.create(i,a+1,a+1+s.content.size),"pointer");else if(Se.isSelectable(s))Cd(n,Se.create(i,a),"pointer");else continue;return!0}}function AE(n){return r_(n)}var tF=Wr?"metaKey":"ctrlKey";Qi.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let i=AE(n),r=Date.now(),o="singleClick";r-n.input.lastClick.time<500&&Jae(t,n.input.lastClick)&&!t[tF]&&(n.input.lastClick.type=="singleClick"?o="doubleClick":n.input.lastClick.type=="doubleClick"&&(o="tripleClick")),n.input.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};let s=n.posAtCoords(d_(t));s&&(o=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new wE(n,s,t,!!i)):(o=="doubleClick"?nle:ile)(n,s.pos,s.inside,t)?t.preventDefault():rl(n,"pointer"))};var wE=class{constructor(e,t,i,r){this.view=e,this.pos=t,this.event=i,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!i[tF],this.allowDefault=i.shiftKey;let o,s;if(t.inside>-1)o=e.state.doc.nodeAt(t.inside),s=t.inside;else{let u=e.state.doc.resolve(t.pos);o=u.parent,s=u.depth?u.before():0}let a=r?null:i.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=e.state;(i.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof Se&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Co&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),rl(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Js(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(d_(e))),this.updateAllowDefault(e),this.allowDefault||!t?rl(this.view,"pointer"):tle(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||qi&&this.mightDrag&&!this.mightDrag.node.isAtom||Ni&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Cd(this.view,je.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):rl(this.view,"pointer")}move(e){this.updateAllowDefault(e),rl(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}};Qi.touchstart=n=>{n.input.lastTouch=Date.now(),AE(n),rl(n,"pointer")};Qi.touchmove=n=>{n.input.lastTouch=Date.now(),rl(n,"pointer")};Qi.contextmenu=n=>AE(n);function nF(n,e){return n.composing?!0:qi&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}var ole=bo?5e3:-1;Ki.compositionstart=Ki.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(i=>i.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),r_(n,!0),n.markCursor=null;else if(r_(n),Co&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let i=n.domSelectionRange();for(let r=i.focusNode,o=i.focusOffset;r&&r.nodeType==1&&o!=0;){let s=o<0?r.lastChild:r.childNodes[o-1];if(!s)break;if(s.nodeType==3){n.domSelection().collapse(s,s.nodeValue.length);break}else r=s,o=-1}}n.input.composing=!0}iF(n,ole)};Ki.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,iF(n,20))};function iF(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>r_(n),e))}function rF(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=ale());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function sle(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=rae(e.focusNode,e.focusOffset),i=oae(e.focusNode,e.focusOffset);if(t&&i&&t!=i){let r=i.pmViewDesc,o=n.domObserver.lastChangedTextNode;if(t==o||i==o)return o;if(!r||!r.isText(i.nodeValue))return i;if(n.input.compositionNode==i){let s=t.pmViewDesc;if(!(!s||!s.isText(t.nodeValue)))return i}}return t||i}function ale(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function r_(n,e=!1){if(!(bo&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),rF(n),e||n.docView&&n.docView.dirty){let t=SE(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}function lle(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(e),n.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}var _f=rr&&ol<15||wd&&uae<604;Qi.copy=Ki.cut=(n,e)=>{let t=e,i=n.state.selection,r=t.type=="cut";if(i.empty)return;let o=_f?null:t.clipboardData,s=i.content(),{dom:a,text:l}=QR(n,s);o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):lle(n,a),r&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function cle(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function ule(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,i=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus();let r=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),i.parentNode&&i.parentNode.removeChild(i),t?vf(n,i.value,null,r,e):vf(n,i.textContent,i.innerHTML,r,e)},50)}function vf(n,e,t,i,r){let o=KR(n,e,t,i,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,r,o||he.empty)))return!0;if(!o)return!1;let s=cle(o),a=s?n.state.tr.replaceSelectionWith(s,i):n.state.tr.replaceSelection(o);return n.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function oF(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}Ki.paste=(n,e)=>{let t=e;if(n.composing&&!bo)return;let i=_f?null:t.clipboardData,r=n.input.shiftKey&&n.input.lastKeyCode!=45;i&&vf(n,oF(i),i.getData("text/html"),r,t)?t.preventDefault():ule(n,t)};var o_=class{constructor(e,t,i){this.slice=e,this.move=t,this.node=i}},sF=Wr?"altKey":"ctrlKey";Qi.dragstart=(n,e)=>{let t=e,i=n.input.mouseDown;if(i&&i.done(),!t.dataTransfer)return;let r=n.state.selection,o=r.empty?null:n.posAtCoords(d_(t)),s;if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof Se?r.to-1:r.to))){if(i&&i.mightDrag)s=Se.create(n.state.doc,i.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let d=n.docView.nearestDesc(t.target,!0);d&&d.node.type.spec.draggable&&d!=n.docView&&(s=Se.create(n.state.doc,d.posBefore))}}let a=(s||n.state.selection).content(),{dom:l,text:c,slice:u}=QR(n,a);(!t.dataTransfer.files.length||!Ni||LR>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(_f?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",_f||t.dataTransfer.setData("text/plain",c),n.dragging=new o_(u,!t[sF],s)};Qi.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};Ki.dragover=Ki.dragenter=(n,e)=>e.preventDefault();Ki.drop=(n,e)=>{let t=e,i=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let r=n.posAtCoords(d_(t));if(!r)return;let o=n.state.doc.resolve(r.pos),s=i&&i.slice;s?n.someProp("transformPasted",g=>{s=g(s,n)}):s=KR(n,oF(t.dataTransfer),_f?null:t.dataTransfer.getData("text/html"),!1,o);let a=!!(i&&!t[sF]);if(n.someProp("handleDrop",g=>g(n,t,s||he.empty,a))){t.preventDefault();return}if(!s)return;t.preventDefault();let l=s?Yy(n.state.doc,o.pos,s):o.pos;l==null&&(l=o.pos);let c=n.state.tr;if(a){let{node:g}=i;g?g.replace(c):c.deleteSelection()}let u=c.mapping.map(l),d=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,p=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(p))return;let h=c.doc.resolve(u);if(d&&Se.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Se(h));else{let g=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((_,v,w,S)=>g=S),c.setSelection(ME(n,h,c.doc.resolve(g)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))};Qi.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Js(n)},20))};Qi.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};Qi.beforeinput=(n,e)=>{if(Ni&&bo&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:i}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=i||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",o=>o(n,gc(8,"Backspace")))))return;let{$cursor:r}=n.state.selection;r&&r.pos>0&&n.dispatch(n.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let n in Ki)Qi[n]=Ki[n];function bf(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}var s_=class n{constructor(e,t){this.toDOM=e,this.spec=t||bc,this.side=this.spec.side||0}map(e,t,i,r){let{pos:o,deleted:s}=e.mapResult(t.from+r,this.side<0?-1:1);return s?null:new An(o-i,o-i,this)}valid(){return!0}eq(e){return this==e||e instanceof n&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&bf(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},vc=class n{constructor(e,t){this.attrs=e,this.spec=t||bc}map(e,t,i,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-i,s=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-i;return o>=s?null:new An(o,s,this)}valid(e,t){return t.from=e&&(!o||o(a.spec))&&i.push(a.copy(a.from+r,a.to+r))}for(let s=0;se){let a=this.children[s]+1;this.children[s+2].findInner(e-a,t-a,i,r+a,o)}}map(e,t,i){return this==ki||e.maps.length==0?this:this.mapInner(e,t,0,0,i||bc)}mapInner(e,t,i,r,o){let s;for(let a=0;a{let c=l+i,u;if(u=lF(t,a,c)){for(r||(r=this.children.slice());oa&&d.to=e){this.children[a]==e&&(i=this.children[a+2]);break}let o=e+1,s=o+t.content.size;for(let a=0;ao&&l.type instanceof vc){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;cr.map(e,t,bc));return n.from(i)}forChild(e,t){if(t.isLeaf)return pn.empty;let i=[];for(let r=0;rt instanceof pn)?e:e.reduce((t,i)=>t.concat(i instanceof pn?i:i.members),[]))}}};function dle(n,e,t,i,r,o,s){let a=n.slice();for(let c=0,u=o;c{let v=_-g-(h-p);for(let w=0;wS+u-d)continue;let L=a[w]+u-d;h>=L?a[w+1]=p<=L?-2:-1:p>=u&&v&&(a[w]+=v,a[w+1]+=v)}d+=v}),u=t.maps[c].map(u,-1)}let l=!1;for(let c=0;c=i.content.size){l=!0;continue}let p=t.map(n[c+1]+o,-1),h=p-r,{index:g,offset:_}=i.content.findIndex(d),v=i.maybeChild(g);if(v&&_==d&&_+v.nodeSize==h){let w=a[c+2].mapInner(t,v,u+1,n[c]+o+1,s);w!=ki?(a[c]=d,a[c+1]=h,a[c+2]=w):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=ple(a,n,e,t,r,o,s),u=l_(c,i,0,s);e=u.local;for(let d=0;dt&&s.to{let c=lF(n,a,l+t);if(c){o=!0;let u=l_(c,a,t+l+1,i);u!=ki&&r.push(l,l+a.nodeSize,u)}});let s=aF(o?cF(n):n,-t).sort(Cc);for(let a=0;a0;)e++;n.splice(e,0,t)}function oE(n){let e=[];return n.someProp("decorations",t=>{let i=t(n.state);i&&i!=ki&&e.push(i)}),n.cursorWrapper&&e.push(pn.create(n.state.doc,[n.cursorWrapper.deco])),a_.from(e)}var hle={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},fle=rr&&ol<=11,xE=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},TE=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new xE,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(i=>{for(let r=0;rr.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),fle&&(this.onCharData=i=>{this.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,hle)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;tthis.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(fR(this.view)){if(this.suppressingSelectionUpdates)return Js(this.view);if(rr&&ol<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&wc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,i;for(let o=e.focusNode;o;o=yf(o))t.add(o);for(let o=e.anchorNode;o;o=yf(o))if(t.has(o)){i=o;break}let r=i&&this.view.docView.nearestDesc(i);if(r&&r.ignoreMutation({type:"selection",target:i.nodeType==3?i.parentNode:i}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let i=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&fR(e)&&!this.ignoreSelectionChange(i),o=-1,s=-1,a=!1,l=[];if(e.editable)for(let u=0;ud.nodeName=="BR");if(u.length==2){let[d,p]=u;d.parentNode&&d.parentNode.parentNode==p.parentNode?p.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let p of u){let h=p.parentNode;h&&h.nodeName=="LI"&&(!d||yle(e,d)!=h)&&p.remove()}}}let c=null;o<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)-1||r)&&(o>-1&&(e.docView.markDirty(o,s),mle(e)),this.handleDOMChange(o,s,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(i)||Js(e),this.currentSelection.set(i))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let i=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(i==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!i||i.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;ur;v--){let w=i.childNodes[v-1],S=w.pmViewDesc;if(w.nodeName=="BR"&&!S){o=v;break}if(!S||S.size)break}let d=n.state.doc,p=n.someProp("domParser")||qs.fromSchema(n.state.schema),h=d.resolve(s),g=null,_=p.parse(i,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:r,to:o,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:vle,context:h});if(c&&c[0].pos!=null){let v=c[0].pos,w=c[1]&&c[1].pos;w==null&&(w=v),g={anchor:v+s,head:w+s}}return{doc:_,sel:g,from:s,to:a}}function vle(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(qi&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||qi&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}var ble=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function Cle(n,e,t,i,r){let o=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let ce=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,ze=SE(n,ce);if(ze&&!n.state.selection.eq(ze)){if(Ni&&bo&&n.input.lastKeyCode===13&&Date.now()-100It(n,gc(13,"Enter"))))return;let Ot=n.state.tr.setSelection(ze);ce=="pointer"?Ot.setMeta("pointer",!0):ce=="key"&&Ot.scrollIntoView(),o&&Ot.setMeta("composition",o),n.dispatch(Ot)}return}let s=n.state.doc.resolve(e),a=s.sharedDepth(t);e=s.before(a+1),t=n.state.doc.resolve(t).after(a+1);let l=n.state.selection,c=_le(n,e,t),u=n.state.doc,d=u.slice(c.from,c.to),p,h;n.input.lastKeyCode===8&&Date.now()-100Date.now()-225||bo)&&r.some(ce=>ce.nodeType==1&&!ble.test(ce.nodeName))&&(!g||g.endA>=g.endB)&&n.someProp("handleKeyDown",ce=>ce(n,gc(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!g)if(i&&l instanceof Re&&!l.empty&&l.$head.sameParent(l.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))g={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let ce=ER(n,n.state.doc,c.sel);if(ce&&!ce.eq(n.state.selection)){let ze=n.state.tr.setSelection(ce);o&&ze.setMeta("composition",o),n.dispatch(ze)}}return}n.input.domChangeCount++,n.state.selection.fromn.state.selection.from&&g.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?g.start=n.state.selection.from:g.endA=n.state.selection.to-2&&n.state.selection.to<=c.to&&(g.endB+=n.state.selection.to-g.endA,g.endA=n.state.selection.to)),rr&&ol<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>c.from&&c.doc.textBetween(g.start-c.from-1,g.start-c.from+1)==" \xA0"&&(g.start--,g.endA--,g.endB--);let _=c.doc.resolveNoCache(g.start-c.from),v=c.doc.resolveNoCache(g.endB-c.from),w=u.resolve(g.start),S=_.sameParent(v)&&_.parent.inlineContent&&w.end()>=g.endA,L;if((wd&&n.input.lastIOSEnter>Date.now()-225&&(!S||r.some(ce=>ce.nodeName=="DIV"||ce.nodeName=="P"))||!S&&_.posce(n,gc(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>g.start&&Ile(u,g.start,g.endA,_,v)&&n.someProp("handleKeyDown",ce=>ce(n,gc(8,"Backspace")))){bo&&Ni&&n.domObserver.suppressSelectionUpdates();return}Ni&&bo&&g.endB==g.start&&(n.input.lastAndroidDelete=Date.now()),bo&&!S&&_.start()!=v.start()&&v.parentOffset==0&&_.depth==v.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==g.endA&&(g.endB-=2,v=c.doc.resolveNoCache(g.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(ce){return ce(n,gc(13,"Enter"))})},20));let T=g.start,q=g.endA,N,ee,ge;if(S){if(_.pos==v.pos)rr&&ol<=11&&_.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>Js(n),20)),N=n.state.tr.delete(T,q),ee=u.resolve(g.start).marksAcross(u.resolve(g.endA));else if(g.endA==g.endB&&(ge=wle(_.parent.content.cut(_.parentOffset,v.parentOffset),w.parent.content.cut(w.parentOffset,g.endA-w.start()))))N=n.state.tr,ge.type=="add"?N.addMark(T,q,ge.mark):N.removeMark(T,q,ge.mark);else if(_.parent.child(_.index()).isText&&_.index()==v.index()-(v.textOffset?0:1)){let ce=_.parent.textBetween(_.parentOffset,v.parentOffset);if(n.someProp("handleTextInput",ze=>ze(n,T,q,ce)))return;N=n.state.tr.insertText(ce,T,q)}}if(N||(N=n.state.tr.replace(T,q,c.doc.slice(g.start-c.from,g.endB-c.from))),c.sel){let ce=ER(n,N.doc,c.sel);ce&&!(Ni&&bo&&n.composing&&ce.empty&&(g.start!=g.endB||n.input.lastAndroidDeletee.content.size?null:ME(n,e.resolve(t.anchor),e.resolve(t.head))}function wle(n,e){let t=n.firstChild.marks,i=e.firstChild.marks,r=t,o=i,s,a,l;for(let u=0;uu.mark(a.addToSet(u.marks));else if(r.length==0&&o.length==1)a=o[0],s="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;ut||sE(s,!0,!1)0&&(e||n.indexAfter(i)==n.node(i).childCount);)i--,r++,e=!1;if(t){let o=n.node(i).maybeChild(n.indexAfter(i));for(;o&&!o.isLeaf;)o=o.firstChild,r++}return r}function xle(n,e,t,i,r){let o=n.findDiffStart(e,t);if(o==null)return null;let{a:s,b:a}=n.findDiffEnd(e,t+n.size,t+e.size);if(r=="end"){let l=Math.max(0,o-Math.min(s,a));i-=s+l-o}if(s=s?o-i:0;o-=l,o&&o=a?o-i:0;o-=l,o&&o=56320&&e<=57343&&t>=55296&&t<=56319}var c_=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new bE,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(kR),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=OR(this),DR(this),this.nodeViews=AR(this),this.docView=lR(this.state.doc,MR(this),oE(this),this.dom,this),this.domObserver=new TE(this,(i,r,o,s)=>Cle(this,i,r,o,s)),this.domObserver.start(),Qae(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&CE(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(kR),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let i in this._props)t[i]=this._props[i];t.state=this.state;for(let i in e)t[i]=e[i];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var i;let r=this.state,o=!1,s=!1;e.storedMarks&&this.composing&&(rF(this),s=!0),this.state=e;let a=r.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let h=AR(this);Ele(h,this.nodeViews)&&(this.nodeViews=h,o=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&CE(this),this.editable=OR(this),DR(this);let l=oE(this),c=MR(this),u=r.plugins!=e.plugins&&!r.doc.eq(e.doc)?"reset":e.scrollToSelection>r.scrollToSelection?"to selection":"preserve",d=o||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(r.selection))&&(s=!0);let p=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&hae(this);if(s){this.domObserver.stop();let h=d&&(rr||Ni)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&Tle(r.selection,e.selection);if(d){let g=Ni?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=sle(this)),(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=lR(e.doc,c,l,this.dom,this)),g&&!this.trackWrites&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Lae(this))?Js(this,h):(WR(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),!((i=this.dragging)===null||i===void 0)&&i.node&&!r.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,r),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():p&&fae(p)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof Se){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&nR(this,t.getBoundingClientRect(),e)}else nR(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t0&&this.state.doc.nodeAt(o))==i.node&&(r=o)}this.dragging=new o_(e.slice,e.move,r<0?void 0:Se.create(this.state.doc,r))}someProp(e,t){let i=this._props&&this._props[e],r;if(i!=null&&(r=t?t(i):i))return r;for(let s=0;st.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return bae(this,e)}coordsAtPos(e,t=1){return VR(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,i=-1){let r=this.docView.posFromDOM(e,t,i);if(r==null)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return Tae(this,t||this.state,e)}pasteHTML(e,t){return vf(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return vf(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(Kae(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],oE(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,nae())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Zae(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return qi&&this.root.nodeType===11&&aae(this.dom.ownerDocument)==this.dom&&gle(this,e)||e}domSelection(){return this.root.getSelection()}};function MR(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let i in t)i=="class"?e.class+=" "+t[i]:i=="style"?e.style=(e.style?e.style+";":"")+t[i]:!e[i]&&i!="contenteditable"&&i!="nodeName"&&(e[i]=String(t[i]))}),e.translate||(e.translate="no"),[An.node(0,n.state.doc.content.size,e)]}function DR(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:An.widget(n.state.selection.head,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function OR(n){return!n.someProp("editable",e=>e(n.state)===!1)}function Tle(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function AR(n){let e=Object.create(null);function t(i){for(let r in i)Object.prototype.hasOwnProperty.call(e,r)||(e[r]=i[r])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function Ele(n,e){let t=0,i=0;for(let r in n){if(n[r]!=e[r])return!0;t++}for(let r in e)i++;return t!=i}function kR(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Xs={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},h_={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Sle=typeof navigator<"u"&&/Mac/.test(navigator.platform),Mle=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(Gn=0;Gn<10;Gn++)Xs[48+Gn]=Xs[96+Gn]=String(Gn);var Gn;for(Gn=1;Gn<=24;Gn++)Xs[Gn+111]="F"+Gn;var Gn;for(Gn=65;Gn<=90;Gn++)Xs[Gn]=String.fromCharCode(Gn+32),h_[Gn]=String.fromCharCode(Gn);var Gn;for(p_ in Xs)h_.hasOwnProperty(p_)||(h_[p_]=Xs[p_]);var p_;function uF(n){var e=Sle&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Mle&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?h_:Xs)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}var Dle=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function Ole(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let i,r,o,s;for(let a=0;a127)&&(o=Xs[i.keyCode])&&o!=r){let a=e[NE(o,i)];if(a&&a(t.state,t.dispatch,t))return!0}}return!1}}var f_=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function hF(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}var PE=(n,e,t)=>{let i=hF(n,t);if(!i)return!1;let r=FE(i);if(!r){let s=i.blockRange(),a=s&&Ks(s);return a==null?!1:(e&&e(n.tr.lift(s,a).scrollIntoView()),!0)}let o=r.nodeBefore;if(wF(n,r,e,-1))return!0;if(i.parent.content.size==0&&(xd(o,"end")||Se.isSelectable(o)))for(let s=i.depth;;s--){let a=pf(n.doc,i.before(s),i.after(s),he.empty);if(a&&a.slice.size1)break}return o.isAtom&&r.depth==i.depth-1?(e&&e(n.tr.delete(r.pos-o.nodeSize,r.pos).scrollIntoView()),!0):!1},fF=(n,e,t)=>{let i=hF(n,t);if(!i)return!1;let r=FE(i);return r?gF(n,r,e):!1},mF=(n,e,t)=>{let i=yF(n,t);if(!i)return!1;let r=BE(i);return r?gF(n,r,e):!1};function gF(n,e,t){let i=e.nodeBefore,r=i,o=e.pos-1;for(;!r.isTextblock;o--){if(r.type.spec.isolating)return!1;let u=r.lastChild;if(!u)return!1;r=u}let s=e.nodeAfter,a=s,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let u=a.firstChild;if(!u)return!1;a=u}let c=pf(n.doc,o,l,he.empty);if(!c||c.from!=o||c instanceof Ai&&c.slice.size>=l-o)return!1;if(t){let u=n.tr.step(c);u.setSelection(Re.create(u.doc,o)),t(u.scrollIntoView())}return!0}function xd(n,e,t=!1){for(let i=n;i;i=e=="start"?i.firstChild:i.lastChild){if(i.isTextblock)return!0;if(t&&i.childCount!=1)return!1}return!1}var RE=(n,e,t)=>{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):i.parentOffset>0)return!1;o=FE(i)}let s=o&&o.nodeBefore;return!s||!Se.isSelectable(s)?!1:(e&&e(n.tr.setSelection(Se.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function FE(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function yF(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset{let i=yF(n,t);if(!i)return!1;let r=BE(i);if(!r)return!1;let o=r.nodeAfter;if(wF(n,r,e,1))return!0;if(i.parent.content.size==0&&(xd(o,"start")||Se.isSelectable(o))){let s=pf(n.doc,i.before(),i.after(),he.empty);if(s&&s.slice.size{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):i.parentOffset=0;e--){let t=n.node(e);if(n.index(e)+1{let t=n.selection,i=t instanceof Se,r;if(i){if(t.node.isTextblock||!vo(n.doc,t.from))return!1;r=t.from}else if(r=md(n.doc,t.from,-1),r==null)return!1;if(e){let o=n.tr.join(r);i&&o.setSelection(Se.create(o.doc,r-n.doc.resolve(r).nodeBefore.nodeSize)),e(o.scrollIntoView())}return!0},vF=(n,e)=>{let t=n.selection,i;if(t instanceof Se){if(t.node.isTextblock||!vo(n.doc,t.to))return!1;i=t.to}else if(i=md(n.doc,t.to,1),i==null)return!1;return e&&e(n.tr.join(i).scrollIntoView()),!0},bF=(n,e)=>{let{$from:t,$to:i}=n.selection,r=t.blockRange(i),o=r&&Ks(r);return o==null?!1:(e&&e(n.tr.lift(r,o).scrollIntoView()),!0)},zE=(n,e)=>{let{$head:t,$anchor:i}=n.selection;return!t.parent.type.spec.code||!t.sameParent(i)?!1:(e&&e(n.tr.insertText(` +`).scrollIntoView()),!0)};function UE(n){for(let e=0;e{let{$head:t,$anchor:i}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(i))return!1;let r=t.node(-1),o=t.indexAfter(-1),s=UE(r.contentMatchAt(o));if(!s||!r.canReplaceWith(o,o,s))return!1;if(e){let a=t.after(),l=n.tr.replaceWith(a,a,s.createAndFill());l.setSelection(je.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},$E=(n,e)=>{let t=n.selection,{$from:i,$to:r}=t;if(t instanceof br||i.parent.inlineContent||r.parent.inlineContent)return!1;let o=UE(r.parent.contentMatchAt(r.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let s=(!i.parentOffset&&r.index(){let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let o=t.before();if($r(n.doc,o))return e&&e(n.tr.split(o).scrollIntoView()),!0}let i=t.blockRange(),r=i&&Ks(i);return r==null?!1:(e&&e(n.tr.lift(i,r).scrollIntoView()),!0)};function kle(n){return(e,t)=>{let{$from:i,$to:r}=e.selection;if(e.selection instanceof Se&&e.selection.node.isBlock)return!i.parentOffset||!$r(e.doc,i.pos)?!1:(t&&t(e.tr.split(i.pos).scrollIntoView()),!0);if(!i.parent.isBlock)return!1;if(t){let o=r.parentOffset==r.parent.content.size,s=e.tr;(e.selection instanceof Re||e.selection instanceof br)&&s.deleteSelection();let a=i.depth==0?null:UE(i.node(-1).contentMatchAt(i.indexAfter(-1))),l=n&&n(r.parent,o,i),c=l?[l]:o&&a?[{type:a}]:void 0,u=$r(s.doc,s.mapping.map(i.pos),1,c);if(!c&&!u&&$r(s.doc,s.mapping.map(i.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(s.split(s.mapping.map(i.pos),1,c),!o&&!i.parentOffset&&i.parent.type!=a)){let d=s.mapping.map(i.before()),p=s.doc.resolve(d);a&&i.node(-1).canReplaceWith(p.index(),p.index()+1,a)&&s.setNodeMarkup(s.mapping.map(i.before()),a)}t(s.scrollIntoView())}return!0}}var Nle=kle();var CF=(n,e)=>{let{$from:t,to:i}=n.selection,r,o=t.sharedDepth(i);return o==0?!1:(r=t.before(o),e&&e(n.tr.setSelection(Se.create(n.doc,r))),!0)},Lle=(n,e)=>(e&&e(n.tr.setSelection(new br(n.doc))),!0);function Ple(n,e,t){let i=e.nodeBefore,r=e.nodeAfter,o=e.index();return!i||!r||!i.type.compatibleContent(r.type)?!1:!i.content.size&&e.parent.canReplace(o-1,o)?(t&&t(n.tr.delete(e.pos-i.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(r.isTextblock||vo(n.doc,e.pos))?!1:(t&&t(n.tr.clearIncompatible(e.pos,i.type,i.contentMatchAt(i.childCount)).join(e.pos).scrollIntoView()),!0)}function wF(n,e,t,i){let r=e.nodeBefore,o=e.nodeAfter,s,a,l=r.type.spec.isolating||o.type.spec.isolating;if(!l&&Ple(n,e,t))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(s=(a=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(t){let h=e.pos+o.nodeSize,g=ne.empty;for(let w=s.length-1;w>=0;w--)g=ne.from(s[w].create(null,g));g=ne.from(r.copy(g));let _=n.tr.step(new Wn(e.pos-1,h,e.pos,h,new he(g,1,0),s.length,!0)),v=h+2*s.length;vo(_.doc,v)&&_.join(v),t(_.scrollIntoView())}return!0}let u=o.type.spec.isolating||i>0&&l?null:je.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),p=d&&Ks(d);if(p!=null&&p>=e.depth)return t&&t(n.tr.lift(d,p).scrollIntoView()),!0;if(c&&xd(o,"start",!0)&&xd(r,"end")){let h=r,g=[];for(;g.push(h),!h.isTextblock;)h=h.lastChild;let _=o,v=1;for(;!_.isTextblock;_=_.firstChild)v++;if(h.canReplace(h.childCount,h.childCount,_.content)){if(t){let w=ne.empty;for(let L=g.length-1;L>=0;L--)w=ne.from(g[L].copy(w));let S=n.tr.step(new Wn(e.pos-g.length,e.pos+o.nodeSize,e.pos+v,e.pos+o.nodeSize-v,new he(w,g.length,0),0,!0));t(S.scrollIntoView())}return!0}}return!1}function IF(n){return function(e,t){let i=e.selection,r=n<0?i.$from:i.$to,o=r.depth;for(;r.node(o).isInline;){if(!o)return!1;o--}return r.node(o).isTextblock?(t&&t(e.tr.setSelection(Re.create(e.doc,n<0?r.start(o):r.end(o)))),!0):!1}}var GE=IF(-1),qE=IF(1);function xF(n,e=null){return function(t,i){let{$from:r,$to:o}=t.selection,s=r.blockRange(o),a=s&&fd(s,n,e);return a?(i&&i(t.tr.wrap(s,a).scrollIntoView()),!0):!1}}function QE(n,e=null){return function(t,i){let r=!1;for(let o=0;o{if(r)return!1;if(!(!l.isTextblock||l.hasMarkup(n,e)))if(l.type==n)r=!0;else{let u=t.doc.resolve(c),d=u.index();r=u.parent.canReplaceWith(d,d+1,n)}})}if(!r)return!1;if(i){let o=t.tr;for(let s=0;s=2&&r.node(s.depth-1).type.compatibleContent(n)&&s.startIndex==0){if(r.index(s.depth-1)==0)return!1;let u=t.doc.resolve(s.start-2);l=new pc(u,u,s.depth),s.endIndex=0;u--)o=ne.from(t[u].type.create(t[u].attrs,o));n.step(new Wn(e.start-(i?2:0),e.end,e.start,e.end,new he(o,0,0),t.length,!0));let s=0;for(let u=0;us.childCount>0&&s.firstChild.type==n);return o?t?i.node(o.depth-1).type==n?jle(e,t,n,o):Vle(e,t,o):!0:!1}}function jle(n,e,t,i){let r=n.tr,o=i.end,s=i.$to.end(i.depth);o_;g--)h-=r.child(g).nodeSize,i.delete(h-1,h+1);let o=i.doc.resolve(t.start),s=o.nodeAfter;if(i.mapping.map(t.end)!=t.start+o.nodeAfter.nodeSize)return!1;let a=t.startIndex==0,l=t.endIndex==r.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?ne.empty:ne.from(r))))return!1;let d=o.pos,p=d+s.nodeSize;return i.step(new Wn(d-(a?1:0),p+(l?1:0),d+1,p-1,new he((a?ne.empty:ne.from(r.copy(ne.empty))).append(l?ne.empty:ne.from(r.copy(ne.empty))),a?0:1,l?0:1),a?0:1)),e(i.scrollIntoView()),!0}function SF(n){return function(e,t){let{$from:i,$to:r}=e.selection,o=i.blockRange(r,c=>c.childCount>0&&c.firstChild.type==n);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=n)return!1;if(t){let c=l.lastChild&&l.lastChild.type==a.type,u=ne.from(c?n.create():null),d=new he(ne.from(n.create(null,ne.from(a.type.create(null,u)))),c?3:1,0),p=o.start,h=o.end;t(e.tr.step(new Wn(p-(c?3:1),h,p,h,d,1,!0)).scrollIntoView())}return!0}}function x_(n){let{state:e,transaction:t}=n,{selection:i}=t,{doc:r}=t,{storedMarks:o}=t;return R(I({},e),{apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return o},get selection(){return i},get doc(){return r},get tr(){return i=t.selection,r=t.doc,o=t.storedMarks,t}})}var Td=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:i}=this,{view:r}=t,{tr:o}=i,s=this.buildProps(o);return Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...u)=>{let d=l(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a=[],l=!!e,c=e||o.tr,u=()=>(!l&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(p=>p===!0)),d=R(I({},Object.fromEntries(Object.entries(i).map(([p,h])=>[p,(..._)=>{let v=this.buildProps(c,t),w=h(..._)(v);return a.push(w),d}]))),{run:u});return d}createCan(e){let{rawCommands:t,state:i}=this,r=!1,o=e||i.tr,s=this.buildProps(o,r),a=Object.fromEntries(Object.entries(t).map(([l,c])=>[l,(...u)=>c(...u)(R(I({},s),{dispatch:void 0}))]));return R(I({},a),{chain:()=>this.createChain(o,r)})}buildProps(e,t=!0){let{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a={tr:e,editor:r,view:s,state:x_({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(i).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}},XE=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let i=this.callbacks[e];return i&&i.forEach(r=>r.apply(this,t)),this}off(e,t){let i=this.callbacks[e];return i&&(t?this.callbacks[e]=i.filter(r=>r!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}};function Me(n,e,t){return n.config[e]===void 0&&n.parent?Me(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind(R(I({},t),{parent:n.parent?Me(n.parent,e,t):null})):n.config[e]}function T_(n){let e=n.filter(r=>r.type==="extension"),t=n.filter(r=>r.type==="node"),i=n.filter(r=>r.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:i}}function LF(n){let e=[],{nodeExtensions:t,markExtensions:i}=T_(n),r=[...t,...i],o={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(s=>{let a={name:s.name,options:s.options,storage:s.storage,extensions:r},l=Me(s,"addGlobalAttributes",a);if(!l)return;l().forEach(u=>{u.types.forEach(d=>{Object.entries(u.attributes).forEach(([p,h])=>{e.push({type:d,name:p,attribute:I(I({},o),h)})})})})}),r.forEach(s=>{let a={name:s.name,options:s.options,storage:s.storage},l=Me(s,"addAttributes",a);if(!l)return;let c=l();Object.entries(c).forEach(([u,d])=>{let p=I(I({},o),d);typeof p?.default=="function"&&(p.default=p.default()),p?.isRequired&&p?.default===void 0&&delete p.default,e.push({type:s.name,name:u,attribute:p})})}),e}function li(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function Ae(...n){return n.filter(e=>!!e).reduce((e,t)=>{let i=I({},e);return Object.entries(t).forEach(([r,o])=>{if(!i[r]){i[r]=o;return}if(r==="class"){let a=o?o.split(" "):[],l=i[r]?i[r].split(" "):[],c=a.filter(u=>!l.includes(u));i[r]=[...l,...c].join(" ")}else r==="style"?i[r]=[i[r],o].join("; "):i[r]=o}),i},{})}function eS(n,e){return e.filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,i)=>Ae(t,i),{})}function PF(n){return typeof n=="function"}function vt(n,e=void 0,...t){return PF(n)?e?n.bind(e)(...t):n(...t):n}function Ble(n={}){return Object.keys(n).length===0&&n.constructor===Object}function zle(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function MF(n,e){return"style"in n?n:R(I({},n),{getAttrs:t=>{let i=n.getAttrs?n.getAttrs(t):n.attrs;if(i===!1)return!1;let r=e.reduce((o,s)=>{let a=s.attribute.parseHTML?s.attribute.parseHTML(t):zle(t.getAttribute(s.name));return a==null?o:R(I({},o),{[s.name]:a})},{});return I(I({},i),r)}})}function DF(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&Ble(t)?!1:t!=null))}function Ule(n,e){var t;let i=LF(n),{nodeExtensions:r,markExtensions:o}=T_(n),s=(t=r.find(c=>Me(c,"topNode")))===null||t===void 0?void 0:t.name,a=Object.fromEntries(r.map(c=>{let u=i.filter(w=>w.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},p=n.reduce((w,S)=>{let L=Me(S,"extendNodeSchema",d);return I(I({},w),L?L(c):{})},{}),h=DF(R(I({},p),{content:vt(Me(c,"content",d)),marks:vt(Me(c,"marks",d)),group:vt(Me(c,"group",d)),inline:vt(Me(c,"inline",d)),atom:vt(Me(c,"atom",d)),selectable:vt(Me(c,"selectable",d)),draggable:vt(Me(c,"draggable",d)),code:vt(Me(c,"code",d)),whitespace:vt(Me(c,"whitespace",d)),defining:vt(Me(c,"defining",d)),isolating:vt(Me(c,"isolating",d)),attrs:Object.fromEntries(u.map(w=>{var S;return[w.name,{default:(S=w?.attribute)===null||S===void 0?void 0:S.default}]}))})),g=vt(Me(c,"parseHTML",d));g&&(h.parseDOM=g.map(w=>MF(w,u)));let _=Me(c,"renderHTML",d);_&&(h.toDOM=w=>_({node:w,HTMLAttributes:eS(w,u)}));let v=Me(c,"renderText",d);return v&&(h.toText=v),[c.name,h]})),l=Object.fromEntries(o.map(c=>{let u=i.filter(v=>v.type===c.name),d={name:c.name,options:c.options,storage:c.storage,editor:e},p=n.reduce((v,w)=>{let S=Me(w,"extendMarkSchema",d);return I(I({},v),S?S(c):{})},{}),h=DF(R(I({},p),{inclusive:vt(Me(c,"inclusive",d)),excludes:vt(Me(c,"excludes",d)),group:vt(Me(c,"group",d)),spanning:vt(Me(c,"spanning",d)),code:vt(Me(c,"code",d)),attrs:Object.fromEntries(u.map(v=>{var w;return[v.name,{default:(w=v?.attribute)===null||w===void 0?void 0:w.default}]}))})),g=vt(Me(c,"parseHTML",d));g&&(h.parseDOM=g.map(v=>MF(v,u)));let _=Me(c,"renderHTML",d);return _&&(h.toDOM=v=>_({mark:v,HTMLAttributes:eS(v,u)})),[c.name,h]}));return new rf({topNode:s,nodes:a,marks:l})}function YE(n,e){return e.nodes[n]||e.marks[n]||null}function OF(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}var Hle=(n,e=500)=>{let t="",i=n.parentOffset;return n.parent.nodesBetween(Math.max(0,i-e),i,(r,o,s,a)=>{var l,c;let u=((c=(l=r.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:r,pos:o,parent:s,index:a}))||r.textContent||"%leaf%";t+=r.isAtom&&!r.isText?u:u.slice(0,Math.max(0,i-o))}),t};function sS(n){return Object.prototype.toString.call(n)==="[object RegExp]"}var Ed=class{constructor(e){this.find=e.find,this.handler=e.handler}},$le=(n,e)=>{if(sS(e))return e.exec(n);let t=e(n);if(!t)return null;let i=[t.text];return i.index=t.index,i.input=n,i.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),i.push(t.replaceWith)),i};function m_(n){var e;let{editor:t,from:i,to:r,text:o,rules:s,plugin:a}=n,{view:l}=t;if(l.composing)return!1;let c=l.state.doc.resolve(i);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(p=>p.type.spec.code))return!1;let u=!1,d=Hle(c)+o;return s.forEach(p=>{if(u)return;let h=$le(d,p.find);if(!h)return;let g=l.state.tr,_=x_({state:l.state,transaction:g}),v={from:i-(h[0].length-o.length),to:r},{commands:w,chain:S,can:L}=new Td({editor:t,state:_});p.handler({state:_,range:v,match:h,commands:w,chain:S,can:L})===null||!g.steps.length||(g.setMeta(a,{transform:g,from:i,to:r,text:o}),l.dispatch(g),u=!0)}),u}function Wle(n){let{editor:e,rules:t}=n,i=new Le({state:{init(){return null},apply(r,o){let s=r.getMeta(i);if(s)return s;let a=r.getMeta("applyInputRules");return!!a&&setTimeout(()=>{let{from:c,text:u}=a,d=c+u.length;m_({editor:e,from:c,to:d,text:u,rules:t,plugin:i})}),r.selectionSet||r.docChanged?null:o}},props:{handleTextInput(r,o,s,a){return m_({editor:e,from:o,to:s,text:a,rules:t,plugin:i})},handleDOMEvents:{compositionend:r=>(setTimeout(()=>{let{$cursor:o}=r.state.selection;o&&m_({editor:e,from:o.pos,to:o.pos,text:"",rules:t,plugin:i})}),!1)},handleKeyDown(r,o){if(o.key!=="Enter")return!1;let{$cursor:s}=r.state.selection;return s?m_({editor:e,from:s.pos,to:s.pos,text:` +`,rules:t,plugin:i}):!1}},isInputRules:!0});return i}function Gle(n){return typeof n=="number"}var v_=class{constructor(e){this.find=e.find,this.handler=e.handler}},qle=(n,e,t)=>{if(sS(e))return[...n.matchAll(e)];let i=e(n,t);return i?i.map(r=>{let o=[r.text];return o.index=r.index,o.input=n,o.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(r.replaceWith)),o}):[]};function Qle(n){let{editor:e,state:t,from:i,to:r,rule:o,pasteEvent:s,dropEvent:a}=n,{commands:l,chain:c,can:u}=new Td({editor:e,state:t}),d=[];return t.doc.nodesBetween(i,r,(h,g)=>{if(!h.isTextblock||h.type.spec.code)return;let _=Math.max(i,g),v=Math.min(r,g+h.content.size),w=h.textBetween(_-g,v-g,void 0,"\uFFFC");qle(w,o.find,s).forEach(L=>{if(L.index===void 0)return;let T=_+L.index+1,q=T+L[0].length,N={from:t.tr.mapping.map(T),to:t.tr.mapping.map(q)},ee=o.handler({state:t,range:N,match:L,commands:l,chain:c,can:u,pasteEvent:s,dropEvent:a});d.push(ee)})}),d.every(h=>h!==null)}var Kle=n=>{var e;let t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)===null||e===void 0||e.setData("text/html",n),t};function Yle(n){let{editor:e,rules:t}=n,i=null,r=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a=typeof DragEvent<"u"?new DragEvent("drop"):null,l=({state:u,from:d,to:p,rule:h,pasteEvt:g})=>{let _=u.tr,v=x_({state:u,transaction:_});if(!(!Qle({editor:e,state:v,from:Math.max(d-1,0),to:p.b-1,rule:h,pasteEvent:g,dropEvent:a})||!_.steps.length))return a=typeof DragEvent<"u"?new DragEvent("drop"):null,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,_};return t.map(u=>new Le({view(d){let p=h=>{var g;i=!((g=d.dom.parentElement)===null||g===void 0)&&g.contains(h.target)?d.dom.parentElement:null};return window.addEventListener("dragstart",p),{destroy(){window.removeEventListener("dragstart",p)}}},props:{handleDOMEvents:{drop:(d,p)=>(o=i===d.dom.parentElement,a=p,!1),paste:(d,p)=>{var h;let g=(h=p.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return s=p,r=!!g?.includes("data-pm-slice"),!1}}},appendTransaction:(d,p,h)=>{let g=d[0],_=g.getMeta("uiEvent")==="paste"&&!r,v=g.getMeta("uiEvent")==="drop"&&!o,w=g.getMeta("applyPasteRules"),S=!!w;if(!_&&!v&&!S)return;if(S){let{from:q,text:N}=w,ee=q+N.length,ge=Kle(N);return l({rule:u,state:h,from:q,to:{b:ee},pasteEvt:ge})}let L=p.doc.content.findDiffStart(h.doc.content),T=p.doc.content.findDiffEnd(h.doc.content);if(!(!Gle(L)||!T||L===T.b))return l({rule:u,state:h,from:L,to:T,pasteEvt:s})}}))}function Zle(n){let e=n.filter((t,i)=>n.indexOf(t)!==i);return[...new Set(e)]}var tS=class n{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=n.resolve(e),this.schema=Ule(this.extensions,t),this.setupExtensions()}static resolve(e){let t=n.sort(n.flatten(e)),i=Zle(t.map(r=>r.name));return i.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${i.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{let i={name:t.name,options:t.options,storage:t.storage},r=Me(t,"addExtensions",i);return r?[t,...this.flatten(r())]:t}).flat(10)}static sort(e){return e.sort((i,r)=>{let o=Me(i,"priority")||100,s=Me(r,"priority")||100;return o>s?-1:o{let i={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:YE(t.name,this.schema)},r=Me(t,"addCommands",i);return r?I(I({},e),r()):e},{})}get plugins(){let{editor:e}=this,t=n.sort([...this.extensions].reverse()),i=[],r=[],o=t.map(s=>{let a={name:s.name,options:s.options,storage:s.storage,editor:e,type:YE(s.name,this.schema)},l=[],c=Me(s,"addKeyboardShortcuts",a),u={};if(s.type==="mark"&&Me(s,"exitable",a)&&(u.ArrowRight=()=>vn.handleExit({editor:e,mark:s})),c){let _=Object.fromEntries(Object.entries(c()).map(([v,w])=>[v,()=>w({editor:e})]));u=I(I({},u),_)}let d=dF(u);l.push(d);let p=Me(s,"addInputRules",a);OF(s,e.options.enableInputRules)&&p&&i.push(...p());let h=Me(s,"addPasteRules",a);OF(s,e.options.enablePasteRules)&&h&&r.push(...h());let g=Me(s,"addProseMirrorPlugins",a);if(g){let _=g();l.push(..._)}return l}).flat();return[Wle({editor:e,rules:i}),...Yle({editor:e,rules:r}),...o]}get attributes(){return LF(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=T_(this.extensions);return Object.fromEntries(t.filter(i=>!!Me(i,"addNodeView")).map(i=>{let r=this.attributes.filter(l=>l.type===i.name),o={name:i.name,options:i.options,storage:i.storage,editor:e,type:li(i.name,this.schema)},s=Me(i,"addNodeView",o);if(!s)return[];let a=(l,c,u,d)=>{let p=eS(l,r);return s()({editor:e,node:l,getPos:u,decorations:d,HTMLAttributes:p,extension:i})};return[i.name,a]}))}setupExtensions(){this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;let i={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:YE(e.name,this.schema)};e.type==="mark"&&(!((t=vt(Me(e,"keepOnSplit",i)))!==null&&t!==void 0)||t)&&this.splittableMarks.push(e.name);let r=Me(e,"onBeforeCreate",i),o=Me(e,"onCreate",i),s=Me(e,"onUpdate",i),a=Me(e,"onSelectionUpdate",i),l=Me(e,"onTransaction",i),c=Me(e,"onFocus",i),u=Me(e,"onBlur",i),d=Me(e,"onDestroy",i);r&&this.editor.on("beforeCreate",r),o&&this.editor.on("create",o),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),u&&this.editor.on("blur",u),d&&this.editor.on("destroy",d)})}};function Jle(n){return Object.prototype.toString.call(n).slice(8,-1)}function g_(n){return Jle(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function E_(n,e){let t=I({},n);return g_(n)&&g_(e)&&Object.keys(e).forEach(i=>{g_(e[i])&&g_(n[i])?t[i]=E_(n[i],e[i]):t[i]=e[i]}),t}var mt=class n{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=I(I({},this.config),e),this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=vt(Me(this,"addOptions",{name:this.name}))),this.storage=vt(Me(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new n(e)}configure(e={}){let t=this.extend(R(I({},this.config),{addOptions:()=>E_(this.options,e)}));return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new n(I(I({},this.config),e));return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=vt(Me(t,"addOptions",{name:t.name})),t.storage=vt(Me(t,"addStorage",{name:t.name,options:t.options})),t}};function RF(n,e,t){let{from:i,to:r}=e,{blockSeparator:o=` + +`,textSerializers:s={}}=t||{},a="";return n.nodesBetween(i,r,(l,c,u,d)=>{var p;l.isBlock&&c>i&&(a+=o);let h=s?.[l.type.name];if(h)return u&&(a+=h({node:l,pos:c,parent:u,index:d,range:e})),!1;l.isText&&(a+=(p=l?.text)===null||p===void 0?void 0:p.slice(Math.max(i,c)-c,r-c))}),a}function FF(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}var Xle=mt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Le({key:new Be("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{let{editor:n}=this,{state:e,schema:t}=n,{doc:i,selection:r}=e,{ranges:o}=r,s=Math.min(...o.map(u=>u.$from.pos)),a=Math.max(...o.map(u=>u.$to.pos)),l=FF(t);return RF(i,{from:s,to:a},R(I({},this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{}),{textSerializers:l}))}}})]}}),ece=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window?.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),tce=(n=!1)=>({commands:e})=>e.setContent("",n),nce=()=>({state:n,tr:e,dispatch:t})=>{let{selection:i}=e,{ranges:r}=i;return t&&r.forEach(({$from:o,$to:s})=>{n.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;let{doc:c,mapping:u}=e,d=c.resolve(u.map(l)),p=c.resolve(u.map(l+a.nodeSize)),h=d.blockRange(p);if(!h)return;let g=Ks(h);if(a.type.isTextblock){let{defaultType:_}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,_)}(g||g===0)&&e.lift(h,g)})}),!0},ice=n=>e=>n(e),rce=()=>({state:n,dispatch:e})=>$E(n,e),oce=(n,e)=>({editor:t,tr:i})=>{let{state:r}=t,o=r.doc.slice(n.from,n.to);i.deleteRange(n.from,n.to);let s=i.mapping.map(e);return i.insert(s,o.content),i.setSelection(new Re(i.doc.resolve(s-1))),!0},sce=()=>({tr:n,dispatch:e})=>{let{selection:t}=n,i=t.$anchor.node();if(i.content.size>0)return!1;let r=n.selection.$anchor;for(let o=r.depth;o>0;o-=1)if(r.node(o).type===i.type){if(e){let a=r.before(o),l=r.after(o);n.delete(a,l).scrollIntoView()}return!0}return!1},ace=n=>({tr:e,state:t,dispatch:i})=>{let r=li(n,t.schema),o=e.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r){if(i){let l=o.before(s),c=o.after(s);e.delete(l,c).scrollIntoView()}return!0}return!1},lce=n=>({tr:e,dispatch:t})=>{let{from:i,to:r}=n;return t&&e.delete(i,r),!0},cce=()=>({state:n,dispatch:e})=>f_(n,e),uce=()=>({commands:n})=>n.keyboardShortcut("Enter"),dce=()=>({state:n,dispatch:e})=>HE(n,e);function b_(n,e,t={strict:!0}){let i=Object.keys(e);return i.length?i.every(r=>t.strict?e[r]===n[r]:sS(e[r])?e[r].test(n[r]):e[r]===n[r]):!0}function nS(n,e,t={}){return n.find(i=>i.type===e&&b_(i.attrs,t))}function pce(n,e,t={}){return!!nS(n,e,t)}function aS(n,e,t={}){if(!n||!e)return;let i=n.parent.childAfter(n.parentOffset);if(n.parentOffset===i.offset&&i.offset!==0&&(i=n.parent.childBefore(n.parentOffset)),!i.node)return;let r=nS([...i.node.marks],e,t);if(!r)return;let o=i.index,s=n.start()+i.offset,a=o+1,l=s+i.node.nodeSize;for(nS([...i.node.marks],e,t);o>0&&r.isInSet(n.parent.child(o-1).marks);)o-=1,s-=n.parent.child(o).nodeSize;for(;a({tr:t,state:i,dispatch:r})=>{let o=cl(n,i.schema),{doc:s,selection:a}=t,{$from:l,from:c,to:u}=a;if(r){let d=aS(l,o,e);if(d&&d.from<=c&&d.to>=u){let p=Re.create(s,d.from,d.to);t.setSelection(p)}}return!0},fce=n=>e=>{let t=typeof n=="function"?n(e):n;for(let i=0;i({editor:t,view:i,tr:r,dispatch:o})=>{e=I({scrollIntoView:!0},e);let s=()=>{S_()&&i.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(i.focus(),e?.scrollIntoView&&t.commands.scrollIntoView())})};if(i.hasFocus()&&n===null||n===!1)return!0;if(o&&n===null&&!Sd(t.state.selection))return s(),!0;let a=jF(r.doc,n)||t.state.selection,l=t.state.selection.eq(a);return o&&(l||r.setSelection(a),l&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},gce=(n,e)=>t=>n.every((i,r)=>e(i,R(I({},t),{index:r}))),yce=(n,e)=>({tr:t,commands:i})=>i.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),VF=n=>{let e=n.childNodes;for(let t=e.length-1;t>=0;t-=1){let i=e[t];i.nodeType===3&&i.nodeValue&&/^(\n\s\s|\n)$/.test(i.nodeValue)?n.removeChild(i):i.nodeType===1&&VF(i)}return n};function y_(n){let e=`${n}`,t=new window.DOMParser().parseFromString(e,"text/html").body;return VF(t)}function C_(n,e,t){t=I({slice:!0,parseOptions:{}},t);let i=typeof n=="object"&&n!==null,r=typeof n=="string";if(i)try{return Array.isArray(n)&&n.length>0?ne.fromArray(n.map(s=>e.nodeFromJSON(s))):e.nodeFromJSON(n)}catch(o){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",o),C_("",e,t)}if(r){if(t.errorOnInvalidContent){let s=!1,a="",l=new rf({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(s=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(t.slice?qs.fromSchema(l).parseSlice(y_(n),t.parseOptions):qs.fromSchema(l).parse(y_(n),t.parseOptions),t.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}let o=qs.fromSchema(e);return t.slice?o.parseSlice(y_(n),t.parseOptions).content:o.parse(y_(n),t.parseOptions)}return C_("",e,t)}function _ce(n,e,t){let i=n.steps.length-1;if(i{s===0&&(s=u)}),n.setSelection(je.near(n.doc.resolve(s),t))}var vce=n=>!("type"in n),bce=(n,e,t)=>({tr:i,dispatch:r,editor:o})=>{var s;if(r){t=I({parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1},t);let a;try{a=C_(e,o.schema,{parseOptions:I({preserveWhitespace:"full"},t.parseOptions),errorOnInvalidContent:(s=t.errorOnInvalidContent)!==null&&s!==void 0?s:o.options.enableContentCheck})}catch(g){return o.emit("contentError",{editor:o,error:g,disableCollaboration:()=>{console.error("[tiptap error]: Unable to disable collaboration at this point in time")}}),!1}let{from:l,to:c}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},u=!0,d=!0;if((vce(a)?a:[a]).forEach(g=>{g.check(),u=u?g.isText&&g.marks.length===0:!1,d=d?g.isBlock:!1}),l===c&&d){let{parent:g}=i.doc.resolve(l);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(l-=1,c+=1)}let h;u?(Array.isArray(e)?h=e.map(g=>g.text||"").join(""):typeof e=="object"&&e&&e.text?h=e.text:h=e,i.insertText(h,l,c)):(h=a,i.replaceWith(l,c,h)),t.updateSelection&&_ce(i,i.steps.length-1,-1),t.applyInputRules&&i.setMeta("applyInputRules",{from:l,text:h}),t.applyPasteRules&&i.setMeta("applyPasteRules",{from:l,text:h})}return!0},Cce=()=>({state:n,dispatch:e})=>_F(n,e),wce=()=>({state:n,dispatch:e})=>vF(n,e),Ice=()=>({state:n,dispatch:e})=>PE(n,e),xce=()=>({state:n,dispatch:e})=>jE(n,e),Tce=()=>({state:n,dispatch:e,tr:t})=>{try{let i=md(n.doc,n.selection.$from.pos,-1);return i==null?!1:(t.join(i,2),e&&e(t),!0)}catch{return!1}},Ece=()=>({state:n,dispatch:e,tr:t})=>{try{let i=md(n.doc,n.selection.$from.pos,1);return i==null?!1:(t.join(i,2),e&&e(t),!0)}catch{return!1}},Sce=()=>({state:n,dispatch:e})=>fF(n,e),Mce=()=>({state:n,dispatch:e})=>mF(n,e);function BF(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function Dce(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t==="Space"&&(t=" ");let i,r,o,s;for(let a=0;a({editor:e,view:t,tr:i,dispatch:r})=>{let o=Dce(n).split(/-(?!$)/),s=o.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,a))});return l?.steps.forEach(c=>{let u=c.map(i.mapping);u&&r&&i.maybeStep(u)}),!0};function xf(n,e,t={}){let{from:i,to:r,empty:o}=n.selection,s=e?li(e,n.schema):null,a=[];n.doc.nodesBetween(i,r,(d,p)=>{if(d.isText)return;let h=Math.max(i,p),g=Math.min(r,p+d.nodeSize);a.push({node:d,from:h,to:g})});let l=r-i,c=a.filter(d=>s?s.name===d.node.type.name:!0).filter(d=>b_(d.node.attrs,t,{strict:!1}));return o?!!c.length:c.reduce((d,p)=>d+p.to-p.from,0)>=l}var Ace=(n,e={})=>({state:t,dispatch:i})=>{let r=li(n,t.schema);return xf(t,r,e)?bF(t,i):!1},kce=()=>({state:n,dispatch:e})=>WE(n,e),Nce=n=>({state:e,dispatch:t})=>{let i=li(n,e.schema);return EF(i)(e,t)},Lce=()=>({state:n,dispatch:e})=>zE(n,e);function M_(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function AF(n,e){let t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((i,r)=>(t.includes(r)||(i[r]=n[r]),i),{})}var Pce=(n,e)=>({tr:t,state:i,dispatch:r})=>{let o=null,s=null,a=M_(typeof n=="string"?n:n.name,i.schema);return a?(a==="node"&&(o=li(n,i.schema)),a==="mark"&&(s=cl(n,i.schema)),r&&t.selection.ranges.forEach(l=>{i.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&t.setNodeMarkup(u,void 0,AF(c.attrs,e)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&t.addMark(u,u+c.nodeSize,s.create(AF(d.attrs,e)))})})}),!0):!1},Rce=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),Fce=()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size}),jce=()=>({state:n,dispatch:e})=>RE(n,e),Vce=()=>({state:n,dispatch:e})=>VE(n,e),Bce=()=>({state:n,dispatch:e})=>CF(n,e),zce=()=>({state:n,dispatch:e})=>qE(n,e),Uce=()=>({state:n,dispatch:e})=>GE(n,e);function iS(n,e,t={},i={}){return C_(n,e,{slice:!1,parseOptions:t,errorOnInvalidContent:i.errorOnInvalidContent})}var Hce=(n,e=!1,t={},i={})=>({editor:r,tr:o,dispatch:s,commands:a})=>{var l,c;let{doc:u}=o;if(t.preserveWhitespace!=="full"){let d=iS(n,r.schema,t,{errorOnInvalidContent:(l=i.errorOnInvalidContent)!==null&&l!==void 0?l:r.options.enableContentCheck});return s&&o.replaceWith(0,u.content.size,d).setMeta("preventUpdate",!e),!0}return s&&o.setMeta("preventUpdate",!e),a.insertContentAt({from:0,to:u.content.size},n,{parseOptions:t,errorOnInvalidContent:(c=i.errorOnInvalidContent)!==null&&c!==void 0?c:r.options.enableContentCheck})};function Md(n,e){let t=cl(e,n.schema),{from:i,to:r,empty:o}=n.selection,s=[];o?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(i,r,l=>{s.push(...l.marks)});let a=s.find(l=>l.type.name===t.name);return a?I({},a.attrs):{}}function zF(n,e){let t=new tl(n);return e.forEach(i=>{i.steps.forEach(r=>{t.step(r)})}),t}function $ce(n){for(let e=0;e{t(r)&&i.push({node:r,pos:o})}),i}function lS(n,e){for(let t=n.depth;t>0;t-=1){let i=n.node(t);if(e(i))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:i}}}function cS(n){return e=>lS(e.$from,n)}function Wce(n,e){let t=_o.fromSchema(e).serializeFragment(n),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(t),r.innerHTML}function Gce(n,e){let t={from:0,to:n.content.size};return RF(n,t,e)}function qce(n,e){let t=li(e,n.schema),{from:i,to:r}=n.selection,o=[];n.doc.nodesBetween(i,r,a=>{o.push(a)});let s=o.reverse().find(a=>a.type.name===t.name);return s?I({},s.attrs):{}}function uS(n,e){let t=M_(typeof e=="string"?e:e.name,n.schema);return t==="node"?qce(n,e):t==="mark"?Md(n,e):{}}function Qce(n,e=JSON.stringify){let t={};return n.filter(i=>{let r=e(i);return Object.prototype.hasOwnProperty.call(t,r)?!1:t[r]=!0})}function Kce(n){let e=Qce(n);return e.length===1?e:e.filter((t,i)=>!e.filter((o,s)=>s!==i).some(o=>t.oldRange.from>=o.oldRange.from&&t.oldRange.to<=o.oldRange.to&&t.newRange.from>=o.newRange.from&&t.newRange.to<=o.newRange.to))}function HF(n){let{mapping:e,steps:t}=n,i=[];return e.maps.forEach((r,o)=>{let s=[];if(r.ranges.length)r.forEach((a,l)=>{s.push({from:a,to:l})});else{let{from:a,to:l}=t[o];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{let c=e.slice(o).map(a,-1),u=e.slice(o).map(l),d=e.invert().map(c,-1),p=e.invert().map(u);i.push({oldRange:{from:d,to:p},newRange:{from:c,to:u}})})}),Kce(i)}function D_(n,e,t){let i=[];return n===e?t.resolve(n).marks().forEach(r=>{let o=t.resolve(n-1),s=aS(o,r.type);s&&i.push(I({mark:r},s))}):t.nodesBetween(n,e,(r,o)=>{!r||r?.nodeSize===void 0||i.push(...r.marks.map(s=>({from:o,to:o+r.nodeSize,mark:s})))}),i}function __(n,e,t){return Object.fromEntries(Object.entries(t).filter(([i])=>{let r=n.find(o=>o.type===e&&o.name===i);return r?r.attribute.keepOnSplit:!1}))}function rS(n,e,t={}){let{empty:i,ranges:r}=n.selection,o=e?cl(e,n.schema):null;if(i)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>o?o.name===d.type.name:!0).find(d=>b_(d.attrs,t,{strict:!1}));let s=0,a=[];if(r.forEach(({$from:d,$to:p})=>{let h=d.pos,g=p.pos;n.doc.nodesBetween(h,g,(_,v)=>{if(!_.isText&&!_.marks.length)return;let w=Math.max(h,v),S=Math.min(g,v+_.nodeSize),L=S-w;s+=L,a.push(..._.marks.map(T=>({mark:T,from:w,to:S})))})}),s===0)return!1;let l=a.filter(d=>o?o.name===d.mark.type.name:!0).filter(d=>b_(d.mark.attrs,t,{strict:!1})).reduce((d,p)=>d+p.to-p.from,0),c=a.filter(d=>o?d.mark.type!==o&&d.mark.type.excludes(o):!0).reduce((d,p)=>d+p.to-p.from,0);return(l>0?l+c:l)>=s}function Yce(n,e,t={}){if(!e)return xf(n,null,t)||rS(n,null,t);let i=M_(e,n.schema);return i==="node"?xf(n,e,t):i==="mark"?rS(n,e,t):!1}function kF(n,e){let{nodeExtensions:t}=T_(e),i=t.find(s=>s.name===n);if(!i)return!1;let r={name:i.name,options:i.options,storage:i.storage},o=vt(Me(i,"group",r));return typeof o!="string"?!1:o.split(" ").includes("list")}function $F(n,{checkChildren:e}={checkChildren:!0}){if(n.isText)return!n.text;if(n.content.childCount===0)return!0;if(n.isLeaf)return!1;if(e){let t=!0;return n.content.forEach(i=>{t!==!1&&($F(i)||(t=!1))}),t}return!1}function O_(n){return n instanceof Se}function qr(n,e,t){let r=n.state.doc.content.size,o=ea(e,0,r),s=ea(t,0,r),a=n.coordsAtPos(o),l=n.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),p=Math.max(a.right,l.right),h=p-d,g=u-c,w={top:c,bottom:u,left:d,right:p,width:h,height:g,x:d,y:c};return R(I({},w),{toJSON:()=>w})}function Zce(n,e,t){var i;let{selection:r}=e,o=null;if(Sd(r)&&(o=r.$cursor),o){let a=(i=n.storedMarks)!==null&&i!==void 0?i:o.marks();return!!t.isInSet(a)||!a.some(l=>l.type.excludes(t))}let{ranges:s}=r;return s.some(({$from:a,$to:l})=>{let c=a.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(a.pos,l.pos,(u,d,p)=>{if(c)return!1;if(u.isInline){let h=!p||p.type.allowsMarkType(t),g=!!t.isInSet(u.marks)||!u.marks.some(_=>_.type.excludes(t));c=h&&g}return!c}),c})}var Jce=(n,e={})=>({tr:t,state:i,dispatch:r})=>{let{selection:o}=t,{empty:s,ranges:a}=o,l=cl(n,i.schema);if(r)if(s){let c=Md(i,l);t.addStoredMark(l.create(I(I({},c),e)))}else a.forEach(c=>{let u=c.$from.pos,d=c.$to.pos;i.doc.nodesBetween(u,d,(p,h)=>{let g=Math.max(h,u),_=Math.min(h+p.nodeSize,d);p.marks.find(w=>w.type===l)?p.marks.forEach(w=>{l===w.type&&t.addMark(g,_,l.create(I(I({},w.attrs),e)))}):t.addMark(g,_,l.create(e))})});return Zce(i,t,l)},Xce=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),eue=(n,e={})=>({state:t,dispatch:i,chain:r})=>{let o=li(n,t.schema);return o.isTextblock?r().command(({commands:s})=>QE(o,e)(t)?!0:s.clearNodes()).command(({state:s})=>QE(o,e)(s,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},tue=n=>({tr:e,dispatch:t})=>{if(t){let{doc:i}=e,r=ea(n,0,i.content.size),o=Se.create(i,r);e.setSelection(o)}return!0},nue=n=>({tr:e,dispatch:t})=>{if(t){let{doc:i}=e,{from:r,to:o}=typeof n=="number"?{from:n,to:n}:n,s=Re.atStart(i).from,a=Re.atEnd(i).to,l=ea(r,s,a),c=ea(o,s,a),u=Re.create(i,l,c);e.setSelection(u)}return!0},iue=n=>({state:e,dispatch:t})=>{let i=li(n,e.schema);return SF(i)(e,t)};function NF(n,e){let t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){let i=t.filter(r=>e?.includes(r.type.name));n.tr.ensureMarks(i)}}var rue=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:i,editor:r})=>{let{selection:o,doc:s}=e,{$from:a,$to:l}=o,c=r.extensionManager.attributes,u=__(c,a.node().type.name,a.node().attrs);if(o instanceof Se&&o.node.isBlock)return!a.parentOffset||!$r(s,a.pos)?!1:(i&&(n&&NF(t,r.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;let d=l.parentOffset===l.parent.content.size,p=a.depth===0?void 0:$ce(a.node(-1).contentMatchAt(a.indexAfter(-1))),h=d&&p?[{type:p,attrs:u}]:void 0,g=$r(e.doc,e.mapping.map(a.pos),1,h);if(!h&&!g&&$r(e.doc,e.mapping.map(a.pos),1,p?[{type:p}]:void 0)&&(g=!0,h=p?[{type:p,attrs:u}]:void 0),i){if(g&&(o instanceof Re&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,h),p&&!d&&!a.parentOffset&&a.parent.type!==p)){let _=e.mapping.map(a.before()),v=e.doc.resolve(_);a.node(-1).canReplaceWith(v.index(),v.index()+1,p)&&e.setNodeMarkup(e.mapping.map(a.before()),p)}n&&NF(t,r.extensionManager.splittableMarks),e.scrollIntoView()}return g},oue=n=>({tr:e,state:t,dispatch:i,editor:r})=>{var o;let s=li(n,t.schema),{$from:a,$to:l}=t.selection,c=t.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;let u=a.node(-1);if(u.type!==s)return!1;let d=r.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(i){let v=ne.empty,w=a.index(-1)?1:a.index(-2)?2:3;for(let ee=a.depth-w;ee>=a.depth-3;ee-=1)v=ne.from(a.node(ee).copy(v));let S=a.indexAfter(-1){if(N>-1)return!1;ee.isTextblock&&ee.content.size===0&&(N=ge+1)}),N>-1&&e.setSelection(Re.near(e.doc.resolve(N))),e.scrollIntoView()}return!0}let p=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,h=__(d,u.type.name,u.attrs),g=__(d,a.node().type.name,a.node().attrs);e.delete(a.pos,l.pos);let _=p?[{type:s,attrs:h},{type:p,attrs:g}]:[{type:s,attrs:h}];if(!$r(e.doc,a.pos,2))return!1;if(i){let{selection:v,storedMarks:w}=t,{splittableMarks:S}=r.extensionManager,L=w||v.$to.parentOffset&&v.$from.marks();if(e.split(a.pos,2,_).scrollIntoView(),!L||!i)return!0;let T=L.filter(q=>S.includes(q.type.name));e.ensureMarks(T)}return!0},ZE=(n,e)=>{let t=cS(s=>s.type===e)(n.selection);if(!t)return!0;let i=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(i===void 0)return!0;let r=n.doc.nodeAt(i);return t.node.type===r?.type&&vo(n.doc,t.pos)&&n.join(t.pos),!0},JE=(n,e)=>{let t=cS(s=>s.type===e)(n.selection);if(!t)return!0;let i=n.doc.resolve(t.start).after(t.depth);if(i===void 0)return!0;let r=n.doc.nodeAt(i);return t.node.type===r?.type&&vo(n.doc,i)&&n.join(i),!0},sue=(n,e,t,i={})=>({editor:r,tr:o,state:s,dispatch:a,chain:l,commands:c,can:u})=>{let{extensions:d,splittableMarks:p}=r.extensionManager,h=li(n,s.schema),g=li(e,s.schema),{selection:_,storedMarks:v}=s,{$from:w,$to:S}=_,L=w.blockRange(S),T=v||_.$to.parentOffset&&_.$from.marks();if(!L)return!1;let q=cS(N=>kF(N.type.name,d))(_);if(L.depth>=1&&q&&L.depth-q.depth<=1){if(q.node.type===h)return c.liftListItem(g);if(kF(q.node.type.name,d)&&h.validContent(q.node.content)&&a)return l().command(()=>(o.setNodeMarkup(q.pos,h),!0)).command(()=>ZE(o,h)).command(()=>JE(o,h)).run()}return!t||!T||!a?l().command(()=>u().wrapInList(h,i)?!0:c.clearNodes()).wrapInList(h,i).command(()=>ZE(o,h)).command(()=>JE(o,h)).run():l().command(()=>{let N=u().wrapInList(h,i),ee=T.filter(ge=>p.includes(ge.type.name));return o.ensureMarks(ee),N?!0:c.clearNodes()}).wrapInList(h,i).command(()=>ZE(o,h)).command(()=>JE(o,h)).run()},aue=(n,e={},t={})=>({state:i,commands:r})=>{let{extendEmptyMarkRange:o=!1}=t,s=cl(n,i.schema);return rS(i,s,e)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,e)},lue=(n,e,t={})=>({state:i,commands:r})=>{let o=li(n,i.schema),s=li(e,i.schema);return xf(i,o,t)?r.setNode(s):r.setNode(o,t)},cue=(n,e={})=>({state:t,commands:i})=>{let r=li(n,t.schema);return xf(t,r,e)?i.lift(r):i.wrapIn(r,e)},uue=()=>({state:n,dispatch:e})=>{let t=n.plugins;for(let i=0;i=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){let l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,n.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},due=()=>({tr:n,dispatch:e})=>{let{selection:t}=n,{empty:i,ranges:r}=t;return i||e&&r.forEach(o=>{n.removeMark(o.$from.pos,o.$to.pos)}),!0},pue=(n,e={})=>({tr:t,state:i,dispatch:r})=>{var o;let{extendEmptyMarkRange:s=!1}=e,{selection:a}=t,l=cl(n,i.schema),{$from:c,empty:u,ranges:d}=a;if(!r)return!0;if(u&&s){let{from:p,to:h}=a,g=(o=c.marks().find(v=>v.type===l))===null||o===void 0?void 0:o.attrs,_=aS(c,l,g);_&&(p=_.from,h=_.to),t.removeMark(p,h,l)}else d.forEach(p=>{t.removeMark(p.$from.pos,p.$to.pos,l)});return t.removeStoredMark(l),!0},hue=(n,e={})=>({tr:t,state:i,dispatch:r})=>{let o=null,s=null,a=M_(typeof n=="string"?n:n.name,i.schema);return a?(a==="node"&&(o=li(n,i.schema)),a==="mark"&&(s=cl(n,i.schema)),r&&t.selection.ranges.forEach(l=>{let c=l.$from.pos,u=l.$to.pos;i.doc.nodesBetween(c,u,(d,p)=>{o&&o===d.type&&t.setNodeMarkup(p,void 0,I(I({},d.attrs),e)),s&&d.marks.length&&d.marks.forEach(h=>{if(s===h.type){let g=Math.max(p,c),_=Math.min(p+d.nodeSize,u);t.addMark(g,_,s.create(I(I({},h.attrs),e)))}})})}),!0):!1},fue=(n,e={})=>({state:t,dispatch:i})=>{let r=li(n,t.schema);return xF(r,e)(t,i)},mue=(n,e={})=>({state:t,dispatch:i})=>{let r=li(n,t.schema);return TF(r,e)(t,i)},gue=Object.freeze({__proto__:null,blur:ece,clearContent:tce,clearNodes:nce,command:ice,createParagraphNear:rce,cut:oce,deleteCurrentNode:sce,deleteNode:ace,deleteRange:lce,deleteSelection:cce,enter:uce,exitCode:dce,extendMarkRange:hce,first:fce,focus:mce,forEach:gce,insertContent:yce,insertContentAt:bce,joinBackward:Ice,joinDown:wce,joinForward:xce,joinItemBackward:Tce,joinItemForward:Ece,joinTextblockBackward:Sce,joinTextblockForward:Mce,joinUp:Cce,keyboardShortcut:Oce,lift:Ace,liftEmptyBlock:kce,liftListItem:Nce,newlineInCode:Lce,resetAttributes:Pce,scrollIntoView:Rce,selectAll:Fce,selectNodeBackward:jce,selectNodeForward:Vce,selectParentNode:Bce,selectTextblockEnd:zce,selectTextblockStart:Uce,setContent:Hce,setMark:Jce,setMeta:Xce,setNode:eue,setNodeSelection:tue,setTextSelection:nue,sinkListItem:iue,splitBlock:rue,splitListItem:oue,toggleList:sue,toggleMark:aue,toggleNode:lue,toggleWrap:cue,undoInputRule:uue,unsetAllMarks:due,unsetMark:pue,updateAttributes:hue,wrapIn:fue,wrapInList:mue}),yue=mt.create({name:"commands",addCommands(){return I({},gue)}}),_ue=mt.create({name:"editable",addProseMirrorPlugins(){return[new Le({key:new Be("editable"),props:{editable:()=>this.editor.options.editable}})]}}),vue=mt.create({name:"focusEvents",addProseMirrorPlugins(){let{editor:n}=this;return[new Le({key:new Be("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;let i=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(i),!1},blur:(e,t)=>{n.isFocused=!1;let i=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(i),!1}}}})]}}),bue=mt.create({name:"keymap",addKeyboardShortcuts(){let n=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{let{selection:l,doc:c}=a,{empty:u,$anchor:d}=l,{pos:p,parent:h}=d,g=d.parent.isTextblock&&p>0?a.doc.resolve(p-1):d,_=g.parent.type.spec.isolating,v=d.pos-d.parentOffset,w=_&&g.parent.childCount===1?v===d.pos:je.atStart(c).from===p;return!u||!h.type.isTextblock||h.textContent.length||!w||w&&d.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),i={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},r=I({},i),o=R(I({},i),{"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()});return S_()||BF()?o:r},addProseMirrorPlugins(){return[new Le({key:new Be("clearDocument"),appendTransaction:(n,e,t)=>{if(!(n.some(g=>g.docChanged)&&!e.doc.eq(t.doc)))return;let{empty:r,from:o,to:s}=e.selection,a=je.atStart(e.doc).from,l=je.atEnd(e.doc).to;if(r||!(o===a&&s===l)||!(t.doc.textBetween(0,t.doc.content.size," "," ").length===0))return;let d=t.tr,p=x_({state:t,transaction:d}),{commands:h}=new Td({editor:this.editor,state:p});if(h.clearNodes(),!!d.steps.length)return d}})]}}),Cue=mt.create({name:"tabindex",addProseMirrorPlugins(){return[new Le({key:new Be("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});var oS=class n{get name(){return this.node.type.name}constructor(e,t,i=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=i,this.resolvedPos=e,this.editor=t,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,i=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can\u2019t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,i=this.to-1}this.editor.commands.insertContentAt({from:t,to:i},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;let e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new n(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new n(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new n(e,this.editor)}get children(){let e=[];return this.node.content.forEach((t,i)=>{let r=t.isBlock&&!t.isTextblock,o=this.pos+i+1,s=this.resolvedPos.doc.resolve(o);if(!r&&s.depth<=this.depth)return;let a=new n(s,this.editor,r,r?t:null);r&&(a.actualDepth=this.depth+1),e.push(new n(s,this.editor,r,r?t:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let i=null,r=this.parent;for(;r&&!i;){if(r.node.type.name===e)if(Object.keys(t).length>0){let o=r.node.attrs,s=Object.keys(t);for(let a=0;a{i&&r.length>0||(s.node.type.name===e&&o.every(l=>t[l]===s.node.attrs[l])&&r.push(s),!(i&&r.length>0)&&(r=r.concat(s.querySelectorAll(e,t,i))))}),r}setAttribute(e){let t=this.editor.state.selection;this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name,e).setTextSelection(t.from).run()}},wue=`.ProseMirror { + position: relative; +} + +.ProseMirror { + word-wrap: break-word; + white-space: pre-wrap; + white-space: break-spaces; + -webkit-font-variant-ligatures: none; + font-variant-ligatures: none; + font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ +} + +.ProseMirror [contenteditable="false"] { + white-space: normal; +} + +.ProseMirror [contenteditable="false"] [contenteditable="true"] { + white-space: pre-wrap; +} + +.ProseMirror pre { + white-space: pre-wrap; +} + +img.ProseMirror-separator { + display: inline !important; + border: none !important; + margin: 0 !important; + width: 1px !important; + height: 1px !important; +} + +.ProseMirror-gapcursor { + display: none; + pointer-events: none; + position: absolute; + margin: 0; +} + +.ProseMirror-gapcursor:after { + content: ""; + display: block; + position: absolute; + top: -2px; + width: 20px; + border-top: 1px solid black; + animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; +} + +@keyframes ProseMirror-cursor-blink { + to { + visibility: hidden; + } +} + +.ProseMirror-hideselection *::selection { + background: transparent; +} + +.ProseMirror-hideselection *::-moz-selection { + background: transparent; +} + +.ProseMirror-hideselection * { + caret-color: transparent; +} + +.ProseMirror-focused .ProseMirror-gapcursor { + display: block; +} + +.tippy-box[data-animation=fade][data-state=hidden] { + opacity: 0 +}`;function Iue(n,e,t){let i=document.querySelector(`style[data-tiptap-style${t?`-${t}`:""}]`);if(i!==null)return i;let r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.setAttribute(`data-tiptap-style${t?`-${t}`:""}`,""),r.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(r),r}var w_=class extends XE{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t}},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=Iue(wue,this.options.injectNonce))}setOptions(e={}){this.options=I(I({},this.options),e),!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){let i=PF(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:i});this.view.updateState(r)}unregisterPlugin(e){if(this.isDestroyed)return;let t=typeof e=="string"?`${e}$`:e.key,i=this.state.reconfigure({plugins:this.state.plugins.filter(r=>!r.key.startsWith(t))});this.view.updateState(i)}createExtensionManager(){var e,t;let r=[...this.options.enableCoreExtensions?[_ue,Xle.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||t===void 0?void 0:t.blockSeparator}),yue,vue,bue,Cue]:[],...this.options.extensions].filter(o=>["extension","node","mark"].includes(o?.type));this.extensionManager=new tS(r,this)}createCommandManager(){this.commandManager=new Td({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){let e;try{e=iS(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(o){if(!(o instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(o.message))throw o;this.emit("contentError",{editor:this,error:o,disableCollaboration:()=>{this.options.extensions=this.options.extensions.filter(s=>s.name!=="collaboration"),this.createExtensionManager()}}),e=iS(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}let t=jF(e,this.options.autofocus);this.view=new c_(this.options.element,R(I({},this.options.editorProps),{dispatchTransaction:this.dispatchTransaction.bind(this),state:Xy.create({doc:e,selection:t||void 0})}));let i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews(),this.prependClass();let r=this.view.dom;r.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var a;return(a=this.capturedTransaction)===null||a===void 0?void 0:a.step(s)});return}let t=this.state.apply(e),i=!this.state.selection.eq(t.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),i&&this.emit("selectionUpdate",{editor:this,transaction:e});let r=e.getMeta("focus"),o=e.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return uS(this.state,e)}isActive(e,t){let i=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return Yce(this.state,i,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return Wce(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=` + +`,textSerializers:i={}}=e||{};return Gce(this.state.doc,{blockSeparator:t,textSerializers:I(I({},FF(this.schema)),i)})}get isEmpty(){return $F(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,t){var i;return((i=this.$doc)===null||i===void 0?void 0:i.querySelector(e,t))||null}$nodes(e,t){var i;return((i=this.$doc)===null||i===void 0?void 0:i.querySelectorAll(e,t))||null}$pos(e){let t=this.state.doc.resolve(e);return new oS(t,this)}get $doc(){return this.$pos(0)}};function Qr(n){return new Ed({find:n.find,handler:({state:e,range:t,match:i})=>{let r=vt(n.getAttributes,void 0,i);if(r===!1||r===null)return null;let{tr:o}=e,s=i[i.length-1],a=i[0];if(s){let l=a.search(/\S/),c=t.from+a.indexOf(s),u=c+s.length;if(D_(t.from,t.to,e.doc).filter(h=>h.mark.type.excluded.find(_=>_===n.type&&_!==h.mark.type)).filter(h=>h.to>c).length)return null;ut.from&&o.delete(t.from+l,c);let p=t.from+l+s.length;o.addMark(t.from+l,p,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function A_(n){return new Ed({find:n.find,handler:({state:e,range:t,match:i})=>{let r=vt(n.getAttributes,void 0,i)||{},{tr:o}=e,s=t.from,a=t.to,l=n.type.create(r);if(i[1]){let c=i[0].lastIndexOf(i[1]),u=s+c;u>a?u=a:a=u+i[1].length;let d=i[0][i[0].length-1];o.insertText(d,s+i[0].length-1),o.replaceWith(u,a,l)}else if(i[0]){let c=n.type.isInline?s:s-1;o.insert(c,n.type.create(r)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()}})}function Tf(n){return new Ed({find:n.find,handler:({state:e,range:t,match:i})=>{let r=e.doc.resolve(t.from),o=vt(n.getAttributes,void 0,i)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,o)}})}function ul(n){return new Ed({find:n.find,handler:({state:e,range:t,match:i,chain:r})=>{let o=vt(n.getAttributes,void 0,i)||{},s=e.tr.delete(t.from,t.to),l=s.doc.resolve(t.from).blockRange(),c=l&&fd(l,n.type,o);if(!c)return null;if(s.wrap(l,c),n.keepMarks&&n.editor){let{selection:d,storedMarks:p}=e,{splittableMarks:h}=n.editor.extensionManager,g=p||d.$to.parentOffset&&d.$from.marks();if(g){let _=g.filter(v=>h.includes(v.type.name));s.ensureMarks(_)}}if(n.keepAttributes){let d=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";r().updateAttributes(d,o).run()}let u=s.doc.resolve(t.from-1).nodeBefore;u&&u.type===n.type&&vo(s.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(i,u))&&s.join(t.from-1)}})}var vn=class n{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=I(I({},this.config),e),this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=vt(Me(this,"addOptions",{name:this.name}))),this.storage=vt(Me(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new n(e)}configure(e={}){let t=this.extend(R(I({},this.config),{addOptions:()=>E_(this.options,e)}));return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new n(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=vt(Me(t,"addOptions",{name:t.name})),t.storage=vt(Me(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){let{tr:i}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){let s=r.marks();if(!!!s.find(c=>c?.type.name===t.name))return!1;let l=s.find(c=>c?.type.name===t.name);return l&&i.removeStoredMark(l),i.insertText(" ",r.pos),e.view.dispatch(i),!0}return!1}},at=class n{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config=I(I({},this.config),e),this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=vt(Me(this,"addOptions",{name:this.name}))),this.storage=vt(Me(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new n(e)}configure(e={}){let t=this.extend(R(I({},this.config),{addOptions:()=>E_(this.options,e)}));return t.name=this.name,t.parent=this.parent,t}extend(e={}){let t=new n(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=vt(Me(t,"addOptions",{name:t.name})),t.storage=vt(Me(t,"addStorage",{name:t.name,options:t.options})),t}};function xue(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}var I_=class{constructor(e,t,i){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options=I({stopEvent:null,ignoreMutation:null},i),this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,i,r,o,s,a,l;let{view:c}=this.editor,u=e.target,d=u.nodeType===3?(t=u.parentElement)===null||t===void 0?void 0:t.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||!((i=this.contentDOM)===null||i===void 0)&&i.contains(u)||!d)return;let p=0,h=0;if(this.dom!==d){let v=this.dom.getBoundingClientRect(),w=d.getBoundingClientRect(),S=(r=e.offsetX)!==null&&r!==void 0?r:(o=e.nativeEvent)===null||o===void 0?void 0:o.offsetX,L=(s=e.offsetY)!==null&&s!==void 0?s:(a=e.nativeEvent)===null||a===void 0?void 0:a.offsetY;p=w.x-v.x+S,h=w.y-v.y+L}(l=e.dataTransfer)===null||l===void 0||l.setDragImage(this.dom,p,h);let g=Se.create(c.state.doc,this.getPos()),_=c.state.tr.setSelection(g);c.dispatch(_)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});let i=e.target;if(!(this.dom.contains(i)&&!(!((t=this.contentDOM)===null||t===void 0)&&t.contains(i))))return!1;let o=e.type.startsWith("drag"),s=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(i.tagName)||i.isContentEditable)&&!s&&!o)return!0;let{isEditable:l}=this.editor,{isDragging:c}=this,u=!!this.node.type.spec.draggable,d=Se.isSelectable(this.node),p=e.type==="copy",h=e.type==="paste",g=e.type==="cut",_=e.type==="mousedown";if(!u&&d&&o&&e.preventDefault(),u&&o&&!c)return e.preventDefault(),!1;if(u&&l&&!c&&_){let v=i.closest("[data-drag-handle]");v&&(this.dom===v||this.dom.contains(v))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(c||s||p||h||g||_&&d)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(S_()||xue())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(i=>i.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let i=this.getPos();return t.setNodeMarkup(i,void 0,I(I({},this.node.attrs),e)),!0})}deleteNode(){let e=this.getPos(),t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function or(n){return new v_({find:n.find,handler:({state:e,range:t,match:i,pasteEvent:r})=>{let o=vt(n.getAttributes,void 0,i,r);if(o===!1||o===null)return null;let{tr:s}=e,a=i[i.length-1],l=i[0],c=t.to;if(a){let u=l.search(/\S/),d=t.from+l.indexOf(a),p=d+a.length;if(D_(t.from,t.to,e.doc).filter(g=>g.mark.type.excluded.find(v=>v===n.type&&v!==g.mark.type)).filter(g=>g.to>d).length)return null;pt.from&&s.delete(t.from+u,d),c=t.from+u+a.length,s.addMark(t.from+u,c,n.type.create(o||{})),s.removeStoredMark(n.type)}}})}function WF(n){return n.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function GF(n){return new v_({find:n.find,handler({match:e,chain:t,range:i,pasteEvent:r}){let o=vt(n.getAttributes,void 0,e,r);if(o===!1||o===null)return null;e.input&&t().deleteRange(i).insertContentAt(i.from,{type:n.type.name,attrs:o})}})}var qF=mt.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize"}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=n=>{let e=n?.node||this.editor.state.doc;return(n?.mode||this.options.mode)==="textSize"?e.textBetween(0,e.content.size,void 0," ").length:e.nodeSize},this.storage.words=n=>{let e=n?.node||this.editor.state.doc;return e.textBetween(0,e.content.size," "," ").split(" ").filter(r=>r!=="").length}},addProseMirrorPlugins(){return[new Le({key:new Be("characterCount"),filterTransaction:(n,e)=>{let t=this.options.limit;if(!n.docChanged||t===0||t===null||t===void 0)return!0;let i=this.storage.characters({node:e.doc}),r=this.storage.characters({node:n.doc});if(r<=t||i>t&&r>t&&r<=i)return!0;if(i>t&&r>t&&r>i||!n.getMeta("paste"))return!1;let s=n.selection.$head.pos,a=r-t,l=s-a,c=s;return n.deleteRange(l,c),!(this.storage.characters({node:n.doc})>t)}})]}});var Tue=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Eue=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,QF=vn.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:n}){return["mark",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:e})=>e.setMark(this.name,n),toggleHighlight:n=>({commands:e})=>e.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Qr({find:Tue,type:this.type})]},addPasteRules(){return[or({find:Eue,type:this.type})]}});var Sue="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Mue="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Ad=(n,e)=>{for(let t in e)n[t]=e[t];return n},mS="numeric",gS="ascii",yS="alpha",R_="asciinumeric",k_="alphanumeric",_S="domain",i5="emoji",Due="scheme",Oue="slashscheme",KF="whitespace";function Aue(n,e){return n in e||(e[n]=[]),e[n]}function xc(n,e,t){e[mS]&&(e[R_]=!0,e[k_]=!0),e[gS]&&(e[R_]=!0,e[yS]=!0),e[R_]&&(e[k_]=!0),e[yS]&&(e[k_]=!0),e[k_]&&(e[_S]=!0),e[i5]&&(e[_S]=!0);for(let i in e){let r=Aue(i,t);r.indexOf(n)<0&&r.push(n)}}function kue(n,e){let t={};for(let i in e)e[i].indexOf(n)>=0&&(t[i]=!0);return t}function sr(n){n===void 0&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}sr.groups={};sr.prototype={accepts(){return!!this.t},go(n){let e=this,t=e.j[n];if(t)return t;for(let i=0;in.ta(e,t,i,r),Kr=(n,e,t,i,r)=>n.tr(e,t,i,r),YF=(n,e,t,i,r)=>n.ts(e,t,i,r),me=(n,e,t,i,r)=>n.tt(e,t,i,r),ta="WORD",vS="UWORD",Df="LOCALHOST",bS="TLD",CS="UTLD",F_="SCHEME",Od="SLASH_SCHEME",wS="NUM",r5="WS",IS="NL",Ef="OPENBRACE",Sf="CLOSEBRACE",j_="OPENBRACKET",V_="CLOSEBRACKET",B_="OPENPAREN",z_="CLOSEPAREN",U_="OPENANGLEBRACKET",H_="CLOSEANGLEBRACKET",$_="FULLWIDTHLEFTPAREN",W_="FULLWIDTHRIGHTPAREN",G_="LEFTCORNERBRACKET",q_="RIGHTCORNERBRACKET",Q_="LEFTWHITECORNERBRACKET",K_="RIGHTWHITECORNERBRACKET",Y_="FULLWIDTHLESSTHAN",Z_="FULLWIDTHGREATERTHAN",J_="AMPERSAND",X_="APOSTROPHE",ev="ASTERISK",pl="AT",tv="BACKSLASH",nv="BACKTICK",iv="CARET",hl="COLON",xS="COMMA",rv="DOLLAR",ps="DOT",ov="EQUALS",TS="EXCLAMATION",hs="HYPHEN",sv="PERCENT",av="PIPE",lv="PLUS",cv="POUND",uv="QUERY",ES="QUOTE",SS="SEMI",fs="SLASH",Mf="TILDE",dv="UNDERSCORE",o5="EMOJI",pv="SYM",s5=Object.freeze({__proto__:null,WORD:ta,UWORD:vS,LOCALHOST:Df,TLD:bS,UTLD:CS,SCHEME:F_,SLASH_SCHEME:Od,NUM:wS,WS:r5,NL:IS,OPENBRACE:Ef,CLOSEBRACE:Sf,OPENBRACKET:j_,CLOSEBRACKET:V_,OPENPAREN:B_,CLOSEPAREN:z_,OPENANGLEBRACKET:U_,CLOSEANGLEBRACKET:H_,FULLWIDTHLEFTPAREN:$_,FULLWIDTHRIGHTPAREN:W_,LEFTCORNERBRACKET:G_,RIGHTCORNERBRACKET:q_,LEFTWHITECORNERBRACKET:Q_,RIGHTWHITECORNERBRACKET:K_,FULLWIDTHLESSTHAN:Y_,FULLWIDTHGREATERTHAN:Z_,AMPERSAND:J_,APOSTROPHE:X_,ASTERISK:ev,AT:pl,BACKSLASH:tv,BACKTICK:nv,CARET:iv,COLON:hl,COMMA:xS,DOLLAR:rv,DOT:ps,EQUALS:ov,EXCLAMATION:TS,HYPHEN:hs,PERCENT:sv,PIPE:av,PLUS:lv,POUND:cv,QUERY:uv,QUOTE:ES,SEMI:SS,SLASH:fs,TILDE:Mf,UNDERSCORE:dv,EMOJI:o5,SYM:pv}),Dd=/[a-z]/,dS=new RegExp("\\p{L}","u"),pS=new RegExp("\\p{Emoji}","u");var hS=/\d/,ZF=/\s/;var JF=` +`,Nue="\uFE0F",Lue="\u200D",N_=null,L_=null;function Pue(n){n===void 0&&(n=[]);let e={};sr.groups=e;let t=new sr;N_==null&&(N_=XF(Sue)),L_==null&&(L_=XF(Mue)),me(t,"'",X_),me(t,"{",Ef),me(t,"}",Sf),me(t,"[",j_),me(t,"]",V_),me(t,"(",B_),me(t,")",z_),me(t,"<",U_),me(t,">",H_),me(t,"\uFF08",$_),me(t,"\uFF09",W_),me(t,"\u300C",G_),me(t,"\u300D",q_),me(t,"\u300E",Q_),me(t,"\u300F",K_),me(t,"\uFF1C",Y_),me(t,"\uFF1E",Z_),me(t,"&",J_),me(t,"*",ev),me(t,"@",pl),me(t,"`",nv),me(t,"^",iv),me(t,":",hl),me(t,",",xS),me(t,"$",rv),me(t,".",ps),me(t,"=",ov),me(t,"!",TS),me(t,"-",hs),me(t,"%",sv),me(t,"|",av),me(t,"+",lv),me(t,"#",cv),me(t,"?",uv),me(t,'"',ES),me(t,"/",fs),me(t,";",SS),me(t,"~",Mf),me(t,"_",dv),me(t,"\\",tv);let i=Kr(t,hS,wS,{[mS]:!0});Kr(i,hS,i);let r=Kr(t,Dd,ta,{[gS]:!0});Kr(r,Dd,r);let o=Kr(t,dS,vS,{[yS]:!0});Kr(o,Dd),Kr(o,dS,o);let s=Kr(t,ZF,r5,{[KF]:!0});me(t,JF,IS,{[KF]:!0}),me(s,JF),Kr(s,ZF,s);let a=Kr(t,pS,o5,{[i5]:!0});Kr(a,pS,a),me(a,Nue,a);let l=me(a,Lue);Kr(l,pS,a);let c=[[Dd,r]],u=[[Dd,null],[dS,o]];for(let d=0;dd[0]>p[0]?1:-1);for(let d=0;d=0?g[_S]=!0:Dd.test(p)?hS.test(p)?g[R_]=!0:g[gS]=!0:g[mS]=!0,YF(t,p,p,g)}return YF(t,"localhost",Df,{ascii:!0}),t.jd=new sr(pv),{start:t,tokens:Ad({groups:e},s5)}}function Rue(n,e){let t=Fue(e.replace(/[A-Z]/g,a=>a.toLowerCase())),i=t.length,r=[],o=0,s=0;for(;s=0&&(d+=t[s].length,p++),c+=t[s].length,o+=t[s].length,s++;o-=d,s-=p,c-=d,r.push({t:u.t,v:e.slice(o-c,o),s:o-c,e:o})}return r}function Fue(n){let e=[],t=n.length,i=0;for(;i56319||i+1===t||(o=n.charCodeAt(i+1))<56320||o>57343?n[i]:n.slice(i,i+2);e.push(s),i+=s.length}return e}function dl(n,e,t,i,r){let o,s=e.length;for(let a=0;a=0;)o++;if(o>0){e.push(t.join(""));for(let s=parseInt(n.substring(i,i+o),10);s>0;s--)t.pop();i+=o}else t.push(n[i]),i++}return e}var Of={defaultProtocol:"http",events:null,format:e5,formatHref:e5,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function MS(n,e){e===void 0&&(e=null);let t=Ad({},Of);n&&(t=Ad(t,n instanceof MS?n.o:n));let i=t.ignoreTags,r=[];for(let o=0;ot?i.substring(0,t)+"\u2026":i},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n){return n===void 0&&(n=Of.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){let e=this,t=this.toHref(n.get("defaultProtocol")),i=n.get("formatHref",t,this),r=n.get("tagName",t,e),o=this.toFormattedString(n),s={},a=n.get("className",t,e),l=n.get("target",t,e),c=n.get("rel",t,e),u=n.getObj("attributes",t,e),d=n.getObj("events",t,e);return s.href=i,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),u&&Ad(s,u),{tagName:r,attributes:s,content:o,eventListeners:d}}};function hv(n,e){class t extends a5{constructor(r,o){super(r,o),this.t=n}}for(let i in e)t.prototype[i]=e[i];return t.t=n,t}var t5=hv("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),n5=hv("text"),jue=hv("nl"),P_=hv("url",{isLink:!0,toHref(n){return n===void 0&&(n=Of.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){let n=this.tk;return n.length>=2&&n[0].t!==Df&&n[1].t===hl}});var Yr=n=>new sr(n);function Vue(n){let{groups:e}=n,t=e.domain.concat([J_,ev,pl,tv,nv,iv,rv,ov,hs,wS,sv,av,lv,cv,fs,pv,Mf,dv]),i=[X_,hl,xS,ps,TS,uv,ES,SS,U_,H_,Ef,Sf,V_,j_,B_,z_,$_,W_,G_,q_,Q_,K_,Y_,Z_],r=[J_,X_,ev,tv,nv,iv,rv,ov,hs,Ef,Sf,sv,av,lv,cv,uv,fs,pv,Mf,dv],o=Yr(),s=me(o,Mf);Tt(s,r,s),Tt(s,e.domain,s);let a=Yr(),l=Yr(),c=Yr();Tt(o,e.domain,a),Tt(o,e.scheme,l),Tt(o,e.slashscheme,c),Tt(a,r,s),Tt(a,e.domain,a);let u=me(a,pl);me(s,pl,u),me(l,pl,u),me(c,pl,u);let d=me(s,ps);Tt(d,r,s),Tt(d,e.domain,s);let p=Yr();Tt(u,e.domain,p),Tt(p,e.domain,p);let h=me(p,ps);Tt(h,e.domain,p);let g=Yr(t5);Tt(h,e.tld,g),Tt(h,e.utld,g),me(u,Df,g);let _=me(p,hs);Tt(_,e.domain,p),Tt(g,e.domain,p),me(g,ps,h),me(g,hs,_);let v=me(g,hl);Tt(v,e.numeric,t5);let w=me(a,hs),S=me(a,ps);Tt(w,e.domain,a),Tt(S,r,s),Tt(S,e.domain,a);let L=Yr(P_);Tt(S,e.tld,L),Tt(S,e.utld,L),Tt(L,e.domain,a),Tt(L,r,s),me(L,ps,S),me(L,hs,w),me(L,pl,u);let T=me(L,hl),q=Yr(P_);Tt(T,e.numeric,q);let N=Yr(P_),ee=Yr();Tt(N,t,N),Tt(N,i,ee),Tt(ee,t,N),Tt(ee,i,ee),me(L,fs,N),me(q,fs,N);let ge=me(l,hl),ce=me(c,hl),ze=me(ce,fs),Ot=me(ze,fs);Tt(l,e.domain,a),me(l,ps,S),me(l,hs,w),Tt(c,e.domain,a),me(c,ps,S),me(c,hs,w),Tt(ge,e.domain,N),me(ge,fs,N),Tt(Ot,e.domain,N),Tt(Ot,t,N),me(Ot,fs,N);let It=[[Ef,Sf],[j_,V_],[B_,z_],[U_,H_],[$_,W_],[G_,q_],[Q_,K_],[Y_,Z_]];for(let ve=0;ve=0&&p++,r++,u++;if(p<0)r-=u,r0&&(o.push(fS(n5,e,s)),s=[]),r-=p,u-=p;let h=d.t,g=t.slice(r-u,r);o.push(fS(h,e,g))}}return s.length>0&&o.push(fS(n5,e,s)),o}function fS(n,e,t){let i=t[0].s,r=t[t.length-1].e,o=e.slice(i,r);return new n(o,t)}var zue=typeof console<"u"&&console&&console.warn||(()=>{}),Uue="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",kn={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function l5(){sr.groups={},kn.scanner=null,kn.parser=null,kn.tokenQueue=[],kn.pluginQueue=[],kn.customSchemes=[],kn.initialized=!1}function DS(n,e){if(e===void 0&&(e=!1),kn.initialized&&zue(`linkifyjs: already initialized - will not register custom scheme "${n}" ${Uue}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format. +1. Must only contain digits, lowercase ASCII letters or "-" +2. Cannot start or end with "-" +3. "-" cannot repeat`);kn.customSchemes.push([n,e])}function Hue(){kn.scanner=Pue(kn.customSchemes);for(let n=0;n{let r=e.some(c=>c.docChanged)&&!t.doc.eq(i.doc),o=e.some(c=>c.getMeta("preventAutolink"));if(!r||o)return;let{tr:s}=i,a=zF(t.doc,[...e]);if(HF(a).forEach(({newRange:c})=>{let u=UF(i.doc,c,h=>h.isTextblock),d,p;if(u.length>1?(d=u[0],p=i.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):u.length&&i.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(d=u[0],p=i.doc.textBetween(d.pos,c.to,void 0," ")),d&&p){let h=p.split(" ").filter(w=>w!=="");if(h.length<=0)return!1;let g=h[h.length-1],_=d.pos+p.lastIndexOf(g);if(!g)return!1;let v=OS(g).map(w=>w.toObject(n.defaultProtocol));if(!$ue(v))return!1;v.filter(w=>w.isLink).map(w=>R(I({},w),{from:_+w.start+1,to:_+w.end+1})).filter(w=>i.schema.marks.code?!i.doc.rangeHasMark(w.from,w.to,i.schema.marks.code):!0).filter(w=>n.validate(w.value)).forEach(w=>{D_(w.from,w.to,i.doc).some(S=>S.mark.type===n.type)||s.addMark(w.from,w.to,n.type.create({href:w.href}))})}}),!!s.steps.length)return s}})}function Gue(n){return new Le({key:new Be("handleClickLink"),props:{handleClick:(e,t,i)=>{var r,o;if(i.button!==0||!e.editable)return!1;let s=i.target,a=[];for(;s.nodeName!=="DIV";)a.push(s),s=s.parentNode;if(!a.find(p=>p.nodeName==="A"))return!1;let l=uS(e.state,n.type.name),c=i.target,u=(r=c?.href)!==null&&r!==void 0?r:l.href,d=(o=c?.target)!==null&&o!==void 0?o:l.target;return c&&u?(window.open(u,d),!0):!1}}})}function que(n){return new Le({key:new Be("handlePasteLink"),props:{handlePaste:(e,t,i)=>{let{state:r}=e,{selection:o}=r,{empty:s}=o;if(s)return!1;let a="";i.content.forEach(c=>{a+=c.textContent});let l=AS(a,{defaultProtocol:n.defaultProtocol}).find(c=>c.isLink&&c.value===a);return!a||!l?!1:(n.editor.commands.setMark(n.type,{href:l.href}),!0)}}})}var Que=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,Kue=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i;function c5(n){return!n||n.replace(Que,"").match(Kue)}var u5=vn.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){DS(n);return}DS(n.scheme,n.optionalSlashes)})},onDestroy(){l5()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:n=>!!n}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:n=>{let e=n.getAttribute("href");return!e||!c5(e)?!1:{href:e}}}]},renderHTML({HTMLAttributes:n}){return c5(n.href)?["a",Ae(this.options.HTMLAttributes,n),0]:["a",Ae(this.options.HTMLAttributes,R(I({},n),{href:""})),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[or({find:n=>{let e=[];if(n){let{validate:t}=this.options,i=AS(n).filter(r=>r.isLink&&t(r.value));i.length&&i.forEach(r=>e.push({text:r.value,data:{href:r.href},index:r.start}))}return e},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){let n=[];return this.options.autolink&&n.push(Wue({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),this.options.openOnClick===!0&&n.push(Gue({type:this.type})),this.options.linkOnPaste&&n.push(que({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),n}});var d5=vn.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(n){return n!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sub",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{setSubscript:()=>({commands:n})=>n.setMark(this.name),toggleSubscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSubscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}});var p5=vn.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(n){return n!=="super"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sup",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{setSuperscript:()=>({commands:n})=>n.setMark(this.name),toggleSuperscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSuperscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}});var h5=at.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:n}){return["tr",Ae(this.options.HTMLAttributes,n),0]}});var f5=mt.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>{let e=n.style.textAlign||this.options.defaultAlignment;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.map(t=>e.updateAttributes(t,{textAlign:n})).every(t=>t):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.map(e=>n.resetAttributes(e,"textAlign")).every(e=>e)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});var m5=vn.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});var Yue=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(?!channel\/)(?!@)(.+)?$/,Zue=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)\/(?!channel\/)(?!@)(.+)?$/g,y5=n=>n.match(Yue),g5=n=>n?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",Jue=n=>{let{url:e,allowFullscreen:t,autoplay:i,ccLanguage:r,ccLoadPolicy:o,controls:s,disableKBcontrols:a,enableIFrameApi:l,endTime:c,interfaceLanguage:u,ivLoadPolicy:d,loop:p,modestBranding:h,nocookie:g,origin:_,playlist:v,progressBarColor:w,startAt:S}=n;if(!y5(e))return null;if(e.includes("/embed/"))return e;if(e.includes("youtu.be")){let ee=e.split("/").pop();return ee?`${g5(g)}${ee}`:null}let T=/(?:v=|shorts\/)([-\w]+)/gm.exec(e);if(!T||!T[1])return null;let q=`${g5(g)}${T[1]}`,N=[];return t===!1&&N.push("fs=0"),i&&N.push("autoplay=1"),r&&N.push(`cc_lang_pref=${r}`),o&&N.push("cc_load_policy=1"),s||N.push("controls=0"),a&&N.push("disablekb=1"),l&&N.push("enablejsapi=1"),c&&N.push(`end=${c}`),u&&N.push(`hl=${u}`),d&&N.push(`iv_load_policy=${d}`),p&&N.push("loop=1"),h&&N.push("modestbranding=1"),_&&N.push(`origin=${_}`),v&&N.push(`playlist=${v}`),S&&N.push(`start=${S}`),w&&N.push(`color=${w}`),N.length&&(q+=`?${N.join("&")}`),q},_5=at.create({name:"youtube",addOptions(){return{addPasteHandler:!0,allowFullscreen:!0,autoplay:!1,ccLanguage:void 0,ccLoadPolicy:void 0,controls:!0,disableKBcontrols:!1,enableIFrameApi:!1,endTime:0,height:480,interfaceLanguage:void 0,ivLoadPolicy:0,loop:!1,modestBranding:!1,HTMLAttributes:{},inline:!1,nocookie:!1,origin:"",playlist:"",progressBarColor:void 0,width:640}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},start:{default:0},width:{default:this.options.width},height:{default:this.options.height}}},parseHTML(){return[{tag:"div[data-youtube-video] iframe"}]},addCommands(){return{setYoutubeVideo:n=>({commands:e})=>y5(n.src)?e.insertContent({type:this.name,attrs:n}):!1}},addPasteRules(){return this.options.addPasteHandler?[GF({find:Zue,type:this.type,getAttributes:n=>({src:n.input})})]:[]},renderHTML({HTMLAttributes:n}){let e=Jue({url:n.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,controls:this.options.controls,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,nocookie:this.options.nocookie,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,startAt:n.start||0});return n.src=e,["div",{"data-youtube-video":""},["iframe",Ae(this.options.HTMLAttributes,{width:this.options.width,height:this.options.height,allowfullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor},n)]]}});var Xue=/^\s*>\s$/,v5=at.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:n}){return["blockquote",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[ul({find:Xue,type:this.type})]}});var ede=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,tde=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,nde=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,ide=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,b5=vn.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return["strong",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Qr({find:ede,type:this.type}),Qr({find:nde,type:this.type})]},addPasteRules(){return[or({find:tde,type:this.type}),or({find:ide,type:this.type})]}});var rde=at.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ae(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),C5=vn.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{let t=Md(n,this.type);return Object.entries(t).some(([,r])=>!!r)?!0:e.unsetMark(this.name)}}}}),w5=/^\s*([-+*])\s$/,I5=at.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(rde.name,this.editor.getAttributes(C5.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=ul({find:w5,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=ul({find:w5,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(C5.name),editor:this.editor})),[n]}});var ode=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/,sde=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g,x5=vn.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:n}){return["code",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Qr({find:ode,type:this.type})]},addPasteRules(){return[or({find:sde,type:this.type})]}});var ade=/^```([a-z]+)?[\s\n]$/,lde=/^~~~([a-z]+)?[\s\n]$/,T5=at.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:n=>{var e;let{languageClassPrefix:t}=this.options,o=[...((e=n.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(s=>s.startsWith(t)).map(s=>s.replace(t,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:n,HTMLAttributes:e}){return["pre",Ae(this.options.HTMLAttributes,e),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},addCommands(){return{setCodeBlock:n=>({commands:e})=>e.setNode(this.name,n),toggleCodeBlock:n=>({commands:e})=>e.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:n,$anchor:e}=this.editor.state.selection,t=e.pos===1;return!n||e.parent.type.name!==this.name?!1:t||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:e}=n,{selection:t}=e,{$from:i,empty:r}=t;if(!r||i.parent.type!==this.type)return!1;let o=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith(` + +`);return!o||!s?!1:n.chain().command(({tr:a})=>(a.delete(i.pos-2,i.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;let{state:e}=n,{selection:t,doc:i}=e,{$from:r,empty:o}=t;if(!o||r.parent.type!==this.type||!(r.parentOffset===r.parent.nodeSize-2))return!1;let a=r.after();return a===void 0?!1:i.nodeAt(a)?n.commands.command(({tr:c})=>(c.setSelection(je.near(i.resolve(a))),!0)):n.commands.exitCode()}}},addInputRules(){return[Tf({find:ade,type:this.type,getAttributes:n=>({language:n[1]})}),Tf({find:lde,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new Le({key:new Be("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;let t=e.clipboardData.getData("text/plain"),i=e.clipboardData.getData("vscode-editor-data"),r=i?JSON.parse(i):void 0,o=r?.mode;if(!t||!o)return!1;let{tr:s,schema:a}=n.state,l=a.text(t.replace(/\r\n?/g,` +`));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(Re.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),n.dispatch(s),!0}}})]}});var E5=at.create({name:"doc",topNode:!0,content:"block+"});function S5(n={}){return new Le({view(e){return new kS(e,n)}})}var kS=class{constructor(e,t){var i;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(i=t.width)!==null&&i!==void 0?i:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let o=s=>{this[r](s)};return e.dom.addEventListener(r,o),{name:r,handler:o}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,i;if(t){let a=e.nodeBefore,l=e.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let u=c.getBoundingClientRect(),d=a?u.bottom:u.top;a&&l&&(d=(d+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),i={left:u.left,right:u.right,top:d-this.width/2,bottom:d+this.width/2}}}}if(!i){let a=this.editorView.coordsAtPos(this.cursorPos);i={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let r=this.editorView.dom.offsetParent;this.element||(this.element=r.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let o,s;if(!r||r==document.body&&getComputedStyle(r).position=="static")o=-pageXOffset,s=-pageYOffset;else{let a=r.getBoundingClientRect();o=a.left-r.scrollLeft,s=a.top-r.scrollTop}this.element.style.left=i.left-o+"px",this.element.style.top=i.top-s+"px",this.element.style.width=i.right-i.left+"px",this.element.style.height=i.bottom-i.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),i=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=i&&i.type.spec.disableDropCursor,o=typeof r=="function"?r(this.editorView,t,e):r;if(t&&!o){let s=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Yy(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}};var M5=mt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[S5(this.options)]}});var Li=class n extends je{constructor(e){super(e,e)}map(e,t){let i=e.resolve(t.map(this.head));return n.valid(i)?new n(i):je.near(i)}content(){return he.empty}eq(e){return e instanceof n&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new n(e.resolve(t.pos))}getBookmark(){return new NS(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!cde(e)||!ude(e))return!1;let i=t.type.spec.allowGapCursor;if(i!=null)return i;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,i=!1){e:for(;;){if(!i&&n.valid(e))return e;let r=e.pos,o=null;for(let s=e.depth;;s--){let a=e.node(s);if(t>0?e.indexAfter(s)0){o=a.child(t>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;r+=t;let l=e.doc.resolve(r);if(n.valid(l))return l}for(;;){let s=t>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!Se.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),i=!1;continue e}break}o=s,r+=t;let a=e.doc.resolve(r);if(n.valid(a))return a}return null}}};Li.prototype.visible=!1;Li.findFrom=Li.findGapCursorFrom;je.jsonID("gapcursor",Li);var NS=class n{constructor(e){this.pos=e}map(e){return new n(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return Li.valid(t)?new Li(t):je.near(t)}};function cde(n){for(let e=n.depth;e>=0;e--){let t=n.index(e),i=n.node(e);if(t==0){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(t-1);;r=r.lastChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function ude(n){for(let e=n.depth;e>=0;e--){let t=n.indexAfter(e),i=n.node(e);if(t==i.childCount){if(i.type.spec.isolating)return!0;continue}for(let r=i.child(t);;r=r.firstChild){if(r.childCount==0&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}}return!0}function D5(){return new Le({props:{decorations:fde,createSelectionBetween(n,e,t){return e.pos==t.pos&&Li.valid(t)?new Li(t):null},handleClick:pde,handleKeyDown:dde,handleDOMEvents:{beforeinput:hde}}})}var dde=If({ArrowLeft:fv("horiz",-1),ArrowRight:fv("horiz",1),ArrowUp:fv("vert",-1),ArrowDown:fv("vert",1)});function fv(n,e){let t=n=="vert"?e>0?"down":"up":e>0?"right":"left";return function(i,r,o){let s=i.selection,a=e>0?s.$to:s.$from,l=s.empty;if(s instanceof Re){if(!o.endOfTextblock(t)||a.depth==0)return!1;l=!1,a=i.doc.resolve(e>0?a.after():a.before())}let c=Li.findGapCursorFrom(a,e,l);return c?(r&&r(i.tr.setSelection(new Li(c))),!0):!1}}function pde(n,e,t){if(!n||!n.editable)return!1;let i=n.state.doc.resolve(e);if(!Li.valid(i))return!1;let r=n.posAtCoords({left:t.clientX,top:t.clientY});return r&&r.inside>-1&&Se.isSelectable(n.state.doc.nodeAt(r.inside))?!1:(n.dispatch(n.state.tr.setSelection(new Li(i))),!0)}function hde(n,e){if(e.inputType!="insertCompositionText"||!(n.state.selection instanceof Li))return!1;let{$from:t}=n.state.selection,i=t.parent.contentMatchAt(t.index()).findWrapping(n.state.schema.nodes.text);if(!i)return!1;let r=ne.empty;for(let s=i.length-1;s>=0;s--)r=ne.from(i[s].createAndFill(null,r));let o=n.state.tr.replace(t.pos,t.pos,new he(r,0,0));return o.setSelection(Re.near(o.doc.resolve(t.pos+1))),n.dispatch(o),!1}function fde(n){if(!(n.selection instanceof Li))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",pn.create(n.doc,[An.widget(n.selection.head,e,{key:"gapcursor"})])}var O5=mt.create({name:"gapCursor",addProseMirrorPlugins(){return[D5()]},extendNodeSchema(n){var e;let t={name:n.name,options:n.options,storage:n.storage};return{allowGapCursor:(e=vt(Me(n,"allowGapCursor",t)))!==null&&e!==void 0?e:null}}});var A5=at.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",Ae(this.options.HTMLAttributes,n)]},renderText(){return` +`},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:i})=>n.first([()=>n.exitCode(),()=>n.command(()=>{let{selection:r,storedMarks:o}=t;if(r.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:a}=i.extensionManager,l=o||r.$to.parentOffset&&r.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&s){let d=l.filter(p=>a.includes(p.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}});var k5=at.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,Ae(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>R(I({},n),{[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>Tf({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var mv=200,yi=function(){};yi.prototype.append=function(e){return e.length?(e=yi.from(e),!this.length&&e||e.length=t?yi.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))};yi.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};yi.prototype.forEach=function(e,t,i){t===void 0&&(t=0),i===void 0&&(i=this.length),t<=i?this.forEachInner(e,t,i,0):this.forEachInvertedInner(e,t,i,0)};yi.prototype.map=function(e,t,i){t===void 0&&(t=0),i===void 0&&(i=this.length);var r=[];return this.forEach(function(o,s){return r.push(e(o,s))},t,i),r};yi.from=function(e){return e instanceof yi?e:e&&e.length?new N5(e):yi.empty};var N5=function(n){function e(i){n.call(this),this.values=i}n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(r,o){return r==0&&o==this.length?this:new e(this.values.slice(r,o))},e.prototype.getInner=function(r){return this.values[r]},e.prototype.forEachInner=function(r,o,s,a){for(var l=o;l=s;l--)if(r(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(r){if(this.length+r.length<=mv)return new e(this.values.concat(r.flatten()))},e.prototype.leafPrepend=function(r){if(this.length+r.length<=mv)return new e(r.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(yi);yi.empty=new N5([]);var mde=function(n){function e(t,i){n.call(this),this.left=t,this.right=i,this.length=t.length+i.length,this.depth=Math.max(t.depth,i.depth)+1}return n&&(e.__proto__=n),e.prototype=Object.create(n&&n.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(i){return ia&&this.right.forEachInner(i,Math.max(r-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},e.prototype.forEachInvertedInner=function(i,r,o,s){var a=this.left.length;if(r>a&&this.right.forEachInvertedInner(i,r-a,Math.max(o,a)-a,s+a)===!1||o=o?this.right.slice(i-o,r-o):this.left.slice(i,o).append(this.right.slice(0,r-o))},e.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new e(this.left,r)},e.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new e(r,this.right)},e.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new e(this.left,new e(this.right,i)):new e(this,i)},e}(yi),LS=yi;var gde=500,Ec=class n{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}let r,o;t&&(r=this.remapping(i,this.items.length),o=r.maps.length);let s=e.tr,a,l,c=[],u=[];return this.items.forEach((d,p)=>{if(!d.step){r||(r=this.remapping(i,p+1),o=r.maps.length),o--,u.push(d);return}if(r){u.push(new ms(d.map));let h=d.step.map(r.slice(o)),g;h&&s.maybeStep(h).doc&&(g=s.mapping.maps[s.mapping.maps.length-1],c.push(new ms(g,void 0,void 0,c.length+u.length))),o--,g&&r.appendMap(g,o)}else s.maybeStep(d.step);if(d.selection)return a=r?d.selection.map(r.slice(o)):d.selection,l=new n(this.items.slice(0,i).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(e,t,i,r){let o=[],s=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let u=0;u_de&&(a=yde(a,c),s-=c),new n(a.append(o),s)}remapping(e,t){let i=new lf;return this.items.forEach((r,o)=>{let s=r.mirrorOffset!=null&&o-r.mirrorOffset>=e?i.maps.length-r.mirrorOffset:void 0;i.appendMap(r.map,s)},e,t),i}addMaps(e){return this.eventCount==0?this:new n(this.items.append(e.map(t=>new ms(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-t),o=e.mapping,s=e.steps.length,a=this.eventCount;this.items.forEach(p=>{p.selection&&a--},r);let l=t;this.items.forEach(p=>{let h=o.getMirror(--l);if(h==null)return;s=Math.min(s,h);let g=o.maps[h];if(p.step){let _=e.steps[h].invert(e.docs[h]),v=p.selection&&p.selection.map(o.slice(l+1,h));v&&a++,i.push(new ms(g,_,v))}else i.push(new ms(g))},r);let c=[];for(let p=t;pgde&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),i=t.maps.length,r=[],o=0;return this.items.forEach((s,a)=>{if(a>=e)r.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(t.slice(i)),c=l&&l.getMap();if(i--,c&&t.appendMap(c,i),l){let u=s.selection&&s.selection.map(t.slice(i));u&&o++;let d=new ms(c.invert(),l,u),p,h=r.length-1;(p=r.length&&r[h].merge(d))?r[h]=p:r.push(d)}}else s.map&&i--},this.items.length,0),new n(LS.from(r.reverse()),o)}};Ec.empty=new Ec(LS.empty,0);function yde(n,e){let t;return n.forEach((i,r)=>{if(i.selection&&e--==0)return t=r,!1}),n.slice(t)}var ms=class n{constructor(e,t,i,r){this.map=e,this.step=t,this.selection=i,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new n(t.getMap().invert(),t,this.selection)}}},gs=class{constructor(e,t,i,r,o){this.done=e,this.undone=t,this.prevRanges=i,this.prevTime=r,this.prevComposition=o}},_de=20;function vde(n,e,t,i){let r=t.getMeta(Tc),o;if(r)return r.historyState;t.getMeta(wde)&&(n=new gs(n.done,n.undone,null,0,-1));let s=t.getMeta("appendedTransaction");if(t.steps.length==0)return n;if(s&&s.getMeta(Tc))return s.getMeta(Tc).redo?new gs(n.done.addTransform(t,void 0,i,gv(e)),n.undone,L5(t.mapping.maps),n.prevTime,n.prevComposition):new gs(n.done,n.undone.addTransform(t,void 0,i,gv(e)),null,n.prevTime,n.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=t.getMeta("composition"),l=n.prevTime==0||!s&&n.prevComposition!=a&&(n.prevTime<(t.time||0)-i.newGroupDelay||!bde(t,n.prevRanges)),c=s?PS(n.prevRanges,t.mapping):L5(t.mapping.maps);return new gs(n.done.addTransform(t,l?e.selection.getBookmark():void 0,i,gv(e)),Ec.empty,c,t.time,a??n.prevComposition)}else return(o=t.getMeta("rebased"))?new gs(n.done.rebased(t,o),n.undone.rebased(t,o),PS(n.prevRanges,t.mapping),n.prevTime,n.prevComposition):new gs(n.done.addMaps(t.mapping.maps),n.undone.addMaps(t.mapping.maps),PS(n.prevRanges,t.mapping),n.prevTime,n.prevComposition)}function bde(n,e){if(!e)return!1;if(!n.docChanged)return!0;let t=!1;return n.mapping.maps[0].forEach((i,r)=>{for(let o=0;o=e[o]&&(t=!0)}),t}function L5(n){let e=[];for(let t=n.length-1;t>=0&&e.length==0;t--)n[t].forEach((i,r,o,s)=>e.push(o,s));return e}function PS(n,e){if(!n)return null;let t=[];for(let i=0;i{let r=Tc.getState(t);if(!r||(n?r.undone:r.done).eventCount==0)return!1;if(i){let o=Cde(r,t,n);o&&i(e?o.scrollIntoView():o)}return!0}}var FS=yv(!1,!0),jS=yv(!0,!0),OWe=yv(!1,!1),AWe=yv(!0,!1);var F5=mt.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:n,dispatch:e})=>FS(n,e),redo:()=>({state:n,dispatch:e})=>jS(n,e)}},addProseMirrorPlugins(){return[R5(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-\u044F":()=>this.editor.commands.undo(),"Shift-Mod-\u044F":()=>this.editor.commands.redo()}}});var j5=at.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:n}){return["hr",Ae(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n,state:e})=>{let{selection:t}=e,{$from:i,$to:r}=t,o=n();return i.parentOffset===0?o.insertContentAt({from:Math.max(i.pos-1,0),to:r.pos},{type:this.name}):O_(t)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({tr:s,dispatch:a})=>{var l;if(a){let{$to:c}=s.selection,u=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?s.setSelection(Re.create(s.doc,c.pos+1)):c.nodeAfter.isBlock?s.setSelection(Se.create(s.doc,c.pos)):s.setSelection(Re.create(s.doc,c.pos));else{let d=(l=c.parent.type.contentMatch.defaultType)===null||l===void 0?void 0:l.create();d&&(s.insert(u,d),s.setSelection(Re.create(s.doc,u+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[A_({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}});var Ide=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,xde=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,Tde=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,Ede=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,V5=vn.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Qr({find:Ide,type:this.type}),Qr({find:Tde,type:this.type})]},addPasteRules(){return[or({find:xde,type:this.type}),or({find:Ede,type:this.type})]}});var B5=at.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ae(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});var Sde=at.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ae(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),z5=vn.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{let t=Md(n,this.type);return Object.entries(t).some(([,r])=>!!r)?!0:e.unsetMark(this.name)}}}}),U5=/^(\d+)\.\s$/,H5=at.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){let i=n,{start:e}=i,t=ca(i,["start"]);return e===1?["ol",Ae(this.options.HTMLAttributes,t),0]:["ol",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Sde.name,this.editor.getAttributes(z5.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=ul({find:U5,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=ul({find:U5,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>I({start:+e[1]},this.editor.getAttributes(z5.name)),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}});var $5=at.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}});var Mde=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Dde=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,W5=vn.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",Ae(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Qr({find:Mde,type:this.type})]},addPasteRules(){return[or({find:Dde,type:this.type})]}});var G5=at.create({name:"text",group:"inline"});var VS=mt.create({name:"starterKit",addExtensions(){var n,e,t,i,r,o,s,a,l,c,u,d,p,h,g,_,v,w;let S=[];return this.options.bold!==!1&&S.push(b5.configure((n=this.options)===null||n===void 0?void 0:n.bold)),this.options.blockquote!==!1&&S.push(v5.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&S.push(I5.configure((t=this.options)===null||t===void 0?void 0:t.bulletList)),this.options.code!==!1&&S.push(x5.configure((i=this.options)===null||i===void 0?void 0:i.code)),this.options.codeBlock!==!1&&S.push(T5.configure((r=this.options)===null||r===void 0?void 0:r.codeBlock)),this.options.document!==!1&&S.push(E5.configure((o=this.options)===null||o===void 0?void 0:o.document)),this.options.dropcursor!==!1&&S.push(M5.configure((s=this.options)===null||s===void 0?void 0:s.dropcursor)),this.options.gapcursor!==!1&&S.push(O5.configure((a=this.options)===null||a===void 0?void 0:a.gapcursor)),this.options.hardBreak!==!1&&S.push(A5.configure((l=this.options)===null||l===void 0?void 0:l.hardBreak)),this.options.heading!==!1&&S.push(k5.configure((c=this.options)===null||c===void 0?void 0:c.heading)),this.options.history!==!1&&S.push(F5.configure((u=this.options)===null||u===void 0?void 0:u.history)),this.options.horizontalRule!==!1&&S.push(j5.configure((d=this.options)===null||d===void 0?void 0:d.horizontalRule)),this.options.italic!==!1&&S.push(V5.configure((p=this.options)===null||p===void 0?void 0:p.italic)),this.options.listItem!==!1&&S.push(B5.configure((h=this.options)===null||h===void 0?void 0:h.listItem)),this.options.orderedList!==!1&&S.push(H5.configure((g=this.options)===null||g===void 0?void 0:g.orderedList)),this.options.paragraph!==!1&&S.push($5.configure((_=this.options)===null||_===void 0?void 0:_.paragraph)),this.options.strike!==!1&&S.push(W5.configure((v=this.options)===null||v===void 0?void 0:v.strike)),this.options.text!==!1&&S.push(G5.configure((w=this.options)===null||w===void 0?void 0:w.text)),S}});var Pn="top",ni="bottom",qn="right",jn="left",_v="auto",fl=[Pn,ni,qn,jn],na="start",Sc="end",q5="clippingParents",vv="viewport",kd="popper",Q5="reference",BS=fl.reduce(function(n,e){return n.concat([e+"-"+na,e+"-"+Sc])},[]),bv=[].concat(fl,[_v]).reduce(function(n,e){return n.concat([e,e+"-"+na,e+"-"+Sc])},[]),Ode="beforeRead",Ade="read",kde="afterRead",Nde="beforeMain",Lde="main",Pde="afterMain",Rde="beforeWrite",Fde="write",jde="afterWrite",K5=[Ode,Ade,kde,Nde,Lde,Pde,Rde,Fde,jde];function ci(n){return n?(n.nodeName||"").toLowerCase():null}function Cn(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function Zr(n){var e=Cn(n).Element;return n instanceof e||n instanceof Element}function ii(n){var e=Cn(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function Nd(n){if(typeof ShadowRoot>"u")return!1;var e=Cn(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function Vde(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},r=e.attributes[t]||{},o=e.elements[t];!ii(o)||!ci(o)||(Object.assign(o.style,i),Object.keys(r).forEach(function(s){var a=r[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function Bde(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var r=e.elements[i],o=e.attributes[i]||{},s=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),a=s.reduce(function(l,c){return l[c]="",l},{});!ii(r)||!ci(r)||(Object.assign(r.style,a),Object.keys(o).forEach(function(l){r.removeAttribute(l)}))})}}var Af={name:"applyStyles",enabled:!0,phase:"write",fn:Vde,effect:Bde,requires:["computeStyles"]};function ui(n){return n.split("-")[0]}var wo=Math.max,Mc=Math.min,ia=Math.round;function Ld(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function kf(){return!/^((?!chrome|android).)*safari/i.test(Ld())}function Jr(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=n.getBoundingClientRect(),r=1,o=1;e&&ii(n)&&(r=n.offsetWidth>0&&ia(i.width)/n.offsetWidth||1,o=n.offsetHeight>0&&ia(i.height)/n.offsetHeight||1);var s=Zr(n)?Cn(n):window,a=s.visualViewport,l=!kf()&&t,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,p=i.height/o;return{width:d,height:p,top:u,right:c+d,bottom:u+p,left:c,x:c,y:u}}function Dc(n){var e=Jr(n),t=n.offsetWidth,i=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:i}}function Nf(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&Nd(t)){var i=e;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Yi(n){return Cn(n).getComputedStyle(n)}function zS(n){return["table","td","th"].indexOf(ci(n))>=0}function _i(n){return((Zr(n)?n.ownerDocument:n.document)||window.document).documentElement}function ra(n){return ci(n)==="html"?n:n.assignedSlot||n.parentNode||(Nd(n)?n.host:null)||_i(n)}function Y5(n){return!ii(n)||Yi(n).position==="fixed"?null:n.offsetParent}function zde(n){var e=/firefox/i.test(Ld()),t=/Trident/i.test(Ld());if(t&&ii(n)){var i=Yi(n);if(i.position==="fixed")return null}var r=ra(n);for(Nd(r)&&(r=r.host);ii(r)&&["html","body"].indexOf(ci(r))<0;){var o=Yi(r);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return r;r=r.parentNode}return null}function Io(n){for(var e=Cn(n),t=Y5(n);t&&zS(t)&&Yi(t).position==="static";)t=Y5(t);return t&&(ci(t)==="html"||ci(t)==="body"&&Yi(t).position==="static")?e:t||zde(n)||e}function Oc(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function Ac(n,e,t){return wo(n,Mc(e,t))}function Z5(n,e,t){var i=Ac(n,e,t);return i>t?t:i}function Lf(){return{top:0,right:0,bottom:0,left:0}}function Pf(n){return Object.assign({},Lf(),n)}function Rf(n,e){return e.reduce(function(t,i){return t[i]=n,t},{})}var Ude=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Pf(typeof e!="number"?e:Rf(e,fl))};function Hde(n){var e,t=n.state,i=n.name,r=n.options,o=t.elements.arrow,s=t.modifiersData.popperOffsets,a=ui(t.placement),l=Oc(a),c=[jn,qn].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!s)){var d=Ude(r.padding,t),p=Dc(o),h=l==="y"?Pn:jn,g=l==="y"?ni:qn,_=t.rects.reference[u]+t.rects.reference[l]-s[l]-t.rects.popper[u],v=s[l]-t.rects.reference[l],w=Io(o),S=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,L=_/2-v/2,T=d[h],q=S-p[u]-d[g],N=S/2-p[u]/2+L,ee=Ac(T,N,q),ge=l;t.modifiersData[i]=(e={},e[ge]=ee,e.centerOffset=ee-N,e)}}function $de(n){var e=n.state,t=n.options,i=t.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||Nf(e.elements.popper,r)&&(e.elements.arrow=r))}var J5={name:"arrow",enabled:!0,phase:"main",fn:Hde,effect:$de,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xr(n){return n.split("-")[1]}var Wde={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gde(n,e){var t=n.x,i=n.y,r=e.devicePixelRatio||1;return{x:ia(t*r)/r||0,y:ia(i*r)/r||0}}function X5(n){var e,t=n.popper,i=n.popperRect,r=n.placement,o=n.variation,s=n.offsets,a=n.position,l=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,d=n.isFixed,p=s.x,h=p===void 0?0:p,g=s.y,_=g===void 0?0:g,v=typeof u=="function"?u({x:h,y:_}):{x:h,y:_};h=v.x,_=v.y;var w=s.hasOwnProperty("x"),S=s.hasOwnProperty("y"),L=jn,T=Pn,q=window;if(c){var N=Io(t),ee="clientHeight",ge="clientWidth";if(N===Cn(t)&&(N=_i(t),Yi(N).position!=="static"&&a==="absolute"&&(ee="scrollHeight",ge="scrollWidth")),N=N,r===Pn||(r===jn||r===qn)&&o===Sc){T=ni;var ce=d&&N===q&&q.visualViewport?q.visualViewport.height:N[ee];_-=ce-i.height,_*=l?1:-1}if(r===jn||(r===Pn||r===ni)&&o===Sc){L=qn;var ze=d&&N===q&&q.visualViewport?q.visualViewport.width:N[ge];h-=ze-i.width,h*=l?1:-1}}var Ot=Object.assign({position:a},c&&Wde),It=u===!0?Gde({x:h,y:_},Cn(t)):{x:h,y:_};if(h=It.x,_=It.y,l){var ve;return Object.assign({},Ot,(ve={},ve[T]=S?"0":"",ve[L]=w?"0":"",ve.transform=(q.devicePixelRatio||1)<=1?"translate("+h+"px, "+_+"px)":"translate3d("+h+"px, "+_+"px, 0)",ve))}return Object.assign({},Ot,(e={},e[T]=S?_+"px":"",e[L]=w?h+"px":"",e.transform="",e))}function qde(n){var e=n.state,t=n.options,i=t.gpuAcceleration,r=i===void 0?!0:i,o=t.adaptive,s=o===void 0?!0:o,a=t.roundOffsets,l=a===void 0?!0:a,c={placement:ui(e.placement),variation:Xr(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,X5(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,X5(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var e6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:qde,data:{}};var Cv={passive:!0};function Qde(n){var e=n.state,t=n.instance,i=n.options,r=i.scroll,o=r===void 0?!0:r,s=i.resize,a=s===void 0?!0:s,l=Cn(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",t.update,Cv)}),a&&l.addEventListener("resize",t.update,Cv),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",t.update,Cv)}),a&&l.removeEventListener("resize",t.update,Cv)}}var t6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Qde,data:{}};var Kde={left:"right",right:"left",bottom:"top",top:"bottom"};function Pd(n){return n.replace(/left|right|bottom|top/g,function(e){return Kde[e]})}var Yde={start:"end",end:"start"};function wv(n){return n.replace(/start|end/g,function(e){return Yde[e]})}function kc(n){var e=Cn(n),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function Nc(n){return Jr(_i(n)).left+kc(n).scrollLeft}function US(n,e){var t=Cn(n),i=_i(n),r=t.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=kf();(c||!c&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+Nc(n),y:l}}function HS(n){var e,t=_i(n),i=kc(n),r=(e=n.ownerDocument)==null?void 0:e.body,o=wo(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=wo(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+Nc(n),l=-i.scrollTop;return Yi(r||t).direction==="rtl"&&(a+=wo(t.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function Lc(n){var e=Yi(n),t=e.overflow,i=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+r+i)}function Iv(n){return["html","body","#document"].indexOf(ci(n))>=0?n.ownerDocument.body:ii(n)&&Lc(n)?n:Iv(ra(n))}function ml(n,e){var t;e===void 0&&(e=[]);var i=Iv(n),r=i===((t=n.ownerDocument)==null?void 0:t.body),o=Cn(i),s=r?[o].concat(o.visualViewport||[],Lc(i)?i:[]):i,a=e.concat(s);return r?a:a.concat(ml(ra(s)))}function Rd(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Zde(n,e){var t=Jr(n,!1,e==="fixed");return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function n6(n,e,t){return e===vv?Rd(US(n,t)):Zr(e)?Zde(e,t):Rd(HS(_i(n)))}function Jde(n){var e=ml(ra(n)),t=["absolute","fixed"].indexOf(Yi(n).position)>=0,i=t&&ii(n)?Io(n):n;return Zr(i)?e.filter(function(r){return Zr(r)&&Nf(r,i)&&ci(r)!=="body"}):[]}function $S(n,e,t,i){var r=e==="clippingParents"?Jde(n):[].concat(e),o=[].concat(r,[t]),s=o[0],a=o.reduce(function(l,c){var u=n6(n,c,i);return l.top=wo(u.top,l.top),l.right=Mc(u.right,l.right),l.bottom=Mc(u.bottom,l.bottom),l.left=wo(u.left,l.left),l},n6(n,s,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Ff(n){var e=n.reference,t=n.element,i=n.placement,r=i?ui(i):null,o=i?Xr(i):null,s=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2,l;switch(r){case Pn:l={x:s,y:e.y-t.height};break;case ni:l={x:s,y:e.y+e.height};break;case qn:l={x:e.x+e.width,y:a};break;case jn:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=r?Oc(r):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case na:l[c]=l[c]-(e[u]/2-t[u]/2);break;case Sc:l[c]=l[c]+(e[u]/2-t[u]/2);break;default:}}return l}function xo(n,e){e===void 0&&(e={});var t=e,i=t.placement,r=i===void 0?n.placement:i,o=t.strategy,s=o===void 0?n.strategy:o,a=t.boundary,l=a===void 0?q5:a,c=t.rootBoundary,u=c===void 0?vv:c,d=t.elementContext,p=d===void 0?kd:d,h=t.altBoundary,g=h===void 0?!1:h,_=t.padding,v=_===void 0?0:_,w=Pf(typeof v!="number"?v:Rf(v,fl)),S=p===kd?Q5:kd,L=n.rects.popper,T=n.elements[g?S:p],q=$S(Zr(T)?T:T.contextElement||_i(n.elements.popper),l,u,s),N=Jr(n.elements.reference),ee=Ff({reference:N,element:L,strategy:"absolute",placement:r}),ge=Rd(Object.assign({},L,ee)),ce=p===kd?ge:N,ze={top:q.top-ce.top+w.top,bottom:ce.bottom-q.bottom+w.bottom,left:q.left-ce.left+w.left,right:ce.right-q.right+w.right},Ot=n.modifiersData.offset;if(p===kd&&Ot){var It=Ot[r];Object.keys(ze).forEach(function(ve){var Ve=[qn,ni].indexOf(ve)>=0?1:-1,z=[Pn,ni].indexOf(ve)>=0?"y":"x";ze[ve]+=It[z]*Ve})}return ze}function WS(n,e){e===void 0&&(e={});var t=e,i=t.placement,r=t.boundary,o=t.rootBoundary,s=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?bv:l,u=Xr(i),d=u?a?BS:BS.filter(function(g){return Xr(g)===u}):fl,p=d.filter(function(g){return c.indexOf(g)>=0});p.length===0&&(p=d);var h=p.reduce(function(g,_){return g[_]=xo(n,{placement:_,boundary:r,rootBoundary:o,padding:s})[ui(_)],g},{});return Object.keys(h).sort(function(g,_){return h[g]-h[_]})}function Xde(n){if(ui(n)===_v)return[];var e=Pd(n);return[wv(n),e,wv(e)]}function epe(n){var e=n.state,t=n.options,i=n.name;if(!e.modifiersData[i]._skip){for(var r=t.mainAxis,o=r===void 0?!0:r,s=t.altAxis,a=s===void 0?!0:s,l=t.fallbackPlacements,c=t.padding,u=t.boundary,d=t.rootBoundary,p=t.altBoundary,h=t.flipVariations,g=h===void 0?!0:h,_=t.allowedAutoPlacements,v=e.options.placement,w=ui(v),S=w===v,L=l||(S||!g?[Pd(v)]:Xde(v)),T=[v].concat(L).reduce(function(dt,Bn){return dt.concat(ui(Bn)===_v?WS(e,{placement:Bn,boundary:u,rootBoundary:d,padding:c,flipVariations:g,allowedAutoPlacements:_}):Bn)},[]),q=e.rects.reference,N=e.rects.popper,ee=new Map,ge=!0,ce=T[0],ze=0;ze=0,z=Ve?"width":"height",U=xo(e,{placement:Ot,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),H=Ve?ve?qn:jn:ve?ni:Pn;q[z]>N[z]&&(H=Pd(H));var Q=Pd(H),de=[];if(o&&de.push(U[It]<=0),a&&de.push(U[H]<=0,U[Q]<=0),de.every(function(dt){return dt})){ce=Ot,ge=!1;break}ee.set(Ot,de)}if(ge)for(var te=g?3:1,lt=function(Bn){var no=T.find(function(In){var di=ee.get(In);if(di)return di.slice(0,Bn).every(function(Kn){return Kn})});if(no)return ce=no,"break"},it=te;it>0;it--){var Ut=lt(it);if(Ut==="break")break}e.placement!==ce&&(e.modifiersData[i]._skip=!0,e.placement=ce,e.reset=!0)}}var i6={name:"flip",enabled:!0,phase:"main",fn:epe,requiresIfExists:["offset"],data:{_skip:!1}};function r6(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function o6(n){return[Pn,qn,ni,jn].some(function(e){return n[e]>=0})}function tpe(n){var e=n.state,t=n.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=xo(e,{elementContext:"reference"}),a=xo(e,{altBoundary:!0}),l=r6(s,i),c=r6(a,r,o),u=o6(l),d=o6(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var s6={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:tpe};function npe(n,e,t){var i=ui(n),r=[jn,Pn].indexOf(i)>=0?-1:1,o=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[jn,qn].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}function ipe(n){var e=n.state,t=n.options,i=n.name,r=t.offset,o=r===void 0?[0,0]:r,s=bv.reduce(function(u,d){return u[d]=npe(d,e.rects,o),u},{}),a=s[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=s}var a6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ipe};function rpe(n){var e=n.state,t=n.name;e.modifiersData[t]=Ff({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var l6={name:"popperOffsets",enabled:!0,phase:"read",fn:rpe,data:{}};function GS(n){return n==="x"?"y":"x"}function ope(n){var e=n.state,t=n.options,i=n.name,r=t.mainAxis,o=r===void 0?!0:r,s=t.altAxis,a=s===void 0?!1:s,l=t.boundary,c=t.rootBoundary,u=t.altBoundary,d=t.padding,p=t.tether,h=p===void 0?!0:p,g=t.tetherOffset,_=g===void 0?0:g,v=xo(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),w=ui(e.placement),S=Xr(e.placement),L=!S,T=Oc(w),q=GS(T),N=e.modifiersData.popperOffsets,ee=e.rects.reference,ge=e.rects.popper,ce=typeof _=="function"?_(Object.assign({},e.rects,{placement:e.placement})):_,ze=typeof ce=="number"?{mainAxis:ce,altAxis:ce}:Object.assign({mainAxis:0,altAxis:0},ce),Ot=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,It={x:0,y:0};if(N){if(o){var ve,Ve=T==="y"?Pn:jn,z=T==="y"?ni:qn,U=T==="y"?"height":"width",H=N[T],Q=H+v[Ve],de=H-v[z],te=h?-ge[U]/2:0,lt=S===na?ee[U]:ge[U],it=S===na?-ge[U]:-ee[U],Ut=e.elements.arrow,dt=h&&Ut?Dc(Ut):{width:0,height:0},Bn=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Lf(),no=Bn[Ve],In=Bn[z],di=Ac(0,ee[U],dt[U]),Kn=L?ee[U]/2-te-di-no-ze.mainAxis:lt-di-no-ze.mainAxis,ar=L?-ee[U]/2+te+di+In+ze.mainAxis:it+di+In+ze.mainAxis,So=e.elements.arrow&&Io(e.elements.arrow),Uf=So?T==="y"?So.clientTop||0:So.clientLeft||0:0,Kd=(ve=Ot?.[T])!=null?ve:0,Hf=H+Kn-Kd-Uf,$f=H+ar-Kd,Yd=Ac(h?Mc(Q,Hf):Q,H,h?wo(de,$f):de);N[T]=Yd,It[T]=Yd-H}if(a){var Zd,Wf=T==="x"?Pn:jn,Gf=T==="x"?ni:qn,bs=N[q],la=q==="y"?"height":"width",Jd=bs+v[Wf],vl=bs-v[Gf],Xd=[Pn,jn].indexOf(w)!==-1,qf=(Zd=Ot?.[q])!=null?Zd:0,Qf=Xd?Jd:bs-ee[la]-ge[la]-qf+ze.altAxis,Kf=Xd?bs+ee[la]+ge[la]-qf-ze.altAxis:vl,Yf=h&&Xd?Z5(Qf,bs,Kf):Ac(h?Qf:Jd,bs,h?Kf:vl);N[q]=Yf,It[q]=Yf-bs}e.modifiersData[i]=It}}var c6={name:"preventOverflow",enabled:!0,phase:"main",fn:ope,requiresIfExists:["offset"]};function qS(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function QS(n){return n===Cn(n)||!ii(n)?kc(n):qS(n)}function spe(n){var e=n.getBoundingClientRect(),t=ia(e.width)/n.offsetWidth||1,i=ia(e.height)/n.offsetHeight||1;return t!==1||i!==1}function KS(n,e,t){t===void 0&&(t=!1);var i=ii(e),r=ii(e)&&spe(e),o=_i(e),s=Jr(n,r,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((ci(e)!=="body"||Lc(o))&&(a=QS(e)),ii(e)?(l=Jr(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Nc(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function ape(n){var e=new Map,t=new Set,i=[];n.forEach(function(o){e.set(o.name,o)});function r(o){t.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&r(l)}}),i.push(o)}return n.forEach(function(o){t.has(o.name)||r(o)}),i}function YS(n){var e=ape(n);return K5.reduce(function(t,i){return t.concat(e.filter(function(r){return r.phase===i}))},[])}function ZS(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function JS(n){var e=n.reduce(function(t,i){var r=t[i.name];return t[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var u6={placement:"bottom",modifiers:[],strategy:"absolute"};function d6(){for(var n=arguments.length,e=new Array(n),t=0;t-1}function E6(n,e){return typeof n=="function"?n.apply(void 0,e):n}function h6(n,e){if(e===0)return n;var t;return function(i){clearTimeout(t),t=setTimeout(function(){n(i)},e)}}function dpe(n){return n.split(/\s+/).filter(Boolean)}function Fd(n){return[].concat(n)}function f6(n,e){n.indexOf(e)===-1&&n.push(e)}function ppe(n){return n.filter(function(e,t){return n.indexOf(e)===t})}function hpe(n){return n.split("-")[0]}function Tv(n){return[].slice.call(n)}function m6(n){return Object.keys(n).reduce(function(e,t){return n[t]!==void 0&&(e[t]=n[t]),e},{})}function jf(){return document.createElement("div")}function Ev(n){return["Element","Fragment"].some(function(e){return sM(n,e)})}function fpe(n){return sM(n,"NodeList")}function mpe(n){return sM(n,"MouseEvent")}function gpe(n){return!!(n&&n._tippy&&n._tippy.reference===n)}function ype(n){return Ev(n)?[n]:fpe(n)?Tv(n):Array.isArray(n)?n:Tv(document.querySelectorAll(n))}function tM(n,e){n.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function g6(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function _pe(n){var e,t=Fd(n),i=t[0];return i!=null&&(e=i.ownerDocument)!=null&&e.body?i.ownerDocument:document}function vpe(n,e){var t=e.clientX,i=e.clientY;return n.every(function(r){var o=r.popperRect,s=r.popperState,a=r.props,l=a.interactiveBorder,c=hpe(s.placement),u=s.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,p=c==="top"?u.bottom.y:0,h=c==="right"?u.left.x:0,g=c==="left"?u.right.x:0,_=o.top-i+d>l,v=i-o.bottom-p>l,w=o.left-t+h>l,S=t-o.right-g>l;return _||v||w||S})}function nM(n,e,t){var i=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){n[i](r,t)})}function y6(n,e){for(var t=e;t;){var i;if(n.contains(t))return!0;t=t.getRootNode==null||(i=t.getRootNode())==null?void 0:i.host}return!1}var ys={isTouch:!1},_6=0;function bpe(){ys.isTouch||(ys.isTouch=!0,window.performance&&document.addEventListener("mousemove",S6))}function S6(){var n=performance.now();n-_6<20&&(ys.isTouch=!1,document.removeEventListener("mousemove",S6)),_6=n}function Cpe(){var n=document.activeElement;if(gpe(n)){var e=n._tippy;n.blur&&!e.state.isVisible&&n.blur()}}function wpe(){document.addEventListener("touchstart",bpe,Pc),window.addEventListener("blur",Cpe)}var Ipe=typeof window<"u"&&typeof document<"u",xpe=Ipe?!!window.msCrypto:!1;var Tpe={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Epe={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},To=Object.assign({appendTo:T6,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Tpe,Epe),Spe=Object.keys(To),Mpe=function(e){var t=Object.keys(e);t.forEach(function(i){To[i]=e[i]})};function M6(n){var e=n.plugins||[],t=e.reduce(function(i,r){var o=r.name,s=r.defaultValue;if(o){var a;i[o]=n[o]!==void 0?n[o]:(a=To[o])!=null?a:s}return i},{});return Object.assign({},n,t)}function Dpe(n,e){var t=e?Object.keys(M6(Object.assign({},To,{plugins:e}))):Spe,i=t.reduce(function(r,o){var s=(n.getAttribute("data-tippy-"+o)||"").trim();if(!s)return r;if(o==="content")r[o]=s;else try{r[o]=JSON.parse(s)}catch{r[o]=s}return r},{});return i}function v6(n,e){var t=Object.assign({},e,{content:E6(e.content,[n])},e.ignoreAttributes?{}:Dpe(n,e.plugins));return t.aria=Object.assign({},To.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}var Ope=function(){return"innerHTML"};function rM(n,e){n[Ope()]=e}function b6(n){var e=jf();return n===!0?e.className=I6:(e.className=x6,Ev(n)?e.appendChild(n):rM(e,n)),e}function C6(n,e){Ev(e.content)?(rM(n,""),n.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?rM(n,e.content):n.textContent=e.content)}function oM(n){var e=n.firstElementChild,t=Tv(e.children);return{box:e,content:t.find(function(i){return i.classList.contains(w6)}),arrow:t.find(function(i){return i.classList.contains(I6)||i.classList.contains(x6)}),backdrop:t.find(function(i){return i.classList.contains(upe)})}}function D6(n){var e=jf(),t=jf();t.className=cpe,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var i=jf();i.className=w6,i.setAttribute("data-state","hidden"),C6(i,n.props),e.appendChild(t),t.appendChild(i),r(n.props,n.props);function r(o,s){var a=oM(e),l=a.box,c=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),typeof s.animation=="string"?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&C6(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(b6(s.arrow))):l.appendChild(b6(s.arrow)):u&&l.removeChild(u)}return{popper:e,onUpdate:r}}D6.$$tippy=!0;var Ape=1,xv=[],iM=[];function kpe(n,e){var t=v6(n,Object.assign({},To,M6(m6(e)))),i,r,o,s=!1,a=!1,l=!1,c=!1,u,d,p,h=[],g=h6(Hf,t.interactiveDebounce),_,v=Ape++,w=null,S=ppe(t.plugins),L={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},T={id:v,reference:n,popper:jf(),popperInstance:w,props:t,state:L,plugins:S,clearDelayTimeouts:Qf,setProps:Kf,setContent:Yf,show:W8,hide:G8,hideWithInteractivity:q8,enable:Xd,disable:qf,unmount:Q8,destroy:K8};if(!t.render)return T;var q=t.render(T),N=q.popper,ee=q.onUpdate;N.setAttribute("data-tippy-root",""),N.id="tippy-"+T.id,T.popper=N,n._tippy=T,N._tippy=T;var ge=S.map(function(Y){return Y.fn(T)}),ce=n.hasAttribute("aria-expanded");return So(),te(),H(),Q("onCreate",[T]),t.showOnCreate&&Jd(),N.addEventListener("mouseenter",function(){T.props.interactive&&T.state.isVisible&&T.clearDelayTimeouts()}),N.addEventListener("mouseleave",function(){T.props.interactive&&T.props.trigger.indexOf("mouseenter")>=0&&Ve().addEventListener("mousemove",g)}),T;function ze(){var Y=T.props.touch;return Array.isArray(Y)?Y:[Y,0]}function Ot(){return ze()[0]==="hold"}function It(){var Y;return!!((Y=T.props.render)!=null&&Y.$$tippy)}function ve(){return _||n}function Ve(){var Y=ve().parentNode;return Y?_pe(Y):document}function z(){return oM(N)}function U(Y){return T.state.isMounted&&!T.state.isVisible||ys.isTouch||u&&u.type==="focus"?0:eM(T.props.delay,Y?0:1,To.delay)}function H(Y){Y===void 0&&(Y=!1),N.style.pointerEvents=T.props.interactive&&!Y?"":"none",N.style.zIndex=""+T.props.zIndex}function Q(Y,Fe,rt){if(rt===void 0&&(rt=!0),ge.forEach(function(Ht){Ht[Y]&&Ht[Y].apply(Ht,Fe)}),rt){var nn;(nn=T.props)[Y].apply(nn,Fe)}}function de(){var Y=T.props.aria;if(Y.content){var Fe="aria-"+Y.content,rt=N.id,nn=Fd(T.props.triggerTarget||n);nn.forEach(function(Ht){var Fi=Ht.getAttribute(Fe);if(T.state.isVisible)Ht.setAttribute(Fe,Fi?Fi+" "+rt:rt);else{var Cr=Fi&&Fi.replace(rt,"").trim();Cr?Ht.setAttribute(Fe,Cr):Ht.removeAttribute(Fe)}})}}function te(){if(!(ce||!T.props.aria.expanded)){var Y=Fd(T.props.triggerTarget||n);Y.forEach(function(Fe){T.props.interactive?Fe.setAttribute("aria-expanded",T.state.isVisible&&Fe===ve()?"true":"false"):Fe.removeAttribute("aria-expanded")})}}function lt(){Ve().removeEventListener("mousemove",g),xv=xv.filter(function(Y){return Y!==g})}function it(Y){if(!(ys.isTouch&&(l||Y.type==="mousedown"))){var Fe=Y.composedPath&&Y.composedPath()[0]||Y.target;if(!(T.props.interactive&&y6(N,Fe))){if(Fd(T.props.triggerTarget||n).some(function(rt){return y6(rt,Fe)})){if(ys.isTouch||T.state.isVisible&&T.props.trigger.indexOf("click")>=0)return}else Q("onClickOutside",[T,Y]);T.props.hideOnClick===!0&&(T.clearDelayTimeouts(),T.hide(),a=!0,setTimeout(function(){a=!1}),T.state.isMounted||no())}}}function Ut(){l=!0}function dt(){l=!1}function Bn(){var Y=Ve();Y.addEventListener("mousedown",it,!0),Y.addEventListener("touchend",it,Pc),Y.addEventListener("touchstart",dt,Pc),Y.addEventListener("touchmove",Ut,Pc)}function no(){var Y=Ve();Y.removeEventListener("mousedown",it,!0),Y.removeEventListener("touchend",it,Pc),Y.removeEventListener("touchstart",dt,Pc),Y.removeEventListener("touchmove",Ut,Pc)}function In(Y,Fe){Kn(Y,function(){!T.state.isVisible&&N.parentNode&&N.parentNode.contains(N)&&Fe()})}function di(Y,Fe){Kn(Y,Fe)}function Kn(Y,Fe){var rt=z().box;function nn(Ht){Ht.target===rt&&(nM(rt,"remove",nn),Fe())}if(Y===0)return Fe();nM(rt,"remove",d),nM(rt,"add",nn),d=nn}function ar(Y,Fe,rt){rt===void 0&&(rt=!1);var nn=Fd(T.props.triggerTarget||n);nn.forEach(function(Ht){Ht.addEventListener(Y,Fe,rt),h.push({node:Ht,eventType:Y,handler:Fe,options:rt})})}function So(){Ot()&&(ar("touchstart",Kd,{passive:!0}),ar("touchend",$f,{passive:!0})),dpe(T.props.trigger).forEach(function(Y){if(Y!=="manual")switch(ar(Y,Kd),Y){case"mouseenter":ar("mouseleave",$f);break;case"focus":ar(xpe?"focusout":"blur",Yd);break;case"focusin":ar("focusout",Yd);break}})}function Uf(){h.forEach(function(Y){var Fe=Y.node,rt=Y.eventType,nn=Y.handler,Ht=Y.options;Fe.removeEventListener(rt,nn,Ht)}),h=[]}function Kd(Y){var Fe,rt=!1;if(!(!T.state.isEnabled||Zd(Y)||a)){var nn=((Fe=u)==null?void 0:Fe.type)==="focus";u=Y,_=Y.currentTarget,te(),!T.state.isVisible&&mpe(Y)&&xv.forEach(function(Ht){return Ht(Y)}),Y.type==="click"&&(T.props.trigger.indexOf("mouseenter")<0||s)&&T.props.hideOnClick!==!1&&T.state.isVisible?rt=!0:Jd(Y),Y.type==="click"&&(s=!rt),rt&&!nn&&vl(Y)}}function Hf(Y){var Fe=Y.target,rt=ve().contains(Fe)||N.contains(Fe);if(!(Y.type==="mousemove"&&rt)){var nn=la().concat(N).map(function(Ht){var Fi,Cr=Ht._tippy,jc=(Fi=Cr.popperInstance)==null?void 0:Fi.state;return jc?{popperRect:Ht.getBoundingClientRect(),popperState:jc,props:t}:null}).filter(Boolean);vpe(nn,Y)&&(lt(),vl(Y))}}function $f(Y){var Fe=Zd(Y)||T.props.trigger.indexOf("click")>=0&&s;if(!Fe){if(T.props.interactive){T.hideWithInteractivity(Y);return}vl(Y)}}function Yd(Y){T.props.trigger.indexOf("focusin")<0&&Y.target!==ve()||T.props.interactive&&Y.relatedTarget&&N.contains(Y.relatedTarget)||vl(Y)}function Zd(Y){return ys.isTouch?Ot()!==Y.type.indexOf("touch")>=0:!1}function Wf(){Gf();var Y=T.props,Fe=Y.popperOptions,rt=Y.placement,nn=Y.offset,Ht=Y.getReferenceClientRect,Fi=Y.moveTransition,Cr=It()?oM(N).arrow:null,jc=Ht?{getBoundingClientRect:Ht,contextElement:Ht.contextElement||ve()}:n,XM={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Zf){var Vc=Zf.state;if(It()){var Y8=z(),Zv=Y8.box;["placement","reference-hidden","escaped"].forEach(function(Jf){Jf==="placement"?Zv.setAttribute("data-placement",Vc.placement):Vc.attributes.popper["data-popper-"+Jf]?Zv.setAttribute("data-"+Jf,""):Zv.removeAttribute("data-"+Jf)}),Vc.attributes.popper={}}}},bl=[{name:"offset",options:{offset:nn}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Fi}},XM];It()&&Cr&&bl.push({name:"arrow",options:{element:Cr,padding:3}}),bl.push.apply(bl,Fe?.modifiers||[]),T.popperInstance=XS(jc,N,Object.assign({},Fe,{placement:rt,onFirstUpdate:p,modifiers:bl}))}function Gf(){T.popperInstance&&(T.popperInstance.destroy(),T.popperInstance=null)}function bs(){var Y=T.props.appendTo,Fe,rt=ve();T.props.interactive&&Y===T6||Y==="parent"?Fe=rt.parentNode:Fe=E6(Y,[rt]),Fe.contains(N)||Fe.appendChild(N),T.state.isMounted=!0,Wf()}function la(){return Tv(N.querySelectorAll("[data-tippy-root]"))}function Jd(Y){T.clearDelayTimeouts(),Y&&Q("onTrigger",[T,Y]),Bn();var Fe=U(!0),rt=ze(),nn=rt[0],Ht=rt[1];ys.isTouch&&nn==="hold"&&Ht&&(Fe=Ht),Fe?i=setTimeout(function(){T.show()},Fe):T.show()}function vl(Y){if(T.clearDelayTimeouts(),Q("onUntrigger",[T,Y]),!T.state.isVisible){no();return}if(!(T.props.trigger.indexOf("mouseenter")>=0&&T.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(Y.type)>=0&&s)){var Fe=U(!1);Fe?r=setTimeout(function(){T.state.isVisible&&T.hide()},Fe):o=requestAnimationFrame(function(){T.hide()})}}function Xd(){T.state.isEnabled=!0}function qf(){T.hide(),T.state.isEnabled=!1}function Qf(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)}function Kf(Y){if(!T.state.isDestroyed){Q("onBeforeUpdate",[T,Y]),Uf();var Fe=T.props,rt=v6(n,Object.assign({},Fe,m6(Y),{ignoreAttributes:!0}));T.props=rt,So(),Fe.interactiveDebounce!==rt.interactiveDebounce&&(lt(),g=h6(Hf,rt.interactiveDebounce)),Fe.triggerTarget&&!rt.triggerTarget?Fd(Fe.triggerTarget).forEach(function(nn){nn.removeAttribute("aria-expanded")}):rt.triggerTarget&&n.removeAttribute("aria-expanded"),te(),H(),ee&&ee(Fe,rt),T.popperInstance&&(Wf(),la().forEach(function(nn){requestAnimationFrame(nn._tippy.popperInstance.forceUpdate)})),Q("onAfterUpdate",[T,Y])}}function Yf(Y){T.setProps({content:Y})}function W8(){var Y=T.state.isVisible,Fe=T.state.isDestroyed,rt=!T.state.isEnabled,nn=ys.isTouch&&!T.props.touch,Ht=eM(T.props.duration,0,To.duration);if(!(Y||Fe||rt||nn)&&!ve().hasAttribute("disabled")&&(Q("onShow",[T],!1),T.props.onShow(T)!==!1)){if(T.state.isVisible=!0,It()&&(N.style.visibility="visible"),H(),Bn(),T.state.isMounted||(N.style.transition="none"),It()){var Fi=z(),Cr=Fi.box,jc=Fi.content;tM([Cr,jc],0)}p=function(){var bl;if(!(!T.state.isVisible||c)){if(c=!0,N.offsetHeight,N.style.transition=T.props.moveTransition,It()&&T.props.animation){var Yv=z(),Zf=Yv.box,Vc=Yv.content;tM([Zf,Vc],Ht),g6([Zf,Vc],"visible")}de(),te(),f6(iM,T),(bl=T.popperInstance)==null||bl.forceUpdate(),Q("onMount",[T]),T.props.animation&&It()&&di(Ht,function(){T.state.isShown=!0,Q("onShown",[T])})}},bs()}}function G8(){var Y=!T.state.isVisible,Fe=T.state.isDestroyed,rt=!T.state.isEnabled,nn=eM(T.props.duration,1,To.duration);if(!(Y||Fe||rt)&&(Q("onHide",[T],!1),T.props.onHide(T)!==!1)){if(T.state.isVisible=!1,T.state.isShown=!1,c=!1,s=!1,It()&&(N.style.visibility="hidden"),lt(),no(),H(!0),It()){var Ht=z(),Fi=Ht.box,Cr=Ht.content;T.props.animation&&(tM([Fi,Cr],nn),g6([Fi,Cr],"hidden"))}de(),te(),T.props.animation?It()&&In(nn,T.unmount):T.unmount()}}function q8(Y){Ve().addEventListener("mousemove",g),f6(xv,g),g(Y)}function Q8(){T.state.isVisible&&T.hide(),T.state.isMounted&&(Gf(),la().forEach(function(Y){Y._tippy.unmount()}),N.parentNode&&N.parentNode.removeChild(N),iM=iM.filter(function(Y){return Y!==T}),T.state.isMounted=!1,Q("onHidden",[T]))}function K8(){T.state.isDestroyed||(T.clearDelayTimeouts(),T.unmount(),Uf(),delete n._tippy,T.state.isDestroyed=!0,Q("onDestroy",[T]))}}function Vf(n,e){e===void 0&&(e={});var t=To.plugins.concat(e.plugins||[]);wpe();var i=Object.assign({},e,{plugins:t}),r=ype(n);if(0)var o,s;var a=r.reduce(function(l,c){var u=c&&kpe(c,i);return u&&l.push(u),l},[]);return Ev(n)?a[0]:a}Vf.defaultProps=To;Vf.setDefaultProps=Mpe;Vf.currentInput=ys;var gYe=Object.assign({},Af,{effect:function(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow)}});Vf.setDefaultProps({render:D6});var Pi=Vf;function Npe(n){var e;let{char:t,allowSpaces:i,allowedPrefixes:r,startOfLine:o,$position:s}=n,a=WF(t),l=new RegExp(`\\s${a}$`),c=o?"^":"",u=i?new RegExp(`${c}${a}.*?(?=\\s${a}|$)`,"gm"):new RegExp(`${c}(?:^)?${a}[^\\s${a}]*`,"gm"),d=((e=s.nodeBefore)===null||e===void 0?void 0:e.isText)&&s.nodeBefore.text;if(!d)return null;let p=s.pos-d.length,h=Array.from(d.matchAll(u)).pop();if(!h||h.input===void 0||h.index===void 0)return null;let g=h.input.slice(Math.max(0,h.index-1),h.index),_=new RegExp(`^[${r?.join("")}\0]?$`).test(g);if(r!==null&&!_)return null;let v=p+h.index,w=v+h[0].length;return i&&l.test(d.slice(w-1,w+1))&&(h[0]+=" ",w+=1),v=s.pos?{range:{from:v,to:w},query:h[0].slice(t.length),text:h[0]}:null}var Lpe=new Be("suggestion");function O6({pluginKey:n=Lpe,editor:e,char:t="@",allowSpaces:i=!1,allowedPrefixes:r=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:a="suggestion",command:l=()=>null,items:c=()=>[],render:u=()=>({}),allow:d=()=>!0,findSuggestionMatch:p=Npe}){let h,g=u?.(),_=new Le({key:n,view(){return{update:(v,w)=>ji(this,null,function*(){var S,L,T,q,N,ee,ge;let ce=(S=this.key)===null||S===void 0?void 0:S.getState(w),ze=(L=this.key)===null||L===void 0?void 0:L.getState(v.state),Ot=ce.active&&ze.active&&ce.range.from!==ze.range.from,It=!ce.active&&ze.active,ve=ce.active&&!ze.active,Ve=!It&&!ve&&ce.query!==ze.query,z=It,U=Ve||Ot,H=ve;if(!z&&!U&&!H)return;let Q=H&&!z?ce:ze,de=v.dom.querySelector(`[data-decoration-id="${Q.decorationId}"]`);h={editor:e,range:Q.range,query:Q.query,text:Q.text,items:[],command:te=>l({editor:e,range:Q.range,props:te}),decorationNode:de,clientRect:de?()=>{var te;let{decorationId:lt}=(te=this.key)===null||te===void 0?void 0:te.getState(e.state),it=v.dom.querySelector(`[data-decoration-id="${lt}"]`);return it?.getBoundingClientRect()||null}:null},z&&((T=g?.onBeforeStart)===null||T===void 0||T.call(g,h)),U&&((q=g?.onBeforeUpdate)===null||q===void 0||q.call(g,h)),(U||z)&&(h.items=yield c({editor:e,query:Q.query})),H&&((N=g?.onExit)===null||N===void 0||N.call(g,h)),U&&((ee=g?.onUpdate)===null||ee===void 0||ee.call(g,h)),z&&((ge=g?.onStart)===null||ge===void 0||ge.call(g,h))}),destroy:()=>{var v;h&&((v=g?.onExit)===null||v===void 0||v.call(g,h))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(v,w,S,L){let{isEditable:T}=e,{composing:q}=e.view,{selection:N}=v,{empty:ee,from:ge}=N,ce=I({},w);if(ce.composing=q,T&&(ee||e.view.composing)){(gew.range.to)&&!q&&!w.composing&&(ce.active=!1);let ze=p({char:t,allowSpaces:i,allowedPrefixes:r,startOfLine:o,$position:N.$from}),Ot=`id_${Math.floor(Math.random()*4294967295)}`;ze&&d({editor:e,state:L,range:ze.range,isActive:w.active})?(ce.active=!0,ce.decorationId=w.decorationId?w.decorationId:Ot,ce.range=ze.range,ce.query=ze.query,ce.text=ze.text):ce.active=!1}else ce.active=!1;return ce.active||(ce.decorationId=null,ce.range={from:0,to:0},ce.query=null,ce.text=null),ce}},props:{handleKeyDown(v,w){var S;let{active:L,range:T}=_.getState(v.state);return L&&((S=g?.onKeyDown)===null||S===void 0?void 0:S.call(g,{view:v,event:w,range:T}))||!1},decorations(v){let{active:w,range:S,decorationId:L}=_.getState(v);return w?pn.create(v.doc,[An.inline(S.from,S.to,{nodeName:s,class:a,"data-decoration-id":L})]):null}}});return _}var Ppe=()=>({padding:".75rem 2rem",borderRadius:"2px"});function Rpe(n,e){if(n&1){let t=$();b(0,"button",2),P("mousedown",function(){M(t);let r=y();return D(r.back.emit())}),C()}n&2&&En(St(2,Ppe))}var Sv=(()=>{let e=class e{constructor(){this.title="No Results",this.showBackBtn=!1,this.back=new j}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-empty-message"]],inputs:{title:"title",showBackBtn:"showBackBtn"},outputs:{back:"back"},decls:2,vars:2,consts:[[3,"innerHTML"],["pButton","","label","Back","type","submit",1,"p-button-outlined",3,"style"],["pButton","","label","Back","type","submit",1,"p-button-outlined",3,"mousedown"]],template:function(r,o){r&1&&(E(0,"p",0),x(1,Rpe,1,3,"button",1)),r&2&&(f("innerHTML",o.title,Go),m(),we(o.showBackBtn?1:-1))},dependencies:[zt],styles:["[_nghost-%COMP%]{align-items:center;flex-direction:column;display:flex;justify-content:center;padding:16px;height:240px}"]});let n=e;return n})();function jpe(n,e){if(n&1&&(b(0,"i",1),Z(1),C()),n&2){let t=y();m(),Pe(t.url)}}function Vpe(n,e){if(n&1&&E(0,"dot-contentlet-thumbnail",5),n&2){let t=y(2);f("contentlet",t.data.contentlet)("width",42)("height",42)("iconSize","42px")}}function Bpe(n,e){if(n&1&&E(0,"img",6),n&2){let t=y(2);f("src",t.url,zi)}}function zpe(n,e){if(n&1&&x(0,Vpe,1,4,"dot-contentlet-thumbnail",5)(1,Bpe,1,1,"img",6),n&2){let t=y();we(t.data!=null&&t.data.contentlet?0:1)}}function Upe(n,e){if(n&1&&(b(0,"span",3),Z(1),C()),n&2){let t=y();m(),Pe(t.data.contentlet.url)}}function Hpe(n,e){if(n&1&&(b(0,"div",4),E(1,"dot-state-icon",7),b(2,"dot-badge",8),Z(3),ht(4,"lowercase"),C()()),n&2){let t=y();m(),f("state",t.data.contentlet),m(2),Pe(ft(4,2,t.data.contentlet.language))}}var jd=(()=>{let e=class e{constructor(i){this.element=i,this.role="list-item",this.tabindex="-1",this.disabled=!1,this.label="",this.url="",this.page=!1,this.data=null,this.icon=!1}onMouseDown(i){i.preventDefault(),this.disabled||this.command()}ngOnInit(){this.icon=typeof this.url=="string"&&!(this.url.split("/").length>1)}getLabel(){return this.element.nativeElement.innerText}focus(){this.element.nativeElement.style="background: #eee"}unfocus(){this.element.nativeElement.style=""}scrollIntoView(){if(!this.isIntoView()){let i=this.element.nativeElement,r=i.parentElement,{top:o,top:s,height:a}=r.getBoundingClientRect(),{top:l,bottom:c}=i.getBoundingClientRect(),u=l-o,d=c-s;r.scrollTop+=this.alignToTop()?u:d-a}}isIntoView(){let{bottom:i,top:r}=this.element.nativeElement.getBoundingClientRect(),o=this.element.nativeElement.parentElement.getBoundingClientRect();return r>=o.top&&i<=o.bottom}alignToTop(){let{top:i}=this.element.nativeElement.getBoundingClientRect(),{top:r}=this.element.nativeElement.parentElement.getBoundingClientRect();return i span[_ngcontent-%COMP%]{overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis;margin-bottom:4px}.data-wrapper[_ngcontent-%COMP%] .url[_ngcontent-%COMP%]{color:#afb3c0;font-size:14.4px}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:8px;display:flex;align-items:flex-end}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] dot-state-icon[_ngcontent-%COMP%]{margin-right:8px}"]});let n=e;return n})();var Wpe=["*"],Mv=(()=>{let e=class e{constructor(){this.id="editor-suggestion-list",this.suggestionItems=[],this.destroy$=new pe,this.mouseMove=!0}onMouseMove(){this.mouseMove=!0}onMouseOver(i){let r=i.target,o=r.dataset?.index;if(isNaN(o)||!this.mouseMove)return;let s=Number(r?.dataset.index);r.getAttribute("disabled")?this.keyManager.activeItem?.unfocus():this.updateActiveItem(s)}onMouseDownHandler(i){i.preventDefault()}ngAfterViewInit(){this.keyManager=new mh(this.items).withWrap(),requestAnimationFrame(()=>this.setFirstItemActive()),this.items.changes.pipe(Ft(this.destroy$)).subscribe(()=>requestAnimationFrame(()=>this.setFirstItemActive()))}ngOnDestroy(){this.destroy$.next(!0)}updateSelection(i){this.keyManager.activeItem&&this.keyManager.activeItem.unfocus(),this.keyManager.onKeydown(i),this.keyManager.activeItem?.scrollIntoView(),this.mouseMove=!1}execCommand(){this.keyManager.activeItem.command()}setFirstItemActive(){this.keyManager.activeItem?.unfocus(),this.keyManager.setFirstItemActive(),this.keyManager.activeItem?.focus()}resetKeyManager(){this.keyManager.activeItem?.unfocus(),this.keyManager=new mh(this.items).withWrap(),this.setFirstItemActive()}updateActiveItem(i){this.keyManager.activeItem?.unfocus(),this.keyManager.setActiveItem(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-suggestion-list"]],contentQueries:function(r,o,s){if(r&1&&Je(s,jd,4),r&2){let a;J(a=X())&&(o.items=a)}},hostVars:1,hostBindings:function(r,o){r&1&&P("mousemove",function(a){return o.onMouseMove(a)})("mouseover",function(a){return o.onMouseOver(a)})("mousedown",function(a){return o.onMouseDownHandler(a)}),r&2&&O("id",o.id)},inputs:{suggestionItems:"suggestionItems"},ngContentSelectors:Wpe,decls:1,vars:0,template:function(r,o){r&1&&(ln(),Vt(0))},styles:["[_nghost-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}"]});let n=e;return n})();function qpe(n,e){n&1&&(b(0,"div",0),E(1,"div",1),b(2,"div",2)(3,"div",3)(4,"div"),E(5,"span",4)(6,"span",5),C(),b(7,"div",6),E(8,"span",7)(9,"span",8),C()()()())}var A6=(()=>{let e=class e{constructor(){this.items=Array(4).fill(0)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-suggestion-loading-list"]],decls:2,vars:0,consts:[[1,"card"],[1,"image","skeleton"],[1,"body"],[1,"data-wrapper"],[1,"title","skeleton"],[1,"subtitle","skeleton"],[1,"state"],[1,"circle","skeleton"],[1,"meta","skeleton"]],template:function(r,o){r&1&&Or(0,qpe,10,0,"div",0,Sa),r&2&&Ar(o.items)},styles:["[_nghost-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.skeleton[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_skeleton-loading 1s linear infinite alternate}.card[_ngcontent-%COMP%]{width:100%;max-height:80px;box-sizing:border-box;display:flex;gap:1rem;padding:8px;background-color:#fff;cursor:pointer}.image[_ngcontent-%COMP%]{min-width:64px;min-height:64px;background:#14151a}.body[_ngcontent-%COMP%]{display:block;width:100%;height:100%}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%]{overflow:hidden;height:100%;display:flex;flex-direction:column;justify-content:space-between}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{width:80%;overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis;background-color:#14151a;height:12px;border-radius:5px;margin-bottom:10px}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{width:85%;height:10px}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;align-items:center}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]{width:16px;height:16px;background:#000;border-radius:100%;margin-right:.5rem}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{width:30px;height:10px;background:#000;border-radius:4px}@keyframes _ngcontent-%COMP%_skeleton-loading{0%{background-color:#ccc}to{background-color:#f2f2f2}}"]});let n=e;return n})();var Kpe={SHOW_VIDEO_THUMBNAIL:!0},k6=(()=>{let e=class e{constructor(){this.config=Kpe}get configObject(){return this.config}setProperty(i,r){this.config=R(I({},this.config),{[i]:r})}getProperty(i){return this.config[i]||!1}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var Vd=(()=>{let e=class e{constructor(i){this.http=i}get defaultHeaders(){let i=new Ei;return i.set("Accept","*/*").set("Content-Type","application/json"),i}getContentTypes(i="",r=""){return this.http.post("/api/v1/contenttype/_filter",{filter:{types:r,query:i},orderBy:"name",direction:"ASC",perPage:40}).pipe(Wt("entity"))}getContentlets({contentType:i,filter:r,currentLanguage:o,contentletIdentifier:s}){let a=s?`-identifier:${s}`:"",l=r.includes("-")?r:`*${r}*`;return this.http.post("/api/content/_search",{query:`+contentType:${i} ${a} +languageId:${o} +deleted:false +working:true +catchall:${l} title:'${r}'^15`,sort:"modDate desc",offset:0,limit:40}).pipe(Wt("entity","jsonObjectView","contentlets"))}getContentletsByLink({link:i,currentLanguage:r=1}){return this.http.post("/api/content/_search",{query:`+languageId:${r} +deleted:false +working:true +(urlmap:*${i}* OR (contentType:(dotAsset OR htmlpageasset OR fileAsset) AND +path:*${i}*))`,sort:"modDate desc",offset:0,limit:40}).pipe(Wt("entity","jsonObjectView","contentlets"))}};e.\u0275fac=function(r){return new(r||e)(re(ei))},e.\u0275prov=K({token:e,factory:e.\u0275fac});let n=e;return n})();var L6=["list"];function Ype(n,e){if(n&1&&(b(0,"h3"),Z(1),C()),n&2){let t=y(2);m(),Pe(t.title)}}function Zpe(n,e){if(n&1&&E(0,"dot-suggestions-list-item",2),n&2){let t=y(),i=t.$implicit,r=t.$index;f("command",i.command)("index",i.tabindex||r)("label",i.label)("url",i.icon)("data",i.data)("disabled",i.disabled)}}function Jpe(n,e){n&1&&E(0,"div",3)}function Xpe(n,e){if(n&1&&x(0,Zpe,1,6,"dot-suggestions-list-item",2)(1,Jpe,1,0,"div",3),n&2){let t=e.$implicit;we(t.id!=="divider"?0:1)}}function ehe(n,e){if(n&1&&(b(0,"div"),x(1,Ype,2,1,"h3"),b(2,"dot-suggestion-list",null,0),Or(4,Xpe,2,1,null,null,Sa),C()()),n&2){let t=y();m(),we(t.title?1:-1),m(3),Ar(t.items)}}function the(n,e){if(n&1){let t=$();b(0,"dot-empty-message",4),P("back",function(){M(t);let r=y();return D(r.handleBackButton())}),C()}if(n&2){let t=y();f("title",t.noResultsMessage)("showBackBtn",!t.isFilterActive)}}var Zi=function(n){return n.BLOCK="block",n.CONTENTTYPE="contentType",n.CONTENT="content",n}(Zi||{}),gl=(()=>{let e=class e{onMouseDownHandler(i){i.preventDefault()}constructor(i,r,o){this.suggestionsService=i,this.dotLanguagesService=r,this.cd=o,this.items=[],this.title="Select a block",this.noResultsMessage="No Results",this.currentLanguage=1,this.allowedContentTypes="",this.contentletIdentifier="",this.dotLangs={},this.isFilterActive=!1}ngOnInit(){this.initialItems=this.items,this.itemsLoaded=Zi.BLOCK,this.dotLanguagesService.get().pipe(xt(1)).subscribe(i=>{i.forEach(r=>this.dotLangs[r.id]=r)})}addContentletItem(){this.items=[{label:"Contentlets",icon:"receipt",command:()=>this.loadContentTypes()},...this.items],this.initialItems=this.items}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton()}updateSelection(i){this.list.updateSelection(i)}handleBackButton(){return this.itemsLoaded=this.itemsLoaded===Zi.CONTENT?Zi.CONTENTTYPE:Zi.BLOCK,this.filterItems(),!1}filterItems(i=""){switch(this.itemsLoaded){case Zi.BLOCK:this.items=this.initialItems.filter(r=>r.label.toLowerCase().includes(i.trim().toLowerCase()));break;case Zi.CONTENTTYPE:this.loadContentTypes(i);break;case Zi.CONTENT:this.loadContentlets(this.selectedContentType,i)}this.isFilterActive=!!i.length}loadContentTypes(i=""){this.suggestionsService.getContentTypes(i,this.allowedContentTypes).pipe(Ie(r=>r.map(o=>({label:o.name,icon:o.icon,command:()=>{this.selectedContentType=o,this.itemsLoaded=Zi.CONTENT,this.loadContentlets(o)}}))),xt(1)).subscribe(r=>{this.items=r,this.itemsLoaded=Zi.CONTENTTYPE,this.items.length?this.title="Select a content type":this.noResultsMessage="No results",this.cd.detectChanges()})}loadContentlets(i,r=""){this.suggestionsService.getContentlets({contentType:i.variable,filter:r,currentLanguage:this.currentLanguage,contentletIdentifier:this.contentletIdentifier}).pipe(xt(1)).subscribe(o=>{this.items=o.map(s=>{let{languageId:a}=s;return s.language=this.getContentletLanguage(a),{label:s.title,icon:"contentlet/image",data:{contentlet:s},command:()=>{this.onSelectContentlet({payload:s,type:{name:"dotContent"}})}}}),this.items.length?this.title="Select a contentlet":this.noResultsMessage=`No results for ${i.name}`,this.cd.detectChanges()})}getContentletLanguage(i){let{languageCode:r,countryCode:o}=this.dotLangs[i];return!r||!o?"":`${r}-${o}`}};e.\u0275fac=function(r){return new(r||e)(k(Vd),k(Ur),k(De))},e.\u0275cmp=F({type:e,selectors:[["dot-suggestions"]],viewQuery:function(r,o){if(r&1&&(fe(L6,5),fe(L6,5,Ce)),r&2){let s;J(s=X())&&(o.list=s.first),J(s=X())&&(o.listElement=s.first)}},hostBindings:function(r,o){r&1&&P("mousedown",function(a){return o.onMouseDownHandler(a)})},inputs:{onSelectContentlet:"onSelectContentlet",items:"items",title:"title",noResultsMessage:"noResultsMessage",currentLanguage:"currentLanguage",allowedContentTypes:"allowedContentTypes",contentletIdentifier:"contentletIdentifier"},decls:2,vars:1,consts:[["list",""],[3,"title","showBackBtn"],[3,"command","index","label","url","data","disabled"],[1,"divider"],[3,"back","title","showBackBtn"]],template:function(r,o){r&1&&x(0,ehe,6,1,"div")(1,the,1,2,"dot-empty-message",1),r&2&&we(o.items.length?0:1)},styles:['[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px var(--color-palette-black-op-10);padding:8px 0;background:#fff;font-family:Assistant,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif}h3[_ngcontent-%COMP%]{text-transform:uppercase;font-size:.875rem;margin:8px 16px;color:#999}.suggestion-list-container[_ngcontent-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.material-icons[_ngcontent-%COMP%]{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.divider[_ngcontent-%COMP%]{border-top:#afb3c0 solid 1px;margin:.5rem 0}']});let n=e;return n})();var Rc=class{constructor({editor:e,element:t,view:i,tippyOptions:r={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:c,to:u})=>{let{doc:d,selection:p}=l,{empty:h}=p,g=!d.textBetween(c,u).length&&Sd(l.selection),_=this.element.contains(document.activeElement);return!(!(a.hasFocus()||_)||h||g||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;if(this.preventHide){this.preventHide=!1;return}a?.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(a.relatedTarget))||this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{let c=!l?.selection.eq(a.state.selection),u=!l?.doc.eq(a.state.doc);!c&&!u||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,c,u,l)},this.updateDelay))},this.updateHandler=(a,l,c,u)=>{var d,p,h;let{state:g,composing:_}=a,{selection:v}=g;if(_||!l&&!c)return;this.createTooltip();let{ranges:S}=v,L=Math.min(...S.map(N=>N.$from.pos)),T=Math.max(...S.map(N=>N.$to.pos));if(!((d=this.shouldShow)===null||d===void 0?void 0:d.call(this,{editor:this.editor,view:a,state:g,oldState:u,from:L,to:T}))){this.hide();return}(p=this.tippy)===null||p===void 0||p.setProps({getReferenceClientRect:((h=this.tippyOptions)===null||h===void 0?void 0:h.getReferenceClientRect)||(()=>{if(O_(g.selection)){let N=a.nodeDOM(L),ee=N.dataset.nodeViewWrapper?N:N.querySelector("[data-node-view-wrapper]");if(ee&&(N=ee.firstChild),N)return N.getBoundingClientRect()}return qr(a,L,T)})}),this.show()},this.editor=e,this.element=t,this.view=i,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){let{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=Pi(e,I({duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle"},this.tippyOptions)),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){let{state:i}=e,r=i.selection.from!==i.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}let o=!t?.selection.eq(e.state.selection),s=!t?.doc.eq(e.state.doc);this.updateHandler(e,o,s,t)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}},nhe=n=>new Le({key:typeof n.pluginKey=="string"?new Be(n.pluginKey):n.pluginKey,view:e=>new Rc(I({view:e},n))}),Bd=mt.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[nhe({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});var P6=(()=>{let e=class e{constructor(i,r){this.el=i,this._renderer=r,this.onChange=()=>{},this.onTouched=()=>{},this.handleChange=({transaction:o})=>{o.docChanged&&this.onChange(this.editor.getJSON())}}writeValue(i){i&&this.editor.chain().setContent(i,!0).run()}registerOnChange(i){this.onChange=i}registerOnTouched(i){this.onTouched=i}setDisabledState(i){this.editor.setEditable(!i),this._renderer.setProperty(this.el.nativeElement,"disabled",i)}ngOnInit(){if(!this.editor)throw new Error("Required: Input `editor`");let i=this.el.nativeElement.innerHTML;this.el.nativeElement.innerHTML="",this.el.nativeElement.appendChild(this.editor.options.element.firstChild),this.editor.setOptions({element:this.el.nativeElement}),i&&this.editor.chain().setContent(i,!1).run(),this.editor.on("blur",()=>{this.onTouched()}),this.editor.on("transaction",this.handleChange)}ngOnDestroy(){this.editor.destroy()}};e.\u0275fac=function(r){return new(r||e)(k(Ce),k(At))},e.\u0275dir=gt({type:e,selectors:[["tiptap","editor",""],["","tiptap","","editor",""],["tiptap-editor","editor",""],["","tiptapEditor","","editor",""]],inputs:{editor:"editor"},features:[on([{provide:ti,useExisting:dn(()=>e),multi:!0}])]});let n=e;return n})();var R6={inode:"14dd5ad9-55ae-42a8-a5a7-e259b6d0901a",variantId:"DEFAULT",locked:!1,stInode:"d5ea385d-32ee-4f35-8172-d37f58d9cd7a",contentType:"Image",height:4e3,identifier:"93ca45e0-06d2-4eef-be1d-79bd6bf0fc99",hasTitleImage:!0,sortOrder:0,hostName:"demo.dotcms.com",extension:"jpg",isContent:!0,baseType:"FILEASSETS",archived:!1,working:!0,live:!0,isContentlet:!0,languageId:1,titleImage:"fileAsset",hasLiveVersion:!0,deleted:!1,folder:"",host:"",modDate:"",modUser:"",modUserName:"",owner:"",title:"",url:"",contentTypeIcon:"assessment",__icon__:"Icon"},wn=I({mimeType:"image/jpeg",type:"file_asset",fileAssetVersion:"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg",fileAsset:"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg"},R6),Bf=R(I({},R6),{mimeType:"video/mp4",type:"file_asset",asset:"",hasTitleImage:!1,assetMetaData:{modDate:1675183379270,sha256:"3bb938fb70049e3e45f533b37ccae995ae96516e04c2f35b0c1142e47b2a39c1",length:788493,title:"mov_bbb.mp4",version:20220201,isImage:!1,fileSize:788493,name:"mov_bbb.mp4",width:320,contentType:"video/mp4",height:176}}),DZe=[R(I({},wn),{fileName:"1 rain-forest-view.jpg",name:"rain-forest-view.jpg",description:"rain-forest-view",title:"Rain-forest-view.jpg"}),R(I({},wn),{fileAsset:"https://previews.123rf.com/images/rglinsky/rglinsky1201/rglinsky120100188/12336990-vertical-de-la-imagen-orientada-a-la-famosa-torre-eiffel-en-par%C3%ADs-francia-.jpg",fileName:"2 Foto8.jpg",name:"Foto8.jpg",description:"Foto8",title:"Foto8.jpg"}),R(I({},wn),{fileAsset:"https://www.freesvgdownload.com/wp-content/uploads/2021/12/It-Takes-a-Big-Heart-To-Help.jpg",fileName:"3 first-chair.jpg",name:"first-chair.jpg",description:"Stay at one of our resorts and get early hours with our first chair program.",title:"First to the Top"}),R(I({},wn),{fileAsset:"https://interactive-examples.mdn.mozilla.net/media/examples/plumeria.jpg",fileName:"4 adult-antioxidant.jpg",name:"adult-antioxidant.jpg",description:"adult-antioxidant",title:"Adult-antioxidant.jpg"}),R(I({},wn),{fileName:"5 services-2.jpg",name:"services-2.jpg",description:"Backcountry Skiing Services",title:"services-2.jpg"}),R(I({},wn),{fileName:"6 template-breadcrumbs.png",name:"template-breadcrumbs.png",description:"Thumbnail image for template with breadcrumbs",title:"template-breadcrumbs.png"}),R(I({},wn),{fileName:"7 downloading.jpg",name:"downloading.jpg",description:"With the opening our our new Peak Bar this year our Top Expressive lift has improve access for downloading",title:"Going Up / Going Down"}),R(I({},wn),{fileName:"8 resort-cottage.jpg",name:"resort-cottage.jpg",description:"resort-cottage",title:"Resort-cottage.jpg"}),R(I({},wn),{fileName:"9 first-chair.jpg",name:"first-chair.jpg",description:"Stay at one of our resorts and get early hours with our first chair program.",title:"First to the Top"}),R(I({},wn),{fileName:"10 adult-antioxidant.jpg",name:"adult-antioxidant.jpg",description:"adult-antioxidant",title:"Adult-antioxidant.jpg"}),R(I({},wn),{fileName:"11 downloading.jpg",name:"downloading.jpg",description:"With the opening our our new Peak Bar this year our Top Expressive lift has improve access for downloading",title:"Going Up / Going Down"}),R(I({},wn),{fileName:"12 rain-forest-view.jpg",name:"rain-forest-view.jpg",description:"rain-forest-view",title:"Rain-forest-view.jpg"}),R(I({},wn),{fileName:"13 rain-forest-view.jpg",name:"rain-forest-view.jpg",description:"rain-forest-view",title:"Rain-forest-view.jpg"}),R(I({},wn),{fileName:"14 Foto8.jpg",name:"Foto8.jpg",description:"Foto8",title:"Foto8.jpg"}),R(I({},wn),{fileName:"15 first-chair.jpg",name:"first-chair.jpg",description:"Stay at one of our resorts and get early hours with our first chair program.",title:"First to the Top"}),R(I({},wn),{fileName:"16 adult-antioxidant.jpg",name:"adult-antioxidant.jpg",description:"adult-antioxidant",title:"Adult-antioxidant.jpg"}),R(I({},wn),{fileName:"17 services-2.jpg",name:"services-2.jpg",description:"Backcountry Skiing Services",title:"services-2.jpg"}),R(I({},wn),{fileName:"18 template-breadcrumbs.png",name:"template-breadcrumbs.png",description:"Thumbnail image for template with breadcrumbs",title:"template-breadcrumbs.png"}),R(I({},wn),{fileName:"19 downloading.jpg",name:"downloading.jpg",description:"With the opening our our new Peak Bar this year our Top Expressive lift has improve access for downloading",title:"Going Up / Going Down"}),R(I({},wn),{fileName:"20 resort-cottage.jpg",name:"resort-cottage.jpg",description:"resort-cottage",title:"Resort-cottage.jpg"}),R(I({},wn),{fileName:"21 first-chair.jpg",name:"first-chair.jpg",description:"Stay at one of our resorts and get early hours with our first chair program.",title:"First to the Top"}),R(I({},wn),{fileName:"22 adult-antioxidant.jpg",name:"adult-antioxidant.jpg",description:"adult-antioxidant",title:"Adult-antioxidant.jpg"}),R(I({},wn),{fileName:"23 downloading.jpg",name:"downloading.jpg",description:"With the opening our our new Peak Bar this year our Top Expressive lift has improve access for downloading",title:"Going Up / Going Down"}),R(I({},wn),{fileName:"24 rain-forest-view.jpg",name:"rain-forest-view.jpg",description:"rain-forest-view",title:"Rain-forest-view.jpg"})],OZe=[R(I({},Bf),{asset:"https://www.w3schools.com/tags/movie.mp4",fileName:"1 video",name:"rain-forest-view.jpg",description:"rain-forest-view",title:"Rain-forest-view.jpg"}),R(I({},Bf),{asset:"https://www.w3schools.com/tags/movie.mp4",fileName:"2 video",name:"Foto8.jpg",description:"Foto8",title:"Foto8.jpg"}),R(I({},Bf),{fileName:"3 video",name:"first-chair.jpg",description:"Stay at one of our resorts and get early hours with our first chair program.",title:"First to the Top"}),R(I({},Bf),{asset:"https://www.w3schools.com/tags/movie.mp4",fileName:"4 video",name:"adult-antioxidant.jpg",description:"adult-antioxidant",title:"Adult-antioxidant.jpg"}),R(I({},Bf),{fileAsset:"",fileName:"5 video",name:"services-2.jpg",description:"Backcountry Skiing Services",title:"services-2.jpg"})];var F6=(()=>{let e=class e{transform({live:i,working:r,deleted:o,hasLiveVersion:s}){return{live:i,working:r,deleted:o,hasLiveVersion:s}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275pipe=As({name:"contentletState",type:e,pure:!0});let n=e;return n})();var Dv="menuFloating",aM=class{constructor({editor:e,view:t,render:i,command:r,key:o}){this.invalidNodes=["codeBlock","blockquote"],this.editor=e,this.view=t,this.editor.on("focus",()=>{this.update(this.editor.view)}),this.render=i,this.command=r,this.key=o}update(e,t){let i=this.key?.getState(e.state),r=t?this.key?.getState(t):null;if(i.open){let{from:o,to:s}=this.editor.state.selection,a=qr(this.view,o,s);this.render().onStart({clientRect:()=>a,range:{from:o,to:s},editor:this.editor,command:this.command})}else r&&r.open&&this.render().onExit(null)}},j6=new Be(Dv),V6=n=>new Le({key:j6,view:e=>new aM(I({key:j6,view:e},n)),state:{init(){return{open:!1}},apply(e){let t=e.getMeta(Dv);return t?.open?{open:t?.open}:{open:!1}}},props:{handleKeyDown(e,t){let{open:i,range:r}=this.getState(e.state);return i?n.render().onKeyDown({event:t,range:r,view:e}):!1}}});var ohe={table:!0,tableRow:!0,tableHeader:!0,tableCell:!0},she={orderedList:!0,listItem:!0},ahe={bulletList:!0,listItem:!0},lhe={image:!0,dotImage:!0},che={dotVideo:!0,youtube:!0},uhe={paragrah:!0,text:!0,doc:!0},B6={image:lhe,table:ohe,orderedList:she,bulletList:ahe,video:che},dhe=(n,e)=>{let{type:t,attrs:i}=n;return t!=="heading"?!1:e[t+i.level]},z6=(n,e)=>{let t=phe(e),i=Array.isArray(n)?[...n]:[...n.content];return U6(i,t)},U6=(n,e)=>{if(!n?.length)return n;let t=[];for(let i in n){let r=n[i];(e[r.type]||dhe(r,e))&&t.push(R(I({},r),{content:U6(r.content,e)}))}return t},phe=n=>n.reduce((e,t)=>B6[t]?I(I({},e),B6[t]):R(I({},e),{[t]:!0}),uhe);var hhe=new RegExp(/]*)>(\s|\n|]*src="[^"]*"[^>]*>)*?<\/a>/gm),lM=new RegExp(/]*src="[^"]*"[^>]*>/gm),zd=function(){let{attrs:n,type:e}=this?.node||{},{data:t}=n,i=t?{identifier:t?.identifier,languageId:t?.languageId}:{},r=R(I({},n),{data:i});return{type:e.name,attrs:r}},_s=(n,e)=>{let t=n.depth,i;do if(i=n.node(t),i){if(Array.isArray(e)&&e.includes(i.type.name))break;t--}while(t>0&&i);return i},H6=(n,e)=>{let t=e-n?.textOffset,i=n.index(){let{clientX:t,clientY:i}=e,{pos:r}=n.posAtCoords({left:t,top:i});return r},W6=({editor:n,nodeType:e,selectionRange:t})=>{K6.includes(e)?fhe(n,t):mhe(n,t)},G6=(n,e)=>{let t=e.$from.pos,i=e.$to.pos+1;n.chain().deleteRange({from:t,to:i}).blur().run()},fhe=(n,e)=>{let t=e.$from.pos,i=t+1;n.chain().deleteRange({from:t,to:i}).blur().run()},mhe=(n,e)=>{let t=_s(e.$from),i=t.type.name,r=_s(e.$from,[Vn.ORDERED_LIST,Vn.BULLET_LIST]),{childCount:o}=r;switch(i){case Vn.ORDERED_LIST:case Vn.BULLET_LIST:o>1?n.chain().deleteNode(Vn.LIST_ITEM).blur().run():n.chain().deleteNode(r.type).blur().run();break;default:n.chain().deleteNode(t.type).blur().run();break}},q6=n=>{let e=new RegExp(/]*)>(.|\n)*?<\/p>/gm),t=new RegExp(/]*)>(.|\n)*?<\/h\d+>/gm),i=new RegExp(/]*)>(.|\n)*?<\/li>/gm),r=new RegExp(/<(ul|ol)(|\s+[^>]*)>(.|\n)*?<\/(ul|ol)>/gm);return n.replace(hhe,o=>ghe(o)).replace(e,o=>Ov(o)).replace(t,o=>Ov(o)).replace(i,o=>Ov(o)).replace(r,o=>Ov(o))},Ov=n=>{let e=n.match(lM)||[];return new DOMParser().parseFromString(n,"text/html").documentElement.textContent.trim().length>0?n.replace(lM,"")+e.join(""):e.join("")},ghe=n=>{let e=document.createElement("div");e.innerHTML=n;let t=e.querySelector("a").getAttribute("href"),i=e.querySelector("a").getAttribute("href"),r=e.querySelector("a").getAttribute("alt");return n.replace(/]*)>/gm,"").replace(//gm,"").replace(lM,o=>o.replace(/img/gm,`img href="${t}" title="${i}" alt="${r}"`))},Av=n=>{let{state:e}=n,{doc:t}=e.tr,i=e.selection.to,r=Re.create(t,i,i);n.dispatch(e.tr.setSelection(r))},Q6=n=>{let{state:e}=n,{selection:t}=e,{ranges:i}=t,r=Math.min(...i.map(s=>s.$from.pos)),o=Math.max(...i.map(s=>s.$to.pos));return{from:r,to:o}};var cM=(n,e)=>{let t=[];return n.state.doc.descendants((i,r)=>{i.type.name===e&&t.push({node:i,from:r,to:r+i.nodeSize})}),t.length?t:null},uM=n=>/^https?:\/\/.+\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(n);var QZe=new be("is AI Plugin installed");var Ud=class n extends On{constructor(e,t){super(),this.STEP_TYPE="setDocAttr",this.key=e,this.value=t}get stepType(){return this.STEP_TYPE}static fromJSON(e,t){return new n(t.key,t.value)}static register(){try{On.jsonID(this.prototype.STEP_TYPE,n)}catch(e){if(e.message!==`Duplicate use of step JSON ID ${this.prototype.STEP_TYPE}`)throw e}return!0}apply(e){return this.prevValue=e.attrs[this.key],e.attrs===e.type.defaultAttrs&&(e.attrs=Object.assign({},e.attrs)),e.attrs[this.key]=this.value,$n.ok(e)}invert(){return new n(this.key,this.prevValue)}map(){return this}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}},kv=class n extends On{constructor(){super(),this.STEP_TYPE="restoreDefaultDOMAttrs"}get stepType(){return this.STEP_TYPE}static register(){try{On.jsonID(this.prototype.STEP_TYPE,n)}catch(e){if(e.message!==`Duplicate use of step JSON ID ${this.prototype.STEP_TYPE}`)throw e}return!0}apply(e){return e.attrs=Object.assign({},e.type.defaultAttrs),$n.ok(e)}invert(){return new n}map(){return this}toJSON(){return{stepType:this.stepType}}};var Y6={prompt:"",generatedContent:[],selectedContent:"",activeIndex:null,status:Di.INIT,showDialog:!1,submitLabel:"block-editor.extension.ai-image.generate"},Nv=(()=>{let e=class e extends Ay{constructor(i){super(I({},Y6)),this.dotAiService=i,this.activeIndex$=this.select(r=>r.activeIndex),this.generatedContent$=this.select(r=>r.generatedContent),this.status$=this.select(r=>r.status),this.showDialog$=this.select(r=>r.showDialog),this.selectedContent$=this.select(r=>r.selectedContent),this.vm$=this.select(r=>r),this.activeContent$=this.select(this.activeIndex$,this.generatedContent$,(r,o)=>o[r]),this.submitLabel$=this.select(this.status$,this.generatedContent$,(r,o)=>r===Di.LOADING?"block-editor.extension.ai-image.generating":o.length?"block-editor.extension.ai-image.regenerate":"block-editor.extension.ai-image.generate"),this.setStatus=this.updater((r,o)=>R(I({},r),{status:o})),this.setSelectedContent=this.updater((r,o)=>R(I({},r),{showDialog:!1,selectedContent:o})),this.showDialog=this.updater(()=>R(I({},Y6),{generatedContent:[],showDialog:!0})),this.hideDialog=this.updater(r=>R(I({},r),{showDialog:!1})),this.updateActiveIndex=this.updater((r,o)=>R(I({},r),{activeIndex:o})),this.generateContent=this.effect(r=>r.pipe(Tl(this.state$),Zt(([o,{generatedContent:s,activeIndex:a}])=>(this.patchState({status:Di.LOADING,prompt:o}),this.dotAiService.generateContent(o).pipe(ld(l=>{let c={prompt:o,content:l};s[a]?.error?s[a]=c:s.push(c),this.patchState({status:Di.IDLE,generatedContent:[...s],activeIndex:s.length-1})},l=>{let c={prompt:o,content:null,error:l};s[a]?.error?s[a]=c:s.push(c),this.patchState({status:Di.IDLE,generatedContent:s,activeIndex:s.length-1})})))))),this.cleanError=this.updater(r=>R(I({},r),{error:""}))}};e.\u0275fac=function(r){return new(r||e)(re(Xa))},e.\u0275prov=K({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();var _he=["inputTextarea"],vhe=()=>({width:"1040px"}),bhe=()=>({width:"500px"});function Che(n,e){n&1&&E(0,"p-skeleton",5)}function whe(n,e){if(n&1){let t=$();b(0,"dot-empty-container",18),ht(1,"dm"),P("buttonAction",function(){M(t);let r=y(2);return D(r.store.generateContent(r.form.value.textPrompt))}),C()}if(n&2){let t=y(2);f("hideContactUsLink",!0)("buttonLabel",ft(1,4,"try-again"))("secondaryButton",!0)("configuration",t.emptyConfiguration)}}function Ihe(n,e){if(n&1&&E(0,"dot-copy-button",20),n&2){y();let t=pt(2);f("copy",t.value)}}function xhe(n,e){if(n&1&&(b(0,"div",7),E(1,"textarea",19,1),ht(3,"dm"),x(4,Ihe,1,1,"dot-copy-button",20),C()),n&2){let t=pt(2);m(),f("placeholder",ft(3,3,"block-editor.extension.ai-content.placeholder"))("readOnly",!0),m(3),we(t.value?4:-1)}}function The(n,e){n&1&&E(0,"p-skeleton",8)}function Ehe(n,e){if(n&1){let t=$();b(0,"div",9)(1,"button",21),P("click",function(){M(t);let r=y(),o=y();return D(o.store.updateActiveIndex(r.activeIndex-1))}),C(),b(2,"span"),Z(3),ht(4,"dm"),C(),b(5,"button",22),P("click",function(){M(t);let r=y(),o=y();return D(o.store.updateActiveIndex(r.activeIndex+1))}),C()()}if(n&2){let t=y();m(),f("disabled",t.activeIndex===0||(t.generatedContent==null?null:t.generatedContent.length)===0),m(2),jp(" ",t.generatedContent!=null&&t.generatedContent.length?t.activeIndex+1:0," ",ft(4,5,"of")," ",t.generatedContent==null?null:t.generatedContent.length," "),m(2),f("disabled",t.activeIndex===(t.generatedContent==null?null:t.generatedContent.length)-1||(t.generatedContent==null?null:t.generatedContent.length)===0)}}function She(n,e){n&1&&(Ne(),b(0,"svg",15),E(1,"path",23)(2,"path",24)(3,"path",25),C())}function Mhe(n,e){n&1&&E(0,"i",16)}function Dhe(n,e){if(n&1){let t=$();b(0,"p-dialog",3),ht(1,"dm"),P("onHide",function(){M(t);let r=y();return D(r.store.hideDialog())}),Cu("visibleChange",function(r){let o=M(t);return Vp(o.showDialog,r)||(o.showDialog=r),D(r)}),b(2,"form",4),P("ngSubmit",function(){M(t);let r=y();return D(r.store.generateContent(r.form.value.textPrompt))}),x(3,Che,1,0,"p-skeleton",5)(4,whe,2,6,"dot-empty-container",6)(5,xhe,5,5,"div",7)(6,The,1,0,"p-skeleton",8)(7,Ehe,6,7,"div",9),E(8,"textarea",10,0),ht(10,"dm"),b(11,"div",11)(12,"button",12),ht(13,"dm"),P("click",function(){M(t);let r=y();return D(r.closeDialog())}),C(),b(14,"button",13),ht(15,"dm"),P("click",function(){let r=M(t),o=y();return D(o.store.setSelectedContent(r.generatedContent[r.activeIndex]==null?null:r.generatedContent[r.activeIndex].content))}),C(),b(16,"button",14),ht(17,"dm"),x(18,She,4,0,":svg:svg",15)(19,Mhe,1,0,"i",16),C()()(),E(20,"p-confirmDialog",17),C()}if(n&2){let t=e,i=y();En(St(29,vhe)),Cw("header",ft(1,19,"block-editor.extension.ai-content.header")),bu("visible",t.showDialog),f("dismissableMask",!0)("draggable",!1)("resizable",!1),m(2),f("formGroup",i.form),m(),we(t.status===i.ComponentStatus.LOADING?3:t.generatedContent[t.activeIndex]!=null&&t.generatedContent[t.activeIndex].error?4:5),m(3),we(t.status===i.ComponentStatus.LOADING?6:7),m(2),f("placeholder",ft(10,21,"block-editor.extension.ai-content.ask.placeholder")),m(4),f("label",ft(13,23,"Cancel")),m(2),f("disabled",t.status===i.ComponentStatus.LOADING||!(t.generatedContent!=null&&t.generatedContent.length)||(t.generatedContent[t.activeIndex]==null?null:t.generatedContent[t.activeIndex].error))("label",ft(15,25,"block-editor.extension.ai-image.insert")),m(2),f("disabled",i.form.invalid||t.status===i.ComponentStatus.LOADING)("label",ft(17,27,i.submitButtonLabel)),m(2),we(t.status!==i.ComponentStatus.LOADING?18:19),m(2),En(St(30,bhe))}}var Z6=(()=>{let e=class e{constructor(){this.store=B(Nv),this.vm$=this.store.vm$,this.ComponentStatus=Di,this.form=new Na({textPrompt:new Lr("",[Si.required,cd.noWhitespace]),generatedText:new Lr("")}),this.confirmationService=B(Vs),this.dotMessageService=B(Qt),this.emptyConfiguration={title:this.dotMessageService.get("block-editor.extension.ai-content.error"),icon:"pi-exclamation-triangle"},this.destroyRef=B(ri)}ngOnInit(){this.setSubscriptions()}closeDialog(){this.confirmationService.confirm({key:"ai-image-prompt",header:this.dotMessageService.get("block-editor.extension.ai.confirmation.header"),message:this.dotMessageService.get("block-editor.extension.ai.confirmation.message"),icon:"pi pi-exclamation-triangle",acceptLabel:this.dotMessageService.get("Discard"),rejectLabel:this.dotMessageService.get("Cancel"),accept:()=>{this.store.hideDialog()}})}setSubscriptions(){this.store.showDialog$.pipe(Hr(this.destroyRef),rn(i=>i),Fb(10)).subscribe(()=>{this.form.reset(),this.inputTextarea.nativeElement.focus()}),this.store.status$.pipe(Hr(this.destroyRef)).subscribe(i=>{this.form[i===Di.LOADING?"disable":"enable"]()}),this.store.activeContent$.pipe(Hr(this.destroyRef)).subscribe(i=>{this.form.patchValue({textPrompt:i?.prompt,generatedText:i?.content})}),this.store.submitLabel$.pipe(Hr(this.destroyRef)).subscribe(i=>{this.submitButtonLabel=i})}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-ai-content-prompt"]],viewQuery:function(r,o){if(r&1&&fe(_he,5),r&2){let s;J(s=X())&&(o.inputTextarea=s.first)}},standalone:!0,features:[ue],decls:2,vars:3,consts:[["inputTextarea",""],["generatedText",""],["appendTo","body",3,"visible","dismissableMask","draggable","resizable","style","header"],["appendTo","body",3,"onHide","visibleChange","visible","dismissableMask","draggable","resizable","header"],[1,"ai-content__form",3,"ngSubmit","formGroup"],["width","100%","height","22rem"],[3,"hideContactUsLink","buttonLabel","secondaryButton","configuration"],[1,"ai-content__generated-text-wrapper"],["width","7rem","height","2rem",1,"flex","justify-content-center"],[1,"ai-content__pagination"],["formControlName","textPrompt","pInputTextarea","",1,"ai-content__input-text",3,"placeholder"],[1,"ai-content__buttons"],["pButton","","type","button",1,"p-button-text",3,"click","label"],["pButton","","type","button",1,"ml-auto",3,"click","disabled","label"],["pButton","","type","submit",1,"p-button-outlined",3,"disabled","label"],["fill","none","height","22","viewBox","0 0 18 22","width","18","xmlns","http://www.w3.org/2000/svg"],[1,"pi","pi-spin","pi-spinner"],["acceptIcon","null","key","ai-image-prompt","rejectButtonStyleClass","p-button-outlined","rejectIcon","null"],[3,"buttonAction","hideContactUsLink","buttonLabel","secondaryButton","configuration"],["formControlName","generatedText","pInputTextarea","",1,"ai-content__generated-text",3,"placeholder","readOnly"],["customClass","p-button-rounded",3,"copy"],["type","button","icon","pi pi-chevron-left","pButton","",1,"p-button-text","p-button-sm","p-button-rounded",3,"click","disabled"],["type","button","icon","pi pi-chevron-right","pButton","",1,"p-button-text","p-button-sm","p-button-rounded",3,"click","disabled"],["d","M9.48043 13.2597L5.40457 14.5046C5.29885 14.5368 5.20602 14.6037 5.13999 14.6952C5.07396 14.7868 5.03828 14.8981 5.03828 15.0124C5.03828 15.1268 5.07396 15.238 5.13999 15.3296C5.20602 15.4211 5.29885 15.488 5.40457 15.5203L9.48043 16.7651L10.6799 20.9949C10.711 21.1046 10.7755 21.2009 10.8637 21.2695C10.9519 21.338 11.0591 21.375 11.1693 21.375C11.2795 21.375 11.3867 21.338 11.4749 21.2695C11.5631 21.2009 11.6276 21.1046 11.6586 20.9949L12.8586 16.7651L16.9345 15.5203C17.0402 15.488 17.133 15.4211 17.1991 15.3296C17.2651 15.238 17.3008 15.1268 17.3008 15.0124C17.3008 14.8981 17.2651 14.7868 17.1991 14.6952C17.133 14.6037 17.0402 14.5368 16.9345 14.5046L12.8586 13.2597L11.6586 9.02989C11.6276 8.92018 11.5631 8.82385 11.4749 8.75533C11.3867 8.6868 11.2795 8.64977 11.1693 8.64977C11.0591 8.64977 10.9519 8.6868 10.8637 8.75533C10.7754 8.82385 10.711 8.92018 10.6799 9.02989L9.48043 13.2597Z","fill","#426BF0"],["d","M14.4668 5.66732L16.6779 4.99138C16.7836 4.95914 16.8764 4.89224 16.9424 4.8007C17.0084 4.70916 17.0441 4.59789 17.0441 4.48355C17.0441 4.3692 17.0084 4.25794 16.9424 4.16639C16.8764 4.07485 16.7836 4.00795 16.6779 3.97571L14.4668 3.3003L13.8154 1.00513C13.7844 0.895414 13.7199 0.799084 13.6317 0.730559C13.5435 0.662034 13.4362 0.625 13.3261 0.625C13.2159 0.625 13.1086 0.662034 13.0204 0.730559C12.9322 0.799084 12.8677 0.895414 12.8367 1.00513L12.1859 3.3003L9.9743 3.97571C9.86858 4.00794 9.77575 4.07483 9.70972 4.16638C9.6437 4.25792 9.60801 4.3692 9.60801 4.48355C9.60801 4.5979 9.6437 4.70917 9.70972 4.80072C9.77575 4.89226 9.86858 4.95915 9.9743 4.99138L12.1859 5.66732L12.8367 7.96196C12.8677 8.07168 12.9322 8.16801 13.0204 8.23653C13.1086 8.30506 13.2159 8.34209 13.3261 8.34209C13.4362 8.34209 13.5435 8.30506 13.6317 8.23653C13.7199 8.16801 13.7844 8.07168 13.8154 7.96196L14.4668 5.66732Z","fill","#426BF0"],["d","M3.24925 6.62823L1.01825 7.57256C0.924385 7.61231 0.844063 7.68016 0.787521 7.76748C0.730978 7.8548 0.700781 7.95761 0.700781 8.06282C0.700781 8.16802 0.730978 8.27083 0.787521 8.35815C0.844063 8.44547 0.924385 8.51333 1.01825 8.55307L3.24925 9.4974L4.1592 11.8127C4.19751 11.9101 4.2629 11.9935 4.34704 12.0522C4.43118 12.1109 4.53026 12.1422 4.63163 12.1422C4.733 12.1422 4.83208 12.1109 4.91622 12.0522C5.00036 11.9935 5.06576 11.9101 5.10406 11.8127L6.01402 9.4974L8.24456 8.55307C8.33841 8.51332 8.41873 8.44546 8.47527 8.35815C8.53181 8.27083 8.56201 8.16801 8.56201 8.06282C8.56201 7.95762 8.53181 7.8548 8.47527 7.76749C8.41873 7.68017 8.33841 7.61231 8.24456 7.57256L6.01402 6.62823L5.10406 4.31342C5.06576 4.21602 5.00036 4.13266 4.91622 4.07399C4.83208 4.01531 4.733 3.98397 4.63163 3.98397C4.53026 3.98397 4.43118 4.01531 4.34704 4.07399C4.2629 4.13266 4.19751 4.21602 4.1592 4.31342L3.24925 6.62823Z","fill","#426BF0"]],template:function(r,o){if(r&1&&(x(0,Dhe,21,31,"p-dialog",2),ht(1,"async")),r&2){let s;we((s=ft(1,1,o.vm$))?0:-1,s)}},dependencies:[Bu,mL,ho,Zo,Pr,Rr,Yo,$i,po,Uu,ny,Dn,an,zt,gr,Ws,ad,t0,ky,Vu,ey,Ny],styles:["form[_ngcontent-%COMP%]{margin:0 1rem}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%]{width:100%;position:relative}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] button[_ngcontent-%COMP%], form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] .pi-spinner[_ngcontent-%COMP%]{position:absolute;right:0;top:0;bottom:0;margin:auto 0;background:none}form[_ngcontent-%COMP%] .p-input-icon-right[_ngcontent-%COMP%] .pi-spinner[_ngcontent-%COMP%]{margin-right:.5rem;color:var(--color-palette-primary-500)}.ai-content__generated-text-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative}.ai-content__generated-text-wrapper[_ngcontent-%COMP%] .p-inputtext.p-inputtextarea[_ngcontent-%COMP%]{padding:.5rem 2.5rem .5rem 1.5rem;min-height:4rem}.ai-content__generated-text-wrapper[_ngcontent-%COMP%] dot-copy-button[_ngcontent-%COMP%]{position:absolute;right:1rem;bottom:.5rem}.ai-content__generated-text[_ngcontent-%COMP%], dot-empty-container[_ngcontent-%COMP%]{height:22rem}.ai-content__pagination[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:.5rem;align-items:center}.ai-content__input-text[_ngcontent-%COMP%]{height:4rem}.ai-content__buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem}.ai-content__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}dot-empty-container[_ngcontent-%COMP%] .message__icon{color:#d82b2e}"]});let n=e;return n})();var dM=class{constructor(e){this.destroy$=new pe;let{editor:t,element:i,view:r,pluginKey:o,component:s}=e;this.editor=t,this.element=i,this.view=r,this.element.remove(),this.pluginKey=o,this.component=s,this.componentStore=this.component.injector.get(Nv),this.componentStore.selectedContent$.pipe(Ft(this.destroy$),xl(1)).subscribe(a=>{this.editor.commands.insertContent(this.parseTextToParagraphs(a),{parseOptions:{preserveWhitespace:!1}})}),this.componentStore.showDialog$.pipe(xl(1),Ft(this.destroy$),rn(a=>!a)).subscribe(()=>{this.editor.commands.closeAIPrompt()})}update(e,t){let i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{aIContentPromptOpen:!1};i?.aIContentPromptOpen&&r?.aIContentPromptOpen===!1&&this.componentStore.showDialog()}destroy(){this.destroy$.next(!0),this.destroy$.complete()}parseTextToParagraphs(e){let{schema:t}=this.view.state,i=_o.fromSchema(t),r=document.createElement("div");return e.split(/(?:\r\n?|\n)+/).forEach(o=>{let s=r?.appendChild(document.createElement("p"));o&&s.appendChild(i.serializeNode(t.text(o)))}),r.innerHTML}},J6=n=>new Le({key:n.pluginKey,view:e=>new dM(I({view:e},n)),state:{init(){return{aIContentPromptOpen:!1}},apply(e,t,i){let{aIContentPromptOpen:r}=e.getMeta(Hd)||{},o=Hd.getState(i);return typeof r=="boolean"?{aIContentPromptOpen:r}:o||t}}});var Ohe="dotAITextContent",Hd=new Be(Ohe),pM="aiContentPrompt",X6=n=>mt.create({name:pM,addOptions(){return{element:null,pluginKey:Hd}},addCommands(){return{openAIPrompt:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(Hd,{aIContentPromptOpen:!0}),!0)).freezeScroll(!0).run(),closeAIPrompt:()=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(Hd,{aIContentPromptOpen:!1}),!0)).freezeScroll(!1).run()}},addProseMirrorPlugins(){let e=n.createComponent(Z6);return e.changeDetectorRef.detectChanges(),[J6({pluginKey:this.options.pluginKey,editor:this.editor,element:e.location.nativeElement,component:e})]}});var hM=class{#t;#n;#e;constructor(e){this.destroy$=new pe,this.#t=null,this.#n=null,this.#e=null;let{editor:t,view:i,pluginKey:r,dialogService:o,dotMessageService:s}=e;this.editor=t,this.view=i,this.pluginKey=r,this.#t=o,this.#n=s}update(e,t){let i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{aIImagePromptOpen:!1};if(i.aIImagePromptOpen&&r.aIImagePromptOpen===!1){let o=this.editor.getText(),s=this.#n.get("block-editor.extension.ai-image.dialog-title");this.#e=this.#t.open(nP,{header:s,appendTo:"body",closeOnEscape:!1,draggable:!1,keepInViewport:!1,maskStyleClass:"p-dialog-mask-transparent-ai",resizable:!1,modal:!0,width:"90%",style:{"max-width":"1040px"},data:{context:o}}),this.#e.onClose.pipe(Ft(this.destroy$)).subscribe(a=>{a&&this.editor.chain().insertImage(a.response.contentlet).run(),this.editor.commands.closeImagePrompt()})}}destroy(){this.destroy$.next(!0),this.destroy$.complete(),this.#e?.close()}},ej=n=>new Le({key:n.pluginKey,view:e=>new hM(I({view:e},n)),state:{init(){return{aIImagePromptOpen:!1}},apply(e,t,i){let{aIImagePromptOpen:r}=e.getMeta($d)||{},o=$d.getState(i);return typeof r=="boolean"?{aIImagePromptOpen:r}:o||t}}});var $d=new Be("aiImagePrompt-form"),fM="aiImagePrompt",tj=(n,e)=>mt.create({name:fM,addOptions(){return{element:null,pluginKey:$d}},addCommands(){return{openImagePrompt:()=>({chain:t})=>t().command(({tr:i})=>(i.setMeta($d,{aIImagePromptOpen:!0}),!0)).freezeScroll(!0).run(),closeImagePrompt:()=>({chain:t})=>t().command(({tr:i})=>(i.setMeta($d,{aIImagePromptOpen:!1}),!0)).freezeScroll(!1).run()}},addProseMirrorPlugins(){return[ej({pluginKey:this.options.pluginKey,editor:this.editor,dialogService:n,dotMessageService:e})]}});var Vn=function(n){return n.DOT_IMAGE="dotImage",n.LIST_ITEM="listItem",n.BULLET_LIST="bulletList",n.ORDERED_LIST="orderedList",n.BLOCKQUOTE="blockquote",n.CODE_BLOCK="codeBlock",n.DOC="doc",n.DOT_CONTENT="dotContent",n.PARAGRAPH="paragraph",n.HARD_BREAK="hardBreak",n.HEADING="heading",n.HORIZONTAL_RULE="horizontalRule",n.TEXT="text",n.TABLE_CELL="tableCell",n.AI_CONTENT="aiContent",n.LOADER="loader",n}(Vn||{}),K6=[Vn.DOT_IMAGE,Vn.DOT_CONTENT];var Ahe=[pM,fM];function khe({element:n,content:e,rect:t,onHide:i}){return Pi(n,{content:e,placement:"bottom",popperOptions:{modifiers:uL},getReferenceClientRect:t,showOnCreate:!0,interactive:!0,offset:[120,10],trigger:"manual",maxWidth:"none",onHide:i})}function nj({editor:n,range:e,props:t,customBlocks:i}){let{type:r,payload:o}=t,s={dotContent:()=>{n.chain().addContentletBlock({range:e,payload:o}).addNextLine().run()},heading:()=>{n.chain().addHeading({range:e,type:r}).run()},table:()=>{n.commands.openForm([{key:"rows",label:"Rows",required:!0,value:"3",controlType:"number",type:"number",min:1},{key:"columns",label:"Columns",required:!0,value:"3",controlType:"number",type:"number",min:1},{key:"header",label:"Add Row Header",required:!1,value:!0,controlType:"text",type:"checkbox"}],{customClass:"dotTableForm"}).pipe?.(xt(1),rn(a=>!!a)).subscribe(a=>{requestAnimationFrame(()=>{n.chain().insertTable({rows:a.rows,cols:a.columns,withHeaderRow:!!a.header}).focus().run()})})},orderedList:()=>{n.chain().deleteRange(e).toggleOrderedList().focus().run()},bulletList:()=>{n.chain().deleteRange(e).toggleBulletList().focus().run()},blockquote:()=>{n.chain().deleteRange(e).setBlockquote().focus().run()},codeBlock:()=>{n.chain().deleteRange(e).setCodeBlock().focus().run()},horizontalRule:()=>{n.chain().deleteRange(e).setHorizontalRule().focus().run()},image:()=>n.commands.openAssetForm({type:"image"}),subscript:()=>n.chain().setSubscript().focus().run(),superscript:()=>n.chain().setSuperscript().focus().run(),video:()=>n.commands.openAssetForm({type:"video"}),aiContentPrompt:()=>n.commands.openAIPrompt(),aiContent:()=>n.commands.insertAINode(),aiImagePrompt:()=>n.commands.openImagePrompt()};ij(i).forEach(a=>{s[a.id]=()=>{try{n.commands[a.commandKey]()}catch{console.warn(`Custom command ${a.commandKey} does not exists.`)}}}),s[r.name]?s[r.name]():n.chain().setTextSelection(e).focus().run()}function Nhe(n){return n.map(e=>({icon:e.icon,label:e.menuLabel,commandKey:e.command,id:`${e.command}-id`}))}function ij(n){return n.extensions.map(e=>Nhe(e.actions||[])).flat()}var rj=(n,e,t)=>{let i,r,o=new Be("suggestionPlugin"),s=new pe,a=!0;function l({editor:w,range:S,clientRect:L}){a&&(u(w,S),i=khe({element:w.options.element.parentElement,content:r.location.nativeElement,rect:L,onHide:()=>{w.commands.focus();let T=g({editor:w,range:S});w.state.doc.textBetween(T.from,T.to," ")==="/"&&w.commands.deleteRange(T);let N=w.state.tr.setMeta(Dv,{open:!1});w.view.dispatch(N),w.commands.freezeScroll(!1)}}))}function c({editor:w}){w.commands.freezeScroll(!0);let S=_s(w.view.state.selection.$from,[Vn.TABLE_CELL])?.type.name===Vn.TABLE_CELL,L=_s(w.view.state.selection.$from,[Vn.CODE_BLOCK])?.type.name===Vn.CODE_BLOCK;a=!S&&!L}function u(w,S){let{allowedBlocks:L,allowedContentTypes:T,lang:q,contentletIdentifier:N}=w.storage.dotConfig,ee=L.length>1?L:[],ge=d({allowedBlocks:ee,editor:w,range:S});r=n.createComponent(gl),r.instance.items=ge,r.instance.currentLanguage=q,r.instance.allowedContentTypes=T,r.instance.contentletIdentifier=N,r.instance.onSelectContentlet=ce=>{ux({type:Zi.CONTENT,editor:w,range:S,suggestionKey:o,ItemsType:Zi}),h({editor:w,range:S,props:ce})},r.changeDetectorRef.detectChanges(),(L.length<=1||L.includes(dL))&&r.instance.addContentletItem()}function d({allowedBlocks:w=[],editor:S,range:L}){let T=[...J0];t?.shouldShowAIExtensions||(T=J0.filter(ee=>!Ahe.includes(ee.id)));let N=[...w.length?T.filter(ee=>w.includes(ee.id)):T,...ij(e)];return N.forEach(ee=>ee.command=()=>p({item:ee,editor:S,range:L})),N}function p({item:w,editor:S,range:L}){let{id:T,attributes:q}=w,N={type:I({name:T.includes("heading")?"heading":T},q)};ux({type:Zi.BLOCK,editor:S,range:L,suggestionKey:o,ItemsType:Zi}),h({editor:S,range:L,props:N})}function h({editor:w,range:S,props:L}){let T=g({editor:w,range:S});nj({editor:w,range:T,props:L,customBlocks:e})}function g({editor:w,range:S}){let L=o.getState(w.view.state).query?.length||0;return S.to=S.to+L,S}function _({event:w}){let{key:S}=w;return S==="Escape"?(w.stopImmediatePropagation(),i.hide(),!0):S==="Enter"?(r.instance.execCommand(),!0):S==="ArrowDown"||S==="ArrowUp"?(r.instance.updateSelection(w),!0):!1}function v({editor:w}){i?.destroy(),w.commands.freezeScroll(!1),r?.destroy(),r=null,s.next(!0),s.complete()}return mt.create({name:"actionsMenu",addOptions(){return{pluginKey:"actionsMenu",element:null,suggestion:{char:"/",pluginKey:o,allowSpaces:!0,startOfLine:!0,render:()=>({onBeforeStart:c,onStart:l,onKeyDown:_,onExit:v}),items:({query:w})=>(r&&r.instance.filterItems(w),[])}}},addCommands(){return{addHeading:({range:w,type:S})=>({chain:L})=>L().focus().deleteRange(w).toggleHeading({level:S.level}).focus().run(),addContentletBlock:({range:w,payload:S})=>({chain:L})=>L().deleteRange(w).command(T=>{let q=T.editor.schema.nodes.dotContent.create({data:S});return T.tr.replaceSelectionWith(q),!0}).run(),addNextLine:()=>({chain:w})=>w().command(S=>{let{selection:L}=S.state;return S.commands.insertContentAt(L.head,{type:"paragraph"}),!0}).focus().run()}},addProseMirrorPlugins(){return[V6({command:nj,editor:this.editor,render:()=>({onStart:l,onKeyDown:_,onExit:v})}),O6(I({editor:this.editor},this.options.suggestion))]}})};var oj=["*"];function Lhe(n,e){n&1&&ye(0)}function Phe(n,e){if(n&1&&(oe(0),x(1,Lhe,1,0,"ng-container",3),se()),n&2){let t=y(2);m(),f("ngTemplateOutlet",t.contentTemplate)}}function Rhe(n,e){if(n&1&&(b(0,"div",1),Vt(1),x(2,Phe,2,1,"ng-container",2),C()),n&2){let t=y();f("hidden",!t.selected),O("id",t.tabView.getTabContentId(t.id))("aria-hidden",!t.selected)("aria-labelledby",t.tabView.getTabHeaderActionId(t.id))("data-pc-name","tabpanel"),m(2),f("ngIf",t.contentTemplate&&(t.cache?t.loaded:t.selected))}}var Fhe=["content"],jhe=["navbar"],Vhe=["prevBtn"],Bhe=["nextBtn"],zhe=["inkbar"],Uhe=["elementToObserve"],Hhe=n=>({"p-tabview p-component":!0,"p-tabview-scrollable":n}),$he=(n,e)=>({"p-highlight":n,"p-disabled":e});function Whe(n,e){n&1&&E(0,"ChevronLeftIcon"),n&2&&O("aria-hidden",!0)}function Ghe(n,e){}function qhe(n,e){n&1&&x(0,Ghe,0,0,"ng-template")}function Qhe(n,e){if(n&1){let t=$();b(0,"button",15,4),P("click",function(){M(t);let r=y();return D(r.navBackward())}),x(2,Whe,1,1,"ChevronLeftIcon",16)(3,qhe,1,0,null,17),C()}if(n&2){let t=y();O("tabindex",t.tabindex)("aria-label",t.prevButtonAriaLabel),m(2),f("ngIf",!t.previousIconTemplate),m(),f("ngTemplateOutlet",t.previousIconTemplate)}}function Khe(n,e){if(n&1&&E(0,"span",26),n&2){let t=y(3).$implicit;f("ngClass",t.leftIcon)}}function Yhe(n,e){}function Zhe(n,e){n&1&&x(0,Yhe,0,0,"ng-template")}function Jhe(n,e){if(n&1&&(b(0,"span",27),x(1,Zhe,1,0,null,17),C()),n&2){let t=y(3).$implicit;m(),f("ngTemplateOutlet",t.leftIconTemplate)}}function Xhe(n,e){if(n&1&&E(0,"span",28),n&2){let t=y(3).$implicit;f("ngClass",t.rightIcon)}}function efe(n,e){}function tfe(n,e){n&1&&x(0,efe,0,0,"ng-template")}function nfe(n,e){if(n&1&&(b(0,"span",29),x(1,tfe,1,0,null,17),C()),n&2){let t=y(3).$implicit;m(),f("ngTemplateOutlet",t.rightIconTemplate)}}function ife(n,e){if(n&1&&(oe(0),x(1,Khe,1,1,"span",21)(2,Jhe,2,1,"span",22),b(3,"span",23),Z(4),C(),x(5,Xhe,1,1,"span",24)(6,nfe,2,1,"span",25),se()),n&2){let t=y(2).$implicit;m(),f("ngIf",t.leftIcon&&!t.leftIconTemplate),m(),f("ngIf",t.leftIconTemplate),m(2),Pe(t.header),m(),f("ngIf",t.rightIcon&&!t.rightIconTemplate),m(),f("ngIf",t.rightIconTemplate)}}function rfe(n,e){n&1&&ye(0)}function ofe(n,e){if(n&1){let t=$();b(0,"TimesIcon",32),P("click",function(r){M(t);let o=y(3).$implicit,s=y();return D(s.close(r,o))}),C()}n&2&&f("styleClass","p-tabview-close")}function sfe(n,e){n&1&&E(0,"span",33)}function afe(n,e){}function lfe(n,e){n&1&&x(0,afe,0,0,"ng-template")}function cfe(n,e){if(n&1&&(oe(0),x(1,ofe,1,1,"TimesIcon",30)(2,sfe,1,0,"span",31)(3,lfe,1,0,null,17),se()),n&2){let t=y(2).$implicit;m(),f("ngIf",!t.closeIconTemplate),m(),f("ngIf",t.closeIconTemplate),m(),f("ngTemplateOutlet",t.closeIconTemplate)}}function ufe(n,e){if(n&1){let t=$();b(0,"li",19)(1,"a",20),P("click",function(r){M(t);let o=y().$implicit,s=y();return D(s.open(r,o))})("keydown",function(r){M(t);let o=y().$implicit,s=y();return D(s.onTabKeyDown(r,o))}),x(2,ife,7,5,"ng-container",16)(3,rfe,1,0,"ng-container",17)(4,cfe,4,3,"ng-container",16),C()()}if(n&2){let t=y(),i=t.$implicit,r=t.index,o=y();W(i.headerStyleClass),f("ngClass",_t(19,$he,i.selected,i.disabled))("ngStyle",i.headerStyle),O("data-p-disabled",i.disabled),m(),f("pTooltip",i.tooltip)("tooltipPosition",i.tooltipPosition)("positionStyle",i.tooltipPositionStyle)("tooltipStyleClass",i.tooltipStyleClass),O("id",o.getTabHeaderActionId(i.id))("aria-controls",o.getTabContentId(i.id))("aria-selected",i.selected)("tabindex",i.disabled||!i.selected?"-1":o.tabindex)("aria-disabled",i.disabled)("data-pc-index",r)("data-pc-section","headeraction"),m(),f("ngIf",!i.headerTemplate),m(),f("ngTemplateOutlet",i.headerTemplate),m(),f("ngIf",i.closable)}}function dfe(n,e){if(n&1&&x(0,ufe,5,22,"li",18),n&2){let t=e.$implicit;f("ngIf",!t.closed)}}function pfe(n,e){n&1&&E(0,"ChevronRightIcon"),n&2&&O("aria-hidden",!0)}function hfe(n,e){}function ffe(n,e){n&1&&x(0,hfe,0,0,"ng-template")}function mfe(n,e){if(n&1){let t=$();b(0,"button",34,5),P("click",function(){M(t);let r=y();return D(r.navForward())}),x(2,pfe,1,1,"ChevronRightIcon",16)(3,ffe,1,0,null,17),C()}if(n&2){let t=y();O("tabindex",t.tabindex)("aria-label",t.nextButtonAriaLabel),m(2),f("ngIf",!t.nextIconTemplate),m(),f("ngTemplateOutlet",t.nextIconTemplate)}}var mM=(()=>{class n{el;viewContainer;cd;closable=!1;get headerStyle(){return this._headerStyle}set headerStyle(t){this._headerStyle=t,this.tabView.cd.markForCheck()}get headerStyleClass(){return this._headerStyleClass}set headerStyleClass(t){this._headerStyleClass=t,this.tabView.cd.markForCheck()}cache=!0;tooltip;tooltipPosition="top";tooltipPositionStyle="absolute";tooltipStyleClass;get selected(){return!!this._selected}set selected(t){this._selected=t,this.loaded||this.cd.detectChanges(),t&&(this.loaded=!0)}get disabled(){return!!this._disabled}set disabled(t){this._disabled=t,this.tabView.cd.markForCheck()}get header(){return this._header}set header(t){this._header=t,Promise.resolve().then(()=>{this.tabView.updateInkBar(),this.tabView.cd.markForCheck()})}get leftIcon(){return this._leftIcon}set leftIcon(t){this._leftIcon=t,this.tabView.cd.markForCheck()}get rightIcon(){return this._rightIcon}set rightIcon(t){this._rightIcon=t,this.tabView.cd.markForCheck()}templates;closed=!1;view=null;_headerStyle;_headerStyleClass;_selected;_disabled;_header;_leftIcon;_rightIcon=void 0;loaded=!1;id;contentTemplate;headerTemplate;leftIconTemplate;rightIconTemplate;closeIconTemplate;tabView;constructor(t,i,r,o){this.el=i,this.viewContainer=r,this.cd=o,this.tabView=t,this.id=nt()}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this.headerTemplate=t.template;break;case"content":this.contentTemplate=t.template;break;case"righticon":this.rightIconTemplate=t.template;break;case"lefticon":this.leftIconTemplate=t.template;break;case"closeicon":this.closeIconTemplate=t.template;break;default:this.contentTemplate=t.template;break}})}ngOnDestroy(){this.view=null}static \u0275fac=function(i){return new(i||n)(k(dn(()=>gM)),k(Ce),k(Un),k(De))};static \u0275cmp=F({type:n,selectors:[["p-tabPanel"]],contentQueries:function(i,r,o){if(i&1&&Je(o,qe,4),i&2){let s;J(s=X())&&(r.templates=s)}},hostAttrs:[1,"p-element"],inputs:{closable:[2,"closable","closable",V],headerStyle:"headerStyle",headerStyleClass:"headerStyleClass",cache:[2,"cache","cache",V],tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",selected:"selected",disabled:"disabled",header:"header",leftIcon:"leftIcon",rightIcon:"rightIcon"},features:[$e],ngContentSelectors:oj,decls:1,vars:1,consts:[["class","p-tabview-panel","role","tabpanel",3,"hidden",4,"ngIf"],["role","tabpanel",1,"p-tabview-panel",3,"hidden"],[4,"ngIf"],[4,"ngTemplateOutlet"]],template:function(i,r){i&1&&(ln(),x(0,Rhe,3,6,"div",0)),i&2&&f("ngIf",!r.closed)},dependencies:[ot,Mt],encapsulation:2})}return n})(),gM=(()=>{class n{platformId;el;cd;renderer;style;styleClass;controlClose;scrollable;get activeIndex(){return this._activeIndex}set activeIndex(t){if(this._activeIndex=t,this.preventActiveIndexPropagation){this.preventActiveIndexPropagation=!1;return}this.tabs&&this.tabs.length&&this._activeIndex!=null&&this.tabs.length>this._activeIndex&&(this.findSelectedTab().selected=!1,this.tabs[this._activeIndex].selected=!0,this.tabChanged=!0,this.updateScrollBar(t))}selectOnFocus=!1;nextButtonAriaLabel;prevButtonAriaLabel;autoHideButtons=!0;tabindex=0;onChange=new j;onClose=new j;activeIndexChange=new j;content;navbar;prevBtn;nextBtn;inkbar;tabPanels;templates;initialized;tabs;_activeIndex;preventActiveIndexPropagation;tabChanged;backwardIsDisabled=!0;forwardIsDisabled=!1;tabChangesSubscription;nextIconTemplate;previousIconTemplate;resizeObserver;container;list;buttonVisible;elementToObserve;constructor(t,i,r,o){this.platformId=t,this.el=i,this.cd=r,this.renderer=o}ngAfterContentInit(){this.initTabs(),this.tabChangesSubscription=this.tabPanels.changes.subscribe(t=>{this.initTabs(),this.refreshButtonState(),this.callResizeObserver()}),this.templates.forEach(t=>{switch(t.getType()){case"previousicon":this.previousIconTemplate=t.template;break;case"nexticon":this.nextIconTemplate=t.template;break}})}callResizeObserver(){Dt(this.platformId)&&this.autoHideButtons&&this.bindResizeObserver()}ngAfterViewInit(){this.callResizeObserver()}bindResizeObserver(){this.container=A.findSingle(this.el.nativeElement,'[data-pc-section="navcontent"]'),this.list=A.findSingle(this.el.nativeElement,'[data-pc-section="nav"]'),this.resizeObserver=new ResizeObserver(()=>{this.list.offsetWidth>=this.container.offsetWidth?this.buttonVisible=!0:this.buttonVisible=!1,this.updateButtonState(),this.cd.detectChanges()}),this.resizeObserver.observe(this.container)}unbindResizeObserver(){this.resizeObserver.unobserve(this.elementToObserve.nativeElement),this.resizeObserver=null}ngAfterViewChecked(){Dt(this.platformId)&&this.tabChanged&&(this.updateInkBar(),this.tabChanged=!1)}ngOnDestroy(){this.tabChangesSubscription&&this.tabChangesSubscription.unsubscribe(),this.resizeObserver&&this.unbindResizeObserver()}getTabHeaderActionId(t){return`${t}_header_action`}getTabContentId(t){return`${t}_content`}initTabs(){this.tabs=this.tabPanels.toArray(),!this.findSelectedTab()&&this.tabs.length&&(this.activeIndex!=null&&this.tabs.length>this.activeIndex?this.tabs[this.activeIndex].selected=!0:this.tabs[0].selected=!0,this.tabChanged=!0),this.cd.markForCheck()}onTabKeyDown(t,i){switch(t.code){case"ArrowLeft":this.onTabArrowLeftKey(t);break;case"ArrowRight":this.onTabArrowRightKey(t);break;case"Home":this.onTabHomeKey(t);break;case"End":this.onTabEndKey(t);break;case"PageDown":this.onTabEndKey(t);break;case"PageUp":this.onTabHomeKey(t);break;case"Enter":case"Space":this.open(t,i);break;default:break}}onTabArrowLeftKey(t){let i=this.findPrevHeaderAction(t.target.parentElement),r=A.getAttribute(i,"data-pc-index");i?this.changeFocusedTab(t,i,r):this.onTabEndKey(t),t.preventDefault()}onTabArrowRightKey(t){let i=this.findNextHeaderAction(t.target.parentElement),r=A.getAttribute(i,"data-pc-index");i?this.changeFocusedTab(t,i,r):this.onTabHomeKey(t),t.preventDefault()}onTabHomeKey(t){let i=this.findFirstHeaderAction(),r=A.getAttribute(i,"data-pc-index");this.changeFocusedTab(t,i,r),t.preventDefault()}onTabEndKey(t){let i=this.findLastHeaderAction(),r=A.getAttribute(i,"data-pc-index");this.changeFocusedTab(t,i,r),t.preventDefault()}changeFocusedTab(t,i,r){if(i&&(A.focus(i),i.scrollIntoView({block:"nearest"}),this.selectOnFocus)){let o=this.tabs[r];this.open(t,o)}}findNextHeaderAction(t,i=!1){let r=i?t:t.nextElementSibling;return r?A.getAttribute(r,"data-p-disabled")||A.getAttribute(r,"data-pc-section")==="inkbar"?this.findNextHeaderAction(r):A.findSingle(r,'[data-pc-section="headeraction"]'):null}findPrevHeaderAction(t,i=!1){let r=i?t:t.previousElementSibling;return r?A.getAttribute(r,"data-p-disabled")||A.getAttribute(r,"data-pc-section")==="inkbar"?this.findPrevHeaderAction(r):A.findSingle(r,'[data-pc-section="headeraction"]'):null}findFirstHeaderAction(){let t=this.navbar.nativeElement.firstElementChild;return this.findNextHeaderAction(t,!0)}findLastHeaderAction(){let t=this.navbar.nativeElement.lastElementChild,i=A.getAttribute(t,"data-pc-section")==="inkbar"?t.previousElementSibling:t;return this.findPrevHeaderAction(i,!0)}open(t,i){if(i.disabled){t&&t.preventDefault();return}if(!i.selected){let r=this.findSelectedTab();r&&(r.selected=!1),this.tabChanged=!0,i.selected=!0;let o=this.findTabIndex(i);this.preventActiveIndexPropagation=!0,this.activeIndexChange.emit(o),this.onChange.emit({originalEvent:t,index:o}),this.updateScrollBar(o)}t&&t.preventDefault()}close(t,i){this.controlClose?this.onClose.emit({originalEvent:t,index:this.findTabIndex(i),close:()=>{this.closeTab(i)}}):(this.closeTab(i),this.onClose.emit({originalEvent:t,index:this.findTabIndex(i)}))}closeTab(t){if(!t.disabled){if(t.selected){this.tabChanged=!0,t.selected=!1;for(let i=0;i{this.updateInkBar()})}}findSelectedTab(){for(let t=0;t=this.container.offsetWidth&&(this.list.offsetWidth>=this.container.offsetWidth?this.buttonVisible=!0:this.buttonVisible=!1,this.updateButtonState(),this.cd.markForCheck())}onScroll(t){this.scrollable&&this.updateButtonState(),t.preventDefault()}getVisibleButtonWidths(){return[this.prevBtn?.nativeElement,this.nextBtn?.nativeElement].reduce((t,i)=>i?t+A.getWidth(i):t,0)}navBackward(){let t=this.content.nativeElement,i=A.getWidth(t)-this.getVisibleButtonWidths(),r=t.scrollLeft-i;t.scrollLeft=r<=0?0:r}navForward(){let t=this.content.nativeElement,i=A.getWidth(t)-this.getVisibleButtonWidths(),r=t.scrollLeft+i,o=t.scrollWidth-i;t.scrollLeft=r>=o?o:r}static \u0275fac=function(i){return new(i||n)(k(Nt),k(Ce),k(De),k(At))};static \u0275cmp=F({type:n,selectors:[["p-tabView"]],contentQueries:function(i,r,o){if(i&1&&(Je(o,mM,4),Je(o,qe,4)),i&2){let s;J(s=X())&&(r.tabPanels=s),J(s=X())&&(r.templates=s)}},viewQuery:function(i,r){if(i&1&&(fe(Fhe,5),fe(jhe,5),fe(Vhe,5),fe(Bhe,5),fe(zhe,5),fe(Uhe,5)),i&2){let o;J(o=X())&&(r.content=o.first),J(o=X())&&(r.navbar=o.first),J(o=X())&&(r.prevBtn=o.first),J(o=X())&&(r.nextBtn=o.first),J(o=X())&&(r.inkbar=o.first),J(o=X())&&(r.elementToObserve=o.first)}},hostAttrs:[1,"p-element"],inputs:{style:"style",styleClass:"styleClass",controlClose:[2,"controlClose","controlClose",V],scrollable:[2,"scrollable","scrollable",V],activeIndex:"activeIndex",selectOnFocus:[2,"selectOnFocus","selectOnFocus",V],nextButtonAriaLabel:"nextButtonAriaLabel",prevButtonAriaLabel:"prevButtonAriaLabel",autoHideButtons:[2,"autoHideButtons","autoHideButtons",V],tabindex:[2,"tabindex","tabindex",Ke]},outputs:{onChange:"onChange",onClose:"onClose",activeIndexChange:"activeIndexChange"},features:[$e],ngContentSelectors:oj,decls:14,vars:13,consts:[["elementToObserve",""],["content",""],["navbar",""],["inkbar",""],["prevBtn",""],["nextBtn",""],[3,"ngClass","ngStyle"],[1,"p-tabview-nav-container"],["class","p-tabview-nav-prev p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-nav-content",3,"scroll"],["role","tablist",1,"p-tabview-nav"],["ngFor","",3,"ngForOf"],["role","presentation","aria-hidden","true",1,"p-tabview-ink-bar"],["class","p-tabview-nav-next p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-panels"],["type","button","pRipple","",1,"p-tabview-nav-prev","p-tabview-nav-btn","p-link",3,"click"],[4,"ngIf"],[4,"ngTemplateOutlet"],["role","presentation",3,"ngClass","ngStyle","class",4,"ngIf"],["role","presentation",3,"ngClass","ngStyle"],["role","tab","pRipple","",1,"p-tabview-nav-link",3,"click","keydown","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass"],["class","p-tabview-left-icon",3,"ngClass",4,"ngIf"],["class","p-tabview-left-icon",4,"ngIf"],[1,"p-tabview-title"],["class","p-tabview-right-icon",3,"ngClass",4,"ngIf"],["class","p-tabview-right-icon",4,"ngIf"],[1,"p-tabview-left-icon",3,"ngClass"],[1,"p-tabview-left-icon"],[1,"p-tabview-right-icon",3,"ngClass"],[1,"p-tabview-right-icon"],[3,"styleClass","click",4,"ngIf"],["class","tab.closeIconTemplate",4,"ngIf"],[3,"click","styleClass"],[1,"tab.closeIconTemplate"],["type","button","pRipple","",1,"p-tabview-nav-next","p-tabview-nav-btn","p-link",3,"click"]],template:function(i,r){if(i&1){let o=$();ln(),b(0,"div",6)(1,"div",7,0),x(3,Qhe,4,4,"button",8),b(4,"div",9,1),P("scroll",function(a){return M(o),D(r.onScroll(a))}),b(6,"ul",10,2),x(8,dfe,1,1,"ng-template",11),E(9,"li",12,3),C()(),x(11,mfe,4,4,"button",13),C(),b(12,"div",14),Vt(13),C()()}i&2&&(W(r.styleClass),f("ngClass",_e(11,Hhe,r.scrollable))("ngStyle",r.style),O("data-pc-name","tabview"),m(3),f("ngIf",r.scrollable&&!r.backwardIsDisabled&&r.autoHideButtons),m(),O("data-pc-section","navcontent"),m(2),O("data-pc-section","nav"),m(2),f("ngForOf",r.tabs),m(),O("data-pc-section","inkbar"),m(2),f("ngIf",r.scrollable&&!r.forwardIsDisabled&&r.buttonVisible))},dependencies:()=>[Ye,Ui,ot,Mt,st,Hu,Hn,Xt,sc,ls],styles:[`@layer primeng{.p-tabview-nav-container{position:relative}.p-tabview-scrollable .p-tabview-nav-container{overflow:hidden}.p-tabview-nav-content{overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior:contain auto}.p-tabview-nav{display:inline-flex;min-width:100%;margin:0;padding:0;list-style-type:none;flex:1 1 auto}.p-tabview-nav-link{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;position:relative;text-decoration:none;overflow:hidden}.p-tabview-ink-bar{display:none;z-index:1}.p-tabview-nav-link:focus{z-index:1}.p-tabview-title{line-height:1;white-space:nowrap}.p-tabview-nav-btn{position:absolute;top:0;z-index:2;height:100%;display:flex;align-items:center;justify-content:center}.p-tabview-nav-prev{left:0}.p-tabview-nav-next{right:0}.p-tabview-nav-content::-webkit-scrollbar{display:none}.p-tabview-close{z-index:1}} +`],encapsulation:2,changeDetection:0})}return n})(),yM=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Ge,gr,Ln,Xt,sc,ls,Ge]})}return n})();var sj=n=>{switch(n.target.error.code){case n.target.error.MEDIA_ERR_ABORTED:return"You aborted the video playback.";case n.target.error.MEDIA_ERR_NETWORK:return"A network error caused the video download to fail part-way.";case n.target.error.MEDIA_ERR_DECODE:return'Video playback aborted due to browser compatibility issues. Try a different browser or visit MDN Video Support for more information.';case n.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:return'Invalid URL. Please provide a URL to a .mp4, .webm, .ogv video file, or a YouTube video link. For more info on supported video formats and containers, visit MDN Video Format Support.';default:return'An unknown error occurred. Please contact support'}};var yfe=["input"],_fe="^((http|https)://)[-a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)$",vfe=/(youtube\.com\/watch\?v=.*)|(youtu\.be\/.*)/,aj=(()=>{let e=class e{get placerHolder(){return`https://example.com/${this.type==="video"?"video.mp4":"image.jpg"}`}get error(){return this.form.controls.url?.errors?.message||""}get isInvalid(){return this.form.controls.url?.invalid}constructor(i,r){this.fb=i,this.cd=r,this.addAsset=new j,this.disableAction=!1,this.form=this.fb.group({url:["",[Si.required,Si.pattern(_fe)]]}),this.form.valueChanges.subscribe(({url:o})=>{this.disableAction=!1,this.type==="video"&&!this.isInvalid&&!o.match(vfe)&&this.tryToPlayVideo(o)}),requestAnimationFrame(()=>this.input.nativeElement.focus())}onSubmit({url:i}){this.addAsset.emit(i)}tryToPlayVideo(i){let r=document.createElement("video");this.disableAction=!0,r.addEventListener("error",o=>{this.form.controls.url.setErrors({message:sj(o)}),this.cd.detectChanges()}),r.addEventListener("canplay",()=>{this.form.controls.url.setErrors(null),this.disableAction=!1,this.cd.detectChanges()}),r.src=`${i}#t=0.1`}};e.\u0275fac=function(r){return new(r||e)(k(Au),k(De))},e.\u0275cmp=F({type:e,selectors:[["dot-external-asset"]],viewQuery:function(r,o){if(r&1&&fe(yfe,5),r&2){let s;J(s=X())&&(o.input=s.first)}},inputs:{type:"type"},outputs:{addAsset:"addAsset"},decls:10,vars:7,consts:[["input",""],[1,"wrapper",3,"ngSubmit","formGroup"],[1,"form-control"],["dotFieldRequired","","for","url"],["id","url","formControlName","url","autocomplete","off","type","text","pInputText","",3,"placeholder"],[1,"footer"],[1,"error-message",3,"innerHTML"],["type","submit","pButton","",3,"disabled"]],template:function(r,o){if(r&1){let s=$();b(0,"form",1),P("ngSubmit",function(){return M(s),D(o.onSubmit(o.form.value))}),b(1,"div",2)(2,"label",3),Z(3),C(),E(4,"input",4,0),C(),b(6,"div",5),E(7,"span",6),b(8,"button",7),Z(9,"Insert"),C()()()}r&2&&(f("formGroup",o.form),m(3),yt("Insert ",o.type," URL"),m(),f("placeholder",o.placerHolder),m(3),Gt("hide",!o.isInvalid||o.form.pristine),f("innerHTML",o.error||"Enter a valid url",Go),m(),f("disabled",o.form.invalid||o.disableAction))},dependencies:[Zo,Pr,Rr,Yo,$i,po,zt,ns],styles:["[_nghost-%COMP%]{width:100%}.wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-end;flex-direction:column;padding:2rem;gap:1rem}.form-control[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.75rem}.footer[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between}.error-message[_ngcontent-%COMP%]{color:#d82b2e;font-size:.75rem;text-align:left;max-width:30rem}.hide[_ngcontent-%COMP%]{visibility:hidden}"],changeDetection:0});let n=e;return n})();var lj=oi("shakeit",[ku("shakestart",Ct({transform:"scale(1.1)"})),ku("shakeend",Ct({transform:"scale(1)"})),mn("shakestart => shakeend",fn("1000ms ease-in",jN([Ct({transform:"translate3d(-2px, 0, 0)",offset:.1}),Ct({transform:"translate3d(4px, 0, 0)",offset:.2}),Ct({transform:"translate3d(-4px, 0, 0)",offset:.3}),Ct({transform:"translate3d(4px, 0, 0)",offset:.4}),Ct({transform:"translate3d(-4px, 0, 0)",offset:.5}),Ct({transform:"translate3d(4px, 0, 0)",offset:.6}),Ct({transform:"translate3d(-4px, 0, 0)",offset:.7}),Ct({transform:"translate3d(4px, 0, 0)",offset:.8}),Ct({transform:"translate3d(-2px, 0, 0)",offset:.9})])))]);var _M=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["UploadIcon"]],standalone:!0,features:[xe,ue],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.58942 9.82197C6.70165 9.93405 6.85328 9.99793 7.012 10C7.17071 9.99793 7.32234 9.93405 7.43458 9.82197C7.54681 9.7099 7.61079 9.55849 7.61286 9.4V2.04798L9.79204 4.22402C9.84752 4.28011 9.91365 4.32457 9.98657 4.35479C10.0595 4.38502 10.1377 4.40039 10.2167 4.40002C10.2956 4.40039 10.3738 4.38502 10.4467 4.35479C10.5197 4.32457 10.5858 4.28011 10.6413 4.22402C10.7538 4.11152 10.817 3.95902 10.817 3.80002C10.817 3.64102 10.7538 3.48852 10.6413 3.37602L7.45127 0.190618C7.44656 0.185584 7.44176 0.180622 7.43687 0.175736C7.32419 0.063214 7.17136 0 7.012 0C6.85264 0 6.69981 0.063214 6.58712 0.175736C6.58181 0.181045 6.5766 0.186443 6.5715 0.191927L3.38282 3.37602C3.27669 3.48976 3.2189 3.6402 3.22165 3.79564C3.2244 3.95108 3.28746 4.09939 3.39755 4.20932C3.50764 4.31925 3.65616 4.38222 3.81182 4.38496C3.96749 4.3877 4.11814 4.33001 4.23204 4.22402L6.41113 2.04807V9.4C6.41321 9.55849 6.47718 9.7099 6.58942 9.82197ZM11.9952 14H2.02883C1.751 13.9887 1.47813 13.9228 1.22584 13.8061C0.973545 13.6894 0.746779 13.5241 0.558517 13.3197C0.370254 13.1154 0.22419 12.876 0.128681 12.6152C0.0331723 12.3545 -0.00990605 12.0775 0.0019109 11.8V9.40005C0.0019109 9.24092 0.065216 9.08831 0.1779 8.97579C0.290584 8.86326 0.443416 8.80005 0.602775 8.80005C0.762134 8.80005 0.914966 8.86326 1.02765 8.97579C1.14033 9.08831 1.20364 9.24092 1.20364 9.40005V11.8C1.18295 12.0376 1.25463 12.274 1.40379 12.4602C1.55296 12.6463 1.76817 12.7681 2.00479 12.8H11.9952C12.2318 12.7681 12.447 12.6463 12.5962 12.4602C12.7453 12.274 12.817 12.0376 12.7963 11.8V9.40005C12.7963 9.24092 12.8596 9.08831 12.9723 8.97579C13.085 8.86326 13.2378 8.80005 13.3972 8.80005C13.5565 8.80005 13.7094 8.86326 13.8221 8.97579C13.9347 9.08831 13.998 9.24092 13.998 9.40005V11.8C14.022 12.3563 13.8251 12.8996 13.45 13.3116C13.0749 13.7236 12.552 13.971 11.9952 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1),C(),b(3,"defs")(4,"clipPath",2),E(5,"rect",3),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(3),f("id",r.pathId))},encapsulation:2})}return n})();var vM=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["ExclamationTriangleIcon"]],standalone:!0,features:[xe,ue],decls:8,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M13.4018 13.1893H0.598161C0.49329 13.189 0.390283 13.1615 0.299143 13.1097C0.208003 13.0578 0.131826 12.9832 0.0780112 12.8932C0.0268539 12.8015 0 12.6982 0 12.5931C0 12.4881 0.0268539 12.3848 0.0780112 12.293L6.47985 1.08982C6.53679 1.00399 6.61408 0.933574 6.70484 0.884867C6.7956 0.836159 6.897 0.810669 7 0.810669C7.103 0.810669 7.2044 0.836159 7.29516 0.884867C7.38592 0.933574 7.46321 1.00399 7.52015 1.08982L13.922 12.293C13.9731 12.3848 14 12.4881 14 12.5931C14 12.6982 13.9731 12.8015 13.922 12.8932C13.8682 12.9832 13.792 13.0578 13.7009 13.1097C13.6097 13.1615 13.5067 13.189 13.4018 13.1893ZM1.63046 11.989H12.3695L7 2.59425L1.63046 11.989Z","fill","currentColor"],["d","M6.99996 8.78801C6.84143 8.78594 6.68997 8.72204 6.57787 8.60993C6.46576 8.49782 6.40186 8.34637 6.39979 8.18784V5.38703C6.39979 5.22786 6.46302 5.0752 6.57557 4.96265C6.68813 4.85009 6.84078 4.78686 6.99996 4.78686C7.15914 4.78686 7.31179 4.85009 7.42435 4.96265C7.5369 5.0752 7.60013 5.22786 7.60013 5.38703V8.18784C7.59806 8.34637 7.53416 8.49782 7.42205 8.60993C7.30995 8.72204 7.15849 8.78594 6.99996 8.78801Z","fill","currentColor"],["d","M6.99996 11.1887C6.84143 11.1866 6.68997 11.1227 6.57787 11.0106C6.46576 10.8985 6.40186 10.7471 6.39979 10.5885V10.1884C6.39979 10.0292 6.46302 9.87658 6.57557 9.76403C6.68813 9.65147 6.84078 9.58824 6.99996 9.58824C7.15914 9.58824 7.31179 9.65147 7.42435 9.76403C7.5369 9.87658 7.60013 10.0292 7.60013 10.1884V10.5885C7.59806 10.7471 7.53416 10.8985 7.42205 11.0106C7.30995 11.1227 7.15849 11.1866 6.99996 11.1887Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1)(3,"path",2)(4,"path",3),C(),b(5,"defs")(6,"clipPath",4),E(7,"rect",5),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(5),f("id",r.pathId))},encapsulation:2})}return n})();var bM=(()=>{class n extends Ue{pathId;ngOnInit(){this.pathId="url(#"+nt()+")"}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Oe(n)))(r||n)}})();static \u0275cmp=F({type:n,selectors:[["InfoCircleIcon"]],standalone:!0,features:[xe,ue],decls:6,vars:7,consts:[["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.11101 12.8203C4.26215 13.5895 5.61553 14 7 14C8.85652 14 10.637 13.2625 11.9497 11.9497C13.2625 10.637 14 8.85652 14 7C14 5.61553 13.5895 4.26215 12.8203 3.11101C12.0511 1.95987 10.9579 1.06266 9.67879 0.532846C8.3997 0.00303296 6.99224 -0.13559 5.63437 0.134506C4.2765 0.404603 3.02922 1.07129 2.05026 2.05026C1.07129 3.02922 0.404603 4.2765 0.134506 5.63437C-0.13559 6.99224 0.00303296 8.3997 0.532846 9.67879C1.06266 10.9579 1.95987 12.0511 3.11101 12.8203ZM3.75918 2.14976C4.71846 1.50879 5.84628 1.16667 7 1.16667C8.5471 1.16667 10.0308 1.78125 11.1248 2.87521C12.2188 3.96918 12.8333 5.45291 12.8333 7C12.8333 8.15373 12.4912 9.28154 11.8502 10.2408C11.2093 11.2001 10.2982 11.9478 9.23232 12.3893C8.16642 12.8308 6.99353 12.9463 5.86198 12.7212C4.73042 12.4962 3.69102 11.9406 2.87521 11.1248C2.05941 10.309 1.50384 9.26958 1.27876 8.13803C1.05367 7.00647 1.16919 5.83358 1.61071 4.76768C2.05222 3.70178 2.79989 2.79074 3.75918 2.14976ZM7.00002 4.8611C6.84594 4.85908 6.69873 4.79698 6.58977 4.68801C6.48081 4.57905 6.4187 4.43185 6.41669 4.27776V3.88888C6.41669 3.73417 6.47815 3.58579 6.58754 3.4764C6.69694 3.367 6.84531 3.30554 7.00002 3.30554C7.15473 3.30554 7.3031 3.367 7.4125 3.4764C7.52189 3.58579 7.58335 3.73417 7.58335 3.88888V4.27776C7.58134 4.43185 7.51923 4.57905 7.41027 4.68801C7.30131 4.79698 7.1541 4.85908 7.00002 4.8611ZM7.00002 10.6945C6.84594 10.6925 6.69873 10.6304 6.58977 10.5214C6.48081 10.4124 6.4187 10.2652 6.41669 10.1111V6.22225C6.41669 6.06754 6.47815 5.91917 6.58754 5.80977C6.69694 5.70037 6.84531 5.63892 7.00002 5.63892C7.15473 5.63892 7.3031 5.70037 7.4125 5.80977C7.52189 5.91917 7.58335 6.06754 7.58335 6.22225V10.1111C7.58134 10.2652 7.51923 10.4124 7.41027 10.5214C7.30131 10.6304 7.1541 10.6925 7.00002 10.6945Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(i,r){i&1&&(Ne(),b(0,"svg",0)(1,"g"),E(2,"path",1),C(),b(3,"defs")(4,"clipPath",2),E(5,"rect",3),C()()()),i&2&&(W(r.getClassNames()),O("aria-label",r.ariaLabel)("aria-hidden",r.ariaHidden)("role",r.role),m(),O("clip-path",r.pathId),m(3),f("id",r.pathId))},encapsulation:2})}return n})();var Cfe=(n,e)=>({showTransitionParams:n,hideTransitionParams:e}),wfe=n=>({value:"visible",params:n});function Ife(n,e){if(n&1&&E(0,"span"),n&2){let t=y().$implicit;W("p-message-icon pi "+t.icon),O("data-pc-section","icon")}}function xfe(n,e){n&1&&E(0,"CheckIcon"),n&2&&O("data-pc-section","icon")}function Tfe(n,e){n&1&&E(0,"InfoCircleIcon"),n&2&&O("data-pc-section","icon")}function Efe(n,e){n&1&&E(0,"TimesCircleIcon"),n&2&&O("data-pc-section","icon")}function Sfe(n,e){n&1&&E(0,"ExclamationTriangleIcon"),n&2&&O("data-pc-section","icon")}function Mfe(n,e){if(n&1&&(b(0,"span",10),oe(1),x(2,xfe,1,1,"CheckIcon",11)(3,Tfe,1,1,"InfoCircleIcon",11)(4,Efe,1,1,"TimesCircleIcon",11)(5,Sfe,1,1,"ExclamationTriangleIcon",11),se(),C()),n&2){let t=y().$implicit;m(2),f("ngIf",t.severity==="success"),m(),f("ngIf",t.severity==="info"),m(),f("ngIf",t.severity==="error"),m(),f("ngIf",t.severity==="warn")}}function Dfe(n,e){if(n&1&&E(0,"span",14),n&2){let t=y(2).$implicit;f("innerHTML",t.summary,Go),O("data-pc-section","summary")}}function Ofe(n,e){if(n&1&&E(0,"span",15),n&2){let t=y(2).$implicit;f("innerHTML",t.detail,Go),O("data-pc-section","detail")}}function Afe(n,e){if(n&1&&(oe(0),x(1,Dfe,1,2,"span",12)(2,Ofe,1,2,"span",13),se()),n&2){let t=y().$implicit;m(),f("ngIf",t.summary),m(),f("ngIf",t.detail)}}function kfe(n,e){if(n&1&&(b(0,"span",18),Z(1),C()),n&2){let t=y(2).$implicit;O("data-pc-section","summary"),m(),Pe(t.summary)}}function Nfe(n,e){if(n&1&&(b(0,"span",19),Z(1),C()),n&2){let t=y(2).$implicit;O("data-pc-section","detail"),m(),Pe(t.detail)}}function Lfe(n,e){if(n&1&&x(0,kfe,2,2,"span",16)(1,Nfe,2,2,"span",17),n&2){let t=y().$implicit;f("ngIf",t.summary),m(),f("ngIf",t.detail)}}function Pfe(n,e){if(n&1){let t=$();b(0,"button",20),P("click",function(){M(t);let r=y().index,o=y(2);return D(o.removeMessage(r))}),E(1,"TimesIcon",21),C()}if(n&2){let t=y(3);O("aria-label",t.closeAriaLabel)("data-pc-section","closebutton"),m(),f("styleClass","p-message-close-icon"),O("data-pc-section","closeicon")}}function Rfe(n,e){if(n&1&&(b(0,"div",5)(1,"div",6),x(2,Ife,1,3,"span",7)(3,Mfe,6,4,"span",8)(4,Afe,3,2,"ng-container",3)(5,Lfe,2,2,"ng-template",null,1,Bt)(7,Pfe,2,4,"button",9),C()()),n&2){let t,i=e.$implicit,r=pt(6),o=y(2);W("p-message p-message-"+i.severity),f("@messageAnimation",_e(13,wfe,_t(10,Cfe,o.showTransitionOptions,o.hideTransitionOptions))),m(),O("data-pc-section","wrapper")("id",i.id||null),m(),f("ngIf",i.icon),m(),f("ngIf",!i.icon),m(),f("ngIf",!o.escape)("ngIfElse",r),m(3),f("ngIf",o.closable&&((t=i.closable)!==null&&t!==void 0?t:!0))}}function Ffe(n,e){if(n&1&&(oe(0),x(1,Rfe,8,15,"div",4),se()),n&2){let t=y();m(),f("ngForOf",t.messages)}}function jfe(n,e){n&1&&ye(0)}function Vfe(n,e){if(n&1&&(b(0,"div",22)(1,"div",6),x(2,jfe,1,0,"ng-container",23),C()()),n&2){let t=y();f("ngClass","p-message p-message-"+t.severity),m(2),f("ngTemplateOutlet",t.contentTemplate)}}var cj=(()=>{class n{messageService;el;cd;config;set value(t){this.messages=t,this.startMessageLifes(this.messages)}closable=!0;style;styleClass;enableService=!0;key;escape=!0;severity;showTransitionOptions="300ms ease-out";hideTransitionOptions="200ms cubic-bezier(0.86, 0, 0.07, 1)";valueChange=new j;onClose=new j;templates;messages;messageSubscription;clearSubscription;timerSubscriptions=[];contentTemplate;constructor(t,i,r,o){this.messageService=t,this.el=i,this.cd=r,this.config=o}ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"content":this.contentTemplate=t.template;break;default:this.contentTemplate=t.template;break}}),this.messageService&&this.enableService&&!this.contentTemplate&&(this.messageSubscription=this.messageService.messageObserver.subscribe(t=>{if(t){Array.isArray(t)||(t=[t]);let i=t.filter(r=>this.key===r.key);this.messages=this.messages?[...this.messages,...i]:[...i],this.startMessageLifes(i),this.cd.markForCheck()}}),this.clearSubscription=this.messageService.clearObserver.subscribe(t=>{t?this.key===t&&(this.messages=null):this.messages=null,this.cd.markForCheck()}))}hasMessages(){let t=this.el.nativeElement.parentElement;return t&&t.offsetParent?this.contentTemplate!=null||this.messages&&this.messages.length>0:!1}clear(){this.messages=[],this.valueChange.emit(this.messages)}removeMessage(t){let i=this.messages[t];this.messages=this.messages?.filter((r,o)=>o!==t),i&&this.onClose.emit(i),this.valueChange.emit(this.messages)}get icon(){let t=this.severity||(this.hasMessages()?this.messages[0].severity:null);if(this.hasMessages())switch(t){case"success":return"pi-check";case"info":return"pi-info-circle";case"error":return"pi-times";case"warn":return"pi-exclamation-triangle";default:return"pi-info-circle"}return null}get closeAriaLabel(){return this.config.translation.aria?this.config.translation.aria.close:void 0}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.timerSubscriptions?.forEach(t=>t.unsubscribe())}startMessageLifes(t){t?.forEach(i=>i.life&&this.startMessageLife(i))}startMessageLife(t){let i=pp(t.life).subscribe(()=>{this.messages=this.messages?.filter(r=>r!==t),this.timerSubscriptions=this.timerSubscriptions?.filter(r=>r!==i),this.valueChange.emit(this.messages),this.cd.markForCheck()});this.timerSubscriptions.push(i)}static \u0275fac=function(i){return new(i||n)(k(y3,8),k(Ce),k(De),k(Pt))};static \u0275cmp=F({type:n,selectors:[["p-messages"]],contentQueries:function(i,r,o){if(i&1&&Je(o,qe,4),i&2){let s;J(s=X())&&(r.templates=s)}},hostAttrs:[1,"p-element"],inputs:{value:"value",closable:[2,"closable","closable",V],style:"style",styleClass:"styleClass",enableService:[2,"enableService","enableService",V],key:"key",escape:[2,"escape","escape",V],severity:"severity",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{valueChange:"valueChange",onClose:"onClose"},features:[$e],decls:4,vars:8,consts:[["staticMessage",""],["escapeOut",""],["role","alert",1,"p-messages","p-component",3,"ngStyle"],[4,"ngIf","ngIfElse"],["role","alert",3,"class",4,"ngFor","ngForOf"],["role","alert"],[1,"p-message-wrapper"],[3,"class",4,"ngIf"],["class","p-message-icon",4,"ngIf"],["class","p-message-close p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-message-icon"],[4,"ngIf"],["class","p-message-summary",3,"innerHTML",4,"ngIf"],["class","p-message-detail",3,"innerHTML",4,"ngIf"],[1,"p-message-summary",3,"innerHTML"],[1,"p-message-detail",3,"innerHTML"],["class","p-message-summary",4,"ngIf"],["class","p-message-detail",4,"ngIf"],[1,"p-message-summary"],[1,"p-message-detail"],["type","button","pRipple","",1,"p-message-close","p-link",3,"click"],[3,"styleClass"],["role","alert",3,"ngClass"],[4,"ngTemplateOutlet"]],template:function(i,r){if(i&1&&(b(0,"div",2),x(1,Ffe,2,1,"ng-container",3)(2,Vfe,3,2,"ng-template",null,0,Bt),C()),i&2){let o=pt(3);W(r.styleClass),f("ngStyle",r.style),O("aria-atomic",!0)("aria-live","assertive")("data-pc-name","message"),m(),f("ngIf",!r.contentTemplate)("ngIfElse",o)}},dependencies:()=>[Ye,Ui,ot,Mt,st,Hn,Wi,bM,PT,vM,Xt],styles:[`@layer primeng{.p-message-wrapper{display:flex;align-items:center}.p-message-close{display:flex;align-items:center;justify-content:center;flex:none}.p-message-close.p-link{margin-left:auto;overflow:hidden;position:relative}.p-messages .p-message.ng-animating{overflow:hidden}} +`],encapsulation:2,data:{animation:[oi("messageAnimation",[mn(":enter",[Ct({opacity:0,transform:"translateY(-25%)"}),fn("{{showTransitionParams}}")]),mn(":leave",[fn("{{hideTransitionParams}}",Ct({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0})}return n})(),CM=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Ln,Wi,bM,PT,vM,Xt,Ge,Ge]})}return n})();var zfe=(n,e)=>({"p-progressbar p-component":!0,"p-progressbar-determinate":n,"p-progressbar-indeterminate":e}),Ufe=(n,e)=>({width:n,display:"flex",background:e}),Hfe=n=>({$implicit:n}),$fe=n=>({display:n}),Wfe=n=>({background:n});function Gfe(n,e){if(n&1&&(b(0,"div",7),Z(1),C()),n&2){let t=y(2);f("ngStyle",_e(4,$fe,t.value!=null&&t.value!==0?"flex":"none")),O("data-pc-section","label"),m(),Fp(" ",t.value,"",t.unit," ")}}function qfe(n,e){n&1&&ye(0)}function Qfe(n,e){if(n&1&&(b(0,"div",3)(1,"div",4),x(2,Gfe,2,6,"div",5)(3,qfe,1,0,"ng-container",6),C()()),n&2){let t=y();f("ngStyle",_t(5,Ufe,t.value+"%",t.color)),O("data-pc-section","value"),m(2),f("ngIf",t.showValue&&!t.contentTemplate),m(),f("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",_e(8,Hfe,t.value))}}function Kfe(n,e){if(n&1&&(b(0,"div",8),E(1,"div",3),C()),n&2){let t=y();O("data-pc-section","container"),m(),f("ngStyle",_e(3,Wfe,t.color)),O("data-pc-section","value")}}var uj=(()=>{class n{value;showValue=!0;styleClass;style;unit="%";mode="determinate";color;templates;contentTemplate;ngAfterContentInit(){this.templates?.forEach(t=>{switch(t.getType()){case"content":this.contentTemplate=t.template;break;default:this.contentTemplate=t.template}})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=F({type:n,selectors:[["p-progressBar"]],contentQueries:function(i,r,o){if(i&1&&Je(o,qe,4),i&2){let s;J(s=X())&&(r.templates=s)}},hostAttrs:[1,"p-element"],inputs:{value:[2,"value","value",Ke],showValue:[2,"showValue","showValue",V],styleClass:"styleClass",style:"style",unit:"unit",mode:"mode",color:"color"},features:[$e],decls:3,vars:14,consts:[["role","progressbar",3,"ngStyle","ngClass"],["class","p-progressbar-value p-progressbar-value-animate",3,"ngStyle",4,"ngIf"],["class","p-progressbar-indeterminate-container",4,"ngIf"],[1,"p-progressbar-value","p-progressbar-value-animate",3,"ngStyle"],[1,"p-progressbar-label"],[3,"ngStyle",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngStyle"],[1,"p-progressbar-indeterminate-container"]],template:function(i,r){i&1&&(b(0,"div",0),x(1,Qfe,4,10,"div",1)(2,Kfe,2,5,"div",2),C()),i&2&&(W(r.styleClass),f("ngStyle",r.style)("ngClass",_t(11,zfe,r.mode==="determinate",r.mode==="indeterminate")),O("aria-valuemin",0)("aria-valuenow",r.value)("aria-valuemax",100)("data-pc-name","progressbar")("data-pc-section","root"),m(),f("ngIf",r.mode==="determinate"),m(),f("ngIf",r.mode==="indeterminate"))},dependencies:[Ye,ot,Mt,st],styles:[`@layer primeng{.p-progressbar{position:relative;overflow:hidden}.p-progressbar-determinate .p-progressbar-value{height:100%;width:0%;position:absolute;display:none;border:0 none;display:flex;align-items:center;justify-content:center;overflow:hidden}.p-progressbar-determinate .p-progressbar-label{display:inline-flex}.p-progressbar-determinate .p-progressbar-value-animate{transition:width 1s ease-in-out}.p-progressbar-indeterminate .p-progressbar-value:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;-webkit-animation:p-progressbar-indeterminate-anim 2.1s cubic-bezier(.65,.815,.735,.395) infinite;animation:p-progressbar-indeterminate-anim 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.p-progressbar-indeterminate .p-progressbar-value:after{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;-webkit-animation:p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation:p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;-webkit-animation-delay:1.15s;animation-delay:1.15s}}@-webkit-keyframes p-progressbar-indeterminate-anim{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes p-progressbar-indeterminate-anim{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@-webkit-keyframes p-progressbar-indeterminate-anim-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@keyframes p-progressbar-indeterminate-anim-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}} +`],encapsulation:2,changeDetection:0})}return n})(),wM=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te]})}return n})();var Zfe=["advancedfileinput"],Jfe=["basicfileinput"],Xfe=["content"],eme=(n,e,t,i,r)=>({$implicit:n,uploadedFiles:e,chooseCallback:t,clearCallback:i,uploadCallback:r}),tme=(n,e,t,i,r,o,s,a)=>({$implicit:n,uploadedFiles:e,chooseCallback:t,clearCallback:i,removeUploadedFileCallback:r,removeFileCallback:o,progress:s,messages:a}),nme=(n,e)=>({"p-focus":n,"p-disabled":e}),ime=(n,e,t,i)=>({"p-button p-component p-fileupload-choose":!0,"p-button-icon-only":n,"p-fileupload-choose-selected":e,"p-focus":t,"p-disabled":i});function rme(n,e){if(n&1&&E(0,"span",21),n&2){let t=y(3);W(t.chooseIcon),f("ngClass","p-button-icon p-button-icon-left"),O("aria-label",!0)("data-pc-section","chooseicon")}}function ome(n,e){n&1&&E(0,"PlusIcon",24),n&2&&(f("styleClass","p-button-icon p-button-icon-left"),O("aria-label",!0)("data-pc-section","chooseicon"))}function sme(n,e){}function ame(n,e){n&1&&x(0,sme,0,0,"ng-template")}function lme(n,e){if(n&1&&(b(0,"span",25),x(1,ame,1,0,null,11),C()),n&2){let t=y(4);O("aria-label",!0)("data-pc-section","chooseicon"),m(),f("ngTemplateOutlet",t.chooseIconTemplate)}}function cme(n,e){if(n&1&&(oe(0),x(1,ome,1,3,"PlusIcon",22)(2,lme,2,3,"span",23),se()),n&2){let t=y(3);m(),f("ngIf",!t.chooseIconTemplate),m(),f("ngIf",t.chooseIconTemplate)}}function ume(n,e){if(n&1&&E(0,"span",28),n&2){let t=y(4);f("ngClass",t.uploadIcon),O("aria-hidden",!0)}}function dme(n,e){n&1&&E(0,"UploadIcon",24),n&2&&f("styleClass","p-button-icon p-button-icon-left")}function pme(n,e){}function hme(n,e){n&1&&x(0,pme,0,0,"ng-template")}function fme(n,e){if(n&1&&(b(0,"span",25),x(1,hme,1,0,null,11),C()),n&2){let t=y(5);O("aria-hidden",!0),m(),f("ngTemplateOutlet",t.uploadIconTemplate)}}function mme(n,e){if(n&1&&(oe(0),x(1,dme,1,1,"UploadIcon",22)(2,fme,2,2,"span",23),se()),n&2){let t=y(4);m(),f("ngIf",!t.uploadIconTemplate),m(),f("ngIf",t.uploadIconTemplate)}}function gme(n,e){if(n&1){let t=$();b(0,"p-button",26),P("onClick",function(){M(t);let r=y(3);return D(r.upload())}),x(1,ume,1,2,"span",27)(2,mme,3,2,"ng-container",9),C()}if(n&2){let t=y(3);f("label",t.uploadButtonLabel)("disabled",!t.hasFiles()||t.isFileLimitExceeded())("styleClass",t.uploadStyleClass),m(),f("ngIf",t.uploadIcon),m(),f("ngIf",!t.uploadIcon)}}function yme(n,e){if(n&1&&E(0,"span",28),n&2){let t=y(4);f("ngClass",t.cancelIcon)}}function _me(n,e){n&1&&E(0,"TimesIcon",24),n&2&&(f("styleClass","p-button-icon p-button-icon-left"),O("aria-hidden",!0))}function vme(n,e){}function bme(n,e){n&1&&x(0,vme,0,0,"ng-template")}function Cme(n,e){if(n&1&&(b(0,"span",25),x(1,bme,1,0,null,11),C()),n&2){let t=y(5);O("aria-hidden",!0),m(),f("ngTemplateOutlet",t.cancelIconTemplate)}}function wme(n,e){if(n&1&&(oe(0),x(1,_me,1,2,"TimesIcon",22)(2,Cme,2,2,"span",23),se()),n&2){let t=y(4);m(),f("ngIf",!t.cancelIconTemplate),m(),f("ngIf",t.cancelIconTemplate)}}function Ime(n,e){if(n&1){let t=$();b(0,"p-button",26),P("onClick",function(){M(t);let r=y(3);return D(r.clear())}),x(1,yme,1,1,"span",27)(2,wme,3,2,"ng-container",9),C()}if(n&2){let t=y(3);f("label",t.cancelButtonLabel)("disabled",!t.hasFiles()||t.uploading)("styleClass",t.cancelStyleClass),m(),f("ngIf",t.cancelIcon),m(),f("ngIf",!t.cancelIcon)}}function xme(n,e){if(n&1){let t=$();oe(0),b(1,"span",17),P("focus",function(){M(t);let r=y(2);return D(r.onFocus())})("blur",function(){M(t);let r=y(2);return D(r.onBlur())})("click",function(){M(t);let r=y(2);return D(r.choose())})("keydown.enter",function(){M(t);let r=y(2);return D(r.choose())}),b(2,"input",7,0),P("change",function(r){M(t);let o=y(2);return D(o.onFileSelect(r))}),C(),x(4,rme,1,5,"span",18)(5,cme,3,2,"ng-container",9),b(6,"span",19),Z(7),C()(),x(8,gme,3,5,"p-button",20)(9,Ime,3,5,"p-button",20),se()}if(n&2){let t=y(2);m(),W(t.chooseStyleClass),f("ngClass",_t(16,nme,t.focus,t.disabled||t.isChooseDisabled())),O("data-pc-section","choosebutton"),m(),f("multiple",t.multiple)("accept",t.accept)("disabled",t.disabled||t.isChooseDisabled()),O("aria-label",t.browseFilesLabel)("title","")("data-pc-section","input"),m(2),f("ngIf",t.chooseIcon),m(),f("ngIf",!t.chooseIcon),m(),O("data-pc-section","choosebuttonlabel"),m(),Pe(t.chooseButtonLabel),m(),f("ngIf",!t.auto&&t.showUploadButton),m(),f("ngIf",!t.auto&&t.showCancelButton)}}function Tme(n,e){n&1&&ye(0)}function Eme(n,e){n&1&&ye(0)}function Sme(n,e){if(n&1&&E(0,"p-progressBar",29),n&2){let t=y(2);f("value",t.progress)("showValue",!1)}}function Mme(n,e){if(n&1){let t=$();b(0,"div")(1,"img",35),P("error",function(r){M(t);let o=y(5);return D(o.imageError(r))}),C()()}if(n&2){let t=y().$implicit,i=y(4);m(),f("src",t.objectURL,zi)("width",i.previewWidth)}}function Dme(n,e){n&1&&E(0,"TimesIcon")}function Ome(n,e){}function Ame(n,e){n&1&&x(0,Ome,0,0,"ng-template")}function kme(n,e){if(n&1){let t=$();b(0,"div",32),x(1,Mme,2,2,"div",9),b(2,"div",33),Z(3),C(),b(4,"div"),Z(5),C(),b(6,"div")(7,"button",34),P("click",function(r){let o=M(t).index,s=y(4);return D(s.remove(r,o))}),x(8,Dme,1,0,"TimesIcon",9)(9,Ame,1,0,null,11),C()()()}if(n&2){let t=e.$implicit,i=y(4);m(),f("ngIf",i.isImage(t)),m(2),Pe(t.name),m(2),Pe(i.formatSize(t.size)),m(2),W(i.removeStyleClass),f("disabled",i.uploading),m(),f("ngIf",!i.cancelIconTemplate),m(),f("ngTemplateOutlet",i.cancelIconTemplate)}}function Nme(n,e){if(n&1&&(b(0,"div"),x(1,kme,10,8,"div",31),C()),n&2){let t=y(3);m(),f("ngForOf",t.files)}}function Lme(n,e){}function Pme(n,e){if(n&1&&(b(0,"div"),x(1,Lme,0,0,"ng-template",36),C()),n&2){let t=y(3);m(),f("ngForOf",t.files)("ngForTemplate",t.fileTemplate)}}function Rme(n,e){if(n&1&&(b(0,"div",30),x(1,Nme,2,1,"div",9)(2,Pme,2,2,"div",9),C()),n&2){let t=y(2);m(),f("ngIf",!t.fileTemplate),m(),f("ngIf",t.fileTemplate)}}function Fme(n,e){n&1&&ye(0)}function jme(n,e){n&1&&ye(0)}function Vme(n,e){if(n&1&&(b(0,"div",37),x(1,jme,1,0,"ng-container",11),C()),n&2){let t=y(2);m(),f("ngTemplateOutlet",t.emptyTemplate)}}function Bme(n,e){if(n&1){let t=$();b(0,"div",6)(1,"input",7,0),P("change",function(r){M(t);let o=y();return D(o.onFileSelect(r))}),C(),b(3,"div",8),x(4,xme,10,19,"ng-container",9)(5,Tme,1,0,"ng-container",10)(6,Eme,1,0,"ng-container",11),C(),b(7,"div",12,1),P("dragenter",function(r){M(t);let o=y();return D(o.onDragEnter(r))})("dragleave",function(r){M(t);let o=y();return D(o.onDragLeave(r))})("drop",function(r){M(t);let o=y();return D(o.onDrop(r))}),x(9,Sme,1,2,"p-progressBar",13),E(10,"p-messages",14),x(11,Rme,3,2,"div",15)(12,Fme,1,0,"ng-container",10)(13,Vme,2,1,"div",16),C()()}if(n&2){let t=y();W(t.styleClass),f("ngClass","p-fileupload p-fileupload-advanced p-component")("ngStyle",t.style),O("data-pc-name","fileupload")("data-pc-section","root"),m(),Rs("display","none"),f("multiple",t.multiple)("accept",t.accept)("disabled",t.disabled||t.isChooseDisabled()),O("aria-label",t.browseFilesLabel)("title","")("data-pc-section","input"),m(2),O("data-pc-section","buttonbar"),m(),f("ngIf",!t.headerTemplate),m(),f("ngTemplateOutlet",t.headerTemplate)("ngTemplateOutletContext",dk(27,eme,t.files,t.uploadedFiles,t.choose.bind(t),t.clear.bind(t),t.upload.bind(t))),m(),f("ngTemplateOutlet",t.toolbarTemplate),m(),O("data-pc-section","content"),m(2),f("ngIf",t.hasFiles()),m(),f("value",t.msgs)("enableService",!1),m(),f("ngIf",t.hasFiles()),m(),f("ngTemplateOutlet",t.contentTemplate)("ngTemplateOutletContext",pk(33,tme,t.files,t.uploadedFiles,t.choose.bind(t),t.clear.bind(t),t.removeUploadedFile.bind(t),t.remove.bind(t),t.progress,t.msgs)),m(),f("ngIf",t.emptyTemplate&&!t.hasFiles()&&!t.hasUploadedFiles())}}function zme(n,e){if(n&1&&E(0,"span",28),n&2){let t=y(3);f("ngClass",t.uploadIcon)}}function Ume(n,e){n&1&&E(0,"UploadIcon",24),n&2&&f("styleClass","p-button-icon p-button-icon-left")}function Hme(n,e){}function $me(n,e){n&1&&x(0,Hme,0,0,"ng-template")}function Wme(n,e){if(n&1&&(b(0,"span",25),x(1,$me,1,0,null,11),C()),n&2){let t=y(4);m(),f("ngTemplateOutlet",t.uploadIconTemplate)}}function Gme(n,e){if(n&1&&(oe(0),x(1,Ume,1,1,"UploadIcon",22)(2,Wme,2,1,"span",23),se()),n&2){let t=y(3);m(),f("ngIf",!t.uploadIconTemplate),m(),f("ngIf",t.uploadIconTemplate)}}function qme(n,e){if(n&1&&(oe(0),x(1,zme,1,1,"span",27)(2,Gme,3,2,"ng-container",9),se()),n&2){let t=y(2);m(),f("ngIf",t.uploadIcon),m(),f("ngIf",!t.uploadIcon)}}function Qme(n,e){if(n&1&&E(0,"span",44),n&2){let t=y(3);f("ngClass",t.chooseIcon)}}function Kme(n,e){n&1&&E(0,"PlusIcon",24),n&2&&(f("styleClass","p-button-icon p-button-icon-left pi"),O("aria-hidden",!0)("data-pc-section","uploadicon"))}function Yme(n,e){}function Zme(n,e){n&1&&x(0,Yme,0,0,"ng-template")}function Jme(n,e){if(n&1&&(b(0,"span",46),x(1,Zme,1,0,null,11),C()),n&2){let t=y(4);O("aria-hidden",!0)("data-pc-section","uploadicon"),m(),f("ngTemplateOutlet",t.chooseIconTemplate)}}function Xme(n,e){if(n&1&&(oe(0),x(1,Kme,1,3,"PlusIcon",22)(2,Jme,2,3,"span",45),se()),n&2){let t=y(3);m(),f("ngIf",!t.chooseIconTemplate),m(),f("ngIf",t.chooseIconTemplate)}}function ege(n,e){if(n&1&&x(0,Qme,1,1,"span",43)(1,Xme,3,2,"ng-container",9),n&2){let t=y(2);f("ngIf",t.chooseIcon),m(),f("ngIf",!t.chooseIcon)}}function tge(n,e){if(n&1&&(b(0,"span",19),Z(1),C()),n&2){let t=y(2);O("data-pc-section","label"),m(),Pe(t.basicButtonLabel)}}function nge(n,e){if(n&1){let t=$();b(0,"input",47,3),P("change",function(r){M(t);let o=y(2);return D(o.onFileSelect(r))})("focus",function(){M(t);let r=y(2);return D(r.onFocus())})("blur",function(){M(t);let r=y(2);return D(r.onBlur())}),C()}if(n&2){let t=y(2);f("accept",t.accept)("multiple",t.multiple)("disabled",t.disabled),O("aria-label",t.browseFilesLabel)("data-pc-section","input")}}function ige(n,e){if(n&1){let t=$();b(0,"div",38),E(1,"p-messages",14),b(2,"span",39),P("click",function(){M(t);let r=y();return D(r.onBasicUploaderClick())})("keydown",function(r){M(t);let o=y();return D(o.onBasicKeydown(r))}),x(3,qme,3,2,"ng-container",40)(4,ege,2,2,"ng-template",null,2,Bt)(6,tge,2,2,"span",41)(7,nge,2,5,"input",42),C()()}if(n&2){let t=pt(5),i=y();O("data-pc-name","fileupload"),m(),f("value",i.msgs)("enableService",!1),m(),W(i.styleClass),f("ngClass",kr(12,ime,!i.basicButtonLabel,i.hasFiles(),i.focus,i.disabled))("ngStyle",i.style),O("data-pc-section","choosebutton"),m(),f("ngIf",i.hasFiles()&&!i.auto)("ngIfElse",t),m(3),f("ngIf",i.basicButtonLabel),m(),f("ngIf",!i.hasFiles())}}var dj=(()=>{class n{document;platformId;renderer;el;sanitizer;zone;http;cd;config;name;url;method="post";multiple;accept;disabled;auto;withCredentials;maxFileSize;invalidFileSizeMessageSummary="{0}: Invalid file size, ";invalidFileSizeMessageDetail="maximum upload size is {0}.";invalidFileTypeMessageSummary="{0}: Invalid file type, ";invalidFileTypeMessageDetail="allowed file types: {0}.";invalidFileLimitMessageDetail="limit is {0} at most.";invalidFileLimitMessageSummary="Maximum number of files exceeded, ";style;styleClass;previewWidth=50;chooseLabel;uploadLabel;cancelLabel;chooseIcon;uploadIcon;cancelIcon;showUploadButton=!0;showCancelButton=!0;mode="advanced";headers;customUpload;fileLimit;uploadStyleClass;cancelStyleClass;removeStyleClass;chooseStyleClass;onBeforeUpload=new j;onSend=new j;onUpload=new j;onError=new j;onClear=new j;onRemove=new j;onSelect=new j;onProgress=new j;uploadHandler=new j;onImageError=new j;onRemoveUploadedFile=new j;templates;advancedFileInput;basicFileInput;content;set files(t){this._files=[];for(let i=0;i{switch(t.getType()){case"header":this.headerTemplate=t.template;break;case"file":this.fileTemplate=t.template;break;case"content":this.contentTemplate=t.template;break;case"toolbar":this.toolbarTemplate=t.template;break;case"chooseicon":this.chooseIconTemplate=t.template;break;case"uploadicon":this.uploadIconTemplate=t.template;break;case"cancelicon":this.cancelIconTemplate=t.template;break;case"empty":this.emptyTemplate=t.template;break;default:this.fileTemplate=t.template;break}})}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterViewInit(){Dt(this.platformId)&&this.mode==="advanced"&&this.zone.runOutsideAngular(()=>{this.content&&(this.dragOverListener=this.renderer.listen(this.content.nativeElement,"dragover",this.onDragOver.bind(this)))})}getTranslation(t){return this.config.getTranslation(t)}choose(){this.advancedFileInput?.nativeElement.click()}onFileSelect(t){if(t.type!=="drop"&&this.isIE11()&&this.duplicateIEEvent){this.duplicateIEEvent=!1;return}this.msgs=[],this.multiple||(this.files=[]);let i=t.dataTransfer?t.dataTransfer.files:t.target.files;for(let r=0;rthis.maxFileSize?(this.msgs.push({severity:"error",summary:this.invalidFileSizeMessageSummary.replace("{0}",t.name),detail:this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}),!1):!0}isFileTypeValid(t){let i=this.accept?.split(",").map(r=>r.trim());for(let r of i)if(this.isWildcard(r)?this.getTypeClass(t.type)===this.getTypeClass(r):t.type==r||this.getFileExtension(t).toLowerCase()===r.toLowerCase())return!0;return!1}getTypeClass(t){return t.substring(0,t.indexOf("/"))}isWildcard(t){return t.indexOf("*")!==-1}getFileExtension(t){return"."+t.name.split(".").pop()}isImage(t){return/^image\//.test(t.type)}onImageLoad(t){window.URL.revokeObjectURL(t.src)}upload(){if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.uploadHandler.emit({files:this.files}),this.cd.markForCheck();else{this.uploading=!0,this.msgs=[];let t=new FormData;this.onBeforeUpload.emit({formData:t});for(let i=0;i{switch(i.type){case Nr.Sent:this.onSend.emit({originalEvent:i,formData:t});break;case Nr.Response:this.uploading=!1,this.progress=0,i.status>=200&&i.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.onUpload.emit({originalEvent:i,files:this.files})):this.onError.emit({files:this.files}),this.uploadedFiles.push(...this.files),this.clear();break;case Nr.UploadProgress:{i.loaded&&(this.progress=Math.round(i.loaded*100/i.total)),this.onProgress.emit({originalEvent:i,progress:this.progress});break}}this.cd.markForCheck()},i=>{this.uploading=!1,this.onError.emit({files:this.files,error:i})})}}clear(){this.files=[],this.uploadedFileCount=0,this.cancelUploadRequest(),this.onClear.emit(),this.clearInputElement(),this.cd.markForCheck()}remove(t,i){this.cancelUploadRequest(),this.clearInputElement(),this.onRemove.emit({originalEvent:t,file:this.files[i]}),this.files.splice(i,1),this.checkFileLimit(this.files)}removeUploadedFile(t){let i=this.uploadedFiles.splice(t,1)[0];this.uploadedFiles=[...this.uploadedFiles],this.onRemoveUploadedFile.emit({file:i,files:this.uploadedFiles})}cancelUploadRequest(){this.fileUploadSubcription&&(this.fileUploadSubcription.unsubscribe(),this.fileUploadSubcription=void 0)}isFileLimitExceeded(){let i=this.auto?this.files.length:this.files.length+this.uploadedFileCount;return this.fileLimit&&this.fileLimit<=i&&this.focus&&(this.focus=!1),this.fileLimit&&this.fileLimit0&&this.fileLimit0}hasUploadedFiles(){return this.uploadedFiles&&this.uploadedFiles.length>0}onDragEnter(t){this.disabled||(t.stopPropagation(),t.preventDefault())}onDragOver(t){this.disabled||(A.addClass(this.content?.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,t.stopPropagation(),t.preventDefault())}onDragLeave(t){this.disabled||A.removeClass(this.content?.nativeElement,"p-fileupload-highlight")}onDrop(t){if(!this.disabled){A.removeClass(this.content?.nativeElement,"p-fileupload-highlight"),t.stopPropagation(),t.preventDefault();let i=t.dataTransfer?t.dataTransfer.files:t.target.files;(this.multiple||i&&i.length===1)&&this.onFileSelect(t)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(t){let o=this.getTranslation(si.FILE_SIZE_TYPES);if(t===0)return`0 ${o[0]}`;let s=Math.floor(Math.log(t)/Math.log(1024));return`${(t/Math.pow(1024,s)).toFixed(3)} ${o[s]}`}onBasicUploaderClick(){this.hasFiles()?this.upload():this.basicFileInput?.nativeElement.click()}onBasicKeydown(t){switch(t.code){case"Space":case"Enter":this.onBasicUploaderClick(),t.preventDefault();break}}imageError(t){this.onImageError.emit(t)}getBlockableElement(){return this.el.nativeElement.children[0]}get chooseButtonLabel(){return this.chooseLabel||this.config.getTranslation(si.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(si.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(si.CANCEL)}get browseFilesLabel(){return this.config.getTranslation(si.ARIA)[si.BROWSE_FILES]}ngOnDestroy(){this.content&&this.content.nativeElement&&this.dragOverListener&&(this.dragOverListener(),this.dragOverListener=null),this.translationSubscription&&this.translationSubscription.unsubscribe()}static \u0275fac=function(i){return new(i||n)(k(We),k(Nt),k(At),k(Ce),k(Ul),k(He),k(ei),k(De),k(Pt))};static \u0275cmp=F({type:n,selectors:[["p-fileUpload"]],contentQueries:function(i,r,o){if(i&1&&Je(o,qe,4),i&2){let s;J(s=X())&&(r.templates=s)}},viewQuery:function(i,r){if(i&1&&(fe(Zfe,5),fe(Jfe,5),fe(Xfe,5)),i&2){let o;J(o=X())&&(r.advancedFileInput=o.first),J(o=X())&&(r.basicFileInput=o.first),J(o=X())&&(r.content=o.first)}},hostAttrs:[1,"p-element"],inputs:{name:"name",url:"url",method:"method",multiple:[2,"multiple","multiple",V],accept:"accept",disabled:[2,"disabled","disabled",V],auto:[2,"auto","auto",V],withCredentials:[2,"withCredentials","withCredentials",V],maxFileSize:[2,"maxFileSize","maxFileSize",Ke],invalidFileSizeMessageSummary:"invalidFileSizeMessageSummary",invalidFileSizeMessageDetail:"invalidFileSizeMessageDetail",invalidFileTypeMessageSummary:"invalidFileTypeMessageSummary",invalidFileTypeMessageDetail:"invalidFileTypeMessageDetail",invalidFileLimitMessageDetail:"invalidFileLimitMessageDetail",invalidFileLimitMessageSummary:"invalidFileLimitMessageSummary",style:"style",styleClass:"styleClass",previewWidth:[2,"previewWidth","previewWidth",Ke],chooseLabel:"chooseLabel",uploadLabel:"uploadLabel",cancelLabel:"cancelLabel",chooseIcon:"chooseIcon",uploadIcon:"uploadIcon",cancelIcon:"cancelIcon",showUploadButton:[2,"showUploadButton","showUploadButton",V],showCancelButton:[2,"showCancelButton","showCancelButton",V],mode:"mode",headers:"headers",customUpload:[2,"customUpload","customUpload",V],fileLimit:[2,"fileLimit","fileLimit",t=>Ke(t,null)],uploadStyleClass:"uploadStyleClass",cancelStyleClass:"cancelStyleClass",removeStyleClass:"removeStyleClass",chooseStyleClass:"chooseStyleClass",files:"files"},outputs:{onBeforeUpload:"onBeforeUpload",onSend:"onSend",onUpload:"onUpload",onError:"onError",onClear:"onClear",onRemove:"onRemove",onSelect:"onSelect",onProgress:"onProgress",uploadHandler:"uploadHandler",onImageError:"onImageError",onRemoveUploadedFile:"onRemoveUploadedFile"},features:[$e],decls:2,vars:2,consts:[["advancedfileinput",""],["content",""],["chooseSection",""],["basicfileinput",""],[3,"ngClass","ngStyle","class",4,"ngIf"],["class","p-fileupload p-fileupload-basic p-component",4,"ngIf"],[3,"ngClass","ngStyle"],["type","file",3,"change","multiple","accept","disabled"],[1,"p-fileupload-buttonbar"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],[1,"p-fileupload-content",3,"dragenter","dragleave","drop"],[3,"value","showValue",4,"ngIf"],[3,"value","enableService"],["class","p-fileupload-files",4,"ngIf"],["class","p-fileupload-empty",4,"ngIf"],["pRipple","","tabindex","0",1,"p-button","p-component","p-fileupload-choose",3,"focus","blur","click","keydown.enter","ngClass"],[3,"ngClass","class",4,"ngIf"],[1,"p-button-label"],["type","button",3,"label","disabled","styleClass","onClick",4,"ngIf"],[3,"ngClass"],[3,"styleClass",4,"ngIf"],["class","p-button-icon p-button-icon-left",4,"ngIf"],[3,"styleClass"],[1,"p-button-icon","p-button-icon-left"],["type","button",3,"onClick","label","disabled","styleClass"],["class","p-button-icon p-button-icon-left",3,"ngClass",4,"ngIf"],[1,"p-button-icon","p-button-icon-left",3,"ngClass"],[3,"value","showValue"],[1,"p-fileupload-files"],["class","p-fileupload-row",4,"ngFor","ngForOf"],[1,"p-fileupload-row"],[1,"p-fileupload-filename"],["type","button","pButton","",1,"p-button-icon-only",3,"click","disabled"],[3,"error","src","width"],["ngFor","",3,"ngForOf","ngForTemplate"],[1,"p-fileupload-empty"],[1,"p-fileupload","p-fileupload-basic","p-component"],["tabindex","0","pRipple","",3,"click","keydown","ngClass","ngStyle"],[4,"ngIf","ngIfElse"],["class","p-button-label",4,"ngIf"],["type","file",3,"accept","multiple","disabled","change","focus","blur",4,"ngIf"],["class","p-button-icon p-button-icon-left pi",3,"ngClass",4,"ngIf"],[1,"p-button-icon","p-button-icon-left","pi",3,"ngClass"],["class","p-button-icon p-button-icon-left pi",4,"ngIf"],[1,"p-button-icon","p-button-icon-left","pi"],["type","file",3,"change","focus","blur","accept","multiple","disabled"]],template:function(i,r){i&1&&x(0,Bme,14,42,"div",4)(1,ige,8,17,"div",5),i&2&&(f("ngIf",r.mode==="advanced"),m(),f("ngIf",r.mode==="basic"))},dependencies:()=>[Ye,Ui,ot,Mt,st,zt,cx,uj,cj,Hn,wT,_M,Xt],styles:[`@layer primeng{.p-fileupload-content{position:relative}.p-fileupload-row{display:flex;align-items:center}.p-fileupload-row>div{flex:1 1 auto;width:25%}.p-fileupload-row>div:last-child{text-align:right}.p-fileupload-content .p-progressbar{width:100%;position:absolute;top:0;left:0}.p-button.p-fileupload-choose{position:relative;overflow:hidden}.p-button.p-fileupload-choose input[type=file],.p-fileupload-choose.p-fileupload-choose-selected input[type=file]{display:none}.p-fluid .p-fileupload .p-button{width:auto}.p-fileupload-filename{word-break:break-all}} +`],encapsulation:2,changeDetection:0})}return n})(),IM=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Ge,an,wM,CM,Ln,wT,_M,Xt,Ge,an,wM,CM]})}return n})();function oge(n,e){if(n&1&&E(0,"img",0),n&2){let t=y();f("src",t.src||t.file.objectURL,zi)("alt",t.file.name)}}function sge(n,e){if(n&1&&(b(0,"video",1),E(1,"source",2),C()),n&2){let t=y();m(),f("src",t.src||t.file.objectURL,zi)}}function age(n,e){n&1&&(b(0,"p"),Z(1,"Select an accepted asset type"),C())}var pj=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-asset-preview"]],inputs:{type:"type",file:"file",src:"src"},decls:3,vars:1,consts:[[3,"src","alt"],["controls","","preload","metadata"],[3,"src"]],template:function(r,o){if(r&1&&x(0,oge,1,2,"img",0)(1,sge,2,1,"video",1)(2,age,2,0,"p"),r&2){let s;we((s=o.type)==="image"?0:s==="video"?1:2)}},styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;justify-content:center;align-items:center}[_nghost-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain}[_nghost-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;max-height:100%;max-width:100%;object-fit:contain}"],changeDetection:0});let n=e;return n})();function cge(n,e){if(n&1){let t=$();b(0,"p-fileUpload",3),P("onSelect",function(r){M(t);let o=y();return D(o.onSelectFile(r.files))}),C()}if(n&2){let t=y();f("accept",t.type+"/*")("customUpload",!0)}}function uge(n,e){if(n&1&&E(0,"dot-asset-preview",12),n&2){let t=y(2);f("type",t.type)("file",t.file)("src",t.src)}}function dge(n,e){if(n&1&&(b(0,"span",13),Z(1),C()),n&2){let t=y(3);m(),Pe(t.error)}}function pge(n,e){n&1&&x(0,dge,2,1,"ng-template",null,1,Bt)}function hge(n,e){if(n&1){let t=$();b(0,"div",4),x(1,uge,1,3,"dot-asset-preview",5)(2,pge,2,0,null,6),C(),b(3,"div",7)(4,"div",8),E(5,"dot-spinner",9),b(6,"span",10),P("@shakeit.done",function(r){M(t);let o=y();return D(o.shakeEnd(r))}),Z(7),C()(),b(8,"button",11),P("click",function(){M(t);let r=y();return D(r.cancelAction())}),Z(9," Cancel "),C()()}if(n&2){let t=y();m(),f("ngIf",t.status==="UPLOAD"),m(),f("ngIf",t.status==="ERROR"),m(3),f("size","30px"),m(),f("@shakeit",t.animation),m(),yt(" ",t.errorMessage," ")}}var yl=function(n){return n.SELECT="SELECT",n.PREVIEW="PREVIEW",n.UPLOAD="UPLOAD",n.ERROR="ERROR",n}(yl||{}),hj=(()=>{let e=class e{get errorMessage(){return` Don't close this window while the ${this.type} uploads`}onClick(i){let r=!this.el.nativeElement.contains(i);this.status===yl.UPLOAD&&r&&this.shakeMe()}constructor(i,r,o,s){this.sanitizer=i,this.dotUploadFileService=r,this.cd=o,this.el=s,this.uploadedFile=new j,this.preventClose=new j,this.hide=new j,this.status=yl.SELECT,this.animation="shakeend"}ngOnDestroy(){this.preventClose.emit(!1)}onSelectFile(i){let r=i[0],o=new FileReader;this.preventClose.emit(!0),o.onload=s=>this.setFile(r,s.target.result),o.readAsArrayBuffer(r)}cancelAction(){this.file=null,this.status=yl.SELECT,this.cancelUploading(),this.hide.emit(!0)}shakeEnd(){this.animation="shakeend"}shakeMe(){this.animation!=="shakestart"&&(this.animation="shakestart")}uploadFile(){this.controller=new AbortController,this.status=yl.UPLOAD,this.$uploadRequestSubs=this.dotUploadFileService.publishContent({data:this.file,signal:this.controller.signal}).pipe(xt(1),Nn(i=>this.handleError(i))).subscribe(i=>{let r=i[0];this.uploadedFile.emit(r[Object.keys(r)[0]]),this.status=yl.SELECT})}setFile(i,r){let o=new Blob([new Uint8Array(r)],{type:"video/mp4"});this.src=this.sanitizer.bypassSecurityTrustResourceUrl(URL.createObjectURL(o)),this.file=i,this.status=yl.UPLOAD,this.uploadFile(),this.cd.markForCheck()}handleError(i){return this.status=yl.ERROR,this.preventClose.emit(!1),this.error=i?.error?.errors[0]||i.error,console.error(i),Zn(i)}cancelUploading(){this.$uploadRequestSubs.unsubscribe(),this.controller?.abort()}};e.\u0275fac=function(r){return new(r||e)(k(Ul),k(as),k(De),k(Ce))},e.\u0275cmp=F({type:e,selectors:[["dot-upload-asset"]],hostBindings:function(r,o){r&1&&P("click",function(a){return o.onClick(a.target)},!1,iA)},inputs:{type:"type"},outputs:{uploadedFile:"uploadedFile",preventClose:"preventClose",hide:"hide"},decls:3,vars:2,consts:[["preview",""],["errorTemplate",""],["chooseLabel","browse files","mode","basic",3,"accept","customUpload","onSelect",4,"ngIf","ngIfElse"],["chooseLabel","browse files","mode","basic",3,"onSelect","accept","customUpload"],[1,"preview-container"],[3,"type","file","src",4,"ngIf"],[4,"ngIf"],[1,"action-container"],[1,"loading-message"],[3,"size"],[1,"warning"],["data-test-id","back-btn","pButton","",1,"p-button-outlined",3,"click"],[3,"type","file","src"],[1,"error"]],template:function(r,o){if(r&1&&x(0,cge,1,2,"p-fileUpload",2)(1,hge,10,5,"ng-template",null,0,Bt),r&2){let s=pt(2);f("ngIf",o.status==="SELECT")("ngIfElse",s)}},dependencies:[ot,od,zt,dj,pj],styles:["[_nghost-%COMP%]{height:100%;width:100%;padding:1rem;gap:1rem;display:flex;justify-content:center;align-items:center;flex-direction:column}[_nghost-%COMP%] .error[_ngcontent-%COMP%]{color:#d82b2e;font-size:1rem;max-width:100%;white-space:pre-wrap}[_nghost-%COMP%] .preview-container[_ngcontent-%COMP%]{align-items:center;display:flex;flex-grow:1;justify-content:center;overflow:hidden;width:100%;flex-direction:column}[_nghost-%COMP%] .preview-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain}[_nghost-%COMP%] .action-container[_ngcontent-%COMP%]{display:flex;height:fit-content;justify-content:space-between;width:100%}[_nghost-%COMP%] .loading-message[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:1rem}[_nghost-%COMP%] .warning[_ngcontent-%COMP%]{display:block;font-style:normal;text-align:center;color:#14151a}"],data:{animation:[lj]},changeDetection:0});let n=e;return n})();function mge(n,e){if(n&1){let t=$();b(0,"div",5)(1,"dot-asset-search",6),P("addAsset",function(r){M(t);let o=y();return D(o.onSelectAsset(r))}),C()()}if(n&2){let t=y();m(),f("type",t.type)("languageId",t.languageId)}}function gge(n,e){if(n&1){let t=$();b(0,"div",5)(1,"dot-upload-asset",7),P("uploadedFile",function(r){M(t);let o=y();return D(o.onSelectAsset(r))})("preventClose",function(r){M(t);let o=y();return D(o.onPreventClose(r))})("hide",function(r){M(t);let o=y();return D(o.onHide(r))}),C()()}if(n&2){let t=y();m(),f("type",t.type)}}function yge(n,e){if(n&1){let t=$();b(0,"div",5)(1,"dot-external-asset",8),P("addAsset",function(r){M(t);let o=y();return D(o.onSelectAsset(r))}),C()()}if(n&2){let t=y();m(),f("type",t.type)}}var fj=(()=>{let e=class e{constructor(){this.languageId=1,this.disableTabs=!1}onPreventClose(i){this.preventClose(i),this.disableTabs=i}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-asset-form"]],inputs:{languageId:"languageId",type:"type",onSelectAsset:"onSelectAsset",preventClose:"preventClose",onHide:"onHide"},decls:8,vars:8,consts:[[1,"tabview-container"],["header","Library","leftIcon","pi pi-images",3,"cache","disabled"],["pTemplate","content"],["leftIcon","pi pi-folder",3,"cache","header","disabled"],["leftIcon","pi pi-link",3,"cache","header","disabled"],[1,"wrapper"],[3,"addAsset","type","languageId"],[3,"uploadedFile","preventClose","hide","type"],[3,"addAsset","type"]],template:function(r,o){r&1&&(b(0,"div",0)(1,"p-tabView")(2,"p-tabPanel",1),x(3,mge,2,2,"ng-template",2),C(),b(4,"p-tabPanel",3),x(5,gge,2,1,"ng-template",2),C(),b(6,"p-tabPanel",4),x(7,yge,2,1,"ng-template",2),C()()()),r&2&&(m(2),f("cache",!1)("disabled",o.disableTabs),m(2),f("cache",!1)("header","Upload "+o.type)("disabled",o.disableTabs),m(2),f("cache",!1)("header",o.type+" URL")("disabled",o.disableTabs))},dependencies:[qe,gM,mM,Gs,aj,hj],styles:["[_nghost-%COMP%]{border:1px solid #afb3c0;display:block}.tabview-container[_ngcontent-%COMP%]{width:720px;background:#fff}.wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%] .p-tabview-nav{padding:0 2rem}[_nghost-%COMP%] .p-tabview-panel{height:25rem}[_nghost-%COMP%] .p-tabview-panels{padding:0}"],changeDetection:0});let n=e;return n})();var xM=class{constructor({editor:e,view:t,pluginKey:i,render:r}){this.editor=e,this.view=t,this.pluginKey=i,this.render=r,this.editor.on("focus",()=>this.render().onHide(this.editor))}update(e,t){let i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{open:!1},{state:o}=e,{selection:s}=o;i?.open!==r?.open&&(i?.open?this.render().onStart({editor:this.editor,type:i.type,getPosition:()=>{let{from:a,to:l}=s;return qr(e,a,l)}}):this.render().onHide(this.editor))}destroy(){this.render().onDestroy()}},mj=n=>new Le({key:n.pluginKey,view:e=>new xM(I({view:e},n)),state:{init(){return{open:!1,type:null}},apply(e,t,i){let{open:r,type:o}=e.getMeta(n.pluginKey)||{},s=n.pluginKey?.getState(i);return typeof r=="boolean"?{open:r,type:o}:s||t}}});var Lv=new Be("bubble-image-form"),_ge={interactive:!0,duration:0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}},gj=n=>{let e,t,i,r=!1;function o({editor:d,type:p,getPosition:h}){l(d),c(d,p),e.setProps({content:i,getReferenceClientRect:h,onClickOutside:()=>s(d)}),e.show()}function s(d){r||(d.commands.closeAssetForm(),e?.hide(),t?.destroy())}function a(){e?.destroy(),t?.destroy()}function l(d){let{element:p}=d.options,h=!!p.parentElement;e||!h||(e=Pi(p.parentElement,_ge))}function c(d,p){t=n.createComponent(fj),t.instance.languageId=d.storage.dotConfig.lang,t.instance.type=p,t.instance.onSelectAsset=h=>{u(d,!1),d.chain().insertAsset({type:p,payload:h}).addNextLine().closeAssetForm().run()},t.instance.preventClose=h=>u(d,h),t.instance.onHide=()=>{u(d,!1),s(d)},i=t.location.nativeElement,t.changeDetectorRef.detectChanges()}function u(d,p){r=p,d.setOptions({editable:!p})}return Bd.extend({name:"bubbleAssetForm",addOptions(){return{element:null,tippyOptions:{},pluginKey:Lv}},addCommands(){return{openAssetForm:({type:d})=>({chain:p})=>p().command(({tr:h})=>(h.setMeta(Lv,{open:!0,type:d}),!0)).freezeScroll(!0).run(),closeAssetForm:()=>({chain:d})=>d().command(({tr:p})=>(p.setMeta(Lv,{open:!1}),!0)).freezeScroll(!1).run(),insertAsset:({type:d,payload:p,position:h})=>({chain:g})=>{switch(d){case"video":return typeof p=="string"&&g().setYoutubeVideo?.({src:p}).run()||g().insertVideo?.(p,h).run();case"image":return g().insertImage(p,h).run()}}}},addProseMirrorPlugins(){return[mj({pluginKey:Lv,editor:this.editor,render:()=>({onStart:o,onHide:s,onDestroy:a})})]}})};function vge(n,e){if(n&1){let t=$();b(0,"div",0)(1,"div",2),E(2,"video",3),C(),b(3,"div",4)(4,"div"),E(5,"dot-spinner",5),Z(6," Uploading video, wait until finished. "),C(),b(7,"button",6),P("click",function(){M(t);let r=y();return D(r.cancel.emit(!0))}),C()()()}}function bge(n,e){n&1&&(b(0,"span",1),Z(1,"Uploading..."),C())}var Pv=(()=>{let e=class e{constructor(){this.cancel=new j}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-upload-placeholder"]],inputs:{type:"type"},outputs:{cancel:"cancel"},standalone:!0,features:[ue],decls:2,vars:1,consts:[[1,"placeholder-container"],[1,"default-message"],[1,"preview-container__video"],["src","","controls","",1,"video"],[1,"preview-container__loading"],["size","30px"],["pButton","","label","Cancel",1,"p-button-md","p-button-outlined",3,"click"]],template:function(r,o){if(r&1&&x(0,vge,8,0,"div",0)(1,bge,2,0,"span",1),r&2){let s;we((s=o.type)==="video"?0:1)}},dependencies:[an,zt,rc,od],styles:[".placeholder-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;width:fit-content;padding:0}.preview-container__video[_ngcontent-%COMP%]{aspect-ratio:16/9;height:300px}.preview-container__video[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%}.preview-container__loading[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding:1rem 0}.default-message[_ngcontent-%COMP%]{background-color:#f3f3f4;display:block;padding:16px;font-size:1rem;width:100%}"],changeDetection:0});let n=e;return n})();var Rv=new Le({state:{init(){return pn.empty},apply(n,e){e=e.map(n.mapping,n.doc);let t=n.getMeta(this);if(t&&t.add){let i=t.add.id,r=An.widget(t.add.pos,t.add.element,{key:i});e=e.add(n.doc,[r])}else t&&t.remove&&(e=e.remove(e.find(null,null,i=>i.key==t.remove.id)));return e}},props:{decorations(n){return this.getState(n)}}});var Fv=class{constructor(e,t,i){this.applicationRef=t.get(fi),this.componentRef=Tu(e,{environmentInjector:this.applicationRef.injector}),this.updateProps(i),this.applicationRef.attachView(this.componentRef.hostView)}get instance(){return this.componentRef.instance}get elementRef(){return this.componentRef.injector.get(Ce)}get dom(){return this.elementRef.nativeElement}updateProps(e){Object.entries(e).forEach(([t,i])=>{this.instance[t]=i})}detectChanges(){this.componentRef.changeDetectorRef.detectChanges()}destroy(){this.componentRef.destroy(),this.applicationRef.detachView(this.componentRef.hostView)}};var yj=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["ng-component"]],inputs:{editor:"editor",node:"node",decorations:"decorations",selected:"selected",extension:"extension",getPos:"getPos",updateAttributes:"updateAttributes",deleteNode:"deleteNode"},decls:0,vars:0,template:function(r,o){},encapsulation:2});let n=e;return n})(),TM=class extends I_{mount(){let e=this.options.injector,t={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(i={})=>this.updateAttributes(i),deleteNode:()=>this.deleteNode()};this.renderer=new Fv(this.component,e,t),this.extension.config.draggable&&(this.renderer.elementRef.nativeElement.ondragstart=i=>{this.onDragStart(i)}),this.options.toJSON&&(this.node.toJSON=this.options.toJSON.bind(this)),this.contentDOMElement=this.node.isLeaf?null:document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement&&(this.contentDOMElement.style.whiteSpace="inherit",this.renderer.detectChanges())}get dom(){return this.renderer.dom}get contentDOM(){return this.node.isLeaf?null:(this.maybeMoveContentDOM(),this.contentDOMElement)}maybeMoveContentDOM(){let e=this.dom.querySelector("[data-node-view-content]");this.contentDOMElement&&e&&!e.contains(this.contentDOMElement)&&e.appendChild(this.contentDOMElement)}update(e,t){return this.options.update?this.options.update(e,t):(this.options.toJSON&&(this.node.toJSON=this.options.toJSON.bind(this)),e.type!==this.node.type?!1:(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,this.renderer.updateProps({node:e,decorations:t}),this.maybeMoveContentDOM()),!0))}selectNode(){this.renderer.updateProps({selected:!0})}deselectNode(){this.renderer.updateProps({selected:!1})}destroy(){this.renderer.destroy()}},_j=(n,e)=>t=>new TM(n,t,e);function Cge(n,e){if(n&1&&E(0,"dot-contentlet-thumbnail",4),n&2){let t=y();f("width",94)("height",94)("iconSize","72px")("contentlet",t)}}function wge(n,e){if(n&1&&(b(0,"h3",5),Z(1),C()),n&2){let t=y();m(),Pe(t.title)}}function Ige(n,e){if(n&1&&(b(0,"span"),Z(1),C()),n&2){let t=y();m(),Pe(t.contentType)}}function xge(n,e){if(n&1&&(b(0,"dot-badge",8),Z(1),ht(2,"lowercase"),C()),n&2){let t=y(2);f("bordered",!0),m(),Pe(ft(2,2,t.language))}}function Tge(n,e){if(n&1&&(b(0,"div",6),E(1,"dot-state-icon",7),ht(2,"contentletState"),x(3,xge,3,4,"dot-badge",8),C()),n&2){let t=y();m(),f("state",ft(2,2,t)),m(2),we(t.language?3:-1)}}function Ege(n,e){n&1&&(b(0,"p-card"),x(1,Cge,1,4,"ng-template",0)(2,wge,2,1,"h3",1)(3,Ige,2,1,"span",2)(4,Tge,4,4,"ng-template",3),C()),n&2&&(m(2),f("pTemplate","title"),m(),f("pTemplate","subtitle"))}function Sge(n,e){n&1&&(b(0,"p-card")(1,"div",9),E(2,"dot-spinner"),C()())}var vj=(()=>{let e=class e extends yj{constructor(){super(...arguments),this.data=Lt(null)}ngOnInit(){this.data.set(this.node.attrs.data)}};e.\u0275fac=(()=>{let i;return function(o){return(i||(i=Oe(e)))(o||e)}})(),e.\u0275cmp=F({type:e,selectors:[["dot-contentlet-block"]],features:[xe],decls:2,vars:1,consts:[["pTemplate","header"],["class","title",4,"pTemplate"],[4,"pTemplate"],["pTemplate","footer"],[3,"width","height","iconSize","contentlet"],[1,"title"],[1,"state"],["size","16px",3,"state"],[3,"bordered"],[1,"spinner__container"]],template:function(r,o){if(r&1&&x(0,Ege,5,2,"p-card")(1,Sge,3,0,"p-card"),r&2){let s;we((s=o.data())?0:1,s)}},dependencies:[qe,sd,od,n0,F6],styles:["[_nghost-%COMP%]{display:block;height:100%;width:100%;box-sizing:border-box;margin-bottom:1rem}[_nghost-%COMP%] .spinner__container[_ngcontent-%COMP%]{height:5.875rem;display:flex;justify-content:center;align-items:center}[_nghost-%COMP%] .p-card{background:#fff;border:1px solid #afb3c0;color:#14151a;display:flex}[_nghost-%COMP%] .p-card .p-card-header{box-sizing:border-box;padding:1rem;padding-right:0}[_nghost-%COMP%] .p-card .p-card-body{box-sizing:border-box;min-width:100px;padding:1rem 1.5rem 1rem 1rem;flex:1}[_nghost-%COMP%] .p-card .p-card-body .p-card-content{padding:0}[_nghost-%COMP%] .p-card .p-card-body .p-card-subtitle{color:#6c7389;font-size:.75rem;font-weight:regular;margin-bottom:.75rem}[_nghost-%COMP%] .p-card .p-card-body .p-card-title{overflow:hidden;width:100%;margin:0}[_nghost-%COMP%] .p-card .p-card-body .p-card-title h3{font-weight:700;margin-bottom:.5rem;margin:0;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap;font-size:1.25rem}[_nghost-%COMP%] dot-contentlet-thumbnail[_ngcontent-%COMP%]{align-items:center;display:block;position:relative;width:94px;height:94px}[_nghost-%COMP%] .state[_ngcontent-%COMP%]{align-items:center;display:flex}[_nghost-%COMP%] .state[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-right:.5rem}[_nghost-%COMP%] .state[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:last-child{margin-right:0}"]});let n=e;return n})();var bj=n=>at.create({name:"dotContent",group:"block",inline:!1,draggable:!0,addAttributes(){return{data:{default:null,rendered:!0,parseHTML:e=>({data:e.getAttribute("data")}),renderHTML:({data:e})=>({data:e})}}},renderHTML({HTMLAttributes:e}){let{data:t}=e,i=t.hasTitleImage?["img",{src:t.image}]:["span",{}];return["div",["h3",t.title],["div",t.identifier],i,["div",{},t.language]]},addNodeView(){return _j(vj,{injector:n,toJSON:zd})}});var Mge=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Cj=at.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",Ae(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[A_({find:Mge,type:this.type,getAttributes:n=>{let[,,e,t,i]=n;return{src:t,alt:e,title:i}}})]}});var wj="language_id",Ij=(n,e)=>{let{href:t=null,target:i}=e;return["a",{href:t,target:i},EM(n,e)]},EM=(n,e)=>["img",Ae(n,e)],SM=(n,e)=>n.includes(wj)?n:`${n}?${wj}=${e}`,xj=n=>{if(typeof n=="string")return{src:n,data:"null"};let{fileAsset:e,asset:t,title:i,languageId:r}=n;return{data:n,src:SM(e||t,r),title:i,alt:i}};var Qn=Cj.extend({name:"dotImage",addOptions(){return{inline:!1,allowBase64:!0,HTMLAttributes:{}}},addAttributes(){return{src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:SM(n.src||n.data?.asset,n.data?.languageId)})},alt:{default:null,parseHTML:n=>n.getAttribute("alt"),renderHTML:n=>({alt:n.alt||n.data?.title})},title:{default:null,parseHTML:n=>n.getAttribute("title"),renderHTML:n=>({title:n.title||n.data?.title})},href:{default:null,parseHTML:n=>n.getAttribute("href"),renderHTML:n=>({href:n.href})},data:{default:null,parseHTML:n=>n.getAttribute("data"),renderHTML:n=>({data:JSON.stringify(n.data)})},target:{default:null,parseHTML:n=>n.getAttribute("target"),renderHTML:n=>({target:n.target})}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},addCommands(){return R(I({},this.parent?.()),{setImageLink:n=>({commands:e})=>e.updateAttributes(this.name,n),unsetImageLink:()=>({commands:n})=>n.updateAttributes(this.name,{href:""}),insertImage:(n,e)=>({chain:t,state:i})=>{let{selection:r}=i,{head:o}=r,s={attrs:xj(n),type:Qn.name};return t().insertContentAt(e??o,s).run()}})},renderHTML({HTMLAttributes:n}){let{href:e=null,style:t}=n||{};return["div",{style:t},e?Ij(this.options.HTMLAttributes,n):EM(this.options.HTMLAttributes,n)]},addNodeView(){return({node:n,HTMLAttributes:e})=>{let t=!!e.href,i=document.createElement("div");i.classList.add("image-container"),i.setAttribute("style",e.style);let r=document.createElement("img");Object.entries(e).forEach(([s,a])=>{typeof a=="object"&&a!==null&&(a=JSON.stringify(a)),r.setAttribute(s,a)});let o=document.createElement("a");return o.setAttribute("href",e.href),o.setAttribute("target",e.target),o.appendChild(r),i.appendChild(t?o:r),n.toJSON=zd.bind({node:n}),{dom:i,node:n}}}});var Dge=n=>{if(typeof n=="string")return{src:n};let{assetMetaData:e,asset:t,mimeType:i,fileAsset:r}=n,{width:o="auto",height:s="auto",contentType:a}=e||{},l=s>o?"vertical":"horizontal";return{src:r||t,data:I({},n),width:o,height:s,mimeType:i||a,orientation:l}},Tj=at.create({name:"dotVideo",addAttributes(){return{src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:n.src})},mimeType:{default:null,parseHTML:n=>n.getAttribute("mimeType"),renderHTML:n=>({mimeType:n.mimeType})},width:{default:null,parseHTML:n=>n.getAttribute("width"),renderHTML:n=>({width:n.width})},height:{default:null,parseHTML:n=>n.getAttribute("height"),renderHTML:n=>({height:n.height})},orientation:{default:null,parseHTML:n=>n.getAttribute("orientation"),renderHTML:({height:n,width:e})=>({orientation:n>e?"vertical":"horizontal"})},data:{default:null,parseHTML:n=>n.getAttribute("data"),renderHTML:n=>({data:JSON.stringify(n.data)})}}},parseHTML(){return[{tag:"video"}]},addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return"block"},draggable:!0,addCommands(){return R(I({},this.parent?.()),{insertVideo:(n,e)=>({commands:t,state:i})=>{let{selection:r}=i,{head:o}=r;return t.insertContentAt(e??o,{type:this.name,attrs:Dge(n)})}})},renderHTML({HTMLAttributes:n}){return["div",["video",Ae(n,{controls:!0})]]},addNodeView(){return({node:n,HTMLAttributes:e})=>{let t=document.createElement("div");t.classList.add("video-container");let i=document.createElement("video");return i.controls=!0,Object.entries(e).forEach(([r,o])=>{typeof o=="object"&&o!==null&&(o=JSON.stringify(o)),i.setAttribute(r,o)}),t.appendChild(i),n.toJSON=zd.bind({node:n}),{dom:t,node:n}}}});var Oge="ai-loading",Ej=at.create({name:"aiContent",addAttributes(){return{content:{default:""},loading:{default:!1}}},parseHTML(){return[{tag:"div[ai-content]"}]},addOptions(){return{inline:!1}},inline(){return this.options.inline},group(){return"block"},addCommands(){return R(I({},this.parent?.()),{insertAINode:n=>({commands:e,editor:t,tr:i})=>{let r=cM(t,Vn.AI_CONTENT)?.[0];return r?(i.setNodeMarkup(r.from,void 0,{content:n,loading:!1}),e.setNodeSelection(r.from),!0):e.insertContent({type:this.name,attrs:{content:n}})},setLoadingAIContentNode:n=>({tr:e,editor:t})=>{let i=cM(t,Vn.AI_CONTENT)?.[0];return i&&e.setNodeMarkup(i.from,void 0,R(I({},i.node.attrs),{loading:n})),!0}})},renderHTML(){return["div[ai-content]"]},addNodeView(){return({node:n})=>{let e=document.createElement("div"),t=document.createElement("div");return t.innerHTML=n.attrs.loading?'':n.attrs.content,e.contentEditable="true",e.className=`ai-content-container ${n.attrs.loading?Oge:""}`,e.append(t),{dom:e}}}});var Sj=at.create({name:"loader",addAttributes(){return{isLoading:{default:!0}}},parseHTML(){return[{tag:"div.p-d-flex.p-jc-center"}]},addOptions(){return{inline:!1}},inline(){return this.options.inline},group(){return"block"},addCommands(){return R(I({},this.parent?.()),{insertLoaderNode:(n,e)=>({chain:t,state:i})=>{let{selection:r}=i,{head:o}=r,s={type:this.name,attrs:{isLoading:n}};return t().insertContentAt(e??o,s).run()}})},renderHTML(){return["div",{class:"p-d-flex p-jc-center"}]},addNodeView(){return({node:n})=>{let e=document.createElement("div");if(e.classList.add("loader-style"),n.attrs.isLoading){let t=document.createElement("div");t.classList.add("p-progress-spinner"),e.append(t)}return{dom:e}}}});var Age={video:"dotVideo",image:"dotImage"},Mj=(n,e)=>mt.create({name:"assetUploader",addProseMirrorPlugins(){let t=n.get(as),i=this.editor,r,o;function s(_){return _?.type.split("/")[0]||""}function a(_){alert(`Can drop just one ${_} at a time`)}function l({view:_,position:v,id:w,type:S}){let L=e.createComponent(Pv),T=_.state.tr;L.instance.type=S,L.instance.cancel.subscribe(()=>{c(w),o.abort(),r.unsubscribe()}),L.changeDetectorRef.detectChanges(),T.setMeta(Rv,{add:{id:w,pos:v,element:L.location.nativeElement}}),_.dispatch(T)}function c(_){let{view:v}=i,{state:w}=v;v.dispatch(w.tr.setMeta(Rv,{remove:{id:_}})),Av(v)}function u({view:_,file:v,position:w}){let S=s(v),L=v.name;l({view:_,position:w,id:L,type:S}),o=new AbortController;let{signal:T}=o;r=t.publishContent({data:v,signal:T}).pipe(xt(1)).subscribe(q=>{let N=q[0][Object.keys(q[0])[0]];i.commands.insertAsset({type:S,payload:N,position:w})},q=>alert(q.message),()=>c(L))}function d(_){return i.commands.isNodeRegistered(Age[_])}function p(_,v){let{doc:w,selection:S}=_.state,{ranges:L}=S,T=Math.min(...L.map(ee=>ee.$from.pos)),q=w.nodeAt(T);return v.target?.closest("a")&&q.type.name===Qn.name?(v.preventDefault(),v.stopPropagation(),!0):!1}function h(_,v){let{clipboardData:w}=v,{files:S}=w,L=w.getData("Text")||"",T=s(S[0]),q=d(T);if(T&&!q){a(T);return}if(L&&!uM(L))return;let{from:N}=Q6(_);if(uM(L)&&d("image"))i.chain().insertImage(L,N).addNextLine().run();else{let ee=S[0];u({view:_,file:ee,position:N})}v.preventDefault(),v.stopPropagation()}function g(_,v){let{files:w}=v.dataTransfer,{length:S}=w,L=w[0],T=s(L);if(!d(T))return;if(S>1){a(T);return}v.preventDefault(),v.stopPropagation();let{clientX:q,clientY:N}=v,{pos:ee}=_.posAtCoords({left:q,top:N});u({view:_,file:L,position:ee})}return[Rv,new Le({key:new Be("assetUploader"),props:{handleDOMEvents:{click(_,v){p(_,v)},paste(_,v){h(_,v)},drop(_,v){g(_,v)}}}})]}});var kge=["input"],Nge=(n,e,t,i)=>({"p-checkbox p-component":!0,"p-checkbox-checked":n,"p-checkbox-disabled":e,"p-checkbox-focused":t,"p-variant-filled":i}),Lge=(n,e,t)=>({"p-highlight":n,"p-disabled":e,"p-focus":t}),Pge=(n,e,t)=>({"p-checkbox-label":!0,"p-checkbox-label-active":n,"p-disabled":e,"p-checkbox-label-focus":t});function Rge(n,e){if(n&1&&E(0,"span",10),n&2){let t=y(3);f("ngClass",t.checkboxIcon),O("data-pc-section","icon")}}function Fge(n,e){n&1&&E(0,"CheckIcon",11),n&2&&(f("styleClass","p-checkbox-icon"),O("data-pc-section","icon"))}function jge(n,e){if(n&1&&(oe(0),x(1,Rge,1,2,"span",8)(2,Fge,1,2,"CheckIcon",9),se()),n&2){let t=y(2);m(),f("ngIf",t.checkboxIcon),m(),f("ngIf",!t.checkboxIcon)}}function Vge(n,e){}function Bge(n,e){n&1&&x(0,Vge,0,0,"ng-template")}function zge(n,e){if(n&1&&(b(0,"span",12),x(1,Bge,1,0,null,13),C()),n&2){let t=y(2);O("data-pc-section","icon"),m(),f("ngTemplateOutlet",t.checkboxIconTemplate)}}function Uge(n,e){if(n&1&&(oe(0),x(1,jge,3,2,"ng-container",5)(2,zge,2,2,"span",7),se()),n&2){let t=y();m(),f("ngIf",!t.checkboxIconTemplate),m(),f("ngIf",t.checkboxIconTemplate)}}function Hge(n,e){if(n&1){let t=$();b(0,"label",14),P("click",function(r){M(t);let o=y(),s=pt(3);return D(o.onClick(r,s,!0))}),Z(1),C()}if(n&2){let t=y();W(t.labelStyleClass),f("ngClass",Sn(6,Pge,t.checked(),t.disabled,t.focused)),O("for",t.inputId)("data-pc-section","label"),m(),yt(" ",t.label,"")}}var $ge={provide:ti,useExisting:dn(()=>zf),multi:!0},zf=(()=>{class n{cd;injector;config;value;name;disabled;binary;label;ariaLabelledBy;ariaLabel;tabindex;inputId;style;styleClass;labelStyleClass;formControl;checkboxIcon;readonly;required;autofocus;trueValue=!0;falseValue=!1;variant="outlined";onChange=new j;onFocus=new j;onBlur=new j;inputViewChild;templates;checkboxIconTemplate;model;onModelChange=()=>{};onModelTouched=()=>{};focused=!1;constructor(t,i,r){this.cd=t,this.injector=i,this.config=r}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"icon":this.checkboxIconTemplate=t.template;break}})}onClick(t,i,r){t.preventDefault(),!(this.disabled||this.readonly)&&(this.updateModel(t),r&&i.focus())}updateModel(t){let i,r=this.injector.get(Hi,null,{optional:!0,self:!0}),o=r&&!this.formControl?r.value:this.model;this.binary?(i=this.checked()?this.falseValue:this.trueValue,this.model=i,this.onModelChange(i)):(this.checked()?i=o.filter(s=>!Ee.equals(s,this.value)):i=o?[...o,this.value]:[this.value],this.onModelChange(i),this.model=i,this.formControl&&this.formControl.setValue(i)),this.onChange.emit({checked:i,originalEvent:t})}handleChange(t){this.readonly||this.updateModel(t)}onInputFocus(t){this.focused=!0,this.onFocus.emit(t)}onInputBlur(t){this.focused=!1,this.onBlur.emit(t),this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeValue(t){this.model=t,this.cd.markForCheck()}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}setDisabledState(t){setTimeout(()=>{this.disabled=t,this.cd.markForCheck()})}checked(){return this.binary?this.model===this.trueValue:Ee.contains(this.value,this.model)}static \u0275fac=function(i){return new(i||n)(k(De),k($t),k(Pt))};static \u0275cmp=F({type:n,selectors:[["p-checkbox"]],contentQueries:function(i,r,o){if(i&1&&Je(o,qe,4),i&2){let s;J(s=X())&&(r.templates=s)}},viewQuery:function(i,r){if(i&1&&fe(kge,5),i&2){let o;J(o=X())&&(r.inputViewChild=o.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",name:"name",disabled:[2,"disabled","disabled",V],binary:[2,"binary","binary",V],label:"label",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:[2,"tabindex","tabindex",Ke],inputId:"inputId",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass",formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:[2,"readonly","readonly",V],required:[2,"required","required",V],autofocus:[2,"autofocus","autofocus",V],trueValue:"trueValue",falseValue:"falseValue",variant:"variant"},outputs:{onChange:"onChange",onFocus:"onFocus",onBlur:"onBlur"},features:[on([$ge]),$e],decls:7,vars:37,consts:[["input",""],[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","checkbox","pAutoFocus","",3,"change","focus","blur","value","checked","disabled","readonly","autofocus"],[1,"p-checkbox-box",3,"click","ngClass"],[4,"ngIf"],[3,"class","ngClass","click",4,"ngIf"],["class","p-checkbox-icon",4,"ngIf"],["class","p-checkbox-icon",3,"ngClass",4,"ngIf"],[3,"styleClass",4,"ngIf"],[1,"p-checkbox-icon",3,"ngClass"],[3,"styleClass"],[1,"p-checkbox-icon"],[4,"ngTemplateOutlet"],[3,"click","ngClass"]],template:function(i,r){if(i&1){let o=$();b(0,"div",1)(1,"div",2)(2,"input",3,0),P("change",function(a){return M(o),D(r.handleChange(a))})("focus",function(a){return M(o),D(r.onInputFocus(a))})("blur",function(a){return M(o),D(r.onInputBlur(a))}),C()(),b(4,"div",4),P("click",function(a){M(o);let l=pt(3);return D(r.onClick(a,l,!0))}),x(5,Uge,3,2,"ng-container",5),C()(),x(6,Hge,2,10,"label",6)}i&2&&(W(r.styleClass),f("ngStyle",r.style)("ngClass",kr(28,Nge,r.checked(),r.disabled,r.focused,r.variant==="filled"||r.config.inputStyle()==="filled")),O("data-pc-name","checkbox")("data-pc-section","root"),m(),O("data-pc-section","hiddenInputWrapper")("data-p-hidden-accessible",!0),m(),f("value",r.value)("checked",r.checked())("disabled",r.disabled)("readonly",r.readonly)("autofocus",r.autofocus),O("id",r.inputId)("name",r.name)("tabindex",r.tabindex)("required",r.required)("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("aria-checked",r.checked())("data-pc-section","hiddenInput"),m(2),f("ngClass",Sn(33,Lge,r.checked(),r.disabled,r.focused)),O("data-p-highlight",r.checked())("data-p-disabled",r.disabled)("data-p-focused",r.focused)("data-pc-section","input"),m(),f("ngIf",r.checked()),m(),f("ngIf",r.label))},dependencies:()=>[Ye,ot,Mt,st,ts,Wi],styles:[`@layer primeng{.p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative}.p-checkbox-disabled{cursor:default!important;pointer-events:none}.p-checkbox-box{display:flex;justify-content:center;align-items:center}p-checkbox{display:inline-flex;vertical-align:bottom;align-items:center}.p-checkbox-label{line-height:1}} +`],encapsulation:2,changeDetection:0})}return n})(),MM=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=le({type:n});static \u0275inj=ae({imports:[Te,Ba,Wi,Ge]})}return n})();var Wge=["group"],Gge=()=>({width:"120px"}),qge=()=>({padding:"11.5px 24px"}),Qge=n=>({"p-label-input-required":n}),Kge=()=>({width:"100%",fontSize:"14px",height:"40px"});function Yge(n,e){if(n&1&&(E(0,"p-checkbox",8),b(1,"label",9),Z(2),ht(3,"titlecase"),C()),n&2){let t=y().$implicit;f("formControlName",t.key)("binary",!0)("id",t.key),m(),f("checkIsRequiredControl",t.key)("for",t.key),m(),yt(" ",ft(3,6,t.label)," ")}}function Zge(n,e){if(n&1&&(b(0,"label",10),Z(1),ht(2,"titlecase"),C(),E(3,"input",11,0)),n&2){let t=y().$implicit;f("ngClass",_e(11,Qge,t.required))("for",t.key),m(),yt(" ",ft(2,9,t.label)," "),m(2),En(St(13,Kge)),f("formControlName",t.key)("id",t.key)("type",t.type)("min",t.min)}}function Jge(n,e){n&1&&(b(0,"span",7),Z(1,"This field is required"),C())}function Xge(n,e){if(n&1&&(b(0,"div",3),x(1,Yge,4,8)(2,Zge,5,14)(3,Jge,2,0,"span",7),C()),n&2){let t,i=e.$implicit,r=y(2);f("ngClass",i.type),m(),we((t=i.type)==="checkbox"?1:2),m(2),we(r.form.controls[i.key].invalid&&r.form.controls[i.key].dirty?3:-1)}}function e0e(n,e){if(n&1){let t=$();b(0,"form",2),P("ngSubmit",function(){M(t);let r=y();return D(r.onSubmit())}),Or(1,Xge,4,3,"div",3,Sa),b(3,"div",4)(4,"button",5),P("click",function(){M(t);let r=y();return D(r.hide.emit(!0))}),C(),E(5,"button",6),C()()}if(n&2){let t=y();f("ngClass",t.options==null?null:t.options.customClass)("formGroup",t.form),m(),Ar(t.dynamicControls),m(3),En(St(7,Gge)),m(),En(St(8,qge)),f("disabled",t.form.invalid)}}var Oj=(()=>{let e=class e{constructor(i){this.fb=i,this.formValues=new j,this.hide=new j,this.options=null,this.dynamicControls=[]}onSubmit(){this.formValues.emit(I({},this.form.value))}setFormValues(i){this.form.setValue(i)}buildForm(i){this.dynamicControls=i,this.form=this.fb.group({}),this.dynamicControls.forEach(r=>{this.form.addControl(r.key,this.fb.control(r.value||null,r.required?Si.required:[]))})}cleanForm(){this.form=null}};e.\u0275fac=function(r){return new(r||e)(k(Au))},e.\u0275cmp=F({type:e,selectors:[["dot-bubble-form"]],viewQuery:function(r,o){if(r&1&&fe(Wge,5),r&2){let s;J(s=X())&&(o.inputs=s)}},outputs:{formValues:"formValues",hide:"hide"},decls:1,vars:1,consts:[["group",""],[3,"ngClass","formGroup"],[3,"ngSubmit","ngClass","formGroup"],[1,"field","form-row",3,"ngClass"],[1,"form-action"],["pButton","","type","button","label","CANCEL",1,"p-button-outlined",3,"click"],["pButton","","type","submit","label","APPLY",1,"p-button",3,"disabled"],[1,"error-message"],[3,"formControlName","binary","id"],["dotFieldRequired","",3,"checkIsRequiredControl","for"],[3,"ngClass","for"],["pInputText","","type","control.type",3,"formControlName","id","type","min"]],template:function(r,o){r&1&&x(0,e0e,6,9,"form",1),r&2&&we(o.form?0:-1)},dependencies:[Ye,Zo,Pr,Rr,Yo,$i,po,zf,zt,ns,Ly,Fk],styles:["[_nghost-%COMP%]{background:#fff;border-radius:.125rem;box-shadow:0 4px 10px #0a07251a;display:flex;flex-direction:column;padding:16px}form[_ngcontent-%COMP%]{width:400px;display:flex;flex-direction:column;gap:16px}form.dotTableForm[_ngcontent-%COMP%]{width:200px}form.dotTableForm[_ngcontent-%COMP%] .p-button-outlined[_ngcontent-%COMP%]{display:none}.form-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.form-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-size:12px}.form-row.checkbox[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.form-action[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;padding-top:16px;width:100%;gap:10px}.error-message[_ngcontent-%COMP%]{color:#d82b2e;font-size:.625rem;text-align:left}"]});let n=e;return n})();var t0e=["list"];function n0e(n,e){if(n&1&&E(0,"dot-suggestions-list-item",1),n&2){let t=e.$implicit,i=e.$index;f("command",t.command)("index",i.toString())("label",t.label)("url",t.icon)("data",t.data)("page",!0)}}function i0e(n,e){if(n&1&&(b(0,"div")(1,"dot-suggestion-list",null,0),Or(3,n0e,1,6,"dot-suggestions-list-item",1,Wg),C()()),n&2){let t=y();m(3),Ar(t.items)}}function r0e(n,e){n&1&&E(0,"dot-suggestion-loading-list")}function o0e(n,e){if(n&1){let t=$();b(0,"dot-empty-message",3),P("back",function(){M(t);let r=y(2);return D(r.handleBackButton())}),C()}if(n&2){let t=y(2);f("title",t.title)("showBackBtn",!0)}}function s0e(n,e){if(n&1&&x(0,r0e,1,0,"dot-suggestion-loading-list")(1,o0e,1,2,"dot-empty-message",2),n&2){let t=y();we(t.loading?0:1)}}var DM=(()=>{let e=class e{constructor(){this.items=[],this.loading=!1,this.back=new j}handleBackButton(){return this.back.emit(!0),!1}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton()}updateSelection(i){this.list.updateSelection(i)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-suggestion-page"]],viewQuery:function(r,o){if(r&1&&fe(t0e,5),r&2){let s;J(s=X())&&(o.list=s.first)}},inputs:{items:"items",loading:"loading",title:"title"},outputs:{back:"back"},decls:2,vars:1,consts:[["list",""],[3,"command","index","label","url","data","page"],[3,"title","showBackBtn"],[3,"back","title","showBackBtn"]],template:function(r,o){r&1&&x(0,i0e,5,0,"div")(1,s0e,2,1),r&2&&we(o.items.length?0:1)},styles:["[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px var(--color-palette-black-op-10);padding:8px 0;background:#fff}[_nghost-%COMP%] {width:100%;box-shadow:none;padding:0}[_nghost-%COMP%] dotcms-suggestions-list-item{padding:8px}"]});let n=e;return n})();var a0e=["input"],l0e=["suggestions"],c0e=()=>({width:"5rem",padding:".75rem 1rem",borderRadius:"0 2px 2px 0"}),u0e=()=>({fontSize:"32px"});function d0e(n,e){n&1&&E(0,"hr",8)}function p0e(n,e){if(n&1&&(b(0,"div",9)(1,"a",12)(2,"span",13),Z(3,"language"),C(),b(4,"span",14),Z(5),C()(),b(6,"div",15)(7,"div",16),E(8,"p-checkbox",17),C(),b(9,"label",18),Z(10,"Open link in new window"),C()()()),n&2){let t=y();m(),f("href",t.currentLink,zi),m(),En(St(5,u0e)),m(3),Pe(t.currentLink),m(3),f("binary",!0)}}function h0e(n,e){if(n&1){let t=$();b(0,"dot-suggestion-page",19,1),P("back",function(){M(t);let r=y();return D(r.resetForm())}),C()}if(n&2){let t=y();f("items",t.items)("loading",t.loading)("title",t.noResultsTitle)}}function f0e(n,e){if(n&1){let t=$();b(0,"dot-form-actions",20),P("hide",function(r){M(t);let o=y();return D(o.hide.emit(r))})("remove",function(r){M(t);let o=y();return D(o.removeLink.emit(r))}),C()}if(n&2){let t=y();f("link",t.currentLink)}}var jv=(()=>{let e=class e{onMouseDownHandler(i){let{target:r}=i;r!==this.input.nativeElement&&i.preventDefault()}get noResultsTitle(){return`No results for ${this.newLink}`}get currentLink(){return this.initialValues.link}get newLink(){return this.form.get("link").value}constructor(i,r,o){this.fb=i,this.suggestionsService=r,this.dotLanguagesService=o,this.hide=new j(!1),this.removeLink=new j(!1),this.isSuggestionOpen=new j(!1),this.setNodeProps=new j,this.showSuggestions=!1,this.languageId=1,this.initialValues={link:"",blank:!0},this.minChars=3,this.dotLangs={},this.loading=!1,this.items=[]}ngOnInit(){this.form=this.fb.group(I({},this.initialValues)),this.form.get("link").valueChanges.pipe(Ts(500)).subscribe(i=>{i.lengththis.setNodeProps.emit({link:this.currentLink,blank:i})),this.dotLanguagesService.get().pipe(xt(1)).subscribe(i=>{i.forEach(r=>this.dotLangs[r.id]=r)})}submitForm(){this.setNodeProps.emit(this.form.value),this.hide.emit(!0)}setLoading(){let i=this.newLink.length>=this.minChars&&!Wd(this.newLink);this.items=i?this.items:[],this.showSuggestions=i,this.loading=i,i&&requestAnimationFrame(()=>this.isSuggestionOpen.emit(!0))}setFormValue({link:i="",blank:r=!0}){this.form.setValue({link:i,blank:r},{emitEvent:!1})}focusInput(){this.input.nativeElement.focus()}onKeyDownEvent(i){let r=this.suggestionsComponent?.items;if(i.stopImmediatePropagation(),i.key==="Escape")return this.hide.emit(!0),!0;if(!this.showSuggestions||!r?.length)return!0;switch(i.key){case"Enter":return this.suggestionsComponent?.execCommand(),!1;case"ArrowUp":return this.suggestionsComponent?.updateSelection(i),!1;case"ArrowDown":return this.suggestionsComponent?.updateSelection(i),!1;default:return!1}}resetForm(){this.showSuggestions=!1,this.setFormValue(I({},this.initialValues))}onSelection({payload:{url:i}}){this.setFormValue(R(I({},this.form.value),{link:i})),this.submitForm()}searchContentlets({link:i=""}){this.loading=!0,this.suggestionsService.getContentletsByLink({link:i,currentLanguage:this.languageId}).pipe(xt(1)).subscribe(r=>{this.items=r.map(o=>{let{languageId:s}=o;o.language=this.getContentletLanguage(s);let a=R(I({},o),{url:o.URL_MAP_FOR_CONTENT?o.urlMap:o.url});return{label:o.title,icon:"contentlet/image",data:{contentlet:a},command:()=>{this.onSelection({payload:a,type:{name:"dotContent"}})}}}),this.loading=!1})}getContentletLanguage(i){let{languageCode:r,countryCode:o}=this.dotLangs[i];return!r||!o?"":`${r}-${o}`}};e.\u0275fac=function(r){return new(r||e)(k(Au),k(Vd),k(Ur))},e.\u0275cmp=F({type:e,selectors:[["dot-bubble-link-form"]],viewQuery:function(r,o){if(r&1&&(fe(a0e,5),fe(l0e,5)),r&2){let s;J(s=X())&&(o.input=s.first),J(s=X())&&(o.suggestionsComponent=s.first)}},hostBindings:function(r,o){r&1&&P("mousedown",function(a){return o.onMouseDownHandler(a)})},inputs:{showSuggestions:"showSuggestions",languageId:"languageId",initialValues:"initialValues"},outputs:{hide:"hide",removeLink:"removeLink",isSuggestionOpen:"isSuggestionOpen",setNodeProps:"setNodeProps"},decls:11,vars:8,consts:[["input",""],["suggestions",""],[1,"form-container"],["autocomplete","off",3,"keydown","ngSubmit","formGroup"],[1,"p-inputgroup","search-container"],[1,"p-inputgroup"],["id","editor-input-link","pInputText","","type","text","placeholder","Paste link or search for pages","formControlName","link",3,"input"],["pButton","","type","submit","label","ADD",1,"p-button"],[1,"divider"],[1,"info-container"],[3,"items","loading","title"],[3,"link"],["target","_blank",1,"url-container",3,"href"],[1,"material-icons"],[1,"truncate"],[1,"field-checkbox"],[1,"checkbox-container"],["id","editor-input-checkbox","formControlName","blank",3,"binary"],["for","editor-input-checkbox"],[3,"back","items","loading","title"],[3,"hide","remove","link"]],template:function(r,o){if(r&1){let s=$();b(0,"div",2)(1,"form",3),P("keydown",function(l){return M(s),D(o.onKeyDownEvent(l))})("ngSubmit",function(){return M(s),D(o.submitForm())}),b(2,"div",4)(3,"div",5)(4,"input",6,0),P("input",function(){return M(s),D(o.setLoading())}),C(),E(6,"button",7),C()(),x(7,d0e,1,0,"hr",8)(8,p0e,11,6,"div",9),C(),x(9,h0e,2,3,"dot-suggestion-page",10)(10,f0e,1,1,"dot-form-actions",11),C()}r&2&&(m(),f("formGroup",o.form),m(5),En(St(7,c0e)),m(),we(o.showSuggestions||o.currentLink?7:-1),m(),we(o.currentLink&&!o.showSuggestions?8:-1),m(),we(o.showSuggestions?9:-1),m(),we(!o.showSuggestions&&o.currentLink?10:-1))},styles:[".form-container[_ngcontent-%COMP%]{background:#fff;border-radius:.125rem;box-shadow:0 4px 10px #0a07251a;display:flex;flex-direction:column;width:400px}.form-container[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;max-width:100%}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%]{padding:1rem;width:100%}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{background:#fff;border:1px solid #afb3c0}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:1rem;width:100%}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .url-container[_ngcontent-%COMP%]{cursor:pointer;white-space:nowrap;font-size:.875rem;width:100%;word-wrap:normal;display:flex;align-items:center;text-decoration:none;gap:8px;color:#14151a}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .field-checkbox[_ngcontent-%COMP%]{display:flex;gap:3.2px;min-width:100%;font-size:.875rem}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .field-checkbox[_ngcontent-%COMP%] .checkbox-container[_ngcontent-%COMP%]{cursor:pointer;width:32px;display:flex;align-items:center;justify-content:center}.divider[_ngcontent-%COMP%]{border:0;border-top:1px solid #ebecef;width:100%;margin:0}.truncate[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]});let n=e;return n})();var OM=({editor:n,view:e,pos:t})=>{let i=e.state.doc?.resolve(t),r=H6(i,t),{from:o,to:s}=r;o!==s&&n.chain().setTextSelection(r).openLinkForm({openOnClick:!0}).run()};var AM=class{constructor({editor:e,element:t,view:i,tippyOptions:r={},pluginKey:o,component:s,languageId:a}){this.scrollElementMap={"editor-suggestion-list":!0,"editor-input-link":!0,"editor-input-checkbox":!0},this.$destroy=new pe,this.focusHandler=()=>{let{state:l}=this.editor,{to:c}=l.selection,{openOnClick:u}=eo.getState(l);this.pluginKey.getState(l).isOpen&&(u?(this.editor.commands.closeLinkForm(),requestAnimationFrame(()=>this.editor.commands.setTextSelection(c))):this.editor.commands.closeLinkForm())},this.editor=e,this.element=t,this.view=i,this.languageId=a,this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible",this.pluginKey=o,this.component=s,this.editor.on("focus",this.focusHandler),this.setComponentEvents(),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0)}update(e,t){let i=this.pluginKey.getState(e.state),r=this.pluginKey.getState(t);if(i.isOpen===r.isOpen){this.detectLinkFormChanges();return}this.createTooltip(),i.isOpen?this.show():this.hide(),this.detectLinkFormChanges()}createTooltip(){let{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=Pi(e.parentElement,R(I(I({},this.tippyOptions),X0),{getReferenceClientRect:()=>this.setTippyPosition(),content:this.element,onHide:()=>{this.editor.commands.closeLinkForm()}})))}show(){this.tippy?.show(),this.component.instance.showSuggestions=!1,this.setInputValues(),this.component.instance.focusInput()}hide(){this.tippy?.hide(),this.editor.view.focus()}setTippyPosition(){let{view:e}=this.editor,{state:t}=e,{doc:i,selection:r}=t,{ranges:o}=r,s=Math.min(...o.map(_=>_.$from.pos)),a=Math.max(...o.map(_=>_.$to.pos)),l=qr(e,s,a),{element:c}=this.editor.options,u=c.parentElement.getBoundingClientRect(),d=document.querySelector("#bubble-menu")?.getBoundingClientRect()||l,p=u.bottomthis.hide()),this.component.instance.removeLink.pipe(Ft(this.$destroy)).subscribe(()=>this.removeLink()),this.component.instance.isSuggestionOpen.pipe(Ft(this.$destroy)).subscribe(()=>this.tippy.popperInstance.update()),this.component.instance.setNodeProps.pipe(Ft(this.$destroy)).subscribe(e=>this.setLinkValues(e))}detectLinkFormChanges(){this.component.changeDetectorRef.detectChanges(),requestAnimationFrame(()=>this.tippy?.popperInstance?.forceUpdate())}getLinkProps(){let{href:e="",target:t="_top"}=this.editor.isActive("link")?this.editor.getAttributes("link"):this.editor.getAttributes(Qn.name);return{link:e,blank:t==="_blank"}}getLinkSelect(){let{state:e}=this.editor,{from:t,to:i}=e.selection,r=e.doc.textBetween(t,i," ");return Wd(r)?r:""}isImageNode(){let{type:e}=this.editor.state.doc.nodeAt(this.editor.state.selection.from)||{};return e?.name===Qn.name}destroy(){this.tippy?.destroy(),this.editor.off("focus",this.focusHandler),this.$destroy.next(!0),this.component.destroy()}hanlderScroll(e){if(!this.tippy?.state.isMounted)return;let t=e.target,i=t?.parentElement?.parentElement;this.scrollElementMap[t.id]||this.scrollElementMap[i.id]||this.hide()}},Aj=n=>{let e;return new Le({key:n.pluginKey,view:t=>new AM(I({view:t},n)),state:{init(){return{isOpen:!1,openOnClick:!1}},apply(t,i,r){let{isOpen:o,openOnClick:s}=t.getMeta(eo)||{},a=eo.getState(r);return typeof o=="boolean"?{isOpen:o,openOnClick:s}:a||i}},props:{handleDOMEvents:{mousedown(t,i){let r=n.editor,o=$6(t,i),{isOpen:s,openOnClick:a}=eo.getState(r.state);s&&a&&r.chain().unsetHighlight().setTextSelection(o).run()}},handleClickOn(t,i,r){let o=n.editor;return!o.isActive("link")||!i?(e=r,null):My(e,r)?(o.chain().setTextSelection(i).closeLinkForm().run(),null):(OM({editor:o,view:t,pos:i}),e=r,!0)},handleDoubleClickOn(t,i){let r=n.editor;return r.isActive("link")?(OM({editor:r,view:t,pos:i}),!0):null}}})};var eo=new Be("addLink"),kj=(n,e)=>mt.create({name:"bubbleLinkForm",addOptions(){return{element:null,tippyOptions:{},pluginKey:eo}},addCommands(){return{openLinkForm:({openOnClick:t})=>({chain:i})=>i().setMeta("preventAutolink",!0)?.setHighlight?.().command(({tr:r})=>(r.setMeta(eo,{isOpen:!0,openOnClick:t}),!0)).freezeScroll(!0).run(),closeLinkForm:()=>({chain:t})=>t().setMeta("preventAutolink",!0).unsetHighlight?.().command(({tr:i})=>(i.setMeta(eo,{isOpen:!1,openOnClick:!1}),!0)).freezeScroll(!1).run()}},addProseMirrorPlugins(){let t=n.createComponent(jv);return t.changeDetectorRef.detectChanges(),[Aj({pluginKey:this.options.pluginKey,editor:this.editor,element:t.location.nativeElement,tippyOptions:this.options.tippyOptions,component:t,languageId:e})]}});var Nj={tableCell:!0,table:!0,youtube:!0,dotVideo:!0,aiContent:!0,loader:!0},Pj=({editor:n,state:e,from:t,to:i})=>{let{doc:r,selection:o}=e,{view:s}=n,{empty:a}=o,{isOpen:l,openOnClick:c}=eo.getState(e),u=n.state.doc.nodeAt(n.state.selection.from),d=_s(n.state.selection.$from),p=!r.textBetween(t,i).length&&Sd(e.selection);return u?.type.name==="text"&&d?.type.name==="table"&&!p?!0:!(!l&&(!s.hasFocus()||a||p||Nj[d?.type.name]||Nj[u?.type.name])||l&&c)},Wd=n=>!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(n),Rj=(n,e)=>e===Qn.name&&n.getElementsByTagName("img")[0]?.getBoundingClientRect()||n.getBoundingClientRect(),Vv=(n,e)=>e===Qn.name&&n?.firstElementChild?n.firstElementChild.getBoundingClientRect():n.getBoundingClientRect(),Fj=({viewCoords:n,nodeCoords:e,padding:t})=>{let{top:i,bottom:r}=e,{top:o,bottom:s}=n,a=Math.ceil(i-o)n.isActive("bulletList")||n.isActive("orderedList"),m0e=window.rel_BlogblogComment_PeditRelatedContent,jj=[{icon:"format_bold",markAction:"bold",active:!1},{icon:"format_underlined",markAction:"underline",active:!1},{icon:"format_italic",markAction:"italic",active:!1},{icon:"strikethrough_s",markAction:"strike",active:!1},{icon:"superscript",markAction:"superscript",active:!1},{icon:"subscript",markAction:"subscript",active:!1,divider:!0}],NM=[{icon:"format_align_left",markAction:"left",active:!1},{icon:"format_align_center",markAction:"center",active:!1},{icon:"format_align_right",markAction:"right",active:!1},{icon:"format_align_justify",markAction:"justify",active:!1,divider:!0}],g0e=[...jj,...NM,{icon:"format_list_bulleted",markAction:"bulletList",active:!1},{icon:"format_list_numbered",markAction:"orderedList",active:!1},{icon:"format_indent_decrease",markAction:"outdent",active:!1},{icon:"format_indent_increase",markAction:"indent",active:!1,divider:!0},{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"format_clear",markAction:"clearAll",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],y0e=[...NM,{icon:"link",markAction:"link",active:!1,divider:!0},{text:"Properties",markAction:"properties",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],_0e=[...jj,...NM,{icon:"link",markAction:"link",active:!1,divider:!0},{icon:"format_clear",markAction:"clearAll",active:!1,divider:!0},{icon:"delete",markAction:"deleteNode",active:!1}],Lj=[{icon:"delete",markAction:"deleteNode",active:!1}],Vj=(n="")=>{switch(n){case"dotImage":return y0e;case"dotContent":return m0e?[...Lj,{icon:"edit",markAction:"goToContentlet",active:!1}]:Lj;case"table":return _0e;default:return g0e}},Bv=[{name:"offset",options:{offset:[0,5]}},{name:"flip",options:{fallbackPlacements:["bottom-start","top-start"]}},{name:"preventOverflow",options:{altAxis:!0,tether:!0}}];var Bj=[{key:"src",label:"path",required:!0,controlType:"text",type:"text"},{key:"alt",label:"alt",controlType:"text",type:"text"},{key:"title",label:"caption",controlType:"text",type:"text"}];var LM=class extends Rc{constructor(e){let{editor:t,element:i,view:r,tippyOptions:o={},pluginKey:s,component:a}=e;super(e),this.$destroy=new pe,this.focusHandler=()=>{this.editor.commands.closeForm(),setTimeout(()=>this.update(this.editor.view))},this.editor=t,this.element=i,this.view=r,this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible",this.pluginKey=s,this.component=a,this.component.instance.buildForm(Bj),this.component.instance.formValues.pipe(Ft(this.$destroy)).subscribe(l=>{this.editor.commands.updateValue(l)}),this.component.instance.hide.pipe(Ft(this.$destroy)).subscribe(()=>{this.editor.commands.closeForm()}),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0)}update(e,t){let i=this.pluginKey?.getState(e.state),r=t?this.pluginKey?.getState(t):{open:!1},{state:o}=e,{doc:s,selection:a}=o,{ranges:l}=a,c=Math.min(...l.map(d=>d.$from.pos)),u=Math.max(...l.map(d=>d.$to.pos));if(i?.open===r?.open){this.tippy?.popperInstance?.forceUpdate();return}i.open&&i.form?(this.component.instance.buildForm(i.form),this.component.instance.options=i.options):this.component.instance.cleanForm(),this.createTooltip(),this.tippy?.setProps({getReferenceClientRect:()=>{if(a instanceof Se){let d=e.nodeDOM(c);if(d){this.node=s.nodeAt(c);let p=this.node.type.name;return this.tippyRect(d,p)}}return qr(e,c,u)}}),i.open?this.show():this.hide()}createTooltip(){let{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=Pi(e.parentElement,R(I(I({},this.tippyOptions),X0),{content:this.element,onShow:()=>{requestAnimationFrame(()=>{this.component.instance.inputs.first.nativeElement.focus()})}})))}show(){this.tippy?.show()}destroy(){this.tippy?.destroy(),this.editor.off("focus",this.focusHandler),this.$destroy.next(!0),this.component.destroy(),this.component.instance.formValues.unsubscribe()}hanlderScroll(e){return this.shouldHideOnScroll(e.target)?(setTimeout(()=>this.update(this.editor.view)),null):!0}tippyRect(e,t){return document.querySelector("#bubble-menu")?.getBoundingClientRect()||Rj(e,t)}shouldHideOnScroll(e){return this.tippy?.state.isMounted&&this.tippy?.popper.contains(e)}},zj=n=>new Le({key:n.pluginKey,view:e=>new LM(I({view:e},n)),state:{init(){return{open:!1,form:[],options:null}},apply(e,t,i){let{open:r,form:o,options:s}=e.getMeta(sa)||{},a=sa?.getState(i);return typeof r=="boolean"?{open:r,form:o,options:s}:a||t}}});var sa=new Be("bubble-form"),v0e={interactive:!0,maxWidth:"none",trigger:"manual",placement:"bottom-start",hideOnClick:"toggle",popperOptions:{modifiers:[{name:"flip",options:{fallbackPlacements:["top-start"]}}]}},Uj=n=>{let e=new pe;return Bd.extend({name:"bubbleForm",addOptions(){return{element:null,tippyOptions:{},pluginKey:sa,shouldShow:()=>!0}},addCommands(){return{openForm:(t,i)=>({chain:r})=>(r().command(({tr:o})=>(o.setMeta(sa,{form:t,options:i,open:!0}),!0)).freezeScroll(!0).run(),e),closeForm:()=>({chain:t})=>(e.next(null),t().command(({tr:i})=>(i.setMeta(sa,{open:!1}),!0)).freezeScroll(!1).run()),updateValue:t=>({editor:i})=>{e.next(t),i.commands.closeForm()}}},addProseMirrorPlugins(){let t=n.createComponent(Oj),i=t.location.nativeElement;return t.changeDetectorRef.detectChanges(),[zj({pluginKey:sa,editor:this.editor,element:i,tippyOptions:v0e,component:t,form$:e})]}})};var Hj=()=>({width:"50%"});function b0e(n,e){if(n&1){let t=$();b(0,"div")(1,"div",0)(2,"button",1),P("click",function(){M(t);let r=y();return D(r.copy())}),C(),b(3,"button",2),P("click",function(){M(t);let r=y();return D(r.remove.emit(!0))}),C()()()}n&2&&(m(2),En(St(4,Hj)),m(),En(St(5,Hj)))}var $j=(()=>{let e=class e{constructor(){this.remove=new j(!1),this.hide=new j(!1),this.link=""}copy(){navigator.clipboard.writeText(this.link).then(()=>this.hide.emit(!0)).catch(()=>alert("Could not copy link"))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-form-actions"]],inputs:{link:"link"},outputs:{remove:"remove",hide:"hide"},decls:1,vars:1,consts:[[1,"form-actions"],["pButton","","type","button","label","COPY LINK",1,"p-button-outlined",3,"click"],["pButton","","type","button","label","REMOVE LINK",1,"p-button-outlined","p-button-danger",3,"click"]],template:function(r,o){r&1&&x(0,b0e,4,6,"div"),r&2&&we(o.link.length?0:-1)},dependencies:[zt],styles:[".form-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between;padding:1rem;gap:.5rem}"]});let n=e;return n})();function C0e(n,e){if(n&1){let t=$();b(0,"button",1),P("click",function(){M(t);let r=y();return D(r.toggleChangeTo.emit())}),Z(1),C(),E(2,"div",2)}if(n&2){let t=y();m(),Pe(t.selected)}}function w0e(n,e){n&1&&E(0,"div",2)}function I0e(n,e){if(n&1){let t=$();b(0,"dot-bubble-menu-button",3),P("click",function(){let r=M(t).$implicit,o=y();return D(o.command.emit(r))}),C(),x(1,w0e,1,0,"div",2)}if(n&2){let t=e.$implicit;f("active",t.active)("item",t),m(),we(t.divider?1:-1)}}var zv=(()=>{let e=class e{constructor(){this.items=[],this.command=new j,this.toggleChangeTo=new j}preventDeSelection(i){i.preventDefault()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-bubble-menu"]],inputs:{items:"items",selected:"selected"},outputs:{command:"command",toggleChangeTo:"toggleChangeTo"},decls:4,vars:1,consts:[["id","bubble-menu",1,"bubble-menu",3,"mousedown"],[1,"btn-dropdown",3,"click"],[1,"divider"],[3,"click","active","item"]],template:function(r,o){r&1&&(b(0,"div",0),P("mousedown",function(a){return o.preventDeSelection(a)}),x(1,C0e,3,1),Or(2,I0e,2,3,null,null,Wg),C()),r&2&&(m(),we(o.selected?1:-1),m(),Ar(o.items))},styles:['[_nghost-%COMP%]{height:100%;width:100%}.bubble-menu[_ngcontent-%COMP%]{box-sizing:border-box;align-items:center;background:#fff;border-radius:.125rem;box-shadow:0 4px 8px #14151a0f;display:flex;justify-content:center;padding:5.6px;height:40px}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]{background:none;border:none;outline:none;padding:4px;cursor:pointer}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:hover{background:#f3f3f4}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:after{content:"";border:solid #14151a;border-width:0 2px 2px 0;display:inline-block;padding:3.2px;transform:rotate(45deg);margin-left:12px}.bubble-menu[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{border-left:1px solid #f3f3f4;height:100%;margin:0 8px}']});let n=e;return n})();var x0e=(n,e)=>({"btn-bubble-menu":!0,"btn-icon":n,"btn-active":e}),T0e=n=>({"material-icons":n}),Wj=(()=>{let e=class e{constructor(){this.active=!1}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-bubble-menu-button"]],inputs:{item:"item",active:"active"},decls:3,vars:8,consts:[[3,"ngClass"]],template:function(r,o){r&1&&(b(0,"button",0)(1,"span",0),Z(2),C()()),r&2&&(f("ngClass",_t(3,x0e,o.item.icon,o.active)),m(),f("ngClass",_e(6,T0e,o.item.icon)),m(),Pe(o.item.icon||o.item.text))},dependencies:[Ye],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}.btn-bubble-menu[_ngcontent-%COMP%]{background:#fff;border:none;color:#14151a;display:flex;justify-content:center;align-items:center;cursor:pointer;max-width:auto;width:100%;height:32px;border-radius:.125rem}.btn-bubble-menu[_ngcontent-%COMP%]:hover{background:#f3f3f4}.btn-bubble-menu.btn-active[_ngcontent-%COMP%]{background:#f3f3f4;color:#14151a;border:1px solid #afb3c0}.btn-icon[_ngcontent-%COMP%]{width:32px}"]});let n=e;return n})();var Gj=n=>{let e=n.component.instance,t=n.changeToComponent.instance;return new Le({key:n.pluginKey,view:i=>new PM(I({view:i},n)),props:{handleKeyDown(i,r){let{key:o}=r,{changeToIsOpen:s}=n.editor?.storage.bubbleMenu||{};if(s){if(o==="Escape")return e.toggleChangeTo.emit(),!0;if(o==="Enter")return t.execCommand(),!0;if(o==="ArrowDown"||o==="ArrowUp")return t.updateSelection(r),!0}return!1}}})},PM=class extends Rc{constructor(e){super(e),this.shouldShowProp=!1,this.updateActiveItems=(r=[],o)=>r.map(s=>(s.active=o.includes(s.markAction),s)),this.enabledMarks=()=>[...Object.keys(this.editor.schema.marks),...Object.keys(this.editor.schema.nodes)],this.getActiveMarks=(r=[])=>[...this.enabledMarks().filter(o=>this.editor.isActive(o)),...r.filter(o=>this.editor.isActive({textAlign:o}))];let{component:t,changeToComponent:i}=e;this.component=t,this.changeTo=i,this.changeToElement=this.changeTo.location.nativeElement,this.component.instance.command.subscribe(this.exeCommand.bind(this)),this.component.instance.toggleChangeTo.subscribe(this.toggleChangeTo.bind(this)),this.changeTo.instance.items=this.changeToItems(),this.changeTo.instance.title="Change To",this.changeToElement.remove(),this.changeTo.changeDetectorRef.detectChanges(),document.body.addEventListener("scroll",this.hanlderScroll.bind(this),!0),document.body.addEventListener("mouseup",this.showMenu.bind(this),!0),document.body.addEventListener("keyup",this.showMenu.bind(this),!0),this.editor.off("blur",this.blurHandler)}showMenu(){this.shouldShowProp&&(this.tippyChangeTo?.setProps({getReferenceClientRect:()=>this.tippy?.popper.getBoundingClientRect()}),this.show())}update(e,t){let{state:i,composing:r}=e,{doc:o,selection:s}=i,a=t&&t.doc.eq(o)&&t.selection.eq(s);if(r||a)return;this.createTooltip(),this.createChangeToTooltip();let{ranges:l}=s;this.selectionRange=l[0],this.selectionNodesCount=0,o.nodesBetween(this.selectionRange.$from.pos,this.selectionRange.$to.pos,d=>{d.isBlock&&this.selectionNodesCount++});let c=Math.min(...l.map(d=>d.$from.pos)),u=Math.max(...l.map(d=>d.$to.pos));if(this.shouldShowProp=this.shouldShow?.({editor:this.editor,view:e,state:i,oldState:t,from:c,to:u}),!this.shouldShowProp){this.hide(),this.tippyChangeTo?.hide();return}this.tippy?.setProps({getReferenceClientRect:()=>{let d=e.nodeDOM(c),p=o.nodeAt(c)?.type.name,h=e.dom.parentElement.getBoundingClientRect(),g=s instanceof Se?Vv(d,p):qr(e,c,u);return Fj({viewCoords:h,nodeCoords:g,padding:60})}}),this.show(),this.setMenuItems(o,c),this.updateComponent()}destroy(){this.tippy?.destroy(),this.tippyChangeTo?.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.component.instance.command.unsubscribe(),this.component.instance.toggleChangeTo.unsubscribe(),this.component.destroy(),this.changeTo.destroy(),document.body.removeEventListener("scroll",this.hanlderScroll.bind(this),!0),document.body.removeEventListener("mouseup",this.showMenu.bind(this),!0),document.body.removeEventListener("keyup",this.showMenu.bind(this),!0)}updateComponent(){let{items:e}=this.component.instance,{activeItem:t}=this.getActiveNode(),i=this.getActiveMarks(["justify","left","center","right"]);this.component.instance.selected=t?.label,this.component.instance.items=this.updateActiveItems(e,i),this.component.changeDetectorRef.detectChanges()}updateChangeTo(){this.changeTo.instance.items=this.changeToItems(),this.changeTo.changeDetectorRef.detectChanges(),this.updateListActiveItem()}updateListActiveItem(){let{index:e}=this.getActiveNode();requestAnimationFrame(()=>{this.changeTo.instance.list.updateActiveItem(e),this.changeTo.changeDetectorRef.detectChanges()})}setMenuItems(e,t){let i=e.nodeAt(t),o=_s(this.editor.state.selection.$from).type.name==="table"?"table":i?.type.name;this.selectionNode=i,this.component.instance.items=Vj(o),this.component.changeDetectorRef.detectChanges()}openImageProperties(){let{open:e}=sa.getState(this.editor.state),{alt:t,src:i,title:r,data:o}=this.editor.getAttributes(Qn.name),{title:s="",asset:a}=o||{};e?this.editor.commands.closeForm():this.editor.commands.openForm([{value:i||a,key:"src",label:"path",required:!0,controlType:"text",type:"text"},{value:t||s,key:"alt",label:"alt",controlType:"text",type:"text"},{value:r||s,key:"title",label:"caption",controlType:"text",type:"text"}]).pipe(xt(1),rn(l=>l!=null)).subscribe(l=>{requestAnimationFrame(()=>{this.editor.commands.updateAttributes(Qn.name,I({},l)),this.editor.commands.closeForm()})})}exeCommand(e){let{markAction:t,active:i}=e,{data:r={}}=this.selectionNode.attrs,{inode:o,languageId:s}=r,a=this.getQueryParam("inode");switch(t){case"bold":this.editor.commands.toggleBold?.();break;case"italic":this.editor.commands.toggleItalic?.();break;case"strike":this.editor.commands.toggleStrike?.();break;case"underline":this.editor.commands.toggleUnderline?.();break;case"justify":this.toggleTextAlign(t,i);break;case"left":this.toggleTextAlign(t,i);break;case"center":this.toggleTextAlign(t,i);break;case"right":this.toggleTextAlign(t,i);break;case"bulletList":this.editor.commands.toggleBulletList?.();break;case"orderedList":this.editor.commands.toggleOrderedList?.();break;case"indent":kM(this.editor)&&this.editor.commands.sinkListItem("listItem");break;case"outdent":kM(this.editor)&&this.editor.commands.liftListItem("listItem");break;case"link":let{isOpen:l}=eo.getState(this.editor.state);l?this.editor.view.focus():this.editor.commands.openLinkForm({openOnClick:!1});break;case"properties":this.openImageProperties();break;case"deleteNode":this.selectionNodesCount>1?G6(this.editor,this.selectionRange):W6({editor:this.editor,nodeType:this.selectionNode.type.name,selectionRange:this.selectionRange});break;case"clearAll":this.editor.commands?.unsetAllMarks(),this.editor.commands?.clearNodes();break;case"superscript":this.editor.commands?.toggleSuperscript?.();break;case"subscript":this.editor.commands?.toggleSubscript?.();break;case"goToContentlet":this.goToContentlet(o,a,s);break}}goToContentlet(e,t,i){let r=window.rel_BlogblogComment_PeditRelatedContent;r&&r(e,"",i)}toggleTextAlign(e,t){t?this.editor.commands?.unsetTextAlign?.():this.editor.commands?.setTextAlign?.(e)}changeToItems(){let e=this.editor.storage.dotConfig.allowedBlocks,i=_s(this.editor.state.selection.$from).type.name==="table"?cL:pL;e.length>1&&(i=i.filter(o=>e.includes(o.id)));let r={heading1:()=>{this.editor.chain().focus().clearNodes().setHeading({level:1}).run()},heading2:()=>{this.editor.chain().focus().clearNodes().setHeading({level:2}).run()},heading3:()=>{this.editor.chain().focus().clearNodes().setHeading({level:3}).run()},heading4:()=>{this.editor.chain().focus().clearNodes().setHeading({level:4}).run()},heading5:()=>{this.editor.chain().focus().clearNodes().setHeading({level:5}).run()},heading6:()=>{this.editor.chain().focus().clearNodes().setHeading({level:6}).run()},paragraph:()=>{this.editor.chain().focus().clearNodes().run()},orderedList:()=>{this.editor.chain().focus().clearNodes().toggleOrderedList?.().run()},bulletList:()=>{this.editor.chain().focus().clearNodes().toggleBulletList?.().run()},blockquote:()=>{this.editor.chain().focus().clearNodes().toggleBlockquote?.().run()},codeBlock:()=>{this.editor.chain().focus().clearNodes().toggleCodeBlock?.().run()}};return i.forEach(o=>{o.isActive=()=>o.id.includes("heading")?this.editor.isActive("heading",o.attributes):this.editor.isActive(o.id),o.command=()=>{r[o.id](),this.tippyChangeTo.hide(),this.getActiveNode()}}),i}getActiveNode(){let e=this.changeToItems(),t=e.filter(o=>o?.isActive()),i=t.length>1?t[1]:t[0],r=e.findIndex(o=>o===i);return{activeItem:i,index:r}}createChangeToTooltip(){let{element:e}=this.editor.options;this.tippyChangeTo||(this.tippyChangeTo=Pi(e,R(I({},this.tippyOptions),{appendTo:document.body,getReferenceClientRect:null,content:this.changeToElement,placement:"bottom-start",duration:0,hideOnClick:!1,popperOptions:{modifiers:Bv},onHide:()=>{this.editor.storage.bubbleMenu.changeToIsOpen=!1,this.changeTo.instance.items=[],this.changeTo.changeDetectorRef.detectChanges(),this.editor.commands.freezeScroll(!1)},onShow:()=>{this.editor.storage.bubbleMenu.changeToIsOpen=!0,this.editor.commands.freezeScroll(!0),this.updateChangeTo()}})))}toggleChangeTo(){this.tippyChangeTo?.state.isVisible?this.tippyChangeTo?.hide():this.tippyChangeTo?.show()}hanlderScroll(e){let t=e.target,i=this.changeTo.instance.listElement?.nativeElement;!this.tippy?.state.isMounted||t===i||this.tippyChangeTo?.hide()}getQueryParam(e){return new URLSearchParams(window.location.search).get(e)}};var E0e={duration:500,maxWidth:"none",placement:"top-start",trigger:"manual",interactive:!0},S0e=new Be("bubble-menu");function qj(n){let e=n.createComponent(zv),t=e.location.nativeElement,i=n.createComponent(gl),r=i.location.nativeElement;return Bd.extend({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:E0e,pluginKey:"bubbleMenu",shouldShow:Pj}},addStorage(){return{changeToIsOpen:!1}},addProseMirrorPlugins(){return t?[Gj(R(I({},this.options),{component:e,changeToComponent:i,pluginKey:S0e,editor:this.editor,element:t,changeToElement:r}))]:[]}})}var Qj=mt.create({name:"dotComands",addCommands(){return{isNodeRegistered:n=>({view:e})=>{let{schema:t}=e.state,{nodes:i}=t;return!!i[n]}}}});var Kj=n=>mt.create({name:"dotConfig",addStorage(){return I({},n)}});var Yj=at.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{let e=n.getAttribute("colwidth");return e?[parseInt(e,10)]:null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:n}){return["td",Ae(this.options.HTMLAttributes,n),0]}});var Zj=(n,e)=>[{label:"Toggle row Header",icon:"check",id:"toggleRowHeader",command:()=>{n.commands.toggleHeaderRow(),e.hide()},tabindex:"0"},{label:"Toggle column Header",icon:"check",id:"toggleColumnHeader",command:()=>{n.commands.toggleHeaderColumn(),e.hide()},tabindex:"1"},{id:"divider"},{label:"Merge Cells",icon:"call_merge",id:"mergeCells",command:()=>{n.commands.mergeCells(),e.hide()},disabled:!0,tabindex:"2"},{label:"Split Cells",icon:"call_split",id:"splitCells",command:()=>{n.commands.splitCell(),e.hide()},disabled:!0,tabindex:"3"},{id:"divider"},{label:"Insert row above",icon:"arrow_upward",id:"insertAbove",command:()=>{n.commands.addRowBefore(),e.hide()},tabindex:"4"},{label:"Insert row below",icon:"arrow_downward",id:"insertBellow",command:()=>{n.commands.addRowAfter(),e.hide()},tabindex:"5"},{label:"Insert column left",icon:"arrow_back",id:"insertLeft",command:()=>{n.commands.addColumnBefore(),e.hide()},tabindex:"6"},{label:"Insert column right",icon:"arrow_forward",id:"insertRight",command:()=>{n.commands.addColumnAfter(),e.hide()},tabindex:"7"},{id:"divider"},{label:"Delete row",icon:"delete",id:"deleteRow",command:()=>{n.commands.deleteRow(),e.hide()},tabindex:"8"},{label:"Delete Column",icon:"delete",id:"deleteColumn",command:()=>{n.commands.deleteColumn(),e.hide()},tabindex:"9"},{label:"Delete Table",icon:"delete",id:"deleteTable",command:()=>{n.commands.deleteTable(),e.hide()},tabindex:"10"}];var RM=class{constructor(e,t){this.tippy=t}init(){}update(){}destroy(){this.tippy.destroy()}},Jj=n=>{let e;function t(s){return An.node(s.$to.before(3),s.$to.after(3),{class:"focus"})}function i(s){s.preventDefault(),s.stopPropagation(),e?.setProps({getReferenceClientRect:()=>s.target.getBoundingClientRect()}),e.show()}function r(s){return s?.classList.contains("dot-cell-arrow")}function o(s){return s?.type.name==="tableCell"||s?.type.name==="tableHeader"||s?.type.name==="tableRow"}return new Le({key:new Be("dotTableCell"),state:{apply:()=>{},init:()=>{let{editor:s,viewContainerRef:a}=n,l=a.createComponent(gl),c=l.location.nativeElement;l.instance.currentLanguage=s.storage.dotConfig.lang;let u={duration:500,maxWidth:"none",placement:"top-start",trigger:"manual",interactive:!0},{element:d}=s.options;e=Pi(d,R(I({},u),{appendTo:document.body,getReferenceClientRect:null,content:c,placement:"bottom-start",duration:0,hideOnClick:!0,popperOptions:{modifiers:Bv},onShow:()=>{s.commands.freezeScroll(!0);let p=l.instance.items.find(g=>g.id=="mergeCells"),h=l.instance.items.find(g=>g.id=="splitCells");p.disabled=!s.can().mergeCells(),h.disabled=!s.can().splitCell(),setTimeout(()=>{l.changeDetectorRef.detectChanges()})},onHide:()=>s.commands.freezeScroll(!1)})),l.instance.items=Zj(n.editor,e),l.instance.title="",l.changeDetectorRef.detectChanges()}},view:s=>new RM(s,e),props:{decorations(s){let a=s.selection.$from.depth>3?s.selection.$from.node(3):null;return a?.type?.name=="tableCell"||a?.type?.name=="tableHeader"?pn.create(s.doc,[t(s.selection)]):null},handleDOMEvents:{contextmenu:(s,a)=>{let l=s.state.selection.$from.node(s.state.selection.$from.depth-1);o(l)&&i(a)},mousedown:(s,a)=>{let l=s.state.selection.$from.node(s.state.selection.$from.depth-1);r(a.target)?i(a):a.button===2&&o(l)&&a.preventDefault()}}}})};function Xj(n){return Yj.extend({renderHTML({HTMLAttributes:e}){return["td",Ae(this.options.HTMLAttributes,e),["button",{class:"dot-cell-arrow"}],["p",0]]},addProseMirrorPlugins(){return[Jj({editor:this.editor,viewContainerRef:n})]}})}var e8=at.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{let e=n.getAttribute("colwidth");return e?[parseInt(e,10)]:null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:n}){return["th",Ae(this.options.HTMLAttributes,n),0]}});function t8(){return e8.extend({renderHTML({HTMLAttributes:n}){return["th",Ae(this.options.HTMLAttributes,n),["button",{class:"dot-cell-arrow"}],["p",0]]}})}var jM,VM;if(typeof WeakMap<"u"){let n=new WeakMap;jM=e=>n.get(e),VM=(e,t)=>(n.set(e,t),t)}else{let n=[],t=0;jM=i=>{for(let r=0;r(t==10&&(t=0),n[t++]=i,n[t++]=r)}var Rn=class{constructor(n,e,t,i){this.width=n,this.height=e,this.map=t,this.problems=i}findCell(n){for(let e=0;e=t){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:w-L});break}let T=r+L*e;for(let q=0;qi&&(o+=c.attrs.colspan)}}for(let s=0;s1&&(t=!0)}e==-1?e=o:e!=o&&(e=Math.max(e,o))}return e}function O0e(n,e,t){n.problems||(n.problems=[]);let i={};for(let r=0;r0;e--)if(n.node(e).type.spec.tableRole=="row")return n.node(0).resolve(n.before(e+1));return null}function k0e(n){for(let e=n.depth;e>0;e--){let t=n.node(e).type.spec.tableRole;if(t==="cell"||t==="header_cell")return n.node(e)}return null}function Eo(n){let e=n.selection.$head;for(let t=e.depth;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return!0;return!1}function qv(n){let e=n.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;let t=Gd(e.$head)||N0e(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function N0e(n){for(let e=n.nodeAfter,t=n.pos;e;e=e.firstChild,t++){let i=e.type.spec.tableRole;if(i=="cell"||i=="header_cell")return n.doc.resolve(t)}for(let e=n.nodeBefore,t=n.pos;e;e=e.lastChild,t--){let i=e.type.spec.tableRole;if(i=="cell"||i=="header_cell")return n.doc.resolve(t-e.nodeSize)}}function BM(n){return n.parent.type.spec.tableRole=="row"&&!!n.nodeAfter}function L0e(n){return n.node(0).resolve(n.pos+n.nodeAfter.nodeSize)}function HM(n,e){return n.depth==e.depth&&n.pos>=e.start(-1)&&n.pos<=e.end(-1)}function u8(n,e,t){let i=n.node(-1),r=Rn.get(i),o=n.start(-1),s=r.nextCell(n.pos-o,e,t);return s==null?null:n.node(0).resolve(o+s)}function Fc(n,e,t=1){let i=R(I({},n),{colspan:n.colspan-t});return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(e,t),i.colwidth.some(r=>r>0)||(i.colwidth=null)),i}function d8(n,e,t=1){let i=R(I({},n),{colspan:n.colspan+t});if(i.colwidth){i.colwidth=i.colwidth.slice();for(let r=0;ru!=t.pos-o);l.unshift(t.pos-o);let c=l.map(u=>{let d=i.nodeAt(u);if(!d)throw RangeError(`No cell with offset ${u} found`);let p=o+u+1;return new yd(a.resolve(p),a.resolve(p+d.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(e,t){let i=e.resolve(t.map(this.$anchorCell.pos)),r=e.resolve(t.map(this.$headCell.pos));if(BM(i)&&BM(r)&&HM(i,r)){let o=this.$anchorCell.node(-1)!=i.node(-1);return o&&this.isRowSelection()?aa.rowSelection(i,r):o&&this.isColSelection()?aa.colSelection(i,r):new aa(i,r)}return Re.between(i,r)}content(){let e=this.$anchorCell.node(-1),t=Rn.get(e),i=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},s=[];for(let l=r.top;l0||v>0){let w=g.attrs;if(_>0&&(w=Fc(w,0,_)),v>0&&(w=Fc(w,w.colspan-v,v)),h.leftr.bottom){let w=R(I({},g.attrs),{rowspan:Math.min(h.bottom,r.bottom)-Math.max(h.top,r.top)});h.top0)return!1;let i=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(i,r)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){let i=e.node(-1),r=Rn.get(i),o=e.start(-1),s=r.findCell(e.pos-o),a=r.findCell(t.pos-o),l=e.node(0);return s.top<=a.top?(s.top>0&&(e=l.resolve(o+r.map[s.left])),a.bottom0&&(t=l.resolve(o+r.map[a.left])),s.bottom0)return!1;let s=r+this.$anchorCell.nodeAfter.attrs.colspan,a=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==t.width}eq(e){return e instanceof aa&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){let i=e.node(-1),r=Rn.get(i),o=e.start(-1),s=r.findCell(e.pos-o),a=r.findCell(t.pos-o),l=e.node(0);return s.left<=a.left?(s.left>0&&(e=l.resolve(o+r.map[s.top*r.width])),a.right0&&(t=l.resolve(o+r.map[a.top*r.width])),s.right{e.push(An.node(i,i+t.nodeSize,{class:"selectedCell"}))}),pn.create(n.doc,e)}function j0e({$from:n,$to:e}){if(n.pos==e.pos||n.pos=0&&!(n.after(r+1)=0&&!(e.before(o+1)>e.start(o));o--,i--);return t==i&&/row|table/.test(n.node(r).type.spec.tableRole)}function V0e({$from:n,$to:e}){let t,i;for(let r=n.depth;r>0;r--){let o=n.node(r);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){t=o;break}}for(let r=e.depth;r>0;r--){let o=e.node(r);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){i=o;break}}return t!==i&&e.parentOffset===0}function B0e(n,e,t){let i=(e||n).selection,r=(e||n).doc,o,s;if(i instanceof Se&&(s=i.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=hn.create(r,i.from);else if(s=="row"){let a=r.resolve(i.from+1);o=hn.rowSelection(a,a)}else if(!t){let a=Rn.get(i.node),l=i.from+1,c=l+a.map[a.width*a.height-1];o=hn.create(r,l+1,c)}}else i instanceof Re&&j0e(i)?o=Re.create(r,i.from):i instanceof Re&&V0e(i)&&(o=Re.create(r,i.$from.start(),i.$from.end()));return o&&(e||(e=n.tr)).setSelection(o),e}var z0e=new Be("fix-tables");function h8(n,e,t,i){let r=n.childCount,o=e.childCount;e:for(let s=0,a=0;s{r.type.spec.tableRole=="table"&&(t=U0e(n,r,o,t))};return e?e.doc!=n.doc&&h8(e.doc,n.doc,0,i):n.doc.descendants(i),t}function U0e(n,e,t,i){let r=Rn.get(e);if(!r.problems)return i;i||(i=n.tr);let o=[];for(let l=0;l0){let h="cell";u.firstChild&&(h=u.firstChild.type.spec.tableRole);let g=[];for(let v=0;v0&&i>0||e.child(0).type.spec.tableRole=="table");)t--,i--,e=e.child(0).content;let r=e.child(0),o=r.type.spec.tableRole,s=r.type.schema,a=[];if(o=="row")for(let l=0;l=0;s--){let{rowspan:a,colspan:l}=o.child(s).attrs;for(let c=r;c=e.length&&e.push(ne.empty),t[r]i&&(p=p.type.createChecked(Fc(p.attrs,p.attrs.colspan,u+p.attrs.colspan-i),p.content)),c.push(p),u+=p.attrs.colspan;for(let h=1;hr&&(d=d.type.create(R(I({},d.attrs),{rowspan:Math.max(1,r-d.attrs.rowspan)}),d.content)),l.push(d)}o.push(ne.from(l))}t=o,e=r}return{width:n,height:e,rows:t}}function G0e(n,e,t,i,r,o,s){let a=n.doc.type.schema,l=Ri(a),c,u;if(r>e.width)for(let d=0,p=0;de.height){let d=[];for(let g=0,_=(e.height-1)*e.width;g=e.width?!1:t.nodeAt(e.map[_+g]).type==l.header_cell;d.push(v?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}let p=l.row.create(null,ne.from(d)),h=[];for(let g=e.height;g{if(!r)return!1;let o=t.selection;if(o instanceof hn)return Wv(t,i,je.near(o.$headCell,e));if(n!="horiz"&&!o.empty)return!1;let s=f8(r,n,e);if(s==null)return!1;if(n=="horiz")return Wv(t,i,je.near(t.doc.resolve(o.head+e),e));{let a=t.doc.resolve(s),l=u8(a,n,e),c;return l?c=je.near(l,1):e<0?c=je.near(t.doc.resolve(a.before(-1)),-1):c=je.near(t.doc.resolve(a.after(-1)),1),Wv(t,i,c)}}}function Hv(n,e){return(t,i,r)=>{if(!r)return!1;let o=t.selection,s;if(o instanceof hn)s=o;else{let l=f8(r,n,e);if(l==null)return!1;s=new hn(t.doc.resolve(l))}let a=u8(s.$headCell,n,e);return a?Wv(t,i,new hn(s.$anchorCell,a)):!1}}function $v(n,e){let t=n.selection;if(!(t instanceof hn))return!1;if(e){let i=n.tr,r=Ri(n.schema).cell.createAndFill().content;t.forEachCell((o,s)=>{o.content.eq(r)||i.replace(i.mapping.map(s+1),i.mapping.map(s+o.nodeSize-1),new he(r,0,0))}),i.docChanged&&e(i)}return!0}function Q0e(n,e){let t=n.state.doc,i=Gd(t.resolve(e));return i?(n.dispatch(n.state.tr.setSelection(new hn(i))),!0):!1}function K0e(n,e,t){if(!Eo(n.state))return!1;let i=H0e(t),r=n.state.selection;if(r instanceof hn){i||(i={width:1,height:1,rows:[ne.from(zM(Ri(n.state.schema).cell,t))]});let o=r.$anchorCell.node(-1),s=r.$anchorCell.start(-1),a=Rn.get(o).rectBetween(r.$anchorCell.pos-s,r.$headCell.pos-s);return i=W0e(i,a.right-a.left,a.bottom-a.top),r8(n.state,n.dispatch,s,a,i),!0}else if(i){let o=qv(n.state),s=o.start(-1);return r8(n.state,n.dispatch,s,Rn.get(o.node(-1)).findCell(o.pos-s),i),!0}else return!1}function Y0e(n,e){var t;if(e.ctrlKey||e.metaKey)return;let i=o8(n,e.target),r;if(e.shiftKey&&n.state.selection instanceof hn)o(n.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&i&&(r=Gd(n.state.selection.$anchor))!=null&&((t=FM(n,e))==null?void 0:t.pos)!=r.pos)o(r,e),e.preventDefault();else if(!i)return;function o(l,c){let u=FM(n,c),d=_l.getState(n.state)==null;if(!u||!HM(l,u))if(d)u=l;else return;let p=new hn(l,u);if(d||!n.state.selection.eq(p)){let h=n.state.tr.setSelection(p);d&&h.setMeta(_l,l.pos),n.dispatch(h)}}function s(){n.root.removeEventListener("mouseup",s),n.root.removeEventListener("dragstart",s),n.root.removeEventListener("mousemove",a),_l.getState(n.state)!=null&&n.dispatch(n.state.tr.setMeta(_l,-1))}function a(l){let c=l,u=_l.getState(n.state),d;if(u!=null)d=n.state.doc.resolve(u);else if(o8(n,c.target)!=i&&(d=FM(n,e),!d))return s();d&&o(d,c)}n.root.addEventListener("mouseup",s),n.root.addEventListener("dragstart",s),n.root.addEventListener("mousemove",a)}function f8(n,e,t){if(!(n.state.selection instanceof Re))return null;let{$head:i}=n.state.selection;for(let r=i.depth-1;r>=0;r--){let o=i.node(r);if((t<0?i.index(r):i.indexAfter(r))!=(t<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){let a=i.before(r),l=e=="vert"?t>0?"down":"up":t>0?"right":"left";return n.endOfTextblock(l)?a:null}}return null}function o8(n,e){for(;e&&e!=n.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function FM(n,e){let t=n.posAtCoords({left:e.clientX,top:e.clientY});return t&&t?Gd(n.state.doc.resolve(t.pos)):null}var Z0e=class{constructor(n,e){this.node=n,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),UM(n,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(n){return n.type!=this.node.type?!1:(this.node=n,UM(n,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(n){return n.type=="attributes"&&(n.target==this.table||this.colgroup.contains(n.target))}};function UM(n,e,t,i,r,o){var s;let a=0,l=!0,c=e.firstChild,u=n.firstChild;if(u){for(let d=0,p=0;dnew t(d,e,p)),new J0e(-1,!1)},apply(o,s){return s.apply(o)}},props:{attributes:o=>{let s=to.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{X0e(o,s,n,e,i)},mouseleave:o=>{eye(o)},mousedown:(o,s)=>{tye(o,s,e)}},decorations:o=>{let s=to.getState(o);if(s&&s.activeHandle>-1)return aye(o,s.activeHandle)},nodeViews:{}}});return r}var J0e=class Gv{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){let t=this,i=e.getMeta(to);if(i&&i.setHandle!=null)return new Gv(i.setHandle,!1);if(i&&i.setDragging!==void 0)return new Gv(t.activeHandle,i.setDragging);if(t.activeHandle>-1&&e.docChanged){let r=e.mapping.map(t.activeHandle,-1);return BM(e.doc.resolve(r))||(r=-1),new Gv(r,t.dragging)}return t}};function X0e(n,e,t,i,r){let o=to.getState(n.state);if(o&&!o.dragging){let s=iye(e.target),a=-1;if(s){let{left:l,right:c}=s.getBoundingClientRect();e.clientX-l<=t?a=s8(n,e,"left",t):c-e.clientX<=t&&(a=s8(n,e,"right",t))}if(a!=o.activeHandle){if(!r&&a!==-1){let l=n.state.doc.resolve(a),c=l.node(-1),u=Rn.get(c),d=l.start(-1);if(u.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==u.width-1)return}g8(n,a)}}}function eye(n){let e=to.getState(n.state);e&&e.activeHandle>-1&&!e.dragging&&g8(n,-1)}function tye(n,e,t){var i;let r=(i=n.dom.ownerDocument.defaultView)!=null?i:window,o=to.getState(n.state);if(!o||o.activeHandle==-1||o.dragging)return!1;let s=n.state.doc.nodeAt(o.activeHandle),a=nye(n,o.activeHandle,s.attrs);n.dispatch(n.state.tr.setMeta(to,{setDragging:{startX:e.clientX,startWidth:a}}));function l(u){r.removeEventListener("mouseup",l),r.removeEventListener("mousemove",c);let d=to.getState(n.state);d?.dragging&&(rye(n,d.activeHandle,a8(d.dragging,u,t)),n.dispatch(n.state.tr.setMeta(to,{setDragging:null})))}function c(u){if(!u.which)return l(u);let d=to.getState(n.state);if(d&&d.dragging){let p=a8(d.dragging,u,t);oye(n,d.activeHandle,p,t)}}return r.addEventListener("mouseup",l),r.addEventListener("mousemove",c),e.preventDefault(),!0}function nye(n,e,{colspan:t,colwidth:i}){let r=i&&i[i.length-1];if(r)return r;let o=n.domAtPos(e),a=o.node.childNodes[o.offset].offsetWidth,l=t;if(i)for(let c=0;c0?-1:0;P0e(e,i,r+o)&&(o=r==0||r==e.width?null:0);for(let s=0;s0&&r0&&e.map[a-1]==l||r0?-1:0;cye(e,i,r+l)&&(l=r==0||r==e.height?null:0);for(let c=0,u=e.width*r;c0&&r0&&d==e.map[u-e.width]){let p=t.nodeAt(d).attrs;n.setNodeMarkup(n.mapping.slice(a).map(d+i),null,R(I({},p),{rowspan:p.rowspan-1})),c+=p.colspan-1}else if(r0&&t[o]==t[o-1]||i.right0&&t[r]==t[r-n]||i.bottomt[i.type.spec.tableRole])(n,e)}function pye(n){return(e,t)=>{var i;let r=e.selection,o,s;if(r instanceof hn){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,s=r.$anchorCell.pos}else{if(o=k0e(r.$from),!o)return!1;s=(i=Gd(r.$from))==null?void 0:i.pos}if(o==null||s==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(t){let a=o.attrs,l=[],c=a.colwidth;a.rowspan>1&&(a=R(I({},a),{rowspan:1})),a.colspan>1&&(a=R(I({},a),{colspan:1}));let u=vs(e),d=e.tr;for(let h=0;h{s.attrs[n]!==e&&o.setNodeMarkup(a,null,R(I({},s.attrs),{[n]:e}))}):o.setNodeMarkup(r.pos,null,R(I({},r.nodeAfter.attrs),{[n]:e})),i(o)}return!0}}function hye(n){return function(e,t){if(!Eo(e))return!1;if(t){let i=Ri(e.schema),r=vs(e),o=e.tr,s=r.map.cellsInRect(n=="column"?{left:r.left,top:0,right:r.right,bottom:r.map.height}:n=="row"?{left:0,top:r.top,right:r.map.width,bottom:r.bottom}:r),a=s.map(l=>r.table.nodeAt(l));for(let l=0;l{let g=h+o.tableStart,_=s.doc.nodeAt(g);_&&s.setNodeMarkup(g,p,_.attrs)}),i(s)}return!0}}var Wot=qd("row",{useDeprecatedLogic:!0}),Got=qd("column",{useDeprecatedLogic:!0}),E8=qd("cell",{useDeprecatedLogic:!0});function fye(n,e){if(e<0){let t=n.nodeBefore;if(t)return n.pos-t.nodeSize;for(let i=n.index(-1)-1,r=n.before();i>=0;i--){let o=n.node(-1).child(i),s=o.lastChild;if(s)return r-1-s.nodeSize;r-=o.nodeSize}}else{if(n.index()0;i--)if(t.node(i).type.spec.tableRole=="table")return e&&e(n.tr.delete(t.before(i),t.after(i)).scrollIntoView()),!0;return!1}function M8({allowTableNodeSelection:n=!1}={}){return new Le({key:_l,state:{init(){return null},apply(e,t){let i=e.getMeta(_l);if(i!=null)return i==-1?null:i;if(t==null||!e.docChanged)return t;let{deleted:r,pos:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:F0e,handleDOMEvents:{mousedown:Y0e},createSelectionBetween(e){return _l.getState(e.state)!=null?e.state.selection:null},handleTripleClick:Q0e,handleKeyDown:q0e,handlePaste:K0e},appendTransaction(e,t,i){return B0e(i,$M(i,t),n)}})}function D8(n,e,t,i,r,o){let s=0,a=!0,l=e.firstChild,c=n.firstChild;for(let u=0,d=0;u{let i=n.nodes[t];i.spec.tableRole&&(e[i.spec.tableRole]=i)}),n.cached.tableNodeTypes=e,e}function yye(n,e,t,i,r){let o=gye(n),s=[],a=[];for(let c=0;c{let{selection:e}=n.state;if(!_ye(e))return!1;let t=0,i=lS(e.ranges[0].$from,o=>o.type.name==="table");return i?.node.descendants(o=>{if(o.type.name==="table")return!1;["tableCell","tableHeader"].includes(o.type.name)&&(t+=1)}),t===e.ranges.length?(n.commands.deleteTable(),!0):!1},A8=at.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:QM,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:n,HTMLAttributes:e}){let{colgroup:t,tableWidth:i,tableMinWidth:r}=mye(n,this.options.cellMinWidth);return["table",Ae(this.options.HTMLAttributes,e,{style:i?`width: ${i}`:`min-width: ${r}`}),t,["tbody",0]]},addCommands(){return{insertTable:({rows:n=3,cols:e=3,withHeaderRow:t=!0}={})=>({tr:i,dispatch:r,editor:o})=>{let s=yye(o.schema,n,e,t);if(r){let a=i.selection.from+1;i.replaceSelectionWith(s).scrollIntoView().setSelection(Re.near(i.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:n,dispatch:e})=>_8(n,e),addColumnAfter:()=>({state:n,dispatch:e})=>v8(n,e),deleteColumn:()=>({state:n,dispatch:e})=>b8(n,e),addRowBefore:()=>({state:n,dispatch:e})=>w8(n,e),addRowAfter:()=>({state:n,dispatch:e})=>I8(n,e),deleteRow:()=>({state:n,dispatch:e})=>x8(n,e),deleteTable:()=>({state:n,dispatch:e})=>S8(n,e),mergeCells:()=>({state:n,dispatch:e})=>WM(n,e),splitCell:()=>({state:n,dispatch:e})=>GM(n,e),toggleHeaderColumn:()=>({state:n,dispatch:e})=>qd("column")(n,e),toggleHeaderRow:()=>({state:n,dispatch:e})=>qd("row")(n,e),toggleHeaderCell:()=>({state:n,dispatch:e})=>E8(n,e),mergeOrSplit:()=>({state:n,dispatch:e})=>WM(n,e)?!0:GM(n,e),setCellAttribute:(n,e)=>({state:t,dispatch:i})=>T8(n,e)(t,i),goToNextCell:()=>({state:n,dispatch:e})=>qM(1)(n,e),goToPreviousCell:()=>({state:n,dispatch:e})=>qM(-1)(n,e),fixTables:()=>({state:n,dispatch:e})=>(e&&$M(n),!0),setCellSelection:n=>({tr:e,dispatch:t})=>{if(t){let i=hn.create(e.doc,n.anchorCell,n.headCell);e.setSelection(i)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Qv,"Mod-Backspace":Qv,Delete:Qv,"Mod-Delete":Qv}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[m8({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],M8({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(n){let e={name:n.name,options:n.options,storage:n.storage};return{tableRole:vt(Me(n,"tableRole",e))}}});function k8(){return A8.extend({resizable:!0})}var N8=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-drag-handler"]],decls:2,vars:0,consts:[[1,"material-icons"]],template:function(r,o){r&1&&(b(0,"i",0),Z(1,"drag_indicator"),C())},styles:["[_nghost-%COMP%]{position:absolute;cursor:grab;z-index:1;opacity:0;color:var(--color-palette-primary-800);transition:opacity .25s,top .15s;pointer-events:none}.visible[_nghost-%COMP%]{opacity:1;pointer-events:auto}"]});let n=e;return n})();var L8=n=>mt.create({name:"dragHandler",addProseMirrorPlugins(){let e=null,t=25,i=50,r=n.createComponent(N8).location.nativeElement;function o(_,v){let w=v.getBoundingClientRect().top-_.getBoundingClientRect().top,S=v.getBoundingClientRect().left-_.getBoundingClientRect().left;return{top:w,left:S}}function s(_){_&&_.parentNode&&_.parentNode.removeChild(_)}function a(_,v){let w=v.posAtCoords(_);if(w){let S=c(v.nodeDOM(w.inside));if(S&&S.nodeType===1){let L=v.docView.nearestDesc(S,!0);if(!(!L||L===v.docView))return L.posBefore}}return null}function l(_,v){if(!_.dataTransfer)return;let w={left:_.clientX+i,top:_.clientY},S=a(w,v);if(S!=null){v.dispatch(v.state.tr.setSelection(Se.create(v.state.doc,S)));let L=v.state.selection.content();_.dataTransfer.clearData(),_?.dataTransfer?.setDragImage(e,10,10),v.dragging={slice:L,move:!0}}}function c(_){for(;_&&_.parentNode&&!(_.classList?.contains("ProseMirror")||_.parentNode.classList?.contains("ProseMirror"));)_=_.parentNode;return _}function u(_,v){let w=_.nodeDOM(v);return!!w?.hasChildNodes()&&!(w.childNodes.length===1&&w.childNodes[0].nodeName=="BR")}function d(_){r.setAttribute("draggable","true"),r.addEventListener("dragstart",v=>l(v,_)),r.classList.remove("visible"),_.dom.parentElement?.appendChild(r)}function p(){r.classList.remove("visible")}function h(_){return _&&!_.classList?.contains("ProseMirror")&&!_.innerText.startsWith("/")}function g(){document.querySelector(".ProseMirror-hideselection")?.classList.remove("ProseMirror-hideselection"),r.classList.remove("visible")}return[new Le({key:new Be("dragHandler"),view:_=>(requestAnimationFrame(()=>d(_)),document.body.addEventListener("scroll",p,!0),{destroy(){s(r),document.body.removeEventListener("scroll",p,!0)}}),props:{handleDOMEvents:{drop(_,v){return c(v.target).nodeName==="TABLE"?!0:(requestAnimationFrame(()=>{g(),Av(_),e.nodeName==="TABLE"&&s(e)}),!1)},mousemove(_,v){let w={left:v.clientX+i,top:v.clientY},S=_.posAtCoords(w);if(S&&u(_,S.inside))if(e=c(_.nodeDOM(S.inside)),h(e)){let{top:L,left:T}=o(_.dom.parentElement,e);r.style.left=T-t+"px",r.style.top=L<0?0:L+"px",r.classList.add("visible")}else r.classList.remove("visible");else e=null,r.classList.remove("visible");return!1}}}})]}});var vye=n=>({completed:n});function bye(n,e){if(n&1){let t=$();b(0,"button",2),P("click",function(){M(t);let r=y();return D(r.byClick.emit())}),C()}if(n&2){let t=y();f("disabled",t.isCompleted||t.isLoading)("icon",t.isCompleted?"pi pi-check":null)("label",t.title)("loading",t.isLoading)("ngClass",_e(5,vye,t.isCompleted))}}function Cye(n,e){n&1&&(b(0,"div",1),E(1,"i",3),b(2,"span"),Z(3," Something went wrong, please try again later or "),b(4,"a",4),Z(5,"contact support"),C()()())}var P8=(()=>{let e=class e{constructor(){this.label="",this.isLoading=!1,this.byClick=new j,this.status=Ja}get title(){return this.label?this.label[0].toUpperCase()+this.label?.substring(1).toLowerCase():""}get isCompleted(){return this.label===this.status.COMPLETED}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-floating-button"]],inputs:{label:"label",isLoading:"isLoading"},outputs:{byClick:"byClick"},decls:2,vars:1,consts:[["pButton","","iconPos","left",3,"disabled","icon","label","loading","ngClass"],[1,"alert"],["pButton","","iconPos","left",3,"click","disabled","icon","label","loading","ngClass"],[1,"pi","pi-exclamation-circle"],["href","https://www.dotcms.com/contact-us/"]],template:function(r,o){r&1&&x(0,bye,1,7,"button",0)(1,Cye,6,0,"div",1),r&2&&we(o.label!==o.status.ERROR?0:1)},dependencies:[Ye,zt],styles:["[_nghost-%COMP%] .p-button-label{text-transform:unset}[_nghost-%COMP%] .p-button{display:inline-block}[_nghost-%COMP%] .p-button:enabled:hover, [_nghost-%COMP%] .p-button:enabled:active, [_nghost-%COMP%] .p-button:enabled:focus{background:var(--color-palette-primary-500)}[_nghost-%COMP%] .p-button:disabled{background-color:#000!important;color:#fff!important;opacity:1}[_nghost-%COMP%] .p-button.completed{background:var(--color-palette-primary-500)!important}.alert[_ngcontent-%COMP%]{background:#fff;color:#d82b2e;border:1px solid #d82b2e;border-radius:.125rem;padding:10px;display:flex;align-items:center;justify-content:center;gap:5px}.alert[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#d82b2e}"]});let n=e;return n})();var wye=({viewCoords:n,nodeCoords:e})=>{let{bottom:i,left:r,top:o}=e,{bottom:s}=n,l=Math.ceil(s-i)<0?s:o-65,c=onew Le({key:n.pluginKey,view:e=>new KM(I({view:e},n))}),KM=class{constructor({dotUploadFileService:e,editor:t,component:i,element:r,view:o}){this.preventHide=!1,this.$destroy=new pe,this.initialLabel="Import to dotCMS",this.offset=10,this.editor=t,this.element=r,this.view=o,this.component=i,this.dotUploadFileService=e,this.component.instance.byClick.pipe(Ft(this.$destroy)).subscribe(()=>this.uploadImagedotCMS()),this.element.remove(),this.element.style.visibility="visible"}update(e,t){let{state:i,composing:r}=e,{doc:o,selection:s}=i,{empty:a,ranges:l}=s,c=t&&t.doc.eq(o)&&t.selection.eq(s);if(r||c||this.preventHide){this.preventHide=!1;return}let u=Math.min(...l.map(v=>v.$from.pos)),d=o.nodeAt(u)?.type.name,p=this.editor.getAttributes(Qn.name),h=d===Qn.name;if(a||!h||p?.data){this.hide();return}let g=e.nodeDOM(u),_=g.querySelector("img");this.imageUrl=p?.src,this.updateButtonLabel(this.initialLabel),this.createTooltip(),this.tippy?.setProps({maxWidth:_?.width-this.offset||250,getReferenceClientRect:()=>{let v=e.dom.parentElement.getBoundingClientRect(),w=Vv(g,d);return wye({viewCoords:v,nodeCoords:w})}}),this.show()}createTooltip(){let{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=Pi(e,{maxWidth:"none",duration:500,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"bottom-end",offset:[-this.offset,0],hideOnClick:"toggle"}))}show(){this.tippy?.show()}hide(){this.tippy?.hide()}destroy(){this.tippy?.destroy(),this.component.destroy(),this.$destroy.next(!0),this.$destroy.complete()}updateImageNode(e){let{fileAsset:t,asset:i}=e;this.setPreventHide();let r=this.editor.getAttributes(Qn.name);this.editor.commands.updateAttributes(Qn.name,R(I({},r),{src:t||i,data:e}))}setPreventHide(){this.preventHide=!0}uploadImagedotCMS(){this.updateButtonLoading(!0),this.dotUploadFileService.publishContent({data:this.imageUrl,statusCallback:e=>this.updateButtonLabel(e)}).pipe(xt(1),jt(()=>this.updateButtonLoading(!1))).subscribe(e=>{let t=e[0];this.updateButtonLabel(Ja.COMPLETED),this.updateImageNode(t[Object.keys(t)[0]])},()=>{this.updateButtonLoading(!1),this.updateButtonLabel(Ja.ERROR),this.setPreventHide()})}updateButtonLabel(e){this.component.instance.label=e,this.component.changeDetectorRef.detectChanges()}updateButtonLoading(e){this.component.instance.isLoading=e,this.component.changeDetectorRef.detectChanges()}};var Iye=new Be("floating-button");function F8(n,e){let t=e.createComponent(P8),i=t.location.nativeElement,r=n.get(as);return mt.create({addProseMirrorPlugins(){return i?[R8(R(I({},this.options),{dotUploadFileService:r,component:t,pluginKey:Iye,editor:this.editor,element:i}))]:[]}})}var Qd=new Be("freeze-scroll"),j8=mt.create({name:"freezeScroll",addCommands(){return{freezeScroll:n=>({chain:e})=>e().command(({tr:t})=>(t.setMeta(Qd,{freezeScroll:n}),!0)).run()}},addProseMirrorPlugins(){return[xye]}}),xye=new Le({key:Qd,state:{init(){return{freezeScroll:!1}},apply(n,e,t){let{freezeScroll:i}=n.getMeta(Qd)||{},r=Qd?.getState(t);return typeof i=="boolean"?{freezeScroll:i}:r||e}}});var YM=function(n){return n.TOP_INITIAL="40px",n.TOP_CURRENT="26px",n}(YM||{});function Tye(n){return n.replace(new RegExp("\\p{L}+('\\p{L}+)?","gu"),function(e){return e.charAt(0).toUpperCase()+e.slice(1)})}var Eye=(n,e,t)=>{let i=document.createElement("button");i.classList.add("add-button"),i.style.position="absolute",i.style.left="-45px",i.style.top="-2px";let r=document.createElement("div");return r.style.position="relative",r.setAttribute("draggable","false"),n===0&&e.type.name===Vn.HEADING&&(i.style.top=YM.TOP_INITIAL),n!==0&&e.type.name===Vn.HEADING&&(i.style.top=YM.TOP_CURRENT),i.innerHTML='',i.setAttribute("draggable","false"),i.addEventListener("mousedown",o=>{o.preventDefault(),t.chain().insertContent("/").run()},{once:!0}),r.appendChild(i),r},V8=mt.create({name:"dotPlaceholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Le({key:new Be("dotPlaceholder"),props:{decorations:({doc:n,selection:e})=>{let t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=e,r=[];if(!t)return null;let o=n.type.createAndFill(),s=o?.sameMarkup(n)&&o.content.findDiffStart(n.content)===null;return n.descendants((a,l)=>{let c=i>=l&&i<=l+a.nodeSize,u=!a.isLeaf&&!a.childCount;if((c||!this.options.showOnlyCurrent)&&u){let d=[this.options.emptyNodeClass];s&&d.push(this.options.emptyEditorClass);let p=An.widget(l,Eye(l,a,this.editor)),h=An.node(l,l+a.nodeSize,{class:d.join(" "),"data-placeholder":a.type.name===Vn.HEADING?`${Tye(a.type.name)} ${a.attrs.level}`:this.options.placeholder});r.push(h),r.push(p)}return this.options.includeChildren}),pn.create(n,r)}}})]}});var B8=(()=>{let e=class e{constructor(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=F({type:e,selectors:[["dot-editor-count-bar"]],inputs:{characterCount:"characterCount",charLimit:"charLimit",readingTime:"readingTime"},decls:8,vars:6,template:function(r,o){r&1&&(b(0,"span"),Z(1),C(),b(2,"span"),Z(3,"\u25CF"),C(),Z(4),b(5,"span"),Z(6,"\u25CF"),C(),Z(7)),r&2&&(Gt("error-message",o.charLimit&&o.characterCount.characters()>o.charLimit),m(),Fp(" ",o.characterCount.characters(),"",o.charLimit?"/"+o.charLimit:"",` chars +`),m(3),yt(` +`,o.characterCount.words(),` words +`),m(3),yt(` +`,o.readingTime,`m read +`))},styles:["[_nghost-%COMP%]{display:flex;justify-content:flex-end;align-items:flex-end;color:#afb3c0;margin-top:1rem;gap:.65rem;font-size:.875rem}[_nghost-%COMP%] .error-message[_ngcontent-%COMP%]{color:#d82b2e}"]});let n=e;return n})();var Mye=(n,e)=>({"editor-wrapper--fullscreen":n,"editor-wrapper--default":e}),Dye=n=>({"overflow-hidden":n});function Oye(n,e){if(n&1&&E(0,"dot-editor-count-bar",2),n&2){let t=y(2);f("charLimit",t.charLimit)("characterCount",t.characterCount)("readingTime",t.readingTime)}}function Aye(n,e){if(n&1){let t=$();b(0,"div",0)(1,"tiptap-editor",1),P("keyup",function(){M(t);let r=y();return D(r.subject.next())})("ngModelChange",function(r){M(t);let o=y();return D(o.onBlockEditorChange(r))}),C()(),x(2,Oye,1,3,"dot-editor-count-bar",2)}if(n&2){let t=y();En(t.customStyles),f("ngClass",_t(7,Mye,t.isFullscreen,!t.isFullscreen)),m(),f("editor",t.editor)("ngClass",_e(10,Dye,t.freezeScroll))("ngModel",t.content),m(),we(t.showCharData?2:-1)}}var ZM=(()=>{var e,t,i;let r=class r{constructor(s,a,l){zn(this,e);zn(this,t);zn(this,i);this.viewContainerRef=s,this.dotMarketingConfigService=a,this.dotAiService=l,io(this,e,B($t)),this.languageId=1,this.isFullscreen=!1,this.value="",this.valueChange=new j,this.displayCountBar=!0,this.customBlocks="",this.content="",this.subject=new pe,this.freezeScroll=!0,this.destroy$=new pe,this.allowedBlocks=["paragraph"],this._customNodes=new Map([["dotContent",bj(Kt(this,e))],["image",Qn],["video",Tj],["table",k8()],["aiContent",Ej],["loader",Sj]]),this.cd=B(De),this.dotPropertiesService=B(rd),io(this,t,B(px)),io(this,i,B(Qt)),this.isAIPluginInstalled$=this.dotAiService.checkPluginInstallation()}get characterCount(){return this.editor?.storage.characterCount}get showCharData(){try{return JSON.parse(this.displayCountBar)}catch{return!0}}get readingTime(){return Math.ceil(this.characterCount.words()/265)}registerOnChange(s){this.onChange=s}registerOnTouched(s){this.onTouched=s}writeValue(s){this.value=s,this.setEditorContent(s)}loadCustomBlocks(s){return ji(this,null,function*(){return Promise.allSettled(s.map(a=>ji(this,null,function*(){return import(a)})))})}ngOnInit(){this.setFieldVariable(),xs([this.showVideoThumbnail$(),Yt(this.getCustomRemoteExtensions()),this.isAIPluginInstalled$]).pipe(xt(1)).subscribe(([s,a,l])=>{this.editor=new w_({extensions:[...this.getEditorExtensions(l),...this.getEditorMarks(),...this.getEditorNodes(),...a]}),this.dotMarketingConfigService.setProperty(Ty.SHOW_VIDEO_THUMBNAIL,s),this.subscribeToEditorEvents()})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}onBlockEditorChange(s){this.valueChange.emit(s),this.onChange?.(JSON.stringify(s)),this.onTouched?.()}setAllowedBlocks(s){let a=s?s.replace(/ /g,"").split(",").filter(Boolean):[];this.allowedBlocks=[...this.allowedBlocks,...a]}subscribeToEditorEvents(){this.editor.on("create",()=>{this.setEditorContent(this.value),this.updateCharCount()}),this.subject.pipe(Ft(this.destroy$),Ts(250)).subscribe(()=>this.updateCharCount()),this.editor.on("transaction",({editor:s})=>{this.freezeScroll=Qd.getState(s.view.state)?.freezeScroll}),this.cd.detectChanges()}updateCharCount(){let s=this.editor.state.tr.setMeta("addToHistory",!1);this.characterCount.characters()!=0?s.step(new Ud("charCount",this.characterCount.characters())).step(new Ud("wordCount",this.characterCount.words())).step(new Ud("readingTime",this.readingTime)):s.step(new kv),this.editor.view.dispatch(s)}showVideoThumbnail$(){return this.dotPropertiesService.getKey(Ty.SHOW_VIDEO_THUMBNAIL).pipe(Ie((s="true")=>s==="true"||s==="NOT_FOUND"))}isValidSchema(s){let a=Fy({extensions:jT(Fy({url:Xh(),actions:lP(jT(Fy({command:Xh(),menuLabel:Xh(),icon:Xh()})))}))});FT(s,a)}getParsedCustomBlocks(){let s={extensions:[]};if(!this.customBlocks?.length)return s;try{let a=JSON.parse(this.customBlocks);return this.isValidSchema(a),a}catch(a){return console.warn("JSON parse fails, please check the JSON format.",a),{extensions:[]}}}parsedCustomModules(s,a){return a.status===Ey.REJECTED&&console.warn("Failed to load the module",a.reason),a.status===Ey.FULFILLED?I(I({},s),a?.value):I({},s)}getCustomRemoteExtensions(){return ji(this,null,function*(){let s=this.getParsedCustomBlocks(),a=s?.extensions?.map(d=>d.url),l=yield this.loadCustomBlocks(a),c=[];s.extensions.forEach(d=>{c.push(...d.actions?.map(p=>p.name)||[])});let u=l.reduce(this.parsedCustomModules,{});return Object.values(u)})}getEditorNodes(){let s=this.allowedBlocks?.length>1?VS.configure(this.starterConfig()):VS,a=this.getAllowedCustomNodes();return[s,...a]}starterConfig(){let s=["orderedList","bulletList","blockquote","codeBlock","horizontalRule"],l=["heading1","heading2","heading3","heading4","heading5","heading6"].filter(u=>this.allowedBlocks?.includes(u)).map(u=>+u.slice(-1)),c=s.filter(u=>!this.allowedBlocks?.includes(u)).reduce((u,d)=>R(I({},u),{[d]:!1}),{});return I({heading:l?.length?{levels:l,HTMLAttributes:{}}:!1},c)}getAllowedCustomNodes(){let s=[];if(this.allowedBlocks.length<=1)return[...this._customNodes.values()];for(let a of this.allowedBlocks){let l=this._customNodes.get(a);l&&s.push(l)}return s}getEditorExtensions(s){let a=[Kj({lang:this.languageId||this.contentlet?.languageId,allowedContentTypes:this.allowedContentTypes,allowedBlocks:this.allowedBlocks,contentletIdentifier:this.contentletIdentifier}),Qj,V8.configure({placeholder:'Type "/" for commands'}),_5.configure({height:300,width:400,interfaceLanguage:"us",nocookie:!0,modestBranding:!0}),d5,p5,rj(this.viewContainerRef,this.getParsedCustomBlocks(),{shouldShowAIExtensions:s}),L8(this.viewContainerRef),kj(this.viewContainerRef,this.languageId),qj(this.viewContainerRef),Uj(this.viewContainerRef),F8(Kt(this,e),this.viewContainerRef),Xj(this.viewContainerRef),gj(this.viewContainerRef),t8(),h5,j8,qF,Mj(Kt(this,e),this.viewContainerRef)];return s&&a.push(X6(this.viewContainerRef),tj(Kt(this,t),Kt(this,i))),a}getEditorMarks(){return[m5,f5.configure({types:["heading","paragraph","listItem","dotImage"]}),QF.configure({HTMLAttributes:{style:"background: #accef7;"}}),u5.configure({autolink:!1,openOnClick:!1})]}setEditorJSONContent(s){this.content=this.allowedBlocks?.length>1?z6(s,this.allowedBlocks):s}setEditorContent(s){if(typeof s=="string"){this.content=q6(s);return}this.setEditorJSONContent(s)}setFieldVariable(){let{contentTypes:s,styles:a,displayCountBar:l,charLimit:c,customBlocks:u,allowedBlocks:d}=this.getFieldVariables();this.allowedContentTypes=s,this.customStyles=a,this.displayCountBar=l,this.charLimit=Number(c),this.customBlocks=u,this.setAllowedBlocks(d)}getFieldVariables(){return this.field?.fieldVariables.reduce((s,{key:a,value:l})=>R(I({},s),{[a]:l}),{})||{}}};e=new WeakMap,t=new WeakMap,i=new WeakMap,r.\u0275fac=function(a){return new(a||r)(k(Un),k(k6),k(Xa))},r.\u0275cmp=F({type:r,selectors:[["dot-block-editor"]],inputs:{field:"field",contentlet:"contentlet",languageId:"languageId",isFullscreen:"isFullscreen",value:"value"},outputs:{valueChange:"valueChange"},features:[on([px,{provide:ti,useExisting:dn(()=>r),multi:!0}])],decls:1,vars:1,consts:[[1,"editor-wrapper",3,"ngClass"],[3,"keyup","ngModelChange","editor","ngClass","ngModel"],[3,"charLimit","characterCount","readingTime"]],template:function(a,l){a&1&&x(0,Aye,3,12),a&2&&we(l.editor?0:-1)},dependencies:[Ye,Rr,$l,P6,B8],styles:['[_nghost-%COMP%]{position:relative;font-family:Assistant,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;height:100%;display:block}[_nghost-%COMP%] .editor-wrapper[_ngcontent-%COMP%]{display:block;border-radius:.25rem;overflow:hidden;position:relative;resize:vertical;outline:#afb3c0 solid 1px}[_nghost-%COMP%] .editor-wrapper--default[_ngcontent-%COMP%]{height:500px}[_nghost-%COMP%] .editor-wrapper--fullscreen[_ngcontent-%COMP%]{height:100%}[_nghost-%COMP%]:focus-within{outline-color:var(--color-palette-primary-500)}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] {display:block;height:100%;overflow-y:auto;width:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;min-height:100%;outline:none;padding:16px 64px;font:16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror img{max-width:100%;max-height:100%;position:relative}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror img:before{align-items:center;background:#f3f3f4;border-radius:3px;border:1px solid #afb3c0;color:#6c7389;content:"The image URL " attr(src) " seems to be broken, please double check the URL.";display:flex;height:100%;left:0;padding:1rem;position:absolute;text-align:center;width:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ul, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ol{padding-inline-start:16px;margin:0 0 0 16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ol li{list-style-type:decimal}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror ul li{list-style-type:disc}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror li{padding-top:4.576px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror li p{padding:0;margin:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h1{font-size:38.88px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h2{font-size:30.88px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h3{font-size:25.12px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h4{font-size:20.64px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h5{font-size:17.12px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h6{font-size:16px;font-weight:700;font-style:normal}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h1, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h2, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h3, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h4, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h5, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror h6{margin:48px 0 22.08px;line-height:1.3}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror p{font-size:16px;line-height:20.64px;padding-top:4.576px;margin-bottom:16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror p.is-empty{padding-top:4.576px;margin:0 0 5px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror blockquote{margin:16px;border-left:3px solid var(--color-palette-black-op-10);padding-left:16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror pre{background:#14151a;border-radius:8px;color:#fff;padding:12px 16px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror pre code{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background:none;color:inherit;padding:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror .is-empty:before{color:#afb3c0;content:attr(data-placeholder);float:left;height:0;pointer-events:none}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror .add-button{all:unset;cursor:pointer;border:solid 1px #eee;width:32px;height:32px;display:flex;align-items:center;justify-content:center;color:#666;background:#fff}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table{border-collapse:collapse;margin:0;overflow:hidden;table-layout:fixed;width:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table td, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th{border:2px solid #afb3c0;box-sizing:border-box;min-width:1rem;padding:3px 20px 3px 5px;position:relative;vertical-align:top}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th{background-clip:padding-box}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table td>*, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th>*{margin-bottom:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th{background-color:#f3f3f4;font-weight:700;text-align:left}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .selectedCell{background-color:#ebecef}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .selectedCell:after{content:"";inset:0;pointer-events:none;position:absolute}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .column-resize-handle{bottom:-2px;position:absolute;right:-2px;pointer-events:none;top:0;width:4px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table p{margin:0}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .tableWrapper{padding:1rem 0;overflow-x:auto}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .resize-cursor{cursor:ew-resize;cursor:col-resize}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .dot-cell-arrow{position:absolute;display:none;top:3px;right:5px;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg);background:transparent;cursor:pointer;z-index:100}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table .selectedCell .dot-cell-arrow{display:block}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table td.focus .dot-cell-arrow, [_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror table th.focus .dot-cell-arrow{display:block}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ProseMirror .ai-loading{display:flex;justify-content:center;align-items:center;min-width:100%;padding:.5rem;border-radius:.5rem;border:1px solid #d1d4db;color:var(--color-palette-primary-500)}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .video-container{margin-bottom:1rem;aspect-ratio:16/9;height:300px}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .video-container video{width:100%;height:100%}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .image-container{margin-bottom:1rem}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .image-container img{width:auto;max-height:300px;max-width:50%;padding:.5rem}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .image-container.ProseMirror-selectednode img{outline:1px solid var(--color-palette-primary-500)}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .ai-content-container.ProseMirror-selectednode{background-color:var(--color-palette-primary-op-20);border:1px solid var(--color-palette-primary-300)}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .loader-style{display:flex;justify-content:center;flex-direction:column;align-items:center;min-height:12.5rem;min-width:25rem;width:25.5625rem;height:17.375rem;padding:.5rem;border-radius:.5rem;border:1.5px solid #d1d4db}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%] .p-progress-spinner{border:5px solid #ebecef;border-radius:50%;border-top:5px solid var(--color-palette-primary-500);width:2.4rem;height:2.4rem;animation:_ngcontent-%COMP%_spin 1s linear infinite}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}[_nghost-%COMP%] tiptap-editor[_ngcontent-%COMP%]{scrollbar-gutter:stable}[_nghost-%COMP%] .overflow-hidden[_ngcontent-%COMP%]{overflow-y:hidden}']});let n=r;return n})();var Kv=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({imports:[IT,MM,an,Xl,oc,bh,dh,yM,Ws,mo,IM,qp,IT,MM,an,Xl,oc,bh,dh,yM,Ws,mo,IM,qp]});let n=e;return n})();var z8=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({providers:[as],imports:[Te,hr,ho,rc,Kv,Gs]});let n=e;return n})();var JM=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({providers:[Vd],imports:[Te,hr,ho,an]});let n=e;return n})();wu(gl,[Mv,jd,Sv],[]);var Nye=n=>()=>n.init(),U8=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=le({type:e}),e.\u0275inj=ae({providers:[as,is,iy,Xa,Vs,rd,Ya,Ur,Qh,{provide:xu,useFactory:Nye,deps:[Qt],multi:!0}],imports:[Te,hr,ho,JM,Kv,yL,z8,Pv,Vu,Gs,Bu,Uu,SL,rc,ho,JM,rc]});let n=e;return n})();wu(zv,[Wj],[]);wu(jv,[Zo,Pr,Rr,Yo,$i,po,zf,zt,ns,$j,DM],[]);wu(DM,[Mv,jd,A6,Sv],[]);var H8=(()=>{let e=class e{constructor(i){this.injector=i}ngDoBootstrap(){if(customElements.get("dotcms-block-editor")===void 0){let i=sN(ZM,{injector:this.injector});customElements.define("dotcms-block-editor",i)}}};e.\u0275fac=function(r){return new(r||e)(re($t))},e.\u0275mod=le({type:e}),e.\u0275inj=ae({providers:[rd,Ya,Ur],imports:[d0,f3,Te,hr,U8,bh,dh,qp,Gs]});let n=e;return n})();var $8={production:!0};$8.production&&void 0;rN().bootstrapModule(H8).catch(n=>console.error(n)); +/*! Bundled license information: + +@angular/core/fesm2022/primitives/signals.mjs: + (** + * @license Angular v18.2.3 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + *) + +@angular/core/fesm2022/core.mjs: + (** + * @license Angular v18.2.3 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + *) + +@angular/core/fesm2022/core.mjs: + (*! + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + *) + +@angular/core/fesm2022/core.mjs: + (*! + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + *) + +@angular/core/fesm2022/core.mjs: + (*! + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + *) + +@angular/core/fesm2022/core.mjs: + (*! + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + *) + +@angular/core/fesm2022/core.mjs: + (*! + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + *) + +@angular/common/fesm2022/common.mjs: + (** + * @license Angular v18.2.3 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + *) + +@angular/common/fesm2022/http.mjs: + (** + * @license Angular v18.2.3 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + *) + +@angular/platform-browser/fesm2022/platform-browser.mjs: + (** + * @license Angular v18.2.3 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + *) + +@angular/elements/fesm2022/elements.mjs: + (** + * @license Angular v18.2.3 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + *) + +@angular/forms/fesm2022/forms.mjs: + (** + * @license Angular v18.2.3 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + *) + +@angular/animations/fesm2022/animations.mjs: + (** + * @license Angular v18.2.3 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + *) + +@angular/animations/fesm2022/browser.mjs: + (** + * @license Angular v18.2.3 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + *) + +@angular/platform-browser/fesm2022/animations.mjs: + (** + * @license Angular v18.2.3 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + *) + +@angular/router/fesm2022/router.mjs: + (** + * @license Angular v18.2.3 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + *) + +@angular/core/fesm2022/rxjs-interop.mjs: + (** + * @license Angular v18.2.3 + * (c) 2010-2024 Google LLC. https://angular.io/ + * License: MIT + *) + +@ngrx/component-store/fesm2022/ngrx-component-store.mjs: + (** + * @license MIT License + * + * Copyright (c) 2017-2020 Nicholas Jamieson and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + *) +*/ diff --git a/dotCMS/src/main/webapp/html/js/dojo/custom-build/build/build.js b/dotCMS/src/main/webapp/html/js/dojo/custom-build/build/build.js index 1eab992f9e82..cc667e2461ca 100644 --- a/dotCMS/src/main/webapp/html/js/dojo/custom-build/build/build.js +++ b/dotCMS/src/main/webapp/html/js/dojo/custom-build/build/build.js @@ -1,2 +1,2 @@ //>>built -require({cache:{"dijit/_base":function(){define(["./main","./a11y","./WidgetSet","./_base/focus","./_base/manager","./_base/place","./_base/popup","./_base/scroll","./_base/sniff","./_base/typematic","./_base/wai","./_base/window"],function(_1){return _1._base;});},"dijit/main":function(){define(["dojo/_base/kernel"],function(_2){return _2.dijit;});},"dijit/a11y":function(){define(["dojo/_base/array","dojo/dom","dojo/dom-attr","dojo/dom-style","dojo/_base/lang","dojo/sniff","./main"],function(_3,_4,_5,_6,_7,_8,_9){var _a;var _b={_isElementShown:function(_c){var s=_6.get(_c);return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_5.get(_c,"type")!="hidden");},hasDefaultTabStop:function(_d){switch(_d.nodeName.toLowerCase()){case "a":return _5.has(_d,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var _e;try{var _f=_d.contentDocument;if("designMode" in _f&&_f.designMode=="on"){return true;}_e=_f.body;}catch(e1){try{_e=_d.contentWindow.document.body;}catch(e2){return false;}}return _e&&(_e.contentEditable=="true"||(_e.firstChild&&_e.firstChild.contentEditable=="true"));default:return _d.contentEditable=="true";}},effectiveTabIndex:function(_10){if(_5.get(_10,"disabled")){return _a;}else{if(_5.has(_10,"tabIndex")){return +_5.get(_10,"tabIndex");}else{return _b.hasDefaultTabStop(_10)?0:_a;}}},isTabNavigable:function(_11){return _b.effectiveTabIndex(_11)>=0;},isFocusable:function(_12){return _b.effectiveTabIndex(_12)>=-1;},_getTabNavigable:function(_13){var _14,_15,_16,_17,_18,_19,_1a={};function _1b(_1c){return _1c&&_1c.tagName.toLowerCase()=="input"&&_1c.type&&_1c.type.toLowerCase()=="radio"&&_1c.name&&_1c.name.toLowerCase();};var _1d=_b._isElementShown,_1e=_b.effectiveTabIndex;var _1f=function(_20){for(var _21=_20.firstChild;_21;_21=_21.nextSibling){if(_21.nodeType!=1||(_8("ie")<=9&&_21.scopeName!=="HTML")||!_1d(_21)){continue;}var _22=_1e(_21);if(_22>=0){if(_22==0){if(!_14){_14=_21;}_15=_21;}else{if(_22>0){if(!_16||_22<_17){_17=_22;_16=_21;}if(!_18||_22>=_19){_19=_22;_18=_21;}}}var rn=_1b(_21);if(_5.get(_21,"checked")&&rn){_1a[rn]=_21;}}if(_21.nodeName.toUpperCase()!="SELECT"){_1f(_21);}}};if(_1d(_13)){_1f(_13);}function rs(_23){return _1a[_1b(_23)]||_23;};return {first:rs(_14),last:rs(_15),lowest:rs(_16),highest:rs(_18)};},getFirstInTabbingOrder:function(_24,doc){var _25=_b._getTabNavigable(_4.byId(_24,doc));return _25.lowest?_25.lowest:_25.first;},getLastInTabbingOrder:function(_26,doc){var _27=_b._getTabNavigable(_4.byId(_26,doc));return _27.last?_27.last:_27.highest;}};1&&_7.mixin(_9,_b);return _b;});},"dijit/WidgetSet":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/kernel","./registry"],function(_28,_29,_2a,_2b){var _2c=_29("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0;},add:function(_2d){if(this._hash[_2d.id]){throw new Error("Tried to register widget with id=="+_2d.id+" but that id is already registered");}this._hash[_2d.id]=_2d;this.length++;},remove:function(id){if(this._hash[id]){delete this._hash[id];this.length--;}},forEach:function(_2e,_2f){_2f=_2f||_2a.global;var i=0,id;for(id in this._hash){_2e.call(_2f,this._hash[id],i++,this._hash);}return this;},filter:function(_30,_31){_31=_31||_2a.global;var res=new _2c(),i=0,id;for(id in this._hash){var w=this._hash[id];if(_30.call(_31,w,i++,this._hash)){res.add(w);}}return res;},byId:function(id){return this._hash[id];},byClass:function(cls){var res=new _2c(),id,_32;for(id in this._hash){_32=this._hash[id];if(_32.declaredClass==cls){res.add(_32);}}return res;},toArray:function(){var ar=[];for(var id in this._hash){ar.push(this._hash[id]);}return ar;},map:function(_33,_34){return _28.map(this.toArray(),_33,_34);},every:function(_35,_36){_36=_36||_2a.global;var x=0,i;for(i in this._hash){if(!_35.call(_36,this._hash[i],x++,this._hash)){return false;}}return true;},some:function(_37,_38){_38=_38||_2a.global;var x=0,i;for(i in this._hash){if(_37.call(_38,this._hash[i],x++,this._hash)){return true;}}return false;}});_28.forEach(["forEach","filter","byClass","map","every","some"],function(_39){_2b[_39]=_2c.prototype[_39];});return _2c;});},"dijit/registry":function(){define(["dojo/_base/array","dojo/_base/window","./main"],function(_3a,win,_3b){var _3c={},_3d={};var _3e={length:0,add:function(_3f){if(_3d[_3f.id]){throw new Error("Tried to register widget with id=="+_3f.id+" but that id is already registered");}_3d[_3f.id]=_3f;this.length++;},remove:function(id){if(_3d[id]){delete _3d[id];this.length--;}},byId:function(id){return typeof id=="string"?_3d[id]:id;},byNode:function(_40){return _3d[_40.getAttribute("widgetId")];},toArray:function(){var ar=[];for(var id in _3d){ar.push(_3d[id]);}return ar;},getUniqueId:function(_41){var id;do{id=_41+"_"+(_41 in _3c?++_3c[_41]:_3c[_41]=0);}while(_3d[id]);return _3b._scopeName=="dijit"?id:_3b._scopeName+"_"+id;},findWidgets:function(_42,_43){var _44=[];function _45(_46){for(var _47=_46.firstChild;_47;_47=_47.nextSibling){if(_47.nodeType==1){var _48=_47.getAttribute("widgetId");if(_48){var _49=_3d[_48];if(_49){_44.push(_49);}}else{if(_47!==_43){_45(_47);}}}}};_45(_42);return _44;},_destroyAll:function(){_3b._curFocus=null;_3b._prevFocus=null;_3b._activeStack=[];_3a.forEach(_3e.findWidgets(win.body()),function(_4a){if(!_4a._destroyed){if(_4a.destroyRecursive){_4a.destroyRecursive();}else{if(_4a.destroy){_4a.destroy();}}}});},getEnclosingWidget:function(_4b){while(_4b){var id=_4b.nodeType==1&&_4b.getAttribute("widgetId");if(id){return _3d[id];}_4b=_4b.parentNode;}return null;},_hash:_3d};_3b.registry=_3e;return _3e;});},"dijit/_base/focus":function(){define(["dojo/_base/array","dojo/dom","dojo/_base/lang","dojo/topic","dojo/_base/window","../focus","../selection","../main"],function(_4c,dom,_4d,_4e,win,_4f,_50,_51){var _52={_curFocus:null,_prevFocus:null,isCollapsed:function(){return _51.getBookmark().isCollapsed;},getBookmark:function(){var sel=win.global==window?_50:new _50.SelectionManager(win.global);return sel.getBookmark();},moveToBookmark:function(_53){var sel=win.global==window?_50:new _50.SelectionManager(win.global);return sel.moveToBookmark(_53);},getFocus:function(_54,_55){var _56=!_4f.curNode||(_54&&dom.isDescendant(_4f.curNode,_54.domNode))?_51._prevFocus:_4f.curNode;return {node:_56,bookmark:_56&&(_56==_4f.curNode)&&win.withGlobal(_55||win.global,_51.getBookmark),openedForWindow:_55};},_activeStack:[],registerIframe:function(_57){return _4f.registerIframe(_57);},unregisterIframe:function(_58){_58&&_58.remove();},registerWin:function(_59,_5a){return _4f.registerWin(_59,_5a);},unregisterWin:function(_5b){_5b&&_5b.remove();}};_4f.focus=function(_5c){if(!_5c){return;}var _5d="node" in _5c?_5c.node:_5c,_5e=_5c.bookmark,_5f=_5c.openedForWindow,_60=_5e?_5e.isCollapsed:false;if(_5d){var _61=(_5d.tagName.toLowerCase()=="iframe")?_5d.contentWindow:_5d;if(_61&&_61.focus){try{_61.focus();}catch(e){}}_4f._onFocusNode(_5d);}if(_5e&&win.withGlobal(_5f||win.global,_51.isCollapsed)&&!_60){if(_5f){_5f.focus();}try{win.withGlobal(_5f||win.global,_51.moveToBookmark,null,[_5e]);}catch(e2){}}};_4f.watch("curNode",function(_62,_63,_64){_51._curFocus=_64;_51._prevFocus=_63;if(_64){_4e.publish("focusNode",_64);}});_4f.watch("activeStack",function(_65,_66,_67){_51._activeStack=_67;});_4f.on("widget-blur",function(_68,by){_4e.publish("widgetBlur",_68,by);});_4f.on("widget-focus",function(_69,by){_4e.publish("widgetFocus",_69,by);});_4d.mixin(_51,_52);return _51;});},"dijit/focus":function(){define(["dojo/aspect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/dom-construct","dojo/Evented","dojo/_base/lang","dojo/on","dojo/domReady","dojo/sniff","dojo/Stateful","dojo/_base/window","dojo/window","./a11y","./registry","./main"],function(_6a,_6b,dom,_6c,_6d,_6e,_6f,_70,on,_71,has,_72,win,_73,_74,_75,_76){var _77;var _78;var _79=_6b([_72,_6f],{curNode:null,activeStack:[],constructor:function(){var _7a=_70.hitch(this,function(_7b){if(dom.isDescendant(this.curNode,_7b)){this.set("curNode",null);}if(dom.isDescendant(this.prevNode,_7b)){this.set("prevNode",null);}});_6a.before(_6e,"empty",_7a);_6a.before(_6e,"destroy",_7a);},registerIframe:function(_7c){return this.registerWin(_7c.contentWindow,_7c);},registerWin:function(_7d,_7e){var _7f=this,_80=_7d.document&&_7d.document.body;if(_80){var _81=has("pointer-events")?"pointerdown":has("MSPointer")?"MSPointerDown":has("touch-events")?"mousedown, touchstart":"mousedown";var mdh=on(_7d.document,_81,function(evt){if(evt&&evt.target&&evt.target.parentNode==null){return;}_7f._onTouchNode(_7e||evt.target,"mouse");});var fih=on(_80,"focusin",function(evt){if(!evt.target.tagName){return;}var tag=evt.target.tagName.toLowerCase();if(tag=="#document"||tag=="body"){return;}if(_74.isFocusable(evt.target)){_7f._onFocusNode(_7e||evt.target);}else{_7f._onTouchNode(_7e||evt.target);}});var foh=on(_80,"focusout",function(evt){_7f._onBlurNode(_7e||evt.target);});return {remove:function(){mdh.remove();fih.remove();foh.remove();mdh=fih=foh=null;_80=null;}};}},_onBlurNode:function(_82){var now=(new Date()).getTime();if(now<_77+100){return;}if(this._clearFocusTimer){clearTimeout(this._clearFocusTimer);}this._clearFocusTimer=setTimeout(_70.hitch(this,function(){this.set("prevNode",this.curNode);this.set("curNode",null);}),0);if(this._clearActiveWidgetsTimer){clearTimeout(this._clearActiveWidgetsTimer);}if(now<_78+100){return;}this._clearActiveWidgetsTimer=setTimeout(_70.hitch(this,function(){delete this._clearActiveWidgetsTimer;this._setStack([]);}),0);},_onTouchNode:function(_83,by){_78=(new Date()).getTime();if(this._clearActiveWidgetsTimer){clearTimeout(this._clearActiveWidgetsTimer);delete this._clearActiveWidgetsTimer;}if(_6d.contains(_83,"dijitPopup")){_83=_83.firstChild;}var _84=[];try{while(_83){var _85=_6c.get(_83,"dijitPopupParent");if(_85){_83=_75.byId(_85).domNode;}else{if(_83.tagName&&_83.tagName.toLowerCase()=="body"){if(_83===win.body()){break;}_83=_73.get(_83.ownerDocument).frameElement;}else{var id=_83.getAttribute&&_83.getAttribute("widgetId"),_86=id&&_75.byId(id);if(_86&&!(by=="mouse"&&_86.get("disabled"))){_84.unshift(id);}_83=_83.parentNode;}}}}catch(e){}this._setStack(_84,by);},_onFocusNode:function(_87){if(!_87){return;}if(_87.nodeType==9){return;}_77=(new Date()).getTime();if(this._clearFocusTimer){clearTimeout(this._clearFocusTimer);delete this._clearFocusTimer;}this._onTouchNode(_87);if(_87==this.curNode){return;}this.set("prevNode",this.curNode);this.set("curNode",_87);},_setStack:function(_88,by){var _89=this.activeStack,_8a=_89.length-1,_8b=_88.length-1;if(_88[_8b]==_89[_8a]){return;}this.set("activeStack",_88);var _8c,i;for(i=_8a;i>=0&&_89[i]!=_88[i];i--){_8c=_75.byId(_89[i]);if(_8c){_8c._hasBeenBlurred=true;_8c.set("focused",false);if(_8c._focusManager==this){_8c._onBlur(by);}this.emit("widget-blur",_8c,by);}}for(i++;i<=_8b;i++){_8c=_75.byId(_88[i]);if(_8c){_8c.set("focused",true);if(_8c._focusManager==this){_8c._onFocus(by);}this.emit("widget-focus",_8c,by);}}},focus:function(_8d){if(_8d){try{_8d.focus();}catch(e){}}}});var _8e=new _79();_71(function(){var _8f=_8e.registerWin(_73.get(document));if(has("ie")){on(window,"unload",function(){if(_8f){_8f.remove();_8f=null;}});}});_76.focus=function(_90){_8e.focus(_90);};for(var _91 in _8e){if(!/^_/.test(_91)){_76.focus[_91]=typeof _8e[_91]=="function"?_70.hitch(_8e,_91):_8e[_91];}}_8e.watch(function(_92,_93,_94){_76.focus[_92]=_94;});return _8e;});},"dojo/Stateful":function(){define(["./_base/declare","./_base/lang","./_base/array","./when"],function(_95,_96,_97,_98){return _95("dojo.Stateful",null,{_attrPairNames:{},_getAttrNames:function(_99){var apn=this._attrPairNames;if(apn[_99]){return apn[_99];}return (apn[_99]={s:"_"+_99+"Setter",g:"_"+_99+"Getter"});},postscript:function(_9a){if(_9a){this.set(_9a);}},_get:function(_9b,_9c){return typeof this[_9c.g]==="function"?this[_9c.g]():this[_9b];},get:function(_9d){return this._get(_9d,this._getAttrNames(_9d));},set:function(_9e,_9f){if(typeof _9e==="object"){for(var x in _9e){if(_9e.hasOwnProperty(x)&&x!="_watchCallbacks"){this.set(x,_9e[x]);}}return this;}var _a0=this._getAttrNames(_9e),_a1=this._get(_9e,_a0),_a2=this[_a0.s],_a3;if(typeof _a2==="function"){_a3=_a2.apply(this,Array.prototype.slice.call(arguments,1));}else{this[_9e]=_9f;}if(this._watchCallbacks){var _a4=this;_98(_a3,function(){_a4._watchCallbacks(_9e,_a1,_9f);});}return this;},_changeAttrValue:function(_a5,_a6){var _a7=this.get(_a5);this[_a5]=_a6;if(this._watchCallbacks){this._watchCallbacks(_a5,_a7,_a6);}return this;},watch:function(_a8,_a9){var _aa=this._watchCallbacks;if(!_aa){var _ab=this;_aa=this._watchCallbacks=function(_ac,_ad,_ae,_af){var _b0=function(_b1){if(_b1){_b1=_b1.slice();for(var i=0,l=_b1.length;i-1){_b2.splice(_b4,1);}};return _b3;}});});},"dojo/window":function(){define(["./_base/lang","./sniff","./_base/window","./dom","./dom-geometry","./dom-style","./dom-construct"],function(_b5,has,_b6,dom,_b7,_b8,_b9){has.add("rtl-adjust-position-for-verticalScrollBar",function(win,doc){var _ba=_b6.body(doc),_bb=_b9.create("div",{style:{overflow:"scroll",overflowX:"visible",direction:"rtl",visibility:"hidden",position:"absolute",left:"0",top:"0",width:"64px",height:"64px"}},_ba,"last"),div=_b9.create("div",{style:{overflow:"hidden",direction:"ltr"}},_bb,"last"),ret=_b7.position(div).x!=0;_bb.removeChild(div);_ba.removeChild(_bb);return ret;});has.add("position-fixed-support",function(win,doc){var _bc=_b6.body(doc),_bd=_b9.create("span",{style:{visibility:"hidden",position:"fixed",left:"1px",top:"1px"}},_bc,"last"),_be=_b9.create("span",{style:{position:"fixed",left:"0",top:"0"}},_bd,"last"),ret=_b7.position(_be).x!=_b7.position(_bd).x;_bd.removeChild(_be);_bc.removeChild(_bd);return ret;});var _bf={getBox:function(doc){doc=doc||_b6.doc;var _c0=(doc.compatMode=="BackCompat")?_b6.body(doc):doc.documentElement,_c1=_b7.docScroll(doc),w,h;if(has("touch")){var _c2=_bf.get(doc);w=_c2.innerWidth||_c0.clientWidth;h=_c2.innerHeight||_c0.clientHeight;}else{w=_c0.clientWidth;h=_c0.clientHeight;}return {l:_c1.x,t:_c1.y,w:w,h:h};},get:function(doc){if(has("ie")&&_bf!==document.parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc.parentWindow||doc.defaultView;},scrollIntoView:function(_c3,pos){try{_c3=dom.byId(_c3);var doc=_c3.ownerDocument||_b6.doc,_c4=_b6.body(doc),_c5=doc.documentElement||_c4.parentNode,_c6=has("ie")||has("trident"),_c7=has("webkit");if(_c3==_c4||_c3==_c5){return;}if(!(has("mozilla")||_c6||_c7||has("opera")||has("trident")||has("edge"))&&("scrollIntoView" in _c3)){_c3.scrollIntoView(false);return;}var _c8=doc.compatMode=="BackCompat",_c9=Math.min(_c4.clientWidth||_c5.clientWidth,_c5.clientWidth||_c4.clientWidth),_ca=Math.min(_c4.clientHeight||_c5.clientHeight,_c5.clientHeight||_c4.clientHeight),_cb=(_c7||_c8)?_c4:_c5,_cc=pos||_b7.position(_c3),el=_c3.parentNode,_cd=function(el){return (_c6<=6||(_c6==7&&_c8))?false:(has("position-fixed-support")&&(_b8.get(el,"position").toLowerCase()=="fixed"));},_ce=this,_cf=function(el,x,y){if(el.tagName=="BODY"||el.tagName=="HTML"){_ce.get(el.ownerDocument).scrollBy(x,y);}else{x&&(el.scrollLeft+=x);y&&(el.scrollTop+=y);}};if(_cd(_c3)){return;}while(el){if(el==_c4){el=_cb;}var _d0=_b7.position(el),_d1=_cd(el),rtl=_b8.getComputedStyle(el).direction.toLowerCase()=="rtl";if(el==_cb){_d0.w=_c9;_d0.h=_ca;if(_cb==_c5&&(_c6||has("trident"))&&rtl){_d0.x+=_cb.offsetWidth-_d0.w;}_d0.x=0;_d0.y=0;}else{var pb=_b7.getPadBorderExtents(el);_d0.w-=pb.w;_d0.h-=pb.h;_d0.x+=pb.l;_d0.y+=pb.t;var _d2=el.clientWidth,_d3=_d0.w-_d2;if(_d2>0&&_d3>0){if(rtl&&has("rtl-adjust-position-for-verticalScrollBar")){_d0.x+=_d3;}_d0.w=_d2;}_d2=el.clientHeight;_d3=_d0.h-_d2;if(_d2>0&&_d3>0){_d0.h=_d2;}}if(_d1){if(_d0.y<0){_d0.h+=_d0.y;_d0.y=0;}if(_d0.x<0){_d0.w+=_d0.x;_d0.x=0;}if(_d0.y+_d0.h>_ca){_d0.h=_ca-_d0.y;}if(_d0.x+_d0.w>_c9){_d0.w=_c9-_d0.x;}}var l=_cc.x-_d0.x,t=_cc.y-_d0.y,r=l+_cc.w-_d0.w,bot=t+_cc.h-_d0.h;var s,old;if(r*l>0&&(!!el.scrollLeft||el==_cb||el.scrollWidth>el.offsetHeight)){s=Math[l<0?"max":"min"](l,r);if(rtl&&((_c6==8&&!_c8)||has("trident")>=5)){s=-s;}old=el.scrollLeft;_cf(el,s,0);s=el.scrollLeft-old;_cc.x-=s;}if(bot*t>0&&(!!el.scrollTop||el==_cb||el.scrollHeight>el.offsetHeight)){s=Math.ceil(Math[t<0?"max":"min"](t,bot));old=el.scrollTop;_cf(el,0,s);s=el.scrollTop-old;_cc.y-=s;}el=(el!=_cb)&&!_d1&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);_c3.scrollIntoView(false);}}};1&&_b5.setObject("dojo.window",_bf);return _bf;});},"dijit/selection":function(){define(["dojo/_base/array","dojo/dom","dojo/_base/lang","dojo/sniff","dojo/_base/window","dijit/focus"],function(_d4,dom,_d5,has,_d6,_d7){var _d8=function(win){var doc=win.document;this.getType=function(){if(doc.getSelection){var _d9="text";var _da;try{_da=win.getSelection();}catch(e){}if(_da&&_da.rangeCount==1){var _db=_da.getRangeAt(0);if((_db.startContainer==_db.endContainer)&&((_db.endOffset-_db.startOffset)==1)&&(_db.startContainer.nodeType!=3)){_d9="control";}}return _d9;}else{return doc.selection.type.toLowerCase();}};this.getSelectedText=function(){if(doc.getSelection){var _dc=win.getSelection();return _dc?_dc.toString():"";}else{if(this.getType()=="control"){return null;}return doc.selection.createRange().text;}};this.getSelectedHtml=function(){if(doc.getSelection){var _dd=win.getSelection();if(_dd&&_dd.rangeCount){var i;var _de="";for(i=0;i<_dd.rangeCount;i++){var _df=_dd.getRangeAt(i).cloneContents();var div=doc.createElement("div");div.appendChild(_df);_de+=div.innerHTML;}return _de;}return null;}else{if(this.getType()=="control"){return null;}return doc.selection.createRange().htmlText;}};this.getSelectedElement=function(){if(this.getType()=="control"){if(doc.getSelection){var _e0=win.getSelection();return _e0.anchorNode.childNodes[_e0.anchorOffset];}else{var _e1=doc.selection.createRange();if(_e1&&_e1.item){return doc.selection.createRange().item(0);}}}return null;};this.getParentElement=function(){if(this.getType()=="control"){var p=this.getSelectedElement();if(p){return p.parentNode;}}else{if(doc.getSelection){var _e2=doc.getSelection();if(_e2){var _e3=_e2.anchorNode;while(_e3&&(_e3.nodeType!=1)){_e3=_e3.parentNode;}return _e3;}}else{var r=doc.selection.createRange();r.collapse(true);return r.parentElement();}}return null;};this.hasAncestorElement=function(_e4){return this.getAncestorElement.apply(this,arguments)!=null;};this.getAncestorElement=function(_e5){var _e6=this.getSelectedElement()||this.getParentElement();return this.getParentOfType(_e6,arguments);};this.isTag=function(_e7,_e8){if(_e7&&_e7.tagName){var _e9=_e7.tagName.toLowerCase();for(var i=0;i<_e8.length;i++){var _ea=String(_e8[i]).toLowerCase();if(_e9==_ea){return _ea;}}}return "";};this.getParentOfType=function(_eb,_ec){while(_eb){if(this.isTag(_eb,_ec).length){return _eb;}_eb=_eb.parentNode;}return null;};this.collapse=function(_ed){if(doc.getSelection){var _ee=win.getSelection();if(_ee.removeAllRanges){if(_ed){_ee.collapseToStart();}else{_ee.collapseToEnd();}}else{_ee.collapse(_ed);}}else{var _ef=doc.selection.createRange();_ef.collapse(_ed);_ef.select();}};this.remove=function(){var sel=doc.selection;if(doc.getSelection){sel=win.getSelection();sel.deleteFromDocument();return sel;}else{if(sel.type.toLowerCase()!="none"){sel.clear();}return sel;}};this.selectElementChildren=function(_f0,_f1){var _f2;_f0=dom.byId(_f0);if(doc.getSelection){var _f3=win.getSelection();if(has("opera")){if(_f3.rangeCount){_f2=_f3.getRangeAt(0);}else{_f2=doc.createRange();}_f2.setStart(_f0,0);_f2.setEnd(_f0,(_f0.nodeType==3)?_f0.length:_f0.childNodes.length);_f3.addRange(_f2);}else{_f3.selectAllChildren(_f0);}}else{_f2=_f0.ownerDocument.body.createTextRange();_f2.moveToElementText(_f0);if(!_f1){try{_f2.select();}catch(e){}}}};this.selectElement=function(_f4,_f5){var _f6;_f4=dom.byId(_f4);if(doc.getSelection){var _f7=doc.getSelection();_f6=doc.createRange();if(_f7.removeAllRanges){if(has("opera")){if(_f7.getRangeAt(0)){_f6=_f7.getRangeAt(0);}}_f6.selectNode(_f4);_f7.removeAllRanges();_f7.addRange(_f6);}}else{try{var tg=_f4.tagName?_f4.tagName.toLowerCase():"";if(tg==="img"||tg==="table"){_f6=_d6.body(doc).createControlRange();}else{_f6=_d6.body(doc).createRange();}_f6.addElement(_f4);if(!_f5){_f6.select();}}catch(e){this.selectElementChildren(_f4,_f5);}}};this.inSelection=function(_f8){if(_f8){var _f9;var _fa;if(doc.getSelection){var sel=win.getSelection();if(sel&&sel.rangeCount>0){_fa=sel.getRangeAt(0);}if(_fa&&_fa.compareBoundaryPoints&&doc.createRange){try{_f9=doc.createRange();_f9.setStart(_f8,0);if(_fa.compareBoundaryPoints(_fa.START_TO_END,_f9)===1){return true;}}catch(e){}}}else{_fa=doc.selection.createRange();try{_f9=_f8.ownerDocument.body.createTextRange();_f9.moveToElementText(_f8);}catch(e2){}if(_fa&&_f9){if(_fa.compareEndPoints("EndToStart",_f9)===1){return true;}}}}return false;};this.getBookmark=function(){var bm,rg,tg,sel=doc.selection,cf=_d7.curNode;if(doc.getSelection){sel=win.getSelection();if(sel){if(sel.isCollapsed){tg=cf?cf.tagName:"";if(tg){tg=tg.toLowerCase();if(tg=="textarea"||(tg=="input"&&(!cf.type||cf.type.toLowerCase()=="text"))){sel={start:cf.selectionStart,end:cf.selectionEnd,node:cf,pRange:true};return {isCollapsed:(sel.end<=sel.start),mark:sel};}}bm={isCollapsed:true};if(sel.rangeCount){bm.mark=sel.getRangeAt(0).cloneRange();}}else{rg=sel.getRangeAt(0);bm={isCollapsed:false,mark:rg.cloneRange()};}}}else{if(sel){tg=cf?cf.tagName:"";tg=tg.toLowerCase();if(cf&&tg&&(tg=="button"||tg=="textarea"||tg=="input")){if(sel.type&&sel.type.toLowerCase()=="none"){return {isCollapsed:true,mark:null};}else{rg=sel.createRange();return {isCollapsed:rg.text&&rg.text.length?false:true,mark:{range:rg,pRange:true}};}}bm={};try{rg=sel.createRange();bm.isCollapsed=!(sel.type=="Text"?rg.htmlText.length:rg.length);}catch(e){bm.isCollapsed=true;return bm;}if(sel.type.toUpperCase()=="CONTROL"){if(rg.length){bm.mark=[];var i=0,len=rg.length;while(i>1))-bb.w)}[_11a.charAt(1)],_121={"T":pos.y,"B":pos.y-bb.h,"M":Math.max(view.t,Math.min(view.t+view.h,pos.y+(bb.h>>1))-bb.h)}[_11a.charAt(0)],_122=Math.max(view.l,_120),_123=Math.max(view.t,_121),endX=Math.min(view.l+view.w,_120+bb.w),endY=Math.min(view.t+view.h,_121+bb.h),_124=endX-_122,_125=endY-_123;_11b+=(bb.w-_124)+(bb.h-_125);if(best==null||_11b>1)}[_13e.charAt(1)],y:{"T":y,"B":y+_13c,"M":y+(_13c>>1)}[_13e.charAt(0)]}});};_10f.forEach(_12e,function(pos){var ltr=_12f;switch(pos){case "above-centered":push("TM","BM");break;case "below-centered":push("BM","TM");break;case "after-centered":ltr=!ltr;case "before-centered":push(ltr?"ML":"MR",ltr?"MR":"ML");break;case "after":ltr=!ltr;case "before":push(ltr?"TL":"TR",ltr?"TR":"TL");push(ltr?"BL":"BR",ltr?"BR":"BL");break;case "below-alt":ltr=!ltr;case "below":push(ltr?"BL":"BR",ltr?"TL":"TR");push(ltr?"BR":"BL",ltr?"TR":"TL");break;case "above-alt":ltr=!ltr;case "above":push(ltr?"TL":"TR",ltr?"BL":"BR");push(ltr?"TR":"TL",ltr?"BR":"BL");break;default:push(pos.aroundCorner,pos.corner);}});var _140=_115(node,_13d,_130,{w:_13b,h:_13c});_140.aroundNodePos=_131;return _140;}};return _114.place=_127;});},"dijit/Viewport":function(){define(["dojo/Evented","dojo/on","dojo/domReady","dojo/sniff","dojo/window"],function(_141,on,_142,has,_143){var _144=new _141();var _145;_142(function(){var _146=_143.getBox();_144._rlh=on(window,"resize",function(){var _147=_143.getBox();if(_146.h==_147.h&&_146.w==_147.w){return;}_146=_147;_144.emit("resize");});if(has("ie")==8){var _148=screen.deviceXDPI;setInterval(function(){if(screen.deviceXDPI!=_148){_148=screen.deviceXDPI;_144.emit("resize");}},500);}if(has("ios")){on(document,"focusin",function(evt){_145=evt.target;});on(document,"focusout",function(evt){_145=null;});}});_144.getEffectiveBox=function(doc){var box=_143.getBox(doc);var tag=_145&&_145.tagName&&_145.tagName.toLowerCase();if(has("ios")&&_145&&!_145.readOnly&&(tag=="textarea"||(tag=="input"&&/^(color|email|number|password|search|tel|text|url)$/.test(_145.type)))){box.h*=(orientation==0||orientation==180?0.66:0.4);var rect=_145.getBoundingClientRect();box.h=Math.max(box.h,rect.top+rect.height);}return box;};return _144;});},"dijit/_base/popup":function(){define(["dojo/dom-class","dojo/_base/window","../popup","../BackgroundIframe"],function(_149,win,_14a){var _14b=_14a._createWrapper;_14a._createWrapper=function(_14c){if(!_14c.declaredClass){_14c={_popupWrapper:(_14c.parentNode&&_149.contains(_14c.parentNode,"dijitPopup"))?_14c.parentNode:null,domNode:_14c,destroy:function(){},ownerDocument:_14c.ownerDocument,ownerDocumentBody:win.body(_14c.ownerDocument)};}return _14b.call(this,_14c);};var _14d=_14a.open;_14a.open=function(args){if(args.orient&&typeof args.orient!="string"&&!("length" in args.orient)){var ary=[];for(var key in args.orient){ary.push({aroundCorner:key,corner:args.orient[key]});}args.orient=ary;}return _14d.call(this,args);};return _14a;});},"dijit/popup":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dojo/has","dojo/keys","dojo/_base/lang","dojo/on","./place","./BackgroundIframe","./Viewport","./main","dojo/touch"],function(_14e,_14f,_150,dom,_151,_152,_153,_154,has,keys,lang,on,_155,_156,_157,_158){function _159(){if(this._popupWrapper){_152.destroy(this._popupWrapper);delete this._popupWrapper;}};var _15a=_150(null,{_stack:[],_beginZIndex:1000,_idGen:1,_repositionAll:function(){if(this._firstAroundNode){var _15b=this._firstAroundPosition,_15c=_153.position(this._firstAroundNode,true),dx=_15c.x-_15b.x,dy=_15c.y-_15b.y;if(dx||dy){this._firstAroundPosition=_15c;for(var i=0;i0&&_165[pi].parent===_165[pi-1].widget;pi--){}return _165[pi];},open:function(args){var _166=this._stack,_167=args.popup,node=_167.domNode,_168=args.orient||["below","below-alt","above","above-alt"],ltr=args.parent?args.parent.isLeftToRight():_153.isBodyLtr(_167.ownerDocument),_169=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+this._idGen++);while(_166.length&&(!args.parent||!dom.isDescendant(args.parent.domNode,_166[_166.length-1].widget.domNode))){this.close(_166[_166.length-1].widget);}var _16a=this.moveOffScreen(_167);if(_167.startup&&!_167._started){_167.startup();}var _16b,_16c=_153.position(node);if("maxHeight" in args&&args.maxHeight!=-1){_16b=args.maxHeight||Infinity;}else{var _16d=_157.getEffectiveBox(this.ownerDocument),_16e=_169?_153.position(_169,false):{y:args.y-(args.padding||0),h:(args.padding||0)*2};_16b=Math.floor(Math.max(_16e.y,_16d.h-(_16e.y+_16e.h)));}if(_16c.h>_16b){var cs=_154.getComputedStyle(node),_16f=cs.borderLeftWidth+" "+cs.borderLeftStyle+" "+cs.borderLeftColor;_154.set(_16a,{overflowY:"scroll",height:_16b+"px",border:_16f});node._originalStyle=node.style.cssText;node.style.border="none";}_151.set(_16a,{id:id,style:{zIndex:this._beginZIndex+_166.length},"class":"dijitPopup "+(_167.baseClass||_167["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:args.parent?args.parent.id:""});if(_166.length==0&&_169){this._firstAroundNode=_169;this._firstAroundPosition=_153.position(_169,true);this._aroundMoveListener=setTimeout(lang.hitch(this,"_repositionAll"),50);}if(has("config-bgIframe")&&!_167.bgIframe){_167.bgIframe=new _156(_16a);}var _170=_167.orient?lang.hitch(_167,"orient"):null,best=_169?_155.around(_16a,_169,_168,ltr,_170):_155.at(_16a,args,_168=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding,_170);_16a.style.visibility="visible";node.style.visibility="visible";var _171=[];_171.push(on(_16a,"keydown",lang.hitch(this,function(evt){if(evt.keyCode==keys.ESCAPE&&args.onCancel){evt.stopPropagation();evt.preventDefault();args.onCancel();}else{if(evt.keyCode==keys.TAB){evt.stopPropagation();evt.preventDefault();var _172=this.getTopPopup();if(_172&&_172.onCancel){_172.onCancel();}}}})));if(_167.onCancel&&args.onCancel){_171.push(_167.on("cancel",args.onCancel));}_171.push(_167.on(_167.onExecute?"execute":"change",lang.hitch(this,function(){var _173=this.getTopPopup();if(_173&&_173.onExecute){_173.onExecute();}})));_166.push({widget:_167,wrapper:_16a,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_171});if(_167.onOpen){_167.onOpen(best);}return best;},close:function(_174){var _175=this._stack;while((_174&&_14e.some(_175,function(elem){return elem.widget==_174;}))||(!_174&&_175.length)){var top=_175.pop(),_176=top.widget,_177=top.onClose;if(_176.bgIframe){_176.bgIframe.destroy();delete _176.bgIframe;}if(_176.onClose){_176.onClose();}var h;while(h=top.handlers.pop()){h.remove();}if(_176&&_176.domNode){this.hide(_176);}if(_177){_177();}}if(_175.length==0&&this._aroundMoveListener){clearTimeout(this._aroundMoveListener);this._firstAroundNode=this._firstAroundPosition=this._aroundMoveListener=null;}}});return (_158.popup=new _15a());});},"dijit/BackgroundIframe":function(){define(["require","./main","dojo/_base/config","dojo/dom-construct","dojo/dom-style","dojo/_base/lang","dojo/on","dojo/sniff"],function(_178,_179,_17a,_17b,_17c,lang,on,has){has.add("config-bgIframe",(has("ie")||has("trident"))&&!/IEMobile\/10\.0/.test(navigator.userAgent));var _17d=new function(){var _17e=[];this.pop=function(){var _17f;if(_17e.length){_17f=_17e.pop();_17f.style.display="";}else{if(has("ie")<9){var burl=_17a["dojoBlankHtmlUrl"]||_178.toUrl("dojo/resources/blank.html")||"javascript:\"\"";var html="