{"version":3,"file":"SnapScroll.CqPGo_xa.mjs","names":["__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","c","init_jsx_runtime","ce","init_framer_Bf4_tcb2","addPropertyControls","ControlType","SnapScroll","alignRaw","strictRaw","props","align","strictness","names","targets","s","estateName","otherNames","name","otherSelectors","otherChildren","sliderNames","sliderTargets","sliderSel","n","sliderCss","made","host","el","live","prevPos","step","row","card","gap","dir","mk","b","label","glyph","side","prev","nxt","off","sharedCss","estateCss","offs","dragTargets","down","moved","startX","startLeft","onDown","e","onMove","dx","onUp","onClick","onDragStart","init_SnapScroll"],"sources":["https:/framerusercontent.com/modules/mwpavbYqs5TA1dEoY9ik/GM5VsYKqwZAPIZYzLEPW/SnapScroll.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";// Framer's native frame model does not expose CSS scroll snapping, so this\n// zero-size helper adds it to named layers. It renders no visible interface.\n/**\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n * @framerIntrinsicWidth 0\n * @framerIntrinsicHeight 0\n * @framerDisableUnlink\n */export default function SnapScroll(props){const{targets=\"Estate Selector List, Posters\",align:alignRaw=\"start\",strictness:strictRaw=\"mandatory\",dragTargets=\"\",sliderTargets=\"\"}=props;const align=String(alignRaw).toLowerCase(),strictness=String(strictRaw).toLowerCase();const names=String(targets).split(\",\").map(s=>s.trim()).filter(Boolean);const estateName=\"Estate Selector List\";const otherNames=names.filter(name=>name!==estateName);const otherSelectors=otherNames.map(name=>'[data-framer-name=\"'+name+'\"]').join(\", \");const otherChildren=otherNames.flatMap(name=>['[data-framer-name=\"'+name+'\"] > *','[data-framer-name=\"'+name+'\"] > * > *']).join(\", \");const sliderNames=String(sliderTargets).split(\",\").map(s=>s.trim()).filter(Boolean);const sliderSel=sliderNames.map(n=>'[data-framer-name=\"'+n+'\"]');// Same track rules as EstateSlider: full-bleed row, hidden scrollbar, no vertical scroll, 40px inset (24 on phones).\nconst sliderCss=sliderNames.length?sliderSel.join(\", \")+\"{display:flex;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x \"+strictness+\";scrollbar-width:none;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;padding:0 40px!important;scroll-padding-inline:40px;box-sizing:border-box;cursor:grab}\"+sliderSel.map(s=>s+\"::-webkit-scrollbar\").join(\", \")+\"{display:none;height:0}\"+sliderSel.map(s=>s+\" > *\").join(\", \")+\"{flex:none;scroll-snap-align:\"+align+\"}\"+\".vw-snap-arrow{position:absolute;top:50%;transform:translateY(-50%);width:54px;height:54px;border-radius:50%;border:1px solid rgba(28,22,17,0.12);background:#FBF6EC;color:#1C1611;box-shadow:0 2px 10px rgba(28,22,17,0.14);font-size:26px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);z-index:3;padding:0;transition:background 180ms ease,border-color 180ms ease}\"+\".vw-snap-arrow:hover{background:#FFFFFF;border-color:rgba(28,22,17,0.22)}\"+\"@media (max-width:809px){.vw-snap-arrow{display:none!important}\"+sliderSel.join(\", \")+\"{padding:0 24px!important;scroll-padding-inline:24px}}\":\"\";// Arrows for slider targets, placed on the row's parent like EstateSlider's.\nReact.useEffect(()=>{const rows=sliderNames.flatMap(n=>Array.from(document.querySelectorAll('[data-framer-name=\"'+n+'\"]')).map(el=>({el,name:n})));const made=rows.map(({el,name})=>{const host=el.parentElement;if(!host)return()=>{};const live=()=>host.querySelector('[data-framer-name=\"'+name+'\"]')||el;const prevPos=host.style.position;if(getComputedStyle(host).position===\"static\")host.style.position=\"relative\";const step=dir=>{const row=live();const card=row.firstElementChild;const gap=parseFloat(getComputedStyle(row).columnGap||getComputedStyle(row).gap||\"0\")||0;row.scrollBy({left:dir*(card?card.offsetWidth+gap:row.clientWidth*.8),behavior:\"smooth\"});};const mk=(dir,label,glyph,side)=>{const b=document.createElement(\"button\");b.className=\"vw-snap-arrow\";b.type=\"button\";b.setAttribute(\"aria-label\",label);b.textContent=glyph;b.style[side]=\"16px\";b.addEventListener(\"click\",()=>step(dir));host.appendChild(b);return b;};const prev=mk(-1,\"Previous\",\"‹\",\"left\"),nxt=mk(1,\"Next\",\"›\",\"right\");return()=>{prev.remove();nxt.remove();host.style.position=prevPos;};});return()=>made.forEach(off=>off());},[sliderTargets]);const sharedCss=otherNames.length?otherSelectors+\"{scroll-snap-type:x \"+strictness+\";overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}\"+otherNames.map(name=>'[data-framer-name=\"'+name+'\"]::-webkit-scrollbar').join(\", \")+\"{display:none}\"+otherChildren+\"{scroll-snap-align:\"+align+\";scroll-snap-stop:always}\":\"\";const estateCss=names.includes(estateName)?\"@media (max-width:767px){\"+'[data-framer-name=\"Estate Selector List\"]{'+\"display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;\"+\"align-items:flex-start!important;justify-content:flex-start!important;gap:16px!important;\"+\"overflow-x:auto!important;overflow-y:hidden!important;overscroll-behavior-x:contain;\"+\"-webkit-overflow-scrolling:touch;scroll-snap-type:x \"+strictness+\";\"+\"scroll-padding-inline:0;padding-left:0!important;padding-right:0!important;\"+\"box-sizing:border-box!important;scrollbar-width:none}\"+'[data-framer-name=\"Estate Selector List\"]::-webkit-scrollbar{display:none}'+'[data-framer-name=\"Estate Selector List\"] > *{'+\"flex:0 0 calc(100% - 32px)!important;width:calc(100% - 32px)!important;\"+\"min-width:calc(100% - 32px)!important;scroll-snap-align:start;scroll-snap-stop:always}\"+\"}\":\"\";// Mouse drag for the layers named in \"Drag targets\". Touch and trackpad already scroll natively.\nReact.useEffect(()=>{const dragNames=(String(dragTargets)+\",\"+String(sliderTargets)).split(\",\").map(s=>s.trim()).filter(Boolean);const els=dragNames.flatMap(n=>Array.from(document.querySelectorAll('[data-framer-name=\"'+n+'\"]')));const offs=els.map(el=>{let down=false,moved=false,startX=0,startLeft=0;const onDown=e=>{if(e.pointerType!==\"mouse\"||e.button!==0)return;down=true;moved=false;startX=e.clientX;startLeft=el.scrollLeft;};const onMove=e=>{if(!down)return;const dx=e.clientX-startX;if(!moved&&Math.abs(dx)>4){moved=true;el.style.scrollSnapType=\"none\";el.style.cursor=\"grabbing\";}if(moved)el.scrollLeft=startLeft-dx;};const onUp=()=>{if(!down)return;down=false;el.style.scrollSnapType=\"\";el.style.cursor=\"grab\";};// A drag must not open the card's link.\nconst onClick=e=>{if(moved){e.preventDefault();e.stopPropagation();moved=false;}};const onDragStart=e=>e.preventDefault();el.style.cursor=\"grab\";el.addEventListener(\"pointerdown\",onDown);window.addEventListener(\"pointermove\",onMove);window.addEventListener(\"pointerup\",onUp);el.addEventListener(\"click\",onClick,true);el.addEventListener(\"dragstart\",onDragStart);return()=>{el.style.cursor=\"\";el.removeEventListener(\"pointerdown\",onDown);window.removeEventListener(\"pointermove\",onMove);window.removeEventListener(\"pointerup\",onUp);el.removeEventListener(\"click\",onClick,true);el.removeEventListener(\"dragstart\",onDragStart);};});return()=>offs.forEach(off=>off());},[dragTargets,sliderTargets]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:0,height:0,pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"style\",{children:sharedCss+estateCss+sliderCss})});}addPropertyControls(SnapScroll,{align:{type:ControlType.Enum,title:\"Align\",options:[\"start\",\"center\"],optionTitles:[\"Start\",\"Center\"],defaultValue:\"start\"},targets:{type:ControlType.String,title:\"Targets\",defaultValue:\"Estate Selector List, Posters\",description:\"Comma-separated layer names to snap\"},sliderTargets:{type:ControlType.String,title:\"Slider targets\",defaultValue:\"\",description:\"Rows that get the estate-slider treatment: full-bleed track, arrows, drag, no vertical scroll\"},dragTargets:{type:ControlType.String,title:\"Drag targets\",defaultValue:\"\",description:\"Comma-separated layer names that can be dragged with a mouse\"},strictness:{type:ControlType.Enum,title:\"Snap\",options:[\"mandatory\",\"proximity\"],optionTitles:[\"Mandatory\",\"Proximity\"],defaultValue:\"mandatory\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SnapScroll\",\"slots\":[],\"annotations\":{\"framerDisableUnlink\":\"\",\"framerIntrinsicWidth\":\"0\",\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicHeight\":\"0\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SnapScroll.map"],"mappings":"A,wLAQG,SAAwBU,EAAW,EAAM,CAAC,GAAK,CAAC,UAAQ,gCAAgC,MAAMC,EAAS,QAAQ,WAAWC,EAAU,YAAY,cAAY,GAAG,gBAAc,IAAIC,EAAYC,EAAM,OAAOH,CAAQ,CAAC,CAAC,YAAY,EAAEI,EAAW,OAAOH,CAAS,CAAC,CAAC,YAAY,EAAQI,EAAM,OAAOC,CAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,GAAGC,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,OAAO,EAAQC,EAAW,uBAA6BC,EAAWJ,EAAM,OAAO,GAAMK,IAAOF,CAAU,EAAQG,EAAeF,EAAW,IAAI,GAAM,sBAAsBC,EAAK,IAAI,CAAC,CAAC,KAAK,IAAI,EAAQE,EAAcH,EAAW,QAAQ,GAAM,CAAC,sBAAsBC,EAAK,SAAS,sBAAsBA,EAAK,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,EAAQG,EAAY,OAAOC,CAAa,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,GAAGP,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,OAAO,EAAQQ,EAAUF,EAAY,IAAI,GAAG,sBAAsBG,EAAE,IAAI,EACjyBC,EAAUJ,EAAY,OAAOE,EAAU,KAAK,IAAI,EAAE,0FAA0FX,EAAW,8KAA8KW,EAAU,IAAI,GAAGR,EAAE,qBAAqB,CAAC,CAAC,KAAK,IAAI,EAAE,0BAA0BQ,EAAU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