var isClosed=!1,validString="^[\\h\\s0-9a-zA-Z]+$";function defaultThumbSquare(){var e="/theme/images/default-square.jpg";return $("body").hasClass("black-theme")&&(e="/theme/images/default-square-dark.jpg"),e}function defaultThumb(){var e="/theme/images/default.jpg";return $("body").hasClass("black-theme")&&(e="/theme/images/default-dark.jpg"),e}function msisdnFormat(e){return e.startsWith("03")?e="+92-"+e.substring(1,4)+"-"+e.substring(4):e.startsWith("3")?e="+92-"+e.substring(0,3)+"-"+e.substring(3):e.startsWith("92")&&(e="+92-"+e.substring(2,5)+"-"+e.substring(5)),e}function standardizeMsisdn(e){return null==e?"":(e.includes(",")&&(e=e.split(",")[0]),e.startsWith("923")&&12==e.length)?e:e.startsWith("3")&&10==e.length?"92"+e:e.startsWith("03")&&11==e.length?"92"+e.substring(1):""}function displayFCMMessageNoty(e,t,i,a,n){try{var s=n.thumbnailList?n.thumbnailList.square:n.thumbnail;t?new Noty({text:e,type:"reply",layout:"centerRight",category:a,category_link:"#",closeWith:["click","button"],sounds:{sources:["/theme/sound/popup.wav"],volume:1,conditions:["docHidden","docVisible"]},from:n.contentTitle,avatar:s,animation:{open:"animated fadeInRight",close:"animated fadeOutRight"}}).show():new Noty({text:e,type:"reply",layout:"centerRight",timeout:i,killer:!0,category:a,category_link:"#",date:Date.now(),closeWith:["click","button"],sounds:{sources:["/theme/sound/popup.wav"],volume:1,conditions:["docHidden","docVisible"]},from:n.contentTitle,avatar:s,animation:{open:"animated fadeInRight",close:"animated fadeOutRight"}}).show(),$(".videoPopup").data("content",n),$(".videoPopup").data("isNotyPopup",!0)}catch(l){}}function displayMessageNoty(e,t,i,a,n){if(screen.width>319);else try{var s=n.thumbnailList?n.thumbnailList.square:n.thumbnail;t?new Noty({text:e,type:"reply",layout:"centerRight",category:a,category_link:"#",closeWith:["click","button"],sounds:{sources:["/theme/sound/popup.wav"],volume:1,conditions:["docHidden","docVisible"]},from:n.contentTitle,avatar:s,animation:{open:"animated fadeInRight",close:"animated fadeOutRight"}}).show():new Noty({text:e,type:"reply",layout:"centerRight",timeout:i,killer:!0,category:a,category_link:"#",date:Date.now(),closeWith:["click","button"],sounds:{sources:["/theme/sound/popup.wav"],volume:1,conditions:["docHidden","docVisible"]},from:n.contentTitle,avatar:s,animation:{open:"animated fadeInRight",close:"animated fadeOutRight"}}).show(),$(".videoPopup").data("content",n)}catch(l){}}function displaySuccessNoty(e,t,i){t?new Noty({text:e,type:"success",layout:"centerRight",timeout:i,theme:"metroui",killer:!0,closeWith:["click","button"],animation:{open:"animated fadeInRight",close:"animated fadeOutRight"}}).show():new Noty({text:e,layout:"centerRight",type:"success",timeout:i,killer:!0,theme:"metroui",animation:{open:"animated fadeInRight",close:"animated fadeOutRight"}}).show()}function displayWarningNoty(e,t,i){t?new Noty({text:e,layout:"centerRight",type:"warning",timeout:i,killer:!0,theme:"metroui",closeWith:["click","button"],animation:{open:"animated fadeInRight",close:"animated fadeOutRight"}}).show():new Noty({text:e,layout:"centerRight",type:"warning",timeout:i,theme:"metroui",killer:!0,animation:{open:"animated fadeInRight",close:"animated fadeOutRight"}}).show()}function displayErrorNoty(e,t,i){t?new Noty({text:e,layout:"centerRight",type:"error",timeout:i,theme:"metroui",killer:!0,closeWith:["click","button"],animation:{open:"animated fadeInRight",close:"animated fadeOutRight"}}).show():new Noty({text:e,layout:"centerRight",type:"error",timeout:i,theme:"metroui",killer:!0,animation:{open:"animated fadeInRight",close:"animated fadeOutRight"}}).show()}function onlyAlphabets(e,t){try{if(window.event)var i=window.event.keyCode;else if(!e)return!0;else var i=e.which;if(i>64&&i<91||i>96&&i<123||8===i)return!0;return!1}catch(a){alert(a.Description)}}function imgErrorWebp(e){e.onerror="";var t="/theme/images/default.webp";return $("body").hasClass("black-theme")&&(t="/theme/images/default-dark.webp"),e.src=t,!0}function imgError(e){e.onerror="";var t="/theme/images/default-square";$("body").hasClass("black-theme")&&(t="/theme/images/default-square-dark"),e.src=t+".jpg";try{var i=$(e).siblings("source")[0],a=$(e).siblings("source")[1];$(i).siblings("source").attr("srcset",t+".webp"),$(a).siblings("source").attr("srcset",t+".jpg")}catch(n){}return!0}function imgErrorHorz(e){e.onerror="";var t="/theme/images/default";$("body").hasClass("black-theme")&&(t="/theme/images/default-dark"),e.src=t+".jpg";try{var i=$(e).siblings("source")[0],a=$(e).siblings("source")[1];$(i).siblings("source").attr("srcset",t+".webp"),$(a).siblings("source").attr("srcset",t+".jpg")}catch(n){}return!0}function getReleasedYear(e){return e?e.substring(0,4):""}function preloadImages(e){preloadImages.list||(preloadImages.list=[]);for(var t=preloadImages.list,i=0;i3600&&(t=!0);var i=Math.floor(e/3600),a=Math.floor((e-=3600*i)/60);return(e-=60*a,t)?i+":"+(a<10?"0"+a:a)+":"+(e<10?"0"+e:e):(a<10?"0"+a:a)+":"+(e<10?"0"+e:e)}function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}function convertSeconds(e){var t=new Date(1970,0,1);return t.setSeconds(e),t.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")}function getParamFromBannerHref(e,t){var i=RegExp("[\\?&]"+(e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]").replace(" ","_"))+"=([^&#]*)").exec("?"+t);return null===i?"":decodeURIComponent(i[1].replace(/\+/g," "))}function getCatNameFromURL(){var e=window.location.href.split("/");return e[e.length-1]}function getParameterByName(e){var t=RegExp("[\\?&]"+(e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]").replace(" ","_"))+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))}function getPathVariableByIndex(e){try{return window.location.pathname.split("/")[e]}catch(t){return -1}}function replaceParameterByName(e,t){var i=window.location.href;i=i.replace(e+"="+getParameterByName(e),e+"="+t),window.history.replaceState("","",i)}function replacePageUrlByName(e){window.history.replaceState("","",e)}function setParameterByName(e,t){var i=window.location.href,a=(i=null===window.location.href.match("\\?")?window.location.href+"?":window.location.href+"&")+e+"="+t;window.history.replaceState("","",a)}function pad(e,t){for(e+="";e.length
'+e.streamUrl+'
',i='
  • '+e.streamUrl+"
  • ";return $("div#playlists").length>0?$("div#playlists").prepend(t):$("#all-playlist").prepend(i),noty({dismissQueue:!0,timeout:1e3,force:!0,layout:"center",theme:"defaultTheme",text:"Playlist Created",type:"success"}),$("#cancelCreatePlaylist").trigger("click"),!1}}).fail(function(){console.log("Oops! Something went wrong.")}).always(function(){$("#newListname").empty(),isLoading=!1,$("#loading-div").hide(0)})):noty({text:"Playlist name not valid!",type:"alert",dismissQueue:!1,layout:"center",timeout:1500,theme:"defaultTheme"})}),$(document).on("click","#create",function(){console.log("Create Clicked!"),$("#cancelRenamePlaylist").trigger("touchstart"),"none"===$("#createForm").css("display")&&($("#createForm").css("display","block"),$("#createForm > .input-group").slideDown())}),$(document).on("click","#cancelCreatePlaylist",function(){"block"===$("#createForm").css("display")&&($("#createForm > .input-group").slideUp(),$("#createForm").css("display","none"),$("#listname").val(""))}),$(document).on("click touchstart","#playlist_playAll",function(){$(this),$(this).parent().find("div.content_body:eq(0) .glyphicon-play-circle").trigger("click")});