1import{n as e}from"./hePW80VL.js";import{Kt as t,V as n,Wt as r,b as i,d as a,gt as o,m as s,p as c,qt as l,u,wt as d}from"./Bj8i6imW.js";import{l as f}from"./G01uKdj9.js";import{p}from"./B3PpE6rH.js";import{s as m,u as h}from"./DSk9Y_bS.js";import{U as g,j as _,p as v}from"#entry";import{t as y}from"./irjOi2yK.js";import{s as b}from"./DUdzwmRI.js";var x=e({default:()=>D}),S={key:0,class:`text-wrapper-top-left`},C={class:`text-wrapper-top-center-btn`,"data-aos":`fade-up`,"data-aos-delay":`240`},w=[`href`,`title`],T=[`href`,`title`],E={key:2,class:`text-wrapper-bottom-left`},D=v({__name:`BlockTextImg`,props:{id:[String,Number],rootBlockId:[String,Number],templateType:[String,Number],url:String,web:String,h5:String,height:{type:String,default:`auto`},h5Height:{type:String,default:`auto`},lazy:{type:Boolean,default:!0},showText:{type:Boolean,default:!0},position:{type:Number,default:``},title:{type:String,default:``},titleColor:{type:String,default:``},titleBgColor:{type:String,default:``},subTitle:{type:String,default:``},subTitleColor:{type:String,default:``},subTitleBgColor:{type:String,default:``},btnText:{type:String,default:``},btnColor:{type:String,default:``},btnBgColor:{type:String,default:``},btnUrl:{type:String,default:``},btn2Text:{type:String,default:``},btn2Color:{type:String,default:``},btn2BgColor:{type:String,default:``},btn2Url:{type:String,default:``},isbg:{type:Boolean,default:!1},textSize:{type:String,default:`default`},margin:{type:String,default:`0px`},borderRadius:{type:String,default:`0px`},aspectRatio:{type:String,default:``},h5AspectRatio:{type:String,default:``},pcProcessWidth:{type:[String,Number],default:null},h5ProcessWidth:{type:[String,Number],default:null},highPriority:{type:Boolean,default:!1},full:{type:Boolean,default:!1}},setup(e){let{trackBlockHit:h,getBlockBannerHitsById:v}=g(),x=p(),D=e,O=u(()=>D.margin||`0px`),k=u(()=>D.borderRadius||`0px`),A=u(()=>!!(D.aspectRatio||D.h5AspectRatio));function j(e){let t=String(e||``).trim();if(!t)return``;if(/^(?:https?:)?\/\/|^(?:mailto|tel):/i.test(t))return t;let n=Array.isArray(x.params.site)?x.params.site[0]:x.params.site,r=String(n||``).replace(/^\/|\/$/g,``),i=t.startsWith(`/`)?t:`/${t.replace(/^\.\//,``)}`;return r&&(i===`/${r}`||i.startsWith(`/${r}/`))?i:_(i,r)}let M=u(()=>j(D.url)),N=u(()=>j(D.btnUrl)),P=u(()=>j(D.btn2Url)),F=o(null);function I(e){M.value&&e?.preventDefault(),e?.stopPropagation(),D.id&&(String(D.templateType)===`4`||String(D.templateType)===`17`?(v(D.id).catch(console.warn),D.rootBlockId&&h(D.rootBlockId).catch(console.warn)):h(D.id).catch(console.warn)),M.value?b(M.value):F.value?.open&&F.value.open()}function L(e){e?.stopPropagation(),D.id&&(String(D.templateType)===`4`?(v(D.id).catch(console.warn),h(D.rootBlockId).catch(console.warn)):h(D.id).catch(console.warn))}return(o,u)=>{let p=y;return n(),s(`div`,{class:r([`text-img-container`,{"has-fixed-ratio":A.value}]),style:t({cursor:M.value?`pointer`:`default`,"--local-margin":O.value,"--local-radius":k.value,"--pc-aspect-ratio":D.aspectRatio||`auto`,"--h5-aspect-ratio":D.h5AspectRatio||D.aspectRatio||`auto`}),onClick:u[1]||=e=>I(e)},[i(p,{ref_key:`imgDom`,ref:F,web:e.web,h5:e.h5,url:M.value,alt:e.title,height:D.height,"h5-height":D.h5Height,lazy:e.lazy,"high-priority":e.highPriority,full:D.full,"pc-process-width":D.pcProcessWidth,"h5-process-width":D.h5ProcessWidth,"aspect-ratio":D.aspectRatio,"h5-aspect-ratio":D.h5AspectRatio},null,8,[`web`,`h5`,`url`,`alt`,`height`,`h5-height`,`lazy`,`high-priority`,`full`,`pc-process-width`,`h5-process-width`,`aspect-ratio`,`h5-aspect-ratio`]),e.showText?(n(),s(`div`,{key:0,class:r([`text-wrapper`,{"is-bg":e.isbg,"is-bottom-left":e.position===(`IMG_TEXT_POSITION`in o?o.IMG_TEXT_POSITION:d(m)).BOTTOM_LEFT}])},[e.position===(`IMG_TEXT_POSITION`in o?o.IMG_TEXT_POSITION:d(m)).TOP_LEFT?(n(),s(`div`,S,[e.title?(n(),s(`div`,{key:0,class:`text-wrapper-top-left-title`,style:t({color:D.titleColor,backgroundColor:D.titleBgColor})},l(e.title),5)):c(``,!0)])):c(``,!0),e.position===(`IMG_TEXT_POSITION`in o?o.IMG_TEXT_POSITION:d(m)).TOP_CENTER?(n(),s(`div`,{key:1,class:r([`text-wrapper-top-center`,e.textSize])},[e.title?(n(),s(`div`,{key:0,class:`text-wrapper-top-center-title`,style:t({color:D.titleColor}),"data-aos":`fade-up`},l(e.title),5)):c(``,!0),e.subTitle?(n(),s(`div`,{key:1,class:`text-wrapper-top-center-sub-title bold`,style:t({color:D.subTitleColor}),"data-aos":`fade-up`,"data-aos-delay":`120`},l(e.subTitle),5)):c(``,!0),a(`div`,C,[e.btnText&&N.value?(n(),s(`a`,{key:0,class:`btn text-wrapper-top-center-btn-1`,style:t({color:e.btnColor||void 0,backgroundColor:e.btnBgColor||`var(--color-main)`}),href:N.value,onClick:f(L,[`stop`]),title:e.btnText},l(e.btnText),13,w)):c(``,!0),e.btn2Text&&P.value?(n(),s(`a`,{key:1,class:`btn text-wrapper-top-center-btn-2`,style:t({color:e.btn2Color||`var(--color-main)`,borderColor:e.btn2Color||`var(--color-main)`,backgroundColor:e.btn2BgColor||`transparent`}),href:P.value,title:e.btn2Text,onClick:u[0]||=f(()=>{},[`stop`])},l(e.btn2Text),13,T)):c(``,!0)])],2)):c(``,!0),e.position===(`IMG_TEXT_POSITION`in o?o.IMG_TEXT_POSITION:d(m)).BOTTOM_LEFT&&(e.title||e.subTitle)?(n(),s(`div`,E,[e.title?(n(),s(`div`,{key:0,class:`text-wrapper-bottom-left-title bold`,style:t({color:D.titleColor}),"data-aos":`fade-up`},l(e.title),5)):c(``,!0),e.subTitle?(n(),s(`div`,{key:1,class:`text-wrapper-bottom-left-sub-title`,style:t({color:D.subTitleColor}),"data-aos":`fade-up`,"data-aos-delay":`120`},l(e.subTitle),5)):c(``,!0)])):c(``,!0)],2)):c(``,!0)],6)}}},[[`__scopeId`,`data-v-8a4c471e`]]),O=50,k=100,A=e=>({productId:e?.productId,productName:e?.productName||``,productModel:e?.productModel||``,productFeatures:e?.productFeatures||``,version:e?.version||``,fileContent:e?.fileContent||``,address:e?.address||``,proPath:e?.proPath||``}),j=e=>(Array.isArray(e)?e:[]).slice(0,k).map(A),M=e=>({id:e?.id,web:e?.web||``,h5:e?.h5||``,url:e?.url||``,urlFlag:e?.urlFlag||``,title:e?.title||``,subTitle:e?.subTitle||``,theme:e?.theme||``,titleColor:e?.titleColor||``,titleBgColor:e?.titleBgColor||``,subTitleColor:e?.subTitleColor||``,subTitleBgColor:e?.subTitleBgColor||``,btnText:e?.btnText||``,btnColor:e?.btnColor||``,btnBgColor:e?.btnBgColor||``,btnUrl:e?.btnUrl||``,btn2Text:e?.btn2Text||``,btn2Color:e?.btn2Color||``,btn2BgColor:e?.btn2BgColor||``,btn2Url:e?.btn2Url||``,productSimpleList:j(e?.productSimpleList)}),N=e=>({imgUrl:e?.imgUrl||``,title:e?.title||``,subTitle:e?.subTitle||``}),P=e=>{if(Array.isArray(e))return e;if(e&&Array.isArray(e.content))return e.content;if(!e||typeof e!=`string`)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t:Array.isArray(t?.content)?t.content:[]}catch{return[]}},F=e=>{let t=P(e?.content),n=t[0],r=n&&typeof n==`object`?{...e,...n}:e;return{blockId:r?.blockId??e?.blockId,templateType:r?.templateType??e?.templateType,bannerList:(Array.isArray(r?.bannerList)?r.bannerList:[]).slice(0,k).map(M),content:t.slice(0,k).map(M),name:r?.name||``,title:r?.t
1itle||``,subTitle:r?.subTitle||``,theme:r?.theme||``,productName:r?.productName||``,productInfoText:r?.productInfoText||``,productInfoUrl:r?.productInfoUrl||``,productsText:r?.productsText||``,productsUrl:r?.productsUrl||``,buyText:r?.buyText||``,buyUrl:r?.buyUrl||``,btnColor:r?.btnColor||``,btnBgColor:r?.btnBgColor||``,btn2Color:r?.btn2Color||``,btn2BgColor:r?.btn2BgColor||``,imgList:(Array.isArray(r?.imgList)?r.imgList:[]).slice(0,k).map(N),productInfoList:j(r?.productInfoList)}},I=e=>(Array.isArray(e)?e:[]).filter(e=>e?.state===1).slice(0,O).map(F),L=e=>({...e,data:I(e?.data)}),R={SWIPER_LARGE:`swiper-large`,SWIPER_SMALL:`swiper-small`},z={[h.IMGS]:{[R.SWIPER_LARGE]:{pc:`2560 / 1227`,h5:`1200 / 2174`},[R.SWIPER_SMALL]:{pc:`1180 / 664`,h5:`1200 / 982`}},[h.VIDEO]:{pc:`2560 / 1013`,h5:`1200 / 1600`},[h.BLOCK20]:{pc:`1250 / 786`,h5:`1200 / 1600`},[h.TABS]:{pc:`2560 / 1295`,h5:`1200 / 2195`}};function B(e,t){let n=z[e];return n?e===h.IMGS?n[t]||n[R.SWIPER_SMALL]||n[R.SWIPER_LARGE]:n:null}function V(e,t){return B(e,t)?.pc||``}function H(e,t){return B(e,t)?.h5||``}export{D as a,L as i,V as n,x as o,H as r,R as t};
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.