{"version":3,"file":"InjectorSub.ObRCRsX9.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/rFaR3YhTcAT7VRczsv1Q/ez5bYyIsRU9LQqG0pm8E/InjectorSub.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,useIsInCurrentNavigationTarget}from\"framer\";import{motion}from\"framer-motion\";const injectCode=()=>{const settings=JSON.parse(localStorage.getItem(\"advancedCodeInjectorSettings\")||\"{}\");if(settings.injectCode&&settings.codeSnippets){settings.codeSnippets.forEach(snippet=>{const element=snippet.type===\"js\"?document.createElement(\"script\"):document.createElement(\"style\");element.textContent=snippet.code;let targetElement;switch(snippet.injectionPoint){case\"startOfHead\":targetElement=document.head;targetElement.insertBefore(element,targetElement.firstChild);break;case\"endOfHead\":targetElement=document.head;targetElement.appendChild(element);break;case\"startOfBody\":targetElement=document.body;targetElement.insertBefore(element,targetElement.firstChild);break;case\"endOfBody\":case\"footer\":targetElement=document.querySelector(\"footer\")||document.body;targetElement.appendChild(element);break;}});}};export function GlobalInjectorStatus(props){const{text,width,height,showCode}=props;const[status,setStatus]=React.useState({injectCode:false,codeSnippets:[]});const isInCurrentNavigationTarget=useIsInCurrentNavigationTarget();const[isInjecting,setIsInjecting]=React.useState(false);const[injectionComplete,setInjectionComplete]=React.useState(false);React.useEffect(()=>{if(isInCurrentNavigationTarget){const updateStatus=()=>{const savedSettings=localStorage.getItem(\"advancedCodeInjectorSettings\");if(savedSettings){const settings=JSON.parse(savedSettings);setStatus(settings);setIsInjecting(true);injectCode();setIsInjecting(false);setInjectionComplete(true);}};updateStatus();}},[isInCurrentNavigationTarget]);return /*#__PURE__*/_jsxs(motion.div,{style:{width,height,padding:16,border:\"1px solid #ccc\",borderRadius:8,backgroundColor:\"#f5f5f5\",overflow:\"auto\"},initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.3},children:[/*#__PURE__*/_jsx(\"h3\",{style:{margin:\"0 0 10px 0\"},children:text}),/*#__PURE__*/_jsx(StatusIndicator,{active:status.injectCode,isInjecting:isInjecting}),/*#__PURE__*/_jsx(InjectionDetails,{status:status}),showCode&&/*#__PURE__*/_jsx(CodeDisplay,{codeSnippets:status.codeSnippets}),isInjecting&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:12,color:\"#888\"},children:\"Injecting code...\"}),injectionComplete&&/*#__PURE__*/_jsx(\"p\",{style:{fontSize:12,color:\"#4CAF50\"},children:\"Code injection complete\"})]});}const StatusIndicator=({active,isInjecting})=>/*#__PURE__*/_jsxs(\"div\",{style:{display:\"flex\",alignItems:\"center\",marginBottom:10},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:10,height:10,borderRadius:\"50%\",backgroundColor:active?isInjecting?\"#FFA500\":\"#4CAF50\":\"#F44336\",marginRight:5}}),/*#__PURE__*/_jsx(\"span\",{style:{fontSize:12,color:active?isInjecting?\"#FFA500\":\"#4CAF50\":\"#F44336\"},children:active?isInjecting?\"Injecting...\":\"Active\":\"Inactive\"})]});const InjectionDetails=({status})=>/*#__PURE__*/_jsx(\"div\",{style:{fontSize:12,marginBottom:10},children:/*#__PURE__*/_jsxs(\"p\",{children:[\"Number of Code Snippets: \",status.codeSnippets.length]})});const CodeDisplay=({codeSnippets})=>/*#__PURE__*/_jsxs(\"div\",{style:{fontSize:12,marginTop:8},children:[/*#__PURE__*/_jsx(\"p\",{style:{marginBottom:4},children:\"Stored Code Snippets:\"}),codeSnippets.map((snippet,index)=>/*#__PURE__*/_jsxs(\"div\",{style:{marginBottom:10},children:[/*#__PURE__*/_jsxs(\"p\",{children:[\"Type: \",snippet.type.toUpperCase()]}),/*#__PURE__*/_jsxs(\"p\",{children:[\"Injection Point: \",snippet.injectionPoint]}),/*#__PURE__*/_jsx(\"pre\",{style:{background:\"#f0f0f0\",padding:8,borderRadius:4,overflowX:\"auto\",whiteSpace:\"pre-wrap\",wordWrap:\"break-word\",maxHeight:100},children:snippet.code||\"No code stored\"})]},index))]});GlobalInjectorStatus.defaultProps={text:\"Global Injector Status\",width:250,height:200,showCode:false};addPropertyControls(GlobalInjectorStatus,{text:{type:ControlType.String,title:\"Title\"},showCode:{type:ControlType.Boolean,title:\"Show Stored Code\",enabledTitle:\"Yes\",disabledTitle:\"No\"},width:{type:ControlType.Number,title:\"Width\",min:200,max:500,step:10},height:{type:ControlType.Number,title:\"Height\",min:150,max:500,step:10}});GlobalInjectorStatus.displayName=\"Global Injector Status\";\nexport const __FramerMetadata__ = {\"exports\":{\"GlobalInjectorStatus\":{\"type\":\"reactComponent\",\"name\":\"GlobalInjectorStatus\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./InjectorSub.map"],"mappings":"4OAAogC,SAAgB,EAAqB,EAAM,CAAC,GAAK,CAAC,OAAK,QAAM,SAAO,YAAU,EAAW,CAAC,EAAO,GAAWA,EAAe,CAAC,WAAW,GAAM,aAAa,EAAE,CAAC,CAAC,CAAO,EAA4B,GAAgC,CAAM,CAAC,EAAY,GAAgBA,EAAe,GAAM,CAAM,CAAC,EAAkB,GAAsBA,EAAe,GAAM,CAA6W,OAA5W,MAAoB,CAAI,QAAoD,CAAC,IAAM,EAAc,aAAa,QAAQ,+BAA+B,CAAI,IAAwD,EAA1B,KAAK,MAAM,EAAc,CAAoB,CAAC,EAAe,GAAK,CAAC,GAAY,CAAC,EAAe,GAAM,CAAC,EAAqB,GAAK,KAAkB,EAAI,CAAC,EAA4B,CAAC,CAAqB,EAAM,EAAO,IAAI,CAAC,MAAM,CAAC,QAAM,SAAO,QAAQ,GAAG,OAAO,iBAAiB,aAAa,EAAE,gBAAgB,UAAU,SAAS,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,WAAW,CAAC,SAAS,GAAG,CAAC,SAAS,CAAc,EAAK,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