{"version":3,"file":"File_uploader.B28LXIsN.mjs","names":["React.useState","React.useRef","e","_Fragment"],"sources":["https:/framerusercontent.com/modules/CwZd65GB6IWwAqTvFA9u/Qp2uEjlkGS46tTlliHFB/uCZhPpLDx.js","https:/framerusercontent.com/modules/N3ew52dJNw1GEZG9nKkp/L7Ry1GhSj5r5FJCtCehs/Orphan_word_handling.js","https:/framerusercontent.com/modules/24LpMrPGE7myxZ5tjS0n/GvDOogIZ5aA2WllhJMcy/File_uploader.js"],"sourcesContent":["// Generated by Framer (bab6da3)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{cx,motion,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(motion.img,{...rest,layoutId:layoutId,ref:ref}):/*#__PURE__*/_jsx(\"img\",{...rest,ref:ref});});const getProps=({height,id,width,...props})=>{return{...props};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,...restProps}=getProps(props);return /*#__PURE__*/_jsx(SVG,{...restProps,alt:\"\",className:cx(\"framer-cEsqG\",className),layoutId:layoutId,ref:ref,src:'data:image/svg+xml,<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 100 100\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 20.755 100 C 9.292 100 0 90.708 0 79.245 L 0 20.755 C 0 9.292 9.292 0 20.755 0 L 79.245 0 C 90.708 0 100 9.292 100 20.755 L 100 79.245 C 100 90.708 90.708 100 79.245 100 Z\" fill=\"rgb(245, 238, 195)\" height=\"100px\" id=\"WzKZrrz9k\" width=\"100px\"/><path d=\"M 33.805 67.61 C 52.475 67.61 67.61 52.475 67.61 33.805 C 67.61 15.135 52.475 0 33.805 0 C 15.135 0 0 15.135 0 33.805 C 0 52.475 15.135 67.61 33.805 67.61 Z\" fill=\"transparent\" height=\"67.61000000000001px\" id=\"p8dEfSBcR\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.89\" stroke=\"rgb(140, 95, 62)\" transform=\"translate(16.195 16.196)\" width=\"67.61009433962263px\"/><path d=\"M 25.676 48.711 L 25.629 48.711 C 25.252 48.726 24.89 48.742 24.513 48.742 L 24.23 48.742 C 23.852 48.742 23.491 48.726 23.113 48.711 L 22.987 48.711 C 11.651 48.082 2.39 39.685 0.393 28.758 C 0.142 27.343 0 25.865 0 24.371 C 0 16.934 3.333 10.283 8.585 5.802 L 8.601 5.802 C 12.862 2.185 18.349 0 24.371 0 C 30.409 0 35.912 2.201 40.173 5.818 L 40.173 5.833\" fill=\"transparent\" height=\"48.742075471698136px\" id=\"qPpyV2hMo\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.89\" stroke=\"rgb(140, 95, 62)\" transform=\"translate(25.623 35.064)\" width=\"40.17292452830188px\"/><path d=\"M 45.473 0 C 52.203 11.651 48.209 26.557 36.558 33.286 C 33.505 35.056 30.103 36.137 26.588 36.455 C 23.074 36.773 19.533 36.319 16.212 35.126 C 10.752 33.203 6.161 29.388 3.272 24.371 C 0.364 19.357 -0.652 13.466 0.41 7.767 L 0.426 7.767\" fill=\"transparent\" height=\"36.553536870272175px\" id=\"hcoFTSVJ6\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.89\" stroke=\"rgb(140, 95, 62)\" transform=\"translate(33.797 33.096)\" width=\"48.742206814368075px\"/><path d=\"M 0 13.627 C 0.031 13.548 0.079 13.469 0.11 13.391 C 0.126 13.375 0.142 13.344 0.142 13.328 C 0.252 13.123 0.362 12.919 0.487 12.715 C 0.487 12.683 0.503 12.667 0.519 12.636 C 0.55 12.573 0.582 12.494 0.629 12.432 C 0.645 12.4 0.676 12.353 0.692 12.321 C 0.692 12.306 0.708 12.306 0.723 12.29 C 0.723 12.29 0.723 12.274 0.739 12.259 L 0.739 12.243 C 0.739 12.227 0.755 12.196 0.77 12.18 C 0.802 12.133 0.818 12.101 0.849 12.054 C 0.88 11.991 0.912 11.944 0.943 11.897 C 1.053 11.693 1.163 11.504 1.289 11.315 C 1.336 11.237 1.384 11.174 1.431 11.095 C 1.509 10.985 1.588 10.859 1.667 10.749 C 7.909 1.441 19.685 -2.285 30.047 1.41 C 31.415 1.897 32.767 2.51 34.072 3.265 C 40.503 6.976 44.607 13.186 45.849 19.963 L 45.849 19.979 C 46.871 25.466 46.006 31.331 42.987 36.551 C 40.105 41.567 35.519 45.383 30.063 47.306\" fill=\"transparent\" height=\"47.30576751278902px\" id=\"J5vnHJSCi\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.89\" stroke=\"rgb(140, 95, 62)\" transform=\"translate(19.947 20.917)\" width=\"46.25906187186398px\"/></svg>',style:{...style}});});const css=[\".framer-cEsqG { aspect-ratio: 1; display: block; width: 100px; }\"];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 100\n * @framerIntrinsicHeight 100\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Group 3\",\"set\":{\"localId\":\"vectorSet/udq4kR71T\",\"id\":\"udq4kR71T\",\"moduleId\":\"67HBGjo6jmUApKZyJB3H\"}}\n */const Icon=withCSS(Component,css,\"framer-cEsqG\");export default Icon;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"100\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerImmutableVariables\":\"true\",\"framerIntrinsicWidth\":\"100\",\"framerVector\":\"{\\\"name\\\":\\\"Group 3\\\",\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/udq4kR71T\\\",\\\"id\\\":\\\"udq4kR71T\\\",\\\"moduleId\\\":\\\"67HBGjo6jmUApKZyJB3H\\\"}}\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx}from\"react/jsx-runtime\";import React,{forwardRef}from\"react\";export function withNoOrphan(Component){// console.log(\"withNoOrphan HOC called\")\n// Helper function to extract text from nested React elements\nconst extractText=element=>{if(typeof element===\"string\"){return element;}if(typeof element===\"number\"){return String(element);}if(/*#__PURE__*/React.isValidElement(element)){if(element.props&&element.props.children){return extractText(element.props.children);}}if(Array.isArray(element)){return element.map(extractText).join(\"\");}return\"\";};// Helper function to apply orphan prevention to text\nconst processText=text=>{if(typeof text!==\"string\"||text.length===0){return text;}// Trim trailing spaces to find the actual last word\nconst trimmedText=text.trimEnd();if(trimmedText.length===0){return text;}const lastSpaceIndex=trimmedText.lastIndexOf(\" \");if(lastSpaceIndex!==-1){const beforeSpace=trimmedText.substring(0,lastSpaceIndex);const afterSpace=trimmedText.substring(lastSpaceIndex+1);const trailingSpaces=text.substring(trimmedText.length)// Preserve trailing spaces\n;return beforeSpace+\"\\xa0\"+afterSpace+trailingSpaces;}return text;};// Helper function to recursively process React elements\nconst processChildren=children=>{if(typeof children===\"string\"){return processText(children);}if(/*#__PURE__*/React.isValidElement(children)){return /*#__PURE__*/React.cloneElement(children,{...children.props,children:processChildren(children.props.children)});}if(Array.isArray(children)){return children.map(child=>processChildren(child));}return children;};return /*#__PURE__*/forwardRef((props,ref)=>{// console.log(\"Rendering with props:\", props)\n// console.log(\"Children type:\", typeof props.children)\n// console.log(\"Children:\", props.children)\nconst{children,...rest}=props;// Extract text for logging\nconst extractedText=extractText(children);console.log(\"Extracted text:\",extractedText);// Process children to prevent orphans\nconst processedChildren=processChildren(children);console.log(\"Processed children:\",processedChildren);return /*#__PURE__*/_jsx(Component,{ref:ref,...rest,children:processedChildren});});}export function withMargin20(Component){return /*#__PURE__*/forwardRef((props,ref)=>/*#__PURE__*/_jsx(Component,{ref:ref,...props,style:{...props.style||{},margin:\"0 0 -20px\"}}));}\nexport const __FramerMetadata__ = {\"exports\":{\"withNoOrphan\":{\"type\":\"reactHoc\",\"name\":\"withNoOrphan\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withMargin20\":{\"type\":\"reactHoc\",\"name\":\"withMargin20\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Orphan_word_handling.map","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";export function CustomFileUploader(Component){return function FileUploaderWrapper(props){const[fileName,setFileName]=React.useState(\"\");const fileInputRef=React.useRef(null);const handleFileChange=e=>{const file=e.target.files?.[0];if(file){setFileName(file.name);}};const handleClick=()=>{if(fileInputRef.current){fileInputRef.current.click();}};const handleDragOver=e=>{e.preventDefault();};const handleDrop=e=>{e.preventDefault();const file=e.dataTransfer.files?.[0];if(file){setFileName(file.name);}};return /*#__PURE__*/_jsx(_Fragment,{children:/*#__PURE__*/_jsxs(\"div\",{onClick:handleClick,onDragOver:handleDragOver,onDrop:handleDrop,style:{border:\"1px dashed #E6E6ED4D\",width:\"100%\",height:\"275px\",borderRadius:\"10px\",padding:\"40px\",textAlign:\"center\",cursor:\"pointer\",color:\"#fff\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsx(\"input\",{ref:fileInputRef,type:\"file\",accept:\"image/png, image/jpeg\",onChange:handleFileChange,style:{display:\"none\"}}),fileName?/*#__PURE__*/_jsxs(\"p\",{style:{margin:0,fontSize:\"16px\"},children:[\"📎 \",fileName]}):/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"52px\",height:\"52px\",border:\"1px solid #fff\",borderRadius:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",margin:\"0 auto 10px\"},children:/*#__PURE__*/_jsx(\"svg\",{width:\"20\",height:\"19\",viewBox:\"0 0 20 19\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M2.90856 18.6681C2.25856 18.6681 1.70231 18.4404 1.23983 17.9851C0.777346 17.5298 0.54571 16.9818 0.544922 16.3411V14.0142C0.544922 13.6845 0.658376 13.4084 0.885285 13.1858C1.11219 12.9632 1.39268 12.8515 1.72674 12.8507C2.0608 12.8499 2.34168 12.9616 2.56937 13.1858C2.79707 13.4099 2.91013 13.6861 2.90856 14.0142V16.3411H17.0904V14.0142C17.0904 13.6845 17.2038 13.4084 17.4307 13.1858C17.6576 12.9632 17.9381 12.8515 18.2722 12.8507C18.6062 12.8499 18.8871 12.9616 19.1148 13.1858C19.3425 13.4099 19.4556 13.6861 19.454 14.0142V16.3411C19.454 16.981 19.2228 17.529 18.7603 17.9851C18.2978 18.4412 17.7411 18.6689 17.0904 18.6681H2.90856ZM8.81764 4.53181L6.60174 6.71333C6.36537 6.94603 6.08489 7.05772 5.76028 7.04842C5.43568 7.03911 5.1548 6.91772 4.91764 6.68425C4.70098 6.45155 4.58752 6.18007 4.57728 5.86981C4.56704 5.55955 4.68049 5.28807 4.91764 5.05538L9.17219 0.866849C9.29037 0.750501 9.4184 0.668282 9.55628 0.620192C9.69416 0.572101 9.84188 0.547669 9.99946 0.546893C10.157 0.546117 10.3048 0.57055 10.4426 0.620192C10.5805 0.669834 10.7085 0.752053 10.8267 0.866849L15.0813 5.05538C15.3176 5.28807 15.4311 5.55955 15.4216 5.86981C15.4122 6.18007 15.2987 6.45155 15.0813 6.68425C14.8449 6.91694 14.5644 7.03833 14.2398 7.04842C13.9152 7.0585 13.6343 6.94681 13.3972 6.71333L11.1813 4.53181V12.8507C11.1813 13.1803 11.0678 13.4569 10.8409 13.6802C10.614 13.9036 10.3335 14.0149 9.99946 14.0142C9.6654 14.0134 9.38491 13.9017 9.15801 13.6791C8.9311 13.4565 8.81764 13.1803 8.81764 12.8507V4.53181Z\",fill:\"#DCAE26\"})})}),/*#__PURE__*/_jsxs(\"p\",{style:{margin:0,fontSize:\"16px\"},children:[/*#__PURE__*/_jsx(\"u\",{children:\"Click here\"}),\" to upload your image or drag and drop\"]}),/*#__PURE__*/_jsx(\"p\",{style:{fontSize:\"12px\",opacity:.8},children:\"Supported file types: JPG, PNG\"})]})]})});};}\nexport const __FramerMetadata__ = {\"exports\":{\"CustomFileUploader\":{\"type\":\"reactHoc\",\"name\":\"CustomFileUploader\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./File_uploader.map"],"mappings":"iRAC2C,IAAsC,IAA4B,CAAoC,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAO,IAAI,CAAC,GAAG,EAAc,WAAa,MAAI,CAAC,CAAc,EAAK,MAAM,CAAC,GAAG,EAAS,MAAI,CAAC,EAAG,CAAO,GAAU,CAAC,SAAO,KAAG,QAAM,GAAG,MAAgB,CAAC,GAAG,EAAM,EAQha,EAAK,EAR2b,EAAiB,SAAS,EAAM,EAAI,CAAC,GAAK,CAAC,QAAM,YAAU,WAAS,UAAQ,GAAG,GAAW,EAAS,EAAM,CAAC,OAAoB,EAAK,EAAI,CAAC,GAAG,EAAU,IAAI,GAAG,UAAU,EAAG,eAAe,EAAU,CAAU,WAAa,MAAI,IAAI,q0FAAq0F,MAAM,CAAC,GAAG,EAAM,CAAC,CAAC,EAAG,CAAW,CAAC,mEAAmE,CAQ/iH,eAAe,GAAgB,KCTa,SAAgB,EAAa,EAAU,CAEvH,IAAM,EAAY,GAAa,OAAO,GAAU,SAAiB,EAAY,OAAO,GAAU,SAAiB,OAAO,EAAQ,CAAkB,EAAM,eAAe,EAAQ,EAAK,EAAQ,OAAO,EAAQ,MAAM,SAAiB,EAAY,EAAQ,MAAM,SAAS,CAAM,MAAM,QAAQ,EAAQ,CAAS,EAAQ,IAAI,EAAY,CAAC,KAAK,GAAG,CAAQ,GAC3U,EAAY,GAAM,CAA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