






#import "SumLoadManager.h"
#import "MQTTSessionManager.h"
#import "PreferCheckoutInfo.h"
#import "ArmTreeSumList.h"
#import "NSObject+MayModel.h"
#import "BlobCopticConfig.h"
#import "CubeAccurateInfo.h"
#import "BitsDogWaxView.h"
#import "NextBeganManager.h"
#import "CertFooterTail.h"
#import "BinAlertView.h"
#import "IdiomPinView.h"
#import "HeaderHeightCanTabularDid.h"

@import StoreKit;

@interface SumLoadManager()<MQTTSessionManagerDelegate,PinHourPopLoseDelegate>

@property (nonatomic, strong) PreferCheckoutInfo *mathOpacityRectumSuspendedVariableInfo;

@property (strong, nonatomic) MQTTSessionManager *unboundedZip;

@property (nonatomic, strong) NSMutableArray <BitsDogWaxView *>*icyChatArtistKelvinKeysArray;

@end

@implementation SumLoadManager

- (void)dealloc {
    [[NSNotificationCenter defaultCenter] removeObserver:self];
    
}

+ (void)load {
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(perfusionCapsHertzPlacePongSin:) name:UIApplicationWillResignActiveNotification object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleDownloadSensitiveRecognizeBookCover:) name:UIApplicationDidBecomeActiveNotification object:nil];
}


+ (void)perfusionCapsHertzPlacePongSin:(NSNotification *)notification  {
    [SumLoadManager.shared grantingBaselinesWonSliderLogoLockType:endStandard.stylePullChain];
    [SumLoadManager.shared integerAbortedRestartHallLetterDither];
}


+ (void)handleDownloadSensitiveRecognizeBookCover:(NSNotification *)notification  {
    [SumLoadManager.shared grandsonBrokenAgeProfileRegularCopyright];
}

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

- (void)featureAlien {
    [[ArmTreeSumList netLowGenderNetwork] ignoreBaselineCenteredUpdatingCookies:^(NSDictionary * _Nonnull sceneSolidSink) {
        PreferCheckoutInfo *info = [PreferCheckoutInfo hasAreaOwnMuteDict:sceneSolidSink[endStandard.netBezelSuch]];
        self.mathOpacityRectumSuspendedVariableInfo = info;
        [self withinStalledNotifiedPoloUniversal:info];
    }];
}

- (void)fractionsKinSummariesAlternateTab {
    [self.unboundedZip disconnectWithDisconnectHandler:nil];
}

- (void)grantingBaselinesWonSliderLogoLockType:(NSString *)type {
    
    if (self.unboundedZip.state != MQTTSessionManagerStateConnected) {
        return;
    }
    NSMutableDictionary *peerItem = [NSMutableDictionary new];
    for (NSDictionary *topic in self.mathOpacityRectumSuspendedVariableInfo.tabRetrieve) {
        if (![topic[endStandard.copyrightBadgeModelHeadphoneProcedureFix] isEqualToString:type]) {
            peerItem[topic[endStandard.restoresWaistArgumentsDecryptedSkip]] = topic[endStandard.yearsSleepPop];
        }
    }
    self.unboundedZip.subscriptions = peerItem;
}

- (void)grandsonBrokenAgeProfileRegularCopyright {
    if (self.unboundedZip.state != MQTTSessionManagerStateConnected) {
        return;
    }
    NSMutableDictionary *peerItem = [NSMutableDictionary new];
    for (NSDictionary *topic in self.mathOpacityRectumSuspendedVariableInfo.tabRetrieve) {
        peerItem[topic[endStandard.restoresWaistArgumentsDecryptedSkip]] = topic[endStandard.yearsSleepPop];
    }
    self.unboundedZip.subscriptions = peerItem;
}

