import { distinct } from '../../../base/common/arrays.js';
import { Emitter } from '../../../base/common/event.js';
import { isObject, isUndefinedOrNull, isUndefined, isString } from '../../../base/common/types.js';
import { localizeWithPath } from '../../../nls.js';
import { getLanguageTagSettingPlainKey } from './configuration.js';
import { Extensions as Extensions$1 } from '../../jsonschemas/common/jsonContributionRegistry.js';
import { Registry } from '../../registry/common/platform.js';
const _moduleId = "vs/platform/configuration/common/configurationRegistry";
var EditPresentationTypes;
( ((function(EditPresentationTypes) {
    EditPresentationTypes["Multiline"] = "multilineText";
    EditPresentationTypes["Singleline"] = "singlelineText";
})(EditPresentationTypes || (EditPresentationTypes = {}))));
const Extensions = {
    Configuration: 'base.contributions.configuration'
};
var ConfigurationScope;
( ((function(ConfigurationScope) {
    ConfigurationScope[ConfigurationScope["APPLICATION"] = 1] = "APPLICATION";
    ConfigurationScope[ConfigurationScope["MACHINE"] = 2] = "MACHINE";
    ConfigurationScope[ConfigurationScope["WINDOW"] = 3] = "WINDOW";
    ConfigurationScope[ConfigurationScope["RESOURCE"] = 4] = "RESOURCE";
    ConfigurationScope[ConfigurationScope["LANGUAGE_OVERRIDABLE"] = 5] = "LANGUAGE_OVERRIDABLE";
    ConfigurationScope[ConfigurationScope["MACHINE_OVERRIDABLE"] = 6] = "MACHINE_OVERRIDABLE";
})(ConfigurationScope || (ConfigurationScope = {}))));
const allSettings = { properties: {}, patternProperties: {} };
const applicationSettings = { properties: {}, patternProperties: {} };
const machineSettings = { properties: {}, patternProperties: {} };
const machineOverridableSettings = { properties: {}, patternProperties: {} };
const windowSettings = { properties: {}, patternProperties: {} };
const resourceSettings = { properties: {}, patternProperties: {} };
const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';
const configurationDefaultsSchemaId = 'vscode://schemas/settings/configurationDefaults';
const contributionRegistry = ( (Registry.as(Extensions$1.JSONContribution)));
class ConfigurationRegistry {
    constructor() {
        this.overrideIdentifiers = ( (new Set()));
        this._onDidSchemaChange = ( (new Emitter()));
        this.onDidSchemaChange = this._onDidSchemaChange.event;
        this._onDidUpdateConfiguration = ( (new Emitter()));
        this.onDidUpdateConfiguration = this._onDidUpdateConfiguration.event;
        this.configurationDefaultsOverrides = ( (new Map()));
        this.defaultLanguageConfigurationOverridesNode = {
            id: 'defaultOverrides',
            title: ( localizeWithPath(_moduleId, 0, "Default Language Configuration Overrides")),
            properties: {}
        };
        this.configurationContributors = [this.defaultLanguageConfigurationOverridesNode];
        this.resourceLanguageSettingsSchema = {
            properties: {},
            patternProperties: {},
            additionalProperties: true,
            allowTrailingCommas: true,
            allowComments: true
        };
        this.configurationProperties = {};
        this.policyConfigurations = ( (new Map()));
        this.excludedConfigurationProperties = {};
        contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);
        this.registerOverridePropertyPatternKey();
    }
    registerConfiguration(configuration, validate = true) {
        this.registerConfigurations([configuration], validate);
    }
    registerConfigurations(configurations, validate = true) {
        const properties = ( (new Set()));
        this.doRegisterConfigurations(configurations, validate, properties);
        contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);
        this._onDidSchemaChange.fire();
        this._onDidUpdateConfiguration.fire({ properties });
    }
    deregisterConfigurations(configurations) {
        const properties = ( (new Set()));
        this.doDeregisterConfigurations(configurations, properties);
        contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);
        this._onDidSchemaChange.fire();
        this._onDidUpdateConfiguration.fire({ properties });
    }
    updateConfigurations({ add, remove }) {
        const properties = ( (new Set()));
        this.doDeregisterConfigurations(remove, properties);
        this.doRegisterConfigurations(add, false, properties);
        contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);
        this._onDidSchemaChange.fire();
        this._onDidUpdateConfiguration.fire({ properties });
    }
    registerDefaultConfigurations(configurationDefaults) {
        const properties = ( (new Set()));
        this.doRegisterDefaultConfigurations(configurationDefaults, properties);
        this._onDidSchemaChange.fire();
        this._onDidUpdateConfiguration.fire({ properties, defaultsOverrides: true });
    }
    doRegisterDefaultConfigurations(configurationDefaults, bucket) {
        const overrideIdentifiers = [];
        for (const { overrides, source } of configurationDefaults) {
            for (const key in overrides) {
                bucket.add(key);
                if (OVERRIDE_PROPERTY_REGEX.test(key)) {
                    const configurationDefaultOverride = this.configurationDefaultsOverrides.get(key);
                    const valuesSources = configurationDefaultOverride?.valuesSources ?? ( (new Map()));
                    const defaultValue = configurationDefaultOverride?.value || {};
                    for (const configuration of ( (Object.keys(overrides[key])))) {
                        const overrideValue = overrides[key][configuration];
                        const isObjectSetting = isObject(overrideValue) && (isUndefined(defaultValue[configuration]) || isObject(defaultValue[configuration]));
                        if (isObjectSetting) {
                            defaultValue[configuration] = { ...(defaultValue[configuration] ?? {}), ...overrideValue };
                            if (source) {
                                let objectConfigurationSources = valuesSources.get(configuration);
                                if (!objectConfigurationSources) {
                                    objectConfigurationSources = ( (new Map()));
                                    valuesSources.set(configuration, objectConfigurationSources);
                                }
                                if (!(objectConfigurationSources instanceof Map)) {
                                    console.error('objectConfigurationSources is not a Map');
                                    continue;
                                }
                                for (const objectKey in overrideValue) {
                                    objectConfigurationSources.set(objectKey, source);
                                }
                            }
                        }
                        else {
                            defaultValue[configuration] = overrideValue;
                            if (source) {
                                valuesSources.set(configuration, source);
                            }
                        }
                    }
                    this.configurationDefaultsOverrides.set(key, { source, value: defaultValue, valuesSources });
                    const plainKey = getLanguageTagSettingPlainKey(key);
                    const property = {
                        type: 'object',
                        default: defaultValue,
                        description: ( localizeWithPath(
                            _moduleId,
                            1,
                            "Configure settings to be overridden for the {0} language.",
                            plainKey
                        )),
                        $ref: resourceLanguageSettingsSchemaId,
                        defaultDefaultValue: defaultValue,
                        source: isString(source) ? undefined : source,
                        defaultValueSource: source
                    };
                    overrideIdentifiers.push(...overrideIdentifiersFromKey(key));
                    this.configurationProperties[key] = property;
                    this.defaultLanguageConfigurationOverridesNode.properties[key] = property;
                }
                else {
                    const property = this.configurationProperties[key];
                    const existingDefaultOverride = this.configurationDefaultsOverrides.get(key);
                    let existingDefaultValue = existingDefaultOverride?.value ?? property?.defaultDefaultValue;
                    let newDefaultValue = overrides[key];
                    let newDefaultValueSource = source;
                    const isObjectSetting = isObject(newDefaultValue) && (property !== undefined && property.type === 'object' ||
                        property === undefined && (isUndefined(existingDefaultValue) || isObject(existingDefaultValue)));
                    if (isObjectSetting) {
                        if (!isObject(existingDefaultValue)) {
                            existingDefaultValue = {};
                        }
                        newDefaultValue = { ...existingDefaultValue, ...newDefaultValue };
                        newDefaultValueSource = existingDefaultOverride?.source ?? ( (new Map()));
                        if (!(newDefaultValueSource instanceof Map)) {
                            console.error('defaultValueSource is not a Map');
                            continue;
                        }
                        for (const overrideObjectKey in overrides[key]) {
                            if (source) {
                                newDefaultValueSource.set(overrideObjectKey, source);
                            }
                            else {
                                newDefaultValueSource.delete(overrideObjectKey);
                            }
                        }
                    }
                    this.configurationDefaultsOverrides.set(key, { value: newDefaultValue, source: newDefaultValueSource });
                    if (property) {
                        this.updatePropertyDefaultValue(key, property);
                        this.updateSchema(key, property);
                    }
                }
            }
        }
        this.doRegisterOverrideIdentifiers(overrideIdentifiers);
    }
    deregisterDefaultConfigurations(defaultConfigurations) {
        const properties = ( (new Set()));
        this.doDeregisterDefaultConfigurations(defaultConfigurations, properties);
        this._onDidSchemaChange.fire();
        this._onDidUpdateConfiguration.fire({ properties, defaultsOverrides: true });
    }
    doDeregisterDefaultConfigurations(defaultConfigurations, bucket) {
        for (const { overrides, source } of defaultConfigurations) {
            for (const key in overrides) {
                const id = isString(source) ? source : source?.id;
                const configurationDefaultsOverride = this.configurationDefaultsOverrides.get(key);
                if (!configurationDefaultsOverride) {
                    continue;
                }
                if (OVERRIDE_PROPERTY_REGEX.test(key)) {
                    for (const configuration of ( (Object.keys(overrides[key])))) {
                        const overrideValue = overrides[key][configuration];
                        if (isObject(overrideValue)) {
                            const configurationSource = configurationDefaultsOverride.valuesSources?.get(configuration);
                            for (const overrideObjectKey of ( (Object.keys(overrideValue)))) {
                                const keySource = configurationSource?.get(overrideObjectKey);
                                const keySourceId = isString(keySource) ? keySource : keySource?.id;
                                if (keySourceId === id) {
                                    configurationSource?.delete(overrideObjectKey);
                                    delete configurationDefaultsOverride.value[configuration][overrideObjectKey];
                                }
                            }
                            if (( (Object.keys(configurationDefaultsOverride.value[configuration]))).length === 0) {
                                delete configurationDefaultsOverride.value[configuration];
                                configurationDefaultsOverride.valuesSources?.delete(configuration);
                            }
                        }
                        else {
                            const configurationSource = configurationDefaultsOverride.valuesSources?.get(configuration);
                            const keySourceId = isString(configurationSource) ? configurationSource : configurationSource?.id;
                            if (keySourceId === id) {
                                configurationDefaultsOverride.valuesSources?.delete(configuration);
                                delete configurationDefaultsOverride.value[configuration];
                            }
                        }
                    }
                    const languageValues = this.configurationDefaultsOverrides.get(key);
                    if (languageValues && ( (Object.keys(languageValues.value))).length === 0) {
                        this.configurationDefaultsOverrides.delete(key);
                        delete this.configurationProperties[key];
                        delete this.defaultLanguageConfigurationOverridesNode.properties[key];
                    }
                }
                else {
                    if (configurationDefaultsOverride.source instanceof Map) {
                        const keySources = configurationDefaultsOverride.source;
                        for (const objectKey in overrides[key]) {
                            const keySource = keySources.get(objectKey);
                            const keySourceId = isString(keySource) ? keySource : keySource?.id;
                            if (keySourceId === id) {
                                keySources.delete(objectKey);
                                delete configurationDefaultsOverride.value[objectKey];
                            }
                        }
                        if (keySources.size === 0) {
                            this.configurationDefaultsOverrides.delete(key);
                        }
                    }
                    else {
                        const configurationDefaultsOverrideSourceId = isString(configurationDefaultsOverride.source) ? configurationDefaultsOverride.source : configurationDefaultsOverride.source?.id;
                        if (id !== configurationDefaultsOverrideSourceId) {
                            continue;
                        }
                        this.configurationDefaultsOverrides.delete(key);
                    }
                    const property = this.configurationProperties[key];
                    if (property) {
                        this.updatePropertyDefaultValue(key, property);
                        this.updateSchema(key, property);
                    }
                }
                bucket.add(key);
            }
        }
        this.updateOverridePropertyPatternKey();
    }
    deltaConfiguration(delta) {
        let defaultsOverrides = false;
        const properties = ( (new Set()));
        if (delta.removedDefaults) {
            this.doDeregisterDefaultConfigurations(delta.removedDefaults, properties);
            defaultsOverrides = true;
        }
        if (delta.addedDefaults) {
            this.doRegisterDefaultConfigurations(delta.addedDefaults, properties);
            defaultsOverrides = true;
        }
        if (delta.removedConfigurations) {
            this.doDeregisterConfigurations(delta.removedConfigurations, properties);
        }
        if (delta.addedConfigurations) {
            this.doRegisterConfigurations(delta.addedConfigurations, false, properties);
        }
        this._onDidSchemaChange.fire();
        this._onDidUpdateConfiguration.fire({ properties, defaultsOverrides });
    }
    notifyConfigurationSchemaUpdated(...configurations) {
        this._onDidSchemaChange.fire();
    }
    registerOverrideIdentifiers(overrideIdentifiers) {
        this.doRegisterOverrideIdentifiers(overrideIdentifiers);
        this._onDidSchemaChange.fire();
    }
    doRegisterOverrideIdentifiers(overrideIdentifiers) {
        for (const overrideIdentifier of overrideIdentifiers) {
            this.overrideIdentifiers.add(overrideIdentifier);
        }
        this.updateOverridePropertyPatternKey();
    }
    doRegisterConfigurations(configurations, validate, bucket) {
        configurations.forEach(configuration => {
            this.validateAndRegisterProperties(configuration, validate, configuration.extensionInfo, configuration.restrictedProperties, undefined, bucket);
            this.configurationContributors.push(configuration);
            this.registerJSONConfiguration(configuration);
        });
    }
    doDeregisterConfigurations(configurations, bucket) {
        const deregisterConfiguration = (configuration) => {
            if (configuration.properties) {
                for (const key in configuration.properties) {
                    bucket.add(key);
                    const property = this.configurationProperties[key];
                    if (property?.policy?.name) {
                        this.policyConfigurations.delete(property.policy.name);
                    }
                    delete this.configurationProperties[key];
                    this.removeFromSchema(key, configuration.properties[key]);
                }
            }
            configuration.allOf?.forEach(node => deregisterConfiguration(node));
        };
        for (const configuration of configurations) {
            deregisterConfiguration(configuration);
            const index = this.configurationContributors.indexOf(configuration);
            if (index !== -1) {
                this.configurationContributors.splice(index, 1);
            }
        }
    }
    validateAndRegisterProperties(configuration, validate = true, extensionInfo, restrictedProperties, scope = ConfigurationScope.WINDOW, bucket) {
        scope = isUndefinedOrNull(configuration.scope) ? scope : configuration.scope;
        const properties = configuration.properties;
        if (properties) {
            for (const key in properties) {
                const property = properties[key];
                if (validate && validateProperty(key, property)) {
                    delete properties[key];
                    continue;
                }
                property.source = extensionInfo;
                property.defaultDefaultValue = properties[key].default;
                this.updatePropertyDefaultValue(key, property);
                if (OVERRIDE_PROPERTY_REGEX.test(key)) {
                    property.scope = undefined;
                }
                else {
                    property.scope = isUndefinedOrNull(property.scope) ? scope : property.scope;
                    property.restricted = isUndefinedOrNull(property.restricted) ? !!restrictedProperties?.includes(key) : property.restricted;
                }
                if (properties[key].hasOwnProperty('included') && !properties[key].included) {
                    this.excludedConfigurationProperties[key] = properties[key];
                    delete properties[key];
                    continue;
                }
                else {
                    this.configurationProperties[key] = properties[key];
                    if (properties[key].policy?.name) {
                        this.policyConfigurations.set(properties[key].policy.name, key);
                    }
                }
                if (!properties[key].deprecationMessage && properties[key].markdownDeprecationMessage) {
                    properties[key].deprecationMessage = properties[key].markdownDeprecationMessage;
                }
                bucket.add(key);
            }
        }
        const subNodes = configuration.allOf;
        if (subNodes) {
            for (const node of subNodes) {
                this.validateAndRegisterProperties(node, validate, extensionInfo, restrictedProperties, scope, bucket);
            }
        }
    }
    getConfigurations() {
        return this.configurationContributors;
    }
    getConfigurationProperties() {
        return this.configurationProperties;
    }
    getPolicyConfigurations() {
        return this.policyConfigurations;
    }
    getExcludedConfigurationProperties() {
        return this.excludedConfigurationProperties;
    }
    getConfigurationDefaultsOverrides() {
        return this.configurationDefaultsOverrides;
    }
    registerJSONConfiguration(configuration) {
        const register = (configuration) => {
            const properties = configuration.properties;
            if (properties) {
                for (const key in properties) {
                    this.updateSchema(key, properties[key]);
                }
            }
            const subNodes = configuration.allOf;
            subNodes?.forEach(register);
        };
        register(configuration);
    }
    updateSchema(key, property) {
        allSettings.properties[key] = property;
        switch (property.scope) {
            case ConfigurationScope.APPLICATION:
                applicationSettings.properties[key] = property;
                break;
            case ConfigurationScope.MACHINE:
                machineSettings.properties[key] = property;
                break;
            case ConfigurationScope.MACHINE_OVERRIDABLE:
                machineOverridableSettings.properties[key] = property;
                break;
            case ConfigurationScope.WINDOW:
                windowSettings.properties[key] = property;
                break;
            case ConfigurationScope.RESOURCE:
                resourceSettings.properties[key] = property;
                break;
            case ConfigurationScope.LANGUAGE_OVERRIDABLE:
                resourceSettings.properties[key] = property;
                this.resourceLanguageSettingsSchema.properties[key] = property;
                break;
        }
    }
    removeFromSchema(key, property) {
        delete allSettings.properties[key];
        switch (property.scope) {
            case ConfigurationScope.APPLICATION:
                delete applicationSettings.properties[key];
                break;
            case ConfigurationScope.MACHINE:
                delete machineSettings.properties[key];
                break;
            case ConfigurationScope.MACHINE_OVERRIDABLE:
                delete machineOverridableSettings.properties[key];
                break;
            case ConfigurationScope.WINDOW:
                delete windowSettings.properties[key];
                break;
            case ConfigurationScope.RESOURCE:
            case ConfigurationScope.LANGUAGE_OVERRIDABLE:
                delete resourceSettings.properties[key];
                delete this.resourceLanguageSettingsSchema.properties[key];
                break;
        }
    }
    updateOverridePropertyPatternKey() {
        for (const overrideIdentifier of ( (this.overrideIdentifiers.values()))) {
            const overrideIdentifierProperty = `[${overrideIdentifier}]`;
            const resourceLanguagePropertiesSchema = {
                type: 'object',
                description: ( localizeWithPath(_moduleId, 2, "Configure editor settings to be overridden for a language.")),
                errorMessage: ( localizeWithPath(_moduleId, 3, "This setting does not support per-language configuration.")),
                $ref: resourceLanguageSettingsSchemaId,
            };
            this.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);
            allSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
            applicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
            machineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
            machineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
            windowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
            resourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
        }
    }
    registerOverridePropertyPatternKey() {
        const resourceLanguagePropertiesSchema = {
            type: 'object',
            description: ( localizeWithPath(_moduleId, 2, "Configure editor settings to be overridden for a language.")),
            errorMessage: ( localizeWithPath(_moduleId, 3, "This setting does not support per-language configuration.")),
            $ref: resourceLanguageSettingsSchemaId,
        };
        allSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
        applicationSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
        machineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
        machineOverridableSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
        windowSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
        resourceSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
        this._onDidSchemaChange.fire();
    }
    updatePropertyDefaultValue(key, property) {
        const configurationdefaultOverride = this.configurationDefaultsOverrides.get(key);
        let defaultValue = configurationdefaultOverride?.value;
        let defaultSource = configurationdefaultOverride?.source;
        if (isUndefined(defaultValue)) {
            defaultValue = property.defaultDefaultValue;
            defaultSource = undefined;
        }
        if (isUndefined(defaultValue)) {
            defaultValue = getDefaultValue(property.type);
        }
        property.default = defaultValue;
        property.defaultValueSource = defaultSource;
    }
}
const OVERRIDE_IDENTIFIER_PATTERN = `\\[([^\\]]+)\\]`;
const OVERRIDE_IDENTIFIER_REGEX = ( (new RegExp(OVERRIDE_IDENTIFIER_PATTERN, 'g')));
const OVERRIDE_PROPERTY_PATTERN = `^(${OVERRIDE_IDENTIFIER_PATTERN})+$`;
const OVERRIDE_PROPERTY_REGEX = ( (new RegExp(OVERRIDE_PROPERTY_PATTERN)));
function overrideIdentifiersFromKey(key) {
    const identifiers = [];
    if (OVERRIDE_PROPERTY_REGEX.test(key)) {
        let matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);
        while (matches?.length) {
            const identifier = matches[1].trim();
            if (identifier) {
                identifiers.push(identifier);
            }
            matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);
        }
    }
    return distinct(identifiers);
}
function keyFromOverrideIdentifiers(overrideIdentifiers) {
    return overrideIdentifiers.reduce((result, overrideIdentifier) => `${result}[${overrideIdentifier}]`, '');
}
function getDefaultValue(type) {
    const t = Array.isArray(type) ? type[0] : type;
    switch (t) {
        case 'boolean':
            return false;
        case 'integer':
        case 'number':
            return 0;
        case 'string':
            return '';
        case 'array':
            return [];
        case 'object':
            return {};
        default:
            return null;
    }
}
const configurationRegistry = ( (new ConfigurationRegistry()));
Registry.add(Extensions.Configuration, configurationRegistry);
function validateProperty(property, schema) {
    if (!property.trim()) {
        return ( localizeWithPath(_moduleId, 4, "Cannot register an empty property"));
    }
    if (OVERRIDE_PROPERTY_REGEX.test(property)) {
        return ( localizeWithPath(
            _moduleId,
            5,
            "Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",
            property
        ));
    }
    if (configurationRegistry.getConfigurationProperties()[property] !== undefined) {
        return ( localizeWithPath(
            _moduleId,
            6,
            "Cannot register '{0}'. This property is already registered.",
            property
        ));
    }
    if (schema.policy?.name && configurationRegistry.getPolicyConfigurations().get(schema.policy?.name) !== undefined) {
        return ( localizeWithPath(
            _moduleId,
            7,
            "Cannot register '{0}'. The associated policy {1} is already registered with {2}.",
            property,
            schema.policy?.name,
            configurationRegistry.getPolicyConfigurations().get(schema.policy?.name)
        ));
    }
    return null;
}
function getScopes() {
    const scopes = [];
    const configurationProperties = configurationRegistry.getConfigurationProperties();
    for (const key of ( (Object.keys(configurationProperties)))) {
        scopes.push([key, configurationProperties[key].scope]);
    }
    scopes.push(['launch', ConfigurationScope.RESOURCE]);
    scopes.push(['task', ConfigurationScope.RESOURCE]);
    return scopes;
}
export { ConfigurationScope, EditPresentationTypes, Extensions, OVERRIDE_PROPERTY_PATTERN, OVERRIDE_PROPERTY_REGEX, allSettings, applicationSettings, configurationDefaultsSchemaId, getDefaultValue, getScopes, keyFromOverrideIdentifiers, machineOverridableSettings, machineSettings, overrideIdentifiersFromKey, resourceLanguageSettingsSchemaId, resourceSettings, validateProperty, windowSettings };
