"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function GoToNextPage(e){var t=parseInt(e)+1;AdvanceSearch(t)}function GoToPrevPage(e){var t=parseInt(e)-1;AdvanceSearch(t)}function GoToPage(e){AdvanceSearch(e)}function GoToArticle(e){}function SearchOnEnter(e,t){13==e.keyCode&&(CheckKeywordNotNull(t)?SearchArticles2(t):(field=$(t),IsIEVersionLessThan_10()?(field.val("الرجاء ادخال كلمة بحث"),field.css({color:"#AFAFAF"})):field.attr("placeholder","الرجاء ادخال كلمة بحث")))}function IsIEVersionLessThan_10(){return""+function(){for(var e=3,t=document.createElement("div"),i=t.getElementsByTagName("i");t.innerHTML="\x3c!--[if gt IE "+ ++e+"]>4?e:void 0}()!="undefined"}function CheckKeywordNotNull(e){var t=$(e).val();return t=$.trim(t),IsIEVersionLessThan_10(e)?""!=t&&null!=t&&"الرجاء ادخال كلمة بحث"!=t&&"أدخل كلمة للبحث .."!=t:t.length>0}function SearchTextBoxBlur(e){var t=$(e);CheckKeywordNotNull(t)||(IsIEVersionLessThan_10(e)?(t.val("أدخل كلمة للبحث .."),t.css({color:"#AFAFAF"})):t.attr("placeholder","أدخل كلمة للبحث .."))}function SearchTextBoxOnfocus(e){var t=$(e),i=t.val();i=$.trim(i),IsIEVersionLessThan_10(e)?""!=i&&null!=i&&"الرجاء ادخال كلمة بحث"!=i&&"أدخل كلمة للبحث .."!=i||(t.val(""),t.css({color:"#333333"})):0==i.length&&t.attr("placeholder","أدخل كلمة للبحث ..")}function SearchArticles2(e){if(CheckKeywordNotNull(e)){var t=CheckSpecialCharacters2(e);if("false"==t){var i=$(e).val();window.location.href="/advancedsearch?all="+encodeURIComponent(i)+"&exact=&contains=¬Contain=§ionId=&from=&to=&pageNo=1&sort=1"}else alert(t)}else IsIEVersionLessThan_10()?$(e).val("الرجاء ادخال كلمة بحث"):$(e).attr("placeholder","الرجاء ادخال كلمة بحث")}function CheckSpecialCharacters2(e){for(var t=$(e),i=0;i[]{}`';()@&$#%^".indexOf(t.val().charAt(i))){t.val();var n="الرجاء عدم ادخال الرموز التالية ";return n+=t.val().charAt(i)}return"false"}function GetBreakingNews(){$.ajax({type:"Get",url:"/services/getbreakingnews",success:function(e){if(""!=e)if($(".breaking-news").prepend(e),$(".marquee-vertical").marquee({speed:1,timing:1,delay:5e3}),2==$(".breaking-news li").length&&$(".header .top-area .right .breaking-news .marquee-vertical").addClass("has-one"),$(window).width()>=992){if($(".breaking-news li").length){$(".breaking-news li").each(function(){var e=$(this).find("div").text();e=e.trim(),$(this).find("div").text(""+e)});var t=33;setTimeout(function(){$(".breaking-news li").each(function(){jQuery(this).find("div").height()>t&&(t=jQuery(this).find("div").height())}),$(".top-area").css("height",t),$(".breaking-news li").css("height",t),$(".breaking-news").css("height",t),$(".breaking-news").prev().css("height",t)},100)}$(".breaking-news .marquee-vertical li").length?$(".header .top-area .right .date").addClass("with-border"):$(".header .top-area .right .date").addClass("no-border")}else if($(window).width()<991)if($(".breaking-news li").length){t=48;$(".breaking-news li").each(function(){$(this).height()>t&&(t=$(this).height())}),$(".top-area").css("height",t),$(".breaking-news").css("height",t),$(".breaking-news li").css("height",t)}else $(".top-area").hide()}})}function sendValidation(){return $(".err").remove(),$(".check").each(function(){if($(this).val()==$(this).attr("value")&&null==$(".filed-cont").find(".err").html())return $(".filed-cont").append("
الرجاء تعبئة الحقول الإجبارية ذات العلامة ( * )
"),$(this).addClass("error-field"),!1}),$("#TxtEmailSender,#TxtEmailResc").each(function(){if($(this).val()!=$(this).attr("value")||""==$(this).val()){if(null==$(".filed-cont").find(".err2").html()){var e=$(this).val();0==/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)&&!$(".filed-cont").find(".err").length>0&&($(".filed-cont").append("
الرجاء ادخال البريد الالكتروني بشكل صحيح
"),$(this).addClass("error-field"))}}else!$(".filed-cont").find(".err").length>0&&($(".filed-cont").append("
الرجاء تعبئة الحقول الإجبارية ذات العلامة ( * )
"),$(this).addClass("error-field"))}),!($(".filed-cont .err").length>=1)}function SendEmail(){if(sendValidation()){if(""==grecaptcha.getResponse())return $(".reCaptcha").append("
يرجى التحقق من مربع الاختيار أعلاه
"),!1;var e=$("#TxtSenderName").val(),t=($("#TxtEmailSender").val(),$("#TxtEmailResc").val()),i=$("#strTxtMessage").val(),n=($("#CAPCHA").val(),"/home/getpage/"+$("#EID").val()+"/"+$("#RID").val());null!=$("#friendlyUrl").val()&&""!=$("#friendlyUrl").val()&&(n=$("#friendlyUrl").val());$("#articleTitle").val();var a=$("#EID").val()+"##"+$("#RID").val();$(".container-snd-frnd .btn").attr("disabled","disabled").addClass("loading"),$.ajax({type:"post",url:"/SendToFriendEmail/SendEmail",data:{strTxtSenderName:e,strTxtEmailResc:t,strTxtMessage:i,CAPCHA:grecaptcha.getResponse(),articleURL:n,articleInfo:a},success:function(e){"true"==e?($(".filed-cont,.snd-info").slideUp(300),$(".successMessage").html("لقد تم إرسال المقال بنجاح.").show()):($("#SendConfirmation").show(),$("#SendConfirmation").html("خطأ في النظام, يرجى المحاولة لاحقا.")),setTimeout(function(){$(".container-snd-frnd .btn").removeClass("loading")},2e3)}})}}function subscribeNewsLetter(e){var t=$(e).prev().val(),i=$(e).parents("#join").find("#newsOutput").removeAttr("class");if(window.EmailN=t,sendValidation())if(0!=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)&&""!=t){if(""==grecaptcha.getResponse(0))return i.html("يرجى التحقق من مربع الاختيار").addClass("error"),!1;grecaptcha.getResponse(0);$.ajax({type:"post",url:"/subscribeRevuenewsletter",data:{email:t,reCaptchaString:grecaptcha.getResponse(0)}}).done(function(e){"0"==e&&i.html("عذراً يوجد خطأ في النظام").addClass("error"),"1"==e&&(i.html("تم عملية الاشتراك بنجاح").addClass("success"),$("#btnNewsLetter").val("")),"2"==e&&i.html("البريد الالكتروني مسجل من قبل").addClass("error"),"3"==e&&i.html("خطأ في التحقق ").addClass("error")}).error(function(){i.html("عذراً يوجد خطأ في النظام").addClass("error")})}else i.html("الرجاء ادخال البريد بشكل صحيح").addClass("error");else i.html("الرجاء ادخال البريد بشكل صحيح").addClass("error")}function subscribeNewsLetter2(e){var t=$(e).prev().val(),i=$(e).parents("#join").find("#newsOutput").removeAttr("class");window.EmailN=t;var n=0;if($(".subscribe-sction").length&&(n=1),sendValidation())if(0!=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)&&""!=t){if(""==grecaptcha.getResponse(n))return i.html("يرجى التحقق من مربع الاختيار").addClass("error"),!1;grecaptcha.getResponse(n);$.ajax({type:"post",url:"/subscribeRevuenewsletter",data:{email:t,reCaptchaString:grecaptcha.getResponse(n)}}).done(function(e){"0"==e&&i.html("عذراً يوجد خطأ في النظام").addClass("error"),"1"==e&&(i.html("تم عملية الاشتراك بنجاح").addClass("success"),$("#btnNewsLetter").val("")),"2"==e&&i.html("البريد الالكتروني مسجل من قبل").addClass("error"),"3"==e&&i.html("خطأ في التحقق ").addClass("error")}).error(function(){i.html("عذراً يوجد خطأ في النظام").addClass("error")})}else i.html("الرجاء ادخال البريد بشكل صحيح").addClass("error");else i.html("الرجاء ادخال البريد بشكل صحيح").addClass("error")}function GetAllNewsOpinionsItems(){$.ajax({url:"/services/getallnewsandopinions",async:!1}).done(function(e){window.da=e,""!=e?($("#GetAllNewsAndOpinions").html(e),$(".marquee-vertical").marquee()):$("#GetAllNewsAndOpinions").html("")}).error(function(){})}function GetMostReadAndSentItems(){var e="";$("#caricatureSectionName").length>0&&(e=$("#caricatureSectionName").val());var t="/services/getmostreadandsentarticles/"+e;$.ajax({url:t,async:!1}).done(function(e){window.da=e,""!=e?($("#MostReadAndSentItems").html(e),$("#tabs, #tabs_most_read").tabs()):$("#MostReadAndSentItems").html("")})}function menuItemSelected(){var e=$("#PageSectionId").val();null!=e&&$('#navbarSupportedContent li[sectionid="'+e+'"]').addClass("active").siblings().removeClass("active")}function GoToAuthorArticlesPage(e,t){$(t).addClass("loading");var i=$("#hiddnAuthorId").val();$.ajax({type:"Get",url:"/getallauthorarticles/"+e+"/"+i,success:function(e){""!=e&&($("#AllAuthorArticlesContainer").html(""),$("#AllAuthorArticlesContainer").html(e),$(t).removeClass("loading"),$("html, body").animate({scrollTop:$("header").offset().top},0))},error:function(){$(t).removeClass("loading")}})}function GoToSummaryPager(e,t){$(".state").removeClass("disabled");$(".navigation .num");if("object"==_typeof(t)){$("#SummarySlider"+e).removeClass("hide").siblings().not(".navigation,.blogs_right_section, .others-articles").addClass("hide");var i=$(t).parent();i.addClass("active").siblings().removeClass("active"),i.next().hasClass("state")&&($(".state").removeClass("disabled"),i.next().addClass("disabled")),i.prev().hasClass("state")&&($(".state").removeClass("disabled"),i.prev().addClass("disabled")),i.index()>5?($(".navigation .num").addClass("hide"),i.removeClass("hide"),linktoHideIndex=i.index(),$(".navigation .num:nth-child(-n+"+linktoHideIndex+")").removeClass("hide"),$(".navigation .num:nth-child(-n+"+(linktoHideIndex-4)+")").addClass("hide")):($(".navigation .num:lt(5)").removeClass("hide"),$(".navigation .num:gt(4)").addClass("hide")),scrollToView($(".header"),100,100)}else{var n=$(".navigation").find("li.active");if("next"==t){if(n.next().hasClass("next"))return void n.next().addClass("disabled");n.next().find("a").trigger("click")}if("prev"==t){if(n.prev().hasClass("prev"))return void n.prev().addClass("disabled");n.prev().find("a").trigger("click")}}$(".opinion-page .opinionGrid").length&&$(".opinion-page .opinionGrid:not(.hide) .col:nth-child(odd)").each(function(){$(this).find(".description").height()<$(this).next().find(".description").height()?$(this).find(".description").css("height",$(this).next().find(".description").height()):$(this).next().find(".description").css("height",$(this).find(".description").height())})}function GoToOpinionLandingPage(e,t){window.location.href="/opinion-articles/"+e}function GoToLatestArticlesLandingPage(e,t){window.location.href="/authors-articles/"+e}function scrollToView(e,t,i){setTimeout(function(){var i=$(e),n=$(i).offset().top;$("html,body").animate({scrollTop:n-38},t)},i)}function GoToCaricaturePage(e,t,i,n,a){var s,r="/getallcaricatures/"+e+"/"+("CaricaturePageSizeSummery"==i&&null!=document.getElementById("ddlArtistsNames")?(s=document.getElementById("ddlArtistsNames")).options[s.selectedIndex].value:""==n||null==n?"-1":n)+"/"+i+"/"+a;"nolink"==t&&$("#ddlArtistsNames").addClass("loading"),$.ajax({type:"Get",url:r,success:function(e){""!=e&&($("#divGetAllCaricatures").html(""),$("#divGetAllCaricatures").html(e),$("#ddlArtistsNames").removeClass("loading"),$("html, body").animate({scrollTop:$("#divGetAllCaricatures").offset().top-70},0))},error:function(e){"nolink"==t&&$("#ddlArtistsNames").removeClass("loading")}})}function GetArticleNumberOfViewsAndSent(){var e=$("#articleNumberOfViewsLower").val(),t=$("#hidEntityID").val(),i=$("#hidResourceId").val();$("#articleNumberOfViewsLower").length>0&&null!=e&&null!=t&&null!=i&&$.ajax({type:"Get",url:"/services/getnoofviewsforarticle/"+t+"/"+i,success:function(e){""!=e&&$("#articleNumberOfViewsLower").html(e+" مشاهدة ")}});var n=$("#NoOfSentForArticleUpper").val(),a=$("#NoOfSentForArticleLower").val();$("#NoOfSentForArticleUpper").length>0&&(null==n&&null==a||null==t||null==i||$.ajax({type:"Get",url:"/services/getnoofsentforarticle/"+t+"/"+i,success:function(e){""!=e&&(null!=n&&$("#NoOfSentForArticleUpper").html(e),null!=a&&$("#NoOfSentForArticleLower").html(e))}}))}function GoToNewsPage(e,t,i){console.log(i),$(i).addClass("loading"),$.ajax({type:"Get",url:"/getallnews/"+e+"/"+t,success:function(e){$(i).removeClass("loading"),""!=e&&($("#NewsDivContrainer").html(e),$("html, body").animate({scrollTop:$("header").offset().top},0))}})}function GetMostReadItems(){var e="";$("#PageSectionId").length>0&&(e=$("#PageSectionId").val());var t="/services/GetMostReadArticle/"+e;$.ajax({url:t,success:function(e){window.da=e,""!=e&&($("#MostReadItems").html(e),$("#tabs, #tabs_most_read").tabs())}})}if($(function(){$(document).ready(function(){if($(".carousel-slick .carousel-inner").slick({autoplaySpeed:3e3,autoplay:!0,rtl:!0}),$(".carousel-slick").show(),$(".marquee-vertical").marquee({speed:1,timing:1,delay:5e3,duplicated:!1}),$("#ddlAuthorsNames").on("change",function(){window.location.href=this.value}),$(".marquee-vertical").on("mouseout",function(e){e.stopPropagation(),e.preventDefault()}),$(".marquee-vertical").on("mouseover",function(e){e.stopPropagation(),e.preventDefault()}),$(window).width()>=992){$(".opinion-page .opinionGrid").length&&$(".opinion-page .opinionGrid:not(.hide) .col:nth-child(odd)").each(function(){$(this).find(".description").height()<$(this).next().find(".description").height()?$(this).find(".description").css("height",$(this).next().find(".description").height()):$(this).next().find(".description").css("height",$(this).find(".description").height())});var e=0;$(".block-writer-right .text").each(function(){$(this).height()>e&&(e=$(this).height())}),$(".block-writer-right .text").each(function(){$(this).css("height",e)});var t=0;$(".last-news .title").each(function(){$(this).height()>t&&(t=$(this).height())}),$(".last-news .title").each(function(){$(this).css("height",t)});var i=0;$(".one-large-four-small .left-side h2").each(function(){$(this).height()>i&&(i=$(this).height())}),$(".one-large-four-small .left-side h2").each(function(){$(this).css("height",i)});var n=0;$(".main-block .left-side .title").each(function(){$(this).height()>n&&(n=$(this).height())}),$(".main-block .left-side .title").each(function(){$(this).css("height",n)});var a=0;$(".world-section .left-side h2").each(function(){$(this).height()>a&&(a=$(this).height())}),$(".world-section .left-side h2").each(function(){$(this).css("height",a)})}$(".writer-sidebar").length&&($(".writer-sidebar div").length?$(".writer-sidebar").show():$(".writer-sidebar").hide()),$("#tabsRead").tabs(),$(function(){$(".navbar-toggler").click(function(){$(".navbar-toggler-icon").toggleClass("hidden"),$(".mobile-search .search-icon").removeClass("hidden")}),$(".close-icon").click(function(){$(".collapse").collapse("hide"),$(".navbar-toggler-icon").toggleClass("hidden")}),$(".mobile-search .search-icon").click(function(){$(".mobile-search .search-icon").toggleClass("hidden"),$(".mobile-search .search-bar").toggleClass("show"),$(".mobile-search .search-bar").hasClass("show")?($("body").css("overflow-y","hidden"),$(".carousel-slick").css("opacity","0")):($("body").css("overflow-y","auto"),$(".carousel-slick").css("opacity","1"))})}),$(window).width()<992&&($(".footer-menu .nav").slideUp(),$(".footer-menu .block-title").on("click",function(){$(this).next(".nav").slideToggle(function(){$(this).prev(".block-title").toggleClass("minus-icon")})}),$(".search-pages-top .advanced-search .top-advanced-search .title").on("click",function(){$(this).parents(".advanced-search").toggleClass("show-advanced")})),$(window).on("scroll",function(){var e=0,t=0,i=0;$(".top-area").length&&(e=$(".top-area").height()),$("header .show-mobile").length&&(t=$("header .show-mobile").height()),$("header .header-banner iframe").length&&(i=$("header .header-banner").height());var n=e+i+t+30;$(this).scrollTop()>n?$(".nav-items").addClass("sticky"):$(".nav-items").removeClass("sticky")});var s=20;$(".increase-font").on("click",function(){s<35&&(s++,$(".body-content-style").css("font-size",s+"px"))}),$(".decrease-font").on("click",function(){s>12&&(s--,$(".body-content-style").css("font-size",s+"px"))});var r=$(".static-box").width();$(window).width()<991&&$(".static-box").height(r)})}),GetBreakingNews(),$(".newsletter-input").on("keyup input propertychange",function(){$(this).val().length>0?$(this).parents(".newsletter-form").find("#captchaDiv").show():$(this).parents(".newsletter-form").find("#captchaDiv").hide()}),$("#GetAllNewsAndOpinions").length>0&&GetAllNewsOpinionsItems(),$("#MostReadAndSentItems").length>0&&GetMostReadAndSentItems(),menuItemSelected(),$(document).ready(function(){GetArticleNumberOfViewsAndSent()}),$("#MostReadItems").length>0&&GetMostReadItems(),$("#hidEntityID").length){var entityId=document.getElementById("hidEntityID").value,resourceId=document.getElementById("hidResourceId").value,pubDate=document.getElementById("hidPubDate").value,title=document.getElementById("hidTitle").value,sectionName=document.getElementById("hidSectionName").value,mainImageId=document.getElementById("hidMainImageId").value,facebookCounter=0,URL="/services/InsertCountReadArticle?entityid="+entityId+"&resourceid="+resourceId+"&title="+title+"&pubdate="+pubDate+"§ionname="+sectionName+"&mainimageid="+mainImageId;$.ajax({type:"GET",url:URL,datatype:"html",complete:function(e){}})}