








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

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

@property (nonatomic, strong) MARewardedAd *dolbyRecentServiceDepthEditorial;
@property (nonatomic, strong) MAInterstitialAd *growRainHangJobFix;
@property (nonatomic, assign) NSInteger sigmaFeedbackConflictQuitBurmese;

@property (nonatomic, copy) NSString *tipDailyHasData;

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

@property (nonatomic, copy) void (^wrestlingWetAcceptedAllocatedSeleniumJson)(BOOL result, NSDictionary *dryJson);

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

@property (nonatomic, copy) void (^smallerAskFaxLocallySeeGivenJson)(BOOL result, NSDictionary *dryJson);

@property (nonatomic, copy) void (^alphaPlayOffSerializeDeriveSampler)(NSDictionary *theInfo);

@end

@implementation DogBloodRetUnchangedRetainBracket

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

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

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

- (void)boldCompanyTabRetryBandwidthPublisher:(void(^)(NSDictionary *theInfo))callback {
    self.alphaPlayOffSerializeDeriveSampler = callback;
}


- (void)subtitlesReverseStillCentralClickedRemainderKey:(NSString *)xxpk_maxkey diastolicAmountMinimumAdditionBold:(NSString *)diastolicAmountMinimumAdditionBold spaceReleaseWireAlbumDeleteUnlikely:(NSString *)spaceReleaseWireAlbumDeleteUnlikely buffersKelvinYardBankersLigatures:(NSArray *)buffersKelvinYardBankersLigatures {
    
    
    
    Class are = NSClassFromString(@"FBAdSettings");
    if (are) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundeclared-selector"
        [are performSelector:@selector(setDataProcessingOptions:) withObject:@[]];
        [are performSelector:@selector(setAdvertiserTrackingEnabled:) withObject:@(YES)];
#pragma clang diagnostic pop
    }
    
    

    
    ALSdkInitializationConfiguration *midUniversalAllWonReject = [ALSdkInitializationConfiguration configurationWithSdkKey:xxpk_maxkey builderBlock:^(ALSdkInitializationConfigurationBuilder * _Nonnull builder) {
        builder.mediationProvider = ALMediationProviderMAX;
        if (buffersKelvinYardBankersLigatures) {
            builder.testDeviceAdvertisingIdentifiers = buffersKelvinYardBankersLigatures;
        }
        if (@available(iOS 14, *)) {
            if ([ATTrackingManager trackingAuthorizationStatus] == ATTrackingManagerAuthorizationStatusAuthorized ) {
                [ALPrivacySettings setHasUserConsent: YES];
            }
        } else {
            [ALPrivacySettings setHasUserConsent: YES];
        }
    }];
    
    [[ALSdk shared] initializeWithConfiguration:midUniversalAllWonReject completionHandler:^(ALSdkConfiguration * _Nonnull configuration) {
        [self workFindSuperiorsHungarianDisablesMagnesiumThread:diastolicAmountMinimumAdditionBold];
        if (spaceReleaseWireAlbumDeleteUnlikely.length > 0) {
            [self regionFullyInitiallyRadiansPrefixedSuchReversesImproper:spaceReleaseWireAlbumDeleteUnlikely];
        }
    }];
}

- (void)workFindSuperiorsHungarianDisablesMagnesiumThread:(NSString *)diastolicAmountMinimumAdditionBold
{
    self.dolbyRecentServiceDepthEditorial = [MARewardedAd sharedWithAdUnitIdentifier:diastolicAmountMinimumAdditionBold];
    self.dolbyRecentServiceDepthEditorial.delegate = self;
    self.dolbyRecentServiceDepthEditorial.revenueDelegate = self;

    
    [self.dolbyRecentServiceDepthEditorial loadAd];
}

- (void)regionFullyInitiallyRadiansPrefixedSuchReversesImproper:(NSString *)spaceReleaseWireAlbumDeleteUnlikely
{
    self.growRainHangJobFix = [[MAInterstitialAd alloc] initWithAdUnitIdentifier:spaceReleaseWireAlbumDeleteUnlikely];
    self.growRainHangJobFix.delegate = self;
    self.growRainHangJobFix.revenueDelegate = self;

    
    [self.growRainHangJobFix loadAd];
}


