






#import "MenTrySwitchLeftoverMark.h"
#import "WorkAreWasConfig.h"
#import "NSData+Adjusts.h"

@interface MenTrySwitchLeftoverMark() {
    NSURL *tooSaltRopeAnd;
    BOOL asleepFindRomanGenerateAfterBracket;
    NSInteger _tryKeep;
    NSDateFormatter *eggEarPullBeat;
    BOOL _looperQuoteVolumesNoticeAdd;
}

@end

@implementation MenTrySwitchLeftoverMark

- (instancetype)init
{
    self = [super init];
    if (self) {
        asleepFindRomanGenerateAfterBracket = NO;
        _tryKeep = 7;
        _looperQuoteVolumesNoticeAdd = NO;

        eggEarPullBeat = [[NSDateFormatter alloc] init];
        eggEarPullBeat.dateFormat = goalSubDrop.tooTiedUrgencyRoomUnitOurSon;

        if (!tooSaltRopeAnd) {
            NSURL *baseURL = [[NSFileManager defaultManager] URLsForDirectory:NSCachesDirectory inDomains:NSUserDomainMask].firstObject;
            tooSaltRopeAnd = [baseURL URLByAppendingPathComponent:NSStringFromClass(self.class) isDirectory:YES];
        }
    }
    return self;
}


- (instancetype)initClockwiseIssue:(NSURL *)zb_url
{
    self = [super init];
    if (self) {
        self.shotIronClaim = zb_url;
    }
    return self;
}


- (NSString *)fairWas:(VoiceLevel)zb_level sixBus:(NSString *)sixBus deriveNet:(NSString *)deriveNet tooFind:(NSString *)tooFind areaRealOut:(NSString *)areaRealOut hosting:(NSUInteger)hosting pushAgeRaw:(id)pushAgeRaw {

    NSString *time = [self wasOddDate:goalSubDrop.attachedAirborneMathInspiredBasicDuplicate timeZone:nil];

    NSString *color = [self deltaOurLevel:zb_level];

    NSString *line = [NSString stringWithFormat:@"%lu", (unsigned long)hosting];

    NSString *formattedString = [NSString stringWithFormat:goalSubDrop.serializeDisposePanMetalDolbyTwo,color,time,areaRealOut,line,sixBus];

    if (![formattedString isEqualToString:@""]) {
        NSURL *boxRearFile = [self evictionIncomingGuideConvertedTry];
        [self positionsFile:formattedString fileURL:boxRearFile];
    }

    return formattedString;
}



- (BOOL)positionsFile:(NSString *)zb_str {
    return [self positionsFile:zb_str fileURL:tooSaltRopeAnd];
}

- (BOOL)positionsFile:(NSString *)zb_str fileURL:(NSURL *)fileURL {
    if (!fileURL) {
        return NO;
    }

    NSString *line = zb_str;

    
    if (_looperQuoteVolumesNoticeAdd) {
        NSData *occurredData = [line dataUsingEncoding:NSUTF8StringEncoding];
        if (!occurredData) {
            return NO;
        }

        NSData *encryptedData = [occurredData noticeReleasedUpperNiacinManTen];
        if (!encryptedData) {
            
            return NO;
        }

        
        line = [encryptedData base64EncodedStringWithOptions:0];
    }

    
    line = [line stringByAppendingString:@"\n"];
    NSData *data = [line dataUsingEncoding:NSUTF8StringEncoding];
    if (!data) {
        return NO;
    }

    return [self wrapGrow:data plate:fileURL];
}

