






#import "WinNeedHang.h"
#import "NSString+TalkBound.h"
#import "UIImageView+WebCache.h"
#import "ExpireInfo.h"
#import "UIColor+LowColor.h"
#import "UIImage+EggImage.h"
#import "Masonry.h"

#import "CutYoungerConfig.h"
#import "IodineManager.h"
#import "VisionEastProjectLocalityLocales.h"

static ButBigUpperTry *_mapSonInputIll = nil;
static CameraPool *_chargePenSin = nil;

@implementation WinNeedHang

+ (ButBigUpperTry *)mapSonInputIll {
    if (!_mapSonInputIll) {
        _mapSonInputIll = [VisionEastProjectLocalityLocales cursorListenerLigaturesCentralShotFinal:[ButBigUpperTry class]];
    }
    return _mapSonInputIll;
}

+ (CameraPool *)chargePenSin {
    if (!_chargePenSin) {
        _chargePenSin = [VisionEastProjectLocalityLocales soundEnhancedDrainWonDisallowKelvin:[CameraPool class]];
    }
    return _chargePenSin;
}

+ (NSString *)amharicBengaliUpscaleDeclinedTwitterName {
    return [IodineManager badUppercaseHeartbeatPanLexicon].wetSpaceName;
}

+ (NSString *)hasSpanSortCheckWasToken {
    return [IodineManager badUppercaseHeartbeatPanLexicon].nearLikeToken;
}

+ (CGFloat)disablingIssueDatumGaussianContent {
    return CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.reachableStairRearProcessedItalics.lineDelay?:self.chargePenSin.yardKinCutIll;
}

+ (NSString *)methodRhythmMasteringInjectionGet {
    return CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.bagRootPlan.youProtein;
}

+ (NSString *)absoluteMarkupDitherPreservedRedoObject {
    return CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.reachableStairRearProcessedItalics.earlierMillMildSentinelThumbnail;
}

+ (CGFloat)subfamilyPlainIndigoBoldfaceCross {
    return CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.reachableStairRearProcessedItalics.roleHyphensFathomsMessageLicense;
}
+ (BOOL)roleHyphensFathomsMessageLicense {
    return CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.reachableStairRearProcessedItalics.roleHyphensFathomsMessageLicense;
}

+ (NSString *)dolbyMuteAspectBottomDecipher {
    return CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.rowSixFigure.sixLawAnyIndex;
}
+ (NSString *)rearrangeReachableOrderedHisAscent {
    return CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.rowSixFigure.stalePubFire;
}

+ (BOOL)priceWakePongSheetPaper {
    return CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.vitalDiscoverVowelPenPlanNearChanged;
}

+ (BOOL)farPlanFor {
    return CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.rowSixFigure.farPlanFor;
}

+ (BOOL)routeDiscoverWaistTomorrowOwnershipNone {
    return [CutYoungerConfig shared].routeDiscoverWaistTomorrowOwnershipNone;
}

+ (NSArray *)caseArtRespondUsesFixture {
    NSArray *butterflySumStreamedEmergencyMark = [IodineManager radialPlanViolationComponentThousandsAtomic];
    NSMutableArray *gasp = [NSMutableArray arrayWithCapacity:butterflySumStreamedEmergencyMark.count];
    
    for (RomanianLossy *win in butterflySumStreamedEmergencyMark) {
        NSString *image = self.chargePenSin.bounceInternalTertiarySubstringOutDuctility;
        switch (win.chunkZipType) {
            case WirelessWaitModeRoomTied:
                image = self.chargePenSin.cutPlaceHandlesCocoaSlavicDid;
                break;
            case CarTextureSawAccount:
            case BriefSongMindRegister:
                image = self.chargePenSin.bounceInternalTertiarySubstringOutDuctility;
                break;
            case RomanPutBoxQualityRows:
                image = self.chargePenSin.gregorianPressJustifiedTextureStoneTrait;
                break;
                
case SpacingDecipherGaelicInferiorsMenstrual:
                image = self.chargePenSin.slabAdaptivePressSlowPostcard;
                break;
            case AmbienceTrapAbsoluteDisablingAsleepRange:
                image = self.chargePenSin.ownershipTertiaryCaseFactorPressesKilometer;
                break;

            default:
                image = self.chargePenSin.cutPlaceHandlesCocoaSlavicDid;
                break;
        }
        
        NSArray *arm = @[win.wetSpaceName ?: @"",image,win.youngerGenreDeltaPrepCanceledTime];
        [gasp addObject:arm];
    }
    
    
    NSArray *undoOddFax = [gasp sortedArrayUsingComparator:^NSComparisonResult(NSArray *a, NSArray *b) {
        double own = [a[2] doubleValue];
        double egg = [b[2] doubleValue];
        if (own > egg) {
            return NSOrderedAscending; 
        } else if (own < egg) {
            return NSOrderedDescending;
        }
        return NSOrderedSame;
    }];
    
    return undoOddFax;
}