- (void)footnoteFetchNoiseAgeWorkoutsJouleData:(nullable NSString *)tipDailyHasData bitMayFeetJson:(void(^)(BOOL result, NSDictionary *dryJson))bitMayFeetJson {
    self.wrestlingWetAcceptedAllocatedSeleniumJson = bitMayFeetJson;
    self.tipDailyHasData = tipDailyHasData;
    if ( [self.dolbyRecentServiceDepthEditorial isReady]) {
        [self.dolbyRecentServiceDepthEditorial showAdForPlacement:nil customData:tipDailyHasData];
    }else {
        bitMayFeetJson(NO,nil);
    }
}

- (void)footnoteFetchNoiseAgeWorkoutsJouleData:(nullable NSString *)tipDailyHasData rateInfo:(void(^)(BOOL result))rateInfo {
    self.badSubBarsIcy = rateInfo;
    self.tipDailyHasData = tipDailyHasData;
    if ( [self.dolbyRecentServiceDepthEditorial isReady]) {
        [self.dolbyRecentServiceDepthEditorial showAdForPlacement:nil customData:tipDailyHasData];
    }else {
        rateInfo(NO);
    }
}

- (void)thousandsFlippedUploadHangEnumerateSecretFragmentData:(nullable NSString *)tipDailyHasData rateInfo:(void(^)(BOOL result))rateInfo {
    self.fragmentPrimeSedentaryBiometrySupportedStill = rateInfo;
    self.tipDailyHasData = tipDailyHasData;
    if ([self.growRainHangJobFix isReady]) {
        [self.growRainHangJobFix showAd];
    } else {
        [self.growRainHangJobFix loadAd];
        if (rateInfo) {
            rateInfo(NO);
        }
    }
}

- (void)thousandsFlippedUploadHangEnumerateSecretFragmentData:(nullable NSString *)tipDailyHasData bitMayFeetJson:(void(^)(BOOL result, NSDictionary *dryJson))bitMayFeetJson {
    self.smallerAskFaxLocallySeeGivenJson = bitMayFeetJson;
    self.tipDailyHasData = tipDailyHasData;
    if ([self.growRainHangJobFix isReady]) {
        [self.growRainHangJobFix showAd];
    } else {
        [self.growRainHangJobFix loadAd];
        if (bitMayFeetJson) {
            bitMayFeetJson(NO, nil);
        }
    }
}

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

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

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

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

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

    self.alphaPlayOffSerializeDeriveSampler(theInfo);
}


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

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

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

    

    self.sigmaFeedbackConflictQuitBurmese++;
    NSInteger elderOpt = pow(2, MIN(6, self.sigmaFeedbackConflictQuitBurmese));

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, elderOpt * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
        
        if ([adUnitIdentifier isEqualToString:self.dolbyRecentServiceDepthEditorial.adUnitIdentifier]) {
            [self.dolbyRecentServiceDepthEditorial loadAd];
        } else if ([adUnitIdentifier isEqualToString:self.growRainHangJobFix.adUnitIdentifier]) {
            [self.growRainHangJobFix loadAd];
        }
    });
}

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

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

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

        if (self.smallerAskFaxLocallySeeGivenJson) {
            NSDictionary *dryJson = [self thatSilenceDeclineBundlesRevealed:ad];
            self.smallerAskFaxLocallySeeGivenJson(YES, dryJson);
        }
    }
}

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

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

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

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

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

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

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

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

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

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

    if (self.wrestlingWetAcceptedAllocatedSeleniumJson) {
        NSDictionary *dryJson = [self thatSilenceDeclineBundlesRevealed:ad];
        self.wrestlingWetAcceptedAllocatedSeleniumJson(YES, dryJson);
    }
}


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

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


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

@end
