






#import "LearnWeekly.h"
#import "NSString+YearSetup.h"
#import "UIImageView+WebCache.h"
#import "CutoffInfo.h"
#import "UIColor+WhoColor.h"
#import "UIImage+EarImage.h"
#import "Masonry.h"

#import "MidMailTagConfig.h"
#import "GaelicManager.h"
#import "MindfulBridgedArtPaceDown.h"


@interface XXGCapsuleButton : UIButton
@end

@implementation XXGCapsuleButton
- (void)layoutSubviews {
    [super layoutSubviews];
    self.layer.cornerRadius = CGRectGetHeight(self.bounds) / 2.0;
}
@end

static HisTempOldAway *_estonianBanner = nil;
static IgnoreExec *_reuseRenewal = nil;

@implementation LearnWeekly

+ (HisTempOldAway *)estonianBanner {
    if (!_estonianBanner) {
        _estonianBanner = [MindfulBridgedArtPaceDown italicsBlobCentralsValidatesWhoBoost:[HisTempOldAway class]];
    }
    return _estonianBanner;
}

+ (IgnoreExec *)reuseRenewal {
    if (!_reuseRenewal) {
        _reuseRenewal = [MindfulBridgedArtPaceDown containedFutureLockLettersEnterLinkage:[IgnoreExec class]];
    }
    return _reuseRenewal;
}

+ (NSString *)sceneMenstrualPutIdentifyRedName {
    return [GaelicManager daysSnapSonTemplateWindows].sixMouthName;
}

+ (NSString *)fixSobAbortedTextualRoundToken {
    return [GaelicManager daysSnapSonTemplateWindows].onlySkinToken;
}

+ (CGFloat)compactBridgedTokenResponderDeprecate {
    return MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.somaliSixNearbyVisibleCharging.farIndigo?:self.reuseRenewal.resetTopFront;
}

+ (NSString *)trainerNapDigitalDashPersonal {
    return MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.fitDayStone.hexBusyBed;
}

+ (NSString *)jumpSubtractLogTalkReturnedHeader {
    return MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.somaliSixNearbyVisibleCharging.opticalTwoOuncesCupCardioid;
}

+ (CGFloat)germanRetriedNegotiateAnglePronoun {
    return MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.somaliSixNearbyVisibleCharging.ageStackedSugarKitLength;
}
+ (BOOL)ageStackedSugarKitLength {
    return MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.somaliSixNearbyVisibleCharging.ageStackedSugarKitLength;
}

+ (NSString *)indexingBarPenPatternThick {
    return MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.sumCaretRows.centersJoining;
}
+ (NSString *)obscuredFlowBalancedStrengthAperture {
    return MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.sumCaretRows.heartThrough;
}

+ (BOOL)sonBackwardsFragmentsReachedDecompose {
    return MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.staticSenseLoveMostlyScopeConsumesIgnoring;
}

+ (BOOL)itsOddSeed {
    return MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.sumCaretRows.itsOddSeed;
}

+ (BOOL)presetEphemeralFollowChangingRetriedWritten {
    return [MidMailTagConfig shared].presetEphemeralFollowChangingRetriedWritten;
}

+ (NSArray *)incomingPitchTheArmpitExpand {
    NSArray *languagesPeriodicFootersEffectivePostcard = [GaelicManager boxRemovableCompanyKindTicketsNine];
    NSMutableArray *near = [NSMutableArray arrayWithCapacity:languagesPeriodicFootersEffectivePostcard.count];
    
    for (LoseKnowDaily *bin in languagesPeriodicFootersEffectivePostcard) {
        NSString *image = self.reuseRenewal.borderIcyIndexStyleSaturatedMost;
        switch (bin.quitMaleType) {
            case ReturnDateWorkingCompositeOpaque:
                image = self.reuseRenewal.basePanExpectingLowercaseClusterPart;
                break;
            case UtteranceBodyAccount:
            case EarWrittenRunRegister:
                image = self.reuseRenewal.borderIcyIndexStyleSaturatedMost;
                break;
            case FrontDigestPrepAlongTagger:
                image = self.reuseRenewal.decodeDayComposeFilmFocalAppend;
                break;

case ExpandedChangedSeparatedMirroringTagsOff:
                image = self.reuseRenewal.phoneticForceRevertAnimateDiscreteLiter;
                break;
            case ProgressCacheDepartureClockwiseMile:
                image = self.reuseRenewal.scanAppendingSignCommonGranted;
                break;
            default:
                image = self.reuseRenewal.basePanExpectingLowercaseClusterPart;
                break;
        }
        
        NSArray *his = @[bin.sixMouthName ?: @"",image,bin.selectionModernBoundaryUbiquityArcadeTime];
        [near addObject:his];
    }
    
    
    NSArray *appleRealm = [near sortedArrayUsingComparator:^NSComparisonResult(NSArray *a, NSArray *b) {
        double say = [a[2] doubleValue];
        double son = [b[2] doubleValue];
        if (say > son) {
            return NSOrderedAscending; 
        } else if (say < son) {
            return NSOrderedDescending;
        }
        return NSOrderedSame;
    }];
    
    return appleRealm;
}

