import { createAllQueryView, AXPEntityQueryType, AXPEntityCommandScope, AXP_APP_VERSION_PROVIDER, AXPSettingService, AXP_MENU_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER, AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER } from '@acorex/platform/common';
import * as i3 from '@acorex/platform/layout/components';
import { AXPComponentSlotModule } from '@acorex/platform/layout/components';
import { AXMEntityCrudServiceImpl, entityMasterCrudActions, entityMasterRecordActions, AXPEntityService, AXP_ENTITY_DEFINITION_LOADER } from '@acorex/platform/layout/entity';
import * as i2$2 from '@acorex/platform/workflow';
import { AXPWorkflowService, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
import * as i0 from '@angular/core';
import { Injectable, inject, Component, Input, NgModule, Injector } from '@angular/core';
import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
import * as i4 from '@acorex/components/button';
import { AXButtonModule } from '@acorex/components/button';
import * as i2 from '@acorex/components/check-box';
import { AXCheckBoxModule } from '@acorex/components/check-box';
import * as i2$1 from '@acorex/components/decorators';
import { AXDecoratorModule } from '@acorex/components/decorators';
import * as i1 from '@acorex/components/label';
import { AXLabelModule } from '@acorex/components/label';
import { AXBasePageComponent } from '@acorex/components/page';
import * as i6 from '@acorex/core/translation';
import { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';
import * as i5 from '@angular/common';
import { CommonModule } from '@angular/common';
import { DomSanitizer } from '@angular/platform-browser';
import { AXPopupService } from '@acorex/components/popup';
import { AXPPlatformScope, objectKeyValueTransforms } from '@acorex/platform/core';
import { AXDialogService } from '@acorex/components/dialog';
import { SwUpdate } from '@angular/service-worker';
import { AXPSessionService } from '@acorex/platform/auth';
import { firstValueFrom } from 'rxjs';

const config = {
    i18n: 'platform-management',
};
const RootConfig = {
    config,
    module: {
        route: 'platform-management',
        name: 'PlatformManagement',
        title: `t('platformManagement', {scope:"${config.i18n}"})`,
        icon: 'fa-light fa-cogs',
    },
    entities: {
        localizationManagement: {
            name: 'Localization Management',
            title: `t("localization-management", {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-globe',
        },
        globalVariable: {
            name: 'GlobalVariables',
            title: `t("variables", {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-object-exclude',
        },
        appVersion: {
            name: 'app-version',
            title: `t("appVersion", {scope:"${config.i18n}"})`,
            titlePlural: `t("appVersionPlural", {scope:"${config.i18n}"})`,
            icon: 'fa-light fa-code-branch',
        },
    },
};

class AXMGlobalVariablesService extends AXMEntityCrudServiceImpl {
}
class AXMGlobalVariablesServiceImpl extends AXMEntityCrudServiceImpl {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.globalVariable.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMGlobalVariablesServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMGlobalVariablesServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMGlobalVariablesServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

async function globalVariableEntityFactory(injector) {
    const dataService = injector.get(AXMGlobalVariablesService);
    const i18n = RootConfig.config.i18n;
    const entityDef = {
        module: RootConfig.module.name,
        name: RootConfig.entities.globalVariable.name,
        title: RootConfig.entities.globalVariable.title,
        icon: RootConfig.entities.globalVariable.icon,
        formats: {
            individual: 'Global Variable',
            plural: 'Global Variables',
        },
        relatedEntities: [],
        groups: [
            {
                id: 'section',
                title: 'Global Variable',
            },
        ],
        properties: [
            {
                name: 'name',
                title: '@general:terms.common.name',
                groupId: 'section',
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsCatalog.text,
                    },
                },
                validations: [
                    {
                        rule: 'required',
                    },
                ],
                options: {
                    filter: {
                        inline: {
                            enabled: true,
                        },
                    },
                    sort: {
                        enabled: true,
                    },
                },
            },
            {
                name: 'title',
                title: '@general:terms.common.title',
                groupId: 'section',
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsCatalog.text,
                    },
                },
                validations: [
                    {
                        rule: 'required',
                    },
                ],
                options: {
                    filter: {
                        inline: {
                            enabled: true,
                        },
                    },
                    sort: {
                        enabled: true,
                    },
                },
            },
            {
                name: 'value',
                title: `t("value", { scope: "${i18n}" })`,
                groupId: 'section',
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsCatalog.text,
                    },
                },
                validations: [
                    {
                        rule: 'required',
                    },
                ],
            },
            {
                name: 'dataType',
                title: `t("dataType", { scope: "${i18n}" })`,
                groupId: 'section',
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsCatalog.select,
                        options: {
                            valueField: 'name',
                            textField: 'title',
                            dataSource: [
                                { title: 'String', name: 'String' },
                                { title: 'Integer', name: 'integer' },
                                { title: 'Date Time', name: 'dateTime' },
                                { title: 'Boolean', name: 'boolean' },
                                { title: 'Function', name: 'function' },
                                { title: 'Custom', name: 'custom' },
                            ],
                            direction: 'horizontal',
                            multiple: false,
                        },
                    },
                },
                validations: [
                    {
                        rule: 'required',
                    },
                ],
                options: {
                    filter: {
                        advance: {
                            enabled: true,
                        },
                    },
                    sort: {
                        enabled: true,
                    },
                },
            },
        ],
        columns: [{ name: 'title' }, { name: 'dataType' }, { name: 'value' }],
        commands: {
            create: {
                execute: async (data) => {
                    return Promise.resolve({ id: await dataService.insertOne(data) });
                },
            },
            delete: {
                execute: async (id) => {
                    await await dataService.deleteOne(id);
                    return Promise.resolve();
                },
            },
            update: {
                execute: async (data) => {
                    return new Promise((resolve) => {
                        setTimeout(async () => {
                            await dataService.updateOne(data.id, data);
                            resolve(data);
                        }, 1000);
                    });
                },
            },
        },
        queries: {
            byKey: {
                execute: async (id) => {
                    return new Promise((resolve) => {
                        setTimeout(async () => {
                            const entity = await dataService.getOne(id);
                            resolve(entity);
                        }, 500);
                    });
                },
                type: AXPEntityQueryType.Single,
            },
            list: {
                execute: async (e) => {
                    const x = await dataService.query(e);
                    console.log(x);
                    return x;
                },
                type: AXPEntityQueryType.List,
            },
        },
        interfaces: {
            master: {
                create: {
                    sections: [
                        {
                            id: 'section',
                        },
                    ],
                    properties: [
                        {
                            name: 'title',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 6,
                                    },
                                },
                            },
                        },
                        {
                            name: 'name',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 6,
                                    },
                                },
                            },
                        },
                        {
                            name: 'value',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 6,
                                    },
                                },
                            },
                        },
                        {
                            name: 'dataType',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 6,
                                    },
                                },
                            },
                        },
                    ],
                },
                update: {
                    sections: [
                        {
                            id: 'section',
                        },
                    ],
                    properties: [
                        {
                            name: 'title',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 6,
                                    },
                                },
                            },
                        },
                        {
                            name: 'name',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 6,
                                    },
                                },
                            },
                        },
                        {
                            name: 'value',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 6,
                                    },
                                },
                            },
                        },
                        {
                            name: 'dataType',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 6,
                                    },
                                },
                            },
                        },
                    ],
                },
                single: {
                    title: '{{title}}',
                    sections: [
                        {
                            id: 'section',
                        },
                    ],
                    properties: [
                        {
                            name: 'title',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 6,
                                    },
                                },
                            },
                        },
                        {
                            name: 'name',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 6,
                                    },
                                },
                            },
                        },
                        {
                            name: 'value',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 6,
                                    },
                                },
                            },
                        },
                        {
                            name: 'dataType',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 6,
                                    },
                                },
                            },
                        },
                    ],
                    actions: [...entityMasterRecordActions()],
                },
                list: {
                    actions: [...entityMasterCrudActions()],
                    views: [createAllQueryView()],
                },
            },
        },
    };
    return entityDef;
}

