1import{o as me,r as A,j as r,C as Ie,I as ue,p as l,q as d,z as t,x as a,N as u,M as ee,s as i,K as te,aK as Oe,y as g,a4 as oe,u as Ne,aF as Be,a3 as Ue,ac as Fe,d as Ke,ay as We,ai as Z,w as _e,R as Ye,A as pe,F as ve,t as ze,ak as Xe}from"./vender-6fd14064.js";import{R as T,aj as He,al as Ge,y as je,_ as Ee,am as qe,P as Qe,u as Je,b_ as Ze,b$ as et,c0 as tt,bm as ot,X as it,c1 as st,N as y}from"./global-0d0d0236.js";import{d as he}from"./bg_3-729c3eef.js";import{P as nt,r as at}from"./result_4-0878b620.js";import{u as fe}from"./useResourceHandler-848f3b0a.js";import{d as lt}from"./poster-b70ae4ea.js";import{W as rt}from"./index-f654bc31.js";import{l as ct}from"./index-42259d14.js";import{V as dt}from"./VipIcon-c0b4b89e.js";import{C as ut}from"./longpress-2c3ea1e3.js";import"./main-a7893a18.js";import"./common-f0b8c879.js";import"./example3-c71186e9.js";import"./utils-5d556a43.js";import"./result_1-7713e1db.js";import"./watermark-8f98223f.js";const _t={key:0,class:"recommend"},pt={class:"recommend-header"},vt={class:"recommend-list"},ht=["onClick"],mt={class:"constraint"},It={key:0,class:"empty"},Et=me({props:{type:{type:String,default:T.TEMPLATE},matchTplId:{type:String,default:""}},setup(B){const w=B,S=ct.define,{toPhotoEditor:k,toPosterEditor:U,toVideoEditor:F}=fe(),x=A([]),P={pageNo:1,pageSize:20,total:0},{loadMoreList:K,isInfiniteInitial:R,infiniteScrollDisabled:$,isEmpty:D}=He(x,P,O,{autoLoad:!1,isFirstPageScrollTop:!1}),M=r(()=>w.type===T.VIDEO),W=r(()=>w.type===T.MATERIAL),Y=r(()=>w.type===T.TEMPLATE);Ie(async()=>{const{total:_,pageSize:I,pageNo:f,data:v}=await O(P);Object.assign(P,{total:_,pageSize:I,pageNo:f}),x.value=v,R.value=!1,$.value=!1});async function O(_){const I=await lt({..._,type:M.value?"video":"poster",matchTplId:w.matchTplId}),{tplList:f,pageSize:v,pageNo:s,total:n}=I;return{total:n,pageSize:v,pageNo:s,data:f.map(({tplId:X,width:C,height:H,previewImg:E,title:b,type:G,isChosen:j,isCommercial:N})=>({id:X,width:C,height:H,previewImg:E,title:b,type:G,isChosen:j,isCommercial:N}))}}function z(_){const{id:I,previewImg:f}=_;W.value?k({urls:[f],open:!0}):M.value?F({tplId:I}):Y.value&&U({tplId:I})}return(_,I)=>{const f=ue("Image"),v=ue("CoverBlock");return x.value.length?(l(),d("div",_t,[t("div",pt,[t("span",null,a(_.$t("xx.video-tmpl-design-index.preview-modal.recommend")),1)]),t("div",vt,[u(rt,{primaryKey:"id",resizeCallback:()=>7,list:x.value},{item:ee(({item:s})=>[(l(),d("div",{key:s.tplId,class:"cell",onClick:n=>z(s)},[oe((l(),d("div",mt,[u(v,{width:s.width,height:s.height,scale:i(nt)},{default:ee(()=>[u(je,{tplId:s.id,type:B.type,isVisitorPreview:!0},null,8,["tplId","type"]),u(f,{fit:"cover",lazy:"",aliOSSProcessQuery:{resizeW:490},src:s.previewImg},null,8,["src"]),u(dt,{isChosen:s.isChosen},null,8,["isChosen"]),s.isCommercial!=="0"?(l(),te(ut,{key:0})):g("",!0)]),_:2},1032,["width","height","scale"])])),[[i(S),{width:s.width,height:s.height}]])],8,ht))]),_:1},8,["resizeCallback","list"]),!i(D)&&!i($)?(l(),te(Ge,{key:0,"is-initial":i(R),"onUpdate:is-initial":I[0]||(I[0]=s=>Oe(R)?R.value=s:null),load:i(K)},null,8,["is-initial","load"])):g("",!0)]),i(D)?(l(),d("div",It,a(_.$t("xx.infinite-scroll.empty")),1)):g("",!0)])):g("",!0)}}}),ft=Ee(Et,[["__scopeId","data-v-a5f8e8de"]]);const yt={class:"template-preview"},Tt={class:"preview-header"},gt={class:"title text-line"},wt=["width","height","src"],St={class:"preview-right"},kt={class:"preview-right-header"},xt={class:"resource-name text-line"},Rt={class:"resource-actions"},Ct={key:0,class:"row"},Vt={class:"text-line"},At={class:"row"},Pt={class:"text-line"},bt={key:1,class:"row"},Lt={class:"text-line"},$t={class:"row"},Dt={class:"text-line"},Mt={class:"row"},Ot={class:"text-line"},Nt={class:"row"},Bt={class:"text-line"},Ut={key:3,class:"row copyright"},Ft={key:4,class:"keys"},Kt=["onClick"],Wt=me({setup(B){const w=at.define,{VITE_SITE_NAME:S}={VITE_APP_XXWEB_ORIGIN:"https://www.yiketu.com",VITE_APP_XXAPI_ORIGIN:"",VITE_XXWEB_MOBILE_ORIGIN:"https://m.yiketu.com",VITE_SITE:"yiketu",VITE_LANG_FALLBACK:"zh-CN",VITE_SITE_NAME:"æå¯å¾",VITE_SITE_THEME:"blue",VITE_SITE_TITLE:"å¨çº¿ç¼è¾å¨_å
费海æ¥è®¾è®¡_å¾çå¶ä½ç¥å¨",VITE_SITE_KEYWORDS:"å¾çç¼è¾,æµ·æ¥è®¾è®¡,è®¾è®¡ç´ æ,çµåå¾çå¶ä½",VITE_SITE_DESCRIPTION:"䏿¬¾äººäººé½ä¼çUI设计软件,æ¯æäº¬ä¸/æ¼å¤å¤/æ·å®/天ç«/æåº/å¿«æççµåå¹³å°,æä¾å¾çå¶ä½,ç²¾éæ¨¡æ¿,ä¸é®æ å¾,æµ·éç´ æ,æ¯æ¥æ´æ°,è½»æ¾æå®è®¾
1计,å
è´¹å¨çº¿ç¼è¾ã",VITE_STAT_ANALY_BAIDU:"true",VITE_STAT_ANALY_DWH:"true",VITE_STAT_ANALY_UET:"true",VITE_OSS_CDN:"https://cs-rt-c1.yiketu.com",VITE_YIKETU_WEB_HOST:"https://www.yiketu.com",VITE_DIGSHOW_WEB_HOST:"https://www.digshow.com",VITE_ARMS_PID:"hkux41gqpo@b5054863706744f",VITE_SDK_YKT_WEB:"",VITE_YIKETU_WEB_OPEN_SITE:"/open/index.html",VITE_YIKETU_WEB_CREATOR_SITE:"/creator/task-center",VITE_YIKETU_WEB_BLOG_SITE:"/blog/index.html",VITE_ASSETS_CDN:"https://cs-c1.yiketu.com,https://cs-c2.yiketu.com",VITE_PUBLISH_PATH:"publish",VITE_CUSTOMER_QQ:"3504693686",VITE_CUSTOMER_QQ_EMAIL:"[email protected]",VITE_CUSTOMER_QQ_GROUP:"328533469",VITE_APP_XXAPI_JAVA_ORIGIN:"https://j.yiketu.com",VITE_APP_XXAPI_JAVA_AL_ORIGIN:"https://j-al.yiketu.com",VITE_AIGC_PRODUCER_ID:"001191350102MA33B4G24700000",VITE_BUILD_ENV:"real",BASE_URL:"/",MODE:"production.yiketu",DEV:!1,PROD:!0},{t:k}=Ne(),{tplIds:U,materialIds:F,initTplIds:x,initMaterialIds:P,handleFavoriteTpl:K,handleFavoriteMaterial:R}=qe(),{toPhotoEditor:$,toPosterEditor:D,toVideoEditor:M}=fe(),{context:W,onServerPrefetchDataSSR:Y,onServerBeforeMountedSSR:O,onClientBeforeMountedSSR:z}=Qe({uid:"templatePreview"}),_=Be(),I=Ue(),f=Je(),v=_.params.type;let s=_.params.tplId;const n=A(),X=A(),C=A(),H=A(),E=Fe({width:0,height:0}),b=A([]),G=k("xx.global.seo.template-preview.title",[S]),j=k("xx.global.seo.template-preview.poster-title",[S]),N=k("xx.global.seo.template-preview.keywords",[S]),ie=k("xx.global.seo.template-preview.description",[S]),se=r(()=>{var e;return!!((e=n.value)!=null&&e.concatenate)}),ye=r(()=>{var e;return((e=n.value)==null?void 0:e.isCommercial)!=="0"}),L=r(()=>v===T.VIDEO),q=r(()=>v===T.MATERIAL),Te=r(()=>v===T.TEMPLATE),ne=r(()=>q.value?F.value.includes(s):U.value.includes(s)),ge=r(()=>{var o;if(!n.value)return"";if(L.value)return Ze.VIDEO.label;const e=n.value.type;return((o=et[e])==null?void 0:o.label)||""}),ae=r(()=>n.value?Ve(n.value.width,n.value.height):"-"),we=r(()=>n.value?Ke(n.value.gmtCreate).format("YYYY-MM-DD"):"-"),Se=r(()=>{var e;return(e=n.value)!=null&&e.videoInfo?n.value.videoInfo.videoUrl:""}),ke=r(()=>{var e;return(e=n.value)!=null&&e.videoInfo?tt(n.value.videoInfo.videoSize):0}),xe=r(()=>{var e;return(e=n.value)!=null&&e.videoInfo?ot(Number(n.value.videoInfo.videoDuration),"mm:ss"):0}),le=r(()=>{const e=_.query.showRecommendList||1;return v!==T.MATERIAL&&Number(e)}),Re=r(()=>`calc(100% - ${le.value?140:50}px)`);Y(async({javaServerFetch:e})=>{if(s=_.params.tplId,!!s)return await he(s,e)}),O(e=>{e&&(ce(e),Q(e))}),z(e=>{e&&(ce(e),Q(e))}),Ie(()=>{Ce()});async function Ce(){if(s)try{if(n.value||await Ae(),!C.value)return;const{width:e,height:o}=n.value,p=C.value.clientHeight||300,{scaled:h}=it({width:e||p,height:o||p},C.value.getBoundingClientRect(),"contain");if(se.value){const m=Math.max(h.width,Math.min(380,e)),c=m/e,V=o*c;E.width=m,E.height=V}else E.width=h.width,E.height=h.height;if(v===T.MATERIAL)return P();x()}catch(e){console.error(e)}}function Ve(e,o){var p=[],h=e,m=o;if(h>=m?(h=e,m=o):(h=o,m=e),e!=1&&o!=1)for(var c=m;c>=2;c--)e%c==0&&o%c==0&&(e=e/c,o=o/c);return p[0]=e,p[1]=o,p}async function Ae(){const e=await he(s);Pe(e),Q(e)}function Q(e){b.value=e.keywords.sort((o,p)=>o.length-p.length),n.value=e}function re(e){const{title:o,keywords:p=[],desc:h="",tplTypeFilterList:m=[]}=e;let c=m.map(V=>V.filterName).join("ã");return c=c?`${j}_(${c})_`:"",{title:`${o} - ${c}${G}`,keywords:p.length?`${p.join(",")}ï¼${N}`:N,description:h?`${h}ï¼${ie}`:ie}}function ce(e){const o=re(e);W.tdk=o}function Pe(e){const o=re(e);st(o)}function be(){window.close()}async function Le(){var e;if(q.value){const o=(e=n.value)==null?void 0:e.sourcePreviewImg;o&&$({urls:[o],sourceIds:[s],open:!0})}else L.value?(await f.checkIsLogin({dialog:!0}),M({tplId:s})):Te.value&&D({tplId:s})}async function $e(){const e=!ne.value;q.value?await R({id:s,type:e}):await K({id:s,type:e})}function De(e){const o=I.resolve({name:"templateCenter",query:{keyword:e}});window.open(o.fullPath)}return(e,o)=>{var m,c,V,de;const p=Xe,h=We("dwh");return l(),d("div",yt,[t("div",Tt,[t("div",{class:"back",onClick:be},[u(y,{iconName:"icon-shangyiye"}),Z(" "+a(e.$t("xx.video-tmpl-design-index.preview-modal.return")),1)]),t("div",gt,a((m=n.value)==null?void 0:m.title),
11)]),t("div",{class:"preview-content",style:pe({height:i(Re)})},[t("div",{class:_e([{"is-concatenate":i(se)},"preview-body"])},[t("div",{ref_key:"innerContentRef",ref:C,class:"inner"},[i(L)?(l(),d("video",{key:0,ref_key:"videoRef",ref:X,controls:"",controlslist:"nodownload",autoplay:"",muted:"",width:i(E).width,height:i(E).height,src:i(Se),onClick:o[0]||(o[0]=Ye(()=>{},["stop"]))},null,8,wt)):(l(),d("div",{key:1,ref_key:"imageRef",ref:H,style:pe({width:`${i(E).width}px`,height:`${i(E).height}px`,background:`url(${(c=n.value)==null?void 0:c.previewImg}) no-repeat center center / 100%`})},null,4))],512)],2),t("div",St,[t("div",kt,[t("div",xt,a((V=n.value)==null?void 0:V.title),1),t("div",Rt,[u(p,{type:"primary",onClick:Le},{default:ee(()=>[Z(a(e.$t("xx.video-tmpl-design-index.preview-modal.edit")),1)]),_:1}),oe((l(),d("span",{class:_e(["favorite-icon",{favorite:i(ne)}])},[u(y,{"icon-name":"icon-shoucang"})],2)),[[i(w),{handle:$e,stop:!0}]])])]),i(L)?g("",!0):(l(),d("div",Ct,[t("label",null,[u(y,{class:"symbol-ico","icon-name":"icon-leixing"}),t("i",null,a(e.$t("xx.video-tmpl-design-index.preview-modal.type")),1)]),t("span",Vt,a(e.$t(i(ge))),1)])),t("div",At,[t("label",null,[u(y,{class:"symbol-ico","icon-name":"icon-chicun"}),t("i",null,a(e.$t("xx.video-tmpl-design-index.preview-modal.size")),1)]),t("span",Pt,a(i(ae)[0])+":"+a(i(ae)[1]),1)]),i(L)?(l(),d(ve,{key:2},[t("div",$t,[t("label",null,[u(y,{class:"symbol-ico","icon-name":"icon-daxiao"}),t("i",null,a(e.$t("xx.video-tmpl-design-index.preview-modal.volume")),1)]),t("span",Dt,a(i(ke)),1)]),t("div",Mt,[t("label",null,[u(y,{class:"symbol-ico","icon-name":"icon-bianhao"}),t("i",null,a(e.$t("xx.video-tmpl-design-index.preview-modal.order-num")),1)]),t("span",Ot,a((de=n.value)==null?void 0:de.tplId),1)]),t("div",Nt,[t("label",null,[u(y,{class:"symbol-ico","icon-name":"icon-shichang"}),t("i",null,a(e.$t("xx.video-tmpl-design-index.preview-modal.duration")),1)]),t("span",Bt,a(i(xe)),1)])],64)):(l(),d("div",bt,[t("label",null,[u(y,{class:"symbol-ico","icon-name":"icon-shangjiashijian"}),t("i",null,a(e.$t("xx.video-tmpl-design-index.preview-modal.launch-time")),1)]),t("span",Lt,a(i(we)),1)])),i(ye)?(l(),d("div",Ut,[t("label",null,[u(y,{class:"symbol-ico","icon-name":"icon-shangyongwuyou"}),t("i",null,a(e.$t("xx.copyright")),1)])])):g("",!0),b.value.length?(l(),d("div",Ft,[t("strong",null,a(e.$t("xx.video-tmpl-design-index.preview-modal.keywords")),1),(l(!0),d(ve,null,ze(b.value,(J,Me)=>oe((l(),d("span",{key:Me,class:"tag",onClick:Yt=>De(J)},[Z(a(J),1)],8,Kt)),[[h,`resourcePreview${J}`]])),128))])):g("",!0)])],4),i(le)?(l(),te(ft,{key:0,type:i(v),matchTplId:i(s)},null,8,["type","matchTplId"])):g("",!0)])}}}),lo=Ee(Wt,[["__scopeId","data-v-025afd00"]]);export{lo 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.