{"version":3,"file":"ReceiptNotification.D9GPRY7_.mjs","names":["useRef","React.useState"],"sources":["https:/framerusercontent.com/modules/VpkXrHDg8V7zkqNIQBoY/GtbwxUyEM00ot0IvE5vR/Spiral.js","https:/framerusercontent.com/modules/UhImAVcibTYq5pnst4s7/1hSRAcMPl9w0M57tcXl3/ReceiptNotification.js"],"sourcesContent":["// Spiral dot animation component with configurable properties\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function Spiral(props){const{totalDots=600,dotRadius=2,duration=3,dotColor=\"#FFFFFF\",backgroundColor=\"#000000\",margin=2,minOpacity=.3,maxOpacity=1,minScale=.5,maxScale=1.5,useMultipleColors=false,colors=[{color:\"#FF0000\"},{color:\"#00FF00\"},{color:\"#0000FF\"}]}=props;const svgRef=useRef(null);const isStatic=useIsStaticRenderer();useEffect(()=>{if(!svgRef.current)return;const svg=svgRef.current;const SIZE=400;const GOLDEN_ANGLE=Math.PI*(3-Math.sqrt(5));const CENTER=SIZE/2;const MAX_RADIUS=CENTER-margin-dotRadius;// Clear existing content\nsvg.innerHTML=\"\";// Generate dots\nfor(let i=0;i<totalDots;i++){const idx=i+.5;const frac=idx/totalDots;const r=Math.sqrt(frac)*MAX_RADIUS;const theta=idx*GOLDEN_ANGLE;const x=CENTER+r*Math.cos(theta);const y=CENTER+r*Math.sin(theta);// Determine dot color\nlet currentColor=dotColor;if(useMultipleColors&&colors.length>0){const colorIndex=Math.floor(frac*colors.length);currentColor=colors[Math.min(colorIndex,colors.length-1)].color;}// Create circle\nconst circle=document.createElementNS(\"http://www.w3.org/2000/svg\",\"circle\");circle.setAttribute(\"cx\",x.toString());circle.setAttribute(\"cy\",y.toString());circle.setAttribute(\"r\",dotRadius.toString());circle.setAttribute(\"fill\",currentColor);circle.setAttribute(\"opacity\",isStatic?\"0.7\":\"0\");if(!isStatic){// Color animation for multiple colors\nif(useMultipleColors&&colors.length>1){const colorValues=colors.map(c=>c.color).join(\";\");const animColor=document.createElementNS(\"http://www.w3.org/2000/svg\",\"animate\");animColor.setAttribute(\"attributeName\",\"fill\");animColor.setAttribute(\"values\",colorValues);animColor.setAttribute(\"dur\",`${duration}s`);animColor.setAttribute(\"begin\",`${frac*duration}s`);animColor.setAttribute(\"repeatCount\",\"indefinite\");animColor.setAttribute(\"calcMode\",\"linear\");circle.appendChild(animColor);}// Radius animation\nconst animR=document.createElementNS(\"http://www.w3.org/2000/svg\",\"animate\");animR.setAttribute(\"attributeName\",\"r\");animR.setAttribute(\"values\",`${dotRadius*minScale};${dotRadius*maxScale};${dotRadius*minScale}`);animR.setAttribute(\"dur\",`${duration}s`);animR.setAttribute(\"begin\",`${frac*duration}s`);animR.setAttribute(\"repeatCount\",\"indefinite\");animR.setAttribute(\"calcMode\",\"spline\");animR.setAttribute(\"keySplines\",\"0.4 0 0.6 1;0.4 0 0.6 1\");circle.appendChild(animR);// Opacity animation\nconst animO=document.createElementNS(\"http://www.w3.org/2000/svg\",\"animate\");animO.setAttribute(\"attributeName\",\"opacity\");animO.setAttribute(\"values\",`${minOpacity};${maxOpacity};${minOpacity}`);animO.setAttribute(\"dur\",`${duration}s`);animO.setAttribute(\"begin\",`${frac*duration}s`);animO.setAttribute(\"repeatCount\",\"indefinite\");animO.setAttribute(\"calcMode\",\"spline\");animO.setAttribute(\"keySplines\",\"0.4 0 0.6 1;0.4 0 0.6 1\");circle.appendChild(animO);}svg.appendChild(circle);}},[totalDots,dotRadius,duration,dotColor,backgroundColor,margin,minOpacity,maxOpacity,minScale,maxScale,isStatic,useMultipleColors,colors]);return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",backgroundColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",overflow:\"hidden\",...props.style},children:/*#__PURE__*/_jsx(\"svg\",{ref:svgRef,width:\"400\",height:\"400\",viewBox:\"0 0 400 400\",style:{maxWidth:\"100%\",maxHeight:\"100%\",width:\"auto\",height:\"auto\"}})});}Spiral.displayName=\"Spiral\";addPropertyControls(Spiral,{totalDots:{type:ControlType.Number,title:\"Total Dots\",defaultValue:600,min:50,max:1e3,step:10},dotRadius:{type:ControlType.Number,title:\"Dot Radius\",defaultValue:2,min:.5,max:10,step:.1,unit:\"px\"},duration:{type:ControlType.Number,title:\"Animation Duration\",defaultValue:3,min:.5,max:10,step:.1,unit:\"s\"},useMultipleColors:{type:ControlType.Boolean,title:\"Multiple Colors\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Off\"},colors:{type:ControlType.Array,title:\"Colors\",control:{type:ControlType.Object,controls:{color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#FFFFFF\"}}},defaultValue:[{color:\"#FF0000\"},{color:\"#00FF00\"},{color:\"#0000FF\"}],maxCount:10,hidden:({useMultipleColors})=>!useMultipleColors},dotColor:{type:ControlType.Color,title:\"Dot Color\",defaultValue:\"#FFFFFF\",hidden:({useMultipleColors})=>useMultipleColors},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#000000\"},margin:{type:ControlType.Number,title:\"Margin\",defaultValue:2,min:0,max:20,step:1,unit:\"px\"},minOpacity:{type:ControlType.Number,title:\"Min Opacity\",defaultValue:.3,min:0,max:1,step:.1},maxOpacity:{type:ControlType.Number,title:\"Max Opacity\",defaultValue:1,min:0,max:1,step:.1},minScale:{type:ControlType.Number,title:\"Min Scale\",defaultValue:.5,min:.1,max:2,step:.1},maxScale:{type:ControlType.Number,title:\"Max Scale\",defaultValue:1.5,min:.1,max:3,step:.1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Spiral\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Spiral.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{Frame}from\"framer\";export function ReceiptNotification(){const[visible,setVisible]=React.useState(false);const[shouldRender,setShouldRender]=React.useState(false);const[message,setMessage]=React.useState(\"\");const brands=[\"Apple E-mail\",\"BestBuy E-mail\",\"Canada Goose E-mail\",\"Dior E-mail\",\"Dyson E-mail\",\"eBay E-mail\",\"FARFETCH E-mail\",\"FlightClub E-mail\",\"GOAT E-mail\",\"Grailed E-mail\",\"Gucci E-mail\",\"Harrods Paper (80mm)\",\"Louis Vuitton E-mail\",\"Louis Vuitton Paper (A5)\",\"Moncler (2025) E-mail\",\"Moncler (2020) E-mail\",\"Mr Porter E-mail\",\"Nike E-mail\",\"Saint Laurent E-mail\",\"Selfridges E-mail\",\"Selfridges Paper (80mm)\",\"StockX E-mail\",\"StockX Paper (A6)\",\"Trapstar E-mail\",\"Sephora Paper (80mm)\"];const getArticle=word=>{const vowels=[\"a\",\"e\",\"i\",\"o\",\"u\"];return vowels.includes(word[0].toLowerCase())?\"An\":\"A\";};const generateMessage=()=>{const brand=brands[Math.floor(Math.random()*brands.length)];const secondsAgo=Math.floor(Math.random()*13)+1;const timeText=secondsAgo===1?\"1 second ago\":`${secondsAgo} seconds ago`;const article=getArticle(brand);return`${article} ${brand} Receipt was generated ${timeText}.`;};React.useEffect(()=>{const show=()=>{setMessage(generateMessage());setShouldRender(true);setVisible(true);setTimeout(()=>{setVisible(false);setTimeout(()=>setShouldRender(false),500);scheduleNext();},6e3);};const scheduleNext=()=>{const minDelay=7e3// minimum 7 seconds\n;const maxDelay=9e4// maximum 90 seconds\n;const delay=minDelay+Math.random()*(maxDelay-minDelay);setTimeout(show,delay);};scheduleNext();},[]);if(!shouldRender)return null;return /*#__PURE__*/_jsxs(Frame,{initial:{opacity:0,y:20},animate:{opacity:visible?1:0,y:visible?0:20},transition:{duration:.5,ease:\"easeInOut\"},style:{position:\"fixed\",bottom:\"24px\",left:\"24px\",zIndex:999999,pointerEvents:\"none\",background:\"none\",border:\"none\",width:\"auto\",height:\"auto\",display:\"block\"},children:[/*#__PURE__*/_jsxs(\"div\",{className:\"notification-container\",children:[/*#__PURE__*/_jsx(\"div\",{style:{marginBottom:\"10px\"},children:message}),/*#__PURE__*/_jsx(\"div\",{style:{height:\"5px\",width:\"100%\",backgroundColor:\"rgba(255, 255, 255, 0.2)\",borderRadius:\"3px\",overflow:\"hidden\"},children:/*#__PURE__*/_jsx(\"div\",{className:\"progress-bar\"})})]}),/*#__PURE__*/_jsx(\"style\",{children:`\n          @import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600&display=swap');\n\n          .notification-container {\n            margin: 0px;\n            backdrop-filter: blur(16px);\n            -webkit-backdrop-filter: blur(16px);\n            background-color: rgba(14, 14, 16, 0.6);\n            border: 1px solid rgba(29, 29, 32, 0.6);\n            color: #ffffff;\n            padding: 18px 24px;\n            border-radius: 16px;\n            font-size: 17px;\n            font-family: 'Instrument Sans', sans-serif;\n            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);\n            max-width: 340px;\n            transition: transform 0.2s ease-in-out;\n            pointer-events: auto;\n          }\n\n          .notification-container:hover {\n            transform: scale(1.006); /* ~1px bump */\n          }\n\n          @keyframes progressBar {\n            from { width: 100%; }\n            to { width: 0%; }\n          }\n\n          .progress-bar {\n            height: 100%;\n            width: 100%;\n            background-color: #ffffff;\n            animation: progressBar 5s linear forwards;\n          }\n        `})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"ReceiptNotification\":{\"type\":\"reactComponent\",\"name\":\"ReceiptNotification\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ReceiptNotification.map"],"mappings":"6TAIG,SAAwB,EAAO,EAAM,CAAC,GAAK,CAAC,YAAU,IAAI,YAAU,EAAE,WAAS,EAAE,WAAS,UAAU,kBAAgB,UAAU,SAAO,EAAE,a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