class AXMAppVersionService extends AXMEntityCrudServiceImpl {
}
class AXMAppVersionServiceImpl extends AXMEntityCrudServiceImpl {
    constructor() {
        super(`${RootConfig.module.name}.${RootConfig.entities.appVersion.name}`);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMAppVersionServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMAppVersionServiceImpl }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMAppVersionServiceImpl, decorators: [{
            type: Injectable
        }], ctorParameters: () => [] });

async function appVersionEntityEntityFactory(injector) {
    const dataService = injector.get(AXMAppVersionService);
    const i18n = RootConfig.config.i18n;
    const entityDef = {
        module: RootConfig.module.name,
        name: RootConfig.entities.appVersion.name,
        title: RootConfig.entities.appVersion.title,
        icon: RootConfig.entities.appVersion.icon,
        formats: {
            individual: RootConfig.entities.appVersion.title,
            plural: RootConfig.entities.appVersion.title,
            searchResult: {
                title: '{{ versionNumber }}',
                description: RootConfig.module.title,
            },
        },
        relatedEntities: [],
        groups: [
            {
                id: 'section',
                title: RootConfig.entities.appVersion.title,
            },
        ],
        properties: [
            {
                name: 'versionNumber',
                title: `t("versionNumber", { scope: "${i18n}" })`,
                groupId: 'section',
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsCatalog.text,
                    },
                },
                options: {
                    filter: {
                        advance: {
                            enabled: true,
                        },
                        inline: {
                            enabled: true,
                        },
                    },
                    sort: {
                        enabled: true,
                    },
                },
                validations: [
                    {
                        rule: 'required',
                    },
                ],
            },
            {
                name: 'changeLog',
                title: `t("changeLogs", { scope: "${i18n}" })`,
                groupId: 'section',
                schema: {
                    dataType: 'string',
                    interface: {
                        type: AXPWidgetsCatalog.richText,
                        options: {
                            minLineCount: 5,
                            maxLineCount: 17,
                            isFitLine: true,
                        },
                    },
                },
                validations: [
                    {
                        rule: 'required',
                    },
                ],
            },
            {
                name: 'publishDate',
                title: `t("publishDate", { scope: "${i18n}" })`,
                groupId: 'section',
                schema: {
                    dataType: 'dateTime',
                    interface: {
                        type: AXPWidgetsCatalog.dateTime,
                    },
                },
                options: {
                    filter: {
                        advance: {
                            enabled: true,
                        },
                    },
                    sort: {
                        enabled: true,
                    },
                },
                validations: [
                    {
                        rule: 'required',
                    },
                ],
            },
            {
                name: 'showFirstTimePopup',
                title: `t("notifyUser", { scope: "${i18n}" })`,
                groupId: 'section',
                schema: {
                    dataType: 'boolean',
                    interface: {
                        type: AXPWidgetsCatalog.checkbox,
                    },
                },
            },
        ],
        columns: [
            { name: 'versionNumber' },
            { name: 'changeLog' },
            { name: 'publishDate' },
            { name: 'showFirstTimePopup' },
        ],
        commands: {
            create: {
                execute: async (data) => {
                    return Promise.resolve({ id: await dataService.insertOne(data) });
                },
            },
            delete: {
                execute: async (id) => {
                    await await dataService.deleteOne(id);
                    return Promise.resolve();
                },
            },
            update: {
                execute: async (data) => {
                    return new Promise((resolve) => {
                        setTimeout(async () => {
                            await dataService.updateOne(data.id, data);
                            resolve(data);
                        }, 1000);
                    });
                },
            },
        },
        queries: {
            byKey: {
                execute: async (id) => {
                    return new Promise((resolve) => {
                        setTimeout(async () => {
                            const entity = await dataService.getOne(id);
                            resolve(entity);
                        }, 500);
                    });
                },
                type: AXPEntityQueryType.Single,
            },
            list: {
                execute: async (e) => {
                    console.log(e);
                    const x = await dataService.query(e);
                    return x;
                },
                type: AXPEntityQueryType.List,
            },
        },
        interfaces: {
            master: {
                create: {
                    sections: [
                        {
                            id: 'section',
                        },
                    ],
                    properties: [
                        {
                            name: 'versionNumber',
                            layout: {
                                positions: {
                                    lg: {
                                        order: 1,
                                        colSpan: 4,
                                    },
                                },
                            },
                        },
                        {
                            name: 'publishDate',
                            layout: {
                                positions: {
                                    lg: {
                                        order: 2,
                                        colSpan: 4,
                                    },
                                },
                            },
                        },
                        {
                            name: 'showFirstTimePopup',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 4,
                                        order: 3,
                                    },
                                },
                            },
                        },
                        {
                            name: 'changeLog',
                            layout: {
                                positions: {
                                    lg: {
                                        order: 10,
                                        colSpan: 12,
                                    },
                                },
                            },
                        },
                    ],
                },
                update: {
                    sections: [
                        {
                            id: 'section',
                        },
                    ],
                    properties: [
                        {
                            name: 'versionNumber',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 4,
                                        order: 1,
                                    },
                                },
                            },
                        },
                        {
                            name: 'publishDate',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 4,
                                        order: 2,
                                    },
                                },
                            },
                        },
                        {
                            name: 'showFirstTimePopup',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 4,
                                        order: 3,
                                    },
                                },
                            },
                        },
                        {
                            name: 'changeLog',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 12,
                                        order: 4,
                                    },
                                },
                            },
                        },
                    ],
                },
                single: {
                    title: '{{versionNumber}}',
                    sections: [
                        {
                            id: 'section',
                        },
                    ],
                    properties: [
                        {
                            name: 'versionNumber',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 4,
                                    },
                                },
                            },
                        },
                        {
                            name: 'publishDate',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 4,
                                    },
                                },
                            },
                        },
                        {
                            name: 'showFirstTimePopup',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 4,
                                    },
                                },
                            },
                        },
                        {
                            name: 'changeLog',
                            layout: {
                                positions: {
                                    lg: {
                                        colSpan: 8,
                                    },
                                },
                            },
                        },
                    ],
                    actions: [],
                },
                list: {
                    actions: [
                        {
                            title: 'Create New',
                            command: 'create-entity',
                            priority: 'primary',
                            type: 'create',
                            scope: AXPEntityCommandScope.TypeLevel,
                        },
                        {
                            title: 'Delete Items',
                            command: 'delete-entity',
                            priority: 'primary',
                            type: 'delete',
                            scope: AXPEntityCommandScope.Selected,
                        },
                        {
                            title: 'Details',
                            command: 'open-entity',
                            priority: 'secondary',
                            type: 'view',
                            scope: AXPEntityCommandScope.Individual,
                        },
                        {
                            title: 'Delete',
                            command: 'delete-entity',
                            priority: 'secondary',
                            type: 'delete',
                            scope: AXPEntityCommandScope.Individual,
                        },
                    ],
                    views: [createAllQueryView({ sorts: [{ name: 'versionNumber', dir: 'desc' }] })],
                },
            },
        },
    };
    return entityDef;
}