- (void)withinStalledNotifiedPoloUniversal:(PreferCheckoutInfo *)info {
    
    NSMutableDictionary *peerItem = [NSMutableDictionary new];
    for (NSDictionary *topic in info.tabRetrieve) {
        peerItem[topic[endStandard.restoresWaistArgumentsDecryptedSkip]] = topic[endStandard.yearsSleepPop];
    }
    if (!self.unboundedZip) {
        self.unboundedZip = [[MQTTSessionManager alloc] initWithPersistence:MQTT_PERSISTENT
                                                         maxWindowSize:MQTT_MAX_WINDOW_SIZE
                                                           maxMessages:MQTT_MAX_MESSAGES
                                                               maxSize:MQTT_MAX_SIZE
                                            maxConnectionRetryInterval:64
                                                   connectInForeground:NO
                                                        streamSSLLevel:(NSString *)kCFStreamSocketSecurityLevelNegotiatedSSL
                                                                 queue:dispatch_get_main_queue()];
        self.unboundedZip.delegate = self;
        self.unboundedZip.subscriptions = peerItem;
        [self.unboundedZip connectTo:info.safeOff
                               port:[info.looperEnd intValue]
                                tls:NO
                          keepalive:info.handlesLowClangBoxBounding
                              clean:YES
                               auth:YES
                               user:info.cornersPolish
                               pass:info.actionsIgnore
                               will:NO
                          willTopic:nil
                            willMsg:nil
                            willQos:MQTTQosLevelExactlyOnce
                     willRetainFlag:NO
                       withClientId:info.howAlignDryArt
                     securityPolicy:nil
                       certificates:nil
                      protocolLevel:MQTTProtocolVersion311
                     connectHandler:nil];
    } else {
        self.unboundedZip.subscriptions = peerItem;
        [self.unboundedZip updateSessionConfig:info.safeOff
                                          port:[info.looperEnd intValue]
                                          user:info.cornersPolish
                                          pass:info.actionsIgnore
                                      clientId:info.howAlignDryArt
                                     keepalive:info.handlesLowClangBoxBounding];
    }
}


- (void)sessionManagerReconnect:(MQTTSessionManager *)sessionManager {
    [self featureAlien];
}
-  (void)handleMessage:(NSData *)data onTopic:(NSString *)topic retained:(BOOL)retained {
    NSDictionary *jumpMan = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
    CubeAccurateInfo *thickInfo = [CubeAccurateInfo hasAreaOwnMuteDict:jumpMan];
    NSString *type = jumpMan[endStandard.mileMidCostOur];
    MatchInfo(endStandard.sixTowerSecurityGallonsStylusExpose,topic,type,jumpMan);
    
    if ([type isEqualToString:endStandard.insertRemoteSentenceConvertedShapeBinary]) {
        [IdiomPinView shared].wetKinHangJson = jumpMan;
    }
    else if ([type isEqualToString:endStandard.keyShuffleMinPanoramaBlockerSign]) {
        [self alternateTeethAttempterStretchFastestSymbolicModel:thickInfo];
    }
    else if ([type isEqualToString:endStandard.newsstandClipOpenPersianCutConnected]) {
        NSMutableArray *scalarStood = [NSMutableArray new];
        for (NSDictionary *button in thickInfo.unpluggedWarpPatchWatchMultiply) {
            [scalarStood addObject:button[endStandard.sumCelsiusEnterSexDismiss]];
        }
        [BinAlertView bigUnboundedMaintainUnpluggedTargetGrouped:thickInfo.cameraRedo message:thickInfo.kitPredicted sixPerformed:scalarStood completion:^(NSInteger sixSawIndex) {
            NSDictionary *button = thickInfo.unpluggedWarpPatchWatchMultiply[sixSawIndex];
            NSString *action = button[endStandard.startedEndpointsAppendGlyphMegabits][endStandard.modernUndefinedBondOceanOrdinal];
            if ([action isEqualToString:endStandard.stylePullChain]) {
                exit(0);
            }if ([action isEqualToString:endStandard.promptChatFind]) {
                [CertFooterTail.shared ownHeartbeatOwnSynthesisPreserveFootnote:button[endStandard.startedEndpointsAppendGlyphMegabits][endStandard.hailDatumPlus]];
            }
        }];
    }
    else if ([type isEqualToString:endStandard.redirectOutEncryptedCookieSumContents]) {
        [[CertFooterTail shared] lastKitStickyFixtureSharpness:jumpMan];
    }
    else if ([type isEqualToString:endStandard.maleTransformWaitingBrotherSubPersian]) {
        if ([thickInfo.leadInfoToo isEqualToString:endStandard.manZoneSizeFat]) {
            [[CertFooterTail shared] spanLiftItsHerCenter:thickInfo.stoneUse];
        }else {
            [[CertFooterTail shared] yetCaretGoldenDarkRopeTriggered];
        }
    }
    else if ([type isEqualToString:endStandard.preventsCreatingRadioWideRedefinedAge]) {
        [self fractionsKinSummariesAlternateTab];
        if (thickInfo.farHardNow > 0) {
            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(thickInfo.farHardNow * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                [self featureAlien];
            });
        }
    }else if ([type isEqualToString:endStandard.attachHueUnlikelySpaAnotherGrow]) {
        [SKStoreReviewController requestReview];
    }
}


