1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[99273],{50242:(e,t,a)=>{a.d(t,{m:()=>s});let r=["/placeholder/","/assets/","/api/","/_next/"];function s(e){let t=String(e??"").trim();if(!t||r.some(e=>t.startsWith(e))||/^https?:\/\//i.test(t))return t;if(t.startsWith("//"))return`https:${t}`;let a="https://image2.5746136.xyz";if(!a)return t;let s=a.replace(/\/$/,""),i=t.startsWith("/")?t:`/${t}`;return`${s}${i}`}},55332:(e,t,a)=>{a.d(t,{OA:()=>u,fz:()=>d,g5:()=>c,iG:()=>h});let r=Object.freeze({104:"English Premier League"}),s=Object.freeze({"jpn d1":"Japan J1 League"});function i(e){return String(e??"").replace(/<[^>]*>/g," ").replace(/ /gi," ").replace(/&/gi,"&").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'|'/gi,"'").replace(/\s*\(\s*N\s*\)\s*/gi," ").replace(/\s+/g," ").trim().normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function l(e){if(null==e||""===e)return"";let t=e instanceof Date?e:new Date(e);if(Number.isNaN(t.getTime()))return"";let a=new Date(t.getTime()+288e5);return[String(a.getUTCDate()).padStart(2,"0"),String(a.getUTCMonth()+1).padStart(2,"0"),a.getUTCFullYear()].join("-")}function n(e){let t=r[String(e?.LEAGUE_ID??e?.leagueId??"").trim()]||s[String(e?.LEAGUE_SHORT??e?.leagueShort??"").trim().toLowerCase()]||e?.MATCH_DETAIL_LEAGUE_NAME||e?.LEAGUE_NAME||e?.league?.name||e?.leagueName||e?.LEAGUE||e?.LEAGUE_SHORT||e?.league?.shortName||e?.league||"",a=e?.MATCH_DETAIL_HOME_NAME||e?.HOME_TEAM_NAME||e?.HOME||e?.homeTeamName||e?.team1?.name||e?.home||"";return{league:t,home:a,away:e?.MATCH_DETAIL_AWAY_NAME||e?.AWAY_TEAM_NAME||e?.AWAY||e?.awayTeamName||e?.team2?.name||e?.away||"",matchAt:e?.MATCH_AT||e?.matchAt||e?.matchDate||e?.matchdate||e?.MATCHPLAYED||e?.matchPlayed||null}}function o(e,t){return[e,t].filter(Boolean).join(" vs ")}function c(e){let{league:t,home:a,away:r,matchAt:s}=n(e);return[i(t),l(s),i(o(a,r))].filter(Boolean).join("/")}function u(e,t=null){let a=String(e??"").trim();if(!a)return"/matches/live";let r=t?.MATCH_DETAIL_SLUG,s="string"==typeof r&&/^[a-z0-9-]+\/\d{2}-\d{2}-\d{4}\/[a-z0-9-]+$/.test(r)?r:t?c(t):"";return s?`/matches/live/${a}/${s}`:`/matches/live/${a}`}function h(e,t=null){let a,r,s,c,u,d=String(e??"").trim();if(!d)return"/matches/odds";let m=t?(r=(a=n(t)).league,s=t?.ODDS_HOME_TEAM_NAME||a.home,c=t?.ODDS_AWAY_TEAM_NAME||a.away,u=a.matchAt,[i(r),l(u),i(o(s,c))].filter(Boolean).join("/")):"";return m?`/matches/odds/${d}/${m}`:`/matches/odds/${d}`}function d(e,t=null){let a=String(e??"").trim();if(!a)return"/hot-picks";let{home:r,away:s}=n(t),l=r&&s?i(o(r,s)):"",c=`/hot-picks/${encodeURIComponent(a)}`;return l?`${c}/${l}`:c}},90185:(e,t,a)=>{a.d(t,{L:()=>x,a:()=>f});let r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i={en:"just now",th:"à¹à¸¡à¸·à¹à¸à¸ªà¸±à¸à¸à¸£à¸¹à¹",vi:"vừa xong",id:"baru saja",zh:"åå"},l={en:"Today",th:"วัà¸à¸à¸µà¹",vi:"H\xf4m nay",id:"Hari Ini",zh:"仿¥"},n={en:"Yesterday",th:"à¹à¸¡à¸·à¹à¸à¸§à¸²à¸",vi:"H\xf4m qua",i
1d:"Kemarin",zh:"æ¨å¤©"};function o(e){if(null==e||""===e)return NaN;if("number"==typeof e)return Number.isFinite(e)?e:NaN;let t=new Date(e).getTime();return Number.isFinite(t)?t:NaN}function c(e){return String(e||"en").toLowerCase().split("-")[0]||"en"}function u(e){return"en"===c(e)}function h(e){let t=new Date(e);return Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate())}function d(e,t,a){return`${e} ${1===e?t:a} ago`}function m(e,t){let a=Math.max(0,t-e);if(a<6e4)return"just now";let r=Math.floor(a/6e4);if(r<60)return d(r,"minute","minutes");let s=Math.floor(a/36e5);return s<24?d(s,"hour","hours"):d(Math.floor(a/864e5),"day","days")}function g(e,t,a){let r=c(a),s=Math.max(0,t-e);if(s<6e4)return i[r]||i.en;let l=new Intl.RelativeTimeFormat(a||"en",{numeric:"always"}),n=Math.floor(s/6e4);if(n<60)return l.format(-n,"minute");let o=Math.floor(s/36e5);if(o<24)return l.format(-o,"hour");let u=Math.floor(s/864e5);return l.format(-u,"day")}function p(e,t){return new Intl.DateTimeFormat(t||"en",{hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:"UTC"}).format(e)}function f(e,t,a,i={}){let d,x,v=o(e);if(!Number.isFinite(v))return"";let b=Number.isFinite(i.nowMs)?i.nowMs:Date.now(),y=Number(t),w=Number.isFinite(y)?36e5*y:0,j=v+w,k=b+w,F=new Date(j),N=u(a)?function(e,t,a="en"){let i=new Date(e),l=Math.round((h(t)-h(e))/864e5);if(0===l)return"Today";if(1===l)return"Yesterday";if(l>1&&l<5)return s[i.getUTCDay()];let n=String(i.getUTCDate()).padStart(2,"0"),o=r[i.getUTCMonth()],c=i.getUTCFullYear(),u=s[i.getUTCDay()];return`${n}-${o} ${c} ${u}`}(j,k,a):function(e,t,a){let r=c(a),s=new Date(e),i=Math.round((h(t)-h(e))/864e5);if(0===i)return l[r]||l.en;if(1===i)return n[r]||n.en;let o=new Intl.DateTimeFormat(a||"en",{weekday:"long",timeZone:"UTC"}).format(s);if(i>1&&i<5)return o;let u=String(s.getUTCDate()).padStart(2,"0"),d=new Intl.DateTimeFormat(a||"en",{month:"short",timeZone:"UTC"}).format(s),m=s.getUTCFullYear();return`${u}-${d} ${m} ${o}`}(j,k,a),C=u(a)?(d=String(F.getUTCMinutes()).padStart(2,"0"),x=F.getUTCHours(),`${String(x%12||12).padStart(2,"0")}:${d} ${x>=12?"PM":"AM"}`):p(F,a),S=u(a)?m(j,k):g(j,k,a);return`${N} ${C} (${S})`}function x(e,t,a,i={}){let d,f,v=o(e);if(!Number.isFinite(v))return"";let b=Number.isFinite(i.nowMs)?i.nowMs:Date.now(),y=Number(t),w=Number.isFinite(y)?36e5*y:0,j=v+w,k=b+w,F=new Date(j),N=u(a),C=N?(d=String(F.getUTCMinutes()).padStart(2,"0"),f=F.getUTCHours(),`${f%12||12}:${d}${f>=12?"p":"a"}`):p(F,a);if(12>=Math.floor(Math.max(0,k-j)/36e5))return N?m(j,k):g(j,k,a);let S=Math.round((h(k)-h(j))/864e5);if(0===S){let e=N?"Today":l[c(a)]||l.en;return`${e} ${C}`}if(1===S){let e=N?"Yesterday":n[c(a)]||n.en;return`${e} ${C}`}if(2===S||3===S){let e=N?s[F.getUTCDay()]:new Intl.DateTimeFormat(a||"en",{weekday:"long",timeZone:"UTC"}).format(F);return`${e}, ${C}`}let T=String(F.getUTCDate()).padStart(2,"0"),L=N?r[F.getUTCMonth()]:new Intl.DateTimeFormat(a||"en",{month:"short",timeZone:"UTC"}).format(F),M=String(F.getUTCFullYear()).slice(-2);return`${T}-${L}'${M} ${C}`}},95226:(e,t,a)=>{a.d(t,{A:()=>c});var r=a(95155),s=a(12115),i=a(86190),l=a(50242),n=a(64805);let o="/placeholder/default_team.svg",c=(0,s.memo)(function({id:e=null,logoUrl:t=null,alt:a="",small:c=!1,width:u=32,height:h=32,fill:d=!1,className:m="",style:g={},priority:p=!1,loading:f="lazy",unstyled:x=!1}){let v=String(t??"").trim(),b=(!v||/^(?:null|undefined)$/i.test(v)||/\/placeholder\/default_team\.svg(?:\?|$)/i.test(v)||/(?:^|\/)(?:images|images_small)\/\d+\.png(?:\?|$)/i.test(v)?"":(0,l.m)(v))||(e?c?"https://image.5746136.xyz/images_small/"+e+".png":"https://image.5746136.xyz/images/"+e+".png":"")||o,[y,w]=(0,s.useState)(b),j="string"==typeof m&&/(?:^|\s)!?(?:size|h)-/.test(m),k=(0,n.default)({src:y,width:d?64:u,quality:75});(0,s.useEffect)(()=>{w(b)},[b]);let F=()=>{w(o)},N=e=>{let t=e.currentTarget;t.naturalWidth<=1&&t.naturalHeight<=1&&w(o)};return d?(0,r.jsx)("div",{className:`relative w-full h-full ${m}`.trim(),style:g,children:(0,r.jsx)("img",{src:k,alt:a,className:"object-contain",style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"contain"},loading:p?"eager":f,fetchPriority:p?"high":void 0,decoding:"async",onError:F,onLoad:N})}):(0,r.jsx)("img",{src:k,alt:a,width:u,height:h,className:(0,i.cn)(!x&&!j&&"h-auto",m),style:g,loading:p?"eager":f,fetchPriority:p?"high":void 0,decoding:"async",onError:F,onLoad:N})},(e,t)=>e.id===t.id&&e.logoUrl===t.logoUrl&&e.alt===t.alt&&e.className===t.className&&e.width===t.width&&e.height===t.height&&e.sizes===t.sizes&&e.unstyled===t.unstyled)},99273:(e,t,a)=>{a.r(t),a.d(t,{SearchDrawer:()=>U});var r=a(95155);let s=JSON.parse('{"en":{"search":{"search":"Search","matches":"Matches","live":"LIVE","forums":"Forums","searching":"Searching...","suggested":"Suggested","topics":"Topics","loadingForums":"Loading forums...","startTypingToSearch":"Start typing to search for matches","noResultsFound":"No results found","noForumsAvailable":"No forums available","noMatchesFoundTitle":"No Matches Found","noForumsFoundTitle":"No Forums Found","noResultsFoundHint":"Try adjusting your search or using different keywords","noResults":"No results","resultCount":"{count, plural, one {# result} other {# results}}"},"shell":{"forum":{"giphyFailedToLoad":"Failed to load GIFs","giphyGif":"GIF","giphyLoading":"Loading GIFs...","giphyNoResults":"No GIFs found","giphyPickerTitle":"Choose a GIF","openGifPicker":"Open GIF picker","like":"Like","replies":"Replies","views":"Views","uploadNotConfigured":"Image upload is not configured. Please contact the administrator.","categoryFo
1otballForums":"Football","categoryHorseRacingLottery":"Horse Racing & Lottery","categoryOtherForums":"Others","categoryMultiLanguageForums":"Multi-Language","categoryTipstersChampionshipGames":"Tipsters Championship & Games","categoryFriendlyDiscussion":"Friendly Discussion","giphySectionGoal":"Goal","giphySectionSoccer":"Soccer","giphySectionPremierLeague":"Premier League","giphySectionChampionsLeague":"Champions League","giphySectionFootballCelebration":"Celebration","giphySectionPenalty":"Penalty","giphySectionFreeKick":"Free Kick","giphySectionGoalkeeper":"Goalkeeper","giphySectionFootballFail":"Fails","giphySectionVar":"VAR","giphySectionFootballFans":"Fans"}}},"zh":{"search":{"search":"æç´¢","matches":"æ¯èµ","live":"ç´æ","forums":"论å","searching":"æç´¢ä¸...","suggested":"æ¨è","topics":"主é¢","loadingForums":"æ£å¨å 载论å...","startTypingToSearch":"å¼å§è¾å
¥ä»¥æç´¢æ¯èµ","noResultsFound":"æªæ¾å°ç»æ","noForumsAvailable":"没æå¯ç¨ç论å","noMatchesFoundTitle":"æªæ¾å°æ¯èµ","noForumsFoundTitle":"æªæ¾å°è®ºå","noResultsFoundHint":"å°è¯è°æ´æç´¢æä½¿ç¨ä¸åå
³é®è¯","noResults":"没æç»æ","resultCount":"{count, plural, other {# ä¸ªç»æ}}"},"shell":{"forum":{"giphyFailedToLoad":"æ æ³å è½½ GIF","giphyGif":"GIF","giphyLoading":"æ£å¨å è½½ GIFâ¦","giphyNoResults":"ææ GIF","giphyPickerTitle":"éæ© GIF","openGifPicker":"æå¼ GIF éæ©å¨","like":"ç¹èµ","replies":"åå¤","views":"次æ¥ç","uploadNotConfigured":"å¾çä¸ä¼ æªé
ç½®ï¼è¯·è系管çåã","categoryFootballForums":"è¶³ç","categoryHorseRacingLottery":"èµé©¬ä¸å½©ç¥¨","categoryOtherForums":"å
¶ä»","categoryMultiLanguageForums":"å¤è¯è¨","categoryTipstersChampionshipGames":"ææ³¨ä¸å®¶é¦æ èµä¸æ¸¸æ","categoryFriendlyDiscussion":"å好讨论","giphySectionGoal":"è¿ç","giphySectionSoccer":"è¶³ç","giphySectionPremierLeague":"è±è¶
","giphySectionChampionsLeague":"欧å ","giphySectionFootballCelebration":"åºç¥","giphySectionPenalty":"ç¹ç","giphySectionFreeKick":"ä»»æç","giphySectionGoalkeeper":"é¨å°","giphySectionFootballFail":"失误","giphySectionVar":"VAR","giphySectionFootballFans":"çè¿·"}}},"vi":{"search":{"search":"T\xecm kiếm","matches":"Tráºn Äấu","live":"TRá»°C TIẾP","forums":"Diá»
n Ä\xe0n","searching":"Äang t\xecm kiếm...","suggested":"Äá» xuất","topics":"Chá»§ Äá»","loadingForums":"Äang tải diá»
n Ä\xe0n...","startTypingToSearch":"Bắt Äầu nháºp Äá» t\xecm kiếm tráºn Äấu","noResultsFound":"Kh\xf4ng t\xecm thấy kết quả","noForumsAvailable":"Kh\xf4ng c\xf3 diá»
n Ä\xe0n n\xe0o","noMatchesFoundTitle":"Kh\xf4ng t\xecm thấy tráºn Äấu","noForumsFoundTitle":"Kh\xf4ng t\xecm thấy diá»
n Ä\xe0n","noResultsFoundHint":"H\xe3y thá» Äiá»u chá»nh t\xecm kiếm hoặc d\xf9ng từ kh\xf3a kh\xe1c","noResults":"Kh\xf4ng c\xf3 kết quả","resultCount":"{count, plural, other {# kết quả}}"},"shell":{"forum":{"giphyFailedToLoad":"Kh\xf4ng thá» tải GIF","giphyGif":"GIF","giphyLoading":"Äang tải GIFâ¦","giphyNoResults":"Kh\xf4ng c\xf3 GIF","giphyPickerTitle":"Chá»n GIF","openGifPicker":"Má» bá» chá»n GIF","like":"Th\xedch","replies":"Trả lá»i","views":"lượt xem","uploadNotConfigured":"Chức nÄng tải ảnh chưa ÄÆ°á»£c cấu h\xecnh. Vui l\xf2ng li\xean há» quản trá» vi\xean.","categoryFootballForums":"B\xf3ng Ä\xe1","categoryHorseRacingLottery":"Äua ngá»±a & Xá» sá»","categoryOtherForums":"Kh\xe1c","categoryMultiLanguageForums":"Äa ng\xf4n ngữ","categoryTipstersChampionshipGames":"Giải Äấu & Tr\xf2 chÆ¡i Tipster","categoryFriendlyDiscussion":"Thảo luáºn th\xe2n thiá»n","giphySectionGoal":"B\xe0n thắng","giphySectionSoccer":"B\xf3ng Ä\xe1","giphySectionPremierLeague":"Premier League","giphySectionChampionsLeague":"Champions League","giphySectionFootballCelebration":"Än mừng","giphySectionPenalty":"Phạt Äá»n","giphySectionFreeKick":"Ä\xe1 phạt","giphySectionGoalkeeper":"Thá»§ m\xf4n","giphySectionFootballFail":"Lá»i h\xe0i","giphySectionVar":"VAR","giphySectionFootballFans":"Cá» Äá»ng vi\xean"}}},"th":{"search":{"search":"à¸à¹à¸à¸«à¸²","matches":"à¸à¸²à¸£à¹à¸à¹à¸à¸à¸±à¸","live":"à¸à¹à¸²à¸¢à¸à¸à¸à¸ªà¸","forums":"à¸à¸à¸£à¸±à¸¡","searching":"à¸à¸³à¸¥à¸±à¸à¸à¹à¸à¸«à¸²...","suggested":"à¹à¸à¸°à¸à¸³","topics":"หัวà¸à¹à¸","loadingForums":"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸à¸à¸à¸£à¸±à¸¡...","startTypingToSearch":"à¹à¸£à¸´à¹à¸¡à¸à¸´à¸¡à¸à¹à¹à¸à¸·à¹à¸à¸à¹à¸à¸«à¸²à¸à¸²à¸£à¹à¸à¹à¸à¸à¸±à¸","noResultsFound":"à¹à¸¡à¹à¸à¸à¸à¸¥à¸¥à¸±à¸à¸à¹","noForumsAvailable":"à¹à¸¡à¹à¸¡à¸µà¸à¸à¸£à¸±à¸¡","noMatchesFoundTitle":"à¹à¸¡à¹à¸à¸à¸à¸²à¸£à¹à¸à¹à¸à¸à¸±à¸","noForumsFoundTitle":"à¹à¸¡à¹à¸à¸à¸à¸à¸£à¸±à¸¡","noResultsFoundHint":"ลà¸à¸à¸à¸£à¸±à¸à¸à¸³à¸à¹à¸à¸«à¸£à¸·à¸à¹à¸à¹à¸à¸³à¸à¸·à¹à¸","noResults":"à¹à¸¡à¹à¸à¸à¸à¸¥à¸¥à¸±à¸à¸à¹","resultCount":"{count, plural, other {# à¸à¸¥à¸¥à¸±à¸à¸à¹}}"},"shell":{"forum":{"giphyFailedToLoad":"à¹à¸«à¸¥à¸ GIF à¹à¸¡à¹à¸ªà¸³à¹à¸£à¹à¸","giphyGif":"GIF","giphyLoading":"à¸à¸³à¸¥à¸±à¸à¹à¸«à¸¥à¸ GIFâ¦","giphyNoResults":"à¹à¸¡à¹à¸à¸ GIF","giphyPickerTitle":"à¹à¸¥à¸·à¸à¸ GIF","openGifPicker":"à¹à¸à¸´à¸à¸à¸±à¸§à¹à¸¥à¸·à¸à¸ GIF","like"
1:"à¸à¸¹à¸à¹à¸","replies":"à¸à¸à¸à¸à¸¥à¸±à¸","views":"à¸à¸²à¸£à¸à¸¹","uploadNotConfigured":"ยัà¸à¹à¸¡à¹à¹à¸à¹à¸à¸³à¸«à¸à¸à¸à¹à¸²à¸à¸²à¸£à¸à¸±à¸à¹à¸«à¸¥à¸à¸£à¸¹à¸à¸ าภà¸à¸£à¸¸à¸à¸²à¸à¸´à¸à¸à¹à¸à¸à¸¹à¹à¸à¸¹à¹à¸¥à¸£à¸°à¸à¸","categoryFootballForums":"à¸à¸¸à¸à¸à¸à¸¥","categoryHorseRacingLottery":"à¹à¸à¹à¸à¸¡à¹à¸² & หวย","categoryOtherForums":"à¸à¸·à¹à¸à¹","categoryMultiLanguageForums":"หลายภาษา","categoryTipstersChampionshipGames":"à¸à¸²à¸£à¹à¸à¹à¸à¸à¸±à¸ & à¹à¸à¸¡à¸à¸´à¸à¸ªà¹à¸à¸à¸£à¹","categoryFriendlyDiscussion":"à¸à¸²à¸£à¸ªà¸à¸à¸à¸²à¹à¸à¸à¹à¸à¹à¸à¸¡à¸´à¸à¸£","giphySectionGoal":"à¸à¸£à¸°à¸à¸¹","giphySectionSoccer":"à¸à¸¸à¸à¸à¸à¸¥","giphySectionPremierLeague":"à¸à¸£à¸µà¹à¸¡à¸µà¸¢à¸£à¹à¸¥à¸µà¸","giphySectionChampionsLeague":"à¹à¸à¸¡à¹à¸à¸µà¸¢à¸à¸ªà¹à¸¥à¸µà¸","giphySectionFootballCelebration":"à¸à¸¥à¸à¸à¸à¸£à¸°à¸à¸¹","giphySectionPenalty":"à¸à¸¸à¸à¹à¸à¸©","giphySectionFreeKick":"à¸à¸£à¸µà¸à¸´à¸","giphySectionGoalkeeper":"à¸à¸¹à¹à¸£à¸±à¸à¸©à¸²à¸à¸£à¸°à¸à¸¹","giphySectionFootballFail":"à¸à¸±à¸à¸«à¸§à¸°à¸à¸¥à¸²à¸","giphySectionVar":"VAR","giphySectionFootballFans":"à¹à¸à¸à¸à¸à¸¥"}}},"id":{"search":{"search":"Cari","matches":"Pertandingan","live":"LIVE","forums":"Forum","searching":"Mencari...","suggested":"Disarankan","topics":"Topik","loadingForums":"Memuat forum...","startTypingToSearch":"Mulai mengetik untuk mencari pertandingan","noResultsFound":"Tidak ada hasil ditemukan","noForumsAvailable":"Tidak ada forum tersedia","noMatchesFoundTitle":"Tidak ada pertandingan ditemukan","noForumsFoundTitle":"Tidak ada forum ditemukan","noResultsFoundHint":"Coba ubah pencarian atau gunakan kata kunci lain","noResults":"Tidak ada hasil","resultCount":"{count, plural, other {# hasil}}"},"shell":{"forum":{"giphyFailedToLoad":"Gagal memuat GIF","giphyGif":"GIF","giphyLoading":"Memuat GIFâ¦","giphyNoResults":"Tidak ada GIF","giphyPickerTitle":"Pilih GIF","openGifPicker":"Buka pemilih GIF","like":"Suka","replies":"Balasan","views":"tayangan","uploadNotConfigured":"Unggahan gambar belum dikonfigurasi. Silakan hubungi administrator.","categoryFootballForums":"Sepak Bola","categoryHorseRacingLottery":"Balap Kuda & Lotere","categoryOtherForums":"Lainnya","categoryMultiLanguageForums":"Multi-Bahasa","categoryTipstersChampionshipGames":"Kejuaraan & Permainan Tipster","categoryFriendlyDiscussion":"Diskusi Ramah","giphySectionGoal":"Gol","giphySectionSoccer":"Sepak bola","giphySectionPremierLeague":"Premier League","giphySectionChampionsLeague":"Champions League","giphySectionFootballCelebration":"Selebrasi","giphySectionPenalty":"Penalti","giphySectionFreeKick":"Tendangan bebas","giphySectionGoalkeeper":"Kiper","giphySectionFootballFail":"Gagal lucu","giphySectionVar":"VAR","giphySectionFootballFans":"Suporter"}}}}');a(66435);var i=a(12115),l=a(26708),n=a(32787),o=a(63644),c=a(5772),u=a(79354),h=a(9805),d=a(56754),m=a(6343),g=a(86190),p=a(7494),f=a(90185);async function x(e,t){let a=new URLSearchParams({q:e,limit:String(t)}),r=await fetch(`/api/matches/search?${a.toString()}`),s=await r.json().catch(()=>({}));return r.ok?s:{success:!1,matches:[],error:s?.error}}async function v(e){let t=new URLSearchParams({limit:String(e)}),a=await fetch(`/api/matches/search?${t.toString()}`),r=await a.json().catch(()=>({}));return a.ok?r:{success:!1,matches:[],error:r?.error}}let b={all:["search"],matches:{all:["search","matches"],byQuery:(e,t)=>[...b.matches.all,e,t]},suggested:{all:["search","suggested"],byLimit:e=>[...b.suggested.all,e]}};var y=a(28057),w=a(95226),j=a(93433),k=a(67593),F=a(50242),N=a(55332);function C({title:e,description:t}){return(0,r.jsx)(m.default,{inline:!0,title:e,description:t,inlineWrapperClassName:"flex items-center justify-center w-full !p-4",inlineCardClassName:"gradient-border !border-transparent bg-white dark:bg-[var(--live-search-surface,#171717)] !rounded-lg w-full",inlineContentClassName:"flex flex-col gap-4 items-center px-3 py-10 text-center",titleClassName:"text-[#171717] dark:text-white text-[16px] font-semibold leading-6",descriptionClassName:"text-[#808080] dark:text-[var(--live-search-text,#C8C8C8)] text-center text-[12px] font-normal leading-4 tracking-[-0.072px]"})}let S="animate-pulse rounded-md bg-[#d1d1d1] dark:bg-[var(--live-search-muted,#454545)]";function T({suggestedLabel:e,loadingAnnouncement:t}){return(0,r.jsxs)("div",{className:"flex flex-col gap-2 items-start p-4 w-full",role:"status",children:[(0,r.jsx)("span",{className:"sr-only",children:t}),(0,r.jsx)(D,{label:e}),(0,r.jsx)("div",{className:"flex flex-col gap-2 items-start w-full",children:[0,1,2,3,4].map(e=>(0,r.jsxs)("div",{className:(0,g.cn)("gradient-border !border-transparent bg-white dark:bg-[var(--live-search-surface,#171717)] flex gap-2 items-center px-3 py-2 rounded-[10px] w-full","pointer-events-none select-none"),"aria-hidden":!0,
1children:[(0,r.jsxs)("div",{className:"relative shrink-0 w-7 h-7",children:[(0,r.jsx)("div",{className:(0,g.cn)("absolute left-0 top-0 size-[18.667px] rounded-full",S)}),(0,r.jsx)("div",{className:(0,g.cn)("absolute right-0 bottom-0 size-[18.667px] rounded-full opacity-90",S)})]}),(0,r.jsxs)("div",{className:"flex-1 flex flex-col gap-2 min-w-0 py-0.5",children:[(0,r.jsx)("div",{className:(0,g.cn)("h-4 w-[min(72%,220px)]",S)}),(0,r.jsx)("div",{className:(0,g.cn)("h-3 w-[min(40%,140px)] opacity-80",S)})]}),(0,r.jsx)("div",{className:(0,g.cn)("size-6 shrink-0",S)})]},e))})]})}function L(){return(0,r.jsxs)("div",{className:(0,g.cn)("gradient-border !border-transparent bg-white dark:bg-[var(--live-search-surface,#171717)] flex gap-2 items-center px-3 py-2 rounded-[10px] w-full h-10","pointer-events-none select-none"),"aria-hidden":!0,children:[(0,r.jsx)("div",{className:(0,g.cn)("shrink-0 w-8 h-6 rounded",S)}),(0,r.jsx)("div",{className:(0,g.cn)("flex-1 h-4 max-w-[min(72%,240px)] rounded-md",S)})]})}function M(){return(0,r.jsxs)("div",{className:(0,g.cn)("gradient-border !border-transparent bg-white dark:bg-[var(--live-search-surface,#171717)] flex flex-col gap-2 p-3 rounded-lg w-full","pointer-events-none select-none"),"aria-hidden":!0,children:[(0,r.jsxs)("div",{className:"flex min-w-0 w-full items-start gap-2",children:[(0,r.jsx)("div",{className:(0,g.cn)("mt-0.5 h-5 w-5 shrink-0 rounded",S)}),(0,r.jsx)("div",{className:(0,g.cn)("min-w-0 flex-1 h-5 rounded-md",S)})]}),(0,r.jsx)("div",{className:(0,g.cn)("h-3 w-[min(85%,280px)] rounded-md opacity-90",S)}),(0,r.jsx)("div",{className:(0,g.cn)("h-3 w-32 rounded-md opacity-70",S)})]})}function G(){return(0,r.jsxs)("div",{className:"flex gap-1.5 items-center justify-center py-1.5 w-full",children:[(0,r.jsx)("div",{className:"h-0 relative shrink-0 w-5",children:(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-0 top-[-1px] border-t border-[#d1d1d1] dark:border-[var(--live-search-border,#454545)]"})}),(0,r.jsx)("div",{className:(0,g.cn)("h-3 w-28 rounded-md shrink-0",S)}),(0,r.jsx)("div",{className:"flex-1 h-0 min-w-0 relative",children:(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-0 top-[-1px] border-t border-[#d1d1d1] dark:border-[var(--live-search-border,#454545)]"})})]})}function A({loadingAnnouncement:e}){return(0,r.jsxs)("div",{className:"flex flex-col w-full",role:"status",children:[(0,r.jsx)("span",{className:"sr-only",children:e}),[0,1].map(e=>(0,r.jsxs)("div",{className:"flex flex-col gap-2 items-start p-4 w-full",children:[(0,r.jsx)(G,{}),(0,r.jsx)("div",{className:"flex flex-col gap-2 items-start w-full",children:[0,1,2,3].map(t=>(0,r.jsx)(L,{},`${e}-${t}`))})]},e))]})}function I({forumsLabel:e,topicsLabel:t,loadingAnnouncement:a}){return(0,r.jsxs)("div",{className:"flex flex-col items-start w-full",role:"status",children:[(0,r.jsx)("span",{className:"sr-only",children:a}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 items-start p-4 w-full",children:[(0,r.jsx)(D,{label:e}),(0,r.jsx)("div",{className:"flex flex-col gap-2 items-start w-full",children:[0,1,2].map(e=>(0,r.jsx)(L,{},`f-${e}`))})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-2 items-start p-4 w-full",children:[(0,r.jsx)(D,{label:t}),(0,r.jsx)("div",{className:"flex flex-col gap-2 items-start w-full",children:[0,1,2].map(e=>(0,r.jsx)(M,{},`t-${e}`))})]})]})}let $=({match:e,onClose:t})=>{let a=(0,h.g)(),s=(0,y.c3)("shell.match"),{isFavorite:l,toggleFavorite:n}=(0,k.rB)(),o=e.favoriteId||e.matchhash||e.id,u=e.legacyFavoriteId,d=l(o),m=u&&l(u),p=d||m,f=e.ID||e.id||e.matchId||e.matchhash,x=e.isLive?(0,N.OA)(f,e):(0,N.iG)(e.matchhash,e),v=(0,i.useCallback)(e=>{e.stopPropagation(),o&&n(!d&&m?u:o)},[d,m,u,o,n]),b=(0,i.useCallback)(r=>{!e.matchhash||0!==r.button||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey||(r.preventDefault(),t&&t(!1),e.isLive?a.push((0,N.OA)(f,e)):a.push((0,N.iG)(e.matchhash,e)))},[f,e,t,a]);e.matchhash||e.id;let F=e.team1?.name||"",C=e.team2?.name||"",S=e.league||"",T=e.statusLabel||"";return(0,r.jsxs)("div",{className:(0,g.cn)("gradient-border !border-transparent bg-white dark:bg-[var(--live-search-surface,#171717)] flex gap-2 items-start p-3 rounded-[10px] w-full","z-[100] items-center px-3 py-2 cursor-pointer hover:bg-zinc-50 dark:hover:bg-[var(--live-search-muted,#18181b)] "),children:[(0,r.jsxs)(j.default,{href:x,prefetch:!e.isLive&&void 0,onClick:b,className:"flex min-w-0 flex-1 items-center gap-2","aria-label":e.match||`${F} vs ${C}`,children:[(0,r.jsxs)("div",{className:"grid grid-cols-[max-content] grid-rows-[max-content] inline-grid leading-0 place-items-start relative shrink-0",children:[(0,r.jsx)("div",{className:"col-start-1 row-start-1 ml-0 mt-0 relative w-[18.667px] h-[18.667px]",children:(0,r.jsx)(w.A,{id:e.team1?.id,alt:`${F} - ${S}`,width:18.667,height:18.667,small:!0,className:"absolute inset-0 object-cover rounded-full"})}),(0,r.jsx)("div",{className:"col-start-1 row-start-1 ml-[9.33px] mt-[9.33px] relative w-[18.667px] h-[18.667px]",children:(0,r.jsx)(w.A,{id:e.team2?.id,alt:`${C} - ${S}`,width:18.667,height:18.667,small:!0,className:"absolute inset-0 object-cover rounded-full"})})]}),(0,r.jsxs)("div",{className:"flex-1 flex flex-col items-start min-w-0",children:[(0,r.jsx)("p",{className:"font-normal text-[14px] leading-[20px] text-[#171717] dark:text-white tracking-[-0.084px] font-normal text-sm truncate w-full",children:e.match}),(0,r.jsx)("p",{className:"font-normal text-xs leading-4 tracking-[-0.072px] text-[#808080] dark:text-[var(--live-search-text,#C8C8C8)] whitespace-nowrap",children:S})]}),T?(0,r.jsx)("span",{className:"shrink-0 rounded-[4px] bg-[#f1f1f1] px-1.5 py-0.5 text-[10px] font-semibold leading-3 text-[#808080] dark:bg-[var(--live-search-muted,#2A2A2A)] dark:text-[var(--live-search-text,#C8C8C8)]",children:T}):null]}),(0,r.jsx)("button",{onClick:v,className:"shrink-0 flex items-center justify-center w-6 h-6","aria-label":s(p?"removeFromFavorites":"addToFavorites"),children:p?(0,r.jsx)(c.default,{src:"/assets/favorite_fill_yellow.svg",alt:"",width:24,height:24,className:"w-full h-full object-contain"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.default,{src:"/assets/favourite_search.svg",alt:"",width:24,height:24,className:"w-full h-full object-contain block dark:hidden"}),(0,r.jsx)(c.default,{src:"/assets/favourite_search_dark.svg",alt:"",width:24,height:24,className:"w-full h-full object-contain hidden dark:block"})]})})]})};function D({label:e}){return(0,r.jsxs)("div",{className:"flex gap-1.5 items-center justify-center py-1.5 w-full",children:[(0,r.jsx)("div",{className:"h-0 relative shrink-0 w-5",children:(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-0 top-[-1px] border-t border-[#d1d1d1] dark:border-[var(--live-search-border,#454545)]"})}),(0,r.jsx)("p",{className:"font-semibold text-xs leading-4 text-[#808080] dark:text-[var(--live-search-text,#C8C8C8)] tracking-[0.48px] uppercase whitespace-nowrap",children:e}),(0,r.jsx)("div",{className:"flex-1 h-0 min-w-0 relative",children:(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-0 top-[-1px] border-t border-[#d1d1d1] dark:border-[var(--live-search-border,#454545)]"})})]})}function _({icon:e,className:t}){let a={horse:"/assets/search/horse.png",nba:"/assets/search/nba.png","e-sport":"/assets/search/e_sport.png",casino:"/assets/search/casino.png",sportbook:"/assets/search/sportbook.png"}[e];return a?(0,r.jsx)("div",{className:t,children:(0,r.jsx)(c.default,{src:a,alt:e,width:24,height:24,className:"w-full h-full object-contain"})}):null}function R({forum:e,onClick:t,onClose:a}){let s=`/forums/${e.slug||(e.forumName||e.name||"").toLowerCase().replace(/\s+/g,"-")}`;return(0,r.jsxs)(j.default,{href:s,onNavigate:()=>{t?.(e),a?.(!1)},className:(0,g.cn)("gradient-border !border-transparent bg-white dark:bg-[var(--live-search-surface,#171717)] flex gap-2 items-start p-3 rounded-[10px] w-full","px-3 py-2 h-10 items-center rounded-lg focus-visible:outline-2 focus-visible:outline-red-600 focus-visible:outline-offset-2 cursor-pointer hover:bg-zinc-50 dark:hover:bg-[var(--live-search-muted,#18181b)] "),children:[e.flag?(0,r.jsx)("div",{className:"relative shrink-0 w-8 h-6",children:(0,r.jsx)(c.default,{src:(0,F.m)(e.flag),alt:e.name||e.forumName,width:32,height:24,className:"gradient-border !border-transparent absolute inset-0 object-cover "})}):e.logo?(0,r.jsx)("div",{className:"relative shrink-0 w-8 h-6",children:(0,r.jsx)(c.default,{src:(0,F.m)(e.logo),alt:e.name||e.forumName,width:32,height:24,className:"absolute inset-0 object-cover"})}):(0,r.jsx)("div",{className:"shrink-0 w-6 h-6",children:(0,r.jsx)(_,{icon:e.icon,className:"w-6 h-6"})}),(0,r.jsx)("p",{className:"font-normal text-[14px] leading-[20px] text-[#171717] dark:text-white tracking-[-0.084px] w-full",children:e.name||e.forumName})]})}function E({topic:e,onClick:t,onClose:a}){let s=(0,y.c3)("shell.forum"),i=(0,y.Ym)(),{timezone:l}=(0,k.Jd)(),n=e.icon||"topic.gif",o=(0,p.ZP)(e.forumSlug||e.forumID,e.topicID,e.topicTitle);return(0,r.jsxs)(j.default,{href:o,onNavigate:()=>{t?.(e),a?.(!1)},className:"gradient-border !border-transparent bg-white dark:bg-[var(--live-search-surface,#171717)] flex flex-col gap-1 p-3 rounded-lg w-full focus-visible:outline-2 focus-visible:outline-red-600 focus-visible:outline-offset-2 cursor-pointer hover:bg-zinc-50 dark:hover:bg-[var(--live-search-muted,#18181b)] ",children:[(0,r.jsxs)("div",{className:"flex min-w-0
1w-full items-start gap-2",children:[(0,r.jsx)("img",{src:`/topicicons/${n}`,alt:"",className:"mt-0.5 h-5 w-5 shrink-0"}),(0,r.jsx)("p",{className:"min-w-0 flex-1 truncate font-semibold text-sm leading-5 text-[#171717] dark:text-white tracking-[-0.084px]",children:e.topicTitle})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs text-[#808080] dark:text-[var(--live-search-text,#C8C8C8)]",children:[(0,r.jsx)("span",{children:e.forumName}),(0,r.jsx)("span",{children:"â¢"}),(0,r.jsx)("span",{children:e.memberName}),e.lastMessageDate&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:"â¢"}),(0,r.jsx)("span",{children:(0,f.a)(e.lastMessageDate,l,i)})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 text-xs text-[#808080] dark:text-[var(--live-search-text,#C8C8C8)]",children:[e.replies>0&&(0,r.jsxs)("span",{children:[e.replies," ",s("replies")]}),e.likesCount>0&&(0,r.jsxs)("span",{children:[e.likesCount," ",s("like")]}),e.views>0&&(0,r.jsxs)("span",{children:[e.views," ",s("views")]})]})]})}function P({open:e,onClose:t,searchQuery:a,setSearchQuery:s,inputRef:l,onClearSearch:h}){let m=(0,y.c3)("search"),p=(0,y.c3)("common"),f=(0,i.useCallback)(t=>{(!t||null!==t.offsetParent)&&(l.current=t,t&&e&&setTimeout(()=>t.focus(),100))},[e,l]),x=(0,r.jsxs)("div",{className:"border dark:border-[var(--live-search-border,#454545)] border-[#D1D1D1] bg-white dark:bg-[var(--live-search-surface,#171717)] flex gap-2 items-center overflow-clip pl-3 pr-2 py-2 relative rounded-[8px] shrink-0 w-full",children:[(0,r.jsxs)("div",{className:"overflow-clip relative shrink-0 size-5",children:[(0,r.jsx)(c.default,{src:"/assets/common/search.svg",alt:"",width:20,height:20,className:"w-full h-full object-contain dark:hidden"}),(0,r.jsx)(c.default,{src:"/assets/common/search_dark.png",alt:"",width:20,height:20,className:"w-full h-full object-contain hidden dark:block"})]}),(0,r.jsxs)("div",{className:"flex-1 relative",children:[(0,r.jsx)(n.p,{ref:f,type:"text",placeholder:m("search"),value:a,onChange:e=>s(e.target.value),className:(0,g.cn)("[white-space-collapse:collapse] basis-0 font-['Inter',sans-serif] font-normal grow leading-[20px] min-h-px min-w-px not-italic overflow-ellipsis overflow-hidden relative shrink-0 text-[#171717] dark:text-white text-nowrap tracking-[-0.084px] border-0 bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 p-0 h-auto placeholder:text-[#d1d1d1] dark:placeholder:text-[var(--live-search-text,#808080)] w-full text-[16px]")}),a&&(0,r.jsx)("button",{type:"button",onClick:h||(()=>s("")),className:"absolute right-0 top-1/2 -translate-y-1/2 text-[#808080] hover:text-[#171717] dark:hover:text-white","aria-label":p("clear"),children:(0,r.jsx)("span",{className:"text-lg","aria-hidden":!0,children:"â"})})]})]});return(0,r.jsxs)("header",{className:"bg-white dark:bg-[var(--live-search-surface,#171717)] flex flex-col items-center w-full shrink-0",children:[(0,r.jsx)("div",{className:"flex items-start justify-center pb-0 pt-[calc(1rem_+_var(--fd-safe-area-inset-top))] px-4 relative shrink-0 w-full xl:hidden",children:(0,r.jsxs)("div",{className:"basis-0 flex gap-2 grow items-center min-h-px min-w-px relative shrink-0",children:[(0,r.jsx)(d.DrawerClose,{asChild:!0,children:(0,r.jsxs)(o.$,{variant:"ghost",size:"icon-sm",className:"overflow-clip relative shrink-0 size-7 flex items-center justify-center","aria-label":p("back"),children:[(0,r.jsx)(c.default,{src:"/assets/back.svg",alt:"",width:28,height:28,className:"w-full h-full block dark:hidden"}),(0,r.jsx)(c.default,{src:"/assets/back_dark.svg",alt:"",width:28,height:28,className:"w-full h-full hidden dark:block"})]})}),(0,r.jsx)("div",{className:"basis-0 flex flex-col gap-1 grow items-start min-h-px min-w-px relative shrink-0",children:x})]})}),(0,r.jsxs)("div",{className:"hidden w-full xl:flex xl:flex-col xl:items-start xl:shrink-0",children:[(0,r.jsxs)("div",{className:"flex w-full items-center justify-between border-b border-[#d1d1d1] p-6 dark:border-[var(--live-search-border,#2A2A2A)]",children:[(0,r.jsx)("h2",{className:"text-[24px] font-semibold leading-[32px] tracking-[-0.36px] text-[#171717] dark:text-white",children:m("search")}),(0,r.jsx)(d.DrawerClose,{asChild:!0,children:(0,r.jsx)(o.$,{variant:"ghost",size:"icon-sm",className:"h-10 w-10 text-[#336699] hover:bg-transparent hover:text-[#336699] dark:text-[#40B6F0] dark:hover:text-[#40B6F0]","aria-label":p("close"),children:(0,r.jsx)(u.US,{})})})]}),(0,r.jsx)("div",{className:"w-full px-8 py-4",children:x})]})]})}function U(e){return e.open?(0,r.jsx)(y.LocalI18nProvider,{messagesByLocale:s,children:(0,r.jsx)(H,{...e})}):null}function H({open:e,onOpenChange:t,variant:a="default"}){let s=(0,y.c3)("search"),n=(0,y.c3)("shell.forum"),c=(0,y.c3)("common"),[u,h]=(0,i.useState)(""),[m,p]=(0,i.useState)(""),[f,w]=(0,i.useState)("matches"),{favorites:j,updateSessionPrefs:F}=(0,k.Jd)(),N=(0,i.useRef)(null),S=(0,i.useRef)(null),L=(0,i.useCallback)(()=>{S.current&&(clearTimeout(S.current),S.current=null)},[]),M=(0,i.useCallback)(e=>{h(e),S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{S.current=null,p(e)},300)},[]),G=(0,i.useCallback)(()=>{L(),h(""),p("")},[L]),_=(0,i.useCallback)(e=>{if(!e){G(),t(!1);return}t(!0)},[t,G]),U=(0,i.useCallback)(()=>{_(!1)},[_]),z=(0,i.useCallback)(()=>{t("navigate")},[t]),K=(0,i.useCallback)(e=>{w(e)},[]),O=(0,i.useCallback)(()=>{G()},[G]),q=(0,i.useCallback)(e=>
1{let t={"football forums":"categoryFootballForums","horse racing & lottery":"categoryHorseRacingLottery","other forums":"categoryOtherForums","multi-language forums":"categoryMultiLanguageForums","tipsters championship & games":"categoryTipstersChampionshipGames","friendly discussion":"categoryFriendlyDiscussion"}[e.toLowerCase().trim()];return t?n(t):e},[n]),{searchMatches:B,suggestedMatches:V,isSearchingMatches:Y,isLoadingSuggested:W}=function(e={}){let{query:t="",enabled:a=!0,searchLimit:r=20,suggestedLimit:s=10}=e,n=(0,i.useMemo)(()=>t?.trim()||"",[t]),o=n.length>0,c=a&&o,u=a&&!o,h=(0,l.I)({queryKey:b.matches.byQuery(n,r),queryFn:async()=>{let e=await x(n,r);return e?.success&&e.matches||[]},enabled:c}),d=(0,l.I)({queryKey:b.suggested.byLimit(s),queryFn:async()=>{let e=await v(s);return e?.success&&e.matches||[]},enabled:u});return(0,i.useMemo)(()=>({searchMatches:h.data??[],isSearchingMatches:c&&h.isFetching,suggestedMatches:d.data??[],isLoadingSuggested:u&&d.isFetching,searchError:h.error??null,suggestedError:d.error??null,error:h.error||d.error||null}),[h.data,h.isFetching,h.error,c,d.data,d.isFetching,d.error,u])}({query:m,enabled:(0,i.useMemo)(()=>e&&"matches"===f,[e,f]),searchLimit:20,suggestedLimit:10});(0,i.useEffect)(()=>{if(!j?.length)return;let e=new Set(j.map(String)),t=new Map;for(let a of[...B,...V]){let r=a?.legacyFavoriteId,s=a?.favoriteId;r&&s&&String(r)!==String(s)&&e.has(String(r))&&t.set(String(r),String(s))}if(0===t.size)return;let a=[];for(let e of j){let r=t.get(String(e))??String(e);a.includes(r)||a.push(r)}F({favorites:a})},[j,B,V,F]);let J=(0,i.useMemo)(()=>e&&"forums"===f&&!u.trim(),[e,f,u]),Z=(0,l.I)({queryKey:["search-drawer","forums-by-categories"],queryFn:async()=>{let e=await fetch("/api/forum/categories",{credentials:"include"}),t=e.ok?await e.json():{success:!1};return t.success&&t.categories?t.categories:[]},enabled:J,staleTime:1/0,gcTime:18e5}),Q=Z.data??[],X=J&&Z.isPending,ee=m.trim(),et=(0,i.useMemo)(()=>e&&"forums"===f&&ee.length>0,[e,f,ee]),ea=(0,l.I)({queryKey:["search-drawer","forum-search",ee,10],queryFn:async()=>{try{let[e,t]=await Promise.all([fetch(`/api/forum/search-forums?q=${encodeURIComponent(ee)}&limit=10`,{credentials:"include"}),fetch(`/api/forum/search-topics?q=${encodeURIComponent(ee)}&limit=10`,{credentials:"include"})]),a=e.ok?await e.json():{success:!1},r=t.ok?await t.json():{success:!1};return{forums:a.success&&a.forums||[],topics:r.success&&r.topics||[]}}catch(e){return console.error("Error searching:",e),{forums:[],topics:[]}}},enabled:et}),er=ea.data??{forums:[],topics:[]},es="forums"===f&&!!u.trim()&&u!==m||et&&ea.isFetching;return(0,r.jsx)(d.Drawer,{open:e,onOpenChange:_,direction:"right",modal:!0,children:(0,r.jsx)(d.DrawerContent,{className:"!fixed !right-0 !top-0 !bottom-0 !left-auto !max-w-[var(--fd-drawer-max-w)] !w-full !h-full !rounded-none bg-[var(--fd-bg-primary)] p-0 dark:bg-[var(--fd-bg-secondary)]",children:(0,r.jsxs)("div",{className:"flex w-full h-full flex-col bg-fd-bg-primary",children:[(0,r.jsx)(P,{open:e,onClose:U,searchQuery:u,setSearchQuery:M,inputRef:N,onClearSearch:O}),(0,r.jsx)("div",{className:"bg-white dark:bg-[var(--live-search-surface,#171717)] border-b border-transparent [box-shadow:0_4px_8px_0_rgba(0,0,0,0.04)] dark:[border-image:var(--dark-header)_1] w-full",children:(0,r.jsxs)("div",{className:"flex items-center w-full",children:[(0,r.jsx)(o.$,{onClick:()=>K("matches"),className:(0,g.cn)("flex-1 flex items-center justify-center px-2 py-3 bg-transparent hover:bg-transparent gap-1 h-auto pb-2","matches"===f?"border-b-4 border-[#336699] dark:border-[var(--live-search-link,#4888C8)] rounded-none":"border-b-4 border-transparent rounded-none"),variant:"ghost",children:(0,r.jsx)("p",{className:(0,g.cn)("font-semibold leading-[16px] not-italic shrink-0 text-[12px] text-center text-nowrap uppercase w-full","matches"===f?"text-[#336699] dark:text-[var(--live-search-link,#4888C8)]":"text-[#808080] dark:text-[var(--live-search-text,#C8C8C8)]"),children:s("matches")})}),(0,r.jsx)(o.$,{onClick:()=>K("forums"),className:(0,g.cn)("flex-1 flex items-center justify-center px-2 py-3 bg-transparent hover:bg-transparent gap-1 h-auto pb-2","forums"===f?"border-b-4 border-[#336699] dark:border-[var(--live-search-link,#4888C8)] rounded-none":"border-b-4 border-transparent roun
1ded-none"),variant:"ghost",children:(0,r.jsx)("p",{className:(0,g.cn)("font-semibold leading-[16px] not-italic shrink-0 text-[12px] text-center text-nowrap uppercase w-full","forums"===f?"text-[#336699] dark:text-[var(--live-search-link,#4888C8)]":"text-[#808080] dark:text-[var(--live-search-text,#C8C8C8)]"),children:s("forums")})})]})}),(0,r.jsxs)("main",{className:"flex-1 overflow-y-auto",children:["matches"===f&&(0,r.jsx)("div",{className:"flex flex-col items-start w-full",children:m.trim()?(0,r.jsx)(r.Fragment,{children:Y?(0,r.jsx)("div",{className:"flex items-center justify-center w-full py-8",children:(0,r.jsx)("p",{className:"text-sm text-[#808080] dark:text-[var(--live-search-text,#C8C8C8)]",children:s("searching")})}):(0,r.jsxs)(r.Fragment,{children:[(()=>{if(!B||0===B.length)return null;let e=[],t=[];for(let a of B)a.isLive?e.push(a):t.push(a);return 0===e.length&&0===t.length?null:(0,r.jsxs)("div",{className:"flex flex-col gap-2 items-start p-4 w-full",children:[t.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(D,{label:s("matches")}),(0,r.jsx)("div",{className:"flex flex-col gap-2 items-start w-full",children:t.map(e=>(0,r.jsx)($,{match:e,onClose:z},e.matchhash||e.id))})]}),e.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(D,{label:s("live")}),(0,r.jsx)("div",{className:"flex flex-col gap-2 items-start w-full",children:e.map(e=>(0,r.jsx)($,{match:e,onClose:z},e.matchhash||e.id))})]})]})})(),!Y&&(!B||0===B.length)&&(0,r.jsx)(C,{title:s("noMatchesFoundTitle"),description:s("noResultsFoundHint")})]})}):(0,r.jsx)(r.Fragment,{children:W?(0,r.jsx)(T,{suggestedLabel:s("suggested"),loadingAnnouncement:c("loading")}):(0,r.jsx)(r.Fragment,{children:V&&V.length>0?(0,r.jsxs)("div",{className:"flex flex-col gap-2 items-start p-4 w-full",children:[(0,r.jsx)(D,{label:s("suggested")}),(0,r.jsx)("div",{className:"flex flex-col gap-2 items-start w-full",children:V.map(e=>(0,r.jsx)($,{match:e,onClose:z},e.matchhash||e.id))})]}):(0,r.jsx)("div",{className:"flex items-center justify-center w-full py-8",children:(0,r.jsx)("p",{className:"text-sm text-[#808080] dark:text-[var(--live-search-text,#C8C8C8)]",children:s("startTypingToSearch")})})})})}),"forums"===f&&(0,r.jsx)("div",{className:"flex flex-col items-start w-full",children:u.trim()?(0,r.jsx)(r.Fragment,{children:es?(0,r.jsx)(I,{forumsLabel:s("forums"),topicsLabel:s("topics"),loadingAnnouncement:s("searching")}):(0,r.jsxs)(r.Fragment,{children:[er.forums.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-2 items-start p-4 w-full",children:[(0,r.jsx)(D,{label:s("forums")}),(0,r.jsx)("div",{className:"flex flex-col gap-2 items-start w-full",children:er.forums.map(e=>(0,r.jsx)(R,{forum:e,onClose:z},e.forumID))})]}),er.topics.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-2 items-start p-4 w-full",children:[(0,r.jsx)(D,{label:s("topics")}),(0,r.jsx)("div",{className:"flex flex-col gap-2 items-start w-full",children:er.topics.map(e=>(0,r.jsx)(E,{topic:e,onClose:z},e.topicID))})]}),!es&&0===er.forums.length&&0===er.topics.length&&(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(C,{title:s("noForumsFoundTitle"),description:s("noResultsFoundHint")})})]})}):(0,r.jsx)(r.Fragment,{children:X?(0,r.jsx)(A,{loadingAnnouncement:s("loadingForums")}):Q.length>0?Q.map(e=>e.forums&&0!==e.forums.length?(0,r.jsxs)("div",{className:"flex flex-col gap-2 items-start p-4 w-full",children:[(0,r.jsx)(D,{label:q(e.category)}),(0,r.jsx)("div",{className:"flex flex-col gap-2 items-start w-full",children:e.forums.map(e=>(0,r.jsx)(R,{forum:{forumID:e.forumID,forumName:e.forumName,slug:e.slug,logo:e.logo},onClose:z},e.forumID))})]},e.catID):null):(0,r.jsx)("div",{className:"flex items-center justify-center w-full py-8",children:(0,r.jsx)("p",{className:"text-sm text-[#808080] dark:text-[var(--live-search-text,#C8C8C8)]",children:s("noForumsAvailable")})})})})]})]})})})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.