class AXMNotifyAppComponent extends AXBasePageComponent {
    constructor() {
        super(...arguments);
        this.isShowAgain = true;
        this.sanitize = inject(DomSanitizer);
    }
    ngOnInit() {
        super.ngOnInit();
        this.safeData = this.sanitize.bypassSecurityTrustHtml(this.data.changeLog);
    }
    send() {
        this.close({ data: this.data, isShowAgain: !this.isShowAgain });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMNotifyAppComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXMNotifyAppComponent, isStandalone: true, selector: "axm-notify-app", usesInheritance: true, ngImport: i0, template: "<ax-content class=\"ax-block ax-px-4 ax-py-4 ax-text-base/6\" [innerHTML]=\"safeData\"></ax-content>\n<ax-footer class=\"ax-flex ax-items-center ax-justify-between ax-p-2\">\n  <ax-check-box [(value)]=\"isShowAgain\">\n    <ax-label>Don't Show Again</ax-label>\n  </ax-check-box>\n  <ax-button color=\"primary\" (click)=\"send()\" [text]=\"'@general:actions.ok.title' | translate | async\"></ax-button>\n</ax-footer>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i2.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2$1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i4.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMNotifyAppComponent, decorators: [{
            type: Component,
            args: [{ selector: 'axm-notify-app', imports: [CommonModule, AXLabelModule, AXCheckBoxModule, AXDecoratorModule, AXButtonModule, AXTranslationModule], template: "<ax-content class=\"ax-block ax-px-4 ax-py-4 ax-text-base/6\" [innerHTML]=\"safeData\"></ax-content>\n<ax-footer class=\"ax-flex ax-items-center ax-justify-between ax-p-2\">\n  <ax-check-box [(value)]=\"isShowAgain\">\n    <ax-label>Don't Show Again</ax-label>\n  </ax-check-box>\n  <ax-button color=\"primary\" (click)=\"send()\" [text]=\"'@general:actions.ok.title' | translate | async\"></ax-button>\n</ax-footer>\n" }]
        }] });

