From 99816626af81d0b482a49acad6674436da502640 Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Tue, 29 Sep 2026 17:42:44 +0000 Subject: [PATCH] Every shadow stylesheet gets its own label, and a gate keeps it that way useShadowStyles keys its ${s(a||n)}`,l=Aa(i,{autoprint:!0});if(!l)return URL.revokeObjectURL(r),!1;let c=null;const u=()=>{clearTimeout(c);try{URL.revokeObjectURL(r)}catch{}};c=setTimeout(u,xu);try{l.addEventListener("afterprint",()=>setTimeout(u,0)),l.addEventListener("load",()=>setTimeout(u,ms),{once:!0})}catch{setTimeout(u,ms)}return!0}const v5=Object.freeze(Object.defineProperty({__proto__:null,FRAME_CEILING_MS:xu,FRAME_KEEP_MS:ms,openPrintFrame:Aa,printImageBlob:cm},Symbol.toStringTag,{value:"Module"})),w5={map_page_kicker:"UNENGAGED PEOPLE GROUPS",map_page_sub:"A prayer list of {count} unreached people groups",map_unavailable:"The map for this prayer list is not included in this printing.",map_page_series:"One of {k} UPG 100 prayer lists",zone_affinity_A017:"Deaf people groups",list_header:"{from}–{to} of {count} · pray for them by name",people_suffix:"people",no_photo:"no photo available",deck_title:"Prayer Cards",card_country:"Country",card_population:"People",card_language:"Language",card_religion:"Religion",card_cta:"Pray for them",points_title:"12 Prayer Points",points_intro:"One hour with God, five minutes each. Pray these twelve for the people groups in this packet.",points_attrib:"Prayer rhythms inspired by Metacamp · metacamp.org",wheel_title:"Prayer Wheel",wheel_intro:"Spend an hour with God? It is easier than you think. Break it into 5-minute blocks and focus on one of these during each segment.",wheel_minutes:"minutes",wheel_attrib:"Prayer Wheel · Metacamp Module 1 · metacamp.org",privacy_note:"Marker positions are approximate · people-group locations are generalised at the source for privacy",rhythms:{praise:"PRAISE",wait:"WAIT",confess:"CONFESS",read:"READ THE WORD",ask:"ASK",intercede:"INTERCESSION",pray_word:"PRAY THE WORD",thank:"THANK",sing:"SING",meditate:"MEDITATE",listen:"LISTEN",praise_end:"PRAISE"},points:[{n:1,rhythm:"praise",sub:"Two-Cross Gospel",text:"That they accept Christ as King, forgiven by His cross — and take up their own cross, willing to suffer in a persecution zone. May the Lamb receive the reward of His suffering, starting with me.",refs:["Matthew 27:27","Matthew 16:24–25"]},{n:2,rhythm:"wait",sub:"Holy Spirit & deliverance",text:"That they are filled with the Spirit and made bold witnesses; not isolated; baptized in water and Spirit; every evil grip broken. That believers in neighbouring peoples are mobilised as laborers.",refs:["Acts 1:8","John 14:26"]},{n:3,rhythm:"confess",sub:"",text:"We confess unbelief that this is too big for God. That He revives our love and faith for the global unreached.",refs:["John 3:16","1 John 1:9"]},{n:4,rhythm:"read",sub:"the Father's love",text:"That they would be SAVED and KNOW their heavenly Father loves them — and that through them He would bring salvation to their family, friends, neighbours, coworkers, classmates, everyone they know personally.",refs:["Mark 5:1–20","Acts 16:31"],print_passage:!0},{n:5,rhythm:"ask",sub:"baptisms",text:"New baptisms among the locals, and every baptized one trained to baptize others, multiplying.",refs:["Acts 16","Acts 10"]},{n:6,rhythm:"intercede",sub:"laborers & shepherds",text:"Laborers sent to deeply love a people they have never met; good shepherds raised up from within.",refs:["Luke 10:2","John 10:11–15"]},{n:7,rhythm:"pray_word",sub:"Persons & Houses of Peace",text:"That laborers and local leaders find the receptive person and the house of peace, and disciple them well.",refs:["Luke 10:5–7","Matthew 10:5–14"]},{n:8,rhythm:"thank",sub:"rest",text:"Thank God for the rest He has given; that they enter that rest in Christ, and that their spiritual family is a safe place.",refs:["Mark 4:26–29","Hebrews 4:9–11"]},{n:9,rhythm:"sing",sub:"",text:"That the people group is flooded with worshippers — worship everywhere, in freedom and in chains.",refs:["Acts 16:25–26","Colossians 3:16"]},{n:10,rhythm:"meditate",sub:"communion",text:"That they take communion together and grasp the weight of His death, burial and resurrection.",refs:["Matthew 26:26–30","1 Corinthians 11:23–26"]},{n:11,rhythm:"listen",sub:"accountability",text:"Not only that they would listen, but that they would have people in their life who help them read the Word, pray, commit to community, and respond to suffering well — resisting the adversary who comes after believers across the whole world.",refs:["1 Peter 5:6–11","Hebrews 10:24–25"]},{n:12,rhythm:"praise_end",sub:"great · greater · greatest",text:"Praise in advance — for salvations; GREATER, for spiritual families multiplying; GREATEST, for lives yielded and local church planters raised up who multiply healthy churches across the whole people group, no matter the cost.",refs:["Acts 2:42–47","Matthew 28:19–20"]}],point4_passage:"And they came to the other side of the sea, into the country of the Gadarenes. When he had come out of the boat, immediately a man with an unclean spirit met him out of the tombs. He lived in the tombs. Nobody could bind him any more, not even with chains, because he had been often bound with fetters and chains, and the chains had been torn apart by him, and the fetters broken in pieces. Nobody had the strength to tame him. Always, night and day, in the tombs and in the mountains, he was crying out, and cutting himself with stones. When he saw Jesus from afar, he ran and bowed down to him, and crying out with a loud voice, he said, “What have I to do with you, Jesus, you Son of the Most High God? I adjure you by God, don’t torment me.” For he said to him, “Come out of the man, you unclean spirit!” He asked him, “What is your name?” He said to him, “My name is Legion, for we are many.” He begged him much that he would not send them away out of the country. Now on the mountainside there was a great herd of pigs feeding. All the demons begged him, saying, “Send us into the pigs, that we may enter into them.” At once Jesus gave them permission. The unclean spirits came out and entered into the pigs. The herd of about two thousand rushed down the steep bank into the sea, and they were drowned in the sea. Those who fed them fled, and told it in the city and in the country. The people came to see what it was that had happened. They came to Jesus, and saw him who had been possessed by demons sitting, clothed, and in his right mind, even him who had the legion; and they were afraid. Those who saw it declared to them what happened to him who was possessed by demons, and about the pigs. They began to beg him to depart from their region. As he was entering into the boat, he who had been possessed by demons begged him that he might be with him. He didn’t allow him, but said to him, “Go to your house, to your friends, and tell them what great things the Lord has done for you and how he had mercy on you.” He went his way, and began to proclaim in Decapolis how Jesus had done great things for him, and everyone marveled.",point4_passage_credit:"Mark 5:1–20 · World English Bible (public domain)",funnel_kicker:"UPG 100",funnel_title:"How this list was found",funnel_intro:"Every people group on earth, narrowed to the ones with no church and no worker.",funnel_all:"people groups in the world",funnel_unreached:"are unreached — under 2% evangelical",funnel_frontier:"are frontier — 0.1% or less, and almost no one is going",funnel_doxa:"are on this prayer network’s list",funnel_doxa_note:"{frontier} of them are frontier",funnel_this:"are in THIS packet",funnel_packets:"UPG 100 prayer packets divide the {total} among them",funnel_share:"This packet is 1 of {k} lists · {pct}% of the {total}",funnel_foot:"Counts from {imb_pub}, captured {imb_date}. {unassigned} of the {total} are not yet in any list.",funnel_people:"people",funnel_foot_source:"Counts from {imb_pub}, captured {imb_date}.",funnel_share_pct:"This packet is {pct}% of the {total}",funnel_list_doxa:"Project 2000: this prayer network’s people groups",funnel_list_unreached:"Project 7000: unreached people groups",funnel_list_frontier:"Project 4700: frontier people groups","funnel_list_frontier-500k":"Project 700: frontier people groups of 500,000 or more",funnel_list_unengaged:"Unengaged unreached people groups",zone_join:"{a} + {b}",zone_join_more:"{a} + {n} more",life_kicker:"Perspective",life_title:"A human life, in weeks",life_lede:"One hundred years. Fifty-two weeks each. Five thousand two hundred boxes — and that is the whole of it. Every week you will ever pray is one of these.",life_foot:"100 years x 52 weeks = 5,200 weeks.",life_weeks:"weeks",christian_kicker:"The same 5,200 boxes",christian_title:"Who among them knows Christ",christian_lede:"This is the same grid — one human life in weeks. Now each box is a share of the people in this list. The shaded boxes are the evangelical share of their population; the rest are waiting.",christian_reached:"Evangelical",christian_lost:"Still waiting",christian_people:"people",christian_coverage:"computed over {matched} of the {total} groups in this list",christian_foot:'Population-weighted from peoplegroups.org EvangelicalLevel, taking each published band at its midpoint and 0 for "No Known Evangelicals"',pray_blessed:"Blessed them",pray_know:"What to know",pray_do:"What to do",funnel_eq_title:"How each number is reached",funnel_tip:"This packet is 1 of {n} UPG-100 lists",desc_where_both:"The {people} live in {country} and speak {language}.",desc_where_country:"The {people} live in {country}.",desc_where_language:"The {people} speak {language}.",desc_gsec_0:"There are no known evangelical Christians among them, no church, and no gospel resource in their language.",desc_gsec_1:"Fewer than 2% are evangelical, and no one has been planting churches among them in the last two years.",desc_gsec_2:"Fewer than 2% are evangelical, though church planting has begun in some communities.",desc_gsec_3:"Fewer than 2% are evangelical, and scattered church planting has begun among them.",desc_gsec_4:"Between 2% and 5% are evangelical.",desc_gsec_5:"Between 5% and 10% are evangelical.",desc_gsec_6:"More than 10% are evangelical.",sets_kicker:"Who is near, and who is not",sets_title:"Two ways to see the same people",sets_lede:"The circle asks whether a people has been reached. The rings ask how far they sit from someone who could reach them.",sets_bounded_title:"Reached, and not",sets_centered_title:"Distance from a neighbour",sets_bounded_tally:"{inside} inside · {outside} outside · {unknown} unknown",sets_centered_tally:"{placed} placed · {centre} at the centre · {unplaced} unplaced",ring_band_dialect:"Same dialect",ring_band_language:"Same language",ring_band_family:"Same language family",ring_band_geography:"Nearby only",ring_culture_same:"same people",ring_culture_near:"near culture",ring_culture_different:"different culture",ring_join:"{band}, {culture}",life_jesus:"The life of Jesus, about 33 years",life_full:"A full life of 100 years",sets_head_bounded:"Bounded set",sets_head_centered:"Centered set",sets_rings_head:"The rings, from the centre outward",light_intro:"You might take one people group a day and pray for them by name. A tick in a box is a simple way to remember who you have carried to God — there is no pace to keep.",light_col_group:"People group",books:{Matthew:"Matthew",Acts:"Acts",John:"John","1 John":"1 John",Mark:"Mark",Luke:"Luke",Hebrews:"Hebrews",Colossians:"Colossians","1 Corinthians":"1 Corinthians","1 Peter":"1 Peter"},christian_per_cell:"Each box ≈ {n} people"},um="sha384-8uzpgX1i2IEQNEh7WIxVxanacbBvX2r11/VeqSxYHzInWdV5XlLDoMCONlYI2pFA",k5="sha384-Qtz2q8mcnA9Ei8Kwa2MRMyX95hSbSnUXjXdtsy8rHTX++mgSCih4LO4Rdrb2MIQy",x5="sha384-gRuzl6j8EMIN3bQXFZH3CSXKWx7w8LCf45PlTgXorFrFs/9jIKX3Ic3D/iCOpWwU",P5="sha384-XtvN8GulVpQPnSgA3Qr2HHbUC9ivL3OsuhhO+jDhBz6/J1PTlzOx8uTPVQjI8bjR";async function Pu(e){const t=new Uint8Array(await crypto.subtle.digest("SHA-384",new TextEncoder().encode(e)));let o="";for(const n of t)o+=String.fromCharCode(n);return`sha384-${btoa(o)}`}const S5=((w0=globalThis.document)==null?void 0:w0.baseURI)||void 0,Su=Object.freeze({en:w5}),Yi=new Map;function dm(e){if(!e)return Promise.resolve(Su);let t;try{t=new URL(`${e}/lib/packet-strings.json`,S5).href}catch{return Promise.resolve(Su)}if(!Yi.has(t)){const o=(async()=>{const n=await fetch(t,{cache:"force-cache"});if(!n.ok)throw new Error(`not served (${n.status})`);const a=await n.text();if(await Pu(a)!==P5)throw new Error("failed its integrity check");return JSON.parse(a)})().catch(n=>(console.warn(`[packetStrings] ${t}: ${(n==null?void 0:n.message)||n} — printing in English`),Yi.delete(t),Su));Yi.set(t,o)}return Yi.get(t)}const dr=e=>String(e??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");function pm(e={}){const t=e.state||be(null),o=()=>t.value!==null,n=e.label||(b=>(b==null?void 0:b.label)||(b==null?void 0:b.id)||""),a=e.lang||(()=>"en"),r=e.stock||(()=>"poker"),s=(b,f,w=null,v=void 0)=>{const T=()=>String(f).replace(/\{(\w+)\}/g,(z,V)=>w&&w[V]!=null?String(w[V]):z);if(typeof e.t!="function")return T();const S=e.t(b,w||{},v);return S&&S!==b?S:T()},i=(b,f,w,v,T)=>{t.value={label:n(b),kind:f,phase:w,message:v,pct:T}},l=(b,f)=>{i(b,f,"done",s("wall.hud.printOpened","print dialog opened"),100),setTimeout(()=>{t.value=null},900)},c=(b,f,w)=>{i(b,f,"error",Nf(w,(v,T)=>s(v,v,T)).slice(0,140),0)};function u(){t.value=null}async function d(b){if(typeof e.records!="function")throw new Error("this wall supplies no records provider");const f=await e.records(b);if(!f||!f.length)throw ia("wall.hud.noRecords","that list has no people groups to print");return f}async function p(b){if(o())return;const f=s("wall.hud.kindPoster","Poster"),w=e.assetsBase?e.assetsBase():null,v=(b==null?void 0:b.id)??b;i(b,f,"fetch",s("wall.hud.fetchingPoster","fetching the poster"),25);try{if(e.sheet){i(b,f,"render",s("wall.hud.generatingPoster","generating the poster"),35);const k=await Promise.resolve().then(()=>e.sheet(b,"letter")).catch(()=>"");if(k){i(b,f,"save",s("wall.hud.openingPrint","opening the print dialog"),80),Aa(k,{autoprint:!0}),l(b,f);return}}const S=(e.posterUrl?e.posterUrl(b):null)||(w?`${w}/posters/${v}.webp`:null),z=S?await im(S):null;if(z){await x(z,b,f);return}if(!w)throw ia("wall.hud.noPoster","no poster is available for this list");i(b,f,"render",s("wall.hud.generatingPoster","generating the poster"),45);const V=await lm(`${w}/posters/${v}.html`);if(!V.html)throw ia("wall.hud.posterNotFound","poster not found ({status})",{status:V.status});const{rasterPoster:G,looksRendered:_}=await ut(async()=>{const{rasterPoster:k,looksRendered:A}=await Promise.resolve().then(()=>Fu);return{rasterPoster:k,looksRendered:A}},void 0),F=await G(V.html,{scale:2});if(!await _(F))throw ia("wall.hud.posterBlank","the generated poster came out blank");await x(F,b,f)}catch(T){c(b,f,T)}}async function x(b,f,w){i(f,w,"save",s("wall.hud.openingPrint","opening the print dialog"),80);const v=URL.createObjectURL(b),T=`${e.downloadPrefix||"doxa"} — ${n(f)}`;Aa(''+dr(T)+`${dr(n(f))}`,{autoprint:!0}),l(f,w)}async function C(b,{columns:f,title:w}={}){if(o())return;const v=s("wall.hud.kindList","List");i(b,v,"fetch",s("wall.hud.fetchingRecords","fetching records"),30);try{const T=await d(b),S=f||[{key:"name",head:"Name",cls:"c-name"},{key:"country_code_label",head:"Country"},{key:"population",head:"People",cls:"c-num",num:!0},{key:"religion_label",head:"Religion"}],z=S.map(_=>`${dr(_.head)}`).join("")+'✓',V=T.map(_=>""+S.map(F=>{const k=_[F.key]??_[`${F.key}_label`]??"—",A=F.num&&Number.isFinite(Number(k))?Number(k).toLocaleString(a()):k;return`${dr(A)}`}).join("")+'□').join("");i(b,v,"render",s("wall.hud.layingOutRows","laying out {n} rows",{n:T.length},T.length),70);const G=w||`${n(b)} — ${T.length}`;Aa(`${dr(G)}

