1import{Q as j,c as y,r as c,b as L,d as E,z as R,a as W,u as C,V as B,n as I,h as p,j as i,A as m,S as d,w as N,G as w}from"./index-3d3bd5ca.js";import{H as O}from"./Header-256eb421.js";import{L as A}from"./ListBasicWallpaper-5627966e.js";import{R as z,C as g}from"./row-65a5c8ed.js";import"./index.esm-718b5506.js";import"./index-7b3af9cd.js";import"./gapSize-a2278ff3.js";import"./shortLink-1d39c4a7.js";import"./index.esm-fcf7a5b6.js";import"./bear-react-carousel.es-cef33c6a.js";import"./index-32c332ef.js";import"./EyeOutlined-28b8733e.js";import"./isEqual-90d117b2.js";import"./index-05ad7cf1.js";const G=async o=>{try{const r=await N.get(o[0]+o[1]+"?language="+o[2]);if((r==null?void 0:r.code)==200)return r.data}catch{}return null};function S(){const{wallpaperId:o}=j(),r=y(),u=c.useRef(!0),{t:h,i18n:x}=L(),[_]=E(),l=_.get("code")||"",{state:a}=R(),{isDarkMode:v}=W(),{me:n}=C(),{useBreakpoint:k}=w,s=k(),{data:e,isLoading:T,isValidating:b,mutate:f}=B(["api/web-application/v2/topic-image/lists/",o,x.language],G,{revalidateOnMount:!1,onSuccess:t=>{t&&typeof t=="object"&&((t==null?void 0:t.hide_in_store)===!1||(t==null?void 0:t.hide_in_store)===!0&&l)||(I.error(h(p.WALLPAPER_PAGE.WALLPAPER_NOT_FOUND.i18nKey,p.WALLPAPER_PAGE.WALLPAPER_NOT_FOUND.fallback)),r("/wallpapers",{replace:!0}))}}),P=t=>{r(`/wallpapers/${o}/create`,{state:{hasZodiac:!!(e!=null&&e.zodiac_data_id),zodiacId:(e==null?void 0:e.zodiac_data_id)||"",subWallpaper:t,redeemCode:l,attributionToken:a==null?void 0:a.attributionToken}})};return c.useEffect(()=>{if(u.current)return o?f():r("/",{replace:!0}),()=>{u.current=!1}},[]),c.useEffect(()=>{if(n!=null&&n.id&&o)try{const t={event:"gtm-ai-detail-page-view",cloud_retail:{eventType:"detail-page-view",visitorId:"",userInfo:{userId:n.id},productDetails:[{product:{id:o}}],purchaseTransaction:void 0}};a!=null&&a.attributionToken?t.cloud_retail.attributionToken=a.attributionToken:t.cloud_retail.attributionToken="",window.dataLayer.push(t)}catch{}},[a==null?void 0:a.attributionToken,n==null?void 0:n.id,o]),i.jsxs("div",{children:[i.jsx(O,{showBackBtn:!0,title:e==null?void 0:e.name}),T||b?i.jsx("div",{style:{marginBottom:100,borderRadius:"1rem",padding:24,backgroundColor:v?m.SECONDARY_DARK:m.WHITE},children:i.jsxs(z,{gutter:16,children:[i.jsx(g,{xs:24,sm:12,lg:8,children:i.jsx(d.Image,{active:!0,style:{width:"100%",display:"flex",marginBottom:s.sm||s.md||s.lg||s.xl?0:20,height:"calc(100vw - 120px)",maxHeight:500},rootClassName:"custom-container-skeleton-image"})}),i.jsxs(g,{xs:24,sm:12,lg:16,children:[i.jsx(d,{active:!0}),i.jsx(d,{active:!0})]})]})}):i.jsx("div",{style:{padding:"0 1rem"},children:i.jsx(A,{listData:(e==null?void 0:e.topic_image_list_datas)||[],mainWallpaperData:e,ribbonValueType:"price",keyTitle:"title",onClickSelect:P,redeemCode:l,showBtnBuyWallpaper:!0})})]})}export{S 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.