{"version":3,"file":"H1_Hero.Bd-RjUSP.mjs","names":["_Fragment","React.Fragment"],"sources":["https:/framerusercontent.com/modules/96vb3wMAuDYXeEDxZwfG/Z9yOw0DBDuYQ2p1mvwDD/H1_Hero.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion,useReducedMotion}from\"framer-motion\";const VERTICAL_ALIGN={top:\"text-top\",center:\"middle\",bottom:\"text-bottom\"};/**\n * Splits `text` into whitespace-separated tokens (keeping the whitespace\n * tokens themselves) and inserts `node` immediately after the Nth word\n * (1-based `wordIndex`). `wordIndex <= 0` — or larger than the number of\n * words available — resolves to the last word, which reproduces the\n * original \"TM always trails the text\" behavior by default.\n */function renderTextWithInsertedNode(text,node,wordIndex){if(!node)return text;const tokens=text.split(/(\\s+)/);const wordTokenIndices=[];tokens.forEach((token,i)=>{if(token.trim().length>0)wordTokenIndices.push(i);});if(wordTokenIndices.length===0){return /*#__PURE__*/_jsxs(_Fragment,{children:[text,node]});}const targetWordNumber=wordIndex<=0?wordTokenIndices.length:Math.min(wordIndex,wordTokenIndices.length);const targetTokenIndex=wordTokenIndices[targetWordNumber-1];return /*#__PURE__*/_jsx(_Fragment,{children:tokens.map((token,i)=>/*#__PURE__*/_jsxs(React.Fragment,{children:[token,i===targetTokenIndex&&node]},i))});}/**\n * Heading block (tag configurable: H1–H6, paragraph, div or span) with an\n * inline \"TM\"-style mark whose size, vertical alignment (top/center/bottom,\n * relative to the heading's line) and position within the text (after any\n * word, not only the last) are configurable. Fades in (with an optional\n * rise) the first time it scrolls into view. Always rendered fully visible\n * on the Framer canvas — the fade-in only plays in Preview and on the\n * published/live site.\n */export default function DivconH1(props){const{text,headingTag,font,textColor,textAlign,showTrademark,trademarkText,trademarkFont,trademarkPosition,trademarkGap,trademarkWordIndex,fadeInView,fadeDistance,fadeDuration,fadeDelay,fadeOnce,viewportAmount}=props;const shouldReduceMotion=useReducedMotion();const isCanvas=RenderTarget.current()===RenderTarget.canvas;const animateOnView=fadeInView&&!shouldReduceMotion&&!isCanvas;const HeadingTag=headingTag||\"h1\";const trademarkNode=showTrademark?/*#__PURE__*/_jsx(\"span\",{style:{display:\"inline\",verticalAlign:VERTICAL_ALIGN[trademarkPosition],marginLeft:trademarkGap,...trademarkFont},children:trademarkText}):null;return /*#__PURE__*/_jsx(motion.div,{style:{width:\"100%\",height:\"100%\"},initial:animateOnView?{opacity:0,y:fadeDistance}:undefined,whileInView:animateOnView?{opacity:1,y:0}:undefined,viewport:{once:fadeOnce,amount:viewportAmount},transition:{duration:fadeDuration,delay:fadeDelay,ease:\"easeOut\"},children:/*#__PURE__*/_jsx(HeadingTag,{style:{margin:0,color:textColor,textAlign,...font},children:renderTextWithInsertedNode(text,trademarkNode,trademarkWordIndex)})});}DivconH1.displayName=\"Divcon Heading\";addPropertyControls(DivconH1,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Built for mission critical\",displayTextArea:true},headingTag:{type:ControlType.Enum,title:\"Tag\",options:[\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"p\",\"div\",\"span\"],optionTitles:[\"H1\",\"H2\",\"H3\",\"H4\",\"H5\",\"H6\",\"Paragraph\",\"Div\",\"Span\"],defaultValue:\"h1\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultValue:{fontFamily:\"Arimo\",fontWeight:400,fontSize:124,lineHeight:\"1em\",letterSpacing:\"-3.72px\"}},textColor:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FFFFFF\"},textAlign:{type:ControlType.Enum,title:\"Align\",options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"left\"},showTrademark:{type:ControlType.Boolean,title:\"Trademark\",defaultValue:true},trademarkText:{type:ControlType.String,title:\"TM Text\",defaultValue:\"TM\",hidden:props=>!props.showTrademark},trademarkFont:{type:ControlType.Font,title:\"TM Font\",controls:\"extended\",defaultValue:{fontFamily:\"Arimo\",fontWeight:400,fontSize:52,lineHeight:\"1.2em\",letterSpacing:\"-1.04px\"},hidden:props=>!props.showTrademark},trademarkPosition:{type:ControlType.Enum,title:\"TM Position\",options:[\"top\",\"center\",\"bottom\"],optionTitles:[\"Top\",\"Center\",\"Bottom\"],defaultValue:\"top\",hidden:props=>!props.showTrademark},trademarkGap:{type:ControlType.Number,title:\"TM Gap\",min:0,max:60,step:1,defaultValue:12,hidden:props=>!props.showTrademark},trademarkWordIndex:{type:ControlType.Number,title:\"TM After Word\",min:0,max:50,step:1,displayStepper:true,defaultValue:0,description:\"Which word the TM sits right after (1 = first word). 0 keeps it after the last word.\",hidden:props=>!props.showTrademark},fadeInView:{type:ControlType.Boolean,title:\"Fade In View\",defaultValue:true},fadeDistance:{type:ControlType.Number,title:\"Fade Distance\",min:0,max:200,step:1,defaultValue:24,hidden:props=>!props.fadeInView},fadeDuration:{type:ControlType.Number,title:\"Fade Duration\",min:.1,max:3,step:.05,defaultValue:.6,hidden:props=>!props.fadeInView},fadeDelay:{type:ControlType.Number,title:\"Fade Delay\",min:0,max:2,step:.05,defaultValue:0,hidden:props=>!props.fadeInView},fadeOnce:{type:ControlType.Boolean,title:\"Animate Once\",defaultValue:true,hidden:props=>!props.fadeInView},viewportAmount:{type:ControlType.Number,title:\"Trigger Threshold\",min:0,max:1,step:.05,defaultValue:.3,hidden:props=>!props.fadeInView}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DivconH1\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./H1_Hero.map"],"mappings":"uPAMG,SAAS,EAA2B,EAAK,EAAK,EAAU,CAAC,GAAG,CAAC,EAAK,OAAO,EAAK,IAAM,EAAO,EAAK,MAAM,OAAO,EAAQ,EAAiB,CAAC,EAAkF,GAAhF,EAAO,SAAS,E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