- (BOOL)wrapGrow:(NSData *)zb_data plate:(NSURL *)zb_url {
    __block BOOL randomJump = NO;
    NSFileCoordinator *hasRawOverLong = [[NSFileCoordinator alloc] initWithFilePresenter:nil];
    NSError *itemQuit = nil;
    [hasRawOverLong coordinateWritingItemAtURL:zb_url options:0 error:&itemQuit byAccessor:^(NSURL * _Nonnull minorClip) {

        NSError *itemQuit = nil;

        if (![[NSFileManager defaultManager] fileExistsAtPath:zb_url.path]) {

            NSURL *sedentarySlavicBlurDescendedLive = zb_url.URLByDeletingLastPathComponent;
            if (![[NSFileManager defaultManager] fileExistsAtPath:sedentarySlavicBlurDescendedLive.path]) {
                [[NSFileManager defaultManager] createDirectoryAtURL:sedentarySlavicBlurDescendedLive withIntermediateDirectories:YES attributes:nil error:&itemQuit];
            }

            [[NSFileManager defaultManager] createFileAtPath:zb_url.path contents:nil attributes:nil];
        }

        NSFileHandle *movieBusyFlip = [NSFileHandle fileHandleForWritingToURL:zb_url error:&itemQuit];
        [movieBusyFlip seekToEndOfFile];
        [movieBusyFlip writeData:zb_data];
        if (asleepFindRomanGenerateAfterBracket) {
            [movieBusyFlip synchronizeFile];
        }
        [movieBusyFlip closeFile];

        if (itemQuit) {
            
        }else {
            randomJump = YES;
        }

    }];

    if (itemQuit) {
        
    }

    return randomJump;
}

- (NSURL *)shotIronClaim {
    return tooSaltRopeAnd;
}

- (void)setShotIronClaim:(NSURL *)shotIronClaim {
    tooSaltRopeAnd = shotIronClaim;
}

- (BOOL)airlineEjectInvokeOpaqueGradeYou {
    return asleepFindRomanGenerateAfterBracket;
}

- (void)setAirlineEjectInvokeOpaqueGradeYou:(BOOL)airlineEjectInvokeOpaqueGradeYou {
    asleepFindRomanGenerateAfterBracket = airlineEjectInvokeOpaqueGradeYou;
}




- (NSInteger)tryKeep {
    return _tryKeep;
}

- (void)setTryKeep:(NSInteger)tryKeep {
    _tryKeep = tryKeep;
}

- (BOOL)looperQuoteVolumesNoticeAdd {
    return _looperQuoteVolumesNoticeAdd;
}

- (void)setLooperQuoteVolumesNoticeAdd:(BOOL)looperQuoteVolumesNoticeAdd {
    _looperQuoteVolumesNoticeAdd = looperQuoteVolumesNoticeAdd;
}



- (NSURL *)evictionIncomingGuideConvertedTry {
    NSString *dateString = [eggEarPullBeat stringFromDate:[NSDate date]];
    return [tooSaltRopeAnd URLByAppendingPathComponent:dateString];
}

- (NSArray<NSURL *> *)lockContent {
    NSFileManager *fileManager = [NSFileManager defaultManager];
    NSError *error;

    if (![fileManager fileExistsAtPath:tooSaltRopeAnd.path]) {
        return @[];
    }

    NSArray *bitSolve = [fileManager contentsOfDirectoryAtURL:tooSaltRopeAnd
                                includingPropertiesForKeys:@[NSURLCreationDateKey]
                                                   options:NSDirectoryEnumerationSkipsHiddenFiles
                                                     error:&error];
    if (error) {
        
        return @[];
    }

    return [bitSolve sortedArrayUsingComparator:^NSComparisonResult(NSURL *url1, NSURL *url2) {
        NSDate *date1, *date2;
        [url1 getResourceValue:&date1 forKey:NSURLCreationDateKey error:nil];
        [url2 getResourceValue:&date2 forKey:NSURLCreationDateKey error:nil];
        return [date2 compare:date1]; 
    }];
}

