






#import "HexDiscrete.h"
#import "NSString+RoleBreak.h"
#import "UIImageView+WebCache.h"
#import "AirSixInfo.h"
#import "UIColor+FaxColor.h"
#import "UIImage+BagImage.h"
#import "Masonry.h"

#import "WorkoutCapConfig.h"
#import "MixIcyManager.h"
#import "ConstructBeatAffiliateSwitchGeneric.h"


@interface XXGCapsuleButton : UIButton
@end

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

static OrdinaryUplink *_twistSheWasWin = nil;
static IdleBounce *_shelfTenSide = nil;

@implementation HexDiscrete

+ (OrdinaryUplink *)twistSheWasWin {
    if (!_twistSheWasWin) {
        _twistSheWasWin = [ConstructBeatAffiliateSwitchGeneric artworkSiteManagersBandwidthSectionSwimming:[OrdinaryUplink class]];
    }
    return _twistSheWasWin;
}

+ (IdleBounce *)shelfTenSide {
    if (!_shelfTenSide) {
        _shelfTenSide = [ConstructBeatAffiliateSwitchGeneric dimensionLyricistInfoSwedishGenderAlphabet:[IdleBounce class]];
    }
    return _shelfTenSide;
}

+ (NSString *)fairBigShotSupplyQuitName {
    return [MixIcyManager executeZipLongitudeBlinkTake].storeOneName;
}

+ (NSString *)issueHeapInterlacePubMusicToken {
    return [MixIcyManager executeZipLongitudeBlinkTake].hallPlayToken;
}

+ (CGFloat)canonZipKashmiriUnsignedAll {
    return WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.spouseSpaTwelvePopLanguage.femaleEye?:self.shelfTenSide.penSobMarathi;
}

+ (NSString *)subtitlePeopleSentReachableLifetime {
    return WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.faxCloudWay.wonButCurl;
}

+ (NSString *)serializeThirdVideoReusableSummariesSodium {
    return WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.spouseSpaTwelvePopLanguage.baselineLegacyKeyOperandColor;
}

+ (CGFloat)coalescedKilogramsSomaliEntityBuilt {
    return WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.spouseSpaTwelvePopLanguage.putThemeSubfamilyGroupingMask;
}
+ (BOOL)putThemeSubfamilyGroupingMask {
    return WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.spouseSpaTwelvePopLanguage.putThemeSubfamilyGroupingMask;
}

+ (NSString *)checksumBorderedSubscriptYouDate {
    return WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.scalingScene.curlSinBagEdit;
}
+ (NSString *)chatHurricaneRespectsMoveMovie {
    return WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.scalingScene.widthRuleFix;
}

+ (BOOL)uppercaseIntegersUtilityTwistTip {
    return WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.emptyAsleepEnterLaunchedBrandTextureCorner;
}

+ (BOOL)groupedTag {
    return WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.scalingScene.groupedTag;
}

+ (BOOL)areSucceedPanLowSoloThe {
    return [WorkoutCapConfig shared].areSucceedPanLowSoloThe;
}

+ (NSArray *)treeBlockerReloadJouleLegacy {
    NSArray *fireMatchAgeIgnoringMap = [MixIcyManager moderateSynthesisChooseSliderSegueLike];
    NSMutableArray *loss = [NSMutableArray arrayWithCapacity:fireMatchAgeIgnoringMap.count];
    
    for (NextMonotonic *law in fireMatchAgeIgnoringMap) {
        NSString *image = self.shelfTenSide.quickImpactPutTowerBuildBuilder;
        switch (law.frontOffType) {
            case CursiveInternalHerHalftonePurpose:
                image = self.shelfTenSide.footNapPointerIgnorePerfusionInterest;
                break;
            case TagRelayCauseAccount:
            case BirthApplyingRegister:
                image = self.shelfTenSide.quickImpactPutTowerBuildBuilder;
                break;
            case HeavyUploadKeyCompareCert:
                image = self.shelfTenSide.faxPacketWindowsIodineEngineCollapse;
                break;

case CanVendorMoleRenewedBlinkIcy:
                image = self.shelfTenSide.immediateInsideFunctionsCallbacksCloudyTemp;
                break;
            case ArtsOrnamentFlushAuxiliaryUses:
                image = self.shelfTenSide.exitsVectorAnimatingShadowOptimize;
                break;
            default:
                image = self.shelfTenSide.footNapPointerIgnorePerfusionInterest;
                break;
        }
        
        NSArray *who = @[law.storeOneName ?: @"",image,law.photosCharCompactPlainBlueTime];
        [loss addObject:who];
    }
    
    
    NSArray *eraSpecify = [loss sortedArrayUsingComparator:^NSComparisonResult(NSArray *a, NSArray *b) {
        double bin = [a[2] doubleValue];
        double bar = [b[2] doubleValue];
        if (bin > bar) {
            return NSOrderedAscending; 
        } else if (bin < bar) {
            return NSOrderedDescending;
        }
        return NSOrderedSame;
    }];
    
    return eraSpecify;
}

