{"version":3,"file":"WithGrid.CsW_2cSW.mjs","names":["useState","debounce"],"sources":["https:/framerusercontent.com/modules/y4zxnVhQ7SiN8iJh4Lr8/kIfwNIkX7xtUHFhNeYgg/WithGrid.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import debounce from\"lodash/debounce\";export function withGridLine(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,transformOrigin:\"top left\"},animate:{scaleX:[0,1]},transition:{duration:2,ease:[.075,.82,.165,1]}});};}export function withGridWidth(Component){return props=>{const DEFAULT_WIDTH=25;const[width,setWidth]=useState(DEFAULT_WIDTH);useEffect(()=>{const style=document.createElement(\"style\");style.textContent=`\n                .grid-align:nth-child(2n) {\n                    justify-content: end;\n                }\n\n                .grid-align:nth-child(3n) {\n                    justify-content: center;\n                }\n            `;document.head.appendChild(style);return()=>{document.head.removeChild(style);};},[]);useEffect(()=>{const onResize=()=>{if(window.matchMedia(\"(max-width: 609px)\").matches){setWidth(100);}else if(window.matchMedia(\"(max-width: 1100px)\").matches){setWidth(50);}else{setWidth(DEFAULT_WIDTH);}};const debouncedResize=debounce(onResize,200);window.addEventListener(\"resize\",debouncedResize);onResize();return()=>{window.removeEventListener(\"resize\",debouncedResize);};},[]);return /*#__PURE__*/_jsx(Component,{...props,className:`${props.className} grid-align`,style:{...props.style,width:`${width}vw`}});};}export function withGridWidthImage(Component){return props=>{return /*#__PURE__*/_jsx(Component,{...props,style:{...props.style,width:\"75vw\",minWidth:0}});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withGridLine\":{\"type\":\"reactHoc\",\"name\":\"withGridLine\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGridWidth\":{\"type\":\"reactHoc\",\"name\":\"withGridWidth\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withGridWidthImage\":{\"type\":\"reactHoc\",\"name\":\"withGridWidthImage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WithGrid.map"],"mappings":"qQAAuH,SAAgB,EAAa,EAAU,CAAC,MAAO,IAA4B,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,gBAAgB,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,EAAE,CAAC,CAAC,CAAK,UAAgB,EAAc,EAAU,CAAC,MAAO,IAAO,CAAC,GAA4B,CAAC,EAAM,EAAS,CAACA,EAAS,IAQ6B,OARd,MAAc,CAAC,IAAM,EAAM,SAAS,cAAc,SAQxd,MARie,GAAM,YAAY;;;;;;;;cAQphB,SAAS,KAAK,YAAY,OAAiB,CAAC,SAAS,KAAK,YAAY,EAAQ,CAAE,EAAC,EAAE,EAAE,MAAc,CAAC,IAAM,MAAa,CAAI,EAAO,WAAW,sBAAsB,QAAS,EAAS,KAAc,EAAO,WAAW,uBAAuB,QAAS,EAAS,IAAU,EAAS,GAAiB,EAAO,EAAgBC,EAAS,EAAS,KAAkE,OAA7D,EAAO,iBAAiB,SAAS,GAAiB,QAAqB,CAAC,EAAO,oBAAoB,SAAS,EAAkB,CAAE,EAAC,EAAE,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,UAAU,GAAG,EAAM,UAAU,aAAa,MAAM,CAAC,GAAG,EAAM,MAAM,MAAM,GAAG,EAAM,IAAI,CAAC,CAAG,CAAE,UAAgB,EAAmB,EAAU,CAAC,MAAO,IAA4B,EAAK,EAAU,CAAC,GAAG,EAAM,MAAM,CAAC,GAAG,EAAM,MAAM,MAAM,OAAO,SAAS,EAAE,CAAC,CAAK"}