PageSourceSearch

https://www.petalmaps.com/assets/index-c0854048.js

js petalmaps.com collected 2026-10-01 15:37:05 UTC 6,391 bytes, 1 lines download raw bytes

1import{_ as de,u as pe,k as _e,H as ve,l as x,g as he,U as F,m as fe,n as q,p as j,q as N,v as ge,w as me,x as ye}from"./main-2.3.0.377.js";import{d as Le,C as Te,r as u,a2 as Ie,M as Ee,o as Ae,c as we,e as o,y as ke,u as l,g as i,x as _,O as b,W as S,h as v,w as xe,N as $,P as be,F as Se,j as s}from"./vendor-2.3.0.377.js";import{u as Ce}from"./index-2.3.0.3772.js";import{R as Ve}from"./RouteLoading-2.3.0.377.js";import{i as G}from"./index-2.3.0.377.js";var Ne=["CAPITAL","CAPITAL_CITY","CONTINENT","COUNTRY","STREET_ADDRESS","STREET_NUMBER","ADMINISTRATIVE_AREA_LEVEL_1","ADMINISTRATIVE_AREA_LEVEL_3","ADMINISTRATIVE_AREA_LEVEL_2","SUBLOCALITY","SUBLOCALITY_LEVEL_1","SUBLOCALITY_LEVEL_2","SUBLOCALITY_LEVEL_4","GENERAL_CITY","SUBLOCALITY_LEVEL_3","SUBLOCALITY_LEVEL_5","TOWN","ADMINISTRATIVE_AREA_LEVEL_4","ADMINISTRATIVE_AREA_LEVEL_5"];const Re={class:"detail-box"},Me={key:0,class:"top-box"},Ue={class:"title"},De={key:0,class:"food"},Pe={class:"tag-bg"},Be={key:0,class:"tags-box"},He={class:"content-box"},Oe={key:0,class:"photos-box"},Ye=["src"],We={class:"middle-card"},ze={key:0,class:"location"},Fe={class:"right-box"},qe={key:1,class:"time-box"},je={class:"right-bigbox"},$e={style:{display:"flex","flex-direction":"column",flex:"1"}},Ge={key:0,class:"right-box"},Je={key:2,class:"location"},Ke={class:"right-box"},Qe=["href"],Ze={key:3,class:"location"},Xe={class:"right-box"},et={key:4,class:"location"},tt={class:"right-box"},ot=["href"],st=Le({__name:"index",props:["position","siteId","poiName"],setup(J,{expose:K}){K({close:ue});const g=J,{getMapTopHiddenHeight:Q,setInitCenter:Z}=pe(),{setCurrentMarker:X,clearCurrentMarker:R}=me();Te({inheritLocale:!0,useScope:"global"});const M=be();_e();let{offsetTop:ee,offsetTops:te,isLoading:T,site:n}=Ce();const{updateSwiper:oe,swiperContainerRef:U}=ye(),h=u(""),D=u(""),I=u(""),E=u([]),P=u([]),C=u([]),B=u([]),se=u(""),H=u(!1),f=u(!0),A=[],O=Ie(ie,100);Ee(()=>g.siteId,()=>{O()}),Ae(()=>{O(),oe({offsetTop:ee.value,offsetTops:te.value})}),we(()=>{ae()});async function ie(){A.push(Y()),g.siteId&&A.push(re(g.siteId))}async function ae(){for(;A.length>0;){const e=await A.shift();e&&e()}}function ne(e){return/http[s]{0,1}:\/\/([\w.]+\/?)\S*/.test(e)||(e="https://"+e),e}function le(e){return e.includes("HuaweiMaps")&&!e.endsWith("/small.jpg")&&!e.includes("meetkai")&&(e=e+"/small.jpg"),e}async function re(e){const t=W();return n.value={},t.location&&(n.value.location=t.location),n.value.name=g.poiName,T.value=!0,ve.webButtonDot("secondPage","poiDetailSearch"),new Promise(async r=>{const d=await x.getSiteService(),p=he();d.searchById({siteId:e,language:p},async(a,w)=>{var m,y;if(T.value=!1,w==="0"){n.value=a.site;const L=a.site.poi.poiTypes;if(L.length){let k=L.some(c=>Ne.indexOf(c)!==-1);H.value=!k}E.value=(m=a.site.poi.openingHoursV2)==null?void 0:m.texts,P.value=(y=a.site.poi.openingHoursV2)==null?void 0:y.periods,C.value=a.site.poi.childrenNodes,h.value=a.site.poi.phone?a.site.poi.phone:a.site.poi.internationalPhone,h.value=F.isValidURL(h.value),D.value=a.site.poi.email,I.value=F.isValidURL(a.site.poi.websiteUrl),B.value=a.site.poi.hwPoiTranslatedTypes,se.value=a.site.poi.priceLevel,t.zoom!==void 0&&!t.location&&Z(()=>({location:{lng:a.site.location.lng,lat:a.site.location.lat},zoom:t.zoom}),!0),t.location||r(Y({lng:a.site.location.lng,lat:a.site.location.lat}))}r()})})}async function Y(e){return new Promise(async t=>{if(!e){const d=W();if(!d.location)return t();e=d.location}ce(e),R();const r=await x.createMarker({position:e,icon:{url:fe,scale:.9}});r.setZIndex(99),X(r),t(()=>{R()})})}function W(){const e={zoom:void 0,location:{lat:void 0,lng:void 0}},t=g.position.split(",");return t.length===1?(e.zoom=Number(t[0]),e.location=null):t.length>1&&(e.location.lng=Number(t[0]),e.location.lat=Number(t[1]),e.zoom=Number(t[2])),e}async function ce(e){const t=await x.getMap();await x.waitFrameState();const[r,d]=t.rMap.map.getPixelFromCoordinate(Se([e.lng,e.lat])),p=d-Q();(r<0||r>q||p<0||j()&&p>N.value*.5||!j()&&(p>N.value||p>N.value*.5&&(!G()&&r<U.value.$el.clientWidth+60||G()&&r>q.value-U.value.$el.clientWidth-60)))&&t.setCenter(e)}function z(){f.value=!f.value}function ue(){history.state.back?M.back():M.push("/")}return(e,t)=>{var r,d,p,a,w,m,y,L,k;return s(),o("div",Re,[ke(Ve,{routeLoading:l(T)},null,8,["routeLoading"]),l(T)?v("",!0):(s(),o("div",Me,[i("div",Ue,_(l(n).name),1),(r=B.value)!=null&&r.length?(s(),o("div",De,[(s(!0),o(b,null,S((d=l(n).poi)==null?void 0:d.hwPoiTranslatedTypes,c=>(s(),o("span",{key:c},_(c),1))),128))])):v("",!0)])),i("div",Pe,[(p=C.value)!=null&&p.length?(s(),o("div",Be,[(s(!0),o(b,null,S(C.value,(c,V)=>(s(),o("span",{key:V},_(c),1))),128))])):v("",!0)]),xe((s(),o("div",He,[(a=l(n).poi)!=null&&a.photoUrls?(s(),o("div",Oe,[(s(!0),o(b,null,S((w=l(n).poi)==null?void 0:w.photoUrls,c=>(s(),o("div",{class:"every-img",key:c},[i("img",{class:"photos-img",src:le(c)},null,8,Ye)]))),128))])):v("",!0),i("div",We,[l(n).formatAddress?(s(),o("div",ze,[t[0]||(t[0]=i("i",{class:"iconfont map-location icon_style"},null,-1)),i("div",Fe,[i("p",null,_(l(n).formatAddress),1)])])):v("",!0),l(n).siteId&&((m=E.value)==null?void 0:m.length)&&H.value&&P.value?(s(),o("div",qe,[t[1]||(t[1]=i("i",{class:"iconfont map-clock icon_style"},null,-1)),i("div",je,[i("div",$e,[f.value?(s(!0),o(b,{key:1},S(E.value,(c,V)=>(s(),o("div",{class:"right-box",key:V},[i("p",null,_(c),1)]))),128)):(s(),o("div",Ge,[i("p",null,_(E.value[0]),1)]))]),f.value?(s(),o("i",{key:0,class:$(["iconfont map-arrow_down",{change_arrow:!f.value}]),onClick:z},null,2)):(s(),o("i",{key:1,class:$(["iconfont map-arrow_down arrow_style",{change_arrow:!f.value}]),onClick:z},null,2))])])):v("",!0),l(n).siteId&&((y=h.value)==null?void 0:y.length)?(s(),o("div",Je,[t[2]||(t[2]=i("i",{class:"iconfont map-phone icon_style"},null,-1)),i("div",Ke,[i("a",{href:"tel:"+h.value},_(h.value),9,Qe)])])):v("",!0),l(n).siteId&&((L=D.value)==null?void 0:L.length)?(s(),o("div",Ze,[t[3]||(t[3]=i("i",{class:"iconfont map-email icon_style"},null,-1)),i("div",Xe,[i("p",null,_(l(n).poi.email),1)])])):v("",!0),l(n).siteId&&((k=I.value)==null?void 0:k.length)?(s(),o("div",et,[t[4]||(t[4]=i("i",{class:"iconfont map-earth icon_style"},null,-1)),i("div",tt,[i("a",{href:ne(I.value),target:"_blank"},_(I.value),9,ot)])])):v("",!0)])])),[[l(ge)]])])}}});var ct=de(st,[["__scopeId","data-v-0d4b62b0"]]);export{ct 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.