








#import <AppLovinSDK/AppLovinSDK.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>

@interface SurgeUseNoiseZipShrinkCurrency : NSObject<MARewardedAdDelegate,MAAdViewAdDelegate,MAAdDelegate,MAAdRevenueDelegate>

@property (nonatomic, strong) MARewardedAd *fadeDelayJoiningMealBorders;
@property (nonatomic, strong) MAInterstitialAd *automaticKilowattsUnlimitedUnlockHeight;
@property (nonatomic, assign) NSInteger numericUnchangedOrderingParserProfiles;

@property (nonatomic, copy) NSString *noteStarLogData;

@property (nonatomic, copy) void (^daysDueSheMan)(BOOL result);

@property (nonatomic, copy) void (^shuffleFamilyBleedSubstringSoloistJson)(BOOL result, NSDictionary *wetJson);

@property (nonatomic, copy) void (^hostBothTotalAlgorithmBlueProduces)(BOOL result);

@property (nonatomic, copy) void (^evictWayCommandsPhotosSubtractConstructJson)(BOOL result, NSDictionary *wetJson);

@property (nonatomic, copy) void (^limitIterativeFullyStartupDialogCollapses)(NSDictionary *earInfo);

@end

@implementation SurgeUseNoiseZipShrinkCurrency

+ (instancetype)shared {
    static id shared = nil;
    static dispatch_once_t fadeToken;
    dispatch_once(&fadeToken, ^{
        shared = [[super allocWithZone:NULL] init];
    });
    return shared;
}

+ (NSString *)endpointsNet {
    return ALSdk.version;
}

- (void)showMediationDebugger {
    [[ALSdk shared] showMediationDebugger];
}

- (void)highlightSlashedFixTelephotoFloorHall:(void(^)(NSDictionary *earInfo))callback {
    self.limitIterativeFullyStartupDialogCollapses = callback;
}


- (void)queryDemandPickTreeTrackingLimitedKey:(NSString *)xxpk_maxkey betweenBikePortColleagueParagraph:(NSString *)betweenBikePortColleagueParagraph secretLossThreeAfterViewNet:(NSString *)secretLossThreeAfterViewNet pubTradPortionBitSmall:(NSArray *)pubTradPortionBitSmall {
    
    
    
    Class pub = NSClassFromString(@"FBAdSettings");
    if (pub) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        [pub performSelector:@selector(setDataProcessingOptions:) withObject:@[]];
        [pub performSelector:@selector(setAdvertiserTrackingEnabled:) withObject:@(YES)];
#pragma clang diagnostic pop
    }
    
    

    
    ALSdkInitializationConfiguration *wasEighteenBinScanPositions = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (pubTradPortionBitSmall) {
            builder.testDeviceAdvertisingIdentifiers = pubTradPortionBitSmall;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:wasEighteenBinScanPositions completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self indexingObserversCompileDraftPivotIssueLooper:betweenBikePortColleagueParagraph];
        if (secretLossThreeAfterViewNet.length > 0) {
            [self unitUnloadHueWatchedThirteenExpiresSucceedState:secretLossThreeAfterViewNet];
        }
    }];
}

- (void)indexingObserversCompileDraftPivotIssueLooper:(NSString *)betweenBikePortColleagueParagraph
{
    self.fadeDelayJoiningMealBorders = [MARewardedAd sharedWithAdUnitIdentifier:betweenBikePortColleagueParagraph];
    self.fadeDelayJoiningMealBorders.delegate = self;
    self.fadeDelayJoiningMealBorders.revenueDelegate = self;

    
    [self.fadeDelayJoiningMealBorders loadAd];
}

- (void)unitUnloadHueWatchedThirteenExpiresSucceedState:(NSString *)secretLossThreeAfterViewNet
{
    self.automaticKilowattsUnlimitedUnlockHeight = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:secretLossThreeAfterViewNet];
    self.automaticKilowattsUnlimitedUnlockHeight.delegate = self;
    self.automaticKilowattsUnlimitedUnlockHeight.revenueDelegate = self;

    
    [self.automaticKilowattsUnlimitedUnlockHeight loadAd];
}


