function createIntl(config, cache) {
        var formatters = createFormatters(cache);
        var resolvedConfig = __assign(__assign({}, DEFAULT_INTL_CONFIG), config);
        var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;
        if (!locale) {
            if (onError) {
                onError(new InvalidConfigError("\"locale\" was not configured, using \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details"));
            }
            // Since there's no registered locale data for `locale`, this will
            // fallback to the `defaultLocale` to make sure things can render.
            // The `messages` are overridden to the `defaultProps` empty object
            // to maintain referential equality across re-renders. It's assumed
            // each <FormattedMessage> contains a `defaultMessage` prop.
            resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';
        }
        else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
            onError(new MissingDataError("Missing locale data for locale: \"" + locale + "\" in Intl.NumberFormat. Using default locale: \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details"));
        }
        else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&
            onError) {
            onError(new MissingDataError("Missing locale data for locale: \"" + locale + "\" in Intl.DateTimeFormat. Using default locale: \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details"));
        }
        return __assign(__assign({}, resolvedConfig), { formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });
    }
/**
     * Create intl object
     * @param config intl config
     * @param cache cache for formatter instances to prevent memory leak
     */
Create intl object
@param config intl config
@param cache cache for formatter instances to prevent memory leak
Create intl object @param config intl config @param cache cache for formatter instances to prevent memory leak
function createIntl(config, cache) {
        var formatters = createFormatters(cache);
        var resolvedConfig = __assign(__assign({}, DEFAULT_INTL_CONFIG), config);
        var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;
        if (!locale) {
            if (onError) {
                onError(new InvalidConfigError("\"locale\" was not configured, using \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details"));
            }
            resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';
        }
        else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
            onError(new MissingDataError("Missing locale data for locale: \"" + locale + "\" in Intl.NumberFormat. Using default locale: \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details"));
        }
        else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&
            onError) {
            onError(new MissingDataError("Missing locale data for locale: \"" + locale + "\" in Intl.DateTimeFormat. Using default locale: \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details"));
        }
        return __assign(__assign({}, resolvedConfig), { formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });
    }
function createIntl ( config , cache ) { var formatters = createFormatters ( cache ) ; var resolvedConfig = __assign ( __assign ( { } , DEFAULT_INTL_CONFIG ) , config ) ; var locale = resolvedConfig . locale , defaultLocale = resolvedConfig . defaultLocale , onError = resolvedConfig . onError ; if ( ! locale ) { if ( onError ) { onError ( new InvalidConfigError ( "\"locale\" was not configured, using \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details" ) ) ; } resolvedConfig . locale = resolvedConfig . defaultLocale || 'en' ; } else if ( ! Intl . NumberFormat . supportedLocalesOf ( locale ) . length && onError ) { onError ( new MissingDataError ( "Missing locale data for locale: \"" + locale + "\" in Intl.NumberFormat. Using default locale: \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details" ) ) ; } else if ( ! Intl . DateTimeFormat . supportedLocalesOf ( locale ) . length && onError ) { onError ( new MissingDataError ( "Missing locale data for locale: \"" + locale + "\" in Intl.DateTimeFormat. Using default locale: \"" + defaultLocale + "\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details" ) ) ; } return __assign ( __assign ( { } , resolvedConfig ) , { formatters : formatters , formatNumber : formatNumber . bind ( null , resolvedConfig , formatters . getNumberFormat ) , formatNumberToParts : formatNumberToParts . bind ( null , resolvedConfig , formatters . getNumberFormat ) , formatRelativeTime : formatRelativeTime . bind ( null , resolvedConfig , formatters . getRelativeTimeFormat ) , formatDate : formatDate . bind ( null , resolvedConfig , formatters . getDateTimeFormat ) , formatDateToParts : formatDateToParts . bind ( null , resolvedConfig , formatters . getDateTimeFormat ) , formatTime : formatTime . bind ( null , resolvedConfig , formatters . getDateTimeFormat ) , formatTimeToParts : formatTimeToParts . bind ( null , resolvedConfig , formatters . getDateTimeFormat ) , formatPlural : formatPlural . bind ( null , resolvedConfig , formatters . getPluralRules ) , formatMessage : formatMessage . bind ( null , resolvedConfig , formatters ) , formatList : formatList . bind ( null , resolvedConfig , formatters . getListFormat ) , formatDisplayName : formatDisplayName . bind ( null , resolvedConfig , formatters . getDisplayNames ) } ) ; }
Create intl object
 @param config intl config
 @param cache cache for formatter instances to prevent memory leak
Create intl object @param config intl config @param cache cache for formatter instances to prevent memory leak
// Since there's no registered locale data for `locale`, this will // fallback to the `defaultLocale` to make sure things can render. // The `messages` are overridden to the `defaultProps` empty object // to maintain referential equality across re-renders. It's assumed // each <FormattedMessage> contains a `defaultMessage` prop.