\n \n \n `))).join("")),getOk){let e=await channelHide();for(const n of e)$(`#ch-${n.channel_id}`).hide()}var t=localStorage.getItem("channel-custom-"+a);let o=JSON.parse(t),i=[];for(const e of i)2!==o?.[e]&&$(`#ch-${e}`).hide();for(const e in o){const n=o[e],t=$(`#ch-${e}`);1===n&&t.hide()}}}})}function tabChannelByCustomApi(){$("#tabCategory").html(""),$("#jessibucaPlay").addClass("sembunyi"),$("#myVideo").removeClass("sembunyi");let e=apiStb+"vod/getGroups";apiCustom&&(e=`${apiCustom}vod/getVodGroups`);let n={};apiCustom&&(n={custom_id:custom_id}),$.ajax({url:e,method:"POST",data:n,success:function(e){const n=e?.map((e=>{const n=e.group_name.replaceAll(" ","-");return`\n
\n `}));$("#tabCategory").html(n);let t=e.map((e=>getVods(e.group_name)));Promise.allSettled(t).then((()=>{keynapCard("vod")})),$("#tabCategory").append('')},error:function(e){}})}function getVods(e){const n=e.replaceAll(" ","-");let t=apiStb+"vod/getGroupVideos/"+e;apiCustom&&(t=`${apiCustom}vod/getVods`);let a={};return apiCustom&&(a={custom_id:custom_id,group_name:e}),$.ajax({url:t,method:"POST",data:a,success:function(e){e&&$("#group-icon-"+n).html(e?.map(((e,t)=>`\n \n
\n
\n
\n
\n `)))},error:function(e){Swal.fire("",e,"warning")}})}async function getLocationServer(e){let n=null;try{let t=new URL(e);t.pathname="/locate/"+t.pathname.split("/").pop(),t=t.toString();let a=await axios.head(t,{timeout:3e3});200==a.status?n="":204==a.status?n="Gedung Cyber":404==a.status&&(n="Local")}catch(e){404==e?.response?.status?n="Local":console.error(e)}return n}let selectedValue=localStorage.getItem("playerName")||"";function keynapCard(e=null){$("body .card").keynav(),e||$(".card").click((function(){let e=$(this).attr("data-url"),n=$(this).attr("data-channel_group_name");e&&changeVideo(e,n)}))}Cookies.set("playerName",selectedValue,{expires:365})