+ (CGSize)grantingMultipleImmediateExpandStrokingSockSize {
    return CGSizeMake(self.shelfTenSide.finderTriangleLigaturesAcceptingOceanWidth, self.shelfTenSide.tipBrushTabPermittedGradientShift);
}

+ (UIColor *)thinClaimColor{
    return [UIColor tripleGaspSlovakDecomposeReusableWide:WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.moleRaiseLaunchTorqueLongestScore.thinClaimColor?:self.shelfTenSide.thinClaimColor];
}

+ (UIColor *)prominentColor{
    return [UIColor tripleGaspSlovakDecomposeReusableWide:WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.moleRaiseLaunchTorqueLongestScore.prominentColor?:self.shelfTenSide.prominentColor];
}

+ (UIColor *)flipHitPoloColor {
    NSString *hex = WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.moleRaiseLaunchTorqueLongestScore.flipHitPoloColor;
    return hex.nextFurlongsGroupedSeekingPolar ? [UIColor tripleGaspSlovakDecomposeReusableWide:hex] : UIColor.whiteColor;
}

+ (UIColor *)problemBroadcastBitRouteYearColor{
    return [UIColor tripleGaspSlovakDecomposeReusableWide:WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.moleRaiseLaunchTorqueLongestScore.problemBroadcastBitRouteYearColor?:self.shelfTenSide.problemBroadcastBitRouteYearColor];
}

+ (NSString *)iodineJustCapturedFairPickImage{
    NSString *image = WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.moleRaiseLaunchTorqueLongestScore.iodineJustCapturedFairPickImage;
    return image.nextFurlongsGroupedSeekingPolar ? image : nil;
}

+ (NSString *)signingTryChannelSubmittedPaletteImage{
    NSString *image = WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.moleRaiseLaunchTorqueLongestScore.signingTryChannelSubmittedPaletteImage;
    return image.nextFurlongsGroupedSeekingPolar ? image : nil;
}

+ (void)armCollapsedDegreesChallengeGradientAction {
    if (WorkoutCapConfig.shared.memberBlockStatus != SkinDebuggerJustRestingBuddyYou) {
        WorkoutCapConfig.shared.memberBlockStatus = RespondsBusHitInsertionMeteringFire;
    }
}

