{"version":3,"file":"MiddleLayout.BBAGPgbP.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/ZkGWTcmJ29Wlqvey9d3L/mIZFue3Xm60aHcuXXnR4/MiddleLayout.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers/\n/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function Test(props){// This is a React component containing an Example component\n// - Replace <Example /> with your own code\n// - Find inspiration: https://www.framer.com/developers/\nconst[data,setData]=useState([]);const[prizeNumber,setPrizeNumber]=useState(\"\");const[visible,setVisible]=useState(false);useEffect(()=>{const url=decodeURIComponent(window.location.href);const urlObj=new URL(url);const params=urlObj.searchParams;const prizeNumber=params.get(\"prizeNumber\");if(prizeNumber)setPrizeNumber(prizeNumber);},[]);const toastStyle={position:\"fixed\",width:\"328px\",bottom:visible?\"16px\":\"-100px\",left:\"50%\",transform:\"translateX(-50%)\",backgroundColor:\"rgba(34, 34, 34, 0.9)\",borderRadius:\"12px\",color:\"white\",padding:\"16px\",opacity:visible?\"1\":\"0\",transition:\"all 0.5s ease\",zIndex:9999};function copyToClipboard(text){// 네비게이터 클립보드 API가 있는지 확인\nif(navigator.clipboard){// 비동기적으로 클립보드에 텍스트 복사 시도\nnavigator.clipboard.writeText(text).then(()=>{setVisible(true);setTimeout(()=>setVisible(false),3e3);}).catch(err=>{alert(\"쿠폰 코드 복사에 실패했어요. 잠시 후 다시 시도해보세요.\");});}else{// 클립보드 API가 없는 경우, textarea를 사용하는 fallback 방식\nlet textArea=document.createElement(\"textarea\");textArea.value=text;// 스타일을 조정하여 뷰포트 내에서 보이지 않도록 설정\ntextArea.style.position=\"fixed\";textArea.style.top=\"0\";textArea.style.left=\"0\";textArea.style.width=\"2em\";textArea.style.height=\"2em\";textArea.style.padding=\"0\";textArea.style.border=\"none\";textArea.style.outline=\"none\";textArea.style.boxShadow=\"none\";textArea.style.background=\"transparent\";document.body.appendChild(textArea);textArea.focus();textArea.select();try{document.execCommand(\"copy\");setVisible(true);setTimeout(()=>setVisible(false),2e3);}catch(err){alert(\"쿠폰 코드 복사에 실패했어요. 잠시 후 다시 시도해보세요.\");}document.body.removeChild(textArea);}}const codes=prizeNumber.split(/[,\\s]+/).map(c=>c.trim()).filter(Boolean);return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexDirection:\"column\",alignItems:\"center\",gap:\"16px\"},children:codes.map((code,i)=>/*#__PURE__*/_jsx(\"div\",{onClick:()=>copyToClipboard(code),children:/*#__PURE__*/_jsxs(\"div\",{style:{fontFamily:\"Roboto Mono\",display:\"flex\",position:\"relative\",flexDirection:\"column\",alignItems:\"center\",width:\"328px\",boxShadow:\"0 1px 20px 0 rgba(255, 85, 0, 0.3)\",height:\"150px\",background:\"white\",gap:\"16px\",padding:\"16px\",borderRadius:\"12px\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{marginTop:\"34px\",color:\"black\",fontSize:\"30px\",fontWeight:500,wordBreak:\"break-all\"},children:code}),/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:\"Pretendard Regular\",position:\"absolute\",bottom:\"18px\",color:\"#FF5500\",whiteSpace:\"pre-line\",fontSize:\"14px\",fontWeight:500},children:\"코드 복사하기\"})]})},i))}),/*#__PURE__*/_jsxs(\"div\",{style:toastStyle,children:[/*#__PURE__*/_jsx(\"div\",{style:{fontSize:\"15px\",fontWeight:\"bold\",marginBottom:\"4px\",color:\"white\"},children:\"코드 복사 완료\"}),/*#__PURE__*/_jsx(\"div\",{style:{fontSize:\"15px\",fontWeight:\"regular\",color:\"white\",lineHeight:\"140%\"},children:\"콴다 유저 전용 쿠폰이며, 해당 쿠폰은 오프라인 매장에서 사용이 가능합니다. 쿠폰 번호를 캡쳐해주세요.\"})]})]});}// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\n\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Test\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./MiddleLayout.map"],"mappings":"4JAQG,SAAwB,EAAK,EAAM,CAGtC,GAAK,CAAC,EAAK,GAASA,EAAS,CAAC,CAAC,EAAO,CAAC,EAAY,GAAgBA,EAAS,EAAE,EAAO,CAAC,EAAQ,GAAYA,EAAS,EAAK,EAAE,MAAc,CAAC,IAAM,EAAI,mBAAmB,EAAO,SAAS,IAAI,EAAmE,EAA1B,IAAtB,IAAI,CAAuB,CAAC,CAAC,aAAsC,IAAI,aAAa,EAAK,GAAY,EAAe,CAAW,CAAE,EAAE,CAAC,CAAC,EAAE,IAAM,EAAW,CAAC,SAAS,QAAQ,MAAM,QAAQ,OAAO,EAAQ,OAAO,SAAS,KAAK,MAAM,UAAU,mBAAmB,gBAAgB,wBAAwB,aAAa,OAAO,MAAM,QAAQ,QAAQ,OAAO,QAAQ,EAAQ,IAAI,IAAI,WAAW,gBAAgB,OAAO,IAAI,EAAE,SAAS,EAAgB,EAAK,CACnoB,GAAG,EAAU,UACb,EAAU,UAAU,UAAU,CAAI,CAAC,CAAC,SAAS,CAAC,EAAW,EAAI,EAAE,eAAe,EAAW,EAAK,EAAE,GAAG,CAAE,CAAC,CAAC,CAAC,MAAM,GAAK,CAAC,MAAM,kCAAkC,CAAE,CAAC,MAAO,CACtK,IAAI,EAAS,SAAS,cAAc,UAAU,EAAE,EAAS,MAAM,EAC/D,EAAS,MAAM,SAAS,QAAQ,EAAS,MAAM,IAAI,IAAI,EAAS,MAAM,KAAK,IAAI,EAAS,MAAM,MAAM,MAAM,E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