var notifyApp_component = /*#__PURE__*/Object.freeze({
    __proto__: null,
    AXMNotifyAppComponent: AXMNotifyAppComponent
});

class AXMAppVersionSlotComponent {
    constructor() {
        this.versionProvider = inject(AXP_APP_VERSION_PROVIDER);
        this.workflowService = inject(AXPWorkflowService);
        this.versionNumber = '';
    }
    async ngOnInit() {
        this.versionNumber = (await this.versionProvider.provider()).version;
    }
    openPopup() {
        this.workflowService.execute('show-release-notes');
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMAppVersionSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXMAppVersionSlotComponent, isStandalone: true, selector: "ng-component", inputs: { text: "text" }, ngImport: i0, template: ` <small class="ax-text-sm ax-cursor-pointer" (click)="openPopup()">{{ versionNumber }}</small> `, isInline: true }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMAppVersionSlotComponent, decorators: [{
            type: Component,
            args: [{
                    template: ` <small class="ax-text-sm ax-cursor-pointer" (click)="openPopup()">{{ versionNumber }}</small> `,
                    standalone: true,
                }]
        }], propDecorators: { text: [{
                type: Input
            }] } });

class AppVersionCheckService {
    constructor() {
        this.versionProvider = inject(AXP_APP_VERSION_PROVIDER);
        this.settingsService = inject(AXPSettingService);
        this.workflowService = inject(AXPWorkflowService);
        this.appVersionService = inject(AXMAppVersionService);
    }
    async checkVersion() {
        const current = (await this.versionProvider.provider()).version;
        const initVersion = await this.settingsService.scope(AXPPlatformScope.User).get(`init-application-version`);
        if (initVersion == null) {
            await this.settingsService.scope(AXPPlatformScope.User).set(`init-application-version`, current);
        }
        else {
            const versions = await this.appVersionService.query();
            for (const v of versions.items) {
                if (v.versionNumber == current && v.versionNumber != initVersion) {
                    const isSee = await this.settingsService
                        .scope(AXPPlatformScope.User)
                        .get(`is-see-check-version-${v.versionNumber}`);
                    if (!isSee) {
                        setTimeout(() => {
                            this.workflowService.execute('show-what-is-new', v);
                        }, 300);
                    }
                }
            }
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AppVersionCheckService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AppVersionCheckService }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AppVersionCheckService, decorators: [{
            type: Injectable
        }] });

