1import{d as U,u as F,w as j,c as Y,a as q,b as J,e as r,f as l,g as y,j as M,h as f,i as K,l as $,m as t,_ as Q,n as W,r as X,o as i,F as Z,k as ee,s as te}from"./DOfMt3Vg.js";import{B as ae}from"./B6-UirhY.js";import{B as le}from"./DFUM3AWI.js";import{u as se}from"./3ocB_t93.js";import{u as re}from"./lNLHxb1T.js";import{s as z,a as ie}from"./q3qVDzjT.js";import{b as oe,p as ne}from"./DWUti-mF.js";import{r as I}from"./Cs4gTFZx.js";import"./fB9FXac_.js";const ce={class:"section tourism-detail-page"},ue={class:"wrap"},de={class:"section-head"},me=["innerHTML"],ve={class:"tourism-detail-layout"},pe={key:0,class:"map-box tourism-detail-map"},_e=["src","title"],ge=["src","alt"],ye=["innerHTML"],fe={key:0,class:"tourism-detail-gallery"},he=["onClick"],be=["src","alt"],h="chem-zanyatsya",ze=U({__name:"[code]",async setup(we){let u,b;function w(e){const a=Array.isArray(e)?e[0]:e;return String(a??"").trim()}const C=F(),d=W(),o=re(),k=se(),m=$(null),S=$(null),A=t(()=>w(C.params.sectionCode)),n=t(()=>w(C.params.code)),s=t(()=>o.detail),v=t(()=>s.value?.name?.trim()||n.value||"ÐаÑÑÑÑÑ"),c=t(()=>z(v.value)),T=t(()=>I(s.value?.detailPicture?.src??s.value?.previewPicture?.src,d.public.backendPath)),p=t(()=>ne(s.value?.coordinates)),x=t(()=>p.value?oe(p.value.latitude,p.value.longitude):""),P=t(()=>{const e=s.value?.detailText?.trim()||s.value?.previewText?.trim()||"";return e?ie(e,d.public.backendPath):""}),D=t(()=>s.value?.galleryAlbums?.[0]?.code?.trim()||""),N=t(()=>D.value?k.getSection(D.value):null),_=t(()=>(N.value?.elements.items??[]).map(e=>{const a=I(e.detailPicture?.src??e.previewPicture?.src,d.public.backendPath);return a?{id:e.id,title:z(e.name?.trim()||v.value),imageSrc:a}:null}).filter(e=>e!==null)),R=t(()=>[{label:"ÐлавнаÑ",href:"/"},{label:"ÐаÑÑÑÑÑÑ Ð¸ меÑÑа",href:`/turizm/${h}/`},{label:c.value}]),V=()=>{m.value?.goPrev()},E=()=>{m.value?.goNext()},L=e=>{S.value?.$viewer?.view(e)};async function H(e){if(!e)return null;try{await o.fetchDetail(e,{force:!0})}catch{return null}const a=o.detail?.galleryAlbums?.[0]?.code?.trim();if(a)try{await k.fetchSection(a,{force:!0})}catch{return o.detail}return o.detail}if(!([u,b]=j(()=>H(n.value)),u=await u,b(),u))throw Y({statusCode:404,statusMessage:"СÑÑаниÑа не найдена"});return q(()=>n.value,async(e,a)=>{if(!e||e===a)return;await H(e)||te({statusCode:404,statusMessage:"СÑÑаниÑа не найдена"})}),J({title:s.value?.seo?.title||c.value,description:s.value?.seo?.description||c.value,path:n.value?`/turizm/${h}/${encodeURIComponent(A.value)}/${encodeURIComponent(n.value)}/`:`/turizm/${h}/`,type:"article"}),(e,a)=>{const B=Q,O=X("viewer");return i(),r("section",ce,[l("div",ue,[y(ae,{items:R.value},null,8,["items"]),l("div",de,[l("div",null,[l("h1",{class:"h2",innerHTML:v.value},null,8,me)])]),l("div",ve,[x.value?(i(),r("div",pe,[y(B,null,{default:M(()=>[l("iframe",{src:x.value,title:`ÐаÑÑа: ${c.value}`,loading:"lazy"},null,8,_e)]),_:1})])):T.value?(i(),r("img",{key:1,class:"tourism-detail-hero",src:T.value,alt:c.value},null,8,ge)):f("",!0),P.value?(i(),r("div",{key:2,class:"tourism-detail-content",innerHTML:P.value},null,8,ye)):f("",!0)]),_.value.length?(i(),r("section",fe,[l("div",{class:"tourism-detail-gallery-head"},[a[0]||(a[0]=l("h2",{class:"tourism-detail-gallery-title"},"ФоÑогалеÑеÑ",-1)),l("div",{class:"slider-nav"},[l("button",{"aria-label":"ÐÑедÑдÑÑее ÑоÑо",onClick:V},"â"),l("button",{"aria-label":"СледÑÑÑее ÑоÑо",onClick:E},"â")])]),K((i(),r("div",{ref_key:"galleryViewerHost",ref:S,class:"tourism-detail-gallery-slider"},[y(le,{ref_key:"gallerySlider",ref:m,"track-id":"tourismDetailGalleryTrack","wrap-class":"tourism-detail-gallery-slider-wrap","track-class":"tourism-detail-gallery-track","items-count":_.value.length,"visible-desktop":4,"visible-tablet":3,"visible-mobile":2,gap:18},{default:M(()=>[(i(!0),r(Z,null,ee(_.value,(g,G)=>(i(),r("button",{key:g.id,class:"tourism-detail-gallery-slide",type:"button",onClick:ke=>L(G)},[l("img",{src:g.imageSrc,alt:g.title},null,8,be)],8,he))),128))]),_:1}
1,8,["items-count"])])),[[O]])])):f("",!0)])])}}});export{ze 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.