+ (CGSize)identicalEditorsReleasedAvailLawGrantedSize {
    return CGSizeMake(self.chargePenSin.weeklyStoneSnowBrushNapWidth, self.chargePenSin.batchEmptyWidthSinkCompileAssign);
}

+ (UIColor *)launchBigColor{
    return [UIColor inputYouConstantAuxiliaryRomanSymptom:CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.swappedMonthRomanianCapArmourIntrinsic.launchBigColor?:self.chargePenSin.launchBigColor];
}

+ (UIColor *)suspendedColor{
    return [UIColor inputYouConstantAuxiliaryRomanSymptom:CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.swappedMonthRomanianCapArmourIntrinsic.suspendedColor?:self.chargePenSin.suspendedColor];
}

+ (UIColor *)minimumEggItsWrappingMildColor{
    return [UIColor inputYouConstantAuxiliaryRomanSymptom:CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.swappedMonthRomanianCapArmourIntrinsic.minimumEggItsWrappingMildColor?:self.chargePenSin.minimumEggItsWrappingMildColor];
}

+ (void)printerRadioGivenReversesActiveAction {
    if (CutYoungerConfig.shared.areTowerAddStatus != StrokedDeviationBurmeseFatDiscountsButtons) {
        CutYoungerConfig.shared.areTowerAddStatus = MailAmountWillBufferingJabberCorner;
    }
}

+ (UIView *)mindFinalView {
    if (CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.indexExposeAmbiguousCoverageCapResumed.rowsAdobeDrySpaEar) {
        UIImageView *view = [[UIImageView alloc] init];
        [view sd_setImageWithURL:[NSURL URLWithString:CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.indexExposeAmbiguousCoverageCapResumed]];
        view.contentMode = UIViewContentModeScaleAspectFit;
        return view;
    }else {
        UILabel *label = [[UILabel alloc] init];
        label.text = [ExpireInfo fatalTwoName];
        label.textColor = [self suspendedColor];
        label.font = [UIFont systemFontOfSize:30];
        label.textAlignment = NSTextAlignmentCenter;
        return label;
    }
}

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

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

+ (UIButton *)slidingUrgencyLocalizesLandmarkInventoryColor:(NSString *)title {
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setTitle:title forState:UIControlStateNormal];
    [button setBackgroundImage:[UIImage capMidDelayAirColor:[self suspendedColor]] forState:UIControlStateNormal];
    [button setBackgroundImage:[UIImage capMidDelayAirColor:[[UIColor lightGrayColor] colorWithAlphaComponent:0.5f]] forState:UIControlStateHighlighted];
    button.titleLabel.font = [UIFont systemFontOfSize:16];
    button.layer.cornerRadius = 2.f;
    button.layer.masksToBounds = YES;
    return button;
}

+ (NSArray *)gallonsCenteringOldSheetThickSpherical:(id)target action:(SEL)action {
    
    NSMutableArray *array = [[NSMutableArray alloc] init];
    
    for (SuchDogModel *win in CutYoungerConfig.shared.focusedProvisionRetainAppearsPhonogram.sobHerPutMobileArmourInterior) {
        UIView *button = [self lookOffOriginsJobAreLater:win.wetSunBitsText
                                           cupMinderColor:[UIColor inputYouConstantAuxiliaryRomanSymptom:win.excludeRowColor]
                                                expectBin:[self lightShowCanChestDiastolic:win]
                                           luminanceTitle:win.andPortal
                                                   target:target
                                                   action:action];
        [array addObject:button];
    }
    
    return array;
}

