1import{_ as T,a as K}from"./DiJLFDDe.js";import N from"./BkdGuecj.js";import F from"./BZmDYlp_.js";import{_ as A,a4 as C,c,o as d,x as g,e as i,j as h,y as m,t as u,F as _,f as k,n as P,l as L,k as B,v as D,w as p,i as E,an as V,z as U,u as I,p as O,O as j,q as R}from"./2fJvMp9r.js";import{u as q}from"./DG2Q-0xs.js";import z from"./_0sYFjOx.js";import{t as J}from"./CtVU4XJQ.js";import G from"./DqhG14hA.js";import H from"./Cbroc-Ng.js";import"./DijW1qqG.js";import"./DEw16_lV.js";import"./32sRaJxn.js";import"./DLEpPkuL.js";const W={async setup(){var l;const{$fetcher:t,$retrieve:e,$i18n:a}=U(),n=I(),r=O();await j(()=>t([{api:"servicemenumng/getNavigation",retrieveKey:"navigationData",query:{menuid:"{$.query.menuId}"}}]),"$d5ETwkLtl4");let s={};return e("serviceMenuData").loaded&&(s=e("serviceMenuData").data.item),R({titleTemplate:"Visit Jeju : "+(((l=s==null?void 0:s.uppermenuid)==null?void 0:l.label)??"")+" > NOWDA"+((s==null?void 0:s.titleseo)??"")}),{siteStore:n,sessionServiceStore:r}},components:{location:z,microTop:H,BenefitView:G},name:"TouristList",data:function(){return{menuData:this.retrieve("serviceMenuData").data.item,touristSpots:J,nowdaStore:null,selectedLevel:1,searchKeyword:"",selectedCategory:"ì ì²´",categories:["ì ì²´","ê´ê´ì§","ì²´í/ë í¬ì¸ ","ììë£","ì¼í/ìíìµ"],currentPage:1,pageSize:12,firstPageNo:1,_center:null,showModal:!1,modalCode:null,isMapActive:!1,_originalTouristSpots:null,lastFocusedElement:null}},computed:{userLevel(){var t,e;return((e=(t=this.nowdaStore)==null?void 0:t.user)==null?void 0:e.lvl)||1},filteredSpots(){let t=this.selectedCategory==="ì ì²´"?this.touristSpots:this.touristSpots.filter(e=>e.category===this.selectedCategory);if(this.searchKeyword.trim()!==""){const e=this.searchKeyword.trim().toLowerCase();t=t.filter(a=>a.name.toLowerCase().includes(e))}return t},pagedSpots(){const t=(this.currentPage-1)*this.pageSize,e=t+this.pageSize;return this.filteredSpots.slice(t,e)},totalPages(){return Math.ceil(this.filteredSpots.length/this.pageSize)},lastPageNo(){return this.totalPages}},methods:{openSpotModal(t,e){this.lastFocusedElement=(e==null?void 0:e.currentTarget)||document.activeElement,this.modalCode=t.code,this.showModal=!0,this.$nextTick(()=>{this.$refs.benefitView&&this.$refs.benefitView.focusFirst()})},closeModal(){this.showModal=!1,this.modalCode=null,this.$nextTick(()=>{this.lastFocusedElement&&(this.lastFocusedElement.focus(),this.lastFocusedElement=null)})},handlePopState(t){this.showModal&&this.closeModal()},currentBenefit(t){return this.selectedLevel?t.levels.find(e=>e.level===Number(this.selectedLevel)):null},syncSelectedLevelFromSession(){const t=q(this.$pinia);this.nowdaStore=t,this.selectedLevel=Number(this.userLevel)||1},searchSpots(){this.currentPage=1},categoryTabIndex(t,e){return this.selectedCategory===t||!this.categories.includes(this.selectedCategory)&&e===0?0:-1},onCategoryKeydown(t,e){const a=this.categories.length-1;let n=-1;if(t.key==="ArrowRight"?n=e===a?0:e+1:t.key==="ArrowLeft"?n=e===0?a:e-1:t.key==="Home"?n=0:t.key==="End"&&(n=a),n<0)return;t.preventDefault();const r=t.currentTarget.parentElement,s=this.categories[n];this.selectCategory(s),this.$nextTick(()=>{const l=r?r.querySelectorAll('[role="tab"]'):null;l&&l[n]&&l[n].focus&&l[n].focus()})},selectCategory(t){if(this.selectedCategory===t)return;this.selectedCategory=t,this.currentPage=1;const e=new URLSearchParams(window.location.search);this.selectedCategory==="ì ì²´"||this.selectedCategory===""?e.delete("category"):e.set("category",this.selectedCategory),e.delete("page");const a=window.location.pathname+(e.toString()?"?"+e.toString():"");window.history.pushState({},"",a)},changePage(t){this.currentPage=t;const e=new URLSearchParams(window.location.search);t===1?e.delete("page"):e.set("page",t),this.selectedCategory==="ì ì²´"?e.delete("category"):e.set("category",this.selectedCategory);const a=window.location.pathname+(e.toString()?"?"+e.toString():"");window.history.pushState({},"",a),this.$nextTick(()=>{const n=document.querySelector("h4");n&&n.scrollIntoView({behavior:"smooth",block:"start"})})},updateStateFromUrl(){const t=new URLSearchParams(window.location.search),e=t.get("category");e&&this.categories.includes(e)?this.selectedCategory=e:this.selectedCategory="ì ì²´";const a=t.get("page");a?this.currentPage=parseInt(a,10):this.currentPage=1},_resetToInitialState(){this._initialState&&(this.selectedLevel=Number(this.userLevel)||1,this.searchKeyword=this._initialState.searchKeyword,this.selectedCategory=this._initialState.selectedCategory,this.currentPage=this._initialState.currentPage)},_getCurrentPosition(){return new Promise((t,e)=>{if(typeof window>"u"||!("geolocation"in navigator))return e(new Error("ì´ ë¸ë¼ì°ì ììë ìì¹ ì 보를 ê°ì ¸ì¬ ì ìì´ì."));const a={enableHighAccuracy:!0,timeout:1e4,maximumAge:0};navigator.geolocation.getCurrentPosition(n=>{t({lat:n.coords.latitude,lng:n.coords.longitude})},n=>{console.error("Geolocation Error Detail:",n),e(n)},a)})},formatKm(t){const e=Number(t);return isFinite(e)?(Math.round(e*10)/10).toFixed(1):""},_distanceKm(t,e,a,n){const s=b=>
1b*Math.PI/180,l=s(a-t),y=s(n-e),w=Math.sin(l/2)*Math.sin(l/2)+Math.cos(s(t))*Math.cos(s(a))*Math.sin(y/2)*Math.sin(y/2);return 6371*(2*Math.atan2(Math.sqrt(w),Math.sqrt(1-w)))},_sortSpotsByDistanceFrom(t,e){const a=this.touristSpots;if(!Array.isArray(a))return;const n=a.map(r=>{const l=typeof r.lat=="number"&&typeof r.lng=="number"?this._distanceKm(t,e,r.lat,r.lng):1/0;return{...r,_distanceKm:l}}).sort((r,s)=>r._distanceKm-s._distanceKm);this.touristSpots=n},async handleSortByLocation(){if(this.isMapActive){this._resetLocationSort(),this.isMapActive=!1;return}this.isMapActive=!0;try{const{lat:t,lng:e}=await this._getCurrentPosition(),r=this._distanceKm(33.388299,126.560507,t,e);isFinite(r)&&r>50?(this.showToast("ì 주ë ì¸ ì§ìì ê³ìë¯ë¡ ì 주공í 기ì¤ì¼ë¡ ì ë ¬í©ëë¤."),this._sortSpotsByDistanceFrom(33.507465,126.493416)):(this._sortSpotsByDistanceFrom(t,e),this.showToast("íì¬ ìì¹ì ê°ê¹ì´ ìì¼ë¡ ì ë ¬ëììµëë¤."))}catch(t){let e="ìì¹ ì 보를 ê°ì ¸ì¬ ì ììµëë¤.";t.code===1?e="ë¸ë¼ì°ì ì ìì¹ ê¶íì´ ê±°ë¶ëììµëë¤. 주ìì°½ ì¼ìª½ ìì´ì½ì ëë¬ ê¶íì íì©í´ 주ì¸ì.":t.code===2?e="íì¬ ìì¹ë¥¼ íì¸í ì ììµëë¤. GPS ì í¸ë¥¼ íì¸í´ 주ì¸ì.":t.code===3&&(e="ìì¹ ì ë³´ ìëµ ìê°ì´ ì´ê³¼ëììµëë¤."),this.showToast(e+" ì 주공í 기ì¤ì¼ë¡ ì ë ¬í©ëë¤."),this._sortSpotsByDistanceFrom(33.507465,126.493416),this.isMapActive=!1}},_resetLocationSort(){this._originalTouristSpots&&(this.touristSpots=JSON.parse(JSON.stringify(this._originalTouristSpots))),this.isMapActive=!1,this.currentPage=1},showToast(t){alert(t)}},mounted:function(){const t=new URLSearchParams(window.location.search),e=t.get("category");e&&this.categories.includes(e)&&(this.selectedCategory=e);const a=t.get("page");a&&(this.currentPage=parseInt(a,10)),this.updateStateFromUrl(),this.syncSelectedLevelFromSession(),window.addEventListener("popstate",this.updateStateFromUrl)},beforeDestroy(){window.removeEventListener("popstate",this.updateStateFromUrl)},created(){this.filteredSpots=this.touristSpots,this._originalTouristSpots=JSON.parse(JSON.stringify(this.touristSpots)),this.syncSelectedLevelFromSession()},head:function(){return this.$store.state.site.lang,{titleTemplate:"Visit Jeju : 멤ë²ì íí - ì 주 NFT ëì§í¸ ê´ê´ì¦ ëì°ë¤(NOWDA)",title:"멤ë²ì íí - ì 주 NFT ëì§í¸ ê´ê´ì¦ ëì°ë¤(NOWDA)",meta:[{hid:"og:title",property:"og:title",content:"멤ë²ì íí - ì 주 NFT ëì§í¸ ê´ê´ì¦ ëì°ë¤(NOWDA)"},{hid:"og:url",property:"og:url",content:"https://www.visitjeju.net/kr/nowda/benefit"},{hid:"og:description",property:"og:description",content:"ë§´ë²ì ííì¼ë¡ ë¤ìí ì í´ ê´ê´ì¬ì
ì²´ìì í ì¸ ë° ë¤ìí ìë¹ì¤ë¥¼ ë°ì ì ììµëë¤"},{hid:"description",name:"description",content:"ë§´ë²ì ííì¼ë¡ ë¤ìí ì í´ ê´ê´ì¬ì
ì²´ìì í ì¸ ë° ë¤ìí ìë¹ì¤ë¥¼ ë°ì ì ììµëë¤"},{hid:"og:image",property:"og:image",content:"https://www.visitjeju.net/image/nowda/og_nowda.png"},{hid:"og:image:secure_url",property:"og:image:secure_url",content:"https://www.visitjeju.net/image/nowda/og_nowda.png"},{hid:"og:image:width",property:"og:image:width",content:"1200"},{hid:"og:image:height",property:"og:image:height",content:"600"}]}}},$={id:"content",tabindex:"-1"},x={key:0},Q={class:"tag-box"},X={class:"container",role:"tablist","aria-label":"ì¹´í
ê³ ë¦¬ íí°"},Y=["aria-selected","tabindex","title","onClick","onKeydown"],Z={class:"filter_nowda"},ee={class:"container"},te=["aria-pressed"],se={class:"nowda_benefit"},oe={class:"container"},ie={class:"box"},ae={key:0,class:"item"},ne=["href","onClick"],re={class:"image"},le=["src","alt"],ce={key:0,class:"distance"},de={key:1,class:"flex-list"},ue={class:"benefit-txt"},ge={class:"pagination"},he=["disabled"],me=["disabled"],pe={class:"modal-content",role:"dialog","aria-modal":"true","aria-labelledby":"modal-title"};function fe(t,e,a,n,r,s){const l=T,y=N,w=C("microTop"),v=F,b=K,M=C("BenefitView");return d(),c(_,null,[g(l,{subClass:"on"}),g(y,{class:"nowda"}),i("div",$,[g(w,{onmenu:"benefit"}),g(v,{class:"nowda"}),t.touristSpots?(d(),c("h4",x,[e[10]||(e[10]=m(" ì´ ",-1)),i("strong",null,u(t.touristSpots.length)+"ê°",1),e[11]||(e[11]=m("ì ",-1)),e[12]||(e[12]=i("strong",null,"ê´ê´ì¬ì
ì²´",-1)),e[13]||(e[13]=m("ìì ííì ì ê³µíê³ ììµëë¤ ",-1))])):h("",!0),i("section",Q,[i("div",X,[(d(!0),c(_,null,k(t.categories,(o,f)=>(d(),c("button",{key:o,role:"tab",class:P({on:t.selectedCategory===o}),"aria-selected":t.selectedCategory===o,tabindex:s.categoryTabIndex(o,f),title:t.selectedCategory===o?o+" ì¹´í
ê³ ë¦¬ ì íë¨":o+" ì¹´í
ê³ ë¦¬ ì í",onClick:S=>s.selectCategory(o),onKeydown:S=>s.onCategoryKeydown(S,f)}," #"+u(o),43,Y))),128))])]),i("section",Z,[i("div",ee,[i("button",{class:P(["location",{active:t.isMapActive}]),"aria-pressed":t.isMapActive?"true":"false",onClick:e[0]||(e[0]=(...o)=>s.handleSortByLocation&&s.handleSortByLocation(...o))},"ìì¹ê¸°ì¤ì ë ¬",10,te),i("div",{class:"list-search",onKeyup:e[3]||(e[3]=L((...o)=>s.searchSpots&&s.searchSpots(...o),["enter"]))},[e[14]||(e[14]=i("label",{for:"searchKeyword",class:"sr-only"},"ê´ê´ì§ ê²ì",-1)),B(i("input",{id:"searchKeyword",type:"text","onUpdate:modelValue":e[1]||(e[1]=o=>t.searchKeyword=o)},null,512),[[D,t.searchKeyword]]),i("button",{onClick:e[2]||(e[2]=(...o)=>t.search&&t.search(...o))},"ê²ì")],32)])]),i("section",se,[i("div",oe,[i("div",ie,[(d(!0),c(_,null,k(s.pagedSpots,(o,f)=>(d(),c(_,{key:f},[f<12?(d(),c("div",ae,[i("a",{href:"/kr/nowda/benefit-view?code="+o.code,onClick:p(S=>s.openSpotModal(o,S),["prevent"]),target:"_blank",title:"ìì°½ì´ë¦¼"},[i("p",re,[i("img",{src:o.thumbnail,alt:o.name+" ì¸ë¤ì¼ ì´ë¯¸ì§"},null,8,le)]),isFinite(o._distanceKm)?(d(),c("i",ce,u(s.formatKm(o._distanceKm))+" km",1)):h("",!0),i("strong",null,u(o.name),1),i("span",null,u(o.description),1),s.currentBenefit(o)?(d(),c("div",de,[i("div",ue,u(s.currentBenefit(o).membershipBenefit),1)])):h("",!0)],8,ne)])):h("",!0)],64))),128))]),i("div",ge,[t.currentPage>1?(d(),c("button",{key:0,class:"first",onClick:e[4]||(e[4]=p(o=>s.changePage(1),["prevent"]))},u(t.$i("common.paging.first")),1)):h("",!0),i("button",{class:"prev",onClick:e[5]||(e[5]=p(o=>s.changePage(t.currentPage-1),["prevent"])),disabled:t.currentPage<=1},u(t.$i("common.paging.prev")),9,he),i("span",null,[e[15]||(e[15]=m(" íì¬ ",-1)),i("strong",null,u(t.currentPage),1),e[16]||(e[16]=m(" íì´ì§ë¥¼ ë³´ê³ ìì¼ë©°, ì ì²´ ",-1)),e[17]||(e[17]=i("i",null,"/",-1)),i("u",null,u(s.lastPageNo),1),e[18]||(e[18]=m(" íì´ì§ê° ììµëë¤ ",-1))]),i("button",{class:"next",onClick:e[6]||(e[6]=p(o=>s.changePage(t.currentPage+1),["prevent"])),disabled:t.currentPage>=s.lastPageNo},u(t.$i("common.paging.next")),9,me),t.currentPage<s.lastPageNo?(d(),c("button",{key:1,class:"last",onClick:e[7]||(e[7]=p(o=>s.changePage(s.lastPageNo),["prevent"]))},u(t.$i("common.paging.last")),1)):h("",!0)])])])]),g(b),g(V,{name:"fade"},{default:E(()=>[t.showModal?(d(),c("div",{key:0,class:"modal-backdrop",onClick:e[8]||(e[8]=p((...o)=>s.closeModal&&s.closeModal(...o),["self"])),onKeydown:e[9]||(e[9]=L((...o)=>s.closeModal&&s.closeModal(...o),["esc"]))},[i("div",pe,[g(M,{ref:"benefitView",code:t.modalCode,onClose:s.closeModal},null,8,["code","onClose"])])],32)):h("",!0)]),_:1})],64)}const Ne=A(W,[["render",fe],["__scopeId","data-v-b1095547"]]);export{Ne 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.