{"version":3,"file":"KobisMotionController.Cezh7NM6.mjs","names":[],"sources":["https:/framerusercontent.com/modules/pRg1wzjoedj4VQyMFXay/g2adoCiD7miRNQMdGMo5/KobisMotionController.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * KOBIS Motion Controller\n *\n * Adds subtle scroll reveal, text motion, and card motion to existing Framer layers.\n *\n * @framerIntrinsicWidth 1\n * @framerIntrinsicHeight 1\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function KobisMotionController(props){const{enableSections,enableText,enableCards,distance,duration,stagger,threshold,once,style}=props;React.useEffect(()=>{if(typeof window===\"undefined\"||typeof document===\"undefined\")return;const reduceMotion=window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;const root=document.documentElement;root.classList.add(\"kobis-motion-enabled\");const styleId=\"kobis-motion-controller-style\";let styleElement=document.getElementById(styleId);if(!styleElement){styleElement=document.createElement(\"style\");styleElement.id=styleId;document.head.appendChild(styleElement);}styleElement.textContent=`\n            html.kobis-motion-enabled {\n                --kobis-motion-distance: ${distance}px;\n                --kobis-text-distance: ${Math.max(10,Math.round(distance*.58))}px;\n                --kobis-motion-duration: ${duration}ms;\n            }\n            html.kobis-motion-enabled .kobis-reveal,\n            html.kobis-motion-enabled .kobis-text-motion,\n            html.kobis-motion-enabled .kobis-card-motion {\n                opacity: 0;\n                will-change: opacity, transform, filter;\n                transition-property: opacity, transform, filter, box-shadow;\n                transition-duration: var(--kobis-motion-duration);\n                transition-timing-function: cubic-bezier(.16, 1, .3, 1);\n                transition-delay: var(--kobis-delay, 0ms);\n            }\n            html.kobis-motion-enabled .kobis-reveal {\n                transform: translate3d(0, var(--kobis-motion-distance), 0);\n                filter: blur(4px);\n            }\n            html.kobis-motion-enabled .kobis-text-motion {\n                transform: translate3d(0, var(--kobis-text-distance), 0);\n                filter: blur(7px);\n            }\n            html.kobis-motion-enabled .kobis-card-motion {\n                transform: translate3d(0, var(--kobis-motion-distance), 0) scale(.985);\n                filter: blur(3px);\n            }\n            html.kobis-motion-enabled .kobis-inview {\n                opacity: 1;\n                transform: translate3d(0, 0, 0) scale(1);\n                filter: blur(0);\n            }\n            html.kobis-motion-enabled .kobis-card-motion.kobis-inview:hover {\n                transform: translate3d(0, -4px, 0) scale(1);\n                transition-duration: 220ms;\n            }\n            @media (prefers-reduced-motion: reduce) {\n                html.kobis-motion-enabled .kobis-reveal,\n                html.kobis-motion-enabled .kobis-text-motion,\n                html.kobis-motion-enabled .kobis-card-motion {\n                    opacity: 1 !important;\n                    transform: none !important;\n                    filter: none !important;\n                    transition: none !important;\n                }\n            }\n        `;const sectionPattern=/(HeroSection|WhoWeAreSection|ServiceSection|ContentSection|PricingSection|BrandSection|BlogSection|Faq|FaqWrapped|ContactSection|PortfoliosSection|CoreValuesSection|TestimonialSection|OurPurposeSection)/i;const textPattern=/(Title|Heading|Details|Description|Trust|Node|FAQ|Faq|Overview|Purpose|Partnership|Franchise|Investment|Market|Kobis|KOBIS|Service|DueDiligence|Growth)/i;const cardPattern=/(Card|Cards|CardList|CardLists|ServicesCard|PortfolioCard|BlogCard|WhyUkCard|PriceCard|QAS|Grid|Lists|BrandTicker)/i;const ignorePattern=/(Navigation|Footer|SmoothScroll|ScrollTrigger|Ticker|Noize|Gradient)/i;const layers=Array.from(document.querySelectorAll(\"[data-framer-name]\"));const targets=[];layers.forEach(layer=>{const name=layer.getAttribute(\"data-framer-name\")||\"\";if(!name||ignorePattern.test(name))return;if(layer.closest('[data-framer-name=\"Navigation\"], [data-framer-name=\"Footer\"]'))return;let assigned=false;if(enableCards&&cardPattern.test(name)){layer.classList.add(\"kobis-card-motion\");assigned=true;}else if(enableText&&textPattern.test(name)){const text=(layer.textContent||\"\").trim();if(text.length>2&&text.length<320){layer.classList.add(\"kobis-text-motion\");assigned=true;}}else if(enableSections&&sectionPattern.test(name)){layer.classList.add(\"kobis-reveal\");assigned=true;}if(assigned)targets.push(layer);});if(reduceMotion||targets.length===0){targets.forEach(target=>target.classList.add(\"kobis-inview\"));return;}targets.forEach((target,index)=>{const delay=Math.min(index%8*stagger,stagger*7);target.style.setProperty(\"--kobis-delay\",`${delay}ms`);});const observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{const target=entry.target;if(entry.isIntersecting){target.classList.add(\"kobis-inview\");if(once)observer.unobserve(target);}else if(!once){target.classList.remove(\"kobis-inview\");}});},{threshold:Math.max(.01,Math.min(.8,threshold)),rootMargin:\"0px 0px -8% 0px\"});targets.forEach(target=>observer.observe(target));return()=>{observer.disconnect();targets.forEach(target=>{target.classList.remove(\"kobis-reveal\",\"kobis-text-motion\",\"kobis-card-motion\",\"kobis-inview\");target.style.removeProperty(\"--kobis-delay\");});};},[enableSections,enableText,enableCards,distance,duration,stagger,threshold,once]);return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{width:1,height:1,opacity:0,overflow:\"hidden\",pointerEvents:\"none\",...style}});}addPropertyControls(KobisMotionController,{enableSections:{type:ControlType.Boolean,title:\"Sections\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},enableText:{type:ControlType.Boolean,title:\"Text\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},enableCards:{type:ControlType.Boolean,title:\"Cards\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},distance:{type:ControlType.Number,title:\"Distance\",defaultValue:28,min:8,max:80,step:1,unit:\"px\"},duration:{type:ControlType.Number,title:\"Duration\",defaultValue:760,min:180,max:1600,step:20,unit:\"ms\"},stagger:{type:ControlType.Number,title:\"Stagger\",defaultValue:55,min:0,max:180,step:5,unit:\"ms\"},threshold:{type:ControlType.Number,title:\"Threshold\",defaultValue:.16,min:.01,max:.8,step:.01},once:{type:ControlType.Boolean,title:\"Once\",defaultValue:true,enabledTitle:\"Once\",disabledTitle:\"Repeat\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"KobisMotionController\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"1\",\"framerIntrinsicHeight\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./KobisMotionController.map"],"mappings":"wLASG,SAAwB,EAAsB,EAAM,CAAC,GAAK,CAAC,iBAAe,aAAW,cAAY,WAAS,WAAS,UAAQ,YAAU,OAAK,SAAO,EA+C0lE,OA/CplE,MAAoB,CAAC,GAAU,IAAS,QAAa,OAAO,SAAW,IAAY,OAAO,IAAM,EAAa,EAAO,WAAW,mCAAmC,CAAC,QAAmB,SAAS,gBAAqB,UAAU,IAAI,uBAAuB,CAAC,IAAM,EAAQ,gCAAoC,EAAa,SAAS,eAAe,EAAQ,CAAK,IAAc,EAAa,SAAS,cAAc,QAAQ,CAAC,EAAa,GAAG,EAAQ,SAAS,KAAK,YAAY,EAAa,EAAE,EAAa,YAAY;;2CAElmB,EAAS;yCACX,KAAK,IAAI,GAAG,KAAK,MAAM,EAAS,IAAI,CAAC,CAAC;2CACpC,EAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA2C1C,IAAM,EAAe,8MAAoN,EAAY,2JAAiK,EAAY,sHAA4H,EAAc,wEAA8E,EAAO,MAAM,KAAK,SAAS,iBAAiB,qBAAqB,CAAC,CAAO,EAAQ,EAAE,CAA8nB,GAA7nB,EAAO,QAAQ,GAAO,CAAC,IAAM,EAAK,EAAM,aAAa,mBAAmB,EAAE,GAA6C,GAAvC,CAAC,GAAM,EAAc,KAAK,EAAK,EAAW,EAAM,QAAQ,+DAA+D,CAAC,OAAO,IAAI,EAAS,GAAM,GAAG,GAAa,EAAY,KAAK,EAAK,CAAE,EAAM,UAAU,IAAI,oBAAoB,CAAC,EAAS,WAAc,GAAY,EAAY,KAAK,EAAK,CAAC,CAAC,I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