!function(){"use strict";if(!window.location.pathname.includes("/collections/"))return;const t={en:"English",fr:"Français"},p=["filter.p.m.filters.card_language","filter.p.m.custom.language"];function l(){const s=window.location.pathname.split("/")[1]||"";return/^fr(-|$)/.test(s)?"fr":/^[a-z]{2}$/.test(s)?s:"en"}function n(){const e=t[l()];if(!e)return;const o=new URL(window.location.href),i=o.searchParams;let c=!1;p.forEach(function(k){const a=i.get(k);a&&a!==e&&(i.set(k,e),c=!0)});if(c){window.location.replace(o.pathname+"?"+i.toString())}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",n):n(),window.addEventListener("popstate",function(){setTimeout(n,100)})}();
