{"version":3,"file":"InputOverride.BECDV2lF.mjs","names":[],"sources":["https:/framerusercontent.com/modules/YnC3NxB0OzjGCGpp5S3K/tY7pce6kmDkwcWa41fdG/InputOverride.js"],"sourcesContent":["// withCioIdFromUrl.tsx\nimport{jsx as _jsx}from\"react/jsx-runtime\";function readParam(name){if(typeof window===\"undefined\")return\"\";const p=new URLSearchParams(window.location.search||\"\");return p.get(name)??\"\";}export function withCioIdFromUrl(Component){return props=>{const value=readParam(\"cio_id\")||\"\";// 1) Try controlled prop (works on many Framer inputs)\nconst el=/*#__PURE__*/_jsx(Component,{...props,value:value,name:\"cio_id\"// optional: ensure name\n,placeholder:props?.placeholder??\"cio_id\"});// 2) After render, set the actual DOM input as a fallback\n//    This helps when the component is uncontrolled or ignores `value` initially.\nqueueMicrotask(()=>{try{// Prefer the input inside this layer; fallback to first matching on page\nconst root=document.querySelector(`[data-framer-component-id=\"${props?.id}\"]`);const input=(root?.querySelector('input[name=\"cio_id\"], textarea[name=\"cio_id\"]'))||document.querySelector('input[name=\"cio_id\"], textarea[name=\"cio_id\"]');if(input&&value){input.value=value;input.setAttribute(\"value\",value);input.dispatchEvent(new Event(\"input\",{bubbles:true}));input.dispatchEvent(new Event(\"change\",{bubbles:true}));}}catch{}});return el;};}export function withUTM_CampaignFromUrl(Component){return props=>{const value=readParam(\"utm_campaign\")||\"\";// 1) Try controlled prop (works on many Framer inputs)\nconst el=/*#__PURE__*/_jsx(Component,{...props,value:value,name:\"utm_campaign\"// optional: ensure name\n,placeholder:props?.placeholder??\"cio_id\"});// 2) After render, set the actual DOM input as a fallback\n//    This helps when the component is uncontrolled or ignores `value` initially.\nqueueMicrotask(()=>{try{// Prefer the input inside this layer; fallback to first matching on page\nconst root=document.querySelector(`[data-framer-component-id=\"${props?.id}\"]`);const input=(root?.querySelector('input[name=\"utm_campaign\"], textarea[name=\"utm_campaign\"]'))||document.querySelector('input[name=\"utm_campaign\"], textarea[name=\"utm_campaign\"]');if(input&&value){input.value=value;input.setAttribute(\"value\",value);input.dispatchEvent(new Event(\"input\",{bubbles:true}));input.dispatchEvent(new Event(\"change\",{bubbles:true}));}}catch{}});return el;};}// UTM SOURCE\nexport function withUTM_SourceFromUrl(Component){return props=>{const value=readParam(\"utm_source\")||\"\";const el=/*#__PURE__*/_jsx(Component,{...props,value:value,name:\"utm_source\",placeholder:props?.placeholder??\"utm_source\"});queueMicrotask(()=>{try{const root=document.querySelector(`[data-framer-component-id=\"${props?.id}\"]`);const input=(root?.querySelector('input[name=\"utm_source\"], textarea[name=\"utm_source\"]'))||document.querySelector('input[name=\"utm_source\"], textarea[name=\"utm_source\"]');if(input&&value){input.value=value;input.setAttribute(\"value\",value);input.dispatchEvent(new Event(\"input\",{bubbles:true}));input.dispatchEvent(new Event(\"change\",{bubbles:true}));}}catch{}});return el;};}// UTM MEDIUM\nexport function withUTM_MediumFromUrl(Component){return props=>{const value=readParam(\"utm_medium\")||\"\";const el=/*#__PURE__*/_jsx(Component,{...props,value:value,name:\"utm_medium\",placeholder:props?.placeholder??\"utm_medium\"});queueMicrotask(()=>{try{const root=document.querySelector(`[data-framer-component-id=\"${props?.id}\"]`);const input=(root?.querySelector('input[name=\"utm_medium\"], textarea[name=\"utm_medium\"]'))||document.querySelector('input[name=\"utm_medium\"], textarea[name=\"utm_medium\"]');if(input&&value){input.value=value;input.setAttribute(\"value\",value);input.dispatchEvent(new Event(\"input\",{bubbles:true}));input.dispatchEvent(new Event(\"change\",{bubbles:true}));}}catch{}});return el;};}// UTM TERM\nexport function withUTM_TermFromUrl(Component){return props=>{const value=readParam(\"utm_term\")||\"\";const el=/*#__PURE__*/_jsx(Component,{...props,value:value,name:\"utm_term\",placeholder:props?.placeholder??\"utm_term\"});queueMicrotask(()=>{try{const root=document.querySelector(`[data-framer-component-id=\"${props?.id}\"]`);const input=(root?.querySelector('input[name=\"utm_term\"], textarea[name=\"utm_term\"]'))||document.querySelector('input[name=\"utm_term\"], textarea[name=\"utm_term\"]');if(input&&value){input.value=value;input.setAttribute(\"value\",value);input.dispatchEvent(new Event(\"input\",{bubbles:true}));input.dispatchEvent(new Event(\"change\",{bubbles:true}));}}catch{}});return el;};}// UTM CONTENT\nexport function withUTM_ContentFromUrl(Component){return props=>{const value=readParam(\"utm_content\")||\"\";const el=/*#__PURE__*/_jsx(Component,{...props,value:value,name:\"utm_content\",placeholder:props?.placeholder??\"utm_content\"});queueMicrotask(()=>{try{const root=document.querySelector(`[data-framer-component-id=\"${props?.id}\"]`);const input=(root?.querySelector('input[name=\"utm_content\"], textarea[name=\"utm_content\"]'))||document.querySelector('input[name=\"utm_content\"], textarea[name=\"utm_content\"]');if(input&&value){input.value=value;input.setAttribute(\"value\",value);input.dispatchEvent(new Event(\"input\",{bubbles:true}));input.dispatchEvent(new Event(\"change\",{bubbles:true}));}}catch{}});return el;};}\nexport const __FramerMetadata__ = {\"exports\":{\"withUTM_MediumFromUrl\":{\"type\":\"reactHoc\",\"name\":\"withUTM_MediumFromUrl\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUTM_ContentFromUrl\":{\"type\":\"reactHoc\",\"name\":\"withUTM_ContentFromUrl\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withCioIdFromUrl\":{\"type\":\"reactHoc\",\"name\":\"withCioIdFromUrl\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUTM_SourceFromUrl\":{\"type\":\"reactHoc\",\"name\":\"withUTM_SourceFromUrl\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUTM_TermFromUrl\":{\"type\":\"reactHoc\",\"name\":\"withUTM_TermFromUrl\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withUTM_CampaignFromUrl\":{\"type\":\"reactHoc\",\"name\":\"withUTM_CampaignFromUrl\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InputOverride.map"],"mappings":"kHAC2C,SAAS,EAAU,EAAK,CAAiG,OAAtF,IAAS,OAAkB,GAAW,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