+ (CGSize)keyTrialRetryDismissConcertSingleSize {
    return CGSizeMake(self.reuseRenewal.reviewArmpitBeenTurkmenChecksumWidth, self.reuseRenewal.bitmapShareDailyProvidingYouMargin);
}

+ (UIColor *)uptimeIcyColor{
    return [UIColor boundaryDivideHandlesBankGopherEnvelope:MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.givenArcheryCroatianOffOverageAsk.uptimeIcyColor?:self.reuseRenewal.uptimeIcyColor];
}

+ (UIColor *)youBorderColor{
    return [UIColor boundaryDivideHandlesBankGopherEnvelope:MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.givenArcheryCroatianOffOverageAsk.youBorderColor?:self.reuseRenewal.youBorderColor];
}

+ (UIColor *)smartFixHasColor {
    NSString *hex = MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.givenArcheryCroatianOffOverageAsk.smartFixHasColor;
    return hex.iodineSignalingAcrossEachProduce ? [UIColor boundaryDivideHandlesBankGopherEnvelope:hex] : UIColor.whiteColor;
}

+ (UIColor *)cutFragmentsProvidePinResumedColor{
    return [UIColor boundaryDivideHandlesBankGopherEnvelope:MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.givenArcheryCroatianOffOverageAsk.cutFragmentsProvidePinResumedColor?:self.reuseRenewal.cutFragmentsProvidePinResumedColor];
}

+ (NSString *)drivenRangingFloorKilogramLeadImage{
    NSString *image = MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.givenArcheryCroatianOffOverageAsk.drivenRangingFloorKilogramLeadImage;
    return image.iodineSignalingAcrossEachProduce ? image : nil;
}

+ (NSString *)rowEnsureCupShrinkLocationsImage{
    NSString *image = MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.givenArcheryCroatianOffOverageAsk.rowEnsureCupShrinkLocationsImage;
    return image.iodineSignalingAcrossEachProduce ? image : nil;
}

+ (void)semicolonThemeReadableCapOverageAction {
    if (MidMailTagConfig.shared.lawWasStairStatus != TertiaryArmDustLeaseAlignRaw) {
        MidMailTagConfig.shared.lawWasStairStatus = ServicesCoastHighestResultWeightsRate;
    }
}

+ (UIView *)serializeView {
    if (MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.typeDestroyTatarPutDogFitness.iodineSignalingAcrossEachProduce) {
        UIImageView *view = [[UIImageView alloc] init];
        [view sd_setImageWithURL:[NSURL URLWithString:MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.typeDestroyTatarPutDogFitness]];
        view.contentMode = UIViewContentModeScaleAspectFit;
        return view;
    }else {
        UILabel *label = [[UILabel alloc] init];
        label.text = [CutoffInfo cellSoloName];
        label.textColor = [self youBorderColor];
        label.font = [UIFont systemFontOfSize:30];
        label.textAlignment = NSTextAlignmentCenter;
        return label;
    }
}

+ (UILabel *)escapingSleepNextInnerBattery:(NSString *)title {
    UILabel *label = [UILabel new];
    label.text = title;
    label.textColor = [self youBorderColor];
    label.font = [UIFont systemFontOfSize:13];
    return label;
}

+ (UIButton *)obtainAnswerSourcesDetachFourth:(NSString *)title {
    UIButton *button = [[UIButton alloc] init];
    [button setTitle:title forState:UIControlStateNormal];
    [button setTitleColor:[self youBorderColor] forState:UIControlStateNormal];
    [button setTitleColor:UIColor.lightGrayColor forState:UIControlStateHighlighted];
    button.titleLabel.font = [UIFont systemFontOfSize:13];
    return button;
}

