PageSourceSearch

https://sleepq.ai/_next/static/chunks/app/map/page-1769a1b2f81beb91.js

js sleepq.ai collected 2026-10-05 12:38:23 UTC 26,730 bytes, 1 lines download raw bytes

1(self.webpackChunkdta_wir_landing=self.webpackChunkdta_wir_landing||[]).push([[823],{1402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return x},handleClientScriptLoad:function(){return m},initScriptLoader:function(){return g}});let r=n(5845),l=n(6934),a=n(5155),o=r._(n(7650)),s=l._(n(2115)),i=n(2073),c=n(4681),d=n(4853),u=new Map,p=new Set,f=e=>{let{src:t,id:n,onLoad:r=()=>{},onReady:l=null,dangerouslySetInnerHTML:a,children:s="",strategy:i="afterInteractive",onError:d,stylesheets:f}=e,m=n||t;if(m&&p.has(m))return;if(u.has(t)){p.add(m),u.get(t).then(r,d);return}let g=()=>{l&&l(),p.add(m)},h=document.createElement("script"),x=new Promise((e,t)=>{h.addEventListener("load",function(t){e(),r&&r.call(this,t),g()}),h.addEventListener("error",function(e){t(e)})}).catch(function(e){d&&d(e)});a?(h.innerHTML=a.__html||"",g()):s?(h.textContent="string"==typeof s?s:Array.isArray(s)?s.join(""):"",g()):t&&(h.src=t,u.set(t,x)),(0,c.setAttributesFromProps)(h,e),"worker"===i&&h.setAttribute("type","text/partytown"),h.setAttribute("data-nscript",i),f&&(e=>{if(o.default.preinit)return e.forEach(e=>{o.default.preinit(e,{as:"style"})});{let t=document.head;e.forEach(e=>{let n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.appendChild(n)})}})(f),document.body.appendChild(h)};function m(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,d.requestIdleCallback)(()=>f(e))}):f(e)}function g(e){e.forEach(m),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");p.add(t)})}function h(e){let{id:t,src:n="",onLoad:r=()=>{},onReady:l=null,strategy:c="afterInteractive",onError:u,stylesheets:m,...g}=e,{updateScripts:h,scripts:x,getIsSsr:v,appDir:y,nonce:w}=(0,s.useContext)(i.HeadManagerContext);w=g.nonce||w;let b=(0,s.useRef)(!1);(0,s.useEffect)(()=>{let e=t||n;b.current||(l&&e&&p.has(e)&&l(),b.current=!0)},[l,t,n]);let k=(0,s.useRef)(!1);if((0,s.useEffect)(()=>{if(!k.current){if("afterInteractive"===c)f(e);else"lazyOnload"===c&&("complete"===document.readyState?(0,d.requestIdleCallback)(()=>f(e)):window.addEventListener("load",()=>{(0,d.requestIdleCallback)(()=>f(e))}));k.current=!0}},[e,c]),("beforeInteractive"===c||"worker"===c)&&(h?(x[c]=(x[c]||[]).concat([{id:t,src:n,onLoad:r,onReady:l,onError:u,...g,nonce:w}]),h(x)):v&&v()?p.add(t||n):v&&!v()&&f({...e,nonce:w})),y){if(m&&m.forEach(e=>{o.default.preinit(e,{as:"style"})}),"beforeInteractive"===c)if(!n)return g.dangerouslySetInnerHTML&&(g.children=g.dangerouslySetInnerHTML.__html,delete g.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...g,id:t}])+")"}});else return o.default.preload(n,g.integrity?{as:"script",integrity:g.integrity,nonce:w,crossOrigin:g.crossOrigin}:{as:"script",nonce:w,crossOrigin:g.crossOrigin}),(0,a.jsx)("script",{nonce:w,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([n,{...g,id:t}])+")"}});"afterInteractive"===c&&n&&o.default.preload(n,g.integrity?{as:"script",integrity:g.integrity,nonce:w,crossOrigin:g.crossOrigin}:{as:"script",nonce:w,crossOrigin:g.crossOrigin})}return null}Object.defineProperty(h,"__nextScript",{value:!0});let x=h;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3011:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return l}});let r=n(2115);function l(e,t){let n=(0,r.useRef)(null),l=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=n.current;e&&(n.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(n.current=a(e,r)),t&&(l.current=a(t,r))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let n=e(t);return"function"==typeof n?n:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
1dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3543:(e,t,n)=>{"use strict";n.d(t,{MapExplorer:()=>L});var r=n(5155),l=n(2115);let a=[{key:"seoul",label:"서울권",center:{lat:37.5665,lng:126.978},zoom:11,sidos:[{match:["서울특별시"],label:"서울",center:{lat:37.5665,lng:126.978},zoom:11}]},{key:"gyeonggi",label:"경기권",center:{lat:37.4,lng:126.95},zoom:9,sidos:[{match:["경기도"],label:"경기",center:{lat:37.2636,lng:127.0286},zoom:10},{match:["인천광역시"],label:"인천",center:{lat:37.4563,lng:126.7052},zoom:11}]},{key:"chungcheong_gangwon",label:"ì¶©ì²­\xb7강원권",center:{lat:36.8,lng:127.6},zoom:8,sidos:[{match:["세종특별자치시"],label:"세종",center:{lat:36.48,lng:127.289},zoom:11},{match:["대전광역시"],label:"대전",center:{lat:36.3504,lng:127.3845},zoom:11},{match:["충청북도"],label:"충북",center:{lat:36.6424,lng:127.489},zoom:10},{match:["충청남도"],label:"충남",center:{lat:36.6588,lng:126.6728},zoom:10},{match:["강원특별자치도","강원도"],label:"강원",center:{lat:37.8228,lng:128.1555},zoom:9}]},{key:"gyeongsang",label:"경상권",center:{lat:35.7,lng:128.55},zoom:8,sidos:[{match:["대구광역시"],label:"대구",center:{lat:35.8714,lng:128.6014},zoom:11},{match:["경상북도"],label:"경북",center:{lat:36.4919,lng:128.8889},zoom:9},{match:["부산광역시"],label:"부산",center:{lat:35.1796,lng:129.0756},zoom:11},{match:["울산광역시"],label:"울산",center:{lat:35.5384,lng:129.3114},zoom:11},{match:["경상남도"],label:"경남",center:{lat:35.228,lng:128.6811},zoom:10}]},{key:"jeolla_jeju",label:"전라\xb7제주권",center:{lat:34.6,lng:126.9},zoom:8,sidos:[{match:["광주광역시"],label:"광주",center:{lat:35.1595,lng:126.8526},zoom:11},{match:["전북특별자치도","전라북도"],label:"전북",center:{lat:35.8242,lng:127.148},zoom:10},{match:["전라남도"],label:"전남",center:{lat:34.8161,lng:126.4629},zoom:9},{match:["제주특별자치도"],label:"제주",center:{lat:33.4996,lng:126.5312},zoom:11}]}],o=new Set(["서울특별시","경기도"]);function s(e){if(!e)return null;for(let t of a)for(let n of t.sidos)if(n.match.includes(e))return n.label;return null}function i(e){return Math.PI/180*e}var c=n(1402),d=n.n(c);let u="https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=".concat("jloxtv0bez");function p(e){if(!e)return null;if(e.includes("@"))return"mailto:".concat(e);let t=e.replace(/[^0-9-]/g,"");return"tel:".concat(t)}function f(e){return e.naverPlaceId?"undefined"!=typeof navigator&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?"https://m.place.naver.com/hospital/".concat(e.naverPlaceId):"https://map.naver.com/p/entry/place/".concat(e.naverPlaceId):null}let m={id:0,name:"웰트 주식회사 (WELT Corp.)",siteType:"슬립큐 개발사",contact:"[email protected]",chiefDoctors:["강성지"],address:{address:"서울특별시 강남구 테헤란로 132 한독약품빌딩",detailAddress:"14층",province:"서울",sido:"서울",sigungu:"강남",lat:37.499325,lng:127.033223}};m.address.lat,m.address.lng;let g={width:32,height:32},h={x:16,y:32},x={id:m.id,name:m.name,code:null,institutionType:m.siteType,address:m.address.address,detailAddress:m.address.detailAddress,province:m.address.province,sigungu:m.address.sigungu,lat:m.address.lat,lng:m.address.lng,naverPlaceId:null,contact:m.contact,representativeName:m.chiefDoctors.join(", ")||"-",regionKey:null,sidoLabel:null,hasCoord:!0};function v(e){let{sites:t,selected:n,focus:a,onUserLocate:o}=e,s=(0,l.useRef)(null),{map:i,isReady:c}=function(e,t){let{isLoaded:n}=function(){let[e,t]=(0,l.useState)("idle"),[n,r]=(0,l.useState)(null);return(0,l.useEffect)(()=>{var e;if(null==(e=window.naver)?void 0:e.maps)return void t("loaded");if(window.navermap_authFailure=()=>{t("error"),r(Error("네이버 지도 인증 실패: NCP Console에서 Web 서비스 URL을 확인하세요."))},document.querySelector('script[src^="https://oapi.map.naver.com"]')){let e=setInterval(()=>{var n;(null==(n=window.naver)?void 0:n.maps)&&(t("loaded"),clearInterval(e))},100);return()=>clearInterval(e)}t("loading");let n=document.createElement("script");n.src=u,n.async=!0,n.onload=()=>{setTimeout(()=>{var e;(null==(e=window.naver)?void 0:e.maps)&&t("loaded")},100)},n.onerror=()=>{t("error"),r(Error("네이버 지도 스크립트 로드에 실패했습니다."))},document.head.appendChild(n)},[]),{isLoaded:"loaded"===e,isLoading:"loading"===e,error:n}}(),[r,a]=(0,l.useState)(null),o=(0,l.useRef)(null),s=(0,l.useRef)(t);return(0,l.useEffect)(()=>{var t,r;if(o.current||!e.current||!n||!(null==(t=window.naver)?void 0:t.maps))return;let l=s.current,i=(null==l?void 0:l.center)?new window.naver.maps.LatLng(l.center.lat,l.center.lng):new window.naver.maps.LatLng(36.5,127.5),c=window.innerWidth<768,d=new window.naver.maps.Map(e.current,{center:i,zoom:null!=(r=null==l?void 0:l.zoom)?r:12,zoomControl:!c,zoomControlOptions:{position:naver.maps.Position.TOP_RIGHT},mapTypeControl:!1,scaleControl:!0,logoControl:!0,mapDataControl:!1});return o.current=d,a(d),()=>{if(o.current){try{o.current.destroy()}catch(e){}o.current=null}}},[e,n]),{map:r,isReady:!!r}}(s,{center:{lat:m.address.lat,lng:m.address.lng},zoom:12}),[v,y]=(0,l.useState)(!1),w=(0,l.useRef)(null),b=(0,l.useRef)(new Map),k=(0,l.useRef)(null),j=(0,l.useRef)(null),C=(0,l.useRef)(null),z=(0,l.useRef)(!1),_=(0,l.useCallback)(function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!i||!(null==(n=window.naver)?void 0:n.maps))return;C.current&&C.current.close();let l=new window.naver.maps.InfoWindow({content:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=p(e.contact),r=f(e),l=[e.address,e.detailAddress].filter(
1Boolean).join(" ");return'\n    <div style="padding:16px; min-width:220px; max-width:300px; font-family:\'Pretendard\',-apple-system,BlinkMacSystemFont,sans-serif;">\n      <h3 style="margin:0 0 8px 0; font-size:16px; font-weight:600; color:#1a1a1a; line-height:1.4;">'.concat(e.name,"</h3>\n      ").concat(l?'<p style="margin:0 0 8px 0; font-size:13px; color:#666; line-height:1.5;">'.concat(l,"</p>"):"",'\n      <div style="margin-top:8px; padding-top:8px; border-top:1px solid #eee;">\n        <p style="margin:0; font-size:13px; color:#333;"><strong>').concat(t?"대표이사":"대표자",":</strong> ").concat(e.representativeName,'</p>\n        <p style="margin:0 0 4px 0; font-size:13px; color:#333;">\n          <strong>연락처:</strong>\n          ').concat(n?'<a href="'.concat(n,'" style="color:#3651B2; text-decoration:none; margin-left:4px;">').concat(e.contact,"</a>"):'<span style="margin-left:4px; color:#999;">-</span>','\n        </p>\n      </div>\n      <div style="display:flex; align-items:center; justify-content:space-between; margin-top:12px;">\n        ').concat(e.institutionType?'<span style="display:inline-block; padding:2px 8px; font-size:11px; color:#3651B2; background:#F4F8FF; border-radius:4px;">'.concat(e.institutionType,"</span>"):"<span></span>","\n        ").concat(r?'<a href="'.concat(r,'" target="_blank" rel="noopener noreferrer" style="font-size:12px; color:#666; text-decoration:none; font-weight:500;">네이버에서 보기 &gt;</a>'):"","\n      </div>\n    </div>\n  ")}(e,r),maxWidth:320,backgroundColor:"#fff",borderColor:"#ddd",borderWidth:1,anchorSize:new window.naver.maps.Size(20,10),anchorColor:"#fff",pixelOffset:new window.naver.maps.Point(0,-8)});l.open(i,t),C.current=l},[i]);(0,l.useEffect)(()=>{var e;if(!c||!i||!(null==(e=window.naver)?void 0:e.maps))return;let t=new window.naver.maps.Marker({position:new window.naver.maps.LatLng(m.address.lat,m.address.lng),map:i,title:m.name,icon:{url:"/assets/icon_map_picker_welt.png",size:new window.naver.maps.Size(g.width,g.height),scaledSize:new window.naver.maps.Size(g.width,g.height),anchor:new window.naver.maps.Point(h.x,h.y)},zIndex:200});return window.naver.maps.Event.addListener(t,"click",()=>_(x,t,!0)),k.current=t,z.current||(_(x,t,!0),z.current=!0),()=>{try{var e,n;null==(n=window.naver)||null==(e=n.maps)||e.Event.clearListeners(t,"click"),t.setMap(null)}catch(e){}k.current=null}},[c,i,_]),(0,l.useEffect)(()=>{var e,n;if(!c||!i||!v||!window.MarkerClustering||!(null==(e=window.naver)?void 0:e.maps))return;try{null==(n=w.current)||n.setMap(null),b.current.forEach(e=>e.setMap(null))}catch(e){}b.current.clear();let r=t.map(e=>{let t=new window.naver.maps.Marker({position:new window.naver.maps.LatLng(e.lat,e.lng),title:e.name,icon:{url:"/assets/icon_map_picker_site.png",size:new window.naver.maps.Size(g.width,g.height),scaledSize:new window.naver.maps.Size(g.width,g.height),anchor:new window.naver.maps.Point(h.x,h.y)},zIndex:100});return window.naver.maps.Event.addListener(t,"click",()=>{_(e,t)}),b.current.set(e.id,t),t}),l=e=>({content:'<div style="display:flex;align-items:center;justify-content:center;width:'.concat(e,"px;height:").concat(e,"px;border-radius:9999px;background:rgba(54,81,178,0.9);border:2px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,0.35);color:#fff;font-weight:700;font-size:").concat(e>=52?15:13,'px;cursor:pointer;"><span></span></div>'),size:new window.naver.maps.Size(e,e),anchor:new window.naver.maps.Point(e/2,e/2)});return w.current=new window.MarkerClustering({map:i,markers:r,minClusterSize:2,gridSize:120,disableClickZoom:!1,icons:[l(36),l(44),l(52)],indexGenerator:[10,50],stylingFunction:(e,t)=>{let n=e.getElement().querySelector("span");n&&(n.textContent=String(t))}}),()=>{try{var e;null==(e=w.current)||e.setMap(null),b.current.forEach(e=>e.setMap(null))}catch(e){}b.current.clear()}},[c,i,v,t,_]),(0,l.useEffect)(()=>{var e;if(!i||!n||!(null==(e=window.naver)?void 0:e.maps))return;let r=b.current.get(n.id),l=t.find(e=>e.id===n.id);r&&l&&(i.setCenter(r.getPosition()),i.setZoom(16),_(l,r))},[n,i,t,_]),(0,l.useEffect)(()=>{var e;i&&a&&(null==(e=window.naver)?void 0:e.maps)&&(i.setCenter(new window.naver.maps.LatLng(a.lat,a.lng)),i.setZoom(a.zoom))},[a,i]),(0,l.useEffect)(()=>{var e;if(!i||!(null==(e=window.naver)?void 0:e.maps))return;let t=()=>{C.current&&(C.current.close(),C.current=null)};return window.naver.maps.Event.addListener(i,"dragstart",t),window.naver.maps.Event.addListener(i,"click",t),()=>{var e,t,n,r;null==(t=window.naver)||null==(e=t.maps)||e.Event.clearListeners(i,"dragstart"),null==(r=window.naver)||null==(n=r.maps)||n.Event.clearListeners(i,"click")}},[i]),(0,l.useEffect)(()=>{C.current&&(C.current.close(),C.current=null)},[t]);let L=(0,l.useCallback)(e=>{var t;i&&(null==(t=window.naver)?void 0:t.maps)&&(j.current&&j.current.setMap(null),j.current=ne
1w window.naver.maps.Marker({position:e,map:i,icon:{content:'\n        <div style="position:relative; width:24px; height:24px;">\n          <div style="position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:40px; height:40px; background:rgba(66,133,244,0.2); border-radius:50%; animation:sq-pulse 2s ease-out infinite;"></div>\n          <div style="position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); width:16px; height:16px; background:#4285F4; border:3px solid white; border-radius:50%; box-shadow:0 2px 6px rgba(0,0,0,0.3);"></div>\n        </div>\n        <style>@keyframes sq-pulse{0%{transform:translate(-50%,-50%) scale(1);opacity:1;}100%{transform:translate(-50%,-50%) scale(2.5);opacity:0;}}</style>\n      ',anchor:new window.naver.maps.Point(12,12)},zIndex:50,clickable:!1}))},[i]),M=(0,l.useCallback)(()=>{var e;if(i&&(null==(e=window.naver)?void 0:e.maps)){if(!navigator.geolocation)return void alert("이 브라우저에서는 위치 서비스를 지원하지 않습니다.");navigator.geolocation.getCurrentPosition(e=>{let{latitude:t,longitude:n}=e.coords,r=new window.naver.maps.LatLng(t,n);i.panTo(r,{duration:300}),L(r),o({lat:t,lng:n}),C.current&&(C.current.close(),C.current=null)},()=>alert("위치 서비스 접근이 거부되었어요.\n설정에서 위치 권한을 허용해 주세요."),{enableHighAccuracy:!0,timeout:1e4,maximumAge:0})}},[i,L,o]);return(0,r.jsxs)(r.Fragment,{children:[c&&(0,r.jsx)(d(),{src:"/vendor/MarkerClustering.js",
1strategy:"afterInteractive",onReady:()=>y(!0)}),(0,r.jsxs)("div",{className:"relative h-full w-full",children:[(0,r.jsx)("div",{ref:s,className:"h-full w-full","aria-label":"슬립큐 처방 병원 지도"}),c&&(0,r.jsx)("button",{onClick:M,className:"absolute bottom-6 right-3 z-10 flex h-10 w-10 items-center justify-center rounded-sm bg-white shadow-md hover:bg-gray-50","aria-label":"내 현재 위치로 이동",title:"내 현재 위치",children:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",className:"text-gray-700",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"3",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor",strokeWidth:"2",fill:"none"}),(0,r.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"5",stroke:"currentColor",strokeWidth:"2"}),(0,r.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"22",stroke:"currentColor",strokeWidth:"2"}),(0,r.jsx)("line",{x1:"2",y1:"12",x2:"5",y2:"12",stroke:"currentColor",strokeWidth:"2"}),(0,r.jsx)("line",{x1:"19",y1:"12",x2:"22",y2:"12",stroke:"currentColor",strokeWidth:"2"})]})})]})]})}function y(e){let{sites:t,isLoading:n,error:l,onSelect:a}=e;return n?(0,r.jsx)("div",{className:"p-6 text-center text-sm text-gray-400",children:"불러오는 중…"}):l?(0,r.jsx)("div",{className:"p-6 text-center text-sm text-gray-400",children:"병원 정보를 불러오지 못했어요. 잠시 후 다시 시도해 주세요."}):0===t.length?(0,r.jsx)("div",{className:"p-6 text-center text-sm text-gray-400",children:"조건에 맞는 병원이 없어요."}):(0,r.jsx)("ul",{className:"h-full divide-y divide-gray-100 overflow-y-auto",children:t.map(e=>{let t=p(e.contact),n=f(e),l=[e.address,e.detailAddress].filter(Boolean).join(" ");return(0,r.jsx)("li",{children:(0,r.jsxs)("button",{type:"button",onClick:()=>a(e.id),className:"block w-full p-4 text-left hover:bg-gray-50",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"font-semibold text-gray-900",children:e.name}),e.institutionType&&(0,r.jsx)("span",{className:"text-xs text-gray-500",children:e.institutionType})]}),l&&(0,r.jsx)("p",{className:"text-sm text-gray-500",children:l}),(0,r.jsxs)("p",{className:"mt-1 text-sm text-gray-600",children:["대표자: ",e.representativeName]}),(0,r.jsxs)("p",{className:"mt-1 text-sm text-gray-600",children:["연락처:"," ",t?(0,r.jsx)("a",{href:t,onClick:e=>e.stopPropagation(),className:"text-[#3651B2]",children:e.contact}):(0,r.jsx)("span",{className:"text-gray-400",children:"-"})]}),n&&(0,r.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"mt-2 inline-block text-sm text-gray-500",children:"네이버에서 보기 >"})]})},e.id)})})}var w=n(2619),b=n.n(w);let k={query:"",regionKey:null,sidoLabel:null,sigungu:null},j=e=>e.replace(/\s/g,"").toLowerCase(),C="w-full appearance-none rounded border bg-no-repeat py-2 pl-3 pr-9 text-sm",z={backgroundImage:"url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\")",backgroundPosition:"right 0.625rem center",backgroundSize:"1.1rem 1.1rem"};function _(e){var t,n,l;let{sites:i,state:c,onChange:d,totalCount:u}=e,p=""!==c.query.trim()||null!==c.regionKey||null!==c.sidoLabel||null!==c.sigungu,f=a.find(e=>e.key===c.regionKey),m=null!=(t=null==f?void 0:f.sidos)?t:[],g=m.find(e=>e.label===c.sidoLabel),h=!!g&&g.match.some(e=>null!=e&&o.has(e)),x=h?function(e,t){if(!t)return[];let n=new Set;for(let r of e)s(r.province)===t&&r.sigungu&&n.add(r.sigungu);return Array.from(n).sort((e,t)=>e.localeCompare(t,"ko"))}(i,c.sidoLabel):[];return(0,r.jsxs)("div",{className:"space-y-2 px-3 pb-1",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("p",{className:"text-sm text-gray-600",children:p?(0,r.jsxs)(r.Fragment,{children:["처방 병원: ",(0,r.jsx)("strong",{className:"text-gray-900",children:u}),"개 (필터 적용)"]}):(0,r.jsxs)(r.Fragment,{children:["처방 병원: 총 ",(0,r.jsx)("strong",{className:"text-gray-900",children:u}),"개"]})}),(0,r.jsxs)(b(),{href:"/",className:"flex shrink-0 items-center gap-1 border-l border-gray-300 pl-3 text-sm text-gray-500 hover:text-gray-800",children:[(0,r.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,r.jsx)("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),(0,r.jsx)("polyline",{points:"9 22 9 12 15 12 15 22"})]}),"홈으로"]})]}),(0,r.jsx)("input",{type:"search",value:c.query,placeholder:"병원명 검색",onChange:e=>d({...c,query:e.target.value}),className:"w-full rounded border px-3 py-2 text-sm"}),(0,r.jsxs)("div",{className:"flex gap-1 overflow-x-auto",children:[(0,r.jsx)("button",{type:"button","aria-pressed":null===c.regionKey,onClick:()=>
1d({...c,regionKey:null,sidoLabel:null,sigungu:null}),className:"shrink-0 rounded-full border px-3 py-1 text-sm ".concat(null===c.regionKey?"bg-black text-white":"bg-white text-gray-700"),children:"전체"}),a.map(e=>(0,r.jsx)("button",{type:"button","aria-pressed":c.regionKey===e.key,onClick:()=>d({...c,regionKey:e.key,sidoLabel:null,sigungu:null}),className:"shrink-0 rounded-full border px-3 py-1 text-sm ".concat(c.regionKey===e.key?"bg-black text-white":"bg-white text-gray-700"),children:e.label},e.key))]}),f&&(0,r.jsxs)("select",{value:null!=(n=c.sidoLabel)?n:"",onChange:e=>d({...c,sidoLabel:e.target.value||null,sigungu:null}),className:C,style:z,children:[(0,r.jsxs)("option",{value:"",children:[f.label," 전체"]}),m.map(e=>(0,r.jsx)("option",{value:e.label,children:e.label},e.label))]}),h&&(0,r.jsxs)("select",{value:null!=(l=c.sigungu)?l:"",onChange:e=>d({...c,sigungu:e.target.value||null}),className:C,style:z,children:[(0,r.jsxs)("option",{value:"",children:[c.sidoLabel," 전체"]}),x.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})]})}function L(){let[e,t]=(0,l.useState)([]),[n,o]=(0,l.useState)(!0),[c,d]=(0,l.useState)(!1),[u,p]=(0,l.useState)("map"),[f,m]=(0,l.useState)(null),[g,h]=(0,l.useState)(null),[x,w]=(0,l.useState)(null),b=(0,l.useRef)(0);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let n=await fetch("/api/sites");if(!n.ok)throw Error();let r=await n.json();e&&t(r.sites)}catch(t){e&&d(!0)}finally{e&&o(!1)}})(),()=>{e=!1}},[]);let C=(0,l.useMemo)(()=>e.map(e=>(function(e,t){let n=null!=e.lat&&null!=e.lng;return{...e,regionKey:function(e){if(!e)return null;for(let t of a)if(t.sidos.some(t=>t.match.includes(e)))return t.key;return null}(e.province),sidoLabel:s(e.province),hasCoord:n,distanceKm:n&&t?function(e,t,n,r){let l=i(n-e),a=i(r-t),o=Math.sin(l/2)*Math.sin(l/2)+Math.cos(i(e))*Math.cos(i(n))*Math.sin(a/2)*Math.sin(a/2);return Math.round(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))*637100)/100}(t.lat,t.lng,e.lat,e.lng):void 0}})(e,f)),[e,f]),[z,L]=(0,l.useState)(k),M=(0,l.useMemo)(()=>C.filter(e=>{var t;return(!(t=z.query).trim()||j(e.name).includes(j(t)))&&(!z.regionKey||e.regionKey===z.regi
1onKey)&&(!z.sidoLabel||s(e.province)===z.sidoLabel)&&(!z.sigungu||e.sigungu===z.sigungu)}).sort((e,t)=>e.name.localeCompare(t.name,"ko")),[C,z]),S=(0,l.useMemo)(()=>M.filter(e=>e.hasCoord),[M]),N=(0,l.useMemo)(()=>{if(z.sidoLabel){var e=z.sidoLabel;if(!e)return null;for(let t of a)for(let n of t.sidos)if(n.label===e)return{...n.center,zoom:n.zoom};return null}if(z.regionKey){var t=z.regionKey;if(!t)return null;let e=a.find(e=>e.key===t);return e?{...e.center,zoom:e.zoom}:null}return null},[z.sidoLabel,z.regionKey]),E=(0,l.useCallback)(e=>{let t=C.find(t=>t.id===e);t&&(t.hasCoord?(b.current+=1,h({id:e,seq:b.current}),p("map")):w("지도 위치 정보가 없는 병원이에요. 목록에서 정보를 확인해 주세요."))},[C]);return(0,l.useEffect)(()=>{if(!x)return;let e=setTimeout(()=>w(null),2500);return()=>clearTimeout(e)},[x]),(0,r.jsxs)("section",{className:"mx-auto flex h-full w-full max-w-[1200px] flex-col",children:[(0,r.jsx)(_,{sites:C,state:z,onChange:L,totalCount:M.length}),(0,r.jsxs)("div",{className:"flex border-b md:hidden",children:[(0,r.jsx)("button",{onClick:()=>p("map"),"aria-pressed":"map"===u,className:"flex-1 py-3 text-sm ".concat("map"===u?"border-b-2 border-black font-semibold":"text-gray-500"),children:"지도"}),(0,r.jsx)("button",{onClick:()=>p("list"),"aria-pressed":"list"===u,className:"flex-1 py-3 text-sm ".concat("list"===u?"border-b-2 border-black font-semibold":"text-gray-500"),children:"목록"})]}),(0,r.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,r.jsx)("div",{className:"h-full md:w-[380px] md:shrink-0 md:border-r ".concat("map"===u?"hidden md:block":"w-full"),children:(0,r.jsx)(y,{sites:M,isLoading:n,error:c,onSelect:E})}),(0,r.jsx)("div",{className:"h-full flex-1 ".concat("list"===u?"hidden md:block":""),children:(0,r.jsx)(v,{sites:S,selected:g,focus:N,onUserLocate:m})})]}),x&&(0,r.jsx)("div",{className:"pointer-events-none fixed bottom-6 left-1/2 z-[300] -translate-x-1/2 rounded-lg bg-black/80 px-4 py-2 text-sm text-white shadow-lg",children:x})]})}},3740:(e,t,n)=>{Promise.resolve().then(n.bind(n,3543))},4853:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cancelIdleCallback:function(){return r},requestIdleCallback:function(){return n}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[0,441,255,358],()=>e(e.s=3740)),_N_E=e.O()}]);

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.