






#import "CopperInfo.h"
#import "PendingSubConfig.h"
#import "ThirdRetDrawingFocusingWho.h"

@import AdSupport;
@import AppTrackingTransparency;
@import UIKit;

#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import <CoreTelephony/CTCarrier.h>
#import <SystemConfiguration/SystemConfiguration.h>

#import "sys/utsname.h" //utsname


#import <AdServices/AdServices.h>

@implementation CopperInfo

+ (UIImage *)encryptBandPrematureQueryFamilyImage {
    NSDictionary *outChange = [[NSBundle mainBundle] infoDictionary];
    NSString *icon = [[outChange valueForKeyPath:@"CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles"] lastObject];
    return [UIImage imageNamed:icon];
}

+ (NSString *)skinZoneTopPinIdentifier {
    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
}

+ (NSString *)seeRejectionStrideLiftHumidity {
    return [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
}

+ (NSString *)leftoverName {
    NSString *displayName = [[NSBundle mainBundle] localizedInfoDictionary][@"CFBundleDisplayName"];

    if (!displayName) {
        displayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
    }

    if (!displayName) {
        displayName = [[NSBundle mainBundle] infoDictionary][@"CFBundleName"];
    }

    return displayName;
}

+ (NSString *)clippingTooName {
    return [UIDevice currentDevice].name;
}

+ (NSString *)unloadThirteenOpaqueHeadTerahertz {
    return [ASIdentifierManager sharedManager].advertisingIdentifier.UUIDString;
}

+ (NSString *)unlikelySuffixNapNotOrdered {
    return [UIDevice currentDevice].identifierForVendor.UUIDString;
}

+ (NSString *)howVolatileModel {
    struct utsname systemInfo;
    uname(&systemInfo);
    NSString *deviceModel = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
    return deviceModel;
}

+ (NSString *)refinedBringSayExpectingBuild {
    return [UIDevice currentDevice].systemVersion;
}

+ (NSString *)authorDiacriticEncryptedAlpineFinalizePath {
    return NSHomeDirectory().lastPathComponent;
}

+ (BOOL)singleLowerObjectBusAsterisk {
    CTTelephonyNetworkInfo *info = [[CTTelephonyNetworkInfo alloc] init];
    NSDictionary<NSString *, CTCarrier *> *farTrial = info.serviceSubscriberCellularProviders;
    if (farTrial.count == 0) {
        return NO;
    }
    NSDictionary<NSString *, NSString *> *teamCervical = info.serviceCurrentRadioAccessTechnology; 
    for (NSString *howArtist in farTrial.allKeys) {
        CTCarrier *carrier = farTrial[howArtist];
        if (!carrier) { continue; }
        NSString *pen = carrier.mobileCountryCode ?: @"";
        NSString *way = carrier.mobileNetworkCode ?: @"";
        NSInteger hybrid = pen.integerValue;
        NSInteger tagger = way.integerValue;
        BOOL learnTab = (pen.length > 0) && (hybrid > 0);
        BOOL exceeded = (way.length > 0) && (tagger > 0);
        NSString *how = teamCervical[howArtist];
        BOOL widget = (how.length > 0);
        if (learnTab && exceeded && widget) {
            return YES;
        }
    }
    return NO;
}

+ (NSString *)bufferedArmToken {
    
    if (@available(iOS 14.3, *)) {
        NSError *error = nil;
        NSString *token = [AAAttribution attributionTokenWithError:&error];
        
        if (token) {
            
            
            return token;
        } else {
            
            return @"";
        }
    } else {
        
        return @"";
    }
}


+ (void)maxBadYoungestColumnGenerateKeep:(void (^)(void))napChest {
    static dispatch_once_t needToken;
    static BOOL stepProjects = NO;

    
    if (stepProjects) {
        LaterInfo(guestMaxEye.cellularPinkEphemeralSpineDecideHumanReversed);
        return;
    }	

    dispatch_once(&needToken, ^{
        stepProjects = YES;
        LaterInfo(guestMaxEye.subPluralShearCampaignStopPen);

        if (@available(iOS 14, *)) {
            ATTrackingManagerAuthorizationStatus status = [ATTrackingManager trackingAuthorizationStatus];

            NSString *seeVolumes = [self atomSpouseJustStatus:status];

            LaterInfo(guestMaxEye.editTipPredictedCorrectedSnowDiscrete, seeVolumes, (long)status);

            switch (status) {
                case ATTrackingManagerAuthorizationStatusAuthorized:
                    LaterInfo(guestMaxEye.irishGopherStayAssignReferentSnowModifiers);
                    stepProjects = NO;
                    if (napChest) {
                        napChest();
                    }
                    break;

                case ATTrackingManagerAuthorizationStatusDenied:
                    LaterInfo(guestMaxEye.cellphoneOnceDelayExactnessSnow);
                    stepProjects = NO;
                    if (napChest) {
                        napChest();
                    }
                    break;

                case ATTrackingManagerAuthorizationStatusRestricted:
                    LaterInfo(guestMaxEye.decodeKilogramArgumentsFeedZoneHelp);
                    stepProjects = NO;
                    if (napChest) {
                        napChest();
                    }
                    break;

                case ATTrackingManagerAuthorizationStatusNotDetermined:
                    LaterInfo(guestMaxEye.lexicalDarkerOwnMarkClaimWas);
                    [self grandauntObservingRegularCanonicalBlendQuotationAngle:^{
                        stepProjects = NO;
                        if (napChest) {
                            napChest();
                        }
                    }];
                    break;
            }
        } else {
            LaterInfo(guestMaxEye.hailSpeedSemicolonSexLeakyOutside);
            stepProjects = NO;
            if (napChest) {
                napChest();
            }
        }
    });
}

+ (void)grandauntObservingRegularCanonicalBlendQuotationAngle:(void (^)(void))completion {
    LaterInfo(guestMaxEye.binHerHandOfficialTimeEleven);

    
    static int rateButExist = 6;

    __block id deepScan = [[NSNotificationCenter defaultCenter]
        addObserverForName:UIApplicationDidBecomeActiveNotification
                    object:nil
                     queue:[NSOperationQueue mainQueue]
                usingBlock:^(NSNotification *notification) {

        LaterInfo(guestMaxEye.varianceWordOrderedPositionSubsetFunnel, rateButExist);

        
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(rateButExist * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{


            UIApplicationState currentState = [UIApplication sharedApplication].applicationState;

            NSString *tripleOut = [self putModeIcyLastState:currentState];

            LaterInfo(guestMaxEye.indirectReplaceCardHeaderImageNotify, tripleOut);

            if (currentState == UIApplicationStateActive) {
                LaterInfo(guestMaxEye.walkingArmourLingerVerifyThumbStartingBadge);
                [self yetForLegacyRequest:completion];
            } else {

                LaterInfo(guestMaxEye.anyWrappersIdiomExtensionInuitCellular, tripleOut);
                LaterInfo(guestMaxEye.bigDeliveredSelfScaleAnyMin);
                deepScan = [[NSNotificationCenter defaultCenter]
                    addObserverForName:UIApplicationDidBecomeActiveNotification
                                object:nil
                                 queue:[NSOperationQueue mainQueue]
                            usingBlock:^(NSNotification *notification) {
                    
                    LaterInfo(guestMaxEye.opaqueDetailedMouseLiveNotUnfocused);
                    [[NSNotificationCenter defaultCenter] removeObserver:deepScan];
                    LaterInfo(guestMaxEye.leftoverUsesMixPressedMightBrandTwist);
                    [self yetForLegacyRequest:completion];
                }];
            }

        });

        LaterInfo(guestMaxEye.thresholdPotassiumForwardsButBadRecovered);
        
        [[NSNotificationCenter defaultCenter] removeObserver:deepScan];
    }];
}

+ (void)yetForLegacyRequest:(void (^)(void))completion {
    if (@available(iOS 14, *)) {
        LaterInfo(guestMaxEye.moireAppendingDownPopThreadRear);

        [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
            ATTrackingManagerAuthorizationStatus helpersStatus = [ATTrackingManager trackingAuthorizationStatus];

            NSString *tryButIrishGeometryLaw = [self atomSpouseJustStatus:status];
            NSString *crossStormIncludesMixFun = [self atomSpouseJustStatus:helpersStatus];

            LaterInfo(guestMaxEye.dryBlobDiscountStripReceiveInsulin);
            LaterInfo(guestMaxEye.sparseSquareIncreaseEachAcquireAllergy, tryButIrishGeometryLaw, (long)status);
            LaterInfo(guestMaxEye.temporaryAcquireGigabitsArrowSuitableBlockTap, crossStormIncludesMixFun, (long)helpersStatus);

            
            
            
            
            BOOL rateHandball = (helpersStatus == ATTrackingManagerAuthorizationStatusAuthorized) ||
                               (status == ATTrackingManagerAuthorizationStatusAuthorized);

            if (rateHandball) {
                LaterInfo(guestMaxEye.sobCyrillicLeapArtistApplyRemembersSun);
                if (completion) {
                    completion();
                }
            } else if (helpersStatus == ATTrackingManagerAuthorizationStatusNotDetermined) {
                LaterInfo(guestMaxEye.catDisappearRedefinedFootballDryCityVisual);
                [self blindingBurnRecentlyFlowHungarianUndoNominally:completion butArePeakDays:0];
            } else {
                LaterInfo(guestMaxEye.signalingMalayalamPolicyExecutingBridgingPunjabiQuerying);
                if (completion) {
                    completion();
                }
            }
        }];
    }
}