+ (UIView *)forceHintView {
    if (WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.awakeStrongCheckingFusionModeRemembers.nextFurlongsGroupedSeekingPolar) {
        UIImageView *view = [[UIImageView alloc] init];
        [view sd_setImageWithURL:[NSURL URLWithString:WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.awakeStrongCheckingFusionModeRemembers]];
        view.contentMode = UIViewContentModeScaleAspectFit;
        return view;
    }else {
        UILabel *label = [[UILabel alloc] init];
        label.text = [AirSixInfo widthTopName];
        label.textColor = [self prominentColor];
        label.font = [UIFont systemFontOfSize:30];
        label.textAlignment = NSTextAlignmentCenter;
        return label;
    }
}

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

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

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

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

    NSString *pullMagicSkip = [self signingTryChannelSubmittedPaletteImage];
    if (pullMagicSkip) {
        
        [[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:pullMagicSkip]
                                                    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 catHumanPubYetColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
                });
            }
        }];
        
        [button setBackgroundImage:[UIImage catHumanPubYetColor:[self prominentColor]] forState:UIControlStateNormal];
    } else {
        
        [button setBackgroundImage:[UIImage catHumanPubYetColor:[self prominentColor]] forState:UIControlStateNormal];
        [button setBackgroundImage:[UIImage catHumanPubYetColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    }

    return button;
}

+ (NSArray *)dutchBitEnergyHangBadRace:(id)target action:(SEL)action {
    
    NSMutableArray *array = [[NSMutableArray alloc] init];
    
    for (MaskMenModel *law in WorkoutCapConfig.shared.opacityTatarBarriersLevelRanked.layoutFeedbackFootersInitiallySwimmingRepublic) {
        UIView *button = [self apertureReceiveFrictionCauseQualifierInserted:law.stateLiterText
                                           powerOnceColor:[UIColor tripleGaspSlovakDecomposeReusableWide:law.selfBedAgeColor]
                                                sonPashto:[self detachingExtentKeyRandomSee:law]
                                           tooWaxSobTouch:law.bigDarken
                                                   target:target
                                                   action:action];
        [array addObject:button];
    }
    
    return array;
}

+ (NSString *)detachingExtentKeyRandomSee:(MaskMenModel *)law {
    
    static NSDictionary<NSString *, NSString *> *map;
    static dispatch_once_t paceToken;
    dispatch_once(&paceToken, ^{
        map = @{
            
            self.shelfTenSide.photoBrief    : self.shelfTenSide.footNapPointerIgnorePerfusionInterest,
            self.shelfTenSide.fixtureMill   : self.shelfTenSide.faxPacketWindowsIodineEngineCollapse,
            self.shelfTenSide.duplexBurmese : self.shelfTenSide.quickImpactPutTowerBuildBuilder,

self.shelfTenSide.faceMax       : self.shelfTenSide.exitsVectorAnimatingShadowOptimize,
            self.shelfTenSide.editStateUsed : self.shelfTenSide.immediateInsideFunctionsCallbacksCloudyTemp,
            self.shelfTenSide.lockFriend : self.shelfTenSide.footNapPointerIgnorePerfusionInterest
        };
    });
    if (law.wonButCurl.manyClearNet) {
        
        law.wonButCurl = map[law.bigDarken];
    }
    return law.wonButCurl;
}

+ (UIView *)apertureReceiveFrictionCauseQualifierInserted:(NSString *)title
                      powerOnceColor:(UIColor *)titleColor
                           sonPashto:(NSString *)image
                      tooWaxSobTouch:(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 chromaExcludedPoliciesBridgeBiotin: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 *tagImage = [[UIImage hebrewLostLengthKeysLegacyName:image] imageWithRenderingMode:(UIImageRenderingModeAlwaysTemplate)];
        button.tintColor = [self prominentColor];
        [button setImage:tagImage 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 = [HexDiscrete markDeviceCollationPassCricket: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)chromaExcludedPoliciesBridgeBiotin:(NSString *)url
{
    NSString *years =@"[a-zA-z]+://[^\\s]*";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",years];
    return [predicate evaluateWithObject:url];
}

+ (UITextField *)chapterMinderAlignedInvertHindiRealCode {
    UITextField *textField = [self wonFlipFlagField:self.twistSheWasWin.waistSheFoundCurrentlyDitherSexCode isSecure:NO];
    textField.textContentType = UITextContentTypeOneTimeCode;
    return textField;
}

+ (UITextField *)halfSmileSelectedCertStepFormats {
    UITextField *textField = [self wonFlipFlagField:self.twistSheWasWin.deliveryMacintoshPanoramaDarkerSecurity isSecure:NO];
    textField.keyboardType = UIKeyboardTypeNumberPad;
    return textField;
}

+ (UITextField *)overhangChinaExternWrappersCathedralAccount {
    return [self wonFlipFlagField:self.twistSheWasWin.leftDirtyWalk isSecure:NO];
}

+ (UITextField *)photoScannerSpokenEndIntensityPassword:(BOOL)isNew {
    UITextField *textField = [self wonFlipFlagField:isNew?self.twistSheWasWin.wonLettersUpperSuperiorsAccessing:self.twistSheWasWin.allHasShePlayKey isSecure:YES];
    [self supportsSubgroupsImportantSeparateStandardDiagnosePen:textField optSize:CGSizeMake(HexDiscrete.shelfTenSide.mealFirstUse, HexDiscrete.shelfTenSide.mealFirstUse)];
    UIButton * rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage *readImage = [UIImage hebrewLostLengthKeysLegacyName:self.shelfTenSide.gaspAssertMatchChecksumLiner];
    UIImage *tabOneImage = [UIImage hebrewLostLengthKeysLegacyName:self.shelfTenSide.formatSuchFontIncorrectDismissed];
    rightButton.frame = CGRectMake(0, 0, HexDiscrete.shelfTenSide.mealFirstUse, HexDiscrete.shelfTenSide.mealFirstUse);
    [rightButton setImage:readImage forState:UIControlStateNormal];
    [rightButton setImage:tabOneImage forState:UIControlStateSelected];
    CGFloat dogFemaleArm = (HexDiscrete.shelfTenSide.mealFirstUse - 24)/2;
    [rightButton setImageEdgeInsets:UIEdgeInsetsMake(dogFemaleArm, dogFemaleArm, dogFemaleArm, dogFemaleArm)];
    rightButton.contentMode = UIViewContentModeScaleAspectFit;
    [textField.rightView addSubview:rightButton];
    return textField;
}

+ (UITextField *)wonFlipFlagField:(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 prominentColor].CGColor;
    textField.layer.borderWidth = 0.6;
    textField.layer.cornerRadius = self.shelfTenSide.deferredHall;
    
    textField.backgroundColor = [self iodineJustCapturedFairPickImage] ? UIColor.clearColor : UIColor.whiteColor;
    textField.textColor = UIColor.darkGrayColor;
    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
    [self exactDecoderAirborneNegotiateFiveTallSupply:textField optSize:CGSizeMake(10, HexDiscrete.shelfTenSide.mealFirstUse)];
    textField.rightViewMode = UITextFieldViewModeAlways;
    return textField;
}

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

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