+ (NSString *)lightShowCanChestDiastolic:(SuchDogModel *)win {
    
    static NSDictionary<NSString *, NSString *> *map;
    static dispatch_once_t highToken;
    dispatch_once(&highToken, ^{
        map = @{
            
            self.chargePenSin.resetInter    : self.chargePenSin.cutPlaceHandlesCocoaSlavicDid,
            self.chargePenSin.askInfoSign   : self.chargePenSin.gregorianPressJustifiedTextureStoneTrait,
            self.chargePenSin.fixMercuryWas : self.chargePenSin.bounceInternalTertiarySubstringOutDuctility,
self.chargePenSin.anyGasp       : self.chargePenSin.slabAdaptivePressSlowPostcard,
            self.chargePenSin.sumNotSlopeRet: self.chargePenSin.ownershipTertiaryCaseFactorPressesKilometer,

        };
    });
    if (win.youProtein.consumesCase) {
        
        win.youProtein = map[win.andPortal];
    }
    return win.youProtein;
}

+ (UIView *)lookOffOriginsJobAreLater:(NSString *)title
                      cupMinderColor:(UIColor *)titleColor
                           expectBin:(NSString *)image
                      luminanceTitle:(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 sixAgeUnsafePlugLigature: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 *eraImage = [[UIImage rearrangeKeepCutterAbsentBalancedName:image] imageWithRenderingMode:(UIImageRenderingModeAlwaysTemplate)];
        button.tintColor = [self suspendedColor];
        [button setImage:eraImage 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 = [WinNeedHang nearRearrangeAmbiguousRawHandled: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)sixAgeUnsafePlugLigature:(NSString *)url
{
    NSString *chunk =@"[a-zA-z]+://[^\\s]*";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@",chunk];
    return [predicate evaluateWithObject:url];
}

+ (UITextField *)rawCommentExecuteYouLexiconSilentCode {
    UITextField *textField = [self legacyExtraField:self.mapSonInputIll.speakQuoteTenVisionAllDecodeCode isSecure:NO];
    textField.textContentType = UITextContentTypeOneTimeCode;
    return textField;
}

+ (UITextField *)bagSemanticsNordicJobNegateInstant {
    UITextField *textField = [self legacyExtraField:self.mapSonInputIll.detachBleedBuddyCanadianFix isSecure:NO];
    textField.keyboardType = UIKeyboardTypeNumberPad;
    return textField;
}

+ (UITextField *)stickyAbsoluteDrawingVowelGracefulAccount {
    return [self legacyExtraField:self.mapSonInputIll.cycleDrumMask isSecure:NO];
}

+ (UITextField *)goalArrivalControlFilenameNewsstandPassword:(BOOL)isNew {
    UITextField *textField = [self legacyExtraField:isNew?self.mapSonInputIll.threadsThumbNumberKitRet:self.mapSonInputIll.boxFillPopArtKey isSecure:YES];
    [self separatorAccurateDeliveryCollationHistorySpeakBreaking:textField andSize:CGSizeMake(WinNeedHang.chargePenSin.splatSkipped, WinNeedHang.chargePenSin.splatSkipped)];
    UIButton * rightButton = [UIButton buttonWithType:UIButtonTypeCustom];
    UIImage *scanImage = [UIImage rearrangeKeepCutterAbsentBalancedName:self.chargePenSin.urgentPaceAnyKeyCarriage];
    UIImage *courseImage = [UIImage rearrangeKeepCutterAbsentBalancedName:self.chargePenSin.capNineDuplexFilePostcard];
    rightButton.frame = CGRectMake(0, 0, WinNeedHang.chargePenSin.splatSkipped, WinNeedHang.chargePenSin.splatSkipped);
    [rightButton setImage:scanImage forState:UIControlStateNormal];
    [rightButton setImage:courseImage forState:UIControlStateSelected];
    CGFloat cutterSecond = (WinNeedHang.chargePenSin.splatSkipped - 24)/2;
    [rightButton setImageEdgeInsets:UIEdgeInsetsMake(cutterSecond, cutterSecond, cutterSecond, cutterSecond)];
    rightButton.contentMode = UIViewContentModeScaleAspectFit;
    [textField.rightView addSubview:rightButton];
    return textField;
}

+ (UITextField *)legacyExtraField:(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 suspendedColor].CGColor;
    textField.layer.borderWidth = 0.6;
    textField.layer.cornerRadius = 2;
    textField.backgroundColor = UIColor.whiteColor;
    textField.textColor = UIColor.darkGrayColor;
    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:placeholder attributes:@{NSForegroundColorAttributeName: [UIColor lightGrayColor]}];
    [self taskSearchSlantDecimalFireCheckoutUndefined:textField andSize:CGSizeMake(10, WinNeedHang.chargePenSin.splatSkipped)];
    textField.rightViewMode = UITextFieldViewModeAlways;
    return textField;
}

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

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