1import{u as W,_ as X,a as Z,b as ee,c as te,d as oe,e as se,f as ne,g as ie}from"./Bx32ITVT.js";import{_ as j}from"./CxMCNjUa.js";import{i as E,U as M,j as L,B as re,o as i,c,a as n,F as S,D as $,C as A,t as ae,g as B,w as P,d as N,b as s,q as D,k as w,f as l,x as T,h as ce,u as le,l as ue,z as de,m as me}from"./C4-mtOfP.js";import{_ as R}from"./DlAUqK2U.js";import{_ as pe}from"./Tb1xNDox.js";import{_ as ve}from"./DC64LUpW.js";import{_ as _e}from"./d-ZkllEu.js";import{u as fe}from"./7wDI_HF0.js";import{u as ge}from"./Bk6l6lPE.js";import"./WAJsY_rR.js";import"./CnRz1fRY.js";import"./BHfhEbzc.js";import"./BdkEiKsM.js";const he={class:"video-carousel-section"},ye={key:0,class:"video-carousel-container"},be={class:"videos-wrapper"},ke=["onClick"],we={class:"video-wrapper"},Ce=["src","poster"],xe={class:"video-overlay"},Se={class:"video-content"},Pe={class:"video-title ff-md"},He={class:"video-actions"},Ie={key:2,class:"video-indicators"},Te=["onClick"],Ve={__name:"VideoCarousel",props:{videos:{type:Array,default:()=>[]}},setup(p){const v=p,_=T({}),u=T(0),d=T(!1),b=(o,t)=>{o&&(_.value[t]=o)},C=o=>{const t=v.videos.length;if(t===0)return"";const r=u.value,a=o-r;let e=a;return a>t/2?e=a-t:a<-t/2&&(e=a+t),e===0?"center":e===1?"right":e===-1?"left":e>1?"far-right":e<-1?"far-left":""},f=async o=>{const t=_.value[o];if(t&&t.paused)try{await t.play()}catch(r){console.log("è§é¢ææ¾å¤±è´¥:",r)}},y=o=>{const t=_.value[o];t&&!t.paused&&t.pause()},k=()=>{Object.keys(_.value).forEach(o=>{y(parseInt(o))})},g=o=>{d.value||o===u.value||(d.value=!0,k(),u.value=o,M(()=>{f(o)}),setTimeout(()=>{d.value=!1},500))},H=()=>{if(d.value)return;const o=v.videos.length,t=(u.value-1+o)%o;g(t)},I=()=>{if(d.value)return;const o=v.videos.length,t=(u.value+1)%o;g(t)},m=o=>{if(o===u.value){const t=_.value[o];t&&(t.paused?f(o):y(o))}else g(o)};return E(()=>{M(()=>{setTimeout(()=>{f(0)},100)})}),L(()=>{k()}),(o,t)=>{const r=re("IconifyIcon"),a=j;return i(),c("section",he,[p.videos.length>0?(i(),c("div",ye,[n("div",be,[(i(!0),c(S,null,$(p.videos,(e,h)=>(i(),c("div",{key:e.id,class:A(["video-item",C(h)]),onClick:x=>m(h)},[n("div",we,[n("video",{ref_for:!0,ref:x=>b(x,h),src:e.video?.url,poster:e.main_image?.origin_url||e.main_image?.origin_url,class:"video-player",muted:"",loop:"",playsinline:""},null,8,Ce),n("div",xe,[n("div",Se,[n("h2",Pe,ae(e.title),1),n("div",He,[e.source_url?(i(),B(a,{key:0,href:e.source_url,class:"video-link",onClick:t[0]||(t[0]=D(()=>{},["stop"]))},{default:P(()=>[t[2]||(t[2]=N(" Learn More ",-1)),s(r,{width:"20px",height:"20px",icon:"lsicon:right-outline",class:"inline-block"})]),_:1},8,["href"])):w("",!0),e.direct_to?(i(),B(a,{key:1,href:e.direct_to,class:"video-link",onClick:t[1]||(t[1]=D(()=>{},["stop"])),target:"_blank"},{default:P(()=>[t[3]||(t[3]=N(" Buy It Now ",-1)),s(r,{width:"20px",height:"20px",icon:"lsicon:right-outline",class:"inline-block"})]),_:1},8,["href"])):w("",!0)])])])])],10,ke))),128))]),p.videos.length>1?(i(),c("button",{key:0,class:"scroll-button scroll-button-left",onClick:H},[s(r,{icon:"lsicon:left-outline"})])):w("",!0),p.videos.length>1?(i(),c("button",{key:1,class:"scroll-button scroll-button-right",onClick:I},[s(r,{icon:"lsicon:right-outline"})])):w("",!0),p.videos.length>1?(i(),c("div",Ie,[(i(!0),c(S,null,$(p.videos,(e,h)=>(i(),c("button",{key:`indicator-${e.id}`,class:A(["indicator",{active:l(u)===h}]),onClick:x=>g(h)},null,10,Te))),128))])):w("",!0)])):w("",!0)])}}},Me=R(Ve,[["__scopeId","data-v-ecc9fac5"]]),$e={class:"home-page"},Ae={class:"discover-section"},Be={class:"service-section"},Ne={__name:"index-for-redirect",async setup(p){let v,_;const{isMobile:u}=fe(),d=ge(),{homeBanners:b,homeActivities:C,homeProducts:f,homeVideos:y,homeServices:k,homeProductSeries:g,fetchAllHomeData:H}=W(),I=[{id:"game",image:"/product-assets/images/series-game.png",title:"æ¸¸ææ¬ç³»å",subtitle:"",link:"/series/game"},{id:"thin",image:"/product-assets/images/series-thin.png",title:"è½»èæ¬ç³»å",subtitle:"",link:"/series/thin"},{id:"desktop",image:"/product-assets/images/series-desktop.png",title:"å°å¼æºç³»å",subtitle:"",link:"/series/desktop"}],{data:m}=([v,_]=ce(async()=>ue("homePageData",async()=>{const{getCachedData:a}=me();return await a("cache:home:index:v2",async()=>(await H(),{banners:b.value,activities:C.value,products:f.value,videos:y.value,services:k.value,series:g.value}),3600)},{server:!0,lazy:!0})),v=await v,_(),v);m.value&&(b.value=m.value.banners||[],C.value=m.value.activities||[],f.value=m.value.products||[],y.value=m.value.videos||[],k.value=m.value.services||[],g.value=m.value.series||[]);const o=()=>{{const e=(window.scrollY||window.pageYOffset)<=0;
1d.setHeaderTransparent(e)}};E(()=>{u.value||(d.setHeaderTransparent(!0),window.addEventListener("scroll",o,{passive:!0}))}),L(()=>{d.setHeaderTransparent(!1),window.removeEventListener("scroll",o)});const r=de().public?.regionSites||{};return le({script:[{innerHTML:` 2(function() { 3 if (window.location.pathname !== '/') { 4 return; 5 } 6 7 var regionSites = ${JSON.stringify({cn:r.cn||"/cn",na:r.na||"/na",en:r.en||"/en"})}; 8 9 function resolveRedirectPath(countryCode) { 10 if (countryCode === 'CN') { 11 return regionSites.cn; 12 } 13 14 if (countryCode === 'US' || countryCode === 'CA') { 15 return regionSites.na; 16 } 17 18 return regionSites.en; 19 } 20 21 fetch('https://gwapi.mechrevo.com/api/v1/client/home/location', { 22 method: 'GET', 23 headers: { 24 'Content-Type': 'application/json' 25 } 26 }) 27 .then(function(response) { 28 if (!response.ok) { 29 throw new Error('HTTPé误! ç¶æç : ' + response.status); 30 } 31 32 return response.json(); 33 }) 34 .then(function(data) { 35 if (data.status !== 'SUCCESS') { 36 return; 37 } 38 39 var countryCode = data.result && data.result.location && data.result.location.country_code; 40 var targetPath = resolveRedirectPath(countryCode); 41 42 if (targetPath && window.location.pathname !== targetPath) { 43 window.location.href = targetPath; 44 } 45 }) 46 .catch(function(error) { 47 console.error('IPæ£æµå¤±è´¥:', error); 48 }); 49})(); 50 `,type:"text/javascript",tagPosition:"bodyClose"}]}),(a,e)=>{const h=X,x=Z,F=Me,V=j,z=pe,O=ve,U=ee,Y=te,G=oe,q=se,J=ne,K=ie,Q=_e;return i(),c("div",$e,[l(u)?(i(),c(S,{key:1},[s(U,{banners:l(b)},null,8,["banners"]),s(Y,{activities:l(C)},null,8,["activities"]),s(G,{products:l(f)},null,8,["products"]),s(q,{videos:l(y)},null,8,["videos"]),s(J,{services:l(k)},null,8,["services"]),s(K,{series:l(g)},null,8,["series"]),s(Q)],64)):(i(),c(S,{key:0},[s(h,{banners:l(b)},null,8,["banners"]),s(x,{products:l(f)},null,8,["products"]),s(F,{videos:l(y),style:{"padding-top":"180px"}},null,8,["videos"]),n("div",Ae,[e[1]||(e[1]=n("h2",{class:"discover-title"},"æ¢ç´¢ç²¾å½©",-1)),e[2]||(e[2]=n("p",{class:"discover-subtitle"},"å³å»ææ¡åçææ°èµè®¯",-1)),s(V,{to:"/news",class:"discover-image-wrapper"},{default:P(()=>[...e[0]||(e[0]=[n("img",{src:"https://glbfs.mechrevo.com/website/static/images/home-discover.jpg",alt:"æ¢ç´¢ç²¾å½©",class:"discover-image"},null,-1)])]),_:1})]),s(z,{title:"äºè§£ä¸åç³»åç产å",subtitle:"æ´å年轻人åç±çä¸å½åç",items:I,style:{padding:"120px 0 0"}}),n("div",Be,[e[4]||(e[4]=n("h2",{class:"service-title"},"å®åæå¡",-1)),e[5]||(e[5]=n("p",{class:"service-subtitle"},null,-1)),s(V,{to:"/service",class:"service-image-wrapper"},{default:P(()=>[...e[3]||(e[3]=[n("img",{src:"https://glbfs.mechrevo.com/website/static/images/home-service.jpg",alt:"å®åæå¡",class:"service-image"},null,-1)])]),_:1})]),s(O)],64))])}}},Ke=R(Ne,[["__scopeId","data-v-0a441ca0"]]);export{Ke 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.