1import{C as N}from"./C3eZIIa9.js";import G from"./Bj2tOIyF.js";import{w as M,G as T,n as R,$ as l,I as o,B as t,ab as B,O as I,_ as H,a5 as h,ac as E,N as S,ad as W,a2 as m,a3 as O,a0 as D,d,p,a1 as V}from"./BJhQhrjU.js";import{_ as q,h as F,u as U,e as Y,aO as J,c as K,b6 as Q}from"./D6qU-WXZ.js";import{_ as X}from"./4o4I58Eu.js";import{c as Z,d as ee,e as te}from"./DNpWIK-v.js";import{M as se}from"./CfM7Iw4w.js";const le=["onClick"],ae=["onClick"],ie={key:3,class:"gallery-3 flex-start f-justify-start"},oe=["onClick"],ne={key:0,class:"image-number flex-all-center"},Le={__name:"index",props:{imageList:{type:Array,required:!0},tiled:{type:Boolean,default:!1},imageText:{type:Boolean,default:!1},isPreview:{type:Boolean,default:!0},alt:{type:String,default:""}},setup(e){const i=e,g=d(""),b=d(0),A=d(0),k=d(0),$=d(0),w=d(0),C=d(0),L=d(0),s=d(!1),a=d(0),v=d(null),j=p(()=>i.imageList.map(f=>f.url)),z=p(()=>{switch(g.value){case"square":return{ossW:380};case"horizontal":return{ossW:567};case"vertical":return{ossW:380,ossH:506};default:return{}}});M(()=>i.imageList,()=>{P()},{deep:!0}),M(()=>i.tiled,()=>{P()},{deep:!0}),T(()=>{R(()=>{P()})});const P=()=>{const f=v.value;if(!f)return;const r=i.imageList;if(r.length===1){const c=r[0].url,y=document.createElement("img");y.src=c,y.onload=function(){const u=y.naturalWidth,n=y.naturalHeight,_=u/n;_===1?g.value="square":_>1?g.value="horizontal":g.value="vertical"}}if(r.length===2){const c=f.clientWidth-10;b.value=c/2+"px",A.value=c/2+"px"}if(r.length>=3&&(k.value="374px",$.value="374px",w.value="182px",C.value="182px"),r.length>=4&&i.tiled){const c=f.clientWidth-30;L.value=c/4+"px"}},x=f=>{i.isPreview&&(a.value=f,s.value=!0)};return(f,r)=>{const c=N,y=G;return l(),o("div",{ref_key:"galleryRef",ref:v,class:"comp-gallery_container"},[t(g)&&e.imageList.length===1?(l(),o("div",{key:0,class:B(["pointer gallery-1",t(g)]),onClick:r[0]||(r[0]=u=>x(0))},[I(c,H({src:e.imageList[0].url,alt:"".concat(e.alt)},t(z)),null,16,["src","alt"])],2)):h("",!0),e.imageList.length===2?(l(),o("div",{key:1,class:"gallery-2 flex-start f-justify-start",style:E({"--width":t(b),"--height":t(A)})},[(l(!0),o(S,null,W(e.imageList,(u,n)=>(l(),o("div",{key:n,class:"pointer image-2",onClick:_=>x(n)},[I(c,{src:u.url,alt:e.alt?"".concat(e.alt,"-").concat(n):"","oss-w":380},null,8,["src","alt"])],8,le))),128))],4)):h("",!0),e.tiled&&e.imageList.length>=4?(l(),o("div",{key:2,class:"gallery-tiled flex-start f-justify-start",style:E({"--width":t(L),"--height":t(L)})},[(l(!0),o(S,null,W(e.imageList,(u,n)=>(l(),o("div",{key:u.url,class:"pointer image-tiled",onClick:_=>x(n)},[I(c,{src:u.url,alt:e.alt?"".concat(e.alt,"-").concat(n):"","oss-w":200},null,8,["src","alt"])],8,ae))),128))],4)):e.imageList.length>=3?(l(),o("div",ie,[m("div",{class:"pointer image-left",style:E({"--widthl":t(k),"--heightl":t($)}),onClick:r[1]||(r[1]=u=>x(0))},[I(c,{src:e.imageList[0].url,alt:e.alt?"".concat(e.alt,"-0"):"","oss-w":380},null,8,["src","alt"])],4),m("div",{class:"image-right",style:E({"--widthr":t(w),"--heightr":t(C)})},[(l(!0),o(S,null,W(e.imageList.slice(1,3),(u,n)=>(l(),o("div",{key:n,class:B(["pointer","image-right_".concat(n+1)]),onClick:_=>x(n+1)},[I(c,{src:u.url,alt:e.alt?"".concat(e.alt,"-").concat(n+1):"","oss-w":200},null,8,["src","alt"]),n===1&&e.imageList.length>3?(l(),o("span",ne,O(e.imageList.length-3),1)):h("",!0)],10,oe))),128))],4)])):h("",!0),t(s)?(l(),D(y,{key:4,"src-list":t(j),"initial-index":t(a),onClose:r[2]||(r[2]=u=>s.value=!1)},null,8,["src-list","initial-index"])):h("",!0)],512)}}},re={key:1,class:"default-img"},ce={key:2,class:"iconfont privacy"},ue={class:"model-info"},de={class:"title text-ellipsis"},me={class:"info"},ge={key:0},fe={class:"text"},ve={__name:"AssociationModel",props:{modelGroup:{type:Object,required:!0},objId:{type:[Number,String],default:""},disable:{type:Boolean,default:!1},showOriginal:{type:Boolean,default:!1}},setup(e){const i=e,{t:g}=F(),b=U(),{$sendSensorsData:A}=Y(),k=p(()=>{const{groupName:s,originalGroupName:a}=i.modelGroup;return i.showOriginal&&a!=null?a:s}),$=p(()=>{var a,v;const s=i.modelGroup;return s.pcCovers&&s.pcCovers.length?(a=s.pcCovers[0])==null?void 0:a.url:s.covers&&s.covers.length?(v=s.covers[
10])==null?void 0:v.url:""}),w=p(()=>{const s=i.modelGroup;if(s.maturityRating&&s.maturityRating===Z.restricted){const a=Q();return a?a!==ee.ignore:!0}return!1}),C=p(()=>{const s=i.modelGroup.urlAlias||i.modelGroup.id;return s?b("/model-detail/".concat(s,"?source=").concat(se.postDetail)):""}),L=s=>{if(i.disable||!C.value){s.preventDefault();return}i.objId&&A("community_content_page_click",{id:i.objId,obj_type:"1",click_type:te.model})};return(s,a)=>{const v=K;return l(),D(v,{class:"association-model_container hand",to:t(C),onClick:L},{default:V(()=>[m("div",{class:B(["model-img",{"is-privacy":t(w)}])},[t($)?(l(),D(N,{key:0,src:t($),alt:t(k)||"",fit:"cover","oss-w":104,"oss-h":104},null,8,["src","alt"])):(l(),o("div",re,[...a[0]||(a[0]=[m("img",{src:X,alt:"model"},null,-1)])])),t(w)?(l(),o("i",ce,"î¡")):h("",!0)],2),m("div",ue,[m("div",de,O(t(k)),1),m("div",me,[e.modelGroup.totalFileSize*1?(l(),o("span",ge,O(t(J)(e.modelGroup.totalFileSize,{})),1)):h("",!0),m("span",fe,O(t(g)("model_relatedModel")),1)])]),a[1]||(a[1]=m("div",{class:"arrow-icon"},[m("i",{class:"iconfont icon-you1"})],-1))]),_:1},8,["to"])}}},xe=q(ve,[["__scopeId","data-v-5bd42a9f"]]);export{xe as A,Le as _};
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.