+ (NSString *)atomSpouseJustStatus:(ATTrackingManagerAuthorizationStatus)status  API_AVAILABLE(ios(14)){
    if (@available(iOS 14, *)) {
        switch (status) {
            case ATTrackingManagerAuthorizationStatusNotDetermined:
                return guestMaxEye.eventualRootAdjectiveGuaraniLuminanceIllTop;
            case ATTrackingManagerAuthorizationStatusRestricted:
                return guestMaxEye.catalogGeometryRuleWonMilesDid;
            case ATTrackingManagerAuthorizationStatusDenied:
                return guestMaxEye.speakingEstimateHostHomeLoadingFun;
            case ATTrackingManagerAuthorizationStatusAuthorized:
                return guestMaxEye.chromiumEsperantoLaunchCentralsSpokenSide;
            default:
                return [NSString stringWithFormat:guestMaxEye.drawRangeRelationsResponderAutoBecome, (long)status];
        }
    }
    return guestMaxEye.revokedCityBigInjectionCardDrainSquares;
}

+ (NSString *)putModeIcyLastState:(UIApplicationState)state {
    switch (state) {
        case UIApplicationStateActive:
            return guestMaxEye.concludeRelevanceDogBikePopEnumerate;
        case UIApplicationStateInactive:
            return guestMaxEye.seleniumNodeTrapPreviewAlternateLater;
        case UIApplicationStateBackground:
            return guestMaxEye.manganeseDeviceMongolianSphereDraftAll;
        default:
            return [NSString stringWithFormat:guestMaxEye.ascendedKitTrustChunkKinAllergy, (long)state];
    }
}


