{"version":3,"file":"Definitive.CIspbHdc.mjs","names":["useMemo","p","s"],"sources":["https:/framerusercontent.com/modules/3B1oVdlNWdIpeY0H7sMN/Ukysz4QBjqIFqH8lx2V9/Definitive.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useMemo,useState,useEffect}from\"react\";export function persistentStore(){function setStorage(name,value){localStorage.setItem(name,value);}function readStorage(name){return localStorage.getItem(name);}function removeStorage(name){localStorage.removeItem(name);}function setCookie(name,value,days){var expires=\"\";if(days){var date=new Date;date.setTime(date.getTime()+days*24*60*60*1e3);expires=\"; expires=\"+date.toUTCString();}document.cookie=name+\"=\"+(value||\"\")+expires+\"; path=/\";}function readCookie(name){var nameEQ=name+\"=\";var ca=document.cookie.split(\";\");for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==\" \")c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}return null;}function removeCookie(name){document.cookie=name+\"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;\";}function selectStorageMethod(){const testKey=`test_${new Date().getTime()}`;try{setStorage(testKey,true);if(readStorage(testKey)){console.debug(\"storage works\");return true;}removeStorage(testKey);}catch(e){console.log(e)// Logs the error\n;}try{setCookie(testKey,true);if(readCookie(testKey)){console.debug(\"cookies works\");return false;}removeCookie(testKey);console.warn(\"error using cookies\");}catch(e){console.log(e)// Logs the error\n;}return false;}const isStorage=selectStorageMethod();return{read:isStorage?readStorage:readCookie,write:isStorage?setStorage:setCookie,delete:isStorage?removeStorage:removeCookie};}const store=persistentStore();export function hideBySlug(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}const mapping={English:\"en\",\"French (France)\":\"fr-fr\",\"German (Germany)\":\"de-de\",\"German (Switzerland)\":\"de-ch\",\"Japanese (Japan)\":\"ja-jp\",\"French (Switzerland)\":\"fr-ch\",\"German (Austria)\":\"de-at\",\"Dutch (Belgium)\":\"nl-be\",\"English (United Kingdom)\":\"en-uk\",\"Czech (Czechia)\":\"cz-cz\",\"French (Belgium)\":\"fr-be\"};export function hideByLanguage(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const{locale,availability}=props;const isVisible=useMemo(()=>{const mapped=mapping[locale]||locale;return!locale||!availability||availability!==\"No\"&&availability.split(\",\").map(t=>(t||\"\").trim()).indexOf(mapped)>-1;},[locale,availability]);if(!isVisible){return null;}return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}export function showByLanguage(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const{locale,availability}=props;const isHidden=useMemo(()=>{return!locale||!availability||availability!==\"No\"&&availability.split(\",\").map(t=>(t||\"\").trim()).indexOf(mapping[locale])>-1;},[locale,availability]);if(isHidden){return null;}return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}function setAlignement(selectorParent,selectorChildren){const parents=Array.from(document.querySelectorAll(selectorParent));parents.forEach(p=>{const children=Array.from(p.querySelectorAll(selectorParent+\" \"+selectorChildren));if(parent&&children?.length<4){p.style.justifyContent=\"start\";}});}export function setCardAlignement(Component){return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{let timeout=setTimeout(()=>setAlignement(\".framer-3pd9qb\",\".framer-f5z6eb\"),0);return()=>{clearTimeout(timeout);};},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}export function withClassParentSameHeight(Component){return props=>{props.className+=\" parentSameHeight\"// Remember to add a space\n;return /*#__PURE__*/_jsx(Component,{...props});};}export function withClassChildSameHeight(Component){return props=>{props.className+=\" childSameHeight\"// Remember to add a space\n;return /*#__PURE__*/_jsx(Component,{...props});};}let baseSelectorCounter=0;function setMinHeight(selectorParent,selectorChildren){const parents=Array.from(document.querySelectorAll(selectorParent));parents.forEach(p=>{const s=Array.from(p.querySelectorAll(selectorChildren));const max=Math.max(...s.map(s=>s.offsetHeight));const baseClass=\"sameHeight_w5jOhj\";if((p.className||\"\").indexOf(baseClass)==-1){p.className=p.className+\" \"+baseClass;const className=baseClass+\"_\"+baseSelectorCounter++;document.querySelector(\"style\").textContent+=`@media screen and (min-width:1023px) { div.${className} { min-height: ${max}px !important; }}`;s.forEach(el=>el.className=el.className+\" \"+className);}else{console.debug(\"skip\");}});}export function setCardHeight(Component){return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{let timeout=setTimeout(()=>setMinHeight(\".parentSameHeight\",\".childSameHeight\"),0);return()=>{clearTimeout(timeout);};},[]);return /*#__PURE__*/_jsx(Component,{ref:ref,...props});});}// BANNER MECHANISM\n/*\n *  we cannot use a component to hide the banner, since the component does not support rich text\n * if we hide the banner on condition with the ovverride, we get some layout shifting\n * we do the opposite : banner top parent is hidden by default, and we show it only when necessary\n */function findDataAttribute(node,name,depth=3){let current=node;while(current&&depth-- >=0){if(current.dataset[name]){return current.dataset[name];}if(current===current.parentElement){return false;}current=current.parentElement;}return false;}const showBanner=()=>{setTimeout(()=>{const b=document.querySelector(\"[data-banner='banner']\");if(b){b.parentElement.style.position=\"relative\";b.parentElement.style.zIndex=\"1\";}},100);};export function hideByCookie(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const{slug,id}=props;const key=useMemo(()=>\"visibility_\"+(slug||id),[slug,id]);const[isVisible,setVisible]=useState(()=>{const isVisible=!store.read(key);if(isVisible){showBanner();}return isVisible;});if(!isVisible){return null;}return /*#__PURE__*/_jsx(Component,{ref:ref,...props,onClick:event=>{if(findDataAttribute(event.target,\"onclickAction\")===\"close\"){store.write(key,true);setVisible(false);}}});});}export function addDataAttribute(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,\"data-onclick-action\":\"close\"});});}export function addBannerId(Component){return /*#__PURE__*/forwardRef((props,ref)=>{return /*#__PURE__*/_jsx(Component,{ref:ref,...props,id:\"banner\",\"data-banner\":\"banner\"});});}// BANNER MECHANISM END\n\nexport const __FramerMetadata__ = {\"exports\":{\"setCardAlignement\":{\"type\":\"reactHoc\",\"name\":\"setCardAlignement\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addBannerId\":{\"type\":\"reactHoc\",\"name\":\"addBannerId\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withClassParentSameHeight\":{\"type\":\"reactHoc\",\"name\":\"withClassParentSameHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"showByLanguage\":{\"type\":\"reactHoc\",\"name\":\"showByLanguage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"persistentStore\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"setCardHeight\":{\"type\":\"reactHoc\",\"name\":\"setCardHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"hideBySlug\":{\"type\":\"reactHoc\",\"name\":\"hideBySlug\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"hideByCookie\":{\"type\":\"reactHoc\",\"name\":\"hideByCookie\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"addDataAttribute\":{\"type\":\"reactHoc\",\"name\":\"addDataAttribute\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withClassChildSameHeight\":{\"type\":\"reactHoc\",\"name\":\"withClassChildSameHeight\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"hideByLanguage\":{\"type\":\"reactHoc\",\"name\":\"hideByLanguage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Definitive.map"],"mappings":"gIAAoG,SAAgB,GAAiB,CAAC,SAAS,EAAW,EAAK,EAAM,CAAC,aAAa,QAAQ,EAAK,EAAM,CAAE,SAAS,EAAY,EAAK,CAAC,OAAO,aAAa,QAAQ,EAAK,CAAE,SAAS,EAAc,EAAK,CAAC,aAAa,WAAW,EAAK,CAAE,SAAS,EAAU,EAAK,EAAM,EAAK,CAAC,IAAI,EAAQ,GAAG,GAAG,EAAK,CAAC,IAAI,EAAK,IAAI,KAAK,EAAK,QAAQ,EAAK,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