1"use strict";(self.webpackChunk_roots_bud_sage_sage=self.webpackChunk_roots_bud_sage_sage||[]).push([[143],{
1"./styles/app.scss":()=>{},jquery:e=>{e.exports=window.jQuery},
1"./scripts/app.js":(e,t,s)=>{var i=s("../node_modules/@roots/sage/lib/client/dom-ready.js"),r=s("jquery"),a=s("../node_modules/vue/dist/vue.esm-bundler.js"),o=s("jquery");window.$=o;const n={delimiters:["[[","]]"],data:()=>({isLoading:!0,missions:[],regions:[],domaines:[],totalMissions:0,iconActive:!1,currentPage:1,missionsPerPage:6,search:"",sortOrder:"asc",isGrid:!0,isLine:!1,color:"#242638",filters:{domaines:[],regions:[]},visibleSubtitleItems:["domaines","regions"]}),mounted(){const e=this,t=document.querySelector("html").getAttribute("lang").split("-")[0];e.currentLanguage=t;const s=new URLSearchParams(window.location.search),i=s.get("domaines"),r=s.get("regions");i&&(e.filters.domaines=i.split(",").map((e=>e.trim()))),r&&(e.filters.regions=r.split(",").map((e=>e.trim()))),o.get("/wp-json/vol/missions-svn?lang="+t,(function(t){e.missions=t.missions,e.domaines=t.domaines,e.regions=t.regions,e.totalMissions=t.missions.length,e.isLoading=!1}))},watch:{"filters.domaines":{handler(){this.updateURL(),this.resetPage()},deep:!0}
1,"filters.regions":{handler(){this.updateURL(),this.resetPage()},deep:!0},search(){this.resetPage()}},methods:{updateURL(){const e=new URLSearchParams(window.location.search);this.filters.domaines.length>0?e.set("domaines",this.filters.domaines.join(",")):e.delete("domaines"),this.filters.regions.length>0?e.set("regions",this.filters.regions.join(",")):e.delete("regions");const t=`${window.location.pathname}?${e.toString()}`;window.history.replaceState({},"",t)},toggleSubtitleItems(e){this.visibleSubtitleItems.includes(e)?this.visibleSubtitleItems=this.visibleSubtitleItems.filter((t=>t!==e)):this.visibleSubtitleItems.push(e)},filterMissions(){return this.missions.filter((e=>e.title.toLowerCase().includes(this.search.toLowerCase())))},toggleIconColor(){this.iconActive=this.filters.domaines.length>0},toggleSortOrder(){this.sortOrder="asc"===this.sortOrder?"desc":"asc"},filterByRegion(e){const t=e.regions.map((e=>e.name));return 0===this.filters.regions.length||t.some((e=>this.filters.regions.includes(e)))},deleteRegion(e){this.filters.regions.splice(e,1)},filterByDomaine(e){const t=e.domaines.map((e=>e.name));return 0===this.filters.domaines.length||t.some((e=>this.filters.domaines.includes(e)))},deleteDomaine(e){this.filters.domaines.splice(e,1)},clearFilters(){this.filters.domaines=[],this.filters.regions=[]},setDisplayGrid(){this.isGrid=!0,this.isLine=!1},setDisplayLine(){this.isGrid=!1,this.isLine=!0},changePage(e){"..."!==e&&e>0&&e<=this.totalPages&&(this.currentPage=e)},previousPage(){this.currentPage>1&&this.currentPage--},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},pageNumbers(){const e=this.totalPages,t=this.currentPage,s=[],i=[];let r;s.push(1);for(let i=t-2;i<=t+2;i++)i>1&&i<e&&s.push(i);s.push(e);for(let e of s)r&&(e-r==2?i.push(r+1):e-r!=1&&i.push("...")),i.push(e),r=e;return i},resetPage(){this.currentPage=1},getAvailableDomaines(){const e=this.filterMissions().filter(this.filterByRegion),t=new Set;return e.forEach((e=>{e.domaines.forEach((e=>{t.add(e.name)}))})),Array.from(t)},getAvailableRegions(){const e=this.filterMissions().filter(this.filterByDomaine),t=new Set;return e.forEach((e=>{e.regions.forEach((e=>{t.add(e.name)}))})),Array.from(t)}},computed:{filteredMissions(){const e=(this.currentPage-1)*this.missionsPerPage,t=this.filterMissions().filter(this.filterByDomaine).filter(this.filterByRegion),s=t.sort(((e,t)=>{const s=e.organisation&&e.organisation.post_title?e.organisation.post_title.localeCompare(t.organisation.post_title):0;return"asc"===this.sortOrder?s:-s}));return this.totalMissions=t.length,s.slice(e,e+this.missionsPerPage)},totalPages(){const e=this.filterMissions().filter(this.filterByDomaine).filter(this.filterByRegion);return Math.ceil(e.length/this.missionsPerPage)},sortOrderLabel(){return"asc"===this.sortOrder?"A-Z":"Z-A"},showPagination(){return this.totalPages>1},availableDomaines(){return this.getAvailableDomaines()},availableRegions(){return this.getAvailableRegions()}}};window.$=o;const l={delimiters:["[[","]]"],data:()=>({isLoading:!0,missions:[],countries:[],domaines:[],types:[],totalMissions:0,currentPage:1,missionsPerPage:6,search:"",sortOrder:"asc",isGrid:!0,isLine:!1,color:"#a8bdd1",filters:{countries:[],domaines:[],types:[]},visibleSubtitleItems:["pays","domaines","participation"]}),mounted(){const e=this,t=document.querySelector("html").getAttribute("lang").split("-")[0];e.currentLanguage=t;const s=new URLSearchParams(window.location.search),i=s.get("countries"),r=s.get("domaines"),a=s.get("types");i&&(e.filters.countries=i.split(",").map((e=>e.trim()))),r&&(e.filters.domaines=r.split(",").map((e=>e.trim()))),a&&(e.filters.types=a.split(",").map((e=>e.trim()))),o.get("/wp-json/vol/missions-sve?lang="+t,(function(t){e.missions=t.missions,e.countries=t.countries,e.domaines=t.domaines,e.types=t.types,e.totalMissions=t.missions.length,e.isLoading=!1}))},watch:{"filters.countries":{handler(){this.updateURL(),this.resetPage()},deep:!0}
1,"filters.domaines":{handler(){this.updateURL(),this.resetPage()},deep:!0},"filters.types":{handler(){this.updateURL(),this.resetPage()},deep:!0},search(){this.resetPage()}},methods:{updateURL(){const e=new URLSearchParams(window.location.search);this.filters.countries.length>0?e.set("countries",this.filters.countries.join(",")):e.delete("countries"),this.filters.domaines.length>0?e.set("domaines",this.filters.domaines.join(",")):e.delete("domaines"),this.filters.types.length>0?e.set("types",this.filters.types.join(",")):e.delete("types");const t=`${window.location.pathname}?${e.toString()}`;window.history.replaceState({},"",t)},toggleSubtitleItems(e){this.visibleSubtitleItems.includes(e)?this.visibleSubtitleItems=this.visibleSubtitleItems.filter((t=>t!==e)):this.visibleSubtitleItems.push(e)},filterMissions(){return this.missions.filter((e=>e.title.toLowerCase().includes(this.search.toLowerCase())))},toggleSortOrder(){this.sortOrder="asc"===this.sortOrder?"desc":"asc"},filterByCountry(e){const t=e.countries.map((e=>e.name));return 0===this.filters.countries.length||t.some((e=>this.filters.countries.includes(e)))},deleteCountry(e){this.filters.countries.splice(e,1)},filterByDomaine(e){const t=e.domaines.map((e=>e.name));return 0===this.filters.domaines.length||t.some((e=>this.filters.domaines.includes(e)))},deleteDomaine(e){this.filters.domaines.splice(e,1)},filterByType(e){const t=e.types.map((e=>e.name));return 0===this.filters.types.length||t.some((e=>this.filters.types.includes(e)))},deleteType(e){this.filters.types.splice(e,1)},setDisplayGrid(){this.isGrid=!0,this.isLine=!1},setDisplayLine(){this.isGrid=!1,this.isLine=!0},clearFilters(){this.filters.domaines=[],this.filters.regions=[],this.filters.countries=[],this.filters.types=[]},changePage(e){"..."!==e&&e>0&&e<=this.totalPages&&(this.currentPage=e)},previousPage(){this.currentPage>1&&this.currentPage--},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},pageNumbers(){const e=this.totalPages,t=this.currentPage,s=[],i=[];let r;s.push(1);for(let i=t-2;i<=t+2;i++)i>1&&i<e&&s.push(i);s.push(e);for(let e of s)r&&(e-r==2?i.push(r+1):e-r!=1&&i.push("...")),i.push(e),r=e;return i},resetPage(){this.currentPage=1},getAvailableCountries(){const e=this.filterMissions().filter(this.filterByDomaine).filter(this.filterByType),t=new Set;return e.forEach((e=>{e.countries.forEach((e=>{t.add(e.name)}))})),Array.from(t).sort(((e,t)=>e.localeCompare(t)))},getAvailableDomaines(){const e=this.filterMissions().filter(this.filterByCountry).filter(this.filterByType),t=new Set;return e.forEach((e=>{e.domaines.forEach((e=>{t.add(e.name)}))})),Array.from(t)},getAvailableTypes(){const e=this.filterMissions().filter(this.filterByCountry).filter(this.filterByDomaine),t=new Set;return e.forEach((e=>{e.types.forEach((e=>{t.add(e.name)}))})),Array.from(t)}},computed:{filteredMissions(){const e=(this.currentPage-1)*this.missionsPerPage,t=this.filterMissions().filter(this.filterByDomaine).filter(this.filterByCountry).filter(this.filterByType),s=t.sort(((e,t)=>{const s=e.organisation&&e.organisation.post_title?e.organisation.post_title.localeCompare(t.organisation.post_title):0;return"asc"===this.sortOrder?s:-s}));return this.totalMissions=t.length,s.slice(e,e+this.missionsPerPage)},totalPages(){const e=this.filterMissions().filter(this.filterByDomaine).filter(this.filterByCountry).filter(this.filterByType);return Math.ceil(e.length/this.missionsPerPage)},sortOrderLabel(){return"asc"===this.sortOrder?"A-Z":"Z-A"},showPagination(){return this.totalPages>1},availableCountries(){return this.getAvailableCountries()},availableDomaines(){return this.getAvailableDomaines()},availableTypes(){return this.getAvailableTypes()}}};window.$=o;const h={delimiters:["[[","]]"],data:()=>({isLoading:!0,missions:[],localisations:[],domaines:[],totalMissions:0,currentPage:1,missionsPerPage:6,search:"",sortOrder:"asc",isGrid:!0,isLine:!1,color:"#ff5c35",filters:{localisations:[],domaines:[],types:[]},visibleSubtitleItems:["continents","domaines","types"]}),mounted(){const e=this,t=document.querySelector("html").getAttribute("lang").split("-")[0];e.currentLanguage=t;const s=new URLSearchParams(window.location.search),i=s.get("localisations"),r=s.get("domaines"),a=s.get("types");i&&(e.filters.localisations=i.split(",").map((e=>e.trim()))),r&&(e.filters.domaines=r.split(",").map((e=>e.trim()))),a&&(e.filters.types=a.split(",").map((e=>e.trim()))),o.get("/wp-json/vol/missions-svc?lang="+t,(function(t){e.missions=t.missions,e.localisations=t.localisations,e.domaines=t.domaines,e.totalMissions=t.missions.length,e.isLoading=!1}))},watch:{"filters.localisations":{handler(){this.updateURL(),this.resetPage()},deep:!0}
1,"filters.domaines":{handler(){this.updateURL(),this.resetPage()},deep:!0},"filters.types":{handler(){this.updateURL(),this.resetPage()},deep:!0},search(){this.resetPage()}},methods:{updateURL(){const e=new URLSearchParams(window.location.search);["localisations","domaines","types"].forEach((t=>{const s=this.filters[t];s&&s.length>0?e.set(t,s.join(",")):e.delete(t)}));const t=`${window.location.pathname}?${e.toString()}`;window.history.replaceState({},"",t)},toggleSubtitleItems(e){this.visibleSubtitleItems.includes(e)?this.visibleSubtitleItems=this.visibleSubtitleItems.filter((t=>t!==e)):this.visibleSubtitleItems.push(e)},filterMissions(){return this.missions.filter((e=>e.title.toLowerCase().includes(this.search.toLowerCase())))},toggleSortOrder(){this.sortOrder="asc"===this.sortOrder?"desc":"asc"},filterByLocalisation(e){const t=e.localisations.map((e=>e.name));return 0===this.filters.localisations.length||t.some((e=>this.filters.localisations.includes(e)))},deleteLocalisation(e){this.filters.localisations.splice(e,1)},filterByDomaine(e){const t=e.domaines.map((e=>e.name));return 0===this.filters.domaines.length||t.some((e=>this.filters.domaines.includes(e)))},deleteDomaine(e){this.filters.domaines.splice(e,1)},filterByType(e){const t=e.type;return 0===this.filters.types.length||this.filters.types.includes(t)},deleteType(e){this.filters.types.splice(e,1)},setDisplayGrid(){this.isGrid=!0,this.isLine=!1},setDisplayLine(){this.isGrid=!1,this.isLine=!0},clearFilters(){this.filters.domaines=[],this.filters.types=[],this.filters.localisations=[]},changePage(e){"..."!==e&&e>0&&e<=this.totalPages&&(this.currentPage=e)},previousPage(){this.currentPage>1&&this.currentPage--},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},pageNumbers(){const e=this.totalPages,t=this.currentPage,s=[],i=[];let r;s.push(1);for(let i=t-2;i<=t+2;i++)i>1&&i<e&&s.push(i);s.push(e);for(let e of s)r&&(e-r==2?i.push(r+1):e-r!=1&&i.push("...")),i.push(e),r=e;return i},resetPage(){this.currentPage=1},getAvailableLocalisations(){const e=this.filterMissions().filter(this.filterByDomaine).filter(this.filterByType),t=new Set;return e.forEach((e=>{e.localisations.forEach((e=>{t.add(e.name)}))})),Array.from(t)},getAvailableDomaines(){const e=this.filterMissions().filter(this.filterByLocalisation).filter(this.filterByType),t=new Set;return e.forEach((e=>{e.domaines.forEach((e=>{t.add(e.name)}))})),Array.from(t)},getAvailableTypes(){const e=this.filterMissions().filter(this.filterByLocalisation).filter(this.filterByDomaine),t=new Set;return e.forEach((e=>{t.add(e.type)})),Array.from(t)}},computed:{filteredMissions(){const e=(this.currentPage-1)*this.missionsPerPage,t=this.filterMissions().filter(this.filterByDomaine).filter(this.filterByLocalisation).filter(this.filterByType),s=t.sort(((e,t)=>{const s=e.organisation.post_title.localeCompare(t.organisation.post_title);return"asc"===this.sortOrder?s:-s}));return this.totalMissions=t.length,s.slice(e,e+this.missionsPerPage)},totalPages(){const e=this.filterMissions().filter(this.filterByDomaine).filter(this.filterByLocalisation).filter(this.filterByType);return Math.ceil(e.length/this.missionsPerPage)},sortOrderLabel(){return"asc"===this.sortOrder?"A-Z":"Z-A"},showPagination(){return this.totalPages>1},availableLocalisations(){return this.getAvailableLocalisations()},availableDomaines(){return this.getAvailableDomaines()},availableTypes(){return this.getAvailableTypes()}}};var c=s("jquery");window.$=o;const d={delimiters:["[[","]]"],data:()=>({currentLanguage:"fr",isLoading:!0,isVisible:!1,articles:[],categories:[],currentPage:1,itemsPerPage:6,filters:{categories:[]}}),mounted(){const e=document.querySelector("html").getAttribute("lang").split("-")[0];this.currentLanguage=e;const t=new URLSearchParams(window.location.search).get("category");o.get("/wp-json/vol/articles?lang="+e,(e=>{if(this.articles=e.articles,this.categories=e.categories,t){const e=t.split(",").map((e=>e.trim().toLowerCase())),s=this.categories.filter((t=>e.includes(t.name.toLowerCase()))).map((e=>e.name));this.filters.categories=s}this.isLoading=!1}))},methods:{toggleVisibility(){this.isVisible=!this.isVisible},filterByCategories(e){var t;const s=(null===(t=e.categories)||void 0===t?void 0:t.map((e=>e.name)))||[];return 0===this.filters.categories.length||s.some((e=>this.filters.categories.includes(e)))},toggleCategory(e){const t=this.filters.categories.indexOf(e);t>-1?this.filters.categories.splice(t,1):this.filters.categories.push(e);const s=new URLSearchParams(window.location.search);this.filters.categories.length>0?s.set("category",this.filters.categories.join(",")):s.delete("category");const i=`${window.location.pathname}?${s.toString()}`;window.history.replaceState({},"",i),this.currentPage=1},nextPage(){this.currentPage<this.totalPages&&this.currentPage++},prevPage(){this.currentPage>1&&this.currentPage--}},computed:{filteredArticles(){return this.articles.filter(this.filterByCategories)},paginatedArticles(){const e=(this.currentPage-1)*this.itemsPerPage,t=e+this.itemsPerPage;return this.filteredArticles.slice(e,t)},totalPages(){return Math.ceil(this.filteredArticles.length/this.itemsPerPage)}},watch:{filters:{deep:!0}}};(0,i.Z)((async()=>{r(".hamburger").on("click",(function(){r(this).toggleClass("active"),r("[data-navigation-mobile]").toggleClass("is-active"),r("body").toggleClass("mobile-menu-is-active")})),(0,a.ri)(d).mount("#articles-filters"),c("[data-faq-title]").on("click",(function(){var e=c(this).attr("data-faq");c(this).hasClass("active")?(c(this).removeClass("active"),c(e).slideUp(300)):(c("[data-faq-title]").removeClass("active"),c(this).addClass("active"),c("[data-faq-text]").slide
1Up(300),c(e).slideDown(300))})),c(".showVideo").on("click",(function(){c(".popup_video").removeClass("-z-[50000]"),c(".popup_video").addClass("z-[50000]");var e=c("#videohero").get(0);e.play(),e.currentTime=0})),c(".closeVideo").on("click",(function(){c(".popup_video").addClass("-z-[50000]"),c(".popup_video").removeClass("z-[50000]");var e=c("#videohero").get(0);e.pause(),e.currentTime=0})),c(".backButton").on("click",(function(){document.referrer?history.back():window.location.href="/"})),document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("[data-share-url]").forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault();var s=e.getAttribute("data-share-url");window.open(s,"_blank","width=500,height=360")}))}))})),document.getElementById("video-container")&&document.getElementById("video-container").addEventListener("click",(function(){document.getElementById("play-icon").style.display="none",document.getElementById("image-overlay").style.display="none",document.getElementById("video").play()})),document.getElementById("filters-svn")&&(0,a.ri)(n).mount("#filters-svn"),document.getElementById("filters-sve")&&(0,a.ri)(l).mount("#filters-sve"),document.getElementById("filters-svc")&&(0,a.ri)(h).mount("#filters-svc")}))}
1},e=>{var t=t=>e(e.s=t);e.O(0,[259,117],(()=>(t("./scripts/app.js"),t("./styles/app.scss")))),e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.