1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="eb9f9ded-efbf-463e-ace5-5979172a195c",e._sentryDebugIdIdentifier="sentry-dbid-eb9f9ded-efbf-463e-ace5-5979172a195c")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8835],{58210:function(e,a,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/birth-lottery",function(){return r(69750)}])},93033:function(e,a,r){"use strict";r.d(a,{e:function(){return l},l:function(){return o}});var n=r(72579),t=r.n(n);let i=["message","error","err","body.error","body.message","body"];class o extends Error{constructor(e,a="Unknown error"){if(e instanceof Error)super(e.message||a),this.stack=e.stack,this.name=e.name;else{let r=a;if("object"==typeof e&&!Array.isArray(e)&&null!==e){let a;for(let n of i)if("string"==typeof(a=t()(e,n))){r=a;break}}r||(r=JSON.stringify(e)),super(r)}}}let l=(e,a)=>new o(e,a).message},13523:function(e,a,r){"use strict";r.d(a,{P:function(){return l}});var n=r(2784),t=r(3687),i=r(22583),o=r(39754);let l=e=>{let{name:a,title:r}=e,l=(0,i.Y)(),s=(0,n.useRef)(l);s.current=l,(0,n.useEffect)(()=>{let e=(0,t.a1)(),n=s.current?"granted":"denied",i=void 0!==s.current?{analytics_storage:n,ad_storage:n,ad_personalization:n,ad_user_data:n}:{};(0,o.Z0)(a,{title:r,referral:e,url:window.location.href,path:window.location.pathname,...i})},[a,r])}},52413:function(e,a,r){"use strict";r.d(a,{s:function(){return p}});var n=r(52322),t=r(2784),i=r(5632),o=r(8186),l=r(51942),s=r(51109),c=r(14932),u=r(15749),d=r(40557),h=r(17473);let p=e=>{let{eventCategory:a,hideLabel:r=!1,buttonContent:p="Subscribe",audience:m="newsletter",onSuccess:g,size:f="large",layout:x="row"}=e,{asPath:b}=(0,i.useRouter)(),[y,v]=t.useState(""),[w,A]=t.useState(""),[S,N]=t.useState(!1),[j,C]=t.useState(""),[E,k]=t.useState(""),{captchaToken:M,onRecaptchaVerify:T,refreshReCaptcha:L,updateRecaptchaToken:I}=(0,d.Z)(),R=!y||u.I.safeParse(y).success,B=async e=>{e.preventDefault(),N(!0),C("");let r=await (0,d.x)({email:y,eventCategory:a,audience:m,path:b,honeypot:w,recaptchaToken:M});if(N(!1),I(),r.ok)k("submitted"),null==g||g();else{console.error("Failed to subscribe:",r.statusText);try{let e=await r.json();C(e.message)}catch(e){console.error("Failed to parse error response:",e),C("An error occurred. Please try again later.")}}};return"submitted"===E?(0,n.jsx)(l.uT,{className:"pb-5",children:"Thank you for subscribing! \uD83C\uDF89"}):(0,n.jsxs)("form",{onSubmit:B,children:[!r&&(0,n.jsx)("p",{className:"pb-3",children:"Subscribe to our Newsletter!"}),(0,n.jsxs)("div",{className:(0,o.A)("flex gap-2 lg:gap-4 max-w-screen-md","column"===x?"flex-col items-stretch":"flex-row items-end"),children:[(0,n.jsxs)("div",{className:"column"===x?"w-full":"flex-grow",children:[(0,n.jsx)(h.mP,{onVerify:T,refreshReCaptcha:L,action:"newsletterSignupForm"}),(0,n.jsx)(s.n,{id:"mc-email",label:r?void 0:"Email",placeholder:"Your email address",name:"EMAIL",value:y,required:!0,onFocus:()=>I(),onChange:e=>v(e.target.value.toLowerCase().trim()),autocomplete:"email",type:"email",disabled:S,className:"small"===f?"!h-12":""})]}),(0,n.jsx)("input",{type:"text",name:"company",tabIndex:-1,autoComplete:"off",value:w,onChange:e=>A(e.target.value),className:"absolute -left-[9999px] top-auto w-px h-px overflow-hidden opacity-0 pointer-events-none"}),(0,n.jsx)(c.z,{level:"primary",size:"large",type:"submit",className:(0,o.A)("border py-3.5 leading-7","column"===x?"w-full mt-0":"mt-2 sm:mt-0","small"===f?"h-12":"py-3.5"),disabled:!R||S||!M,children:p})]}),j&&(0,n.jsxs)(l.uT,{xs:!0,subtitle:!0,className:"col-span-6 mt-2",children:["â ï¸ ",j]})]})}},40557:function(e,a,r){"use strict";r.d(a,{Z:function(){return l},x:function(){return o}});var n=r(2784),t=r(39754);let i=(e,a)=>{let r={category:e,pathname:window.location.pathname};if("newsletter"===a)return(0,t.L9)("Newsletter form submitted",r);if("learn_about_pledge"===a)return(0,t.L9)("Learn about Pledge series subscribed",r);throw Error("Invalid audience ".concat(a))},o=async e=>{let{email:a,eventCategory:r,audience:n,path:t,honeypot:o,recaptchaToken:l}=e;i(r,n);let s="newsletter"===n?"Monthly Newsletter":"Learn About Pledging Series",c=null==t?void 0:t.split("?")[0].split("#")[0];return await fetch("/api/newsletter/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:a,formUrl:c,subscription:s,honeypot:o,recaptchaToken:l})})},l=()=>
1{let[e,a]=(0,n.useState)("");(0,n.useEffect)(()=>{a(new Date().toISOString())},[]);let[r,t]=(0,n.useState)("");return{captchaToken:r,onRecaptchaVerify:(0,n.useCallback)(e=>{t(e)},[]),refreshReCaptcha:e,updateRecaptchaToken:(0,n.useCallback)(()=>{a(new Date().toISOString())},[])}}},9319:function(e,a,r){"use strict";r.d(a,{hg:function(){return y},$g:function(){return d},hW:function(){return u},Vq:function(){return c},ap:function(){return h}});var n=r(52322);r(2784);var t=r(97729),i=r.n(t),o=r(39245),l=r(74605);let s=e=>{let a=JSON.stringify(e);if(void 0===a)throw TypeError("Expected a JSON-serializable object");return a.replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")},c=e=>{let{organizations:a,name:r}=e;return{"@context":"https://schema.org","@type":"ItemList",name:r,itemListElement:a.map((e,a)=>({"@type":"ListItem",item:u({organization:e}),position:a+1}))}},u=e=>{let{organization:a,...r}=e,n="https://www.givingwhatwecan.org"+a.infoLink;return{"@type":"Offer",name:"".concat(a.program," by ").concat(a.name),description:null==a?void 0:a.shortDescription,url:n,category:"Charitable Donation",itemOffered:{"@type":"Service",name:"".concat(a.program," by ").concat(a.name),description:null==a?void 0:a.shortDescription},offeredBy:{"@type":"Organization",name:a.name,logo:a.logoURL},potentialAction:{"@type":"DonateAction",recipient:{"@type":"Organization",name:a.name,logo:a.logoURL},provider:{"@type":"Organization",name:"Giving What We Can"}},...r}},d=e=>{let{title:a,excerpt:r}=e;return{"@context":"https://schema.org","@type":"Article",headline:a,name:a,description:r&&(0,o.hy)(r)}},h=e=>{let{title:a,description:r,canonicalUrl:n,locale:t,breadcrumbs:i}=e;return{"@context":"https://schema.org","@type":"WebPage",name:a,url:n,inLanguage:t,description:r,breadcrumb:i&&p(i),isPartOf:m(),publisher:g()}}
1,p=e=>({"@type":"BreadcrumbList",itemListElement:e.map((e,a)=>({"@type":"ListItem",position:a+1,name:e.title,item:"https://www.givingwhatwecan.org"+e.path}))}),m=()=>({"@type":"WebSite","@id":l.U+"/#website",name:"Giving What We Can",url:l.U,potentialAction:{"@type":"SearchAction",target:l.U+"/search?&q={query}",query:"required"}}),g=()=>({"@type":"NGO","@id":l.U+"/#organization",name:"Giving What We Can",logo:f(),sameAs:["https://www.facebook.com/givingwhatwecan/","https://x.com/givingwhatwecan","https://bsky.app/profile/givingwhatwecan.bsky.social","https://www.linkedin.com/company/giving-what-we-can","https://www.youtube.com/@GivingWhatWeCanCommunity"],subOrganization:[x(),b()]}),f=()=>({"@type":"ImageObject","@id":l.U+"/#logo",url:l.U+"/branding/gwwc-logo.svg",width:"675px",height:"138px"}),x=()=>({"@type":"NGO",name:"Giving What We Can UK",identifier:{"@type":"PropertyValue",propertyID:"UKCharityNumber",value:"1207964"},address:{"@type":"PostalAddress",addressCountry:"GB"},taxID:"15442716",nonprofitStatus:"CharitableIncorporatedOrganization"}),b=()=>({"@type":"NGO",name:"Giving What We Can USA Inc.",address:{"@type":"PostalAddress",addressCountry:"US"},identifier:{"@type":"PropertyValue",propertyID:"EIN",value:"93-3629215"},nonprofitStatus:"Nonprofit501c3"}),y=e=>{let{data:a}=e;return(0,n.jsx)(i(),{children:(0,n.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:s(a)}})})}},40137:function(e,a,r){"use strict";r.d(a,{T:function(){return m}});var n=r(52322),t=r(97729),i=r.n(t),o=r(5632),l=r(2784),s=r(8186),c=r(74605),u=r(13523),d=r(47815),h=r(9319);let p=e=>{let{path:a}=e,r=Math.min(a.indexOf("?")>0?a.indexOf("?"):a.length,a.indexOf("#")>0?a.indexOf("#"):a.length),n=a.substring(0,r);return"/"===n&&(n=""),c.U+n},m=e=>{var a,r;let{breadcrumbs:t,children:c,className:m,title:g,head:f={},jsonLdData:x,renderBreadcrumbs:b=!0}=e,y=(0,o.useRouter)();void 0===f.title&&(f.title=g),(0,u.P)({name:null!==(a=f.title)&&void 0!==a?a:"",title:null!==(r=f.title)&&void 0!==r?r:""});let v=(0,l.useMemo)(()=>f.canonicalUrl||p({path:y.asPath}),[f.canonicalUrl,y.asPath]),w="".concat(f.title?"".concat(f.title," \xb7 "):"","Giving What We Can");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(i(),{children:[(0,n.jsx)("title",{children:w}),f.description&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("meta",{name:"description",content:f.description}),(0,n.jsx)("meta",{property:"og:description",content:f.description})]}),(0,n.jsx)("meta",{property:"og:type",content:"website"}),(0,n.jsx)("meta",{property:"og:title",content:f.title||"Giving What We Can"}),f.imageUrl&&(0,n.jsx)("meta",{property:"og:image",content:f.imageUrl}),(0,n.jsx)("link",{rel:"canonical",href:v}),(0,n.jsx)("meta",{property:"og:url",content:v}),f.noindex&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("meta",{name:"robots",content:"noindex"})})]}),(0,n.jsx)(h.hg,{data:x||(0,h.ap)({title:g||f.title,description:f.description,canonicalUrl:v,locale:y.locale||"en",breadcrumbs:t})}),(0,n.jsx)("div",{id:"pageTop"}),t&&b&&(0,n.jsx)(d.O,{breadcrumbs:t}),(0,n.jsxs)("div",{className:(0,s.A)("h-full",m),"data-testid":"page-content",children:[g&&(0,n.jsx)("div",{className:"relative container mx-auto",children:(0,n.jsx)("h1",{className:"pt-4 lg:pt-10 mb-4 text-5xl lg:text-6xl font-bold leading-normal",children:g})}),c]})]})}},75089:function(e,a,r){"use strict";r.d(a,{n:function(){return l},v:function(){return s}});var n=r(52322),t=r(2784);let i=(0,t.createContext)({topNavigation:null,footerNavigation:null,siteAlert:null}),{Provider:o}=i,l=e=>{let{children:a,initialSanityState:r}=e,[i]=t.useState(null==r?void 0:r.topNavigation),[l]=t.useState(null==r?void 0:r.footerNavigation),[s]=t.useState(null==r?void 0:r.siteAlert);return(0,n.jsx)(o,{value:{topNavigation:i,footerNavigation:l,siteAlert:s}
1,children:a})},s=()=>(0,t.useContext)(i)},47815:function(e,a,r){"use strict";r.d(a,{O:function(){return c}});var n=r(52322),t=r(39097),i=r.n(t);r(2784);var o=r(8186),l=r(98935);function s(e){switch(e){case 0:default:return"text-primary";case 1:return"text-primary/80";case 2:return"text-primary/60";case 3:return"text-primary/40"}}let c=e=>{let{breadcrumbs:a,className:r}=e,t=e=>e===a.length-1;return(0,n.jsx)("nav",{"aria-label":"Breadcrumb",className:"bg-subtle",children:(0,n.jsx)("div",{className:(0,o.A)("container mx-auto py-3 text-md",r),children:(0,n.jsx)("ol",{className:"flex flex-wrap items-center",children:a.map((e,a)=>(0,n.jsxs)("li",{className:"flex items-center",children:[0!==a&&(0,n.jsx)("span",{className:[s(a),"inline-flex items-center px-2"].join(" "),"aria-hidden":"true",children:(0,n.jsx)(l.Z,{className:"w-4 h-4"})}),t(a)?(0,n.jsx)("span",{"aria-current":"page",className:s(a),children:e.title}):(0,n.jsx)(i(),{href:e.path,className:s(a),children:e.title})]},e._id))})})})}},36931:function(e,a,r){"use strict";r.d(a,{M:function(){return i}});var n=r(93033),t=r(2784);let i=e=>{var a;let r=null!==(a=null==e?void 0:e.skip)&&void 0!==a&&a,[i,o]=(0,t.useState)(),[l,s]=(0,t.useState)(),[c,u]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{let e=new AbortController,a=async()=>{try{u(!0),s(void 0);let{country:a}=await fetch("/api/country",{signal:e.signal}).then(e=>e.json());o(a)}catch(a){e.signal.aborted||s(new n.l(a))}finally{e.signal.aborted||u(!1)}};return r||a(),()=>{e.abort()}},[r]),{country:i,error:l,loading:c}}},29228:function(e,a,r){"use strict";r.d(a,{Z:function(){return d}});var n=r(2784);let t=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),i=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,a,r)=>r?r.toUpperCase():a.toLowerCase()),o=e=>{let a=i(e);return a.charAt(0).toUpperCase()+a.slice(1)},l=function(){for(var e=arguments.length,a=Array(e),r=0;r<e;r++)a[r]=arguments[r];return a.filter((e,a,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===a).join(" ").trim()},s=e=>{for(let a in e)if(a.startsWith("aria-")||"role"===a||"title"===a)return!0};var c={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let u=(0,n.forwardRef)((e,a)=>{let{color:r="currentColor",size:t=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:u="",children:d,iconNode:h,...p}=e;return(0,n.createElement)("svg",{ref:a,...c,width:t,height:t,stroke:r,strokeWidth:o?24*Number(i)/Number(t):i,className:l("lucide",u),...!d&&!s(p)&&{"aria-hidden":"true"},...p},[...h.map(e=>{let[a,r]=e;return(0,n.createElement)(a,r)}),...Array.isArray(d)?d:[d]])}),d=(e,a)=>{let r=(0,n.forwardRef)((r,i)=>{let{className:s,...c}=r;return(0,n.createElement)(u,{ref:i,iconNode:a,className:l("lucide-".concat(t(o(e))),"lucide-".concat(e),s),...c})});return r.displayName=o(e),r}},98935:function(e,a,r){"use strict";r.d(a,{Z:function(){return n}});let n=(0,r(29228).Z)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},31355:function(e,a,r){"use strict";r.d(a,{Z:function(){return n}});let n=(0,r(29228).Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},89990:function(e,a,r){"use strict";r.d(a,{Z:function(){return n}});let n=(0,r(29228).Z)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},69750:function(e,a,r){"use strict";r.r(a),r.d(a,{__N_SSG:function(){return eU},default:function(){return eO}});var n=r(52322),t=r(2784),i=r(96577),o=r.n(i),l=r(40137),s=r(75089),c=r(89258),u=r(30517),d=r.n(u),h=r(8186),p=JSON.parse('[{"alpha-2":"AF","alpha-3":"AFG","name":"Afghanistan","region":"Asia","sub-region":"Southern Asia"},{"alpha-2":"AL","alpha-3":"ALB","name":"Albania","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"DZ","alpha-3":"DZA","name":"Algeria","region":"Africa","sub-region":"Northern Africa"},{"alpha-2":"AD","alpha-3":"AND","name":"Andorra","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"AO","alpha-3":"AGO","name":"Angola","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"AG","alpha-3":"ATG","name":"Antigua and Barbuda","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"AR","alpha-3":"ARG","name":"Argentina","region":"Americas","sub-region":"South America"},{"alpha-2":"AM","alpha-3":"ARM","name":"Armenia","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"AU","alpha-3":"AUS","name":"Australia","region":"Oceania","sub-region":"Australia and New Zealand"},{"alpha-2":"AT","alpha-3":"AUT","name":"Austria","region":"Europe","sub-region":"Western Europe"},{"alpha-2":"AZ","alpha-3":"AZE","name":"Azerbaijan","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"BS","alpha-3":"BHS","name":"Bahamas","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"BH","alpha-3":"BHR","name":"Bahrain","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"BD","alpha-3":"BGD","name":"Bangladesh","region":"Asia","sub-region":"Southern Asia"},{"alpha-2":"BB","alpha-3":"BRB","name":"Barbados","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"BY","alpha-3":"BLR","name":"Belarus","region":"Europe","sub-region":"Eastern Europe"}
1,{"alpha-2":"BE","alpha-3":"BEL","name":"Belgium","region":"Europe","sub-region":"Western Europe"},{"alpha-2":"BZ","alpha-3":"BLZ","name":"Belize","region":"Americas","sub-region":"Central America"},{"alpha-2":"BJ","alpha-3":"BEN","name":"Benin","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"BT","alpha-3":"BTN","name":"Bhutan","region":"Asia","sub-region":"Southern Asia"},{"alpha-2":"BO","alpha-3":"BOL","name":"Bolivia, Plurinational State of","region":"Americas","sub-region":"South America"},{"alpha-2":"BA","alpha-3":"BIH","name":"Bosnia and Herzegovina","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"BW","alpha-3":"BWA","name":"Botswana","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"BR","alpha-3":"BRA","name":"Brazil","region":"Americas","sub-region":"South America"},{"alpha-2":"BN","alpha-3":"BRN","name":"Brunei Darussalam","region":"Asia","sub-region":"South-eastern Asia"},{"alpha-2":"BG","alpha-3":"BGR","name":"Bulgaria","region":"Europe","sub-region":"Eastern Europe"},{"alpha-2":"BF","alpha-3":"BFA","name":"Burkina Faso","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"BI","alpha-3":"BDI","name":"Burundi","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"CV","alpha-3":"CPV","name":"Cabo Verde","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"KH","alpha-3":"KHM","name":"Cambodia","region":"Asia","sub-region":"South-eastern Asia"},{"alpha-2":"CM","alpha-3":"CMR","name":"Cameroon","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"CA","alpha-3":"CAN","name":"Canada","region":"Americas","sub-region":"Northern America"},{"alpha-2":"CF","alpha-3":"CAF","name":"Central African Republic","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"TD","alpha-3":"TCD","name":"Chad","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"CL","alpha-3":"CHL","name":"Chile","region":"Americas","sub-region":"South America"},{"alpha-2":"CN","alpha-3":"CHN","name":"China","region":"Asia","sub-region":"Eastern Asia"},{"alpha-2":"CO","alpha-3":"COL","name":"Colombia","region":"Americas","sub-region":"South America"},{"alpha-2":"KM","alpha-3":"COM","name":"Comoros","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"CG","alpha-3":"COG","name":"Congo","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"CD","alpha-3":"COD","name":"Congo, Democratic Republic of the","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"CR","alpha-3":"CRI","name":"Costa Rica","region":"Americas","sub-region":"Central America"},{"alpha-2":"CI","alpha-3":"CIV","name":"C\xf4te d\'Ivoire","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"HR","alpha-3":"HRV","name":"Croatia","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"CU","alpha-3":"CUB","name":"Cuba","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"CY","alpha-3":"CYP","name":"Cyprus","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"CZ","alpha-3":"CZE","name":"Czechia","region":"Europe","sub-region":"Eastern Europe"},{"alpha-2":"DK","alpha-3":"DNK","name":"Denmark","region":"Europe","sub-region":"Northern Europe"},{"alpha-2":"DJ","alpha-3":"DJI","name":"Djibouti","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"DM","alpha-3":"DMA","name":"Dominica","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"DO","alpha-3":"DOM","name":"Dominican Republic","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"EC","alpha-3":"ECU","name":"Ecuador","region":"Americas","sub-region":"South America"},{"alpha-2":"EG","alpha-3":"EGY","name":"Egypt","region":"Africa","sub-region":"Northern Africa"},{"alpha-2":"SV","alpha-3":"SLV","name":"El Salvador","region":"Americas","sub-region":"Central America"},{"alpha-2":"GQ","alpha-3":"GNQ","name":"Equatorial Guinea","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"ER","alpha-3":"ERI","name":"Eritrea","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"EE","alpha-3":"EST","name":"Estonia","region":"Europe","sub-region":"Northern Europe"},{"alpha-2":"SZ","alpha-3":"SWZ","name":"Eswatini","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"ET","alpha-3":"ETH","name":"Ethiopia","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"FJ","alpha-3":"FJI","name":"Fiji","region":"Oceania","sub-region":"Melanesia"},{"alpha-2":"FI","alpha-3":"FIN","name":"Finland","region":"Europe","sub-region":"Northern Europe"},{"alpha-2":"FR","alpha-3":"FRA","name":"France","region":"Europe","sub-region":"Western Europe"},{"alpha-2":"GF","alpha-3":"GUF","name":"French Guiana","region":"Americas","sub-region":"South America"},{"alpha-2":"GA","alpha-3":"GAB","name":"Gabon","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"GM","alpha-3":"GMB","name":"Gambia","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"GE","alpha-3":"GEO","name":"Georgia","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"DE","alpha-3":"DEU","name":"Germany","region":"Europe","sub-region":"Western Europe"},{"alpha-2":"GH","alpha-3":"GHA","name":"Ghana","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"GR","alpha-3":"GRC","name":"Greece","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"GL","alpha-3":"GRL","name":"Greenland","region":"Americas","sub-region":"Northern America"},{"alpha-2":"GD","alpha-3":"GRD","name":"Grenada","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"GT","alpha-3":"GTM","name":"Guatemala","region":"Americas","sub-region":"Central America"},{"alpha-2":"GN","alpha-3":"GIN","name":"Guinea","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"GW","alpha-3":"GNB","name":"Guinea-Bissau","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"GY","alpha-3":"GUY","name":"Guyana","region":"Americas","sub-region":"South America"},{"alpha-2":"HT","alpha-3":"HTI","name":"Haiti","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"HN","alpha-3":"HND","name":"Honduras","region":"Americas","sub-region":"Central America"},{"alpha-2":"HU","alpha-3":"HUN","name":"Hungary","region":"Europe","sub-region":"Eastern Europe"}
1,{"alpha-2":"IS","alpha-3":"ISL","name":"Iceland","region":"Europe","sub-region":"Northern Europe"},{"alpha-2":"IN","alpha-3":"IND","name":"India","region":"Asia","sub-region":"Southern Asia"},{"alpha-2":"ID","alpha-3":"IDN","name":"Indonesia","region":"Asia","sub-region":"South-eastern Asia"},{"alpha-2":"IR","alpha-3":"IRN","name":"Iran, Islamic Republic of","region":"Asia","sub-region":"Southern Asia"},{"alpha-2":"IQ","alpha-3":"IRQ","name":"Iraq","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"IE","alpha-3":"IRL","name":"Ireland","region":"Europe","sub-region":"Northern Europe"},{"alpha-2":"IL","alpha-3":"ISR","name":"Israel","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"IT","alpha-3":"ITA","name":"Italy","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"JM","alpha-3":"JAM","name":"Jamaica","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"JP","alpha-3":"JPN","name":"Japan","region":"Asia","sub-region":"Eastern Asia"},{"alpha-2":"JO","alpha-3":"JOR","name":"Jordan","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"KZ","alpha-3":"KAZ","name":"Kazakhstan","region":"Asia","sub-region":"Central Asia"},{"alpha-2":"KE","alpha-3":"KEN","name":"Kenya","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"KI","alpha-3":"KIR","name":"Kiribati","region":"Oceania","sub-region":"Micronesia"},{"alpha-2":"KP","alpha-3":"PRK","name":"Korea, Democratic People\'s Republic of","region":"Asia","sub-region":"Eastern Asia"},{"alpha-2":"KR","alpha-3":"KOR","name":"Korea, Republic of","region":"Asia","sub-region":"Eastern Asia"},{"alpha-2":"KW","alpha-3":"KWT","name":"Kuwait","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"KG","alpha-3":"KGZ","name":"Kyrgyzstan","region":"Asia","sub-region":"Central Asia"},{"alpha-2":"LA","alpha-3":"LAO","name":"Lao People\'s Democratic Republic","region":"Asia","sub-region":"South-eastern Asia"},{"alpha-2":"LV","alpha-3":"LVA","name":"Latvia","region":"Europe","sub-region":"Northern Europe"},{"alpha-2":"LB","alpha-3":"LBN","name":"Lebanon","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"LS","alpha-3":"LSO","name":"Lesotho","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"LR","alpha-3":"LBR","name":"Liberia","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"LY","alpha-3":"LBY","name":"Libya","region":"Africa","sub-region":"Northern Africa"},{"alpha-2":"LI","alpha-3":"LIE","name":"Liechtenstein","region":"Europe","sub-region":"Western Europe"},{"alpha-2":"LT","alpha-3":"LTU","name":"Lithuania","region":"Europe","sub-region":"Northern Europe"},{"alpha-2":"LU","alpha-3":"LUX","name":"Luxembourg","region":"Europe","sub-region":"Western Europe"},{"alpha-2":"MG","alpha-3":"MDG","name":"Madagascar","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"MW","alpha-3":"MWI","name":"Malawi","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"MY","alpha-3":"MYS","name":"Malaysia","region":"Asia","sub-region":"South-eastern Asia"},{"alpha-2":"MV","alpha-3":"MDV","name":"Maldives","region":"Asia","sub-region":"Southern Asia"},{"alpha-2":"ML","alpha-3":"MLI","name":"Mali","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"MT","alpha-3":"MLT","name":"Malta","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"MH","alpha-3":"MHL","name":"Marshall Islands","region":"Oceania","sub-region":"Micronesia"},{"alpha-2":"MR","alpha-3":"MRT","name":"Mauritania","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"MU","alpha-3":"MUS","name":"Mauritius","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"MX","alpha-3":"MEX","name":"Mexico","region":"Americas","sub-region":"Central America"},{"alpha-2":"FM","alpha-3":"FSM","name":"Micronesia, Federated States of","region":"Oceania","sub-region":"Micronesia"},{"alpha-2":"MD","alpha-3":"MDA","name":"Moldova, Republic of","region":"Europe","sub-region":"Eastern Europe"},{"alpha-2":"MC","alpha-3":"MCO","name":"Monaco","region":"Europe","sub-region":"Western Europe"},{"alpha-2":"MN","alpha-3":"MNG","name":"Mongolia","region":"Asia","sub-region":"Eastern Asia"},{"alpha-2":"ME","alpha-3":"MNE","name":"Montenegro","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"MA","alpha-3":"MAR","name":"Morocco","region":"Africa","sub-region":"Northern Africa"}
1,{"alpha-2":"MZ","alpha-3":"MOZ","name":"Mozambique","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"MM","alpha-3":"MMR","name":"Myanmar","region":"Asia","sub-region":"South-eastern Asia"},{"alpha-2":"NA","alpha-3":"NAM","name":"Namibia","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"NR","alpha-3":"NRU","name":"Nauru","region":"Oceania","sub-region":"Micronesia"},{"alpha-2":"NP","alpha-3":"NPL","name":"Nepal","region":"Asia","sub-region":"Southern Asia"},{"alpha-2":"NL","alpha-3":"NLD","name":"Netherlands","region":"Europe","sub-region":"Western Europe"},{"alpha-2":"NC","alpha-3":"NCL","name":"New Caledonia","region":"Oceania","sub-region":"Melanesia"},{"alpha-2":"NZ","alpha-3":"NZL","name":"New Zealand","region":"Oceania","sub-region":"Australia and New Zealand"},{"alpha-2":"NI","alpha-3":"NIC","name":"Nicaragua","region":"Americas","sub-region":"Central America"},{"alpha-2":"NE","alpha-3":"NER","name":"Niger","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"NG","alpha-3":"NGA","name":"Nigeria","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"MK","alpha-3":"MKD","name":"North Macedonia","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"NO","alpha-3":"NOR","name":"Norway","region":"Europe","sub-region":"Northern Europe"},{"alpha-2":"OM","alpha-3":"OMN","name":"Oman","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"PK","alpha-3":"PAK","name":"Pakistan","region":"Asia","sub-region":"Southern Asia"},{"alpha-2":"PW","alpha-3":"PLW","name":"Palau","region":"Oceania","sub-region":"Micronesia"},{"alpha-2":"PS","alpha-3":"PSE","name":"Palestine, State of","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"PA","alpha-3":"PAN","name":"Panama","region":"Americas","sub-region":"Central America"},{"alpha-2":"PG","alpha-3":"PNG","name":"Papua New Guinea","region":"Oceania","sub-region":"Melanesia"},{"alpha-2":"PY","alpha-3":"PRY","name":"Paraguay","region":"Americas","sub-region":"South America"},{"alpha-2":"PE","alpha-3":"PER","name":"Peru","region":"Americas","sub-region":"South America"},{"alpha-2":"PH","alpha-3":"PHL","name":"Philippines","region":"Asia","sub-region":"South-eastern Asia"},{"alpha-2":"PL","alpha-3":"POL","name":"Poland","region":"Europe","sub-region":"Eastern Europe"},{"alpha-2":"PT","alpha-3":"PRT","name":"Portugal","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"PR","alpha-3":"PRI","name":"Puerto Rico","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"QA","alpha-3":"QAT","name":"Qatar","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"RO","alpha-3":"ROU","name":"Romania","region":"Europe","sub-region":"Eastern Europe"},{"alpha-2":"RU","alpha-3":"RUS","name":"Russian Federation","region":"Europe","sub-region":"Eastern Europe"},{"alpha-2":"RW","alpha-3":"RWA","name":"Rwanda","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"KN","alpha-3":"KNA","name":"Saint Kitts and Nevis","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"LC","alpha-3":"LCA","name":"Saint Lucia","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"VC","alpha-3":"VCT","name":"Saint Vincent and the Grenadines","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"WS","alpha-3":"WSM","name":"Samoa","region":"Oceania","sub-region":"Polynesia"},{"alpha-2":"SM","alpha-3":"SMR","name":"San Marino","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"ST","alpha-3":"STP","name":"Sao Tome and Principe","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"SA","alpha-3":"SAU","name":"Saudi Arabia","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"SN","alpha-3":"SEN","name":"Senegal","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"RS","alpha-3":"SRB","name":"Serbia","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"SC","alpha-3":"SYC","name":"Seychelles","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"SL","alpha-3":"SLE","name":"Sierra Leone","region":"Africa","sub-region":"Sub-Saharan Africa"}
1,{"alpha-2":"SG","alpha-3":"SGP","name":"Singapore","region":"Asia","sub-region":"South-eastern Asia"},{"alpha-2":"SK","alpha-3":"SVK","name":"Slovakia","region":"Europe","sub-region":"Eastern Europe"},{"alpha-2":"SI","alpha-3":"SVN","name":"Slovenia","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"SB","alpha-3":"SLB","name":"Solomon Islands","region":"Oceania","sub-region":"Melanesia"},{"alpha-2":"SO","alpha-3":"SOM","name":"Somalia","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"ZA","alpha-3":"ZAF","name":"South Africa","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"SS","alpha-3":"SSD","name":"South Sudan","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"ES","alpha-3":"ESP","name":"Spain","region":"Europe","sub-region":"Southern Europe"},{"alpha-2":"LK","alpha-3":"LKA","name":"Sri Lanka","region":"Asia","sub-region":"Southern Asia"},{"alpha-2":"SD","alpha-3":"SDN","name":"Sudan","region":"Africa","sub-region":"Northern Africa"},{"alpha-2":"SR","alpha-3":"SUR","name":"Suriname","region":"Americas","sub-region":"South America"},{"alpha-2":"SE","alpha-3":"SWE","name":"Sweden","region":"Europe","sub-region":"Northern Europe"},{"alpha-2":"CH","alpha-3":"CHE","name":"Switzerland","region":"Europe","sub-region":"Western Europe"},{"alpha-2":"SY","alpha-3":"SYR","name":"Syrian Arab Republic","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"TW","alpha-3":"TWN","name":"Taiwan, Province of China","region":"","sub-region":""},{"alpha-2":"TJ","alpha-3":"TJK","name":"Tajikistan","region":"Asia","sub-region":"Central Asia"},{"alpha-2":"TZ","alpha-3":"TZA","name":"Tanzania, United Republic of","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"TH","alpha-3":"THA","name":"Thailand","region":"Asia","sub-region":"South-eastern Asia"}
1,{"alpha-2":"TL","alpha-3":"TLS","name":"Timor-Leste","region":"Asia","sub-region":"South-eastern Asia"},{"alpha-2":"TG","alpha-3":"TGO","name":"Togo","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"TO","alpha-3":"TON","name":"Tonga","region":"Oceania","sub-region":"Polynesia"},{"alpha-2":"TT","alpha-3":"TTO","name":"Trinidad and Tobago","region":"Americas","sub-region":"Caribbean"},{"alpha-2":"TN","alpha-3":"TUN","name":"Tunisia","region":"Africa","sub-region":"Northern Africa"},{"alpha-2":"TR","alpha-3":"TUR","name":"T\xfcrkiye","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"TM","alpha-3":"TKM","name":"Turkmenistan","region":"Asia","sub-region":"Central Asia"},{"alpha-2":"TV","alpha-3":"TUV","name":"Tuvalu","region":"Oceania","sub-region":"Polynesia"},{"alpha-2":"UG","alpha-3":"UGA","name":"Uganda","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"UA","alpha-3":"UKR","name":"Ukraine","region":"Europe","sub-region":"Eastern Europe"},{"alpha-2":"AE","alpha-3":"ARE","name":"United Arab Emirates","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"GB","alpha-3":"GBR","name":"United Kingdom of Great Britain and Northern Ireland","region":"Europe","sub-region":"Northern Europe"},{"alpha-2":"US","alpha-3":"USA","name":"United States of America","region":"Americas","sub-region":"Northern America"},{"alpha-2":"UY","alpha-3":"URY","name":"Uruguay","region":"Americas","sub-region":"South America"},{"alpha-2":"UZ","alpha-3":"UZB","name":"Uzbekistan","region":"Asia","sub-region":"Central Asia"},{"alpha-2":"VU","alpha-3":"VUT","name":"Vanuatu","region":"Oceania","sub-region":"Melanesia"},{"alpha-2":"VE","alpha-3":"VEN","name":"Venezuela, Bolivarian Republic of","region":"Americas","sub-region":"South America"},{"alpha-2":"VN","alpha-3":"VNM","name":"Viet Nam","region":"Asia","sub-region":"South-eastern Asia"},{"alpha-2":"EH","alpha-3":"ESH","name":"Western Sahara","region":"Africa","sub-region":"Northern Africa"},{"alpha-2":"YE","alpha-3":"YEM","name":"Yemen","region":"Asia","sub-region":"Western Asia"},{"alpha-2":"ZM","alpha-3":"ZMB","name":"Zambia","region":"Africa","sub-region":"Sub-Saharan Africa"},{"alpha-2":"ZW","alpha-3":"ZWE","name":"Zimbabwe","region":"Africa","sub-region":"Sub-Saharan Africa"}]');let m=(e,a)=>e.find(e=>e.iso2===a.toUpperCase()),g=e=>{let a=p.find(a=>a["alpha-3"]===e.toUpperCase());return null==a?void 0:a["alpha-2"]},f=(e,a)=>{if(0===e.length)throw Error("Cannot select country from empty array");if(a<=0)return e[0];let r=Math.random()*a,n=0;for(let a of e)if(r<=(n+=a.totalBirths))return a;return e[e.length-1]},x=(e,a)=>{if(0===a.length)return null;if(e){let r=m(a,e);if(r)return r}return m(a,"US")||a[0]},b="countries",y="country_boundaries",v="country-highlight",w="country-highlight-outline",A=e=>{e.keyboard.disable(),e.doubleClickZoom.disable(),e.scrollZoom.disable(),e.boxZoom.disable(),e.dragPan.disable(),e.dragRotate.disable(),e.touchZoomRotate.disable()},S=e=>{let a=e.getStyle().layers;a&&a.forEach(a=>{let r=a.id.toLowerCase();if(r.startsWith("road-")||r.includes("highway")||r.includes("bridge")||r.includes("tunnel"))try{e.setLayoutProperty(a.id,"visibility","none")}catch(e){}})},N=e=>{let a=e.getStyle().layers;a&&a.forEach(a=>{if("symbol"!==a.type)return;let r=a.id.toLowerCase();if(r.startsWith("place-city-")||r.startsWith("place-town-")||r.startsWith("place-village-")||r.startsWith("settlement-minor-label")||r.startsWith("settlement-major-label")||r.startsWith("settlement-subdivision-label")||r.includes("settlement")&&!r.includes("country"))try{e.setLayoutProperty(a.id,"visibility","none")}catch(e){}})},j=e=>{let a=e.getStyle().layers;a&&a.forEach(a=>{let r=a.id.toLowerCase();if(r.includes("admin-1-boundary")||r.includes("admin-state")||r.includes("boundary-admin-1")||r.includes("admin")&&r.includes("boundary")&&!r.includes("admin-0"))try{e.setLayoutProperty(a.id,"visibility","none")}catch(e){}})},C=(e,a)=>{var r;if(a){e.easeTo({padding:{left:0,right:0,top:0,bottom:0}});return}let n=document.querySelector("#map-boundaries"),t=null!==(r=null==n?void 0:n.offsetWidth)&&void 0!==r?r:0;e.easeTo({padding:{left:t+32,right:0,top:0,bottom:0}})},E=e=>
1{e.setFog({range:[.5,10],"horizon-blend":.1,color:"rgba(255, 255, 255, 0.5 )","high-color":"rgba(0, 0, 0, 0)","space-color":"#F4EEE4","star-intensity":0})},k=e=>{e.getSource(b)||e.addSource(b,{type:"vector",url:"mapbox://mapbox.country-boundaries-v1"});let a=["any",["==","all",["get","worldview"]],["in","US",["get","worldview"]]],r=e=>{if(e)return["all",a,["==",["get","iso_3166_1"],e]]};return e.getLayer(v)||e.addLayer({id:v,type:"fill",source:b,"source-layer":y,paint:{"fill-color":"#F78C51","fill-opacity":.15},filter:["==",["get","iso_3166_1"],""]}),e.getLayer(w)||e.addLayer({id:w,type:"line",source:b,"source-layer":y,paint:{"line-color":"#F78C51","line-width":2},filter:["==",["get","iso_3166_1"],""]}),a=>{var n;let t=null!==(n=r(g(a)||""))&&void 0!==n?n:["==",["get","iso_3166_1"],""];e.setFilter(v,t),e.setFilter(w,t)}},M=e=>new(d()).Map({container:e,style:"mapbox://styles/mapbox/streets-v12",projection:"globe",center:[0,0],zoom:1.75,attributionControl:!1,logoPosition:"bottom-right"}),T=()=>!window.matchMedia("(min-width: 1024px)").matches,L=e=>{let{className:a,onReady:r}=e,i=(0,t.useRef)(null),o=(0,t.useRef)(null),l=(0,t.useRef)(r);return(0,t.useEffect)(()=>{if(!o.current)return;d().accessToken="pk.eyJ1IjoiZ2l2aW5nd2hhdHdlY2FuIiwiYSI6ImNtaG51MHF3dDA0N3cybHFvM2NpMWhiOW8ifQ.zSOZ8surF1jVQZYPZK0Azw";let e=M(o.current);i.current=e,A(e),C(e,T());let a=()=>{S(e),N(e),j(e)};return e.once("style.load",()=>{var r;E(e);let n=k(e);null===(r=l.current)||void 0===r||r.call(l,e,n),setTimeout(()=>{a()},100),requestAnimationFrame(()=>{e.resize()})}),e.once("idle",()=>{a()}),()=>{var e;null===(e=i.current)||void 0===e||e.remove(),i.current=null}},[]),(0,t.useEffect)(()=>{l.current=r},[r]),(0,n.jsx)("div",{className:(0,h.A)("flex h-full w-full",a),children:(0,n.jsx)("div",{ref:o,className:"h-full w-full [&_canvas]:!cursor-default"})})};var I=JSON.parse('{"AE":["United Arab Emirates",[51.58,22.5,56.4,26.06]],"AF":["Afghanistan",[60.53,29.32,75.16,38.49]],"AL":["Albania",[19.3,39.62,21.02,42.69]],"AM":["Armenia",[43.58,38.74,46.51,41.25]],"AO":["Angola",[11.64,-17.93,24.08,-4.44]],"AQ":["Antarctica",[-180,-90,180,-63.27]],"AR":["Argentina",[-73.42,-55.25,-53.63,-21.83]],"AT":["Austria",[9.48,46.43,16.98,49.04]],"AU":["Australia",[113.34,-43.63,153.57,-10.67]],"AZ":["Azerbaijan",[44.79,38.27,50.39,41.86]],"BA":["Bosnia and Herzegovina",[15.75,42.65,19.6,45.23]],"BD":["Bangladesh",[88.08,20.67,92.67,26.45]],"BE":["Belgium",[2.51,49.53,6.16,51.48]],"BF":["Burkina Faso",[-5.47,9.61,2.18,15.12]],"BG":["Bulgaria",[22.38,41.23,28.56,44.23]],"BI":["Burundi",[29.02,-4.5,30.75,-2.35]],"BJ":["Benin",[0.77,6.14,3.8,12.24]],"BN":["Brunei",[114.2,4.01,115.45,5.45]],"BO":["Bolivia",[-69.59,-22.87,-57.5,-9.76]],"BR":["Brazil",[-73.99,-33.77,-34.73,5.24]],"BS":["Bahamas",[-78.98,23.71,-77,27.04]],"BT":["Bhutan",[88.81,26.72,92.1,28.3]],"BW":["Botswana",[19.9,-26.83,29.43,-17.66]],"BY":["Belarus",[23.2,51.32,32.69,56.17]],"BZ":["Belize",[-89.23,15.89,-88.11,18.5]],"CA":["Canada",[-141,41.68,-52.65,73.23]],"CD":["Congo (Kinshasa)",[12.18,-13.26,31.17,5.26]],"CF":["Central African Republic",[14.46,2.27,27.37,11.14]],"CG":["Congo (Brazzaville)",[11.09,-5.04,18.45,3.73]],"CH":["Switzerland",[6.02,45.78,10.44,47.83]],"CI":["Ivory Coast",[-8.6,4.34,-2.56,10.52]],"CL":["Chile",[-75.64,-55.61,-66.96,-17.58]],"CM":["Cameroon",[8.49,1.73,16.01,12.86]],"CN":["China",[73.68,18.2,135.03,53.46]],"CO":["Colombia",[-78.99,-4.3,-66.88,12.44]],"CR":["Costa Rica",[-85.94,8.23,-82.55,11.22]],"CU":["Cuba",[-84.97,19.86,-74.18,23.19]],"CY":["Cyprus",[32.26,34.57,34,35.17]],"CZ":["Czech Republic",[12.24,48.56,18.85,51.12]],"DE":["Germany",[5.99,47.3,15.02,54.98]],"DJ":["Djibouti",[41.66,10.93,43.32,12.7]],"DK":["Denmark",[8.09,54.8,12.69,57.73]],"DO":["Dominican Republic",[-71.95,17.6,-68.32,19.88]],"DZ":["Algeria",[-8.68,19.06,12,37.12]],"EC":["Ecuador",[-80.97,-4.96,-75.23,1.38]],"EE":["Estonia",[23.34,57.47,28.13,59.61]],"EG":["Egypt",[24.7,22,36.87,31.59]],"ER":["Eritrea",[36.32,12.46,43.08,18]],"ES":["Spain",[-9.39,35.95,3.04,43.75]],"ET":["Ethiopia",[32.95,3.42,47.79,14.96]],"FI":["Finland",[20.65,59.85,31.52,70.16]],"FJ":["Fiji",[-180,-18.29,180,-16.02]],"FK":["Falkland Islands",[-61.2,-52.3,-57.75,-51.1]],"FR":["France",[-5,42.5,9.56,51.15]],"GA":["Gabon",[8.8,-3.98,14.43,2.33]],"GB":["United Kingdom",[-7.57,49.96,1.68,58.64]],"GE":["Georgia",[39.96,41.06,46.64,43.55]],"GH":["Ghana",[-3.24,4.71,1.06,11.1]],"GL":["Greenland",[-73.3,60.04,-12.21,83.65]],"GM":["Gambia",[-16.84,13.13,-13.84,13.88]],"GN":["Guinea",[-15.13,7.31,-7.83,12.59]],"GQ":["Equatorial Guinea",[9.31,1.01,11.29,2.28]],"GR":["Greece",[20.15,34.92,26.6,41.83]],"GT":["Guatemala",[-92.23,13.74,-88.23,17.82]],"GW":["Guinea Bissau",[-16.68,11.04,-13.7,12.63]],"GY":["Guyana",[-61.41,1.27,-56.54,8.37]],"HN":["Honduras",[-89.35,12.98,-83.15,16.01]],"HR":["Croatia",[13.66,42.48,19.39,46.5]],"HT":["Haiti",[-74.46,18.03,-71.62,19.92]],"HU":["Hungary",[16.2,45.76,22.71,48.62]],"ID":["Indonesia",[95.29,-10.36,141.03,5.48]],"IE":["Ireland",[-9.98,51.67,-6.03,55.13]],"IL":["Israel",[34.27,29.5,35.84,33.28]],"IN":["India",[68.18,7.97,97.4,35.49]],"IQ":["Iraq",[38.79,29.1,48.57,37.39]],"IR":["Iran",[44.11,25.08,63.32,39.71]],"IS":["Iceland",[-24.33,63.5,-13.61,66.53]],"IT":["Italy",[6.75,36.62,18.48,47.12]],"JM":["Jamaica",[-78.34,17.7,-76.2,18.52]],"JO":["Jordan",[34.92,29.2,39.2,33.38]],"JP":["Japan",[129.41,31.03,145.54,45.55]],"KE":["Kenya",[33.89,-4.68,41.86,5.51]],"KG":["Kyrgyzstan",[69.46,39.28,80.26,43.3]],"KH":["Cambodia",[102.35,10.49,107.61,14.57]],"KP":["North Korea",[124.27,37.67,130.78,42.99]],"KR":["South Korea",[126.12,34.39,129.47,38.61]],"KW":["Kuwait",[46.57,28.53,48.42,30.06]],"KZ":["Kazakhstan",[46.47,40.66,87.36,55.39]],"LA":["Laos",[100.12,13.88,107.56,22.46]],"LB":["Lebanon",[35.13,33.09,36.61,34.64]],"LK":["Sri Lanka",[79.7,5.97,81.79,9.82]],"LR":["Liberia",[-11.44,4.36,-7.54,8.54]],"LS":["Lesotho",[27,-30.65,29.33,-28.65]],"LT":["Lithuania",[21.06,53.91,26.59,56.37]],"LU":["Luxembourg",[5.67,49.44,6.24,50.13]],"LV":["Latvia",[21.06,55.62,28.18,57.97]],"LY":["Libya",[9.32,19.58,25.16,33.14]],"MA":["Morocco",[-1
17.02,21.42,-1.12,35.76]],"MD":["Moldova",[26.62,45.49,30.02,48.47]],"ME":["Montenegro",[18.45,41.88,20.34,43.52]],"MG":["Madagascar",[43.25,-25.6,50.48,-12.04]],"MK":["Macedonia",[20.46,40.84,22.95,42.32]],"ML":["Mali",[-12.17,10.1,4.27,24.97]],"MM":["Myanmar",[92.3,9.93,101.18,28.34]],"MN":["Mongolia",[87.75,41.6,119.77,52.05]],"MR":["Mauritania",[-17.06,14.62,-4.92,27.4]],"MW":["Malawi",[32.69,-16.8,35.77,-9.23]],"MX":["Mexico",[-117.13,14.54,-86.81,32.72]],"MY":["Malaysia",[100.09,0.77,119.18,6.93]],"MZ":["Mozambique",[30.18,-26.74,40.78,-10.32]],"NA":["Namibia",[11.73,-29.05,25.08,-16.94]],"NC":["New Caledonia",[164.03,-22.4,167.12,-20.11]],"NE":["Niger",[0.3,11.66,15.9,23.47]],"NG":["Nigeria",[2.69,4.24,14.58,13.87]],"NI":["Nicaragua",[-87.67,10.73,-83.15,15.02]],"NL":["Netherlands",[3.31,50.8,7.09,53.51]],"NO":["Norway",[4.99,58.08,31.29,70.92]],"NP":["Nepal",[80.09,26.4,88.17,30.42]],"NZ":["New Zealand",[166.51,-46.64,178.52,-34.45]],"OM":["Oman",[52,16.65,59.81,26.4]],"PA":["Panama",[-82.97,7.22,-77.24,9.61]],"PE":["Peru",[-81.41,-18.35,-68.67,-0.06]],"PG":["Papua New Guinea",[141,-10.65,156.02,-2.5]],"PH":["Philippines",[117.17,5.58,126.54,18.51]],"PK":["Pakistan",[60.87,23.69,77.84,37.13]],"PL":["Poland",[14.07,49.03,24.03,54.85]],"PR":["Puerto Rico",[-67.24,17.95,-65.59,18.52]],"PS":["West Bank",[34.93,31.35,35.55,32.53]],"PT":["Portugal",[-9.53,36.84,-6.39,42.28]],"PY":["Paraguay",[-62.69,-27.55,-54.29,-19.34]],"QA":["Qatar",[50.74,24.56,51.61,26.11]],"RO":["Romania",[20.22,43.69,29.63,48.22]],"RS":["Serbia",[18.83,42.25,22.99,46.17]],"RU":["Russia",[-180,41.15,180,81.25]],"RW":["Rwanda",[29.02,-2.92,30.82,-1.13]],"SA":["Saudi Arabia",[34.63,16.35,55.67,32.16]],"SB":["Solomon Islands",[156.49,-10.83,162.4,-6.6]],"SD":["Sudan",[21.94,8.62,38.41,22]],"SE":["Sweden",[11.03,55.36,23.9,69.11]],"SI":["Slovenia",[13.7,45.45,16.56,46.85]],"SK":["Slovakia",[16.88,47.76,22.56,49.57]],"SL":["Sierra Leone",[-13.25,6.79,-10.23,10.05]],"SN":["Senegal",[-17.63,12.33,-11.47,16.6]],"SO":["Somalia",[40.98,-1.68,51.13,12.02]],"SR":["Suriname",[-58.04,1.82,-53.96,6.03]],"SS":["South Sudan",[23.89,3.51,35.3,12.25]],"SV":["El Salvador",[-90.1,13.15,-87.72,14.42]],"SY":["Syria",[35.7,32.31,42.35,37.23]],"SZ":["Swaziland",[30.68,-27.29,32.07,-25.66]],"TD":["Chad",[13.54,7.42,23.89,23.41]],"TF":["French Southern Territories",[68.72,-49.78,70.56,-48.63]],"TG":["Togo",[-0.05,5.93,1.87,11.02]],"TH":["Thailand",[97.38,5.69,105.59,20.42]],"TJ":["Tajikistan",[67.44,36.74,74.98,40.96]],"TL":["East Timor",[124.97,-9.39,127.34,-8.27]],"TM":["Turkmenistan",[52.5,35.27,66.55,42.75]],"TN":["Tunisia",[7.52,30.31,11.49,37.35]],"TR":["Turkey",[26.04,35.82,44.79,42.14]],"TT":["Trinidad and Tobago",[-61.95,10,-60.9,10.89]],"TW":["Taiwan",[120.11,21.97,121.95,25.3]],"TZ":["Tanzania",[29.34,-11.72,40.32,-0.95]],"UA":["Ukraine",[22.09,44.36,40.08,52.34]],"UG":["Uganda",[29.58,-1.44,35.04,4.25]],"US":["United States",[-125,25,-66.96,49.5]],"UY":["Uruguay",[-58.43,-34.95,-53.21,-30.11]],"UZ":["Uzbekistan",[55.93,37.14,73.06,45.59]],"VE":["Venezuela",[-73.3,0.72,-59.76,12.16]],"VN":["Vietnam",[102.17,8.6,109.34,23.35]],"VU":["Vanuatu",[166.63,-16.6,167.84,-14.63]],"YE":["Yemen",[42.6,12.59,53.11,19]],"ZA":["South Africa",[16.34,-34.82,32.83,-22.09]],"ZM":["Zambia",[21.89,-17.96,33.49,-8.24]],"ZW":["Zimbabwe",[25.26,-22.27,32.85,-15.51]]}');let R=e=>{let a=g(e);if(!a)return null;let r=I[a];if(!r)return null;let[,n]=r;return n},B=function(){var e;let a=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a||"undefined"==typeof document)return 0;let r=document.querySelector("#map-boundaries");return null!==(e=null==r?void 0:r.offsetWidth)&&void 0!==e?e:0},P=function(e,a){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],[n,t,i,o]=a,l=B(r);e.fitBounds([[n,t],[i,o]],{padding:r?{left:40,right:40,top:60,bottom:60}:{left:l+250,right:0,top:300,bottom:300},duration:4e3,essential:!0,pitch:r?10:20})},W=(e,a)=>{let r=e-a;for(;r<0;)r+=360;for(;r>=360;)r-=360;return e-(r+1440)},U=(e,a,r,n,t)=>{let i=W(e.getCenter().lng,a);e.easeTo({center:{lng:i,lat:r},duration:4e3,easing:e=>1-Math.pow(1-e,3),essential:!0}),t(n,3750)}
1,O=function(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise(r=>{let n=B(a),t=()=>{e.off("moveend",t),r()};e.once("moveend",t),e.easeTo({zoom:a?1.5:1.75,pitch:0,padding:{left:a?0:n+32,right:0,top:0,bottom:0},duration:1500,essential:!0})})},G=function(e,a,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],t=R(a);if(!t)return null;let[i,o,l,s]=t,c=(i+l)/2,u=(o+s)/2,d=()=>{P(e,t,n)};return{fitBounds:d,startInitialSpin:()=>{U(e,c,u,d,r)}}};var D=r(39754);let F=e=>{(0,D.L9)("Birth Lottery Globe Spun",e)},_=()=>{let e=(0,t.useRef)(new Set),a=(0,t.useCallback)(()=>{e.current.forEach(e=>{window.clearTimeout(e)}),e.current.clear()},[]),r=(0,t.useCallback)((a,r)=>{let n=window.setTimeout(()=>{e.current.delete(n),a()},r);e.current.add(n)},[]);return(0,t.useEffect)(()=>()=>{a()},[a]),{clearScheduledTimeouts:a,scheduleTimeout:r}},z=e=>{let a=(0,t.useRef)({isActive:!1,shouldRotate:!0}),r=(0,t.useCallback)(()=>{let r=e.current;if(!r||!a.current.shouldRotate)return;a.current.listener&&r.off("moveend",a.current.listener),a.current.animationFrameId&&(window.cancelAnimationFrame(a.current.animationFrameId),a.current.animationFrameId=void 0),a.current.isActive=!0;let n=()=>{if(!a.current.isActive)return;let e=r.getCenter(),n=(e.lng-.03+540)%360-180;r.easeTo({center:{lng:n,lat:e.lat},duration:1e3,easing:e=>e})},t=()=>{a.current.isActive&&(a.current.animationFrameId=window.requestAnimationFrame(n))};a.current.listener=t,r.on("moveend",t),a.current.animationFrameId=window.requestAnimationFrame(n)},[e]),n=(0,t.useCallback)(()=>{a.current.shouldRotate=!1,a.current.isActive=!1,a.current.animationFrameId&&(window.cancelAnimationFrame(a.current.animationFrameId),a.current.animationFrameId=void 0);let r=e.current;r&&(a.current.listener&&(r.off("moveend",a.current.listener),a.current.listener=void 0),r.stop())},[e]);return(0,t.useEffect)(()=>()=>{n()},[n]),{startRotation:r,stopRotation:n}};var Z=r(70824),H=r(14932);let K=()=>(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("p",{className:"text-sm text-subtle",children:"With data from:"}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-6",children:[(0,n.jsx)(o(),{src:"/birth-lottery/logos/our-world-in-data.webp",alt:"Our World in Data",width:120,height:40,className:"h-10 w-auto grayscale opacity-50"}),(0,n.jsx)(o(),{src:"/birth-lottery/logos/world-bank.webp",alt:"World Bank",width:120,height:40,className:"h-10 w-auto grayscale opacity-50"})]})]}),V=e=>Math.round(e/525600),Y=e=>{let{onSpinClick:a,onMethodologyClick:r,isLoading:i=!1,allCountries:o,totalBirths:l}=e,s=V(l),[c,u]=(0,t.useState)({visible:null,preloading:null});return(0,t.useEffect)(()=>{if(!i){u({visible:null,preloading:null});return}let e=()=>{let e=Math.floor(Math.random()*o.length);return o[e]};u({visible:e(),preloading:e()});let a=setInterval(()=>{u(a=>({visible:a.preloading,preloading:e()}))},300);return()=>clearInterval(a)},[i,o]),(0,n.jsx)("div",{className:"h-full lg:h-auto lg:my-auto lg:space-y-4 lg:pr-16 flex flex-col",children:(0,n.jsxs)("div",{className:"pointer-events-auto w-full max-w-4xl flex flex-col relative bg-primary shadow-lg h-full lg:h-auto overflow-visible",children:[(0,n.jsx)("div",{className:"absolute -top-[6px] left-0 right-0 h-[12px] overflow-hidden z-10",style:{backgroundImage:"radial-gradient(circle at 50% 0%, transparent 6px, white 6px)",backgroundSize:"20px 20px",backgroundRepeat:"repeat-x",backgroundPosition:"0 0"}}),(0,n.jsxs)("div",{className:"relative flex-1 lg:flex-none flex flex-col overflow-y-auto min-h-0 px-4 py-5 lg:px-12 lg:py-16 lg:pr-12",children:[i?(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[200px] gap-8 pt-6 lg:pt-0",children:[(0,n.jsx)("div",{className:"text-2xl font-medium",children:"Finding country..."}),c.visible&&(0,n.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,n.jsxs)("div",{className:"relative flex flex-col items-center gap-3 p-6 bg-subtle rounded-lg",children:[(0,n.jsx)(Z.W,{countryCode:c.visible.iso2,height:48,className:"shrink-0"}),c.preloading&&(0,n.jsx)(Z.W,{countryCode:c.preloading.iso2,height:48,className:"absolute opacity-0 pointer-events-none",fetchPriority:"low"})]}),(0,n.jsx)("span",{className:"text-sm opacity-50",children:c.visible.name})]}),(0,n.jsx)("div",{className:"text-md text-subtle opacity-50",children:"Based on real global birth data"})]}):(0,n.jsxs)("div",{className:"space-y-4 lg:space-y-8 pt-6 lg:pt-0",children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("div",{className:"text-sm lg:text-lg lg:mb-2 font-medium uppercase tracking-wider text-orange-primary",children:"Birth Lottery"}),(0,n.jsxs)("h1",{className:"text-2xl lg:text-3xl xl:text-4xl font-bold !leading-[120%]",children:["If you were born again,",(0,n.jsx)("br",{}),"how would your life change?"]}),(0,n.jsxs)("div",{className:"text-base lg:text-lg text-subtle",children:["If you were one of the ",s," people born this minute, where would you land? What opportunities would you get? And how much of your life comes down to chance?"]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-3 lg:gap-6 sm:flex-row sm:items-center",children:[(0,n.jsx)(H.z,{level:"primary",size:"large",onClick:a,className:"w-full sm:w-auto",children:"Spin the globe"}),(0,n.jsx)(H.z,{level:"tertiary",size:"large",onClick:r,className:"w-full sm:w-auto",children:"Methodology"})]}),(0,n.jsx)("div",{className:"hidden lg:block",children:(0,n.jsx)(K,{})})]}),(0,n.jsx)("div",{className:"hidden lg:block absolute -bottom-[6px] left-0 right-0 h-[12px] overflow-hidden",style:{backgroundImage:"radial-gradient(circle at 50% 0%, transparent 6px, white 6px)",backgroundSize:"20px 20px",backgroundRepeat:"repeat-x",backgroundPosition:"0 0",transform:"rotate(180deg)"}})]})]})})};var J=r(15538),$=r(31355);r(34406);let q=[{id:"lifeExpectancy",owidSlug:"life-expectancy",owidShortName:"life_expectancy_0",metricType:"positive",name:"Life Expectancy",description:"How long a person born today can expect to live.",longDescription:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:"This is âperiod life expectancyâ: the average number of years a person born in a given year would live if they experienced the same chances of dying at each age as people did that year."}),(0,n.jsx)("p",{children:"It represents the average lifespan for a hypothetical group of people, if they experienced the same age-specific death rates throughout their whole lives as the age-specific death rates seen in that particular year."}),(0,n.jsxs)("p",{className:"mt-2",children:["Learn more:",(0,n.jsxs)("ul",{className:"list-disc pl-6",children:[(0,n.jsx)("li",{children:(0,n.jsx)(c.r,{href:"https://ourworldindata.org/life-expectancy-how-is-it-calculated-and-how-should-it-be-interpreted",newTab:!0,external:!0,className:"text-inherit",children:"Life expectancy â what does this actually mean?"})}),(0,n.jsx)("li",{children:(0,n.jsx)(c.r,{href:"https://ourworldindata.org/period-versus-cohort-measures-whats-the-difference",newTab:!0,external:!0,className:"text-inherit",children:"Period versus cohort measures"})})]})]})]}
1),unit:"years",source:"Riley (2005); Zijdeman et al. (2015); HMD (2025); UN WPP (2024) â with major processing by Our World in Data",lastUpdated:"2025-10-22",originalChartUrl:"https://ourworldindata.org/grapher/life-expectancy",thresholds:{low:60,high:75}},{id:"childMortality",owidSlug:"child-mortality",owidShortName:"child_mortality_rate",metricType:"negative",name:"Child Mortality",description:"Percentage of children who die before age 5.",longDescription:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:"Estimated share of newborns who die before reaching the age of five."}),(0,n.jsx)("p",{className:"mt-2",children:"This indicator is calculated as the number of children under the age of five who died in a given year, divided by the number of newborns in that year."})]}),unit:"%",source:"Gapminder (2015); UN Inter-agency Group for Child Mortality Estimation (2025) â processed by Our World in Data",lastUpdated:"2025-04-25",originalChartUrl:"https://ourworldindata.org/grapher/child-mortality",thresholds:{low:5,high:2}},{id:"dailyIncome",owidSlug:"daily-median-income",owidShortName:"median__ppp_version_2021__poverty_line_no_poverty_line__welfare_type_income_or_consumption__table_income_or_consumption_consolidated__survey_comparability_no_spells",metricType:"positive",name:"Median Income",description:"Typical income, adjusted for purchasing power.",longDescription:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:"This data uses international dollars at 2021 prices to adjust for inflation and cost-of-living differences between countries. Depending on the country and year, it relates to income (measured after taxes and benefits) or to consumption, per capita."}),(0,n.jsxs)("p",{className:"mt-2",children:["Learn more:"," ",(0,n.jsx)(c.r,{href:"https://ourworldindata.org/international-dollars",newTab:!0,external:!0,className:"text-inherit",children:"What are international dollars?"})]})]}),unit:"$",source:"World Bank Poverty and Inequality Platform (2025) â with major processing by Our World in Data",lastUpdated:"2025-10-09",originalChartUrl:"https://ourworldindata.org/grapher/daily-median-income",thresholds:{low:10,high:50}},{id:"educationYears",owidSlug:"expected-years-of-schooling",owidShortName:"eys__sex_total",metricType:"positive",name:"Expected Years of Schooling",description:"How many years a child can expect to spend in school.",longDescription:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:"This estimates how many years of education a child starting school today will complete, based on current enrollment rates at each grade level."}),(0,n.jsx)("p",{className:"mt-2",children:"Higher values indicate that children typically stay in school longer. The measure includes time spent repeating grades."})]}),unit:"years",source:"UNDP, Human Development Report (2025) â with minor processing by Our World in Data",lastUpdated:"2025-05-07",originalChartUrl:"https://ourworldindata.org/grapher/expected-years-of-schooling",thresholds:{low:10,high:16}},{id:"passportPower",owidSlug:"",owidShortName:"",metricType:"positive",name:"Passport Power",description:"Countries you can visit without a prior visa.",longDescription:(0,n.jsx)("p",{children:"The number of countries a passport holder can access without a pre-approved visa. Includes visa-free entry, visa on arrival, eTA, and simplified eVisas issued within 3 days. This reflects global mobility and diplomatic relationships between countries."}),unit:"countries",source:"Passport Index (passportindex.org)",sourceYear:"2025",lastUpdated:"2025-01-12",originalChartUrl:"https://www.passportindex.org/byRank.php",thresholds:{low:50,high:150}},{id:"democraticIndex",owidSlug:"democracy-index-eiu",owidShortName:"democracy_eiu",metricType:"positive",name:"Democracy Index",description:"How free elections are and how well government represents people.",longDescription:(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("p",{children:"Expert estimate of the extent to which citizens can choose their political leaders in free and fair elections, enjoy civil liberties, prefer democracy over other political systems, can and do participate in politics, and have a functioning government that acts on their behalf. The index ranges from 0 to 10 (most democratic)."})}),unit:"",source:"Economist Intelligence Unit (2006â2024) â processed by Our World in Data",lastUpdated:"2025-03-05",originalChartUrl:"https://ourworldindata.org/grapher/democracy-index-eiu",thresholds:{low:4,high:7}}];var Q=r(89990);let X=e=>{let{onClick:a,children:r,iconSize:t="medium",className:i="",iconClassName:o=""}=e;return(0,n.jsxs)("button",{onClick:a,className:(0,h.A)("flex items-center gap-1 transition-opacity cursor-pointer group",i),children:[r,(0,n.jsx)(Q.Z,{className:(0,h.A)("opacity-50 flex-shrink-0 group-hover:opacity-100 transition-opacity",{small:"w-3 h-3",medium:"w-4 h-4",large:"w-3.5 h-3.5"}[t],o)})]})},ee=(e,a)=>
1null==e?"N/A":"USD"===a?"$".concat(e.toLocaleString("en-US",{maximumFractionDigits:0})):"$"===a?"$".concat((30.4*e).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})):"years"===a?e.toFixed(1):"%"===a?e.toFixed(2):"per 100k births"===a?e.toFixed(0):"per 100k"===a?e.toLocaleString("en-US",{maximumFractionDigits:0}):"countries"===a?e.toFixed(0):e.toString(),ea=e=>"USD"===e?"":"$"===e?"/month":"years"===e?"years":"%"===e?"%":"per 100k births"===e?"/100k births":"per 100k"===e?"per 100k":"countries"===e?"countries":e,er=e=>"democraticIndex"===e?{min:0,max:10}:null,en=(e,a,r)=>a===r?5.5:1+(e-a)/(r-a)*9,et=(e,a)=>{let r=e.measurements.hdi,n=a.measurements.hdi;if(!r||!n)return"A different starting point";if(e.id===a.id)return"The lottery gave you⦠your own life";let t=n-r;return t>.25?"A much harder starting point":t>.06?"A harder starting point":t>.02?"A slightly harder starting point":t>=-.02?"A similar starting point":t>=-.06?"A slightly easier starting point":t>=-.25?"An easier starting point":"A much easier starting point"},ei=(e,a)=>{if(null==e||null==a)return null;let r=Math.abs(e-a);if(r<.2)return null;let n=Math.round(e),t=Math.round(a);return n!==t&&Math.abs(n-t)===Math.round(r)?{lottery:String(n),user:String(t)}:{lottery:e.toFixed(1),user:a.toFixed(1)}},eo=(e,a)=>{let r=e.measurements.hdi,n=a.measurements.hdi;if(!r||!n)return null;if(e.id===a.id)return"These numbers already shape your daily reality.";let t=n-r,i=e.measurements.lifeExpectancy,o=a.measurements.lifeExpectancy,l=e.measurements.educationYears,s=a.measurements.educationYears,c=e.measurements.dailyIncome,u=a.measurements.dailyIncome,d=null!=i&&null!=o?Math.round(Math.abs(i-o)):null,h=null!=c&&null!=u&&c>0&&u>0?t>0?Math.round(u/c):Math.round(c/u):null,p=ei(l,s);if(t>=-.05&&t<=.05)return"On average your life would be roughly similarâcomparable lifespans, education levels, and purchasing power.";if(t>.05&&t<=.15){let e=null!=d&&d>=2?"about ".concat(d," years shorter"):null,a=p?"roughly ".concat(p.lottery," years of schooling vs. ").concat(p.user):null,r=null!=h&&h>=2?"average income around ".concat(h,"\xd7 lower"):null,n=[];if(e)n.push(e),a&&n.push("with ".concat(a)),r&&(a?n.push("and ".concat(r)):n.push("with ".concat(r)));else{if(a&&r)return"On average your life would be characterised by ".concat(a," and ").concat(r,". These are averagesâindividual lives vary enormously.");if(a)return"On average your life would be characterised by ".concat(a,". These are averagesâindividual lives vary enormously.");if(r)return"On average your life would be characterised by ".concat(r,". These are averagesâindividual lives vary enormously.")}return 0===n.length?"On average your life would face modestly fewer resourcesâthough individual outcomes vary widely.":"On average your life would be ".concat(n.join(", "),". These are averagesâindividual lives vary enormously.")}if(t<-.05&&t>=-.15){let e=null!=d&&d>=2?"about ".concat(d," years longer"):null,a=p?"roughly ".concat(p.lottery," years of schooling vs. ").concat(p.user):null,r=null!=h&&h>=2?"average income around ".concat(h,"\xd7 higher"):null,n=[];if(e)n.push(e),a&&n.push("with ".concat(a)),r&&(a?n.push("and ".concat(r)):n.push("with ".concat(r)));else{if(a&&r)return"On average your life would be characterised by ".concat(a," and ").concat(r,". These are averagesâindividual lives vary enormously.");if(a)return"On average your life would be characterised by ".concat(a,". These are averagesâindividual lives vary enormously.");if(r)return"On average your life would be characterised by ".concat(r,". These are averagesâindividual lives vary enormously.")}return 0===n.length?"On average your life would have modestly more resourcesâthough individual outcomes vary widely.":"On average your life would be ".concat(n.join(", "),". These are averagesâindividual lives vary enormously.")}if(Math.abs(t)>.15){let e=t>0,a=null!=d&&d>=2?"around ".concat(d," years ").concat(e?"shorter":"longer"):e?"somewhat shorter":"somewhat longer",r=p?", with ".concat(p.lottery," years of schooling instead of ").concat(p.user):"",n=null!=h&&h>=2?"".concat(r?", and":", with"," income around ").concat(h,"\xd7 ").concat(e?"lower":"higher","âeven after adjusting for local prices"):"",i="On average your life would be ".concat(a).concat(r).concat(n,".");return Math.abs(t)>.25?e?"".concat(i," ").concat(r||n?"These gaps shape nearly every aspect of daily life.":"This gap shapes nearly every aspect of daily life."):"".concat(i," This level of baseline security is rare globally."):i}return"On average your life would differ in human development, affecting life expectancy, education, and income."},el={low:"#f14913",medium:"#fbaf00",high:"#43c770"},es=(e,a,r)=>a===r?50:(e-a)/(r-a)*100,ec=(e,a,r,n,t)=>{if(r===n)return el.medium;if(a){let i=Math.max(r,Math.min(n,a.low)),o=Math.max(r,Math.min(n,a.high)),[l,s]=i<=o?[i,o]:[o,i];return e<=l?"positive"===t?el.low:el.high:e>=s?"positive"===t?el.high:el.low:el.medium}let i=(e-r)/(n-r);return"positive"===t?i<.33?el.low:i>.66?el.high:el.medium:i>.66?el.low:i<.33?el.high:el.medium},eu=e=>{var a;let{value:r,min:i,max:o,indicator:l,originalValue:s,originalMin:c,originalMax:u,comparisonValue:d,comparisonCountryId:h,showValue:p=!0}=e,m=es(s,0,u),f=null!==er(l.id)&&"democraticIndex"!==l.id,x=f?r:s,b=f?x.toFixed(1):ee(s,l.unit),y=f?"":ea(l.unit),v=void 0!==d?es(d,0,u):null,w=void 0!==d?f?en(d,c,u).toFixed(1):ee(d,l.unit):null,A=void 0!==d&&null!==w?f?"democraticIndex"===l.id?"":["years","countries","%"].includes(l.unit)?ea(l.unit):"":ea(l.unit):null,S=(0,t.useMemo)(()=>ec(s,l.thresholds,c,u,l.metricType),[s,l.thresholds,c,u,l.metricType]);return(0,n.jsxs)("div",{className:p?"flex shrink-0 flex-col items-end gap-2 min-w-[180px]":"w-full",children:[p&&(0,n.jsxs)("div",{className:"flex items-baseline gap-1",children:[(0,n.jsx)("span",{className:"text-xl font-semibold font-heading",children:b}),y&&(0,n.jsx)("span",{className:"text-sm opacity-60",children:y})]}),(0,n.jsxs)("div",{className:"relative w-full h-2 rounded-full overflow-visible bg-emphasized",children:[(0,n.jsx)("div",{className:"absolute inset-0 rounded-full transition-all",style:{width:"max(4px, ".concat(m>=0&&m<.5?.5:Math.max(0,m),"%)"),backgroundColor:S}}),null!==v&&(0,n.jsxs)("div",{className:"absolute top-1/2 transition-all",style:{left:"clamp(0px, ".concat(v,"%, 100%)"),transform:"translate(-50%, -50%)"},children:[h&&(0,n.jsx)("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-0.5 whitespace-nowrap text-center",children:(0,n.jsxs)("div",{className:"text-[9px] text-subtle font-semibold flex items-center gap-1 justify-center",children:[(0,n.jsx)(Z.W,{countryCode:null!==(a=g(h))&&void 0!==a?a:"",height:8,className:"relative -top-px"}),(0,n.jsx)("span",{children:h})]})}),(0,n.jsx)("div",{className:"w-0.5 h-3 bg-inverted opacity-25 rounded-full shadow-md"}),w&&(0,n.jsx)("div",{className:"absolute top-full left-1/2 -translate-x-1/2 mt-0.5 whitespace-nowrap text-center",children:(0,n.jsxs)("div",{className:"text-[9px] text-subtle opacity-80 flex items-baseline gap-0.5 justify-center",children:[(0,n.jsx)("span",{children:w}),A&&(0,n.jsx)("span",{children:A})]})})]})]})]})};var ed=r(52520);let eh=e=>(0,ed.TO)(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}
1),ep=e=>e.split("; ").map(e=>e.trim());var em=r(78887),eg=r(51942),ef=r(86786);let ex=(e,a)=>{let r=a.map(a=>a.measurements[e]).filter(e=>null!=e);return 0===r.length?null:{min:Math.min(...r),max:Math.max(...r)}},eb=(e,a)=>{if("dailyIncome"===a&&e.includes("adjusted for purchasing power")){let a=e.split("adjusted for purchasing power");return(0,n.jsxs)(n.Fragment,{children:[a[0],(0,n.jsx)(em.w,{label:(0,n.jsx)(eg.uT,{className:"text-sm",children:"The median income accounts for differences in cost of living between countries using 2021 international dollars. If $1 buys three times as many goods and services in country A as it does in the United States, we multiply country A's median income by 3. This means someone earning $1 per day in country A would have their income recorded as $3 in international dollars, reflecting their actual purchasing power."}),triggerEvent:"hover",children:(0,n.jsx)("span",{className:"underline decoration-dotted cursor-help",children:"adjusted for purchasing power"})}),a[1]]})}return e},ey=e=>{let{selectedCountry:a,comparisonCountry:r,allCountries:i,owidMetadata:o}=e,[l,s]=(0,t.useState)(null),c=(0,t.useMemo)(()=>{let e={};return q.forEach(a=>{let r=ex(a.id,i);r&&(e[a.id]=r)}),e},[i]);return(0,n.jsx)("div",{className:"w-full rounded-b-3xl pt-6 pb-8 bg-primary text-primary border border-primary border-t-0",children:(0,n.jsx)("div",{className:"space-y-0",children:q.map((e,i)=>{var u,d,h,p;let m=a.measurements[e.id],g=c[e.id],f=er(e.id),x=f||g;return(0,n.jsxs)("div",{children:[i>0&&(0,n.jsx)("div",{className:"mt-7 mb-6 border-t border-primary"}),(0,n.jsxs)("div",{className:"flex flex-col gap-4 px-6",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-6",children:[(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)(X,{onClick:()=>s(e.id),className:"text-left",children:(0,n.jsx)("div",{className:"text-lg font-medium",children:e.name})}),(0,n.jsx)("div",{className:"text-sm opacity-70 ",children:eb(e.description,e.id)}),(0,n.jsx)(ef.u,{open:l===e.id,onClose:()=>s(null),title:e.name,children:(0,n.jsxs)("div",{className:"space-y-5 pt-6",children:[(0,n.jsx)(eg.uT,{children:e.longDescription}),((null===(u=o[e.id])||void 0===u?void 0:u.source)||e.source)&&(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"flex flex-wrap items-center gap-x-2 opacity-50 text-sm",children:ep((null===(d=o[e.id])||void 0===d?void 0:d.source)||e.source).map((a,r)=>{var i;return(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)("span",{children:a}),r<ep((null===(i=o[e.id])||void 0===i?void 0:i.source)||e.source).length-1&&(0,n.jsx)("span",{children:"\xb7"})]},r)})})}),(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 sm:gap-8 items-start sm:items-center",children:[a.measurementYears[e.id]&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500 uppercase",children:"Data Year"}),(0,n.jsx)(eg.uT,{className:"text-sm",children:a.measurementYears[e.id]})]}),((null===(h=o[e.id])||void 0===h?void 0:h.lastUpdated)||e.lastUpdated)&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500 uppercase ",children:"Last Updated"}),(0,n.jsx)(eg.uT,{className:"text-sm",children:eh((null===(p=o[e.id])||void 0===p?void 0:p.lastUpdated)||e.lastUpdated||"")})]}),e.originalChartUrl&&(0,n.jsx)("div",{className:"sm:ml-auto",children:(0,n.jsxs)("a",{href:e.originalChartUrl,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline text-sm inline-flex items-center gap-1",children:["View original chart",(0,n.jsx)($.Z,{className:"w-4 h-4"})]})})]})]})})]}),x&&void 0!==m?(0,n.jsx)("div",{className:"flex shrink-0 flex-col items-end gap-2 ",children:(0,n.jsxs)("div",{className:"flex items-baseline gap-1",children:[(0,n.jsx)("span",{className:"text-xl font-semibold font-heading",children:f&&"democraticIndex"!==e.id?en(m,x.min,x.max).toFixed(1):ee(m,e.unit)}),!f&&(0,n.jsx)("span",{className:"text-sm opacity-60",children:ea(e.unit)})]})}):(0,n.jsx)("div",{className:"flex shrink-0 flex-col items-end text-right",children:(0,n.jsx)("div",{className:"text-lg text-black opacity-30",children:"N/A"})})]}),x&&void 0!==m&&(0,n.jsx)(eu,{value:en(m,x.min,x.max),min:1,max:10,indicator:e,originalValue:m,originalMin:x.min,originalMax:x.max,comparisonValue:r.measurements[e.id],comparisonCountryId:r.id,showValue:!1})]})]},e.id)})})})};var ev=r(20602);let ew={descriptionShort:"The Human Development Index (HDI) is a summary measure of key dimensions of human development: a long and healthy life, a good education, and a decent standard of living.",originalChartUrl:"https://ourworldindata.org/grapher/human-development-index"},eA=e=>e>
1=.8?{tier:"Very High",color:"#43c770"}:e>=.7?{tier:"High",color:"#fbaf00"}:e>=.55?{tier:"Medium",color:"#fbaf00"}:{tier:"Low",color:"#f14913"},eS=e=>{if(!e)return"#F4EEE4";let a=eA(e);switch(a.tier){case"Very High":return"#F3FBF5";case"High":return"#FFF5EC";case"Medium":return"#FFF4E6";case"Low":return"#FAEAE9";default:return a.tier,"#F4EEE4"}},eN=e=>{let{hdi:a,onHDIClick:r}=e,t=98*Math.PI,i=10*a,o=eA(a);return(0,n.jsxs)("div",{className:"relative flex-shrink-0 w-[80px] h-[80px] md:w-[110px] md:h-[110px]",children:[(0,n.jsxs)("svg",{viewBox:"0 0 ".concat(110," ").concat(110),className:"w-full h-full",children:[(0,n.jsx)("circle",{cx:55,cy:55,r:49,strokeWidth:12,fill:"none",stroke:"rgba(0,0,0,0.05)"}),(0,n.jsx)("circle",{cx:55,cy:55,r:49,strokeWidth:12,fill:"none",strokeDasharray:t,strokeDashoffset:t-i/10*t,strokeLinecap:"round",style:{stroke:o.color,transform:"rotate(-90deg)",transformOrigin:"center",transition:"stroke-dashoffset 0.8s ease-out, stroke 0.3s"}})]}),(0,n.jsxs)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 text-center",children:[(0,n.jsx)("span",{className:"block font-heading font-bold leading-none tracking-tight text-primary text-lg md:text-2xl",children:i.toFixed(1)}),r?(0,n.jsx)(X,{onClick:r,iconSize:"small",iconClassName:"md:w-3.5 md:h-3.5",className:"mt-0.5 md:mt-1 justify-center mx-auto",children:(0,n.jsx)("span",{className:"block uppercase tracking-wider text-subtle opacity-80 text-[10px] md:text-xs",children:"HDI"})}):(0,n.jsx)("span",{className:"mt-0.5 md:mt-1 block uppercase tracking-wider text-subtle opacity-80 text-[10px] md:text-xs",children:"HDI"})]})]})},ej=e=>{let{selectedCountry:a,allCountries:r,onCountryChange:i}=e,[o,l]=(0,t.useState)(!1),[s,c]=(0,t.useState)(!1),u=(0,t.useRef)(null),d=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=e=>{u.current&&!u.current.contains(e.target)&&d.current&&!d.current.contains(e.target)&&l(!1)},a=e=>{"Escape"===e.key&&l(!1)};return o&&(document.addEventListener("mousedown",e),document.addEventListener("keydown",a)),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",a)}},[o]);let p=e=>{i(e),l(!1)};return(0,n.jsxs)("div",{className:"relative inline-block",ref:u,children:[(0,n.jsxs)("button",{type:"button",onClick:()=>{l(e=>{let a=!e;return a&&!s&&c(!0),a})},className:"flex items-center gap-1.5 cursor-pointer",children:[(0,n.jsx)(Z.W,{countryCode:a.iso2,height:12,className:"shrink-0"}),(0,n.jsx)("span",{className:"text-sm text-subtle font-sans border-b border-dashed border-subtle pb-0.5",children:a.name}),(0,n.jsx)(ev.Z,{className:"w-4 h-4 text-subtle shrink-0"})]}),s&&(0,n.jsx)("div",{ref:d,className:(0,h.A)("absolute left-0 top-full mt-1 z-50 bg-primary border border-grey-light rounded-lg shadow-lg min-w-[200px] max-w-[300px] max-h-[300px] overflow-y-auto transition-all duration-150 origin-top",o?"opacity-100 scale-y-100 pointer-events-auto":"opacity-0 scale-y-95 pointer-events-none"),children:r.map(e=>(0,n.jsxs)("button",{type:"button",onClick:()=>p(e),className:(0,h.A)("w-full flex items-center gap-2 px-4 py-3 text-left text-sm hover:bg-emphasized transition-colors",e.id===a.id&&"bg-emphasized"),children:[(0,n.jsx)(Z.W,{countryCode:e.iso2,height:16,className:"shrink-0"}),(0,n.jsx)("span",{children:e.name})]},e.id))})]})},eC=e=>{let{country:a,comparisonCountry:r,allCountries:i,onComparisonCountryChange:o,owidMetadata:l}=e,s=a.measurements.hdi,[c,u]=(0,t.useState)(!1),d=(0,t.useMemo)(()=>et(a,r),[a,r]),p=(0,t.useMemo)(()=>eo(a,r),[a,r]),m=(0,t.useMemo)(()=>eS(s),[s]);if(!s)return null;let{descriptionShort:g,originalChartUrl:f}=ew,x=null==l?void 0:l.lastUpdated,b=null==l?void 0:l.source;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:(0,h.A)("rounded-t-3xl p-4 md:p-7 text-primary border border-primary"),style:{backgroundColor:m},children:(0,n.jsxs)("div",{className:"grid grid-cols-[auto_1fr] gap-3 md:gap-6 items-start md:items-center",children:[(0,n.jsx)(eN,{hdi:s,onHDIClick:()=>u(!0)}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h2",{className:"font-heading text-lg md:text-2xl font-medium mb-2 md:mb-3 leading-tight text-primary",children:d}),p&&(0,n.jsx)("p",{className:"text-xs md:text-sm leading-normal mt-2 md:mt-3 text-subtle",children:p}),(0,n.jsxs)("div",{className:"flex items-center gap-2 justify-start flex-wrap mt-3 md:mt-4",children:[(0,n.jsx)("span",{className:"text-xs md:text-sm text-subtle font-sans",children:"Compared to"}),(0,n.jsx)(ej,{selectedCountry:r,allCountries:i,onCountryChange:o})]})]})]})}),(0,n.jsx)(ef.u,{open:c,onClose:()=>u(!1),title:"Human Development Index",children:(0,n.jsxs)("div",{className:"space-y-5 pt-6",children:[g&&(0,n.jsx)("div",{children:(0,n.jsx)(eg.uT,{children:g})}),b&&(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"flex flex-wrap items-center gap-x-2 opacity-50 text-sm",children:ep(b).map((e,a)=>(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)("span",{children:e}),a<ep(b).length-1&&(0,n.jsx)("span",{children:"\xb7"})]},a))})}),(0,n.jsxs)("div",{className:"flex gap-8 items-center",children:[a.measurementYears.hdi&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500 uppercase",children:"Data Year"}),(0,n.jsx)(eg.uT,{className:"text-sm",children:a.measurementYears.hdi})]}),x&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"text-xs text-gray-500 uppercase",children:"Last Updated"}),(0,n.jsx)(eg.uT,{className:"text-sm",children:eh(x)})]}),f&&(0,n.jsx)("div",{className:"ml-auto",children:(0,n.jsxs)("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:text-blue-800 underline text-sm inline-flex items-center gap-1",children:["View original chart",(0,n.jsx)($.Z,{className:"w-4 h-4"})]})})]})]})})]})};var eE=r(86319),ek=r(52413);let eM=["The surprising math of saving lives","Why some charities are 100x more effective than others","How to target your resources for maximum impact"],eT=e=>{let{eventCategory:a,onSuccess:r,className:t}=e;
1return(0,n.jsxs)("div",{className:(0,h.A)("space-y-4 sm:space-y-6 text-center",t),children:[(0,n.jsx)(eE.X,{size:"h3",className:"text-primary text-xl md:text-2xl",children:"You can't choose where you were born, but you can turn luck into leverage."}),(0,n.jsx)(eg.uT,{className:"text-primary leading-relaxed text-sm sm:text-base",children:"Learn how small, targeted actions can go further than you think."}),(0,n.jsx)("div",{className:"space-y-2 sm:space-y-3 text-left",children:eM.map(e=>(0,n.jsxs)("div",{className:"flex items-start gap-2 sm:gap-3",children:[(0,n.jsx)("svg",{className:"flex-shrink-0 mt-0.5 w-4 h-4 sm:w-[18px] sm:h-[18px]",viewBox:"0 0 24 24",fill:"none",stroke:"#22863a",strokeWidth:"2.5",children:(0,n.jsx)("path",{d:"M20 6L9 17l-5-5"})}),(0,n.jsx)(eg.uT,{className:"text-primary text-sm sm:text-base",children:e})]},e))}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)(ek.s,{eventCategory:a,buttonContent:(0,n.jsx)("span",{children:"Start the Series"}),hideLabel:!0,onSuccess:r,layout:"column"}),(0,n.jsx)(eg.uT,{small:!0,subtitle:!0,className:"text-center",children:"No spam. Unsubscribe anytime. We respect your inbox."})]})]})},eL=e=>{let{country:a,comparisonCountry:r,onComparisonCountryChange:t,onSpinAgain:i,onMethodologyClick:o,isLoading:l,allCountries:s,owidMetadata:c}=e,u=p.find(e=>e["alpha-2"]===a.iso2.toUpperCase()),d=(null==u?void 0:u["sub-region"])||"";return(0,n.jsx)("div",{className:"relative h-full lg:h-auto w-full flex flex-col lg:my-auto",children:(0,n.jsxs)("div",{className:"relative pointer-events-auto w-full lg:max-w-4xl lg:mx-auto lg:border-x border-primary shadow-2xl bg-primary flex flex-col lg:h-[80vh] ",children:[(0,n.jsx)("div",{className:"absolute -top-[6px] left-0 right-0 h-[12px] overflow-hidden pointer-events-none z-10",style:{backgroundImage:"radial-gradient(circle at 50% 0%, transparent 6px, white 6px)",backgroundSize:"20px 20px",backgroundRepeat:"repeat-x",backgroundPosition:"0 0"}}),(0,n.jsxs)("div",{className:"lg:overflow-y-auto lg:overscroll-y-none flex-1 min-h-0 space-y-0",children:[(0,n.jsx)("div",{className:"relative flex-shrink-0 px-4 md:px-8 py-6",children:(0,n.jsxs)("div",{className:"flex flex-row items-center justify-between gap-3 md:gap-6",children:[(0,n.jsx)("div",{className:"relative flex-shrink-0 min-w-0 flex-1",children:(0,n.jsxs)("div",{className:"flex gap-2 md:gap-3 items-center",children:[(0,n.jsx)(Z.W,{countryCode:a.iso2,height:24,className:"h-6 w-9 md:h-9 md:w-[54px]"}),(0,n.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,n.jsx)("span",{className:"text-lg md:text-2xl font-heading font-bold text-primary truncate",children:a.name}),d&&(0,n.jsx)("span",{className:"text-xs md:text-sm text-subtle -mt-1 truncate",children:d})]})]})}),(0,n.jsx)(H.z,{level:"primary",size:"medium",className:"shrink-0 lg:py-3 lg:text-base",onClick:i,disabled:l,children:l?(0,n.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,n.jsx)(J.$,{size:"xs",color:"inverted"}),"Spinning..."]}):"Spin again"})]})}),(0,n.jsx)("div",{className:"relative h-[6px] overflow-hidden shrink-0",style:{backgroundColor:"#F4EEE4",backgroundImage:"radial-gradient(circle at 50% 50%, transparent 2px, white 2px)",backgroundSize:"12px 6px",backgroundRepeat:"repeat-x",backgroundPosition:"0 0"}}),(0,n.jsxs)("div",{className:"px-4 md:px-8 py-6",children:[(0,n.jsx)(eC,{country:a,comparisonCountry:r,allCountries:s,onComparisonCountryChange:t,owidMetadata:c.hdi}),a.description&&(0,n.jsx)("p",{className:"text-sm leading-relaxed text-subtle",children:a.description}),(0,n.jsx)(ey,{selectedCountry:a,comparisonCountry:r,allCountries:s,owidMetadata:c}),(0,n.jsx)("div",{className:"mt-6 rounded-3xl bg-sky-subtle p-6 sm:p-8",children:(0,n.jsx)(eT,{eventCategory:"birth_lottery_results"})}),(0,n.jsx)(H.z,{level:"tertiary",size:"medium",onClick:o,className:"mt-6 w-full lg:hidden",children:"Methodology"}),(0,n.jsxs)("div",{className:"hidden lg:flex mt-6 items-end justify-between",children:[(0,n.jsx)(K,{}),(0,n.jsx)(H.z,{level:"tertiary",size:"medium",onClick:o,children:"Methodology"})]})]})]}),(0,n.jsx)("div",{className:"absolute -bottom-[6px] left-0 right-0 h-[12px] overflow-hidden pointer-events-none",style:{backgroundImage:"radial-gradient(circle at 50% 0%, transparent 6px, white 6px)",backgroundSize:"20px 20px",backgroundRepeat:"repeat-x",backgroundPosition:"0 0",transform:"rotate(180deg)"}})]})})},eI=e=>{let{open:a,onClose:r}=e;return(0,n.jsx)(ef.u,{open:a,onClose:r,title:"Methodology",children:(0,n.jsxs)("div",{className:"pt-4 space-y-4",children:[(0,n.jsx)(eg.uT,{children:"We started this project with a simple question: âHow can we make global inequality more tangible?â From that came an idea: an interactive simulation that lets people experience, statistically, where and how they might be born."}),(0,n.jsx)(eg.uT,{children:"Each spin randomly assigns you a country based on the number of births per country. The higher a countryâs number of births, the more likely you are to land there. The metrics you see â life expectancy, income, education and more â show what life on average looks like for someone born in that place."}),(0,n.jsxs)(eg.uT,{children:["All data is sourced with the help of"," ",(0,n.jsx)(c.r,{href:"https://ourworldindata.org",newTab:!0,external:!0,children:"Our World in Data"})," ","and the availability of global datasets from organisations like the UN, World Bank and the Economist Intelligence Unit."]}),(0,n.jsx)(eg.uT,{children:"We hope this tool builds empathy, sparks curiosity and encourages informed conversations about global inequality."}),(0,n.jsx)(eg.uT,{children:"If you have questions, feedback or spot a mistake, please donât he
1sitate to contact us."}),(0,n.jsx)("div",{className:"pt-2",children:(0,n.jsx)(H.z,{href:"/about-us/contact-us",level:"primary",size:"medium",onClick:r,children:"Contact us"})})]})})};var eR=r(36931),eB=r(74605);let eP=e=>{let{countries:a,totalBirths:r,owidMetadata:i}=e,o=(0,t.useRef)(null),s=(0,t.useRef)(null),[c,u]=(0,t.useState)(null),[d,h]=(0,t.useState)(!1),[p,m]=(0,t.useState)(!1),[g,b]=(0,t.useState)(!1),y=(0,t.useRef)(!0),v=(0,t.useRef)(0),{country:w}=(0,eR.M)(),{clearScheduledTimeouts:A,scheduleTimeout:S}=_(),{startRotation:N,stopRotation:j}=z(o),C=(0,t.useCallback)(()=>!window.matchMedia("(min-width: 1024px)").matches,[]),E=(0,t.useMemo)(()=>x(w,a)||a[0],[w,a]),[k,M]=(0,t.useState)(E);(0,t.useEffect)(()=>{M(E)},[E]);let T=(0,t.useCallback)(function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{includeSpinning:r=!0,delayResult:n=!0}=a;A();let t=o.current;if(!t)return n?S(()=>{h(!0),m(!1)},3e3):(h(!0),m(!1)),!1;let i=G(t,e.id,S,C());return i?((n?S(()=>{h(!0),m(!1)},3e3):(h(!0),m(!1)),r&&(y.current||a.forceSpin))?(y.current&&(y.current=!1),i.startInitialSpin()):(y.current&&(y.current=!1),i.fitBounds()),!0):(n?S(()=>{h(!0),m(!1)},3e3):(h(!0),m(!1)),!1)},[A,S,C]);(0,t.useEffect)(()=>{if(d&&c&&!p){var e;null===(e=s.current)||void 0===e||e.call(s,c.id)}},[d,c,p]),(0,t.useEffect)(()=>{if(!p||!c)return;let e=setTimeout(()=>{var e;h(!0),m(!1),null===(e=s.current)||void 0===e||e.call(s,c.id)},1e4);return()=>clearTimeout(e)},[p,c]);let I=async()=>{if(p)return;m(!0),s.current&&s.current(""),j(),A();let e=f(a,r);v.current+=1,F({spin_country_name:e.name,spin_country_iso2:e.iso2,spin_number:v.current,user_country_iso2:w||void 0,user_country_name:E.name}),h(!1),u(e);let n=o.current;if(!n){S(()=>{h(!0),m(!1)},3e3);return}try{if(d){let e=O(n,C()),a=new Promise(e=>{setTimeout(()=>e(),3e3)});await Promise.race([e,a])}T(e,{includeSpinning:!0,delayResult:!0,forceSpin:d})||S(()=>{h(!0),m(!1)},3e3)}catch(a){console.error("Error during spin animation:",a),h(!1),S(()=>{var a;h(!0),m(!1),null===(a=s.current)||void 0===a||a.call(s,e.id)},3e3)}},R=(0,t.useCallback)((e,a)=>{o.current=e,s.current=a,e.isStyleLoaded()?N():e.once("load",N)},[N]),B=(0,n.jsxs)(n.Fragment,{children:[!d&&(0,n.jsx)(Y,{onSpinClick:I,onMethodologyClick:()=>b(!0),isLoading:p,allCountries:a,totalBirths:r}),d&&null!==c&&(0,n.jsx)(eL,{country:c,comparisonCountry:k,onComparisonCountryChange:M,onSpinAgain:I,onMethodologyClick:()=>b(!0),isLoading:p,allCountries:a,owidMetadata:i})]});return(0,n.jsxs)(l.T,{head:{title:"Birth Lottery",description:"If you were reborn today, where would you land? And how would that change your life?",imageUrl:"".concat(eB.U,"/birth-lottery/open-graph-image.jpg")},children:[(0,n.jsxs)("div",{className:"relative h-full w-full overflow-hidden bg-subtle",children:[(0,n.jsx)("div",{className:"absolute top-0 left-0 right-0 z-0 h-[35%] lg:h-full lg:inset-0",children:(0,n.jsx)(L,{onReady:R})}),(0,n.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 z-10 h-[65%] flex flex-col lg:relative lg:h-full lg:container lg:mx-auto lg:grid lg:grid-cols-2 lg:gap-8",children:[(0,n.jsx)("div",{className:"h-full overflow-y-auto lg:relative lg:z-10 lg:order-1 lg:flex lg:flex-col lg:justify-end lg:space-y-6 lg:overflow-hidden lg:bg-gradient-to-r lg:from-subtle lg:to-transparent",children:B}),(0,n.jsx)("div",{id:"map-boundaries",className:"hidden lg:block lg:order-2 lg:h-full lg:w-full"})]})]}),(0,n.jsx)(eI,{open:g,onClose:()=>b(!1)})]})},eW=e=>{let{children:a}=e;return(0,n.jsxs)("div",{className:"relative h-screen overflow-y-auto lg:overflow-hidden",children:[(0,n.jsx)("header",{className:"absolute top-0 left-0 right-0 w-full py-4 flex justify-center items-center z-50 bg-transparent",children:(0,n.jsx)(c.r,{href:"/",styled:!1,locale:"en",children:(0,n.jsx)(o(),{alt:"Giving What We Can Logo",src:"/branding/gwwc-logo.svg",width:212,height:63,priority:!0,className:"h-12 w-auto"})})}),(0,n.jsx)("main",{className:"h-full overflow-y-auto lg:overflow-hidden",children:a})]})};eP.getLayout=(e,a)=>(0,n.jsx)(s.n,{initialSanityState:a.initialSanityState,children:(0,n.jsx)(eW,{children:e})});var eU=!0,eO=eP},39245:function(e,a,r){"use strict";r.d(a,{F_:function(){return l},HJ:function(){return i},Ni:function(){return h},UC:function(){return u},V1:function(){return function e(a){return a.parentPage?[e(a.parentPage),{_id:a._id,title:a.title||"untitled",path:a.path||"/"}].flat():[{_id:a._id,title:a.title||"untitled",path:a.path||"/"}]}},Vh:function(){return d},Wk:function(){return c},fW:function(){return n},hy:function(){return t},zR:function(){return o},zY:function(){return s}});let n=(e,a)=>Array.isArray(e)?1===e.length?e[0]:a&&e.find(e=>e._id.startsWith("drafts."))||e[0]:e;function t(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"";let r=Object.assign({},{nonTextBehavior:"remove"},a);return e.map(e=>"block"===e._type&&e.children?e.children.map(e=>e.text).join(""):"remove"===r.nonTextBehavior?"":"[".concat(e._type," block]")).join("\n\n")}function i(e){return e&&void 0!==e.path}function o(e){return e&&void 0!==e.path&&void 0!==e.title}function l(e){return e&&Array.isArray(e)&&e.some(e=>"block"===e._type)}let s=e=>{var a;return null===(a=e.pageBuilder)||void 0===a?void 0:a.find(e=>
1"article"==e._type)},c=e=>{var a;return null===(a=e.pageBuilder)||void 0===a?void 0:a.filter(e=>"pageTitle"===e._type)},u=function(e){return Object.entries(e).forEach(a=>{let[r,n]=a;n&&"object"==typeof n&&u(n),null==n&&delete e[r]}),e},d=e=>void 0!==e&&"_id"in e&&"slug"in e,h=e=>{let a=new Map;for(let r of e){let e=d(r.category)?r.category._id:void 0;if(e){let r=a.get(e)||0;a.set(e,r+1)}}return a}},15749:function(e,a,r){"use strict";r.d(a,{I:function(){return i}});var n=r(30195);let t=[/^b\.c$/,/^example\.com$/,/^gamil\.com$/,/^gmai\.com$/,/^gmail\.(?!com$).*$/,/^gnail\.com$/,/^gmil\.com$/,/^hotmail\.c$/,/^hotmail\.co$/,/^hotmail\.con$/,/^hotnail\.com$/,/^msn\.con$/,/^outlook\.om$/,/\..$/,/^yandex\.tu$/,/^outlook[\w]{2}\.com$/,/^gmail[\w]{2}.com$/,/^sjtu.africa$/],i=n.z.string({required_error:"Please enter an email address",invalid_type_error:"Please enter an email address"}).min(5,"Email address is too short").email("Please enter a valid email address").refine(e=>{let a=e.split("@")[1];return!t.some(e=>e.test(a))},"Please use a valid email domain")},52520:function(e,a,r){"use strict";r.d(a,{H6:function(){return u},Kk:function(){return i},Nr:function(){return g},PY:function(){return m},Q9:function(){return x},SO:function(){return h},TO:function(){return d},Tp:function(){return b},UM:function(){return f},WM:function(){return c},dg:function(){return y},ff:function(){return v},nm:function(){return o}});var n=r(96299);let t=/^\d{4}-\d{2}-\d{2}$/,i=e=>e&&t.test(e)&&n.ou.fromISO(e,{zone:"utc"}).isValid?e:null,o=e=>{let a=i(e);if(!a)throw Error("Invalid ISO date: ".concat(String(e)));return a},l=(e,a)=>o(n.ou.fromISO(e,{zone:"utc"}).plus({days:a}).toISODate()),s=e=>{var a,r;if(!(null==e?void 0:null===(a=e.start)||void 0===a?void 0:a.value)||!(null==e?void 0:null===(r=e.end)||void 0===r?void 0:r.value))return null;let n=i(e.start.value);if(!n)return null;let t=e.start.inclusive?n:l(n,1);if("infinity"===e.end.value)return{start:t,end:"infinity"};let o=i(e.end.value);return o?{start:t,end:e.end.inclusive?o:l(o,-1)}:null},c=e=>new Date("".concat(e,"T12:00:00")),u=e=>{let a=i(e);return a?c(a):null},d=e=>c(o(e)),h=e=>{let a=s(e);if(!a)throw Error("Invalid Period: ".concat(JSON.stringify(e)));return a},p=e=>{let a=h(e);if("infinity"===a.end)throw Error("Expected a finite Period: ".concat(JSON.stringify(e)));return a},m=e=>({...e,period:h(e.period)}),g=e=>({...e,period:p(e.period)}),f=e=>({...e,liabilityPeriod:p(e.liabilityPeriod)}),x=o("2001-01-01"),b=o("2099-12-31"),y=e=>"infinity"===e.end?b:e.end,v=e=>e&&"infinity"!==e?e:null},70824:function(e,a,r){"use strict";r.d(a,{W:function(){return s}});var n=r(52322),t=r(2784),i=r(96577),o=r.n(i),l=r(8186);let s=e=>{let{countryCode:a,height:r=18,width:i=1.5*r,className:s,fetchPriority:c}=e,[u,d]=(0,t.useState)(!1),h=a.trim().toLowerCase();return!h||u?null:(0,n.jsx)(o(),{src:"/flags/".concat(h,".png"),alt:"",width:i,height:r,className:(0,l.A)("shrink-0",s),fetchPriority:c,onError:()=>d(!0)})}},18078:function(e,a,r){"use strict";r.d(a,{W:function(){return u}});var n=r(52322),t=r(13722);r(2784);var i=r(8186);let o=e=>(0,n.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.jsx)("path",{d:"M10 6V10M10 14H10.01M19 10C19 14.9706 14.9706 19 10 19C5.02944 19 1 14.9706 1 10C1 5.02944 5.02944 1 10 1C14.9706 1 19 5.02944 19 10Z",stroke:"#BA2934",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),l=e=>(0,n.jsx)("svg",{width:"18",height:"12",viewBox:"0 0 18 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.0485 0.351472C17.5171 0.820101 17.5171 1.5799 17.0485 2.04853L7.4485 11.6485C6.97987 12.1172 6.22008 12.1172 5.75145 11.6485L0.951447 6.84853C0.482818 6.3799 0.482818 5.6201 0.951447 5.15147C1.42008 4.68284 2.17987 4.68284 2.6485 5.15147L6.59998 9.10294L15.3514 0.351472C15.8201 -0.117157 16.5799 -0.117157 17.0485 0.351472Z",fill:"#38AB51"})});var s=r(95989),c=r(15538);let u=e=>{let{className:a,id:r,hint:u,children:d,label:h,moreInfo:p,invalidMessage:m,state:g,disabled:f=!1,required:x=!1,stateClassName:b}=e;return(0,n.jsxs)("div",{className:(0,i.A)("flex flex-col",f&&"opacity-60",a),children:[(0,n.jsxs)("div",{className:"flex text-sm leading-6",children:[h&&(0,n.jsxs)(s.Q,{htmlFor:r,children:[h,x&&(0,n.jsx)("span",{className:"inline-block pl-0.5",title:"Required",children:"*"})]}),p&&(0,n.jsx)("div",{className:"text-primary",children:p})]}),(0,n.jsxs)("div",{className:"relative",children:[d,g&&"normal"!==g&&(0,n.jsx)("div",{className:(0,i.A)("absolute w-6 h-7 top-3.5 right-3.5 flex items-center",b),children:(0,n.jsx)(()=>"invalid"===g?(0,n.jsx)(o,{className:"m-auto display-block"}
1):"valid"===g?(0,n.jsx)(l,{className:"m-auto display-block"}):"disabled"===g?(0,n.jsx)(t.Z,{className:"m-auto display-block text-grey-mid"}):"loading"===g?(0,n.jsx)(c.$,{size:"sm"}):null,{})})]}),m&&(0,n.jsx)("div",{className:"text-right font-normal text-sm leading-6 text-red-900 form-field-error-message",children:m}),u&&(0,n.jsx)("div",{className:"text-sm pt-1 leading-6 text-grey-darker w-full",children:u})]})}},89258:function(e,a,r){"use strict";r.d(a,{r:function(){return d}});var n=r(52322),t=r(28873),i=r(45530),o=r(39097),l=r.n(o);r(2784);var s=r(8186),c=r(31138);let u={grey:"text-grey-darker",orange:"text-red-primary",purple:"text-red-primary",red:"text-red-primary",white:"text-white"},d=e=>{let{children:a,className:r,href:o,newTab:d=!1,onClick:h,prefetch:p=!0,external:m=!1,document:g=!1,color:f="red",locale:x,styled:b=!0,...y}=e;x||(x=void 0);let v=b?(0,s.A)("underline hover:underline hover:text-red-400","cursor-pointer",u[f],r):r,w=(0,n.jsxs)(n.Fragment,{children:[a,g&&(0,n.jsx)(t.Z,{className:"inline-block ml-1 -mt-1 w-4 h-4"}),!g&&m&&(0,n.jsx)(i.Z,{className:"inline-block ml-1 -mt-1 w-4 h-4"})]});return o&&d?(0,n.jsx)(l(),{href:o,passHref:!0,prefetch:!!p&&void 0,locale:x,target:"_blank",rel:"noopener noreferrer",onClick:h,className:v,...y,children:w}):((null==o?void 0:o.startsWith("#"))&&(h=(0,c._)(o)),o)?(0,n.jsx)(l(),{href:o,passHref:!0,prefetch:!!p&&void 0,locale:x,onClick:h,className:v,...y,children:w}):(0,n.jsx)("a",{onClick:h,className:v,...y,children:w})}},86786:function(e,a,r){"use strict";r.d(a,{u:function(){return u}});var n=r(52322);r(2784);var t=r(37149),i=r.n(t),o=r(10462),l=r(8186),s=r(27138);let c={center:"top-[50%] left-[50%] bottom-auto right-auto -mr-[50%] -translate-y-1/2 -translate-x-1/2",bottomRight:"top-auto -translate-x-1/2 left-[50%] md:translate-x-0 md:left-auto md:right-8 bottom-8",bottomLeft:"top-auto -translate-x-1/2 left-[50%] md:translate-x-0 md:left-8 md:right-auto bottom-8",fromBottom:"top-auto left-0 right-0 bottom-0",cookieModal:"bottom-0 left-0 right-auto top-auto md:bottom-8 md:left-8 md:right-auto"},u=e=>{let{open:a,onOpen:r,onClose:t,title:u,children:d,className:h,contentClassName:p,overlayClassName:m,position:g="center",showCloseIcon:f=!0,preventGlobalScroll:x=!1,TopLeftIcon:b,...y}=e;return(0,n.jsx)(i(),{isOpen:a,onAfterOpen:()=>{x&&(document.body.style.overflow="hidden"),null==r||r()},onAfterClose:()=>{x&&(document.body.style.overflow="unset")},onRequestClose:t,ariaHideApp:!1,...y,overlayClassName:(0,l.A)("fixed top-0 left-0 right-0 bottom-0 bg-black/10 z-[2000]",m),className:(0,l.A)("absolute bg-white p-6 rounded-xl shadow-panel outline-none overflow-auto","fromBottom"===g?"w-[100vw] max-w-[100vw] h-fit max-h-[90vh] rounded-b-none":"w-[85vw] max-w-[85vw] h-fit max-h-[70vh]","md:w-[536px] md:max-w-[536px] md:h-fit md:max-h-[90vh]","lg:w-[536px] lg:max-w-[536px] lg:h-fit lg:max-h-[90vh]",c[g],p),children:(0,n.jsxs)("div",{className:(0,l.A)("flex flex-col text-left",h),children:[(0,n.jsxs)("div",{className:"flex flex-row items-center",children:[b&&(0,n.jsx)(b,{className:"h-6 w-6 mr-5 text-red-primary flex-shrink-0"}),u&&(0,n.jsx)(o.D,{bold:!0,className:"flex-grow !leading-tight md:text-[20px] text-balance",children:u}),f&&(0,n.jsx)(s.a,{onClick:t,className:"cursor-pointer w-6 absolute right-5 top-5 opacity-80 hover:opacity-100"})]}),d]})})}},27138:function(e,a,r){"use strict";r.d(a,{a:function(){return t}});var n=r(52322);function t(e){return(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",strokeWidth:"2",...e,children:(0,n.jsx)("path",{d:"M6 18L18 6M6 6L18 18",strokeLinecap:"round",strokeLinejoin:"round"})})}r(2784)},15538:function(e,a,r){"use strict";r.d(a,{$:function(){return l}});var n=r(52322);r(2784);var t=r(8186);let i={xs:{size:17,className:"h-4"},sm:{size:20,className:"h-5"},md:{size:40,className:"h-10"}},o={primary:"stroke-red-primary",inverted:"stroke-white"},l=e=>{let{size:a="md",color:r="primary",className:l}=e,{size:s,className:c}=i[a];return(0,n.jsx)("div",{role:"status","aria-label":"Loading",className:(0,t.A)("flex items-center justify-center",c,l),children:(0,n.jsxs)("svg",{"aria-hidden":"true",className:(0,t.A)("animate-spin",o[r]),width:s,height:s,viewBox:"0 0 44 44",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"22",cy:"22",r:"18",fill:"none",strokeWidth:"4"}),(0,n.jsx)("circle",{cx:"22",cy:"22",r:"18",fill:"none",strokeWidth:"4",strokeDasharray:"80, 200",strokeDashoffset:"0",strokeLinecap:"round"})]})})}},51109:function(e,a,r){"use strict";r.d(a,{n:function(){return o}});var n=r(52322);r(2784);var t=r(8186),i=r(18078);let o=e=>{let{placeholder:a="",label:r,state:o="normal",invalidMessage:l,value:s="",onCh
1ange:c,name:u,className:d,id:h,hint:p,disabled:m,required:g,autocomplete:f,type:x="text",autofocus:b,onFocus:y,onBlur:v}=e,w=(0,t.A)("outline-none focus:ring-transparent focus:ring-0","border border-solid border-grey-light shadow-none focus:border-grey-mid hover:border-grey-mid","invalid"===o&&"border-2 border-red-900 focus:!border-red-900 hover:!border-red-900","hover:cursor-text","rounded-lg","mr-8","py-3.5","normal"===o&&"px-5","normal"!==o&&"pl-5 pr-11","text-base","leading-7","font-normal","w-full","text-primary","placeholder:text-grey-mid","form-control","block",d);return(0,n.jsx)(i.W,{label:r,id:h,hint:p,state:o,invalidMessage:l,disabled:m,required:g,children:"textarea"===x?(0,n.jsx)("textarea",{id:h,onChange:c,value:null!=s?s:void 0,className:w,placeholder:a,disabled:m,autoComplete:f,autoFocus:b,name:u,onFocus:y,onBlur:v}):(0,n.jsx)("input",{id:h,onChange:c,value:null!=s?s:void 0,type:x,className:w,placeholder:a,disabled:m,autoComplete:f,autoFocus:b,name:u,onFocus:y,onBlur:v})})}},78887:function(e,a,r){"use strict";r.d(a,{u:function(){return c},w:function(){return u}});var n=r(52322),t=r(2784),i=r(28316),o=r(89623),l=r(8186);function s(e,a,r){let n=a+6,t=(6+n)/2;return"top"===e?"path('M ".concat(6," 0 C ").concat(t," 0, ").concat(.85*t," ").concat(r,", ").concat(t," ").concat(r," C ").concat(1.15*t," ").concat(r,", ").concat(t," 0, ").concat(n," 0 Z')"):"path('M ".concat(6,",").concat(r," C ").concat(t," ").concat(r,", ").concat(.85*t," 0, ").concat(t," 0 C ").concat(1.15*t," 0, ").concat(t," ").concat(r,", ").concat(n," ").concat(r," Z')")}let c=e=>{var a;let{label:r,referenceElement:c,isOpen:u,className:d,arrowHeight:h=20,arrowWidth:p=94,usePortal:m=!0,offset:g}=e,[f,x]=(0,t.useState)(null),[b,y]=(0,t.useState)(!1),{styles:v,attributes:w,update:A}=(0,o.D)(c,f,{placement:"top",modifiers:[{name:"eventListeners",enabled:u},{name:"offset",options:{offset:[0,null!=g?g:h]}},{name:"preventOverflow",options:{padding:16}},{name:"flip",options:{padding:{top:100,bottom:0}}}]}),S=null===(a=w.popper)||void 0===a?void 0:a["data-popper-placement"],N=p+12,j=(0,t.useMemo)(()=>{let e={position:"absolute",width:"".concat(N,"px"),height:"".concat(h,"px"),visibility:"hidden"};return(null==S?void 0:S.startsWith("top"))?(e.clipPath=s("top",p,h),e.bottom="-".concat(h-1,"px")):(null==S?void 0:S.startsWith("bottom"))&&(e.clipPath=s("bottom",p,h),e.top="-".concat(h-1,"px")),e},[S,N,h,p]);(0,t.useEffect)(()=>{y("undefined"!=typeof document)},[]),(0,t.useEffect)(()=>{u&&A&&A()},[u,A]);let C="undefined"!=typeof document?document.body:null;if(!b)return null;let E=(0,n.jsx)("div",{ref:x,style:{...v.popper,minWidth:"".concat(N,"px"),padding:"24px 24px",borderRadius:"16px"},...w.popper,className:(0,l.A)("max-w-[min(28rem,90dvw)] bg-white drop-shadow-[0px_0px_16px_rgba(0,0,0,0.2)] z-[2100] transition-opacity duration-300",u?"opacity-100":"opacity-0 !fixed",!u&&"pointer-events-none",d),"data-tooltip-open":u,children:(0,n.jsxs)("div",{className:"max-w-[80dvw]",children:[r,(0,n.jsx)("div",{"data-popper-arrow":!0,style:{...v.arrow,...j},...w.arrow,children:(0,n.jsx)("span",{className:"absolute left-0 visible bg-white",style:{width:"".concat(N,"px"),height:"".concat(h,"px")}})})]})});return m&&C?(0,i.createPortal)(E,C):E},u=e=>{let{label:a,className:r,children:i,triggerEvent:o="hover"}=e,[s,u]=(0,t.useState)(!1),[d,h]=(0,t.useState)(null),p=(0,t.useRef)(null),m=(0,t.useRef)();return(0,t.useEffect)(()=>{let e=e=>{var a;if(null===(a=p.current)||void 0===a||!a.contains(e.target)){for(let a of Array.from(document.querySelectorAll('[data-tooltip-open="true"]')))if(a.contains(e.target))return;u(!1)}};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[d]),(0,n.jsxs)("span",{ref:p,onMouseLeave:"hover"===o?()=>{m.current&&clearTimeout(m.current),window.matchMedia("(hover: hover)").matches&&(m.current=window.setTimeout(()=>u(!1),500))}:void 0,onMouseEnter:"hover"===o?()=>{m.current&&clearTimeout(m.current),window.matchMedia("(hover: hover)").matches&&u(!0)}:void 0,onClick:"click"===o?()=>{m.current&&clearTimeout(m.current),u(!0)}:void 0,className:(0,l.A)(!s&&"pointer-events-none",r),children:[(0,n.jsx)("span",{ref:h,className:"relative pointer-events-auto",onClick:e=>{u(e=>!e),e.stopPropagation(),e.preventDefault()},children:i}),(0,n.jsx)(c,{label:a,referenceElement:d,isOpen:s})]})}},51942:function(e,a,r){"use strict";r.d(a,{r$:function(){return i},uT:function(){return o}});var n=r(2784),t=r(8186);let i="text-[12px] leading-[22px] lg:text-sm leading-6 font-light",o=e=>{let{bold:a=!1,children:r,className:o,xs:l=!1,small:s=!1,subtitle:c=!1,isArticle:u=!1,component:d="p",unstyled:h=!1,onClick:p}=e,m=h?"":(0,t.A)("text-pretty",!s&&!l&&!u&&"text-[14px] leading-6 lg:text-base lg:leading-[28px]",u&&"grid grid-cols-1 gap-7 text-lg leading-6 md:leading-8 max-w-prose",a&&"font-bold",s&&i,l&&"text-xs font-light",c&&"text-grey-darker");return n.createElement(d,{className:(0,t.A)(m,o),onClick:p},r)}},95989:function(e,a,r){"use strict";r.d(a,{Q:function(){return i}});var n=r(52322);r(2784);var t=r(8186);let i=e=>{let{children:a,className:r,htmlFor:i}=e;return(0,n.jsx)("label",{className:(0,t.A)("font-semibold text-sm leading-6 text-primary flex-1 text-pretty",r),htmlFor:i,children:a})}},86319:function(e,a,r){"use strict";r.d(a,{E:function(){return i},X:function(){return o}});var n=r(2784),t=r(8186);let i={h1:"text-4xl lg:text-5xl leading-[120%]",h2:"text-3xl lg:text-4xl leading-[120%]",h3:"text-2xl lg:text-3xl leading-[120%]",h4:"text-xl lg:text-2xl leading-[120%]",h5:"text-lg lg:text-xl leading-[120%]"},o=e=>{let{children:a,className:r,size:o,component:l=o,...s}=e,c=(0,t.A)("tracking-[-0.02em]",i[o],r);return n.createElement(l||o,{...s,className:c},a)}},10462:function(e,a,r){"use strict";r.d(a,{D:function(){return i}});var n=r(2784),t=r(8186);let i=e=>{let{children:a,className:r,bold:i=!1,component:o="div"}=e,l=(0,t.A)("text-[16px] lg:text-[20px] ",i&&"font-medium");return n.createElement(o,{className:(0,t.A)(l,r)},a)}}},function(e){e.O(0,[8569,2538,6577,2579,6034,1854,1736,2888,9774,179],function(){return e(e.s=58210)}),_N_E=e.O()}]);
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.