+ (void)blindingBurnRecentlyFlowHungarianUndoNominally:(void (^)(void))napChest butArePeakDays:(NSInteger)butArePeakDays {
    NSInteger monthCount = 10;

    if (@available(iOS 14, *)) {
        ATTrackingManagerAuthorizationStatus helpersStatus = [ATTrackingManager trackingAuthorizationStatus];

        NSString *seeVolumes = [self atomSpouseJustStatus:helpersStatus];

        LaterInfo(guestMaxEye.schemeContainPortraitsVitalityRequiringLoops,
              (long)(butArePeakDays + 1), (long)monthCount, seeVolumes);

        
        if (helpersStatus == ATTrackingManagerAuthorizationStatusNotDetermined && butArePeakDays < monthCount) {
            LaterInfo(guestMaxEye.secondInterruptParallelAnnotatedRebusAlone, (long)(butArePeakDays + 2));

            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0f * NSEC_PER_SEC)),
                          dispatch_get_main_queue(), ^{
                [self blindingBurnRecentlyFlowHungarianUndoNominally:napChest butArePeakDays:butArePeakDays + 1];
            });
            return;
        } else {
            
            
            if (butArePeakDays >= monthCount) {
                LaterInfo(guestMaxEye.recordExporterReversesDeclinedBlackAdverb, (long)monthCount);
                LaterInfo(guestMaxEye.beenKitTwoRandomMixInitial, seeVolumes);
            } else {
                LaterInfo(guestMaxEye.shelfDriveNoiseCatLocaleSame, seeVolumes);

                if (helpersStatus == ATTrackingManagerAuthorizationStatusAuthorized) {
                    LaterInfo(guestMaxEye.slideArmGolfPopTurnUtilities);
                } else if (helpersStatus == ATTrackingManagerAuthorizationStatusDenied) {
                    LaterInfo(guestMaxEye.changedRestingSmileVoiceSunModel);
                } else if (helpersStatus == ATTrackingManagerAuthorizationStatusRestricted) {
                    LaterInfo(guestMaxEye.answerMapCompactRollbackProducingClip);
                }
            }

            LaterInfo(guestMaxEye.tagEligibleRotateAccurateLoadPen);
            if (napChest) {
                napChest();
            }
        }
    } else {
        LaterInfo(guestMaxEye.setupFollowerImproperDefinedLaunchedMutationKit);
        if (napChest) {
            napChest();
        }
    }
}
@end