class AXMChangeLogPopupAction extends AXPWorkflowAction {
    constructor() {
        super(...arguments);
        this.popupService = inject(AXPopupService);
    }
    async execute(context) {
        const data = context.getVariable();
        const comp = (await Promise.resolve().then(function () { return notifyApp_component; })).AXMNotifyAppComponent;
        const result = await this.popupService.open(comp, {
            title: `New Features in Version ${data.versionNumber}`,
            data: { data },
        });
        if (result.data?.isShowAgain) {
            context.setOutput('result', false);
        }
        else {
            context.setOutput('result', true);
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMChangeLogPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMChangeLogPopupAction }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMChangeLogPopupAction, decorators: [{
            type: Injectable
        }] });
class AXMChangeLogUpdateSettingAction extends AXPWorkflowAction {
    constructor() {
        super(...arguments);
        this.settingService = inject(AXPSettingService);
    }
    async execute(context) {
        const data = context.getVariable();
        if (context.getOutput('result')) {
            await this.settingService.scope(AXPPlatformScope.User).set(`is-see-check-version-${data.versionNumber}`, true);
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMChangeLogUpdateSettingAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMChangeLogUpdateSettingAction }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMChangeLogUpdateSettingAction, decorators: [{
            type: Injectable
        }] });
const AXMWhatsNewWorkflow = {
    startStepId: 'show-popup',
    steps: {
        'show-popup': {
            action: 'AXMChangeLogPopupAction',
            nextSteps: [
                {
                    conditions: [{ type: 'SINGLE', expression: 'context.getOutput("result") == true' }],
                    nextStepId: 'first-time-add-to-setting',
                },
            ],
        },
        'first-time-add-to-setting': {
            action: 'AXMChangeLogUpdateSettingAction',
        },
    },
};
class AXMCheckNewVersionAction extends AXPWorkflowAction {
    constructor() {
        super(...arguments);
        this.appVersionCheckService = inject(AppVersionCheckService);
        this.settingService = inject(AXPSettingService);
    }
    async execute(context) {
        const shouldShow = await this.settingService.scope(AXPPlatformScope.User).get(`general:startup:release-notes`);
        if (shouldShow == false) {
            return;
        }
        await this.appVersionCheckService.checkVersion();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCheckNewVersionAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCheckNewVersionAction }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMCheckNewVersionAction, decorators: [{
            type: Injectable
        }] });
const AXMCheckNewVersionWorkflow = {
    startStepId: 'check-new-version',
    steps: {
        'check-new-version': {
            action: 'AXMCheckNewVersionAction',
        },
    },
};

class AXMGlobalVariableEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMGlobalVariableEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMGlobalVariableEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMGlobalVariableEntityModule, providers: [
            {
                provide: AXMGlobalVariablesService,
                useClass: AXMGlobalVariablesServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMGlobalVariableEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [],
                    exports: [],
                    declarations: [],
                    providers: [
                        {
                            provide: AXMGlobalVariablesService,
                            useClass: AXMGlobalVariablesServiceImpl,
                        },
                    ],
                }]
        }] });

class AXMAppVersionEntityModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMAppVersionEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMAppVersionEntityModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMAppVersionEntityModule, providers: [
            {
                provide: AXMAppVersionService,
                useClass: AXMAppVersionServiceImpl,
            },
        ] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMAppVersionEntityModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [],
                    exports: [],
                    declarations: [],
                    providers: [
                        {
                            provide: AXMAppVersionService,
                            useClass: AXMAppVersionServiceImpl,
                        },
                    ],
                }]
        }] });

// Entity Services