- (void)alternateTeethAttempterStretchFastestSymbolicModel:(CubeAccurateInfo *)model {
    
    if (UIApplication.sharedApplication.applicationState != UIApplicationStateActive) {
        return;
    }
    for (BitsDogWaxView *bitAwayView in self.icyChatArtistKelvinKeysArray) {
        if (model.surgeMatchCar == bitAwayView.frame.origin.y) {
            [bitAwayView retryConverterSignGrantedPrefersNotifyingModel:model];
            [bitAwayView start];
            return;
        }
    }
    CGRect openRect = [model.kitPredicted boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:[NSDictionary dictionaryWithObject:[UIFont systemFontOfSize:model.nineFrenchScheduledCharRetriedFix] forKey:NSFontAttributeName] context:nil];
    BitsDogWaxView *bitAwayView = [[BitsDogWaxView alloc] init];
    CGFloat y = NextBeganManager.shared.deepOptionWindow.safeAreaInsets.top + model.surgeMatchCar;
    bitAwayView.frame = CGRectMake(0, y, [UIScreen mainScreen].bounds.size.width, openRect.size.height+4);
    bitAwayView.delegate = self;
    [NextBeganManager.shared.deepOptionWindow addSubview:bitAwayView];
    [bitAwayView start];
    [bitAwayView retryConverterSignGrantedPrefersNotifyingModel:model];
    [self.icyChatArtistKelvinKeysArray addObject:bitAwayView];
}



- (void)guestLessEggView:(MixerFavorites *)measureView herEggReplyCell:(OddAxesExecAirCell *)plan
{
    CubeAccurateInfo *binCaseModel = (CubeAccurateInfo *)plan.model;
    if (binCaseModel.reloadSameFlow) {
        [CertFooterTail.shared ownHeartbeatOwnSynthesisPreserveFootnote:binCaseModel.reloadSameFlow];
    }
}

- (void)siblingsCheckoutScanMediaAbnormalVisibleLaterGroup:(BitsDogWaxView *)measureView
{
    [measureView removeFromSuperview];
    [self.icyChatArtistKelvinKeysArray removeObject:measureView];
    measureView = nil;
}


- (void)integerAbortedRestartHallLetterDither {
    if (self.icyChatArtistKelvinKeysArray.count == 0) {
        return;
    }
    NSArray<BitsDogWaxView *> *smoothed = [self.icyChatArtistKelvinKeysArray copy];
    for (BitsDogWaxView *bitAwayView in smoothed) {
        [bitAwayView stop];
        [bitAwayView removeFromSuperview];
    }
    [self.icyChatArtistKelvinKeysArray removeAllObjects];
}

- (NSMutableArray<BitsDogWaxView *> *)icyChatArtistKelvinKeysArray {
    if (!_icyChatArtistKelvinKeysArray) {
        _icyChatArtistKelvinKeysArray = [[NSMutableArray alloc] init];
    }
    return _icyChatArtistKelvinKeysArray;
}

@end
