1import{_ as H}from"./CD_lHf65.js";import{_ as $}from"./C7GBMLUb.js";import{f as q,O as I,j as T,N as O,ac as Z,v as E,q as G,u as U,k as W,ae as J,o as a,c as i,d as S,l as n,a as s,ad as k,t as u,e as A,S as Q,F as X,G as Y,M as tt,m as et,r as f,D as C,af as ot,p as st}from"./B7lTcWLE.js";const nt={class:"flex flex-col h-dvh bg-white overflow-hidden"},at={class:"shrink-0 flex flex-col justify-center",style:{height:"80px",padding:"0 20px"}},it={style:{"font-family":"NotoSansKR, sans-serif","font-size":"18px","font-weight":"700",color:"#1A1A1A","line-height":"1.35"}},lt={style:{"font-family":"NotoSansKR, sans-serif","font-size":"18px","font-weight":"700",color:"#1A1A1A","line-height":"1.35"}},rt={class:"flex-1 overflow-y-auto"},ct={key:0,class:"flex flex-col items-center",style:{"padding-top":"100px"}},dt={key:1},ut=["onClick"],ft={class:"w-full overflow-hidden bg-gray-100",style:{height:"150px","border-radius":"12px"}},pt=["src","alt"],ht=["stroke"],vt={class:"flex items-center justify-between"},gt={class:"flex-1 truncate",style:{"font-family":"NotoSansKR, sans-serif",color:"#1A1A1A","font-size":"16px","font-weight":"600","margin-right":"8px"}},yt=["onClick"],mt=["fill","stroke"],xt={class:"flex items-start gap-1",style:{"margin-top":"4px"}},_t={width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"#666","stroke-width":"1.8",style:{"flex-shrink":"0","margin-top":"2px"}},wt={class:"flex-1 line-clamp-2",style:{"font-family":"NotoSansKR, sans-serif",color:"#666","font-size":"13px","line-height":"1.38"}},kt={key:0,style:{"font-family":"NotoSansKR, sans-serif",color:"#666","font-size":"13px","text-align":"right","margin-top":"4px"}},Nt=q({__name:"like",setup(At){I({robots:"noindex, nofollow"});const{headNo:g,isApp:B}=T(),{config:F,loadConfig:L,primaryColor:r}=O(),{brandToken:M,brandUser:z}=Z(),{closeWebView:D}=st(),{alert:b}=E(),y=G();U({title:C(()=>`ì¦ê²¨ì°¾ê¸° - ${F.value?.appName??"ë¸ëëì±"}`)});const c=f([]),m=f(!0),p=f(!1),x=C(()=>c.value.filter(o=>o.isFavorite)),P=C(()=>z.value?.userNm??"íì"),h=f(null),_=f(null);function V(){return new Promise(o=>{if(!navigator.geolocation){o();return}navigator.geolocation.getCurrentPosition(({coords:t})=>{h.value=t.latitude,_.value=t.longitude,o()},()=>o(),{enableHighAccuracy:!1,timeout:6e3})})}function N(o,t){if(!h.value||!_.value||!o||!t)return null;const l=6371,d=(o-h.value)*Math.PI/180,e=(t-_.value)*Math.PI/180,v=Math.sin(d/2)**2+Math.cos(h.value*Math.PI/180)*Math.cos(o*Math.PI/180)*Math.sin(e/2)**2,w=l*2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v));return w<1?`${Math.round(w*1e3)}m`:`${w.toFixed(1)}km`}W(async()=>{if(!M.value){y.replace({path:"/brand/login",query:{headNo:g.value}});return}await L();try{const[,o]=await Promise.all([V(),J(g.value,!0)]);c.value=o}finally{m.value=!1}});function R(){B.value?D():y.back()}function j(o){y.push({path:`/store/${o.storeCd}`,query:{headNo:g.value??"1",...o.placeCd?{placeCd:o.placeCd}:{}}})}async function K(o){if(p.value)return;p.value=!0;const t=c.value.findIndex(e=>e.storeCd===o.storeCd),l=t>=0?c.value[t]:void 0;if(!l){p.value=!1;return}const d=l.isFavorite;c.value[t]={...l,isFavorite:!d};try{const e=await ot(o.storeCd,o.placeCd??"",M.value);c.value[t]={...l,isFavorite:e===null?d:e.isFavorite},e===null&&await b("ì¦ê²¨ì°¾ê¸° ì²ë¦¬ì ì¤í¨íì´ì. ì ì í ë¤ì ìëí´ ì£¼ì¸ì.",{type:"error"})}catch{c.value[t]={...l,isFavorite:d},await b("ì¦ê²¨ì°¾ê¸° ì²ë¦¬ì ì¤í¨íì´ì. ì ì í ë¤ì ìëí´ ì£¼ì¸ì.",{type:"error"})}finally{p.value=!1}}return(o,t)=>{const l=H,d=$;return a(),i("div",nt,[S(l,{show:n(m),accent:n(r)},null,8,["show","accent"]),S(d,{title:"ì°í ê³µê°","back-fn":R}),s("div",at,[s("p",it,[s("span",{style:k({color:n(r)})},u(n(P)),5),t[0]||(t[0]=A("ëì ",-1))]),s("p",lt,[t[1]||(t[1]=A(" ì¦ê²¨ì°¾ê¸° ë±ë¡ë ",-1)),s("span",{style:k({color:n(r)})},u(n(x).length),5),t[2]||(t[2]=A("ê° ë§¤ì¥ì
ëë¤. ",-1))])]),s("div",rt,[!n(m)&&n(x).length===0?(a(),i("div",ct,[...t[3]||(t[3]=[Q('<svg width="56" height="56" viewBox="0 0 24 24" fill="none" stroke="#DDDDDD" stroke-width="1.4" stroke-linejoin="round">
1<path d="M5 5C5 3.89543 5.89543 3 7 3H17C18.1046 3 19 3.89543 19 5V21L12 17.5L5 21V5Z"></path></svg><div style="height:20px;"></div><p style="font-family:NotoSansKR, sans-serif;color:#666;font-size:20px;font-weight:600;">ì¦ê²¨ì°¾ë 매ì¥ì´ ììµëë¤.</p><div style="height:8px;"></div><p style="font-family:NotoSansKR, sans-serif;color:#AAAAAA;font-size:16px;font-weight:400;">ê´ì¬ìë 매ì¥ì ì¦ê²¨ì°¾ê¸° í´ë³´ì¸ì.</p>',5)])])):(a(),i("ul",dt,[(a(!0),i(X,null,Y(n(x),e=>(a(),i("li",{key:e.storeCd,class:"cursor-pointer active:opacity-80",style:{padding:"12px 16px"},onClick:v=>j(e)},[s("div",ft,[e.thumbnail?(a(),i("img",{key:0,src:e.thumbnail,alt:e.name,class:"w-full h-full object-cover"},null,8,pt)):(a(),i("div",{key:1,class:"w-full h-full flex items-center justify-center",style:k({backgroundColor:n(r)+"15"})},[(a(),i("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:n(r),"stroke-width":"1.2"},[...t[4]||(t[4]=[s("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),s("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)])],8,ht))],4))]),t[7]||(t[7]=s("div",{style:{height:"16px"}},null,-1)),s("div",vt,[s("p",gt,u(e.name),1),s("button",{type:"button",class:"shrink-0 active:scale-90 transition-transform",style:{width:"24px",height:"24px"},onClick:tt(v=>K(e),["stop"])},[(a(),i("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:e.isFavorite?n(r):"none",stroke:e.isFavorite?n(r):"#1A1A1A","stroke-width":"1.5","stroke-linejoin":"round"},[...t[5]||(t[5]=[s("path",{d:"M5 5C5 3.89543 5.89543 3 7 3H17C18.1046 3 19 3.89543 19 5V21L12 17.5L5 21V5Z"},null,-1)])],8,mt))],8,yt)]),s("div",xt,[(a(),i("svg",_t,[...t[6]||(t[6]=[s("path",{d:"M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0 1 18 0z"},null,-1),s("circle",{cx:"12",cy:"10",r:"3"},null,-1)])])),s("p",wt,u(e.address??""),1)]),N(e.lat,e.lng)?(a(),i("p",kt,u(N(e.lat,e.lng)),1)):et("",!0),t[8]||(t[8]=s("div",{class:"h-px bg-gray-100 mt-3"},null,-1))],8,ut))),128))]))])])}}});export{Nt as default};
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.