- (void)filmGenerateAltimeterManClampCreamyData:(nullable NSString *)noteStarLogData endAirLossJson:(void(^)(BOOL result, NSDictionary *wetJson))endAirLossJson {
    self.shuffleFamilyBleedSubstringSoloistJson = endAirLossJson;
    self.noteStarLogData = noteStarLogData;
    if ( [self.fadeDelayJoiningMealBorders isReady]) {
        [self.fadeDelayJoiningMealBorders showAdForPlacement:nil customData:noteStarLogData];
    }else {
        endAirLossJson(NO,nil);
    }
}

- (void)filmGenerateAltimeterManClampCreamyData:(nullable NSString *)noteStarLogData fetchBit:(void(^)(BOOL result))fetchBit {
    self.daysDueSheMan = fetchBit;
    self.noteStarLogData = noteStarLogData;
    if ( [self.fadeDelayJoiningMealBorders isReady]) {
        [self.fadeDelayJoiningMealBorders showAdForPlacement:nil customData:noteStarLogData];
    }else {
        fetchBit(NO);
    }
}

- (void)fisheyeReportedPoloPurpleTelephoneStalledForkData:(nullable NSString *)noteStarLogData fetchBit:(void(^)(BOOL result))fetchBit {
    self.hostBothTotalAlgorithmBlueProduces = fetchBit;
    self.noteStarLogData = noteStarLogData;
    if ([self.automaticKilowattsUnlimitedUnlockHeight isReady]) {
        [self.automaticKilowattsUnlimitedUnlockHeight showAd];
    } else {
        [self.automaticKilowattsUnlimitedUnlockHeight loadAd];
        if (fetchBit) {
            fetchBit(NO);
        }
    }
}

- (void)fisheyeReportedPoloPurpleTelephoneStalledForkData:(nullable NSString *)noteStarLogData endAirLossJson:(void(^)(BOOL result, NSDictionary *wetJson))endAirLossJson {
    self.evictWayCommandsPhotosSubtractConstructJson = endAirLossJson;
    self.noteStarLogData = noteStarLogData;
    if ([self.automaticKilowattsUnlimitedUnlockHeight isReady]) {
        [self.automaticKilowattsUnlimitedUnlockHeight showAd];
    } else {
        [self.automaticKilowattsUnlimitedUnlockHeight loadAd];
        if (endAirLossJson) {
            endAirLossJson(NO, nil);
        }
    }
}

- (void)ruleBypassedUighurIndirectContent:(const char *)name error:(NSString *)error {
    
}

- (NSDictionary *)exclusiveInfoNowShearCommitted:(MAAd *)ad {
    NSMutableDictionary *wetJson = [NSMutableDictionary dictionary];
    
    wetJson[@"currency"] = @"USD";
    wetJson[@"revenue"] = @(ad.revenue);
    
    if (ad.format.label.length > 0) {
        wetJson[@"format"] = ad.format.label;
    }
    
    return [wetJson copy];
}

- (void)alertUnlimitedEffectOccurRightDithered:(MAAd *)ad eventType:(NSString *)eventType {
    if (!self.limitIterativeFullyStartupDialogCollapses) {
        return;
    }

    NSString *adType = @"UNKNOWN";
    if ([ad.format isEqual:MAAdFormat.rewarded]) {
        adType = @"REWARD";
    } else if ([ad.format isEqual:MAAdFormat.interstitial]) {
        adType = @"INTERSTITIAL";
    }

    NSDictionary *earInfo = @{
        @"ads_platform": @"APPLOVIN",
        @"ad_unit_id": ad.adUnitIdentifier ?: @"",
        @"event_type": eventType,  
        @"ad_type": adType,
        @"revenue": @(ad.revenue).stringValue ?: @"0"
    };

    self.limitIterativeFullyStartupDialogCollapses(earInfo);
}


- (void)didLoadAd:(nonnull MAAd *)ad {
    
    [self ruleBypassedUighurIndirectContent: __PRETTY_FUNCTION__ error:nil];
    
    
    self.numericUnchangedOrderingParserProfiles = 0;
}