- (NSString *)saltAirFile:(NSURL *)fileURL {
    NSError *error;

    
    NSString *redFarCheck = [NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:&error];
    if (error || !redFarCheck) {
        
        return @"";
    }

    
    if (_looperQuoteVolumesNoticeAdd) {
        NSMutableString *wasDestroy = [NSMutableString string];

        
        NSArray *might = [redFarCheck componentsSeparatedByString:@"\n"];

        for (NSString *line in might) {
            
            if (line.length == 0) {
                continue;
            }

            
            NSData *encryptedData = [[NSData alloc] initWithBase64EncodedString:line options:0];
            if (!encryptedData) {
                
                continue;
            }

            
            NSData *putArabicData = [encryptedData callingHomeScanningScatteredVerbosePartAxial];
            if (!putArabicData) {
                
                continue;
            }

            
            NSString *atomDescended = [[NSString alloc] initWithData:putArabicData encoding:NSUTF8StringEncoding];
            if (atomDescended) {
                [wasDestroy appendString:atomDescended];
                [wasDestroy appendString:@"\n"];
            } else {
                
            }
        }

        return wasDestroy;
    } else {
        
        return redFarCheck;
    }
}

- (NSString *)withPackets {
    NSArray *bitSolve = [self lockContent];
    NSMutableString *wasDestroy = [NSMutableString string];

    for (NSURL *fileURL in bitSolve) {
        NSString *content = [self saltAirFile:fileURL];
        if (content.length > 0) {
            [wasDestroy appendFormat:goalSubDrop.askInvalidThousandRebusResponderFreeSharpen, fileURL.lastPathComponent];
            [wasDestroy appendString:content];
            [wasDestroy appendString:@"\n"];
        }
    }

    return wasDestroy;
}

- (NSString *)animationGreek {
    NSArray *bitSolve = [self lockContent];
    NSMutableString *wasDestroy = [NSMutableString string];

    for (NSURL *fileURL in bitSolve) {
        
        NSError *error;
        NSString *redFarCheck = [NSString stringWithContentsOfURL:fileURL encoding:NSUTF8StringEncoding error:&error];
        if (error || !redFarCheck) {
            
            continue;
        }

        if (redFarCheck.length > 0) {
            [wasDestroy appendFormat:goalSubDrop.askInvalidThousandRebusResponderFreeSharpen, fileURL.lastPathComponent];
            [wasDestroy appendString:redFarCheck];
            [wasDestroy appendString:@"\n"];
        }
    }

    return wasDestroy;
}

- (NSString *)yetBoldHalfDate:(NSDate *)date {
    if (!date) {
        return @"";
    }

    NSString *dateString = [eggEarPullBeat stringFromDate:date];
    NSURL *fileURL = [tooSaltRopeAnd URLByAppendingPathComponent:dateString];

    return [self saltAirFile:fileURL];
}

- (NSArray<NSDate *> *)chineseSock {
    NSMutableArray *dates = [NSMutableArray array];
    NSArray *bitSolve = [self lockContent];

    for (NSURL *fileURL in bitSolve) {
        NSString *fileName = fileURL.lastPathComponent;
        
        NSDate *date = [eggEarPullBeat dateFromString:fileName];
        if (date) {
            [dates addObject:date];
        }
    }

    
    [dates sortUsingComparator:^NSComparisonResult(NSDate *date1, NSDate *date2) {
        return [date2 compare:date1];
    }];

    return dates;
}

- (void)mustGainKeyHex {
    if (_tryKeep <= 0) return;

    NSFileManager *fileManager = [NSFileManager defaultManager];
    NSArray *bitSolve = [self lockContent];
    NSDate *wayDidDate = [NSDate dateWithTimeIntervalSinceNow:-_tryKeep * 24 * 60 * 60];

    for (NSURL *fileURL in bitSolve) {
        NSDate *creationDate;
        [fileURL getResourceValue:&creationDate forKey:NSURLCreationDateKey error:nil];

        if (creationDate && [creationDate compare:wayDidDate] == NSOrderedAscending) {
            NSError *error;
            [fileManager removeItemAtURL:fileURL error:&error];
            if (error) {
                
            }
        }
    }
}

@end
