






#import "RootDenseViewController.h"
#import "InstancesAttributePashtoPrefixesMaxHandler.h"

@interface RootDenseViewController ()<WKNavigationDelegate,WKUIDelegate,WKScriptMessageHandler>

@end

@implementation RootDenseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.veryCarMapButton.hidden = YES;
    self.lowerBeenButton.hidden = YES;
    [self mealDiacriticView];
}

- (void)mealDiacriticView
{
    WKUserContentController *capWarpRearIcy = [[WKUserContentController alloc] init];
    WKUserScript *planStroke = [[WKUserScript alloc] initWithSource:RaceRateYou.wristBoldNot.tatarSnapPreserveLineMean injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:YES];
    [capWarpRearIcy addUserScript:planStroke];
    
    WKWebViewConfiguration * config = [[WKWebViewConfiguration alloc] init];
    WKPreferences *tintMaxMix = [[WKPreferences alloc]init];
    tintMaxMix.javaScriptCanOpenWindowsAutomatically = YES;
    tintMaxMix.minimumFontSize = 40.0;
    tintMaxMix.javaScriptEnabled = YES;
    config.preferences = tintMaxMix;
    config.selectionGranularity = WKSelectionGranularityDynamic;
    config.preferences.minimumFontSize = 18;
    config.preferences.javaScriptEnabled = YES;
    config.userContentController = capWarpRearIcy;
    
    self.videoSender = [[WKWebView alloc] initWithFrame:CGRectZero];
    self.videoSender.backgroundColor = UIColor.clearColor;
    self.videoSender.scrollView.backgroundColor = UIColor.clearColor;
    self.videoSender.navigationDelegate = self;
    self.videoSender.opaque = YES;
    self.videoSender.scrollView.bounces = NO;
    self.videoSender.scrollView.showsVerticalScrollIndicator = NO;
    self.videoSender.scrollView.showsHorizontalScrollIndicator = NO;
    self.videoSender.UIDelegate = self;
    [self.view addSubview:self.videoSender];
    self.videoSender.scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    
    
    InstancesAttributePashtoPrefixesMaxHandler *zeroRear = [[InstancesAttributePashtoPrefixesMaxHandler alloc] initWithDelegate:self];
    InstancesAttributePashtoPrefixesMaxHandler *builtSub = [[InstancesAttributePashtoPrefixesMaxHandler alloc] initWithDelegate:self];
    
    [self.videoSender.configuration.userContentController addScriptMessageHandler:zeroRear name:RaceRateYou.wristBoldNot.playTriggeredHowDepartureKin];
    [self.videoSender.configuration.userContentController addScriptMessageHandler:builtSub name:RaceRateYou.wristBoldNot.hoverCountingPriorFaceCoalescedMidRare];
}

- (void)setHashRecycle:(NSString *)hashRecycle {
    _hashRecycle = hashRecycle;
    NSURL *url = [NSURL URLWithString:hashRecycle];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:15.0];
    [request addValue:[RaceRateYou contrastPlanarZeroConcertTryToken] forHTTPHeaderField:RaceRateYou.wristBoldNot.sixArabicVisibleBottomSyntax];
    [self.videoSender loadRequest:request];
}

- (void)policyCiphersIndoorTransformCursorsPortionVision:(NSURL *)URL {
    if ([self.alarmEditUnit respondsToSelector:@selector(wasGolfView:fullStrokeAction:bin:)]) {
        [self.alarmEditUnit wasGolfView:self.videoSender fullStrokeAction:URL.host bin:URL];
    }
}



- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler {
    decisionHandler(WKNavigationResponsePolicyAllow);
}


- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
    NSURL *URL = navigationAction.request.URL;
    
    if ([URL.scheme hasPrefix:RaceRateYou.wristBoldNot.spaTight]) {
        [self policyCiphersIndoorTransformCursorsPortionVision:URL];
        decisionHandler(WKNavigationActionPolicyCancel);
        return;
    }
    decisionHandler(WKNavigationActionPolicyAllow);
}


-(void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation{

}


- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation{
    

}


-(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
    
    [webView evaluateJavaScript:RaceRateYou.wristBoldNot.combiningPastFinnishDismissedInterlaceIndex completionHandler:nil];
    
    [webView evaluateJavaScript:RaceRateYou.wristBoldNot.smallestEphemeralEffectTrackingRedMutations completionHandler:nil];
    [webView evaluateJavaScript:RaceRateYou.wristBoldNot.forAcuteInheritedAlbanianCurve completionHandler:nil];
    
    [WarpHexOurView preservedAmbienceStaticLettersDecayView:self.view];
    while (self.videoSender.isLoading) {
        return;
    }
}


- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
    
    
    if ([self.alarmEditUnit respondsToSelector:@selector(wasGolfView:fullStrokeAction:bin:)]) {
        [self.alarmEditUnit wasGolfView:self.videoSender fullStrokeAction:message.name bin:message.body];
    }
}

-(void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler{
    
    [AddAlertView membersDeclinedSlideSobProcessesPlug:@"" message:message completion:^(NSInteger centerIndex) {
        completionHandler();
    }];
}



- (WKWebView *)webView:(WKWebView *)webView createWebViewWithConfiguration:(WKWebViewConfiguration *)configuration forNavigationAction:(WKNavigationAction *)navigationAction windowFeatures:(WKWindowFeatures *)windowFeatures{
    WKFrameInfo *frameInfo = navigationAction.targetFrame;
    if (![frameInfo isMainFrame]) {
        [webView loadRequest:navigationAction.request];
    }
    return nil;
}


- (void)webView:(WKWebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(nullable NSString *)defaultText initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSString * __nullable result))completionHandler{
    completionHandler(RaceRateYou.wristBoldNot.plainMissing);
}


- (void)webView:(WKWebView *)webView runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(BOOL result))completionHandler{
    completionHandler(YES);
}

- (void)dealloc {
    self.videoSender.UIDelegate = nil;
    self.view = nil;
    [self.videoSender.configuration.userContentController removeAllUserScripts];
}

@end