- (void)didFailToLoadAdForAdUnitIdentifier:(nonnull NSString *)adUnitIdentifier withError:(nonnull MAError *)error {

    [self ruleBypassedUighurIndirectContent: __PRETTY_FUNCTION__ error:error.message];

    

    self.numericUnchangedOrderingParserProfiles++;
    NSInteger lossNine = pow(2, MIN(6, self.numericUnchangedOrderingParserProfiles));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, lossNine * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.fadeDelayJoiningMealBorders.adUnitIdentifier]) {
            [self.fadeDelayJoiningMealBorders loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.automaticKilowattsUnlimitedUnlockHeight.adUnitIdentifier]) {
            [self.automaticKilowattsUnlimitedUnlockHeight loadAd];
        }
    });
}

- (void)didHideAd:(MAAd *)ad {
    [self ruleBypassedUighurIndirectContent: __PRETTY_FUNCTION__ error:nil];

    
    if ([ad.format isEqual:MAAdFormat.rewarded]) {
        [self.fadeDelayJoiningMealBorders loadAd];
    } else if ([ad.format isEqual:MAAdFormat.interstitial]) {
        [self.automaticKilowattsUnlimitedUnlockHeight loadAd];

        
        if (self.hostBothTotalAlgorithmBlueProduces) {
            self.hostBothTotalAlgorithmBlueProduces(YES);
        }

        if (self.evictWayCommandsPhotosSubtractConstructJson) {
            NSDictionary *wetJson = [self exclusiveInfoNowShearCommitted:ad];
            self.evictWayCommandsPhotosSubtractConstructJson(YES, wetJson);
        }
    }
}

- (void)didFailToDisplayAd:(MAAd *)ad withError:(MAError *)error
{
    [self ruleBypassedUighurIndirectContent: __PRETTY_FUNCTION__ error:error.message];

    
    if ([ad.format isEqual:MAAdFormat.rewarded]) {
        [self.fadeDelayJoiningMealBorders loadAd];

        if (self.daysDueSheMan) {
            self.daysDueSheMan(NO);
        }

        if (self.shuffleFamilyBleedSubstringSoloistJson) {
            self.shuffleFamilyBleedSubstringSoloistJson(NO, nil);
        }
    } else if ([ad.format isEqual:MAAdFormat.interstitial]) {
        [self.automaticKilowattsUnlimitedUnlockHeight loadAd];

        if (self.hostBothTotalAlgorithmBlueProduces) {
            self.hostBothTotalAlgorithmBlueProduces(NO);
        }

        if (self.evictWayCommandsPhotosSubtractConstructJson) {
            self.evictWayCommandsPhotosSubtractConstructJson(NO, nil);
        }
    }
}

- (void)didClickAd:(nonnull MAAd *)ad {
    [self ruleBypassedUighurIndirectContent: __PRETTY_FUNCTION__ error:nil];
    [self alertUnlimitedEffectOccurRightDithered:ad eventType:@"1"];
}

- (void)didDisplayAd:(nonnull MAAd *)ad {
    [self ruleBypassedUighurIndirectContent: __PRETTY_FUNCTION__ error:nil];
    [self alertUnlimitedEffectOccurRightDithered:ad eventType:@"2"];
}

- (void)didRewardUserForAd:(nonnull MAAd *)ad withReward:(nonnull MAReward *)reward {
    [self ruleBypassedUighurIndirectContent: __PRETTY_FUNCTION__ error:nil];

    if (self.daysDueSheMan) {
        self.daysDueSheMan(YES);
    }

    if (self.shuffleFamilyBleedSubstringSoloistJson) {
        NSDictionary *wetJson = [self exclusiveInfoNowShearCommitted:ad];
        self.shuffleFamilyBleedSubstringSoloistJson(YES, wetJson);
    }
}


- (void)didCollapseAd:(nonnull MAAd *)ad {
    [self ruleBypassedUighurIndirectContent: __PRETTY_FUNCTION__ error:nil];
}

- (void)didExpandAd:(nonnull MAAd *)ad {
    [self ruleBypassedUighurIndirectContent: __PRETTY_FUNCTION__ error:nil];
}


- (void)didPayRevenueForAd:(MAAd *)ad {
    [self ruleBypassedUighurIndirectContent: __PRETTY_FUNCTION__ error:nil];
    [self alertUnlimitedEffectOccurRightDithered:ad eventType:@"3"];
}

@end
