<commit_before>import Foundation

extension MCreate
{
    //MARK: private
    
    private func loadSettings()
    {
        MCreate.factorySettings(bundle:nil)
        { [weak self] (database:Database, settings:DSettings) in
            
            self?.database = database
            self?.settings = settings
        }
    }
    
    private func loadedSettings(
        database:Database,
        settings:DSettings)
    {
        self.database = database
        self.settings = settings
        
        load()
    }
    
    //MARK: internal
    
    func load()
    {
        guard
        
            database == nil,
            settings == nil
        
        else
        {
            checkAuthorization()
            
            return
        }
        
        loadSettings()
    }
}<commit_msg>Receive bundle while loading setings<commit_after>import Foundation

extension MCreate
{
    //MARK: private
    
    private func loadedSettings(
        database:Database,
        settings:DSettings)
    {
        self.database = database
        self.settings = settings
        
        load()
    }
    
    //MARK: internal
    
    func load()
    {
        guard
        
            database == nil,
            settings == nil
        
        else
        {
            checkAuthorization()
            
            return
        }
        
        loadSettings(bundle:nil)
    }
    
    func loadSettings(bundle:Bundle?)
    {
        MCreate.factorySettings(bundle:bundle)
        { [weak self] (database:Database, settings:DSettings) in
            
            self?.loadedSettings(
                database:database,
                settings:settings)
        }
    }
}
{'fraction_non_alphanumeric': 0.07511737089201878, 'fraction_numerical': 0.0, 'mean_word_length': 1.23753280839895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3207474', 'n_tokens_mistral': 425, 'n_tokens_neox': 422, 'n_words': 86}