{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/8visRMLLmPaIl7AeY9rZ/EwOuybt02d2JoonSixDG/Random_project.js"],
  "sourcesContent": ["// Apply this code override to the \"Collection List\" and it will randomly re-order your \"Post\" containers\n// Modified from the following override:\n// https://gist.github.com/tswic-highdesert/23e82bdc9f1bc7fa5ef48c1cac0656e2\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";export const withShuffledItems=Component=>{const ShuffledComponent=props=>{const componentRef=useRef(null);const shuffleAndDisplayItems=()=>{const container=componentRef.current;if(!container)return;// get child nodes of our collection\nlet items=Array.from(container.children);// Shuffle the array\nfor(let i=items.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[items[i],items[j]]=[items[j],items[i]];}// Ne garde que les 3 premiers items apr\u00E8s le m\u00E9lange\nconst firstThreeItems=items.slice(0,3);// Vide le container pour ins\u00E9rer les \u00E9l\u00E9ments r\u00E9ordonn\u00E9s\ncontainer.innerHTML=\"\";// R\u00E9ins\u00E8re uniquement les 3 premiers items m\u00E9lang\u00E9s\nfirstThreeItems.forEach(item=>{container.appendChild(item);});};useEffect(()=>{shuffleAndDisplayItems()// Shuffle and display items on component mount\n;},[])// Empty dependency array ensures this runs once after the initial render\n;return /*#__PURE__*/_jsx(Component,{ref:componentRef,...props});};return ShuffledComponent;};\nexport const __FramerMetadata__ = {\"exports\":{\"withShuffledItems\":{\"type\":\"reactHoc\",\"name\":\"withShuffledItems\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Random_project.map"],
  "mappings": "kDAGsF,IAAMA,EAAkBC,GAAoCC,GAAO,CAAC,IAAMC,EAAaC,EAAO,IAAI,EAAQC,EAAuB,IAAI,CAAC,IAAMC,EAAUH,EAAa,QAAQ,GAAG,CAACG,EAAU,OAC/Q,IAAIC,EAAM,MAAM,KAAKD,EAAU,QAAQ,EACvC,QAAQE,EAAED,EAAM,OAAO,EAAEC,EAAE,EAAEA,IAAI,CAAC,IAAMC,EAAE,KAAK,MAAM,KAAK,OAAO,GAAGD,EAAE,EAAE,EAAE,CAACD,EAAMC,CAAC,EAAED,EAAME,CAAC,CAAC,EAAE,CAACF,EAAME,CAAC,EAAEF,EAAMC,CAAC,CAAC,CAAE,CAClH,IAAME,EAAgBH,EAAM,MAAM,EAAE,CAAC,EACrCD,EAAU,UAAU,GACpBI,EAAgB,QAAQC,GAAM,CAACL,EAAU,YAAYK,CAAI,CAAE,CAAC,CAAE,EAAE,OAAAC,EAAU,IAAI,CAACP,EAAuB,CACrG,EAAE,CAAC,CAAC,EACgBQ,EAAKZ,EAAU,CAAC,IAAIE,EAAa,GAAGD,CAAK,CAAC,CAAE",
  "names": ["withShuffledItems", "Component", "props", "componentRef", "pe", "shuffleAndDisplayItems", "container", "items", "i", "j", "firstThreeItems", "item", "ue", "p"]
}