var index = /*#__PURE__*/Object.freeze({
    __proto__: null,
    AXMAppVersionEntityModule: AXMAppVersionEntityModule,
    AXMAppVersionService: AXMAppVersionService,
    AXMAppVersionServiceImpl: AXMAppVersionServiceImpl,
    AXMAppVersionSlotComponent: AXMAppVersionSlotComponent,
    AXMChangeLogPopupAction: AXMChangeLogPopupAction,
    AXMChangeLogUpdateSettingAction: AXMChangeLogUpdateSettingAction,
    AXMCheckNewVersionAction: AXMCheckNewVersionAction,
    AXMCheckNewVersionWorkflow: AXMCheckNewVersionWorkflow,
    AXMGlobalVariableEntityModule: AXMGlobalVariableEntityModule,
    AXMGlobalVariablesService: AXMGlobalVariablesService,
    AXMGlobalVariablesServiceImpl: AXMGlobalVariablesServiceImpl,
    AXMNotifyAppComponent: AXMNotifyAppComponent,
    AXMWhatsNewWorkflow: AXMWhatsNewWorkflow,
    appVersionEntityEntityFactory: appVersionEntityEntityFactory,
    globalVariableEntityFactory: globalVariableEntityFactory
});

class AXMEntityLoader {
    constructor() {
        this.injector = inject(Injector);
    }
    preload() {
        const module = RootConfig.module.name;
        return Array.from(Object.values(RootConfig.entities)).map((entity) => ({
            module: module,
            entity: entity.name,
        }));
    }
    async get(moduleName, entityName) {
        if (moduleName == RootConfig.module.name) {
            return new Promise(async (resolve) => {
                switch (entityName) {
                    case RootConfig.entities.globalVariable.name: {
                        const entity = (await Promise.resolve().then(function () { return index; })).globalVariableEntityFactory;
                        resolve(entity(this.injector));
                        break;
                    }
                    case RootConfig.entities.appVersion.name: {
                        const entity = (await Promise.resolve().then(function () { return index; })).appVersionEntityEntityFactory;
                        resolve(entity(this.injector));
                        break;
                    }
                    default:
                        resolve(null);
                }
            });
        }
        return null;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEntityLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEntityLoader }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMEntityLoader, decorators: [{
            type: Injectable
        }] });

class AXMShowReleaseNotesPopupAction extends AXPWorkflowAction {
    constructor() {
        super(...arguments);
        this.popupService = inject(AXPopupService);
    }
    async execute(context) {
        const scope = RootConfig.config.i18n;
        const comp = (await import('./acorex-modules-platform-management-list-version.component-DQ5ZNva8.mjs')).AXMListVersionComponent;
        this.popupService.open(comp, {
            title: `t('release-notes',{scope: "${scope}"})`,
        });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMShowReleaseNotesPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMShowReleaseNotesPopupAction }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMShowReleaseNotesPopupAction, decorators: [{
            type: Injectable
        }] });
const AXMShowReleaseNotesWorkflow = {
    startStepId: 'show-popup',
    steps: {
        'show-popup': {
            action: 'AXMShowReleaseNotesPopupAction',
        },
    },
};

/**
 * Global variable that returns current ISO date-time string.
 */
class AXMGlobalVariableProvider {
    constructor() {
        this.name = 'now';
        this.title = 'Now';
        this.description = 'Current date and time in ISO format';
    }
    execute() {
        return Promise.resolve(new Date().toISOString());
    }
}

var AXPReleaseNotesSettings;
(function (AXPReleaseNotesSettings) {
    AXPReleaseNotesSettings["ReleaseNotes"] = "general:startup:release-notes";
})(AXPReleaseNotesSettings || (AXPReleaseNotesSettings = {}));

class AXPReleaseNotesSettingProvider {
    constructor(injector) {
        this.injector = injector;
        this.translateService = this.injector.get(AXTranslationService);
    }
    async provide(context) {
        const trans = async (key) => await this.translateService.translateAsync(`@general:settings.${key}`);
        // Find the 'General Settings' group
        const group = context.group('general');
        if (!group) {
            return;
        }
        // Find the 'Startup' section
        const section = group.section('startup');
        if (!section) {
            return;
        }
        // Add the 'Release Notes' setting
        section.addSetting({
            key: AXPReleaseNotesSettings.ReleaseNotes,
            title: await trans('general.startup.release-notes.title'),
            scope: AXPPlatformScope.User,
            isInherited: true,
            defaultValue: false,
            valueTransforms: objectKeyValueTransforms('id'),
            widget: {
                type: AXPWidgetsCatalog.toggle,
                options: {
                    label: null,
                }
            },
            description: await trans('general.startup.release-notes.description'),
        });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPReleaseNotesSettingProvider, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPReleaseNotesSettingProvider }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPReleaseNotesSettingProvider, decorators: [{
            type: Injectable
        }], ctorParameters: () => [{ type: i0.Injector }] });

