1import{n as gt,o as Et,b as ct,p as Tt,u as Pe,r as k,q as ft,t as Qt,s as ye,j as e,v as ae,w as $e,A as Bt,a as Ie,e as pt,x as Yt,C as Ce,y as Le,P as Xt,h as ht,g as xe,H as Ft,f as en,L as Xe,c as Rt,k as tn,z as et,D as Ot,E as nn,m as rn,F as sn,G as an,O as Gt,J as on,N as Ae,K as ln,d as cn,M as vt,l as un,Q as dn,R as I,T as kt}from"./index-D-8p-HQm.js";import{u as $t}from"./use-mobile-BC3ptJKd.js";import{u as mn,a as gn,P as fn,D as pn}from"./ProductCardSkeleton-DOZBuldm.js";import{T as hn,a as xn}from"./tabs-B_51V1Er.js";import{f as qt,A as ut,g as yn,a as wn,u as _n,F as St,L as bn,G as vn,Y as kn,U as Sn,B as jn,b as Nn,S as Cn,M as Ln}from"./FilterSidebar-BAcydH5f.js";import{u as Pn}from"./useAdvertisingMessages-BStpLZJo.js";import{Z as Mn}from"./zap-D1gKIRqC.js";import{C as Ut}from"./clock-yJ4Le0DR.js";import{R as An}from"./RoamlessProductCard-ClWMWIcF.js";import{F as In}from"./FAQ-D1-5AS4R.js";import{B as Dn,a as En,b as jt,c as Nt,d as Ct,e as Tn}from"./breadcrumb-Cc41tSfX.js";import{u as Bn,C as Lt,A as Fn}from"./AdvertisingSection-oxIktgGs.js";import{u as Rn}from"./useLocalizedHreflang-Br3976bz.js";import{u as On}from"./useFAQs-CNVjL_ay.js";import{u as Gn}from"./useMayaProducts-DT45sbbc.js";import{F as $n}from"./filter-DbxYr4lu.js";import"./collapsible-CSiduMfs.js";import"./index-QQfy9xyU.js";import"./chart-column-DzOm0xSn.js";import"./star-BESNLR0K.js";import"./circle-check-DRHGEuGd.js";import"./circle-alert-BVVnmNFA.js";import"./percent-DpqtrPB-.js";import"./tag-BYqHgr-_.js";import"./external-link-M8va-7OB.js";import"./phone-DojPWHI-.js";import"./checkbox-NJdUeNAn.js";import"./sheet-pHX8Iu1R.js";import"./index-C44AyFqe.js";import"./purify.es-CD3phjPr.js";import"./chevron-left-Dx825kX6.js";const qn=t=>{const n=t.toLowerCase();return n==="gigsky"?"GigSky":n==="bnesim"?"BNESIM":n==="ubigi"?"UBIGI":t.charAt(0).toUpperCase()+t.slice(1)},Un=(t,n="en")=>{const{rates:s}=gt(),{getProviderDiscount:r}=Et(),{data:l}=ct("hide_small_packages"),c=l?.setting_value?.countries===!0||l?.setting_value?.enabled===!0&&l?.setting_value?.countries===void 0,{data:i}=Tt("country"),{data:m,isLoading:o,error:a}=Pe({queryKey:["aggregated-country-products-v3",t,n],queryFn:async()=>{if(!t)return[];const w=t.toUpperCase(),d="id,product_id,provider,name,price,currency,data_amount,validity,purchase_url,country_name,country_code_iso2,country_code_iso3,coverage,features,is_regional,is_global,original_product",{data:u,error:g}=await ye.from("country_products_aggregated").select(d).eq("country_code_iso2",w).eq("is_global",!1).gt("price",0).order("price",{ascending:!0}).limit(700);if(g)throw g;const y=3,p=(u||[]).filter(L=>{if(!L.is_regional)return!0;if(L.provider?.toLowerCase()!=="gigsky")return!1;const N=Array.isArray(L.coverage)?L.coverage.length:0;return N>0&&N<=y}),{data:_,error:v}=await ye.from("country_products_aggregated").select(d).eq("provider","gigsky").contains("coverage",[w]).eq("is_global",!1).gt("price",0).order("price",{ascending:!0}).limit(250);if(v)throw v;const P=(_||[]).filter(L=>{const N=Array.isArray(L.coverage)?L.coverage.length:0;return N===0||!L.is_regional?!0:N<=y}),E=new Map;return[...p,...P].forEach(L=>{const N=L.product_id||L.id;!N||E.has(N)||E.set(N,{...L,country_code_iso2:w})}),Array.from(E.values()).sort((L,N)=>(L.price||0)-(N.price||0))},...Qt.products,enabled:!!t&&!!s}),x=k.useMemo(()=>!m||!s?[]:qt(m,c).filter(d=>{if(i){const u=d.provider.toLowerCase();if(!(i.get(u)!==!1))return!1}return d.original_product&&d.price>0}).map(d=>{const u=ft(d.price,d.currency,"USD",s),g=r(d.provider),y=g?u*(1-g.coupon_percent/100):u,p=qn(d.provider);return{...d,name:d.name,aggregatedName:d.name,provider:p,price:y,currency:"USD",dataAmount:d.data_amount,data_amount:d.data_amount,validity:d.validity,coverage:d.coverage||[],features:d.features||[],purchaseUrl:d.purchase_url,purchase_url:d.purchase_url,originalProduct:d.original_product,original_product:d.original_product,type:d.provider.toLowerCase()}}),[m,s,r,c,i]),f=k.useMemo(()=>{if(!x.length)return{totalPlans:0,providers:0,bestPrice:0,avgPrice:0,providerBreakdown:[]};const w=x.map(u=>u.price),d=Array.from(new Set(x.map(u=>u.provider)));return{totalPlans:x.length,providers:d.length,bestPrice:Math.min(...w),avgPrice:w.reduce((u,g)=>u+g,0)/w.length,bestPriceProvider:x[0]?.provider,providerBreakdown:d.map(u=>{const g=x.filter(p=>p.provider===u),y=g.map(p=>p.price);return{name:u,count:g.length,avgPrice:y.reduce((p,_)=>p+_,0)/y.length}})}},[x]);return{products:x,stats:f,isLoading:o,error:a}},Vn=(t,n=4)=>{const{data:s,isLoading:r,error:l}=Pe({queryKey:["sponsor-packages",t],queryFn:async()=>
vendor: 8,000 bytes, line 1
1{if(!t)return[];const{data:m,error:o}=await ye.from("sponsor_packages").select("*").eq("country_code_iso2",t.toUpperCase()).eq("is_active",!0);if(o)throw o;return m||[]},enabled:!!t,staleTime:3e5}),[c,i]=k.useState([]);return k.useEffect(()=>{if(!s||s.length===0){i([]);return}const m=s.find(g=>g.is_static),o=s.filter(g=>!g.is_static),a=m?1:0,x=n-a,f=[...o];for(let g=f.length-1;g>0;g--){const y=Math.floor(Math.random()*(g+1));[f[g],f[y]]=[f[y],f[g]]}const w=f.slice(0,x),d=(g,y)=>({id:g.id,title:g.data_volume,description:`${g.duration_days||7}`,price:g.price,currency:g.currency,dataVolume:g.data_volume,provider:g.provider,logo:g.logo_url||"",url:g.purchase_url,position:y,countryCode:g.country_code_iso2,isPopular:!0}),u=[];m&&u.push(d(m,1)),w.forEach((g,y)=>{u.push(d(g,a+y+1))}),i(u)},[s,n,t]),{sponsors:c,isLoading:r,error:l}};function zn(t){return Object.prototype.toString.call(t)==="[object Object]"}function Pt(t){return zn(t)||Array.isArray(t)}function Kn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function xt(t,n){const s=Object.keys(t),r=Object.keys(n);if(s.length!==r.length)return!1;const l=JSON.stringify(Object.keys(t.breakpoints||{})),c=JSON.stringify(Object.keys(n.breakpoints||{}));return l!==c?!1:s.every(i=>{const m=t[i],o=n[i];return typeof m=="function"?`${m}`==`${o}`:!Pt(m)||!Pt(o)?m===o:xt(m,o)})}function Mt(t){return t.concat().sort((n,s)=>n.name>s.name?1:-1).map(n=>n.options)}function Hn(t,n){if(t.length!==n.length)return!1;const s=Mt(t),r=Mt(n);return s.every((l,c)=>{const i=r[c];return xt(l,i)})}function yt(t){return typeof t=="number"}function dt(t){return typeof t=="string"}function nt(t){return typeof t=="boolean"}function At(t){return Object.prototype.toString.call(t)==="[object Object]"}function z(t){return Math.abs(t)}function wt(t){return Math.sign(t)}function qe(t,n){return z(t-n)}function Zn(t,n){if(t===0||n===0||z(t)<=z(n))return 0;const s=qe(z(t),z(n));return z(s/t)}function Wn(t){return Math.round(t*100)/100}function Ue(t){return Ve(t).map(Number)}function ge(t){return t[Ke(t)]}function Ke(t){return Math.max(0,t.length-1)}function _t(t,n){return n===Ke(t)}function It(t,n=0){return Array.from(Array(t),(s,r)=>n+r)}function Ve(t){return Object.keys(t)}function Vt(t,n){return[t,n].reduce((s,r)=>(Ve(r).forEach(l=>{const c=s[l],i=r[l],m=At(c)&&At(i);s[l]=m?Vt(c,i):i}),s),{})}function mt(t,n){return typeof n.MouseEvent<"u"&&t instanceof n.MouseEvent}function Jn(t,n){const s={start:r,center:l,end:c};function r(){return 0}function l(o){return c(o)/2}function c(o){return n-o}function i(o,a){return dt(t)?s[t](o):t(n,o,a)}return{measure:i}}function ze(){let t=[];function n(l,c,i,m={passive:!0}){let o;if("addEventListener"in l)l.addEventListener(c,i,m),o=()=>l.removeEventListener(c,i,m);else{const a=l;a.addListener(i),o=()=>a.removeListener(i)}return t.push(o),r}function s(){t=t.filter(l=>l())}const r={add:n,clear:s};return r}function Qn(t,n,s,r){const l=ze(),c=1e3/60;let i=null,m=0,o=0;function a(){l.add(t,"visibilitychange",()=>{t.hidden&&u()})}function x(){d(),l.clear()}function f(y){if(!o)return;i||(i=y,s(),s());const p=y-i;for(i=y,m+=p;m>=c;)s(),m-=c;const _=m/c;r(_),o&&(o=n.requestAnimationFrame(f))}function w(){o||(o=n.requestAnimationFrame(f))}function d(){n.cancelAnimationFrame(o),i=null,m=0,o=0}function u(){i=null,m=0}return{init:a,destroy:x,start:w,stop:d,update:s,render:r}}function Yn(t,n){const s=n==="rtl",r=t==="y",l=r?"y":"x",c=r?"x":"y",i=!r&&s?-1:1,m=x(),o=f();function a(u){const{height:g,width:y}=u;return r?g:y}function x(){return r?"top":s?"right":"left"}function f(){return r?"bottom":s?"left":"right"}function w(u){return u*i}return{scroll:l,cross:c,startEdge:m,endEdge:o,measureSize:a,direction:w}}function Me(t=0,n=0){const s=z(t-n);function r(a){return a<t}function l(a){return a>n}function c(a){return r(a)||l(a)}function i(a){return c(a)?r(a)?t:n:a}function m(a){return s?a-s*Math.ceil((a-n)/s):a}return{length:s,max:n,min:t,constrain:i,reachedAny:c,reachedMax:l,reachedMin:r,removeOffset:m}}function zt(t,n,s){const{constrain:r}=Me(0,t),l=t+1;let c=i(n);function i(w){return s?z((l+w)%l):r(w)}function m(){return c}function o(w){return c=i(w),f}function a(w){return x().set(m()+w)}function x(){return zt(t,m(),s)}const f={get:m,set:o,add:a,clone:x};return f}function Xn(t,n,s,r,l,c,i,m,o,a,x,f,w,d,u,g,y,p,_){const{cross:v,direction:P}=t,E=["INPUT","SELECT","TEXTAREA"],L={passive:!1},N=ze(),T=ze(),M=Me(50,225).constrain(d.measure(20)),q={mouse:300,touch:400},R={mouse:500,touch:600},W=u?43:25;let F=!1,$=0,Z=0,Y=!1,K=!1,U=!1,te=!1;function be(S){if(!_)return;function G(Q){(nt(_)||_(S,Q))&&j(Q)}const V=n;N.add(V,"dragstart",Q=>Q.preventDefault(),L).add(V,"touchmove",()=>{},L).add(V,"touchend",()=>{}).add(V,"touchstart",G).add(V,"mousedown",G).add(V,"touchcancel",H).add(V,"contextmenu",H).add(V,"click",ie,!0)}function ne(){N.clear(),T.clear()}function X(){const S=te?s:n;T.add(S,"touchmove",J,L).add(S,"touchend",H).add(S,"mousemove",J,L).add(S,"mouseup",H)}function ce(S){const G=S.nodeName||"";return E.includes(G)}function re(){return(u?R:q)[te?"mouse":"touch"]}function je(S,G){const V=f.add(wt(S)*-1),Q=x.byDistance(S,!u).distance;return u||z(S)<M?Q:y&&G?Q*.5:x.byIndex(V.get(),0).distance}function j(S){const G=mt(S,r);te=G,U=u&&G&&!S.buttons&&F,F=qe(l.get(),i.get())>=2,!(G&&S.button!==0)&&(ce(S.target)||(Y=!0,c.pointerDown(S),a.useFriction(0).useDuration(0),l.set(i),X(),$=c.readPoint(S),Z=c.readPoint(S,v),w.emit("pointerDown")))}function J(S){if(!mt(S,r)&&S.touches.length>=2)return H(S);const V=c.readPoint(S),Q=c.readPoint(S,v),ee=qe(V,$),ue=qe(Q,Z);if(!K&&!te&&(!S.cancelable||(K=ee>ue,!K)))return H(S);const de=c.pointerMove(S);ee>g&&(U=!0),a.useFriction(.3).useDuration(.75),m.start(),l.add(P(de)),S.preventDefault()}function H(S){const V=x.byDistance(0,!1).index!==f.get(),Q=c.pointerUp(S)*re(),ee=je(P(Q),V),ue=Zn(Q,ee),de=W-10*ue,fe=p+ue/50;K=!1,Y=!1,T.clear(),a.useDuration(de).useFriction(fe),o.distance(ee,!u),te=!1,w.emit("pointerUp")}function ie(S){U&&(S.stopPropagation(),S.preventDefault(),U=!1)}function D(){return Y}return{init:be,destroy:ne,pointerDown:D}}function er(t,n){let r,l;function c(f){return f.timeStamp}function i(f,w){const u=`client${(w||t.scroll)==="x"?"X":"Y"}`;return(mt(f,n)?f:f.touches[0])[u]}function m(f){return r=f,l=f,i(f)}function o(f){const w=i(f)-i(l),d=c(f)-c(r)>170;return l=f,d&&(r=f),w}function a(f){if(!r||!l)return 0;const w=i(l)-i(r),d=c(f)-c(r),u=c(f)-c(l)>170,g=w/d;return d&&!u&&z(g)>.1?g:0}return{pointerDown:m,pointerMove:o,pointerUp:a,readPoint:i}}function tr(){function t(s){const{offsetTop:r,offsetLeft:l,offsetWidth:c,offsetHeight:i}=s;return{top:r,right:l+c,bottom:r+i,left:l,width:c,height:i}}return{measure:t}}function nr(t){function n(r){return t*(r/100)}return{measure:n}}function rr(t,n,s,r,l,c,i){const m=[t].concat(r);let o,a,x=[],f=!1;function w(y){return l.measureSize(i.measure(y))}function d(y){if(!c)return;a=w(t),x=r.map(w);function p(_){for(const v of _){if(f)return;const P=v.target===t,E=r.indexOf(v.target),L=P?a:x[E],N=w(P?t:r[E]);if(z(N-L)>=.5){y.reInit(),n.emit("resize");break}}}o=new ResizeObserver(_=>{(nt(c)||c(y,_))&&p(_)}),s.requestAnimationFrame(()=>{m.forEach(_=>o.observe(_))})}function u(){f=!0,o&&o.disconnect()}return{init:d,destroy:u}}function sr(t,n,s,r,l,c){let i=0,m=0,o=l,a=c,x=t.get(),f=0;function w(){const L=r.get()-t.get(),N=!o;let T=0;return N?(i=0,s.set(r),t.set(r),T=L):(s.set(t),i+=L/o,i*=a,x+=i,t.add(i),T=x-f),m=wt(T),f=x,E}function d(){const L=r.get()-n.get();return z(L)<.001}function u(){return o}function g(){return m}function y(){return i}function p(){return v(l)}function _(){return P(c)}function v(L){return o=L,E}function P(L){return a=L,E}const E={direction:g,duration:u,velocity:y,seek:w,settled:d,useBaseFriction:_,useBaseDuration:p,useFriction:P,useDuration:v};return E}function ar(t,n,s,r,l){const c=l.measure(10),i=l.measure(50),m=Me(.1,.99);let o=!1;function a(){return!(o||!t.reachedAny(s.get())||!t.reachedAny(n.get()))}
vendor: 9,640 bytes, line 1
1function x(d){if(!a())return;const u=t.reachedMin(n.get())?"min":"max",g=z(t[u]-n.get()),y=s.get()-n.get(),p=m.constrain(g/i);s.subtract(y*p),!d&&z(y)<c&&(s.set(t.constrain(s.get())),r.useDuration(25).useBaseFriction())}function f(d){o=!d}return{shouldConstrain:a,constrain:x,toggleActive:f}}function ir(t,n,s,r,l){const c=Me(-n+t,0),i=f(),m=x(),o=w();function a(u,g){return qe(u,g)<=1}function x(){const u=i[0],g=ge(i),y=i.lastIndexOf(u),p=i.indexOf(g)+1;return Me(y,p)}function f(){return s.map((u,g)=>{const{min:y,max:p}=c,_=c.constrain(u),v=!g,P=_t(s,g);return v?p:P||a(y,_)?y:a(p,_)?p:_}).map(u=>parseFloat(u.toFixed(3)))}function w(){if(n<=t+l)return[c.max];if(r==="keepSnaps")return i;const{min:u,max:g}=m;return i.slice(u,g)}return{snapsContained:o,scrollContainLimit:m}}function or(t,n,s){const r=n[0],l=s?r-t:ge(n);return{limit:Me(l,r)}}function lr(t,n,s,r){const c=n.min+.1,i=n.max+.1,{reachedMin:m,reachedMax:o}=Me(c,i);function a(w){return w===1?o(s.get()):w===-1?m(s.get()):!1}function x(w){if(!a(w))return;const d=t*(w*-1);r.forEach(u=>u.add(d))}return{loop:x}}function cr(t){const{max:n,length:s}=t;function r(c){const i=c-n;return s?i/-s:0}return{get:r}}function ur(t,n,s,r,l){const{startEdge:c,endEdge:i}=t,{groupSlides:m}=l,o=f().map(n.measure),a=w(),x=d();function f(){return m(r).map(g=>ge(g)[i]-g[0][c]).map(z)}function w(){return r.map(g=>s[c]-g[c]).map(g=>-z(g))}function d(){return m(a).map(g=>g[0]).map((g,y)=>g+o[y])}return{snaps:a,snapsAligned:x}}function dr(t,n,s,r,l,c){const{groupSlides:i}=l,{min:m,max:o}=r,a=x();function x(){const w=i(c),d=!t||n==="keepSnaps";return s.length===1?[c]:d?w:w.slice(m,o).map((u,g,y)=>{const p=!g,_=_t(y,g);if(p){const v=ge(y[0])+1;return It(v)}if(_){const v=Ke(c)-ge(y)[0]+1;return It(v,ge(y)[0])}return u})}return{slideRegistry:a}}function mr(t,n,s,r,l){const{reachedAny:c,removeOffset:i,constrain:m}=r;function o(u){return u.concat().sort((g,y)=>z(g)-z(y))[0]}function a(u){const g=t?i(u):m(u),y=n.map((_,v)=>({diff:x(_-g,0),index:v})).sort((_,v)=>z(_.diff)-z(v.diff)),{index:p}=y[0];return{index:p,distance:g}}function x(u,g){const y=[u,u+s,u-s];if(!t)return u;if(!g)return o(y);const p=y.filter(_=>wt(_)===g);return p.length?o(p):ge(y)-s}function f(u,g){const y=n[u]-l.get(),p=x(y,g);return{index:u,distance:p}}function w(u,g){const y=l.get()+u,{index:p,distance:_}=a(y),v=!t&&c(y);if(!g||v)return{index:p,distance:u};const P=n[p]-_,E=u+x(P,0);return{index:p,distance:E}}return{byDistance:w,byIndex:f,shortcut:x}}function gr(t,n,s,r,l,c,i){function m(f){const w=f.distance,d=f.index!==n.get();c.add(w),w&&(r.duration()?t.start():(t.update(),t.render(1),t.update())),d&&(s.set(n.get()),n.set(f.index),i.emit("select"))}function o(f,w){const d=l.byDistance(f,w);m(d)}function a(f,w){const d=n.clone().set(f),u=l.byIndex(d.get(),w);m(u)}return{distance:o,index:a}}function fr(t,n,s,r,l,c,i,m){const o={passive:!0,capture:!0};let a=0;function x(d){if(!m)return;function u(g){if(new Date().getTime()-a>10)return;i.emit("slideFocusStart"),t.scrollLeft=0;const _=s.findIndex(v=>v.includes(g));yt(_)&&(l.useDuration(0),r.index(_,0),i.emit("slideFocus"))}c.add(document,"keydown",f,!1),n.forEach((g,y)=>{c.add(g,"focus",p=>{(nt(m)||m(d,p))&&u(y)},o)})}function f(d){d.code==="Tab"&&(a=new Date().getTime())}return{init:x}}function Ge(t){let n=t;function s(){return n}function r(o){n=i(o)}function l(o){n+=i(o)}function c(o){n-=i(o)}function i(o){return yt(o)?o:o.get()}return{get:s,set:r,add:l,subtract:c}}function Kt(t,n){const s=t.scroll==="x"?i:m,r=n.style;let l=null,c=!1;function i(w){return`translate3d(${w}px,0px,0px)`}function m(w){return`translate3d(0px,${w}px,0px)`}function o(w){if(c)return;const d=Wn(t.direction(w));d!==l&&(r.transform=s(d),l=d)}function a(w){c=!w}function x(){c||(r.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:x,to:o,toggleActive:a}}function pr(t,n,s,r,l,c,i,m,o){const x=Ue(l),f=Ue(l).reverse(),w=p().concat(_());function d(N,T){return N.reduce((M,q)=>M-l[q],T)}function u(N,T){return N.reduce((M,q)=>d(M,T)>0?M.concat([q]):M,[])}function g(N){return c.map((T,M)=>({start:T-r[M]+.5+N,end:T+n-.5+N}))}function y(N,T,M){const q=g(T);return N.map(R=>{const W=M?0:-s,F=M?s:0,$=M?"end":"start",Z=q[R][$];return{index:R,loopPoint:Z,slideLocation:Ge(-1),translate:Kt(t,o[R]),target:()=>m.get()>Z?W:F}})}function p(){const N=i[0],T=u(f,N);return y(T,s,!1)}function _(){const N=n-i[0]-1,T=u(x,N);return y(T,-s,!0)}function v(){return w.every(({index:N})=>{const T=x.filter(M=>M!==N);return d(T,n)<=.1})}function P(){w.forEach(N=>{const{target:T,translate:M,slideLocation:q}=N,R=T();R!==q.get()&&(M.to(R),q.set(R))})}function E(){w.forEach(N=>N.translate.clear())}return{canLoop:v,clear:E,loop:P,loopPoints:w}}function hr(t,n,s){let r,l=!1;function c(o){if(!s)return;function a(x){for(const f of x)if(f.type==="childList"){o.reInit(),n.emit("slidesChanged");break}}r=new MutationObserver(x=>{l||(nt(s)||s(o,x))&&a(x)}),r.observe(t,{childList:!0})}function i(){r&&r.disconnect(),l=!0}return{init:c,destroy:i}}function xr(t,n,s,r){const l={};let c=null,i=null,m,o=!1;function a(){m=new IntersectionObserver(u=>{o||(u.forEach(g=>{const y=n.indexOf(g.target);l[y]=g}),c=null,i=null,s.emit("slidesInView"))},{root:t.parentElement,threshold:r}),n.forEach(u=>m.observe(u))}function x(){m&&m.disconnect(),o=!0}function f(u){return Ve(l).reduce((g,y)=>{const p=parseInt(y),{isIntersecting:_}=l[p];return(u&&_||!u&&!_)&&g.push(p),g},[])}function w(u=!0){if(u&&c)return c;if(!u&&i)return i;const g=f(u);return u&&(c=g),u||(i=g),g}return{init:a,destroy:x,get:w}}function yr(t,n,s,r,l,c){const{measureSize:i,startEdge:m,endEdge:o}=t,a=s[0]&&l,x=u(),f=g(),w=s.map(i),d=y();function u(){if(!a)return 0;const _=s[0];return z(n[m]-_[m])}function g(){if(!a)return 0;const _=c.getComputedStyle(ge(r));return parseFloat(_.getPropertyValue(`margin-${o}`))}function y(){return s.map((_,v,P)=>{const E=!v,L=_t(P,v);return E?w[v]+x:L?w[v]+f:P[v+1][m]-_[m]}).map(z)}return{slideSizes:w,slideSizesWithGaps:d,startGap:x,endGap:f}}function wr(t,n,s,r,l,c,i,m,o){const{startEdge:a,endEdge:x,direction:f}=t,w=yt(s);function d(p,_){return Ue(p).filter(v=>v%_===0).map(v=>p.slice(v,v+_))}function u(p){return p.length?Ue(p).reduce((_,v,P)=>{const E=ge(_)||0,L=E===0,N=v===Ke(p),T=l[a]-c[E][a],M=l[a]-c[v][x],q=!r&&L?f(i):0,R=!r&&N?f(m):0,W=z(M-R-(T+q));return P&&W>n+o&&_.push(v),N&&_.push(p.length),_},[]).map((_,v,P)=>{const E=Math.max(P[v-1]||0);return p.slice(E,_)}):[]}function g(p){return w?d(p,s):u(p)}return{groupSlides:g}}function _r(t,n,s,r,l,c,i){const{align:m,axis:o,direction:a,startIndex:x,loop:f,duration:w,dragFree:d,dragThreshold:u,inViewThreshold:g,slidesToScroll:y,skipSnaps:p,containScroll:_,watchResize:v,watchSlides:P,watchDrag:E,watchFocus:L}=c,N=2,T=tr(),M=T.measure(n),q=s.map(T.measure),R=Yn(o,a),W=R.measureSize(M),F=nr(W),$=Jn(m,W),Z=!f&&!!_,Y=f||!!_,{slideSizes:K,slideSizesWithGaps:U,startGap:te,endGap:be}=yr(R,M,q,s,Y,l),ne=wr(R,W,y,f,M,q,te,be,N),{snaps:X,snapsAligned:ce}=ur(R,$,M,q,ne),re=-ge(X)+ge(U),{snapsContained:je,scrollContainLimit:j}=ir(W,re,ce,_,N),J=Z?je:ce,{limit:H}=or(re,J,f),ie=zt(Ke(J),x,f),D=ie.clone(),O=Ue(s),S=({dragHandler:ke,scrollBody:pe,scrollBounds:se,options:{loop:Se}})=>{Se||se.constrain(ke.pointerDown()),pe.seek()},G=({scrollBody:ke,translate:pe,location:se,offsetLocation:Se,previousLocation:We,scrollLooper:Be,slideLooper:at,dragHandler:it,animation:ot,eventHandler:Fe,scrollBounds:Re,options:{loop:Je}},Qe)=>{const Oe=ke.settled(),lt=!Re.shouldConstrain(),he=Je?Oe:Oe&<,le=he&&!it.pointerDown();le&&ot.stop();const h=se.get()*Qe+We.get()*(1-Qe);Se.set(h),Je&&(Be.loop(ke.direction()),at.loop()),pe.to(Se.get()),le&&Fe.emit("settle"),he||Fe.emit("scroll")},V=Qn(r,l,()=>S(Te),ke=>G(Te,ke)),Q=.68,ee=J[ie.get()],ue=Ge(ee),de=Ge(ee),fe=Ge(ee),ve=Ge(ee),we=sr(ue,fe,de,ve,w,Q),De=mr(f,J,re,H,ve),Ee=gr(V,ie,D,we,De,ve,i),He=cr(H),Ze=ze(),oe=xr(n,s,i,g),{slideRegistry:me}=dr(Z,_,J,j,ne,O),st=fr(t,s,me,Ee,we,Ze,i,L),Te={ownerDocument:r,ownerWindow:l,eventHandler:i,containerRect:M,slideRects:q,animation:V,axis:R,dragHandler:Xn(R,t,r,l,ve,er(R,l),ue,V,Ee,we,De,ie,i,F,d,u,p,Q,E),eventStore:Ze,percentOfView:F,index:ie,indexPrevious:D,limit:H,location:ue,offsetLocation:fe,previousLocation:de,options:c,resizeHandler:rr(n,i,l,s,R,v,T),scrollBody:we,scrollBounds:ar(H,fe,ve,we,F),scrollLooper:lr(re,H,fe,[ue,fe,de,ve]),scrollProgress:He,scrollSnapList:J.map(He.get),scrollSnaps:J,scrollTarget:De,scrollTo:Ee,slideLooper:pr(R,W,re,K,U,X,J,fe,s),slideFocus:st,slidesHandler:hr(n,i,P),slidesInView:oe,slideIndexes:O,slideRegistry:me,slidesToScroll:ne,target:ve,translate:Kt(R,n)};return Te}function br(){let t={},n;function s(a){n=a}function r(a){return t[a]||[]}function l(a){return r(a).forEach(x=>x(n,a)),o}function c(a,x){return t[a]=r(a).concat([x]),o}function i(a,x){return t[a]=r(a).filter(f=>f!==x),o}function m(){t={}}const o={init:s,emit:l,off:i,on:c,clear:m};return o}const vr={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function kr(t){function n(c,i){return Vt(c,i||{})}function s(c){const i=c.breakpoints||{},m=Ve(i).filter(o=>t.matchMedia(o).matches).map(o=>i[o]).reduce((o,a)=>n(o,a),{});return n(c,m)}function r(c){return c.map(i=>Ve(i.breakpoints||{})).reduce((i,m)=>i.concat(m),[]).map(t.matchMedia)}return{mergeOptions:n,optionsAtMedia:s,optionsMediaQueries:r}}function Sr(t){let n=[];function s(c,i){return n=i.filter(({options:m})=>
1t.optionsAtMedia(m).active!==!1),n.forEach(m=>m.init(c,t)),i.reduce((m,o)=>Object.assign(m,{[o.name]:o}),{})}function r(){n=n.filter(c=>c.destroy())}return{init:s,destroy:r}}function tt(t,n,s){const r=t.ownerDocument,l=r.defaultView,c=kr(l),i=Sr(c),m=ze(),o=br(),{mergeOptions:a,optionsAtMedia:x,optionsMediaQueries:f}=c,{on:w,off:d,emit:u}=o,g=R;let y=!1,p,_=a(vr,tt.globalOptions),v=a(_),P=[],E,L,N;function T(){const{container:O,slides:S}=v;L=(dt(O)?t.querySelector(O):O)||t.children[0];const V=dt(S)?L.querySelectorAll(S):S;N=[].slice.call(V||L.children)}function M(O){const S=_r(t,L,N,r,l,O,o);if(O.loop&&!S.slideLooper.canLoop()){const G=Object.assign({},O,{loop:!1});return M(G)}return S}function q(O,S){y||(_=a(_,O),v=x(_),P=S||P,T(),p=M(v),f([_,...P.map(({options:G})=>G)]).forEach(G=>m.add(G,"change",R)),v.active&&(p.translate.to(p.location.get()),p.animation.init(),p.slidesInView.init(),p.slideFocus.init(D),p.eventHandler.init(D),p.resizeHandler.init(D),p.slidesHandler.init(D),p.options.loop&&p.slideLooper.loop(),L.offsetParent&&N.length&&p.dragHandler.init(D),E=i.init(D,P)))}function R(O,S){const G=ne();W(),q(a({startIndex:G},O),S),o.emit("reInit")}function W(){p.dragHandler.destroy(),p.eventStore.clear(),p.translate.clear(),p.slideLooper.clear(),p.resizeHandler.destroy(),p.slidesHandler.destroy(),p.slidesInView.destroy(),p.animation.destroy(),i.destroy(),m.clear()}function F(){y||(y=!0,m.clear(),W(),o.emit("destroy"),o.clear())}function $(O,S,G){!v.active||y||(p.scrollBody.useBaseFriction().useDuration(S===!0?0:v.duration),p.scrollTo.index(O,G||0))}function Z(O){const S=p.index.add(1).get();$(S,O,-1)}function Y(O){const S=p.index.add(-1).get();$(S,O,1)}function K(){return p.index.add(1).get()!==ne()}function U(){return p.index.add(-1).get()!==ne()}function te(){return p.scrollSnapList}function be(){return p.scrollProgress.get(p.offsetLocation.get())}function ne(){return p.index.get()}function X(){return p.indexPrevious.get()}function ce(){return p.slidesInView.get()}function re(){return p.slidesInView.get(!1)}function je(){return E}function j(){return p}function J(){return t}function H(){return L}function ie(){return N}const D={canScrollNext:K,canScrollPrev:U,containerNode:H,internalEngine:j,destroy:F,off:d,on:w,emit:u,plugins:je,previousScrollSnap:X,reInit:g,rootNode:J,scrollNext:Z,scrollPrev:Y,scrollProgress:be,scrollSnapList:te,scrollTo:$,selectedScrollSnap:ne,slideNodes:ie,slidesInView:ce,slidesNotInView:re};return q(n,s),setTimeout(()=>o.emit("init"),0),D}tt.globalOptions=void 0;function bt(t={},n=[]){const s=k.useRef(t),r=k.useRef(n),[l,c]=k.useState(),[i,m]=k.useState(),o=k.useCallback(()=>{l&&l.reInit(s.current,r.current)},[l]);return k.useEffect(()=>{xt(s.current,t)||(s.current=t,o())},[t,o]),k.useEffect(()=>{Hn(r.current,n)||(r.current=n,o())},[n,o]),k.useEffect(()=>{if(Kn()&&i){tt.globalOptions=bt.globalOptions;const a=tt(i,s.current,r.current);return c(a),()=>a.destroy()}else c(void 0)},[i,c]),[m,l]}bt.globalOptions=void 0;const Ht=k.createContext(null);function rt(){const t=k.useContext(Ht);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}const Zt=k.forwardRef(({orientation:t="horizontal",opts:n,setApi:s,plugins:r,className:l,children:c,...i},m)=>{const[o,a]=bt({...n,axis:t==="horizontal"?"x":"y"},r),[x,f]=k.useState(!1),[w,d]=k.useState(!1),u=k.useCallback(_=>{_&&(f(_.canScrollPrev()),d(_.canScrollNext()))},[]),g=k.useCallback(()=>{a?.scrollPrev()},[a]),y=k.useCallback(()=>{a?.scrollNext()},[a]),p=k.useCallback(_=>{_.key==="ArrowLeft"?(_.preventDefault(),g()):_.key==="ArrowRight"&&(_.preventDefault(),y())},[g,y]);return k.useEffect(()=>{!a||!s||s(a)},[a,s]),k.useEffect(()=>{if(a)return u(a),a.on("reInit",u),a.on("select",u),()=>{a?.off("select",u)}},[a,u]),e.jsx(Ht.Provider,{value:{carouselRef:o,api:a,opts:n,orientation:t||(n?.axis==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:y,canScrollPrev:x,canScrollNext:w},children:e.jsx("div",{ref:m,onKeyDownCapture:p,className:ae("relative",l),role:"region","aria-roledescription":"carousel",...i,children:c})})});
1Zt.displayName="Carousel";const Wt=k.forwardRef(({className:t,...n},s)=>{const{carouselRef:r,orientation:l}=rt();return e.jsx("div",{ref:r,className:"overflow-hidden",children:e.jsx("div",{ref:s,className:ae("flex",l==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...n})})});Wt.displayName="CarouselContent";const Jt=k.forwardRef(({className:t,...n},s)=>{const{orientation:r}=rt();return e.jsx("div",{ref:s,role:"group","aria-roledescription":"slide",className:ae("min-w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",t),...n})});Jt.displayName="CarouselItem";const jr=k.forwardRef(({className:t,variant:n="outline",size:s="icon",...r},l)=>{const{orientation:c,scrollPrev:i,canScrollPrev:m}=rt();return e.jsxs($e,{ref:l,variant:n,size:s,className:ae("absolute h-8 w-8 rounded-full",c==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!m,onClick:i,...r,children:[e.jsx(ut,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Previous slide"})]})});jr.displayName="CarouselPrevious";const Nr=k.forwardRef(({className:t,variant:n="outline",size:s="icon",...r},l)=>{const{orientation:c,scrollNext:i,canScrollNext:m}=rt();return e.jsxs($e,{ref:l,variant:n,size:s,className:ae("absolute h-8 w-8 rounded-full",c==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!m,onClick:i,...r,children:[e.jsx(Bt,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Next slide"})]})});Nr.displayName="CarouselNext";const Cr=({sponsors:t,className:n})=>{const[s,r]=k.useState(),[l,c]=k.useState([]),i=$t(),{currentLanguage:m}=Ie(),{currentCurrency:o,rates:a}=gt(),{t:x}=pt(),f=m.rtl;if(k.useEffect(()=>{if(t.length===0){c([]);return}const u=[...t].sort((v,P)=>v.position-P.position);if(u.length<=4){c(u.map(v=>({...v,isPopular:!0})));return}const g=u[0],y=u.slice(1),p=Math.floor(Math.random()*y.length),_=[g,y[p%y.length],y[(p+1)%y.length],y[(p+2)%y.length]];c(_.map(v=>({...v,isPopular:!0})))},[t]),!t||t.length===0)return null;const w=[];if(i)for(let u=0;u<l.length;u+=2)w.push(l.slice(u,u+2));const d=u=>{const g=a?ft(u.price,u.currency||"USD",o,a):u.price,y=Yt(g,o),_=`${u.description?parseInt(u.description):7} ${x("sponsors.days")}`;return e.jsx("a",{href:u.url,target:"_blank",rel:"noopener noreferrer",className:"block",children:e.jsx(Ce,{className:"relative overflow-hidden bg-card hover:shadow-lg transition-all duration-300 border-border/50 hover:border-border cursor-pointer",children:e.jsxs(Le,{className:"p-3 md:p-4",children:[e.jsxs("div",{className:ae("absolute top-0 bg-primary text-primary-foreground text-xs font-semibold px-2 py-1",f?"left-0 rounded-br-lg":"right-0 rounded-bl-lg"),children:[x("sponsors.popular")," ",x("sponsors.position"),u.position," ",f?"â¹":"âº"]}),e.jsx("div",{className:ae("mb-2 mt-6 md:mt-2",f?"text-right":"text-left"),children:e.jsx("div",{className:"text-xl md:text-2xl font-bold text-foreground",children:y})}),e.jsxs("div",{className:ae("flex items-center gap-2 md:gap-3 mb-3 text-xs md:text-sm",f&&"flex-row-reverse"),children:[e.jsxs("div",{className:ae("flex items-center gap-1 md:gap-1.5 font-medium",f&&"flex-row-reverse"),children:[e.jsx(Mn,{className:"w-3 h-3 md:w-4 md:h-4 text-primary flex-shrink-0"}),e.jsx("span",{className:"text-foreground whitespace-nowrap",children:u.dataVolume||"N/A"})]}),e.jsx("span",{className:"text-muted-foreground",children:"â¢"}),e.jsxs("div",{className:ae("flex items-center gap-1 md:gap-1.5",f&&"flex-row-reverse"),children:[e.jsx(Ut,{className:"w-3 h-3 md:w-4 md:h-4 text-primary flex-shrink-0"}),e.jsx("span",{className:"text-muted-foreground whitespace-nowrap",children:_})]})]}),e.jsxs("div",{className:ae("flex items-center gap-2 mt-auto",f&&"flex-row-reverse"),children:[e.jsx(Xt,{providerName:u.provider,logoUrl:u.logo,size:"sm",className:"w-6 h-6"}),e.jsx("span",{className:"font-semibold text-sm text-foreground",children:u.provider})]})]})})},u.id)};return i?e.jsx("div",{className:ae("w-full",n),dir:f?"rtl":"ltr",children:e.jsx(Zt,{setApi:r,className:"w-full",opts:{align:"start",loop:!0,direction:f?"rtl":"ltr"},children:e.jsx(Wt,{className:"-ml-2",children:w.map((u,g)=>e.jsx(Jt,{className:"pl-2 basis-full",children:e.jsx("div",{className:"grid grid-cols-2 gap-2",children:u.map(y=>d(y))})},g))})})}):e.jsx("div",{className:ae("w-full",n),dir:f?"rtl":"ltr",children:e.jsx("div",{className:`grid gap-4 ${l.length===1?"grid-cols-1":l.length===2?"grid-cols-2":l.length===3?"grid-cols-3":"grid-cols-4"}`,children:l.map(u=>d(u))})})},Lr={AF:{lat:33.9391,lng:67.71,wiki:"Afghanistan"},AL:{lat:41.1533,lng:20.1683,wiki:"Albania"},DZ:{lat:28.0339,lng:1.6596,wiki:"Algeria"},AD:{lat:42.5063,lng:1.5218,wiki:"Andorra"},AO:{lat:-11.2027,lng:17.8739,wiki:"Angola"},AG:{lat:17.0608,lng:-61.7964,wiki:"Antigua_and_Barbuda"},AR:{lat:-38.4161,lng:-63.6167,wiki:"Argentina"},AM:{lat:40.0691,lng:45.0382,wiki:"Armenia"},AU:{lat:-25.2744,lng:133.7751,wiki:"Australia"},AT:{lat:47.5162,lng:14.5501,wiki:"Austria"},AZ:{lat:40.1431,lng:47.5769,wiki:"Azerbaijan"},BS:{lat:25.0343,lng:-77.3963,wiki:"Bahamas"},BH:{lat:26.0667,lng:50.5577,wiki:"Bahrain"},BD:{lat:23.685,lng:90.3563,wiki:"Bangladesh"},BB:{lat:13.1939,lng:-59.5432,wiki:"Barbados"},BY:{lat:53.7098,lng:27.9534,wiki:"Belarus"},BE:{lat:50.5039,lng:4.4699,wiki:"Belgium"},BZ:{lat:17.1899,lng:-88.4976,wiki:"Belize"},BJ:{lat:9.3077,lng:2.3158,wiki:"Benin"},BT:{lat:27.5142,lng:90.4336,wiki:"Bhutan"},BO:{lat:-16.2902,lng:-63.5887,wiki:"Bolivia"},BA:{lat:43.9159,lng:17.6791,wiki:"Bosnia_and_Herzegovina"},BW:{lat:-22.3285,lng:24.6849,wiki:"Botswana"},BR:{lat:-14.235,lng:-51.9253,wiki:"Brazil"},BN:{lat:4.5353,lng:114.7277,wiki:"Brunei"},BG:{lat:42.7339,lng:25.4858,wiki:"Bulgaria"},BF:{lat:12.2383,lng:-1.5616,wiki:"Burkina_Faso"},BI:{lat:-3.3731,lng:29.9189,wiki:"Burundi"},KH:{lat:12.5657,lng:104.991,wiki:"Cambodia"},CM:{lat:7.3697,lng:12.3547,wiki:"Cameroon"},CA:{lat:56.1304,lng:-106.3468,wiki:"Canada"},CV:{lat:16.5388,lng:-23.0418,wiki:"Cape_Verde"},CF:{lat:6.6111,lng:20.9394,wiki:"Central_African_Republic"},TD:{lat:15.4542,lng:18.7322,wiki:"Chad"},CL:{lat:-35.6751,lng:-71.543,wiki:"Chile"},CN:{lat:35.8617,lng:104.1954,wiki:"China"},CO:{lat:4.5709,lng:-74.2973,wiki:"Colombia"},KM:{lat:-11.6455,lng:43.3333,wiki:"Comoros"},CG:{lat:-.228,lng:15.8277,wiki:"Republic_of_the_Congo"},CD:{lat:-4.0383,lng:21.7587,wiki:"Democratic_Republic_of_the_Congo"},CR:{lat:9.7489,lng:-83.7534,wiki:"Costa_Rica"},CI:{lat:7.54,lng:-5.5471,wiki:"Ivory_Coast"},HR:{lat:45.1,lng:15.2,wiki:"Croatia"},CU:{lat:21.5218,lng:-77.7812,wiki:"Cuba"},CY:{lat:35.1264,lng:33.4299,wiki:"Cyprus"},CZ:{lat:49.8175,lng:15.473,wiki:"Czech_Republic"},DK:{lat:56.2639,lng:9.5018,wiki:"Denmark"},DJ:{lat:11.8251,lng:42.5903,wiki:"Djibouti"},DM:{lat:15.415,lng:-61.371,wiki:"Dominica"},DO:{lat:18.7357,lng:-70.1627,wiki:"Dominican_Republic"},EC:{lat:-1.8312,lng:-78.1834,wiki:"Ecuador"},EG:{lat:26.8206,lng:30.8025,wiki:"Egypt"},SV:{lat:13.7942,lng:-88.8965,wiki:"El_Salvador"},GQ:{lat:1.6508,lng:10.2679,wiki:"Equatorial_Guinea"},ER:{lat:15.1794,lng:39.7823,wiki:"Eritrea"},EE:{lat:58.5953,lng:25.0136,wiki:"Estonia"},SZ:{lat:-26.5225,lng:31.4659,wiki:"Eswatini"},ET:{lat:9.145,lng:40.4897,wiki:"Ethiopia"},FJ:{lat:-17.7134,lng:178.065,wiki:"Fiji"},FI:{lat:61.9241,lng:25.7482,wiki:"Finland"},FR:{lat:46.2276,lng:2.2137,wiki:"France"},GA:{lat:-.8037,lng:11.6094,wiki:"Gabon"},GM:{lat:13.4432,lng:-15.3101,wiki:"Gambia"},GE:{lat:42.3154,lng:43.3569,wiki:"Georgia_(country)"}
1,DE:{lat:51.1657,lng:10.4515,wiki:"Germany"},GH:{lat:7.9465,lng:-1.0232,wiki:"Ghana"},GR:{lat:39.0742,lng:21.8243,wiki:"Greece"},GD:{lat:12.1165,lng:-61.679,wiki:"Grenada"},GT:{lat:15.7835,lng:-90.2308,wiki:"Guatemala"},GN:{lat:9.9456,lng:-9.6966,wiki:"Guinea"},GW:{lat:11.8037,lng:-15.1804,wiki:"Guinea-Bissau"},GY:{lat:4.8604,lng:-58.9302,wiki:"Guyana"},HT:{lat:18.9712,lng:-72.2852,wiki:"Haiti"},HN:{lat:15.2,lng:-86.2419,wiki:"Honduras"},HK:{lat:22.3193,lng:114.1694,wiki:"Hong_Kong"},HU:{lat:47.1625,lng:19.5033,wiki:"Hungary"},IS:{lat:64.9631,lng:-19.0208,wiki:"Iceland"},IN:{lat:20.5937,lng:78.9629,wiki:"India"},ID:{lat:-.7893,lng:113.9213,wiki:"Indonesia"},IR:{lat:32.4279,lng:53.688,wiki:"Iran"},IQ:{lat:33.2232,lng:43.6793,wiki:"Iraq"},IE:{lat:53.1424,lng:-7.6921,wiki:"Ireland"},IL:{lat:31.0461,lng:34.8516,wiki:"Israel"},IT:{lat:41.8719,lng:12.5674,wiki:"Italy"},JM:{lat:18.1096,lng:-77.2975,wiki:"Jamaica"},JP:{lat:36.2048,lng:138.2529,wiki:"Japan"},JO:{lat:30.5852,lng:36.2384,wiki:"Jordan"},KZ:{lat:48.0196,lng:66.9237,wiki:"Kazakhstan"},KE:{lat:-.0236,lng:37.9062,wiki:"Kenya"},KI:{lat:1.8709,lng:-157.363,wiki:"Kiribati"},KP:{lat:40.3399,lng:127.5101,wiki:"North_Korea"},KR:{lat:35.9078,lng:127.7669,wiki:"South_Korea"},KW:{lat:29.3117,lng:47.4818,wiki:"Kuwait"},KG:{lat:41.2044,lng:74.7661,wiki:"Kyrgyzstan"},LA:{lat:19.8563,lng:102.4955,wiki:"Laos"},LV:{lat:56.8796,lng:24.6032,wiki:"Latvia"},LB:{lat:33.8547,lng:35.8623,wiki:"Lebanon"},LS:{lat:-29.61,lng:28.2336,wiki:"Lesotho"},LR:{lat:6.4281,lng:-9.4295,wiki:"Liberia"},LY:{lat:26.3351,lng:17.2283,wiki:"Libya"},LI:{lat:47.166,lng:9.5554,wiki:"Liechtenstein"},LT:{lat:55.1694,lng:23.8813,wiki:"Lithuania"},LU:{lat:49.8153,lng:6.1296,wiki:"Luxembourg"},MO:{lat:22.1987,lng:113.5439,wiki:"Macau"},MG:{lat:-18.7669,lng:46.8691,wiki:"Madagascar"},MW:{lat:-13.2543,lng:34.3015,wiki:"Malawi"},MY:{lat:4.2105,lng:101.9758,wiki:"Malaysia"},MV:{lat:3.2028,lng:73.2207,wiki:"Maldives"},ML:{lat:17.5707,lng:-3.9962,wiki:"Mali"},MT:{lat:35.9375,lng:14.3754,wiki:"Malta"},MH:{lat:7.1315,lng:171.1845,wiki:"Marshall_Islands"},MR:{lat:21.0079,lng:-10.9408,wiki:"Mauritania"},MU:{lat:-20.3484,lng:57.5522,wiki:"Mauritius"},MX:{lat:23.6345,lng:-102.5528,wiki:"Mexico"},FM:{lat:7.4256,lng:150.5508,wiki:"Federated_States_of_Micronesia"},MD:{lat:47.4116,lng:28.3699,wiki:"Moldova"},MC:{lat:43.7384,lng:7.4246,wiki:"Monaco"},MN:{lat:46.8625,lng:103.8467,wiki:"Mongolia"},ME:{lat:42.7087,lng:19.3744,wiki:"Montenegro"},MA:{lat:31.7917,lng:-7.0926,wiki:"Morocco"},MZ:{lat:-18.6657,lng:35.5296,wiki:"Mozambique"},MM:{lat:21.9162,lng:95.956,wiki:"Myanmar"},MK:{lat:41.5124,lng:21.7453,wiki:"North_Macedonia"},NA:{lat:-22.9576,lng:18.4904,wiki:"Namibia"},NR:{lat:-.5228,lng:166.9315,wiki:"Nauru"},NP:{lat:28.3949,lng:84.124,wiki:"Nepal"},NL:{lat:52.1326,lng:5.2913,wiki:"Netherlands"},NZ:{lat:-40.9006,lng:174.886,wiki:"New_Zealand"},NI:{lat:12.8654,lng:-85.2072,wiki:"Nicaragua"},NE:{lat:17.6078,lng:8.0817,wiki:"Niger"},NG:{lat:9.082,lng:8.6753,wiki:"Nigeria"},NO:{lat:60.472,lng:8.4689,wiki:"Norway"},OM:{lat:21.4735,lng:55.9754,wiki:"Oman"},PK:{lat:30.3753,lng:69.3451,wiki:"Pakistan"},PW:{lat:7.515,lng:134.5825,wiki:"Palau"},PS:{lat:31.9522,lng:35.2332,wiki:"State_of_Palestine"},PA:{lat:8.538,lng:-80.7821,wiki:"Panama"},PG:{lat:-6.315,lng:143.9555,wiki:"Papua_New_Guinea"},PY:{lat:-23.4425,lng:-58.4438,wiki:"Paraguay"},PE:{lat:-9.19,lng:-75.0152,wiki:"Peru"},PH:{lat:12.8797,lng:121.774,wiki:"Philippines"},PL:{lat:51.9194,lng:19.1451,wiki:"Poland"},PT:{lat:39.3999,lng:-8.2245,wiki:"Portugal"},PR:{lat:18.2208,lng:-66.5901,wiki:"Puerto_Rico"},QA:{lat:25.3548,lng:51.1839,wiki:"Qatar"},RO:{lat:45.9432,lng:24.9668,wiki:"Romania"},RU:{lat:61.524,lng:105.3188,wiki:"Russia"},RW:{lat:-1.9403,lng:29.8739,wiki:"Rwanda"},RE:{lat:-21.1151,lng:55.5364,wiki:"Réunion"},KN:{lat:17.3578,lng:-62.783,wiki:"Saint_Kitts_and_Nevis"},LC:{lat:13.9094,lng:-60.9789,wiki:"Saint_Lucia"},VC:{lat:12.9843,lng:-61.2872,wiki:"Saint_Vincent_and_the_Grenadines"},WS:{lat:-13.759,lng:-172.1046,wiki:"Samoa"},SM:{lat:43.9424,lng:12.4578,wiki:"San_Marino"},ST:{lat:.1864,lng:6.6131,wiki:"São_Tomé_and_PrÃncipe"},SA:{lat:23.8859,lng:45.0792,wiki:"Saudi_Arabia"},SN:{lat:14.4974,lng:-14.4524,wiki:"Senegal"}
1,RS:{lat:44.0165,lng:21.0059,wiki:"Serbia"},SC:{lat:-4.6796,lng:55.492,wiki:"Seychelles"},SL:{lat:8.4606,lng:-11.7799,wiki:"Sierra_Leone"},SG:{lat:1.3521,lng:103.8198,wiki:"Singapore"},SK:{lat:48.669,lng:19.699,wiki:"Slovakia"},SI:{lat:46.1512,lng:14.9955,wiki:"Slovenia"},SB:{lat:-9.6457,lng:160.1562,wiki:"Solomon_Islands"},SO:{lat:5.1521,lng:46.1996,wiki:"Somalia"},ZA:{lat:-30.5595,lng:22.9375,wiki:"South_Africa"},SS:{lat:6.877,lng:31.307,wiki:"South_Sudan"},ES:{lat:40.4637,lng:-3.7492,wiki:"Spain"},LK:{lat:7.8731,lng:80.7718,wiki:"Sri_Lanka"},SD:{lat:12.8628,lng:30.2176,wiki:"Sudan"},SR:{lat:3.9193,lng:-56.0278,wiki:"Suriname"},SE:{lat:60.1282,lng:18.6435,wiki:"Sweden"},CH:{lat:46.8182,lng:8.2275,wiki:"Switzerland"},SY:{lat:34.8021,lng:38.9968,wiki:"Syria"},TW:{lat:23.6978,lng:120.9605,wiki:"Taiwan"},TJ:{lat:38.861,lng:71.2761,wiki:"Tajikistan"},TZ:{lat:-6.369,lng:34.8888,wiki:"Tanzania"},TH:{lat:15.87,lng:100.9925,wiki:"Thailand"},TL:{lat:-8.8742,lng:125.7275,wiki:"East_Timor"},TG:{lat:8.6195,lng:.8248,wiki:"Togo"},TO:{lat:-21.179,lng:-175.1982,wiki:"Tonga"},TT:{lat:10.6918,lng:-61.2225,wiki:"Trinidad_and_Tobago"},TN:{lat:33.8869,lng:9.5375,wiki:"Tunisia"},TR:{lat:38.9637,lng:35.2433,wiki:"Turkey"},TM:{lat:38.9697,lng:59.5563,wiki:"Turkmenistan"},TV:{lat:-7.1095,lng:179.194,wiki:"Tuvalu"},UG:{lat:1.3733,lng:32.2903,wiki:"Uganda"},UA:{lat:48.3794,lng:31.1656,wiki:"Ukraine"},AE:{lat:23.4241,lng:53.8478,wiki:"United_Arab_Emirates"},GB:{lat:55.3781,lng:-3.436,wiki:"United_Kingdom"},US:{lat:37.0902,lng:-95.7129,wiki:"United_States"},UY:{lat:-32.5228,lng:-55.7658,wiki:"Uruguay"},UZ:{lat:41.3775,lng:64.5853,wiki:"Uzbekistan"},VU:{lat:-15.3767,lng:166.9592,wiki:"Vanuatu"},VA:{lat:41.9029,lng:12.4534,wiki:"Vatican_City"},VE:{lat:6.4238,lng:-66.5897,wiki:"Venezuela"},VN:{lat:14.0583,lng:108.2772,wiki:"Vietnam"},VI:{lat:18.3358,lng:-64.8963,wiki:"United_States_Virgin_Islands"},EH:{lat:24.2155,lng:-12.8858,wiki:"Western_Sahara"},YE:{lat:15.5527,lng:48.5164,wiki:"Yemen"},ZM:{lat:-13.1339,lng:27.8493,wiki:"Zambia"},ZW:{lat:-19.0154,lng:29.1549,wiki:"Zimbabwe"},GU:{lat:13.4443,lng:144.7937,wiki:"Guam"},GP:{lat:16.265,lng:-61.551,wiki:"Guadeloupe"},MQ:{lat:14.6415,lng:-61.0242,wiki:"Martinique"},GF:{lat:3.9339,lng:-53.1258,wiki:"French_Guiana"},NC:{lat:-20.9043,lng:165.618,wiki:"New_Caledonia"},PF:{lat:-17.6797,lng:-149.4068,wiki:"French_Polynesia"},AW:{lat:12.5211,lng:-69.9683,wiki:"Aruba"},CW:{lat:12.1696,lng:-68.99,wiki:"Curaçao"},SX:{lat:18.0425,lng:-63.0548,wiki:"Sint_Maarten"},BQ:{lat:12.2011,lng:-68.262,wiki:"Caribbean_Netherlands"},AI:{lat:18.2206,lng:-63.0686,wiki:"Anguilla"},BM:{lat:32.3078,lng:-64.7505,wiki:"Bermuda"},VG:{lat:18.4207,lng:-64.6399,wiki:"British_Virgin_Islands"},KY:{lat:19.3133,lng:-81.2546,wiki:"Cayman_Islands"},FK:{lat:-51.7963,lng:-59.5236,wiki:"Falkland_Islands"},GI:{lat:36.1408,lng:-5.3536,wiki:"Gibraltar"},MS:{lat:16.7425,lng:-62.1874,wiki:"Montserrat"},TC:{lat:21.694,lng:-71.7979,wiki:"Turks_and_Caicos_Islands"},AS:{lat:-14.271,lng:-170.1322,wiki:"American_Samoa"},CK:{lat:-21.2367,lng:-159.7777,wiki:"Cook_Islands"},NU:{lat:-19.0544,lng:-169.8672,wiki:"Niue"},TK:{lat:-8.9674,lng:-171.8197,wiki:"Tokelau"},WF:{lat:-13.7687,lng:-177.1561,wiki:"Wallis_and_Futuna"},JE:{lat:49.2144,lng:-2.1312,wiki:"Jersey"},GG:{lat:49.4657,lng:-2.5853,wiki:"Guernsey"},IM:{lat:54.2361,lng:-4.5481,wiki:"Isle_of_Man"},FO:{lat:61.8926,lng:-6.9118,wiki:"Faroe_Islands"},GL:{lat:71.7069,lng:-42.6043,wiki:"Greenland"},AX:{lat:60.1785,lng:19.9156,wiki:"Ã
land_Islands"},SJ:{lat:77.5536,lng:23.6703,wiki:"Svalbard"},XK:{lat:42.6026,lng:20.903,wiki:"Kosovo"}},Pr=t=>{const n=t?.toUpperCase();return Lr[n]||{lat:0,lng:0,wiki:t||"Earth"}},Mr=({country:t,products:n,canonicalUrl:s,translatedCountryName:r,metaTitle:l,metaDescription:c,bannerImage:i,createdAt:m,updatedAt:o})=>{const{currentLanguage:a}=Ie(),{rates:x}=gt(),{data:f}=ct("site_name"),{data:w}=ct("hide_small_packages"),{data:d}=Tt("country"),u=ht(),g=yn(a.code),{data:y}=mn("country",t.country_code_iso2),p=k.useMemo(()=>{if(!y||y.length===0)return null;const F=y.reduce((Y,K)=>Y+K.review_count,0),$=y.reduce((Y,K)=>Y+K.average_rating*K.review_count,0),Z=F>0?$/F:null;return{ratingValue:Z?Number(Z.toFixed(2)):null,reviewCount:F}},[y]),_=a.defaultCurrency,v=F=>!x||_==="USD"?F:ft(F,"USD",_,x),P=Pr(t.country_code_iso2),E=k.useMemo(()=>
1{if(!n||n.length===0)return[];const F=w?.setting_value?.countries===!0||w?.setting_value?.enabled===!0&&w?.setting_value?.countries===void 0;return qt(n,F).filter(Z=>{if(!d)return!0;const Y=Z.provider.toLowerCase();return d.get(Y)!==!1})},[n,w,d]),L=k.useMemo(()=>{if(!E||E.length===0)return{lowPrice:0,highPrice:0,offerCount:0};const F=E.map($=>v($.price)).filter($=>$>0);return{lowPrice:Math.min(...F),highPrice:Math.max(...F),offerCount:E.length}},[E,x,_]),N=k.useMemo(()=>{const F=f?.setting_value||"EsimsCompare",$=xe();return{"@type":"Organization","@id":`${$}/#organization`,name:F,url:$,logo:{"@type":"ImageObject",url:`${$}/og-default.jpg`}}},[f]),T=k.useMemo(()=>{const F=xe(),$=f?.setting_value||"EsimsCompare";return{"@type":"WebSite","@id":`${F}/#website`,name:$,url:F}},[f]),M=k.useMemo(()=>{const F=xe();return{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:a.code==="he"?"××£ ×××ת":a.code==="de"?"Startseite":a.code==="fr"?"Accueil":a.code==="ru"?"ÐлавнаÑ":"Home",item:F},{"@type":"ListItem",position:2,name:a.code==="he"?"×××× ×ת":a.code==="de"?"Länder":a.code==="fr"?"Pays":a.code==="ru"?"СÑÑанÑ":"Countries",item:`${F}${u}`},{"@type":"ListItem",position:3,name:r}]}},[a.code,u,r]),q=k.useMemo(()=>{const F=xe(),$=f?.setting_value||"EsimsCompare",Z=i||`${F}/og-default.jpg`,Y=a.code==="he"?`×××××ת eSIM ×${r}`:a.code==="de"?`${r} eSIM-Tarife`:a.code==="fr"?`Forfaits eSIM ${r}`:a.code==="ru"?`eSIM ÑаÑиÑÑ Ð´Ð»Ñ ${r}`:`${r} eSIM Plans`,K=E.slice(0,20).map(U=>{const te=v(U.price);return{"@type":"Offer",name:g.generateProductName(U,r),price:te.toFixed(2),priceCurrency:_,availability:"https://schema.org/InStock",url:U.purchase_url||s,seller:{"@type":"Organization",name:U.provider}}});return{"@type":"Product","@id":`${s}#product`,name:Y,description:g.generateCollectionDescription(r),brand:{"@type":"Organization",name:$},image:Z,offers:{"@type":"AggregateOffer",lowPrice:L.lowPrice.toFixed(2),highPrice:L.highPrice.toFixed(2),priceCurrency:_,offerCount:L.offerCount,offers:K},...p?.ratingValue&&p.reviewCount>0&&{aggregateRating:{"@type":"AggregateRating",ratingValue:p.ratingValue.toFixed(2),reviewCount:p.reviewCount,bestRating:"5",worstRating:"1",name:"EsimsCompare Destination Score"}}}},[E,g,r,f,i,L,s,a.code,_,x,p]),R=k.useMemo(()=>{const F=xe(),$=o?new Date(o).toISOString().split("T")[0]:new Date().toISOString().split("T")[0],Z=m?new Date(m).toISOString().split("T")[0]:$;return{"@type":"CollectionPage","@id":`${s}#webpage`,url:s,name:l||g.generateWebPageTitle(r),inLanguage:a.code,description:c||g.generateCollectionDescription(r),datePublished:Z,dateModified:$,...i&&{primaryImageOfPage:i},about:{"@type":"Country",name:r,sameAs:`https://en.wikipedia.org/wiki/${P.wiki}`,geo:{"@type":"GeoCoordinates",latitude:P.lat,longitude:P.lng}},mainEntity:{"@id":`${s}#product`},isPartOf:{"@id":`${F}/#website`}}},[s,l,c,r,i,P,g,a.code]),W=k.useMemo(()=>({"@context":"https://schema.org","@graph":[q,R,M,N,T]}),[q,R,M,N,T]);return e.jsx(Ft,{children:e.jsx("script",{type:"application/ld+json",children:JSON.stringify(W)})})},Ar=({countryCode:t,children:n,className:s,countryName:r})=>{const{getCountrySlug:l}=en(),c=ht(),i=l(t),m=r?`eSIM ${r}`:void 0;return e.jsx(Xe,{to:`${c}/${i}`,className:s,"aria-label":m,title:m,children:n})},Ir=(t,n)=>Pe({queryKey:["country-relationships-public",t,n],queryFn:async()=>{const{data:s,error:r}=await ye.from("country_relationships").select("*").eq("country_code_iso2",t).eq("language_code",n).eq("is_active",!0).order("display_order",{ascending:!0});if(r)throw r;if(s&&s.length>0)return s;if(n!=="en"){const{data:l,error:c}=await ye.from("country_relationships").select("*").eq("country_code_iso2",t).eq("language_code","en").eq("is_active",!0).order("display_order",{ascending:!0});if(c)throw c;return l||[]}return[]},staleTime:1e3*60*30,gcTime:1e3*60*60}),Dr=t=>{const n={en:"Related Countries",he:"×××× ×ת קש×ר×ת",de:"Verwandte Länder",ru:"ÐоÑ
ожие ÑÑÑанÑ",fr:"Pays associés"};return n[t]||n.en},Er=t=>{const n={en:"Compare plans â",he:"×ש××× ×××××ת â",de:"Tarife vergleichen â",ru:"СÑавниÑÑ ÑаÑиÑÑ â",fr:"Comparer les forfaits â"};return n[t]||n.en},Tr=({currentCountryCode:t,currentContinent:n,currentRegion:s})=>{const{translateCountry:r}
1=Rt(),{currentLanguage:l}=Ie(),{data:c=[]}=tn(),{data:i=[],isLoading:m}=Ir(t,l.code),o=i.map(a=>{const x=c.find(f=>f.country_code_iso2===a.related_country_code_iso2);return x?{name:x.country_name,code:x.country_code_iso2}:null}).filter(a=>a!==null);return m||o.length===0?null:e.jsxs(Ce,{className:"mt-8",children:[e.jsx(et,{children:e.jsxs(Ot,{className:"text-xl font-semibold flex items-center gap-2",children:[e.jsx(nn,{className:"w-5 h-5 text-primary"}),Dr(l.code)]})}),e.jsx(Le,{children:e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:o.map(a=>e.jsx(Ar,{countryCode:a.code,countryName:r(a.name,l.code),className:"group",children:e.jsx(Ce,{className:"h-full transition-all hover:shadow-lg hover:-translate-y-1 cursor-pointer border-2 hover:border-primary",children:e.jsxs(Le,{className:"p-4 flex flex-col items-center text-center gap-3",children:[e.jsx(rn,{countryCode:a.code,countryName:a.name,className:"w-16 h-16 rounded-full shadow-md"}),e.jsxs("div",{children:[e.jsxs("span",{className:"font-semibold text-base group-hover:text-primary transition-colors block",children:["eSIM ",r(a.name,l.code)]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:Er(l.code)})]})]})})},a.code))})})]})},Br=(t,n)=>Pe({queryKey:["country-blog-relationships",t,n],queryFn:async()=>{try{const{data:s,error:r}=await ye.from("country_blog_relationships").select("*").in("country_code_iso2",[t,"*"]).eq("language_code",n).eq("is_active",!0).order("display_order",{ascending:!0});if(r)return[];if(!s||s.length===0)return[];const l=[...new Set(s.map(a=>a.blog_post_id))],{data:c,error:i}=await ye.from("blog_posts").select("id, title, slug, excerpt, featured_image_url, published_at, reading_time_minutes").in("id",l).eq("published",!0);if(i)return[];const m=new Map(c?.map(a=>[a.id,a])||[]);return s.map(a=>({...a,blog_posts:m.get(a.blog_post_id)||null})).filter(a=>a.blog_posts!==null).sort((a,x)=>a.country_code_iso2!=="*"&&x.country_code_iso2==="*"?-1:a.country_code_iso2==="*"&&x.country_code_iso2!=="*"?1:a.display_order-x.display_order)}catch{return[]}},staleTime:1e3*60*30,gcTime:1e3*60*60}),Fr=({currentCountryCode:t})=>{const{currentLanguage:n}=Ie(),{t:s}=pt(),r=sn(),{data:l,isLoading:c}=an(n.code),{data:i,isLoading:m}=Br(t,n.code);
1if(c||m||!l||!i||i.length===0)return null;const o=i.filter(a=>a.blog_posts&&a.blog_posts.id&&a.blog_posts.title);return o.length===0?null:e.jsxs(Ce,{className:"mt-8",children:[e.jsx(et,{children:e.jsx(Ot,{className:"text-2xl font-bold",children:s("blog.relatedArticles")})}),e.jsx(Le,{children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:o.map(a=>{const x=a.blog_posts;return e.jsx(Xe,{to:`${r}/${x.slug}`,className:"group block",children:e.jsxs("article",{className:"h-full flex flex-col rounded-lg border bg-card hover:shadow-lg transition-all duration-300",children:[x.featured_image_url&&e.jsx("div",{className:"relative w-full h-48 overflow-hidden rounded-t-lg",children:e.jsx(Gt,{src:x.featured_image_url,alt:x.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-300",fetchPriority:"low"})}),e.jsxs("div",{className:"flex-1 p-4 flex flex-col",children:[e.jsx("span",{className:"font-semibold text-lg mb-2 line-clamp-2 group-hover:text-primary transition-colors block",children:x.title}),x.excerpt&&e.jsx("p",{className:"text-sm text-muted-foreground mb-4 line-clamp-3 flex-1",children:x.excerpt}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground mt-auto pt-4 border-t",children:[x.reading_time_minutes&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(Ut,{className:"w-3 h-3"}),e.jsxs("span",{children:[x.reading_time_minutes," min read"]})]}),e.jsxs("div",{className:"flex items-center gap-1 text-primary group-hover:gap-2 transition-all",children:[e.jsx("span",{children:s("blog.readMore")}),e.jsx(Bt,{className:"w-3 h-3"})]})]})]})]})},a.id)})})})]})},Rr=({currentCountryCode:t})=>e.jsx(Fr,{currentCountryCode:t}),Or=t=>{const n=typeof window<"u"?sessionStorage.getItem(`__COUNTRY_SEO_${t}__`):null,s=n?JSON.parse(n):void 0;return s&&sessionStorage.removeItem(`__COUNTRY_SEO_${t}__`),Pe({queryKey:["all-country-seo-v4",t],initialData:s,queryFn:async()=>{const{data:r,error:l}=await ye.from("seo_settings").select("page_identifier,canonical_url,page_title,meta_title,meta_description,h2_default,h2_cheapest,h2_most_data,h2_longest_validity,h2_best_value,language_code,page_type,banner_image,og_image,og_title,og_description,twitter_card,twitter_title,twitter_description,twitter_image,created_at,updated_at").eq("page_type","country").eq("language_code",t).eq("is_active",!0);if(l)throw l;return r||[]},staleTime:1e3*60*60*2,gcTime:1e3*60*60*24,refetchOnMount:!1,refetchOnWindowFocus:!1})},ys=()=>{const{countrySlug:t}=on();return["countries","regions","providers","global","blog","about","contact","privacy-policy","terms"].includes((t||"").toLowerCase())?e.jsx(Ae,{to:"/404",replace:!0}):t?e.jsx(Gr,{countrySlug:t}):e.jsx(Ae,{to:"/404",replace:!0})},Dt=t=>{const n=String(t?.maya_product_id||""),s=String(t?.country_iso2||t?.country_code_iso2||"").toUpperCase();return n&&s&&n.endsWith(`-${s}`)?n.slice(0,-s.length-1):t?.raw_api_data?.plan_id||`${t?.name||"maya"}-${t?.price||0}-${t?.duration_days||0}-${t?.plan_type||"global"}`},Gr=({countrySlug:t})=>{const n=ln(),s=cn(),{currentLanguage:r}=Ie(),[l,c]=k.useState(!1);k.useLayoutEffect(()=>{let h=!1;return requestAnimationFrame(()=>{requestAnimationFrame(()=>{h||c(!0)})}),()=>{h=!0}},[]);const{data:i}=vt(),m=ht(),o=k.useMemo(()=>{try{return decodeURIComponent(t)}catch{return t}},[t]),a=h=>{let b=h.trim();if(b.includes("://"))try{const C=new URL(b);b=C.pathname+C.search+C.hash}catch{}return b.replace(/^\/+|\/+$/g,"")},{data:x}=Pe({queryKey:["country-redirect-check",o,r.code],queryFn:async()=>{if(!o)return null;const{data:h,error:b}=await ye.from("slug_redirects").select("new_slug, old_slug, is_active").eq("language_code",r.code).eq("is_active",!0);if(b)return null;const C=h?.find(A=>a(A.old_slug)===`countries/${o}`);return C?{new_slug:a(C.new_slug)}:null},enabled:!!o,staleTime:1e3*60*5});k.useEffect(()=>{x?.new_slug&&s(`/${x.new_slug}`,{replace:!0})},[x,o,s]);const f=["countries","regions","providers","global","blog","about","contact","privacy-policy","terms"],w=k.useMemo(()=>
1{if(!i)return f;const h=new Set;return i.forEach(b=>{b.continent&&h.add(b.continent.toLowerCase().replace(/\s+/g,"-")),b.region&&h.add(b.region.toLowerCase().replace(/\s+/g,"-"))}),[...f,...Array.from(h)]},[i]),{t:d}=pt(),u=Et(),{hasDiscount:g}=u,p=new URLSearchParams(n.search).get("sort"),[_,v]=k.useState(p||"cheapest"),P=h=>{v(h);const b=new URLSearchParams(n.search);b.set("sort",h),s({search:b.toString()},{replace:!0})},[E,L]=k.useState("asc"),[N,T]=k.useState("all"),{filters:M,setFilters:q,activeFiltersCount:R}=Bn(),W=$t(),{scrollDirection:F,isScrolled:$,isAtTop:Z}=gn(50),{setLanguage:Y}=Ie(),{translateCountry:K}=Rt();k.useEffect(()=>{const b=new URLSearchParams(n.search).get("sort");b&&b!==_?v(b):!b&&_!=="cheapest"&&v("cheapest")},[n.search]),xe(),un();const{data:U,isLoading:te,isPending:be}=Or(r.code),{data:ne}=Pe({queryKey:["all-country-seo-all-langs"],queryFn:async()=>{const{data:h,error:b}=await ye.from("seo_settings").select("*").eq("page_type","country").eq("is_active",!0);if(b)throw b;return h||[]},staleTime:1e3*60*60}),X=k.useMemo(()=>{if(!U||!o)return null;const h=U.find(B=>{if(!B.canonical_url)return!1;const Ne=B.canonical_url.replace(/\/+$/,"").split("/").pop();return decodeURIComponent(Ne||"")===o});if(h)return h;if(!ne)return null;const b=ne.find(B=>{if(!B.canonical_url)return!1;const Ne=B.canonical_url.replace(/\/+$/,"").split("/").pop();return decodeURIComponent(Ne||"")===o});if(!b?.page_identifier)return null;const C=b.page_identifier,A=U.find(B=>B.page_identifier===C);return A||null},[U,ne,o,r.code]),ce=!!o&&!!U&&!X,re=te||be||ce,je=X?.page_identifier||null,j=X,J=je||(r.code==="en"&&t?t:null);k.useEffect(()=>{if(j&&!re&&!ce&&o){const h=j.canonical_url;if(h){const b=h.split("/").pop()||"",C=decodeURIComponent(b);o!==C&&s(h,{replace:!0})}}},[j,re,ce,o,s]);const H=vt(),ie=Rn("country",J||""),D=k.useMemo(()=>!H.data||!J?null:dn(H.data,J),[H.data,J]),O=ie.data||{},S=ie.isLoading,{data:G=[]}=Pn(r.code,"country"),V=G.length>0,Q=Un(D?.country_code_iso2||J,r.code),{products:ee,isLoading:ue}=Q,de=Gn({enabled:!!D?.country_code_iso2,limit:1e4}),{sponsors:fe}=Vn(D?.country_code_iso2),{data:ve=[]}=On("country",D?.country_code_iso2,r.code),we=!l||te||be||ce||H.isLoading,De=we||ue,Ee=k.useMemo(()=>!!(o&&!U||o&&U&&!X||o&&X&&H.data&&!D),[o,U,X,H.data,D]),He=!we&&!Ee&&(X===null||D===null),Ze=h=>(h?.provider||h?.type||"").toLowerCase()==="maya",oe=k.useMemo(()=>ee?ee.filter(h=>!Ze(h)):[],[ee]),me=k.useMemo(()=>{if(!oe)return[];const h=wn(oe,M,N);return M.hasCoupon===!0?u.loading?h:h.filter(C=>{try{const A=g(C.provider);return A}catch{return!1}}):h},[oe,M,N,g,u.loading,u.discounts.length]),st=k.useMemo(()=>{const h=D?.country_code_iso2?.toUpperCase();if(!h||!de.data)return[];const b=new Set;return de.data.filter(C=>{const A=Array.isArray(C.countries_supported)?C.countries_supported.map(B=>String(B).toUpperCase()):[];return C.country_iso2?.toUpperCase()===h||A.includes(h)}).filter(C=>{const A=Dt(C);return b.has(A)?!1:(b.add(A),!0)}).map(C=>{const A=Dt(C);return{id:`maya-global-${A}`,product_id:`maya-${A}`,provider:"Maya",type:"maya",name:C.name||"Maya Global Data",price:C.price||0,currency:C.currency||"USD",data_amount:C.unlimited_data?"Unlimited":C.data_gb?`${C.data_gb}GB`:null,dataAmount:C.unlimited_data?"Unlimited":C.data_gb?`${C.data_gb}GB`:null,validity:C.duration_days?`${C.duration_days} days`:null,coverage:Array.isArray(C.countries_supported)?C.countries_supported:[],features:[],purchase_url:C.url_direct||C.url_shop,purchaseUrl:C.url_direct||C.url_shop,country_name:d("product.global"),country_code_iso2:h,country_code_iso3:D?.country_code_iso3||"",is_regional:!1,is_global:!0,original_product:{...C,country_name:d("product.global"),country_iso2:"GLOBAL",country_iso3:"GLOBAL"},originalProduct:{...C,country_name:d("product.global"),country_iso2:"GLOBAL",country_iso3:"GLOBAL"}}})},[D,de.data,d]),Te=k.useMemo(()=>{if(!me||me.length===0)return[];const h=[...me],b=A=>{const B=(A.dataAmount||A.data_amount||"").toLowerCase();if(B.includes("unlimited"))return 1/0;const _e=B.match(/(\d+(?:\.\d+)?)/);return _e?parseFloat(_e[1]):0},C=A=>{const B=(A.validity||"").toLowerCase();if(B.includes("unlimited")||B.includes("no expir"))return 1/0;const _e=B.match(/(\d+)\s*day/);if(_e)return parseInt(_e[1]);const Ne=B.match(/(\d+)\s*week/);if(Ne)return parseInt(Ne[1])*7;const Ye=B.match(/(\d+)\s*month/);return Ye?parseInt(Ye[1])*30:0};switch(_){case"cheapest":return h.sort((A,B)=>(A.price||0)-(B.price||0));case"best-value":return h.sort((A,B)=>{const _e=(A.price||0)>0?b(A)/(A.price||1):0;return((B.price||0)>0?b(B)/(B.price||1):0)-_e});case"most-data":return h.sort((A,B)=>b(B)-b(A));case"longest-validity":return h.sort((A,B)=>C(B)-C(A));default:return h}},[me,_]),ke=k.useMemo(()=>oe?[...new Set(oe.map(h=>h.provider))]:[],[oe]),pe=k.useMemo(()=>
1{if(!oe||oe.length===0)return 800;const h=oe.map(b=>b.price||0).filter(b=>b>0);return h.length>0?Math.max(...h):800},[oe]);k.useEffect(()=>{const h=M.priceRange[1],b=M.priceRange[0];(h!==Math.ceil(pe)||b!==0)&&q({...M,priceRange:[0,Math.ceil(pe)]})},[pe,q]);const se=_n(Te,{initialPageSize:10,incrementSize:10}),Se=k.useMemo(()=>{const h=se.items;if(!V)return h;const b=[];let C=0;for(let A=0;A<h.length;A++)b.push(h[A]),(A===1||A>1&&(A-1)%8===0)&&(b.push({type:"ad",id:`ad-${C}`,adIndex:C%G.length}),C++);return b},[se.items,V,G.length]);k.useEffect(()=>{Se.filter(b=>b.type!=="ad").forEach(b=>{(b.provider||b.type||"unknown").toLowerCase()})},[Se,r.code]);const We=!re&&!0&&t&&r.code==="en"&&/^[A-Z]{2}$/i.test(t)&&X?.canonical_url,Be=We?X?.canonical_url?.split("/").pop()?.replace(/\/$/,""):null,at=w.includes(t.toLowerCase()),it=["india","france","spain","italy","germany","usa","uk","china","japan","brazil","canada"],ot=/^[A-Z]{2,3}$/i.test(t)||it.includes(t.toLowerCase());if(!we&&at)return e.jsx(Ae,{to:"/404",replace:!0});if(ot&&r.code==="he")return e.jsx(Ae,{to:"/404",replace:!0});if(We&&Be&&Be.toLowerCase()!==t.toLowerCase()){const h=r.code==="fr"?"/pays":"/countries";return e.jsx(Ae,{to:`${h}/${Be}`,replace:!0})}if(He)return e.jsx(Ae,{to:"/404",replace:!0});const Fe=h=>{if(h.hasCoupon!==M.hasCoupon)if(h.hasCoupon===!0){const b=u.discounts.map(C=>`${C.provider_name}: ${C.coupon_percent}% off`).join(", ");setTimeout(()=>{document.querySelectorAll("[data-product-card]").length,kt.success("Showing products with coupons",{description:b||"Loading discount information..."})},100)}else kt.info("Coupon filter removed");q(h)},Re=()=>{q({priceRange:[0,Math.ceil(pe)],dataAmounts:[],validityPeriods:[],validityDays:[1,365],providers:[],isUnlimited:null,hasCoupon:null}),T("all")},Je=(h,b)=>h.type==="ad"?e.jsx("div",{className:"col-span-full sm:col-span-1",children:e.jsx(Fn,{placement:"country",adIndex:h.adIndex})},`ad-${h.id}`):Qe(h),Qe=h=>{try{const b=`${h.provider}-${h.id||Math.random()}`,C=h.originalProduct||h.original_product,A=(h.type||h.provider||"").toLowerCase();if(!C)return null;const B={...C,aggregatedName:h.name,country_name:A==="maya"?d("product.global"):D?.country_name||h.country_name,aggregatedData:{data_amount:h.data_amount,validity:h.validity,price:h.price,currency:h.currency}};switch(A){case"maya":return e.jsx(Ln,{product:B,showLocation:!1,isGlobal:!0},b);case"saily":return e.jsx(Cn,{product:B,showLocation:!1},b);case"airalo":return e.jsx(Nn,{product:B,showLocation:!1},b);case"bnesim":return e.jsx(jn,{product:B,showLocation:!1},b);case"ubigi":return e.jsx(Sn,{product:B,showLocation:!1},b);case"yesim":return e.jsx(kn,{product:B,showLocation:!1},b);case"roamless":return e.jsx(An,{product:B,showLocation:!1},b);case"gigsky":return e.jsx(vn,{product:B,showLocation:!1},b);default:return null}}catch{return null}};if(De)return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("div",{className:"bg-gradient-to-br from-background to-accent/20 border-b",children:e.jsxs("div",{className:"container mx-auto px-3 sm:px-4 py-3 sm:py-6",children:[e.jsxs("div",{className:"mb-4 flex items-center gap-2 h-5",children:[e.jsx(I,{className:"h-4 w-10"}),e.jsx("span",{className:"text-muted-foreground/50",children:"/"}),e.jsx(I,{className:"h-4 w-16"}),e.jsx("span",{className:"text-muted-foreground/50",children:"/"}),e.jsx(I,{className:"h-4 w-24"})]}),e.jsx("div",{className:"relative mb-6 rounded-xl overflow-hidden bg-gradient-to-br from-primary/20 to-accent/20",style:{minHeight:"280px"},children:e.jsx("div",{className:"relative z-10 flex flex-col items-center justify-center text-center py-20 px-4",style:{minHeight:"280px"},children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(I,{className:"h-10 w-64 sm:w-80 md:w-96 mx-auto rounded-lg"}),e.jsx(I,{className:"h-6 w-48 sm:w-72 md:w-[500px] mx-auto rounded"})]})})})]})}),e.jsx("div",{className:"container mx-auto px-4 py-6",children:e.jsx("div",{className:"max-w-6xl mx-auto h-16"})}),e.jsx("div",{className:"sticky top-16 z-30 bg-background/95 backdrop-blur-sm border-b border-border/60 shadow-lg",children:e.jsxs("div",{className:"container mx-auto px-2 sm:px-4 md:px-6 py-2 sm:py-4",children:[e.jsxs("div",{className:"hidden lg:flex items-center justify-between gap-4 min-h-[44px]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(I,{className:"h-9 w-20 rounded-md"}),e.jsx("div",{className:"h-5 w-px bg-border/60"}),e.jsx(I,{className:"h-9 w-40 rounded-md"})]}),e.jsxs("div",{className:"flex items-center gap-2 bg-muted/30 p-1.5 rounded-lg border",children:[e.jsx(I,{className:"h-8 w-16 rounded-md"}),e.jsx(I,{className:"h-8 w-20 rounded-md"}),e.jsx(I,{className:"h-8 w-20 rounded-md"}),e.jsx(I,{className:"h-8 w-16 rounded-md"})]}),e.jsx(I,{className:"h-9 w-24 rounded-lg"})]}),e.jsxs("div",{className:"lg:hidden space-y-2 min-h-[88px]",children:[e.jsxs("div",{className:"flex items-center gap-1.5 h-10",children:[e.jsx(I,{className:"h-8 w-8 rounded-md"}),e.jsx(I,{className:"h-8 w-32 rounded-md"}),e.jsxs("div",{className:"ml-auto flex gap-1",children:[e.jsx(I,{className:"h-8 w-8 rounded-md"}),e.jsx(I,{className:"h-6 w-12 rounded-full"})]})]}),e.jsxs("div",{className:"flex gap-1 overflow-hidden pb-1",children:[e.jsx(I,{className:"h-8 w-16 rounded-md shrink-0"}),e.jsx(I,{className:"h-8 w-20 rounded-md shrink-0"}),e.jsx(I,{className:"h-8 w-20 rounded-md shrink-0"}),e.jsx(I,{className:"h-8 w-16 rounded-md shrink-0"})]})]})]})}),e.jsx("main",{className:"container mx-auto px-3 sm:px-4 py-4 sm:py-8",children:e.jsxs("div",{className:"flex gap-4 lg:gap-6",children:[e.jsx("div",{className:"w-80 flex-shrink-0 hidden lg:block",children:e.jsxs(Ce,{children:[e.jsx(et,{className:"py-4",children:e.jsx(I,{className:"h-6 w-24"})}),e.jsxs(Le,{className:"space-y-4",children:[e.jsx(I,{className:"h-20 w-full rounded-lg"}),e.jsx(I,{className:"h-20 w-full rounded-lg"}),e.jsx(I,{className:"h-16 w-full rounded-lg"})]})]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"text-center mb-6",children:e.jsx(I,{className:"h-8 w-64 sm:w-80 mx-auto rounded"})}),e.jsx("div",{className:"grid gap-4 sm:gap-6 grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3",children:Array.from({length:6}).map((h,b)=>e.jsx(fn,{},b))}),e.jsx("div",{className:"mt-8",children:e.jsxs(Ce,{className:"bg-card border-border",children:[e.jsx(et,{className:"bg-gradient-to-r from-primary/5 to-primary/10 pb-4",children:e.jsx(I,{className:"h-6 w-48"})}),e.jsxs(Le,{className:"pt-4 space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(I,{className:"h-5 w-16"}),e.jsx(I,{className:"h-5 w-24"}),e.jsx(I,{className:"h-4 w-32"})]}),e.jsx(I,{className:"h-16 w-full rounded-lg"}),e.jsx(I,{className:"h-20 w-full"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{className:"h-4 w-full"}),e.jsx(I,{className:"h-4 w-3/4"}),e.jsx(I,{className:"h-4 w-1/2"})]})]})]})}),e.jsxs("div",{className:"mt-8",children:[e.jsx(I,{className:"h-8 w-48 mb-4"}),e.jsx("div",{className:"space-y-3",children:Array.from({length:5}).map((h,b)=>e.jsx(I,{className:"h-14 w-full rounded-lg"},b))})]}),e.jsxs("div",{className:"mt-8",children:[e.jsx(I,{className:"h-8 w-40 mb-4"}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:Array.from({length:4}).map((h,b)=>e.jsx(I,{className:"h-24 w-full rounded-lg"},b))})]}),e.jsxs("div",{className:"mt-8",children:[e.jsx(I,{className:"h-8 w-40 mb-4"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:Array.from({length:3}).map((h,b)=>e.jsx(I,{className:"h-48 w-full rounded-lg"},b))})]})]})]})})]})});const Oe=j?.page_title||K(D.country_name),lt=r.code==="fr"?"/pays":"/countries";let he=`${xe()}${lt}/${t}`;j?.canonical_url&&(j.canonical_url.startsWith("/")?he=`${xe()}${j.canonical_url}
1`:j.canonical_url.startsWith("http")&&(he=j.canonical_url)),he=he.replace(/\/$/,"");const le=K(D.country_name,r.code);return e.jsxs(e.Fragment,{children:[e.jsxs(Ft,{children:[e.jsx("title",{children:j?.meta_title||(r.code==="he"?`eSIM ×${le}`:`${le} eSIM - Compare Plans`)}),e.jsx("meta",{name:"description",content:j?.meta_description||`Find the best eSIM plans for ${le}. Compare prices and data packages from top providers.`}),e.jsx("meta",{name:"robots",content:`${j?.robots_index!==!1?"index":"noindex"}, ${j?.robots_follow!==!1?"follow":"nofollow"}`}),j?.banner_image&&j.banner_image.startsWith("http")&&e.jsx("link",{rel:"preload",as:"image",href:j.banner_image,fetchPriority:"high"}),e.jsx("meta",{property:"og:locale",content:r.code==="he"?"he_IL":"en_US"}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:title",content:j?.og_title||j?.meta_title||`${le} eSIM`}),e.jsx("meta",{property:"og:description",content:j?.og_description||j?.meta_description||`Find the best eSIM plans for ${le}. Compare prices and data packages from top providers.`}),e.jsx("meta",{property:"og:url",content:he}),e.jsx("meta",{property:"og:site_name",content:"EsimsCompare"}),e.jsx("meta",{property:"og:image",content:j?.og_image||j?.banner_image||`${xe()}/og-default.jpg`}),e.jsx("meta",{name:"twitter:card",content:j?.twitter_card||"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:j?.twitter_title||j?.meta_title||`${le} eSIM`}),e.jsx("meta",{name:"twitter:description",content:j?.twitter_description||j?.meta_description||`Find the best eSIM plans for ${le}.`}),e.jsx("meta",{name:"twitter:image",content:j?.twitter_image||j?.og_image||j?.banner_image||`${xe()}/og-default.jpg`}),j?.created_at&&e.jsx("meta",{property:"article:published_time",content:new Date(j.created_at).toISOString()}),j?.updated_at&&e.jsx("meta",{property:"article:modified_time",content:new Date(j.updated_at).toISOString()}),e.jsx("link",{rel:"canonical",href:he}),!S&&O&&Object.entries(O).map(([h,b])=>e.jsx("link",{rel:"alternate",hrefLang:h,href:b},h)),!S&&O&&e.jsx("link",{rel:"alternate",hrefLang:"x-default",href:O.en||O.en||Object.values(O)[0]})]},`country-${n.pathname}`),e.jsx(Mr,{country:D,products:me,canonicalUrl:he,translatedCountryName:le,metaDescription:j?.meta_description||void 0,metaTitle:j?.meta_title||void 0,bannerImage:j?.banner_image||void 0,createdAt:j?.created_at||void 0,updatedAt:j?.updated_at||void 0}),e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx("div",{className:"bg-gradient-to-br from-background to-accent/20 border-b",children:e.jsxs("div",{className:"container mx-auto px-3 sm:px-4 py-3 sm:py-6",children:[e.jsx(Dn,{className:"mb-4",children:e.jsxs(En,{children:[e.jsx(jt,{children:e.jsx(Nt,{asChild:!0,children:e.jsx(Xe,{to:"/",children:d("breadcrumb.home")})})}),e.jsx(Ct,{}),e.jsx(jt,{children:e.jsx(Nt,{asChild:!0,children:e.jsx(Xe,{to:m,children:d("breadcrumb.countries")})})}),e.jsx(Ct,{}),e.jsx(Tn,{children:K(D.country_name,r.code)})]})}),e.jsxs("div",{className:"relative mb-6 rounded-xl overflow-hidden bg-gradient-to-br from-primary/20 to-accent/20",style:{minHeight:"280px"},children:[(j?.banner_image||j?.og_image)&&e.jsxs(e.Fragment,{children:[e.jsx(Gt,{src:j.banner_image||j.og_image,alt:Oe,className:"absolute inset-0",priority:!0,width:1200,height:280,aspectRatio:"auto"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/60 via-black/50 to-black/60"})]}),!j?.banner_image&&!j?.og_image&&e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/30 via-accent/20 to-primary/30"}),e.jsx("div",{className:"relative z-10 flex flex-col items-center justify-center text-center py-20 px-4",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("h1",{className:`font-bold leading-tight text-white drop-shadow-lg ${W?"text-2xl":"text-4xl"}`,children:Oe}),e.jsx("p",{className:`text-white/90 leading-relaxed max-w-2xl mx-auto drop-shadow ${W?"text-sm":"text-lg"}`,children:d("countryDetails.compareText").replace("{count}",me.length.toString()).replace("{providers}",ke.length.toString()).replace("{country}",K(D.country_name,r.code))})]})})]})]})}),e.jsx("div",{className:"-mt-0",children:e.jsx("div",{className:"container mx-auto px-4 py-6",children:e.jsx("div",{className:"max-w-6xl mx-auto",children:e.jsx(Cr,{sponsors:fe})})})}),e.jsx("div",{className:"sticky top-16 z-30 bg-background/95 backdrop-blur-sm border-b border-border/60 shadow-lg animate-fade-in",children:e.jsxs("div",{className:"container mx-auto px-2 sm:px-4 md:px-6 py-2 sm:py-4",children:[e.jsxs("div",{className:"hidden lg:flex items-center justify-between gap-2 md:gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2 md:gap-3 shrink-0",children:[e.jsxs($e,{variant:"ghost",size:"sm",onClick:()=>window.history.back(),className:"flex items-center gap-1.5 md:gap-2 h-8 md:h-9 px-2 md:px-3 rounded-md hover:bg-accent/50 transition-colors",children:[e.jsx(ut,{className:"w-3.5 md:w-4 h-3.5 md:h-4"}),e.jsx("span",{className:"text-xs md:text-sm font-medium",children:d("common.back")})]}),e.jsx("div",{className:"h-4 md:h-5 w-px bg-border/60"}),e.jsx(Lt,{currentCountry:D,variant:"compact"})]}),e.jsxs("div",{className:"flex items-center gap-2 md:gap-3 flex-1 justify-center max-w-2xl",children:[e.jsx("span",{className:"text-xs md:text-sm font-medium text-muted-foreground shrink-0",children:d("common.sortBy")}),e.jsx("div",{className:"flex items-center gap-1 md:gap-2 bg-muted/30 p-1 md:p-1.5 rounded-lg border",children:[{value:"cheapest",label:d("countryDetails.sortBy.cheapest")},{value:"best-value",label:d("countryDetails.sortBy.bestValue")},{value:"most-data",label:d("countryDetails.sortBy.mostData")},{value:"longest-validity",label:d("countryDetails.sortBy.longest")}].map(h=>e.jsx("button",{onClick:()=>
1P(h.value),className:`px-2 md:px-3 py-1.5 md:py-2 text-xs md:text-sm font-medium rounded-md transition-all duration-200 whitespace-nowrap ${_===h.value?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/80 hover:shadow-sm"}`,children:h.label},h.value))})]}),e.jsx("div",{className:"flex items-center shrink-0",children:e.jsxs("div",{className:"flex items-center gap-1.5 md:gap-2 px-3 md:px-4 py-1.5 md:py-2 bg-primary/10 border border-primary/20 rounded-lg",children:[e.jsx("div",{className:"w-1.5 md:w-2 h-1.5 md:h-2 bg-primary rounded-full animate-pulse"}),e.jsx("span",{className:"text-xs md:text-sm font-semibold text-primary",children:se.totalItems}),e.jsx("span",{className:"text-xs md:text-sm text-muted-foreground",children:d("common.plans")})]})})]}),e.jsxs("div",{className:"lg:hidden",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-h-[40px] mb-2",children:[e.jsx($e,{variant:"ghost",size:"sm",onClick:()=>window.history.back(),className:"flex items-center gap-1 shrink-0 h-8 w-8 p-0 rounded-md hover:bg-accent/50 transition-colors justify-center",children:e.jsx(ut,{className:"w-4 h-4"})}),e.jsx("div",{className:"flex-1 min-w-0 max-w-[140px]",children:e.jsx(Lt,{currentCountry:D,variant:"compact",className:"w-full"})}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-auto",children:[e.jsx(St,{filters:M,onFiltersChange:Fe,activeFiltersCount:R,onClearFilters:Re,maxPrice:pe,products:ee||[],compactMode:!0}),e.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 bg-primary/10 border border-primary/20 rounded-full",children:[e.jsx("div",{className:"w-1.5 h-1.5 bg-primary rounded-full animate-pulse"}),e.jsx("span",{className:"text-xs font-semibold text-primary whitespace-nowrap",children:se.totalItems})]})]})]}),e.jsx("div",{className:"flex gap-1 overflow-x-auto scrollbar-hide w-full scroll-smooth pb-1",children:[{value:"cheapest",label:d("countryDetails.sortBy.cheapest")},{value:"best-value",label:d("countryDetails.sortBy.bestValue")},{value:"most-data",label:d("countryDetails.sortBy.mostData")},{value:"longest-validity",label:d("countryDetails.sortBy.longest")}].map(h=>e.jsx("button",{onClick:()=>P(h.value),className:`px-3 py-2 text-xs font-medium rounded-md transition-all duration-200 whitespace-nowrap shrink-0 ${_===h.value?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground hover:bg-background/50"}`,children:h.label},h.value))})]}),R>0&&e.jsx("div",{className:"mt-2 lg:hidden animate-fade-in",children:e.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-accent/50 border border-accent rounded-lg",children:[e.jsx($n,{className:"w-3.5 h-3.5 text-accent-foreground"}),e.jsxs("span",{className:"text-xs font-medium text-accent-foreground",children:[R," ",d("common.filtersActive")]}),e.jsx($e,{variant:"ghost",size:"sm",onClick:Re,className:"ml-auto h-5 px-1.5 text-xs hover:bg-accent",children:d("common.clear")})]})})]})}),e.jsx("main",{className:"container mx-auto px-3 sm:px-4 md:px-6 py-4 sm:py-6 md:py-8",children:e.jsxs("div",{className:"flex gap-3 md:gap-4 lg:gap-6",children:[e.jsx("div",{className:"w-80 flex-shrink-0 hidden lg:block",children:e.jsx(St,{filters:M,onFiltersChange:Fe,activeFiltersCount:R,onClearFilters:Re,maxPrice:pe,products:ee||[]})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"hidden"}),e.jsx(hn,{defaultValue:"plans",className:"space-y-4 sm:space-y-5 md:space-y-6",children:e.jsxs(xn,{value:"plans",className:"space-y-4 sm:space-y-5 md:space-y-6",children:[e.jsx("div",{className:"text-center mb-4 sm:mb-5 md:mb-6",children:e.jsx("h2",{className:"text-2xl sm:text-2xl md:text-3xl font-bold",dir:r.rtl?"rtl":"ltr",children:(()=>{const h=K(D.country_name,r.code);if(j)switch(_){case"cheapest":return j.h2_cheapest||d("countryDetails.headingCheapest").replace("{country}",h);case"best-value":return j.h2_best_value||d("countryDetails.headingBestValue").replace("{country}",h);case"most-data":return j.h2_most_data||d("countryDetails.headingMostData").replace("{country}",h);case"longest-validity":return j.h2_longest_validity||d("countryDetails.headingLongestValidity").replace("{country}",h);default:return j.h2_default||d("countryDetails.headingDefault").replace("{country}",h)}switch(_){case"cheapest":return d("countryDetails.headingCheapest").replace("{country}",h);case"best-value":return d("countryDetails.headingBestValue").replace("{country}",h);case"most-data":return d("countryDetails.headingMostData").replace("{country}",h);case"longest-validity":return d("countryDetails.headingLongestValidity").replace("{country}",h);default:return d("countryDetails.headingDefault").replace("{country}",h)}})()})}),me.length===0&&st.length===0?e.jsx(Ce,{children:e.jsx(Le,{className:"p-6 sm:p-8 text-center",children:e.jsx("div",{className:"text-muted-foreground",children:d("countryDetails.noMatchingPlans")})})}):e.jsxs(e.Fragment,{children:[me.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid gap-4 sm:gap-6 grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3",children:Se.map(Je)}),e.jsx(bn,{onLoadMore:se.loadMore,isLoading:se.isLoading,hasMore:se.hasMore,currentCount:se.currentPageSize,totalCount:se.totalItems,itemType:d("pagination.esimPlans")})]}),D?.country_code_iso2&&e.jsx("div",{className:"mt-8",children:e.jsx(pn,{destinationType:"country",destinationCode:D.country_code_iso2,destinationName:le})}),e.jsx("div",{className:"mt-8",children:e.jsx(In,{title:d("countryDetails.faqTitle"),className:"",pageType:"country",pageIdentifier:D?.country_code_iso2,fallbackItems:[{question:d("countryDetails.fallbackFaq.activation.question"),answer:d("countryDetails.fallbackFaq.activation.answer")},{question:d("countryDetails.fallbackFaq.whatIs.question"),answer:d("countryDetails.fallbackFaq.whatIs.answer")},{question:d("countryDetails.fallbackFaq.howToInstall.question"),answer:d("countryDetails.fallbackFaq.howToInstall.answer")},{question:d("countryDetails.fallbackFaq.expiration.question"),answer:d("countryDetails.fallbackFaq.expiration.answer")},{question:d("countryDetails.fallbackFaq.multiple.question"),answer:d("countryDetails.fallbackFaq.multiple.answer")}]})}),e.jsx(Tr,{currentCountryCode:D.country_code_iso2,currentContinent:D.continent,currentRegion:D.region}),e.jsx(Rr,{currentCountryCode:D.country_code_iso2})]})]})})]})]})})]})]})};export{ys as default};
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.