${dr(G)}

${T.length} entries · pray for them by name

${z}${V}
`,{autoprint:!0}),l(b,v)}catch(T){c(b,v,T)}}async function $(b){if(o())return;const f=s("wall.hud.kindCardDeck","Card Deck");i(b,f,"fetch",s("wall.hud.fetchingRecords","fetching records"),30);try{const w=await d(b),[{createCardRenderer:v},T]=await Promise.all([ut(()=>Promise.resolve().then(()=>Jm),void 0),e.strings?e.strings():dm(e.assetsBase?e.assetsBase():null)]);i(b,f,"render",s("wall.hud.layingOutCards","laying out {n} cards",{n:w.length},w.length),70);const S=v({strings:T,lang:a(),stock:r()});Aa(S.buildDeck(b,w),{autoprint:!0}),l(b,f)}catch(w){c(b,f,w)}}function g(b,f,w=null){return f.liftMap(b,{labelFor:w})}async function y(){if(!e.iso3Names)return null;try{const[b,{makeCountryLabelFor:f},w]=await Promise.all([Promise.resolve().then(()=>e.iso3Names()),ut(()=>Promise.resolve().then(()=>$C),void 0),ut(()=>Promise.resolve().then(()=>ym),void 0).then(v=>v.countryName||v.default)]);return f({iso3Name:b,countryName:w,lang:a()})}catch{return null}}async function m(b,f,w){for(const v of w.mapSheetFiles(f))try{const T=await fetch(`${b}/posters/${v}`,{cache:"force-cache"});if(!T.ok)continue;const S=await T.text();if(w.liftMap(S))return S}catch{}return""}async function h(b,{mapSvg:f="",funnel:w=null,variant:v="full"}={}){if(o())return;const T=s("wall.hud.kindPacket","Prayer Packet");i(b,T,"fetch",s("wall.hud.fetchingGroups","fetching people groups"),30);try{const S=await d(b),[{createPacketRenderer:z},{buildPacketSets:V},{evangelicalShareFor:G},_,F,k,A]=await Promise.all([ut(()=>Promise.resolve().then(()=>RC),void 0),ut(()=>Promise.resolve().then(()=>NC),void 0),ut(()=>Promise.resolve().then(()=>IC),void 0),e.strings?e.strings():dm(e.assetsBase?e.assetsBase():null),e.christian?e.christian():Promise.resolve(null),e.christian?Promise.resolve(null):ut(()=>Promise.resolve().then(()=>OC),void 0).then(ie=>ie.default||ie).catch(()=>null),e.sets?Promise.resolve().then(()=>e.sets()).catch(()=>null):Promise.resolve(null)]),M=F||G(S,k),R=await Promise.all([ut(()=>Promise.resolve().then(()=>BC),void 0).then(ie=>ie.describeGroup).catch(()=>null),ut(()=>Promise.resolve().then(()=>ym),void 0).then(ie=>ie.countryName||ie.default).catch(()=>null)]).then(([ie,ye])=>ie?xe=>ie(xe,a(),{strings:_,countryName:ye||void 0}):null),W=z({strings:_,lang:a(),describe:R}),D=new Map(S.filter(ie=>ie.image_url).map(ie=>[ie.slug,ie.image_url]));i(b,T,"render",s("wall.hud.printingGroups","printing {n} people groups",{n:S.length},S.length),70),w||(w=await ut(()=>Promise.resolve().then(()=>UC),void 0).then(ie=>{const ye=ie.default||ie;return ye&&Array.isArray(ye.steps)&&ye.steps.length?{steps:ye.steps}:null}).catch(()=>null));const Q=b&&"mapId"in b?b.mapId:b==null?void 0:b.id;if(!f&&e.sheet&&Q){const ie=Q===(b==null?void 0:b.id)?b:{...b,id:Q},ye=await Promise.resolve().then(()=>e.sheet(ie,"packet")).catch(()=>"");ye&&(f=W.liftMap(ye,{labelFor:await y()}))}if(!f&&e.mapImage){const ie=await Promise.resolve().then(()=>e.mapImage(b)).catch(()=>null);f=ie?W.mapFromImage(ie):""}if(!f&&e.assetsBase&&Q){const[ie,ye]=await Promise.all([m(e.assetsBase(),Q,W),y()]);f=g(ie,W,ye)}const U=A?V(S,A):null;Aa(W.buildPacket(b,S,D,f,w,M,v,U),{autoprint:!0}),l(b,T)}catch(S){c(b,T,S)}}return{exportState:t,dismiss:u,printPoster:p,printList:C,printCardDeck:$,printPacket:h}}const A5=Object.freeze(Object.defineProperty({__proto__:null,usePosterPrints:pm},Symbol.toStringTag,{value:"Module"})),L5={class:"wall-h"},C5={key:0,class:"wall-tag"},T5=["innerHTML"],E5={class:"sec-name"},R5={class:"sec-count"},M5={key:1,class:"perrow"},N5=["for"],F5=["id"],I5=["value"],O5=["data-list-id"],D5=["aria-pressed","aria-label","onClick"],z5={class:"hcount"},G5={class:"hlabel"},j5={class:"main"},B5={key:0,class:"ph is-soon"},U5={class:"ph-label"},H5={key:0,class:"ph-count"},W5={class:"ph-soon"},V5=["src","alt","role","tabindex","title","onClick","onKeydown","onError"],K5={key:2,class:"ph"},q5={class:"ph-label"},Y5={key:0,class:"ph-count"},Z5={class:"ph-note"},X5={class:"tape pfs"},J5=["aria-expanded","onClick"],Q5=["onClick"],e3=["aria-expanded","onClick"],t3=["aria-label"],o3=["onClick"],n3=["aria-label"],a3=["onClick"],r3={class:"modal",role:"dialog","aria-live":"polite"},s3={class:"modal-kind"},i3={class:"modal-title"},l3={class:"modal-err"},c3={class:"modal-soon"},u3={class:"bar"},d3={class:"modal-phase"},p3={class:"modal-hint"},bs=0,gm=2,hm=5,fm=2,mm="doxa-maps:poster-wall:per-row",g3=210,h3={__name:"PosterWall",props:{items:{type:Array,required:!0},groupBy:{type:Function,default:()=>"All"},instanceId:{type:String,default:"poster-wall"},isDark:{type:Boolean,default:!1},assetsBase:{type:String,default:"./assets"},eventName:{type:String,default:"doxa-poster-wall:show-on-map"},heading:{type:String,default:"Prayer Lists & Posters"},tag:{type:String,default:""},intro:{type:String,default:""},unit:{type:String,default:"UPG"},itemNoun:{type:String,default:"list"},itemNounPlural:{type:String,default:""},itemCountKey:{type:String,default:""},collapsible:{type:Boolean,default:!1},collapsedBy:{type:Function,default:()=>!1},unsupported:{type:Function,default:()=>null},downloadPrefix:{type:String,default:"doxa"},prayerListSoonMessage:{type:String,default:"Coming soon — the prayer list for each people group is in build."},records:{type:Function,default:null},iso3Names:{type:Function,default:null},mapImage:{type:Function,default:null},sheet:{type:Function,default:null},cardStock:{type:String,default:"poker"},cardStocks:{type:[Boolean,Array],default:!1},posterAction:{type:String,default:"print"},previewAction:{type:String,default:"none"},hidePrayerListWhenSoon:{type:Boolean,default:!1},embedded:{type:Boolean,default:!1},sectionHeads:{type:Boolean,default:!0},columns:{type:Number,default:0},columnsControl:{type:Boolean,default:!1}},setup(e){const t=(B,X)=>Zt(B)||X,o=e,n=be(r()??(o.columns||fm));Ue(()=>o.columns,B=>{r()==null&&(n.value=B||fm)}),Ue(n,B=>{(B===bs||Number.isFinite(B)&&B>=gm&&B<=hm)&&s(B)});const a=[bs,2,3,4,5];function r(){try{const B=window.localStorage.getItem(mm);if(B==null||B==="")return null;const X=Number(B);return X===bs?bs:Number.isFinite(X)&&X>=gm&&X<=hm?X:null}catch{return null}}function s(B){try{window.localStorage.setItem(mm,String(B))}catch{}}const i=be(typeof window<"u"?window.innerWidth:1280);if(typeof window<"u"){const B=()=>{i.value=window.innerWidth};window.addEventListener("resize",B),Jt(()=>window.removeEventListener("resize",B))}const l=J(()=>{if(!(n.value>0))return{};const B=Math.max(0,i.value-36),X=Math.max(1,Math.floor(B/g3));return{gridTemplateColumns:`repeat(${Math.min(n.value,X)}, minmax(0, 1fr))`}}),c=J(()=>o.itemNounPlural||o.itemNoun),u=xi(""),d=(B,X)=>u(B,{n:Number(X||0).toLocaleString()},Number(X||0)),p=(B,X,P=null,L=void 0)=>{const K=u(B,P||{},L);return K&&K!==B?K:String(X).replace(/\{(\w+)\}/g,(ne,ke)=>P&&P[ke]!=null?String(P[ke]):ne)},x=B=>o.itemCountKey?d(o.itemCountKey,B):`${B} ${B===1?o.itemNoun:c.value}`,C=J(()=>String(o.assetsBase||"./assets").replace(/\/+$/,"")),$=J(()=>{const B=String(Ac()||"").replace(/\/+$/,"");return B?`${B}/assets`:""}),g=be({}),y=B=>`${g.value[B]?$.value:C.value}/previews/${B}.webp`;function m(B){const X=$.value;if(!g.value[B]&&X&&X!==C.value){g.value={...g.value,[B]:1};return}S.value={...S.value,[B]:!0}}const h=J(()=>{const B=new Map;for(const X of o.items||[]){if(!X||!X.id)continue;const P=o.groupBy(X)||"Other";B.has(P)||B.set(P,[]),B.get(P).push(X)}return[...B.entries()].map(([X,P])=>({name:X,items:P.slice().sort((L,K)=>(K.count||0)-(L.count||0)),total:P.reduce((L,K)=>L+(K.count||0),0)})).sort((X,P)=>P.total-X.total)}),b=J(()=>{const B={};for(const X of h.value)B[X.name]=!!o.collapsedBy(X);return B}),f=be({}),w=B=>o.collapsible?B in f.value?!!f.value[B]:!!b.value[B]:!1,v=B=>{f.value={...f.value,[B]:!w(B)}},T=be(null),S=be({}),z=be(null);let V=[];mo(()=>{const B=[];for(let P=z.value;P;P=P.parentNode||P.host||null)P.nodeType===1&&B.push(P);const X=()=>B.some(P=>P.hasAttribute("inert")||P.hasAttribute("hidden")||P.getAttribute("aria-hidden")==="true");if(!(typeof MutationObserver>"u"))for(const P of B){const L=new MutationObserver(()=>{X()&&(T.value=null)});L.observe(P,{attributes:!0,attributeFilter:["inert","hidden","aria-hidden"]}),V.push(L)}}),Jt(()=>{for(const B of V)B.disconnect();V=[]});function G(B){const X=T.value===B.id;T.value=X?null:B.id,window.dispatchEvent(new CustomEvent(o.eventName,{detail:{instanceId:o.instanceId,listId:X?null:B.id,label:X?null:B.label}}))}const _=be(null),{scrimRef:F,scrimStyle:k}=Vi(_);async function A(B){if(_.value)return;const X=o.unsupported(B);if(X){_.value={label:B.label,kind:p("wall.hud.kindPoster","Poster"),phase:"soon",message:X,pct:0};return}_.value={label:B.label,kind:p("wall.hud.kindPoster","Poster"),phase:"fetch",message:p("wall.hud.fetchingPoster","fetching the poster"),pct:20};try{if(o.sheet){_.value={..._.value,phase:"render",message:p("wall.hud.generatingPoster","generating the poster"),pct:35};const L=o.posterAction==="print"?"letter":B.sheet==="3x3"?"3x3":"3x4",K=await Promise.resolve().then(()=>o.sheet(B,L)).catch(()=>"");if(K){const{rasterPoster:ne,looksRendered:ke}=await ut(async()=>{const{rasterPoster:q,looksRendered:re}=await Promise.resolve().then(()=>Fu);return{rasterPoster:q,looksRendered:re}},void 0),he=await ne(K,{scale:2});if(await ke(he)){await H(he,B);return}}}const P=await im(`${C.value}/posters/${B.id}.webp`);if(!P){_.value={..._.value,phase:"render",message:p("wall.hud.generatingPoster","generating the poster"),pct:45};const L=await lm(`${C.value}/posters/${B.id}.html`);if(!L.html)throw ia("wall.hud.posterNotFound","poster not found ({status})",{status:L.status});const{rasterPoster:K,looksRendered:ne}=await ut(async()=>{const{rasterPoster:he,looksRendered:q}=await Promise.resolve().then(()=>Fu);return{rasterPoster:he,looksRendered:q}},void 0),ke=await K(L.html,{scale:2});if(!await ne(ke))throw ia("wall.hud.posterBlank","the generated poster came out blank");await H(ke,B);return}await H(P,B)}catch(P){_.value={label:B.label,kind:p("wall.hud.kindPoster","Poster"),phase:"error",message:Nf(P,(L,K)=>p(L,L,K)).slice(0,140),pct:0}}}const M=B=>String(B).split(".").pop().replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/^./,X=>X.toUpperCase()),{t:R,locale:W}=as("",{fallback:B=>M(B)}),D=be(o.cardStock),Q=be([]),U=B=>{if(!B.noun)return B.label;const X=`wall.stock${B.noun[0].toUpperCase()}${B.noun.slice(1)}`,P=u(X);if(!P||P===X)return B.label;const L=`${B.w} × ${B.h} in`;return B.side?`${P} ${L} (${u("wall.stockLandscape")})`:`${P} ${L}`};o.cardStocks&&ut(async()=>{const{STOCK:B}=await Promise.resolve().then(()=>Jm);return{STOCK:B}},void 0).then(({STOCK:B})=>{var P;const X=Array.isArray(o.cardStocks)?o.cardStocks:Object.keys(B);Q.value=X.filter(L=>B[L]).map(L=>({id:L,stock:B[L]})),Q.value.some(L=>L.id===D.value)||(D.value=((P=Q.value[0])==null?void 0:P.id)||o.cardStock)}).catch(()=>{});const ie=pm({t:(B,X,P)=>u(B,X,P),state:_,records:o.records?B=>o.records(B):null,lang:()=>{const B=W&&(W.value??W);return typeof B=="string"&&B||"en"},stock:()=>D.value,label:B=>(B==null?void 0:B.label)||(B==null?void 0:B.id)||"",assetsBase:()=>o.assetsBase,iso3Names:o.iso3Names?()=>o.iso3Names():null,mapImage:o.mapImage?B=>o.mapImage(B):null,sheet:o.sheet?(B,X)=>o.sheet(B,X):null,sets:()=>fetch(`${o.assetsBase}/tables/near-neighbors.json`).then(B=>B.ok?B.json():null).catch(()=>null)}),ye=J(()=>typeof o.records=="function"),xe=J(()=>o.previewAction==="print"),we=be(null),pe=(B,X)=>`${B}:${X}`;function oe(B,X,P="deck"){var ne,ke,he;const L=pe(B,P);we.value=we.value===L?null:L;const K=(ke=(ne=X==null?void 0:X.currentTarget)==null?void 0:ne.closest)==null?void 0:ke.call(ne,".pfs");K&&((he=K.parentElement)==null||he.style.setProperty("--pstocks-gap",`${K.offsetHeight}px`))}function _e(B,X){D.value=X,we.value=null,ie.printCardDeck(B)}function me(B){if(!ye.value){_.value={label:B.label,kind:p("wall.hud.kindPrayerList","Prayer List"),phase:"soon",message:o.prayerListSoonMessage,pct:0};return}ie.printList(B)}const Ae=[{id:"full",labelKey:"buttons.packetFull"},{id:"lightweight",labelKey:"buttons.packetLightweight"}];function N(B,X){if(!ye.value){me(B);return}we.value=null,ie.printPacket(B,{variant:X})}async function H(B,X){if(o.posterAction==="print"){_.value={..._.value,phase:"save",message:p("wall.hud.openingPrint","opening the print dialog"),pct:80};const{openPrintFrame:P}=await ut(async()=>{const{openPrintFrame:K}=await Promise.resolve().then(()=>v5);return{openPrintFrame:K}},void 0),L=URL.createObjectURL(B);I.push(L),P(''+ee(`${o.downloadPrefix} — ${X.label||X.id}`)+`${ee(X.label||X.id)}`,{autoprint:!0})}else _.value={..._.value,phase:"save",message:p("wall.hud.saving","saving"),pct:80},ge(B,`${o.downloadPrefix}-${X.id}-poster.webp`);_.value={..._.value,phase:"done",message:o.posterAction==="print"?p("wall.hud.printOpened","print dialog opened"):p("wall.hud.saved","saved"),pct:100},setTimeout(()=>{_.value=null},900)}const I=[];Jt(()=>{for(const B of I.splice(0))try{URL.revokeObjectURL(B)}catch{}});const ee=B=>String(B??"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""");function ge(B,X){const P=document.createElement("a");P.href=URL.createObjectURL(B),P.download=X,document.body.appendChild(P),P.click(),P.remove(),setTimeout(()=>URL.revokeObjectURL(P.href),4e3)}function j(){_.value=null}return Nt(`.wall{--wall-pad-top:22px;position:absolute;inset:0;overflow-y:auto;padding:var(--wall-pad-top) 18px 44px;background:#f6f7f9;color:#0f1419;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}.wall.is-dark{background:#0a1410;color:#e5e7eb}.wall--embedded{--wall-pad-top:0px;position:static;inset:auto;overflow-y:visible;padding:0;background:transparent}.wall--embedded.is-dark{background:transparent}.wall-h{margin:0 0 6px;font-size:19px;font-weight:700;text-align:center}.wall-tag{margin:0 auto 12px;width:fit-content;padding:3px 11px;border-radius:999px;background:rgba(16,185,129,.13);color:#0b7a5b;border:1px solid rgba(16,185,129,.28);font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.is-dark .wall-tag{background:rgba(16,185,129,.16);color:#6ee7b7;border-color:rgba(110,231,183,.32)}.wall-sub{margin:0 auto 22px;max-width:620px;font-size:12.5px;line-height:1.55;text-align:center;opacity:.75}.wall-sub strong{font-weight:700;opacity:1;color:inherit}.grid{display:grid;gap:56px 30px;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));max-width:1180px;margin:0 auto}.perrow{display:flex;align-items:center;justify-content:flex-end;gap:8px;max-width:1180px;margin:0 auto 12px;font:inherit;font-size:13px}.perrow__label{color:#6d766e}.perrow__select{font:inherit;font-size:13px;padding:2px 6px;border:1px solid #cbd2d9;border-radius:6px;background:#fff;color:inherit;cursor:pointer}.is-dark .perrow__label{color:#9fb3a6}.is-dark .perrow__select{background:#132019;border-color:rgba(110,231,183,.20)}.card{--card-pad-top:24px;--tape-overlap:16px;position:relative;background:#fff;border:1px solid #e3e6ea;border-radius:3px;padding:var(--card-pad-top) 12px 26px;box-shadow:0 1px 3px rgba(0,0,0,.10),0 6px 18px rgba(0,0,0,.07);transition:transform .16s ease,box-shadow .16s ease}.card:hover,.card:focus-within{transform:translateY(-3px);box-shadow:0 3px 8px rgba(0,0,0,.14),0 12px 28px rgba(0,0,0,.10);outline:2px solid #2f6fdb;outline-offset:2px}.is-dark .card:hover,.is-dark .card:focus-within{outline-color:#5aa0ff}@media (hover:none){.card:hover,.card:focus-within{transform:none;outline:none}}.is-dark .card{background:#132019;border-color:rgba(110,231,183,.20)}.tape{box-sizing:border-box;position:absolute;left:50%;transform:translateX(-50%);z-index:2;font-size:10.5px;font-weight:600;letter-spacing:.02em;cursor:pointer;border:1px solid rgba(0,0,0,.08);background:#eef2f6;color:#23303c}.is-dark .tape{background:#1d2b23;color:#cfe9d9;border-color:rgba(255,255,255,.10)}.tape-h{top:calc(var(--card-pad-top,24px) - var(--tape-overlap,16px));transform:translateX(-50%);width:82%;padding:4px 8px;border-radius:999px;display:flex;align-items:center;justify-content:center;gap:5px}.tape-h:hover{background:#e2e8ee}.hcount{font-weight:800;font-variant-numeric:tabular-nums}.hsep{opacity:.45}.hlabel{font-weight:600}.card.is-last{box-shadow:0 0 0 2px #10b981,0 6px 18px rgba(0,0,0,.10)}.card.is-last .tape-h{background:#10b981;color:#04241a;border-color:#10b981}.pfs{position:absolute;top:calc(100% - var(--tape-overlap,16px));left:50%;transform:translateX(-50%);width:82%;max-width:82%;min-width:0;box-sizing:border-box;margin:0;padding:0 4px 3px;border:1px solid rgba(0,0,0,.14);border-radius:2px;background:#fff;display:flex;flex-wrap:wrap;gap:2px;justify-content:center;box-shadow:0 1px 4px rgba(0,0,0,.10)}.pfs > .pbtn{flex:0 1 auto;min-width:0;white-space:normal;overflow-wrap:break-word;text-align:center;line-height:1.2}.is-dark .pfs{background:#132019;border-color:rgba(110,231,183,.24)}.pstocks{top:100%;margin-top:calc(var(--pstocks-gap,20px) - 11px);width:92%;max-width:92%;box-sizing:border-box;padding:3px;border-radius:2px;background:#fff;display:flex;flex-wrap:wrap;gap:3px;justify-content:center;box-shadow:0 1px 4px rgba(0,0,0,.10);cursor:default}.is-dark .pstocks{background:#132019;border-color:rgba(110,231,183,.24)}.card.has-tape-open{z-index:5}.pstocks{box-shadow:0 2px 10px rgba(0,0,0,.18)}.pfs > legend{margin:0 auto;padding:0 5px;font-size:8px;text-transform:uppercase;letter-spacing:.6px;font-weight:700;color:#8a93a0}.is-dark .pfs > legend{color:#7f9c8c}.pbtn{position:relative;flex:1;border:0;background:none;color:#5b6672;font:inherit;font-size:10.5px;font-weight:600;padding:2px 6px 3px;cursor:pointer;white-space:nowrap;transition:color .15s}.pbtn::after{content:"";position:absolute;left:6px;right:6px;bottom:0;height:2px;border-radius:2px;background:transparent;transition:background .15s}.pbtn:hover{color:#10b981}.pbtn:hover::after{background:#10b981}.pbtn-deck[aria-expanded="true"]{color:#10b981}.pbtn-deck::before{content:"\\25B8";display:inline-block;margin-right:3px;font-size:8px;transition:transform .15s}.pbtn-deck[aria-expanded="true"]::before{transform:rotate(90deg)}.pstock{flex:0 1 auto;min-width:0;max-width:100%;border:1px solid #d8dde3;border-radius:3px;background:#fff;color:#5b6672;font:inherit;font-size:9.5px;font-weight:600;padding:2px 5px;cursor:pointer;line-height:1.25;white-space:normal;overflow-wrap:break-word}.pstock:hover{border-color:#10b981;color:#10b981}.pstock.is-on{border-color:#10b981;color:#0b7a5b;background:rgba(16,185,129,.10)}@media (pointer:coarse){.pbtn{min-height:24px}.pstock{min-height:24px}.tape-h{min-height:24px}}.img.is-clickable{cursor:zoom-in}.img.is-clickable:hover{outline:2px solid #38bdf8;outline-offset:-2px}.img.is-clickable:focus-visible{outline:2px solid #38bdf8;outline-offset:-2px}.is-dark .pstock{background:#12211a;border-color:#2c4a3b;color:#9fb3a8}.is-dark .pbtn{color:#9fb3a8}.sec{max-width:1180px;margin:0 auto;padding-bottom:44px}.sec-head{display:flex;align-items:baseline;gap:10px;margin:0 2px 14px;padding:11px 10px 9px;border-bottom:1px solid rgba(0,0,0,.10);position:sticky;top:0;z-index:6;background:#f6f7f9;box-shadow:0 6px 10px -8px rgba(0,0,0,.35);border-radius:4px 4px 0 0}.is-dark .sec-head{border-bottom-color:rgba(255,255,255,.12);background:#0a1410;box-shadow:0 6px 10px -8px rgba(0,0,0,.7)}.sec-head::before{content:"";position:absolute;left:-20px;right:-20px;bottom:100%;height:var(--wall-pad-top,0px);background:inherit;pointer-events:none}.wall--embedded .sec-head::before{display:none}.sec-head.is-shut{border-bottom-color:transparent;margin-bottom:6px}.sec-head.is-toggle{cursor:pointer;user-select:none;width:100%;text-align:left;border-top:0;border-left:0;border-right:0;font:inherit;color:inherit}.sec-head.is-toggle:hover .sec-name{color:#10b981}.sec-caret{display:inline-block;width:12px;font-size:10px;opacity:.55;transition:transform .18s ease}.sec-caret.is-open{transform:rotate(90deg)}.sec-name{margin:0;font-size:15px;font-weight:700;letter-spacing:.01em}.sec-count{font-size:11px;opacity:.6;font-variant-numeric:tabular-nums}.main{--banner-pad-top:24px;--banner-pad-bottom:24px;position:relative;aspect-ratio:1/1;border:1px solid #dfe3e7;overflow:visible;padding:var(--banner-pad-top) 10px var(--banner-pad-bottom);background:#fbfcfd;display:flex;align-items:center;justify-content:center}.is-dark .main{background:#0c1712;border-color:rgba(255,255,255,.08)}.img{width:100%;height:100%;object-fit:contain;display:block}.ph{padding:14px 10px;text-align:center}.ph-label{font-size:12.5px;font-weight:700;line-height:1.3}.ph-count{margin-top:5px;font-size:11px;opacity:.7}.ph-note{margin-top:10px;font-size:9.5px;text-transform:uppercase;letter-spacing:.09em;opacity:.45}.ph.is-soon{background:rgba(245,158,11,.06)}.ph-soon{margin-top:9px;font-size:10px;line-height:1.45;color:#8a6414}.is-dark .ph-soon{color:#e8b862}.modal-scrim{position:fixed;inset:0;z-index:1000;background:rgba(8,12,16,.55);display:grid;place-items:center;padding:22px}.modal{width:min(340px,100%);background:#fff;color:#0f1419;border-radius:14px;padding:20px 22px;box-shadow:0 10px 40px rgba(0,0,0,.35);text-align:center}.is-dark .modal{background:#132019;color:#e5e7eb}.modal-kind{font-size:10px;text-transform:uppercase;letter-spacing:.1em;opacity:.55}.modal-title{margin:3px 0 14px;font-size:15px;font-weight:700;line-height:1.3}.bar{height:5px;border-radius:99px;background:rgba(0,0,0,.10);overflow:hidden}.is-dark .bar{background:rgba(255,255,255,.12)}.bar-fill{height:100%;background:#10b981;border-radius:99px;transition:width .25s ease}.modal-phase{margin-top:10px;font-size:12.5px;font-weight:600}.modal-hint{margin-top:6px;font-size:11px;line-height:1.5;opacity:.62}.modal-soon{font-size:13px;line-height:1.5;color:#5f5849;margin:6px 0 14px}.modal-err{font-size:12.5px;line-height:1.55;color:#b42318;margin-bottom:14px}.is-dark .modal-err{color:#fda29b}.modal-btn{border:1px solid rgba(0,0,0,.14);background:transparent;color:inherit;font:inherit;font-size:12.5px;padding:6px 18px;border-radius:8px;cursor:pointer}.modal-btn:hover{background:rgba(0,0,0,.06)}`,"doxa-poster-wall"),(B,X)=>(Y(),ae("div",{ref_key:"wallEl",ref:z,class:De(["wall",{"is-dark":e.isDark,"wall--embedded":e.embedded}])},[E("h2",L5,se(e.heading),1),e.tag?(Y(),ae("div",C5,se(e.tag),1)):Le("",!0),e.intro?(Y(),ae("p",{key:1,class:"wall-sub",innerHTML:e.intro},null,8,T5)):Le("",!0),(Y(!0),ae(He,null,Mt(h.value,P=>(Y(),ae("section",{key:P.name,class:"sec"},[e.sectionHeads?(Y(),tt(Cl(e.collapsible?"button":"div"),{key:0,class:De(["sec-head",{"is-toggle":e.collapsible,"is-shut":e.collapsible&&w(P.name)}]),type:e.collapsible?"button":null,"aria-expanded":e.collapsible?String(!w(P.name)):null,onClick:L=>e.collapsible&&v(P.name)},{default:no(()=>[e.collapsible?(Y(),ae("span",{key:0,class:De(["sec-caret",{"is-open":!w(P.name)}])},"▶",2)):Le("",!0),E("h3",E5,se(P.name),1),E("span",R5,se(d("wall.peopleGroupCount",P.total))+" · "+se(x(P.items.length)),1)]),_:2},1032,["class","type","aria-expanded","onClick"])):Le("",!0),e.columnsControl&&!w(P.name)?(Y(),ae("div",M5,[E("label",{class:"perrow__label",for:`perrow-${e.instanceId}-${P.name}`},se(ce(R)("buttons.postersPerRow")),9,N5),fo(E("select",{id:`perrow-${e.instanceId}-${P.name}`,class:"perrow__select","onUpdate:modelValue":X[0]||(X[0]=L=>n.value=L)},[(Y(),ae(He,null,Mt(a,L=>E("option",{key:L,value:L},se(L===bs?ce(R)("buttons.postersPerRowAuto"):L),9,I5)),64))],8,F5),[[Yr,n.value,void 0,{number:!0}]])])):Le("",!0),fo(E("div",{class:"grid",style:nt(l.value)},[(Y(!0),ae(He,null,Mt(P.items,L=>(Y(),ae("div",{key:L.id,class:De(["card",{"is-last":T.value===L.id,"has-tape-open":we.value===pe(L.id,"deck")||we.value===pe(L.id,"packet")}]),"data-list-id":L.id},[E("button",{type:"button",class:"tape tape-h","aria-pressed":T.value===L.id?"true":"false","aria-label":ce(R)("buttons.showOnMapAria",{label:L.label}),onClick:K=>G(L)},[E("span",z5,se(L.count)+" "+se(e.unit),1),X[2]||(X[2]=E("span",{class:"hsep"},"·",-1)),E("span",G5,se(ce(R)("buttons.showOnMap")),1)],8,D5),E("div",j5,[e.unsupported(L)?(Y(),ae("div",B5,[E("div",U5,se(L.label),1),L.count?(Y(),ae("div",H5,se(d("wall.peopleGroupCount",L.count)),1)):Le("",!0),E("div",W5,se(e.unsupported(L)),1)])):S.value[L.id]?(Y(),ae("div",K5,[E("div",q5,se(L.label),1),L.count?(Y(),ae("div",Y5,se(d("wall.peopleGroupCount",L.count)),1)):Le("",!0),E("div",Z5,se(t("poster.preview_unavailable","preview unavailable")),1)])):(Y(),ae("img",{key:1,class:De(["img",{"is-clickable":xe.value}]),src:y(L.id),alt:xe.value?p("wall.posterAltAction","{label} — prayer poster (click to preview and print)",{label:L.label}):p("wall.posterAlt","{label} — prayer poster",{label:L.label}),loading:"lazy",decoding:"async",role:xe.value?"button":null,tabindex:xe.value?0:null,title:xe.value?ce(R)("buttons.previewPrintPoster",{label:L.label}):null,onClick:K=>xe.value&&A(L),onKeydown:[qp(ct(K=>xe.value&&A(L),["prevent"]),["enter"]),qp(ct(K=>xe.value&&A(L),["prevent"]),["space"])],onError:K=>m(L.id)},null,42,V5)),E("fieldset",X5,[E("legend",null,se(ce(R)("buttons.printOptions")),1),e.hidePrayerListWhenSoon&&!ye.value?Le("",!0):(Y(),ae("button",{key:0,type:"button",class:"pbtn","aria-expanded":String(we.value===pe(L.id,"packet")),onClick:ct(K=>oe(L.id,K,"packet"),["stop"])},se(ce(R)("buttons.prayerList")),9,J5)),E("button",{type:"button",class:"pbtn",onClick:K=>A(L)},se(ce(R)("buttons.posterMap")),9,Q5),ye.value?(Y(),ae("button",{key:1,type:"button",class:"pbtn pbtn-deck","aria-expanded":String(we.value===pe(L.id,"deck")),onClick:ct(K=>oe(L.id,K,"deck"),["stop"])},se(ce(R)("buttons.cardDeck")),9,e3)):Le("",!0)]),we.value===pe(L.id,"packet")?(Y(),ae("div",{key:3,class:"tape pstocks",role:"group","aria-label":ce(R)("buttons.packetVariantAria")},[(Y(),ae(He,null,Mt(Ae,K=>E("button",{key:K.id,type:"button",class:"pstock",onClick:ct(ne=>N(L,K.id),["stop"])},se(ce(R)(K.labelKey)),9,o3)),64))],8,t3)):Le("",!0),ye.value&&Q.value.length&&we.value===pe(L.id,"deck")?(Y(),ae("div",{key:4,class:"tape pstocks",role:"group","aria-label":ce(R)("buttons.cardStockAria")},[(Y(!0),ae(He,null,Mt(Q.value,K=>(Y(),ae("button",{key:K.id,type:"button",class:De(["pstock",{"is-on":D.value===K.id}]),onClick:ct(ne=>_e(L,K.id),["stop"])},se(U(K.stock)),11,a3))),128))],8,n3)):Le("",!0)])],10,O5))),128))],4),[[Ul,!w(P.name)]])]))),128)),_.value?(Y(),ae("div",{key:2,ref_key:"scrimRef",ref:F,style:nt(ce(k)),class:"modal-scrim",onClick:X[1]||(X[1]=ct(P=>_.value.phase==="error"&&j(),["self"]))},[E("div",r3,[E("div",s3,se(_.value.kind),1),E("div",i3,se(_.value.label),1),_.value.phase==="error"?(Y(),ae(He,{key:0},[E("div",l3,se(_.value.message),1),E("button",{type:"button",class:"modal-btn",onClick:j},se(ce(R)("buttons.close")),1)],64)):_.value.phase==="soon"?(Y(),ae(He,{key:1},[E("div",c3,se(_.value.message),1),E("button",{type:"button",class:"modal-btn",onClick:j},se(ce(R)("buttons.close")),1)],64)):(Y(),ae(He,{key:2},[E("div",u3,[E("div",{class:"bar-fill",style:nt({width:_.value.pct+"%"})},null,4)]),E("div",d3,se(_.value.message),1),E("div",p3,se(ce(R)("buttons.renderingLocal")),1)],64))])],4)):Le("",!0)],2))}},f3={map:{AFG:"AF",ALB:"AL",DZA:"DZ",ASM:"AS",AND:"AD",AGO:"AO",AIA:"AI",ATG:"AG",ARG:"AR",ARM:"AM",ABW:"AW",AUS:"AU",AUT:"AT",AZE:"AZ",BHR:"BH",BGD:"BD",BRB:"BB",BLR:"BY",BEL:"BE",BLZ:"BZ",BEN:"BJ",BMU:"BM",BTN:"BT",BOL:"BO",BES:"BQ",BIH:"BA",BWA:"BW",BRA:"BR",BRN:"BN",BGR:"BG",BFA:"BF",BDI:"BI",CPV:"CV",KHM:"KH",CMR:"CM",CAN:"CA",CYM:"KY",CAF:"CF",TCD:"TD",CHL:"CL",CHN:"CN",CXR:"CX",CCK:"CC",COL:"CO",COM:"KM",COK:"CK",CRI:"CR",CIV:"CI",HRV:"HR",CUB:"CU",CUW:"CW",CYP:"CY",DNK:"DK",DJI:"DJ",DMA:"DM",DOM:"DO",ECU:"EC",EGY:"EG",SLV:"SV",GNQ:"GQ",ERI:"ER",EST:"EE",SWZ:"SZ",ETH:"ET",FLK:"FK",FRO:"FO",FJI:"FJ",FIN:"FI",FRA:"FR",GUF:"GF",PYF:"PF",GAB:"GA",GEO:"GE",DEU:"DE",GHA:"GH",GIB:"GI",GRC:"GR",GRL:"GL",GRD:"GD",GLP:"GP",GUM:"GU",GTM:"GT",GGY:"GG",GIN:"GN",GNB:"GW",GUY:"GY",HTI:"HT",HND:"HN",HKG:"HK",HUN:"HU",ISL:"IS",IND:"IN",IDN:"ID",IRN:"IR",IRQ:"IQ",IRL:"IE",IMN:"IM",ISR:"IL",ITA:"IT",JAM:"JM",JPN:"JP",JEY:"JE",JOR:"JO",KAZ:"KZ",KEN:"KE",KIR:"KI",KOS:"XK",KWT:"KW",KGZ:"KG",LAO:"LA",LVA:"LV",LBN:"LB",LSO:"LS",LBR:"LR",LBY:"LY",LIE:"LI",LTU:"LT",LUX:"LU",MAC:"MO",MDG:"MG",MWI:"MW",MYS:"MY",MLI:"ML",MLT:"MT",MTQ:"MQ",MRT:"MR",MUS:"MU",MYT:"YT",MEX:"MX",MDA:"MD",MCO:"MC",MNG:"MN",MNE:"ME",MSR:"MS",MAR:"MA",MOZ:"MZ",MMR:"MM",NAM:"NA",NRU:"NR",NPL:"NP",NCL:"NC",NZL:"NZ",NIC:"NI",NER:"NE",NGA:"NG",NIU:"NU",NFK:"NF",PRK:"KP",MKD:"MK",NOR:"NO",OMN:"OM",PAK:"PK",PLW:"PW",PSE:"PS",PAN:"PA",PNG:"PG",PRY:"PY",PER:"PE",POL:"PL",PRT:"PT",PRI:"PR",QAT:"QA",REU:"RE",ROU:"RO",RWA:"RW",BLM:"BL",SHN:"SH",KNA:"KN",LCA:"LC",MAF:"MF",SPM:"PM",VCT:"VC",WSM:"WS",SMR:"SM",STP:"ST",SAU:"SA",SEN:"SN",SRB:"RS",SYC:"SC",SLE:"SL",SGP:"SG",SXM:"SX",SVK:"SK",SVN:"SI",SOM:"SO",ZAF:"ZA",KOR:"KR",SSD:"SS",ESP:"ES",LKA:"LK",SDN:"SD",SUR:"SR",SJM:"SJ",SWE:"SE",CHE:"CH",SYR:"SY",TWN:"TW",TJK:"TJ",TZA:"TZ",THA:"TH",BHS:"BS",VGB:"VG",CZE:"CZ",COD:"CD",FSM:"FM",GMB:"GM",MDV:"MV",MHL:"MH",NLD:"NL",MNP:"MP",PHL:"PH",PCN:"PN",COG:"CG",RUS:"RU",SLB:"SB",TCA:"TC",ARE:"AE",GBR:"GB",USA:"US",VIR:"VI",TLS:"TL",TGO:"TG",TKL:"TK",TON:"TO",TTO:"TT",TUN:"TN",TUR:"TR",TKM:"TM",TUV:"TV",UGA:"UG",UKR:"UA",URY:"UY",UZB:"UZ",VUT:"VU",VAT:"VA",VEN:"VE",VNM:"VN",WLF:"WF",ESH:"EH",YEM:"YE",ZMB:"ZM",ZWE:"ZW"}},bm=[{value:"AFG",label:"Afghanistan"},{value:"ALB",label:"Albania"},{value:"DZA",label:"Algeria"},{value:"ASM",label:"American Samoa"},{value:"AND",label:"Andorra"},{value:"AGO",label:"Angola"},{value:"AIA",label:"Anguilla"},{value:"ATG",label:"Antigua and Barbuda"},{value:"ARG",label:"Argentina"},{value:"ARM",label:"Armenia"},{value:"ABW",label:"Aruba"},{value:"AUS",label:"Australia"},{value:"AUT",label:"Austria"},{value:"AZE",label:"Azerbaijan"},{value:"BHR",label:"Bahrain"},{value:"BGD",label:"Bangladesh"},{value:"BRB",label:"Barbados"},{value:"BLR",label:"Belarus"},{value:"BEL",label:"Belgium"},{value:"BLZ",label:"Belize"},{value:"BEN",label:"Benin"},{value:"BMU",label:"Bermuda"},{value:"BTN",label:"Bhutan"},{value:"BOL",label:"Bolivia"},{value:"BES",label:"Bonaire, Sint Eustatius, and Saba"},{value:"BIH",label:"Bosnia and Herzegovina"},{value:"BWA",label:"Botswana"},{value:"BRA",label:"Brazil"},{value:"BRN",label:"Brunei"},{value:"BGR",label:"Bulgaria"},{value:"BFA",label:"Burkina Faso"},{value:"BDI",label:"Burundi"},{value:"CPV",label:"Cabo Verde"},{value:"KHM",label:"Cambodia"},{value:"CMR",label:"Cameroon"},{value:"CAN",label:"Canada"},{value:"CYM",label:"Cayman Islands"},{value:"CAF",label:"Central African Republic"},{value:"TCD",label:"Chad"},{value:"CHL",label:"Chile"},{value:"CHN",label:"China"},{value:"CXR",label:"Christmas Island"},{value:"CCK",label:"Cocos (Keeling) Islands"},{value:"COL",label:"Colombia"},{value:"COM",label:"Comoros"},{value:"COK",label:"Cook Islands"},{value:"CRI",label:"Costa Rica"},{value:"CIV",label:"Côte d’Ivoire"},{value:"HRV",label:"Croatia"},{value:"CUB",label:"Cuba"},{value:"CUW",label:"Curaçao"},{value:"CYP",label:"Cyprus"},{value:"DNK",label:"Denmark"},{value:"DJI",label:"Djibouti"},{value:"DMA",label:"Dominica"},{value:"DOM",label:"Dominican Republic"},{value:"ECU",label:"Ecuador"},{value:"EGY",label:"Egypt"},{value:"SLV",label:"El Salvador"},{value:"GNQ",label:"Equatorial Guinea"},{value:"ERI",label:"Eritrea"},{value:"EST",label:"Estonia"},{value:"SWZ",label:"Eswatini"},{value:"ETH",label:"Ethiopia"},{value:"FLK",label:"Falkland Islands (Islas Malvinas)"},{value:"FRO",label:"Faroe Islands"},{value:"FJI",label:"Fiji"},{value:"FIN",label:"Finland"},{value:"FRA",label:"France"},{value:"GUF",label:"French Guiana"},{value:"PYF",label:"French Polynesia"},{value:"GAB",label:"Gabon"},{value:"GEO",label:"Georgia"},{value:"DEU",label:"Germany"},{value:"GHA",label:"Ghana"},{value:"GIB",label:"Gibraltar"},{value:"GRC",label:"Greece"},{value:"GRL",label:"Greenland"},{value:"GRD",label:"Grenada"},{value:"GLP",label:"Guadeloupe"},{value:"GUM",label:"Guam"},{value:"GTM",label:"Guatemala"},{value:"GGY",label:"Guernsey"},{value:"GIN",label:"Guinea"},{value:"GNB",label:"Guinea-Bissau"},{value:"GUY",label:"Guyana"},{value:"HTI",label:"Haiti"},{value:"HND",label:"Honduras"},{value:"HKG",label:"Hong Kong"},{value:"HUN",label:"Hungary"},{value:"ISL",label:"Iceland"},{value:"IND",label:"India"},{value:"IDN",label:"Indonesia"},{value:"IRN",label:"Iran"},{value:"IRQ",label:"Iraq"},{value:"IRL",label:"Ireland"},{value:"IMN",label:"Isle of Man"},{value:"ISR",label:"Israel"},{value:"ITA",label:"Italy"},{value:"JAM",label:"Jamaica"},{value:"JPN",label:"Japan"},{value:"JEY",label:"Jersey"},{value:"JOR",label:"Jordan"},{value:"KAZ",label:"Kazakhstan"},{value:"KEN",label:"Kenya"},{value:"KIR",label:"Kiribati"},{value:"KOS",label:"Kosovo"},{value:"KWT",label:"Kuwait"},{value:"KGZ",label:"Kyrgyzstan"},{value:"LAO",label:"Laos"},{value:"LVA",label:"Latvia"},{value:"LBN",label:"Lebanon"},{value:"LSO",label:"Lesotho"},{value:"LBR",label:"Liberia"},{value:"LBY",label:"Libya"},{value:"LIE",label:"Liechtenstein"},{value:"LTU",label:"Lithuania"},{value:"LUX",label:"Luxembourg"},{value:"MAC",label:"Macao"},{value:"MDG",label:"Madagascar"},{value:"MWI",label:"Malawi"},{value:"MYS",label:"Malaysia"},{value:"MLI",label:"Mali"},{value:"MLT",label:"Malta"},{value:"MTQ",label:"Martinique"},{value:"MRT",label:"Mauritania"},{value:"MUS",label:"Mauritius"},{value:"MYT",label:"Mayotte"},{value:"MEX",label:"Mexico"},{value:"MDA",label:"Moldova"},{value:"MCO",label:"Monaco"},{value:"MNG",label:"Mongolia"},{value:"MNE",label:"Montenegro"},{value:"MSR",label:"Montserrat"},{value:"MAR",label:"Morocco"},{value:"MOZ",label:"Mozambique"},{value:"MMR",label:"Myanmar"},{value:"NAM",label:"Namibia"},{value:"NRU",label:"Nauru"},{value:"NPL",label:"Nepal"},{value:"NCL",label:"New Caledonia"},{value:"NZL",label:"New Zealand"},{value:"NIC",label:"Nicaragua"},{value:"NER",label:"Niger"},{value:"NGA",label:"Nigeria"},{value:"NIU",label:"Niue"},{value:"NFK",label:"Norfolk Island"},{value:"PRK",label:"North Korea"},{value:"MKD",label:"North Macedonia"},{value:"NOR",label:"Norway"},{value:"OMN",label:"Oman"},{value:"PAK",label:"Pakistan"},{value:"PLW",label:"Palau"},{value:"PSE",label:"Palestine"},{value:"PAN",label:"Panama"},{value:"PNG",label:"Papua New Guinea"},{value:"PRY",label:"Paraguay"},{value:"PER",label:"Peru"},{value:"POL",label:"Poland"},{value:"PRT",label:"Portugal"},{value:"PRI",label:"Puerto Rico"},{value:"QAT",label:"Qatar"},{value:"REU",label:"Reunion"},{value:"ROU",label:"Romania"},{value:"RWA",label:"Rwanda"},{value:"BLM",label:"Saint Barthelemy"},{value:"SHN",label:"Saint Helena, Ascension, and Tristan da Cunha"},{value:"KNA",label:"Saint Kitts and Nevis"},{value:"LCA",label:"Saint Lucia"},{value:"MAF",label:"Saint Martin"},{value:"SPM",label:"Saint Pierre and Miquelon"},{value:"VCT",label:"Saint Vincent and the Grenadines"},{value:"WSM",label:"Samoa"},{value:"SMR",label:"San Marino"},{value:"STP",label:"Sao Tome and Principe"},{value:"SAU",label:"Saudi Arabia"},{value:"SEN",label:"Senegal"},{value:"SRB",label:"Serbia"},{value:"SYC",label:"Seychelles"},{value:"SLE",label:"Sierra Leone"},{value:"SGP",label:"Singapore"},{value:"SXM",label:"Sint Maarten"},{value:"SVK",label:"Slovakia"},{value:"SVN",label:"Slovenia"},{value:"SOM",label:"Somalia"},{value:"ZAF",label:"South Africa"},{value:"KOR",label:"South Korea"},{value:"SSD",label:"South Sudan"},{value:"ESP",label:"Spain"},{value:"LKA",label:"Sri Lanka"},{value:"SDN",label:"Sudan"},{value:"SUR",label:"Suriname"},{value:"SJM",label:"Svalbard"},{value:"SWE",label:"Sweden"},{value:"CHE",label:"Switzerland"},{value:"SYR",label:"Syria"},{value:"TWN",label:"Taiwan"},{value:"TJK",label:"Tajikistan"},{value:"TZA",label:"Tanzania"},{value:"THA",label:"Thailand"},{value:"BHS",label:"The Bahamas"},{value:"VGB",label:"the British Virgin Islands"},{value:"CZE",label:"the Czech Republic"},{value:"COD",label:"the Democratic Republic of the Congo"},{value:"FSM",label:"the Federated States of Micronesia"},{value:"GMB",label:"The Gambia"},{value:"MDV",label:"the Maldives"},{value:"MHL",label:"the Marshall Islands"},{value:"NLD",label:"the Netherlands"},{value:"MNP",label:"the Northern Mariana Islands"},{value:"PHL",label:"the Philippines"},{value:"PCN",label:"the Pitcairn Islands"},{value:"COG",label:"the Republic of the Congo"},{value:"RUS",label:"the Russian Federation"},{value:"SLB",label:"the Solomon Islands"},{value:"TCA",label:"the Turks and Caicos Islands"},{value:"ARE",label:"the United Arab Emirates"},{value:"GBR",label:"the United Kingdom"},{value:"USA",label:"the United States"},{value:"VIR",label:"the Virgin Islands"},{value:"TLS",label:"Timor-Leste"},{value:"TGO",label:"Togo"},{value:"TKL",label:"Tokelau"},{value:"TON",label:"Tonga"},{value:"TTO",label:"Trinidad and Tobago"},{value:"TUN",label:"Tunisia"},{value:"TUR",label:"Turkiye"},{value:"TKM",label:"Turkmenistan"},{value:"TUV",label:"Tuvalu"},{value:"UGA",label:"Uganda"},{value:"UKR",label:"Ukraine"},{value:"URY",label:"Uruguay"},{value:"UZB",label:"Uzbekistan"},{value:"VUT",label:"Vanuatu"},{value:"VAT",label:"Vatican City"},{value:"VEN",label:"Venezuela"},{value:"VNM",label:"Vietnam"},{value:"WLF",label:"Wallis and Futuna"},{value:"ESH",label:"Western Sahara"},{value:"YEM",label:"Yemen"},{value:"ZMB",label:"Zambia"},{value:"ZWE",label:"Zimbabwe"}],_m=f3.map,$m=new Map(bm.map(e=>[e.value,e.label])),m3=new Map(bm.map(e=>[String(e.label).trim().toLowerCase(),e.value]));function b3(e){return e?_m[String(e).toUpperCase()]:void 0}function _3(e){if(e)return m3.get(String(e).trim().toLowerCase())}function $3(e){return e?$m.get(String(e).toUpperCase()):void 0}const Au=new Map;function y3(e){const t=e||"en";if(Au.has(t))return Au.get(t);let o=null;try{o=new Intl.DisplayNames([t],{type:"region"})}catch{o=null}return Au.set(t,o),o}function Lu(e,t){const o=e?String(e).toUpperCase():"",n=_m[o],a=$m.get(o)||o;if(!n||!/^[A-Z]{2}$/.test(n))return a;const r=y3(t);if(!r)return a;try{const s=r.of(n);return s&&s!==n?s:a}catch{return a}}const ym=Object.freeze(Object.defineProperty({__proto__:null,alpha2Of:b3,countryName:Lu,default:Lu,englishName:$3,iso3ForEnglishName:_3},Symbol.toStringTag,{value:"Module"})),v3=Object.freeze(Object.defineProperty({__proto__:null,default:{__name:"country-poster-wall",setup(e){const t=ze("profileConfig",be(null)),o=J(()=>{var v;return((v=t.value)==null?void 0:v.instanceId)||"country-posters-wall"}),n=J(()=>{var v;return((v=t.value)==null?void 0:v.isDark)===!0}),a=J(()=>Li(t.value)),{locale:r}=as(""),s=new Map((Ai.countries||[]).map(v=>[v.id,v])),i=J(()=>{const v=r&&(r.value??r),T=typeof v=="string"&&v||ns()||wa()||"en",S=Ai.countries||[];return/^en\b/i.test(T)?S:S.map(z=>{const V=Lu(z.iso3,T);return V&&V!==z.iso3?{...z,label:V}:z})}),l=Ff({apiBase:()=>{var v;return((v=t.value)==null?void 0:v.apiBaseUrl)||ps()},lang:()=>ns()||wa(),profileConfig:t}),c=v=>l({type:"country",values:[v.iso3]});async function u(v,T){const S=s.get(v.id)||v,[{generateCountrySheet:z},{ISO3_NAME:V},G]=await Promise.all([ut(()=>Promise.resolve().then(()=>ZC),void 0),ut(()=>Promise.resolve().then(()=>_0),void 0),c(S)]),_=(Ai.countries||[]).filter(k=>k.sheet===S.sheet),F={totalGroups:_.reduce((k,A)=>k+(A.count||0),0),totalLists:_.length,index:_.findIndex(k=>k.id===S.id)+1};return z({country:S,records:G,assetsBase:a.value,ISO3_NAME:V,format:T,series:F})}const d=()=>ut(()=>Promise.resolve().then(()=>_0),void 0).then(v=>v.ISO3_NAME);async function p(v){const T=new URL(`${a.value}/previews/${v.id}.webp`,document.baseURI).href;return await fetch(T,{method:"HEAD",cache:"force-cache"}).then(z=>z.ok).catch(()=>!1)?T:null}const x=xi(""),C=v=>String(v).toLowerCase().replace(/\s+/g,"_"),$=v=>{if(!v.region||v.region==="Other")return x("dashboard.other");const T=`dashboard.wagfRegion.${C(v.region)}`,S=x(T);return S&&S!==T?S:v.region},g=v=>v.total<60,y=v=>v.unsupportedReason?x("messages.countryPosterTooMany"):null,m=v=>String(v).replace(/&/g,"&").replace(//g,">"),h=J(()=>x("messages.countryWallHeading")),b=J(()=>x("messages.upg100WallTag")),f=J(()=>`${m(x("messages.countryWallIntroA"))}${m(x("messages.upg100WallIntroEmph"))}${m(x("messages.countryWallIntroB"))}`),w=J(()=>x("messages.countryWallSoon"));return(v,T)=>(Y(),tt(h3,{items:i.value,"group-by":$,"instance-id":o.value,"is-dark":n.value,"assets-base":a.value,"event-name":"doxa-country-posters:show-on-map",heading:h.value,tag:b.value,intro:f.value,unit:"UPG","item-count-key":"regions.countryCount",records:c,"card-stocks":!0,sheet:u,"iso3-names":d,"map-image":p,collapsible:!0,"collapsed-by":g,unsupported:y,"prayer-list-soon-message":w.value,"download-prefix":"doxa-country"},null,8,["items","instance-id","is-dark","assets-base","heading","tag","intro","prayer-list-soon-message"]))}}},Symbol.toStringTag,{value:"Module"})),w3=` +`,"countries-map");const i=ze("profileConfig"),l=Rh(i),c=J(()=>{var O;return((O=i==null?void 0:i.value)==null?void 0:O.search)===!1?!1:l==="mapbox"}),u=J(()=>c.value?null:Qf((F==null?void 0:F.value)??F)?"56px":"14px"),d=ze("mapboxToken"),p=ze("dataSource");ze("colorSet");const x=ze("instanceId",null),C=(()=>{var Z;const O=(Z=i==null?void 0:i.value)==null?void 0:Z.locale;return O&&tr.includes(O)?O:null})(),{locale:$,t:g,te:y}=Tt();C&&($.value=C);function m(O){const Z="tabs."+((O==null?void 0:O.i18nKey)||(O==null?void 0:O.id));return O&&y(Z)?g(Z):(O==null?void 0:O.label)??""}const h=ze("mapStore"),b=ze("dataStore"),f=ze("uiStore"),w=sw(f),v={doxaRegions:!0,adoption:!1,share:!1,hamburgerMenu:!1,geocoderPersistAcrossTabs:!1},S=[{id:"doxa-regions",label:"Countries",colorStrategy:"doxaRegion",legend:"doxa-regions",popup:"pray",feature:"doxaRegions"}].filter(O=>!O.feature||v[O.feature]),z=J(()=>S),V=J(()=>!1),G=be(sm),_=J(()=>z.value.find(O=>O.id===G.value)??z.value[0]),F=J(()=>{var O;return((O=_.value)==null?void 0:O.legend)??"default"}),k=J(()=>{var O;return((O=_.value)==null?void 0:O.popup)??"pray"}),A=J(()=>{var O,Z,fe,Se;return((O=_.value)==null?void 0:O.id)==="language-families"?"Search language family, language, dialect/variety":((Z=_.value)==null?void 0:Z.id)==="affinity-blocks"?"Search affinity bloc, cluster, people group":((fe=_.value)==null?void 0:fe.id)==="doxa-regions"?g("search.placeholderRegions"):((Se=_.value)==null?void 0:Se.id)==="religion"?"Search religion, people group":""}),M={"affinity-blocks":"people-groups",prayer:"people-groups",adoption:"people-groups",engagement:"people-groups","language-families":"language","doxa-regions":"regions",religion:"religion"},R=J(()=>{var O;return M[(O=_.value)==null?void 0:O.id]||""}),W=(x==null?void 0:x.value)||x||"research-map-"+Date.now().toString(36)+"-"+Math.random().toString(36).slice(2,8);Gt("mapId",W);const D=be(null),Q=be(null),U=be(null),ie=new Map;Ue(()=>G==null?void 0:G.value,async(O,Z)=>{var Se,Re,We,ot,Ge;if(Z!==void 0&&O!==Z){Z&&ie.set(Z,f.legendState);const Ze=ie.get(O)||(f.isMobile?"collapsed":"open");Ze==="fullyOpen"?(Se=f.fullyOpenLegend)==null||Se.call(f):Ze==="open"?(Re=f.openLegend)==null||Re.call(f):(We=f.collapseLegend)==null||We.call(f)}await co();const fe=(ot=Q.value)==null?void 0:ot.querySelector(".rm-tab.active");(Ge=fe==null?void 0:fe.scrollIntoView)==null||Ge.call(fe,{inline:"center",block:"nearest",behavior:"smooth"})});const ye=be(null),xe=be(!1),we=be(null),{map:pe,isMapReady:oe,initializeMap:_e,destroy:me}=Uw({containerRef:ye,accessToken:d.value,style:((mn=i==null?void 0:i.value)==null?void 0:mn.style)??w.bootStyle(),config:w.bootConfig,center:((Yo=i==null?void 0:i.value)==null?void 0:Yo.center)??Ro.center??[20,10],zoom:((Zo=i==null?void 0:i.value)==null?void 0:Zo.zoom)??Ro.zoom??1.8,pitch:((ws=i==null?void 0:i.value)==null?void 0:ws.pitch)??Ro.pitch??0,bearing:((nl=i==null?void 0:i.value)==null?void 0:nl.bearing)??Ro.bearing??0,minZoom:((_r=i==null?void 0:i.value)==null?void 0:_r.minZoom)??Ro.minZoom??.5,maxZoom:b5}),Ae=new Hf({sourcesConfig:ka,locale:C,profileConfig:i}),N=ex({mapId:W,dataSourceId:p.value,dataSourceManager:Ae,dataStore:b,markRaw:O=>O});async function H(O){const Z=String(O||"").trim().toUpperCase();if(Z.length!==3)return;await zn();const fe=pe.value;if(!fe||!fe.getLayer("regions-fill"))return;fe.setLayoutProperty("regions-fill","visibility","visible"),fe.setLayoutProperty("regions-border","visibility","visible");const Se=["literal",[Z]];fe.setPaintProperty("regions-fill","fill-opacity",["case",["in",["get","iso_3166_1_alpha_3"],Se],.3,.02]),fe.setPaintProperty("regions-border","line-color",["case",["in",["get","iso_3166_1_alpha_3"],Se],"#111827","rgba(60,60,80,0.15)"]),fe.setPaintProperty("regions-border","line-width",["case",["in",["get","iso_3166_1_alpha_3"],Se],2.5,.3]),fe.getLayer("language-family-pins")&&fe.moveLayer("language-family-pins")}const I=Sk({getMap:()=>pe.value,mapId:W,getLanguageFamilyColor:O=>{var fe,Se;const Z=dn((fe=_.value)==null?void 0:fe.colorStrategy);return((Se=Z==null?void 0:Z.colors)==null?void 0:Se[O])??(Z==null?void 0:Z.fallback)??"#7c8cf8"},getNormalizedPeopleGroups:()=>N.normalizedPeopleGroups.value||[]});Lf({getMap:()=>pe.value,mapId:W,getLanguageFamilyColor:()=>"#7c8cf8",getNormalizedPeopleGroups:()=>N.normalizedPeopleGroups.value||[]});const ee=Ck({getMap:()=>pe.value,mapId:W,mapStore:h,defaultCenter:((ks=i==null?void 0:i.value)==null?void 0:ks.center)??[20,10],defaultZoom:((al=i==null?void 0:i.value)==null?void 0:al.zoom)??1.8}),ge=Ek({getMap:()=>pe.value,getActivePinColor:O=>{var fe,Se;const Z=dn(((fe=_.value)==null?void 0:fe.colorStrategy)??"languageFamily");return((Se=Z==null?void 0:Z.getColor)==null?void 0:Se.call(Z,O))??"#1a1a1a"}});let j=null,B=null;function X(){return j?Promise.resolve(j):(B||(B=ut(()=>Promise.resolve().then(()=>dC),void 0).then(O=>(j=O.useMapClustering({getMap:()=>pe.value,mapId:W,mapStore:h,getPeopleGroups:()=>N.normalizedPeopleGroups.value||[],getClusterColor:()=>{var Z,fe;return((fe=dn((Z=_.value)==null?void 0:Z.colorStrategy))==null?void 0:fe.fallback)??"#7c8cf8"}}),j))),B)}const P={setData(O){var Z;(Z=j==null?void 0:j.setData)==null||Z.call(j,O)},applyFilters(O){var Z;(Z=j==null?void 0:j.applyFilters)==null||Z.call(j,O)},refreshColors(){var O;(O=j==null?void 0:j.refreshColors)==null||O.call(j)},cleanup(){var O;(O=j==null?void 0:j.cleanup)==null||O.call(j)},async setEnabled(O){var Z,fe;(fe=(Z=await X()).setEnabled)==null||fe.call(Z,O)},async setMode(O){var Z,fe;(fe=(Z=await X()).setMode)==null||fe.call(Z,O)},_pendingSelectionFilter:null,setSelectionFilter(O){this._pendingSelectionFilter=O||null,j!=null&&j.setSelectionFilter&&j.setSelectionFilter(O)},flushSelectionFilter(){j!=null&&j.setSelectionFilter&&j.setSelectionFilter(this._pendingSelectionFilter)}},L=hs({});Gt("legendRows",L.items),Gt("normalizedPeopleGroups",N.normalizedPeopleGroups);const K=Ok(()=>pe.value),ne=GS(W);jS(ne);const ke=c5({map:pe,activeTab:_,countryOutline:K,regionIdle:po,mapFly:ee,pplrInstance:ne,mapId:W}),he=ke.clearCountryHighlight,q=ke.flatItemsToStlNodes,re=ke.onLegendRowClick,Te=ke.bridgeSelection,{onPeopleGroupResult:Me,onAggregateResult:et,onClear:vt,clearGeocoderProgrammatic:gt}=tx({map:pe,geocoderRef:U,clustering:P,mapStore:h,uiStore:f,mapLayers:I,pplrInstance:ne,onSemanticTreeSelect:Oe,switchTab:Ra,activeTabId:G,clearAllHighlights:mr,clearCountryHighlight:he,mapId:W,legendRouters:{country:ol,region:vs,religion:Bu}});ne.activeTab.value=2;function Wt(O){return O==="doxa-regions"?2:O==="affinity-block"?0:O==="language-family"?1:0}Ue(F,O=>{ne.activeTab.value=Wt(O)});const Bt={get value(){return N.normalizedPeopleGroups.value||[]}},{langTree:_t}=fu(Bt),It=[{id:"family",label:"Lang Family",info:"A language family is a group of languages descended from a common ancestor (e.g. Indo-European, Afro-Asiatic)."},{id:"language",label:"Language",info:"A language is a system of communication used by a people (e.g. Arabic, Bengali, Hindi)."},{id:"dialect",label:"Dialect/Variety",info:"A dialect/variety is a regional or social form of a language (e.g. Arabic, Sudanese; Pakistan Sign Language)."}],{affinityTree:Mo}=am(Bt),Vo=[{id:"bloc",label:"Affinity Block",info:"Affinity Block (field: rop1) — broadest grouping by cultural/linguistic/geographic kinship. 16 blocks total. Examples: Malay Peoples, South Asian Peoples, Deaf, Arab World."},{id:"cluster",label:"Cluster",info:'Cluster (field: imb_reg_of_people_2, ROP 2) — finer-grained grouping inside a bloc. 194 clusters total. Suffix "(Cluster)" appears on each row to distinguish from PG/PGIC. Example: Borneo-Kalimantan within Malay Peoples.'},{id:"group",label:"People Group",info:'People Group (field: imb_reg_of_people_25, ROP 2.5) — abstract ethnolinguistic identity, country-agnostic. Suffix "(PG)" on each row. 1,736 PGs total; 131 of them have rows in multiple countries (e.g. Deaf in 123 countries). Example: Abai Sungai (PG) is one ROP25 code regardless of where its people live.'},{id:"pgic",label:"PG in Country",info:'PGIC = People Group In Country (field: imb_reg_of_people_3 + country_code) — one row per (people group, country) pair. Suffix "(PGIC)" on each row. 2,106 rows total. Example: "Abai Sungai, Malaysia (PGIC)" is the Abai Sungai PG specifically as it exists in Malaysia.'}],{regionsTree:fn}=rm(Bt),ys=[{id:"region",label:"WAGF Region",info:'WAGF macro-region (e.g. "Asia", "Africa"). Color-coded on the map.'},{id:"block",label:"WAGF Bloc",info:'WAGF bloc — the organizational sub-grouping within each region (e.g. "South East Asia", "West Africa").'},{id:"country",label:"Country",info:"Individual countries, listed by unreached-population size within their bloc."}],te=hs(Bs(()=>F.value),Wi),de=J(()=>["prayer","engagement","adoption","religion"].includes(F.value)),Fe=J(()=>de.value?q(te.items.value):F.value==="affinity-block"?Mo.value:F.value==="doxa-regions"?fn.value:_t.value),le=J(()=>de.value?null:F.value==="affinity-block"?Vo:F.value==="doxa-regions"?ys:It),ue=J(()=>de.value),$e=J(()=>F.value==="religion"?g("legend.colLabel.religion"):F.value==="prayer"?g("legend.colLabel.prayer"):F.value==="engagement"?g("legend.colLabel.engagement"):F.value==="adoption"?g("legend.colLabel.adoption"):de.value?g("legend.colLabel.status"):""),ve=J(()=>f.legendState!=="collapsed");function Pe(O){O?f.openLegend():f.collapseLegend()}const Ne=J(()=>de.value?g("legend.titleBar.legend"):F.value==="affinity-block"?g("legend.titleBar.peopleGroups"):F.value==="doxa-regions"?g("legend.titleBar.wagfRegions"):g("legend.titleBar.languages"));Gt("onSemanticTreeSelect",O=>Oe(O)),Gt("onLegendExport",ht);const Ce=Kk(i);Gt("legendExportCards",Ce),Gt("getActivePinColor",O=>{var fe,Se;const Z=dn(((fe=_.value)==null?void 0:fe.colorStrategy)??"languageFamily");return((Se=Z==null?void 0:Z.getColor)==null?void 0:Se.call(Z,O))??"#1a1a1a"});function Oe(O){var Se,Re,We,ot,Ge,Ze,Ot,zt;const Z=pe.value;if(O){const lt=de.value?l5(O,F.value):null,it=((Se=_.value)==null?void 0:Se.id)==="doxa-regions",Ht=lt?{matchExpr:lt}:{};it&&(Ht.regionPolygonSource="regions"),(Re=ee.zoomToLegendRow)==null||Re.call(ee,O,Object.keys(Ht).length?Ht:void 0)}if(!O){if(de.value){const lt=F.value;lt==="prayer"?f.setPrayerFilter(null):lt==="engagement"?f.setEngagementFilter(null):lt==="adoption"?f.setAdoptionFilter(null):lt==="religion"&&f.setReligionFilter(null)}if(Z&&Z.getLayer("language-family-pins")){try{Z.setFilter("language-family-pins",null)}catch{}o(Z,null),Be(Z,null),I.syncGlowFilter(null)}Z&&Z.getLayer("regions-fill")&&(Z.setPaintProperty("regions-fill","fill-opacity",po(.7)),Z.setPaintProperty("regions-border","line-color",po("rgba(60,60,80,0.35)")),Z.setPaintProperty("regions-border","line-width",po(.6))),h.selectedFamily&&h.selectFamily(null),h.selectedLanguage&&h.selectLanguage(null),h.selectedDialect&&((We=h.selectDialect)==null||We.call(h,null)),h.selectedRegion&&((ot=h.selectRegion)==null||ot.call(h,null)),gt();return}if(de.value){const lt=F.value;lt==="prayer"?f.setPrayerFilter(O.id):lt==="engagement"?f.setEngagementFilter(O.id):lt==="adoption"?f.setAdoptionFilter(O.id):lt==="religion"&&f.setReligionFilter(O.id);return}if(Z&&Z.getLayer("language-family-pins")&&O.filter){try{Z.setFilter("language-family-pins",O.filter)}catch{}o(Z,O.filter),Be(Z,null),I.syncGlowFilter(O.filter)}const fe=String(O.id||"");if(fe.startsWith("fam:"))(Ge=h.selectFamily)==null||Ge.call(h,O.label);else if(fe.startsWith("lang:"))(Ze=h.selectLanguage)==null||Ze.call(h,O.label);else if(fe.startsWith("dial:"))(Ot=h.selectDialect)==null||Ot.call(h,{key:fe.slice(5),originalLabels:O.originalLabels||[]});else if(fe.startsWith("bloc:")||fe.startsWith("cluster:")||fe.startsWith("pg:")||fe.startsWith("pgic:")){if(Z&&Z.getLayer("language-family-pins")&&O.filter){try{Z.setFilter("language-family-pins",null)}catch{}o(Z,O.filter),Be(Z,O.filter),I.syncGlowFilter(O.filter)}}else if(fe.startsWith("region:")||fe.startsWith("block:")||fe.startsWith("country:")){if(Z&&Z.getLayer("language-family-pins")&&O.filter){try{Z.setFilter("language-family-pins",O.filter)}catch{}o(Z,O.filter),Be(Z,null)}if(fe.startsWith("region:")&&((zt=h.selectRegion)==null||zt.call(h,fe.slice(7))),Z&&Z.getLayer("regions-fill")&&!fe.startsWith("region:")){const lt=O.isoCodes||[];if(lt.length){const it=["literal",lt];Z.setPaintProperty("regions-fill","fill-opacity",["case",["in",["get","iso_3166_1_alpha_3"],it],.85,.15]),Z.setPaintProperty("regions-border","line-color",["case",["in",["get","iso_3166_1_alpha_3"],it],"#111827","rgba(60,60,80,0.15)"]),Z.setPaintProperty("regions-border","line-width",["case",["in",["get","iso_3166_1_alpha_3"],it],2.5,.3])}else Z.setPaintProperty("regions-fill","fill-opacity",po(.7)),Z.setPaintProperty("regions-border","line-color",po("rgba(60,60,80,0.35)")),Z.setPaintProperty("regions-border","line-width",po(.6))}}}function Be(O,Z){var Se;if(!O||!((Se=O.getLayer)!=null&&Se.call(O,"language-family-pins")))return;const fe=Z?["case",Z,1,0]:["case",["has","uniqueId"],1,1];try{if(JSON.stringify(O.getPaintProperty("language-family-pins","circle-opacity"))===JSON.stringify(fe))return;O.setPaintProperty("language-family-pins","circle-opacity",fe),O.setPaintProperty("language-family-pins","circle-stroke-opacity",fe),O.getLayer("language-family-pins-shadow")&&O.setPaintProperty("language-family-pins-shadow","circle-opacity",fe)}catch{}}Ue(()=>f.theme,O=>{ne.theme.value=O==="dark"?"dark":"light"},{immediate:!0}),Ue(()=>h.selectedFamily,O=>{if(!O)return Te("fam",null);const Z=Sa(_t.value,fe=>fe.id.startsWith("fam:")&&fe.label===O);Z&&Te("fam",{...Z,depth:0})}),Ue(()=>h.selectedLanguage,O=>{if(!O)return Te("lang",null);const Z=Sa(_t.value,fe=>fe.id.startsWith("lang:")&&fe.label===O);Z&&Te("lang",{...Z,depth:1})}),Ue(()=>h.selectedDialect,O=>{if(!(O!=null&&O.key))return Te("dial",null);const Z=`dial:${O.key}`,fe=Sa(_t.value,Se=>Se.id===Z);fe&&Te("dial",{...fe,depth:2})}),Ue(()=>h.selectedRegion,O=>{if(!O)return Te("region",null);const Z=Sa(fn.value,fe=>fe.id===`region:${O}`);Z&&Te("region",{...Z,depth:0})});const Ie=be(null);async function Ve(){Ie.value||(Ie.value=await n()),Ko.value=!0}function ht(O){const[Z,fe]=String(O).split(":");if(Z==="poster")return Ve();if(Z==="packet")return Ut(fe==="lightweight"?"lightweight":"full");if(Z==="cards"&&Ce)return Ut("cards")}const wt=Ff({apiBase:()=>ps(),lang:()=>String($.value||"en").split("-")[0]});let bt=!1;async function Ut(O="full"){var Z,fe,Se;if(!bt){bt=!0;try{const[{usePosterPrints:Re},{defaultPosterSpec:We},{useMapPoster:ot}]=await Promise.all([ut(()=>Promise.resolve().then(()=>A5),void 0),ut(()=>Promise.resolve().then(()=>K3),void 0),ut(()=>Promise.resolve().then(()=>Om),void 0)]),Ge=N.normalizedPeopleGroups.value||[];let Ze=Ge;try{const{selectedPinIds:Ke}=await ut(async()=>{const{selectedPinIds:jn}=await Promise.resolve().then(()=>Lk);return{selectedPinIds:jn}},void 0),bn=pe.value,Uu=bn&&bn.getLayer("language-family-pins")?bn.getFilter("language-family-pins"):null,$r=bn?Ke(bn,{expressions:[Uu].filter(Boolean)}):null;if($r&&$r.size){const jn=Ge.filter(x0=>$r.has(String(x0.uniqueId??x0.id??"")));jn.length?Ze=jn:console.warn("[country-posters] packet: the selected pins matched no rows (id mismatch); printing the full list")}else $r&&(Ze=[])}catch(Ke){console.warn("[country-posters] packet selection unavailable; printing the full list:",(Ke==null?void 0:Ke.message)||Ke)}const Ot=Ze.length;Ze.length>50&&(Ze=Ze.slice(0,50));let zt=null;try{const Ke=Ze.map(bn=>String(bn.slug||"")).filter(Boolean);Ke.length&&(zt=await wt({type:"pg_slugs",values:Ke}))}catch(Ke){console.warn("[country-posters] selection records unavailable; printing from the map rows:",(Ke==null?void 0:Ke.message)||Ke)}(!zt||!zt.length)&&(zt=Ze.map(Ke=>({slug:String(Ke.slug||Ke.uniqueId||Ke.id||""),name:Ke.name,population:Ke.population,religion:Ke.religionName||Ke.religionLabel||Ke.religion||"",country_code:Ke.countryIso||Ke.country_code||"",country_code_label:Ke.countryName||Ke.countryIsoLabel||Ke.country||"",image_url:Ke.imageUrl||Ke.image_url||""})));const lt=We({widthIn:8.27,heightIn:11.69,dpi:150,orientation:"portrait"});lt.slots.title={...lt.slots.title,text:Ne.value||"Doxa Map"};const it=(((Z=L==null?void 0:L.items)==null?void 0:Z.value)||[]).flatMap(Ke=>[Ke,...Ke.children||[]]).map(Ke=>({label:Ke.label,color:Ke.color})).filter(Ke=>Ke.label);lt.slots.legend={...lt.slots.legend,rows:it};let Ht="";if(O!=="cards")try{const Ke=await ot(()=>pe.value).render(lt,"png");Ht=await new Promise((Uu,$r)=>{const jn=new FileReader;jn.onload=()=>Uu(String(jn.result)),jn.onerror=$r,jn.readAsDataURL(Ke)})}catch(Ke){console.warn("[country-posters] packet map page skipped:",(Ke==null?void 0:Ke.message)||Ke)}const xs={id:String(((fe=_.value)==null?void 0:fe.id)||"research-map"),label:(Ne.value||m(_.value)||"Doxa Map")+(Ot>50?` — ${g("messages.nOfTotal",{n:50,total:Ot})}`:""),zoneKey:String(((Se=_.value)==null?void 0:Se.id)||"research-map")},Fa=Re({records:()=>zt,lang:()=>String($.value||"en").split("-")[0],label:()=>xs.label,mapImage:()=>Ht||null});O==="cards"?await Fa.printCardDeck(xs):await Fa.printPacket(xs,{variant:O})}catch(Re){console.error("[country-posters] packet export failed:",Re)}finally{bt=!1}}}const eo=be(!1),Ko=be(!1),qo=J(()=>h.selectedFeature),Vt=J(()=>f.isDarkTheme),xo=J(()=>Ah.lightPreset==="night");function No(){var fe;const O=pe.value;if(!O||!O.getLayer("language-family-pins"))return;const Z=xo.value?"#ffffff":["case",[">",["to-number",["get","peoplePraying"],0],0],"#ffffff","#1f2937"];O.setPaintProperty("language-family-pins","circle-stroke-color",Z),O.setPaintProperty("language-family-pins","circle-stroke-width",xo.value?kk((fe=_.value)==null?void 0:fe.colorStrategy):Cf)}Ue(xo,No,{immediate:!1}),Ue(()=>{var O;return(O=_.value)==null?void 0:O.id},No),Ue(()=>f.theme,()=>w.applyTheme(pe.value));function Po(){w.swapTheme(pe.value)}const Rt=be(!1);let vo=null;async function zn(){if(!Rt.value)return vo||(vo=(async()=>{var O,Z,fe;try{const Se=await((O=N.loadRegionsData)==null?void 0:O.call(N));if(Se&&pe.value){(Z=I.addRegionsLayer)==null||Z.call(I,Se,"doxa-regions");const Re=We=>Array.isArray(We)&&(We[0]==="get"||We[0]==="has"||We[0]==="feature-state"||We.some(Re));for(const[We,ot]of[["regions-fill","fill-opacity"],["regions-border","line-color"],["regions-border","line-width"]])try{const Ge=pe.value.getLayer(We)&&pe.value.getPaintProperty(We,ot);Ge!=null&&!Re(Ge)&&pe.value.setPaintProperty(We,ot,["case",["in",["get","iso_3166_1_alpha_3"],["literal",[]]],Ge,Ge])}catch{}pe.value.getLayer("regions-fill")&&((fe=_.value)==null?void 0:fe.id)!=="doxa-regions"&&(pe.value.setLayoutProperty("regions-fill","visibility","none"),pe.value.setLayoutProperty("regions-border","visibility","none")),pe.value.getLayer("language-family-pins")&&pe.value.moveLayer("language-family-pins")}Rt.value=!0,N.regionsData.value=null}catch(Se){console.warn("[research-map] regions layer failed:",Se)}finally{vo=null}})(),vo)}function Ra(O){var Se,Re;if(O===G.value)return;G.value=O,(Se=f.setActiveTab)==null||Se.call(f,O),gt();const Z=z.value.find(We=>We.id===O);if(!Z||!pe.value)return;w.applyTheme(pe.value),Z.id==="doxa-regions"&&zn();const fe=dn(Z.colorStrategy);if(pe.value.getLayer("language-family-pins")&&(fe!=null&&fe.buildColorExpression)){const We=Z.id==="doxa-regions"?"#a30000":fe.buildColorExpression();pe.value.setPaintProperty("language-family-pins","circle-color",We),mr(pe.value),Z.id==="prayer"?I.startPrayerGlow():I.stopPrayerGlow();const ot=Z.id==="doxa-regions";pe.value.getLayer("regions-fill")&&(pe.value.setLayoutProperty("regions-fill","visibility",ot?"visible":"none"),pe.value.setLayoutProperty("regions-border","visibility",ot?"visible":"none")),pe.value.getLayer("language-family-pins")&&pe.value.moveLayer("language-family-pins")}(Re=P.refreshColors)==null||Re.call(P)}let ua=null,Fo=null;function Ma(O){var ot,Ge,Ze,Ot;if(!O){if(ua=null,oe.value){const zt=((ot=i==null?void 0:i.value)==null?void 0:ot.center)??Ro.center??[20,10],lt=((Ge=i==null?void 0:i.value)==null?void 0:Ge.zoom)??Ro.zoom??1.8;(Ze=ee.flyToCoords)==null||Ze.call(ee,{longitude:zt[0],latitude:zt[1]},lt)}return!0}const Z=(Ai.countries||[]).find(zt=>zt.id===O||zt.iso3===O);if(!Z||!Array.isArray(Z.bbox)||Z.bbox.length!==4)return ua=null,!0;if(!oe.value)return ua=O,!1;const[fe,Se,Re,We]=Z.bbox;return(Ot=ee.fitBounds)==null||Ot.call(ee,[[fe,Se],[Re,We]],60),ua=null,!0}function Na(O){var Z;Ma(((Z=O==null?void 0:O.detail)==null?void 0:Z.countryId)??null)}Ue(oe,O=>{O&&ua&&Ma(ua)});function fr(O){var Ze,Ot,zt;const Z=O==null?void 0:O.detail;if(!Z||(Kt(Z),!((Ze=Z.coords)!=null&&Ze.length)))return;const fe=Z.coords;if(fe.length===1){(Ot=ee.flyToCoords)==null||Ot.call(ee,{longitude:fe[0][0],latitude:fe[0][1]},3);return}let Se=1/0,Re=-1/0,We=1/0,ot=-1/0;for(const[lt,it]of fe)ltRe&&(Re=lt),itot&&(ot=it);const Ge=Z.kind==="region"?2.2:3;(zt=ee.fitBounds)==null||zt.call(ee,[[Se,We],[Re,ot]],60,{maxZoom:Ge})}const to={family:null,language:null,dialect:null,region:null,prayer:null,engagement:null,adoption:null};function mr(O){Be(O,null),O.setFilter("language-family-pins",null),o(O,null),I.syncGlowFilter(null),O.getLayer("regions-fill")&&(O.setPaintProperty("regions-fill","fill-opacity",po(.7)),O.setPaintProperty("regions-fill","fill-outline-color",null)),O.getLayer("regions-border")&&(O.setPaintProperty("regions-border","line-color",po("rgba(60,60,80,0.35)")),O.setPaintProperty("regions-border","line-width",po(.6))),to.family=to.language=to.dialect=to.region=null,to.prayer=to.engagement=to.adoption=null,f.prayerFilter&&f.setPrayerFilter(null),f.engagementFilter&&f.setEngagementFilter(null),f.adoptionFilter&&f.setAdoptionFilter(null),f.religionFilter&&f.setReligionFilter(null),P.setSelectionFilter(null),h.selectedFamily&&h.selectFamily(null),h.selectedLanguage&&h.selectLanguage(null),h.selectedDialect&&h.selectDialect(null);try{ne&&ne.selection&&ne.selection.value&&(ne.selection.value=null)}catch{}}let br=null,Gn=0;function Kt(O){var Ge,Ze,Ot,zt,lt;const Z=pe.value;if(!Z||!Z.getLayer("language-family-pins"))return;let fe,Se,Re;if(O.kind==="family")Re="family",fe="languageFamily",Se=O.familyKey;else if(O.kind==="language")Re="language",fe="language",Se=O.languageKey;else if(O.kind==="region")Re="region",fe="doxaRegion",Se=O.regionKey;else if(O.kind==="prayer")Re="prayer",fe=O.property||"peoplePraying",Se=O.expectedValue;else if(O.kind==="engagement")Re="engagement",fe=O.property||"engagementStatus",Se=O.expectedValue;else if(O.kind==="adoption")Re="adoption",fe=O.property||"adoptionStatus",Se=O.expectedValue;else if(O.kind==="religion")Re="religion",fe=O.property||"religion",Se=O.expectedValue;else if(O.kind==="dialect")Re="dialect",fe="language",Se=O.dialectKey||"";else{mr(Z),gt();for(const it of Object.keys(to))to[it]=null;br=null,Gn=0;return}const We=Date.now(),ot=`${Re}|${Se}`;if(!(br===ot&&We-Gn<80)){if(br=ot,Gn=We,to[Re]===Se){mr(Z),gt(),br=null,Gn=0;return}for(const it of Object.keys(to))to[it]=null;if(to[Re]=Se,Re==="family"?(Ge=h.selectFamily)==null||Ge.call(h,Se):Re==="region"?(Ze=h.selectRegion)==null||Ze.call(h,Se):Re==="language"?(Ot=h.selectLanguage)==null||Ot.call(h,Se):Re==="dialect"&&((zt=h.selectDialect)==null||zt.call(h,{key:Se,originalLabels:O.originalLabels||[]})),P.setSelectionFilter({property:fe,value:Se}),Re==="region"){if(Z.setFilter("language-family-pins",["==",["get","doxaRegion"],Se]),o(Z,["==",["get","doxaRegion"],Se]),Be(Z,null),Z.getLayer("regions-fill")){const it=((lt=I.regionIsoMap)==null?void 0:lt.value)||{},Ht=Ke=>String(Ke).toLowerCase().replace(/[^a-z]/g,""),xs=Ht(Se);let Fa=it[Se]||[];if(!Fa.length){for(const[Ke,bn]of Object.entries(it))if(Ht(Ke)===xs){Fa=bn;break}}if(Fa.length){const Ke=["literal",Fa];Z.setPaintProperty("regions-fill","fill-opacity",["case",["in",["get","iso_3166_1_alpha_3"],Ke],.85,.15]),Z.setPaintProperty("regions-border","line-color",["case",["in",["get","iso_3166_1_alpha_3"],Ke],"#111827","rgba(60,60,80,0.15)"]),Z.setPaintProperty("regions-border","line-width",["case",["in",["get","iso_3166_1_alpha_3"],Ke],2.5,.3])}else Z.setPaintProperty("regions-fill","fill-opacity",po(.7)),Z.setPaintProperty("regions-border","line-color",po("rgba(60,60,80,0.35)")),Z.setPaintProperty("regions-border","line-width",po(.6))}}else{Z.setFilter("language-family-pins",null);let it;if(Re==="prayer"){const Ht=["to-number",["get",fe]];Se==="noPrayer"?it=["==",Ht,0]:Se==="fullPrayer"?it=[">=",Ht,un]:Se==="hasPrayer"?it=["all",[">",Ht,0],["<",Ht,un]]:it=["==",["get",fe],Se]}else if(Re==="engagement")it=["==",["get",fe],Se==="hasEngagement"];else if(Re==="adoption")it=["==",["get",fe],Se==="hasAdoption"];else if(Re==="religion")it=["==",["slice",["coalesce",["get",fe],""],0,1],Se];else if(O.filterExpr)it=O.filterExpr;else if(Re==="language")it=["any",["==",["get",fe],Se],["==",["slice",["get",fe],0,Se.length+1],Se+","],["in"," "+Se,["get",fe]]];else if(Re==="dialect"){const Ht=O.originalLabels||[];Ht.length===1?it=["==",["get",fe],Ht[0]]:Ht.length>1?it=["in",["get",fe],["literal",Ht]]:it=["==",["get",fe],Se]}else it=["==",["get",fe],Se];Be(Z,it),o(Z,it),I.syncGlowFilter(it),Z.getLayer("regions-fill")&&(Z.setPaintProperty("regions-fill","fill-opacity",po(.2)),Z.setPaintProperty("regions-border","line-color",po("rgba(60,60,80,0.35)")),Z.setPaintProperty("regions-border","line-width",po(.6)))}}}function Bu(O,{map:Z,filterLayerId:fe}){const Se=O.label;try{Z.setFilter(fe,null)}catch{}const Re=Object.keys(ar).find(We=>ar[We]===Se);if(Re){const We={id:Re,label:Ni(Re),depth:0},ot=()=>{try{Z.setFilter(fe,null)}catch{}Oe(We),ne&&ne.selection&&(ne.selection.value=We)};G.value!=="religion"&&Ra("religion"),co(ot)}}function vs(O,{map:Z,filterLayerId:fe}){const Se=O.label,Re=Ze=>String(Ze).toLowerCase().replace(/[^a-z0-9]/g,""),We=Ze=>String(Ze||"").replace(/\s*\((?:Region|Bloc)\)\s*$/i,""),ot=Re(Se),Ge=()=>{try{Z.setFilter(fe,null)}catch{}const Ze=Sa(fn.value,Ot=>(Ot.id.startsWith("region:")||Ot.id.startsWith("block:"))&&Re(We(Ot.label))===ot);Ze&&(Oe(Ze),ne&&ne.selection&&(ne.selection.value=Ze))};G.value!=="doxa-regions"?(Ra("doxa-regions"),Promise.resolve(zn()).finally(()=>co(Ge))):Ge()}function ol(O){var fe,Se,Re,We;if(Array.isArray(O.bounds)&&O.bounds.length===4){const[ot,Ge,Ze,Ot]=O.bounds;(fe=ee.fitBounds)==null||fe.call(ee,[[ot,Ge],[Ze,Ot]],60)}else Array.isArray(O.center)&&O.center.length===2&&((Se=ee.flyTo)==null||Se.call(ee,O.center));const Z=Nk(O,N.normalizedPeopleGroups.value||[]);if(Z&&H(Z),Z&&((Re=_.value)==null?void 0:Re.id)!=="doxa-regions"&&K.showCountry(Z),Z&&((We=_.value)==null?void 0:We.id)==="doxa-regions"){const ot=()=>{const Ge=Sa(fn.value,Ze=>Ze.id.startsWith("country:")&&(Ze.isoCodes||[]).includes(Z));Ge&&(Oe(Ge),ne&&ne.selection&&(ne.selection.value=Ge))};Promise.resolve(zn()).finally(()=>co(ot))}}Ue(()=>h.filters,()=>{var O,Z;(O=I.applyFilters)==null||O.call(I,h.filters),(Z=P.applyFilters)==null||Z.call(P,h.filters)},{deep:!0}),Ue(()=>h.selectedRegion,O=>{Kt(O?{kind:"region",regionKey:O}:{kind:null})}),Ue(()=>h.selectedFamily,O=>{O?Kt({kind:"family",familyKey:O}):!h.selectedLanguage&&!h.selectedDialect&&Kt({kind:null})}),Ue(()=>h.selectedLanguage,O=>{O?Kt({kind:"language",languageKey:O}):!h.selectedFamily&&!h.selectedDialect&&Kt({kind:null})}),Ue(()=>h.selectedDialect,O=>{O!=null&&O.key?Kt({kind:"dialect",dialectKey:O.key,originalLabels:O.originalLabels||[]}):!h.selectedFamily&&!h.selectedLanguage&&Kt({kind:null})}),Ue(()=>f.prayerFilter,O=>{Kt(O?{kind:"prayer",property:"peoplePraying",expectedValue:O}:{kind:null})}),Ue(()=>f.engagementFilter,O=>{Kt(O?{kind:"engagement",property:"engagementStatus",expectedValue:O}:{kind:null})}),Ue(()=>f.adoptionFilter,O=>{Kt(O?{kind:"adoption",property:"adoptionStatus",expectedValue:O}:{kind:null})}),Ue(()=>f.religionFilter,O=>{Kt(O?{kind:"religion",property:"religion",expectedValue:O}:{kind:null})}),Ue(()=>h.showClusters,async O=>{var Z,fe,Se,Re;O?(await((Z=P.setMode)==null?void 0:Z.call(P,"mst")),(fe=P.flushSelectionFilter)==null||fe.call(P),await((Se=P.setEnabled)==null?void 0:Se.call(P,!0))):await((Re=P.setEnabled)==null?void 0:Re.call(P,!1))});async function qe(O){var Z,fe,Se,Re,We,ot;h.registerMap(W,pe.value),Lw(pe.value,"mercator"),w.applyTheme(pe.value),O!=null&&O.length&&(I.addLanguageFamilyLayer(O,((Z=_.value)==null?void 0:Z.colorStrategy)??"languageFamily"),Be(pe.value,null),((fe=_.value)==null?void 0:fe.id)==="doxa-regions"&&((Se=pe.value)!=null&&Se.getLayer("language-family-pins"))&&pe.value.setPaintProperty("language-family-pins","circle-color","#4b5563"),((Re=_.value)==null?void 0:Re.id)==="prayer"&&I.startPrayerGlow(),(We=P.setData)==null||We.call(P,O),ge.initialize()),((ot=_.value)==null?void 0:ot.id)==="doxa-regions"&&(typeof window<"u"&&window.requestIdleCallback?Ze=>window.requestIdleCallback(Ze,{timeout:2e3}):Ze=>setTimeout(Ze,800))(()=>{zn()}),No(),h.setMapReady(W),xe.value=!0}let Dt=null;function wo(O){const Z=D.value;Z&&(O>=700?(Z.style.setProperty("--map-btn-size","40px"),Z.style.setProperty("--map-toolbar-gap","8px"),Z.style.setProperty("--map-font-md","13px"),Z.style.setProperty("--map-font-sm","11px"),Z.style.setProperty("--map-legend-width","380px")):O>=500?(Z.style.setProperty("--map-btn-size","36px"),Z.style.setProperty("--map-toolbar-gap","6px"),Z.style.setProperty("--map-font-md","12px"),Z.style.setProperty("--map-font-sm","10px"),Z.style.setProperty("--map-legend-width","360px")):(Z.style.setProperty("--map-btn-size","32px"),Z.style.setProperty("--map-toolbar-gap","5px"),Z.style.setProperty("--map-font-md","11px"),Z.style.setProperty("--map-font-sm","10px"),Z.style.setProperty("--map-legend-width","280px")))}return mo(async()=>{var Z,fe,Se,Re,We,ot;(Z=f.init)==null||Z.call(f),G.value=sm,f.isMobile?(fe=f.collapseLegend)==null||fe.call(f):(Se=f.openLegend)==null||Se.call(f),D.value&&(wo(D.value.getBoundingClientRect().width),typeof ResizeObserver<"u"&&(Dt=new ResizeObserver(Ge=>{for(const Ze of Ge)wo(Ze.contentRect.width)}),Dt.observe(D.value))),window.addEventListener("doxa:legend-row-click",re);{const Ge=(ot=(We=(Re=ye.value)==null?void 0:Re.getRootNode)==null?void 0:We.call(Re))==null?void 0:ot.host;if(Ge){Ge.addEventListener("doxa:select-country",Na);const Ze=Ge.getAttribute("select-country");Ze&&Ma(Ze),Fo=new MutationObserver(()=>{Ma(Ge.getAttribute("select-country")||null)}),Fo.observe(Ge,{attributes:!0,attributeFilter:["select-country"]})}}window.addEventListener("legend:highlight",fr);const O=N.loadData().catch(Ge=>(console.error("[research-map] data load failed:",Ge),{normalizedPeopleGroups:[]}));try{await _e()}catch(Ge){console.error("[countries-map] Map failed to initialize —",Ge),we.value=String((Ge==null?void 0:Ge.message)||Ge);return}if(!pe.value){console.error("[countries-map] Map failed to initialize — check token and container"),we.value=g("messages.mapInitFailed");return}pe.value.once("style.load",async()=>{try{const{normalizedPeopleGroups:Ge}=await O;await qe(Ge)}catch(Ge){console.error("[countries-map] onMapReady failed:",Ge),we.value=String((Ge==null?void 0:Ge.message)||Ge)}})}),Jt(()=>{var O,Z,fe,Se,Re,We,ot,Ge;window.removeEventListener("doxa:legend-row-click",re),Fo==null||Fo.disconnect(),Fo=null,(Se=(fe=(Z=(O=ye.value)==null?void 0:O.getRootNode)==null?void 0:Z.call(O))==null?void 0:fe.host)==null||Se.removeEventListener("doxa:select-country",Na),window.removeEventListener("legend:highlight",fr),Dt&&(Dt.disconnect(),Dt=null),(We=(Re=Ie.value)==null?void 0:Re.cleanup)==null||We.call(Re),I.stopPrayerGlow(),(ot=P.cleanup)==null||ot.call(P),(Ge=ge.cleanup)==null||Ge.call(ge),h.unregisterMap(W),me()}),(O,Z)=>(Y(),ae("div",{ref_key:"rmRoot",ref:D,class:De(["rm-root",{"rm-dark":Vt.value,"dsm-dark":Vt.value}])},[V.value?(Y(),ae("div",{key:0,ref_key:"tabBar",ref:Q,class:"rm-tab-bar"},[(Y(!0),ae(He,null,Mt(z.value,fe=>(Y(),ae(He,{key:fe.id},[E("button",{class:De(["rm-tab",{active:G.value===fe.id}]),onClick:Se=>Ra(fe.id)},se(m(fe)),11,u5),fe.sepAfter?(Y(),ae("div",d5)):Le("",!0)],64))),128))],512)):Le("",!0),E("div",p5,[!xe.value&&!we.value?(Y(),ae("div",g5,se(ce(g)("messages.loadingNamed",{name:ce(g)("tabs.map")})),1)):Le("",!0),we.value?(Y(),ae("div",h5,se(ce(g)("messages.couldNotLoadNamed",{name:ce(g)("tabs.map")}))+" "+se(we.value),1)):Le("",!0),E("div",{ref_key:"mapContainer",ref:ye,class:"rm-map-canvas"},null,512),Z[5]||(Z[5]=E("div",{class:"map-scroll-edge map-scroll-edge--left"},null,-1)),Z[6]||(Z[6]=E("div",{class:"map-scroll-edge map-scroll-edge--right"},null,-1)),xe.value&&ce(pe)&&c.value?(Y(),tt(SP,{key:2,ref_key:"geocoderRef",ref:U,"map-instance":ce(pe),"access-token":ce(d),"data-source-id":ce(p),"is-dark":Vt.value,placeholder:A.value,"active-context":R.value,onPeopleGroupResult:ce(Me),onAggregateResult:ce(et),onClear:ce(vt)},null,8,["map-instance","access-token","data-source-id","is-dark","placeholder","active-context","onPeopleGroupResult","onAggregateResult","onClear"])):Le("",!0),Le("",!0),xe.value&&ce(pe)?(Y(),tt(Y2,{key:4,"has-geocoder":c.value},{default:no(()=>[at(X2,{map:ce(pe),"is-dark":Vt.value},null,8,["map","is-dark"]),at(J2,{map:ce(pe),"is-dark":Vt.value},null,8,["map","is-dark"]),at(Q2,{map:ce(pe),"is-dark":Vt.value},null,8,["map","is-dark"]),at(oP,{"map-container":ye.value,"is-dark":Vt.value},null,8,["map-container","is-dark"]),at(aP,{"is-dark":Vt.value,onToggle:Po},null,8,["is-dark"]),at(lP,{"is-dark":Vt.value,hosted:""},null,8,["is-dark"]),at(la,{"is-dark":Vt.value,title:ce(g)("controls.export_poster"),class:"export-poster-btn",onClick:Ve},{default:no(()=>[...Z[4]||(Z[4]=[E("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[E("path",{d:"M12 3v12M7 10l5 5 5-5M5 21h14"})],-1)])]),_:1},8,["is-dark","title"])]),_:1},8,["has-geocoder"])):Le("",!0),xe.value?(Y(),tt(q2,{key:5,"legend-type":F.value,"is-dark":Vt.value},null,8,["legend-type","is-dark"])):Le("",!0),xe.value?(Y(),tt(dS,{key:6,"is-open":eo.value,onClose:Z[1]||(Z[1]=fe=>eo.value=!1),onOpenPoster:Ve},{default:no(()=>[at(zS)]),_:1},8,["is-open"])):Le("",!0),E("div",{class:"rm-legend-desktop-slot",style:nt(u.value?{"--stl-top":u.value}:null)},[xe.value&&ce(f).legendMode==="detail"&&ce(f).selectedPeopleGroup?(Y(),tt(F2,{key:0,"legend-type":F.value,"popup-action":k.value,"initially-collapsed":!1,"is-dark":Vt.value},null,8,["legend-type","popup-action","is-dark"])):Le("",!0),fo(E("div",null,[xe.value?(Y(),tt(nm,{key:0,nodes:Fe.value,tabs:le.value,title:Ne.value,hideTabs:ue.value,columnLabel:$e.value,open:ve.value,"export-enabled":m5,"export-cards":ce(Ce),onSelect:Oe,onExport:ht,"onUpdate:open":Pe},null,8,["nodes","tabs","title","hideTabs","columnLabel","open","export-cards"])):Le("",!0)],512),[[Ul,!(ce(f).legendMode==="detail"&&ce(f).selectedPeopleGroup)]])],4),E("div",f5,[xe.value?(Y(),tt(ce(a),{key:0,"legend-type":F.value,"popup-action":k.value,"is-dark":Vt.value},null,8,["legend-type","popup-action","is-dark"])):Le("",!0)]),xe.value&&qo.value?(Y(),tt(ce(r),{key:7,feature:qo.value,action:k.value,dark:Vt.value,onClose:Z[2]||(Z[2]=fe=>ce(h).selectFeature(null))},null,8,["feature","action","dark"])):Le("",!0),Ko.value?(Y(),tt(ce(s),{key:8,modelValue:Ko.value,"onUpdate:modelValue":Z[3]||(Z[3]=fe=>Ko.value=fe),"get-map":()=>ce(pe),"legend-rows":ce(L).items.value||[]},null,8,["modelValue","get-map","legend-rows"])):Le("",!0)])],2))}}},Symbol.toStringTag,{value:"Module"})),$5='class="stage"';async function y5(e){const t=new Uint8Array(await e.slice(0,12).arrayBuffer()),o=(n,a)=>String.fromCharCode(...t.slice(n,a));return o(0,4)==="RIFF"&&o(8,12)==="WEBP"||t[0]===137&&o(1,4)==="PNG"||t[0]===255&&t[1]===216&&t[2]===255}async function im(e,t=fetch){let o;try{o=await t(e)}catch{return null}if(!o||!o.ok)return null;const n=(o.headers.get("content-type")||"").toLowerCase();if(n.startsWith("text/"))return null;const a=await o.blob();return n.startsWith("image/")||await y5(a)?a:null}async function lm(e,t=fetch){const o=await t(e);if(!o.ok)return{html:null,status:o.status};const n=await o.text();return n.includes($5)?{html:n,status:o.status}:{html:null,status:404}}function Aa(e,{autoprint:t=!1}={}){const o=document.createElement("iframe");o.setAttribute("aria-hidden","true"),o.style.cssText="position:fixed;right:0;bottom:0;width:1px;height:1px;opacity:0;border:0",document.body.appendChild(o);const n=o.contentDocument;if(!n)return o.remove(),null;n.open(),n.write(e),t&&n.write('\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } }, { @@ -240,7 +240,7 @@ "scriptUrl": "./country-posters/country-posters.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -256,8 +256,8 @@ "scriptUrl": "./country-posters/country-posters.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } } ] diff --git a/public/dx-maps/manifest.json b/public/dx-maps/manifest.json index 6d34eeccd..e8021d55d 100644 --- a/public/dx-maps/manifest.json +++ b/public/dx-maps/manifest.json @@ -200,7 +200,7 @@ "bundle": "country-posters", "scriptUrl": "./country-posters/country-posters.js", "output": "dx-maps/country-posters/country-posters.js", - "integrity": "sha384-M7n3YBWyBkWNuKmNudN3WeaxoZwLf92KQykox7kf1UOFhFMDBKPOQ2XEB/OVhv4o", + "integrity": "sha384-Y33AViPgLgZs1/CPCDU3g/rq20VIg7cYGXtFuweV2m/f0wJa+pqYmWmmwiqlVrvt", "elements": [ "country-posters-map" ], @@ -223,8 +223,8 @@ "scriptUrl": "./country-posters/country-posters.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } }, { @@ -240,7 +240,7 @@ "scriptUrl": "./country-posters/country-posters.js", "embed": { "iframe": "", - "script": "\n\n\n" + "script": "\n\n\n" } }, { @@ -256,8 +256,8 @@ "scriptUrl": "./country-posters/country-posters.js", "embed": { "iframe": "", - "script": "\n\n\n\n\n\n", - "scriptMapbox": "\n\n\n\n\n\n" + "script": "\n\n\n\n\n\n", + "scriptMapbox": "\n\n\n\n\n\n" } } ]