class AXPUpdaterService {
    constructor() {
        const swUpdate = inject(SwUpdate, { optional: true });
        const dialogService = inject(AXDialogService);
        const translateService = inject(AXTranslationService);
        if (swUpdate?.isEnabled) {
            swUpdate.versionUpdates.subscribe((event) => {
                if (event.type === 'VERSION_READY') {
                    console.log('New version available');
                    const scope = RootConfig.config.i18n;
                    const dialog = dialogService.open({
                        icon: 'fa-regular fa-info',
                        content: translateService.translateSync('updater.content', { scope: scope }),
                        title: translateService.translateSync('updater.title', { scope: scope }),
                        type: 'primary',
                        orientation: 'horizontal',
                        buttons: [
                            {
                                text: translateService.translateSync('updater.update', { scope: scope }),
                                color: 'primary',
                                onClick: async (e) => {
                                    try {
                                        document.location.reload();
                                        dialog.close();
                                    }
                                    catch (error) {
                                        console.error(error);
                                    }
                                },
                            },
                            {
                                text: translateService.translateSync('updater.cancel', { scope: scope }),
                                color: 'default',
                                autofocus: true,
                                onClick: (e) => {
                                    dialog.close();
                                },
                            },
                        ],
                        closeButton: false,
                    });
                }
            });
        }
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPUpdaterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPUpdaterService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXPUpdaterService, decorators: [{
            type: Injectable,
            args: [{ providedIn: 'root' }]
        }], ctorParameters: () => [] });

class AXMUpdaterModule {
    constructor(updaterService) {
        this.updaterService = updaterService;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMUpdaterModule, deps: [{ token: AXPUpdaterService }], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMUpdaterModule }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMUpdaterModule, providers: [AXPUpdaterService] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMUpdaterModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [],
                    exports: [],
                    declarations: [],
                    providers: [AXPUpdaterService],
                }]
        }], ctorParameters: () => [{ type: AXPUpdaterService }] });

const AXPPlatformManagementMenuKeys = {
    AdministrationGroup: 'administration:group',
    Root: 'platform-management:menu',
    GlobalVariables: 'platform-management:menu:global-variables',
    AppVersions: 'platform-management:menu:app-versions',
    Glossary: 'platform-management:menu:glossary',
};

class AXMMenuProvider {
    constructor() {
        this.entityService = inject(AXPEntityService);
        this.sessionService = inject(AXPSessionService);
    }
    async provide(context) {
        const scope = RootConfig.config.i18n;
        const isAuthorized = await firstValueFrom(this.sessionService.isAuthorized$);
        if (!isAuthorized) {
            return;
        }
        //#region ----   Administration Menu (Authorized Users)   ----
        context.addItems([
            {
                name: AXPPlatformManagementMenuKeys.AdministrationGroup,
                priority: 2000,
                text: `t('administration',{scope: "${scope}"})`,
                type: 'group',
                data: {
                    requiredPermission: 'platform',
                },
            },
            {
                name: AXPPlatformManagementMenuKeys.Root,
                text: `t('root-menu', {scope: "${scope}"})`,
                icon: 'fa-light fa-square-terminal',
                type: 'menu',
                priority: 200001,
                data: {
                    requiredPermission: 'platform',
                },
                children: [
                    // Most frequently used - Global Variables (daily configuration)
                    {
                        name: AXPPlatformManagementMenuKeys.GlobalVariables,
                        priority: 20000101,
                        text: RootConfig.entities.globalVariable.title,
                        path: this.entityService.createPath(RootConfig.module.name, RootConfig.entities.globalVariable.name),
                        icon: RootConfig.entities.globalVariable.icon,
                        data: {
                        // requiredPermission: '',
                        },
                    },
                    // moved glossary to content-management
                    {
                        name: AXPPlatformManagementMenuKeys.AppVersions,
                        priority: 9003,
                        text: RootConfig.entities.appVersion.title,
                        path: this.entityService.createPath(RootConfig.module.name, RootConfig.entities.appVersion.name),
                        icon: RootConfig.entities.appVersion.icon,
                        data: {
                        // requiredPermission: '',
                        },
                    },
                ],
            },
        ]);
        //#endregion
    }
}