+ (UIButton *)uploadedNicknameCancelingLibraryPurpleColor:(NSString *)title {

    XXGCapsuleButton *button = [XXGCapsuleButton buttonWithType:UIButtonTypeCustom];
    [button setTitle:title forState:UIControlStateNormal];
    [button setTitleColor:[self smartFixHasColor] forState:UIControlStateNormal];
    button.titleLabel.font = [UIFont systemFontOfSize:16];
    
    button.layer.masksToBounds = YES;

    NSString *packSpaFunEar = [self rowEnsureCupShrinkLocationsImage];
    if (packSpaFunEar) {
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:packSpaFunEar]
                                                    options:0
                                                   progress:nil
                                                  completed:^(UIImage *image, NSData *data, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
            if (image) {
                dispatch_async(dispatch_get_main_queue(), ^{
                    [button setBackgroundImage:image forState:UIControlStateNormal];
                    [button setBackgroundImage:[UIImage lawYetRealmMayColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
                });
            }
        }];
        
        [button setBackgroundImage:[UIImage lawYetRealmMayColor:[self youBorderColor]] forState:UIControlStateNormal];
    } else {
        
        [button setBackgroundImage:[UIImage lawYetRealmMayColor:[self youBorderColor]] forState:UIControlStateNormal];
        [button setBackgroundImage:[UIImage lawYetRealmMayColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    }

    return button;
}

+ (NSArray *)parameterGrandsonMidValueNapFax:(id)target action:(SEL)action {
    
    NSMutableArray *array = [[NSMutableArray alloc] init];
    
    for (ProcessModel *bin in MidMailTagConfig.shared.obtainDecisionCallbacksViolationMismatch.performerMillionHisClaimGoldenLatitude) {
        UIView *button = [self photosDailyDiscoverCurlDownloadsAlternate:bin.unionAuditText
                                           rotateTenColor:[UIColor boundaryDivideHandlesBankGopherEnvelope:bin.canTipHomeColor]
                                                cousinRun:[self sendChainCameraGradientInterrupt:bin]
                                           wonBoxCertMark:bin.searchTab
                                                   target:target
                                                   action:action];
        [array addObject:button];
    }
    
    return array;
}

+ (NSString *)sendChainCameraGradientInterrupt:(ProcessModel *)bin {
    
    static NSDictionary<NSString *, NSString *> *map;
    static dispatch_once_t pathToken;
    dispatch_once(&pathToken, ^{
        map = @{
            
            self.reuseRenewal.sobKitHint    : self.reuseRenewal.basePanExpectingLowercaseClusterPart,
            self.reuseRenewal.birthTorque   : self.reuseRenewal.decodeDayComposeFilmFocalAppend,
            self.reuseRenewal.wetSharingDue : self.reuseRenewal.borderIcyIndexStyleSaturatedMost,

self.reuseRenewal.tapMole       : self.reuseRenewal.scanAppendingSignCommonGranted,
            self.reuseRenewal.vitalityBlend : self.reuseRenewal.phoneticForceRevertAnimateDiscreteLiter,
            self.reuseRenewal.wrapCharge : self.reuseRenewal.basePanExpectingLowercaseClusterPart
        };
    });
    if (bin.hexBusyBed.mustDefaults) {
        
        bin.hexBusyBed = map[bin.searchTab];
    }
    return bin.hexBusyBed;
}

+ (UIView *)photosDailyDiscoverCurlDownloadsAlternate:(NSString *)title
                      rotateTenColor:(UIColor *)titleColor
                           cousinRun:(NSString *)image
                      wonBoxCertMark:(NSString *)idf
                              target:(id)target
                              action:(SEL)action {
    
    UIView *view = [[UIView alloc] init];
    view.backgroundColor = UIColor.clearColor;
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.layer.masksToBounds = YES;
    button.accessibilityIdentifier = idf;
    
    if ([self checkedReductionAscentRevisionsMantissa:image]) {
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:image] options:0 progress:nil completed:^(UIImage * _Nullable image2, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
            dispatch_async(dispatch_get_main_queue(), ^{
                [button setImage:image2 forState:UIControlStateNormal];
            });
        }];

    }else {
        UIImage *cutImage = [[UIImage resourcesFunAskHandoffSaltName:image] imageWithRenderingMode:(UIImageRenderingModeAlwaysTemplate)];
        button.tintColor = [self youBorderColor];
        [button setImage:cutImage forState:UIControlStateNormal];
    }
    
    button.contentEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 0);
    [[button imageView] setContentMode:UIViewContentModeScaleAspectFill];
    button.contentHorizontalAlignment= UIControlContentHorizontalAlignmentFill;
    button.contentVerticalAlignment = UIControlContentVerticalAlignmentFill;
    [button addTarget:target action:action forControlEvents:(UIControlEventTouchUpInside)];
    [view addSubview:button];
    
    UILabel *label = [LearnWeekly escapingSleepNextInnerBattery:title];
    label.textColor = titleColor;
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont systemFontOfSize:12];
    label.numberOfLines = 0;
    [view addSubview:label];
    
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(view);
        make.size.equalTo(view);
    }];
    
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(view.mas_bottom).offset(8);
        make.left.right.equalTo(view);
    }];
    
    return view;
}

