1import{g as $,d as U}from"./C-9dbQSY.js";import{r as w,a as T,d as R}from"./JR_dtwf4.js";import{R as x,a as M,S as I}from"./DL61D00e.js";import{f as G,i as B}from"./C_VzGqEg.js";function L(t,e=""){const s=[];for(const r of Object.keys(t)){const i=t[r],n=e?`${e}[${r}]`:r;if(i!==null&&typeof i=="object"&&!Array.isArray(i))s.push(L(i,n));else{const o=i==null?`${encodeURIComponent(n)}=`:`${encodeURIComponent(n)}=${encodeURIComponent(i)}`;s.push(o)}}return s.join("&")}const j=["rating","established","casinoRtp","payoutTime","games","license","faviconLight","faviconDark","favicon","gradientStop2","depositLimit","depositLimitCurrency","withdrawalLimit","paymentMethod","ratings"],z=["afflinkProxy","titlePreview","tnc","bonusCode","tncLinkProxy","amount1","bonusWagering","bonusValidFor"],H=["id","slug","name","position","disabled"],q=["siteLink","notActive","acceptedGeo","restrictedGeo","fees"],X=["softwareProvider","gameType","compatibility","support","supportEmail","offers","operator"],V=["VIPHighRollerOffers","miniReview","pros","cons","howWeRate","authorsReview","playersOfMonth","highlightedReview","siteScreenshots","screenshotsCasino","stockMarketStats","popularityChart","expertRating","ratingTrend","gamesAvailableChart","alternativeCasinos","appImages","expertRatingCasinoReview","liveDealerGames"];function W(t){if(!t)return{};const e={};if(H.forEach(s=>{t[s]!==void 0&&(e[s]=t[s])}),t.attributes&&(e.attributes={},j.forEach(s=>{t.attributes[s]!==void 0&&(e.attributes[s]=t.attributes[s])}),t.attributes.toplistOffer)){const s=t.attributes.toplistOffer;let r=s.offerType;if(!r){const i=t.attributes?.offers||t.offers;Array.isArray(i)&&(r=i.find(o=>o?.attributes?.afflinkProxy)?.offerType)}e.attributes.toplistOffer={id:s.id,name:s.name,offerType:r},s.attributes&&(e.attributes.toplistOffer.attributes={},z.forEach(i=>{s.attributes[i]!==void 0&&(e.attributes.toplistOffer.attributes[i]=s.attributes[i])}))}return t.offers&&(e.offers=t.offers),e}function Z(t){if(!t)return{};const e={};return q.forEach(s=>{t[s]!==void 0&&(e[s]=t[s])}),e}function K(t={},e,s){const r={...t};return e?.attributes&&(r.phoenix={...r.phoenix,attributes:{...r.phoenix?.attributes}},X.forEach(i=>{e.attributes[i]!==void 0&&(r.phoenix.attributes[i]=e.attributes[i])})),s&&(r.supplement={...r.supplement},V.forEach(i=>{s[i]!==void 0&&(r.supplement[i]=s[i])})),r._lazyLoaded=!0,r}const J=t=>w[0].regions.some(e=>e.region===t);class Y{mergeCasinosData(e,s=[],r,i,n,o={}){const{leanSSR:a=!1}=o,d=J(r?.regionCode)?r?.regionCode:"default";return e.map(p=>{const l=JSON.parse(JSON.stringify(p)),y=$("partners",l.slug)||{},u=y.default||{},c=y[d]||{},f=["siteLink"],h=U({...u},c,f),S={light:l.attributes.faviconLight,dark:l.attributes.faviconDark,default:l.attributes.favicon,blur:l.attributes.gradientStop2};(!l?.attributes?.toplistOffer||!Object.keys(l?.attributes?.toplistOffer)?.length)&&(l.attributes.toplistOffer=l?.offers||{});const P=n?.regionCode,b=h?.restrictedGeo,g=l.disabled===!0,m=Array.isArray(b)&&b.length>0&&P&&b.includes(P);return(g||m)&&(l.attributes?.toplistOffer?.attributes&&(l.attributes.toplistOffer.attributes.afflinkProxy=""),l.offers?.attributes&&(l.offers.attributes.afflinkProxy=""),Array.isArray(l.attributes?.offers)&&l.attributes.offers[0]?.attributes&&(l.attributes.offers[0].attributes.afflinkProxy="")),a?{phoenix:W(l),supplement:Z(h),favicon:S,minimumDeposit:this.setMinimumDeposit(l),siteLink:h?.siteLink,toplistResponseId:i,_leanSSR:!0}:{phoenix:l,supplement:h,favicon:S,minimumDeposit:this.setMinimumDeposit(l),siteLink:h?.siteLink,toplistResponseId:i}})}setMinimumDeposit(e){let s="-",r="$";return e.attributes.depositLimit&&e.attributes.depositLimitCurrency?(e.attributes.depositLimitCurrency.length>0&&(r=e.attributes.depositLimitCurrency[0].currencySymbol),s=e.attributes.depositLimit):e.attributes.depositLimit&&!e.attributes.depositLimitCurrency&&(s=e.attributes.depositLimit),s=s!=="-"?`${r}${s}`:"N/A",s}}const _=(t,e,s)=>{for(let r=0;r<t.attributes?.restrictedGeo?.length;r++){const i=t.attributes?.restrictedGeo[r];(i?.country===e&&!i?.region||i?.country===e&&i?.region===s)&&(t.disabled=!0)}},Q=new Y,F=t=>w.find(e=>t===e.country&&e?.options?.socialCasinos),O=(t,e,s,r,i,n={})=>t.length?Q.mergeCasinosData(t,e,s,r,i,n):[],E=new WeakMap,N=t=>t?String(t).toLowerCase().trim().replace(/[\s+]+/g," "):null,tt=["prediction markets","horse racing"],et=(t,e)=>tt.includes(e)?{...t,regionCode:""}:t,ot=G("phoenix",{state:()=>({toplistMap:{},commercialPartners:[],partnersData:[],requestType:"",partnersBySlug:{},casinoSlug:null,topPartner:{},topPartnerUpdated:{},isTopPartnerFetched:!1,defaultPartnerName:"jackpot-city-casino",bonuses:{},countryCode:null,pageType:null,currentPartner:{},filters:{sortBy:"",depositType:[],otherFeatures:[],rating:"",minAmount:null,maxAmount:null},modalGame:{open:!1,game:{},partner:{}},allPartners:[],totalReviews:"30",toplistTypes:["bonus"],customPartners:[],toplistResponseId:null,authorReviews:{},partnerDetailsCache:{},toplistLoading:{}}),getters:{toplist:t=>t?.pageType?t.toplistMap[t.pageType]:t.toplistMap[t.countryCode],toplists:t=>t.toplistMap,filteredPartners:t=>{let e=t?.pageType?[...t.toplistMap[t.pageType]||[]]:[...t.toplistMap[t.countryCode]||[]];if(t.filters.sortBy)switch(t.filters.sortBy){case"Higher rating":e=e.sort((r,i)=>(i.phoenix?.attributes?.rating||0)-(r.phoenix?.attributes?.rating||0));break;case"Higher welcome bonus":e=e.sort((r,i)=>{const n=r.phoenix?.attributes?.toplistOffer?.attributes?.amount1??"",o=i.phoenix?.attributes?.toplistOffer?.attributes?.amount1??"",a=parseFloat(n.replace(/[^0-9.
1-]+/g,""))||0;return(parseFloat(o.replace(/[^0-9.-]+/g,""))||0)-a});break;case"Fastest payout":e=e.sort((r,i)=>{const n=o=>{const a=o.phoenix?.attributes?.payoutTime||o.supplement?.payoutSpeed||"";if(a.toLowerCase().includes("instant"))return 0;if(a==="1")return 1;if(a.includes("-")){const[d,p]=a.split("-").map(l=>parseInt(l,10));return(d+p)/2}return parseInt(a,10)||1/0};return n(r)-n(i)});break;case"A-Z":e=e.sort((r,i)=>{const n=r.phoenix?.name||"",o=i.phoenix?.name||"";return n<o?-1:n>o?1:0});break;case"Z-A":e=e.sort((r,i)=>{const n=r.phoenix?.name||"",o=i.phoenix?.name||"";return n<o?1:n>o?-1:0});break;default:return e}if(t.filters.depositType&&t.filters.depositType.length>0){const r=t.filters.depositType.map(i=>parseInt(i,10)).filter(i=>!Number.isNaN(i));r.length>0?e=e.filter(i=>{const n=parseInt(i.phoenix?.attributes?.depositLimit,10);return!Number.isNaN(n)&&r.includes(n)}):console.warn("Invalid deposit type values:",t.filters.depositType)}const s=["bitcoin","citadel","coinspaid","dogecoin","ethereum","litecoin","ripple","solana (sol)","tether","tron","volt"];return t.filters.otherFeatures.length>0&&t.filters.otherFeatures.forEach(r=>{const i=r.toLowerCase();e=e.filter(n=>n.phoenix?.attributes?.paymentMethod?.some(o=>o.paymentMethodName?.toLowerCase()===i||o.payment_method_name?.toLowerCase()===i||i==="crypto"&&s.includes(o.paymentMethodName?.toLowerCase())))}),t.filters.rating&&(e=e.filter(r=>{const i=String(r.phoenix?.attributes?.rating??"").replace(",","."),n=parseFloat(i)||0,o=n>5?n/2:n;return Number(o.toFixed(1))>=parseFloat(t.filters.rating)})),t.filters.minAmount===null&&t.filters.maxAmount===null||(t.filters.minAmount!==null||t.filters.maxAmount!==null)&&(e=e.filter(r=>{const i=r?.phoenix?.attributes?.toplistOffer?.attributes?.amount1||r.supplement?.bonusAmount||"",n=parseFloat(i.replace(/[^\d.-]+/g,""))||0;return(t.filters.minAmount===null||n>=t.filters.minAmount)&&(t.filters.maxAmount===null||n<=t.filters.maxAmount)&&n!==0})),e},appliedFiltersCount:t=>{let e=0;const{filters:s}=t;return s.depositType&&s.depositType.length>0&&(e+=s.depositType.length),s.otherFeatures&&s.otherFeatures.length>0&&(e+=s.otherFeatures.length),s.bonusAmount&&s.bonusAmount.length>0&&(e+=s.bonusAmount.length),s.rating&&Array.isArray(s.rating)&&s.rating.length>0?e+=s.rating.length:s.rating&&s.rating!==""&&(e+=1),s.minAmount!=null&&(e+=1),s.maxAmount!=null&&(e+=1),s.paymentMethods&&s.paymentMethods.length>0&&(e+=s.paymentMethods.length),e},filteredPartnersCount(){return this.filteredPartners.length},partnerSlug:t=>t.casinoSlug||null,currentPagePartner:t=>t.casinoSlug?t.partnersBySlug[t.casinoSlug]:{},toplistByType:t=>e=>t.toplistMap[e],getPartnerDetails:t=>e=>t.partnerDetailsCache[e]||null,getAuthorReviews:t=>e=>t.authorReviews[e]||[]},actions:{setPartnersData(t){this.partnersData=[...t]},setRequestType(t){this.requestType=t},setToplist(t){this.toplistMap={...this.toplistMap,...t}},setCountryCode(t){this.countryCode=t},setPageType(t){this.pageType=t},setPartnerBySlug({items:t,type:e}){this.partnersBySlug={...this.partnersBySlug,[e]:{...t[0]}}},setPartnersBySlug(t){const e=t.reduce((s,r)=>{const i=r?.phoenix?.slug;return i&&(s[i]=r),s},{});this.partnersBySlug={...this.partnersBySlug,...e}},setTopPartner(t){this.topPartner=t},saveCasinoSlug(t){this.casinoSlug=t},setCurrentPartnerState(t){this.currentPartner=t},setFilters(t){this.filters={...this.filters,...t}},setMinAmount(t){this.filters.minAmount=t},setMaxAmount(t){this.filters.maxAmount=t},setAllPartners(t){this.allPartners=t},setCustomPartner(t){this.customPartners.some(e=>e.phoenix?.slug===t.phoenix?.slug)||this.customPartners.push(t)},setResponseId(t){this.toplistResponseId=t},setAuthorReviews({authorId:t,reviews:e}){this.authorReviews[t]=e},setPartnerDetailsCache({slug:t,data:e}){this.partnerDetailsCache={...this.partnerDetailsCache,[t]:e}},setToplistLoading({type:t,value:e}){const s={...this.toplistLoading};e?s[t]=!0:delete s[t],this.toplistLoading=s},updateToplistPartner({regionKey:t,slug:e,partnerData:s}){if(this.toplistMap[t]){const r=this.toplistMap[t].findIndex(i=>i.phoenix?.slug===e);r!==-1&&(this.toplistMap[t]=[...this.toplistMap[t].slice(0,r),s,...this.toplistMap[t].slice(r+1)])}},async fetchToplist({pageType:t,geoData:e,savePageType:s,saveCountryCode:r=!0,leanSSR:i}={}){const n=T();let o=E.get(this);o||(o=Object.create(null),E.set(this,o));const a=N(t),d=n.computedLocation,p=et(e||d,a),{countryCode:l,regionCode:y}=p,u=y?`${l}${y}`:l||"rest",c=i!==void 0?i:!1,f=a?`${u}_${a}`:null,h=[u,a||"default"].join("|");!Object.keys(this.toplistMap)?.length||!a&&!this.toplistMap[u]?.length||a&&!this.toplistMap[f]?.length?this.toplistLoading[h]&&o[h]?await o[h]:(o[h]=(async()=>{this.setToplistLoading({type:h,value:!0});try{await this.fetchPartners({location:p,pageType:a});const S=this.partnersData,P=this.toplistResponseId,b=n.userLocation,g=O(S,[],p,P,b,{leanSSR:c});a?this.setToplist({[a]:g,[f]:g}):this.setToplist({[u]:g})}finally{this.setToplistLoading({type:h,value:!1}),delete o[h]}})(),await o[h]):a&&this.toplistMap[f]?.length&&this.toplistMap[a]!==this.toplistMap[f]&&this.setToplist({[a]:this.toplistMap[f]}),r&&this.setCountryCode(u),s&&this.setPageType(a)},async fetchPartners({location:t,pageType:e,returnValue:s=!1}
1){const r=t?.countryCode,i=t?.regionCode,{API_PHNX:n}=this.$config,o=B().getDynamicPageData?.vertical||x,a=N(e),d={params:{identifier:I,params:{country:r,region:i,site:M,page_type:a||"",sub_vertical:F(r)?"social":null,locale:R,vertical:o}},paramsSerializer:p=>L(p)};try{const p=await this.$http.get(`${n}/toplist`,d),l=p?.config?.params?.params,y=l&&l?.sub_vertical&&l?.sub_vertical==="social",u=p.data,c=p.data[0]?.responseId,f=u[0]?.partners||[];if(this.setResponseId(c),s)return f;this.setPartnersData(f),this.setRequestType(y?"social":"default")}catch({message:p}){console.error("Unable to save toplist: ",p)}},parnersFilteredByProviderId(t){const e=t.providerId||"";let s=[];return this.toplistMap[this.countryCode]&&this.toplistMap[this.countryCode]?.length&&(s=this.toplistMap[this.countryCode]),e&&s?.length&&(s=s.filter(r=>(r.phoenix?.attributes?.softwareProvider||[]).map(o=>o.id).includes(e))),s},async randomPartnerByProviderId(t){const e=t.providerId||"",s=await this.parnersFilteredByProviderId({providerId:e});let r={};return this.toplistMap[this.countryCode]&&this.toplistMap[this.countryCode]?.length&&(r=this.toplistMap[this.countryCode][0]||{}),r&&s.length&&(r=s[Math.floor(Math.random()*s.length)]),r},async fetchCasinosBySlug({casinoSlugs:t,type:e,leanSSR:s}){if(e==="custom"&&this.customPartners.some(u=>u.phoenix?.slug===t))return;const r=s===!0;let i=null,n,o=[];const a=Array.isArray(t),d=typeof t=="string",p="top-casino",l=B().getDynamicPageData?.vertical||x,y=u=>{const c=this.partnersBySlug[u],f=c?Object.keys(c)?.length:null;return!c&&!f};
1if(d&&!a)n=t,i=e==="custom"||y(n),!i&&this.partnersBySlug[n]&&(o=[this.partnersBySlug[n]]);else if(a){const u=[];t.forEach(c=>{y(c)?u.push(c):this.partnersBySlug[c]&&o.push(this.partnersBySlug[c])}),n=u.join(","),i=n&&u.length>0}if(!i&&e===p&&this.setTopPartner(this.partnersBySlug[n]),!i&&o.length>0)return o;if(i)try{const{API_PHNX:u}=this.$config,c=T().computedLocation||null,f=T().userLocation||null,{regionCode:h,countryCode:S}=c;if(n){const P={params:{slugs:n,identifier:I,params:{country:S,region:h,vertical:l,site:M,sub_vertical:F(S)?"social":null,locale:R}},paramsSerializer:m=>L(m)},{data:b}=await this.$http.get(`${u}/partners-by-slug/`,P),g=b.map(m=>{_(m,f.countryCode,f.regionCode);const A=m?.attributes?.offers?.find(v=>v?.attributes?.afflinkProxy)||[];return{...m,offers:A}});if(g&&g.length>0){const m=O(g,[],c,void 0,f,{leanSSR:r});if(a){this.setPartnersBySlug(m);const A=C=>C?.phoenix?.slug||C?.slug||C?.attributes?.slug,v=[...o,...m].reduce((C,k)=>{const D=A(k);return D&&(C[D]=k),C},{});return t.map(C=>v[C]).filter(Boolean)}else d&&(e==="custom"?this.setCustomPartner(m[0]):this.setPartnerBySlug({type:n,items:m}));return m}}}catch({message:u}){console.error("Unable to save partnersBySlug: ",u)}if(o.length>0)return o},async setCurrentPartner(t){if(this.setCurrentPartnerState(t),t?._leanSSR&&!t?._lazyLoaded&&t?.phoenix?.slug){const e=t.phoenix.slug;if(this.partnerDetailsCache[e]){this.setCurrentPartnerState(this.partnerDetailsCache[e]);return}try{const s=await this.fetchPartnerDetails({slug:e});s&&this.setCurrentPartnerState(s)}catch(s){console.error("Failed to load partner details for tabs:",s)}}},updateFilters(t){this.setFilters(t);const e=this.filteredPartners;e.length>0&&this.setCurrentPartnerState(e[0])},updateMinAmount(t){this.setMinAmount(t)},updateMaxAmount(t){this.setMaxAmount(t)},async fetchPartnerDetails({slug:t,regionKey:e}){if(this.partnerDetailsCache[t])return this.partnerDetailsCache[t];let s=e||this.pageType||this.countryCode,r=this.toplistMap[s]||[],i=r.find(n=>n.phoenix?.slug===t);if(!i){const n=Object.entries(this.toplistMap).find(([,o])=>o?.some(a=>a.phoenix?.slug===t));n&&(s=n[0],r=n[1],i=r.find(o=>o.phoenix?.slug===t))}if(i&&!i._leanSSR)return i;try{const{API_PHNX:n}=this.$config,o=T().computedLocation,a=T().userLocation,{regionCode:d,countryCode:p}=o,l=B().getDynamicPageData?.vertical||x,y={params:{slugs:t,identifier:I,params:{country:p,region:d,vertical:l,site:M,sub_vertical:F(p)?"social":null,locale:R}},paramsSerializer:c=>L(c)},{data:u}=await this.$http.get(`${n}/partners-by-slug/`,y);if(u&&u.length>0){const c=u[0];_(c,a.countryCode,a.regionCode);const f=$("partners",t)||{},h=w.find(g=>g.country==="US")?.regions?.some(g=>g.region===d)?d:"default",S={...f.default||{},...f[h]||{}},P=i||{phoenix:{id:c?.id,slug:c?.slug||t,name:c?.name,attributes:{}},supplement:{},_leanSSR:!0},b=K(P,c,S);return this.setPartnerDetailsCache({slug:t,data:b}),s&&i&&this.updateToplistPartner({regionKey:s,slug:t,partnerData:b}),b}}catch(n){console.error("Failed to fetch partner details:",n.message)}return i}}});export{ot as u};
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.