class AXMPlatformManagementModule {
    /**
     * @ignore
     */
    constructor(appVersionCheck) { }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMPlatformManagementModule, deps: [{ token: AppVersionCheckService }], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: AXMPlatformManagementModule, imports: [AXMUpdaterModule,
            // Entity Modules
            AXMGlobalVariableEntityModule,
            AXMAppVersionEntityModule, i2$2.AXPWorkflowModule, i3.AXPComponentSlotModule] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMPlatformManagementModule, providers: [
            {
                provide: AXP_ENTITY_DEFINITION_LOADER,
                useClass: AXMEntityLoader,
                multi: true,
            },
            {
                provide: AXP_MENU_PROVIDER,
                useClass: AXMMenuProvider,
                multi: true,
            },
            {
                provide: AXP_SETTING_DEFINITION_PROVIDER,
                useClass: AXPReleaseNotesSettingProvider,
                multi: true,
            },
            {
                provide: AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER,
                useClass: AXMGlobalVariableProvider,
                multi: true,
            },
            AppVersionCheckService,
        ], imports: [AXMUpdaterModule,
            // Entity Modules
            AXMGlobalVariableEntityModule,
            AXMAppVersionEntityModule,
            AXPWorkflowModule.forChild({
                actions: {
                    AXMChangeLogPopupAction,
                    AXMChangeLogUpdateSettingAction,
                    //
                    AXMShowReleaseNotesPopupAction,
                    AXMCheckNewVersionAction,
                },
                workflows: {
                    'show-what-is-new': AXMWhatsNewWorkflow,
                    'show-release-notes': AXMShowReleaseNotesWorkflow,
                    'check-new-version': AXMCheckNewVersionWorkflow,
                },
            }),
            AXPComponentSlotModule.forChild({
                'side-menu-footer': [
                // {
                //   name: 'side-menu-footer',
                //   component: AXMPromotionSlotComponent,
                //   options: {
                //     location: 'side-menu-footer',
                //   },
                // },
                ],
                'side-menu-header': [
                // {
                //   name: 'side-menu-header',
                //   component: AXMPromotionSlotComponent,
                //   priority: 2,
                //   options: {
                //     location: 'side-menu-header',
                //   },
                // },
                ],
            })] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMPlatformManagementModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [
                        AXMUpdaterModule,
                        // Entity Modules
                        AXMGlobalVariableEntityModule,
                        AXMAppVersionEntityModule,
                        AXPWorkflowModule.forChild({
                            actions: {
                                AXMChangeLogPopupAction,
                                AXMChangeLogUpdateSettingAction,
                                //
                                AXMShowReleaseNotesPopupAction,
                                AXMCheckNewVersionAction,
                            },
                            workflows: {
                                'show-what-is-new': AXMWhatsNewWorkflow,
                                'show-release-notes': AXMShowReleaseNotesWorkflow,
                                'check-new-version': AXMCheckNewVersionWorkflow,
                            },
                        }),
                        AXPComponentSlotModule.forChild({
                            'side-menu-footer': [
                            // {
                            //   name: 'side-menu-footer',
                            //   component: AXMPromotionSlotComponent,
                            //   options: {
                            //     location: 'side-menu-footer',
                            //   },
                            // },
                            ],
                            'side-menu-header': [
                            // {
                            //   name: 'side-menu-header',
                            //   component: AXMPromotionSlotComponent,
                            //   priority: 2,
                            //   options: {
                            //     location: 'side-menu-header',
                            //   },
                            // },
                            ],
                        }),
                    ],
                    exports: [],
                    declarations: [],
                    providers: [
                        {
                            provide: AXP_ENTITY_DEFINITION_LOADER,
                            useClass: AXMEntityLoader,
                            multi: true,
                        },
                        {
                            provide: AXP_MENU_PROVIDER,
                            useClass: AXMMenuProvider,
                            multi: true,
                        },
                        {
                            provide: AXP_SETTING_DEFINITION_PROVIDER,
                            useClass: AXPReleaseNotesSettingProvider,
                            multi: true,
                        },
                        {
                            provide: AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER,
                            useClass: AXMGlobalVariableProvider,
                            multi: true,
                        },
                        AppVersionCheckService,
                    ],
                }]
        }], ctorParameters: () => [{ type: AppVersionCheckService }] });

// export * from './lib/features';

/**
 * Generated bundle index. Do not edit.
 */

export { AXMAppVersionEntityModule, AXMAppVersionService, AXMAppVersionServiceImpl, AXMAppVersionSlotComponent, AXMChangeLogPopupAction, AXMChangeLogUpdateSettingAction, AXMCheckNewVersionAction, AXMCheckNewVersionWorkflow, AXMGlobalVariableEntityModule, AXMGlobalVariablesService, AXMGlobalVariablesServiceImpl, AXMNotifyAppComponent, AXMPlatformManagementModule, AXMWhatsNewWorkflow, RootConfig, appVersionEntityEntityFactory, globalVariableEntityFactory };
//# sourceMappingURL=acorex-modules-platform-management.mjs.map
