1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44464],{70072:function(e,s,t){t.d(s,{u:function(){return h}});var l=t(57437),a=t(96624),r=t(77471),i=t(36760),n=t.n(i),d=t(2265),c=t(68575);let o=({content:e,init:s})=>{let t=(0,c.v9)(e=>e.commonStore),[a,r]=(0,d.useState)(s||"density");return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"risk-index-desc-tabs",children:Object.entries(e).map(([e,s])=>(0,l.jsx)("button",{className:n()("tab-buttons text-semibold",{on:a===e,"font-blue":a===e}),onClick:()=>r(e),children:s.label},e))}),(0,l.jsx)("div",{className:t?.isPC?"table-box":"",children:e[a].content})]})},h=e=>{let s={density:{label:(0,l.jsxs)(l.Fragment,{children:["경매 ë° ë³´ì¦ì¬ê³ ë°ì ë°ì§ë",(0,l.jsx)(r.default,{src:a.Ge.heatmap,alt:""})]}),content:(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("table",{children:[(0,l.jsx)("colgroup",{children:(0,l.jsx)("col",{width:120})}),(0,l.jsxs)("tbody",{children:[(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ì ì"}),(0,l.jsx)("td",{className:"left",children:"경매ê°ìê²°ì ì¼ ê¸°ì¤ì¼ë¡ 경매 ë°ì ê±´ì를 ì§ê³í ì§í"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ëì"}),(0,l.jsx)("td",{className:"left",children:"ìíí¸, ì¤í¼ì¤í
, ë¨ë
주í, ë¤ê°êµ¬ì£¼í, ëìíìí주í ë± ì£¼ê±°ì© ê±´ë¬¼"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"주기"}),(0,l.jsx)("td",{className:"left",children:"ìê°(ìë§ í¹ì ìµì ì´)"})]})]})]})})},index:{label:(0,l.jsxs)(l.Fragment,{children:["ì ìì¸ ë¦¬ì¤í¬ ì§ì",(0,l.jsx)(r.default,{src:a.Ge.guagechart,alt:""})]}),content:(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("table",{children:[(0,l.jsx)("colgroup",{children:(0,l.jsx)("col",{width:120})}),(0,l.jsxs)("tbody",{children:[(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ì ì"}),(0,l.jsx)("td",{className:"left",children:"íì¬ ê²½ë§¤ ì§í ë¹ì¨, ìµê·¼ 5ë
ë³´ì¦ì¬ê³ ë¹ì¨, ìµê·¼ 3ë
경매 ë°ì ë¹ì¨ì 기ì¤ì¼ë¡ ê°ì¤ì¹ë¥¼ ì ì©í´ ì°ì¶í ì ìì¸ ë¦¬ì¤í¬ ì§ì"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ì°ì "}),(0,l.jsx)("td",{className:"left",children:"íì¬ ê²½ë§¤ ì§í ë¹ì¨(40%) + ìµê·¼ 5ë
ë³´ì¦ì¬ê³ ë¹ì¨(35%) + ìµê·¼ 3ë
과거 경매 ë¹ì¨(25%)"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ëì"}),(0,l.jsx)("td",{className:"left",children:"ìíí¸, ì¤í¼ì¤í
, ë¨ë
주í, ë¤ê°êµ¬ì£¼í, ëìíìí주í ë± ì£¼ê±°ì© ê±´ë¬¼"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"주기"}),(0,l.jsx)("td",{className:"left",children:"ìê°(ìë§ í¹ì ìµì ì´)"})]})]})]})})}};return{title:"ë°ì§ëì ì ìì¸ ë¦¬ì¤í¬ ìì¤ì´ë?",text:(0,l.jsx)(o,{content:s,init:e||"density"})}}},9803:function(e,s,t){var l=t(57437);t(2265),s.Z=({width:e=6,color:s="#3182F6"})=>(0,l.jsx)("svg",{width:e,height:e-1,viewBox:"0 0 6 5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{d:"M3.22798 4.76008L5.56073 0.719944C5.60287 0.646985 5.62505 0.564218 5.62506 0.479965C5.62507 0.395712 5.6029 0.312942 5.56077 0.239975C5.51865 0.167008 5.45806 0.106416 5.38509 0.0642915C5.31212 0.0221666 5.22935 -6.92256e-06 5.1451 -4.19594e-08L0.47999 -4.49796e-07C0.395737 -7.34513e-06 0.312967 0.0221662 0.240001 0.064291C0.167034 0.106416 0.106443 0.167008 0.0643191 0.239974C0.022195 0.312941 2.26465e-05 0.395712 3.04359e-05 0.479965C3.82252e-05 0.564218 0.0222263 0.646984 0.0643639 0.719944L2.39686 4.76008C2.43897 4.83302 2.49955 4.8936 2.5725 4.93571C2.64544 4.97783 2.72819 5 2.81242 5C2.89665 5 2.9794 4.97783 3.05235 4.93571C3.12529 4.8936 3.18587 4.83303 3.22798 4.76008Z",fill:s})})},83297:function(e,s,t){t.d(s,{Ej:function(){return n},Eu:function(){return r},GM:function(){return d},Pg:function(){return o},Xh:function(){return i},rG:function(){return c}});var l=t(87250),a=t(31633);function r(e){return(e??"").replace(/ /g,"-")}function i(e){return e.filter(Boolean).map(r).join("/")}function n(e,s){let t=s.bld_pk||s.tid;if(!t)return"";let r=i([s.sido,s.sgg,(s.emd??"").trim().split(/\s+/)[0]??"",(0,a.D)(s.house_type)]),n=(s.name??"").replace(/ /g,"");return`${l._n}/${r}/${e}/${n?`${n}/`:""}${t}`}let d=e=>n("building",e),c=e=>n("building-auction",e),o=e=>n("building-public-auction",e)},31633:function(e,s,t){t.d(s,{D:function(){return a}});let l=["ìíí¸","ì¤í¼ì¤í
","ë¹ë¼","ë¤ê°êµ¬"];function a(e){let s=(e??"").trim();return s.includes("ë¤ì¸ë")?"ë¹ë¼":s.includes("ë¨ë
")?"ë¤ê°êµ¬":l.find(e=>s.includes(e))??"기í"}},91971:function(e,s,t){t.d(s,{Z:function(){return n}});
1var l=t(57437),a=t(2265);let r=!"https://safehomes.kr".includes("safehomes.kr"),i=(e,s,t,l)=>{let a=function(){let e=window;return e.__riskmapProfileStats||(e.__riskmapProfileStats=new Map,e.__riskmapProfile=()=>{let s=[];e.__riskmapProfileStats?.forEach((e,t)=>{s.push({id:t,count:e.count,maxActual:Number(e.maxActual.toFixed(2)),avgActual:Number((e.totalActual/e.count).toFixed(2)),mountMax:Number(e.byPhase.mount.maxActual.toFixed(2)),updateMax:Number(e.byPhase.update.maxActual.toFixed(2))})}),console.table(s)}),e.__riskmapProfileStats}(),r=a.get(e)??{count:0,maxActual:0,totalActual:0,byPhase:{mount:{count:0,maxActual:0},update:{count:0,maxActual:0},"nested-update":{count:0,maxActual:0}}};r.count+=1,r.totalActual+=t,r.maxActual=Math.max(r.maxActual,t);let i=r.byPhase[s];i.count+=1,i.maxActual=Math.max(i.maxActual,t),a.set(e,r),t>16&&console.warn(`[RenderProfiler] SPIKE ${e} (${s}) actual=${t.toFixed(1)}ms base=${l.toFixed(1)}ms`)};function n({id:e,children:s}){return r?(0,l.jsx)(a.Profiler,{id:e,onRender:i,children:s}):(0,l.jsx)(l.Fragment,{children:s})}},52289:function(e,s,t){var l=t(57437),a=t(2265),r=t(36760),i=t.n(r),n=t(62306),d=t(99376),c=t(67428),o=t(87250);function h({select_list:e,onClick:s,placeholder:t,initial_selected:r,is_duplicate_hoNm:n=!1}){let[d,c]=(0,a.useState)(!1),[o,h]=(0,a.useState)(r),x=(0,a.useRef)();return(0,a.useEffect)(()=>{let e=e=>{x.current&&!x.current.contains(e.target)&&c(!1)};return d&&document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}},[d]),(0,l.jsxs)("div",{className:"input-border-wrap",ref:x,children:[(0,l.jsx)("div",{className:i()("label select",{on:e.length>0,open:d}),onClick:s=>{s.preventDefault(),x.current&&e.length>0&&c(e=>!e)},children:(0,l.jsx)("span",{children:o?o.hoNm?o.hoNm:o:r||t})}),(0,l.jsx)("div",{className:"custom-select custom-select--small",children:d&&(0,l.jsx)("ul",{className:"options",children:e.map((e,t)=>(0,l.jsxs)("li",{onClick:t=>{c(!1),h(e),s(e)},children:[e.hoNm?`${e.hoNm} `:e,e.hoNm&&n&&`(${Number(e.mnnm)}${Number(e.slno)>0?`-${Number(e.slno)}`:""}ë²ì§)`]},t))})})]})}s.Z=({data_list:e,srchAdrs:s="",initialAdrs:t})=>{let r=!1,[i,x]=(0,a.useState)(null),[m,j]=(0,a.useState)(null),[u,p]=(0,a.useState)(null),g=(0,d.useSearchParams)(),f=g?.get("q"),{MovePage:b}=(0,c.Z)(),_=(0,a.useMemo)(()=>{let s=Array.from(new Set(e.map(e=>e.dongNm?.replace(/\s/g,"")?e.dongNm:"ë ìì"))),t=s.filter(e=>""!==e&&!isNaN(Number(e))).map(Number),l=s.filter(e=>""===e||isNaN(Number(e)));return t.sort((e,s)=>e-s),l.sort((e,s)=>e.localeCompare(s)),[...t.map(String),...l]},[e]),N=(0,a.useMemo)(()=>{if(!i)return[];let s=Array.from(new Set(e.filter(e=>(e.dongNm?.replace(/\s/g,"")?e.dongNm:"ë ìì")===i).map(e=>(0,n.Vl)(e.hoNm))));return(0,n.OZ)(s).map(e=>`${e}층`)},[i]),y=(0,a.useMemo)(()=>{if(!i||!m)return[];let s=m.replace("층",""),t=e.filter(e=>(e.dongNm?.replace(/\s/g,"")?e.dongNm:"ë ìì")===i).filter(e=>(0,n.Vl)(e.hoNm)===s).map(e=>{let s={...e};return s.hoNm?s.hoNm=`${s.hoNm.replace("í¸","")}í¸`:s.hoNm="í¸ëª
ì¹ìì",s}),l={};return t.forEach(e=>{let s=e.hoNm;if(l[s]=(l[s]||0)+1,2===l[s]){r=!0;return}}),t.sort((e,s)=>Number(e.hoNm)-Number(s.hoNm))},[m]);return(0,a.useEffect)(()=>{let{bld_data:e}=t;t&&!i&&(x(e?.dongNm),j((0,n.Vl)(e?.hoNm)+"층"),p(e?.hoNm||"í¸ëª
ì¹ìì"))},[t]),(0,l.jsx)(l.Fragment,{children:_.length>0&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"flex-row detail-addr-select-group",children:[(0,l.jsx)(h,{select_list:_,onClick:e=>{x(e),j("")},initial_selected:i,placeholder:"ë ì
ë ¥"}),(0,l.jsx)(h,{select_list:N,initial_selected:m,onClick:e=>{j(e)},placeholder:"층 ì
ë ¥"}),(0,l.jsx)(h,{initial_selected:u,select_list:y,onClick:e=>{let t=(s||f).replace(/ /g,"-"),l=e?.bldrgstSeqno;b({href:`${o.h0}/${t}${l?`/${l}`:""}`})},placeholder:"í¸ ì
ë ¥",is_duplicate_hoNm:r})]})})})}},89632:function(e,s,t){t.r(s),t.d(s,{AccidentSideDialog:function(){return et},AreaInsightBanner:function(){return ee},AreaRiskSection:function(){return Q},GetReportSection:function(){return J},NearAuctionSection:function(){return es},SectionScrollTabs:function(){return K},default:function(){return W}});
1var l=t(57437),a=t(96624),r=t(84655),i=t(62306),n=t(77398),d=t.n(n);t(43819);var c=t(2265),o=t(36760),h=t.n(o),x=t(77471),m=t(40089),j=t(67428),u=t(23573),p=t(88055),g=t(28935),f=t(66796),b=t(68575),_=t(22007),N=t(89087),y=t(30166),v=t(52289),w=t(83297),k=t(73698),$=t(82376),S=t(9803),C=t(45105),F=t(87250),M=t(27589),A=t(70072),D=t(27781),P=t(25966),I=t(78848),E=t(96881),Z=t(8946),q=t(12416);function T({classname:e=""}){return(0,l.jsxs)(M.default,{href:F.MQ,className:h()("border-box",e),children:[(0,l.jsxs)("div",{className:"flex-col left",children:[(0,l.jsx)("p",{children:"본 ì ë³´ë ê³µì 기ë¡ì 기ì¤ì¼ë¡ ì ê³µë©ëë¤."}),(0,l.jsxs)("span",{className:"a flex-row font-blue",children:["ì ì \xb7ë¹ë
¸ì¶ ê¸°ì¤ íì¸",(0,l.jsx)(r.Z,{color:"#003478",width:5})]})]}),(0,l.jsx)("div",{className:"rounded-bg",children:(0,l.jsx)(x.default,{src:a._s.doc_b,alt:""})})]})}var R=t(77646);let O=(0,y.default)(()=>Promise.all([t.e(70930),t.e(41766)]).then(t.bind(t,41766)),{loadableGenerated:{webpack:()=>[41766]},ssr:!1}),L=(0,y.default)(()=>t.e(59009).then(t.bind(t,59009)),{loadableGenerated:{webpack:()=>[59009]}}),B=(0,y.default)(()=>Promise.all([t.e(70930),t.e(74577)]).then(t.bind(t,74577)),{loadableGenerated:{webpack:()=>[74577]},ssr:!1}),Y={1:{title:"경매 ì§í ì¤"},2:{title:"경매 ìì "},3:{title:"매ê°ê³µê³ ì "},4:{title:"공매 ì§í ì¤"},5:{title:"과거 경매 ì´ë ¥"},6:{title:"HUG ë³´ì¦ì¬ê³ "}};function W({building:e,b_code:s="",juso:t=""}){let[r]=(0,N.fP)(["homes_session"]),i=e.auction_data||e.accident_auction_data,n=(0,C.wf)(),[d,o]=(0,c.useState)({category:0,history:0}),m=[!!i?.state&&[[],["ì§íì¤","ì ì°°"],["ë기","ìì "],["ì ê±´"]].findIndex(e=>e.some(e=>e.includes(i?.state))),i?.is_hug_accident&&"6",(e?.auction_history||[]).length>0&&5].filter(Boolean),u=m.length>1&&4===m[1],p=(0,c.useMemo)(()=>{let s=1===d.category?e?.auction_history[d.history]:i?.tid?i:e?.auction_history[d.history];return s?{...s,is_public:!!e?.is_public}:s},[d.category,d.history,i,e]),[g,f]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let e=requestAnimationFrame(()=>f(!0));return()=>cancelAnimationFrame(e)},[]);let[b,_]=(0,c.useState)(!1),{MovePage:y}=(0,j.Z)();return(0,l.jsxs)(l.Fragment,{children:[r.homes_session&&(0,l.jsx)(et,{building:e,is_open:b,set_open:_}),(0,l.jsx)(L,{building:e,children:(0,l.jsx)("button",{onClick:()=>{r.homes_session?_(!0):y({href:location.pathname+"?login=false",is_login:!0})},children:(0,l.jsx)(x.default,{src:a.qx.dots,alt:"",style:{width:"18px"}})})}),(0,l.jsxs)("main",{id:"AccidentDetail",children:[(0,l.jsx)(O,{map:n,query:e?.srchAdrs,is_search:!s}),(0,l.jsx)(z,{bld_data:e,b_code:s,juso:t}),u&&(0,l.jsx)("div",{className:"small-tabs category",children:(0,l.jsx)("ul",{children:m.map((e,s)=>(0,l.jsx)("li",{className:h()(d.category===s&&"on"),onClick:()=>{o({category:s,history:0})},children:Y[e].title},`accident_status_card_${s}`))})}),e?.auction_history.length>1&&(0,l.jsx)("ul",{className:"tabs-history",children:e?.auction_history.map((e,s)=>l.jsx("li",{className:h()(d.history===s&&"on"),onClick:()=>{o(e=>({...e,history:s}))},children:e.iniDt},`accident_auction_history_${s}`))}),(0,l.jsx)(X,{auction_data:p,status:m[d.category],bld_data:e?.bld_data}),(0,l.jsx)(K,{isPublic:!!i?.is_public,area:e?.risk_data?.emd,deferReady:g}),g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(U,{auction_data:p,status:m[d.category]}),(0,l.jsx)(es,{type:"jibun",sectionIdx:4,auction_data:p,area:{sido:e?.sido,sgg:e?.sgg,emd:e?.emd,bld_type:e?.bld_type}},`near-jibun-${p?.tid}`),(0,l.jsx)(es,{type:"near",sectionIdx:5,auction_data:p,area:{sido:e?.sido,sgg:e?.sgg,emd:e?.emd,bld_type:e?.bld_type,b_code:e?.b_code}},`near-near-${p?.tid}`),(0,l.jsx)(es,{type:"near_info",sectionIdx:6,auction_data:p,area:{sido:e?.sido,sgg:e?.sgg,emd:e?.emd,bld_type:e?.bld_type,b_code:e?.b_code}},`near-near_info-${p?.tid}`),(0,l.jsx)(J,{additional:{short_addr:e?.srchAdrs,is_dasaedae:e?.is_dasaedae,bld_pk:e?.bld_pk,addr:e?.roadAdrs||e?.adrs_info},juso_data:e?.juso_data,status_card:m}),e?.risk_data&&(0,l.jsx)(Q,{risk_data:e?.risk_data,address:e?.srchAdrs||e?.roadAdrs||"",bld_type:e?.bld_type,area:[e?.sido,e?.sgg,e?.emd].filter(e=>e).join(" "),near_list:e?.near_list,tid:i?.tid,is_public:i?.is_public})]})]})]})}let G=[{title:"ì§í íí©",idx:0},{title:"í ì§/건물 íí©",idx:1},{title:"ìì°¨ì¸ íí©",idx:2},{title:"건물ë±ê¸°",idx:3},{title:"ëì¼ì§ë² ë§¤ê° ë¬¼ê±´",idx:4},{title:"ì¸ê·¼ ë§¤ê° ë¬¼ê±´",idx:5},{title:"ì¸ê·¼ ì§í ì ë³´",idx:6},{title:"ëë¤ ì ë³´",idx:7}],H=[{title:"ì
ì°° ì¼ì ",idx:0},{title:"ì
ì°° ì´ë ¥",idx:1},{title:"ë©´ì ì ë³´",idx:2},{title:"ê°ì íê°ì ë³´",idx:3},{title:"첨ë¶íì¼",idx:4},{title:"ì¸ê·¼ ì§í ì ë³´",idx:5},{title:"ëë¤ ì ë³´",idx:6}],K=({isPublic:e,area:s,deferReady:t=!0})=>{let a=(0,b.v9)(e=>e.commonStore),r=a?.isPC,i=e?H:G,[n,d]=(0,c.useState)(i),[o,x]=(0,c.useState)(i[0].idx),m=(0,c.useRef)(null);(0,c.useEffect)(()=>{let e=i.filter(e=>!!document.querySelector(`#AccidentDetail section[data-section-id
1x="${e.idx}"]`));d(s=>s.length===e.length&&s.every((s,t)=>s.idx===e[t].idx)?s:e),e.length>0&&x(e[0].idx)},[e,t]);let j=(0,c.useCallback)(e=>{let s=m.current;if(!s)return;let t=s.querySelector(`[data-idx="${e}"]`);t&&s.scrollTo({left:t.offsetLeft-s.clientWidth/2+t.offsetWidth/2,behavior:"smooth"})},[]),u=(0,c.useCallback)(e=>{let s=document.getElementById("AccidentDetail")?.closest(r?".side_toggle_content":".PageTemplate"),t=document.querySelector(`#AccidentDetail section[data-section-idx="${e}"]`);if(!t||!s)return;let l=s.scrollTop+t.getBoundingClientRect().top-s.getBoundingClientRect().top-70;s.scrollTo({top:l,behavior:"smooth"})},[r]);return((0,c.useEffect)(()=>{j(o)},[o,j]),(0,c.useEffect)(()=>{if(!n.length)return;let e=new IntersectionObserver(e=>{let s=e.filter(e=>e.isIntersecting);s.length&&x(Number(s.reduce((e,s)=>e.boundingClientRect.top<s.boundingClientRect.top?e:s).target.dataset.sectionIdx))},{root:document.getElementById("AccidentDetail")?.closest(".side_toggle_content")??null,rootMargin:"-55px 0px -40% 0px",threshold:0});return n.forEach(({idx:s})=>{let t=document.querySelector(`#AccidentDetail section[data-section-idx="${s}"]`);t&&e.observe(t)}),()=>e.disconnect()},[n]),n.length)?(0,l.jsx)("div",{className:"small-tabs c sticky",children:(0,l.jsx)("ul",{ref:m,children:n.map((e,t,a)=>{let r=e.title;return t===a.length-1&&s&&(r=s+" "+r),(0,l.jsx)("li",{"data-idx":e.idx,className:h()("tab",{on:o===e.idx}),onClick:()=>{x(e.idx),u(e.idx)},children:r},e.idx)})})}):null},X=(0,c.memo)(({auction_data:e,status:s,bld_data:t})=>{let{set_img_arr:n}=(0,m.useModal)(),d=(0,c.useRef)(null),o=(0,c.useRef)({active:!1,startX:0,scrollLeft:0,moved:!1,velocity:0,lastX:0,lastTime:0,animFrame:0});(0,c.useEffect)(()=>()=>cancelAnimationFrame(o.current.animFrame),[]);let h=()=>{let e=d.current;if(!e)return;o.current.active=!1,e.style.cursor="grab",e.style.userSelect="";let s=20*o.current.velocity,t=()=>{!d.current||.3>Math.abs(s)||(d.current.scrollLeft-=s,s*=.92,o.current.animFrame=requestAnimationFrame(t))};o.current.animFrame=requestAnimationFrame(t)};return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("section",{className:"summary-section","aria-label":"건물 기본 ì ë³´",children:[(0,l.jsxs)("div",{className:"flex-row start",children:[(0,l.jsxs)("div",{className:"section-title",children:[(0,l.jsxs)("h2",{children:[(0,l.jsx)("span",{className:"font-red",children:"경매"}),"\xa0",e.saNo]}),e.crtInfo&&(0,l.jsxs)("div",{className:"flex-row left font-light-gray text-regular mt5",style:{fontSize:"13px",gap:"8px"},children:[(0,l.jsx)(x.default,{src:a._s.court_g,alt:""}),e.crtInfo]})]}),t&&(0,l.jsx)("button",{className:"link",children:(0,l.jsxs)(M.default,{href:(0,w.GM)({sido:t.sido,sgg:t.sgg,emd:t.emd,house_type:t.house_type,name:t.bld_name,bld_pk:t.bld_pk}),className:"flex-row",children:["ìì¸ \xb7건물 ì ë³´ íì¸",(0,l.jsx)(r.Z,{width:5,color:"#555"})]})})]}),5==s?(0,l.jsxs)("div",{className:"history-masking",children:[(0,l.jsxs)("div",{className:"mask",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)(x.default,{src:a.DC.alert_blue,alt:""}),"ì´ë¯¸ ì¢
ë£ë 경매 물건ì
ëë¤."]}),(0,l.jsxs)("p",{children:["과거 경매 ì´ë ¥ íì¸ì ìí ì°¸ê³ ì ë³´ì
ëë¤.",(0,l.jsx)("br",{}),"íì¬ ê³ì½ ìí를 ì미íì§ ììµëë¤."]})]}),(e?.frontImgs||[]).length>0&&(0,l.jsx)(x.default,{src:e?.frontImgs[0],alt:""})]}):(e?.frontImgs||[]).length>0&&(0,l.jsx)("div",{ref:d,className:"flex-row left",style:{overflow:"auto",width:"calc(100% + 20px)",cursor:"grab"},onMouseDown:e=>{let s=d.current;s&&(cancelAnimationFrame(o.current.animFrame),o.current={active:!0,startX:e.pageX-s.offsetLeft,scrollLeft:s.scrollLeft,moved:!1,velocity:0,lastX:e.pageX,lastTime:Date.now(),animFrame:0},s.style.cursor="grabbing",s.style.userSelect="none")},onMouseMove:e=>{if(!o.current.active)return;let s=d.current;if(!s)return;let t=Date.now(),l=t-o.current.lastTime;l>0&&(o.current.velocity=(e.pageX-o.current.lastX)/l),o.current.lastX=e.pageX,o.current.lastTime=t;let a=e.pageX-s.offsetLeft-o.current.startX;Math.abs(a)>3&&(o.current.moved=!0),s.scrollLeft=o.current.scrollLeft-a},onMouseUp:h,onMouseLeave:h,children:(e?.frontImgs||[]).map((s,t)=>(0,l.jsx)(c.Fragment,{children:(0,l.jsx)("div",{className:"preview-section",style:{width:"80%",flexShrink:"0"},onClick:()=>{o.current.moved||n({arr:e?.frontImgs,idx:t,just_watch:!0})},children:(0,l.jsx)(x.default,{src:s,alt:""},`preview-${t}`)})},`preview-${t}`))}),(0,l.jsxs)("dl",{className:"common-info-list",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ëì§ê¶"}),(0,l.jsx)("dd",{children:e.landAreaInfo||"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"건물면ì "}),(0,l.jsx)("dd",{children:e.bldgAreaInfo})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ê°ìê²°ì "}),(0,l.jsx)("dd",{children:e.iniInfo})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ìì ì / ì±ë¬´ì"}),(0,l.jsx)("dd",{children:e.ownerDebtorInfo})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ì±ê¶ì"}),(0,l.jsx)("dd",{children:e.creditor})]}),(0,l.jsx)("div",{className:"bt-dashed"}),1!==s&&(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ì²êµ¬ê¸ì¡"}),(0,l.jsx)("dd",{children:e.billAmt?(0,i.dN)(e.billAmt):"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ê°ì ê°"}),(0,l.jsx)("dd",{children:e.apslAmt?(0,i.dN)(e.apslAmt):"미íì "})]}),e?.sucbAmt?(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"매ê°ê°"}),(0,l.jsxs)("dd",{className:"flex-row left",style:{gap:"8px"},children:[(0,i.dN)(e?.sucbAmt),e?.sucbAmt&&e?.sucbAmt<e.apslAmt?(0,l.jsxs)("span",{className:"decrease text-medium",children:[(0,l.jsx)(S.Z,{width:7}),parseFloat(((e.apslAmt-e?.sucbAmt)/e.apslAmt*100).toFixed(1)),"%"]}):e?.sucbAmt>e.apslAmt?(0,l.jsxs)("span",{className:"increase text-medium",children:[(0,l.jsx)(S.Z,{width:7,color:"#D84315"}),parseFloat((Math.abs(e?.sucbAmt-e.apslAmt)/e.apslAmt*100).toFixed(1)),"%"]}):(0,l.jsx)(l.Fragment,{})]})]}):!!e.minbAmt&&(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ìµì ê°"}),(0,l.jsxs)("dd",{className:"flex-row left",style:{gap:"8px"},children:[(0,i.dN)(e.minbAmt),e.minbAmt&&e.minbAmt<e.apslAmt&&(0,l.jsxs)("span",{className:"decrease text-medium",children:[(0,l.jsx)(S.Z,{width:7}),parseFloat((Math.abs(e.apslAmt-e.minbAmt)/e.apslAmt*100).toFixed(1)),"%"]})]})]})]})]})})}),z=({bld_data:e,b_code:s="",juso:t=""})=>{let{buildingList:i=[]}=e,{MovePage:n}=(0,j.Z)(),{ChangeContextMenu:d}=(0,m.useModal)(),o=e=>e&&0===Object.keys(e).length?void 0:e,u=o(e.auction_data)||o(e.accident_auction_data)||o(e.auction_history[0]),p=[!!u?.state&&([[],["ì§íì¤","ì ì°°"],["ë기","ìì "],["ì ê±´"]].findIndex(e=>e.some(e=>e.includes(u?.state)))||!1),u?.is_hug_accident&&"6",(e?.auction_history||[]).length>
10&&5].filter(Boolean);return(0,l.jsxs)("section",{className:"main-section","aria-label":"건물 기본 ì ë³´",children:[(0,l.jsx)("div",{className:"location-data",children:[e.sido,e.sgg,e.emd,e.bld_type].filter(e=>e.length>0).map((e,s,t)=>(0,l.jsxs)(c.Fragment,{children:[0===s&&(0,l.jsx)(x.default,{src:a._s.location,alt:""}),(0,l.jsx)("span",{className:String(3===s&&"text-semibold"),children:e}),s<t.length-1&&(0,l.jsx)(r.Z,{color:"#999"})]},s))}),(0,l.jsxs)("div",{className:h()("flex-row left",{click:i.length>1&&!!s}),onClick:t=>{if(i.length>1&&s){let s=t.currentTarget.getBoundingClientRect();d({top:s.top+s.height+"px",left:s.left+"px",style:{transform:"initial",minWidth:s.width+"px"},buttons:i.map(s=>({button:(0,l.jsx)("button",{className:"small",children:s.adrsInfo}),onClick:()=>{n({href:(s.is_public?w.Pg:w.rG)({sido:e.sido,sgg:e.sgg,emd:e.emd,house_type:e.house_type??e.bld_type,name:e.bld_name,tid:s.tid})}),d(null)}}))})}},children:[(0,l.jsx)("h1",{children:e?.adrs_info||e?.address}),i.length>1&&!!s&&(0,l.jsx)("button",{className:"additional","aria-label":"건물 ì í",children:(0,l.jsx)(r.Z,{color:"#1d1d1d",width:6})})]}),e?.all_bld_data&&e?.all_bld_data.length>1&&(0,l.jsx)(v.Z,{data_list:e?.all_bld_data,srchAdrs:e?.srchAdrs,initialAdrs:e?.juso_data}),(0,l.jsx)("div",{className:"status_card_wrap",children:p.length>0?p?.map((e,s)=>Y[e]&&l.jsxs("div",{className:h()("status_card",`risk-${e}`),children:[l.jsx("div",{className:"icon"}),l.jsx("div",{children:Y[e].title})]},`risk_status_card_${s}`)):(0,l.jsxs)("div",{className:h()("status_card","risk-0"),children:[(0,l.jsx)("div",{className:"icon"}),(0,l.jsx)("div",{children:"ì¶ê° íì¸ íì"})]})})]})},U=(0,c.memo)(({auction_data:e,status:s})=>{let{leasInfo:t=[],histInfo:a=[],progressInfo:r=[],landBldgInfo:n=[],tenantInfo:c,buildingRegistry:o}=e??{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("section",{className:"conent-section","aria-label":"íµì¬ ìì½","data-section-idx":0,children:[(0,l.jsx)("div",{className:"flex-row",children:(0,l.jsx)("h2",{className:"section-title",children:"ì§í íí©"})}),e?.tid?(0,l.jsx)("dl",{className:"common-info-list",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ì§í ìí"}),(0,l.jsx)("dd",{children:e.state})]})}):(0,l.jsxs)("dl",{className:"common-info-list",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ìì¸ ëë¹ ë³´ì¦ê¸"}),(0,l.jsx)("dd",{children:"ì¶ê° íì¸ íì"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ìëì¸ ì ë³´"}),(0,l.jsx)("dd",{children:"ì¶ê° íì¸ íì"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ë±ê¸°/ê±´ì¶ë¬¼"}),(0,l.jsx)("dd",{children:"ì¶ê° íì¸ íì"})]})]}),a.length>0&&(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"구ë¶"}),(0,l.jsx)("th",{children:"ìµì ê°"}),(0,l.jsx)("th",{children:"ê²°ê³¼"})]})}),(0,l.jsx)("tbody",{children:a?.map((s,t)=>{let a="ëì°°"===s.staNm&&s.dtl?(()=>{let e=s.dtl.split("/");if(e.length<=1)return s.dtl;let t=e[e.length-1].replace(/[^\s]/g,"0");return[...e.slice(0,-1),t].join("/")})():s.dtl;return s.amt?l.jsxs("tr",{className:s.bgClr,children:[l.jsxs("td",{children:[s.seqNm||"-",s.bidDt&&l.jsx("small",{children:d()(s.bidDt).format("YYYY.MM.DD")})]}),l.jsxs("td",{children:[i.dN(s.amt),s.amt&&s.amt<e.apslAmt&&l.jsxs("small",{className:"decrease",children:[l.jsx(S.Z,{}),parseFloat(((e.apslAmt-s.amt)/e.apslAmt*100).toFixed(1)),"%"]})]}),l.jsxs("td",{children:[s.staNm||l.jsx("span",{className:"font-light-gray",children:"-"}),a&&l.jsx("small",{children:a})]})]},`auction-history-${t}`):l.jsx("tr",{children:l.jsx("td",{className:"str",colSpan:3,dangerouslySetInnerHTML:{__html:a}})},`auction-history-${t}`)})})]})}),(0,l.jsxs)("details",{children:[(0,l.jsx)("summary",{children:(0,l.jsx)("span",{className:"text-medium",children:"ì§í ì ì°¨"})}),(0,l.jsx)("div",{children:r.length>0&&(0,l.jsx)("div",{className:"table-box mt10",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ì ì°¨"}),(0,l.jsx)("th",{children:"ì¼ì"}),(0,l.jsx)("th",{children:"경과ì¼"})]})}),(0,l.jsx)("tbody",{children:r?.map((e,s)=>l.jsxs("tr",{className:e.bgClr,children:[l.jsx("td",{children:e?.["ì ì°¨"]||l.jsx("span",{className:"font-light-gray",children:"-"})}),l.jsxs("td",{children:[e?.["ì¼ì"],e?.["ì°¨ì"]&&l.jsx("small",{children:e?.["ì°¨ì"]})]}),l.jsx("td",{children:e?.["경과ì¼"]||l.jsx("span",{className:"font-light-gray",children:"-"})})]},`auction-progress-${s}`))})]})})})]})]}),n?.unitPrices.length>0&&(0,l.jsxs)("section",{"aria-label":"í ì§/건물 íí©","data-section-id
1x":1,children:[(0,l.jsx)("div",{className:"flex-row",children:(0,l.jsx)("h2",{className:"section-title",children:"í ì§/건물 íí©"})}),(0,l.jsx)("dl",{className:"common-info-list",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ê°ì ê°"}),(0,l.jsx)("dd",{children:n.apslAmt?(0,i.dN)(n.apslAmt):"-"})]})}),n.items.length>0&&(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsx)("tr",{children:Object.keys(n.items?.[0]||{}).map(e=>(0,l.jsx)("th",{children:e},`landbld-info-th-${e}`))})}),(0,l.jsx)("tbody",{children:n.items.map((e,s)=>(0,l.jsx)("tr",{children:Object.values(e).map((e,s,t)=>(0,l.jsx)("td",{children:s==t.length-1&&e?(0,i.dN)(e):e||"-"},`landbld-info-td-${s}}`))},s))})]})}),(0,l.jsx)("dl",{className:"common-info-list",children:(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ê°ê²©ë¹"}),(0,l.jsx)("dd",{children:n.ratio||"-"})]})}),n.unitPrices?.length>0&&(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsx)("tr",{children:Object.keys(n.unitPrices?.[0]).map(e=>(0,l.jsx)("th",{children:e},e))})}),(0,l.jsx)("tbody",{children:n.unitPrices.map((e,s)=>(0,l.jsx)("tr",{children:Object.values(e).map((e,t,a)=>(0,l.jsx)("td",{children:t==a.length-1&&e?(0,i.dN)(e):e||"-"},`land-unit-price-${s}-${t}`))},s))})]})}),(0,l.jsxs)("dl",{className:"common-info-list",children:[n.apslNm&&(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ê°ì ì"}),(0,l.jsx)("dd",{children:n.apslNm})]}),n.apslDt&&(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ê°ê²©ìì "}),(0,l.jsx)("dd",{children:n.apslDt})]}),n.prsvDt&&(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ë³´ì¡´ë±ê¸°ì¼"}),(0,l.jsx)("dd",{children:n.prsvDt})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ê³µìê°ê²©"}),(0,l.jsxs)("dd",{className:"flex-row",children:[n.gondongPrice,(0,l.jsx)("small",{className:"font-light-gray",children:n.gondongBase})]})]})]})]}),n.slEnvrn.length>0&&(0,l.jsx)("section",{"aria-label":"íí©/ìì¹/주ë³íê²½",children:(0,l.jsxs)("details",{children:[(0,l.jsx)("summary",{children:(0,l.jsx)("span",{className:"font-medium",children:"íí©/ìì¹/주ë³íê²½"})}),(0,l.jsx)("div",{children:(0,l.jsx)("ul",{className:"dot-list mt10",children:n.slEnvrn.split("\r\n").map((e,s)=>(0,l.jsx)("li",{style:{color:"#555",fontSize:"14px"},dangerouslySetInnerHTML:{__html:e.replace("* ","")}},s))})})]})}),c?.items.length>0&&(0,l.jsxs)("section",{"aria-label":"ìì°¨ì¸ íí©","data-section-idx":2,children:[(0,l.jsx)("div",{className:"flex-row",children:(0,l.jsx)("h2",{className:"section-title",children:"ìì°¨ì¸ íí©"})}),(0,l.jsx)("dl",{className:"common-info-list",children:["ë§ì기ì¤ì¼","ìì¡ê¸°ì¤ì¼","ë°°ë¹ì구ì¢
기ì¼"].map(e=>c?.[e]&&(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:e}),(0,l.jsx)("dd",{children:c?.[e]})]},e))}),(0,l.jsxs)(ea,{content:{title:"ìì°¨ì¸ íí©",desc:"ì ì
\xb7íì ì¼ì\xb7ë°°ë¹\xb7ëíë ¥ ë±\nìì¸ ì ë³´ë ë¡ê·¸ì¸ í íì¸í ì ììµëë¤."},children:[(0,l.jsx)("div",{className:"table-box",style:{overflow:"auto"},children:(0,l.jsxs)("table",{style:{width:"max-content"},children:[(0,l.jsx)("thead",{children:(0,l.jsx)("tr",{children:Object.keys(c?.items?.[0]).map(e=>(0,l.jsx)("th",{style:{paddingRight:"10px",paddingLeft:"10px"},children:e},e))})}),(0,l.jsx)("tbody",{children:(c?.items).map((e,s)=>(0,l.jsx)("tr",{children:Object.values(e).map((e,s,t)=>!!e&&(0,l.jsx)("td",{colSpan:1===t.filter(e=>!!e).length?t.length:void 0,style:{whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:e}},s))},`tenant-info-${s}`))})]})}),c?.["기íì¬í"].length>0&&(0,l.jsxs)("details",{className:"mt25",open:!0,children:[(0,l.jsx)("summary",{children:(0,l.jsx)("span",{className:"font-medium",children:"기íì¬í"})}),(0,l.jsx)("div",{children:(0,l.jsx)("ul",{className:"dot-list mt10",children:c?.["기íì¬í"].split("\r\n").map((e,s)=>l.jsx("li",{style:{color:"#555",fontSize:"14px"},dangerouslySetInnerHTML:{__html:e.replace("* ","")}},s))})})]})]})]}),o?.items.length>0&&(0,l.jsxs)("section",{"aria-label":"건물 ë±ê¸°","data-section-id
1x":3,children:[(0,l.jsx)("div",{className:"flex-row",children:(0,l.jsx)("h2",{className:"section-title",children:"건물 ë±ê¸°"})}),(0,l.jsx)("dl",{className:"common-info-list",children:["ì±ê¶í©ê³ê¸ì¡"].map(e=>(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:e}),(0,l.jsx)("dd",{children:(0,i.dN)(o?.[e])||"-"})]},e))}),(0,l.jsxs)(ea,{content:{title:"건물\xb7í ì§ ë±ê¸° íí©",desc:"ìì ê¶\xb7ê¶ë¦¬ê´ê³\xb7ë±ê¸° ì ë³´ ë±\nìì¸ ì ë³´ë ë¡ê·¸ì¸ í íì¸í ì ììµëë¤."},children:[(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsx)("tr",{children:["ìì","ì ìì¼","ê¶ë¦¬ì¢
ë¥"].map(e=>(0,l.jsx)("th",{children:e},e))})}),(0,l.jsx)("tbody",{children:(o?.items).map((e,s)=>(0,l.jsx)("tr",{children:["ìì","ì ìì¼","ê¶ë¦¬ì¢
ë¥"].map(s=>(0,l.jsx)("td",{children:e?.[s]},`td-${s}`))},s))})]})}),o?.["주ìì¬í"].length>0&&(0,l.jsxs)("details",{className:"mt25",open:!0,children:[(0,l.jsx)("summary",{children:(0,l.jsx)("span",{className:"font-medium",children:"주ìì¬í"})}),(0,l.jsx)("div",{children:(0,l.jsx)("ul",{className:"dot-list mt10",children:o?.["주ìì¬í"].split("\r\n").map((e,s)=>l.jsx("li",{style:{color:"#555",fontSize:"14px"},dangerouslySetInnerHTML:{__html:e.replace("* ","")}},`building-registry-${s}`))})})]})]})]})]})}),V={addr:"",deposit:null,rent_price:null,senior:null,senior_check:!1,contract_status:!1},J=({juso_data:e,status_card:s,additional:t})=>{let[a]=(0,N.fP)(["homes_session"]),[r,n]=(0,c.useState)(V),[d,o]=(0,c.useState)(!1),[h,x]=(0,c.useState)(e),y=(0,b.v9)(e=>e.commonStore),v={1:"ì´ ì§ì íì¬ ê²½ë§¤ê° ì§í ì¤ì
ëë¤.",10:"ì´ ì§ì íì¬ ê³µë§¤ê° ì§í ì¤ì
ëë¤.",4:"ì´ ì§ì 과거 경매 ì´ë ¥ì´ ììµëë¤.",50:"ì´ ì§ì 과거 공매 ì´ë ¥ì´ ììµëë¤.",5:"ì´ ê±´ë¬¼ìì ë³´ì¦ê¸ì ëë ¤ì£¼ì§ ëª»í ì¬ë¡ê° ììµëë¤."},w=(0,b.I0)(),{ChangeConfirmNotice:S}=(0,m.useModal)(),{external_url:C}=(0,f.Z)();function M(e){w((0,_.CH)(e))}let{MovePage:A}=(0,j.Z)(),D=(0,R._b)(),{mutate:P}=(0,p.gg)({onSuccess:e=>{if(e?.data?.reason_code||e?.data?.error)D(e?.data);else{let s=e.data.result;x(s),q(s)}},onError:e=>{let s=e&&e.response&&e.response.data.error;(0,g.e)(S,s,C)}}),I=(e=null)=>{let s={...e||h,...t,contract_status:"ê³ì½ ì ",deposit:Number(r.deposit),rent_price:r.rent_price&&Number(r.rent_price),debt_prior_tenant:r.senior?Number(r.senior):r.senior,is_insurance:!1},a=()=>{let e=document.querySelector("dialog.ReportPreForm");s&&(M({addr:s}),e&&(e.dataset.service="risk",e.dataset.addr=JSON.stringify(s),e.showModal())),S(null)},n=s?.bld_data&&[s?.bld_data?.sigunguNm,s?.bld_data?.bjdongNm,[+s?.bld_data?.mnnm,+s?.bld_data?.slno].filter(Boolean).join("-"),s?.bld_data?.bldNm,s?.bld_data?.dongNm,s?.bld_data?.hoNm];S({title:"ì´ ì¡°ê±´ì¼ë¡ ì´ ì§ì íì¸íìê² ì´ì?",text:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("p",{className:"detail-comment mt25",children:["ì´ ì¡°ê±´ì 기ì¤ì¼ë¡ ë³´ì¦ê¸ì ëë ¤ë°ì ì ìëì§ íë¨í©ëë¤.",(0,l.jsx)("br",{}),"ì¡°ê±´ì´ ë°ëë©´ ê²°ê³¼ë ë¬ë¼ì§ ì ììµëë¤."]}),(0,l.jsxs)("dl",{className:"common-info-list mt25",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"주ì"}),(0,l.jsx)("dd",{children:n.join(" ")})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ë³´ì¦ê¸"}),(0,l.jsx)("dd",{children:(0,i.dN)(r?.deposit)})]})]})]}),buttons:[{text:"주ì ë³ê²½",className:"gray",onClick:()=>{},close:!0},{text:"ì´ ì¡°ê±´ì¼ë¡ íì¸í기",className:"blue",onClick:()=>{y.isRealtor||!y.isPC?(M({addr:s}),A({href:y.isPC?"/pc/payment/integration-address":"/payment/report"})):a()},close:!0}]})},{floor_check:E,floor_modal:Z}=(0,k.Z)(I);function q(e=null){t?.is_dasaedae?I(e):E({...e||h,...t,bldrgstSeqno:(e||h)?.bld_data?.bldrgstSeqno})}return t&&(0,l.jsxs)(l.Fragment,{children:[!t?.is_dasaedae&&Z,(0,l.jsx)($.X,{}),(0,l.jsxs)("section",{className:"report-section","aria-label":"ë³´ì¦ê¸ ìì íì¸",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:"ì´ ì§, ë´ ë³´ì¦ê¸ ìì í ê¹ì?"}),(0,l.jsx)("div",{className:"title-tag blue",children:"미íì¸ ìí"})]}),(0,l.jsx)("div",{className:"extra-box",children:(0,l.jsxs)("ul",{className:"dot-list",children:[(0,l.jsx)("li",{children:s.length>0?s.length>1?v[s[1]]:v[s[0]]||(s[0].length>1?"ì´ ì§ì íì¬ ê³µë§¤ê° ì§í ì¤ì
ëë¤.":"ì´ ì§ì íì¬ ê²½ë§¤ê° ì§í ì¤ì
ëë¤."):"í
1ì¬ ê³µê°ë ìí ì í¸ë ììµëë¤."}),(0,l.jsx)("li",{children:"ê°ì ìíì´ ë°ë³µë ì ììµëë¤."}),(0,l.jsx)("li",{children:"ë´ ë³´ì¦ê¸ 기ì¤ì¼ë¡ íì¸í´ë³´ì¸ì."})]})}),(0,l.jsxs)("div",{className:"flex-row left",style:{gap:"25px"},children:[(0,l.jsxs)("div",{className:"select-wrap",children:[(0,l.jsx)("input",{type:"radio",name:"contract_type",className:"radio-type-i",id:"false",defaultChecked:!0,onChange:e=>{o(!1),n(e=>({...e,rent_price:null}))}}),(0,l.jsx)("label",{htmlFor:"false",children:"ì ì¸"})]}),(0,l.jsxs)("div",{className:"select-wrap",children:[(0,l.jsx)("input",{type:"radio",name:"contract_type",className:"radio-type-i",id:"true",onChange:e=>{o(!0),n(e=>({...e,rent_price:""}))}}),(0,l.jsx)("label",{htmlFor:"true",children:"ìì¸"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(u.L,{value:r.deposit?(0,i.oC)(r.deposit):r.deposit||"",placeholder:"ë³´ì¦ê¸ ì
ë ¥",onChange:e=>n(s=>({...s,deposit:(0,i.Y2)(e)})),pr:(0,l.jsx)("span",{children:"ì"})}),r.deposit>0&&(0,l.jsx)("span",{className:"font-blue text-medium flex-row right mt15",style:{fontSize:"17px"},children:(0,i.dN)(r.deposit)})]}),d&&(0,l.jsxs)("div",{children:[(0,l.jsx)(u.L,{value:r.rent_price?(0,i.oC)(r.rent_price):r.rent_price||"",placeholder:"ìì¸ ì
ë ¥",onChange:e=>n(s=>({...s,rent_price:(0,i.Y2)(e)})),pr:(0,l.jsx)("span",{children:"ì"})}),r.rent_price>0&&(0,l.jsx)("span",{className:"font-blue text-medium flex-row right mt15",style:{fontSize:"17px"},children:(0,i.dN)(r.rent_price)})]}),(0,l.jsx)("button",{className:"basic small blue full",disabled:r?.deposit<10||d&&!r?.rent_price,onClick:()=>{a?.homes_session?h.bld_data?q():t?.bld_pk?P({bld_pk:t.bld_pk,juso:t.addr}):(S({title:"ìë´",text:(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("p",{className:"detail-comment mt25",children:["íì¬ ì¡°íë 기본 ì ë³´ë§ì¼ë¡ë ì íí ë¶ìì´ ì´ë ¤ì,",(0,l.jsx)("br",{}),"ì¶ê° íì¸ì ìí´ ì£¼ì를 ë¤ì ì¡°íí´ ì£¼ì기 ë°ëëë¤."]})})}),A({href:y?.isPC?"/pc?juso_focus="+t.addr:"/"})):A({href:F._n,is_login:!0})},children:"ë´ ë³´ì¦ê¸ì¼ë¡ íì¸í기"})]})]})},Q=({risk_data:e,address:s,bld_type:t,area:n,near_list:d,tid:c=null,is_public:o})=>{let{ChangeConfirmNotice:u}=(0,m.useModal)(),{MovePage:p}=(0,j.Z)(),g=[{text:"ë®ì",color:"gray"},{text:"ì¤ê°",color:"orange"},{text:"ëì",color:"red"}],f=Math.floor(Math.min(99.8,e?.risk_score||0)/33.3),b=new Date,_=b.getFullYear(),N=String(b.getMonth()+1).padStart(2,"0"),y=String(b.getDate()).padStart(2,"0"),v=`${_}-${N}-01`,w=`${_}.${N}.01`,k=`${_}-${N}-${y}`,$=`${_}.${N}.${y}`,S=[{step:"ì£¼ë³ ì§ì",content:d&&(0,l.jsx)("div",{className:"near-list",children:Object.entries(d).map(([s,t],a)=>(0,l.jsxs)("div",{className:"detail",children:[(0,l.jsxs)("h3",{className:"sigungu flex-row",children:[e?.emd," ì£¼ë³ ì§ì",(0,l.jsxs)("small",{className:"font-light-gray",children:[s," 기ì¤"]})]}),(0,l.jsx)("div",{className:"near-area-list",children:(0,l.jsx)("ul",{children:t.map((e,s)=>(0,l.jsx)("li",{children:(0,l.jsx)(M.default,{href:`${F.s$}/${e.sido_eng}/${e.sigungu_eng}/${e.eupmyundong_eng}`,children:e.eupmyundong})},s))})})]},a))})},{step:"ì¶ì²",content:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-row sources",children:[(0,l.jsx)("span",{children:"ë°ì´í° ì¶ì²"}),(0,l.jsxs)("button",{onClick:()=>{p({href:"/data-sources"})},className:"gray-btn",children:["ì ì²´ ë°ì´í° ì¶ì²ì ê°±ì 주기 보기"," ",(0,l.jsx)(r.Z,{width:5,color:"#555"})]})]}),(0,l.jsx)(T,{classname:"mt30"})]})}].filter(Boolean);return e&&e?.emd&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("section",{className:"risk-section","aria-label":`${e?.emd} ì ì¸, ìì¸ ë¦¬ì¤í¬ ì§ì`,"data-section-idx":o?6:7,children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsxs)("div",{className:"flex-row left",children:[(0,l.jsxs)("h2",{className:"section-title",children:[e?.emd," ì ì¸, ìì¸ ë¦¬ì¤í¬ ì§ì"]}),(0,l.jsx)(x.default,{src:a.qx.qmark_b,alt:"",className:"click",onClick:()=>{u((0,A.u)())}})]}),(0,l.jsx)("div",{className:h()("title-tag",g[f].color),children:g[f].text})]}),(0,l.jsxs)("div",{className:"score-bar",children:[(0,l.jsx)("div",{className:h()("gauge-display",`risk-${f}`),children:(0,l.jsxs)("div",{className:"gauge",children:[(0,l.jsx)("div",{className:"gauge-bg"}),(0,l.jsx)("div",{className:"gauge-fill",style:{width:`${Math.max(e?.risk_score||0,3)}%`}})]})}),(0,l.jsx)("span",{className:`value risk-${f}`,children:String(e?.risk_score||0).slice(0,4)})]}),(0,l.jsxs)("dl",{className:"common-info-list",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("dt",{children:[t," íê· ëì°°ê°ì¨"]}),(0,l.jsxs)("dd",{children:[parseFloat((e?.bid_ratio*100).toFixed(1)),"%"]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"경매 ì§í ì¤"}),(0,l.jsxs)("dd",{children:[e?.auction_count,"ê±´"]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"HUG ë³´ì¦ì¬ê³ "}),(0,l.jsxs)("dd",{children:[e?.accident_count,"ê±´"]})]})]}),e?.accident_count>0&&(0,l.jsx)("div",{className:"extra-box",children:(0,l.jsxs)("dl",{className:"common-info-list",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ìµê·¼ ë³´ì¦ì¬ê³ "}),e?.accident_latest_year?(0,l.jsxs)("dd",{children:[e?.accident_latest_year,"ë
"]}):(0,l.jsx)("dd",{children:"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ìµê·¼ 5ë
ë´ ë³´ì¦ì¬ê³ "}),e?.accident_recent_5y?(0,l.jsxs)("dd",{children:[e?.accident_recent_5y,"ê±´"]}):(0,l.jsx)("dd",{children:"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"미ë°í íê· ë³´ì¦ê¸"}),(0,l.jsx)("dd",{children:e?.avg_deposit?(0,i.dN)(e?.avg_deposit):"-"})]})]})}),s&&(0,l.jsx)(B,{address:s,name:n,fixed:!0}),(0,l.jsx)(ee,{address:s,emd:e.emd}),d&&(0,l.jsx)("div",{className:"table-box",style:{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"normal",border:0},children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ì¶ì²"}),(0,l.jsx)("th",{children:"ì¼ì"})]})}),(0,l.jsxs)("tbody",{children:[(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:(0,l.jsx)("a",{href:"https://www.eais.go.kr",target:"_blank",rel:"noopener",children:"ì¸ìí°"})}),(0,l.jsx)("td",{children:(0,l.jsx)("time",{dateTime:v,children:w})})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:(0,l.jsx)("a",{href:"https://www.courtauction.go.kr/pgj/index.on",target:"_blank",rel:"noopener",children:"ëë²ì 경매"})}),(0,l.jsx)("td",{children:(0,l.jsx)("time",{dateTime:k,children:$})})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:(0,l.jsx)("a",{href:"https://www.kamco.or.kr/main.do",target:"_blank",rel:"noopener",children:"íêµìì°ê´ë¦¬ê³µì¬"})}),(0,l.jsx)("td",{children:(0,l.jsx)("time",{dateTime:v,children:w})})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:(0,l.jsx)("a",{href:c?`https://www.tankauction.com/${c}`:"https://www.tankauction.com/pa/paList.php",target:"_blank",rel:"noopener",children:"í±í¬ì¥ì
"})}),(0,l.jsx)("td",{children:(0,l.jsx)("time",{dateTime:k,children:$})})]})]})]})})]}),S.map((e,s)=>(0,l.jsx)("section",{className:"contents-box",children:(0,l.jsx)("div",{className:"content",children:e.content})},s))]})},ee=({address:e,emd:s="",classname:t=""})=>{let i=(0,b.v9)(e=>e.commonStore),{MovePage:n}=(0,j.Z)(),[d,o]=(0,c.useState)(),{data:m}=(0,p.uq)({bcode:d},{enabled:!!d,select:e=>e.data}),u=(e,s)=>{e.Service.geocode({query:s}
1,function(s,t){if(s!==e.Service.Status.OK)return;let l=t?.v2?.addresses?.[0];l?.x&&l?.y&&e.Service.reverseGeocode({coords:new e.LatLng(Number(l.y),Number(l.x)),orders:[e.Service.OrderType.ADDR,e.Service.OrderType.LEGAL_CODE].join(",")},function(s,t){if(s!==e.Service.Status.OK)return;let l=t?.v2?.results??[],a=l.find(e=>e?.code?.type==="L"),r=a?.code?.id??l?.[0]?.code?.id;r&&o(r)})})};return(0,c.useEffect)(()=>{let t;if(!s||!e)return;let l=0,a=()=>{let s=window.naver?.maps;if(!s?.Service?.geocode||!s.Service.reverseGeocode){if(l++>30)return;t=setTimeout(a,100);return}u(s,e)};return a(),()=>{t&&clearTimeout(t)}},[e,s]),m?.slug&&(0,l.jsxs)("div",{className:h()("insight-banner",t),onClick:()=>{n({href:"/insights/"+m?.slug,blank:!i?.isApp})},children:[(0,l.jsxs)("div",{className:"flex-col",children:[(0,l.jsxs)("h4",{children:[s,"\xa0",(0,l.jsxs)("span",{className:"flex-row left",children:["ê³ì½ ì íì¸ ê°ì´ë ",(0,l.jsx)(r.Z,{color:"#ffe96c",width:6})]})]}),(0,l.jsxs)("p",{children:[s," ì ë³´ì ìì¬ë±ê¸° ì¤ê°ì¬ë¥¼ íì¸íì¸ì."]})]}),(0,l.jsx)(x.default,{src:a._s.bld_gradient,alt:""})]})},es=({type:e,auction_data:s,area:t,sectionIdx:a})=>{let[r,n]=(0,c.useState)(null),[o,m]=(0,c.useState)(1),[u,g]=(0,c.useState)(0),{MovePage:f}=(0,j.Z)(),b={jibun:{title:"ëì¼ì§ë² ë§¤ê° ë¬¼ê±´",api:`/maps/same-jibun-auction?tid=${s?.tid}&public=${s?.is_public?1:0}`,tags:["bld_name","bidDtm"]},near:{title:"ì¸ê·¼ ë§¤ê° ë¬¼ê±´",area:[t?.sido,t?.sgg,t?.emd,t?.bld_type].join(" "),api:`/maps/near-auction?b_code=${t?.b_code}&ctgrNm=${s?.ctgrNm}`,tags:["bld_name","bidDtm"]},near_info:{title:"ì¸ê·¼ ê²½/공매 ì§í ì ë³´",area:[t?.sido,t?.sgg,t?.emd].join(" "),api:`/maps/near-ongoing?b_code=${t?.b_code}&type=${0===u?"경매":"공매"}`,tags:["ctgrNm","minbAmt"],tabs:["경매","공매"]},jibun_info:{title:"ëì¼ ì§ë² ê²½/공매 ì ë³´",area:t?.addr,api:(0,E.nW)(`/maps/bld/auction/${t?.bld_pk}?category=${["auction_ongoing","pa_ongoing","history"][u]}`,t?.sido,t?.sgg),tags:["ctgrNm","minbAmt"],tabs:["경매 ì§í ì¤","공매 ì§í ì¤","과거 ë´ì"]}},{data:_,isPending:N}=(0,p.Oo)({type:e,apiPath:b[e]?.api,page:o,infoTab:u},{select:e=>e.data.data,enabled:!!b[e]?.api});return(0,c.useEffect)(()=>{_&&n(Array.from({length:Math.max(_.totalCount/5,1)},(e,s)=>s+1))},[_]),b[e]&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("section",{className:"near-auction-section","data-section-idx":a,children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:b[e].title}),b[e].area&&(0,l.jsx)("p",{className:"font-light-gray",children:b[e].area})]}),b[e]?.tabs&&(0,l.jsx)("div",{className:"small-tabs c",children:(0,l.jsx)("ul",{className:"",children:b[e]?.tabs.map((e,s)=>l.jsx("li",{className:h()("tabs",{on:s===u,click:s!==u}),onClick:()=>{g(s),m(1)},children:e},s))})}),(_?.items??[])?.length>0?(0,l.jsx)("ul",{children:_?.items.map((t,a)=>l.jsxs("li",{className:t?.tid?"click":"",onClick:()=>{t?.tid&&t?.tid!=s?.tid&&f({href:(t?.type==="공매"||t?.status?.includes("공매")?w.Pg:w.rG)({sido:t?.bld_data.sido,sgg:t?.bld_data.sgg,emd:t?.bld_data.emd,house_type:t?.bld_data.house_type,name:t?.bld_data.bld_name,tid:t?.tid})})},children:[t?.frontImg&&l.jsx(x.default,{src:t?.frontImg,alt:""}),l.jsxs("div",{children:[l.jsx("p",{children:t?.adrsInfo}),l.jsxs("div",{children:[l.jsx("div",{className:"tags",children:b[e]?.tags.map((e,s)=>!!t?.[e]&&l.jsx("span",{children:e.endsWith("Amt")?i.dN(t?.[e]):e.endsWith("Dtm")&&d()(t?.[e]).isValid()?d()(t?.[e]).format("YY.MM.DD"):t?.[e]},e))}),t?.diffPct&&0!==parseFloat(t.diffPct.replace(/[^0-9.]/g,""))&&l.jsxs("span",{className:t?.diffPct.startsWith("-")?"decrease small text-medium":"increase small text-medium",children:[l.jsx(S.Z,{width:6,color:t?.diffPct.startsWith("-")?void 0:"#D84315"}),parseFloat(t?.diffPct.replace(/[^0-9.]/g,"")),"%"]})]})]})]},t?.tid??a))}):N?(0,l.jsx)(q.SectionSkeleton,{}):(0,l.jsxs)("div",{className:"empty-msg",children:[b?.[e].title,b?.[e].title.endsWith("ì ë³´")?"ê°":"ì´"," ììµëë¤."]}),r?.length>1&&(0,l.jsx)(I.Z,{total_page_list:r,onClick:e=>{m(e)},click_args:null,pclayout:!0}),(0,l.jsx)(q.ExtraComment,{comment:_?.comment})]})})},et=({building:e,set_open:s,is_open:t})=>{let{ChangeConfirmNotice:a}=(0,m.useModal)();(0,c.useEffect)(()=>{"true"===localStorage.getItem("report_side_open")&&(s(!0),localStorage.removeItem("report_side_open"))},[]),(0,c.useEffect)(()=>{t&&s(!1)},[e]);let{surveyInfo:i={},relatedDocsInfo:n={}}=e?.is_public?e.public_auction_data:e?.auction_data?.tid?e.auction_data:e?.accident_auction_data?.tid?e.accident_auction_data:e?.auction_history?.[0],d=!e?.is_public&&!e?.auction_data?.tid&&!e?.accident_auction_data?.tid&&!!e?.auction_history?.[0],o=[{title:"ì¬ì§/ì§ë",valid:!0,idx:0,key:"img_arr"},{title:"ì¬ê±´ë´ì",valid:!0,idx:1,key:"case_detail"},{title:"기ì¼ë´ì",valid:!0,idx:2,key:"date_detail"},{title:"문건/ì¡ë¬",valid:!0,idx:3,key:"doc_delivery"}
1,{title:"íí©ì¡°ì¬ì",valid:!d&&!!i?.["기본ì ë³´"],idx:4,key:"survey_report"},{title:"ë¶ëì°íì",valid:!0,idx:5,key:"property_desc"},{title:"ê°ì íê°ì",file:"ê°ì íê°ì",valid:!d&&!!n?.["ê°ì íê°ì"],idx:6,key:"extra_file"},{title:"매물ëª
ì¸ì",file:"매물ëª
ì¸ì",valid:!d&&!!n?.["매물ëª
ì¸ì"],idx:7,key:"extra_file"},{title:"건물ë±ê¸°",file:"건물ë±ê¸°",valid:!d&&!!n?.["건물ë±ê¸°"],idx:8,key:"extra_file"},{title:"ì¸ëì´ë",file:"ì¸ëì´ë",valid:!d&&!!n?.["ì¸ëì´ë"],idx:9,key:"extra_file"}];return(0,l.jsxs)("dialog",{id:"AccidentSideD",open:t,children:[(0,l.jsx)(L,{building:null,backclick:()=>{s(!1)},rightSlot:(0,l.jsx)(l.Fragment,{})}),(0,l.jsx)("ul",{className:"content-arr",children:o.filter(e=>e.valid).map(s=>(0,l.jsxs)("li",{className:"click flex-row start",onClick:()=>{a({text:(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(el,{building:e,idx:s.idx,arr:o.filter(e=>e.valid),file:s.file||""})}),buttons:[{text:"ë«ê¸°",className:"gray",onClick:()=>{},close:!0}]})},children:[s.title,s.valid&&(0,l.jsx)(r.Z,{color:"#1D1D1D",width:6})]},`accident-side-menu-${s.idx}`))})]})},el=({building:e,idx:s,arr:t,file:r=""})=>{let n=(0,b.v9)(e=>e.commonStore),{set_img_arr:d,set_file_url:o}=(0,m.useModal)(),j=n?.isPC;(0,c.useEffect)(()=>{D.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${D.version}/legacy/build/pdf.worker.min.mjs`},[]);let[u,p]=(0,c.useState)(t.find(e=>e.idx==(s||0))),[g,f]=(0,c.useState)(r),_=e?.srchAdrs||e?.roadAdrs||"",N=[e?.sido,e?.sgg,e?.emd].filter(e=>e).join(" "),y=e?.is_public?e.public_auction_data:e?.auction_data?.tid?e.auction_data:e?.accident_auction_data?.tid?e.accident_auction_data:e?.auction_history?.[0],{caseInfo:v={},documentInfo:w={},surveyInfo:k={},propertyListInfo:$={},relatedDocsInfo:S={}}=y,C={img_arr:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"ì¬ì§"}),(y?.frontImgs||[]).length>0?(0,l.jsx)("div",{className:"grid g3",children:(y?.frontImgs||[]).map((e,s)=>(0,l.jsx)("div",{onClick:()=>{d({arr:y?.frontImgs,idx:s,just_watch:!0})},children:(0,l.jsx)(x.default,{src:e,alt:"",style:{objectFit:"cover",aspectRatio:"1/1"}})},s))}):(0,l.jsx)("p",{className:"empty-msg",children:"ì¬ì§ì´ ììµëë¤."}),(0,l.jsx)("p",{className:"c-label",children:"ì§ë"}),_&&(0,l.jsx)(B,{address:_,name:N,fixed:!1})]}),case_detail:v&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"ì¬ê±´ 기본 ë´ì"}),(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("colgroup",{children:(0,l.jsx)("col",{width:j?130:80})}),(0,l.jsx)("tbody",{children:Object.entries(v?.["ì¬ê±´ê¸°ë³¸ë´ì"]).map(([e,s],t)=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:e}),(0,l.jsx)("td",{className:"left",children:s||"-"})]},`ì¬ê±´ê¸°ë³¸ë´ì-${t}`))})]})}),(v?.["ë°°ë¹ì구ì¢
기ë´ì"]||[]).length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"ë°°ë¹ì구ì¢
기ë´ì"}),v?.["ë°°ë¹ì구ì¢
기ë´ì"].map((e,s)=>l.jsx("div",{className:"table-box",children:l.jsxs("table",{children:[l.jsxs("colgroup",{children:[l.jsx("col",{width:j?80:60}),l.jsx("col",{width:"*"}),l.jsx("col",{width:j?130:100})]}),l.jsx("thead",{children:l.jsx("tr",{children:Object.keys(e).map((e,t)=>l.jsx("th",{children:e},`case_info-ë°°ë¹ì구ì¢
기ë´ì-${s}-th-${t}`))})}),l.jsx("tbody",{children:l.jsx("tr",{children:Object.values(e).map((e,t)=>l.jsx("td",{children:e||"-"},`case_info-ë°°ë¹ì구ì¢
기ë´ì-${s}-td-${t}`))})})]})},`case_info-ë°°ë¹ì구ì¢
기ë´ì-${s}`))]}),(v?.["íê³ ë´ì"]||[]).length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"íê³ ë´ì"}),v?.["íê³ ë´ì"].map((e,s)=>l.jsx("div",{className:"table-box",children:l.jsxs("table",{children:[l.jsx("thead",{children:l.jsx("tr",{children:Object.keys(e).map((e,t)=>l.jsx("th",{children:e},`caseinfo_í¥ê³ ë´ì_${s}-th-${t}`))})}),l.jsx("tbody",{children:l.jsx("tr",{children:Object.values(e).map((e,t)=>l.jsx("td",{children:e||"-"},`caseinfo_í¥ê³ ë´ì_${s}-td-${t}`))})})]})},`caseinfo_í¥ê³ ë´ì_${s}`))]}),(v?.["ê´ë ¨ì¬ê±´ë´ì"]||[]).length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"ê´ë ¨ì¬ê±´ë´ì"}),v?.["ê´ë ¨ì¬ê±´ë´ì"].map((e,s)=>l.jsx("div",{className:"table-box",children:l.jsxs("table",{children:[l.jsx("thead",{children:l.jsx("tr",{children:Object.keys(e).map((e,t)=>l.jsx("th",{children:e},`caseinfo_ê´ë ¨ì¬ê±´ë´ì_${s}-th-${t}`))})}),l.jsx("tbody",{children:l.jsx("tr",{children:Object.values(e).map((e,t)=>l.jsx("td",{children:e||"-"},`caseinfo_ê´ë ¨ì¬ê±´ë´ì_${s}-td-${t}`))})})]})},`caseinfo_ê´ë ¨ì¬ê±´ë´ì_${s}`))]}),(0,l.jsx)("p",{className:"c-label",children:"물건ë´ì"}),(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("colgroup",{children:(0,l.jsx)("col",{width:j?130:80})}),(0,l.jsx)("tbody",{children:Object.entries(v?.["물건ë´ì"]).map(([e,s],t)=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:e}),(0,l.jsx)("td",{className:"left",dangerouslySetInnerHTML:{__html:(0,Z.isNumber)(s)?(0,i.dN)(s):s||"-"}})]},`물건ë´ì-${t}`))})]})}),(v?.["목ë¡ë´ì"]||[]).length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"목ë¡ë´ì"}),v?.["목ë¡ë´ì"].map((e,s)=>l.jsx("div",{className:"table-box",children:l.jsxs("table",{children:[l.jsxs("colgroup",{children:[l.jsx("col",{width:60}),l.jsx("col",{width:"*"}),l.jsx("col",{width:j?130:60}),l.jsx("col",{width:j?130:60})]}),l.jsx("thead",{children:l.jsx("tr",{children:Object.keys(e).map((e,t)=>l.jsx("th",{children:e},`caseinfo_목ë¡ë´ì_${s}-th-${t}`))})}),l.jsx("tbody",{children:l.jsx("tr",{children:Object.values(e).map((e,t)=>l.jsx("td",{children:e||"-"},`caseinfo_목ë¡ë´ì_${s}-td-${t}`))})})]})},`caseinfo_목ë¡ë´ì_${s}`))]}),(v?.["ë¹ì¬ìë´ì"]||[]).length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"목ë¡ë´ì"}),(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"구ë¶"}),(0,l.jsx)("th",{children:"ì´ë¦"})]})}),(0,l.jsx)("tbody",{children:v?.["ë¹ì¬ìë´ì"].map((e,s)=>l.jsxs("tr",{children:[l.jsx("td",{children:e?.["구ë¶"]}),l.jsx("td",{children:e?.["ì´ë¦"]})]},`caseinfo-ë¹ì¬ìë´ì-${s}`))})]})})]}),(y?.specialInfo||[]).length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"í¹ë³ë´ì"}),(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ì±ê¶ë²í¸"}),(0,l.jsx)("th",{children:"ìì¬ì§"}),(0,l.jsx)("th",{children:"í¹ë³ì í"}),(0,l.jsx)("th",{children:"ë¹ê³ "})]})}),(0,l.jsx)("tbody",{children:y.specialInfo.map((e,s)=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:e.credNo||"-"}),(0,l.jsx)("td",{children:e.location||"-"}),(0,l.jsx)("td",{children:e.type||"-"}),(0,l.jsx)("td",{children:e.remarks||"-"})]},s))})]})})]})]}),date_detail:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"기ì¼ë´ì"}),(y?.scheduleInfo?.items||[]).length>0?(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ê°ì íê°ì¡"}),(0,l.jsx)("th",{children:"기ì¼"}),(0,l.jsx)("th",{children:"기ì¼ì¢
ë¥/기ì¼ì¥ì"}),(0,l.jsx)("th",{children:"ìµì 매ê°ê°ê²©"}),(0,l.jsx)("th",{children:"기ì¼ê²°ê³¼"})]})}),(0,l.jsx)("tbody",{children:y?.scheduleInfo?.items.map((e,s,t)=>l.jsxs("tr",{className:e.bgClr,children:[0===s&&l.jsx("td",{rowSpan:t.length,children:y?.scheduleInfo?.["ê°ì íê°ì¡"]}),l.jsx("td",{children:e?.["기ì¼"]||"-"}),l.jsxs("td",{children:[e?.["기ì¼ì¢
ë¥"]||"-",l.jsx("small",{children:e?.["기ì¼ì¥ì"]||"-"})]}),l.jsx("td",{children:e?.["ìµì 매ê°ê°ê²©"]||"-"}),l.jsx("td",{children:e?.["기ì¼ê²°ê³¼"]||"-"})]},s))})]})}):(0,l.jsx)("p",{className:"empty-msg",children:"ê¸°ì¼ ë´ìì´ ììµëë¤."})]}),doc_delivery:w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"문건ì²ë¦¬ë´ì"}),(w?.["문건ì²ë¦¬ë´ì"]||[]).length>0?(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{width:j?130:80}),(0,l.jsx)("col",{width:"*"}),(0,l.jsx)("col",{width:j?130:80})]}),(0,l.jsx)("thead",{children:(0,l.jsx)("tr",{children:Object.keys(w?.["문건ì²ë¦¬ë´ì"][0]).map(e=>(0,l.jsx)("th",{children:e}))})}),(0,l.jsx)("tbody",{children:w?.["문건ì²ë¦¬ë´ì"].map((e,s)=>l.jsx("tr",{children:Object.values(e).map(e=>l.jsx("td",{children:e||"-"}))},s))})]})}):(0,l.jsx)("p",{className:"empty-msg",children:"문건 ì²ë¦¬ ë´ìì´ ììµëë¤."}),(0,l.jsx)("p",{className:"c-label",children:"ì¡ë¬ë´ì"}),(w?.["ì¡ë¬ë´ì"]||[]).length>0?(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{width:j?130:80}),(0,l.jsx)("col",{width:"*"}),(0,l.jsx)("col",{width:j?130:80})]}),(0,l.jsx)("thead",{children:(0,l.jsx)("tr",{children:Object.keys(w?.["ì¡ë¬ë´ì"][0]).map(e=>(0,l.jsx)("th",{children:e}))})}),(0,l.jsx)("tbody",{children:w?.["ì¡ë¬ë´ì"].map((e,s)=>l.jsx("tr",{children:Object.values(e).map(e=>l.jsx("td",{children:e||"-"}))},s))})]})}):(0,l.jsx)("p",{className:"empty-msg",children:"ì¡ë¬ ë´ìì´ ììµëë¤."})]}),survey_report:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"기본ì ë³´"}),Object.entries(k?.["기본ì ë³´"]).length>0?(0,l.jsx)("dl",{className:"common-info-list",children:Object.entries(k?.["기본ì ë³´"]).map(([e,s],t)=>(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:e}),(0,l.jsx)("dd",{children:s||"ìë ì ë³´ì
ëë¤."})]},`surveyinfo-기본ì ë³´-${t}`))}
1):(0,l.jsx)("p",{className:"empty-msg",children:"íí©ì¡°ì¬ìê° ììµëë¤."}),(k?.["ë¶ëì°ìëì°¨ì ë³´"]||[]).length>0&&(0,l.jsx)(l.Fragment,{children:(k?.["ë¶ëì°ìëì°¨ì ë³´"]||[]).length>0?(0,l.jsxs)("div",{className:"table-box",children:[(0,l.jsx)("p",{className:"p-label",children:"ë¶ëì° ìëì°¨ ì ë³´"}),(0,l.jsxs)("table",{children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{width:j?80:40}),(0,l.jsx)("col",{width:"*"}),(0,l.jsx)("col",{width:j?130:80})]}),(0,l.jsx)("thead",{children:(0,l.jsx)("tr",{children:Object.keys(k?.["ë¶ëì°ìëì°¨ì ë³´"][0]).map(e=>(0,l.jsx)("th",{children:e}))})}),(0,l.jsx)("tbody",{children:k?.["ë¶ëì°ìëì°¨ì ë³´"].map((e,s)=>l.jsx("tr",{children:Object.values(e).map(e=>l.jsx("td",{children:e}))},s))})]})]}):(0,l.jsx)("p",{className:"empty-msg",children:"ë¶ëì° ìëì°¨ ì ë³´ê° ììµëë¤."})}),k?.["ë¶ëì°ì ì ê´ê³ì¡°ì¬ì"].length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"ë¶ëì°ì íí© ë° ì ì ê´ê³ ì¡°ì¬ì"}),k?.["ë¶ëì°ì ì ê´ê³ì¡°ì¬ì"].map((e,s)=>l.jsxs("div",{className:"table-box",children:[l.jsx("p",{className:"p-label",children:"ë¶ëì°ì ì ì ê´ê³"}),l.jsxs("table",{children:[l.jsx("colgroup",{children:l.jsx("col",{width:j?100:60})}),l.jsx("tbody",{children:Object.entries(e).map(([e,t],a)=>l.jsxs("tr",{children:[l.jsx("th",{className:"left",children:e}),l.jsx("td",{className:"left",children:t})]},`surveyinfo_ë¶ëì°ì ì ê´ê³ì¡°ì¬ì-${s}-tr-${a}`))})]})]},`surveyinfo_ë¶ëì°ì ì ê´ê³ì¡°ì¬ì_${s}`))]})]}),property_desc:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"c-label",children:"ë¶ëì°íì목ë¡"}),($?.items||[]).length>0?(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{width:40}),(0,l.jsx)("col",{width:j?130:60}),(0,l.jsx)("col",{width:"*"}),(0,l.jsx)("col",{width:j?100:60})]}),(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ë²í¸"}),(0,l.jsx)("th",{children:"ìì¬ì§"}),(0,l.jsx)("th",{children:"ì©ë/구조/ë©´ì "}),(0,l.jsx)("th",{children:"ë¹ê³ "})]})}),(0,l.jsxs)("tbody",{children:[$?.items.map((e,s)=>l.jsxs("tr",{children:[l.jsx("td",{children:e?.["ë²í¸"]??"-"}),l.jsx("td",{children:e?.["ìì¬ì§"]||"-"}),l.jsx("td",{className:e?.["ì©ë구조면ì "]?"left":"",style:{whiteSpace:"pre-line"},children:e?.["ì©ë구조면ì "]?function e(s){return null==s?"-":Array.isArray(s)?s.map((s,t)=>(0,l.jsx)("span",{style:{display:"block"},children:e(s)},t)):"object"==typeof s?(0,l.jsx)(l.Fragment,{children:Object.entries(s).map(([s,t])=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{style:{fontWeight:600,verticalAlign:"top",paddingRight:8,textAlign:"left"},children:s}),(0,l.jsx)("span",{style:{verticalAlign:"top",whiteSpace:"pre-line"},children:e(t)})]}))}):String(s)}(e["ì©ë구조면ì "]):"-"}),l.jsx("td",{children:e?.["ë¹ê³ "]||"-"})]},s)),(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:4,children:$?.["경매구ë¶"]})})]})]})}):e?.property_info?.description?(0,l.jsx)("p",{className:"property-desc-text",children:e.property_info.description}):(0,l.jsx)("p",{className:"empty-msg",children:"ë¶ëì° íì ì ë³´ê° ììµëë¤."})]}),extra_file:(0,l.jsx)(l.Fragment,{children:(S?.[g]||[]).length>0?(0,l.jsxs)("div",{className:"file-view",children:[(0,l.jsx)(x.default,{className:"viewer-float-icon click",src:a._s.viewer_b,alt:"",onClick:()=>{o(S?.[g]+"#toolbar=0")}}),(0,l.jsx)(P.b,{file:S?.[g],maxWidth:Math.min(document.body.clientWidth-112,698)})]}):(0,l.jsxs)("p",{className:"empty-msg",children:[g," íì¼ì´ ììµëë¤."]})})};return u&&(0,l.jsxs)("div",{className:"accident-extra flex-col",style:{gap:"20px"},children:[(0,l.jsx)("div",{className:"small-tabs c",children:(0,l.jsx)("ul",{children:t.map(e=>(0,l.jsx)("li",{className:h()("tab",{on:u.idx===e.idx}),onClick:()=>{p(e),e.file&&f(e.file)},children:e.title},`accident-extra-tabs-${e.idx}`))})}),C?.[u?.key]]})},ea=({content:e,children:s})=>{let{MovePage:t}=(0,j.Z)(),[r]=(0,N.fP)();return(0,l.jsxs)("div",{className:r?.homes_session?"":"auth-wrap",children:[(0,l.jsx)("div",{className:"authlock-mask",style:{display:r.homes_session?"none":"flex"},children:(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)(x.default,{src:a._s.lock_g,alt:""}),(0,l.jsx)("p",{className:"main",children:e?.title}),(0,l.jsx)("p",{className:"desc",dangerouslySetInnerHTML:{__html:e?.desc}}),(0,l.jsx)("button",{onClick:()=>{t({href:"/homes-login"})},className:"basic sm blue",children:"ë¡ê·¸ì¸ í íì¸í기"})]})}),s]})}},12416:function(e,s,t){t.r(s),t.d(s,{AreaPriceSection:function(){return en},AreaRiskSection:function(){return e$},AreaSection:function(){return ec},BldInfoSection:function(){return eo},DataSourceSection:function(){return U},EmptyBldInfo:function(){return z},ExtraComment:function(){return ev},GetReportSection:function(){return ek},PriceSection:function(){return ea},PublicDocumentSection:function(){return e_},PyeongFilter:function(){return er},RealtyPriceSection:function(){return ei},SearchMapBridgeWrapper:function(){return X},SectionFallback:function(){return ey},SectionScrollTabs:function(){return Q},SectionSkeleton:function(){return eN},TitleSection:function(){return el}});
1var l=t(57437),a=t(96624),r=t(84655),i=t(62306),n=t(77398),d=t.n(n);t(43819);var c=t(2265),o=t(36760),h=t.n(o),x=t(77471),m=t(40089),j=t(67428),u=t(23573),p=t(71632),g=t(21770),f=t(96881),b=t(28935),_=t(66796),N=t(68575),y=t(22007),v=t(31708),w=t(89087),k=t(30166),$=t(73698),S=t(82376),C=t(9803),F=t(45105),M=t(87250),A=t(27589),D=t(70072),P=t(46716);let I=0,E=e=>{let[s,t,l]=e.split(".").map(Number);return{year:s,month:t,day:l||1}},Z=({arr:e,listingType:s})=>{let[t]=(0,c.useState)({year:"ê±°ëì¼ (ì ì²´)",price:0,area:"ë©´ì (ì ì²´)"}),a=e.map(e=>e.date&&null==e.year?{...e,...E(e.date)}:e).filter(e=>null!=e.year&&null!=e.month),r=(()=>{let e=new Set;return a.map(e=>({year:e.year,month:e.month})).filter(s=>{let t=`${s.year}-${s.month}`;return!e.has(t)&&(e.add(t),!0)}).sort((e,s)=>e.year===s.year?e.month-s.month:e.year-s.year)})(),i=Math.max(r.length-1,1),[n,d]=(0,c.useState)({min:0,max:i}),o=a.filter(e=>t.area.includes("ì ì²´")||+t.area.slice(0,-2)===e.priv_area),h={};o.sort((e,s)=>s.month&&s.year-e.year==0?s.month-e.month==0?(s.day??0)-(e.day??0):s.month-e.month:s.year-e.year).forEach(e=>{let s=`${e.year}-${e.month}`;h[s]?h[s].push(e):h[s]=[e]});let x=Object.keys(h).length>0?Object.values(h).map(e=>({year:e[0].year,month:e[0].month,price:parseInt(String(e.reduce((e,s)=>e+s.price,0)/e.length)),cnt:e.length})).sort((e,s)=>e.year===s.year?(e.month??0)-(s.month??0):e.year-s.year):[],m=Math.max(...x.map(e=>e.price)),j=Math.min(...x.map(e=>e.price)),u=r[n.min],p=r[n.max],g=u&&p?x.filter(e=>{let s=e.year>u.year||e.year===u.year&&(e.month??0)>=u.month,t=e.year<p.year||e.year===p.year&&(e.month??0)<=p.month;return s&&t}):x;return e.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:e&&e.length>0?"inner":"mt30",children:e&&e.length>0&&(0,l.jsx)(T,{series:[{data:g,color:"#3182F6"}],barData:g.map(e=>({year:e.year,month:e.month,value:e.cnt})),barLabel:"ê±°ëë",bounds:{max:m,min:j},showMinMax:!0,tooltipContent:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("p",{children:[String(e.year||"").slice(2),"ë
"," ",String(e.month).padStart(2,"0"),"ì"]}),(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("span",{children:"ê±°ë"}),(0,l.jsxs)("span",{className:"",children:[e.cnt,"ê±´"]})]}),(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("span",{children:"íê· ê°"}),(0,l.jsx)("span",{className:"",children:R(e.price)})]})]})})}),e&&e.length>0&&(0,l.jsx)("div",{className:"table-graph-title",children:r.length>1&&(0,l.jsx)(q,{dates:r,minIdx:n.min,maxIdx:n.max,onChange:(e,s)=>d({min:e,max:s}),dataCnt:g.length,listingType:s})})]})},q=({dates:e,minIdx:s,maxIdx:t,onChange:a,dataCnt:r,listingType:i})=>{let n=e.length-1,d=s=>`${String(e[s]?.year||"").slice(2)}ë
${e[s]?.month||""}ì`,c=n>0?s/n*100:0,o=n>0?t/n*100:100;return(0,l.jsxs)("div",{className:"date-range-slider",children:[(0,l.jsxs)("div",{className:"drs-labels",children:[(0,l.jsxs)("span",{className:"text-medium",children:[d(s)," ~ ",d(t)]}),(0,l.jsxs)("span",{className:"font-light-gray",children:[i," ",r,"ê±´"]})]}),(0,l.jsxs)("div",{className:"drs-track-wrapper",onMouseDown:e=>{let l=e.currentTarget.getBoundingClientRect(),r=Math.round((e.clientX-l.left)/l.width*n),i=Math.max(0,Math.min(n,r));Math.abs(i-s)<=Math.abs(i-t)?a(Math.min(i,t-1),t):a(s,Math.max(i,s+1))},children:[(0,l.jsx)("div",{className:"drs-track-bg"}),(0,l.jsx)("div",{className:"drs-track-fill",style:{left:`${Math.max(0,c)}%`,right:`${Math.max(0,100-o)}%`}}),(0,l.jsx)("input",{type:"range",min:0,max:n,value:s,onChange:e=>{a(Math.min(+e.target.value,t-1),t)}}),(0,l.jsx)("input",{type:"range",min:0,max:n,value:t,onChange:e=>{let t=Math.max(+e.target.value,s+1);a(s,t)}})]})]})},T=({series:e,scatterSeries:s,barData:t,barLabel:a,barYMax:r,bounds:i,showMinMax:n=!1,xGranularity:d="yearMonth",yFormat:o,yDomain:h,tooltipContent:x})=>{let m=(0,c.useRef)(null),j=(0,c.useRef)(null),[u,p]=(0,c.useState)(null),g=(0,c.useRef)(`chart-clip-${++I}`).current,f=(0,c.useRef)(o),b=(0,c.useRef)(x);f.current=o,b.current=x,(0,c.useEffect)(()=>{if(!e?.length)return;let l=e.flatMap(e=>e.data);if(!l.length||!m.current)return;let{width:c,height:o}=m.current.getBoundingClientRect(),x=P.Ys(m.current);x.selectAll("*").remove(),x.on("wheel",e=>e.preventDefault());let u={top:0,right:0,bottom:25,left:40},b=c-u.left-u.right,_=o-u.top-u.bottom,N=(e,s)=>
1"year"===d?new Date(e,0,1):new Date(e,(s??1)-1,1),y=e=>{if(e.date&&null==e.year){let{year:s,month:t}=E(e.date);return N(s,t)}return N(e.year??0,e.month)},v=P.VV$(l,y),w=P.Fp7(l,y),k="year"===d?6:3,$=P.F0B.offset(v,-k),S=P.F0B.offset(w,k),C=P.Xf().domain([$,S]).range([0,b]),F=l.map(e=>e.price),M=Math.min(...F),A=Math.max(...F),D=A-M,I=D>0?.5*D:.5*Math.abs(A)||1e7,Z=P.BYU().domain(h??[Math.max(0,M-I),A+I]).range([_,10]),q=f.current??(e=>e>0?`${e/1e8}ìµ`:"0ì"),T=(w.getFullYear()-v.getFullYear())*12+(w.getMonth()-v.getMonth()),R="year"===d||T>24?P.i$Z("%y"):P.i$Z("%y-%m"),O=x.append("g").attr("transform",`translate(${u.left},${u.top})`);if(x.append("defs").append("clipPath").attr("id",g).append("rect").attr("width",b).attr("height",_),O.append("rect").attr("width",b).attr("height",_).attr("class","graph__grid"),t?.length){let e=N(l[0].year,l[0].month),s=Math.max(1,.75*Math.abs(C("year"===d?new Date(e.getFullYear()+1,0,1):P.F0B.offset(e,1))-C(e))),a=(P.Fp7(t,e=>e.value)??0)+20,i=P.BYU().domain([0,r??a]).range([_,0]);O.selectAll(".bar").data(t).enter().append("rect").attr("x",e=>C(N(e.year,e.month))-s/2).attr("y",e=>i(e.value)).attr("width",s).attr("height",e=>_-i(e.value)).attr("clip-path",`url(#${g})`).attr("class","graph__grid__bar")}O.append("g").attr("transform",`translate(0,${_})`).attr("class","graph__rows").call(P.LLu(C).tickFormat(R).ticks(5)).select(".domain").attr("d",`M0,0H${b}`);let L=O.append("g").call(P.y4O(Z).tickFormat(e=>q(+e)).ticks(5)).attr("class","graph__columns");L.select(".domain").attr("d",`M0,${_}V0`);let B=O.append("g").attr("class","guides").append("line").attr("y1",0).attr("y2",_).attr("stroke","#D9D9D9").attr("stroke-width",1),Y=(e,s)=>P.jvg().x(s=>e(y(s))).y(e=>s(e.price)),W=e=>n&&i?e.price===i.max?"dot_max":e.price===i.min?"dot_min":"graph__grid__dot":"graph__grid__dot";s?.length&&s.forEach(e=>{O.selectAll(null).data(e.data).enter().append("circle").attr("cx",e=>C(y(e))).attr("cy",e=>Z(e.price)).attr("r",1.5).attr("fill",e.color).attr("opacity",e.opacity??.35).attr("clip-path",`url(#${g})`)});let G=e.map(e=>O.selectAll(null).data(e.data).enter().append("circle").attr("cx",e=>C(y(e))).attr("cy",e=>Z(e.price)).attr("r",2).attr("fill","#d9d9d9").attr("clip-path",`url(#${g})`).attr("class",W));if(e.map(s=>O.append("path").datum(s.data).attr("fill","none").attr("stroke",s.color).attr("stroke-width",(e.length,1)).attr("d",Y(C,Z)).attr("clip-path",`url(#${g})`).attr("class","graph__grid__line")),n&&i&&1===e.length){let s=e[0].data,t=s.find(e=>e.price===i.max),l=s.find(e=>e.price===i.min),a=(e,s,t,l=!0)=>O.append("text").attr("x",C(y(e))).attr("y",Z(e.price)+(l?-8:12)).attr("text-anchor","middle").attr("fill",t).attr("font-size","10px").attr("class","ìµê³ "===s?"dot_max_label":"dot_min_label").text(s);t&&a(t,"ìµê³ ","#d84315"),l&&l!==t&&a(l,"ìµì ","#3182f6",!1)}a&&(L.selectAll(".tick").filter((e,s)=>0===s).remove(),O.append("text").attr("x",-9).attr("y",_).attr("dy","-20px").attr("text-anchor","end").attr("font-size","11px").attr("fill","#a9a9a9").text(a));let H=P.YFb(e=>y(e)).left,K=e[0].data;O.append("rect").attr("width",b).attr("height",_).attr("fill","none").attr("pointer-events","all").on("mousemove",function(e){let s;
1let[t]=P.cx$(e),l=C.invert(t),a=H(K,l),r=K[a-1],i=K[a];if(!r&&!i)return;s=r?i&&+l-+y(r)>+y(i)-+l?i:r:i;let n=C(y(s));if(Z(s.price),B.attr("stroke","#464C53").attr("x1",n).attr("x2",n),G.forEach(e=>{e.attr("fill",e=>e.year===s.year&&e.month===s.month?"#464c53":"#d9d9d9").attr("r",e=>e.year===s.year&&e.month===s.month?3:2),e.order(),e.filter(e=>e.year===s.year&&e.month===s.month).raise()}),p(s),j.current&&m.current){j.current.show(),m.current.getBoundingClientRect().width,m.current.getBoundingClientRect().height;let e=j.current.offsetWidth||120;j.current.offsetHeight,u.top;let s=e>n?n+e+5:n-5;j.current.style.transform="",j.current.style.left=`${s}px`,j.current.style.top="20px"}}).on("mouseleave",function(){B.attr("stroke","#D9D9D9"),G.forEach(e=>{e.attr("fill","#d9d9d9").attr("r",2).order()})})},[e,s,t,i,n,d]);let _=e.some(e=>e.label);return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"graph-view",children:[(0,l.jsx)("svg",{ref:m,className:"graph-view__chart",onMouseLeave:()=>{j.current&&j.current.close()}}),(0,l.jsx)("dialog",{ref:j,className:"info_popup",style:{margin:"0",background:"none",pointerEvents:"none"},children:u&&(0,l.jsx)("div",{className:"graph--info_popup",children:b.current(u)})}),_&&(0,l.jsx)("div",{className:"chart-legend",children:e.filter(e=>e.label).map((e,s)=>(0,l.jsxs)("span",{className:"legend-item",children:[(0,l.jsx)("span",{className:"legend-dot",style:{background:e.color}}),e.label]},s))})]})})},R=e=>{if(0===e)return"0ì";let s=Math.round(e/1e4);return s>=1e4?`${parseFloat((s/1e4).toFixed(1))}ìµ`:s>=1e3?`${parseFloat((s/1e3).toFixed(1))}ì²ë§`:`${s}ë§`},O=({arr:e})=>{if(!e?.length)return null;let s=e.slice().sort((e,s)=>e.year-s.year).map(e=>({...e})),t=s.map(e=>e.price),a=Math.max(...t),r=a>0?Math.pow(10,Math.floor(Math.log10(a))):1e7;return e.length>0&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"inner",children:(0,l.jsx)(T,{series:[{data:s,color:"#a0a0a0"}],xGranularity:"year",yDomain:[Math.max(0,Math.min(...t)-r),Math.max(...t)+r],yFormat:e=>{if(0===e)return"0ì";let s=Math.round(e/1e4);return s>=1e4?`${parseFloat((s/1e4).toFixed(1))}ìµ`:s>=1e3?`${parseFloat((s/1e3).toFixed(1))}ì²ë§`:`${s}ë§`},tooltipContent:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("p",{children:[String(e.year).slice(2),"ë
"]}),(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("span",{children:"ê³µìê°ê²©"}),(0,l.jsx)("span",{className:"",children:R(e.price)})]}),null!=e.yoyChange&&(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("span",{children:"ì ë
ëë¹"}),(0,l.jsxs)("span",{className:e.yoyChange>=0?"increase flex-row left":"decrease flex-row left",children:[(0,l.jsx)(C.Z,{color:e.yoyChange>=0?"#d84315":void 0}),Math.abs(e.yoyChange).toFixed(2),"%"]})]})]})})})})},L=({arr:e})=>{let s=(e??[]).map(e=>e.date&&null==e.year?{...e,...E(e.date)}:e),t={};s.forEach(e=>{if(null==e.year||null==e.month)return;let s=`${e.year}-${e.month}`,l=Number(e.price),a=Number(e.jeonse);t[s]||(t[s]={year:e.year,month:e.month,prices:[],jeonses:[]}),l>0&&t[s].prices.push(l),a>0&&t[s].jeonses.push(a)});let a=Object.values(t).filter(e=>e.prices.length>0).map(e=>{let s=Math.round(e.prices.reduce((e,s)=>e+s,0)/e.prices.length),t=e.jeonses.length?Math.round(e.jeonses.reduce((e,s)=>e+s,0)/e.jeonses.length):0,l=s>0?parseFloat((t/s).toFixed(4)):0,a=e.prices.length;return{year:e.year,month:e.month,salePrice:s,jeonsePrice:t,jeonseRatio:l,cnt:a}}).sort((e,s)=>e.year!==s.year?e.year-s.year:e.month-s.month),r=a.map(e=>({year:e.year,month:e.month})),i=Math.max(r.length-1,1),[n,d]=(0,c.useState)({min:0,max:i});if(!s.length||!a.length)return null;let o=r[n.min],h=r[n.max],x=(e,s)=>{if(!o||!h)return!0;let t=e>o.year||e===o.year&&s>=o.month,l=e<h.year||e===h.year&&s<=h.month;return t&&l},m=a.filter(e=>x(e.year,e.month)),j=m.map(e=>({...e,price:e.salePrice})),u=m.filter(e=>e.jeonsePrice>0).map(e=>({...e,price:e.jeonsePrice})),p=s.filter(e=>Number(e.price)>0&&null!=e.year&&null!=e.month&&x(e.year,e.month)).map(e=>({year:e.year,month:e.month,price:Number(e.price)})),g=s.filter(e=>Number(e.jeonse)>0&&null!=e.year&&null!=e.month&&x(e.year,e.month)).map(e=>({year:e.year,month:e.month,price:Number(e.jeonse)})),f=Math.max(...m.map(e=>e.cnt),1);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"inner",children:(0,l.jsx)(T,{series:[{data:j,color:"#003478",label:"매매ê°"},...u.length?[{data:u,color:"#947FFD",label:"ì ì¸ê°"}]:[]],scatterSeries:[{data:p,color:"#003478",opacity:.5},...g.length?[{data:g,color:"#947FFD",opacity:.5}]:[]],barData:m.map(e=>({year:e.year,month:e.month,value:e.cnt})),barLabel:"ê±°ëë",barYMax:f+Math.ceil(2*f),tooltipContent:e=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("p",{children:[String(e.year).slice(2),"ë
",String(e.month).padStart(2,"0"),"ì"]}),(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("span",{children:"íê· ë§¤ë§¤ê°"}),(0,l.jsx)("span",{children:R(e.salePrice)})]}),e.jeonsePrice>0&&(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("span",{children:"íê· ì ì¸ê°"}),(0,l.jsx)("span",{children:R(e.jeonsePrice)})]}),e.jeonseRatio>0&&(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("span",{className:"font-blue text-medium",children:"ì ì¸ê°ì¨"}),(0,l.jsxs)("span",{className:"font-blue text-medium",children:[(100*e.jeonseRatio).toFixed(1),"%"]})]})]})})}),r.length>
11&&(0,l.jsx)("div",{className:"table-graph-title",children:(0,l.jsx)(q,{dates:r,minIdx:n.min,maxIdx:n.max,onChange:(e,s)=>d({min:e,max:s}),dataCnt:m.length,listingType:"ê±°ë"})})]})};var B=t(90674);t(97425),t(49608);var Y=t(89632),W=t(77646);let G=(0,k.default)(()=>Promise.all([t.e(70930),t.e(41766)]).then(t.bind(t,41766)),{loadableGenerated:{webpack:()=>[41766]},ssr:!1}),H=(0,k.default)(()=>Promise.all([t.e(70930),t.e(74577)]).then(t.bind(t,74577)),{loadableGenerated:{webpack:()=>[74577]},ssr:!1}),K=(0,k.default)(()=>Promise.resolve().then(t.bind(t,6406)),{loadableGenerated:{webpack:()=>[6406]},ssr:!1}),X=({query:e,is_search:s})=>{let t=(0,F.wf)();return(0,l.jsx)(G,{map:t,query:e,is_search:!0})},z=()=>{let{MovePage:e}=(0,j.Z)(),s=(0,N.v9)(e=>e.commonStore);return(0,l.jsx)("main",{children:(0,l.jsxs)("div",{className:"empty",children:[(0,l.jsx)("div",{className:"icon"}),(0,l.jsx)("p",{className:"main-text",children:"í´ë¹ 주ìë íì¬ ì¡°íí ì ììµëë¤."}),(0,l.jsxs)("p",{className:"sub-text",children:["ì ì¶ ëë ê±´ì¶ë¬¼ ì ë³´ 미íì¸ì¼ë¡ ì¡°íí ì ììµëë¤.",(0,l.jsx)("br",{}),"ê¶ë¦¬ê´ê³ì ê±´ì¶ë¬¼ ì ë³´ë ìì¬ë±ê¸°ìì íì¸í´ 주ì¸ì."]}),(0,l.jsx)("button",{className:"basic blue small",style:{width:"250px"},onClick:()=>{e({href:s?.isPC?"/pc?juso_focus=true":"/"})},children:"ìì¬ë±ê¸° ë°ê¸í기"})]})})},U=()=>{let{MovePage:e}=(0,j.Z)();return(0,l.jsx)("section",{className:"contents-box","data-section-idx":"2",children:(0,l.jsx)("div",{className:"content",children:(0,l.jsxs)("div",{className:"flex-row sources",children:[(0,l.jsx)("span",{children:"ë°ì´í° ì¶ì²"}),(0,l.jsxs)("button",{onClick:()=>{e({href:"/data-sources"})},className:"gray-btn",children:["ì ì²´ ë°ì´í° ì¶ì²ì ê°±ì 주기 보기"," ",(0,l.jsx)(r.Z,{width:5,color:"#555"})]})]})})})},V=[{title:"ìì¸",idx:0},{title:"건물",idx:2},{title:"ëë¤",idx:3}],J=[{title:"ìì¸",idx:0},{title:"í ì§",idx:1},{title:"건물",idx:2},{title:"ëë¤",idx:3}],Q=({is_dasaedae:e})=>{let s=(0,N.v9)(e=>e.commonStore),t=s?.isPC,a=e?V:J,[r,i]=(0,c.useState)([]),[n,d]=(0,c.useState)(a[0].idx),o=(0,c.useRef)(null);(0,c.useEffect)(()=>{i(a),a.length>0&&d(a[0].idx)},[]);let x=(0,c.useCallback)(e=>{let s=o.current;if(!s)return;let t=s.querySelector(`[data-idx="${e}"]`);t&&s.scrollTo({left:t.offsetLeft-s.clientWidth/2+t.offsetWidth/2,behavior:"smooth"})},[]),m=(0,c.useCallback)(e=>{let s=document.getElementById("AccidentDetail")?.closest(t?".side_toggle_content":".PageTemplate"),l=document.querySelector(`#AccidentDetail section[data-section-idx="${e}"]`);if(!l||!s)return;let a=s.scrollTop+l.getBoundingClientRect().top-s.getBoundingClientRect().top-70;s.scrollTo({top:a,behavior:"smooth"})},[t]);return((0,c.useEffect)(()=>{x(n)},[n,x]),(0,c.useEffect)(()=>{if(!r.length)return;let e=new IntersectionObserver(e=>{let s=e.filter(e=>e.isIntersecting);s.length&&d(Number(s.reduce((e,s)=>e.boundingClientRect.top<s.boundingClientRect.top?e:s).target.dataset.sectionIdx))},{root:document.getElementById("AccidentDetail")?.closest(".side_toggle_content")??null,rootMargin:"-55px 0px -40% 0px",threshold:0});return r.forEach(({idx:s})=>{let t=document.querySelector(`#AccidentDetail section[data-section-idx="${s}"]`);t&&e.observe(t)}),()=>e.disconnect()},[r]),r.length)?(0,l.jsx)("ul",{ref:o,className:"bt-line-tabs sticky",children:r.map((e,s,t)=>{let a=e.title;return(0,l.jsx)("li",{"data-idx":e.idx,className:h()("tabs",{on:n===e.idx}),onClick:()=>{d(e.idx),m(e.idx)},children:a},e.idx)})}):null},ee=({onClick:e,className:s})=>(0,l.jsx)("button",{className:h()("slider-arrow prev",{disabled:s?.includes("slick-disabled")}),onClick:e,children:(0,l.jsx)(r.Z,{width:5,color:"#fff"})}),es=({onClick:e,className:s})=>(0,l.jsx)("button",{className:h()("slider-arrow next",{disabled:s?.includes("slick-disabled")}),onClick:e,children:(0,l.jsx)(r.Z,{width:5,color:"#fff"})}),et=({realtor_li:e,sgg:s})=>{if(!e?.length)return null;let[t,...r]=e,i=(0,N.v9)(e=>e.commonStore),{Set_RealtorProfile:n,ChangeConfirmNotice:d}=(0,m.useModal)(),o=(0,c.useRef)(!1);return(0,l.jsx)("div",{className:"realtor-section","aria-label":"ìì¬ë±ê¸° ì¤ê°ì¬",children:e.length>0&&(0,l.jsxs)("div",{className:"realtor-list mt15",children:[(0,l.jsx)(K,{swipe:!0,arrows:!0,prevArrow:(0,l.jsx)(ee,{}),nextArrow:(0,l.jsx)(es,{}),dots:!1,infinite:!1,speed:300,slidesToShow:1.2,slidesToScroll:1,draggable:!0,touchThreshold:10,beforeChange:()=>{o.current=!0},afterChange:()=>{setTimeout(()=>{o.current=!1},0)},children:e.map((e,t)=>(0,l.jsx)("div",{className:"realtor-card-wrap",children:(0,l.jsxs)("div",{className:h()("realtor-card",e?.id&&"click",0===t&&"realtor-featured"),onClick:()=>{!o.current&&e?.id&&n({...e,realtor_id:e?.id,is_open:!0,ChangeConfirmNotice:d,chat_possible:!i?.isRealtor})},children:[(0,l.jsx)(x.default,{src:e.profile_img||"/asset/img/realtor/profile/realtor-certi-seal-extra.png",alt:e.realtor_name,className:"realtor-card-img"}),(0,l.jsxs)("div",{className:"realtor-card-info",children:[(0,l.jsxs)("p",{className:"realtor-card-name",children:[e.realtor_name," ê³µì¸ì¤ê°ì¬"]}),0===t?(0,l.jsxs)("p",{className:"realtor-featured-comment",children:[s?`${s} `:"","1ë± ìì¬ë±ê¸° ì¤ê°ì¬"]}):(0,l.jsx)("p",{className:"realtor-card-office",children:e.office_name})]}),0===t&&(0,l.jsx)(x.default,{src:a.L_.certi_seal,alt:"",className:"realtor-featured-icon"})]})},e.id))}),e.map(e=>
1(0,l.jsxs)(A.default,{href:`/risk-map/realtor/${e.office_name.replaceAll(" ","")}/${e.id}`,className:"absol",children:[e.realtor_name," ê³µì¸ì¤ê°ì¬"]},`${e.office_name}-${e.realtor_name}-link`))]})})},el=({bld_data:e,auction_data:s,pyeong_info:t})=>{let{base_info:n}=s||{base_info:null},{ChangeConfirmNotice:d}=(0,m.useModal)();return(0,l.jsxs)("section",{className:"main-section","aria-label":"건물 기본 ì ë³´",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"location-data",children:[e?.sido,e?.sgg,e?.emd,e?.bld_type].filter(e=>e&&e.length>0).map((e,s,t)=>(0,l.jsxs)(c.Fragment,{children:[0===s&&(0,l.jsx)(x.default,{src:a._s.location,alt:""}),(0,l.jsx)("span",{className:String(3===s&&"text-semibold"),children:e}),s<t.length-1&&(0,l.jsx)(r.Z,{color:"#999"})]},s))}),(0,l.jsxs)("div",{className:h()("flex-col left mt15"),children:[(0,l.jsx)("h1",{children:n?.bld_name||n?.address}),!!n?.bld_name&&(0,l.jsx)("small",{children:n?.address})]})]}),(0,l.jsxs)("dl",{className:"common-info-list",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ì©ë"}),(0,l.jsx)("dd",{children:n?.usage||"ì ë³´ ìì"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ì¸ë ì"}),(0,l.jsx)("dd",{children:n?.households?(0,i.oC)(n?.households)+`ì¸ë(${(0,i.oC)(n?.dong_count)}ê°ë)`:"ì ë³´ ìì"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"íí"}),(0,l.jsxs)("dd",{className:"flex-row left ellipsis",children:[(0,l.jsx)("p",{children:n?.pyeong||"ì ë³´ ìì"}),t.length>0&&(0,l.jsx)("button",{style:{width:"fit-content"},onClick:()=>{d({title:(0,l.jsx)(l.Fragment,{children:"íí(ë©´ì ) ìì¸ ì ë³´"}),text:(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"table-box mt25",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"íí"}),(0,l.jsx)("th",{children:"ë©´ì "}),(0,l.jsx)("th",{children:"ì¸ë ì"})]})}),(0,l.jsx)("tbody",{children:t.map((e,s)=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:e.pyeong}),(0,l.jsxs)("td",{children:["ì ì© ",e.priv_area,"m\xb2"]}),(0,l.jsxs)("td",{children:[e.households," ì¸ë"]})]},`${s}+${e.pyeong}`))})]})})})})},children:(0,l.jsx)(r.Z,{width:5,color:"#1d1d1d"})})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ì°ì"}),(0,l.jsx)("dd",{children:n?.age||"ì ë³´ ìì"})]})]}),s?.realtor_li?.length>0&&(0,l.jsx)(et,{realtor_li:s.realtor_li,sgg:e?.sgg})]})},ea=({bld_data:e,bld_pk:s,initialTransactionData:t=null})=>{let n=[{name:"매매",type:"0",category:"sale"},{name:"ì ì¸",type:"1",category:"jeonse"},{name:"ìì¸",type:"2",category:"monthly"},e?.is_dasaedae&&{name:"ì ì¸ê°ì¨",type:"3",category:"ratio"}].filter(Boolean),{ChangeConfirmNotice:o}=(0,m.useModal)(),{MovePage:u}=(0,j.Z)(),[g,b]=(0,c.useState)(n[0]),[_,N]=(0,c.useState)(),[y,v]=(0,c.useState)(),w=_??y,[k,$]=(0,c.useState)(),[S,C]=(0,c.useState)(5),[F,M]=(0,c.useState)({key:"date",dir:"desc"}),{data:A,isPending:D}=(0,p.a)({queryKey:["transaction_price_data",s,g?.category,_?.priv_area||"","not-loading"],queryFn:()=>(0,i.Fi)("get",(0,f.nW)(`https://api.safehomes.kr/maps/bld/real-price/${s}?category=${g?.category}${_?`&area=${_?.priv_area||""}`:""}`,e?.sido,e?.sgg)).then(e=>e.data.data),enabled:!!s,initialData:_||g?.type!=="0"?void 0:t??void 0,staleTime:t?1/0:0});return(0,c.useEffect)(()=>{if(A&&(A?.comment&&$(A?.comment),A?.price_info?.area)){let e=A?.pyeong_info?.find(e=>e.priv_area==A?.price_info?.area);e&&v(e)}},[A]),(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("section",{className:"table-graph-view","aria-label":"ì¤ê±°ëê°","data-section-idx":"0",children:[(0,l.jsx)("h2",{className:"section-title",children:"ì¤ê±°ëê°"}),(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("ul",{className:"tab-menu",children:n?.map((e,s)=>l.jsx("li",{className:h()("tabs",{active:g.type==e.type}),onClick:()=>{b(e)},children:e.name},`ì¤ê±°ëê°-${e.name}-${e.type}-${s}`))}),(0,l.jsxs)("button",{className:"flex-row center gray pyeong",disabled:0==(A?.pyeong_info||[]).length,onClick:()=>{o({title:"íí(ë©´ì ) ì í",text:(0,l.jsx)(er,{select:e=>{N(e),o(null),b(n[0])},selected:w,arr:A?.pyeong_info}),buttons:[{text:"ë«ê¸°",className:"gray",onClick:()=>{},close:!0}]})},children:[(A?.pyeong_info||[]).length>0?w?.pyeong||"":"ë¨ì¼ë©´ì "," ",(0,l.jsx)(r.Z,{})]})]}),D&&(0,l.jsx)(eN,{}),!A?.is_dasaedae&&A?.price_info?.summary?.recent&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("dl",{className:"dl-box",children:"2"!==g.type?(0,l.jsxs)("div",{className:"lg",children:[(0,l.jsxs)("dt",{className:"text-medium",children:["ìµê·¼ ",g.name,"ê°"]}),(0,l.jsxs)("dd",{children:[(0,i.dN)(A.price_info.summary.recent.price||A.price_info.summary.recent.deposit||"-"),(0,l.jsx)("div",{className:"font-light-gray",children:[d()(A.price_info.summary.recent.date).format("YY.MM.DD")].join(" \xb7 ")})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("dt",{children:"ë³´ì¦ê¸"}),(0,l.jsx)("dd",{children:(0,i.dN)(A.price_info.summary.recent?.deposit)})]}),(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("dt",{children:"ì°¨ì"}),(0,l.jsx)("dd",{children:(0,i.dN)(A.price_info.summary.recent?.monthly_rent||"-")})]})]})}),(0,l.jsx)(Z,{arr:A.price_info.list.map(e=>({...e,price:Number(e.price||e.deposit),year:Number(e.date.split(".")[0]||2026),month:Number(e.date.split(".")[1]||2026)})),listingType:g.name})]}),A?.is_dasaedae&&A?.price_info&&("3"!==g.type?(0,l.jsxs)(l.Fragment,{children:[A.price_info?.summary&&A.price_info?.summary?.recent&&(0,l.jsxs)("dl",{className:"dl-box",children:[(0,l.jsxs)("div",{className:"lg",children:[(0,l.jsxs)("dt",{className:"text-medium",children:["ìµê·¼ ",g.name,"ê°"]}),(0,l.jsxs)("dd",{children:[(0,i.dN)(A.price_info.summary.recent.price||A.price_info.summary.recent.deposit||"-"),(0,l.jsx)("div",{className:"font-light-gray",children:[A.price_info.summary.recent.floor+"층",A.price_info.summary.recent.date.slice(2)].join(" \xb7 ")})]})]}),(0,l.jsx)(l.Fragment,{}),(0,l.jsx)("div",{className:"bt-line"}),"2"===g.type?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("dt",{children:"ë³´ì¦ê¸"}),(0,l.jsx)("dd",{children:(0,i.dN)(A.price_info.summary.recent?.deposit)})]}),(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("dt",{children:"ì°¨ì"}),(0,l.jsx)("dd",{children:(0,i.dN)(A.price_info.summary.recent?.monthly_rent||"-")})]})]}):(0,l.jsxs)(l.Fragment,{children:[A.price_info?.summary?.previous&&(0,l.jsxs)("div",{className:"",children:[(0,l.jsxs)("dt",{children:["ì§ì ",g.name,"ê°"]}),(0,l.jsxs)("dd",{children:[(0,i.dN)(A.price_info.summary?.previous?.price),(0,l.jsx)("div",{className:"font-light-gray",children:[A.price_info?.summary?.previous.floor+"층",A.price_info.summary?.previous?.date.slice(2)].join(" \xb7 ")})]})]}),(0,l.jsxs)("div",{className:"",children:[(0,l.jsxs)("dt",{children:[(0,l.jsx)("span",{className:"font-red",children:"ìµê³ "})," ",g.name,"ê°"]}),(0,l.jsxs)("dd",{children:[(0,i.dN)(A.price_info.summary.highest.price),(0,l.jsx)("div",{className:"font-light-gray",children:[A.price_info.summary.highest.floor+"층",A.price_info.summary.highest.date.slice(2)].join(" \xb7 ")})]})]})]})]}),(0,l.jsx)(Z,{arr:A.price_info.list.map(e=>({...e,price:Number(e.price||e.deposit),year:Number(e.date.split(".")[0]||2026),month:Number(e.date.split(".")[1]||2026)})),listingType:g.name})]}):(0,l.jsxs)(l.Fragment,{children:[A.price_info?.summary&&A.price_info.summary?.ratio&&(0,l.jsxs)("dl",{className:"dl-box",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ì ì¸ê°ì¨"}),(0,l.jsxs)("dd",{children:[A?.price_info.summary?.ratio?.ratio,(0,l.jsx)("div",{className:"font-light-gray",children:A?.price_info.summary?.ratio?.date})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"매매/ì ì¸ìì¸ì°¨"}),(0,l.jsx)("dd",{children:(0,i.dN)(A?.price_info.summary?.gap||0)})]}),(0,l.jsx)("div",{className:"bt-line"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"매매ê°"}),(0,l.jsxs)("dd",{children:[(0,i.dN)(A?.price_info.summary?.sale.price),(0,l.jsx)("div",{className:"font-light-gray",children:A?.price_info.summary?.sale.date})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ì ì¸ê°"}),(0,l.jsxs)("dd",{children:[(0,i.dN)(A?.price_info.summary?.jeonse.price),(0,l.jsx)("div",{className:"font-light-gray",children:A?.price_info.summary?.jeonse.date})]})]})]}),(0,l.jsx)(L,{arr:A.price_info.list.map(e=>({...e,jeonse:Number(e.jeonse||e.deposit),price:Number(e.sale||e.price),year:Number(e.date.split(".")[0]||2026),month:Number(e.date.split(".")[1]||2026)}))})]})),A?.price_info?.list.length>0?(0,l.jsxs)("div",{className:"table-box",children:[(0,l.jsx)("div",{className:"caption",children:"ì¶ì²: êµí êµíµë¶ ì¤ê±°ëê° ê³µê°ìì¤í
"}),(0,l.jsxs)("table",{children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{width:60}),(0,l.jsx)("col",{width:40}),(0,l.jsx)("col",{width:"*"}),A.price_info.list[0].dong&&(0,l.jsx)("col",{width:60}),A.price_info.list[0].floor&&(0,l.jsx)("col",{width:50}),A.price_info.list[0].ratio&&(0,l.jsx)("col",{width:80})]}),(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"click small",onClick:()=>{M(e=>({key:"date",dir:"date"===e.key&&"desc"===e.dir?"asc":"desc"})),C(5)},children:(0,l.jsxs)("div",{className:"flex-row center",children:["ë ì§",(0,l.jsx)(x.default,{src:a.qx.sort,alt:""})]})}),(0,l.jsx)("th",{className:"small",children:"ì¼"}),(0,l.jsx)("th",{className:"click small",onClick:()=>{M(e=>({key:"price",dir:"price"===e.key&&"desc"===e.dir?"asc":"desc"})),C(5)},children:(0,l.jsxs)("div",{className:"flex-row center",children:["ì¤ê±°ëê°",(0,l.jsx)(x.default,{src:a.qx.sort,alt:""})]})}),A.price_info.list[0].dong&&(0,l.jsx)("th",{className:"small",children:"ë"}),A.price_info.list[0].floor&&(0,l.jsx)("th",{className:"small",children:"층"}),A.price_info.list[0].ratio&&(0,l.jsx)("th",{className:"small",children:"ì ì¸ê°ì¨"})]})}),(0,l.jsx)("tbody",{children:(()=>{let e=Number(A.price_info.summary?.highest?.price||A.price_info.summary?.highest?.deposit||"0");return[...A.price_info.list].sort((e,s)=>{if("date"===F.key){let t=e.date.replace(/\./g,""),l=s.date.replace(/\./g,"");return"asc"===F.dir?t.localeCompare(l):l.localeCompare(t)}{let t=Number(e.sale||e.price||e.deposit),l=Number(s.sale||s.price||s.deposit);return"asc"===F.dir?t-l:l-t}}).slice(0,S).map((s,t)=>{let[a,r,n]=s.date.split("."),d=Number(s?.sale||s?.price||s?.deposit),c=d===e;return(0,l.jsxs)("tr",{children:[(0,l.jsxs)("td",{children:[String(a).slice(2),".",r]}),(0,l.jsx)("td",{children:n}),(0,l.jsx)("td",{className:c?"font-red":"",children:(0,i.dN)(d)}),A.price_info.list[0].dong&&(0,l.jsx)("td",{children:s.dong??"-"}),A.price_info.list[0].floor&&(0,l.jsxs)("td",{children:[s.floor||"-","층"]}),A.price_info.list[0].ratio&&(0,l.jsx)("td",{children:s.ratio||"-"})]},t)})})()})]}),A.price_info.list.length>S&&(0,l.jsxs)("button",{className:"more-btn flex-row center mt10",onClick:()=>C(e=>e+5),children:["ê±°ëë´ì ë보기 ",(0,l.jsx)(r.Z,{color:"#555",width:6})]})]}):(0,l.jsx)(l.Fragment,{}),(0,l.jsx)(ev,{comment:k}),(0,l.jsxs)("button",{className:"border-focus-button flex-row",onClick:()=>{u({href:"/",isPC:!0})},children:[(0,l.jsx)(x.default,{src:a.T_.certi_mark,alt:""}),(0,l.jsxs)("div",{className:"flex-row left",children:[(0,l.jsx)("span",{className:"name",children:e?.base_info?.bld_name}),(0,l.jsx)("span",{children:"ê³ì½ ì§í ê°ë¥ ìí íì¸"})]}),(0,l.jsx)(r.Z,{color:"#003478",width:5})]})]})})},er=({select:e,selected:s,arr:t})=>{let a=(0,N.v9)(e=>e.commonStore);return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"flex-col mt25",style:{gap:"15p
1x"},children:t.map((t,r)=>(0,l.jsxs)("div",{className:"prw",children:[(0,l.jsx)("input",{type:"radio",className:a.isPC?"radio-type-i b":"input-radio",id:t.pyeong+"-"+t.area,checked:s.pyeong==t.pyeong&&s.area==t.area,onChange:()=>{e(t)}}),(0,l.jsx)("label",{htmlFor:t.pyeong+"-"+t.area,children:(0,l.jsxs)("p",{className:"flex-row",children:[(0,l.jsxs)("span",{children:[t.pyeong,"(ì ì© ",t.priv_area,"m\xb2)"]}),(0,l.jsxs)("span",{children:[t.households,"ì¸ë"]})]})})]},t.pyeong+"-"+t.area+r))})})},ei=({bld_pk:e,bld_data:s,initialRealtyData:t=null})=>{let n=t?t.dong_ho_list?.find(e=>e.dong==t.dong&&e.ho==t.ho):void 0,[o,m]=(0,c.useState)(n),{data:j,isPending:u}=(0,p.a)({queryKey:["realty_price_data",e,o?.price_pk,"not-loading"],queryFn:()=>(0,i.Fi)("get",(0,f.nW)(`https://api.safehomes.kr/maps/bld/public-price/${e}${o?`?price_pk=${o?.price_pk}`:""}`,s?.sido,s?.sgg)).then(e=>e.data.data),enabled:!!e&&!!o?.price_pk,initialData:o===n?t??void 0:void 0,staleTime:t?1/0:0}),[g,b]=(0,c.useState)({key:"year",dir:"desc"}),[_,N]=(0,c.useState)(5);(0,c.useEffect)(()=>{j&&m(j.dong_ho_list.find(e=>e.dong==j?.dong&&e.ho==j?.ho))},[j]);let y=[...new Map((j?.dong_ho_list??[]).map(e=>[e.dong,{dong:e.dong,name:e.dong||"ë ëª
ì¹ ìì"}])).values()];return(0,l.jsxs)("section",{className:"table-graph-view","aria-label":"주í ê°ê²©","data-section-idx":"0",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:"주í ê°ê²©"}),j?.list?.[0]&&(0,l.jsxs)("span",{className:"title-sm font-light-gray",children:[d()([j?.list[0]?.year,j?.list[0]?.month||1,j?.list[0]?.day||1].join("/")).format("YY.MM.DD")," ","기ì¤"]})]}),u&&(0,l.jsx)(eN,{}),(j?.dong_ho_list??[]).length>0&&(0,l.jsxs)("div",{className:"flex-row ",children:[y?.length>0&&(0,l.jsx)(B.R,{select_list:y,select:e=>{m(s=>({...s,dong:e.dong,ho:null}))},selected:o?.dong,placeholder:"ë ì í",link:!1}),(0,l.jsx)(B.R,{select_list:j?.dong_ho_list.filter(e=>e.dong===o?.dong).map(e=>({...e,name:e.ho,link:`?detail_addr=${[e.dong,e.ho].join("+")}`})),select:e=>{m(e)},selected:o?.ho,placeholder:"í¸ ì í",link:!1})]}),j?.summary&&(0,l.jsxs)("dl",{className:"dl-box",children:[(0,l.jsxs)("div",{className:"lg",children:[(0,l.jsx)("dt",{className:"text-medium",children:"ê³µìê°ê²©"}),(0,l.jsx)("dd",{children:(0,i.dN)(j?.summary?.price)})]}),(0,l.jsx)("div",{className:"bt-line"}),j?.summary?.yoy&&(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("dt",{children:"ì ë
ëë¹"}),(0,l.jsxs)("dd",{children:[j?.summary?.yoy.rate!=0?(0,l.jsxs)("span",{className:h()(j?.summary?.yoy.rate>0?"increase":"decrease"),children:[(0,l.jsx)(C.Z,{width:7,color:j?.summary?.yoy.rate>0?"#D84315":void 0}),Math.abs(j?.summary?.yoy.rate),"%"]}):"-",(0,l.jsx)("small",{className:"font-light-gray",children:j?.summary?.yoy.diff})]})]}),j?.summary?.vs_sale&&(0,l.jsxs)("div",{className:"",children:[(0,l.jsxs)("dt",{children:["매매 ì¤ê±°ëê° ëë¹"," ",(0,l.jsxs)("small",{className:"font-light-gray",children:["ëì¼ ë©´ì 기ì¤(",j?.summary?.vs_sale.area,"m\xb2)"]})]}),(0,l.jsxs)("dd",{children:[j?.summary?.vs_sale.rate&&(0,l.jsxs)("span",{className:h()(j?.summary?.vs_sale.rate>0?"increase":"decrease"),children:[(0,l.jsx)(C.Z,{width:7,color:j?.summary?.vs_sale.rate>0?"#D84315":void 0}),Math.abs(j?.summary?.vs_sale.rate),"%"]}),(0,l.jsx)("small",{className:"font-light-gray",children:(0,i.dN)(j?.summary?.vs_sale.price)})]})]})]}),(0,l.jsx)(O,{arr:j?.list?.map(e=>({year:Number(e.year),price:Number(e.price),yoyChange:e.rate}))}),(j?.list??[]).length>0?(0,l.jsxs)("div",{className:"table-box",children:[(0,l.jsxs)("div",{className:"caption",children:["ì¶ì²: ",j?.source]}),(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"click",onClick:()=>{b(e=>({key:"year",dir:"year"===e.key&&"desc"===e.dir?"asc":"desc"})),N(5)},children:(0,l.jsxs)("div",{className:"flex-row center",children:["ë
ë",(0,l.jsx)(x.default,{src:a.qx.sort,alt:""})]})}),(0,l.jsx)("th",{className:"click",onClick:()=>{b(e=>({key:"price",dir:"price"===e.key&&"desc"===e.dir?"asc":"desc"})),N(5)},children:(0,l.jsxs)("div",{className:"flex-row center",children:["ê³µìê°ê²©",(0,l.jsx)(x.default,{src:a.qx.sort,alt:""})]})}),(0,l.jsx)("th",{children:"ì ë
ëë¹"})]})}),(0,l.jsx)("tbody",{children:[...j?.list??[]].sort((e,s)=>"year"===g.key?"asc"===g.dir?Number(e.year)-Number(s.year):Number(s.year)-Number(e.year):"asc"===g.dir?Number(e.price)-Number(s.price):Number(s.price)-Number(e.price)).slice(0,_).map((e,s)=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:e.year}),(0,l.jsx)("td",{children:(0,i.dN)(Number(e.price))}),(0,l.jsx)("td",{children:null!=e.rate?(0,l.jsxs)("span",{children:[e.rate>0&&"+",e.rate,"%"]}):"-"})]},s))})]}),(j?.list?.length??0)>_&&(0,l.jsxs)("button",{className:"more-btn flex-row center mt10",onClick:()=>N(e=>e+5),children:["ë보기 ",(0,l.jsx)(r.Z,{color:"#555",width:6})]})]}):(0,l.jsx)(l.Fragment,{}),(0,l.jsx)(ev,{comment:j?.comment})]})},en=({bld_data:e,bld_pk:s,initialAreaData:t=null})=>{let{data:n}=(0,p.a)({queryKey:["area_price_data",s,"not-loading"],queryFn:()=>(0,i.Fi)("get",(0,f.nW)(`https://api.safehomes.kr/maps/bld/land-price/${s}`,e?.sido,e?.sgg)).then(e=>e.data.data),enabled:!!s,initialData:t??void 0,staleTime:t?1/0:0}),[o,m]=(0,c.useState)({key:"year",dir:"desc"}),[j,u]=(0,c.useState)(5);
1return(0,l.jsxs)("section",{className:"table-graph-view","aria-label":"í ì§ ê°ê²©","data-section-idx":"0",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:"í ì§ ê°ê²©"}),n?.list[0]&&(0,l.jsxs)("span",{className:"title-sm font-light-gray",children:[d()([n?.list[0]?.year,n?.list[0]?.month||1,n?.list[0]?.day||1].join("/")).format("YY.MM.DD")," ","기ì¤"]})]}),n?.summary&&(0,l.jsxs)("dl",{className:"dl-box",children:[(0,l.jsxs)("div",{className:"lg",children:[(0,l.jsx)("dt",{className:"text-medium",children:"ê°ë³ê³µìì§ê°"}),(0,l.jsx)("dd",{children:(0,i.dN)(n?.summary?.price)})]}),(0,l.jsx)("div",{className:"bt-line"}),(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("dt",{children:"ì ë
ëë¹"}),(0,l.jsxs)("dd",{children:[n?.summary?.yoy?.rate!=0?(0,l.jsxs)("span",{className:h()(n?.summary?.yoy?.rate>0?"increase":"decrease"),children:[(0,l.jsx)(C.Z,{width:7,color:n?.summary?.yoy?.rate>0?"#D84315":void 0}),n?.summary?.yoy.rate,"%"]}):"-",(0,l.jsx)("small",{className:"font-light-gray",children:n?.summary?.yoy.diff})]})]}),(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("dt",{children:"ì§ëª©"}),(0,l.jsx)("dd",{children:n?.summary?.jimok})]}),(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("dt",{children:"건물 ëì§ë©´ì "}),(0,l.jsx)("dd",{children:(0,i.oC)(n?.summary?.land_area)+"ã¡"})]})]}),(0,l.jsx)(O,{arr:n?.list?.map(e=>({year:Number(e.year),price:Number(e.price),yoyChange:e.rate}))}),n?.list.length>0?(0,l.jsxs)("div",{className:"table-box",children:[(0,l.jsxs)("div",{className:"caption",children:["ì¶ì²: ",n?.source]}),(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"click",onClick:()=>{m(e=>({key:"year",dir:"year"===e.key&&"desc"===e.dir?"asc":"desc"})),u(5)},children:(0,l.jsxs)("div",{className:"flex-row center",children:["ë
ë",(0,l.jsx)(x.default,{src:a.qx.sort,alt:""})]})}),(0,l.jsx)("th",{className:"click",onClick:()=>{m(e=>({key:"price",dir:"price"===e.key&&"desc"===e.dir?"asc":"desc"})),u(5)},children:(0,l.jsxs)("div",{className:"flex-row center",children:["ê³µìê°ê²©",(0,l.jsx)(x.default,{src:a.qx.sort,alt:""})]})}),(0,l.jsx)("th",{children:"ì ë
ëë¹"})]})}),(0,l.jsx)("tbody",{children:[...n?.list??[]].sort((e,s)=>"year"===o.key?"asc"===o.dir?Number(e.year)-Number(s.year):Number(s.year)-Number(e.year):"asc"===o.dir?Number(e.price)-Number(s.price):Number(s.price)-Number(e.price)).slice(0,j).map((e,s)=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:e.year}),(0,l.jsxs)("td",{children:[(0,i.dN)(Number(e.price)),"/m\xb2"]}),(0,l.jsx)("td",{children:null!=e.rate?(0,l.jsxs)("span",{children:[e.rate>0&&"+",e.rate,"%"]}):"-"})]},s))})]}),(n?.list?.length??0)>j&&(0,l.jsxs)("button",{className:"more-btn flex-row center mt10",onClick:()=>u(e=>e+5),children:["ë보기 ",(0,l.jsx)(r.Z,{color:"#555",width:6})]})]}):(0,l.jsx)(l.Fragment,{}),(0,l.jsx)(ev,{comment:n?.comment})]})},ed=[{name:"ì¤ì ê²½ê´ê´ë¦¬êµ¬ì",bg:"transparent",border:"#333333"},{name:"ì¼ë°ì£¼ê±°êµ¬ì",bg:"transparent",border:"#CCCC00"},{name:"ì°êµ¬ê°ë°í¹êµ¬",bg:"transparent",border:"#9900CC"},{name:"ëìì§ì",bg:"transparent",border:"#333333"},{name:"ì 2ì¢
ì¼ë°ì£¼ê±°ì§ì",bg:"#9A9A00",border:"#9A9A00"},{name:"ì 3ì¢
ì¼ë°ì£¼ê±°ì§ì",bg:"#7A7A00",border:"#7A7A00"},{name:"êµê°ì°ì
ë¨ì§",bg:"transparent",border:"#FF6600"},{name:"ê°ì¶ì¬ì¡ì í구ì",bg:"transparent",border:"#333333"},{name:"ê´ê´í¹êµ¬",bg:"transparent",border:"#CCCC00"},{name:"ìë¡2ë¥(í 8m~10m)",bg:"transparent",border:"#EE0000"},{name:"ìë¡3ë¥(í 8m 미ë§)",bg:"transparent",border:"#EE0000"},{name:"ë²ì ë",bg:"transparent",border:"#C0A878"},{name:"ì§ìê· íê°ë°ë°ì¤ì기ì
ì¡ì±ë¯¸ë¶ë¥",bg:"transparent",border:"#333333"}],ec=({bld_pk:e,initialLandInfo:s=null,initialLandUsePlan:t=null})=>{let{MovePage:a}=(0,j.Z)(),[n,o]=(0,c.useState)(!1),{data:m,isPending:u}=(0,p.a)({queryKey:["land_info_data",e,"not-loading"],queryFn:()=>(0,i.Fi)("get",`https://api.safehomes.kr/maps/bld/land-info/${e}`).then(e=>e.data.data),enabled:!!e,initialData:s??void 0,staleTime:s?1/0:0}),{data:g,isPending:f}=(0,p.a)({queryKey:["land_use_plan_data",e,"not-loading"],queryFn:()=>(0,i.Fi)("get",`https://api.safehomes.kr/maps/bld/land-use-plan/${e}`).then(e=>e.data.data),enabled:!!e,initialData:t??void 0,staleTime:t?1/0:0}),b=(e,s)=>e.filter(e=>e.status===s).map(e=>e.name).join(", ")||"-",_=m?.base_info;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("section",{"data-section-id
1x":"1",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:"í ì§ ì ë³´"}),(0,l.jsx)("p",{className:"font-light-gray title-sm",children:"í ì§(ìì¼)ëì¥ ë±ë³¸ 기ì¤"})]}),u?(0,l.jsx)(eN,{}):(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{width:130}),(0,l.jsx)("col",{width:"*"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ë©´ì "}),(0,l.jsx)("td",{className:"left",children:_?.area!=null?`${_.area.toLocaleString()}ã¡(${_.pyeong}í)`:"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ì§ëª©"}),(0,l.jsx)("td",{className:"left",children:_?.jimok??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ì©ëì§ì"}),(0,l.jsx)("td",{className:"left",children:_?.use_zone??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ì´ì©ìí©"}),(0,l.jsx)("td",{className:"left",children:_?.land_use_status??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ëë¡ì ë©´"}),(0,l.jsx)("td",{className:"left",children:_?.road_contact??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ì§íëì´"}),(0,l.jsx)("td",{className:"left",children:_?.terrain_height??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ì§ííì"}),(0,l.jsx)("td",{className:"left",children:_?.shape??"-"})]})]})]})}),(0,l.jsx)(ev,{comment:_?.comment})]}),(0,l.jsxs)("section",{children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:"í ì§ì´ì©ê³í"}),(0,l.jsx)("p",{className:"font-light-gray title-sm",children:"í ì§ì´ì©ê³íì 기ì¤"})]}),f?(0,l.jsx)(eN,{}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"table-box",children:[(0,l.jsx)("p",{className:"box-title",children:"êµí ì ê³í ë° ì´ì©ì ê´í ë²ë¥ "}),(0,l.jsxs)("table",{children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{width:60}),(0,l.jsx)("col",{width:"*"})]}),(0,l.jsx)("tbody",{children:["í¬í¨","ì ì´","ì í¨"].map(e=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:e}),(0,l.jsx)("td",{className:"left",children:b(g?.national_land_plan_act??[],e)})]},e))})]})]}),(0,l.jsxs)("div",{className:"table-box",children:[(0,l.jsx)("p",{className:"box-title",children:"기íë²ë¥ "}),(0,l.jsxs)("table",{children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{width:60}),(0,l.jsx)("col",{width:"*"})]}),(0,l.jsx)("tbody",{children:["í¬í¨","ì ì´","ì í¨"].map(e=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:e}),(0,l.jsx)("td",{className:"left",children:b(g?.other_acts??[],e)})]},e))})]})]}),(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("span",{className:"text-medium",style:{fontSize:"15px"},children:"í ì§ì´ì©ê³íì"}),g?.print_url&&(0,l.jsxs)("button",{className:"ho-reg-btn flex-row center",onClick:()=>{a({href:g.print_url,blank:!0})},children:["ì´ë ",(0,l.jsx)(r.Z,{color:"#555",width:5})]})]}),(0,l.jsxs)("small",{className:"font-light-gray",children:[d()().format("YY.MM.DD")," 기ì¤"]})]}),g?.image_url&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(x.default,{src:g.image_url,alt:"í ì§ì´ì©ê³í",className:"land-use-plan-img"}),(0,l.jsx)("div",{className:"bt-dashed"}),(0,l.jsxs)("div",{className:"land-use-legend",children:[(0,l.jsxs)("div",{className:"land-use-legend-header flex-row",onClick:()=>o(e=>!e),children:[(0,l.jsx)("span",{children:"ë²ë¡"}),(0,l.jsx)("span",{className:h()("floor-arrow",{open:n}),children:(0,l.jsx)(r.Z,{color:"#555",width:6})})]}),n&&(0,l.jsx)("div",{className:"land-use-legend-grid mt10",children:ed.map(e=>(0,l.jsxs)("div",{className:"land-use-legend-item",children:[(0,l.jsx)("span",{className:"land-use-legend-square",style:{background:e.bg,border:`1.5px solid ${e.border}`}}),(0,l.jsx)("span",{children:e.name})]},e.name))})]})]})]}),(0,l.jsx)(ev,{comment:g?.comment})]}),(0,l.jsxs)("section",{children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:"í ì§ ì´ë(ë³ë) ì¬ì "}),(0,l.jsx)("p",{className:"font-light-gray title-sm",children:"í ì§(ìì¼)ëì¥ ë±ë³¸ 기ì¤"})]}),u?(0,l.jsx)(eN,{}):m?.move_history?.list.length>0?(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ì¼ì"}),(0,l.jsx)("th",{children:"ì¬ì "})]})}),(0,l.jsx)("tbody",{children:(m?.move_history?.list??[]).map((e,s)=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:e.move_date}),(0,l.jsx)("td",{children:e.move_reason})]},s))})]})}):(0,l.jsx)(l.Fragment,{}),(0,l.jsx)(ev,{comment:m?.move_history?.comment})]})]})},eo=({bld_data:e,bld_pk:s,initialViolationData:t=null,initialFloorData:a=null,initialHoData:r=null})=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("section",{"aria-label":"건물 ìì¸ ì ë³´","data-section-id
1x":"2",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:"건물 ìì¸ ì ë³´"}),(0,l.jsx)("p",{className:"font-light-gray title-sm",children:e?.detail_info?.source})]}),(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{width:130}),(0,l.jsx)("col",{width:"*"})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"건물ëª
"}),(0,l.jsx)("td",{className:"left",children:e?.detail_info?.bld_name??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"주ì©ë"}),(0,l.jsx)("td",{className:"left",children:e?.detail_info?.main_usage??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"기íì©ë"}),(0,l.jsx)("td",{className:"left",children:e?.detail_info?.etc_usage??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ì¸ë ì"}),(0,l.jsx)("td",{className:"left",children:e?.detail_info?.households!=null?`${e.detail_info.households.toLocaleString()}ì¸ë`:"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"층 ì ë³´"}),(0,l.jsx)("td",{className:"left",children:e?.detail_info?.floors??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"주차 ëì"}),(0,l.jsx)("td",{className:"left",children:e?.detail_info?.parking_count!=null?`${e.detail_info.parking_count.toLocaleString()}ë`:"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ì¹ê°ê¸° ì"}),(0,l.jsx)("td",{className:"left",children:e?.detail_info?.elevator_count!=null?`${e.detail_info.elevator_count}ë`:"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ì©ì ë¥ /ê±´íì¨"}),(0,l.jsxs)("td",{className:"left",children:[e?.detail_info?.floor_area_ratio??"-"," /"," ",e?.detail_info?.building_coverage_ratio??"-"]})]})]})]})}),(0,l.jsx)(ev,{comment:""})]}),(0,l.jsx)(em,{bld_pk:s,bld_data:e,initialViolationData:t}),(0,l.jsx)(ef,{bld_pk:s,bld_data:e,initialFloorData:a}),e?.is_dasaedae&&(0,l.jsx)(eb,{bld_pk:s,bld_data:e,initialHoData:r}),e?.is_dasaedae&&(0,l.jsx)(eh,{bld_data:e}),(0,l.jsx)(ex,{bld_data:e})]}),eh=({bld_data:e})=>{let s=e?.bld_use_info?.list??[],t=e?.bld_use_info?.all_usage??[],a=e?.bld_use_info?.comment??"",[r,n]=(0,c.useState)(!1),d=s.reduce((e,s)=>e+s.total_floor_area,0),o=["#2B4880","#7A95B4","#BBC9D8","#D9E2EA"],h=e=>{let s=e.match(/\(([^)]+)\)/);if(s)return s[1];let t=e.split(",")[0].trim();return t.length>8?t.slice(0,8)+"â¦":t},x=s.map((e,s)=>({...e,label:h(e.etc_usage),pct:d>0?e.total_floor_area/d*100:0,color:o[s%o.length]})),m=e=>{let s=(e-90)*Math.PI/180;return{x:60+58*Math.cos(s),y:60+58*Math.sin(s)}},j=(e,s)=>{if(s>=359.99)return"M 60 2 A 58 58 0 1 1 59.999 2 Z";let t=m(e),l=m(e+s);return`M 60 60 L ${t.x.toFixed(3)} ${t.y.toFixed(3)} A 58 58 0 ${s>180?1:0} 1 ${l.x.toFixed(3)} ${l.y.toFixed(3)} Z`},u=0,p=x.map(e=>{let s=u,t=e.pct/100*360;return u+=t,{...e,start:s,sweep:t}});return s.length?(0,l.jsxs)("section",{className:"table-graph-view","data-section-idx":"2","aria-label":"건물 ì©ë",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:"건물 ì©ë"}),(0,l.jsx)("p",{className:"font-light-gray title-sm",children:"ê±´ì¶ë¬¼ëì¥ ì©ëë³ ë©´ì 기ì¤"})]}),(0,l.jsxs)("div",{className:"usage-chart-row",children:[(0,l.jsx)("svg",{width:120,height:120,viewBox:"0 0 120 120",className:"usage-pie",children:p.map((e,s)=>(0,l.jsx)("path",{d:j(e.start,e.sweep),fill:e.color},s))}),(0,l.jsx)("ul",{className:"usage-legend",children:x.map(({etc_usage:e,label:s,pct:t,color:a,total_floor_area:r})=>(0,l.jsxs)("li",{className:"usage-legend-item",children:[(0,l.jsx)("span",{className:"usage-dot",style:{background:a}}),(0,l.jsx)("span",{className:"usage-label",children:s}),(0,l.jsxs)("span",{className:"usage-stat",children:[(0,l.jsxs)("b",{children:[t.toFixed(1),"%"]}),(0,l.jsxs)("span",{children:["(",(0,i.oC)(Math.round(r)),"m\xb2)"]})]})]},e))})]}),(0,l.jsx)("div",{className:"bt-dashed"}),(0,l.jsxs)("details",{className:"sub-detail",children:[(0,l.jsx)("summary",{className:"text-medium",children:"ì ì²´ ìì¤"}),(0,l.jsx)("p",{className:"usage-all-text",children:t.join(", ")})]}),(0,l.jsx)(ev,{comment:a})]}):null},ex=({bld_data:e})=>{let s=e?.construction_info,t=e=>e?parseInt(e.split(".")[0]):null,a=t(s?.permit_date),r=t(s?.construction_date),i=t(s?.approved_date),n=s?.durable_years??null,d=new Date().getFullYear(),c=[{label:"íê°ì¼",year:a},{label:"ì°©ê³µì¼",year:r},{label:"ì¹ì¸ì¼",year:i},{label:"ë´ì©ì°ë",year:n}],o=a&&d<a?-1:r&&d<r?0:i&&d<i?1:d<n?2:i&&n&&a?3:-1,x=o>=0?o/(c.length-1)*100:0;
1return s?(0,l.jsxs)("section",{className:"table-graph-view","data-section-idx":"2","aria-label":"건물 ìê³µ ì ë³´",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:"건물 ìê³µ ì ë³´"}),(0,l.jsx)("p",{className:"font-light-gray title-sm",children:s.source})]}),(0,l.jsxs)("div",{className:"construction-timeline",children:[(0,l.jsxs)("div",{className:"ct-track-wrap",children:[(0,l.jsx)("div",{className:"ct-track"}),x>0&&(0,l.jsx)("div",{className:"ct-track-fill",style:{width:`${x}%`}}),c.map((e,s)=>{let t=Math.min(s/(c.length-1)*100,98);return(0,l.jsx)("div",{className:h()("ct-step-dot",{current:o===s}),style:{left:`${t||1}%`},children:o===s&&(0,l.jsx)("span",{className:"ct-current-badge",children:"íì¬"})},s)})]}),(0,l.jsx)("div",{className:"ct-labels",children:c.map((e,s)=>(0,l.jsx)("div",{className:h()("ct-label"),children:e.label},s))})]}),(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{width:130}),(0,l.jsx)("col",{})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"íê°ì¼"}),(0,l.jsx)("td",{className:"left",children:s.permit_date??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ì°©ê³µì¼"}),(0,l.jsx)("td",{className:"left",children:s.construction_date??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ì¬ì©ì¹ì¸ì¼"}),(0,l.jsx)("td",{className:"left",children:s.approved_date??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ë´ì©ì°ë"}),(0,l.jsx)("td",{className:"left",children:null!=s.durable_years?`${s.durable_years}ë
`:"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"경과ì°ì"}),(0,l.jsx)("td",{className:"left",children:null!=s.elapsed_years?`${s.elapsed_years}ë
`:"-"})]})]})]})}),(0,l.jsx)(ev,{comment:s.comment??""})]}):null},em=({bld_pk:e,bld_data:s,initialViolationData:t=null})=>{let a=t?.dongs?.[0]?.ho_list?.[0]?{...t.dongs[0].ho_list[0],dong:t.dongs[0].dong}:void 0,[r,n]=(0,c.useState)(a),[o,h]=(0,c.useState)(t?.dongs?.[0]?.ho_list??[]),{data:x,isPending:m}=(0,p.a)({queryKey:["violation_info_data",r?.pk||"",e,"not-loading"],queryFn:()=>(0,i.Fi)("get",(0,f.nW)(`https://api.safehomes.kr/maps/bld/violation/${e}${r?.pk?`?bld_pk=${r.pk}`:""}`,s?.sido,s?.sgg)).then(e=>e.data.data),enabled:!!e,initialData:r===a?t??void 0:void 0,staleTime:t?1/0:0});return(0,c.useEffect)(()=>{if(x&&!r){let e=x?.dongs[0];e&&(h(e?.ho_list),n({...e?.ho_list[0],dong:e.dong}))}},[x]),(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("section",{children:[(0,l.jsx)("h2",{className:"section-title",children:"ìë°ê±´ì¶ë¬¼"}),m&&(0,l.jsx)(eN,{}),(x?.dongs||[]).length>0&&(0,l.jsxs)("div",{className:"flex-row",children:[x?.dongs.length>0&&(0,l.jsx)(B.R,{select_list:x?.dongs.map(e=>({...e,name:e.dong||"ë ëª
ì¹ ìì"})),select:e=>{h(e.ho_list),n({dong:e.dong||""})},selected:r?.dong||"",placeholder:"ë ì í",link:!1}),(0,l.jsx)(B.R,{select_list:(o||[]).map(e=>({...e,name:e.ho,link:`?detail_addr=${[x?.dong,e.ho].join("+")}`})),select:e=>n({...e,dong:r?.dong}),selected:r?.ho??null,placeholder:"í¸ ì í",link:!1})]}),(0,l.jsxs)("dl",{className:"dl-box",children:[(0,l.jsxs)("div",{className:"lg",children:[(0,l.jsx)("dt",{className:"text-medium",children:"ìë°ê±´ì¶ë¬¼ ì¬ë¶"}),(0,l.jsx)("dd",{children:x?.is_bad_bld==null?"íì¸íì":x?.is_bad_bld?"í´ë¹":"í기 ìì"})]}),(0,l.jsx)("div",{className:"bt-line"}),(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("dt",{children:"íì¸ ê¸°ì¤"}),(0,l.jsx)("dd",{children:x?.is_dasaedae?"ê±´ì¶ë¬¼ëì¥ ì ì ë¶":"ê±´ì¶ë¬¼ëì¥ ì¼ë°ê±´ì¶ë¬¼"})]}),(0,l.jsxs)("div",{className:"",children:[(0,l.jsx)("dt",{children:"íì¸ ê¸°ì¤ì¼"}),(0,l.jsx)("dd",{children:x?.updated_at?d()(x?.updated_at||void 0).format("YYYY.MM.DD"):"-"})]})]}),(0,l.jsx)(ev,{comment:x?.comment})]})})},ej=e=>{let s=e.replace("#",""),t=parseInt(3===s.length?s.split("").map(e=>e+e).join(""):s,16);return[t>>16&255,t>>8&255,255&t]},eu=(e,s,t)=>{let[l,a,r]=ej(e),[i,n,d]=ej(s);return`#${[Math.round(l+(i-l)*t),Math.round(a+(n-a)*t),Math.round(r+(d-r)*t)].map(e=>e.toString(16).padStart(2,"0")).join("")}`},ep=e=>{let[s,t,l]=ej(e);return(299*s+587*t+114*l)/1e3>=200?"#555":"#fff"},eg=(e,s)=>{let t=eu("#f2f4f6","#9ca3af",s<=1?0:e/(s-1));return{bg:t,color:ep(t)}},ef=({bld_pk:e,bld_data:s,initialFloorData:t=null})=>{let n=t?.is_dasaedae?t?.dong_list?.[0]??null:null,[d,o]=(0,c.useState)(n),[m,j]=(0,c.useState)(!1),[u,g]=(0,c.useState)(5),[b,_]=(0,c.useState)("asc"),{data:N,isPending:y}=(0,p.a)({queryKey:["floor_info_data",d||n||"",e,"not-loading"],queryFn:()=>(0,i.Fi)("get",(0,f.nW)(`https://api.safehomes.kr/maps/bld/floor/${e}${d?`?dong=${d}
1`:""}`,s?.sido,s?.sgg)).then(e=>e.data.data),enabled:!!e,initialData:d===n?t??void 0:void 0,staleTime:t?1/0:0});(0,c.useEffect)(()=>{o(null)},[e]),(0,c.useEffect)(()=>{!d&&N?.is_dasaedae&&o(N.dong_list[0])},[N]);let v=e=>{let s=e.match(/\(([^)]+)\)/);return s?s[1].includes("ì¸ë")||s[1].includes("ê°êµ¬")?e.replace(/\s*\([^)]+\)/,"").trim():s[1]:e},w=(()=>{let e=new Map;(N?.floors||[]).filter(e=>"ì§ì"===e.floor_type).forEach(s=>{s.details.forEach(s=>{e.set(s.usage,(e.get(s.usage)||0)+1)})});let s=Array.from(e.entries()).sort((e,s)=>"ê·¸ ì¸ ìì¤"==e[0]?1:s[1]-e[1]),t=["#003478","#809ABC","#E5E5E5"];return s.map(([e],s)=>{let l=t[s];return{usage:e,label:v(e),bg:l,color:ep(l)}})})(),k=e=>w.find(s=>s.usage===e)??{usage:e,label:v(e),...eg(0,1)},$=(N?.floors||[]).filter(e=>"ì§í"===e.floor_type),S=[...(N?.floors||[]).filter(e=>"ì§ì"===e.floor_type)].sort((e,s)=>s.floor_num-e.floor_num),C=S.length<5||m?S:S.slice(S.length-5),F=[...N?.floors||[]].sort((e,s)=>"asc"===b?e.floor_type!==s.floor_type?"ì§í"===e.floor_type?-1:1:"ì§í"===e.floor_type?s.floor_num-e.floor_num:e.floor_num-s.floor_num:e.floor_type!==s.floor_type?"ì§ì"===e.floor_type?-1:1:"ì§ì"===e.floor_type?s.floor_num-e.floor_num:e.floor_num-s.floor_num),M=1===$.length?"ì§í 1층":`ì§í 1~${$.length}층`,A=$.length>0?{bg:"#9CA3AF",color:ep("#9CA3AF")}:null;return(()=>{let e=new Set;return $.forEach(s=>s.details.forEach(s=>{s.usage.split(",").forEach(s=>{let t=v(s.trim());t&&e.add(t)})})),[...e].join(", ")})(),(0,l.jsxs)("section",{className:"table-graph-view","data-section-idx":"2",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:"ì¸µë³ íí©"}),(0,l.jsx)("p",{className:"font-light-gray title-sm",children:"ê±´ì¶ë¬¼ëì¥ ì¸µë³ê°ì 기ì¤"})]}),y?(0,l.jsx)(eN,{}):(0,l.jsxs)(l.Fragment,{children:[N?.is_dasaedae&&N?.dong_list.length>0&&(0,l.jsx)(B.R,{select_list:(N?.dong_list).map(e=>({name:e||"ë ëª
ì¹ ìì",dong:e,link:`?detail_addr=${e}`})),select:e=>o(e.dong),selected:d,placeholder:"ë ì í",link:!1}),C&&(0,l.jsxs)("div",{className:"floor-visual-wrap",children:[(0,l.jsxs)("div",{className:"floor-buttons-col",children:[S.length>5&&(0,l.jsxs)("button",{className:h()("floor-more-toggle flex-row center",{open:m}),onClick:()=>j(e=>!e),children:["ì¸µë³ íí© ë보기",(0,l.jsx)("span",{className:h()("floor-arrow",{open:m}),children:(0,l.jsx)(r.Z,{color:"#555",width:6})})]}),C.map(e=>{let s=new Set,t=e.details.filter(e=>!s.has(e.usage)&&(s.add(e.usage),!0)),a=t.slice(0,4),r=t.length-4;return(0,l.jsxs)("div",{className:"flex-row floor-detail-row",children:[a.map((s,t)=>{let a=k(s.usage);return(0,l.jsx)("div",{className:"floor-item-btn",style:{background:a.bg,color:a.color},children:e.floor_name},t)}),r>0&&(0,l.jsxs)("div",{className:"floor-item-btn",children:["+",r,"ê°"]})]},e.floor_name)}),$.length>0&&A&&(0,l.jsx)("div",{className:"floor-item-btn",style:{background:A.bg,color:A.color},children:M})]}),(0,l.jsx)("div",{className:"floor-legend-col",children:w.map(({usage:e,bg:s,label:t})=>(0,l.jsxs)("div",{className:"legend-item",children:[(0,l.jsx)("span",{className:"legend-dot",style:{background:s}}),(0,l.jsx)("p",{children:t})]},e))})]}),N?.etc_list.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"bt-dashed"}),(0,l.jsxs)("details",{className:"sub-detail",children:[(0,l.jsx)("summary",{className:"text-medium",children:"ê·¸ ì¸ ìì¤"}),(0,l.jsx)("p",{className:"usage-all-text",dangerouslySetInnerHTML:{__html:N?.etc_list.join(", ")}})]})]}),F&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"bt-dashed"}),(0,l.jsxs)("div",{className:"table-box",children:[(0,l.jsxs)("table",{children:[(0,l.jsx)("colgroup",{children:(0,l.jsx)("col",{width:120})}),(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"click",onClick:()=>_(e=>"asc"===e?"desc":"asc"),children:(0,l.jsxs)("div",{className:"flex-row center",children:["층",(0,l.jsx)(x.default,{src:a.qx.sort,alt:""})]})}),(0,l.jsx)("th",{children:"ë©´ì "})]})}),(0,l.jsx)("tbody",{children:F.slice(0,u).map(e=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:e.floor_name}),(0,l.jsx)("td",{className:"left",children:e.details.map(e=>`${e.pyeong}í(${e.area}m\xb2)`).join(", ")})]},e.floor_name))})]}),N?.floors?.length>u&&(0,l.jsxs)("button",{className:"more-btn flex-row center mt10",onClick:()=>g(e=>e+5),children:["ì¸µë³ íí© ë보기 ",(0,l.jsx)(r.Z,{color:"#555",width:6})]})]})]})]}),(0,l.jsx)(ev,{comment:N?.comment})]})},eb=({bld_pk:e,bld_data:s,initialHoData:t=null})=>{let[a,n]=(0,c.useState)(t?.dong??null),[d,o]=(0,c.useState)(t?.ho??null),{set_file_url:h,ChangeConfirmNotice:x,ChangePayModal:u}=(0,m.useModal)(),{data:b,isPending:_}=(0,p.a)({queryKey:["ho_info_data",e,a||t?.dong||"",d||t?.ho||"","not-loading"],queryFn:()=>(0,i.Fi)("get",(0,f.nW)(`https://api.safehomes.kr/maps/bld/ho/${e}${a?`?dong=${a}`:""}${d?`&ho=${d}`:""}`,s?.sido,s?.sgg)).then(e=>e.data.data),enabled:!!e&&!(t?.dong==a&&t?.ho==d),initialData:a||d?t?.dong==a&&t?.ho==d?t??void 0:void 0:t??void 0,staleTime:t?1/0:0});(0,c.useEffect)(()=>{n(null),o(null)},[e]),(0,c.useEffect)(()=>{b&&(a||n(b.dong),d||o(b.ho))},[b]);let{detail:y,owner_info:k}=b||{detail:null,owner_info:null},[$]=(0,w.fP)(["homes_session"]),{MovePage:S}=(0,j.Z)(),C=(0,N.I0)(),F=(0,N.v9)(e=>e.commonStore),{data:M}=(0,p.a)({queryKey:["pub_doc_data",k?.iros_address_id,"","","not-loading"],queryFn:()=>(0,i.Fi)("get",(0,f.nW)(`https://api.safehomes.kr/maps/bld/issue-list/${e}`,s?.sido,s?.sgg)).then(e=>e.data.data),enabled:!!k?.iros_address_id}),{mutate:A}=(0,g.D)({mutationKey:["get-building-doc-ho"],mutationFn:e=>(0,i.Fi)("post","https://api.safehomes.kr/product/building/create",{...e}),onSuccess:e=>{let s=e.data.error;s?x({title:s,buttons:[{text:"ë«ê¸°",onClick:()=>x(null),close:!0}]}):(localStorage.payed_product="building",S({href:"/service-history?tab=building",isPC:!0}))},onError:e=>{x({title:e?.response?.data?.error||"ë°ê¸ ì¤ ì¤ë¥ê° ë°ìíìµëë¤.",buttons:[{text:"ë«ê¸°",onClick:()=>x(null),close:!0}]})}}),D=e=>{let s={...e,api_url:"/estate/pay",origin_url:"/service-history?tab=estate_img",current_data:"estate_img",unique:e?.iros_id,kind:"건물"};localStorage.product_data=JSON.stringify(s),C((0,v.zV)({addr:s})),u({amount:700,name:"ë±ê¸°ë¶ë±ë³¸ ì´ë",check_amount:700,is_pc:F?.isPC,redirect:"/service-history?tab=estate_img"})},P=(e="iros")=>{if(!$.homes_session){S({href:"/",is_login:!0,isPC:!0});return}let s=e.includes("iros")?"iros"===e?M?.iros_info:M?.ground_iros_info:M?.building_info;
1if(!s?.iros_id||!s?.bldrgstSeqno){S({href:e.includes("iros")?"/payment/estate":"/payment/building",isPC:!0});return}e.includes("iros")?D(s):A({...s})};return(0,l.jsxs)("section",{"data-section-idx":"2",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:"í¸ë³ ì ë³´"}),(0,l.jsx)("p",{className:"font-light-gray title-sm",children:"ê±´ì¶ë¬¼ëì¥ ì ì ë¶ ê¸°ì¤"})]}),_?(0,l.jsx)(eN,{}):(0,l.jsxs)(l.Fragment,{children:[b?.is_dasaedae&&(b?.dong_list.length>0||b?.ho_list.length>0)&&(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)(B.R,{select_list:b.dong_list.map(e=>({name:e||"ë ëª
ì¹ ìì",dong:e})),select:e=>{n(e.name),o(b.ho_list[0]??"")},selected:a,placeholder:"ë ì í",link:!1}),(0,l.jsx)(B.R,{select_list:b.ho_list.map(e=>({name:e+(e.endsWith("í¸")?"":"í¸"),ho:e,link:`?detail_addr=${[b.dong,e].join("+")}`})),select:e=>o(e.ho),selected:d?d+(d.endsWith("í¸")?"":"í¸"):null,placeholder:"í¸ ì í",link:!1})]}),k&&(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{width:130}),(0,l.jsx)("col",{})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ìì ì"}),(0,l.jsx)("td",{className:"left",children:k.owner??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ê³µëìì "}),(0,l.jsx)("td",{className:"left",children:k.ownership_share??"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ë±ê¸°ë¶ë±ë³¸"}),(0,l.jsx)("td",{className:"left",children:(0,l.jsxs)("div",{className:"flex-row",children:[k?.file_url?(0,l.jsxs)("button",{className:"ho-reg-btn flex-row center",onClick:()=>{h(k?.file_url)},children:["ì´ë ",(0,l.jsx)(r.Z,{color:"#555",width:5})]}):(0,l.jsxs)("button",{className:"ho-reg-btn flex-row center",onClick:()=>P("iros"),children:["ë°ê¸ ",(0,l.jsx)(r.Z,{color:"#555",width:5})]}),k.file_created_at&&(0,l.jsxs)("span",{className:"font-light-gray",children:[k.file_created_at," 기ì¤"]})]})})]})]})]})}),y&&(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsxs)("colgroup",{children:[(0,l.jsx)("col",{width:130}),(0,l.jsx)("col",{})]}),(0,l.jsxs)("tbody",{children:[(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"주ì©ë"}),(0,l.jsx)("td",{className:"left",children:y.main_usage||"-"})]}),y.etc_usage&&y.etc_usage!==y.main_usage&&(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ë¶ì©ë"}),(0,l.jsx)("td",{className:"left",children:y.etc_usage||"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"층"}),(0,l.jsx)("td",{className:"left",children:y.floor||"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ì ì©ë©´ì "}),y.priv_area.pyeong?(0,l.jsxs)("td",{className:"left",children:[y.priv_area.pyeong,"í(",y.priv_area.area,"m\xb2)"]}):(0,l.jsx)("td",{className:"left",children:"-"})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:"left",children:"ê³µì©ë©´ì "}),y.pub_area.pyeong?(0,l.jsxs)("td",{className:"left",children:[y.pub_area.pyeong,"í(",y.pub_area.area,"m\xb2)"]}):(0,l.jsx)("td",{className:"left",children:"-"})]})]})]})}),(0,l.jsx)(ev,{comment:b?.comment})]})]})},e_=({bld_pk:e,bld_data:s,initialDocData:t=null,getFn:a=!1})=>{let[n]=(0,w.fP)(["homes_session"]),{ChangeConfirmNotice:o,ChangePayModal:x,set_file_url:u}=(0,m.useModal)(),{MovePage:b}=(0,j.Z)(),_=(0,N.I0)(),y=(0,N.v9)(e=>e.commonStore),[k,$]=(0,c.useState)("iros"),[S,C]=(0,c.useState)(null),[F,M]=(0,c.useState)(),{data:A,isPending:D}=(0,p.a)({queryKey:["pub_doc_data",e,S||t?.dong||"",F?.ho||t?.ho||"","not-loading"],queryFn:()=>{let t=[];null!=S&&t.push(`dong=${S}`),F&&t.push(`ho=${F?.ho}`);let l=t.length?`?${t.join("&")}`:"";return(0,i.Fi)("get",(0,f.nW)(`https://api.safehomes.kr/maps/bld/issue-list/${e}${l}`,s?.sido,s?.sgg)).then(e=>e.data.data)},enabled:!!e&&!(t?.dong==S&&t?.ho==F?.ho),initialData:null!==S||F?void 0:t??void 0,staleTime:t?1/0:0});(0,c.useEffect)(()=>{C(null),M(void 0)},[e]),(0,c.useEffect)(()=>
1{if(A&&(null===S&&C(A?.dong),void 0===F)){let e=A?.dongs?.find(e=>e.dong===A?.dong);M(e?.ho_list?.find(e=>e.ho===A?.ho))}},[A]);let{mutate:P,isPending:I}=(0,g.D)({mutationKey:["get-building-doc"],mutationFn:e=>(0,i.Fi)("post","https://api.safehomes.kr/product/building/create",{...e}),onSuccess:e=>{let s=e.data.error;s?o({title:s,buttons:[{text:"ë«ê¸°",onClick:()=>o(null),close:!0}]}):(localStorage.payed_product="building",b({href:"/service-history?tab=building",isPC:!0}))},onError:e=>{o({title:e?.response?.data?.error||"ë°ê¸ ì¤ ì¤ë¥ê° ë°ìíìµëë¤.",buttons:[{text:"ë«ê¸°",onClick:()=>o(null),close:!0}]})}}),E=A?.dongs??[],Z=E.some(e=>""!==e.dong),q=E.find(e=>e.dong===S)??E[0],T=q?.ho_list??[],R=e=>{let s={...e,api_url:"/estate/pay",origin_url:"/service-history?tab=estate_img",current_data:"estate_img",unique:e?.iros_id,kind:"iros"===k?"건물":"í ì§"};localStorage.product_data=JSON.stringify(s),_((0,v.zV)({addr:s})),x({amount:700,name:"ë±ê¸°ë¶ë±ë³¸ ì´ë",check_amount:700,is_pc:y?.isPC,redirect:"/service-history?tab=estate_img"})},O=e=>{P({...e})},L=(e="iros")=>{if(!n.homes_session){b({href:"/",is_login:!0,isPC:!0});return}let s=e.includes("iros")?"iros"===e?A?.iros_info:A?.ground_iros_info:A?.building_info;
1if(!(s?.iros_id||s?.bldrgstSeqno)){b({href:e.includes("iros")?"/payment/estate":"/payment/building",isPC:!0});return}e.includes("iros")?R(s):O(s)};return a?L:(0,l.jsxs)("section",{className:"table-graph-view",id:"doc-issue","data-section-idx":"2",children:[(0,l.jsx)("h2",{className:"section-title",children:"ê³µì ì¥ë¶ ë°ê¸"}),(Z||T.length>0)&&(0,l.jsxs)("div",{className:"flex-row",children:[Z&&(0,l.jsx)(B.R,{select_list:E.map(e=>({...e,name:e.dong||"ë ëª
ì¹ ìì"})),select:e=>{let s=E.find(s=>s.dong===e.dong);C(e.dong),M(s?.ho_list?.[0]??void 0)},selected:S,placeholder:"ë ì í",link:!1}),T.length>0&&(0,l.jsx)(B.R,{select_list:T.map(e=>({...e,name:e.ho,link:`?detail_addr=${[A?.dong,e.ho].join("+")}`})),select:e=>M(e),selected:F?.ho??null,placeholder:"í¸ ì í",link:!1})]}),D?(0,l.jsx)(eN,{}):(0,l.jsx)("div",{className:h()("flex-row left",A?.is_dasaedae?"flex-row":"flex-col"),style:{gap:A?.is_dasaedae?"20px":"15px",alignItems:"flex-start"},children:[!A?.is_dasaedae&&"ground_iros","iros","building"].filter(
1Boolean).map(e=>(0,l.jsxs)("div",{className:"prw",children:[(0,l.jsx)("input",{type:"radio",className:"radio-type-i",name:"public-doc-type",id:`public-doc-type-${e}`,checked:k===e,onChange:()=>$(e)}),(0,l.jsx)("label",{htmlFor:`public-doc-type-${e}`,className:"flex-row",children:(0,l.jsxs)("span",{children:["iros"===e&&"ë±ê¸°ë¶ë±ë³¸","building"===e&&"ê±´ì¶ë¬¼ëì¥","ground_iros"===e&&"í ì§ ë±ê¸°ë¶ë±ë³¸"]})})]},e))}),(A?.ground_file_url||A?.iros_file_url||A?.building_file_url)&&(0,l.jsxs)("dl",{className:"common-info-list",children:[!A?.is_dasaedae&&A?.ground_file_url&&(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"í ì§ ë±ê¸°ë¶ë±ë³¸"}),(0,l.jsx)("dd",{children:(0,l.jsxs)("div",{className:"flex-row",children:[A?.ground_file_url&&(0,l.jsxs)("button",{className:"ho-reg-btn flex-row center",onClick:()=>{u(A?.ground_file_url)},children:["ì´ë ",(0,l.jsx)(r.Z,{color:"#555",width:5})]}),(0,l.jsx)("span",{className:"font-light-gray",children:A?.ground_file_url_updated?`${d()(A?.ground_file_url_updated).format("YY.MM.DD")} 기ì¤`:"-"})]})})]}),A?.iros_file_url&&(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ë±ê¸°ë¶ë±ë³¸"}),(0,l.jsx)("dd",{children:(0,l.jsxs)("div",{className:"flex-row",children:[A?.iros_file_url&&(0,l.jsxs)("button",{className:"ho-reg-btn flex-row center",onClick:()=>{u(A?.iros_file_url)},children:["ì´ë ",(0,l.jsx)(r.Z,{color:"#555",width:5})]}),(0,l.jsx)("span",{className:"font-light-gray",children:A?.iros_file_updated?`${d()(A?.iros_file_updated).format("YY.MM.DD")} 기ì¤`:"-"})]})})]}),A?.building_file_url&&(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ê±´ì¶ë¬¼ëì¥"}),(0,l.jsx)("dd",{children:(0,l.jsxs)("div",{className:"flex-row",children:[A?.building_file_url&&(0,l.jsxs)("button",{className:"ho-reg-btn flex-row center",onClick:()=>{u(A?.building_file_url)},children:["ì´ë ",(0,l.jsx)(r.Z,{color:"#555",width:5})]}),(0,l.jsx)("span",{className:"font-light-gray",children:A?.building_file_url_updated?`${d()(A?.building_file_url_updated).format("YY.MM.DD")} 기ì¤`:"-"})]})})]})]}),(0,l.jsxs)("button",{className:"basic small full blue",onClick:()=>L(k),disabled:D||I,children:[!!A?.[k.split(/_/)[0]+"_file_url"]&&"ìë¡ ","ë°ê¸"]})]})},eN=()=>(0,l.jsx)("div",{className:"section-skeleton",children:(0,l.jsx)("div",{className:"col-region skeleton-box"})}),ey=({title:e})=>(0,l.jsxs)("section",{children:[(0,l.jsx)("h2",{className:"section-title",children:e}),(0,l.jsx)(eN,{})]}),ev=({comment:e})=>{let{MovePage:s}=(0,j.Z)(),t=(0,N.v9)(e=>e.commonStore);return e&&(0,l.jsx)("div",{className:"extra-box",onClick:e=>{let l=e.target;if("A"==l.tagName){e.preventDefault();let a=l.getAttribute("href");a&&s({href:a,blank:!t?.isApp})}},dangerouslySetInnerHTML:{__html:e}})},ew={addr:"",deposit:null,rent_price:null,senior:null,senior_check:!1,contract_status:!1},ek=({juso_data:e,status_card:s,additional:t})=>{let[a]=(0,w.fP)(["homes_session"]),[r,n]=(0,c.useState)(ew),[d,o]=(0,c.useState)(!1),[h,x]=(0,c.useState)(e),p=(0,N.v9)(e=>e.commonStore),f={1:"ì´ ì§ì íì¬ ê²½ë§¤ê° ì§í ì¤ì
ëë¤.",10:"ì´ ì§ì íì¬ ê³µë§¤ê° ì§í ì¤ì
ëë¤.",4:"ì´ ì§ì 과거 경매 ì´ë ¥ì´ ììµëë¤.",50:"ì´ ì§ì 과거 공매 ì´ë ¥ì´ ììµëë¤.",5:"ì´ ê±´ë¬¼ìì ë³´ì¦ê¸ì ëë ¤ì£¼ì§ ëª»í ì¬ë¡ê° ììµëë¤."},v=(0,N.I0)(),k=(0,W._b)(),{ChangeConfirmNotice:C}=(0,m.useModal)(),{external_url:F}=(0,_.Z)();function A(e){v((0,y.CH)(e))}let{MovePage:D}=(0,j.Z)(),{mutate:P}=(0,g.D)({mutationKey:["post-get-juso-data"],mutationFn:e=>(0,i.Fi)("post","/api/sub-api/eais/building/find-pk",{bld_pk:t.bld_pk,juso:t.addr}),onSuccess:e=>{if(e?.data?.reason_code||e?.data?.error)k(e?.data);else{let s=e.data.result;x(s),q(s)}},onError:e=>{let s=e&&e.response&&e.response.data.error;(0,b.e)(C,s,F)}}),I=(e=null)=>{let s={...e||h,...t,contract_status:"ê³ì½ ì ",deposit:Number(r.deposit),rent_price:r.rent_price&&Number(r.rent_price),debt_prior_tenant:r.senior?Number(r.senior):r.senior,is_insurance:!1},a=()=>{let e=document.querySelector("dialog.ReportPreForm");s&&(A({addr:s}),e&&(e.dataset.service="risk",e.dataset.addr=JSON.stringify(s),e.showModal())),C(null)},n=s?.bld_data&&[s?.bld_data?.sigunguNm,s?.bld_data?.bjdongNm,[+s?.bld_data?.mnnm,+s?.bld_data?.slno].filter(
1Boolean).join("-"),s?.bld_data?.bldNm,s?.bld_data?.dongNm,s?.bld_data?.hoNm];C({title:"ì´ ì¡°ê±´ì¼ë¡ ì´ ì§ì íì¸íìê² ì´ì?",text:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("p",{className:"detail-comment mt25",children:["ì´ ì¡°ê±´ì 기ì¤ì¼ë¡ ë³´ì¦ê¸ì ëë ¤ë°ì ì ìëì§ íë¨í©ëë¤.",(0,l.jsx)("br",{}),"ì¡°ê±´ì´ ë°ëë©´ ê²°ê³¼ë ë¬ë¼ì§ ì ììµëë¤."]}),(0,l.jsxs)("dl",{className:"common-info-list mt25",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"주ì"}),(0,l.jsx)("dd",{children:n.join(" ")})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ë³´ì¦ê¸"}),(0,l.jsx)("dd",{children:(0,i.dN)(r?.deposit)})]})]})]}),buttons:[{text:"주ì ë³ê²½",className:"gray",onClick:()=>{},close:!0},{text:"ì´ ì¡°ê±´ì¼ë¡ íì¸í기",className:"blue",onClick:()=>{p.isRealtor||!p.isPC?(A({addr:s}),D({href:p.isPC?"/pc/payment/integration-address":"/payment/report"})):a()},close:!0}]})},{floor_check:E,floor_modal:Z}=(0,$.Z)(I);function q(e=null){t?.is_dasaedae?I(e):E({...e||h,...t,bldrgstSeqno:(e||h)?.bld_data?.bldrgstSeqno})}return t&&(0,l.jsxs)(l.Fragment,{children:[!t?.is_dasaedae&&Z,(0,l.jsx)(S.X,{}),(0,l.jsxs)("section",{className:"report-section","aria-label":"ë³´ì¦ê¸ ìì íì¸",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsx)("h2",{className:"section-title",children:"ì´ ì§, ë´ ë³´ì¦ê¸ ìì í ê¹ì?"}),(0,l.jsx)("div",{className:"title-tag blue",children:"미íì¸ ìí"})]}),(0,l.jsx)("div",{className:"extra-box",children:(0,l.jsxs)("ul",{className:"dot-list",children:[(0,l.jsx)("li",{children:s.length>0?s.length>1?f[s[1]]:f[s[0]]||(s[0].length>1?"ì´ ì§ì íì¬ ê³µë§¤ê° ì§í ì¤ì
ëë¤.":"ì´ ì§ì íì¬ ê²½ë§¤ê° ì§í ì¤ì
ëë¤."):"íì¬ ê³µê°ë ìí ì í¸ë ììµëë¤."}),(0,l.jsx)("li",{children:"ê°ì ìíì´ ë°ë³µë ì ììµëë¤."}),(0,l.jsx)("li",{children:"ë´ ë³´ì¦ê¸ 기ì¤ì¼ë¡ íì¸í´ë³´ì¸ì."})]})}),(0,l.jsxs)("div",{className:"flex-row left",style:{gap:"25px"},children:[(0,l.jsxs)("div",{className:"select-wrap",children:[(0,l.jsx)("input",{type:"radio",name:"contract_type",className:"radio-type-i",id:"false",defaultChecked:!0,onChange:e=>{o(!1),n(e=>({...e,rent_price:null}))}}),(0,l.jsx)("label",{htmlFor:"false",children:"ì ì¸"})]}),(0,l.jsxs)("div",{className:"select-wrap",children:[(0,l.jsx)("input",{type:"radio",name:"contract_type",className:"radio-type-i",id:"true",onChange:e=>{o(!0),n(e=>({...e,rent_price:""}))}}),(0,l.jsx)("label",{htmlFor:"true",children:"ìì¸"})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(u.L,{value:r.deposit?(0,i.oC)(r.deposit):r.deposit||"",placeholder:"ë³´ì¦ê¸ ì
ë ¥",onChange:e=>n(s=>({...s,deposit:(0,i.Y2)(e)})),pr:(0,l.jsx)("span",{children:"ì"})}),r.deposit>0&&(0,l.jsx)("span",{className:"font-blue text-medium flex-row right mt15",style:{fontSize:"17px"},children:(0,i.dN)(r.deposit)})]}),d&&(0,l.jsxs)("div",{children:[(0,l.jsx)(u.L,{value:r.rent_price?(0,i.oC)(r.rent_price):r.rent_price||"",placeholder:"ìì¸ ì
ë ¥",onChange:e=>n(s=>({...s,rent_price:(0,i.Y2)(e)})),pr:(0,l.jsx)("span",{children:"ì"})}),r.rent_price>0&&(0,l.jsx)("span",{className:"font-blue text-medium flex-row right mt15",style:{fontSize:"17px"},children:(0,i.dN)(r.rent_price)})]}),(0,l.jsx)("button",{className:"basic small blue full",disabled:r?.deposit<10||d&&!r?.rent_price,onClick:()=>{a?.homes_session?h.bld_data?q():t?.bld_pk?P():(C({title:"ìë´",text:(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("p",{className:"detail-comment mt25",children:["íì¬ ì¡°íë 기본 ì ë³´ë§ì¼ë¡ë ì íí ë¶ìì´ ì´ë ¤ì,",(0,l.jsx)("br",{}),"ì¶ê° íì¸ì ìí´ ì£¼ì를 ë¤ì ì¡°íí´ ì£¼ì기 ë°ëëë¤."]})})}),D({href:p?.isPC?"/pc?juso_focus="+t.addr:"/"})):D({href:M._n,is_login:!0})},children:"ë´ ë³´ì¦ê¸ì¼ë¡ íì¸í기"})]})]})},e$=({risk_data:e,address:s,bld_type:t,area:r,near_list:n,tid:d=null,is_dasaedae:c,regional_building_stats:o=null,near_comment:j="",upper_region:u})=>{let{ChangeConfirmNotice:p}=(0,m.useModal)(),g=[{text:"ë®ì",color:"gray"},{text:"ì¤ê°",color:"orange"},{text:"ëì",color:"red"}],f=Math.floor(Math.min(99.8,e?.risk_score||0)/33.3),b=new Date,_=b.getFullYear(),N=String(b.getMonth()+1).padStart(2,"0"),y=String(b.getDate()).padStart(2,"0"),v=`${_}-${N}-01`,w=`${_}.${N}.01`,k=`${_}-${N}-${y}`,$=`${_}.${N}.${y}`,S=[{step:"ì£¼ë³ ì§ì",content:n&&(0,l.jsx)("div",{className:"near-list",children:Object.entries(n).map(([e,s],t)=>(0,l.jsxs)("div",{className:"detail",children:[(0,l.jsxs)("h2",{className:"section-title",children:[e||u," ì£¼ë³ ì§ì"]}),(0,l.jsx)("div",{className:"near-area-list",children:(0,l.jsx)("ul",{children:s.map((e,s)=>(0,l.jsx)("li",{children:(0,l.jsx)(A.default,{href:`${M.mI}/${e.sido_eng}/${e.sigungu_eng}/${e.eupmyundong_eng}`,children:e.eupmyundong})},s))})})]},t))})}
1].filter(Boolean);return e&&e?.emd&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("section",{className:"risk-section","aria-label":`${e?.emd} ì ì¸, ìì¸ ë¦¬ì¤í¬ ì§ì`,"data-section-idx":"3",children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsxs)("div",{className:"flex-row left",children:[(0,l.jsxs)("h2",{className:"section-title",children:[e?.emd," ì ì¸, ìì¸ ë¦¬ì¤í¬ ì§ì"]}),(0,l.jsx)(x.default,{src:a.qx.qmark_b,alt:"",className:"click",onClick:()=>{p((0,D.u)())}})]}),(0,l.jsx)("div",{className:h()("title-tag",g[f].color),children:g[f].text})]}),(0,l.jsxs)("div",{className:"score-bar",children:[(0,l.jsx)("div",{className:h()("gauge-display",`risk-${f}`),children:(0,l.jsxs)("div",{className:"gauge",children:[(0,l.jsx)("div",{className:"gauge-bg"}),(0,l.jsx)("div",{className:"gauge-fill",style:{width:`${Math.max(e?.risk_score||0,3)}%`}})]})}),(0,l.jsxs)("span",{className:`value risk-${f}`,children:[String(e?.risk_score||0).slice(0,4),"ì "]})]}),(0,l.jsxs)("dl",{className:"common-info-list",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("dt",{children:[Object.keys(n??{})[0]||u," ë´ ì ì¸ ë¦¬ì¤í¬ ìì"]}),(0,l.jsxs)("dd",{children:[e?.risk_rank,"ì"]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ì ìì¸ ë¦¬ì¤í¬ ì§ì ë³ëë¥ "}),(0,l.jsx)("dd",{children:(0,l.jsxs)("span",{className:h()(e?.risk_score_mom_rate>0?"increase":"decrease"),style:{justifyContent:"flex-start"},children:[(0,l.jsx)(C.Z,{width:7,color:e?.risk_score_mom_rate>0?"#D84315":void 0}),Math.abs(e?.risk_score_mom_rate),"%"]})})]})]}),(0,l.jsx)("div",{className:"bt-dashed"}),(0,l.jsxs)("dl",{className:"common-info-list",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("dt",{children:[t," íê· ëì°°ê°ì¨"]}),(0,l.jsxs)("dd",{children:[parseFloat((e?.bid_ratio*100).toFixed(1)),"%"]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"경매 ì§í ì¤"}),(0,l.jsxs)("dd",{children:[e?.auction_count,"ê±´"]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"HUG ë³´ì¦ì¬ê³ "}),(0,l.jsxs)("dd",{children:[e?.accident_count,"ê±´"]})]})]}),e?.accident_count>0&&(0,l.jsx)("div",{className:"extra-box",children:(0,l.jsxs)("dl",{className:"common-info-list",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ìµê·¼ ë³´ì¦ì¬ê³ "}),e?.accident_latest_year?(0,l.jsxs)("dd",{children:[e?.accident_latest_year,"ë
"]}):(0,l.jsx)("dd",{children:"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"ìµê·¼ 5ë
ë´ ë³´ì¦ì¬ê³ "}),e?.accident_recent_5y?(0,l.jsxs)("dd",{children:[e?.accident_recent_5y,"ê±´"]}):(0,l.jsx)("dd",{children:"-"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("dt",{children:"미ë°í íê· ë³´ì¦ê¸"}),(0,l.jsx)("dd",{children:e?.avg_deposit?(0,i.dN)(e?.avg_deposit):"-"})]})]})}),s&&(0,l.jsx)(H,{address:s,name:r}),(0,l.jsx)(ev,{comment:e?.comment}),(0,l.jsx)(Y.AreaInsightBanner,{address:s,emd:e?.emd}),n&&(0,l.jsx)("div",{className:"table-box",style:{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0,0,0,0)",whiteSpace:"normal",border:0},children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ì¶ì²"}),(0,l.jsx)("th",{children:"ì¼ì"})]})}),(0,l.jsxs)("tbody",{children:[(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:(0,l.jsx)("a",{href:"https://www.eais.go.kr",target:"_blank",rel:"noopener",children:"ì¸ìí°"})}),(0,l.jsx)("td",{children:(0,l.jsx)("time",{dateTime:v,children:w})})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:(0,l.jsx)("a",{href:"https://www.courtauction.go.kr/pgj/index.on",target:"_blank",rel:"noopener",children:"ëë²ì 경매"})}),(0,l.jsx)("td",{children:(0,l.jsx)("time",{dateTime:k,children:$})})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:(0,l.jsx)("a",{href:"https://www.kamco.or.kr/main.do",target:"_blank",rel:"noopener",children:"íêµìì°ê´ë¦¬ê³µì¬"})}),(0,l.jsx)("td",{children:(0,l.jsx)("time",{dateTime:v,children:w})})]}),(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:(0,l.jsx)("a",{href:d?`https://www.tankauction.com/${d}`:"https://www.tankauction.com/pa/paList.php",target:"_blank",rel:"noopener",children:"í±í¬ì¥ì
"})}),(0,l.jsx)("td",{children:(0,l.jsx)("time",{dateTime:k,children:$})})]})]})]})})]}),o&&(()=>{let e=[{label:"ì¤í¼ì¤í
",count:o.officetel_count},{label:"ë¤ì¸ë",count:o.dasaedae_count},{label:"ìíí¸",count:o.apt_count},{label:"ëìíìí주í",count:o.urban_housing_count},{label:"ë¨ë
/ë¤ê°êµ¬",count:o.single_family_count},{label:"기í 주í",count:o.other_count}];return e.filter(e=>e.count>0).sort((e,s)=>s.count-e.count).slice(0,4),(0,l.jsxs)("section",{children:[(0,l.jsxs)("div",{className:"flex-row",children:[(0,l.jsxs)("h2",{className:"section-title",children:[o.eup_myeon_dong," ê±´ì¶ë¬¼ íµê³"]}),(0,l.jsxs)("p",{className:"font-light-gray title-sm",children:["ê±´ì¶ë¬¼ëì¥ ",o.si_do," íµê³ 기ì¤"]})]}),(0,l.jsx)("div",{className:"table-box",children:(0,l.jsxs)("table",{children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{children:"ì í"}),(0,l.jsx)("th",{children:"ê±´ì¶ë¬¼ ì"})]})}),(0,l.jsx)("tbody",{children:e.map(({label:e,count:s})=>(0,l.jsxs)("tr",{children:[(0,l.jsx)("td",{children:e}
1),(0,l.jsxs)("td",{children:[s.toLocaleString(),"ê±´"]})]},e))})]})}),(0,l.jsx)(ev,{comment:o.comment})]})})(),S.map((e,s)=>(0,l.jsxs)("section",{className:"contents-box","data-section-idx":"3",children:[(0,l.jsx)("div",{className:"content",children:e.content}),(0,l.jsx)(ev,{comment:j})]},s))]})}},45105:function(e,s,t){t.d(s,{E$:function(){return _},Hb:function(){return u},MapProvider:function(){return j},SB:function(){return N},UF:function(){return b},dM:function(){return f},pn:function(){return g},wf:function(){return p},xc:function(){return y}});var l=t(57437),a=t(2265),r=t(91971);let i=(0,a.createContext)(()=>{}),n=(0,a.createContext)(null),d=(0,a.createContext)(()=>{}),c=(0,a.createContext)(null),o=(0,a.createContext)(()=>{}),h=(0,a.createContext)(null),x=(0,a.createContext)(()=>{}),m=(0,a.createContext)(null);function j({children:e}){let[s,t]=(0,a.useState)(null),[j,u]=(0,a.useState)(null),[p,g]=(0,a.useState)(null),[f,b]=(0,a.useState)(null);return(0,l.jsx)(r.Z,{id:"RISKMAP_mapcontext",children:(0,l.jsx)(i.Provider,{value:t,children:(0,l.jsx)(n.Provider,{value:s,children:(0,l.jsx)(d.Provider,{value:u,children:(0,l.jsx)(c.Provider,{value:j,children:(0,l.jsx)(o.Provider,{value:g,children:(0,l.jsx)(h.Provider,{value:p,children:(0,l.jsx)(x.Provider,{value:b,children:(0,l.jsx)(m.Provider,{value:f,children:e})})})})})})})})})}let u=()=>(0,a.useContext)(i),p=()=>(0,a.useContext)(n),g=()=>(0,a.useContext)(d),f=()=>(0,a.useContext)(c),b=()=>(0,a.useContext)(o),_=()=>(0,a.useContext)(h),N=()=>(0,a.useContext)(x),y=()=>(0,a.useContext)(m)},87250:function(e,s,t){t.d(s,{$n:function(){return c},MQ:function(){return x},Wz:function(){return h},_n:function(){return l},h0:function(){return i},hi:function(){return d},lZ:function(){return n},mI:function(){return a},s$:function(){return r},sK:function(){return o}});let l="/risk-map",a=`${l}/mapindex`,r=`${l}/auctionindex`,i=`${l}/building`,n=`${l}/auction`,d=`${l}/public-auction`,c=`${l}/realtor`,o=`${l}/report`,h=`${l}/summary`,x=`${l}/public-record-policy`},96881:function(e,s,t){function l(e,s,t){let l=[s&&`sido=${encodeURIComponent(s)}`,t&&`sgg=${encodeURIComponent(t)}`].filter(Boolean).join("&");return l?`${e}${e.includes("?")?"&":"?"}${l}`:e}function a(e){if(!e)return null;let s=e.replace(/[()[\],]/g," ").trim().split(/\s+/);if(s.length<2)return null;let t=s.findIndex(e=>/^ì°?\d/.test(e)),l=-1===t?s.length:t+1,a=s.slice(0,l);return -1!==t&&(a[a.length-1]=a[a.length-1].replace(/ë²ì§$/,"")),a.join("-")}t.d(s,{jU:function(){return a},nW:function(){return l}})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.