+ (BOOL)checkedReductionAscentRevisionsMantissa:(NSString *)url
{
    NSString *cycle =@"[a-zA-z]+://[^\\s]*";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",cycle];
    return [predicate evaluateWithObject:url];
}

+ (UITextField *)scrolledPermuteDustCarbonSectionSkinCode {
    UITextField *textField = [self snowLawGramField:self.estonianBanner.malayCustomShareStrongRepliesNetscapeCode isSecure:NO];
    textField.textContentType = UITextContentTypeOneTimeCode;
    return textField;
}

+ (UITextField *)scannedAuxiliaryVitalTelephoneHighEnable {
    UITextField *textField = [self snowLawGramField:self.estonianBanner.dogKernelsPlayingFactCervical isSecure:NO];
    textField.keyboardType = UIKeyboardTypeNumberPad;
    return textField;
}

+ (UITextField *)userCarriageTeethDomainPrecisionAccount {
    return [self snowLawGramField:self.estonianBanner.soloSmartWork isSecure:NO];
}

+ (UITextField *)bottomSpectralMostSchemeInitialPassword:(BOOL)isNew {
    UITextField *textField = [self snowLawGramField:isNew?self.estonianBanner.mouseAnimateEmbeddingPrototypeDrain:self.estonianBanner.alignmentRoleKey isSecure:YES];
    [self proceedGradeNotTrustTipWrapUnbound:textField netSize:CGSizeMake(LearnWeekly.reuseRenewal.rawAdverbArt, LearnWeekly.reuseRenewal.rawAdverbArt)];
    UIButton * rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage *siteImage = [UIImage resourcesFunAskHandoffSaltName:self.reuseRenewal.barrierToleranceInstallTriggeredNet];
    UIImage *sampleImage = [UIImage resourcesFunAskHandoffSaltName:self.reuseRenewal.burmeseSymmetricDanceWaitAccessory];
    rightButton.frame = CGRectMake(0, 0, LearnWeekly.reuseRenewal.rawAdverbArt, LearnWeekly.reuseRenewal.rawAdverbArt);
    [rightButton setImage:siteImage forState:UIControlStateNormal];
    [rightButton setImage:sampleImage forState:UIControlStateSelected];
    CGFloat albumPopPath = (LearnWeekly.reuseRenewal.rawAdverbArt - 24)/2;
    [rightButton setImageEdgeInsets:UIEdgeInsetsMake(albumPopPath, albumPopPath, albumPopPath, albumPopPath)];
    rightButton.contentMode = UIViewContentModeScaleAspectFit;
    [textField.rightView addSubview:rightButton];
    return textField;
}

+ (UITextField *)snowLawGramField:(NSString *)placeholder isSecure:(BOOL)isSecure {
    UITextField *textField = [UITextField new];
    textField.secureTextEntry = isSecure;
    textField.clearButtonMode = UITextFieldViewModeWhileEditing;
    textField.autocorrectionType = UITextAutocorrectionTypeNo;
    textField.autocapitalizationType = UITextAutocapitalizationTypeNone;
    textField.font = [UIFont systemFontOfSize:15];
    textField.layer.borderColor = [self youBorderColor].CGColor;
    textField.layer.borderWidth = 0.6;
    textField.layer.cornerRadius = self.reuseRenewal.stopVariance;
    
    textField.backgroundColor = [self drivenRangingFloorKilogramLeadImage] ? UIColor.clearColor : UIColor.whiteColor;
    textField.textColor = UIColor.darkGrayColor;
    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
    [self firstSenseRevertEggAreProposedAre:textField netSize:CGSizeMake(10, LearnWeekly.reuseRenewal.rawAdverbArt)];
    textField.rightViewMode = UITextFieldViewModeAlways;
    return textField;
}

+ (void)firstSenseRevertEggAreProposedAre:(UITextField *)textField netSize:(CGSize)size
{
    CGRect frame = {{0,0},size};
    UIView *hundreds = [[UIView alloc] initWithFrame:frame];
    textField.leftViewMode = UITextFieldViewModeAlways;
    textField.leftView = hundreds;
}

+ (void)proceedGradeNotTrustTipWrapUnbound:(UITextField *)textField netSize:(CGSize)size
{
    CGRect frame = {{0,0},size};
    UIView *silentAny = [[UIView alloc] initWithFrame:frame];
    textField.rightViewMode = UITextFieldViewModeAlways;
    textField.rightView = silentAny;
}
@end
