(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{21033:function(e,t,n){Promise.resolve().then(n.bind(n,14888)),Promise.resolve().then(n.bind(n,98087)),Promise.resolve().then(n.bind(n,47239)),Promise.resolve().then(n.t.bind(n,88003,23)),Promise.resolve().then(n.bind(n,7261)),Promise.resolve().then(n.bind(n,42738)),Promise.resolve().then(n.t.bind(n,2778,23)),Promise.resolve().then(n.t.bind(n,2648,23)),Promise.resolve().then(n.bind(n,3797)),Promise.resolve().then(n.bind(n,37431))},63515:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cancelIdleCallback:function(){return i},requestIdleCallback:function(){return n}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},i="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},42738:function(e,t,n){"use strict";n.d(t,{default:function(){return tE}});var i=n(57437),o=n(86484),r=n(2265),a=n(43618),c=n(29918),l=n(89723),s=n(73196),d=()=>{var e;let t=(0,a.sJ)(l.Z),n=!!(null!==(e=null==t?void 0:t.isLogin)&&void 0!==e?e:null==t?void 0:t.islogin),i=(0,a.Zl)(s.Z);return(0,r.useEffect)(()=>{if(!n){i({});return}let e=!1;return(async()=>{try{let t=localStorage.getItem("TOKEN");if(!t)return;let n=await c.et.get("/boards",{headers:{Authorization:"Bearer ".concat(t)}});if(e)return;let o=Array.isArray(n.data)?n.data:[],r={};o.forEach(e=>{(Array.isArray(null==e?void 0:e.products)?e.products:[]).forEach(e=>{(null==e?void 0:e.id)!=null&&e.id>0&&(r[Number(e.id)]=!0)})}),i(e=>({...r,...e}))}catch(e){}})(),()=>{e=!0}},[n,i]),null},u=n(99376),p=n(32806),f=n(17140),h=n(2132);let g=e=>!0;function m(){return window.sketchup||null}var x=()=>{let e=(0,a.sJ)(l.Z),t=(0,a.Zl)(p.Z),n=(0,a.Zl)(f.Z),i=(0,a.Zl)(h.Z),o=(0,r.useRef)(!1),s=(0,r.useRef)(!1),d=(0,u.usePathname)(),x=(0,u.useRouter)(),w=(0,r.useRef)("/home"),b=(0,r.useRef)(null);null===b.current&&(b.current=window.location.pathname+window.location.search);let[v,y]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(m()){y(!0);return}let e=0,t=window.setInterval(()=>{if(m()){y(!0),window.clearInterval(t);return}++e>80&&window.clearInterval(t)},100);return()=>window.clearInterval(t)},[]),(0,r.useLayoutEffect)(()=>{try{Object.defineProperty(window,"__mcdIsAllowedPath",{configurable:!0,get:()=>()=>!0,set:()=>{}})}catch(e){}try{Object.defineProperty(window,"__mcdOpenExternal",{configurable:!0,get:()=>e=>{try{let t=String(e||"");if(!t||0===t.indexOf("#"))return;window.location.href=0===t.indexOf("/")?window.location.origin+t:t}catch(e){}},set:()=>{}})}catch(e){}},[]),(0,r.useEffect)(()=>(window.__mcdNavigate=e=>{try{let t=String(e||""),n=t;if(/^https?:\/\//i.test(t)){let e=new URL(t);n=e.pathname+e.search}x.push(n)}catch(t){try{window.location.href=e}catch(e){}}},()=>{try{delete window.__mcdNavigate}catch(e){}}),[x]),(0,r.useEffect)(()=>{var e,o,r;let a=m();if(!a||s.current)return;s.current=!0;try{document.documentElement.classList.add("su-plugin")}catch(e){}try{let e=document.querySelector('meta[name="viewport"]');e&&!/width=1500/.test(e.getAttribute("content")||"")&&e.setAttribute("content","width=1500, initial-scale=1")}catch(e){}try{sessionStorage.setItem("__mcd_su","1")}catch(e){}let l=e=>{if(!e)return;let t="";try{t=localStorage.getItem("TOKEN")||""}catch(e){}if(t===e)return;let n="";try{n=sessionStorage.getItem("su:restoreAttempt")||""}catch(e){}if(n===e)return;try{sessionStorage.setItem("su:restoreAttempt",e)}catch(e){}try{localStorage.setItem("TOKEN",e)}catch(e){}c.et.defaults.headers.common.Authorization="Bearer ".concat(e);let i=b.current||window.location.pathname+window.location.search;window.location.replace(window.location.origin+(i&&"/"!==i?i:"/home"))};window.restoreAuth=(e,t)=>l(e),window.restoreToken=e=>l(e);try{null===(e=a.getAuth)||void 0===e||e.call(a)}catch(e){}try{null===(o=a.pageReady)||void 0===o||o.call(a)}catch(e){}window.__mcdCurrentProject=(e,o,r)=>{t((null!=e?e:"").toString()),n((null!=o?o:"").toString()),i((null!=r?r:"").toString())};try{null===(r=a.getCurrentProject)||void 0===r||r.call(a)}catch(e){}let d=new Set;window.__mcdFetchMeta=async e=>{let t=Number(e);if(!(!Number.isFinite(t)||0===t||d.has(t))){d.add(t);try{var n,i,o;let e=await c.Wg.post("/product/meta-map",{ids:[t]}),r=null!==(o=null==e?void 0:e.data)&&void 0!==o?o:{};if(!r||!Object.keys(r).length)return;null===(i=window.sketchup)||void 0===i||null===(n=i.setProductMeta)||void 0===n||n.call(i,JSON.stringify(r))}catch(e){d.delete(t)}}}},[v]),(0,r.useLayoutEffect)(()=>{var e,t,n,i,o;let r=m();if(!r||!d)return;if(g(d)){w.current=d;try{null===(e=(t=window).__mcdHideShield)||void 0===e||e.call(t)}catch(e){}return}try{null===(n=(i=window).__mcdShowShield)||void 0===n||n.call(i)}catch(e){}try{let e=window.location.origin+d,t=window;"function"==typeof t.__mcdOpenExternal?t.__mcdOpenExternal(e):null===(o=r.openExternal)||void 0===o||o.call(r,e)}catch(e){}try{x.replace(w.current||"/home")}catch(e){}let a=window.setTimeout(()=>{try{var e,t;null===(e=(t=window).__mcdHideShield)||void 0===e||e.call(t)}catch(e){}},120);return()=>window.clearTimeout(a)},[d,x]),(0,r.useEffect)(()=>{let t=m();if(t){if(e.isLogin){let e=localStorage.getItem("TOKEN");e&&c.Wg.get("/user/me",{headers:{Authorization:"Bearer ".concat(e)}}).then(n=>{let{data:i}=n;try{var o;null===(o=t.saveAuth)||void 0===o||o.call(t,e,(null==i?void 0:i.name)||"")}catch(e){}}).catch(()=>{try{var n;null===(n=t.saveAuth)||void 0===n||n.call(t,e,"")}catch(e){}})}else if(o.current)try{var n;null===(n=t.clearAuth)||void 0===n||n.call(t)}catch(e){}o.current=e.isLogin}},[e.isLogin,v]),null},w=n(54887),b=n(88862);let v=(0,a.cn)({key:"projectNameModalAtom",default:{isOpen:!1,callbacks:null}});var y=()=>{let{isOpen:e,callbacks:t}=(0,a.sJ)(v),[n,o]=(0,r.useState)(""),c=(0,r.useRef)(null),[l,s]=(0,r.useState)(!1);(0,r.useEffect)(()=>{s(!0)},[]),(0,r.useEffect)(()=>{if(!e)return;let t="";try{t=sessionStorage.getItem("__mcd_project_name")||""}catch(e){}o(t),requestAnimationFrame(()=>{try{var e,t;null===(e=c.current)||void 0===e||e.focus(),null===(t=c.current)||void 0===t||t.select()}catch(e){}})},[e]);let d=(0,r.useCallback)(()=>{var e;null==t||null===(e=t.onConfirm)||void 0===e||e.call(t,n.trim())},[t,n]),u=(0,r.useCallback)(()=>{var e;null==t||null===(e=t.onSkip)||void 0===e||e.call(t)},[t]);if((0,r.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key?(e.preventDefault(),u()):"Enter"===e.key&&document.activeElement===c.current&&(e.preventDefault(),d())};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e,d,u]),!l||!e||"undefined"==typeof document)return null;let p=document.getElementById("modal-root")||document.body;return(0,w.createPortal)((0,i.jsx)(C,{onMouseDown:u,children:(0,i.jsxs)(I,{role:"dialog","aria-modal":"true","aria-labelledby":"proj-modal-title",onMouseDown:e=>e.stopPropagation(),children:[(0,i.jsx)(P,{"aria-label":"닫기",onClick:u,children:"\xd7"}),(0,i.jsxs)(S,{id:"proj-modal-title",children:["\uD83C\uDF81 프로젝트명 입력하고",(0,i.jsx)("br",{}),(0,i.jsx)(_,{children:"3~6% 설계 지원금"})," 받으세요!"]}),(0,i.jsxs)(E,{children:["현재 진행 중인 ",(0,i.jsx)("strong",{children:"[프로젝트명/현장명]"}),"을 정확히 입력 후 다운로드해 주세요. 스펙북에 포함된 연락처를 통해 향후 현장 발주가 확정되면, 입력하신 프로젝트 데이터를 기반으로 설계자분께 ",(0,i.jsx)(_,{children:"3~6%의 설계 지원금"}),"을 현금으로 정산해 드립니다.",(0,i.jsx)(Z,{children:"(미입력 시 지원금 대상에서 제외될 수 있습니다.)"})]}),(0,i.jsx)(z,{ref:c,type:"text",value:n,onChange:e=>o(e.target.value),placeholder:"예) 한남동 00빌딩 신축공사 / 인테리어 현장명",autoComplete:"off"}),(0,i.jsxs)(L,{children:[(0,i.jsx)(N,{onClick:d,children:"다운로드"}),(0,i.jsx)(T,{onClick:u,children:"건너뛰기"})]})]})}),p)};let j=(0,b.F4)(["from{opacity:0;}to{opacity:1;}"]),k=(0,b.F4)(["from{opacity:0;transform:translateY(8px) scale(0.96);}to{opacity:1;transform:translateY(0) scale(1);}"]),C=b.ZP.div.withConfig({componentId:"sc-327d7a7e-0"})(["position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:2147483647;display:flex;align-items:center;justify-content:center;padding:16px;animation:"," 180ms ease;"],j),I=b.ZP.div.withConfig({componentId:"sc-327d7a7e-1"})(["position:relative;width:480px;max-width:100%;background:#fff;border-radius:16px;box-shadow:0 12px 32px rgba(0,0,0,0.18);padding:32px 28px 24px;box-sizing:border-box;animation:"," 200ms cubic-bezier(0.2,0.8,0.2,1);@media (max-width:480px){width:100%;padding:24px 20px 20px;border-radius:14px;}"],k),P=b.ZP.button.withConfig({componentId:"sc-327d7a7e-2"})(["position:absolute;top:12px;right:12px;width:32px;height:32px;border:none;background:transparent;font-size:20px;color:#999;cursor:pointer;line-height:1;border-radius:50%;&:hover{color:#333;background:#f5f5f5;}outline:none !important;&:focus,&:focus-visible{outline:none !important;box-shadow:none !important;}"]),S=b.ZP.h2.withConfig({componentId:"sc-327d7a7e-3"})(["margin:0 0 14px;font-size:22px;font-weight:700;line-height:1.35;color:#1a1a1a;letter-spacing:-0.01em;@media (max-width:480px){font-size:19px;}"]),_=b.ZP.span.withConfig({componentId:"sc-327d7a7e-4"})(["color:#413d7d;font-weight:800;"]),E=b.ZP.p.withConfig({componentId:"sc-327d7a7e-5"})(["margin:0 0 18px;font-size:14px;line-height:1.6;color:#444;strong{font-weight:700;color:#1a1a1a;}"]),Z=b.ZP.span.withConfig({componentId:"sc-327d7a7e-6"})(["display:block;margin-top:8px;font-size:12.5px;color:#888;"]),z=b.ZP.input.withConfig({componentId:"sc-327d7a7e-7"})(["width:100%;height:48px;padding:0 14px;font-size:16px;border:1px solid #d0d5dd;border-radius:10px;outline:none;background:#fff;color:#1a1a1a;box-sizing:border-box;margin-bottom:16px;transition:border-color 120ms ease,box-shadow 120ms ease;&::placeholder{color:#b0b0b0;}&:focus{border-color:#413d7d;box-shadow:0 0 0 3px rgba(65,61,125,0.12);}"]),L=b.ZP.div.withConfig({componentId:"sc-327d7a7e-8"})(["display:flex;align-items:center;justify-content:flex-end;gap:8px;"]),N=b.ZP.button.withConfig({componentId:"sc-327d7a7e-9"})(["height:48px;padding:0 24px;background:#413d7d;color:#fff;font-size:15px;font-weight:600;border:none;border-radius:10px;cursor:pointer;transition:background 120ms ease,transform 120ms ease;&:hover{background:#36326a;}&:active{transform:translateY(1px);}outline:none !important;&:focus,&:focus-visible{outline:none !important;box-shadow:none !important;}"]),T=b.ZP.button.withConfig({componentId:"sc-327d7a7e-10"})(["height:36px;padding:0 12px;background:transparent;color:#888;font-size:13px;font-weight:500;border:none;border-radius:8px;cursor:pointer;&:hover{color:#333;background:#f5f5f5;}outline:none !important;&:focus,&:focus-visible{outline:none !important;box-shadow:none !important;}"]);var O=e=>{let{children:t}=e;return(0,i.jsxs)(a.Wh,{children:[(0,i.jsx)(d,{}),(0,i.jsx)(x,{}),(0,i.jsx)(y,{}),t]})},A=n(72044),D=n(35775),R=n(7849),M=n(78155),U=n(81500),F=n(23656);let B=["/login","/signup","/callback","/logout"],q=["/home","/board","/brand"];function K(){var e,t;let n=(0,u.usePathname)()||"",{isLogin:o}=(0,a.sJ)(l.Z),r=(0,D.Z)();if(B.some(e=>n===e||n.startsWith("".concat(e,"/")))||q.includes(n)||!o||!r)return null;let c=r.isAgree;if(!0===c)return null;let s=!0===r.certRejected,d=(0,R.X)(null!==(e=r.license)&&void 0!==e?e:"")||s,p=0===(null!==(t=r.phoneNumber)&&void 0!==t?t:"").toString().trim().length,f=null;return(d||p?f="prompt":!1===c&&(f="processing"),f)?(0,i.jsx)(M.Z,{children:"prompt"===f?(0,i.jsx)(U.Z,{}):(0,i.jsx)(F.Z,{})}):null}let V="mcd_sess_key",W="mcd_sess_last",J=()=>{try{if("undefined"!=typeof crypto&&crypto.randomUUID)return crypto.randomUUID()}catch(e){}return"".concat(Date.now().toString(36),"-").concat(Math.floor(1e9*Math.random()).toString(36))},$=()=>document.documentElement.classList.contains("su-plugin")||window.sketchup||(()=>{try{return"1"===sessionStorage.getItem("__mcd_su")}catch(e){return!1}})()?"plugin":/Mobi|Android|iPhone|iPad|iPod/i.test(navigator.userAgent)?"mobile":"desktop",Y=()=>{let e="",t=0;try{var n,i;e=null!==(n=sessionStorage.getItem(V))&&void 0!==n?n:"",t=Number(null!==(i=sessionStorage.getItem(W))&&void 0!==i?i:0)}catch(e){}let o=Date.now();(!e||t&&o-t>18e5)&&(e=J());try{sessionStorage.setItem(V,e),sessionStorage.setItem(W,String(o))}catch(e){}return e};function H(){let{isLogin:e}=(0,a.sJ)(l.Z);return(0,r.useEffect)(()=>{if(!e)return;let t=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];try{let t=localStorage.getItem("TOKEN");if(!t)return;let n={sessionKey:Y(),platform:$()};if(e&&navigator.sendBeacon){let e=new Blob([JSON.stringify(n)],{type:"application/json"});navigator.sendBeacon("".concat(c._n,"/events/session"),e);return}c.et.post("/events/session",n,{headers:{Authorization:"Bearer ".concat(t)}}).catch(()=>{})}catch(e){}};t();let n=window.setInterval(()=>{"visible"===document.visibilityState&&t()},6e4),i=()=>{"visible"===document.visibilityState?t():t(!0)},o=()=>t(!0);return document.addEventListener("visibilitychange",i),window.addEventListener("pagehide",o),()=>{window.clearInterval(n),document.removeEventListener("visibilitychange",i),window.removeEventListener("pagehide",o),t(!0)}},[e]),null}var G=n(8668),Q=n(54843),X=n(71670);let ee="mcd_pushopt_pending";function et(){let e=(0,a.sJ)(l.Z);return(0,r.useEffect)(()=>{try{let e=new URLSearchParams(window.location.search);"1"===e.get("pushopt")&&(sessionStorage.setItem(ee,"1"),sessionStorage.setItem("mcd_pushopt_flow","1"))}catch(e){}},[]),(0,r.useEffect)(()=>{if((0,G.kV)()&&e.isLogin){(0,Q.yA)("web"),(0,Q.o2)();try{if("1"===sessionStorage.getItem(ee)){sessionStorage.removeItem(ee);let e="Notification"in window&&"granted"===Notification.permission;window.setTimeout(()=>{e?window.dispatchEvent(new CustomEvent(X.Rw)):(0,X.eP)("신제품\xb7신규 자재 입고 알림을 받아보시겠어요?")},600)}}catch(e){}}},[e.isLogin]),null}var en=n(27872);let ei="신제품\xb7신규 자재가 등록되면 알림으로 가장 먼저 받아보시겠어요?";function eo(){try{return"1"===sessionStorage.getItem("mcd_pushopt_flow")}catch(e){return!1}}function er(){let{request:e,markDismissed:t}=(0,en.Ri)(),[n,o]=(0,r.useState)(!1),[a,c]=(0,r.useState)("ask"),[l,s]=(0,r.useState)(!1),[d,u]=(0,r.useState)(ei),[p,f]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=e=>{if(!(0,en.P1)())return;let t=e.detail;u((null==t?void 0:t.message)||ei),s(eo()),c("ask"),o(!0)},t=()=>{s(eo()),c("granted"),o(!0)};return window.addEventListener(X.Zd,e),window.addEventListener(X.Rw,t),()=>{window.removeEventListener(X.Zd,e),window.removeEventListener(X.Rw,t)}},[]);let h=(0,r.useCallback)(()=>{try{sessionStorage.removeItem("mcd_pushopt_flow")}catch(e){}},[]),g=(0,r.useCallback)(async()=>{f(!0);let t=await e("web");f(!1),"granted"===t?c("granted"):"denied"===t||"default"===t?c("blocked"):o(!1)},[e]),m=(0,r.useCallback)(()=>{t(),o(!1)},[t]),x=(0,r.useCallback)(()=>{if(h(),o(!1),l)try{window.close()}catch(e){}},[l,h]);return n?"granted"===a?(0,i.jsx)(ea,{onClick:x,children:(0,i.jsxs)(ec,{onClick:e=>e.stopPropagation(),children:[(0,i.jsx)(el,{"aria-hidden":!0,children:"✅"}),(0,i.jsx)(es,{children:"신제품 알림이 켜졌어요"}),(0,i.jsxs)(ed,{children:["신제품\xb7신규 자재가 등록되면 가장 먼저 알려드릴게요.",l&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("br",{}),(0,i.jsx)(eu,{children:"이제 스케치업 창으로 돌아가 작업을 계속하세요."})]})]}),(0,i.jsx)(ep,{children:(0,i.jsx)(eh,{type:"button",onClick:x,style:{flex:1},children:l?"스케치업으로 돌아가기":"확인"})})]})}):"blocked"===a?(0,i.jsx)(ea,{onClick:x,children:(0,i.jsxs)(ec,{onClick:e=>e.stopPropagation(),children:[(0,i.jsx)(el,{"aria-hidden":!0,children:"\uD83D\uDD15"}),(0,i.jsx)(es,{children:"알림이 켜지지 않았어요"}),(0,i.jsxs)(ed,{children:["브라우저에서 알림이 차단되어 있어요. 주소창의 자물쇠 아이콘 → 알림",(0,i.jsx)("b",{children:" 허용"}),"으로 바꾼 뒤 다시 시도해 주세요."]}),(0,i.jsx)(ep,{children:(0,i.jsx)(ef,{type:"button",onClick:x,style:{flex:1},children:"확인"})})]})}):(0,i.jsx)(ea,{onClick:m,children:(0,i.jsxs)(ec,{onClick:e=>e.stopPropagation(),children:[(0,i.jsx)(el,{"aria-hidden":!0,children:"\uD83D\uDD14"}),(0,i.jsx)(es,{children:"신제품 입고 알림"}),(0,i.jsx)(ed,{children:d}),(0,i.jsxs)(ep,{children:[(0,i.jsx)(ef,{type:"button",onClick:m,disabled:p,children:"나중에"}),(0,i.jsx)(eh,{type:"button",onClick:g,disabled:p,children:p?"설정 중…":"알림 받기"})]})]})}):null}let ea=b.ZP.div.withConfig({componentId:"sc-b415567f-0"})(["position:fixed;inset:0;z-index:99999;background:rgba(0,0,0,0.35);display:flex;align-items:flex-end;justify-content:center;@media (min-width:769px){align-items:center;}"]),ec=b.ZP.div.withConfig({componentId:"sc-b415567f-1"})(["width:100%;max-width:420px;background:#fff;border-radius:16px 16px 0 0;padding:24px 20px 28px;box-shadow:0 -4px 24px rgba(0,0,0,0.12);text-align:center;@media (min-width:769px){border-radius:16px;margin-bottom:0;}"]),el=b.ZP.div.withConfig({componentId:"sc-b415567f-2"})(["font-size:32px;margin-bottom:8px;"]),es=b.ZP.div.withConfig({componentId:"sc-b415567f-3"})(["font-size:17px;font-weight:700;color:#1a1a1a;margin-bottom:6px;"]),ed=b.ZP.p.withConfig({componentId:"sc-b415567f-4"})(["font-size:14px;line-height:1.5;color:#555;margin:0 0 20px;"]),eu=b.ZP.span.withConfig({componentId:"sc-b415567f-5"})(["display:inline-block;margin-top:8px;font-size:13px;font-weight:600;color:#6c2bd9;"]),ep=b.ZP.div.withConfig({componentId:"sc-b415567f-6"})(["display:flex;gap:10px;"]),ef=b.ZP.button.withConfig({componentId:"sc-b415567f-7"})(["flex:1;height:46px;border:1px solid #e0e0e0;border-radius:10px;background:#fff;color:#777;font-size:15px;cursor:pointer;"]),eh=b.ZP.button.withConfig({componentId:"sc-b415567f-8"})(["flex:2;height:46px;border:none;border-radius:10px;background:#6c2bd9;color:#fff;font-size:15px;font-weight:700;cursor:pointer;&:disabled{opacity:0.6;cursor:default;}"]);var eg=n(8927);let em="신제품\xb7신규 자재 알림을 받아보시겠어요?";function ex(){let[e,t]=(0,r.useState)(!1),[n,o]=(0,r.useState)(em),[a,c]=(0,r.useState)(!1);(0,r.useEffect)(()=>{c(!0)},[]),(0,r.useEffect)(()=>{let e=e=>{let n=e.detail;o((null==n?void 0:n.message)||em),t(!0)};return window.addEventListener(X.iv,e),()=>window.removeEventListener(X.iv,e)},[]);let l=(0,r.useCallback)(()=>{try{localStorage.setItem("mcd_plugin_pushopt_dismissed","1")}catch(e){}t(!1)},[]),s=(0,r.useCallback)(async()=>{let e=window.location.origin;!function(e){let t=window;try{if(t.sketchup&&"function"==typeof t.sketchup.openExternal){t.sketchup.openExternal(e);return}if("function"==typeof t.__mcdOpenExternal){t.__mcdOpenExternal(e);return}}catch(e){}try{window.open(e,"_blank")}catch(e){}}(await (0,eg.db)("".concat(e,"/home/?pushopt=1"))),l()},[l]);return e&&a&&"undefined"!=typeof document?(0,w.createPortal)((0,i.jsx)(ew,{onClick:l,children:(0,i.jsxs)(eb,{onClick:e=>e.stopPropagation(),children:[(0,i.jsx)(ev,{"aria-hidden":!0,children:"\uD83D\uDD14"}),(0,i.jsx)(ey,{children:"신제품 입고 알림"}),(0,i.jsxs)(ej,{children:[n,(0,i.jsx)("br",{}),(0,i.jsx)(ek,{children:"플러그인은 알림을 직접 받을 수 없어, 웹 브라우저에서 켜시면 신제품 등록 시 바로 받아보실 수 있어요."})]}),(0,i.jsxs)(eC,{children:[(0,i.jsx)(eI,{type:"button",onClick:l,children:"다시 안 보기"}),(0,i.jsx)(eP,{type:"button",onClick:s,children:"웹에서 알림 켜기"})]})]})}),document.body):null}let ew=b.ZP.div.withConfig({componentId:"sc-555daa6b-0"})(["position:fixed;inset:0;z-index:2147483000;background:rgba(0,0,0,0.35);display:flex;align-items:center;justify-content:center;"]),eb=b.ZP.div.withConfig({componentId:"sc-555daa6b-1"})(["width:100%;max-width:420px;background:#fff;border-radius:16px;padding:24px 20px 28px;box-shadow:0 8px 28px rgba(0,0,0,0.18);text-align:center;"]),ev=b.ZP.div.withConfig({componentId:"sc-555daa6b-2"})(["font-size:32px;margin-bottom:8px;"]),ey=b.ZP.div.withConfig({componentId:"sc-555daa6b-3"})(["font-size:17px;font-weight:700;color:#1a1a1a;margin-bottom:6px;"]),ej=b.ZP.p.withConfig({componentId:"sc-555daa6b-4"})(["font-size:14px;line-height:1.5;color:#555;margin:0 0 20px;"]),ek=b.ZP.span.withConfig({componentId:"sc-555daa6b-5"})(["font-size:12px;color:#888;"]),eC=b.ZP.div.withConfig({componentId:"sc-555daa6b-6"})(["display:flex;gap:10px;"]),eI=b.ZP.button.withConfig({componentId:"sc-555daa6b-7"})(["flex:1;height:46px;border:1px solid #e0e0e0;border-radius:10px;background:#fff;color:#777;font-size:15px;cursor:pointer;"]),eP=b.ZP.button.withConfig({componentId:"sc-555daa6b-8"})(["flex:2;height:46px;border:none;border-radius:10px;background:#6c2bd9;color:#fff;font-size:15px;font-weight:700;cursor:pointer;"]),eS="mcd_su_feature_hidden_v5",e_="/home/sketchup#updates",eE=[{src:"/images/popup/scene-export.png",title:"Sketchup씬 및 Enscape 렌더링 → My 아카이브 저장 \xb7 마감재 적용 부위별 확인",caption:(0,i.jsxs)(i.Fragment,{children:["\xb7 추출 씬을 PPT 또는 URL 링크로 내보내 팀\xb7클라이언트와 공유 가능해요.",(0,i.jsx)("br",{}),"\xb7 제품 리스트에서 제품 선택시 투시도 내 적용된 영역을 확인 할 수 있어요."]})}];function eZ(){let e=(0,u.useRouter)(),t=(0,u.usePathname)(),[n,o]=(0,r.useState)(!1),[a,c]=(0,r.useState)(!1),[l,s]=(0,r.useState)(0),[d,p]=(0,r.useState)(!1);(0,r.useEffect)(()=>{c(!0)},[]),(0,r.useEffect)(()=>{if("/home"!==((t||"").replace(/\/+$/,"")||"/")){o(!1);return}try{let e="1"===sessionStorage.getItem("__mcd_su")||document.documentElement.classList.contains("su-plugin"),t=!e&&window.matchMedia("(min-width: 769px)").matches;if(!e&&!t||"1"===localStorage.getItem(eS))return}catch(e){return}let e=setTimeout(()=>o(!0),900);return()=>clearTimeout(e)},[t]);let f=(0,r.useCallback)(()=>{try{d&&localStorage.setItem(eS,"1")}catch(e){}o(!1)},[d]),h=(0,r.useCallback)(()=>{f();try{let e=window.sketchup;if(e&&"function"==typeof e.installUpdate){e.installUpdate();return}}catch(e){}try{e.push(e_)}catch(e){window.location.href=e_}},[f,e]),g=(0,r.useCallback)(()=>s(e=>(e-1+eE.length)%eE.length),[]),m=(0,r.useCallback)(()=>s(e=>(e+1)%eE.length),[]);if(!n||!a||"undefined"==typeof document)return null;let x=eE[l],b=eE.length>1;return(0,w.createPortal)((0,i.jsx)(ez,{onClick:f,children:(0,i.jsxs)(eL,{onClick:e=>e.stopPropagation(),children:[(0,i.jsx)(eF,{children:(0,i.jsxs)("label",{children:[(0,i.jsx)("input",{type:"checkbox",checked:d,onChange:e=>p(e.target.checked)}),(0,i.jsx)("span",{children:"다시 보지 않기"})]})}),(0,i.jsx)(eN,{children:"스케치업 루비 업데이트 \xb7 투시도 씬 자동저장 \xb7 일괄 PPT 추출 및 URL 링크 공유"}),(0,i.jsxs)(eT,{children:[b&&(0,i.jsx)(eA,{type:"button",$side:"left",onClick:g,"aria-label":"이전",children:"‹"}),(0,i.jsx)(eO,{style:{backgroundImage:"url(".concat(x.src,")")}}),b&&(0,i.jsx)(eA,{type:"button",$side:"right",onClick:m,"aria-label":"다음",children:"›"})]}),b&&(0,i.jsx)(eD,{children:eE.map((e,t)=>(0,i.jsx)(eR,{type:"button",$active:t===l,onClick:()=>s(t),"aria-label":"".concat(t+1,"번째")},t))}),(0,i.jsx)(eM,{children:x.title}),(0,i.jsx)(eU,{children:x.caption}),(0,i.jsxs)(eB,{children:[(0,i.jsx)(eq,{type:"button",onClick:f,children:"닫기"}),(0,i.jsx)(eK,{type:"button",onClick:h,children:"마코디 플러그인 v1.5.8 업데이트 →"})]})]})}),document.body)}let ez=b.ZP.div.withConfig({componentId:"sc-6d0540a8-0"})(["position:fixed;inset:0;z-index:2147483000;background:rgba(0,0,0,0.4);display:flex;align-items:center;justify-content:center;padding:10px;"]),eL=b.ZP.div.withConfig({componentId:"sc-6d0540a8-1"})(["position:relative;width:100%;max-width:920px;max-height:calc(100vh - 20px);overflow-y:auto;background:#fff;border-radius:16px;padding:18px 20px 20px;box-shadow:0 8px 28px rgba(0,0,0,0.18);text-align:center;"]),eN=b.ZP.div.withConfig({componentId:"sc-6d0540a8-2"})(["display:inline-block;font-size:16px;font-weight:700;color:#6c2bd9;background:#f2ecfb;border-radius:999px;padding:4px 12px;margin-bottom:7px;"]),eT=b.ZP.div.withConfig({componentId:"sc-6d0540a8-3"})(["position:relative;display:flex;align-items:center;"]),eO=b.ZP.div.withConfig({componentId:"sc-6d0540a8-4"})(["flex:1;height:clamp(280px,54vh,430px);border-radius:10px;border:1px solid #eee;background-color:#f7f7f9;background-size:contain;background-position:center;background-repeat:no-repeat;"]),eA=b.ZP.button.withConfig({componentId:"sc-6d0540a8-5"})(["position:absolute;"," top:50%;transform:translateY(-50%);width:38px;height:38px;border-radius:50%;border:none;background:rgba(0,0,0,0.45);color:#fff;font-size:25px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:1;&:hover{background:rgba(0,0,0,0.62);}"],e=>{let{$side:t}=e;return"left"===t?"left: 6px;":"right: 6px;"}),eD=b.ZP.div.withConfig({componentId:"sc-6d0540a8-6"})(["display:flex;justify-content:center;gap:7px;margin:7px 0 5px;"]),eR=b.ZP.button.withConfig({componentId:"sc-6d0540a8-7"})(["width:8px;height:8px;border-radius:50%;border:none;padding:0;cursor:pointer;background:",";transition:background 0.15s;"],e=>{let{$active:t}=e;return t?"#6c2bd9":"#d6d6de"}),eM=b.ZP.div.withConfig({componentId:"sc-6d0540a8-8"})(["font-size:16px;font-weight:700;color:#1a1a1a;margin:8px 0 3px;"]),eU=b.ZP.p.withConfig({componentId:"sc-6d0540a8-9"})(["font-size:16px;line-height:1.5;color:#666;margin:0 0 8px;min-height:44px;b{color:#6c2bd9;font-weight:700;}"]),eF=b.ZP.div.withConfig({componentId:"sc-6d0540a8-10"})(["position:absolute;top:16px;right:20px;z-index:2;label{display:inline-flex;align-items:center;gap:6px;cursor:pointer;font-size:12px;color:#999;user-select:none;}input{width:14px;height:14px;accent-color:#6c2bd9;cursor:pointer;}"]),eB=b.ZP.div.withConfig({componentId:"sc-6d0540a8-11"})(["display:flex;gap:10px;"]),eq=b.ZP.button.withConfig({componentId:"sc-6d0540a8-12"})(["flex:1;height:48px;border:1px solid #e0e0e0;border-radius:10px;background:#fff;color:#777;font-size:16px;cursor:pointer;"]),eK=b.ZP.button.withConfig({componentId:"sc-6d0540a8-13"})(["flex:2;height:48px;border:none;border-radius:10px;background:#6c2bd9;color:#fff;font-size:16px;font-weight:700;cursor:pointer;"]);function eV(){let[e,t]=(0,r.useState)(!1),[n,o]=(0,r.useState)(null);return((0,r.useEffect)(()=>t(!0),[]),(0,r.useEffect)(()=>{let e=window;e.__mcdUpdateState=e=>{var t,n;if(!e||"object"!=typeof e)return;let i=!!e.pending;o({pending:i,version:String(null!==(t=e.version)&&void 0!==t?t:""),required:!!e.required,installed:String(null!==(n=e.installed)&&void 0!==n?n:"")});try{sessionStorage.setItem("__mcd_update_pending",i?"1":"0")}catch(e){}try{window.dispatchEvent(new CustomEvent("mcd:update-state",{detail:{pending:i}}))}catch(e){}};let t=e.__mcdCaps;return e.__mcdCaps=e=>{try{(null==e?void 0:e.plugin)&&sessionStorage.setItem("__mcd_pv",String(e.plugin))}catch(e){}"function"==typeof t&&t(e)},()=>{e.__mcdUpdateState&&delete e.__mcdUpdateState}},[]),e&&n&&"undefined"!=typeof document)?n.required?(0,w.createPortal)((0,i.jsx)(eY,{role:"alertdialog","aria-modal":"true",children:(0,i.jsxs)(eH,{children:[(0,i.jsx)(eG,{"aria-hidden":!0,children:"\uD83D\uDD04"}),(0,i.jsx)(eQ,{children:"SketchUp을 다시 켜주세요"}),(0,i.jsxs)(eX,{children:["지금 버전에는 마감재가 잘못 저장될 수 있는 문제가 있어요.",(0,i.jsx)("br",{}),"새 버전은 이미 설치되어 있고, ",(0,i.jsx)("b",{children:"SketchUp을 껐다 켜면 바로 적용"}),"됩니다."]}),(0,i.jsx)(e0,{children:"작업 중이시면 파일을 저장한 뒤 다시 켜주세요. 저장한 내용은 그대로 남습니다."}),(0,i.jsxs)(e1,{children:[(0,i.jsxs)("span",{children:["지금 ",n.installed||"—"]}),(0,i.jsx)(e2,{"aria-hidden":!0,children:"→"}),(0,i.jsx)("b",{children:n.version||"최신"})]})]})}),document.body):n.pending?(0,w.createPortal)((0,i.jsxs)(eW,{role:"status",children:[(0,i.jsx)(eJ,{"aria-hidden":!0}),(0,i.jsxs)(e$,{children:["새 버전(",n.version,")이 준비됐어요 \xb7"," ",(0,i.jsx)("b",{children:"SketchUp을 다시 켜면 적용됩니다"})]})]}),document.body):null:null}let eW=b.ZP.div.withConfig({componentId:"sc-b1f84390-0"})(["position:fixed;left:0;right:0;bottom:0;z-index:2147482000;display:flex;align-items:center;justify-content:center;gap:8px;padding:7px 12px;background:#eef1fe;border-top:1px solid #d7d9f0;color:#2b2f5e;font-size:12.5px;line-height:1.4;pointer-events:none;b{font-weight:700;}"]),eJ=b.ZP.span.withConfig({componentId:"sc-b1f84390-1"})(["flex:0 0 auto;width:7px;height:7px;border-radius:50%;background:#4c6ef5;"]),e$=b.ZP.span.withConfig({componentId:"sc-b1f84390-2"})(["min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"]),eY=b.ZP.div.withConfig({componentId:"sc-b1f84390-3"})(["position:fixed;inset:0;z-index:2147483600;background:rgba(20,20,30,0.55);display:flex;align-items:center;justify-content:center;padding:20px;"]),eH=b.ZP.div.withConfig({componentId:"sc-b1f84390-4"})(["width:100%;max-width:420px;background:#fff;border-radius:16px;padding:26px 22px 22px;box-shadow:0 12px 34px rgba(0,0,0,0.28);text-align:center;"]),eG=b.ZP.div.withConfig({componentId:"sc-b1f84390-5"})(["font-size:34px;margin-bottom:10px;"]),eQ=b.ZP.div.withConfig({componentId:"sc-b1f84390-6"})(["font-size:18px;font-weight:700;color:#1a1a1a;margin-bottom:8px;"]),eX=b.ZP.p.withConfig({componentId:"sc-b1f84390-7"})(["margin:0 0 14px;font-size:14px;line-height:1.6;color:#444;"]),e0=b.ZP.p.withConfig({componentId:"sc-b1f84390-8"})(["margin:0 0 16px;font-size:12.5px;line-height:1.55;color:#888;"]),e1=b.ZP.div.withConfig({componentId:"sc-b1f84390-9"})(["display:flex;align-items:center;justify-content:center;gap:8px;font-size:12px;color:#888;font-family:ui-monospace,Menlo,Consolas,monospace;b{color:#4c6ef5;}"]),e2=b.ZP.span.withConfig({componentId:"sc-b1f84390-10"})(["color:#c4c4d4;"]),e5="mcd_update_strip_dismissed",e8="/home/sketchup";function e4(e,t){let n=e.trim().replace(/^v/i,"").split(".").map(e=>parseInt(e,10)),i=t.trim().replace(/^v/i,"").split(".").map(e=>parseInt(e,10));if(!n.length||!i.length||n.some(isNaN)||i.some(isNaN))return!1;for(let e=0;e{let e=!0;return(async()=>{try{var t,i,o,r,a,l,s;if(!("1"===sessionStorage.getItem("__mcd_su")||document.documentElement.classList.contains("su-plugin"))||"1"===sessionStorage.getItem(e5)||(window.location.pathname||"").startsWith(e8))return;try{null===(i=window.sketchup)||void 0===i||null===(t=i.getCaps)||void 0===t||t.call(i)}catch(e){}let{data:d}=await c.et.get("/plugin/latest"),u=String(null!==(o=null==d?void 0:d.version)&&void 0!==o?o:"").trim();if(!u||!e)return;let p=null!==(r=sessionStorage.getItem("__mcd_pv"))&&void 0!==r?r:"";for(let t=0;!p&&t<30&&e;t+=1)await new Promise(e=>setTimeout(e,200)),p=null!==(a=sessionStorage.getItem("__mcd_pv"))&&void 0!==a?a:"";if(!e||"1"===sessionStorage.getItem("__mcd_update_pending"))return;let f=(()=>{try{var e;return"function"==typeof(null===(e=window.sketchup)||void 0===e?void 0:e.getCaps)}catch(e){return!1}})(),h=!!p&&e4(p,u),g=!p&&!f;if(!h&&!g)return;let m=String(null!==(l=null==d?void 0:d.minSupported)&&void 0!==l?l:"").trim(),x=!!m&&!!p&&e4(p,m);n({version:u,title:String(null!==(s=null==d?void 0:d.title)&&void 0!==s?s:"").trim(),installed:p,critical:x})}catch(e){}})(),()=>{e=!1}},[]),(0,r.useEffect)(()=>{let e=e=>{var t;(null==e?void 0:null===(t=e.detail)||void 0===t?void 0:t.pending)&&n(null)};return window.addEventListener("mcd:update-state",e),()=>window.removeEventListener("mcd:update-state",e)},[]),(0,r.useEffect)(()=>{if(!t)return;let e=document.body.style.paddingTop;return document.body.style.paddingTop="34px",()=>{document.body.style.paddingTop=e}},[t]);let o=(0,r.useCallback)(()=>{try{let e=window.sketchup;if(e&&"function"==typeof e.installUpdate){e.installUpdate();return}}catch(e){}e.push(e8)},[e]),a=(0,r.useCallback)(()=>{try{sessionStorage.setItem(e5,"1")}catch(e){}n(null)},[]);if(!t)return null;let l=t.installed?e6(t.installed):"구버전",s=e6(t.version);return(0,i.jsxs)(e7,{role:t.critical?"alert":"status",$crit:t.critical,children:[(0,i.jsx)(e9,{"aria-hidden":!0,$crit:t.critical}),t.critical?(0,i.jsxs)(te,{children:[(0,i.jsxs)("b",{children:["지금 ",l,"은 일부 기능이 정상 동작하지 않습니다."]}),(0,i.jsxs)(tt,{children:[" 최신 ",s,"으로 업데이트해 주세요."]})]}):(0,i.jsxs)(te,{children:["새 버전 ",(0,i.jsx)("b",{children:s}),t.title?(0,i.jsxs)(tt,{children:[" \xb7 ",t.title]}):null]}),(0,i.jsx)(tn,{type:"button",$crit:t.critical,onClick:o,children:"지금 설치"}),t.critical?null:(0,i.jsx)(ti,{type:"button",onClick:a,"aria-label":"이번만 닫기",children:"✕"})]})}let e7=b.ZP.div.withConfig({componentId:"sc-215a5185-0"})(["position:fixed;top:0;left:0;right:0;z-index:2147483000;height:34px;display:flex;align-items:center;gap:8px;padding:0 12px;background:",";border-bottom:1px solid ",";color:",";font-size:12.5px;font-weight:600;box-sizing:border-box;"],e=>{let{$crit:t}=e;return t?"#fbe9e7":"#fdf5e6"},e=>{let{$crit:t}=e;return t?"#dc8b83":"#e2a03f"},e=>{let{$crit:t}=e;return t?"#a8261e":"#8a6d3b"}),e9=b.ZP.span.withConfig({componentId:"sc-215a5185-1"})(["flex:0 0 auto;width:7px;height:7px;border-radius:50%;background:",";"],e=>{let{$crit:t}=e;return t?"#c2352b":"#e2a03f"}),te=b.ZP.span.withConfig({componentId:"sc-215a5185-2"})(["flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;b{font-weight:800;}"]),tt=b.ZP.span.withConfig({componentId:"sc-215a5185-3"})(["opacity:0.8;font-weight:500;"]),tn=b.ZP.button.withConfig({componentId:"sc-215a5185-4"})(["flex:0 0 auto;height:24px;padding:0 11px;border:1px solid ",";border-radius:6px;background:",";color:",";font-family:inherit;font-size:12px;font-weight:800;cursor:pointer;&:hover{background:",";}"],e=>{let{$crit:t}=e;return t?"#c2352b":"#e2a03f"},e=>{let{$crit:t}=e;return t?"#c2352b":"#ffffff"},e=>{let{$crit:t}=e;return t?"#ffffff":"#8a6d3b"},e=>{let{$crit:t}=e;return t?"#a8261e":"#f7ead2"}),ti=b.ZP.button.withConfig({componentId:"sc-215a5185-5"})(["flex:0 0 auto;width:22px;height:22px;border:0;background:transparent;color:#b09468;font-size:13px;cursor:pointer;&:hover{color:#8a6d3b;}"]),to="mcd_ios_pwa_dismissed";function tr(){let e=(0,a.sJ)(l.Z),[t,n]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{var t,i;if((0,G.kV)()&&e.isLogin&&!(!function(){if("undefined"==typeof navigator)return!1;let e=navigator.userAgent||"";return(!!/iphone|ipad|ipod/i.test(e)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&/safari/i.test(e)&&!/crios|fxios|edgios/i.test(e)}()||!0===window.navigator.standalone||(null===(t=(i=window).matchMedia)||void 0===t?void 0:t.call(i,"(display-mode: standalone)").matches)===!0)){try{if("1"===localStorage.getItem(to))return}catch(e){}n(!0)}},[e.isLogin]),t)?(0,i.jsxs)(ta,{role:"status",children:[(0,i.jsxs)(tc,{children:[(0,i.jsx)("b",{children:"홈 화면에 추가"}),"하면 신제품 입고 알림을 받을 수 있어요.",(0,i.jsx)("br",{}),(0,i.jsxs)(tl,{children:["공유 ",(0,i.jsx)(ts,{"aria-hidden":!0,children:"⬆️"})," → ‘홈 화면에 추가’를 눌러주세요."]})]}),(0,i.jsx)(td,{type:"button",onClick:()=>{try{localStorage.setItem(to,"1")}catch(e){}n(!1)},"aria-label":"닫기",children:"✕"})]}):null}let ta=b.ZP.div.withConfig({componentId:"sc-505cd5e6-0"})(["position:fixed;left:12px;right:12px;bottom:12px;z-index:99998;background:#1a1a1a;color:#fff;border-radius:12px;padding:14px 16px;display:flex;align-items:center;gap:12px;box-shadow:0 6px 24px rgba(0,0,0,0.25);"]),tc=b.ZP.div.withConfig({componentId:"sc-505cd5e6-1"})(["flex:1;font-size:13px;line-height:1.45;"]),tl=b.ZP.span.withConfig({componentId:"sc-505cd5e6-2"})(["font-size:12px;color:#cfcfcf;"]),ts=b.ZP.span.withConfig({componentId:"sc-505cd5e6-3"})(["font-size:13px;"]),td=b.ZP.button.withConfig({componentId:"sc-505cd5e6-4"})(["flex-shrink:0;width:28px;height:28px;border:none;background:rgba(255,255,255,0.15);color:#fff;border-radius:50%;font-size:13px;cursor:pointer;"]);var tu=()=>{let e=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{if(!e.current){try{if("/callback"===window.location.pathname.replace(/\/+$/,""))return}catch(e){}e.current=!0,(async()=>{await (0,eg.ik)()&&window.location.reload()})()}},[]),null},tp=n(9927);async function tf(e){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(e),!0}catch(e){}try{let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand("copy");return document.body.removeChild(t),n}catch(e){return!1}}function th(){let e=(0,u.useRouter)(),t=(0,D.Z)(),[n,o]=(0,r.useState)(!1),[a,c]=(0,r.useState)("choice"),[l,s]=(0,r.useState)(!1),[d,p]=(0,r.useState)(!1);(0,r.useEffect)(()=>{p(!0)},[]),(0,r.useEffect)(()=>{let e=()=>{c("choice"),s(!1),o(!0)};return window.addEventListener(tp.L,e),()=>window.removeEventListener(tp.L,e)},[]);let f=(0,r.useCallback)(()=>o(!1),[]),h=(0,r.useCallback)(()=>{o(!1),e.push("/premium?src=exhausted")},[e]),g=(null==t?void 0:t.id)?"".concat(window.location.origin,"/signup?ref=").concat(t.id):"",m=(0,r.useCallback)(async()=>{g&&s(await tf(g))},[g]);return n&&d&&"undefined"!=typeof document?(0,w.createPortal)((0,i.jsx)(tg,{onClick:f,children:(0,i.jsx)(tm,{onClick:e=>e.stopPropagation(),children:"choice"===a?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(tx,{children:[(0,i.jsx)("span",{"aria-hidden":!0,children:"\uD83C\uDF81"})," 무료 장수를 다 쓰셨어요"]}),(0,i.jsxs)(tw,{children:["제휴하면 심리스\xb7PBR ",(0,i.jsx)(tv,{children:"무제한"}),",",(0,i.jsx)("br",{}),"친구 추천하면 ",(0,i.jsx)(tv,{children:"5장"}),"을 더 드려요."]}),(0,i.jsxs)(tI,{children:[(0,i.jsx)(tS,{type:"button",onClick:h,children:"무료 제휴 \xb7 추가구매"}),(0,i.jsx)(tP,{type:"button",onClick:()=>c("referral"),children:"친구 추천"})]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(tx,{children:[(0,i.jsx)("span",{"aria-hidden":!0,children:"\uD83E\uDD1D"})," 친구 추천하고 5장 받기"]}),(0,i.jsxs)(tw,{children:["아래 링크를 친구에게 공유하세요.",(0,i.jsx)("br",{}),(0,i.jsx)(tb,{children:"친구가 이 링크로 가입하고 승인되면 두 분 모두 5장을 드려요."})]}),(0,i.jsxs)(ty,{children:[(0,i.jsx)(tj,{title:g,children:g||"로그인 후 이용해 주세요"}),(0,i.jsx)(tk,{type:"button",onClick:m,disabled:!g,children:l?"복사됨":"복사"})]}),(0,i.jsxs)(tC,{children:["또는 친구가 가입 시 ",(0,i.jsx)("b",{children:"추천인란에 내 이메일(아이디)"}),"을 입력해도 돼요."]}),(0,i.jsxs)(tI,{children:[(0,i.jsx)(tP,{type:"button",onClick:()=>c("choice"),children:"뒤로"}),(0,i.jsx)(tS,{type:"button",onClick:f,children:"닫기"})]})]})})}),document.body):null}let tg=b.ZP.div.withConfig({componentId:"sc-e4fe3380-0"})(["position:fixed;inset:0;z-index:2147483647;background:rgba(0,0,0,0.4);display:flex;align-items:center;justify-content:center;padding:16px;"]),tm=b.ZP.div.withConfig({componentId:"sc-e4fe3380-1"})(["width:100%;max-width:440px;background:#fff;border-radius:16px;padding:26px 22px 24px;box-shadow:0 10px 32px rgba(0,0,0,0.2);text-align:center;"]),tx=b.ZP.div.withConfig({componentId:"sc-e4fe3380-2"})(["font-size:18px;font-weight:700;color:#1a1a1a;margin-bottom:8px;"]),tw=b.ZP.p.withConfig({componentId:"sc-e4fe3380-3"})(["font-size:14px;line-height:1.55;color:#555;margin:0 0 18px;"]),tb=b.ZP.span.withConfig({componentId:"sc-e4fe3380-4"})(["font-size:12.5px;color:#888;"]),tv=b.ZP.b.withConfig({componentId:"sc-e4fe3380-5"})(["font-weight:700;color:#1a1a1a;"]),ty=b.ZP.div.withConfig({componentId:"sc-e4fe3380-6"})(["display:flex;gap:8px;margin-bottom:10px;"]),tj=b.ZP.div.withConfig({componentId:"sc-e4fe3380-7"})(["flex:1;height:44px;display:flex;align-items:center;padding:0 12px;border:1px solid #e5e5e5;border-radius:10px;background:#f7f7f9;font-size:13px;color:#444;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]),tk=b.ZP.button.withConfig({componentId:"sc-e4fe3380-8"})(["flex-shrink:0;min-width:64px;height:44px;border:none;border-radius:10px;background:#6c2bd9;color:#fff;font-size:14px;font-weight:700;cursor:pointer;&:disabled{opacity:0.5;cursor:default;}"]),tC=b.ZP.div.withConfig({componentId:"sc-e4fe3380-9"})(["font-size:12px;color:#999;line-height:1.5;margin-bottom:18px;"]),tI=b.ZP.div.withConfig({componentId:"sc-e4fe3380-10"})(["display:flex;gap:8px;button{font-size:14px;white-space:nowrap;padding:0;}"]),tP=b.ZP.button.withConfig({componentId:"sc-e4fe3380-11"})(["flex:1;height:48px;border:1px solid #e0e0e0;border-radius:10px;background:#fff;color:#666;font-size:15px;cursor:pointer;"]),tS=b.ZP.button.withConfig({componentId:"sc-e4fe3380-12"})(["flex:1;height:48px;border:none;border-radius:10px;background:#6c2bd9;color:#fff;font-size:15px;font-weight:700;cursor:pointer;"]);function t_(e){let{children:t}=e;return(0,A.Z)()?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(H,{}),(0,i.jsx)(et,{}),(0,i.jsx)(er,{}),(0,i.jsx)(ex,{}),(0,i.jsx)(eZ,{}),(0,i.jsx)(eV,{}),(0,i.jsx)(e3,{}),(0,i.jsx)(tr,{}),(0,i.jsx)(th,{}),t,(0,i.jsx)(K,{})]})}function tE(e){let{children:t}=e,[n]=(0,r.useState)(()=>new o.QueryClient({defaultOptions:{queries:{retry:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1,refetchOnMount:!1,staleTime:6e4}}}));return(0,r.useEffect)(()=>{let e=e=>{e.preventDefault()};return document.addEventListener("contextmenu",e),()=>{document.removeEventListener("contextmenu",e)}},[]),(0,i.jsxs)(o.QueryClientProvider,{client:n,children:[(0,i.jsx)(tu,{}),(0,i.jsx)(O,{children:(0,i.jsx)(t_,{children:t})})]})}},3797:function(e,t,n){"use strict";n.d(t,{default:function(){return s}});var i=n(57437),o=n(2265),r=n(99376),a=n(88862),c=n(42369),l=n(87564);function s(e){let{children:t}=e,[n]=(0,o.useState)(()=>new a.qH),[s,u]=(0,o.useState)(!1);(0,r.useServerInsertedHTML)(()=>{let e=n.getStyleElement();return n.instance.clearTag(),(0,i.jsx)(i.Fragment,{children:e})}),(0,o.useEffect)(()=>{u(!0)},[]);let p=(e,t)=>"string"!=typeof t||!e.startsWith("$")&&(0,c.Z)(e);return s?(0,i.jsxs)(a.LC,{shouldForwardProp:p,children:[(0,i.jsx)(l.Z,{}),(0,i.jsx)(d,{children:t})]}):(0,i.jsxs)(a.LC,{sheet:n.instance,shouldForwardProp:p,children:[(0,i.jsx)(l.Z,{}),(0,i.jsx)(d,{children:t})]})}let d=a.ZP.div.withConfig({componentId:"sc-63b5aba4-0"})(["display:flex;flex-direction:column;min-height:100%;width:100%;margin:0 auto;height:100%;"])},87564:function(e,t,n){"use strict";let i=(0,n(88862).vJ)(["*{box-sizing:border-box;padding:0;margin:0;font-size:14px;line-height:170%;color:#0d0d0d;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:'Pretendard',-apple-system,BlinkMacSystemFont,helvetica,'Apple SD Gothic Neo',sans-serif;}html,body{width:100%;height:100%;min-height:100%;-ms-overflow-style:none;}a{color:inherit;text-decoration:none;}input,textarea{outline:0;}textarea{resize:none;}*::-webkit-scrollbar{width:8px;height:8px;}*::-webkit-scrollbar-thumb{height:10%;background:#a0a0a0;border-radius:10px;}*::-webkit-scrollbar-track{background:transparent;}"]);t.Z=i},27872:function(e,t,n){"use strict";n.d(t,{P1:function(){return c},Ri:function(){return s}});var i=n(2265),o=n(8668),r=n(54843);let a="mcd_push_dismissed";function c(){if(!(0,o.kV)()||!("Notification"in window)||"default"!==Notification.permission)return!1;try{if("1"===localStorage.getItem(a))return!1}catch(e){}return!0}function l(){try{localStorage.setItem(a,"1")}catch(e){}}function s(){return{request:(0,i.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"web";if(!(0,o.kV)()||!("Notification"in window))return"unsupported";let t=await Notification.requestPermission();return"granted"===t?await (0,r.D4)(e):l(),t},[]),isPromptable:c,markDismissed:l}}},37431:function(e,t,n){"use strict";n.d(t,{default:function(){return f}});var i=n(57437),o=n(2265),r=n(29918);let a={마코디:"Macodi","디지털 샘플실":"デジタルサンプル室","프리미엄 \xb7 제휴":"プレミアム・提携",프리미엄·제휴:"プレミアム・提携","협업 문의":"コラボ問い合わせ","입점 신청":"出店申請","마코디 사용법":"マコディの使い方","로그인 후 확인":"ログイン後に確認","비밀 혜택":"シークレット特典","설계 단가":"設計単価","설계 단가(m\xb2)":"設計単価(㎡)","설계 단가(m2)":"設計単価(㎡)",설계단가:"設計単価","제휴 단가":"提携単価","제휴 단가(m\xb2)":"提携単価(㎡)","제휴 단가(m2)":"提携単価(㎡)",별도문의:"別途お問い合わせ","별도 문의":"別途お問い合わせ",가격문의:"価格はお問い合わせ","부가세 별도":"税別",원:"ウォン",만원:"万ウォン",억원:"億ウォン","원/㎡":"ウォン/㎡",정렬:"並び替え",브랜드:"ブランド",시리즈:"シリーズ","사이즈(mm)":"サイズ(mm)",사이즈:"サイズ","단가(m\xb2)":"単価(㎡)",단가:"単価",광택:"光沢",광택도:"光沢度",원산지:"原産地",위치:"位置",용도:"用途",검색:"検索",전체보기:"すべて","심리스/PBR":"シームレス/PBR",심리스:"シームレス",무광:"マット",유광:"光沢",반광:"半光沢",상세정보:"詳細情報",제품명:"製品名",상품코드:"商品コード",구분:"区分",종류:"種類",국가:"国","샘플 담기":"サンプル追加","스펙북 담기":"スペックブック追加","내 아카이브 열기":"マイアーカイブを開く","최근 본 상품":"最近見た商品","실시간으로 집계 중":"リアルタイム集計中","도막\xb7포장 바닥재":"塗り床・舗装材",도막형바닥재:"塗り床材",탄성포장재:"弾性舗装材",아크릴포장재:"アクリル系舗装材",실크벽지:"ビニル壁紙","방염 실크벽지":"不燃・準不燃ビニル壁紙",원목마루:"挽き板フローリング",강마루:"複合フローリング",데코타일:"フロアタイル",포세린:"磁器質タイル",인테리어필름:"化粧フィルム",인조대리석:"人工大理石",엔지니어드스톤:"クオーツストーン",한국:"韓国",중국:"中国",이탈리아:"イタリア",미국:"アメリカ",독일:"ドイツ",일본:"日本",국내산:"国内産",수입산:"輸入品"};var c=n(64911),l=n(40257);let s=/[가-힣]/,d="ja_tx_v1",u=new Set(["SCRIPT","STYLE","NOSCRIPT","TEXTAREA","CODE","PRE","INPUT"]),p=c.v;function f(){let[e,t]=(0,o.useState)("ja"===l.env.NEXT_PUBLIC_LOCALE);return((0,o.useEffect)(()=>{if(!p()){t(!1);return}document.documentElement.lang="ja",t(!0);let e={};try{e=JSON.parse(localStorage.getItem(d)||"{}")}catch(t){e={}}let n=()=>{try{localStorage.setItem(d,JSON.stringify(e))}catch(e){}},i=new WeakMap,o=new WeakMap,c=e=>{let t=e.parentElement;if(!t||u.has(t.tagName)||t.closest("[data-no-ja]"))return!0;let n=e.nodeValue||"";if(!s.test(n))return!0;let o=i.get(e);return null!=o&&e.nodeValue===o},l=e=>{let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),i=n.nextNode();for(;i;)c(i)||t.push(i),i=n.nextNode();return t},f=(e,t)=>(e.match(/^\s*/)||[""])[0]+t+(e.match(/\s*$/)||[""])[0],h=e=>e.replace(/ma[ck]o[dt][iy]/gi,"Macodi").replace(/マコ[ーゥ]?デ[ィイ]?|マコデ/g,"Macodi"),g=(e,t)=>{let n=e.nodeValue||"",o=f(n,h(t));o!==n&&(e.nodeValue=o,i.set(e,o))},m={만:"万",억:"億",조:"兆"},x=e=>{let t=e.replace(/([0-9][0-9,]*)\s*([만억조])?\s*원/g,(e,t,n)=>"".concat(t).concat(n?m[n]:"","ウォン"));return t!==e?t:null},w=async t=>{let n=Array.from(new Set(t.map(e=>e.trim()).filter(Boolean))).filter(t=>null==e[t]);for(let t=0;t{var i;e[t]=null!==(i=o[n])&&void 0!==i?i:t})}catch(e){}}},b=async t=>{let o=t.filter(e=>e.isConnected&&!c(e));if(!o.length)return;let r=[];for(let t of o){var l;let n=t.nodeValue||"",o=x(n);if(null!=o){t.nodeValue=o,i.set(t,o);continue}let c=n.trim(),s=null!==(l=a[c])&&void 0!==l?l:e[c];null!=s?g(t,s):r.push(t)}r.length&&(await w(r.map(e=>e.nodeValue||"")),r.forEach(t=>{let n=e[(t.nodeValue||"").trim()];null!=n&&g(t,n)}),n())},v=e=>Array.from(e.querySelectorAll("input[placeholder],textarea[placeholder]")).filter(e=>{let t=e.placeholder||"";return s.test(t)&&o.get(e)!==t}),y=(e,t)=>{let n=f(e.placeholder,h(t));e.placeholder=n,o.set(e,n)},j=async t=>{if(!t.length)return;let n=[];for(let o of t){var i;let t=o.placeholder.trim(),r=null!==(i=a[t])&&void 0!==i?i:e[t];null!=r?y(o,r):n.push(o)}n.length&&(await w(n.map(e=>e.placeholder)),n.forEach(t=>{let n=e[t.placeholder.trim()];null!=n&&y(t,n)}))},k=!1,C=()=>{if(!k){k=!0,t(!1);try{document.documentElement.removeAttribute("data-ja-boot")}catch(e){}}};b(l(document.body)).then(C),j(v(document.body));let I=setTimeout(C,4e3),P=new Set,S=0,_=()=>{S||(S=requestAnimationFrame(()=>{S=0;let e=Array.from(P);P=new Set,b(e),j(v(document.body))}))},E=new MutationObserver(e=>{for(let t of e)"characterData"===t.type?3===t.target.nodeType&&P.add(t.target):t.addedNodes.forEach(e=>{3===e.nodeType?P.add(e):1===e.nodeType&&l(e).forEach(e=>P.add(e))});P.size&&_()});E.observe(document.body,{childList:!0,subtree:!0,characterData:!0});let Z=e=>{var t,n;if(e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey)return;let i=null===(n=e.target)||void 0===n?void 0:null===(t=n.closest)||void 0===t?void 0:t.call(n,"a");if(!i||"_blank"===i.target)return;let o=i.getAttribute("href")||"";/^https?:\/\/(www\.)?macodi\.co\.kr/i.test(o)&&(e.preventDefault(),window.location.assign(o.replace(/^https?:\/\/(www\.)?macodi\.co\.kr/i,window.location.origin)))};return document.addEventListener("click",Z,!0),()=>{E.disconnect(),clearTimeout(I),cancelAnimationFrame(S),document.removeEventListener("click",Z,!0),n()}},[]),e)?(0,i.jsx)("div",{"aria-hidden":!0,style:{position:"fixed",inset:0,zIndex:2147483646,background:"#fff",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)("div",{style:{fontSize:14,color:"#9a9a9a"},children:"読み込み中…"})}):null}},64911:function(e,t,n){"use strict";n.d(t,{v:function(){return o}});var i=n(40257);function o(){if("ja"===i.env.NEXT_PUBLIC_LOCALE)return!0;let e=window.location.hostname;if("macodi.net"===e||"www.macodi.net"===e)return!0;try{let e=new URLSearchParams(window.location.search).get("lang");if("ja"===e)return localStorage.setItem("force_ja","1"),!0;if("ko"===e)return localStorage.removeItem("force_ja"),!1;if("1"===localStorage.getItem("force_ja"))return!0}catch(e){}return!1}},8668:function(e,t,n){"use strict";n.d(t,{WM:function(){return s},ft:function(){return a},kV:function(){return c},qe:function(){return r}});var i=n(738),o=n(27012);let r={apiKey:"AIzaSyCB--2xNFu3z2hbFS2G1_g1j1aLSioAKaY",authDomain:"macodi-push.firebaseapp.com",projectId:"macodi-push",storageBucket:"macodi-push.firebasestorage.app",messagingSenderId:"356231351762",appId:"1:356231351762:web:78c09b0b0659109649cc0b"},a="BACTfl27sU62pBBcFg3NOPx9mVlMyfSrbPOY7QuygpNQfViiZtIomLTkS1T6IQgE_IPHzGHJLYqq54kpZLgYk-M",c=()=>!!r.apiKey&&!!r.projectId&&!!r.appId&&!!r.messagingSenderId&&!!a,l=null;async function s(){if(!c())return null;try{if(!await (0,o.Gb)())return null;let e=c()?(l||(l=(0,i.C6)().length?(0,i.Mq)():(0,i.ZF)(r)),l):null;if(!e)return null;return(0,o.KL)(e)}catch(e){return null}}},54843:function(e,t,n){"use strict";n.d(t,{D4:function(){return l},o2:function(){return d},yA:function(){return c}});var i=n(27012),o=n(8668),r=n(45209);let a=null;async function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"web";"Notification"in window&&"granted"===Notification.permission&&await l(e)}async function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"web",t=await (0,o.WM)();if(!t)return!1;let n=await ("undefined"!=typeof navigator&&"serviceWorker"in navigator&&(0,o.kV)()?(a||(a=navigator.serviceWorker.register(function(){let e=new URLSearchParams(Object.entries(o.qe).filter(e=>{let[,t]=e;return"string"==typeof t&&t.length>0})).toString();return"".concat("/firebase-messaging-sw.js","?").concat(e)}(),{scope:"/"}).catch(()=>null)),a):Promise.resolve(null));if(!n)return!1;try{let a=await (0,i.LP)(t,{vapidKey:o.ft,serviceWorkerRegistration:n});if(!a)return!1;return await (0,r.Us)(a,e)}catch(e){return!1}}let s=!1;async function d(){if(s)return;let e=await (0,o.WM)();e&&(s=!0,(0,i.ps)(e,e=>{let t=e.data||{},n=t.title||"마코디 신제품",i=t.url||"/home";"Notification"in window&&"granted"===Notification.permission&&(new Notification(n,{body:t.body||"",icon:t.icon||"/images/push-icon.png",data:{url:i}}).onclick=()=>{window.focus(),window.location.href=i})}))}},45209:function(e,t,n){"use strict";n.d(t,{Sv:function(){return r},Us:function(){return o}});var i=n(29918);async function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"web";try{return await i.et.post("/push/subscribe",{token:e,platform:t}),!0}catch(e){return!1}}async function r(){try{var e;let t=await i.et.get("/push/status");return!!(null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.active)}catch(e){return!1}}},71670:function(e,t,n){"use strict";n.d(t,{Rw:function(){return l},Zd:function(){return a},eP:function(){return s},fH:function(){return d},iv:function(){return c}});var i=n(27872),o=n(8668),r=n(45209);let a="mcd:push-prompt",c="mcd:plugin-push-prompt",l="mcd:push-granted-info";function s(e){(0,i.P1)()&&window.dispatchEvent(new CustomEvent(a,{detail:{message:e}}))}async function d(e){if(function(){try{if(window.sketchup||document.documentElement.classList.contains("su-plugin")||"1"===sessionStorage.getItem("__mcd_su"))return!0}catch(e){}return!1}()&&(0,o.kV)()){try{if("1"===localStorage.getItem("mcd_plugin_pushopt_dismissed"))return}catch(e){}try{if(await (0,r.Sv)())return}catch(e){}window.dispatchEvent(new CustomEvent(c,{detail:{message:e}}))}}},9927:function(e,t,n){"use strict";n.d(t,{L:function(){return i},q:function(){return o}});let i="mcd:exhausted-sheet";function o(){window.dispatchEvent(new CustomEvent(i))}},73196:function(e,t,n){"use strict";let i=(0,n(43618).cn)({key:"bookmarkOverridesAtom",default:{}});t.Z=i},17140:function(e,t,n){"use strict";let i=(0,n(43618).cn)({key:"currentFileKey",default:""});t.Z=i},2132:function(e,t,n){"use strict";let i=(0,n(43618).cn)({key:"currentFileName",default:""});t.Z=i},32806:function(e,t,n){"use strict";let i=(0,n(43618).cn)({key:"currentProjectGuid",default:""});t.Z=i},8927:function(e,t,n){"use strict";n.d(t,{db:function(){return o},ik:function(){return a},nZ:function(){return r}});var i=n(29918);let o=async e=>{try{var t;let n=localStorage.getItem("TOKEN");if(!n)return e;let o=await i.et.post("/user/oauth/handoff",{},{headers:{Authorization:"Bearer ".concat(n)}}),r=null==o?void 0:null===(t=o.data)||void 0===t?void 0:t.id;if(!r)return e;let a=new URL(e,window.location.origin);return a.searchParams.set("handoff",String(r)),a.toString()}catch(t){return e}},r=e=>{let t=window;if(t.sketchup||"undefined"!=typeof document&&document.documentElement.classList.contains("su-plugin"))try{var n;if("function"==typeof(null===(n=t.sketchup)||void 0===n?void 0:n.openExternal)){t.sketchup.openExternal(e);return}if("function"==typeof t.__mcdOpenExternal){t.__mcdOpenExternal(e);return}}catch(e){}try{window.open(e,"_blank","noopener,noreferrer,width=1100,height=720,menubar=no,toolbar=no")}catch(e){}},a=async()=>{let e="";try{e=new URLSearchParams(window.location.search).get("handoff")||""}catch(e){return!1}if(!e)return!1;let t=/^[A-Za-z0-9_-]{8,64}$/.test(e);try{let e=new URL(window.location.href);e.searchParams.delete("handoff"),window.history.replaceState(null,"",e.toString())}catch(e){}if(!t)return!1;try{if(localStorage.getItem("TOKEN"))return!1}catch(e){}try{var n;let t=await i.et.get("/user/oauth/handoff/".concat(e)),o=null==t?void 0:null===(n=t.data)||void 0===n?void 0:n.token;if(!o)return!1;return localStorage.setItem("TOKEN",o),i.et.defaults.headers.common.Authorization="Bearer ".concat(o),!0}catch(e){return!1}}},2778:function(){}},function(e){e.O(0,[2461,5676,691,9759,156,6484,3400,8606,1210,1390,3601,8649,2971,2117,1744],function(){return e(e.s=21033)}),_N_E=e.O()}]);